emit static local variables after function definition