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 |
|---|---|---|---|---|---|---|---|
saidx_t divbwt(sauchar_t *T, saidx_t *SA, saidx_t *bucket, saidx_t n) {
saidx_t pidx;
saidx_t i;
if (n <= 0)
__assert_fail("n > 0", "divbwt.c", 0x6AFu, "divbwt");
if (n == 1) {
*SA = *T;
return 0;
} else {
T[n] = *T;
if (sort_typeBstar(T, SA, bucket, n) > 0)
return construct_BWT(T, ... | saidx_t divbwt(sauchar_t *T, saidx_t *SA, saidx_t *bucket, saidx_t n) {
saidx_t m, pidx, i;
assert(n > 0);
if (n == 1) {
SA[0] = T[0];
return 0;
}
T[n] = T[0];
m = sort_typeBstar(T, SA, bucket, n);
if (0 < m) {
pidx = construct_BWT(T, SA, bucket, n);
} else {
pidx = 0;
for (i = 0;... | divbwt | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void do_collect() {
uint64_t size;
uint64_t v1;
size_t v2;
unsigned int v3;
unsigned int v4;
in_blk *iblk;
work_blk *wblk;
--*((_DWORD *)&coll_q + 2);
down_heap(coll_q, *((unsigned int *)&coll_q + 2));
iblk = (in_blk *)*((_QWORD *)coll_q + *((unsigned int *)&coll_q + 2));
--work_units;
sched_un... | static void do_collect(void) {
struct in_blk *iblk;
struct work_blk *wblk;
iblk = dequeue(coll_q);
--work_units;
sched_unlock();
wblk = XMALLOC(struct work_blk);
wblk->pos = iblk->pos;
wblk->next = iblk->pos;
wblk->enc = xmalloc(encoder_alloc_size(bs100k * 100000u));
encoder_init(wblk->enc, bs10... | do_collect | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void do_collect_seq() {
uint64_t size;
uint64_t v1;
size_t v2;
unsigned int v3;
unsigned int v4;
char done;
in_blk *iblk;
work_blk *wblk;
done = 1;
wblk = unfinished_work;
unfinished_work = 0;
if (!wblk)
--work_units;
iblk = 0;
if (*((_DWORD *)&coll_q + 2)) {
--*((_DWORD *)&coll_q +... | static void do_collect_seq(void) {
struct in_blk *iblk;
struct work_blk *wblk;
bool done = true;
wblk = unfinished_work;
unfinished_work = NULL;
if (wblk == NULL)
--work_units;
iblk = NULL;
if (!empty(coll_q))
iblk = dequeue(coll_q);
collect_token = false;
sched_unlock();
if (wblk == N... | do_collect_seq | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void do_emit() {
uint64_t minor;
unsigned int v1;
unsigned int v2;
int rv;
emit_blk *eb;
out_blk *oblk;
--out_slots;
--*((_DWORD *)&emit_q + 2);
down_heap(emit_q, *((unsigned int *)&emit_q + 2));
eb = (emit_blk *)*((_QWORD *)emit_q + *((unsigned int *)&emit_q + 2));
sched_unlock();
oblk = (out_... | static void do_emit(void) {
struct emit_blk *eb;
struct out_blk *oblk;
int rv;
out_slots--;
eb = dequeue(emit_q);
check_invariants();
sched_unlock();
oblk = xmalloc(sizeof(struct out_blk) + out_granul);
oblk->size = out_granul;
oblk->blk_sz = eb->ds->block_size;
rv = eb->status;
if (rv == OK)
... | do_emit | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
uint32_t do_mtf(int32_t *bwt, uint32_t *mtffreq, uint8_t *cmap, int32_t nblock,
int32_t EOB) {
int32_t *v5;
int32_t *v6;
int32_t *v7;
int32_t *v8;
int32_t *bwta;
uint8_t u;
uint8_t c;
int32_t i;
int32_t ia;
int32_t ib;
int32_t k;
int32_t ka;
int32_t kb;
int32_t t;
int32_t t... | static uint32_t do_mtf(int32_t *bwt, uint32_t *mtffreq, uint8_t *cmap,
int32_t nblock, int32_t EOB) {
uint8_t order[255];
int32_t i;
int32_t k;
int32_t t;
uint8_t c;
uint8_t u;
uint16_t *mtfv = (void *)bwt;
const uint16_t *mtfv0 = mtfv;
for (i = 0; i <= EOB; i++)
mtffreq[i]... | do_mtf | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void do_parse() {
const char *v0;
unsigned int v1;
const char *v2;
long v3;
char *v4;
uint64_t minor;
size_t v6;
decoder_state *v7;
retr_blk *v8;
uint64_t v9;
long v10;
long v11;
retr_blk *v12;
uint64_t v13;
bitstream v14;
unsigned int garbage;
int rv;
unord_blk *ublk_0;
unord_blk ... | static void do_parse(void) {
int rv;
struct head_blk head_blk;
struct bitstream true_bitstream;
unsigned garbage;
Trace(("Parser running at {%lu}",
32ul + 32ul * parser_bs.offset - parser_bs.live));
parse_token = 0;
--work_units;
true_bitstream = attach(parser_bs);
rv = parse(&par, &head_bl... | do_parse | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void do_retrieve() {
retr_blk *v0;
uint64_t buff;
const uint32_t *data;
long v3;
unord_blk *unord_link;
retr_blk *v5;
uint64_t minor;
long v7;
long v8;
unsigned int v9;
unord_blk *v10;
retr_blk *v11;
uint64_t v12;
long v13;
long v14;
emit_blk *v15;
uint64_t v16;
unsigned int v17;
b... | static void do_retrieve(void) {
struct retr_blk *rb;
struct emit_blk *eb;
struct bitstream true_bitstream;
int rv;
assert(!parsing_done);
rb = dequeue(retr_q);
true_bitstream = attach(rb->curr_pos);
rv = retrieve(rb->ds, &true_bitstream);
rb->curr_pos = detach(true_bitstream);
if (parsing_done) {... | do_retrieve | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void do_scan() {
detached_bitstream *v0;
uint64_t buff;
const uint32_t *data;
long v3;
unord_blk *v4;
uint64_t minor;
unord_blk *v6;
detached_bitstream *v7;
uint64_t v8;
long v9;
long v10;
size_t v11;
decoder_state *v12;
retr_blk *v13;
detached_bitstream *v14;
uint64_t v15;
long v16;
... | static void do_scan(void) {
struct detached_bitstream *bs;
int scan_result;
unsigned skip;
struct bitstream true_bitstream;
assert(!parsing_done);
work_units--;
bs = dequeue(scan_q);
skip = 0u;
assert(bs->pos.major >= parser_bs.pos.major);
if (bs->pos.major == parser_bs.pos.major &&
bs->pos.... | do_scan | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void do_transmit() {
unsigned int v0;
work_blk *wblk;
--*((_DWORD *)&trans_q + 2);
down_heap(trans_q, *((unsigned int *)&trans_q + 2));
wblk = (work_blk *)*((_QWORD *)trans_q + *((unsigned int *)&trans_q + 2));
--out_slots;
sched_unlock();
wblk->buffer = xnmalloc((wblk->size + 3) >> 2, 4u);
transmit(... | static void do_transmit(void) {
struct work_blk *wblk;
wblk = dequeue(trans_q);
--out_slots;
sched_unlock();
wblk->buffer = XNMALLOC((wblk->size + 3) / 4, uint32_t);
transmit(wblk->enc, wblk->buffer);
free(wblk->enc);
sched_lock();
++work_units;
enqueue(reord_q, wblk);
} | do_transmit | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void down_heap(void *vroot, unsigned int size) {
unsigned int j;
unsigned int child;
position *el;
if (size) {
el = (position *)*((_QWORD *)vroot + size);
*((_QWORD *)vroot + size) = *(_QWORD *)vroot;
for (j = 0; size > 2 * j + 1; j = child) {
child = 2 * j + 1;
if (size > 2 * j + 2 &&
... | void down_heap(void *vroot, unsigned size) {
struct position **root = vroot;
struct position *el;
unsigned j;
if (size == 0)
return;
el = root[size];
root[size] = root[0];
j = 0;
while (left(j) < size) {
unsigned child = left(j);
if (child + 1 < size && pos_lt(*root[child + 1], *root[chi... | down_heap | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
timespec dtotimespec(double sec) {
long s;
long nsa;
long ns;
if (sec <= -9.223372036854776e18)
return make_timespec(0x8000000000000000LL, 0);
if (sec >= 9.223372036854776e18)
return make_timespec(0x7FFFFFFFFFFFFFFFLL, 999999999);
nsa = (1000000000.0 * (sec - (double)(int)sec) >
(double)(i... | struct timespec dtotimespec(double sec) {
if (!(TYPE_MINIMUM(time_t) < sec))
return make_timespec(TYPE_MINIMUM(time_t), 0);
else if (!(sec < 1.0 + TYPE_MAXIMUM(time_t)))
return make_timespec(TYPE_MAXIMUM(time_t), TIMESPEC_HZ - 1);
else {
time_t s = sec;
double frac = TIMESPEC_HZ * (sec - s);
l... | dtotimespec | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
int emit(decoder_state *ds_0, void *buf, size_t *buf_sz) {
uint8_t *v5;
uint8_t *v8;
uint8_t *v11;
uint8_t *v13;
uint8_t *v17;
uint8_t *v20;
uint8_t *v23;
uint8_t *v26;
uint8_t *v29;
uint8_t *v32;
uint8_t *v35;
uint8_t *v37;
uint8_t *v39;
uint8_t *v43;
uint8_t c;
uint8_t d;
uint32_t p;... | int emit(struct decoder_state *ds, void *buf, size_t *buf_sz) {
uint32_t p;
uint32_t a;
uint32_t s;
uint8_t c;
uint8_t d;
const uint32_t *t;
uint8_t *b;
uint32_t m;
assert(ds);
assert(buf);
assert(buf_sz && *buf_sz > 0);
t = ds->tt;
b = buf;
m = *buf_sz;
s = ds->rle_crc;
p = ds->rle_i... | emit | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
size_t encode(encoder_state *s, uint32_t *crc) {
int rle_state;
uint32_t nblock;
uint8_t *v5;
uint8_t *v6;
uint8_t jb;
uint8_t jc;
uint8_t j;
uint8_t ja;
uint8_t c;
uint32_t cost;
uint32_t costa;
uint32_t costb;
uint32_t costc;
uint32_t pk;
uint32_t i;
uint32_t p;
uint32_t EOB;
uint3... | size_t encode(struct encoder_state *s, uint32_t *crc) {
uint32_t cost;
uint32_t pk;
uint32_t i;
const uint8_t *sp;
uint8_t *smp;
uint8_t c;
uint8_t j;
uint32_t p;
uint32_t EOB;
uint8_t cmap[256];
uint8_t *block = (void *)(s->SA + s->max_block_size + GROUP_SIZE);
if (s->rle_state >= 4) {
ass... | encode | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
size_t encoder_alloc_size(unsigned long max_block_size) {
return 4 * (max_block_size + 65916) + max_block_size + 1;
} | size_t encoder_alloc_size(unsigned long max_block_size) {
return (sizeof(struct encoder_state) +
(max_block_size + GROUP_SIZE) * sizeof(uint32_t) + max_block_size +
1);
} | encoder_alloc_size | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void encoder_init(encoder_state *s, unsigned long max_block_size,
unsigned int cluster_factor) {
if (!s)
__assert_fail("s != 0", "encode.c", 0x79u, "encoder_init");
if (!max_block_size || max_block_size > 0xDBBA0)
__assert_fail("max_block_size > 0 && max_block_size <= MAX_BLOCK_SIZE",
... | void encoder_init(struct encoder_state *s, unsigned long max_block_size,
unsigned cluster_factor) {
assert(s != 0);
assert(max_block_size > 0 && max_block_size <= MAX_BLOCK_SIZE);
assert(cluster_factor > 0 && cluster_factor <= 65535);
s->max_block_size = max_block_size;
s->cluster_factor = ... | encoder_init | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
const char *err2str(int err) {
if (err <= 2 || err > 19)
__assert_fail("err >= ERR_MAGIC && err <= ERR_EOF", "expand.c", 0x5Bu,
"err2str");
return table_12[err - 3];
} | static const char *err2str(int err) {
static const char *table[] = {
"bad stream header magic", "bad block header magic",
"empty source alphabet", "bad number of trees",
"no coding groups", "invalid selector",
"invalid delta code", "invalid prefix code",
"incomplete prefix ... | err2str | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
int fdutimens(int fd, const char *file, const timespec *timespec) {
timespec *v3;
__syscall_slong_t tv_nsec;
__syscall_slong_t v5;
bool v7;
__suseconds_t tv_usec;
__suseconds_t v10;
short abig;
int adjustment_needed;
int result;
int resulta;
timespec *ts;
timeval *t;
timeval *tt;
time_t adif... | int fdutimens(int fd, char const *file, struct timespec const timespec[2]) {
struct timespec adjusted_timespec[2];
struct timespec *ts = timespec ? adjusted_timespec : NULL;
int adjustment_needed = 0;
struct stat st;
if (ts) {
adjusted_timespec[0] = timespec[0];
adjusted_timespec[1] = timespec[1];
... | fdutimens | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
int find_best_tree(const uint16_t *gs_0, unsigned int nt,
const uint64_t *len_pack) {
unsigned int bc;
unsigned int t;
unsigned int bt;
unsigned int i;
uint64_t cp;
cp = 0;
for (i = 0; i <= 0x31; ++i)
cp += len_pack[gs_0[i]];
bc = cp & 0x3FF;
bt = 0;
for (t = 1; t < nt; ++t) ... | static int find_best_tree(const uint16_t *gs, unsigned nt,
const uint64_t *len_pack) {
unsigned c, bc;
unsigned t, bt;
uint64_t cp;
unsigned i;
cp = 0;
for (i = 0; i < GROUP_SIZE; i++)
cp += len_pack[gs[i]];
bc = cp & 0x3ff;
bt = 0;
for (t = 1; t < nt; t++) {
cp >>... | find_best_tree | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void generate_initial_trees(encoder_state *s, unsigned int nm,
unsigned int nt) {
unsigned int v3;
unsigned int ntb;
unsigned int nma;
unsigned int a;
unsigned int aa;
unsigned int b;
unsigned int freqa;
unsigned int freq;
unsigned int cum;
unsigned int cuma;
unsigned i... | static void generate_initial_trees(struct encoder_state *s, unsigned nm,
unsigned nt) {
unsigned a, b;
unsigned freq;
unsigned cum;
unsigned as;
unsigned t;
memset(s->u.s.length, 1, sizeof(s->u.s.length));
as = 0;
for (a = 0, cum = 0; cum < nm; a++) {
freq = s->... | generate_initial_trees | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
unsigned int generate_prefix_code(encoder_state *s) {
unsigned int v1;
encoder_state_$3817AF0F750837CD580D133894093024 *v2;
encoder_state_$3817AF0F750837CD580D133894093024 *v4;
unsigned int v5;
char v6;
uint32_t nt;
unsigned int nta;
uint32_t iter;
uint32_t i;
uint32_t ia;
uint32_t cost;
uint32_... | unsigned generate_prefix_code(struct encoder_state *s) {
uint32_t as;
uint32_t nt;
uint32_t iter, i;
uint32_t cost;
uint16_t *mtfv = (void *)s->SA;
uint32_t nm = s->nmtf;
as = mtfv[nm - 1] + 1;
s->u.s.num_selectors = (nm + GROUP_SIZE - 1) / GROUP_SIZE;
assert(nm >= 2);
nt = (nm > 2400 ? 6
... | generate_prefix_code | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
saidx_t getidx(saidx_t *pa) {
if (*pa >= 0)
return *pa;
else
return ~*pa;
} | static saidx_t getidx(saidx_t *pa) {
saidx_t a = *pa;
return (0 <= a) ? a : ~a;
} | getidx | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void gettime(timespec *ts) { clock_gettime(0, ts); } | void gettime(struct timespec *ts) {
#if defined CLOCK_REALTIME && HAVE_CLOCK_GETTIME
clock_gettime(CLOCK_REALTIME, ts);
#else
struct timeval tv;
gettimeofday(&tv, NULL);
ts->tv_sec = tv.tv_sec;
ts->tv_nsec = tv.tv_usec * 1000;
#endif
} | gettime | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void halt() {
int sig;
if (sigsuspend(&saved) != -1 || *__errno_location() != 4)
__assert_fail("-1 == ret && EINTR == errno", "signals.c", 0xEAu, "halt");
sig = handled_signals[caught_index];
if (!xmember(&handled, sig))
__assert_fail("xmember(&handled, sig)", "signals.c", 0xEDu, "halt");
if (sig == ... | void halt(void) {
int sig;
int ret;
ret = sigsuspend(&saved);
assert(-1 == ret && EINTR == errno);
sig = handled_signals[caught_index];
assert(xmember(&handled, sig));
switch (sig) {
default:
cleanup();
terminate(sig);
case SIGUSR1:
bailout();
case SIGUSR2:
break;
}
} | halt | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void init_io() {
request_close = 0;
finish = 0;
output_q = xmalloc(24LL * out_slots);
*((_DWORD *)&output_q + 2) = 0;
*(void **)((char *)&output_q + 12) = (void *)out_slots;
sink_thread = xcreate(sink_thread_proc);
source_thread = xcreate(source_thread_proc);
} | static void init_io(void) {
request_close = false;
finish = false;
deque_init(output_q, out_slots);
sink_thread = xcreate(sink_thread_proc);
source_thread = xcreate(source_thread_proc);
} | init_io | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
int input_init(const arg *operand, stat *sbuf) {
const char *val;
int *v4;
const char *v5;
int *v6;
const char *v7;
int *v8;
const char *v9;
int *v10;
int infd;
ispec.total = 0;
if (!operand) {
ispec.fd = 0;
ispec.sep = (const char *)&unk_21809;
ispec.fmt = "stdin";
ispec.size = 0... | static int input_init(const struct arg *operand, struct stat *sbuf) {
ispec.total = 0u;
if (0 == operand) {
ispec.fd = STDIN_FILENO;
ispec.sep = "";
ispec.fmt = "stdin";
ispec.size = 0u;
return 0;
}
if (!force) {
if (-1 == lstat(operand->val, sbuf)) {
warnx(errno, "skipping \"%s\... | input_init | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void input_oprnd_rm(const arg *operand) {
const char *val;
int *v2;
if (!operand)
__assert_fail("0 != operand", "main.c", 0x2FEu, "input_oprnd_rm");
if (unlink(operand->val) == -1 && *__errno_location() != 2) {
val = operand->val;
v2 = __errno_location();
warnx(*v2, "unlink(\"%s\")", val);
}
... | static void input_oprnd_rm(const struct arg *operand) {
assert(0 != operand);
if (-1 == unlink(operand->val) && ENOENT != errno) {
warnx(errno, "unlink(\"%s\")", operand->val);
}
} | input_oprnd_rm | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void input_uninit() {
const char *sep;
const char *fmt;
const char *v2;
int *v3;
if (close(ispec.fd) == -1) {
sep = ispec.sep;
fmt = ispec.fmt;
v2 = ispec.sep;
v3 = __errno_location();
failx(*v3, "close(%s%s%s)", v2, fmt, sep);
}
} | static void input_uninit(void) {
if (-1 == close(ispec.fd)) {
failx(errno, "close(%s%s%s)", ispec.sep, ispec.fmt, ispec.sep);
}
} | input_uninit | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void log_generic(const filespec *fs_0, int code, const char *fmt,
__va_list_tag *args, int nl) {
char *v5;
if (fprintf(stderr, "%s: ", pname) < 0 ||
fs_0 &&
fprintf(stderr, "%s%s%s: ", fs_0->sep, fs_0->fmt, fs_0->sep) < 0 ||
vfprintf(stderr, fmt, args) < 0 ||
code && (v... | static void log_generic(const struct filespec *fs, int code, const char *fmt,
va_list args, int nl) {
if (0 > fprintf(stderr, "%s: ", pname) ||
(fs && 0 > fprintf(stderr, "%s%s%s: ", fs->sep, fs->fmt, fs->sep)) ||
0 > vfprintf(stderr, fmt, args) ||
(0 != code && 0 > fprintf(s... | log_generic | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
int lutimens(const char *file, const timespec *timespec) {
timespec *v2;
__syscall_slong_t tv_nsec;
__syscall_slong_t v4;
int adjustment_needed;
int result;
timespec *ts;
timespec adjusted_timespec[2];
stat st;
unsigned long v11;
v11 = __readfsqword(0x28u);
if (timespec)
v2 = adjusted_timespe... | int lutimens(char const *file, struct timespec const timespec[2]) {
struct timespec adjusted_timespec[2];
struct timespec *ts = timespec ? adjusted_timespec : NULL;
int adjustment_needed = 0;
struct stat st;
if (ts) {
adjusted_timespec[0] = timespec[0];
adjusted_timespec[1] = timespec[1];
adjustm... | lutimens | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
const char *v3;
uintmax_t total;
double v5;
double v6;
double v7;
const char *v8;
const char *v9;
int *v10;
int v11;
arg *operands;
uintmax_t plain_size;
uintmax_t compr_size;
double ratio;
double savings;
double ratio_magnitude;
... | int main(int argc, char **argv) {
struct arg *operands;
static char stderr_buf[BUFSIZ];
pname = strrchr(argv[0], '/');
pname = pname ? pname + 1 : argv[0];
setbuf(stderr, stderr_buf);
setup_signals();
opts_setup(&operands, argc, argv);
small = 0;
do {
{
int ret;
struct stat instat;... | main | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void make_code_lengths(uint8_t *length, uint32_t *frequency, uint32_t as) {
unsigned long v3;
uint32_t i;
uint32_t ia;
uint32_t k;
uint32_t d;
uint32_t c;
uint32_t count[32];
uint32_t V[260];
uint64_t weight[259];
unsigned long v13;
v13 = __readfsqword(0x28u);
if (as <= 2)
__assert_fail("as... | static void make_code_lengths(uint8_t length[], uint32_t frequency[],
uint32_t as) {
uint32_t i;
uint32_t k;
uint32_t d;
uint32_t c;
uint64_t weight[MAX_ALPHA_SIZE];
uint32_t V[MAX_ALPHA_SIZE];
uint32_t count[MAX_HUFF_CODE_LENGTH + 2];
assert(as >= MIN_ALPHA_SIZE);
asser... | make_code_lengths | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
unsigned int make_map_e(uint8_t *cmap, const bool *inuse) {
unsigned int i;
unsigned int j;
int k;
j = 0;
for (i = 0; i <= 0xFF; ++i) {
k = inuse[i];
cmap[i] = j;
j += k;
}
return j;
} | static unsigned make_map_e(uint8_t *cmap, const bool *inuse) {
unsigned i, j;
j = 0;
for (i = 0; i < 256; i++) {
int k = inuse[i];
cmap[i] = j;
j += k;
}
return j;
} | make_map_e | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void make_tree(retriever_internal_state *rs) {
unsigned int *v1;
unsigned int v2;
unsigned int v3;
unsigned int *v4;
unsigned int v5;
unsigned int *v6;
unsigned int v7;
unsigned int *v8;
unsigned int v9;
unsigned int *v10;
unsigned int v11;
uint64_t v12;
uint16_t x;
unsigned int k;
unsigne... | static void make_tree(struct retriever_internal_state *rs) {
unsigned n;
const uint8_t *L;
uint32_t *C;
uint64_t *B;
uint16_t *P;
uint16_t *S;
unsigned k;
unsigned s;
unsigned cum;
unsigned code;
uint64_t sofar;
uint64_t next;
uint64_t inc;
uint64_t v;
n = rs->alpha_size;
L = rs->code_... | make_tree | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void merge_check(const sauchar_t *T, const saidx_t *PA, saidx_t *first,
saidx_t *last, saint_t check, saidx_t depth) {
const saidx_t *v6;
const saidx_t *v7;
const saidx_t *v8;
const saidx_t *v9;
char checka;
checka = check;
if ((check & 1) != 0 ||
(check & 2) != 0 && (v6 = &PA[*fir... | static void merge_check(const sauchar_t *T, const saidx_t *PA, saidx_t *first,
saidx_t *last, saint_t check, saidx_t depth) {
if ((check & 1) || ((check & 2) && (ss_compare(T, PA + getidx(first - 1),
PA + *first, depth) == 0))) {
*first = ~*... | merge_check | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
uint8_t mtf_one(uint8_t **imtf_row, uint8_t *imtf_slide, uint8_t c) {
uint8_t *v3;
uint8_t ca;
uint8_t *pp;
uint8_t *kk;
uint8_t **rr;
uint8_t *bb;
uint8_t **lno;
uint8_t *bg;
uint8_t *bb_0;
uint8_t **lno1;
if (c > 0xFu) {
if (imtf_slide == *imtf_row) {
kk = imtf_slide + 0x2000;
f... | static uint8_t mtf_one(uint8_t **imtf_row, uint8_t *imtf_slide, uint8_t c) {
uint8_t *pp;
if (likely(c < ROW_WIDTH)) {
unsigned nn = c;
pp = imtf_row[0];
c = pp[nn];
#if ROW_WIDTH == 16
switch (nn) {
default:
abort();
#define R(n) ... | mtf_one | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void opts_decompress(char ch_0) {
if (ch_0 != 100 && ch_0 != 122)
__assert_fail("'d' == ch || 'z' == ch", "main.c", 0x139u,
"opts_decompress");
decompress = ch_0 == 100;
if (outmode_0 == outmode_OM_DISCARD)
outmode_0 = outmode_OM_REGF;
} | static void opts_decompress(char ch) {
assert('d' == ch || 'z' == ch);
decompress = ('d' == ch);
if (OM_DISCARD == outmode) {
outmode = OM_REGF;
}
} | opts_decompress | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void opts_outmode(char ch_0) {
if (ch_0 != 99 && ch_0 != 116)
__assert_fail("'c' == ch || 't' == ch", "main.c", 0x128u, "opts_outmode");
if ((ch_0 == 99) == outmode_0)
fail("\"-c\" and \"-t\" are incompatible, specify \"-h\" for help");
if (ch_0 == 99) {
outmode_0 = outmode_OM_STDOUT;
} else {
o... | static void opts_outmode(char ch) {
assert('c' == ch || 't' == ch);
if (('c' == ch ? OM_DISCARD : OM_STDOUT) == outmode) {
fail("\"-c\" and \"-t\" are incompatible, specify \"-h\" for help");
}
if ('c' == ch) {
outmode = OM_STDOUT;
} else {
outmode = OM_DISCARD;
decompress = 1;
}
} | opts_outmode | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void opts_setup(arg **operands, size_t argc, char **argv) {
long v3;
int v4;
int args_state;
int cont;
unsigned int opt;
arg **link_at;
arg **link_ata;
size_t ofs;
size_t ofsa;
char *tok;
arg *i;
arg *j;
arg *next;
arg *nexta;
arg *nextb;
const char *argscan;
const char *argscana;
co... | static void opts_setup(struct arg **operands, size_t argc, char **argv) {
struct arg **link_at;
uintmax_t mx_worker;
*operands = 0;
link_at = operands;
{
size_t ofs;
for (ofs = 0u; ofs < sizeof ev_name / sizeof ev_name[0]; ++ofs) {
char *ev_val;
ev_val = getenv(ev_name[ofs]);
if (... | opts_setup | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
int output_init(const arg *operand, const stat *sbuf) {
char *v3;
int *v4;
char *v5;
const char *val;
int *v7;
char *tmp;
size_t len;
unsigned long v10;
v10 = __readfsqword(0x28u);
ospec.total = 0;
if (outmode_0 == outmode_OM_REGF) {
if (!operand)
__assert_fail("0 != operand", "main.c",... | static int output_init(const struct arg *operand, const struct stat *sbuf) {
ospec.total = 0u;
switch (outmode) {
case OM_STDOUT:
ospec.fd = STDOUT_FILENO;
ospec.sep = "";
ospec.fmt = "stdout";
return 0;
case OM_DISCARD:
ospec.fd = -1;
ospec.sep = "";
ospec.fmt = "the bit bucket";
... | output_init | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void output_regf_uninit(int outfd, const stat *sbuf) {
const char *v2;
int *v3;
const char *v4;
int *v5;
const char *v6;
int *v7;
const char *v8;
int *v9;
timespec ts[2];
unsigned long v11;
v11 = __readfsqword(0x28u);
if (!opathn)
__assert_fail("0 != opathn", "main.c", 0x365u, "output_regf_... | static void output_regf_uninit(int outfd, const struct stat *sbuf) {
assert(0 != opathn);
if (-1 == fchown(outfd, sbuf->st_uid, sbuf->st_gid)) {
warnx(errno, "fchown(\"%s\")", opathn);
} else {
if (sbuf->st_mode & (S_ISUID | S_ISGID | S_ISVTX)) {
warn("\"%s\": won't restore any of setuid, setgid, ... | output_regf_uninit | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void package_merge(uint16_t (*tree)[21], uint32_t *count,
const uint64_t *leaf_weight, uint_fast32_t as) {
uint64_t v4;
uint64_t v5;
uint_fast32_t v6;
uint64_t v7;
uint_fast32_t width;
uint_fast32_t next_depth;
uint_fast32_t depth;
uint_fast32_t deptha;
uint64_t pkg_weight[22];
ui... | static void
package_merge(uint16_t tree[MAX_CODE_LENGTH + 1][MAX_CODE_LENGTH + 1],
uint32_t *restrict count, const uint64_t *restrict leaf_weight,
uint_fast32_t as) {
uint64_t pkg_weight[MAX_CODE_LENGTH + 1];
uint64_t prev_weight[MAX_CODE_LENGTH + 1];
uint64_t curr_weight[MAX_CODE_LENG... | package_merge | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
int parse(parser_state *ps, header *hd, bitstream *bs, unsigned int *garbage) {
uint64_t buff;
char v6;
bool v7;
uint64_t v8;
uint32_t word;
if (ps->state == 48)
__assert_fail("ps->state != ACCEPT", "parse.c", 0x96u, "parse");
while (1) {
if (bs->live > 0xF) {
v6 = 1;
} else if (bs->dat... | int parse(struct parser_state *restrict ps, struct header *restrict hd,
struct bitstream *bs, unsigned *garbage) {
assert(ps->state != ACCEPT);
while (OK == bits_need(bs, 16)) {
unsigned word = bits_peek(bs, 16);
bits_dump(bs, 16);
switch (ps->state) {
case STREAM_MAGIC_1:
assert(... | parse | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void parser_init(parser_state *ps, int bs100k, int stream_mode) {
ps->state = 2;
ps->bs100k = bs100k;
ps->computed_crc = 0;
ps->stream_mode = stream_mode;
} | void parser_init(struct parser_state *ps, int bs100k, int stream_mode) {
ps->state = BLOCK_MAGIC_1;
ps->bs100k = bs100k;
ps->computed_crc = 0u;
ps->stream_mode = stream_mode;
} | parser_init | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void primary_thread() {
pthread_t *v0;
unsigned int i;
unsigned int ia;
thread_id = 0;
eof = 0;
in_slots = total_in_slots;
out_slots = total_out_slots;
work_units = num_worker;
process_0->init();
select_task();
init_io();
for (i = 1; i < (unsigned int)num_worker; ++i) {
v0 = &worker_thread[... | static void primary_thread(void) {
unsigned i;
thread_id = 0;
eof = false;
in_slots = total_in_slots;
out_slots = total_out_slots;
work_units = num_worker;
process->init();
select_task();
init_io();
for (i = 1u; i < num_worker; ++i)
worker_thread[i] = xcreate(worker_thread_proc);
worker_t... | primary_thread | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void promote() {
int *sig;
sigset_t pending;
unsigned long v2;
v2 = __readfsqword(0x28u);
xempty(&pending);
xpending(&pending);
for (sig = (int *)blocked_signals; sig < (int *)&unk_24F58; ++sig) {
if (xmember(&pending, *sig))
xraise(*sig);
}
} | static void promote(void) {
const int *sig;
sigset_t pending;
xempty(&pending);
xpending(&pending);
foreach (sig, blocked_signals)
if (xmember(&pending, *sig))
xraise(*sig);
} | promote | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
int retrieve(decoder_state *ds_0, bitstream *bs) {
unsigned int v3;
char v4;
unsigned int *v5;
unsigned int *v7;
unsigned int v8;
unsigned int v9;
unsigned int *v10;
unsigned int v11;
unsigned int w;
unsigned int wa;
unsigned int wb;
unsigned int wc;
unsigned int wd;
unsigned int i;
unsign... | int retrieve(struct decoder_state *restrict ds, struct bitstream *bs) {
struct retriever_internal_state *restrict rs = ds->internal_state;
DECLARE;
RESTORE();
switch (rs->state) {
case S_INIT:
NEED(S_BWT_IDX);
TAKE(ds->rand, 1u);
TAKE(ds->bwt_idx, 24u);
NEED(S_BITMAP_BIG);
TAKE(rs->big,... | retrieve | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
int scan(bitstream *bs, unsigned int skip) {
const uint32_t *v2;
uint64_t v3;
char v4;
uint64_t buff;
unsigned int skipb;
unsigned int skipa;
unsigned int state;
unsigned int bt_state;
uint32_t word;
unsigned int bit;
const uint32_t *data;
const uint32_t *limit;
state = 0;
if (skip > bs->li... | int scan(struct bitstream *bs, unsigned skip) {
unsigned state = 0;
const uint32_t *data, *limit;
if (skip > bs->live) {
skip -= bs->live;
bits_dump(bs, bs->live);
skip = (skip + 31u) / 32u;
if ((size_t)(bs->limit - bs->data) < skip)
bs->data = bs->limit;
else
bs->data += skip;
... | scan | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void sched_lock() {
if (pthread_mutex_lock(&sched_mutex))
abort();
} | void sched_lock(void) { xlock(&sched_mutex); } | sched_lock | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void sched_unlock() {
select_task();
if ((next_task || process_0->finished()) && pthread_cond_signal(&sched_cond))
abort();
if (pthread_mutex_unlock(&sched_mutex))
abort();
} | void sched_unlock(void) {
select_task();
if (next_task != NULL || process->finished())
xsignal(&sched_cond);
xunlock(&sched_mutex);
} | sched_unlock | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void schedule(const process *proc) {
pthread_t *v1;
process_0 = proc;
worker_thread = (pthread_t *)xnmalloc((unsigned int)num_worker, 8u);
v1 = worker_thread;
*v1 = xcreate(primary_thread);
halt();
if (pthread_join(*worker_thread, 0))
abort();
free(worker_thread);
} | static void schedule(const struct process *proc) {
process = proc;
worker_thread = XNMALLOC(num_worker, pthread_t);
*worker_thread = xcreate(primary_thread);
halt();
xjoin(*worker_thread);
free(worker_thread);
} | schedule | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void select_task() {
const task *task;
for (task = process_0->tasks; task->ready; ++task) {
if (task->ready()) {
next_task = task;
return;
}
}
next_task = 0;
} | static void select_task(void) {
const struct task *task;
for (task = process->tasks; task->ready != NULL; ++task) {
if (task->ready()) {
next_task = task;
return;
}
}
next_task = NULL;
} | select_task | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void set_memory_constraints() {
if (!decompress) {
total_in_slots = 2 * num_worker;
total_out_slots = 2 * (num_worker + 1);
in_granul = 100000 * bs100k;
out_granul = -1;
} else {
if (!small) {
total_in_slots = 4 * num_worker;
total_out_slots = 16 * num_worker;
in_granul = 0x400... | static void set_memory_constraints(void) {
if (!decompress) {
total_in_slots = 2u * num_worker;
total_out_slots = 2u * num_worker + 2;
in_granul = bs100k * 100000u;
out_granul = -1;
} else if (!small) {
total_in_slots = 4u * num_worker;
total_out_slots = 16u * num_worker;
in_granul = 256... | set_memory_constraints | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void setup_signals() {
int *sig;
int *siga;
pid = getpid();
main_thread = pthread_self();
xempty(&blocked);
for (sig = (int *)blocked_signals; sig < (int *)&unk_24F58; ++sig)
xadd(&blocked, *sig);
xempty(&handled);
for (siga = (int *)handled_signals; siga < (int *)"signals.c"; ++siga)
xadd(&han... | void setup_signals(void) {
const int *sig;
pid = getpid();
main_thread = pthread_self();
xempty(&blocked);
foreach (sig, blocked_signals)
xadd(&blocked, *sig);
xempty(&handled);
foreach (sig, handled_signals)
xadd(&handled, *sig);
xmask(SIG_BLOCK, &blocked, 0);
} | setup_signals | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void signal_handler(int caught) {
const int *sig;
for (sig = handled_signals;; ++sig) {
if (sig >= (const int *)"signals.c")
abort();
if (caught == *sig)
break;
}
caught_index = sig - handled_signals;
} | static void signal_handler(int caught) {
const int *sig;
foreach (sig, handled_signals) {
if (*sig == caught) {
caught_index = sig - handled_signals;
return;
}
}
abort();
} | signal_handler | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void sink_thread_proc() {
bool v0;
unsigned int v1;
long v2;
size_t v3;
uintmax_t size;
timespec v5;
double v6;
double size_low;
bool progress_enabled;
uintmax_t processed;
double elapsed;
double completed;
timespec start_time;
timespec next_time;
timespec update_interval;
timespec time_... | static void sink_thread_proc(void) {
bool progress_enabled;
uintmax_t processed;
struct timespec start_time;
struct timespec next_time;
struct timespec update_interval;
struct block block;
static const double UPDATE_INTERVAL = 0.1;
Trace((" sink: spawned"));
progress_enabled = (verbose && ispec... | sink_thread_proc | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void sink_write_buffer(void *buffer, size_t size, size_t weight) {
long v3;
void **v4;
if (pthread_mutex_lock(&sink_mutex))
abort();
if (*((_DWORD *)&output_q + 2) >= *((_DWORD *)&output_q + 3))
__assert_fail("(output_q).size < (output_q).modulus", "process.c", 0x152u,
"sink_write_buf... | void sink_write_buffer(void *buffer, size_t size, size_t weight) {
struct block block;
block.buffer = buffer;
block.size = size;
block.weight = weight;
xlock(&sink_mutex);
push(output_q, block);
xsignal(&sink_cond);
xunlock(&sink_mutex);
} | sink_write_buffer | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void sort_alphabet(uint64_t *first, uint64_t *last) {
uint64_t *a;
uint64_t *b;
uint64_t *b1;
uint64_t t;
for (a = first + 1; a < last; ++a) {
b1 = a;
t = *a;
for (b = a - 1; t > *b; --b) {
*b1 = *b;
b1 = b;
if (b == first)
break;
}
*b1 = t;
}
} | static void sort_alphabet(uint64_t *first, uint64_t *last) {
uint64_t t, *a, *b, *b1;
for (a = first + 1; a < last; ++a) {
t = *(b1 = a);
for (b = b1 - 1; *b < t; --b) {
*b1 = *b;
if ((b1 = b) == first)
break;
}
*b1 = t;
}
} | sort_alphabet | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
saidx_t sort_typeBstar(const sauchar_t *T, saidx_t *SA, saidx_t *bucket,
saidx_t n) {
saidx_t *v5;
saidx_t *v6;
saidx_t *v7;
int v8;
int v9;
saidx_t i;
saidx_t ia;
saidx_t ib;
saidx_t ic;
saidx_t id;
saidx_t ie;
saidx_t ig;
saidx_t ih;
saidx_t j;
saidx_t ja;
saidx_... | static saidx_t sort_typeBstar(const sauchar_t *T, saidx_t *SA, saidx_t *bucket,
saidx_t n) {
saidx_t *PAb, *ISAb, *buf;
saidx_t i, j, k, t, m, bufsize;
saint_t c0, c1;
int flag;
memset(bucket, 0, (ALPHABET_SIZE + 1) * ALPHABET_SIZE * sizeof(saidx_t));
for (i = 1, flag = 1; i ... | sort_typeBstar | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void source_close() {
if (pthread_mutex_lock(&source_mutex))
abort();
request_close = 1;
if (!in_slots && pthread_cond_signal(&source_cond))
abort();
if (pthread_mutex_unlock(&source_mutex))
abort();
} | void source_close(void) {
xlock(&source_mutex);
request_close = true;
if (in_slots == 0)
xsignal(&source_cond);
xunlock(&source_mutex);
} | source_close | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void source_release_buffer(void *buffer) {
unsigned int v1;
free(buffer);
if (pthread_mutex_lock(&source_mutex))
abort();
v1 = in_slots++;
if (!v1 && pthread_cond_signal(&source_cond))
abort();
if (pthread_mutex_unlock(&source_mutex))
abort();
} | void source_release_buffer(void *buffer) {
free(buffer);
xlock(&source_mutex);
if (in_slots++ == 0)
xsignal(&source_cond);
xunlock(&source_mutex);
} | source_release_buffer | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void source_thread_proc() {
size_t vacant;
size_t avail;
void *buffer;
unsigned long v3;
v3 = __readfsqword(0x28u);
while (1) {
if (pthread_mutex_lock(&source_mutex))
abort();
while (!in_slots && !request_close) {
if (pthread_cond_wait(&source_cond, &source_mutex))
abort();
... | static void source_thread_proc(void) {
Trace((" source: spawned"));
for (;;) {
void *buffer;
size_t vacant, avail;
xlock(&source_mutex);
while (in_slots == 0 && !request_close) {
Trace((" source: stalled"));
xwait(&source_cond, &source_mutex);
}
if (request_close) {
... | source_thread_proc | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void ss_blockswap(saidx_t *a, saidx_t *b, saidx_t n) {
saidx_t t;
while (n > 0) {
t = *a;
*a = *b;
*b = t;
--n;
++a;
++b;
}
} | static INLINE void ss_blockswap(saidx_t *a, saidx_t *b, saidx_t n) {
saidx_t t;
for (; 0 < n; --n, ++a, ++b) {
t = *a, *a = *b, *b = t;
}
} | ss_blockswap | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
saint_t ss_compare(const sauchar_t *T, const saidx_t *p1, const saidx_t *p2,
saidx_t depth) {
const sauchar_t *U1;
const sauchar_t *U2;
const sauchar_t *U1n;
const sauchar_t *U2n;
U1 = &T[*p1 + (long)depth];
U2 = &T[*p2 + (long)depth];
U1n = &T[p1[1] + 2];
U2n = &T[p2[1] + 2];
whil... | static INLINE saint_t ss_compare(const sauchar_t *T, const saidx_t *p1,
const saidx_t *p2, saidx_t depth) {
const sauchar_t *U1, *U2, *U1n, *U2n;
for (U1 = T + depth + *p1, U2 = T + depth + *p2, U1n = T + *(p1 + 1) + 2,
U2n = T + *(p2 + 1) + 2;
(U1 < U1n) && (U2 < U2n)... | ss_compare | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
saint_t ss_compare_last(const sauchar_t *T, const saidx_t *PA,
const saidx_t *p1, const saidx_t *p2, saidx_t depth,
saidx_t size) {
const sauchar_t *U1;
const sauchar_t *U1a;
const sauchar_t *U2;
const sauchar_t *U1n;
const sauchar_t *U1na;
const sauchar_t *U2... | static INLINE saint_t ss_compare_last(const sauchar_t *T, const saidx_t *PA,
const saidx_t *p1, const saidx_t *p2,
saidx_t depth, saidx_t size) {
const sauchar_t *U1, *U2, *U1n, *U2n;
for (U1 = T + depth + *p1, U2 = T + depth + *p2, U1n = ... | ss_compare_last | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void ss_fixdown(const sauchar_t *Td, const saidx_t *PA, saidx_t *SA, saidx_t i,
saidx_t size) {
saidx_t ia;
saidx_t k;
saidx_t v;
saidx_t j;
saint_t d;
saint_t c;
ia = i;
v = SA[i];
c = Td[PA[v]];
while (2 * ia + 1 < size) {
j = 2 * ia + 2;
k = 2 * ia + 1;
d = Td[PA[SA[k... | static INLINE void ss_fixdown(const sauchar_t *Td, const saidx_t *PA,
saidx_t *SA, saidx_t i, saidx_t size) {
saidx_t j, k;
saidx_t v;
saint_t c, d, e;
for (v = SA[i], c = Td[PA[v]]; (j = 2 * i + 1) < size; SA[i] = SA[k], i = k) {
d = Td[PA[SA[k = j++]]];
if (d < (e = Td[P... | ss_fixdown | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void ss_heapsort(const sauchar_t *Td, const saidx_t *PA, saidx_t *SA,
saidx_t size) {
char sizea;
int i;
int ia;
int m;
saidx_t t;
saidx_t ta;
saidx_t tb;
sizea = size;
m = size;
if ((size & 1) == 0) {
m = size - 1;
if (Td[PA[SA[m / 2]]] < Td[PA[SA[m]]]) {
t = SA[m];
... | static void ss_heapsort(const sauchar_t *Td, const saidx_t *PA, saidx_t *SA,
saidx_t size) {
saidx_t i, m;
saidx_t t;
m = size;
if ((size % 2) == 0) {
m--;
if (Td[PA[SA[m / 2]]] < Td[PA[SA[m]]]) {
SWAP(SA[m], SA[m / 2]);
}
}
for (i = m / 2 - 1; 0 <= i; --i) {
... | ss_heapsort | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
saint_t ss_ilg(saidx_t n) {
if ((n & 0xFF00) != 0)
return lg_table[BYTE1(n)] + 8;
else
return lg_table[(unsigned char)n];
} | static INLINE saint_t ss_ilg(saidx_t n) {
return (n & 0xff00) ? 8 + lg_table[(n >> 8) & 0xff]
: 0 + lg_table[(n >> 0) & 0xff];
} | ss_ilg | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void ss_inplacemerge(const sauchar_t *T, const saidx_t *PA, saidx_t *first,
saidx_t *middle, saidx_t *last, saidx_t depth) {
long v6;
const saidx_t *v7;
saidx_t len;
saidx_t half;
const saidx_t *p;
saidx_t *a;
saint_t r;
saint_t x;
long q;
do {
if (*(last - 1) >= 0) {
... | static void ss_inplacemerge(const sauchar_t *T, const saidx_t *PA,
saidx_t *first, saidx_t *middle, saidx_t *last,
saidx_t depth) {
const saidx_t *p;
saidx_t *a, *b;
saidx_t len, half;
saint_t q, r;
saint_t x;
for (;;) {
if (*(last - 1) < 0) {
... | ss_inplacemerge | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void ss_insertionsort(const sauchar_t *T, const saidx_t *PA, saidx_t *first,
saidx_t *last, saidx_t depth) {
saidx_t t;
saidx_t *i;
saidx_t *j;
long r;
for (i = last - 2; first <= i; --i) {
t = *i;
j = i + 1;
do {
r = ss_compare(T, &PA[t], &PA[*j], depth);
if (r ... | static void ss_insertionsort(const sauchar_t *T, const saidx_t *PA,
saidx_t *first, saidx_t *last, saidx_t depth) {
saidx_t *i, *j;
saidx_t t;
saint_t r;
for (i = last - 2; first <= i; --i) {
for (t = *i, j = i + 1; 0 < (r = ss_compare(T, PA + t, PA + *j, depth));) {
do {... | ss_insertionsort | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
saidx_t ss_isqrt(saidx_t x) {
long v1;
saidx_t y;
saidx_t e;
saidx_t ea;
if (x > 0xFFFFFF)
__assert_fail("x <= 0x00ffffff", "divbwt.c", 0xC2u, "ss_isqrt");
if (x > 255) {
if (x > 0xFFFF) {
ea = lg_table[BYTE2(x)] + 16;
y = sqq_table[x >> (ea - 6 - (ea & 1))] << ((unsigned char)(ea >> 1)... | static INLINE saidx_t ss_isqrt(saidx_t x) {
saidx_t y, e;
assert(x <= 0x00ffffff);
if (x < 0x100) {
return sqq_table[x] >> 4;
}
if (x < 0x10000) {
e = 8 + lg_table[(x >> 8) & 0xff];
y = (sqq_table[x >> ((e - 6) - (e & 1))] >> (7 - (e >> 1))) + 1;
} else {
e = 16 + lg_table[(x >> 16) & 0xff... | ss_isqrt | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
saidx_t *ss_median3(const sauchar_t *Td, const saidx_t *PA, saidx_t *v1,
saidx_t *v2, saidx_t *v3) {
saidx_t *v2a;
saidx_t *v1a;
v1a = v1;
v2a = v2;
if (Td[PA[*v1]] > Td[PA[*v2]]) {
v1a = v2;
v2a = v1;
}
if (Td[PA[*v2a]] <= Td[PA[*v3]])
return v2a;
if (Td[PA[*v1a]] <= Td... | static INLINE saidx_t *ss_median3(const sauchar_t *Td, const saidx_t *PA,
saidx_t *v1, saidx_t *v2, saidx_t *v3) {
saidx_t *t;
if (Td[PA[*v1]] > Td[PA[*v2]]) {
SWAP(v1, v2);
}
if (Td[PA[*v2]] > Td[PA[*v3]]) {
if (Td[PA[*v1]] > Td[PA[*v3]]) {
return v1;
} else ... | ss_median3 | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
saidx_t *ss_median5(const sauchar_t *Td, const saidx_t *PA, saidx_t *v1,
saidx_t *v2, saidx_t *v3, saidx_t *v4, saidx_t *v5) {
saidx_t *v4a;
saidx_t *v3a;
saidx_t *v2a;
saidx_t *v1a;
saidx_t *t;
v1a = v1;
v2a = v2;
v3a = v3;
v4a = v4;
if (Td[PA[*v2]] > Td[PA[*v3]]) {
v2a = v... | static INLINE saidx_t *ss_median5(const sauchar_t *Td, const saidx_t *PA,
saidx_t *v1, saidx_t *v2, saidx_t *v3,
saidx_t *v4, saidx_t *v5) {
saidx_t *t;
if (Td[PA[*v2]] > Td[PA[*v3]]) {
SWAP(v2, v3);
}
if (Td[PA[*v4]] > Td[PA[*v5]]) {
S... | ss_median5 | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void ss_mergebackward(const sauchar_t *T, const saidx_t *PA, saidx_t *first,
saidx_t *middle, saidx_t *last, saidx_t *buf,
saidx_t depth) {
saidx_t *v7;
saidx_t *v8;
saidx_t *v9;
saidx_t *v10;
saidx_t *v11;
saidx_t *v12;
saidx_t *v13;
saidx_t *v14;
saidx_t *... | static void ss_mergebackward(const sauchar_t *T, const saidx_t *PA,
saidx_t *first, saidx_t *middle, saidx_t *last,
saidx_t *buf, saidx_t depth) {
const saidx_t *p1, *p2;
saidx_t *a, *b, *c, *bufend;
saidx_t t;
saint_t r;
saint_t x;
bufend = buf + (... | ss_mergebackward | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void ss_mergeforward(const sauchar_t *T, const saidx_t *PA, saidx_t *first,
saidx_t *middle, saidx_t *last, saidx_t *buf,
saidx_t depth) {
saidx_t *v7;
saidx_t *v8;
saidx_t *v9;
saidx_t *v10;
saidx_t *v11;
saidx_t *v12;
saidx_t *v13;
saidx_t *v14;
saidx_t *v15... | static void ss_mergeforward(const sauchar_t *T, const saidx_t *PA,
saidx_t *first, saidx_t *middle, saidx_t *last,
saidx_t *buf, saidx_t depth) {
saidx_t *a, *b, *c, *bufend;
saidx_t t;
saint_t r;
bufend = buf + (middle - first) - 1;
ss_blockswap(buf, f... | ss_mergeforward | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void ss_mintrosort(const sauchar_t *T, const saidx_t *PA, saidx_t *first,
saidx_t *last, saidx_t depth) {
saint_t v6;
saint_t v7;
saidx_t *v8;
saidx_t *v9;
saint_t v10;
saint_t v11;
saint_t v12;
saint_t v13;
saint_t v14;
saint_t v15;
saint_t v16;
saint_t v17;
saint_t v18;
... | static void ss_mintrosort(const sauchar_t *T, const saidx_t *PA, saidx_t *first,
saidx_t *last, saidx_t depth) {
#define STACK_SIZE SS_MISORT_STACKSIZE
struct {
saidx_t *a, *b, c;
saint_t d;
} stack[STACK_SIZE];
const sauchar_t *Td;
saidx_t *a, *b, *c, *d, *e, *f;
saidx_t s, ... | ss_mintrosort | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
saidx_t *ss_partition(const saidx_t *PA, saidx_t *first, saidx_t *last,
saidx_t depth) {
saidx_t t;
saidx_t *a;
for (a = first - 1;; *a = t) {
while (++a < last && PA[*a + 1] < PA[*a] + depth)
*a = ~*a;
do
--last;
while (last > a && PA[*last + 1] >= PA[*last] + depth... | static INLINE saidx_t *ss_partition(const saidx_t *PA, saidx_t *first,
saidx_t *last, saidx_t depth) {
saidx_t *a, *b;
saidx_t t;
for (a = first - 1, b = last;;) {
for (; (++a < b) && ((PA[*a] + depth) >= (PA[*a + 1] + 1));) {
*a = ~*a;
}
for (; (a < --b) && (... | ss_partition | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
saidx_t *ss_pivot(const sauchar_t *Td, const saidx_t *PA, saidx_t *first,
saidx_t *last) {
saidx_t *lastb;
saidx_t *firsta;
saidx_t t;
saidx_t ta;
saidx_t *middle;
saidx_t *middlea;
t = last - first;
middle = &first[t / 2];
if (t > 512) {
ta = t >> 3;
firsta = ss_median3(Td,... | static INLINE saidx_t *ss_pivot(const sauchar_t *Td, const saidx_t *PA,
saidx_t *first, saidx_t *last) {
saidx_t *middle;
saidx_t t;
t = last - first;
middle = first + t / 2;
if (t <= 512) {
if (t <= 32) {
return ss_median3(Td, PA, first, middle, last - 1);
} el... | ss_pivot | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void ss_rotate(saidx_t *first, saidx_t *middle, saidx_t *last) {
saidx_t *v3;
saidx_t *v4;
saidx_t *v5;
saidx_t *v6;
saidx_t *lasta;
saidx_t *firsta;
saidx_t t;
saidx_t ta;
int l;
saidx_t r;
saidx_t *a;
saidx_t *aa;
saidx_t *b;
saidx_t *ba;
firsta = first;
lasta = last;
l = middle - f... | static INLINE void ss_rotate(saidx_t *first, saidx_t *middle, saidx_t *last) {
saidx_t *a, *b, t;
saidx_t l, r;
l = middle - first, r = last - middle;
for (; (0 < l) && (0 < r);) {
if (l == r) {
ss_blockswap(first, middle, l);
break;
}
if (l < r) {
a = last - 1, b = middle - 1;
... | ss_rotate | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void ss_swapmerge(const sauchar_t *T, const saidx_t *PA, saidx_t *first,
saidx_t *middle, saidx_t *last, saidx_t *buf, saidx_t bufsize,
saidx_t depth) {
signed long v8;
const saidx_t *v9;
saidx_t v10;
saint_t v11;
saint_t v12;
const saidx_t *v13;
saidx_t v14;
int m;
... | static void ss_swapmerge(const sauchar_t *T, const saidx_t *PA, saidx_t *first,
saidx_t *middle, saidx_t *last, saidx_t *buf,
saidx_t bufsize, saidx_t depth) {
#define STACK_SIZE SS_SMERGE_STACKSIZE
struct {
saidx_t *a, *b, *c;
saint_t d;
} stack[STACK_SIZE]... | ss_swapmerge | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void sssort(const sauchar_t *T, const saidx_t *PA, saidx_t *first,
saidx_t *last, saidx_t *buf, saidx_t bufsize, saidx_t depth,
saidx_t n, saint_t lastsuffix) {
saidx_t bufsizea;
saidx_t *firsta;
saidx_t j;
saidx_t k;
saidx_t ka;
saidx_t curbufsize;
int limit;
saidx_t i;
saidx_... | static void sssort(const sauchar_t *T, const saidx_t *PA, saidx_t *first,
saidx_t *last, saidx_t *buf, saidx_t bufsize, saidx_t depth,
saidx_t n, saint_t lastsuffix) {
saidx_t *a;
#if SS_BLOCKSIZE != 0
saidx_t *b, *middle, *curbuf;
saidx_t j, k, curbufsize, limit;
#endif
sa... | sssort | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void sti() {
int *sig;
for (sig = (int *)handled_signals; sig < (int *)"signals.c"; ++sig)
xaction(*sig, 0);
xmask(1, &handled, 0);
} | void sti(void) {
const int *sig;
foreach (sig, handled_signals)
xaction(*sig, SIG_DFL);
xmask(SIG_UNBLOCK, &handled, NULL);
} | sti | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
int suffix_xform(const char *compr_pathname, char **decompr_pathname) {
size_t ofs;
size_t len;
size_t prefix_len;
len = strlen(compr_pathname);
for (ofs = 0;; ++ofs) {
if (ofs > 4) {
if (decompr_pathname)
__assert_fail("0 == decompr_pathname", "main.c", 0x2ADu,
"suffi... | static int suffix_xform(const char *compr_pathname, char **decompr_pathname) {
size_t len, ofs;
len = strlen(compr_pathname);
for (ofs = 0u; ofs < sizeof suffix / sizeof suffix[0]; ++ofs) {
if ((suffix[ofs].chk_compr || 0 != decompr_pathname) &&
len >= suffix[ofs].compr_len) {
size_t prefix_len... | suffix_xform | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void terminate(int sig) {
sigset_t set;
unsigned long v2;
v2 = __readfsqword(0x28u);
xaction(sig, 0);
xraise(sig);
xempty(&set);
xadd(&set, sig);
xmask(1, &set, 0);
_exit(1);
} | _Noreturn static void terminate(int sig) {
sigset_t set;
xaction(sig, SIG_DFL);
xraise(sig);
xempty(&set);
xadd(&set, sig);
gcov_flush();
xmask(SIG_UNBLOCK, &set, NULL);
_exit(EX_FAIL);
} | terminate | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void *thread_entry(void *real_entry) {
((void (*)(void))real_entry)();
return 0;
} | static void *thread_entry(void *real_entry) {
((void (*)(void))real_entry)();
return NULL;
} | thread_entry | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
timespec timespec_add(timespec a, timespec b) {
int rns;
time_t rs;
time_t rsa;
time_t bs;
rs = a.tv_sec;
bs = b.tv_sec;
rns = LODWORD(a.tv_nsec) + LODWORD(b.tv_nsec);
if (LODWORD(a.tv_nsec) + LODWORD(b.tv_nsec) - 1000000000 >= 0) {
rns = LODWORD(a.tv_nsec) + LODWORD(b.tv_nsec) - 1000000000;
if... | struct timespec timespec_add(struct timespec a, struct timespec b) {
time_t rs = a.tv_sec;
time_t bs = b.tv_sec;
int ns = a.tv_nsec + b.tv_nsec;
int nsd = ns - TIMESPEC_HZ;
int rns = ns;
time_t tmin = TYPE_MINIMUM(time_t);
time_t tmax = TYPE_MAXIMUM(time_t);
if (0 <= nsd) {
rns = nsd;
if (bs < ... | timespec_add | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
timespec timespec_sub(timespec a, timespec b) {
int rns;
time_t rs;
time_t rsa;
time_t bs;
rs = a.tv_sec;
bs = b.tv_sec;
rns = LODWORD(a.tv_nsec) - LODWORD(b.tv_nsec);
if (LODWORD(a.tv_nsec) - LODWORD(b.tv_nsec) < 0) {
rns = LODWORD(a.tv_nsec) - LODWORD(b.tv_nsec) + 1000000000;
if (b.tv_sec == ... | struct timespec timespec_sub(struct timespec a, struct timespec b) {
time_t rs = a.tv_sec;
time_t bs = b.tv_sec;
int ns = a.tv_nsec - b.tv_nsec;
int rns = ns;
time_t tmin = TYPE_MINIMUM(time_t);
time_t tmax = TYPE_MAXIMUM(time_t);
if (ns < 0) {
rns = ns + TIMESPEC_HZ;
if (bs < tmax)
bs++;
... | timespec_sub | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void tr_copy(saidx_t *ISA, const saidx_t *ISAn, const saidx_t *SA,
saidx_t *first, saidx_t *a, saidx_t *b, saidx_t *last,
saidx_t depth) {
saidx_t s;
saidx_t sa;
saidx_t v;
saidx_t *ca;
saidx_t *d;
saidx_t *da;
saidx_t *e;
v = b - SA - 1;
d = a - 1;
while (first <= d) {
... | static void tr_copy(saidx_t *ISA, const saidx_t *ISAn, const saidx_t *SA,
saidx_t *first, saidx_t *a, saidx_t *b, saidx_t *last,
saidx_t depth) {
saidx_t *c, *d, *e;
saidx_t s, v;
v = b - SA - 1;
for (c = first, d = a - 1; c <= d; ++c) {
if ((s = *c - depth) < 0) {
... | tr_copy | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void tr_fixdown(const saidx_t *ISA, const saidx_t *ISAd, const saidx_t *ISAn,
saidx_t *SA, saidx_t i, saidx_t size) {
saidx_t v6;
int v7;
saidx_t v8;
saidx_t v9;
saidx_t ia;
saidx_t k;
saidx_t d;
saidx_t v;
saidx_t c;
saidx_t j;
ia = i;
v = SA[i];
if (v >= ISAn - ISAd)
v6 ... | static INLINE void tr_fixdown(const saidx_t *ISA, const saidx_t *ISAd,
const saidx_t *ISAn, saidx_t *SA, saidx_t i,
saidx_t size) {
saidx_t j, k;
saidx_t v;
saidx_t c, d, e;
for (v = SA[i], c = TR_GETC(v); (j = 2 * i + 1) < size;
SA[i] = SA[k],... | tr_fixdown | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void tr_heapsort(const saidx_t *ISA, const saidx_t *ISAd, const saidx_t *ISAn,
saidx_t *SA, saidx_t size) {
saidx_t v5;
saidx_t v6;
char sizea;
int i;
int ia;
int m;
saidx_t t;
saidx_t ta;
saidx_t tb;
sizea = size;
m = size;
if ((size & 1) == 0) {
m = size - 1;
v5 = SA[... | static void tr_heapsort(const saidx_t *ISA, const saidx_t *ISAd,
const saidx_t *ISAn, saidx_t *SA, saidx_t size) {
saidx_t i, m;
saidx_t t;
m = size;
if ((size % 2) == 0) {
m--;
if (TR_GETC(SA[m / 2]) < TR_GETC(SA[m])) {
SWAP(SA[m], SA[m / 2]);
}
}
for (i = m / 2 ... | tr_heapsort | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
saint_t tr_ilg(saidx_t n) {
if ((n & 0xFFFF00) == 0)
return lg_table[(unsigned char)n];
if ((n & 0xFF0000) != 0)
return lg_table[BYTE2(n)] + 16;
return lg_table[BYTE1(n)] + 8;
} | static INLINE saint_t tr_ilg(saidx_t n) {
return (n & 0x00ffff00) ? ((n & 0x00ff0000) ? 16 + lg_table[(n >> 16) & 0xff]
: 8 + lg_table[(n >> 8) & 0xff])
: 0 + lg_table[(n >> 0) & 0xff];
} | tr_ilg | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void tr_insertionsort(const saidx_t *ISA, const saidx_t *ISAd,
const saidx_t *ISAn, saidx_t *first, saidx_t *last) {
saidx_t v5;
saidx_t v6;
saidx_t t;
saidx_t *a;
saidx_t *b;
for (a = first + 1; a < last; ++a) {
t = *a;
b = a - 1;
do {
if (t >= ISAn - ISAd)
... | static void tr_insertionsort(const saidx_t *ISA, const saidx_t *ISAd,
const saidx_t *ISAn, saidx_t *first,
saidx_t *last) {
saidx_t *a, *b;
saidx_t t, r;
for (a = first + 1; a < last; ++a) {
for (t = *a, b = a - 1; 0 > (r = TR_GETC(t) - TR_GETC(*b));)... | tr_insertionsort | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void tr_introsort(saidx_t *ISA, const saidx_t *ISAd, const saidx_t *ISAn,
saidx_t *SA, saidx_t *first, saidx_t *last,
trbudget_t *budget) {
saint_t v7;
saint_t v8;
saint_t v9;
saint_t v10;
saint_t v11;
saint_t v12;
saidx_t v13;
saint_t v14;
saint_t v15;
saint_t v1... | static void tr_introsort(saidx_t *ISA, const saidx_t *ISAd, const saidx_t *ISAn,
saidx_t *SA, saidx_t *first, saidx_t *last,
trbudget_t *budget) {
#define STACK_SIZE TR_STACKSIZE
struct {
const saidx_t *a;
saidx_t *b, *c;
saint_t d, e;
} stack[STACK_SIZE... | tr_introsort | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
saidx_t *tr_median3(const saidx_t *ISA, const saidx_t *ISAd,
const saidx_t *ISAn, saidx_t *v1, saidx_t *v2,
saidx_t *v3) {
saidx_t v6;
saidx_t v7;
saidx_t v8;
saidx_t v9;
saidx_t v10;
saidx_t v11;
saidx_t *v2a;
saidx_t *v1a;
saidx_t *t;
v1a = v1;
v2a = v2;
... | static INLINE saidx_t *tr_median3(const saidx_t *ISA, const saidx_t *ISAd,
const saidx_t *ISAn, saidx_t *v1, saidx_t *v2,
saidx_t *v3) {
saidx_t *t;
if (TR_GETC(*v1) > TR_GETC(*v2)) {
SWAP(v1, v2);
}
if (TR_GETC(*v2) > TR_GETC(*v3)) {
i... | tr_median3 | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
saidx_t *tr_median5(const saidx_t *ISA, const saidx_t *ISAd,
const saidx_t *ISAn, saidx_t *v1, saidx_t *v2, saidx_t *v3,
saidx_t *v4, saidx_t *v5) {
saidx_t v8;
saidx_t v9;
saidx_t v10;
saidx_t v11;
saidx_t v12;
saidx_t v13;
saidx_t v14;
saidx_t v15;
saidx_t v16... | static INLINE saidx_t *tr_median5(const saidx_t *ISA, const saidx_t *ISAd,
const saidx_t *ISAn, saidx_t *v1, saidx_t *v2,
saidx_t *v3, saidx_t *v4, saidx_t *v5) {
saidx_t *t;
if (TR_GETC(*v2) > TR_GETC(*v3)) {
SWAP(v2, v3);
}
if (TR_GETC(*v... | tr_median5 | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void tr_partialcopy(saidx_t *ISA, const saidx_t *ISAn, const saidx_t *SA,
saidx_t *first, saidx_t *a, saidx_t *b, saidx_t *last,
saidx_t depth) {
saidx_t s;
saidx_t sa;
saidx_t lastrank;
saidx_t lastranka;
saidx_t lastrankb;
saidx_t newrank;
saidx_t v;
saidx_t t;
... | static void tr_partialcopy(saidx_t *ISA, const saidx_t *ISAn, const saidx_t *SA,
saidx_t *first, saidx_t *a, saidx_t *b,
saidx_t *last, saidx_t depth) {
saidx_t *c, *d, *e;
saidx_t s, v, t;
saidx_t rank, lastrank, newrank = -1;
v = b - SA - 1;
lastrank = ... | tr_partialcopy | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void tr_partition(const saidx_t *ISA, const saidx_t *ISAd, const saidx_t *ISAn,
saidx_t *first, saidx_t *middle, saidx_t *last, saidx_t **pa,
saidx_t **pb, saidx_t v) {
saidx_t v9;
saidx_t v10;
saidx_t v11;
saidx_t v12;
saidx_t v13;
saidx_t v14;
saidx_t *lasta;
saidx_... | static INLINE void tr_partition(const saidx_t *ISA, const saidx_t *ISAd,
const saidx_t *ISAn, saidx_t *first,
saidx_t *middle, saidx_t *last, saidx_t **pa,
saidx_t **pb, saidx_t v) {
saidx_t *a, *b, *c, *d, *e, *f;
saidx... | tr_partition | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
saidx_t *tr_pivot(const saidx_t *ISA, const saidx_t *ISAd, const saidx_t *ISAn,
saidx_t *first, saidx_t *last) {
saidx_t *lastb;
saidx_t *firsta;
saidx_t t;
saidx_t ta;
saidx_t *middle;
saidx_t *middlea;
t = last - first;
middle = &first[t / 2];
if (t > 512) {
ta = t >> 3;
f... | static INLINE saidx_t *tr_pivot(const saidx_t *ISA, const saidx_t *ISAd,
const saidx_t *ISAn, saidx_t *first,
saidx_t *last) {
saidx_t *middle;
saidx_t t;
t = last - first;
middle = first + t / 2;
if (t <= 512) {
if (t <= 32) {
return... | tr_pivot | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void *transmit(encoder_state *s, void *buf) {
unsigned long v2;
uint32_t *v3;
uint32_t *v4;
uint32_t *v5;
uint8_t *v6;
uint32_t *v7;
uint32_t *v9;
uint32_t *v10;
uint32_t *v11;
uint32_t *v12;
int32_t *v13;
uint32_t *v14;
int32_t *bufa;
unsigned int k;
unsigned int ka;
unsigned int kb;
... | void *transmit(struct encoder_state *s, void *buf) {
uint64_t b;
unsigned k;
uint8_t *sp;
unsigned t;
unsigned v;
uint16_t *mtfv;
uint32_t *p;
unsigned ns;
unsigned as;
uint32_t gr;
b = 0;
k = 0;
p = buf;
mtfv = (void *)s->SA;
as = mtfv[s->nmtf - 1] + 1;
ns = (s->nmtf + GROUP_SIZE - 1)... | transmit | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
saint_t trbudget_check(trbudget_t *budget, saidx_t size) {
if (size > budget->remain) {
if (budget->chance) {
budget->remain += budget->incval - size;
--budget->chance;
return 1;
} else {
budget->count += size;
return 0;
}
} else {
budget->remain -= size;
return 1;
... | static INLINE saint_t trbudget_check(trbudget_t *budget, saidx_t size) {
if (size <= budget->remain) {
budget->remain -= size;
return 1;
}
if (budget->chance == 0) {
budget->count += size;
return 0;
}
budget->remain += budget->incval - size;
budget->chance -= 1;
return 1;
} | trbudget_check | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
void trbudget_init(trbudget_t *budget, saidx_t chance, saidx_t incval) {
budget->chance = chance;
budget->incval = incval;
budget->remain = budget->incval;
} | static INLINE void trbudget_init(trbudget_t *budget, saidx_t chance,
saidx_t incval) {
budget->chance = chance;
budget->remain = budget->incval = incval;
} | trbudget_init | lbzip2-2.5_p20181227-r1 | app-arch | O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2 | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.