{"name": "frame802154_parse", "code": "__int64 __fastcall frame802154_parse ( unsigned __int8 * @@a1@@ , unsigned __int8 @@a2@@ , __int64 @@a3@@ ) { __int64 @@result@@ ; __int64 @@v5@@ ; unsigned __int8 i ; unsigned __int8 j ; unsigned __int8 * @@v8@@ ; if ( @@a2@@ <= Number ) return Number L ; LOBYTE ( @@v5@@ ) = * @@a1@@ & Number ; BYTE1 ( @@v5@@ ) = ( * @@a1@@ & Number ) != Number ; BYTE2 ( @@v5@@ ) = ( * @@a1@@ & Number ) != Number ; BYTE3 ( @@v5@@ ) = ( * @@a1@@ & Number ) != Number ; BYTE4 ( @@v5@@ ) = ( * @@a1@@ & Number ) != Number ; BYTE5 ( @@v5@@ ) = ( @@a1@@ [ Number ] >> Number ) & Number ; BYTE6 ( @@v5@@ ) = ( @@a1@@ [ Number ] >> Number ) & Number ; HIBYTE ( @@v5@@ ) = @@a1@@ [ Number ] >> Number ; * ( _QWORD * ) @@a3@@ = @@v5@@ ; * ( _BYTE * ) ( @@a3@@ + Number ) = @@a1@@ [ Number ] ; @@v8@@ = @@a1@@ + Number ; if ( BYTE5 ( @@v5@@ ) ) { * ( _WORD * ) ( @@a3@@ + Number ) = @@a1@@ [ Number ] + ( @@a1@@ [ Number ] << Number ) ; @@v8@@ = @@a1@@ + Number ; if ( BYTE5 ( @@v5@@ ) == Number ) { rimeaddr_copy ( @@a3@@ + Number , ( __int64 ) & rimeaddr_null ) ; * ( _BYTE * ) ( @@a3@@ + Number ) = @@a1@@ [ Number ] ; * ( _BYTE * ) ( @@a3@@ + Number ) = * @@v8@@ ; @@v8@@ = @@a1@@ + Number ; } else if ( BYTE5 ( @@v5@@ ) == Number ) { for ( i = Number ; i <= Number ; ++ i ) * ( _BYTE * ) ( @@a3@@ + i + Number ) = @@v8@@ [ Number - i ] ; @@v8@@ = @@a1@@ + Number ; } } else { rimeaddr_copy ( @@a3@@ + Number , ( __int64 ) & rimeaddr_null ) ; * ( _WORD * ) ( @@a3@@ + Number ) = Number ; } if ( HIBYTE ( @@v5@@ ) ) { if ( BYTE4 ( @@v5@@ ) ) { * ( _WORD * ) ( @@a3@@ + Number ) = * ( _WORD * ) ( @@a3@@ + Number ) ; } else { * ( _WORD * ) ( @@a3@@ + Number ) = * @@v8@@ + ( @@v8@@ [ Number ] << Number ) ; @@v8@@ += Number ; } if ( HIBYTE ( @@v5@@ ) == Number ) { rimeaddr_copy ( @@a3@@ + Number , ( __int64 ) & rimeaddr_null ) ; * ( _BYTE * ) ( @@a3@@ + Number ) = @@v8@@ [ Number ] ; * ( _BYTE * ) ( @@a3@@ + Number ) = * @@v8@@ ; @@v8@@ += Number ; } else if ( HIBYTE ( @@v5@@ ) == Number ) { for ( j = Number ; j <= Number ; ++ j ) * ( _BYTE * ) ( @@a3@@ + j + Number ) = @@v8@@ [ Number - j ] ; @@v8@@ += Number ; } } else { rimeaddr_copy ( @@a3@@ + Number , ( __int64 ) & rimeaddr_null ) ; * ( _WORD * ) ( @@a3@@ + Number ) = Number ; } * ( _BYTE * ) ( @@a3@@ + Number ) = @@a2@@ - ( ( _BYTE ) @@v8@@ - ( _BYTE ) @@a1@@ ) ; * ( _QWORD * ) ( @@a3@@ + Number ) = @@v8@@ ; if ( ( unsigned __int8 ) ( ( _BYTE ) @@v8@@ - ( _BYTE ) @@a1@@ ) > @@a2@@ ) @@result@@ = Number L ; else @@result@@ = ( unsigned __int8 ) ( ( _BYTE ) @@v8@@ - ( _BYTE ) @@a1@@ ) ; return @@result@@ ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r16"}, {"n": "a1", "t": {"T": 3, "t": "unsigned __int8"}, "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": "v5", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s17"}, {"n": "v8", "t": {"T": 3, "t": "unsigned __int8"}, "location": "s8"}]}
{"name": "rimeaddr_copy", "code": "__int64 __fastcall rimeaddr_copy ( __int64 @@a1@@ , __int64 @@a2@@ ) { __int64 @@result@@ ; unsigned __int8 @@i@@ ; for ( @@i@@ = Number ; @@i@@ <= Number ; ++ @@i@@ ) { * ( _BYTE * ) ( @@a1@@ + @@i@@ ) = * ( _BYTE * ) ( @@a2@@ + @@i@@ ) ; @@result@@ = ( unsigned int ) @@i@@ + Number ; } return @@result@@ ; }", "source": [{"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": "__int64", "s": 8}, "location": "r8"}, {"n": "i", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "s1"}]} {"name": "parse", "code": "__int64 parse ( ) { unsigned __int16 v0 ; unsigned int @@v1@@ ; __int64 v2 ; char @@v4@@ [ Number ] ; char @@v5@@ ; unsigned __int8 @@v6@@ ; __int16 @@v7@@ ; _BYTE @@v8@@ [ Number ] ; __int16 @@v9@@ ; unsigned __int8 @@v10@@ ; int @@v11@@ ; v0 = packetbuf_datalen ( ) ; @@v11@@ = v0 ; @@v1@@ = ( unsigned __int8 ) v0 ; v2 = packetbuf_dataptr ( ) ; if ( ! ( unsigned __int8 ) frame802154_parse ( v2 , @@v1@@ , @@v4@@ ) || ! ( unsigned int ) packetbuf_hdrreduce ( @@v11@@ - ( unsigned int ) @@v10@@ ) ) return Number ; if ( @@v5@@ ) { if ( @@v7@@ != Number && @@v7@@ != Number ) return Number ; if ( ! ( unsigned int ) is_broadcast_addr ( @@v5@@ , ( __int64 ) @@v8@@ ) ) packetbuf_set_addr ( Number L , @@v8@@ ) ; } packetbuf_set_addr ( Number L , & @@v9@@ ) ; packetbuf_set_attr ( Number L , ( unsigned __int8 ) @@v4@@ [ Number ] ) ; packetbuf_set_attr ( Number L , @@v6@@ ) ; return @@v11@@ - ( unsigned int ) @@v10@@ ; }", "source": [{"n": "v1", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r32"}, {"n": "v11", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}, {"n": "v10", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "s32"}, {"n": "v9", "t": {"T": 1, "n": "__int16", "s": 2}, "location": "s74"}, {"n": "v8", "t": {"T": 2, "n": 10, "s": 1, "t": "_BYTE"}, "location": "s84"}, {"n": "v7", "t": {"T": 1, "n": "__int16", "s": 2}, "location": "s86"}, {"n": "v6", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "s88"}, {"n": "v5", "t": {"T": 1, "n": "char", "s": 1}, "location": "s91"}, {"n": "v4", "t": {"T": 2, "n": 5, "s": 1, "t": "char"}, "location": "s96"}]}