{"name": "ospf_external_lsa_body_set", "code": "__int64 __fastcall ospf_external_lsa_body_set ( __int64 @@a1@@ , unsigned __int8 * @@a2@@ , __int64 @@a3@@ ) { int v3 ; int v4 ; uint32_t v5 ; unsigned int v6 ; unsigned int @@v9@@ ; unsigned int @@v10@@ ; uint32_t @@v11@@ ; int @@v12@@ ; int @@v13@@ ; unsigned __int8 * @@v14@@ ; @@v14@@ = @@a2@@ + Number ; masklen2ip ( @@a2@@ [ Number ] , & @@v10@@ ) ; stream_put_ipv4 ( @@a1@@ , @@v10@@ ) ; if ( ( unsigned int ) is_prefix_default ( @@a2@@ + Number ) ) v3 = Number ; else v3 = * @@a2@@ ; @@v13@@ = v3 ; if ( * ( ( _DWORD * ) @@a2@@ + Number ) == Number ) v4 = metric_type ( @@a3@@ , @@v13@@ ) ; else v4 = * ( ( _DWORD * ) @@a2@@ + Number ) ; @@v12@@ = v4 ; if ( * ( ( _DWORD * ) @@a2@@ + Number ) == Number ) v5 = metric_value ( @@a3@@ , @@v13@@ ) ; else v5 = * ( ( _DWORD * ) @@a2@@ + Number ) ; @@v11@@ = v5 ; if ( @@v12@@ == Number ) v6 = Number ; else v6 = Number ; stream_putc ( @@a1@@ , v6 ) ; stream_put_ospf_metric ( @@a1@@ , @@v11@@ ) ; @@v9@@ = ospf_external_lsa_nexthop_get ( @@a3@@ , * ( ( _DWORD * ) @@a2@@ + Number ) ) ; stream_put_ipv4 ( @@a1@@ , @@v9@@ ) ; return stream_putl ( @@a1@@ , Number L ) ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "unsigned __int8"}, "location": "r64"}, {"n": "v13", "t": {"T": 1, "n": "int", "s": 4}, "location": "s12"}, {"n": "v12", "t": {"T": 1, "n": "int", "s": 4}, "location": "s16"}, {"n": "v11", "t": {"T": 1, "n": "uint32_t", "s": 4}, "location": "s20"}, {"n": "v10", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s24"}, {"n": "v9", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s28"}, {"n": "v14", "t": {"T": 3, "t": "unsigned __int8"}, "location": "s8"}]}
{"name": "stream_put_ospf_metric", "code": "__int64 __fastcall stream_put_ospf_metric ( __int64 @@a1@@ , uint32_t @@a2@@ ) { uint32_t @@v3@@ ; __int64 @@v4@@ ; @@v3@@ = htonl ( @@a2@@ ) ; @@v4@@ = ( __int64 ) & @@v3@@ + Number ; return stream_put ( @@a1@@ , ( char * ) & @@v3@@ + Number , Number L ) ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "uint32_t", "s": 4}, "location": "r64"}, {"n": "v3", "t": {"T": 1, "n": "uint32_t", "s": 4}, "location": "s12"}, {"n": "v4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s8"}]} {"name": "ospf_external_lsa_nexthop_get", "code": "__int64 __fastcall ospf_external_lsa_nexthop_get ( __int64 @@a1@@ , unsigned int @@a2@@ ) { char @@v3@@ [ Number ] ; unsigned int @@v4@@ ; unsigned int @@v5@@ ; __int64 @@v6@@ ; __int64 * @@i@@ ; @@v5@@ = Number ; if ( ! @@a2@@ ) return @@v5@@ ; @@v3@@ [ Number ] = Number ; @@v4@@ = @@a2@@ ; @@v3@@ [ Number ] = Number ; for ( @@i@@ = * * ( __int64 * * * ) ( @@a1@@ + Number ) ; @@i@@ ; @@i@@ = ( __int64 * ) * @@i@@ ) { @@v6@@ = @@i@@ [ Number ] ; if ( ( unsigned int ) if_is_up ( * ( _QWORD * ) ( @@v6@@ + Number ) ) && * * ( _BYTE * * ) ( @@v6@@ + Number ) == Number && ( unsigned int ) prefix_match ( * ( _QWORD * ) ( @@v6@@ + Number ) , @@v3@@ ) ) { return @@a2@@ ; } } return @@v5@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r64"}, {"n": "v6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}, {"n": "v5", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s20"}, {"n": "v4", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s40"}, {"n": "v3", "t": {"T": 2, "n": 8, "s": 1, "t": "char"}, "location": "s48"}, {"n": "i", "t": {"T": 3, "t": "__int64"}, "location": "s8"}]} {"name": "metric_type", "code": "__int64 __fastcall metric_type ( __int64 @@a1@@ , unsigned __int8 @@a2@@ ) { __int64 @@result@@ ; if ( * ( int * ) ( @@a1@@ + Number * ( @@a2@@ + Number L ) ) < Number ) @@result@@ = Number L ; else @@result@@ = * ( unsigned int * ) ( @@a1@@ + Number * ( @@a2@@ + 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"}]} {"name": "metric_value", "code": "__int64 __fastcall metric_value ( __int64 @@a1@@ , unsigned __int8 @@a2@@ ) { __int64 @@result@@ ; if ( * ( int * ) ( @@a1@@ + Number * ( @@a2@@ + Number L ) + Number ) >= Number ) return * ( unsigned int * ) ( @@a1@@ + Number * ( @@a2@@ + Number L ) + Number ) ; if ( @@a2@@ == Number ) { if ( * ( _DWORD * ) ( @@a1@@ + Number ) == Number ) @@result@@ = Number L ; else @@result@@ = Number L ; } else if ( * ( int * ) ( @@a1@@ + Number ) >= Number ) { @@result@@ = * ( unsigned int * ) ( @@a1@@ + Number ) ; } else { @@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"}]} {"name": "ospf_external_lsa_new", "code": "struct timeval * __fastcall ospf_external_lsa_new ( __int64 @@a1@@ , unsigned __int8 * @@a2@@ , int * @@a3@@ ) { int @@v5@@ ; struct timeval * @@v6@@ ; int @@v7@@ ; _WORD * @@src@@ ; __int64 @@v9@@ ; if ( ! @@a2@@ ) { if ( ( term_debug_ospf_lsa & Number ) != Number ) zlog_warn ( String ) ; return Number L ; } if ( ( term_debug_ospf_lsa & Number ) != Number ) zlog_info ( String ) ; if ( @@a3@@ ) { @@v5@@ = * @@a3@@ ; LABEL_13 : @@v9@@ = stream_new ( Number L ) ; @@src@@ = * ( _WORD * * ) ( @@v9@@ + Number ) ; lsa_header_set ( @@v9@@ , Number , Number , @@v5@@ , * ( _DWORD * ) @@a1@@ ) ; ospf_external_lsa_body_set ( @@v9@@ , @@a2@@ , @@a1@@ ) ; @@v7@@ = stream_get_endp ( @@v9@@ ) ; @@src@@ [ Number ] = htons ( @@v7@@ ) ; @@v6@@ = ospf_lsa_new ( ) ; @@v6@@ [ Number ] . tv_usec = Number L ; LOBYTE ( @@v6@@ -> tv_sec ) |= Number ; @@v6@@ -> tv_usec = ( __suseconds_t ) ospf_lsa_data_new ( @@v7@@ ) ; memcpy ( ( void * ) @@v6@@ -> tv_usec , @@src@@ , @@v7@@ ) ; stream_free ( @@v9@@ ) ; return @@v6@@ ; } @@v5@@ = ospf_lsa_unique_id ( @@a1@@ , * ( _QWORD * ) ( @@a1@@ + Number ) , Number L , @@a2@@ + Number ) ; if ( @@v5@@ != Number ) goto LABEL_13 ; if ( ( term_debug_ospf_lsa & Number ) != Number ) zlog_info ( String ) ; return Number L ; }", "source": [{"n": "a3", "t": {"T": 3, "t": "int"}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "unsigned __int8"}, "location": "r64"}, {"n": "src", "t": {"T": 3, "t": "_WORD"}, "location": "s16"}, {"n": "v7", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}, {"n": "v6", "t": {"T": 3, "t": "struct timeval"}, "location": "s32"}, {"n": "v5", "t": {"T": 1, "n": "int", "s": 4}, "location": "s36"}, {"n": "v9", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s8"}]} {"name": "is_prefix_default", "code": "__int64 __fastcall is_prefix_default ( __int64 @@a1@@ ) { char @@v2@@ [ Number ] ; int @@v3@@ ; @@v2@@ [ Number ] = Number ; @@v3@@ = Number ; @@v2@@ [ Number ] = Number ; return prefix_same ( @@a1@@ , @@v2@@ ) ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v2", "t": {"T": 2, "n": 8, "s": 1, "t": "char"}, "location": "s16"}, {"n": "v3", "t": {"T": 1, "n": "int", "s": 4}, "location": "s8"}]}