test_cases:
  -
    input:
      bytes: [ 0x00, 0xc4, 0x60, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z0.h, z1.h }, z0.h, z0.h"

  -
    input:
      bytes: [ 0x54, 0xc5, 0x75, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z20.h, z21.h }, z10.h, z21.h"

  -
    input:
      bytes: [ 0xb6, 0xc5, 0x68, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z22.h, z23.h }, z13.h, z8.h"

  -
    input:
      bytes: [ 0xfe, 0xc7, 0x7f, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z30.h, z31.h }, z31.h, z31.h"

  -
    input:
      bytes: [ 0x00, 0xc4, 0xa0, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z0.s, z1.s }, z0.s, z0.s"

  -
    input:
      bytes: [ 0x54, 0xc5, 0xb5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z20.s, z21.s }, z10.s, z21.s"

  -
    input:
      bytes: [ 0xb6, 0xc5, 0xa8, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z22.s, z23.s }, z13.s, z8.s"

  -
    input:
      bytes: [ 0xfe, 0xc7, 0xbf, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z30.s, z31.s }, z31.s, z31.s"

  -
    input:
      bytes: [ 0x00, 0xc4, 0xe0, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z0.d, z1.d }, z0.d, z0.d"

  -
    input:
      bytes: [ 0x54, 0xc5, 0xf5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z20.d, z21.d }, z10.d, z21.d"

  -
    input:
      bytes: [ 0xb6, 0xc5, 0xe8, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z22.d, z23.d }, z13.d, z8.d"

  -
    input:
      bytes: [ 0xfe, 0xc7, 0xff, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z30.d, z31.d }, z31.d, z31.d"

  -
    input:
      bytes: [ 0x00, 0xc4, 0x20, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z0.b, z1.b }, z0.b, z0.b"

  -
    input:
      bytes: [ 0x54, 0xc5, 0x35, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z20.b, z21.b }, z10.b, z21.b"

  -
    input:
      bytes: [ 0xb6, 0xc5, 0x28, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z22.b, z23.b }, z13.b, z8.b"

  -
    input:
      bytes: [ 0xfe, 0xc7, 0x3f, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z30.b, z31.b }, z31.b, z31.b"

  -
    input:
      bytes: [ 0x00, 0xcc, 0x60, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z0.h - z3.h }, z0.h, z0.h"

  -
    input:
      bytes: [ 0x54, 0xcd, 0x75, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z20.h - z23.h }, z10.h, z21.h"

  -
    input:
      bytes: [ 0xb4, 0xcd, 0x68, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z20.h - z23.h }, z13.h, z8.h"

  -
    input:
      bytes: [ 0xfc, 0xcf, 0x7f, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z28.h - z31.h }, z31.h, z31.h"

  -
    input:
      bytes: [ 0x00, 0xcc, 0xa0, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z0.s - z3.s }, z0.s, z0.s"

  -
    input:
      bytes: [ 0x54, 0xcd, 0xb5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z20.s - z23.s }, z10.s, z21.s"

  -
    input:
      bytes: [ 0xb4, 0xcd, 0xa8, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z20.s - z23.s }, z13.s, z8.s"

  -
    input:
      bytes: [ 0xfc, 0xcf, 0xbf, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z28.s - z31.s }, z31.s, z31.s"

  -
    input:
      bytes: [ 0x00, 0xcc, 0xe0, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z0.d - z3.d }, z0.d, z0.d"

  -
    input:
      bytes: [ 0x54, 0xcd, 0xf5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z20.d - z23.d }, z10.d, z21.d"

  -
    input:
      bytes: [ 0xb4, 0xcd, 0xe8, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z20.d - z23.d }, z13.d, z8.d"

  -
    input:
      bytes: [ 0xfc, 0xcf, 0xff, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z28.d - z31.d }, z31.d, z31.d"

  -
    input:
      bytes: [ 0x00, 0xcc, 0x20, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z0.b - z3.b }, z0.b, z0.b"

  -
    input:
      bytes: [ 0x54, 0xcd, 0x35, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z20.b - z23.b }, z10.b, z21.b"

  -
    input:
      bytes: [ 0xb4, 0xcd, 0x28, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z20.b - z23.b }, z13.b, z8.b"

  -
    input:
      bytes: [ 0xfc, 0xcf, 0x3f, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "sclamp { z28.b - z31.b }, z31.b, z31.b"
