length_func: _loop67865432: mov r9b, [r8] cmp r9b, 0 jz _exitloop4323567 inc r8 jmp _loop67865432 _exitloop4323567: dec r8 ; idk how to do it properly do im doing this instead dec r8 dec r8 dec r8 mov rax, r8 ret