WIP: C version of lsrc