{"name": "kbd_mm_writeb", "code": "int __fastcall kbd_mm_writeb ( __int64 @@a1@@ , __int64 @@a2@@ , unsigned __int8 @@a3@@ ) { int @@result@@ ; if ( ( @@a2@@ & * ( _QWORD * ) ( @@a1@@ + Number ) ) != Number ) @@result@@ = kbd_write_command ( @@a1@@ , Number L , @@a3@@ ) ; else @@result@@ = ( unsigned int ) kbd_write_data ( ( unsigned __int8 * ) @@a1@@ , Number L , @@a3@@ ) ; return @@result@@ ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "result", "t": {"T": 1, "n": "int", "s": 4}, "location": "r8"}]}
{"name": "kbd_write_command", "code": "int __fastcall kbd_write_command ( __int64 @@a1@@ , __int64 @@a2@@ , unsigned __int64 @@a3@@ ) { int @@result@@ ; unsigned __int64 @@v4@@ ; @@v4@@ = @@a3@@ ; if ( ( @@a3@@ & Number ) == Number ) { if ( ( @@a3@@ & Number ) != Number ) @@v4@@ = Number L ; else @@v4@@ = Number L ; } if ( @@v4@@ > Number ) return fprintf ( stderr , String , ( unsigned int ) @@v4@@ ) ; if ( @@v4@@ < Number ) { if ( @@v4@@ == Number ) return kbd_queue ( @@a1@@ , * ( unsigned __int8 * ) ( @@a1@@ + Number ) , Number ) ; if ( @@v4@@ == Number ) { LABEL_12 : @@result@@ = @@a1@@ ; * ( _BYTE * ) @@a1@@ = @@v4@@ ; return @@result@@ ; } return fprintf ( stderr , String , ( unsigned int ) @@v4@@ ) ; } @@result@@ = @@v4@@ - Number ; switch ( @@v4@@ ) { case Number : @@result@@ = @@a1@@ ; * ( _BYTE * ) ( @@a1@@ + Number ) |= Number ; break ; case Number : @@result@@ = @@a1@@ ; * ( _BYTE * ) ( @@a1@@ + Number ) &= Number ; break ; case Number : case Number : @@result@@ = kbd_queue ( @@a1@@ , Number , Number ) ; break ; case Number : * ( _BYTE * ) ( @@a1@@ + Number ) |= Number ; @@result@@ = kbd_queue ( @@a1@@ , Number , Number ) ; break ; case Number : * ( _BYTE * ) ( @@a1@@ + Number ) |= Number ; @@result@@ = kbd_update_irq ( @@a1@@ ) ; break ; case Number : * ( _BYTE * ) ( @@a1@@ + Number ) &= Number ; @@result@@ = kbd_update_irq ( @@a1@@ ) ; break ; case Number : @@result@@ = kbd_queue ( @@a1@@ , Number , Number ) ; break ; case Number : @@result@@ = kbd_queue ( @@a1@@ , * ( unsigned __int8 * ) ( @@a1@@ + Number ) , Number ) ; break ; case Number : case Number : case Number : case Number : goto LABEL_12 ; case Number : if ( * ( _QWORD * ) ( @@a1@@ + Number ) ) qemu_irq_lower ( * * ( _QWORD * * ) ( @@a1@@ + Number ) ) ; @@result@@ = @@a1@@ ; * ( _BYTE * ) ( @@a1@@ + Number ) &= Number ; break ; case Number : if ( * ( _QWORD * ) ( @@a1@@ + Number ) ) qemu_irq_raise ( * * ( _QWORD * * ) ( @@a1@@ + Number ) ) ; @@result@@ = @@a1@@ ; * ( _BYTE * ) ( @@a1@@ + Number ) |= Number ; break ; case Number : @@result@@ = qemu_system_reset_request ( ) ; break ; case Number : return @@result@@ ; default : return fprintf ( stderr , String , ( unsigned int ) @@v4@@ ) ; } return @@result@@ ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "result", "t": {"T": 1, "n": "int", "s": 4}, "location": "r8"}, {"n": "v4", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s40"}]} {"name": "kbd_write_data", "code": "unsigned __int8 * __fastcall kbd_write_data ( unsigned __int8 * @@a1@@ , __int64 @@a2@@ , unsigned int @@a3@@ ) { int v3 ; unsigned __int8 * result ; v3 = * @@a1@@ ; if ( v3 == Number ) { ps2_write_mouse ( * ( ( _QWORD * ) @@a1@@ + Number ) , @@a3@@ ) ; } else if ( * @@a1@@ <= Number ) { switch ( v3 ) { case Number : kbd_queue ( ( __int64 ) @@a1@@ , @@a3@@ , Number ) ; break ; case Number : kbd_queue ( ( __int64 ) @@a1@@ , @@a3@@ , Number ) ; break ; case Number : outport_write ( ( __int64 ) @@a1@@ , @@a3@@ ) ; break ; default : if ( * @@a1@@ ) { if ( v3 == Number ) { @@a1@@ [ Number ] = @@a3@@ ; ps2_keyboard_set_translation ( * ( ( _QWORD * ) @@a1@@ + Number ) , ( @@a1@@ [ Number ] & Number ) != Number ) ; kbd_update_irq ( ( __int64 ) @@a1@@ ) ; } } else { ps2_write_keyboard ( * ( ( _QWORD * ) @@a1@@ + Number ) , @@a3@@ ) ; } break ; } } result = @@a1@@ ; * @@a1@@ = Number ; return result ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r16"}, {"n": "a1", "t": {"T": 3, "t": "unsigned __int8"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}]}