apply jckarter's patch for fixing x86-64 ABI
fix clang's warning about dangling else