.section .text
.global mystery
.type mystery, @function
mystery:
pushl %ebp
movl %esp, %ebp
xorl %eax, %eax
xorl %ecx, %ecx
movl 8(%ebp), %edx
begin:
cmpl 12(%ebp), %ecx
jge done
addl (%edx, %ecx, 4), %eax
incl %ecx
jmp begin
done:
movl %ebp, %esp
popl %ebp
ret
I am aware that there is a loop at begin: but I am not entirely sure what either of the xorl would do in this function.