test_cases:
  -
    input:
      bytes: [ 0xe0, 0x81, 0x04, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "asrd z0.b, p0/m, z0.b, #1"

  -
    input:
      bytes: [ 0x1f, 0x81, 0x04, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "asrd z31.b, p0/m, z31.b, #8"

  -
    input:
      bytes: [ 0xe0, 0x83, 0x04, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "asrd z0.h, p0/m, z0.h, #1"

  -
    input:
      bytes: [ 0x1f, 0x82, 0x04, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "asrd z31.h, p0/m, z31.h, #16"

  -
    input:
      bytes: [ 0xe0, 0x83, 0x44, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "asrd z0.s, p0/m, z0.s, #1"

  -
    input:
      bytes: [ 0x1f, 0x80, 0x44, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "asrd z31.s, p0/m, z31.s, #32"

  -
    input:
      bytes: [ 0xe0, 0x83, 0xc4, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "asrd z0.d, p0/m, z0.d, #1"

  -
    input:
      bytes: [ 0x1f, 0x80, 0x84, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "asrd z31.d, p0/m, z31.d, #64"

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

  -
    input:
      bytes: [ 0x1f, 0x80, 0x84, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "asrd z31.d, p0/m, z31.d, #64"

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

  -
    input:
      bytes: [ 0x1f, 0x80, 0x84, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "asrd z31.d, p0/m, z31.d, #64"

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

  -
    input:
      bytes: [ 0x1f, 0x81, 0x04, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "asrd z31.b, p0/m, z31.b, #8"

  -
    input:
      bytes: [ 0xe0, 0x83, 0x04, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "asrd z0.h, p0/m, z0.h, #1"

  -
    input:
      bytes: [ 0x1f, 0x82, 0x04, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "asrd z31.h, p0/m, z31.h, #16"

  -
    input:
      bytes: [ 0xe0, 0x83, 0x44, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "asrd z0.s, p0/m, z0.s, #1"

  -
    input:
      bytes: [ 0x1f, 0x80, 0x44, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "asrd z31.s, p0/m, z31.s, #32"

  -
    input:
      bytes: [ 0xe0, 0x83, 0xc4, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "asrd z0.d, p0/m, z0.d, #1"

  -
    input:
      bytes: [ 0x1f, 0x80, 0x84, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "asrd z31.d, p0/m, z31.d, #64"

  -
    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: [ 0x1f, 0x80, 0x84, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "asrd z31.d, p0/m, z31.d, #64"

  -
    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: [ 0x1f, 0x80, 0x84, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "asrd z31.d, p0/m, z31.d, #64"
