The genie knows what you wish at all times. She knows this because she knows what you wishn't. By subtracting what you wish from what you wishn't, or what you wishn't from what you wish (whichever is more twisted), she obtains a difference, or deviadjinn.
The genie submagic uses deviadjinn to generate corrective desires to drive the genie from a situation where you wish to a situation where you wishn't, and granting the desire that you wishn't, you now wish. Consequently, the desire that you wish, is now the desire that you wishn't, and it follows that the desires that you wished, are now the desires which you had wishn't.

