fn find_last_inst(i: usize, asm: &Vec<ASMInst>) -> Option<usize> {
        if i == 0 {
            None
        } else {
            let mut cur = i;
            loop {
                if !asm[cur].is_symbol {
                    return Some(cur);
                }

                if cur == 0 {
                    return None;
                } else {
                    cur -= 1;
                }
            }
        }
    }
/// finds the last instruction that appears on or before the given index
/// (skip non-instruction assembly)
finds the last instruction that appears on or before the given index
(skip non-instruction assembly)
finds the last instruction that appears on or before the given index ( skip non - instruction assembly )
fn find_last_inst(i: usize, asm: &Vec<ASMInst>) -> Option<usize> {
        if i == 0 {
            None
        } else {
            let mut cur = i;
            loop {
                if !asm[cur].is_symbol {
                    return Some(cur);
                }
                if cur == 0 {
                    return None;
                } else {
                    cur -= 1;
                }
            }
        }
    }
fn find_last_inst ( i : usize , asm : & Vec < ASMInst > ) -> Option < usize > { if i == 0 { None } else { let mut cur = i ; loop { if ! asm [ cur ] . is_symbol { return Some ( cur ) ; } if cur == 0 { return None ; } else { cur -= 1 ; } } } }
finds the last instruction that appears on or before the given index
(skip non-instruction assembly)
finds the last instruction that appears on or before the given index ( skip non - instruction assembly )
i
usize
asm
&Vec<ASMInst>
i
usize
asm
&Vec<ASMInst>