#NEWLINE# def x86_64_register_dump( s ) : #NEWLINE# #INDENT# output = '' #NEWLINE# for r in [ 'rax' , 'rbx' , 'rcx' , 'rdx' ] : #NEWLINE# #INDENT# if ( ( r in s . registers ) and ( s . registers [ r ] is not None ) ) : #NEWLINE# #INDENT# if s . registers [ r ] . symbolic : #NEWLINE# #INDENT# output += '{0}: symbolic           ' . format ( r ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# output += '{0}: {1}   ' . format ( r , s . registers [ r ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# output += '{0}:                    ' . format ( r ) #NEWLINE# #UNINDENT# #UNINDENT# output += '\n' #NEWLINE# for r in [ 'rsi' , 'rdi' , 'rbp' , 'rsp' ] : #NEWLINE# #INDENT# if ( ( r in s . registers ) and ( s . registers [ r ] is not None ) ) : #NEWLINE# #INDENT# if s . registers [ r ] . symbolic : #NEWLINE# #INDENT# output += '{0}: symbolic           ' . format ( r ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# output += '{0}: {1}   ' . format ( r , s . registers [ r ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# output += '{0}:                    ' . format ( r ) #NEWLINE# #UNINDENT# #UNINDENT# output += '\n' #NEWLINE# for r in [ 'r8' , 'r9' , 'r10' , 'r11' ] : #NEWLINE# #INDENT# if ( ( r in s . registers ) and ( s . registers [ r ] is not None ) ) : #NEWLINE# #INDENT# if s . registers [ r ] . symbolic : #NEWLINE# #INDENT# output += '{0:3}: symbolic           ' . format ( r ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# output += '{0:3}: {1}   ' . format ( r , s . registers [ r ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# output += '{0:3}:                    ' . format ( r ) #NEWLINE# #UNINDENT# #UNINDENT# output += '\n' #NEWLINE# for r in [ 'r12' , 'r13' , 'r14' , 'r15' ] : #NEWLINE# #INDENT# if ( ( r in s . registers ) and ( s . registers [ r ] is not None ) ) : #NEWLINE# #INDENT# if s . registers [ r ] . symbolic : #NEWLINE# #INDENT# output += '{0}: symbolic           ' . format ( r ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# output += '{0}: {1}   ' . format ( r , s . registers [ r ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# output += '{0}:                    ' . format ( r ) #NEWLINE# #UNINDENT# #UNINDENT# output += '\n' #NEWLINE# for r in [ 'cf' , 'pf' , 'af' , 'zf' , 'sf' , 'df' , 'of' ] : #NEWLINE# #INDENT# if ( ( r in s . registers ) and ( s . registers [ r ] is not None ) ) : #NEWLINE# #INDENT# if s . registers [ output ] . symbolic : #NEWLINE# #INDENT# output += ' {0}: s  ' . format ( r ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( s . registers [ r ] . value != 0 ) : #NEWLINE# #INDENT# output += ' {0}: 1  ' . format ( r ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# output += ' {0}: 0  ' . format ( r ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# output += ( ( ' ' + r ) + ':    ' ) #NEWLINE# #UNINDENT# #UNINDENT# return output