public static void main(String[] args) {
        simple_test();
        if (args.length == 2) {
            long x = Long.parseLong(args[0]);
            long y = Long.parseLong(args[1]);
            assert(x / y == divide_x_y(x, y));
            assert(x / y == divide_x_y_bsearch(x, y));
        } else {
            Random r = new Random();
            for (int times = 0; times < 100000; ++times) {
                long x = r.nextInt(Integer.MAX_VALUE), y = r.nextInt(Integer.MAX_VALUE);
                y = (y == 0) ? 1 : y;  // ensure no divide by 0.
                System.out.println("times = " + times + ", x = " + x + ", y = " + y);
                System.out.println("first = " + x / y + ", second = " + divide_x_y(x, y));
                assert(x / y == divide_x_y(x, y));
                assert(x / y == divide_x_y_bsearch(x, y));
            }
        }

    }