Remove indirect call(s) inside loop

Indirect function or subroutine calls cannot be vectorized. To fix: Avoid using indirect calls in loops.