{"name": "ds1338_send", "code": "__int64 __fastcall ds1338_send ( __int64 @@a1@@ , unsigned __int8 @@a2@@ ) { __int64 @@result@@ ; char @@v3@@ ; int @@v4@@ ; __int64 @@v5@@ ; int @@v6@@ [ Number ] ; int @@v7@@ ; int @@v8@@ ; int @@v9@@ ; int @@v10@@ ; int @@v11@@ ; unsigned __int64 @@v12@@ ; @@v3@@ = @@a2@@ ; @@v12@@ = __readfsqword ( Number ) ; @@v5@@ = object_dynamic_cast_assert ( @@a1@@ , String , String , Number L , String ) ; if ( * ( _BYTE * ) ( @@v5@@ + Number ) ) { * ( _DWORD * ) ( @@v5@@ + Number ) = @@a2@@ & Number ; * ( _BYTE * ) ( @@v5@@ + Number ) = Number ; @@result@@ = Number L ; } else { if ( * ( int * ) ( @@v5@@ + Number ) > Number ) { if ( * ( _DWORD * ) ( @@v5@@ + Number ) == Number ) @@v3@@ = @@a2@@ & Number | @@a2@@ & Number & * ( _BYTE * ) ( @@v5@@ + * ( int * ) ( @@v5@@ + Number ) + Number ) & Number ; * ( _BYTE * ) ( @@v5@@ + * ( int * ) ( @@v5@@ + Number ) + Number ) = @@v3@@ ; } else { qemu_get_timedate ( @@v6@@ , ( unsigned int ) * ( _QWORD * ) ( @@v5@@ + Number ) ) ; switch ( * ( _DWORD * ) ( @@v5@@ + Number ) ) { case Number : @@v6@@ [ Number ] = ( unsigned __int8 ) from_bcd ( @@a2@@ & Number ) ; break ; case Number : @@v6@@ [ Number ] = ( unsigned __int8 ) from_bcd ( @@a2@@ & Number ) ; break ; case Number : if ( ( @@a2@@ & Number ) != Number ) { @@v4@@ = ( unsigned __int8 ) from_bcd ( @@a2@@ & Number ) ; if ( ( @@a2@@ & Number ) != Number ) @@v4@@ += Number ; if ( ! ( @@v4@@ % Number ) ) @@v4@@ -= Number ; @@v7@@ = @@v4@@ ; } else { @@v7@@ = ( unsigned __int8 ) from_bcd ( @@a2@@ & Number ) ; } break ; case Number : * ( _BYTE * ) ( @@v5@@ + Number ) = ( ( @@a2@@ & Number ) - Number - @@v11@@ + Number ) % Number ; break ; case Number : @@v8@@ = ( unsigned __int8 ) from_bcd ( @@a2@@ & Number ) ; break ; case Number : @@v9@@ = ( unsigned __int8 ) from_bcd ( @@a2@@ & Number ) - Number ; break ; case Number : @@v10@@ = ( unsigned __int8 ) from_bcd ( @@a2@@ ) + Number ; break ; default : break ; } * ( _QWORD * ) ( @@v5@@ + Number ) = ( int ) qemu_timedate_diff ( @@v6@@ ) ; } inc_regptr ( @@v5@@ ) ; @@result@@ = Number L ; } return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "r64"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "v11", "t": {"T": 1, "n": "int", "s": 4}, "location": "s40"}, {"n": "v10", "t": {"T": 1, "n": "int", "s": 4}, "location": "s44"}, {"n": "v9", "t": {"T": 1, "n": "int", "s": 4}, "location": "s48"}, {"n": "v8", "t": {"T": 1, "n": "int", "s": 4}, "location": "s52"}, {"n": "v7", "t": {"T": 1, "n": "int", "s": 4}, "location": "s56"}, {"n": "v6", "t": {"T": 2, "n": 2, "s": 4, "t": "int"}, "location": "s64"}, {"n": "v5", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s72"}, {"n": "v12", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}, {"n": "v4", "t": {"T": 1, "n": "int", "s": 4}, "location": "s80"}, {"n": "v3", "t": {"T": 1, "n": "char", "s": 1}, "location": "s92"}]}
{"name": "from_bcd", "code": "__int64 __fastcall from_bcd ( unsigned __int8 @@a1@@ ) { return Number * ( @@a1@@ >> Number ) + ( @@a1@@ & Number ) ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "r56"}]} {"name": "inc_regptr", "code": "unsigned __int64 __fastcall inc_regptr ( __int64 @@a1@@ ) { unsigned __int64 @@result@@ ; * ( _DWORD * ) ( @@a1@@ + Number ) = ( ( unsigned __int8 ) * ( _DWORD * ) ( @@a1@@ + Number ) + Number ) & Number ; @@result@@ = * ( unsigned int * ) ( @@a1@@ + Number ) ; if ( ! ( _DWORD ) @@result@@ ) @@result@@ = capture_current_time ( @@a1@@ ) ; return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "result", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "r8"}]} {"name": "ds1338_class_init", "code": "__int64 __fastcall ds1338_class_init ( __int64 @@a1@@ ) { _QWORD * v1 ; __int64 result ; __int64 @@v3@@ ; @@v3@@ = object_class_dynamic_cast_assert ( @@a1@@ , String , String , Number L , String ) ; v1 = ( _QWORD * ) object_class_dynamic_cast_assert ( @@a1@@ , String , String , Number L , String ) ; v1 [ Number ] = ds1338_init ; v1 [ Number ] = ds1338_event ; v1 [ Number ] = ds1338_recv ; v1 [ Number ] = ds1338_send ; * ( _QWORD * ) ( @@v3@@ + Number ) = ds1338_reset ; result = @@v3@@ ; * ( _QWORD * ) ( @@v3@@ + Number ) = & vmstate_ds1338 ; return result ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}]}