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

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

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

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

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

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

  -
    input:
      bytes: [ 0x00, 0x80, 0xa0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.d }, p0, [x0, z0.d, uxtw #1]"

  -
    input:
      bytes: [ 0x00, 0xc0, 0xa0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.d }, p0, [x0, z0.d, sxtw #1]"

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

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

  -
    input:
      bytes: [ 0xff, 0xbf, 0xff, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z31.s }, p7, [z31.s, #62]"

  -
    input:
      bytes: [ 0xff, 0xbf, 0xdf, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z31.d }, p7, [z31.d, #62]"

  -
    input:
      bytes: [ 0x00, 0xbc, 0xe0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.s }, p7, [z0.s]"

  -
    input:
      bytes: [ 0x00, 0xbc, 0xe0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.s }, p7, [z0.s]"

  -
    input:
      bytes: [ 0x00, 0xbc, 0xc0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.d }, p7, [z0.d]"

  -
    input:
      bytes: [ 0x00, 0xbc, 0xc0, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "st1h { z0.d }, p7, [z0.d]"
