Zagier's well-known work on traces of singular moduli relates the coefficients of certain weakly holomorphic modular forms of weight 1 2 to traces of values of the modular j-function at imaginary quadratic points. A real quadratic analogue was recently studied by Duke, Imamoḡlu, and Tóth. They showed that the coefficients of certain weight 1 2 mock modular forms f D = ∑ d > 0 a ( d , D ) q d , D > 0 are given in terms of traces of cycle integrals of the j-function. Their result applies to those coefficients a ( d , D ) for which d D is not a square. Recently, Bruinier, Funke, and Imamoḡlu employed a regularized theta lift to show that the coefficients a ( d , D ) for square d D are traces of regularized integrals of the j-function. In the present paper, we provide an alternate approach to this problem. We introduce functions j m , Q (for Q a quadratic form) which are related to the j-function and show, by modifying the method of Duke, Imamoḡlu, and Tóth, that the coefficients for which d D is a square are traces of cycle integrals of the functions j m , Q .