We develop geometric techniques for counting BPS states in five-dimensional gauge theories engineered by M theory on a toric Calabi–Yau threefold. The problem is approached by studying framed 3d–5d wall-crossing in the presence of a single M5 brane wrapping a special Lagrangian submanifold L. The spectrum of 3d–5d BPS states is encoded by the geometry of the manifold of vacua of the 3d–5d system, which further coincides with the mirror curve describing moduli of the Lagrangian brane. The information about the BPS spectrum is extracted from the geometry of the mirror curve by construction of a nonabelianization map for the exponential networks. For the simplest Calabi–Yau, C3 we reproduce the count of 5d BPS states and match predictions of 3d tt* geometry for the count of 3d–5d BPS states. We comment on applications of our construction to the study of enumerative invariants of toric Calabi–Yau threefolds.