Separates the behavior from the actual switch statement and gets rid of duplication, now that we can use the general GetImmediateAsU64() function.
Separates the behavior from the actual switch statement and gets rid of duplication, now that we can use the general GetImmediateAsU64() function.