Logged In: NO

Second bug:
if (count == poppush[0]) return instr; // wrong
Must be:
if (count <= poppush[0]) return instr;