# Path: native.py
# DIGEST_INDEX = {}
# HEADERS = {'form': '\xe5\xa4\xa9\x00', 'normal': '\xe7\xa5\x9e\x00'}
# def _write(b):
# def _write_ref(node, t):
# def _encode_int(n):
# def _encode_float(f):
# def _encode_str(s):
# def _serialize_node(node, t):
# def _inspect_node(node, t):
# def inspect(module):
# def serialize(module):
#     def write_header():
# 
# Path: types_builtin.py
# def app_map(data, appTs):
#     apps = {}
#     for tv, at in ezip(data.tvars, appTs):
#         if isinstance(at, TVar) and at.typeVar is tv:
#             continue
#         apps[tv] = at
#     return apps
# 
# def subst(mapping, t):
#     return map_type_vars(lambda st: mapping.get(st.typeVar, st), t)


from base import *
from bedrock import *
from globs import *
from hashlib import sha256
from native import ModuleMeta, HEADERS, DIGEST_INDEX
from types_builtin import app_map, subst
import os
        return a + 0x204080
    elif a == 0b11110000:
        b, c, d, e = map(ord, f.read(4))
        a = (b<<24) | (c<<16) | (d<<8) | e
        a += 0x10204080
        assert a < 0x100000000, "Int overflow"
        return a
    else:
        assert False, "Int overflow"

def read_int():
    return _read_int(env(Deserialize).file)

def read_bool():
    n = read_int()
    assert n == 0 or n == 1, "Bad bool: %d" % (n,)
    return bool(n)

def read_float():
    return read_int()

def read_str():
    n = read_int()
    return env(Deserialize).file.read(n).decode('UTF-8')

def read_node(t, path):
    if isinstance(t, TData):
        state = env(Deserialize)

        assert type(t.data) is DataType, "Bad TData containing %r" % (t.data,)

# Path: native.py
# DIGEST_INDEX = {}
# HEADERS = {'form': '\xe5\xa4\xa9\x00', 'normal': '\xe7\xa5\x9e\x00'}
# def _write(b):
# def _write_ref(node, t):
# def _encode_int(n):
# def _encode_float(f):
# def _encode_str(s):
# def _serialize_node(node, t):
# def _inspect_node(node, t):
# def inspect(module):
# def serialize(module):
#     def write_header():
# 
# Path: types_builtin.py
# def app_map(data, appTs):
#     apps = {}
#     for tv, at in ezip(data.tvars, appTs):
#         if isinstance(at, TVar) and at.typeVar is tv:
#             continue
#         apps[tv] = at
#     return apps
# 
# def subst(mapping, t):
#     return map_type_vars(lambda st: mapping.get(st.typeVar, st), t)


# Path: deserialize.py
from base import *
from bedrock import *
from globs import *
from hashlib import sha256
from native import ModuleMeta, HEADERS, DIGEST_INDEX
from types_builtin import app_map, subst
import os

        return a + 0x204080
    elif a == 0b11110000:
        b, c, d, e = map(ord, f.read(4))
        a = (b<<24) | (c<<16) | (d<<8) | e
        a += 0x10204080
        assert a < 0x100000000, "Int overflow"
        return a
    else:
        assert False, "Int overflow"

def read_int():
    return _read_int(env(Deserialize).file)

def read_bool():
    n = read_int()
    assert n == 0 or n == 1, "Bad bool: %d" % (n,)
    return bool(n)

def read_float():
    return read_int()

def read_str():
    n = read_int()
    return env(Deserialize).file.read(n).decode('UTF-8')

def read_node(t, path):
    if isinstance(t, TData):
        state = env(Deserialize)

        assert type(t.data) is DataType, "Bad TData containing %r" % (t.data,)

        apps = app_map(t.data, t.appTypes)