use core::arch::asm;
#[cfg_attr(feature="__devmode__", inline(never))]
#[cfg_attr(not(feature="__devmode__"), inline(always))]
pub fn shr3(state: u32) -> u32 {
let mut ab = state as u16;
let mut cd = (state >> 16) as u16;
unsafe {
asm!(
"mov {r0_save}, r0", "ldi {fac}, 32",
"movw {tab:l}:{tab:h}, {ab:l}:{ab:h}", "mov {tcd:l}, {cd:l}", "mul {tcd:l}, {fac}", "mov {tcd:l}, r0", "mul {tab:h}, {fac}", "mov {tab:h}, r0", "or {tcd:l}, r1", "mul {tab:l}, {fac}", "or {tab:h}, r1", "eor {ab:h}, r0", "eor {cd:l}, {tab:h}", "eor {cd:h}, {tcd:l}",
"movw {tcd:l}:{tcd:h}, {cd:l}:{cd:h}", "lsr {tcd:h}", "ror {tcd:l}", "eor {ab:l}, {tcd:l}", "eor {ab:h}, {tcd:h}",
"movw {tab:l}:{tab:h}, {ab:l}:{ab:h}", "movw {tcd:l}:{tcd:h}, {cd:l}:{cd:h}", "mul {tcd:h}, {fac}", "mov {tcd:h}, r0", "mul {tcd:l}, {fac}", "mov {tcd:l}, r0", "or {tcd:h}, r1", "mul {tab:h}, {fac}", "mov {tab:h}, r0", "or {tcd:l}, r1", "mul {tab:l}, {fac}", "or {tab:h}, r1", "eor {ab:l}, r0", "eor {ab:h}, {tab:h}", "eor {cd:l}, {tcd:l}", "eor {cd:h}, {tcd:h}",
"clr r1", "mov r0, {r0_save}",
ab = inout(reg_pair) ab, cd = inout(reg_pair) cd, tab = out(reg_pair) _, tcd = out(reg_pair) _, fac = out(reg_upper) _, r0_save = out(reg) _,
options(pure, nomem, nostack), );
}
(ab as u32) | ((cd as u32) << 16)
}