# This file is auto-generated by /codegen/x86_64_test_encoding.py
# Reference opcodes are generated by:
#     GNU assembler (GNU Binutils) 2.28.51.20170402

from peachpy.x86_64 import *
import unittest


class TestVFMADD132SS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0x99, 0x74, 0x24, 0xE0]), VFMADD132SS(xmm30(k2.z), xmm4, dword[r12 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0x99, 0xCB]), VFMADD132SS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0x99, 0x4C, 0xCC, 0x9D]), VFMADD132SS(xmm1, xmm14, dword[r12 + rcx*8 - 99]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x9A, 0x99, 0xF3]), VFMADD132SS(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFMADD213SS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xA9, 0x74, 0x24, 0xE0]), VFMADD213SS(xmm30(k2.z), xmm4, dword[r12 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xA9, 0xCB]), VFMADD213SS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xA9, 0x4C, 0xCC, 0x9D]), VFMADD213SS(xmm1, xmm14, dword[r12 + rcx*8 - 99]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x9A, 0xA9, 0xF3]), VFMADD213SS(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFMADD231SS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xB9, 0x74, 0x24, 0xE0]), VFMADD231SS(xmm30(k2.z), xmm4, dword[r12 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xB9, 0xCB]), VFMADD231SS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xB9, 0x4C, 0xCC, 0x9D]), VFMADD231SS(xmm1, xmm14, dword[r12 + rcx*8 - 99]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x9A, 0xB9, 0xF3]), VFMADD231SS(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFMADDSS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x6A, 0xC9, 0x30]), VFMADDSS(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x6A, 0x4C, 0xCC, 0x9D, 0x30]), VFMADDSS(xmm1, xmm14, xmm3, dword[r12 + rcx*8 - 99]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x6A, 0x4C, 0xCC, 0x9D, 0x90]), VFMADDSS(xmm1, xmm14, dword[r12 + rcx*8 - 99], xmm9).encode())


class TestVFMSUB132SS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0x9B, 0x74, 0x24, 0xE0]), VFMSUB132SS(xmm30(k2.z), xmm4, dword[r12 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0x9B, 0xCB]), VFMSUB132SS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0x9B, 0x4C, 0xCC, 0x9D]), VFMSUB132SS(xmm1, xmm14, dword[r12 + rcx*8 - 99]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x9A, 0x9B, 0xF3]), VFMSUB132SS(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFMSUB213SS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xAB, 0x74, 0x24, 0xE0]), VFMSUB213SS(xmm30(k2.z), xmm4, dword[r12 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xAB, 0xCB]), VFMSUB213SS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xAB, 0x4C, 0xCC, 0x9D]), VFMSUB213SS(xmm1, xmm14, dword[r12 + rcx*8 - 99]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x9A, 0xAB, 0xF3]), VFMSUB213SS(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFMSUB231SS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xBB, 0x74, 0x24, 0xE0]), VFMSUB231SS(xmm30(k2.z), xmm4, dword[r12 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xBB, 0xCB]), VFMSUB231SS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xBB, 0x4C, 0xCC, 0x9D]), VFMSUB231SS(xmm1, xmm14, dword[r12 + rcx*8 - 99]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x9A, 0xBB, 0xF3]), VFMSUB231SS(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFMSUBSS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x6E, 0xC9, 0x30]), VFMSUBSS(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x6E, 0x4C, 0xCC, 0x9D, 0x30]), VFMSUBSS(xmm1, xmm14, xmm3, dword[r12 + rcx*8 - 99]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x6E, 0x4C, 0xCC, 0x9D, 0x90]), VFMSUBSS(xmm1, xmm14, dword[r12 + rcx*8 - 99], xmm9).encode())


class TestVFNMADD132SS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0x9D, 0x74, 0x24, 0xE0]), VFNMADD132SS(xmm30(k2.z), xmm4, dword[r12 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0x9D, 0xCB]), VFNMADD132SS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0x9D, 0x4C, 0xCC, 0x9D]), VFNMADD132SS(xmm1, xmm14, dword[r12 + rcx*8 - 99]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x9A, 0x9D, 0xF3]), VFNMADD132SS(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFNMADD213SS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xAD, 0x74, 0x24, 0xE0]), VFNMADD213SS(xmm30(k2.z), xmm4, dword[r12 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xAD, 0xCB]), VFNMADD213SS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xAD, 0x4C, 0xCC, 0x9D]), VFNMADD213SS(xmm1, xmm14, dword[r12 + rcx*8 - 99]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x9A, 0xAD, 0xF3]), VFNMADD213SS(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFNMADD231SS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xBD, 0x74, 0x24, 0xE0]), VFNMADD231SS(xmm30(k2.z), xmm4, dword[r12 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xBD, 0xCB]), VFNMADD231SS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xBD, 0x4C, 0xCC, 0x9D]), VFNMADD231SS(xmm1, xmm14, dword[r12 + rcx*8 - 99]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x9A, 0xBD, 0xF3]), VFNMADD231SS(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFNMADDSS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x7A, 0xC9, 0x30]), VFNMADDSS(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x7A, 0x4C, 0xCC, 0x9D, 0x30]), VFNMADDSS(xmm1, xmm14, xmm3, dword[r12 + rcx*8 - 99]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x7A, 0x4C, 0xCC, 0x9D, 0x90]), VFNMADDSS(xmm1, xmm14, dword[r12 + rcx*8 - 99], xmm9).encode())


class TestVFNMSUB132SS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0x9F, 0x74, 0x24, 0xE0]), VFNMSUB132SS(xmm30(k2.z), xmm4, dword[r12 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0x9F, 0xCB]), VFNMSUB132SS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0x9F, 0x4C, 0xCC, 0x9D]), VFNMSUB132SS(xmm1, xmm14, dword[r12 + rcx*8 - 99]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x9A, 0x9F, 0xF3]), VFNMSUB132SS(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFNMSUB213SS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xAF, 0x74, 0x24, 0xE0]), VFNMSUB213SS(xmm30(k2.z), xmm4, dword[r12 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xAF, 0xCB]), VFNMSUB213SS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xAF, 0x4C, 0xCC, 0x9D]), VFNMSUB213SS(xmm1, xmm14, dword[r12 + rcx*8 - 99]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x9A, 0xAF, 0xF3]), VFNMSUB213SS(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFNMSUB231SS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xBF, 0x74, 0x24, 0xE0]), VFNMSUB231SS(xmm30(k2.z), xmm4, dword[r12 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xBF, 0xCB]), VFNMSUB231SS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xBF, 0x4C, 0xCC, 0x9D]), VFNMSUB231SS(xmm1, xmm14, dword[r12 + rcx*8 - 99]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x9A, 0xBF, 0xF3]), VFNMSUB231SS(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFNMSUBSS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x7E, 0xC9, 0x30]), VFNMSUBSS(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x7E, 0x4C, 0xCC, 0x9D, 0x30]), VFNMSUBSS(xmm1, xmm14, xmm3, dword[r12 + rcx*8 - 99]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x7E, 0x4C, 0xCC, 0x9D, 0x90]), VFNMSUBSS(xmm1, xmm14, dword[r12 + rcx*8 - 99], xmm9).encode())


