Severe abscess needing surgical intervention, would be my guess. Euthanasia might be kinder but vet should evaluate as to whether or not this is too advanced for
a likely success. Proximity to vital functions (brain, eyes, mouth & ability to smell) & that it's been let go so long don't improve the odds...very sad. Tell them it's an
emergency when you call & good luck. Let us know? Whoever let this animal suffer this long should probably be reported & charged with animal cruelty.