code: def decode_varint_3(buffer, pos=0):
      result = buffer[pos]
      if not (result & 0x81):
          return (result >> 1), pos + 1
      if not (result & 0x80):
          return (result >> 1) ^ (~0), pos + 1
  
      result &= 0x7F
      pos += 1
      shift = 7
      while 1:
          b = buffer[pos]
          result |= (b & 0x7F) << shift
          pos += 1
          if not (b & 0x80):
              return ((result >> 1) ^ -(result & 1), pos)
          shift += 7
          if shift >= 64:
              raise ValueError("Out of int64 range")
  
file_path: kafka-python/benchmarks/varint_speed.py
imports: from __future__ import print_function
  import pyperf
  from kafka.vendor import six
label_desc: Use image node_id 14 for calling a global function with example usage: decode_varint_3(buffer, pos) and returns: unknown,  unknown, unknown,  unknown, unknown,  pos