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

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

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

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

  -
    input:
      bytes: [ 0xff, 0x9f, 0x7f, 0x84 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1rb { z31.b }, p7/z, [sp, #63]"

  -
    input:
      bytes: [ 0xff, 0xbf, 0x7f, 0x84 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1rb { z31.h }, p7/z, [sp, #63]"

  -
    input:
      bytes: [ 0xff, 0xdf, 0x7f, 0x84 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1rb { z31.s }, p7/z, [sp, #63]"

  -
    input:
      bytes: [ 0xff, 0xff, 0x7f, 0x84 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ld1rb { z31.d }, p7/z, [sp, #63]"

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

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

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

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

  -
    input:
      bytes: [ 0xff, 0x9f, 0x7f, 0x84 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1rb { z31.b }, p7/z, [sp, #63]"

  -
    input:
      bytes: [ 0xff, 0xbf, 0x7f, 0x84 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1rb { z31.h }, p7/z, [sp, #63]"

  -
    input:
      bytes: [ 0xff, 0xdf, 0x7f, 0x84 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1rb { z31.s }, p7/z, [sp, #63]"

  -
    input:
      bytes: [ 0xff, 0xff, 0x7f, 0x84 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ld1rb { z31.d }, p7/z, [sp, #63]"
