+ reservation.reg_type = tolower(reg_string[0]);
A (relatively) well-known issue with functions like tolower() is that the lower case variant of 'I' may be either 'ı' or 'i' depending on the locale we're running in. Although I don't think any of I/İ/ı/i is a valid register type in the shader profiles that support register()/packoffset(), it seems preferable to use the locale-independent ascii_tolower() here.