add equivalent C code.