{"name": "packetbuf_set_attr", "code": "__int64 __fastcall packetbuf_set_attr ( unsigned __int8 @@a1@@ , __int16 @@a2@@ ) { packetbuf_attrs [ @@a1@@ ] = @@a2@@ ; return Number L ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int16", "s": 2}, "location": "r64"}]}
{"name": "create", "code": "__int64 create ( ) { __int64 v0 ; unsigned __int8 v1 ; __int64 v2 ; __int64 v3 ; unsigned int @@v4@@ ; __int64 v5 ; char @@s@@ [ Number ] ; char @@v8@@ ; char @@v9@@ ; char @@v10@@ ; char @@v11@@ ; char @@v12@@ ; unsigned __int8 @@v13@@ ; __int16 @@v14@@ ; char @@v15@@ [ Number ] ; __int16 @@v16@@ ; _BYTE @@v17@@ [ Number ] ; unsigned __int8 @@v18@@ ; memset ( @@s@@ , Number , Number ) ; if ( ! initialized ) { initialized = Number ; mac_dsn = random_rand ( ) ; } @@s@@ [ Number ] = Number ; @@s@@ [ Number ] = Number ; @@s@@ [ Number ] = packetbuf_attr ( Number L ) ; v0 = packetbuf_addr ( Number L ) ; if ( ( unsigned int ) rimeaddr_cmp ( v0 , ( __int64 ) & rimeaddr_null ) ) @@v8@@ = Number ; else @@v8@@ = packetbuf_attr ( Number L ) ; @@v9@@ = Number ; @@v11@@ = Number ; if ( ( unsigned __int16 ) packetbuf_attr ( Number L ) ) { @@v13@@ = packetbuf_attr ( Number L ) ; } else { v1 = mac_dsn ++ ; @@v13@@ = v1 ; packetbuf_set_attr ( Number L , v1 ) ; } @@v12@@ = Number ; @@v14@@ = Number ; v2 = packetbuf_addr ( Number L ) ; if ( ( unsigned int ) rimeaddr_cmp ( v2 , ( __int64 ) & rimeaddr_null ) ) { @@v10@@ = Number ; @@v15@@ [ Number ] = Number ; @@v15@@ [ Number ] = Number ; } else { v3 = packetbuf_addr ( Number L ) ; rimeaddr_copy ( ( __int64 ) @@v15@@ , v3 ) ; @@v10@@ = Number ; } @@v16@@ = Number ; rimeaddr_copy ( ( __int64 ) @@v17@@ , ( __int64 ) & rimeaddr_node_addr ) ; * ( _QWORD * ) & @@v17@@ [ Number ] = packetbuf_dataptr ( ) ; @@v17@@ [ Number ] = packetbuf_datalen ( ) ; @@v18@@ = frame802154_hdrlen ( @@s@@ ) ; if ( ! ( unsigned int ) packetbuf_hdralloc ( @@v18@@ ) ) return Number ; @@v4@@ = @@v18@@ ; v5 = packetbuf_hdrptr ( ) ; frame802154_create ( @@s@@ , v5 , @@v4@@ ) ; return @@v18@@ ; }", "source": [{"n": "v4", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r32"}, {"n": "v18", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "s17"}, {"n": "v17", "t": {"T": 2, "n": 57, "s": 1, "t": "_BYTE"}, "location": "s74"}, {"n": "v16", "t": {"T": 1, "n": "__int16", "s": 2}, "location": "s76"}, {"n": "v15", "t": {"T": 2, "n": 8, "s": 1, "t": "char"}, "location": "s84"}, {"n": "v14", "t": {"T": 1, "n": "__int16", "s": 2}, "location": "s86"}, {"n": "v13", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "s88"}, {"n": "v12", "t": {"T": 1, "n": "char", "s": 1}, "location": "s89"}, {"n": "v11", "t": {"T": 1, "n": "char", "s": 1}, "location": "s90"}, {"n": "v10", "t": {"T": 1, "n": "char", "s": 1}, "location": "s91"}, {"n": "v9", "t": {"T": 1, "n": "char", "s": 1}, "location": "s92"}, {"n": "v8", "t": {"T": 1, "n": "char", "s": 1}, "location": "s93"}, {"n": "s", "t": {"T": 2, "n": 3, "s": 1, "t": "char"}, "location": "s96"}]} {"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"}]} {"name": "set_packet_attrs", "code": "__int64 set_packet_attrs ( ) { __int16 @@v1@@ ; @@v1@@ = Number ; packetbuf_set_attr ( Number , * ( ( unsigned __int8 * ) & uip_aligned_buf + Number ) ) ; switch ( * ( ( _BYTE * ) & uip_aligned_buf + Number ) ) { case Number : @@v1@@ = dword_4227A8 ; if ( ( unsigned __int16 ) dword_4227A8 > ( int ) HIWORD ( dword_4227A8 ) ) return packetbuf_set_attr ( Number , HIWORD ( dword_4227A8 ) ) ; break ; case Number : @@v1@@ = dword_4227A8 ; if ( ( unsigned __int16 ) dword_4227A8 > ( int ) HIWORD ( dword_4227A8 ) ) return packetbuf_set_attr ( Number , HIWORD ( dword_4227A8 ) ) ; break ; case Number : @@v1@@ = ( ( unsigned __int8 ) dword_4227A8 << Number ) | BYTE1 ( dword_4227A8 ) ; break ; } return packetbuf_set_attr ( Number , @@v1@@ ) ; }", "source": [{"n": "v1", "t": {"T": 1, "n": "__int16", "s": 2}, "location": "s4"}]} {"name": "output", "code": "__int64 __fastcall output ( __int64 @@a1@@ ) { char @@v2@@ [ Number ] ; __int64 * @@v3@@ ; unsigned __int16 @@v4@@ ; uncomp_hdr_len = Number ; rime_hdr_len = Number ; packetbuf_clear ( ) ; rime_ptr = packetbuf_dataptr ( ) ; packetbuf_set_attr ( Number , Number ) ; if ( callback ) set_packet_attrs ( ) ; if ( * ( ( _BYTE * ) & uip_aligned_buf + Number ) != Number || ( * ( ( _BYTE * ) & dword_4227A8 + Number ) & Number ) != Number || ( * ( ( _BYTE * ) & dword_4227A8 + Number ) & Number ) == Number ) { if ( * ( ( _BYTE * ) & uip_aligned_buf + Number ) == Number && ( * ( ( _BYTE * ) & dword_4227A8 + Number ) & Number ) != Number ) packetbuf_set_attr ( Number , Number ) ; } else { packetbuf_set_attr ( Number , Number ) ; } if ( @@a1@@ ) rimeaddr_copy ( ( __int64 ) @@v2@@ , @@a1@@ ) ; else rimeaddr_copy ( ( __int64 ) @@v2@@ , ( __int64 ) & rimeaddr_null ) ; compress_hdr_hc06 ( @@v2@@ ) ; if ( ( unsigned __int16 ) uip_len - ( unsigned __int8 ) uncomp_hdr_len <= Number - ( unsigned __int8 ) rime_hdr_len ) { memcpy ( ( char * ) rime_ptr + ( unsigned __int8 ) rime_hdr_len , ( char * ) & uip_aligned_buf + ( unsigned __int8 ) uncomp_hdr_len , ( unsigned __int16 ) uip_len - ( unsigned __int8 ) uncomp_hdr_len ) ; packetbuf_set_datalen ( uip_len - ( unsigned __int8 ) uncomp_hdr_len + ( unsigned __int8 ) rime_hdr_len ) ; send_packet_1 ( ( __int64 ) @@v2@@ ) ; } else { memmove ( ( char * ) rime_ptr + Number , rime_ptr , ( unsigned __int8 ) rime_hdr_len ) ; * ( _BYTE * ) rime_ptr = HIBYTE ( uip_len ) | Number ; * ( ( _BYTE * ) rime_ptr + Number ) = uip_len ; * ( ( _BYTE * ) rime_ptr + Number ) = HIBYTE ( my_tag ) ; * ( ( _BYTE * ) rime_ptr + Number ) = my_tag ++ ; rime_hdr_len += Number ; rime_payload_len = ( Number - rime_hdr_len ) & Number ; memcpy ( ( char * ) rime_ptr + ( unsigned __int8 ) rime_hdr_len , ( char * ) & uip_aligned_buf + ( unsigned __int8 ) uncomp_hdr_len , ( Number - rime_hdr_len ) & Number ) ; packetbuf_set_datalen ( ( unsigned __int8 ) rime_payload_len + ( unsigned __int8 ) rime_hdr_len ) ; @@v3@@ = ( __int64 * ) queuebuf_new_from_packetbuf ( ) ; if ( ! @@v3@@ ) return Number L ; send_packet_1 ( ( __int64 ) @@v2@@ ) ; queuebuf_to_packetbuf ( ( unsigned __int64 ) @@v3@@ ) ; queuebuf_free ( @@v3@@ ) ; @@v3@@ = Number L ; if ( last_tx_status == Number || last_tx_status == Number || last_tx_status == Number ) return Number L ; @@v4@@ = ( unsigned __int8 ) rime_payload_len + ( unsigned __int8 ) uncomp_hdr_len ; rime_hdr_len = Number ; * ( _BYTE * ) rime_ptr = HIBYTE ( uip_len ) | Number ; * ( ( _BYTE * ) rime_ptr + Number ) = uip_len ; rime_payload_len = ( Number - rime_hdr_len ) & Number ; while ( @@v4@@ < ( unsigned __int16 ) uip_len ) { * ( ( _BYTE * ) rime_ptr + Number ) = @@v4@@ >> Number ; if ( ( unsigned __int16 ) uip_len - @@v4@@ < ( unsigned __int8 ) rime_payload_len ) rime_payload_len = uip_len - @@v4@@ ; memcpy ( ( char * ) rime_ptr + ( unsigned __int8 ) rime_hdr_len , ( char * ) & uip_aligned_buf + @@v4@@ , ( unsigned __int8 ) rime_payload_len ) ; packetbuf_set_datalen ( ( unsigned __int8 ) rime_payload_len + ( unsigned __int8 ) rime_hdr_len ) ; @@v3@@ = ( __int64 * ) queuebuf_new_from_packetbuf ( ) ; if ( ! @@v3@@ ) return Number L ; send_packet_1 ( ( __int64 ) @@v2@@ ) ; queuebuf_to_packetbuf ( ( unsigned __int64 ) @@v3@@ ) ; queuebuf_free ( @@v3@@ ) ; @@v3@@ = Number L ; @@v4@@ += ( unsigned __int8 ) rime_payload_len ; if ( last_tx_status == Number || last_tx_status == Number || last_tx_status == Number ) return Number L ; } } return Number L ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v3", "t": {"T": 3, "t": "__int64"}, "location": "s16"}, {"n": "v4", "t": {"T": 1, "n": "unsigned __int16", "s": 2}, "location": "s2"}, {"n": "v2", "t": {"T": 2, "n": 8, "s": 1, "t": "char"}, "location": "s24"}]} {"name": "set_attr", "code": "void * __fastcall set_attr ( __int64 @@a1@@ , unsigned __int16 @@a2@@ ) { void * @@result@@ ; if ( * ( _QWORD * ) ( @@a1@@ + Number ) ) @@result@@ = memcpy ( ( void * ) ( * ( _QWORD * ) ( @@a1@@ + Number ) + @@a2@@ * * ( unsigned __int16 * ) ( @@a1@@ + Number ) ) , * ( const void * * ) ( @@a1@@ + Number ) , * ( unsigned __int16 * ) ( @@a1@@ + Number ) ) ; else @@result@@ = memset ( ( void * ) ( @@a2@@ * * ( unsigned __int16 * ) ( @@a1@@ + Number ) + * ( _QWORD * ) ( @@a1@@ + Number ) ) , Number , * ( unsigned __int16 * ) ( @@a1@@ + Number ) ) ; return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "unsigned __int16", "s": 2}, "location": "r64"}, {"n": "result", "t": {"T": 3, "t": "void"}, "location": "r8"}]}