int f(int x)
{
static int b = 0; static int s = 0;
int a = 0, t;
if (!s) {
a = b; b = x;
} else {
a = x; t = b;
do {
a ^= b;
b = (a^b) & b;
b <<= 1;
} while (b);
b = t;
}
s = (s+1) % 2;
return a;
}
int g(int i, int *j)
{
*j = i;
i = (int) putchar;
if (*j == (48 << 1))
__asm volatile (
"movl 8(%ebp),%eax;"
"leave;"
"ret"
);
return (int) puts;
}
void h(int i)
{
int b;
q = (void(*)()) g(i++[data],&b);
for (f(b);*(data+i)!=b;++i,f(b))
q(f(i[data])%0xff);
}
void sh(int s)
{
if (s == 010)
((void(*)())g(s,&s))("F");
longjmp(p,s);
}
int main(void)
{
int base, addr = 0xffffffff, offs = 16;
int a = 11, b = 32, i = 25;
int s = 8, t = 1, u = 4;
((void(*)()) data)(&a,&b);
((void(*)()) data)(&b,&t);
((void(*)()) data)(&t,&s);
addr ^= a;
a ^= addr;
addr ^= a;
base = ((int(*)())data+addr)();
if (a == -1)
goto over;
puts("A");
int f(int x)
{
static int b = 0; static int s = 0;
int a = 0, t;
if (!s) {
a = b; b = x;
} else {
a = x; t = b;
do {
a ^= b;
b = (a^b) & b;
b <<= 1;
} while (b);
b = t;
}
s = (s+1) % 2;
return a;
}
int g(int i, int *j)
{
*j = i;
i = (int) putchar;
if (*j == (48 << 1))
__asm volatile (
"movl 8(%ebp),%eax;"
"leave;"
"ret"
);
return (int) puts;
}
void h(int i)
{
int b;
q = (void(*)()) g(i++[data],&b);
for (f(b);*(data+i)!=b;++i,f(b))
q(f(i[data])%0xff);
}
void sh(int s)
{
if (s == 010)
((void(*)())g(s,&s))("F");
longjmp(p,s);
}
int main(void)
{
int base, addr = 0xffffffff, offs = 16;
int a = 11, b = 32, i = 25;
int s = 8, t = 1, u = 4;
((void(*)()) data)(&a,&b);
((void(*)()) data)(&b,&t);
((void(*)()) data)(&t,&s);
addr ^= a;
a ^= addr;
addr ^= a;
base = ((int(*)())data+addr)();
if (a == -1)
goto over;
puts("A");
int f(int x)
{
static int b = 0; static int s = 0;
int a = 0, t;
if (!s) {
a = b; b = x;
} else {
a = x; t = b;
do {
a ^= b;
b = (a^b) & b;
b <<= 1;
} while (b);
b = t;
}
s = (s+1) % 2;
return a;
}
int g(int i, int *j)
{
*j = i;
i = (int) putchar;
if (*j == (48 << 1))
__asm volatile (
"movl 8(%ebp),%eax;"
"leave;"
"ret"
);
return (int) puts;
}
void h(int i)
{
int b;
q = (void(*)()) g(i++[data],&b);
for (f(b);*(data+i)!=b;++i,f(b))
q(f(i[data])%0xff);
}
void sh(int s)
{
if (s == 010)
((void(*)())g(s,&s))("F");
longjmp(p,s);
}
int main(void)
{
int base, addr = 0xffffffff, offs = 16;
int a = 11, b = 32, i = 25;
int s = 8, t = 1, u = 4;
((void(*)()) data)(&a,&b);
((void(*)()) data)(&b,&t);
((void(*)()) data)(&t,&s);
addr ^= a;
a ^= addr;
addr ^= a;
base = ((int(*)())data+addr)();
if (a == -1)
goto over;
puts("A");
>>21
Well, that's prove that we're superior to /g/ as we will not compile and run suspiciously looking code(and I'm not going to setup new virtual machine just because I got dubs.)
Only /g/ can be so stupid. And /b/, speaking of which /polecat kebabs/.
>>30
But you're still not clever enough to figure it out
Name:
Anonymous2012-01-11 13:22
>>32,33
Okay listen you fucking retard, read this and understand it.
__asm is a reserved identifier so the code is not C
The parts of the code that might be C, is full of undefined behavior, so there is nothing to figure out, what it outputs is undefined.
There you go fucknut now fuck off back to /g/ you stupid piece of shit.
Name:
Anonymous2012-01-11 13:23
>>34
>__asm is a reserved identifier so the code is not C
And exactly what is your point? Nowhere did OP claim that it was C.
Name:
Anonymous2012-01-11 13:24
>>34
Dude, no where does anyone claim that it is C. OP asked for the program flow. It certainly does compile and run. You're just being an ignorant dick.
Name:
Anonymous2012-01-11 13:24
>>35
That's implicit by asking us to compile it with a C compiler, are you mentally challenged?
>>37
GCC compiles much more than C, you moron. GCC compiles both C and C++, and it also assembles and links. It even supports Java for fuck sake.
GCC is a compiler suite, not a C compiler. You are a fucking idiot and should kill yourself
Name:
Anonymous2012-01-11 13:27
>>37
GCC isn't a C compiler, it is the GNU compiler suite. It supports everything from Ada to Fortran to Java. It is also a assembler, if you haven't noticed.