def check_encoding(self, f=sys.stdout):
    vAA = self.regs[0]
    vBB = self.regs[1]
    vCC = self.regs[2]
    if ((vAA == vBB) and (vAA <= UINT4_MAX) and (vCC <= UINT4_MAX)):
        name = self.get_name()
        f.write(('warning: "%s" can be encoded more efficiently ' % name))
        f.write(('as "%s/2addr v%u, v%u"\n' % (name, vAA, vCC)))
        return 2
    if ((vAA == vCC) and (vAA <= UINT4_MAX) and (vBB <= UINT4_MAX) and self.opIsCommutative()):
        name = self.get_name()
        f.write(('warning: "%s" is commutative and can be ' % name))
        f.write(('encoded more efficiently as "%s/2addr v%u, v%u"\n' % (name, vAA, vBB)))
        return 2
    return 0
def check_encoding(self, f=sys.stdout):
    vAA = self.regs[0]
    vBB = self.regs[1]
    vCC = self.regs[2]
    if ((vAA == vBB) and (vAA <= UINT4_MAX) and (vCC <= UINT4_MAX)):
        name = self.get_name()
        f.write(('warning: "%s" can be encoded more efficiently ' % name))
        f.write(('as "%s/2addr v%u, v%u"\n' % (name, vAA, vCC)))
        return 2
    if ((vAA == vCC) and (vAA <= UINT4_MAX) and (vBB <= UINT4_MAX) and self.opIsCommutative()):
        name = self.get_name()
        f.write(('warning: "%s" is commutative and can be ' % name))
        f.write(('encoded more efficiently as "%s/2addr v%u, v%u"\n' % (name, vAA, vBB)))
        return 2
    return 0