#include<stdio.h>/*aniki*/
/*2002*/#include<stdlib.h>/*beruberu*/
FILE*i,*o;int/**/m[]={0x6c726468,+0x69766f6d,
0x5453494c,0x68697661,0x68727473,-65281,0x66727473
,0x62770030,0x73647561,0x46464952,0x20495641},s,t,z,n,h
,l,g;typedef void/**/v;v k(int p){fseek(i,p,1);}v K(int p){
fseek(o,p,0);}v r(v*d){fread(d,s,1,i);}v w(v*d){fwrite(d,s,1,o
);}int x();int y(int d){int c;r(&g);z|=(g==m[0])?1:(g==m[1])?8:0
;for(c=0;d>c&&(t=x());c+=t);return d;}int x(){v*c;r(&g);r(&n);if(g
==m[2])return y(n);if((z&1)&&g==m[3]){z|=2;k(n);}else if((z&2)&&m[ 4
]==g){r(&g);if(g==m[8])z|=4;k(n-04);}else if(((z&4 )&&g==m[6])||((z &
24)&&(g&m[5])==m[7])){if(!(g&1)){if( !(z& 32)){s=8 ;w("data...");z
|=32;}l+=n;}else{s=20;w("RIFF#a-eWAVEfmt !") ;z|=16;h=n;}s=n;if((c
=alloca(s))){r(c);w(c);}else {n =-8; }s= 4;} else{k(n);}if((
n+=8)&1){fgetc(i);n++; }/*' ' '"^ /"' */ return+n;}int main(
int A,char**a){h=l=z=- 0; if(2 < A ){ i=fopen (a[1 ]
,"rb");if(i){if((o=fopen (a[2] ,"w" "b+"))) {s= 4
;r(&g);r(&n);if(g==m[9] ){r(& g);; if(g==m[+
10])for(;!(z&32)&&x();); }if( (z& 32)){K(16)
;w(&h);K(h+24);w(&l);l+= h+20;K(4);w
(&l);};fclose(o);} fclose(i);}}
return/**/puts((32 & z)?"success"
:(A>2 ) ?"fail": "" "aoi"
"\40" /* ^*/ "<in>" /* !*/
"\40" /* ,=" */
"<" "ou" /*^
` `=x*/ "t>"
);{;}}
|