test_cases:
  -
    input:
      bytes: [ 0x20, 0x10, 0xdf, 0x9a ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "irg x0, x1"

  -
    input:
      bytes: [ 0x3f, 0x10, 0xdf, 0x9a ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "irg sp, x1"

  -
    input:
      bytes: [ 0xe0, 0x13, 0xdf, 0x9a ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "irg x0, sp"

  -
    input:
      bytes: [ 0x20, 0x10, 0xc2, 0x9a ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "irg x0, x1, x2"

  -
    input:
      bytes: [ 0x3f, 0x10, 0xc2, 0x9a ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "irg sp, x1, x2"

  -
    input:
      bytes: [ 0x20, 0x04, 0x80, 0x91 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "addg x0, x1, #0, #1"

  -
    input:
      bytes: [ 0x5f, 0x0c, 0x82, 0x91 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "addg sp, x2, #32, #3"

  -
    input:
      bytes: [ 0xe0, 0x17, 0x84, 0x91 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "addg x0, sp, #64, #5"

  -
    input:
      bytes: [ 0x83, 0x18, 0xbf, 0x91 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "addg x3, x4, #1008, #6"

  -
    input:
      bytes: [ 0xc5, 0x3c, 0x87, 0x91 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "addg x5, x6, #112, #15"

  -
    input:
      bytes: [ 0x20, 0x04, 0x80, 0xd1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "subg x0, x1, #0, #1"

  -
    input:
      bytes: [ 0x5f, 0x0c, 0x82, 0xd1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "subg sp, x2, #32, #3"

  -
    input:
      bytes: [ 0xe0, 0x17, 0x84, 0xd1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "subg x0, sp, #64, #5"

  -
    input:
      bytes: [ 0x83, 0x18, 0xbf, 0xd1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "subg x3, x4, #1008, #6"

  -
    input:
      bytes: [ 0xc5, 0x3c, 0x87, 0xd1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "subg x5, x6, #112, #15"

  -
    input:
      bytes: [ 0x20, 0x14, 0xc2, 0x9a ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "gmi x0, x1, x2"

  -
    input:
      bytes: [ 0xe3, 0x17, 0xc4, 0x9a ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "gmi x3, sp, x4"

  -
    input:
      bytes: [ 0x1f, 0x14, 0xde, 0x9a ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "gmi xzr, x0, x30"

  -
    input:
      bytes: [ 0x1e, 0x14, 0xdf, 0x9a ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "gmi x30, x0, xzr"

  -
    input:
      bytes: [ 0x20, 0x08, 0x20, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stg x0, [x1]"

  -
    input:
      bytes: [ 0x21, 0x08, 0x30, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stg x1, [x1, #-4096]"

  -
    input:
      bytes: [ 0x42, 0xf8, 0x2f, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stg x2, [x2, #4080]"

  -
    input:
      bytes: [ 0xe3, 0x1b, 0x20, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stg x3, [sp, #16]"

  -
    input:
      bytes: [ 0xff, 0x1b, 0x20, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stg sp, [sp, #16]"

  -
    input:
      bytes: [ 0x20, 0x08, 0x60, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stzg x0, [x1]"

  -
    input:
      bytes: [ 0x21, 0x08, 0x70, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stzg x1, [x1, #-4096]"

  -
    input:
      bytes: [ 0x42, 0xf8, 0x6f, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stzg x2, [x2, #4080]"

  -
    input:
      bytes: [ 0xe3, 0x1b, 0x60, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stzg x3, [sp, #16]"

  -
    input:
      bytes: [ 0xff, 0x1b, 0x60, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stzg sp, [sp, #16]"

  -
    input:
      bytes: [ 0x20, 0x0c, 0x30, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stg x0, [x1, #-4096]!"

  -
    input:
      bytes: [ 0x41, 0xfc, 0x2f, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stg x1, [x2, #4080]!"

  -
    input:
      bytes: [ 0xe2, 0x1f, 0x20, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stg x2, [sp, #16]!"

  -
    input:
      bytes: [ 0xff, 0x1f, 0x20, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stg sp, [sp, #16]!"

  -
    input:
      bytes: [ 0x20, 0x0c, 0x70, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stzg x0, [x1, #-4096]!"

  -
    input:
      bytes: [ 0x41, 0xfc, 0x6f, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stzg x1, [x2, #4080]!"

  -
    input:
      bytes: [ 0xe2, 0x1f, 0x60, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stzg x2, [sp, #16]!"

  -
    input:
      bytes: [ 0xff, 0x1f, 0x60, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stzg sp, [sp, #16]!"

  -
    input:
      bytes: [ 0x20, 0x04, 0x30, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stg x0, [x1], #-4096"

  -
    input:
      bytes: [ 0x41, 0xf4, 0x2f, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stg x1, [x2], #4080"

  -
    input:
      bytes: [ 0xe2, 0x17, 0x20, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stg x2, [sp], #16"

  -
    input:
      bytes: [ 0xff, 0x17, 0x20, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stg sp, [sp], #16"

  -
    input:
      bytes: [ 0x20, 0x04, 0x70, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stzg x0, [x1], #-4096"

  -
    input:
      bytes: [ 0x41, 0xf4, 0x6f, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stzg x1, [x2], #4080"

  -
    input:
      bytes: [ 0xe2, 0x17, 0x60, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stzg x2, [sp], #16"

  -
    input:
      bytes: [ 0xff, 0x17, 0x60, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stzg sp, [sp], #16"

  -
    input:
      bytes: [ 0x20, 0x08, 0xa0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "st2g x0, [x1]"

  -
    input:
      bytes: [ 0x21, 0x08, 0xb0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "st2g x1, [x1, #-4096]"

  -
    input:
      bytes: [ 0x42, 0xf8, 0xaf, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "st2g x2, [x2, #4080]"

  -
    input:
      bytes: [ 0xe3, 0x1b, 0xa0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "st2g x3, [sp, #16]"

  -
    input:
      bytes: [ 0xff, 0x1b, 0xa0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "st2g sp, [sp, #16]"

  -
    input:
      bytes: [ 0x20, 0x08, 0xe0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stz2g x0, [x1]"

  -
    input:
      bytes: [ 0x21, 0x08, 0xf0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stz2g x1, [x1, #-4096]"

  -
    input:
      bytes: [ 0x42, 0xf8, 0xef, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stz2g x2, [x2, #4080]"

  -
    input:
      bytes: [ 0xe3, 0x1b, 0xe0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stz2g x3, [sp, #16]"

  -
    input:
      bytes: [ 0xff, 0x1b, 0xe0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stz2g sp, [sp, #16]"

  -
    input:
      bytes: [ 0x20, 0x0c, 0xb0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "st2g x0, [x1, #-4096]!"

  -
    input:
      bytes: [ 0x41, 0xfc, 0xaf, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "st2g x1, [x2, #4080]!"

  -
    input:
      bytes: [ 0xe2, 0x1f, 0xa0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "st2g x2, [sp, #16]!"

  -
    input:
      bytes: [ 0xff, 0x1f, 0xa0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "st2g sp, [sp, #16]!"

  -
    input:
      bytes: [ 0x20, 0x0c, 0xf0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stz2g x0, [x1, #-4096]!"

  -
    input:
      bytes: [ 0x41, 0xfc, 0xef, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stz2g x1, [x2, #4080]!"

  -
    input:
      bytes: [ 0xe2, 0x1f, 0xe0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stz2g x2, [sp, #16]!"

  -
    input:
      bytes: [ 0xff, 0x1f, 0xe0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stz2g sp, [sp, #16]!"

  -
    input:
      bytes: [ 0x20, 0x04, 0xb0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "st2g x0, [x1], #-4096"

  -
    input:
      bytes: [ 0x41, 0xf4, 0xaf, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "st2g x1, [x2], #4080"

  -
    input:
      bytes: [ 0xe2, 0x17, 0xa0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "st2g x2, [sp], #16"

  -
    input:
      bytes: [ 0xff, 0x17, 0xa0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "st2g sp, [sp], #16"

  -
    input:
      bytes: [ 0x20, 0x04, 0xf0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stz2g x0, [x1], #-4096"

  -
    input:
      bytes: [ 0x41, 0xf4, 0xef, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stz2g x1, [x2], #4080"

  -
    input:
      bytes: [ 0xe2, 0x17, 0xe0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stz2g x2, [sp], #16"

  -
    input:
      bytes: [ 0xff, 0x17, 0xe0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stz2g sp, [sp], #16"

  -
    input:
      bytes: [ 0x40, 0x04, 0x00, 0x69 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stgp x0, x1, [x2]"

  -
    input:
      bytes: [ 0x40, 0x04, 0x20, 0x69 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stgp x0, x1, [x2, #-1024]"

  -
    input:
      bytes: [ 0x40, 0x84, 0x1f, 0x69 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stgp x0, x1, [x2, #1008]"

  -
    input:
      bytes: [ 0xe0, 0x87, 0x00, 0x69 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stgp x0, x1, [sp, #16]"

  -
    input:
      bytes: [ 0x5f, 0x84, 0x00, 0x69 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stgp xzr, x1, [x2, #16]"

  -
    input:
      bytes: [ 0x40, 0xfc, 0x00, 0x69 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stgp x0, xzr, [x2, #16]"

  -
    input:
      bytes: [ 0x40, 0x04, 0xa0, 0x69 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stgp x0, x1, [x2, #-1024]!"

  -
    input:
      bytes: [ 0x40, 0x84, 0x9f, 0x69 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stgp x0, x1, [x2, #1008]!"

  -
    input:
      bytes: [ 0xe0, 0x87, 0x80, 0x69 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stgp x0, x1, [sp, #16]!"

  -
    input:
      bytes: [ 0x5f, 0x84, 0x80, 0x69 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stgp xzr, x1, [x2, #16]!"

  -
    input:
      bytes: [ 0x40, 0xfc, 0x80, 0x69 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stgp x0, xzr, [x2, #16]!"

  -
    input:
      bytes: [ 0x40, 0x04, 0xa0, 0x68 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stgp x0, x1, [x2], #-1024"

  -
    input:
      bytes: [ 0x40, 0x84, 0x9f, 0x68 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stgp x0, x1, [x2], #1008"

  -
    input:
      bytes: [ 0xe0, 0x87, 0x80, 0x68 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stgp x0, x1, [sp], #16"

  -
    input:
      bytes: [ 0x5f, 0x84, 0x80, 0x68 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stgp xzr, x1, [x2], #16"

  -
    input:
      bytes: [ 0x40, 0xfc, 0x80, 0x68 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stgp x0, xzr, [x2], #16"

  -
    input:
      bytes: [ 0x60, 0x76, 0x08, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "dc igvac, x0"

  -
    input:
      bytes: [ 0x81, 0x76, 0x08, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "dc igsw, x1"

  -
    input:
      bytes: [ 0x82, 0x7a, 0x08, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "dc cgsw, x2"

  -
    input:
      bytes: [ 0x83, 0x7e, 0x08, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "dc cigsw, x3"

  -
    input:
      bytes: [ 0x64, 0x7a, 0x0b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "dc cgvac, x4"

  -
    input:
      bytes: [ 0x65, 0x7c, 0x0b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "dc cgvap, x5"

  -
    input:
      bytes: [ 0x66, 0x7d, 0x0b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "dc cgvadp, x6"

  -
    input:
      bytes: [ 0x67, 0x7e, 0x0b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "dc cigvac, x7"

  -
    input:
      bytes: [ 0x68, 0x74, 0x0b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "dc gva, x8"

  -
    input:
      bytes: [ 0xa9, 0x76, 0x08, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "dc igdvac, x9"

  -
    input:
      bytes: [ 0xca, 0x76, 0x08, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "dc igdsw, x10"

  -
    input:
      bytes: [ 0xcb, 0x7a, 0x08, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "dc cgdsw, x11"

  -
    input:
      bytes: [ 0xcc, 0x7e, 0x08, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "dc cigdsw, x12"

  -
    input:
      bytes: [ 0xad, 0x7a, 0x0b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "dc cgdvac, x13"

  -
    input:
      bytes: [ 0xae, 0x7c, 0x0b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "dc cgdvap, x14"

  -
    input:
      bytes: [ 0xaf, 0x7d, 0x0b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "dc cgdvadp, x15"

  -
    input:
      bytes: [ 0xb0, 0x7e, 0x0b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "dc cigdvac, x16"

  -
    input:
      bytes: [ 0x91, 0x74, 0x0b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "dc gzva, x17"

  -
    input:
      bytes: [ 0xe0, 0x42, 0x3b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "mrs x0, TCO"

  -
    input:
      bytes: [ 0xc1, 0x10, 0x38, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "mrs x1, GCR_EL1"

  -
    input:
      bytes: [ 0xa2, 0x10, 0x38, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "mrs x2, RGSR_EL1"

  -
    input:
      bytes: [ 0x03, 0x56, 0x38, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "mrs x3, TFSR_EL1"

  -
    input:
      bytes: [ 0x04, 0x56, 0x3c, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "mrs x4, TFSR_EL2"

  -
    input:
      bytes: [ 0x05, 0x56, 0x3e, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "mrs x5, TFSR_EL3"

  -
    input:
      bytes: [ 0x06, 0x56, 0x3d, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "mrs x6, TFSR_EL12"

  -
    input:
      bytes: [ 0x27, 0x56, 0x38, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "mrs x7, TFSRE0_EL1"

  -
    input:
      bytes: [ 0x87, 0x00, 0x39, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "mrs x7, GMID_EL1"

  -
    input:
      bytes: [ 0x9f, 0x40, 0x03, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "msr TCO, #0"

  -
    input:
      bytes: [ 0xe0, 0x42, 0x1b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "msr TCO, x0"

  -
    input:
      bytes: [ 0xc1, 0x10, 0x18, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "msr GCR_EL1, x1"

  -
    input:
      bytes: [ 0xa2, 0x10, 0x18, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "msr RGSR_EL1, x2"

  -
    input:
      bytes: [ 0x03, 0x56, 0x18, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "msr TFSR_EL1, x3"

  -
    input:
      bytes: [ 0x04, 0x56, 0x1c, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "msr TFSR_EL2, x4"

  -
    input:
      bytes: [ 0x05, 0x56, 0x1e, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "msr TFSR_EL3, x5"

  -
    input:
      bytes: [ 0x06, 0x56, 0x1d, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "msr TFSR_EL12, x6"

  -
    input:
      bytes: [ 0x27, 0x56, 0x18, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "msr TFSRE0_EL1, x7"

  -
    input:
      bytes: [ 0x20, 0x00, 0xc2, 0x9a ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "subp x0, x1, x2"

  -
    input:
      bytes: [ 0xe0, 0x03, 0xdf, 0x9a ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "subp x0, sp, sp"

  -
    input:
      bytes: [ 0x20, 0x00, 0xc2, 0xba ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "subps x0, x1, x2"

  -
    input:
      bytes: [ 0xe0, 0x03, 0xdf, 0xba ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "subps x0, sp, sp"

  -
    input:
      bytes: [ 0x1f, 0x00, 0xc1, 0xba ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "subps xzr, x0, x1"

  -
    input:
      bytes: [ 0x1f, 0x00, 0xc1, 0xba ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "subps xzr, x0, x1"

  -
    input:
      bytes: [ 0xff, 0x03, 0xdf, 0xba ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "subps xzr, sp, sp"

  -
    input:
      bytes: [ 0xff, 0x03, 0xdf, 0xba ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "subps xzr, sp, sp"

  -
    input:
      bytes: [ 0x20, 0x00, 0x60, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "ldg x0, [x1]"

  -
    input:
      bytes: [ 0xe2, 0x03, 0x70, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "ldg x2, [sp, #-4096]"

  -
    input:
      bytes: [ 0x83, 0xf0, 0x6f, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "ldg x3, [x4, #4080]"

  -
    input:
      bytes: [ 0x20, 0x00, 0xe0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "ldgm x0, [x1]"

  -
    input:
      bytes: [ 0xe1, 0x03, 0xe0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "ldgm x1, [sp]"

  -
    input:
      bytes: [ 0x5f, 0x00, 0xe0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "ldgm xzr, [x2]"

  -
    input:
      bytes: [ 0x20, 0x00, 0xa0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stgm x0, [x1]"

  -
    input:
      bytes: [ 0xe1, 0x03, 0xa0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stgm x1, [sp]"

  -
    input:
      bytes: [ 0x5f, 0x00, 0xa0, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stgm xzr, [x2]"

  -
    input:
      bytes: [ 0x20, 0x00, 0x20, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stzgm x0, [x1]"

  -
    input:
      bytes: [ 0xe1, 0x03, 0x20, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stzgm x1, [sp]"

  -
    input:
      bytes: [ 0x5f, 0x00, 0x20, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_NO_BRANCH_OFFSET", "aarch64", "mte" ]
    expected:
      insns:
        -
          asm_text: "stzgm xzr, [x2]"
