Unfortunately, you are duplicated work. This CPU miner supports VIA padlock:
https://github.com/jgarzik/cpuminerThe main client does not need any CPU mining tweaks. In fact, we discuss from time-to-time how to hide / disable / remove CPU mining from the main bitcoin client.