EmitFunctionDef loaded the function Result into %rax (or %xmm0) at the top of
the epilogue, then ran the local/param ARC release pass — which calls
_ClassRelease / _StringRelease / _DynArrayRelease. Those calls clobber %rax, so
any value-returning function that also releases an ARC-managed parameter or
local returned garbage.
Most visibly, a method returning Integer but taking an interface (or class)
value parameter releases that parameter on exit, so `U.Use(I)` returned 3
instead of 55; a String-returning function taking a String parameter returned a
clobbered pointer.
Move the Result load to AFTER every ARC release call, immediately before
leave/ret, so nothing can clobber it. sret (record-returning) functions are
unaffected — they return via the caller's buffer and load no Result. The $main
epilogue already sets %eax=0 after its global-release pass, so it was correct.
Two e2e regression tests on both backends: TestRun_Native_RetValSurvivesArcRelease
(value return past a class-param release) and TestRun_Native_IntfArgToMethod
(interface value arg to a method, dispatched in the callee).
Full suite OK (2681), FIXPOINT_OK (native-backend-only change).