China has hit back at the US and its allies over their moves to restrict Beijing's chip-making ambitions, placing curbs on exports of gallium and germanium.