test_cases:
  -
    input:
      bytes: [ 0x00, 0x00, 0x80, 0x85 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ldr p0, [x0]"

  -
    input:
      bytes: [ 0x45, 0x1d, 0x9f, 0x85 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ldr p5, [x10, #255, mul vl]"

  -
    input:
      bytes: [ 0x00, 0x00, 0x80, 0xe5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "str p0, [x0]"

  -
    input:
      bytes: [ 0x45, 0x1d, 0x9f, 0xe5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "str p5, [x10, #255, mul vl]"

  -
    input:
      bytes: [ 0x00, 0x40, 0x80, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "mov p0.b, p0.b"

  -
    input:
      bytes: [ 0x0f, 0xe4, 0x18, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "pfalse p15.b"

  -
    input:
      bytes: [ 0x00, 0x00, 0x80, 0x85 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ldr p0, [x0]"

  -
    input:
      bytes: [ 0x45, 0x1d, 0x9f, 0x85 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ldr p5, [x10, #255, mul vl]"

  -
    input:
      bytes: [ 0x00, 0x00, 0x80, 0xe5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "str p0, [x0]"

  -
    input:
      bytes: [ 0x45, 0x1d, 0x9f, 0xe5 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "str p5, [x10, #255, mul vl]"

  -
    input:
      bytes: [ 0x00, 0x40, 0x80, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "mov p0.b, p0.b"

  -
    input:
      bytes: [ 0x0f, 0xe4, 0x18, 0x25 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "pfalse p15.b"
