/* For compatibility reasons, the NameOpNode must initially contain an integer. */
EFI_STATUS EFIAPI AmlNameOpUpdateInteger(IN AML_OBJECT_NODE_HANDLE NameOpNode, IN UINT64 NewInt)
/* For compatibility reasons, the NameOpNode must initially contain an integer. */
EFI_STATUS EFIAPI AmlNameOpUpdateInteger(IN AML_OBJECT_NODE_HANDLE NameOpNode, IN UINT64 NewInt)
{
  EFI_STATUS              Status;
  AML_OBJECT_NODE_HANDLE  IntegerOpNode;
  if ((NameOpNode == NULL)                                             ||
      (AmlGetNodeType ((AML_NODE_HANDLE)NameOpNode) != EAmlNodeObject) ||
      (!AmlNodeHasOpCode (NameOpNode, AML_NAME_OP, 0)))
  {
    ASSERT (0);
    return EFI_INVALID_PARAMETER;
  }
  IntegerOpNode = (AML_OBJECT_NODE_HANDLE)AmlGetFixedArgument (
                                            NameOpNode,
                                            EAmlParseIndexTerm1
                                            );
  if ((IntegerOpNode == NULL)  ||
      (AmlGetNodeType ((AML_NODE_HANDLE)IntegerOpNode) != EAmlNodeObject))
  {
    ASSERT (0);
    return EFI_INVALID_PARAMETER;
  }
  Status = AmlUpdateInteger (IntegerOpNode, NewInt);
  ASSERT_EFI_ERROR (Status);
  return Status;
}