/* Recursively check the red-black tree properties #1 to #4 on a node. */
UINT32 RedBlackTreeRecursiveCheck(IN CONST RED_BLACK_TREE_NODE *Node)
/* Recursively check the red-black tree properties #1 to #4 on a node. */
UINT32 RedBlackTreeRecursiveCheck(IN CONST RED_BLACK_TREE_NODE *Node)
{
  UINT32  LeftHeight;
  UINT32  RightHeight;
  if (Node == NULL) {
    return 1;
  }
  ASSERT (Node->Color == RedBlackTreeRed || Node->Color == RedBlackTreeBlack);
  if (Node->Color == RedBlackTreeRed) {
    ASSERT (NodeIsNullOrBlack (Node->Left));
    ASSERT (NodeIsNullOrBlack (Node->Right));
  }
  LeftHeight  = RedBlackTreeRecursiveCheck (Node->Left);
  RightHeight = RedBlackTreeRecursiveCheck (Node->Right);
  ASSERT (LeftHeight == RightHeight);
  return (Node->Color == RedBlackTreeBlack) + LeftHeight;
}