test_cases:
  -
    input:
      bytes: [ 0xff, 0x7f, 0xdf, 0xa5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ldff1sb { z31.h }, p7/z, [sp]"

  -
    input:
      bytes: [ 0xff, 0x7f, 0xbf, 0xa5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ldff1sb { z31.s }, p7/z, [sp]"

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

  -
    input:
      bytes: [ 0xff, 0x7f, 0xdf, 0xa5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ldff1sb { z31.h }, p7/z, [sp]"

  -
    input:
      bytes: [ 0xff, 0x7f, 0xbf, 0xa5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ldff1sb { z31.s }, p7/z, [sp]"

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

  -
    input:
      bytes: [ 0x00, 0x60, 0xc0, 0xa5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ldff1sb { z0.h }, p0/z, [x0, x0]"

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

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

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

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

  -
    input:
      bytes: [ 0xff, 0xbf, 0x5f, 0xc4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ldff1sb { z31.d }, p7/z, [sp, z31.d]"

  -
    input:
      bytes: [ 0x55, 0x35, 0x15, 0xc4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ldff1sb { z21.d }, p5/z, [x10, z21.d, uxtw]"

  -
    input:
      bytes: [ 0x55, 0x35, 0x55, 0xc4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ldff1sb { z21.d }, p5/z, [x10, z21.d, sxtw]"

  -
    input:
      bytes: [ 0xff, 0xbf, 0x3f, 0x84 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ldff1sb { z31.s }, p7/z, [z31.s, #31]"

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

  -
    input:
      bytes: [ 0xff, 0xbf, 0x3f, 0xc4 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ldff1sb { z31.d }, p7/z, [z31.d, #31]"

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