test_cases:
  -
    input:
      bytes: [ 0x20, 0x80, 0x08, 0x44 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "sqshl z0.b, p0/m, z0.b, z1.b"

  -
    input:
      bytes: [ 0x20, 0x80, 0x48, 0x44 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "sqshl z0.h, p0/m, z0.h, z1.h"

  -
    input:
      bytes: [ 0xdd, 0x9f, 0x88, 0x44 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "sqshl z29.s, p7/m, z29.s, z30.s"

  -
    input:
      bytes: [ 0xdf, 0x9f, 0xc8, 0x44 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "sqshl z31.d, p7/m, z31.d, z30.d"

  -
    input:
      bytes: [ 0x00, 0x81, 0x06, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "sqshl z0.b, p0/m, z0.b, #0"

  -
    input:
      bytes: [ 0xff, 0x81, 0x06, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "sqshl z31.b, p0/m, z31.b, #7"

  -
    input:
      bytes: [ 0x00, 0x82, 0x06, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "sqshl z0.h, p0/m, z0.h, #0"

  -
    input:
      bytes: [ 0xff, 0x83, 0x06, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "sqshl z31.h, p0/m, z31.h, #15"

  -
    input:
      bytes: [ 0x00, 0x80, 0x46, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "sqshl z0.s, p0/m, z0.s, #0"

  -
    input:
      bytes: [ 0xff, 0x83, 0x46, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "sqshl z31.s, p0/m, z31.s, #31"

  -
    input:
      bytes: [ 0x00, 0x80, 0x86, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "sqshl z0.d, p0/m, z0.d, #0"

  -
    input:
      bytes: [ 0xff, 0x83, 0xc6, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "sqshl z31.d, p0/m, z31.d, #63"

  -
    input:
      bytes: [ 0xdf, 0x20, 0xd0, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "movprfx z31.d, p0/z, z6.d"

  -
    input:
      bytes: [ 0xdf, 0x83, 0xc8, 0x44 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "sqshl z31.d, p0/m, z31.d, z30.d"

  -
    input:
      bytes: [ 0xdf, 0xbc, 0x20, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "movprfx z31, z6"

  -
    input:
      bytes: [ 0xdf, 0x9f, 0xc8, 0x44 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "sqshl z31.d, p7/m, z31.d, z30.d"

  -
    input:
      bytes: [ 0xdf, 0x20, 0xd0, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "movprfx z31.d, p0/z, z6.d"

  -
    input:
      bytes: [ 0xff, 0x83, 0xc6, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "sqshl z31.d, p0/m, z31.d, #63"

  -
    input:
      bytes: [ 0xdf, 0xbc, 0x20, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "movprfx z31, z6"

  -
    input:
      bytes: [ 0xff, 0x83, 0xc6, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "sqshl z31.d, p0/m, z31.d, #63"

  -
    input:
      bytes: [ 0x20, 0x80, 0x08, 0x44 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqshl z0.b, p0/m, z0.b, z1.b"

  -
    input:
      bytes: [ 0x20, 0x80, 0x48, 0x44 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqshl z0.h, p0/m, z0.h, z1.h"

  -
    input:
      bytes: [ 0xdd, 0x9f, 0x88, 0x44 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqshl z29.s, p7/m, z29.s, z30.s"

  -
    input:
      bytes: [ 0xdf, 0x9f, 0xc8, 0x44 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqshl z31.d, p7/m, z31.d, z30.d"

  -
    input:
      bytes: [ 0x00, 0x81, 0x06, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqshl z0.b, p0/m, z0.b, #0"

  -
    input:
      bytes: [ 0xff, 0x81, 0x06, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqshl z31.b, p0/m, z31.b, #7"

  -
    input:
      bytes: [ 0x00, 0x82, 0x06, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqshl z0.h, p0/m, z0.h, #0"

  -
    input:
      bytes: [ 0xff, 0x83, 0x06, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqshl z31.h, p0/m, z31.h, #15"

  -
    input:
      bytes: [ 0x00, 0x80, 0x46, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqshl z0.s, p0/m, z0.s, #0"

  -
    input:
      bytes: [ 0xff, 0x83, 0x46, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqshl z31.s, p0/m, z31.s, #31"

  -
    input:
      bytes: [ 0x00, 0x80, 0x86, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqshl z0.d, p0/m, z0.d, #0"

  -
    input:
      bytes: [ 0xff, 0x83, 0xc6, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqshl z31.d, p0/m, z31.d, #63"

  -
    input:
      bytes: [ 0xdf, 0x20, 0xd0, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "movprfx z31.d, p0/z, z6.d"

  -
    input:
      bytes: [ 0xdf, 0x83, 0xc8, 0x44 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqshl z31.d, p0/m, z31.d, z30.d"

  -
    input:
      bytes: [ 0xdf, 0xbc, 0x20, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "movprfx z31, z6"

  -
    input:
      bytes: [ 0xdf, 0x9f, 0xc8, 0x44 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqshl z31.d, p7/m, z31.d, z30.d"

  -
    input:
      bytes: [ 0xdf, 0x20, 0xd0, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "movprfx z31.d, p0/z, z6.d"

  -
    input:
      bytes: [ 0xff, 0x83, 0xc6, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqshl z31.d, p0/m, z31.d, #63"

  -
    input:
      bytes: [ 0xdf, 0xbc, 0x20, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "movprfx z31, z6"

  -
    input:
      bytes: [ 0xff, 0x83, 0xc6, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqshl z31.d, p0/m, z31.d, #63"
