Consider a slightly modified variant of the Gimli SP-box:
function spbox(s) {
x = s[0];
y = s[1];
z = s[2];
X = x ^ (z << 1) ^ ((x ^ (y | ~z)) << 1);
Y = y ^ x ^ ((y ^ (x | z)) << 1);
Z = z ^ y ^ ((z ^ (x & y)) << 1);
return [Z, Y, X]
}
Here s is an array of three $32$-bit words, ^ is the bitwise XOR, | is the bitwise OR, & is the bitwise AND, ~ is the bitwise NOT, << is the left non-cyclic shift modulo $2^{32}$:
~11000000000000000000000000000000 = 00111111111111111111111111111111,
11000000000000000000000000000000 << 1 = 10000000000000000000000000000000.
What is the inverse function of spbox (in the C-like pseudocode)?