class TestVFMADD132SD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0x99, 0x73, 0xF0]), VFMADD132SD(xmm30(k2.z), xmm4, qword[r11 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0x99, 0xCB]), VFMADD132SD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0x99, 0x4C, 0xD3, 0xA8]), VFMADD132SD(xmm1, xmm14, qword[r11 + rdx*8 - 88]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x9A, 0x99, 0xF3]), VFMADD132SD(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFMADD213SD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xA9, 0x73, 0xF0]), VFMADD213SD(xmm30(k2.z), xmm4, qword[r11 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xA9, 0xCB]), VFMADD213SD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xA9, 0x4C, 0xD3, 0xA8]), VFMADD213SD(xmm1, xmm14, qword[r11 + rdx*8 - 88]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x9A, 0xA9, 0xF3]), VFMADD213SD(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFMADD231SD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xB9, 0x73, 0xF0]), VFMADD231SD(xmm30(k2.z), xmm4, qword[r11 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xB9, 0xCB]), VFMADD231SD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xB9, 0x4C, 0xD3, 0xA8]), VFMADD231SD(xmm1, xmm14, qword[r11 + rdx*8 - 88]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x9A, 0xB9, 0xF3]), VFMADD231SD(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFMADDSD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x6B, 0xC9, 0x30]), VFMADDSD(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x6B, 0x4C, 0xD3, 0xA8, 0x30]), VFMADDSD(xmm1, xmm14, xmm3, qword[r11 + rdx*8 - 88]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x6B, 0x4C, 0xD3, 0xA8, 0x90]), VFMADDSD(xmm1, xmm14, qword[r11 + rdx*8 - 88], xmm9).encode())


class TestVFMSUB132SD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0x9B, 0x73, 0xF0]), VFMSUB132SD(xmm30(k2.z), xmm4, qword[r11 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0x9B, 0xCB]), VFMSUB132SD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0x9B, 0x4C, 0xD3, 0xA8]), VFMSUB132SD(xmm1, xmm14, qword[r11 + rdx*8 - 88]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x9A, 0x9B, 0xF3]), VFMSUB132SD(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFMSUB213SD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xAB, 0x73, 0xF0]), VFMSUB213SD(xmm30(k2.z), xmm4, qword[r11 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xAB, 0xCB]), VFMSUB213SD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xAB, 0x4C, 0xD3, 0xA8]), VFMSUB213SD(xmm1, xmm14, qword[r11 + rdx*8 - 88]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x9A, 0xAB, 0xF3]), VFMSUB213SD(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFMSUB231SD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xBB, 0x73, 0xF0]), VFMSUB231SD(xmm30(k2.z), xmm4, qword[r11 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xBB, 0xCB]), VFMSUB231SD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xBB, 0x4C, 0xD3, 0xA8]), VFMSUB231SD(xmm1, xmm14, qword[r11 + rdx*8 - 88]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x9A, 0xBB, 0xF3]), VFMSUB231SD(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFMSUBSD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x6F, 0xC9, 0x30]), VFMSUBSD(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x6F, 0x4C, 0xD3, 0xA8, 0x30]), VFMSUBSD(xmm1, xmm14, xmm3, qword[r11 + rdx*8 - 88]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x6F, 0x4C, 0xD3, 0xA8, 0x90]), VFMSUBSD(xmm1, xmm14, qword[r11 + rdx*8 - 88], xmm9).encode())


class TestVFNMADD132SD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0x9D, 0x73, 0xF0]), VFNMADD132SD(xmm30(k2.z), xmm4, qword[r11 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0x9D, 0xCB]), VFNMADD132SD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0x9D, 0x4C, 0xD3, 0xA8]), VFNMADD132SD(xmm1, xmm14, qword[r11 + rdx*8 - 88]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x9A, 0x9D, 0xF3]), VFNMADD132SD(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFNMADD213SD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xAD, 0x73, 0xF0]), VFNMADD213SD(xmm30(k2.z), xmm4, qword[r11 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xAD, 0xCB]), VFNMADD213SD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xAD, 0x4C, 0xD3, 0xA8]), VFNMADD213SD(xmm1, xmm14, qword[r11 + rdx*8 - 88]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x9A, 0xAD, 0xF3]), VFNMADD213SD(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFNMADD231SD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xBD, 0x73, 0xF0]), VFNMADD231SD(xmm30(k2.z), xmm4, qword[r11 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xBD, 0xCB]), VFNMADD231SD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xBD, 0x4C, 0xD3, 0xA8]), VFNMADD231SD(xmm1, xmm14, qword[r11 + rdx*8 - 88]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x9A, 0xBD, 0xF3]), VFNMADD231SD(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFNMADDSD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x7B, 0xC9, 0x30]), VFNMADDSD(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x7B, 0x4C, 0xD3, 0xA8, 0x30]), VFNMADDSD(xmm1, xmm14, xmm3, qword[r11 + rdx*8 - 88]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x7B, 0x4C, 0xD3, 0xA8, 0x90]), VFNMADDSD(xmm1, xmm14, qword[r11 + rdx*8 - 88], xmm9).encode())


