comefrom: <qiyuangong>977_Squares_of_a_Sorted_Array_1.java
code: public int[] sortedSquares(int[] A) {
          int pos = 0;
          int[] res = new int[A.length];
          int curr = 0;
          while (pos < A.length && A[pos] < 0) pos++;
          int npos = pos - 1;
          while (pos < A.length && npos >= 0) {
              if (A[pos] * A[pos] < A[npos] * A[npos]) {
                  res[curr++] = A[pos] * A[pos];
                  pos++;
              } else {
                  res[curr++] = A[npos] * A[npos];
                  npos--;
              }
          }
          while (npos >= 0) {
              res[curr++] = A[npos] * A[npos];
              npos--;
          }
          while (pos < A.length) {
              res[curr++] = A[pos] * A[pos];
              pos++;
          }
          return res;
      }
masked: public int [ ] sample_funcname ( int [ ] var_0 ) {
    int var_2 = 0 ;
    int [ ] var_4 = new int [ var_0 . length ] ;
    int var_5 = 0 ;
    while ( var_2 < var_0 . length && var_0 [ var_2 ] < 0 ) var_2 ++ ;
    int var_7 = var_2 - 1 ;
    while ( var_2 < var_0 . length && var_7 >= 0 ) {
      if ( var_0 [ var_2 ] * var_0 [ var_2 ] < var_0 [ var_7 ] * var_0 [ var_7 ] ) {
        var_4 [ var_5 ++ ] = var_0 [ var_2 ] * var_0 [ var_2 ] ;
        var_2 ++ ;
      }
      else {
        var_4 [ var_5 ++ ] = var_0 [ var_7 ] * var_0 [ var_7 ] ;
        var_7 -- ;
      }
    }
    while ( var_7 >= 0 ) {
      var_4 [ var_5 ++ ] = var_0 [ var_7 ] * var_0 [ var_7 ] ;
      var_7 -- ;
    }
    while ( var_2 < var_0 . length ) {
      var_4 [ var_5 ++ ] = var_0 [ var_2 ] * var_0 [ var_2 ] ;
      var_2 ++ ;
    }
    return var_4 ;
  }
  