test_cases:
  -
    input:
      bytes: [ 0x4c, 0x00, 0x02, 0x24 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "hrfid"

  -
    input:
      bytes: [ 0x4c, 0x00, 0x03, 0x64 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "nap"

  -
    input:
      bytes: [ 0x7c, 0x80, 0x01, 0x24 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mtmsr 4"

  -
    input:
      bytes: [ 0x7c, 0x81, 0x01, 0x24 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mtmsr 4, 1"

  -
    input:
      bytes: [ 0x7c, 0x80, 0x00, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mfmsr 4"

  -
    input:
      bytes: [ 0x7c, 0x80, 0x01, 0x64 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mtmsrd 4"

  -
    input:
      bytes: [ 0x7c, 0x81, 0x01, 0x64 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mtmsrd 4, 1"

  -
    input:
      bytes: [ 0x7c, 0x90, 0x42, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mfspr 4, 272"

  -
    input:
      bytes: [ 0x7c, 0x91, 0x42, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mfspr 4, 273"

  -
    input:
      bytes: [ 0x7c, 0x92, 0x42, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mfspr 4, 274"

  -
    input:
      bytes: [ 0x7c, 0x93, 0x42, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mfspr 4, 275"

  -
    input:
      bytes: [ 0x7c, 0x90, 0x43, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mtspr 272, 4"

  -
    input:
      bytes: [ 0x7c, 0x91, 0x43, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mtspr 273, 4"

  -
    input:
      bytes: [ 0x7c, 0x92, 0x43, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mtspr 274, 4"

  -
    input:
      bytes: [ 0x7c, 0x93, 0x43, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mtspr 275, 4"

  -
    input:
      bytes: [ 0x7c, 0x98, 0x43, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mtasr 4"

  -
    input:
      bytes: [ 0x7c, 0x96, 0x02, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mfdec 4"

  -
    input:
      bytes: [ 0x7c, 0x96, 0x03, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mtdec 4"

  -
    input:
      bytes: [ 0x7c, 0x9f, 0x42, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mfpvr 4"

  -
    input:
      bytes: [ 0x7c, 0x99, 0x02, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mfsdr1 4"

  -
    input:
      bytes: [ 0x7c, 0x99, 0x03, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mtsdr1 4"

  -
    input:
      bytes: [ 0x7c, 0x9a, 0x02, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mfsrr0 4"

  -
    input:
      bytes: [ 0x7c, 0x9a, 0x03, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mtsrr0 4"

  -
    input:
      bytes: [ 0x7c, 0x9b, 0x02, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mfsrr1 4"

  -
    input:
      bytes: [ 0x7c, 0x9b, 0x03, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mtsrr1 4"

  -
    input:
      bytes: [ 0x7c, 0x00, 0x23, 0x64 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "slbie 4"

  -
    input:
      bytes: [ 0x7c, 0x80, 0x2b, 0x24 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "slbmte 4, 5"

  -
    input:
      bytes: [ 0x7c, 0x80, 0x2f, 0x26 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "slbmfee 4, 5"

  -
    input:
      bytes: [ 0x7c, 0x40, 0x1e, 0xa6 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "slbmfev 2, 3"

  -
    input:
      bytes: [ 0x7c, 0x00, 0x03, 0xe4 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "slbia"

  -
    input:
      bytes: [ 0x7c, 0x00, 0x04, 0x6c ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "tlbsync"

  -
    input:
      bytes: [ 0x7c, 0x00, 0x22, 0x24 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "tlbiel 4"

  -
    input:
      bytes: [ 0x7c, 0x00, 0x22, 0x64 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "tlbie 4"

  -
    input:
      bytes: [ 0x4c, 0x00, 0x00, 0x64 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7", "CS_MODE_BOOKE" ]
    expected:
      insns:
        -
          asm_text: "rfi"

  -
    input:
      bytes: [ 0x4c, 0x00, 0x00, 0x66 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7", "CS_MODE_BOOKE" ]
    expected:
      insns:
        -
          asm_text: "rfci"

  -
    input:
      bytes: [ 0x7d, 0x80, 0x01, 0x06 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7", "CS_MODE_BOOKE" ]
    expected:
      insns:
        -
          asm_text: "wrtee 12"

  -
    input:
      bytes: [ 0x7c, 0x00, 0x01, 0x46 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7", "CS_MODE_BOOKE" ]
    expected:
      insns:
        -
          asm_text: "wrteei 0"

  -
    input:
      bytes: [ 0x7c, 0x00, 0x81, 0x46 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7", "CS_MODE_BOOKE" ]
    expected:
      insns:
        -
          asm_text: "wrteei 1"

  -
    input:
      bytes: [ 0x7c, 0x00, 0x07, 0x64 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7", "CS_MODE_BOOKE" ]
    expected:
      insns:
        -
          asm_text: "tlbre"

  -
    input:
      bytes: [ 0x7c, 0x00, 0x07, 0xa4 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7", "CS_MODE_BOOKE" ]
    expected:
      insns:
        -
          asm_text: "tlbwe"

  -
    input:
      bytes: [ 0x7c, 0x0b, 0x66, 0x24 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7", "CS_MODE_BOOKE" ]
    expected:
      insns:
        -
          asm_text: "tlbivax 11, 12"

  -
    input:
      bytes: [ 0x7c, 0x0b, 0x67, 0x24 ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7", "CS_MODE_BOOKE" ]
    expected:
      insns:
        -
          asm_text: "tlbsx 11, 12"

  -
    input:
      bytes: [ 0x7c, 0xb0, 0x62, 0x9c ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mfpmr 5, 400"

  -
    input:
      bytes: [ 0x7c, 0xd0, 0x63, 0x9c ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR7" ]
    expected:
      insns:
        -
          asm_text: "mtpmr 400, 6"

  -
    input:
      bytes: [ 0x7c, 0x00, 0x41, 0xcc ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR8" ]
    expected:
      insns:
        -
          asm_text: "icblc 0, 0, 8"

  -
    input:
      bytes: [ 0x7c, 0x00, 0x4b, 0xcc ]
      arch: "CS_ARCH_PPC"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "CS_OPT_SYNTAX_NOREGNAME", "CS_MODE_BIG_ENDIAN", "CS_MODE_64", "CS_MODE_PWR8" ]
    expected:
      insns:
        -
          asm_text: "icbtls 0, 0, 9"
