{"name": "get_age", "code": "__int64 __fastcall get_age ( __int64 @@a1@@ ) { int @@v1@@ ; __int64 @@v2@@ ; __int64 @@v3@@ ; struct timeval @@tv@@ ; gettimeofday ( & @@tv@@ , Number L ) ; @@v1@@ = ntohs ( * * ( _WORD * * ) ( @@a1@@ + Number ) ) ; @@v2@@ = tv_sub ( @@tv@@ . tv_sec , @@tv@@ . tv_usec , * ( _QWORD * ) ( @@a1@@ + Number ) , * ( _QWORD * ) ( @@a1@@ + Number ) ) ; return @@v1@@ + ( unsigned int ) tv_floor ( @@v2@@ , @@v3@@ ) ; }", "source": [{"n": "v1", "t": {"T": 1, "n": "int", "s": 4}, "location": "r104"}, {"n": "v3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "tv", "t": {"T": 6, "n": "struct timeval", "l": [{"T": 4, "n": "tv_sec", "t": "__time_t", "s": 8}, {"T": 4, "n": "tv_usec", "t": "__suseconds_t", "s": 8}]}, "location": "s48"}]}
{"name": "tv_floor", "code": "__int64 __fastcall tv_floor ( __int64 @@a1@@ , __int64 @@a2@@ ) { return tv_adjust ( @@a1@@ , @@a2@@ ) ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}]} {"name": "tv_sub", "code": "__int64 __fastcall tv_sub ( __int64 @@a1@@ , __int64 @@a2@@ , __int64 @@a3@@ , __int64 @@a4@@ ) { return tv_adjust ( @@a1@@ - @@a3@@ , @@a2@@ - @@a4@@ ) ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r16"}, {"n": "a4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r24"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}]} {"name": "ospf_external_lsa_flush", "code": "__int64 __fastcall ospf_external_lsa_flush ( __int64 @@a1@@ , __int64 @@a2@@ , __int64 @@a3@@ ) { unsigned int v3 ; char * v4 ; __int64 result ; unsigned int v6 ; char * v7 ; __int64 @@v9@@ ; if ( ( term_debug_ospf_lsa & Number ) != Number ) { v3 = * ( unsigned __int8 * ) ( @@a3@@ + Number ) ; v4 = inet_ntoa ( * ( struct in_addr * ) ( @@a3@@ + Number ) ) ; zlog_info ( String , v4 , v3 ) ; } @@v9@@ = ospf_external_info_find_lsa ( @@a1@@ , @@a3@@ ) ; if ( @@v9@@ ) { ospf_ls_retransmit_delete_nbr_as ( @@a1@@ , @@v9@@ ) ; if ( ( int ) get_age ( @@v9@@ ) <= Number && ( unsigned int ) get_age ( @@v9@@ ) != Number ) { ospf_refresher_unregister_lsa ( @@a1@@ , @@v9@@ ) ; ospf_lsa_flush_as ( @@a1@@ , @@v9@@ ) ; } result = term_debug_ospf_lsa & Number ; if ( ( term_debug_ospf_lsa & Number ) != Number ) result = zlog_info ( String ) ; } else { result = term_debug_ospf_lsa & Number ; if ( ( term_debug_ospf_lsa & Number ) != Number ) { v6 = * ( unsigned __int8 * ) ( @@a3@@ + Number ) ; v7 = inet_ntoa ( * ( struct in_addr * ) ( @@a3@@ + Number ) ) ; result = zlog_warn ( String , v7 , v6 ) ; } } return result ; }", "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": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "v9", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}]} {"name": "ospf_lsa_install", "code": "__int64 __fastcall ospf_lsa_install ( __int64 @@a1@@ , __int64 @@a2@@ , __int64 @@a3@@ ) { const char * v4 ; char * v5 ; char * v6 ; const char * v7 ; char * v8 ; char * v9 ; char @@dest@@ [ Number ] ; __int64 @@v12@@ ; int @@v13@@ ; __int64 @@v14@@ ; __int64 @@v15@@ ; @@v15@@ = Number L ; @@v12@@ = Number L ; @@v14@@ = Number L ; if ( * ( _BYTE * ) ( * ( _QWORD * ) ( @@a3@@ + Number ) + Number L ) == Number ) @@v14@@ = * ( _QWORD * ) ( @@a1@@ + Number ) ; else @@v14@@ = * ( _QWORD * ) ( * ( _QWORD * ) ( @@a3@@ + Number ) + Number L ) ; if ( ! @@v14@@ ) _assert_fail ( String , String , Number , String ) ; @@v12@@ = ospf_lsdb_lookup ( @@v14@@ , @@a3@@ ) ; @@v13@@ = Number ; if ( ! @@v12@@ || ( unsigned int ) ospf_lsa_different ( @@v12@@ , @@a3@@ ) ) @@v13@@ = Number ; if ( @@v12@@ ) ospf_discard_from_db ( @@a1@@ , @@v14@@ , @@a3@@ ) ; ospf_lsdb_add ( @@v14@@ , @@a3@@ ) ; * ( _QWORD * ) ( @@a3@@ + Number ) = @@v14@@ ; if ( ( * ( _BYTE * ) @@a3@@ & Number ) != Number ) ospf_lsa_checksum ( * ( _QWORD * ) ( @@a3@@ + Number ) ) ; switch ( * ( _BYTE * ) ( * ( _QWORD * ) ( @@a3@@ + Number ) + Number L ) ) { case Number : @@v15@@ = ospf_router_lsa_install ( @@a1@@ , @@a3@@ , @@v13@@ ) ; break ; case Number : if ( ! @@a2@@ ) _assert_fail ( String , String , Number , String ) ; @@v15@@ = ( __int64 ) ospf_network_lsa_install ( @@a1@@ , @@a2@@ , ( _BYTE * ) @@a3@@ , @@v13@@ ) ; break ; case Number : @@v15@@ = ( __int64 ) ospf_summary_lsa_install ( @@a1@@ , ( _BYTE * ) @@a3@@ , @@v13@@ ) ; break ; case Number : @@v15@@ = ( __int64 ) ospf_summary_asbr_lsa_install ( @@a1@@ , ( _BYTE * ) @@a3@@ , @@v13@@ ) ; break ; case Number : @@v15@@ = ( __int64 ) ospf_external_lsa_install ( @@a1@@ , ( _BYTE * ) @@a3@@ , @@v13@@ ) ; break ; default : break ; } if ( ! @@v15@@ ) return Number L ; if ( ( term_debug_ospf_lsa & Number ) != Number ) { if ( * ( _BYTE * ) ( * ( _QWORD * ) ( @@a3@@ + Number ) + Number L ) == Number ) { v4 = ( const char * ) mes_lookup ( & ospf_lsa_type_msg , ospf_lsa_type_msg_max , * ( unsigned __int8 * ) ( * ( _QWORD * ) ( @@v15@@ + Number ) + Number L ) ) ; v5 = dump_lsa_key ( @@v15@@ ) ; zlog_info ( String , v5 , v4 ) ; } else { v6 = inet_ntoa ( * ( struct in_addr * ) ( * ( _QWORD * ) ( @@v15@@ + Number ) + Number L ) ) ; strcpy ( @@dest@@ , v6 ) ; v7 = ( const char * ) mes_lookup ( & ospf_lsa_type_msg , ospf_lsa_type_msg_max , * ( unsigned __int8 * ) ( * ( _QWORD * ) ( @@v15@@ + Number ) + Number L ) ) ; v8 = dump_lsa_key ( @@v15@@ ) ; zlog_info ( String , v8 , v7 , @@dest@@ ) ; } } if ( ( ( int ) get_age ( @@v15@@ ) > Number || ( unsigned int ) get_age ( @@v15@@ ) == Number ) && ( * ( _BYTE * ) @@v15@@ & Number ) == Number ) { if ( ( term_debug_ospf_lsa & Number ) != Number ) { v9 = inet_ntoa ( * ( struct in_addr * ) ( * ( _QWORD * ) ( @@v15@@ + Number ) + Number L ) ) ; zlog_info ( String , * ( unsigned __int8 * ) ( * ( _QWORD * ) ( @@v15@@ + Number ) + Number L ) , v9 ) ; } ospf_lsa_maxage ( @@a1@@ , @@a3@@ ) ; } return @@v15@@ ; }", "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": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "v15", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}, {"n": "v14", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s32"}, {"n": "v13", "t": {"T": 1, "n": "int", "s": 4}, "location": "s36"}, {"n": "v12", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s48"}, {"n": "dest", "t": {"T": 2, "n": 16, "s": 1, "t": "char"}, "location": "s64"}]} {"name": "ospf_lsa_maxage_walker_remover", "code": "__int64 __fastcall ospf_lsa_maxage_walker_remover ( __int64 @@a1@@ , _QWORD * @@a2@@ ) { char * @@v2@@ ; if ( ( ( int ) get_age ( ( __int64 ) @@a2@@ ) > Number || ( unsigned int ) get_age ( ( __int64 ) @@a2@@ ) == Number ) && ! ( unsigned int ) ospf_lsa_is_self_originated ( @@a1@@ , @@a2@@ ) ) { if ( ( term_debug_ospf_lsa & Number ) != Number ) { @@v2@@ = dump_lsa_key ( ( __int64 ) @@a2@@ ) ; zlog_info ( String , @@v2@@ ) ; } if ( * ( _BYTE * ) ( @@a2@@ [ Number ] + Number L ) == Number ) ospf_ase_incremental_update ( @@a1@@ , @@a2@@ ) ; else ospf_spf_calculate_schedule ( @@a1@@ ) ; ospf_lsa_maxage ( @@a1@@ , @@a2@@ ) ; } return Number L ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "_QWORD"}, "location": "r64"}, {"n": "v2", "t": {"T": 3, "t": "char"}, "location": "r8"}]} {"name": "ospf_lsa_more_recent", "code": "__int64 __fastcall ospf_lsa_more_recent ( __int64 @@a1@@ , __int64 @@a2@@ ) { int v3 ; int v4 ; int v5 ; int v6 ; int v7 ; unsigned int @@v8@@ ; signed int @@v9@@ ; signed int @@v10@@ ; if ( ! @@a1@@ && ! @@a2@@ ) return Number L ; if ( ! @@a1@@ ) return Number ; if ( ! @@a2@@ ) return Number L ; @@v10@@ = ntohl ( * ( _DWORD * ) ( * ( _QWORD * ) ( @@a1@@ + Number ) + Number L ) ) ; @@v9@@ = ntohl ( * ( _DWORD * ) ( * ( _QWORD * ) ( @@a2@@ + Number ) + Number L ) ) ; if ( @@v10@@ > @@v9@@ ) return Number L ; if ( @@v10@@ < @@v9@@ ) return Number ; v3 = ntohs ( * ( _WORD * ) ( * ( _QWORD * ) ( @@a1@@ + Number ) + Number L ) ) ; @@v8@@ = v3 - ntohs ( * ( _WORD * ) ( * ( _QWORD * ) ( @@a2@@ + Number ) + Number L ) ) ; if ( @@v8@@ ) return @@v8@@ ; if ( ( ( int ) get_age ( @@a1@@ ) > Number || ( unsigned int ) get_age ( @@a1@@ ) == Number ) && ( int ) get_age ( @@a2@@ ) <= Number && ( unsigned int ) get_age ( @@a2@@ ) != Number ) { return Number L ; } if ( ( int ) get_age ( @@a1@@ ) <= Number && ( unsigned int ) get_age ( @@a1@@ ) != Number && ( ( int ) get_age ( @@a2@@ ) > Number || ( unsigned int ) get_age ( @@a2@@ ) == Number ) ) { return Number ; } if ( ( int ) get_age ( @@a1@@ ) > Number ) v4 = Number ; else v4 = get_age ( @@a1@@ ) ; if ( ( int ) get_age ( @@a2@@ ) > Number ) v5 = Number ; else v5 = get_age ( @@a2@@ ) ; if ( v4 - v5 > Number ) return Number ; if ( ( int ) get_age ( @@a2@@ ) > Number ) v6 = Number ; else v6 = get_age ( @@a2@@ ) ; if ( ( int ) get_age ( @@a1@@ ) > Number ) v7 = Number ; else v7 = get_age ( @@a1@@ ) ; return v6 - v7 > Number ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "v10", "t": {"T": 1, "n": "signed int", "s": 4}, "location": "s20"}, {"n": "v9", "t": {"T": 1, "n": "signed int", "s": 4}, "location": "s24"}, {"n": "v8", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s28"}]} {"name": "ospf_lsa_different", "code": "_BOOL8 __fastcall ospf_lsa_different ( __int64 @@a1@@ , __int64 @@a2@@ ) { uint16_t @@v3@@ ; __int64 @@v4@@ ; __int64 @@v5@@ ; if ( ! @@a1@@ ) _assert_fail ( String , String , Number , String ) ; if ( ! @@a2@@ ) _assert_fail ( String , String , Number , String ) ; if ( ! * ( _QWORD * ) ( @@a1@@ + Number ) ) _assert_fail ( String , String , Number , String ) ; if ( ! * ( _QWORD * ) ( @@a2@@ + Number ) ) _assert_fail ( String , String , Number , String ) ; if ( * ( _BYTE * ) ( * ( _QWORD * ) ( @@a1@@ + Number ) + Number L ) != * ( _BYTE * ) ( * ( _QWORD * ) ( @@a2@@ + Number ) + Number L ) ) return Number L ; if ( ( ( int ) get_age ( @@a1@@ ) > Number || ( unsigned int ) get_age ( @@a1@@ ) == Number ) && ( int ) get_age ( @@a2@@ ) <= Number && ( unsigned int ) get_age ( @@a2@@ ) != Number ) { return Number L ; } if ( ( ( int ) get_age ( @@a2@@ ) > Number || ( unsigned int ) get_age ( @@a2@@ ) == Number ) && ( int ) get_age ( @@a1@@ ) <= Number && ( unsigned int ) get_age ( @@a1@@ ) != Number ) { return Number L ; } if ( * ( _WORD * ) ( * ( _QWORD * ) ( @@a1@@ + Number ) + Number L ) != * ( _WORD * ) ( * ( _QWORD * ) ( @@a2@@ + Number ) + Number L ) ) return Number L ; if ( ! * ( _WORD * ) ( * ( _QWORD * ) ( @@a1@@ + Number ) + Number L ) ) return Number L ; if ( * ( _WORD * ) ( * ( _QWORD * ) ( @@a1@@ + Number ) + Number L ) <= Number ) _assert_fail ( String , String , Number , String ) ; @@v5@@ = * ( _QWORD * ) ( @@a1@@ + Number ) ; @@v4@@ = * ( _QWORD * ) ( @@a2@@ + Number ) ; @@v3@@ = ntohs ( * ( _WORD * ) ( @@v5@@ + Number ) ) ; return memcmp ( ( const void * ) ( @@v5@@ + Number ) , ( const void * ) ( @@v4@@ + Number ) , @@v3@@ - Number ) != Number ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "v3", "t": {"T": 1, "n": "uint16_t", "s": 2}, "location": "r8"}, {"n": "v4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}, {"n": "v5", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s8"}]} {"name": "ospf_refresher_register_lsa", "code": "__int64 __fastcall ospf_refresher_register_lsa ( __int64 @@a1@@ , __int64 @@a2@@ ) { __int64 result ; int v3 ; __int16 v4 ; unsigned int v5 ; __int64 v6 ; unsigned __int16 @@v7@@ ; int @@v8@@ ; if ( ( * ( _BYTE * ) @@a2@@ & Number ) == Number ) _assert_fail ( String , String , Number , String ) ; result = * ( unsigned int * ) ( @@a2@@ + Number ) ; if ( ( int ) result < Number ) { if ( ( int ) get_age ( @@a2@@ ) > Number || ( unsigned int ) get_age ( @@a2@@ ) || ntohl ( * ( _DWORD * ) ( * ( _QWORD * ) ( @@a2@@ + Number ) + Number L ) ) != Number ) { if ( ( int ) get_age ( @@a2@@ ) > Number ) v3 = Number ; else v3 = Number - get_age ( @@a2@@ ) ; @@v8@@ = v3 + random ( ) % Number ; } else { @@v8@@ = random ( ) % Number + Number ; } if ( @@v8@@ < Number ) @@v8@@ = Number ; v4 = * ( _WORD * ) ( @@a1@@ + Number ) ; @@v7@@ = ( @@v8@@ / Number + ( unsigned __int16 ) ( v4 + ( __int16 ) ( time ( Number L ) - * ( _WORD * ) ( @@a1@@ + Number ) ) / Number ) ) % Number ; if ( ( term_debug_ospf_lsa & Number ) != Number ) { if ( ( int ) get_age ( @@a2@@ ) > Number ) v5 = Number ; else v5 = get_age ( @@a2@@ ) ; zlog_info ( String , v5 , @@v7@@ ) ; } if ( ! * ( _QWORD * ) ( @@a1@@ + Number * ( @@v7@@ + Number L ) + Number ) ) * ( _QWORD * ) ( @@a1@@ + Number * ( @@v7@@ + Number L ) + Number ) = list_new ( ) ; v6 = ospf_lsa_lock ( @@a2@@ ) ; listnode_add ( * ( _QWORD * ) ( @@a1@@ + Number * ( @@v7@@ + Number L ) + Number ) , v6 ) ; result = @@a2@@ ; * ( _DWORD * ) ( @@a2@@ + Number ) = @@v7@@ ; } 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": "v8", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}, {"n": "v7", "t": {"T": 1, "n": "unsigned __int16", "s": 2}, "location": "s24"}]}