test_cases:
  -
    input:
      bytes: [ 0x10, 0x70, 0x60, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext p0.h, pn8[0]"

  -
    input:
      bytes: [ 0x55, 0x71, 0x60, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext p5.h, pn10[1]"

  -
    input:
      bytes: [ 0xb7, 0x71, 0x60, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext p7.h, pn13[1]"

  -
    input:
      bytes: [ 0xff, 0x73, 0x60, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext p15.h, pn15[3]"

  -
    input:
      bytes: [ 0x10, 0x70, 0xa0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext p0.s, pn8[0]"

  -
    input:
      bytes: [ 0x55, 0x71, 0xa0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext p5.s, pn10[1]"

  -
    input:
      bytes: [ 0xb7, 0x71, 0xa0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext p7.s, pn13[1]"

  -
    input:
      bytes: [ 0xff, 0x73, 0xa0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext p15.s, pn15[3]"

  -
    input:
      bytes: [ 0x10, 0x70, 0xe0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext p0.d, pn8[0]"

  -
    input:
      bytes: [ 0x55, 0x71, 0xe0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext p5.d, pn10[1]"

  -
    input:
      bytes: [ 0xb7, 0x71, 0xe0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext p7.d, pn13[1]"

  -
    input:
      bytes: [ 0xff, 0x73, 0xe0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext p15.d, pn15[3]"

  -
    input:
      bytes: [ 0x10, 0x70, 0x20, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext p0.b, pn8[0]"

  -
    input:
      bytes: [ 0x55, 0x71, 0x20, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext p5.b, pn10[1]"

  -
    input:
      bytes: [ 0xb7, 0x71, 0x20, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext p7.b, pn13[1]"

  -
    input:
      bytes: [ 0xff, 0x73, 0x20, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext p15.b, pn15[3]"

  -
    input:
      bytes: [ 0x10, 0x74, 0x60, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext { p0.h, p1.h }, pn8[0]"

  -
    input:
      bytes: [ 0x55, 0x75, 0x60, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext { p5.h, p6.h }, pn10[1]"

  -
    input:
      bytes: [ 0xb7, 0x75, 0x60, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext { p7.h, p8.h }, pn13[1]"

  -
    input:
      bytes: [ 0xff, 0x75, 0x60, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext { p15.h, p0.h }, pn15[1]"

  -
    input:
      bytes: [ 0x10, 0x74, 0xa0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext { p0.s, p1.s }, pn8[0]"

  -
    input:
      bytes: [ 0x55, 0x75, 0xa0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext { p5.s, p6.s }, pn10[1]"

  -
    input:
      bytes: [ 0xb7, 0x75, 0xa0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext { p7.s, p8.s }, pn13[1]"

  -
    input:
      bytes: [ 0xff, 0x75, 0xa0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext { p15.s, p0.s }, pn15[1]"

  -
    input:
      bytes: [ 0x10, 0x74, 0xe0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext { p0.d, p1.d }, pn8[0]"

  -
    input:
      bytes: [ 0x55, 0x75, 0xe0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext { p5.d, p6.d }, pn10[1]"

  -
    input:
      bytes: [ 0xb7, 0x75, 0xe0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext { p7.d, p8.d }, pn13[1]"

  -
    input:
      bytes: [ 0xff, 0x75, 0xe0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext { p15.d, p0.d }, pn15[1]"

  -
    input:
      bytes: [ 0xb7, 0x75, 0x20, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext { p7.b, p8.b }, pn13[1]"

  -
    input:
      bytes: [ 0xff, 0x75, 0x20, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "pext { p15.b, p0.b }, pn15[1]"

  -
    input:
      bytes: [ 0x10, 0x70, 0x60, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext p0.h, pn8[0]"

  -
    input:
      bytes: [ 0x55, 0x71, 0x60, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext p5.h, pn10[1]"

  -
    input:
      bytes: [ 0xb7, 0x71, 0x60, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext p7.h, pn13[1]"

  -
    input:
      bytes: [ 0xff, 0x73, 0x60, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext p15.h, pn15[3]"

  -
    input:
      bytes: [ 0x10, 0x70, 0xa0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext p0.s, pn8[0]"

  -
    input:
      bytes: [ 0x55, 0x71, 0xa0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext p5.s, pn10[1]"

  -
    input:
      bytes: [ 0xb7, 0x71, 0xa0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext p7.s, pn13[1]"

  -
    input:
      bytes: [ 0xff, 0x73, 0xa0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext p15.s, pn15[3]"

  -
    input:
      bytes: [ 0x10, 0x70, 0xe0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext p0.d, pn8[0]"

  -
    input:
      bytes: [ 0x55, 0x71, 0xe0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext p5.d, pn10[1]"

  -
    input:
      bytes: [ 0xb7, 0x71, 0xe0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext p7.d, pn13[1]"

  -
    input:
      bytes: [ 0xff, 0x73, 0xe0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext p15.d, pn15[3]"

  -
    input:
      bytes: [ 0x10, 0x70, 0x20, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext p0.b, pn8[0]"

  -
    input:
      bytes: [ 0x55, 0x71, 0x20, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext p5.b, pn10[1]"

  -
    input:
      bytes: [ 0xb7, 0x71, 0x20, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext p7.b, pn13[1]"

  -
    input:
      bytes: [ 0xff, 0x73, 0x20, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext p15.b, pn15[3]"

  -
    input:
      bytes: [ 0x10, 0x74, 0x60, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext { p0.h, p1.h }, pn8[0]"

  -
    input:
      bytes: [ 0x55, 0x75, 0x60, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext { p5.h, p6.h }, pn10[1]"

  -
    input:
      bytes: [ 0xb7, 0x75, 0x60, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext { p7.h, p8.h }, pn13[1]"

  -
    input:
      bytes: [ 0xff, 0x75, 0x60, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext { p15.h, p0.h }, pn15[1]"

  -
    input:
      bytes: [ 0x10, 0x74, 0xa0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext { p0.s, p1.s }, pn8[0]"

  -
    input:
      bytes: [ 0x55, 0x75, 0xa0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext { p5.s, p6.s }, pn10[1]"

  -
    input:
      bytes: [ 0xb7, 0x75, 0xa0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext { p7.s, p8.s }, pn13[1]"

  -
    input:
      bytes: [ 0xff, 0x75, 0xa0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext { p15.s, p0.s }, pn15[1]"

  -
    input:
      bytes: [ 0x10, 0x74, 0xe0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext { p0.d, p1.d }, pn8[0]"

  -
    input:
      bytes: [ 0x55, 0x75, 0xe0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext { p5.d, p6.d }, pn10[1]"

  -
    input:
      bytes: [ 0xb7, 0x75, 0xe0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext { p7.d, p8.d }, pn13[1]"

  -
    input:
      bytes: [ 0xff, 0x75, 0xe0, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext { p15.d, p0.d }, pn15[1]"

  -
    input:
      bytes: [ 0xb7, 0x75, 0x20, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext { p7.b, p8.b }, pn13[1]"

  -
    input:
      bytes: [ 0xff, 0x75, 0x20, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "pext { p15.b, p0.b }, pn15[1]"
