{"name": "send_packet", "code": "__int64 send_packet ( ) { __int64 v0 ; __int64 result ; const void * v2 ; __int64 v3 ; __int64 v4 ; __int64 v5 ; void * v6 ; __int64 v7 ; char * v8 ; __int64 v9 ; __int64 v10 ; __int16 v11 ; __int16 v12 ; __int64 ( * v13 ) ( void ) ; unsigned int @@v14@@ ; __int64 v15 ; __int16 v16 ; __int64 ( * v17 ) ( void ) ; __int64 v18 ; __int64 v19 ; __int64 v20 ; __int64 v21 ; char @@dest@@ [ Number ] ; __int16 @@v23@@ ; __int16 @@v24@@ ; __int64 @@v25@@ ; int @@v26@@ ; __int16 @@v27@@ ; __int64 @@v28@@ ; int @@v29@@ ; int @@v30@@ ; unsigned __int16 @@v31@@ ; unsigned __int16 @@v32@@ ; char @@v33@@ ; int @@v34@@ ; __int64 @@i@@ ; int @@v36@@ ; char @@v37@@ ; char @@v38@@ ; int @@v39@@ ; __int16 @@v40@@ ; @@v31@@ = Number ; @@v38@@ = Number ; @@v37@@ = Number ; @@v36@@ = Number ; @@v34@@ = Number ; packetbuf_set_addr ( Number L , & rimeaddr_node_addr ) ; v0 = packetbuf_addr ( Number L ) ; if ( ( unsigned int ) rimeaddr_cmp ( v0 ) ) @@v36@@ = Number ; packetbuf_set_attr ( Number L , Number L ) ; @@v30@@ = framer_nullmac ( ) ; @@v29@@ = @@v30@@ + Number ; if ( @@v30@@ < Number || @@v29@@ > Number ) return Number L ; v2 = ( const void * ) packetbuf_hdrptr ( ) ; memcpy ( @@dest@@ , v2 , @@v30@@ ) ; @@dest@@ [ @@v30@@ ] = Number ; @@dest@@ [ @@v30@@ + Number ] = Number ; packetbuf_compact ( ) ; @@v28@@ = queuebuf_new_from_packetbuf ( ) ; if ( ! @@v28@@ ) return Number L ; if ( is_streaming == Number ) { v3 = packetbuf_addr ( Number L ) ; if ( ( unsigned int ) rimeaddr_cmp ( v3 ) || ( v4 = packetbuf_addr ( Number L ) , ( unsigned int ) rimeaddr_cmp ( v4 ) ) ) @@v34@@ = Number ; } if ( ( unsigned __int16 ) packetbuf_attr ( Number L ) == Number ) { is_streaming = Number ; if ( ( unsigned int ) rimeaddr_cmp ( & is_streaming_to ) ) { v5 = packetbuf_addr ( Number L ) ; v6 = & is_streaming_to ; rimeaddr_copy ( & is_streaming_to , v5 ) ; } else { packetbuf_addr ( Number L ) ; v6 = & is_streaming_to ; if ( ! ( unsigned int ) rimeaddr_cmp ( & is_streaming_to ) ) { v7 = packetbuf_addr ( Number L ) ; v6 = & is_streaming_to_too ; rimeaddr_copy ( & is_streaming_to_too , v7 ) ; } } stream_until = clock_time ( v6 ) + Number ; } off ( ) ; v8 = ( char * ) encounter_list ; for ( @@i@@ = list_head ( encounter_list ) ; @@i@@ ; @@i@@ = list_item_next ( @@i@@ , v9 ) ) { @@v25@@ = packetbuf_addr ( Number L ) ; v9 = @@i@@ + Number ; v10 = @@v25@@ ; if ( ( unsigned int ) rimeaddr_cmp ( @@v25@@ ) ) { @@v24@@ = clock_time ( v10 ) ; @@v32@@ = ( unsigned __int16 ) ( * ( _WORD * ) ( @@i@@ + Number ) - @@v24@@ ) % Number ; if ( @@v32@@ <= Number ) @@v32@@ = Number ; @@v23@@ = @@v24@@ + @@v32@@ - Number ; do v11 = clock_time ( v10 ) ; while ( ( __int16 ) ( v11 - @@v23@@ ) < Number ) ; } v8 = ( char * ) @@i@@ ; } we_are_sending = Number ; @@v27@@ = clock_time ( v8 ) ; @@v39@@ = Number ; @@v33@@ = Number ; if ( ! @@v34@@ ) { watchdog_stop ( ) ; @@v38@@ = Number ; @@v40@@ = clock_time ( v8 ) ; @@v39@@ = Number ; @@v33@@ = Number ; while ( ! @@v38@@ ) { if ( @@v33@@ ) break ; v16 = clock_time ( v8 ) ; if ( ( __int16 ) ( v16 - ( xmac_config [ Number ] + @@v27@@ ) ) >= Number ) break ; do { if ( @@v38@@ ) break ; v12 = clock_time ( v8 ) ; } while ( ( __int16 ) ( v12 - ( xmac_config [ Number ] + @@v40@@ ) ) < Number ) ; @@v40@@ = clock_time ( v8 ) ; if ( ! @@v38@@ && ! @@v33@@ ) { if ( @@v36@@ ) { queuebuf_to_packetbuf ( @@v28@@ ) ; v13 = nullradio_driver [ Number ] ; @@v14@@ = ( unsigned __int16 ) packetbuf_totlen ( ) ; v8 = ( char * ) packetbuf_hdrptr ( ) ; @@v26@@ = ( ( __int64 ( __fastcall * ) ( char * , _QWORD ) ) v13 ) ( v8 , @@v14@@ ) ; off ( ) ; } else { on ( ) ; v15 = ( unsigned __int16 ) @@v29@@ ; v8 = @@dest@@ ; @@v26@@ = ( ( __int64 ( __fastcall * ) ( char * , _QWORD ) ) nullradio_driver [ Number ] ) ( @@dest@@ , ( unsigned __int16 ) @@v29@@ ) ; if ( ( unsigned int ) detect_ack ( ( __int64 ) @@dest@@ , v15 ) ) @@v38@@ = Number ; else off ( ) ; } } ++ @@v39@@ ; } } queuebuf_to_packetbuf ( @@v28@@ ) ; queuebuf_free ( @@v28@@ ) ; if ( ( @@v36@@ || @@v38@@ || is_streaming ) && ! @@v33@@ ) { v17 = nullradio_driver [ Number ] ; v18 = ( unsigned __int16 ) packetbuf_totlen ( ) ; v19 = packetbuf_hdrptr ( ) ; @@v26@@ = ( ( __int64 ( __fastcall * ) ( __int64 , __int64 ) ) v17 ) ( v19 , v18 ) ; if ( ! @@v36@@ ) { if ( ( unsigned int ) detect_ack ( v19 , v18 ) ) @@v37@@ = Number ; } } off ( ) ; if ( @@v38@@ && ! is_streaming ) { v20 = @@v31@@ ; v21 = packetbuf_addr ( Number L ) ; register_encounter ( v21 , v20 ) ; } watchdog_start ( ) ; we_are_sending = Number ; if ( @@v33@@ ) { ++ someone_is_sending ; result = Number L ; } else if ( @@v36@@ || @@v37@@ ) { result = Number L ; } else { result = Number L ; } return result ; }", "source": [{"n": "v14", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r32"}, {"n": "dest", "t": {"T": 2, "n": 52, "s": 1, "t": "char"}, "location": "s144"}, {"n": "v40", "t": {"T": 1, "n": "__int16", "s": 2}, "location": "s18"}, {"n": "v39", "t": {"T": 1, "n": "int", "s": 4}, "location": "s24"}, {"n": "v38", "t": {"T": 1, "n": "char", "s": 1}, "location": "s25"}, {"n": "v37", "t": {"T": 1, "n": "char", "s": 1}, "location": "s26"}, {"n": "v36", "t": {"T": 1, "n": "int", "s": 4}, "location": "s32"}, {"n": "i", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s40"}, {"n": "v34", "t": {"T": 1, "n": "int", "s": 4}, "location": "s44"}, {"n": "v33", "t": {"T": 1, "n": "char", "s": 1}, "location": "s45"}, {"n": "v32", "t": {"T": 1, "n": "unsigned __int16", "s": 2}, "location": "s48"}, {"n": "v31", "t": {"T": 1, "n": "unsigned __int16", "s": 2}, "location": "s50"}, {"n": "v30", "t": {"T": 1, "n": "int", "s": 4}, "location": "s56"}, {"n": "v29", "t": {"T": 1, "n": "int", "s": 4}, "location": "s60"}, {"n": "v28", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s72"}, {"n": "v27", "t": {"T": 1, "n": "__int16", "s": 2}, "location": "s74"}, {"n": "v26", "t": {"T": 1, "n": "int", "s": 4}, "location": "s80"}, {"n": "v25", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s88"}, {"n": "v24", "t": {"T": 1, "n": "__int16", "s": 2}, "location": "s90"}, {"n": "v23", "t": {"T": 1, "n": "__int16", "s": 2}, "location": "s92"}]}