test_cases:
  -
    input:
      bytes: [ 0x00, 0x25, 0x18, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "msr GCSCR_EL1, x0"

  -
    input:
      bytes: [ 0x01, 0x25, 0x38, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "mrs x1, GCSCR_EL1"

  -
    input:
      bytes: [ 0x22, 0x25, 0x18, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "msr GCSPR_EL1, x2"

  -
    input:
      bytes: [ 0x23, 0x25, 0x38, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "mrs x3, GCSPR_EL1"

  -
    input:
      bytes: [ 0x44, 0x25, 0x18, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "msr GCSCRE0_EL1, x4"

  -
    input:
      bytes: [ 0x45, 0x25, 0x38, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "mrs x5, GCSCRE0_EL1"

  -
    input:
      bytes: [ 0x26, 0x25, 0x1b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "msr GCSPR_EL0, x6"

  -
    input:
      bytes: [ 0x27, 0x25, 0x3b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "mrs x7, GCSPR_EL0"

  -
    input:
      bytes: [ 0x0a, 0x25, 0x1c, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "msr GCSCR_EL2, x10"

  -
    input:
      bytes: [ 0x0b, 0x25, 0x3c, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "mrs x11, GCSCR_EL2"

  -
    input:
      bytes: [ 0x2c, 0x25, 0x1c, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "msr GCSPR_EL2, x12"

  -
    input:
      bytes: [ 0x2d, 0x25, 0x3c, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "mrs x13, GCSPR_EL2"

  -
    input:
      bytes: [ 0x0e, 0x25, 0x1d, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "msr GCSCR_EL12, x14"

  -
    input:
      bytes: [ 0x0f, 0x25, 0x3d, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "mrs x15, GCSCR_EL12"

  -
    input:
      bytes: [ 0x30, 0x25, 0x1d, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "msr GCSPR_EL12, x16"

  -
    input:
      bytes: [ 0x31, 0x25, 0x3d, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "mrs x17, GCSPR_EL12"

  -
    input:
      bytes: [ 0x12, 0x25, 0x1e, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "msr GCSCR_EL3, x18"

  -
    input:
      bytes: [ 0x13, 0x25, 0x3e, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "mrs x19, GCSCR_EL3"

  -
    input:
      bytes: [ 0x34, 0x25, 0x1e, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "msr GCSPR_EL3, x20"

  -
    input:
      bytes: [ 0x35, 0x25, 0x3e, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "mrs x21, GCSPR_EL3"

  -
    input:
      bytes: [ 0x55, 0x77, 0x0b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "gcsss1 x21"

  -
    input:
      bytes: [ 0x76, 0x77, 0x2b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "gcsss2 x22"

  -
    input:
      bytes: [ 0x19, 0x77, 0x0b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "gcspushm x25"

  -
    input:
      bytes: [ 0x3f, 0x77, 0x2b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "gcspopm"

  -
    input:
      bytes: [ 0x3f, 0x77, 0x2b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "gcspopm"

  -
    input:
      bytes: [ 0x39, 0x77, 0x2b, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "gcspopm x25"

  -
    input:
      bytes: [ 0x7f, 0x22, 0x03, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "gcsb dsync"

  -
    input:
      bytes: [ 0x7f, 0x22, 0x03, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "gcsb dsync"

  -
    input:
      bytes: [ 0x7a, 0x0f, 0x1f, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "gcsstr x26, x27"

  -
    input:
      bytes: [ 0xfa, 0x0f, 0x1f, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "gcsstr x26, sp"

  -
    input:
      bytes: [ 0x7a, 0x1f, 0x1f, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "gcssttr x26, x27"

  -
    input:
      bytes: [ 0xfa, 0x1f, 0x1f, 0xd9 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "gcssttr x26, sp"

  -
    input:
      bytes: [ 0x9f, 0x77, 0x08, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "gcspushx"

  -
    input:
      bytes: [ 0xbf, 0x77, 0x08, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "gcspopcx"

  -
    input:
      bytes: [ 0xdf, 0x77, 0x08, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "gcs" ]
    expected:
      insns:
        -
          asm_text: "gcspopx"
