test_cases:
  -
    input:
      bytes: [ 0x00, 0xa0, 0x00, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.b }, p0/z, [x0]"

  -
    input:
      bytes: [ 0x00, 0xa0, 0x20, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.h }, p0/z, [x0]"

  -
    input:
      bytes: [ 0x00, 0xa0, 0x40, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.s }, p0/z, [x0]"

  -
    input:
      bytes: [ 0x00, 0xa0, 0x60, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.d }, p0/z, [x0]"

  -
    input:
      bytes: [ 0x00, 0xa0, 0x00, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.b }, p0/z, [x0]"

  -
    input:
      bytes: [ 0x00, 0xa0, 0x20, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.h }, p0/z, [x0]"

  -
    input:
      bytes: [ 0x00, 0xa0, 0x40, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.s }, p0/z, [x0]"

  -
    input:
      bytes: [ 0x00, 0xa0, 0x60, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.d }, p0/z, [x0]"

  -
    input:
      bytes: [ 0xff, 0xbf, 0x0f, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z31.b }, p7/z, [sp, #-1, mul vl]"

  -
    input:
      bytes: [ 0x55, 0xb5, 0x05, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z21.b }, p5/z, [x10, #5, mul vl]"

  -
    input:
      bytes: [ 0xff, 0xbf, 0x2f, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z31.h }, p7/z, [sp, #-1, mul vl]"

  -
    input:
      bytes: [ 0x55, 0xb5, 0x25, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z21.h }, p5/z, [x10, #5, mul vl]"

  -
    input:
      bytes: [ 0xff, 0xbf, 0x4f, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z31.s }, p7/z, [sp, #-1, mul vl]"

  -
    input:
      bytes: [ 0x55, 0xb5, 0x45, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z21.s }, p5/z, [x10, #5, mul vl]"

  -
    input:
      bytes: [ 0xff, 0xbf, 0x6f, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z31.d }, p7/z, [sp, #-1, mul vl]"

  -
    input:
      bytes: [ 0x55, 0xb5, 0x65, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z21.d }, p5/z, [x10, #5, mul vl]"

  -
    input:
      bytes: [ 0xe0, 0x43, 0x00, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.b }, p0/z, [sp, x0]"

  -
    input:
      bytes: [ 0x00, 0x40, 0x00, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.b }, p0/z, [x0, x0]"

  -
    input:
      bytes: [ 0x00, 0x40, 0x00, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.b }, p0/z, [x0, x0]"

  -
    input:
      bytes: [ 0x25, 0x4e, 0x30, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z5.h }, p3/z, [x17, x16]"

  -
    input:
      bytes: [ 0x55, 0x55, 0x55, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z21.s }, p5/z, [x10, x21]"

  -
    input:
      bytes: [ 0xb7, 0x4d, 0x68, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z23.d }, p3/z, [x13, x8]"

  -
    input:
      bytes: [ 0x00, 0xa0, 0x00, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.b }, p0/z, [x0]"

  -
    input:
      bytes: [ 0x00, 0xa0, 0x20, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.h }, p0/z, [x0]"

  -
    input:
      bytes: [ 0x00, 0xa0, 0x40, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.s }, p0/z, [x0]"

  -
    input:
      bytes: [ 0x00, 0xa0, 0x60, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.d }, p0/z, [x0]"

  -
    input:
      bytes: [ 0x00, 0xa0, 0x00, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.b }, p0/z, [x0]"

  -
    input:
      bytes: [ 0x00, 0xa0, 0x20, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.h }, p0/z, [x0]"

  -
    input:
      bytes: [ 0x00, 0xa0, 0x40, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.s }, p0/z, [x0]"

  -
    input:
      bytes: [ 0x00, 0xa0, 0x60, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.d }, p0/z, [x0]"

  -
    input:
      bytes: [ 0xff, 0xbf, 0x0f, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z31.b }, p7/z, [sp, #-1, mul vl]"

  -
    input:
      bytes: [ 0x55, 0xb5, 0x05, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z21.b }, p5/z, [x10, #5, mul vl]"

  -
    input:
      bytes: [ 0xff, 0xbf, 0x2f, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z31.h }, p7/z, [sp, #-1, mul vl]"

  -
    input:
      bytes: [ 0x55, 0xb5, 0x25, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z21.h }, p5/z, [x10, #5, mul vl]"

  -
    input:
      bytes: [ 0xff, 0xbf, 0x4f, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z31.s }, p7/z, [sp, #-1, mul vl]"

  -
    input:
      bytes: [ 0x55, 0xb5, 0x45, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z21.s }, p5/z, [x10, #5, mul vl]"

  -
    input:
      bytes: [ 0xff, 0xbf, 0x6f, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z31.d }, p7/z, [sp, #-1, mul vl]"

  -
    input:
      bytes: [ 0x55, 0xb5, 0x65, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z21.d }, p5/z, [x10, #5, mul vl]"

  -
    input:
      bytes: [ 0xe0, 0x43, 0x00, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.b }, p0/z, [sp, x0]"

  -
    input:
      bytes: [ 0x00, 0x40, 0x00, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.b }, p0/z, [x0, x0]"

  -
    input:
      bytes: [ 0x00, 0x40, 0x00, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z0.b }, p0/z, [x0, x0]"

  -
    input:
      bytes: [ 0x25, 0x4e, 0x30, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z5.h }, p3/z, [x17, x16]"

  -
    input:
      bytes: [ 0x55, 0x55, 0x55, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z21.s }, p5/z, [x10, x21]"

  -
    input:
      bytes: [ 0xb7, 0x4d, 0x68, 0xa4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1b { z23.d }, p3/z, [x13, x8]"
