Months of battles and air strikes on ISIL-held city have pummeled most of it with 3,000 homes destroyed, officials say.