// Machine Code
mov eax, [esi] ; load first element
lea ecx, [esi+4] ; point to second
cmp ecx, edi ; check bounds
jge done ; if past end, done
loop:
cmp [ecx], eax ; compare current with max
cmovg eax, [ecx] ; conditionally move if greater
add ecx, 4 ; next element
cmp ecx, edi ; check bounds
jl loop ; repeat if not done
done: