3
/*^o                 @   sD   d dl mZ d dlmZmZmZmZmZmZm	Z	 dd Z
dd ZdS )    )deque)Bytecodeiscodefindlinestarts
get_opcodeoffset2line	load_fileload_modulec             C   s~   t | \}}}}}}}yt|}	W n$ tk
rF }
 zt|
S d }
~
X nX t||	g}g }t||}t||| t|dd dS )Nc             S   s   | d S )N    )xr   r   S/home/psgendb/BIRCHDEV/python/lib/python3.6/site-packages/uncompyle6/linenumbers.py<lambda>2   s    z%line_number_mapping.<locals>.<lambda>)key)r	   r   SyntaxErrorstrr   r   number_loopsorted)Zpyc_filenameZsrc_filenameversion	timestampZ	magic_intcode1Zis_pypysource_sizeZsip_hashcode2equeuemappingsopcr   r   r   line_number_mapping   s    	
r   c                s<  x4t | dkr6| j }| j }|j|jks2tt|}tt| | fdd|D 7 }t||}t||}|j|}t|jg}	x|j|D ]}
d }t	|
j
r|
j
}|rd }x<|syt|}t	|j
r|j
}W q tk
r   P Y qX qW |r|j|jkst|j|	kr|	j|j | j| | j| qW qW d S )Nr   c                s   g | ]\}}|t | gqS r   )r   ).0offsetline)linestarts_uncompiledr   r   
<listcomp>=   s   znumber_loop.<locals>.<listcomp>)lenpopleftco_nameAssertionErrorr   listr   get_instructionssetr   argvalnextStopIterationaddappend)r   r   r   r   r   Zlinestarts_origZ	bytecode1Z	bytecode2Zinstr2sseeninstrZ
next_code1Z
next_code2Zinstr2r   )r!   r   r   5   sH    









r   N)collectionsr   Zxdisr   r   r   r   r   r   r	   r   r   r   r   r   r   <module>   s   $