Inline C version of orf_length