For the algorithm, we split the arrays a and b into m blocks of size m, and then we want to find for every i=0...m-1 the index j such that we have b[(j-1)*m]<=a[i*m]<b[j*m] because then, we know that block a[i*m..i*m+m-1] must be merged in somewhere in the block starting in b[(j-1)*m].
To find these indices j, we first compute in array firstC for every i=0...m-1 the least index j such that a[i*m]<b[j*m] holds. Hence, we then have b[(j-1)*m]<=a[i*m]<b[j*m]. To get j-1 instead of j, we finally decrement the values in array firstC and store the values j-1 in array firstC'.