{"name": "__add_probe_trace_events", "code": "__int64 __fastcall _add_probe_trace_events ( char * * @@a1@@ , __int64 @@a2@@ , int @@a3@@ , unsigned __int8 @@a4@@ ) { __int64 result ; const char * v5 ; __int64 @@v6@@ ; int @@i@@ ; int @@v10@@ ; _BYTE @@fd@@ [ Number ] ; char * s ; char * sa ; char * v14 ; char * v15 ; __int64 @@v16@@ ; char @@v17@@ [ Number ] ; unsigned __int64 @@v18@@ ; @@v18@@ = __readfsqword ( Number ) ; * ( _DWORD * ) & @@fd@@ [ Number ] = Number ; * ( _QWORD * ) @@fd@@ = ( unsigned int ) open_kprobe_events ( Number ) ; if ( * ( int * ) @@fd@@ < Number ) return * ( unsigned int * ) @@fd@@ ; @@v16@@ = get_probe_trace_event_names ( * ( int * ) @@fd@@ , Number ) ; if ( @@v16@@ ) { @@v10@@ = Number ; if ( @@a3@@ <= Number ) v5 = String ; else v5 = String ; printf ( String , v5 ) ; for ( @@i@@ = Number ; @@i@@ < @@a3@@ ; ++ @@i@@ ) { * ( _QWORD * ) & @@fd@@ [ Number ] = ( ( __int64 ) @@i@@ << Number ) + @@a2@@ ; if ( * @@a1@@ ) s = * @@a1@@ ; else s = @@a1@@ [ Number ] ? @@a1@@ [ Number ] : * ( _QWORD * ) ( * ( _QWORD * ) & @@fd@@ [ Number ] + Number L ) ; v14 = @@a1@@ [ Number ] ? @@a1@@ [ Number ] : String ; @@v10@@ = get_new_event_name ( @@v17@@ , Number , s , @@v16@@ , @@a4@@ , @@v6@@ ) ; if ( @@v10@@ < Number ) break ; * * ( _QWORD * * ) & @@fd@@ [ Number ] = strdup ( @@v17@@ ) ; * ( _QWORD * ) ( * ( _QWORD * ) & @@fd@@ [ Number ] + Number L ) = strdup ( v14 ) ; if ( ! * * ( _QWORD * * ) & @@fd@@ [ Number ] || ! * ( _QWORD * ) ( * ( _QWORD * ) & @@fd@@ [ Number ] + Number L ) ) { @@v10@@ = Number ; break ; } @@v10@@ = write_probe_trace_event ( * ( int * ) @@fd@@ , * ( __int64 * ) & @@fd@@ [ Number ] ) ; if ( @@v10@@ < Number ) break ; strlist__add ( @@v16@@ , @@v17@@ ) ; sa = * @@a1@@ ; v15 = @@a1@@ [ Number ] ; * @@a1@@ = * * ( char * * * ) & @@fd@@ [ Number ] ; @@a1@@ [ Number ] = * ( char * * ) ( * ( _QWORD * ) & @@fd@@ [ Number ] + Number L ) ; show_perf_probe_event ( ( __int64 ) @@a1@@ ) ; * @@a1@@ = sa ; @@a1@@ [ Number ] = v15 ; @@a4@@ = Number ; } if ( @@v10@@ >= Number ) { puts ( String ) ; printf ( String , * ( const char * * ) ( * ( _QWORD * ) & @@fd@@ [ Number ] + Number L ) , * * ( const char * * * ) & @@fd@@ [ Number ] ) ; } strlist__delete ( @@v16@@ ) ; close ( * ( int * ) @@fd@@ ) ; result = ( unsigned int ) @@v10@@ ; } else { eprintf ( Number L , String ) ; result = Number L ; } return result ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "int", "s": 4}, "location": "r16"}, {"n": "a4", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "r24"}, {"n": "a1", "t": {"T": 3, "t": "char *"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "v6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r80"}, {"n": "fd", "t": {"T": 2, "n": 12, "s": 1, "t": "_BYTE"}, "location": "s116"}, {"n": "v10", "t": {"T": 1, "n": "int", "s": 4}, "location": "s120"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s124"}, {"n": "v18", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}, {"n": "v17", "t": {"T": 2, "n": 72, "s": 1, "t": "char"}, "location": "s80"}, {"n": "v16", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s88"}]}
{"name": "open_kprobe_events", "code": "__int64 __fastcall open_kprobe_events ( unsigned __int8 @@a1@@ ) { __int64 @@v1@@ ; __int64 @@v2@@ ; __int64 result ; int * v4 ; char * v5 ; int @@v6@@ ; __int64 @@v7@@ ; char @@file@@ [ Number ] ; unsigned __int64 @@v9@@ ; @@v9@@ = __readfsqword ( Number ) ; @@v7@@ = debugfs_find_mountpoint ( ) ; if ( @@v7@@ ) { @@v6@@ = e_snprintf ( @@file@@ , Number , String , @@v7@@ , @@v1@@ , @@v2@@ ) ; if ( @@v6@@ >= Number ) { eprintf ( Number L , String , @@file@@ , @@a1@@ ) ; if ( @@a1@@ && probe_event_dry_run != Number ) @@v6@@ = open64 ( @@file@@ , Number , Number L ) ; else @@v6@@ = open64 ( @@file@@ , Number , Number L ) ; } if ( @@v6@@ < Number ) { if ( * _errno_location ( ) == Number ) { eprintf ( Number L , String ) ; } else { v4 = _errno_location ( ) ; v5 = strerror ( * v4 ) ; eprintf ( Number L , String , v5 ) ; } } result = ( unsigned int ) @@v6@@ ; } else { eprintf ( Number L , String ) ; result = Number L ; } return result ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "r56"}, {"n": "v1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r72"}, {"n": "v2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r80"}, {"n": "file", "t": {"T": 2, "n": 4104, "s": 1, "t": "char"}, "location": "s4112"}, {"n": "v7", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s4120"}, {"n": "v6", "t": {"T": 1, "n": "int", "s": 4}, "location": "s4124"}, {"n": "v9", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"name": "show_perf_probe_event", "code": "__int64 __fastcall show_perf_probe_event ( __int64 @@a1@@ ) { __int64 v1 ; __int64 @@v3@@ ; __int64 v4 ; int @@i@@ ; int @@v6@@ ; char * @@ptr@@ ; char @@v8@@ [ Number ] ; unsigned __int64 @@v9@@ ; @@v9@@ = __readfsqword ( Number ) ; @@ptr@@ = synthesize_perf_probe_point ( @@a1@@ + Number ) ; if ( ! @@ptr@@ ) return Number L ; @@v6@@ = e_snprintf ( @@v8@@ , Number , String , * ( _QWORD * ) ( @@a1@@ + Number ) , * ( _QWORD * ) @@a1@@ , v1 ) ; if ( @@v6@@ < Number ) return ( unsigned int ) @@v6@@ ; printf ( String , @@v8@@ , @@ptr@@ ) ; if ( * ( int * ) ( @@a1@@ + Number ) > Number ) { printf ( String ) ; for ( @@i@@ = Number ; @@i@@ < * ( _DWORD * ) ( @@a1@@ + Number ) ; ++ @@i@@ ) { @@v6@@ = synthesize_perf_probe_arg ( ( __int64 * ) ( * ( _QWORD * ) ( @@a1@@ + Number ) + Number L * @@i@@ ) , @@v8@@ , Number , * ( _QWORD * ) ( @@a1@@ + Number ) + Number L * @@i@@ , @@v3@@ , v4 ) ; if ( @@v6@@ < Number ) break ; printf ( String , @@v8@@ ) ; } } puts ( String ) ; free ( @@ptr@@ ) ; return ( unsigned int ) @@v6@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r72"}, {"n": "v8", "t": {"T": 2, "n": 136, "s": 1, "t": "char"}, "location": "s144"}, {"n": "ptr", "t": {"T": 3, "t": "char"}, "location": "s152"}, {"n": "v6", "t": {"T": 1, "n": "int", "s": 4}, "location": "s156"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s160"}, {"n": "v9", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"name": "get_probe_trace_event_names", "code": "__int64 __fastcall get_probe_trace_event_names ( int @@a1@@ , char @@a2@@ ) { __int64 @@v2@@ ; int @@v4@@ ; __int64 @@i@@ ; __int64 @@v6@@ ; __int64 @@v7@@ ; __int64 @@s@@ [ Number ] ; char @@v9@@ [ Number ] ; unsigned __int64 @@v10@@ ; @@v10@@ = __readfsqword ( Number ) ; @@v4@@ = Number ; memset ( @@s@@ , Number , sizeof ( @@s@@ ) ) ; @@v6@@ = get_probe_trace_command_rawlist ( @@a1@@ ) ; @@v7@@ = strlist__new ( Number L , Number L ) ; for ( @@i@@ = strlist__first ( @@v6@@ ) ; @@i@@ ; @@i@@ = strlist__next ( @@i@@ ) ) { @@v4@@ = parse_probe_trace_command ( * ( const char * * ) ( @@i@@ + Number ) , ( __int64 ) @@s@@ ) ; if ( @@v4@@ < Number ) break ; if ( @@a2@@ ) { @@v4@@ = e_snprintf ( @@v9@@ , Number , String , @@s@@ [ Number ] , @@s@@ [ Number ] , @@v2@@ ) ; if ( @@v4@@ >= Number ) @@v4@@ = strlist__add ( @@v7@@ , @@v9@@ ) ; } else { @@v4@@ = strlist__add ( @@v7@@ , @@s@@ [ Number ] ) ; } clear_probe_trace_event ( ( __int64 ) @@s@@ ) ; if ( @@v4@@ < Number ) break ; } strlist__delete ( @@v6@@ ) ; if ( @@v4@@ >= Number ) return @@v7@@ ; strlist__delete ( @@v7@@ ) ; return Number L ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "int", "s": 4}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "char", "s": 1}, "location": "r64"}, {"n": "v2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r80"}, {"n": "v9", "t": {"T": 2, "n": 136, "s": 1, "t": "char"}, "location": "s144"}, {"n": "s", "t": {"T": 2, "n": 8, "s": 8, "t": "__int64"}, "location": "s208"}, {"n": "v7", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s216"}, {"n": "v6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s224"}, {"n": "i", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s232"}, {"n": "v4", "t": {"T": 1, "n": "int", "s": 4}, "location": "s236"}, {"n": "v10", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"name": "write_probe_trace_event", "code": "__int64 __fastcall write_probe_trace_event ( int @@a1@@ , __int64 @@a2@@ ) { __int64 result ; size_t v3 ; int * v4 ; char * v5 ; int @@v6@@ ; char * @@s@@ ; @@v6@@ = Number ; @@s@@ = synthesize_probe_trace_command ( @@a2@@ ) ; if ( @@s@@ ) { eprintf ( Number L , String , @@s@@ ) ; if ( probe_event_dry_run != Number ) { v3 = strlen ( @@s@@ ) ; @@v6@@ = write ( @@a1@@ , @@s@@ , v3 ) ; if ( @@v6@@ <= Number ) { v4 = _errno_location ( ) ; v5 = strerror ( * v4 ) ; eprintf ( Number L , String , v5 ) ; } } free ( @@s@@ ) ; result = ( unsigned int ) @@v6@@ ; } else { eprintf ( Number L , String ) ; result = Number L ; } return result ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "int", "s": 4}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "s", "t": {"T": 3, "t": "char"}, "location": "s16"}, {"n": "v6", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}]} {"name": "get_new_event_name", "code": "__int64 __fastcall get_new_event_name ( char * @@a1@@ , size_t @@a2@@ , const char * @@a3@@ , __int64 @@a4@@ , __int64 @@a5@@ , __int64 @@a6@@ ) { char * v6 ; __int64 result ; __int64 v8 ; char @@v9@@ ; int @@i@@ ; int @@v13@@ ; @@v9@@ = @@a5@@ ; @@v13@@ = e_snprintf ( @@a1@@ , @@a2@@ , String , ( __int64 ) @@a3@@ , @@a5@@ , @@a6@@ ) ; if ( @@v13@@ >= Number ) { if ( ! strlist__has_entry ( @@a4@@ , ( __int64 ) @@a1@@ ) ) { result = Number L ; } else if ( @@v9@@ != Number ) { eprintf ( Number L , String , @@a3@@ ) ; result = Number L ; } else { for ( @@i@@ = Number ; @@i@@ <= Number ; ++ @@i@@ ) { @@v13@@ = e_snprintf ( @@a1@@ , @@a2@@ , String , ( __int64 ) @@a3@@ , ( unsigned int ) @@i@@ , v8 ) ; if ( @@v13@@ < Number ) goto LABEL_2 ; if ( ! strlist__has_entry ( @@a4@@ , ( __int64 ) @@a1@@ ) ) break ; } if ( @@i@@ == Number ) { eprintf ( Number L , String ) ; @@v13@@ = Number ; } result = ( unsigned int ) @@v13@@ ; } } else { LABEL_2 : v6 = strerror ( - @@v13@@ ) ; eprintf ( Number L , String , v6 ) ; result = ( unsigned int ) @@v13@@ ; } return result ; }", "source": [{"n": "a3", "t": {"T": 3, "t": "const char"}, "location": "r16"}, {"n": "a4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r24"}, {"n": "a1", "t": {"T": 3, "t": "char"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "size_t", "s": 8}, "location": "r64"}, {"n": "a5", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r72"}, {"n": "a6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r80"}, {"n": "v13", "t": {"T": 1, "n": "int", "s": 4}, "location": "s12"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s16"}, {"n": "v9", "t": {"T": 1, "n": "char", "s": 1}, "location": "s52"}]}