test_cases:
  -
    input:
      bytes: [ 0x00, 0x40, 0x00, 0xe5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "st1w { z0.q }, p0, [x0, x0, lsl #2]"

  -
    input:
      bytes: [ 0x55, 0x55, 0x15, 0xe5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "st1w { z21.q }, p5, [x10, x21, lsl #2]"

  -
    input:
      bytes: [ 0xb7, 0x4d, 0x08, 0xe5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "st1w { z23.q }, p3, [x13, x8, lsl #2]"

  -
    input:
      bytes: [ 0xb7, 0x4d, 0x08, 0xe5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "st1w { z23.q }, p3, [x13, x8, lsl #2]"

  -
    input:
      bytes: [ 0x00, 0xe0, 0x00, 0xe5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "st1w { z0.q }, p0, [x0]"

  -
    input:
      bytes: [ 0x00, 0xe0, 0x00, 0xe5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "st1w { z0.q }, p0, [x0]"

  -
    input:
      bytes: [ 0x55, 0xf5, 0x05, 0xe5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "st1w { z21.q }, p5, [x10, #5, mul vl]"

  -
    input:
      bytes: [ 0xb7, 0xed, 0x08, 0xe5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "st1w { z23.q }, p3, [x13, #-8, mul vl]"

  -
    input:
      bytes: [ 0xff, 0xff, 0x0f, 0xe5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "st1w { z31.q }, p7, [sp, #-1, mul vl]"

  -
    input:
      bytes: [ 0xff, 0xff, 0x0f, 0xe5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "st1w { z31.q }, p7, [sp, #-1, mul vl]"