class TestVFNMSUB132SD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0x9F, 0x73, 0xF0]), VFNMSUB132SD(xmm30(k2.z), xmm4, qword[r11 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0x9F, 0xCB]), VFNMSUB132SD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0x9F, 0x4C, 0xD3, 0xA8]), VFNMSUB132SD(xmm1, xmm14, qword[r11 + rdx*8 - 88]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x9A, 0x9F, 0xF3]), VFNMSUB132SD(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFNMSUB213SD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xAF, 0x73, 0xF0]), VFNMSUB213SD(xmm30(k2.z), xmm4, qword[r11 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xAF, 0xCB]), VFNMSUB213SD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xAF, 0x4C, 0xD3, 0xA8]), VFNMSUB213SD(xmm1, xmm14, qword[r11 + rdx*8 - 88]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x9A, 0xAF, 0xF3]), VFNMSUB213SD(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFNMSUB231SD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xBF, 0x73, 0xF0]), VFNMSUB231SD(xmm30(k2.z), xmm4, qword[r11 - 128]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xBF, 0xCB]), VFNMSUB231SD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xBF, 0x4C, 0xD3, 0xA8]), VFNMSUB231SD(xmm1, xmm14, qword[r11 + rdx*8 - 88]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x9A, 0xBF, 0xF3]), VFNMSUB231SD(xmm30(k2.z), xmm4, xmm19, {rn_sae}).encode())


class TestVFNMSUBSD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x7F, 0xC9, 0x30]), VFNMSUBSD(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x7F, 0x4C, 0xD3, 0xA8, 0x30]), VFNMSUBSD(xmm1, xmm14, xmm3, qword[r11 + rdx*8 - 88]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x7F, 0x4C, 0xD3, 0xA8, 0x90]), VFNMSUBSD(xmm1, xmm14, qword[r11 + rdx*8 - 88], xmm9).encode())


class TestVFMADD132PS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0x98, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMADD132PS(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x8A, 0x98, 0xF3]), VFMADD132PS(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0x55, 0xAD, 0x98, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADD132PS(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0x55, 0xAD, 0x98, 0xDC]), VFMADD132PS(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0xC6, 0x98, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADD132PS(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0x98, 0xCB]), VFMADD132PS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0x98, 0x4C, 0xC2, 0xB3]), VFMADD132PS(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x05, 0x98, 0xD4]), VFMADD132PS(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x05, 0x98, 0x54, 0xD9, 0xBE]), VFMADD132PS(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0x96, 0x98, 0xC9]), VFMADD132PS(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMADD213PS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xA8, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMADD213PS(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x8A, 0xA8, 0xF3]), VFMADD213PS(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0x55, 0xAD, 0xA8, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADD213PS(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0x55, 0xAD, 0xA8, 0xDC]), VFMADD213PS(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0xC6, 0xA8, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADD213PS(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xA8, 0xCB]), VFMADD213PS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xA8, 0x4C, 0xC2, 0xB3]), VFMADD213PS(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x05, 0xA8, 0xD4]), VFMADD213PS(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x05, 0xA8, 0x54, 0xD9, 0xBE]), VFMADD213PS(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0x96, 0xA8, 0xC9]), VFMADD213PS(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMADD231PS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xB8, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMADD231PS(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x8A, 0xB8, 0xF3]), VFMADD231PS(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0x55, 0xAD, 0xB8, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADD231PS(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0x55, 0xAD, 0xB8, 0xDC]), VFMADD231PS(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0xC6, 0xB8, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADD231PS(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xB8, 0xCB]), VFMADD231PS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xB8, 0x4C, 0xC2, 0xB3]), VFMADD231PS(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x05, 0xB8, 0xD4]), VFMADD231PS(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x05, 0xB8, 0x54, 0xD9, 0xBE]), VFMADD231PS(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0x96, 0xB8, 0xC9]), VFMADD231PS(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMADDPS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x68, 0xC9, 0x30]), VFMADDPS(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x68, 0x4C, 0xC2, 0xB3, 0x30]), VFMADDPS(xmm1, xmm14, xmm3, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x68, 0x4C, 0xC2, 0xB3, 0x90]), VFMADDPS(xmm1, xmm14, oword[r10 + rax*8 - 77], xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x68, 0xD2, 0x40]), VFMADDPS(ymm2, ymm15, ymm4, ymm10).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x68, 0x54, 0xD9, 0xBE, 0x40]), VFMADDPS(ymm2, ymm15, ymm4, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x05, 0x68, 0x54, 0xD9, 0xBE, 0xA0]), VFMADDPS(ymm2, ymm15, hword[r9 + rbx*8 - 66], ymm10).encode())


class TestVFMSUB132PS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0x9A, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMSUB132PS(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x8A, 0x9A, 0xF3]), VFMSUB132PS(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0x55, 0xAD, 0x9A, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUB132PS(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0x55, 0xAD, 0x9A, 0xDC]), VFMSUB132PS(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0xC6, 0x9A, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUB132PS(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0x9A, 0xCB]), VFMSUB132PS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0x9A, 0x4C, 0xC2, 0xB3]), VFMSUB132PS(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x05, 0x9A, 0xD4]), VFMSUB132PS(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x05, 0x9A, 0x54, 0xD9, 0xBE]), VFMSUB132PS(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0x96, 0x9A, 0xC9]), VFMSUB132PS(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMSUB213PS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xAA, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMSUB213PS(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x8A, 0xAA, 0xF3]), VFMSUB213PS(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0x55, 0xAD, 0xAA, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUB213PS(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0x55, 0xAD, 0xAA, 0xDC]), VFMSUB213PS(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0xC6, 0xAA, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUB213PS(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xAA, 0xCB]), VFMSUB213PS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xAA, 0x4C, 0xC2, 0xB3]), VFMSUB213PS(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x05, 0xAA, 0xD4]), VFMSUB213PS(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x05, 0xAA, 0x54, 0xD9, 0xBE]), VFMSUB213PS(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0x96, 0xAA, 0xC9]), VFMSUB213PS(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMSUB231PS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xBA, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMSUB231PS(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x8A, 0xBA, 0xF3]), VFMSUB231PS(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0x55, 0xAD, 0xBA, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUB231PS(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0x55, 0xAD, 0xBA, 0xDC]), VFMSUB231PS(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0xC6, 0xBA, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUB231PS(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xBA, 0xCB]), VFMSUB231PS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xBA, 0x4C, 0xC2, 0xB3]), VFMSUB231PS(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x05, 0xBA, 0xD4]), VFMSUB231PS(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x05, 0xBA, 0x54, 0xD9, 0xBE]), VFMSUB231PS(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0x96, 0xBA, 0xC9]), VFMSUB231PS(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMSUBPS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x6C, 0xC9, 0x30]), VFMSUBPS(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x6C, 0x4C, 0xC2, 0xB3, 0x30]), VFMSUBPS(xmm1, xmm14, xmm3, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x6C, 0x4C, 0xC2, 0xB3, 0x90]), VFMSUBPS(xmm1, xmm14, oword[r10 + rax*8 - 77], xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x6C, 0xD2, 0x40]), VFMSUBPS(ymm2, ymm15, ymm4, ymm10).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x6C, 0x54, 0xD9, 0xBE, 0x40]), VFMSUBPS(ymm2, ymm15, ymm4, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x05, 0x6C, 0x54, 0xD9, 0xBE, 0xA0]), VFMSUBPS(ymm2, ymm15, hword[r9 + rbx*8 - 66], ymm10).encode())


