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 |
|---|---|---|---|---|---|---|---|
void processSections(elfInfo *ei) {
unsigned int sh_type;
Elf_Scn *scn;
GElf_Shdr *shdr;
GElf_Shdr shdr_mem;
unsigned long v5;
v5 = __readfsqword(0x28u);
scn = 0;
while (1) {
scn = (Elf_Scn *)elf_nextscn(ei->elf, scn);
if (!scn)
break;
shdr = (GElf_Shdr *)gelf_getshdr(scn, &shdr_mem);... | static void processSections(elfInfo *ei) {
Elf_Scn *scn = NULL;
while ((scn = elf_nextscn(ei->elf, scn)) != NULL) {
GElf_Shdr shdr_mem, *shdr;
shdr = gelf_getshdr(scn, &shdr_mem);
if (shdr == NULL)
break;
switch (shdr->sh_type) {
case SHT_GNU_verdef:
processVerDef(scn, shdr, ei);
... | processSections | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/elfdeps | ida | O0 |
void processVerDef(Elf_Scn *scn, GElf_Shdr *shdr, elfInfo *ei) {
unsigned int offset;
unsigned int auxoffset;
Elf64_Word i;
int j;
Elf_Data *data;
char *soname;
GElf_Verdef *def;
GElf_Verdaux *aux;
const char *s;
GElf_Verdaux aux_mem;
GElf_Verdef def_mem;
unsigned long v15;
v15 = __readfsqwor... | static void processVerDef(Elf_Scn *scn, GElf_Shdr *shdr, elfInfo *ei) {
Elf_Data *data = NULL;
unsigned int offset, auxoffset;
char *soname = NULL;
while ((data = elf_getdata(scn, data)) != NULL) {
offset = 0;
for (int i = shdr->sh_info; --i >= 0;) {
GElf_Verdef def_mem, *def;
def = gelf_g... | processVerDef | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/elfdeps | ida | O0 |
void processVerNeed(Elf_Scn *scn, GElf_Shdr *shdr, elfInfo *ei) {
unsigned int offset;
unsigned int auxoffset;
Elf64_Word i;
int j;
Elf_Data *data;
char *soname;
const char *s;
const char *sa;
GElf_Verneed *need;
GElf_Vernaux *aux;
GElf_Verneed need_mem;
GElf_Vernaux aux_mem;
unsigned long v16... | static void processVerNeed(Elf_Scn *scn, GElf_Shdr *shdr, elfInfo *ei) {
Elf_Data *data = NULL;
char *soname = NULL;
while ((data = elf_getdata(scn, data)) != NULL) {
unsigned int offset = 0, auxoffset;
for (int i = shdr->sh_info; --i >= 0;) {
const char *s = NULL;
GElf_Verneed need_mem, *need... | processVerNeed | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/elfdeps | ida | O0 |
int skipSoname(const char *soname) {
int sane;
const char *s;
sane = 0;
for (s = soname; *s; ++s) {
if (!risspace(*s)) {
sane = 1;
break;
}
}
if (!sane)
return 1;
if (!filter_soname)
return 0;
if (!strstr(soname, ".so"))
return 1;
if (rstreqn(soname, "ld.", 3u) || rstr... | static int skipSoname(const char *soname) {
int sane = 0;
for (const char *s = soname; *s != '\0'; s++) {
if (!risspace(*s)) {
sane = 1;
break;
}
}
if (!sane)
return 1;
if (filter_soname) {
if (!strstr(soname, ".so"))
return 1;
if (rstreqn(soname, "ld.", 3) || rstreqn... | skipSoname | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/elfdeps | ida | O0 |
const char *__cdecl bad_version(const unsigned int version) {
snprintf(bad_version(unsigned int)::buf, 0x50u,
"Version %u member format not supported.", version);
return bad_version(unsigned int)::buf;
} | const char *bad_version(const unsigned version) {
static char buf[80];
snprintf(buf, sizeof buf, "Version %u member format not supported.", version);
return buf;
} | bad_version | lzip-1.23 | app-arch | O0/app-arch/lzip-1.23/lzip | ida | O0 |
bool __cdecl Lzip_index::check_header_error(Lzip_index *const this,
const Lzip_header *header) {
uint8_t v3;
const char *v4;
unsigned int v5;
if (!Lzip_header::verify_magic(header)) {
std::string::operator =
(&this->error_, "Bad magic number (file not in ... | bool Lzip_index::check_header_error(const Lzip_header &header) {
if (!header.verify_magic()) {
error_ = bad_magic_msg;
retval_ = 2;
return true;
}
if (!header.verify_version()) {
error_ = bad_version(header.version());
retval_ = 2;
return true;
}
if (!isvalid_ds(header.dictionary_size(... | check_header_error | lzip-1.23 | app-arch | O0/app-arch/lzip-1.23/lzip | ida | O0 |
const char *__cdecl format_ds(const unsigned int dictionary_size) {
bool exact;
unsigned int num;
int i;
const char *p;
const char *np;
const char *prefix[8];
unsigned __int64 v8;
v8 = __readfsqword(0x28u);
prefix[0] = "Ki";
prefix[1] = "Mi";
prefix[2] = "Gi";
prefix[3] = "Ti";
prefix[4] = "P... | const char *format_ds(const unsigned dictionary_size) {
enum { bufsize = 16, factor = 1024 };
static char buf[bufsize];
const char *const prefix[8] = {"Ki", "Mi", "Gi", "Ti",
"Pi", "Ei", "Zi", "Yi"};
const char *p = "";
const char *np = " ";
unsigned num = dictionary_size;
... | format_ds | lzip-1.23 | app-arch | O0/app-arch/lzip-1.23/lzip | ida | O0 |
void internal_error(const char *const msg) {
if (verbosity >= 0)
fprintf(stderr, "%s: internal error: %s\n", "lzip", msg);
exit(3);
} | void internal_error(const char *const msg) {
if (verbosity >= 0)
std::fprintf(stderr, "%s: internal error: %s\n", program_name, msg);
std::exit(3);
} | internal_error | lzip-1.23 | app-arch | O0/app-arch/lzip-1.23/lzip | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
int v3;
const std_string *v4;
const std_string *v5;
const char *v6;
int v7;
const std_string *v8;
int v9;
const std_vector<std_string> _value_type *v10;
const std_string *v11;
bool v13;
bool v14;
std_vector<std_string> _size_type v15;
... | int main(const int argc, const char *const argv[]) {
const Lzma_options option_mapping[] = {
{1 << 16, 16}, {1 << 20, 5}, {3 << 19, 6}, {1 << 21, 8},
{3 << 20, 12}, {1 << 22, 20}, {1 << 23, 36}, {1 << 24, 68},
{3 << 23, 132}, {1 << 25, 273}};
Lzma_options encoder_options = option_mapping[6];
... | main | lzip-1.23 | app-arch | O0/app-arch/lzip-1.23/lzip | ida | O0 |
int __cdecl open_instream(const char *const name, stat *const in_statsp, const bool one_to_one, const bool reg_only)
{
int v4;
bool v5;
const char *v6;
int infd;
int i;
infd = open64(name, 0);
if (infd >= 0) {
i = fstat64(infd, (struct stat64 *)in_statsp);
v5 = !i && !reg_only &... | int open_instream(const char *const name, struct stat *const in_statsp,
const bool one_to_one, const bool reg_only) {
int infd = open(name, O_RDONLY | O_BINARY);
if (infd < 0)
show_file_error(name, "Can't open input file", errno);
else {
const int i = fstat(infd, in_statsp);
const mo... | open_instream | lzip-1.23 | app-arch | O0/app-arch/lzip-1.23/lzip | ida | O0 |
int readblock(const int fd, uint8_t *const buf, const int size)
{
int sz;
int n;
sz = 0;
*__errno_location() = 0;
while (sz < size) {
n = read(fd, &buf[sz], size - sz);
if (n <= 0) {
if (!n || *__errno_location() != 4)
return sz;
} else {
sz += n;
... | int readblock(const int fd, uint8_t *const buf, const int size) {
int sz = 0;
errno = 0;
while (sz < size) {
const int n = read(fd, buf + sz, size - sz);
if (n > 0)
sz += n;
else if (n == 0)
break;
else if (errno != EINTR)
break;
errno = 0;
}
return sz;
} | readblock | lzip-1.23 | app-arch | O0/app-arch/lzip-1.23/lzip | ida | O0 |
void __cdecl Lzip_index::set_errno_error(Lzip_index *const this, const char *const msg)
{
int *v2;
char *v3;
std::string::operator = (&this->error_, msg);
v2 = __errno_location();
v3 = strerror(*v2);
std::string::operator += (&this->error_, v3);
this->retval_ = 1;
} | void Lzip_index::set_errno_error(const char *const msg) {
error_ = msg;
error_ += std::strerror(errno);
retval_ = 1;
} | set_errno_error | lzip-1.23 | app-arch | O0/app-arch/lzip-1.23/lzip | ida | O0 |
void __cdecl Lzip_index::set_num_error(Lzip_index *const this, const char *const msg, unsigned __int64 num)
{
char buf[88];
unsigned __int64 v4;
v4 = __readfsqword(0x28u);
snprintf(buf, 0x50u, "%s%llu", msg, num);
std::string::operator = (&this->error_, buf);
this->retval_ = 2;
} | void Lzip_index::set_num_error(const char *const msg, unsigned long long num) {
char buf[80];
snprintf(buf, sizeof buf, "%s%llu", msg, num);
error_ = buf;
retval_ = 2;
} | set_num_error | lzip-1.23 | app-arch | O0/app-arch/lzip-1.23/lzip | ida | O0 |
void show_cprogress(
const unsigned long cfile_size,
const unsigned long partial_size,
const Matchfinder_base *const m,
const Pretty_print *const p)
{
double v5;
double v6;
unsigned long pos;
if (show_cprogress(unsigned long long, unsigned long long,
... | void show_cprogress(const unsigned long long cfile_size,
const unsigned long long partial_size,
const Matchfinder_base *const m,
const Pretty_print *const p) {
static unsigned long long csize = 0;
static unsigned long long psize = 0;
static const Matchfi... | show_cprogress | lzip-1.23 | app-arch | O0/app-arch/lzip-1.23/lzip | ida | O0 |
void show_dprogress(
const unsigned long cfile_size,
const unsigned long partial_size,
const Range_decoder *const d,
const Pretty_print *const p)
{
double v6;
double v7;
unsigned long pos;
if (show_dprogress(unsigned long long, unsigned long long,
... | void show_dprogress(const unsigned long long cfile_size,
const unsigned long long partial_size,
const Range_decoder *const d, const Pretty_print *const p) {
static unsigned long long csize = 0;
static unsigned long long psize = 0;
static const Range_decoder *rdec = 0;
sta... | show_dprogress | lzip-1.23 | app-arch | O0/app-arch/lzip-1.23/lzip | ida | O0 |
void show_file_error(const char *const filename, const char *const msg, const int errcode)
{
char *v3;
const char *v4;
if (verbosity >= 0) {
if (errcode <= 0)
v3 = (char *)&unk_19B85;
else
v3 = strerror(errcode);
if (errcode <= 0)
v4 = (const char *)&unk_19B85;
... | void show_file_error(const char *const filename, const char *const msg,
const int errcode) {
if (verbosity >= 0)
std::fprintf(stderr, "%s: %s: %s%s%s\n", program_name, filename, msg,
(errcode > 0) ? ": " : "",
(errcode > 0) ? std::strerror(errcode) : "");
} | show_file_error | lzip-1.23 | app-arch | O0/app-arch/lzip-1.23/lzip | ida | O0 |
void __cdecl show_header(const unsigned int dictionary_size)
{
const char *v1;
v1 = format_ds(dictionary_size);
fprintf(stderr, "dict %s, ", v1);
} | void show_header(const unsigned dictionary_size) {
std::fprintf(stderr, "dict %s, ", format_ds(dictionary_size));
} | show_header | lzip-1.23 | app-arch | O0/app-arch/lzip-1.23/lzip | ida | O0 |
int writeblock(const int fd, const uint8_t *const buf, const int size)
{
int sz;
int n;
sz = 0;
*__errno_location() = 0;
while (sz < size) {
n = write(fd, &buf[sz], size - sz);
if (n <= 0) {
if (n < 0 && *__errno_location() != 4)
return sz;
} else {
sz +... | int writeblock(const int fd, const uint8_t *const buf, const int size) {
int sz = 0;
errno = 0;
while (sz < size) {
const int n = write(fd, buf + sz, size - sz);
if (n > 0)
sz += n;
else if (n < 0 && errno != EINTR)
break;
errno = 0;
}
return sz;
} | writeblock | lzip-1.23 | app-arch | O0/app-arch/lzip-1.23/lzip | ida | O0 |
void about_menuCB(Widget w, void *client_data, void *call_data) {
long Child;
long v4;
XmString title;
XmString msg;
Widget button;
Arg args[5];
char cmsg[264];
unsigned long v10;
v10 = __readfsqword(0x28u);
if (!dialog_3) {
sprintf(cmsg,
"xpdvmkpkg\n\n%s\n\n%s\n\nX11/Motif based ut... | void about_menuCB(Widget w, void *client_data, void *call_data) {
static Widget dialog = NULL;
int ac;
Arg args[5];
char cmsg[250];
XmString msg;
XmString title;
Widget button;
if (dialog == NULL) {
sprintf(cmsg,
"xpdvmkpkg\n\n"
"%s\n\n"
"%s\n\n"
"X11... | about_menuCB | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
void buildmainapp() {
_WidgetRec *v0;
_WidgetRec *form;
Arg args[20];
unsigned long v3;
v3 = __readfsqword(0x28u);
form = (_WidgetRec *)XmCreateForm(g_toplevel, "mainform", args, 0);
XtManageChild(form);
v0 = buildmenu(form);
buildscreen(form, v0);
} | void buildmainapp(void) {
int ac;
Arg args[20];
Widget form;
Widget menubar;
ac = 0;
form = XmCreateForm(g_toplevel, (String) "mainform", args, ac);
XtManageChild(form);
menubar = buildmenu(form);
buildscreen(form, menubar);
return;
} | buildmainapp | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
Widget buildmenu(Widget form) {
long ManagedWidget;
long v2;
long v3;
long v4;
long v5;
long v6;
long v7;
long v8;
long v9;
long v10;
long Localized;
_WidgetRec *menubarw;
Widget menuw;
Widget menuwa;
XmString lblstr;
Widget w;
Widget mitemw;
Arg args[20];
unsigned long v20;
v20... | Widget buildmenu(Widget form) {
Arg args[20];
int ac;
Widget w;
Widget menuw;
Widget mitemw;
Widget menubarw;
XmString lblstr;
ac = 0;
XtSetArg(args[ac], XmNtopAttachment, XmATTACH_FORM);
ac++;
XtSetArg(args[ac], XmNleftAttachment, XmATTACH_FORM);
ac++;
XtSetArg(args[ac], XmNrightAttachment, ... | buildmenu | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
void buildscreen(Widget form, Widget menubar) {
long v2;
long v3;
Widget *w;
_WidgetRec *ManagedWidget;
int wn;
Widget rcatts;
_WidgetRec *ctlw;
_WidgetRec *ctlwa;
Widget frame;
Widget framea;
buildscreen_attrwidgs_st attrwidgs[7];
Arg args[20];
unsigned long v14;
v14 = __readfsqword(0x28u)... | void buildscreen(Widget form, Widget menubar) {
int ac;
int wn;
Arg args[20];
XmString brz;
Widget lblw;
Widget ctlw;
Widget frame;
Widget rcatts;
struct attrwidgs_st {
char *lbl;
char *wname;
Widget *w;
char *butname;
} attrwidgs[] = {"Package File Name",
"fnpkg"... | buildscreen | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
void cancelfsbCB(Widget w, void *client_data, void *call_data) {
XtUnmanageChild(*(_QWORD *)client_data);
statusmsg("operation cancelled");
} | void cancelfsbCB(Widget w, void *client_data, void *call_data) {
XtUnmanageChild(*((Widget *)client_data));
statusmsg("operation cancelled");
return;
} | cancelfsbCB | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
void close_menuCB(Widget w, void *client_data, void *call_data) {
freespecmembers(&g_pdvspec);
spectowidgets();
xu_SetMainTitle(&newtitle, "xpdvmkpkg", g_toplevel);
statusmsg("spec file closed");
} | void close_menuCB(Widget w, void *client_data, void *call_data) {
freespecmembers(&g_pdvspec);
spectowidgets();
xu_SetMainTitle("", "xpdvmkpkg", g_toplevel);
statusmsg("spec file closed");
} | close_menuCB | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
int cmpspecandwidgets() {
int retval;
pdvspec_st spec;
unsigned long v3;
v3 = __readfsqword(0x28u);
widgetstospec(&spec);
retval = cmpspec(&spec, &g_pdvspec);
freespecmembers(&spec);
return retval;
} | int cmpspecandwidgets(void) {
int retval = 0;
struct pdvspec_st spec;
widgetstospec(&spec);
retval = cmpspec(&spec, &g_pdvspec);
freespecmembers(&spec);
return retval;
} | cmpspecandwidgets | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
void helptextCB(Widget w, void *client_data, void *call_data) {
char *msg;
if (client_data) {
if (!strcmp((const char *)client_data, "fnpkg")) {
msg = "This is the filename that you will distribute as the executable "
"package - it will contain the payload. This"
" file is create... | void helptextCB(Widget w, void *client_data, void *call_data) {
static Widget helptextw;
char *id;
char *msg;
if (client_data == NULL) {
helptextw = w;
return;
}
id = (char *)client_data;
if (strcmp(id, "fnpkg") == 0) {
msg = "This is the filename that you will distribute as the executable ... | helptextCB | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
Boolean jumpstart(XtPointer filename) {
openfileCB(0, filename, 0);
return 1;
} | Boolean jumpstart(XtPointer filename) {
openfileCB(NULL, filename, NULL);
return True;
} | jumpstart | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
int argca[4];
int ac;
Arg al_0[10];
unsigned long v7;
argca[0] = argc;
v7 = __readfsqword(0x28u);
ac = 0;
g_prg = (char *)*argv;
g_pdvspec.fn_spec = 0;
g_pdvspec.fn_helpmsg = 0;
g_pdvspec.fn_agrmsg = 0;
g_pdvspec.fn_output = 0;
g_pdvs... | int main(int argc, char *argv[]) {
Arg al[10];
int ac = 0;
g_prg = argv[0];
g_pdvspec.fn_spec = NULL;
g_pdvspec.fn_helpmsg = NULL;
g_pdvspec.fn_agrmsg = NULL;
g_pdvspec.fn_output = NULL;
g_pdvspec.fn_payld = NULL;
g_pdvspec.fn_pdvstub = NULL;
g_pdvspec.fn_exec = NULL;
g_pdvspec.fn_pkg = NULL;
... | main | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
void makepackage() {
char *fn_payld;
char *v1;
char *v2;
char *v3;
char *v4;
char *v5;
int allswell;
int result;
int resulta;
int resultb;
int resultc;
int resultd;
char *fn;
payload_st pld;
stat pldstat;
unsigned long v15;
v15 = __readfsqword(0x28u);
allswell = 1;
fn = findpdv(g_... | void makepackage(void) {
int allswell = 1;
int result;
char *fn;
struct payload_st pld;
struct stat pldstat;
fn = findpdv(g_prg, g_pdvspec.fn_pdvstub, 0);
if (g_pdvspec.fn_pdvstub != NULL)
free(g_pdvspec.fn_pdvstub);
g_pdvspec.fn_pdvstub = fn;
if (g_pdvspec.fn_pdvstub == NULL || access(g_pdvspec... | makepackage | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
void mkpkg_menuCB(Widget w, void *client_data, void *call_data) {
makepackage();
} | void mkpkg_menuCB(Widget w, void *client_data, void *call_data) {
makepackage();
} | mkpkg_menuCB | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
void open_menuCB(Widget w, void *client_data, void *call_data) {
XmString pat;
XmString title;
Widget hlpb;
Arg args[10];
unsigned long v7;
v7 = __readfsqword(0x28u);
if (!fsdlgw_2) {
pat = (XmString)XmStringCreateLocalized("*.pdv");
title = (XmString)XmStringCreateLocalized("Open PDV Spec File")... | void open_menuCB(Widget w, void *client_data, void *call_data) {
Arg args[10];
int ac = 0;
XmString pat;
XmString title;
Widget hlpb;
static Widget fsdlgw = NULL;
if (fsdlgw == NULL) {
pat = XmStringCreateLocalized("*.pdv");
title = XmStringCreateLocalized("Open PDV Spec File");
XtSetArg(arg... | open_menuCB | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
void openfileCB(Widget w, void *client_data, void *call_data) {
char *v3;
char *v4;
int res;
char *fn;
char *badfield;
char *basefn;
XmFileSelectionBoxCallbackStruct *cbs;
unsigned long v10;
v10 = __readfsqword(0x28u);
if (w) {
cbs = (XmFileSelectionBoxCallbackStruct *)call_data;
XmStringGe... | void openfileCB(Widget w, void *client_data, void *call_data) {
int res;
char *fn;
char *basefn;
char *badfield;
XmFileSelectionBoxCallbackStruct *cbs;
if (w != NULL) {
cbs = (XmFileSelectionBoxCallbackStruct *)call_data;
XmStringGetLtoR(cbs->value, XmFONTLIST_DEFAULT_TAG, &fn);
} else
fn = (... | openfileCB | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
void quitappCB(Widget w, void *client_data, void *call_data) { exit(0); } | void quitappCB(Widget w, void *client_data, void *call_data) { exit(0); } | quitappCB | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
void save_menuCB(Widget w, void *client_data, void *call_data) {
if (g_pdvspec.fn_spec)
savefileCB(w, 0, call_data);
else
saveas_menuCB(w, "save", call_data);
} | void save_menuCB(Widget w, void *client_data, void *call_data) {
if (g_pdvspec.fn_spec == NULL)
saveas_menuCB(w, "save", call_data);
else
savefileCB(w, NULL, call_data);
} | save_menuCB | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
void saveas_menuCB(Widget w, void *client_data, void *call_data) {
char *fn_spec;
XmString pat;
XmString title;
Widget hlpb;
XmString deffn;
Arg args[10];
unsigned long v9;
v9 = __readfsqword(0x28u);
if (!fsdlgw_1) {
pat = (XmString)XmStringCreateLocalized("*.pdv");
title = (XmString)XmString... | void saveas_menuCB(Widget w, void *client_data, void *call_data) {
Arg args[10];
int ac = 0;
XmString pat;
XmString title;
XmString deffn;
Widget hlpb;
static Widget fsdlgw = NULL;
if (fsdlgw == NULL) {
pat = XmStringCreateLocalized("*.pdv");
title = XmStringCreateLocalized("Save PDV Spec File ... | saveas_menuCB | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
void savefileCB(Widget w, void *client_data, void *call_data) {
char *v3;
int res;
char *fn;
char *basefn;
XmFileSelectionBoxCallbackStruct *cbs;
unsigned long v8;
v8 = __readfsqword(0x28u);
cbs = (XmFileSelectionBoxCallbackStruct *)call_data;
if (client_data)
XmStringGetLtoR(cbs->value, &unk_E12... | void savefileCB(Widget w, void *client_data, void *call_data) {
int res;
char *fn;
char *basefn;
XmFileSelectionBoxCallbackStruct *cbs;
cbs = (XmFileSelectionBoxCallbackStruct *)call_data;
if (client_data == NULL)
fn = strdup(g_pdvspec.fn_spec);
else
XmStringGetLtoR(cbs->value, XmFONTLIST_DEFAUL... | savefileCB | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
void spectowidgets() {
char *fn_pkg;
char *fn_payld;
char *fn_output;
char *fn_exec;
char *fn_helpmsg;
char *fn_agrmsg;
if (g_pdvspec.fn_pkg)
fn_pkg = g_pdvspec.fn_pkg;
else
fn_pkg = (char *)&unk_8004;
XmTextSetString(g_specwidgets.tx_fnpkg, fn_pkg);
if (g_pdvspec.fn_payld)
fn_payld = g... | void spectowidgets(void) {
XmTextSetString(g_specwidgets.tx_fnpkg,
(g_pdvspec.fn_pkg ? g_pdvspec.fn_pkg : ""));
XmTextSetString(g_specwidgets.tx_fnpayld,
(g_pdvspec.fn_payld ? g_pdvspec.fn_payld : ""));
XmTextSetString(g_specwidgets.tx_fnoutput,
(g_pdvspec.fn_... | spectowidgets | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
void statusmsg(char *fmt, ...) {
long v1;
long v2;
long v3;
long v4;
long v5;
va_list ap;
char msg[264];
unsigned long v8;
long v9;
long v10;
long v11;
long v12;
long v13;
va_start(ap, fmt);
v3 = va_arg(ap, _QWORD);
v1 = va_arg(ap, _QWORD);
v2 = va_arg(ap, _QWORD);
v4 = va_arg(ap, _... | void statusmsg(char *fmt, ...) {
va_list ap;
char msg[MAXSTATUSMSG];
va_start(ap, fmt);
vsnprintf(msg, MAXSTATUSMSG, fmt, ap);
va_end(ap);
msg[MAXSTATUSMSG - 1] = '\0';
if (g_statusw == NULL)
fprintf(stderr, msg);
else
XmTextSetString(g_statusw, msg);
return;
} | statusmsg | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
void widgetstospec(pdvspec_st *spec) {
char *val;
char *vala;
char *valb;
char *valc;
char *vald;
char *vale;
freespecmembers(spec);
val = (char *)XmTextGetString(g_specwidgets.tx_fnpkg);
if (val) {
spec->fn_pkg = strdup(val);
XtFree(val);
}
vala = (char *)XmTextGetString(g_specwidgets.tx... | void widgetstospec(struct pdvspec_st *spec) {
char *val;
freespecmembers(spec);
val = XmTextGetString(g_specwidgets.tx_fnpkg);
if (val) {
spec->fn_pkg = strdup(val);
XtFree(val);
}
val = XmTextGetString(g_specwidgets.tx_fnpayld);
if (val) {
spec->fn_payld = strdup(val);
XtFree(val);
}... | widgetstospec | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
int writeHdrTxt(int fd, const char *txt, int showmsgs, const char *pkg) {
int *v4;
const char *txta;
int retval;
int l;
long nbytes;
txta = txt;
retval = 0;
if (txt) {
for (l = strlen(txt);; l -= nbytes) {
nbytes = write(fd, txta, l);
if (nbytes <= 0)
break;
txta += nbytes... | int writeHdrTxt(int fd, const char *txt, int showmsgs, const char *pkg) {
int retval = 0;
int l;
ssize_t nbytes;
if (txt) {
l = strlen(txt);
while ((nbytes = write(fd, txt, l)) > 0) {
txt += nbytes;
l -= nbytes;
}
if (nbytes == -1)
retval = errno;
}
if (retval == 0) {
... | writeHdrTxt | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
int writespec(pdvspec_st *spec) {
const char *v1;
const char *v2;
const char *v3;
const char *v4;
const char *v5;
const char *v6;
const char *v7;
const char *v8;
const char *v9;
int retval;
FILE *fh;
retval = 0;
fh = fopen(spec->fn_spec, "w+");
if (!fh)
return *__errno_location();
v1 ... | int writespec(struct pdvspec_st *spec) {
FILE *fh;
int retval = 0;
int res;
fh = fopen(spec->fn_spec, "w+");
if (fh) {
res = fprintf(fh,
"HELPMSGFILE %s\n"
"AGRMSGFILE %s\n"
"OUTPUTFILE %s\n"
"PAYLDFILE %s\n"
"PDVST... | writespec | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
void xu_SetMainTitle(const char *newtitle, const char *newprefix,
Widget topshell) {
size_t v3;
const char *v4;
size_t v5;
char *title;
char *icontitle;
Arg args[3];
unsigned long v9;
v9 = __readfsqword(0x28u);
if (topshell)
shellw_2 = topshell;
if (newprefix) {
if (pre... | void xu_SetMainTitle(const char *newtitle, const char *newprefix,
Widget topshell) {
static Widget shellw = NULL;
static char *prefix = NULL;
static int pfxlen = 0;
int nargs = 0;
Arg args[3];
char *title;
char *icontitle;
if (topshell)
shellw = topshell;
if (newprefix) {
... | xu_SetMainTitle | pdv-1.5.1-r4 | app-arch | O0/app-arch/pdv-1.5.1-r4/xmpdvmkpkg | ida | O0 |
rpmRC prioreset_scriptlet_fork_post(rpmPlugin plugin, const char *path,
int type) {
int *v3;
char *v4;
char *v5;
int *v6;
char *v7;
char *v8;
if (setpriority(__priority_which_PRIO_PROCESS, 0, 0) == -1) {
v3 = __errno_location();
v4 = strerror(*v3);
v5 = dge... | static rpmRC prioreset_scriptlet_fork_post(rpmPlugin plugin, const char *path,
int type) {
int ret = setpriority(PRIO_PROCESS, 0, 0);
if (ret == -1) {
rpmlog(RPMLOG_WARNING, _("Unable to reset nice value: %s"),
strerror(errno));
}
#if defined(__linux__)
... | prioreset_scriptlet_fork_post | rpm-4.17.0-r2 | app-arch | O0/app-arch/rpm-4.17.0-r2/prioreset.so | ida | O0 |
void add_file(off_t offset, const char *name) {
off_t v2;
char *v3;
file_index_t *f;
if (name && is_multi_header(name)) {
if (!gMultiHeader)
gMultiHeaderStart = offset;
gMultiHeader = 1;
} else {
f = (file_index_t *)malloc(0x18u);
if (gMultiHeader)
v2 = gMultiHeaderStart;
else... | static void add_file(off_t offset, const char *name) {
if (name && is_multi_header(name)) {
if (!gMultiHeader)
gMultiHeaderStart = offset;
gMultiHeader = true;
return;
}
file_index_t *f = malloc(sizeof(file_index_t));
f->offset = gMultiHeader ? gMultiHeaderStart : offset;
gMultiHeader = fal... | add_file | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
char *auto_output(pixz_op_t op, char *in) {
char *r;
char *r_0;
char *r_1;
char *r_2;
char *r_3;
if (op == OP_READ) {
r = subsuf(in, ".tar.xz", ".tar");
if (r)
return r;
}
if (op == OP_READ) {
r_0 = subsuf(in, ".tpxz", ".tar");
if (r_0)
return r_0;
}
if (op == OP_READ) {... | )
static char *auto_output(pixz_op_t op, char *in) {
SUF(READ, ".tar.xz", ".tar");
SUF(READ, ".tpxz", ".tar");
SUF(READ, ".xz", "");
SUF(WRITE, ".tar", ".tpxz");
SUF(WRITE, "", ".xz");
return NULL;
} | auto_output | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void block_alloc(io_block_t *ib, block_parts parts) {
if ((parts & 1) != 0 && !ib->input)
ib->input = (uint8_t *)malloc(gBlockInSize);
if ((parts & 1) != 0 && !ib->output)
ib->output = (uint8_t *)malloc(gBlockOutSize);
if (!ib->input || !ib->output)
die("Can't allocate blocks");
} | static void block_alloc(io_block_t *ib, block_parts parts) {
if ((parts & BLOCK_IN) && !ib->input)
ib->input = malloc(gBlockInSize);
if ((parts & BLOCK_IN) && !ib->output)
ib->output = malloc(gBlockOutSize);
if (!ib->input || !ib->output)
die("Can't allocate blocks");
} | block_alloc | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void block_capacity(io_block_t *ib, size_t incap, size_t outcap) {
if (incap > ib->block.compressed_size) {
ib->block.compressed_size = incap;
*(_QWORD *)&ib->block.version =
realloc(*(void **)&ib->block.version, incap);
}
if (outcap > ib->block.uncompressed_size) {
ib->block.uncompressed_size... | static void block_capacity(io_block_t *ib, size_t incap, size_t outcap) {
if (incap > ib->incap) {
ib->incap = incap;
ib->input = realloc(ib->input, incap);
}
if (outcap > ib->outcap) {
ib->outcap = outcap;
ib->output = malloc(outcap);
}
} | block_capacity | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void block_dealloc(io_block_t *ib, block_parts parts) {
if ((parts & 1) != 0) {
free(ib->input);
ib->input = 0;
}
if ((parts & 2) != 0) {
free(ib->output);
ib->output = 0;
}
} | static void block_dealloc(io_block_t *ib, block_parts parts) {
if (parts & BLOCK_IN) {
free(ib->input);
ib->input = NULL;
}
if (parts & BLOCK_OUT) {
free(ib->output);
ib->output = NULL;
}
} | block_dealloc | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void block_init(lzma_block *block, size_t insize) {
lzma_vli v2;
lzma_vli v3;
block->version = 0;
block->check = LZMA_CHECK_CRC32;
block->filters = gFilters;
if (insize)
v2 = insize;
else
v2 = -1;
block->uncompressed_size = v2;
if (insize)
v3 = gBlockOutSize;
else
v3 = -1;
block->... | static void block_init(lzma_block *block, size_t insize) {
block->version = 0;
block->check = CHECK;
block->filters = gFilters;
block->uncompressed_size = insize ? insize : LZMA_VLI_UNKNOWN;
block->compressed_size = insize ? gBlockOutSize : LZMA_VLI_UNKNOWN;
if (lzma_block_header_size(block) != LZMA_OK)
... | block_init | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
uint32_t *bw_read(bw *b) {
signed long pos;
if (b->size >= 4)
goto LABEL_10;
if (b->pos < 4uLL)
return 0;
pos = b->pos;
if (pos > 512)
pos = 512;
b->size = pos;
b->pos -= b->size;
if (fseeko(gInFile, b->pos, 0) == -1)
return 0;
if (fread(b, b->size, 1u, gInFile) != 1)
return 0;
LA... | static uint32_t *bw_read(bw *b) {
size_t sz = sizeof(uint32_t);
if (b->size < sz) {
if (b->pos < sz)
return NULL;
b->size = (b->pos > BWCHUNK) ? BWCHUNK : b->pos;
b->pos -= b->size;
if (fseeko(gInFile, b->pos, SEEK_SET) == -1)
return NULL;
if (fread(b->buf, b->size, 1, gInFile) != 1)... | bw_read | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void *decode_file_index_start(off_t block_seek, lzma_check check) {
lzma_filter *filters;
uint32_t header_size;
void *v4;
char v6;
_BYTE v7[7];
off_t block_seeka;
int b;
block_wrapper_t *bw;
long v11;
uint8_t (*p_hdrbuf)[];
unsigned long v13;
block_seeka = block_seek;
*(_DWORD *)&v7[3] = chec... | static void *decode_file_index_start(off_t block_seek, lzma_check check) {
if (fseeko(gInFile, block_seek, SEEK_SET) == -1)
die("Error seeking to block");
block_wrapper_t *bw = malloc(sizeof(block_wrapper_t));
bw->block =
(lzma_block){.check = check, .filters = bw->filters, .version = 0};
int b = fg... | decode_file_index_start | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
bool decode_index() {
int *v0;
char *v1;
off_t pos;
lzma_index *index;
unsigned long v5;
v5 = __readfsqword(0x28u);
if (fseeko(gInFile, 0, 2) == -1) {
v0 = __errno_location();
v1 = strerror(*v0);
fprintf(stderr, "can not seek in input: %s\n", v1);
return 0;
} else {
pos = ftello(gIn... | bool decode_index(void) {
if (fseeko(gInFile, 0, SEEK_END) == -1) {
fprintf(stderr, "can not seek in input: %s\n", strerror(errno));
return false;
}
off_t pos = ftello(gInFile);
gIndex = NULL;
while (pos > 0) {
lzma_index *index = next_index(&pos);
if (gIndex && lzma_index_cat(index, gIndex,... | decode_index | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void decode_thread(size_t thnum) {
lzma_ret err;
pipeline_item_t *pi;
io_block_t *ib;
lzma_stream stream;
lzma_filter filters[5];
lzma_block block;
unsigned long v7;
v7 = __readfsqword(0x28u);
memset(&stream, 0, sizeof(stream));
memset(&block, 0, sizeof(block));
block.filters = filters;
while (... | static void decode_thread(size_t thnum) {
lzma_stream stream = LZMA_STREAM_INIT;
lzma_filter filters[LZMA_FILTERS_MAX + 1];
lzma_block block = {
.filters = filters, .check = LZMA_CHECK_NONE, .version = 0};
pipeline_item_t *pi;
io_block_t *ib;
while (PIPELINE_STOP != queue_pop(gPipelineSplitQ, (void ... | decode_thread | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void die(const char *fmt, ...) {
long v1;
long v2;
long v3;
long v4;
long v5;
va_list args;
unsigned long v7;
long v8;
long v9;
long v10;
long v11;
long v12;
va_start(args, fmt);
v3 = va_arg(args, _QWORD);
v1 = va_arg(args, _QWORD);
v2 = va_arg(args, _QWORD);
v4 = va_arg(args, _QWORD)... | void die(const char *fmt, ...) {
va_list args;
va_start(args, fmt);
vfprintf(stderr, fmt, args);
fprintf(stderr, "\n");
fflush(stderr);
va_end(args);
exit(1);
} | die | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void dump_file_index(FILE *out, bool verbose) {
const char *name;
file_index_t *f;
for (f = gFileIndex; f; f = f->next) {
if (verbose) {
if (f->name)
name = f->name;
else
name = (const char *)&unk_800B;
fprintf(out, "%10lu %s\n", f->offset, name);
} else if (f->name) {
... | void dump_file_index(FILE *out, bool verbose) {
for (file_index_t *f = gFileIndex; f != NULL; f = f->next) {
if (verbose) {
fprintf(out, "%10" PRIuMAX " %s\n", (uintmax_t)f->offset,
f->name ? f->name : "");
} else {
if (f->name)
fprintf(out, "%s\n", f->name);
}
}
} | dump_file_index | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void encode_index() {
lzma_ret err;
uint8_t obuf[4096];
unsigned long v2;
v2 = __readfsqword(0x28u);
if ((unsigned int)lzma_index_encoder(&gStream, gIndex))
die("Error creating index encoder");
err = LZMA_OK;
while (err != LZMA_STREAM_END) {
gStream.next_out = obuf;
gStream.avail_out = 4096;
... | static void encode_index(void) {
if (lzma_index_encoder(&gStream, gIndex) != LZMA_OK)
die("Error creating index encoder");
uint8_t obuf[CHUNKSIZE];
lzma_ret err = LZMA_OK;
while (err != LZMA_STREAM_END) {
gStream.next_out = obuf;
gStream.avail_out = CHUNKSIZE;
err = lzma_code(&gStream, LZMA_RUN)... | encode_index | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void encode_thread(size_t thnum) {
size_t v1;
lzma_ret err;
pipeline_item_t *pi;
io_block_t *ib;
size_t header_size;
size_t uncompressible_size;
lzma_stream stream;
unsigned long v8;
v8 = __readfsqword(0x28u);
memset(&stream, 0, sizeof(stream));
while (queue_pop(gPipelineSplitQ, (void **)&pi) != ... | static void encode_thread(size_t thnum) {
lzma_stream stream = LZMA_STREAM_INIT;
while (true) {
pipeline_item_t *pi;
int msg = queue_pop(gPipelineSplitQ, (void **)&pi);
if (msg == PIPELINE_STOP)
break;
debug("encoder %zu: received %zu", thnum, pi->seq);
io_block_t *ib = (io_block_t *)(pi-... | encode_thread | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void encode_uncompressible(io_block_t *ib) {
_BYTE *v1;
uint8_t *v2;
uint8_t *v3;
uint8_t *output;
uint8_t *outputb;
uint8_t *outputa;
uint8_t *input;
size_t remain;
size_t size;
uint8_t *output_start;
output_start = &ib->output[ib->block.header_size];
output = output_start;
input = ib->input... | static void encode_uncompressible(io_block_t *ib) {
const uint8_t control_uncomp = 1;
const uint8_t control_end = 0;
uint8_t *output_start = ib->output + ib->block.header_size;
uint8_t *output = output_start;
uint8_t *input = ib->input;
size_t remain = ib->insize;
while (remain) {
size_t size = rem... | encode_uncompressible | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
lzma_vli find_file_index(void **bdatap) {
lzma_vli ret;
lzma_vli loc;
void *bdata;
lzma_index_iter iter;
unsigned long v6;
v6 = __readfsqword(0x28u);
if (!gIndex)
decode_index();
lzma_index_iter_init(&iter, gIndex);
loc = lzma_index_uncompressed_size(gIndex) - 1;
if ((unsigned char)lzma_index_i... | static lzma_vli find_file_index(void **bdatap) {
if (!gIndex)
decode_index();
lzma_index_iter iter;
lzma_index_iter_init(&iter, gIndex);
lzma_vli loc = lzma_index_uncompressed_size(gIndex) - 1;
if (lzma_index_iter_locate(&iter, loc))
die("Can't locate file index block");
if (iter.stream.number != 1... | find_file_index | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void free_file_index() {
file_index_t *f;
file_index_t *next;
for (f = gFileIndex; f; f = next) {
next = f->next;
free(f->name);
free(f);
}
gLastFile = 0;
gFileIndex = 0;
} | void free_file_index(void) {
for (file_index_t *f = gFileIndex; f != NULL;) {
file_index_t *next = f->next;
free(f->name);
free(f);
f = next;
}
gFileIndex = gLastFile = NULL;
} | free_file_index | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
bool is_multi_header(const char *name) {
size_t i;
for (i = strlen(name); i && name[i - 1] != 47; --i)
;
return strncmp(&name[i], "._", 2u) == 0;
} | bool is_multi_header(const char *name) {
size_t i = strlen(name);
while (i != 0 && name[i - 1] != '/')
--i;
return strncmp(name + i, "._", 2) == 0;
} | is_multi_header | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
int *v3;
char *v4;
int *v5;
char *v6;
int *v7;
char *v8;
int *v9;
char *v10;
int v11;
char **argva;
int argca;
char tar;
bool keep_input;
bool extreme;
bool iremove;
uint32_t level;
pixz_op_t op;
int ch_0;
int output_fd;
... | int main(int argc, char **argv) {
uint32_t level = LZMA_PRESET_DEFAULT;
bool tar = true;
bool keep_input = false;
bool extreme = false;
pixz_op_t op = OP_WRITE;
char *ipath = NULL, *opath = NULL;
int ch;
char *optend;
long optint;
double optdbl;
while ((ch = getopt(argc, argv, "dcxli:o:tkvhp:0123... | main | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
lzma_index *next_index(off_t *pos) {
off_t v1;
lzma_ret err;
lzma_index *index;
off_t pad;
off_t eos;
lzma_stream_flags flags;
lzma_stream strm;
bw b;
uint8_t ibuf[4096];
unsigned long v11;
v11 = __readfsqword(0x28u);
pad = stream_padding(&b, *pos);
eos = *pos - pad;
stream_footer(&b, &flag... | static lzma_index *next_index(off_t *pos) {
bw b;
off_t pad = stream_padding(&b, *pos);
off_t eos = *pos - pad;
lzma_stream_flags flags;
stream_footer(&b, &flags);
*pos = eos - LZMA_STREAM_HEADER_SIZE - flags.backward_size;
if (fseeko(gInFile, *pos, SEEK_SET) == -1)
die("Error seeking to index");
... | next_index | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
size_t num_threads() { return sysconf(84); } | size_t num_threads(void) { return sysconf(_SC_NPROCESSORS_ONLN); } | num_threads | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void pipeline_create(pipeline_data_create_t create,
pipeline_data_free_t destroy, pipeline_split_t split,
pipeline_process_t process) {
double v4;
int v5;
double v6;
long v7;
long v8;
long v9;
long v10;
long v11;
long v12;
long v13;
long v14;
long v15;
... | void pipeline_create(pipeline_data_create_t create,
pipeline_data_free_t destroy, pipeline_split_t split,
pipeline_process_t process) {
gPLFreer = destroy;
gPLSplit = split;
gPLProcess = process;
gPipelineStartQ = queue_new(pipeline_qfree);
gPipelineSplitQ = queue_ne... | pipeline_create | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void pipeline_destroy() {
if (pthread_join(gPLSplitThread, 0))
die("Error joining splitter thread");
queue_free(gPipelineStartQ);
queue_free(gPipelineSplitQ);
queue_free(gPipelineMergeQ);
free(gPLProcessThreads);
} | void pipeline_destroy(void) {
if (pthread_join(gPLSplitThread, NULL))
die("Error joining splitter thread");
queue_free(gPipelineStartQ);
queue_free(gPipelineSplitQ);
queue_free(gPipelineMergeQ);
free(gPLProcessThreads);
} | pipeline_destroy | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void pipeline_dispatch(pipeline_item_t *item, queue_t *q) {
size_t v2;
v2 = gPLSplitSeq++;
item->seq = v2;
item->next = 0;
queue_push(q, 0, item);
} | void pipeline_dispatch(pipeline_item_t *item, queue_t *q) {
item->seq = gPLSplitSeq++;
item->next = NULL;
queue_push(q, PIPELINE_ITEM, item);
} | pipeline_dispatch | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
pipeline_item_t *pipeline_merged() {
pipeline_item_t *item;
pipeline_item_t **prev;
unsigned long v3;
v3 = __readfsqword(0x28u);
while (!gPLMergedItems || gPLMergedItems->seq != gPLMergeSeq) {
if (queue_pop(gPipelineMergeQ, (void **)&item) == 1)
return 0;
for (prev = &gPLMergedItems; *prev && (... | pipeline_item_t *pipeline_merged() {
pipeline_item_t *item;
while (!gPLMergedItems || gPLMergedItems->seq != gPLMergeSeq) {
pipeline_tag_t tag = queue_pop(gPipelineMergeQ, (void **)&item);
if (tag == PIPELINE_STOP)
return NULL;
pipeline_item_t **prev = &gPLMergedItems;
while (*prev && (*prev... | pipeline_merged | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void pipeline_qfree(int type, void *p) {
if (type) {
if (type != 1)
die("Unknown msg type %d", type);
} else {
gPLFreer(*((void **)p + 2));
free(p);
}
} | static void pipeline_qfree(int type, void *p) {
switch (type) {
case PIPELINE_ITEM: {
pipeline_item_t *item = (pipeline_item_t *)p;
gPLFreer(item->data);
free(item);
break;
}
case PIPELINE_STOP:
break;
default:
die("Unknown msg type %d", type);
}
} | pipeline_qfree | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void pipeline_split(pipeline_item_t *item) {
pipeline_dispatch(item, gPipelineSplitQ);
} | void pipeline_split(pipeline_item_t *item) {
pipeline_dispatch(item, gPipelineSplitQ);
} | pipeline_split | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void pipeline_stop() {
size_t i;
size_t i_0;
for (i = 0; i < gPLProcessCount; ++i)
queue_push(gPipelineSplitQ, 1, 0);
for (i_0 = 0; i_0 < gPLProcessCount; ++i_0) {
if (pthread_join(gPLProcessThreads[i_0], 0))
die("Error joining processing thread");
}
queue_push(gPipelineMergeQ, 1, 0);
} | void pipeline_stop(void) {
for (size_t i = 0; i < gPLProcessCount; ++i)
queue_push(gPipelineSplitQ, PIPELINE_STOP, NULL);
for (size_t i = 0; i < gPLProcessCount; ++i) {
if (pthread_join(gPLProcessThreads[i], NULL))
die("Error joining processing thread");
}
queue_push(gPipelineMergeQ, PIPELINE_STO... | pipeline_stop | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void *pipeline_thread_process(void *arg) {
gPLProcess((size_t)arg);
return 0;
} | static void *pipeline_thread_process(void *arg) {
size_t thnum = (uintptr_t)arg;
gPLProcess(thnum);
return NULL;
} | pipeline_thread_process | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void *pipeline_thread_split(void *ignore) {
gPLSplit();
return 0;
} | static void *pipeline_thread_split(void *ignore) {
gPLSplit();
return NULL;
} | pipeline_thread_split | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void pixz_list(bool tar) {
lzma_index_iter iter;
unsigned long v2;
v2 = __readfsqword(0x28u);
if (!decode_index())
die("Can't list non-seekable input");
lzma_index_iter_init(&iter, gIndex);
if (tar && read_file_index()) {
dump_file_index(stdout, 0);
free_file_index();
} else {
while (!(un... | void pixz_list(bool tar) {
if (!decode_index())
die("Can't list non-seekable input");
lzma_index_iter iter;
lzma_index_iter_init(&iter, gIndex);
if (tar && read_file_index()) {
dump_file_index(stdout, false);
free_file_index();
} else {
while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_BLO... | pixz_list | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void pixz_read(bool verify, size_t nspecs, char **specs) {
void (*v3)(void);
const char *v4;
bool v5;
bool lastmulti;
bool start;
bool tar;
bool all_sized;
bool skipping;
int aerr;
archive_entry *entry;
wanted_t *w;
wanted_t *wlast;
off_t lastoff;
archive *ar;
off_t off;
const char *path... | void pixz_read(bool verify, size_t nspecs, char **specs) {
if (decode_index()) {
if (verify)
gFileIndexOffset = read_file_index();
wanted_files(nspecs, specs);
gExplicitFiles = nspecs;
}
#if DEBUG
for (wanted_t *w = gWantedFiles; w; w = w->next)
debug("want: %s", w->name);
#endif
pipelin... | pixz_read | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void pixz_write(bool tar, uint32_t level) {
double v2;
unsigned long v3;
lzma_vli v4;
pipeline_item_t *pi;
lzma_options_lzma lzma_opts;
unsigned long v7;
v7 = __readfsqword(0x28u);
gTar = tar;
if ((unsigned char)lzma_lzma_preset(&lzma_opts, level))
die("Error setting lzma options");
gFilters[0]... | void pixz_write(bool tar, uint32_t level) {
gTar = tar;
lzma_options_lzma lzma_opts;
if (lzma_lzma_preset(&lzma_opts, level))
die("Error setting lzma options");
gFilters[0] = (lzma_filter){.id = LZMA_FILTER_LZMA2, .options = &lzma_opts};
gFilters[1] = (lzma_filter){.id = LZMA_VLI_UNKNOWN, .options = NULL... | pixz_write | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void queue_free(queue_t *q) {
queue_item_t *i;
queue_item_t *tmp;
for (i = q->first; i; i = tmp) {
tmp = i->next;
if (q->freer)
q->freer(i->type, i->data);
free(i);
}
pthread_mutex_destroy(&q->mutex);
pthread_cond_destroy(&q->pop_cond);
free(q);
} | void queue_free(queue_t *q) {
for (queue_item_t *i = q->first; i;) {
queue_item_t *tmp = i->next;
if (q->freer)
q->freer(i->type, i->data);
free(i);
i = tmp;
}
pthread_mutex_destroy(&q->mutex);
pthread_cond_destroy(&q->pop_cond);
free(q);
} | queue_free | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
queue_t *queue_new(queue_free_t freer) {
queue_t *q;
q = (queue_t *)malloc(0x70u);
q->last = 0;
q->first = q->last;
q->freer = freer;
pthread_mutex_init(&q->mutex, 0);
pthread_cond_init(&q->pop_cond, 0);
return q;
} | queue_t *queue_new(queue_free_t freer) {
queue_t *q = malloc(sizeof(queue_t));
q->first = q->last = NULL;
q->freer = freer;
pthread_mutex_init(&q->mutex, NULL);
pthread_cond_init(&q->pop_cond, NULL);
return q;
} | queue_new | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
int queue_pop(queue_t *q, void **datap) {
int type;
queue_item_t *i;
pthread_mutex_lock(&q->mutex);
while (!q->first)
pthread_cond_wait(&q->pop_cond, &q->mutex);
i = q->first;
q->first = q->first->next;
if (!q->first)
q->last = 0;
*datap = i->data;
type = i->type;
free(i);
pthread_mutex_u... | int queue_pop(queue_t *q, void **datap) {
pthread_mutex_lock(&q->mutex);
while (!q->first)
pthread_cond_wait(&q->pop_cond, &q->mutex);
queue_item_t *i = q->first;
q->first = i->next;
if (!q->first)
q->last = NULL;
*datap = i->data;
int type = i->type;
free(i);
pthread_mutex_unlock(&q->mutex... | queue_pop | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void queue_push(queue_t *q, int type, void *data) {
queue_item_t *i;
pthread_mutex_lock(&q->mutex);
i = (queue_item_t *)malloc(0x18u);
i->type = type;
i->data = data;
i->next = 0;
if (q->last)
q->last->next = i;
else
q->first = i;
q->last = i;
pthread_cond_signal(&q->pop_cond);
pthread_mu... | void queue_push(queue_t *q, int type, void *data) {
pthread_mutex_lock(&q->mutex);
queue_item_t *i = malloc(sizeof(queue_item_t));
i->type = type;
i->data = data;
i->next = NULL;
if (q->last) {
q->last->next = i;
} else {
q->first = i;
}
q->last = i;
pthread_cond_signal(&q->pop_cond);
p... | queue_push | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void rbuf_consume(size_t bytes) {
if ((lzma_filter *)bytes < gRbuf->block.filters)
memmove(*(void **)&gRbuf->block.version,
(const void *)(bytes + *(_QWORD *)&gRbuf->block.version),
(size_t)gRbuf->block.filters - bytes);
gRbuf->block.filters = (lzma_filter *)((char *)gRbuf->block.filters... | static void rbuf_consume(size_t bytes) {
if (bytes < gRbuf->insize)
memmove(gRbuf->input, gRbuf->input + bytes, gRbuf->insize - bytes);
gRbuf->insize -= bytes;
} | rbuf_consume | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
bool rbuf_cycle(lzma_stream *stream, bool start, size_t skip) {
if (!start) {
rbuf_consume((size_t)gRbuf->block.filters);
if ((unsigned int)rbuf_read(0x1000u) <= RBUF_EOF)
return 0;
}
stream->next_in = (const uint8_t *)(skip + *(_QWORD *)&gRbuf->block.version);
stream->avail_in = (size_t)gRbuf->bl... | static bool rbuf_cycle(lzma_stream *stream, bool start, size_t skip) {
if (!start) {
rbuf_consume(gRbuf->insize);
if (rbuf_read(CHUNKSIZE) < RBUF_PART)
return false;
}
stream->next_in = gRbuf->input + skip;
stream->avail_in = gRbuf->insize - skip;
return true;
} | rbuf_cycle | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void rbuf_dispatch() {
pipeline_split(gRbufPI);
gRbufPI = 0;
gRbuf = 0;
} | static void rbuf_dispatch(void) {
pipeline_split(gRbufPI);
gRbufPI = NULL;
gRbuf = NULL;
} | rbuf_dispatch | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
rbuf_read_status rbuf_read(size_t bytes) {
io_block_t *v1;
size_t v3;
if (!gRbufPI) {
queue_pop(gPipelineStartQ, (void **)&gRbufPI);
gRbuf = (io_block_t *)gRbufPI->data;
v1 = gRbuf;
*(_QWORD *)gRbuf->block.raw_check = 0;
gRbuf->block.filters = *(lzma_filter **)v1->block.raw_check;
}
if ((... | static rbuf_read_status rbuf_read(size_t bytes) {
if (!gRbufPI) {
queue_pop(gPipelineStartQ, (void **)&gRbufPI);
gRbuf = (io_block_t *)(gRbufPI->data);
gRbuf->insize = gRbuf->outsize = 0;
}
if (gRbuf->insize >= bytes)
return RBUF_FULL;
block_capacity(gRbuf, bytes, 0);
size_t r =
fread(... | rbuf_read | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
bool read_block(bool force_stream, lzma_check check, off_t uoffset) {
bool v4;
size_t v5;
lzma_vli outsize;
lzma_filter filters[5];
lzma_block block;
unsigned long v10;
v10 = __readfsqword(0x28u);
memset(&block, 0, sizeof(block));
block.check = check;
block.filters = filters;
if (rbuf_read(1u) !=... | static bool read_block(bool force_stream, lzma_check check, off_t uoffset) {
lzma_filter filters[LZMA_FILTERS_MAX + 1];
lzma_block block = {.filters = filters, .check = check, .version = 0};
if (rbuf_read(1) != RBUF_FULL)
die("Error reading block header size");
if (gRbuf->input[0] == 0)
return false;
... | read_block | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
lzma_vli read_file_index() {
char *v1;
uint64_t v2;
void *bdata;
lzma_vli offset;
char *name;
file_index_t *f;
unsigned long v7;
v7 = __readfsqword(0x28u);
bdata = 0;
offset = find_file_index(&bdata);
if (!offset)
return 0;
while (1) {
name = read_file_index_name();
if (!name)
... | lzma_vli read_file_index() {
void *bdata = NULL;
lzma_vli offset = find_file_index(&bdata);
if (!offset)
return 0;
while (true) {
char *name = read_file_index_name();
if (!name)
break;
file_index_t *f = malloc(sizeof(file_index_t));
f->name = strlen(name) ? xstrdup(name) : NULL;
... | read_file_index | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void read_file_index_data() {
gStream.next_out = &gFileIndexBuf[gFIBSize - gStream.avail_out];
while (gFIBErr != LZMA_STREAM_END && gStream.avail_out) {
if (!gStream.avail_in) {
gStream.avail_in = fread(gFIBInputBuf, 1u, 0x1000u, gInFile);
if (ferror(gInFile))
die("Error reading file index d... | static void read_file_index_data(void) {
gStream.next_out = gFileIndexBuf + gFIBSize - gStream.avail_out;
while (gFIBErr != LZMA_STREAM_END && gStream.avail_out) {
if (gStream.avail_in == 0) {
gStream.avail_in = fread(gFIBInputBuf, 1, CHUNKSIZE, gInFile);
if (ferror(gInFile))
die("Error rea... | read_file_index_data | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void read_file_index_make_space() {
int *v0;
char *v1;
bool expand;
size_t move;
uint8_t *new_gFileIndexBuf;
expand = gFIBPos == 0;
if (gFIBPos) {
move = gFIBSize - gStream.avail_out - gFIBPos;
memmove(gFileIndexBuf, &gFileIndexBuf[gFIBPos], move);
gMoved += move;
gStream.avail_out += gFI... | static void read_file_index_make_space(void) {
bool expand = (gFIBPos == 0);
if (gFIBPos != 0) {
size_t move = gFIBSize - gStream.avail_out - gFIBPos;
memmove(gFileIndexBuf, gFileIndexBuf + gFIBPos, move);
gMoved += move;
gStream.avail_out += gFIBPos;
gFIBPos = 0;
}
if (expand || gMoved >= ... | read_file_index_make_space | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
char *read_file_index_name() {
uint8_t *haystack;
uint8_t *eos;
while (1) {
haystack = &gFileIndexBuf[gFIBPos];
if ((long)(gFIBSize - gStream.avail_out - gFIBPos - 8) > 0) {
eos = (uint8_t *)memchr(haystack, 0,
gFIBSize - gStream.avail_out - gFIBPos - 8);
if (eos... | static char *read_file_index_name(void) {
while (true) {
uint8_t *eos, *haystack = gFileIndexBuf + gFIBPos;
ssize_t len = gFIBSize - gStream.avail_out - gFIBPos - sizeof(uint64_t);
if (len > 0 && (eos = memchr(haystack, '\0', len))) {
gFIBPos += eos - haystack + 1;
return (char *)haystack;
... | read_file_index_name | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void read_footer() {
rbuf_read_status st;
lzma_stream_flags stream_flags;
char zeros[4];
unsigned long v3;
v3 = __readfsqword(0x28u);
if (rbuf_read(0xCu) != RBUF_FULL)
die("Error reading stream footer");
if ((unsigned int)lzma_stream_footer_decode(&stream_flags,
... | static void read_footer(void) {
lzma_stream_flags stream_flags;
if (rbuf_read(LZMA_STREAM_HEADER_SIZE) != RBUF_FULL)
die("Error reading stream footer");
if (lzma_stream_footer_decode(&stream_flags, gRbuf->input) != LZMA_OK)
die("Error decoding XZ footer");
rbuf_consume(LZMA_STREAM_HEADER_SIZE);
char ... | read_footer | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
bool read_header(lzma_check *check) {
rbuf_read_status st;
lzma_ret err;
lzma_stream_flags stream_flags;
unsigned long v5;
v5 = __readfsqword(0x28u);
st = rbuf_read(0xCu);
if (st == RBUF_EOF)
return 0;
if (st != RBUF_FULL)
die("Error reading stream header");
err = (unsigned int)lzma_stream_he... | static bool read_header(lzma_check *check) {
lzma_stream_flags stream_flags;
rbuf_read_status st = rbuf_read(LZMA_STREAM_HEADER_SIZE);
if (st == RBUF_EOF)
return false;
else if (st != RBUF_FULL)
die("Error reading stream header");
lzma_ret err = lzma_stream_header_decode(&stream_flags, gRbuf->input);
... | read_header | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void read_index() {
lzma_ret err;
lzma_index *index;
lzma_stream stream;
unsigned long v3;
v3 = __readfsqword(0x28u);
memset(&stream, 0, sizeof(stream));
if ((unsigned int)lzma_index_decoder(&stream, &index, 0x1000000000LL))
die("Error initializing index decoder");
rbuf_cycle(&stream, 1, 0);
for ... | static void read_index(void) {
lzma_stream stream = LZMA_STREAM_INIT;
lzma_index *index;
if (lzma_index_decoder(&stream, &index, MEMLIMIT) != LZMA_OK)
die("Error initializing index decoder");
rbuf_cycle(&stream, true, 0);
lzma_ret err = LZMA_OK;
while (err != LZMA_STREAM_END) {
if (err != LZMA_OK)
... | read_index | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void read_streaming(lzma_block *block, block_type sized, off_t uoffset) {
block_type v3;
bool first;
lzma_ret err;
pipeline_item_t *pi;
io_block_t *ib;
lzma_stream stream;
unsigned long v10;
v10 = __readfsqword(0x28u);
memset(&stream, 0, sizeof(stream));
if ((unsigned int)lzma_block_decoder(&stream... | static void read_streaming(lzma_block *block, block_type sized, off_t uoffset) {
lzma_stream stream = LZMA_STREAM_INIT;
if (lzma_block_decoder(&stream, block) != LZMA_OK)
die("Error initializing streaming block decode");
rbuf_cycle(&stream, true, block->header_size);
stream.avail_out = 0;
bool first = tr... | read_streaming | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void read_thread_noindex() {
bool empty;
lzma_check check;
unsigned long v2;
v2 = __readfsqword(0x28u);
empty = 1;
check = LZMA_CHECK_NONE;
while (read_header(&check)) {
empty = 0;
while (read_block(0, check, 0))
;
read_index();
read_footer();
}
if (empty)
die("Empty input")... | static void read_thread_noindex(void) {
bool empty = true;
lzma_check check = LZMA_CHECK_NONE;
while (read_header(&check)) {
empty = false;
while (read_block(false, check, 0))
;
read_index();
read_footer();
}
if (empty)
die("Empty input");
pipeline_stop();
} | read_thread_noindex | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
size_t size_uncompressible(size_t insize) {
size_t chunks;
size_t data_size;
chunks = insize >> 16;
if ((_WORD)insize)
++chunks;
data_size = 3 * chunks + insize + 1;
if (((3 * (_BYTE)chunks + (_BYTE)insize + 1) & 3) != 0)
return (data_size & 0xFFFFFFFFFFFFFFFCLL) + 4;
return data_size;
} | static size_t size_uncompressible(size_t insize) {
size_t chunks = insize / LZMA_CHUNK_MAX;
if (insize % LZMA_CHUNK_MAX)
++chunks;
size_t data_size = insize + chunks * 3 + 1;
if (data_size % 4)
data_size += 4 - data_size % 4;
return data_size;
} | size_uncompressible | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
bool spec_match(char *spec, char *name) {
bool match;
match = 1;
while (*spec) {
if (!*name || *spec != *name) {
match = 0;
return match && (!*name || *name == 47);
}
++spec;
++name;
}
return match && (!*name || *name == 47);
} | static bool spec_match(char *spec, char *name) {
bool match = true;
for (; *spec; ++spec, ++name) {
if (!*name || *spec != *name) {
match = false;
break;
}
}
return match && (!*name || *name == '/');
} | spec_match | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void stream_edge(lzma_vli backward_size) {
unsigned int (*v1)(lzma_stream_flags *, uint8_t *);
lzma_stream_flags flags;
uint8_t buf[12];
unsigned long v4;
v4 = __readfsqword(0x28u);
*(_QWORD *)&flags.version = 0;
*(_QWORD *)&flags.check = 1;
memset(&flags.reserved_enum2, 0, 32);
flags.backward_size =... | static void stream_edge(lzma_vli backward_size) {
lzma_stream_flags flags = {
.version = 0, .check = CHECK, .backward_size = backward_size};
uint8_t buf[LZMA_STREAM_HEADER_SIZE];
lzma_ret (*encoder)(const lzma_stream_flags *flags, uint8_t *buf);
encoder = backward_size == LZMA_VLI_UNKNOWN ? &lzma_stream_... | stream_edge | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
void stream_footer(bw *b, lzma_stream_flags *flags) {
int i;
uint32_t *p;
uint8_t ftr[12];
unsigned long v5;
v5 = __readfsqword(0x28u);
for (i = 2; i >= 0; --i) {
p = bw_read(b);
if (!p)
die("Error reading stream footer");
*(_DWORD *)&ftr[4 * i] = *p;
}
if ((unsigned int)lzma_stream_f... | static void stream_footer(bw *b, lzma_stream_flags *flags) {
uint8_t ftr[LZMA_STREAM_HEADER_SIZE];
for (int i = sizeof(ftr) / sizeof(uint32_t) - 1; i >= 0; --i) {
uint32_t *p = bw_read(b);
if (!p)
die("Error reading stream footer");
*((uint32_t *)ftr + i) = *p;
}
if (lzma_stream_footer_decode... | stream_footer | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
off_t stream_padding(bw *b, off_t pos) {
off_t pad;
uint32_t *i;
b->pos = pos;
b->size = 0;
for (pad = 0;; pad += 4LL) {
i = bw_read(b);
if (!i)
die("Error reading stream padding");
if (*i)
break;
}
b->size += 4LL;
return pad;
} | static off_t stream_padding(bw *b, off_t pos) {
b->pos = pos;
b->size = 0;
for (off_t pad = 0; true; pad += sizeof(uint32_t)) {
uint32_t *i = bw_read(b);
if (!i)
die("Error reading stream padding");
if (*i != 0) {
b->size += sizeof(uint32_t);
return pad;
}
}
} | stream_padding | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
bool strsuf(char *big, char *small) {
const char *v2;
size_t bl_0;
bl_0 = strlen(big);
v2 = &big[bl_0 - strlen(small)];
return strcmp(v2, small) == 0;
} | static bool strsuf(char *big, char *small) {
size_t bl = strlen(big), sl = strlen(small);
return strcmp(big + bl - sl, small) == 0;
} | strsuf | pixz-1.0.7 | app-arch | O0/app-arch/pixz-1.0.7/pixz | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.