Here is one point that may help clarify the concepts being discussed here. Stick with me - it's not as hard as it looks.
The equations of motion that govern the movement in this sort of circumstance are called "Impulse-Momentum" equations.
Energy is a different, but often confused concept. Energy is conserved in the total discharge, but does not properly account for the motion of the objects. This is because energy is dissipated in things like bullet deformation, heat loss, light generation, friction loss along barrel, linear and rotational energy imparted to the bullet, slide, and frame, etc. The total energy consumed equals the total potential chemical energy in the powder, or simply, the energy released when the powder burns.
You have to keep these concepts separate in your mind. Momentum governs motion, energy is conserved and influences motion, but does not govern it, because energy is dissipated in the process.
Going back to the equations of motion. Momentum is mass times velocity. Momentum is conserved in a collision, or separation of objects. As such the vector equation**
(where Mb and Vb is the mass and vector velocity of the bullet and Mg and Vg are the mass and vector velocity of the gun, and 1 and 2 denote before and after firing, respectively)
(Mb1+Mg1)V1=Mb2Vb2 + Mg2Vg2
(in english - mass of the gun and bullet times its intital velocity of zero equals the mass times the velocity of the bullet after firing plus the mass times the velocity of the gun after firing).
Note that the initial velocity of the gun plus bullet assembly (the lefthand side of the equation) is ZERO.
This means that the vector sum of the right hand side of the eqution is also ZERO. This means that Mb2Vb2=-Mg2Vg2, or in english "the gun and the bullet are going in opposite directions in proportion to their respective masses" The little bullet is going fast in one direction and the big gun is going slow in the opposite direction.
Or, the mass of the bullet times the velocity of the bullet is equally offset (in opposite directions) by the mass of the gun times the velocity of the gun.
BTW this basic 1st semester physics proves that the gun moves before the bullet exits the gun. It has to because the mass distribution of the gun has changed (or the center of gravity as previously noted) and it will move at every point in time according to the above equation, ie the equation is true at every point in the bullet's path down the barrel.
If you don't believe all that, note the post above about tall front sights on long barrelled revos. Its true!
Just remember, energy and momentum are different concepts and must be properly analyzed. They get tossed around interchangably, but they aren't the same thing by a long shot.
**If you don't know what vector equations are, just think of them as mathematical representations of the direction of the motion. In real life they can get a bit complicated but in concept they are very simple - they are math that accounts for the direction (in this case) of the momentum.