User blog comment:Koveras Alvane/The Beauty of Mass Effect 2 Ending/@comment-24174486-20130423151236

"Here, MAGIC is the yet-undiscovered function that determines which squad mates die holding the line, based on their number, loyalties, and intrinsic defense values."

Actually, it is known what determines possible squadmate deaths in the hold-the-line segment. This flowchart sums it up and the rest of the Suicide Mission variables.