#include #include #include #include #include #include #include #include #include #ifdef __cplusplus #include #include #include #include #include #include #include #endif #define COINFLIP() (rand() % 2) static int foo(); static void __attribute__((always_inline)) bar(); int main(int argc, char const *argv[]) { if (foo()) { bar(); } else { bar(); bar(); bar(); } return 0; } static int foo() { return COINFLIP(); } static void bar() { if (COINFLIP() && COINFLIP()) { puts("bar"); } else { switch (COINFLIP()) { default: { puts("default?"); break; } case 0: case 1: { puts("flipped a coin"); break; } } } }