there're two \0 bytes to be added . second one added to start right before base58 op.
There aren't. The reason that code adds 0x00 twice is because the second time it calls back to the RIPEMD-160 output, instead of calling back to the RIPEMD-160 output with the 0x00 already prepended.
Take the public key, SHA256 it, RIPEMD-160 it, then add 0x00 to the start. Call this
pubhash_prefix. SHA256 this twice, take the first 4 bytes, and then append these 4 bytes to
pubhash_prefix. Convert to base58 and you have your address.