Fanuc regains earning muscle but grapples with investment burden