pushl %ebp
movl %esp,%ebp
pushl %ebx
movl 8(%ebp),%ebx
leal 2(%ebx),%edx
xorl %ecx,%ecx
cmpl %ebx,%ecx
jge .L4
.L6:
leal 5(%ecx,%edx),%edx
leal 3(%ecx),%eax
imull %eax,%edx
incl %ecx
cmpl %ebx,%ecx
jl .L6
.L4:
movl %edx,%eax
popl %ebx
movl %ebp,%esp
popl %ebp
ret
trying to make code in c then compiling it with the -S -m32 flags to see if i get the same output in the assemble file but its kind of confusing
its supposed to look something like this
int func(int x)
{
int i;
int result = _____________;
for( ________; ________; i++ ) {
__________________;
__________________;
}
return result;
}