Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Loader.c
- r, a = (0, 0)
- def P(y, x):
- return (y - ~y) << x
- def Z(x):
- global r
- if x % 2 == 1:
- r = 0
- else:
- r = 1 + Z(x / 2)
- return r
- def L(x):
- return x / 2 >> Z(x)
- def S(v, y, c, t):
- f = L(t)
- x = r
- if f != 2:
- if f > 2:
- if f != v:
- return t - (1 if f > v else 0) * c
- else:
- y
- else:
- w = S(v, y, c, L(x))
- t = S(4, 13, -4, y)
- return P(f, P(w, S(v+2, t, c, Z(x))))
- else:
- return A(S(v, y, c, L(x)), S(v, y, c, Z(x)))
- def A(y, x):
- global r
- if L(y) != 1:
- return 5 << P(y, x)
- else:
- return S(4, x, 4, Z(r))
- def D(x):
- global r, a
- f, d = (0, 0)
- c = 0
- t = 7
- u = 14
- if x != 0:
- D(x-1)
- x /= 2
- while x % 2:
- d = L(L(D(x)))
- f, x = L(r), L(r)
- if c - r == 0:
- if L(u) == 0:
- if L(r) == f:
- x /= 2
- if x % 2 == 1:
- u = S(4, d, 4, r)
- t = A(t, d)
- x /= 2
- if (f / 2) & (x % 2) != 0:
- c = P(d, c)
- t = S(4, 13, -4, t)
- y = S(4, 13, -4, u)
- x /= 2
- if c != 0 and x % 2 == 1:
- x /= 2
- if ~u&2 != 0 or x%2 != 0:
- u = 1 << P(L(c), u)
- t = P(u, P(L(c), t))
- else:
- t = P(0, P(L(c), t))
- x /= 2
- if u / 2 != 0 and x % 2 != 0:
- c = P(t, c)
- u = S(4, 13, -4, t)
- t = 9
- if x != 0:
- D(x-1)
- x /= 2
- a = P(P(t, P(u, P(x, c))), a)
- return a
- def main():
- D(D(D(D(D(99)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement