Generally you'll want to do something like
void *x;
asm(".. code that writes to register %0" : "=r"(x) : ...
int r = some_function(x);
asm(".. code that uses the result..." : ... : "r"(r), ...
That is, you don't want to do the function call in the inline asm at all. That way you don't have to worry about details of the calling conventions, or stack frame management.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…