HSBC loses £22.6m on HQ sale