runtime The issue seems to involve unexpected behavior during execution that may be related to compiler optimizations or ABI-specific details rather than an inherent fault within QEMU's instruction emulation itself. The fact that encapsulating code in a function changes its behavior suggests runtime issues potentially caused by optimization, inline expansion, or variable scoping effects specific to the RISC-V target architecture and toolchain.