GCC compiler supports __builtin_expect statement that is used to define likely and unlikely macros.
eg.
#define likely(expr) (__builtin_expect(!!(
__assume should be similar.
However, if you want to do this really well you should use Profile Guided Optimization rather than static hints.