class TestVFNMADD132PS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0x9C, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFNMADD132PS(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x8A, 0x9C, 0xF3]), VFNMADD132PS(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0x55, 0xAD, 0x9C, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMADD132PS(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0x55, 0xAD, 0x9C, 0xDC]), VFNMADD132PS(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0xC6, 0x9C, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMADD132PS(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0x9C, 0xCB]), VFNMADD132PS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0x9C, 0x4C, 0xC2, 0xB3]), VFNMADD132PS(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x05, 0x9C, 0xD4]), VFNMADD132PS(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x05, 0x9C, 0x54, 0xD9, 0xBE]), VFNMADD132PS(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0x96, 0x9C, 0xC9]), VFNMADD132PS(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFNMADD213PS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xAC, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFNMADD213PS(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x8A, 0xAC, 0xF3]), VFNMADD213PS(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0x55, 0xAD, 0xAC, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMADD213PS(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0x55, 0xAD, 0xAC, 0xDC]), VFNMADD213PS(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0xC6, 0xAC, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMADD213PS(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xAC, 0xCB]), VFNMADD213PS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xAC, 0x4C, 0xC2, 0xB3]), VFNMADD213PS(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x05, 0xAC, 0xD4]), VFNMADD213PS(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x05, 0xAC, 0x54, 0xD9, 0xBE]), VFNMADD213PS(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0x96, 0xAC, 0xC9]), VFNMADD213PS(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFNMADD231PS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xBC, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFNMADD231PS(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x8A, 0xBC, 0xF3]), VFNMADD231PS(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0x55, 0xAD, 0xBC, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMADD231PS(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0x55, 0xAD, 0xBC, 0xDC]), VFNMADD231PS(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0xC6, 0xBC, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMADD231PS(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xBC, 0xCB]), VFNMADD231PS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xBC, 0x4C, 0xC2, 0xB3]), VFNMADD231PS(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x05, 0xBC, 0xD4]), VFNMADD231PS(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x05, 0xBC, 0x54, 0xD9, 0xBE]), VFNMADD231PS(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0x96, 0xBC, 0xC9]), VFNMADD231PS(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFNMADDPS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x78, 0xC9, 0x30]), VFNMADDPS(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x78, 0x4C, 0xC2, 0xB3, 0x30]), VFNMADDPS(xmm1, xmm14, xmm3, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x78, 0x4C, 0xC2, 0xB3, 0x90]), VFNMADDPS(xmm1, xmm14, oword[r10 + rax*8 - 77], xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x78, 0xD2, 0x40]), VFNMADDPS(ymm2, ymm15, ymm4, ymm10).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x78, 0x54, 0xD9, 0xBE, 0x40]), VFNMADDPS(ymm2, ymm15, ymm4, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x05, 0x78, 0x54, 0xD9, 0xBE, 0xA0]), VFNMADDPS(ymm2, ymm15, hword[r9 + rbx*8 - 66], ymm10).encode())


class TestVFNMSUB132PS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0x9E, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFNMSUB132PS(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x8A, 0x9E, 0xF3]), VFNMSUB132PS(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0x55, 0xAD, 0x9E, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMSUB132PS(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0x55, 0xAD, 0x9E, 0xDC]), VFNMSUB132PS(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0xC6, 0x9E, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMSUB132PS(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0x9E, 0xCB]), VFNMSUB132PS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0x9E, 0x4C, 0xC2, 0xB3]), VFNMSUB132PS(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x05, 0x9E, 0xD4]), VFNMSUB132PS(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x05, 0x9E, 0x54, 0xD9, 0xBE]), VFNMSUB132PS(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0x96, 0x9E, 0xC9]), VFNMSUB132PS(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFNMSUB213PS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xAE, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFNMSUB213PS(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x8A, 0xAE, 0xF3]), VFNMSUB213PS(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0x55, 0xAD, 0xAE, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMSUB213PS(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0x55, 0xAD, 0xAE, 0xDC]), VFNMSUB213PS(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0xC6, 0xAE, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMSUB213PS(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xAE, 0xCB]), VFNMSUB213PS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xAE, 0x4C, 0xC2, 0xB3]), VFNMSUB213PS(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x05, 0xAE, 0xD4]), VFNMSUB213PS(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x05, 0xAE, 0x54, 0xD9, 0xBE]), VFNMSUB213PS(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0x96, 0xAE, 0xC9]), VFNMSUB213PS(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFNMSUB231PS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xBE, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFNMSUB231PS(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x8A, 0xBE, 0xF3]), VFNMSUB231PS(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0x55, 0xAD, 0xBE, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMSUB231PS(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0x55, 0xAD, 0xBE, 0xDC]), VFNMSUB231PS(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0xC6, 0xBE, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMSUB231PS(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xBE, 0xCB]), VFNMSUB231PS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xBE, 0x4C, 0xC2, 0xB3]), VFNMSUB231PS(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x05, 0xBE, 0xD4]), VFNMSUB231PS(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x05, 0xBE, 0x54, 0xD9, 0xBE]), VFNMSUB231PS(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0x96, 0xBE, 0xC9]), VFNMSUB231PS(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFNMSUBPS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x7C, 0xC9, 0x30]), VFNMSUBPS(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x7C, 0x4C, 0xC2, 0xB3, 0x30]), VFNMSUBPS(xmm1, xmm14, xmm3, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x7C, 0x4C, 0xC2, 0xB3, 0x90]), VFNMSUBPS(xmm1, xmm14, oword[r10 + rax*8 - 77], xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x7C, 0xD2, 0x40]), VFNMSUBPS(ymm2, ymm15, ymm4, ymm10).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x7C, 0x54, 0xD9, 0xBE, 0x40]), VFNMSUBPS(ymm2, ymm15, ymm4, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x05, 0x7C, 0x54, 0xD9, 0xBE, 0xA0]), VFNMSUBPS(ymm2, ymm15, hword[r9 + rbx*8 - 66], ymm10).encode())


