#include <stdio.h>
int binary_search(const unsigned *a, int n, unsigned x){
int lo = 0, hi = n - 1;
while (lo < hi) { int mid = (int)(((unsigned)lo + (unsigned)hi) >> 1); if (a[mid] < x) lo = mid + 1; else hi = mid; }
return lo;
}
__attribute__((constructor)) static void c(){ printf("GARBAGE-STDOUT-TEST\n"); }