Clean up emu_state struct