#include <stdio.h>
int main(void) {
void* a;
void* b;
void* c;
a=b=c=NULL;
__asm__ volatile (
"mov %%esp,%%eax\n\t"
"push %%eax\n\t"
"mov %%esp,%%ebx\n\t"
"pop %%eax\n\t"
"mov %%esp,%%ecx\n\t"
"mov %%eax,%0\n\t"
"mov %%ebx,%1\n\t"
"mov %%ecx,%2\n\t"
: "=m"(a),"=m"(b),"=m"(c)
::"%eax","%ebx","%ecx");
a=b=c=NULL;
__asm__ volatile (
"mov %%esp,%0\n\t"
"push %%eax\n\t"
"mov %%esp,%1\n\t"
"pop %%eax\n\t"
"mov %%esp,%2\n\t"
: "=m"(a),"=m"(b),"=m"(c)
::);
a=b=NULL;
__asm__ volatile (
"mov %%esp,%0\n\t"
"push %%eax\n\t"
"lea %1,%%ebx\n\t"
"pop %%eax\n\t"
"mov %%ebx,%0\n\t"
: "=m"(a),"=m"(b)
::"%ebx");
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7Cgl2b2lkKiBhOwoJdm9pZCogYjsKCXZvaWQqIGM7CglhPWI9Yz1OVUxMOwoJX19hc21fXyB2b2xhdGlsZSAoCgkJIm1vdiAlJWVzcCwlJWVheFxuXHQiCgkJInB1c2ggJSVlYXhcblx0IgoJCSJtb3YgJSVlc3AsJSVlYnhcblx0IgoJCSJwb3AgJSVlYXhcblx0IgoJCSJtb3YgJSVlc3AsJSVlY3hcblx0IgoJCSJtb3YgJSVlYXgsJTBcblx0IgoJCSJtb3YgJSVlYngsJTFcblx0IgoJCSJtb3YgJSVlY3gsJTJcblx0IgoJOiAiPW0iKGEpLCI9bSIoYiksIj1tIihjKQoJOjoiJWVheCIsIiVlYngiLCIlZWN4Iik7CglwcmludGYoIiVwXG4lcFxuJXBcbiIsYSxiLGMpOwoJcHV0Y2hhcignXG4nKTsKCWE9Yj1jPU5VTEw7CglfX2FzbV9fIHZvbGF0aWxlICgKCQkibW92ICUlZXNwLCUwXG5cdCIKCQkicHVzaCAl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