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

  -
    input:
      bytes: [ 0xff, 0x43, 0xa0, 0x85 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ldr z31, [sp, #-256, mul vl]"

  -
    input:
      bytes: [ 0xb7, 0x5d, 0x9f, 0x85 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ldr z23, [x13, #255, mul vl]"

  -
    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: [ 0xa7, 0x01, 0xa0, 0x85 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "ldr p7, [x13, #-256, mul vl]"

  -
    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, 0x40, 0x80, 0x85 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ldr z0, [x0]"

  -
    input:
      bytes: [ 0xff, 0x43, 0xa0, 0x85 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ldr z31, [sp, #-256, mul vl]"

  -
    input:
      bytes: [ 0xb7, 0x5d, 0x9f, 0x85 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ldr z23, [x13, #255, mul vl]"

  -
    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: [ 0xa7, 0x01, 0xa0, 0x85 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "ldr p7, [x13, #-256, mul vl]"

  -
    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]"
