<s> from . pattern import * <EOL> import sys <EOL> def guess_argnum ( result , buffer_size , start_index = <NUM_LIT:1> ) : <EOL> pattern_size = buffer_size // <NUM_LIT:8> <EOL> pat = msfpattern ( pattern_size * <NUM_LIT:4> ) <EOL> if result [ : len ( pat ) ] != pat : <EOL> return None <EOL> result = result [ len ( pat ) : ] . replace ( "<STR_LIT>" , "<STR_LIT>" ) . rstrip ( "<STR_LIT:X>" ) <EOL> parts = result . split ( "<STR_LIT>" ) [ <NUM_LIT:1> : ] <EOL> for i , p in enumerate ( parts ) : <EOL> p = p . rjust ( <NUM_LIT:8> , "<STR_LIT:0>" ) . decode ( "<STR_LIT>" ) [ : : - <NUM_LIT:1> ] <EOL> if p in pat : <EOL> block_index = pat . find ( p ) <EOL> padding = block_index % <NUM_LIT:4> <EOL> argnum = start_index + i * ( pattern_size - <NUM_LIT:1> ) <EOL> argnum -= block_index // <NUM_LIT:4> <EOL> return argnum , padding <EOL> return None <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> if len ( sys . argv ) > <NUM_LIT:1> : <EOL> lst = [ sys . argv [ <NUM_LIT:1> ] ] + map ( int , sys . argv [ <NUM_LIT:2> : ] ) <EOL> t = guess_argnum ( * lst ) <EOL> if t : <EOL> print "<STR_LIT>" , t [ <NUM_LIT:0> ] <EOL> print "<STR_LIT>" , t [ <NUM_LIT:1> ] <EOL> else : <EOL> print "<STR_LIT>" <EOL> else : <EOL> print "<STR_LIT>" </s>
