I am writing a program in C, and it turned out that assembly inserts are required(since the code is very small), the main problem is that from the asm insert I need to get access to a local variable, I tried to implement access to this variable through the frame pointer(rsp), but it didn't work out for me.Here's an example of how I did it:
...
int a=0;
asm("movq $5,(% rsp) \ n");
...

I would be grateful for the help.

1 Answers 1

asm("mov $5,% 0":"= r"(a));