input
stringlengths
16
454k
output
stringlengths
13
350k
function_name
stringlengths
1
100
repo_name
stringlengths
6
43
category
stringclasses
76 values
sample_id
stringlengths
22
88
decompiler
stringclasses
1 value
opt_level
stringclasses
1 value
bool parse_sizet(const std_string *value, size_t *out) { const char *v2; char *endp[2]; endp[1] = (char *)__readfsqword(0x28u); v2 = (const char *)std_string_c_str(value); *out = strtoull(v2, endp, 10); return endp[0] && !*endp[0]; }
static inline bool parse_sizet(const std::string &value, size_t &out) { char *endp; out = strtoull(value.c_str(), &endp, 10); return (endp && *endp == 0); }
parse_sizet
pmbw-0.6.3
app-benchmarks
O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot
ida
O0
void plot_data_bandwidth(std_ostream *datass, const Result *r) { unsigned int M_n; long v3; double v4; double v5; long v6; long v7; long v8; M_n = std_setprecision(20)._M_n; v3 = std_operator < < <char, std_char_traits<char>>(datass, M_n); v4 = std_log<unsigned long>(r->testsize); v5 = v4 / std_l...
void plot_data_bandwidth(std::ostream &datass, const Result &r) { datass << std::setprecision(20) << log(r.testsize) / log(2) << "\t" << r.bandwidth / 1024 / 1024 / 1024 << "\n"; }
plot_data_bandwidth
pmbw-0.6.3
app-benchmarks
O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot
ida
O0
void plot_data_latency(std_ostream *datass, const Result *r) { unsigned int M_n; long v3; double v4; __gnu_cxx___enable_if<true, double> ___type v5; long v6; long v7; long v8; M_n = std_setprecision(20)._M_n; v3 = std_operator < < <char, std_char_traits<char>>(datass, M_n); v4 = std_log<unsigned lo...
void plot_data_latency(std::ostream &datass, const Result &r) { datass << std::setprecision(20) << log(r.testsize) / log(2) << "\t" << r.rate * 1e9 << "\n"; }
plot_data_latency
pmbw-0.6.3
app-benchmarks
O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot
ida
O0
void plot_funcname_iteration(std_ostream *os, filter_type filter, data_print_func print_func) { long v4; long v5; long v6; long v7; long v8; bool v9; long v10; bool v11; size_t ctestsize; size_t i; const Result *r; std_vector<std_string> plotlines; std_string cfunc...
void plot_funcname_iteration(std::ostream &os, filter_type filter, data_print_func print_func) { std::ostringstream datass; std::vector<std::string> plotlines; std::string cfuncname; size_t ctestsize = 0; for (size_t i = 0; i < g_results.size(); ++i) { const Result &r = g_res...
plot_funcname_iteration
pmbw-0.6.3
app-benchmarks
O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot
ida
O0
void plot_parallel(std_ostream *os) { const std_string *v1; std_vector<std_string> _const_iterator it; __gnu_cxx___normal_iterator<std_string *, std_vector<std_string>> __i; size_t i; std_string funcname; unsigned long v6; v6 = __readfsqword(0x28u); for (i = 0; funclist[i]; ++i) { std_allocator<cha...
void plot_parallel(std::ostream &os) { for (size_t i = 0; funclist[i]; ++i) { plot_parallel_funcname(os, funclist[i]); } for (std::vector<std::string>::const_iterator it = g_unknown_funclist.begin(); it != g_unknown_funclist.end(); ++it) { plot_parallel_funcname(os, *it); } }
plot_parallel
pmbw-0.6.3
app-benchmarks
O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot
ida
O0
void plot_parallel_funcname(std_ostream *os, const std_string *funcname) { long v2; long v3; long v4; long v5; long v6; long v7; long v8; long v9; long v10; long v11; long v12; long v13; long v14; long v15; long v16; long v17; long v18; long v19; long v20; long v21; long v22; ...
void plot_parallel_funcname(std::ostream &os, const std::string &funcname) { P("set key top right"); P("set title '" << g_hostname << " - Parallel Memory Bandwidth - " << funcname); P("set ylabel 'Bandwidth [GiB/s]'"); plot_parallel_iteration(os, funcname, plot_data_bandwidth); P("set key t...
plot_parallel_funcname
pmbw-0.6.3
app-benchmarks
O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot
ida
O0
void plot_parallel_iteration(std_ostream *os, const std_string *funcname, data_print_func print_func) { long v3; long v4; long v5; long v6; long v7; long v8; long v9; bool v10; bool v11; size_t cnthreads; size_t ctestsize; size_t i; const Result *r; std_vector<st...
void plot_parallel_iteration(std::ostream &os, const std::string &funcname, data_print_func print_func) { std::ostringstream datass; std::vector<std::string> plotlines; size_t cnthreads = 0; size_t ctestsize = 0; for (size_t i = 0; i < g_results.size(); ++i) { const Result &r...
plot_parallel_iteration
pmbw-0.6.3
app-benchmarks
O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot
ida
O0
void plot_parallel_speedup_bandwidth(std_ostream *os, const std_string *funcname, double *avgspeedup) { long v3; long v4; long v5; long v6; long v7; long v8; long v9; bool v10; long v11; long v12; long v13; long v14; lon...
void plot_parallel_speedup_bandwidth(std::ostream &os, const std::string &funcname, double &avgspeedup) { std::ostringstream datass; std::vector<std::string> plotlines; size_t cnthreads = 0; size_t ctestsize = 0; avgspeedup = 0; size...
plot_parallel_speedup_bandwidth
pmbw-0.6.3
app-benchmarks
O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot
ida
O0
void plot_sequential(std_ostream *os) { long v1; long v2; long v3; long v4; long v5; long v6; long v7; long v8; long v9; long v10; long v11; long v12; long v13; long v14; long v15; long v16; long v17; long v18; long v19; long v20; long v21; v1 = std_operator < < <std_char_tr...
void plot_sequential(std::ostream &os) { P("set key top right"); P("set title '" << g_hostname << " - One Thread Memory Bandwidth'"); P("set ylabel 'Bandwidth [GiB/s]'"); P("set yrange [0:*]"); plot_funcname_iteration(os, filter_sequential, plot_data_bandwidth); P("set key top left"); P("set title '" << ...
plot_sequential
pmbw-0.6.3
app-benchmarks
O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot
ida
O0
void process_file(const char *path) { long v1; long v2; long v3; int *v4; char *v5; long v6; _BYTE v7[256]; _QWORD v8[35]; v8[33] = __readfsqword(0x28u); std_ifstream_basic_ifstream(v7, path, 8); if ((unsigned char)std_ios_good(v8) != 1) { v1 = std_operator < < <std_char_traits<char>>(&std_ce...
void process_file(const char *path) { std::ifstream in(path); if (!in.good()) { ERR("Error opening file " << path << ": " << strerror(errno)); return; } return process_stream(in); }
process_file
pmbw-0.6.3
app-benchmarks
O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot
ida
O0
bool process_line(const std_string *line) { bool v1; bool v2; bool v3; long v4; long v5; std_string_size_type splitpos; std_string_size_type splitprev; std_string_size_type equalpos; std_string keyvalue; std_string key; std_string value; Result result; unsigned long v14; v14 = __readfsqword...
bool process_line(const std::string &line) { std::string::size_type splitpos = line.find('\t'); if (splitpos == std::string::npos) return false; if (line.substr(0, splitpos) != "RESULT") return false; struct Result result; do { std::string::size_type splitprev = splitpos + 1; splitpos = lin...
process_line
pmbw-0.6.3
app-benchmarks
O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot
ida
O0
void process_stream(std_istream *in) { _QWORD *v1; long v2; long v3; std_string line; unsigned long v5; v5 = __readfsqword(0x28u); std_string_basic_string(&line); while (1) { v1 = (_QWORD *)std_getline<char, std_char_traits<char>, std_allocator<char>>( in, &line); if (!(unsi...
void process_stream(std::istream &in) { std::string line; while (std::getline(in, line)) { if (!process_line(line)) { WARN("Non-RESULT line: " << line); } } }
process_stream
pmbw-0.6.3
app-benchmarks
O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot
ida
O0
SymTab AddSymbol(STRPTR Sym, ULONG Val, BOOL SetUp) { SymTabType *ST; SymTab S; ST = SymBase; S = (SymTab)calloc(1u, 0xB0u); if (!S) Error((STRPTR) "Out of memory (AddSymbol)"); strcpy((char *)S, (const char *)Sym); if (SetUp) { S->Val = Val; S->SetUp = 1; } if (ST) InsertIntoTree(ST,...
SymTab AddSymbol(STRPTR Sym, ULONG Val, BOOL SetUp) { SymTab ST, S; ST = SymBase; S = (SymTab)calloc(1, sizeof(struct SymTabType)); if (!S) Error("Out of memory (AddSymbol)", FALSE); strcpy(S->Name, Sym); if (SetUp) { S->Val = Val; S->SetUp = TRUE; } if (ST) InsertIntoTree(ST, S); ...
AddSymbol
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
STRPTR CollectSym(STRPTR p, STRPTR Str) { unsigned int v2; WORD v3; WORD i; BOOL Loop; i = 0; Loop = 1; do { v2 = *p; if (v2 <= 0x3B && ((1LL << v2) & 0x800100100000600LL) != 0) { Loop = 0; } else { v3 = i++; Str[v3] = *p++; } } while (Loop); Str[i] = 0; return p; ...
STRPTR CollectSym(STRPTR p, STRPTR Str) { WORD i = 0; BOOL Loop = TRUE; do { switch (*p) { case ' ': case ',': case '\t': case ';': case '\n': Loop = FALSE; break; default: Str[i++] = *p; p++; } } while (Loop); Str[i] = 0; return p; }
CollectSym
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
void DelSTab(SymTab S) { if (S) { DelSTab(S->Left); DelSTab(S->Right); free(S); } }
VOID DelSTab(SymTab S) { if (S) { DelSTab(S->Left); DelSTab(S->Right); free(S); } }
DelSTab
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
void DeleteSymbolTable() { if (SymBase) DelSTab(SymBase); SymBase = 0; }
VOID DeleteSymbolTable() { if (SymBase) DelSTab(SymBase); SymBase = (SymTab)NULL; }
DeleteSymbolTable
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
void DisplaySymbolTable(BOOL NotFound) { DoTitle = NotFound; SDisplay(SymBase, NotFound); }
VOID DisplaySymbolTable(BOOL NotFound) { DoTitle = NotFound; SDisplay(SymBase, NotFound); }
DisplaySymbolTable
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
void DoDecode1() { BOOL Found; ULONG i; ULONG Ind; SymTab ST; char Keyword[32]; char Sym[32]; char Txt[88]; unsigned long v7; v7 = __readfsqword(0x28u); ptr = CollectSym(ptr, (STRPTR)Keyword); i = 0; Found = 0; while (!Found && Decode1Table[i]) { if (!strcasecmp(Keyword, (const char *)Dec...
VOID DoDecode1() { ULONG i, Ind; BOOL Found; UBYTE Keyword[20], Txt[80], Sym[STABNAMESIZE]; SymTab ST; ptr = CollectSym(ptr, Keyword); for (i = 0, Found = FALSE; !Found && Decode1Table[i]; i++) { if (stricmp(Keyword, Decode1Table[i]) == 0) { Ind = i; Found = TRUE; } } if (!Found) ...
DoDecode1
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
void DoDecode2() { BOOL Found; ULONG i; ULONG Ind; SymTab ST; char Keyword[32]; char Sym[32]; char Txt[88]; unsigned long v7; v7 = __readfsqword(0x28u); ptr = CollectSym(ptr, (STRPTR)Keyword); i = 0; Found = 0; while (!Found && Decode2Table[i]) { if (!strcasecmp(Keyword, (const char *)Dec...
VOID DoDecode2() { ULONG i, Ind; BOOL Found; UBYTE Keyword[20], Txt[80], Sym[STABNAMESIZE]; SymTab ST; ptr = CollectSym(ptr, Keyword); for (i = 0, Found = FALSE; !Found && Decode2Table[i]; i++) { if (stricmp(Keyword, Decode2Table[i]) == 0) { Ind = i; Found = TRUE; } } if (!Found) ...
DoDecode2
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
void DoMicroCode() { ULONG i; ULONG ia; ULONG ib; ULONG ic; ULONG ig; ULONG id; ULONG ie; ULONG Ind; ULONG Inda; ULONG Indb; ULONG Indc; ULONG Indd; ULONG Inde; char Keyword[32]; char Txt[88]; unsigned long v15; v15 = __readfsqword(0x28u); if (*ptr != 44) HandleSymbol(0); ++pt...
VOID DoMicroCode() { ULONG i, Ind; UBYTE Keyword[20], Txt[80]; if (*ptr != ',') HandleSymbol(FALSE); ptr++; SkipWhitespace(); if (*ptr != ',') { ptr = CollectSym(ptr, Keyword); for (i = 0, Ind = INVALID; Ind == INVALID && Dest[i]; i++) if (stricmp(Keyword, Dest[i]) == 0) Ind = ...
DoMicroCode
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
void Error(STRPTR Msg) { if (Line[0]) { fputs((const char *)Line, stderr); fprintf(stderr, "Error: Line %d ", LineNo); } fprintf(stderr, "%s\n", (const char *)Msg); if (ESym) { puts("\nLabel table"); DisplaySymbolTable(0); } DeleteSymbolTable(); fclose(In); exit(20); }
VOID Error(STRPTR Msg) { if (strlen(Line)) { fprintf(stderr, "%s", Line); fprintf(stderr, "Error: Line %d ", LineNo); } fprintf(stderr, "%s\n", Msg); if (ESym) { printf("\nLabel table\n"); DisplaySymbolTable(FALSE); } DeleteSymbolTable(); fclose(In); exit(20); }
Error
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
SymTab FSymbol(SymTab ST, STRPTR Name) { WORD cmp; if (!ST) return 0; cmp = strcmp((const char *)Name, (const char *)ST); if (!cmp) return ST; if (cmp >= 0) return FSymbol(ST->Right, Name); return FSymbol(ST->Left, Name); }
SymTab FSymbol(SymTab ST, STRPTR Name) { WORD cmp; if (!ST) return (SymTab)NULL; cmp = strcmp(Name, ST->Name); if (cmp == 0) return ST; if (cmp < 0) return FSymbol(ST->Left, Name); else return FSymbol(ST->Right, Name); }
FSymbol
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
SymTab FindSymbol(STRPTR Sym) { return FSymbol(SymBase, Sym); }
SymTab FindSymbol(STRPTR Sym) { return FSymbol(SymBase, Sym); }
FindSymbol
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
BOOL HandleSymbol(BOOL Jump) { UBYTE v2; UBYTE NoRefs; SymTab ST; UBYTE Sym[32]; char Txt[88]; unsigned long v7; v7 = __readfsqword(0x28u); CollectSym(ptr, Sym); ST = FindSymbol(Sym); SkipToWhitespace(); SkipWhitespace(); if (ST) { if (ST->SetUp && !Jump) { sprintf(Txt, "Multiple defi...
BOOL HandleSymbol(BOOL Jump) { SymTab ST; UBYTE Txt[80], Sym[STABNAMESIZE]; STRPTR p; p = ptr; p = CollectSym(p, Sym); ST = FindSymbol(Sym); SkipToWhitespace(); SkipWhitespace(); if (!ST) { if (strlen(Sym) == 0) return FALSE; ST = AddSymbol(Sym, Addr, !Jump); } else if (ST->SetUp ...
HandleSymbol
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
void InsertIntoTree(SymTab ST, SymTab S) { WORD cmp; cmp = strcmp((const char *)ST, (const char *)S); if (cmp) { if (cmp >= 0) { if (ST->Left) InsertIntoTree(ST->Left, S); else ST->Left = S; } else if (ST->Right) { InsertIntoTree(ST->Right, S); } else { ST->Rig...
VOID InsertIntoTree(SymTab ST, SymTab S) { WORD cmp = strcmp(ST->Name, S->Name); if (cmp == 0) { ST->Val = S->Val; free(S); } else if (cmp < 0) { if (!ST->Right) ST->Right = S; else InsertIntoTree(ST->Right, S); } else { if (!ST->Left) ST->Left = S; else InsertI...
InsertIntoTree
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
void SDisplay(SymTab ST, BOOL NotFound) { UWORD i; if (ST) { SDisplay(ST->Left, NotFound); if (NotFound && DoTitle && !ST->SetUp) { DoTitle = 0; puts("\nUnresolved labels"); } if (!NotFound || !ST->SetUp) { printf("%-10s = %d Line %d", (const char *)ST, ST->Val, ST->LineNo); ...
VOID SDisplay(SymTab ST, BOOL NotFound) { UWORD i; if (!ST) return; SDisplay(ST->Left, NotFound); if (NotFound && DoTitle && !ST->SetUp) { DoTitle = FALSE; printf("\nUnresolved labels\n"); } if (!NotFound || !ST->SetUp) { printf("%-10s = %d Line %d", ST->Name, ST->Val, ST->LineNo); ...
SDisplay
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
void SetJump(SymTab ST) { UWORD i; char Txt[88]; unsigned long v3; v3 = __readfsqword(0x28u); if (ST) { SetJump(ST->Left); if (!ST->SetUp) { sprintf(Txt, "Label <%s> never defined\n", (const char *)ST); Error((STRPTR)Txt); } if (ST->NoRefs) { for (i = 0; i < ST->NoRefs; ++i)...
VOID SetJump(SymTab ST) { UWORD i; UBYTE Txt[80]; if (!ST) return; SetJump(ST->Left); if (!ST->SetUp) { sprintf(Txt, "Label <%s> never defined\n", ST->Name); Error(Txt); } if (ST->NoRefs) for (i = 0; i < ST->NoRefs; i++) MicroJump[ST->Refs[i]] = ST->Val; SetJump(ST->Right); }
SetJump
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
void SetJumps() { SetJump(SymBase); }
VOID SetJumps() { SetJump(SymBase); }
SetJumps
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
void ShowTables() { UWORD i; UWORD ia; UWORD ib; UWORD j; ULONG Mc; UBYTE Conv1[4]; UBYTE Conv2[4]; unsigned long v7; v7 = __readfsqword(0x28u); puts("TABLES\n\nMicrocode"); for (i = 0; i < Addr; ++i) { if (LittleEndian) { *(_DWORD *)Conv1 = Microcode[i]; for (j = 0; j <= 3u; ++j)...
VOID ShowTables() { UWORD i, j; UBYTE Conv1[4], Conv2[4]; ULONG Mc; printf("TABLES\n\nMicrocode\n"); for (i = 0; i < Addr; i++) { if (LittleEndian) { memcpy(Conv1, &Microcode[i], 4); for (j = 0; j < 4; j++) Conv2[3 - j] = Conv1[j]; memcpy(&Mc, Conv2, 4); } else Mc =...
ShowTables
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
void SkipToWhitespace() { unsigned int v0; BOOL Loop; Loop = 1; do { v0 = *ptr; if (v0 <= 0x3B && ((1LL << v0) & 0x800100100000600LL) != 0) Loop = 0; else ++ptr; } while (Loop); }
VOID SkipToWhitespace() { BOOL Loop = TRUE; do { switch (*ptr) { case ' ': case ',': case '\t': case ';': case '\n': Loop = FALSE; break; default: ptr++; } } while (Loop); }
SkipToWhitespace
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
void SkipWhitespace() { while (*ptr == 32 || *ptr == 9) ++ptr; }
VOID SkipWhitespace() { while (*ptr == ' ' || *ptr == '\t') ptr++; }
SkipWhitespace
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
void WriteTables(STRPTR FName) { UWORD i; UWORD j; FILE *o; UBYTE Conv1[4]; UBYTE Conv2[4]; char Txt[88]; unsigned long v7; v7 = __readfsqword(0x28u); Line[0] = 0; o = fopen((const char *)FName, "wb"); if (!o) { sprintf(Txt, "Cannot open output microcode file '%s'", (const char *)FName); ...
VOID WriteTables(STRPTR FName) { UWORD i, j; FILE *o; UBYTE Conv1[4], Conv2[4], Txt[80]; Line[0] = 0; o = fopen(FName, "wb"); if (!o) { sprintf(Txt, "Cannot open output microcode file '%s'", FName); Error(Txt); } for (i = 0; i < MICROSIZE; i++) { if (LittleEndian) { memcpy(Conv1, &...
WriteTables
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
int main(int argc, const char **argv, const char **envp) { int v3; UBYTE c; BOOL MainLoop; BOOL Symbols; BOOL ShowTable; WORD AsmMode; ULONG i; ULONG ia; ULONG ib; ULONG ic; char OutName[48]; char Txt[56]; unsigned long v16; v16 = __readfsqword(0x28u); MainLoop = 1; Symbols = 0; ShowT...
int main(int argc, char **argv) { ULONG i; BOOL MainLoop = TRUE, Symbols = FALSE, ShowTable = FALSE; UBYTE LI[4], Txt[50], OutName[40] = "dlxmcode.tbl", c; WORD AsmMode = 0; i = 0x01020304; memcpy(LI, &i, 4); if (LI[0] == 4) LittleEndian = TRUE; fprintf(stderr, "\nDLX MicroAssembler, Version %s.%...
main
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/masm
ida
O0
int compat_osname(char *buffer, size_t length) { int *v2; char *v3; utsname osname; unsigned long v6; v6 = __readfsqword(0x28u); if (uname(&osname) >= 0) { snprintf(buffer, length, "%s %s %s", osname.sysname, osname.machine, osname.release); return 0; } else { v2 = __errno_locati...
int compat_osname(char *buffer, size_t length) { struct utsname osname; int error; error = uname(&osname); if (error < 0) { fprintf(stderr, "%s: error getting system information: %s", progname, strerror(errno)); return 1; } snprintf(buffer, length, "%s %s %s", osname.sysname, osname.ma...
compat_osname
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/profile2map
ida
O0
int get_creator(libspectrum_creator **creator, const char *program) { const char *v3; size_t v4; libspectrum_error error; libspectrum_error errora; libspectrum_error errorb; size_t i; char *custom; unsigned int version[4]; char osname[264]; unsigned long v12; v12 = __readfsqword(0x28u); version...
int get_creator(libspectrum_creator **creator, const char *program) { char *custom; unsigned int version[4] = {0, 0, 0, 0}; libspectrum_error error; size_t i; #ifndef WIN32 char osname[256]; int sys_error; sys_error = compat_osname(osname, sizeof(osname)); if (sys_error) return 1; #endif *creat...
get_creator
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/profile2map
ida
O0
int init_libspectrum() { const char *v1; const char *v2; if ((unsigned int)libspectrum_check_version(LIBSPECTRUM_MIN_VERSION)) return libspectrum_init() != 0; v1 = LIBSPECTRUM_MIN_VERSION; v2 = (const char *)libspectrum_version(); fprintf(stderr, "libspectrum version %s found, but %s required", v2, v1)...
int init_libspectrum(void) { if (libspectrum_check_version(LIBSPECTRUM_MIN_VERSION)) { if (libspectrum_init()) return 1; } else { fprintf(stderr, "libspectrum version %s found, but %s required", libspectrum_version(), LIBSPECTRUM_MIN_VERSION); return 1; } return 0; }
init_libspectrum
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/profile2map
ida
O0
int main(int argc, const char **argv, const char **envp) { int i; char **argva; int error; int errora; long address; long count; char *profile; char *mapfile; FILE *f; option long_options[3]; unsigned long v14; v14 = __readfsqword(0x28u); error = 0; long_options[0].name = "help"; long_opt...
int main(int argc, char **argv) { char *profile, *mapfile; FILE *f; long address, count; int ret; int c; int error = 0; struct option long_options[] = { {"help", 0, NULL, 'h'}, {"version", 0, NULL, 'V'}, {0, 0, 0, 0}}; progname = argv[0]; while ((c = getopt_long(argc, argv, "hV", long_option...
main
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/profile2map
ida
O0
int read_file(const char *filename, unsigned char **buffer, size_t *length) { int *v3; char *v4; int *v6; char *v7; int *v8; char *v9; int *v10; char *v11; int fd; size_t bytes; stat file_info; unsigned long v16; v16 = __readfsqword(0x28u); fd = open(filename, 0); if (fd == -1) { v3 =...
int read_file(const char *filename, unsigned char **buffer, size_t *length) { int fd; struct stat file_info; ssize_t bytes; if ((fd = open(filename, O_RDONLY | O_BINARY)) == -1) { fprintf(stderr, "%s: couldn't open `%s': %s\n", progname, filename, strerror(errno)); return 1; } if (fsta...
read_file
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/profile2map
ida
O0
void show_help() { printf("Usage: %s [OPTION] <profile> <map>\n" "Converts Fuse profiler output into Z80-style map format.\n" "\n" "Options:\n" " -h, --help Display this help and exit.\n" " -V, --version Output version information and exit.\n" "\n" ...
static void show_help(void) { printf("Usage: %s [OPTION] <profile> <map>\n" "Converts Fuse profiler output into Z80-style map format.\n" "\n" "Options:\n" " -h, --help Display this help and exit.\n" " -V, --version Output version information and exit.\n" "\...
show_help
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/profile2map
ida
O0
void show_version() { puts("profile2map (fuse-utils) 1.4.3\n" "Copyright (c) 2007 Stuart Brady\n" "License GPLv2+: GNU GPL version 2 or later " "<http://gnu.org/licenses/gpl.html>\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the...
static void show_version(void) { printf(PROGRAM_NAME " (" PACKAGE ") " PACKAGE_VERSION "\n" "Copyright (c) 2007 Stuart Brady\n" "License GPLv2+: GNU GPL version 2 or later " "<http://gnu.org/licenses/gpl.html>\n" "This is free software: you are free to change and redistrib...
show_version
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/profile2map
ida
O0
int write_file(const char *filename, const void *buffer, size_t length) { int *v3; char *v4; int *v6; char *v7; FILE *f; size_t bytes; f = fopen(filename, "wb"); if (f) { bytes = fwrite(buffer, 1u, length, f); if (bytes == length) { if (fclose(f)) { v6 = __errno_location(); ...
int write_file(const char *filename, const void *buffer, size_t length) { FILE *f; size_t bytes; f = fopen(filename, "wb"); if (!f) { fprintf(stderr, "%s: couldn't open `%s': %s\n", progname, filename, strerror(errno)); return 1; } bytes = fwrite(buffer, 1, length, f); if (bytes != l...
write_file
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/profile2map
ida
O0
int Scl2Trd(char *oldname, char *newname) { unsigned int v3; int v4; unsigned int v5; unsigned int v6; unsigned char blocks; unsigned char size; int i; int x; int TRD; int SCL; void *tmpscl; unsigned long left; void *TRDh; FILE *fh; unsigned char *mem; ssize_t bytes_read; void *tmp; ...
static int Scl2Trd(char *oldname, char *newname) { int TRD, SCL, i; void *TRDh = NULL; void *tmp; unsigned char *trd_fsec; unsigned char *trd_ftrk; unsigned char *trd_files; unsigned char size; char signature[8]; unsigned char blocks; char headers[256][14]; void *tmpscl = NULL; unsigned long ...
Scl2Trd
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/scl2trd
ida
O0
void init_options(options *options) { options->sclfile = 0; options->trdfile = 0; }
static void init_options(struct options *options) { options->sclfile = NULL; options->trdfile = NULL; }
init_options
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/scl2trd
ida
O0
unsigned int lsb2ui(unsigned char *mem) { return (mem[2] << 16) + (mem[1] << 8) + *mem + (mem[3] << 24); }
static unsigned int lsb2ui(unsigned char *mem) { return (mem[0] + (mem[1] * 256) + (mem[2] * 256 * 256) + (mem[3] * 256 * 256 * 256)); }
lsb2ui
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/scl2trd
ida
O0
int main(int argc, const char **argv, const char **envp) { int error; int errora; options options; unsigned long v7; v7 = __readfsqword(0x28u); progname = (char *)*argv; init_options(&options); error = parse_options(argc, (char **)argv, &options); if (error) { fprintf(stderr, "Try `%s --help' for...
int main(int argc, char **argv) { struct options options; int error; progname = argv[0]; init_options(&options); error = parse_options(argc, argv, &options); if (error) { fprintf(stderr, "Try `%s --help' for more information.\n", progname); return error; } error = Scl2Trd(options.sclfile, opt...
main
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/scl2trd
ida
O0
int parse_options(int argc, char **argv, options *options) { int i; char **argva; int argca; int unknown; option long_options[3]; unsigned long v10; v10 = __readfsqword(0x28u); unknown = 0; long_options[0].name = "help"; long_options[0].has_arg = 0; long_options[0].flag = 0; long_options[0].val...
static int parse_options(int argc, char **argv, struct options *options) { extern int optind; int c; int unknown = 0; struct option long_options[] = { {"help", 0, NULL, 'h'}, {"version", 0, NULL, 'V'}, {0, 0, 0, 0}}; while ((c = getopt_long(argc, argv, "hV", long_options, NULL)) != -1) { switc...
parse_options
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/scl2trd
ida
O0
void show_help() { printf("Usage: %s [OPTION] <sclfile> <trdfile>\n" "Convert .scl disk images to .trd disk images.\n" "\n" "Options:\n" " -h, --help Display this help and exit.\n" " -V, --version Output version information and exit.\n" "\n" "Repor...
static void show_help(void) { printf("Usage: %s [OPTION] <sclfile> <trdfile>\n" "Convert .scl disk images to .trd disk images.\n" "\n" "Options:\n" " -h, --help Display this help and exit.\n" " -V, --version Output version information and exit.\n" "\n" ...
show_help
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/scl2trd
ida
O0
void show_version() { puts("scl2trd (fuse-utils) 1.4.3\n" "Copyright (c) 2002-2007 Dmitry Sanarin, Philip Kendall and Fredrick " "Meunier\n" "License GPLv2+: GNU GPL version 2 or later " "<http://gnu.org/licenses/gpl.html>\n" "This is free software: you are free to change and redist...
static void show_version(void) { printf(PROGRAM_NAME " (" PACKAGE ") " PACKAGE_VERSION "\n" "Copyright (c) 2002-2007 Dmitry Sanarin, Philip Kendall and Fredrick " "Meunier\n" "License GPLv2+: GNU GPL version 2 or later " "<http://gnu.org/licenses/gpl.html>\n" "Thi...
show_version
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/scl2trd
ida
O0
void ui2lsb(unsigned char *mem, unsigned int value) { *mem = value; *(_WORD *)(mem + 1) = value >> 8; mem[3] = HIBYTE(value); }
static void ui2lsb(unsigned char *mem, unsigned int value) { lsb_dword ret; ret.dword = value; mem[0] = ret.b.b0; mem[1] = ret.b.b1; mem[2] = ret.b.b2; mem[3] = ret.b.b3; }
ui2lsb
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/scl2trd
ida
O0
int CloseFiles(Context *context, int success) { int *v2; char *v3; const char *v4; int *v5; char *v6; const char *v7; int is_ok; is_ok = 1; if (!context->test_integrity && context->fout) { if (!success && context->current_output_path) unlink(context->current_output_path); if (fclose(con...
static BROTLI_BOOL CloseFiles(Context *context, BROTLI_BOOL success) { BROTLI_BOOL is_ok = BROTLI_TRUE; if (!context->test_integrity && context->fout) { if (!success && context->current_output_path) { unlink(context->current_output_path); } if (fclose(context->fout) != 0) { if (success) { ...
CloseFiles
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
int CompressFile(Context *context, BrotliEncoderState *s) { BrotliEncoderOperation v3; const char *v4; _BOOL4 is_eof; is_eof = 0; InitializeBuffers(context); do { if (!context->available_in && !is_eof) { if (!ProvideInput(context)) return 0; is_eof = HasMoreInput(context) == 0; ...
static BROTLI_BOOL CompressFile(Context *context, BrotliEncoderState *s) { BROTLI_BOOL is_eof = BROTLI_FALSE; InitializeBuffers(context); for (;;) { if (context->available_in == 0 && !is_eof) { if (!ProvideInput(context)) return BROTLI_FALSE; is_eof = !HasMoreInput(context); } if ...
CompressFile
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
int CompressFiles(Context *context) { int64_t input_file_length; int is_ok; uint32_t lgwin; BrotliEncoderState *s; while (NextFile(context)) { s = BrotliEncoderCreateInstance(0, 0, 0); if (!s) { fwrite("out of memory\n", 1u, 0xEu, stderr); return 0; } BrotliEncoderSetParameter(s, ...
static BROTLI_BOOL CompressFiles(Context *context) { while (NextFile(context)) { BROTLI_BOOL is_ok = BROTLI_TRUE; BrotliEncoderState *s = BrotliEncoderCreateInstance(NULL, NULL, NULL); if (!s) { fprintf(stderr, "out of memory\n"); return BROTLI_FALSE; } BrotliEncoderSetParameter(s, BRO...
CompressFiles
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
void CopyStat(const char *input_path, const char *output_path) { int *v2; char *v3; const char *v4; int *v5; char *v6; const char *v7; int *v8; char *v9; const char *v10; utimbuf times; stat statbuf; unsigned long v13; v13 = __readfsqword(0x28u); if (input_path && output_path && !stat(input...
static void CopyStat(const char *input_path, const char *output_path) { struct stat statbuf; struct utimbuf times; int res; if (input_path == 0 || output_path == 0) { return; } if (stat(input_path, &statbuf) != 0) { return; } times.actime = statbuf.st_atime; times.modtime = statbuf.st_mtime; ...
CopyStat
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
int DecompressFile(Context *context, BrotliDecoderState *s) { const char *v2; BrotliDecoderResult result; result = BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT; InitializeBuffers(context); while (1) { if (result == BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT) { if (!HasMoreInput(context)) goto LABEL_4...
static BROTLI_BOOL DecompressFile(Context *context, BrotliDecoderState *s) { BrotliDecoderResult result = BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT; InitializeBuffers(context); for (;;) { if (result == BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT) { if (!HasMoreInput(context)) { fprintf(stderr, "corrupt ...
DecompressFile
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
int DecompressFiles(Context *context) { int is_ok; BrotliDecoderState *s; while (NextFile(context)) { s = BrotliDecoderCreateInstance(0, 0, 0); if (!s) { fwrite("out of memory\n", 1u, 0xEu, stderr); return 0; } BrotliDecoderSetParameter( s, BrotliDecoderParameter_BROTLI_DECODE...
static BROTLI_BOOL DecompressFiles(Context *context) { while (NextFile(context)) { BROTLI_BOOL is_ok = BROTLI_TRUE; BrotliDecoderState *s = BrotliDecoderCreateInstance(NULL, NULL, NULL); if (!s) { fprintf(stderr, "out of memory\n"); return BROTLI_FALSE; } BrotliDecoderSetParameter(s, ...
DecompressFiles
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
const char *FileName(const char *path) { const char *patha; char *separator_position; char *separator_positiona; patha = path; separator_position = strrchr(path, 47); if (separator_position) patha = separator_position + 1; separator_positiona = strrchr(patha, 92); if (separator_positiona) retur...
static const char *FileName(const char *path) { const char *separator_position = strrchr(path, '/'); if (separator_position) path = separator_position + 1; separator_position = strrchr(path, '\\'); if (separator_position) path = separator_position + 1; return path; }
FileName
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
int64_t FileSize(const char *path) { FILE *f; long retval; f = fopen(path, "rb"); if (!f) return -1; if (fseek(f, 0, 2)) { fclose(f); return -1; } else { retval = ftell(f); if (fclose(f)) return -1; else return retval; } }
static int64_t FileSize(const char *path) { FILE *f = fopen(path, "rb"); int64_t retval; if (f == NULL) { return -1; } if (fseek(f, 0L, SEEK_END) != 0) { fclose(f); return -1; } retval = ftell(f); if (fclose(f) != 0) { return -1; } return retval; }
FileSize
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
int FlushOutput(Context *context) { if (!WriteOutput(context)) return 0; context->available_out = 0; return 1; }
static BROTLI_BOOL FlushOutput(Context *context) { if (!WriteOutput(context)) return BROTLI_FALSE; context->available_out = 0; return BROTLI_TRUE; }
FlushOutput
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
int HasMoreInput(Context *context) { return feof(context->fin) == 0; }
static BROTLI_BOOL HasMoreInput(Context *context) { return feof(context->fin) ? BROTLI_FALSE : BROTLI_TRUE; }
HasMoreInput
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
void InitializeBuffers(Context *context) { context->available_in = 0; context->next_in = 0; context->available_out = (size_t)&loc_80000; context->next_out = context->output; context->total_in = 0; context->total_out = 0; }
static void InitializeBuffers(Context *context) { context->available_in = 0; context->next_in = NULL; context->available_out = kFileBufferSize; context->next_out = context->output; context->total_in = 0; context->total_out = 0; }
InitializeBuffers
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
int NextFile(Context *context) { const char *v2; const char *v3; char *arg; size_t v5; size_t suffix_len; char *name; unsigned long name_len; ++context->iterator; context->input_file_length = -1; if (context->input_count) { while (context->iterator == context->not_input_indices[context->ignore]...
static BROTLI_BOOL NextFile(Context *context) { const char *arg; size_t arg_len; context->iterator++; context->input_file_length = -1; if (context->input_count == 0) { if (context->iterator > 1) return BROTLI_FALSE; context->current_input_path = NULL; context->current_output_path = conte...
NextFile
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
int OpenFiles(Context *context) { int is_ok; is_ok = OpenInputFile(context->current_input_path, &context->fin); if (!context->test_integrity && is_ok) return OpenOutputFile(context->current_output_path, &context->fout, context->force_overwrite); return is_ok; }
static BROTLI_BOOL OpenFiles(Context *context) { BROTLI_BOOL is_ok = OpenInputFile(context->current_input_path, &context->fin); if (!context->test_integrity && is_ok) { is_ok = OpenOutputFile(context->current_output_path, &context->fout, context->force_overwrite); } return is_ok; ...
OpenFiles
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
int OpenInputFile(const char *input_path, FILE **f) { int *v3; char *v4; const char *v5; *f = 0; if (input_path) { *f = fopen(input_path, "rb"); if (*f) { return 1; } else { v3 = __errno_location(); v4 = strerror(*v3); v5 = PrintablePath(input_path); fprintf(stderr, ...
static BROTLI_BOOL OpenInputFile(const char *input_path, FILE **f) { *f = NULL; if (!input_path) { *f = fdopen(MAKE_BINARY(STDIN_FILENO), "rb"); return BROTLI_TRUE; } *f = fopen(input_path, "rb"); if (!*f) { fprintf(stderr, "failed to open input file [%s]: %s\n", PrintablePath(input_pa...
OpenInputFile
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
int OpenOutputFile(const char *output_path, FILE **f, int force) { int v4; int *v5; char *v6; const char *v7; *f = 0; if (output_path) { if (force) v4 = open(output_path, 577, 384); else v4 = open(output_path, 705, 384); if (v4 >= 0 && (*f = fdopen(v4, "wb")) != 0) { return 1;...
static BROTLI_BOOL OpenOutputFile(const char *output_path, FILE **f, BROTLI_BOOL force) { int fd; *f = NULL; if (!output_path) { *f = fdopen(MAKE_BINARY(STDOUT_FILENO), "wb"); return BROTLI_TRUE; } fd = open(output_path, O_CREAT | (force ? 0 : O_EXCL) | O_WRONLY | O_T...
OpenOutputFile
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
Command_0 ParseAlias(const char *name) { Command_0 result; const char *namea; char terminator; size_t unbrotli_len; unbrotli_len = strlen("unbrotli"); namea = FileName(name); result = COMMAND_COMPRESS; if (!strncmp(namea, "unbrotli", unbrotli_len)) { terminator = namea[unbrotli_len]; if (!termi...
static Command ParseAlias(const char *name) { const char *unbrotli = "unbrotli"; size_t unbrotli_len = strlen(unbrotli); name = FileName(name); if (strncmp(name, unbrotli, unbrotli_len) == 0) { char terminator = name[unbrotli_len]; if (terminator == 0 || terminator == '.') return COMMAND_DECOMPR...
ParseAlias
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
int ParseInt(const char *s, int low, int high, int *result) { char c; int value; int i; value = 0; for (i = 0; i <= 4; ++i) { c = s[i]; if (!c) break; if (s[i] <= 47 || s[i] > 57) return 0; value = 10 * value + c - 48; } if (!i) return 0; if (i > 1 && *s == 48) retur...
static BROTLI_BOOL ParseInt(const char *s, int low, int high, int *result) { int value = 0; int i; for (i = 0; i < 5; ++i) { char c = s[i]; if (c == 0) break; if (s[i] < '0' || s[i] > '9') return BROTLI_FALSE; value = (10 * value) + (c - '0'); } if (i == 0) return BROTLI_FALSE;...
ParseInt
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
Command_0 ParseParams(Context *params) { size_t v1; int v2; int v4; int v5; char c; int i; int next_option_index; int command_set; int quality_set; int output_set; int keep_set; int lgwin_set; int suffix_set; int after_dash_dash; Command_0 command; int argc; size_t input_count; size_...
static Command ParseParams(Context *params) { int argc = params->argc; char **argv = params->argv; int i; int next_option_index = 0; size_t input_count = 0; size_t longest_path_len = 1; BROTLI_BOOL command_set = BROTLI_FALSE; BROTLI_BOOL quality_set = BROTLI_FALSE; BROTLI_BOOL output_set = BROTLI_FALS...
ParseParams
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
void PrintBytes(size_t value) { double v1; if (value > 0x3FF) { if (value > 0xFFFFF) { if (value > 0x3FFFFFFF) { if ((value & 0x8000000000000000LL) != 0LL) v1 = (double)(int)(value & 1 | (value >> 1)) + (double)(int)(value & 1 | (value >> 1)); else v1 = ...
static void PrintBytes(size_t value) { if (value < 1024) { fprintf(stderr, "%d B", (int)value); } else if (value < 1048576) { fprintf(stderr, "%0.3f KiB", (double)value / 1024.0); } else if (value < 1073741824) { fprintf(stderr, "%0.3f MiB", (double)value / 1048576.0); } else { fprintf(stderr, "...
PrintBytes
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
void PrintFileProcessingProgress(Context *context) { const char *v1; v1 = PrintablePath(context->current_input_path); fprintf(stderr, "[%s]: ", v1); PrintBytes(context->total_in); fwrite(" -> ", 1u, 4u, stderr); PrintBytes(context->total_out); }
static void PrintFileProcessingProgress(Context *context) { fprintf(stderr, "[%s]: ", PrintablePath(context->current_input_path)); PrintBytes(context->total_in); fprintf(stderr, " -> "); PrintBytes(context->total_out); }
PrintFileProcessingProgress
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
void PrintHelp(const char *name, int error) { FILE *v2; FILE *media; if (error) v2 = stderr; else v2 = stdout; media = v2; fprintf(v2, "Usage: %s [OPTION]... [FILE]...\n", name); fwrite("Options:\n" " -# compression level (0-9)\n" " -c, --stdout ...
static void PrintHelp(const char *name, BROTLI_BOOL error) { FILE *media = error ? stderr : stdout; fprintf(media, "Usage: %s [OPTION]... [FILE]...\n", name); fprintf(media, "Options:\n" " -# compression level (0-9)\n" " -c, --stdout wri...
PrintHelp
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
void PrintVersion() { fprintf(stdout, "brotli %d.%d.%d\n", 1, 0, 9); }
static void PrintVersion(void) { int major = BROTLI_VERSION >> 24; int minor = (BROTLI_VERSION >> 12) & 0xFFF; int patch = BROTLI_VERSION & 0xFFF; fprintf(stdout, "brotli %d.%d.%d\n", major, minor, patch); }
PrintVersion
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
const char *PrintablePath(const char *path) { if (path) return path; else return "con"; }
static const char *PrintablePath(const char *path) { return path ? path : "con"; }
PrintablePath
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
int ProvideInput(Context *context) { int *v1; char *v2; const char *v3; context->available_in = fread(context->input, 1u, (size_t)&loc_80000, context->fin); context->total_in += context->available_in; context->next_in = context->input; if (!ferror(context->fin)) return 1; v1 = __errno_locatio...
static BROTLI_BOOL ProvideInput(Context *context) { context->available_in = fread(context->input, 1, kFileBufferSize, context->fin); context->total_in += context->available_in; context->next_in = context->input; if (ferror(context->fin)) { fprintf(stderr, "failed to read input [%s]: %s\n", ...
ProvideInput
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
int ProvideOutput(Context *context) { if (!WriteOutput(context)) return 0; context->available_out = (size_t)&loc_80000; context->next_out = context->output; return 1; }
static BROTLI_BOOL ProvideOutput(Context *context) { if (!WriteOutput(context)) return BROTLI_FALSE; context->available_out = kFileBufferSize; context->next_out = context->output; return BROTLI_TRUE; }
ProvideOutput
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
int WriteOutput(Context *context) { int *v2; char *v3; const char *v4; signed long out_size; out_size = context->next_out - context->output; context->total_out += out_size; if (!out_size) return 1; if (context->test_integrity) return 1; fwrite(context->output, 1u, out_size, context->fout); ...
static BROTLI_BOOL WriteOutput(Context *context) { size_t out_size = (size_t)(context->next_out - context->output); context->total_out += out_size; if (out_size == 0) return BROTLI_TRUE; if (context->test_integrity) return BROTLI_TRUE; fwrite(context->output, 1, out_size, context->fout); if (ferror...
WriteOutput
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
int main(int argc, const char **argv, const char **envp) { Command_0 v3; size_t longest_path_len; const char *v5; Command_0 command; int is_ok; int i; size_t modified_path_len; Context context; unsigned long v12; v12 = __readfsqword(0x28u); is_ok = 1; context.quality = 11; context.lgwin = -1;...
int main(int argc, char **argv) { Command command; Context context; BROTLI_BOOL is_ok = BROTLI_TRUE; int i; context.quality = 11; context.lgwin = -1; context.verbosity = 0; context.force_overwrite = BROTLI_FALSE; context.junk_source = BROTLI_FALSE; context.copy_stat = BROTLI_TRUE; context.test_in...
main
brotli-1.0.9-r3
app-arch
O0/app-arch/brotli-1.0.9-r3/brotli
ida
O0
void fix_snapshot(libspectrum_snap *snap) { unsigned int v1; unsigned int v2; libspectrum_byte a; libspectrum_byte aa; a = libspectrum_snap_a(snap); v1 = (unsigned char)libspectrum_snap_f(snap); libspectrum_snap_set_a(snap, v1); libspectrum_snap_set_f(snap, a); aa = libspectrum_snap_a_(snap); v2 = ...
static void fix_snapshot(libspectrum_snap *snap) { libspectrum_byte a = libspectrum_snap_a(snap); libspectrum_byte f = libspectrum_snap_f(snap); libspectrum_snap_set_a(snap, f); libspectrum_snap_set_f(snap, a); a = libspectrum_snap_a_(snap); f = libspectrum_snap_f_(snap); libspectrum_snap_set_a_(snap, f);...
fix_snapshot
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/snapconv
ida
O0
int main(int argc, const char **argv, const char **envp) { int result; const char **argva; libspectrum_id_t type; libspectrum_class_t v6; int flags; int compress; int fix; int error; int c; unsigned char *buffer; size_t length; libspectrum_creator *creator; libspectrum_snap *snap; option lon...
int main(int argc, char **argv) { libspectrum_snap *snap; libspectrum_id_t type; libspectrum_class_t class; unsigned char *buffer; size_t length; libspectrum_creator *creator; int flags; int compress = 0; int fix = 0; int error = 0; int c; struct option long_options[] = { {"help", 0, NUL...
main
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/snapconv
ida
O0
void show_help() { printf("Usage: %s [OPTION]... <infile> <outfile>\n" "Sinclair ZX Spectrum snapshot converter.\n" "\n" "Options:\n" " -c Force all data in the output snapshot to be " "compressed.\n" " -n Store uncompressed data in the o...
static void show_help(void) { printf("Usage: %s [OPTION]... <infile> <outfile>\n" "Sinclair ZX Spectrum snapshot converter.\n" "\n" "Options:\n" " -c Force all data in the output snapshot to be " "compressed.\n" " -n Store uncompressed da...
show_help
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/snapconv
ida
O0
void show_version() { puts("snapconv (fuse-utils) 1.4.3\n" "Copyright (c) 2003-2005 Philip Kendall\n" "License GPLv2+: GNU GPL version 2 or later " "<http://gnu.org/licenses/gpl.html>\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to...
static void show_version(void) { printf(PROGRAM_NAME " (" PACKAGE ") " PACKAGE_VERSION "\n" "Copyright (c) 2003-2005 Philip Kendall\n" "License GPLv2+: GNU GPL version 2 or later " "<http://gnu.org/licenses/gpl.html>\n" "This is free software: you are free to change and re...
show_version
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/snapconv
ida
O0
int add_action(GSList **actions, action_type_t type, const char *argument) { char *v4; int where; int error; const char *filename; action_t *action; unsigned long v10; v10 = __readfsqword(0x28u); action = (action_t *)malloc(0x18u); if (!action) { fprintf(stderr, "%s: out of memory at %s:%d\n", pr...
static int add_action(GSList **actions, action_type_t type, const char *argument) { int error, where; const char *filename; action_t *action; action = malloc(sizeof(*action)); if (!action) { fprintf(stderr, "%s: out of memory at %s:%d\n", progname, __func__, __LINE__); ...
add_action
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/rzxtool
ida
O0
void apply_action(void *data, void *user_data) { unsigned int v2; int where; where = *((_QWORD *)data + 1); v2 = *(_DWORD *)data; if (*(_DWORD *)data == 3) { libspectrum_rzx_finalise(user_data); } else { if (v2 > 3) goto LABEL_10; if (v2 == 2) { insert_snap((libspectrum_rzx *)user_d...
static void apply_action(void *data, void *user_data) { const action_t *action = data; libspectrum_rzx *rzx = user_data; int where = action->where; switch (action->type) { case ACTION_DELETE_BLOCK: delete_block(rzx, where); break; case ACTION_EXTRACT_SNAP: extract_snap(rzx, where, action->filen...
apply_action
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/rzxtool
ida
O0
int delete_block(libspectrum_rzx *rzx, size_t where) { libspectrum_rzx_iterator_0 it; it = get_block(rzx, where); if (it) { libspectrum_rzx_iterator_delete(rzx, it); return 0; } else { fprintf(stderr, "%s: not enough blocks in RZX file\n", progname); return 1; } }
static int delete_block(libspectrum_rzx *rzx, size_t where) { libspectrum_rzx_iterator it; it = get_block(rzx, where); if (!it) { fprintf(stderr, "%s: not enough blocks in RZX file\n", progname); return 1; } libspectrum_rzx_iterator_delete(rzx, it); return 0; }
delete_block
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/rzxtool
ida
O0
int extract_snap(libspectrum_rzx *rzx, size_t where, const char *filename) { int e; libspectrum_rzx_iterator_0 it; libspectrum_snap *snap; it = get_block(rzx, where); if (it) { snap = (libspectrum_snap *)libspectrum_rzx_iterator_get_snap(it); if (snap) { e = write_snapshot(snap, filename); ...
static int extract_snap(libspectrum_rzx *rzx, size_t where, const char *filename) { libspectrum_rzx_iterator it; libspectrum_snap *snap; int e; it = get_block(rzx, where); if (!it) { fprintf(stderr, "%s: not enough blocks in RZX file\n", progname); return 1; } snap = libs...
extract_snap
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/rzxtool
ida
O0
libspectrum_rzx_iterator_0 get_block(libspectrum_rzx *rzx, size_t where) { _GSList *it; for (it = (_GSList *)libspectrum_rzx_iterator_begin(rzx); it && where; it = (_GSList *)libspectrum_rzx_iterator_next(it)) --where; return it; }
static libspectrum_rzx_iterator get_block(libspectrum_rzx *rzx, size_t where) { libspectrum_rzx_iterator it; for (it = libspectrum_rzx_iterator_begin(rzx); it && where; where--, it = libspectrum_rzx_iterator_next(it)) ; return it; }
get_block
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/rzxtool
ida
O0
int insert_snap(libspectrum_rzx *rzx, size_t where, const char *filename) { libspectrum_snap *snap; snap = read_snap(filename); if (snap) { libspectrum_rzx_insert_snap(rzx, snap, (unsigned int)where); return 0; } else { fprintf(stderr, "%s: couldn't read `%s'\n", progname, filename); return 1; ...
static int insert_snap(libspectrum_rzx *rzx, size_t where, const char *filename) { libspectrum_snap *snap; snap = read_snap(filename); if (!snap) { fprintf(stderr, "%s: couldn't read `%s'\n", progname, filename); return 1; } libspectrum_rzx_insert_snap(rzx, snap, where); re...
insert_snap
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/rzxtool
ida
O0
int main(int argc, const char **argv, const char **envp) { int error; int errora; int errorb; int errorc; int errord; int errore; GSList *actions; unsigned char *buffer; size_t length; libspectrum_rzx *rzx; options_t options; unsigned long v15; v15 = __readfsqword(0x28u); actions = 0; buf...
int main(int argc, char *argv[]) { GSList *actions = NULL; options_t options; unsigned char *buffer = NULL; size_t length = 0; libspectrum_rzx *rzx; int error; progname = argv[0]; error = init_libspectrum(); if (error) return error; error = get_creator(&creator, "rzxtool"); if (error) r...
main
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/rzxtool
ida
O0
int parse_argument(const char *argument, int *where, const char **filename) { char *buffer; char *comma; buffer = strdup(argument); if (buffer) { comma = strchr(buffer, 44); if (comma) { *comma = 0; *where = atoi(buffer); *filename = &argument[comma + 1 - buffer]; free(buffer); ...
static int parse_argument(const char *argument, int *where, const char **filename) { char *comma; char *buffer; buffer = strdup(argument); if (!buffer) { fprintf(stderr, "%s: out of memory at %s:%d\n", progname, __func__, __LINE__); return 1; } comma = strchr(...
parse_argument
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/rzxtool
ida
O0
int parse_options(int argc, char **argv, GSList **actions, options_t *options) { int i; int v6; int v7; int error; int output_needed; option long_options[3]; unsigned long v13; v13 = __readfsqword(0x28u); error = 0; output_needed = 0; options->uncompressed = 0; long_options[0].name = "help"; ...
static int parse_options(int argc, char **argv, GSList **actions, struct options_t *options) { int c, error = 0; int output_needed = 0; options->uncompressed = 0; struct option long_options[] = { {"help", 0, NULL, 'h'}, {"version", 0, NULL, 'V'}, {0, 0, 0, 0}}; while ((c = ge...
parse_options
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/rzxtool
ida
O0
libspectrum_snap *read_snap(const char *filename) { unsigned char *buffer; size_t length; libspectrum_snap *snap; unsigned long v5; v5 = __readfsqword(0x28u); buffer = 0; length = 0; if (read_file(filename, &buffer, &length)) return 0; snap = (libspectrum_snap *)libspectrum_snap_alloc(); if ((u...
static libspectrum_snap *read_snap(const char *filename) { unsigned char *buffer = NULL; size_t length = 0; int error; libspectrum_snap *snap; if (read_file(filename, &buffer, &length)) { return NULL; } snap = libspectrum_snap_alloc(); error = libspectrum_snap_read(snap, buffer, length, LIBSPECTR...
read_snap
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/rzxtool
ida
O0
void show_help() { printf("Usage: %s [OPTION]... <rzxfile> [<outfile>]\n" "Modify Sinclair ZX Spectrum input recording files.\n" "\n" "Options:\n" " -d <block> Delete block number.\n" " -e <block>,<filename>\n" " The snapshot in the specified...
static void show_help(void) { printf("Usage: %s [OPTION]... <rzxfile> [<outfile>]\n" "Modify Sinclair ZX Spectrum input recording files.\n" "\n" "Options:\n" " -d <block> Delete block number.\n" " -e <block>,<filename>\n" " The snapshot in th...
show_help
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/rzxtool
ida
O0
void show_version() { puts("rzxtool (fuse-utils) 1.4.3\n" "Copyright (c) 2007-2014 Philip Kendall\n" "License GPLv2+: GNU GPL version 2 or later " "<http://gnu.org/licenses/gpl.html>\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to ...
static void show_version(void) { printf(PROGRAM_NAME " (" PACKAGE ") " PACKAGE_VERSION "\n" "Copyright (c) 2007-2014 Philip Kendall\n" "License GPLv2+: GNU GPL version 2 or later " "<http://gnu.org/licenses/gpl.html>\n" "This is free software: you are free to change and re...
show_version
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/rzxtool
ida
O0
int write_rzx(const char *filename, libspectrum_rzx *rzx, int compressed) { int error; int errora; unsigned char *buffer; size_t length[2]; length[1] = __readfsqword(0x28u); buffer = 0; length[0] = 0; error = libspectrum_rzx_write(&buffer, length, rzx, 0, creator, (unsig...
static int write_rzx(const char *filename, libspectrum_rzx *rzx, int compressed) { unsigned char *buffer = NULL; size_t length = 0; int error; error = libspectrum_rzx_write(&buffer, &length, rzx, LIBSPECTRUM_ID_UNKNOWN, creator, compressed, NULL); if (erro...
write_rzx
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/rzxtool
ida
O0
int write_snapshot(libspectrum_snap *snap, const char *filename) { int flags; libspectrum_id_t type; libspectrum_class_t v5; int error; unsigned char *buffer; size_t length[2]; length[1] = __readfsqword(0x28u); buffer = 0; length[0] = 0; error = libspectrum_identify_file_with_class(&type, &v5, file...
static int write_snapshot(libspectrum_snap *snap, const char *filename) { unsigned char *buffer = NULL; size_t length = 0; int error, flags; libspectrum_id_t type; libspectrum_class_t class; error = libspectrum_identify_file_with_class(&type, &class, filename, NULL, 0); if (error) return error;...
write_snapshot
fuse-utils-1.4.3-r1
app-emulation
O0/app-emulation/fuse-utils-1.4.3-r1/rzxtool
ida
O0
void be_to_native16(m_uint16_t *val) { *val = _byteswap_ushort(*val); }
static inline void be_to_native16(m_uint16_t *val) { union { m_uint16_t val; m_uint8_t b[2]; } u; u.val = *val; *val = (((m_uint16_t)u.b[0] << 8) | u.b[1]); }
be_to_native16
dynamips-0.2.21
app-emulation
O0/app-emulation/dynamips-0.2.21/nvram_export
ida
O0
void be_to_native32(m_uint32_t *val) { *val = _byteswap_ulong(*val); }
static inline void be_to_native32(m_uint32_t *val) { union { m_uint32_t val; m_uint8_t b[4]; } u; u.val = *val; *val = (((m_uint32_t)u.b[0] << 24) | ((m_uint32_t)u.b[1] << 16) | ((m_uint32_t)u.b[2] << 8) | u.b[3]); }
be_to_native32
dynamips-0.2.21
app-emulation
O0/app-emulation/dynamips-0.2.21/nvram_export
ida
O0
void be_to_native_header_private(fs_nvram_header_private_config *head) { be_to_native16(&head->magic); be_to_native16(&head->format); be_to_native32(&head->start); be_to_native32(&head->end); be_to_native32(&head->len); }
static void be_to_native_header_private(struct fs_nvram_header_private_config *head) { be_to_native16(&head->magic); be_to_native16(&head->format); be_to_native32(&head->start); be_to_native32(&head->end); be_to_native32(&head->len); }
be_to_native_header_private
dynamips-0.2.21
app-emulation
O0/app-emulation/dynamips-0.2.21/nvram_export
ida
O0
void be_to_native_header_startup(fs_nvram_header_startup_config *head) { be_to_native16(&head->magic); be_to_native16(&head->format); be_to_native16(&head->checksum); be_to_native16(&head->unk1); be_to_native32(&head->start); be_to_native32(&head->end); be_to_native32(&head->len); be_to_native32(&head->...
static void be_to_native_header_startup(struct fs_nvram_header_startup_config *head) { be_to_native16(&head->magic); be_to_native16(&head->format); be_to_native16(&head->checksum); be_to_native16(&head->unk1); be_to_native32(&head->start); be_to_native32(&head->end); be_to_native32(&head->len); be_to_na...
be_to_native_header_startup
dynamips-0.2.21
app-emulation
O0/app-emulation/dynamips-0.2.21/nvram_export
ida
O0
m_uint32_t fs_nvram_address_of(fs_nvram_t *fs_0, m_uint32_t offset) { if ((fs_0->flags & 0x400) != 0) return fs_0->addr + offset; else return offset - 8; }
static inline m_uint32_t fs_nvram_address_of(fs_nvram_t *fs, m_uint32_t offset) { if ((fs->flags & FS_NVRAM_FLAG_ADDR_ABSOLUTE)) return (fs->addr + offset); else return (offset - 8); }
fs_nvram_address_of
dynamips-0.2.21
app-emulation
O0/app-emulation/dynamips-0.2.21/nvram_export
ida
O0
void fs_nvram_clear(fs_nvram_t *fs_0, u_int offset, u_int len) { u_int i; for (i = 0; i < len; ++i) fs_0->write_byte(fs_0, offset + i, 0); }
static void fs_nvram_clear(fs_nvram_t *fs, u_int offset, u_int len) { u_int i; for (i = 0; i < len; i++) { fs->write_byte(fs, offset + i, 0); } }
fs_nvram_clear
dynamips-0.2.21
app-emulation
O0/app-emulation/dynamips-0.2.21/nvram_export
ida
O0