test_cases:
  -
    input:
      bytes: [ 0xf7, 0xbf, 0x20, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2p1" ]
    expected:
      insns:
        -
          asm_text: "movprfx z23, z31"

  -
    input:
      bytes: [ 0xb7, 0x25, 0x68, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2p1" ]
    expected:
      insns:
        -
          asm_text: "extq z23.b, z23.b, z13.b, #8"

  -
    input:
      bytes: [ 0x00, 0x24, 0x60, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2p1" ]
    expected:
      insns:
        -
          asm_text: "extq z0.b, z0.b, z0.b, #0"

  -
    input:
      bytes: [ 0x55, 0x25, 0x65, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2p1" ]
    expected:
      insns:
        -
          asm_text: "extq z21.b, z21.b, z10.b, #5"

  -
    input:
      bytes: [ 0xb7, 0x25, 0x68, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2p1" ]
    expected:
      insns:
        -
          asm_text: "extq z23.b, z23.b, z13.b, #8"

  -
    input:
      bytes: [ 0xff, 0x27, 0x6f, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2p1" ]
    expected:
      insns:
        -
          asm_text: "extq z31.b, z31.b, z31.b, #15"

  -
    input:
      bytes: [ 0xf7, 0xbf, 0x20, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "movprfx z23, z31"

  -
    input:
      bytes: [ 0xb7, 0x25, 0x68, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "extq z23.b, z23.b, z13.b, #8"

  -
    input:
      bytes: [ 0x00, 0x24, 0x60, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "extq z0.b, z0.b, z0.b, #0"

  -
    input:
      bytes: [ 0x55, 0x25, 0x65, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "extq z21.b, z21.b, z10.b, #5"

  -
    input:
      bytes: [ 0xb7, 0x25, 0x68, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "extq z23.b, z23.b, z13.b, #8"

  -
    input:
      bytes: [ 0xff, 0x27, 0x6f, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "extq z31.b, z31.b, z31.b, #15"
