{"name": "rpl_free_dag", "code": "_BYTE * __fastcall rpl_free_dag ( _BYTE * @@a1@@ ) { _BYTE * @@result@@ ; if ( @@a1@@ [ Number ] ) { @@a1@@ [ Number ] = Number ; rpl_remove_routes ( ( __int64 ) @@a1@@ ) ; if ( ( @@a1@@ [ Number ] & Number ) != Number ) check_prefix ( @@a1@@ + Number , Number L ) ; remove_parents ( ( __int64 ) @@a1@@ , Number ) ; } @@result@@ = @@a1@@ ; @@a1@@ [ Number ] = Number ; return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "_BYTE"}, "location": "r56"}, {"n": "result", "t": {"T": 3, "t": "_BYTE"}, "location": "r8"}]}
{"name": "rpl_remove_routes", "code": "__int64 __fastcall rpl_remove_routes ( __int64 @@a1@@ ) { __int64 @@result@@ ; __int64 @@i@@ ; @@result@@ = uip_ds6_route_list_head ( ) ; for ( @@i@@ = @@result@@ ; @@i@@ ; @@i@@ = @@result@@ ) { if ( @@a1@@ == * ( _QWORD * ) ( @@i@@ + Number ) ) { uip_ds6_route_rm ( @@i@@ ) ; @@result@@ = uip_ds6_route_list_head ( ) ; } else { @@result@@ = list_item_next ( @@i@@ ) ; } } return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "i", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s8"}]} {"name": "remove_parents", "code": "__int64 __fastcall remove_parents ( __int64 @@a1@@ , unsigned __int16 @@a2@@ ) { __int64 @@result@@ ; __int64 @@v3@@ ; __int64 @@i@@ ; @@result@@ = list_head ( * ( _QWORD * ) ( @@a1@@ + Number ) ) ; for ( @@i@@ = @@result@@ ; @@i@@ ; @@i@@ = @@v3@@ ) { @@v3@@ = * ( _QWORD * ) @@i@@ ; if ( @@a2@@ <= * ( _WORD * ) ( @@i@@ + Number ) ) rpl_remove_parent ( @@a1@@ , @@i@@ ) ; @@result@@ = @@v3@@ ; } 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": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "v3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}, {"n": "i", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s8"}]} {"name": "rpl_set_root", "code": "__int64 __fastcall rpl_set_root ( unsigned __int8 @@a1@@ , _QWORD * @@a2@@ ) { __int64 @@v3@@ ; __int64 @@v4@@ ; _BYTE * v5 ; __int64 v6 ; char @@v7@@ ; @@v7@@ = Number ; v5 = get_dag ( @@a1@@ , @@a2@@ ) ; if ( v5 ) { @@v7@@ = v5 [ Number ] + Number ; if ( v5 == * ( _BYTE * * ) ( * ( ( _QWORD * ) v5 + Number ) + Number L ) ) * ( _QWORD * ) ( * ( ( _QWORD * ) v5 + Number ) + Number L ) = Number L ; rpl_free_dag ( v5 ) ; } v6 = rpl_alloc_dag ( @@a1@@ , @@a2@@ ) ; if ( ! v6 ) return Number L ; @@v4@@ = * ( _QWORD * ) ( v6 + Number ) ; * ( _BYTE * ) ( v6 + Number ) = @@v7@@ ; * ( _BYTE * ) ( v6 + Number ) = Number ; * ( _BYTE * ) ( v6 + Number ) = Number ; * ( _BYTE * ) ( @@v4@@ + Number ) = Number ; * ( _QWORD * ) ( @@v4@@ + Number ) = rpl_of_etx ; * ( _QWORD * ) ( v6 + Number ) = Number L ; @@v3@@ = @@a2@@ [ Number ] ; * ( _QWORD * ) v6 = * @@a2@@ ; * ( _QWORD * ) ( v6 + Number ) = @@v3@@ ; * ( _BYTE * ) ( @@v4@@ + Number ) = Number ; * ( _BYTE * ) ( @@v4@@ + Number ) = Number ; * ( _BYTE * ) ( @@v4@@ + Number ) = Number ; * ( _BYTE * ) ( @@v4@@ + Number ) = Number ; * ( _WORD * ) ( @@v4@@ + Number ) = Number ; * ( _WORD * ) ( @@v4@@ + Number ) = Number ; * ( _BYTE * ) ( @@v4@@ + Number ) = Number ; * ( _WORD * ) ( @@v4@@ + Number ) = Number ; * ( _WORD * ) ( v6 + Number ) = * ( _WORD * ) ( @@v4@@ + Number ) ; if ( v6 != * ( _QWORD * ) ( @@v4@@ + Number ) ) { if ( * ( _QWORD * ) ( @@v4@@ + Number ) ) { rpl_remove_routes ( * ( _QWORD * ) ( @@v4@@ + Number ) ) ; * ( _BYTE * ) ( * ( _QWORD * ) ( @@v4@@ + Number ) + Number L ) = Number ; } } * ( _QWORD * ) ( @@v4@@ + Number ) = v6 ; * ( _BYTE * ) ( @@v4@@ + Number ) = Number ; ( * ( void ( __fastcall * * ) ( __int64 ) ) ( * ( _QWORD * ) ( @@v4@@ + Number ) + Number L ) ) ( @@v4@@ ) ; default_instance = @@v4@@ ; rpl_reset_dio_timer ( @@v4@@ ) ; return v6 ; }", "source": [{"n": "v3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "_QWORD"}, "location": "r64"}, {"n": "v7", "t": {"T": 1, "n": "char", "s": 1}, "location": "s1"}, {"n": "v4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}]} {"name": "check_prefix", "code": "void __fastcall check_prefix ( unsigned __int8 * @@a1@@ , unsigned __int8 * @@a2@@ ) { _QWORD @@v2@@ [ Number ] ; __int64 @@v3@@ ; if ( ! @@a1@@ || ! @@a2@@ || @@a1@@ [ Number ] != @@a2@@ [ Number ] || memcmp ( @@a1@@ , @@a2@@ , @@a2@@ [ Number ] >> Number ) || @@a1@@ [ Number ] != @@a2@@ [ Number ] ) { if ( @@a1@@ ) { set_ip_from_prefix ( @@v2@@ , @@a1@@ ) ; @@v3@@ = uip_ds6_addr_lookup ( @@v2@@ ) ; if ( @@v3@@ ) uip_ds6_addr_rm ( @@v3@@ ) ; } if ( @@a2@@ ) { set_ip_from_prefix ( @@v2@@ , @@a2@@ ) ; if ( ! uip_ds6_addr_lookup ( @@v2@@ ) ) uip_ds6_addr_add ( @@v2@@ , Number L , Number ) ; } } }", "source": [{"n": "a1", "t": {"T": 3, "t": "unsigned __int8"}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "unsigned __int8"}, "location": "r64"}, {"n": "v2", "t": {"T": 2, "n": 3, "s": 8, "t": "_QWORD"}, "location": "s32"}, {"n": "v3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s8"}]} {"name": "rpl_free_instance", "code": "__int64 __fastcall rpl_free_instance ( __int64 @@a1@@ ) { __int64 @@result@@ ; unsigned __int64 @@i@@ ; for ( @@i@@ = @@a1@@ + Number ; @@i@@ < @@a1@@ + Number ; @@i@@ += Number L ) { if ( * ( _BYTE * ) ( @@i@@ + Number ) ) rpl_free_dag ( @@i@@ ) ; } rpl_set_default_route ( @@a1@@ , Number L ) ; ctimer_stop ( @@a1@@ + Number ) ; ctimer_stop ( @@a1@@ + Number ) ; if ( @@a1@@ == default_instance ) default_instance = Number L ; @@result@@ = @@a1@@ ; * ( _BYTE * ) ( @@a1@@ + Number ) = Number ; return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "i", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]}