code: def is_square(x):
      """Return True if x is a square number."""
      if x < 0:
          return False
  
      # Note that the possible values of y**2 % n for a given n are limited.
      # For example, when n=4, y**2 % n can only take 0 or 1.
      # In other words, if x % 4 is 2 or 3, then x is not a square number.
      # Mathematically, it determines if it belongs to the set {y**2 % n},
      # but implementationally, it can be realized as a logical conjunction
      # with an n-bit integer.
      # see https://mersenneforum.org/showpost.php?p=110896
      # def magic(n):
      #     s = {y**2 % n for y in range(n)}
      #     s = set(range(n)) - s
      #     return sum(1 << bit for bit in s)
      # >>> print(hex(magic(128)))
      # 0xfdfdfdedfdfdfdecfdfdfdedfdfcfdec
      # >>> print(hex(magic(99)))
      # 0x5f6f9ffb6fb7ddfcb75befdec
      # >>> print(hex(magic(91)))
      # 0x6fd1bfcfed5f3679d3ebdec
      # >>> print(hex(magic(85)))
      # 0xdef9ae771ffe3b9d67dec
      if 0xFDFDFDEDFDFDFDECFDFDFDEDFDFCFDEC & (1 << (x & 127)):
          return False  # e.g. 2, 3
      m = x % 765765  # 765765 = 99 * 91 * 85
      if 0x5F6F9FFB6FB7DDFCB75BEFDEC & (1 << (m % 99)):
          return False  # e.g. 17, 68
      if 0x6FD1BFCFED5F3679D3EBDEC & (1 << (m % 91)):
          return False  # e.g. 97, 388
      if 0xDEF9AE771FFE3B9D67DEC & (1 << (m % 85)):
          return False  # e.g. 793, 1408
      return mlib.sqrtrem(int(x))[1] == 0
  
imports: import sys
  import math
  import mpmath.libmp
label_desc: Use image node_id 9 for calling a global function with example usage: is_square(x) and returns: unknown, False, False, False, False, False