test_cases:
  -
    input:
      bytes: [ 0xf7, 0xbf, 0x20, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2", "+b16b16" ]
    expected:
      insns:
        -
          asm_text: "movprfx z23, z31"

  -
    input:
      bytes: [ 0xb7, 0x25, 0x28, 0x64 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2", "+b16b16" ]
    expected:
      insns:
        -
          asm_text: "bfclamp z23.h, z13.h, z8.h"

  -
    input:
      bytes: [ 0x00, 0x24, 0x20, 0x64 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2", "+b16b16" ]
    expected:
      insns:
        -
          asm_text: "bfclamp z0.h, z0.h, z0.h"

  -
    input:
      bytes: [ 0x55, 0x25, 0x35, 0x64 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2", "+b16b16" ]
    expected:
      insns:
        -
          asm_text: "bfclamp z21.h, z10.h, z21.h"

  -
    input:
      bytes: [ 0xb7, 0x25, 0x28, 0x64 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2", "+b16b16" ]
    expected:
      insns:
        -
          asm_text: "bfclamp z23.h, z13.h, z8.h"

  -
    input:
      bytes: [ 0xff, 0x27, 0x3f, 0x64 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2", "+b16b16" ]
    expected:
      insns:
        -
          asm_text: "bfclamp z31.h, z31.h, z31.h"
