{"name": "make_valid_path", "code": "_BOOL8 __fastcall make_valid_path ( const char * @@a1@@ , __mode_t @@a2@@ ) { char * @@v2@@ ; struct stat @@v4@@ ; char * @@file@@ ; _BOOL4 @@v6@@ ; void * @@ptr@@ ; @@ptr@@ = Number L ; @@v2@@ = strdup ( @@a1@@ ) ; @@file@@ = ( char * ) stripslash ( @@v2@@ ) ; if ( stat ( @@file@@ , & @@v4@@ ) ) { @@ptr@@ = dirname ( @@file@@ ) ; if ( ( unsigned int ) make_valid_path ( @@ptr@@ , @@a2@@ ) ) @@v6@@ = mkdir ( @@file@@ , @@a2@@ ) >= Number ; else @@v6@@ = Number ; } else { @@v6@@ = ( @@v4@@ . st_mode & Number ) == Number ; } if ( @@ptr@@ ) free ( @@ptr@@ ) ; if ( @@file@@ ) free ( @@file@@ ) ; return @@v6@@ ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "const char"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__mode_t", "s": 4}, "location": "r64"}, {"n": "v2", "t": {"T": 3, "t": "char"}, "location": "r8"}, {"n": "v6", "t": {"T": 1, "n": "_BOOL4", "s": 4}, "location": "s12"}, {"n": "v4", "t": {"T": 6, "n": "struct stat", "l": [{"T": 4, "n": "st_dev", "t": "__dev_t", "s": 8}, {"T": 4, "n": "st_ino", "t": "__ino_t", "s": 8}, {"T": 4, "n": "st_nlink", "t": "__nlink_t", "s": 8}, {"T": 4, "n": "st_mode", "t": "__mode_t", "s": 4}, {"T": 4, "n": "st_uid", "t": "__uid_t", "s": 4}, {"T": 4, "n": "st_gid", "t": "__gid_t", "s": 4}, {"T": 4, "n": "__pad0", "t": "int", "s": 4}, {"T": 4, "n": "st_rdev", "t": "__dev_t", "s": 8}, {"T": 4, "n": "st_size", "t": "__off_t", "s": 8}, {"T": 4, "n": "st_blksize", "t": "__blksize_t", "s": 8}, {"T": 4, "n": "st_blocks", "t": "__blkcnt_t", "s": 8}, {"T": 4, "n": "st_atim", "t": "timespec", "s": 16}, {"T": 4, "n": "st_mtim", "t": "timespec", "s": 16}, {"T": 4, "n": "st_ctim", "t": "timespec", "s": 16}, {"T": 4, "n": "__unused", "t": "__syscall_slong_t[3]", "s": 24}]}, "location": "s176"}, {"n": "file", "t": {"T": 3, "t": "char"}, "location": "s24"}, {"n": "ptr", "t": {"T": 3, "t": "void"}, "location": "s8"}]}
{"name": "dirname", "code": "char * __fastcall dirname ( const char * @@a1@@ ) { const char * v1 ; char * result ; char * @@ptr@@ ; char * @@v4@@ ; @@ptr@@ = strdup ( @@a1@@ ) ; v1 = ( const char * ) stripslash ( @@ptr@@ ) ; @@v4@@ = strrchr ( v1 , Number ) ; if ( @@v4@@ ) { if ( @@v4@@ == @@ptr@@ && * @@ptr@@ == Number ) ++ @@v4@@ ; * @@v4@@ = Number ; result = @@ptr@@ ; } else { free ( @@ptr@@ ) ; result = strdup ( String ) ; } return result ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "const char"}, "location": "r56"}, {"n": "ptr", "t": {"T": 3, "t": "char"}, "location": "s16"}, {"n": "v4", "t": {"T": 3, "t": "char"}, "location": "s8"}]} {"name": "stripslash", "code": "const char * __fastcall stripslash ( const char * @@a1@@ ) { int @@i@@ ; for ( @@i@@ = strlen ( @@a1@@ ) ; @@i@@ > Number && @@a1@@ [ @@i@@ - Number ] == Number ; @@a1@@ [ @@i@@ ] = Number ) -- @@i@@ ; return @@a1@@ ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "const char"}, "location": "r56"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s4"}]}