inline int rand7()
{
return rand5() * 1.4;
}

Maybe some asm code is missing with which it would look more advanced