test_cases:
  -
    input:
      bytes: [ 0x00, 0x00, 0x60, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1" ]
    expected:
      insns:
        -
          asm_text: "st2q { z0.q, z1.q }, p0, [x0, x0, lsl #4]"

  -
    input:
      bytes: [ 0x55, 0x15, 0x75, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1" ]
    expected:
      insns:
        -
          asm_text: "st2q { z21.q, z22.q }, p5, [x10, x21, lsl #4]"

  -
    input:
      bytes: [ 0xb7, 0x0d, 0x68, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1" ]
    expected:
      insns:
        -
          asm_text: "st2q { z23.q, z24.q }, p3, [x13, x8, lsl #4]"

  -
    input:
      bytes: [ 0x00, 0x00, 0x40, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1" ]
    expected:
      insns:
        -
          asm_text: "st2q { z0.q, z1.q }, p0, [x0]"

  -
    input:
      bytes: [ 0x55, 0x15, 0x45, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1" ]
    expected:
      insns:
        -
          asm_text: "st2q { z21.q, z22.q }, p5, [x10, #10, mul vl]"

  -
    input:
      bytes: [ 0xb7, 0x0d, 0x48, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1" ]
    expected:
      insns:
        -
          asm_text: "st2q { z23.q, z24.q }, p3, [x13, #-16, mul vl]"

  -
    input:
      bytes: [ 0xff, 0x1f, 0x4f, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1" ]
    expected:
      insns:
        -
          asm_text: "st2q { z31.q, z0.q }, p7, [sp, #-2, mul vl]"

  -
    input:
      bytes: [ 0x00, 0x00, 0x60, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "st2q { z0.q, z1.q }, p0, [x0, x0, lsl #4]"

  -
    input:
      bytes: [ 0x55, 0x15, 0x75, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "st2q { z21.q, z22.q }, p5, [x10, x21, lsl #4]"

  -
    input:
      bytes: [ 0xb7, 0x0d, 0x68, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "st2q { z23.q, z24.q }, p3, [x13, x8, lsl #4]"

  -
    input:
      bytes: [ 0x00, 0x00, 0x40, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "st2q { z0.q, z1.q }, p0, [x0]"

  -
    input:
      bytes: [ 0x55, 0x15, 0x45, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "st2q { z21.q, z22.q }, p5, [x10, #10, mul vl]"

  -
    input:
      bytes: [ 0xb7, 0x0d, 0x48, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "st2q { z23.q, z24.q }, p3, [x13, #-16, mul vl]"

  -
    input:
      bytes: [ 0xff, 0x1f, 0x4f, 0xe4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "st2q { z31.q, z0.q }, p7, [sp, #-2, mul vl]"
