That's odd. I can't find the error, but this runs fine for me. As far as I can tell, the code is identical, and I have tested in "baseline" and "baselineConstrained":

fragmentProgramCode = tinted ?

"tex ft1, v1, fs0 <???> \n" + // sample texture 0

"mov ft3, fc0 \n" +

"sub ft2.x, ft1.w, ft3.x \n" + // smooth step

"sub ft2.y, ft3.y, ft3.x \n" +

"div ft2.x, ft2.x, ft2.y \n" +

"sat ft2.x, ft2.x \n" +

"add ft2.y, ft2.x, ft2.x \n" +

"sub ft2.y, ft3.z, ft2.y \n" +

"mul ft2.x, ft2.x, ft2.x \n" +

"mul ft2.x, ft2.y, ft2.x \n" +

"sub ft4.w, ft2.x, ft3.w \n" + // kill texture if under threshold

"kil ft4.w \n" +

"rcp ft2.w, ft3.w\n" + // Invert the threshold, from 0.5 to 2.0 or similar

"mul ft4.w, ft4.w, ft2.w\n" + // stretch the diminished value to the span 0-1 again

"mul ft2, v0, ft4.w\n" +

"mov oc, ft2 \n"

:

"tex ft1, v1, fs0 <???> \n" + // sample texture 0

"mov ft3, fc0 \n" +

"mov ft5, fc1 \n" +

"sub ft2.x, ft1.w, ft3.x \n" + // smooth step

"sub ft2.y, ft3.y, ft3.x \n" +

"div ft2.x, ft2.x, ft2.y \n" +

"sat ft2.x, ft2.x \n" +

"add ft2.y, ft2.x, ft2.x \n" +

"sub ft2.y, ft3.z, ft2.y \n" +

"mul ft2.x, ft2.x, ft2.x \n" +

"mul ft2.x, ft2.y, ft2.x \n" +

"sub ft4.w, ft2.x, ft3.w \n" + // kill texture if under threshold

"kil ft4.w \n" + // ft4.w holds a diminished value

"rcp ft2.w, ft3.w\n" + // Invert the threshold, from 0.5 to 2.0 or similar

"mul ft4.w, ft4.w, ft2.w\n" + // stretch the diminished value to the span 0-1 again

"mul ft5, ft5, ft4.w\n" +

"mov oc, ft5 \n" ;