NL_S_ShiftRows runs on each row of the 4x4 matrix S. Each row element is shifted to the left (D=0) or right (D=1). The offset depends on the row index.
Examples
v=1:4;S=[v;v;v;v];[L]=NL_S_ShiftRows(S,0)//application of NL_S_ShiftRows[R]=NL_S_ShiftRows(S,1)//application of NL_S_ShiftRows