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 |
|---|---|---|---|---|---|---|---|---|---|---|
6,958 | static void dec_modu(DisasContext *dc)
{
int l1;
LOG_DIS("modu r%d, r%d, %d\n", dc->r2, dc->r0, dc->r1);
if (!(dc->env->features & LM32_FEATURE_DIVIDE)) {
cpu_abort(dc->env, "hardware divider is not available\n");
}
l1 = gen_new_label();
tcg_gen_brcondi_tl(TCG_COND_NE, cpu_... | true | qemu | 3604a76fea6ff37738d4a8f596be38407be74a83 | static void dec_modu(DisasContext *dc)
{
int l1;
LOG_DIS("modu r%d, r%d, %d\n", dc->r2, dc->r0, dc->r1);
if (!(dc->env->features & LM32_FEATURE_DIVIDE)) {
cpu_abort(dc->env, "hardware divider is not available\n");
}
l1 = gen_new_label();
tcg_gen_brcondi_tl(TCG_COND_NE, cpu_... | {
"code": [
" cpu_abort(dc->env, \"hardware divider is not available\\n\");",
" cpu_abort(dc->env, \"hardware divider is not available\\n\");"
],
"line_no": [
15,
15
]
} | static void FUNC_0(DisasContext *VAR_0)
{
int VAR_1;
LOG_DIS("modu r%d, r%d, %d\n", VAR_0->r2, VAR_0->r0, VAR_0->r1);
if (!(VAR_0->env->features & LM32_FEATURE_DIVIDE)) {
cpu_abort(VAR_0->env, "hardware divider is not available\n");
}
VAR_1 = gen_new_label();
tcg_gen_brcond... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"int VAR_1;",
"LOG_DIS(\"modu r%d, r%d, %d\\n\", VAR_0->r2, VAR_0->r0, VAR_0->r1);",
"if (!(VAR_0->env->features & LM32_FEATURE_DIVIDE)) {",
"cpu_abort(VAR_0->env, \"hardware divider is not available\\n\");",
"}",
"VAR_1 = gen_new_label();",
"tcg_gen_brcon... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
]
] |
6,959 | static void rv40_loop_filter(RV34DecContext *r, int row)
{
MpegEncContext *s = &r->s;
int mb_pos, mb_x;
int i, j, k;
uint8_t *Y, *C;
int alpha, beta, betaY, betaC;
int q;
int mbtype[4]; ///< current macroblock and its neighbours types
/**
* flags indicating that macroblo... | true | FFmpeg | f6774f905fb3cfdc319523ac640be30b14c1bc55 | static void rv40_loop_filter(RV34DecContext *r, int row)
{
MpegEncContext *s = &r->s;
int mb_pos, mb_x;
int i, j, k;
uint8_t *Y, *C;
int alpha, beta, betaY, betaC;
int q;
int mbtype[4];
int mb_strong[4];
int clip[4];
int cbp[4];
... | {
"code": [
" Y = s->current_picture_ptr->f.data[0] + mb_x*16 + (row*16 + j) * s->linesize;",
" Y = s->current_picture_ptr->f.data[0] + mb_x*16 + (row*16 + j) * s->linesize;",
" C = s->current_picture_ptr->f.data[k + 1] + mb_x*8 + (row*8 + j*4) * s->uvlinesize;"
],
... | static void FUNC_0(RV34DecContext *VAR_0, int VAR_1)
{
MpegEncContext *s = &VAR_0->s;
int VAR_2, VAR_3;
int VAR_4, VAR_5, VAR_6;
uint8_t *Y, *C;
int VAR_7, VAR_8, VAR_9, VAR_10;
int VAR_11;
int VAR_12[4];
int VAR_13[4];
int VAR_14[4];
... | [
"static void FUNC_0(RV34DecContext *VAR_0, int VAR_1)\n{",
"MpegEncContext *s = &VAR_0->s;",
"int VAR_2, VAR_3;",
"int VAR_4, VAR_5, VAR_6;",
"uint8_t *Y, *C;",
"int VAR_7, VAR_8, VAR_9, VAR_10;",
"int VAR_11;",
"int VAR_12[4];",
"int VAR_13[4];",
"int VAR_14[4];",
"int VAR_15[4];",
"int VAR_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,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
27
],
[
29
],
[
43
],
[
53
],
[
65
],
[
69
],
[
71
],
[
73
],
[
75,
77
],
[
79,
81
],
[
83
... |
6,961 | static int mmap_read_frame(AVFormatContext *ctx, AVPacket *pkt)
{
struct video_data *s = ctx->priv_data;
struct v4l2_buffer buf = {
.type = V4L2_BUF_TYPE_VIDEO_CAPTURE,
.memory = V4L2_MEMORY_MMAP
};
int res;
pkt->size = 0;
/* FIXME: Some special treatment might be ... | true | FFmpeg | 00a1e1337f22376909338a5319a378b2e2afdde8 | static int mmap_read_frame(AVFormatContext *ctx, AVPacket *pkt)
{
struct video_data *s = ctx->priv_data;
struct v4l2_buffer buf = {
.type = V4L2_BUF_TYPE_VIDEO_CAPTURE,
.memory = V4L2_MEMORY_MMAP
};
int res;
pkt->size = 0;
while ((res = v4l2_ioctl(s->fd, VIDI... | {
"code": [
" pkt->pts = buf.timestamp.tv_sec * INT64_C(1000000) + buf.timestamp.tv_usec;"
],
"line_no": [
197
]
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
struct video_data *VAR_2 = VAR_0->priv_data;
struct v4l2_buffer VAR_3 = {
.type = V4L2_BUF_TYPE_VIDEO_CAPTURE,
.memory = V4L2_MEMORY_MMAP
};
int VAR_4;
VAR_1->size = 0;
while ((VAR_4 = v4l2_ioctl(VA... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"struct video_data *VAR_2 = VAR_0->priv_data;",
"struct v4l2_buffer VAR_3 = {",
".type = V4L2_BUF_TYPE_VIDEO_CAPTURE,\n.memory = V4L2_MEMORY_MMAP\n};",
"int VAR_4;",
"VAR_1->size = 0;",
"while ((VAR_4 = v4l2_ioctl(VAR_2->fd, VIDIOC_DQBUF... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27
],
[
29,
31
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
... |
6,962 | static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
{
SegmentContext *seg = s->priv_data;
AVStream *st = s->streams[pkt->stream_index];
int64_t end_pts = INT64_MAX, offset;
int start_frame = INT_MAX;
int ret;
struct tm ti;
int64_t usecs;
int64_t wrapped_val;
if... | true | FFmpeg | 2b202900618d82030384d46c8d9c3dbf3fe1d7ed | static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
{
SegmentContext *seg = s->priv_data;
AVStream *st = s->streams[pkt->stream_index];
int64_t end_pts = INT64_MAX, offset;
int start_frame = INT_MAX;
int ret;
struct tm ti;
int64_t usecs;
int64_t wrapped_val;
if... | {
"code": [
" if (!seg->avf)"
],
"line_no": [
23
]
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
SegmentContext *seg = VAR_0->priv_data;
AVStream *st = VAR_0->streams[VAR_1->stream_index];
int64_t end_pts = INT64_MAX, offset;
int VAR_2 = INT_MAX;
int VAR_3;
struct tm VAR_4;
int64_t usecs;
int64_t wrapped_val;
... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"SegmentContext *seg = VAR_0->priv_data;",
"AVStream *st = VAR_0->streams[VAR_1->stream_index];",
"int64_t end_pts = INT64_MAX, offset;",
"int VAR_2 = INT_MAX;",
"int VAR_3;",
"struct tm VAR_4;",
"int64_t usecs;",
"int64_t wrapped_val;... | [
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,
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
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
6,963 | static int reap_filters(int flush)
{
AVFrame *filtered_frame = NULL;
int i;
/* Reap all buffers present in the buffer sinks */
for (i = 0; i < nb_output_streams; i++) {
OutputStream *ost = output_streams[i];
OutputFile *of = output_files[ost->file_index];
AVFilterCon... | true | FFmpeg | 4b192ffdbe226461d8a07fd36d655ec13b2c7582 | static int reap_filters(int flush)
{
AVFrame *filtered_frame = NULL;
int i;
for (i = 0; i < nb_output_streams; i++) {
OutputStream *ost = output_streams[i];
OutputFile *of = output_files[ost->file_index];
AVFilterContext *filter;
AVCodecContext *enc = ost->... | {
"code": [
" char error[1024];",
" char error[1024];"
],
"line_no": [
37,
37
]
} | static int FUNC_0(int VAR_0)
{
AVFrame *filtered_frame = NULL;
int VAR_1;
for (VAR_1 = 0; VAR_1 < nb_output_streams; VAR_1++) {
OutputStream *ost = output_streams[VAR_1];
OutputFile *of = output_files[ost->file_index];
AVFilterContext *filter;
AVCodecContex... | [
"static int FUNC_0(int VAR_0)\n{",
"AVFrame *filtered_frame = NULL;",
"int VAR_1;",
"for (VAR_1 = 0; VAR_1 < nb_output_streams; VAR_1++) {",
"OutputStream *ost = output_streams[VAR_1];",
"OutputFile *of = output_files[ost->file_index];",
"AVFilterContext *filter;",
"AVCodecContext *enc = ost->enc_c... | [
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
[
51... |
6,964 | static int decode_p_picture_primary_header(VC9Context *v)
{
/* INTERFRM, FRMCNT, RANGEREDFRM read in caller */
GetBitContext *gb = &v->s.gb;
int lowquant, pqindex, status = 0;
pqindex = get_bits(gb, 5);
if (v->quantizer_mode == QUANT_FRAME_IMPLICIT)
v->pq = pquant_table[0][pqindex];... | true | FFmpeg | bf2bc926f04dcdde0a22c137d08a0bb546e0179e | static int decode_p_picture_primary_header(VC9Context *v)
{
GetBitContext *gb = &v->s.gb;
int lowquant, pqindex, status = 0;
pqindex = get_bits(gb, 5);
if (v->quantizer_mode == QUANT_FRAME_IMPLICIT)
v->pq = pquant_table[0][pqindex];
else
{
v->pq = pquant_table[v-... | {
"code": [
"#endif",
" if (v->multires) v->respic = get_bits(gb, 2);",
"#if HAS_ADVANCED_PROFILE",
" if (v->postprocflag) v->postproc = get_bits(gb, 1);",
"#endif",
" int lowquant, pqindex, status = 0;",
" return 0;"
],
"line_no": [
51,
53,
39,
45,
... | static int FUNC_0(VC9Context *VAR_0)
{
GetBitContext *gb = &VAR_0->s.gb;
int VAR_1, VAR_2, VAR_3 = 0;
VAR_2 = get_bits(gb, 5);
if (VAR_0->quantizer_mode == QUANT_FRAME_IMPLICIT)
VAR_0->pq = pquant_table[0][VAR_2];
else
{
VAR_0->pq = pquant_table[VAR_0->quantizer_... | [
"static int FUNC_0(VC9Context *VAR_0)\n{",
"GetBitContext *gb = &VAR_0->s.gb;",
"int VAR_1, VAR_2, VAR_3 = 0;",
"VAR_2 = get_bits(gb, 5);",
"if (VAR_0->quantizer_mode == QUANT_FRAME_IMPLICIT)\nVAR_0->pq = pquant_table[0][VAR_2];",
"else\n{",
"VAR_0->pq = pquant_table[VAR_0->quantizer_mode-1][VAR_2];",
... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33,
35
],
[
37
],
[
39,
41,
43
],
[
45
],
[
47
],
[
49,
51,
53... |
6,965 | static int sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stream_index, int64_t *pos){
RMDemuxContext *rm = s->priv_data;
ByteIOContext *pb = s->pb;
int len, num, res, i;
AVStream *st;
uint32_t state=0xFFFFFFFF;
while(!url_feof(pb)){
*pos= url_ftell(pb) - 3;
... | true | FFmpeg | b8cc5a9fdfbc514a0d6e02b7c5380853a50ae1ac | static int sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stream_index, int64_t *pos){
RMDemuxContext *rm = s->priv_data;
ByteIOContext *pb = s->pb;
int len, num, res, i;
AVStream *st;
uint32_t state=0xFFFFFFFF;
while(!url_feof(pb)){
*pos= url_ftell(pb) - 3;
... | {
"code": [
" rm->remaining_len -= len;"
],
"line_no": [
93
]
} | static int FUNC_0(AVFormatContext *VAR_0, int64_t *VAR_1, int *VAR_2, int *VAR_3, int64_t *VAR_4){
RMDemuxContext *rm = VAR_0->priv_data;
ByteIOContext *pb = VAR_0->pb;
int VAR_5, VAR_6, VAR_7, VAR_8;
AVStream *st;
uint32_t state=0xFFFFFFFF;
while(!url_feof(pb)){
*VAR_4= url_fte... | [
"static int FUNC_0(AVFormatContext *VAR_0, int64_t *VAR_1, int *VAR_2, int *VAR_3, int64_t *VAR_4){",
"RMDemuxContext *rm = VAR_0->priv_data;",
"ByteIOContext *pb = VAR_0->pb;",
"int VAR_5, VAR_6, VAR_7, VAR_8;",
"AVStream *st;",
"uint32_t state=0xFFFFFFFF;",
"while(!url_feof(pb)){",
"*VAR_4= url_ftel... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
... |
6,966 | int mpeg4_decode_picture_header(MpegEncContext * s)
{
int time_incr, startcode, state, v;
redo:
/* search next start code */
align_get_bits(&s->gb);
state = 0xff;
for(;;) {
v = get_bits(&s->gb, 8);
if (state == 0x000001) {
state = ((state << 8) | v) & 0xfffff... | true | FFmpeg | 11ce88346b1ae4da21b581baf1b4eb784d842547 | int mpeg4_decode_picture_header(MpegEncContext * s)
{
int time_incr, startcode, state, v;
redo:
align_get_bits(&s->gb);
state = 0xff;
for(;;) {
v = get_bits(&s->gb, 8);
if (state == 0x000001) {
state = ((state << 8) | v) & 0xffffff;
startcode = ... | {
"code": [],
"line_no": []
} | int FUNC_0(MpegEncContext * VAR_0)
{
int VAR_1, VAR_2, VAR_3, VAR_4;
redo:
align_get_bits(&VAR_0->gb);
VAR_3 = 0xff;
for(;;) {
VAR_4 = get_bits(&VAR_0->gb, 8);
if (VAR_3 == 0x000001) {
VAR_3 = ((VAR_3 << 8) | VAR_4) & 0xffffff;
VAR_2 = VAR_3;
... | [
"int FUNC_0(MpegEncContext * VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3, VAR_4;",
"redo:\nalign_get_bits(&VAR_0->gb);",
"VAR_3 = 0xff;",
"for(;;) {",
"VAR_4 = get_bits(&VAR_0->gb, 8);",
"if (VAR_3 == 0x000001) {",
"VAR_3 = ((VAR_3 << 8) | VAR_4) & 0xffffff;",
"VAR_2 = VAR_3;",
"break;",
"}",
"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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
... |
6,968 | static int encode_init(AVCodecContext * avctx){
WMACodecContext *s = avctx->priv_data;
int i, flags1, flags2;
uint8_t *extradata;
s->avctx = avctx;
if(avctx->channels > MAX_CHANNELS) {
av_log(avctx, AV_LOG_ERROR, "too many channels: got %i, need %i or fewer",
avctx-... | true | FFmpeg | c2b8dea1828f35c808adcf12615893d5c740bc0a | static int encode_init(AVCodecContext * avctx){
WMACodecContext *s = avctx->priv_data;
int i, flags1, flags2;
uint8_t *extradata;
s->avctx = avctx;
if(avctx->channels > MAX_CHANNELS) {
av_log(avctx, AV_LOG_ERROR, "too many channels: got %i, need %i or fewer",
avctx-... | {
"code": [
" avctx->block_align=",
" s->block_align= avctx->bit_rate*(int64_t)s->frame_len / (avctx->sample_rate*8);"
],
"line_no": [
91,
93
]
} | static int FUNC_0(AVCodecContext * VAR_0){
WMACodecContext *s = VAR_0->priv_data;
int VAR_1, VAR_2, VAR_3;
uint8_t *extradata;
s->VAR_0 = VAR_0;
if(VAR_0->channels > MAX_CHANNELS) {
av_log(VAR_0, AV_LOG_ERROR, "too many channels: got %VAR_1, need %VAR_1 or fewer",
V... | [
"static int FUNC_0(AVCodecContext * VAR_0){",
"WMACodecContext *s = VAR_0->priv_data;",
"int VAR_1, VAR_2, VAR_3;",
"uint8_t *extradata;",
"s->VAR_0 = VAR_0;",
"if(VAR_0->channels > MAX_CHANNELS) {",
"av_log(VAR_0, AV_LOG_ERROR, \"too many channels: got %VAR_1, need %VAR_1 or fewer\",\nVAR_0->channels, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
... |
6,969 | static int txd_read_header(AVFormatContext *s, AVFormatParameters *ap) {
AVStream *st;
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_TXD;
st->codec->time_base.den = 5;
st->codec->time_bas... | true | FFmpeg | f72601d06378494b5026b919fcd3eb5eb22799a1 | static int txd_read_header(AVFormatContext *s, AVFormatParameters *ap) {
AVStream *st;
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_TXD;
st->codec->time_base.den = 5;
st->codec->time_bas... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVFormatParameters *VAR_1) {
AVStream *st;
st = avformat_new_stream(VAR_0, NULL);
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_TXD;
st->codec->time_base.den = 5;
st->codec->time_b... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVFormatParameters *VAR_1) {",
"AVStream *st;",
"st = avformat_new_stream(VAR_0, NULL);",
"if (!st)\nreturn AVERROR(ENOMEM);",
"st->codec->codec_type = AVMEDIA_TYPE_VIDEO;",
"st->codec->codec_id = CODEC_ID_TXD;",
"st->codec->time_base.den = 5;",
"st->codec->t... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
2
],
[
3
],
[
4,
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
11
],
[
12
]
] |
6,970 | static int output_frame(AVFilterLink *outlink, int nb_samples)
{
AVFilterContext *ctx = outlink->src;
MixContext *s = ctx->priv;
AVFilterBufferRef *out_buf, *in_buf;
int i;
calculate_scales(s, nb_samples);
out_buf = ff_get_audio_buffer(outlink, AV_PERM_WRITE, nb_samples);
if... | true | FFmpeg | 8501c098687bbf551a2f1cdef80ee653fdfff6ac | static int output_frame(AVFilterLink *outlink, int nb_samples)
{
AVFilterContext *ctx = outlink->src;
MixContext *s = ctx->priv;
AVFilterBufferRef *out_buf, *in_buf;
int i;
calculate_scales(s, nb_samples);
out_buf = ff_get_audio_buffer(outlink, AV_PERM_WRITE, nb_samples);
if... | {
"code": [
" if (!in_buf)"
],
"line_no": [
29
]
} | static int FUNC_0(AVFilterLink *VAR_0, int VAR_1)
{
AVFilterContext *ctx = VAR_0->src;
MixContext *s = ctx->priv;
AVFilterBufferRef *out_buf, *in_buf;
int VAR_2;
calculate_scales(s, VAR_1);
out_buf = ff_get_audio_buffer(VAR_0, AV_PERM_WRITE, VAR_1);
if (!out_buf)
re... | [
"static int FUNC_0(AVFilterLink *VAR_0, int VAR_1)\n{",
"AVFilterContext *ctx = VAR_0->src;",
"MixContext *s = ctx->priv;",
"AVFilterBufferRef *out_buf, *in_buf;",
"int VAR_2;",
"calculate_scales(s, VAR_1);",
"out_buf = ff_get_audio_buffer(VAR_0, AV_PERM_WRITE, VAR_1);",
"if (!out_buf)\nreturn AV... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21,
23
],
[
27
],
[
29,
31
],
[
35
],
[
37
],
[
39
],
[
43,
45
],
[
49
],
[
51
],
[
53
],
[
57
],
[... |
6,971 | MAKE_ACCESSORS(AVVDPAUContext, vdpau_hwaccel, AVVDPAU_Render2, render2)
int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile,
int level)
{
VDPAUHWContext *hwctx = avctx->hwaccel_context;
VDPAUContext *vdctx = avctx->internal->hwaccel_priv_data;
VdpDecoderCreate ... | true | FFmpeg | ec6a855b3a6b87f3415cc4ecfc685bd2eefc6a80 | MAKE_ACCESSORS(AVVDPAUContext, vdpau_hwaccel, AVVDPAU_Render2, render2)
int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile,
int level)
{
VDPAUHWContext *hwctx = avctx->hwaccel_context;
VDPAUContext *vdctx = avctx->internal->hwaccel_priv_data;
VdpDecoderCreate ... | {
"code": [],
"line_no": []
} | FUNC_0(VAR_0, VAR_1, VAR_2, VAR_3)
int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile,
int level)
{
VDPAUHWContext *hwctx = avctx->hwaccel_context;
VDPAUContext *vdctx = avctx->internal->hwaccel_priv_data;
VdpDecoderCreate *create;
void *VAR_4;
VdpStat... | [
"FUNC_0(VAR_0, VAR_1, VAR_2, VAR_3)\nint ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile,\nint level)\n{",
"VDPAUHWContext *hwctx = avctx->hwaccel_context;",
"VDPAUContext *vdctx = avctx->internal->hwaccel_priv_data;",
"VdpDecoderCreate *create;",
"void *VAR_4;",
"VdpStatus status;",... | [
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
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19,
20
],
[
21,
22
],
[
23,
24
],
[
... |
6,973 | static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
int n, int coded, int intra, int rvlc)
{
int level, i, last, run;
int dc_pred_dir;
RLTable * rl;
RL_VLC_ELEM * rl_vlc;
const uint8_t * scan_table;
int qmul, qadd;
//Note intra &... | true | FFmpeg | 3fbe36d4d0eaad5ed855b0418a841c70d0cdbcb3 | static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
int n, int coded, int intra, int rvlc)
{
int level, i, last, run;
int dc_pred_dir;
RLTable * rl;
RL_VLC_ELEM * rl_vlc;
const uint8_t * scan_table;
int qmul, qadd;
if(int... | {
"code": [
" int dc_pred_dir;"
],
"line_no": [
9
]
} | static inline int FUNC_0(MpegEncContext * VAR_0, DCTELEM * VAR_1,
int VAR_2, int VAR_3, int VAR_4, int VAR_5)
{
int VAR_6, VAR_7, VAR_8, VAR_9;
int VAR_10;
RLTable * rl;
RL_VLC_ELEM * rl_vlc;
const uint8_t * VAR_11;
int VAR_12, VAR_13;
if(VAR_... | [
"static inline int FUNC_0(MpegEncContext * VAR_0, DCTELEM * VAR_1,\nint VAR_2, int VAR_3, int VAR_4, int VAR_5)\n{",
"int VAR_6, VAR_7, VAR_8, VAR_9;",
"int VAR_10;",
"RLTable * rl;",
"RL_VLC_ELEM * rl_vlc;",
"const uint8_t * VAR_11;",
"int VAR_12, VAR_13;",
"if(VAR_4) {",
"if(VAR_0->use_intra_dc_vl... | [
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,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
51
... |
6,974 | static void check_watchpoint(int offset, int len, int flags)
{
CPUState *cpu = current_cpu;
CPUArchState *env = cpu->env_ptr;
target_ulong pc, cs_base;
target_ulong vaddr;
CPUWatchpoint *wp;
int cpu_flags;
if (cpu->watchpoint_hit) {
/* We re-entered the check after replaci... | true | qemu | 66b9b43c42049bcae37668e890fedde9a72c8167 | static void check_watchpoint(int offset, int len, int flags)
{
CPUState *cpu = current_cpu;
CPUArchState *env = cpu->env_ptr;
target_ulong pc, cs_base;
target_ulong vaddr;
CPUWatchpoint *wp;
int cpu_flags;
if (cpu->watchpoint_hit) {
cpu_interrupt(cpu, CPU_INT... | {
"code": [
"static void check_watchpoint(int offset, int len, int flags)"
],
"line_no": [
1
]
} | static void FUNC_0(int VAR_0, int VAR_1, int VAR_2)
{
CPUState *cpu = current_cpu;
CPUArchState *env = cpu->env_ptr;
target_ulong pc, cs_base;
target_ulong vaddr;
CPUWatchpoint *wp;
int VAR_3;
if (cpu->watchpoint_hit) {
cpu_interrupt(cpu, CPU_INTERRUPT_DEBUG)... | [
"static void FUNC_0(int VAR_0, int VAR_1, int VAR_2)\n{",
"CPUState *cpu = current_cpu;",
"CPUArchState *env = cpu->env_ptr;",
"target_ulong pc, cs_base;",
"target_ulong vaddr;",
"CPUWatchpoint *wp;",
"int VAR_3;",
"if (cpu->watchpoint_hit) {",
"cpu_interrupt(cpu, CPU_INTERRUPT_DEBUG);",
"return;"... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
6,975 | int ff_mov_read_esds(AVFormatContext *fc, ByteIOContext *pb, MOVAtom atom)
{
AVStream *st;
int tag, len;
if (fc->nb_streams < 1)
return 0;
st = fc->streams[fc->nb_streams-1];
get_be32(pb); /* version + flags */
len = mp4_read_descr(fc, pb, &tag);
if (tag == MP4ESDescrTag... | true | FFmpeg | 2f412421e8bb1927fcd866777dfedf223c9dfdfb | int ff_mov_read_esds(AVFormatContext *fc, ByteIOContext *pb, MOVAtom atom)
{
AVStream *st;
int tag, len;
if (fc->nb_streams < 1)
return 0;
st = fc->streams[fc->nb_streams-1];
get_be32(pb);
len = mp4_read_descr(fc, pb, &tag);
if (tag == MP4ESDescrTag) {
get_be16... | {
"code": [],
"line_no": []
} | int FUNC_0(AVFormatContext *VAR_0, ByteIOContext *VAR_1, MOVAtom VAR_2)
{
AVStream *st;
int VAR_3, VAR_4;
if (VAR_0->nb_streams < 1)
return 0;
st = VAR_0->streams[VAR_0->nb_streams-1];
get_be32(VAR_1);
VAR_4 = mp4_read_descr(VAR_0, VAR_1, &VAR_3);
if (VAR_3 == MP4ESDesc... | [
"int FUNC_0(AVFormatContext *VAR_0, ByteIOContext *VAR_1, MOVAtom VAR_2)\n{",
"AVStream *st;",
"int VAR_3, VAR_4;",
"if (VAR_0->nb_streams < 1)\nreturn 0;",
"st = VAR_0->streams[VAR_0->nb_streams-1];",
"get_be32(VAR_1);",
"VAR_4 = mp4_read_descr(VAR_0, VAR_1, &VAR_3);",
"if (VAR_3 == MP4ESDescrTag) {"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
... |
6,976 | PPC_OP(neg)
{
if (T0 != 0x80000000) {
T0 = -Ts0;
}
RETURN();
}
| true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | PPC_OP(neg)
{
if (T0 != 0x80000000) {
T0 = -Ts0;
}
RETURN();
}
| {
"code": [
" RETURN();",
"PPC_OP(neg)",
" if (T0 != 0x80000000) {",
" T0 = -Ts0;",
" T0 = -Ts0;",
" RETURN();"
],
"line_no": [
11,
1,
5,
7,
7,
11
]
} | FUNC_0(VAR_0)
{
if (T0 != 0x80000000) {
T0 = -Ts0;
}
RETURN();
}
| [
"FUNC_0(VAR_0)\n{",
"if (T0 != 0x80000000) {",
"T0 = -Ts0;",
"}",
"RETURN();",
"}"
] | [
1,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
6,977 | static inline void gen_op_arith_subf(DisasContext *ctx, TCGv ret, TCGv arg1,
TCGv arg2, bool add_ca, bool compute_ca,
bool compute_ov, bool compute_rc0)
{
TCGv t0 = ret;
if (compute_ca || compute_ov) {
t0 = tcg_temp_new();... | true | qemu | c80d1df5083846396ab5120731a76a9d62900fda | static inline void gen_op_arith_subf(DisasContext *ctx, TCGv ret, TCGv arg1,
TCGv arg2, bool add_ca, bool compute_ca,
bool compute_ov, bool compute_rc0)
{
TCGv t0 = ret;
if (compute_ca || compute_ov) {
t0 = tcg_temp_new();... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(DisasContext *VAR_0, TCGv VAR_1, TCGv VAR_2,
TCGv VAR_3, bool VAR_4, bool VAR_5,
bool VAR_6, bool VAR_7)
{
TCGv t0 = VAR_1;
if (VAR_5 || VAR_6) {
t0 = tcg_temp_new();
}
if (VAR_5) {
... | [
"static inline void FUNC_0(DisasContext *VAR_0, TCGv VAR_1, TCGv VAR_2,\nTCGv VAR_3, bool VAR_4, bool VAR_5,\nbool VAR_6, bool VAR_7)\n{",
"TCGv t0 = VAR_1;",
"if (VAR_5 || VAR_6) {",
"t0 = tcg_temp_new();",
"}",
"if (VAR_5) {",
"if (NARROW_MODE(VAR_0)) {",
"TCGv inv1 = tcg_temp_new();",
"TCGv t1 = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
54
],
[
56
... |
6,978 | static int64_t coroutine_fn vpc_co_get_block_status(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file)
{
BDRVVPCState *s = bs->opaque;
VHDFooter *footer = (VHDFooter*) s->footer_buf;
int64_t start, offset;
bool allocated;
int64_t ret;
in... | true | qemu | cfc87e00c22ab4ea0262c9771c803ed03d754001 | static int64_t coroutine_fn vpc_co_get_block_status(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file)
{
BDRVVPCState *s = bs->opaque;
VHDFooter *footer = (VHDFooter*) s->footer_buf;
int64_t start, offset;
bool allocated;
int64_t ret;
in... | {
"code": [
" offset = get_image_offset(bs, sector_num << BDRV_SECTOR_BITS, false);",
" offset = get_image_offset(bs, sector_num << BDRV_SECTOR_BITS, false);"
],
"line_no": [
39,
89
]
} | static int64_t VAR_0 vpc_co_get_block_status(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file)
{
BDRVVPCState *s = bs->opaque;
VHDFooter *footer = (VHDFooter*) s->footer_buf;
int64_t start, offset;
bool allocated;
int64_t ret;
int n;
... | [
"static int64_t VAR_0 vpc_co_get_block_status(BlockDriverState *bs,\nint64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file)\n{",
"BDRVVPCState *s = bs->opaque;",
"VHDFooter *footer = (VHDFooter*) s->footer_buf;",
"int64_t start, offset;",
"bool allocated;",
"int64_t ret;",
"int n;",
"... | [
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,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
... |
6,979 | struct pxa2xx_mmci_s *pxa2xx_mmci_init(target_phys_addr_t base,
qemu_irq irq, void *dma)
{
int iomemtype;
struct pxa2xx_mmci_s *s;
s = (struct pxa2xx_mmci_s *) qemu_mallocz(sizeof(struct pxa2xx_mmci_s));
s->base = base;
s->irq = irq;
s->dma = dma;
iomemtype = cpu... | true | qemu | 187337f8b0ec0813dd3876d1efe37d415fb81c2e | struct pxa2xx_mmci_s *pxa2xx_mmci_init(target_phys_addr_t base,
qemu_irq irq, void *dma)
{
int iomemtype;
struct pxa2xx_mmci_s *s;
s = (struct pxa2xx_mmci_s *) qemu_mallocz(sizeof(struct pxa2xx_mmci_s));
s->base = base;
s->irq = irq;
s->dma = dma;
iomemtype = cpu... | {
"code": [
" cpu_register_physical_memory(base, 0x000fffff, iomemtype);",
" cpu_register_physical_memory(base, 0x000fffff, iomemtype);",
" cpu_register_physical_memory(base, 0x000fffff, iomemtype);"
],
"line_no": [
27,
27,
27
]
} | struct pxa2xx_mmci_s *FUNC_0(target_phys_addr_t VAR_0,
qemu_irq VAR_1, void *VAR_2)
{
int VAR_3;
struct pxa2xx_mmci_s *VAR_4;
VAR_4 = (struct pxa2xx_mmci_s *) qemu_mallocz(sizeof(struct pxa2xx_mmci_s));
VAR_4->VAR_0 = VAR_0;
VAR_4->VAR_1 = VAR_1;
VAR_4->VAR_2 = VAR_2;
... | [
"struct pxa2xx_mmci_s *FUNC_0(target_phys_addr_t VAR_0,\nqemu_irq VAR_1, void *VAR_2)\n{",
"int VAR_3;",
"struct pxa2xx_mmci_s *VAR_4;",
"VAR_4 = (struct pxa2xx_mmci_s *) qemu_mallocz(sizeof(struct pxa2xx_mmci_s));",
"VAR_4->VAR_0 = VAR_0;",
"VAR_4->VAR_1 = VAR_1;",
"VAR_4->VAR_2 = VAR_2;",
"VAR_3 = c... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
27
],
[
33
],
[
37,
39
],
[
43
],
[
45
]
] |
6,980 | void kvmppc_set_papr(CPUPPCState *env)
{
struct kvm_enable_cap cap = {};
struct kvm_one_reg reg = {};
struct kvm_sregs sregs = {};
int ret;
uint64_t hior = env->spr[SPR_HIOR];
cap.cap = KVM_CAP_PPC_PAPR;
ret = kvm_vcpu_ioctl(env, KVM_ENABLE_CAP, &cap);
if (ret) {
go... | true | qemu | f1af19d767073a0926ce12c19b1f06c4933bca35 | void kvmppc_set_papr(CPUPPCState *env)
{
struct kvm_enable_cap cap = {};
struct kvm_one_reg reg = {};
struct kvm_sregs sregs = {};
int ret;
uint64_t hior = env->spr[SPR_HIOR];
cap.cap = KVM_CAP_PPC_PAPR;
ret = kvm_vcpu_ioctl(env, KVM_ENABLE_CAP, &cap);
if (ret) {
go... | {
"code": [
" struct kvm_one_reg reg = {};",
" struct kvm_sregs sregs = {};",
" uint64_t hior = env->spr[SPR_HIOR];",
" goto fail;",
" reg.id = KVM_REG_PPC_HIOR;",
" reg.addr = (uintptr_t)&hior;",
" ret = kvm_vcpu_ioctl(env, KVM_SET_ONE_REG, ®);",
" if (r... | void FUNC_0(CPUPPCState *VAR_0)
{
struct kvm_enable_cap VAR_1 = {};
struct kvm_one_reg VAR_2 = {};
struct kvm_sregs VAR_3 = {};
int VAR_4;
uint64_t hior = VAR_0->spr[SPR_HIOR];
VAR_1.VAR_1 = KVM_CAP_PPC_PAPR;
VAR_4 = kvm_vcpu_ioctl(VAR_0, KVM_ENABLE_CAP, &VAR_1);
if (VAR_4) ... | [
"void FUNC_0(CPUPPCState *VAR_0)\n{",
"struct kvm_enable_cap VAR_1 = {};",
"struct kvm_one_reg VAR_2 = {};",
"struct kvm_sregs VAR_3 = {};",
"int VAR_4;",
"uint64_t hior = VAR_0->spr[SPR_HIOR];",
"VAR_1.VAR_1 = KVM_CAP_PPC_PAPR;",
"VAR_4 = kvm_vcpu_ioctl(VAR_0, KVM_ENABLE_CAP, &VAR_1);",
"if (VAR_4)... | [
0,
0,
1,
1,
0,
1,
0,
0,
1,
1,
0,
1,
1,
1,
0,
1,
0,
1,
0,
0,
0,
1,
1,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53,
55,
57,
59
],
[
61
],
[
67
],
[... |
6,982 | static void send_ext_key_event_ack(VncState *vs)
{
vnc_lock_output(vs);
vnc_write_u8(vs, VNC_MSG_SERVER_FRAMEBUFFER_UPDATE);
vnc_write_u8(vs, 0);
vnc_write_u16(vs, 1);
vnc_framebuffer_update(vs, 0, 0,
surface_width(vs->vd->ds),
surface_he... | true | qemu | bea60dd7679364493a0d7f5b54316c767cf894ef | static void send_ext_key_event_ack(VncState *vs)
{
vnc_lock_output(vs);
vnc_write_u8(vs, VNC_MSG_SERVER_FRAMEBUFFER_UPDATE);
vnc_write_u8(vs, 0);
vnc_write_u16(vs, 1);
vnc_framebuffer_update(vs, 0, 0,
surface_width(vs->vd->ds),
surface_he... | {
"code": [
" surface_width(vs->vd->ds),",
" surface_height(vs->vd->ds),",
" surface_width(vs->vd->ds),",
" surface_height(vs->vd->ds),"
],
"line_no": [
15,
17,
15,
17
]
} | static void FUNC_0(VncState *VAR_0)
{
vnc_lock_output(VAR_0);
vnc_write_u8(VAR_0, VNC_MSG_SERVER_FRAMEBUFFER_UPDATE);
vnc_write_u8(VAR_0, 0);
vnc_write_u16(VAR_0, 1);
vnc_framebuffer_update(VAR_0, 0, 0,
surface_width(VAR_0->vd->ds),
surfa... | [
"static void FUNC_0(VncState *VAR_0)\n{",
"vnc_lock_output(VAR_0);",
"vnc_write_u8(VAR_0, VNC_MSG_SERVER_FRAMEBUFFER_UPDATE);",
"vnc_write_u8(VAR_0, 0);",
"vnc_write_u16(VAR_0, 1);",
"vnc_framebuffer_update(VAR_0, 0, 0,\nsurface_width(VAR_0->vd->ds),\nsurface_height(VAR_0->vd->ds),\nVNC_ENCODING_EXT_KEY_E... | [
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13,
15,
17,
19
],
[
21
],
[
23
],
[
25
]
] |
6,983 | static inline void RENAME(rgb24to15)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint8_t *s = src;
const uint8_t *end;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*src):"memory");
__as... | true | FFmpeg | 6e42e6c4b410dbef8b593c2d796a5dad95f89ee4 | static inline void RENAME(rgb24to15)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint8_t *s = src;
const uint8_t *end;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*src):"memory");
__as... | {
"code": [
"\twhile(s < end)",
"\twhile(s < end)",
"\twhile(s < end)",
"\twhile(s < end)",
"#ifdef HAVE_MMX",
"#endif",
"#ifdef HAVE_MMX",
"#endif",
"#endif",
"#endif",
"\t__asm __volatile(",
"\t\t\"movq\t%%mm0, %%mm1\\n\\t\"",
"\t\tMOVNTQ\"\t%%mm0, %0\\n\\t\"",
... | static inline void FUNC_0(rgb24to15)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint8_t *VAR_0 = src;
const uint8_t *VAR_1;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
uint16_t *d = (uint16_t *)dst;
VAR_1 = VAR_0 + src_size;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*src):"memo... | [
"static inline void FUNC_0(rgb24to15)(const uint8_t *src, uint8_t *dst, long src_size)\n{",
"const uint8_t *VAR_0 = src;",
"const uint8_t *VAR_1;",
"#ifdef HAVE_MMX\nconst uint8_t *mm_end;",
"#endif\nuint16_t *d = (uint16_t *)dst;",
"VAR_1 = VAR_0 + src_size;",
"#ifdef HAVE_MMX\n__asm __volatile(PREFETC... | [
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
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,
51,
53,
55,
57,
59,... |
6,984 | void *HELPER(lookup_tb_ptr)(CPUArchState *env)
{
CPUState *cpu = ENV_GET_CPU(env);
TranslationBlock *tb;
target_ulong cs_base, pc;
uint32_t flags, hash;
cpu_get_tb_cpu_state(env, &pc, &cs_base, &flags);
hash = tb_jmp_cache_hash_func(pc);
tb = atomic_rcu_read(&cpu->tb_jmp_cache[hash... | true | qemu | f6bb84d53110398f4899c19dab4e0fe9908ec060 | void *HELPER(lookup_tb_ptr)(CPUArchState *env)
{
CPUState *cpu = ENV_GET_CPU(env);
TranslationBlock *tb;
target_ulong cs_base, pc;
uint32_t flags, hash;
cpu_get_tb_cpu_state(env, &pc, &cs_base, &flags);
hash = tb_jmp_cache_hash_func(pc);
tb = atomic_rcu_read(&cpu->tb_jmp_cache[hash... | {
"code": [
" cpu_get_tb_cpu_state(env, &pc, &cs_base, &flags);",
" tb = tb_htable_lookup(cpu, pc, cs_base, flags);",
" if (!tb) {",
" uint32_t flags, hash;",
" cpu_get_tb_cpu_state(env, &pc, &cs_base, &flags);",
" hash = tb_jmp_cache_hash_func(pc);",
" tb = at... | void *FUNC_0(lookup_tb_ptr)(CPUArchState *env)
{
CPUState *cpu = ENV_GET_CPU(env);
TranslationBlock *tb;
target_ulong cs_base, pc;
uint32_t flags, hash;
cpu_get_tb_cpu_state(env, &pc, &cs_base, &flags);
hash = tb_jmp_cache_hash_func(pc);
tb = atomic_rcu_read(&cpu->tb_jmp_cache[hash... | [
"void *FUNC_0(lookup_tb_ptr)(CPUArchState *env)\n{",
"CPUState *cpu = ENV_GET_CPU(env);",
"TranslationBlock *tb;",
"target_ulong cs_base, pc;",
"uint32_t flags, hash;",
"cpu_get_tb_cpu_state(env, &pc, &cs_base, &flags);",
"hash = tb_jmp_cache_hash_func(pc);",
"tb = atomic_rcu_read(&cpu->tb_jmp_cache[h... | [
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23,
25,
27,
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47,
49,
51,
53
],
[... |
6,985 | void ff_mpeg_draw_horiz_band(MpegEncContext *s, int y, int h)
{
ff_draw_horiz_band(s->avctx, &s->current_picture.f,
&s->last_picture.f, y, h, s->picture_structure,
s->first_field, s->low_delay);
}
| true | FFmpeg | f6774f905fb3cfdc319523ac640be30b14c1bc55 | void ff_mpeg_draw_horiz_band(MpegEncContext *s, int y, int h)
{
ff_draw_horiz_band(s->avctx, &s->current_picture.f,
&s->last_picture.f, y, h, s->picture_structure,
s->first_field, s->low_delay);
}
| {
"code": [
" ff_draw_horiz_band(s->avctx, &s->current_picture.f,",
" &s->last_picture.f, y, h, s->picture_structure,"
],
"line_no": [
5,
7
]
} | void FUNC_0(MpegEncContext *VAR_0, int VAR_1, int VAR_2)
{
ff_draw_horiz_band(VAR_0->avctx, &VAR_0->current_picture.f,
&VAR_0->last_picture.f, VAR_1, VAR_2, VAR_0->picture_structure,
VAR_0->first_field, VAR_0->low_delay);
}
| [
"void FUNC_0(MpegEncContext *VAR_0, int VAR_1, int VAR_2)\n{",
"ff_draw_horiz_band(VAR_0->avctx, &VAR_0->current_picture.f,\n&VAR_0->last_picture.f, VAR_1, VAR_2, VAR_0->picture_structure,\nVAR_0->first_field, VAR_0->low_delay);",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5,
7,
9
],
[
11
]
] |
6,986 | int load_image_targphys(const char *filename,
target_phys_addr_t addr, int max_sz)
{
int size;
size = get_image_size(filename);
if (size > 0)
rom_add_file_fixed(filename, addr, -1);
return size;
}
| true | qemu | 17df768c1e4580f03301d18ea938d3557d441911 | int load_image_targphys(const char *filename,
target_phys_addr_t addr, int max_sz)
{
int size;
size = get_image_size(filename);
if (size > 0)
rom_add_file_fixed(filename, addr, -1);
return size;
}
| {
"code": [
" if (size > 0)"
],
"line_no": [
13
]
} | int FUNC_0(const char *VAR_0,
target_phys_addr_t VAR_1, int VAR_2)
{
int VAR_3;
VAR_3 = get_image_size(VAR_0);
if (VAR_3 > 0)
rom_add_file_fixed(VAR_0, VAR_1, -1);
return VAR_3;
}
| [
"int FUNC_0(const char *VAR_0,\ntarget_phys_addr_t VAR_1, int VAR_2)\n{",
"int VAR_3;",
"VAR_3 = get_image_size(VAR_0);",
"if (VAR_3 > 0)\nrom_add_file_fixed(VAR_0, VAR_1, -1);",
"return VAR_3;",
"}"
] | [
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
19
]
] |
6,987 | static void ccid_handle_bulk_out(USBCCIDState *s, USBPacket *p)
{
CCID_Header *ccid_header;
if (p->iov.size + s->bulk_out_pos > BULK_OUT_DATA_SIZE) {
goto err;
}
usb_packet_copy(p, s->bulk_out_data + s->bulk_out_pos, p->iov.size);
s->bulk_out_pos += p->iov.size;
if (s->bulk_out... | true | qemu | 31fb4444a485a348f8e2699d7c3dd15e1819ad2c | static void ccid_handle_bulk_out(USBCCIDState *s, USBPacket *p)
{
CCID_Header *ccid_header;
if (p->iov.size + s->bulk_out_pos > BULK_OUT_DATA_SIZE) {
goto err;
}
usb_packet_copy(p, s->bulk_out_data + s->bulk_out_pos, p->iov.size);
s->bulk_out_pos += p->iov.size;
if (s->bulk_out... | {
"code": [
" if (p->iov.size == CCID_MAX_PACKET_SIZE) {",
" \"usb-ccid: bulk_in: expecting more packets (%zd/%d)\\n\",",
" p->iov.size, ccid_header->dwLength);"
],
"line_no": [
31,
35,
37
]
} | static void FUNC_0(USBCCIDState *VAR_0, USBPacket *VAR_1)
{
CCID_Header *ccid_header;
if (VAR_1->iov.size + VAR_0->bulk_out_pos > BULK_OUT_DATA_SIZE) {
goto err;
}
usb_packet_copy(VAR_1, VAR_0->bulk_out_data + VAR_0->bulk_out_pos, VAR_1->iov.size);
VAR_0->bulk_out_pos += VAR_1->iov.... | [
"static void FUNC_0(USBCCIDState *VAR_0, USBPacket *VAR_1)\n{",
"CCID_Header *ccid_header;",
"if (VAR_1->iov.size + VAR_0->bulk_out_pos > BULK_OUT_DATA_SIZE) {",
"goto err;",
"}",
"usb_packet_copy(VAR_1, VAR_0->bulk_out_data + VAR_0->bulk_out_pos, VAR_1->iov.size);",
"VAR_0->bulk_out_pos += VAR_1->iov.s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
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
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33,
35,
37
],
[
39
],
[
41
],
[
45,
47,
49
],
[
51... |
6,988 | static av_cold int vcr1_decode_init(AVCodecContext *avctx)
{
avctx->pix_fmt = AV_PIX_FMT_YUV410P;
return 0; | true | FFmpeg | 8aba7968dd604aae91ee42cbce0be3dad7dceb30 | static av_cold int vcr1_decode_init(AVCodecContext *avctx)
{
avctx->pix_fmt = AV_PIX_FMT_YUV410P;
return 0; | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
avctx->pix_fmt = AV_PIX_FMT_YUV410P;
return 0; | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"avctx->pix_fmt = AV_PIX_FMT_YUV410P;",
"return 0;"
] | [
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
]
] |
6,989 | static void *sparc32_dma_init(target_phys_addr_t daddr, qemu_irq parent_irq,
void *iommu, qemu_irq *dev_irq)
{
DeviceState *dev;
SysBusDevice *s;
dev = qdev_create(NULL, "sparc32_dma");
qdev_prop_set_ptr(dev, "iommu_opaque", iommu);
qdev_init(dev);
s = sys... | true | qemu | e23a1b33b53d25510320b26d9f154e19c6c99725 | static void *sparc32_dma_init(target_phys_addr_t daddr, qemu_irq parent_irq,
void *iommu, qemu_irq *dev_irq)
{
DeviceState *dev;
SysBusDevice *s;
dev = qdev_create(NULL, "sparc32_dma");
qdev_prop_set_ptr(dev, "iommu_opaque", iommu);
qdev_init(dev);
s = sys... | {
"code": [
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" ... | static void *FUNC_0(target_phys_addr_t VAR_0, qemu_irq VAR_1,
void *VAR_2, qemu_irq *VAR_3)
{
DeviceState *dev;
SysBusDevice *s;
dev = qdev_create(NULL, "sparc32_dma");
qdev_prop_set_ptr(dev, "iommu_opaque", VAR_2);
qdev_init(dev);
s = sysbus_from_qdev(dev... | [
"static void *FUNC_0(target_phys_addr_t VAR_0, qemu_irq VAR_1,\nvoid *VAR_2, qemu_irq *VAR_3)\n{",
"DeviceState *dev;",
"SysBusDevice *s;",
"dev = qdev_create(NULL, \"sparc32_dma\");",
"qdev_prop_set_ptr(dev, \"iommu_opaque\", VAR_2);",
"qdev_init(dev);",
"s = sysbus_from_qdev(dev);",
"sysbus_connect_... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
]
] |
6,990 | int monitor_read_block_device_key(Monitor *mon, const char *device,
BlockCompletionFunc *completion_cb,
void *opaque)
{
Error *err = NULL;
BlockBackend *blk;
blk = blk_by_name(device);
if (!blk) {
monitor_printf(mon, "... | true | qemu | 788cf9f8c8cbda53843e060540f3e91a060eb744 | int monitor_read_block_device_key(Monitor *mon, const char *device,
BlockCompletionFunc *completion_cb,
void *opaque)
{
Error *err = NULL;
BlockBackend *blk;
blk = blk_by_name(device);
if (!blk) {
monitor_printf(mon, "... | {
"code": [
"int monitor_read_block_device_key(Monitor *mon, const char *device,",
" BlockCompletionFunc *completion_cb,",
"int monitor_read_block_device_key(Monitor *mon, const char *device,",
" BlockCompletionFunc *completion_cb,",
... | int FUNC_0(Monitor *VAR_0, const char *VAR_1,
BlockCompletionFunc *VAR_2,
void *VAR_3)
{
Error *err = NULL;
BlockBackend *blk;
blk = blk_by_name(VAR_1);
if (!blk) {
monitor_printf(VAR_0, "Device not found %s\n", VAR_1)... | [
"int FUNC_0(Monitor *VAR_0, const char *VAR_1,\nBlockCompletionFunc *VAR_2,\nvoid *VAR_3)\n{",
"Error *err = NULL;",
"BlockBackend *blk;",
"blk = blk_by_name(VAR_1);",
"if (!blk) {",
"monitor_printf(VAR_0, \"Device not found %s\\n\", VAR_1);",
"return -1;",
"}",
"if (!blk_bs(blk)) {",
"monitor_pri... | [
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
0,
0,
1,
1,
1,
1,
0,
1,
1,
0,
1,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
... |
6,991 | static void migrate_set_state(MigrationState *s, int old_state, int new_state)
{
if (atomic_cmpxchg(&s->state, old_state, new_state) == new_state) {
trace_migrate_set_state(new_state);
}
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static void migrate_set_state(MigrationState *s, int old_state, int new_state)
{
if (atomic_cmpxchg(&s->state, old_state, new_state) == new_state) {
trace_migrate_set_state(new_state);
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(MigrationState *VAR_0, int VAR_1, int VAR_2)
{
if (atomic_cmpxchg(&VAR_0->state, VAR_1, VAR_2) == VAR_2) {
trace_migrate_set_state(VAR_2);
}
}
| [
"static void FUNC_0(MigrationState *VAR_0, int VAR_1, int VAR_2)\n{",
"if (atomic_cmpxchg(&VAR_0->state, VAR_1, VAR_2) == VAR_2) {",
"trace_migrate_set_state(VAR_2);",
"}",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
6,992 | static void disas_arm_insn(CPUState * env, DisasContext *s)
{
unsigned int cond, insn, val, op1, i, shift, rm, rs, rn, rd, sh;
insn = ldl_code(s->pc);
s->pc += 4;
cond = insn >> 28;
if (cond == 0xf){
/* Unconditional instructions. */
if ((insn & 0x0d70f000) == 0x... | true | qemu | 6658ffb81ee56a510d7d77025872a508a9adce3a | static void disas_arm_insn(CPUState * env, DisasContext *s)
{
unsigned int cond, insn, val, op1, i, shift, rm, rs, rn, rd, sh;
insn = ldl_code(s->pc);
s->pc += 4;
cond = insn >> 28;
if (cond == 0xf){
if ((insn & 0x0d70f000) == 0x0550f000)
return;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(CPUState * VAR_0, DisasContext *VAR_1)
{
unsigned int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12;
VAR_3 = ldl_code(VAR_1->pc);
VAR_1->pc += 4;
VAR_2 = VAR_3 >> 28;
if (VAR_2 == 0xf){
if ((VAR_3 & 0x0d70f000) ... | [
"static void FUNC_0(CPUState * VAR_0, DisasContext *VAR_1)\n{",
"unsigned int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12;",
"VAR_3 = ldl_code(VAR_1->pc);",
"VAR_1->pc += 4;",
"VAR_2 = VAR_3 >> 28;",
"if (VAR_2 == 0xf){",
"if ((VAR_3 & 0x0d70f000) == 0x0550f000)\nretur... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
15
],
[
17
],
[
21,
23
],
[
25
],
[
29
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
],
... |
6,993 | static void print_block_info(Monitor *mon, BlockInfo *info,
BlockDeviceInfo *inserted, bool verbose)
{
ImageInfo *image_info;
assert(!info || !info->has_inserted || info->inserted == inserted);
if (info) {
monitor_printf(mon, "%s", info->device);
if (i... | true | qemu | 9419874f709469de16c1bced7731bfecb07fe1cf | static void print_block_info(Monitor *mon, BlockInfo *info,
BlockDeviceInfo *inserted, bool verbose)
{
ImageInfo *image_info;
assert(!info || !info->has_inserted || info->inserted == inserted);
if (info) {
monitor_printf(mon, "%s", info->device);
if (i... | {
"code": [
" if (verbose && inserted->image) {"
],
"line_no": [
193
]
} | static void FUNC_0(Monitor *VAR_0, BlockInfo *VAR_1,
BlockDeviceInfo *VAR_2, bool VAR_3)
{
ImageInfo *image_info;
assert(!VAR_1 || !VAR_1->has_inserted || VAR_1->VAR_2 == VAR_2);
if (VAR_1) {
monitor_printf(VAR_0, "%s", VAR_1->device);
if (VAR_2 && VAR... | [
"static void FUNC_0(Monitor *VAR_0, BlockInfo *VAR_1,\nBlockDeviceInfo *VAR_2, bool VAR_3)\n{",
"ImageInfo *image_info;",
"assert(!VAR_1 || !VAR_1->has_inserted || VAR_1->VAR_2 == VAR_2);",
"if (VAR_1) {",
"monitor_printf(VAR_0, \"%s\", VAR_1->device);",
"if (VAR_2 && VAR_2->has_node_name) {",
"monitor_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31,
33,
35
],
[
37
],
[
41
],
[
43,
45,
47,
49,
51
],
[
53
],
[
55... |
6,994 | int qemu_bh_poll(void)
{
QEMUBH *bh, **pbh;
int ret;
ret = 0;
for(;;) {
pbh = &first_bh;
bh = *pbh;
if (!bh)
break;
ret = 1;
*pbh = bh->next;
bh->scheduled = 0;
bh->cb(bh->opaque);
}
return ret;
}
| true | qemu | 1b435b10324fe9937f254bb00718f78d5e50837a | int qemu_bh_poll(void)
{
QEMUBH *bh, **pbh;
int ret;
ret = 0;
for(;;) {
pbh = &first_bh;
bh = *pbh;
if (!bh)
break;
ret = 1;
*pbh = bh->next;
bh->scheduled = 0;
bh->cb(bh->opaque);
}
return ret;
}
| {
"code": [
" QEMUBH *bh, **pbh;",
" for(;;) {",
" pbh = &first_bh;",
" bh = *pbh;",
" if (!bh)",
" break;",
" ret = 1;",
" *pbh = bh->next;",
" bh->scheduled = 0;",
" bh->cb(bh->opaque);",
" pbh = &fi... | int FUNC_0(void)
{
QEMUBH *bh, **pbh;
int VAR_0;
VAR_0 = 0;
for(;;) {
pbh = &first_bh;
bh = *pbh;
if (!bh)
break;
VAR_0 = 1;
*pbh = bh->next;
bh->scheduled = 0;
bh->cb(bh->opaque);
}
return VAR_0;
}
| [
"int FUNC_0(void)\n{",
"QEMUBH *bh, **pbh;",
"int VAR_0;",
"VAR_0 = 0;",
"for(;;) {",
"pbh = &first_bh;",
"bh = *pbh;",
"if (!bh)\nbreak;",
"VAR_0 = 1;",
"*pbh = bh->next;",
"bh->scheduled = 0;",
"bh->cb(bh->opaque);",
"}",
"return VAR_0;",
"}"
] | [
0,
1,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
6,995 | static int qemu_rdma_write(QEMUFile *f, RDMAContext *rdma,
uint64_t block_offset, uint64_t offset,
uint64_t len)
{
uint64_t current_addr = block_offset + offset;
uint64_t index = rdma->current_index;
uint64_t chunk = rdma->current_chunk;
int r... | true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static int qemu_rdma_write(QEMUFile *f, RDMAContext *rdma,
uint64_t block_offset, uint64_t offset,
uint64_t len)
{
uint64_t current_addr = block_offset + offset;
uint64_t index = rdma->current_index;
uint64_t chunk = rdma->current_chunk;
int r... | {
"code": [],
"line_no": []
} | static int FUNC_0(QEMUFile *VAR_0, RDMAContext *VAR_1,
uint64_t VAR_2, uint64_t VAR_3,
uint64_t VAR_4)
{
uint64_t current_addr = VAR_2 + VAR_3;
uint64_t index = VAR_1->current_index;
uint64_t chunk = VAR_1->current_chunk;
int VAR_5;
... | [
"static int FUNC_0(QEMUFile *VAR_0, RDMAContext *VAR_1,\nuint64_t VAR_2, uint64_t VAR_3,\nuint64_t VAR_4)\n{",
"uint64_t current_addr = VAR_2 + VAR_3;",
"uint64_t index = VAR_1->current_index;",
"uint64_t chunk = VAR_1->current_chunk;",
"int VAR_5;",
"if (!qemu_rdma_buffer_mergable(VAR_1, current_addr, 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
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
6,996 | static int svq1_decode_block_non_intra(GetBitContext *bitbuf, uint8_t *pixels,
int pitch)
{
uint32_t bit_cache;
uint8_t *list[63];
uint32_t *dst;
const uint32_t *codebook;
int entries[6];
int i, j, m, n;
int mean, stages;
int x, y, width, ... | false | FFmpeg | 9b8c8a9395c849639aea0f6b5300e991e93c3a73 | static int svq1_decode_block_non_intra(GetBitContext *bitbuf, uint8_t *pixels,
int pitch)
{
uint32_t bit_cache;
uint8_t *list[63];
uint32_t *dst;
const uint32_t *codebook;
int entries[6];
int i, j, m, n;
int mean, stages;
int x, y, width, ... | {
"code": [],
"line_no": []
} | static int FUNC_0(GetBitContext *VAR_0, uint8_t *VAR_1,
int VAR_2)
{
uint32_t bit_cache;
uint8_t *list[63];
uint32_t *dst;
const uint32_t *VAR_3;
int VAR_4[6];
int VAR_5, VAR_6, VAR_7, VAR_8;
int VAR_9, VAR_10;
int VAR_11, VAR_12, VAR_13, ... | [
"static int FUNC_0(GetBitContext *VAR_0, uint8_t *VAR_1,\nint VAR_2)\n{",
"uint32_t bit_cache;",
"uint8_t *list[63];",
"uint32_t *dst;",
"const uint32_t *VAR_3;",
"int VAR_4[6];",
"int VAR_5, VAR_6, VAR_7, VAR_8;",
"int VAR_9, VAR_10;",
"int VAR_11, VAR_12, VAR_13, VAR_14, VAR_15;",
"uint32_t n1, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
53
],
[
57,
59
],
[
63
... |
6,998 | static int ac3_decode_frame(AVCodecContext * avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AC3DecodeContext *s = avctx->priv_data;
int blk, ch, err, ret;
const uint8_t *channel_map;
cons... | false | FFmpeg | b888cea9cb2a01276ce026a5abe90ad57e042444 | static int ac3_decode_frame(AVCodecContext * avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AC3DecodeContext *s = avctx->priv_data;
int blk, ch, err, ret;
const uint8_t *channel_map;
cons... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext * VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
AC3DecodeContext *s = VAR_0->priv_data;
int VAR_6, VAR_7, VAR_8, VAR_9;
const uint8_t *VAR_10;
const float *VAR_... | [
"static int FUNC_0(AVCodecContext * VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"AC3DecodeContext *s = VAR_0->priv_data;",
"int VAR_6, VAR_7, VAR_8, VAR_9;",
"const uint8_t *VAR_10;",
"const float *VAR_11[AC3_MAX_CHANNELS];",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
47
],
[
51
],
[
53
],
[
55,
57
],
[
59
... |
7,000 | static void decode_postinit(H264Context *h, int setup_finished)
{
H264Picture *out = h->cur_pic_ptr;
H264Picture *cur = h->cur_pic_ptr;
int i, pics, out_of_order, out_idx;
int invalid = 0, cnt = 0;
h->cur_pic_ptr->f->pict_type = h->pict_type;
if (h->next_output_pic)
return;
... | true | FFmpeg | 5ec0bdf2c524224f30ba4786f47324970aed4aaa | static void decode_postinit(H264Context *h, int setup_finished)
{
H264Picture *out = h->cur_pic_ptr;
H264Picture *cur = h->cur_pic_ptr;
int i, pics, out_of_order, out_idx;
int invalid = 0, cnt = 0;
h->cur_pic_ptr->f->pict_type = h->pict_type;
if (h->next_output_pic)
return;
... | {
"code": [
" if (setup_finished && !h->avctx->hwaccel)"
],
"line_no": [
539
]
} | static void FUNC_0(H264Context *VAR_0, int VAR_1)
{
H264Picture *out = VAR_0->cur_pic_ptr;
H264Picture *cur = VAR_0->cur_pic_ptr;
int VAR_2, VAR_3, VAR_4, VAR_5;
int VAR_6 = 0, VAR_7 = 0;
VAR_0->cur_pic_ptr->f->pict_type = VAR_0->pict_type;
if (VAR_0->next_output_pic)
return;... | [
"static void FUNC_0(H264Context *VAR_0, int VAR_1)\n{",
"H264Picture *out = VAR_0->cur_pic_ptr;",
"H264Picture *cur = VAR_0->cur_pic_ptr;",
"int VAR_2, VAR_3, VAR_4, VAR_5;",
"int VAR_6 = 0, VAR_7 = 0;",
"VAR_0->cur_pic_ptr->f->pict_type = VAR_0->pict_type;",
"if (VAR_0->next_output_pic)\nreturn;",
"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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19,
21
],
[
25
],
[
39
],
[
41
],
[
45
],
[
47
],
[
59
],
[
61
],
[
63,
65
],
[
67,
69,
71
],
[
73
],
[
75,... |
7,001 | static int str_read_packet(AVFormatContext *s,
AVPacket *ret_pkt)
{
AVIOContext *pb = s->pb;
StrDemuxContext *str = s->priv_data;
unsigned char sector[RAW_CD_SECTOR_SIZE];
int channel;
AVPacket *pkt;
AVStream *st;
while (1) {
if (avio_read(pb,... | true | FFmpeg | 4ecac816780dbb3d3297885856bde6e53a5f7708 | static int str_read_packet(AVFormatContext *s,
AVPacket *ret_pkt)
{
AVIOContext *pb = s->pb;
StrDemuxContext *str = s->priv_data;
unsigned char sector[RAW_CD_SECTOR_SIZE];
int channel;
AVPacket *pkt;
AVStream *st;
while (1) {
if (avio_read(pb,... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0,
AVPacket *VAR_1)
{
AVIOContext *pb = VAR_0->pb;
StrDemuxContext *str = VAR_0->priv_data;
unsigned char VAR_2[RAW_CD_SECTOR_SIZE];
int VAR_3;
AVPacket *pkt;
AVStream *st;
while (1) {
if (avio_read(pb, V... | [
"static int FUNC_0(AVFormatContext *VAR_0,\nAVPacket *VAR_1)\n{",
"AVIOContext *pb = VAR_0->pb;",
"StrDemuxContext *str = VAR_0->priv_data;",
"unsigned char VAR_2[RAW_CD_SECTOR_SIZE];",
"int VAR_3;",
"AVPacket *pkt;",
"AVStream *st;",
"while (1) {",
"if (avio_read(pb, VAR_2, RAW_CD_SECTOR_SIZE) != R... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
33,
35
],
[
39
],
[
43,
45,
47
],
[
51
],
[
53
],
[
55
],
[
59,
61,... |
7,002 | char *object_property_print(Object *obj, const char *name, bool human,
Error **errp)
{
StringOutputVisitor *mo;
char *string;
mo = string_output_visitor_new(human);
object_property_get(obj, string_output_get_visitor(mo), name, errp);
string = string_output_get_st... | true | qemu | 3a53009fa044a554dbdeacf30a6b8ea3eb02fe63 | char *object_property_print(Object *obj, const char *name, bool human,
Error **errp)
{
StringOutputVisitor *mo;
char *string;
mo = string_output_visitor_new(human);
object_property_get(obj, string_output_get_visitor(mo), name, errp);
string = string_output_get_st... | {
"code": [
" char *string;",
" object_property_get(obj, string_output_get_visitor(mo), name, errp);"
],
"line_no": [
9,
15
]
} | char *FUNC_0(Object *VAR_0, const char *VAR_1, bool VAR_2,
Error **VAR_3)
{
StringOutputVisitor *mo;
char *VAR_4;
mo = string_output_visitor_new(VAR_2);
object_property_get(VAR_0, string_output_get_visitor(mo), VAR_1, VAR_3);
VAR_4 = string_output_get_string(mo);... | [
"char *FUNC_0(Object *VAR_0, const char *VAR_1, bool VAR_2,\nError **VAR_3)\n{",
"StringOutputVisitor *mo;",
"char *VAR_4;",
"mo = string_output_visitor_new(VAR_2);",
"object_property_get(VAR_0, string_output_get_visitor(mo), VAR_1, VAR_3);",
"VAR_4 = string_output_get_string(mo);",
"string_output_visit... | [
0,
0,
1,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
7,003 | static void virtio_gpu_resource_create_2d(VirtIOGPU *g,
struct virtio_gpu_ctrl_command *cmd)
{
pixman_format_code_t pformat;
struct virtio_gpu_simple_resource *res;
struct virtio_gpu_resource_create_2d c2d;
VIRTIO_GPU_FILL_CMD(c2d);
trace_virtio_gpu... | true | qemu | 9b7621bca2f70dc1a9815d50f05261296a8ae932 | static void virtio_gpu_resource_create_2d(VirtIOGPU *g,
struct virtio_gpu_ctrl_command *cmd)
{
pixman_format_code_t pformat;
struct virtio_gpu_simple_resource *res;
struct virtio_gpu_resource_create_2d c2d;
VIRTIO_GPU_FILL_CMD(c2d);
trace_virtio_gpu... | {
"code": [
" res->image = pixman_image_create_bits(pformat,",
" c2d.width,",
" c2d.height,",
" NULL, 0);"
],
"line_no": [
85,
87,
89,
91
]
} | static void FUNC_0(VirtIOGPU *VAR_0,
struct virtio_gpu_ctrl_command *VAR_1)
{
pixman_format_code_t pformat;
struct virtio_gpu_simple_resource *VAR_2;
struct FUNC_0 VAR_3;
VIRTIO_GPU_FILL_CMD(VAR_3);
trace_virtio_gpu_cmd_res_create_2d(VAR_3.resource_... | [
"static void FUNC_0(VirtIOGPU *VAR_0,\nstruct virtio_gpu_ctrl_command *VAR_1)\n{",
"pixman_format_code_t pformat;",
"struct virtio_gpu_simple_resource *VAR_2;",
"struct FUNC_0 VAR_3;",
"VIRTIO_GPU_FILL_CMD(VAR_3);",
"trace_virtio_gpu_cmd_res_create_2d(VAR_3.resource_id, VAR_3.format,\nVAR_3.width, VAR_3.h... | [
0,
0,
0,
0,
0,
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[
53
... |
7,005 | int qcow2_alloc_clusters_at(BlockDriverState *bs, uint64_t offset,
int nb_clusters)
{
BDRVQcowState *s = bs->opaque;
uint64_t cluster_index;
uint64_t old_free_cluster_index;
uint64_t i;
int refcount, ret;
assert(nb_clusters >= 0);
if (nb_clusters == 0) {
return 0;
... | true | qemu | b106ad9185f35fc4ad669555ad0e79e276083bd7 | int qcow2_alloc_clusters_at(BlockDriverState *bs, uint64_t offset,
int nb_clusters)
{
BDRVQcowState *s = bs->opaque;
uint64_t cluster_index;
uint64_t old_free_cluster_index;
uint64_t i;
int refcount, ret;
assert(nb_clusters >= 0);
if (nb_clusters == 0) {
return 0;
... | {
"code": [
" return 0;",
" s->free_cluster_index = old_free_cluster_index;",
" uint64_t old_free_cluster_index;",
" cluster_index = offset >> s->cluster_bits;",
" for(i = 0; i < nb_clusters; i++) {",
" refcount = get_refcount(bs, cluster_index++);",
" if (... | int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1,
int VAR_2)
{
BDRVQcowState *s = VAR_0->opaque;
uint64_t cluster_index;
uint64_t old_free_cluster_index;
uint64_t i;
int VAR_3, VAR_4;
assert(VAR_2 >= 0);
if (VAR_2 == 0) {
return 0;
}
cluster_index ... | [
"int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1,\nint VAR_2)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"uint64_t cluster_index;",
"uint64_t old_free_cluster_index;",
"uint64_t i;",
"int VAR_3, VAR_4;",
"assert(VAR_2 >= 0);",
"if (VAR_2 == 0) {",
"return 0;",
"}",
"cluster_index = VAR_1 >> s-... | [
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
1,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
7,006 | static int decode_chunks(AVCodecContext *avctx,
AVFrame *picture, int *got_output,
const uint8_t *buf, int buf_size)
{
Mpeg1Context *s = avctx->priv_data;
MpegEncContext *s2 = &s->mpeg_enc_ctx;
const uint8_t *buf_ptr = buf;
const uint8_t *buf_end = buf +... | true | FFmpeg | 97064019279d227669ea3db583a8a8aa47e970ba | static int decode_chunks(AVCodecContext *avctx,
AVFrame *picture, int *got_output,
const uint8_t *buf, int buf_size)
{
Mpeg1Context *s = avctx->priv_data;
MpegEncContext *s2 = &s->mpeg_enc_ctx;
const uint8_t *buf_ptr = buf;
const uint8_t *buf_end = buf +... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
AVFrame *VAR_1, int *VAR_2,
const uint8_t *VAR_3, int VAR_4)
{
Mpeg1Context *s = VAR_0->priv_data;
MpegEncContext *s2 = &s->mpeg_enc_ctx;
const uint8_t *VAR_5 = VAR_3;
const uint8_t *VAR_6 = VAR_3 + VAR_4;
int... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nAVFrame *VAR_1, int *VAR_2,\nconst uint8_t *VAR_3, int VAR_4)\n{",
"Mpeg1Context *s = VAR_0->priv_data;",
"MpegEncContext *s2 = &s->mpeg_enc_ctx;",
"const uint8_t *VAR_5 = VAR_3;",
"const uint8_t *VAR_6 = VAR_3 + VAR_4;",
"int VAR_7, VAR_8;",
"int VAR_9 = 0, 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,
0,
0,
0,
0... | [
[
1,
2,
3,
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18,
19
],
[
20
],
[
21
],
[
22
],
[
23
],
[
... |
7,007 | static int get_video_frame(VideoState *is, AVFrame *frame)
{
int got_picture;
if ((got_picture = decoder_decode_frame(&is->viddec, frame)) < 0)
return -1;
if (got_picture) {
double dpts = NAN;
if (frame->pts != AV_NOPTS_VALUE)
dpts = av_q2d(is->video_st->tim... | true | FFmpeg | 2ec4a84dca603a24a8131297036dfe30eed33dd7 | static int get_video_frame(VideoState *is, AVFrame *frame)
{
int got_picture;
if ((got_picture = decoder_decode_frame(&is->viddec, frame)) < 0)
return -1;
if (got_picture) {
double dpts = NAN;
if (frame->pts != AV_NOPTS_VALUE)
dpts = av_q2d(is->video_st->tim... | {
"code": [
" if ((got_picture = decoder_decode_frame(&is->viddec, frame)) < 0)"
],
"line_no": [
9
]
} | static int FUNC_0(VideoState *VAR_0, AVFrame *VAR_1)
{
int VAR_2;
if ((VAR_2 = decoder_decode_frame(&VAR_0->viddec, VAR_1)) < 0)
return -1;
if (VAR_2) {
double VAR_3 = NAN;
if (VAR_1->pts != AV_NOPTS_VALUE)
VAR_3 = av_q2d(VAR_0->video_st->time_base) * VAR_1-... | [
"static int FUNC_0(VideoState *VAR_0, AVFrame *VAR_1)\n{",
"int VAR_2;",
"if ((VAR_2 = decoder_decode_frame(&VAR_0->viddec, VAR_1)) < 0)\nreturn -1;",
"if (VAR_2) {",
"double VAR_3 = NAN;",
"if (VAR_1->pts != AV_NOPTS_VALUE)\nVAR_3 = av_q2d(VAR_0->video_st->time_base) * VAR_1->pts;",
"VAR_1->sample_aspe... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
15
],
[
17
],
[
21,
23
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37,
39,
41,
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
... |
7,008 | START_TEST(escaped_string)
{
int i;
struct {
const char *encoded;
const char *decoded;
int skip;
} test_cases[] = {
{ "\"\\\"\"", "\"" },
{ "\"hello world \\\"embedded string\\\"\"",
"hello world \"embedded string\"" },
{ "\"hello world\\n... | true | qemu | d22b0bd7fc85f991275ffc60a550ed42f4c1b04c | START_TEST(escaped_string)
{
int i;
struct {
const char *encoded;
const char *decoded;
int skip;
} test_cases[] = {
{ "\"\\\"\"", "\"" },
{ "\"hello world \\\"embedded string\\\"\"",
"hello world \"embedded string\"" },
{ "\"hello world\\n... | {
"code": [
" fail_unless(strcmp(qstring_get_str(str), test_cases[i].decoded) == 0);",
" fail_unless(strcmp(qstring_get_str(str), test_cases[i].encoded) == 0);"
],
"line_no": [
57,
65
]
} | FUNC_0(VAR_0)
{
int VAR_1;
struct {
const char *encoded;
const char *decoded;
int skip;
} VAR_2[] = {
{ "\"\\\"\"", "\"" },
{ "\"hello world \\\"embedded string\\\"\"",
"hello world \"embedded string\"" },
{ "\"hello world\\nwith new line\... | [
"FUNC_0(VAR_0)\n{",
"int VAR_1;",
"struct {",
"const char *encoded;",
"const char *decoded;",
"int skip;",
"} VAR_2[] = {",
"{ \"\\\"\\\\\\\"\\\"\", \"\\\"\" },",
"{ \"\\\"hello world \\\\\\\"embedded string\\\\\\\"\\\"\",",
"\"hello world \\\"embedded string\\\"\" },",
"{ \"\\\"hello world\\\\n... | [
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,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
... |
7,009 | static void pc_dimm_unplug_request(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
HotplugHandlerClass *hhc;
Error *local_err = NULL;
PCMachineState *pcms = PC_MACHINE(hotplug_dev);
if (!pcms->acpi_dev) {
error_setg(&local_err,
... | true | qemu | 8cd91acec8dfea6065272ca828405333f564a612 | static void pc_dimm_unplug_request(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
HotplugHandlerClass *hhc;
Error *local_err = NULL;
PCMachineState *pcms = PC_MACHINE(hotplug_dev);
if (!pcms->acpi_dev) {
error_setg(&local_err,
... | {
"code": [
" if (!pcms->acpi_dev) {",
" \"memory hotplug is not enabled: missing acpi device\");",
" if (!pcms->acpi_dev) {",
" \"memory hotplug is not enabled: missing acpi device\");"
],
"line_no": [
15,
19,
15,
19
]
} | static void FUNC_0(HotplugHandler *VAR_0,
DeviceState *VAR_1, Error **VAR_2)
{
HotplugHandlerClass *hhc;
Error *local_err = NULL;
PCMachineState *pcms = PC_MACHINE(VAR_0);
if (!pcms->acpi_dev) {
error_setg(&local_err,
"memory hotplu... | [
"static void FUNC_0(HotplugHandler *VAR_0,\nDeviceState *VAR_1, Error **VAR_2)\n{",
"HotplugHandlerClass *hhc;",
"Error *local_err = NULL;",
"PCMachineState *pcms = PC_MACHINE(VAR_0);",
"if (!pcms->acpi_dev) {",
"error_setg(&local_err,\n\"memory hotplug is not enabled: missing acpi device\");",
"goto ou... | [
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45,
47
],
[
49
]
] |
7,010 | SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, BlockDriverState *bdrv, int unit)
{
const char *driver;
DeviceState *dev;
driver = bdrv_is_sg(bdrv) ? "scsi-generic" : "scsi-disk";
dev = qdev_create(&bus->qbus, driver);
qdev_prop_set_uint32(dev, "scsi-id", unit);
if (qdev_prop_set_dr... | false | qemu | 2d1fd2613769d99e5fad1f57ab8466434e2079fd | SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, BlockDriverState *bdrv, int unit)
{
const char *driver;
DeviceState *dev;
driver = bdrv_is_sg(bdrv) ? "scsi-generic" : "scsi-disk";
dev = qdev_create(&bus->qbus, driver);
qdev_prop_set_uint32(dev, "scsi-id", unit);
if (qdev_prop_set_dr... | {
"code": [],
"line_no": []
} | SCSIDevice *FUNC_0(SCSIBus *bus, BlockDriverState *bdrv, int unit)
{
const char *VAR_0;
DeviceState *dev;
VAR_0 = bdrv_is_sg(bdrv) ? "scsi-generic" : "scsi-disk";
dev = qdev_create(&bus->qbus, VAR_0);
qdev_prop_set_uint32(dev, "scsi-id", unit);
if (qdev_prop_set_drive(dev, "drive", bdrv... | [
"SCSIDevice *FUNC_0(SCSIBus *bus, BlockDriverState *bdrv, int unit)\n{",
"const char *VAR_0;",
"DeviceState *dev;",
"VAR_0 = bdrv_is_sg(bdrv) ? \"scsi-generic\" : \"scsi-disk\";",
"dev = qdev_create(&bus->qbus, VAR_0);",
"qdev_prop_set_uint32(dev, \"scsi-id\", unit);",
"if (qdev_prop_set_drive(dev, \"dr... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
]
] |
7,011 | NBDExport *nbd_export_new(BlockBackend *blk, off_t dev_offset, off_t size,
uint32_t nbdflags, void (*close)(NBDExport *),
Error **errp)
{
NBDExport *exp = g_malloc0(sizeof(NBDExport));
exp->refcount = 1;
QTAILQ_INIT(&exp->clients);
exp->blk = bl... | false | qemu | 7423f417827146f956df820f172d0bf80a489495 | NBDExport *nbd_export_new(BlockBackend *blk, off_t dev_offset, off_t size,
uint32_t nbdflags, void (*close)(NBDExport *),
Error **errp)
{
NBDExport *exp = g_malloc0(sizeof(NBDExport));
exp->refcount = 1;
QTAILQ_INIT(&exp->clients);
exp->blk = bl... | {
"code": [],
"line_no": []
} | NBDExport *FUNC_0(BlockBackend *blk, off_t dev_offset, off_t size,
uint32_t nbdflags, void (*close)(NBDExport *),
Error **errp)
{
NBDExport *exp = g_malloc0(sizeof(NBDExport));
exp->refcount = 1;
QTAILQ_INIT(&exp->clients);
exp->blk = blk;
... | [
"NBDExport *FUNC_0(BlockBackend *blk, off_t dev_offset, off_t size,\nuint32_t nbdflags, void (*close)(NBDExport *),\nError **errp)\n{",
"NBDExport *exp = g_malloc0(sizeof(NBDExport));",
"exp->refcount = 1;",
"QTAILQ_INIT(&exp->clients);",
"exp->blk = blk;",
"exp->dev_offset = dev_offset;",
"exp->nbdflag... | [
0,
0,
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
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[... |
7,012 | static int bdrv_qed_open(BlockDriverState *bs, int flags)
{
BDRVQEDState *s = bs->opaque;
QEDHeader le_header;
int64_t file_size;
int ret;
s->bs = bs;
QSIMPLEQ_INIT(&s->allocating_write_reqs);
ret = bdrv_pread(bs->file, 0, &le_header, sizeof(le_header));
if (ret < 0) {
... | false | qemu | 058f8f16db0c1c528b665a6283457f019c8b0926 | static int bdrv_qed_open(BlockDriverState *bs, int flags)
{
BDRVQEDState *s = bs->opaque;
QEDHeader le_header;
int64_t file_size;
int ret;
s->bs = bs;
QSIMPLEQ_INIT(&s->allocating_write_reqs);
ret = bdrv_pread(bs->file, 0, &le_header, sizeof(le_header));
if (ret < 0) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, int VAR_1)
{
BDRVQEDState *s = VAR_0->opaque;
QEDHeader le_header;
int64_t file_size;
int VAR_2;
s->VAR_0 = VAR_0;
QSIMPLEQ_INIT(&s->allocating_write_reqs);
VAR_2 = bdrv_pread(VAR_0->file, 0, &le_header, sizeof(le_header));
if (VAR_... | [
"static int FUNC_0(BlockDriverState *VAR_0, int VAR_1)\n{",
"BDRVQEDState *s = VAR_0->opaque;",
"QEDHeader le_header;",
"int64_t file_size;",
"int VAR_2;",
"s->VAR_0 = VAR_0;",
"QSIMPLEQ_INIT(&s->allocating_write_reqs);",
"VAR_2 = bdrv_pread(VAR_0->file, 0, &le_header, sizeof(le_header));",
"if (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
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45,
47
],
[
49,
51
... |
7,013 | static void test_io_channel_unix(bool async)
{
SocketAddress *listen_addr = g_new0(SocketAddress, 1);
SocketAddress *connect_addr = g_new0(SocketAddress, 1);
#define TEST_SOCKET "test-io-channel-socket.sock"
listen_addr->type = SOCKET_ADDRESS_KIND_UNIX;
listen_addr->u.q_unix = g_new0(UnixSocketA... | false | qemu | 32bafa8fdd098d52fbf1102d5a5e48d29398c0aa | static void test_io_channel_unix(bool async)
{
SocketAddress *listen_addr = g_new0(SocketAddress, 1);
SocketAddress *connect_addr = g_new0(SocketAddress, 1);
#define TEST_SOCKET "test-io-channel-socket.sock"
listen_addr->type = SOCKET_ADDRESS_KIND_UNIX;
listen_addr->u.q_unix = g_new0(UnixSocketA... | {
"code": [],
"line_no": []
} | static void FUNC_0(bool VAR_0)
{
SocketAddress *listen_addr = g_new0(SocketAddress, 1);
SocketAddress *connect_addr = g_new0(SocketAddress, 1);
#define TEST_SOCKET "test-io-channel-socket.sock"
listen_addr->type = SOCKET_ADDRESS_KIND_UNIX;
listen_addr->u.q_unix = g_new0(UnixSocketAddress, 1);
... | [
"static void FUNC_0(bool VAR_0)\n{",
"SocketAddress *listen_addr = g_new0(SocketAddress, 1);",
"SocketAddress *connect_addr = g_new0(SocketAddress, 1);",
"#define TEST_SOCKET \"test-io-channel-socket.sock\"\nlisten_addr->type = SOCKET_ADDRESS_KIND_UNIX;",
"listen_addr->u.q_unix = g_new0(UnixSocketAddress, 1... | [
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
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
7,014 | static void test_visitor_in_native_list_bool(TestInputVisitorData *data,
const void *unused)
{
UserDefNativeListUnion *cvalue = NULL;
boolList *elem = NULL;
Visitor *v;
GString *gstr_list = g_string_new("");
GString *gstr_union = g_string_new("");
... | false | qemu | b3db211f3c80bb996a704d665fe275619f728bd4 | static void test_visitor_in_native_list_bool(TestInputVisitorData *data,
const void *unused)
{
UserDefNativeListUnion *cvalue = NULL;
boolList *elem = NULL;
Visitor *v;
GString *gstr_list = g_string_new("");
GString *gstr_union = g_string_new("");
... | {
"code": [],
"line_no": []
} | static void FUNC_0(TestInputVisitorData *VAR_0,
const void *VAR_1)
{
UserDefNativeListUnion *cvalue = NULL;
boolList *elem = NULL;
Visitor *v;
GString *gstr_list = g_string_new("");
GString *gstr_union = g_string_new("");
int VAR_2;
for ... | [
"static void FUNC_0(TestInputVisitorData *VAR_0,\nconst void *VAR_1)\n{",
"UserDefNativeListUnion *cvalue = NULL;",
"boolList *elem = NULL;",
"Visitor *v;",
"GString *gstr_list = g_string_new(\"\");",
"GString *gstr_union = g_string_new(\"\");",
"int VAR_2;",
"for (VAR_2 = 0; VAR_2 < 32; VAR_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,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
... |
7,015 | static void init_quantized_coeffs_elem0 (int8_t *quantized_coeffs, GetBitContext *gb, int length)
{
int i, k, run, level, diff;
if (BITS_LEFT(length,gb) < 16)
return;
level = qdm2_get_vlc(gb, &vlc_tab_level, 0, 2);
quantized_coeffs[0] = level;
for (i = 0; i < 7; ) {
if ... | false | FFmpeg | cece491daa9f4c7c908e016f4e285a49d37cb17c | static void init_quantized_coeffs_elem0 (int8_t *quantized_coeffs, GetBitContext *gb, int length)
{
int i, k, run, level, diff;
if (BITS_LEFT(length,gb) < 16)
return;
level = qdm2_get_vlc(gb, &vlc_tab_level, 0, 2);
quantized_coeffs[0] = level;
for (i = 0; i < 7; ) {
if ... | {
"code": [],
"line_no": []
} | static void FUNC_0 (int8_t *VAR_0, GetBitContext *VAR_1, int VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;
if (BITS_LEFT(VAR_2,VAR_1) < 16)
return;
VAR_6 = qdm2_get_vlc(VAR_1, &vlc_tab_level, 0, 2);
VAR_0[0] = VAR_6;
for (VAR_3 = 0; VAR_3 < 7; ) {
if (BITS_LEFT(VAR_2,... | [
"static void FUNC_0 (int8_t *VAR_0, GetBitContext *VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;",
"if (BITS_LEFT(VAR_2,VAR_1) < 16)\nreturn;",
"VAR_6 = qdm2_get_vlc(VAR_1, &vlc_tab_level, 0, 2);",
"VAR_0[0] = VAR_6;",
"for (VAR_3 = 0; VAR_3 < 7; ) {",
"if (BITS_LEFT(VAR_2,VAR_1) < 16)\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
],
[
17
],
[
21
],
[
23,
25
],
[
27
],
[
31,
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
]
] |
7,016 | QEMUTimer *qemu_new_timer(QEMUClock *clock, int scale,
QEMUTimerCB *cb, void *opaque)
{
return g_malloc(1);
}
| false | qemu | cbcfa0418f0c196afa765f5c9837b9344d1adcf3 | QEMUTimer *qemu_new_timer(QEMUClock *clock, int scale,
QEMUTimerCB *cb, void *opaque)
{
return g_malloc(1);
}
| {
"code": [],
"line_no": []
} | QEMUTimer *FUNC_0(QEMUClock *clock, int scale,
QEMUTimerCB *cb, void *opaque)
{
return g_malloc(1);
}
| [
"QEMUTimer *FUNC_0(QEMUClock *clock, int scale,\nQEMUTimerCB *cb, void *opaque)\n{",
"return g_malloc(1);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
]
] |
7,018 | static void handle_fmov(DisasContext *s, int rd, int rn, int type, bool itof)
{
/* FMOV: gpr to or from float, double, or top half of quad fp reg,
* without conversion.
*/
if (itof) {
TCGv_i64 tcg_rn = cpu_reg(s, rn);
switch (type) {
case 0:
{
... | false | qemu | 90e496386fe7fd32c189561f846b7913f95b8cf4 | static void handle_fmov(DisasContext *s, int rd, int rn, int type, bool itof)
{
if (itof) {
TCGv_i64 tcg_rn = cpu_reg(s, rn);
switch (type) {
case 0:
{
TCGv_i64 tmp = tcg_temp_new_i64();
tcg_gen_ext32u_i64(tmp, tcg_rn);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0, int VAR_1, int VAR_2, int VAR_3, bool VAR_4)
{
if (VAR_4) {
TCGv_i64 tcg_rn = cpu_reg(VAR_0, VAR_2);
switch (VAR_3) {
case 0:
{
TCGv_i64 tmp = tcg_temp_new_i64();
tcg_gen_ext32u_i64(tm... | [
"static void FUNC_0(DisasContext *VAR_0, int VAR_1, int VAR_2, int VAR_3, bool VAR_4)\n{",
"if (VAR_4) {",
"TCGv_i64 tcg_rn = cpu_reg(VAR_0, VAR_2);",
"switch (VAR_3) {",
"case 0:\n{",
"TCGv_i64 tmp = tcg_temp_new_i64();",
"tcg_gen_ext32u_i64(tmp, tcg_rn);",
"tcg_gen_st_i64(tmp, cpu_env, fp_reg_offset... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
49
],
[
51
],
[
53
],
[
55
],
[
... |
7,020 | static void coroutine_fn bdrv_discard_co_entry(void *opaque)
{
DiscardCo *rwco = opaque;
rwco->ret = bdrv_co_discard(rwco->bs, rwco->sector_num, rwco->nb_sectors);
}
| false | qemu | 61007b316cd71ee7333ff7a0a749a8949527575f | static void coroutine_fn bdrv_discard_co_entry(void *opaque)
{
DiscardCo *rwco = opaque;
rwco->ret = bdrv_co_discard(rwco->bs, rwco->sector_num, rwco->nb_sectors);
}
| {
"code": [],
"line_no": []
} | static void VAR_0 bdrv_discard_co_entry(void *opaque)
{
DiscardCo *rwco = opaque;
rwco->ret = bdrv_co_discard(rwco->bs, rwco->sector_num, rwco->nb_sectors);
}
| [
"static void VAR_0 bdrv_discard_co_entry(void *opaque)\n{",
"DiscardCo *rwco = opaque;",
"rwco->ret = bdrv_co_discard(rwco->bs, rwco->sector_num, rwco->nb_sectors);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
7,022 | static uint64_t escc_mem_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
SerialState *serial = opaque;
ChannelState *s;
uint32_t saddr;
uint32_t ret;
int channel;
saddr = (addr >> serial->it_shift) & 1;
channel = (addr >> (serial->it_shif... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t escc_mem_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
SerialState *serial = opaque;
ChannelState *s;
uint32_t saddr;
uint32_t ret;
int channel;
saddr = (addr >> serial->it_shift) & 1;
channel = (addr >> (serial->it_shif... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,
unsigned size)
{
SerialState *serial = opaque;
ChannelState *s;
uint32_t saddr;
uint32_t ret;
int VAR_0;
saddr = (addr >> serial->it_shift) & 1;
VAR_0 = (addr >> (serial->it_shift + 1)) & 1... | [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,\nunsigned size)\n{",
"SerialState *serial = opaque;",
"ChannelState *s;",
"uint32_t saddr;",
"uint32_t ret;",
"int VAR_0;",
"saddr = (addr >> serial->it_shift) & 1;",
"VAR_0 = (addr >> (serial->it_shift + 1)) & 1;",
"s = &serial->chn[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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43,
45
],
[
47,... |
7,023 | static int proxy_parse_opts(QemuOpts *opts, struct FsDriverEntry *fs)
{
const char *socket = qemu_opt_get(opts, "socket");
const char *sock_fd = qemu_opt_get(opts, "sock_fd");
if (!socket && !sock_fd) {
fprintf(stderr, "socket and sock_fd none of the option specified\n");
return -1;
... | false | qemu | 494a8ebe713055d3946183f4b395f85a18b43e9e | static int proxy_parse_opts(QemuOpts *opts, struct FsDriverEntry *fs)
{
const char *socket = qemu_opt_get(opts, "socket");
const char *sock_fd = qemu_opt_get(opts, "sock_fd");
if (!socket && !sock_fd) {
fprintf(stderr, "socket and sock_fd none of the option specified\n");
return -1;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(QemuOpts *VAR_0, struct FsDriverEntry *VAR_1)
{
const char *VAR_2 = qemu_opt_get(VAR_0, "VAR_2");
const char *VAR_3 = qemu_opt_get(VAR_0, "VAR_3");
if (!VAR_2 && !VAR_3) {
fprintf(stderr, "VAR_2 and VAR_3 none of the option specified\n");
return -1;
}
if (... | [
"static int FUNC_0(QemuOpts *VAR_0, struct FsDriverEntry *VAR_1)\n{",
"const char *VAR_2 = qemu_opt_get(VAR_0, \"VAR_2\");",
"const char *VAR_3 = qemu_opt_get(VAR_0, \"VAR_3\");",
"if (!VAR_2 && !VAR_3) {",
"fprintf(stderr, \"VAR_2 and VAR_3 none of the option specified\\n\");",
"return -1;",
"}",
"if... | [
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
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43... |
7,024 | static void bdrv_co_io_em_complete(void *opaque, int ret)
{
CoroutineIOCompletion *co = opaque;
co->ret = ret;
qemu_coroutine_enter(co->coroutine, NULL);
}
| false | qemu | 08844473820c93541fc47bdfeae0f2cc88cfab59 | static void bdrv_co_io_em_complete(void *opaque, int ret)
{
CoroutineIOCompletion *co = opaque;
co->ret = ret;
qemu_coroutine_enter(co->coroutine, NULL);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, int VAR_1)
{
CoroutineIOCompletion *co = VAR_0;
co->VAR_1 = VAR_1;
qemu_coroutine_enter(co->coroutine, NULL);
}
| [
"static void FUNC_0(void *VAR_0, int VAR_1)\n{",
"CoroutineIOCompletion *co = VAR_0;",
"co->VAR_1 = VAR_1;",
"qemu_coroutine_enter(co->coroutine, NULL);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
]
] |
7,025 | START_TEST(qobject_to_qdict_test)
{
fail_unless(qobject_to_qdict(QOBJECT(tests_dict)) == tests_dict);
}
| false | qemu | ac531cb6e542b1e61d668604adf9dc5306a948c0 | START_TEST(qobject_to_qdict_test)
{
fail_unless(qobject_to_qdict(QOBJECT(tests_dict)) == tests_dict);
}
| {
"code": [],
"line_no": []
} | FUNC_0(VAR_0)
{
fail_unless(qobject_to_qdict(QOBJECT(tests_dict)) == tests_dict);
}
| [
"FUNC_0(VAR_0)\n{",
"fail_unless(qobject_to_qdict(QOBJECT(tests_dict)) == tests_dict);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
7,028 | static int mmu_translate_pte(CPUS390XState *env, target_ulong vaddr,
uint64_t asc, uint64_t asce,
target_ulong *raddr, int *flags, int rw)
{
if (asce & _PAGE_INVALID) {
DPRINTF("%s: PTE=0x%" PRIx64 " invalid\n", __func__, asce);
trigger... | false | qemu | e3e09d87c6e69c2da684d5aacabe3124ebcb6f8e | static int mmu_translate_pte(CPUS390XState *env, target_ulong vaddr,
uint64_t asc, uint64_t asce,
target_ulong *raddr, int *flags, int rw)
{
if (asce & _PAGE_INVALID) {
DPRINTF("%s: PTE=0x%" PRIx64 " invalid\n", __func__, asce);
trigger... | {
"code": [],
"line_no": []
} | static int FUNC_0(CPUS390XState *VAR_0, target_ulong VAR_1,
uint64_t VAR_2, uint64_t VAR_3,
target_ulong *VAR_4, int *VAR_5, int VAR_6)
{
if (VAR_3 & _PAGE_INVALID) {
DPRINTF("%s: PTE=0x%" PRIx64 " invalid\n", __func__, VAR_3);
trigger_... | [
"static int FUNC_0(CPUS390XState *VAR_0, target_ulong VAR_1,\nuint64_t VAR_2, uint64_t VAR_3,\ntarget_ulong *VAR_4, int *VAR_5, int VAR_6)\n{",
"if (VAR_3 & _PAGE_INVALID) {",
"DPRINTF(\"%s: PTE=0x%\" PRIx64 \" invalid\\n\", __func__, VAR_3);",
"trigger_page_fault(VAR_0, VAR_1, PGM_PAGE_TRANS, VAR_2, VAR_6);"... | [
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
],
[
29
],
[
33
],
[
37
],
[
39
]
] |
7,029 | static uint64_t qvirtio_scsi_alloc(QVirtIOSCSI *vs, size_t alloc_size,
const void *data)
{
uint64_t addr;
addr = guest_alloc(vs->alloc, alloc_size);
if (data) {
memwrite(addr, data, alloc_size);
}
return addr;
}
| false | qemu | a980f7f2c2f4d7e9a1eba4f804cd66dbd458b6d4 | static uint64_t qvirtio_scsi_alloc(QVirtIOSCSI *vs, size_t alloc_size,
const void *data)
{
uint64_t addr;
addr = guest_alloc(vs->alloc, alloc_size);
if (data) {
memwrite(addr, data, alloc_size);
}
return addr;
}
| {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(QVirtIOSCSI *vs, size_t alloc_size,
const void *data)
{
uint64_t addr;
addr = guest_alloc(vs->alloc, alloc_size);
if (data) {
memwrite(addr, data, alloc_size);
}
return addr;
}
| [
"static uint64_t FUNC_0(QVirtIOSCSI *vs, size_t alloc_size,\nconst void *data)\n{",
"uint64_t addr;",
"addr = guest_alloc(vs->alloc, alloc_size);",
"if (data) {",
"memwrite(addr, data, alloc_size);",
"}",
"return addr;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
7,030 | guint qemu_chr_fe_add_watch(CharDriverState *s, GIOCondition cond,
GIOFunc func, void *user_data)
{
GSource *src;
guint tag;
if (s->chr_add_watch == NULL) {
return -ENOSYS;
}
src = s->chr_add_watch(s, cond);
g_source_set_callback(src, (GSourceFunc... | false | qemu | 2c8a59422c06fe1e37c85502d92ccdfb5e2ac987 | guint qemu_chr_fe_add_watch(CharDriverState *s, GIOCondition cond,
GIOFunc func, void *user_data)
{
GSource *src;
guint tag;
if (s->chr_add_watch == NULL) {
return -ENOSYS;
}
src = s->chr_add_watch(s, cond);
g_source_set_callback(src, (GSourceFunc... | {
"code": [],
"line_no": []
} | guint FUNC_0(CharDriverState *s, GIOCondition cond,
GIOFunc func, void *user_data)
{
GSource *src;
guint tag;
if (s->chr_add_watch == NULL) {
return -ENOSYS;
}
src = s->chr_add_watch(s, cond);
g_source_set_callback(src, (GSourceFunc)func, user_dat... | [
"guint FUNC_0(CharDriverState *s, GIOCondition cond,\nGIOFunc func, void *user_data)\n{",
"GSource *src;",
"guint tag;",
"if (s->chr_add_watch == NULL) {",
"return -ENOSYS;",
"}",
"src = s->chr_add_watch(s, cond);",
"g_source_set_callback(src, (GSourceFunc)func, user_data, NULL);",
"tag = g_source_a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
]
] |
7,031 | static void notdirty_mem_write(void *opaque, target_phys_addr_t ram_addr,
uint64_t val, unsigned size)
{
int dirty_flags;
dirty_flags = cpu_physical_memory_get_dirty_flags(ram_addr);
if (!(dirty_flags & CODE_DIRTY_FLAG)) {
#if !defined(CONFIG_USER_ONLY)
tb_inval... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void notdirty_mem_write(void *opaque, target_phys_addr_t ram_addr,
uint64_t val, unsigned size)
{
int dirty_flags;
dirty_flags = cpu_physical_memory_get_dirty_flags(ram_addr);
if (!(dirty_flags & CODE_DIRTY_FLAG)) {
#if !defined(CONFIG_USER_ONLY)
tb_inval... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
int VAR_4;
VAR_4 = cpu_physical_memory_get_dirty_flags(VAR_1);
if (!(VAR_4 & CODE_DIRTY_FLAG)) {
#if !defined(CONFIG_USER_ONLY)
tb_invalidate_phys_page_fast(VAR_1, VAR_3)... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"int VAR_4;",
"VAR_4 = cpu_physical_memory_get_dirty_flags(VAR_1);",
"if (!(VAR_4 & CODE_DIRTY_FLAG)) {",
"#if !defined(CONFIG_USER_ONLY)\ntb_invalidate_phys_page_fast(VAR_1, VAR_3);",
"VAR_4 = cpu_physical_me... | [
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
],
[
43,
45
],
[
47
],
[... |
7,032 | static void v9fs_xattrwalk(void *opaque)
{
int64_t size;
V9fsString name;
ssize_t err = 0;
size_t offset = 7;
int32_t fid, newfid;
V9fsFidState *file_fidp;
V9fsFidState *xattr_fidp = NULL;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "dds"... | false | qemu | ddca7f86ac022289840e0200fd4050b2b58e9176 | static void v9fs_xattrwalk(void *opaque)
{
int64_t size;
V9fsString name;
ssize_t err = 0;
size_t offset = 7;
int32_t fid, newfid;
V9fsFidState *file_fidp;
V9fsFidState *xattr_fidp = NULL;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "dds"... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
int64_t size;
V9fsString name;
ssize_t err = 0;
size_t offset = 7;
int32_t fid, newfid;
V9fsFidState *file_fidp;
V9fsFidState *xattr_fidp = NULL;
V9fsPDU *pdu = VAR_0;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "dds", &fid, &n... | [
"static void FUNC_0(void *VAR_0)\n{",
"int64_t size;",
"V9fsString name;",
"ssize_t err = 0;",
"size_t offset = 7;",
"int32_t fid, newfid;",
"V9fsFidState *file_fidp;",
"V9fsFidState *xattr_fidp = NULL;",
"V9fsPDU *pdu = VAR_0;",
"V9fsState *s = pdu->s;",
"pdu_unmarshal(pdu, offset, \"dds\", &fi... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
... |
7,034 | void kvm_cpu_synchronize_state(CPUState *env)
{
if (!env->kvm_vcpu_dirty)
run_on_cpu(env, do_kvm_cpu_synchronize_state, env);
}
| false | qemu | a426e122173f36f05ea2cb72dcff77b7408546ce | void kvm_cpu_synchronize_state(CPUState *env)
{
if (!env->kvm_vcpu_dirty)
run_on_cpu(env, do_kvm_cpu_synchronize_state, env);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(CPUState *VAR_0)
{
if (!VAR_0->kvm_vcpu_dirty)
run_on_cpu(VAR_0, do_kvm_cpu_synchronize_state, VAR_0);
}
| [
"void FUNC_0(CPUState *VAR_0)\n{",
"if (!VAR_0->kvm_vcpu_dirty)\nrun_on_cpu(VAR_0, do_kvm_cpu_synchronize_state, VAR_0);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
]
] |
7,035 | static void virtio_blk_rw_complete(void *opaque, int ret)
{
VirtIOBlockReq *req = opaque;
trace_virtio_blk_rw_complete(req, ret);
if (ret) {
int p = virtio_ldl_p(VIRTIO_DEVICE(req->dev), &req->out.type);
bool is_read = !(p & VIRTIO_BLK_T_OUT);
if (virtio_blk_handle_rw_erro... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | static void virtio_blk_rw_complete(void *opaque, int ret)
{
VirtIOBlockReq *req = opaque;
trace_virtio_blk_rw_complete(req, ret);
if (ret) {
int p = virtio_ldl_p(VIRTIO_DEVICE(req->dev), &req->out.type);
bool is_read = !(p & VIRTIO_BLK_T_OUT);
if (virtio_blk_handle_rw_erro... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, int VAR_1)
{
VirtIOBlockReq *req = VAR_0;
trace_virtio_blk_rw_complete(req, VAR_1);
if (VAR_1) {
int VAR_2 = virtio_ldl_p(VIRTIO_DEVICE(req->dev), &req->out.type);
bool is_read = !(VAR_2 & VIRTIO_BLK_T_OUT);
if (virtio_blk_handle_rw_error(re... | [
"static void FUNC_0(void *VAR_0, int VAR_1)\n{",
"VirtIOBlockReq *req = VAR_0;",
"trace_virtio_blk_rw_complete(req, VAR_1);",
"if (VAR_1) {",
"int VAR_2 = virtio_ldl_p(VIRTIO_DEVICE(req->dev), &req->out.type);",
"bool is_read = !(VAR_2 & VIRTIO_BLK_T_OUT);",
"if (virtio_blk_handle_rw_error(req, -VAR_1, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
]
] |
7,036 | void qmp_migrate_set_parameters(MigrationParameters *params, Error **errp)
{
MigrationState *s = migrate_get_current();
if (params->has_compress_level &&
(params->compress_level < 0 || params->compress_level > 9)) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "compress_level",
... | false | qemu | 87c9cc1c30d2981e9686aaf245b3e2420062f7d4 | void qmp_migrate_set_parameters(MigrationParameters *params, Error **errp)
{
MigrationState *s = migrate_get_current();
if (params->has_compress_level &&
(params->compress_level < 0 || params->compress_level > 9)) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "compress_level",
... | {
"code": [],
"line_no": []
} | void FUNC_0(MigrationParameters *VAR_0, Error **VAR_1)
{
MigrationState *s = migrate_get_current();
if (VAR_0->has_compress_level &&
(VAR_0->compress_level < 0 || VAR_0->compress_level > 9)) {
error_setg(VAR_1, QERR_INVALID_PARAMETER_VALUE, "compress_level",
"is invali... | [
"void FUNC_0(MigrationParameters *VAR_0, Error **VAR_1)\n{",
"MigrationState *s = migrate_get_current();",
"if (VAR_0->has_compress_level &&\n(VAR_0->compress_level < 0 || VAR_0->compress_level > 9)) {",
"error_setg(VAR_1, QERR_INVALID_PARAMETER_VALUE, \"compress_level\",\n\"is invalid, it should be in the ra... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
43
],
[
45
],
[
47
],
[
49,
51,
53... |
7,038 | uint64_t HELPER(lpq)(CPUS390XState *env, uint64_t addr)
{
uintptr_t ra = GETPC();
uint64_t hi, lo;
if (parallel_cpus) {
#ifndef CONFIG_ATOMIC128
cpu_loop_exit_atomic(ENV_GET_CPU(env), ra);
#else
int mem_idx = cpu_mmu_index(env, false);
TCGMemOpIdx oi = make_memop_idx(MO_TE... | false | qemu | 6476615d385eb249105b25873ef30ba4b9c808dc | uint64_t HELPER(lpq)(CPUS390XState *env, uint64_t addr)
{
uintptr_t ra = GETPC();
uint64_t hi, lo;
if (parallel_cpus) {
#ifndef CONFIG_ATOMIC128
cpu_loop_exit_atomic(ENV_GET_CPU(env), ra);
#else
int mem_idx = cpu_mmu_index(env, false);
TCGMemOpIdx oi = make_memop_idx(MO_TE... | {
"code": [],
"line_no": []
} | uint64_t FUNC_0(lpq)(CPUS390XState *env, uint64_t addr)
{
uintptr_t ra = GETPC();
uint64_t hi, lo;
if (parallel_cpus) {
#ifndef CONFIG_ATOMIC128
cpu_loop_exit_atomic(ENV_GET_CPU(env), ra);
#else
int mem_idx = cpu_mmu_index(env, false);
TCGMemOpIdx oi = make_memop_idx(MO_TE... | [
"uint64_t FUNC_0(lpq)(CPUS390XState *env, uint64_t addr)\n{",
"uintptr_t ra = GETPC();",
"uint64_t hi, lo;",
"if (parallel_cpus) {",
"#ifndef CONFIG_ATOMIC128\ncpu_loop_exit_atomic(ENV_GET_CPU(env), ra);",
"#else\nint mem_idx = cpu_mmu_index(env, false);",
"TCGMemOpIdx oi = make_memop_idx(MO_TEQ | MO_AL... | [
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,
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
]
] |
7,039 | void breakpoint_handler(CPUState *cs)
{
X86CPU *cpu = X86_CPU(cs);
CPUX86State *env = &cpu->env;
CPUBreakpoint *bp;
if (cs->watchpoint_hit) {
if (cs->watchpoint_hit->flags & BP_CPU) {
cs->watchpoint_hit = NULL;
if (check_hw_breakpoints(env, false)) {
... | false | qemu | 6886b98036a8f8f5bce8b10756ce080084cef11b | void breakpoint_handler(CPUState *cs)
{
X86CPU *cpu = X86_CPU(cs);
CPUX86State *env = &cpu->env;
CPUBreakpoint *bp;
if (cs->watchpoint_hit) {
if (cs->watchpoint_hit->flags & BP_CPU) {
cs->watchpoint_hit = NULL;
if (check_hw_breakpoints(env, false)) {
... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUState *VAR_0)
{
X86CPU *cpu = X86_CPU(VAR_0);
CPUX86State *env = &cpu->env;
CPUBreakpoint *bp;
if (VAR_0->watchpoint_hit) {
if (VAR_0->watchpoint_hit->flags & BP_CPU) {
VAR_0->watchpoint_hit = NULL;
if (check_hw_breakpoints(env, false)) {
... | [
"void FUNC_0(CPUState *VAR_0)\n{",
"X86CPU *cpu = X86_CPU(VAR_0);",
"CPUX86State *env = &cpu->env;",
"CPUBreakpoint *bp;",
"if (VAR_0->watchpoint_hit) {",
"if (VAR_0->watchpoint_hit->flags & BP_CPU) {",
"VAR_0->watchpoint_hit = NULL;",
"if (check_hw_breakpoints(env, false)) {",
"raise_exception(env,... | [
0,
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
... |
7,040 | static void start_output(DBDMA_channel *ch, int key, uint32_t addr,
uint16_t req_count, int is_last)
{
DBDMA_DPRINTF("start_output\n");
/* KEY_REGS, KEY_DEVICE and KEY_STREAM
* are not implemented in the mac-io chip
*/
DBDMA_DPRINTF("addr 0x%x key 0x%x\n", addr, ... | false | qemu | a9ceb76d55abfed9426a819024aa3a4b87266c9f | static void start_output(DBDMA_channel *ch, int key, uint32_t addr,
uint16_t req_count, int is_last)
{
DBDMA_DPRINTF("start_output\n");
DBDMA_DPRINTF("addr 0x%x key 0x%x\n", addr, key);
if (!addr || key > KEY_STREAM3) {
kill_channel(ch);
return;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(DBDMA_channel *VAR_0, int VAR_1, uint32_t VAR_2,
uint16_t VAR_3, int VAR_4)
{
DBDMA_DPRINTF("FUNC_0\n");
DBDMA_DPRINTF("VAR_2 0x%x VAR_1 0x%x\n", VAR_2, VAR_1);
if (!VAR_2 || VAR_1 > KEY_STREAM3) {
kill_channel(VAR_0);
return;
... | [
"static void FUNC_0(DBDMA_channel *VAR_0, int VAR_1, uint32_t VAR_2,\nuint16_t VAR_3, int VAR_4)\n{",
"DBDMA_DPRINTF(\"FUNC_0\\n\");",
"DBDMA_DPRINTF(\"VAR_2 0x%x VAR_1 0x%x\\n\", VAR_2, VAR_1);",
"if (!VAR_2 || VAR_1 > KEY_STREAM3) {",
"kill_channel(VAR_0);",
"return;",
"}",
"VAR_0->io.VAR_2 = VAR_2;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
7,041 | static void FUNCC(pred8x8_dc)(uint8_t *_src, int stride){
int i;
int dc0, dc1, dc2;
pixel4 dc0splat, dc1splat, dc2splat, dc3splat;
pixel *src = (pixel*)_src;
stride /= sizeof(pixel);
dc0=dc1=dc2=0;
for(i=0;i<4; i++){
dc0+= src[-1+i*stride] + src[i-stride];
dc1+= sr... | true | FFmpeg | 2caf19e90f270abe1e80a3e85acaf0eb5c9d0aac | static void FUNCC(pred8x8_dc)(uint8_t *_src, int stride){
int i;
int dc0, dc1, dc2;
pixel4 dc0splat, dc1splat, dc2splat, dc3splat;
pixel *src = (pixel*)_src;
stride /= sizeof(pixel);
dc0=dc1=dc2=0;
for(i=0;i<4; i++){
dc0+= src[-1+i*stride] + src[i-stride];
dc1+= sr... | {
"code": [
" ((pixel4*)(src+i*stride))[0]= dc0splat;",
" ((pixel4*)(src+i*stride))[1]= dc1splat;",
" ((pixel4*)(src+i*stride))[0]= dc0splat;",
" ((pixel4*)(src+i*stride))[1]= dc1splat;",
" ((pixel4*)(src+i*stride))[0]= dc0splat;",
" ((pixel4*)(src+i*s... | static void FUNC_0(pred8x8_dc)(uint8_t *_src, int stride){
int VAR_0;
int VAR_1, VAR_2, VAR_3;
pixel4 dc0splat, dc1splat, dc2splat, dc3splat;
pixel *src = (pixel*)_src;
stride /= sizeof(pixel);
VAR_1=VAR_2=VAR_3=0;
for(VAR_0=0;VAR_0<4; VAR_0++){
VAR_1+= src[-1+VAR_0*stride]... | [
"static void FUNC_0(pred8x8_dc)(uint8_t *_src, int stride){",
"int VAR_0;",
"int VAR_1, VAR_2, VAR_3;",
"pixel4 dc0splat, dc1splat, dc2splat, dc3splat;",
"pixel *src = (pixel*)_src;",
"stride /= sizeof(pixel);",
"VAR_1=VAR_2=VAR_3=0;",
"for(VAR_0=0;VAR_0<4; VAR_0++){",
"VAR_1+= src[-1+VAR_0*stride] ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
1,
1,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
7,042 | static int print_int32(DeviceState *dev, Property *prop, char *dest, size_t len)
{
int32_t *ptr = qdev_get_prop_ptr(dev, prop);
return snprintf(dest, len, "%" PRId32, *ptr);
}
| true | qemu | 5cb9b56acfc0b50acf7ccd2d044ab4991c47fdde | static int print_int32(DeviceState *dev, Property *prop, char *dest, size_t len)
{
int32_t *ptr = qdev_get_prop_ptr(dev, prop);
return snprintf(dest, len, "%" PRId32, *ptr);
}
| {
"code": [
" int32_t *ptr = qdev_get_prop_ptr(dev, prop);",
"static int print_int32(DeviceState *dev, Property *prop, char *dest, size_t len)",
" int32_t *ptr = qdev_get_prop_ptr(dev, prop);",
" return snprintf(dest, len, \"%\" PRId32, *ptr);"
],
"line_no": [
5,
1,
5,
7
... | static int FUNC_0(DeviceState *VAR_0, Property *VAR_1, char *VAR_2, size_t VAR_3)
{
int32_t *ptr = qdev_get_prop_ptr(VAR_0, VAR_1);
return snprintf(VAR_2, VAR_3, "%" PRId32, *ptr);
}
| [
"static int FUNC_0(DeviceState *VAR_0, Property *VAR_1, char *VAR_2, size_t VAR_3)\n{",
"int32_t *ptr = qdev_get_prop_ptr(VAR_0, VAR_1);",
"return snprintf(VAR_2, VAR_3, \"%\" PRId32, *ptr);",
"}"
] | [
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
7,043 | int vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
const uint8_t *buf, int buf_size)
{
VP56Context *s = avctx->priv_data;
AVFrame *const p = s->framep[VP56_FRAME_CURRENT];
int remaining_buf_size = buf_size;
int is_alpha, alpha_offset;
if (s->has_a... | true | FFmpeg | ed761067550ec784c62b32dd749bbbca62462d89 | int vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
const uint8_t *buf, int buf_size)
{
VP56Context *s = avctx->priv_data;
AVFrame *const p = s->framep[VP56_FRAME_CURRENT];
int remaining_buf_size = buf_size;
int is_alpha, alpha_offset;
if (s->has_a... | {
"code": [
" int is_alpha, alpha_offset;"
],
"line_no": [
13
]
} | int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,
const uint8_t *VAR_3, int VAR_4)
{
VP56Context *s = VAR_0->priv_data;
AVFrame *const p = s->framep[VP56_FRAME_CURRENT];
int VAR_5 = VAR_4;
int VAR_6, VAR_7;
if (s->has_alpha) {
VAR_7 = bytestream_get_b... | [
"int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,\nconst uint8_t *VAR_3, int VAR_4)\n{",
"VP56Context *s = VAR_0->priv_data;",
"AVFrame *const p = s->framep[VP56_FRAME_CURRENT];",
"int VAR_5 = VAR_4;",
"int VAR_6, VAR_7;",
"if (s->has_alpha) {",
"VAR_7 = bytestream_get_be24(&VAR_3);",
"VAR_5... | [
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,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
43
],
[
45,
47
],
[
51
],
[
53
... |
7,044 | static inline void RENAME(uyvyToY)(uint8_t *dst, uint8_t *src, int width)
{
#ifdef HAVE_MMX
asm volatile(
"mov %0, %%"REG_a" \n\t"
"1: \n\t"
"movq (%1, %%"REG_a",2), %%mm0 \n\t"
"movq 8(%1, %%"REG_a",2), %%mm1 \n\t"
"psrlw $8, %%mm0 \n\t"
"psrlw $8, %%mm1 \n\t"
"packuswb %%mm1, %%mm0 \n\... | true | FFmpeg | 7f526efd17973ec6d2204f7a47b6923e2be31363 | static inline void RENAME(uyvyToY)(uint8_t *dst, uint8_t *src, int width)
{
#ifdef HAVE_MMX
asm volatile(
"mov %0, %%"REG_a" \n\t"
"1: \n\t"
"movq (%1, %%"REG_a",2), %%mm0 \n\t"
"movq 8(%1, %%"REG_a",2), %%mm1 \n\t"
"psrlw $8, %%mm0 \n\t"
"psrlw $8, %%mm1 \n\t"
"packuswb %%mm1, %%mm0 \n\... | {
"code": [
"\t\t: : \"g\" ((long)-width), \"r\" (src+width*2), \"r\" (dst+width)",
"static inline void RENAME(uyvyToY)(uint8_t *dst, uint8_t *src, int width)",
"\t\t: : \"g\" ((long)-width), \"r\" (src+width*2), \"r\" (dst+width)"
],
"line_no": [
29,
1,
29
]
} | static inline void FUNC_0(uyvyToY)(uint8_t *dst, uint8_t *src, int width)
{
#ifdef HAVE_MMX
asm volatile(
"mov %0, %%"REG_a" \n\t"
"1: \n\t"
"movq (%1, %%"REG_a",2), %%mm0 \n\t"
"movq 8(%1, %%"REG_a",2), %%mm1 \n\t"
"psrlw $8, %%mm0 \n\t"
"psrlw $8, %%mm1 \n\t"
"packuswb %%mm1, %%mm0 \n\... | [
"static inline void FUNC_0(uyvyToY)(uint8_t *dst, uint8_t *src, int width)\n{",
"#ifdef HAVE_MMX\nasm volatile(\n\"mov %0, %%\"REG_a\"\t\t\\n\\t\"\n\"1:\t\t\t\t\\n\\t\"\n\"movq (%1, %%\"REG_a\",2), %%mm0\t\\n\\t\"\n\"movq 8(%1, %%\"REG_a\",2), %%mm1\t\\n\\t\"\n\"psrlw $8, %%mm0\t\t\\n\\t\"\n\"psrlw $8, %%mm1\t\t\... | [
1,
1,
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
]
] |
7,045 | static av_cold int wmavoice_decode_init(AVCodecContext *ctx)
{
int n, flags, pitch_range, lsp16_flag;
WMAVoiceContext *s = ctx->priv_data;
/**
* Extradata layout:
* - byte 0-18: WMAPro-in-WMAVoice extradata (see wmaprodec.c),
* - byte 19-22: flags field (annoyingly in LE; see below ... | true | FFmpeg | d99427cb8ba099375d8cce6df808d4acf045ab43 | static av_cold int wmavoice_decode_init(AVCodecContext *ctx)
{
int n, flags, pitch_range, lsp16_flag;
WMAVoiceContext *s = ctx->priv_data;
if (ctx->extradata_size != 46) {
av_log(ctx, AV_LOG_ERROR,
"Invalid extradata size %d (should be 46)\n",
... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *ctx)
{
int VAR_0, VAR_1, VAR_2, VAR_3;
WMAVoiceContext *s = ctx->priv_data;
if (ctx->extradata_size != 46) {
av_log(ctx, AV_LOG_ERROR,
"Invalid extradata size %d (should be 46)\VAR_0",
ctx->extradata... | [
"static av_cold int FUNC_0(AVCodecContext *ctx)\n{",
"int VAR_0, VAR_1, VAR_2, VAR_3;",
"WMAVoiceContext *s = ctx->priv_data;",
"if (ctx->extradata_size != 46) {",
"av_log(ctx, AV_LOG_ERROR,\n\"Invalid extradata size %d (should be 46)\\VAR_0\",\nctx->extradata_size);",
"VAR_1 = AV_RL32(ctx-... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
29,
31,
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[
57
],
[
59
],
[
61
],
[
63
],
[
67... |
7,046 | static void ehci_queues_rip_unused(EHCIState *ehci, int async)
{
EHCIQueueHead *head = async ? &ehci->aqueues : &ehci->pqueues;
EHCIQueue *q, *tmp;
QTAILQ_FOREACH_SAFE(q, head, next, tmp) {
if (q->seen) {
q->seen = 0;
q->ts = ehci->last_run_ns;
continue;... | true | qemu | 4be23939ab0d7019c7e59a37485b416fbbf0f073 | static void ehci_queues_rip_unused(EHCIState *ehci, int async)
{
EHCIQueueHead *head = async ? &ehci->aqueues : &ehci->pqueues;
EHCIQueue *q, *tmp;
QTAILQ_FOREACH_SAFE(q, head, next, tmp) {
if (q->seen) {
q->seen = 0;
q->ts = ehci->last_run_ns;
continue;... | {
"code": [
"static void ehci_queues_rip_unused(EHCIState *ehci, int async)",
" if (ehci->last_run_ns < q->ts + 250000000) {"
],
"line_no": [
1,
23
]
} | static void FUNC_0(EHCIState *VAR_0, int VAR_1)
{
EHCIQueueHead *head = VAR_1 ? &VAR_0->aqueues : &VAR_0->pqueues;
EHCIQueue *q, *tmp;
QTAILQ_FOREACH_SAFE(q, head, next, tmp) {
if (q->seen) {
q->seen = 0;
q->ts = VAR_0->last_run_ns;
continue;
}
... | [
"static void FUNC_0(EHCIState *VAR_0, int VAR_1)\n{",
"EHCIQueueHead *head = VAR_1 ? &VAR_0->aqueues : &VAR_0->pqueues;",
"EHCIQueue *q, *tmp;",
"QTAILQ_FOREACH_SAFE(q, head, next, tmp) {",
"if (q->seen) {",
"q->seen = 0;",
"q->ts = VAR_0->last_run_ns;",
"continue;",
"}",
"if (VAR_0->last_run_ns <... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
7,047 | void kvm_arch_pre_run(CPUState *env, struct kvm_run *run)
{
/* Inject NMI */
if (env->interrupt_request & CPU_INTERRUPT_NMI) {
env->interrupt_request &= ~CPU_INTERRUPT_NMI;
DPRINTF("injected NMI\n");
kvm_vcpu_ioctl(env, KVM_NMI);
}
if (!kvm_irqchip_in_kernel()) {
... | true | qemu | ce377af399563195d066d5fee0c7b717967932ee | void kvm_arch_pre_run(CPUState *env, struct kvm_run *run)
{
if (env->interrupt_request & CPU_INTERRUPT_NMI) {
env->interrupt_request &= ~CPU_INTERRUPT_NMI;
DPRINTF("injected NMI\n");
kvm_vcpu_ioctl(env, KVM_NMI);
}
if (!kvm_irqchip_in_kernel()) {
if ... | {
"code": [
" kvm_vcpu_ioctl(env, KVM_NMI);",
" kvm_vcpu_ioctl(env, KVM_INTERRUPT, &intr);"
],
"line_no": [
13,
59
]
} | void FUNC_0(CPUState *VAR_0, struct kvm_run *VAR_1)
{
if (VAR_0->interrupt_request & CPU_INTERRUPT_NMI) {
VAR_0->interrupt_request &= ~CPU_INTERRUPT_NMI;
DPRINTF("injected NMI\n");
kvm_vcpu_ioctl(VAR_0, KVM_NMI);
}
if (!kvm_irqchip_in_kernel()) {
if ... | [
"void FUNC_0(CPUState *VAR_0, struct kvm_run *VAR_1)\n{",
"if (VAR_0->interrupt_request & CPU_INTERRUPT_NMI) {",
"VAR_0->interrupt_request &= ~CPU_INTERRUPT_NMI;",
"DPRINTF(\"injected NMI\\n\");",
"kvm_vcpu_ioctl(VAR_0, KVM_NMI);",
"}",
"if (!kvm_irqchip_in_kernel()) {",
"if (VAR_0->interrupt_request ... | [
0,
0,
0,
0,
1,
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
] | [
[
1,
3
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
33,
35,
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
57
],
[
59... |
7,049 | static void test_acpi_one(const char *params, test_data *data)
{
char *args;
uint8_t signature_low;
uint8_t signature_high;
uint16_t signature;
int i;
const char *device = "";
if (!g_strcmp0(data->machine, MACHINE_Q35)) {
device = ",id=hd -device ide-hd,drive=hd";
}
... | true | qemu | 6b9e03a4e7598765a6cebb7618f2eeb22e928f6e | static void test_acpi_one(const char *params, test_data *data)
{
char *args;
uint8_t signature_low;
uint8_t signature_high;
uint16_t signature;
int i;
const char *device = "";
if (!g_strcmp0(data->machine, MACHINE_Q35)) {
device = ",id=hd -device ide-hd,drive=hd";
}
... | {
"code": [
" const char *device = \"\";",
" if (!g_strcmp0(data->machine, MACHINE_Q35)) {",
" device = \",id=hd -device ide-hd,drive=hd\";",
" args = g_strdup_printf(\"-net none -display none %s -drive file=%s%s,\",",
" params ? params : \"\", disk, devic... | static void FUNC_0(const char *VAR_0, test_data *VAR_1)
{
char *VAR_2;
uint8_t signature_low;
uint8_t signature_high;
uint16_t signature;
int VAR_3;
const char *VAR_4 = "";
if (!g_strcmp0(VAR_1->machine, MACHINE_Q35)) {
VAR_4 = ",id=hd -VAR_4 ide-hd,drive=hd";
}
... | [
"static void FUNC_0(const char *VAR_0, test_data *VAR_1)\n{",
"char *VAR_2;",
"uint8_t signature_low;",
"uint8_t signature_high;",
"uint16_t signature;",
"int VAR_3;",
"const char *VAR_4 = \"\";",
"if (!g_strcmp0(VAR_1->machine, MACHINE_Q35)) {",
"VAR_4 = \",id=hd -VAR_4 ide-hd,drive=hd\";",
"}",
... | [
0,
0,
0,
0,
0,
0,
1,
1,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
31
],
[
37,
39,
51
],
[
53
],
[
55
],
[
57
],
[
59
],
[
61
],
[... |
7,050 | static int ea_read_header(AVFormatContext *s,
AVFormatParameters *ap)
{
EaDemuxContext *ea = s->priv_data;
AVStream *st;
if (!process_ea_header(s))
return AVERROR(EIO);
if (ea->video_codec) {
/* initialize the video decoder stream */
st = av_new_stream(s... | true | FFmpeg | cb77dad72414940837bdb01dad5e747175d6a01f | static int ea_read_header(AVFormatContext *s,
AVFormatParameters *ap)
{
EaDemuxContext *ea = s->priv_data;
AVStream *st;
if (!process_ea_header(s))
return AVERROR(EIO);
if (ea->video_codec) {
st = av_new_stream(s, 0);
if (!st)
return... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0,
AVFormatParameters *VAR_1)
{
EaDemuxContext *ea = VAR_0->priv_data;
AVStream *st;
if (!process_ea_header(VAR_0))
return AVERROR(EIO);
if (ea->video_codec) {
st = av_new_stream(VAR_0, 0);
if (!st)
... | [
"static int FUNC_0(AVFormatContext *VAR_0,\nAVFormatParameters *VAR_1)\n{",
"EaDemuxContext *ea = VAR_0->priv_data;",
"AVStream *st;",
"if (!process_ea_header(VAR_0))\nreturn AVERROR(EIO);",
"if (ea->video_codec) {",
"st = av_new_stream(VAR_0, 0);",
"if (!st)\nreturn AVERROR(ENOMEM);",
"ea->video_stre... | [
0,
0,
0,
0,
0,
0,
0,
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
],
[
10
],
[
11,
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
],
[
24
],
[
... |
7,051 | PCIBus *pci_get_bus_devfn(int *devfnp, PCIBus *root, const char *devaddr)
{
int dom, bus;
unsigned slot;
assert(!root->parent_dev);
if (!root) {
fprintf(stderr, "No primary PCI bus\n");
return NULL;
}
if (!devaddr) {
*devfnp = -1;
return pci_find_... | true | qemu | b645000e1ac430601eddb0b435936837aea94bb4 | PCIBus *pci_get_bus_devfn(int *devfnp, PCIBus *root, const char *devaddr)
{
int dom, bus;
unsigned slot;
assert(!root->parent_dev);
if (!root) {
fprintf(stderr, "No primary PCI bus\n");
return NULL;
}
if (!devaddr) {
*devfnp = -1;
return pci_find_... | {
"code": [
" assert(!root->parent_dev);"
],
"line_no": [
11
]
} | PCIBus *FUNC_0(int *devfnp, PCIBus *root, const char *devaddr)
{
int VAR_0, VAR_1;
unsigned VAR_2;
assert(!root->parent_dev);
if (!root) {
fprintf(stderr, "No primary PCI VAR_1\n");
return NULL;
}
if (!devaddr) {
*devfnp = -1;
return pci_find_bus_... | [
"PCIBus *FUNC_0(int *devfnp, PCIBus *root, const char *devaddr)\n{",
"int VAR_0, VAR_1;",
"unsigned VAR_2;",
"assert(!root->parent_dev);",
"if (!root) {",
"fprintf(stderr, \"No primary PCI VAR_1\\n\");",
"return NULL;",
"}",
"if (!devaddr) {",
"*devfnp = -1;",
"return pci_find_bus_nr(root, 0);",... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53... |
7,052 | static void destroy_page_desc(uint16_t section_index)
{
MemoryRegionSection *section = &phys_sections[section_index];
MemoryRegion *mr = section->mr;
if (mr->subpage) {
subpage_t *subpage = container_of(mr, subpage_t, iomem);
memory_region_destroy(&subpage->iomem);
g_free(su... | true | qemu | 058bc4b57f9d6b39d9a6748b4049e1be3fde3dac | static void destroy_page_desc(uint16_t section_index)
{
MemoryRegionSection *section = &phys_sections[section_index];
MemoryRegion *mr = section->mr;
if (mr->subpage) {
subpage_t *subpage = container_of(mr, subpage_t, iomem);
memory_region_destroy(&subpage->iomem);
g_free(su... | {
"code": [
"static void destroy_page_desc(uint16_t section_index)",
" MemoryRegionSection *section = &phys_sections[section_index];",
" MemoryRegion *mr = section->mr;",
" if (mr->subpage) {",
" subpage_t *subpage = container_of(mr, subpage_t, iomem);",
" memory_region_... | static void FUNC_0(uint16_t VAR_0)
{
MemoryRegionSection *section = &phys_sections[VAR_0];
MemoryRegion *mr = section->mr;
if (mr->subpage) {
subpage_t *subpage = container_of(mr, subpage_t, iomem);
memory_region_destroy(&subpage->iomem);
g_free(subpage);
}
}
| [
"static void FUNC_0(uint16_t VAR_0)\n{",
"MemoryRegionSection *section = &phys_sections[VAR_0];",
"MemoryRegion *mr = section->mr;",
"if (mr->subpage) {",
"subpage_t *subpage = container_of(mr, subpage_t, iomem);",
"memory_region_destroy(&subpage->iomem);",
"g_free(subpage);",
"}",
"}"
] | [
1,
1,
1,
1,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
7,053 | static void opt_output_file(const char *filename)
{
AVFormatContext *oc;
int err, use_video, use_audio, use_subtitle;
int input_has_video, input_has_audio, input_has_subtitle;
AVFormatParameters params, *ap = ¶ms;
AVOutputFormat *file_oformat;
if (!strcmp(filename, "-"))
fi... | true | FFmpeg | ca8064d2d1b293d7a8011bf0a08005c11ae8ba67 | static void opt_output_file(const char *filename)
{
AVFormatContext *oc;
int err, use_video, use_audio, use_subtitle;
int input_has_video, input_has_audio, input_has_subtitle;
AVFormatParameters params, *ap = ¶ms;
AVOutputFormat *file_oformat;
if (!strcmp(filename, "-"))
fi... | {
"code": [
" new_video_stream(oc);",
" new_audio_stream(oc);",
" new_subtitle_stream(oc);"
],
"line_no": [
151,
159,
167
]
} | static void FUNC_0(const char *VAR_0)
{
AVFormatContext *oc;
int VAR_8, VAR_2, VAR_3, VAR_4;
int VAR_5, VAR_6, VAR_7;
AVFormatParameters params, *ap = ¶ms;
AVOutputFormat *file_oformat;
if (!strcmp(VAR_0, "-"))
VAR_0 = "pipe:";
oc = avformat_alloc_context();
if ... | [
"static void FUNC_0(const char *VAR_0)\n{",
"AVFormatContext *oc;",
"int VAR_8, VAR_2, VAR_3, VAR_4;",
"int VAR_5, VAR_6, VAR_7;",
"AVFormatParameters params, *ap = ¶ms;",
"AVOutputFormat *file_oformat;",
"if (!strcmp(VAR_0, \"-\"))\nVAR_0 = \"pipe:\";",
"oc = avformat_alloc_context();",
"if (!o... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
0,
0,
1,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
7,054 | void vnc_display_add_client(DisplayState *ds, int csock, int skipauth)
{
VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;
vnc_connect(vs, csock, skipauth, 0);
}
| true | qemu | 21ef45d71221b4577330fe3aacfb06afad91ad46 | void vnc_display_add_client(DisplayState *ds, int csock, int skipauth)
{
VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;
vnc_connect(vs, csock, skipauth, 0);
}
| {
"code": [
" VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;",
" VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;",
" VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;",
" VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;",
" VncDi... | void FUNC_0(DisplayState *VAR_0, int VAR_1, int VAR_2)
{
VncDisplay *vs = VAR_0 ? (VncDisplay *)VAR_0->opaque : vnc_display;
vnc_connect(vs, VAR_1, VAR_2, 0);
}
| [
"void FUNC_0(DisplayState *VAR_0, int VAR_1, int VAR_2)\n{",
"VncDisplay *vs = VAR_0 ? (VncDisplay *)VAR_0->opaque : vnc_display;",
"vnc_connect(vs, VAR_1, VAR_2, 0);",
"}"
] | [
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
7,057 | av_cold void ff_vp9dsp_init_x86(VP9DSPContext *dsp)
{
#if HAVE_YASM
int cpu_flags = av_get_cpu_flags();
#define init_fpel(idx1, idx2, sz, type, opt) \
dsp->mc[idx1][FILTER_8TAP_SMOOTH ][idx2][0][0] = \
dsp->mc[idx1][FILTER_8TAP_REGULAR][idx2][0][0] = \
dsp->mc[idx1][FILTER_8TAP_SHARP ][idx2][0... | true | FFmpeg | cae893f692bf848872b2e37be5ddb9d8a24644eb | av_cold void ff_vp9dsp_init_x86(VP9DSPContext *dsp)
{
#if HAVE_YASM
int cpu_flags = av_get_cpu_flags();
#define init_fpel(idx1, idx2, sz, type, opt) \
dsp->mc[idx1][FILTER_8TAP_SMOOTH ][idx2][0][0] = \
dsp->mc[idx1][FILTER_8TAP_REGULAR][idx2][0][0] = \
dsp->mc[idx1][FILTER_8TAP_SHARP ][idx2][0... | {
"code": [
"#define init_subpel2_32_64(idx, idxh, idxv, dir, type, opt) \\",
" init_subpel1(0, idx, idxh, idxv, 64, dir, type, opt); \\",
" init_subpel1(1, idx, idxh, idxv, 32, dir, type, opt)",
"#define init_subpel2(idx, idxh, idxv, dir, type, opt) \\",
" init_subpel2_32_64(idx, idxh, i... | av_cold void FUNC_0(VP9DSPContext *dsp)
{
#if HAVE_YASM
int cpu_flags = av_get_cpu_flags();
#define init_fpel(idx1, idx2, sz, type, opt) \
dsp->mc[idx1][FILTER_8TAP_SMOOTH ][idx2][0][0] = \
dsp->mc[idx1][FILTER_8TAP_REGULAR][idx2][0][0] = \
dsp->mc[idx1][FILTER_8TAP_SHARP ][idx2][0][0] = \
... | [
"av_cold void FUNC_0(VP9DSPContext *dsp)\n{",
"#if HAVE_YASM\nint cpu_flags = av_get_cpu_flags();",
"#define init_fpel(idx1, idx2, sz, type, opt) \\\ndsp->mc[idx1][FILTER_8TAP_SMOOTH ][idx2][0][0] = \\\ndsp->mc[idx1][FILTER_8TAP_REGULAR][idx2][0][0] = \\\ndsp->mc[idx1][FILTER_8TAP_SHARP ][idx2][0][0] = \\\ndsp... | [
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
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... | [
[
1,
3
],
[
5,
7
],
[
11,
13,
15,
17,
19,
23,
25
],
[
27
],
[
29,
33,
35
],
[
37,
41,
43
],
[
45
],
[
47
],
[
49,
53,
55
],
[
57
],
[
59,
63
],
[
65
],
[
67... |
7,058 | static void tracked_request_end(BdrvTrackedRequest *req)
{
QLIST_REMOVE(req, list);
} | true | qemu | f4658285f99473367dbbc34ce6970ec4637c2388 | static void tracked_request_end(BdrvTrackedRequest *req)
{
QLIST_REMOVE(req, list);
} | {
"code": [],
"line_no": []
} | static void FUNC_0(BdrvTrackedRequest *VAR_0)
{
QLIST_REMOVE(VAR_0, list);
} | [
"static void FUNC_0(BdrvTrackedRequest *VAR_0)\n{",
"QLIST_REMOVE(VAR_0, list);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
8
]
] |
7,060 | static TranslationBlock *tb_alloc(target_ulong pc)
{
TranslationBlock *tb;
if (tcg_ctx.tb_ctx.nb_tbs >= tcg_ctx.code_gen_max_blocks ||
(tcg_ctx.code_gen_ptr - tcg_ctx.code_gen_buffer) >=
tcg_ctx.code_gen_buffer_max_size) {
return NULL;
}
tb = &tcg_ctx.tb_ctx.tbs[tcg_ct... | true | qemu | b125f9dc7bd68cd4c57189db4da83b0620b28a72 | static TranslationBlock *tb_alloc(target_ulong pc)
{
TranslationBlock *tb;
if (tcg_ctx.tb_ctx.nb_tbs >= tcg_ctx.code_gen_max_blocks ||
(tcg_ctx.code_gen_ptr - tcg_ctx.code_gen_buffer) >=
tcg_ctx.code_gen_buffer_max_size) {
return NULL;
}
tb = &tcg_ctx.tb_ctx.tbs[tcg_ct... | {
"code": [
" if (tcg_ctx.tb_ctx.nb_tbs >= tcg_ctx.code_gen_max_blocks ||",
" (tcg_ctx.code_gen_ptr - tcg_ctx.code_gen_buffer) >=",
" tcg_ctx.code_gen_buffer_max_size) {"
],
"line_no": [
9,
11,
13
]
} | static TranslationBlock *FUNC_0(target_ulong pc)
{
TranslationBlock *tb;
if (tcg_ctx.tb_ctx.nb_tbs >= tcg_ctx.code_gen_max_blocks ||
(tcg_ctx.code_gen_ptr - tcg_ctx.code_gen_buffer) >=
tcg_ctx.code_gen_buffer_max_size) {
return NULL;
}
tb = &tcg_ctx.tb_ctx.tbs[tcg_ctx.... | [
"static TranslationBlock *FUNC_0(target_ulong pc)\n{",
"TranslationBlock *tb;",
"if (tcg_ctx.tb_ctx.nb_tbs >= tcg_ctx.code_gen_max_blocks ||\n(tcg_ctx.code_gen_ptr - tcg_ctx.code_gen_buffer) >=\ntcg_ctx.code_gen_buffer_max_size) {",
"return NULL;",
"}",
"tb = &tcg_ctx.tb_ctx.tbs[tcg_ctx.tb_ctx.nb_tbs++];"... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
7,061 | static void mxf_write_partition(AVFormatContext *s, int bodysid,
int indexsid,
const uint8_t *key, int write_metadata)
{
MXFContext *mxf = s->priv_data;
AVIOContext *pb = s->pb;
int64_t header_byte_count_offset;
unsigned index_byte_c... | true | FFmpeg | e3ba817b95bbdc7c8aaf83b4a6804d1b49eb4de4 | static void mxf_write_partition(AVFormatContext *s, int bodysid,
int indexsid,
const uint8_t *key, int write_metadata)
{
MXFContext *mxf = s->priv_data;
AVIOContext *pb = s->pb;
int64_t header_byte_count_offset;
unsigned index_byte_c... | {
"code": [
" klv_encode_ber_length(pb, 88 + 16 * mxf->essence_container_count);"
],
"line_no": [
65
]
} | static void FUNC_0(AVFormatContext *VAR_0, int VAR_1,
int VAR_2,
const uint8_t *VAR_3, int VAR_4)
{
MXFContext *mxf = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
int64_t header_byte_count_offset;
unsigned VAR_5 = 0;
uint64_t ... | [
"static void FUNC_0(AVFormatContext *VAR_0, int VAR_1,\nint VAR_2,\nconst uint8_t *VAR_3, int VAR_4)\n{",
"MXFContext *mxf = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"int64_t header_byte_count_offset;",
"unsigned VAR_5 = 0;",
"uint64_t partition_offset = avio_tell(pb);",
"if (!mxf->edit_unit_... | [
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
],
[
21,
23,
25
],
[
27,
29
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47,
49,
51,
53
],
[
55
],
[
57
... |
7,062 | static inline void RENAME(yuvPlanartouyvy)(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
//... | false | FFmpeg | 4bff9ef9d0781c4de228bf1f85634d2706fc589b | static inline void RENAME(yuvPlanartouyvy)(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": [],
"line_no": []
} | static inline void FUNC_0(yuvPlanartouyvy)(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(yuvPlanartouyvy)(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++)",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
47,
49,
51,
53,
55,
57,
59,
61,
65,
67,
69,
71,
75,
77,... |
7,063 | static void decodeplane32(uint32_t *dst, const uint8_t *const buf, int buf_size, int bps, int plane)
{
GetBitContext gb;
int i, b;
init_get_bits(&gb, buf, buf_size * 8);
for(i = 0; i < (buf_size * 8 + bps - 1) / bps; i++) {
for (b = 0; b < bps; b++) {
dst[ i*bps + b ] |= get_b... | false | FFmpeg | 473147bed01c0c6c82d85fd79d3e1c1d65542663 | static void decodeplane32(uint32_t *dst, const uint8_t *const buf, int buf_size, int bps, int plane)
{
GetBitContext gb;
int i, b;
init_get_bits(&gb, buf, buf_size * 8);
for(i = 0; i < (buf_size * 8 + bps - 1) / bps; i++) {
for (b = 0; b < bps; b++) {
dst[ i*bps + b ] |= get_b... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint32_t *VAR_0, const uint8_t *const VAR_1, int VAR_2, int VAR_3, int VAR_4)
{
GetBitContext gb;
int VAR_5, VAR_6;
init_get_bits(&gb, VAR_1, VAR_2 * 8);
for(VAR_5 = 0; VAR_5 < (VAR_2 * 8 + VAR_3 - 1) / VAR_3; VAR_5++) {
for (VAR_6 = 0; VAR_6 < VAR_3; VAR_6++) {
... | [
"static void FUNC_0(uint32_t *VAR_0, const uint8_t *const VAR_1, int VAR_2, int VAR_3, int VAR_4)\n{",
"GetBitContext gb;",
"int VAR_5, VAR_6;",
"init_get_bits(&gb, VAR_1, VAR_2 * 8);",
"for(VAR_5 = 0; VAR_5 < (VAR_2 * 8 + VAR_3 - 1) / VAR_3; VAR_5++) {",
"for (VAR_6 = 0; VAR_6 < VAR_3; VAR_6++) {",
"VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
7,064 | static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
{
SWFContext *swf = s->priv_data;
AVIOContext *pb = s->pb;
AVStream *vst = NULL, *ast = NULL, *st = 0;
int tag, len, i, frame, v;
for(;;) {
uint64_t pos = avio_tell(pb);
tag = get_swf_tag(pb, &len);
if (... | false | FFmpeg | add41decd94b2d3581a3715ba10f27168b8cdb1b | static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
{
SWFContext *swf = s->priv_data;
AVIOContext *pb = s->pb;
AVStream *vst = NULL, *ast = NULL, *st = 0;
int tag, len, i, frame, v;
for(;;) {
uint64_t pos = avio_tell(pb);
tag = get_swf_tag(pb, &len);
if (... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
SWFContext *swf = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
AVStream *vst = NULL, *ast = NULL, *st = 0;
int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;
for(;;) {
uint64_t pos = avio_tell(pb);
VAR_2 = get_swf_tag(pb, &... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"SWFContext *swf = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"AVStream *vst = NULL, *ast = NULL, *st = 0;",
"int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;",
"for(;;) {",
"uint64_t pos = avio_tell(pb);",
"VAR_2 = get_swf_tag(pb, &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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
45
],
[
47
],
[
49
... |
7,065 | void qxl_render_update(PCIQXLDevice *qxl)
{
VGACommonState *vga = &qxl->vga;
QXLRect dirty[32], update;
void *ptr;
int i;
if (qxl->guest_primary.resized) {
qxl->guest_primary.resized = 0;
if (qxl->guest_primary.flipped) {
g_free(qxl->guest_primary.flipped);
... | false | qemu | 0e2487bd6f56445b43307536a465ee2ba810aed9 | void qxl_render_update(PCIQXLDevice *qxl)
{
VGACommonState *vga = &qxl->vga;
QXLRect dirty[32], update;
void *ptr;
int i;
if (qxl->guest_primary.resized) {
qxl->guest_primary.resized = 0;
if (qxl->guest_primary.flipped) {
g_free(qxl->guest_primary.flipped);
... | {
"code": [],
"line_no": []
} | void FUNC_0(PCIQXLDevice *VAR_0)
{
VGACommonState *vga = &VAR_0->vga;
QXLRect dirty[32], update;
void *VAR_1;
int VAR_2;
if (VAR_0->guest_primary.resized) {
VAR_0->guest_primary.resized = 0;
if (VAR_0->guest_primary.flipped) {
g_free(VAR_0->guest_primary.flip... | [
"void FUNC_0(PCIQXLDevice *VAR_0)\n{",
"VGACommonState *vga = &VAR_0->vga;",
"QXLRect dirty[32], update;",
"void *VAR_1;",
"int VAR_2;",
"if (VAR_0->guest_primary.resized) {",
"VAR_0->guest_primary.resized = 0;",
"if (VAR_0->guest_primary.flipped) {",
"g_free(VAR_0->guest_primary.flipped);",
"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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[... |
7,067 | static int local_fstat(FsContext *fs_ctx, int fid_type,
V9fsFidOpenState *fs, struct stat *stbuf)
{
int err, fd;
if (fid_type == P9_FID_DIR) {
fd = dirfd(fs->dir);
} else {
fd = fs->fd;
}
err = fstat(fd, stbuf);
if (err) {
return err;... | false | qemu | f8ad4a89e99848a554b0049d7a612f5a585b7231 | static int local_fstat(FsContext *fs_ctx, int fid_type,
V9fsFidOpenState *fs, struct stat *stbuf)
{
int err, fd;
if (fid_type == P9_FID_DIR) {
fd = dirfd(fs->dir);
} else {
fd = fs->fd;
}
err = fstat(fd, stbuf);
if (err) {
return err;... | {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0, int VAR_1,
V9fsFidOpenState *VAR_2, struct stat *VAR_3)
{
int VAR_4, VAR_5;
if (VAR_1 == P9_FID_DIR) {
VAR_5 = dirfd(VAR_2->dir);
} else {
VAR_5 = VAR_2->VAR_5;
}
VAR_4 = fstat(VAR_5, VAR_3);
if (VAR_4) {
... | [
"static int FUNC_0(FsContext *VAR_0, int VAR_1,\nV9fsFidOpenState *VAR_2, struct stat *VAR_3)\n{",
"int VAR_4, VAR_5;",
"if (VAR_1 == P9_FID_DIR) {",
"VAR_5 = dirfd(VAR_2->dir);",
"} else {",
"VAR_5 = VAR_2->VAR_5;",
"}",
"VAR_4 = fstat(VAR_5, VAR_3);",
"if (VAR_4) {",
"return VAR_4;",
"}",
"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
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45,
47
],
[
49
],
[
51... |
7,068 | static uint64_t malta_fpga_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
MaltaFPGAState *s = opaque;
uint32_t val = 0;
uint32_t saddr;
saddr = (addr & 0xfffff);
switch (saddr) {
/* SWITCH Register */
case 0x00200:
val = 0... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t malta_fpga_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
MaltaFPGAState *s = opaque;
uint32_t val = 0;
uint32_t saddr;
saddr = (addr & 0xfffff);
switch (saddr) {
case 0x00200:
val = 0x00000000;
... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,
unsigned size)
{
MaltaFPGAState *s = opaque;
uint32_t val = 0;
uint32_t saddr;
saddr = (addr & 0xfffff);
switch (saddr) {
case 0x00200:
val = 0x00000000;
break;
... | [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,\nunsigned size)\n{",
"MaltaFPGAState *s = opaque;",
"uint32_t val = 0;",
"uint32_t saddr;",
"saddr = (addr & 0xfffff);",
"switch (saddr) {",
"case 0x00200:\nval = 0x00000000;",
"break;",
"case 0x00208:\n#ifdef TARGET_WORDS_BIGENDIAN\nval... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25,
27
],
[
29
],
[
35,
37,
39
],
[
41,
43
],
[
45,
47
],
[
53,
55
],
[
57
],
[
63,
65
],
[
67
],
[
73,... |
7,071 | static void replay_save_event(Event *event, int checkpoint)
{
if (replay_mode != REPLAY_MODE_PLAY) {
/* put the event into the file */
replay_put_event(EVENT_ASYNC);
replay_put_byte(checkpoint);
replay_put_byte(event->event_kind);
/* save event-specific data */
... | false | qemu | 8a354bd935a800dd2d98ac8f30707e2912c80ae6 | static void replay_save_event(Event *event, int checkpoint)
{
if (replay_mode != REPLAY_MODE_PLAY) {
replay_put_event(EVENT_ASYNC);
replay_put_byte(checkpoint);
replay_put_byte(event->event_kind);
switch (event->event_kind) {
default:
... | {
"code": [],
"line_no": []
} | static void FUNC_0(Event *VAR_0, int VAR_1)
{
if (replay_mode != REPLAY_MODE_PLAY) {
replay_put_event(EVENT_ASYNC);
replay_put_byte(VAR_1);
replay_put_byte(VAR_0->event_kind);
switch (VAR_0->event_kind) {
default:
error_report("Unknow... | [
"static void FUNC_0(Event *VAR_0, int VAR_1)\n{",
"if (replay_mode != REPLAY_MODE_PLAY) {",
"replay_put_event(EVENT_ASYNC);",
"replay_put_byte(VAR_1);",
"replay_put_byte(VAR_0->event_kind);",
"switch (VAR_0->event_kind) {",
"default:\nerror_report(\"Unknown ID %d of replay VAR_0\", read_event_kind);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
]
] |
7,072 | static USBDevice *usb_msd_init(USBBus *bus, const char *filename)
{
static int nr=0;
char id[8];
QemuOpts *opts;
DriveInfo *dinfo;
USBDevice *dev;
const char *p1;
char fmt[32];
/* parse -usbdevice disk: syntax into drive opts */
do {
snprintf(id, sizeof(id), "usb... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | static USBDevice *usb_msd_init(USBBus *bus, const char *filename)
{
static int nr=0;
char id[8];
QemuOpts *opts;
DriveInfo *dinfo;
USBDevice *dev;
const char *p1;
char fmt[32];
do {
snprintf(id, sizeof(id), "usb%d", nr++);
opts = qemu_opts_create(qemu_f... | {
"code": [],
"line_no": []
} | static USBDevice *FUNC_0(USBBus *bus, const char *filename)
{
static int VAR_0=0;
char VAR_1[8];
QemuOpts *opts;
DriveInfo *dinfo;
USBDevice *dev;
const char *VAR_2;
char VAR_3[32];
do {
snprintf(VAR_1, sizeof(VAR_1), "usb%d", VAR_0++);
opts = qemu_opts... | [
"static USBDevice *FUNC_0(USBBus *bus, const char *filename)\n{",
"static int VAR_0=0;",
"char VAR_1[8];",
"QemuOpts *opts;",
"DriveInfo *dinfo;",
"USBDevice *dev;",
"const char *VAR_2;",
"char VAR_3[32];",
"do {",
"snprintf(VAR_1, sizeof(VAR_1), \"usb%d\", VAR_0++);",
"opts = qemu_opts_create(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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
7,074 | static size_t handle_aiocb_flush(struct qemu_paiocb *aiocb)
{
int ret;
ret = qemu_fdatasync(aiocb->aio_fildes);
if (ret == -1)
return -errno;
return 0;
}
| false | qemu | 6769da29c7a3caa9de4020db87f495de692cf8e2 | static size_t handle_aiocb_flush(struct qemu_paiocb *aiocb)
{
int ret;
ret = qemu_fdatasync(aiocb->aio_fildes);
if (ret == -1)
return -errno;
return 0;
}
| {
"code": [],
"line_no": []
} | static size_t FUNC_0(struct qemu_paiocb *aiocb)
{
int VAR_0;
VAR_0 = qemu_fdatasync(aiocb->aio_fildes);
if (VAR_0 == -1)
return -errno;
return 0;
}
| [
"static size_t FUNC_0(struct qemu_paiocb *aiocb)\n{",
"int VAR_0;",
"VAR_0 = qemu_fdatasync(aiocb->aio_fildes);",
"if (VAR_0 == -1)\nreturn -errno;",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
17
]
] |
7,075 | static int unin_internal_pci_host_init(PCIDevice *d)
{
pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_APPLE);
pci_config_set_device_id(d->config, PCI_DEVICE_ID_APPLE_UNI_N_I_PCI);
d->config[0x08] = 0x00; // revision
pci_config_set_class(d->config, PCI_CLASS_BRIDGE_HOST);
d->config[0x0C] = 0... | false | qemu | d7b61ecc61f84d23f98f1ee270fb48b41834ca00 | static int unin_internal_pci_host_init(PCIDevice *d)
{
pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_APPLE);
pci_config_set_device_id(d->config, PCI_DEVICE_ID_APPLE_UNI_N_I_PCI);
d->config[0x08] = 0x00;
pci_config_set_class(d->config, PCI_CLASS_BRIDGE_HOST);
d->config[0x0C] = 0x08;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(PCIDevice *VAR_0)
{
pci_config_set_vendor_id(VAR_0->config, PCI_VENDOR_ID_APPLE);
pci_config_set_device_id(VAR_0->config, PCI_DEVICE_ID_APPLE_UNI_N_I_PCI);
VAR_0->config[0x08] = 0x00;
pci_config_set_class(VAR_0->config, PCI_CLASS_BRIDGE_HOST);
VAR_0->config[0x0C] = 0x08;
... | [
"static int FUNC_0(PCIDevice *VAR_0)\n{",
"pci_config_set_vendor_id(VAR_0->config, PCI_VENDOR_ID_APPLE);",
"pci_config_set_device_id(VAR_0->config, PCI_DEVICE_ID_APPLE_UNI_N_I_PCI);",
"VAR_0->config[0x08] = 0x00;",
"pci_config_set_class(VAR_0->config, PCI_CLASS_BRIDGE_HOST);",
"VAR_0->config[0x0C] = 0x08;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
7,077 | static int upload_texture(SDL_Texture *tex, AVFrame *frame, struct SwsContext **img_convert_ctx) {
int ret = 0;
switch (frame->format) {
case AV_PIX_FMT_YUV420P:
if (frame->linesize[0] < 0 || frame->linesize[1] < 0 || frame->linesize[2] < 0) {
av_log(NULL, AV_LOG_ERROR, ... | false | FFmpeg | 493f637d1e933ebdd9f63528a7782d3617c442cb | static int upload_texture(SDL_Texture *tex, AVFrame *frame, struct SwsContext **img_convert_ctx) {
int ret = 0;
switch (frame->format) {
case AV_PIX_FMT_YUV420P:
if (frame->linesize[0] < 0 || frame->linesize[1] < 0 || frame->linesize[2] < 0) {
av_log(NULL, AV_LOG_ERROR, ... | {
"code": [],
"line_no": []
} | static int FUNC_0(SDL_Texture *VAR_0, AVFrame *VAR_1, struct SwsContext **VAR_2) {
int VAR_3 = 0;
switch (VAR_1->format) {
case AV_PIX_FMT_YUV420P:
if (VAR_1->linesize[0] < 0 || VAR_1->linesize[1] < 0 || VAR_1->linesize[2] < 0) {
av_log(NULL, AV_LOG_ERROR, "Negative line... | [
"static int FUNC_0(SDL_Texture *VAR_0, AVFrame *VAR_1, struct SwsContext **VAR_2) {",
"int VAR_3 = 0;",
"switch (VAR_1->format) {",
"case AV_PIX_FMT_YUV420P:\nif (VAR_1->linesize[0] < 0 || VAR_1->linesize[1] < 0 || VAR_1->linesize[2] < 0) {",
"av_log(NULL, AV_LOG_ERROR, \"Negative linesize is not supported ... | [
0,
0,
0,
0,
0,
0,
0,
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,
43,
45,
47
],
[
49
... |
7,079 | static void load_linux(const char *kernel_filename,
const char *initrd_filename,
const char *kernel_cmdline)
{
uint16_t protocol;
uint32_t gpr[8];
uint16_t seg[6];
uint16_t real_seg;
int setup_size, kernel_size, initrd_size, cmdline_size;
uint32_t initrd_max;
uint... | false | qemu | 4fc9af53d88c0a2a810704a06cb39a7182982e4e | static void load_linux(const char *kernel_filename,
const char *initrd_filename,
const char *kernel_cmdline)
{
uint16_t protocol;
uint32_t gpr[8];
uint16_t seg[6];
uint16_t real_seg;
int setup_size, kernel_size, initrd_size, cmdline_size;
uint32_t initrd_max;
uint... | {
"code": [],
"line_no": []
} | static void FUNC_0(const char *VAR_0,
const char *VAR_1,
const char *VAR_2)
{
uint16_t protocol;
uint32_t gpr[8];
uint16_t seg[6];
uint16_t real_seg;
int VAR_3, VAR_4, VAR_5, VAR_6;
uint32_t initrd_max;
uint8_t header[1024];
target_phys_addr_t real_addr, prot... | [
"static void FUNC_0(const char *VAR_0,\nconst char *VAR_1,\nconst char *VAR_2)\n{",
"uint16_t protocol;",
"uint32_t gpr[8];",
"uint16_t seg[6];",
"uint16_t real_seg;",
"int VAR_3, VAR_4, VAR_5, VAR_6;",
"uint32_t initrd_max;",
"uint8_t header[1024];",
"target_phys_addr_t real_addr, prot_addr, cmdlin... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
37
],
[
39,
41
],
[
43,
45
],
[
47
],
[
49
],
[
55,
57
],
[... |
7,080 | static void gen_neon_zip_u8(TCGv t0, TCGv t1)
{
TCGv rd, rm, tmp;
rd = new_tmp();
rm = new_tmp();
tmp = new_tmp();
tcg_gen_andi_i32(rd, t0, 0xff);
tcg_gen_shli_i32(tmp, t1, 8);
tcg_gen_andi_i32(tmp, tmp, 0xff00);
tcg_gen_or_i32(rd, rd, tmp);
tcg_gen_shli_i32(tmp, t0, 16... | false | qemu | d68a6f3a6deb2f5eee198b6fa46877a20227d86e | static void gen_neon_zip_u8(TCGv t0, TCGv t1)
{
TCGv rd, rm, tmp;
rd = new_tmp();
rm = new_tmp();
tmp = new_tmp();
tcg_gen_andi_i32(rd, t0, 0xff);
tcg_gen_shli_i32(tmp, t1, 8);
tcg_gen_andi_i32(tmp, tmp, 0xff00);
tcg_gen_or_i32(rd, rd, tmp);
tcg_gen_shli_i32(tmp, t0, 16... | {
"code": [],
"line_no": []
} | static void FUNC_0(TCGv VAR_0, TCGv VAR_1)
{
TCGv rd, rm, tmp;
rd = new_tmp();
rm = new_tmp();
tmp = new_tmp();
tcg_gen_andi_i32(rd, VAR_0, 0xff);
tcg_gen_shli_i32(tmp, VAR_1, 8);
tcg_gen_andi_i32(tmp, tmp, 0xff00);
tcg_gen_or_i32(rd, rd, tmp);
tcg_gen_shli_i32(tmp, VAR... | [
"static void FUNC_0(TCGv VAR_0, TCGv VAR_1)\n{",
"TCGv rd, rm, tmp;",
"rd = new_tmp();",
"rm = new_tmp();",
"tmp = new_tmp();",
"tcg_gen_andi_i32(rd, VAR_0, 0xff);",
"tcg_gen_shli_i32(tmp, VAR_1, 8);",
"tcg_gen_andi_i32(tmp, tmp, 0xff00);",
"tcg_gen_or_i32(rd, rd, tmp);",
"tcg_gen_shli_i32(tmp, 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
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47... |
7,081 | static boolean jpeg_empty_output_buffer(j_compress_ptr cinfo)
{
VncState *vs = cinfo->client_data;
Buffer *buffer = &vs->tight_jpeg;
buffer->offset = buffer->capacity;
buffer_reserve(buffer, 2048);
jpeg_init_destination(cinfo);
return TRUE;
}
| false | qemu | 245f7b51c0ea04fb2224b1127430a096c91aee70 | static boolean jpeg_empty_output_buffer(j_compress_ptr cinfo)
{
VncState *vs = cinfo->client_data;
Buffer *buffer = &vs->tight_jpeg;
buffer->offset = buffer->capacity;
buffer_reserve(buffer, 2048);
jpeg_init_destination(cinfo);
return TRUE;
}
| {
"code": [],
"line_no": []
} | static boolean FUNC_0(j_compress_ptr cinfo)
{
VncState *vs = cinfo->client_data;
Buffer *buffer = &vs->tight_jpeg;
buffer->offset = buffer->capacity;
buffer_reserve(buffer, 2048);
jpeg_init_destination(cinfo);
return TRUE;
}
| [
"static boolean FUNC_0(j_compress_ptr cinfo)\n{",
"VncState *vs = cinfo->client_data;",
"Buffer *buffer = &vs->tight_jpeg;",
"buffer->offset = buffer->capacity;",
"buffer_reserve(buffer, 2048);",
"jpeg_init_destination(cinfo);",
"return TRUE;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.