Well - it's 'at least' last in - first out.
When Emirates was sacking roughly 1250 of their 1900 A380 pilots the criteria were obviously many with 'extensive' sickness records out (like a longer one time off due a cancer treatment or broken leg); many from the top of the seniority list (as too expensive - same approach applied by Qatar at the moment), or having any records of non-compliance e.g. internal reports of fatigue during flights.
Source: please have a look on the pprune forum for first hand reports.
What the above indicates about the airline's safety culture - make your own call.