code: func removeDuplicates(prog *Prog) {
  	count := map[*Decl]int{}
  	for _, d := range prog.Decls {
  		count[d]++
  	}
  	var out []*Decl
  	for _, d := range prog.Decls {
  		count[d]--
  		if count[d] == 0 {
  			out = append(out, d)
  		}
  	}
  	prog.Decls = out
  }
docs: // removeDuplicates drops the duplicated declarations
  // caused by forward decls from prog.
  // It keeps the _last_ of each given declaration,
  // assuming that's the complete one.
  // This heuristic tends to preserve something like
  // source order.
  // It would be defeated by someone writing a "forward"
  // declaration following the real definition.