Im tasked with converting x86-64 Assembly code back into a simple C function. The C function that I am working with take 4 arguments (long a, long b, long c, long d). As expected the beginning of the Assembly code starts with
movq %rdi, -32(%rbp)
movq %rsi, -40(%rbp)
movq %rdx, -48(%rbp)
movq %rcx, -56(%rbp)
Later in the code these registers are used again for example
movq -40(%rbp), %rax
imulq -48(%rbp), %rax
movq %rax, %rdx
movq -32(%rbp), %rax
addq %rdx, %rax
movq %rax, -24(%rbp)
My question is if the above code, on the third line, is assigning a value for (long c) or if this register was emptied during the first code snippet and is simply being used as a general purpose register in this situation.