#NEWLINE# def _translate_and( self , oprnd1 , oprnd2 , oprnd3 ) : #NEWLINE# #INDENT# 'Return a formula representation of a AND instruction.\n        ' #NEWLINE# assert ( oprnd1 . size and oprnd2 . size and oprnd3 . size ) #NEWLINE# assert ( oprnd1 . size == oprnd2 . size ) #NEWLINE# op1_var = self . _translate_src_oprnd ( oprnd1 ) #NEWLINE# op2_var = self . _translate_src_oprnd ( oprnd2 ) #NEWLINE# ( op3_var , parent_reg_constrs ) = self . _translate_dst_oprnd ( oprnd3 ) #NEWLINE# if ( oprnd1 . size < oprnd3 . size ) : #NEWLINE# #INDENT# and_zx = smtlibv2 . ZEXTEND ( ( op1_var & op2_var ) , oprnd3 . size ) #NEWLINE# expr = ( op3_var == and_zx ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( oprnd1 . size > oprnd3 . size ) : #NEWLINE# #INDENT# and_extract = smtlibv2 . EXTRACT ( ( op1_var & op2_var ) , 0 , oprnd3 . size ) #NEWLINE# expr = ( op3_var == and_extract ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# expr = ( op3_var == ( op1_var & op2_var ) ) #NEWLINE# #UNINDENT# #UNINDENT# rv = [ expr ] #NEWLINE# if parent_reg_constrs : #NEWLINE# #INDENT# rv += parent_reg_constrs #NEWLINE# #UNINDENT# return rv