You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
k/x.c

13 lines
1013 B

#include"a.h" // ngn/k, (c) 2019-2022 ngn, GNU AGPLv3 - https://codeberg.org/ngn/k/raw/branch/master/LICENSE
S A2 f;A1(ser,x(f(x,oC)))S A ff(Lv,Ay)_(cts(y,(V*)&v,8))S A2(fA,/*01*/y=ff(xn,y);i(xn|!xn,y=f(xa,y))y)
S A2(f,/*01*/y=apc(y,xt);XmMA(fA(x,y))XS(y=ff(xn,y);i(xn,y=f(as(xi),y))y)Xs(Lv=xv;Qs=qs(&v);In=Sn(s)+1;y=apc(y,n);cts(y,s,n))XP(ff(x,y))XU(Q(xw==4);fA(x,apc(y,(xtr?xE:xv)<<3|xk)))
In=8*xtT;cts(y,xV-n,n+xn*xW))
#define h(n) ({P(p-s<n,ed0());C*r=s;s+=n;r;})
#define h1 (*(C*)h(1))
#define h8 (*(L*)h(8))
S A0 g;S C*s,*p;A1(des,XC(s=xV;p=s+xn;x(g()))ed1(x))S A0(gA,Ln=h8;P(!in(n,1ll<<45),ed0())Ax=aA0(n);i(n|!n,xq(Nx(g())))P(!n,rs0(x))x)
S A0(g,Ct=h1;P(!in(t,tn),ed0())P(t==tA,gA())P(t==tm||t==tM,Ax=N(gA());P(!xtA||xn-2||_t(xx)>tM||_t(xy)>tM||_N(xx)-_N(xy),ed1(x))AT(t,mut(x)))
P(t==tS,Ln=h8;P(!in(n,1ll<<45),ed0())Ax=oS;i(n,xq(Nx(g())))x)P(t==ts,Nn=h1;sym(h(n)))P(TP(t),h8)P(TU(t),Cc=h1;Ax=N(gA());AT(t,AK(c&7,t==tr?AW(c>>3,x):AV(c>>3,x))))
Ln=t<tm?h8:1;P(!in(n,1ll<<45),ed0())aV(t,n,h(n*TW[t])))