test_cases:
  -
    input:
      bytes: [ 0x00, 0x60, 0x00, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z0.d, z1.d }, pn8/z, [x0, x0, lsl #3]"

  -
    input:
      bytes: [ 0x54, 0x75, 0x15, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z20.d, z21.d }, pn13/z, [x10, x21, lsl #3]"

  -
    input:
      bytes: [ 0xb6, 0x6d, 0x08, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z22.d, z23.d }, pn11/z, [x13, x8, lsl #3]"

  -
    input:
      bytes: [ 0xfe, 0x7f, 0x1f, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z30.d, z31.d }, pn15/z, [sp, xzr, lsl #3]"

  -
    input:
      bytes: [ 0x00, 0x60, 0x40, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z0.d, z1.d }, pn8/z, [x0]"

  -
    input:
      bytes: [ 0x54, 0x75, 0x45, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z20.d, z21.d }, pn13/z, [x10, #10, mul vl]"

  -
    input:
      bytes: [ 0xb6, 0x6d, 0x48, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z22.d, z23.d }, pn11/z, [x13, #-16, mul vl]"

  -
    input:
      bytes: [ 0xfe, 0x7f, 0x4f, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z30.d, z31.d }, pn15/z, [sp, #-2, mul vl]"

  -
    input:
      bytes: [ 0x00, 0xe0, 0x00, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z0.d - z3.d }, pn8/z, [x0, x0, lsl #3]"

  -
    input:
      bytes: [ 0x54, 0xf5, 0x15, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z20.d - z23.d }, pn13/z, [x10, x21, lsl #3]"

  -
    input:
      bytes: [ 0xb4, 0xed, 0x08, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z20.d - z23.d }, pn11/z, [x13, x8, lsl #3]"

  -
    input:
      bytes: [ 0xfc, 0xff, 0x1f, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z28.d - z31.d }, pn15/z, [sp, xzr, lsl #3]"

  -
    input:
      bytes: [ 0x00, 0xe0, 0x40, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z0.d - z3.d }, pn8/z, [x0]"

  -
    input:
      bytes: [ 0x54, 0xf5, 0x45, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z20.d - z23.d }, pn13/z, [x10, #20, mul vl]"

  -
    input:
      bytes: [ 0xb4, 0xed, 0x48, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z20.d - z23.d }, pn11/z, [x13, #-32, mul vl]"

  -
    input:
      bytes: [ 0xfc, 0xff, 0x4f, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z28.d - z31.d }, pn15/z, [sp, #-4, mul vl]"

  -
    input:
      bytes: [ 0x00, 0x60, 0x00, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z0.d, z1.d }, pn8/z, [x0, x0, lsl #3]"

  -
    input:
      bytes: [ 0x54, 0x75, 0x15, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z20.d, z21.d }, pn13/z, [x10, x21, lsl #3]"

  -
    input:
      bytes: [ 0xb6, 0x6d, 0x08, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z22.d, z23.d }, pn11/z, [x13, x8, lsl #3]"

  -
    input:
      bytes: [ 0xfe, 0x7f, 0x1f, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z30.d, z31.d }, pn15/z, [sp, xzr, lsl #3]"

  -
    input:
      bytes: [ 0x00, 0x60, 0x40, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z0.d, z1.d }, pn8/z, [x0]"

  -
    input:
      bytes: [ 0x54, 0x75, 0x45, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z20.d, z21.d }, pn13/z, [x10, #10, mul vl]"

  -
    input:
      bytes: [ 0xb6, 0x6d, 0x48, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z22.d, z23.d }, pn11/z, [x13, #-16, mul vl]"

  -
    input:
      bytes: [ 0xfe, 0x7f, 0x4f, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z30.d, z31.d }, pn15/z, [sp, #-2, mul vl]"

  -
    input:
      bytes: [ 0x00, 0xe0, 0x00, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z0.d - z3.d }, pn8/z, [x0, x0, lsl #3]"

  -
    input:
      bytes: [ 0x54, 0xf5, 0x15, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z20.d - z23.d }, pn13/z, [x10, x21, lsl #3]"

  -
    input:
      bytes: [ 0xb4, 0xed, 0x08, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z20.d - z23.d }, pn11/z, [x13, x8, lsl #3]"

  -
    input:
      bytes: [ 0xfc, 0xff, 0x1f, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z28.d - z31.d }, pn15/z, [sp, xzr, lsl #3]"

  -
    input:
      bytes: [ 0x00, 0xe0, 0x40, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z0.d - z3.d }, pn8/z, [x0]"

  -
    input:
      bytes: [ 0x54, 0xf5, 0x45, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z20.d - z23.d }, pn13/z, [x10, #20, mul vl]"

  -
    input:
      bytes: [ 0xb4, 0xed, 0x48, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z20.d - z23.d }, pn11/z, [x13, #-32, mul vl]"

  -
    input:
      bytes: [ 0xfc, 0xff, 0x4f, 0xa0 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve2p1" ]
    expected:
      insns:
        -
          asm_text: "ld1d { z28.d - z31.d }, pn15/z, [sp, #-4, mul vl]"
