instr isn't a `bytes` object here, so `indexbytes` doesn't convert the resulting thing to an int, you may want `instr = _ffi.buffer(in_, inlen)[:]` to get bytes out