class TestVFMADD132PD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0x98, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMADD132PD(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x8A, 0x98, 0xF3]), VFMADD132PD(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0xD5, 0xAD, 0x98, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADD132PD(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0xD5, 0xAD, 0x98, 0xDC]), VFMADD132PD(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0xC6, 0x98, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADD132PD(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0x98, 0xCB]), VFMADD132PD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0x98, 0x4C, 0xC2, 0xB3]), VFMADD132PD(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x85, 0x98, 0xD4]), VFMADD132PD(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x85, 0x98, 0x54, 0xD9, 0xBE]), VFMADD132PD(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0x96, 0x98, 0xC9]), VFMADD132PD(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMADD213PD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xA8, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMADD213PD(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x8A, 0xA8, 0xF3]), VFMADD213PD(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0xD5, 0xAD, 0xA8, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADD213PD(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0xD5, 0xAD, 0xA8, 0xDC]), VFMADD213PD(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0xC6, 0xA8, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADD213PD(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xA8, 0xCB]), VFMADD213PD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xA8, 0x4C, 0xC2, 0xB3]), VFMADD213PD(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x85, 0xA8, 0xD4]), VFMADD213PD(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x85, 0xA8, 0x54, 0xD9, 0xBE]), VFMADD213PD(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0x96, 0xA8, 0xC9]), VFMADD213PD(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMADD231PD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xB8, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMADD231PD(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x8A, 0xB8, 0xF3]), VFMADD231PD(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0xD5, 0xAD, 0xB8, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADD231PD(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0xD5, 0xAD, 0xB8, 0xDC]), VFMADD231PD(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0xC6, 0xB8, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADD231PD(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xB8, 0xCB]), VFMADD231PD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xB8, 0x4C, 0xC2, 0xB3]), VFMADD231PD(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x85, 0xB8, 0xD4]), VFMADD231PD(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x85, 0xB8, 0x54, 0xD9, 0xBE]), VFMADD231PD(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0x96, 0xB8, 0xC9]), VFMADD231PD(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMADDPD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x69, 0xC9, 0x30]), VFMADDPD(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x69, 0x4C, 0xC2, 0xB3, 0x30]), VFMADDPD(xmm1, xmm14, xmm3, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x69, 0x4C, 0xC2, 0xB3, 0x90]), VFMADDPD(xmm1, xmm14, oword[r10 + rax*8 - 77], xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x69, 0xD2, 0x40]), VFMADDPD(ymm2, ymm15, ymm4, ymm10).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x69, 0x54, 0xD9, 0xBE, 0x40]), VFMADDPD(ymm2, ymm15, ymm4, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x05, 0x69, 0x54, 0xD9, 0xBE, 0xA0]), VFMADDPD(ymm2, ymm15, hword[r9 + rbx*8 - 66], ymm10).encode())


class TestVFMSUB132PD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0x9A, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMSUB132PD(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x8A, 0x9A, 0xF3]), VFMSUB132PD(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0xD5, 0xAD, 0x9A, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUB132PD(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0xD5, 0xAD, 0x9A, 0xDC]), VFMSUB132PD(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0xC6, 0x9A, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUB132PD(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0x9A, 0xCB]), VFMSUB132PD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0x9A, 0x4C, 0xC2, 0xB3]), VFMSUB132PD(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x85, 0x9A, 0xD4]), VFMSUB132PD(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x85, 0x9A, 0x54, 0xD9, 0xBE]), VFMSUB132PD(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0x96, 0x9A, 0xC9]), VFMSUB132PD(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMSUB213PD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xAA, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMSUB213PD(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x8A, 0xAA, 0xF3]), VFMSUB213PD(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0xD5, 0xAD, 0xAA, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUB213PD(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0xD5, 0xAD, 0xAA, 0xDC]), VFMSUB213PD(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0xC6, 0xAA, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUB213PD(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xAA, 0xCB]), VFMSUB213PD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xAA, 0x4C, 0xC2, 0xB3]), VFMSUB213PD(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x85, 0xAA, 0xD4]), VFMSUB213PD(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x85, 0xAA, 0x54, 0xD9, 0xBE]), VFMSUB213PD(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0x96, 0xAA, 0xC9]), VFMSUB213PD(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMSUB231PD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xBA, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMSUB231PD(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x8A, 0xBA, 0xF3]), VFMSUB231PD(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0xD5, 0xAD, 0xBA, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUB231PD(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0xD5, 0xAD, 0xBA, 0xDC]), VFMSUB231PD(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0xC6, 0xBA, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUB231PD(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xBA, 0xCB]), VFMSUB231PD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xBA, 0x4C, 0xC2, 0xB3]), VFMSUB231PD(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x85, 0xBA, 0xD4]), VFMSUB231PD(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x85, 0xBA, 0x54, 0xD9, 0xBE]), VFMSUB231PD(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0x96, 0xBA, 0xC9]), VFMSUB231PD(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMSUBPD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x6D, 0xC9, 0x30]), VFMSUBPD(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x6D, 0x4C, 0xC2, 0xB3, 0x30]), VFMSUBPD(xmm1, xmm14, xmm3, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x6D, 0x4C, 0xC2, 0xB3, 0x90]), VFMSUBPD(xmm1, xmm14, oword[r10 + rax*8 - 77], xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x6D, 0xD2, 0x40]), VFMSUBPD(ymm2, ymm15, ymm4, ymm10).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x6D, 0x54, 0xD9, 0xBE, 0x40]), VFMSUBPD(ymm2, ymm15, ymm4, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x05, 0x6D, 0x54, 0xD9, 0xBE, 0xA0]), VFMSUBPD(ymm2, ymm15, hword[r9 + rbx*8 - 66], ymm10).encode())


