Let $q = p^t$ where $p$ is prime. I am interested in estimating the complete exponential sum, which looks like 
$$
\sum\_{0 \leq h < q} \chi( (h-a\_1)(h-a\_2)(h-a\_3))
\ \bar{\chi}( (h-b\_1)(h-b\_2)(h-b\_3)) \ e^{ 2 \pi i C h /q}
$$
in terms of integers $a\_i$'s and $b\_j$'s and $C$. Here $\chi$ is a Dirichlet character modulo $q$. I was able to find a reference for something similar but I couldn't quite deduce the bound for this sum. I would greatly appreciate if anyone knows bound for this. Thank you very much. 



How to estimate a mixed character sum $\sum_{h \in \mathbb{Z}/q \mathbb{Z}} \chi(f(h)) e(Ch/q)$?
[Alpoge's comments](https://mathoverflow.net/a/293994) oversimplify the situation slightly.


There exists a unique constant $\alpha$ modulo $p^{\lfloor t/2\rfloor}$ such that $\chi(1+x)=q^{ 2\pi i \alpha x/q}$ for $\alpha$ a mulitple of $p^{\lceil t/2 \rceil}$.


If we let $e\_q(x) = e^{2\pi i x /q}$ and $F(h) = \chi( (h-a\_1)(h-a\_2)(h-a\_3))
\ \bar{\chi}( (h-b\_1)(h-b\_2)(h-b\_3)) e\_q( C h )$ then $$F(h+x)= F(h) e\_q\left( x \left( \alpha \left( \frac{1}{h-a\_1} + \frac{1}{h-a\_2} + \frac{1}{h-a\_3} - \frac{1}{h-b\_1} - \frac{1}{h-b\_2}- \frac{1}{h-b\_3} \right) + C \right) \right).$$


Thus the sum over the residue class vanishes unless$$ \alpha \left( \frac{1}{h-a\_1} + \frac{1}{h-a\_2} + \frac{1}{h-a\_3} - \frac{1}{h-b\_1} - \frac{1}{h-b\_2}- \frac{1}{h-b\_3} \right) + C =0$$ modulo $p^{\lfloor t/2 \rfloor}$.


If this rational function has only simple zeroes then it will have $O(1)$ zeroes in the $t$ even case or $O(p)$ zeroes in the $t$ odd case but with Gauss sum cancellation.


However, in other cases, where the vanishing order is higher, you can get less than square root cancellation for $t$ large. This happens when your sum locally looks like $e\_q(x^3)$, for instance.


