code: private Node tryMinimizeHook(Node n) {
      Node originalCond = n.getFirstChild();
      MinimizedCondition minCond = MinimizedCondition.fromConditionNode(originalCond);
      MeasuredNode mNode =
          minCond.getMinimized(MinimizationStyle.ALLOW_LEADING_NOT);
      if (mNode.isNot()) {
        // Swap the HOOK
        Node thenBranch = n.getSecondChild();
        replaceNode(originalCond, mNode.withoutNot());
        n.removeChild(thenBranch);
        n.addChildToBack(thenBranch);
        reportChangeToEnclosingScope(n);
      } else {
        replaceNode(originalCond, mNode);
      }
      return n;
    }
docs: Try flipping HOOKs that have negated conditions.
  
  Returns the replacement for n or the original if no replacement was
  necessary.