test_cases:
  -
    input:
      bytes: [ 0x65, 0x48, 0x8b, 0x07 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "movq %gs:(%rdi), %rax"
  -
    input:
      bytes: [ 0xf2, 0x0f, 0x38, 0xf0, 0xc3 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "crc32b %bl, %eax"
  -
    input:
      bytes: [ 0xf2, 0x0f, 0x38, 0xf0, 0x43, 0x04 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "crc32b 4(%rbx), %eax"
  -
    input:
      bytes: [ 0x66, 0xf2, 0x0f, 0x38, 0xf1, 0xc3 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "crc32w %bx, %eax"
  -
    input:
      bytes: [ 0x66, 0xf2, 0x0f, 0x38, 0xf1, 0x43, 0x04 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "crc32w 4(%rbx), %eax"
  -
    input:
      bytes: [ 0xf2, 0x0f, 0x38, 0xf1, 0xc3 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "crc32l %ebx, %eax"
  -
    input:
      bytes: [ 0xf2, 0x0f, 0x38, 0xf1, 0x43, 0x04 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "crc32l 4(%rbx), %eax"
  -
    input:
      bytes: [ 0xf2, 0x0f, 0x38, 0xf1, 0x8c, 0xcb, 0xef, 0xbe, 0xad, 0xde ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "crc32l -0x21524111(%rbx, %rcx, 8), %ecx"
  -
    input:
      bytes: [ 0xf2, 0x0f, 0x38, 0xf1, 0x0c, 0x25, 0x45, 0x00, 0x00, 0x00 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "crc32l 0x45, %ecx"
  -
    input:
      bytes: [ 0xf2, 0x0f, 0x38, 0xf1, 0x0c, 0x25, 0xed, 0x7e, 0x00, 0x00 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "crc32l 0x7eed, %ecx"
  -
    input:
      bytes: [ 0xf2, 0x0f, 0x38, 0xf1, 0x0c, 0x25, 0xfe, 0xca, 0xbe, 0xba ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "crc32l 0xffffffffbabecafe, %ecx"
  -
    input:
      bytes: [ 0xf2, 0x0f, 0x38, 0xf1, 0xc9 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "crc32l %ecx, %ecx"
  -
    input:
      bytes: [ 0xf2, 0x41, 0x0f, 0x38, 0xf0, 0xc3 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "crc32b %r11b, %eax"
  -
    input:
      bytes: [ 0xf2, 0x0f, 0x38, 0xf0, 0x43, 0x04 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "crc32b 4(%rbx), %eax"
  -
    input:
      bytes: [ 0xf2, 0x48, 0x0f, 0x38, 0xf0, 0xc7 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "crc32b %dil, %rax"
  -
    input:
      bytes: [ 0xf2, 0x49, 0x0f, 0x38, 0xf0, 0xc3 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "crc32b %r11b, %rax"
  -
    input:
      bytes: [ 0xf2, 0x48, 0x0f, 0x38, 0xf0, 0x43, 0x04 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "crc32b 4(%rbx), %rax"
  -
    input:
      bytes: [ 0xf2, 0x48, 0x0f, 0x38, 0xf1, 0xc3 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "crc32q %rbx, %rax"
  -
    input:
      bytes: [ 0xf2, 0x48, 0x0f, 0x38, 0xf1, 0x43, 0x04 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "crc32q 4(%rbx), %rax"
  -
    input:
      bytes: [ 0x49, 0x0f, 0x6e, 0xc8 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "movq %r8, %mm1"
  -
    input:
      bytes: [ 0x41, 0x0f, 0x6e, 0xc8 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "movd %r8d, %mm1"
  -
    input:
      bytes: [ 0x48, 0x0f, 0x6e, 0xca ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "movq %rdx, %mm1"
  -
    input:
      bytes: [ 0x0f, 0x6e, 0xca ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "movd %edx, %mm1"
  -
    input:
      bytes: [ 0x49, 0x0f, 0x7e, 0xc8 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "movq %mm1, %r8"
  -
    input:
      bytes: [ 0x41, 0x0f, 0x7e, 0xc8 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "movd %mm1, %r8d"
  -
    input:
      bytes: [ 0x48, 0x0f, 0x7e, 0xca ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "movq %mm1, %rdx"
  -
    input:
      bytes: [ 0x0f, 0x7e, 0xca ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "movd %mm1, %edx"
  -
    input:
      bytes: [ 0x0f, 0x3a, 0xcc, 0xd1, 0x01 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "sha1rnds4 $1, %xmm1, %xmm2"
  -
    input:
      bytes: [ 0x0f, 0x3a, 0xcc, 0x10, 0x01 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "sha1rnds4 $1, (%rax), %xmm2"
  -
    input:
      bytes: [ 0x0f, 0x38, 0xc8, 0xd1 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "sha1nexte %xmm1, %xmm2"
  -
    input:
      bytes: [ 0x0f, 0x38, 0xc9, 0xd1 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "sha1msg1 %xmm1, %xmm2"
  -
    input:
      bytes: [ 0x0f, 0x38, 0xc9, 0x10 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "sha1msg1 (%rax), %xmm2"
  -
    input:
      bytes: [ 0x0f, 0x38, 0xca, 0xd1 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "sha1msg2 %xmm1, %xmm2"
  -
    input:
      bytes: [ 0x0f, 0x38, 0xca, 0x10 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "sha1msg2 (%rax), %xmm2"
  -
    input:
      bytes: [ 0x0f, 0x38, 0xcb, 0x10 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "sha256rnds2 %xmm0, (%rax), %xmm2"
  -
    input:
      bytes: [ 0x0f, 0x38, 0xcb, 0xd1 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "sha256rnds2 %xmm0, %xmm1, %xmm2"
  -
    input:
      bytes: [ 0x0f, 0x38, 0xcb, 0x10 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "sha256rnds2 %xmm0, (%rax), %xmm2"
  -
    input:
      bytes: [ 0x0f, 0x38, 0xcb, 0xd1 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "sha256rnds2 %xmm0, %xmm1, %xmm2"
  -
    input:
      bytes: [ 0x0f, 0x38, 0xcc, 0xd1 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "sha256msg1 %xmm1, %xmm2"
  -
    input:
      bytes: [ 0x0f, 0x38, 0xcc, 0x10 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "sha256msg1 (%rax), %xmm2"
  -
    input:
      bytes: [ 0x0f, 0x38, 0xcd, 0xd1 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "sha256msg2 %xmm1, %xmm2"
  -
    input:
      bytes: [ 0x0f, 0x38, 0xcd, 0x10 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "sha256msg2 (%rax), %xmm2"
  -
    input:
      bytes: [ 0x48, 0x8b, 0x1c, 0x25, 0xad, 0xde, 0x00, 0x00 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "movq 0xdead, %rbx"
  -
    input:
      bytes: [ 0x48, 0x8b, 0x04, 0x25, 0xef, 0xbe, 0x00, 0x00 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "movq 0xbeef, %rax"
  -
    input:
      bytes: [ 0x48, 0x8b, 0x04, 0xe5, 0xfc, 0xff, 0xff, 0xff ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "movq -4(, %riz, 8), %rax"
  -
    input:
      bytes: [ 0x48, 0x8b, 0x04, 0x21 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "movq (%rcx, %riz), %rax"
  -
    input:
      bytes: [ 0x48, 0x8b, 0x04, 0xe1 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "movq (%rcx, %riz, 8), %rax"
  -
    input:
      bytes: [ 0x48, 0x0f, 0xae, 0x00 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "fxsave64 (%rax)"
  -
    input:
      bytes: [ 0x48, 0x0f, 0xae, 0x08 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "fxrstor64 (%rax)"
  -
    input:
      bytes: [ 0xc9 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "leave"
  -
    input:
      bytes: [ 0xc9 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "leave"
  -
    input:
      bytes: [ 0x67, 0xd9, 0x07 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "flds (%edi)"
  -
    input:
      bytes: [ 0x67, 0xdf, 0x07 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "filds (%edi)"
  -
    input:
      bytes: [ 0xd9, 0x07 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "flds (%rdi)"
  -
    input:
      bytes: [ 0xdf, 0x07 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "filds (%rdi)"
  -
    input:
      bytes: [ 0x66, 0x0f, 0xd7, 0xcd ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "pmovmskb %xmm5, %ecx"
  -
    input:
      bytes: [ 0x66, 0x0f, 0xc4, 0xe9, 0x03 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "pinsrw $3, %ecx, %xmm5"
  -
    input:
      bytes: [ 0x66, 0x0f, 0xc4, 0xe9, 0x03 ]
      arch: "CS_ARCH_X86"
      options: [ "CS_OPT_SYNTAX_ATT", "CS_MODE_64" ]
    expected:
      insns:
        -
          asm_text: "pinsrw $3, %ecx, %xmm5"
