test_cases:
  -
    input:
      bytes: [ 0x00, 0xe0, 0x23, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sqcvt z0.h, { z0.s, z1.s }"

  -
    input:
      bytes: [ 0x55, 0xe1, 0x23, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sqcvt z21.h, { z10.s, z11.s }"

  -
    input:
      bytes: [ 0x97, 0xe1, 0x23, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sqcvt z23.h, { z12.s, z13.s }"

  -
    input:
      bytes: [ 0xdf, 0xe3, 0x23, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sqcvt z31.h, { z30.s, z31.s }"

  -
    input:
      bytes: [ 0x00, 0xe0, 0x33, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sqcvt z0.b, { z0.s - z3.s }"

  -
    input:
      bytes: [ 0x15, 0xe1, 0x33, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sqcvt z21.b, { z8.s - z11.s }"

  -
    input:
      bytes: [ 0x97, 0xe1, 0x33, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sqcvt z23.b, { z12.s - z15.s }"

  -
    input:
      bytes: [ 0x9f, 0xe3, 0x33, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sqcvt z31.b, { z28.s - z31.s }"

  -
    input:
      bytes: [ 0x00, 0xe0, 0xb3, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sqcvt z0.h, { z0.d - z3.d }"

  -
    input:
      bytes: [ 0x15, 0xe1, 0xb3, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sqcvt z21.h, { z8.d - z11.d }"

  -
    input:
      bytes: [ 0x97, 0xe1, 0xb3, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sqcvt z23.h, { z12.d - z15.d }"

  -
    input:
      bytes: [ 0x9f, 0xe3, 0xb3, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sqcvt z31.h, { z28.d - z31.d }"
