Obviously this is not C, it's my language. Stripping no-ops gives us this:
intf(intx_1)inti,foóßar=;int*arr=x23d3f44e>>xa;for(i=']';%foóßar++,*(arr+i/1234)+=']';-101)putchar(&
The &
ends the program.
All alphabetical characters push their codepage value to the stack. Let's replace every run of alphabetical characters we don't care about with Z.
Z(Z_1)Z,ZóßZ=;Z*Z=Z23Z3Z44Z>>Z;Z(Z=']';%ZóßZ++,*(Z+Z/1234)+=']';-101)Z(&
(
starts a loop and )
ends it. The loop continues while the top of stack is nonzero. Pushing an ASCII character and then performing _1
always sets the top of stack to zero, so we can completely ignore the first loop.
Pushng Z
and then dividing by 1234
also always results in zero, so we can ignore the inner loop (and all the code inside it) too.
The last loop is only an open-loop and immediately exits, so we can kill that too. Our code thus becomes:
Z,ZóßZ=;Z*Z=Z23Z3Z44Z>>Z;Z(=']';%ZóßZ++,*+=']';-101)Z&
;
means 'pop'. If we take out any code that pushes to the stack and then is immediately popped, the code becomes:
Z,óßZ*Z=Z23Z3Z44Z>>Z(=']%ZóßZ++,*+=']-101)Z&
- The first comma swaps the top two stack values, but there's only one, so we can remove it.
- The
Z23Z3Z44Z>>Z
just pushes a ton of Z
s to the stack, which are never used, so we might as well just be pushing Z
.
- Most of the mathematical operations are never used, so let's replace those with
Z
too.
'
(read string) is useless because we never provide any input.
Our code golfs down to:
ZóßZ(Z]%ZóßZ]-101)
Okay, so now we reveal what's really going on.
ó
is equivalent to ].[
(pull register to stack, increment, push to register).
ß
is equivalent to @10
(print ASCII 0x10).
Since we pull the register every time we actually care to interact with memory, we can completely ignore everything non-register-related that interacts with the stack when the register isn't the top of stack:
óß(]%óß]-101)&
So, the program increments the register, prints a space, opens a loop, pulls the register, prints it, prints a space, pulls the register, subtracts 101, and loops while register - 101
is nonzero. Then it exits.
:)