In this paper, we propose a novel distributed energy efficient joint resource block (RB) and discrete transmit power allocation scheme for an underlay device-to-device (D2D) network. In addition to minimizing the total transmit power of the D2D tier, the proposed scheme also ensures the rate constraints for all the cellular user equipments (CUEs) and D2D pairs. D2D pairs learn the RB and transmit power to be used by playing a game in Satisfaction Form (SF). The Efficient Satisfaction Equilibrium (ESE) of the game is shown to be the RB and discrete transmit power allocation with the lowest aggregate transmit power, in the case when the rate requirements of all the D2D pairs can be satisfied with non-zero transmit powers; else, the game is shown to converge to the K-Person Satisfaction Point (K-PSP), where the largest subset of D2D pairs are satisfied. The base station (BS) then decides to reject or accommodate the D2D pairs to ensure the rate constraints of the CUEs. The proposed scheme is established to be equivalent to the deferred acceptance (DA) algorithm applied to a many-to-one matching game. We exploit this equivalence to investigate the stability and optimality of the solution. The performance of the proposed scheme is evaluated and compared with existing schemes in the literature.