multiple を particles before a verb


I chanced across this sentence while doing anki.  

彼は高齢を理由に社長を辞めたよ

There are 2 を particles before the verb (in this case 辞めた being the verb).
From what I understand of the を particle, it marks a direct object of the next
occurring verb but in this case, there are 2 direct objects before the verb.
How do I decipher this? I tried to search for these kinds of usages online but
couldn't find any related hits on google due to me not knowing the proper
terms for these usages. Any related links would be appreciated. Also why does
長を辞めた translates to resigned as president. In english, this would very
literally mean that the action of quiting is done on the president, which
doesn't really makes sense to me. Shouldn't it be 社長として辞めた instead.

