@jit(nopython=True)<EOL>def searchsorted(arr, N, x):
L = <NUM_LIT:0><EOL>R = N-<NUM_LIT:1><EOL>done = False<EOL>m = (L+R)//<NUM_LIT:2><EOL>while not done:<EOL><INDENT>if arr[m] < x:<EOL><INDENT>L = m + <NUM_LIT:1><EOL><DEDENT>elif arr[m] > x:<EOL><INDENT>R = m - <NUM_LIT:1><EOL><DEDENT>elif arr[m] == x:<EOL><INDENT>done = True<EOL><DEDENT>m = (L+R)//<NUM_LIT:2><EOL>if L>R:<EOL><INDENT>done = True<EOL><DEDENT><DEDENT>return L<EOL>
N is length of arr