The push and pop instructions of gas on the amd64 bit architecture do not correctly assemble pop or push instructions for 32 bit registers. The architecture supporst pop %edx and push %edx but these are not accepted by gas either as pop %edx or as popl %edx
You can't pop/push 32bit registers in 64bit mode.