/* Recursively print the subtree under the Node. This is an internal function. */
STATIC VOID EFIAPI AmlDbgPrintTreeInternal(IN AML_NODE_HEADER *Node, IN BOOLEAN Recurse, IN UINT8 Level)
/* Recursively print the subtree under the Node. This is an internal function. */
STATIC VOID EFIAPI AmlDbgPrintTreeInternal(IN AML_NODE_HEADER *Node, IN BOOLEAN Recurse, IN UINT8 Level)
{
  AML_NODE_HEADER  *ChildNode;
  if (!IS_AML_NODE_VALID (Node)) {
    ASSERT (0);
    return;
  }
  if (IS_AML_DATA_NODE (Node)) {
    AmlDbgPrintDataNode ((AML_DATA_NODE *)Node, Level);
    return;
  } else if (IS_AML_OBJECT_NODE (Node)) {
    AmlDbgPrintObjectNode ((AML_OBJECT_NODE *)Node, Level);
  } else if (IS_AML_ROOT_NODE (Node)) {
    AmlDbgPrintRootNode ((AML_ROOT_NODE *)Node, Level);
  } else {
    ASSERT (0);
    return;
  }
  if (!Recurse) {
    return;
  }
  ChildNode = AmlGetNextSibling (Node, NULL);
  while (ChildNode != NULL) {
    ASSERT (Level < MAX_UINT8);
    AmlDbgPrintTreeInternal (ChildNode, Recurse, (UINT8)(Level + 1));
    ChildNode = AmlGetNextSibling (Node, ChildNode);
  }
}