@triton.jit
def _soft_threshold(a0, a1, a2, a3):
    x1, x2, x3, x4, x5, x6 = tl.abs(a0) > tl.abs(a1), tl.abs(a0) > tl.abs(a2
        ), tl.abs(a0) > tl.abs(a3), tl.abs(a1) > tl.abs(a2), tl.abs(a1
        ) > tl.abs(a3), tl.abs(a2) > tl.abs(a3)
    m0, m1, m2, m3 = (x2 & x3 | x1 & x2 | x1 & x3, ~x1 & x5 | x4 & x5 | ~x1 &
        x4, ~x2 & ~x4 | ~x2 & x6 | ~x4 & x6, ~x3 & ~x5 | ~x3 & ~x6 | ~x5 & ~x6)
    threshold = tl.minimum(tl.maximum(tl.minimum(tl.abs(a0), tl.abs(a1)),
        tl.minimum(tl.abs(a2), tl.abs(a3))), tl.minimum(tl.maximum(tl.abs(
        a0), tl.abs(a1)), tl.maximum(tl.abs(a2), tl.abs(a3))))
    s0 = tl.where(a0 > 0, a0 - threshold, a0 + threshold)
    s1 = tl.where(a1 > 0, a1 - threshold, a1 + threshold)
    s2 = tl.where(a2 > 0, a2 - threshold, a2 + threshold)
    s3 = tl.where(a3 > 0, a3 - threshold, a3 + threshold)
    return s0, s1, s2, s3, m0, m1, m2, m3
