You apply resistance to each source of damage
The section "Resistance and Vulnerability" indicates:
Resistance and then vulnerability are applied after all the other modifiers to damage (…)
This tells us that Heavy Armor Master will always apply before any resistance, but we need to know when the modifiers are applied, which is covered in the section "Damages suffered":
Each weapon, spell, and harmful monster ability specifies the damage it inflicts. You roll the die or dice, add any modifier, and apply the damage to your target. Magic weapons, special abilities and other factors can give a bonus to the damage.
However, it still does not tell us clearly if a multi-attack has a significant damage roll or one for each attack, but the "Make an attack" section says this about what happens during an attack:
- Solve the attack. You launch the attack. On one stroke, you get damageunless the attack in question has rules specifying the opposite. Some attacks cause special effects in addition to or instead of damage.
An attack deals damage when it hits and with multi-attack, there are several individual moves and so the damage (and thus the resistance) is applied several times.
A quick note: Resistance is also applied as damage type by type of damage, which means that if one thing inflicts several types of damage, you apply a resistance to each one that you resist separately, even if you simply resist it. 39, full damage. This is evoked in the question "Resistance to multiple damage"
Also note that this has no effect on the damage reduction of the Heavy Armor Master, as this only reduces the non-magic damage of the clubbing / piercing / breaking:
When you wear heavy armor, the damage done by non-magic weapons is reduced by 3,