Write the `lba_to_chs' function.