Intel’s rocky ties with TSMC, strained after Pat Gelsinger’s “rude” Taiwan remarks and the loss of a key wafer discount, have left the chipmaker battling billions in foundry losses, mounting competition and leadership changes even as its stock rallies on fresh investment and government interest.