Let itemType be another name for an integer. Let shellsort be a function returning an integer. It is called with arguments "a", l, and r, where "a" is a pointer to an itemType, l is an integer, and r is an integer. To perform the function, let i, j, h, and k each be an integer. Let v be an itemType. Let incs be an array of length 16 each element of which is an integer, whose initial value is the array with elements 1391376, 463792, 198768, 86961, 33936, 13776, 4592, 1968, 861, 336, 112, 48, 21, 7, 3, and 1. Continue to perform operation 1 as long as k is less than 16 prior to the iteration; before starting this loop, set k equal to 0; upon completion of each iteration of the loop, increment k by one. To perform operation 1, continue to perform block 2 as long as i is less than or equal to r prior to the iteration; before starting this loop, evaluate e2 after computing e1, where e1 is the contents of h upon assigning the element of incs at index k to it, e2 is the contents of i upon assigning e3 to it, and e3 is l plus h; upon completion of each iteration of the loop, increment i by one. To perform block 2, first set v equal to the element of "a" at index i. Then set j equal to i. Next, continue to perform block 3 as long as both e1 and e2 are nonzero, where e1 is nonzero if and only if j is greater than h, e2 is nonzero if and only if e3 is greater than v, e3 is the element of "a" at index e4, and e4 is j minus h at the beginning of the iteration. To perform block 3, first set the element of "a" at index j equal to the element of "a" at index e1, where e1 is j minus h. After that, decrement j by h. This ends block 3. Continuing on, we next set the element of "a" at index j equal to v. This ends block 2.