test_cases:
  -
    input:
      bytes: [ 0x00, 0x10, 0xca, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 z0.h, zt0, z0[0]"

  -
    input:
      bytes: [ 0x55, 0x51, 0xcb, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 z21.h, zt0, z10[5]"

  -
    input:
      bytes: [ 0xb7, 0xd1, 0xca, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 z23.h, zt0, z13[3]"

  -
    input:
      bytes: [ 0xff, 0xd3, 0xcb, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 z31.h, zt0, z31[7]"

  -
    input:
      bytes: [ 0x00, 0x20, 0xca, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 z0.s, zt0, z0[0]"

  -
    input:
      bytes: [ 0x55, 0x61, 0xcb, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 z21.s, zt0, z10[5]"

  -
    input:
      bytes: [ 0xb7, 0xe1, 0xca, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 z23.s, zt0, z13[3]"

  -
    input:
      bytes: [ 0xff, 0xe3, 0xcb, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 z31.s, zt0, z31[7]"

  -
    input:
      bytes: [ 0x00, 0x00, 0xca, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 z0.b, zt0, z0[0]"

  -
    input:
      bytes: [ 0x55, 0x41, 0xcb, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 z21.b, zt0, z10[5]"

  -
    input:
      bytes: [ 0xb7, 0xc1, 0xca, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 z23.b, zt0, z13[3]"

  -
    input:
      bytes: [ 0xff, 0xc3, 0xcb, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 z31.b, zt0, z31[7]"

  -
    input:
      bytes: [ 0x00, 0x50, 0x8a, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z0.h, z1.h }, zt0, z0[0]"

  -
    input:
      bytes: [ 0x54, 0x51, 0x8b, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z20.h, z21.h }, zt0, z10[2]"

  -
    input:
      bytes: [ 0xb6, 0xd1, 0x8a, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z22.h, z23.h }, zt0, z13[1]"

  -
    input:
      bytes: [ 0xfe, 0xd3, 0x8b, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z30.h, z31.h }, zt0, z31[3]"

  -
    input:
      bytes: [ 0x00, 0x60, 0x8a, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z0.s, z1.s }, zt0, z0[0]"

  -
    input:
      bytes: [ 0x54, 0x61, 0x8b, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z20.s, z21.s }, zt0, z10[2]"

  -
    input:
      bytes: [ 0xb6, 0xe1, 0x8a, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z22.s, z23.s }, zt0, z13[1]"

  -
    input:
      bytes: [ 0xfe, 0xe3, 0x8b, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z30.s, z31.s }, zt0, z31[3]"

  -
    input:
      bytes: [ 0x00, 0x40, 0x8a, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z0.b, z1.b }, zt0, z0[0]"

  -
    input:
      bytes: [ 0x54, 0x41, 0x8b, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z20.b, z21.b }, zt0, z10[2]"

  -
    input:
      bytes: [ 0xb6, 0xc1, 0x8a, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z22.b, z23.b }, zt0, z13[1]"

  -
    input:
      bytes: [ 0xfe, 0xc3, 0x8b, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z30.b, z31.b }, zt0, z31[3]"

  -
    input:
      bytes: [ 0x00, 0x90, 0x8a, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z0.h - z3.h }, zt0, z0[0]"

  -
    input:
      bytes: [ 0x54, 0x91, 0x8b, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z20.h - z23.h }, zt0, z10[1]"

  -
    input:
      bytes: [ 0xb4, 0x91, 0x8a, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z20.h - z23.h }, zt0, z13[0]"

  -
    input:
      bytes: [ 0xfc, 0x93, 0x8b, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z28.h - z31.h }, zt0, z31[1]"

  -
    input:
      bytes: [ 0x00, 0xa0, 0x8a, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z0.s - z3.s }, zt0, z0[0]"

  -
    input:
      bytes: [ 0x54, 0xa1, 0x8b, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z20.s - z23.s }, zt0, z10[1]"

  -
    input:
      bytes: [ 0xb4, 0xa1, 0x8a, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z20.s - z23.s }, zt0, z13[0]"

  -
    input:
      bytes: [ 0xfc, 0xa3, 0x8b, 0xc0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "luti4 { z28.s - z31.s }, zt0, z31[1]"
