test_cases:
  -
    input:
      bytes: [ 0x00, 0x64, 0x20, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "zip2 z0.b, z0.b, z0.b"

  -
    input:
      bytes: [ 0x00, 0x64, 0x60, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "zip2 z0.h, z0.h, z0.h"

  -
    input:
      bytes: [ 0x00, 0x64, 0xa0, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "zip2 z0.s, z0.s, z0.s"

  -
    input:
      bytes: [ 0x00, 0x64, 0xe0, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "zip2 z0.d, z0.d, z0.d"

  -
    input:
      bytes: [ 0xff, 0x67, 0x3f, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "zip2 z31.b, z31.b, z31.b"

  -
    input:
      bytes: [ 0xff, 0x67, 0x7f, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "zip2 z31.h, z31.h, z31.h"

  -
    input:
      bytes: [ 0xff, 0x67, 0xbf, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "zip2 z31.s, z31.s, z31.s"

  -
    input:
      bytes: [ 0xff, 0x67, 0xff, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "zip2 z31.d, z31.d, z31.d"

  -
    input:
      bytes: [ 0x00, 0x44, 0x20, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "zip2 p0.b, p0.b, p0.b"

  -
    input:
      bytes: [ 0x00, 0x44, 0x60, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "zip2 p0.h, p0.h, p0.h"

  -
    input:
      bytes: [ 0x00, 0x44, 0xa0, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "zip2 p0.s, p0.s, p0.s"

  -
    input:
      bytes: [ 0x00, 0x44, 0xe0, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "zip2 p0.d, p0.d, p0.d"

  -
    input:
      bytes: [ 0xef, 0x45, 0x2f, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "zip2 p15.b, p15.b, p15.b"

  -
    input:
      bytes: [ 0xef, 0x45, 0x6f, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "zip2 p15.h, p15.h, p15.h"

  -
    input:
      bytes: [ 0xef, 0x45, 0xaf, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "zip2 p15.s, p15.s, p15.s"

  -
    input:
      bytes: [ 0xef, 0x45, 0xef, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "zip2 p15.d, p15.d, p15.d"

  -
    input:
      bytes: [ 0x00, 0x64, 0x20, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "zip2 z0.b, z0.b, z0.b"

  -
    input:
      bytes: [ 0x00, 0x64, 0x60, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "zip2 z0.h, z0.h, z0.h"

  -
    input:
      bytes: [ 0x00, 0x64, 0xa0, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "zip2 z0.s, z0.s, z0.s"

  -
    input:
      bytes: [ 0x00, 0x64, 0xe0, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "zip2 z0.d, z0.d, z0.d"

  -
    input:
      bytes: [ 0xff, 0x67, 0x3f, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "zip2 z31.b, z31.b, z31.b"

  -
    input:
      bytes: [ 0xff, 0x67, 0x7f, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "zip2 z31.h, z31.h, z31.h"

  -
    input:
      bytes: [ 0xff, 0x67, 0xbf, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "zip2 z31.s, z31.s, z31.s"

  -
    input:
      bytes: [ 0xff, 0x67, 0xff, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "zip2 z31.d, z31.d, z31.d"

  -
    input:
      bytes: [ 0x00, 0x44, 0x20, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "zip2 p0.b, p0.b, p0.b"

  -
    input:
      bytes: [ 0x00, 0x44, 0x60, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "zip2 p0.h, p0.h, p0.h"

  -
    input:
      bytes: [ 0x00, 0x44, 0xa0, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "zip2 p0.s, p0.s, p0.s"

  -
    input:
      bytes: [ 0x00, 0x44, 0xe0, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "zip2 p0.d, p0.d, p0.d"

  -
    input:
      bytes: [ 0xef, 0x45, 0x2f, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "zip2 p15.b, p15.b, p15.b"

  -
    input:
      bytes: [ 0xef, 0x45, 0x6f, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "zip2 p15.h, p15.h, p15.h"

  -
    input:
      bytes: [ 0xef, 0x45, 0xaf, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "zip2 p15.s, p15.s, p15.s"

  -
    input:
      bytes: [ 0xef, 0x45, 0xef, 0x05 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "zip2 p15.d, p15.d, p15.d"
