I have been working in the US (San Francisco) for 4+ years on an H1-B visa but am leaving permanently in October. What are the tax implications of this move? Also, I have $32,000 fully-vested in a 401k plan which I plan to cash in, what amount can I expect to be taxed from this? And is leaving the US permanently grounds for any exemptions? Any advice greatly appreciated.