class TestVFNMADD132PD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0x9C, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFNMADD132PD(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x8A, 0x9C, 0xF3]), VFNMADD132PD(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0xD5, 0xAD, 0x9C, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMADD132PD(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0xD5, 0xAD, 0x9C, 0xDC]), VFNMADD132PD(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0xC6, 0x9C, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMADD132PD(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0x9C, 0xCB]), VFNMADD132PD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0x9C, 0x4C, 0xC2, 0xB3]), VFNMADD132PD(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x85, 0x9C, 0xD4]), VFNMADD132PD(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x85, 0x9C, 0x54, 0xD9, 0xBE]), VFNMADD132PD(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0x96, 0x9C, 0xC9]), VFNMADD132PD(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFNMADD213PD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xAC, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFNMADD213PD(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x8A, 0xAC, 0xF3]), VFNMADD213PD(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0xD5, 0xAD, 0xAC, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMADD213PD(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0xD5, 0xAD, 0xAC, 0xDC]), VFNMADD213PD(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0xC6, 0xAC, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMADD213PD(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xAC, 0xCB]), VFNMADD213PD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xAC, 0x4C, 0xC2, 0xB3]), VFNMADD213PD(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x85, 0xAC, 0xD4]), VFNMADD213PD(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x85, 0xAC, 0x54, 0xD9, 0xBE]), VFNMADD213PD(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0x96, 0xAC, 0xC9]), VFNMADD213PD(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFNMADD231PD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xBC, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFNMADD231PD(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x8A, 0xBC, 0xF3]), VFNMADD231PD(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0xD5, 0xAD, 0xBC, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMADD231PD(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0xD5, 0xAD, 0xBC, 0xDC]), VFNMADD231PD(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0xC6, 0xBC, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMADD231PD(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xBC, 0xCB]), VFNMADD231PD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xBC, 0x4C, 0xC2, 0xB3]), VFNMADD231PD(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x85, 0xBC, 0xD4]), VFNMADD231PD(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x85, 0xBC, 0x54, 0xD9, 0xBE]), VFNMADD231PD(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0x96, 0xBC, 0xC9]), VFNMADD231PD(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFNMADDPD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x79, 0xC9, 0x30]), VFNMADDPD(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x79, 0x4C, 0xC2, 0xB3, 0x30]), VFNMADDPD(xmm1, xmm14, xmm3, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x79, 0x4C, 0xC2, 0xB3, 0x90]), VFNMADDPD(xmm1, xmm14, oword[r10 + rax*8 - 77], xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x79, 0xD2, 0x40]), VFNMADDPD(ymm2, ymm15, ymm4, ymm10).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x79, 0x54, 0xD9, 0xBE, 0x40]), VFNMADDPD(ymm2, ymm15, ymm4, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x05, 0x79, 0x54, 0xD9, 0xBE, 0xA0]), VFNMADDPD(ymm2, ymm15, hword[r9 + rbx*8 - 66], ymm10).encode())


class TestVFNMSUB132PD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0x9E, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFNMSUB132PD(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x8A, 0x9E, 0xF3]), VFNMSUB132PD(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0xD5, 0xAD, 0x9E, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMSUB132PD(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0xD5, 0xAD, 0x9E, 0xDC]), VFNMSUB132PD(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0xC6, 0x9E, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMSUB132PD(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0x9E, 0xCB]), VFNMSUB132PD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0x9E, 0x4C, 0xC2, 0xB3]), VFNMSUB132PD(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x85, 0x9E, 0xD4]), VFNMSUB132PD(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x85, 0x9E, 0x54, 0xD9, 0xBE]), VFNMSUB132PD(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0x96, 0x9E, 0xC9]), VFNMSUB132PD(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFNMSUB213PD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xAE, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFNMSUB213PD(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x8A, 0xAE, 0xF3]), VFNMSUB213PD(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0xD5, 0xAD, 0xAE, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMSUB213PD(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0xD5, 0xAD, 0xAE, 0xDC]), VFNMSUB213PD(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0xC6, 0xAE, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMSUB213PD(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xAE, 0xCB]), VFNMSUB213PD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xAE, 0x4C, 0xC2, 0xB3]), VFNMSUB213PD(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x85, 0xAE, 0xD4]), VFNMSUB213PD(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x85, 0xAE, 0x54, 0xD9, 0xBE]), VFNMSUB213PD(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0x96, 0xAE, 0xC9]), VFNMSUB213PD(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFNMSUB231PD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xBE, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFNMSUB231PD(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x8A, 0xBE, 0xF3]), VFNMSUB231PD(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0xD5, 0xAD, 0xBE, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMSUB231PD(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0xD5, 0xAD, 0xBE, 0xDC]), VFNMSUB231PD(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0xC6, 0xBE, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFNMSUB231PD(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xBE, 0xCB]), VFNMSUB231PD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xBE, 0x4C, 0xC2, 0xB3]), VFNMSUB231PD(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x85, 0xBE, 0xD4]), VFNMSUB231PD(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x85, 0xBE, 0x54, 0xD9, 0xBE]), VFNMSUB231PD(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0x96, 0xBE, 0xC9]), VFNMSUB231PD(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFNMSUBPD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x7D, 0xC9, 0x30]), VFNMSUBPD(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x7D, 0x4C, 0xC2, 0xB3, 0x30]), VFNMSUBPD(xmm1, xmm14, xmm3, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x7D, 0x4C, 0xC2, 0xB3, 0x90]), VFNMSUBPD(xmm1, xmm14, oword[r10 + rax*8 - 77], xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x7D, 0xD2, 0x40]), VFNMSUBPD(ymm2, ymm15, ymm4, ymm10).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x7D, 0x54, 0xD9, 0xBE, 0x40]), VFNMSUBPD(ymm2, ymm15, ymm4, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x05, 0x7D, 0x54, 0xD9, 0xBE, 0xA0]), VFNMSUBPD(ymm2, ymm15, hword[r9 + rbx*8 - 66], ymm10).encode())


