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 |
|---|---|---|---|---|---|---|---|
adv_error __cdecl fzseek(adv_fz *f, off_t offset, int mode) {
int err;
off_t pos;
off_t offset_0;
off_t run;
unsigned __int8 buffer[256];
unsigned __int64 v9;
v9 = __readfsqword(0x28u);
if (f->type != 1) {
if (mode == 2) {
pos = f->virtual_size - offset;
} else {
if (mode > 2)
... | adv_error fzseek(adv_fz *f, off_t offset, int mode) {
if (f->type == fz_file) {
switch (mode) {
case SEEK_SET:
return fseeko(f->f, f->real_offset + offset, SEEK_SET);
case SEEK_CUR:
return fseeko(f->f, offset, SEEK_CUR);
case SEEK_END:
if (f->real_size)
return fseeko(f->f, f-... | fzseek | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
off_t __cdecl fzsize(adv_fz *f) {
int v1;
stat st;
unsigned __int64 v4;
v4 = __readfsqword(0x28u);
if (f->type != 1)
return f->virtual_size;
v1 = fileno(f->f);
if (fstat(v1, &st))
return -1;
else
return st.st_size;
} | off_t fzsize(adv_fz *f) {
if (f->type == fz_file) {
struct stat st;
if (fstat(fileno(f->f), &st) != 0) {
return -1;
}
return st.st_size;
} else {
return f->virtual_size;
}
} | fzsize | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
off_t __cdecl fztell(adv_fz *f) {
if (f->type == 1)
return ftell(f->f);
else
return f->virtual_pos;
} | off_t fztell(adv_fz *f) {
if (f->type == fz_file) {
return ftell(f->f);
} else {
return f->virtual_pos;
}
} | fztell | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
adv_error __cdecl fzungetc(int c, adv_fz *f) {
if (f->type == 1)
return ungetc(c, f->f);
else
return -1;
} | adv_error fzungetc(int c, adv_fz *f) {
if (f->type == fz_file) {
return ungetc(c, f->f);
} else {
return -1;
}
} | fzungetc | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
size_t __cdecl fzwrite(const void *buffer, size_t size, size_t number,
adv_fz *f) {
size_t total_size;
if (f->type == 1)
return fwrite_lock(buffer, size, number, f->f);
if (f->type != 5)
return -1;
total_size = number * size;
if (fzgrow(f, number * size + f->virtual_pos))
r... | size_t fzwrite(const void *buffer, size_t size, size_t number, adv_fz *f) {
if (f->type == fz_file) {
return fwrite_lock(buffer, size, number, f->f);
} else if (f->type == fz_memory_write) {
size_t total_size;
total_size = size * number;
if (fzgrow(f, f->virtual_pos + total_size) != 0)
retur... | fzwrite | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl gen_codewords(u32 *A, u8 *lens, const unsigned int *len_counts,
unsigned int max_codeword_len,
unsigned int num_syms) {
unsigned int v5;
u32 v7;
unsigned int i;
unsigned int len;
unsigned int lena;
unsigned int sym;
unsigned int count;
u... | static void gen_codewords(u32 A[restrict], u8 lens[restrict],
const unsigned len_counts[restrict],
unsigned max_codeword_len, unsigned num_syms) {
u32 next_codewords[DEFLATE_MAX_CODEWORD_LEN + 1];
unsigned i;
unsigned len;
unsigned sym;
for (i = 0, len = ma... | gen_codewords | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl infopath::good_set(infopath *const this, bool Agood) {
this->good = Agood;
} | void infopath::good_set(bool Agood) { good = Agood; } | good_set | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl heap_sort(u32 *A, unsigned int length) {
unsigned int lengtha;
u32 *Aa;
u32 tmp;
lengtha = length;
Aa = A - 1;
heapify_array(A - 1, length);
while (lengtha > 1) {
tmp = Aa[lengtha];
A[lengtha - 1] = *A;
*A = tmp;
heapify_subtree(Aa, --lengtha, 1u);
}
} | static void heap_sort(u32 A[], unsigned length) {
A--;
heapify_array(A, length);
while (length >= 2) {
u32 tmp = A[length];
A[length] = A[1];
A[1] = tmp;
length--;
heapify_subtree(A, length, 1);
}
} | heap_sort | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl heapify_array(u32 *A, unsigned int length) {
unsigned int subtree_idx;
for (subtree_idx = length >> 1; subtree_idx; --subtree_idx)
heapify_subtree(A, length, subtree_idx);
} | static void heapify_array(u32 A[], unsigned length) {
unsigned subtree_idx;
for (subtree_idx = length / 2; subtree_idx >= 1; subtree_idx--)
heapify_subtree(A, length, subtree_idx);
} | heapify_array | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl heapify_subtree(u32 *A, unsigned int length,
unsigned int subtree_idx) {
unsigned int parent_idx;
unsigned int child_idx;
u32 v;
v = A[subtree_idx];
for (parent_idx = subtree_idx;; parent_idx = child_idx) {
child_idx = 2 * parent_idx;
if (2 * parent_idx > len... | static void heapify_subtree(u32 A[], unsigned length, unsigned subtree_idx) {
unsigned parent_idx;
unsigned child_idx;
u32 v;
v = A[subtree_idx];
parent_idx = subtree_idx;
while ((child_idx = parent_idx * 2) <= length) {
if (child_idx < length && A[child_idx + 1] > A[child_idx])
child_idx++;
... | heapify_subtree | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl init_block_split_stats(block_split_stats *stats) {
int i;
for (i = 0; i <= 9; ++i) {
stats->new_observations[i] = 0;
stats->observations[i] = 0;
}
stats->num_new_observations = 0;
stats->num_observations = 0;
} | static void init_block_split_stats(struct block_split_stats *stats) {
int i;
for (i = 0; i < NUM_OBSERVATION_TYPES; i++) {
stats->new_observations[i] = 0;
stats->observations[i] = 0;
}
stats->num_new_observations = 0;
stats->num_observations = 0;
} | init_block_split_stats | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
adv_error __cdecl le_uint16_fzread(adv_fz *f, unsigned int *v) {
unsigned __int8 p[2];
unsigned __int64 v4;
v4 = __readfsqword(0x28u);
if (fzread(p, 2u, 1u, f) != 1)
return -1;
*v = le_uint16_read(p);
return 0;
} | adv_error le_uint16_fzread(adv_fz *f, unsigned *v) {
unsigned char p[2];
if (fzread(p, 2, 1, f) != 1)
return -1;
*v = le_uint16_read(p);
return 0;
} | le_uint16_fzread | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
adv_error __cdecl le_uint32_fzread(adv_fz *f, unsigned int *v) {
unsigned __int8 p[4];
unsigned __int64 v4;
v4 = __readfsqword(0x28u);
if (fzread(p, 4u, 1u, f) != 1)
return -1;
*v = le_uint32_read(p);
return 0;
} | adv_error le_uint32_fzread(adv_fz *f, unsigned *v) {
unsigned char p[4];
if (fzread(p, 4, 1, f) != 1)
return -1;
*v = le_uint32_read(p);
return 0;
} | le_uint32_fzread | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
adv_error __cdecl le_uint8_fzread(adv_fz *f, unsigned int *v) {
unsigned __int8 p[1];
unsigned __int64 v4;
v4 = __readfsqword(0x28u);
if (fzread(p, 1u, 1u, f) != 1)
return -1;
*v = le_uint8_read(p);
return 0;
} | adv_error le_uint8_fzread(adv_fz *f, unsigned *v) {
unsigned char p[1];
if (fzread(p, 1, 1, f) != 1)
return -1;
*v = le_uint8_read(p);
return 0;
} | le_uint8_fzread | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
u32 __cdecl libdeflate_adler32(u32 adler, const void *buffer, size_t size) {
if (buffer)
return adler32_impl(adler, buffer, size);
else
return 1;
} | LIBDEFLATEAPI u32 libdeflate_adler32(u32 adler, const void *buffer,
size_t size) {
if (buffer == NULL)
return 1;
return adler32_impl(adler, buffer, size);
} | libdeflate_adler32 | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
libdeflate_compressor *__cdecl
libdeflate_alloc_compressor(int compression_level) {
libdeflate_compressor *v1;
libdeflate_compressor *result;
size_t size;
libdeflate_compressor *c;
if (compression_level <= 7)
size = 1100992;
else
size = 8969440;
v1 = (libdeflate_compressor *)libdeflate_aligned_ma... | LIBDEFLATEAPI struct libdeflate_compressor *
libdeflate_alloc_compressor(int compression_level) {
struct libdeflate_compressor *c;
size_t size;
#if SUPPORT_NEAR_OPTIMAL_PARSING
if (compression_level >= 8)
size = offsetof(struct libdeflate_compressor, p) + sizeof(c->p.n);
else
#endif
size = offsetof(str... | libdeflate_alloc_compressor | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
libdeflate_decompressor *__cdecl libdeflate_alloc_decompressor() {
return (libdeflate_decompressor *)malloc(0x1DA0u);
} | LIBDEFLATEAPI struct libdeflate_decompressor *
libdeflate_alloc_decompressor(void) {
return malloc(sizeof(struct libdeflate_decompressor));
} | libdeflate_alloc_decompressor | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
u32 __cdecl libdeflate_crc32(u32 remainder, const void *buffer, size_t nbytes) {
if (buffer)
return ~crc32_impl(~remainder, (const u8 *)buffer, nbytes);
else
return 0;
} | LIBDEFLATEAPI u32 libdeflate_crc32(u32 remainder, const void *buffer,
size_t nbytes) {
if (buffer == NULL)
return 0;
return ~crc32_impl(~remainder, buffer, nbytes);
} | libdeflate_crc32 | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
size_t __cdecl libdeflate_deflate_compress(libdeflate_compressor *c,
const void *in, size_t in_nbytes,
void *out, size_t out_nbytes_avail) {
const u8 *ina;
deflate_output_bitstream os;
unsigned __int64 v9;
ina = (const u8 *)i... | LIBDEFLATEAPI size_t libdeflate_deflate_compress(
struct libdeflate_compressor *c, const void *in, size_t in_nbytes,
void *out, size_t out_nbytes_avail) {
if (unlikely(out_nbytes_avail < OUTPUT_END_PADDING))
return 0;
if (unlikely(in_nbytes < 16)) {
struct deflate_output_bitstream os;
deflate_i... | libdeflate_deflate_compress | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
size_t __cdecl libdeflate_deflate_compress_bound(libdeflate_compressor *c,
size_t in_nbytes) {
size_t v2;
if (in_nbytes >= 0xFFFFFFFFFFFFD8F1LL || in_nbytes == 0)
v2 = 1;
else
v2 = (in_nbytes + 9999) / 0x2710;
return 5 * v2 + in_nbytes + 9;
} | LIBDEFLATEAPI size_t libdeflate_deflate_compress_bound(
struct libdeflate_compressor *c, size_t in_nbytes) {
size_t max_num_blocks = MAX(DIV_ROUND_UP(in_nbytes, MIN_BLOCK_LENGTH), 1);
return (5 * max_num_blocks) + in_nbytes + 1 + OUTPUT_END_PADDING;
} | libdeflate_deflate_compress_bound | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
libdeflate_result __cdecl libdeflate_deflate_decompress(
libdeflate_decompressor *d, const void *in, size_t in_nbytes, void *out,
size_t out_nbytes_avail, size_t *actual_out_nbytes_ret) {
return decompress_impl(d, in, in_nbytes, out, out_nbytes_avail,
actual_out_nbytes_ret);
} | LIBDEFLATEAPI enum libdeflate_result
libdeflate_deflate_decompress(struct libdeflate_decompressor *restrict d,
const void *restrict in, size_t in_nbytes,
void *restrict out, size_t out_nbytes_avail,
size_t *actual_out_nbytes_ret) ... | libdeflate_deflate_decompress | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl libdeflate_free_compressor(libdeflate_compressor *c) {
libdeflate_aligned_free(c);
} | LIBDEFLATEAPI void libdeflate_free_compressor(struct libdeflate_compressor *c) {
aligned_free(c);
} | libdeflate_free_compressor | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl libdeflate_free_decompressor(libdeflate_decompressor *d) {
free(d);
} | LIBDEFLATEAPI void
libdeflate_free_decompressor(struct libdeflate_decompressor *d) {
free(d);
} | libdeflate_free_decompressor | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
size_t __cdecl libdeflate_gzip_compress(libdeflate_compressor *c,
const void *in, size_t in_size,
void *out, size_t out_nbytes_avail) {
_BYTE *v6;
u8 xfl;
unsigned int compression_level;
u8 *out_next;
u8 *out_nexta;
size_t defla... | LIBDEFLATEAPI size_t libdeflate_gzip_compress(struct libdeflate_compressor *c,
const void *in, size_t in_size,
void *out,
size_t out_nbytes_avail) {
u8 *out_next = out;
unsigned ... | libdeflate_gzip_compress | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
size_t __cdecl libdeflate_gzip_compress_bound(libdeflate_compressor *c,
size_t in_nbytes) {
return libdeflate_deflate_compress_bound(c, in_nbytes) + 18;
} | LIBDEFLATEAPI size_t libdeflate_gzip_compress_bound(
struct libdeflate_compressor *c, size_t in_nbytes) {
return GZIP_MIN_OVERHEAD + libdeflate_deflate_compress_bound(c, in_nbytes);
} | libdeflate_gzip_compress_bound | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
libdeflate_result __cdecl
libdeflate_gzip_decompress(libdeflate_decompressor *d, const void *in,
size_t in_nbytes, void *out, size_t out_nbytes_avail,
size_t *actual_out_nbytes_ret) {
const u8 *v7;
const u8 *v8;
u8 flg;
libdeflate_result result;
const u8 *... | LIBDEFLATEAPI enum libdeflate_result
libdeflate_gzip_decompress(struct libdeflate_decompressor *d, const void *in,
size_t in_nbytes, void *out, size_t out_nbytes_avail,
size_t *actual_out_nbytes_ret) {
const u8 *in_next = in;
const u8 *const in_end = in_next + i... | libdeflate_gzip_decompress | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
size_t __cdecl libdeflate_zlib_compress(libdeflate_compressor *c,
const void *in, size_t in_size,
void *out, size_t out_nbytes_avail) {
__int16 level_hint;
unsigned int compression_level;
u8 *out_nexta;
size_t deflate_size;
if (o... | LIBDEFLATEAPI size_t libdeflate_zlib_compress(struct libdeflate_compressor *c,
const void *in, size_t in_size,
void *out,
size_t out_nbytes_avail) {
u8 *out_next = out;
u16 hdr;
... | libdeflate_zlib_compress | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
size_t __cdecl libdeflate_zlib_compress_bound(libdeflate_compressor *c,
size_t in_nbytes) {
return libdeflate_deflate_compress_bound(c, in_nbytes) + 6;
} | LIBDEFLATEAPI size_t libdeflate_zlib_compress_bound(
struct libdeflate_compressor *c, size_t in_nbytes) {
return ZLIB_MIN_OVERHEAD + libdeflate_deflate_compress_bound(c, in_nbytes);
} | libdeflate_zlib_compress_bound | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
libdeflate_result __cdecl
libdeflate_zlib_decompress(libdeflate_decompressor *d, const void *in,
size_t in_nbytes, void *out, size_t out_nbytes_avail,
size_t *actual_out_nbytes_ret) {
u16 hdr;
libdeflate_result result;
size_t actual_out_nbytes;
const u8 *in_... | LIBDEFLATEAPI enum libdeflate_result
libdeflate_zlib_decompress(struct libdeflate_decompressor *d, const void *in,
size_t in_nbytes, void *out, size_t out_nbytes_avail,
size_t *actual_out_nbytes_ret) {
const u8 *in_next = in;
const u8 *const in_end = in_next + i... | libdeflate_zlib_decompress | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void list_all(int argc, char **argv) {
long v2;
long v3;
char v4;
int i;
std_string path;
unsigned long v7;
v7 = __readfsqword(0x28u);
for (i = 0; i < argc; ++i) {
if (argc > 1 && !opt_crc) {
v2 = std_operator < < <std_char_traits<char>>(&std_cout, "File: ");
v3 = std_operator < < <std_... | void list_all(int argc, char *argv[]) {
for (int i = 0; i < argc; ++i) {
if (argc > 1 && !opt_crc)
cout << "File: " << argv[i] << endl;
png_print(argv[i]);
}
} | list_all | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl make_canonical_huffman_code(unsigned int num_syms,
unsigned int max_codeword_len,
const u32 *freqs, u8 *lens,
u32 *codewords) {
u32 v5;
unsigned int num_used_syms;
unsigned int l... | static void make_canonical_huffman_code(unsigned num_syms,
unsigned max_codeword_len,
const u32 freqs[restrict],
u8 lens[restrict],
u32 codewords[restrict]) {
... | make_canonical_huffman_code | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
unsigned int __cdecl oversize_deflate(unsigned int size) {
return size / 0xA + size + 12;
} | unsigned oversize_deflate(unsigned size) { return size + size / 10 + 12; } | oversize_deflate | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
unsigned int __cdecl oversize_zlib(unsigned int size) {
return oversize_deflate(size) + 10;
} | unsigned oversize_zlib(unsigned size) { return oversize_deflate(size) + 10; } | oversize_zlib | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl png_compress_palette_delta(data_ptr *out_ptr,
unsigned int *out_size,
const unsigned __int8 *pal_ptr,
unsigned int pal_size,
const unsigned __int8 ... | void png_compress_palette_delta(data_ptr &out_ptr, unsigned &out_size,
const unsigned char *pal_ptr, unsigned pal_size,
const unsigned char *prev_ptr,
unsigned prev_size) {
unsigned i;
unsigned char *dst_ptr;
unsigned ... | png_compress_palette_delta | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl png_print_chunk(unsigned int type, unsigned __int8 *data,
unsigned int size) {
__int64 v3;
std::_Setw v4;
__int64 v5;
__int64 v6;
unsigned int v7;
__int64 v8;
__int64 v9;
unsigned int v10;
__int64 v11;
__int64 v12;
unsigned int v13;
__int64 v14;
unsign... | void png_print_chunk(unsigned type, unsigned char *data, unsigned size) {
char tag[5];
unsigned i;
be_uint32_write(tag, type);
tag[4] = 0;
cout << tag << setw(8) << size;
switch (type) {
case ADV_MNG_CN_MHDR:
if (size < 28) {
cout << " invalid chunk size";
break;
}
cout << " wid... | png_print_chunk | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
u64 __cdecl read_xcr(u32 index) {
unsigned int v1;
__asm { xgetbv }
return ((unsigned __int64)v1 << 32) | index;
} | static inline u64 read_xcr(u32 index) {
u32 edx, eax;
__asm__(".byte 0x0f, 0x01, 0xd0" : "=d"(edx), "=a"(eax) : "c"(index));
return ((u64)edx << 32) | eax;
} | read_xcr | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl infopath::readonly_set(infopath *const this, bool Areadonly) {
this->readonly = Areadonly;
} | void infopath::readonly_set(bool Areadonly) { readonly = Areadonly; } | readonly_set | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
bool reduce_image(unsigned char **out_ptr, unsigned int *out_scanline,
unsigned char *pal_ptr, unsigned int *pal_count,
unsigned char *palrns_ptr, unsigned int *palrns_count,
unsigned int width, unsigned int height,
unsigned char *img_ptr, unsigned... | bool reduce_image(unsigned char **out_ptr, unsigned *out_scanline,
unsigned char *pal_ptr, unsigned *pal_count,
unsigned char *palrns_ptr, unsigned *palrns_count,
unsigned width, unsigned height, unsigned char *img_ptr,
unsigned img_scanline, const... | reduce_image | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void rezip_all(int argc, char **argv) {
std__Setw v2;
long v3;
long v4;
std__Setw v5;
long v6;
long v7;
std__Setw v8;
long v9;
long v10;
char v11;
int i;
unsigned int perc;
unsigned long total_0;
unsigned long total_1;
std_string file;
unsigned long v17;
v17 = __readfsqword(0x28u);
... | void rezip_all(int argc, char *argv[]) {
unsigned long long total_0 = 0;
unsigned long long total_1 = 0;
for (int i = 0; i < argc; ++i)
rezip_single(argv[i], total_0, total_1);
if (!opt_quiet) {
cout << setw(12) << total_0 << setw(12) << total_1 << " ";
if (total_0) {
unsigned perc = total_1... | rezip_all | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
adv_bool __cdecl sglob(const char *s, const char *glob) {
while (*s && *glob) {
if (*glob == 42) {
if (sglob(s, glob + 1))
return 1;
++s;
} else if (*glob == 63) {
++glob;
++s;
} else {
if (*glob == 92 && (glob[1] == 92 || glob[1] == 42 || glob[1] == 63))
++gl... | adv_bool sglob(const char *s, const char *glob) {
while (*s && *glob) {
if (*glob == '*') {
if (sglob(s, glob + 1))
return 1;
++s;
continue;
}
if (*glob == '?') {
++glob;
++s;
continue;
}
if (glob[0] == '\\' &&
(glob[1] == '\\' || glob[1] == '*... | sglob | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl sig_ignore(int sig) {
if (!sig_ignore_sig)
sig_ignore_sig = sig;
} | void sig_ignore(int sig) {
if (sig_ignore_sig == 0)
sig_ignore_sig = sig;
} | sig_ignore | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl sig_lock() {
sig_ignore_sig = 0;
sig_hup = signal(1, (__sighandler_t)sig_ignore);
sig_quit = signal(3, (__sighandler_t)sig_ignore);
sig_int = signal(2, (__sighandler_t)sig_ignore);
sig_term = signal(15, (__sighandler_t)sig_ignore);
} | void sig_lock() {
sig_ignore_sig = 0;
#if HAVE_SIGHUP
sig_hup = signal(SIGHUP, sig_ignore);
#endif
#if HAVE_SIGQUIT
sig_quit = signal(SIGQUIT, sig_ignore);
#endif
sig_int = signal(SIGINT, sig_ignore);
sig_term = signal(SIGTERM, sig_ignore);
} | sig_lock | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl sig_unlock() {
signal(1, sig_hup);
signal(3, sig_quit);
signal(2, sig_int);
signal(15, sig_term);
if (sig_ignore_sig)
raise(sig_ignore_sig);
} | void sig_unlock() {
#if HAVE_SIGHUP
signal(SIGHUP, sig_hup);
#endif
#if HAVE_SIGQUIT
signal(SIGQUIT, sig_quit);
#endif
signal(SIGINT, sig_int);
signal(SIGTERM, sig_term);
if (sig_ignore_sig)
raise(sig_ignore_sig);
} | sig_unlock | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl infopath::size_set(infopath *const this, unsigned int Asize) {
this->size = Asize;
} | void infopath::size_set(unsigned Asize) { size = Asize; } | size_set | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl sncat(char *dst, size_t len, const char *src) {
while (len && *dst) {
++dst;
--len;
}
sncpy(dst, len, src);
} | void sncat(char *dst, size_t len, const char *src) {
while (len && *dst) {
++dst;
--len;
}
sncpy(dst, len, src);
} | sncat | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl sncatc(char *dst, size_t len, char src) {
while (len && *dst) {
++dst;
--len;
}
sncpyc(dst, len, src);
} | void sncatc(char *dst, size_t len, char src) {
while (len && *dst) {
++dst;
--len;
}
sncpyc(dst, len, src);
} | sncatc | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void sncatf(char *str, size_t count, const char *fmt, ...) {
__int64 v3;
__int64 v4;
__int64 v5;
unsigned int l;
va_list arg;
unsigned __int64 v8;
__int64 v9;
__int64 v10;
__int64 v11;
va_start(arg, fmt);
v3 = va_arg(arg, _QWORD);
v4 = va_arg(arg, _QWORD);
v5 = va_arg(arg, _QWORD);
v9 = v3;... | void sncatf(char *str, size_t count, const char *fmt, ...) {
unsigned l;
va_list arg;
va_start(arg, fmt);
l = 0;
while (l < count && str[l])
++l;
if (count > l)
vsnprintf(str + l, count - l, fmt, arg);
va_end(arg);
} | sncatf | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl sncpy(char *dst, size_t len, const char *src) {
const char *v3;
char *v4;
char *v5;
size_t lena;
char *dstb;
if (len) {
for (lena = len - 1; lena && *src; --lena) {
v3 = src++;
v4 = dst++;
*v4 = *v3;
}
*dst = 0;
dstb = dst + 1;
while (lena) {
v5 = ds... | void sncpy(char *dst, size_t len, const char *src) {
if (len) {
--len;
while (len && *src) {
*dst++ = *src++;
--len;
}
*dst = 0;
#ifndef NDEBUG
++dst;
while (len) {
*dst++ = 0x5A;
--len;
}
#endif
}
} | sncpy | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl sncpyc(char *dst, size_t len, char src) {
char srca[4];
size_t lena;
char *dsta;
dsta = dst;
lena = len;
srca[0] = src;
sncpyn(dst, len, srca, 1u);
} | void sncpyc(char *dst, size_t len, char src) { sncpyn(dst, len, &src, 1); } | sncpyc | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl sncpyn(char *dst, size_t len, const char *src, size_t src_len) {
if (len >= src_len + 1)
sncpy(dst, src_len + 1, src);
else
sncpy(dst, len, src);
} | void sncpyn(char *dst, size_t len, const char *src, size_t src_len) {
if (len < src_len + 1)
sncpy(dst, len, src);
else
sncpy(dst, src_len + 1, src);
} | sncpyn | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
unsigned int __cdecl sort_symbols(unsigned int num_syms, const u32 *freqs,
u8 *lens, u32 *symout) {
u32 v4;
u32 v5;
u32 v6;
unsigned int v7;
unsigned int sym;
unsigned int syma;
unsigned int i;
unsigned int num_used_syms;
unsigned int num_counters;
u32 freq;
unsig... | static unsigned sort_symbols(unsigned num_syms, const u32 freqs[restrict],
u8 lens[restrict], u32 symout[restrict]) {
unsigned sym;
unsigned i;
unsigned num_used_syms;
unsigned num_counters;
unsigned counters[GET_NUM_COUNTERS(DEFLATE_MAX_NUM_SYMS)];
num_counters = GET_NUM_COUNT... | sort_symbols | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void __cdecl sskip(int *p, const char *s, const char *sep) {
while (s[*p] && strchr(sep, s[*p]))
++*p;
} | void sskip(int *p, const char *s, const char *sep) {
while (s[*p] && strchr(sep, s[*p]) != 0)
++*p;
} | sskip | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
const char *__cdecl stoken(char *c, int *p, char *s, const char *sep,
const char *ignore) {
unsigned int begin;
unsigned int end;
begin = *p;
while (s[*p] && !strchr(sep, s[*p]))
++*p;
end = *p;
*c = s[*p];
if (s[*p])
s[(*p)++] = 0;
while (begin < end && strchr(ignore... | const char *stoken(char *c, int *p, char *s, const char *sep,
const char *ignore) {
unsigned begin;
unsigned end;
begin = *p;
while (s[*p] && strchr(sep, s[*p]) == 0)
++*p;
end = *p;
*c = s[*p];
if (s[*p]) {
s[*p] = 0;
++*p;
}
while (begin < end && strchr(ignore, s[... | stoken | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void usage() {
long v0;
long v1;
long v2;
long v3;
long v4;
long v5;
long v6;
long v7;
long v8;
long v9;
long v10;
long v11;
long v12;
long v13;
long v14;
version();
v0 = std_operator < < <std_char_traits<char>>(
&std_cout, "Usage: advpng [options] [FILES..... | void usage() {
version();
cout << "Usage: advpng [options] [FILES...]" << endl;
cout << endl;
cout << "Modes:" << endl;
cout << " " SWITCH_GETOPT_LONG("-l, --list ",
"-l") " List the content of the files"
<< endl;
cout << " " SWITCH_GETOPT_LONG("-z, --re... | usage | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void version() {
std_operator < < <std_char_traits<char>>(
&std_cout, "advancecomp v2.3 by Andrea Mazzoleni, "
"http://www.advancemame.it\n");
} | void version() {
cout << PACKAGE " v" VERSION " by Andrea Mazzoleni, " PACKAGE_URL "\n";
} | version | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
void write_image(adv_fz *f, unsigned int pix_width, unsigned int pix_height,
unsigned int pix_pixel, unsigned char *pix_ptr,
unsigned int pix_scanline, unsigned char *pal_ptr,
unsigned int pal_size, unsigned char *rns_ptr,
unsigned int rns_size) {
un... | void write_image(adv_fz *f, unsigned pix_width, unsigned pix_height,
unsigned pix_pixel, unsigned char *pix_ptr,
unsigned pix_scanline, unsigned char *pal_ptr,
unsigned pal_size, unsigned char *rns_ptr, unsigned rns_size) {
if (pix_pixel == 1) {
png_write(f, pix_... | write_image | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
size_t __cdecl zopfli_min(size_t a, size_t b) {
size_t result;
result = a;
if (b <= a)
return b;
return result;
} | static size_t zopfli_min(size_t a, size_t b) { return a < b ? a : b; } | zopfli_min | advancecomp-2.3 | app-arch | O0/app-arch/advancecomp-2.3/advpng | ida | O0 |
bool ComputeRecoveryFileCount(std_ostream *sout, std_ostream *serr,
u32 *recoveryfilecount, Scheme recoveryfilescheme,
u32 recoveryblockcount, u64 largestfilesize,
u64 blocksize) {
long v8;
long v9;
u32 v10;
u32 blocks;
... | bool ComputeRecoveryFileCount(std::ostream &sout, std::ostream &serr,
u32 *recoveryfilecount, Scheme recoveryfilescheme,
u32 recoveryblockcount, u64 largestfilesize,
u64 blocksize) {
if (recoveryblockcount == 0) {
*recovery... | ComputeRecoveryFileCount | par2cmdline-0.8.1 | app-arch | O0/app-arch/par2cmdline-0.8.1/par2 | ida | O0 |
void FileSizeCache_ ~FileSizeCache(FileSizeCache *const this) {
std_map<std_string, unsigned long> _ ~map(&this->cache);
} | FileSizeCache::FileSizeCache() {} | FileSizeCache | par2cmdline-0.8.1 | app-arch | O0/app-arch/par2cmdline-0.8.1/par2 | ida | O0 |
void GenerateWindowTable(u64 window, u32 (*target)[256]) {
_QWORD v2[4];
v2[3] = __readfsqword(0x28u);
v2[0] = window;
v2[1] = target;
GOMP_parallel(GenerateWindowTable__Z19GenerateWindowTablemRA256_j__omp_fn_0,
v2, 0, 0);
} | void GenerateWindowTable(u64 window, u32 (&target)[256]) {
#pragma omp parallel for
for (i16 i = 0; i <= 255; i++) {
u32 crc = ccitttable.table[i];
for (u64 j = 0; j < window; j++) {
crc = ((crc >> 8) & 0x00ffffffL) ^ ccitttable.table[(u8)crc];
}
target[i] = crc;
}
} | GenerateWindowTable | par2cmdline-0.8.1 | app-arch | O0/app-arch/par2cmdline-0.8.1/par2 | ida | O0 |
void Par1Repairer_ ~Par1Repairer(Par1Repairer *const this) {
DataBlock *second;
DataBlock *v2;
Par1RepairerSourceFile *v3;
Par1RepairerSourceFile *v4;
Par1RepairerSourceFile *v5;
Par1RepairerSourceFile *v6;
std_map<unsigned int, DataBlock *> _iterator i;
std_vector<Par1RepairerSourceFile *> _iterator so... | Par1Repairer::~Par1Repairer(void) {
delete[](u8 *) inputbuffer;
delete[](u8 *) outputbuffer;
map<u32, DataBlock *>::iterator i = recoveryblocks.begin();
while (i != recoveryblocks.end()) {
DataBlock *datablock = i->second;
delete datablock;
++i;
}
vector<Par1RepairerSourceFile *>::iterator so... | Par1Repairer | par2cmdline-0.8.1 | app-arch | O0/app-arch/par2cmdline-0.8.1/par2 | ida | O0 |
void Par1RepairerSourceFile_ ~Par1RepairerSourceFile(
Par1RepairerSourceFile *const this) {
DataBlock_ ~DataBlock(&this->targetblock);
DataBlock_ ~DataBlock(&this->sourceblock);
std_string_ ~string(this);
} | Par1RepairerSourceFile::~Par1RepairerSourceFile(void) {} | Par1RepairerSourceFile | par2cmdline-0.8.1 | app-arch | O0/app-arch/par2cmdline-0.8.1/par2 | ida | O0 |
void Par2Creator_ ~Par2Creator(Par2Creator *const this) {
MainPacket *mainpacket;
CreatorPacket *creatorpacket;
__gnu_cxx___normal_iterator<Par2CreatorSourceFile **,
std_vector<Par2CreatorSourceFile *>>
_reference v3;
Par2CreatorSourceFile *v4;
std_vector<Par2CreatorSourceF... | Par2Creator::~Par2Creator(void) {
delete mainpacket;
delete creatorpacket;
delete[](u8 *) inputbuffer;
delete[](u8 *) outputbuffer;
vector<Par2CreatorSourceFile *>::iterator sourcefile = sourcefiles.begin();
while (sourcefile != sourcefiles.end()) {
delete *sourcefile;
++sourcefile;
}
} | Par2Creator | par2cmdline-0.8.1 | app-arch | O0/app-arch/par2cmdline-0.8.1/par2 | ida | O0 |
void Par2Repairer_ ~Par2Repairer(Par2Repairer *const this) {
std__Rb_tree_iterator<std_pair<unsigned int const, RecoveryPacket *>>
_reference v1;
RecoveryPacket *second;
Par2RepairerSourceFile *v3;
Par2RepairerSourceFile *v4;
MainPacket *mainpacket;
CreatorPacket *creatorpacket;
std_map<unsigned int... | Par2Repairer::~Par2Repairer(void) {
delete[](u8 *) inputbuffer;
delete[](u8 *) outputbuffer;
map<u32, RecoveryPacket *>::iterator rp = recoverypacketmap.begin();
while (rp != recoverypacketmap.end()) {
delete(*rp).second;
++rp;
}
map<MD5Hash, Par2RepairerSourceFile *>::iterator sf = sourcefilemap... | Par2Repairer | par2cmdline-0.8.1 | app-arch | O0/app-arch/par2cmdline-0.8.1/par2 | ida | O0 |
void Par2RepairerSourceFile_ ~Par2RepairerSourceFile(
Par2RepairerSourceFile *const this) {
DescriptionPacket *descriptionpacket;
VerificationPacket *verificationpacket;
descriptionpacket = this->descriptionpacket;
if (this->descriptionpacket) {
DescriptionPacket_ ~DescriptionPacket(this->descriptionpa... | Par2RepairerSourceFile::~Par2RepairerSourceFile(void) {
delete descriptionpacket;
delete verificationpacket;
} | Par2RepairerSourceFile | par2cmdline-0.8.1 | app-arch | O0/app-arch/par2cmdline-0.8.1/par2 | ida | O0 |
void RecoveryPacket_ ~RecoveryPacket(RecoveryPacket *const this) {
MD5Context *packetcontext;
packetcontext = this->packetcontext;
if (packetcontext) {
MD5Context_ ~MD5Context(this->packetcontext);
operator delete(packetcontext);
}
DataBlock_ ~DataBlock(&this->datablock);
} | RecoveryPacket::~RecoveryPacket(void) { delete packetcontext; } | RecoveryPacket | par2cmdline-0.8.1 | app-arch | O0/app-arch/par2cmdline-0.8.1/par2 | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
CommandLine *v3;
CommandLine_Operation Operation;
Scheme RecoveryFileScheme;
u32 FirstRecoveryBlock;
u64 BlockSize;
const std_vector<std_string> *v8;
u32 v9;
NoiseLevel v10;
CommandLine_Version Version;
bool PurgeFiles;
bool v13;
const s... | int main(int argc, char *argv[]) {
#ifdef _MSC_VER
_CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_ALLOC_MEM_DF |
_CRTDBG_DELAY_FREE_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif
static_assert(sizeof(u8) == 1 || sizeof(i8) == 1 || sizeof(u16) == 2 ||
sizeof(i16) == 1 ||... | main | par2cmdline-0.8.1 | app-arch | O0/app-arch/par2cmdline-0.8.1/par2 | ida | O0 |
Result par1repair(std_ostream *sout, std_ostream *serr,
const NoiseLevel noiselevel, const size_t memorylimit,
const u32 nthreads, const std_string *parfilename,
const std_vector<std_string> *extrafiles, const bool dorepair,
const bool purgefiles) ... | Result par1repair(std::ostream &sout, std::ostream &serr,
const NoiseLevel noiselevel, const size_t memorylimit,
#ifdef _OPENMP
const u32 nthreads,
#endif
const string &parfilename, const vector<string> &extrafiles,
const bool dorepair, const boo... | par1repair | par2cmdline-0.8.1 | app-arch | O0/app-arch/par2cmdline-0.8.1/par2 | ida | O0 |
Result par2create(std_ostream *sout, std_ostream *serr,
const NoiseLevel noiselevel, const size_t memorylimit,
const std_string *basepath, const u32 nthreads,
const u32 filethreads, const std_string *parfilename,
const std_vector<std_string> *extra... | Result par2create(std::ostream &sout, std::ostream &serr,
const NoiseLevel noiselevel, const size_t memorylimit,
const string &basepath,
#ifdef _OPENMP
const u32 nthreads, const u32 filethreads,
#endif
const string &parfilename, const vector<string... | par2create | par2cmdline-0.8.1 | app-arch | O0/app-arch/par2cmdline-0.8.1/par2 | ida | O0 |
Result par2repair(std_ostream *sout, std_ostream *serr,
const NoiseLevel noiselevel, const size_t memorylimit,
const std_string *basepath, const u32 nthreads,
const u32 filethreads, const std_string *parfilename,
const std_vector<std_string> *extra... | Result par2repair(std::ostream &sout, std::ostream &serr,
const NoiseLevel noiselevel, const size_t memorylimit,
const string &basepath,
#ifdef _OPENMP
const u32 nthreads, const u32 filethreads,
#endif
const string &parfilename, const vector<string... | par2repair | par2cmdline-0.8.1 | app-arch | O0/app-arch/par2cmdline-0.8.1/par2 | ida | O0 |
int Dual_Socket() {
char str_file[104];
unsigned long v1;
v1 = __readfsqword(0x28u);
if (prog_options.logging) {
snprintf(str_file, 0x64u, CPU_FREQUENCY_LOGGING_FILE_dual, 0);
fp_log_file = fopen64(str_file, "w");
fclose(fp_log_file);
snprintf(str_file, 0x64u, CPU_FREQUENCY_LOGGING_FILE_dual, 1... | int Dual_Socket() {
if (prog_options.logging != 0) {
char str_file[100];
snprintf(str_file, 100, CPU_FREQUENCY_LOGGING_FILE_dual, 0);
fp_log_file = fopen(str_file, "w");
fclose(fp_log_file);
snprintf(str_file, 100, CPU_FREQUENCY_LOGGING_FILE_dual, 1);
fp_log_file = fopen(str_file, "w");
... | Dual_Socket | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
int Get_Bits_Value(unsigned long val, int highbit, int lowbit) {
int bits;
unsigned long data;
LODWORD(data) = val;
bits = highbit - lowbit + 1;
if (bits <= 63)
return ~(-1LL << bits) & (val >> lowbit);
return data;
} | int Get_Bits_Value(unsigned long val, int highbit, int lowbit) {
unsigned long data = val;
int bits = highbit - lowbit + 1;
if (bits < 64) {
data >>= lowbit;
data &= (1ULL << bits) - 1;
}
return (data);
} | Get_Bits_Value | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
void Print_Information_Processor(bool *nehalem, bool *sandy_bridge,
bool *ivy_bridge, bool *haswell) {
family_info proc_info;
char vendor_string[13];
unsigned long v8;
v8 = __readfsqword(0x28u);
memset(vendor_string, 0, sizeof(vendor_string));
get_vendor(vendor_string);
v... | void Print_Information_Processor(bool *nehalem, bool *sandy_bridge,
bool *ivy_bridge, bool *haswell) {
struct family_info proc_info;
char vendor_string[13];
memset(vendor_string, 0, 13);
get_vendor(vendor_string);
vendor_string[12] = '\0';
if (strcmp(vendor_string, "Genui... | Print_Information_Processor | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
void Print_Version_Information() {
printf("i7z DEBUG: i7z version: %s\n", "svn-r93-(27-MAY-2013)");
} | void Print_Version_Information() {
printf("i7z DEBUG: i7z version: %s\n", i7z_VERSION_INFO);
} | Print_Version_Information | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
int Read_Thermal_Status_CPU(int cpu_num) {
bool thermal_status;
int error_indx;
int digital_readout;
int PROCHOT_temp;
unsigned long val;
unsigned long v7;
v7 = __readfsqword(0x28u);
val = get_msr_value(cpu_num, 0x19Cu, 0x3Fu, 0, &error_indx);
digital_readout = Get_Bits_Value(val, 23, 16);
thermal_... | int Read_Thermal_Status_CPU(int cpu_num) {
int error_indx;
unsigned long val =
get_msr_value(cpu_num, IA32_THERM_STATUS, 63, 0, &error_indx);
int digital_readout = Get_Bits_Value(val, 23, 16);
bool thermal_status = Get_Bits_Value(val, 32, 31);
val = get_msr_value(cpu_num, IA32_TEMPERATURE_TARGET, 63, 0... | Read_Thermal_Status_CPU | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
float Read_Voltage_CPU(int cpu_num) {
uint64_t msr_value;
float v2;
int error_indx;
unsigned long val;
unsigned long v6;
v6 = __readfsqword(0x28u);
msr_value = get_msr_value(cpu_num, 0x198u, 0x2Fu, 0x20u, &error_indx);
val = msr_value;
if ((msr_value & 0x8000000000000000LL) != 0LL)
v2 = (float)(i... | float Read_Voltage_CPU(int cpu_num) {
int error_indx;
unsigned long val =
get_msr_value(cpu_num, MSR_PERF_STATUS, 47, 32, &error_indx);
return (float)val / (float)(1 << 13);
} | Read_Voltage_CPU | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
int Single_Socket() {
if (prog_options.logging) {
fp_log_file_freq = fopen64(CPU_FREQUENCY_LOGGING_FILE_single, "w");
fclose(fp_log_file_freq);
}
printf("i7z DEBUG: In i7z Single_Socket()\n\r");
if (prog_options.i7_version.sandy_bridge) {
printf("i7z DEBUG: guessing Sandy Bridge\n\r");
} else if (... | int Single_Socket() {
if (prog_options.logging != 0) {
fp_log_file_freq = fopen(CPU_FREQUENCY_LOGGING_FILE_single, "w");
fclose(fp_log_file_freq);
}
printf("i7z DEBUG: In i7z Single_Socket()\n\r");
if (prog_options.i7_version.sandy_bridge)
printf("i7z DEBUG: guessing Sandy Bridge\n\r");
else if... | Single_Socket | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
void Test_Or_Make_MSR_DEVICE_FILES() {
if (access("/dev/cpu/0/msr", 0)) {
puts("i7z DEBUG: msr device files DO NOT exist, trying out a makedev "
"script");
if (geteuid()) {
puts("i7z DEBUG: You DO NOT have root privileges, mknod to create device "
"entries won't work out");
put... | void Test_Or_Make_MSR_DEVICE_FILES() {
if (access("/dev/cpu/0/msr", F_OK) == 0) {
printf("i7z DEBUG: msr device files exist /dev/cpu/*/msr\n");
if (access("/dev/cpu/0/msr", W_OK) == 0) {
printf("i7z DEBUG: You have write permissions to msr device files\n");
} else {
printf(
"i7z DE... | Test_Or_Make_MSR_DEVICE_FILES | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
void atexit_runsttysane() {
puts("Quitting i7z");
system("stty sane");
} | void atexit_runsttysane() {
printf("Quitting i7z\n");
system("stty sane");
} | atexit_runsttysane | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
int check_and_return_core_id(char *strinfo) {
const char *t1;
if (!strstr(strinfo, "core id"))
return -1;
strtok(strinfo, ":");
t1 = strtok(0, " ");
return atoi(t1);
} | int check_and_return_core_id(char *strinfo) {
char *t1;
if (strstr(strinfo, "core id") != NULL) {
strtok(strinfo, ":");
t1 = strtok(NULL, " ");
return (atoi(t1));
} else {
return (-1);
}
} | check_and_return_core_id | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
int check_and_return_physical_id(char *strinfo) {
const char *t1;
if (!strstr(strinfo, "physical id"))
return -1;
strtok(strinfo, ":");
t1 = strtok(0, " ");
return atoi(t1);
} | int check_and_return_physical_id(char *strinfo) {
char *t1;
if (strstr(strinfo, "physical id") != NULL) {
strtok(strinfo, ":");
t1 = strtok(NULL, " ");
return (atoi(t1));
} else {
return (-1);
}
} | check_and_return_physical_id | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
int check_and_return_processor(char *strinfo) {
const char *t1;
if (!strstr(strinfo, "processor"))
return -1;
strtok(strinfo, ":");
t1 = strtok(0, " ");
return atoi(t1);
} | int check_and_return_processor(char *strinfo) {
char *t1;
if (strstr(strinfo, "processor") != NULL) {
strtok(strinfo, ":");
t1 = strtok(NULL, " ");
return (atoi(t1));
} else {
return (-1);
}
} | check_and_return_processor | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
void construct_CPU_Heirarchy_info(cpu_heirarchy_info *chi) {
int processor_num;
int it_processor_num;
int it_physicalid_num;
int it_coreid_num;
int old_processor_num;
int tmp_processor_num;
int tmp_physicalid_num;
int tmp_coreid_num;
FILE *fp;
char strinfo[200];
unsigned long v11;
v11 = __readf... | void construct_CPU_Heirarchy_info(struct cpu_heirarchy_info *chi) {
FILE *fp = fopen("/proc/cpuinfo", "r");
char strinfo[200];
int processor_num, physicalid_num, coreid_num;
int it_processor_num = -1, it_physicalid_num = -1, it_coreid_num = -1;
int tmp_processor_num, tmp_physicalid_num, tmp_coreid_num;
int... | construct_CPU_Heirarchy_info | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
void construct_sibling_list(cpu_heirarchy_info *chi) {
int i;
int ia;
int ib;
int j;
int core_id;
int socket_id;
for (i = 0; i < chi->max_online_cpu; ++i) {
if (i > 127)
__assert_fail("i < MAX_HI_PROCESSORS", "helper_functions.c", 0x253u,
"construct_sibling_list");
chi->... | void construct_sibling_list(struct cpu_heirarchy_info *chi) {
int i, j, core_id, socket_id;
for (i = 0; i < chi->max_online_cpu; i++) {
assert(i < MAX_HI_PROCESSORS);
chi->sibling_num[i] = -1;
}
chi->HT = false;
for (i = 0; i < chi->max_online_cpu; i++) {
assert(i < MAX_HI_PROCESSORS);
core_i... | construct_sibling_list | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
void construct_socket_information(cpu_heirarchy_info *chi,
cpu_socket_info *socket_0,
cpu_socket_info *socket_1, int socket_0_num,
int socket_1_num) {
int i;
socket_0->max_cpu = 0;
socket_0->num_physical_cores =... | void construct_socket_information(struct cpu_heirarchy_info *chi,
struct cpu_socket_info *socket_0,
struct cpu_socket_info *socket_1,
int socket_0_num, int socket_1_num) {
int i;
socket_0->max_cpu = 0;
socket_0-... | construct_socket_information | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
double cpufreq_info() {
FILE *tmp_file;
char tmp_str[40];
unsigned long v3;
v3 = __readfsqword(0x28u);
tmp_file =
popen("sed -n '/MHz/ { s/cpu\\sMHz\\s*:\\s//p; q }' /proc/cpuinfo", "r");
fgets(tmp_str, 30, tmp_file);
pclose(tmp_file);
return atof(tmp_str);
} | double cpufreq_info() {
system("cat /proc/cpuinfo |grep MHz|sed 's/cpu\\sMHz\\s*:\\s//'|tail -n 1 > "
"/tmp/cpufreq.txt");
FILE *tmp_file;
tmp_file = fopen("/tmp/cpufreq.txt", "r");
char tmp_str[30];
fgets(tmp_str, 30, tmp_file);
fclose(tmp_file);
return atof(tmp_str);
} | cpufreq_info | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
void cpuid(unsigned int info, unsigned int *eax_0, unsigned int *ebx_0,
unsigned int *ecx_0, unsigned int *edx_0) {
_RAX = info;
__asm { cpuid }
if (eax_0) *eax_0 = _RAX;
if (ebx_0)
*ebx_0 = _RBX;
if (ecx_0)
*ecx_0 = _RCX;
if (edx_0)
*edx_0 = _RDX;
} | static inline void cpuid(unsigned int info, unsigned int *eax,
unsigned int *ebx, unsigned int *ecx,
unsigned int *edx) {
unsigned int _eax = info, _ebx, _ecx, _edx;
asm volatile("mov %%ebx, %%edi;"
"cpuid;"
"mov %%ebx, %%esi;"
... | cpuid | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
double estimate_MHz() {
unsigned long v0;
unsigned long elapsed;
unsigned long microseconds;
timezone tz;
timeval tvstart;
timeval tvstop;
unsigned long cycles[3];
unsigned long v8;
v8 = __readfsqword(0x28u);
memset(&tz, 0, sizeof(tz));
gettimeofday(&tvstart, &tz);
cycles[0] = rdtsc();
gettim... | double estimate_MHz() {
struct timezone tz;
struct timeval tvstart, tvstop;
unsigned long long int cycles[2];
unsigned long long int microseconds;
memset(&tz, 0, sizeof(tz));
gettimeofday(&tvstart, &tz);
cycles[0] = rdtsc();
gettimeofday(&tvstart, &tz);
usleep(10000);
cycles[1] = rdtsc();
get... | estimate_MHz | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
bool file_exists(char *filename) { return access(filename, 0) == 0; } | bool file_exists(char *filename) {
if (access(filename, F_OK) == 0) {
return true;
} else {
return false;
}
} | file_exists | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
void get_familyinformation(family_info *proc_info) {
unsigned int b;
unsigned long v2;
v2 = __readfsqword(0x28u);
cpuid(1u, &b, 0, 0, 0);
proc_info->stepping = b & 0xF;
proc_info->model = (b >> 4) & 0xF;
proc_info->family = BYTE1(b) & 0xF;
proc_info->processor_type = (b >> 12) & 7;
proc_info->extende... | static inline void get_familyinformation(struct family_info *proc_info) {
unsigned int b;
cpuid(1, &b, NULL, NULL, NULL);
proc_info->stepping = b & 0x0000000F;
proc_info->model = (b & 0x000000F0) >> 4;
proc_info->family = (b & 0x00000F00) >> 8;
proc_info->processor_type = (b & 0x00007000) >> 12;
proc_in... | get_familyinformation | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
uint64_t get_msr_value(int cpu, uint32_t reg, unsigned int highbit,
unsigned int lowbit, int *error_indx) {
int fd;
int bits;
uint64_t data;
char msr_file_name[72];
unsigned long v13;
v13 = __readfsqword(0x28u);
*error_indx = 0;
sprintf(msr_file_name, "/dev/cpu/%d/msr", cpu);
f... | uint64_t get_msr_value(int cpu, uint32_t reg, unsigned int highbit,
unsigned int lowbit, int *error_indx) {
uint64_t data;
int fd;
char msr_file_name[64];
int bits;
*error_indx = 0;
sprintf(msr_file_name, "/dev/cpu/%d/msr", cpu);
fd = open(msr_file_name, O_RDONLY);
if (fd < 0) {... | get_msr_value | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
void get_vendor(char *vendor_string) {
unsigned int a;
unsigned int b;
unsigned int c;
unsigned int d;
unsigned long v5;
v5 = __readfsqword(0x28u);
cpuid(0, &a, &b, &c, &d);
*(_DWORD *)vendor_string = b;
*((_DWORD *)vendor_string + 1) = d;
*((_DWORD *)vendor_string + 2) = c;
vendor_string[12] = 0... | static inline void get_vendor(char *vendor_string) {
unsigned int a, b, c, d;
cpuid(0, &a, &b, &c, &d);
memcpy(vendor_string, &b, 4);
memcpy(&vendor_string[4], &d, 4);
memcpy(&vendor_string[8], &c, 4);
vendor_string[12] = '\0';
} | get_vendor | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
int in_core_list(int ii, int *core_list) {
int i;
int in;
in = 0;
for (i = 0; i <= 7; ++i) {
if (ii == core_list[i])
return 1;
}
return in;
} | int in_core_list(int ii, int *core_list) {
int i;
int in = 0;
for (i = 0; i < 8; i++) {
if (ii == core_list[i]) {
in = 1;
break;
}
}
return (in);
} | in_core_list | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
void init_ncurses() {
initscr();
cbreak();
noecho();
nodelay(stdscr, 1);
start_color();
use_default_colors();
init_pair(1, 2, -1);
init_pair(2, 3, -1);
init_pair(3, 1, -1);
init_pair(4, 7, -1);
} | void init_ncurses() {
initscr();
cbreak();
noecho();
nodelay(stdscr, TRUE);
start_color();
use_default_colors();
init_pair(1, COLOR_GREEN, -1);
init_pair(2, COLOR_YELLOW, -1);
init_pair(3, COLOR_RED, -1);
init_pair(4, COLOR_WHITE, -1);
} | init_ncurses | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
void logCloseFile_dual(int socket_num) {
if (!socket_num && prog_options.logging) {
if (prog_options.logging == 2)
fputc(10, fp_log_file_freq_1);
fclose(fp_log_file_freq_1);
}
if (socket_num == 1 && prog_options.logging) {
if (prog_options.logging == 2)
fputc(10, fp_log_file_freq_2);
f... | void logCloseFile_dual(int socket_num) {
if (socket_num == 0) {
if (prog_options.logging != 0) {
if (prog_options.logging == 2)
fprintf(fp_log_file_freq_1, "\n");
fclose(fp_log_file_freq_1);
}
}
if (socket_num == 1) {
if (prog_options.logging != 0) {
if (prog_options.logging... | logCloseFile_dual | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
void logCloseFile_single() {
if (prog_options.logging) {
if (prog_options.logging == 2)
fputc(10, fp_log_file_freq);
fclose(fp_log_file_freq);
fputc(10, fp_log_file_Cstates);
fclose(fp_log_file_Cstates);
}
} | void logCloseFile_single() {
if (prog_options.logging != 0) {
if (prog_options.logging == 2)
fprintf(fp_log_file_freq, "\n");
fclose(fp_log_file_freq);
fprintf(fp_log_file_Cstates, "\n");
fclose(fp_log_file_Cstates);
}
} | logCloseFile_single | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
void logCpuCstates_dual(float value, int socket_num) {
if (!socket_num && prog_options.logging)
fprintf(fp_log_file_Cstates_1, "%f", value);
if (socket_num == 1) {
if (prog_options.logging)
fprintf(fp_log_file_Cstates_2, "%f", value);
}
} | void logCpuCstates_dual(float value, int socket_num) {
if (socket_num == 0) {
if (prog_options.logging != 0)
fprintf(fp_log_file_Cstates_1, "%f", value);
}
if (socket_num == 1) {
if (prog_options.logging != 0)
fprintf(fp_log_file_Cstates_2, "%f", value);
}
} | logCpuCstates_dual | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
void logCpuCstates_dual_c(char *value, int socket_num) {
if (!socket_num && prog_options.logging)
fputs(value, fp_log_file_Cstates_1);
if (socket_num == 1) {
if (prog_options.logging)
fputs(value, fp_log_file_Cstates_2);
}
} | void logCpuCstates_dual_c(char *value, int socket_num) {
if (socket_num == 0) {
if (prog_options.logging != 0)
fprintf(fp_log_file_Cstates_1, "%s", value);
}
if (socket_num == 1) {
if (prog_options.logging != 0)
fprintf(fp_log_file_Cstates_2, "%s", value);
}
} | logCpuCstates_dual_c | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
void logCpuCstates_dual_d(int value, int socket_num) {
if (!socket_num && prog_options.logging)
fprintf(fp_log_file_Cstates_1, "%d", value);
if (socket_num == 1) {
if (prog_options.logging)
fprintf(fp_log_file_Cstates_2, "%d", value);
}
} | void logCpuCstates_dual_d(int value, int socket_num) {
if (socket_num == 0) {
if (prog_options.logging != 0)
fprintf(fp_log_file_Cstates_1, "%d", value);
}
if (socket_num == 1) {
if (prog_options.logging != 0)
fprintf(fp_log_file_Cstates_2, "%d", value);
}
} | logCpuCstates_dual_d | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
void logCpuCstates_dual_ts(timespec *value, int socket_num) {
if (!socket_num && prog_options.logging)
fprintf(fp_log_file_Cstates_1, "%d.%.9d", value->tv_sec, value->tv_nsec);
if (socket_num == 1) {
if (prog_options.logging)
fprintf(fp_log_file_Cstates_2, "%d.%.9d", value->tv_sec, value->tv_nsec);
... | void logCpuCstates_dual_ts(struct timespec *value, int socket_num) {
if (socket_num == 0) {
if (prog_options.logging != 0)
fprintf(fp_log_file_Cstates_1, "%d.%.9d", value->tv_sec, value->tv_nsec);
}
if (socket_num == 1) {
if (prog_options.logging != 0)
fprintf(fp_log_file_Cstates_2, "%d.%.9d... | logCpuCstates_dual_ts | i7z-93_p20131012-r2 | app-benchmarks | O0/app-benchmarks/i7z-93_p20131012-r2/i7z | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.