int func2(int x, int y)
movl 4(%esp), %eax
addl 8(%esp), %eax
xorl $255,%eax
imul 8(%esp), %eax
sall $4, eax
Asked
Active
Viewed 79 times
-3

500 - Internal Server Error
- 28,327
- 8
- 59
- 66

Suleman
- 1
- 1
-
Don't post pictures of code. Edit your question and put the code back in as text (properly formatted). – Michael Dec 29 '21 at 09:03
-
Not sure I understand the questions about what those operations are "used for". `xorl` performs an exclusive OR and `imul` performs an integer multiplication. If you're really wondering what the ultimate purpose of those operations is, that's anyone's guess. – lurker Dec 31 '21 at 22:41
1 Answers
1
The C code corresponding to this function is something like
int func2(int x, int y)
{
int eax;
eax = x;
eax += y;
eax ^= 0xff;
eax *= y;
eax <<= 4;
return (eax);
}
What that is supposed to do... I have no idea.

fuz
- 88,405
- 25
- 200
- 352