stack.ll: Correct return types for C functions.

int is 32 bits long on both 32 and 64 bit systems.

long is 32 bits long on 32 bit systems and 64 bits
long on 64 bit systems. To stay on the safe side,
we use 32 bits here to stay compatible with both.

size_t is (at least?) 16 bits long.

Also use signext/zeroext where appropriate.