test_cases:
  -
    input:
      bytes: [ 0x00, 0xe0, 0xa0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.h }, p0, [x0]"

  -
    input:
      bytes: [ 0x00, 0xe0, 0xc0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.s }, p0, [x0]"

  -
    input:
      bytes: [ 0x00, 0xe0, 0xe0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.d }, p0, [x0]"

  -
    input:
      bytes: [ 0x00, 0xe0, 0xa0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.h }, p0, [x0]"

  -
    input:
      bytes: [ 0x00, 0xe0, 0xc0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.s }, p0, [x0]"

  -
    input:
      bytes: [ 0x00, 0xe0, 0xe0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.d }, p0, [x0]"

  -
    input:
      bytes: [ 0xff, 0xff, 0xaf, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z31.h }, p7, [sp, #-1, mul vl]"

  -
    input:
      bytes: [ 0x55, 0xf5, 0xa5, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z21.h }, p5, [x10, #5, mul vl]"

  -
    input:
      bytes: [ 0xff, 0xff, 0xcf, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z31.s }, p7, [sp, #-1, mul vl]"

  -
    input:
      bytes: [ 0x55, 0xf5, 0xc5, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z21.s }, p5, [x10, #5, mul vl]"

  -
    input:
      bytes: [ 0x55, 0xf5, 0xe5, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z21.d }, p5, [x10, #5, mul vl]"

  -
    input:
      bytes: [ 0xff, 0xff, 0xef, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z31.d }, p7, [sp, #-1, mul vl]"

  -
    input:
      bytes: [ 0x00, 0x40, 0xa0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.h }, p0, [x0, x0, lsl #1]"

  -
    input:
      bytes: [ 0x00, 0x40, 0xc0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.s }, p0, [x0, x0, lsl #1]"

  -
    input:
      bytes: [ 0x00, 0x40, 0xe0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.d }, p0, [x0, x0, lsl #1]"

  -
    input:
      bytes: [ 0x00, 0xe0, 0xa0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.h }, p0, [x0]"

  -
    input:
      bytes: [ 0x00, 0xe0, 0xc0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.s }, p0, [x0]"

  -
    input:
      bytes: [ 0x00, 0xe0, 0xe0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.d }, p0, [x0]"

  -
    input:
      bytes: [ 0x00, 0xe0, 0xa0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.h }, p0, [x0]"

  -
    input:
      bytes: [ 0x00, 0xe0, 0xc0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.s }, p0, [x0]"

  -
    input:
      bytes: [ 0x00, 0xe0, 0xe0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.d }, p0, [x0]"

  -
    input:
      bytes: [ 0xff, 0xff, 0xaf, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "st1h { z31.h }, p7, [sp, #-1, mul vl]"

  -
    input:
      bytes: [ 0x55, 0xf5, 0xa5, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "st1h { z21.h }, p5, [x10, #5, mul vl]"

  -
    input:
      bytes: [ 0xff, 0xff, 0xcf, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "st1h { z31.s }, p7, [sp, #-1, mul vl]"

  -
    input:
      bytes: [ 0x55, 0xf5, 0xc5, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "st1h { z21.s }, p5, [x10, #5, mul vl]"

  -
    input:
      bytes: [ 0x55, 0xf5, 0xe5, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "st1h { z21.d }, p5, [x10, #5, mul vl]"

  -
    input:
      bytes: [ 0xff, 0xff, 0xef, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "st1h { z31.d }, p7, [sp, #-1, mul vl]"

  -
    input:
      bytes: [ 0x00, 0x40, 0xa0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.h }, p0, [x0, x0, lsl #1]"

  -
    input:
      bytes: [ 0x00, 0x40, 0xc0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.s }, p0, [x0, x0, lsl #1]"

  -
    input:
      bytes: [ 0x00, 0x40, 0xe0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.d }, p0, [x0, x0, lsl #1]"
