Partly solved by @mkitti. He used the gelsd! definition in lapack.jl to hack a gelss! function together.
I’d still like to know what the functions shown in nm are, but I’ll mark it as solved if no one answers in 24h as it’s not really a Julia thing.