func submitTPMRequest(rw io.ReadWriter, tag uint16, ord uint32, in []interface{}, out []interface{}) (uint32, error) {
	resp, code, err := tpmutil.RunCommand(rw, tpmutil.Tag(tag), tpmutil.Command(ord), in...)
	if err != nil {
		return 0, err
	}
	if code != tpmutil.RCSuccess {
		return uint32(code), tpmError(code)
	}
	_, err = tpmutil.Unpack(resp, out...)
	return 0, err
}
submitTPMRequest sends a structure to the TPM device file and gets results
back, interpreting them as a new provided structure.
package tpm
import (
	"encoding/binary"
	"errors"
	"io"
	"github.com/google/go-tpm/tpmutil"
)