That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. Our top argument must be in the range of the string. We must extend the array. The user plays games with us and presents new arguments.
Bottom segment is the short one.
If we have just processed some options following some non-options, exchange them so that the options come first. Otherwise interpret it as a short option. This is an option that requires an argument. This is an option that accepts an argument optionally. This is an option that requires an argument.