// Generated by `generate::rust_assembler`, /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/lib.rs:14
#[doc(hidden)]
// /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:72
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[cfg_attr(
  feature = "arbitrary",
  arbitrary(bound = "R: crate::arbitrary_impls::RegistersArbitrary")
)]
pub enum Inst<R: Registers> {
  andb_i(andb_i), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
  andw_i(andw_i), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
  andl_i(andl_i), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
  andq_i_sxlq(andq_i_sxlq), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
  andb_mi(andb_mi<R>), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
  andw_mi(andw_mi<R>), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
  andl_mi(andl_mi<R>), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
  andq_mi_sxlq(andq_mi_sxlq<R>), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
  andl_mi_sxbl(andl_mi_sxbl<R>), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
  andq_mi_sxbq(andq_mi_sxbq<R>), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
  andb_mr(andb_mr<R>), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
  andb_mr_sxbq(andb_mr_sxbq<R>), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
  andw_mr(andw_mr<R>), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
  andl_mr(andl_mr<R>), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
  andq_mr(andq_mr<R>), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
  andb_rm(andb_rm<R>), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
  andb_rm_sxbq(andb_rm_sxbq<R>), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
  andw_rm(andw_rm<R>), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
  andl_rm(andl_rm<R>), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
  andq_rm(andq_rm<R>), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:80
}
impl<R: Registers> std::fmt::Display for Inst<R> {
  fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    match self {
      Self::andb_i(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
      Self::andw_i(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
      Self::andl_i(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
      Self::andq_i_sxlq(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
      Self::andb_mi(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
      Self::andw_mi(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
      Self::andl_mi(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
      Self::andq_mi_sxlq(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
      Self::andl_mi_sxbl(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
      Self::andq_mi_sxbq(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
      Self::andb_mr(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
      Self::andb_mr_sxbq(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
      Self::andw_mr(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
      Self::andl_mr(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
      Self::andq_mr(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
      Self::andb_rm(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
      Self::andb_rm_sxbq(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
      Self::andw_rm(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
      Self::andl_rm(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
      Self::andq_rm(i) => write!(f, "{i}"), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:108
    }
  }
}
impl<R: Registers> Inst<R> {
  pub fn encode(&self, b: &mut impl CodeSink, o: &impl KnownOffsetTable) {
    match self {
      Self::andb_i(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
      Self::andw_i(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
      Self::andl_i(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
      Self::andq_i_sxlq(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
      Self::andb_mi(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
      Self::andw_mi(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
      Self::andl_mi(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
      Self::andq_mi_sxlq(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
      Self::andl_mi_sxbl(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
      Self::andq_mi_sxbq(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
      Self::andb_mr(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
      Self::andb_mr_sxbq(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
      Self::andw_mr(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
      Self::andl_mr(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
      Self::andq_mr(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
      Self::andb_rm(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
      Self::andb_rm_sxbq(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
      Self::andw_rm(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
      Self::andl_rm(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
      Self::andq_rm(i) => i.encode(b, o), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:128
    }
  }
}
impl<R: Registers> Inst<R> {
  pub fn visit(&mut self, v: &mut impl RegisterVisitor<R>) {
    match self {
      Self::andb_i(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
      Self::andw_i(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
      Self::andl_i(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
      Self::andq_i_sxlq(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
      Self::andb_mi(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
      Self::andw_mi(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
      Self::andl_mi(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
      Self::andq_mi_sxlq(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
      Self::andl_mi_sxbl(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
      Self::andq_mi_sxbq(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
      Self::andb_mr(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
      Self::andb_mr_sxbq(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
      Self::andw_mr(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
      Self::andl_mr(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
      Self::andq_mr(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
      Self::andb_rm(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
      Self::andb_rm_sxbq(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
      Self::andw_rm(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
      Self::andl_rm(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
      Self::andq_rm(i) => i.visit(v), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:148
    }
  }
}
impl<R: Registers> Inst<R> {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:162
  pub fn features(&self) -> Vec<Feature> {
    match self {
      Self::andb_i(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
      Self::andw_i(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
      Self::andl_i(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
      Self::andq_i_sxlq(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
      Self::andb_mi(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
      Self::andw_mi(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
      Self::andl_mi(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
      Self::andq_mi_sxlq(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
      Self::andl_mi_sxbl(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
      Self::andq_mi_sxbq(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
      Self::andb_mr(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
      Self::andb_mr_sxbq(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
      Self::andw_mr(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
      Self::andl_mr(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
      Self::andq_mr(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
      Self::andb_rm(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
      Self::andb_rm_sxbq(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
      Self::andw_rm(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
      Self::andl_rm(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
      Self::andq_rm(i) => i.features(), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate.rs:169
    }
  }
}

/// `andb: I(al[rw], imm8) => 0x24 ib [_64b | compat]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
pub struct andb_i {
  pub imm8: Imm8, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl andb_i {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(imm8: Imm8) -> Self {
    Self { imm8 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, _: &impl KnownOffsetTable) {
    // Emit REX prefix.
    let rex = RexFlags::clear_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:82
    let al = reg::enc::RAX; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:88
    let digit = 0x0; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:89
    rex.emit_two_op(buf, digit, al.enc()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:90

    // Emit opcode.
    buf.put1(0x24); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit immediate.
    let bytes = 1; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:181
    let value = u32::from(self.imm8.value()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:185
    emit_simm(buf, bytes, value); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:187
  }

  pub fn visit<R: Registers>(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    visitor.fixed_read_write(&R::ReadWriteGpr::new(reg::enc::RAX)); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:150
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b, Feature::compat] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl std::fmt::Display for andb_i {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let al = "%al"; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let imm8 = self.imm8.to_string(Extension::None); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andb {imm8}, {al}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andb_i> for Inst<R> {
  fn from(inst: andb_i) -> Self {
    Self::andb_i(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

/// `andw: I(ax[rw], imm16) => 0x66 + 0x25 iw [_64b | compat]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
pub struct andw_i {
  pub imm16: Imm16, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl andw_i {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(imm16: Imm16) -> Self {
    Self { imm16 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, _: &impl KnownOffsetTable) {
    // Emit legacy prefixes.
    buf.put1(0x66); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:47

    // Emit REX prefix.
    let rex = RexFlags::clear_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:82
    let ax = reg::enc::RAX; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:88
    let digit = 0x0; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:89
    rex.emit_two_op(buf, digit, ax.enc()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:90

    // Emit opcode.
    buf.put1(0x25); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit immediate.
    let bytes = 2; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:181
    let value = u32::from(self.imm16.value()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:185
    emit_simm(buf, bytes, value); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:187
  }

  pub fn visit<R: Registers>(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    visitor.fixed_read_write(&R::ReadWriteGpr::new(reg::enc::RAX)); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:150
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b, Feature::compat] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl std::fmt::Display for andw_i {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let ax = "%ax"; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let imm16 = self.imm16.to_string(Extension::None); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andw {imm16}, {ax}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andw_i> for Inst<R> {
  fn from(inst: andw_i) -> Self {
    Self::andw_i(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

/// `andl: I(eax[rw], imm32) => 0x25 id [_64b | compat]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
pub struct andl_i {
  pub imm32: Imm32, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl andl_i {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(imm32: Imm32) -> Self {
    Self { imm32 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, _: &impl KnownOffsetTable) {
    // Emit REX prefix.
    let rex = RexFlags::clear_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:82
    let eax = reg::enc::RAX; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:88
    let digit = 0x0; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:89
    rex.emit_two_op(buf, digit, eax.enc()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:90

    // Emit opcode.
    buf.put1(0x25); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit immediate.
    let bytes = 4; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:181
    let value = self.imm32.value(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:183
    emit_simm(buf, bytes, value); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:187
  }

  pub fn visit<R: Registers>(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    visitor.fixed_read_write(&R::ReadWriteGpr::new(reg::enc::RAX)); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:150
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b, Feature::compat] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl std::fmt::Display for andl_i {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let eax = "%eax"; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let imm32 = self.imm32.to_string(Extension::None); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andl {imm32}, {eax}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andl_i> for Inst<R> {
  fn from(inst: andl_i) -> Self {
    Self::andl_i(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

/// `andq: I_SXLQ(rax[rw], imm32[sxq]) => REX.W + 0x25 id [_64b]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
pub struct andq_i_sxlq {
  pub imm32: Imm32, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl andq_i_sxlq {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(imm32: Imm32) -> Self {
    Self { imm32 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, _: &impl KnownOffsetTable) {
    // Emit REX prefix.
    let rex = RexFlags::set_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:82
    let rax = reg::enc::RAX; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:88
    let digit = 0x0; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:89
    rex.emit_two_op(buf, digit, rax.enc()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:90

    // Emit opcode.
    buf.put1(0x25); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit immediate.
    let bytes = 4; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:181
    let value = self.imm32.value(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:183
    emit_simm(buf, bytes, value); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:187
  }

  pub fn visit<R: Registers>(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    visitor.fixed_read_write(&R::ReadWriteGpr::new(reg::enc::RAX)); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:150
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl std::fmt::Display for andq_i_sxlq {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let rax = "%rax"; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let imm32 = self.imm32.to_string(Extension::SignExtendQuad); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andq {imm32}, {rax}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andq_i_sxlq> for Inst<R> {
  fn from(inst: andq_i_sxlq) -> Self {
    Self::andq_i_sxlq(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

/// `andb: MI(rm8[rw], imm8) => 0x80 /4 ib [_64b | compat]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[cfg_attr(
  feature = "arbitrary",
  arbitrary(bound = "R: crate::arbitrary_impls::RegistersArbitrary")
)]
pub struct andb_mi<R>
where
  R: Registers,
{
  pub rm8: GprMem<R::ReadWriteGpr, R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
  pub imm8: Imm8, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl<R: Registers> andb_mi<R> {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(rm8: GprMem<R::ReadWriteGpr, R::ReadGpr>, imm8: Imm8) -> Self {
    Self { rm8, imm8 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, off: &impl KnownOffsetTable) {
    // Emit trap.
    if let GprMem::Mem(rm8) = &self.rm8 {
      if let Some(trap_code) = rm8.trap_code() {
        buf.add_trap(trap_code); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:113
      }
    }

    // Emit REX prefix.
    let mut rex = RexFlags::clear_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:77
    self.rm8.always_emit_if_8bit_needed(&mut rex); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:79
    let digit = 0x4; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:94
    match &self.rm8 {
      GprMem::Gpr(rm8) => rex.emit_two_op(buf, digit, rm8.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:97
      GprMem::Mem(rm8) => rm8.emit_rex_prefix(rex, digit, buf), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:98
    }

    // Emit opcode.
    buf.put1(0x80); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit ModR/M byte.
    let digit = 0x4; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:144
    match &self.rm8 {
      GprMem::Gpr(rm8) => emit_modrm(buf, digit, rm8.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:147
      GprMem::Mem(rm8) => emit_modrm_sib_disp(buf, off, digit, rm8, 0, None), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:148
    }

    // Emit immediate.
    let bytes = 1; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:181
    let value = u32::from(self.imm8.value()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:185
    emit_simm(buf, bytes, value); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:187
  }

  pub fn visit(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    match &mut self.rm8 {
      GprMem::Gpr(r) => visitor.read_write(r), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:160
      GprMem::Mem(m) => {
        m.registers_mut().iter_mut().for_each(|r| visitor.read(r))
      } // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:161
    }
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b, Feature::compat] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl<R: Registers> std::fmt::Display for andb_mi<R> {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let rm8 = self.rm8.to_string(Size::Byte); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let imm8 = self.imm8.to_string(Extension::None); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andb {imm8}, {rm8}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andb_mi<R>> for Inst<R> {
  fn from(inst: andb_mi<R>) -> Self {
    Self::andb_mi(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

/// `andw: MI(rm16[rw], imm16) => 0x66 + 0x81 /4 iw [_64b | compat]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[cfg_attr(
  feature = "arbitrary",
  arbitrary(bound = "R: crate::arbitrary_impls::RegistersArbitrary")
)]
pub struct andw_mi<R>
where
  R: Registers,
{
  pub rm16: GprMem<R::ReadWriteGpr, R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
  pub imm16: Imm16, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl<R: Registers> andw_mi<R> {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(rm16: GprMem<R::ReadWriteGpr, R::ReadGpr>, imm16: Imm16) -> Self {
    Self { rm16, imm16 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, off: &impl KnownOffsetTable) {
    // Emit trap.
    if let GprMem::Mem(rm16) = &self.rm16 {
      if let Some(trap_code) = rm16.trap_code() {
        buf.add_trap(trap_code); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:113
      }
    }

    // Emit legacy prefixes.
    buf.put1(0x66); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:47

    // Emit REX prefix.
    let rex = RexFlags::clear_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:82
    let digit = 0x4; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:94
    match &self.rm16 {
      GprMem::Gpr(rm16) => rex.emit_two_op(buf, digit, rm16.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:97
      GprMem::Mem(rm16) => rm16.emit_rex_prefix(rex, digit, buf), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:98
    }

    // Emit opcode.
    buf.put1(0x81); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit ModR/M byte.
    let digit = 0x4; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:144
    match &self.rm16 {
      GprMem::Gpr(rm16) => emit_modrm(buf, digit, rm16.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:147
      GprMem::Mem(rm16) => emit_modrm_sib_disp(buf, off, digit, rm16, 0, None), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:148
    }

    // Emit immediate.
    let bytes = 2; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:181
    let value = u32::from(self.imm16.value()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:185
    emit_simm(buf, bytes, value); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:187
  }

  pub fn visit(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    match &mut self.rm16 {
      GprMem::Gpr(r) => visitor.read_write(r), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:160
      GprMem::Mem(m) => {
        m.registers_mut().iter_mut().for_each(|r| visitor.read(r))
      } // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:161
    }
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b, Feature::compat] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl<R: Registers> std::fmt::Display for andw_mi<R> {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let rm16 = self.rm16.to_string(Size::Word); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let imm16 = self.imm16.to_string(Extension::None); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andw {imm16}, {rm16}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andw_mi<R>> for Inst<R> {
  fn from(inst: andw_mi<R>) -> Self {
    Self::andw_mi(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

/// `andl: MI(rm32[rw], imm32) => 0x81 /4 id [_64b | compat]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[cfg_attr(
  feature = "arbitrary",
  arbitrary(bound = "R: crate::arbitrary_impls::RegistersArbitrary")
)]
pub struct andl_mi<R>
where
  R: Registers,
{
  pub rm32: GprMem<R::ReadWriteGpr, R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
  pub imm32: Imm32, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl<R: Registers> andl_mi<R> {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(rm32: GprMem<R::ReadWriteGpr, R::ReadGpr>, imm32: Imm32) -> Self {
    Self { rm32, imm32 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, off: &impl KnownOffsetTable) {
    // Emit trap.
    if let GprMem::Mem(rm32) = &self.rm32 {
      if let Some(trap_code) = rm32.trap_code() {
        buf.add_trap(trap_code); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:113
      }
    }

    // Emit REX prefix.
    let rex = RexFlags::clear_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:82
    let digit = 0x4; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:94
    match &self.rm32 {
      GprMem::Gpr(rm32) => rex.emit_two_op(buf, digit, rm32.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:97
      GprMem::Mem(rm32) => rm32.emit_rex_prefix(rex, digit, buf), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:98
    }

    // Emit opcode.
    buf.put1(0x81); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit ModR/M byte.
    let digit = 0x4; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:144
    match &self.rm32 {
      GprMem::Gpr(rm32) => emit_modrm(buf, digit, rm32.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:147
      GprMem::Mem(rm32) => emit_modrm_sib_disp(buf, off, digit, rm32, 0, None), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:148
    }

    // Emit immediate.
    let bytes = 4; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:181
    let value = self.imm32.value(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:183
    emit_simm(buf, bytes, value); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:187
  }

  pub fn visit(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    match &mut self.rm32 {
      GprMem::Gpr(r) => visitor.read_write(r), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:160
      GprMem::Mem(m) => {
        m.registers_mut().iter_mut().for_each(|r| visitor.read(r))
      } // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:161
    }
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b, Feature::compat] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl<R: Registers> std::fmt::Display for andl_mi<R> {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let rm32 = self.rm32.to_string(Size::Doubleword); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let imm32 = self.imm32.to_string(Extension::None); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andl {imm32}, {rm32}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andl_mi<R>> for Inst<R> {
  fn from(inst: andl_mi<R>) -> Self {
    Self::andl_mi(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

/// `andq: MI_SXLQ(rm64[rw], imm32[sxq]) => REX.W + 0x81 /4 id [_64b]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[cfg_attr(
  feature = "arbitrary",
  arbitrary(bound = "R: crate::arbitrary_impls::RegistersArbitrary")
)]
pub struct andq_mi_sxlq<R>
where
  R: Registers,
{
  pub rm64: GprMem<R::ReadWriteGpr, R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
  pub imm32: Imm32, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl<R: Registers> andq_mi_sxlq<R> {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(rm64: GprMem<R::ReadWriteGpr, R::ReadGpr>, imm32: Imm32) -> Self {
    Self { rm64, imm32 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, off: &impl KnownOffsetTable) {
    // Emit trap.
    if let GprMem::Mem(rm64) = &self.rm64 {
      if let Some(trap_code) = rm64.trap_code() {
        buf.add_trap(trap_code); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:113
      }
    }

    // Emit REX prefix.
    let rex = RexFlags::set_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:82
    let digit = 0x4; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:94
    match &self.rm64 {
      GprMem::Gpr(rm64) => rex.emit_two_op(buf, digit, rm64.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:97
      GprMem::Mem(rm64) => rm64.emit_rex_prefix(rex, digit, buf), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:98
    }

    // Emit opcode.
    buf.put1(0x81); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit ModR/M byte.
    let digit = 0x4; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:144
    match &self.rm64 {
      GprMem::Gpr(rm64) => emit_modrm(buf, digit, rm64.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:147
      GprMem::Mem(rm64) => emit_modrm_sib_disp(buf, off, digit, rm64, 0, None), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:148
    }

    // Emit immediate.
    let bytes = 4; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:181
    let value = self.imm32.value(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:183
    emit_simm(buf, bytes, value); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:187
  }

  pub fn visit(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    match &mut self.rm64 {
      GprMem::Gpr(r) => visitor.read_write(r), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:160
      GprMem::Mem(m) => {
        m.registers_mut().iter_mut().for_each(|r| visitor.read(r))
      } // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:161
    }
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl<R: Registers> std::fmt::Display for andq_mi_sxlq<R> {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let rm64 = self.rm64.to_string(Size::Quadword); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let imm32 = self.imm32.to_string(Extension::SignExtendQuad); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andq {imm32}, {rm64}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andq_mi_sxlq<R>> for Inst<R> {
  fn from(inst: andq_mi_sxlq<R>) -> Self {
    Self::andq_mi_sxlq(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

/// `andl: MI_SXBL(rm32[rw], imm8[sxl]) => 0x83 /4 ib [_64b | compat]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[cfg_attr(
  feature = "arbitrary",
  arbitrary(bound = "R: crate::arbitrary_impls::RegistersArbitrary")
)]
pub struct andl_mi_sxbl<R>
where
  R: Registers,
{
  pub rm32: GprMem<R::ReadWriteGpr, R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
  pub imm8: Imm8, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl<R: Registers> andl_mi_sxbl<R> {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(rm32: GprMem<R::ReadWriteGpr, R::ReadGpr>, imm8: Imm8) -> Self {
    Self { rm32, imm8 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, off: &impl KnownOffsetTable) {
    // Emit trap.
    if let GprMem::Mem(rm32) = &self.rm32 {
      if let Some(trap_code) = rm32.trap_code() {
        buf.add_trap(trap_code); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:113
      }
    }

    // Emit REX prefix.
    let rex = RexFlags::clear_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:82
    let digit = 0x4; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:94
    match &self.rm32 {
      GprMem::Gpr(rm32) => rex.emit_two_op(buf, digit, rm32.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:97
      GprMem::Mem(rm32) => rm32.emit_rex_prefix(rex, digit, buf), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:98
    }

    // Emit opcode.
    buf.put1(0x83); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit ModR/M byte.
    let digit = 0x4; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:144
    match &self.rm32 {
      GprMem::Gpr(rm32) => emit_modrm(buf, digit, rm32.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:147
      GprMem::Mem(rm32) => emit_modrm_sib_disp(buf, off, digit, rm32, 0, None), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:148
    }

    // Emit immediate.
    let bytes = 1; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:181
    let value = u32::from(self.imm8.value()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:185
    emit_simm(buf, bytes, value); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:187
  }

  pub fn visit(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    match &mut self.rm32 {
      GprMem::Gpr(r) => visitor.read_write(r), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:160
      GprMem::Mem(m) => {
        m.registers_mut().iter_mut().for_each(|r| visitor.read(r))
      } // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:161
    }
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b, Feature::compat] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl<R: Registers> std::fmt::Display for andl_mi_sxbl<R> {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let rm32 = self.rm32.to_string(Size::Doubleword); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let imm8 = self.imm8.to_string(Extension::SignExtendLong); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andl {imm8}, {rm32}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andl_mi_sxbl<R>> for Inst<R> {
  fn from(inst: andl_mi_sxbl<R>) -> Self {
    Self::andl_mi_sxbl(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

/// `andq: MI_SXBQ(rm64[rw], imm8[sxq]) => REX.W + 0x83 /4 ib [_64b]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[cfg_attr(
  feature = "arbitrary",
  arbitrary(bound = "R: crate::arbitrary_impls::RegistersArbitrary")
)]
pub struct andq_mi_sxbq<R>
where
  R: Registers,
{
  pub rm64: GprMem<R::ReadWriteGpr, R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
  pub imm8: Imm8, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl<R: Registers> andq_mi_sxbq<R> {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(rm64: GprMem<R::ReadWriteGpr, R::ReadGpr>, imm8: Imm8) -> Self {
    Self { rm64, imm8 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, off: &impl KnownOffsetTable) {
    // Emit trap.
    if let GprMem::Mem(rm64) = &self.rm64 {
      if let Some(trap_code) = rm64.trap_code() {
        buf.add_trap(trap_code); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:113
      }
    }

    // Emit REX prefix.
    let rex = RexFlags::set_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:82
    let digit = 0x4; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:94
    match &self.rm64 {
      GprMem::Gpr(rm64) => rex.emit_two_op(buf, digit, rm64.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:97
      GprMem::Mem(rm64) => rm64.emit_rex_prefix(rex, digit, buf), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:98
    }

    // Emit opcode.
    buf.put1(0x83); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit ModR/M byte.
    let digit = 0x4; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:144
    match &self.rm64 {
      GprMem::Gpr(rm64) => emit_modrm(buf, digit, rm64.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:147
      GprMem::Mem(rm64) => emit_modrm_sib_disp(buf, off, digit, rm64, 0, None), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:148
    }

    // Emit immediate.
    let bytes = 1; // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:181
    let value = u32::from(self.imm8.value()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:185
    emit_simm(buf, bytes, value); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:187
  }

  pub fn visit(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    match &mut self.rm64 {
      GprMem::Gpr(r) => visitor.read_write(r), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:160
      GprMem::Mem(m) => {
        m.registers_mut().iter_mut().for_each(|r| visitor.read(r))
      } // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:161
    }
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl<R: Registers> std::fmt::Display for andq_mi_sxbq<R> {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let rm64 = self.rm64.to_string(Size::Quadword); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let imm8 = self.imm8.to_string(Extension::SignExtendQuad); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andq {imm8}, {rm64}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andq_mi_sxbq<R>> for Inst<R> {
  fn from(inst: andq_mi_sxbq<R>) -> Self {
    Self::andq_mi_sxbq(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

/// `andb: MR(rm8[rw], r8) => 0x20 /r [_64b | compat]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[cfg_attr(
  feature = "arbitrary",
  arbitrary(bound = "R: crate::arbitrary_impls::RegistersArbitrary")
)]
pub struct andb_mr<R>
where
  R: Registers,
{
  pub rm8: GprMem<R::ReadWriteGpr, R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
  pub r8: Gpr<R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl<R: Registers> andb_mr<R> {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(
    rm8: GprMem<R::ReadWriteGpr, R::ReadGpr>,
    r8: Gpr<R::ReadGpr>,
  ) -> Self {
    Self { rm8, r8 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, off: &impl KnownOffsetTable) {
    // Emit trap.
    if let GprMem::Mem(rm8) = &self.rm8 {
      if let Some(trap_code) = rm8.trap_code() {
        buf.add_trap(trap_code); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:113
      }
    }

    // Emit REX prefix.
    let mut rex = RexFlags::clear_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:77
    self.rm8.always_emit_if_8bit_needed(&mut rex); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:79
    self.r8.always_emit_if_8bit_needed(&mut rex); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:79
    let r8 = self.r8.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:115
    match &self.rm8 {
      GprMem::Gpr(rm8) => rex.emit_two_op(buf, r8, rm8.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:118
      GprMem::Mem(rm8) => rm8.emit_rex_prefix(rex, r8, buf), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:119
    }

    // Emit opcode.
    buf.put1(0x20); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit ModR/M byte.
    let r8 = self.r8.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:162
    match &self.rm8 {
      GprMem::Gpr(rm8) => emit_modrm(buf, r8, rm8.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:165
      GprMem::Mem(rm8) => emit_modrm_sib_disp(buf, off, r8, rm8, 0, None), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:166
    }
  }

  pub fn visit(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    match &mut self.rm8 {
      GprMem::Gpr(r) => visitor.read_write(r), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:160
      GprMem::Mem(m) => {
        m.registers_mut().iter_mut().for_each(|r| visitor.read(r))
      } // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:161
    }
    visitor.read(self.r8.as_mut()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:154
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b, Feature::compat] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl<R: Registers> std::fmt::Display for andb_mr<R> {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let rm8 = self.rm8.to_string(Size::Byte); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let r8 = self.r8.to_string(Size::Byte); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andb {r8}, {rm8}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andb_mr<R>> for Inst<R> {
  fn from(inst: andb_mr<R>) -> Self {
    Self::andb_mr(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

/// `andb: MR_SXBQ(rm8[rw], r8) => REX.W + 0x20 /r [_64b]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[cfg_attr(
  feature = "arbitrary",
  arbitrary(bound = "R: crate::arbitrary_impls::RegistersArbitrary")
)]
pub struct andb_mr_sxbq<R>
where
  R: Registers,
{
  pub rm8: GprMem<R::ReadWriteGpr, R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
  pub r8: Gpr<R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl<R: Registers> andb_mr_sxbq<R> {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(
    rm8: GprMem<R::ReadWriteGpr, R::ReadGpr>,
    r8: Gpr<R::ReadGpr>,
  ) -> Self {
    Self { rm8, r8 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, off: &impl KnownOffsetTable) {
    // Emit trap.
    if let GprMem::Mem(rm8) = &self.rm8 {
      if let Some(trap_code) = rm8.trap_code() {
        buf.add_trap(trap_code); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:113
      }
    }

    // Emit REX prefix.
    let mut rex = RexFlags::set_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:77
    self.rm8.always_emit_if_8bit_needed(&mut rex); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:79
    self.r8.always_emit_if_8bit_needed(&mut rex); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:79
    let r8 = self.r8.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:115
    match &self.rm8 {
      GprMem::Gpr(rm8) => rex.emit_two_op(buf, r8, rm8.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:118
      GprMem::Mem(rm8) => rm8.emit_rex_prefix(rex, r8, buf), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:119
    }

    // Emit opcode.
    buf.put1(0x20); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit ModR/M byte.
    let r8 = self.r8.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:162
    match &self.rm8 {
      GprMem::Gpr(rm8) => emit_modrm(buf, r8, rm8.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:165
      GprMem::Mem(rm8) => emit_modrm_sib_disp(buf, off, r8, rm8, 0, None), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:166
    }
  }

  pub fn visit(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    match &mut self.rm8 {
      GprMem::Gpr(r) => visitor.read_write(r), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:160
      GprMem::Mem(m) => {
        m.registers_mut().iter_mut().for_each(|r| visitor.read(r))
      } // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:161
    }
    visitor.read(self.r8.as_mut()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:154
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl<R: Registers> std::fmt::Display for andb_mr_sxbq<R> {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let rm8 = self.rm8.to_string(Size::Byte); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let r8 = self.r8.to_string(Size::Byte); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andb {r8}, {rm8}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andb_mr_sxbq<R>> for Inst<R> {
  fn from(inst: andb_mr_sxbq<R>) -> Self {
    Self::andb_mr_sxbq(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

/// `andw: MR(rm16[rw], r16) => 0x66 + 0x21 /r [_64b | compat]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[cfg_attr(
  feature = "arbitrary",
  arbitrary(bound = "R: crate::arbitrary_impls::RegistersArbitrary")
)]
pub struct andw_mr<R>
where
  R: Registers,
{
  pub rm16: GprMem<R::ReadWriteGpr, R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
  pub r16: Gpr<R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl<R: Registers> andw_mr<R> {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(
    rm16: GprMem<R::ReadWriteGpr, R::ReadGpr>,
    r16: Gpr<R::ReadGpr>,
  ) -> Self {
    Self { rm16, r16 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, off: &impl KnownOffsetTable) {
    // Emit trap.
    if let GprMem::Mem(rm16) = &self.rm16 {
      if let Some(trap_code) = rm16.trap_code() {
        buf.add_trap(trap_code); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:113
      }
    }

    // Emit legacy prefixes.
    buf.put1(0x66); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:47

    // Emit REX prefix.
    let rex = RexFlags::clear_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:82
    let r16 = self.r16.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:115
    match &self.rm16 {
      GprMem::Gpr(rm16) => rex.emit_two_op(buf, r16, rm16.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:118
      GprMem::Mem(rm16) => rm16.emit_rex_prefix(rex, r16, buf), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:119
    }

    // Emit opcode.
    buf.put1(0x21); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit ModR/M byte.
    let r16 = self.r16.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:162
    match &self.rm16 {
      GprMem::Gpr(rm16) => emit_modrm(buf, r16, rm16.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:165
      GprMem::Mem(rm16) => emit_modrm_sib_disp(buf, off, r16, rm16, 0, None), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:166
    }
  }

  pub fn visit(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    match &mut self.rm16 {
      GprMem::Gpr(r) => visitor.read_write(r), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:160
      GprMem::Mem(m) => {
        m.registers_mut().iter_mut().for_each(|r| visitor.read(r))
      } // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:161
    }
    visitor.read(self.r16.as_mut()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:154
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b, Feature::compat] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl<R: Registers> std::fmt::Display for andw_mr<R> {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let rm16 = self.rm16.to_string(Size::Word); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let r16 = self.r16.to_string(Size::Word); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andw {r16}, {rm16}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andw_mr<R>> for Inst<R> {
  fn from(inst: andw_mr<R>) -> Self {
    Self::andw_mr(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

/// `andl: MR(rm32[rw], r32) => 0x21 /r [_64b | compat]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[cfg_attr(
  feature = "arbitrary",
  arbitrary(bound = "R: crate::arbitrary_impls::RegistersArbitrary")
)]
pub struct andl_mr<R>
where
  R: Registers,
{
  pub rm32: GprMem<R::ReadWriteGpr, R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
  pub r32: Gpr<R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl<R: Registers> andl_mr<R> {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(
    rm32: GprMem<R::ReadWriteGpr, R::ReadGpr>,
    r32: Gpr<R::ReadGpr>,
  ) -> Self {
    Self { rm32, r32 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, off: &impl KnownOffsetTable) {
    // Emit trap.
    if let GprMem::Mem(rm32) = &self.rm32 {
      if let Some(trap_code) = rm32.trap_code() {
        buf.add_trap(trap_code); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:113
      }
    }

    // Emit REX prefix.
    let rex = RexFlags::clear_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:82
    let r32 = self.r32.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:115
    match &self.rm32 {
      GprMem::Gpr(rm32) => rex.emit_two_op(buf, r32, rm32.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:118
      GprMem::Mem(rm32) => rm32.emit_rex_prefix(rex, r32, buf), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:119
    }

    // Emit opcode.
    buf.put1(0x21); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit ModR/M byte.
    let r32 = self.r32.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:162
    match &self.rm32 {
      GprMem::Gpr(rm32) => emit_modrm(buf, r32, rm32.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:165
      GprMem::Mem(rm32) => emit_modrm_sib_disp(buf, off, r32, rm32, 0, None), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:166
    }
  }

  pub fn visit(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    match &mut self.rm32 {
      GprMem::Gpr(r) => visitor.read_write(r), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:160
      GprMem::Mem(m) => {
        m.registers_mut().iter_mut().for_each(|r| visitor.read(r))
      } // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:161
    }
    visitor.read(self.r32.as_mut()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:154
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b, Feature::compat] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl<R: Registers> std::fmt::Display for andl_mr<R> {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let rm32 = self.rm32.to_string(Size::Doubleword); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let r32 = self.r32.to_string(Size::Doubleword); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andl {r32}, {rm32}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andl_mr<R>> for Inst<R> {
  fn from(inst: andl_mr<R>) -> Self {
    Self::andl_mr(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

/// `andq: MR(rm64[rw], r64) => REX.W + 0x21 /r [_64b]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[cfg_attr(
  feature = "arbitrary",
  arbitrary(bound = "R: crate::arbitrary_impls::RegistersArbitrary")
)]
pub struct andq_mr<R>
where
  R: Registers,
{
  pub rm64: GprMem<R::ReadWriteGpr, R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
  pub r64: Gpr<R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl<R: Registers> andq_mr<R> {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(
    rm64: GprMem<R::ReadWriteGpr, R::ReadGpr>,
    r64: Gpr<R::ReadGpr>,
  ) -> Self {
    Self { rm64, r64 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, off: &impl KnownOffsetTable) {
    // Emit trap.
    if let GprMem::Mem(rm64) = &self.rm64 {
      if let Some(trap_code) = rm64.trap_code() {
        buf.add_trap(trap_code); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:113
      }
    }

    // Emit REX prefix.
    let rex = RexFlags::set_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:82
    let r64 = self.r64.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:115
    match &self.rm64 {
      GprMem::Gpr(rm64) => rex.emit_two_op(buf, r64, rm64.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:118
      GprMem::Mem(rm64) => rm64.emit_rex_prefix(rex, r64, buf), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:119
    }

    // Emit opcode.
    buf.put1(0x21); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit ModR/M byte.
    let r64 = self.r64.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:162
    match &self.rm64 {
      GprMem::Gpr(rm64) => emit_modrm(buf, r64, rm64.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:165
      GprMem::Mem(rm64) => emit_modrm_sib_disp(buf, off, r64, rm64, 0, None), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:166
    }
  }

  pub fn visit(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    match &mut self.rm64 {
      GprMem::Gpr(r) => visitor.read_write(r), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:160
      GprMem::Mem(m) => {
        m.registers_mut().iter_mut().for_each(|r| visitor.read(r))
      } // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:161
    }
    visitor.read(self.r64.as_mut()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:154
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl<R: Registers> std::fmt::Display for andq_mr<R> {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let rm64 = self.rm64.to_string(Size::Quadword); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let r64 = self.r64.to_string(Size::Quadword); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andq {r64}, {rm64}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andq_mr<R>> for Inst<R> {
  fn from(inst: andq_mr<R>) -> Self {
    Self::andq_mr(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

/// `andb: RM(r8[rw], rm8) => 0x22 /r [_64b | compat]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[cfg_attr(
  feature = "arbitrary",
  arbitrary(bound = "R: crate::arbitrary_impls::RegistersArbitrary")
)]
pub struct andb_rm<R>
where
  R: Registers,
{
  pub r8: Gpr<R::ReadWriteGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
  pub rm8: GprMem<R::ReadGpr, R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl<R: Registers> andb_rm<R> {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(
    r8: Gpr<R::ReadWriteGpr>,
    rm8: GprMem<R::ReadGpr, R::ReadGpr>,
  ) -> Self {
    Self { r8, rm8 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, off: &impl KnownOffsetTable) {
    // Emit trap.
    if let GprMem::Mem(rm8) = &self.rm8 {
      if let Some(trap_code) = rm8.trap_code() {
        buf.add_trap(trap_code); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:113
      }
    }

    // Emit REX prefix.
    let mut rex = RexFlags::clear_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:77
    self.r8.always_emit_if_8bit_needed(&mut rex); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:79
    self.rm8.always_emit_if_8bit_needed(&mut rex); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:79
    let r8 = self.r8.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:106
    match &self.rm8 {
      GprMem::Gpr(rm8) => rex.emit_two_op(buf, r8, rm8.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:109
      GprMem::Mem(rm8) => rm8.emit_rex_prefix(rex, r8, buf), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:110
    }

    // Emit opcode.
    buf.put1(0x22); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit ModR/M byte.
    let r8 = self.r8.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:153
    match &self.rm8 {
      GprMem::Gpr(rm8) => emit_modrm(buf, r8, rm8.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:156
      GprMem::Mem(rm8) => emit_modrm_sib_disp(buf, off, r8, rm8, 0, None), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:157
    }
  }

  pub fn visit(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    visitor.read_write(self.r8.as_mut()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:154
    match &mut self.rm8 {
      GprMem::Gpr(r) => visitor.read(r), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:160
      GprMem::Mem(m) => {
        m.registers_mut().iter_mut().for_each(|r| visitor.read(r))
      } // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:161
    }
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b, Feature::compat] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl<R: Registers> std::fmt::Display for andb_rm<R> {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let r8 = self.r8.to_string(Size::Byte); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let rm8 = self.rm8.to_string(Size::Byte); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andb {rm8}, {r8}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andb_rm<R>> for Inst<R> {
  fn from(inst: andb_rm<R>) -> Self {
    Self::andb_rm(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

/// `andb: RM_SXBQ(r8[rw], rm8) => REX.W + 0x22 /r [_64b]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[cfg_attr(
  feature = "arbitrary",
  arbitrary(bound = "R: crate::arbitrary_impls::RegistersArbitrary")
)]
pub struct andb_rm_sxbq<R>
where
  R: Registers,
{
  pub r8: Gpr<R::ReadWriteGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
  pub rm8: GprMem<R::ReadGpr, R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl<R: Registers> andb_rm_sxbq<R> {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(
    r8: Gpr<R::ReadWriteGpr>,
    rm8: GprMem<R::ReadGpr, R::ReadGpr>,
  ) -> Self {
    Self { r8, rm8 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, off: &impl KnownOffsetTable) {
    // Emit trap.
    if let GprMem::Mem(rm8) = &self.rm8 {
      if let Some(trap_code) = rm8.trap_code() {
        buf.add_trap(trap_code); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:113
      }
    }

    // Emit REX prefix.
    let mut rex = RexFlags::set_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:77
    self.r8.always_emit_if_8bit_needed(&mut rex); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:79
    self.rm8.always_emit_if_8bit_needed(&mut rex); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:79
    let r8 = self.r8.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:106
    match &self.rm8 {
      GprMem::Gpr(rm8) => rex.emit_two_op(buf, r8, rm8.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:109
      GprMem::Mem(rm8) => rm8.emit_rex_prefix(rex, r8, buf), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:110
    }

    // Emit opcode.
    buf.put1(0x22); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit ModR/M byte.
    let r8 = self.r8.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:153
    match &self.rm8 {
      GprMem::Gpr(rm8) => emit_modrm(buf, r8, rm8.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:156
      GprMem::Mem(rm8) => emit_modrm_sib_disp(buf, off, r8, rm8, 0, None), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:157
    }
  }

  pub fn visit(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    visitor.read_write(self.r8.as_mut()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:154
    match &mut self.rm8 {
      GprMem::Gpr(r) => visitor.read(r), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:160
      GprMem::Mem(m) => {
        m.registers_mut().iter_mut().for_each(|r| visitor.read(r))
      } // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:161
    }
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl<R: Registers> std::fmt::Display for andb_rm_sxbq<R> {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let r8 = self.r8.to_string(Size::Byte); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let rm8 = self.rm8.to_string(Size::Byte); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andb {rm8}, {r8}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andb_rm_sxbq<R>> for Inst<R> {
  fn from(inst: andb_rm_sxbq<R>) -> Self {
    Self::andb_rm_sxbq(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

/// `andw: RM(r16[rw], rm16) => 0x66 + 0x23 /r [_64b | compat]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[cfg_attr(
  feature = "arbitrary",
  arbitrary(bound = "R: crate::arbitrary_impls::RegistersArbitrary")
)]
pub struct andw_rm<R>
where
  R: Registers,
{
  pub r16: Gpr<R::ReadWriteGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
  pub rm16: GprMem<R::ReadGpr, R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl<R: Registers> andw_rm<R> {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(
    r16: Gpr<R::ReadWriteGpr>,
    rm16: GprMem<R::ReadGpr, R::ReadGpr>,
  ) -> Self {
    Self { r16, rm16 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, off: &impl KnownOffsetTable) {
    // Emit trap.
    if let GprMem::Mem(rm16) = &self.rm16 {
      if let Some(trap_code) = rm16.trap_code() {
        buf.add_trap(trap_code); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:113
      }
    }

    // Emit legacy prefixes.
    buf.put1(0x66); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:47

    // Emit REX prefix.
    let rex = RexFlags::clear_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:82
    let r16 = self.r16.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:106
    match &self.rm16 {
      GprMem::Gpr(rm16) => rex.emit_two_op(buf, r16, rm16.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:109
      GprMem::Mem(rm16) => rm16.emit_rex_prefix(rex, r16, buf), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:110
    }

    // Emit opcode.
    buf.put1(0x23); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit ModR/M byte.
    let r16 = self.r16.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:153
    match &self.rm16 {
      GprMem::Gpr(rm16) => emit_modrm(buf, r16, rm16.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:156
      GprMem::Mem(rm16) => emit_modrm_sib_disp(buf, off, r16, rm16, 0, None), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:157
    }
  }

  pub fn visit(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    visitor.read_write(self.r16.as_mut()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:154
    match &mut self.rm16 {
      GprMem::Gpr(r) => visitor.read(r), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:160
      GprMem::Mem(m) => {
        m.registers_mut().iter_mut().for_each(|r| visitor.read(r))
      } // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:161
    }
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b, Feature::compat] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl<R: Registers> std::fmt::Display for andw_rm<R> {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let r16 = self.r16.to_string(Size::Word); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let rm16 = self.rm16.to_string(Size::Word); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andw {rm16}, {r16}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andw_rm<R>> for Inst<R> {
  fn from(inst: andw_rm<R>) -> Self {
    Self::andw_rm(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

/// `andl: RM(r32[rw], rm32) => 0x23 /r [_64b | compat]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[cfg_attr(
  feature = "arbitrary",
  arbitrary(bound = "R: crate::arbitrary_impls::RegistersArbitrary")
)]
pub struct andl_rm<R>
where
  R: Registers,
{
  pub r32: Gpr<R::ReadWriteGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
  pub rm32: GprMem<R::ReadGpr, R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl<R: Registers> andl_rm<R> {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(
    r32: Gpr<R::ReadWriteGpr>,
    rm32: GprMem<R::ReadGpr, R::ReadGpr>,
  ) -> Self {
    Self { r32, rm32 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, off: &impl KnownOffsetTable) {
    // Emit trap.
    if let GprMem::Mem(rm32) = &self.rm32 {
      if let Some(trap_code) = rm32.trap_code() {
        buf.add_trap(trap_code); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:113
      }
    }

    // Emit REX prefix.
    let rex = RexFlags::clear_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:82
    let r32 = self.r32.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:106
    match &self.rm32 {
      GprMem::Gpr(rm32) => rex.emit_two_op(buf, r32, rm32.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:109
      GprMem::Mem(rm32) => rm32.emit_rex_prefix(rex, r32, buf), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:110
    }

    // Emit opcode.
    buf.put1(0x23); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit ModR/M byte.
    let r32 = self.r32.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:153
    match &self.rm32 {
      GprMem::Gpr(rm32) => emit_modrm(buf, r32, rm32.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:156
      GprMem::Mem(rm32) => emit_modrm_sib_disp(buf, off, r32, rm32, 0, None), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:157
    }
  }

  pub fn visit(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    visitor.read_write(self.r32.as_mut()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:154
    match &mut self.rm32 {
      GprMem::Gpr(r) => visitor.read(r), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:160
      GprMem::Mem(m) => {
        m.registers_mut().iter_mut().for_each(|r| visitor.read(r))
      } // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:161
    }
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b, Feature::compat] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl<R: Registers> std::fmt::Display for andl_rm<R> {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let r32 = self.r32.to_string(Size::Doubleword); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let rm32 = self.rm32.to_string(Size::Doubleword); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andl {rm32}, {r32}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andl_rm<R>> for Inst<R> {
  fn from(inst: andl_rm<R>) -> Self {
    Self::andl_rm(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

/// `andq: RM(r64[rw], rm64) => REX.W + 0x23 /r [_64b]`
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[cfg_attr(
  feature = "arbitrary",
  arbitrary(bound = "R: crate::arbitrary_impls::RegistersArbitrary")
)]
pub struct andq_rm<R>
where
  R: Registers,
{
  pub r64: Gpr<R::ReadWriteGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
  pub rm64: GprMem<R::ReadGpr, R::ReadGpr>, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:24
}
impl<R: Registers> andq_rm<R> {
  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:87
  pub fn new(
    r64: Gpr<R::ReadWriteGpr>,
    rm64: GprMem<R::ReadGpr, R::ReadGpr>,
  ) -> Self {
    Self { r64, rm64 }
  }

  pub fn encode(&self, buf: &mut impl CodeSink, off: &impl KnownOffsetTable) {
    // Emit trap.
    if let GprMem::Mem(rm64) = &self.rm64 {
      if let Some(trap_code) = rm64.trap_code() {
        buf.add_trap(trap_code); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:113
      }
    }

    // Emit REX prefix.
    let rex = RexFlags::set_w(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:82
    let r64 = self.r64.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:106
    match &self.rm64 {
      GprMem::Gpr(rm64) => rex.emit_two_op(buf, r64, rm64.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:109
      GprMem::Mem(rm64) => rm64.emit_rex_prefix(rex, r64, buf), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:110
    }

    // Emit opcode.
    buf.put1(0x23); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:67

    // Emit ModR/M byte.
    let r64 = self.r64.enc(); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:153
    match &self.rm64 {
      GprMem::Gpr(rm64) => emit_modrm(buf, r64, rm64.enc()), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:156
      GprMem::Mem(rm64) => emit_modrm_sib_disp(buf, off, r64, rm64, 0, None), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/format.rs:157
    }
  }

  pub fn visit(&mut self, visitor: &mut impl RegisterVisitor<R>) {
    visitor.read_write(self.r64.as_mut()); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:154
    match &mut self.rm64 {
      GprMem::Gpr(r) => visitor.read(r), // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:160
      GprMem::Mem(m) => {
        m.registers_mut().iter_mut().for_each(|r| visitor.read(r))
      } // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:161
    }
  }

  #[must_use] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:176
  pub fn features(&self) -> Vec<Feature> {
    vec![Feature::_64b] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:184
  }
}
impl<R: Registers> std::fmt::Display for andq_rm<R> {
  fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    let r64 = self.r64.to_string(Size::Quadword); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    let rm64 = self.rm64.to_string(Size::Quadword); // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:200
    write!(f, "andq {rm64}, {r64}") // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:204
  }
}
impl<R: Registers> From<andq_rm<R>> for Inst<R> {
  fn from(inst: andq_rm<R>) -> Self {
    Self::andq_rm(inst) // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/inst.rs:219
  }
}

#[doc(hidden)]
// /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/features.rs:12
#[derive(Clone, Debug)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[derive(Copy, PartialEq)] // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/features.rs:14
pub enum Feature {
  _64b, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/features.rs:18
  compat, // /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-assembler-x64-meta-0.117.2/src/generate/features.rs:18
}
