Given $a,b,c,d\in\mathbb Z$ with $ad+bc=p$ a prime there is an $m\in\mathbb Z$ with $-\lceil1+\sqrt{p}\rceil< r_1,r_2<\lceil1+\sqrt{p}\rceil$ and $$r_1\equiv mac\bmod p$$ $$r_2\equiv mbd\bmod p$$ where $r_1,r_2$ are interpreted as in $[-\frac p2,\frac p2]$ by Dirichlet's pigeonhole principle.

Is there any closed form for such an $m$ and hence $r_1$ and $r_2$ as well?

Can we canonize an expression that provides an unique $m$ that works for a given $a,b,c,d$ at least under unimodular condition of $ad-bc=1$ (there may be multiple $m$'s however I am asking if we can isolate an expression that works always providing an unique $m$)?

Say if 1. and 2. fails then at least is there a $\mathsf{polylog}(|a|+|b|+|c|+|d|)$ time algorithm to find such an $m$ that does not involve linear integer programming (with linear integer programming there is Lenstra's method which is not very practical)?