sim: arm: fix -Wshadow=local warnings

Remove duplicate nested variable declarations, rename some to avoid
confusion when the type is different or the original value should be
retained, and fix some weirdness with nested enums in structs.
3 files changed