> Have you confirmed this works on the afflicted HTC devices?

Unfortunately I do not have access to one.  But FWIW:

 * The C code performs the same exact syscalls as the binary currently in your repo.  It was a direct translation from asm to C and should be functionally identical.
 * The only special HTC logic in the binary is to handle "reboot oem-78", which isn't called by your app.
 * For all other cases (reboot, reboot {recovery,bootloader}, reboot -p) the HTC binary just issues standard Linux sys_reboot() calls, which I tested on my devices.

AOSP 4.2's system/core/toolbox/reboot.c seems to work in essentially the same way, so maybe the stock HTC /system/bin/reboot is introducing new points of failure (like trying to reboot via init instead of issuing the syscalls directly).  This would imply that the "magic" merely lies in bypassing a brain-damaged /system/bin/reboot, not in any special behavior on the part of this HTC binary.