test_cases:
  -
    input:
      bytes: [ 0xfd, 0x3b, 0x7e, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "bcax z29.d, z29.d, z30.d, z31.d"

  -
    input:
      bytes: [ 0xfd, 0x3b, 0x7e, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "bcax z29.d, z29.d, z30.d, z31.d"

  -
    input:
      bytes: [ 0xfd, 0x3b, 0x7e, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "bcax z29.d, z29.d, z30.d, z31.d"

  -
    input:
      bytes: [ 0xfd, 0x3b, 0x7e, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "bcax z29.d, z29.d, z30.d, z31.d"

  -
    input:
      bytes: [ 0xff, 0xbc, 0x20, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "movprfx z31, z7"

  -
    input:
      bytes: [ 0xbf, 0x3b, 0x7e, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2" ]
    expected:
      insns:
        -
          asm_text: "bcax z31.d, z31.d, z30.d, z29.d"

  -
    input:
      bytes: [ 0xfd, 0x3b, 0x7e, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "bcax z29.d, z29.d, z30.d, z31.d"

  -
    input:
      bytes: [ 0xfd, 0x3b, 0x7e, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "bcax z29.d, z29.d, z30.d, z31.d"

  -
    input:
      bytes: [ 0xfd, 0x3b, 0x7e, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "bcax z29.d, z29.d, z30.d, z31.d"

  -
    input:
      bytes: [ 0xfd, 0x3b, 0x7e, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "bcax z29.d, z29.d, z30.d, z31.d"

  -
    input:
      bytes: [ 0xff, 0xbc, 0x20, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "movprfx z31, z7"

  -
    input:
      bytes: [ 0xbf, 0x3b, 0x7e, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "bcax z31.d, z31.d, z30.d, z29.d"
