<gouthampradhan>binary_search_SqrtX_1.java
public int mySqrt(int x) {
    int s = 0, e = x;
    long ans = 0L;
    while (s <= e) {
      long m = s + (e - s) / 2;
      long prod = m * m;
      if (prod <= x) {
        s = (int) (m + 1);
        ans = m;
      } else e = (int) m - 1;
    }
    return (int) ans;
  }
public int sample_funcname ( int var_0 ) {
  int var_2 = 0 , var_3 = var_0 ;
  long var_5 = 0L ;
  while ( var_2 <= var_3 ) {
    long var_7 = var_2 + ( var_3 - var_2 ) / 2 ;
    long var_8 = var_7 * var_7 ;
    if ( var_8 <= var_0 ) {
      var_2 = ( int ) ( var_7 + 1 ) ;
      var_5 = var_7 ;
    }
    else var_3 = ( int ) var_7 - 1 ;
  }
  return ( int ) var_5 ;
}
