#line 1 "stdarg.c"
#line 1 "/tmp/local6/lib/lcc/4.1.beta.6/include/stdarg.h"





typedef char *__va_list;

typedef __va_list va_list;


#line 12 "/tmp/local6/lib/lcc/4.1.beta.6/include/stdarg.h"

#line 14 "/tmp/local6/lib/lcc/4.1.beta.6/include/stdarg.h"

#line 17 "/tmp/local6/lib/lcc/4.1.beta.6/include/stdarg.h"



#line 22 "/tmp/local6/lib/lcc/4.1.beta.6/include/stdarg.h"

#line 2 "stdarg.c"

struct node { int a[4]; } x = {1,2,3,4};

print(char *fmt, ...);

main() {
	print("test 1\n");
	print("test %s\n", "2");
	print("test %d%c", 3, '\n');
	print("%s%s %w%c", "te", "st", 4, '\n');
	print("%s%s %f%c", "te", "st", 5.0, '\n');
	print("%b %b %b %b %b %b\n", x, x, x, x, x, x);
	return 0;
}

print(char *fmt, ...) {
	va_list ap;

((void)((ap) = (sizeof(fmt)<4 ? (char *)((int *)&(fmt)+1) : (char *)(&(fmt)+1))));
	for (; *fmt; fmt++)
		if (*fmt == '%')
			switch (*++fmt) {
			case 'b': {
				struct node x =(sizeof(struct node)>8 ? **(struct node **)(&(ap += 4)[-4]) :( sizeof(struct node)==1 ? *(struct node *)(&(ap += 4)[-1]) : sizeof(struct node)==2 ? *(struct node *)(&(ap += 4)[-2]) :(*(struct node *)(&(ap += ((sizeof(struct node)+ 3U)&~ 3U))[-(int)((sizeof(struct node)+ 3U)&~ 3U)]))));
				printf("{%d %d %d %d}", x.a[0], x.a[1], x.a[2], x.a[3]);
				break;
				}
			case 'c':
				printf("%c",(sizeof(char)>8 ? **(char **)(&(ap += 4)[-4]) :( sizeof(char)==1 ? *(char *)(&(ap += 4)[-1]) : sizeof(char)==2 ? *(char *)(&(ap += 4)[-2]) :(*(char *)(&(ap += ((sizeof(char)+ 3U)&~ 3U))[-(int)((sizeof(char)+ 3U)&~ 3U)])))));
				break;
			case 'd':
				printf("%d",(sizeof(int)>8 ? **(int **)(&(ap += 4)[-4]) :( sizeof(int)==1 ? *(int *)(&(ap += 4)[-1]) : sizeof(int)==2 ? *(int *)(&(ap += 4)[-2]) :(*(int *)(&(ap += ((sizeof(int)+ 3U)&~ 3U))[-(int)((sizeof(int)+ 3U)&~ 3U)])))));
				break;
			case 'w':
				printf("%x",(sizeof(short)>8 ? **(short **)(&(ap += 4)[-4]) :( sizeof(short)==1 ? *(short *)(&(ap += 4)[-1]) : sizeof(short)==2 ? *(short *)(&(ap += 4)[-2]) :(*(short *)(&(ap += ((sizeof(short)+ 3U)&~ 3U))[-(int)((sizeof(short)+ 3U)&~ 3U)])))));
				break;
			case 's':
				printf("%s",(sizeof(char *)>8 ? **(char * **)(&(ap += 4)[-4]) :( sizeof(char *)==1 ? *(char * *)(&(ap += 4)[-1]) : sizeof(char *)==2 ? *(char * *)(&(ap += 4)[-2]) :(*(char * *)(&(ap += ((sizeof(char *)+ 3U)&~ 3U))[-(int)((sizeof(char *)+ 3U)&~ 3U)])))));
				break;
			case 'f':
				printf("%f",(sizeof(double)>8 ? **(double **)(&(ap += 4)[-4]) :( sizeof(double)==1 ? *(double *)(&(ap += 4)[-1]) : sizeof(double)==2 ? *(double *)(&(ap += 4)[-2]) :(*(double *)(&(ap += ((sizeof(double)+ 3U)&~ 3U))[-(int)((sizeof(double)+ 3U)&~ 3U)])))));
				break;
			default:
				printf("%c", *fmt);
				break;
			}
		 else
			printf("%c", *fmt);
((void)0);
}
