TikTok gears up for legal fight in US to prevent ban