<s> from pyutils import bits <EOL> from pprint import pprint as P <EOL> from pdb import set_trace as br <EOL> import math <EOL> import os <EOL> import sys <EOL> with open ( sys . argv [ <NUM_LIT:1> ] , '<STR_LIT:r>' ) as fp : <EOL> text = fp . read ( ) <EOL> HEADER_SIZE = bits . WSIZE * <NUM_LIT:5> <EOL> magic = hex ( bits . unpack ( text [ <NUM_LIT:0> : bits . WSIZE ] ) ) <EOL> ot_size = bits . unpack ( text [ bits . WSIZE : bits . WSIZE * <NUM_LIT:2> ] ) <EOL> er_size = bits . unpack ( text [ bits . WSIZE * <NUM_LIT:2> : bits . WSIZE * <NUM_LIT:3> ] ) <EOL> es_size = bits . unpack ( text [ bits . WSIZE * <NUM_LIT:3> : bits . WSIZE * <NUM_LIT:4> ] ) <EOL> names_size = bits . unpack ( text [ bits . WSIZE * <NUM_LIT:4> : bits . WSIZE * <NUM_LIT:5> ] ) <EOL> print '<STR_LIT>' , magic <EOL> print '<STR_LIT>' , ot_size <EOL> print '<STR_LIT>' , es_size <EOL> print '<STR_LIT>' , names_size <EOL> begin_names = HEADER_SIZE <EOL> end_names = begin_names + names_size <EOL> names = text [ begin_names : end_names ] <EOL> begin_ot = end_names <EOL> end_ot = begin_ot + ot_size <EOL> ot = text [ begin_ot : end_ot ] <EOL> print '<STR_LIT>' , map ( bits . unpack , bits . chunks ( ot , bits . WSIZE ) ) , "<STR_LIT:\n>" <EOL> begin_er = end_ot <EOL> end_er = begin_er + er_size <EOL> es = text [ begin_er : end_er ] <EOL> print '<STR_LIT>' , map ( bits . unpack , bits . chunks ( es , bits . WSIZE ) ) , "<STR_LIT:\n>" <EOL> begin_es = end_er <EOL> end_es = begin_es + es_size <EOL> es = text [ begin_es : end_es ] <EOL> print '<STR_LIT>' , map ( bits . unpack , bits . chunks ( es , bits . WSIZE ) ) , "<STR_LIT:\n>" <EOL> begin_reloc = end_es <EOL> reloc = text [ begin_reloc : ] <EOL> print '<STR_LIT>' , map ( bits . unpack , bits . chunks ( reloc , bits . WSIZE ) ) , "<STR_LIT:\n>" </s>
