San Francisco Frontiers - Stocks gain while dollar retreats as US labor market cools