# C6.2.1 ADC page C6-527 line 31058 MATCH x1a000000/mask=x7fe0fc00
# C6.2.2 ADCS page C6-528 line 31122 MATCH x3a000000/mask=x7fe0fc00
# CONSTRUCT x1a000000/mask=xdfe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x1a000000/mask=xdfe0fc00 --status pass --comment "flags"

:adc^SBIT_CZNO Rd_GPR32, Rn_GPR32, Rm_GPR32
is sf=0 & b_30=0 & S & SBIT_CZNO & b_2428=0x1a & b_2123=0 & Rm_GPR32 & b_1015=0 & Rd_GPR32 & Rd_GPR64 & Rn_GPR32
{
	tmp:4 = Rm_GPR32 + zext(CY);
	addflags(Rn_GPR32, tmp);
	tmp = Rn_GPR32 + tmp;
	Rd_GPR64 = zext(tmp);
	resultflags(tmp);
	build SBIT_CZNO;
}

# C6.2.1 ADC page C6-527 line 31058 MATCH x1a000000/mask=x7fe0fc00
# C6.2.2 ADCS page C6-528 line 31122 MATCH x3a000000/mask=x7fe0fc00
# CONSTRUCT x9a000000/mask=xdfe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x9a000000/mask=xdfe0fc00 --status pass --comment "flags"

:adc^SBIT_CZNO Rd_GPR64, Rn_GPR64, Rm_GPR64
is sf=1 & b_30=0 & S & SBIT_CZNO & b_2428=0x1a & b_2123=0 & Rm_GPR64 & b_1015=0 & Rd_GPR64 & Rn_GPR64
{
	tmp:8 = Rm_GPR64 + zext(CY);
	addflags(Rn_GPR64, tmp);
	Rd_GPR64 = Rn_GPR64 + tmp;
	resultflags(Rd_GPR64);
	build SBIT_CZNO;
}

# C6.2.3 ADD (extended register) page C6-529 line 31190 MATCH x0b200000/mask=x7fe00000
# C6.2.6 ADDS (extended register) page C6-535 line 31503 MATCH x2b200000/mask=x7fe00000
# C6.2.52 CMN (extended register) page C6-600 line 35193 MATCH x2b20001f/mask=x7fe0001f
# CONSTRUCT x0b200000/mask=xdfe00000 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x0b200000/mask=xdfe00000 --status pass --comment "flags"

:add^SBIT_CZNO Rd_GPR32wsp, Rn_GPR32wsp, ExtendRegShift32
is sf=0 & op=0 & S & SBIT_CZNO & b_2428=0xb & opt=0 & b_2121=1 & ExtendRegShift32 & Rn_GPR32wsp & Rd_GPR32wsp & Rd_GPR64xsp
{
	tmp_2:4 = ExtendRegShift32;
	addflags(Rn_GPR32wsp, tmp_2);
	tmp_1:4 = Rn_GPR32wsp + tmp_2;
	resultflags(tmp_1);
	Rd_GPR64xsp = zext(tmp_1);
	build SBIT_CZNO;
}

# C6.2.3 ADD (extended register) page C6-529 line 31190 MATCH x0b200000/mask=x7fe00000
# C6.2.6 ADDS (extended register) page C6-535 line 31503 MATCH x2b200000/mask=x7fe00000
# C6.2.52 CMN (extended register) page C6-600 line 35193 MATCH x2b20001f/mask=x7fe0001f
# CONSTRUCT x8b200000/mask=xdfe00000 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x8b200000/mask=xdfe00000 --status pass --comment "flags"

:add^SBIT_CZNO Rd_GPR64xsp, Rn_GPR64xsp, ExtendRegShift64
is sf=1 & op=0 & S & SBIT_CZNO & b_2428=0xb & opt=0 & b_2121=1 & ExtendRegShift64 & Rn_GPR64xsp & Rd_GPR64xsp
{
	tmp_2:8 = ExtendRegShift64;
	addflags(Rn_GPR64xsp, tmp_2);
	tmp_1:8 = Rn_GPR64xsp + tmp_2;
	resultflags(tmp_1);
	Rd_GPR64xsp = tmp_1;
	build SBIT_CZNO;
}

# C6.2.4 ADD (immediate) page C6-531 line 31314 MATCH x11000000/mask=x7f000000
# C6.2.7 ADDS (immediate) page C6-537 line 31633 MATCH x31000000/mask=x7f000000
# C6.2.53 CMN (immediate) page C6-602 line 35308 MATCH x3100001f/mask=x7f00001f
# C6.2.165 MOV (to/from SP) page C6-792 line 46299 MATCH x11000000/mask=x7ffffc00
# CONSTRUCT x11000000/mask=xdf000000 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst x11000000/mask=xdf000000 --status pass --comment "flags"

:add^SBIT_CZNO Rd_GPR32xsp, Rn_GPR32xsp, ImmShift32
is sf=0 & b_30=0 & S & SBIT_CZNO & b_2428=0x011 & ImmShift32 & Rn_GPR32xsp & Rd_GPR32xsp & Rd_GPR64xsp
{
	addflags(Rn_GPR32xsp, ImmShift32);
	tmp:4 = Rn_GPR32xsp + ImmShift32;
	resultflags(tmp);
	build SBIT_CZNO;
	Rd_GPR64xsp = zext(tmp);
}

# C6.2.4 ADD (immediate) page C6-531 line 31314 MATCH x11000000/mask=x7f000000
# C6.2.7 ADDS (immediate) page C6-537 line 31633 MATCH x31000000/mask=x7f000000
# C6.2.53 CMN (immediate) page C6-602 line 35308 MATCH x3100001f/mask=x7f00001f
# C6.2.165 MOV (to/from SP) page C6-792 line 46299 MATCH x11000000/mask=x7ffffc00
# CONSTRUCT x91000000/mask=xdf000000 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst x91000000/mask=xdf000000 --status pass --comment "flags"

:add^SBIT_CZNO Rd_GPR64xsp, Rn_GPR64xsp, ImmShift64
is sf=1 & b_30=0 & S & SBIT_CZNO & b_2428=0x11 & ImmShift64 & Rn_GPR64xsp & Rd_GPR64xsp
{
	addflags(Rn_GPR64xsp, ImmShift64);
	Rd_GPR64xsp = Rn_GPR64xsp + ImmShift64;
	resultflags(Rd_GPR64xsp);
	build SBIT_CZNO;
}

# C6.2.4 ADD (immediate) page C6-531 line 31314 MATCH x11000000/mask=x7f000000
# C6.2.7 ADDS (immediate) page C6-537 line 31633 MATCH x31000000/mask=x7f000000
# C6.2.53 CMN (immediate) page C6-602 line 35308 MATCH x3100001f/mask=x7f00001f
# C6.2.165 MOV (to/from SP) page C6-792 line 46299 MATCH x11000000/mask=x7ffffc00
# CONSTRUCT x11000000/mask=xdfc00000 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst x11000000/mask=xdfc00000 --status pass --comment "flags"

:add^SBIT_CZNO Rd_GPR32wsp, Rn_GPR32wsp, Imm12_addsubimm_operand_i32_posimm_lsl0
is sf=0 & op=0 & S & SBIT_CZNO & b_2428=0x11 & shift=0 & Imm12_addsubimm_operand_i32_posimm_lsl0 & Rn_GPR32wsp & Rd_GPR32wsp & Rd_GPR64xsp
{
	tmp_2:4 = Imm12_addsubimm_operand_i32_posimm_lsl0;
	addflags(Rn_GPR32wsp, tmp_2);
	tmp_1:4 = Rn_GPR32wsp + tmp_2;
	resultflags(tmp_1);
	Rd_GPR64xsp = zext(tmp_1);
	build SBIT_CZNO;
}

# C6.2.4 ADD (immediate) page C6-531 line 31314 MATCH x11000000/mask=x7f000000
# C6.2.7 ADDS (immediate) page C6-537 line 31633 MATCH x31000000/mask=x7f000000
# C6.2.53 CMN (immediate) page C6-602 line 35308 MATCH x3100001f/mask=x7f00001f
# CONSTRUCT x11400000/mask=xdfc00000 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x11400000/mask=xdfc00000 --status pass --comment "flags"

:add^SBIT_CZNO Rd_GPR32wsp, Rn_GPR32wsp, Imm12_addsubimm_operand_i32_posimm_lsl12
is sf=0 & op=0 & S & SBIT_CZNO & b_2428=0x11 & shift=1 & Imm12_addsubimm_operand_i32_posimm_lsl12 & Rn_GPR32wsp & Rd_GPR32wsp & Rd_GPR64xsp
{
	tmp_2:4 = Imm12_addsubimm_operand_i32_posimm_lsl12;
	addflags(Rn_GPR32wsp, tmp_2);
	tmp_1:4 = Rn_GPR32wsp + tmp_2;
	resultflags(tmp_1);
	Rd_GPR64xsp = zext(tmp_1);
	build SBIT_CZNO;
}

# C6.2.4 ADD (immediate) page C6-531 line 31314 MATCH x11000000/mask=x7f000000
# C6.2.7 ADDS (immediate) page C6-537 line 31633 MATCH x31000000/mask=x7f000000
# C6.2.53 CMN (immediate) page C6-602 line 35308 MATCH x3100001f/mask=x7f00001f
# C6.2.165 MOV (to/from SP) page C6-792 line 46299 MATCH x11000000/mask=x7ffffc00
# CONSTRUCT x91000000/mask=xdfc00000 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst x91000000/mask=xdfc00000 --status pass --comment "flags"

:add^SBIT_CZNO Rd_GPR64xsp, Rn_GPR64xsp, Imm12_addsubimm_operand_i64_posimm_lsl0
is sf=1 & op=0 & S & SBIT_CZNO & b_2428=0x11 & shift=0 & Imm12_addsubimm_operand_i64_posimm_lsl0 & Rn_GPR64xsp & Rd_GPR64xsp
{
	tmp_2:8 = Imm12_addsubimm_operand_i64_posimm_lsl0;
	addflags(Rn_GPR64xsp, tmp_2);
	tmp_1:8 = Rn_GPR64xsp + tmp_2;
	resultflags(tmp_1);
	Rd_GPR64xsp = tmp_1;
	build SBIT_CZNO;
}

# C6.2.4 ADD (immediate) page C6-531 line 31314 MATCH x11000000/mask=x7f000000
# C6.2.7 ADDS (immediate) page C6-537 line 31633 MATCH x31000000/mask=x7f000000
# C6.2.53 CMN (immediate) page C6-602 line 35308 MATCH x3100001f/mask=x7f00001f
# CONSTRUCT x91400000/mask=xdfc00000 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x91400000/mask=xdfc00000 --status pass --comment "flags"

:add^SBIT_CZNO Rd_GPR64xsp, Rn_GPR64xsp, Imm12_addsubimm_operand_i64_posimm_lsl12
is sf=1 & op=0 & S & SBIT_CZNO & b_2428=0x11 & shift=1 & Imm12_addsubimm_operand_i64_posimm_lsl12 & Rn_GPR64xsp & Rd_GPR64xsp
{
	tmp_2:8 = Imm12_addsubimm_operand_i64_posimm_lsl12;
	addflags(Rn_GPR64xsp, tmp_2);
	tmp_1:8 = Rn_GPR64xsp + tmp_2;
	resultflags(tmp_1);
	Rd_GPR64xsp = tmp_1;
	build SBIT_CZNO;
}

# C6.2.5 ADD (shifted register) page C6-533 line 31413 MATCH x0b000000/mask=x7f200000
# C6.2.8 ADDS (shifted register) page C6-539 line 31729 MATCH x2b000000/mask=x7f200000
# C6.2.54 CMN (shifted register) page C6-603 line 35378 MATCH x2b00001f/mask=x7f20001f
# CONSTRUCT x0b000000/mask=xdf208000 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x0b000000/mask=xdf208000 --status pass --comment "flags"
# if shift == '11' then ReservedValue();

:add^SBIT_CZNO Rd_GPR32, Rn_GPR32, RegShift32
is sf=0 & op=0 & S & SBIT_CZNO & b_2428=0xb & b_2121=0 & b_15=0 & RegShift32 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp_2:4 = RegShift32;
	addflags(Rn_GPR32, tmp_2);
	tmp_1:4 = Rn_GPR32 + tmp_2;
	resultflags(tmp_1);
	Rd_GPR64 = zext(tmp_1);
	build SBIT_CZNO;
}

# C6.2.5 ADD (shifted register) page C6-533 line 31413 MATCH x0b000000/mask=x7f200000
# C6.2.8 ADDS (shifted register) page C6-539 line 31729 MATCH x2b000000/mask=x7f200000
# C6.2.54 CMN (shifted register) page C6-603 line 35378 MATCH x2b00001f/mask=x7f20001f
# CONSTRUCT x8b000000/mask=xdf200000 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x8b000000/mask=xdf200000 --status pass --comment "flags"

:add^SBIT_CZNO Rd_GPR64, Rn_GPR64, RegShift64
is sf=1 & op=0 & S & SBIT_CZNO & b_2428=0xb & b_2121=0 & RegShift64 & Rn_GPR64 & Rd_GPR64
{
	tmp_2:8 = RegShift64;
	addflags(Rn_GPR64, tmp_2);
	tmp_1:8 = Rn_GPR64 + tmp_2;
	resultflags(tmp_1);
	Rd_GPR64 = tmp_1;
	build SBIT_CZNO;
}

# C6.2.9 ADR page C6-541 line 31836 MATCH x10000000/mask=x9f000000
# CONSTRUCT x10000000/mask=x9f000000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x10000000/mask=x9f000000 --status nodest --comment "qemuerr(illegal addresses cause qemu exit)"

:adr Rd_GPR64, AdrReloff
is b_31=0 & AdrReloff & b_2428=0x10 & Rd_GPR64
{
	Rd_GPR64 = &AdrReloff;
}

# C6.2.10 ADRP page C6-542 line 31882 MATCH x90000000/mask=x9f000000
# CONSTRUCT x90000000/mask=x9f000000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x90000000/mask=x9f000000 --status nodest --comment "qemuerr(illegal addresses cause qemu exit)"

:adrp Rd_GPR64, AdrReloff
is b_31=1 & AdrReloff & b_2428=0x10 & Rd_GPR64
{
	Rd_GPR64 = &AdrReloff;
}

# C6.2.11 AND (immediate) page C6-543 line 31930 MATCH x12000000/mask=x7f800000
# CONSTRUCT x12000000/mask=xff800000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x12000000/mask=xff800000 --status pass

:and Rd_GPR32wsp, Rn_GPR32, DecodeWMask32
is sf=0 & opc=0 & b_2428=0x12 & b_2323=0 & DecodeWMask32 & Rn_GPR32 & Rd_GPR32wsp & Rd_GPR64xsp
{
	tmp_1:4 = Rn_GPR32 & DecodeWMask32;
	Rd_GPR64xsp = zext(tmp_1);
}

# C6.2.11 AND (immediate) page C6-543 line 31930 MATCH x12000000/mask=x7f800000
# CONSTRUCT x92000000/mask=xff800000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x92000000/mask=xff800000 --status pass

:and Rd_GPR64xsp, Rn_GPR64, DecodeWMask64
is sf=1 & opc=0 & b_2428=0x12 & b_2323=0 & DecodeWMask64 & Rn_GPR64 & Rd_GPR64xsp
{
	tmp_1:8 = Rn_GPR64 & DecodeWMask64;
	Rd_GPR64xsp = tmp_1;
}

# C6.2.12 AND (shifted register) page C6-544 line 31999 MATCH x0a000000/mask=x7f200000
# CONSTRUCT x0a000000/mask=xff200000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x0a000000/mask=xff200000 --status pass

:and Rd_GPR32, Rn_GPR32, RegShift32Log
is sf=0 & opc=0 & b_2428=0xa & N=0 & RegShift32Log & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp_2:4 = RegShift32Log;
	tmp_1:4 = Rn_GPR32 & tmp_2;
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.12 AND (shifted register) page C6-544 line 31999 MATCH x0a000000/mask=x7f200000
# CONSTRUCT x8a000000/mask=xff200000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x8a000000/mask=xff200000 --status pass

:and Rd_GPR64, Rn_GPR64, RegShift64Log
is sf=1 & opc=0 & b_2428=0xa & N=0 & RegShift64Log & Rn_GPR64 & Rd_GPR64
{
	tmp_2:8 = RegShift64Log;
	tmp_1:8 = Rn_GPR64 & tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.13 ANDS (immediate) page C6-546 line 32087 MATCH x72000000/mask=x7f800000
# C6.2.291 TST (immediate) page C6-985 line 57120 MATCH x7200001f/mask=x7f80001f
# CONSTRUCT x72000000/mask=xff800000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x72000000/mask=xff800000 --status pass --comment "flags"

:ands Rd_GPR32, Rn_GPR32, DecodeWMask32
is sf=0 & opc=3 & b_2428=0x12 & b_2323=0 & DecodeWMask32 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp_1:4 = Rn_GPR32 & DecodeWMask32;
	resultflags(tmp_1);
	Rd_GPR64 = zext(tmp_1);
	affectLflags();
}

# C6.2.13 ANDS (immediate) page C6-546 line 32087 MATCH x72000000/mask=x7f800000
# C6.2.291 TST (immediate) page C6-985 line 57120 MATCH x7200001f/mask=x7f80001f
# CONSTRUCT xf2000000/mask=xff800000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xf2000000/mask=xff800000 --status pass --comment "flags"

:ands Rd_GPR64, Rn_GPR64, DecodeWMask64
is sf=1 & opc=3 & b_2428=0x12 & b_2323=0 & DecodeWMask64 & Rn_GPR64 & Rd_GPR64
{
	tmp_1:8 = Rn_GPR64 & DecodeWMask64;
	resultflags(tmp_1);
	Rd_GPR64 = tmp_1;
	affectLflags();
}

# C6.2.14 ANDS (shifted register) page C6-548 line 32175 MATCH x6a000000/mask=x7f200000
# C6.2.292 TST (shifted register) page C6-986 line 57184 MATCH x6a00001f/mask=x7f20001f
# CONSTRUCT x6a000000/mask=xff200000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x6a000000/mask=xff200000 --status pass --comment "flags"

:ands Rd_GPR32, Rn_GPR32, RegShift32Log
is sf=0 & opc=3 & b_2428=0xa & N=0 & RegShift32Log & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp_2:4 = RegShift32Log;
	tmp_1:4 = Rn_GPR32 & tmp_2;
	resultflags(tmp_1);
	Rd_GPR64 = zext(tmp_1);
	affectLflags();
}

# C6.2.14 ANDS (shifted register) page C6-548 line 32175 MATCH x6a000000/mask=x7f200000
# C6.2.292 TST (shifted register) page C6-986 line 57184 MATCH x6a00001f/mask=x7f20001f
# CONSTRUCT xea000000/mask=xff200000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xea000000/mask=xff200000 --status pass --comment "flags"

:ands Rd_GPR64, Rn_GPR64, RegShift64Log
is sf=1 & opc=3 & b_2428=0xa & N=0 & RegShift64Log & Rn_GPR64 & Rd_GPR64
{
	tmp_2:8 = RegShift64Log;
	tmp_1:8 = Rn_GPR64 & tmp_2;
	resultflags(tmp_1);
	Rd_GPR64 = tmp_1;
	affectLflags();
}

# C6.2.15 ASR (register) page C6-550 line 32277 MATCH x1ac02800/mask=x7fe0fc00
# C6.2.17 ASRV page C6-552 line 32419 MATCH x1ac02800/mask=x7fe0fc00
# CONSTRUCT x1ac02800/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x1ac02800/mask=xffe0fc00 --status pass

:asr Rd_GPR32, Rn_GPR32, Rm_GPR32
is sf=0 & b_3030=0 & S=0 & b_2428=0x1a & b_2123=6 & Rm_GPR32 & b_1015=0xa & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp_2:4 = Rm_GPR32 & 0x1f;
	tmp_1:4 = Rn_GPR32 s>> tmp_2;
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.15 ASR (register) page C6-550 line 32277 MATCH x1ac02800/mask=x7fe0fc00
# C6.2.17 ASRV page C6-552 line 32419 MATCH x1ac02800/mask=x7fe0fc00
# CONSTRUCT x9ac02800/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x9ac02800/mask=xffe0fc00 --status pass

:asr Rd_GPR64, Rn_GPR64, Rm_GPR64
is sf=1 & b_3030=0 & S=0 & b_2428=0x1a & b_2123=6 & Rm_GPR64 & b_1015=0xa & Rn_GPR64 & Rd_GPR64
{
	tmp_2:8 = Rm_GPR64 & 0x3f;
	tmp_1:8 = Rn_GPR64 s>> tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.16 ASR (immediate) page C6-551 line 32350 MATCH x13007c00/mask=x7f807c00
# C6.2.209 SBFIZ page C6-856 line 49751 MATCH x13000000/mask=x7f800000
# C6.2.210 SBFM page C6-857 line 49823 MATCH x13000000/mask=x7f800000
# C6.2.211 SBFX page C6-859 line 49939 MATCH x13000000/mask=x7f800000
# CONSTRUCT x13007c00/mask=xffe0fc02 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst x13007c00/mask=xffe0fc02 --status pass
# Alias for sbfm when imms == '011111'
# imms is MAX_INT5, so it will never be less than immr. Note that immr is limited to [0,31]
# Ha! Two explicit cases passes -l
# if sf == '0' && (N != '0' || immr<5> != '0' || imms<5> != '0') then ReservedValue();

:asr Rd_GPR32, Rn_GPR32, ImmRConst32
is ImmS=0x1f & ImmS_LT_ImmR=0 & (ImmS_EQ_ImmR=0 | ImmS_EQ_ImmR=1) & sf=0 & opc=0 & b_2428=0x13 & b_2323=0 & n=0 & b_21=0 & b_15=0 & ImmRConst32 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp_2:4 = ImmRConst32;
	tmp_1:4 = Rn_GPR32 s>> tmp_2;
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.16 ASR (immediate) page C6-551 line 32350 MATCH x13007c00/mask=x7f807c00
# C6.2.209 SBFIZ page C6-856 line 49751 MATCH x13000000/mask=x7f800000
# C6.2.210 SBFM page C6-857 line 49823 MATCH x13000000/mask=x7f800000
# C6.2.211 SBFX page C6-859 line 49939 MATCH x13000000/mask=x7f800000
# CONSTRUCT x9340fc00/mask=xffc0fc02 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst x9340fc00/mask=xffc0fc02 --status pass
# Alias for sbfm when imms == '111111'
# imms is MAX_INT6, so it will never be less than immr (6-bit field)
# Ha! Two explicit cases passes -l

:asr Rd_GPR64, Rn_GPR64, ImmRConst64
is ImmS=0x3f & ImmS_LT_ImmR=0 & (ImmS_EQ_ImmR=0 | ImmS_EQ_ImmR=1) & sf=1 & opc=0 & b_2428=0x13 & b_2323=0 & n=1 & ImmRConst64 & Rn_GPR64 & Rd_GPR64
{
	tmp_2:8 = ImmRConst64;
	tmp_1:8 = Rn_GPR64 s>> tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.18 AT page C6-553 line 32488 MATCH xd5087800/mask=xfff8fe00
# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5087800/mask=xffffffe0 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xd5087800/mask=xffffffe0 --status noqemu

:at "S1E1R", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b0111 & b_0811=0b1000 & b_0507=0b000 & Rt_GPR64
{ par_el1 = AT_S1E1R(Rt_GPR64); }

# C6.2.18 AT page C6-553 line 32488 MATCH xd5087800/mask=xfff8fe00
# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c7800/mask=xffffffe0 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xd50c7800/mask=xffffffe0 --status noqemu

:at "S1E2R", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b0111 & b_0811=0b1000 & b_0507=0b000 & Rt_GPR64
{ par_el1 = AT_S1E2R(Rt_GPR64); }

# C6.2.18 AT page C6-553 line 32488 MATCH xd5087800/mask=xfff8fe00
# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50e7800/mask=xffffffe0 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xd50e7800/mask=xffffffe0 --status noqemu

:at "S1E3R", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b110 & b_1215=0b0111 & b_0811=0b1000 & b_0507=0b000 & Rt_GPR64
{ par_el1 = AT_S1E3R(Rt_GPR64); }

# C6.2.18 AT page C6-553 line 32488 MATCH xd5087800/mask=xfff8fe00
# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5087820/mask=xffffffe0 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xd5087820/mask=xffffffe0 --status noqemu

:at "S1E1W", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b0111 & b_0811=0b1000 & b_0507=0b001 & Rt_GPR64
{ par_el1 = AT_S1E1W(Rt_GPR64); }

# C6.2.18 AT page C6-553 line 32488 MATCH xd5087800/mask=xfff8fe00
# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c7820/mask=xffffffe0 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xd50c7820/mask=xffffffe0 --status noqemu

:at "S1E2W", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b0111 & b_0811=0b1000 & b_0507=0b001 & Rt_GPR64
{ par_el1 = AT_S1E2W(Rt_GPR64); }

# C6.2.18 AT page C6-553 line 32488 MATCH xd5087800/mask=xfff8fe00
# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50e7820/mask=xffffffe0 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xd50e7820/mask=xffffffe0 --status noqemu

:at "S1E3W", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b110 & b_1215=0b0111 & b_0811=0b1000 & b_0507=0b001 & Rt_GPR64
{ par_el1 = AT_S1E3W(Rt_GPR64); }

# C6.2.18 AT page C6-553 line 32488 MATCH xd5087800/mask=xfff8fe00
# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5087840/mask=xffffffe0 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xd5087840/mask=xffffffe0 --status noqemu

:at "S1E0R", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b0111 & b_0811=0b1000 & b_0507=0b010 & Rt_GPR64
{ par_el1 = AT_S1E0R(Rt_GPR64); }

# C6.2.18 AT page C6-553 line 32488 MATCH xd5087800/mask=xfff8fe00
# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5087860/mask=xffffffe0 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xd5087860/mask=xffffffe0 --status noqemu

:at "S1E0W", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b0111 & b_0811=0b1000 & b_0507=0b011 & Rt_GPR64
{ par_el1 = AT_S1E0W(Rt_GPR64); }

# C6.2.18 AT page C6-553 line 32488 MATCH xd5087800/mask=xfff8fe00
# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c7880/mask=xffffffe0 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xd50c7880/mask=xffffffe0 --status noqemu

:at "S12E1R", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b0111 & b_0811=0b1000 & b_0507=0b100 & Rt_GPR64
{ par_el1 = AT_S12E1R(Rt_GPR64); }

# C6.2.18 AT page C6-553 line 32488 MATCH xd5087800/mask=xfff8fe00
# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c78a0/mask=xffffffe0 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xd50c78a0/mask=xffffffe0 --status noqemu

:at "S12E1W", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b0111 & b_0811=0b1000 & b_0507=0b101 & Rt_GPR64
{ par_el1 = AT_S12E1W(Rt_GPR64); }

# C6.2.18 AT page C6-553 line 32488 MATCH xd5087800/mask=xfff8fe00
# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c78c0/mask=xffffffe0 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xd50c78c0/mask=xffffffe0 --status noqemu

:at "S12E0R", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b0111 & b_0811=0b1000 & b_0507=0b110 & Rt_GPR64
{ par_el1 = AT_S12E0R(Rt_GPR64); }

# C6.2.18 AT page C6-553 line 32488 MATCH xd5087800/mask=xfff8fe00
# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c78e0/mask=xffffffe0 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xd50c78e0/mask=xffffffe0 --status noqemu

:at "S12E0W", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b0111 & b_0811=0b1000 & b_0507=0b111 & Rt_GPR64
{ par_el1 = AT_S12E0W(Rt_GPR64); }

# C6.2.18 AT page C6-553 line 32488 MATCH xd5087800/mask=xfff8fe00
# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5087900/mask=xffffffe0 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xd5087900/mask=xffffffe0 --status noqemu

:at "S1E1RP", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b0111 & b_0811=0b1001 & b_0507=0b000 & Rt_GPR64
{ par_el1 = AT_S1E1RP(Rt_GPR64); }

# C6.2.18 AT page C6-553 line 32488 MATCH xd5087800/mask=xfff8fe00
# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5087920/mask=xffffffe0 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xd5087920/mask=xffffffe0 --status noqemu

:at "S1E1WP", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b0111 & b_0811=0b1001 & b_0507=0b001 & Rt_GPR64
{ par_el1 = AT_S1E1WP(Rt_GPR64); }

# C6.2.19 AUTDA, AUTDZA page C6-555 line 32567 MATCH xdac11800/mask=xffffdc00
# CONSTRUCT xdac11800/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac11800/mask=xfffffc00 --status noqemu

:autda Rd_GPR64, Rn_GPR64xsp
is b_1431=0b110110101100000100 & b_1012=0b110 & b_13=0 & Rn_GPR64xsp & Rd_GPR64
{
	Rd_GPR64 = AuthDA(Rd_GPR64, Rn_GPR64xsp);
}

# C6.2.19 AUTDA, AUTDZA page C6-555 line 32567 MATCH xdac11800/mask=xffffdc00
# CONSTRUCT xdac13be0/mask=xffffffe0 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac13be0/mask=xffffffe0 --status noqemu

:autdza Rd_GPR64
is b_1431=0b110110101100000100 & b_1012=0b110 & b_13=1 & b_0509=0b11111 & Rd_GPR64
{
	Rd_GPR64 = AuthDA(Rd_GPR64, xzr);
}

# C6.2.20 AUTDB, AUTDZB page C6-556 line 32641 MATCH xdac11c00/mask=xffffdc00
# CONSTRUCT xdac11c00/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac11c00/mask=xfffffc00 --status noqemu

:autdb Rd_GPR64, Rn_GPR64xsp
is b_1431=0b110110101100000100 & b_1012=0b111 & b_13=0 & Rn_GPR64xsp & Rd_GPR64
{
	Rd_GPR64 = AuthDB(Rd_GPR64, Rn_GPR64xsp);
}

# C6.2.20 AUTDB, AUTDZB page C6-556 line 32641 MATCH xdac11c00/mask=xffffdc00
# CONSTRUCT xdac13fe0/mask=xffffffe0 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac13fe0/mask=xffffffe0 --status noqemu

:autdzb Rd_GPR64
is b_1431=0b110110101100000100 & b_1012=0b111 & b_13=1 & b_0509=0b11111 & Rd_GPR64
{
	Rd_GPR64 = AuthDB(Rd_GPR64, xzr);
}

# C6.2.21 AUTIA, AUTIA1716, AUTIASP, AUTIAZ, AUTIZA page C6-557 line 32715 MATCH xdac11000/mask=xffffdc00
# CONSTRUCT xdac11000/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac11000/mask=xfffffc00 --status noqemu

:autia Rd_GPR64, Rn_GPR64xsp
is b_1431=0b110110101100000100 & b_1012=0b100 & b_13=0 & Rn_GPR64xsp & Rd_GPR64
{
	Rd_GPR64 = AuthIA(Rd_GPR64, Rn_GPR64xsp);
}

# C6.2.21 AUTIA, AUTIA1716, AUTIASP, AUTIAZ, AUTIZA page C6-557 line 32715 MATCH xdac11000/mask=xffffdc00
# CONSTRUCT xdac133e0/mask=xffffffe0 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac133e0/mask=xffffffe0 --status noqemu

:autiza Rd_GPR64
is b_1431=0b110110101100000100 & b_1012=0b100 & b_13=1 & b_0509=0b11111 & Rd_GPR64
{
	Rd_GPR64 = AuthIA(Rd_GPR64, xzr);
}

# C6.2.21 AUTIA, AUTIA1716, AUTIASP, AUTIAZ, AUTIZA page C6-557 line 32715 MATCH xd503219f/mask=xfffffddf
# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# CONSTRUCT xd503219f/mask=xffffffff MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd503219f/mask=xffffffff --status nodest

:autia1716
is b_1231=0b11010101000000110010 & b_0811=0b0001 & b_0507=0b100 & b_0004=0b11111
{
	x17 = AuthIA(x17, x16);
}

# C6.2.21 AUTIA, AUTIA1716, AUTIASP, AUTIAZ, AUTIZA page C6-557 line 32715 MATCH xd503219f/mask=xfffffddf
# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# CONSTRUCT xd50323bf/mask=xffffffff MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50323bf/mask=xffffffff --status nodest

:autiasp
is b_1231=0b11010101000000110010 & b_0811=0b0011 & b_0507=0b101 & b_0004=0b11111
{
	x30 = AuthIA(x30, sp);
}

# C6.2.21 AUTIA, AUTIA1716, AUTIASP, AUTIAZ, AUTIZA page C6-557 line 32715 MATCH xd503219f/mask=xfffffddf
# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# CONSTRUCT xd503239f/mask=xffffffff MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd503239f/mask=xffffffff --status nodest

:autiaz
is b_1231=0b11010101000000110010 & b_0811=0b0011 & b_0507=0b100 & b_0004=0b11111
{
	x30 = AuthIA(x30, xzr);
}

# C6.2.22 AUTIB, AUTIB1716, AUTIBSP, AUTIBZ, AUTIZB page C6-559 line 32862 MATCH xdac11400/mask=xffffdc00
# CONSTRUCT xdac11400/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac11400/mask=xfffffc00 --status noqemu

:autib Rd_GPR64, Rn_GPR64xsp
is b_1431=0b110110101100000100 & b_1012=0b101 & b_13=0 & Rn_GPR64xsp & Rd_GPR64
{
	Rd_GPR64 = AuthIB(Rd_GPR64, Rn_GPR64xsp);
}

# C6.2.22 AUTIB, AUTIB1716, AUTIBSP, AUTIBZ, AUTIZB page C6-559 line 32862 MATCH xdac11400/mask=xffffdc00
# CONSTRUCT xdac137e0/mask=xffffffe0 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac137e0/mask=xffffffe0 --status noqemu

:autizb Rd_GPR64
is b_1431=0b110110101100000100 & b_1012=0b101 & b_13=1 & b_0509=0b11111 & Rd_GPR64
{
	Rd_GPR64 = AuthIB(Rd_GPR64, xzr);
}

# C6.2.22 AUTIB, AUTIB1716, AUTIBSP, AUTIBZ, AUTIZB page C6-559 line 32862 MATCH xd50321df/mask=xfffffddf
# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# CONSTRUCT xd50321df/mask=xffffffff MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50321df/mask=xffffffff --status nodest

:autib1716
is b_1231=0b11010101000000110010 & b_0811=0b0001 & b_0507=0b110 & b_0004=0b11111
{
	x17 = AuthIB(x17, x16);
}

# C6.2.22 AUTIB, AUTIB1716, AUTIBSP, AUTIBZ, AUTIZB page C6-559 line 32862 MATCH xd50321df/mask=xfffffddf
# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# CONSTRUCT xd50323ff/mask=xffffffff MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50323ff/mask=xffffffff --status nodest

:autibsp
is b_1231=0b11010101000000110010 & b_0811=0b0011 & b_0507=0b111 & b_0004=0b11111
{
	x30 = AuthIB(x30, sp);
}

# C6.2.22 AUTIB, AUTIB1716, AUTIBSP, AUTIBZ, AUTIZB page C6-559 line 32862 MATCH xd50321df/mask=xfffffddf
# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# CONSTRUCT xd50323df/mask=xffffffff MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50323df/mask=xffffffff --status nodest

:autibz
is b_1231=0b11010101000000110010 & b_0811=0b0011 & b_0507=0b110 & b_0004=0b11111
{
	x30 = AuthIB(x30, xzr);
}

# C6.2.23 B.cond page C6-561 line 33008 MATCH x54000000/mask=xff000010
# CONSTRUCT x5400000f/mask=xff00001f MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x5400000f/mask=xff00001f --status nodest --comment "noflags qemuerr(illegal addresses cause qemu exit)"

:b^"."^BranchCondOp Addr19
is b_2531=0x2a & o1=0 & Addr19 & o0=0 & br_cond_op=15 & BranchCondOp
{
	goto Addr19;
}

# C6.2.23 B.cond page C6-561 line 33008 MATCH x54000000/mask=xff000010
# CONSTRUCT x54000000/mask=xff000010 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x54000000/mask=xff000010 --status nodest --comment "flags qemuerr(illegal addresses cause qemu exit)"

:b^"."^BranchCondOp Addr19
is b_2531=0x2a & o1=0 & Addr19 & o0=0 & br_cond_op & BranchCondOp
{
	if (BranchCondOp) goto Addr19;
}

# C6.2.24 B page C6-562 line 33050 MATCH x14000000/mask=xfc000000
# CONSTRUCT x14000000/mask=xfc000000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x14000000/mask=xfc000000 --status nodest --comment "flags qemuerr(illegal addresses cause qemu exit)"

:b Addr26
is b_31=0 & b_2630=0x05 & Addr26
{
	goto Addr26;
}

# C6.2.27 BFM page C6-565 line 33230 MATCH x33000000/mask=x7f800000
# C6.2.25 BFC page C6-563 line 33089 MATCH x330003e0/mask=x7f8003e0
# C6.2.26 BFI page C6-564 line 33158 MATCH x33000000/mask=x7f800000
# C6.2.28 BFXIL page C6-567 line 33333 MATCH x33000000/mask=x7f800000
# CONSTRUCT x33000000/mask=xffe08000 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst x33000000/mask=xffe08000 --status pass
# if sf == '0' && (N != '0' || immr<5> (b_21) != '0' || imms<5> (b_15) != '0') then ReservedValue();

:bfm Rd_GPR32, Rn_GPR32, ImmR_bitfield32_imm, ImmS_bitfield32_imm
is sf=0 & opc=1 & b_2428=0x13 & b_2323=0 & n=0 & b_21=0 & b_15=0 & ImmR_bitfield32_imm & ImmS_bitfield32_imm & ImmRConst32 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64 & DecodeWMask32 & DecodeTMask32
{
	local wmask:4 = DecodeWMask32;
	local tmask:4 = DecodeTMask32;
	local dst:4 = Rd_GPR32;
	local src:4 = Rn_GPR32;
	local bot:4 = (dst & ~(wmask)) | (((src>>ImmRConst32)|(src<<(32-ImmRConst32))) & wmask);
	Rd_GPR64 = zext((dst & ~(tmask)) | (bot & tmask));
}

# C6.2.27 BFM page C6-565 line 33230 MATCH x33000000/mask=x7f800000
# C6.2.25 BFC page C6-563 line 33089 MATCH x330003e0/mask=x7f8003e0
# C6.2.26 BFI page C6-564 line 33158 MATCH x33000000/mask=x7f800000
# C6.2.28 BFXIL page C6-567 line 33333 MATCH x33000000/mask=x7f800000
# CONSTRUCT xb3400002/mask=xffc00002 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xb3400002/mask=xffc00002 --status pass

:bfm Rd_GPR64, Rn_GPR64, ImmR_bitfield64_imm, ImmS_bitfield64_imm
is ImmS_LT_ImmR=1 & sf=1 & opc=1 & b_2428=0x13 & b_2323=0 & n=1 & ImmR_bitfield64_imm & ImmRConst64 & ImmS_bitfield64_imm & Rn_GPR64 & Rd_GPR64 & DecodeWMask64 & DecodeTMask64
{
	local wmask:8 = DecodeWMask64;
	local tmask:8 = DecodeTMask64;
	local dst:8 = Rd_GPR64;
	local src:8 = Rn_GPR64;
	local bot:8 = (dst & ~(wmask)) | (((src>>ImmRConst64)|(src<<(64-ImmRConst64))) & wmask);
	Rd_GPR64 = (dst & ~(tmask)) | (bot & tmask);
}

# C6.2.28 BFXIL page C6-567 line 33333 KEEPWITH

BFextractWidth32: "#"^imm is ImmR & ImmS [ imm = ImmS - ImmR + 1; ] { export *[const]:4 imm; }
BFextractWidth64: "#"^imm is ImmR & ImmS [ imm = ImmS - ImmR + 1; ] { export *[const]:8 imm; }

# C6.2.28 BFXIL page C6-567 line 33333 MATCH x33000000/mask=x7f800000
# C6.2.25 BFC page C6-563 line 33089 MATCH x330003e0/mask=x7f8003e0
# C6.2.26 BFI page C6-564 line 33158 MATCH x33000000/mask=x7f800000
# C6.2.27 BFM page C6-565 line 33230 MATCH x33000000/mask=x7f800000
# CONSTRUCT x33000000/mask=xffe08002 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst x33000000/mask=xffe08002 --status pass

# Alias for bfm where UInt(imms) >= UInt(immr)

:bfxil Rd_GPR32, Rn_GPR32, ImmRConst32, BFextractWidth32
is ImmS_LT_ImmR=0 & sf=0 & opc=1 & b_2428=0x13 & b_2323=0 & n=0 & b_21=0 & b_15=0 & ImmRConst32 & BFextractWidth32 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	dst:4 = Rd_GPR32;
	src:4 = Rn_GPR32;
	mask:4 = (0xffffffff >> (32 - BFextractWidth32));
	tmp:4 = (src >> ImmRConst32) & mask;
	Rd_GPR64 = zext((dst & ~(mask)) | tmp);
}

# C6.2.28 BFXIL page C6-567 line 33333 MATCH x33000000/mask=x7f800000
# C6.2.25 BFC page C6-563 line 33089 MATCH x330003e0/mask=x7f8003e0
# C6.2.26 BFI page C6-564 line 33158 MATCH x33000000/mask=x7f800000
# C6.2.27 BFM page C6-565 line 33230 MATCH x33000000/mask=x7f800000
# CONSTRUCT xb3400000/mask=xffc00002 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xb3400000/mask=xffc00002 --status pass

# Alias for bfm where UInt(imms) >= UInt(immr)

:bfxil Rd_GPR64, Rn_GPR64, ImmRConst64, BFextractWidth64
is ImmS_LT_ImmR=0 & sf=1 & opc=1 & b_2428=0x13 & b_2323=0 & n=1 & ImmRConst64 & BFextractWidth64 & Rn_GPR64 & Rd_GPR64
{
	dst:8 = Rd_GPR64;
	src:8 = Rn_GPR64;
	mask:8 = (0xffffffffffffffff >> (64 - BFextractWidth64));
	tmp:8 = (src >> ImmRConst64) & mask;
	Rd_GPR64 = ((dst & ~(mask)) | tmp);
}

# C6.2.29 BIC (shifted register) page C6-568 line 33405 MATCH x0a200000/mask=x7f200000
# CONSTRUCT x0a200000/mask=xff200000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x0a200000/mask=xff200000 --status pass

:bic Rd_GPR32, Rn_GPR32, RegShift32Log
is sf=0 & opc=0 & b_2428=0xa & N=1 & Rm_GPR32 & RegShift32Log & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp_3:4 = RegShift32Log;
	tmp_2:4 = tmp_3 ^ -1:4;
	tmp_1:4 = Rn_GPR32 & tmp_2;
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.29 BIC (shifted register) page C6-568 line 33405 MATCH x0a200000/mask=x7f200000
# CONSTRUCT x8a200000/mask=xff200000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x8a200000/mask=xff200000 --status pass

:bic Rd_GPR64, Rn_GPR64, RegShift64Log
is sf=1 & opc=0 & b_2428=0xa & N=1 & Rm_GPR64 & RegShift64Log & Rn_GPR64 & Rd_GPR64
{
	tmp_3:8= RegShift64Log;
	tmp_2:8 = tmp_3 ^ -1:8;
	tmp_1:8 = Rn_GPR64 & tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.30 BICS (shifted register) page C6-570 line 33495 MATCH x6a200000/mask=x7f200000
# CONSTRUCT x6a200000/mask=xff200000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x6a200000/mask=xff200000 --status pass --comment "flags"

:bics Rd_GPR32, Rn_GPR32, RegShift32Log
is sf=0 & opc=3 & b_2428=0xa & N=1 & RegShift32Log & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp_3:4 = RegShift32Log;
	tmp_2:4 = tmp_3 ^ -1:4;
	tmp_1:4 = Rn_GPR32 & tmp_2;
	resultflags(tmp_1);
	Rd_GPR64 = zext(tmp_1);
	affectLflags();
}

# C6.2.30 BICS (shifted register) page C6-570 line 33495 MATCH x6a200000/mask=x7f200000
# CONSTRUCT xea200000/mask=xff200000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xea200000/mask=xff200000 --status pass --comment "flags"

:bics Rd_GPR64, Rn_GPR64, RegShift64Log
is sf=1 & opc=3 & b_2428=0xa & N=1 & RegShift64Log & Rn_GPR64 & Rd_GPR64
{
	tmp_3:8= RegShift64Log;
	tmp_2:8 = tmp_3 ^ -1:8;
	tmp_1:8 = Rn_GPR64 & tmp_2;
	resultflags(tmp_1);
	Rd_GPR64 = tmp_1;
	affectLflags();
}

# C6.2.31 BL page C6-572 line 33587 MATCH x94000000/mask=xfc000000
# CONSTRUCT x94000000/mask=xfc000000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x94000000/mask=xfc000000 --status nodest --comment "qemuerr(illegal addresses cause qemu exit)"

:bl Addr26
is b_31=1 & b_2630=0x05 & Addr26
{
	x30 = inst_start + 4;
	call Addr26;
}

# C6.2.32 BLR page C6-573 line 33628 MATCH xd63f0000/mask=xfffffc1f
# CONSTRUCT xd63f0000/mask=xfffffc1f MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd63f0000/mask=xfffffc1f --status nodest --comment "qemuerr(illegal addresses cause qemu exit)"

:blr Rn_GPR64
is b_2531=0x6b & b_2324=0 & b_2122=1 & b_1620=0x1f & b_1015=0 & Rn_GPR64 & b_0004=0
{
	pc = Rn_GPR64;
	x30 = inst_start + 4;
	call [pc];
}

# C6.2.33 BLRAA, BLRAAZ, BLRAB, BLRABZ page C6-574 line 33668 KEEPWITH

# Z == 0 && M == 0 && Rm = 11111 Key A, zero modifier variant

blinkop: "l" is b_2122=0b01 { x30 = inst_start + 4; call [pc]; }
blinkop: "" is b_2122=0b00 { goto[pc]; }

# C6.2.33 BLRAA, BLRAAZ, BLRAB, BLRABZ page C6-574 line 33668 MATCH xd63f0800/mask=xfefff800
# C6.2.35 BRAA, BRAAZ, BRAB, BRABZ page C6-577 line 33811 MATCH xd61f0800/mask=xfefff800
# C6.2.199 RETAA, RETAB page C6-842 line 48993 MATCH xd65f0bff/mask=xfffffbff
# CONSTRUCT xd61f081f/mask=xff9ffc1f MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xd61f081f/mask=xff9ffc1f --status nodest

:b^blinkop^"raaz" Rn_GPR64
is b_2531=0b1101011 & b_24=0 & b_23=0 & blinkop & b_1220=0b111110000 & b_11=1 & b_10=0 & b_0004=0b11111 & Rn_GPR64
{
	AuthIA(Rn_GPR64, xzr);
	pc = Rn_GPR64;
	build blinkop;
}

# C6.2.33 BLRAA, BLRAAZ, BLRAB, BLRABZ page C6-574 line 33668 MATCH xd63f0800/mask=xfefff800
# C6.2.35 BRAA, BRAAZ, BRAB, BRABZ page C6-577 line 33811 MATCH xd61f0800/mask=xfefff800
# CONSTRUCT xd71f0800/mask=xff9ffc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd71f0800/mask=xff9ffc00 --status nodest
# Z == 1 && M == 0 Key A, register modifier variant

:b^blinkop^"raa" Rn_GPR64, Rd_GPR64xsp
is b_2531=0b1101011 & b_24=1 & b_23=0 & blinkop & b_1220=0b111110000 & b_11=1 & b_10=0 & Rd_GPR64xsp & Rn_GPR64
{
	AuthIA(Rn_GPR64, Rd_GPR64xsp);
	pc = Rn_GPR64;
	build blinkop;
}

# C6.2.33 BLRAA, BLRAAZ, BLRAB, BLRABZ page C6-574 line 33668 MATCH xd63f0800/mask=xfefff800
# C6.2.35 BRAA, BRAAZ, BRAB, BRABZ page C6-577 line 33811 MATCH xd61f0800/mask=xfefff800
# C6.2.199 RETAA, RETAB page C6-842 line 48993 MATCH xd65f0bff/mask=xfffffbff
# CONSTRUCT xd61f0c1f/mask=xff9ffc1f MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xd61f0c1f/mask=xff9ffc1f --status nodest
# Z == 0 && M == 1 && Rm = 11111 Key B, zero modifier variant

:b^blinkop^"rabz" Rn_GPR64
is b_2531=0b1101011 & b_24=0 & b_23=0 & blinkop & b_1220=0b111110000 & b_11=1 & b_10=1 & b_0004=0b11111 & Rn_GPR64
{
	AuthIB(Rn_GPR64, xzr);
	pc = Rn_GPR64;
	build blinkop;
}

# C6.2.33 BLRAA, BLRAAZ, BLRAB, BLRABZ page C6-574 line 33668 MATCH xd63f0800/mask=xfefff800
# C6.2.35 BRAA, BRAAZ, BRAB, BRABZ page C6-577 line 33811 MATCH xd61f0800/mask=xfefff800
# CONSTRUCT xd71f0c00/mask=xff9ffc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd71f0c00/mask=xff9ffc00 --status nodest
# Z == 1 && M == 1 Key B, register modifier variant

:b^blinkop^"rab" Rn_GPR64, Rd_GPR64xsp
is b_2531=0b1101011 & b_24=1 & b_23=0 & blinkop & b_1220=0b111110000 & b_11=1 & b_10=1 & Rd_GPR64xsp & Rn_GPR64
{
	AuthIB(Rn_GPR64, Rd_GPR64xsp);
	pc = Rn_GPR64;
	build blinkop;
}

# C6.2.34 BR page C6-576 line 33772 MATCH xd61f0000/mask=xfffffc1f
# CONSTRUCT xd61f0000/mask=xfffffc1f MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd61f0000/mask=xfffffc1f --status nodest

:br Rn_GPR64
is b_2531=0x6b & b_2324=0 & b_2122=0 & b_1620=0x1f & b_1015=0 & Rn_GPR64 & b_0004=0
{
	pc = Rn_GPR64;
	goto [pc];
}

# C6.2.36 BRK page C6-579 line 33913 MATCH xd4200000/mask=xffe0001f
# CONSTRUCT xd4200000/mask=xffe0001f MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd4200000/mask=xffe0001f --status nodest

:brk "#"^imm16
is b_2431=0xd4 & b_2123=1 & imm16 & b_0204=0 & b_0001=0
{
	tmp:2 = imm16;
	preferred_exception_return:8 = inst_next;
	pc = SoftwareBreakpoint(tmp, preferred_exception_return);
	goto [pc];
}

# C6.2.37 CASB, CASAB, CASALB, CASLB page C6-580 line 33952 KEEPWITH

cas_var: "a" is b_22=1 & b_15=0 { }
cas_var: "al" is b_22=1 & b_15=1 { }
cas_var: "" is b_22=0 & b_15=0 { }
cas_var: "l" is b_22=0 & b_15=1 { }

# C6.2.37 CASB, CASAB, CASALB, CASLB page C6-580 line 33952 MATCH x08a07c00/mask=xffa07c00
# CONSTRUCT x08a07c00/mask=xffa07c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x08a07c00/mask=xffa07c00 --status nomem

# CAS{,A,AL,L}B size=0b10 (b_3031)

:cas^cas_var^"b" aa_Ws, aa_Wt, [Rn_GPR64xsp]
is b_3031=0b00 & b_2329=0b0010001 & b_21=1 & b_1014=0b11111 & cas_var & aa_Wt & Rn_GPR64xsp & aa_Ws
{
	comparevalue:1 = aa_Ws:1;
	newvalue:1 = aa_Wt:1;
	data:1 = *:1 Rn_GPR64xsp;
	if (data != comparevalue) goto <skip>;
	*:1 Rn_GPR64xsp = newvalue;
<skip>
	aa_Ws = zext(data);
}

# C6.2.38 CASH, CASAH, CASALH, CASLH page C6-582 line 34075 MATCH x48a07c00/mask=xffa07c00
# CONSTRUCT x48a07c00/mask=xffa07c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x48a07c00/mask=xffa07c00 --status nomem

# CAS{,A,AL,L}H size=0b10 (b_3031)

:cas^cas_var^"h" aa_Ws, aa_Wt, [Rn_GPR64xsp]
is b_3031=0b01 & b_2329=0b0010001 & b_21=1 & b_1014=0b11111 & cas_var & aa_Wt & Rn_GPR64xsp & aa_Ws
{
	comparevalue:2 = aa_Ws:2;
	newvalue:2 = aa_Wt:2;
	data:2 = *:2 Rn_GPR64xsp;
	if (data != comparevalue) goto <skip>;
	*:2 Rn_GPR64xsp = newvalue;
<skip>
	aa_Ws = zext(data);
}

# C6.2.39 CASP, CASPA, CASPAL, CASPL page C6-584 line 34198 MATCH x08207c00/mask=xbfa07c00
# CONSTRUCT x08207c00/mask=xffa17c01 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x08207c00/mask=xffa17c01 --status nomem

# CASP{,A,AL,L} size=0b00 (b_3031)

:casp^cas_var aa_Ws, aa_Wss, aa_Wt, aa_Wtt, [Rn_GPR64xsp]
is b_3031=0b00 & b_2329=0b0010000 & b_21=1 & b_1014=0b11111 & b_16=0 & b_00=0 & cas_var & aa_Ws & aa_Wss & aa_Wt & aa_Wtt & Rn_GPR64xsp
{
@if DATA_ENDIAN == "big"
	comparevalue:8 = (zext(aa_Ws) << 32) | zext(aa_Wss);
	newvalue:8 = (zext(aa_Wt) << 32) | zext(aa_Wtt);
@else
	comparevalue:8 = (zext(aa_Wss) << 32) | zext(aa_Ws);
	newvalue:8 = (zext(aa_Wtt) << 32) | zext(aa_Wt);
@endif
	data:8 = *:8 Rn_GPR64xsp;
	if (data != comparevalue) goto <skip>;
	*:8 Rn_GPR64xsp = newvalue;
<skip>
@if DATA_ENDIAN == "big"
	aa_Ws = data(4);
	aa_Wss = data:4;
@else
	aa_Ws = data:4;
	aa_Wss = data(4);
@endif
}

# C6.2.39 CASP, CASPA, CASPAL, CASPL page C6-584 line 34198 MATCH x08207c00/mask=xbfa07c00
# CONSTRUCT x48207c00/mask=xffa17c01 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x48207c00/mask=xffa17c01 --status nomem

# CASP{,A,AL,L} size=0b01 (b_3031)

:casp^cas_var aa_Xs, aa_Xss, aa_Xt, aa_Xtt, [Rn_GPR64xsp]
is b_3031=0b01 & b_2329=0b0010000 & b_21=1 & b_1014=0b11111 & b_16=0 & b_00=0 & cas_var & aa_Xs & aa_Xss & aa_Xt & aa_Xtt & Rn_GPR64xsp
{
	local tmp_s:8 = aa_Xs;
	local tmp_ss:8 = aa_Xss;
	local tmp_t:8 = aa_Xt;
	local tmp_tt:8 = aa_Xtt;

@if DATA_ENDIAN == "little"
	# for little endian, swap Xss/Xs and Xtt/Xt
	tmp_s = aa_Xss;
	tmp_ss = aa_Xs;
	tmp_t = aa_Xtt;
	tmp_tt = aa_Xt;
@endif

	local tmp_addr:8 = Rn_GPR64xsp;
	local tmp_d:8 = *:8 tmp_addr;
	tmp_addr = tmp_addr + 8;
	local tmp_dd:8 = *:8 tmp_addr;

	if (tmp_d != tmp_s) goto <skip>;
	if (tmp_dd != tmp_ss) goto <skip>;

	tmp_addr = Rn_GPR64xsp;
	*:8 tmp_addr = tmp_t;
	tmp_addr = tmp_addr + 8;
	*:8 tmp_addr = tmp_tt;
<skip>
	aa_Xs = tmp_d;
	aa_Xss = tmp_dd;
}

# C6.2.40 CAS, CASA, CASAL, CASL page C6-587 line 34380 MATCH x88a07c00/mask=xbfa07c00
# CONSTRUCT x88a07c00/mask=xffa07c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x88a07c00/mask=xffa07c00 --status nomem
# CAS{,A,AL,L} size=0b10 (b_3031)

:cas^cas_var aa_Ws, aa_Wt, [Rn_GPR64xsp]
is b_3031=0b10 & b_2329=0b0010001 & b_21=1 & b_1014=0b11111 & cas_var & aa_Wt & Rn_GPR64xsp & aa_Ws
{
	comparevalue:4 = aa_Ws;
	newvalue:4 = aa_Wt;
	data:4 = *:4 Rn_GPR64xsp;
	if (data != comparevalue) goto <skip>;
	*:4 Rn_GPR64xsp = newvalue;
<skip>
	aa_Ws = data;
}

# C6.2.40 CAS, CASA, CASAL, CASL page C6-587 line 34380 MATCH x88a07c00/mask=xbfa07c00
# CONSTRUCT xc8a07c00/mask=xffa07c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xc8a07c00/mask=xffa07c00 --status nomem

# CAS{,A,AL,L} size=0b11 (b_3031)

:cas^cas_var aa_Xs, aa_Xt, [Rn_GPR64xsp]
is b_3031=0b11 & b_2329=0b0010001 & b_21=1 & b_1014=0b11111 & cas_var & aa_Xt & Rn_GPR64xsp & aa_Xs
{
	comparevalue:8 = aa_Xs;
	newvalue:8 = aa_Xt;
	data:8 = *:8 Rn_GPR64xsp;
	if (data != comparevalue) goto <skip>;
	*:8 Rn_GPR64xsp = newvalue;
<skip>
	aa_Xs = data;
}

# C6.2.41 CBNZ page C6-589 line 34530 KEEPWITH

ZeroOp: "z" is cmpr_op=0 { export 1:1; }
ZeroOp: "nz" is cmpr_op=1 { export 0:1; }

BitPos: "#"^bitpos is sf=1 & b_31 & b_1923 & Rt_GPR64 [ bitpos = b_31 << 5 | b_1923; ]
{
	tmp:1 = ((Rt_GPR64 >> bitpos) & 1) == 0;
	export tmp;
}

BitPos: "#"^bitpos is sf=0 & b_31 & b_1923 & Rt_GPR32 [ bitpos = b_31 << 5 | b_1923; ]
{
	tmp:1 = ((Rt_GPR32 >> bitpos) & 1) == 0;
	export tmp;
}

# C6.2.41 CBNZ page C6-589 line 34530 MATCH x35000000/mask=x7f000000
# C6.2.42 CBZ page C6-590 line 34587 MATCH x34000000/mask=x7f000000
# CONSTRUCT xb4000000/mask=xfe000000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xb4000000/mask=xfe000000 --status nodest --comment "qemuerr(illegal addresses cause qemu exit)"

:cb^ZeroOp Rd_GPR64, Addr19
is sf=1 & b_2530=0x1a & ZeroOp & Addr19 & Rd_GPR64
{
	tmp:1 = Rd_GPR64 == 0;
	if (tmp == ZeroOp) goto Addr19;
}

# C6.2.41 CBNZ page C6-589 line 34530 MATCH x35000000/mask=x7f000000
# C6.2.42 CBZ page C6-590 line 34587 MATCH x34000000/mask=x7f000000
# CONSTRUCT x34000000/mask=xfe000000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x34000000/mask=xfe000000 --status nodest --comment "qemuerr(illegal addresses cause qemu exit)"

:cb^ZeroOp Rd_GPR32, Addr19
is sf=0 & b_2530=0x1a & ZeroOp & Addr19 & Rd_GPR32
{
	tmp:1 = Rd_GPR32 == 0;
	if (tmp == ZeroOp) goto Addr19;
}

# C6.2.41 CBNZ page C6-589 line 34530 MATCH x35000000/mask=x7f000000
# CONSTRUCT x35000000/mask=xff000000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x35000000/mask=xff000000 --status nodest --comment "qemuerr(illegal addresses cause qemu exit)"

:cbnz Rt_GPR32, Addr19
is sf=0 & b_2530=0x1a & cmpr_op=1 & Addr19 & Rt_GPR32
{
	if (Rt_GPR32 != 0) goto Addr19;
}

# C6.2.41 CBNZ page C6-589 line 34530 MATCH x35000000/mask=x7f000000
# CONSTRUCT xb5000000/mask=xff000000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xb5000000/mask=xff000000 --status nodest --comment "qemuerr(illegal addresses cause qemu exit)"

:cbnz Rt_GPR64, Addr19
is sf=1 & b_2530=0x1a & cmpr_op=1 & Addr19 & Rt_GPR64
{
	if (Rt_GPR64 != 0) goto Addr19;
}

# C6.2.42 CBZ page C6-590 line 34587 MATCH x34000000/mask=x7f000000
# CONSTRUCT x34000000/mask=xff000000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x34000000/mask=xff000000 --status nodest --comment "qemuerr(illegal addresses cause qemu exit)"

:cbz Rt_GPR32, Addr19
is sf=0 & b_2530=0x1a & cmpr_op=0 & Addr19 & Rt_GPR32
{
	if (Rt_GPR32 == 0) goto Addr19;
}

# C6.2.42 CBZ page C6-590 line 34587 MATCH x34000000/mask=x7f000000
# CONSTRUCT xb4000000/mask=xff000000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xb4000000/mask=xff000000 --status nodest --comment "qemuerr(illegal addresses cause qemu exit)"

:cbz Rt_GPR64, Addr19
is sf=1 & b_2530=0x1a & cmpr_op=0 & Addr19 & Rt_GPR64
{
	if (Rt_GPR64 == 0) goto Addr19;
}

# C6.2.43 CCMN (immediate) page C6-591 line 34644 MATCH x3a400800/mask=x7fe00c10
# CONSTRUCT x3a400800/mask=xffe00c10 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x3a400800/mask=xffe00c10 --status pass --comment "flags"

:ccmn Rn_GPR32, UImm5, NZCVImm_uimm4, CondOp
is sf=0 & op=0 & s=1 & b_2428=0x1a & b_2123=2 & UImm5 & CondOp & b_1111=1 & o2=0 & Rn_GPR32 & o3=0 & NZCVImm_uimm4
{
	condition:1 = CondOp;
	condMask:1 = NZCVImm_uimm4;
	setCC_NZCV(condMask);
	if (!condition) goto inst_next;
	tmp:4 = UImm5;
	addflags(Rn_GPR32, tmp);
	result:4 = Rn_GPR32 + tmp;
	resultflags(result);
	affectflags();
}

# C6.2.43 CCMN (immediate) page C6-591 line 34644 MATCH x3a400800/mask=x7fe00c10
# CONSTRUCT xba400800/mask=xffe00c10 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xba400800/mask=xffe00c10 --status pass --comment "flags"

:ccmn Rn_GPR64, UImm5, NZCVImm_uimm4, CondOp
is sf=1 & op=0 & s=1 & b_2428=0x1a & b_2123=2 & UImm5 & CondOp & b_1111=1 & o2=0 & Rn_GPR64 & o3=0 & NZCVImm_uimm4
{
	condition:1 = CondOp;
	condMask:1 = NZCVImm_uimm4;
	setCC_NZCV(condMask);
	if (!condition) goto inst_next;
	tmp:8 = zext(UImm5);
	addflags(Rn_GPR64, tmp);
	result:8 = Rn_GPR64 + tmp;
	resultflags(result);
	affectflags();
}

# C6.2.44 CCMN (register) page C6-592 line 34706 MATCH x3a400000/mask=x7fe00c10
# CONSTRUCT x3a400000/mask=xffe00c10 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x3a400000/mask=xffe00c10 --status pass --comment "flags"

:ccmn Rn_GPR32, Rm_GPR32, NZCVImm_uimm4, CondOp
is sf=0 & op=0 & s=1 & b_2428=0x1a & b_2123=2 & Rm_GPR32 & CondOp & b_1111=0 & o2=0 & Rn_GPR32 & o3=0 & NZCVImm_uimm4
{
	condition:1 = CondOp;
	condMask:1 = NZCVImm_uimm4;
	setCC_NZCV(condMask);
	if (!condition) goto inst_next;
	tmp:4 = Rm_GPR32;
	addflags(Rn_GPR32, tmp);
	result:4 = Rn_GPR32 + tmp;
	resultflags(result);
	affectflags();
}

# C6.2.44 CCMN (register) page C6-592 line 34706 MATCH x3a400000/mask=x7fe00c10
# CONSTRUCT xba400000/mask=xffe00c10 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xba400000/mask=xffe00c10 --status pass --comment "flags"

:ccmn Rn_GPR64, Rm_GPR64, NZCVImm_uimm4, CondOp
is sf=1 & op=0 & s=1 & b_2428=0x1a & b_2123=2 & Rm_GPR64 & CondOp & b_1111=0 & o2=0 & Rn_GPR64 & o3=0 & NZCVImm_uimm4
{
	condition:1 = CondOp;
	condMask:1 = NZCVImm_uimm4;
	setCC_NZCV(condMask);
	if (!condition) goto inst_next;
	tmp:8 = Rm_GPR64;
	addflags(Rn_GPR64, tmp);
	result:8 = Rn_GPR64 + tmp;
	resultflags(result);
	affectflags();
}

# C6.2.45 CCMP (immediate) page C6-593 line 34771 MATCH x7a400800/mask=x7fe00c10
# CONSTRUCT x7a400800/mask=xffe00c10 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x7a400800/mask=xffe00c10 --status pass --comment "flags"

:ccmp Rn_GPR32, UImm5, NZCVImm_uimm4, CondOp
is sf=0 & op=1 & s=1 & b_2428=0x1a & b_2123=2 & UImm5 & CondOp & b_1111=1 & o2=0 & Rn_GPR32 & o3=0 & NZCVImm_uimm4
{
	condition:1 = CondOp;
	condMask:1 = NZCVImm_uimm4;
	setCC_NZCV(condMask);
	if (!condition) goto inst_next;
	subflags(Rn_GPR32, UImm5);
	tmp:4 = Rn_GPR32 - UImm5;
	resultflags(tmp);
	affectflags();
}

# C6.2.45 CCMP (immediate) page C6-593 line 34771 MATCH x7a400800/mask=x7fe00c10
# CONSTRUCT xfa400800/mask=xffe00c10 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xfa400800/mask=xffe00c10 --status pass --comment "flags"

:ccmp Rn_GPR64, UImm5, NZCVImm_uimm4, CondOp
is sf=1 & op=1 & s=1 & b_2428=0x1a & b_2123=2 & UImm5 & CondOp & b_1111=1 & o2=0 & Rn_GPR64 & o3=0 & NZCVImm_uimm4
{
	condition:1 = CondOp;
	condMask:1 = NZCVImm_uimm4;
	setCC_NZCV(condMask);
	if (!condition) goto inst_next;
	tmp:8 = zext(UImm5);
	subflags(Rn_GPR64, tmp);
	tmp = Rn_GPR64 - tmp;
	resultflags(tmp);
	affectflags();
}

# C6.2.46 CCMP (register) page C6-594 line 34835 MATCH x7a400000/mask=x7fe00c10
# CONSTRUCT x7a400000/mask=xffe00c10 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x7a400000/mask=xffe00c10 --status pass --comment "flags"

:ccmp Rn_GPR32, Rm_GPR32, NZCVImm_uimm4, CondOp
is sf=0 & op=1 & s=1 & b_2428=0x1a & b_2123=2 & Rm_GPR32 & CondOp & b_1111=0 & o2=0 & Rn_GPR32 & o3=0 & NZCVImm_uimm4
{
	condition:1 = CondOp;
	condMask:1 = NZCVImm_uimm4;
	setCC_NZCV(condMask);
	if (!condition) goto inst_next;
	subflags(Rn_GPR32, Rm_GPR32);
	tmp:4 = Rn_GPR32 - Rm_GPR32;
	resultflags(tmp);
	affectflags();
}

# C6.2.46 CCMP (register) page C6-594 line 34835 MATCH x7a400000/mask=x7fe00c10
# CONSTRUCT xfa400000/mask=xffe00c10 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xfa400000/mask=xffe00c10 --status pass --comment "flags"

:ccmp Rn_GPR64, Rm_GPR64, NZCVImm_uimm4, CondOp
is sf=1 & op=1 & s=1 & b_2428=0x1a & b_2123=2 & Rm_GPR64 & CondOp & b_1111=0 & o2=0 & Rn_GPR64 & o3=0 & NZCVImm_uimm4
{
	condition:1 = CondOp;
	condMask:1 = NZCVImm_uimm4;
	setCC_NZCV(condMask);
	if (!condition) goto inst_next;
	subflags(Rn_GPR64, Rm_GPR64);
	tmp:8 = Rn_GPR64 - Rm_GPR64;
	resultflags(tmp);
	affectflags();
}

# C6.2.47 CINC page C6-595 line 34901 MATCH x1a800400/mask=x7fe00c00
# C6.2.62 CSET page C6-616 line 36064 MATCH x1a9f07e0/mask=x7fff0fe0
# C6.2.64 CSINC page C6-618 line 36193 MATCH x1a800400/mask=x7fe00c00
# CONSTRUCT x1a800400/mask=xffe00c00 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x1a800400/mask=xffe00c00 --status pass --comment "flags"

:cinc Rd_GPR32, Rn_GPR32, InvCondOp
is sf=0 & op=0 & s=0 & b_2428=0x1a & b_2123=4 & Rm_GPR32 & InvCondOp & b_1011=1 & Rn=Rm & (Rn!=0x1f) & (b_15=0 | b_14=0 | b_13=0) & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	condition:1 = InvCondOp;
	tmp:4 = Rn_GPR32;
	if (!condition) goto <skip>;
	tmp = Rn_GPR32 + 1;
<skip>
	Rd_GPR64 = zext(tmp);
}

# C6.2.47 CINC page C6-595 line 34901 MATCH x1a800400/mask=x7fe00c00
# C6.2.62 CSET page C6-616 line 36064 MATCH x1a9f07e0/mask=x7fff0fe0
# C6.2.64 CSINC page C6-618 line 36193 MATCH x1a800400/mask=x7fe00c00
# CONSTRUCT x9a800400/mask=xffe00c00 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x9a800400/mask=xffe00c00 --status pass --comment "flags"

:cinc Rd_GPR64, Rn_GPR64, InvCondOp
is sf=1 & op=0 & s=0 & b_2428=0x1a & b_2123=4 & Rm_GPR64 & InvCondOp & b_1011=1 & Rn=Rm & (Rn!=0x1f) & (b_15=0 | b_14=0 | b_13=0) & Rn_GPR64 & Rd_GPR64
{
	condition:1 = InvCondOp;
	tmp:8 = Rn_GPR64;
	if (!condition) goto <skip>;
	tmp = Rn_GPR64 + 1;
<skip>
	Rd_GPR64 = tmp;
}

# C6.2.48 CINV page C6-596 line 34970 MATCH x5a800000/mask=x7fe00c00
# C6.2.63 CSETM page C6-617 line 36128 MATCH x5a9f03e0/mask=x7fff0fe0
# C6.2.65 CSINV page C6-620 line 36285 MATCH x5a800000/mask=x7fe00c00
# CONSTRUCT x5a800000/mask=xffe00c00 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x5a800000/mask=xffe00c00 --status pass --comment "flags"

:cinv Rd_GPR32, Rn_GPR32, InvCondOp
is sf=0 & op=1 & s=0 & b_2428=0x1a & b_2123=4 & Rm_GPR32 & InvCondOp & b_1011=0 & Rn=Rm & (Rn!=0x1f) & (b_15=0 | b_14=0 | b_13=0) & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	condition:1 = InvCondOp;
	tmp:4 = Rn_GPR32;
	if (!condition) goto <skip>;
	tmp = ~Rn_GPR32;
<skip>
	Rd_GPR64 = zext(tmp);
}

# C6.2.48 CINV page C6-596 line 34970 MATCH x5a800000/mask=x7fe00c00
# C6.2.63 CSETM page C6-617 line 36128 MATCH x5a9f03e0/mask=x7fff0fe0
# C6.2.65 CSINV page C6-620 line 36285 MATCH x5a800000/mask=x7fe00c00
# CONSTRUCT xda800000/mask=xffe00c00 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xda800000/mask=xffe00c00 --status pass --comment "flags"

:cinv Rd_GPR64, Rn_GPR64, InvCondOp
is sf=1 & op=1 & s=0 & b_2428=0x1a & b_2123=4 & Rm_GPR64 & InvCondOp & b_1011=0 & Rn=Rm & (Rn!=0x1f) & (b_15=0 | b_14=0 | b_13=0) & Rn_GPR64 & Rd_GPR64
{
	condition:1 = InvCondOp;
	tmp:8 = Rn_GPR64;
	if (!condition) goto <skip>;
	tmp = ~Rn_GPR64;
<skip>
	Rd_GPR64 = tmp;
}

# C6.2.49 CLREX page C6-597 line 35039 MATCH xd503305f/mask=xfffff0ff
# CONSTRUCT xd503305f/mask=xfffff0ff MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd503305f/mask=xfffff0ff --status nodest

:clrex CRm_uimm4_def15
is b_2431=0xd5 & b_2223=0 & l=0 & Op0=0 & Op1=3 & CRn=0x3 & CRm_uimm4_def15 & Op2=2 & Rt=0x1f
{
	ClearExclusiveLocal();
}

# C6.2.50 CLS page C6-598 line 35078 MATCH x5ac01400/mask=x7ffffc00
# CONSTRUCT x5ac01400/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x5ac01400/mask=xfffffc00 --status pass

:cls Rd_GPR32, Rn_GPR32
is sf=0 & b_3030=1 & S=0 & b_2428=0x1a & b_2123=6 & dp1.opcode2=0x0 & b_1015=0x5 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	local tmp:4 = (Rn_GPR32 ^ (Rn_GPR32<<1))|0x1;
	# first make all lower bits =1
	tmp = tmp | (tmp >> 1);
	tmp = tmp | (tmp >> 2);
	tmp = tmp | (tmp >> 4);
	tmp = tmp | (tmp >> 8);
	tmp = tmp | (tmp >> 16);
	# now add the 1 bits together, voila
	tmp = ((tmp & 0xaaaaaaaa)>>1) + (tmp & 0x55555555);
	tmp = ((tmp & 0xcccccccc)>>2) + (tmp & 0x33333333);
	tmp = ((tmp & 0xf0f0f0f0)>>4) + (tmp & 0x0f0f0f0f);
	tmp = ((tmp & 0xff00ff00)>>8) + (tmp & 0x00ff00ff);
	tmp = ((tmp & 0xffff0000)>>16) + (tmp & 0x0000ffff);
	Rd_GPR64 = zext(32 - (tmp & 0x3f));
}

# C6.2.50 CLS page C6-598 line 35078 MATCH x5ac01400/mask=x7ffffc00
# CONSTRUCT xdac01400/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac01400/mask=xfffffc00 --status pass

:cls Rd_GPR64, Rn_GPR64
is sf=1 & b_3030=1 & S=0 & b_2428=0x1a & b_2123=6 & dp1.opcode2=0x0 & b_1015=0x5 & Rn_GPR64 & Rd_GPR64
{
	local tmp:8 = (Rn_GPR64 ^ (Rn_GPR64<<1))|0x1;
	# first make all lower bits =1
	tmp = tmp | (tmp >> 1);
	tmp = tmp | (tmp >> 2);
	tmp = tmp | (tmp >> 4);
	tmp = tmp | (tmp >> 8);
	tmp = tmp | (tmp >> 16);
	tmp = tmp | (tmp >> 32);
	# now add the 1 bits together, voila
	tmp = ((tmp & 0xaaaaaaaaaaaaaaaa)>>1) + (tmp & 0x5555555555555555);
	tmp = ((tmp & 0xcccccccccccccccc)>>2) + (tmp & 0x3333333333333333);
	tmp = ((tmp & 0xf0f0f0f0f0f0f0f0)>>4) + (tmp & 0x0f0f0f0f0f0f0f0f);
	tmp = ((tmp & 0xff00ff00ff00ff00)>>8) + (tmp & 0x00ff00ff00ff00ff);
	tmp = ((tmp & 0xffff0000ffff0000)>>16) + (tmp & 0x0000ffff0000ffff);
	tmp = ((tmp & 0xffffffff00000000)>>32) + (tmp & 0x00000000ffffffff);
	Rd_GPR64 = 64 - (tmp & 0x7f);
}

# C6.2.51 CLZ page C6-599 line 35136 MATCH x5ac01000/mask=x7ffffc00
# CONSTRUCT x5ac01000/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x5ac01000/mask=xfffffc00 --status pass

:clz Rd_GPR32, Rn_GPR32
is sf=0 & b_3030=1 & S=0 & b_2428=0x1a & b_2123=6 & dp1.opcode2=0x0 & b_1015=0x4 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	local tmp:4 = Rn_GPR32;
	# first make all lower bits =1
	tmp = tmp | (tmp >> 1);
	tmp = tmp | (tmp >> 2);
	tmp = tmp | (tmp >> 4);
	tmp = tmp | (tmp >> 8);
	tmp = tmp | (tmp >> 16);
	# now add the 1 bits together, voila
	tmp = ((tmp & 0xaaaaaaaa)>>1) + (tmp & 0x55555555);
	tmp = ((tmp & 0xcccccccc)>>2) + (tmp & 0x33333333);
	tmp = ((tmp & 0xf0f0f0f0)>>4) + (tmp & 0x0f0f0f0f);
	tmp = ((tmp & 0xff00ff00)>>8) + (tmp & 0x00ff00ff);
	tmp = ((tmp & 0xffff0000)>>16) + (tmp & 0x0000ffff);
	Rd_GPR64 = zext(32 - (tmp & 0x3f));
}

# C6.2.51 CLZ page C6-599 line 35136 MATCH x5ac01000/mask=x7ffffc00
# CONSTRUCT xdac01000/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac01000/mask=xfffffc00 --status pass

:clz Rd_GPR64, Rn_GPR64
is sf=1 & b_3030=1 & S=0 & b_2428=0x1a & b_2123=6 & dp1.opcode2=0x0 & b_1015=0x4 & Rn_GPR64 & Rd_GPR64
{
	local tmp:8 = Rn_GPR64;
	# first make all lower bits =1
	tmp = tmp | (tmp >> 1);
	tmp = tmp | (tmp >> 2);
	tmp = tmp | (tmp >> 4);
	tmp = tmp | (tmp >> 8);
	tmp = tmp | (tmp >> 16);
	tmp = tmp | (tmp >> 32);
	# now add the 1 bits together, voila
	tmp = ((tmp & 0xaaaaaaaaaaaaaaaa)>>1) + (tmp & 0x5555555555555555);
	tmp = ((tmp & 0xcccccccccccccccc)>>2) + (tmp & 0x3333333333333333);
	tmp = ((tmp & 0xf0f0f0f0f0f0f0f0)>>4) + (tmp & 0x0f0f0f0f0f0f0f0f);
	tmp = ((tmp & 0xff00ff00ff00ff00)>>8) + (tmp & 0x00ff00ff00ff00ff);
	tmp = ((tmp & 0xffff0000ffff0000)>>16) + (tmp & 0x0000ffff0000ffff);
	tmp = ((tmp & 0xffffffff00000000)>>32) + (tmp & 0x00000000ffffffff);
	Rd_GPR64 = 64 - (tmp & 0x7f);
}

# C6.2.52 CMN (extended register) page C6-600 line 35193 MATCH x2b20001f/mask=x7fe0001f
# C6.2.6 ADDS (extended register) page C6-535 line 31503 MATCH x2b200000/mask=x7fe00000
# CONSTRUCT x2b20001f/mask=xffe0001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x2b20001f/mask=xffe0001f --status pass --comment "flags"

:cmn Rn_GPR32wsp, ExtendRegShift32
is sf=0 & op=0 & S=1 & SBIT_CZNO & b_2428=0xb & opt=0 & b_2121=1 & ExtendRegShift32 & Rn_GPR32wsp & Rd=0x1f
{
	tmp_1:4 = ExtendRegShift32;
	addflags(Rn_GPR32wsp, tmp_1);
	result:4 = Rn_GPR32wsp + tmp_1;
	resultflags(result);
	build SBIT_CZNO;
}

# C6.2.52 CMN (extended register) page C6-600 line 35193 MATCH x2b20001f/mask=x7fe0001f
# C6.2.6 ADDS (extended register) page C6-535 line 31503 MATCH x2b200000/mask=x7fe00000
# CONSTRUCT xab20001f/mask=xffe0001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xab20001f/mask=xffe0001f --status pass --comment "flags"

:cmn Rn_GPR64xsp, ExtendRegShift64
is sf=1 & op=0 & S=1 & SBIT_CZNO & b_2428=0xb & b_2121=1 & opt=0 & ExtendRegShift64 & Rn_GPR64xsp & Rd=0x1f
{
	tmp_1:8 = ExtendRegShift64;
	addflags(Rn_GPR64xsp, tmp_1);
	result:8 = Rn_GPR64xsp + tmp_1;
	resultflags(result);
	build SBIT_CZNO;
}

# C6.2.53 CMN (immediate) page C6-602 line 35308 MATCH x3100001f/mask=x7f00001f
# C6.2.7 ADDS (immediate) page C6-537 line 31633 MATCH x31000000/mask=x7f000000
# CONSTRUCT x3100001f/mask=xff00001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x3100001f/mask=xff00001f --status pass --comment "flags"

:cmn Rn_GPR32xsp, ImmShift32
is sf=0 & b_30=0 & b_29=1 & aa_Xd=31 & b_2428=0x11 & ImmShift32 & Rn_GPR32xsp
{
	addflags(Rn_GPR32xsp, ImmShift32);
	tmp:4 = Rn_GPR32xsp + ImmShift32;
	resultflags(tmp);
	affectflags();
}

# C6.2.53 CMN (immediate) page C6-602 line 35308 MATCH x3100001f/mask=x7f00001f
# C6.2.7 ADDS (immediate) page C6-537 line 31633 MATCH x31000000/mask=x7f000000
# CONSTRUCT xb100001f/mask=xff00001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xb100001f/mask=xff00001f --status pass --comment "flags"

:cmn Rn_GPR64xsp, ImmShift64
is sf=1 & b_30=0 & b_29=1 & aa_Xd=31 & b_2428=0x11 & ImmShift64 & Rn_GPR64xsp
{
	addflags(Rn_GPR64xsp, ImmShift64);
	tmp:8 = Rn_GPR64xsp + ImmShift64;
	resultflags(tmp);
	affectflags();
}

# C6.2.53 CMN (immediate) page C6-602 line 35308 MATCH x3100001f/mask=x7f00001f
# C6.2.7 ADDS (immediate) page C6-537 line 31633 MATCH x31000000/mask=x7f000000
# CONSTRUCT x3100001f/mask=xffc0001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x3100001f/mask=xffc0001f --status pass --comment "flags"

:cmn Rn_GPR32wsp, Imm12_addsubimm_operand_i32_posimm_lsl0
is sf=0 & op=0 & S=1 & b_2428=0x11 & shift=0 & Imm12_addsubimm_operand_i32_posimm_lsl0 & Rn_GPR32wsp & Rd=0x1f
{
	tmp_1:4 = Imm12_addsubimm_operand_i32_posimm_lsl0;
	addflags(Rn_GPR32wsp, tmp_1);
	result:4 = Rn_GPR32wsp + tmp_1;
	resultflags(result);
	affectflags();
}

# C6.2.53 CMN (immediate) page C6-602 line 35308 MATCH x3100001f/mask=x7f00001f
# C6.2.7 ADDS (immediate) page C6-537 line 31633 MATCH x31000000/mask=x7f000000
# CONSTRUCT x3140001f/mask=xffc0001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x3140001f/mask=xffc0001f --status pass --comment "flags"

:cmn Rn_GPR32wsp, Imm12_addsubimm_operand_i32_posimm_lsl12
is sf=0 & op=0 & S=1 & b_2428=0x11 & shift=1 & Imm12_addsubimm_operand_i32_posimm_lsl12 & Rn_GPR32wsp & Rd=0x1f
{
	tmp_1:4 = Imm12_addsubimm_operand_i32_posimm_lsl12;
	addflags(Rn_GPR32wsp, tmp_1);
	result:4 = Rn_GPR32wsp + tmp_1;
	resultflags(result);
	affectflags();
}

# C6.2.53 CMN (immediate) page C6-602 line 35308 MATCH x3100001f/mask=x7f00001f
# C6.2.7 ADDS (immediate) page C6-537 line 31633 MATCH x31000000/mask=x7f000000
# CONSTRUCT xb100001f/mask=xffc0001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xb100001f/mask=xffc0001f --status pass --comment "flags"

:cmn Rn_GPR64xsp, Imm12_addsubimm_operand_i64_posimm_lsl0
is sf=1 & op=0 & S=1 & SBIT_CZNO & b_2428=0x11 & shift=0 & Imm12_addsubimm_operand_i64_posimm_lsl0 & Rn_GPR64xsp & Rd=0x1f
{
	tmp_1:8 = Imm12_addsubimm_operand_i64_posimm_lsl0;
	addflags(Rn_GPR64xsp, tmp_1);
	result:8 = Rn_GPR64xsp + tmp_1;
	resultflags(result);
	build SBIT_CZNO;
}

# C6.2.53 CMN (immediate) page C6-602 line 35308 MATCH x3100001f/mask=x7f00001f
# C6.2.7 ADDS (immediate) page C6-537 line 31633 MATCH x31000000/mask=x7f000000
# CONSTRUCT xb140001f/mask=xffc0001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xb140001f/mask=xffc0001f --status pass --comment "flags"

:cmn Rn_GPR64xsp, Imm12_addsubimm_operand_i64_posimm_lsl12
is sf=1 & op=0 & S=1 & b_2428=0x11 & shift=1 & Imm12_addsubimm_operand_i64_posimm_lsl12 & Rn_GPR64xsp & Rd=0x1f
{
	tmp_1:8 = Imm12_addsubimm_operand_i64_posimm_lsl12;
	addflags(Rn_GPR64xsp, tmp_1);
	result:8 = Rn_GPR64xsp + tmp_1;
	resultflags(result);
	affectflags();
}

# C6.2.54 CMN (shifted register) page C6-603 line 35378 MATCH x2b00001f/mask=x7f20001f
# C6.2.8 ADDS (shifted register) page C6-539 line 31729 MATCH x2b000000/mask=x7f200000
# CONSTRUCT x2b00001f/mask=xff20801f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x2b00001f/mask=xff20801f --status pass --comment "flags"
# if shift == '11' then ReservedValue();

:cmn Rn_GPR32, RegShift32
is sf=0 & op=0 & S=1 & SBIT_CZNO & b_2428=0xb & b_2121=0 & b_15=0 & Rm_GPR32 & RegShift32 & Rn_GPR32 & Rd=0x1f
{
	tmp_1:4 = RegShift32;
	addflags(Rn_GPR32, tmp_1);
	result:4 = Rn_GPR32 + tmp_1;
	resultflags(result);
	build SBIT_CZNO;
}

# C6.2.54 CMN (shifted register) page C6-603 line 35378 MATCH x2b00001f/mask=x7f20001f
# C6.2.8 ADDS (shifted register) page C6-539 line 31729 MATCH x2b000000/mask=x7f200000
# CONSTRUCT xab00001f/mask=xff20001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xab00001f/mask=xff20001f --status pass --comment "flags"

:cmn Rn_GPR64, RegShift64
is sf=1 & op=0 & S=1 & SBIT_CZNO & b_2428=0xb & b_2121=0 & Rm_GPR64 & RegShift64 & Rn_GPR64 & Rd=0x1f
{
	tmp_1:8 = RegShift64;
	addflags(Rn_GPR64, tmp_1);
	result:8 = Rn_GPR64 + tmp_1;
	resultflags(result);
	build SBIT_CZNO;
}

# C6.2.55 CMP (extended register) page C6-605 line 35463 MATCH x6b20001f/mask=x7fe0001f
# C6.2.276 SUBS (extended register) page C6-963 line 55872 MATCH x6b200000/mask=x7fe00000
# CONSTRUCT x6b20001f/mask=xffe0001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x6b20001f/mask=xffe0001f --status pass --comment "flags"

:cmp Rn_GPR32wsp, ExtendRegShift32
is sf=0 & op=1 & S=1 & b_2428=0xb & opt=0 & b_2121=1 & ExtendRegShift32 & Rn_GPR32wsp & Rd=0x1f
{
	subflags(Rn_GPR32wsp, ExtendRegShift32);
	tmp:4 = Rn_GPR32wsp - ExtendRegShift32;
	resultflags(tmp);
	affectflags();
}

# C6.2.55 CMP (extended register) page C6-605 line 35463 MATCH x6b20001f/mask=x7fe0001f
# C6.2.276 SUBS (extended register) page C6-963 line 55872 MATCH x6b200000/mask=x7fe00000
# CONSTRUCT xeb20001f/mask=xffe0001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xeb20001f/mask=xffe0001f --status pass --comment "flags"

:cmp Rn_GPR64xsp, ExtendRegShift64
is sf=1 & op=1 & S=1 & b_2428=0xb & opt=0 & b_2121=1 & ExtendRegShift64 & Rn_GPR64xsp & Rd=0x1f
{
	subflags(Rn_GPR64xsp, ExtendRegShift64);
	tmp:8 = Rn_GPR64xsp - ExtendRegShift64;
	resultflags(tmp);
	affectflags();
}

# C6.2.56 CMP (immediate) page C6-607 line 35578 MATCH x7100001f/mask=x7f00001f
# C6.2.277 SUBS (immediate) page C6-965 line 56006 MATCH x71000000/mask=x7f000000
# CONSTRUCT x7100001f/mask=xff00001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x7100001f/mask=xff00001f --status pass --comment "flags"

:cmp Rn_GPR32xsp, ImmShift32
is sf=0 & b_30=1 & b_29=1 & b_2428=0x11 & ImmShift32 & Rn_GPR32xsp & aa_Wd=31
{
	subflags(Rn_GPR32xsp, ImmShift32);
	tmp:4 = Rn_GPR32xsp - ImmShift32;
	resultflags(tmp);
	affectflags();
}

# C6.2.56 CMP (immediate) page C6-607 line 35578 MATCH x7100001f/mask=x7f00001f
# C6.2.277 SUBS (immediate) page C6-965 line 56006 MATCH x71000000/mask=x7f000000
# CONSTRUCT xf100001f/mask=xff00001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xf100001f/mask=xff00001f --status pass --comment "flags"

:cmp Rn_GPR64xsp, ImmShift64
is sf=1 & b_30=1 & b_29=1 & b_2428=0x11 & ImmShift64 & Rn_GPR64xsp & aa_Wd=31
{
	subflags(Rn_GPR64xsp, ImmShift64);
	tmp:8 = Rn_GPR64xsp - ImmShift64;
	resultflags(tmp);
	affectflags();
}

# C6.2.56 CMP (immediate) page C6-607 line 35578 MATCH x7100001f/mask=x7f00001f
# C6.2.277 SUBS (immediate) page C6-965 line 56006 MATCH x71000000/mask=x7f000000
# CONSTRUCT x7100001f/mask=xffc0001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x7100001f/mask=xffc0001f --status pass --comment "flags"

:cmp Rn_GPR32wsp, Imm12_addsubimm_operand_i32_negimm_lsl0
is sf=0 & op=1 & S=1 & b_2428=0x11 & shift=0 & Imm12_addsubimm_operand_i32_negimm_lsl0 & Rn_GPR32wsp & Rd=0x1f
{
	tmp_1:4 = Imm12_addsubimm_operand_i32_negimm_lsl0;
	subflags(Rn_GPR32wsp, Imm12_addsubimm_operand_i32_negimm_lsl0);
	result:4 = Rn_GPR32wsp - tmp_1;
	resultflags(result);
	affectflags();
}

# C6.2.56 CMP (immediate) page C6-607 line 35578 MATCH x7100001f/mask=x7f00001f
# C6.2.277 SUBS (immediate) page C6-965 line 56006 MATCH x71000000/mask=x7f000000
# CONSTRUCT x7140001f/mask=xffc0001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x7140001f/mask=xffc0001f --status pass --comment "flags"

:cmp Rn_GPR32wsp, Imm12_addsubimm_operand_i32_negimm_lsl12
is sf=0 & op=1 & S=1 & b_2428=0x11 & shift=1 & Imm12_addsubimm_operand_i32_negimm_lsl12 & Rn_GPR32wsp & Rd=0x1f
{
	tmp_2:4 = Imm12_addsubimm_operand_i32_negimm_lsl12;
	subflags(Rn_GPR32wsp, tmp_2);
	tmp_1:4 = Rn_GPR32wsp - tmp_2;
	resultflags(tmp_1);
	affectflags();
}

# C6.2.56 CMP (immediate) page C6-607 line 35578 MATCH x7100001f/mask=x7f00001f
# C6.2.277 SUBS (immediate) page C6-965 line 56006 MATCH x71000000/mask=x7f000000
# CONSTRUCT xf100001f/mask=xffc0001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xf100001f/mask=xffc0001f --status pass --comment "flags"

:cmp Rn_GPR64xsp, Imm12_addsubimm_operand_i64_negimm_lsl0
is sf=1 & op=1 & S=1 & b_2428=0x11 & shift=0 & Imm12_addsubimm_operand_i64_negimm_lsl0 & Rn_GPR64xsp & Rd=0x1f
{
	tmp_2:8 = Imm12_addsubimm_operand_i64_negimm_lsl0;
	subflags(Rn_GPR64xsp, tmp_2);
	tmp_1:8 = Rn_GPR64xsp - tmp_2;
	resultflags(tmp_1);
	affectflags();
}

# C6.2.56 CMP (immediate) page C6-607 line 35578 MATCH x7100001f/mask=x7f00001f
# C6.2.277 SUBS (immediate) page C6-965 line 56006 MATCH x71000000/mask=x7f000000
# CONSTRUCT xf140001f/mask=xffc0001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xf140001f/mask=xffc0001f --status pass --comment "flags"

:cmp Rn_GPR64xsp, Imm12_addsubimm_operand_i64_negimm_lsl12
is sf=1 & op=1 & S=1 & b_2428=0x11 & shift=1 & Imm12_addsubimm_operand_i64_negimm_lsl12 & Rn_GPR64xsp & Rd=0x1f
{
	tmp_2:8 = Imm12_addsubimm_operand_i64_negimm_lsl12;
	subflags(Rn_GPR64xsp, tmp_2);
	tmp_1:8 = Rn_GPR64xsp - tmp_2;
	resultflags(tmp_1);
	affectflags();
}

# C6.2.57 CMP (shifted register) page C6-608 line 35648 MATCH x6b00001f/mask=x7f20001f
# C6.2.180 NEGS page C6-813 line 47447 MATCH x6b0003e0/mask=x7f2003e0
# C6.2.278 SUBS (shifted register) page C6-967 line 56104 MATCH x6b000000/mask=x7f200000
# CONSTRUCT x6b00001f/mask=xff20001f MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x6b00001f/mask=xff20001f --status pass --comment "flags"

:cmp Rn_GPR32, RegShift32
is sf=0 & op=1 & S=1 & b_2428=0xb & b_2121=0 & Rm_GPR32 & RegShift32 & Rn!=0x1f & Rn_GPR32 & Rd=0x1f
{
	subflags(Rn_GPR32, RegShift32);
	tmp:4 = Rn_GPR32 - RegShift32;
	resultflags(tmp);
	affectflags();
}

# C6.2.57 CMP (shifted register) page C6-608 line 35648 MATCH x6b00001f/mask=x7f20001f
# C6.2.180 NEGS page C6-813 line 47447 MATCH x6b0003e0/mask=x7f2003e0
# C6.2.278 SUBS (shifted register) page C6-967 line 56104 MATCH x6b000000/mask=x7f200000
# CONSTRUCT xeb00001f/mask=xff20001f MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xeb00001f/mask=xff20001f --status pass --comment "flags"

:cmp Rn_GPR64, RegShift64
is sf=1 & op=1 & S=1 & b_2428=0xb & b_2121=0 & Rm_GPR64 & RegShift64 & Rn!=0x1f & Rn_GPR64 & Rd=0x1f
{
	subflags(Rn_GPR64, RegShift64);
	tmp:8 = Rn_GPR64 - RegShift64;
	resultflags(tmp);
	affectflags();
}

# C6.2.58 CNEG page C6-610 line 35733 MATCH x5a800400/mask=x7fe00c00
# C6.2.66 CSNEG page C6-622 line 36377 MATCH x5a800400/mask=x7fe00c00
# CONSTRUCT x5a800400/mask=xffe00c00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x5a800400/mask=xffe00c00 --status pass --comment "flags"

:cneg Rd_GPR32, Rn_GPR32, InvCondOp
is sf=0 & op=1 & s=0 & b_2428=0x1a & b_2123=4 & Rm_GPR32 & InvCondOp & b_1011=1 & Rn=Rm & (b_15=0 | b_14=0 | b_13=0) & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	condition:1 = InvCondOp;
	tmp:4 = -Rn_GPR32;
	if (condition) goto <skip>;
	tmp = Rn_GPR32;
<skip>
	Rd_GPR64 = zext(tmp);
}

# C6.2.58 CNEG page C6-610 line 35733 MATCH x5a800400/mask=x7fe00c00
# C6.2.66 CSNEG page C6-622 line 36377 MATCH x5a800400/mask=x7fe00c00
# CONSTRUCT xda800400/mask=xffe00c00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xda800400/mask=xffe00c00 --status pass --comment "flags"

:cneg Rd_GPR64, Rn_GPR64, InvCondOp
is sf=1 & op=1 & s=0 & b_2428=0x1a & b_2123=4 & Rm_GPR64 & InvCondOp & b_1011=1 & Rn=Rm & (b_15=0 | b_14=0 | b_13=0) & Rn_GPR64 & Rd_GPR64
{
	condition:1 = InvCondOp;
	tmp:8 = -Rn_GPR64;
	if (condition) goto <skip>;
	tmp = Rn_GPR64;
<skip>
	Rd_GPR64 = tmp;
}

# C6.2.59 CRC32B, CRC32H, CRC32W, CRC32X page C6-611 line 35802 KEEPWITH
# sf == 0 && sz = 00 CRC32CB variant

crcpoly: "" is b_12=0 { local tmp = 0x04C11DB7:4; export *[const]:4 tmp; }
crcpoly: "c" is b_12=1 { local tmp = 0x1EDC6F41:4; export *[const]:4 tmp; }

# C6.2.59 CRC32B, CRC32H, CRC32W, CRC32X page C6-611 line 35802 MATCH x1ac04000/mask=x7fe0f000
# C6.2.60 CRC32CB, CRC32CH, CRC32CW, CRC32CX page C6-613 line 35898 MATCH x1ac05000/mask=x7fe0f000
# CONSTRUCT x1ac04000/mask=xffe0ec00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x1ac04000/mask=xffe0ec00 --status noqemu

:crc32^crcpoly^"b" Rd_GPR32, Rn_GPR32, Rm_GPR32
is b_31=0 & b_2130=0b0011010110 & b_1315=0b010 & b_1011=0b00 & crcpoly & Rm_GPR32 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	local tmp_Rd:4 = crc32b(Rn_GPR32, Rm_GPR32, crcpoly);
	Rd_GPR64 = zext(tmp_Rd);
}

# C6.2.59 CRC32B, CRC32H, CRC32W, CRC32X page C6-611 line 35802 MATCH x1ac04000/mask=x7fe0f000
# C6.2.60 CRC32CB, CRC32CH, CRC32CW, CRC32CX page C6-613 line 35898 MATCH x1ac05000/mask=x7fe0f000
# CONSTRUCT x1ac04400/mask=xffe0ec00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x1ac04400/mask=xffe0ec00 --status noqemu
# sf == 0 && sz = 01 CRC32CH variant

:crc32^crcpoly^"h" Rd_GPR32, Rn_GPR32, Rm_GPR32
is b_31=0 & b_2130=0b0011010110 & b_1315=0b010 & b_1011=0b01 & crcpoly & Rm_GPR32 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	local tmp_Rd:4 = crc32h(Rn_GPR32, Rm_GPR32, crcpoly);
	Rd_GPR64 = zext(tmp_Rd);
}

# C6.2.59 CRC32B, CRC32H, CRC32W, CRC32X page C6-611 line 35802 MATCH x1ac04000/mask=x7fe0f000
# C6.2.60 CRC32CB, CRC32CH, CRC32CW, CRC32CX page C6-613 line 35898 MATCH x1ac05000/mask=x7fe0f000
# CONSTRUCT x1ac04800/mask=xffe0ec00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x1ac04800/mask=xffe0ec00 --status noqemu
# sf == 0 && sz = 10 CRC32CW variant

:crc32^crcpoly^"w" Rd_GPR32, Rn_GPR32, Rm_GPR32
is b_31=0 & b_2130=0b0011010110 & b_1315=0b010 & b_1011=0b10 & crcpoly & Rm_GPR32 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	local tmp_Rd:4 = crc32w(Rn_GPR32, Rm_GPR32, crcpoly);
	Rd_GPR64 = zext(tmp_Rd);
}

# C6.2.59 CRC32B, CRC32H, CRC32W, CRC32X page C6-611 line 35802 MATCH x1ac04000/mask=x7fe0f000
# C6.2.60 CRC32CB, CRC32CH, CRC32CW, CRC32CX page C6-613 line 35898 MATCH x1ac05000/mask=x7fe0f000
# CONSTRUCT x9ac04c00/mask=xffe0ec00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x9ac04c00/mask=xffe0ec00 --status noqemu
# sf == 1 && sz = 11 CRC32CX variant

:crc32^crcpoly^"x" Rd_GPR32, Rn_GPR32, Rm_GPR64
is b_31=1 & b_2130=0b0011010110 & b_1315=0b010 & b_1011=0b11 & crcpoly & Rm_GPR64 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	local tmp_Rd:4 = crc32x(Rn_GPR32, Rm_GPR64, crcpoly);
	Rd_GPR64 = zext(tmp_Rd);
}

# C6.2.61 CSEL page C6-615 line 35994 MATCH x1a800000/mask=x7fe00c00
# CONSTRUCT x1a800000/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x1a800000/mask=xffe00c00 --status pass --comment "flags"

:csel Rd_GPR32, Rn_GPR32, Rm_GPR32, CondOp
is sf=0 & op=0 & s=0 & b_2428=0x1a & b_2123=4 & Rm_GPR32 & CondOp & b_1011=0 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	condition:1 = CondOp;
	tmp:4 = Rn_GPR32;
	if (condition) goto <skip>;
	tmp = Rm_GPR32;
<skip>
	Rd_GPR64 = zext(tmp);
}

# C6.2.61 CSEL page C6-615 line 35994 MATCH x1a800000/mask=x7fe00c00
# CONSTRUCT x9a800000/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x9a800000/mask=xffe00c00 --status pass --comment "flags"

:csel Rd_GPR64, Rn_GPR64, Rm_GPR64, CondOp
is sf=1 & op=0 & s=0 & b_2428=0x1a & b_2123=4 & Rm_GPR64 & CondOp & b_1011=0 & Rn_GPR64 & Rd_GPR64
{
	condition:1 = CondOp;
	tmp:8 = Rn_GPR64;
	if (condition) goto <skip>;
	tmp = Rm_GPR64;
<skip>
	Rd_GPR64 = tmp;
}

# C6.2.62 CSET page C6-616 line 36064 MATCH x1a9f07e0/mask=x7fff0fe0
# C6.2.47 CINC page C6-595 line 34901 MATCH x1a800400/mask=x7fe00c00
# C6.2.64 CSINC page C6-618 line 36193 MATCH x1a800400/mask=x7fe00c00
# CONSTRUCT x1a9f07e0/mask=xffff0fe0 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x1a9f07e0/mask=xffff0fe0 --status pass --comment "flags"

:cset Rd_GPR32, InvCondOp
is sf=0 & op=0 & s=0 & b_2428=0x1a & b_2123=4 & InvCondOp & b_1011=1 & Rn=0x1f & Rm=0x1f & (b_15=0 | b_14=0 | b_13=0) & Rd_GPR32 & Rd_GPR64
{
	condition:1 = InvCondOp;
	Rd_GPR64 = zext(condition);
}

# C6.2.62 CSET page C6-616 line 36064 MATCH x1a9f07e0/mask=x7fff0fe0
# C6.2.47 CINC page C6-595 line 34901 MATCH x1a800400/mask=x7fe00c00
# C6.2.64 CSINC page C6-618 line 36193 MATCH x1a800400/mask=x7fe00c00
# CONSTRUCT x9a9f07e0/mask=xffff0fe0 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x9a9f07e0/mask=xffff0fe0 --status pass --comment "flags"

:cset Rd_GPR64, InvCondOp
is sf=1 & op=0 & s=0 & b_2428=0x1a & b_2123=4 & InvCondOp & b_1011=1 & Rn=0x1f & Rm=0x1f & (b_15=0 | b_14=0 | b_13=0) & Rd_GPR64
{
	condition:1 = InvCondOp;
	Rd_GPR64 = zext(condition);
}

# C6.2.63 CSETM page C6-617 line 36128 MATCH x5a9f03e0/mask=x7fff0fe0
# C6.2.48 CINV page C6-596 line 34970 MATCH x5a800000/mask=x7fe00c00
# C6.2.65 CSINV page C6-620 line 36285 MATCH x5a800000/mask=x7fe00c00
# CONSTRUCT x5a9f03e0/mask=xffff0fe0 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x5a9f03e0/mask=xffff0fe0 --status pass --comment "flags"

:csetm Rd_GPR32, InvCondOp
is sf=0 & op=1 & s=0 & b_2428=0x1a & b_2123=4 & Rm_GPR32 & InvCondOp & b_1011=0 & Rn=0x1f & Rm=0x1f & (b_15=0 | b_14=0 | b_13=0) & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	condition:1 = InvCondOp;
	tmp:4 = zext(condition) * -1;
	Rd_GPR64 = zext(tmp);
}

# C6.2.63 CSETM page C6-617 line 36128 MATCH x5a9f03e0/mask=x7fff0fe0
# C6.2.48 CINV page C6-596 line 34970 MATCH x5a800000/mask=x7fe00c00
# C6.2.65 CSINV page C6-620 line 36285 MATCH x5a800000/mask=x7fe00c00
# CONSTRUCT xda9f03e0/mask=xffff0fe0 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xda9f03e0/mask=xffff0fe0 --status pass --comment "flags"

:csetm Rd_GPR64, InvCondOp
is sf=1 & op=1 & s=0 & b_2428=0x1a & b_2123=4 & Rm_GPR64 & InvCondOp & b_1011=0 & Rn=0x1f & Rm=0x1f & (b_15=0 | b_14=0 | b_13=0) & Rn_GPR64 & Rd_GPR64
{
	condition:1 = InvCondOp;
	Rd_GPR64 = zext(condition) * -1;
}

# C6.2.64 CSINC page C6-618 line 36193 MATCH x1a800400/mask=x7fe00c00
# C6.2.47 CINC page C6-595 line 34901 MATCH x1a800400/mask=x7fe00c00
# C6.2.62 CSET page C6-616 line 36064 MATCH x1a9f07e0/mask=x7fff0fe0
# CONSTRUCT x1a800400/mask=xffe00c00 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x1a800400/mask=xffe00c00 --status pass --comment "flags"

:csinc Rd_GPR32, Rn_GPR32, Rm_GPR32, CondOp
is sf=0 & op=0 & s=0 & b_2428=0x1a & b_2123=4 & Rm_GPR32 & CondOp & b_1011=1 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	condition:1 = CondOp;
	tmp:4 = Rn_GPR32;
	if (condition) goto <skip>;
	tmp = Rm_GPR32 + 1;
<skip>
	Rd_GPR64 = zext(tmp);
}

# C6.2.64 CSINC page C6-618 line 36193 MATCH x1a800400/mask=x7fe00c00
# C6.2.47 CINC page C6-595 line 34901 MATCH x1a800400/mask=x7fe00c00
# C6.2.62 CSET page C6-616 line 36064 MATCH x1a9f07e0/mask=x7fff0fe0
# CONSTRUCT x9a800400/mask=xffe00c00 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x9a800400/mask=xffe00c00 --status pass --comment "flags"

:csinc Rd_GPR64, Rn_GPR64, Rm_GPR64, CondOp
is sf=1 & op=0 & s=0 & b_2428=0x1a & b_2123=4 & Rm_GPR64 & CondOp & b_1011=1 & Rn_GPR64 & Rd_GPR64
{
	condition:1 = CondOp;
	tmp:8 = Rn_GPR64;
	if (condition) goto <skip>;
	tmp = Rm_GPR64 + 1;
<skip>
	Rd_GPR64 = tmp;
}

# C6.2.65 CSINV page C6-620 line 36285 MATCH x5a800000/mask=x7fe00c00
# C6.2.48 CINV page C6-596 line 34970 MATCH x5a800000/mask=x7fe00c00
# C6.2.63 CSETM page C6-617 line 36128 MATCH x5a9f03e0/mask=x7fff0fe0
# CONSTRUCT x5a800000/mask=xffe00c00 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x5a800000/mask=xffe00c00 --status pass --comment "flags"

:csinv Rd_GPR32, Rn_GPR32, Rm_GPR32, CondOp
is sf=0 & op=1 & s=0 & b_2428=0x1a & b_2123=4 & Rm_GPR32 & CondOp & b_1011=0 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	condition:1 = CondOp;
	tmp:4 = Rn_GPR32;
	if (condition) goto <skip>;
	tmp = ~Rm_GPR32;
<skip>
	Rd_GPR64 = zext(tmp);
}

# C6.2.65 CSINV page C6-620 line 36285 MATCH x5a800000/mask=x7fe00c00
# C6.2.48 CINV page C6-596 line 34970 MATCH x5a800000/mask=x7fe00c00
# C6.2.63 CSETM page C6-617 line 36128 MATCH x5a9f03e0/mask=x7fff0fe0
# CONSTRUCT xda800000/mask=xffe00c00 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xda800000/mask=xffe00c00 --status pass --comment "flags"

:csinv Rd_GPR64, Rn_GPR64, Rm_GPR64, CondOp
is sf=1 & op=1 & s=0 & b_2428=0x1a & b_2123=4 & Rm_GPR64 & CondOp & b_1011=0 & Rn_GPR64 & Rd_GPR64
{
	condition:1 = CondOp;
	tmp:8 = Rn_GPR64;
	if (condition) goto <skip>;
	tmp = ~Rm_GPR64;
<skip>
	Rd_GPR64 = tmp;
}

# C6.2.66 CSNEG page C6-622 line 36377 MATCH x5a800400/mask=x7fe00c00
# C6.2.58 CNEG page C6-610 line 35733 MATCH x5a800400/mask=x7fe00c00
# CONSTRUCT x5a800400/mask=xffe00c00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x5a800400/mask=xffe00c00 --status pass --comment "flags"

:csneg Rd_GPR32, Rn_GPR32, Rm_GPR32, CondOp
is sf=0 & op=1 & s=0 & b_2428=0x1a & b_2123=4 & Rm_GPR32 & CondOp & b_1011=1 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	condition:1 = CondOp;
	tmp:4 = Rn_GPR32;
	if (condition) goto <skip>;
	tmp = -Rm_GPR32;
<skip>
	Rd_GPR64 = zext(tmp);
}

# C6.2.66 CSNEG page C6-622 line 36377 MATCH x5a800400/mask=x7fe00c00
# C6.2.58 CNEG page C6-610 line 35733 MATCH x5a800400/mask=x7fe00c00
# CONSTRUCT xda800400/mask=xffe00c00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xda800400/mask=xffe00c00 --status pass --comment "flags"

:csneg Rd_GPR64, Rn_GPR64, Rm_GPR64, CondOp
is sf=1 & op=1 & s=0 & b_2428=0x1a & b_2123=4 & Rm_GPR64 & CondOp & b_1011=1 & Rn_GPR64 & Rd_GPR64
{
	condition:1 = CondOp;
	tmp:8 = Rn_GPR64;
	if (condition) goto <skip>;
	tmp = -Rm_GPR64;
<skip>
	Rd_GPR64 = tmp;
}

# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50b7420/mask=xffffffe0 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xd50b7420/mask=xffffffe0 --status nodest

:dc "ZVA", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b011 & b_1215=0b0111 & b_0811=0b0100 & b_0507=0b001 & Rt_GPR64
{ DC_ZVA(Rt_GPR64); }

# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5087620/mask=xffffffe0 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xd5087620/mask=xffffffe0 --status nodest

:dc "IVAC", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b0111 & b_0811=0b0110 & b_0507=0b001 & Rt_GPR64
{ DC_IVAC(Rt_GPR64); }

# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5087640/mask=xffffffe0 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xd5087640/mask=xffffffe0 --status nodest

:dc "ISW", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b0111 & b_0811=0b0110 & b_0507=0b010 & Rt_GPR64
{ DC_ISW(Rt_GPR64); }

# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50b7a20/mask=xffffffe0 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xd50b7a20/mask=xffffffe0 --status nopcodeop

:dc "CVAC", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b011 & b_1215=0b0111 & b_0811=0b1010 & b_0507=0b001 & Rt_GPR64
{ DC_CVAC(Rt_GPR64); }

# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5087a40/mask=xffffffe0 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xd5087a40/mask=xffffffe0 --status nodest

:dc "CSW", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b0111 & b_0811=0b1010 & b_0507=0b010 & Rt_GPR64
{ DC_CSW(Rt_GPR64); }

# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50b7b20/mask=xffffffe0 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xd50b7b20/mask=xffffffe0 --status nodest

:dc "CVAU", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b011 & b_1215=0b0111 & b_0811=0b1011 & b_0507=0b001 & Rt_GPR64
{ DC_CVAU(Rt_GPR64); }

# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50b7e20/mask=xffffffe0 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xd50b7e20/mask=xffffffe0 --status nodest

:dc "CIVAC", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b011 & b_1215=0b0111 & b_0811=0b1110 & b_0507=0b001 & Rt_GPR64
{ DC_CIVAC(Rt_GPR64); }

# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5087e40/mask=xffffffe0 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xd5087e40/mask=xffffffe0 --status nodest

:dc "CISW", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b0111 & b_0811=0b1110 & b_0507=0b010 & Rt_GPR64
{ DC_CISW(Rt_GPR64); }

# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50b7c20/mask=xffffffe0 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xd50b7c20/mask=xffffffe0 --status nodest

:dc "CVAP", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b011 & b_1215=0b0111 & b_0811=0b1100 & b_0507=0b001 & Rt_GPR64
{ DC_CVAP(Rt_GPR64); }

# C6.2.68 DCPS1 page C6-625 line 36533 MATCH xd4a00001/mask=xffe0001f
# CONSTRUCT xd4a00001/mask=xffe0001f MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd4a00001/mask=xffe0001f --status nodest

:dcps1 imm16
is b_2431=0xd4 & excCode=5 & imm16 & excCode2=0 & ll=1
{
	DCPSInstruction(1:2, imm16:2);
}

# C6.2.69 DCPS2 page C6-626 line 36598 MATCH xd4a00002/mask=xffe0001f
# CONSTRUCT xd4a00002/mask=xffe0001f MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd4a00002/mask=xffe0001f --status nodest

:dcps2 imm16
is b_2431=0xd4 & excCode=5 & imm16 & excCode2=0 & ll=2
{
	DCPSInstruction(2:2, imm16:2);
}

# C6.2.70 DCPS3 page C6-627 line 36668 MATCH xd4a00003/mask=xffe0001f
# CONSTRUCT xd4a00003/mask=xffe0001f MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd4a00003/mask=xffe0001f --status nodest

:dcps3 imm16
is b_2431=0xd4 & excCode=5 & imm16 & excCode2=0 & ll=3
{
	DCPSInstruction(3:2, imm16:2);
}

# C6.2.71 DMB page C6-628 line 36732 MATCH xd50330bf/mask=xfffff0ff
# CONSTRUCT xd50330bf/mask=xfffff3ff MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd50330bf/mask=xfffff3ff --status nodest

:dmb CRm_CRx
is b_2431=0xd5 & b_2223=0 & l=0 & Op0=0 & Op1=3 & CRn=0x3 & CRm_dbarrier_op & CRm_CRx & CRm_32 & CRm_10=0 & Op2=5 & Rt=0x1f
{
	types:1 = 0x0;
	domain:1 = CRm_32;
	DataMemoryBarrier(domain, types);
}

# C6.2.71 DMB page C6-628 line 36732 MATCH xd50330bf/mask=xfffff0ff
# CONSTRUCT xd50330bf/mask=xfffff0ff MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd50330bf/mask=xfffff0ff --status nodest

:dmb CRm_dbarrier_op
is b_2431=0xd5 & b_2223=0 & l=0 & Op0=0 & Op1=3 & CRn=0x3 & CRm_dbarrier_op & CRm_32 & CRm_10 & Op2=5 & Rt=0x1f
{
	types:1 = CRm_10;
	domain:1 = CRm_32;
	DataMemoryBarrier(domain, types);
}

# C6.2.72 DRPS page C6-630 line 36833 MATCH xd6bf03e0/mask=xffffffff
# CONSTRUCT xd6bf03e0/mask=xffffffff MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd6bf03e0/mask=xffffffff --status nodest

:drps
is b_2531=0x6b & b_2324=1 & b_2122=1 & b_1620=0x1f & b_1015=0 & aa_Xn=31 & b_0004=0
{
	pc = DRPSInstruction();
	return [pc];
}

# C6.2.73 DSB page C6-631 line 36867 MATCH xd503309f/mask=xfffff0ff
# CONSTRUCT xd503309f/mask=xfffff3ff MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd503309f/mask=xfffff3ff --status nodest

:dsb CRm_CRx
is b_2431=0xd5 & b_2223=0 & l=0 & Op0=0 & Op1=3 & CRn=0x3 & CRm_dbarrier_op & CRm_CRx & CRm_32 & CRm_10=0 & Op2=4 & Rt=0x1f
{
	types:1 = 0x0;
	domain:1 = CRm_32;
	DataSynchronizationBarrier(domain, types);
}

# C6.2.73 DSB page C6-631 line 36867 MATCH xd503309f/mask=xfffff0ff
# CONSTRUCT xd503309f/mask=xfffff0ff MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd503309f/mask=xfffff0ff --status nodest

:dsb CRm_dbarrier_op
is b_2431=0xd5 & b_2223=0 & l=0 & Op0=0 & Op1=3 & CRn=0x3 & CRm_dbarrier_op & CRm_32 & CRm_10 & Op2=4 & Rt=0x1f
{
	types:1 = CRm_10;
	domain:1 = CRm_32;
	DataSynchronizationBarrier(domain, types);
}

# C6.2.74 EON (shifted register) page C6-633 line 36968 MATCH x4a200000/mask=x7f200000
# CONSTRUCT x4a200000/mask=xff200000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x4a200000/mask=xff200000 --status pass

:eon Rd_GPR32, Rn_GPR32, RegShift32Log
is sf=0 & opc=2 & b_2428=0xa & N=1 & Rm_GPR32 & RegShift32Log & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp_3:4 = RegShift32Log;
	tmp_2:4 = tmp_3 ^ -1:4;
	tmp_1:4 = Rn_GPR32 ^ tmp_2;
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.74 EON (shifted register) page C6-633 line 36968 MATCH x4a200000/mask=x7f200000
# CONSTRUCT xca200000/mask=xff200000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xca200000/mask=xff200000 --status pass

:eon Rd_GPR64, Rn_GPR64, RegShift64Log
is sf=1 & opc=2 & b_2428=0xa & N=1 & Rm_GPR64 & RegShift64Log & Rn_GPR64 & Rd_GPR64
{
	tmp_3:8= RegShift64Log;
	tmp_2:8 = tmp_3 ^ -1:8;
	tmp_1:8 = Rn_GPR64 ^ tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.75 EOR (immediate) page C6-635 line 37059 MATCH x52000000/mask=x7f800000
# CONSTRUCT x52000000/mask=xff800000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x52000000/mask=xff800000 --status pass

:eor Rd_GPR32wsp, Rn_GPR32, DecodeWMask32
is sf=0 & opc=2 & b_2428=0x12 & b_2323=0 & DecodeWMask32 & Rn_GPR32 & Rd_GPR32wsp & Rd_GPR64xsp
{
	tmp_1:4 = Rn_GPR32 ^ DecodeWMask32;
	Rd_GPR64xsp = zext(tmp_1);
}

# C6.2.75 EOR (immediate) page C6-635 line 37059 MATCH x52000000/mask=x7f800000
# CONSTRUCT xd2000000/mask=xff800000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd2000000/mask=xff800000 --status pass

:eor Rd_GPR64xsp, Rn_GPR64, DecodeWMask64
is sf=1 & opc=2 & b_2428=0x12 & b_2323=0 & DecodeWMask64 & Rn_GPR64 & Rd_GPR64xsp
{
	tmp_1:8 = Rn_GPR64 ^ DecodeWMask64;
	Rd_GPR64xsp = tmp_1;
}

# C6.2.76 EOR (shifted register) page C6-636 line 37129 MATCH x4a000000/mask=x7f200000
# CONSTRUCT x4a000000/mask=xff200000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x4a000000/mask=xff200000 --status pass

:eor Rd_GPR32, Rn_GPR32, RegShift32Log
is sf=0 & opc=2 & b_2428=0xa & N=0 & RegShift32Log & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp_2:4 = RegShift32Log;
	tmp_1:4 = Rn_GPR32 ^ tmp_2;
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.76 EOR (shifted register) page C6-636 line 37129 MATCH x4a000000/mask=x7f200000
# CONSTRUCT xca000000/mask=xff200000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xca000000/mask=xff200000 --status pass

:eor Rd_GPR64, Rn_GPR64, RegShift64Log
is sf=1 & opc=2 & b_2428=0xa & N=0 & Rm_GPR64 & RegShift64Log & Rn_GPR64 & Rd_GPR64
{
	tmp_2:8 = RegShift64Log;
	tmp_1:8 = Rn_GPR64 ^ tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.77 ERET page C6-638 line 37218 MATCH xd69f03e0/mask=xffffffff
# CONSTRUCT xd69f03e0/mask=xffffffff MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd69f03e0/mask=xffffffff --status nodest

:eret
is b_2531=0x6b & b_2324=1 & b_2122=0 & b_1620=0x1f & b_1015=0 & aa_Xn=31 & b_0004=0
{
	pc = ExceptionReturn();
	return [pc];
}

# C6.2.78 ERETAA, ERETAB page C6-639 line 37259 MATCH xd69f0bff/mask=xfffffbff
# CONSTRUCT xd69f0bff/mask=xffffffff MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd69f0bff/mask=xffffffff --status nodest

:eretaa
is b_0031=0xd69f0bff
{
	pc = ExceptionReturn();
	AuthIA(pc, sp);
	return [pc];
}

# C6.2.78 ERETAA, ERETAB page C6-639 line 37259 MATCH xd69f0bff/mask=xfffffbff
# CONSTRUCT xd69f0fff/mask=xffffffff MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd69f0fff/mask=xffffffff --status nodest

:eretab
is b_0031=0xd69f0fff
{
	pc = ExceptionReturn();
	AuthIB(pc, sp);
	return [pc];
}

# C6.2.80 EXTR page C6-641 line 37372 MATCH x13800000/mask=x7fa00000
# C6.2.204 ROR (immediate) page C6-849 line 49358 MATCH x13800000/mask=x7fa00000
# CONSTRUCT x13800000/mask=xffe00000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x13800000/mask=xffe00000 --status pass

:extr Rd_GPR32, Rn_GPR32, Rm_GPR32, LSB_bitfield32_imm
is sf=0 & b_2930=0 & b_2428=0x13 & b_2323=1 & n=0 & b_21=0 & Rm_GPR32 & LSB_bitfield32_imm & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	lsb:8 = LSB_bitfield32_imm;
	result:8 = (zext(Rn_GPR32) << 32) | zext(Rm_GPR32);
	result = (result >> lsb);
	Rd_GPR64 = zext(result:4);
}

# C6.2.80 EXTR page C6-641 line 37372 MATCH x13800000/mask=x7fa00000
# C6.2.204 ROR (immediate) page C6-849 line 49358 MATCH x13800000/mask=x7fa00000
# CONSTRUCT x93c00000/mask=xffe00000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x93c00000/mask=xffe00000 --status pass

:extr Rd_GPR64, Rn_GPR64, Rm_GPR64, LSB_bitfield64_imm
is sf=1 & b_2930=0 & b_2428=0x13 & b_2323=1 & n=1 & b_21=0 & Rm_GPR64 & LSB_bitfield64_imm & Rn_GPR64 & Rd_GPR64
{
	local tmp:8 = (Rm_GPR64 >> LSB_bitfield64_imm:1);
	Rd_GPR64 = tmp | (Rn_GPR64 << (64:1 - LSB_bitfield64_imm:1));
}

# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# C6.2.21 AUTIA, AUTIA1716, AUTIASP, AUTIAZ, AUTIZA page C6-557 line 32715 MATCH xd503219f/mask=xfffffddf
# C6.2.22 AUTIB, AUTIB1716, AUTIBSP, AUTIBZ, AUTIZB page C6-559 line 32862 MATCH xd50321df/mask=xfffffddf
# C6.2.79 ESB page C6-640 line 37326 MATCH xd503221f/mask=xffffffff
# C6.2.190 PACIA, PACIA1716, PACIASP, PACIAZ, PACIZA page C6-827 line 48191 MATCH xd503211f/mask=xfffffddf
# C6.2.191 PACIB, PACIB1716, PACIBSP, PACIBZ, PACIZB page C6-829 line 48335 MATCH xd503215f/mask=xfffffddf
# C6.2.196 PSB CSYNC page C6-839 line 48852 MATCH xd503223f/mask=xffffffff
# CONSTRUCT xd503201f/mask=xfffff01f MATCHED 7 DOCUMENTED OPCODES
# AUNIT --inst xd503201f/mask=xfffff01f --status nodest

:hint imm7Low
is b_2431=0xd5 & b_2223=0 & l=0 & Op0=0 & Op1=3 & CRn=0x2 & imm7Low & Rt=0x1f {}

# C6.2.82 HLT page C6-644 line 37530 MATCH xd4400000/mask=xffe0001f
# CONSTRUCT xd4400000/mask=xffe0001f MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd4400000/mask=xffe0001f --status nodest

:hlt imm16
is b_2431=0xd4 & excCode=2 & imm16 & excCode2=0 & ll=0
{
	HaltBreakPoint();
}

# C6.2.83 HVC page C6-645 line 37568 MATCH xd4000002/mask=xffe0001f
# CONSTRUCT xd4000002/mask=xffe0001f MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd4000002/mask=xffe0001f --status nodest

:hvc imm16
is b_2431=0xd4 & excCode=0 & imm16 & excCode2=0 & ll=2
{
	CallHyperVisor(imm16:2);
}

# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5087100/mask=xffffffe0 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xd5087100/mask=xffffffe0 --status nodest

:ic "IALLUIS"
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b0111 & b_0811=0b0001 & b_0507=0b000
{ IC_IALLUIS(); }

# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5087500/mask=xffffffe0 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xd5087500/mask=xffffffe0 --status nodest

:ic "IALLU"
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b0111 & b_0811=0b0101 & b_0507=0b000
{ IC_IALLU(); }

# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50b7520/mask=xffffffe0 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xd50b7520/mask=xffffffe0 --status nopcodeop

:ic "IVAU", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b011 & b_1215=0b0111 & b_0811=0b0101 & b_0507=0b001 & Rt_GPR64
{ IC_IVAU(Rt_GPR64); }

# C6.2.85 ISB page C6-647 line 37682 KEEPWITH

IsbOption: "#"^CRm_isb_op is CRm_isb_op { export *[const]:4 CRm_isb_op; }
IsbOption: "" is CRm_isb_op=0xf { tmp:4 = 0xf; export tmp; }

# C6.2.85 ISB page C6-647 line 37682 MATCH xd50330df/mask=xfffff0ff
# CONSTRUCT xd50330df/mask=xfffff0ff MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd50330df/mask=xfffff0ff --status nodest

:isb IsbOption
is b_2431=0xd5 & b_2223=0 & l=0 & Op0=0 & Op1=3 & CRn=0x3 & IsbOption & Op2=6 & Rt=0x1f
{
	InstructionSynchronizationBarrier();
}

# C6.2.86 LDADDB, LDADDAB, LDADDALB, LDADDLB page C6-648 line 37726 KEEPWITH

# variants, a=acquire, al=acquire+release, l=release
# build ls_loa to acquire and ls_lor to release

ls_loa: "a" is b_23=1 & b_22=0 { LOAcquire(); }
ls_loa: "al" is b_23=1 & b_22=1 { LOAcquire(); }
ls_loa: "" is b_23=0 & b_22=0 { }
ls_loa: "l" is b_23=0 & b_22=1 { }

ls_lor: "a" is b_23=1 & b_22=0 { }
ls_lor: "al" is b_23=1 & b_22=1 { LORelease(); }
ls_lor: "" is b_23=0 & b_22=0 { }
ls_lor: "l" is b_23=0 & b_22=1 { LORelease(); }

ls_data1: is b_3031=0b00 & Rn_GPR64xsp { tmp_ldWn = zext(*:1 Rn_GPR64xsp); }
ls_data2: is b_3031=0b01 & Rn_GPR64xsp { tmp_ldWn = zext(*:2 Rn_GPR64xsp); }
ls_data4: is b_3031=0b10 & Rn_GPR64xsp { tmp_ldWn = *:4 Rn_GPR64xsp; }
ls_data8: is b_3031=0b11 & Rn_GPR64xsp { tmp_ldXn = *:8 Rn_GPR64xsp; }

ls_mem1: is Rn_GPR64xsp { *:1 Rn_GPR64xsp = tmp_stWn:1; }
ls_mem2: is Rn_GPR64xsp { *:2 Rn_GPR64xsp = tmp_stWn:2; }
ls_mem4: is Rn_GPR64xsp { *:4 Rn_GPR64xsp = tmp_stWn; }
ls_mem8: is Rn_GPR64xsp { *:8 Rn_GPR64xsp = tmp_stXn; }

macro ls_opc_add (data, value, dest) { dest = data + value; }
macro ls_opc_clr (data, value, dest) { dest = data & (~ value); }
macro ls_opc_eor (data, value, dest) { dest = data ^ value; }
macro ls_opc_set (data, value, dest) { dest = data | value; }
macro ls_opc_smax(data, value, dest) { dest = zext(data s> value) * data + zext(data s<= value) * value; }
macro ls_opc_smin(data, value, dest) { dest = zext(data s> value) * value + zext(data s<= value) * data; }
macro ls_opc_umax(data, value, dest) { dest = zext(data > value) * data + zext(data <= value) * value; }
macro ls_opc_umin(data, value, dest) { dest = zext(data > value) * value + zext(data <= value) * data; }
macro ls_opc_swp (data, value, dest) { dest = value; }

ls_opc1: "add" is b_3031=0b00 & b_1215=0b0000 & aa_Ws & ls_data1 & ls_mem1 { build ls_data1; ls_opc_add(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem1; }
ls_opc2: "add" is b_3031=0b01 & b_1215=0b0000 & aa_Ws & ls_data2 & ls_mem2 { build ls_data2; ls_opc_add(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem2; }
ls_opc4: "add" is b_3031=0b10 & b_1215=0b0000 & aa_Ws & ls_data4 & ls_mem4 { build ls_data4; ls_opc_add(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem4; }
ls_opc8: "add" is b_3031=0b11 & b_1215=0b0000 & aa_Xs & ls_data8 & ls_mem8 { build ls_data8; ls_opc_add(tmp_ldXn, aa_Xs, tmp_stXn); build ls_mem8; }

ls_opc1: "clr" is b_3031=0b00 & b_1215=0b0001 & aa_Ws & ls_data1 & ls_mem1 { build ls_data1; ls_opc_clr(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem1; }
ls_opc2: "clr" is b_3031=0b01 & b_1215=0b0001 & aa_Ws & ls_data2 & ls_mem2 { build ls_data2; ls_opc_clr(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem2; }
ls_opc4: "clr" is b_3031=0b10 & b_1215=0b0001 & aa_Ws & ls_data4 & ls_mem4 { build ls_data4; ls_opc_clr(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem4; }
ls_opc8: "clr" is b_3031=0b11 & b_1215=0b0001 & aa_Xs & ls_data8 & ls_mem8 { build ls_data8; ls_opc_clr(tmp_ldXn, aa_Xs, tmp_stXn); build ls_mem8; }

ls_opc1: "eor" is b_3031=0b00 & b_1215=0b0010 & aa_Ws & ls_data1 & ls_mem1 { build ls_data1; ls_opc_eor(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem1; }
ls_opc2: "eor" is b_3031=0b01 & b_1215=0b0010 & aa_Ws & ls_data2 & ls_mem2 { build ls_data2; ls_opc_eor(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem2; }
ls_opc4: "eor" is b_3031=0b10 & b_1215=0b0010 & aa_Ws & ls_data4 & ls_mem4 { build ls_data4; ls_opc_eor(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem4; }
ls_opc8: "eor" is b_3031=0b11 & b_1215=0b0010 & aa_Xs & ls_data8 & ls_mem8 { build ls_data8; ls_opc_eor(tmp_ldXn, aa_Xs, tmp_stXn); build ls_mem8; }

ls_opc1: "set" is b_3031=0b00 & b_1215=0b0011 & aa_Ws & ls_data1 & ls_mem1 { build ls_data1; ls_opc_set(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem1; }
ls_opc2: "set" is b_3031=0b01 & b_1215=0b0011 & aa_Ws & ls_data2 & ls_mem2 { build ls_data2; ls_opc_set(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem2; }
ls_opc4: "set" is b_3031=0b10 & b_1215=0b0011 & aa_Ws & ls_data4 & ls_mem4 { build ls_data4; ls_opc_set(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem4; }
ls_opc8: "set" is b_3031=0b11 & b_1215=0b0011 & aa_Xs & ls_data8 & ls_mem8 { build ls_data8; ls_opc_set(tmp_ldXn, aa_Xs, tmp_stXn); build ls_mem8; }

ls_opc1: "smax" is b_3031=0b00 & b_1215=0b0100 & aa_Ws & ls_data1 & ls_mem1 { build ls_data1; ls_opc_smax(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem1; }
ls_opc2: "smax" is b_3031=0b01 & b_1215=0b0100 & aa_Ws & ls_data2 & ls_mem2 { build ls_data2; ls_opc_smax(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem2; }
ls_opc4: "smax" is b_3031=0b10 & b_1215=0b0100 & aa_Ws & ls_data4 & ls_mem4 { build ls_data4; ls_opc_smax(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem4; }
ls_opc8: "smax" is b_3031=0b11 & b_1215=0b0100 & aa_Xs & ls_data8 & ls_mem8 { build ls_data8; ls_opc_smax(tmp_ldXn, aa_Xs, tmp_stXn); build ls_mem8; }

ls_opc1: "smin" is b_3031=0b00 & b_1215=0b0101 & aa_Ws & ls_data1 & ls_mem1 { build ls_data1; ls_opc_smin(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem1; }
ls_opc2: "smin" is b_3031=0b01 & b_1215=0b0101 & aa_Ws & ls_data2 & ls_mem2 { build ls_data2; ls_opc_smin(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem2; }
ls_opc4: "smin" is b_3031=0b10 & b_1215=0b0101 & aa_Ws & ls_data4 & ls_mem4 { build ls_data4; ls_opc_smin(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem4; }
ls_opc8: "smin" is b_3031=0b11 & b_1215=0b0101 & aa_Xs & ls_data8 & ls_mem8 { build ls_data8; ls_opc_smin(tmp_ldXn, aa_Xs, tmp_stXn); build ls_mem8; }

ls_opc1: "umax" is b_3031=0b00 & b_1215=0b0110 & aa_Ws & ls_data1 & ls_mem1 { build ls_data1; ls_opc_umax(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem1; }
ls_opc2: "umax" is b_3031=0b01 & b_1215=0b0110 & aa_Ws & ls_data2 & ls_mem2 { build ls_data2; ls_opc_umax(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem2; }
ls_opc4: "umax" is b_3031=0b10 & b_1215=0b0110 & aa_Ws & ls_data4 & ls_mem4 { build ls_data4; ls_opc_umax(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem4; }
ls_opc8: "umax" is b_3031=0b11 & b_1215=0b0110 & aa_Xs & ls_data8 & ls_mem8 { build ls_data8; ls_opc_umax(tmp_ldXn, aa_Xs, tmp_stXn); build ls_mem8; }

ls_opc1: "umin" is b_3031=0b00 & b_1215=0b0111 & aa_Ws & ls_data1 & ls_mem1 { build ls_data1; ls_opc_umin(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem1; }
ls_opc2: "umin" is b_3031=0b01 & b_1215=0b0111 & aa_Ws & ls_data2 & ls_mem2 { build ls_data2; ls_opc_umin(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem2; }
ls_opc4: "umin" is b_3031=0b10 & b_1215=0b0111 & aa_Ws & ls_data4 & ls_mem4 { build ls_data4; ls_opc_umin(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem4; }
ls_opc8: "umin" is b_3031=0b11 & b_1215=0b0111 & aa_Xs & ls_data8 & ls_mem8 { build ls_data8; ls_opc_umin(tmp_ldXn, aa_Xs, tmp_stXn); build ls_mem8; }

# Nearly all of these instructions have the same "operation" in the
# manual, the differences being load vs store, the operation (o3:opc),
# the data size, and the load store semantics of the atomic load and
# store types (AccType). The opcode mnemonic varies, however. And to
# facilitate reading, the LD/ST/SWP variants have been separated out.

# C6.2.86 LDADDB, LDADDAB, LDADDALB, LDADDLB page C6-648 line 37726 MATCH x38200000/mask=xff20fc00
# C6.2.99 LDCLRB, LDCLRAB, LDCLRALB, LDCLRLB page C6-668 line 38879 MATCH x38201000/mask=xff20fc00
# C6.2.102 LDEORB, LDEORAB, LDEORALB, LDEORLB page C6-675 line 39290 MATCH x38202000/mask=xff20fc00
# C6.2.126 LDSETB, LDSETAB, LDSETALB, LDSETLB page C6-725 line 42290 MATCH x38203000/mask=xff20fc00
# C6.2.129 LDSMAXB, LDSMAXAB, LDSMAXALB, LDSMAXLB page C6-732 line 42701 MATCH x38204000/mask=xff20fc00
# C6.2.132 LDSMINB, LDSMINAB, LDSMINALB, LDSMINLB page C6-739 line 43112 MATCH x38205000/mask=xff20fc00
# C6.2.141 LDUMAXB, LDUMAXAB, LDUMAXALB, LDUMAXLB page C6-755 line 44078 MATCH x38206000/mask=xff20fc00
# C6.2.144 LDUMINB, LDUMINAB, LDUMINALB, LDUMINLB page C6-762 line 44489 MATCH x38207000/mask=xff20fc00
# CONSTRUCT x38200000/mask=xff208c00 MATCHED 8 DOCUMENTED OPCODES
# AUNIT --inst x38200000/mask=xff208c00 --status nomem

# size=0b00 (3031)

:ld^ls_opc1^ls_lor^"b" aa_Ws, aa_Wt, [Rn_GPR64xsp]
is b_3031=0b00 & b_2429=0b111000 & b_21=1 & b_1515=0 & b_1011=0b00 & ls_opc1 & ls_loa & ls_lor & aa_Wt & aa_Ws & Rn_GPR64xsp
{ build ls_loa; build ls_opc1; aa_Wt = tmp_ldWn; build ls_lor; }

# C6.2.87 LDADDH, LDADDAH, LDADDALH, LDADDLH page C6-650 line 37848 MATCH x78200000/mask=xff20fc00
# C6.2.100 LDCLRH, LDCLRAH, LDCLRALH, LDCLRLH page C6-670 line 39002 MATCH x78201000/mask=xff20fc00
# C6.2.103 LDEORH, LDEORAH, LDEORALH, LDEORLH page C6-677 line 39413 MATCH x78202000/mask=xff20fc00
# C6.2.127 LDSETH, LDSETAH, LDSETALH, LDSETLH page C6-727 line 42413 MATCH x78203000/mask=xff20fc00
# C6.2.130 LDSMAXH, LDSMAXAH, LDSMAXALH, LDSMAXLH page C6-734 line 42824 MATCH x78204000/mask=xff20fc00
# C6.2.133 LDSMINH, LDSMINAH, LDSMINALH, LDSMINLH page C6-741 line 43235 MATCH x78205000/mask=xff20fc00
# C6.2.142 LDUMAXH, LDUMAXAH, LDUMAXALH, LDUMAXLH page C6-757 line 44201 MATCH x78206000/mask=xff20fc00
# C6.2.145 LDUMINH, LDUMINAH, LDUMINALH, LDUMINLH page C6-764 line 44613 MATCH x78207000/mask=xff20fc00
# CONSTRUCT x78200000/mask=xff208c00 MATCHED 8 DOCUMENTED OPCODES
# AUNIT --inst x78200000/mask=xff208c00 --status nomem

# size=0b01 (3031)

:ld^ls_opc2^ls_lor^"h" aa_Ws, aa_Wt, [Rn_GPR64xsp]
is b_3031=0b01 & b_2429=0b111000 & b_21=1 & b_1515=0 & b_1011=0b00 & ls_opc2 & ls_loa & ls_lor & aa_Wt & aa_Ws & Rn_GPR64xsp
{ build ls_loa; build ls_opc2; aa_Wt = tmp_ldWn; build ls_lor; }

# C6.2.88 LDADD, LDADDA, LDADDAL, LDADDL page C6-652 line 37971 MATCH xb8200000/mask=xbf20fc00
# C6.2.101 LDCLR, LDCLRA, LDCLRAL, LDCLRL page C6-672 line 39125 MATCH xb8201000/mask=xbf20fc00
# C6.2.104 LDEOR, LDEORA, LDEORAL, LDEORL page C6-679 line 39536 MATCH xb8202000/mask=xbf20fc00
# C6.2.128 LDSET, LDSETA, LDSETAL, LDSETL page C6-729 line 42536 MATCH xb8203000/mask=xbf20fc00
# C6.2.131 LDSMAX, LDSMAXA, LDSMAXAL, LDSMAXL page C6-736 line 42947 MATCH xb8204000/mask=xbf20fc00
# C6.2.134 LDSMIN, LDSMINA, LDSMINAL, LDSMINL page C6-743 line 43358 MATCH xb8205000/mask=xbf20fc00
# C6.2.143 LDUMAX, LDUMAXA, LDUMAXAL, LDUMAXL page C6-759 line 44324 MATCH xb8206000/mask=xbf20fc00
# C6.2.146 LDUMIN, LDUMINA, LDUMINAL, LDUMINL page C6-766 line 44737 MATCH xb8207000/mask=xbf20fc00
# C6.2.223 STADD, STADDL page C6-871 line 50642 MATCH xb820001f/mask=xbfa0fc1f
# C6.2.226 STCLR, STCLRL page C6-875 line 50902 MATCH xb820101f/mask=xbfa0fc1f
# C6.2.229 STEOR, STEORL page C6-879 line 51161 MATCH xb820201f/mask=xbfa0fc1f
# C6.2.250 STSET, STSETL page C6-916 line 53342 MATCH xb820301f/mask=xbfa0fc1f
# C6.2.253 STSMAX, STSMAXL page C6-922 line 53625 MATCH xb820401f/mask=xbfa0fc1f
# C6.2.256 STSMIN, STSMINL page C6-928 line 53909 MATCH xb820501f/mask=xbfa0fc1f
# C6.2.262 STUMAX, STUMAXL page C6-938 line 54434 MATCH xb820601f/mask=xbfa0fc1f
# C6.2.265 STUMIN, STUMINL page C6-944 line 54719 MATCH xb820701f/mask=xbfa0fc1f
# CONSTRUCT xb8200000/mask=xff208c00 MATCHED 16 DOCUMENTED OPCODES
# AUNIT --inst xb8200000/mask=xff208c00 --status nomem

# size=0b10 (3031)

:ld^ls_opc4^ls_lor aa_Ws, aa_Wt, [Rn_GPR64xsp]
is b_3031=0b10 & b_2429=0b111000 & b_21=1 & b_1515=0 & b_1011=0b00 & ls_opc4 & ls_loa & ls_lor & aa_Wt & aa_Ws & Rn_GPR64xsp
{ build ls_loa; build ls_opc4; aa_Wt = tmp_ldWn; build ls_lor; }

# C6.2.88 LDADD, LDADDA, LDADDAL, LDADDL page C6-652 line 37971 MATCH xb8200000/mask=xbf20fc00
# C6.2.101 LDCLR, LDCLRA, LDCLRAL, LDCLRL page C6-672 line 39125 MATCH xb8201000/mask=xbf20fc00
# C6.2.104 LDEOR, LDEORA, LDEORAL, LDEORL page C6-679 line 39536 MATCH xb8202000/mask=xbf20fc00
# C6.2.128 LDSET, LDSETA, LDSETAL, LDSETL page C6-729 line 42536 MATCH xb8203000/mask=xbf20fc00
# C6.2.131 LDSMAX, LDSMAXA, LDSMAXAL, LDSMAXL page C6-736 line 42947 MATCH xb8204000/mask=xbf20fc00
# C6.2.134 LDSMIN, LDSMINA, LDSMINAL, LDSMINL page C6-743 line 43358 MATCH xb8205000/mask=xbf20fc00
# C6.2.143 LDUMAX, LDUMAXA, LDUMAXAL, LDUMAXL page C6-759 line 44324 MATCH xb8206000/mask=xbf20fc00
# C6.2.146 LDUMIN, LDUMINA, LDUMINAL, LDUMINL page C6-766 line 44737 MATCH xb8207000/mask=xbf20fc00
# C6.2.223 STADD, STADDL page C6-871 line 50642 MATCH xb820001f/mask=xbfa0fc1f
# C6.2.226 STCLR, STCLRL page C6-875 line 50902 MATCH xb820101f/mask=xbfa0fc1f
# C6.2.229 STEOR, STEORL page C6-879 line 51161 MATCH xb820201f/mask=xbfa0fc1f
# C6.2.250 STSET, STSETL page C6-916 line 53342 MATCH xb820301f/mask=xbfa0fc1f
# C6.2.253 STSMAX, STSMAXL page C6-922 line 53625 MATCH xb820401f/mask=xbfa0fc1f
# C6.2.256 STSMIN, STSMINL page C6-928 line 53909 MATCH xb820501f/mask=xbfa0fc1f
# C6.2.262 STUMAX, STUMAXL page C6-938 line 54434 MATCH xb820601f/mask=xbfa0fc1f
# C6.2.265 STUMIN, STUMINL page C6-944 line 54719 MATCH xb820701f/mask=xbfa0fc1f
# CONSTRUCT xf8200000/mask=xff208c00 MATCHED 16 DOCUMENTED OPCODES
# AUNIT --inst xf8200000/mask=xff208c00 --status nomem

# size=0b11 (3031)

:ld^ls_opc8^ls_lor aa_Xs, aa_Xt, [Rn_GPR64xsp]
is b_3031=0b11 & b_2429=0b111000 & b_21=1 & b_1515=0 & b_1011=0b00 & ls_opc8 & ls_loa & ls_lor & aa_Xt & aa_Xs & Rn_GPR64xsp
{ build ls_loa; build ls_opc8; aa_Xt = tmp_ldXn; build ls_lor; }

# C6.2.89 LDAPR page C6-655 line 38136 MATCH xb8a0c000/mask=xbfe0fc00
# CONSTRUCT xb8a0c000/mask=xffe0fc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xb8a0c000/mask=xffe0fc00 --status nomem
# TODO unsure of load/release semantics for this instruction
# To enforce SHOULD BE ONE fields add: b_1620=0b11111
# size == 10 32-bit variant

:ldapr aa_Wt, [Rn_GPR64xsp]
is b_3031=0b10 & b_2129=0b111000101 & b_1015=0b110000 & Rn_GPR64xsp & aa_Wt & ls_data4
{
	aa_Wt = tmp_ldWn;
}

# C6.2.89 LDAPR page C6-655 line 38136 MATCH xb8a0c000/mask=xbfe0fc00
# CONSTRUCT xf8a0c000/mask=xffe0fc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xf8a0c000/mask=xffe0fc00 --status nomem
# TODO unsure of load/release semantics for this instruction
# To enforce SHOULD BE ONE fields add: b_1620=0b11111
# size == 11 64-bit variant

:ldapr aa_Xt, [Rn_GPR64xsp]
is b_3031=0b11 & b_2129=0b111000101 & b_1015=0b110000 & Rn_GPR64xsp & aa_Xt
{
	aa_Xt = tmp_ldXn;
}

# C6.2.90 LDAPRB page C6-657 line 38226 MATCH x38a0c000/mask=xffe0fc00
# CONSTRUCT x38a0c000/mask=xffe0fc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x38a0c000/mask=xffe0fc00 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111
# TODO unsure of load/release semantics for this instruction

:ldaprb aa_Wt, [Rn_GPR64xsp]
is b_3031=0b00 & b_2129=0b111000101 & b_1015=0b110000 & Rn_GPR64xsp & aa_Wt & ls_data1
{
	aa_Wt = tmp_ldWn;
}

# C6.2.91 LDAPRH page C6-658 line 38292 MATCH x78a0c000/mask=xffe0fc00
# CONSTRUCT x78a0c000/mask=xffe0fc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x78a0c000/mask=xffe0fc00 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111

:ldaprh aa_Wt, [Rn_GPR64xsp]
is b_3031=0b01 & b_2129=0b111000101 & b_1015=0b110000 & Rn_GPR64xsp & aa_Wt & ls_data2
{
	aa_Wt = tmp_ldWn;
}

# C6.2.92 LDAR page C6-659 line 38358 MATCH x88c08000/mask=xbfe08000
# CONSTRUCT xc8c08000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xc8c08000/mask=xffe08000 --status nomem
# The manual states that Rs and Rt2 should be all ones, which is
# optionally enforced.
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111

:ldar Rt_GPR64, addrReg
is size.ldstr=3 & b_2429=0x8 & b_23=1 & L=1 & b_21=0 & b_15=1 & addrReg & Rt_GPR64
{
	Rt_GPR64 = *addrReg;
}

# C6.2.92 LDAR page C6-659 line 38358 MATCH x88c08000/mask=xbfe08000
# CONSTRUCT x88dffc00/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x88dffc00/mask=xfffffc00 --status nomem
# Enforce SHOULD BE ONE fields b_1620 & b_1014

:ldar Rt_GPR32, addrReg
is size.ldstr=2 & b_2429=0x8 & b_23=1 & L=1 & b_21=0 & b_1620=0b11111 & b_15=1 & b_1014=0b11111 & addrReg & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = *addrReg;
}

# C6.2.93 LDARB page C6-660 line 38429 MATCH x08c08000/mask=xffe08000
# CONSTRUCT x08c08000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x08c08000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111

:ldarb Rt_GPR32, addrReg
is size.ldstr=0 & b_2429=0x8 & b_23=1 & L=1 & b_21=0 & b_15=1 & addrReg & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = zext(*:1 addrReg);
}

# C6.2.94 LDARH page C6-661 line 38486 MATCH x48c08000/mask=xffe08000
# CONSTRUCT x48dffc00/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x48dffc00/mask=xfffffc00 --status nomem
# Enforce SHOULD BE ONE fields b_1620 & b_1014

:ldarh Rt_GPR32, addrReg
is size.ldstr=1 & b_2429=0x8 & b_23=1 & L=1 & b_21=0 & b_1620=0b11111 & b_15=1 & b_1014=0b11111 & addrReg & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = zext(*:2 addrReg);
}

# C6.2.95 LDAXP page C6-662 line 38543 MATCH x88608000/mask=xbfe08000
# CONSTRUCT xc8608000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xc8608000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111

:ldaxp Rt_GPR64, Rt2_GPR64, addrReg
is size.ldstr=3 & b_2429=0x8 & b_23=0 & L=1 & b_21=1 & b_15=1 & Rt2_GPR64 & addrReg & Rt_GPR64
{
	Rt_GPR64 = *(addrReg);
	Rt2_GPR64 = *(addrReg+8);
}

# C6.2.95 LDAXP page C6-662 line 38543 MATCH x88608000/mask=xbfe08000
# CONSTRUCT x88608000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x88608000/mask=xffe08000 --status nomem

:ldaxp Rt_GPR32, Rt2_GPR32, addrReg
is size.ldstr=2 & b_2429=0x8 & b_23=0 & L=1 & b_21=1 & b_1620 & b_15=1 & Rt2_GPR32 & addrReg & Rt_GPR32 & Rt_GPR64 & Rt2_GPR64
{
	Rt_GPR64 = zext(*:4(addrReg));
	Rt2_GPR64 = zext(*:4(addrReg+4));
}

# C6.2.96 LDAXR page C6-664 line 38668 MATCH x88408000/mask=xbfe08000
# CONSTRUCT xc8408000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xc8408000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111

:ldaxr Rt_GPR64, addrReg
is size.ldstr=3 & b_2429=0x8 & b_23=0 & L=1 & b_21=0 & b_15=1 & addrReg & Rt_GPR64
{
	Rt_GPR64 = *addrReg;
}

# C6.2.96 LDAXR page C6-664 line 38668 MATCH x88408000/mask=xbfe08000
# CONSTRUCT x88408000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x88408000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111

:ldaxr Rt_GPR32, addrReg
is size.ldstr=2 & b_2429=0x8 & b_23=0 & L=1 & b_21=0 & b_15=1 & addrReg & Rt_GPR32 & Rt_GPR64
{
	tmp:4 = *addrReg;
	Rt_GPR64 = zext(tmp);
}

# C6.2.97 LDAXRB page C6-666 line 38755 MATCH x08408000/mask=xffe08000
# CONSTRUCT x08408000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x08408000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111

:ldaxrb Rt_GPR32, addrReg
is size.ldstr=0 & b_2429=0x8 & b_23=0 & L=1 & b_21=0 & b_15=1 & addrReg & Rt_GPR32 & Rt_GPR64
{
	tmp:1 = *addrReg;
	Rt_GPR64 = zext(tmp);
}

# C6.2.98 LDAXRH page C6-667 line 38817 MATCH x48408000/mask=xffe08000
# CONSTRUCT x48408000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x48408000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111

:ldaxrh Rt_GPR32, addrReg
is size.ldstr=1 & b_2429=0x8 & b_23=0 & L=1 & b_21=0 & b_15=1 & addrReg & Rt_GPR32 & Rt_GPR64
{
	tmp:2 = *addrReg;
	Rt_GPR64 = zext(tmp);
}

# C6.2.105 LDLARB page C6-682 line 39701 MATCH x08c00000/mask=xffe08000
# CONSTRUCT x08c00000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x08c00000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111
# size=0b00 (3031)

:ldlarb aa_Wt, [Rn_GPR64xsp]
is b_3031=0b00 & b_2329=0b0010001 & b_22=1 & b_21=0 & b_15=0 & aa_Wt & Rn_GPR64xsp
{ LOAcquire(); aa_Wt = zext(*:1 Rn_GPR64xsp); }

# C6.2.106 LDLARH page C6-683 line 39759 MATCH x48c00000/mask=xffe08000
# CONSTRUCT x48c00000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x48c00000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111
# size=0b01 (3031)

:ldlarh aa_Wt, [Rn_GPR64xsp]
is b_3031=0b01 & b_2329=0b0010001 & b_22=1 & b_21=0 & b_15=0 & aa_Wt & Rn_GPR64xsp
{ LOAcquire(); aa_Wt = zext(*:2 Rn_GPR64xsp); }

# C6.2.107 LDLAR page C6-684 line 39817 MATCH x88c00000/mask=xbfe08000
# CONSTRUCT x88c00000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x88c00000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111
# size=0b10 (3031)

:ldlar aa_Wt, [Rn_GPR64xsp]
is b_3031=0b10 & b_2329=0b0010001 & b_22=1 & b_21=0 & b_15=0 & aa_Wt & Rn_GPR64xsp
{ LOAcquire(); aa_Wt = *:4 Rn_GPR64xsp; }

# C6.2.107 LDLAR page C6-684 line 39817 MATCH x88c00000/mask=xbfe08000
# CONSTRUCT xc8c00000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xc8c00000/mask=xffe08000 --status nomem
# size=0b11 (3031)

:ldlar aa_Xt, [Rn_GPR64xsp]
is b_3031=0b11 & b_2329=0b0010001 & b_22=1 & b_21=0 & b_15=0 & aa_Xt & Rn_GPR64xsp
{ LOAcquire(); aa_Xt = *:8 Rn_GPR64xsp; }

# C6.2.108 LDNP page C6-685 line 39889 MATCH x28400000/mask=x7fc00000
# CONSTRUCT x28400000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x28400000/mask=xffc00000 --status nomem

:ldnp Rt_GPR32, Rt2_GPR32, addrPairIndexed
is b_3031=0b00 & b_2229=0b10100001 & Rt2_GPR32 & addrPairIndexed & Rt_GPR32 & Rt_GPR64 & Rt2_GPR64
{
	Rt_GPR64 = zext(*:4 addrPairIndexed);
	Rt2_GPR64 = zext(*:4 (addrPairIndexed + 4));
}

# C6.2.108 LDNP page C6-685 line 39889 MATCH x28400000/mask=x7fc00000
# CONSTRUCT xa8400000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xa8400000/mask=xffc00000 --status nomem

:ldnp Rt_GPR64, Rt2_GPR64, addrPairIndexed
is b_3031=0b10 & b_2229=0b10100001 & Rt2_GPR64 & addrPairIndexed & Rt_GPR64
{
	Rt_GPR64 = *addrPairIndexed;
	Rt2_GPR64 = *(addrPairIndexed + 8);
}

# C6.2.109 LDP page C6-687 line 40007 MATCH x28c00000/mask=x7fc00000
# C6.2.109 LDP page C6-687 line 40007 MATCH x29c00000/mask=x7fc00000
# C6.2.109 LDP page C6-687 line 40007 MATCH x29400000/mask=x7fc00000
# C6.2.108 LDNP page C6-685 line 39889 MATCH x28400000/mask=x7fc00000
# CONSTRUCT x28400000/mask=xfe400000 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst x28400000/mask=xfe400000 --status nomem
# opc == 00 post-index, pre-index, and signed 32-bit variant

:ldp Rt_GPR32, Rt2_GPR32, addrPairIndexed
is b_3031=0b00 & b_2529=0b10100 & (b_24=1 | b_23=1) & b_22=1 & Rt2_GPR32 & addrPairIndexed & Rt_GPR32 & Rt_GPR64 & Rt2_GPR64
{
	Rt_GPR64 = zext(*:4 addrPairIndexed);
	Rt2_GPR64 = zext(*:4 (addrPairIndexed + 4));
}

# C6.2.109 LDP page C6-687 line 40007 MATCH x28c00000/mask=x7fc00000
# C6.2.109 LDP page C6-687 line 40007 MATCH x29c00000/mask=x7fc00000
# C6.2.109 LDP page C6-687 line 40007 MATCH x29400000/mask=x7fc00000
# C6.2.108 LDNP page C6-685 line 39889 MATCH x28400000/mask=x7fc00000
# CONSTRUCT xa8400000/mask=xfe400000 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xa8400000/mask=xfe400000 --status nomem
# opc == 10 post-index, pre-index, and signed 64-bit variant

:ldp Rt_GPR64, Rt2_GPR64, addrPairIndexed
is b_3031=0b10 & b_2529=0b10100 & (b_24=1 | b_23=1) & b_22=1 & Rt2_GPR64 & addrPairIndexed & Rt_GPR64
{
	Rt_GPR64 = *addrPairIndexed;
	Rt2_GPR64 = *(addrPairIndexed + 8);
}

# C6.2.110 LDPSW page C6-690 line 40212 MATCH x68c00000/mask=xffc00000
# C6.2.110 LDPSW page C6-690 line 40212 MATCH x69c00000/mask=xffc00000
# C6.2.110 LDPSW page C6-690 line 40212 MATCH x69400000/mask=xffc00000
# CONSTRUCT x68400000/mask=xfe400000 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x68400000/mask=xfe400000 --status nomem

:ldpsw Rt_GPR64, Rt2_GPR64, addrPairIndexed
is b_2531=0b0110100 & (b_24=1 | b_23=1) & b_22=1 & Rt2_GPR64 & addrPairIndexed & Rt_GPR64
{
	Rt_GPR64 = *(addrPairIndexed);
	Rt2_GPR64 = *(addrPairIndexed+8);
}

# C6.2.111 LDR (immediate) page C6-693 line 40374 MATCH xb9400000/mask=xbfc00000
# CONSTRUCT xb9400000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xb9400000/mask=xffc00000 --status nomem

:ldr Rt_GPR32, addrUIMM
is size.ldstr=2 & b_2729=7 & v=0 & b_2425=1 & b_23=0 & b_2222=1 & addrUIMM & Rn_GPR64xsp & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = zext(*:4 addrUIMM);
}

# C6.2.111 LDR (immediate) page C6-693 line 40374 MATCH xb8400400/mask=xbfe00c00
# C6.2.111 LDR (immediate) page C6-693 line 40374 MATCH xb8400c00/mask=xbfe00c00
# C6.2.135 LDTR page C6-746 line 43523 MATCH xb8400800/mask=xbfe00c00
# C6.2.147 LDUR page C6-769 line 44904 MATCH xb8400000/mask=xbfe00c00
# CONSTRUCT xb8400000/mask=xffe00000 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xb8400000/mask=xffe00000 --status nomem

:ld^UnscPriv^"r" Rt_GPR32, addrIndexed
is size.ldstr=2 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=1 & b_2121=0 & UnscPriv & addrIndexed & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = zext(*:4 addrIndexed);
}

# C6.2.111 LDR (immediate) page C6-693 line 40374 MATCH xb8400400/mask=xbfe00c00
# C6.2.111 LDR (immediate) page C6-693 line 40374 MATCH xb8400c00/mask=xbfe00c00
# CONSTRUCT xb8400400/mask=xffe00400 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xb8400400/mask=xffe00400 --status nomem

:ldr Rt_GPR32, addrIndexed
is size.ldstr=2 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=1 & b_2121=0 & b_1010=1 & addrIndexed & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = zext(*:4 addrIndexed);
}

# C6.2.111 LDR (immediate) page C6-693 line 40374 MATCH xb9400000/mask=xbfc00000
# CONSTRUCT xf9400000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xf9400000/mask=xffc00000 --status nomem

:ldr Rt_GPR64, addrUIMM
is size.ldstr=3 & b_2729=7 & v=0 & b_2425=1 & b_23=0 & b_2222=1 & addrUIMM & Rn_GPR64xsp & Rt_GPR64
{
	Rt_GPR64 = *addrUIMM;
}

# C6.2.111 LDR (immediate) page C6-693 line 40374 MATCH xb8400400/mask=xbfe00c00
# C6.2.111 LDR (immediate) page C6-693 line 40374 MATCH xb8400c00/mask=xbfe00c00
# CONSTRUCT xf8400400/mask=xffe00400 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xf8400400/mask=xffe00400 --status nomem

:ldr Rt_GPR64, addrIndexed
is size.ldstr=3 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=1 & b_2121=0 & b_1010=1 & addrIndexed & Rt_GPR64
{
	Rt_GPR64 = *addrIndexed;
}

# C6.2.112 LDR (literal) page C6-696 line 40555 MATCH x18000000/mask=xbf000000
# CONSTRUCT x18000000/mask=xff000000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x18000000/mask=xff000000 --status nomem

:ldr Rt_GPR32, AddrLoc19
is size.ldstr=0 & b_2729=3 & v=0 & b_2425=0 & AddrLoc19 & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = zext(*:4 AddrLoc19);
}

# C6.2.112 LDR (literal) page C6-696 line 40555 MATCH x18000000/mask=xbf000000
# CONSTRUCT x58000000/mask=xff000000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x58000000/mask=xff000000 --status nomem

:ldr Rt_GPR64, AddrLoc19
is size.ldstr=1 & b_2729=3 & v=0 & b_2425=0 & AddrLoc19 & Rt_GPR64
{
	Rt_GPR64 = *:4 AddrLoc19;
}

# C6.2.113 LDR (register) page C6-698 line 40646 MATCH xb8600800/mask=xbfe00c00
# CONSTRUCT xb8600800/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xb8600800/mask=xffe00c00 --status nomem

:ldr Rt_GPR32, addrIndexed
is size.ldstr=2 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=1 & b_2121=1 & b_1011=2 & addrIndexed & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = zext(*:4 addrIndexed);
}

# C6.2.113 LDR (register) page C6-698 line 40646 MATCH xb8600800/mask=xbfe00c00
# CONSTRUCT xf8600800/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xf8600800/mask=xffe00c00 --status nomem

:ldr Rt_GPR64, addrIndexed
is size.ldstr=3 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=1 & b_2121=1 & b_1011=2 & addrIndexed & Rt_GPR64
{
	Rt_GPR64 = *addrIndexed;
}

# C6.2.114 LDRAA, LDRAB page C6-700 line 40758 KEEPWITH

# TODO is ldra_simm necessary, or is it identical to addrIndexed?

# Xn (imm9 == 0), without wback
ldra_simm: "["^Rn_GPR64xsp^"]"
is b_22=0 & b_1220=0 & b_11=0 & Rn_GPR64xsp
{
	export Rn_GPR64xsp;
}

# Xn (imm9 == 0), with wback
ldra_simm: "["^Rn_GPR64xsp^"]"
is b_22=0 & b_1220=0 & b_11=1 & Rn_GPR64xsp
{
	export Rn_GPR64xsp;
}

# Xn + simm (with no sign added), without wback
ldra_simm: "["^Rn_GPR64xsp^", #"^b_1220^"]"
is b_22=0 & b_1220 & b_11=0 & Rn_GPR64xsp
{
	local tmp:8 = (b_1220:8 << 3) + Rn_GPR64xsp;
	export tmp;
}

# Xn + simm (with no sign added), with wback
ldra_simm: "["^Rn_GPR64xsp^", #"^b_1220^"]!"
is b_22=0 & b_1220 & b_11=1 & Rn_GPR64xsp
{
	local tmp:8 = (b_1220:8 << 3) + Rn_GPR64xsp;
	export tmp;
}

# Xn + imm9 (sign added), without wback
ldra_simm: "["^Rn_GPR64xsp^", #"^tmpimm^"]"
is b_22=1 & b_1220 & b_11=0 & Rn_GPR64xsp
[ tmpimm = b_1220 - 0x200; ]
{
	local tmp:8 = sext(tmpimm:3 << 3) + Rn_GPR64xsp;
	export tmp;
}

# Xn + imm9 (sign added), with wback
ldra_simm: "["^Rn_GPR64xsp^", #"^tmpimm^"]!"
is b_22=1 & b_1220 & b_11=1 & Rn_GPR64xsp
[ tmpimm = b_1220 - 0x200; ]
{
	local tmp:8 = sext(tmpimm:3 << 3) + Rn_GPR64xsp;
	Rn_GPR64xsp = tmp;
	export tmp;
}

# C6.2.114 LDRAA, LDRAB page C6-700 line 40758 MATCH xf8200400/mask=xff200400
# CONSTRUCT xf8200400/mask=xffa00400 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xf8200400/mask=xffa00400 --status nomem
# M == 0 && W == 0 key A, offset variant
# M == 0 && W == 1 key A, offset variant

:ldraa aa_Xt, ldra_simm
is b_2431=0b11111000 & b_23=0 & b_21=1 & b_10=1 & ldra_simm & aa_Xt
{
	AuthIA(ldra_simm, xzr);
	aa_Xt = *:8 ldra_simm;
}

# C6.2.114 LDRAA, LDRAB page C6-700 line 40758 MATCH xf8200400/mask=xff200400
# CONSTRUCT xf8a00400/mask=xffa00400 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xf8a00400/mask=xffa00400 --status nomem
# M == 1 && W == 0 key B, offset variant
# M == 1 && W == 1 key B, offset variant

:ldrab aa_Xt, addrIndexed
is b_2431=0b11111000 & b_23=1 & b_21=1 & b_10=1 & addrIndexed & aa_Xt
{
	AuthIB(addrIndexed, xzr);
	aa_Xt = *:8 addrIndexed;
}

# C6.2.115 LDRB (immediate) page C6-702 line 40882 MATCH x38400400/mask=xffe00c00
# C6.2.115 LDRB (immediate) page C6-702 line 40882 MATCH x38400c00/mask=xffe00c00
# CONSTRUCT x38400400/mask=xffe00400 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x38400400/mask=xffe00400 --status nomem
# post-index and pre-index variants

:ldrb Rt_GPR32, addrIndexed
is b_2131=0b00111000010 & b_10=1 & addrIndexed & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = zext(*:1 addrIndexed);
}

# C6.2.115 LDRB (immediate) page C6-702 line 40882 MATCH x39400000/mask=xffc00000
# CONSTRUCT x39400000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x39400000/mask=xffc00000 --status nomem
# unsigned offset variant

:ldrb Rt_GPR32, addrIndexed
is b_2231=0b0011100101 & addrIndexed & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = zext(*:1 addrIndexed);
}

# C6.2.116 LDRB (register) page C6-704 line 41018 MATCH x38600800/mask=xffe00c00
# CONSTRUCT x38600800/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x38600800/mask=xffe00c00 --status nomem
# extended register and shifted register variant
# determined in addrIndexed subtable

:ldrb Rt_GPR32, addrIndexed
is b_2131=0b00111000011 & b_1011=2 & addrIndexed & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = zext(*:1 addrIndexed);
}

# C6.2.117 LDRH (immediate) page C6-706 line 41110 MATCH x79400000/mask=xffc00000
# CONSTRUCT x79400000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x79400000/mask=xffc00000 --status nomem

:ldrh Rt_GPR32, addrUIMM
is size.ldstr=1 & b_2729=7 & v=0 & b_2425=1 & b_23=0 & b_2222=1 & addrUIMM & Rn_GPR64xsp & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = zext(*:2 addrUIMM);
}

# C6.2.117 LDRH (immediate) page C6-706 line 41110 MATCH x78400400/mask=xffe00c00
# C6.2.117 LDRH (immediate) page C6-706 line 41110 MATCH x78400c00/mask=xffe00c00
# CONSTRUCT x78400400/mask=xffe00400 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x78400400/mask=xffe00400 --status nomem

:ldrh Rt_GPR32, addrIndexed
is size.ldstr=1 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=1 & b_2121=0 & b_1010=1 & addrIndexed & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = zext(*:2 addrIndexed);
}

# C6.2.118 LDRH (register) page C6-708 line 41246 MATCH x78600800/mask=xffe00c00
# CONSTRUCT x78600800/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x78600800/mask=xffe00c00 --status nomem

:ldrh Rt_GPR32, addrIndexed
is size.ldstr=1 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=1 & b_2121=1 & b_1011=2 & addrIndexed & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = zext(*:2 addrIndexed);
}

# C6.2.119 LDRSB (immediate) page C6-710 line 41340 MATCH x39800000/mask=xff800000
# CONSTRUCT x39c00000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x39c00000/mask=xffc00000 --status nomem

:ldrsb Rt_GPR32, addrIndexed
is size.ldstr=0 & b_2729=7 & v=0 & b_2425=1 & b_2223=3 & addrIndexed & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = sext(*:1 addrIndexed);
}

# C6.2.119 LDRSB (immediate) page C6-710 line 41340 MATCH x38800400/mask=xffa00c00
# C6.2.119 LDRSB (immediate) page C6-710 line 41340 MATCH x38800c00/mask=xffa00c00
# C6.2.138 LDTRSB page C6-750 line 43766 MATCH x38800800/mask=xffa00c00
# C6.2.150 LDURSB page C6-773 line 45113 MATCH x38800000/mask=xffa00c00
# CONSTRUCT x38c00000/mask=xffe00000 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst x38c00000/mask=xffe00000 --status nomem

:ld^UnscPriv^"rsb" Rt_GPR32, addrIndexed
is size.ldstr=0 & b_2729=7 & v=0 & b_2425=0 & b_2223=3 & b_2121=0 & UnscPriv & addrIndexed & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = zext(*:1 addrIndexed);
}

# C6.2.119 LDRSB (immediate) page C6-710 line 41340 MATCH x38800400/mask=xffa00c00
# C6.2.119 LDRSB (immediate) page C6-710 line 41340 MATCH x38800c00/mask=xffa00c00
# CONSTRUCT x38c00400/mask=xffe00400 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x38c00400/mask=xffe00400 --status nomem

:ldrsb Rt_GPR32, addrIndexed
is size.ldstr=0 & b_2729=7 & v=0 & b_2425=0 & b_2223=3 & b_2121=0 & b_1010=1 & addrIndexed & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = sext(*:1 addrIndexed);
}

# C6.2.119 LDRSB (immediate) page C6-710 line 41340 MATCH x39800000/mask=xff800000
# CONSTRUCT x39800000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x39800000/mask=xffc00000 --status nomem

:ldrsb Rt_GPR64, addrIndexed
is size.ldstr=0 & b_2729=7 & v=0 & b_2425=1 & b_2223=2 & addrIndexed & Rt_GPR64
{
	Rt_GPR64 = sext(*:1 addrIndexed);
}

# C6.2.119 LDRSB (immediate) page C6-710 line 41340 MATCH x38800400/mask=xffa00c00
# C6.2.119 LDRSB (immediate) page C6-710 line 41340 MATCH x38800c00/mask=xffa00c00
# C6.2.138 LDTRSB page C6-750 line 43766 MATCH x38800800/mask=xffa00c00
# C6.2.150 LDURSB page C6-773 line 45113 MATCH x38800000/mask=xffa00c00
# CONSTRUCT x38800000/mask=xffe00000 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst x38800000/mask=xffe00000 --status nomem

:ld^UnscPriv^"rsb" Rt_GPR64, addrIndexed
is size.ldstr=0 & b_2729=7 & v=0 & b_2425=0 & b_2223=2 & b_2121=0 & UnscPriv & addrIndexed & Rt_GPR64
{
	Rt_GPR64 = sext(*:1 addrIndexed);
}

# C6.2.119 LDRSB (immediate) page C6-710 line 41340 MATCH x38800400/mask=xffa00c00
# C6.2.119 LDRSB (immediate) page C6-710 line 41340 MATCH x38800c00/mask=xffa00c00
# CONSTRUCT x38800400/mask=xffe00400 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x38800400/mask=xffe00400 --status nomem

:ldrsb Rt_GPR64, addrIndexed
is size.ldstr=0 & b_2729=7 & v=0 & b_2425=0 & b_2223=2 & b_2121=0 & b_1010=1 & addrIndexed & Rt_GPR64
{
	Rt_GPR64 = sext(*:1 addrIndexed);
}

# C6.2.120 LDRSB (register) page C6-713 line 41549 MATCH x38a00800/mask=xffa00c00
# CONSTRUCT x38e00800/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x38e00800/mask=xffe00c00 --status nomem

:ldrsb Rt_GPR32, addrIndexed
is size.ldstr=0 & b_2729=7 & v=0 & b_2425=0 & b_2223=3 & b_2121=1 & b_1011=2 & addrIndexed & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = sext(*:1 addrIndexed);
}

# C6.2.120 LDRSB (register) page C6-713 line 41549 MATCH x38a00800/mask=xffa00c00
# CONSTRUCT x38a00800/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x38a00800/mask=xffe00c00 --status nomem

:ldrsb Rt_GPR64, addrIndexed
is size.ldstr=0 & b_2729=7 & v=0 & b_2425=0 & b_2223=2 & b_2121=1 & b_1011=2 & addrIndexed & Rt_GPR64
{
	Rt_GPR64 = sext(*:1 addrIndexed);
}

# C6.2.121 LDRSH (immediate) page C6-715 line 41679 MATCH x79800000/mask=xff800000
# CONSTRUCT x79c00000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x79c00000/mask=xffc00000 --status nomem

:ldrsh Rt_GPR32, addrUIMM
is size.ldstr=1 & b_2729=7 & v=0 & b_2425=1 & b_2223=3 & addrUIMM & Rn_GPR64xsp & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = sext(*:2 addrUIMM);
}

# C6.2.121 LDRSH (immediate) page C6-715 line 41679 MATCH x78800400/mask=xffa00c00
# C6.2.121 LDRSH (immediate) page C6-715 line 41679 MATCH x78800c00/mask=xffa00c00
# C6.2.139 LDTRSH page C6-752 line 43885 MATCH x78800800/mask=xffa00c00
# C6.2.151 LDURSH page C6-775 line 45219 MATCH x78800000/mask=xffa00c00
# CONSTRUCT x78c00000/mask=xffe00000 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst x78c00000/mask=xffe00000 --status nomem

:ld^UnscPriv^"rsh" Rt_GPR32, addrIndexed
is size.ldstr=1 & b_2729=7 & v=0 & b_2425=0 & b_2223=3 & b_2121=0 & UnscPriv & addrIndexed & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = sext(*:2 addrIndexed);
}

# C6.2.121 LDRSH (immediate) page C6-715 line 41679 MATCH x78800400/mask=xffa00c00
# C6.2.121 LDRSH (immediate) page C6-715 line 41679 MATCH x78800c00/mask=xffa00c00
# CONSTRUCT x78c00400/mask=xffe00400 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x78c00400/mask=xffe00400 --status nomem

:ldrsh Rt_GPR32, addrIndexed
is size.ldstr=1 & b_2729=7 & v=0 & b_2425=0 & b_2223=3 & b_2121=0 & b_1010=1 & addrIndexed & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = sext(*:2 addrIndexed);
}

# C6.2.121 LDRSH (immediate) page C6-715 line 41679 MATCH x79800000/mask=xff800000
# CONSTRUCT x79800000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x79800000/mask=xffc00000 --status nomem

:ldrsh Rt_GPR64, addrUIMM
is size.ldstr=1 & b_2729=7 & v=0 & b_2425=1 & b_2223=2 & addrUIMM & Rn_GPR64xsp & Rt_GPR64
{
	Rt_GPR64 = sext(*:2 addrUIMM);
}

# C6.2.121 LDRSH (immediate) page C6-715 line 41679 MATCH x78800400/mask=xffa00c00
# C6.2.121 LDRSH (immediate) page C6-715 line 41679 MATCH x78800c00/mask=xffa00c00
# C6.2.139 LDTRSH page C6-752 line 43885 MATCH x78800800/mask=xffa00c00
# C6.2.151 LDURSH page C6-775 line 45219 MATCH x78800000/mask=xffa00c00
# CONSTRUCT x78800000/mask=xffe00000 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst x78800000/mask=xffe00000 --status nomem

:ld^UnscPriv^"rsh" Rt_GPR64, addrIndexed
is size.ldstr=1 & b_2729=7 & v=0 & b_2425=0 & b_2223=2 & b_2121=0 & UnscPriv & addrIndexed & Rt_GPR64
{
	Rt_GPR64 = sext(*:2 addrIndexed);
}

# C6.2.121 LDRSH (immediate) page C6-715 line 41679 MATCH x78800400/mask=xffa00c00
# C6.2.121 LDRSH (immediate) page C6-715 line 41679 MATCH x78800c00/mask=xffa00c00
# CONSTRUCT x78800400/mask=xffe00400 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x78800400/mask=xffe00400 --status nomem

:ldrsh Rt_GPR64, addrIndexed
is size.ldstr=1 & b_2729=7 & v=0 & b_2425=0 & b_2223=2 & b_2121=0 & b_1010=1 & addrIndexed & Rt_GPR64
{
	Rt_GPR64 = sext(*:2 addrIndexed);
}

# C6.2.122 LDRSH (register) page C6-718 line 41889 MATCH x78a00800/mask=xffa00c00
# CONSTRUCT x78e00800/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x78e00800/mask=xffe00c00 --status nomem

:ldrsh Rt_GPR32, addrIndexed
is size.ldstr=1 & b_2729=7 & v=0 & b_2425=0 & b_2223=3 & b_2121=1 & b_1011=2 & addrIndexed & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = sext(*:2 addrIndexed);
}

# C6.2.122 LDRSH (register) page C6-718 line 41889 MATCH x78a00800/mask=xffa00c00
# CONSTRUCT x78a00800/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x78a00800/mask=xffe00c00 --status nomem

:ldrsh Rt_GPR64, addrIndexed
is size.ldstr=1 & b_2729=7 & v=0 & b_2425=0 & b_2223=2 & b_2121=1 & b_1011=2 & addrIndexed & Rt_GPR64
{
	Rt_GPR64 = sext(*:2 addrIndexed);
}

# C6.2.123 LDRSW (immediate) page C6-720 line 42014 MATCH xb8800400/mask=xffe00c00
# C6.2.123 LDRSW (immediate) page C6-720 line 42014 MATCH xb8800c00/mask=xffe00c00
# CONSTRUCT xb8800400/mask=xffe00400 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xb8800400/mask=xffe00400 --status nomem

:ldrsw Rt_GPR64, addrIndexed
is size.ldstr=2 & b_2729=7 & v=0 & b_2425=0 & b_2223=2 & b_2121=0 & b_1010=1 & addrIndexed & Rt_GPR64
{
	Rt_GPR64 = sext(*:4 addrIndexed);
}

# C6.2.123 LDRSW (immediate) page C6-720 line 42014 MATCH xb9800000/mask=xffc00000
# CONSTRUCT xb9800000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xb9800000/mask=xffc00000 --status nomem

:ldrsw Rt_GPR64, addrIndexed
is size.ldstr=2 & b_2729=7 & v=0 & b_2425=1 & b_2223=2 & addrIndexed & Rt_GPR64
{
	Rt_GPR64 = sext(*:4 addrIndexed);
}

# C6.2.124 LDRSW (literal) page C6-722 line 42150 MATCH x98000000/mask=xff000000
# CONSTRUCT x98000000/mask=xff000000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x98000000/mask=xff000000 --status nomem

:ldrsw Rt_GPR64, AddrLoc19
is b_2431=0b10011000 & AddrLoc19 & Rt_GPR64
{
	Rt_GPR64 = sext(*:4 AddrLoc19);
}

# C6.2.125 LDRSW (register) page C6-723 line 42199 MATCH xb8a00800/mask=xffe00c00
# CONSTRUCT xb8a00800/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xb8a00800/mask=xffe00c00 --status nomem

:ldrsw Rt_GPR64, addrIndexed
is size.ldstr=2 & b_2729=7 & v=0 & b_2425=0 & b_2223=2 & b_2121=1 & b_1011=2 & addrIndexed & Rt_GPR64
{
	Rt_GPR64 = sext(*:4 addrIndexed);
}

# C6.2.135 LDTR page C6-746 line 43523 MATCH xb8400800/mask=xbfe00c00
# CONSTRUCT xf8400800/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xf8400800/mask=xffe00c00 --status nomem

:ld^UnscPriv^"r" Rt_GPR64, addrIndexed
is size.ldstr=3 & b_2729=7 & v=0 & b_2425=0 & b_2223=1 & b_2121=0 & b_1011=2 & UnscPriv & addrIndexed & Rt_GPR64
{
	Rt_GPR64 = *addrIndexed;
}

# C6.2.136 LDTRB page C6-748 line 43620 MATCH x38400800/mask=xffe00c00
# C6.2.148 LDURB page C6-771 line 44991 MATCH x38400000/mask=xffe00c00
# CONSTRUCT x38400000/mask=xffe00000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x38400000/mask=xffe00000 --status nomem

:ld^UnscPriv^"rb" Rt_GPR32, addrIndexed
is size.ldstr=0 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=1 & b_2121=0 & UnscPriv & addrIndexed & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = zext(*:1 addrIndexed);
}

# C6.2.137 LDTRH page C6-749 line 43693 MATCH x78400800/mask=xffe00c00
# C6.2.149 LDURH page C6-772 line 45052 MATCH x78400000/mask=xffe00c00
# CONSTRUCT x78400000/mask=xffe00000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x78400000/mask=xffe00000 --status nomem

:ld^UnscPriv^"rh" Rt_GPR32, addrIndexed
is size.ldstr=1 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=1 & b_2121=0 & UnscPriv & addrIndexed & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = zext(*:2 addrIndexed);
}

# C6.2.140 LDTRSW page C6-754 line 44005 MATCH xb8800800/mask=xffe00c00
# C6.2.152 LDURSW page C6-777 line 45325 MATCH xb8800000/mask=xffe00c00
# CONSTRUCT xb8800000/mask=xffe00000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xb8800000/mask=xffe00000 --status nomem

:ld^UnscPriv^"rsw" Rt_GPR64, addrIndexed
is size.ldstr=2 & b_2729=7 & v=0 & b_2425=0 & b_2223=2 & b_2121=0 & UnscPriv & addrIndexed & Rt_GPR64
{
	Rt_GPR64 = sext(*:4 addrIndexed);
}

# C6.2.147 LDUR page C6-769 line 44904 MATCH xb8400000/mask=xbfe00c00
# CONSTRUCT xf8400000/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xf8400000/mask=xffe00c00 --status nomem

:ld^UnscPriv^"r" Rt_GPR64, addrIndexed
is size.ldstr=3 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2122=2 & b_1011=0 & UnscPriv & addrIndexed & Rt_GPR64
{
	Rt_GPR64 = *addrIndexed;
}

# C6.2.153 LDXP page C6-778 line 45386 MATCH x88600000/mask=xbfe08000
# CONSTRUCT xc8600000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xc8600000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111

:ldxp Rt_GPR64, Rt2_GPR64, addrReg
is size.ldstr=3 & b_2429=0x8 & b_23=0 & L=1 & b_21=1 & b_15=0 & Rt2_GPR64 & addrReg & Rt_GPR64
{
	Rt_GPR64 = *addrReg;
	Rt2_GPR64 = *(addrReg + 8);
}

# C6.2.153 LDXP page C6-778 line 45386 MATCH x88600000/mask=xbfe08000
# CONSTRUCT x88600000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x88600000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111

:ldxp Rt_GPR32, Rt2_GPR32, addrReg
is size.ldstr=2 & b_2429=0x8 & b_23=0 & L=1 & b_21=1 & b_15=0 & Rt2_GPR32 & addrReg & Rt_GPR32 & Rt_GPR64 & Rt2_GPR64
{
	Rt_GPR64 = zext(*:4 addrReg);
	Rt2_GPR64 = zext(*:4 (addrReg + 4));
}

# C6.2.154 LDXR page C6-780 line 45511 MATCH x88400000/mask=xbfe08000
# CONSTRUCT xc8400000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xc8400000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111

:ldxr Rt_GPR64, addrReg
is size.ldstr=3 & b_2429=0x8 & b_23=0 & L=1 & b_21=0 & b_15=0 & addrReg & Rt_GPR64
{
	Rt_GPR64 = *addrReg;
}

# C6.2.154 LDXR page C6-780 line 45511 MATCH x88400000/mask=xbfe08000
# CONSTRUCT x88400000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x88400000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111

:ldxr Rt_GPR32, addrReg
is size.ldstr=2 & b_2429=0x8 & b_23=0 & L=1 & b_21=0 & b_15=0 & addrReg & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = zext(*:4 addrReg);
}

# C6.2.155 LDXRB page C6-781 line 45584 MATCH x08400000/mask=xffe08000
# CONSTRUCT x08400000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x08400000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111

:ldxrb Rt_GPR32, addrReg
is size.ldstr=0 & b_2429=0x8 & b_23=0 & L=1 & b_21=0 & b_15=0 & addrReg & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = zext(*:1 addrReg);
}

# C6.2.156 LDXRH page C6-782 line 45645 MATCH x48400000/mask=xffe08000
# CONSTRUCT x48400000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x48400000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111

:ldxrh Rt_GPR32, addrReg
is size.ldstr=1 & b_2429=0x8 & b_23=0 & L=1 & b_21=0 & b_15=0 & addrReg & Rt_GPR32 & Rt_GPR64
{
	Rt_GPR64 = zext(*:2 addrReg);
}

# C6.2.157 LSL (register) page C6-783 line 45706 MATCH x1ac02000/mask=x7fe0fc00
# C6.2.159 LSLV page C6-785 line 45848 MATCH x1ac02000/mask=x7fe0fc00
# CONSTRUCT x1ac02000/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x1ac02000/mask=xffe0fc00 --status pass

:lsl Rd_GPR32, Rn_GPR32, Rm_GPR32
is sf=0 & b_3030=0 & S=0 & b_2428=0x1a & b_2123=6 & Rm_GPR32 & b_1015=0x8 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	shiftval:8 = zext(Rm_GPR32 & 0x1f);
	tmp_1:4 = Rn_GPR32 << shiftval;
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.157 LSL (register) page C6-783 line 45706 MATCH x1ac02000/mask=x7fe0fc00
# C6.2.159 LSLV page C6-785 line 45848 MATCH x1ac02000/mask=x7fe0fc00
# CONSTRUCT x9ac02000/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x9ac02000/mask=xffe0fc00 --status pass

:lsl Rd_GPR64, Rn_GPR64, Rm_GPR64
is sf=1 & b_3030=0 & S=0 & b_2428=0x1a & b_2123=6 & Rm_GPR64 & b_1015=0x8 & Rn_GPR64 & Rd_GPR64
{
	shiftval:8 = (Rm_GPR64 & 0x3f);
	tmp_1:8 = Rn_GPR64 << shiftval;
	Rd_GPR64 = tmp_1;
}

# C6.2.158 LSL (immediate) page C6-784 line 45779 KEEPWITH

ubfiz_lsb: "#"^imm is ImmR [ imm = 32 - ImmR; ] { export *[const]:4 imm; }
ubfiz_width: "#"^imm is ImmS [ imm = ImmS + 1; ] { export *[const]:4 imm; }
ubfiz_lsb64: "#"^imm is ImmR [ imm = 64 - ImmR; ] { export *[const]:4 imm; }
ubfx_width: "#"^imm is ImmR & ImmS [ imm = ImmS - ImmR + 1; ] { export *[const]:4 imm; }

# C6.2.158 LSL (immediate) page C6-784 line 45779 MATCH x53000000/mask=x7f800000
# C6.2.161 LSR (immediate) page C6-787 line 45990 MATCH x53007c00/mask=x7f807c00
# C6.2.293 UBFIZ page C6-988 line 57269 MATCH x53000000/mask=x7f800000
# C6.2.294 UBFM page C6-989 line 57341 MATCH x53000000/mask=x7f800000
# C6.2.295 UBFX page C6-991 line 57453 MATCH x53000000/mask=x7f800000
# C6.2.302 UXTB page C6-998 line 57884 MATCH x53001c00/mask=xfffffc00
# C6.2.303 UXTH page C6-999 line 57932 MATCH x53003c00/mask=xfffffc00
# CONSTRUCT x53000012/mask=xffe0801e MATCHED 7 DOCUMENTED OPCODES
# AUNIT --inst x53000012/mask=xffe0801e --status pass
# Alias for ubfm where imms+1=immr and imms != '011111'
# if sf == '0' && (N != '0' || immr<5> != '0' || imms<5> != '0') then ReservedValue();

:lsl Rd_GPR32, Rn_GPR32, LSB_bitfield32_imm_shift
is ImmR=ImmS+1 & ImmS_ne_1f=1 & ImmS_LT_ImmR_minus_1=0 & ImmS_EQ_ImmR=0 & ImmS_LT_ImmR=1 & sf=0 & opc=2 & b_2428=0x13 & b_2323=0 & n=0 & b_21=0 & b_15=0 & LSB_bitfield32_imm_shift & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	local tmp:4 = Rn_GPR32 << LSB_bitfield32_imm_shift;
	Rd_GPR64 = zext(tmp);
}

# C6.2.158 LSL (immediate) page C6-784 line 45779 MATCH x53000000/mask=x7f800000
# C6.2.161 LSR (immediate) page C6-787 line 45990 MATCH x53007c00/mask=x7f807c00
# C6.2.293 UBFIZ page C6-988 line 57269 MATCH x53000000/mask=x7f800000
# C6.2.294 UBFM page C6-989 line 57341 MATCH x53000000/mask=x7f800000
# C6.2.295 UBFX page C6-991 line 57453 MATCH x53000000/mask=x7f800000
# CONSTRUCT xd3400022/mask=xffc0002e MATCHED 5 DOCUMENTED OPCODES
# AUNIT --inst xd3400022/mask=xffc0002e --status pass
# Alias for ubfm where imms+1=immr and imms != '111111'

:lsl Rd_GPR64, Rn_GPR64, LSB_bitfield64_imm_shift
is ImmR=ImmS+1 & ImmS_ne_3f=1 & ImmS_LT_ImmR_minus_1=0 & ImmS_EQ_ImmR=0 & ImmS_LT_ImmR=1 & sf=1 & opc=2 & b_2428=0x13 & b_2323=0 & n=1 & LSB_bitfield64_imm_shift & Rn_GPR64 & Rd_GPR64
{
	Rd_GPR64 = Rn_GPR64 << LSB_bitfield64_imm_shift;
}

# C6.2.160 LSR (register) page C6-786 line 45917 MATCH x1ac02400/mask=x7fe0fc00
# C6.2.162 LSRV page C6-788 line 46059 MATCH x1ac02400/mask=x7fe0fc00
# CONSTRUCT x1ac02400/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x1ac02400/mask=xffe0fc00 --status pass

:lsr Rd_GPR32, Rn_GPR32, Rm_GPR32
is sf=0 & b_3030=0 & S=0 & b_2428=0x1a & b_2123=6 & Rm_GPR32 & b_1015=0x9 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	shiftval:8 = zext(Rm_GPR32 & 0x1f);
	tmp_1:4 = Rn_GPR32 >> shiftval;
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.160 LSR (register) page C6-786 line 45917 MATCH x1ac02400/mask=x7fe0fc00
# C6.2.162 LSRV page C6-788 line 46059 MATCH x1ac02400/mask=x7fe0fc00
# CONSTRUCT x9ac02400/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x9ac02400/mask=xffe0fc00 --status pass

:lsr Rd_GPR64, Rn_GPR64, Rm_GPR64
is sf=1 & b_3030=0 & S=0 & b_2428=0x1a & b_2123=6 & Rm_GPR64 & b_1015=0x9 & Rn_GPR64 & Rd_GPR64
{
	shiftval:8 = Rm_GPR64 & 0x3f;
	tmp_1:8 = Rn_GPR64 >> shiftval;
	Rd_GPR64 = tmp_1;
}

# C6.2.161 LSR (immediate) page C6-787 line 45990 MATCH x53007c00/mask=x7f807c00
# C6.2.158 LSL (immediate) page C6-784 line 45779 MATCH x53000000/mask=x7f800000
# C6.2.293 UBFIZ page C6-988 line 57269 MATCH x53000000/mask=x7f800000
# C6.2.294 UBFM page C6-989 line 57341 MATCH x53000000/mask=x7f800000
# C6.2.295 UBFX page C6-991 line 57453 MATCH x53000000/mask=x7f800000
# CONSTRUCT x53007c00/mask=xffe0fc1a MATCHED 5 DOCUMENTED OPCODES
# AUNIT --inst x53007c00/mask=xffe0fc1a --status pass
# Alias for ubfm where imms=='011111'
# imms is MAX_INT5, so it will never be less than immr. Note that immr is limited to [0,31]
# if sf == '0' && (N != '0' || immr<5> != '0' || imms<5> != '0') then ReservedValue();

:lsr Rd_GPR32, Rn_GPR32, ImmRConst32
is ImmS=0x1f & ImmS_ne_1f=0 & ImmS_LT_ImmR=0 & ImmS_LT_ImmR_minus_1=0 & sf=0 & opc=2 & b_2428=0x13 & b_2323=0 & n=0 & b_21=0 & b_15=0 & ImmRConst32 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp_2:4 = ImmRConst32;
	tmp_1:4 = Rn_GPR32 >> tmp_2;
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.161 LSR (immediate) page C6-787 line 45990 MATCH x53007c00/mask=x7f807c00
# C6.2.158 LSL (immediate) page C6-784 line 45779 MATCH x53000000/mask=x7f800000
# C6.2.293 UBFIZ page C6-988 line 57269 MATCH x53000000/mask=x7f800000
# C6.2.294 UBFM page C6-989 line 57341 MATCH x53000000/mask=x7f800000
# C6.2.295 UBFX page C6-991 line 57453 MATCH x53000000/mask=x7f800000
# CONSTRUCT xd340fc00/mask=xffc0fc2a MATCHED 5 DOCUMENTED OPCODES
# AUNIT --inst xd340fc00/mask=xffc0fc2a --status pass
# Alias for ubfm where imms=='111111'
# imms is MAX_INT6, so it will never be less than immr.

:lsr Rd_GPR64, Rn_GPR64, ImmRConst64
is ImmS=0x3f & ImmS_ne_3f=0 & ImmS_LT_ImmR=0 & ImmS_LT_ImmR_minus_1=0 & sf=1 & opc=2 & b_2428=0x13 & b_2323=0 & n=1 & ImmRConst64 & Rn_GPR64 & Rd_GPR64
{
	tmp_2:8 = ImmRConst64;
	tmp_1:8 = Rn_GPR64 >> tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.163 MADD page C6-789 line 46128 MATCH x1b000000/mask=x7fe08000
# C6.2.177 MUL page C6-808 line 47204 MATCH x1b007c00/mask=x7fe0fc00
# CONSTRUCT x1b000000/mask=xffe08000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x1b000000/mask=xffe08000 --status pass

:madd Rd_GPR32, Rn_GPR32, Rm_GPR32, Ra_GPR32
is sf=0 & op.dp3_op54=0 & b_2428=0x1b & op.dp3_op31=0 & Rm_GPR32 & op.dp3_o0=0 & Ra_GPR32 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp_2:4 = Rn_GPR32 * Rm_GPR32;
	addflags(Ra_GPR32, tmp_2);
	tmp_1:4 = Ra_GPR32 + tmp_2;
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.163 MADD page C6-789 line 46128 MATCH x1b000000/mask=x7fe08000
# C6.2.177 MUL page C6-808 line 47204 MATCH x1b007c00/mask=x7fe0fc00
# CONSTRUCT x9b000000/mask=xffe08000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x9b000000/mask=xffe08000 --status pass

:madd Rd_GPR64, Rn_GPR64, Rm_GPR64, Ra_GPR64
is sf=1 & op.dp3_op54=0 & b_2428=0x1b & op.dp3_op31=0 & Rm_GPR64 & op.dp3_o0=0 & Ra_GPR64 & Rn_GPR64 & Rd_GPR64
{
	tmp_2:8 = Rn_GPR64 * Rm_GPR64;
	tmp_1:8 = Ra_GPR64 + tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.164 MNEG page C6-791 line 46226 MATCH x1b00fc00/mask=x7fe0fc00
# C6.2.176 MSUB page C6-806 line 47107 MATCH x1b008000/mask=x7fe08000
# CONSTRUCT x9b00fc00/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x9b00fc00/mask=xffe0fc00 --status pass

:mneg Rd_GPR64, Rn_GPR64, Rm_GPR64
is sf=1 & op.dp3_op54=0 & b_2428=0x1b & op.dp3_op31=0 & Rm_GPR64 & op.dp3_o0=1 & Ra=0x1f & Rn_GPR64 & Rd_GPR64
{
	tmp_2:8 = Rn_GPR64 * Rm_GPR64;
	tmp_1:8 = -tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.164 MNEG page C6-791 line 46226 MATCH x1b00fc00/mask=x7fe0fc00
# C6.2.176 MSUB page C6-806 line 47107 MATCH x1b008000/mask=x7fe08000
# CONSTRUCT x1b00fc00/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x1b00fc00/mask=xffe0fc00 --status pass

:mneg Rd_GPR32, Rn_GPR32, Rm_GPR32
is sf=0 & op.dp3_op54=0 & b_2428=0x1b & op.dp3_op31=0 & Rm_GPR32 & op.dp3_o0=1 & Ra=0x1f & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp_2:4 = Rn_GPR32 * Rm_GPR32;
	tmp_1:4 = -tmp_2;
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.165 MOV (to/from SP) page C6-792 line 46299 MATCH x11000000/mask=x7ffffc00
# C6.2.4 ADD (immediate) page C6-531 line 31314 MATCH x11000000/mask=x7f000000
# CONSTRUCT x11000000/mask=xfffffc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x11000000/mask=xfffffc00 --status pass

:mov Rd_GPR32xsp, Rn_GPR32xsp
is sf=0 & b_30=0 & S=0 & b_2428=0x011 & (aa_Xn=31 | aa_Xd=31) & shift=0 & imm12=0 & Rn_GPR32xsp & Rd_GPR32xsp & Rd_GPR64xsp
{
	Rd_GPR64xsp = zext(Rn_GPR32xsp);
}

# C6.2.165 MOV (to/from SP) page C6-792 line 46299 MATCH x11000000/mask=x7ffffc00
# C6.2.4 ADD (immediate) page C6-531 line 31314 MATCH x11000000/mask=x7f000000
# CONSTRUCT x91000000/mask=xfffffc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x91000000/mask=xfffffc00 --status pass

:mov Rd_GPR64xsp, Rn_GPR64xsp
is sf=1 & b_30=0 & S=0 & b_2428=0x11 & (aa_Xn=31 | aa_Xd=31) & shift=0 & imm12=0 & Rn_GPR64xsp & Rd_GPR64xsp
{
	Rd_GPR64xsp = Rn_GPR64xsp;
}

# C6.2.166 MOV (inverted wide immediate) page C6-793 line 46366 KEEPWITH

FullImm_movz32_imm: "#"^val is imm16 & aa_hw=0 [ val = (imm16 << 0) & 0xffffffff; ] { export *[const]:8 val; }
FullImm_movz32_imm: "#"^val is imm16 & aa_hw=1 [ val = (imm16 << 16) & 0xffffffff; ] { export *[const]:8 val; }

FullImm_movz64_imm: "#"^val is imm16 & aa_hw [ val = imm16 << (aa_hw * 16); ] { export *[const]:8 val; }

FullImm_movn32_imm: "#"^val is imm16 & aa_hw=0 [ val = ~(imm16 << 0) & 0xffffffff; ] { export *[const]:8 val; }
FullImm_movn32_imm: "#"^val is imm16 & aa_hw=1 [ val = ~(imm16 << 16) & 0xffffffff; ] { export *[const]:8 val; }

FullImm_movn64_imm: "#"^val is imm16 & aa_hw [ val = ~(imm16 << (aa_hw * 16)); ] { export *[const]:8 val; }

FullImm_movk32_mask: mask is aa_hw [ mask = (~(0xffff << (aa_hw * 16))) & 0xffffffff; ] { export *[const]:4 mask; }
FullImm_movk32_shift: tmp is imm16 & aa_hw [ tmp = (imm16 << (aa_hw * 16)) & 0xffffffff; ] { export *[const]:4 tmp; }
FullImm_movk32_imm: "#"^imm16 is imm16 & aa_hw=0 { export *[const]:4 imm16; }
FullImm_movk32_imm: "#"^imm16, "LSL #16" is imm16 & aa_hw=1 & FullImm_movk32_shift { export FullImm_movk32_shift; }

FullImm_movk64_mask: mask is aa_hw [ mask = ~(0xffff << (aa_hw * 16)); ] { export *[const]:8 mask; }
FullImm_movk64_shift: tmp is imm16 & aa_hw [ tmp = (imm16 << (aa_hw * 16)); ] { export *[const]:8 tmp; }
FullImm_movk64_imm: "#"^imm16 is imm16 & aa_hw=0 { export *[const]:8 imm16; }
FullImm_movk64_imm: "#"^imm16, "LSL #16" is imm16 & aa_hw=1 & FullImm_movk64_shift { export FullImm_movk64_shift; }
FullImm_movk64_imm: "#"^imm16, "LSL #32" is imm16 & aa_hw=2 & FullImm_movk64_shift { export FullImm_movk64_shift; }
FullImm_movk64_imm: "#"^imm16, "LSL #48" is imm16 & aa_hw=3 & FullImm_movk64_shift { export FullImm_movk64_shift; }

# C6.2.166 MOV (inverted wide immediate) page C6-793 line 46366 MATCH x12800000/mask=x7f800000
# C6.2.171 MOVN page C6-798 line 46703 MATCH x12800000/mask=x7f800000
# CONSTRUCT x12800000/mask=xff800000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x12800000/mask=xff800000 --status pass

:mov Rd_GPR32, FullImm_movn32_imm
is sf=0 & opc=0 & b_2428=0x12 & b_2323=1 & FullImm_movn32_imm & Rd_GPR32 & Rd_GPR64
{
	# Special case MOVN
	Rd_GPR64 = FullImm_movn32_imm;
}

# C6.2.166 MOV (inverted wide immediate) page C6-793 line 46366 MATCH x12800000/mask=x7f800000
# C6.2.171 MOVN page C6-798 line 46703 MATCH x12800000/mask=x7f800000
# CONSTRUCT x92800000/mask=xff800000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x92800000/mask=xff800000 --status pass

:mov Rd_GPR64, FullImm_movn64_imm
is sf=1 & opc=0 & b_2428=0x12 & b_2323=1 & FullImm_movn64_imm & Rd_GPR64
{
	# Special case MOVN
	Rd_GPR64 = FullImm_movn64_imm;
}

# C6.2.167 MOV (wide immediate) page C6-794 line 46437 MATCH x52800000/mask=x7f800000
# C6.2.172 MOVZ page C6-800 line 46791 MATCH x52800000/mask=x7f800000
# CONSTRUCT x52800000/mask=xff800000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x52800000/mask=xff800000 --status pass

:mov Rd_GPR32, FullImm_movz32_imm
is sf=0 & opc=2 & b_2428=0x12 & b_2323=1 & FullImm_movz32_imm & Rd_GPR32 & Rd_GPR64
{
	Rd_GPR64 = FullImm_movz32_imm;
}

# C6.2.167 MOV (wide immediate) page C6-794 line 46437 MATCH x52800000/mask=x7f800000
# C6.2.172 MOVZ page C6-800 line 46791 MATCH x52800000/mask=x7f800000
# CONSTRUCT xd2800000/mask=xff800000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd2800000/mask=xff800000 --status pass

:mov Rd_GPR64, FullImm_movz64_imm
is sf=1 & opc=2 & b_2428=0x12 & b_2323=1 & FullImm_movz64_imm & Rd_GPR64
{
	Rd_GPR64 = FullImm_movz64_imm;
}

# C6.2.168 MOV (bitmask immediate) page C6-795 line 46506 MATCH x320003e0/mask=x7f8003e0
# C6.2.185 ORR (immediate) page C6-820 line 47803 MATCH x32000000/mask=x7f800000
# CONSTRUCT x320003e0/mask=xffe0ffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x320003e0/mask=xffe0ffe0 --status pass

:mov Rd_GPR32wsp, DecodeWMask32
is sf=0 & opc=1 & b_2428=0x12 & b_2223=0 & N=0 & imm6=0 & DecodeWMask32 & aa_Xn=31 & Rd_GPR32wsp & Rd_GPR64xsp
{
	# special case ORR
	tmp_1:4 = DecodeWMask32;
	Rd_GPR64xsp = zext(tmp_1);
}

# C6.2.168 MOV (bitmask immediate) page C6-795 line 46506 MATCH x320003e0/mask=x7f8003e0
# C6.2.185 ORR (immediate) page C6-820 line 47803 MATCH x32000000/mask=x7f800000
# CONSTRUCT xb20003e0/mask=xffc0ffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xb20003e0/mask=xffc0ffe0 --status pass

:mov Rd_GPR64xsp, DecodeWMask64
is sf=1 & opc=1 & b_2428=0x12 & b_2223=0 & imm6=0 & DecodeWMask64 & aa_Xn=31 & Rd_GPR64xsp
{
	# special case of ORR
	tmp_1:8 = DecodeWMask64;
	Rd_GPR64xsp = tmp_1;
}

# C6.2.169 MOV (register) page C6-796 line 46574 MATCH x2a0003e0/mask=x7fe0ffe0
# C6.2.186 ORR (shifted register) page C6-822 line 47892 MATCH x2a000000/mask=x7f200000
# CONSTRUCT x2a0003e0/mask=xff2003e0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x2a0003e0/mask=xff2003e0 --status pass

:mov Rd_GPR32, RegShift32Log
is b_31=0 & b_2430=0b0101010 & b_21=0 & b_0509=0b11111 & RegShift32Log & Rd_GPR32 & Rd_GPR64
{
	# special case ORR
	tmp_1:4 = RegShift32Log;
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.169 MOV (register) page C6-796 line 46574 MATCH x2a0003e0/mask=x7fe0ffe0
# C6.2.186 ORR (shifted register) page C6-822 line 47892 MATCH x2a000000/mask=x7f200000
# CONSTRUCT xaa0003e0/mask=xff2003e0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xaa0003e0/mask=xff2003e0 --status pass

:mov Rd_GPR64, RegShift64Log
is b_31=1 & b_2430=0b0101010 & b_21=0 & b_0509=0b11111 & RegShift64Log & Rd_GPR64
{
	# special case of ORR
	tmp_1:8 = RegShift64Log;
	Rd_GPR64 = tmp_1;
}

# C6.2.170 MOVK page C6-797 line 46639 MATCH x72800000/mask=x7f800000
# CONSTRUCT x72800000/mask=xff800000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x72800000/mask=xff800000 --status pass

:movk Rd_GPR32, FullImm_movk32_imm
is sf=0 & opc=3 & b_2428=0x12 & b_2323=1 & FullImm_movk32_imm & Rd_GPR32 & Rd_GPR64 & FullImm_movk32_mask
{
	local tmp:4 = Rd_GPR32 & FullImm_movk32_mask;
	tmp = tmp | FullImm_movk32_imm;
	Rd_GPR64 = zext(tmp);
}

# C6.2.170 MOVK page C6-797 line 46639 MATCH x72800000/mask=x7f800000
# CONSTRUCT xf2800000/mask=xff800000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xf2800000/mask=xff800000 --status pass

:movk Rd_GPR64, FullImm_movk64_imm
is sf=1 & opc=3 & b_2428=0x12 & b_2323=1 & FullImm_movk64_imm & Rd_GPR64 & FullImm_movk64_mask
{
	Rd_GPR64 = Rd_GPR64 & FullImm_movk64_mask;
	Rd_GPR64 = Rd_GPR64 | FullImm_movk64_imm;
}

# C6.2.173 MRS page C6-802 line 46877 MATCH KEEPWITH

with : (l=0 | l=1) {
CopReg: spsr_el1 is Op0=3 & Op1_uimm3=0 & CRn=4 & CRm=0 & Op2_uimm3=0 & spsr_el1 { export spsr_el1; }
CopReg: elr_el1 is Op0=3 & Op1_uimm3=0 & CRn=4 & CRm=0 & Op2_uimm3=1 & elr_el1 { export elr_el1; }
CopReg: sp_el0 is Op0=3 & Op1_uimm3=0 & CRn=4 & CRm=1 & Op2_uimm3=0 & sp_el0 { export sp_el0; }
CopReg: spsel is Op0=3 & Op1_uimm3=0 & CRn=4 & CRm=2 & Op2_uimm3=0 & spsel { export spsel; }
CopReg: daif is Op0=3 & Op1_uimm3=3 & CRn=4 & CRm=2 & Op2_uimm3=1 & daif { export daif; }
CopReg: currentel is Op0=3 & Op1_uimm3=0 & CRn=4 & CRm=2 & Op2_uimm3=2 & currentel { export currentel; }
CopReg: nzcv is Op0=3 & Op1_uimm3=3 & CRn=4 & CRm=2 & Op2_uimm3=0 & nzcv { export nzcv; }
CopReg: fpcr is Op0=3 & Op1_uimm3=3 & CRn=4 & CRm=4 & Op2_uimm3=0 & fpcr { export fpcr; }
CopReg: fpsr is Op0=3 & Op1_uimm3=3 & CRn=4 & CRm=4 & Op2_uimm3=1 & fpsr { export fpsr; }
CopReg: dspsr_el0 is Op0=3 & Op1_uimm3=3 & CRn=4 & CRm=5 & Op2_uimm3=0 & dspsr_el0 { export dspsr_el0; }
CopReg: dlr_el0 is Op0=3 & Op1_uimm3=3 & CRn=4 & CRm=5 & Op2_uimm3=1 & dlr_el0 { export dlr_el0; }
CopReg: spsr_el2 is Op0=3 & Op1_uimm3=4 & CRn=4 & CRm=0 & Op2_uimm3=0 & spsr_el2 { export spsr_el2; }
CopReg: elr_el2 is Op0=3 & Op1_uimm3=4 & CRn=4 & CRm=0 & Op2_uimm3=1 & elr_el2 { export elr_el2; }
CopReg: sp_el1 is Op0=3 & Op1_uimm3=4 & CRn=4 & CRm=1 & Op2_uimm3=0 & sp_el1 { export sp_el1; }
CopReg: spsr_irq is Op0=3 & Op1_uimm3=4 & CRn=4 & CRm=3 & Op2_uimm3=0 & spsr_irq { export spsr_irq; }
CopReg: spsr_abt is Op0=3 & Op1_uimm3=4 & CRn=4 & CRm=3 & Op2_uimm3=1 & spsr_abt { export spsr_abt; }
CopReg: spsr_und is Op0=3 & Op1_uimm3=4 & CRn=4 & CRm=3 & Op2_uimm3=2 & spsr_und { export spsr_und; }
CopReg: spsr_fiq is Op0=3 & Op1_uimm3=4 & CRn=4 & CRm=3 & Op2_uimm3=3 & spsr_fiq { export spsr_fiq; }
CopReg: spsr_el3 is Op0=3 & Op1_uimm3=6 & CRn=4 & CRm=0 & Op2_uimm3=0 & spsr_el3 { export spsr_el3; }
CopReg: elr_el3 is Op0=3 & Op1_uimm3=6 & CRn=4 & CRm=0 & Op2_uimm3=1 & elr_el3 { export elr_el3; }
CopReg: sp_el2 is Op0=3 & Op1_uimm3=6 & CRn=4 & CRm=1 & Op2_uimm3=0 & sp_el2 { export sp_el2; }
# CopReg: spsr_svc is Op0=3 & Op1_uimm3=0 & CRn=4 & CRm=0 & Op2_uimm3=0 & spsr_svc { export spsr_svc; }
# CopReg: spsr_hyp is Op0=3 & Op1_uimm3=4 & CRn=4 & CRm=0 & Op2_uimm3=0 & spsr_hyp { export spsr_hyp; }

CopReg: midr_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=0 & Op2_uimm3=0 & midr_el1 { export midr_el1; }
CopReg: mpidr_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=0 & Op2_uimm3=5 & mpidr_el1 { export mpidr_el1; }
CopReg: revidr_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=0 & Op2_uimm3=6 & revidr_el1 { export revidr_el1; }
CopReg: id_dfr0_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=1 & Op2_uimm3=2 & id_dfr0_el1 { export id_dfr0_el1; }
CopReg: id_pfr0_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=1 & Op2_uimm3=0 & id_pfr0_el1 { export id_pfr0_el1; }
CopReg: id_pfr1_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=1 & Op2_uimm3=1 & id_pfr1_el1 { export id_pfr1_el1; }
CopReg: id_afr0_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=1 & Op2_uimm3=3 & id_afr0_el1 { export id_afr0_el1; }
CopReg: id_mmfr0_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=1 & Op2_uimm3=4 & id_mmfr0_el1 { export id_mmfr0_el1; }
CopReg: id_mmfr1_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=1 & Op2_uimm3=5 & id_mmfr1_el1 { export id_mmfr1_el1; }
CopReg: id_mmfr2_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=1 & Op2_uimm3=6 & id_mmfr2_el1 { export id_mmfr2_el1; }
CopReg: id_mmfr3_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=1 & Op2_uimm3=7 & id_mmfr3_el1 { export id_mmfr3_el1; }
CopReg: id_isar0_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=2 & Op2_uimm3=0 & id_isar0_el1 { export id_isar0_el1; }
CopReg: id_isar1_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=2 & Op2_uimm3=1 & id_isar1_el1 { export id_isar1_el1; }
CopReg: id_isar2_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=2 & Op2_uimm3=2 & id_isar2_el1 { export id_isar2_el1; }
CopReg: id_isar3_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=2 & Op2_uimm3=3 & id_isar3_el1 { export id_isar3_el1; }
CopReg: id_isar4_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=2 & Op2_uimm3=4 & id_isar4_el1 { export id_isar4_el1; }
CopReg: id_isar5_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=2 & Op2_uimm3=5 & id_isar5_el1 { export id_isar5_el1; }
CopReg: mvfr0_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=3 & Op2_uimm3=0 & mvfr0_el1 { export mvfr0_el1; }
CopReg: mvfr1_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=3 & Op2_uimm3=1 & mvfr1_el1 { export mvfr1_el1; }
CopReg: mvfr2_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=3 & Op2_uimm3=2 & mvfr2_el1 { export mvfr2_el1; }
CopReg: ccsidr_el1 is Op0=3 & Op1_uimm3=1 & CRn=0 & CRm=0 & Op2_uimm3=0 & ccsidr_el1 { export ccsidr_el1; }
CopReg: id_aa64pfr0_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=4 & Op2_uimm3=0 & id_aa64pfr0_el1 { export id_aa64pfr0_el1; }
CopReg: id_aa64pfr1_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=4 & Op2_uimm3=1 & id_aa64pfr1_el1 { export id_aa64pfr1_el1; }
CopReg: id_aa64dfr0_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=5 & Op2_uimm3=0 & id_aa64dfr0_el1 { export id_aa64dfr0_el1; }
CopReg: id_aa64dfr1_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=5 & Op2_uimm3=1 & id_aa64dfr1_el1 { export id_aa64dfr1_el1; }
CopReg: id_aa64isar0_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=6 & Op2_uimm3=0 & id_aa64isar0_el1 { export id_aa64isar0_el1; }
CopReg: id_aa64isar1_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=6 & Op2_uimm3=1 & id_aa64isar1_el1 { export id_aa64isar1_el1; }
CopReg: id_aa64mmfr0_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=7 & Op2_uimm3=0 & id_aa64mmfr0_el1 { export id_aa64mmfr0_el1; }
CopReg: id_aa64mmfr1_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=7 & Op2_uimm3=1 & id_aa64mmfr1_el1 { export id_aa64mmfr1_el1; }
CopReg: id_aa64afr0_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=5 & Op2_uimm3=4 & id_aa64afr0_el1 { export id_aa64afr0_el1; }
CopReg: id_aa64afr1_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=5 & Op2_uimm3=5 & id_aa64afr1_el1 { export id_aa64afr1_el1; }
CopReg: clidr_el1 is Op0=3 & Op1_uimm3=1 & CRn=0 & CRm=0 & Op2_uimm3=1 & clidr_el1 { export clidr_el1; }
CopReg: aidr_el1 is Op0=3 & Op1_uimm3=1 & CRn=0 & CRm=0 & Op2_uimm3=7 & aidr_el1 { export aidr_el1; }
CopReg: csselr_el1 is Op0=3 & Op1_uimm3=2 & CRn=0 & CRm=0 & Op2_uimm3=0 & csselr_el1 { export csselr_el1; }
CopReg: ctr_el0 is Op0=3 & Op1_uimm3=3 & CRn=0 & CRm=0 & Op2_uimm3=1 & ctr_el0 { export ctr_el0; }
CopReg: dczid_el0 is Op0=3 & Op1_uimm3=3 & CRn=0 & CRm=0 & Op2_uimm3=7 & dczid_el0 { export dczid_el0; }
CopReg: vpidr_el2 is Op0=3 & Op1_uimm3=4 & CRn=0 & CRm=0 & Op2_uimm3=0 & vpidr_el2 { export vpidr_el2; }
CopReg: vmpidr_el2 is Op0=3 & Op1_uimm3=4 & CRn=0 & CRm=0 & Op2_uimm3=5 & vmpidr_el2 { export vmpidr_el2; }
CopReg: sctlr_el1 is Op0=3 & Op1_uimm3=0 & CRn=1 & CRm=0 & Op2_uimm3=0 & sctlr_el1 { export sctlr_el1; }
CopReg: actlr_el1 is Op0=3 & Op1_uimm3=0 & CRn=1 & CRm=0 & Op2_uimm3=1 & actlr_el1 { export actlr_el1; }
CopReg: cpacr_el1 is Op0=3 & Op1_uimm3=0 & CRn=1 & CRm=0 & Op2_uimm3=2 & cpacr_el1 { export cpacr_el1; }
CopReg: sctlr_el2 is Op0=3 & Op1_uimm3=4 & CRn=1 & CRm=0 & Op2_uimm3=0 & sctlr_el2 { export sctlr_el2; }
CopReg: actlr_el2 is Op0=3 & Op1_uimm3=4 & CRn=1 & CRm=0 & Op2_uimm3=1 & actlr_el2 { export actlr_el2; }
CopReg: hcr_el2 is Op0=3 & Op1_uimm3=4 & CRn=1 & CRm=1 & Op2_uimm3=0 & hcr_el2 { export hcr_el2; }
CopReg: mdcr_el2 is Op0=3 & Op1_uimm3=4 & CRn=1 & CRm=1 & Op2_uimm3=1 & mdcr_el2 { export mdcr_el2; }
CopReg: cptr_el2 is Op0=3 & Op1_uimm3=4 & CRn=1 & CRm=1 & Op2_uimm3=2 & cptr_el2 { export cptr_el2; }
CopReg: hstr_el2 is Op0=3 & Op1_uimm3=4 & CRn=1 & CRm=1 & Op2_uimm3=3 & hstr_el2 { export hstr_el2; }
CopReg: hacr_el2 is Op0=3 & Op1_uimm3=4 & CRn=1 & CRm=1 & Op2_uimm3=7 & hacr_el2 { export hacr_el2; }
CopReg: sctlr_el3 is Op0=3 & Op1_uimm3=6 & CRn=1 & CRm=0 & Op2_uimm3=0 & sctlr_el3 { export sctlr_el3; }
CopReg: actlr_el3 is Op0=3 & Op1_uimm3=6 & CRn=1 & CRm=0 & Op2_uimm3=1 & actlr_el3 { export actlr_el3; }
CopReg: scr_el3 is Op0=3 & Op1_uimm3=6 & CRn=1 & CRm=1 & Op2_uimm3=0 & scr_el3 { export scr_el3; }
CopReg: cptr_el3 is Op0=3 & Op1_uimm3=6 & CRn=1 & CRm=1 & Op2_uimm3=2 & cptr_el3 { export cptr_el3; }
CopReg: mdcr_el3 is Op0=3 & Op1_uimm3=6 & CRn=1 & CRm=3 & Op2_uimm3=1 & mdcr_el3 { export mdcr_el3; }
CopReg: ttbr0_el1 is Op0=3 & Op1_uimm3=0 & CRn=2 & CRm=0 & Op2_uimm3=0 & ttbr0_el1 { export ttbr0_el1; }
CopReg: ttbr1_el1 is Op0=3 & Op1_uimm3=0 & CRn=2 & CRm=0 & Op2_uimm3=1 & ttbr1_el1 { export ttbr1_el1; }
CopReg: ttbr0_el2 is Op0=3 & Op1_uimm3=4 & CRn=2 & CRm=0 & Op2_uimm3=0 & ttbr0_el2 { export ttbr0_el2; }
CopReg: ttbr0_el3 is Op0=3 & Op1_uimm3=6 & CRn=2 & CRm=0 & Op2_uimm3=0 & ttbr0_el3 { export ttbr0_el3; }
CopReg: vttbr_el2 is Op0=3 & Op1_uimm3=4 & CRn=2 & CRm=1 & Op2_uimm3=0 & vttbr_el2 { export vttbr_el2; }
CopReg: tcr_el1 is Op0=3 & Op1_uimm3=0 & CRn=2 & CRm=0 & Op2_uimm3=2 & tcr_el1 { export tcr_el1; }
CopReg: tcr_el2 is Op0=3 & Op1_uimm3=4 & CRn=2 & CRm=0 & Op2_uimm3=2 & tcr_el2 { export tcr_el2; }
CopReg: tcr_el3 is Op0=3 & Op1_uimm3=6 & CRn=2 & CRm=0 & Op2_uimm3=2 & tcr_el3 { export tcr_el3; }
CopReg: vtcr_el2 is Op0=3 & Op1_uimm3=4 & CRn=2 & CRm=1 & Op2_uimm3=2 & vtcr_el2 { export vtcr_el2; }
CopReg: afsr0_el1 is Op0=3 & Op1_uimm3=0 & CRn=5 & CRm=1 & Op2_uimm3=0 & afsr0_el1 { export afsr0_el1; }
CopReg: afsr1_el1 is Op0=3 & Op1_uimm3=0 & CRn=5 & CRm=1 & Op2_uimm3=1 & afsr1_el1 { export afsr1_el1; }
CopReg: afsr0_el2 is Op0=3 & Op1_uimm3=4 & CRn=5 & CRm=1 & Op2_uimm3=0 & afsr0_el2 { export afsr0_el2; }
CopReg: afsr1_el2 is Op0=3 & Op1_uimm3=4 & CRn=5 & CRm=1 & Op2_uimm3=1 & afsr1_el2 { export afsr1_el2; }
CopReg: afsr0_el3 is Op0=3 & Op1_uimm3=6 & CRn=5 & CRm=1 & Op2_uimm3=0 & afsr0_el3 { export afsr0_el3; }
CopReg: afsr1_el3 is Op0=3 & Op1_uimm3=6 & CRn=5 & CRm=1 & Op2_uimm3=1 & afsr1_el3 { export afsr1_el3; }
CopReg: esr_el1 is Op0=3 & Op1_uimm3=0 & CRn=5 & CRm=2 & Op2_uimm3=0 & esr_el1 { export esr_el1; }
CopReg: esr_el2 is Op0=3 & Op1_uimm3=4 & CRn=5 & CRm=2 & Op2_uimm3=0 & esr_el2 { export esr_el2; }
CopReg: esr_el3 is Op0=3 & Op1_uimm3=6 & CRn=5 & CRm=2 & Op2_uimm3=0 & esr_el3 { export esr_el3; }
CopReg: fpexc32_el2 is Op0=3 & Op1_uimm3=4 & CRn=5 & CRm=3 & Op2_uimm3=0 & fpexc32_el2 { export fpexc32_el2; }
CopReg: far_el1 is Op0=3 & Op1_uimm3=0 & CRn=6 & CRm=0 & Op2_uimm3=0 & far_el1 { export far_el1; }
CopReg: far_el2 is Op0=3 & Op1_uimm3=4 & CRn=6 & CRm=0 & Op2_uimm3=0 & far_el2 { export far_el2; }
CopReg: far_el3 is Op0=3 & Op1_uimm3=6 & CRn=6 & CRm=0 & Op2_uimm3=0 & far_el3 { export far_el3; }
CopReg: hpfar_el2 is Op0=3 & Op1_uimm3=4 & CRn=6 & CRm=0 & Op2_uimm3=4 & hpfar_el2 { export hpfar_el2; }
CopReg: par_el1 is Op0=3 & Op1_uimm3=0 & CRn=7 & CRm=4 & Op2_uimm3=0 & par_el1 { export par_el1; }
CopReg: pmintenset_el1 is Op0=3 & Op1_uimm3=0 & CRn=9 & CRm=14 & Op2_uimm3=1 & pmintenset_el1 { export pmintenset_el1; }
CopReg: pmintenclr_el1 is Op0=3 & Op1_uimm3=0 & CRn=9 & CRm=14 & Op2_uimm3=2 & pmintenclr_el1 { export pmintenclr_el1; }
CopReg: pmcr_el0 is Op0=3 & Op1_uimm3=3 & CRn=9 & CRm=12 & Op2_uimm3=0 & pmcr_el0 { export pmcr_el0; }
CopReg: pmcntenset_el0 is Op0=3 & Op1_uimm3=3 & CRn=9 & CRm=12 & Op2_uimm3=1 & pmcntenset_el0 { export pmcntenset_el0; }
CopReg: pmcntenclr_el0 is Op0=3 & Op1_uimm3=3 & CRn=9 & CRm=12 & Op2_uimm3=2 & pmcntenclr_el0 { export pmcntenclr_el0; }
CopReg: pmovsclr_el0 is Op0=3 & Op1_uimm3=3 & CRn=9 & CRm=12 & Op2_uimm3=3 & pmovsclr_el0 { export pmovsclr_el0; }
CopReg: pmswinc_el0 is Op0=3 & Op1_uimm3=3 & CRn=9 & CRm=12 & Op2_uimm3=4 & pmswinc_el0 { export pmswinc_el0; }
CopReg: pmselr_el0 is Op0=3 & Op1_uimm3=3 & CRn=9 & CRm=12 & Op2_uimm3=5 & pmselr_el0 { export pmselr_el0; }
CopReg: pmceid0_el0 is Op0=3 & Op1_uimm3=3 & CRn=9 & CRm=12 & Op2_uimm3=6 & pmceid0_el0 { export pmceid0_el0; }
CopReg: pmceid1_el0 is Op0=3 & Op1_uimm3=3 & CRn=9 & CRm=12 & Op2_uimm3=7 & pmceid1_el0 { export pmceid1_el0; }
CopReg: pmccntr_el0 is Op0=3 & Op1_uimm3=3 & CRn=9 & CRm=13 & Op2_uimm3=0 & pmccntr_el0 { export pmccntr_el0; }
CopReg: pmxevtyper_el0 is Op0=3 & Op1_uimm3=3 & CRn=9 & CRm=13 & Op2_uimm3=1 & pmxevtyper_el0 { export pmxevtyper_el0; }
CopReg: pmxevcntr_el0 is Op0=3 & Op1_uimm3=3 & CRn=9 & CRm=13 & Op2_uimm3=2 & pmxevcntr_el0 { export pmxevcntr_el0; }
CopReg: pmuserenr_el0 is Op0=3 & Op1_uimm3=3 & CRn=9 & CRm=14 & Op2_uimm3=0 & pmuserenr_el0 { export pmuserenr_el0; }
CopReg: pmovsset_el0 is Op0=3 & Op1_uimm3=3 & CRn=9 & CRm=14 & Op2_uimm3=3 & pmovsset_el0 { export pmovsset_el0; }
CopReg: pmevcntr0_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=8 & Op2_uimm3=0 & pmevcntr0_el0 { export pmevcntr0_el0; }
CopReg: pmevcntr1_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=8 & Op2_uimm3=1 & pmevcntr1_el0 { export pmevcntr1_el0; }
CopReg: pmevcntr2_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=8 & Op2_uimm3=2 & pmevcntr2_el0 { export pmevcntr2_el0; }
CopReg: pmevcntr3_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=8 & Op2_uimm3=3 & pmevcntr3_el0 { export pmevcntr3_el0; }
CopReg: pmevcntr4_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=8 & Op2_uimm3=4 & pmevcntr4_el0 { export pmevcntr4_el0; }
CopReg: pmevcntr5_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=8 & Op2_uimm3=5 & pmevcntr5_el0 { export pmevcntr5_el0; }
CopReg: pmevcntr6_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=8 & Op2_uimm3=6 & pmevcntr6_el0 { export pmevcntr6_el0; }
CopReg: pmevcntr7_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=8 & Op2_uimm3=7 & pmevcntr7_el0 { export pmevcntr7_el0; }
CopReg: pmevcntr8_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=9 & Op2_uimm3=0 & pmevcntr8_el0 { export pmevcntr8_el0; }
CopReg: pmevcntr9_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=9 & Op2_uimm3=1 & pmevcntr9_el0 { export pmevcntr9_el0; }
CopReg: pmevcntr10_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=9 & Op2_uimm3=2 & pmevcntr10_el0 { export pmevcntr10_el0; }
CopReg: pmevcntr11_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=9 & Op2_uimm3=3 & pmevcntr11_el0 { export pmevcntr11_el0; }
CopReg: pmevcntr12_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=9 & Op2_uimm3=4 & pmevcntr12_el0 { export pmevcntr12_el0; }
CopReg: pmevcntr13_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=9 & Op2_uimm3=5 & pmevcntr13_el0 { export pmevcntr13_el0; }
CopReg: pmevcntr14_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=9 & Op2_uimm3=6 & pmevcntr14_el0 { export pmevcntr14_el0; }
CopReg: pmevcntr15_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=9 & Op2_uimm3=7 & pmevcntr15_el0 { export pmevcntr15_el0; }
CopReg: pmevcntr16_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=10 & Op2_uimm3=0 & pmevcntr16_el0 { export pmevcntr16_el0; }
CopReg: pmevcntr17_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=10 & Op2_uimm3=1 & pmevcntr17_el0 { export pmevcntr17_el0; }
CopReg: pmevcntr18_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=10 & Op2_uimm3=2 & pmevcntr18_el0 { export pmevcntr18_el0; }
CopReg: pmevcntr19_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=10 & Op2_uimm3=3 & pmevcntr19_el0 { export pmevcntr19_el0; }
CopReg: pmevcntr20_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=10 & Op2_uimm3=4 & pmevcntr20_el0 { export pmevcntr20_el0; }
CopReg: pmevcntr21_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=10 & Op2_uimm3=5 & pmevcntr21_el0 { export pmevcntr21_el0; }
CopReg: pmevcntr22_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=10 & Op2_uimm3=6 & pmevcntr22_el0 { export pmevcntr22_el0; }
CopReg: pmevcntr23_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=10 & Op2_uimm3=7 & pmevcntr23_el0 { export pmevcntr23_el0; }
CopReg: pmevcntr24_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=11 & Op2_uimm3=0 & pmevcntr24_el0 { export pmevcntr24_el0; }
CopReg: pmevcntr25_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=11 & Op2_uimm3=1 & pmevcntr25_el0 { export pmevcntr25_el0; }
CopReg: pmevcntr26_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=11 & Op2_uimm3=2 & pmevcntr26_el0 { export pmevcntr26_el0; }
CopReg: pmevcntr27_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=11 & Op2_uimm3=3 & pmevcntr27_el0 { export pmevcntr27_el0; }
CopReg: pmevcntr28_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=11 & Op2_uimm3=4 & pmevcntr28_el0 { export pmevcntr28_el0; }
CopReg: pmevcntr29_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=11 & Op2_uimm3=5 & pmevcntr29_el0 { export pmevcntr29_el0; }
CopReg: pmevcntr30_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=11 & Op2_uimm3=6 & pmevcntr30_el0 { export pmevcntr30_el0; }
CopReg: pmevtyper0_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=12 & Op2_uimm3=0 & pmevtyper0_el0 { export pmevtyper0_el0; }
CopReg: pmevtyper1_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=12 & Op2_uimm3=1 & pmevtyper1_el0 { export pmevtyper1_el0; }
CopReg: pmevtyper2_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=12 & Op2_uimm3=2 & pmevtyper2_el0 { export pmevtyper2_el0; }
CopReg: pmevtyper3_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=12 & Op2_uimm3=3 & pmevtyper3_el0 { export pmevtyper3_el0; }
CopReg: pmevtyper4_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=12 & Op2_uimm3=4 & pmevtyper4_el0 { export pmevtyper4_el0; }
CopReg: pmevtyper5_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=12 & Op2_uimm3=5 & pmevtyper5_el0 { export pmevtyper5_el0; }
CopReg: pmevtyper6_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=12 & Op2_uimm3=6 & pmevtyper6_el0 { export pmevtyper6_el0; }
CopReg: pmevtyper7_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=12 & Op2_uimm3=7 & pmevtyper7_el0 { export pmevtyper7_el0; }
CopReg: pmevtyper8_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=13 & Op2_uimm3=0 & pmevtyper8_el0 { export pmevtyper8_el0; }
CopReg: pmevtyper9_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=13 & Op2_uimm3=1 & pmevtyper9_el0 { export pmevtyper9_el0; }
CopReg: pmevtyper10_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=13 & Op2_uimm3=2 & pmevtyper10_el0 { export pmevtyper10_el0; }
CopReg: pmevtyper11_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=13 & Op2_uimm3=3 & pmevtyper11_el0 { export pmevtyper11_el0; }
CopReg: pmevtyper12_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=13 & Op2_uimm3=4 & pmevtyper12_el0 { export pmevtyper12_el0; }
CopReg: pmevtyper13_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=13 & Op2_uimm3=5 & pmevtyper13_el0 { export pmevtyper13_el0; }
CopReg: pmevtyper14_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=13 & Op2_uimm3=6 & pmevtyper14_el0 { export pmevtyper14_el0; }
CopReg: pmevtyper15_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=13 & Op2_uimm3=7 & pmevtyper15_el0 { export pmevtyper15_el0; }
CopReg: pmevtyper16_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=14 & Op2_uimm3=0 & pmevtyper16_el0 { export pmevtyper16_el0; }
CopReg: pmevtyper17_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=14 & Op2_uimm3=1 & pmevtyper17_el0 { export pmevtyper17_el0; }
CopReg: pmevtyper18_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=14 & Op2_uimm3=2 & pmevtyper18_el0 { export pmevtyper18_el0; }
CopReg: pmevtyper19_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=14 & Op2_uimm3=3 & pmevtyper19_el0 { export pmevtyper19_el0; }
CopReg: pmevtyper20_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=14 & Op2_uimm3=4 & pmevtyper20_el0 { export pmevtyper20_el0; }
CopReg: pmevtyper21_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=14 & Op2_uimm3=5 & pmevtyper21_el0 { export pmevtyper21_el0; }
CopReg: pmevtyper22_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=14 & Op2_uimm3=6 & pmevtyper22_el0 { export pmevtyper22_el0; }
CopReg: pmevtyper23_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=14 & Op2_uimm3=7 & pmevtyper23_el0 { export pmevtyper23_el0; }
CopReg: pmevtyper24_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=15 & Op2_uimm3=0 & pmevtyper24_el0 { export pmevtyper24_el0; }
CopReg: pmevtyper25_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=15 & Op2_uimm3=1 & pmevtyper25_el0 { export pmevtyper25_el0; }
CopReg: pmevtyper26_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=15 & Op2_uimm3=2 & pmevtyper26_el0 { export pmevtyper26_el0; }
CopReg: pmevtyper27_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=15 & Op2_uimm3=3 & pmevtyper27_el0 { export pmevtyper27_el0; }
CopReg: pmevtyper28_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=15 & Op2_uimm3=4 & pmevtyper28_el0 { export pmevtyper28_el0; }
CopReg: pmevtyper29_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=15 & Op2_uimm3=5 & pmevtyper29_el0 { export pmevtyper29_el0; }
CopReg: pmevtyper30_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=15 & Op2_uimm3=6 & pmevtyper30_el0 { export pmevtyper30_el0; }
CopReg: pmccfiltr_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=15 & Op2_uimm3=7 & pmccfiltr_el0 { export pmccfiltr_el0; }
CopReg: mair_el1 is Op0=3 & Op1_uimm3=0 & CRn=10 & CRm=2 & Op2_uimm3=0 & mair_el1 { export mair_el1; }
CopReg: mair_el2 is Op0=3 & Op1_uimm3=4 & CRn=10 & CRm=2 & Op2_uimm3=0 & mair_el2 { export mair_el2; }
CopReg: mair_el3 is Op0=3 & Op1_uimm3=6 & CRn=10 & CRm=2 & Op2_uimm3=0 & mair_el3 { export mair_el3; }
CopReg: amair_el1 is Op0=3 & Op1_uimm3=0 & CRn=10 & CRm=3 & Op2_uimm3=0 & amair_el1 { export amair_el1; }
CopReg: amair_el2 is Op0=3 & Op1_uimm3=4 & CRn=10 & CRm=3 & Op2_uimm3=0 & amair_el2 { export amair_el2; }
CopReg: amair_el3 is Op0=3 & Op1_uimm3=6 & CRn=10 & CRm=3 & Op2_uimm3=0 & amair_el3 { export amair_el3; }
CopReg: vbar_el1 is Op0=3 & Op1_uimm3=0 & CRn=12 & CRm=0 & Op2_uimm3=0 & vbar_el1 { export vbar_el1; }
CopReg: vbar_el2 is Op0=3 & Op1_uimm3=4 & CRn=12 & CRm=0 & Op2_uimm3=0 & vbar_el2 { export vbar_el2; }
CopReg: vbar_el3 is Op0=3 & Op1_uimm3=6 & CRn=12 & CRm=0 & Op2_uimm3=0 & vbar_el3 { export vbar_el3; }
CopReg: rvbar_el1 is Op0=3 & Op1_uimm3=0 & CRn=12 & CRm=0 & Op2_uimm3=1 & rvbar_el1 { export rvbar_el1; }
CopReg: rvbar_el2 is Op0=3 & Op1_uimm3=4 & CRn=12 & CRm=0 & Op2_uimm3=1 & rvbar_el2 { export rvbar_el2; }
CopReg: rvbar_el3 is Op0=3 & Op1_uimm3=6 & CRn=12 & CRm=0 & Op2_uimm3=1 & rvbar_el3 { export rvbar_el3; }
CopReg: rmr_el1 is Op0=3 & Op1_uimm3=0 & CRn=12 & CRm=0 & Op2_uimm3=2 & rmr_el1 { export rmr_el1; }
CopReg: rmr_el2 is Op0=3 & Op1_uimm3=4 & CRn=12 & CRm=0 & Op2_uimm3=2 & rmr_el2 { export rmr_el2; }
CopReg: rmr_el3 is Op0=3 & Op1_uimm3=6 & CRn=12 & CRm=0 & Op2_uimm3=2 & rmr_el3 { export rmr_el3; }
CopReg: isr_el1 is Op0=3 & Op1_uimm3=0 & CRn=12 & CRm=1 & Op2_uimm3=0 & isr_el1 { export isr_el1; }
CopReg: contextidr_el1 is Op0=3 & Op1_uimm3=0 & CRn=13 & CRm=0 & Op2_uimm3=1 & contextidr_el1 { export contextidr_el1; }
CopReg: tpidr_el0 is Op0=3 & Op1_uimm3=3 & CRn=13 & CRm=0 & Op2_uimm3=2 & tpidr_el0 { export tpidr_el0; }
CopReg: tpidrro_el0 is Op0=3 & Op1_uimm3=3 & CRn=13 & CRm=0 & Op2_uimm3=3 & tpidrro_el0 { export tpidrro_el0; }
CopReg: tpidr_el1 is Op0=3 & Op1_uimm3=0 & CRn=13 & CRm=0 & Op2_uimm3=4 & tpidr_el1 { export tpidr_el1; }
CopReg: tpidr_el2 is Op0=3 & Op1_uimm3=4 & CRn=13 & CRm=0 & Op2_uimm3=2 & tpidr_el2 { export tpidr_el2; }
CopReg: tpidr_el3 is Op0=3 & Op1_uimm3=6 & CRn=13 & CRm=0 & Op2_uimm3=2 & tpidr_el3 { export tpidr_el3; }
CopReg: teecr32_el1 is Op0=2 & Op1_uimm3=2 & CRn=0 & CRm=0 & Op2_uimm3=0 & teecr32_el1 { export teecr32_el1; }
CopReg: cntfrq_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=0 & Op2_uimm3=0 & cntfrq_el0 { export cntfrq_el0; }
CopReg: cntpct_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=0 & Op2_uimm3=1 & cntpct_el0 { export cntpct_el0; }
CopReg: cntvct_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=0 & Op2_uimm3=2 & cntvct_el0 { export cntvct_el0; }
CopReg: cntvoff_el2 is Op0=3 & Op1_uimm3=4 & CRn=14 & CRm=0 & Op2_uimm3=3 & cntvoff_el2 { export cntvoff_el2; }
CopReg: cntkctl_el1 is Op0=3 & Op1_uimm3=0 & CRn=14 & CRm=1 & Op2_uimm3=0 & cntkctl_el1 { export cntkctl_el1; }
CopReg: cnthctl_el2 is Op0=3 & Op1_uimm3=4 & CRn=14 & CRm=1 & Op2_uimm3=0 & cnthctl_el2 { export cnthctl_el2; }
CopReg: cntp_tval_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=2 & Op2_uimm3=0 & cntp_tval_el0 { export cntp_tval_el0; }
CopReg: cntp_ctl_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=2 & Op2_uimm3=1 & cntp_ctl_el0 { export cntp_ctl_el0; }
CopReg: cntp_cval_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=2 & Op2_uimm3=2 & cntp_cval_el0 { export cntp_cval_el0; }
CopReg: cntv_tval_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=3 & Op2_uimm3=0 & cntv_tval_el0 { export cntv_tval_el0; }
CopReg: cntv_ctl_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=3 & Op2_uimm3=1 & cntv_ctl_el0 { export cntv_ctl_el0; }
CopReg: cntv_cval_el0 is Op0=3 & Op1_uimm3=3 & CRn=14 & CRm=3 & Op2_uimm3=2 & cntv_cval_el0 { export cntv_cval_el0; }
CopReg: cnthp_tval_el2 is Op0=3 & Op1_uimm3=4 & CRn=14 & CRm=2 & Op2_uimm3=0 & cnthp_tval_el2 { export cnthp_tval_el2; }
CopReg: cnthp_ctl_el2 is Op0=3 & Op1_uimm3=4 & CRn=14 & CRm=2 & Op2_uimm3=1 & cnthp_ctl_el2 { export cnthp_ctl_el2; }
CopReg: cnthp_cval_el2 is Op0=3 & Op1_uimm3=4 & CRn=14 & CRm=2 & Op2_uimm3=2 & cnthp_cval_el2 { export cnthp_cval_el2; }
CopReg: cntps_tval_el1 is Op0=3 & Op1_uimm3=7 & CRn=14 & CRm=2 & Op2_uimm3=0 & cntps_tval_el1 { export cntps_tval_el1; }
CopReg: cntps_ctl_el1 is Op0=3 & Op1_uimm3=7 & CRn=14 & CRm=2 & Op2_uimm3=1 & cntps_ctl_el1 { export cntps_ctl_el1; }
CopReg: cntps_cval_el1 is Op0=3 & Op1_uimm3=7 & CRn=14 & CRm=2 & Op2_uimm3=2 & cntps_cval_el1 { export cntps_cval_el1; }
CopReg: dacr32_el2 is Op0=3 & Op1_uimm3=4 & CRn=3 & CRm=0 & Op2_uimm3=0 & dacr32_el2 { export dacr32_el2; }
CopReg: ifsr32_el2 is Op0=3 & Op1_uimm3=4 & CRn=5 & CRm=0 & Op2_uimm3=1 & ifsr32_el2 { export ifsr32_el2; }
CopReg: teehbr32_el1 is Op0=2 & Op1_uimm3=2 & CRn=1 & CRm=0 & Op2_uimm3=0 & teehbr32_el1 { export teehbr32_el1; }
CopReg: sder32_el3 is Op0=3 & Op1_uimm3=6 & CRn=1 & CRm=1 & Op2_uimm3=1 & sder32_el3 { export sder32_el3; }
CopReg: osdtrrx_el1 is Op0=3 & Op1_uimm3=0 & CRn=0 & CRm=0 & Op2_uimm3=2 & osdtrrx_el1 { export osdtrrx_el1; }

CopReg: mdccint_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=2 & Op2_uimm3=0 & mdccint_el1 { export mdccint_el1; }
CopReg: mdscr_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=2 & Op2_uimm3=2 & mdscr_el1 { export mdscr_el1; }
CopReg: osdtrtx_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=3 & Op2_uimm3=2 & osdtrtx_el1 { export osdtrtx_el1; }
CopReg: oseccr_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=6 & Op2_uimm3=2 & oseccr_el1 { export oseccr_el1; }
CopReg: dbgbvr0_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=0 & Op2_uimm3=4 & dbgbvr0_el1 { export dbgbvr0_el1; }
CopReg: dbgbvr1_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=1 & Op2_uimm3=4 & dbgbvr1_el1 { export dbgbvr1_el1; }
CopReg: dbgbvr2_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=2 & Op2_uimm3=4 & dbgbvr2_el1 { export dbgbvr2_el1; }
CopReg: dbgbvr3_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=3 & Op2_uimm3=4 & dbgbvr3_el1 { export dbgbvr3_el1; }
CopReg: dbgbvr4_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=4 & Op2_uimm3=4 & dbgbvr4_el1 { export dbgbvr4_el1; }
CopReg: dbgbvr5_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=5 & Op2_uimm3=4 & dbgbvr5_el1 { export dbgbvr5_el1; }
CopReg: dbgbvr6_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=6 & Op2_uimm3=4 & dbgbvr6_el1 { export dbgbvr6_el1; }
CopReg: dbgbvr7_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=7 & Op2_uimm3=4 & dbgbvr7_el1 { export dbgbvr7_el1; }
CopReg: dbgbvr8_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=8 & Op2_uimm3=4 & dbgbvr8_el1 { export dbgbvr8_el1; }
CopReg: dbgbvr9_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=9 & Op2_uimm3=4 & dbgbvr9_el1 { export dbgbvr9_el1; }
CopReg: dbgbvr10_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=10 & Op2_uimm3=4 & dbgbvr10_el1 { export dbgbvr10_el1; }
CopReg: dbgbvr11_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=11 & Op2_uimm3=4 & dbgbvr11_el1 { export dbgbvr11_el1; }
CopReg: dbgbvr12_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=12 & Op2_uimm3=4 & dbgbvr12_el1 { export dbgbvr12_el1; }
CopReg: dbgbvr13_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=13 & Op2_uimm3=4 & dbgbvr13_el1 { export dbgbvr13_el1; }
CopReg: dbgbvr14_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=14 & Op2_uimm3=4 & dbgbvr14_el1 { export dbgbvr14_el1; }
CopReg: dbgbvr15_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=15 & Op2_uimm3=4 & dbgbvr15_el1 { export dbgbvr15_el1; }
CopReg: dbgbcr0_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=0 & Op2_uimm3=5 & dbgbcr0_el1 { export dbgbcr0_el1; }
CopReg: dbgbcr1_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=1 & Op2_uimm3=5 & dbgbcr1_el1 { export dbgbcr1_el1; }
CopReg: dbgbcr2_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=2 & Op2_uimm3=5 & dbgbcr2_el1 { export dbgbcr2_el1; }
CopReg: dbgbcr3_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=3 & Op2_uimm3=5 & dbgbcr3_el1 { export dbgbcr3_el1; }
CopReg: dbgbcr4_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=4 & Op2_uimm3=5 & dbgbcr4_el1 { export dbgbcr4_el1; }
CopReg: dbgbcr5_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=5 & Op2_uimm3=5 & dbgbcr5_el1 { export dbgbcr5_el1; }
CopReg: dbgbcr6_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=6 & Op2_uimm3=5 & dbgbcr6_el1 { export dbgbcr6_el1; }
CopReg: dbgbcr7_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=7 & Op2_uimm3=5 & dbgbcr7_el1 { export dbgbcr7_el1; }
CopReg: dbgbcr8_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=8 & Op2_uimm3=5 & dbgbcr8_el1 { export dbgbcr8_el1; }
CopReg: dbgbcr9_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=9 & Op2_uimm3=5 & dbgbcr9_el1 { export dbgbcr9_el1; }
CopReg: dbgbcr10_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=10 & Op2_uimm3=5 & dbgbcr10_el1 { export dbgbcr10_el1; }
CopReg: dbgbcr11_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=11 & Op2_uimm3=5 & dbgbcr11_el1 { export dbgbcr11_el1; }
CopReg: dbgbcr12_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=12 & Op2_uimm3=5 & dbgbcr12_el1 { export dbgbcr12_el1; }
CopReg: dbgbcr13_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=13 & Op2_uimm3=5 & dbgbcr13_el1 { export dbgbcr13_el1; }
CopReg: dbgbcr14_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=14 & Op2_uimm3=5 & dbgbcr14_el1 { export dbgbcr14_el1; }
CopReg: dbgbcr15_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=15 & Op2_uimm3=5 & dbgbcr15_el1 { export dbgbcr15_el1; }
CopReg: dbgwvr0_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=0 & Op2_uimm3=6 & dbgwvr0_el1 { export dbgwvr0_el1; }
CopReg: dbgwvr1_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=1 & Op2_uimm3=6 & dbgwvr1_el1 { export dbgwvr1_el1; }
CopReg: dbgwvr2_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=2 & Op2_uimm3=6 & dbgwvr2_el1 { export dbgwvr2_el1; }
CopReg: dbgwvr3_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=3 & Op2_uimm3=6 & dbgwvr3_el1 { export dbgwvr3_el1; }
CopReg: dbgwvr4_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=4 & Op2_uimm3=6 & dbgwvr4_el1 { export dbgwvr4_el1; }
CopReg: dbgwvr5_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=5 & Op2_uimm3=6 & dbgwvr5_el1 { export dbgwvr5_el1; }
CopReg: dbgwvr6_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=6 & Op2_uimm3=6 & dbgwvr6_el1 { export dbgwvr6_el1; }
CopReg: dbgwvr7_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=7 & Op2_uimm3=6 & dbgwvr7_el1 { export dbgwvr7_el1; }
CopReg: dbgwvr8_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=8 & Op2_uimm3=6 & dbgwvr8_el1 { export dbgwvr8_el1; }
CopReg: dbgwvr9_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=9 & Op2_uimm3=6 & dbgwvr9_el1 { export dbgwvr9_el1; }
CopReg: dbgwvr10_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=10 & Op2_uimm3=6 & dbgwvr10_el1 { export dbgwvr10_el1; }
CopReg: dbgwvr11_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=11 & Op2_uimm3=6 & dbgwvr11_el1 { export dbgwvr11_el1; }
CopReg: dbgwvr12_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=12 & Op2_uimm3=6 & dbgwvr12_el1 { export dbgwvr12_el1; }
CopReg: dbgwvr13_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=13 & Op2_uimm3=6 & dbgwvr13_el1 { export dbgwvr13_el1; }
CopReg: dbgwvr14_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=14 & Op2_uimm3=6 & dbgwvr14_el1 { export dbgwvr14_el1; }
CopReg: dbgwvr15_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=15 & Op2_uimm3=6 & dbgwvr15_el1 { export dbgwvr15_el1; }
CopReg: dbgwcr0_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=0 & Op2_uimm3=7 & dbgwcr0_el1 { export dbgwcr0_el1; }
CopReg: dbgwcr1_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=1 & Op2_uimm3=7 & dbgwcr1_el1 { export dbgwcr1_el1; }
CopReg: dbgwcr2_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=2 & Op2_uimm3=7 & dbgwcr2_el1 { export dbgwcr2_el1; }
CopReg: dbgwcr3_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=3 & Op2_uimm3=7 & dbgwcr3_el1 { export dbgwcr3_el1; }
CopReg: dbgwcr4_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=4 & Op2_uimm3=7 & dbgwcr4_el1 { export dbgwcr4_el1; }
CopReg: dbgwcr5_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=5 & Op2_uimm3=7 & dbgwcr5_el1 { export dbgwcr5_el1; }
CopReg: dbgwcr6_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=6 & Op2_uimm3=7 & dbgwcr6_el1 { export dbgwcr6_el1; }
CopReg: dbgwcr7_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=7 & Op2_uimm3=7 & dbgwcr7_el1 { export dbgwcr7_el1; }
CopReg: dbgwcr8_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=8 & Op2_uimm3=7 & dbgwcr8_el1 { export dbgwcr8_el1; }
CopReg: dbgwcr9_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=9 & Op2_uimm3=7 & dbgwcr9_el1 { export dbgwcr9_el1; }
CopReg: dbgwcr10_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=10 & Op2_uimm3=7 & dbgwcr10_el1 { export dbgwcr10_el1; }
CopReg: dbgwcr11_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=11 & Op2_uimm3=7 & dbgwcr11_el1 { export dbgwcr11_el1; }
CopReg: dbgwcr12_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=12 & Op2_uimm3=7 & dbgwcr12_el1 { export dbgwcr12_el1; }
CopReg: dbgwcr13_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=13 & Op2_uimm3=7 & dbgwcr13_el1 { export dbgwcr13_el1; }
CopReg: dbgwcr14_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=14 & Op2_uimm3=7 & dbgwcr14_el1 { export dbgwcr14_el1; }
CopReg: dbgwcr15_el1 is Op0=2 & Op1_uimm3=0 & CRn=0 & CRm=15 & Op2_uimm3=7 & dbgwcr15_el1 { export dbgwcr15_el1; }
CopReg: mdrar_el1 is Op0=2 & Op1_uimm3=0 & CRn=1 & CRm=0 & Op2_uimm3=0 & mdrar_el1 { export mdrar_el1; }
CopReg: oslar_el1 is Op0=2 & Op1_uimm3=0 & CRn=1 & CRm=0 & Op2_uimm3=4 & oslar_el1 { export oslar_el1; }
CopReg: oslsr_el1 is Op0=2 & Op1_uimm3=0 & CRn=1 & CRm=1 & Op2_uimm3=4 & oslsr_el1 { export oslsr_el1; }
CopReg: osdlr_el1 is Op0=2 & Op1_uimm3=0 & CRn=1 & CRm=3 & Op2_uimm3=4 & osdlr_el1 { export osdlr_el1; }
CopReg: dbgprcr_el1 is Op0=2 & Op1_uimm3=0 & CRn=1 & CRm=4 & Op2_uimm3=4 & dbgprcr_el1 { export dbgprcr_el1; }
CopReg: dbgclaimset_el1 is Op0=2 & Op1_uimm3=0 & CRn=7 & CRm=8 & Op2_uimm3=6 & dbgclaimset_el1 { export dbgclaimset_el1; }
CopReg: dbgclaimclr_el1 is Op0=2 & Op1_uimm3=0 & CRn=7 & CRm=9 & Op2_uimm3=6 & dbgclaimclr_el1 { export dbgclaimclr_el1; }
CopReg: dbgauthstatus_el1 is Op0=2 & Op1_uimm3=0 & CRn=7 & CRm=14 & Op2_uimm3=6 & dbgauthstatus_el1 { export dbgauthstatus_el1; }
CopReg: mdccsr_el0 is Op0=2 & Op1_uimm3=3 & CRn=0 & CRm=1 & Op2_uimm3=0 & mdccsr_el0 { export mdccsr_el0; }
CopReg: dbgdtr_el0 is Op0=2 & Op1_uimm3=3 & CRn=0 & CRm=4 & Op2_uimm3=0 & dbgdtr_el0 { export dbgdtr_el0; }
CopReg: dbgvcr32_el2 is Op0=2 & Op1_uimm3=4 & CRn=0 & CRm=7 & Op2_uimm3=0 & dbgvcr32_el2 { export dbgvcr32_el2; }
} # with : (l=0 | l=1) {

CopReg: dbgdtrrx_el0 is l=0 & Op0=2 & Op1_uimm3=3 & CRn=0 & CRm=5 & Op2_uimm3=0 & dbgdtrrx_el0 { export dbgdtrrx_el0; }
CopReg: dbgdtrtx_el0 is l=1 & Op0=2 & Op1_uimm3=3 & CRn=0 & CRm=5 & Op2_uimm3=0 & dbgdtrtx_el0 { export dbgdtrtx_el0; }

CopReg: "sreg("^Op0^", "^Op1_uimm3^", c"^CRn^", c"^CRm^", "^Op2_uimm3^")" is l=1 & Op0 & Op1_uimm3 & CRn & CRm & Op2_uimm3 { tmp:8 = UnkSytemRegRead(Op0:1, Op1_uimm3:1, CRn:1, CRm:1, Op2_uimm3:1); export tmp; }
CopReg: "sreg("^Op0^", "^Op1_uimm3^", c"^CRn^", c"^CRm^", "^Op2_uimm3^")" is l=0 & Op0 & Op1_uimm3 & CRn & CRm & Op2_uimm3 & Rt_GPR64 { tmp:8 = UnkSytemRegWrite(Op0:1, Op1_uimm3:1, CRn:1, CRm:1, Op2_uimm3:1, Rt_GPR64); export tmp; }

PState_pstate_op: "DAIFSet" is Op1_uimm3=3 & Op2_uimm3=6 & CRm { daif = (CRm << 6) | daif; }
PState_pstate_op: "DAIFClr" is Op1_uimm3=3 & Op2_uimm3=7 & CRm { tmp:8 = CRm; daif = (~(tmp << 6)) & daif; }
PState_pstate_op: "PState.UAO" is Op1_uimm3=0 & Op2_uimm3=3 & CRm { tmp:8 = CRm; uao = tmp & 1; }
PState_pstate_op: "PState.PAN" is Op1_uimm3=0 & Op2_uimm3=4 & CRm { tmp:8 = CRm; pan = tmp & 1; }
PState_pstate_op: "PState.SP" is Op1_uimm3=0 & Op2_uimm3=5 & CRm { tmp:8 = CRm; spsel = tmp & 1; }

# C6.2.173 MRS page C6-802 line 46877 MATCH xd5300000/mask=xfff00000
# CONSTRUCT xd5200000/mask=xffe00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd5200000/mask=xffe00000 --status noqemu

:mrs Rt_GPR64, CopReg
is b_2431=0xd5 & b_2223=0 & l=1 & CopReg & Rt_GPR64
{
	Rt_GPR64 = CopReg;
}

# C6.2.174 MSR (immediate) page C6-803 line 46937 MATCH xd500401f/mask=xfff8f01f
# CONSTRUCT xd500401f/mask=xfff8f01f MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd500401f/mask=xfff8f01f --status nodest

:msr PState_pstate_op, CRm_uimm4
is b_2431=0xd5 & b_2223=0 & l=0 & Op0=0 & PState_pstate_op & CRn=0x4 & CRm_uimm4 & Rt=0x1f
{
}

# C6.2.175 MSR (register) page C6-805 line 47046 MATCH xd5100000/mask=xfff00000
# CONSTRUCT xd5000000/mask=xffe00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd5000000/mask=xffe00000 --status noqemu

:msr CopReg, Rt_GPR64
is b_2431=0xd5 & b_2223=0 & l=0 & CopReg & Rt_GPR64
{
	CopReg = Rt_GPR64;
}

# C6.2.176 MSUB page C6-806 line 47107 MATCH x1b008000/mask=x7fe08000
# C6.2.164 MNEG page C6-791 line 46226 MATCH x1b00fc00/mask=x7fe0fc00
# CONSTRUCT x1b008000/mask=xffe08000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x1b008000/mask=xffe08000 --status pass

:msub Rd_GPR32, Rn_GPR32, Rm_GPR32, Ra_GPR32
is sf=0 & op.dp3_op54=0 & b_2428=0x1b & op.dp3_op31=0 & Rm_GPR32 & op.dp3_o0=1 & Ra_GPR32 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp_2:4 = Rn_GPR32 * Rm_GPR32;
	tmp_1:4 = Ra_GPR32 - tmp_2;
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.176 MSUB page C6-806 line 47107 MATCH x1b008000/mask=x7fe08000
# C6.2.164 MNEG page C6-791 line 46226 MATCH x1b00fc00/mask=x7fe0fc00
# CONSTRUCT x9b008000/mask=xffe08000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x9b008000/mask=xffe08000 --status pass

:msub Rd_GPR64, Rn_GPR64, Rm_GPR64, Ra_GPR64
is sf=1 & op.dp3_op54=0 & b_2428=0x1b & op.dp3_op31=0 & Rm_GPR64 & op.dp3_o0=1 & Ra_GPR64 & Rn_GPR64 & Rd_GPR64
{
	tmp_2:8 = Rn_GPR64 * Rm_GPR64;
	tmp_1:8 = Ra_GPR64 - tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.177 MUL page C6-808 line 47204 MATCH x1b007c00/mask=x7fe0fc00
# C6.2.163 MADD page C6-789 line 46128 MATCH x1b000000/mask=x7fe08000
# CONSTRUCT x1b007c00/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x1b007c00/mask=xffe0fc00 --status pass

:mul Rd_GPR32, Rn_GPR32, Rm_GPR32
is sf=0 & op.dp3_op54=0 & b_2428=0x1b & op.dp3_op31=0 & Rm_GPR32 & op.dp3_o0=0 & Ra=0x1f & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp_2:4 = Rn_GPR32 * Rm_GPR32;
	Rd_GPR64 = zext(tmp_2);
}

# C6.2.177 MUL page C6-808 line 47204 MATCH x1b007c00/mask=x7fe0fc00
# C6.2.163 MADD page C6-789 line 46128 MATCH x1b000000/mask=x7fe08000
# CONSTRUCT x9b007c00/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x9b007c00/mask=xffe0fc00 --status pass

:mul Rd_GPR64, Rn_GPR64, Rm_GPR64
is sf=1 & op.dp3_op54=0 & b_2428=0x1b & op.dp3_op31=0 & Rm_GPR64 & op.dp3_o0=0 & Ra=0x1f & Rn_GPR64 & Rd_GPR64
{
	tmp_2:8 = Rn_GPR64 * Rm_GPR64;
	Rd_GPR64 = tmp_2;
}

# C6.2.178 MVN page C6-809 line 47277 MATCH x2a2003e0/mask=x7f2003e0
# C6.2.184 ORN (shifted register) page C6-818 line 47702 MATCH x2a200000/mask=x7f200000
# CONSTRUCT x2a2003e0/mask=xff2003e0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x2a2003e0/mask=xff2003e0 --status pass

:mvn Rd_GPR32, RegShift32Log
is sf=0 & opc=1 & b_2428=0xa & N=1 & RegShift32Log & Rn=0x1f & Rd_GPR32 & Rd_GPR64
{
	tmp_1:4 = ~RegShift32Log;
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.178 MVN page C6-809 line 47277 MATCH x2a2003e0/mask=x7f2003e0
# C6.2.184 ORN (shifted register) page C6-818 line 47702 MATCH x2a200000/mask=x7f200000
# CONSTRUCT xaa2003e0/mask=xff2003e0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xaa2003e0/mask=xff2003e0 --status pass

:mvn Rd_GPR64, RegShift64Log
is sf=1 & opc=1 & b_2428=0xa & N=1 & Rm_GPR64 & RegShift64Log & Rn=0x1f & Rd_GPR64
{
	tmp_1:8 = ~RegShift64Log;
	Rd_GPR64 = tmp_1;
}

# C6.2.179 NEG (shifted register) page C6-811 line 47362 MATCH x4b0003e0/mask=x7f2003e0
# C6.2.275 SUB (shifted register) page C6-961 line 55767 MATCH x4b000000/mask=x7f200000
# CONSTRUCT x4b0003e0/mask=xff2003e0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x4b0003e0/mask=xff2003e0 --status pass

:neg Rd_GPR32, RegShift32
is sf=0 & op=1 & s=0 & b_2428=0xb & b_2121=0 & RegShift32 & Rn=0x1f & Rd_GPR32 & Rd_GPR64
{
	tmp_2:4 = RegShift32;
	tmp_1:4 = - tmp_2;
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.179 NEG (shifted register) page C6-811 line 47362 MATCH x4b0003e0/mask=x7f2003e0
# C6.2.275 SUB (shifted register) page C6-961 line 55767 MATCH x4b000000/mask=x7f200000
# CONSTRUCT xcb0003e0/mask=xff2003e0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xcb0003e0/mask=xff2003e0 --status pass

:neg Rd_GPR64, RegShift64
is sf=1 & op=1 & s=0 & b_2428=0xb & b_2121=0 & RegShift64 & Rn=0x1f & Rd_GPR64
{
	tmp_2:8 = RegShift64;
	tmp_1:8 = - tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.180 NEGS page C6-813 line 47447 MATCH x6b0003e0/mask=x7f2003e0
# C6.2.57 CMP (shifted register) page C6-608 line 35648 MATCH x6b00001f/mask=x7f20001f
# C6.2.278 SUBS (shifted register) page C6-967 line 56104 MATCH x6b000000/mask=x7f200000
# CONSTRUCT x6b0003e0/mask=xff2003e0 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x6b0003e0/mask=xff2003e0 --status pass --comment "flags"

:negs Rd_GPR32, RegShift32
is sf=0 & op=1 & s=1 & b_2428=0xb & b_2121=0 & Rm_GPR32 & RegShift32 & Rn=0x1f & Rd_GPR32 & Rd & Rd_GPR64
{
	tmp_2:4 = RegShift32;
	subflags0(tmp_2);
	tmp_1:4 = 0:4 - tmp_2;
	resultflags(tmp_1);
	Rd_GPR64 = zext(tmp_1);
	affectflags();
}

# C6.2.180 NEGS page C6-813 line 47447 MATCH x6b0003e0/mask=x7f2003e0
# C6.2.57 CMP (shifted register) page C6-608 line 35648 MATCH x6b00001f/mask=x7f20001f
# C6.2.278 SUBS (shifted register) page C6-967 line 56104 MATCH x6b000000/mask=x7f200000
# CONSTRUCT xeb0003e0/mask=xff2003e0 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xeb0003e0/mask=xff2003e0 --status pass --comment "flags"

:negs Rd_GPR64, RegShift64
is sf=1 & op=1 & s=1 & b_2428=0xb & b_2121=0 & Rm_GPR64 & RegShift64 & Rn=0x1f & Rd_GPR64 & Rd
{
	tmp_2:8 = RegShift64;
	subflags0(tmp_2);
	tmp_1:8 = 0:8 - tmp_2;
	resultflags(tmp_1);
	Rd_GPR64 = tmp_1;
	affectflags();
}

# C6.2.181 NGC page C6-815 line 47532 MATCH x5a0003e0/mask=x7fe0ffe0
# C6.2.207 SBC page C6-852 line 49574 MATCH x5a000000/mask=x7fe0fc00
# CONSTRUCT x5a0003e0/mask=xffe0ffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x5a0003e0/mask=xffe0ffe0 --status pass --comment "flags"

:ngc Rd_GPR32, Rm_GPR32
is sf=0 & op=1 & s=0 & b_2428=0x1a & b_2123=0 & Rm_GPR32 & opcode2=0x0 & Rn=0x1f & Rd_GPR32 & Rd_GPR64
{
	tmp:4 = Rm_GPR32 - 1:4 + zext(CY);
	subflags0(tmp);
	Rd_GPR64 = zext(-tmp);
}

# C6.2.181 NGC page C6-815 line 47532 MATCH x5a0003e0/mask=x7fe0ffe0
# C6.2.207 SBC page C6-852 line 49574 MATCH x5a000000/mask=x7fe0fc00
# CONSTRUCT xda0003e0/mask=xffe0ffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xda0003e0/mask=xffe0ffe0 --status pass --comment "flags"

:ngc Rd_GPR64, Rm_GPR64
is sf=1 & op=1 & s=0 & b_2428=0x1a & b_2123=0 & Rm_GPR64 & opcode2=0x0 & Rn=0x1f & Rd_GPR64
{
	tmp:8 = Rm_GPR64 - 1:8 + zext(CY);
	subflags0(tmp);
	Rd_GPR64 = -tmp;
}

# C6.2.182 NGCS page C6-816 line 47598 MATCH x7a0003e0/mask=x7fe0ffe0
# C6.2.208 SBCS page C6-854 line 49661 MATCH x7a000000/mask=x7fe0fc00
# CONSTRUCT x7a0003e0/mask=xffe0ffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x7a0003e0/mask=xffe0ffe0 --status pass --comment "flags"

:ngcs Rd_GPR32, Rm_GPR32
is sf=0 & op=1 & s=1 & b_2428=0x1a & b_2123=0 & Rn=0x1f & opcode2=0x0 & Rm_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp:4 = Rm_GPR32 - 1:4 + zext(CY);
	subflags0(tmp);
	Rd_GPR64 = zext(-tmp);
	resultflags(Rd_GPR32);
	affectflags();
}

# C6.2.182 NGCS page C6-816 line 47598 MATCH x7a0003e0/mask=x7fe0ffe0
# C6.2.208 SBCS page C6-854 line 49661 MATCH x7a000000/mask=x7fe0fc00
# CONSTRUCT xfa0003e0/mask=xffe0ffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xfa0003e0/mask=xffe0ffe0 --status pass --comment "flags"

:ngcs Rd_GPR64, Rm_GPR64
is sf=1 & op=1 & s=1 & b_2428=0x1a & b_2123=0 & Rn=0x1f & opcode2=0x0 & Rm_GPR64 & Rd_GPR64
{
	tmp:8 = Rm_GPR64 - 1:8 + zext(CY);
	subflags0(tmp);
	Rd_GPR64 = -tmp;
	resultflags(Rd_GPR64);
	affectflags();
}

# C6.2.183 NOP page C6-817 line 47664 MATCH xd503201f/mask=xffffffff
# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# CONSTRUCT xd503201f/mask=xffffffff MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd503201f/mask=xffffffff --status nodest

:nop
is b_2431=0xd5 & b_2223=0 & l=0 & Op0=0 & Op1=3 & CRn=0x2 & imm7Low=0 & Rt=0x1f
{
}

# C6.2.184 ORN (shifted register) page C6-818 line 47702 MATCH x2a200000/mask=x7f200000
# C6.2.178 MVN page C6-809 line 47277 MATCH x2a2003e0/mask=x7f2003e0
# CONSTRUCT x2a200000/mask=xff200000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x2a200000/mask=xff200000 --status pass

:orn Rd_GPR32, Rn_GPR32, RegShift32Log
is sf=0 & opc=1 & b_2428=0xa & N=1 & RegShift32Log & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp_3:4 = RegShift32Log;
	tmp_2:4 = tmp_3 ^ -1:4;
	tmp_1:4 = Rn_GPR32 | tmp_2;
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.184 ORN (shifted register) page C6-818 line 47702 MATCH x2a200000/mask=x7f200000
# C6.2.178 MVN page C6-809 line 47277 MATCH x2a2003e0/mask=x7f2003e0
# CONSTRUCT xaa200000/mask=xff200000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xaa200000/mask=xff200000 --status pass

:orn Rd_GPR64, Rn_GPR64, RegShift64Log
is sf=1 & opc=1 & b_2428=0xa & N=1 & RegShift64Log & Rn_GPR64 & Rd_GPR64
{
	tmp_3:8= RegShift64Log;
	tmp_2:8 = tmp_3 ^ -1:8;
	tmp_1:8 = Rn_GPR64 | tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.185 ORR (immediate) page C6-820 line 47803 MATCH x32000000/mask=x7f800000
# C6.2.168 MOV (bitmask immediate) page C6-795 line 46506 MATCH x320003e0/mask=x7f8003e0
# CONSTRUCT x32000000/mask=xff800000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x32000000/mask=xff800000 --status pass

:orr Rd_GPR32wsp, Rn_GPR32, DecodeWMask32
is sf=0 & opc=1 & b_2428=0x12 & b_2323=0 & DecodeWMask32 & Rn_GPR32 & Rd_GPR32wsp & Rd_GPR64xsp
{
	tmp_1:4 = Rn_GPR32 | DecodeWMask32;
	Rd_GPR64xsp = zext(tmp_1);
}

# C6.2.185 ORR (immediate) page C6-820 line 47803 MATCH x32000000/mask=x7f800000
# C6.2.168 MOV (bitmask immediate) page C6-795 line 46506 MATCH x320003e0/mask=x7f8003e0
# CONSTRUCT xb2000000/mask=xff800000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xb2000000/mask=xff800000 --status pass

:orr Rd_GPR64xsp, Rn_GPR64, DecodeWMask64
is sf=1 & opc=1 & b_2428=0x12 & b_2323=0 & DecodeWMask64 & Rn_GPR64 & Rd_GPR64xsp
{
	tmp_1:8 = Rn_GPR64 | DecodeWMask64;
	Rd_GPR64xsp = tmp_1;
}

# C6.2.186 ORR (shifted register) page C6-822 line 47892 MATCH x2a000000/mask=x7f200000
# C6.2.169 MOV (register) page C6-796 line 46574 MATCH x2a0003e0/mask=x7fe0ffe0
# CONSTRUCT x2a000000/mask=xff200000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x2a000000/mask=xff200000 --status pass

:orr Rd_GPR32, Rn_GPR32, RegShift32Log
is b_31=0 & b_2430=0b0101010 & b_21=0 & RegShift32Log & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp_2:4 = RegShift32Log;
	tmp_1:4 = Rn_GPR32 | tmp_2;
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.186 ORR (shifted register) page C6-822 line 47892 MATCH x2a000000/mask=x7f200000
# C6.2.169 MOV (register) page C6-796 line 46574 MATCH x2a0003e0/mask=x7fe0ffe0
# CONSTRUCT xaa000000/mask=xff200000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xaa000000/mask=xff200000 --status pass

:orr Rd_GPR64, Rn_GPR64, RegShift64Log
is b_31=1 & b_2430=0b0101010 & b_21=0 & RegShift64Log & Rn_GPR64 & Rd_GPR64
{
	tmp_2:8 = RegShift64Log;
	tmp_1:8 = Rn_GPR64 | tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.187 PACDA, PACDZA page C6-824 line 47991 MATCH xdac10800/mask=xffffdc00
# CONSTRUCT xdac10800/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac10800/mask=xfffffc00 --status noqemu
# z == 0 pacda variant

:pacda Rd_GPR64, Rn_GPR64xsp
is b_1431=0b110110101100000100 & b_1012=0b010 & b_13=0 & Rn_GPR64xsp & Rd_GPR64
{
	Rd_GPR64 = pacda(Rd_GPR64, Rn_GPR64xsp);
}

# C6.2.187 PACDA, PACDZA page C6-824 line 47991 MATCH xdac10800/mask=xffffdc00
# CONSTRUCT xdac12be0/mask=xffffffe0 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac12be0/mask=xffffffe0 --status noqemu
# z == 1 pacdza variant

:pacdza Rd_GPR64
is b_1431=0b110110101100000100 & b_1012=0b010 & b_13=1 & b_0509=0b11111 & Rd_GPR64
{
	Rd_GPR64 = pacdza(Rd_GPR64);
}

# C6.2.188 PACDB, PACDZB page C6-825 line 48062 MATCH xdac10c00/mask=xffffdc00
# CONSTRUCT xdac10c00/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac10c00/mask=xfffffc00 --status noqemu
# z == 0 pacdb variant

:pacdb Rd_GPR64, Rn_GPR64xsp
is b_1431=0b110110101100000100 & b_1012=0b011 & b_13=0 & Rn_GPR64xsp & Rd_GPR64
{
	Rd_GPR64 = pacdb(Rd_GPR64, Rn_GPR64xsp);
}

# C6.2.188 PACDB, PACDZB page C6-825 line 48062 MATCH xdac10c00/mask=xffffdc00
# CONSTRUCT xdac12fe0/mask=xffffffe0 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac12fe0/mask=xffffffe0 --status noqemu
# z == 1 pacdzb variant

:pacdzb Rd_GPR64
is b_1431=0b110110101100000100 & b_1012=0b011 & b_13=1 & b_0509=0b11111 & Rd_GPR64
{
	Rd_GPR64 = pacdzb(Rd_GPR64);
}

# C6.2.189 PACGA page C6-826 line 48133 MATCH x9ac03000/mask=xffe0fc00
# CONSTRUCT x9ac03000/mask=xffe0fc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x9ac03000/mask=xffe0fc00 --status noqemu

:pacga Rd_GPR64, Rn_GPR64, Rm_GPR64xsp
is b_2131=0b10011010110 & b_1015=0b001100 & Rm_GPR64xsp & Rn_GPR64 & Rd_GPR64
{
	Rd_GPR64 = pacga(Rn_GPR64, Rm_GPR64xsp);
}

# C6.2.190 PACIA, PACIA1716, PACIASP, PACIAZ, PACIZA page C6-827 line 48191 MATCH xdac10000/mask=xffffdc00
# CONSTRUCT xdac10000/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac10000/mask=xfffffc00 --status noqemu
# Z == 0 PACIA variant

:pacia Rd_GPR64, Rn_GPR64xsp
is b_1431=0b110110101100000100 & b_1012=0b000 & b_13=0 & Rn_GPR64xsp & Rd_GPR64
{
	Rd_GPR64 = pacia(Rd_GPR64, Rn_GPR64xsp);
}

# C6.2.190 PACIA, PACIA1716, PACIASP, PACIAZ, PACIZA page C6-827 line 48191 MATCH xdac10000/mask=xffffdc00
# CONSTRUCT xdac123e0/mask=xffffffe0 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac123e0/mask=xffffffe0 --status noqemu
# Z == 1 && Rn == 11111 PACIZA variant

:paciza Rd_GPR64
is b_1431=0b110110101100000100 & b_1012=0b000 & b_13=1 & b_0509=0b11111 & Rd_GPR64
{
	Rd_GPR64 = paciza(Rd_GPR64);
}

# C6.2.190 PACIA, PACIA1716, PACIASP, PACIAZ, PACIZA page C6-827 line 48191 MATCH xd503211f/mask=xfffffddf
# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# CONSTRUCT xd503211f/mask=xffffffff MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd503211f/mask=xffffffff --status nodest
# CRm == 0001 && op2 == 000 PICIA1716 variant

:pacia1716
is b_1231=0b11010101000000110010 & b_0811=0b0001 & b_0507=0b000 & b_0004=0b11111
{
	x17 = pacia(x17, x16);
}

# C6.2.190 PACIA, PACIA1716, PACIASP, PACIAZ, PACIZA page C6-827 line 48191 MATCH xd503211f/mask=xfffffddf
# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# CONSTRUCT xd503233f/mask=xffffffff MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd503233f/mask=xffffffff --status nodest
# CRm == 0011 && op2 == 001 PACIASP variant

:paciasp
is b_1231=0b11010101000000110010 & b_0811=0b0011 & b_0507=0b001 & b_0004=0b11111
{
	x30 = pacia(x30, sp);
}

# C6.2.190 PACIA, PACIA1716, PACIASP, PACIAZ, PACIZA page C6-827 line 48191 MATCH xd503211f/mask=xfffffddf
# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# CONSTRUCT xd503231f/mask=xffffffff MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd503231f/mask=xffffffff --status nodest
# CRm == 0011 && op2 == 000 PACIAZ variant

:paciaz
is b_1231=0b11010101000000110010 & b_0811=0b0011 & b_0507=0b000 & b_0004=0b11111
{
	x30 = paciza(x30);
}

# C6.2.191 PACIB, PACIB1716, PACIBSP, PACIBZ, PACIZB page C6-829 line 48335 MATCH xdac10400/mask=xffffdc00
# CONSTRUCT xdac10400/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac10400/mask=xfffffc00 --status noqemu
# Z == 0 PACIB variant

:pacib Rd_GPR64, Rn_GPR64xsp
is b_1431=0b110110101100000100 & b_1012=0b001 & b_13=0 & Rn_GPR64xsp & Rd_GPR64
{
	Rd_GPR64 = pacib(Rd_GPR64, Rn_GPR64xsp);
}

# C6.2.191 PACIB, PACIB1716, PACIBSP, PACIBZ, PACIZB page C6-829 line 48335 MATCH xdac10400/mask=xffffdc00
# CONSTRUCT xdac127e0/mask=xffffffe0 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac127e0/mask=xffffffe0 --status noqemu
# Z == 1 && Rn = 11111 PACIZB variant

:pacizb Rd_GPR64
is b_1431=0b110110101100000100 & b_1012=0b001 & b_13=1 & b_0509=0b11111 & Rd_GPR64
{
	Rd_GPR64 = pacizb(Rd_GPR64);
}

# C6.2.191 PACIB, PACIB1716, PACIBSP, PACIBZ, PACIZB page C6-829 line 48335 MATCH xd503215f/mask=xfffffddf
# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# CONSTRUCT xd503215f/mask=xffffffff MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd503215f/mask=xffffffff --status nodest
# CRm == 0001 && op2 == 010 PACIB1716 variant

:pacib1716
is b_1231=0b11010101000000110010 & b_0811=0b0001 & b_0507=0b010 & b_0004=0b11111
{
	x17 = pacib(x17, x16);
}

# C6.2.191 PACIB, PACIB1716, PACIBSP, PACIBZ, PACIZB page C6-829 line 48335 MATCH xd503215f/mask=xfffffddf
# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# CONSTRUCT xd503237f/mask=xffffffff MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd503237f/mask=xffffffff --status nodest
# CRm == 0011 && op2 == 011 PACIBSP variant

:pacibsp
is b_1231=0b11010101000000110010 & b_0811=0b0011 & b_0507=0b011 & b_0004=0b11111
{
	x30 = pacib(x30, sp);
}

# C6.2.191 PACIB, PACIB1716, PACIBSP, PACIBZ, PACIZB page C6-829 line 48335 MATCH xd503215f/mask=xfffffddf
# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# CONSTRUCT xd503235f/mask=xffffffff MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd503235f/mask=xffffffff --status nodest
# CRm == 0011 && op2 == 010 PACIBZ variant

:pacibz
is b_1231=0b11010101000000110010 & b_0811=0b0011 & b_0507=0b010 & b_0004=0b11111
{
	x30 = pacizb(x30);
}

# C6.2.192 PRFM (immediate) page C6-831 line 48479 MATCH xf9800000/mask=xffc00000
# CONSTRUCT xf9800000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xf9800000/mask=xffc00000 --status nomem

:prfm aa_prefetch, addrIndexed
is size.ldstr=3 & b_2729=7 & v=0 & b_2425=1 & b_2223=2 & addrIndexed & b_0304 & b_0102 & b_00 & aa_prefetch
{
	addr:8 = addrIndexed;
	hint:1 = b_0304;
	target:1 = b_0102;
	stream:1 = b_00;
	Hint_Prefetch(addr, hint, target, stream);
}

# C6.2.193 PRFM (literal) page C6-833 line 48570 MATCH xd8000000/mask=xff000000
# CONSTRUCT xd8000000/mask=xff000000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd8000000/mask=xff000000 --status nodest --comment "qemuerr(illegal addresses cause qemu exit)"

:prfm aa_prefetch, Addr19
is size.ldstr=3 & b_2729=3 & v=0 & b_2425=0 & Addr19 & b_0304 & b_0102 & b_00 & aa_prefetch
{
	addr:8 = &Addr19;
	hint:1 = b_0304;
	target:1 = b_0102;
	stream:1 = b_00;
	Hint_Prefetch(addr, hint, target, stream);
}

# C6.2.194 PRFM (register) page C6-835 line 48650 MATCH xf8a00800/mask=xffe00c00
# CONSTRUCT xf8a00800/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xf8a00800/mask=xffe00c00 --status nomem

:prfm aa_prefetch, addrIndexed
is size.ldstr=3 & b_2729=7 & v=0 & b_2425=0 & b_2223=2 & b_2121=1 & addrIndexed & b_1011=2 & b_0304 & b_0102 & b_00 & aa_prefetch
{
	addr:8 = addrIndexed;
	hint:1 = b_0304;
	target:1 = b_0102;
	stream:1 = b_00;
	Hint_Prefetch(addr, hint, target, stream);
}

# C6.2.195 PRFM (unscaled offset) page C6-837 line 48761 MATCH xf8800000/mask=xffe00c00
# CONSTRUCT xf8800000/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xf8800000/mask=xfffffc00 --status nomem

:prfum aa_prefetch, addr_unscUIMM
is size.ldstr=3 & b_2729=7 & v=0 & b_2425=0 & b_2223=2 & b_2121=0 & addr_unscUIMM & simm9=0 & b_1011=0 & b_0304 & b_0102 & b_00 & aa_prefetch
{
	addr:8 = addr_unscUIMM;
	hint:1 = b_0304;
	target:1 = b_0102;
	stream:1 = b_00;
	Hint_Prefetch(addr, hint, target, stream);
}

# C6.2.195 PRFM (unscaled offset) page C6-837 line 48761 MATCH xf8800000/mask=xffe00c00
# CONSTRUCT xf8800000/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xf8800000/mask=xffe00c00 --status nomem

:prfum aa_prefetch, addr_unscUIMM
is size.ldstr=3 & b_2729=7 & v=0 & b_2425=0 & b_2223=2 & b_2121=0 & addr_unscUIMM & b_1011=0 & b_0304 & b_0102 & b_00 & aa_prefetch
{
	addr:8 = addr_unscUIMM;
	hint:1 = b_0304;
	target:1 = b_0102;
	stream:1 = b_00;
	Hint_Prefetch(addr, hint, target, stream);
}

# C6.2.197 RBIT page C6-840 line 48892 MATCH x5ac00000/mask=x7ffffc00
# CONSTRUCT x5ac00000/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x5ac00000/mask=xfffffc00 --status pass

:rbit Rd_GPR32, Rn_GPR32
is sf=0 & b_3030=1 & S=0 & b_2428=0x1a & b_2123=6 & dp1.opcode2=0x0 & b_1015=0x0 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	# The algorithm swaps 1, 2, 4, 8 bits, ect
	local tmp:4 = Rn_GPR32;
	tmp = (((tmp & 0xaaaaaaaa) >> 1) | ((tmp & 0x55555555) << 1));
	tmp = (((tmp & 0xcccccccc) >> 2) | ((tmp & 0x33333333) << 2));
	tmp = (((tmp & 0xf0f0f0f0) >> 4) | ((tmp & 0x0f0f0f0f) << 4));
	tmp = (((tmp & 0xff00ff00) >> 8) | ((tmp & 0x00ff00ff) << 8));
	tmp = ((tmp >> 16) | (tmp << 16));
	Rd_GPR64 = zext(tmp);
}

# C6.2.197 RBIT page C6-840 line 48892 MATCH x5ac00000/mask=x7ffffc00
# CONSTRUCT xdac00000/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac00000/mask=xfffffc00 --status pass

:rbit Rd_GPR64, Rn_GPR64
is sf=1 & b_3030=1 & S=0 & b_2428=0x1a & b_2123=6 & dp1.opcode2=0x0 & b_1015=0x0 & Rn_GPR64 & Rd_GPR64
{
	# The algorithm swaps 1, 2, 4, 8 bits, ect
	local tmp:8 = Rn_GPR64;
	tmp = (((tmp & 0xaaaaaaaaaaaaaaaa) >> 1) | ((tmp & 0x5555555555555555) << 1));
	tmp = (((tmp & 0xcccccccccccccccc) >> 2) | ((tmp & 0x3333333333333333) << 2));
	tmp = (((tmp & 0xf0f0f0f0f0f0f0f0) >> 4) | ((tmp & 0x0f0f0f0f0f0f0f0f) << 4));
	tmp = (((tmp & 0xff00ff00ff00ff00) >> 8) | ((tmp & 0x00ff00ff00ff00ff) << 8));
	tmp = (((tmp & 0xffff0000ffff0000) >> 16) | ((tmp & 0x0000ffff0000ffff) << 16));
	Rd_GPR64 = ((tmp >> 32) | (tmp << 32));
}

# C6.2.198 RET page C6-841 line 48953 MATCH xd65f0000/mask=xfffffc1f
# CONSTRUCT xd65f0000/mask=xfffffc1f MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd65f0000/mask=xfffffc1f --status nodest

:ret Rn_GPR64
is b_2531=0x6b & b_2324=0 & b_2122=2 & b_1620=0x1f & b_1015=0 & Rn_GPR64 & b_0004=0
{
	pc = Rn_GPR64;
	return [pc];
}

# C6.2.198 RET page C6-841 line 48953 MATCH xd65f0000/mask=xfffffc1f
# CONSTRUCT xd65f03c0/mask=xffffffff MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd65f03c0/mask=xffffffff --status nodest

:ret
is b_2531=0x6b & b_2324=0 & b_2122=2 & b_1620=0x1f & b_1015=0 & aa_Xn=30 & b_0004=0
{
	pc = x30;
	return [pc];
}

# C6.2.199 RETAA, RETAB page C6-842 line 48993 MATCH xd65f0bff/mask=xfffffbff
# CONSTRUCT xd65f0bff/mask=xffffffff MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd65f0bff/mask=xffffffff --status nodest
# M == 0 RETAA variant

:retaa
is b_1131=0b110101100101111100001 & b_0009=0b1111111111 & b_10=0
{
	AuthIA(x30, sp);
	pc = x30;
	return [pc];
}

# C6.2.199 RETAA, RETAB page C6-842 line 48993 MATCH xd65f0bff/mask=xfffffbff
# CONSTRUCT xd65f0fff/mask=xffffffff MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd65f0fff/mask=xffffffff --status nodest
# M == 1 RETAB variant

:retab
is b_1131=0b110101100101111100001 & b_0009=0b1111111111 & b_10=1
{
	AuthIB(x30, sp);
	pc = x30;
	return [pc];
}

# C6.2.200 REV page C6-843 line 49055 MATCH x5ac00800/mask=x7ffff800
# CONSTRUCT x5ac00800/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x5ac00800/mask=xfffffc00 --status pass
# sf == 0 && opc == 10 32-bit variant (3210 -> 0123)

:rev Rd_GPR32, Rn_GPR32
is b_1230=0b1011010110000000000 & b_31=0 & b_1011=0b10 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	local tmp:4 = Rn_GPR32;
	tmp = (((tmp & 0xff00ff00) >> 8) | ((tmp & 0x00ff00ff) << 8));
	tmp = ((tmp >> 16) | (tmp << 16));
	Rd_GPR64 = zext(tmp);
}

# C6.2.200 REV page C6-843 line 49055 MATCH x5ac00800/mask=x7ffff800
# C6.2.203 REV64 page C6-848 line 49306 MATCH xdac00c00/mask=xfffffc00
# CONSTRUCT xdac00c00/mask=xfffffc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xdac00c00/mask=xfffffc00 --status pass
# sf == 1 && opc == 11 64-bit variant (76543210 -> 01234567)
# NB equivalent to REV64, which is never the preferred disassembly

:rev Rd_GPR64, Rn_GPR64
is b_1230=0b1011010110000000000 & b_31=1 & b_1011=0b11 & Rn_GPR64 & Rd_GPR64
{
	local tmp:8 = Rn_GPR64;
	tmp = (((tmp & 0xff00ff00ff00ff00) >> 8) | ((tmp & 0x00ff00ff00ff00ff) << 8));
	tmp = (((tmp & 0xffff0000ffff0000) >> 16) | ((tmp & 0x0000ffff0000ffff) << 16));
	Rd_GPR64 = ((tmp >> 32) | (tmp << 32));
}

# C6.2.201 REV16 page C6-845 line 49148 MATCH x5ac00400/mask=x7ffffc00
# CONSTRUCT x5ac00400/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x5ac00400/mask=xfffffc00 --status pass
# sf == 0 (and opc == 01) 32-bit variant (3210 -> 2301)

:rev16 Rd_GPR32, Rn_GPR32
is b_1230=0b1011010110000000000 & b_31=0 & b_1011=0b01 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	local tmp:4 = Rn_GPR32;
	tmp = (((tmp & 0xff00ff00) >> 8) | ((tmp & 0x00ff00ff) << 8));
	Rd_GPR64 = zext(tmp);
}

# C6.2.201 REV16 page C6-845 line 49148 MATCH x5ac00400/mask=x7ffffc00
# CONSTRUCT xdac00400/mask=xfffffc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac00400/mask=xfffffc00 --status pass
# sf == 1 (and opc=01) 64-bit variant (76543210 -> 67452301)

:rev16 Rd_GPR64, Rn_GPR64
is b_1230=0b1011010110000000000 & b_31=1 & b_1011=0b01 & Rn_GPR64 & Rd_GPR64
{
	local tmp:8 = Rn_GPR64;
	Rd_GPR64 = (((tmp & 0xff00ff00ff00ff00) >> 8) | ((tmp & 0x00ff00ff00ff00ff) << 8));
}

# C6.2.202 REV32 page C6-847 line 49238 MATCH xdac00800/mask=xfffffc00
# C6.2.200 REV page C6-843 line 49055 MATCH x5ac00800/mask=x7ffff800
# CONSTRUCT xdac00800/mask=xfffffc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xdac00800/mask=xfffffc00 --status pass
# sf == 1 (and opc == 10) 64-bit variant (76543210 -> 45670123)

:rev32 Rd_GPR64, Rn_GPR64
is b_1230=0b1011010110000000000 & b_31=1 & b_1011=0b10 & Rn_GPR64 & Rd_GPR64
{
	local tmp:8 = Rn_GPR64;
	tmp = (((tmp & 0xff00ff00ff00ff00) >> 8) | ((tmp & 0x00ff00ff00ff00ff) << 8));
	Rd_GPR64 = (((tmp & 0xffff0000ffff0000) >> 16) | ((tmp & 0x0000ffff0000ffff) << 16));
}

# C6.2.204 ROR (immediate) page C6-849 line 49358 MATCH x13800000/mask=x7fa00000
# C6.2.80 EXTR page C6-641 line 37372 MATCH x13800000/mask=x7fa00000
# CONSTRUCT x13800000/mask=xffe00000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x13800000/mask=xffe00000 --status pass

:ror Rd_GPR32, Rn_GPR32, LSB_bitfield32_imm
is sf=0 & b_2930=0 & b_2428=0x13 & b_2323=1 & n=0 & b_21=0 & Rn=Rm & Rm_GPR32 & LSB_bitfield32_imm & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	result:4 = (Rn_GPR32 >> LSB_bitfield32_imm) | (Rn_GPR32 << (32 - LSB_bitfield32_imm));
	Rd_GPR64 = zext(result);
}

# C6.2.204 ROR (immediate) page C6-849 line 49358 MATCH x13800000/mask=x7fa00000
# C6.2.80 EXTR page C6-641 line 37372 MATCH x13800000/mask=x7fa00000
# CONSTRUCT x93c00000/mask=xffe00000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x93c00000/mask=xffe00000 --status pass

:ror Rd_GPR64, Rn_GPR64, LSB_bitfield64_imm
is sf=1 & b_2930=0 & b_2428=0x13 & b_2323=1 & n=1 & b_21=0 & Rn=Rm & Rm_GPR64 & LSB_bitfield64_imm & Rn_GPR64 & Rd_GPR64
{
	result:8 = (Rn_GPR64 >> LSB_bitfield64_imm) | (Rn_GPR64 << (64 - LSB_bitfield64_imm));
	Rd_GPR64 = result;
}

# C6.2.205 ROR (register) page C6-850 line 49430 MATCH x1ac02c00/mask=x7fe0fc00
# C6.2.206 RORV page C6-851 line 49504 MATCH x1ac02c00/mask=x7fe0fc00
# CONSTRUCT x1ac02c00/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x1ac02c00/mask=xffe0fc00 --status pass

:ror Rd_GPR32, Rn_GPR32, Rm_GPR32
is sf=0 & b_3030=0 & S=0 & b_2428=0x1a & b_2123=6 & Rm_GPR32 & b_1015=0xb & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	rval:4 = Rm_GPR32 & 0x1f;
	tmp_1:4 = ( Rn_GPR32 >> rval) | ( Rn_GPR32 << ( 32 - rval ) );
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.205 ROR (register) page C6-850 line 49430 MATCH x1ac02c00/mask=x7fe0fc00
# C6.2.206 RORV page C6-851 line 49504 MATCH x1ac02c00/mask=x7fe0fc00
# CONSTRUCT x9ac02c00/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x9ac02c00/mask=xffe0fc00 --status pass

:ror Rd_GPR64, Rn_GPR64, Rm_GPR64
is sf=1 & b_3030=0 & S=0 & b_2428=0x1a & b_2123=6 & Rm_GPR64 & b_1015=0xb & Rn_GPR64 & Rd_GPR64
{
	rval:8 = Rm_GPR64 & 0x3f;
	tmp_1:8 = ( Rn_GPR64 >> rval ) | ( Rn_GPR64 << ( 64 - rval ) );
	Rd_GPR64 = tmp_1;
}

# C6.2.207 SBC page C6-852 line 49574 MATCH x5a000000/mask=x7fe0fc00
# C6.2.181 NGC page C6-815 line 47532 MATCH x5a0003e0/mask=x7fe0ffe0
# CONSTRUCT x5a000000/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x5a000000/mask=xffe0fc00 --status pass --comment "flags"

:sbc Rd_GPR32, Rn_GPR32, Rm_GPR32
is sf=0 & op=1 & s=0 & b_2428=0x1a & b_2123=0 & Rm_GPR32 & opcode2=0x0 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp:4 = Rm_GPR32 - 1:4 + zext(CY);
	subflags(Rn_GPR32, tmp);
	Rd_GPR64 = zext(Rn_GPR32 - tmp);
}

# C6.2.207 SBC page C6-852 line 49574 MATCH x5a000000/mask=x7fe0fc00
# C6.2.181 NGC page C6-815 line 47532 MATCH x5a0003e0/mask=x7fe0ffe0
# CONSTRUCT xda000000/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xda000000/mask=xffe0fc00 --status pass --comment "flags"

:sbc Rd_GPR64, Rn_GPR64, Rm_GPR64
is sf=1 & op=1 & s=0 & b_2428=0x1a & b_2123=0 & Rm_GPR64 & opcode2=0x0 & Rn_GPR64 & Rd_GPR64
{
	tmp:8 = Rm_GPR64 - 1:8 + zext(CY);
	subflags(Rn_GPR64, tmp);
	Rd_GPR64 = Rn_GPR64 - tmp;
}

# C6.2.208 SBCS page C6-854 line 49661 MATCH x7a000000/mask=x7fe0fc00
# C6.2.182 NGCS page C6-816 line 47598 MATCH x7a0003e0/mask=x7fe0ffe0
# CONSTRUCT x7a000000/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x7a000000/mask=xffe0fc00 --status pass --comment "flags"

:sbcs Rd_GPR32, Rn_GPR32, Rm_GPR32
is sf=0 & op=1 & s=1 & b_2428=0x1a & b_2123=0 & Rm_GPR32 & opcode2=0x0 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp:4 = Rm_GPR32 - 1:4 + zext(CY);
	subflags(Rn_GPR32, tmp);
	Rd_GPR64 = zext(Rn_GPR32 - tmp);
	resultflags(Rd_GPR32);
	affectflags();
}

# C6.2.208 SBCS page C6-854 line 49661 MATCH x7a000000/mask=x7fe0fc00
# C6.2.182 NGCS page C6-816 line 47598 MATCH x7a0003e0/mask=x7fe0ffe0
# CONSTRUCT xfa000000/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xfa000000/mask=xffe0fc00 --status pass --comment "flags"

:sbcs Rd_GPR64, Rn_GPR64, Rm_GPR64
is sf=1 & op=1 & s=1 & b_2428=0x1a & b_2123=0 & Rm_GPR64 & opcode2=0x0 & Rn_GPR64 & Rd_GPR64
{
	tmp:8 = Rm_GPR64 - 1:8 + zext(CY);
	subflags(Rn_GPR64, tmp);
	Rd_GPR64 = Rn_GPR64 - tmp;
	resultflags(Rd_GPR64);
	affectflags();
}

# C6.2.209 SBFIZ page C6-856 line 49751 KEEPWITH

sbfiz_lsb: "#"^imm is ImmR [ imm = 32 - ImmR; ] { export *[const]:4 imm; }
sbfiz_width: "#"^imm is ImmS [ imm = ImmS + 1; ] { export *[const]:4 imm; }
sbfiz_lsb64: "#"^imm is ImmR [ imm = 64 - ImmR; ] { export *[const]:4 imm; }

# C6.2.209 SBFIZ page C6-856 line 49751 MATCH x13000000/mask=x7f800000
# C6.2.16 ASR (immediate) page C6-551 line 32350 MATCH x13007c00/mask=x7f807c00
# C6.2.210 SBFM page C6-857 line 49823 MATCH x13000000/mask=x7f800000
# C6.2.211 SBFX page C6-859 line 49939 MATCH x13000000/mask=x7f800000
# C6.2.283 SXTB page C6-976 line 56601 MATCH x13001c00/mask=x7fbffc00
# C6.2.284 SXTH page C6-977 line 56667 MATCH x13003c00/mask=x7fbffc00
# CONSTRUCT x13000002/mask=xffe08006 MATCHED 6 DOCUMENTED OPCODES
# AUNIT --inst x13000002/mask=xffe08006 --status pass
# Special alias case of sbfm for when ImmS < ImmR-1
# if sf == '0' && (N != '0' || immr<5> != '0' || imms<5> != '0') then ReservedValue();

:sbfiz Rd_GPR32, Rn_GPR32, sbfiz_lsb, sbfiz_width
is sbfiz_lsb & sbfiz_width & ImmS_LT_ImmR=1 & ImmS_EQ_ImmR=0 & sf=0 & opc=0 & b_2428=0x13 & b_2323=0 & n=0 & b_21=0 & b_15=0 & ImmRConst32 & ImmSConst32 & DecodeWMask32 & DecodeTMask32 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	local wmask:4 = DecodeWMask32;
	local tmask:4 = DecodeTMask32;
	local src:4 = Rn_GPR32;
	local bot:4 = ((src>>ImmRConst32)|(src<<(32-ImmRConst32))) & wmask;
	local top:4 = (((src>>ImmSConst32)&0x1)*(-1))&0xffffffff;
	Rd_GPR64 = zext((top & ~(tmask)) | (bot & tmask));
}

# C6.2.209 SBFIZ page C6-856 line 49751 MATCH x13000000/mask=x7f800000
# C6.2.16 ASR (immediate) page C6-551 line 32350 MATCH x13007c00/mask=x7f807c00
# C6.2.210 SBFM page C6-857 line 49823 MATCH x13000000/mask=x7f800000
# C6.2.211 SBFX page C6-859 line 49939 MATCH x13000000/mask=x7f800000
# C6.2.283 SXTB page C6-976 line 56601 MATCH x13001c00/mask=x7fbffc00
# C6.2.284 SXTH page C6-977 line 56667 MATCH x13003c00/mask=x7fbffc00
# C6.2.285 SXTW page C6-978 line 56733 MATCH x93407c00/mask=xfffffc00
# CONSTRUCT x93400002/mask=xffc00006 MATCHED 7 DOCUMENTED OPCODES
# AUNIT --inst x93400002/mask=xffc00006 --status pass
# Special alias case of sbfm for when ImmS < ImmR-1

:sbfiz Rd_GPR64, Rn_GPR64, sbfiz_lsb64, sbfiz_width
is sbfiz_lsb64 & sbfiz_width & ImmS_LT_ImmR=1 & ImmS_EQ_ImmR=0 & sf=1 & opc=0 & b_2428=0x13 & b_2323=0 & n=1 & ImmRConst64 & ImmSConst64 & DecodeWMask64 & DecodeTMask64 & Rn_GPR64 & Rd_GPR64
{
	local wmask:8 = DecodeWMask64;
	local tmask:8 = DecodeTMask64;
	local src:8 = Rn_GPR64;
	local bot:8 = ((src>>ImmRConst64)|(src<<(64-ImmRConst64))) & wmask;
	local top:8 = ((src>>ImmSConst64)&0x1)*(-1);
	Rd_GPR64 = (top & ~(tmask)) | (bot & tmask);
}

# C6.2.210 SBFM page C6-857 line 49823 MATCH x13000000/mask=x7f800000
# C6.2.16 ASR (immediate) page C6-551 line 32350 MATCH x13007c00/mask=x7f807c00
# C6.2.209 SBFIZ page C6-856 line 49751 MATCH x13000000/mask=x7f800000
# C6.2.211 SBFX page C6-859 line 49939 MATCH x13000000/mask=x7f800000
# C6.2.283 SXTB page C6-976 line 56601 MATCH x13001c00/mask=x7fbffc00
# C6.2.284 SXTH page C6-977 line 56667 MATCH x13003c00/mask=x7fbffc00
# CONSTRUCT x13000000/mask=xffe08000 MATCHED 6 DOCUMENTED OPCODES
# AUNIT --inst x13000000/mask=xffe08000 --status pass
# if sf == '0' && (N != '0' || immr<5> != '0' || imms<5> != '0') then ReservedValue();

:sbfm Rd_GPR32, Rn_GPR32, ImmRConst32, ImmSConst32
is sf=0 & opc=0 & b_2428=0x13 & b_2323=0 & n=0 & b_21=0 & b_15=0 & ImmRConst32 & ImmSConst32 & DecodeWMask32 & DecodeTMask32 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	local wmask:4 = DecodeWMask32;
	local tmask:4 = DecodeTMask32;
	local src:4 = Rn_GPR32;
	local bot:4 = ((src>>ImmRConst32)|(src<<(32-ImmRConst32))) & wmask;
	local top:4 = (((src>>ImmSConst32)&0x1)*(-1))&0xffffffff;
	Rd_GPR64 = zext((top & ~(tmask)) | (bot & tmask));
}

# C6.2.210 SBFM page C6-857 line 49823 MATCH x13000000/mask=x7f800000
# C6.2.16 ASR (immediate) page C6-551 line 32350 MATCH x13007c00/mask=x7f807c00
# C6.2.209 SBFIZ page C6-856 line 49751 MATCH x13000000/mask=x7f800000
# C6.2.211 SBFX page C6-859 line 49939 MATCH x13000000/mask=x7f800000
# C6.2.283 SXTB page C6-976 line 56601 MATCH x13001c00/mask=x7fbffc00
# C6.2.284 SXTH page C6-977 line 56667 MATCH x13003c00/mask=x7fbffc00
# C6.2.285 SXTW page C6-978 line 56733 MATCH x93407c00/mask=xfffffc00
# CONSTRUCT x93400000/mask=xffc00000 MATCHED 7 DOCUMENTED OPCODES
# AUNIT --inst x93400000/mask=xffc00000 --status pass

:sbfm Rd_GPR64, Rn_GPR64, ImmRConst64, ImmSConst64
is sf=1 & opc=0 & b_2428=0x13 & b_2323=0 & n=1 & ImmRConst64 & ImmSConst64 & DecodeWMask64 & DecodeTMask64 & Rn_GPR64 & Rd_GPR64
{
	local wmask:8 = DecodeWMask64;
	local tmask:8 = DecodeTMask64;
	local src:8 = Rn_GPR64;
	local bot:8 = ((src>>ImmRConst64)|(src<<(64-ImmRConst64))) & wmask;
	local top:8 = ((src>>ImmSConst64)&0x1)*(-1);
	Rd_GPR64 = (top & ~(tmask)) | (bot & tmask);
}

# C6.2.211 SBFX page C6-859 line 49939 MATCH x13000000/mask=x7f800000
# C6.2.16 ASR (immediate) page C6-551 line 32350 MATCH x13007c00/mask=x7f807c00
# C6.2.209 SBFIZ page C6-856 line 49751 MATCH x13000000/mask=x7f800000
# C6.2.210 SBFM page C6-857 line 49823 MATCH x13000000/mask=x7f800000
# C6.2.283 SXTB page C6-976 line 56601 MATCH x13001c00/mask=x7fbffc00
# C6.2.284 SXTH page C6-977 line 56667 MATCH x13003c00/mask=x7fbffc00
# CONSTRUCT x13000004/mask=xffe08006 MATCHED 6 DOCUMENTED OPCODES
# AUNIT --inst x13000004/mask=xffe08006 --status pass
# Special cases when just getting the 0 bit
# >> Not sure about the above old comment one, this is actually for getting one bit from Rn
# SBFX alias of SMFM is used when ImmS >= ImmR
# We split the '>=' into two separate cases
# Here ImmS = ImmR (for 32-bit)
# Alias for sbfm as determined by BFXPreferred()
# if sf == '0' && (N != '0' || immr<5> != '0' || imms<5> != '0') then ReservedValue();

:sbfx Rd_GPR32, Rn_GPR32, ImmRConst32, BFextractWidth32
is ImmS_LT_ImmR=0 & ImmS_EQ_ImmR=1 & sf=0 & opc=0 & b_2428=0x13 & b_2323=0 & n=0 & b_21=0 & b_15=0 & ImmRConst32 & BFextractWidth32 & ImmSConst32 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp:4 = ((Rn_GPR32 >> ImmSConst32) & 0x1) * 0xffffffff;
	Rd_GPR64 = zext(tmp);
}

# C6.2.211 SBFX page C6-859 line 49939 MATCH x13000000/mask=x7f800000
# C6.2.16 ASR (immediate) page C6-551 line 32350 MATCH x13007c00/mask=x7f807c00
# C6.2.209 SBFIZ page C6-856 line 49751 MATCH x13000000/mask=x7f800000
# C6.2.210 SBFM page C6-857 line 49823 MATCH x13000000/mask=x7f800000
# C6.2.283 SXTB page C6-976 line 56601 MATCH x13001c00/mask=x7fbffc00
# C6.2.284 SXTH page C6-977 line 56667 MATCH x13003c00/mask=x7fbffc00
# C6.2.285 SXTW page C6-978 line 56733 MATCH x93407c00/mask=xfffffc00
# CONSTRUCT x93400004/mask=xffc00006 MATCHED 7 DOCUMENTED OPCODES
# AUNIT --inst x93400004/mask=xffc00006 --status pass
# Now, the case where ImmS = ImmR (for 64-bit)

:sbfx Rd_GPR64, Rn_GPR64, ImmRConst64, BFextractWidth64
is ImmS_LT_ImmR=0 & ImmS_EQ_ImmR=1 & sf=1 & opc=0 & b_2428=0x13 & b_2323=0 & n=1 & BFextractWidth64 & ImmRConst64 & ImmSConst64 & Rn_GPR64 & Rd_GPR64
{
	tmp:8 = ((Rn_GPR64 >> ImmSConst64) & 0x1) * 0xffffffffffffffff;
	Rd_GPR64 = tmp;
}

# C6.2.211 SBFX page C6-859 line 49939 MATCH x13000000/mask=x7f800000
# C6.2.16 ASR (immediate) page C6-551 line 32350 MATCH x13007c00/mask=x7f807c00
# C6.2.209 SBFIZ page C6-856 line 49751 MATCH x13000000/mask=x7f800000
# C6.2.210 SBFM page C6-857 line 49823 MATCH x13000000/mask=x7f800000
# C6.2.283 SXTB page C6-976 line 56601 MATCH x13001c00/mask=x7fbffc00
# C6.2.284 SXTH page C6-977 line 56667 MATCH x13003c00/mask=x7fbffc00
# CONSTRUCT x13000000/mask=xffe08006 MATCHED 6 DOCUMENTED OPCODES
# AUNIT --inst x13000000/mask=xffe08006 --status pass
# Now, the case where ImmS > ImmR (for 32-bit)
# if sf == '0' && (N != '0' || immr<5> != '0' || imms<5> != '0') then ReservedValue();

:sbfx Rd_GPR32, Rn_GPR32, ImmRConst32, BFextractWidth32
is ImmS_EQ_ImmR=0 & ImmS_LT_ImmR=0 & sf=0 & opc=0 & b_2428=0x13 & b_2323=0 & n=0 & b_21=0 & b_15=0 & ImmRConst32 & BFextractWidth32 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	src:4 = Rn_GPR32;
	tmp:4 = src << (31 - (ImmRConst32 + BFextractWidth32 - 1));
	tmp = tmp s>> (32 - BFextractWidth32);
	Rd_GPR64 = zext(tmp);
}

# C6.2.211 SBFX page C6-859 line 49939 MATCH x13000000/mask=x7f800000
# C6.2.16 ASR (immediate) page C6-551 line 32350 MATCH x13007c00/mask=x7f807c00
# C6.2.209 SBFIZ page C6-856 line 49751 MATCH x13000000/mask=x7f800000
# C6.2.210 SBFM page C6-857 line 49823 MATCH x13000000/mask=x7f800000
# C6.2.283 SXTB page C6-976 line 56601 MATCH x13001c00/mask=x7fbffc00
# C6.2.284 SXTH page C6-977 line 56667 MATCH x13003c00/mask=x7fbffc00
# C6.2.285 SXTW page C6-978 line 56733 MATCH x93407c00/mask=xfffffc00
# CONSTRUCT x93400000/mask=xffc00000 MATCHED 7 DOCUMENTED OPCODES
# AUNIT --inst x93400000/mask=xffc00000 --status pass
# Finally, the case where ImmS > ImmR (for 64-bit)

:sbfx Rd_GPR64, Rn_GPR64, ImmRConst64, BFextractWidth64
is sf=1 & opc=0 & b_2428=0x13 & b_2323=0 & n=1 & ImmRConst64 & BFextractWidth64 & (ImmS_EQ_ImmR=0 & ImmS_LT_ImmR=0) & Rn_GPR64 & Rd_GPR64
{
	src:8 = Rn_GPR64;
	tmp:8 = src << (63 - (ImmRConst64 + BFextractWidth64 - 1));
	tmp = tmp s>> (64 - BFextractWidth64);
	Rd_GPR64 = tmp;
}

# C6.2.212 SDIV page C6-860 line 50011 MATCH x1ac00c00/mask=x7fe0fc00
# CONSTRUCT x1ac00c00/mask=xffe0fc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x1ac00c00/mask=xffe0fc00 --status pass

:sdiv Rd_GPR32, Rn_GPR32, Rm_GPR32
is sf=0 & b_3030=0 & S=0 & b_2428=0x1a & b_2123=6 & Rm_GPR32 & b_1015=0x3 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	local tmp_1:4 = 0;
	if (Rm_GPR32 == 0) goto <zero>;
	tmp_1 = Rn_GPR32 s/ Rm_GPR32;
<zero>
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.212 SDIV page C6-860 line 50011 MATCH x1ac00c00/mask=x7fe0fc00
# CONSTRUCT x9ac00c00/mask=xffe0fc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x9ac00c00/mask=xffe0fc00 --status pass

:sdiv Rd_GPR64, Rn_GPR64, Rm_GPR64
is sf=1 & b_3030=0 & S=0 & b_2428=0x1a & b_2123=6 & Rm_GPR64 & b_1015=0x3 & Rn_GPR64 & Rd_GPR64
{
	local tmp_1:8 = 0;
	if (Rm_GPR64 == 0) goto <zero>;
	tmp_1 = Rn_GPR64 s/ Rm_GPR64;
<zero>
	Rd_GPR64 = tmp_1;
}

# C6.2.213 SEV page C6-861 line 50079 MATCH xd503209f/mask=xffffffff
# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# CONSTRUCT xd503209f/mask=xffffffff MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd503209f/mask=xffffffff --status nodest

:sev
is b_2431=0xd5 & b_2223=0 & l=0 & Op0=0 & Op1=3 & CRn=0x2 & imm7Low=4 & Rt=0x1f
{
	SendEvent();
}

# C6.2.214 SEVL page C6-862 line 50113 MATCH xd50320bf/mask=xffffffff
# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# CONSTRUCT xd50320bf/mask=xffffffff MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50320bf/mask=xffffffff --status nodest

:sevl
is b_2431=0xd5 & b_2223=0 & l=0 & Op0=0 & Op1=3 & CRn=0x2 & imm7Low=5 & Rt=0x1f
{
	SendEventLocally();
}

# C6.2.215 SMADDL page C6-863 line 50147 MATCH x9b200000/mask=xffe08000
# CONSTRUCT x9b200000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x9b200000/mask=xffe08000 --status pass

:smaddl Rd_GPR64, Rn_GPR32, Rm_GPR32, Ra_GPR64
is sf=1 & op.dp3_op54=0 & b_2428=0x1b & op.dp3_op31=1 & Rm_GPR32 & op.dp3_o0=0 & Ra_GPR64 & Rn_GPR32 & Rd_GPR64
{
	tmp_3:8 = sext(Rn_GPR32);
	tmp_4:8 = sext(Rm_GPR32);
	tmp_2:8 = tmp_3 * tmp_4;
	tmp_1:8 = Ra_GPR64 + tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.216 SMC page C6-864 line 50215 MATCH xd4000003/mask=xffe0001f
# CONSTRUCT xd4000003/mask=xffe0001f MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd4000003/mask=xffe0001f --status nodest

:smc imm16
is b_2431=0xd4 & excCode=0 & imm16 & excCode2=0 & ll=3
{
	CallSecureMonitor(imm16:2);
}

# C6.2.217 SMNEGL page C6-865 line 50269 MATCH x9b20fc00/mask=xffe0fc00
# C6.2.218 SMSUBL page C6-866 line 50321 MATCH x9b208000/mask=xffe08000
# CONSTRUCT x9b20fc00/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x9b20fc00/mask=xffe0fc00 --status pass

:smnegl Rd_GPR64, Rn_GPR32, Rm_GPR32
is sf=1 & op.dp3_op54=0 & b_2428=0x1b & op.dp3_op31=1 & Rm_GPR32 & op.dp3_o0=1 & Ra=0x1f & Rn_GPR32 & Rd_GPR64
{
	tmp_3:8 = sext(Rn_GPR32);
	tmp_4:8 = sext(Rm_GPR32);
	tmp_2:8 = tmp_3 * tmp_4;
	subflags0(tmp_2);
	tmp_1:8 = -tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.218 SMSUBL page C6-866 line 50321 MATCH x9b208000/mask=xffe08000
# CONSTRUCT x9b208000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x9b208000/mask=xffe08000 --status pass

:smsubl Rd_GPR64, Rn_GPR32, Rm_GPR32, Ra_GPR64
is sf=1 & op.dp3_op54=0 & b_2428=0x1b & op.dp3_op31=1 & Rm_GPR32 & op.dp3_o0=1 & Ra_GPR64 & Rn_GPR32 & Rd_GPR64
{
	tmp_3:8 = sext(Rn_GPR32);
	tmp_4:8 = sext(Rm_GPR32);
	tmp_2:8 = tmp_3 * tmp_4;
	tmp_1:8 = Ra_GPR64 - tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.219 SMULH page C6-867 line 50390 MATCH x9b400000/mask=xffe08000
# CONSTRUCT x9b400000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x9b400000/mask=xffe08000 --status pass
# To enforce SHOULD BE ONE fields add: b_1014=0b11111

:smulh Rd_GPR64, Rn_GPR64, Rm_GPR64
is sf=1 & op.dp3=0 & b_2428=0x1b & op.dp3_op31=2 & Rm_GPR64 & op.dp3_o0=0 & Ra & Rn_GPR64 & Rd_GPR64
{
	local tmpq:16 = sext(Rn_GPR64) * sext(Rm_GPR64);
	Rd_GPR64 = tmpq(8);
}

# C6.2.220 SMULL page C6-868 line 50443 MATCH x9b207c00/mask=xffe0fc00
# C6.2.215 SMADDL page C6-863 line 50147 MATCH x9b200000/mask=xffe08000
# CONSTRUCT x9b207c00/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x9b207c00/mask=xffe0fc00 --status pass

:smull Rd_GPR64, Rn_GPR32, Rm_GPR32
is sf=1 & op.dp3_op54=0 & b_2428=0x1b & op.dp3_op31=1 & Rm_GPR32 & op.dp3_o0=0 & Ra=0x1f & Rn_GPR32 & Rd_GPR64
{
	tmp_3:8 = sext(Rn_GPR32);
	tmp_4:8 = sext(Rm_GPR32);
	tmp_2:8 = tmp_3 * tmp_4;
	tmp_1:8 = tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.221 STADDB, STADDLB page C6-869 line 50494 MATCH x3820001f/mask=xffa0fc1f
# C6.2.224 STCLRB, STCLRLB page C6-873 line 50754 MATCH x3820101f/mask=xffa0fc1f
# C6.2.227 STEORB, STEORLB page C6-877 line 51013 MATCH x3820201f/mask=xffa0fc1f
# C6.2.248 STSETB, STSETLB page C6-914 line 53194 MATCH x3820301f/mask=xffa0fc1f
# C6.2.251 STSMAXB, STSMAXLB page C6-918 line 53453 MATCH x3820401f/mask=xffa0fc1f
# C6.2.254 STSMINB, STSMINLB page C6-924 line 53737 MATCH x3820501f/mask=xffa0fc1f
# C6.2.260 STUMAXB, STUMAXLB page C6-934 line 54262 MATCH x3820601f/mask=xffa0fc1f
# C6.2.263 STUMINB, STUMINLB page C6-940 line 54547 MATCH x3820701f/mask=xffa0fc1f
# C6.2.86 LDADDB, LDADDAB, LDADDALB, LDADDLB page C6-648 line 37726 MATCH x38200000/mask=xff20fc00
# C6.2.99 LDCLRB, LDCLRAB, LDCLRALB, LDCLRLB page C6-668 line 38879 MATCH x38201000/mask=xff20fc00
# C6.2.102 LDEORB, LDEORAB, LDEORALB, LDEORLB page C6-675 line 39290 MATCH x38202000/mask=xff20fc00
# C6.2.126 LDSETB, LDSETAB, LDSETALB, LDSETLB page C6-725 line 42290 MATCH x38203000/mask=xff20fc00
# C6.2.129 LDSMAXB, LDSMAXAB, LDSMAXALB, LDSMAXLB page C6-732 line 42701 MATCH x38204000/mask=xff20fc00
# C6.2.132 LDSMINB, LDSMINAB, LDSMINALB, LDSMINLB page C6-739 line 43112 MATCH x38205000/mask=xff20fc00
# C6.2.141 LDUMAXB, LDUMAXAB, LDUMAXALB, LDUMAXLB page C6-755 line 44078 MATCH x38206000/mask=xff20fc00
# C6.2.144 LDUMINB, LDUMINAB, LDUMINALB, LDUMINLB page C6-762 line 44489 MATCH x38207000/mask=xff20fc00
# CONSTRUCT x3820001f/mask=xffa08c1f MATCHED 16 DOCUMENTED OPCODES
# AUNIT --inst x3820001f/mask=xffa08c1f --status nomem

# size=0b00 (3031)

:st^ls_opc1^ls_lor^"b" aa_Ws, [Rn_GPR64xsp]
is b_3031=0b00 & b_2429=0b111000 & b_23=0 & b_21=1 & b_1515=0 & b_1011=0b00 & b_0004=0b11111 & ls_opc1 & ls_lor & aa_Ws & Rn_GPR64xsp
{ build ls_opc1; build ls_lor; }

# C6.2.222 STADDH, STADDLH page C6-870 line 50568 MATCH x7820001f/mask=xffa0fc1f
# C6.2.225 STCLRH, STCLRLH page C6-874 line 50828 MATCH x7820101f/mask=xffa0fc1f
# C6.2.228 STEORH, STEORLH page C6-878 line 51087 MATCH x7820201f/mask=xffa0fc1f
# C6.2.249 STSETH, STSETLH page C6-915 line 53268 MATCH x7820301f/mask=xffa0fc1f
# C6.2.252 STSMAXH, STSMAXLH page C6-920 line 53539 MATCH x7820401f/mask=xffa0fc1f
# C6.2.255 STSMINH, STSMINLH page C6-926 line 53823 MATCH x7820501f/mask=xffa0fc1f
# C6.2.261 STUMAXH, STUMAXLH page C6-936 line 54348 MATCH x7820601f/mask=xffa0fc1f
# C6.2.264 STUMINH, STUMINLH page C6-942 line 54633 MATCH x7820701f/mask=xffa0fc1f
# C6.2.87 LDADDH, LDADDAH, LDADDALH, LDADDLH page C6-650 line 37848 MATCH x78200000/mask=xff20fc00
# C6.2.100 LDCLRH, LDCLRAH, LDCLRALH, LDCLRLH page C6-670 line 39002 MATCH x78201000/mask=xff20fc00
# C6.2.103 LDEORH, LDEORAH, LDEORALH, LDEORLH page C6-677 line 39413 MATCH x78202000/mask=xff20fc00
# C6.2.127 LDSETH, LDSETAH, LDSETALH, LDSETLH page C6-727 line 42413 MATCH x78203000/mask=xff20fc00
# C6.2.130 LDSMAXH, LDSMAXAH, LDSMAXALH, LDSMAXLH page C6-734 line 42824 MATCH x78204000/mask=xff20fc00
# C6.2.133 LDSMINH, LDSMINAH, LDSMINALH, LDSMINLH page C6-741 line 43235 MATCH x78205000/mask=xff20fc00
# C6.2.142 LDUMAXH, LDUMAXAH, LDUMAXALH, LDUMAXLH page C6-757 line 44201 MATCH x78206000/mask=xff20fc00
# C6.2.145 LDUMINH, LDUMINAH, LDUMINALH, LDUMINLH page C6-764 line 44613 MATCH x78207000/mask=xff20fc00
# CONSTRUCT x7820001f/mask=xffa08c1f MATCHED 16 DOCUMENTED OPCODES
# AUNIT --inst x7820001f/mask=xffa08c1f --status nomem

# size=0b01 (3031)

:st^ls_opc2^ls_lor^"h" aa_Ws, [Rn_GPR64xsp]
is b_3031=0b01 & b_2429=0b111000 & b_23=0 & b_21=1 & b_1515=0 & b_1011=0b00 & b_0004=0b11111 & ls_opc2 & ls_lor & aa_Ws & Rn_GPR64xsp
{ build ls_opc2; build ls_lor; }

# C6.2.223 STADD, STADDL page C6-871 line 50642 MATCH xb820001f/mask=xbfa0fc1f
# C6.2.226 STCLR, STCLRL page C6-875 line 50902 MATCH xb820101f/mask=xbfa0fc1f
# C6.2.229 STEOR, STEORL page C6-879 line 51161 MATCH xb820201f/mask=xbfa0fc1f
# C6.2.250 STSET, STSETL page C6-916 line 53342 MATCH xb820301f/mask=xbfa0fc1f
# C6.2.253 STSMAX, STSMAXL page C6-922 line 53625 MATCH xb820401f/mask=xbfa0fc1f
# C6.2.256 STSMIN, STSMINL page C6-928 line 53909 MATCH xb820501f/mask=xbfa0fc1f
# C6.2.262 STUMAX, STUMAXL page C6-938 line 54434 MATCH xb820601f/mask=xbfa0fc1f
# C6.2.265 STUMIN, STUMINL page C6-944 line 54719 MATCH xb820701f/mask=xbfa0fc1f
# C6.2.88 LDADD, LDADDA, LDADDAL, LDADDL page C6-652 line 37971 MATCH xb8200000/mask=xbf20fc00
# C6.2.101 LDCLR, LDCLRA, LDCLRAL, LDCLRL page C6-672 line 39125 MATCH xb8201000/mask=xbf20fc00
# C6.2.104 LDEOR, LDEORA, LDEORAL, LDEORL page C6-679 line 39536 MATCH xb8202000/mask=xbf20fc00
# C6.2.128 LDSET, LDSETA, LDSETAL, LDSETL page C6-729 line 42536 MATCH xb8203000/mask=xbf20fc00
# C6.2.131 LDSMAX, LDSMAXA, LDSMAXAL, LDSMAXL page C6-736 line 42947 MATCH xb8204000/mask=xbf20fc00
# C6.2.134 LDSMIN, LDSMINA, LDSMINAL, LDSMINL page C6-743 line 43358 MATCH xb8205000/mask=xbf20fc00
# C6.2.143 LDUMAX, LDUMAXA, LDUMAXAL, LDUMAXL page C6-759 line 44324 MATCH xb8206000/mask=xbf20fc00
# C6.2.146 LDUMIN, LDUMINA, LDUMINAL, LDUMINL page C6-766 line 44737 MATCH xb8207000/mask=xbf20fc00
# CONSTRUCT xb820001f/mask=xffa08c1f MATCHED 16 DOCUMENTED OPCODES
# AUNIT --inst xb820001f/mask=xffa08c1f --status nomem

# size=0b10 (3031)

:st^ls_opc4^ls_lor aa_Ws, [Rn_GPR64xsp]
is b_3031=0b10 & b_2429=0b111000 & b_23=0 & b_21=1 & b_1515=0 & b_1011=0b00 & b_0004=0b11111 & ls_opc4 & ls_lor & aa_Ws & Rn_GPR64xsp
{ build ls_opc4; build ls_lor; }

# C6.2.223 STADD, STADDL page C6-871 line 50642 MATCH xb820001f/mask=xbfa0fc1f
# C6.2.226 STCLR, STCLRL page C6-875 line 50902 MATCH xb820101f/mask=xbfa0fc1f
# C6.2.229 STEOR, STEORL page C6-879 line 51161 MATCH xb820201f/mask=xbfa0fc1f
# C6.2.250 STSET, STSETL page C6-916 line 53342 MATCH xb820301f/mask=xbfa0fc1f
# C6.2.253 STSMAX, STSMAXL page C6-922 line 53625 MATCH xb820401f/mask=xbfa0fc1f
# C6.2.256 STSMIN, STSMINL page C6-928 line 53909 MATCH xb820501f/mask=xbfa0fc1f
# C6.2.262 STUMAX, STUMAXL page C6-938 line 54434 MATCH xb820601f/mask=xbfa0fc1f
# C6.2.265 STUMIN, STUMINL page C6-944 line 54719 MATCH xb820701f/mask=xbfa0fc1f
# C6.2.88 LDADD, LDADDA, LDADDAL, LDADDL page C6-652 line 37971 MATCH xb8200000/mask=xbf20fc00
# C6.2.101 LDCLR, LDCLRA, LDCLRAL, LDCLRL page C6-672 line 39125 MATCH xb8201000/mask=xbf20fc00
# C6.2.104 LDEOR, LDEORA, LDEORAL, LDEORL page C6-679 line 39536 MATCH xb8202000/mask=xbf20fc00
# C6.2.128 LDSET, LDSETA, LDSETAL, LDSETL page C6-729 line 42536 MATCH xb8203000/mask=xbf20fc00
# C6.2.131 LDSMAX, LDSMAXA, LDSMAXAL, LDSMAXL page C6-736 line 42947 MATCH xb8204000/mask=xbf20fc00
# C6.2.134 LDSMIN, LDSMINA, LDSMINAL, LDSMINL page C6-743 line 43358 MATCH xb8205000/mask=xbf20fc00
# C6.2.143 LDUMAX, LDUMAXA, LDUMAXAL, LDUMAXL page C6-759 line 44324 MATCH xb8206000/mask=xbf20fc00
# C6.2.146 LDUMIN, LDUMINA, LDUMINAL, LDUMINL page C6-766 line 44737 MATCH xb8207000/mask=xbf20fc00
# CONSTRUCT xf820001f/mask=xffa08c1f MATCHED 16 DOCUMENTED OPCODES
# AUNIT --inst xf820001f/mask=xffa08c1f --status nomem
# size=0b11 (3031)

:st^ls_opc8^ls_lor aa_Xs, [Rn_GPR64xsp]
is b_3031=0b11 & b_2429=0b111000 & b_23=0 & b_21=1 & b_1515=0 & b_1011=0b00 & b_0004=0b11111 & ls_opc8 & ls_lor & aa_Xs & Rn_GPR64xsp
{ build ls_opc8; build ls_lor; }

# C6.2.230 STLLRB page C6-881 line 51272 MATCH x08800000/mask=xffe08000
# CONSTRUCT x08800000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x08800000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111
# size=0b00 (3031)

:stllrb aa_Wt, [Rn_GPR64xsp]
is b_3031=0b00 & b_2329=0b0010001 & b_22=0 & b_21=0 & b_15=0 & aa_Wt & Rn_GPR64xsp
{ *:1 Rn_GPR64xsp = aa_Wt:1; LORelease(); }

# C6.2.231 STLLRH page C6-882 line 51326 MATCH x48800000/mask=xffe08000
# CONSTRUCT x48800000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x48800000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111
# size=0b01 (3031)

:stllrh aa_Wt, [Rn_GPR64xsp]
is b_3031=0b01 & b_2329=0b0010001 & b_22=0 & b_21=0 & b_15=0 & aa_Wt & Rn_GPR64xsp
{ *:2 Rn_GPR64xsp = aa_Wt:2; LORelease(); }

# C6.2.232 STLLR page C6-883 line 51380 MATCH x88800000/mask=xbfe08000
# CONSTRUCT x88800000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x88800000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111
# size=0b10 (3031)

:stllr aa_Wt, [Rn_GPR64xsp]
is b_3031=0b10 & b_2329=0b0010001 & b_22=0 & b_21=0 & b_15=0 & aa_Wt & Rn_GPR64xsp
{ *:4 Rn_GPR64xsp = aa_Wt; LORelease(); }

# C6.2.232 STLLR page C6-883 line 51380 MATCH x88800000/mask=xbfe08000
# CONSTRUCT xc8800000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xc8800000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111
# size=0b11 (3031)

:stllr aa_Xt, [Rn_GPR64xsp]
is b_3031=0b11 & b_2329=0b0010001 & b_22=0 & b_21=0 & b_15=0 & aa_Xt & Rn_GPR64xsp
{ *:8 Rn_GPR64xsp = aa_Xt; LORelease(); }

# C6.2.233 STLR page C6-884 line 51447 MATCH x88808000/mask=xbfe08000
# CONSTRUCT xc8808000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xc8808000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111

:stlr Rt_GPR64, addrReg
is size.ldstr=3 & b_2429=0x8 & b_23=1 & L=0 & b_21=0 & b_15=1 & addrReg & Rt_GPR64
{
	*addrReg = Rt_GPR64;
}

# C6.2.233 STLR page C6-884 line 51447 MATCH x88808000/mask=xbfe08000
# CONSTRUCT x88808000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x88808000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111

:stlr Rt_GPR32, addrReg
is size.ldstr=2 & b_2429=0x8 & b_23=1 & L=0 & b_21=0 & b_15=1 & addrReg & Rt_GPR32
{
	*addrReg = Rt_GPR32;
}

# C6.2.234 STLRB page C6-885 line 51512 MATCH x08808000/mask=xffe08000
# CONSTRUCT x08808000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x08808000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111

:stlrb Rt_GPR32, addrReg
is size.ldstr=0 & b_2429=0x8 & b_23=1 & L=0 & b_21=0 & b_15=1 & addrReg & Rt_GPR32
{
	*addrReg = Rt_GPR32;
}

# C6.2.235 STLRH page C6-886 line 51564 MATCH x48808000/mask=xffe08000
# CONSTRUCT x48808000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x48808000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1620=0b11111 & b_1014=0b11111

:stlrh Rt_GPR32, addrReg
is size.ldstr=1 & b_2429=0x8 & b_23=1 & L=0 & b_21=0 & b_15=1 & addrReg & Rt_GPR32
{
	*addrReg = Rt_GPR32;
}

# C6.2.236 STLXP page C6-887 line 51616 MATCH x88208000/mask=xbfe08000
# CONSTRUCT xc8208000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xc8208000/mask=xffe08000 --status nomem

:stlxp Rs_GPR32, Rt_GPR64, Rt2_GPR64, addrReg
is size.ldstr=3 & b_2429=0x8 & b_23=0 & L=0 & b_21=1 & Rs_GPR32 & b_15=1 & Rt2_GPR64 & addrReg & Rt_GPR64 & Rs_GPR64
{
	status:1 = 1;
	rsize:1 = 16;
	check:1 = ExclusiveMonitorPass(addrReg, rsize);
	if (!check) goto <fail>;
	*addrReg = Rt_GPR64;
	*(addrReg + 4) = Rt2_GPR64;
	status = ExclusiveMonitorsStatus();
<fail>
	Rs_GPR64 = zext(status);
}

# C6.2.236 STLXP page C6-887 line 51616 MATCH x88208000/mask=xbfe08000
# CONSTRUCT x88208000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x88208000/mask=xffe08000 --status nomem

:stlxp Rs_GPR32, Rt_GPR32, Rt2_GPR32, addrReg
is size.ldstr=2 & b_2429=0x8 & b_23=0 & L=0 & b_21=1 & Rs_GPR32 & b_15=1 & Rt2_GPR32 & addrReg & Rt_GPR32 & Rs_GPR64
{
	status:1 = 1;
	rsize:1 = 16;
	check:1 = ExclusiveMonitorPass(addrReg, rsize);
	if (!check) goto <fail>;
	*addrReg = Rt_GPR32;
	*(addrReg + 4) = Rt2_GPR32;
	status = ExclusiveMonitorsStatus();
<fail>
	Rs_GPR64 = zext(status);
}

# C6.2.237 STLXR page C6-890 line 51776 MATCH x88008000/mask=xbfe08000
# CONSTRUCT xc8008000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xc8008000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1014=0b11111

:stlxr Rs_GPR32, Rt_GPR64, addrReg
is size.ldstr=3 & b_2429=0x8 & b_23=0 & L=0 & b_21=0 & Rs_GPR32 & b_15=1 & addrReg & Rt_GPR64 & Rs_GPR64
{
	status:1 = 1;
	rsize:1 = 16;
	check:1 = ExclusiveMonitorPass(addrReg, rsize);
	if (!check) goto <fail>;
	*addrReg = Rt_GPR64;
	status = ExclusiveMonitorsStatus();
<fail>
	Rs_GPR64 = zext(status);
}

# C6.2.237 STLXR page C6-890 line 51776 MATCH x88008000/mask=xbfe08000
# CONSTRUCT x88008000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x88008000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1014=0b11111

:stlxr Rs_GPR32, Rt_GPR32, addrReg
is size.ldstr=2 & b_2429=0x8 & b_23=0 & L=0 & b_21=0 & Rs_GPR32 & b_15=1 & addrReg & Rt_GPR32 & Rs_GPR64
{
	status:1 = 1;
	rsize:1 = 16;
	check:1 = ExclusiveMonitorPass(addrReg, rsize);
	if (!check) goto <fail>;
	*addrReg = Rt_GPR32;
	status = ExclusiveMonitorsStatus();
<fail>
	Rs_GPR64 = zext(status);
}

# C6.2.238 STLXRB page C6-892 line 51915 MATCH x08008000/mask=xffe08000
# CONSTRUCT x08008000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x08008000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1014=0b11111

:stlxrb Rs_GPR32, Rt_GPR32, addrReg
is size.ldstr=0 & b_2429=0x8 & b_23=0 & L=0 & b_21=0 & Rs_GPR32 & b_15=1 & addrReg & Rt_GPR32 & Rs_GPR64
{
	status:1 = 1;
	rsize:1 = 16;
	check:1 = ExclusiveMonitorPass(addrReg, rsize);
	if (!check) goto <fail>;
	local tmp:4 = Rt_GPR32;
	*addrReg = tmp:1;
	status = ExclusiveMonitorsStatus();
<fail>
	Rs_GPR64 = zext(status);
}

# C6.2.239 STLXRH page C6-894 line 52034 MATCH x48008000/mask=xffe08000
# CONSTRUCT x48008000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x48008000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1014=0b11111

:stlxrh Rs_GPR32, Rt_GPR32, addrReg
is size.ldstr=1 & b_2429=0x8 & b_23=0 & L=0 & b_21=0 & Rs_GPR32 & b_15=1 & addrReg & Rt_GPR32 & Rs_GPR64
{
	status:1 = 1;
	rsize:1 = 16;
	check:1 = ExclusiveMonitorPass(addrReg, rsize);
	if (!check) goto <fail>;
	local tmp:4 = Rt_GPR32;
	*addrReg = tmp:2;
	status = ExclusiveMonitorsStatus();
<fail>
	Rs_GPR64 = zext(status);
}

# C6.2.240 STNP page C6-896 line 52159 MATCH x28000000/mask=x7fc00000
# CONSTRUCT x28000000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x28000000/mask=xffc00000 --status nomem

:stnp Rt_GPR32, Rt2_GPR32, addrPairIndexed
is b_3031=0b00 & b_2229=0b10100000 & Rt2_GPR32 & addrPairIndexed & Rt_GPR32
{
	*addrPairIndexed = Rt_GPR32;
	*(addrPairIndexed + 4) = Rt2_GPR32;
}

# C6.2.240 STNP page C6-896 line 52159 MATCH x28000000/mask=x7fc00000
# CONSTRUCT xa8000000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xa8000000/mask=xffc00000 --status nomem

:stnp Rt_GPR64, Rt2_GPR64, addrPairIndexed
is b_3031=0b10 & b_2229=0b10100000 & Rt2_GPR64 & addrPairIndexed & Rt_GPR64
{
	*addrPairIndexed = Rt_GPR64;
	*(addrPairIndexed + 8) = Rt2_GPR64;
}

# C6.2.241 STP page C6-898 line 52257 MATCH x28800000/mask=x7fc00000
# C6.2.241 STP page C6-898 line 52257 MATCH x29800000/mask=x7fc00000
# C6.2.241 STP page C6-898 line 52257 MATCH x29000000/mask=x7fc00000
# C6.2.240 STNP page C6-896 line 52159 MATCH x28000000/mask=x7fc00000
# CONSTRUCT x28000000/mask=xfe400000 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst x28000000/mask=xfe400000 --status nomem

:stp Rt_GPR32, Rt2_GPR32, addrPairIndexed
is b_3031=0b00 & b_2529=0b10100 & b_22=0b0 & Rt2_GPR32 & addrPairIndexed & Rt_GPR32
{
	*addrPairIndexed = Rt_GPR32;
	*(addrPairIndexed + 4) = Rt2_GPR32;
}

# C6.2.241 STP page C6-898 line 52257 MATCH x28800000/mask=x7fc00000
# C6.2.241 STP page C6-898 line 52257 MATCH x29800000/mask=x7fc00000
# C6.2.241 STP page C6-898 line 52257 MATCH x29000000/mask=x7fc00000
# C6.2.240 STNP page C6-896 line 52159 MATCH x28000000/mask=x7fc00000
# CONSTRUCT xa8000000/mask=xfe400000 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xa8000000/mask=xfe400000 --status nomem

:stp Rt_GPR64, Rt2_GPR64, addrPairIndexed
is b_3031=0b10 & b_2529=0b10100 & b_22=0b0 & Rt2_GPR64 & addrPairIndexed & Rt_GPR64
{
	*addrPairIndexed = Rt_GPR64;
	*(addrPairIndexed + 8) = Rt2_GPR64;
}

# C6.2.242 STR (immediate) page C6-901 line 52449 MATCH xb9000000/mask=xbfc00000
# CONSTRUCT xb9000000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xb9000000/mask=xffc00000 --status nomem

:str Rt_GPR32, addrUIMM
is size.ldstr=2 & b_2729=7 & v=0 & b_2425=1 & b_23=0 & b_2222=0 & addrUIMM & Rn_GPR64xsp & Rt_GPR32
{
	*addrUIMM = Rt_GPR32;
}

# C6.2.242 STR (immediate) page C6-901 line 52449 MATCH xb8000400/mask=xbfe00c00
# C6.2.242 STR (immediate) page C6-901 line 52449 MATCH xb8000c00/mask=xbfe00c00
# C6.2.257 STTR page C6-930 line 54021 MATCH xb8000800/mask=xbfe00c00
# C6.2.266 STUR page C6-946 line 54831 MATCH xb8000000/mask=xbfe00c00
# CONSTRUCT xb8000000/mask=xffe00000 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst xb8000000/mask=xffe00000 --status nomem

:st^UnscPriv^"r" Rt_GPR32, addrIndexed
is size.ldstr=2 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=0 & b_2121=0 & UnscPriv & addrIndexed & Rt_GPR32
{
	*addrIndexed = Rt_GPR32;
}

# C6.2.242 STR (immediate) page C6-901 line 52449 MATCH xb8000400/mask=xbfe00c00
# C6.2.242 STR (immediate) page C6-901 line 52449 MATCH xb8000c00/mask=xbfe00c00
# CONSTRUCT xb8000400/mask=xffe00400 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xb8000400/mask=xffe00400 --status nomem

:str Rt_GPR32, addrIndexed
is size.ldstr=2 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=0 & b_2121=0 & b_1010=1 & addrIndexed & Rt_GPR32
{
	*addrIndexed = Rt_GPR32;
}

# C6.2.242 STR (immediate) page C6-901 line 52449 MATCH xb9000000/mask=xbfc00000
# CONSTRUCT xf9000000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xf9000000/mask=xffc00000 --status nomem

:str Rt_GPR64, addrUIMM
is size.ldstr=3 & b_2729=7 & v=0 & b_2425=1 & b_23=0 & b_2222=0 & addrUIMM & Rn_GPR64xsp & Rt_GPR64
{
	*addrUIMM = Rt_GPR64;
}

# C6.2.242 STR (immediate) page C6-901 line 52449 MATCH xb8000400/mask=xbfe00c00
# C6.2.242 STR (immediate) page C6-901 line 52449 MATCH xb8000c00/mask=xbfe00c00
# CONSTRUCT xf8000400/mask=xffe00400 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xf8000400/mask=xffe00400 --status nomem

:str Rt_GPR64, addrIndexed
is size.ldstr=3 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=0 & b_2121=0 & b_1010=1 & addrIndexed & Rt_GPR64
{
	*addrIndexed = Rt_GPR64;
}

# C6.2.243 STR (register) page C6-904 line 52623 MATCH xb8200800/mask=xbfe00c00
# CONSTRUCT xb8200800/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xb8200800/mask=xffe00c00 --status nomem

:str Rt_GPR32, addrIndexed
is size.ldstr=2 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=0 & b_2121=1 & b_1011=2 & addrIndexed & Rt_GPR32
{
	*addrIndexed = Rt_GPR32;
}

# C6.2.243 STR (register) page C6-904 line 52623 MATCH xb8200800/mask=xbfe00c00
# CONSTRUCT xf8200800/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xf8200800/mask=xffe00c00 --status nomem

:str Rt_GPR64, addrIndexed
is size.ldstr=3 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=0 & b_2121=1 & b_1011=2 & addrIndexed & Rt_GPR64
{
	*addrIndexed = Rt_GPR64;
}

# C6.2.244 STRB (immediate) page C6-906 line 52734 MATCH x39000000/mask=xffc00000
# CONSTRUCT x39000000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x39000000/mask=xffc00000 --status nomem

:strb Rt_GPR32, addrIndexed
is size.ldstr=0 & b_2729=7 & v=0 & b_2425=1 & b_23=0 & b_2222=0 & addrIndexed & Rt_GPR32
{
	tmp:4 = Rt_GPR32;
	*addrIndexed = tmp:1;
}

# C6.2.244 STRB (immediate) page C6-906 line 52734 MATCH x38000400/mask=xffe00c00
# C6.2.244 STRB (immediate) page C6-906 line 52734 MATCH x38000c00/mask=xffe00c00
# CONSTRUCT x38000400/mask=xffe00400 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x38000400/mask=xffe00400 --status nomem

:strb Rt_GPR32, addrIndexed
is size.ldstr=0 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=0 & b_2121=0 & b_1010=1 & addrIndexed & Rt_GPR32
{
	tmp:4 = Rt_GPR32;
	*addrIndexed = tmp:1;
}

# C6.2.245 STRB (register) page C6-908 line 52871 MATCH x38200800/mask=xffe00c00
# CONSTRUCT x38200800/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x38200800/mask=xffe00c00 --status nomem

:strb Rt_GPR32, addrIndexed
is size.ldstr=0 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=0 & b_2121=1 & b_1011=2 & addrIndexed & Rt_GPR32
{
	tmp:4 = Rt_GPR32;
	*addrIndexed = tmp:1;
}

# C6.2.246 STRH (immediate) page C6-910 line 52965 MATCH x79000000/mask=xffc00000
# CONSTRUCT x79000000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x79000000/mask=xffc00000 --status nomem

:strh Rt_GPR32, addrUIMM
is size.ldstr=1 & b_2729=7 & v=0 & b_2425=1 & b_23=0 & b_2222=0 & addrUIMM & Rn_GPR64xsp & Rt_GPR32
{
	tmp:4 = Rt_GPR32;
	*addrUIMM = tmp:2;
}

# C6.2.246 STRH (immediate) page C6-910 line 52965 MATCH x78000400/mask=xffe00c00
# C6.2.246 STRH (immediate) page C6-910 line 52965 MATCH x78000c00/mask=xffe00c00
# CONSTRUCT x78000400/mask=xffe00400 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x78000400/mask=xffe00400 --status nomem

:strh Rt_GPR32, addrIndexed
is size.ldstr=1 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=0 & b_2121=0 & b_1010=1 & addrIndexed & Rt_GPR32
{
	tmp:4 = Rt_GPR32;
	*addrIndexed = tmp:2;
}

# C6.2.247 STRH (register) page C6-912 line 53102 MATCH x78200800/mask=xffe00c00
# CONSTRUCT x78200800/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x78200800/mask=xffe00c00 --status nomem

:strh Rt_GPR32, addrIndexed
is size.ldstr=1 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=0 & b_2121=1 & b_1011=2 & addrIndexed & Rt_GPR32
{
	tmp:4 = Rt_GPR32;
	*addrIndexed = tmp:2;
}

# C6.2.257 STTR page C6-930 line 54021 MATCH xb8000800/mask=xbfe00c00
# CONSTRUCT xf8000800/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xf8000800/mask=xffe00c00 --status nomem

:st^UnscPriv^"r" Rt_GPR64, addrIndexed
is size.ldstr=3 & b_2729=7 & v=0 & b_2425=0 & b_2223=0 & b_2121=0 & b_1011=2 & UnscPriv & addrIndexed & Rt_GPR64
{
	*addrIndexed = Rt_GPR64;
}

# C6.2.258 STTRB page C6-932 line 54116 MATCH x38000800/mask=xffe00c00
# C6.2.267 STURB page C6-947 line 54904 MATCH x38000000/mask=xffe00c00
# CONSTRUCT x38000000/mask=xffe00000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x38000000/mask=xffe00000 --status nomem

:st^UnscPriv^"rb" Rt_GPR32, addrIndexed
is size.ldstr=0 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=0 & b_2121=0 & UnscPriv & addrIndexed & Rt_GPR32
{
	local tmp:4 = Rt_GPR32;
	*addrIndexed = tmp:1;
}

# C6.2.259 STTRH page C6-933 line 54189 MATCH x78000800/mask=xffe00c00
# C6.2.268 STURH page C6-948 line 54965 MATCH x78000000/mask=xffe00c00
# CONSTRUCT x78000000/mask=xffe00000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x78000000/mask=xffe00000 --status nomem

:st^UnscPriv^"rh" Rt_GPR32, addrIndexed
is size.ldstr=1 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2222=0 & b_2121=0 & UnscPriv & addrIndexed & Rt_GPR32
{
	local tmp:4 = Rt_GPR32;
	*addrIndexed = tmp:2;
}

# C6.2.266 STUR page C6-946 line 54831 MATCH xb8000000/mask=xbfe00c00
# CONSTRUCT xf8000000/mask=xffe00c00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xf8000000/mask=xffe00c00 --status nomem

:st^UnscPriv^"r" Rt_GPR64, addrIndexed
is size.ldstr=3 & b_2729=7 & v=0 & b_2425=0 & b_23=0 & b_2122=0 & b_1011=0 & UnscPriv & addrIndexed & Rt_GPR64
{
	*addrIndexed = Rt_GPR64;
}

# C6.2.269 STXP page C6-949 line 55026 MATCH x88200000/mask=xbfe08000
# CONSTRUCT xc8200000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xc8200000/mask=xffe08000 --status nomem

:stxp Rs_GPR32, Rt_GPR64, Rt2_GPR64, addrReg
is size.ldstr=3 & b_2429=0x8 & b_23=0 & L=0 & b_21=1 & Rs_GPR32 & b_15=0 & Rt2_GPR64 & addrReg & Rt_GPR64 & Rs_GPR64
{
	status:1 = 1;
	rsize:1 = 16;
	check:1 = ExclusiveMonitorPass(addrReg, rsize);
	if (!check) goto <fail>;
	*addrReg = Rt_GPR64;
	*(addrReg + 8) = Rt2_GPR64;
	status = ExclusiveMonitorsStatus();
<fail>
	Rs_GPR64 = zext(status);
}

# C6.2.269 STXP page C6-949 line 55026 MATCH x88200000/mask=xbfe08000
# CONSTRUCT x88200000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x88200000/mask=xffe08000 --status nomem

:stxp Rs_GPR32, Rt_GPR32, Rt2_GPR32, addrReg
is size.ldstr=2 & b_2429=0x8 & b_23=0 & L=0 & b_21=1 & Rs_GPR32 & b_15=0 & Rt2_GPR32 & addrReg & Rt_GPR32 & Rs_GPR64
{
	status:1 = 1;
	rsize:1 = 16;
	check:1 = ExclusiveMonitorPass(addrReg, rsize);
	if (!check) goto <fail>;
	*addrReg = Rt_GPR32;
	*(addrReg + 4) = Rt2_GPR32;
	status = ExclusiveMonitorsStatus();
<fail>
	Rs_GPR64 = zext(status);
}

# C6.2.270 STXR page C6-951 line 55172 MATCH x88000000/mask=xbfe08000
# CONSTRUCT xc8000000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xc8000000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1014=0b11111

:stxr Rs_GPR32, Rt_GPR64, addrReg
is size.ldstr=3 & b_2429=0x8 & b_23=0 & L=0 & b_21=0 & Rs_GPR32 & b_15=0 & addrReg & Rt_GPR64 & Rs_GPR64
{
	status:1 = 1;
	rsize:1 = 16;
	check:1 = ExclusiveMonitorPass(addrReg, rsize);
	if (!check) goto <fail>;
	*addrReg = Rt_GPR64;
	status = ExclusiveMonitorsStatus();
<fail>
	Rs_GPR64 = zext(status);
}

# C6.2.270 STXR page C6-951 line 55172 MATCH x88000000/mask=xbfe08000
# CONSTRUCT x88000000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x88000000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1014=0b11111

:stxr Rs_GPR32, Rt_GPR32, addrReg
is size.ldstr=2 & b_2429=0x8 & b_23=0 & L=0 & b_21=0 & Rs_GPR32 & b_15=0 & addrReg & Rt_GPR32 & Rs_GPR64
{
	status:1 = 1;
	rsize:1 = 16;
	check:1 = ExclusiveMonitorPass(addrReg, rsize);
	if (!check) goto <fail>;
	*addrReg = Rt_GPR32;
	status = ExclusiveMonitorsStatus();
<fail>
	Rs_GPR64 = zext(status);
}

# C6.2.271 STXRB page C6-953 line 55310 MATCH x08000000/mask=xffe08000
# CONSTRUCT x08000000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x08000000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1014=0b11111

:stxrb Rs_GPR32, Rt_GPR32, addrReg
is size.ldstr=0 & b_2429=0x8 & b_23=0 & L=0 & b_21=0 & Rs_GPR32 & b_15=0 & addrReg & Rt_GPR32 & Rs_GPR64
{
	status:1 = 1;
	rsize:1 = 16;
	check:1 = ExclusiveMonitorPass(addrReg, rsize);
	if (!check) goto <fail>;
	local tmp:4 = Rt_GPR32;
	*addrReg = tmp:1;
	status = ExclusiveMonitorsStatus();
<fail>
	Rs_GPR64 = zext(status);
}

# C6.2.272 STXRH page C6-955 line 55430 MATCH x48000000/mask=xffe08000
# CONSTRUCT x48000000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x48000000/mask=xffe08000 --status nomem
# To enforce SHOULD BE ONE fields add: b_1014=0b11111

:stxrh Rs_GPR32, Rt_GPR32, addrReg
is size.ldstr=1 & b_2429=0x8 & b_23=0 & L=0 & b_21=0 & Rs_GPR32 & b_15=0 & addrReg & Rt_GPR32 & Rs_GPR64
{
	status:1 = 1;
	rsize:1 = 16;
	check:1 = ExclusiveMonitorPass(addrReg, rsize);
	if (!check) goto <fail>;
	local tmp:4 = Rt_GPR32;
	*addrReg = tmp:2;
	status = ExclusiveMonitorsStatus();
<fail>
	Rs_GPR64 = zext(status);
}

# C6.2.273 SUB (extended register) page C6-957 line 55552 MATCH x4b200000/mask=x7fe00000
# CONSTRUCT x4b200000/mask=xffe00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x4b200000/mask=xffe00000 --status pass

:sub Rd_GPR32wsp, Rn_GPR32wsp, ExtendRegShift32
is sf=0 & op=1 & S=0 & b_2428=0xb & opt=0 & b_2121=1 & ExtendRegShift32 & Rn_GPR32wsp & Rd_GPR32wsp & Rd_GPR64xsp
{
	tmp_2:4 = ExtendRegShift32;
	tmp_1:4 = Rn_GPR32wsp - tmp_2;
	Rd_GPR64xsp = zext(tmp_1);
}

# C6.2.273 SUB (extended register) page C6-957 line 55552 MATCH x4b200000/mask=x7fe00000
# CONSTRUCT xcb200000/mask=xffe00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xcb200000/mask=xffe00000 --status pass

:sub Rd_GPR64xsp, Rn_GPR64xsp, ExtendRegShift64
is sf=1 & op=1 & S=0 & b_2428=0xb & opt=0 & b_2121=1 & ExtendRegShift64 & Rn_GPR64xsp & Rd_GPR64xsp
{
	tmp_2:8 = ExtendRegShift64;
	tmp_1:8 = Rn_GPR64xsp - tmp_2;
	Rd_GPR64xsp = tmp_1;
}

# C6.2.274 SUB (immediate) page C6-959 line 55677 MATCH x51000000/mask=x7f000000
# C6.2.277 SUBS (immediate) page C6-965 line 56006 MATCH x71000000/mask=x7f000000
# C6.2.56 CMP (immediate) page C6-607 line 35578 MATCH x7100001f/mask=x7f00001f
# CONSTRUCT x51000000/mask=xdf000000 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x51000000/mask=xdf000000 --status pass --comment "flags"

:sub^SBIT_CZNO Rd_GPR32xsp, Rn_GPR32xsp, ImmShift32
is sf=0 & b_30=1 & S & SBIT_CZNO & b_2428=0x11 & ImmShift32 & Rn_GPR32xsp & Rd_GPR32xsp & Rd_GPR64xsp
{
	subflags(Rn_GPR32xsp, ImmShift32);
	tmp:4 = Rn_GPR32xsp - ImmShift32;
	resultflags(tmp);
	build SBIT_CZNO;
	Rd_GPR64xsp = zext(tmp);
}

# C6.2.274 SUB (immediate) page C6-959 line 55677 MATCH x51000000/mask=x7f000000
# C6.2.277 SUBS (immediate) page C6-965 line 56006 MATCH x71000000/mask=x7f000000
# C6.2.56 CMP (immediate) page C6-607 line 35578 MATCH x7100001f/mask=x7f00001f
# CONSTRUCT xd1000000/mask=xdf000000 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xd1000000/mask=xdf000000 --status pass --comment "flags"

:sub^SBIT_CZNO Rd_GPR64xsp, Rn_GPR64xsp, ImmShift64
is sf=1 & b_30=1 & S & SBIT_CZNO & b_2428=0x11 & ImmShift64 & Rn_GPR64xsp & Rd_GPR64xsp
{
	subflags(Rn_GPR64xsp, ImmShift64);
	Rd_GPR64xsp = Rn_GPR64xsp - ImmShift64;
	resultflags(Rd_GPR64xsp);
	build SBIT_CZNO;
}

# C6.2.274 SUB (immediate) page C6-959 line 55677 MATCH x51000000/mask=x7f000000
# CONSTRUCT x51000000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x51000000/mask=xffc00000 --status pass

:sub Rd_GPR32wsp, Rn_GPR32wsp, Imm12_addsubimm_operand_i32_negimm_lsl0
is sf=0 & op=1 & S=0 & b_2428=0x11 & shift=0 & Imm12_addsubimm_operand_i32_negimm_lsl0 & Rn_GPR32wsp & Rd_GPR32wsp & Rd_GPR64xsp
{
	tmp_2:4 = Imm12_addsubimm_operand_i32_negimm_lsl0;
	tmp_1:4 = Rn_GPR32wsp - tmp_2;
	Rd_GPR64xsp = zext(tmp_1);
}

# C6.2.274 SUB (immediate) page C6-959 line 55677 MATCH x51000000/mask=x7f000000
# CONSTRUCT x51400000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x51400000/mask=xffc00000 --status pass

:sub Rd_GPR32wsp, Rn_GPR32wsp, Imm12_addsubimm_operand_i32_negimm_lsl12
is sf=0 & op=1 & S=0 & b_2428=0x11 & shift=1 & Imm12_addsubimm_operand_i32_negimm_lsl12 & Rn_GPR32wsp & Rd_GPR32wsp & Rd_GPR64xsp
{
	tmp_2:4 = Imm12_addsubimm_operand_i32_negimm_lsl12;
	tmp_1:4 = Rn_GPR32wsp - tmp_2;
	Rd_GPR64xsp = zext(tmp_1);
}

# C6.2.274 SUB (immediate) page C6-959 line 55677 MATCH x51000000/mask=x7f000000
# CONSTRUCT xd1000000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd1000000/mask=xffc00000 --status pass

:sub Rd_GPR64xsp, Rn_GPR64xsp, Imm12_addsubimm_operand_i64_negimm_lsl0
is sf=1 & op=1 & S=0 & b_2428=0x11 & shift=0 & Imm12_addsubimm_operand_i64_negimm_lsl0 & Rn_GPR64xsp & Rd_GPR64xsp
{
	tmp_2:8 = Imm12_addsubimm_operand_i64_negimm_lsl0;
	tmp_1:8 = Rn_GPR64xsp - tmp_2;
	Rd_GPR64xsp = tmp_1;
}

# C6.2.274 SUB (immediate) page C6-959 line 55677 MATCH x51000000/mask=x7f000000
# CONSTRUCT xd1400000/mask=xffc00000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd1400000/mask=xffc00000 --status pass

:sub Rd_GPR64xsp, Rn_GPR64xsp, Imm12_addsubimm_operand_i64_negimm_lsl12
is sf=1 & op=1 & S=0 & b_2428=0x11 & shift=1 & Imm12_addsubimm_operand_i64_negimm_lsl12 & Rn_GPR64xsp & Rd_GPR64xsp
{
	tmp_2:8 = Imm12_addsubimm_operand_i64_negimm_lsl12;
	tmp_1:8 = Rn_GPR64xsp - tmp_2;
	Rd_GPR64xsp = tmp_1;
}

# C6.2.275 SUB (shifted register) page C6-961 line 55767 MATCH x4b000000/mask=x7f200000
# C6.2.179 NEG (shifted register) page C6-811 line 47362 MATCH x4b0003e0/mask=x7f2003e0
# CONSTRUCT x4b000000/mask=xff200000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x4b000000/mask=xff200000 --status pass

:sub Rd_GPR32, Rn_GPR32, RegShift32
is sf=0 & op=1 & s=0 & b_2428=0xb & b_2121=0 & RegShift32 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp_2:4 = RegShift32;
	tmp_1:4 = Rn_GPR32 - tmp_2;
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.275 SUB (shifted register) page C6-961 line 55767 MATCH x4b000000/mask=x7f200000
# C6.2.179 NEG (shifted register) page C6-811 line 47362 MATCH x4b0003e0/mask=x7f2003e0
# CONSTRUCT xcb000000/mask=xff200000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xcb000000/mask=xff200000 --status pass

:sub Rd_GPR64, Rn_GPR64, RegShift64
is sf=1 & op=1 & s=0 & b_2428=0xb & b_2121=0 & RegShift64 & Rn_GPR64 & Rd_GPR64
{
	tmp_2:8 = RegShift64;
	tmp_1:8 = Rn_GPR64 - tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.276 SUBS (extended register) page C6-963 line 55872 MATCH x6b200000/mask=x7fe00000
# C6.2.55 CMP (extended register) page C6-605 line 35463 MATCH x6b20001f/mask=x7fe0001f
# CONSTRUCT x6b200000/mask=xffe00000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x6b200000/mask=xffe00000 --status pass --comment "flags"

:subs Rd_GPR32, Rn_GPR32wsp, ExtendRegShift32
is sf=0 & op=1 & S=1 & b_2428=0xb & opt=0 & b_2121=1 & ExtendRegShift32 & Rn_GPR32wsp & Rd_GPR32 & Rd_GPR64
{
	tmp_2:4 = ExtendRegShift32;
	subflags(Rn_GPR32wsp, tmp_2);
	tmp_1:4 = Rn_GPR32wsp - tmp_2;
	resultflags(tmp_1);
	Rd_GPR64 = zext(tmp_1);
	affectflags();
}

# C6.2.276 SUBS (extended register) page C6-963 line 55872 MATCH x6b200000/mask=x7fe00000
# C6.2.278 SUBS (shifted register) page C6-967 line 56104 MATCH x6b000000/mask=x7f200000
# C6.2.55 CMP (extended register) page C6-605 line 35463 MATCH x6b20001f/mask=x7fe0001f
# C6.2.57 CMP (shifted register) page C6-608 line 35648 MATCH x6b00001f/mask=x7f20001f
# C6.2.180 NEGS page C6-813 line 47447 MATCH x6b0003e0/mask=x7f2003e0
# CONSTRUCT xeb000000/mask=xffc00000 MATCHED 5 DOCUMENTED OPCODES
# AUNIT --inst xeb000000/mask=xffc00000 --status pass --comment "flags"

:subs Rd_GPR64, Rn_GPR64xsp, ExtendRegShift64
is sf=1 & op=1 & S=1 & b_2428=0xb & opt=0 & ExtendRegShift64 & Rn_GPR64xsp & Rd_GPR64
{
	tmp_2:8 = ExtendRegShift64;
	subflags(Rn_GPR64xsp, tmp_2);
	tmp_1:8 = Rn_GPR64xsp - tmp_2;
	resultflags(tmp_1);
	Rd_GPR64 = tmp_1;
	affectflags();
}

# C6.2.277 SUBS (immediate) page C6-965 line 56006 MATCH x71000000/mask=x7f000000
# C6.2.56 CMP (immediate) page C6-607 line 35578 MATCH x7100001f/mask=x7f00001f
# CONSTRUCT x71000000/mask=xffc00000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x71000000/mask=xffc00000 --status pass --comment "flags"

:subs Rd_GPR32, Rn_GPR32wsp, Imm12_addsubimm_operand_i32_negimm_lsl0
is sf=0 & op=1 & S=1 & b_2428=0x11 & shift=0 & Imm12_addsubimm_operand_i32_negimm_lsl0 & Rn_GPR32wsp & Rd_GPR32 & Rd_GPR64
{
	tmp_2:4 = Imm12_addsubimm_operand_i32_negimm_lsl0;
	subflags(Rn_GPR32wsp, tmp_2);
	tmp_1:4 = Rn_GPR32wsp - tmp_2;
	resultflags(tmp_1);
	Rd_GPR64 = zext(tmp_1);
	affectflags();
}

# C6.2.277 SUBS (immediate) page C6-965 line 56006 MATCH x71000000/mask=x7f000000
# C6.2.56 CMP (immediate) page C6-607 line 35578 MATCH x7100001f/mask=x7f00001f
# CONSTRUCT x71400000/mask=xffc00000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x71400000/mask=xffc00000 --status pass --comment "flags"

:subs Rd_GPR32, Rn_GPR32wsp, Imm12_addsubimm_operand_i32_negimm_lsl12
is sf=0 & op=1 & S=1 & b_2428=0x11 & shift=1 & Imm12_addsubimm_operand_i32_negimm_lsl12 & Rn_GPR32wsp & Rd_GPR32 & Rd_GPR64
{
	tmp_2:4 = Imm12_addsubimm_operand_i32_negimm_lsl12;
	subflags(Rn_GPR32wsp, tmp_2);
	tmp_1:4 = Rn_GPR32wsp - tmp_2;
	resultflags(tmp_1);
	Rd_GPR64 = zext(tmp_1);
	affectflags();
}

# C6.2.277 SUBS (immediate) page C6-965 line 56006 MATCH x71000000/mask=x7f000000
# C6.2.56 CMP (immediate) page C6-607 line 35578 MATCH x7100001f/mask=x7f00001f
# CONSTRUCT xf1000000/mask=xffc00000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xf1000000/mask=xffc00000 --status pass --comment "flags"

:subs Rd_GPR64, Rn_GPR64xsp, Imm12_addsubimm_operand_i64_negimm_lsl0
is sf=1 & op=1 & S=1 & b_2428=0x11 & shift=0 & Imm12_addsubimm_operand_i64_negimm_lsl0 & Rn_GPR64xsp & Rd_GPR64
{
	tmp_2:8 = Imm12_addsubimm_operand_i64_negimm_lsl0;
	subflags(Rn_GPR64xsp, tmp_2);
	tmp_1:8 = Rn_GPR64xsp - tmp_2;
	resultflags(tmp_1);
	Rd_GPR64 = tmp_1;
	affectflags();
}

# C6.2.277 SUBS (immediate) page C6-965 line 56006 MATCH x71000000/mask=x7f000000
# C6.2.56 CMP (immediate) page C6-607 line 35578 MATCH x7100001f/mask=x7f00001f
# CONSTRUCT xf1400000/mask=xffc00000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xf1400000/mask=xffc00000 --status pass --comment "flags"

:subs Rd_GPR64, Rn_GPR64xsp, Imm12_addsubimm_operand_i64_negimm_lsl12
is sf=1 & op=1 & S=1 & b_2428=0x11 & shift=1 & Imm12_addsubimm_operand_i64_negimm_lsl12 & Rn_GPR64xsp & Rd_GPR64
{
	tmp_2:8 = Imm12_addsubimm_operand_i64_negimm_lsl12;
	subflags(Rn_GPR64xsp, tmp_2);
	tmp_1:8 = Rn_GPR64xsp - tmp_2;
	resultflags(tmp_1);
	Rd_GPR64 = tmp_1;
	affectflags();
}

# C6.2.278 SUBS (shifted register) page C6-967 line 56104 MATCH x6b000000/mask=x7f200000
# C6.2.57 CMP (shifted register) page C6-608 line 35648 MATCH x6b00001f/mask=x7f20001f
# C6.2.180 NEGS page C6-813 line 47447 MATCH x6b0003e0/mask=x7f2003e0
# CONSTRUCT x6b000000/mask=xff200000 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst x6b000000/mask=xff200000 --status pass

:subs Rd_GPR32, Rn_GPR32, RegShift32
is sf=0 & op=1 & s=1 & b_2428=0xb & b_2121=0 & Rm_GPR32 & RegShift32 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp_2:4 = RegShift32;
	subflags(Rn_GPR32, tmp_2);
	tmp_1:4 = Rn_GPR32 - tmp_2;
	resultflags(tmp_1);
	Rd_GPR64 = zext(tmp_1);
	affectflags();
}

# C6.2.278 SUBS (shifted register) page C6-967 line 56104 MATCH x6b000000/mask=x7f200000
# C6.2.57 CMP (shifted register) page C6-608 line 35648 MATCH x6b00001f/mask=x7f20001f
# C6.2.180 NEGS page C6-813 line 47447 MATCH x6b0003e0/mask=x7f2003e0
# CONSTRUCT xeb000000/mask=xff200000 MATCHED 3 DOCUMENTED OPCODES
# AUNIT --inst xeb000000/mask=xff200000 --status pass

:subs Rd_GPR64, Rn_GPR64, RegShift64
is sf=1 & op=1 & s=1 & b_2428=0xb & b_2121=0 & Rm_GPR64 & RegShift64 & Rn_GPR64 & Rd_GPR64 & Rd
{
	tmp_2:8 = RegShift64;
	subflags(Rn_GPR64, tmp_2);
	tmp_1:8 = Rn_GPR64 - tmp_2;
	resultflags(tmp_1);
	Rd_GPR64 = tmp_1;
	affectflags();
}

# C6.2.279 SVC page C6-969 line 56214 MATCH xd4000001/mask=xffe0001f
# CONSTRUCT xd4000001/mask=xffe0001f MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd4000001/mask=xffe0001f --status nodest

:svc imm16
is b_2431=0xd4 & excCode=0 & imm16 & excCode2=0 & ll=1
{
	CallSupervisor(imm16:2);
}

# C6.2.280 SWPB, SWPAB, SWPALB, SWPLB page C6-970 line 56255 MATCH x38208000/mask=xff20fc00
# CONSTRUCT x38208000/mask=xff20fc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x38208000/mask=xff20fc00 --status nomem

# size=0b00 (3031)

:swp^ls_lor^"b" aa_Ws, aa_Wt, [Rn_GPR64xsp]
is b_3031=0b00 & b_2429=0b111000 & b_21=1 & b_1215=0b1000 & b_1011=0b00 & ls_loa & ls_lor & aa_Wt & ls_data1 & ls_mem1 & aa_Ws & Rn_GPR64xsp
{ build ls_loa; build ls_data1; ls_opc_swp(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem1; aa_Wt = tmp_ldWn; build ls_lor; }

# C6.2.281 SWPH, SWPAH, SWPALH, SWPLH page C6-972 line 56359 MATCH x78208000/mask=xff20fc00
# CONSTRUCT x78208000/mask=xff20fc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x78208000/mask=xff20fc00 --status nomem

# size=0b01 (3031)

:swp^ls_lor^"h" aa_Ws, aa_Wt, [Rn_GPR64xsp]
is b_3031=0b01 & b_2429=0b111000 & b_21=1 & b_1215=0b1000 & b_1011=0b00 & ls_loa & ls_lor & aa_Wt & ls_data2 & ls_mem2 & aa_Ws & Rn_GPR64xsp
{ build ls_loa; build ls_data2; ls_opc_swp(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem2; aa_Wt = tmp_ldWn; build ls_lor; }

# C6.2.282 SWP, SWPA, SWPAL, SWPL page C6-974 line 56465 MATCH xb8208000/mask=xbf20fc00
# CONSTRUCT xb8208000/mask=xff20fc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xb8208000/mask=xff20fc00 --status nomem

# size=0b10 (3031)

:swp^ls_lor aa_Ws, aa_Wt, [Rn_GPR64xsp]
is b_3031=0b10 & b_2429=0b111000 & b_21=1 & b_1215=0b1000 & b_1011=0b00 & ls_loa & ls_lor & aa_Wt & ls_data4 & ls_mem4 & aa_Ws & Rn_GPR64xsp
{ build ls_loa; build ls_data4; ls_opc_swp(tmp_ldWn, aa_Ws, tmp_stWn); build ls_mem4; aa_Wt = tmp_ldWn; build ls_lor; }

# C6.2.282 SWP, SWPA, SWPAL, SWPL page C6-974 line 56465 MATCH xb8208000/mask=xbf20fc00
# CONSTRUCT xf8208000/mask=xff20fc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xf8208000/mask=xff20fc00 --status nomem

# size=0b11 (3031)

:swp^ls_lor aa_Xs, aa_Xt, [Rn_GPR64xsp]
is b_3031=0b11 & b_2429=0b111000 & b_21=1 & b_1215=0b1000 & b_1011=0b00 & ls_loa & ls_lor & aa_Xt & ls_data8 & ls_mem8 & aa_Xs & Rn_GPR64xsp
{ build ls_loa; build ls_data8; ls_opc_swp(tmp_ldXn, aa_Xs, tmp_stXn); build ls_mem8; aa_Xt = tmp_ldXn; build ls_lor; }

# C6.2.283 SXTB page C6-976 line 56601 MATCH x13001c00/mask=x7fbffc00
# C6.2.209 SBFIZ page C6-856 line 49751 MATCH x13000000/mask=x7f800000
# C6.2.210 SBFM page C6-857 line 49823 MATCH x13000000/mask=x7f800000
# C6.2.211 SBFX page C6-859 line 49939 MATCH x13000000/mask=x7f800000
# CONSTRUCT x93401c00/mask=xfffffc06 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst x93401c00/mask=xfffffc06 --status pass

# Special case of sbfm where imms='000111' and immr='000000'

:sxtb Rd_GPR64, Rn_GPR32
is ImmR=0x0 & ImmS=0x7 & ImmS_EQ_ImmR=0 & ImmS_LT_ImmR=0 & sf=1 & opc=0 & b_2428=0x13 & b_2323=0 & n=1 & Rn_GPR32 & Rd_GPR64
{
	tmp:4 = Rn_GPR32;
	tmp_byte:1 = tmp:1;
	result:8 = sext(tmp_byte);
	Rd_GPR64 = result;
}

# C6.2.283 SXTB page C6-976 line 56601 MATCH x13001c00/mask=x7fbffc00
# C6.2.209 SBFIZ page C6-856 line 49751 MATCH x13000000/mask=x7f800000
# C6.2.210 SBFM page C6-857 line 49823 MATCH x13000000/mask=x7f800000
# C6.2.211 SBFX page C6-859 line 49939 MATCH x13000000/mask=x7f800000
# CONSTRUCT x13001c00/mask=xfffffc06 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst x13001c00/mask=xfffffc06 --status pass

# Special case of sbfm when ImmS=7 and ImmR=0. Note that this implies ImmS > ImmR-1
# Otherwise, this might appear to conflict with sbfiz

:sxtb Rd_GPR32, Rn_GPR32
is ImmR=0x0 & ImmS=0x7 & ImmS_EQ_ImmR=0 & ImmS_LT_ImmR=0 & sf=0 & opc=0 & b_2428=0x13 & b_2323=0 & n=0 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp:4 = Rn_GPR32;
	tmp_byte:1 = tmp:1;
	result:4 = sext(tmp_byte);
	Rd_GPR64 = zext(result);
}

# C6.2.284 SXTH page C6-977 line 56667 MATCH x13003c00/mask=x7fbffc00
# C6.2.209 SBFIZ page C6-856 line 49751 MATCH x13000000/mask=x7f800000
# C6.2.210 SBFM page C6-857 line 49823 MATCH x13000000/mask=x7f800000
# C6.2.211 SBFX page C6-859 line 49939 MATCH x13000000/mask=x7f800000
# CONSTRUCT x93403c00/mask=xfffffc06 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst x93403c00/mask=xfffffc06 --status pass

# Special case of sbfm where imms='001111' and immr='000000'

:sxth Rd_GPR64, Rn_GPR32
is ImmR=0x0 & ImmS=0xf & ImmS_EQ_ImmR=0 & ImmS_LT_ImmR=0 & sf=1 & opc=0 & b_2428=0x13 & b_2323=0 & n=1 & Rn_GPR32 & Rd_GPR64
{
	tmp:4 = Rn_GPR32;
	tmp_1:2 = tmp:2;
	tmp_2:8 = sext(tmp_1);
	Rd_GPR64 = tmp_2;
}

# C6.2.284 SXTH page C6-977 line 56667 MATCH x13003c00/mask=x7fbffc00
# C6.2.209 SBFIZ page C6-856 line 49751 MATCH x13000000/mask=x7f800000
# C6.2.210 SBFM page C6-857 line 49823 MATCH x13000000/mask=x7f800000
# C6.2.211 SBFX page C6-859 line 49939 MATCH x13000000/mask=x7f800000
# CONSTRUCT x13003c00/mask=xfffffc06 MATCHED 4 DOCUMENTED OPCODES
# AUNIT --inst x13003c00/mask=xfffffc06 --status pass

# Special case of sbfm where imms='001111' and immr='000000'

:sxth Rd_GPR32, Rn_GPR32
is ImmR=0x0 & ImmS=0xf & ImmS_EQ_ImmR=0 & ImmS_LT_ImmR=0 & sf=0 & opc=0 & b_2428=0x13 & b_2323=0 & n=0 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp:4 = Rn_GPR32;
	tmp_1:2 = tmp:2;
	tmp_2:4 = sext(tmp_1);
	Rd_GPR64 = zext(tmp_2);
}

# C6.2.285 SXTW page C6-978 line 56733 MATCH x93407c00/mask=xfffffc00
# C6.2.16 ASR (immediate) page C6-551 line 32350 MATCH x13007c00/mask=x7f807c00
# C6.2.209 SBFIZ page C6-856 line 49751 MATCH x13000000/mask=x7f800000
# C6.2.210 SBFM page C6-857 line 49823 MATCH x13000000/mask=x7f800000
# C6.2.211 SBFX page C6-859 line 49939 MATCH x13000000/mask=x7f800000
# CONSTRUCT x93407c00/mask=xfffffc06 MATCHED 5 DOCUMENTED OPCODES
# AUNIT --inst x93407c00/mask=xfffffc06 --status pass

# Special case of sbfm where imms='011111' and immr='000000'

:sxtw Rd_GPR64, Rn_GPR32
is ImmR=0x0 & ImmS=0x1f & ImmS_EQ_ImmR=0 & ImmS_LT_ImmR=0 & sf=1 & opc=0 & b_2428=0x13 & b_2323=0 & n=1 & Rn_GPR32 & Rd_GPR64
{
	tmp:4 = Rn_GPR32;
	Rd_GPR64 = sext(tmp);
}

# C6.2.286 SYS page C6-979 line 56782 KEEPWITH

SysArgs: Op1_uimm3, CRn_CRx, CRm_CRx, Op2_uimm3, Rt_GPR64 is Op1_uimm3 & CRn_CRx & CRm_CRx & Op2_uimm3 & aa_Xt & Rt_GPR64 { export Rt_GPR64; }
SysArgs: Op1_uimm3, CRn_CRx, CRm_CRx, Op2_uimm3 is Op1_uimm3 & CRn_CRx & CRm_CRx & Op2_uimm3 & aa_Xt=31 & Rt_GPR64 { export 0:8; }

# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# C6.2.18 AT page C6-553 line 32488 MATCH xd5087800/mask=xfff8fe00
# C6.2.67 DC page C6-624 line 36468 MATCH xd5087000/mask=xfff8f000
# C6.2.84 IC page C6-646 line 37623 MATCH xd5087000/mask=xfff8f000
# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# CONSTRUCT xd5080000/mask=xfff80000 MATCHED 5 DOCUMENTED OPCODES
# AUNIT --inst xd5080000/mask=xfff80000 --status nodest

:sys SysArgs
is b_1931=0b1101010100001 & Op1_uimm3 & CRn_CRx & CRm_CRx & Op2_uimm3 & SysArgs
{
	tmp1:4 = Op1_uimm3;
	tmp2:4 = CRn_CRx;
	tmp3:4 = CRm_CRx;
	tmp4:4 = Op2_uimm3;
	SysOp_W(tmp1, tmp2, tmp3, tmp4, SysArgs);
}

# C6.2.287 SYSL page C6-980 line 56853 MATCH xd5280000/mask=xfff80000
# CONSTRUCT xd5280000/mask=xfff80000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd5280000/mask=xfff80000 --status nodest

:sysl Rt_GPR64, Op1_uimm3, CRn_CRx, CRm_CRx, Op2_uimm3
is b_2431=0xd5 & b_2223=0 & l=1 & Op0=1 & Op1_uimm3 & CRn_CRx & CRm_CRx & Op2_uimm3 & aa_Xt & Rt_GPR64
{
	tmp1:4 = Op1_uimm3;
	tmp2:4 = CRn_CRx;
	tmp3:4 = CRm_CRx;
	tmp4:4 = Op2_uimm3;
	Rt_GPR64 = SysOp_R(tmp1, tmp2, tmp3, tmp4);
}

# C6.2.287 SYSL page C6-980 line 56853 MATCH xd5280000/mask=xfff80000
# CONSTRUCT xd528001f/mask=xfff8001f MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xd528001f/mask=xfff8001f --status nodest

:sysl Op1_uimm3, CRn_CRx, CRm_CRx, Op2_uimm3
is b_2431=0xd5 & b_2223=0 & l=1 & Op0=1 & Op1_uimm3 & CRn_CRx & CRm_CRx & Op2_uimm3 & aa_Xt=31 & Rt_GPR64
{
	tmp1:4 = Op1_uimm3;
	tmp2:4 = CRn_CRx;
	tmp3:4 = CRm_CRx;
	tmp4:4 = Op2_uimm3;
	SysOp_R(tmp1, tmp2, tmp3, tmp4);
}

# C6.2.288 TBNZ page C6-981 line 56906 MATCH x37000000/mask=x7f000000
# C6.2.289 TBZ page C6-982 line 56964 MATCH x36000000/mask=x7f000000
# CONSTRUCT xb6000000/mask=xfe000000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xb6000000/mask=xfe000000 --status nodest

:tb^ZeroOp Rd_GPR64, BitPos, Addr14
is sf=1 & b_2530=0x1b & BitPos & ZeroOp & Addr14 & Rd_GPR64
{
	tmp:1 = BitPos;
	if (tmp == ZeroOp) goto Addr14;
}

# C6.2.288 TBNZ page C6-981 line 56906 MATCH x37000000/mask=x7f000000
# C6.2.289 TBZ page C6-982 line 56964 MATCH x36000000/mask=x7f000000
# CONSTRUCT x36000000/mask=xfe000000 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x36000000/mask=xfe000000 --status nodest

:tb^ZeroOp Rd_GPR32, BitPos, Addr14
is sf=0 & b_2530=0x1b & BitPos & ZeroOp & Addr14 & Rd_GPR32
{
	tmp:1 = BitPos;
	if (tmp == ZeroOp) goto Addr14;
}

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c8020/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50c8020/mask=xffffffe0 --status nodest

:tlbi "IPAS2E1IS", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b1000 & b_0811=0b0000 & b_0507=0b001 & Rt_GPR64
{ TLBI_IPAS2E1IS(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c80a0/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50c80a0/mask=xffffffe0 --status nodest

:tlbi "IPAS2LE1IS", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b1000 & b_0811=0b0000 & b_0507=0b101 & Rt_GPR64
{ TLBI_IPAS2LE1IS(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5088300/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd5088300/mask=xffffffe0 --status nodest

:tlbi "VMALLE1IS"
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b1000 & b_0811=0b0011 & b_0507=0b000
{ TLBI_VMALLE1IS(); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c8300/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50c8300/mask=xffffffe0 --status nodest

:tlbi "ALLE2IS"
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b1000 & b_0811=0b0011 & b_0507=0b000
{ TLBI_ALLE2IS(); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50e8300/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50e8300/mask=xffffffe0 --status nodest

:tlbi "ALLE3IS"
is b_1931=0b1101010100001 & b_1618=0b110 & b_1215=0b1000 & b_0811=0b0011 & b_0507=0b000
{ TLBI_ALLE3IS(); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5088320/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd5088320/mask=xffffffe0 --status nodest

:tlbi "VAE1IS", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b1000 & b_0811=0b0011 & b_0507=0b001 & Rt_GPR64
{ TLBI_VAE1IS(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c8320/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50c8320/mask=xffffffe0 --status nodest

:tlbi "VAE2IS", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b1000 & b_0811=0b0011 & b_0507=0b001 & Rt_GPR64
{ TLBI_VAE2IS(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50e8320/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50e8320/mask=xffffffe0 --status nodest

:tlbi "VAE3IS", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b110 & b_1215=0b1000 & b_0811=0b0011 & b_0507=0b001 & Rt_GPR64
{ TLBI_VAE3IS(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5088340/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd5088340/mask=xffffffe0 --status nodest

:tlbi "ASIDE1IS", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b1000 & b_0811=0b0011 & b_0507=0b010 & Rt_GPR64
{ TLBI_ASIDE1IS(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5088360/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd5088360/mask=xffffffe0 --status nodest

:tlbi "VAAE1IS", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b1000 & b_0811=0b0011 & b_0507=0b011 & Rt_GPR64
{ TLBI_VAAE1IS(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c8380/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50c8380/mask=xffffffe0 --status nodest

:tlbi "ALLE1IS"
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b1000 & b_0811=0b0011 & b_0507=0b100
{ TLBI_ALLE1IS(); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50883a0/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50883a0/mask=xffffffe0 --status nodest

:tlbi "VALE1IS", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b1000 & b_0811=0b0011 & b_0507=0b101 & Rt_GPR64
{ TLBI_VALE1IS(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c83a0/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50c83a0/mask=xffffffe0 --status nodest

:tlbi "VALE2IS", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b1000 & b_0811=0b0011 & b_0507=0b101 & Rt_GPR64
{ TLBI_VALE2IS(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50e83a0/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50e83a0/mask=xffffffe0 --status nodest

:tlbi "VALE3IS", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b110 & b_1215=0b1000 & b_0811=0b0011 & b_0507=0b101 & Rt_GPR64
{ TLBI_VALE3IS(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c83c0/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50c83c0/mask=xffffffe0 --status nodest

:tlbi "VMALLS12E1IS"
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b1000 & b_0811=0b0011 & b_0507=0b110
{ TLBI_VMALLS12E1IS(); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50883e0/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50883e0/mask=xffffffe0 --status nodest

:tlbi "VAALE1IS", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b1000 & b_0811=0b0011 & b_0507=0b111 & Rt_GPR64
{ TLBI_VAALE1IS(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c8420/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50c8420/mask=xffffffe0 --status nodest

:tlbi "IPAS2E1", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b1000 & b_0811=0b0100 & b_0507=0b001 & Rt_GPR64
{ TLBI_IPAS2E1(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c84a0/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50c84a0/mask=xffffffe0 --status nodest

:tlbi "IPAS2LE1", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b1000 & b_0811=0b0100 & b_0507=0b101 & Rt_GPR64
{ TLBI_IPAS2LE1(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5088700/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd5088700/mask=xffffffe0 --status nodest

:tlbi "VMALLE1"
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b1000 & b_0811=0b0111 & b_0507=0b000
{ TLBI_VMALLE1(); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c8700/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50c8700/mask=xffffffe0 --status nodest

:tlbi "ALLE2"
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b1000 & b_0811=0b0111 & b_0507=0b000
{ TLBI_ALLE2(); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50e8700/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50e8700/mask=xffffffe0 --status nodest

:tlbi "ALLE3"
is b_1931=0b1101010100001 & b_1618=0b110 & b_1215=0b1000 & b_0811=0b0111 & b_0507=0b000
{ TLBI_ALLE3(); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5088720/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd5088720/mask=xffffffe0 --status nodest

:tlbi "VAE1", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b1000 & b_0811=0b0111 & b_0507=0b001 & Rt_GPR64
{ TLBI_VAE1(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c8720/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50c8720/mask=xffffffe0 --status nodest

:tlbi "VAE2", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b1000 & b_0811=0b0111 & b_0507=0b001 & Rt_GPR64
{ TLBI_VAE2(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50e8720/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50e8720/mask=xffffffe0 --status nodest

:tlbi "VAE3", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b110 & b_1215=0b1000 & b_0811=0b0111 & b_0507=0b001 & Rt_GPR64
{ TLBI_VAE3(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5088740/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd5088740/mask=xffffffe0 --status nodest

:tlbi "ASIDE1", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b1000 & b_0811=0b0111 & b_0507=0b010 & Rt_GPR64
{ TLBI_ASIDE1(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd5088760/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd5088760/mask=xffffffe0 --status nodest

:tlbi "VAAE1", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b1000 & b_0811=0b0111 & b_0507=0b011 & Rt_GPR64
{ TLBI_VAAE1(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c8780/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50c8780/mask=xffffffe0 --status nodest

:tlbi "ALLE1"
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b1000 & b_0811=0b0111 & b_0507=0b100
{ TLBI_ALLE1(); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50887a0/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50887a0/mask=xffffffe0 --status nodest

:tlbi "VALE1", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b1000 & b_0811=0b0111 & b_0507=0b101 & Rt_GPR64
{ TLBI_VALE1(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c87a0/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50c87a0/mask=xffffffe0 --status nodest

:tlbi "VALE2", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b1000 & b_0811=0b0111 & b_0507=0b101 & Rt_GPR64
{ TLBI_VALE2(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50e87a0/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50e87a0/mask=xffffffe0 --status nodest

:tlbi "VALE3", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b110 & b_1215=0b1000 & b_0811=0b0111 & b_0507=0b101 & Rt_GPR64
{ TLBI_VALE3(Rt_GPR64); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50c87c0/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50c87c0/mask=xffffffe0 --status nodest

:tlbi "VMALLS12E1"
is b_1931=0b1101010100001 & b_1618=0b100 & b_1215=0b1000 & b_0811=0b0111 & b_0507=0b110
{ TLBI_VMALLS12E1(); }

# C6.2.290 TLBI page C6-983 line 57022 MATCH xd5088000/mask=xfff8f000
# C6.2.286 SYS page C6-979 line 56782 MATCH xd5080000/mask=xfff80000
# CONSTRUCT xd50887e0/mask=xffffffe0 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50887e0/mask=xffffffe0 --status nodest

:tlbi "VAALE1", Rt_GPR64
is b_1931=0b1101010100001 & b_1618=0b000 & b_1215=0b1000 & b_0811=0b0111 & b_0507=0b111 & Rt_GPR64
{ TLBI_VAALE1(Rt_GPR64); }

# C6.2.291 TST (immediate) page C6-985 line 57120 MATCH x7200001f/mask=x7f80001f
# C6.2.13 ANDS (immediate) page C6-546 line 32087 MATCH x72000000/mask=x7f800000
# CONSTRUCT x7200001f/mask=xff80001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x7200001f/mask=xff80001f --status pass --comment "flags"

:tst Rn_GPR32, DecodeWMask32
is sf=0 & opc=3 & b_2428=0x12 & b_2323=0 & DecodeWMask32 & Rn_GPR32 & Rd=0x1f
{
	tmp_2:4 = DecodeWMask32;
	tmp_1:4 = Rn_GPR32 & tmp_2;
	resultflags(tmp_1);
	affectLflags();
}

# C6.2.291 TST (immediate) page C6-985 line 57120 MATCH x7200001f/mask=x7f80001f
# C6.2.13 ANDS (immediate) page C6-546 line 32087 MATCH x72000000/mask=x7f800000
# CONSTRUCT xf200001f/mask=xff80001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xf200001f/mask=xff80001f --status pass --comment "flags"

:tst Rn_GPR64, DecodeWMask64
is sf=1 & opc=3 & b_2428=0x12 & b_2323=0 & DecodeWMask64 & Rn_GPR64 & Rd=0x1f
{
	tmp_2:8 = DecodeWMask64;
	tmp_1:8 = Rn_GPR64 & tmp_2;
	resultflags(tmp_1);
	affectLflags();
}

# C6.2.292 TST (shifted register) page C6-986 line 57184 MATCH x6a00001f/mask=x7f20001f
# C6.2.14 ANDS (shifted register) page C6-548 line 32175 MATCH x6a000000/mask=x7f200000
# CONSTRUCT x6a00001f/mask=xff20001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x6a00001f/mask=xff20001f --status pass --comment "flags"

:tst Rn_GPR32, RegShift32Log
is sf=0 & opc=3 & b_2428=0xa & N=0 & RegShift32Log & Rn_GPR32 & Rd=0x1f
{
	tmp_2:4 = RegShift32Log;
	tmp_1:4 = Rn_GPR32 & tmp_2;
	resultflags(tmp_1);
	affectLflags();
}

# C6.2.292 TST (shifted register) page C6-986 line 57184 MATCH x6a00001f/mask=x7f20001f
# C6.2.14 ANDS (shifted register) page C6-548 line 32175 MATCH x6a000000/mask=x7f200000
# CONSTRUCT xea00001f/mask=xff20001f MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xea00001f/mask=xff20001f --status pass --comment "flags"

:tst Rn_GPR64, RegShift64Log
is sf=1 & opc=3 & b_2428=0xa & N=0 & RegShift64Log & Rn_GPR64 & Rd=0x1f
{
	tmp_2:8 = RegShift64Log;
	tmp_1:8 = Rn_GPR64 & tmp_2;
	resultflags(tmp_1);
	affectLflags();
}

# C6.2.293 UBFIZ page C6-988 line 57269 MATCH x53000000/mask=x7f800000
# C6.2.158 LSL (immediate) page C6-784 line 45779 MATCH x53000000/mask=x7f800000
# C6.2.161 LSR (immediate) page C6-787 line 45990 MATCH x53007c00/mask=x7f807c00
# C6.2.294 UBFM page C6-989 line 57341 MATCH x53000000/mask=x7f800000
# C6.2.295 UBFX page C6-991 line 57453 MATCH x53000000/mask=x7f800000
# C6.2.302 UXTB page C6-998 line 57884 MATCH x53001c00/mask=xfffffc00
# C6.2.303 UXTH page C6-999 line 57932 MATCH x53003c00/mask=xfffffc00
# CONSTRUCT x53000008/mask=xffe0800c MATCHED 7 DOCUMENTED OPCODES
# AUNIT --inst x53000008/mask=xffe0800c --status pass
# Special case of ubfm where UInt(imms) < UInt(immr).
# Note because LSL is preferred where imms + 1 == immr, we use ImmS_LT_ImmR_minus_1
# if sf == '0' && (N != '0' || immr<5> != '0' || imms<5> != '0') then ReservedValue();

:ubfiz Rd_GPR32, Rn_GPR32, ubfiz_lsb, ubfiz_width
is ImmS_LT_ImmR_minus_1=1 & ImmS_EQ_ImmR=0 & sf=0 & opc=2 & b_2428=0x13 & b_2323=0 & n=0 & b_21=0 & b_15=0 & ImmRConst32 & ubfiz_lsb & ubfiz_width & Rn_GPR32 & Rd_GPR32 & Rd_GPR64 & DecodeWMask32 & DecodeTMask32
{
	local wmask:4 = DecodeWMask32;
	local tmask:4 = DecodeTMask32;
	local src:4 = Rn_GPR32;
	local bot:4 = ((src>>ImmRConst32)|(src<<(32-ImmRConst32))) & wmask;
	Rd_GPR64 = zext(bot & tmask);
}

# C6.2.293 UBFIZ page C6-988 line 57269 MATCH x53000000/mask=x7f800000
# C6.2.158 LSL (immediate) page C6-784 line 45779 MATCH x53000000/mask=x7f800000
# C6.2.161 LSR (immediate) page C6-787 line 45990 MATCH x53007c00/mask=x7f807c00
# C6.2.294 UBFM page C6-989 line 57341 MATCH x53000000/mask=x7f800000
# C6.2.295 UBFX page C6-991 line 57453 MATCH x53000000/mask=x7f800000
# CONSTRUCT xd340000a/mask=xffc0000a MATCHED 5 DOCUMENTED OPCODES
# AUNIT --inst xd340000a/mask=xffc0000a --status pass
# Special case of ubfm where UInt(imms) < UInt(immr).
# Note because LSL is preferred where imms + 1 == immr, we use ImmS_LT_ImmR_minus_1

:ubfiz Rd_GPR64, Rn_GPR64, ubfiz_lsb64, ubfiz_width
is ImmS_LT_ImmR_minus_1=1 & ImmS_LT_ImmR=1 & sf=1 & opc=2 & b_2428=0x13 & b_2323=0 & n=1 & ImmR_bitfield64_imm & ImmS_bitfield64_imm & ImmRConst64 & ubfiz_lsb64 & ubfiz_width & Rn_GPR64 & Rd_GPR64 & DecodeWMask64 & DecodeTMask64
{
	local wmask:8 = DecodeWMask64;
	local tmask:8 = DecodeTMask64;
	local src:8 = Rn_GPR64;
	local bot:8 = ((src>>ImmRConst64)|(src<<(64-ImmRConst64))) & wmask;
	Rd_GPR64 = bot & tmask;
}

# C6.2.294 UBFM page C6-989 line 57341 MATCH x53000000/mask=x7f800000
# C6.2.158 LSL (immediate) page C6-784 line 45779 MATCH x53000000/mask=x7f800000
# C6.2.161 LSR (immediate) page C6-787 line 45990 MATCH x53007c00/mask=x7f807c00
# C6.2.293 UBFIZ page C6-988 line 57269 MATCH x53000000/mask=x7f800000
# C6.2.295 UBFX page C6-991 line 57453 MATCH x53000000/mask=x7f800000
# C6.2.302 UXTB page C6-998 line 57884 MATCH x53001c00/mask=xfffffc00
# C6.2.303 UXTH page C6-999 line 57932 MATCH x53003c00/mask=xfffffc00
# CONSTRUCT x53000000/mask=xffe08000 MATCHED 7 DOCUMENTED OPCODES
# AUNIT --inst x53000000/mask=xffe08000 --status pass
# if sf == '0' && (N != '0' || immr<5> != '0' || imms<5> != '0') then ReservedValue();

:ubfm Rd_GPR32, Rn_GPR32, ImmRConst32, ImmSConst32
is sf=0 & opc=2 & b_2428=0x13 & b_2323=0 & n=0 & b_21=0 & b_15=0 & ImmRConst32 & ImmSConst32 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64 & DecodeWMask32 & DecodeTMask32
{
	local wmask:4 = DecodeWMask32;
	local tmask:4 = DecodeTMask32;
	local src:4 = Rn_GPR32;
	local bot:4 = ((src>>ImmRConst32)|(src<<(32-ImmRConst32))) & wmask;
	Rd_GPR64 = zext(bot & tmask);
}

# C6.2.294 UBFM page C6-989 line 57341 MATCH x53000000/mask=x7f800000
# C6.2.158 LSL (immediate) page C6-784 line 45779 MATCH x53000000/mask=x7f800000
# C6.2.161 LSR (immediate) page C6-787 line 45990 MATCH x53007c00/mask=x7f807c00
# C6.2.293 UBFIZ page C6-988 line 57269 MATCH x53000000/mask=x7f800000
# C6.2.295 UBFX page C6-991 line 57453 MATCH x53000000/mask=x7f800000
# CONSTRUCT xd3400000/mask=xffc00000 MATCHED 5 DOCUMENTED OPCODES
# AUNIT --inst xd3400000/mask=xffc00000 --status pass

:ubfm Rd_GPR64, Rn_GPR64, ImmRConst64, ImmSConst64
is sf=1 & opc=2 & b_2428=0x13 & b_2323=0 & n=1 & ImmR_bitfield64_imm & ImmS_bitfield64_imm & ImmRConst64 & ImmSConst64 & Rn_GPR64 & Rd_GPR64 & DecodeWMask64 & DecodeTMask64
{
	local wmask:8 = DecodeWMask64;
	local tmask:8 = DecodeTMask64;
	local src:8 = Rn_GPR64;
	local bot:8 = ((src>>ImmRConst64)|(src<<(64-ImmRConst64))) & wmask;
	Rd_GPR64 = bot & tmask;
}

# C6.2.295 UBFX page C6-991 line 57453 MATCH x53000000/mask=x7f800000
# C6.2.158 LSL (immediate) page C6-784 line 45779 MATCH x53000000/mask=x7f800000
# C6.2.161 LSR (immediate) page C6-787 line 45990 MATCH x53007c00/mask=x7f807c00
# C6.2.293 UBFIZ page C6-988 line 57269 MATCH x53000000/mask=x7f800000
# C6.2.294 UBFM page C6-989 line 57341 MATCH x53000000/mask=x7f800000
# C6.2.302 UXTB page C6-998 line 57884 MATCH x53001c00/mask=xfffffc00
# C6.2.303 UXTH page C6-999 line 57932 MATCH x53003c00/mask=xfffffc00
# CONSTRUCT x53000010/mask=xffe0801a MATCHED 7 DOCUMENTED OPCODES
# AUNIT --inst x53000010/mask=xffe0801a --status pass
# Special case of ubfm as determined by BFXPreferred()
# if sf == '0' && (N != '0' || immr<5> != '0' || imms<5> != '0') then ReservedValue();

:ubfx Rd_GPR32, Rn_GPR32, ImmRConst32, ubfx_width
is ImmS_ne_1f=1 & ImmS_LT_ImmR=0 & ImmS_LT_ImmR_minus_1=0 & ImmRConst32 & ubfx_width & sf=0 & opc=2 & b_2428=0x13 & b_2323=0 & n=0 & b_21=0 & b_15=0 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64 & DecodeWMask32 & DecodeTMask32
{
	local wmask:4 = DecodeWMask32;
	local tmask:4 = DecodeTMask32;
	local src:4 = Rn_GPR32;
	local bot:4 = ((src>>ImmRConst32)|(src<<(32-ImmRConst32))) & wmask;
	Rd_GPR64 = zext(bot & tmask);
}

# C6.2.295 UBFX page C6-991 line 57453 MATCH x53000000/mask=x7f800000
# C6.2.158 LSL (immediate) page C6-784 line 45779 MATCH x53000000/mask=x7f800000
# C6.2.161 LSR (immediate) page C6-787 line 45990 MATCH x53007c00/mask=x7f807c00
# C6.2.293 UBFIZ page C6-988 line 57269 MATCH x53000000/mask=x7f800000
# C6.2.294 UBFM page C6-989 line 57341 MATCH x53000000/mask=x7f800000
# CONSTRUCT xd3400020/mask=xffc0002a MATCHED 5 DOCUMENTED OPCODES
# AUNIT --inst xd3400020/mask=xffc0002a --status pass

# Special case of ubfm as determined by BFXPreferred()

:ubfx Rd_GPR64, Rn_GPR64, ImmRConst64, ubfx_width
is ImmS_ne_3f=1 & ImmS_LT_ImmR=0 & ImmS_LT_ImmR_minus_1=0 & ImmRConst64 & ubfx_width & sf=1 & opc=2 & b_2428=0x13 & b_2323=0 & n=1 & ImmR_bitfield64_imm & ImmS_bitfield64_imm & Rn_GPR64 & Rd_GPR64 & DecodeWMask64 & DecodeTMask64
{
	local wmask:8 = DecodeWMask64;
	local tmask:8 = DecodeTMask64;
	local src:8 = Rn_GPR64;
	local bot:8 = ((src>>ImmRConst64)|(src<<(64-ImmRConst64))) & wmask;
	Rd_GPR64 = bot & tmask;
}

# C6.2.296 UDIV page C6-992 line 57525 MATCH x1ac00800/mask=x7fe0fc00
# CONSTRUCT x1ac00800/mask=xffe0fc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x1ac00800/mask=xffe0fc00 --status pass

:udiv Rd_GPR32, Rn_GPR32, Rm_GPR32
is sf=0 & b_3030=0 & S=0 & b_2428=0x1a & b_2123=6 & Rm_GPR32 & b_1015=0x2 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	local tmp_1:4 = 0;
	if (Rm_GPR32 == 0) goto <zero>;
	tmp_1 = Rn_GPR32 / Rm_GPR32;
<zero>
	Rd_GPR64 = zext(tmp_1);
}

# C6.2.296 UDIV page C6-992 line 57525 MATCH x1ac00800/mask=x7fe0fc00
# CONSTRUCT x9ac00800/mask=xffe0fc00 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x9ac00800/mask=xffe0fc00 --status pass

:udiv Rd_GPR64, Rn_GPR64, Rm_GPR64
is sf=1 & b_3030=0 & S=0 & b_2428=0x1a & b_2123=6 & Rm_GPR64 & b_1015=0x2 & Rn_GPR64 & Rd_GPR64
{
	local tmp_1:8 = 0;
	if (Rm_GPR64 == 0) goto <zero>;
	tmp_1 = Rn_GPR64 / Rm_GPR64;
<zero>
	Rd_GPR64 = tmp_1;
}

# C6.2.297 UMADDL page C6-993 line 57593 MATCH x9ba00000/mask=xffe08000
# CONSTRUCT x9ba00000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x9ba00000/mask=xffe08000 --status pass

:umaddl Rd_GPR64, Rn_GPR32, Rm_GPR32, Ra_GPR64
is sf=1 & op.dp3_op54=0 & b_2428=0x1b & op.dp3_op31=5 & Rm_GPR32 & op.dp3_o0=0 & Ra_GPR64 & Rn_GPR32 & Rd_GPR64
{
	tmp_3:8 = zext(Rn_GPR32);
	tmp_4:8 = zext(Rm_GPR32);
	tmp_2:8 = tmp_3 * tmp_4;
	tmp_1:8 = Ra_GPR64 + tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.298 UMNEGL page C6-994 line 57661 MATCH x9ba0fc00/mask=xffe0fc00
# C6.2.299 UMSUBL page C6-995 line 57713 MATCH x9ba08000/mask=xffe08000
# CONSTRUCT x9ba0fc00/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x9ba0fc00/mask=xffe0fc00 --status pass

:umnegl Rd_GPR64, Rn_GPR32, Rm_GPR32
is sf=1 & op.dp3_op54=0 & b_2428=0x1b & op.dp3_op31=5 & Rm_GPR32 & op.dp3_o0=1 & Ra=0x1f & Rn_GPR32 & Rd_GPR64
{
	tmp_3:8 = zext(Rn_GPR32);
	tmp_4:8 = zext(Rm_GPR32);
	tmp_2:8 = tmp_3 * tmp_4;
	tmp_1:8 = - tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.299 UMSUBL page C6-995 line 57713 MATCH x9ba08000/mask=xffe08000
# CONSTRUCT x9ba08000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x9ba08000/mask=xffe08000 --status pass

:umsubl Rd_GPR64, Rn_GPR32, Rm_GPR32, Ra_GPR64
is sf=1 & op.dp3_op54=0 & b_2428=0x1b & op.dp3_op31=5 & Rm_GPR32 & op.dp3_o0=1 & Ra_GPR64 & Rn_GPR32 & Rd_GPR64
{
	tmp_3:8 = zext(Rn_GPR32);
	tmp_4:8 = zext(Rm_GPR32);
	tmp_2:8 = tmp_3 * tmp_4;
	tmp_1:8 = Ra_GPR64 - tmp_2;
	Rd_GPR64 = tmp_1;
}

# C6.2.300 UMULH page C6-996 line 57780 MATCH x9bc00000/mask=xffe08000
# CONSTRUCT x9bc00000/mask=xffe08000 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst x9bc00000/mask=xffe08000 --status pass
# To enforce SHOULD BE ONE fields add: b_1014=0b11111

:umulh Rd_GPR64, Rn_GPR64, Rm_GPR64
is sf=1 & op.dp3=0 & b_2428=0x1b & op.dp3_op31=6 & Rm_GPR64 & op.dp3_o0=0 & Ra & Rn_GPR64 & Rd_GPR64
{
	local tmpq:16 = zext(Rn_GPR64) * zext(Rm_GPR64);
	Rd_GPR64 = tmpq(8);
}

# C6.2.301 UMULL page C6-997 line 57833 MATCH x9ba07c00/mask=xffe0fc00
# C6.2.297 UMADDL page C6-993 line 57593 MATCH x9ba00000/mask=xffe08000
# CONSTRUCT x9ba07c00/mask=xffe0fc00 MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst x9ba07c00/mask=xffe0fc00 --status pass

:umull Rd_GPR64, Rn_GPR32, Rm_GPR32
is sf=1 & op.dp3_op54=0 & b_2428=0x1b & op.dp3_op31=5 & Rm_GPR32 & op.dp3_o0=0 & Ra=0x1f & Rn_GPR32 & Rd_GPR64
{
	tmp_3:8 = zext(Rn_GPR32);
	tmp_4:8 = zext(Rm_GPR32);
	tmp_2:8 = tmp_3 * tmp_4;
	Rd_GPR64 = tmp_2;
}

# C6.2.302 UXTB page C6-998 line 57884 MATCH x53001c00/mask=xfffffc00
# C6.2.158 LSL (immediate) page C6-784 line 45779 MATCH x53000000/mask=x7f800000
# C6.2.293 UBFIZ page C6-988 line 57269 MATCH x53000000/mask=x7f800000
# C6.2.294 UBFM page C6-989 line 57341 MATCH x53000000/mask=x7f800000
# C6.2.295 UBFX page C6-991 line 57453 MATCH x53000000/mask=x7f800000
# CONSTRUCT x53001c10/mask=xfffffc1e MATCHED 5 DOCUMENTED OPCODES
# AUNIT --inst x53001c10/mask=xfffffc1e --status pass

# Alias for ubfm where immr=='000000' and imms='000111'
# These imply things about the inequalities

:uxtb Rd_GPR32, Rn_GPR32
is ImmR=0x0 & ImmS=0x7 & ImmS_ne_1f=1 & ImmS_LT_ImmR=0 & ImmS_LT_ImmR_minus_1=0 & ImmS_EQ_ImmR=0 & sf=0 & opc=2 & b_2428=0x13 & b_2323=0 & n=0 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp:4 = Rn_GPR32;
	Rd_GPR64 = zext(tmp:1);
}

# C6.2.303 UXTH page C6-999 line 57932 MATCH x53003c00/mask=xfffffc00
# C6.2.158 LSL (immediate) page C6-784 line 45779 MATCH x53000000/mask=x7f800000
# C6.2.293 UBFIZ page C6-988 line 57269 MATCH x53000000/mask=x7f800000
# C6.2.294 UBFM page C6-989 line 57341 MATCH x53000000/mask=x7f800000
# C6.2.295 UBFX page C6-991 line 57453 MATCH x53000000/mask=x7f800000
# CONSTRUCT x53003c10/mask=xfffffc1e MATCHED 5 DOCUMENTED OPCODES
# AUNIT --inst x53003c10/mask=xfffffc1e --status pass

# Alias for ubfm where immr=='000000' and imms='001111'
# These imply things about the inequalities

:uxth Rd_GPR32, Rn_GPR32
is ImmR=0x0 & ImmS=0x0f & ImmS_ne_1f=1 & ImmS_LT_ImmR=0 & ImmS_LT_ImmR_minus_1=0 & ImmS_EQ_ImmR=0 & sf=0 & opc=2 & b_2428=0x13 & b_2323=0 & n=0 & Rn_GPR32 & Rd_GPR32 & Rd_GPR64
{
	tmp:4 = Rn_GPR32;
	Rd_GPR64 = zext(tmp:2);
}

# C6.2.304 WFE page C6-1000 line 57980 MATCH xd503205f/mask=xffffffff
# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# CONSTRUCT xd503205f/mask=xffffffff MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd503205f/mask=xffffffff --status nodest

:wfe
is b_2431=0xd5 & b_2223=0 & l=0 & Op0=0 & Op1=3 & CRn=0x2 & imm7Low=2 & Rt=0x1f
{
	WaitForEvent();
}

# C6.2.305 WFI page C6-1001 line 58037 MATCH xd503207f/mask=xffffffff
# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# CONSTRUCT xd503207f/mask=xffffffff MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd503207f/mask=xffffffff --status nodest

:wfi
is b_2431=0xd5 & b_2223=0 & l=0 & Op0=0 & Op1=3 & CRn=0x2 & imm7Low=3 & Rt=0x1f
{
	WaitForInterrupt();
}

# C6.2.306 XPACD, XPACI, XPACLRI page C6-1002 line 58090 MATCH xdac143e0/mask=xfffffbe0
# CONSTRUCT xdac147e0/mask=xffffffe0 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac147e0/mask=xffffffe0 --status noqemu
# D == 1 XPACD variant

:xpacd Rd_GPR64
is b_1131=0b110110101100000101000 & b_0509=0b11111 & b_10=1 & Rd_GPR64
{
	Rd_GPR64 = xpac(Rd_GPR64, 1:1);
}

# C6.2.306 XPACD, XPACI, XPACLRI page C6-1002 line 58090 MATCH xdac143e0/mask=xfffffbe0
# CONSTRUCT xdac143e0/mask=xffffffe0 MATCHED 1 DOCUMENTED OPCODES
# AUNIT --inst xdac143e0/mask=xffffffe0 --status noqemu
# D == 0 XPACI variant

:xpaci Rd_GPR64
is b_1131=0b110110101100000101000 & b_0509=0b11111 & b_10=0 & Rd_GPR64
{
	Rd_GPR64 = xpac(Rd_GPR64, 0:1);
}

# C6.2.306 XPACD, XPACI, XPACLRI page C6-1002 line 58090 MATCH xd50320ff/mask=xffffffff
# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# CONSTRUCT xd50320ff/mask=xffffffff MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd50320ff/mask=xffffffff --status nodest
# System variant

:xpaclri
is b_0031=0b11010101000000110010000011111111
{
	x30 = xpac(x30, 0:1);
}

# C6.2.307 YIELD page C6-1003 line 58161 MATCH xd503203f/mask=xffffffff
# C6.2.81 HINT page C6-643 line 37466 MATCH xd503201f/mask=xfffff01f
# CONSTRUCT xd503203f/mask=xffffffff MATCHED 2 DOCUMENTED OPCODES
# AUNIT --inst xd503203f/mask=xffffffff --status nodest

:yield
is b_2431=0xd5 & b_2223=0 & l=0 & Op0=0 & Op1=3 & CRn=0x2 & imm7Low=1 & Rt=0x1f
{
	Yield();
}
