def _read_structdesc(f):
structdesc = {}<EOL>structstart = _read_long(f)<EOL>if structstart != <NUM_LIT:9>:<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT>structdesc['<STR_LIT:name>'] = _read_string(f)<EOL>predef = _read_long(f)<EOL>structdesc['<STR_LIT>'] = _read_long(f)<EOL>structdesc['<STR_LIT>'] = _read_long(f)<EOL>structdesc['<STR_LIT>'] = predef & <NUM_LIT:1><EOL>structdesc['<STR_LIT>'] = predef & <NUM_LIT:2><EOL>structdesc['<STR_LIT>'] = predef & <NUM_LIT:4><EOL>if not structdesc['<STR_LIT>']:<EOL><INDENT>structdesc['<STR_LIT>'] = []<EOL>for t in range(structdesc['<STR_LIT>']):<EOL><INDENT>structdesc['<STR_LIT>'].append(_read_tagdesc(f))<EOL><DEDENT>for tag in structdesc['<STR_LIT>']:<EOL><INDENT>tag['<STR_LIT:name>'] = _read_string(f)<EOL><DEDENT>structdesc['<STR_LIT>'] = {}<EOL>for tag in structdesc['<STR_LIT>']:<EOL><INDENT>if tag['<STR_LIT>']:<EOL><INDENT>structdesc['<STR_LIT>'][tag['<STR_LIT:name>']] = _read_arraydesc(f)<EOL><DEDENT><DEDENT>structdesc['<STR_LIT>'] = {}<EOL>for tag in structdesc['<STR_LIT>']:<EOL><INDENT>if tag['<STR_LIT>']:<EOL><INDENT>structdesc['<STR_LIT>'][tag['<STR_LIT:name>']] = _read_structdesc(f)<EOL><DEDENT><DEDENT>if structdesc['<STR_LIT>'] or structdesc['<STR_LIT>']:<EOL><INDENT>structdesc['<STR_LIT>'] = _read_string(f)<EOL>structdesc['<STR_LIT>'] = _read_long(f)<EOL>structdesc['<STR_LIT>'] = []<EOL>for s in range(structdesc['<STR_LIT>']):<EOL><INDENT>structdesc['<STR_LIT>'].append(_read_string(f))<EOL><DEDENT>structdesc['<STR_LIT>'] = []<EOL>for s in range(structdesc['<STR_LIT>']):<EOL><INDENT>structdesc['<STR_LIT>'].append(_read_structdesc(f))<EOL><DEDENT><DEDENT>STRUCT_DICT[structdesc['<STR_LIT:name>']] = structdesc<EOL><DEDENT>else:<EOL><INDENT>if not structdesc['<STR_LIT:name>'] in STRUCT_DICT:<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT>structdesc = STRUCT_DICT[structdesc['<STR_LIT:name>']]<EOL><DEDENT>return structdesc<EOL>
Function to read in a structure descriptor