China's yuan weakens to over 3-month lows, hurt by stock sel