class TestVFMADDSUB132PS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0x96, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMADDSUB132PS(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x8A, 0x96, 0xF3]), VFMADDSUB132PS(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0x55, 0xAD, 0x96, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADDSUB132PS(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0x55, 0xAD, 0x96, 0xDC]), VFMADDSUB132PS(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0xC6, 0x96, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADDSUB132PS(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0x96, 0xCB]), VFMADDSUB132PS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0x96, 0x4C, 0xC2, 0xB3]), VFMADDSUB132PS(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x05, 0x96, 0xD4]), VFMADDSUB132PS(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x05, 0x96, 0x54, 0xD9, 0xBE]), VFMADDSUB132PS(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0x96, 0x96, 0xC9]), VFMADDSUB132PS(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMADDSUB213PS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xA6, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMADDSUB213PS(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x8A, 0xA6, 0xF3]), VFMADDSUB213PS(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0x55, 0xAD, 0xA6, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADDSUB213PS(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0x55, 0xAD, 0xA6, 0xDC]), VFMADDSUB213PS(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0xC6, 0xA6, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADDSUB213PS(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xA6, 0xCB]), VFMADDSUB213PS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xA6, 0x4C, 0xC2, 0xB3]), VFMADDSUB213PS(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x05, 0xA6, 0xD4]), VFMADDSUB213PS(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x05, 0xA6, 0x54, 0xD9, 0xBE]), VFMADDSUB213PS(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0x96, 0xA6, 0xC9]), VFMADDSUB213PS(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMADDSUB231PS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xB6, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMADDSUB231PS(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x8A, 0xB6, 0xF3]), VFMADDSUB231PS(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0x55, 0xAD, 0xB6, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADDSUB231PS(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0x55, 0xAD, 0xB6, 0xDC]), VFMADDSUB231PS(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0xC6, 0xB6, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADDSUB231PS(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xB6, 0xCB]), VFMADDSUB231PS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xB6, 0x4C, 0xC2, 0xB3]), VFMADDSUB231PS(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x05, 0xB6, 0xD4]), VFMADDSUB231PS(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x05, 0xB6, 0x54, 0xD9, 0xBE]), VFMADDSUB231PS(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0x96, 0xB6, 0xC9]), VFMADDSUB231PS(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMADDSUBPS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x5C, 0xC9, 0x30]), VFMADDSUBPS(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x5C, 0x4C, 0xC2, 0xB3, 0x30]), VFMADDSUBPS(xmm1, xmm14, xmm3, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x5C, 0x4C, 0xC2, 0xB3, 0x90]), VFMADDSUBPS(xmm1, xmm14, oword[r10 + rax*8 - 77], xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x5C, 0xD2, 0x40]), VFMADDSUBPS(ymm2, ymm15, ymm4, ymm10).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x5C, 0x54, 0xD9, 0xBE, 0x40]), VFMADDSUBPS(ymm2, ymm15, ymm4, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x05, 0x5C, 0x54, 0xD9, 0xBE, 0xA0]), VFMADDSUBPS(ymm2, ymm15, hword[r9 + rbx*8 - 66], ymm10).encode())


class TestVFMSUBADD132PS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0x97, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMSUBADD132PS(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x8A, 0x97, 0xF3]), VFMSUBADD132PS(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0x55, 0xAD, 0x97, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUBADD132PS(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0x55, 0xAD, 0x97, 0xDC]), VFMSUBADD132PS(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0xC6, 0x97, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUBADD132PS(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0x97, 0xCB]), VFMSUBADD132PS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0x97, 0x4C, 0xC2, 0xB3]), VFMSUBADD132PS(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x05, 0x97, 0xD4]), VFMSUBADD132PS(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x05, 0x97, 0x54, 0xD9, 0xBE]), VFMSUBADD132PS(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0x96, 0x97, 0xC9]), VFMSUBADD132PS(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMSUBADD213PS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xA7, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMSUBADD213PS(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x8A, 0xA7, 0xF3]), VFMSUBADD213PS(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0x55, 0xAD, 0xA7, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUBADD213PS(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0x55, 0xAD, 0xA7, 0xDC]), VFMSUBADD213PS(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0xC6, 0xA7, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUBADD213PS(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xA7, 0xCB]), VFMSUBADD213PS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xA7, 0x4C, 0xC2, 0xB3]), VFMSUBADD213PS(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x05, 0xA7, 0xD4]), VFMSUBADD213PS(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x05, 0xA7, 0x54, 0xD9, 0xBE]), VFMSUBADD213PS(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0x96, 0xA7, 0xC9]), VFMSUBADD213PS(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMSUBADD231PS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0x5D, 0x8A, 0xB7, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMSUBADD231PS(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0x5D, 0x8A, 0xB7, 0xF3]), VFMSUBADD231PS(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0x55, 0xAD, 0xB7, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUBADD231PS(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0x55, 0xAD, 0xB7, 0xDC]), VFMSUBADD231PS(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0xC6, 0xB7, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUBADD231PS(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x09, 0xB7, 0xCB]), VFMSUBADD231PS(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x09, 0xB7, 0x4C, 0xC2, 0xB3]), VFMSUBADD231PS(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x05, 0xB7, 0xD4]), VFMSUBADD231PS(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x05, 0xB7, 0x54, 0xD9, 0xBE]), VFMSUBADD231PS(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0x2D, 0x96, 0xB7, 0xC9]), VFMSUBADD231PS(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMSUBADDPS(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x5E, 0xC9, 0x30]), VFMSUBADDPS(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x5E, 0x4C, 0xC2, 0xB3, 0x30]), VFMSUBADDPS(xmm1, xmm14, xmm3, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x5E, 0x4C, 0xC2, 0xB3, 0x90]), VFMSUBADDPS(xmm1, xmm14, oword[r10 + rax*8 - 77], xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x5E, 0xD2, 0x40]), VFMSUBADDPS(ymm2, ymm15, ymm4, ymm10).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x5E, 0x54, 0xD9, 0xBE, 0x40]), VFMSUBADDPS(ymm2, ymm15, ymm4, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x05, 0x5E, 0x54, 0xD9, 0xBE, 0xA0]), VFMSUBADDPS(ymm2, ymm15, hword[r9 + rbx*8 - 66], ymm10).encode())


