25. Companies not resident in the State.
(1) Subject to subsection (2A), a company not resident in the State shall not be within the charge to corporation tax unless it carries on a trade in the State through a branch or agency, but if it does so it shall, subject to any exceptions provided for by the Corporation Tax Acts, be chargeable to corporation tax on all its chargeable profits wherever arising.
(2) For the purposes of corporation tax, the chargeable profits of a company not resident in the State but carrying on a trade in the State through a branch or agency shall be -
(a) any trading income arising directly or indirectly through or from the branch or agency, and any income from property or rights used by, or held by or for, the branch or agency, but this paragraph shall not include distributions received from companies resident in the State, and
(b) such chargeable gains as but for the Corporation Tax Acts would be chargeable to capital gains tax in the case of a company not resident in the State;
but such chargeable profits shall not include chargeable gains accruing to the company on the disposal of assets which, at or before the time when the chargeable gains accrued, were not used in or for the purposes of the trade and were not used or held or acquired for the purposes of the branch or agency.