id int32 0 27.3k | func stringlengths 26 142k | target bool 2
classes | project stringclasses 2
values | commit_id stringlengths 40 40 | func_clean stringlengths 26 131k | vul_lines dict | normalized_func stringlengths 24 132k | lines listlengths 1 2.8k | label listlengths 1 2.8k | line_no listlengths 1 2.8k |
|---|---|---|---|---|---|---|---|---|---|---|
3,672 | static int ogg_restore(AVFormatContext *s, int discard)
{
struct ogg *ogg = s->priv_data;
AVIOContext *bc = s->pb;
struct ogg_state *ost = ogg->state;
int i;
if (!ost)
return 0;
ogg->state = ost->next;
if (!discard){
for (i = 0; i < ogg->nstreams; i++)
... | true | FFmpeg | bc851a2946c64eefb96145b70e2190ff7d5a4827 | static int ogg_restore(AVFormatContext *s, int discard)
{
struct ogg *ogg = s->priv_data;
AVIOContext *bc = s->pb;
struct ogg_state *ost = ogg->state;
int i;
if (!ost)
return 0;
ogg->state = ost->next;
if (!discard){
for (i = 0; i < ogg->nstreams; i++)
... | {
"code": [
" memcpy(ogg->streams, ost->streams,",
" ost->nstreams * sizeof(*ogg->streams));"
],
"line_no": [
39,
41
]
} | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1)
{
struct VAR_2 *VAR_2 = VAR_0->priv_data;
AVIOContext *bc = VAR_0->pb;
struct ogg_state *VAR_3 = VAR_2->state;
int VAR_4;
if (!VAR_3)
return 0;
VAR_2->state = VAR_3->next;
if (!VAR_1){
for (VAR_4 = 0; VAR_4 ... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1)\n{",
"struct VAR_2 *VAR_2 = VAR_0->priv_data;",
"AVIOContext *bc = VAR_0->pb;",
"struct ogg_state *VAR_3 = VAR_2->state;",
"int VAR_4;",
"if (!VAR_3)\nreturn 0;",
"VAR_2->state = VAR_3->next;",
"if (!VAR_1){",
"for (VAR_4 = 0; VAR_4 < VAR_2->nstr... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
21
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
47
],
[
51
],
[
53
]
] |
3,673 | rdt_free_context (PayloadContext *rdt)
{
int i;
for (i = 0; i < MAX_STREAMS; i++)
if (rdt->rmst[i]) {
ff_rm_free_rmstream(rdt->rmst[i]);
av_freep(&rdt->rmst[i]);
}
if (rdt->rmctx)
av_close_input_stream(rdt->rmctx);
av_freep(&rdt->mlti_data);
... | false | FFmpeg | dfdb353cd565efbd1f64105ce7519ec809ad338d | rdt_free_context (PayloadContext *rdt)
{
int i;
for (i = 0; i < MAX_STREAMS; i++)
if (rdt->rmst[i]) {
ff_rm_free_rmstream(rdt->rmst[i]);
av_freep(&rdt->rmst[i]);
}
if (rdt->rmctx)
av_close_input_stream(rdt->rmctx);
av_freep(&rdt->mlti_data);
... | {
"code": [],
"line_no": []
} | FUNC_0 (PayloadContext *VAR_0)
{
int VAR_1;
for (VAR_1 = 0; VAR_1 < MAX_STREAMS; VAR_1++)
if (VAR_0->rmst[VAR_1]) {
ff_rm_free_rmstream(VAR_0->rmst[VAR_1]);
av_freep(&VAR_0->rmst[VAR_1]);
}
if (VAR_0->rmctx)
av_close_input_stream(VAR_0->rmctx);
... | [
"FUNC_0 (PayloadContext *VAR_0)\n{",
"int VAR_1;",
"for (VAR_1 = 0; VAR_1 < MAX_STREAMS; VAR_1++)",
"if (VAR_0->rmst[VAR_1]) {",
"ff_rm_free_rmstream(VAR_0->rmst[VAR_1]);",
"av_freep(&VAR_0->rmst[VAR_1]);",
"}",
"if (VAR_0->rmctx)\nav_close_input_stream(VAR_0->rmctx);",
"av_freep(&VAR_0->mlti_data);... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
]
] |
3,674 | static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
long width, long height,
long lumStride, long chromStride, long dstStride, long vertLumPerChroma)
{
long y;
const long chromWidth= width>>1;
for(y=0; y<height; y++)
{
#ifdef HAVE_MMX
//... | true | FFmpeg | 6e42e6c4b410dbef8b593c2d796a5dad95f89ee4 | static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
long width, long height,
long lumStride, long chromStride, long dstStride, long vertLumPerChroma)
{
long y;
const long chromWidth= width>>1;
for(y=0; y<height; y++)
{
#ifdef HAVE_MMX
... | {
"code": [
"\tlong width, long height,",
"\tlong width, long height,",
"\tlong width, long height,",
"\tlong width, long height,",
"\tlong width, long height,",
"\tlong width, long height,",
"\tlong width, long height,",
"\tlong width, long height,",
"\tlong width, long height,",
... | static inline void FUNC_0(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
long width, long height,
long lumStride, long chromStride, long dstStride, long vertLumPerChroma)
{
long VAR_0;
const long VAR_1= width>>1;
for(VAR_0=0; VAR_0<height; VAR_0++)
{
#ifdef H... | [
"static inline void FUNC_0(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,\nlong width, long height,\nlong lumStride, long chromStride, long dstStride, long vertLumPerChroma)\n{",
"long VAR_0;",
"const long VAR_1= width>>1;",
"for(VAR_0=0; VAR_0<height; VAR_0++)",... | [
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
0,
1,
0,
1,
1,
1,
1... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17,
21,
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
47,
49,
51,
53,
55,
57,
59,
61,
65,
67,
69,
71,
75,
77,... |
3,675 | void visit_start_struct(Visitor *v, void **obj, const char *kind,
const char *name, size_t size, Error **errp)
{
if (!error_is_set(errp)) {
v->start_struct(v, obj, kind, name, size, errp);
}
}
| true | qemu | 297a3646c2947ee64a6d42ca264039732c6218e0 | void visit_start_struct(Visitor *v, void **obj, const char *kind,
const char *name, size_t size, Error **errp)
{
if (!error_is_set(errp)) {
v->start_struct(v, obj, kind, name, size, errp);
}
}
| {
"code": [
" if (!error_is_set(errp)) {",
" v->start_struct(v, obj, kind, name, size, errp);",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!... | void FUNC_0(Visitor *VAR_0, void **VAR_1, const char *VAR_2,
const char *VAR_3, size_t VAR_4, Error **VAR_5)
{
if (!error_is_set(VAR_5)) {
VAR_0->start_struct(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5);
}
}
| [
"void FUNC_0(Visitor *VAR_0, void **VAR_1, const char *VAR_2,\nconst char *VAR_3, size_t VAR_4, Error **VAR_5)\n{",
"if (!error_is_set(VAR_5)) {",
"VAR_0->start_struct(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5);",
"}",
"}"
] | [
0,
1,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
3,676 | static int encode_nals(AVCodecContext *ctx, uint8_t *buf, int size,
x264_nal_t *nals, int nnal, int skip_sei)
{
X264Context *x4 = ctx->priv_data;
uint8_t *p = buf;
int i;
/* Write the SEI as part of the first frame. */
if (x4->sei_size > 0 && nnal > 0) {
if (... | true | FFmpeg | e2dae1faa84ada5746ac2114de7eb68abd824131 | static int encode_nals(AVCodecContext *ctx, uint8_t *buf, int size,
x264_nal_t *nals, int nnal, int skip_sei)
{
X264Context *x4 = ctx->priv_data;
uint8_t *p = buf;
int i;
if (x4->sei_size > 0 && nnal > 0) {
if (x4->sei_size > size) {
return -1;... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, uint8_t *VAR_1, int VAR_2,
x264_nal_t *VAR_3, int VAR_4, int VAR_5)
{
X264Context *x4 = VAR_0->priv_data;
uint8_t *p = VAR_1;
int VAR_6;
if (x4->sei_size > 0 && VAR_4 > 0) {
if (x4->sei_size > VAR_2) {
r... | [
"static int FUNC_0(AVCodecContext *VAR_0, uint8_t *VAR_1, int VAR_2,\nx264_nal_t *VAR_3, int VAR_4, int VAR_5)\n{",
"X264Context *x4 = VAR_0->priv_data;",
"uint8_t *p = VAR_1;",
"int VAR_6;",
"if (x4->sei_size > 0 && VAR_4 > 0) {",
"if (x4->sei_size > VAR_2) {",
"return -1;",
"memcpy(p, x4->sei, x4->s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
22
],
[
25
],
[
27
],
[
29
],
[
36
],
[
40
],
[
42
],
[
44
],
[
46
],
[
48
],
[
56
],
[
58
],
[
63
]
] |
3,677 | static int copy_stream_props(AVStream *st, AVStream *source_st)
{
int ret;
if (st->codecpar->codec_id || !source_st->codecpar->codec_id) {
if (st->codecpar->extradata_size < source_st->codecpar->extradata_size) {
if (st->codecpar->extradata) {
av_freep(&st->codecpar->... | false | FFmpeg | e45f7bca735ff7ba965ec1e441199dc7aeb0c8fc | static int copy_stream_props(AVStream *st, AVStream *source_st)
{
int ret;
if (st->codecpar->codec_id || !source_st->codecpar->codec_id) {
if (st->codecpar->extradata_size < source_st->codecpar->extradata_size) {
if (st->codecpar->extradata) {
av_freep(&st->codecpar->... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVStream *VAR_0, AVStream *VAR_1)
{
int VAR_2;
if (VAR_0->codecpar->codec_id || !VAR_1->codecpar->codec_id) {
if (VAR_0->codecpar->extradata_size < VAR_1->codecpar->extradata_size) {
if (VAR_0->codecpar->extradata) {
av_freep(&VAR_0->codecpar->extrad... | [
"static int FUNC_0(AVStream *VAR_0, AVStream *VAR_1)\n{",
"int VAR_2;",
"if (VAR_0->codecpar->codec_id || !VAR_1->codecpar->codec_id) {",
"if (VAR_0->codecpar->extradata_size < VAR_1->codecpar->extradata_size) {",
"if (VAR_0->codecpar->extradata) {",
"av_freep(&VAR_0->codecpar->extradata);",
"VAR_0->cod... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25,
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47... |
3,679 | aio_ctx_finalize(GSource *source)
{
AioContext *ctx = (AioContext *) source;
thread_pool_free(ctx->thread_pool);
aio_set_event_notifier(ctx, &ctx->notifier, NULL);
event_notifier_cleanup(&ctx->notifier);
rfifolock_destroy(&ctx->lock);
qemu_mutex_destroy(&ctx->bh_lock);
timerlistgroup_dei... | true | qemu | a076972a4d36381d610a854f0c336507650a1d34 | aio_ctx_finalize(GSource *source)
{
AioContext *ctx = (AioContext *) source;
thread_pool_free(ctx->thread_pool);
aio_set_event_notifier(ctx, &ctx->notifier, NULL);
event_notifier_cleanup(&ctx->notifier);
rfifolock_destroy(&ctx->lock);
qemu_mutex_destroy(&ctx->bh_lock);
timerlistgroup_dei... | {
"code": [],
"line_no": []
} | FUNC_0(GSource *VAR_0)
{
AioContext *ctx = (AioContext *) VAR_0;
thread_pool_free(ctx->thread_pool);
aio_set_event_notifier(ctx, &ctx->notifier, NULL);
event_notifier_cleanup(&ctx->notifier);
rfifolock_destroy(&ctx->lock);
qemu_mutex_destroy(&ctx->bh_lock);
timerlistgroup_deinit(&ctx->tl... | [
"FUNC_0(GSource *VAR_0)\n{",
"AioContext *ctx = (AioContext *) VAR_0;",
"thread_pool_free(ctx->thread_pool);",
"aio_set_event_notifier(ctx, &ctx->notifier, NULL);",
"event_notifier_cleanup(&ctx->notifier);",
"rfifolock_destroy(&ctx->lock);",
"qemu_mutex_destroy(&ctx->bh_lock);",
"timerlistgroup_de... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
]
] |
3,680 | void gen_intermediate_code_internal(LM32CPU *cpu,
TranslationBlock *tb, bool search_pc)
{
CPUState *cs = CPU(cpu);
CPULM32State *env = &cpu->env;
struct DisasContext ctx, *dc = &ctx;
uint16_t *gen_opc_end;
uint32_t pc_start;
int j, lj;
uint32_t ne... | true | qemu | 3604a76fea6ff37738d4a8f596be38407be74a83 | void gen_intermediate_code_internal(LM32CPU *cpu,
TranslationBlock *tb, bool search_pc)
{
CPUState *cs = CPU(cpu);
CPULM32State *env = &cpu->env;
struct DisasContext ctx, *dc = &ctx;
uint16_t *gen_opc_end;
uint32_t pc_start;
int j, lj;
uint32_t ne... | {
"code": [
" } else {",
" dc->nr_nops = 0;",
" cpu_abort(env, \"LM32: unaligned PC=%x\\n\", pc_start);"
],
"line_no": [
161,
45,
51
]
} | void FUNC_0(LM32CPU *VAR_0,
TranslationBlock *VAR_1, bool VAR_2)
{
CPUState *cs = CPU(VAR_0);
CPULM32State *env = &VAR_0->env;
struct DisasContext VAR_3, *VAR_4 = &VAR_3;
uint16_t *gen_opc_end;
uint32_t pc_start;
int VAR_5, VAR_6;
uint32_t next_pa... | [
"void FUNC_0(LM32CPU *VAR_0,\nTranslationBlock *VAR_1, bool VAR_2)\n{",
"CPUState *cs = CPU(VAR_0);",
"CPULM32State *env = &VAR_0->env;",
"struct DisasContext VAR_3, *VAR_4 = &VAR_3;",
"uint16_t *gen_opc_end;",
"uint32_t pc_start;",
"int VAR_5, VAR_6;",
"uint32_t next_page_start;",
"int VAR_7;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[... |
3,682 | static int parse_keyframes_index(AVFormatContext *s, AVIOContext *ioc, AVStream *vstream, int64_t max_pos) {
unsigned int arraylen = 0, timeslen = 0, fileposlen = 0, i;
double num_val;
char str_val[256];
int64_t *times = NULL;
int64_t *filepositions = NULL;
int ret = AVERROR(ENOSYS);
... | true | FFmpeg | 2b4e49d4281690db67073ba644ad2ffc17767cdf | static int parse_keyframes_index(AVFormatContext *s, AVIOContext *ioc, AVStream *vstream, int64_t max_pos) {
unsigned int arraylen = 0, timeslen = 0, fileposlen = 0, i;
double num_val;
char str_val[256];
int64_t *times = NULL;
int64_t *filepositions = NULL;
int ret = AVERROR(ENOSYS);
... | {
"code": [
" if (timeslen == fileposlen)",
" for(i = 0; i < arraylen; i++)"
],
"line_no": [
129,
131
]
} | static int FUNC_0(AVFormatContext *VAR_0, AVIOContext *VAR_1, AVStream *VAR_2, int64_t VAR_3) {
unsigned int VAR_4 = 0, VAR_5 = 0, VAR_6 = 0, VAR_7;
double VAR_8;
char VAR_9[256];
int64_t *times = NULL;
int64_t *filepositions = NULL;
int VAR_10 = AVERROR(ENOSYS);
int64_t initial_pos =... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVIOContext *VAR_1, AVStream *VAR_2, int64_t VAR_3) {",
"unsigned int VAR_4 = 0, VAR_5 = 0, VAR_6 = 0, VAR_7;",
"double VAR_8;",
"char VAR_9[256];",
"int64_t *times = NULL;",
"int64_t *filepositions = NULL;",
"int VAR_10 = AVERROR(ENOSYS);",
"int64_t initial_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17,
19
],
[
23
],
[
37
],
[
39
],
[
43
],
[
45
],
[
51,
53
],
[
57
],
[
67
],
[
69
],
[
71
],
[... |
3,683 | static void via_ide_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
k->init = vt82c686b_ide_initfn;
k->exit = vt82c686b_ide_exitfn;
k->vendor_id = PCI_VENDOR_ID_VIA;
k->device_id = PCI_DEVICE_ID_VIA_IDE;
... | true | qemu | efec3dd631d94160288392721a5f9c39e50fb2bc | static void via_ide_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
k->init = vt82c686b_ide_initfn;
k->exit = vt82c686b_ide_exitfn;
k->vendor_id = PCI_VENDOR_ID_VIA;
k->device_id = PCI_DEVICE_ID_VIA_IDE;
... | {
"code": [
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;"... | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
PCIDeviceClass *k = PCI_DEVICE_CLASS(VAR_0);
k->init = vt82c686b_ide_initfn;
k->exit = vt82c686b_ide_exitfn;
k->vendor_id = PCI_VENDOR_ID_VIA;
k->device_id = PCI_DEVICE_ID_VIA_IDE;
k->revis... | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"PCIDeviceClass *k = PCI_DEVICE_CLASS(VAR_0);",
"k->init = vt82c686b_ide_initfn;",
"k->exit = vt82c686b_ide_exitfn;",
"k->vendor_id = PCI_VENDOR_ID_VIA;",
"k->device_id = PCI_DEVICE_ID_VIA_IDE;",
"k->re... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
3,684 | static void vc1_extract_headers(AVCodecParserContext *s, AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
VC1ParseContext *vpc = s->priv_data;
GetBitContext gb;
const uint8_t *start, *end, *next;
uint8_t *buf2 = av_mallocz(buf_size + FF_INPUT_BUFFER_PADDIN... | false | FFmpeg | 7eda2e524b8e2b645e0c62ccbe819594c03824cd | static void vc1_extract_headers(AVCodecParserContext *s, AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
VC1ParseContext *vpc = s->priv_data;
GetBitContext gb;
const uint8_t *start, *end, *next;
uint8_t *buf2 = av_mallocz(buf_size + FF_INPUT_BUFFER_PADDIN... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVCodecParserContext *VAR_0, AVCodecContext *VAR_1,
const uint8_t *VAR_2, int VAR_3)
{
VC1ParseContext *vpc = VAR_0->priv_data;
GetBitContext gb;
const uint8_t *VAR_4, *end, *next;
uint8_t *buf2 = av_mallocz(VAR_3 + FF_INPUT_BUFFER_PADDING_SIZE);
... | [
"static void FUNC_0(AVCodecParserContext *VAR_0, AVCodecContext *VAR_1,\nconst uint8_t *VAR_2, int VAR_3)\n{",
"VC1ParseContext *vpc = VAR_0->priv_data;",
"GetBitContext gb;",
"const uint8_t *VAR_4, *end, *next;",
"uint8_t *buf2 = av_mallocz(VAR_3 + FF_INPUT_BUFFER_PADDING_SIZE);",
"vpc->v.VAR_0.VAR_1 = V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,
49
... |
3,685 | int ff_jpeg2000_init_component(Jpeg2000Component *comp,
Jpeg2000CodingStyle *codsty,
Jpeg2000QuantStyle *qntsty,
int cbps, int dx, int dy,
AVCodecContext *avctx)
{
int reslevelno, bandno, gban... | true | FFmpeg | 6887e412434776eb260ad3904f565be491dd5726 | int ff_jpeg2000_init_component(Jpeg2000Component *comp,
Jpeg2000CodingStyle *codsty,
Jpeg2000QuantStyle *qntsty,
int cbps, int dx, int dy,
AVCodecContext *avctx)
{
int reslevelno, bandno, gban... | {
"code": [],
"line_no": []
} | int FUNC_0(Jpeg2000Component *VAR_0,
Jpeg2000CodingStyle *VAR_1,
Jpeg2000QuantStyle *VAR_2,
int VAR_3, int VAR_4, int VAR_5,
AVCodecContext *VAR_6)
{
int VAR_7, VAR_8, VAR_9 = 0, VAR_10, VAR_1... | [
"int FUNC_0(Jpeg2000Component *VAR_0,\nJpeg2000CodingStyle *VAR_1,\nJpeg2000QuantStyle *VAR_2,\nint VAR_3, int VAR_4, int VAR_5,\nAVCodecContext *VAR_6)\n{",
"int VAR_7, VAR_8, VAR_9 = 0, VAR_10, VAR_11, VAR_12;",
"uint32_t csize;",
"if (VAR_1->nreslevels2decode <= 0) {",
"av_log(VAR_6, AV_LOG_ERROR, \"nres... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3,
4,
5,
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13,
14,
15,
16
],
[
17,
18,
19
],
[
20,
21
],
[
22,
23
],
[
24
],
[
25
],
[
26
],
[
... |
3,686 | void vhost_dev_cleanup(struct vhost_dev *hdev)
{
int i;
for (i = 0; i < hdev->nvqs; ++i) {
vhost_virtqueue_cleanup(hdev->vqs + i);
}
memory_listener_unregister(&hdev->memory_listener);
if (hdev->migration_blocker) {
migrate_del_blocker(hdev->migration_blocker);
error... | true | qemu | 2ce68e4cf5be9b5176a3c3c372948d6340724d2d | void vhost_dev_cleanup(struct vhost_dev *hdev)
{
int i;
for (i = 0; i < hdev->nvqs; ++i) {
vhost_virtqueue_cleanup(hdev->vqs + i);
}
memory_listener_unregister(&hdev->memory_listener);
if (hdev->migration_blocker) {
migrate_del_blocker(hdev->migration_blocker);
error... | {
"code": [],
"line_no": []
} | void FUNC_0(struct vhost_dev *VAR_0)
{
int VAR_1;
for (VAR_1 = 0; VAR_1 < VAR_0->nvqs; ++VAR_1) {
vhost_virtqueue_cleanup(VAR_0->vqs + VAR_1);
}
memory_listener_unregister(&VAR_0->memory_listener);
if (VAR_0->migration_blocker) {
migrate_del_blocker(VAR_0->migration_blocker);... | [
"void FUNC_0(struct vhost_dev *VAR_0)\n{",
"int VAR_1;",
"for (VAR_1 = 0; VAR_1 < VAR_0->nvqs; ++VAR_1) {",
"vhost_virtqueue_cleanup(VAR_0->vqs + VAR_1);",
"}",
"memory_listener_unregister(&VAR_0->memory_listener);",
"if (VAR_0->migration_blocker) {",
"migrate_del_blocker(VAR_0->migration_blocker);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
30
]
] |
3,687 | static void test_validate_fail_union_flat_no_discrim(TestInputVisitorData *data,
const void *unused)
{
UserDefFlatUnion2 *tmp = NULL;
Error *err = NULL;
Visitor *v;
/* test situation where discriminator field ('enum1' here) is missing */
... | true | qemu | a12a5a1a0132527afe87c079e4aae4aad372bd94 | static void test_validate_fail_union_flat_no_discrim(TestInputVisitorData *data,
const void *unused)
{
UserDefFlatUnion2 *tmp = NULL;
Error *err = NULL;
Visitor *v;
v = validate_test_init(data, "{ 'integer': 42, 'string': 'c', 'string1':... | {
"code": [
" error_free(err);",
" g_assert(err);",
" error_free(err);",
" g_assert(err);",
" error_free(err);",
" g_assert(err);",
" error_free(err);",
" g_assert(err);",
" error_free(err);",
" g_assert(err);",
" error_free(err);",
" ... | static void FUNC_0(TestInputVisitorData *VAR_0,
const void *VAR_1)
{
UserDefFlatUnion2 *tmp = NULL;
Error *err = NULL;
Visitor *v;
v = validate_test_init(VAR_0, "{ 'integer': 42, 'string': 'c', 'string1': 'd', 'string2': 'e' }");
... | [
"static void FUNC_0(TestInputVisitorData *VAR_0,\nconst void *VAR_1)\n{",
"UserDefFlatUnion2 *tmp = NULL;",
"Error *err = NULL;",
"Visitor *v;",
"v = validate_test_init(VAR_0, \"{ 'integer': 42, 'string': 'c', 'string1': 'd', 'string2': 'e' }\");",
"visit_type_UserDefFlatUnion2(v, &tmp, NULL, &err);",
"... | [
0,
0,
0,
0,
0,
0,
1,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
3,688 | static void spapr_populate_pa_features(CPUPPCState *env, void *fdt, int offset)
{
uint8_t pa_features_206[] = { 6, 0,
0xf6, 0x1f, 0xc7, 0x00, 0x80, 0xc0 };
uint8_t pa_features_207[] = { 24, 0,
0xf6, 0x1f, 0xc7, 0xc0, 0x80, 0xf0,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x... | true | qemu | e957f6a9b92439a222ecd4ff1c8cdc9700710c72 | static void spapr_populate_pa_features(CPUPPCState *env, void *fdt, int offset)
{
uint8_t pa_features_206[] = { 6, 0,
0xf6, 0x1f, 0xc7, 0x00, 0x80, 0xc0 };
uint8_t pa_features_207[] = { 24, 0,
0xf6, 0x1f, 0xc7, 0xc0, 0x80, 0xf0,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x... | {
"code": [
"static void spapr_populate_pa_features(CPUPPCState *env, void *fdt, int offset)"
],
"line_no": [
1
]
} | static void FUNC_0(CPUPPCState *VAR_0, void *VAR_1, int VAR_2)
{
uint8_t pa_features_206[] = { 6, 0,
0xf6, 0x1f, 0xc7, 0x00, 0x80, 0xc0 };
uint8_t pa_features_207[] = { 24, 0,
0xf6, 0x1f, 0xc7, 0xc0, 0x80, 0xf0,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0... | [
"static void FUNC_0(CPUPPCState *VAR_0, void *VAR_1, int VAR_2)\n{",
"uint8_t pa_features_206[] = { 6, 0,",
"0xf6, 0x1f, 0xc7, 0x00, 0x80, 0xc0 };",
"uint8_t pa_features_207[] = { 24, 0,",
"0xf6, 0x1f, 0xc7, 0xc0, 0x80, 0xf0,\n0x80, 0x00, 0x00, 0x00, 0x00, 0x00,\n0x00, 0x00, 0x00, 0x00, 0x80, 0x00,\n0x80, 0... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13,
15,
17
],
[
19
],
[
25,
29,
33,
37,
41,
45,
49,
53,
57,
61,
65,
67
],
[
69
],
[
71
],
[
75
],
[
77,
79
],
[
81
],
[... |
3,689 | static void thread_pool_co_cb(void *opaque, int ret)
{
ThreadPoolCo *co = opaque;
co->ret = ret;
qemu_coroutine_enter(co->co, NULL);
}
| true | qemu | 0b8b8753e4d94901627b3e86431230f2319215c4 | static void thread_pool_co_cb(void *opaque, int ret)
{
ThreadPoolCo *co = opaque;
co->ret = ret;
qemu_coroutine_enter(co->co, NULL);
}
| {
"code": [
" qemu_coroutine_enter(co->co, NULL);"
],
"line_no": [
11
]
} | static void FUNC_0(void *VAR_0, int VAR_1)
{
ThreadPoolCo *co = VAR_0;
co->VAR_1 = VAR_1;
qemu_coroutine_enter(co->co, NULL);
}
| [
"static void FUNC_0(void *VAR_0, int VAR_1)\n{",
"ThreadPoolCo *co = VAR_0;",
"co->VAR_1 = VAR_1;",
"qemu_coroutine_enter(co->co, NULL);",
"}"
] | [
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
]
] |
3,692 | static void pc_dimm_plug(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
int slot;
HotplugHandlerClass *hhc;
Error *local_err = NULL;
PCMachineState *pcms = PC_MACHINE(hotplug_dev);
MachineState *machine = MACHINE(hotplug_dev);
PCDIMMDevice *dimm = PC_DIMM... | true | qemu | b8865591d4d5680b4f766c25ca1db110320b4d15 | static void pc_dimm_plug(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
int slot;
HotplugHandlerClass *hhc;
Error *local_err = NULL;
PCMachineState *pcms = PC_MACHINE(hotplug_dev);
MachineState *machine = MACHINE(hotplug_dev);
PCDIMMDevice *dimm = PC_DIMM... | {
"code": [],
"line_no": []
} | static void FUNC_0(HotplugHandler *VAR_0,
DeviceState *VAR_1, Error **VAR_2)
{
int VAR_3;
HotplugHandlerClass *hhc;
Error *local_err = NULL;
PCMachineState *pcms = PC_MACHINE(VAR_0);
MachineState *machine = MACHINE(VAR_0);
PCDIMMDevice *dimm = PC_DIMM(VAR_1);
PCDIMMD... | [
"static void FUNC_0(HotplugHandler *VAR_0,\nDeviceState *VAR_1, Error **VAR_2)\n{",
"int VAR_3;",
"HotplugHandlerClass *hhc;",
"Error *local_err = NULL;",
"PCMachineState *pcms = PC_MACHINE(VAR_0);",
"MachineState *machine = MACHINE(VAR_0);",
"PCDIMMDevice *dimm = PC_DIMM(VAR_1);",
"PCDIMMDeviceClass ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12,
13
],
[
14
],
[
15,
16,
17,
18
],
[
19
],
[
20
],
[
21
],
[
22
],
[
23
],
[
... |
3,693 | int bdrv_aio_multiwrite(BlockDriverState *bs, BlockRequest *reqs, int num_reqs)
{
BlockDriverAIOCB *acb;
MultiwriteCB *mcb;
int i;
if (num_reqs == 0) {
return 0;
}
// Create MultiwriteCB structure
mcb = qemu_mallocz(sizeof(*mcb) + num_reqs * sizeof(*mcb->callbacks));
... | true | qemu | 7eb58a6c556c3880e6712cbf6d24d681261c5095 | int bdrv_aio_multiwrite(BlockDriverState *bs, BlockRequest *reqs, int num_reqs)
{
BlockDriverAIOCB *acb;
MultiwriteCB *mcb;
int i;
if (num_reqs == 0) {
return 0;
}
mcb = qemu_mallocz(sizeof(*mcb) + num_reqs * sizeof(*mcb->callbacks));
mcb->num_requests = 0;
mc... | {
"code": [
" mcb->error = -EIO;"
],
"line_no": [
73
]
} | int FUNC_0(BlockDriverState *VAR_0, BlockRequest *VAR_1, int VAR_2)
{
BlockDriverAIOCB *acb;
MultiwriteCB *mcb;
int VAR_3;
if (VAR_2 == 0) {
return 0;
}
mcb = qemu_mallocz(sizeof(*mcb) + VAR_2 * sizeof(*mcb->callbacks));
mcb->num_requests = 0;
mcb->num_callbac... | [
"int FUNC_0(BlockDriverState *VAR_0, BlockRequest *VAR_1, int VAR_2)\n{",
"BlockDriverAIOCB *acb;",
"MultiwriteCB *mcb;",
"int VAR_3;",
"if (VAR_2 == 0) {",
"return 0;",
"}",
"mcb = qemu_mallocz(sizeof(*mcb) + VAR_2 * sizeof(*mcb->callbacks));",
"mcb->num_requests = 0;",
"mcb->num_callbacks = VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
43
],
[
49
],
[
51,
53
],
[
57
],
[
65
],
[... |
3,694 | static void mov_fix_index(MOVContext *mov, AVStream *st)
{
MOVStreamContext *msc = st->priv_data;
AVIndexEntry *e_old = st->index_entries;
int nb_old = st->nb_index_entries;
const AVIndexEntry *e_old_end = e_old + nb_old;
const AVIndexEntry *current = NULL;
MOVStts *ctts_data_old = msc->c... | true | FFmpeg | d073be2291e40129d107ca4573097d6d6d2dbf68 | static void mov_fix_index(MOVContext *mov, AVStream *st)
{
MOVStreamContext *msc = st->priv_data;
AVIndexEntry *e_old = st->index_entries;
int nb_old = st->nb_index_entries;
const AVIndexEntry *e_old_end = e_old + nb_old;
const AVIndexEntry *current = NULL;
MOVStts *ctts_data_old = msc->c... | {
"code": [],
"line_no": []
} | static void FUNC_0(MOVContext *VAR_0, AVStream *VAR_1)
{
MOVStreamContext *msc = VAR_1->priv_data;
AVIndexEntry *e_old = VAR_1->index_entries;
int VAR_2 = VAR_1->nb_index_entries;
const AVIndexEntry *VAR_3 = e_old + VAR_2;
const AVIndexEntry *VAR_4 = NULL;
MOVStts *ctts_data_old = msc->ct... | [
"static void FUNC_0(MOVContext *VAR_0, AVStream *VAR_1)\n{",
"MOVStreamContext *msc = VAR_1->priv_data;",
"AVIndexEntry *e_old = VAR_1->index_entries;",
"int VAR_2 = VAR_1->nb_index_entries;",
"const AVIndexEntry *VAR_3 = e_old + VAR_2;",
"const AVIndexEntry *VAR_4 = NULL;",
"MOVStts *ctts_data_old = ms... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
... |
3,695 | int ff_win32_open(const char *filename_utf8, int oflag, int pmode)
{
int fd;
int num_chars;
wchar_t *filename_w;
/* convert UTF-8 to wide chars */
num_chars = MultiByteToWideChar(CP_UTF8, 0, filename_utf8, -1, NULL, 0);
if (num_chars <= 0)
return -1;
filename_w = av_malloc... | true | FFmpeg | c3c3bc7ff6b25326800ef6aae3ba46f9de75d3a7 | int ff_win32_open(const char *filename_utf8, int oflag, int pmode)
{
int fd;
int num_chars;
wchar_t *filename_w;
num_chars = MultiByteToWideChar(CP_UTF8, 0, filename_utf8, -1, NULL, 0);
if (num_chars <= 0)
return -1;
filename_w = av_mallocz(sizeof(wchar_t) * num_chars);
... | {
"code": [
" num_chars = MultiByteToWideChar(CP_UTF8, 0, filename_utf8, -1, NULL, 0);",
" return -1;",
" if (fd == -1 && !(oflag & O_CREAT))",
" return _sopen(filename_utf8, oflag, SH_DENYNO, pmode);",
" return fd;"
],
"line_no": [
15,
19,
35,
37,
41... | int FUNC_0(const char *VAR_0, int VAR_1, int VAR_2)
{
int VAR_3;
int VAR_4;
wchar_t *filename_w;
VAR_4 = MultiByteToWideChar(CP_UTF8, 0, VAR_0, -1, NULL, 0);
if (VAR_4 <= 0)
return -1;
filename_w = av_mallocz(sizeof(wchar_t) * VAR_4);
MultiByteToWideChar(CP_UTF8, 0, ... | [
"int FUNC_0(const char *VAR_0, int VAR_1, int VAR_2)\n{",
"int VAR_3;",
"int VAR_4;",
"wchar_t *filename_w;",
"VAR_4 = MultiByteToWideChar(CP_UTF8, 0, VAR_0, -1, NULL, 0);",
"if (VAR_4 <= 0)\nreturn -1;",
"filename_w = av_mallocz(sizeof(wchar_t) * VAR_4);",
"MultiByteToWideChar(CP_UTF8, 0, VAR_0, -1, ... | [
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
35,
37
],
[
41
],
[
43
]
] |
3,696 | static always_inline target_phys_addr_t get_pgaddr (target_phys_addr_t sdr1,
int sdr_sh,
target_phys_addr_t hash,
target_phys_addr_t mask)
{
return (sdr1 &... | true | qemu | 6f2d8978728c48ca46f5c01835438508aace5c64 | static always_inline target_phys_addr_t get_pgaddr (target_phys_addr_t sdr1,
int sdr_sh,
target_phys_addr_t hash,
target_phys_addr_t mask)
{
return (sdr1 &... | {
"code": [
" return (sdr1 & ((target_ulong)(-1ULL) << sdr_sh)) | (hash & mask);"
],
"line_no": [
11
]
} | static always_inline VAR_0 get_pgaddr (VAR_0 sdr1,
int sdr_sh,
VAR_0 hash,
VAR_0 mask)
{
return (sdr1 & ((target_ulong)(-1ULL) << sdr_sh)) | (hash & mask);... | [
"static always_inline VAR_0 get_pgaddr (VAR_0 sdr1,\nint sdr_sh,\nVAR_0 hash,\nVAR_0 mask)\n{",
"return (sdr1 & ((target_ulong)(-1ULL) << sdr_sh)) | (hash & mask);",
"}"
] | [
0,
1,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
]
] |
3,697 | static void ahci_init_d2h(AHCIDevice *ad)
{
IDEState *ide_state = &ad->port.ifs[0];
AHCIPortRegs *pr = &ad->port_regs;
if (ad->init_d2h_sent) {
return;
}
if (ahci_write_fis_d2h(ad)) {
ad->init_d2h_sent = true;
/* We're emulating receiving the first Reg H2D Fis fr... | true | qemu | 40fe17bea478793fc9106a630fa3610dad51f939 | static void ahci_init_d2h(AHCIDevice *ad)
{
IDEState *ide_state = &ad->port.ifs[0];
AHCIPortRegs *pr = &ad->port_regs;
if (ad->init_d2h_sent) {
return;
}
if (ahci_write_fis_d2h(ad)) {
ad->init_d2h_sent = true;
pr->sig = (ide_state->hcyl << 24) |
... | {
"code": [
" pr->sig = (ide_state->hcyl << 24) |"
],
"line_no": [
27
]
} | static void FUNC_0(AHCIDevice *VAR_0)
{
IDEState *ide_state = &VAR_0->port.ifs[0];
AHCIPortRegs *pr = &VAR_0->port_regs;
if (VAR_0->init_d2h_sent) {
return;
}
if (ahci_write_fis_d2h(VAR_0)) {
VAR_0->init_d2h_sent = true;
pr->sig = (ide_state->hcyl << ... | [
"static void FUNC_0(AHCIDevice *VAR_0)\n{",
"IDEState *ide_state = &VAR_0->port.ifs[0];",
"AHCIPortRegs *pr = &VAR_0->port_regs;",
"if (VAR_0->init_d2h_sent) {",
"return;",
"}",
"if (ahci_write_fis_d2h(VAR_0)) {",
"VAR_0->init_d2h_sent = true;",
"pr->sig = (ide_state->hcyl << 24) |\n(ide_state->lcyl... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
27,
29,
31,
33
],
[
35
],
[
37
]
] |
3,699 | static void acpi_get_pm_info(AcpiPmInfo *pm)
{
Object *piix = piix4_pm_find();
Object *lpc = ich9_lpc_find();
Object *obj = NULL;
QObject *o;
pm->pcihp_io_base = 0;
pm->pcihp_io_len = 0;
if (piix) {
obj = piix;
pm->cpu_hp_io_base = PIIX4_CPU_HOTPLUG_IO_BASE;
... | true | qemu | 94aaca6457e52bb9c8a53af3c89bfeec40afadfc | static void acpi_get_pm_info(AcpiPmInfo *pm)
{
Object *piix = piix4_pm_find();
Object *lpc = ich9_lpc_find();
Object *obj = NULL;
QObject *o;
pm->pcihp_io_base = 0;
pm->pcihp_io_len = 0;
if (piix) {
obj = piix;
pm->cpu_hp_io_base = PIIX4_CPU_HOTPLUG_IO_BASE;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(AcpiPmInfo *VAR_0)
{
Object *piix = piix4_pm_find();
Object *lpc = ich9_lpc_find();
Object *obj = NULL;
QObject *o;
VAR_0->pcihp_io_base = 0;
VAR_0->pcihp_io_len = 0;
if (piix) {
obj = piix;
VAR_0->cpu_hp_io_base = PIIX4_CPU_HOTPLUG_IO_BASE;
... | [
"static void FUNC_0(AcpiPmInfo *VAR_0)\n{",
"Object *piix = piix4_pm_find();",
"Object *lpc = ich9_lpc_find();",
"Object *obj = NULL;",
"QObject *o;",
"VAR_0->pcihp_io_base = 0;",
"VAR_0->pcihp_io_len = 0;",
"if (piix) {",
"obj = piix;",
"VAR_0->cpu_hp_io_base = PIIX4_CPU_HOTPLUG_IO_BASE;",
"VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
16
],
[
18
],
[
20
],
[
22
],
[
24
],
[
26,
28
],
[
30,
32
],
[
34
],
[
36
],
[
38
],
[
40
],
[
42
],
[
44
],
[
48
... |
3,700 | SerialState *serial_mm_init (target_phys_addr_t base, int it_shift,
qemu_irq irq, int baudbase,
CharDriverState *chr, int ioregister)
{
SerialState *s;
int s_io_memory;
s = qemu_mallocz(sizeof(SerialState));
if (!s)
return NULL;... | true | qemu | 81174dae3f9189519cd60c7b79e91c291b021bbe | SerialState *serial_mm_init (target_phys_addr_t base, int it_shift,
qemu_irq irq, int baudbase,
CharDriverState *chr, int ioregister)
{
SerialState *s;
int s_io_memory;
s = qemu_mallocz(sizeof(SerialState));
if (!s)
return NULL;... | {
"code": [
" s->irq = irq;",
" s->tx_timer = qemu_new_timer(vm_clock, serial_tx_done, s);",
" if (!s->tx_timer)",
" return NULL;",
" qemu_register_reset(serial_reset, s);",
" serial_reset(s);",
" register_savevm(\"serial\", base, 2, serial_save, serial_load, s);",... | SerialState *FUNC_0 (target_phys_addr_t base, int it_shift,
qemu_irq irq, int baudbase,
CharDriverState *chr, int ioregister)
{
SerialState *s;
int VAR_0;
s = qemu_mallocz(sizeof(SerialState));
if (!s)
return NULL;
s->irq =... | [
"SerialState *FUNC_0 (target_phys_addr_t base, int it_shift,\nqemu_irq irq, int baudbase,\nCharDriverState *chr, int ioregister)\n{",
"SerialState *s;",
"int VAR_0;",
"s = qemu_mallocz(sizeof(SerialState));",
"if (!s)\nreturn NULL;",
"s->irq = irq;",
"s->base = base;",
"s->it_shift = it_shift;",
"s-... | [
0,
0,
0,
0,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33,
35
],
[
39
],
[
41
],
[
45
],
[
49
],
[
51,
53
],
[
55
],
[... |
3,701 | int qemu_opts_foreach(QemuOptsList *list, qemu_opts_loopfunc func,
void *opaque, Error **errp)
{
Location loc;
QemuOpts *opts;
int rc;
loc_push_none(&loc);
QTAILQ_FOREACH(opts, &list->head, next) {
loc_restore(&opts->loc);
rc = func(opaque, opts, errp... | true | qemu | 37f32349ea43f41ee8b9a253977ce1e46f576fc7 | int qemu_opts_foreach(QemuOptsList *list, qemu_opts_loopfunc func,
void *opaque, Error **errp)
{
Location loc;
QemuOpts *opts;
int rc;
loc_push_none(&loc);
QTAILQ_FOREACH(opts, &list->head, next) {
loc_restore(&opts->loc);
rc = func(opaque, opts, errp... | {
"code": [
" int rc;",
" return rc;",
" return 0;"
],
"line_no": [
11,
25,
35
]
} | int FUNC_0(QemuOptsList *VAR_0, qemu_opts_loopfunc VAR_1,
void *VAR_2, Error **VAR_3)
{
Location loc;
QemuOpts *opts;
int VAR_4;
loc_push_none(&loc);
QTAILQ_FOREACH(opts, &VAR_0->head, next) {
loc_restore(&opts->loc);
VAR_4 = VAR_1(VAR_2, opts, VAR_3)... | [
"int FUNC_0(QemuOptsList *VAR_0, qemu_opts_loopfunc VAR_1,\nvoid *VAR_2, Error **VAR_3)\n{",
"Location loc;",
"QemuOpts *opts;",
"int VAR_4;",
"loc_push_none(&loc);",
"QTAILQ_FOREACH(opts, &VAR_0->head, next) {",
"loc_restore(&opts->loc);",
"VAR_4 = VAR_1(VAR_2, opts, VAR_3);",
"if (VAR_4) {",
"re... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
3,702 | void bitmap_set_atomic(unsigned long *map, long start, long nr)
{
unsigned long *p = map + BIT_WORD(start);
const long size = start + nr;
int bits_to_set = BITS_PER_LONG - (start % BITS_PER_LONG);
unsigned long mask_to_set = BITMAP_FIRST_WORD_MASK(start);
/* First word */
if (nr - bits_to_set > ... | true | qemu | e12ed72e5c00dd3375b8bd107200e4d7e950276a | void bitmap_set_atomic(unsigned long *map, long start, long nr)
{
unsigned long *p = map + BIT_WORD(start);
const long size = start + nr;
int bits_to_set = BITS_PER_LONG - (start % BITS_PER_LONG);
unsigned long mask_to_set = BITMAP_FIRST_WORD_MASK(start);
if (nr - bits_to_set > 0) {
ato... | {
"code": [],
"line_no": []
} | void FUNC_0(unsigned long *VAR_0, long VAR_1, long VAR_2)
{
unsigned long *VAR_3 = VAR_0 + BIT_WORD(VAR_1);
const long VAR_4 = VAR_1 + VAR_2;
int VAR_5 = BITS_PER_LONG - (VAR_1 % BITS_PER_LONG);
unsigned long VAR_6 = BITMAP_FIRST_WORD_MASK(VAR_1);
if (VAR_2 - VAR_5 > 0) {
atomic_or(VAR_... | [
"void FUNC_0(unsigned long *VAR_0, long VAR_1, long VAR_2)\n{",
"unsigned long *VAR_3 = VAR_0 + BIT_WORD(VAR_1);",
"const long VAR_4 = VAR_1 + VAR_2;",
"int VAR_5 = BITS_PER_LONG - (VAR_1 % BITS_PER_LONG);",
"unsigned long VAR_6 = BITMAP_FIRST_WORD_MASK(VAR_1);",
"if (VAR_2 - VAR_5 > 0) {",
"atomic_or(V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
],
[
24
]... |
3,703 | static void test_io_channel_ipv4_fd(void)
{
QIOChannel *ioc;
int fd = -1;
fd = socket(AF_INET, SOCK_STREAM, 0);
g_assert_cmpint(fd, >, -1);
ioc = qio_channel_new_fd(fd, &error_abort);
g_assert_cmpstr(object_get_typename(OBJECT(ioc)),
==,
TYPE_QIO_CHANNEL_S... | true | qemu | abc981bf292fb361f8a509c3611ddf2ba2c43360 | static void test_io_channel_ipv4_fd(void)
{
QIOChannel *ioc;
int fd = -1;
fd = socket(AF_INET, SOCK_STREAM, 0);
g_assert_cmpint(fd, >, -1);
ioc = qio_channel_new_fd(fd, &error_abort);
g_assert_cmpstr(object_get_typename(OBJECT(ioc)),
==,
TYPE_QIO_CHANNEL_S... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
QIOChannel *ioc;
int VAR_0 = -1;
VAR_0 = socket(AF_INET, SOCK_STREAM, 0);
g_assert_cmpint(VAR_0, >, -1);
ioc = qio_channel_new_fd(VAR_0, &error_abort);
g_assert_cmpstr(object_get_typename(OBJECT(ioc)),
==,
TYPE_QIO_CHANNEL_SOCKET... | [
"static void FUNC_0(void)\n{",
"QIOChannel *ioc;",
"int VAR_0 = -1;",
"VAR_0 = socket(AF_INET, SOCK_STREAM, 0);",
"g_assert_cmpint(VAR_0, >, -1);",
"ioc = qio_channel_new_fd(VAR_0, &error_abort);",
"g_assert_cmpstr(object_get_typename(OBJECT(ioc)),\n==,\nTYPE_QIO_CHANNEL_SOCKET);",
"object_unref(OBJEC... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8,
9,
10
],
[
11
]
] |
3,704 | e1000e_io_read(void *opaque, hwaddr addr, unsigned size)
{
E1000EState *s = opaque;
uint32_t idx;
uint64_t val;
switch (addr) {
case E1000_IOADDR:
trace_e1000e_io_read_addr(s->ioaddr);
return s->ioaddr;
case E1000_IODATA:
if (e1000e_io_get_reg_index(s, &idx)) ... | true | qemu | de5dca1b792ada25c29a95c8f84e01f4300aef9c | e1000e_io_read(void *opaque, hwaddr addr, unsigned size)
{
E1000EState *s = opaque;
uint32_t idx;
uint64_t val;
switch (addr) {
case E1000_IOADDR:
trace_e1000e_io_read_addr(s->ioaddr);
return s->ioaddr;
case E1000_IODATA:
if (e1000e_io_get_reg_index(s, &idx)) ... | {
"code": [
" uint32_t idx;",
" uint32_t idx;"
],
"line_no": [
7,
7
]
} | FUNC_0(void *VAR_0, hwaddr VAR_1, unsigned VAR_2)
{
E1000EState *s = VAR_0;
uint32_t idx;
uint64_t val;
switch (VAR_1) {
case E1000_IOADDR:
trace_e1000e_io_read_addr(s->ioaddr);
return s->ioaddr;
case E1000_IODATA:
if (e1000e_io_get_reg_index(s, &idx)) {
... | [
"FUNC_0(void *VAR_0, hwaddr VAR_1, unsigned VAR_2)\n{",
"E1000EState *s = VAR_0;",
"uint32_t idx;",
"uint64_t val;",
"switch (VAR_1) {",
"case E1000_IOADDR:\ntrace_e1000e_io_read_addr(s->ioaddr);",
"return s->ioaddr;",
"case E1000_IODATA:\nif (e1000e_io_get_reg_index(s, &idx)) {",
"val = e1000e_core... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
]
] |
3,705 | static void qemu_mutex_unlock_iothread(void)
{
qemu_mutex_unlock(&qemu_global_mutex);
}
| true | qemu | d549db5a732ef2ec145b84c5008a7585cf17cf67 | static void qemu_mutex_unlock_iothread(void)
{
qemu_mutex_unlock(&qemu_global_mutex);
}
| {
"code": [
"static void qemu_mutex_unlock_iothread(void)"
],
"line_no": [
1
]
} | static void FUNC_0(void)
{
qemu_mutex_unlock(&qemu_global_mutex);
}
| [
"static void FUNC_0(void)\n{",
"qemu_mutex_unlock(&qemu_global_mutex);",
"}"
] | [
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
3,706 | static int s302m_encode2_frame(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr)
{
S302MEncContext *s = avctx->priv_data;
const int buf_size = AES3_HEADER_LEN +
(frame->nb_samples *
avctx->chan... | true | FFmpeg | 50833c9f7b4e1922197a8955669f8ab3589c8cef | static int s302m_encode2_frame(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr)
{
S302MEncContext *s = avctx->priv_data;
const int buf_size = AES3_HEADER_LEN +
(frame->nb_samples *
avctx->chan... | {
"code": [
" init_put_bits(&pb, o, buf_size * 8);"
],
"line_no": [
33
]
} | static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,
const AVFrame *VAR_2, int *VAR_3)
{
S302MEncContext *s = VAR_0->priv_data;
const int VAR_4 = AES3_HEADER_LEN +
(VAR_2->nb_samples *
VAR_0->VAR_7 *
... | [
"static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,\nconst AVFrame *VAR_2, int *VAR_3)\n{",
"S302MEncContext *s = VAR_0->priv_data;",
"const int VAR_4 = AES3_HEADER_LEN +\n(VAR_2->nb_samples *\nVAR_0->VAR_7 *\n(VAR_0->bits_per_raw_sample + 4)) / 8;",
"int VAR_5, VAR_6, VAR_7;",
"uint8_t *o;",
"PutB... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9,
11,
13,
15
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[... |
3,707 | static int qcow_write(BlockDriverState *bs, int64_t sector_num,
const uint8_t *buf, int nb_sectors)
{
Coroutine *co;
AioContext *aio_context = bdrv_get_aio_context(bs);
QcowWriteCo data = {
.bs = bs,
.sector_num = sector_num,
.buf = buf,
... | true | qemu | 0b8b8753e4d94901627b3e86431230f2319215c4 | static int qcow_write(BlockDriverState *bs, int64_t sector_num,
const uint8_t *buf, int nb_sectors)
{
Coroutine *co;
AioContext *aio_context = bdrv_get_aio_context(bs);
QcowWriteCo data = {
.bs = bs,
.sector_num = sector_num,
.buf = buf,
... | {
"code": [
" co = qemu_coroutine_create(qcow_write_co_entry);",
" qemu_coroutine_enter(co, &data);",
" qemu_coroutine_enter(co, &data);",
" qemu_coroutine_enter(co, &data);",
" qemu_coroutine_enter(co, &data);"
],
"line_no": [
25,
27,
27,
27,
27
]
} | static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,
const uint8_t *VAR_2, int VAR_3)
{
Coroutine *co;
AioContext *aio_context = bdrv_get_aio_context(VAR_0);
QcowWriteCo data = {
.VAR_0 = VAR_0,
.VAR_1 = VAR_1,
.VAR_2 = VAR_2,
... | [
"static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,\nconst uint8_t *VAR_2, int VAR_3)\n{",
"Coroutine *co;",
"AioContext *aio_context = bdrv_get_aio_context(VAR_0);",
"QcowWriteCo data = {",
".VAR_0 = VAR_0,\n.VAR_1 = VAR_1,\n.VAR_2 = VAR_2,\n.VAR_3 = VAR_3,\n.ret = -EINPROGRESS... | [
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13,
15,
17,
19,
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
3,708 | void dump_format(AVFormatContext *ic,
int index,
const char *url,
int is_output)
{
int i;
uint8_t *printed = av_mallocz(ic->nb_streams);
if (ic->nb_streams && !printed)
return;
av_log(NULL, AV_LOG_INFO, "%s #%d, %s, %s '%s':\n",
... | false | FFmpeg | b163078fe309f15e4c7fecea9147ec8d8437623b | void dump_format(AVFormatContext *ic,
int index,
const char *url,
int is_output)
{
int i;
uint8_t *printed = av_mallocz(ic->nb_streams);
if (ic->nb_streams && !printed)
return;
av_log(NULL, AV_LOG_INFO, "%s #%d, %s, %s '%s':\n",
... | {
"code": [],
"line_no": []
} | void FUNC_0(AVFormatContext *VAR_0,
int VAR_1,
const char *VAR_2,
int VAR_3)
{
int VAR_4;
uint8_t *printed = av_mallocz(VAR_0->nb_streams);
if (VAR_0->nb_streams && !printed)
return;
av_log(NULL, AV_LOG_INFO, "%s #%d, %s, %s '%s':\n",... | [
"void FUNC_0(AVFormatContext *VAR_0,\nint VAR_1,\nconst char *VAR_2,\nint VAR_3)\n{",
"int VAR_4;",
"uint8_t *printed = av_mallocz(VAR_0->nb_streams);",
"if (VAR_0->nb_streams && !printed)\nreturn;",
"av_log(NULL, AV_LOG_INFO, \"%s #%d, %s, %s '%s':\\n\",\nVAR_3 ? \"Output\" : \"Input\",\nVAR_1,\nVAR_3 ? VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15,
17
],
[
21,
23,
25,
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
3,709 | static void bastardized_rice_decompress(ALACContext *alac,
int32_t *output_buffer,
int output_size,
int readsamplesize,
int rice_history_mult)
{
int o... | false | FFmpeg | d9837434a91dbb3632df335414aad538e5b0a6e9 | static void bastardized_rice_decompress(ALACContext *alac,
int32_t *output_buffer,
int output_size,
int readsamplesize,
int rice_history_mult)
{
int o... | {
"code": [],
"line_no": []
} | static void FUNC_0(ALACContext *VAR_0,
int32_t *VAR_1,
int VAR_2,
int VAR_3,
int VAR_4)
{
int VAR_5;
unsigned int VAR_6 = VAR_0->rice_initial_his... | [
"static void FUNC_0(ALACContext *VAR_0,\nint32_t *VAR_1,\nint VAR_2,\nint VAR_3,\nint VAR_4)\n{",
"int VAR_5;",
"unsigned int VAR_6 = VAR_0->rice_initial_history;",
"int VAR_7 = 0;",
"for (VAR_5 = 0; VAR_5 < VAR_2; VAR_5++) {",
"int32_t x;",
"int32_t x_modified;",
"int32_t final_val;",
"int VAR_9;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
33
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53
],
[
57
],
[
63,
65
],
[... |
3,710 | void MPV_common_end(MpegEncContext *s)
{
int i;
av_freep(&s->mb_type);
av_freep(&s->p_mv_table);
av_freep(&s->b_forw_mv_table);
av_freep(&s->b_back_mv_table);
av_freep(&s->b_bidir_forw_mv_table);
av_freep(&s->b_bidir_back_mv_table);
av_freep(&s->b_direct_mv_table);
av_fre... | false | FFmpeg | f7b47594dca27fffed9d0314ac09ffc1316514b5 | void MPV_common_end(MpegEncContext *s)
{
int i;
av_freep(&s->mb_type);
av_freep(&s->p_mv_table);
av_freep(&s->b_forw_mv_table);
av_freep(&s->b_back_mv_table);
av_freep(&s->b_bidir_forw_mv_table);
av_freep(&s->b_bidir_back_mv_table);
av_freep(&s->b_direct_mv_table);
av_fre... | {
"code": [],
"line_no": []
} | void FUNC_0(MpegEncContext *VAR_0)
{
int VAR_1;
av_freep(&VAR_0->mb_type);
av_freep(&VAR_0->p_mv_table);
av_freep(&VAR_0->b_forw_mv_table);
av_freep(&VAR_0->b_back_mv_table);
av_freep(&VAR_0->b_bidir_forw_mv_table);
av_freep(&VAR_0->b_bidir_back_mv_table);
av_freep(&VAR_0->b_d... | [
"void FUNC_0(MpegEncContext *VAR_0)\n{",
"int VAR_1;",
"av_freep(&VAR_0->mb_type);",
"av_freep(&VAR_0->p_mv_table);",
"av_freep(&VAR_0->b_forw_mv_table);",
"av_freep(&VAR_0->b_back_mv_table);",
"av_freep(&VAR_0->b_bidir_forw_mv_table);",
"av_freep(&VAR_0->b_bidir_back_mv_table);",
"av_freep(&VAR_0->... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45... |
3,711 | static void mpeg_decode_sequence_extension(Mpeg1Context *s1)
{
MpegEncContext *s = &s1->mpeg_enc_ctx;
int horiz_size_ext, vert_size_ext;
int bit_rate_ext;
skip_bits(&s->gb, 1); /* profile and level esc*/
s->avctx->profile = get_bits(&s->gb, 3);
s->avctx->level = get_bits(&... | false | FFmpeg | 37d93fdbf0fec0eac885974c01fba99826ae7763 | static void mpeg_decode_sequence_extension(Mpeg1Context *s1)
{
MpegEncContext *s = &s1->mpeg_enc_ctx;
int horiz_size_ext, vert_size_ext;
int bit_rate_ext;
skip_bits(&s->gb, 1);
s->avctx->profile = get_bits(&s->gb, 3);
s->avctx->level = get_bits(&s->gb, 4);
s->progres... | {
"code": [],
"line_no": []
} | static void FUNC_0(Mpeg1Context *VAR_0)
{
MpegEncContext *s = &VAR_0->mpeg_enc_ctx;
int VAR_1, VAR_2;
int VAR_3;
skip_bits(&s->gb, 1);
s->avctx->profile = get_bits(&s->gb, 3);
s->avctx->level = get_bits(&s->gb, 4);
s->progressive_sequence = get_bits1(&s->gb);
... | [
"static void FUNC_0(Mpeg1Context *VAR_0)\n{",
"MpegEncContext *s = &VAR_0->mpeg_enc_ctx;",
"int VAR_1, VAR_2;",
"int VAR_3;",
"skip_bits(&s->gb, 1);",
"s->avctx->profile = get_bits(&s->gb, 3);",
"s->avctx->level = get_bits(&s->gb, 4);",
"s->progressive_sequence = get_bits1(&s->gb);",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43,
45
],
[... |
3,712 | static TCGArg *tcg_constant_folding(TCGContext *s, uint16_t *tcg_opc_ptr,
TCGArg *args, TCGOpDef *tcg_op_defs)
{
int i, nb_ops, op_index, nb_temps, nb_globals, nb_call_args;
TCGOpcode op;
const TCGOpDef *def;
TCGArg *gen_args;
TCGArg tmp;
/* Array VALS... | true | qemu | a25506603914d706f4ac4c63d3b93b4f1227b9b4 | static TCGArg *tcg_constant_folding(TCGContext *s, uint16_t *tcg_opc_ptr,
TCGArg *args, TCGOpDef *tcg_op_defs)
{
int i, nb_ops, op_index, nb_temps, nb_globals, nb_call_args;
TCGOpcode op;
const TCGOpDef *def;
TCGArg *gen_args;
TCGArg tmp;
... | {
"code": [
" case INDEX_op_set_label:",
" case INDEX_op_jmp:",
" case INDEX_op_br:",
" memset(temps, 0, nb_temps * sizeof(struct tcg_temp_info));",
" for (i = 0; i < def->nb_args; i++) {",
" *gen_args = *args;",
" ar... | static TCGArg *FUNC_0(TCGContext *s, uint16_t *tcg_opc_ptr,
TCGArg *args, TCGOpDef *tcg_op_defs)
{
int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5;
TCGOpcode op;
const TCGOpDef *VAR_6;
TCGArg *gen_args;
TCGArg tmp;
VAR_3 = s->VAR_3;
... | [
"static TCGArg *FUNC_0(TCGContext *s, uint16_t *tcg_opc_ptr,\nTCGArg *args, TCGOpDef *tcg_op_defs)\n{",
"int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5;",
"TCGOpcode op;",
"const TCGOpDef *VAR_6;",
"TCGArg *gen_args;",
"TCGArg tmp;",
"VAR_3 = s->VAR_3;",
"VAR_4 = s->VAR_4;",
"memset(temps, 0, VAR_3 * ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
],
[
57
],
[
59
],
[... |
3,713 | long do_rt_sigreturn(CPUPPCState *env)
{
struct target_rt_sigframe *rt_sf = NULL;
target_ulong rt_sf_addr;
rt_sf_addr = env->gpr[1] + SIGNAL_FRAMESIZE + 16;
if (!lock_user_struct(VERIFY_READ, rt_sf, rt_sf_addr, 1))
goto sigsegv;
if (do_setcontext(&rt_sf->uc, env, 1))
goto... | true | qemu | c599d4d6d6e9bfdb64e54c33a22cb26e3496b96d | long do_rt_sigreturn(CPUPPCState *env)
{
struct target_rt_sigframe *rt_sf = NULL;
target_ulong rt_sf_addr;
rt_sf_addr = env->gpr[1] + SIGNAL_FRAMESIZE + 16;
if (!lock_user_struct(VERIFY_READ, rt_sf, rt_sf_addr, 1))
goto sigsegv;
if (do_setcontext(&rt_sf->uc, env, 1))
goto... | {
"code": [
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" ret... | long FUNC_0(CPUPPCState *VAR_0)
{
struct target_rt_sigframe *VAR_1 = NULL;
target_ulong rt_sf_addr;
rt_sf_addr = VAR_0->gpr[1] + SIGNAL_FRAMESIZE + 16;
if (!lock_user_struct(VERIFY_READ, VAR_1, rt_sf_addr, 1))
goto sigsegv;
if (do_setcontext(&VAR_1->uc, VAR_0, 1))
goto si... | [
"long FUNC_0(CPUPPCState *VAR_0)\n{",
"struct target_rt_sigframe *VAR_1 = NULL;",
"target_ulong rt_sf_addr;",
"rt_sf_addr = VAR_0->gpr[1] + SIGNAL_FRAMESIZE + 16;",
"if (!lock_user_struct(VERIFY_READ, VAR_1, rt_sf_addr, 1))\ngoto sigsegv;",
"if (do_setcontext(&VAR_1->uc, VAR_0, 1))\ngoto sigsegv;",
"do_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
19,
21
],
[
25,
27,
29
],
[
33
],
[
35
],
[
39,
41
],
[
43
],
[
45
],
[
47
]
] |
3,715 | void dp83932_init(NICInfo *nd, target_phys_addr_t base, int it_shift,
qemu_irq irq, void* mem_opaque,
void (*memory_rw)(void *opaque, target_phys_addr_t addr, uint8_t *buf, int len, int is_write))
{
dp8393xState *s;
int io;
qemu_check_nic_model(nd, "dp83932");
... | true | qemu | b946a1533209f61a93e34898aebb5b43154b99c3 | void dp83932_init(NICInfo *nd, target_phys_addr_t base, int it_shift,
qemu_irq irq, void* mem_opaque,
void (*memory_rw)(void *opaque, target_phys_addr_t addr, uint8_t *buf, int len, int is_write))
{
dp8393xState *s;
int io;
qemu_check_nic_model(nd, "dp83932");
... | {
"code": [
" int io;",
" nic_receive, nic_can_receive, s);",
" io = cpu_register_io_memory(0, dp8393x_read, dp8393x_write, s);",
" cpu_register_physical_memory(base, 0x40 << it_shift, io);",
" nic_receive, nic_can_receive, s... | void FUNC_0(NICInfo *VAR_0, target_phys_addr_t VAR_1, int VAR_2,
qemu_irq VAR_3, void* VAR_4,
void (*VAR_5)(void *VAR_6, target_phys_addr_t VAR_7, uint8_t *VAR_8, int VAR_9, int VAR_10))
{
dp8393xState *s;
int VAR_11;
qemu_check_nic_model(VAR_0, "dp83932");
... | [
"void FUNC_0(NICInfo *VAR_0, target_phys_addr_t VAR_1, int VAR_2,\nqemu_irq VAR_3, void* VAR_4,\nvoid (*VAR_5)(void *VAR_6, target_phys_addr_t VAR_7, uint8_t *VAR_8, int VAR_9, int VAR_10))\n{",
"dp8393xState *s;",
"int VAR_11;",
"qemu_check_nic_model(VAR_0, \"dp83932\");",
"s = qemu_mallocz(sizeof(dp8393xS... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
1,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37,
39
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
]
] |
3,716 | static void v9fs_readdir(void *opaque)
{
int32_t fid;
V9fsFidState *fidp;
ssize_t retval = 0;
size_t offset = 7;
int64_t initial_offset;
int32_t count, max_count;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "dqd", &fid, &initial_offset, &max_c... | true | qemu | c572f23a3e7180dbeab5e86583e43ea2afed6271 | static void v9fs_readdir(void *opaque)
{
int32_t fid;
V9fsFidState *fidp;
ssize_t retval = 0;
size_t offset = 7;
int64_t initial_offset;
int32_t count, max_count;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "dqd", &fid, &initial_offset, &max_c... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
int32_t fid;
V9fsFidState *fidp;
ssize_t retval = 0;
size_t offset = 7;
int64_t initial_offset;
int32_t count, max_count;
V9fsPDU *pdu = VAR_0;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "dqd", &fid, &initial_offset, &max_count);
... | [
"static void FUNC_0(void *VAR_0)\n{",
"int32_t fid;",
"V9fsFidState *fidp;",
"ssize_t retval = 0;",
"size_t offset = 7;",
"int64_t initial_offset;",
"int32_t count, max_count;",
"V9fsPDU *pdu = VAR_0;",
"V9fsState *s = pdu->s;",
"pdu_unmarshal(pdu, offset, \"dqd\", &fid, &initial_offset, &max_coun... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
3,717 | static int IRQ_get_next(OpenPICState *opp, IRQ_queue_t *q)
{
if (q->next == -1) {
/* XXX: optimize */
IRQ_check(opp, q);
}
return q->next;
}
| true | qemu | af7e9e74c6a62a5bcd911726a9e88d28b61490e0 | static int IRQ_get_next(OpenPICState *opp, IRQ_queue_t *q)
{
if (q->next == -1) {
IRQ_check(opp, q);
}
return q->next;
}
| {
"code": [
"static int IRQ_get_next(OpenPICState *opp, IRQ_queue_t *q)"
],
"line_no": [
1
]
} | static int FUNC_0(OpenPICState *VAR_0, IRQ_queue_t *VAR_1)
{
if (VAR_1->next == -1) {
IRQ_check(VAR_0, VAR_1);
}
return VAR_1->next;
}
| [
"static int FUNC_0(OpenPICState *VAR_0, IRQ_queue_t *VAR_1)\n{",
"if (VAR_1->next == -1) {",
"IRQ_check(VAR_0, VAR_1);",
"}",
"return VAR_1->next;",
"}"
] | [
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
15
],
[
17
]
] |
3,718 | int ff_h264_queue_decode_slice(H264Context *h, const H2645NAL *nal)
{
H264SliceContext *sl = h->slice_ctx + h->nb_slice_ctx_queued;
int first_slice = sl == h->slice_ctx && !h->current_slice;
int ret;
sl->gb = nal->gb;
ret = h264_slice_header_parse(h, sl, nal);
if (ret < 0)
re... | true | FFmpeg | c03029a835949fc0e68b4c6558ebcdc3ae137087 | int ff_h264_queue_decode_slice(H264Context *h, const H2645NAL *nal)
{
H264SliceContext *sl = h->slice_ctx + h->nb_slice_ctx_queued;
int first_slice = sl == h->slice_ctx && !h->current_slice;
int ret;
sl->gb = nal->gb;
ret = h264_slice_header_parse(h, sl, nal);
if (ret < 0)
re... | {
"code": [
" if (sl->redundant_pic_count > 0)"
],
"line_no": [
27
]
} | int FUNC_0(H264Context *VAR_0, const H2645NAL *VAR_1)
{
H264SliceContext *sl = VAR_0->slice_ctx + VAR_0->nb_slice_ctx_queued;
int VAR_2 = sl == VAR_0->slice_ctx && !VAR_0->current_slice;
int VAR_3;
sl->gb = VAR_1->gb;
VAR_3 = h264_slice_header_parse(VAR_0, sl, VAR_1);
if (VAR_3 < 0)
... | [
"int FUNC_0(H264Context *VAR_0, const H2645NAL *VAR_1)\n{",
"H264SliceContext *sl = VAR_0->slice_ctx + VAR_0->nb_slice_ctx_queued;",
"int VAR_2 = sl == VAR_0->slice_ctx && !VAR_0->current_slice;",
"int VAR_3;",
"sl->gb = VAR_1->gb;",
"VAR_3 = h264_slice_header_parse(VAR_0, sl, VAR_1);",
"if (VAR_3 < 0)\... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19,
21
],
[
27,
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
55
],
[
57
],
[
61
... |
3,719 | static void end_frame(AVFilterLink *inlink)
{
GradFunContext *gf = inlink->dst->priv;
AVFilterBufferRef *inpic = inlink->cur_buf;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFilterBufferRef *outpic = outlink->out_buf;
int p;
for (p = 0; p < 4 && inpic->data[p]; p++) {
in... | true | FFmpeg | 69b8d83ecf5f6deb9ad94bdaa816aa205430d3e9 | static void end_frame(AVFilterLink *inlink)
{
GradFunContext *gf = inlink->dst->priv;
AVFilterBufferRef *inpic = inlink->cur_buf;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFilterBufferRef *outpic = outlink->out_buf;
int p;
for (p = 0; p < 4 && inpic->data[p]; p++) {
in... | {
"code": [
" avfilter_unref_buffer(outpic);"
],
"line_no": [
55
]
} | static void FUNC_0(AVFilterLink *VAR_0)
{
GradFunContext *gf = VAR_0->dst->priv;
AVFilterBufferRef *inpic = VAR_0->cur_buf;
AVFilterLink *outlink = VAR_0->dst->outputs[0];
AVFilterBufferRef *outpic = outlink->out_buf;
int VAR_1;
for (VAR_1 = 0; VAR_1 < 4 && inpic->data[VAR_1]; VAR_1++) ... | [
"static void FUNC_0(AVFilterLink *VAR_0)\n{",
"GradFunContext *gf = VAR_0->dst->priv;",
"AVFilterBufferRef *inpic = VAR_0->cur_buf;",
"AVFilterLink *outlink = VAR_0->dst->outputs[0];",
"AVFilterBufferRef *outpic = outlink->out_buf;",
"int VAR_1;",
"for (VAR_1 = 0; VAR_1 < 4 && inpic->data[VAR_1]; VAR_1+... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37,
39
],
[
41,
43
],
[
45
],
[
49
... |
3,720 | SCSIRequest *scsi_req_find(SCSIDevice *d, uint32_t tag)
{
SCSIRequest *req;
QTAILQ_FOREACH(req, &d->requests, next) {
if (req->tag == tag) {
return req;
}
}
return NULL;
}
| true | qemu | 5c6c0e513600ba57c3e73b7151d3c0664438f7b5 | SCSIRequest *scsi_req_find(SCSIDevice *d, uint32_t tag)
{
SCSIRequest *req;
QTAILQ_FOREACH(req, &d->requests, next) {
if (req->tag == tag) {
return req;
}
}
return NULL;
}
| {
"code": [
"SCSIRequest *scsi_req_find(SCSIDevice *d, uint32_t tag)",
" SCSIRequest *req;",
" QTAILQ_FOREACH(req, &d->requests, next) {",
" if (req->tag == tag) {",
" return req;",
" return NULL;"
],
"line_no": [
1,
5,
9,
11,
13,
19
]
} | SCSIRequest *FUNC_0(SCSIDevice *d, uint32_t tag)
{
SCSIRequest *req;
QTAILQ_FOREACH(req, &d->requests, next) {
if (req->tag == tag) {
return req;
}
}
return NULL;
}
| [
"SCSIRequest *FUNC_0(SCSIDevice *d, uint32_t tag)\n{",
"SCSIRequest *req;",
"QTAILQ_FOREACH(req, &d->requests, next) {",
"if (req->tag == tag) {",
"return req;",
"}",
"}",
"return NULL;",
"}"
] | [
1,
1,
1,
1,
1,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
3,723 | static void vbe_update_vgaregs(VGACommonState *s)
{
int h, shift_control;
if (!vbe_enabled(s)) {
/* vbe is turned off -- nothing to do */
return;
}
/* graphic mode + memory map 1 */
s->gr[VGA_GFX_MISC] = (s->gr[VGA_GFX_MISC] & ~0x0c) | 0x04 |
VGA_GR06_GRAPHICS_MO... | true | qemu | 94ef4f337fb614f18b765a8e0e878a4c23cdedcd | static void vbe_update_vgaregs(VGACommonState *s)
{
int h, shift_control;
if (!vbe_enabled(s)) {
return;
}
s->gr[VGA_GFX_MISC] = (s->gr[VGA_GFX_MISC] & ~0x0c) | 0x04 |
VGA_GR06_GRAPHICS_MODE;
s->cr[VGA_CRTC_MODE] |= 3;
s->cr[VGA_CRTC_OFFSET] = s->vbe... | {
"code": [
" s->sr[VGA_SEQ_MEMORY_MODE] |= VGA_SR04_CHN_4M;",
" s->sr[VGA_SEQ_PLANE_WRITE] |= VGA_SR02_ALL_PLANES;"
],
"line_no": [
67,
71
]
} | static void FUNC_0(VGACommonState *VAR_0)
{
int VAR_1, VAR_2;
if (!vbe_enabled(VAR_0)) {
return;
}
VAR_0->gr[VGA_GFX_MISC] = (VAR_0->gr[VGA_GFX_MISC] & ~0x0c) | 0x04 |
VGA_GR06_GRAPHICS_MODE;
VAR_0->cr[VGA_CRTC_MODE] |= 3;
VAR_0->cr[VGA_CRTC_OFFSET] ... | [
"static void FUNC_0(VGACommonState *VAR_0)\n{",
"int VAR_1, VAR_2;",
"if (!vbe_enabled(VAR_0)) {",
"return;",
"}",
"VAR_0->gr[VGA_GFX_MISC] = (VAR_0->gr[VGA_GFX_MISC] & ~0x0c) | 0x04 |\nVGA_GR06_GRAPHICS_MODE;",
"VAR_0->cr[VGA_CRTC_MODE] |= 3;",
"VAR_0->cr[VGA_CRTC_OFFSET] = VAR_0->vbe_line_offset >> ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
21,
23
],
[
25
],
[
27
],
[
31,
33
],
[
37
],
[
39
],
[
41,
43
],
[
47
],
[
49
],
[
51
],
[
55
],
[
57
],
[
59
],
... |
3,724 | static void nvdimm_dsm_set_label_data(NVDIMMDevice *nvdimm, NvdimmDsmIn *in,
hwaddr dsm_mem_addr)
{
NVDIMMClass *nvc = NVDIMM_GET_CLASS(nvdimm);
NvdimmFuncSetLabelDataIn *set_label_data;
uint32_t status;
set_label_data = (NvdimmFuncSetLabelDataIn *)in->arg3;... | true | qemu | 53000638f233d6ba1d584a68b74f2cde79615b80 | static void nvdimm_dsm_set_label_data(NVDIMMDevice *nvdimm, NvdimmDsmIn *in,
hwaddr dsm_mem_addr)
{
NVDIMMClass *nvc = NVDIMM_GET_CLASS(nvdimm);
NvdimmFuncSetLabelDataIn *set_label_data;
uint32_t status;
set_label_data = (NvdimmFuncSetLabelDataIn *)in->arg3;... | {
"code": [
" assert(sizeof(*in) + sizeof(*set_label_data) + set_label_data->length <=",
" 4096);"
],
"line_no": [
45,
47
]
} | static void FUNC_0(NVDIMMDevice *VAR_0, NvdimmDsmIn *VAR_1,
hwaddr VAR_2)
{
NVDIMMClass *nvc = NVDIMM_GET_CLASS(VAR_0);
NvdimmFuncSetLabelDataIn *set_label_data;
uint32_t status;
set_label_data = (NvdimmFuncSetLabelDataIn *)VAR_1->arg3;
le32_to_cpus(&... | [
"static void FUNC_0(NVDIMMDevice *VAR_0, NvdimmDsmIn *VAR_1,\nhwaddr VAR_2)\n{",
"NVDIMMClass *nvc = NVDIMM_GET_CLASS(VAR_0);",
"NvdimmFuncSetLabelDataIn *set_label_data;",
"uint32_t status;",
"set_label_data = (NvdimmFuncSetLabelDataIn *)VAR_1->arg3;",
"le32_to_cpus(&set_label_data->offset);",
"le32_to... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
25,
27
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45,
47
],
[
51,
53
],
[
55
],
[
57
]
] |
3,725 | static int64_t load_kernel (CPUMIPSState *env)
{
int64_t kernel_entry, kernel_low, kernel_high;
int index = 0;
long initrd_size;
ram_addr_t initrd_offset;
uint32_t *prom_buf;
long prom_size;
if (load_elf(loaderparams.kernel_filename, cpu_mips_kseg0_to_phys, NULL,
... | true | qemu | 3ad9fd5a257794d516db515c217c78a5806112fe | static int64_t load_kernel (CPUMIPSState *env)
{
int64_t kernel_entry, kernel_low, kernel_high;
int index = 0;
long initrd_size;
ram_addr_t initrd_offset;
uint32_t *prom_buf;
long prom_size;
if (load_elf(loaderparams.kernel_filename, cpu_mips_kseg0_to_phys, NULL,
... | {
"code": [],
"line_no": []
} | static int64_t FUNC_0 (CPUMIPSState *env)
{
int64_t kernel_entry, kernel_low, kernel_high;
int VAR_0 = 0;
long VAR_1;
ram_addr_t initrd_offset;
uint32_t *prom_buf;
long VAR_2;
if (load_elf(loaderparams.kernel_filename, cpu_mips_kseg0_to_phys, NULL,
(uint64_t *)&ke... | [
"static int64_t FUNC_0 (CPUMIPSState *env)\n{",
"int64_t kernel_entry, kernel_low, kernel_high;",
"int VAR_0 = 0;",
"long VAR_1;",
"ram_addr_t initrd_offset;",
"uint32_t *prom_buf;",
"long VAR_2;",
"if (load_elf(loaderparams.kernel_filename, cpu_mips_kseg0_to_phys, NULL,\n(uint64_t *)&kernel_entry, (u... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21,
23
],
[
25,
27
],
[
29
],
[
31
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
3,726 | static inline void decode_subband_slice_buffered(SnowContext *s, SubBand *b, slice_buffer * sb, int start_y, int h, int save_state[1]){
const int w= b->width;
int y;
const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16);
int qmul= ff_qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT);
int qadd= (s->qbias*q... | true | FFmpeg | 732f9764561558a388c05483ed6a722a5c67b05c | static inline void decode_subband_slice_buffered(SnowContext *s, SubBand *b, slice_buffer * sb, int start_y, int h, int save_state[1]){
const int w= b->width;
int y;
const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16);
int qmul= ff_qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT);
int qadd= (s->qbias*q... | {
"code": [
" register int t= ( (v>>1)*qmul + qadd)>>QEXPSHIFT;"
],
"line_no": [
53
]
} | static inline void FUNC_0(SnowContext *VAR_0, SubBand *VAR_1, slice_buffer * VAR_2, int VAR_3, int VAR_4, int VAR_5[1]){
const int VAR_6= VAR_1->width;
int VAR_7;
const int VAR_8= av_clip(VAR_0->VAR_8 + VAR_1->VAR_8, 0, QROOT*16);
int VAR_9= ff_qexp[VAR_8&(QROOT-1)]<<(VAR_8>>QSHIFT);
int VAR_10... | [
"static inline void FUNC_0(SnowContext *VAR_0, SubBand *VAR_1, slice_buffer * VAR_2, int VAR_3, int VAR_4, int VAR_5[1]){",
"const int VAR_6= VAR_1->width;",
"int VAR_7;",
"const int VAR_8= av_clip(VAR_0->VAR_8 + VAR_1->VAR_8, 0, QROOT*16);",
"int VAR_9= ff_qexp[VAR_8&(QROOT-1)]<<(VAR_8>>QSHIFT);",
"int V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
29,
31
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
3,727 | static void coroutine_fn aio_read_response(void *opaque)
{
SheepdogObjRsp rsp;
BDRVSheepdogState *s = opaque;
int fd = s->fd;
int ret;
AIOReq *aio_req = NULL;
SheepdogAIOCB *acb;
uint64_t idx;
/* read a header */
ret = qemu_co_recv(fd, &rsp, sizeof(rsp));
if (ret != ... | true | qemu | b544c1aba8681c2fe5d6715fbd37cf6caf1bc7bb | static void coroutine_fn aio_read_response(void *opaque)
{
SheepdogObjRsp rsp;
BDRVSheepdogState *s = opaque;
int fd = s->fd;
int ret;
AIOReq *aio_req = NULL;
SheepdogAIOCB *acb;
uint64_t idx;
ret = qemu_co_recv(fd, &rsp, sizeof(rsp));
if (ret != sizeof(rsp)) {
... | {
"code": [
" if (s->inode.data_vdi_id[idx] != s->inode.vdi_id) {"
],
"line_no": [
81
]
} | static void VAR_0 aio_read_response(void *opaque)
{
SheepdogObjRsp rsp;
BDRVSheepdogState *s = opaque;
int fd = s->fd;
int ret;
AIOReq *aio_req = NULL;
SheepdogAIOCB *acb;
uint64_t idx;
ret = qemu_co_recv(fd, &rsp, sizeof(rsp));
if (ret != sizeof(rsp)) {
er... | [
"static void VAR_0 aio_read_response(void *opaque)\n{",
"SheepdogObjRsp rsp;",
"BDRVSheepdogState *s = opaque;",
"int fd = s->fd;",
"int ret;",
"AIOReq *aio_req = NULL;",
"SheepdogAIOCB *acb;",
"uint64_t idx;",
"ret = qemu_co_recv(fd, &rsp, sizeof(rsp));",
"if (ret != sizeof(rsp)) {",
"error_rep... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
3,728 | static void dec_rcsr(DisasContext *dc)
{
LOG_DIS("rcsr r%d, %d\n", dc->r2, dc->csr);
switch (dc->csr) {
case CSR_IE:
tcg_gen_mov_tl(cpu_R[dc->r2], cpu_ie);
break;
case CSR_IM:
gen_helper_rcsr_im(cpu_R[dc->r2], cpu_env);
break;
case CSR_IP:
gen_hel... | true | qemu | 3604a76fea6ff37738d4a8f596be38407be74a83 | static void dec_rcsr(DisasContext *dc)
{
LOG_DIS("rcsr r%d, %d\n", dc->r2, dc->csr);
switch (dc->csr) {
case CSR_IE:
tcg_gen_mov_tl(cpu_R[dc->r2], cpu_ie);
break;
case CSR_IM:
gen_helper_rcsr_im(cpu_R[dc->r2], cpu_env);
break;
case CSR_IP:
gen_hel... | {
"code": [
" cpu_abort(dc->env, \"invalid read access csr=%x\\n\", dc->csr);",
" cpu_abort(dc->env, \"read_csr: unknown csr=%x\\n\", dc->csr);"
],
"line_no": [
91,
97
]
} | static void FUNC_0(DisasContext *VAR_0)
{
LOG_DIS("rcsr r%d, %d\n", VAR_0->r2, VAR_0->csr);
switch (VAR_0->csr) {
case CSR_IE:
tcg_gen_mov_tl(cpu_R[VAR_0->r2], cpu_ie);
break;
case CSR_IM:
gen_helper_rcsr_im(cpu_R[VAR_0->r2], cpu_env);
break;
case CSR_IP:
... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"LOG_DIS(\"rcsr r%d, %d\\n\", VAR_0->r2, VAR_0->csr);",
"switch (VAR_0->csr) {",
"case CSR_IE:\ntcg_gen_mov_tl(cpu_R[VAR_0->r2], cpu_ie);",
"break;",
"case CSR_IM:\ngen_helper_rcsr_im(cpu_R[VAR_0->r2], cpu_env);",
"break;",
"case CSR_IP:\ngen_helper_rcsr_i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47,
49
],
... |
3,729 | uint64_t helper_mulldo(CPUPPCState *env, uint64_t arg1, uint64_t arg2)
{
int64_t th;
uint64_t tl;
muls64(&tl, (uint64_t *)&th, arg1, arg2);
/* If th != 0 && th != -1, then we had an overflow */
if (likely((uint64_t)(th + 1) <= 1)) {
env->ov = 0;
} else {
env->so = env-... | true | qemu | 9824d01d5d789a57d27360c0f5e8ee44955eb1d7 | uint64_t helper_mulldo(CPUPPCState *env, uint64_t arg1, uint64_t arg2)
{
int64_t th;
uint64_t tl;
muls64(&tl, (uint64_t *)&th, arg1, arg2);
if (likely((uint64_t)(th + 1) <= 1)) {
env->ov = 0;
} else {
env->so = env->ov = 1;
}
return (int64_t)tl;
}
| {
"code": [
" if (likely((uint64_t)(th + 1) <= 1)) {"
],
"line_no": [
15
]
} | uint64_t FUNC_0(CPUPPCState *env, uint64_t arg1, uint64_t arg2)
{
int64_t th;
uint64_t tl;
muls64(&tl, (uint64_t *)&th, arg1, arg2);
if (likely((uint64_t)(th + 1) <= 1)) {
env->ov = 0;
} else {
env->so = env->ov = 1;
}
return (int64_t)tl;
}
| [
"uint64_t FUNC_0(CPUPPCState *env, uint64_t arg1, uint64_t arg2)\n{",
"int64_t th;",
"uint64_t tl;",
"muls64(&tl, (uint64_t *)&th, arg1, arg2);",
"if (likely((uint64_t)(th + 1) <= 1)) {",
"env->ov = 0;",
"} else {",
"env->so = env->ov = 1;",
"}",
"return (int64_t)tl;",
"}"
] | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
3,730 | static void pc_init1(MemoryRegion *system_memory,
MemoryRegion *system_io,
ram_addr_t ram_size,
const char *boot_device,
const char *kernel_filename,
const char *kernel_cmdline,
const char... | true | qemu | 398489018183d613306ab022653552247d93919f | static void pc_init1(MemoryRegion *system_memory,
MemoryRegion *system_io,
ram_addr_t ram_size,
const char *boot_device,
const char *kernel_filename,
const char *kernel_cmdline,
const char... | {
"code": [
" } else {",
" if (ram_size <= 0x80000000)",
" guest_info->pci_info.w32.begin = 0x80000000;",
" else if (ram_size <= 0xc0000000)",
" guest_info->pci_info.w32.begin = 0xc0000000;",
" guest_info->pci_info.w32.begin = 0xe0000000;",
" ... | static void FUNC_0(MemoryRegion *VAR_0,
MemoryRegion *VAR_1,
ram_addr_t VAR_2,
const char *VAR_3,
const char *VAR_4,
const char *VAR_5,
const char *VAR_6,
const char ... | [
"static void FUNC_0(MemoryRegion *VAR_0,\nMemoryRegion *VAR_1,\nram_addr_t VAR_2,\nconst char *VAR_3,\nconst char *VAR_4,\nconst char *VAR_5,\nconst char *VAR_6,\nconst char *VAR_7,\nint VAR_8,\nint VAR_9)\n{",
"int VAR_10;",
"ram_addr_t below_4g_mem_size, above_4g_mem_size;",
"PCIBus *pci_bus;",
"ISABus *i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11,
13,
15,
17,
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
3,732 | static void verify_irqchip_in_kernel(Error **errp)
{
if (kvm_irqchip_in_kernel()) {
return;
}
error_setg(errp, "pci-assign requires KVM with in-kernel irqchip enabled");
}
| true | qemu | 6b728b31163bbd0788fe7d537931c4624cd24215 | static void verify_irqchip_in_kernel(Error **errp)
{
if (kvm_irqchip_in_kernel()) {
return;
}
error_setg(errp, "pci-assign requires KVM with in-kernel irqchip enabled");
}
| {
"code": [
"static void verify_irqchip_in_kernel(Error **errp)"
],
"line_no": [
1
]
} | static void FUNC_0(Error **VAR_0)
{
if (kvm_irqchip_in_kernel()) {
return;
}
error_setg(VAR_0, "pci-assign requires KVM with in-kernel irqchip enabled");
}
| [
"static void FUNC_0(Error **VAR_0)\n{",
"if (kvm_irqchip_in_kernel()) {",
"return;",
"}",
"error_setg(VAR_0, \"pci-assign requires KVM with in-kernel irqchip enabled\");",
"}"
] | [
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
3,733 | static int ogg_write_header(AVFormatContext *s)
{
OGGContext *ogg = s->priv_data;
OGGStreamContext *oggstream = NULL;
int i, j;
if (ogg->pref_size)
av_log(s, AV_LOG_WARNING, "The pagesize option is deprecated\n");
for (i = 0; i < s->nb_streams; i++) {
AVStream *st = s->st... | true | FFmpeg | 919c320f7226bf873a9148e1db8994745f9d425d | static int ogg_write_header(AVFormatContext *s)
{
OGGContext *ogg = s->priv_data;
OGGStreamContext *oggstream = NULL;
int i, j;
if (ogg->pref_size)
av_log(s, AV_LOG_WARNING, "The pagesize option is deprecated\n");
for (i = 0; i < s->nb_streams; i++) {
AVStream *st = s->st... | {
"code": [
" ogg_write_pages(s, 1);"
],
"line_no": [
273
]
} | static int FUNC_0(AVFormatContext *VAR_0)
{
OGGContext *ogg = VAR_0->priv_data;
OGGStreamContext *oggstream = NULL;
int VAR_1, VAR_2;
if (ogg->pref_size)
av_log(VAR_0, AV_LOG_WARNING, "The pagesize option is deprecated\n");
for (VAR_1 = 0; VAR_1 < VAR_0->nb_streams; VAR_1++) {
... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"OGGContext *ogg = VAR_0->priv_data;",
"OGGStreamContext *oggstream = NULL;",
"int VAR_1, VAR_2;",
"if (ogg->pref_size)\nav_log(VAR_0, AV_LOG_WARNING, \"The pagesize option is deprecated\\n\");",
"for (VAR_1 = 0; VAR_1 < VAR_0->nb_streams; VAR_1++) {",
"AV... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29,
33
],
[
35,
37
],
[
39
],
[
41
],
[
43,
45,
47,
49,
51
],
[
53
],
[
55
],
[... |
3,734 | static int write_refcount_block(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
size_t size = s->cluster_size;
if (s->refcount_block_cache_offset == 0) {
return 0;
}
BLKDBG_EVENT(bs->file, BLKDBG_REFBLOCK_UPDATE);
if (bdrv_pwrite(bs->file, s->refcount_block_cache_offse... | true | qemu | 8b3b720620a1137a1b794fc3ed64734236f94e06 | static int write_refcount_block(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
size_t size = s->cluster_size;
if (s->refcount_block_cache_offset == 0) {
return 0;
}
BLKDBG_EVENT(bs->file, BLKDBG_REFBLOCK_UPDATE);
if (bdrv_pwrite(bs->file, s->refcount_block_cache_offse... | {
"code": [
" if (bdrv_pwrite(bs->file, s->refcount_block_cache_offset,",
" s->refcount_block_cache, size) != size)"
],
"line_no": [
21,
23
]
} | static int FUNC_0(BlockDriverState *VAR_0)
{
BDRVQcowState *s = VAR_0->opaque;
size_t size = s->cluster_size;
if (s->refcount_block_cache_offset == 0) {
return 0;
}
BLKDBG_EVENT(VAR_0->file, BLKDBG_REFBLOCK_UPDATE);
if (bdrv_pwrite(VAR_0->file, s->refcount_block_cache_offset,... | [
"static int FUNC_0(BlockDriverState *VAR_0)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"size_t size = s->cluster_size;",
"if (s->refcount_block_cache_offset == 0) {",
"return 0;",
"}",
"BLKDBG_EVENT(VAR_0->file, BLKDBG_REFBLOCK_UPDATE);",
"if (bdrv_pwrite(VAR_0->file, s->refcount_block_cache_offset,\ns... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23,
25
],
[
27
],
[
29
],
[
33
],
[
35
]
] |
3,735 | static int aiff_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
AVStream *st = s->streams[0];
AIFFInputContext *aiff = s->priv_data;
int64_t max_size;
int res, size;
/* calculate size of remaining data */
max_size = aiff->data_end - avio_tell(s->pb);
i... | true | FFmpeg | 7effbee66cf457c62f795d9b9ed3a1110b364b89 | static int aiff_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
AVStream *st = s->streams[0];
AIFFInputContext *aiff = s->priv_data;
int64_t max_size;
int res, size;
max_size = aiff->data_end - avio_tell(s->pb);
if (max_size <= 0)
return AVER... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0,
AVPacket *VAR_1)
{
AVStream *st = VAR_0->streams[0];
AIFFInputContext *aiff = VAR_0->priv_data;
int64_t max_size;
int VAR_2, VAR_3;
max_size = aiff->data_end - avio_tell(VAR_0->pb);
if (max_size <= 0)
... | [
"static int FUNC_0(AVFormatContext *VAR_0,\nAVPacket *VAR_1)\n{",
"AVStream *st = VAR_0->streams[0];",
"AIFFInputContext *aiff = VAR_0->priv_data;",
"int64_t max_size;",
"int VAR_2, VAR_3;",
"max_size = aiff->data_end - avio_tell(VAR_0->pb);",
"if (max_size <= 0)\nreturn AVERROR_EOF;",
"if (st->codec-... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
19
],
[
21,
23
],
[
29,
31
],
[
33,
35
],
[
37
],
[
39
],
[
41,
43
],
[
51
],
[
53
],
[
55
],
[
57
]
] |
3,736 | static target_long monitor_get_ccr (const struct MonitorDef *md, int val)
{
CPUArchState *env = mon_get_cpu();
unsigned int u;
int i;
u = 0;
for (i = 0; i < 8; i++)
u |= env->crf[i] << (32 - (4 * i));
return u;
}
| true | qemu | d29811806067de1516c2f94c0a81885fe2076fc8 | static target_long monitor_get_ccr (const struct MonitorDef *md, int val)
{
CPUArchState *env = mon_get_cpu();
unsigned int u;
int i;
u = 0;
for (i = 0; i < 8; i++)
u |= env->crf[i] << (32 - (4 * i));
return u;
}
| {
"code": [
" u |= env->crf[i] << (32 - (4 * i));"
],
"line_no": [
17
]
} | static target_long FUNC_0 (const struct MonitorDef *md, int val)
{
CPUArchState *env = mon_get_cpu();
unsigned int VAR_0;
int VAR_1;
VAR_0 = 0;
for (VAR_1 = 0; VAR_1 < 8; VAR_1++)
VAR_0 |= env->crf[VAR_1] << (32 - (4 * VAR_1));
return VAR_0;
}
| [
"static target_long FUNC_0 (const struct MonitorDef *md, int val)\n{",
"CPUArchState *env = mon_get_cpu();",
"unsigned int VAR_0;",
"int VAR_1;",
"VAR_0 = 0;",
"for (VAR_1 = 0; VAR_1 < 8; VAR_1++)",
"VAR_0 |= env->crf[VAR_1] << (32 - (4 * VAR_1));",
"return VAR_0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
3,737 | static void yae_clear(ATempoContext *atempo)
{
atempo->size = 0;
atempo->head = 0;
atempo->tail = 0;
atempo->drift = 0;
atempo->nfrag = 0;
atempo->state = YAE_LOAD_FRAGMENT;
atempo->position[0] = 0;
atempo->position[1] = 0;
atempo->frag[0].position[0] = 0;
atempo... | false | FFmpeg | d38c173dfb4bbee19ec341202c6c79bb0aa2cdad | static void yae_clear(ATempoContext *atempo)
{
atempo->size = 0;
atempo->head = 0;
atempo->tail = 0;
atempo->drift = 0;
atempo->nfrag = 0;
atempo->state = YAE_LOAD_FRAGMENT;
atempo->position[0] = 0;
atempo->position[1] = 0;
atempo->frag[0].position[0] = 0;
atempo... | {
"code": [],
"line_no": []
} | static void FUNC_0(ATempoContext *VAR_0)
{
VAR_0->size = 0;
VAR_0->head = 0;
VAR_0->tail = 0;
VAR_0->drift = 0;
VAR_0->nfrag = 0;
VAR_0->state = YAE_LOAD_FRAGMENT;
VAR_0->position[0] = 0;
VAR_0->position[1] = 0;
VAR_0->frag[0].position[0] = 0;
VAR_0->frag[0].posi... | [
"static void FUNC_0(ATempoContext *VAR_0)\n{",
"VAR_0->size = 0;",
"VAR_0->head = 0;",
"VAR_0->tail = 0;",
"VAR_0->drift = 0;",
"VAR_0->nfrag = 0;",
"VAR_0->state = YAE_LOAD_FRAGMENT;",
"VAR_0->position[0] = 0;",
"VAR_0->position[1] = 0;",
"VAR_0->frag[0].position[0] = 0;",
"VAR_0->frag[0].posit... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
49
],
[
51
],
[
55
],
[
57
],
[
59
... |
3,739 | static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s,
Jpeg2000CodingStyle *codsty,
Jpeg2000ResLevel *rlevel, int precno,
int layno, uint8_t *expn, int numgbits)
{
int bandno, cblkno, ret, nb_code_blocks... | false | FFmpeg | 914ab4cd1c59eae10771f2d6a892ec6b6f36b0e2 | static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s,
Jpeg2000CodingStyle *codsty,
Jpeg2000ResLevel *rlevel, int precno,
int layno, uint8_t *expn, int numgbits)
{
int bandno, cblkno, ret, nb_code_blocks... | {
"code": [],
"line_no": []
} | static int FUNC_0(Jpeg2000DecoderContext *VAR_0,
Jpeg2000CodingStyle *VAR_1,
Jpeg2000ResLevel *VAR_2, int VAR_3,
int VAR_4, uint8_t *VAR_5, int VAR_6)
{
int VAR_7, VAR_8, VAR_9, VAR_10;
if (!(VAR_9 = ge... | [
"static int FUNC_0(Jpeg2000DecoderContext *VAR_0,\nJpeg2000CodingStyle *VAR_1,\nJpeg2000ResLevel *VAR_2, int VAR_3,\nint VAR_4, uint8_t *VAR_5, int VAR_6)\n{",
"int VAR_7, VAR_8, VAR_9, VAR_10;",
"if (!(VAR_9 = get_bits(VAR_0, 1))) {",
"jpeg2000_flush(VAR_0);",
"return 0;",
"} else if (VAR_9 < 0)",
"ret... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35,
37,
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[
53
... |
3,740 | void ff_celp_lp_synthesis_filterf(float *out, const float *filter_coeffs,
const float* in, int buffer_length,
int filter_length)
{
int i,n;
#if 0 // Unoptimized code path for improved readability
for (n = 0; n < buffer_length; n++) {
... | false | FFmpeg | f52b8717617e94da90a45afdfff23e94f9ecf35c | void ff_celp_lp_synthesis_filterf(float *out, const float *filter_coeffs,
const float* in, int buffer_length,
int filter_length)
{
int i,n;
#if 0
for (n = 0; n < buffer_length; n++) {
out[n] = in[n];
for (i = 1; i <= ... | {
"code": [],
"line_no": []
} | void FUNC_0(float *VAR_0, const float *VAR_1,
const float* VAR_2, int VAR_3,
int VAR_4)
{
int VAR_5,VAR_6;
#if 0
for (VAR_6 = 0; VAR_6 < VAR_3; VAR_6++) {
VAR_0[VAR_6] = VAR_2[VAR_6];
for (VAR_5 = 1; VAR_5 <= VAR_4; V... | [
"void FUNC_0(float *VAR_0, const float *VAR_1,\nconst float* VAR_2, int VAR_3,\nint VAR_4)\n{",
"int VAR_5,VAR_6;",
"#if 0\nfor (VAR_6 = 0; VAR_6 < VAR_3; VAR_6++) {",
"VAR_0[VAR_6] = VAR_2[VAR_6];",
"for (VAR_5 = 1; VAR_5 <= VAR_4; VAR_5++)",
"VAR_0[VAR_6] -= VAR_1[VAR_5-1] * VAR_0[VAR_6-VAR_5];",
"}",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
... |
3,741 | static int decode_b_picture_header(VC9Context *v)
{
int pqindex;
/* Prolog common to all frametypes should be done in caller */
if (v->profile == PROFILE_SIMPLE)
{
av_log(v, AV_LOG_ERROR, "Found a B frame while in Simple Profile!\n");
return FRAME_SKIPED;
}
v->bfract... | false | FFmpeg | e5540b3fd30367ce3cc33b2f34a04b660dbc4b38 | static int decode_b_picture_header(VC9Context *v)
{
int pqindex;
if (v->profile == PROFILE_SIMPLE)
{
av_log(v, AV_LOG_ERROR, "Found a B frame while in Simple Profile!\n");
return FRAME_SKIPED;
}
v->bfraction = vc9_bfraction_lut[get_vlc2(&v->gb, vc9_bfraction_vlc.tab... | {
"code": [],
"line_no": []
} | static int FUNC_0(VC9Context *VAR_0)
{
int VAR_1;
if (VAR_0->profile == PROFILE_SIMPLE)
{
av_log(VAR_0, AV_LOG_ERROR, "Found a B frame while in Simple Profile!\n");
return FRAME_SKIPED;
}
VAR_0->bfraction = vc9_bfraction_lut[get_vlc2(&VAR_0->gb, vc9_bfraction_vlc.ta... | [
"static int FUNC_0(VC9Context *VAR_0)\n{",
"int VAR_1;",
"if (VAR_0->profile == PROFILE_SIMPLE)\n{",
"av_log(VAR_0, AV_LOG_ERROR, \"Found a B frame while in Simple Profile!\\n\");",
"return FRAME_SKIPED;",
"}",
"VAR_0->bfraction = vc9_bfraction_lut[get_vlc2(&VAR_0->gb, vc9_bfraction_vlc.table,\nVC9_BFRA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
11,
13
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
43
],
[
45
],
[
51
],
[
53,
55
],
[
57,
5... |
3,742 | static int sipr_decode_frame(AVCodecContext *avctx, void *datap,
int *data_size, AVPacket *avpkt)
{
SiprContext *ctx = avctx->priv_data;
const uint8_t *buf=avpkt->data;
SiprParameters parm;
const SiprModeParam *mode_par = &modes[ctx->mode];
GetBitContext gb;
... | false | FFmpeg | 1b5a189f06879338088809b3049ea7620f4e7e78 | static int sipr_decode_frame(AVCodecContext *avctx, void *datap,
int *data_size, AVPacket *avpkt)
{
SiprContext *ctx = avctx->priv_data;
const uint8_t *buf=avpkt->data;
SiprParameters parm;
const SiprModeParam *mode_par = &modes[ctx->mode];
GetBitContext gb;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
SiprContext *ctx = VAR_0->priv_data;
const uint8_t *VAR_4=VAR_3->VAR_6;
SiprParameters parm;
const SiprModeParam *VAR_5 = &modes[ctx->mode];
GetBitContext gb;
float *VAR_6 = ... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"SiprContext *ctx = VAR_0->priv_data;",
"const uint8_t *VAR_4=VAR_3->VAR_6;",
"SiprParameters parm;",
"const SiprModeParam *VAR_5 = &modes[ctx->mode];",
"GetBitContext gb;",
"float *VAR_6 = VAR_1;",
"int VAR_7 = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29,
31,
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47,
49
],
[... |
3,744 | static void qapi_dealloc_end_list(Visitor *v)
{
QapiDeallocVisitor *qov = to_qov(v);
void *obj = qapi_dealloc_pop(qov);
assert(obj == NULL); /* should've been list head tracker with no payload */
}
| false | qemu | d9f62dde1303286b24ac8ce88be27e2b9b9c5f46 | static void qapi_dealloc_end_list(Visitor *v)
{
QapiDeallocVisitor *qov = to_qov(v);
void *obj = qapi_dealloc_pop(qov);
assert(obj == NULL);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(Visitor *VAR_0)
{
QapiDeallocVisitor *qov = to_qov(VAR_0);
void *VAR_1 = qapi_dealloc_pop(qov);
assert(VAR_1 == NULL);
}
| [
"static void FUNC_0(Visitor *VAR_0)\n{",
"QapiDeallocVisitor *qov = to_qov(VAR_0);",
"void *VAR_1 = qapi_dealloc_pop(qov);",
"assert(VAR_1 == NULL);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
3,745 | static int oss_init_in (HWVoiceIn *hw, audsettings_t *as)
{
OSSVoiceIn *oss = (OSSVoiceIn *) hw;
struct oss_params req, obt;
int endianness;
int err;
int fd;
audfmt_e effective_fmt;
audsettings_t obt_as;
oss->fd = -1;
req.fmt = aud_to_ossfmt (as->fmt);
req.freq = a... | false | qemu | 1ea879e5580f63414693655fcf0328559cdce138 | static int oss_init_in (HWVoiceIn *hw, audsettings_t *as)
{
OSSVoiceIn *oss = (OSSVoiceIn *) hw;
struct oss_params req, obt;
int endianness;
int err;
int fd;
audfmt_e effective_fmt;
audsettings_t obt_as;
oss->fd = -1;
req.fmt = aud_to_ossfmt (as->fmt);
req.freq = a... | {
"code": [],
"line_no": []
} | static int FUNC_0 (HWVoiceIn *VAR_0, audsettings_t *VAR_1)
{
OSSVoiceIn *oss = (OSSVoiceIn *) VAR_0;
struct oss_params VAR_2, VAR_3;
int VAR_4;
int VAR_5;
int VAR_6;
audfmt_e effective_fmt;
audsettings_t obt_as;
oss->VAR_6 = -1;
VAR_2.fmt = aud_to_ossfmt (VAR_1->fmt);
... | [
"static int FUNC_0 (HWVoiceIn *VAR_0, audsettings_t *VAR_1)\n{",
"OSSVoiceIn *oss = (OSSVoiceIn *) VAR_0;",
"struct oss_params VAR_2, VAR_3;",
"int VAR_4;",
"int VAR_5;",
"int VAR_6;",
"audfmt_e effective_fmt;",
"audsettings_t obt_as;",
"oss->VAR_6 = -1;",
"VAR_2.fmt = aud_to_ossfmt (VAR_1->fmt);"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
... |
3,746 | static void gen_lswi(DisasContext *ctx)
{
TCGv t0;
TCGv_i32 t1, t2;
int nb = NB(ctx->opcode);
int start = rD(ctx->opcode);
int ra = rA(ctx->opcode);
int nr;
if (nb == 0)
nb = 32;
nr = nb / 4;
if (unlikely(((start + nr) > 32 &&
start <= ra && (... | false | qemu | afbee7128c2399b6fca7b744ee560e3a1851118e | static void gen_lswi(DisasContext *ctx)
{
TCGv t0;
TCGv_i32 t1, t2;
int nb = NB(ctx->opcode);
int start = rD(ctx->opcode);
int ra = rA(ctx->opcode);
int nr;
if (nb == 0)
nb = 32;
nr = nb / 4;
if (unlikely(((start + nr) > 32 &&
start <= ra && (... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0)
{
TCGv t0;
TCGv_i32 t1, t2;
int VAR_1 = NB(VAR_0->opcode);
int VAR_2 = rD(VAR_0->opcode);
int VAR_3 = rA(VAR_0->opcode);
int VAR_4;
if (VAR_1 == 0)
VAR_1 = 32;
VAR_4 = VAR_1 / 4;
if (unlikely(((VAR_2 + VAR_4) > 32 &&
... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"TCGv t0;",
"TCGv_i32 t1, t2;",
"int VAR_1 = NB(VAR_0->opcode);",
"int VAR_2 = rD(VAR_0->opcode);",
"int VAR_3 = rA(VAR_0->opcode);",
"int VAR_4;",
"if (VAR_1 == 0)\nVAR_1 = 32;",
"VAR_4 = VAR_1 / 4;",
"if (unlikely(((VAR_2 + VAR_4) > 32 &&\nVAR_2 <= ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
23
],
[
25,
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
3,749 | static void vmsvga_value_write(void *opaque, uint32_t address, uint32_t value)
{
struct vmsvga_state_s *s = opaque;
switch (s->index) {
case SVGA_REG_ID:
if (value == SVGA_ID_2 || value == SVGA_ID_1 || value == SVGA_ID_0)
s->svgaid = value;
break;
case SVGA_REG_ENAB... | false | qemu | 0d7937974cd0504f30ad483c3368b21da426ddf9 | static void vmsvga_value_write(void *opaque, uint32_t address, uint32_t value)
{
struct vmsvga_state_s *s = opaque;
switch (s->index) {
case SVGA_REG_ID:
if (value == SVGA_ID_2 || value == SVGA_ID_1 || value == SVGA_ID_0)
s->svgaid = value;
break;
case SVGA_REG_ENAB... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, uint32_t VAR_1, uint32_t VAR_2)
{
struct vmsvga_state_s *VAR_3 = VAR_0;
switch (VAR_3->index) {
case SVGA_REG_ID:
if (VAR_2 == SVGA_ID_2 || VAR_2 == SVGA_ID_1 || VAR_2 == SVGA_ID_0)
VAR_3->svgaid = VAR_2;
break;
case SVGA_REG_ENABLE:
... | [
"static void FUNC_0(void *VAR_0, uint32_t VAR_1, uint32_t VAR_2)\n{",
"struct vmsvga_state_s *VAR_3 = VAR_0;",
"switch (VAR_3->index) {",
"case SVGA_REG_ID:\nif (VAR_2 == SVGA_ID_2 || VAR_2 == SVGA_ID_1 || VAR_2 == SVGA_ID_0)\nVAR_3->svgaid = VAR_2;",
"break;",
"case SVGA_REG_ENABLE:\nVAR_3->enable = VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11,
13
],
[
15
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
3,750 | static int coroutine_fn backup_do_cow(BackupBlockJob *job,
int64_t sector_num, int nb_sectors,
bool *error_is_read,
bool is_write_notifier)
{
BlockBackend *blk = job->common.blk;
CowRequest co... | false | qemu | 13b9414b5798539e2dbb87a570d96184fe21edf4 | static int coroutine_fn backup_do_cow(BackupBlockJob *job,
int64_t sector_num, int nb_sectors,
bool *error_is_read,
bool is_write_notifier)
{
BlockBackend *blk = job->common.blk;
CowRequest co... | {
"code": [],
"line_no": []
} | static int VAR_0 backup_do_cow(BackupBlockJob *job,
int64_t sector_num, int nb_sectors,
bool *error_is_read,
bool is_write_notifier)
{
BlockBackend *blk = job->common.blk;
CowRequest cow_reque... | [
"static int VAR_0 backup_do_cow(BackupBlockJob *job,\nint64_t sector_num, int nb_sectors,\nbool *error_is_read,\nbool is_write_notifier)\n{",
"BlockBackend *blk = job->common.blk;",
"CowRequest cow_request;",
"struct iovec iov;",
"QEMUIOVector bounce_qiov;",
"void *bounce_buffer = NULL;",
"int ret = 0;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37
],
[
41
],
[
45
],
[
47
],
[
51
],
[
53
],
[... |
3,751 | static inline int memory_access_size(MemoryRegion *mr, int l, hwaddr addr)
{
if (l >= 4 && (((addr & 3) == 0 || mr->ops->impl.unaligned))) {
return 4;
}
if (l >= 2 && (((addr & 1) == 0) || mr->ops->impl.unaligned)) {
return 2;
}
return 1;
}
| false | qemu | 23326164ae6fe8d94b7eff123e03f97ca6978d33 | static inline int memory_access_size(MemoryRegion *mr, int l, hwaddr addr)
{
if (l >= 4 && (((addr & 3) == 0 || mr->ops->impl.unaligned))) {
return 4;
}
if (l >= 2 && (((addr & 1) == 0) || mr->ops->impl.unaligned)) {
return 2;
}
return 1;
}
| {
"code": [],
"line_no": []
} | static inline int FUNC_0(MemoryRegion *VAR_0, int VAR_1, hwaddr VAR_2)
{
if (VAR_1 >= 4 && (((VAR_2 & 3) == 0 || VAR_0->ops->impl.unaligned))) {
return 4;
}
if (VAR_1 >= 2 && (((VAR_2 & 1) == 0) || VAR_0->ops->impl.unaligned)) {
return 2;
}
return 1;
}
| [
"static inline int FUNC_0(MemoryRegion *VAR_0, int VAR_1, hwaddr VAR_2)\n{",
"if (VAR_1 >= 4 && (((VAR_2 & 3) == 0 || VAR_0->ops->impl.unaligned))) {",
"return 4;",
"}",
"if (VAR_1 >= 2 && (((VAR_2 & 1) == 0) || VAR_0->ops->impl.unaligned)) {",
"return 2;",
"}",
"return 1;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
3,752 | static void bonito_spciconf_writew(void *opaque, target_phys_addr_t addr,
uint32_t val)
{
PCIBonitoState *s = opaque;
PCIDevice *d = PCI_DEVICE(s);
PCIHostState *phb = PCI_HOST_BRIDGE(s->pcihost);
uint32_t pciaddr;
uint16_t status;
DPRINTF("bonito_spc... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void bonito_spciconf_writew(void *opaque, target_phys_addr_t addr,
uint32_t val)
{
PCIBonitoState *s = opaque;
PCIDevice *d = PCI_DEVICE(s);
PCIHostState *phb = PCI_HOST_BRIDGE(s->pcihost);
uint32_t pciaddr;
uint16_t status;
DPRINTF("bonito_spc... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint32_t VAR_2)
{
PCIBonitoState *s = VAR_0;
PCIDevice *d = PCI_DEVICE(s);
PCIHostState *phb = PCI_HOST_BRIDGE(s->pcihost);
uint32_t pciaddr;
uint16_t status;
DPRINTF("FUNC_0 "TARGET_FMT_plx" V... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint32_t VAR_2)\n{",
"PCIBonitoState *s = VAR_0;",
"PCIDevice *d = PCI_DEVICE(s);",
"PCIHostState *phb = PCI_HOST_BRIDGE(s->pcihost);",
"uint32_t pciaddr;",
"uint16_t status;",
"DPRINTF(\"FUNC_0 \"TARGET_FMT_plx\" VAR_2 %x\\n\", VAR_1, VAR_2);"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31
],
[
33
],
[
39
],
[
41
],
[
47
],
[
49
],
[
51
],
[
53
]
] |
3,753 | static void i440fx_pcihost_get_pci_hole_start(Object *obj, Visitor *v,
const char *name, void *opaque,
Error **errp)
{
I440FXState *s = I440FX_PCI_HOST_BRIDGE(obj);
uint32_t value = s->pci_hole.begin;
visit_t... | false | qemu | a0efbf16604770b9d805bcf210ec29942321134f | static void i440fx_pcihost_get_pci_hole_start(Object *obj, Visitor *v,
const char *name, void *opaque,
Error **errp)
{
I440FXState *s = I440FX_PCI_HOST_BRIDGE(obj);
uint32_t value = s->pci_hole.begin;
visit_t... | {
"code": [],
"line_no": []
} | static void FUNC_0(Object *VAR_0, Visitor *VAR_1,
const char *VAR_2, void *VAR_3,
Error **VAR_4)
{
I440FXState *s = I440FX_PCI_HOST_BRIDGE(VAR_0);
uint32_t value = s->pci_hole.begin;
visit_type_uint32(VAR_1, ... | [
"static void FUNC_0(Object *VAR_0, Visitor *VAR_1,\nconst char *VAR_2, void *VAR_3,\nError **VAR_4)\n{",
"I440FXState *s = I440FX_PCI_HOST_BRIDGE(VAR_0);",
"uint32_t value = s->pci_hole.begin;",
"visit_type_uint32(VAR_1, VAR_2, &value, VAR_4);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17
]
] |
3,754 | static void numa_stat_memory_devices(uint64_t node_mem[])
{
MemoryDeviceInfoList *info_list = NULL;
MemoryDeviceInfoList **prev = &info_list;
MemoryDeviceInfoList *info;
qmp_pc_dimm_device_list(qdev_get_machine(), &prev);
for (info = info_list; info; info = info->next) {
MemoryDevic... | false | qemu | 32bafa8fdd098d52fbf1102d5a5e48d29398c0aa | static void numa_stat_memory_devices(uint64_t node_mem[])
{
MemoryDeviceInfoList *info_list = NULL;
MemoryDeviceInfoList **prev = &info_list;
MemoryDeviceInfoList *info;
qmp_pc_dimm_device_list(qdev_get_machine(), &prev);
for (info = info_list; info; info = info->next) {
MemoryDevic... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint64_t VAR_0[])
{
MemoryDeviceInfoList *info_list = NULL;
MemoryDeviceInfoList **prev = &info_list;
MemoryDeviceInfoList *info;
qmp_pc_dimm_device_list(qdev_get_machine(), &prev);
for (info = info_list; info; info = info->next) {
MemoryDeviceInfo *value = info->... | [
"static void FUNC_0(uint64_t VAR_0[])\n{",
"MemoryDeviceInfoList *info_list = NULL;",
"MemoryDeviceInfoList **prev = &info_list;",
"MemoryDeviceInfoList *info;",
"qmp_pc_dimm_device_list(qdev_get_machine(), &prev);",
"for (info = info_list; info; info = info->next) {",
"MemoryDeviceInfo *value = info->v... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
]
] |
3,756 | static void blkverify_refresh_filename(BlockDriverState *bs)
{
BDRVBlkverifyState *s = bs->opaque;
/* bs->file->bs has already been refreshed */
bdrv_refresh_filename(s->test_file->bs);
if (bs->file->bs->full_open_options
&& s->test_file->bs->full_open_options)
{
QDict *o... | false | qemu | 4cdd01d32ee6fe04f8d909bfd3708be6864873a2 | static void blkverify_refresh_filename(BlockDriverState *bs)
{
BDRVBlkverifyState *s = bs->opaque;
bdrv_refresh_filename(s->test_file->bs);
if (bs->file->bs->full_open_options
&& s->test_file->bs->full_open_options)
{
QDict *opts = qdict_new();
qdict_put_obj(opt... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0)
{
BDRVBlkverifyState *s = VAR_0->opaque;
bdrv_refresh_filename(s->test_file->VAR_0);
if (VAR_0->file->VAR_0->full_open_options
&& s->test_file->VAR_0->full_open_options)
{
QDict *opts = qdict_new();
qdict_put_obj(opts,... | [
"static void FUNC_0(BlockDriverState *VAR_0)\n{",
"BDRVBlkverifyState *s = VAR_0->opaque;",
"bdrv_refresh_filename(s->test_file->VAR_0);",
"if (VAR_0->file->VAR_0->full_open_options\n&& s->test_file->VAR_0->full_open_options)\n{",
"QDict *opts = qdict_new();",
"qdict_put_obj(opts, \"driver\", QOBJECT(qstr... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
11
],
[
15,
17,
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
39
],
[
41
],
[
45,
47,
49
],
[
51,
53,
55,
57
],
[
59
],
[
6... |
3,758 | static int ehci_init_transfer(EHCIQueue *q)
{
uint32_t cpage, offset, bytes, plen;
target_phys_addr_t page;
cpage = get_field(q->qh.token, QTD_TOKEN_CPAGE);
bytes = get_field(q->qh.token, QTD_TOKEN_TBYTES);
offset = q->qh.bufptr[0] & ~QTD_BUFPTR_MASK;
qemu_sglist_init(&q->sgl, 5);
... | false | qemu | 68d553587c0aa271c3eb2902921b503740d775b6 | static int ehci_init_transfer(EHCIQueue *q)
{
uint32_t cpage, offset, bytes, plen;
target_phys_addr_t page;
cpage = get_field(q->qh.token, QTD_TOKEN_CPAGE);
bytes = get_field(q->qh.token, QTD_TOKEN_TBYTES);
offset = q->qh.bufptr[0] & ~QTD_BUFPTR_MASK;
qemu_sglist_init(&q->sgl, 5);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(EHCIQueue *VAR_0)
{
uint32_t cpage, offset, bytes, plen;
target_phys_addr_t page;
cpage = get_field(VAR_0->qh.token, QTD_TOKEN_CPAGE);
bytes = get_field(VAR_0->qh.token, QTD_TOKEN_TBYTES);
offset = VAR_0->qh.bufptr[0] & ~QTD_BUFPTR_MASK;
qemu_sglist_init(&VAR_0->sgl,... | [
"static int FUNC_0(EHCIQueue *VAR_0)\n{",
"uint32_t cpage, offset, bytes, plen;",
"target_phys_addr_t page;",
"cpage = get_field(VAR_0->qh.token, QTD_TOKEN_CPAGE);",
"bytes = get_field(VAR_0->qh.token, QTD_TOKEN_TBYTES);",
"offset = VAR_0->qh.bufptr[0] & ~QTD_BUFPTR_MASK;",
"qemu_sglist_init(&VAR_0->s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47... |
3,759 | static void allocate_buffers(FLACContext *s){
int i;
assert(s->max_blocksize);
if(s->max_framesize == 0 && s->max_blocksize){
s->max_framesize= (s->channels * s->bps * s->max_blocksize + 7)/ 8; //FIXME header overhead
}
for (i = 0; i < s->channels; i++)
{
s->decoded... | false | FFmpeg | cfcd396bae11de94ad4a729361bc9b7b05f04c27 | static void allocate_buffers(FLACContext *s){
int i;
assert(s->max_blocksize);
if(s->max_framesize == 0 && s->max_blocksize){
s->max_framesize= (s->channels * s->bps * s->max_blocksize + 7)/ 8;
}
for (i = 0; i < s->channels; i++)
{
s->decoded[i] = av_realloc(s->dec... | {
"code": [],
"line_no": []
} | static void FUNC_0(FLACContext *VAR_0){
int VAR_1;
assert(VAR_0->max_blocksize);
if(VAR_0->max_framesize == 0 && VAR_0->max_blocksize){
VAR_0->max_framesize= (VAR_0->channels * VAR_0->bps * VAR_0->max_blocksize + 7)/ 8;
}
for (VAR_1 = 0; VAR_1 < VAR_0->channels; VAR_1++)
{
... | [
"static void FUNC_0(FLACContext *VAR_0){",
"int VAR_1;",
"assert(VAR_0->max_blocksize);",
"if(VAR_0->max_framesize == 0 && VAR_0->max_blocksize){",
"VAR_0->max_framesize= (VAR_0->channels * VAR_0->bps * VAR_0->max_blocksize + 7)/ 8;",
"}",
"for (VAR_1 = 0; VAR_1 < VAR_0->channels; VAR_1++)",
"{",
"V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
]
] |
3,760 | void ff_vp3_idct_add_c(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/){
idct(dest, line_size, block, 2);
}
| false | FFmpeg | 28f9ab7029bd1a02f659995919f899f84ee7361b | void ff_vp3_idct_add_c(uint8_t *dest, int line_size, DCTELEM *block){
idct(dest, line_size, block, 2);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(uint8_t *VAR_0, int VAR_1, DCTELEM *VAR_2){
idct(VAR_0, VAR_1, VAR_2, 2);
}
| [
"void FUNC_0(uint8_t *VAR_0, int VAR_1, DCTELEM *VAR_2){",
"idct(VAR_0, VAR_1, VAR_2, 2);",
"}"
] | [
0,
0,
0
] | [
[
1
],
[
3
],
[
5
]
] |
3,762 | static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, ram_addr_t RAM_size,
const char *boot_device,
DisplayState *ds, const char *kernel_filename,
const char *kernel_cmdline,
const char *initrd_filename, con... | false | qemu | 0ae18ceeaaa2c1749e742c4b112f6c3bf0896408 | static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, ram_addr_t RAM_size,
const char *boot_device,
DisplayState *ds, const char *kernel_filename,
const char *kernel_cmdline,
const char *initrd_filename, con... | {
"code": [],
"line_no": []
} | static void FUNC_0(const struct sun4m_hwdef *VAR_0, ram_addr_t VAR_1,
const char *VAR_2,
DisplayState *VAR_3, const char *VAR_4,
const char *VAR_5,
const char *VAR_6, const char *VAR_7)
{
CPUState *env, *... | [
"static void FUNC_0(const struct sun4m_hwdef *VAR_0, ram_addr_t VAR_1,\nconst char *VAR_2,\nDisplayState *VAR_3, const char *VAR_4,\nconst char *VAR_5,\nconst char *VAR_6, const char *VAR_7)\n{",
"CPUState *env, *envs[MAX_CPUS];",
"unsigned int VAR_8;",
"void *VAR_9, *VAR_10, *VAR_11, *VAR_12, *VAR_13;",
"q... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
49,
51
],
[
55
... |
3,764 | static void mptsas_update_interrupt(MPTSASState *s)
{
PCIDevice *pci = (PCIDevice *) s;
uint32_t state = s->intr_status & ~(s->intr_mask | MPI_HIS_IOP_DOORBELL_STATUS);
if (s->msi_in_use && msi_enabled(pci)) {
if (state) {
trace_mptsas_irq_msi(s);
msi_notify(pci, 0);... | false | qemu | 2e2aa31674444b61e79536a90d63a90572e695c8 | static void mptsas_update_interrupt(MPTSASState *s)
{
PCIDevice *pci = (PCIDevice *) s;
uint32_t state = s->intr_status & ~(s->intr_mask | MPI_HIS_IOP_DOORBELL_STATUS);
if (s->msi_in_use && msi_enabled(pci)) {
if (state) {
trace_mptsas_irq_msi(s);
msi_notify(pci, 0);... | {
"code": [],
"line_no": []
} | static void FUNC_0(MPTSASState *VAR_0)
{
PCIDevice *pci = (PCIDevice *) VAR_0;
uint32_t state = VAR_0->intr_status & ~(VAR_0->intr_mask | MPI_HIS_IOP_DOORBELL_STATUS);
if (VAR_0->msi_in_use && msi_enabled(pci)) {
if (state) {
trace_mptsas_irq_msi(VAR_0);
msi_notify(p... | [
"static void FUNC_0(MPTSASState *VAR_0)\n{",
"PCIDevice *pci = (PCIDevice *) VAR_0;",
"uint32_t state = VAR_0->intr_status & ~(VAR_0->intr_mask | MPI_HIS_IOP_DOORBELL_STATUS);",
"if (VAR_0->msi_in_use && msi_enabled(pci)) {",
"if (state) {",
"trace_mptsas_irq_msi(VAR_0);",
"msi_notify(pci, 0);",
"}",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
]
] |
3,765 | static int find_pte64(CPUPPCState *env, struct mmu_ctx_hash64 *ctx,
target_ulong eaddr, int h, int rwx, int target_page_bits)
{
hwaddr pteg_off;
target_ulong pte0, pte1;
int i, good = -1;
int ret;
ret = -1; /* No entry found */
pteg_off = (ctx->hash[h] * HASH_PTEG... | false | qemu | aea390e4be652d5b5457771d25eded0dba14fe37 | static int find_pte64(CPUPPCState *env, struct mmu_ctx_hash64 *ctx,
target_ulong eaddr, int h, int rwx, int target_page_bits)
{
hwaddr pteg_off;
target_ulong pte0, pte1;
int i, good = -1;
int ret;
ret = -1;
pteg_off = (ctx->hash[h] * HASH_PTEG_SIZE_64) & env->hta... | {
"code": [],
"line_no": []
} | static int FUNC_0(CPUPPCState *VAR_0, struct mmu_ctx_hash64 *VAR_1,
target_ulong VAR_2, int VAR_3, int VAR_4, int VAR_5)
{
hwaddr pteg_off;
target_ulong pte0, pte1;
int VAR_6, VAR_7 = -1;
int VAR_8;
VAR_8 = -1;
pteg_off = (VAR_1->hash[VAR_3] * HASH_PTEG_SIZE_64) ... | [
"static int FUNC_0(CPUPPCState *VAR_0, struct mmu_ctx_hash64 *VAR_1,\ntarget_ulong VAR_2, int VAR_3, int VAR_4, int VAR_5)\n{",
"hwaddr pteg_off;",
"target_ulong pte0, pte1;",
"int VAR_6, VAR_7 = -1;",
"int VAR_8;",
"VAR_8 = -1;",
"pteg_off = (VAR_1->hash[VAR_3] * HASH_PTEG_SIZE_64) & VAR_0->htab_mask;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29,
31,
33,
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
3,767 | static int ds1338_init(I2CSlave *i2c)
{
return 0;
}
| false | qemu | 9e41bade85ef338afd983c109368d1bbbe931f80 | static int ds1338_init(I2CSlave *i2c)
{
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(I2CSlave *VAR_0)
{
return 0;
}
| [
"static int FUNC_0(I2CSlave *VAR_0)\n{",
"return 0;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
3,768 | static void qbus_print(Monitor *mon, BusState *bus, int indent)
{
struct DeviceState *dev;
qdev_printf("bus: %s\n", bus->name);
indent += 2;
qdev_printf("type %s\n", bus_type_names[bus->type]);
LIST_FOREACH(dev, &bus->children, sibling) {
qdev_print(mon, dev, indent);
}
}
| false | qemu | 10c4c98ab7dc18169b37b76f6ea5e60ebe65222b | static void qbus_print(Monitor *mon, BusState *bus, int indent)
{
struct DeviceState *dev;
qdev_printf("bus: %s\n", bus->name);
indent += 2;
qdev_printf("type %s\n", bus_type_names[bus->type]);
LIST_FOREACH(dev, &bus->children, sibling) {
qdev_print(mon, dev, indent);
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(Monitor *VAR_0, BusState *VAR_1, int VAR_2)
{
struct DeviceState *VAR_3;
qdev_printf("VAR_1: %s\n", VAR_1->name);
VAR_2 += 2;
qdev_printf("type %s\n", bus_type_names[VAR_1->type]);
LIST_FOREACH(VAR_3, &VAR_1->children, sibling) {
qdev_print(VAR_0, VAR_3, VAR_2);
... | [
"static void FUNC_0(Monitor *VAR_0, BusState *VAR_1, int VAR_2)\n{",
"struct DeviceState *VAR_3;",
"qdev_printf(\"VAR_1: %s\\n\", VAR_1->name);",
"VAR_2 += 2;",
"qdev_printf(\"type %s\\n\", bus_type_names[VAR_1->type]);",
"LIST_FOREACH(VAR_3, &VAR_1->children, sibling) {",
"qdev_print(VAR_0, VAR_3, VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
3,769 | static void mvc_fast_memset(CPUS390XState *env, uint32_t l, uint64_t dest,
uint8_t byte)
{
S390CPU *cpu = s390_env_get_cpu(env);
hwaddr dest_phys;
hwaddr len = l;
void *dest_p;
uint64_t asc = env->psw.mask & PSW_MASK_ASC;
int flags;
if (mmu_translate(en... | false | qemu | e3e09d87c6e69c2da684d5aacabe3124ebcb6f8e | static void mvc_fast_memset(CPUS390XState *env, uint32_t l, uint64_t dest,
uint8_t byte)
{
S390CPU *cpu = s390_env_get_cpu(env);
hwaddr dest_phys;
hwaddr len = l;
void *dest_p;
uint64_t asc = env->psw.mask & PSW_MASK_ASC;
int flags;
if (mmu_translate(en... | {
"code": [],
"line_no": []
} | static void FUNC_0(CPUS390XState *VAR_0, uint32_t VAR_1, uint64_t VAR_2,
uint8_t VAR_3)
{
S390CPU *cpu = s390_env_get_cpu(VAR_0);
hwaddr dest_phys;
hwaddr len = VAR_1;
void *VAR_4;
uint64_t asc = VAR_0->psw.mask & PSW_MASK_ASC;
int VAR_5;
if (mmu_transl... | [
"static void FUNC_0(CPUS390XState *VAR_0, uint32_t VAR_1, uint64_t VAR_2,\nuint8_t VAR_3)\n{",
"S390CPU *cpu = s390_env_get_cpu(VAR_0);",
"hwaddr dest_phys;",
"hwaddr len = VAR_1;",
"void *VAR_4;",
"uint64_t asc = VAR_0->psw.mask & PSW_MASK_ASC;",
"int VAR_5;",
"if (mmu_translate(VAR_0, VAR_2, 1, asc,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
37
],
[
41
],
[
43
]
] |
3,772 | static ssize_t nbd_receive_request(QIOChannel *ioc, struct nbd_request *request)
{
uint8_t buf[NBD_REQUEST_SIZE];
uint32_t magic;
ssize_t ret;
ret = read_sync(ioc, buf, sizeof(buf));
if (ret < 0) {
return ret;
}
if (ret != sizeof(buf)) {
LOG("read failed");
... | false | qemu | b626b51a6721e53817155af720243f59072e424f | static ssize_t nbd_receive_request(QIOChannel *ioc, struct nbd_request *request)
{
uint8_t buf[NBD_REQUEST_SIZE];
uint32_t magic;
ssize_t ret;
ret = read_sync(ioc, buf, sizeof(buf));
if (ret < 0) {
return ret;
}
if (ret != sizeof(buf)) {
LOG("read failed");
... | {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(QIOChannel *ioc, struct nbd_request *request)
{
uint8_t buf[NBD_REQUEST_SIZE];
uint32_t magic;
ssize_t ret;
ret = read_sync(ioc, buf, sizeof(buf));
if (ret < 0) {
return ret;
}
if (ret != sizeof(buf)) {
LOG("read failed");
return -... | [
"static ssize_t FUNC_0(QIOChannel *ioc, struct nbd_request *request)\n{",
"uint8_t buf[NBD_REQUEST_SIZE];",
"uint32_t magic;",
"ssize_t ret;",
"ret = read_sync(ioc, buf, sizeof(buf));",
"if (ret < 0) {",
"return ret;",
"}",
"if (ret != sizeof(buf)) {",
"LOG(\"read failed\");",
"return -EINVAL;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
],
[
61
],
[
63
],
[
65
... |
3,773 | BlockDriverAIOCB *laio_submit(BlockDriverState *bs, void *aio_ctx, int fd,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque, int type)
{
struct qemu_laio_state *s = aio_ctx;
struct qemu_laiocb *laiocb;
struct iocb *iocbs;
off_t of... | false | qemu | 384acbf46b70edf0d2c1648aa1a92a90bcf7057d | BlockDriverAIOCB *laio_submit(BlockDriverState *bs, void *aio_ctx, int fd,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque, int type)
{
struct qemu_laio_state *s = aio_ctx;
struct qemu_laiocb *laiocb;
struct iocb *iocbs;
off_t of... | {
"code": [],
"line_no": []
} | BlockDriverAIOCB *FUNC_0(BlockDriverState *bs, void *aio_ctx, int fd,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque, int type)
{
struct qemu_laio_state *VAR_0 = aio_ctx;
struct qemu_laiocb *VAR_1;
struct iocb *VAR_2;
off_t offs... | [
"BlockDriverAIOCB *FUNC_0(BlockDriverState *bs, void *aio_ctx, int fd,\nint64_t sector_num, QEMUIOVector *qiov, int nb_sectors,\nBlockDriverCompletionFunc *cb, void *opaque, int type)\n{",
"struct qemu_laio_state *VAR_0 = aio_ctx;",
"struct qemu_laiocb *VAR_1;",
"struct iocb *VAR_2;",
"off_t offset = sector... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
39
],
[
41,
43
],
[
45
],
[
47,
49
],
[
51
],
[... |
3,775 | void helper_cpuid(void)
{
if (EAX == 0) {
EAX = 1; /* max EAX index supported */
EBX = 0x756e6547;
ECX = 0x6c65746e;
EDX = 0x49656e69;
} else {
/* EAX = 1 info */
EAX = 0x52b;
EBX = 0;
ECX = 0;
EDX = CPUID_FP87 | CPUID_VME | CPU... | false | qemu | 3acace1333d6b75628fe6e6786ad3cd2db766f0e | void helper_cpuid(void)
{
if (EAX == 0) {
EAX = 1;
EBX = 0x756e6547;
ECX = 0x6c65746e;
EDX = 0x49656e69;
} else {
EAX = 0x52b;
EBX = 0;
ECX = 0;
EDX = CPUID_FP87 | CPUID_VME | CPUID_DE | CPUID_PSE |
CPUID_TSC | CP... | {
"code": [],
"line_no": []
} | void FUNC_0(void)
{
if (EAX == 0) {
EAX = 1;
EBX = 0x756e6547;
ECX = 0x6c65746e;
EDX = 0x49656e69;
} else {
EAX = 0x52b;
EBX = 0;
ECX = 0;
EDX = CPUID_FP87 | CPUID_VME | CPUID_DE | CPUID_PSE |
CPUID_TSC | CPUID_MS... | [
"void FUNC_0(void)\n{",
"if (EAX == 0) {",
"EAX = 1;",
"EBX = 0x756e6547;",
"ECX = 0x6c65746e;",
"EDX = 0x49656e69;",
"} else {",
"EAX = 0x52b;",
"EBX = 0;",
"ECX = 0;",
"EDX = CPUID_FP87 | CPUID_VME | CPUID_DE | CPUID_PSE |\nCPUID_TSC | CPUID_MSR | CPUID_MCE |\nCPUID_CX8;",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25,
27,
29
],
[
31
],
[
33
]
] |
3,776 | void ff_vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y,
int mvn, int r_x, int r_y, uint8_t* is_intra, int dir)
{
MpegEncContext *s = &v->s;
int xy, wrap, off = 0;
int A[2], B[2], C[2];
int px, py;
int a_valid = 0, b_valid = 0, c_valid = 0;
int fiel... | false | FFmpeg | 4d593896aaa81356def8993e8c52294bd8bb2797 | void ff_vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y,
int mvn, int r_x, int r_y, uint8_t* is_intra, int dir)
{
MpegEncContext *s = &v->s;
int xy, wrap, off = 0;
int A[2], B[2], C[2];
int px, py;
int a_valid = 0, b_valid = 0, c_valid = 0;
int fiel... | {
"code": [],
"line_no": []
} | void FUNC_0(VC1Context *VAR_0, int VAR_1, int VAR_2, int VAR_3,
int VAR_4, int VAR_5, int VAR_6, uint8_t* VAR_7, int VAR_8)
{
MpegEncContext *s = &VAR_0->s;
int VAR_9, VAR_10, VAR_11 = 0;
int VAR_12[2], VAR_13[2], VAR_14[2];
int VAR_15, VAR_16;
int VAR_17 = 0, VAR_18... | [
"void FUNC_0(VC1Context *VAR_0, int VAR_1, int VAR_2, int VAR_3,\nint VAR_4, int VAR_5, int VAR_6, uint8_t* VAR_7, int VAR_8)\n{",
"MpegEncContext *s = &VAR_0->s;",
"int VAR_9, VAR_10, VAR_11 = 0;",
"int VAR_12[2], VAR_13[2], VAR_14[2];",
"int VAR_15, VAR_16;",
"int VAR_17 = 0, VAR_18 = 0, VAR_19 = 0;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
3,777 | static inline void gen_stack_update(DisasContext *s, int addend)
{
#ifdef TARGET_X86_64
if (CODE64(s)) {
gen_op_addq_ESP_im(addend);
} else
#endif
if (s->ss32) {
gen_op_addl_ESP_im(addend);
} else {
gen_op_addw_ESP_im(addend);
}
}
| false | qemu | 6e0d8677cb443e7408c0b7a25a93c6596d7fa380 | static inline void gen_stack_update(DisasContext *s, int addend)
{
#ifdef TARGET_X86_64
if (CODE64(s)) {
gen_op_addq_ESP_im(addend);
} else
#endif
if (s->ss32) {
gen_op_addl_ESP_im(addend);
} else {
gen_op_addw_ESP_im(addend);
}
}
| {
"code": [],
"line_no": []
} | static inline void FUNC_0(DisasContext *VAR_0, int VAR_1)
{
#ifdef TARGET_X86_64
if (CODE64(VAR_0)) {
gen_op_addq_ESP_im(VAR_1);
} else
#endif
if (VAR_0->ss32) {
gen_op_addl_ESP_im(VAR_1);
} else {
gen_op_addw_ESP_im(VAR_1);
}
}
| [
"static inline void FUNC_0(DisasContext *VAR_0, int VAR_1)\n{",
"#ifdef TARGET_X86_64\nif (CODE64(VAR_0)) {",
"gen_op_addq_ESP_im(VAR_1);",
"} else",
"#endif\nif (VAR_0->ss32) {",
"gen_op_addl_ESP_im(VAR_1);",
"} else {",
"gen_op_addw_ESP_im(VAR_1);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
3,779 | void ide_exec_cmd(IDEBus *bus, uint32_t val)
{
uint16_t *identify_data;
IDEState *s;
int n;
#if defined(DEBUG_IDE)
printf("ide: CMD=%02x\n", val);
#endif
s = idebus_active_if(bus);
/* ignore commands to non existent slave */
if (s != bus->ifs && !s->bs)
return;
/*... | false | qemu | 785f63208569a38a4bed5c12bfe2211f3b14d524 | void ide_exec_cmd(IDEBus *bus, uint32_t val)
{
uint16_t *identify_data;
IDEState *s;
int n;
#if defined(DEBUG_IDE)
printf("ide: CMD=%02x\n", val);
#endif
s = idebus_active_if(bus);
if (s != bus->ifs && !s->bs)
return;
if ((s->status & (BUSY_STAT|DRQ_STAT)) ... | {
"code": [],
"line_no": []
} | void FUNC_0(IDEBus *VAR_0, uint32_t VAR_1)
{
uint16_t *identify_data;
IDEState *s;
int VAR_2;
#if defined(DEBUG_IDE)
printf("ide: CMD=%02x\VAR_2", VAR_1);
#endif
s = idebus_active_if(VAR_0);
if (s != VAR_0->ifs && !s->bs)
return;
if ((s->status & (BUSY_STAT... | [
"void FUNC_0(IDEBus *VAR_0, uint32_t VAR_1)\n{",
"uint16_t *identify_data;",
"IDEState *s;",
"int VAR_2;",
"#if defined(DEBUG_IDE)\nprintf(\"ide: CMD=%02x\\VAR_2\", VAR_1);",
"#endif\ns = idebus_active_if(VAR_0);",
"if (s != VAR_0->ifs && !s->bs)\nreturn;",
"if ((s->status & (BUSY_STAT|DRQ_STAT)) && V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
17,
19
],
[
23,
25
],
[
31,
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
51
],
[
53
],
[
57
],
[
59
],
[
61
... |
3,780 | void acpi_pcihp_device_plug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
DeviceState *dev, Error **errp)
{
PCIDevice *pdev = PCI_DEVICE(dev);
int slot = PCI_SLOT(pdev->devfn);
int bsel = acpi_pcihp_get_bsel(pdev->bus);
if (bsel < 0) {
error_setg(errp, ... | false | qemu | fd56e0612b6454a282fa6a953fdb09281a98c589 | void acpi_pcihp_device_plug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
DeviceState *dev, Error **errp)
{
PCIDevice *pdev = PCI_DEVICE(dev);
int slot = PCI_SLOT(pdev->devfn);
int bsel = acpi_pcihp_get_bsel(pdev->bus);
if (bsel < 0) {
error_setg(errp, ... | {
"code": [],
"line_no": []
} | void FUNC_0(HotplugHandler *VAR_0, AcpiPciHpState *VAR_1,
DeviceState *VAR_2, Error **VAR_3)
{
PCIDevice *pdev = PCI_DEVICE(VAR_2);
int VAR_4 = PCI_SLOT(pdev->devfn);
int VAR_5 = acpi_pcihp_get_bsel(pdev->bus);
if (VAR_5 < 0) {
error_setg(VAR_3, "Unsupported... | [
"void FUNC_0(HotplugHandler *VAR_0, AcpiPciHpState *VAR_1,\nDeviceState *VAR_2, Error **VAR_3)\n{",
"PCIDevice *pdev = PCI_DEVICE(VAR_2);",
"int VAR_4 = PCI_SLOT(pdev->devfn);",
"int VAR_5 = acpi_pcihp_get_bsel(pdev->bus);",
"if (VAR_5 < 0) {",
"error_setg(VAR_3, \"Unsupported bus. Bus doesn't have proper... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
]
] |
3,781 | void virt_acpi_build(VirtGuestInfo *guest_info, AcpiBuildTables *tables)
{
GArray *table_offsets;
unsigned dsdt, rsdt;
VirtAcpiCpuInfo cpuinfo;
GArray *tables_blob = tables->table_data;
virt_acpi_get_cpu_info(&cpuinfo);
table_offsets = g_array_new(false, true /* clear */,
... | false | qemu | 6d152ebaf4db6567cefbbd3b2b102c4a50172109 | void virt_acpi_build(VirtGuestInfo *guest_info, AcpiBuildTables *tables)
{
GArray *table_offsets;
unsigned dsdt, rsdt;
VirtAcpiCpuInfo cpuinfo;
GArray *tables_blob = tables->table_data;
virt_acpi_get_cpu_info(&cpuinfo);
table_offsets = g_array_new(false, true ,
... | {
"code": [],
"line_no": []
} | void FUNC_0(VirtGuestInfo *VAR_0, AcpiBuildTables *VAR_1)
{
GArray *table_offsets;
unsigned VAR_2, VAR_3;
VirtAcpiCpuInfo cpuinfo;
GArray *tables_blob = VAR_1->table_data;
virt_acpi_get_cpu_info(&cpuinfo);
table_offsets = g_array_new(false, true ,
... | [
"void FUNC_0(VirtGuestInfo *VAR_0, AcpiBuildTables *VAR_1)\n{",
"GArray *table_offsets;",
"unsigned VAR_2, VAR_3;",
"VirtAcpiCpuInfo cpuinfo;",
"GArray *tables_blob = VAR_1->table_data;",
"virt_acpi_get_cpu_info(&cpuinfo);",
"table_offsets = g_array_new(false, true ,\nsizeof(uint32_t));",
"bios_linker... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19,
21
],
[
25,
27
],
[
55
],
[
57
],
[
63
],
[
65
],
[
69
],
[
71
],
[
75
],
[
77
],
[
81
],
[
83
],
[
87
... |
3,782 | static void code_gen_alloc(unsigned long tb_size)
{
#ifdef USE_STATIC_CODE_GEN_BUFFER
code_gen_buffer = static_code_gen_buffer;
code_gen_buffer_size = DEFAULT_CODE_GEN_BUFFER_SIZE;
map_exec(code_gen_buffer, code_gen_buffer_size);
#else
code_gen_buffer_size = tb_size;
if (code_gen_buffer_size... | false | qemu | a884da8a06806d55fa83c8011bb17d6838583f9b | static void code_gen_alloc(unsigned long tb_size)
{
#ifdef USE_STATIC_CODE_GEN_BUFFER
code_gen_buffer = static_code_gen_buffer;
code_gen_buffer_size = DEFAULT_CODE_GEN_BUFFER_SIZE;
map_exec(code_gen_buffer, code_gen_buffer_size);
#else
code_gen_buffer_size = tb_size;
if (code_gen_buffer_size... | {
"code": [],
"line_no": []
} | static void FUNC_0(unsigned long VAR_0)
{
#ifdef USE_STATIC_CODE_GEN_BUFFER
code_gen_buffer = static_code_gen_buffer;
code_gen_buffer_size = DEFAULT_CODE_GEN_BUFFER_SIZE;
map_exec(code_gen_buffer, code_gen_buffer_size);
#else
code_gen_buffer_size = VAR_0;
if (code_gen_buffer_size == 0) {
#i... | [
"static void FUNC_0(unsigned long VAR_0)\n{",
"#ifdef USE_STATIC_CODE_GEN_BUFFER\ncode_gen_buffer = static_code_gen_buffer;",
"code_gen_buffer_size = DEFAULT_CODE_GEN_BUFFER_SIZE;",
"map_exec(code_gen_buffer, code_gen_buffer_size);",
"#else\ncode_gen_buffer_size = VAR_0;",
"if (code_gen_buffer_size == 0) ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19,
23
],
[
25,
29
],
[
31,
33
],
[
35,
37
],
[
43,
45
],
[
47
],
[
49
],
[
53
],
[
55,
57
],
[
61,... |
3,783 | static void spapr_cpu_core_register_types(void)
{
const SPAPRCoreInfo *info = spapr_cores;
type_register_static(&spapr_cpu_core_type_info);
while (info->name) {
spapr_cpu_core_register(info);
info++;
}
}
| false | qemu | 7ebaf7955603cc50988e0eafd5e6074320fefc70 | static void spapr_cpu_core_register_types(void)
{
const SPAPRCoreInfo *info = spapr_cores;
type_register_static(&spapr_cpu_core_type_info);
while (info->name) {
spapr_cpu_core_register(info);
info++;
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
const SPAPRCoreInfo *VAR_0 = spapr_cores;
type_register_static(&spapr_cpu_core_type_info);
while (VAR_0->name) {
spapr_cpu_core_register(VAR_0);
VAR_0++;
}
}
| [
"static void FUNC_0(void)\n{",
"const SPAPRCoreInfo *VAR_0 = spapr_cores;",
"type_register_static(&spapr_cpu_core_type_info);",
"while (VAR_0->name) {",
"spapr_cpu_core_register(VAR_0);",
"VAR_0++;",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
3,784 | void address_space_rw(AddressSpace *as, target_phys_addr_t addr, uint8_t *buf,
int len, bool is_write)
{
AddressSpaceDispatch *d = as->dispatch;
int l;
uint8_t *ptr;
uint32_t val;
target_phys_addr_t page;
MemoryRegionSection *section;
while (len > 0) {
... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | void address_space_rw(AddressSpace *as, target_phys_addr_t addr, uint8_t *buf,
int len, bool is_write)
{
AddressSpaceDispatch *d = as->dispatch;
int l;
uint8_t *ptr;
uint32_t val;
target_phys_addr_t page;
MemoryRegionSection *section;
while (len > 0) {
... | {
"code": [],
"line_no": []
} | void FUNC_0(AddressSpace *VAR_0, target_phys_addr_t VAR_1, uint8_t *VAR_2,
int VAR_3, bool VAR_4)
{
AddressSpaceDispatch *d = VAR_0->dispatch;
int VAR_5;
uint8_t *ptr;
uint32_t val;
target_phys_addr_t page;
MemoryRegionSection *section;
while (VAR_3 > 0) {
... | [
"void FUNC_0(AddressSpace *VAR_0, target_phys_addr_t VAR_1, uint8_t *VAR_2,\nint VAR_3, bool VAR_4)\n{",
"AddressSpaceDispatch *d = VAR_0->dispatch;",
"int VAR_5;",
"uint8_t *ptr;",
"uint32_t val;",
"target_phys_addr_t page;",
"MemoryRegionSection *section;",
"while (VAR_3 > 0) {",
"page = VAR_1 & T... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
47
],
[
51
],
[
53
... |
3,785 | float32 int64_to_float32( int64 a STATUS_PARAM )
{
flag zSign;
uint64 absA;
int8 shiftCount;
if ( a == 0 ) return 0;
zSign = ( a < 0 );
absA = zSign ? - a : a;
shiftCount = countLeadingZeros64( absA ) - 40;
if ( 0 <= shiftCount ) {
return packFloat32( zSign, 0x95 - sh... | false | qemu | f090c9d4ad5812fb92843d6470a1111c15190c4c | float32 int64_to_float32( int64 a STATUS_PARAM )
{
flag zSign;
uint64 absA;
int8 shiftCount;
if ( a == 0 ) return 0;
zSign = ( a < 0 );
absA = zSign ? - a : a;
shiftCount = countLeadingZeros64( absA ) - 40;
if ( 0 <= shiftCount ) {
return packFloat32( zSign, 0x95 - sh... | {
"code": [],
"line_no": []
} | float32 FUNC_0( int64 a STATUS_PARAM )
{
flag zSign;
uint64 absA;
int8 shiftCount;
if ( a == 0 ) return 0;
zSign = ( a < 0 );
absA = zSign ? - a : a;
shiftCount = countLeadingZeros64( absA ) - 40;
if ( 0 <= shiftCount ) {
return packFloat32( zSign, 0x95 - shiftCount, ... | [
"float32 FUNC_0( int64 a STATUS_PARAM )\n{",
"flag zSign;",
"uint64 absA;",
"int8 shiftCount;",
"if ( a == 0 ) return 0;",
"zSign = ( a < 0 );",
"absA = zSign ? - a : a;",
"shiftCount = countLeadingZeros64( absA ) - 40;",
"if ( 0 <= shiftCount ) {",
"return packFloat32( zSign, 0x95 - shiftCount, a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
3,787 | void clear_blocks_dcbz32_ppc(DCTELEM *blocks)
{
POWERPC_TBL_DECLARE(powerpc_clear_blocks_dcbz32, 1);
register int misal = ((unsigned long)blocks & 0x00000010);
register int i = 0;
POWERPC_TBL_START_COUNT(powerpc_clear_blocks_dcbz32, 1);
#if 1
if (misal) {
((unsigned long*)blocks)[0] = 0L;
... | false | FFmpeg | e45a2872fafe631c14aee9f79d0963d68c4fc1fd | void clear_blocks_dcbz32_ppc(DCTELEM *blocks)
{
POWERPC_TBL_DECLARE(powerpc_clear_blocks_dcbz32, 1);
register int misal = ((unsigned long)blocks & 0x00000010);
register int i = 0;
POWERPC_TBL_START_COUNT(powerpc_clear_blocks_dcbz32, 1);
#if 1
if (misal) {
((unsigned long*)blocks)[0] = 0L;
... | {
"code": [],
"line_no": []
} | void FUNC_0(DCTELEM *VAR_0)
{
POWERPC_TBL_DECLARE(powerpc_clear_blocks_dcbz32, 1);
register int VAR_1 = ((unsigned long)VAR_0 & 0x00000010);
register int VAR_2 = 0;
POWERPC_TBL_START_COUNT(powerpc_clear_blocks_dcbz32, 1);
#if 1
if (VAR_1) {
((unsigned long*)VAR_0)[0] = 0L;
((unsigned lo... | [
"void FUNC_0(DCTELEM *VAR_0)\n{",
"POWERPC_TBL_DECLARE(powerpc_clear_blocks_dcbz32, 1);",
"register int VAR_1 = ((unsigned long)VAR_0 & 0x00000010);",
"register int VAR_2 = 0;",
"POWERPC_TBL_START_COUNT(powerpc_clear_blocks_dcbz32, 1);",
"#if 1\nif (VAR_1) {",
"((unsigned long*)VAR_0)[0] = 0L;",
"((un... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[... |
3,788 | static uint64_t read_raw_cp_reg(CPUARMState *env, const ARMCPRegInfo *ri)
{
/* Raw read of a coprocessor register (as needed for migration, etc). */
if (ri->type & ARM_CP_CONST) {
return ri->resetvalue;
} else if (ri->raw_readfn) {
return ri->raw_readfn(env, ri);
} else if (ri->re... | false | qemu | 49a661910c1374858602a3002b67115893673c25 | static uint64_t read_raw_cp_reg(CPUARMState *env, const ARMCPRegInfo *ri)
{
if (ri->type & ARM_CP_CONST) {
return ri->resetvalue;
} else if (ri->raw_readfn) {
return ri->raw_readfn(env, ri);
} else if (ri->readfn) {
return ri->readfn(env, ri);
} else {
retu... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(CPUARMState *env, const ARMCPRegInfo *ri)
{
if (ri->type & ARM_CP_CONST) {
return ri->resetvalue;
} else if (ri->raw_readfn) {
return ri->raw_readfn(env, ri);
} else if (ri->readfn) {
return ri->readfn(env, ri);
} else {
return raw_re... | [
"static uint64_t FUNC_0(CPUARMState *env, const ARMCPRegInfo *ri)\n{",
"if (ri->type & ARM_CP_CONST) {",
"return ri->resetvalue;",
"} else if (ri->raw_readfn) {",
"return ri->raw_readfn(env, ri);",
"} else if (ri->readfn) {",
"return ri->readfn(env, ri);",
"} else {",
"return raw_read(env, ri);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
3,790 | static void exec_accept_incoming_migration(void *opaque)
{
QEMUFile *f = opaque;
int ret;
ret = qemu_loadvm_state(f);
if (ret < 0) {
fprintf(stderr, "load of migration failed\n");
goto err;
}
qemu_announce_self();
DPRINTF("successfully loaded vm state\n");
/*... | false | qemu | cfaf6d36ae761da1033159d85d670706ffb24fb9 | static void exec_accept_incoming_migration(void *opaque)
{
QEMUFile *f = opaque;
int ret;
ret = qemu_loadvm_state(f);
if (ret < 0) {
fprintf(stderr, "load of migration failed\n");
goto err;
}
qemu_announce_self();
DPRINTF("successfully loaded vm state\n");
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
QEMUFile *f = VAR_0;
int VAR_1;
VAR_1 = qemu_loadvm_state(f);
if (VAR_1 < 0) {
fprintf(stderr, "load of migration failed\n");
goto err;
}
qemu_announce_self();
DPRINTF("successfully loaded vm state\n");
qemu_set_fd_hand... | [
"static void FUNC_0(void *VAR_0)\n{",
"QEMUFile *f = VAR_0;",
"int VAR_1;",
"VAR_1 = qemu_loadvm_state(f);",
"if (VAR_1 < 0) {",
"fprintf(stderr, \"load of migration failed\\n\");",
"goto err;",
"}",
"qemu_announce_self();",
"DPRINTF(\"successfully loaded vm state\\n\");",
"qemu_set_fd_handler2(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29,
31
],
[
35,
37
],
[
39
]
] |
3,791 | static void mainstone_common_init(ram_addr_t ram_size, int vga_ram_size,
const char *kernel_filename,
const char *kernel_cmdline, const char *initrd_filename,
const char *cpu_model, enum mainstone_model_e model, int arm_id)
{
uint32_t sector_len = 256 * 1024;
... | false | qemu | a0b753dfd3920df146a5f4d05e442e3c522900c7 | static void mainstone_common_init(ram_addr_t ram_size, int vga_ram_size,
const char *kernel_filename,
const char *kernel_cmdline, const char *initrd_filename,
const char *cpu_model, enum mainstone_model_e model, int arm_id)
{
uint32_t sector_len = 256 * 1024;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(ram_addr_t VAR_0, int VAR_1,
const char *VAR_2,
const char *VAR_3, const char *VAR_4,
const char *VAR_5, enum mainstone_model_e VAR_6, int VAR_7)
{
uint32_t sector_len = 256 * 1024;
target_phys_addr_t mainstone_flash_base[] = { MST_FLASH_0... | [
"static void FUNC_0(ram_addr_t VAR_0, int VAR_1,\nconst char *VAR_2,\nconst char *VAR_3, const char *VAR_4,\nconst char *VAR_5, enum mainstone_model_e VAR_6, int VAR_7)\n{",
"uint32_t sector_len = 256 * 1024;",
"target_phys_addr_t mainstone_flash_base[] = { MST_FLASH_0, MST_FLASH_1 };",
"struct pxa2xx_state_s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
31,
33
],
[
35,
37,
39
],
[
41
],
[
43
],
[
47
],
[
49,
51
],
[
57
],
[
63
],
[
65
... |
3,792 | static void spapr_msi_setmsg(PCIDevice *pdev, hwaddr addr,
bool msix, unsigned req_num)
{
unsigned i;
MSIMessage msg = { .address = addr, .data = 0 };
if (!msix) {
msi_set_message(pdev, msg);
trace_spapr_pci_msi_setup(pdev->name, 0, msg.address);
... | false | qemu | f1c2dc7c866a939c39c14729290a21309a1c8a38 | static void spapr_msi_setmsg(PCIDevice *pdev, hwaddr addr,
bool msix, unsigned req_num)
{
unsigned i;
MSIMessage msg = { .address = addr, .data = 0 };
if (!msix) {
msi_set_message(pdev, msg);
trace_spapr_pci_msi_setup(pdev->name, 0, msg.address);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(PCIDevice *VAR_0, hwaddr VAR_1,
bool VAR_2, unsigned VAR_3)
{
unsigned VAR_4;
MSIMessage msg = { .address = VAR_1, .data = 0 };
if (!VAR_2) {
msi_set_message(VAR_0, msg);
trace_spapr_pci_msi_setup(VAR_0->name, 0, msg.address);
... | [
"static void FUNC_0(PCIDevice *VAR_0, hwaddr VAR_1,\nbool VAR_2, unsigned VAR_3)\n{",
"unsigned VAR_4;",
"MSIMessage msg = { .address = VAR_1, .data = 0 };",
"if (!VAR_2) {",
"msi_set_message(VAR_0, msg);",
"trace_spapr_pci_msi_setup(VAR_0->name, 0, msg.address);",
"return;",
"}",
"for (VAR_4 = 0; V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
3,793 | static SocketAddressLegacy *nbd_build_socket_address(const char *sockpath,
const char *bindto,
const char *port)
{
SocketAddressLegacy *saddr;
saddr = g_new0(SocketAddressLegacy, 1);
if (sockpath) {
... | false | qemu | bd269ebc82fbaa5fe7ce5bc7c1770ac8acecd884 | static SocketAddressLegacy *nbd_build_socket_address(const char *sockpath,
const char *bindto,
const char *port)
{
SocketAddressLegacy *saddr;
saddr = g_new0(SocketAddressLegacy, 1);
if (sockpath) {
... | {
"code": [],
"line_no": []
} | static SocketAddressLegacy *FUNC_0(const char *sockpath,
const char *bindto,
const char *port)
{
SocketAddressLegacy *saddr;
saddr = g_new0(SocketAddressLegacy, 1);
if (sockpath) {
saddr->type = SO... | [
"static SocketAddressLegacy *FUNC_0(const char *sockpath,\nconst char *bindto,\nconst char *port)\n{",
"SocketAddressLegacy *saddr;",
"saddr = g_new0(SocketAddressLegacy, 1);",
"if (sockpath) {",
"saddr->type = SOCKET_ADDRESS_LEGACY_KIND_UNIX;",
"saddr->u.q_unix.data = g_new0(UnixSocketAddress, 1);",
"s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
... |
3,794 | static uint16_t blizzard_reg_read(void *opaque, uint8_t reg)
{
BlizzardState *s = (BlizzardState *) opaque;
switch (reg) {
case 0x00: /* Revision Code */
return 0xa5;
case 0x02: /* Configuration Readback */
return 0x83; /* Macrovision OK, CNF[2:0] = 3 */
case 0x04: /* P... | false | qemu | a89f364ae8740dfc31b321eed9ee454e996dc3c1 | static uint16_t blizzard_reg_read(void *opaque, uint8_t reg)
{
BlizzardState *s = (BlizzardState *) opaque;
switch (reg) {
case 0x00:
return 0xa5;
case 0x02:
return 0x83;
case 0x04:
return (s->pll - 1) | (1 << 7);
case 0x06:
return s->pll_ran... | {
"code": [],
"line_no": []
} | static uint16_t FUNC_0(void *opaque, uint8_t reg)
{
BlizzardState *s = (BlizzardState *) opaque;
switch (reg) {
case 0x00:
return 0xa5;
case 0x02:
return 0x83;
case 0x04:
return (s->pll - 1) | (1 << 7);
case 0x06:
return s->pll_range;
ca... | [
"static uint16_t FUNC_0(void *opaque, uint8_t reg)\n{",
"BlizzardState *s = (BlizzardState *) opaque;",
"switch (reg) {",
"case 0x00:\nreturn 0xa5;",
"case 0x02:\nreturn 0x83;",
"case 0x04:\nreturn (s->pll - 1) | (1 << 7);",
"case 0x06:\nreturn s->pll_range;",
"case 0x08:\nreturn s->pll_ctrl & 0xff;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
17,
19
],
[
23,
25
],
[
27,
29
],
[
31,
33
],
[
35,
37
],
[
39,
41
],
[
45,
47
],
[
51,
53,
55
],
[
59,
61
],
[
63,
65... |
3,796 | void tcg_gen_brcond_i32(TCGCond cond, TCGv_i32 arg1, TCGv_i32 arg2, int label)
{
if (cond == TCG_COND_ALWAYS) {
tcg_gen_br(label);
} else if (cond != TCG_COND_NEVER) {
tcg_gen_op4ii_i32(INDEX_op_brcond_i32, arg1, arg2, cond, label);
}
}
| false | qemu | 42a268c241183877192c376d03bd9b6d527407c7 | void tcg_gen_brcond_i32(TCGCond cond, TCGv_i32 arg1, TCGv_i32 arg2, int label)
{
if (cond == TCG_COND_ALWAYS) {
tcg_gen_br(label);
} else if (cond != TCG_COND_NEVER) {
tcg_gen_op4ii_i32(INDEX_op_brcond_i32, arg1, arg2, cond, label);
}
}
| {
"code": [],
"line_no": []
} | void FUNC_0(TCGCond VAR_0, TCGv_i32 VAR_1, TCGv_i32 VAR_2, int VAR_3)
{
if (VAR_0 == TCG_COND_ALWAYS) {
tcg_gen_br(VAR_3);
} else if (VAR_0 != TCG_COND_NEVER) {
tcg_gen_op4ii_i32(INDEX_op_brcond_i32, VAR_1, VAR_2, VAR_0, VAR_3);
}
}
| [
"void FUNC_0(TCGCond VAR_0, TCGv_i32 VAR_1, TCGv_i32 VAR_2, int VAR_3)\n{",
"if (VAR_0 == TCG_COND_ALWAYS) {",
"tcg_gen_br(VAR_3);",
"} else if (VAR_0 != TCG_COND_NEVER) {",
"tcg_gen_op4ii_i32(INDEX_op_brcond_i32, VAR_1, VAR_2, VAR_0, VAR_3);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.