ecma_bigint_and (ecma_value_t left_value, /**< left BigInt value */
                 ecma_value_t right_value) /**< right BigInt value */
{
  if (left_value == ECMA_BIGINT_ZERO || right_value == ECMA_BIGINT_ZERO)
  {
    return ECMA_BIGINT_ZERO;
  }

  ecma_extended_primitive_t *left_p = ecma_get_extended_primitive_from_value (left_value);
  ecma_extended_primitive_t *right_p = ecma_get_extended_primitive_from_value (right_value);

  if (!(left_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN))
  {
    if (!(right_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN))
    {
      return ecma_bigint_bitwise_op (ECMA_BIG_UINT_BITWISE_AND, left_p, right_p);
    }

    /* x & (-y) == x & ~(y-1) == x &~ (y-1) */
    uint32_t operation_and_options = ECMA_BIG_UINT_BITWISE_AND_NOT | ECMA_BIG_UINT_BITWISE_DECREASE_RIGHT;
    return ecma_bigint_bitwise_op (operation_and_options, left_p, right_p);
  }

  if (!(right_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN))
  {
    /* (-x) & y == ~(x-1) & y == y &~ (x-1) */
    uint32_t operation_and_options = ECMA_BIG_UINT_BITWISE_AND_NOT | ECMA_BIG_UINT_BITWISE_DECREASE_RIGHT;
    return ecma_bigint_bitwise_op (operation_and_options, right_p, left_p);
  }

  /* (-x) & (-y) == ~(x-1) & ~(y-1) == ~((x-1) | (y-1)) == -(((x-1) | (y-1)) + 1) */
  uint32_t operation_and_options = (ECMA_BIG_UINT_BITWISE_OR
                                    | ECMA_BIG_UINT_BITWISE_DECREASE_BOTH
                                    | ECMA_BIG_UINT_BITWISE_INCREASE_RESULT);
  return ecma_bigint_bitwise_op (operation_and_options, left_p, right_p);
} /* ecma_bigint_and */
ecma_bigint_and (ecma_value_t left_value,  
                 ecma_value_t right_value)  
{
  if (left_value == ECMA_BIGINT_ZERO || right_value == ECMA_BIGINT_ZERO)
  {
    return ECMA_BIGINT_ZERO;
  }

  ecma_extended_primitive_t *left_p = ecma_get_extended_primitive_from_value (left_value);
  ecma_extended_primitive_t *right_p = ecma_get_extended_primitive_from_value (right_value);

  if (!(left_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN))
  {
    if (!(right_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN))
    {
      return ecma_bigint_bitwise_op (ECMA_BIG_UINT_BITWISE_AND, left_p, right_p);
    }

     
    uint32_t operation_and_options = ECMA_BIG_UINT_BITWISE_AND_NOT | ECMA_BIG_UINT_BITWISE_DECREASE_RIGHT;
    return ecma_bigint_bitwise_op (operation_and_options, left_p, right_p);
  }

  if (!(right_p->u.bigint_sign_and_size & ECMA_BIGINT_SIGN))
  {
     
    uint32_t operation_and_options = ECMA_BIG_UINT_BITWISE_AND_NOT | ECMA_BIG_UINT_BITWISE_DECREASE_RIGHT;
    return ecma_bigint_bitwise_op (operation_and_options, right_p, left_p);
  }

   
  uint32_t operation_and_options = (ECMA_BIG_UINT_BITWISE_OR
                                    | ECMA_BIG_UINT_BITWISE_DECREASE_BOTH
                                    | ECMA_BIG_UINT_BITWISE_INCREASE_RESULT);
  return ecma_bigint_bitwise_op (operation_and_options, left_p, right_p);
}  