Rule reminder
The gerund (gerundio) can express cause implicitly. Present gerund (gerundio presente) expresses a cause simultaneous with the main action: 'Non vedendoci bene, portava gli occhiali' (= poiché non ci vedeva bene). Past gerund (gerundio passato) expresses a cause anterior to the main action: 'Avendo studiato molto, superò l'esame' (= poiché aveva studiato molto). The gerund subject must be the same as the main clause subject.
Which gerund form expresses a cause that is ANTERIOR (happened before) to the main clause action?