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 |
|---|---|---|---|---|---|---|---|
int detectCPUs() {
int ncpu;
ncpu = sysconf(84);
if (ncpu <= 0)
return 1;
return ncpu;
} | int detectCPUs() {
int ncpu;
ncpu = 1;
#if defined(__APPLE__)
size_t len = sizeof(ncpu);
int mib[2];
mib[0] = CTL_HW;
mib[1] = HW_NCPU;
if (sysctl(mib, 2, &ncpu, &len, 0, 0) < 0 || len != sizeof(ncpu))
ncpu = 1;
#elif defined(_SC_NPROCESSORS_ONLN)
ncpu = sysconf(_SC_NPROCESSORS_ONLN);
#elif define... | detectCPUs | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int directcompress(int hInfile, off_t fileSize, int blockSize,
const char *OutFilename) {
unsigned int outSize;
int percentComplete;
int hOutfile;
int currBlock;
int rret;
int ret;
int percentCompleteOld;
off_t CompressedSize;
off_t bytesLeft;
off_t inSize;
char *FileData;
cha... | int directcompress(int hInfile, OFF_T fileSize, int blockSize,
const char *OutFilename) {
char *FileData = NULL;
char *CompressedData = NULL;
OFF_T CompressedSize = 0;
OFF_T bytesLeft = 0;
OFF_T inSize = 0;
unsigned int outSize = 0;
int percentComplete = 0;
int hOutfile = STDOUT_FILEN... | directcompress | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int directdecompress(const char *InFilename, const char *OutFilename) {
int bzerr;
int nUnused;
int streamNo;
int i;
int ret;
int nread;
int c;
int c_0;
unsigned char *unusedTmp;
FILE *stream;
FILE *zStream;
BZFILE *bzf;
unsigned char obuf[5000];
unsigned char unused[5000];
unsigned long v... | int directdecompress(const char *InFilename, const char *OutFilename) {
FILE *stream = NULL;
FILE *zStream = NULL;
BZFILE *bzf = NULL;
unsigned char obuf[5000];
unsigned char unused[BZ_MAX_UNUSED];
unsigned char *unusedTmp;
int bzerr, nread, streamNo;
int nUnused;
int ret = 0;
int i;
nUnused = 0;... | directdecompress | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int do_close(int fd) {
pbzip2_ErrorContext *Instance;
int ret;
ret = close(fd);
if (ret == -1) {
Instance = pbzip2_ErrorContext_getInstance();
pbzip2_ErrorContext_saveError(Instance);
}
return ret;
} | inline int do_close(int fd) {
int ret = close(fd);
if (ret == -1) {
ErrorContext::getInstance()->saveError();
}
return ret;
} | do_close | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int do_fclose(FILE *file) {
pbzip2_ErrorContext *Instance;
int ret;
ret = fclose(file);
if (ret == -1) {
Instance = pbzip2_ErrorContext_getInstance();
pbzip2_ErrorContext_saveError(Instance);
}
return ret;
} | inline int do_fclose(FILE *file) {
int ret = fclose(file);
if (ret == EOF) {
ErrorContext::getInstance()->saveError();
}
return ret;
} | do_fclose | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int do_fflush(FILE *file) {
pbzip2_ErrorContext *Instance;
int ret;
ret = fflush(file);
if (ret == -1) {
Instance = pbzip2_ErrorContext_getInstance();
pbzip2_ErrorContext_saveError(Instance);
}
return ret;
} | inline int do_fflush(FILE *file) {
int ret = fflush(file);
if (ret == EOF) {
ErrorContext::getInstance()->saveError();
}
return ret;
} | do_fflush | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
ssize_t do_read(int fd, void *buf, size_t count) {
pbzip2_ErrorContext *Instance;
ssize_t bytesRemaining;
long nbytes;
bytesRemaining = count;
for (nbytes = 0; bytesRemaining > 0; buf = (char *)buf + nbytes) {
nbytes = read(fd, buf, bytesRemaining);
if (nbytes <= 0)
break;
bytesRemaining -=... | ssize_t do_read(int fd, void *buf, size_t count) {
ssize_t bytesRemaining = count;
ssize_t nbytes = 0;
char *pbuf = (char *)buf;
while ((bytesRemaining > 0) &&
(nbytes = read(fd, pbuf, bytesRemaining)) > 0) {
bytesRemaining -= nbytes;
pbuf += nbytes;
}
if (nbytes < 0) {
ErrorContext::g... | do_read | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int do_remove(const char *pathname) {
pbzip2_ErrorContext *Instance;
int ret;
ret = remove(pathname);
if (ret == -1) {
Instance = pbzip2_ErrorContext_getInstance();
pbzip2_ErrorContext_saveError(Instance);
}
return ret;
} | int do_remove(const char *pathname) {
int ret = remove(pathname);
if (ret == -1) {
ErrorContext::getInstance()->saveError();
}
return ret;
} | do_remove | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
ssize_t do_write(int fd, const void *buf, size_t count) {
pbzip2_ErrorContext *Instance;
ssize_t bytesRemaining;
long nbytes;
bytesRemaining = count;
for (nbytes = 0; bytesRemaining > 0; buf = (char *)buf + nbytes) {
nbytes = write(fd, buf, bytesRemaining);
if (nbytes <= 0)
break;
bytesRema... | ssize_t do_write(int fd, const void *buf, size_t count) {
ssize_t bytesRemaining = count;
ssize_t nbytes = 0;
const char *pbuf = (const char *)buf;
while ((bytesRemaining > 0) &&
((nbytes = write(fd, pbuf, bytesRemaining)) > 0)) {
bytesRemaining -= nbytes;
pbuf += nbytes;
}
if (nbytes < 0)... | do_write | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
void *fileWriter(void *outname) {
bool v2;
pbzip2_ErrorContext *Instance;
int percentComplete;
int hOutfile;
int currBlock;
int ret;
int percentCompleteOld;
off_t CompressedSize;
size_t outBufferPos;
int bytesProcessed;
outBuff *prevBlockInSequence;
outBuff *outBlock;
CompressedSize = 0;
pe... | void *fileWriter(void *outname) {
char *OutFilename;
OFF_T CompressedSize = 0;
int percentComplete = 0;
int hOutfile = STDOUT_FILENO;
int currBlock = 0;
size_t outBufferPos = 0;
int ret = -1;
OFF_T bytesProcessed = 0;
OutFilename = (char *)outname;
outBuff *prevBlockInSequence = NULL;
#ifdef PBZIP... | fileWriter | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int getFileMetaData(const char *fileName) {
return stat64(fileName, (struct stat64 *)&fileMetaData);
} | int getFileMetaData(const char *fileName) {
return stat(fileName, &fileMetaData);
} | getFileMetaData | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int getLastGoodBlockBeforeErr(int errBlockNumber, int outSequenceNumber) {
if (outSequenceNumber == -1)
return errBlockNumber - 1;
else
return errBlockNumber;
} | inline int getLastGoodBlockBeforeErr(int errBlockNumber,
int outSequenceNumber) {
if (outSequenceNumber != -1) {
return errBlockNumber;
} else {
return errBlockNumber - 1;
}
} | getLastGoodBlockBeforeErr | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
size_t getOutputBufferPos(int blockNum) {
size_t outBuffPos;
outBuffPos = OutBufferPosToWrite + blockNum - NextBlockToWrite;
if (outBuffPos >= NumBufferedBlocksMax)
outBuffPos -= NumBufferedBlocksMax;
return outBuffPos;
} | inline size_t getOutputBufferPos(int blockNum) {
size_t outBuffPos = OutBufferPosToWrite + blockNum - NextBlockToWrite;
if (outBuffPos >= NumBufferedBlocksMax) {
outBuffPos -= NumBufferedBlocksMax;
}
return outBuffPos;
} | getOutputBufferPos | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int handle_error(ExitFlag exitFlag, int exitCode, const char *fmt, ...) {
long v3;
long v4;
long v5;
pbzip2_ErrorContext *Instance;
va_list args;
unsigned long v9;
long v10;
long v11;
long v12;
va_start(args, fmt);
v3 = va_arg(args, _QWORD);
v4 = va_arg(args, _QWORD);
v5 = va_arg(args, _QWORD... | int handle_error(ExitFlag exitFlag, int exitCode, const char *fmt, ...) {
va_list args;
va_start(args, fmt);
vfprintf(stderr, fmt, args);
ErrorContext::getInstance()->printErrorMessages(stderr);
fflush(stderr);
va_end(args);
if (exitFlag == EF_ABORT) {
syncSetTerminateFlag(1);
abort();
}
if ... | handle_error | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
bool hasTrailingGarbage(int bzret, const outBuff *fileData,
const bz_stream *strm) {
return bzret == 4 && (strm->avail_in || !fileData->isLastInSequence);
} | inline bool hasTrailingGarbage(int bzret, const outBuff *fileData,
const bz_stream &strm) {
return (bzret == BZ_STREAM_END) &&
((strm.avail_in != 0) || !fileData->isLastInSequence);
} | hasTrailingGarbage | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int initChildThreadAttributes() {
int ret;
ret = pthread_attr_init(&ChildThreadAttributes);
if (ret < 0) {
fprintf(stderr,
"Can't initialize thread atrributes [err=%d]! Aborting...\n", ret);
exit(-1);
}
if (ChildThreadStackSize > 0) {
ret =
pthread_attr_setstacksize(&ChildThre... | int initChildThreadAttributes() {
int ret = pthread_attr_init(&ChildThreadAttributes);
if (ret < 0) {
fprintf(stderr,
"Can't initialize thread atrributes [err=%d]! Aborting...\n", ret);
exit(-1);
}
#ifdef USE_STACKSIZE_CUSTOMIZATION
if (ChildThreadStackSize > 0) {
ret =
pthread... | initChildThreadAttributes | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int initSignalMask() {
int reta;
int retb;
int retc;
int retd;
int rete;
int ret;
reta = sigemptyset(&SignalMask);
retb = sigaddset(&SignalMask, 2) | reta;
retc = sigaddset(&SignalMask, 15) | retb;
retd = sigaddset(&SignalMask, 6) | retc;
rete = sigaddset(&SignalMask, SIG_HANDLER_QUIT_SIGNAL) | r... | int initSignalMask() {
int ret = 0;
ret = sigemptyset(&SignalMask);
ret = sigaddset(&SignalMask, SIGINT) | ret;
ret = sigaddset(&SignalMask, SIGTERM) | ret;
ret = sigaddset(&SignalMask, SIGABRT) | ret;
ret = sigaddset(&SignalMask, SIG_HANDLER_QUIT_SIGNAL) | ret;
#ifndef WIN32
ret = sigaddset(&SignalMask,... | initSignalMask | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
bool isIgnoredTrailingGarbage() { return IgnoreTrailingGarbageFlag != 0; } | inline bool isIgnoredTrailingGarbage() {
return (IgnoreTrailingGarbageFlag != 0);
} | isIgnoredTrailingGarbage | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int issueDecompressError(int bzret, const outBuff *fileData,
int outSequenceNumber, const bz_stream *strm,
const char *errmsg, int exitCode) {
handle_error(
ExitFlag_EF_EXIT, exitCode,
"pbzip2: %s: ret=%d; block=%d; seq=%d; isLastInSeq=%d; avail_in=%d\n",
... | inline int issueDecompressError(int bzret, const outBuff *fileData,
int outSequenceNumber, const bz_stream &strm,
const char *errmsg, int exitCode) {
#ifdef PBZIP_DEBUG
uintmax_t thid = (uintmax_t)pthread_self();
fprintf(stderr,
"(%" PRIuMAX ... | issueDecompressError | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
int v3;
int v4;
long v5;
int v6;
int v7;
int v8;
int v9;
const char *v10;
pbzip2_ErrorContext *Instance;
int *v12;
size_t v13;
size_t v14;
pbzip2_ErrorContext *v15;
int v16;
int v17;
long v18;
long v19;
long v20;
long v21;
... | int main(int argc, char *argv[]) {
queue *fifo;
pthread_t output;
char **FileList = NULL;
char *InFilename = NULL;
bool hasInFile = false;
char *progName = NULL;
char *progNamePos = NULL;
char bz2Header[] = {"BZh91AY&SY"};
std::string outFilename;
char cmdLineTemp[2048];
unsigned char tmpBuff[50];... | main | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
void mutexesDelete() {
if (OutMutex) {
pthread_mutex_destroy(OutMutex);
if (OutMutex)
operator delete(OutMutex, 0x28u);
OutMutex = 0;
}
if (ProducerDoneMutex) {
pthread_mutex_destroy(ProducerDoneMutex);
if (ProducerDoneMutex)
operator delete(ProducerDoneMutex, 0x28u);
ProducerD... | void mutexesDelete() {
if (OutMutex != NULL) {
pthread_mutex_destroy(OutMutex);
delete OutMutex;
OutMutex = NULL;
}
if (ProducerDoneMutex != NULL) {
pthread_mutex_destroy(ProducerDoneMutex);
delete ProducerDoneMutex;
ProducerDoneMutex = NULL;
}
} | mutexesDelete | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int mutexesInit() {
OutMutex = (pthread_mutex_t *)operator new(0x28u, &std_nothrow);
if (OutMutex) {
pthread_mutex_init(OutMutex, 0);
ProducerDoneMutex = (pthread_mutex_t *)operator new(0x28u, &std_nothrow);
if (ProducerDoneMutex) {
pthread_mutex_init(ProducerDoneMutex, 0);
return 0;
} e... | int mutexesInit() {
OutMutex = new(std::nothrow) pthread_mutex_t;
if (OutMutex == NULL) {
fprintf(
stderr,
"pbzip2: *ERROR: Could not allocate memory (OutMutex)! Aborting...\n");
return 1;
}
pthread_mutex_init(OutMutex, NULL);
ProducerDoneMutex = new(std::nothrow) pthread_mutex_t;
... | mutexesInit | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
outBuff *outputBufferAdd(const outBuff *element, const char *caller) {
std_vector<outBuff> _reference v3;
long v4;
long v5;
int dist;
std_vector<outBuff> _size_type outBuffPos;
safe_mutex_lock(OutMutex);
dist = element->blockNumber - NumBufferedBlocksMax;
while (dist >= NextBlockToWrite) {
if (sync... | outBuff *outputBufferAdd(const outBuff &element, const char *caller) {
safe_mutex_lock(OutMutex);
int dist = element.blockNumber - NumBufferedBlocksMax;
while (dist >= NextBlockToWrite) {
if (syncGetTerminateFlag() != 0) {
#ifdef PBZIP_DEBUG
fprintf(stderr, "%s/outputBufferAdd: terminating2 - terminate... | outputBufferAdd | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
void outputBufferInit(size_t size) {
outBuff emptyElement;
unsigned long v2;
v2 = __readfsqword(0x28u);
safe_mutex_lock(OutMutex);
NextBlockToWrite = 0;
OutBufferPosToWrite = 0;
NumBufferedBlocks = 0;
NumBufferedTailBlocks = 0;
outBuff_outBuff(&emptyElement, 0, 0, 0, 0, 0, 1, 0);
emptyElement.buf =... | void outputBufferInit(size_t size) {
safe_mutex_lock(OutMutex);
NextBlockToWrite = 0;
OutBufferPosToWrite = 0;
NumBufferedBlocks = 0;
NumBufferedTailBlocks = 0;
outBuff emptyElement;
emptyElement.buf = NULL;
emptyElement.bufSize = 0;
OutputBuffer.assign(size, emptyElement);
if (OutputBuffer.size... | outputBufferInit | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
outBuff *outputBufferSeqAddNext(outBuff *preveElement, outBuff *newElement) {
safe_mutex_lock(OutMutex);
while (NumBufferedTailBlocks >= NumBufferedBlocksMax && preveElement->buf) {
if (syncGetTerminateFlag() ||
LastGoodBlock != -1 && newElement->blockNumber > LastGoodBlock) {
pthread_mutex_unlock... | outBuff *outputBufferSeqAddNext(outBuff *preveElement, outBuff *newElement) {
safe_mutex_lock(OutMutex);
while ((NumBufferedTailBlocks >= NumBufferedBlocksMax) &&
(preveElement->buf != NULL)) {
if (syncGetTerminateFlag() != 0) {
#ifdef PBZIP_DEBUG
fprintf(stderr, "%s: terminating2 - terminateFla... | outputBufferSeqAddNext | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int producer(int hInfile, int blockSize, queue_0 *fifo) {
queue_ElementType *v4;
int ret;
unsigned int inSize;
char *FileData;
safe_mutex_lock(&ProgressIndicatorsMutex);
NumBlocks = 0;
safe_mutex_unlock(&ProgressIndicatorsMutex);
while (1) {
if (syncGetTerminateFlag()) {
close(hInfile);
... | int producer(int hInfile, int blockSize, queue *fifo) {
char *FileData = NULL;
size_t inSize = 0;
int ret = 0;
safe_mutex_lock(&ProgressIndicatorsMutex);
NumBlocks = 0;
safe_mutex_unlock(&ProgressIndicatorsMutex);
while (1) {
if (syncGetTerminateFlag() != 0) {
close(hInfile);
return -1;... | producer | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int producerDecompressCheckInterrupt(int hInfile, outBuff **fileData,
int lastBlock) {
char isInterrupted;
isInterrupted = syncGetLastGoodBlock() != -1;
if (syncGetTerminateFlag())
isInterrupted = 1;
if (!isInterrupted)
return 0;
close(hInfile);
disposeMemorySin... | int producerDecompressCheckInterrupt(int hInfile, outBuff *&fileData,
int lastBlock) {
bool isInterrupted = false;
if (syncGetLastGoodBlock() != -1) {
isInterrupted = true;
#ifdef PBZIP_DEBUG
fprintf(stderr,
"producer_decompress: interrupt1 - LastGoodBlock ... | producerDecompressCheckInterrupt | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int producer_decompress(int hInfile, off_t fileSize, queue_0 *fifo) {
int v4;
outBuff *fileData;
pbzip2_BZ2StreamScanner bz2StreamScanner;
unsigned long v10;
v10 = __readfsqword(0x28u);
safe_mutex_lock(&ProgressIndicatorsMutex);
NumBlocks = 0;
safe_mutex_unlock(&ProgressIndicatorsMutex);
pbzip2_BZ2St... | int producer_decompress(int hInfile, OFF_T fileSize, queue *fifo) {
safe_mutex_lock(&ProgressIndicatorsMutex);
NumBlocks = 0;
safe_mutex_unlock(&ProgressIndicatorsMutex);
pbzip2::BZ2StreamScanner bz2StreamScanner(hInfile);
outBuff *fileData = bz2StreamScanner.getNextStream();
while (!bz2StreamScanner.fail... | producer_decompress | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
void queueDelete(queue_0 *q) {
if (q) {
if (q->mut) {
pthread_mutex_destroy(q->mut);
if (q->mut)
operator delete(q->mut, 0x28u);
q->mut = 0;
}
if (q->notFull) {
pthread_cond_destroy(q->notFull);
if (q->notFull)
operator delete(q->notFull, 0x30u);
q->notF... | void queueDelete(queue *q) {
if (q == NULL)
return;
if (q->mut != NULL) {
pthread_mutex_destroy(q->mut);
delete q->mut;
q->mut = NULL;
}
if (q->notFull != NULL) {
pthread_cond_destroy(q->notFull);
delete q->notFull;
q->notFull = NULL;
}
if (q->notEmpty != NULL) {
pthread_c... | queueDelete | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
queue_0 *queueInit(int queueSize) {
queue_0 *v1;
queue_0 *v2;
v1 = (queue_0 *)operator new(0x60u, &std_nothrow);
v2 = v1;
if (v1)
queue_queue(v1);
if (!v2)
return 0;
if ((unsigned long)queueSize > 0xFFFFFFFFFFFFFFFLL)
__cxa_throw_bad_array_new_length();
v2->qData =
(queue_ElementTypeP... | queue *queueInit(int queueSize) {
queue *q;
q = new(std::nothrow) queue;
if (q == NULL)
return NULL;
q->qData = new(std::nothrow) queue::ElementTypePtr[queueSize];
if (q->qData == NULL)
return NULL;
q->size = queueSize;
q->clear();
q->mut = NULL;
q->mut = new(std::nothrow) pthread_mutex_... | queueInit | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
void safe_cond_broadcast(pthread_cond_t *cond) {
int ret;
ret = pthread_cond_broadcast(cond);
if (ret) {
fprintf(stderr,
"pthread_cond_broadcast error [%d]! Aborting immediately!\n", ret);
cleanupAndQuit(-7);
}
} | inline void safe_cond_broadcast(pthread_cond_t *cond) {
int ret = pthread_cond_broadcast(cond);
if (ret != 0) {
fprintf(stderr,
"pthread_cond_broadcast error [%d]! Aborting immediately!\n", ret);
cleanupAndQuit(-7);
}
} | safe_cond_broadcast | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
void safe_cond_signal(pthread_cond_t *cond) {
int ret;
ret = pthread_cond_signal(cond);
if (ret) {
fprintf(stderr, "pthread_cond_signal error [%d]! Aborting immediately!\n",
ret);
cleanupAndQuit(-7);
}
} | inline void safe_cond_signal(pthread_cond_t *cond) {
int ret = pthread_cond_signal(cond);
if (ret != 0) {
fprintf(stderr, "pthread_cond_signal error [%d]! Aborting immediately!\n",
ret);
cleanupAndQuit(-7);
}
} | safe_cond_signal | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int safe_cond_timed_wait(pthread_cond_t *cond, pthread_mutex_t *mutex,
int seconds, const char *caller) {
pbzip2_ErrorContext *Instance;
int pret;
timezone tz;
timespec waitTimer;
timeval tv;
unsigned long v12;
v12 = __readfsqword(0x28u);
gettimeofday(&tv, &tz);
waitTimer.tv_... | int safe_cond_timed_wait(pthread_cond_t *cond, pthread_mutex_t *mutex,
int seconds, const char *caller) {
struct timespec waitTimer;
#ifndef WIN32
struct timeval tv;
struct timezone tz;
#else
SYSTEMTIME systemtime;
LARGE_INTEGER filetime;
#endif
#ifndef WIN32
gettimeofday(&tv, &tz)... | safe_cond_timed_wait | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
void safe_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) {
int ret;
ret = pthread_cond_wait(cond, mutex);
if (ret) {
fprintf(stderr, "pthread_cond_wait error [%d]! Aborting immediately!\n",
ret);
pthread_mutex_unlock(mutex);
cleanupAndQuit(-8);
}
} | inline void safe_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) {
int ret = pthread_cond_wait(cond, mutex);
if (ret != 0) {
fprintf(stderr, "pthread_cond_wait error [%d]! Aborting immediately!\n",
ret);
pthread_mutex_unlock(mutex);
cleanupAndQuit(-8);
}
} | safe_cond_wait | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
FILE *safe_fopen_output(const char *path, const char *mode) {
pbzip2_ErrorContext *Instance;
int fh;
FILE *fp;
fh = safe_open_output(path);
if (fh == -1)
return 0;
fp = fdopen(fh, mode);
if (!fp) {
Instance = pbzip2_ErrorContext_getInstance();
pbzip2_ErrorContext_saveError(Instance);
clos... | FILE *safe_fopen_output(const char *path, const char *mode) {
int fh = safe_open_output(path);
if (fh == -1) {
return NULL;
}
FILE *fp = fdopen(fh, mode);
if (fp == NULL) {
ErrorContext::getInstance()->saveError();
close(fh);
}
return fp;
} | safe_fopen_output | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
void safe_mutex_lock(pthread_mutex_t *mutex) {
int ret;
ret = pthread_mutex_lock(mutex);
if (ret) {
fprintf(stderr, "pthread_mutex_lock error [%d]! Aborting immediately!\n",
ret);
cleanupAndQuit(-5);
}
} | inline void safe_mutex_lock(pthread_mutex_t *mutex) {
int ret = pthread_mutex_lock(mutex);
if (ret != 0) {
fprintf(stderr, "pthread_mutex_lock error [%d]! Aborting immediately!\n",
ret);
cleanupAndQuit(-5);
}
} | safe_mutex_lock | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
void safe_mutex_unlock(pthread_mutex_t *mutex) {
int ret;
ret = pthread_mutex_unlock(mutex);
if (ret) {
fprintf(stderr, "pthread_mutex_unlock error [%d]! Aborting immediately!\n",
ret);
cleanupAndQuit(-6);
}
} | inline void safe_mutex_unlock(pthread_mutex_t *mutex) {
int ret = pthread_mutex_unlock(mutex);
if (ret != 0) {
fprintf(stderr, "pthread_mutex_unlock error [%d]! Aborting immediately!\n",
ret);
cleanupAndQuit(-6);
}
} | safe_mutex_unlock | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int safe_open_output(const char *path) {
pbzip2_ErrorContext *Instance;
int ret;
ret = open64(path, 193, 384);
if (ret == -1) {
Instance = pbzip2_ErrorContext_getInstance();
pbzip2_ErrorContext_saveError(Instance);
}
return ret;
} | int safe_open_output(const char *path) {
int ret = open(path, O_WRONLY | O_CREAT | O_EXCL | O_BINARY, FILE_MODE);
if (ret == -1) {
ErrorContext::getInstance()->saveError();
}
return ret;
} | safe_open_output | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int setupSignalHandling() {
int ret;
ret = initSignalMask();
if (!ret)
return pthread_create(&SignalHandlerThread, &ChildThreadAttributes,
(void *(*)(void *))signalHandlerProc, 0);
return ret;
} | int setupSignalHandling() {
int ret = initSignalMask();
if (ret == 0) {
ret = pthread_create(&SignalHandlerThread, &ChildThreadAttributes,
signalHandlerProc, NULL);
}
return ret;
} | setupSignalHandling | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int setupTerminator() {
return pthread_create(&TerminatorThread, &ChildThreadAttributes,
(void *(*)(void *))terminatorThreadProc, 0);
} | int setupTerminator() {
return pthread_create(&TerminatorThread, &ChildThreadAttributes,
terminatorThreadProc, NULL);
} | setupTerminator | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
void *signalHandlerProc(void *arg) {
int signalCaught;
int ret;
unsigned long v4;
v4 = __readfsqword(0x28u);
ret = sigwait(&SignalMask, &signalCaught);
if (ret) {
fprintf(stderr, "\n *signalHandlerProc - sigwait error: %d\n", ret);
} else {
if (signalCaught == SIG_HANDLER_QUIT_SIGNAL)
retur... | void *signalHandlerProc(void *arg) {
int signalCaught;
int ret = sigwait(&SignalMask, &signalCaught);
if (ret != 0) {
fprintf(stderr, "\n *signalHandlerProc - sigwait error: %d\n", ret);
} else if (signalCaught == SIG_HANDLER_QUIT_SIGNAL) {
return NULL;
} else {
fprintf(stderr, "\n *Control-C or... | signalHandlerProc | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int syncGetLastGoodBlock() {
int ret;
safe_mutex_lock(OutMutex);
ret = LastGoodBlock;
safe_mutex_unlock(OutMutex);
return ret;
} | inline int syncGetLastGoodBlock() {
int ret;
safe_mutex_lock(OutMutex);
ret = LastGoodBlock;
safe_mutex_unlock(OutMutex);
return ret;
} | syncGetLastGoodBlock | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int syncGetMinErrorBlock() {
int ret;
safe_mutex_lock(OutMutex);
ret = MinErrorBlock;
safe_mutex_unlock(OutMutex);
return ret;
} | inline int syncGetMinErrorBlock() {
int ret;
safe_mutex_lock(OutMutex);
ret = MinErrorBlock;
safe_mutex_unlock(OutMutex);
return ret;
} | syncGetMinErrorBlock | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int syncGetProducerDone() {
int ret;
safe_mutex_lock(ProducerDoneMutex);
ret = producerDone;
safe_mutex_unlock(ProducerDoneMutex);
return ret;
} | inline int syncGetProducerDone() {
int ret;
safe_mutex_lock(ProducerDoneMutex);
ret = producerDone;
safe_mutex_unlock(ProducerDoneMutex);
return ret;
} | syncGetProducerDone | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int syncGetTerminateFlag() {
int ret;
safe_mutex_lock(&TerminateFlagMutex);
ret = terminateFlag;
safe_mutex_unlock(&TerminateFlagMutex);
return ret;
} | inline int syncGetTerminateFlag() {
int ret;
safe_mutex_lock(&TerminateFlagMutex);
ret = terminateFlag;
safe_mutex_unlock(&TerminateFlagMutex);
return ret;
} | syncGetTerminateFlag | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
void syncSetFinishedFlag(int newValue) {
safe_mutex_lock(&TerminateFlagMutex);
finishedFlag = newValue;
if (newValue)
pthread_cond_signal(&TerminateCond);
safe_mutex_unlock(&TerminateFlagMutex);
} | inline void syncSetFinishedFlag(int newValue) {
safe_mutex_lock(&TerminateFlagMutex);
finishedFlag = newValue;
if (finishedFlag != 0) {
pthread_cond_signal(&TerminateCond);
}
safe_mutex_unlock(&TerminateFlagMutex);
} | syncSetFinishedFlag | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
void syncSetLastGoodBlock(int newValue, int errBlock) {
bool changed;
changed = 0;
safe_mutex_lock(OutMutex);
if (LastGoodBlock == -1 || newValue < LastGoodBlock) {
LastGoodBlock = newValue;
changed = 1;
}
if (MinErrorBlock == -1 || errBlock < MinErrorBlock) {
MinErrorBlock = errBlock;
chan... | inline void syncSetLastGoodBlock(int newValue, int errBlock) {
bool changed = false;
safe_mutex_lock(OutMutex);
#ifdef PBZIP_DEBUG
uintmax_t thid = (uintmax_t)pthread_self();
fprintf(stderr,
"(%" PRIuMAX
") syncSetLastGoodBlock: %d -> %d; MinErrorBlock: %d -> %d\n",
thid, LastGood... | syncSetLastGoodBlock | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
void syncSetProducerDone(int newValue) {
safe_mutex_lock(ProducerDoneMutex);
producerDone = newValue;
safe_mutex_unlock(ProducerDoneMutex);
} | inline void syncSetProducerDone(int newValue) {
safe_mutex_lock(ProducerDoneMutex);
producerDone = newValue;
safe_mutex_unlock(ProducerDoneMutex);
} | syncSetProducerDone | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
void syncSetTerminateFlag(int newValue) {
safe_mutex_lock(&TerminateFlagMutex);
terminateFlag = newValue;
if (newValue) {
pthread_cond_signal(&TerminateCond);
safe_mutex_unlock(&TerminateFlagMutex);
safe_mutex_lock(OutMutex);
pthread_cond_broadcast(notTooMuchNumBuffered);
safe_mutex_unlock(Out... | inline void syncSetTerminateFlag(int newValue) {
safe_mutex_lock(&TerminateFlagMutex);
terminateFlag = newValue;
if (terminateFlag != 0) {
pthread_cond_signal(&TerminateCond);
safe_mutex_unlock(&TerminateFlagMutex);
safe_mutex_lock(OutMutex);
pthread_cond_broadcast(notTooMuchNumBuffered);
s... | syncSetTerminateFlag | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
void *terminatorThreadProc(void *arg) {
int *v1;
int ret;
ret = pthread_mutex_lock(&TerminateFlagMutex);
if (ret) {
v1 = __errno_location();
pbzip2_ErrorContext_syncPrintErrnoMsg(stderr, *v1);
fprintf(stderr,
"Terminator thread: pthread_mutex_lock error [%d]! Aborting...\n",
... | void *terminatorThreadProc(void *arg) {
int ret = pthread_mutex_lock(&TerminateFlagMutex);
if (ret != 0) {
ErrorContext::syncPrintErrnoMsg(stderr, errno);
fprintf(stderr,
"Terminator thread: pthread_mutex_lock error [%d]! Aborting...\n",
ret);
syncSetTerminateFlag(1);
cleanu... | terminatorThreadProc | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int testBZ2ErrorHandling(int bzerr, BZFILE *bzf, int streamNo) {
int result;
int bzerr_dummy;
unsigned long v6;
v6 = __readfsqword(0x28u);
BZ2_bzReadClose(&bzerr_dummy, bzf);
switch (bzerr) {
case -9:
fwrite("pbzip2: *ERROR: Integers are not the right size for libbzip2. "
"Aborting!\n",
... | int testBZ2ErrorHandling(int bzerr, BZFILE *bzf, int streamNo) {
int bzerr_dummy;
BZ2_bzReadClose(&bzerr_dummy, bzf);
switch (bzerr) {
case BZ_CONFIG_ERROR:
fprintf(stderr, "pbzip2: *ERROR: Integers are not the right size for "
"libbzip2. Aborting!\n");
exit(3);
break;
case BZ... | testBZ2ErrorHandling | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int testCompressedData(char *fileName) {
pbzip2_ErrorContext *Instance;
pbzip2_ErrorContext *v3;
int bzerr;
int nUnused;
int streamNo;
int i;
int ret;
int nread;
int c;
unsigned char *unusedTmp;
FILE *zStream;
BZFILE *bzf;
unsigned char obuf[5000];
unsigned char unused[5000];
unsigned long... | int testCompressedData(char *fileName) {
FILE *zStream = NULL;
int ret = 0;
BZFILE *bzf = NULL;
unsigned char obuf[5000];
unsigned char unused[BZ_MAX_UNUSED];
unsigned char *unusedTmp;
int bzerr, nread, streamNo;
int nUnused;
int i;
nUnused = 0;
streamNo = 0;
if (strcmp(fileName, "-") != 0) {... | testCompressedData | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
void usage(char *progname, const char *reason) {
int v2;
banner();
if (!strncmp(reason, "HELP", 4u))
fputc(10, stderr);
else
fprintf(stderr, "\nInvalid command line: %s. Aborting...\n\n", reason);
fprintf(stderr,
"Usage: %s [-1 .. -9] [-b#cdfhklm#p#qrS#tVz] <filename> <filename2> "
... | void usage(char *progname, const char *reason) {
banner();
if (strncmp(reason, "HELP", 4) == 0)
fprintf(stderr, "\n");
else
fprintf(stderr, "\nInvalid command line: %s. Aborting...\n\n", reason);
#ifndef PBZIP_NO_LOADAVG
fprintf(stderr,
"Usage: %s [-1 .. -9] [-b#cdfhklm#p#qrS#tVz] <filename... | usage | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int verbose_fclose(FILE *file, const char *fileName) {
int *v2;
int ret;
ret = fclose(file);
if (ret == -1) {
v2 = __errno_location();
pbzip2_ErrorContext_syncPrintErrnoMsg(stderr, *v2);
fprintf(stderr, "pbzip2: *ERROR: Failed to close file [%s]!\n", fileName);
}
return ret;
} | inline int verbose_fclose(FILE *file, const char *fileName) {
int ret;
if ((ret = fclose(file)) == EOF) {
ErrorContext::syncPrintErrnoMsg(stderr, errno);
fprintf(stderr, "pbzip2: *ERROR: Failed to close file [%s]!\n", fileName);
}
return ret;
} | verbose_fclose | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int waitForPreviousBlock(int blockNumToWait, int errBlockNumber) {
while (1) {
if (syncGetTerminateFlag())
return -1;
safe_mutex_lock(OutMutex);
if (MinErrorBlock != -1 && errBlockNumber > MinErrorBlock) {
safe_mutex_unlock(OutMutex);
return 2;
}
if (errBlockNumber <= NextBlockTo... | int waitForPreviousBlock(int blockNumToWait, int errBlockNumber) {
#ifdef PBZIP_DEBUG
uintmax_t thid = (uintmax_t)pthread_self();
safe_mutex_lock(OutMutex);
fprintf(stderr,
"(%" PRIuMAX ") waitForPreviousBlock enter: LastGoodBlock=%d"
"; blockNumToWait=%d; NextBlockToWrite=%d; MinErrorBlock=%d... | waitForPreviousBlock | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
int writeFileMetaData(const char *fileName) {
pbzip2_ErrorContext *Instance;
pbzip2_ErrorContext *v3;
pbzip2_ErrorContext *v4;
int ret;
int reta;
int retb;
utimbuf uTimBuf;
unsigned long v9;
v9 = __readfsqword(0x28u);
uTimBuf.actime = fileMetaData.st_atim.tv_sec;
uTimBuf.modtime = fileMetaData.st... | int writeFileMetaData(const char *fileName) {
int ret = 0;
#ifndef WIN32
struct utimbuf uTimBuf;
#else
_utimbuf uTimBuf;
#endif
uTimBuf.actime = fileMetaData.st_atime;
uTimBuf.modtime = fileMetaData.st_mtime;
ret = chmod(fileName, fileMetaData.st_mode);
if (ret != 0) {
ErrorContext::getInstance()->s... | writeFileMetaData | pbzip2-1.1.13 | app-arch | O0/app-arch/pbzip2-1.1.13/pbzip2 | ida | O0 |
s32 bz3_decode_block(bz3_state *state, u8 *buffer, s32 data_size,
s32 orig_size) {
s32 v5;
int data_sizeb;
s8 model;
int lzp_size;
int rle_size;
s32 p;
s32 pa;
int size_src;
u32 crc32;
s32 bwt_idx;
u8 *b1;
u8 *b2;
crc32 = read_neutral_s32_2(buffer);
bwt_idx = read_neutr... | PUBLIC_API s32 bz3_decode_block(struct bz3_state *state, u8 *buffer,
s32 data_size, s32 orig_size) {
u32 crc32 = read_neutral_s32(buffer);
s32 bwt_idx = read_neutral_s32(buffer + 4);
if (data_size > state->block_size + state->block_size / 50 + 32 ||
data_size < 0) {
sta... | bz3_decode_block | bzip3-1.1.4 | app-arch | O0/app-arch/bzip3-1.1.4/bzip3 | ida | O0 |
s32 bz3_encode_block(bz3_state *state, u8 *buffer, s32 data_size) {
int data_sizea;
s32 data_sizeb;
s8 model;
s32 overhead;
s32 p;
s32 crc32;
s32 rle_size;
int lzp_size;
int bwt_idx;
u8 *b1;
u8 *b2;
u8 *tmp_0;
data_sizea = data_size;
b1 = buffer;
b2 = state->swap_buffer;
if (data_size <... | PUBLIC_API s32 bz3_encode_block(struct bz3_state *state, u8 *buffer,
s32 data_size) {
u8 *b1 = buffer, *b2 = state->swap_buffer;
if (data_size > state->block_size) {
state->last_error = BZ3_ERR_DATA_TOO_BIG;
return -1;
}
u32 crc32 = crc32sum(1, b1, data_size);
if (da... | bz3_encode_block | bzip3-1.1.4 | app-arch | O0/app-arch/bzip3-1.1.4/bzip3 | ida | O0 |
int is_dir(const char *path) {
stat sb;
unsigned long v3;
v3 = __readfsqword(0x28u);
return !stat(path, &sb) && (sb.st_mode & 0xF000) == 0x4000;
} | int is_dir(const char *path) {
struct stat sb;
if (stat(path, &sb) == 0 && S_ISDIR(sb.st_mode))
return 1;
return 0;
} | is_dir | bzip3-1.1.4 | app-arch | O0/app-arch/bzip3-1.1.4/bzip3 | ida | O0 |
int is_numeric(const char *str) {
while (*str) {
if (((*__ctype_b_loc())[*str] & 0x800) == 0)
return 0;
++str;
}
return 1;
} | int is_numeric(const char *str) {
for (; *str; str++)
if (!isdigit(*str))
return 0;
return 1;
} | is_numeric | bzip3-1.1.4 | app-arch | O0/app-arch/bzip3-1.1.4/bzip3 | ida | O0 |
void libsais_unbwt_init_single(const u8 *T, sa_uint_t *P, sa_sint_t n,
const sa_sint_t *freq, const sa_uint_t *I,
sa_uint_t *bucket2, u16 *fastbits) {
fast_uint_t shift;
fast_uint_t index;
fast_uint_t lastc;
sa_uint_t bucket1[258];
unsigned long v1... | static void libsais_unbwt_init_single(const u8 *RESTRICT T,
sa_uint_t *RESTRICT P, sa_sint_t n,
const sa_sint_t *freq,
const sa_uint_t *RESTRICT I,
sa_uint_t *RESTRICT ... | libsais_unbwt_init_single | bzip3-1.1.4 | app-arch | O0/app-arch/bzip3-1.1.4/bzip3 | ida | O0 |
sa_sint_t libsais_unbwt_main(const u8 *T, u8 *U, sa_uint_t *P, sa_sint_t n,
const sa_sint_t *freq, sa_sint_t r,
const sa_uint_t *I, sa_sint_t threads) {
sa_uint_t *v8;
sa_sint_t v9;
sa_sint_t index;
char shift;
sa_uint_t *bucket2;
u16 *fastbits;
sa... | static sa_sint_t libsais_unbwt_main(const u8 *T, u8 *U, sa_uint_t *P,
sa_sint_t n, const sa_sint_t *freq,
sa_sint_t r, const sa_uint_t *I,
sa_sint_t threads) {
fast_uint_t shift = 0;
while ((n >> shift) > (1 ... | libsais_unbwt_main | bzip3-1.1.4 | app-arch | O0/app-arch/bzip3-1.1.4/bzip3 | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
const char *v4;
size_t v5;
int v6;
size_t v7;
size_t v8;
size_t v9;
size_t v10;
char *v11;
int v12;
int v13;
const char *v14;
const char *v15;
const char *v16;
void *v17;
void *v18;
void *v19;
void *v20;
const char *v21;
s3... | int main(int argc, char *argv[]) {
int mode = MODE_UNSPECIFIED;
int args_status = 1;
char *input = NULL, *output = NULL;
char *bz3_file = NULL, *regular_file = NULL;
int no_bz3_suffix = 0, force = 0;
int force_stdstreams = 0, workers = 0;
int double_dash = 0;
u32 block_size = MiB(8);
for (int i = ... | main | bzip3-1.1.4 | app-arch | O0/app-arch/bzip3-1.1.4/bzip3 | ida | O0 |
CLzRef *AllocRefs(uint32_t num) {
if (num == (4 * num) >> 2)
return (CLzRef *)malloc(4 * num);
else
return 0;
} | static CLzRef *AllocRefs(uint32_t num) {
uint32_t sizeInBytes = num * sizeof(CLzRef);
if (sizeInBytes / sizeof(CLzRef) != num)
return 0;
return (CLzRef *)malloc(sizeInBytes);
} | AllocRefs | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
uint32_t Backward(CLzmaEnc *p, uint32_t *backRes, uint32_t cur) {
uint32_t cura;
uint32_t posMem;
uint32_t backMem;
uint32_t posPrev;
uint32_t backCur;
cura = cur;
posMem = p->opt[cur].posPrev;
backMem = p->opt[cur].backPrev;
p->optimumEndIndex = cur;
do {
if (p->opt[cura].prev1IsChar) {
... | static uint32_t Backward(CLzmaEnc *p, uint32_t *backRes, uint32_t cur) {
uint32_t posMem = p->opt[cur].posPrev;
uint32_t backMem = p->opt[cur].backPrev;
p->optimumEndIndex = cur;
do {
if (p->opt[cur].prev1IsChar) {
MakeAsChar(&p->opt[posMem]) p->opt[posMem].posPrev = posMem - 1;
if (p->opt[cur].... | Backward | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
uint32_t Bt2_MatchFinder_GetMatches(CMatchFinder *p, uint32_t *distances) {
uint32_t lenLimit;
CLzRef curMatch;
uint32_t offset;
uint8_t *cur;
lenLimit = p->lenLimit;
if (lenLimit > 1) {
cur = p->buffer;
curMatch = p->hash[*(unsigned short *)cur];
p->hash[*(unsigned short *)cur] = p->pos;
o... | static uint32_t Bt2_MatchFinder_GetMatches(CMatchFinder *p,
uint32_t *distances) {
uint32_t offset;
GET_MATCHES_HEADER(2)
HASH2_CALC;
curMatch = p->hash[hashValue];
p->hash[hashValue] = p->pos;
offset = 0;
GET_MATCHES_FOOTER(offset, 1)
} | Bt2_MatchFinder_GetMatches | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
void Bt2_MatchFinder_Skip(CMatchFinder *p, uint32_t num) {
uint32_t lenLimit;
CLzRef curMatch;
uint8_t *cur;
do {
lenLimit = p->lenLimit;
if (lenLimit > 1) {
cur = p->buffer;
curMatch = p->hash[*(unsigned short *)cur];
p->hash[*(unsigned short *)cur] = p->pos;
SkipMatchesSpec(le... | static void Bt2_MatchFinder_Skip(CMatchFinder *p, uint32_t num) {
do {
SKIP_HEADER(2)
HASH2_CALC;
curMatch = p->hash[hashValue];
p->hash[hashValue] = p->pos;
SKIP_FOOTER
} while (--num != 0);
} | Bt2_MatchFinder_Skip | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
uint32_t Bt3_MatchFinder_GetMatches(CMatchFinder *p, uint32_t *distances) {
CLzRef *v3;
uint32_t maxLen;
uint32_t offset;
uint32_t offseta;
uint32_t lenLimit;
uint32_t temp;
uint32_t hashValue;
uint32_t delta2;
CLzRef curMatch;
uint8_t *cur;
lenLimit = p->lenLimit;
if (lenLimit > 2) {
cur =... | static uint32_t Bt3_MatchFinder_GetMatches(CMatchFinder *p,
uint32_t *distances) {
uint32_t hash2Value, delta2, maxLen, offset;
GET_MATCHES_HEADER(3)
HASH3_CALC;
delta2 = p->pos - p->hash[hash2Value];
curMatch = p->hash[kFix3HashSize + hashValue];
p->hash[hash2V... | Bt3_MatchFinder_GetMatches | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
void Bt3_MatchFinder_Skip(CMatchFinder *p, uint32_t num) {
CLzRef *v2;
uint32_t lenLimit;
uint32_t temp;
uint32_t hashValue;
CLzRef curMatch;
uint8_t *cur;
do {
lenLimit = p->lenLimit;
if (lenLimit > 2) {
cur = p->buffer;
temp = crc32[*cur] ^ cur[1];
hashValue = (temp ^ (cur[2] ... | static void Bt3_MatchFinder_Skip(CMatchFinder *p, uint32_t num) {
do {
uint32_t hash2Value;
SKIP_HEADER(3)
HASH3_CALC;
curMatch = p->hash[kFix3HashSize + hashValue];
p->hash[hash2Value] = p->hash[kFix3HashSize + hashValue] = p->pos;
SKIP_FOOTER
} while (--num != 0);
} | Bt3_MatchFinder_Skip | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
uint32_t Bt4_MatchFinder_GetMatches(CMatchFinder *p, uint32_t *distances) {
CLzRef *v3;
CLzRef *v4;
uint32_t delta2;
uint32_t maxLen;
uint32_t offset;
uint32_t offseta;
uint32_t lenLimit;
uint32_t temp;
uint32_t hash3Value;
uint32_t hashValue;
uint32_t delta3;
CLzRef curMatch;
uint8_t *cur;
... | static uint32_t Bt4_MatchFinder_GetMatches(CMatchFinder *p,
uint32_t *distances) {
uint32_t hash2Value, hash3Value, delta2, delta3, maxLen, offset;
GET_MATCHES_HEADER(4)
HASH4_CALC;
delta2 = p->pos - p->hash[hash2Value];
delta3 = p->pos - p->hash[kFix3HashSize + ha... | Bt4_MatchFinder_GetMatches | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
void Bt4_MatchFinder_Skip(CMatchFinder *p, uint32_t num) {
CLzRef *v2;
uint32_t lenLimit;
uint32_t temp;
uint32_t hashValue;
CLzRef curMatch;
uint8_t *cur;
do {
lenLimit = p->lenLimit;
if (lenLimit > 3) {
cur = p->buffer;
temp = crc32[*cur] ^ cur[1];
hashValue = ((32 * crc32[cur... | static void Bt4_MatchFinder_Skip(CMatchFinder *p, uint32_t num) {
do {
uint32_t hash2Value, hash3Value;
SKIP_HEADER(4)
HASH4_CALC;
curMatch = p->hash[kFix4HashSize + hashValue];
p->hash[hash2Value] = p->hash[kFix3HashSize + hash3Value] = p->pos;
p->hash[kFix4HashSize + hashValue] = p->pos;
... | Bt4_MatchFinder_Skip | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
int CheckErrors(CLzmaEnc *p) {
if (p->result)
return p->result;
if (p->rc.res)
p->result = 9;
if (p->matchFinderBase.result)
p->result = 8;
if (p->result)
p->finished = 1;
return p->result;
} | static int CheckErrors(CLzmaEnc *p) {
if (p->result != SZ_OK)
return p->result;
if (p->rc.res != SZ_OK)
p->result = SZ_ERROR_WRITE;
if (p->matchFinderBase.result != SZ_OK)
p->result = SZ_ERROR_READ;
if (p->result != SZ_OK)
p->finished = true;
return p->result;
} | CheckErrors | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
void FillAlignPrices(CLzmaEnc *p) {
uint32_t i;
for (i = 0; i <= 0xF; ++i)
p->alignPrices[i] =
RcTree_ReverseGetPrice(p->posAlignEncoder, 4, i, p->ProbPrices);
p->alignPriceCount = 0;
} | static void FillAlignPrices(CLzmaEnc *p) {
uint32_t i;
for (i = 0; i < kAlignTableSize; i++)
p->alignPrices[i] = RcTree_ReverseGetPrice(p->posAlignEncoder,
kNumAlignBits, i, p->ProbPrices);
p->alignPriceCount = 0;
} | FillAlignPrices | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
void FillDistancesPrices(CLzmaEnc *p) {
uint32_t i;
uint32_t lenToPosState;
uint32_t posSlot_0;
uint32_t posSlot_0a;
uint32_t i_0;
uint32_t posSlot;
uint32_t *posSlotPrices;
uint32_t *distancesPrices;
uint32_t tempPrices[130];
unsigned long v10;
v10 = __readfsqword(0x28u);
for (i = 4; i <= 0x7F... | static void FillDistancesPrices(CLzmaEnc *p) {
uint32_t tempPrices[kNumFullDistances];
uint32_t i, lenToPosState;
for (i = kStartPosModelIndex; i < kNumFullDistances; i++) {
uint32_t posSlot = GetPosSlot1(i);
uint32_t footerBits = ((posSlot >> 1) - 1);
uint32_t base = ((2 | (posSlot & 1)) << footerBit... | FillDistancesPrices | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
int Flush(CLzmaEnc *p, uint32_t nowPos) {
p->finished = 1;
LZe_full_flush(p, nowPos & p->pbMask);
return CheckErrors(p);
} | static int Flush(CLzmaEnc *p, uint32_t nowPos) {
p->finished = true;
LZe_full_flush(p, nowPos & p->pbMask);
return CheckErrors(p);
} | Flush | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
uint32_t *GetMatchesSpec1(uint32_t lenLimit, uint32_t curMatch, uint32_t pos,
const uint8_t *cur, CLzRef *son,
uint32_t _cyclicBufferPos, uint32_t _cyclicBufferSize,
uint32_t cutValue, uint32_t *distances,
uint32_t m... | static uint32_t *GetMatchesSpec1(uint32_t lenLimit, uint32_t curMatch,
uint32_t pos, const uint8_t *cur, CLzRef *son,
uint32_t _cyclicBufferPos,
uint32_t _cyclicBufferSize, uint32_t cutValue,
... | GetMatchesSpec1 | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
uint32_t GetOptimum(CLzmaEnc *p, uint32_t position, uint32_t *backRes) {
uint32_t v4;
uint32_t PriceMatched;
uint32_t RepLen1Price;
uint32_t v7;
uint32_t v8;
uint32_t PureRepPrice;
bool v10;
uint32_t v11;
uint32_t v12;
uint32_t v13;
long v14;
uint8_t *PointerToCurrentPos;
uint32_t v16;
uint3... | static uint32_t GetOptimum(CLzmaEnc *p, uint32_t position, uint32_t *backRes) {
uint32_t numAvail, mainLen, numPairs, repMaxIndex, i, posState, lenEnd, len,
cur;
uint32_t matchPrice, repMatchPrice, normalMatchPrice;
uint32_t reps[LZMA_NUM_REPS], repLens[LZMA_NUM_REPS];
uint32_t *matches;
const uint8_t *... | GetOptimum | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
uint32_t GetOptimumFast(CLzmaEnc *p, uint32_t *backRes) {
uint32_t numPairs;
uint32_t numAvail;
uint32_t mainLen;
uint32_t mainDist;
uint32_t repIndex;
uint32_t repLen;
uint32_t i;
uint32_t len;
uint32_t len_0;
uint32_t newDistance;
uint32_t limit;
const uint8_t *data;
const uint32_t *matches;... | static uint32_t GetOptimumFast(CLzmaEnc *p, uint32_t *backRes) {
uint32_t numAvail, mainLen, mainDist, numPairs, repIndex, repLen, i;
const uint8_t *data;
const uint32_t *matches;
if (p->additionalOffset == 0)
mainLen = ReadMatchDistances(p, &numPairs);
else {
mainLen = p->longestMatchLength;
num... | GetOptimumFast | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
uint32_t GetPureRepPrice(CLzmaEnc *p, uint32_t repIndex, State state,
uint32_t posState) {
long v4;
uint32_t pricea;
if (!repIndex)
return p->ProbPrices[(p->isRep0Long[state][posState] >> 4) ^ 0x7F] +
p->ProbPrices[p->isRepG0[state] >> 4];
pricea = p->ProbPrices[(p->isRe... | static uint32_t GetPureRepPrice(CLzmaEnc *p, uint32_t repIndex, State state,
uint32_t posState) {
uint32_t price;
if (repIndex == 0) {
price = GET_PRICE_0(p->isRepG0[state]);
price += GET_PRICE_1(p->isRep0Long[state][posState]);
} else {
price = GET_PRICE_1(p->isRepG0[s... | GetPureRepPrice | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
uint32_t GetRepLen1Price(CLzmaEnc *p, State state, uint32_t posState) {
return p->ProbPrices[p->isRepG0[state] >> 4] +
p->ProbPrices[p->isRep0Long[state][posState] >> 4];
} | static uint32_t GetRepLen1Price(CLzmaEnc *p, State state, uint32_t posState) {
return GET_PRICE_0(p->isRepG0[state]) +
GET_PRICE_0(p->isRep0Long[state][posState]);
} | GetRepLen1Price | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
uint32_t GetRepPrice(CLzmaEnc *p, uint32_t repIndex, uint32_t len, State state,
uint32_t posState) {
int v5;
v5 = p->repLenEnc.p.high[272 * posState + 254 + len];
return v5 + GetPureRepPrice(p, repIndex, state, posState);
} | static uint32_t GetRepPrice(CLzmaEnc *p, uint32_t repIndex, uint32_t len,
State state, uint32_t posState) {
return p->repLenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN] +
GetPureRepPrice(p, repIndex, state, posState);
} | GetRepPrice | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
uint32_t Hc4_MatchFinder_GetMatches(CMatchFinder *p, uint32_t *distances) {
CLzRef *v3;
CLzRef *v4;
uint32_t delta2;
uint32_t maxLen;
uint32_t offset;
uint32_t offseta;
uint32_t lenLimit;
uint32_t temp;
uint32_t hash3Value;
uint32_t hashValue;
uint32_t delta3;
CLzRef curMatch;
uint8_t *cur;
... | static uint32_t Hc4_MatchFinder_GetMatches(CMatchFinder *p,
uint32_t *distances) {
uint32_t hash2Value, hash3Value, delta2, delta3, maxLen, offset;
GET_MATCHES_HEADER(4)
HASH4_CALC;
delta2 = p->pos - p->hash[hash2Value];
delta3 = p->pos - p->hash[kFix3HashSize + ha... | Hc4_MatchFinder_GetMatches | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
void Hc4_MatchFinder_Skip(CMatchFinder *p, uint32_t num) {
CLzRef *v2;
CLzRef *v3;
uint32_t temp;
uint32_t hash3Value;
uint32_t hashValue;
uint32_t curMatch;
uint8_t *cur;
do {
if (p->lenLimit > 3) {
cur = p->buffer;
temp = crc32[*cur] ^ cur[1];
hash3Value = (unsigned short)(temp ... | static void Hc4_MatchFinder_Skip(CMatchFinder *p, uint32_t num) {
do {
uint32_t hash2Value, hash3Value;
SKIP_HEADER(4)
HASH4_CALC;
curMatch = p->hash[kFix4HashSize + hashValue];
p->hash[hash2Value] = p->hash[kFix3HashSize + hash3Value] =
p->hash[kFix4HashSize + hashValue] = p->pos;
p->... | Hc4_MatchFinder_Skip | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
uint32_t *Hc_GetMatchesSpec(uint32_t lenLimit, uint32_t curMatch, uint32_t pos,
const uint8_t *cur, CLzRef *son,
uint32_t _cyclicBufferPos,
uint32_t _cyclicBufferSize, uint32_t cutValue,
uint32_t *distances, ... | static uint32_t *Hc_GetMatchesSpec(uint32_t lenLimit, uint32_t curMatch,
uint32_t pos, const uint8_t *cur,
CLzRef *son, uint32_t _cyclicBufferPos,
uint32_t _cyclicBufferSize,
uint3... | Hc_GetMatchesSpec | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
void LZe_full_flush(CLzmaEnc *p, uint32_t posState) {
double v2;
double v3;
double v4;
double v5;
double v6;
double v7;
double v8;
double v9;
double v10;
double v11;
uint64_t in_size;
unsigned long out_size;
uint8_t trailer[24];
unsigned long v16;
v16 = __readfsqword(0x28u);
RangeEnc_En... | static void LZe_full_flush(CLzmaEnc *p, uint32_t posState) {
const uint32_t len = LZMA_MATCH_LEN_MIN;
Lzip_trailer trailer;
RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1);
RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0);
p->state = kMatchNextStates[p->state];
LenEnc_Encode2(&p->lenEnc, &p... | LZe_full_flush | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, uint32_t symbol,
uint32_t posState) {
if (symbol > 7) {
RangeEnc_EncodeBit(rc, &p->choice, 1u);
if (symbol > 0xF) {
RangeEnc_EncodeBit(rc, &p->choice2, 1u);
RcTree_Encode(rc, p->high, 8, symbol - 16);
} else {
RangeEnc_Enco... | static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, uint32_t symbol,
uint32_t posState) {
if (symbol < kLenNumLowSymbols) {
RangeEnc_EncodeBit(rc, &p->choice, 0);
RcTree_Encode(rc, p->low + (posState << kLenNumLowBits), kLenNumLowBits,
symbol);
} else {
Range... | LenEnc_Encode | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
void LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, uint32_t symbol,
uint32_t posState, bool updatePrice, uint32_t *ProbPrices) {
LenEnc_Encode(&p->p, rc, symbol, posState);
if (updatePrice && !--p->counters[posState])
LenPriceEnc_UpdateTable(p, posState, ProbPrices);
} | static void LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, uint32_t symbol,
uint32_t posState, bool updatePrice,
uint32_t *ProbPrices) {
LenEnc_Encode(&p->p, rc, symbol, posState);
if (updatePrice)
if (--p->counters[posState] == 0)
LenPriceEnc_UpdateTa... | LenEnc_Encode2 | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
void LenEnc_Init(CLenEnc *p) {
unsigned int i;
unsigned int ia;
unsigned int ib;
p->choice2 = 1024;
p->choice = p->choice2;
for (i = 0; i <= 0x7F; ++i)
p->low[i] = 1024;
for (ia = 0; ia <= 0x7F; ++ia)
p->mid[ia] = 1024;
for (ib = 0; ib <= 0xFF; ++ib)
p->high[ib] = 1024;
} | static void LenEnc_Init(CLenEnc *p) {
unsigned i;
p->choice = p->choice2 = kProbInitValue;
for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << kLenNumLowBits); i++)
p->low[i] = kProbInitValue;
for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << kLenNumMidBits); i++)
p->mid[i] = kProbInitValue;
for (i = 0; i < kLenNumHi... | LenEnc_Init | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
void LenEnc_SetPrices(CLenEnc *p, uint32_t posState, uint32_t numSymbols,
uint32_t *prices, uint32_t *ProbPrices) {
uint32_t i;
uint32_t a0;
uint32_t a1;
uint32_t b0;
uint32_t b1;
a0 = ProbPrices[p->choice >> 4];
a1 = ProbPrices[(p->choice >> 4) ^ 0x7F];
b0 = ProbPrices[p->choice2... | static void LenEnc_SetPrices(CLenEnc *p, uint32_t posState, uint32_t numSymbols,
uint32_t *prices, uint32_t *ProbPrices) {
uint32_t a0 = GET_PRICE_0a(p->choice);
uint32_t a1 = GET_PRICE_1a(p->choice);
uint32_t b0 = a1 + GET_PRICE_0a(p->choice2);
uint32_t b1 = a1 + GET_PRICE_1a(p->ch... | LenEnc_SetPrices | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
void LenPriceEnc_UpdateTable(CLenPriceEnc *p, uint32_t posState,
uint32_t *ProbPrices) {
LenEnc_SetPrices(&p->p, posState, p->tableSize, p->prices[posState],
ProbPrices);
p->counters[posState] = p->tableSize;
} | static void LenPriceEnc_UpdateTable(CLenPriceEnc *p, uint32_t posState,
uint32_t *ProbPrices) {
LenEnc_SetPrices(&p->p, posState, p->tableSize, p->prices[posState],
ProbPrices);
p->counters[posState] = p->tableSize;
} | LenPriceEnc_UpdateTable | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
void LenPriceEnc_UpdateTables(CLenPriceEnc *p, uint32_t numPosStates,
uint32_t *ProbPrices) {
uint32_t posState;
for (posState = 0; posState < numPosStates; ++posState)
LenPriceEnc_UpdateTable(p, posState, ProbPrices);
} | static void LenPriceEnc_UpdateTables(CLenPriceEnc *p, uint32_t numPosStates,
uint32_t *ProbPrices) {
uint32_t posState;
for (posState = 0; posState < numPosStates; posState++)
LenPriceEnc_UpdateTable(p, posState, ProbPrices);
} | LenPriceEnc_UpdateTables | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
void LitEnc_Encode(CRangeEnc *p, int *probs, uint32_t symbol) {
uint32_t symbola;
symbola = symbol | 0x100;
do {
RangeEnc_EncodeBit(p, &probs[symbola >> 8], (symbola >> 7) & 1);
symbola *= 2;
} while (symbola <= 0xFFFF);
} | static void LitEnc_Encode(CRangeEnc *p, int *probs, uint32_t symbol) {
symbol |= 0x100;
do {
RangeEnc_EncodeBit(p, probs + (symbol >> 8), (symbol >> 7) & 1);
symbol <<= 1;
} while (symbol < 0x10000);
} | LitEnc_Encode | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
void LitEnc_EncodeMatched(CRangeEnc *p, int *probs, uint32_t symbol,
uint32_t matchByte) {
uint32_t symbola;
uint32_t offs;
offs = 256;
symbola = symbol | 0x100;
do {
matchByte *= 2;
RangeEnc_EncodeBit(p, &probs[offs + (offs & matchByte) + (symbola >> 8)],
... | static void LitEnc_EncodeMatched(CRangeEnc *p, int *probs, uint32_t symbol,
uint32_t matchByte) {
uint32_t offs = 0x100;
symbol |= 0x100;
do {
matchByte <<= 1;
RangeEnc_EncodeBit(p, probs + (offs + (matchByte & offs) + (symbol >> 8)),
(symbol >> 7) &... | LitEnc_EncodeMatched | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
uint32_t LitEnc_GetPrice(const int *probs, uint32_t symbol,
uint32_t *ProbPrices) {
uint32_t symbola;
uint32_t price;
price = 0;
symbola = symbol | 0x100;
do {
price +=
ProbPrices[(int)(probs[symbola >> 8] ^ -((symbola >> 7) & 1) & 0x7FF) >>
4];
sym... | static uint32_t LitEnc_GetPrice(const int *probs, uint32_t symbol,
uint32_t *ProbPrices) {
uint32_t price = 0;
symbol |= 0x100;
do {
price += GET_PRICEa(probs[symbol >> 8], (symbol >> 7) & 1);
symbol <<= 1;
} while (symbol < 0x10000);
return price;
} | LitEnc_GetPrice | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
uint32_t LitEnc_GetPriceMatched(const int *probs, uint32_t symbol,
uint32_t matchByte, uint32_t *ProbPrices) {
uint32_t symbola;
uint32_t price;
uint32_t offs;
price = 0;
offs = 256;
symbola = symbol | 0x100;
do {
matchByte *= 2;
price +=
ProbPrices[(int)(p... | static uint32_t LitEnc_GetPriceMatched(const int *probs, uint32_t symbol,
uint32_t matchByte,
uint32_t *ProbPrices) {
uint32_t price = 0;
uint32_t offs = 0x100;
symbol |= 0x100;
do {
matchByte <<= 1;
price += GET_PRICEa(probs[... | LitEnc_GetPriceMatched | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
bool LzmaDec_DecodeReal(CLzmaDec *p, uint32_t limit, const uint8_t *bufLimit) {
const uint8_t *v3;
long v4;
int v5;
const uint8_t *v6;
uint32_t v7;
int v8;
const uint8_t *v9;
unsigned int v10;
const uint8_t *v11;
const uint8_t *v13;
const uint8_t *v14;
uint32_t v15;
int v16;
const uint8_t *v... | StopCompilingDueBUG
#endif
static bool LzmaDec_DecodeReal(CLzmaDec *p, uint32_t limit,
const uint8_t *bufLimit) {
int *probs = p->probs;
State state = p->state;
uint32_t rep0 = p->reps[0], rep1 = p->reps[1], rep2 = p->reps[2],
rep3 = p->reps[3];
unsigned pbMas... | LzmaDec_DecodeReal | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
int LzmaDec_DecodeReal2(CLzmaDec *p, uint32_t limit, const uint8_t *bufLimit) {
uint32_t limit2;
uint32_t dicBufSize;
uint32_t rem;
dicBufSize = p->dicBufSize;
do {
limit2 = limit;
if (!p->checkDicSize) {
rem = dicBufSize - p->processedPos;
if (rem < limit - p->dicPos)
limit2 = p-... | static int LzmaDec_DecodeReal2(CLzmaDec *p, uint32_t limit,
const uint8_t *bufLimit) {
const uint32_t dicBufSize = p->dicBufSize;
do {
uint32_t limit2 = limit;
if (p->checkDicSize == 0) {
uint32_t rem = dicBufSize - p->processedPos;
if (limit - p->dicPos > rem)
... | LzmaDec_DecodeReal2 | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
bool LzmaDec_DecodeToBuf(CLzmaDec *p, uint8_t *dest, uint32_t *destLen,
const uint8_t *src, uint32_t *srcLen,
ELzmaFinishMode finishMode, ELzmaStatus *status) {
bool res;
uint32_t inSizeCur;
uint32_t outSize;
uint32_t inSize;
uint32_t outSizeCur;
ELzmaFinish... | bool LzmaDec_DecodeToBuf(CLzmaDec *p, uint8_t *dest, uint32_t *destLen,
const uint8_t *src, uint32_t *srcLen,
ELzmaFinishMode finishMode, ELzmaStatus *status) {
uint32_t outSize = *destLen;
uint32_t inSize = *srcLen;
*srcLen = *destLen = 0;
for (;;) {
uint32... | LzmaDec_DecodeToBuf | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
bool LzmaDec_DecodeToDic(CLzmaDec *p, uint32_t dicLimit, const uint8_t *src,
uint32_t *srcLen, ELzmaFinishMode finishMode,
ELzmaStatus *status) {
uint8_t *v6;
unsigned int tempBufSize;
unsigned int v9;
unsigned int v10;
uint32_t inSize;
int checkEndMarkNow;
... | static bool LzmaDec_DecodeToDic(CLzmaDec *p, uint32_t dicLimit,
const uint8_t *src, uint32_t *srcLen,
ELzmaFinishMode finishMode,
ELzmaStatus *status) {
uint32_t inSize = *srcLen;
(*srcLen) = 0;
LzmaDec_WriteRem(p, dic... | LzmaDec_DecodeToDic | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
void LzmaDec_Free(CLzmaDec *p) {
free(p->dic);
free(p->probs);
} | void LzmaDec_Free(CLzmaDec *p) {
free(p->dic);
free(p->probs);
} | LzmaDec_Free | pdlzip-1.12 | app-arch | O0/app-arch/pdlzip-1.12/pdlzip | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.