test_cases:
  -
    input:
      bytes: [ 0x00, 0x9b, 0x38, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64" ]
    expected:
      insns:
        -
          asm_text: "mrs x0, TRBLIMITR_EL1"

  -
    input:
      bytes: [ 0x20, 0x9b, 0x38, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64" ]
    expected:
      insns:
        -
          asm_text: "mrs x0, TRBPTR_EL1"

  -
    input:
      bytes: [ 0x40, 0x9b, 0x38, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64" ]
    expected:
      insns:
        -
          asm_text: "mrs x0, TRBBASER_EL1"

  -
    input:
      bytes: [ 0x60, 0x9b, 0x38, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64" ]
    expected:
      insns:
        -
          asm_text: "mrs x0, TRBSR_EL1"

  -
    input:
      bytes: [ 0x80, 0x9b, 0x38, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64" ]
    expected:
      insns:
        -
          asm_text: "mrs x0, TRBMAR_EL1"

  -
    input:
      bytes: [ 0xc0, 0x9b, 0x38, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64" ]
    expected:
      insns:
        -
          asm_text: "mrs x0, TRBTRG_EL1"

  -
    input:
      bytes: [ 0xe0, 0x9b, 0x38, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64" ]
    expected:
      insns:
        -
          asm_text: "mrs x0, TRBIDR_EL1"

  -
    input:
      bytes: [ 0x00, 0x9b, 0x18, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64" ]
    expected:
      insns:
        -
          asm_text: "msr TRBLIMITR_EL1, x0"

  -
    input:
      bytes: [ 0x20, 0x9b, 0x18, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64" ]
    expected:
      insns:
        -
          asm_text: "msr TRBPTR_EL1, x0"

  -
    input:
      bytes: [ 0x40, 0x9b, 0x18, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64" ]
    expected:
      insns:
        -
          asm_text: "msr TRBBASER_EL1, x0"

  -
    input:
      bytes: [ 0x60, 0x9b, 0x18, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64" ]
    expected:
      insns:
        -
          asm_text: "msr TRBSR_EL1, x0"

  -
    input:
      bytes: [ 0x80, 0x9b, 0x18, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64" ]
    expected:
      insns:
        -
          asm_text: "msr TRBMAR_EL1, x0"

  -
    input:
      bytes: [ 0xc0, 0x9b, 0x18, 0xd5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64" ]
    expected:
      insns:
        -
          asm_text: "msr TRBTRG_EL1, x0"