class TestVFMADDSUB132PD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0x96, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMADDSUB132PD(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x8A, 0x96, 0xF3]), VFMADDSUB132PD(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0xD5, 0xAD, 0x96, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADDSUB132PD(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0xD5, 0xAD, 0x96, 0xDC]), VFMADDSUB132PD(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0xC6, 0x96, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADDSUB132PD(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0x96, 0xCB]), VFMADDSUB132PD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0x96, 0x4C, 0xC2, 0xB3]), VFMADDSUB132PD(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x85, 0x96, 0xD4]), VFMADDSUB132PD(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x85, 0x96, 0x54, 0xD9, 0xBE]), VFMADDSUB132PD(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0x96, 0x96, 0xC9]), VFMADDSUB132PD(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMADDSUB213PD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xA6, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMADDSUB213PD(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x8A, 0xA6, 0xF3]), VFMADDSUB213PD(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0xD5, 0xAD, 0xA6, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADDSUB213PD(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0xD5, 0xAD, 0xA6, 0xDC]), VFMADDSUB213PD(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0xC6, 0xA6, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADDSUB213PD(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xA6, 0xCB]), VFMADDSUB213PD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xA6, 0x4C, 0xC2, 0xB3]), VFMADDSUB213PD(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x85, 0xA6, 0xD4]), VFMADDSUB213PD(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x85, 0xA6, 0x54, 0xD9, 0xBE]), VFMADDSUB213PD(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0x96, 0xA6, 0xC9]), VFMADDSUB213PD(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMADDSUB231PD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xB6, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMADDSUB231PD(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x8A, 0xB6, 0xF3]), VFMADDSUB231PD(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0xD5, 0xAD, 0xB6, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADDSUB231PD(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0xD5, 0xAD, 0xB6, 0xDC]), VFMADDSUB231PD(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0xC6, 0xB6, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMADDSUB231PD(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xB6, 0xCB]), VFMADDSUB231PD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xB6, 0x4C, 0xC2, 0xB3]), VFMADDSUB231PD(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x85, 0xB6, 0xD4]), VFMADDSUB231PD(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x85, 0xB6, 0x54, 0xD9, 0xBE]), VFMADDSUB231PD(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0x96, 0xB6, 0xC9]), VFMADDSUB231PD(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMADDSUBPD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x5D, 0xC9, 0x30]), VFMADDSUBPD(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x5D, 0x4C, 0xC2, 0xB3, 0x30]), VFMADDSUBPD(xmm1, xmm14, xmm3, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x5D, 0x4C, 0xC2, 0xB3, 0x90]), VFMADDSUBPD(xmm1, xmm14, oword[r10 + rax*8 - 77], xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x5D, 0xD2, 0x40]), VFMADDSUBPD(ymm2, ymm15, ymm4, ymm10).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x5D, 0x54, 0xD9, 0xBE, 0x40]), VFMADDSUBPD(ymm2, ymm15, ymm4, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x05, 0x5D, 0x54, 0xD9, 0xBE, 0xA0]), VFMADDSUBPD(ymm2, ymm15, hword[r9 + rbx*8 - 66], ymm10).encode())


class TestVFMSUBADD132PD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0x97, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMSUBADD132PD(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x8A, 0x97, 0xF3]), VFMSUBADD132PD(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0xD5, 0xAD, 0x97, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUBADD132PD(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0xD5, 0xAD, 0x97, 0xDC]), VFMSUBADD132PD(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0xC6, 0x97, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUBADD132PD(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0x97, 0xCB]), VFMSUBADD132PD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0x97, 0x4C, 0xC2, 0xB3]), VFMSUBADD132PD(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x85, 0x97, 0xD4]), VFMSUBADD132PD(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x85, 0x97, 0x54, 0xD9, 0xBE]), VFMSUBADD132PD(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0x96, 0x97, 0xC9]), VFMSUBADD132PD(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMSUBADD213PD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xA7, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMSUBADD213PD(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x8A, 0xA7, 0xF3]), VFMSUBADD213PD(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0xD5, 0xAD, 0xA7, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUBADD213PD(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0xD5, 0xAD, 0xA7, 0xDC]), VFMSUBADD213PD(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0xC6, 0xA7, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUBADD213PD(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xA7, 0xCB]), VFMSUBADD213PD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xA7, 0x4C, 0xC2, 0xB3]), VFMSUBADD213PD(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x85, 0xA7, 0xD4]), VFMSUBADD213PD(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x85, 0xA7, 0x54, 0xD9, 0xBE]), VFMSUBADD213PD(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0x96, 0xA7, 0xC9]), VFMSUBADD213PD(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMSUBADD231PD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0x62, 0x42, 0xDD, 0x8A, 0xB7, 0xB4, 0xC2, 0xB3, 0xFF, 0xFF, 0xFF]), VFMSUBADD231PD(xmm30(k2.z), xmm4, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0x62, 0x22, 0xDD, 0x8A, 0xB7, 0xF3]), VFMSUBADD231PD(xmm30(k2.z), xmm4, xmm19).encode())
        self.assertEqual(bytearray([0x62, 0xC2, 0xD5, 0xAD, 0xB7, 0x9C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUBADD231PD(ymm19(k5.z), ymm5, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0xA2, 0xD5, 0xAD, 0xB7, 0xDC]), VFMSUBADD231PD(ymm19(k5.z), ymm5, ymm20).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0xC6, 0xB7, 0x8C, 0xD9, 0xBE, 0xFF, 0xFF, 0xFF]), VFMSUBADD231PD(zmm9(k6.z), zmm26, zword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x89, 0xB7, 0xCB]), VFMSUBADD231PD(xmm1, xmm14, xmm3).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x89, 0xB7, 0x4C, 0xC2, 0xB3]), VFMSUBADD231PD(xmm1, xmm14, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xE2, 0x85, 0xB7, 0xD4]), VFMSUBADD231PD(ymm2, ymm15, ymm4).encode())
        self.assertEqual(bytearray([0xC4, 0xC2, 0x85, 0xB7, 0x54, 0xD9, 0xBE]), VFMSUBADD231PD(ymm2, ymm15, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0x62, 0x52, 0xAD, 0x96, 0xB7, 0xC9]), VFMSUBADD231PD(zmm9(k6.z), zmm26, zmm9, {rn_sae}).encode())


class TestVFMSUBADDPD(unittest.TestCase):
    def runTest(self):
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x5F, 0xC9, 0x30]), VFMSUBADDPD(xmm1, xmm14, xmm3, xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x89, 0x5F, 0x4C, 0xC2, 0xB3, 0x30]), VFMSUBADDPD(xmm1, xmm14, xmm3, oword[r10 + rax*8 - 77]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x09, 0x5F, 0x4C, 0xC2, 0xB3, 0x90]), VFMSUBADDPD(xmm1, xmm14, oword[r10 + rax*8 - 77], xmm9).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x5F, 0xD2, 0x40]), VFMSUBADDPD(ymm2, ymm15, ymm4, ymm10).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x85, 0x5F, 0x54, 0xD9, 0xBE, 0x40]), VFMSUBADDPD(ymm2, ymm15, ymm4, hword[r9 + rbx*8 - 66]).encode())
        self.assertEqual(bytearray([0xC4, 0xC3, 0x05, 0x5F, 0x54, 0xD9, 0xBE, 0xA0]), VFMSUBADDPD(ymm2, ymm15, hword[r9 + rbx*8 - 66], ymm10).encode())


