test_cases:
  -
    input:
      bytes: [ 0x00, 0x10, 0x20, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.b, z0.b, z0.b"

  -
    input:
      bytes: [ 0x00, 0x10, 0x60, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.h, z0.h, z0.h"

  -
    input:
      bytes: [ 0x00, 0x10, 0xa0, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.s, z0.s, z0.s"

  -
    input:
      bytes: [ 0x00, 0x10, 0xe0, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.d, z0.d, z0.d"

  -
    input:
      bytes: [ 0x00, 0xc0, 0x24, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.b, z0.b, #0"

  -
    input:
      bytes: [ 0xff, 0xdf, 0x24, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "sqadd z31.b, z31.b, #255"

  -
    input:
      bytes: [ 0x00, 0xc0, 0x64, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.h, z0.h, #0"

  -
    input:
      bytes: [ 0x00, 0xe0, 0x64, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.h, z0.h, #0, lsl #8"

  -
    input:
      bytes: [ 0xff, 0xff, 0x64, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "sqadd z31.h, z31.h, #65280"

  -
    input:
      bytes: [ 0xff, 0xff, 0x64, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "sqadd z31.h, z31.h, #65280"

  -
    input:
      bytes: [ 0x00, 0xc0, 0xa4, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.s, z0.s, #0"

  -
    input:
      bytes: [ 0x00, 0xe0, 0xa4, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.s, z0.s, #0, lsl #8"

  -
    input:
      bytes: [ 0xff, 0xff, 0xa4, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "sqadd z31.s, z31.s, #65280"

  -
    input:
      bytes: [ 0xff, 0xff, 0xa4, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "sqadd z31.s, z31.s, #65280"

  -
    input:
      bytes: [ 0x00, 0xc0, 0xe4, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.d, z0.d, #0"

  -
    input:
      bytes: [ 0x00, 0xe0, 0xe4, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.d, z0.d, #0, lsl #8"

  -
    input:
      bytes: [ 0xff, 0xff, 0xe4, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "sqadd z31.d, z31.d, #65280"

  -
    input:
      bytes: [ 0xff, 0xff, 0xe4, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "sqadd z31.d, z31.d, #65280"

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

  -
    input:
      bytes: [ 0xff, 0xff, 0xe4, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "sqadd z31.d, z31.d, #65280"

  -
    input:
      bytes: [ 0x00, 0x10, 0x20, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.b, z0.b, z0.b"

  -
    input:
      bytes: [ 0x00, 0x10, 0x60, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.h, z0.h, z0.h"

  -
    input:
      bytes: [ 0x00, 0x10, 0xa0, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.s, z0.s, z0.s"

  -
    input:
      bytes: [ 0x00, 0x10, 0xe0, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.d, z0.d, z0.d"

  -
    input:
      bytes: [ 0x00, 0xc0, 0x24, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.b, z0.b, #0"

  -
    input:
      bytes: [ 0xff, 0xdf, 0x24, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqadd z31.b, z31.b, #255"

  -
    input:
      bytes: [ 0x00, 0xc0, 0x64, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.h, z0.h, #0"

  -
    input:
      bytes: [ 0x00, 0xe0, 0x64, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.h, z0.h, #0, lsl #8"

  -
    input:
      bytes: [ 0xff, 0xff, 0x64, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqadd z31.h, z31.h, #65280"

  -
    input:
      bytes: [ 0xff, 0xff, 0x64, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqadd z31.h, z31.h, #65280"

  -
    input:
      bytes: [ 0x00, 0xc0, 0xa4, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.s, z0.s, #0"

  -
    input:
      bytes: [ 0x00, 0xe0, 0xa4, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.s, z0.s, #0, lsl #8"

  -
    input:
      bytes: [ 0xff, 0xff, 0xa4, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqadd z31.s, z31.s, #65280"

  -
    input:
      bytes: [ 0xff, 0xff, 0xa4, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqadd z31.s, z31.s, #65280"

  -
    input:
      bytes: [ 0x00, 0xc0, 0xe4, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.d, z0.d, #0"

  -
    input:
      bytes: [ 0x00, 0xe0, 0xe4, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqadd z0.d, z0.d, #0, lsl #8"

  -
    input:
      bytes: [ 0xff, 0xff, 0xe4, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqadd z31.d, z31.d, #65280"

  -
    input:
      bytes: [ 0xff, 0xff, 0xe4, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqadd z31.d, z31.d, #65280"

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

  -
    input:
      bytes: [ 0xff, 0xff, 0xe4, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "sqadd z31.d, z31.d, #65280"
