Handling of local variables and arguments depends on the level of inline assembly. However, when register coloring is selected in the code generation settings for optimization level 1 or greater, you can force variables to stay in a register by using the symbol $.