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 |
|---|---|---|---|---|---|---|---|---|---|---|
20,748 | static int coroutine_fn blkreplay_co_discard(BlockDriverState *bs,
int64_t sector_num, int nb_sectors)
{
uint64_t reqid = request_id++;
int ret = bdrv_co_discard(bs->file->bs, sector_num, nb_sectors);
block_request_create(reqid, bs, qemu_coroutine_self());
qemu_coroutine_yield();
return... | false | qemu | 9f1963b3f72521f75a549f8afd61b19e7da63c6f | static int coroutine_fn blkreplay_co_discard(BlockDriverState *bs,
int64_t sector_num, int nb_sectors)
{
uint64_t reqid = request_id++;
int ret = bdrv_co_discard(bs->file->bs, sector_num, nb_sectors);
block_request_create(reqid, bs, qemu_coroutine_self());
qemu_coroutine_yield();
return... | {
"code": [],
"line_no": []
} | static int VAR_0 blkreplay_co_discard(BlockDriverState *bs,
int64_t sector_num, int nb_sectors)
{
uint64_t reqid = request_id++;
int ret = bdrv_co_discard(bs->file->bs, sector_num, nb_sectors);
block_request_create(reqid, bs, qemu_coroutine_self());
qemu_coroutine_yield();
return ret;
... | [
"static int VAR_0 blkreplay_co_discard(BlockDriverState *bs,\nint64_t sector_num, int nb_sectors)\n{",
"uint64_t reqid = request_id++;",
"int ret = bdrv_co_discard(bs->file->bs, sector_num, nb_sectors);",
"block_request_create(reqid, bs, qemu_coroutine_self());",
"qemu_coroutine_yield();",
"return ret;",
... | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
]
] |
20,749 | static inline uint32_t ldl_phys_internal(hwaddr addr,
enum device_endian endian)
{
uint8_t *ptr;
uint32_t val;
MemoryRegionSection *section;
section = phys_page_find(address_space_memory.dispatch, addr >> TARGET_PAGE_BITS);
if (!(memory_region_is_r... | false | qemu | 149f54b53b7666a3facd45e86eece60ce7d3b114 | static inline uint32_t ldl_phys_internal(hwaddr addr,
enum device_endian endian)
{
uint8_t *ptr;
uint32_t val;
MemoryRegionSection *section;
section = phys_page_find(address_space_memory.dispatch, addr >> TARGET_PAGE_BITS);
if (!(memory_region_is_r... | {
"code": [],
"line_no": []
} | static inline uint32_t FUNC_0(hwaddr addr,
enum device_endian endian)
{
uint8_t *ptr;
uint32_t val;
MemoryRegionSection *section;
section = phys_page_find(address_space_memory.dispatch, addr >> TARGET_PAGE_BITS);
if (!(memory_region_is_ram(section-... | [
"static inline uint32_t FUNC_0(hwaddr addr,\nenum device_endian endian)\n{",
"uint8_t *ptr;",
"uint32_t val;",
"MemoryRegionSection *section;",
"section = phys_page_find(address_space_memory.dispatch, addr >> TARGET_PAGE_BITS);",
"if (!(memory_region_is_ram(section->mr) ||\nmemory_region_is_romd(section->... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19,
21
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45,
47
],
[
51,
53,
55
],
[... |
20,750 | int ne2000_can_receive(NetClientState *nc)
{
NE2000State *s = qemu_get_nic_opaque(nc);
if (s->cmd & E8390_STOP)
return 1;
return !ne2000_buffer_full(s);
}
| false | qemu | c5a93780453e6da919287c17e873c843544ef2a3 | int ne2000_can_receive(NetClientState *nc)
{
NE2000State *s = qemu_get_nic_opaque(nc);
if (s->cmd & E8390_STOP)
return 1;
return !ne2000_buffer_full(s);
}
| {
"code": [],
"line_no": []
} | int FUNC_0(NetClientState *VAR_0)
{
NE2000State *s = qemu_get_nic_opaque(VAR_0);
if (s->cmd & E8390_STOP)
return 1;
return !ne2000_buffer_full(s);
}
| [
"int FUNC_0(NetClientState *VAR_0)\n{",
"NE2000State *s = qemu_get_nic_opaque(VAR_0);",
"if (s->cmd & E8390_STOP)\nreturn 1;",
"return !ne2000_buffer_full(s);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
],
[
15
]
] |
20,752 | static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pic, int *got_packet)
{
ProresContext *ctx = avctx->priv_data;
uint8_t *orig_buf, *buf, *slice_hdr, *slice_sizes, *tmp;
uint8_t *picture_size_pos;
PutBitContext pb;
int x, y, i, mb, q = 0;
... | false | FFmpeg | 6d702dc072ffc255cd0f709132e55661698313e7 | static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pic, int *got_packet)
{
ProresContext *ctx = avctx->priv_data;
uint8_t *orig_buf, *buf, *slice_hdr, *slice_sizes, *tmp;
uint8_t *picture_size_pos;
PutBitContext pb;
int x, y, i, mb, q = 0;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,
const AVFrame *VAR_2, int *VAR_3)
{
ProresContext *ctx = VAR_0->priv_data;
uint8_t *orig_buf, *buf, *slice_hdr, *slice_sizes, *tmp;
uint8_t *picture_size_pos;
PutBitContext pb;
int VAR_4, VAR_5, VAR_6, VAR_7, VA... | [
"static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,\nconst AVFrame *VAR_2, int *VAR_3)\n{",
"ProresContext *ctx = VAR_0->priv_data;",
"uint8_t *orig_buf, *buf, *slice_hdr, *slice_sizes, *tmp;",
"uint8_t *picture_size_pos;",
"PutBitContext pb;",
"int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8 = 0;",
"int V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37,
39
],
[
43
],
[
45
],
[
47
],
[
49
... |
20,753 | static int epzs_motion_search4(MpegEncContext * s, int block,
int *mx_ptr, int *my_ptr,
int P[6][2], int pred_x, int pred_y,
int xmin, int ymin, int xmax, int ymax, uint8_t *ref_picture)
{
int best[2]={0, 0};
int d, dmi... | false | FFmpeg | 0d21a84605bad4e75dacb8196e5859902ed36f01 | static int epzs_motion_search4(MpegEncContext * s, int block,
int *mx_ptr, int *my_ptr,
int P[6][2], int pred_x, int pred_y,
int xmin, int ymin, int xmax, int ymax, uint8_t *ref_picture)
{
int best[2]={0, 0};
int d, dmi... | {
"code": [],
"line_no": []
} | static int FUNC_0(MpegEncContext * VAR_0, int VAR_1,
int *VAR_2, int *VAR_3,
int VAR_4[6][2], int VAR_5, int VAR_6,
int VAR_7, int VAR_8, int VAR_9, int VAR_10, uint8_t *VAR_11)
{
int VAR_12[2]={0, 0};
int VAR_13, VAR_1... | [
"static int FUNC_0(MpegEncContext * VAR_0, int VAR_1,\nint *VAR_2, int *VAR_3,\nint VAR_4[6][2], int VAR_5, int VAR_6,\nint VAR_7, int VAR_8, int VAR_9, int VAR_10, uint8_t *VAR_11)\n{",
"int VAR_12[2]={0, 0};",
"int VAR_13, VAR_14;",
"UINT8 *new_pic, *old_pic;",
"const int VAR_15= VAR_0->linesize;",
"con... | [
0,
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
],
[
29
],
[
31
],
[
35
],
[
41
],
[
43,
45
],
[
47,
49
],
[
51
],
[
53
],
[... |
20,754 | static int ffm_write_write_index(int fd, int64_t pos)
{
uint8_t buf[8];
int i;
for(i=0;i<8;i++)
buf[i] = (pos >> (56 - i * 8)) & 0xff;
lseek(fd, 8, SEEK_SET);
if (write(fd, buf, 8) != 8)
return AVERROR(EIO);
return 8;
}
| false | FFmpeg | 378a5b9c5f1a8b51dee3b954713d18f330fbb027 | static int ffm_write_write_index(int fd, int64_t pos)
{
uint8_t buf[8];
int i;
for(i=0;i<8;i++)
buf[i] = (pos >> (56 - i * 8)) & 0xff;
lseek(fd, 8, SEEK_SET);
if (write(fd, buf, 8) != 8)
return AVERROR(EIO);
return 8;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(int VAR_0, int64_t VAR_1)
{
uint8_t buf[8];
int VAR_2;
for(VAR_2=0;VAR_2<8;VAR_2++)
buf[VAR_2] = (VAR_1 >> (56 - VAR_2 * 8)) & 0xff;
lseek(VAR_0, 8, SEEK_SET);
if (write(VAR_0, buf, 8) != 8)
return AVERROR(EIO);
return 8;
}
| [
"static int FUNC_0(int VAR_0, int64_t VAR_1)\n{",
"uint8_t buf[8];",
"int VAR_2;",
"for(VAR_2=0;VAR_2<8;VAR_2++)",
"buf[VAR_2] = (VAR_1 >> (56 - VAR_2 * 8)) & 0xff;",
"lseek(VAR_0, 8, SEEK_SET);",
"if (write(VAR_0, buf, 8) != 8)\nreturn AVERROR(EIO);",
"return 8;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23
]
] |
20,755 | static void rv34_output_i16x16(RV34DecContext *r, int8_t *intra_types, int cbp)
{
LOCAL_ALIGNED_16(DCTELEM, block16, [16]);
MpegEncContext *s = &r->s;
GetBitContext *gb = &s->gb;
int q_dc = rv34_qscale_tab[ r->luma_dc_quant_i[s->qscale] ],
q_ac = rv34_qscale_t... | false | FFmpeg | 294c05ce8a7fbe3de74023065c264c1d720ec3cd | static void rv34_output_i16x16(RV34DecContext *r, int8_t *intra_types, int cbp)
{
LOCAL_ALIGNED_16(DCTELEM, block16, [16]);
MpegEncContext *s = &r->s;
GetBitContext *gb = &s->gb;
int q_dc = rv34_qscale_tab[ r->luma_dc_quant_i[s->qscale] ],
q_ac = rv34_qscale_t... | {
"code": [],
"line_no": []
} | static void FUNC_0(RV34DecContext *VAR_0, int8_t *VAR_1, int VAR_2)
{
LOCAL_ALIGNED_16(DCTELEM, block16, [16]);
MpegEncContext *s = &VAR_0->s;
GetBitContext *gb = &s->gb;
int VAR_3 = rv34_qscale_tab[ VAR_0->luma_dc_quant_i[s->qscale] ],
VAR_4 = rv34_qscale_tab... | [
"static void FUNC_0(RV34DecContext *VAR_0, int8_t *VAR_1, int VAR_2)\n{",
"LOCAL_ALIGNED_16(DCTELEM, block16, [16]);",
"MpegEncContext *s = &VAR_0->s;",
"GetBitContext *gb = &s->gb;",
"int VAR_3 = rv34_qscale_tab[ VAR_0->luma_dc_quant_i[s->qscale] ],\nVAR_4 = rv34_qscale_tab[s->qscale];",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31,
33
],
[
35,
37
],
[
39,
41
],
[
43,
45
],
[
47,
49
],
[
51,
53
],
[... |
20,756 | STATIC void DEF(put, pixels8_xy2)(uint8_t *block, const uint8_t *pixels,
ptrdiff_t line_size, int h)
{
MOVQ_ZERO(mm7);
SET_RND(mm6); // =2 for rnd and =1 for no_rnd version
__asm__ volatile(
"movq (%1), %%mm0 \n\t"
"movq 1(%1), %%mm4... | false | FFmpeg | 308e7484a3b1954072871a4090e5c672d1097fa5 | STATIC void DEF(put, pixels8_xy2)(uint8_t *block, const uint8_t *pixels,
ptrdiff_t line_size, int h)
{
MOVQ_ZERO(mm7);
SET_RND(mm6);
__asm__ volatile(
"movq (%1), %%mm0 \n\t"
"movq 1(%1), %%mm4 \n\t"
"movq %%mm0,... | {
"code": [],
"line_no": []
} | STATIC void FUNC_0(put, pixels8_xy2)(uint8_t *block, const uint8_t *pixels,
ptrdiff_t line_size, int h)
{
MOVQ_ZERO(mm7);
SET_RND(mm6);
__asm__ volatile(
"movq (%1), %%mm0 \n\t"
"movq 1(%1), %%mm4 \n\t"
"movq %%m... | [
"STATIC void FUNC_0(put, pixels8_xy2)(uint8_t *block, const uint8_t *pixels,\nptrdiff_t line_size, int h)\n{",
"MOVQ_ZERO(mm7);",
"SET_RND(mm6);",
"__asm__ volatile(\n\"movq (%1), %%mm0 \\n\\t\"\n\"movq 1(%1), %%mm4 \\n\\t\"\n\"movq %%mm0, %%mm1 \\n\\t\"\n\"movq %%mm4... | [
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11,
13,
15,
17,
19,
21,
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,
61,
63,
65,
67,
69,
71,
73,... |
20,757 | static int atrac1_decode_frame(AVCodecContext *avctx, void *data,
int *data_size, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AT1Ctx *q = avctx->priv_data;
int ch, ret, i;
GetBitContext gb;
float* samples ... | false | FFmpeg | 33684b9c12b74c0140fb91e8150263db4a48d55e | static int atrac1_decode_frame(AVCodecContext *avctx, void *data,
int *data_size, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AT1Ctx *q = avctx->priv_data;
int ch, ret, i;
GetBitContext gb;
float* samples ... | {
"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;
AT1Ctx *q = VAR_0->priv_data;
int VAR_6, VAR_7, VAR_8;
GetBitContext gb;
float* VAR_9 = VAR_1;
... | [
"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;",
"AT1Ctx *q = VAR_0->priv_data;",
"int VAR_6, VAR_7, VAR_8;",
"GetBitContext gb;",
"float* VAR_9 = VAR_1;",
"if (VAR_5 < 212 * 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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
45
],
[
47,
49
],
[
53
],
[
55,
57
],
[... |
20,758 | static void virgl_cmd_submit_3d(VirtIOGPU *g,
struct virtio_gpu_ctrl_command *cmd)
{
struct virtio_gpu_cmd_submit cs;
void *buf;
size_t s;
VIRTIO_GPU_FILL_CMD(cs);
trace_virtio_gpu_cmd_ctx_submit(cs.hdr.ctx_id, cs.size);
buf = g_malloc(cs.size);
s... | true | qemu | 8d94c1ca53c638f6ec76840b0cb24677fb7705bf | static void virgl_cmd_submit_3d(VirtIOGPU *g,
struct virtio_gpu_ctrl_command *cmd)
{
struct virtio_gpu_cmd_submit cs;
void *buf;
size_t s;
VIRTIO_GPU_FILL_CMD(cs);
trace_virtio_gpu_cmd_ctx_submit(cs.hdr.ctx_id, cs.size);
buf = g_malloc(cs.size);
s... | {
"code": [],
"line_no": []
} | static void FUNC_0(VirtIOGPU *VAR_0,
struct virtio_gpu_ctrl_command *VAR_1)
{
struct virtio_gpu_cmd_submit VAR_2;
void *VAR_3;
size_t s;
VIRTIO_GPU_FILL_CMD(VAR_2);
trace_virtio_gpu_cmd_ctx_submit(VAR_2.hdr.ctx_id, VAR_2.size);
VAR_3 = g_malloc(VAR_2.s... | [
"static void FUNC_0(VirtIOGPU *VAR_0,\nstruct virtio_gpu_ctrl_command *VAR_1)\n{",
"struct virtio_gpu_cmd_submit VAR_2;",
"void *VAR_3;",
"size_t s;",
"VIRTIO_GPU_FILL_CMD(VAR_2);",
"trace_virtio_gpu_cmd_ctx_submit(VAR_2.hdr.ctx_id, VAR_2.size);",
"VAR_3 = g_malloc(VAR_2.size);",
"s = iov_to_buf(VAR_1... | [
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,
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[... |
20,759 | static int scsi_write_data(SCSIRequest *req)
{
SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req);
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
uint32_t n;
/* No data transfer may already be in progress */
assert(r->req.aiocb == NULL);
n = r->iov.iov_len / 512;
i... | true | qemu | a1f0cce2ac0243572ff72aa561da67fe3766a395 | static int scsi_write_data(SCSIRequest *req)
{
SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req);
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
uint32_t n;
assert(r->req.aiocb == NULL);
n = r->iov.iov_len / 512;
if (n) {
qemu_iovec_init_external(&r->qio... | {
"code": [
" scsi_write_complete(r, -EIO);"
],
"line_no": [
31
]
} | static int FUNC_0(SCSIRequest *VAR_0)
{
SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, VAR_0, VAR_0);
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->VAR_0.dev);
uint32_t n;
assert(r->VAR_0.aiocb == NULL);
n = r->iov.iov_len / 512;
if (n) {
qemu_iovec_init_external(&r->qi... | [
"static int FUNC_0(SCSIRequest *VAR_0)\n{",
"SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, VAR_0, VAR_0);",
"SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->VAR_0.dev);",
"uint32_t n;",
"assert(r->VAR_0.aiocb == NULL);",
"n = r->iov.iov_len / 512;",
"if (n) {",
"qemu_iovec_init_external(&r->qiov, &r->i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47
]
] |
20,760 | static int create_dynamic_disk(BlockBackend *blk, uint8_t *buf,
int64_t total_sectors)
{
VHDDynDiskHeader *dyndisk_header =
(VHDDynDiskHeader *) buf;
size_t block_size, num_bat_entries;
int i;
int ret;
int64_t offset = 0;
// Write the footer (twi... | true | qemu | 40a99aace3f9ffd65af07a89c381db3550b22316 | static int create_dynamic_disk(BlockBackend *blk, uint8_t *buf,
int64_t total_sectors)
{
VHDDynDiskHeader *dyndisk_header =
(VHDDynDiskHeader *) buf;
size_t block_size, num_bat_entries;
int i;
int ret;
int64_t offset = 0;
block_size = 0x200... | {
"code": [
" if (ret) {"
],
"line_no": [
31
]
} | static int FUNC_0(BlockBackend *VAR_0, uint8_t *VAR_1,
int64_t VAR_2)
{
VHDDynDiskHeader *dyndisk_header =
(VHDDynDiskHeader *) VAR_1;
size_t block_size, num_bat_entries;
int VAR_3;
int VAR_4;
int64_t offset = 0;
block_size = 0x200000;
... | [
"static int FUNC_0(BlockBackend *VAR_0, uint8_t *VAR_1,\nint64_t VAR_2)\n{",
"VHDDynDiskHeader *dyndisk_header =\n(VHDDynDiskHeader *) VAR_1;",
"size_t block_size, num_bat_entries;",
"int VAR_3;",
"int VAR_4;",
"int64_t offset = 0;",
"block_size = 0x200000;",
"num_bat_entries = (VAR_2 + block_size / 5... | [
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
] | [
[
1,
3,
5
],
[
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
53
],
[
57
... |
20,762 | static int vmdk_is_cid_valid(BlockDriverState *bs)
{
BDRVVmdkState *s = bs->opaque;
uint32_t cur_pcid;
if (!s->cid_checked && bs->backing) {
BlockDriverState *p_bs = bs->backing->bs;
cur_pcid = vmdk_read_cid(p_bs, 0);
if (s->parent_cid != cur_pcid) {
/* CID no... | true | qemu | 9877860e7bd1e26ee70ab9bb5ebc34c92bf23bf5 | static int vmdk_is_cid_valid(BlockDriverState *bs)
{
BDRVVmdkState *s = bs->opaque;
uint32_t cur_pcid;
if (!s->cid_checked && bs->backing) {
BlockDriverState *p_bs = bs->backing->bs;
cur_pcid = vmdk_read_cid(p_bs, 0);
if (s->parent_cid != cur_pcid) {
... | {
"code": [
" cur_pcid = vmdk_read_cid(p_bs, 0);"
],
"line_no": [
17
]
} | static int FUNC_0(BlockDriverState *VAR_0)
{
BDRVVmdkState *s = VAR_0->opaque;
uint32_t cur_pcid;
if (!s->cid_checked && VAR_0->backing) {
BlockDriverState *p_bs = VAR_0->backing->VAR_0;
cur_pcid = vmdk_read_cid(p_bs, 0);
if (s->parent_cid != cur_pcid) {
... | [
"static int FUNC_0(BlockDriverState *VAR_0)\n{",
"BDRVVmdkState *s = VAR_0->opaque;",
"uint32_t cur_pcid;",
"if (!s->cid_checked && VAR_0->backing) {",
"BlockDriverState *p_bs = VAR_0->backing->VAR_0;",
"cur_pcid = vmdk_read_cid(p_bs, 0);",
"if (s->parent_cid != cur_pcid) {",
"return 0;",
"}",
"}"... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
]
] |
20,763 | static inline int mpeg2_decode_block_intra(MpegEncContext *s, int16_t *block, int n)
{
int level, dc, diff, i, j, run;
int component;
RLTable *rl;
uint8_t * const scantable = s->intra_scantable.permutated;
const uint16_t *quant_matrix;
const int qscale = s->qscale;
int mismatch;
... | true | FFmpeg | 6d93307f8df81808f0dcdbc064b848054a6e83b3 | static inline int mpeg2_decode_block_intra(MpegEncContext *s, int16_t *block, int n)
{
int level, dc, diff, i, j, run;
int component;
RLTable *rl;
uint8_t * const scantable = s->intra_scantable.permutated;
const uint16_t *quant_matrix;
const int qscale = s->qscale;
int mismatch;
... | {
"code": [
" if (i > 63) {",
" av_log(s->avctx, AV_LOG_ERROR, \"ac-tex damaged at %d %d\\n\", s->mb_x, s->mb_y);",
" return -1;",
" if (i > 63) {",
" av_log(s->avctx, AV_LOG_ERROR, \"ac-tex damaged at %d %d\\n\", s->mb_x, s->mb_y)... | static inline int FUNC_0(MpegEncContext *VAR_0, int16_t *VAR_1, int VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;
int VAR_9;
RLTable *rl;
uint8_t * const scantable = VAR_0->intra_scantable.permutated;
const uint16_t *VAR_10;
const int VAR_11 = VAR_0->VAR_11;
int VAR_12;
... | [
"static inline int FUNC_0(MpegEncContext *VAR_0, int16_t *VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;",
"int VAR_9;",
"RLTable *rl;",
"uint8_t * const scantable = VAR_0->intra_scantable.permutated;",
"const uint16_t *VAR_10;",
"const int VAR_11 = VAR_0->VAR_11;",
"int VAR_12;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[... |
20,764 | PPC_OP(test_ctr_true)
{
T0 = (regs->ctr != 0 && (T0 & PARAM(1)) != 0);
RETURN();
}
| true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | PPC_OP(test_ctr_true)
{
T0 = (regs->ctr != 0 && (T0 & PARAM(1)) != 0);
RETURN();
}
| {
"code": [
"PPC_OP(test_ctr_true)",
" T0 = (regs->ctr != 0 && (T0 & PARAM(1)) != 0);",
" RETURN();",
" RETURN();"
],
"line_no": [
1,
5,
7,
7
]
} | FUNC_0(VAR_0)
{
T0 = (regs->ctr != 0 && (T0 & PARAM(1)) != 0);
RETURN();
}
| [
"FUNC_0(VAR_0)\n{",
"T0 = (regs->ctr != 0 && (T0 & PARAM(1)) != 0);",
"RETURN();",
"}"
] | [
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
20,765 | static inline int mov_stsc_index_valid(int index, int count)
{
return index + 1 < count;
}
| true | FFmpeg | 53ea595eec984e3109310e8bb7ff4b5786d91057 | static inline int mov_stsc_index_valid(int index, int count)
{
return index + 1 < count;
}
| {
"code": [
"static inline int mov_stsc_index_valid(int index, int count)",
" return index + 1 < count;"
],
"line_no": [
1,
5
]
} | static inline int FUNC_0(int VAR_0, int VAR_1)
{
return VAR_0 + 1 < VAR_1;
}
| [
"static inline int FUNC_0(int VAR_0, int VAR_1)\n{",
"return VAR_0 + 1 < VAR_1;",
"}"
] | [
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
20,767 | static void init_proc_POWER7 (CPUPPCState *env)
{
gen_spr_ne_601(env);
gen_spr_7xx(env);
/* Time base */
gen_tbl(env);
/* Processor identification */
spr_register(env, SPR_PIR, "PIR",
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_pir,
... | true | qemu | f80872e21c07edd06eb343eeeefc8af404b518a6 | static void init_proc_POWER7 (CPUPPCState *env)
{
gen_spr_ne_601(env);
gen_spr_7xx(env);
gen_tbl(env);
spr_register(env, SPR_PIR, "PIR",
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_pir,
0x00000000);
#if !defined(CONFIG... | {
"code": [],
"line_no": []
} | static void FUNC_0 (CPUPPCState *VAR_0)
{
gen_spr_ne_601(VAR_0);
gen_spr_7xx(VAR_0);
gen_tbl(VAR_0);
spr_register(VAR_0, SPR_PIR, "PIR",
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_pir,
0x00000000);
#if !defined(CONFIG... | [
"static void FUNC_0 (CPUPPCState *VAR_0)\n{",
"gen_spr_ne_601(VAR_0);",
"gen_spr_7xx(VAR_0);",
"gen_tbl(VAR_0);",
"spr_register(VAR_0, SPR_PIR, \"PIR\",\nSPR_NOACCESS, SPR_NOACCESS,\n&spr_read_generic, &spr_write_pir,\n0x00000000);",
"#if !defined(CONFIG_USER_ONLY)\nspr_register_kvm(VAR_0, SPR_PURR, \"P... | [
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
],
[
15,
17,
19,
21
],
[
23,
27,
29,
31,
33
],
[
35,
37,
39,
41
],
[
43,
45,
47,
49
],
[
51,
53,
55,
57
],
[
59,
65,
67,
69,
71... |
20,768 | void spapr_events_init(sPAPREnvironment *spapr)
{
spapr->epow_irq = spapr_allocate_msi(0);
spapr->epow_notifier.notify = spapr_powerdown_req;
qemu_register_powerdown_notifier(&spapr->epow_notifier);
spapr_rtas_register("check-exception", check_exception);
}
| true | qemu | 3a3b8502e6f0c8d30865c5f36d2c3ae4114000b5 | void spapr_events_init(sPAPREnvironment *spapr)
{
spapr->epow_irq = spapr_allocate_msi(0);
spapr->epow_notifier.notify = spapr_powerdown_req;
qemu_register_powerdown_notifier(&spapr->epow_notifier);
spapr_rtas_register("check-exception", check_exception);
}
| {
"code": [
" spapr_rtas_register(\"check-exception\", check_exception);"
],
"line_no": [
11
]
} | void FUNC_0(sPAPREnvironment *VAR_0)
{
VAR_0->epow_irq = spapr_allocate_msi(0);
VAR_0->epow_notifier.notify = spapr_powerdown_req;
qemu_register_powerdown_notifier(&VAR_0->epow_notifier);
spapr_rtas_register("check-exception", check_exception);
}
| [
"void FUNC_0(sPAPREnvironment *VAR_0)\n{",
"VAR_0->epow_irq = spapr_allocate_msi(0);",
"VAR_0->epow_notifier.notify = spapr_powerdown_req;",
"qemu_register_powerdown_notifier(&VAR_0->epow_notifier);",
"spapr_rtas_register(\"check-exception\", check_exception);",
"}"
] | [
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
20,769 | target_ulong helper_add_suov(CPUTriCoreState *env, target_ulong r1,
target_ulong r2)
{
int64_t t1 = extract64(r1, 0, 32);
int64_t t2 = extract64(r2, 0, 32);
int64_t result = t1 + t2;
return suov32(env, result);
}
| true | qemu | 85d604af5f96c32734af9974ec6ddb625b6716a2 | target_ulong helper_add_suov(CPUTriCoreState *env, target_ulong r1,
target_ulong r2)
{
int64_t t1 = extract64(r1, 0, 32);
int64_t t2 = extract64(r2, 0, 32);
int64_t result = t1 + t2;
return suov32(env, result);
}
| {
"code": [
" return suov32(env, result);",
" return suov32(env, result);",
" return suov32(env, result);",
" return suov32(env, result);",
" return suov32(env, result);"
],
"line_no": [
13,
13,
13,
13,
13
]
} | target_ulong FUNC_0(CPUTriCoreState *env, target_ulong r1,
target_ulong r2)
{
int64_t t1 = extract64(r1, 0, 32);
int64_t t2 = extract64(r2, 0, 32);
int64_t result = t1 + t2;
return suov32(env, result);
}
| [
"target_ulong FUNC_0(CPUTriCoreState *env, target_ulong r1,\ntarget_ulong r2)\n{",
"int64_t t1 = extract64(r1, 0, 32);",
"int64_t t2 = extract64(r2, 0, 32);",
"int64_t result = t1 + t2;",
"return suov32(env, result);",
"}"
] | [
0,
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
20,770 | static void pcspk_class_initfn(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = pcspk_realizefn;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->no_user = 1;
dc->props = pcspk_properties;
}
| true | qemu | efec3dd631d94160288392721a5f9c39e50fb2bc | static void pcspk_class_initfn(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = pcspk_realizefn;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->no_user = 1;
dc->props = pcspk_properties;
}
| {
"code": [
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;"... | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
dc->realize = pcspk_realizefn;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->no_user = 1;
dc->props = pcspk_properties;
}
| [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"dc->realize = pcspk_realizefn;",
"set_bit(DEVICE_CATEGORY_SOUND, dc->categories);",
"dc->no_user = 1;",
"dc->props = pcspk_properties;",
"}"
] | [
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
20,771 | static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
{
AVFrame *frame = data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
ZmbvContext * const c = avctx->priv_data;
int zret = Z_OK; // Zlib return code
int len = buf_size;
int hi... | false | FFmpeg | f929ab0569ff31ed5a59b0b0adb7ce09df3fca39 | static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
{
AVFrame *frame = data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
ZmbvContext * const c = avctx->priv_data;
int zret = Z_OK;
int len = buf_size;
int hi_ver, lo_ver, ret;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2, AVPacket *VAR_3)
{
AVFrame *frame = VAR_1;
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
ZmbvContext * const c = VAR_0->priv_data;
int VAR_6 = Z_OK;
int VAR_7 = VAR_5;
int VAR_8, VAR_9, VAR_10;
ui... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2, AVPacket *VAR_3)\n{",
"AVFrame *frame = VAR_1;",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"ZmbvContext * const c = VAR_0->priv_data;",
"int VAR_6 = Z_OK;",
"int VAR_7 = VAR_5;",
"int VAR_8, VAR_9, VAR_10;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
29
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
20,774 | static int build_filter(ResampleContext *c, void *filter, double factor, int tap_count, int alloc, int phase_count, int scale,
int filter_type, double kaiser_beta){
int ph, i;
double x, y, w, t;
double *tab = av_malloc_array(tap_count+1, sizeof(*tab));
const int center= (ta... | false | FFmpeg | b87ca4bf25a3b5a0cac76fb8b3a7ab3bc0fd9882 | static int build_filter(ResampleContext *c, void *filter, double factor, int tap_count, int alloc, int phase_count, int scale,
int filter_type, double kaiser_beta){
int ph, i;
double x, y, w, t;
double *tab = av_malloc_array(tap_count+1, sizeof(*tab));
const int center= (ta... | {
"code": [],
"line_no": []
} | static int FUNC_0(ResampleContext *VAR_0, void *VAR_1, double VAR_2, int VAR_3, int VAR_4, int VAR_5, int VAR_6,
int VAR_7, double VAR_8){
int VAR_9, VAR_10;
double VAR_11, VAR_12, VAR_13, VAR_14;
double *VAR_15 = av_malloc_array(VAR_3+1, sizeof(*VAR_15));
const int VAR_16=... | [
"static int FUNC_0(ResampleContext *VAR_0, void *VAR_1, double VAR_2, int VAR_3, int VAR_4, int VAR_5, int VAR_6,\nint VAR_7, double VAR_8){",
"int VAR_9, VAR_10;",
"double VAR_11, VAR_12, VAR_13, VAR_14;",
"double *VAR_15 = av_malloc_array(VAR_3+1, sizeof(*VAR_15));",
"const int VAR_16= (VAR_3-1)/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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
23,
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
20,775 | static void fft_test(AC3MDCTContext *mdct, AVLFG *lfg)
{
IComplex in[FN], in1[FN];
int k, n, i;
float sum_re, sum_im, a;
for (i = 0; i < FN; i++) {
in[i].re = av_lfg_get(lfg) % 65535 - 32767;
in[i].im = av_lfg_get(lfg) % 65535 - 32767;
in1[i] = in[i];
}
fft(... | false | FFmpeg | 79997def65fd2313b48a5f3c3a884c6149ae9b5d | static void fft_test(AC3MDCTContext *mdct, AVLFG *lfg)
{
IComplex in[FN], in1[FN];
int k, n, i;
float sum_re, sum_im, a;
for (i = 0; i < FN; i++) {
in[i].re = av_lfg_get(lfg) % 65535 - 32767;
in[i].im = av_lfg_get(lfg) % 65535 - 32767;
in1[i] = in[i];
}
fft(... | {
"code": [],
"line_no": []
} | static void FUNC_0(AC3MDCTContext *VAR_0, AVLFG *VAR_1)
{
IComplex in[FN], in1[FN];
int VAR_2, VAR_3, VAR_4;
float VAR_5, VAR_6, VAR_7;
for (VAR_4 = 0; VAR_4 < FN; VAR_4++) {
in[VAR_4].re = av_lfg_get(VAR_1) % 65535 - 32767;
in[VAR_4].im = av_lfg_get(VAR_1) % 65535 - 32767;
... | [
"static void FUNC_0(AC3MDCTContext *VAR_0, AVLFG *VAR_1)\n{",
"IComplex in[FN], in1[FN];",
"int VAR_2, VAR_3, VAR_4;",
"float VAR_5, VAR_6, VAR_7;",
"for (VAR_4 = 0; VAR_4 < FN; VAR_4++) {",
"in[VAR_4].re = av_lfg_get(VAR_1) % 65535 - 32767;",
"in[VAR_4].im = av_lfg_get(VAR_1) % 65535 - 32767;",
"in1[... | [
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
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[... |
20,776 | static void correlate_slice_buffered(SnowContext *s, slice_buffer * sb, SubBand *b, DWTELEM *src, int stride, int inverse, int use_median, int start_y, int end_y){
const int w= b->width;
int x,y;
// START_TIMER
DWTELEM * line;
DWTELEM * prev;
if (start_y != 0)
line = slice_bu... | false | FFmpeg | b5bfb9f9de911846c43b52a7469b3cb413055492 | static void correlate_slice_buffered(SnowContext *s, slice_buffer * sb, SubBand *b, DWTELEM *src, int stride, int inverse, int use_median, int start_y, int end_y){
const int w= b->width;
int x,y;
DWTELEM * line;
DWTELEM * prev;
if (start_y != 0)
line = slice_buffer_get_line(sb,... | {
"code": [],
"line_no": []
} | static void FUNC_0(SnowContext *VAR_0, slice_buffer * VAR_1, SubBand *VAR_2, DWTELEM *VAR_3, int VAR_4, int VAR_5, int VAR_6, int VAR_7, int VAR_8){
const int VAR_9= VAR_2->width;
int VAR_10,VAR_11;
DWTELEM * line;
DWTELEM * prev;
if (VAR_7 != 0)
line = slice_buffer_get_line(VA... | [
"static void FUNC_0(SnowContext *VAR_0, slice_buffer * VAR_1, SubBand *VAR_2, DWTELEM *VAR_3, int VAR_4, int VAR_5, int VAR_6, int VAR_7, int VAR_8){",
"const int VAR_9= VAR_2->width;",
"int VAR_10,VAR_11;",
"DWTELEM * line;",
"DWTELEM * prev;",
"if (VAR_7 != 0)\nline = slice_buffer_get_line(VAR_1, ((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
] | [
[
1
],
[
3
],
[
5
],
[
13
],
[
15
],
[
19,
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
5... |
20,778 | static void rv34_idct_add_c(uint8_t *dst, ptrdiff_t stride, DCTELEM *block){
int temp[16];
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
int i;
rv34_row_transform(temp, block);
memset(block, 0, 16*sizeof(DCTELEM));
for(i = 0; i < 4; i++){
const int z0 = 13*(temp[4*0+i] + ... | false | FFmpeg | fd88a257015f183f5ec3bff393a2f6cf7c117c02 | static void rv34_idct_add_c(uint8_t *dst, ptrdiff_t stride, DCTELEM *block){
int temp[16];
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
int i;
rv34_row_transform(temp, block);
memset(block, 0, 16*sizeof(DCTELEM));
for(i = 0; i < 4; i++){
const int z0 = 13*(temp[4*0+i] + ... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t *VAR_0, ptrdiff_t VAR_1, DCTELEM *VAR_2){
int VAR_3[16];
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
int VAR_4;
rv34_row_transform(VAR_3, VAR_2);
memset(VAR_2, 0, 16*sizeof(DCTELEM));
for(VAR_4 = 0; VAR_4 < 4; VAR_4++){
const int VAR_5 = 13*(V... | [
"static void FUNC_0(uint8_t *VAR_0, ptrdiff_t VAR_1, DCTELEM *VAR_2){",
"int VAR_3[16];",
"uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;",
"int VAR_4;",
"rv34_row_transform(VAR_3, VAR_2);",
"memset(VAR_2, 0, 16*sizeof(DCTELEM));",
"for(VAR_4 = 0; VAR_4 < 4; VAR_4++){",
"const int VAR_5 = 13*(VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
]
] |
20,780 | int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
{
int pqindex, lowquant, status;
if (v->finterpflag)
v->interpfrm = get_bits1(gb);
if (!v->s.avctx->codec)
return -1;
if (v->s.avctx->codec_id == AV_CODEC_ID_MSS2)
v->respic =
v->rangered =
... | true | FFmpeg | b51e9354772de446e8196dabf9aad1567b22f74d | int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
{
int pqindex, lowquant, status;
if (v->finterpflag)
v->interpfrm = get_bits1(gb);
if (!v->s.avctx->codec)
return -1;
if (v->s.avctx->codec_id == AV_CODEC_ID_MSS2)
v->respic =
v->rangered =
... | {
"code": [],
"line_no": []
} | int FUNC_0(VC1Context *VAR_0, GetBitContext* VAR_1)
{
int VAR_2, VAR_3, VAR_4;
if (VAR_0->finterpflag)
VAR_0->interpfrm = get_bits1(VAR_1);
if (!VAR_0->s.avctx->codec)
return -1;
if (VAR_0->s.avctx->codec_id == AV_CODEC_ID_MSS2)
VAR_0->respic =
VAR_0->range... | [
"int FUNC_0(VC1Context *VAR_0, GetBitContext* VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4;",
"if (VAR_0->finterpflag)\nVAR_0->interpfrm = get_bits1(VAR_1);",
"if (!VAR_0->s.avctx->codec)\nreturn -1;",
"if (VAR_0->s.avctx->codec_id == AV_CODEC_ID_MSS2)\nVAR_0->respic =\nVAR_0->rangered =\nVAR_0->multires = get_bi... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
11,
13
],
[
15,
17
],
[
19,
21,
23,
25
],
[
27,
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47,
49
],
[
51
],
[
53
],
... |
20,781 | static int mov_preroll_write_stbl_atoms(AVIOContext *pb, MOVTrack *track)
{
struct sgpd_entry {
int count;
int16_t roll_distance;
int group_description_index;
};
struct sgpd_entry *sgpd_entries = NULL;
int entries = -1;
int group = 0;
int i, j;
const in... | true | FFmpeg | b905ba5bc18c89c7fccd8621795755644442ef19 | static int mov_preroll_write_stbl_atoms(AVIOContext *pb, MOVTrack *track)
{
struct sgpd_entry {
int count;
int16_t roll_distance;
int group_description_index;
};
struct sgpd_entry *sgpd_entries = NULL;
int entries = -1;
int group = 0;
int i, j;
const in... | {
"code": [
" if (!group)"
],
"line_no": [
109
]
} | static int FUNC_0(AVIOContext *VAR_0, MOVTrack *VAR_1)
{
struct sgpd_entry {
int count;
int16_t roll_distance;
int group_description_index;
};
struct sgpd_entry *VAR_2 = NULL;
int VAR_3 = -1;
int VAR_4 = 0;
int VAR_5, VAR_6;
const int VAR_7 = 80;
i... | [
"static int FUNC_0(AVIOContext *VAR_0, MOVTrack *VAR_1)\n{",
"struct sgpd_entry {",
"int count;",
"int16_t roll_distance;",
"int group_description_index;",
"};",
"struct sgpd_entry *VAR_2 = NULL;",
"int VAR_3 = -1;",
"int VAR_4 = 0;",
"int VAR_5, VAR_6;",
"const int VAR_7 = 80;",
"int VAR_8 = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29,
31
],
[
33
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
49
],
[
53
... |
20,782 | static av_always_inline void emulated_edge_mc(uint8_t *buf, const uint8_t *src,
ptrdiff_t linesize_arg,
int block_w, int block_h,
int src_x, int src_y,
... | true | FFmpeg | 2ffead98ddd384f61cdf6b1cb3f36592f54cd34a | static av_always_inline void emulated_edge_mc(uint8_t *buf, const uint8_t *src,
ptrdiff_t linesize_arg,
int block_w, int block_h,
int src_x, int src_y,
... | {
"code": [
" int linesize = linesize_arg;",
" int linesize = linesize_arg;"
],
"line_no": [
17,
17
]
} | static av_always_inline void FUNC_0(uint8_t *buf, const uint8_t *src,
ptrdiff_t linesize_arg,
int block_w, int block_h,
int src_x, int src_y,
... | [
"static av_always_inline void FUNC_0(uint8_t *buf, const uint8_t *src,\nptrdiff_t linesize_arg,\nint block_w, int block_h,\nint src_x, int src_y,\nint w, int h,\nemu_edge_core_func *core_fn)\n{",
"int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4 = 0;",
"int VAR_5 = linesize_arg;",
"if(!w || !h)\nreturn;",
"if (src_y >... | [
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
] | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
17
],
[
21,
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
20,783 | static int vmdk_init_tables(BlockDriverState *bs, VmdkExtent *extent,
Error **errp)
{
int ret;
int l1_size, i;
/* read the L1 table */
l1_size = extent->l1_size * sizeof(uint32_t);
extent->l1_table = g_try_malloc(l1_size);
if (l1_size && extent->l1_table == ... | true | qemu | 13c4941cdd8685d28c7e3a09e393a5579b58db46 | static int vmdk_init_tables(BlockDriverState *bs, VmdkExtent *extent,
Error **errp)
{
int ret;
int l1_size, i;
l1_size = extent->l1_size * sizeof(uint32_t);
extent->l1_table = g_try_malloc(l1_size);
if (l1_size && extent->l1_table == NULL) {
return... | {
"code": [
" int l1_size, i;"
],
"line_no": [
9
]
} | static int FUNC_0(BlockDriverState *VAR_0, VmdkExtent *VAR_1,
Error **VAR_2)
{
int VAR_3;
int VAR_4, VAR_5;
VAR_4 = VAR_1->VAR_4 * sizeof(uint32_t);
VAR_1->l1_table = g_try_malloc(VAR_4);
if (VAR_4 && VAR_1->l1_table == NULL) {
return -ENOMEM;
... | [
"static int FUNC_0(BlockDriverState *VAR_0, VmdkExtent *VAR_1,\nError **VAR_2)\n{",
"int VAR_3;",
"int VAR_4, VAR_5;",
"VAR_4 = VAR_1->VAR_4 * sizeof(uint32_t);",
"VAR_1->l1_table = g_try_malloc(VAR_4);",
"if (VAR_4 && VAR_1->l1_table == NULL) {",
"return -ENOMEM;",
"}",
"VAR_3 = bdrv_pread(VAR_1->f... | [
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
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29,
31,
33
],
[
35
],
[
37,
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
... |
20,784 | static void bdrv_password_cb(void *opaque, const char *password,
void *readline_opaque)
{
Monitor *mon = opaque;
BlockDriverState *bs = readline_opaque;
int ret = 0;
Error *local_err = NULL;
bdrv_add_key(bs, password, &local_err);
if (local_err) {
... | true | qemu | 788cf9f8c8cbda53843e060540f3e91a060eb744 | static void bdrv_password_cb(void *opaque, const char *password,
void *readline_opaque)
{
Monitor *mon = opaque;
BlockDriverState *bs = readline_opaque;
int ret = 0;
Error *local_err = NULL;
bdrv_add_key(bs, password, &local_err);
if (local_err) {
... | {
"code": [
"static void bdrv_password_cb(void *opaque, const char *password,",
" void *readline_opaque)",
" Monitor *mon = opaque;",
" BlockDriverState *bs = readline_opaque;",
" int ret = 0;",
" Error *local_err = NULL;",
" bdrv_add_key(bs, pass... | static void FUNC_0(void *VAR_0, const char *VAR_1,
void *VAR_2)
{
Monitor *mon = VAR_0;
BlockDriverState *bs = VAR_2;
int VAR_3 = 0;
Error *local_err = NULL;
bdrv_add_key(bs, VAR_1, &local_err);
if (local_err) {
error_report_err(local_err);
... | [
"static void FUNC_0(void *VAR_0, const char *VAR_1,\nvoid *VAR_2)\n{",
"Monitor *mon = VAR_0;",
"BlockDriverState *bs = VAR_2;",
"int VAR_3 = 0;",
"Error *local_err = NULL;",
"bdrv_add_key(bs, VAR_1, &local_err);",
"if (local_err) {",
"error_report_err(local_err);",
"VAR_3 = -EPERM;",
"}",
"if (... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
33
],
[
35
]
] |
20,785 | static int vmdk_L2update(BlockDriverState *bs, VmdkMetaData *m_data)
{
BDRVVmdkState *s = bs->opaque;
/* update L2 table */
if (bdrv_pwrite(bs->file, ((int64_t)m_data->l2_offset * 512) + (m_data->l2_index * sizeof(m_data->offset)),
&(m_data->offset), sizeof(m_data->offset)) != siz... | true | qemu | b8852e87d9d113096342c3e0977266cda0fe9ee5 | static int vmdk_L2update(BlockDriverState *bs, VmdkMetaData *m_data)
{
BDRVVmdkState *s = bs->opaque;
if (bdrv_pwrite(bs->file, ((int64_t)m_data->l2_offset * 512) + (m_data->l2_index * sizeof(m_data->offset)),
&(m_data->offset), sizeof(m_data->offset)) != sizeof(m_data->offset))
... | {
"code": [
" if (bdrv_pwrite(bs->file, ((int64_t)m_data->l2_offset * 512) + (m_data->l2_index * sizeof(m_data->offset)),",
" &(m_data->offset), sizeof(m_data->offset)) != sizeof(m_data->offset))",
" if (bdrv_pwrite(bs->file, ((int64_t)m_data->l2_offset * 512) + (m_data->l2_in... | static int FUNC_0(BlockDriverState *VAR_0, VmdkMetaData *VAR_1)
{
BDRVVmdkState *s = VAR_0->opaque;
if (bdrv_pwrite(VAR_0->file, ((int64_t)VAR_1->l2_offset * 512) + (VAR_1->l2_index * sizeof(VAR_1->offset)),
&(VAR_1->offset), sizeof(VAR_1->offset)) != sizeof(VAR_1->offset))
... | [
"static int FUNC_0(BlockDriverState *VAR_0, VmdkMetaData *VAR_1)\n{",
"BDRVVmdkState *s = VAR_0->opaque;",
"if (bdrv_pwrite(VAR_0->file, ((int64_t)VAR_1->l2_offset * 512) + (VAR_1->l2_index * sizeof(VAR_1->offset)),\n&(VAR_1->offset), sizeof(VAR_1->offset)) != sizeof(VAR_1->offset))\nreturn -1;",
"if (s->l1_b... | [
0,
0,
1,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
11,
13,
15
],
[
19
],
[
21
],
[
23,
25,
27
],
[
29
],
[
33
],
[
35
]
] |
20,786 | static int bdrv_inactivate_recurse(BlockDriverState *bs,
bool setting_flag)
{
BdrvChild *child, *parent;
int ret;
if (!setting_flag && bs->drv->bdrv_inactivate) {
ret = bs->drv->bdrv_inactivate(bs);
if (ret < 0) {
return ret;
... | true | qemu | 7d5b5261104235cd6cc86930ab0d0a7372bfe04b | static int bdrv_inactivate_recurse(BlockDriverState *bs,
bool setting_flag)
{
BdrvChild *child, *parent;
int ret;
if (!setting_flag && bs->drv->bdrv_inactivate) {
ret = bs->drv->bdrv_inactivate(bs);
if (ret < 0) {
return ret;
... | {
"code": [
" if (setting_flag) {",
" bs->open_flags |= BDRV_O_INACTIVE;",
" bs->open_flags &= ~BDRV_O_INACTIVE;"
],
"line_no": [
27,
33,
45
]
} | static int FUNC_0(BlockDriverState *VAR_0,
bool VAR_1)
{
BdrvChild *child, *parent;
int VAR_2;
if (!VAR_1 && VAR_0->drv->bdrv_inactivate) {
VAR_2 = VAR_0->drv->bdrv_inactivate(VAR_0);
if (VAR_2 < 0) {
return VAR_2;
}
}
... | [
"static int FUNC_0(BlockDriverState *VAR_0,\nbool VAR_1)\n{",
"BdrvChild *child, *parent;",
"int VAR_2;",
"if (!VAR_1 && VAR_0->drv->bdrv_inactivate) {",
"VAR_2 = VAR_0->drv->bdrv_inactivate(VAR_0);",
"if (VAR_2 < 0) {",
"return VAR_2;",
"}",
"}",
"if (VAR_1) {",
"uint64_t perm, shared_perm;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
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
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
20,787 | int qcow2_read_snapshots(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
QCowSnapshotHeader h;
QCowSnapshotExtraData extra;
QCowSnapshot *sn;
int i, id_str_size, name_size;
int64_t offset;
uint32_t extra_data_size;
int ret;
if (!s->nb_snapshots) {
s->snaps... | true | qemu | 5839e53bbc0fec56021d758aab7610df421ed8c8 | int qcow2_read_snapshots(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
QCowSnapshotHeader h;
QCowSnapshotExtraData extra;
QCowSnapshot *sn;
int i, id_str_size, name_size;
int64_t offset;
uint32_t extra_data_size;
int ret;
if (!s->nb_snapshots) {
s->snaps... | {
"code": [
" s->snapshots = g_malloc0(s->nb_snapshots * sizeof(QCowSnapshot));"
],
"line_no": [
37
]
} | int FUNC_0(BlockDriverState *VAR_0)
{
BDRVQcowState *s = VAR_0->opaque;
QCowSnapshotHeader h;
QCowSnapshotExtraData extra;
QCowSnapshot *sn;
int VAR_1, VAR_2, VAR_3;
int64_t offset;
uint32_t extra_data_size;
int VAR_4;
if (!s->nb_snapshots) {
s->snapshots = NULL;... | [
"int FUNC_0(BlockDriverState *VAR_0)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"QCowSnapshotHeader h;",
"QCowSnapshotExtraData extra;",
"QCowSnapshot *sn;",
"int VAR_1, VAR_2, VAR_3;",
"int64_t offset;",
"uint32_t extra_data_size;",
"int VAR_4;",
"if (!s->nb_snapshots) {",
"s->snapshots = NULL;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
41
],
[
45
],
[
47
],
[
49
... |
20,788 | static abi_long do_fcntl(int fd, int cmd, abi_ulong arg)
{
struct flock fl;
struct target_flock *target_fl;
struct flock64 fl64;
struct target_flock64 *target_fl64;
#ifdef F_GETOWN_EX
struct f_owner_ex fox;
struct target_f_owner_ex *target_fox;
#endif
abi_long ret;
int host_cm... | false | qemu | 213d3e9ea27f7fc55db7272c05255294b52ed3e4 | static abi_long do_fcntl(int fd, int cmd, abi_ulong arg)
{
struct flock fl;
struct target_flock *target_fl;
struct flock64 fl64;
struct target_flock64 *target_fl64;
#ifdef F_GETOWN_EX
struct f_owner_ex fox;
struct target_f_owner_ex *target_fox;
#endif
abi_long ret;
int host_cm... | {
"code": [],
"line_no": []
} | static abi_long FUNC_0(int fd, int cmd, abi_ulong arg)
{
struct flock VAR_0;
struct target_flock *VAR_1;
struct flock64 VAR_2;
struct target_flock64 *VAR_3;
#ifdef F_GETOWN_EX
struct f_owner_ex fox;
struct target_f_owner_ex *target_fox;
#endif
abi_long ret;
int VAR_4 = target_... | [
"static abi_long FUNC_0(int fd, int cmd, abi_ulong arg)\n{",
"struct flock VAR_0;",
"struct target_flock *VAR_1;",
"struct flock64 VAR_2;",
"struct target_flock64 *VAR_3;",
"#ifdef F_GETOWN_EX\nstruct f_owner_ex fox;",
"struct target_f_owner_ex *target_fox;",
"#endif\nabi_long ret;",
"int VAR_4 = ta... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19,
21
],
[
23
],
[
27,
29
],
[
33
],
[
35,
37,
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
20,789 | const uint8_t *avpriv_find_start_code(const uint8_t *av_restrict p,
const uint8_t *end,
uint32_t *av_restrict state)
{
int i;
assert(p <= end);
if (p >= end)
return end;
for (i = 0; i < 3; i++) {
uin... | false | FFmpeg | 55db06af64d1acb7c3e304d61e7a1f265139d27a | const uint8_t *avpriv_find_start_code(const uint8_t *av_restrict p,
const uint8_t *end,
uint32_t *av_restrict state)
{
int i;
assert(p <= end);
if (p >= end)
return end;
for (i = 0; i < 3; i++) {
uin... | {
"code": [],
"line_no": []
} | const uint8_t *FUNC_0(const uint8_t *av_restrict p,
const uint8_t *end,
uint32_t *av_restrict state)
{
int VAR_0;
assert(p <= end);
if (p >= end)
return end;
for (VAR_0 = 0; VAR_0 < 3; VAR_0++) {
uin... | [
"const uint8_t *FUNC_0(const uint8_t *av_restrict p,\nconst uint8_t *end,\nuint32_t *av_restrict state)\n{",
"int VAR_0;",
"assert(p <= end);",
"if (p >= end)\nreturn end;",
"for (VAR_0 = 0; VAR_0 < 3; VAR_0++) {",
"uint32_t tmp = *state << 8;",
"*state = tmp + *(p++);",
"if (tmp == 0x100 || p == end)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15,
17
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
20,790 | static int bdrv_open_common(BlockDriverState *bs, BdrvChild *file,
QDict *options, Error **errp)
{
int ret, open_flags;
const char *filename;
const char *driver_name = NULL;
const char *node_name = NULL;
QemuOpts *opts;
BlockDriver *drv;
Error *local_err ... | false | qemu | a5b8dd2ce83208cd7d6eb4562339ecf5aae13574 | static int bdrv_open_common(BlockDriverState *bs, BdrvChild *file,
QDict *options, Error **errp)
{
int ret, open_flags;
const char *filename;
const char *driver_name = NULL;
const char *node_name = NULL;
QemuOpts *opts;
BlockDriver *drv;
Error *local_err ... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, BdrvChild *VAR_1,
QDict *VAR_2, Error **VAR_3)
{
int VAR_4, VAR_5;
const char *VAR_6;
const char *VAR_7 = NULL;
const char *VAR_8 = NULL;
QemuOpts *opts;
BlockDriver *drv;
Error *local_err = NULL;
assert(V... | [
"static int FUNC_0(BlockDriverState *VAR_0, BdrvChild *VAR_1,\nQDict *VAR_2, Error **VAR_3)\n{",
"int VAR_4, VAR_5;",
"const char *VAR_6;",
"const char *VAR_7 = NULL;",
"const char *VAR_8 = NULL;",
"QemuOpts *opts;",
"BlockDriver *drv;",
"Error *local_err = NULL;",
"assert(VAR_0->VAR_1 == NULL);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
45
],
[
47
],
[... |
20,791 | static void test_visitor_out_enum_errors(TestOutputVisitorData *data,
const void *unused)
{
EnumOne i, bad_values[] = { ENUM_ONE__MAX, -1 };
Error *err;
for (i = 0; i < ARRAY_SIZE(bad_values) ; i++) {
err = NULL;
visit_type_EnumOne(data->ov, ... | false | qemu | b3db211f3c80bb996a704d665fe275619f728bd4 | static void test_visitor_out_enum_errors(TestOutputVisitorData *data,
const void *unused)
{
EnumOne i, bad_values[] = { ENUM_ONE__MAX, -1 };
Error *err;
for (i = 0; i < ARRAY_SIZE(bad_values) ; i++) {
err = NULL;
visit_type_EnumOne(data->ov, ... | {
"code": [],
"line_no": []
} | static void FUNC_0(TestOutputVisitorData *VAR_0,
const void *VAR_1)
{
EnumOne i, bad_values[] = { ENUM_ONE__MAX, -1 };
Error *err;
for (i = 0; i < ARRAY_SIZE(bad_values) ; i++) {
err = NULL;
visit_type_EnumOne(VAR_0->ov, "VAR_1", &bad_values[... | [
"static void FUNC_0(TestOutputVisitorData *VAR_0,\nconst void *VAR_1)\n{",
"EnumOne i, bad_values[] = { ENUM_ONE__MAX, -1 };",
"Error *err;",
"for (i = 0; i < ARRAY_SIZE(bad_values) ; i++) {",
"err = NULL;",
"visit_type_EnumOne(VAR_0->ov, \"VAR_1\", &bad_values[i], &err);",
"g_assert(err);",
"error_fr... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
20,792 | static size_t v9fs_unpack(void *dst, struct iovec *out_sg, int out_num,
size_t offset, size_t size)
{
return v9fs_packunpack(dst, out_sg, out_num, offset, size, 0);
}
| false | qemu | ddca7f86ac022289840e0200fd4050b2b58e9176 | static size_t v9fs_unpack(void *dst, struct iovec *out_sg, int out_num,
size_t offset, size_t size)
{
return v9fs_packunpack(dst, out_sg, out_num, offset, size, 0);
}
| {
"code": [],
"line_no": []
} | static size_t FUNC_0(void *dst, struct iovec *out_sg, int out_num,
size_t offset, size_t size)
{
return v9fs_packunpack(dst, out_sg, out_num, offset, size, 0);
}
| [
"static size_t FUNC_0(void *dst, struct iovec *out_sg, int out_num,\nsize_t offset, size_t size)\n{",
"return v9fs_packunpack(dst, out_sg, out_num, offset, size, 0);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
]
] |
20,793 | print_with_operands (const struct cris_opcode *opcodep,
unsigned int insn,
unsigned char *buffer,
bfd_vma addr,
disassemble_info *info,
/* If a prefix insn was before this insn (and is supposed
to be output as an address), here is a description of
it. */
const st... | false | qemu | e11078846996ded6f824868ae63a0c77031ad64c | print_with_operands (const struct cris_opcode *opcodep,
unsigned int insn,
unsigned char *buffer,
bfd_vma addr,
disassemble_info *info,
const struct cris_opcode *prefix_opcodep,
unsigned int prefix_insn,
unsigned char *prefix_buffer,
bfd_boole... | {
"code": [],
"line_no": []
} | FUNC_0 (const struct cris_opcode *VAR_0,
unsigned int VAR_1,
unsigned char *VAR_2,
bfd_vma VAR_3,
disassemble_info *VAR_4,
const struct cris_opcode *VAR_5,
unsigned int VAR_6,
unsigned char *VAR_7,
bfd_boolean VAR_8)
{
char VAR_9[siz... | [
"FUNC_0 (const struct cris_opcode *VAR_0,\nunsigned int VAR_1,\nunsigned char *VAR_2,\nbfd_vma VAR_3,\ndisassemble_info *VAR_4,\nconst struct cris_opcode *VAR_5,\nunsigned int VAR_6,\nunsigned char *VAR_7,\nbfd_boolean VAR_8)\n{",
"char VAR_9[sizeof (\".d [$r13=$r12-2147483648],$r10\") * 2];",
"char *VAR_10 = V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
17,
19,
21,
23,
25
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
49
],
[
53
],
[
55
],
[
61,
63
],
[
67,
69
],
[
71
],
[
77,
79,... |
20,794 | static void socket_start_outgoing_migration(MigrationState *s,
SocketAddressLegacy *saddr,
Error **errp)
{
QIOChannelSocket *sioc = qio_channel_socket_new();
struct SocketConnectData *data = g_new0(struct SocketConnectD... | false | qemu | bd269ebc82fbaa5fe7ce5bc7c1770ac8acecd884 | static void socket_start_outgoing_migration(MigrationState *s,
SocketAddressLegacy *saddr,
Error **errp)
{
QIOChannelSocket *sioc = qio_channel_socket_new();
struct SocketConnectData *data = g_new0(struct SocketConnectD... | {
"code": [],
"line_no": []
} | static void FUNC_0(MigrationState *VAR_0,
SocketAddressLegacy *VAR_1,
Error **VAR_2)
{
QIOChannelSocket *sioc = qio_channel_socket_new();
struct SocketConnectData *VAR_3 = g_new0(struct SocketConnectData, 1);
VAR... | [
"static void FUNC_0(MigrationState *VAR_0,\nSocketAddressLegacy *VAR_1,\nError **VAR_2)\n{",
"QIOChannelSocket *sioc = qio_channel_socket_new();",
"struct SocketConnectData *VAR_3 = g_new0(struct SocketConnectData, 1);",
"VAR_3->VAR_0 = VAR_0;",
"if (VAR_1->type == SOCKET_ADDRESS_LEGACY_KIND_INET) {",
"VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27,
29,
31,
33,
35
],
[
37
],
[
39
]
] |
20,795 | static void define_aarch64_debug_regs(ARMCPU *cpu)
{
/* Define breakpoint and watchpoint registers. These do nothing
* but read as written, for now.
*/
int i;
for (i = 0; i < 16; i++) {
ARMCPRegInfo dbgregs[] = {
{ .name = "DBGBVR", .state = ARM_CP_STATE_AA64,
... | false | qemu | 503006983a19be0b481946afac2cab0bdd21f124 | static void define_aarch64_debug_regs(ARMCPU *cpu)
{
int i;
for (i = 0; i < 16; i++) {
ARMCPRegInfo dbgregs[] = {
{ .name = "DBGBVR", .state = ARM_CP_STATE_AA64,
.opc0 = 2, .opc1 = 0, .crn = 0, .crm = i, .opc2 = 4,
.access = PL1_RW,
... | {
"code": [],
"line_no": []
} | static void FUNC_0(ARMCPU *VAR_0)
{
int VAR_1;
for (VAR_1 = 0; VAR_1 < 16; VAR_1++) {
ARMCPRegInfo dbgregs[] = {
{ .name = "DBGBVR", .state = ARM_CP_STATE_AA64,
.opc0 = 2, .opc1 = 0, .crn = 0, .crm = VAR_1, .opc2 = 4,
.access = PL1_RW,
... | [
"static void FUNC_0(ARMCPU *VAR_0)\n{",
"int VAR_1;",
"for (VAR_1 = 0; VAR_1 < 16; VAR_1++) {",
"ARMCPRegInfo dbgregs[] = {",
"{ .name = \"DBGBVR\", .state = ARM_CP_STATE_AA64,",
".opc0 = 2, .opc1 = 0, .crn = 0, .crm = VAR_1, .opc2 = 4,\n.access = PL1_RW,\n.fieldoffset = offsetof(CPUARMState, cp15.dbgbvr[... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21,
23,
25
],
[
27
],
[
29,
31,
33
],
[
35
],
[
37,
39,
41
],
[
43
],
[
45,
47,
49
],
[
51,
53
],
[
55
],
[
57
],
... |
20,796 | static void add_pc_test_case(const char *mname)
{
char *path;
PlugTestData *data;
if (!g_str_has_prefix(mname, "pc-")) {
return;
}
data = g_new(PlugTestData, 1);
data->machine = g_strdup(mname);
data->cpu_model = "Haswell"; /* 1.3+ theoretically */
data->sockets = 1;
... | false | qemu | 80b8c0be748d2cf8a90955e409956cee1c932a38 | static void add_pc_test_case(const char *mname)
{
char *path;
PlugTestData *data;
if (!g_str_has_prefix(mname, "pc-")) {
return;
}
data = g_new(PlugTestData, 1);
data->machine = g_strdup(mname);
data->cpu_model = "Haswell";
data->sockets = 1;
data->cores = 3;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(const char *VAR_0)
{
char *VAR_1;
PlugTestData *data;
if (!g_str_has_prefix(VAR_0, "pc-")) {
return;
}
data = g_new(PlugTestData, 1);
data->machine = g_strdup(VAR_0);
data->cpu_model = "Haswell";
data->sockets = 1;
data->cores = 3;
data->... | [
"static void FUNC_0(const char *VAR_0)\n{",
"char *VAR_1;",
"PlugTestData *data;",
"if (!g_str_has_prefix(VAR_0, \"pc-\")) {",
"return;",
"}",
"data = g_new(PlugTestData, 1);",
"data->machine = g_strdup(VAR_0);",
"data->cpu_model = \"Haswell\";",
"data->sockets = 1;",
"data->cores = 3;",
"data... | [
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
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51
],
[
53... |
20,798 | void event_notifier_cleanup(EventNotifier *e)
{
close(e->fd);
}
| false | qemu | d0cc2fbfa607678866475383c508be84818ceb64 | void event_notifier_cleanup(EventNotifier *e)
{
close(e->fd);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(EventNotifier *VAR_0)
{
close(VAR_0->fd);
}
| [
"void FUNC_0(EventNotifier *VAR_0)\n{",
"close(VAR_0->fd);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
20,799 | static void alpha_translate_init(void)
{
int i;
char *p;
static int done_init = 0;
if (done_init)
return;
cpu_env = tcg_global_reg_new(TCG_TYPE_PTR, TCG_AREG0, "env");
p = cpu_reg_names;
for (i = 0; i < 31; i++) {
sprintf(p, "ir%d", i);
cpu_ir[i] = tc... | false | qemu | a7812ae412311d7d47f8aa85656faadac9d64b56 | static void alpha_translate_init(void)
{
int i;
char *p;
static int done_init = 0;
if (done_init)
return;
cpu_env = tcg_global_reg_new(TCG_TYPE_PTR, TCG_AREG0, "env");
p = cpu_reg_names;
for (i = 0; i < 31; i++) {
sprintf(p, "ir%d", i);
cpu_ir[i] = tc... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
int VAR_0;
char *VAR_1;
static int VAR_2 = 0;
if (VAR_2)
return;
cpu_env = tcg_global_reg_new(TCG_TYPE_PTR, TCG_AREG0, "env");
VAR_1 = cpu_reg_names;
for (VAR_0 = 0; VAR_0 < 31; VAR_0++) {
sprintf(VAR_1, "ir%d", VAR_0);
cpu_... | [
"static void FUNC_0(void)\n{",
"int VAR_0;",
"char *VAR_1;",
"static int VAR_2 = 0;",
"if (VAR_2)\nreturn;",
"cpu_env = tcg_global_reg_new(TCG_TYPE_PTR, TCG_AREG0, \"env\");",
"VAR_1 = cpu_reg_names;",
"for (VAR_0 = 0; VAR_0 < 31; VAR_0++) {",
"sprintf(VAR_1, \"ir%d\", VAR_0);",
"cpu_ir[VAR_0] = t... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
49,
51
],
[
55,
57
],
[... |
20,800 | static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
RawVideoContext *context = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size ... | false | FFmpeg | 4a0f6651434c6f213d830140f575b4ec7858519f | static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
RawVideoContext *context = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
const AVPixFmtDescriptor *VAR_4 = av_pix_fmt_desc_get(VAR_0->pix_fmt);
RawVideoContext *context = VAR_0->priv_data;
const uint8_t *VAR_5 = VAR_3->VAR_1;
int VAR_6 ... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"const AVPixFmtDescriptor *VAR_4 = av_pix_fmt_desc_get(VAR_0->pix_fmt);",
"RawVideoContext *context = VAR_0->priv_data;",
"const uint8_t *VAR_5 = VAR_3->VAR_1;",
"int VAR_6 = 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
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37,
39,
41
],
[
45,
47
],
[
49,
51
],
[
53,
55
... |
20,801 | static void *data_plane_thread(void *opaque)
{
VirtIOBlockDataPlane *s = opaque;
do {
aio_poll(s->ctx, true);
} while (!s->stopping || s->num_reqs > 0);
return NULL;
}
| false | qemu | bf0da4df83e8af7ec02e3809f3dd30cc0a42e4bc | static void *data_plane_thread(void *opaque)
{
VirtIOBlockDataPlane *s = opaque;
do {
aio_poll(s->ctx, true);
} while (!s->stopping || s->num_reqs > 0);
return NULL;
}
| {
"code": [],
"line_no": []
} | static void *FUNC_0(void *VAR_0)
{
VirtIOBlockDataPlane *s = VAR_0;
do {
aio_poll(s->ctx, true);
} while (!s->stopping || s->num_reqs > 0);
return NULL;
}
| [
"static void *FUNC_0(void *VAR_0)\n{",
"VirtIOBlockDataPlane *s = VAR_0;",
"do {",
"aio_poll(s->ctx, true);",
"} while (!s->stopping || s->num_reqs > 0);",
"return NULL;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
20,804 | static int ppc_hash32_check_prot(int prot, int rwx)
{
int ret;
if (rwx == 2) {
if (prot & PAGE_EXEC) {
ret = 0;
} else {
ret = -2;
}
} else if (rwx) {
if (prot & PAGE_WRITE) {
ret = 0;
} else {
ret = -2;
... | false | qemu | e01b444523e2b0c663b42b3e8f44ef48a6153051 | static int ppc_hash32_check_prot(int prot, int rwx)
{
int ret;
if (rwx == 2) {
if (prot & PAGE_EXEC) {
ret = 0;
} else {
ret = -2;
}
} else if (rwx) {
if (prot & PAGE_WRITE) {
ret = 0;
} else {
ret = -2;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(int VAR_0, int VAR_1)
{
int VAR_2;
if (VAR_1 == 2) {
if (VAR_0 & PAGE_EXEC) {
VAR_2 = 0;
} else {
VAR_2 = -2;
}
} else if (VAR_1) {
if (VAR_0 & PAGE_WRITE) {
VAR_2 = 0;
} else {
VAR_2 = -... | [
"static int FUNC_0(int VAR_0, int VAR_1)\n{",
"int VAR_2;",
"if (VAR_1 == 2) {",
"if (VAR_0 & PAGE_EXEC) {",
"VAR_2 = 0;",
"} else {",
"VAR_2 = -2;",
"}",
"} else if (VAR_1) {",
"if (VAR_0 & PAGE_WRITE) {",
"VAR_2 = 0;",
"} else {",
"VAR_2 = -2;",
"}",
"} else {",
"if (VAR_0 & PAGE_REA... | [
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... |
20,805 | static void do_inject_mce(Monitor *mon, const QDict *qdict)
{
CPUState *cenv;
int cpu_index = qdict_get_int(qdict, "cpu_index");
int bank = qdict_get_int(qdict, "bank");
uint64_t status = qdict_get_int(qdict, "status");
uint64_t mcg_status = qdict_get_int(qdict, "mcg_status");
uint64_t ad... | false | qemu | 316378e4d0214b45cfeaa01609aca4dabb18d78b | static void do_inject_mce(Monitor *mon, const QDict *qdict)
{
CPUState *cenv;
int cpu_index = qdict_get_int(qdict, "cpu_index");
int bank = qdict_get_int(qdict, "bank");
uint64_t status = qdict_get_int(qdict, "status");
uint64_t mcg_status = qdict_get_int(qdict, "mcg_status");
uint64_t ad... | {
"code": [],
"line_no": []
} | static void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)
{
CPUState *cenv;
int VAR_2 = qdict_get_int(VAR_1, "VAR_2");
int VAR_3 = qdict_get_int(VAR_1, "VAR_3");
uint64_t status = qdict_get_int(VAR_1, "status");
uint64_t mcg_status = qdict_get_int(VAR_1, "mcg_status");
uint64_t addr = qdict_... | [
"static void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)\n{",
"CPUState *cenv;",
"int VAR_2 = qdict_get_int(VAR_1, \"VAR_2\");",
"int VAR_3 = qdict_get_int(VAR_1, \"VAR_3\");",
"uint64_t status = qdict_get_int(VAR_1, \"status\");",
"uint64_t mcg_status = qdict_get_int(VAR_1, \"mcg_status\");",
"uint64_t ... | [
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
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
20,806 | static void spice_register_types(void)
{
qemu_spice_init();
}
| false | qemu | ad1be89948f88e89708b04ccd782456ccec3a6f0 | static void spice_register_types(void)
{
qemu_spice_init();
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
qemu_spice_init();
}
| [
"static void FUNC_0(void)\n{",
"qemu_spice_init();",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
20,807 | static int pci_grackle_init_device(SysBusDevice *dev)
{
GrackleState *s;
int pci_mem_config, pci_mem_data;
s = FROM_SYSBUS(GrackleState, dev);
pci_mem_config = cpu_register_io_memory(pci_grackle_config_read,
pci_grackle_config_write, s);
pci_mem... | false | qemu | 4f5e19e6c570459cd524b29b24374f03860f5149 | static int pci_grackle_init_device(SysBusDevice *dev)
{
GrackleState *s;
int pci_mem_config, pci_mem_data;
s = FROM_SYSBUS(GrackleState, dev);
pci_mem_config = cpu_register_io_memory(pci_grackle_config_read,
pci_grackle_config_write, s);
pci_mem... | {
"code": [],
"line_no": []
} | static int FUNC_0(SysBusDevice *VAR_0)
{
GrackleState *s;
int VAR_1, VAR_2;
s = FROM_SYSBUS(GrackleState, VAR_0);
VAR_1 = cpu_register_io_memory(pci_grackle_config_read,
pci_grackle_config_write, s);
VAR_2 = cpu_register_io_memory(pci_grackle_re... | [
"static int FUNC_0(SysBusDevice *VAR_0)\n{",
"GrackleState *s;",
"int VAR_1, VAR_2;",
"s = FROM_SYSBUS(GrackleState, VAR_0);",
"VAR_1 = cpu_register_io_memory(pci_grackle_config_read,\npci_grackle_config_write, s);",
"VAR_2 = cpu_register_io_memory(pci_grackle_read,\npci_grackle_write,\n&s->host_state);",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15,
17
],
[
19,
21,
23
],
[
25
],
[
27
],
[
31,
33
],
[
35
],
[
37
],
[
39
]
] |
20,808 | int qemu_strtoul(const char *nptr, const char **endptr, int base,
unsigned long *result)
{
char *ep;
int err = 0;
if (!nptr) {
if (endptr) {
*endptr = nptr;
}
err = -EINVAL;
} else {
errno = 0;
*result = strtoul(nptr, &ep, ... | false | qemu | 4baef2679e029c76707be1e2ed54bf3dd21693fe | int qemu_strtoul(const char *nptr, const char **endptr, int base,
unsigned long *result)
{
char *ep;
int err = 0;
if (!nptr) {
if (endptr) {
*endptr = nptr;
}
err = -EINVAL;
} else {
errno = 0;
*result = strtoul(nptr, &ep, ... | {
"code": [],
"line_no": []
} | int FUNC_0(const char *VAR_0, const char **VAR_1, int VAR_2,
unsigned long *VAR_3)
{
char *VAR_4;
int VAR_5 = 0;
if (!VAR_0) {
if (VAR_1) {
*VAR_1 = VAR_0;
}
VAR_5 = -EINVAL;
} else {
errno = 0;
*VAR_3 = strtoul(VAR_0, &VAR... | [
"int FUNC_0(const char *VAR_0, const char **VAR_1, int VAR_2,\nunsigned long *VAR_3)\n{",
"char *VAR_4;",
"int VAR_5 = 0;",
"if (!VAR_0) {",
"if (VAR_1) {",
"*VAR_1 = VAR_0;",
"}",
"VAR_5 = -EINVAL;",
"} else {",
"errno = 0;",
"*VAR_3 = strtoul(VAR_0, &VAR_4, VAR_2);",
"if (errno == ERANGE) {"... | [
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
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
20,809 | static void rtl8139_cleanup(NetClientState *nc)
{
RTL8139State *s = qemu_get_nic_opaque(nc);
s->nic = NULL;
}
| false | qemu | 57407ea44cc0a3d630b9b89a2be011f1955ce5c1 | static void rtl8139_cleanup(NetClientState *nc)
{
RTL8139State *s = qemu_get_nic_opaque(nc);
s->nic = NULL;
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(NetClientState *VAR_0)
{
RTL8139State *s = qemu_get_nic_opaque(VAR_0);
s->nic = NULL;
}
| [
"static void FUNC_0(NetClientState *VAR_0)\n{",
"RTL8139State *s = qemu_get_nic_opaque(VAR_0);",
"s->nic = NULL;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
20,810 | static int uhci_handle_td(UHCIState *s, UHCI_TD *td, uint32_t *int_mask,
int completion)
{
uint8_t pid;
int len = 0, max_len, err, ret = 0;
/* ??? This is wrong for async completion. */
if (td->ctrl & TD_CTRL_IOC) {
*int_mask |= 0x01;
}
if (!(td->c... | false | qemu | 54f254f973a1b2ed0f3571390f4de060adfe23e8 | static int uhci_handle_td(UHCIState *s, UHCI_TD *td, uint32_t *int_mask,
int completion)
{
uint8_t pid;
int len = 0, max_len, err, ret = 0;
if (td->ctrl & TD_CTRL_IOC) {
*int_mask |= 0x01;
}
if (!(td->ctrl & TD_CTRL_ACTIVE))
return 1;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(UHCIState *VAR_0, UHCI_TD *VAR_1, uint32_t *VAR_2,
int VAR_3)
{
uint8_t pid;
int VAR_4 = 0, VAR_5, VAR_6, VAR_7 = 0;
if (VAR_1->ctrl & TD_CTRL_IOC) {
*VAR_2 |= 0x01;
}
if (!(VAR_1->ctrl & TD_CTRL_ACTIVE))
return 1;
... | [
"static int FUNC_0(UHCIState *VAR_0, UHCI_TD *VAR_1, uint32_t *VAR_2,\nint VAR_3)\n{",
"uint8_t pid;",
"int VAR_4 = 0, VAR_5, VAR_6, VAR_7 = 0;",
"if (VAR_1->ctrl & TD_CTRL_IOC) {",
"*VAR_2 |= 0x01;",
"}",
"if (!(VAR_1->ctrl & TD_CTRL_ACTIVE))\nreturn 1;",
"VAR_5 = ((VAR_1->token >> 21) + 1) & 0x7ff;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
57
... |
20,813 | static void option_rom_reset(void *_rrd)
{
RomResetData *rrd = _rrd;
cpu_physical_memory_write_rom(rrd->addr, rrd->data, rrd->size);
}
| false | qemu | 45a50b1668822c23afc2a89f724654e176518bc4 | static void option_rom_reset(void *_rrd)
{
RomResetData *rrd = _rrd;
cpu_physical_memory_write_rom(rrd->addr, rrd->data, rrd->size);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
RomResetData *rrd = VAR_0;
cpu_physical_memory_write_rom(rrd->addr, rrd->data, rrd->size);
}
| [
"static void FUNC_0(void *VAR_0)\n{",
"RomResetData *rrd = VAR_0;",
"cpu_physical_memory_write_rom(rrd->addr, rrd->data, rrd->size);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
20,814 | static int v9fs_synth_lremovexattr(FsContext *ctx,
V9fsPath *path, const char *name)
{
errno = ENOTSUP;
return -1;
}
| false | qemu | 364031f17932814484657e5551ba12957d993d7e | static int v9fs_synth_lremovexattr(FsContext *ctx,
V9fsPath *path, const char *name)
{
errno = ENOTSUP;
return -1;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0,
V9fsPath *VAR_1, const char *VAR_2)
{
errno = ENOTSUP;
return -1;
}
| [
"static int FUNC_0(FsContext *VAR_0,\nV9fsPath *VAR_1, const char *VAR_2)\n{",
"errno = ENOTSUP;",
"return -1;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
]
] |
20,815 | static inline int get_phys_addr(CPUState *env, uint32_t address,
int access_type, int is_user,
uint32_t *phys_ptr, int *prot,
target_ulong *page_size)
{
/* Fast Context Switch Extension. */
if (address < 0x020... | false | qemu | 3ad493fc5ea38c005670adc5933058a28ccabdd4 | static inline int get_phys_addr(CPUState *env, uint32_t address,
int access_type, int is_user,
uint32_t *phys_ptr, int *prot,
target_ulong *page_size)
{
if (address < 0x02000000)
address += env->cp15.... | {
"code": [],
"line_no": []
} | static inline int FUNC_0(CPUState *VAR_0, uint32_t VAR_1,
int VAR_2, int VAR_3,
uint32_t *VAR_4, int *VAR_5,
target_ulong *VAR_6)
{
if (VAR_1 < 0x02000000)
VAR_1 += VAR_0->cp15.c13_fcse;
if ((V... | [
"static inline int FUNC_0(CPUState *VAR_0, uint32_t VAR_1,\nint VAR_2, int VAR_3,\nuint32_t *VAR_4, int *VAR_5,\ntarget_ulong *VAR_6)\n{",
"if (VAR_1 < 0x02000000)\nVAR_1 += VAR_0->cp15.c13_fcse;",
"if ((VAR_0->cp15.c1_sys & 1) == 0) {",
"*VAR_4 = VAR_1;",
"*VAR_5 = PAGE_READ | PAGE_WRITE;",
"*VAR_6 = TAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
13,
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47,
49
],
[
51
],
[
53
]
] |
20,816 | static uint64_t a9_scu_read(void *opaque, target_phys_addr_t offset,
unsigned size)
{
a9mp_priv_state *s = (a9mp_priv_state *)opaque;
switch (offset) {
case 0x00: /* Control */
return s->scu_control;
case 0x04: /* Configuration */
return (((1 << s->num... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t a9_scu_read(void *opaque, target_phys_addr_t offset,
unsigned size)
{
a9mp_priv_state *s = (a9mp_priv_state *)opaque;
switch (offset) {
case 0x00:
return s->scu_control;
case 0x04:
return (((1 << s->num_cpu) - 1) << 4) | (s->num_cpu -... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t offset,
unsigned size)
{
a9mp_priv_state *s = (a9mp_priv_state *)opaque;
switch (offset) {
case 0x00:
return s->scu_control;
case 0x04:
return (((1 << s->num_cpu) - 1) << 4) | (s->num_cpu - 1);
... | [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t offset,\nunsigned size)\n{",
"a9mp_priv_state *s = (a9mp_priv_state *)opaque;",
"switch (offset) {",
"case 0x00:\nreturn s->scu_control;",
"case 0x04:\nreturn (((1 << s->num_cpu) - 1) << 4) | (s->num_cpu - 1);",
"case 0x08:\nreturn s->scu_status;",
... | [
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,
45
],
[
47,
49,
53,
55
],
[
57
],
[... |
20,817 | uint32_t ldl_phys(target_phys_addr_t addr)
{
return ldl_phys_internal(addr, DEVICE_NATIVE_ENDIAN);
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | uint32_t ldl_phys(target_phys_addr_t addr)
{
return ldl_phys_internal(addr, DEVICE_NATIVE_ENDIAN);
}
| {
"code": [],
"line_no": []
} | uint32_t FUNC_0(target_phys_addr_t addr)
{
return ldl_phys_internal(addr, DEVICE_NATIVE_ENDIAN);
}
| [
"uint32_t FUNC_0(target_phys_addr_t addr)\n{",
"return ldl_phys_internal(addr, DEVICE_NATIVE_ENDIAN);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
20,818 | void virtio_queue_set_host_notifier_fd_handler(VirtQueue *vq, bool assign,
bool set_handler)
{
if (assign && set_handler) {
event_notifier_set_handler(&vq->host_notifier, true,
virtio_queue_host_notifier_read);
} els... | false | qemu | 872dd82c83745a603d2e07a03d34313eb6467ae4 | void virtio_queue_set_host_notifier_fd_handler(VirtQueue *vq, bool assign,
bool set_handler)
{
if (assign && set_handler) {
event_notifier_set_handler(&vq->host_notifier, true,
virtio_queue_host_notifier_read);
} els... | {
"code": [],
"line_no": []
} | void FUNC_0(VirtQueue *VAR_0, bool VAR_1,
bool VAR_2)
{
if (VAR_1 && VAR_2) {
event_notifier_set_handler(&VAR_0->host_notifier, true,
virtio_queue_host_notifier_read);
} else {
event_notifier_set_handler(&VA... | [
"void FUNC_0(VirtQueue *VAR_0, bool VAR_1,\nbool VAR_2)\n{",
"if (VAR_1 && VAR_2) {",
"event_notifier_set_handler(&VAR_0->host_notifier, true,\nvirtio_queue_host_notifier_read);",
"} else {",
"event_notifier_set_handler(&VAR_0->host_notifier, true, NULL);",
"}",
"if (!VAR_1) {",
"virtio_queue_host_not... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
25
],
[
27
],
[
29
]
] |
20,819 | bool qemu_clock_use_for_deadline(QEMUClockType type)
{
return !(use_icount && (type == QEMU_CLOCK_VIRTUAL));
}
| false | qemu | c2b38b277a7882a592f4f2ec955084b2b756daaa | bool qemu_clock_use_for_deadline(QEMUClockType type)
{
return !(use_icount && (type == QEMU_CLOCK_VIRTUAL));
}
| {
"code": [],
"line_no": []
} | bool FUNC_0(QEMUClockType type)
{
return !(use_icount && (type == QEMU_CLOCK_VIRTUAL));
}
| [
"bool FUNC_0(QEMUClockType type)\n{",
"return !(use_icount && (type == QEMU_CLOCK_VIRTUAL));",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
20,820 | static void term_forward_char(void)
{
if (term_cmd_buf_index < term_cmd_buf_size) {
term_cmd_buf_index++;
}
}
| false | qemu | 7e2515e87c41e2e658aaed466e11cbdf1ea8bcb1 | static void term_forward_char(void)
{
if (term_cmd_buf_index < term_cmd_buf_size) {
term_cmd_buf_index++;
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
if (term_cmd_buf_index < term_cmd_buf_size) {
term_cmd_buf_index++;
}
}
| [
"static void FUNC_0(void)\n{",
"if (term_cmd_buf_index < term_cmd_buf_size) {",
"term_cmd_buf_index++;",
"}",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
20,821 | static int input_initialise(struct XenDevice *xendev)
{
struct XenInput *in = container_of(xendev, struct XenInput, c.xendev);
int rc;
if (!in->c.con) {
xen_pv_printf(xendev, 1, "ds not set (yet)\n");
return -1;
}
rc = common_bind(&in->c);
if (rc != 0)
return rc;
... | false | qemu | 9f2130f58d5dd4e1fcb435cca08bf77e7c32e6c6 | static int input_initialise(struct XenDevice *xendev)
{
struct XenInput *in = container_of(xendev, struct XenInput, c.xendev);
int rc;
if (!in->c.con) {
xen_pv_printf(xendev, 1, "ds not set (yet)\n");
return -1;
}
rc = common_bind(&in->c);
if (rc != 0)
return rc;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(struct XenDevice *VAR_0)
{
struct XenInput *VAR_1 = container_of(VAR_0, struct XenInput, c.VAR_0);
int VAR_2;
if (!VAR_1->c.con) {
xen_pv_printf(VAR_0, 1, "ds not set (yet)\n");
return -1;
}
VAR_2 = common_bind(&VAR_1->c);
if (VAR_2 != 0)
return V... | [
"static int FUNC_0(struct XenDevice *VAR_0)\n{",
"struct XenInput *VAR_1 = container_of(VAR_0, struct XenInput, c.VAR_0);",
"int VAR_2;",
"if (!VAR_1->c.con) {",
"xen_pv_printf(VAR_0, 1, \"ds not set (yet)\\n\");",
"return -1;",
"}",
"VAR_2 = common_bind(&VAR_1->c);",
"if (VAR_2 != 0)\nreturn VAR_2;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23,
25
],
[
29
],
[
31
],
[
33
]
] |
20,822 | int audio_pcm_sw_read (SWVoiceIn *sw, void *buf, int size)
{
HWVoiceIn *hw = sw->hw;
int samples, live, ret = 0, swlim, isamp, osamp, rpos, total = 0;
st_sample_t *src, *dst = sw->buf;
rpos = audio_pcm_sw_get_rpos_in (sw) % hw->samples;
live = hw->total_samples_captured - sw->total_hw_samp... | false | qemu | 1ea879e5580f63414693655fcf0328559cdce138 | int audio_pcm_sw_read (SWVoiceIn *sw, void *buf, int size)
{
HWVoiceIn *hw = sw->hw;
int samples, live, ret = 0, swlim, isamp, osamp, rpos, total = 0;
st_sample_t *src, *dst = sw->buf;
rpos = audio_pcm_sw_get_rpos_in (sw) % hw->samples;
live = hw->total_samples_captured - sw->total_hw_samp... | {
"code": [],
"line_no": []
} | int FUNC_0 (SWVoiceIn *VAR_0, void *VAR_1, int VAR_2)
{
HWVoiceIn *hw = VAR_0->hw;
int VAR_3, VAR_4, VAR_5 = 0, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10 = 0;
st_sample_t *src, *dst = VAR_0->VAR_1;
VAR_9 = audio_pcm_sw_get_rpos_in (VAR_0) % hw->VAR_3;
VAR_4 = hw->total_samples_captured - VAR_0->t... | [
"int FUNC_0 (SWVoiceIn *VAR_0, void *VAR_1, int VAR_2)\n{",
"HWVoiceIn *hw = VAR_0->hw;",
"int VAR_3, VAR_4, VAR_5 = 0, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10 = 0;",
"st_sample_t *src, *dst = VAR_0->VAR_1;",
"VAR_9 = audio_pcm_sw_get_rpos_in (VAR_0) % hw->VAR_3;",
"VAR_4 = hw->total_samples_captured - 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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53
... |
20,824 | static void v9fs_wstat_post_chown(V9fsState *s, V9fsWstatState *vs, int err)
{
V9fsFidState *fidp;
if (err < 0) {
goto out;
}
if (vs->v9stat.name.size != 0) {
char *old_name, *new_name;
char *end;
old_name = vs->fidp->path.data;
end = strrchr(old_nam... | false | qemu | c7b4b0b302709928b84582881a7b4fb6c1e39e2b | static void v9fs_wstat_post_chown(V9fsState *s, V9fsWstatState *vs, int err)
{
V9fsFidState *fidp;
if (err < 0) {
goto out;
}
if (vs->v9stat.name.size != 0) {
char *old_name, *new_name;
char *end;
old_name = vs->fidp->path.data;
end = strrchr(old_nam... | {
"code": [],
"line_no": []
} | static void FUNC_0(V9fsState *VAR_0, V9fsWstatState *VAR_1, int VAR_2)
{
V9fsFidState *fidp;
if (VAR_2 < 0) {
goto out;
}
if (VAR_1->v9stat.name.size != 0) {
char *VAR_3, *VAR_4;
char *VAR_5;
VAR_3 = VAR_1->fidp->path.data;
VAR_5 = strrchr(VAR_3, '/'... | [
"static void FUNC_0(V9fsState *VAR_0, V9fsWstatState *VAR_1, int VAR_2)\n{",
"V9fsFidState *fidp;",
"if (VAR_2 < 0) {",
"goto out;",
"}",
"if (VAR_1->v9stat.name.size != 0) {",
"char *VAR_3, *VAR_4;",
"char *VAR_5;",
"VAR_3 = VAR_1->fidp->path.data;",
"VAR_5 = strrchr(VAR_3, '/');",
"if (VAR_5) ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
43
],
[
45,
47
],
[
49
],
[... |
20,825 | static int mpeg4video_probe(AVProbeData *probe_packet)
{
uint32_t temp_buffer= -1;
int VO=0, VOL=0, VOP = 0, VISO = 0, res=0;
int i;
for(i=0; i<probe_packet->buf_size; i++){
temp_buffer = (temp_buffer<<8) + probe_packet->buf[i];
if ((temp_buffer & 0xffffff00) != 0x100)
... | false | FFmpeg | 7c1835c52a4be2e4e996f83c91a8d5a147b01100 | static int mpeg4video_probe(AVProbeData *probe_packet)
{
uint32_t temp_buffer= -1;
int VO=0, VOL=0, VOP = 0, VISO = 0, res=0;
int i;
for(i=0; i<probe_packet->buf_size; i++){
temp_buffer = (temp_buffer<<8) + probe_packet->buf[i];
if ((temp_buffer & 0xffffff00) != 0x100)
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVProbeData *VAR_0)
{
uint32_t temp_buffer= -1;
int VAR_1=0, VAR_2=0, VAR_3 = 0, VAR_4 = 0, VAR_5=0;
int VAR_6;
for(VAR_6=0; VAR_6<VAR_0->buf_size; VAR_6++){
temp_buffer = (temp_buffer<<8) + VAR_0->buf[VAR_6];
if ((temp_buffer & 0xffffff00) != 0x100)
... | [
"static int FUNC_0(AVProbeData *VAR_0)\n{",
"uint32_t temp_buffer= -1;",
"int VAR_1=0, VAR_2=0, VAR_3 = 0, VAR_4 = 0, VAR_5=0;",
"int VAR_6;",
"for(VAR_6=0; VAR_6<VAR_0->buf_size; VAR_6++){",
"temp_buffer = (temp_buffer<<8) + VAR_0->buf[VAR_6];",
"if ((temp_buffer & 0xffffff00) != 0x100)\ncontinue;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17,
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
39,
41
],
[
43
],
[
45
]
] |
20,827 | static BlockDriverAIOCB *raw_aio_writev(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
BDRVRawState *s = bs->opaque;
return paio_submit(bs, s->hfile, sector_num, qiov, nb_sector... | false | qemu | a27365265cc2fed1178bf25a205e8ee02a9c0caf | static BlockDriverAIOCB *raw_aio_writev(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
BDRVRawState *s = bs->opaque;
return paio_submit(bs, s->hfile, sector_num, qiov, nb_sector... | {
"code": [],
"line_no": []
} | static BlockDriverAIOCB *FUNC_0(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
BDRVRawState *s = bs->opaque;
return paio_submit(bs, s->hfile, sector_num, qiov, nb_sectors,
... | [
"static BlockDriverAIOCB *FUNC_0(BlockDriverState *bs,\nint64_t sector_num, QEMUIOVector *qiov, int nb_sectors,\nBlockDriverCompletionFunc *cb, void *opaque)\n{",
"BDRVRawState *s = bs->opaque;",
"return paio_submit(bs, s->hfile, sector_num, qiov, nb_sectors,\ncb, opaque, QEMU_AIO_WRITE);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11,
13
],
[
15
]
] |
20,828 | static int usb_serial_handle_control(USBDevice *dev, int request, int value,
int index, int length, uint8_t *data)
{
USBSerialState *s = (USBSerialState *)dev;
int ret;
DPRINTF("got control %x, value %x\n",request, value);
ret = usb_desc_handle_control(dev, requ... | false | qemu | a980a065fb5e86d6dec337e6cb6ff432f1a143c9 | static int usb_serial_handle_control(USBDevice *dev, int request, int value,
int index, int length, uint8_t *data)
{
USBSerialState *s = (USBSerialState *)dev;
int ret;
DPRINTF("got control %x, value %x\n",request, value);
ret = usb_desc_handle_control(dev, requ... | {
"code": [],
"line_no": []
} | static int FUNC_0(USBDevice *VAR_0, int VAR_1, int VAR_2,
int VAR_3, int VAR_4, uint8_t *VAR_5)
{
USBSerialState *s = (USBSerialState *)VAR_0;
int VAR_6;
DPRINTF("got control %x, VAR_2 %x\n",VAR_1, VAR_2);
VAR_6 = usb_desc_handle_control(VAR_0, VAR_1, VAR_2, VAR... | [
"static int FUNC_0(USBDevice *VAR_0, int VAR_1, int VAR_2,\nint VAR_3, int VAR_4, uint8_t *VAR_5)\n{",
"USBSerialState *s = (USBSerialState *)VAR_0;",
"int VAR_6;",
"DPRINTF(\"got control %x, VAR_2 %x\\n\",VAR_1, VAR_2);",
"VAR_6 = usb_desc_handle_control(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5);",
"if (... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27
],
[
29,
31,
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
... |
20,829 | static void test_acpi_piix4_tcg_cphp(void)
{
test_data data;
memset(&data, 0, sizeof(data));
data.machine = MACHINE_PC;
data.variant = ".cphp";
test_acpi_one("-smp 2,cores=3,sockets=2,maxcpus=6"
" -numa node -numa node",
&data);
free_test_data(&data... | false | qemu | fda4096fca83dcdc72e0fc0e4a1ae6e7724fb5e0 | static void test_acpi_piix4_tcg_cphp(void)
{
test_data data;
memset(&data, 0, sizeof(data));
data.machine = MACHINE_PC;
data.variant = ".cphp";
test_acpi_one("-smp 2,cores=3,sockets=2,maxcpus=6"
" -numa node -numa node",
&data);
free_test_data(&data... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
test_data data;
memset(&data, 0, sizeof(data));
data.machine = MACHINE_PC;
data.variant = ".cphp";
test_acpi_one("-smp 2,cores=3,sockets=2,maxcpus=6"
" -numa node -numa node",
&data);
free_test_data(&data);
}
| [
"static void FUNC_0(void)\n{",
"test_data data;",
"memset(&data, 0, sizeof(data));",
"data.machine = MACHINE_PC;",
"data.variant = \".cphp\";",
"test_acpi_one(\"-smp 2,cores=3,sockets=2,maxcpus=6\"\n\" -numa node -numa node\",\n&data);",
"free_test_data(&data);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15,
17,
19
],
[
21
],
[
23
]
] |
20,830 | static void ide_dev_set_bootindex(Object *obj, Visitor *v, const char *name,
void *opaque, Error **errp)
{
IDEDevice *d = IDE_DEVICE(obj);
int32_t boot_index;
Error *local_err = NULL;
visit_type_int32(v, name, &boot_index, &local_err);
if (local_err) {
... | false | qemu | 621ff94d5074d88253a5818c6b9c4db718fbfc65 | static void ide_dev_set_bootindex(Object *obj, Visitor *v, const char *name,
void *opaque, Error **errp)
{
IDEDevice *d = IDE_DEVICE(obj);
int32_t boot_index;
Error *local_err = NULL;
visit_type_int32(v, name, &boot_index, &local_err);
if (local_err) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0(Object *VAR_0, Visitor *VAR_1, const char *VAR_2,
void *VAR_3, Error **VAR_4)
{
IDEDevice *d = IDE_DEVICE(VAR_0);
int32_t boot_index;
Error *local_err = NULL;
visit_type_int32(VAR_1, VAR_2, &boot_index, &local_err);
if (local_err) {
... | [
"static void FUNC_0(Object *VAR_0, Visitor *VAR_1, const char *VAR_2,\nvoid *VAR_3, Error **VAR_4)\n{",
"IDEDevice *d = IDE_DEVICE(VAR_0);",
"int32_t boot_index;",
"Error *local_err = NULL;",
"visit_type_int32(VAR_1, VAR_2, &boot_index, &local_err);",
"if (local_err) {",
"goto out;",
"}",
"check_boo... | [
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
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
39
],
[
41,
43
],
[
45
],
[
47,
49
],
[
51
],
[... |
20,832 | static void virtser_port_device_realize(DeviceState *dev, Error **errp)
{
VirtIOSerialPort *port = VIRTIO_SERIAL_PORT(dev);
VirtIOSerialPortClass *vsc = VIRTIO_SERIAL_PORT_GET_CLASS(port);
VirtIOSerialBus *bus = VIRTIO_SERIAL_BUS(qdev_get_parent_bus(dev));
int max_nr_ports;
bool plugging_port0... | false | qemu | 51b19ebe4320f3dcd93cea71235c1219318ddfd2 | static void virtser_port_device_realize(DeviceState *dev, Error **errp)
{
VirtIOSerialPort *port = VIRTIO_SERIAL_PORT(dev);
VirtIOSerialPortClass *vsc = VIRTIO_SERIAL_PORT_GET_CLASS(port);
VirtIOSerialBus *bus = VIRTIO_SERIAL_BUS(qdev_get_parent_bus(dev));
int max_nr_ports;
bool plugging_port0... | {
"code": [],
"line_no": []
} | static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)
{
VirtIOSerialPort *port = VIRTIO_SERIAL_PORT(VAR_0);
VirtIOSerialPortClass *vsc = VIRTIO_SERIAL_PORT_GET_CLASS(port);
VirtIOSerialBus *bus = VIRTIO_SERIAL_BUS(qdev_get_parent_bus(VAR_0));
int VAR_2;
bool plugging_port0;
Error *err = N... | [
"static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)\n{",
"VirtIOSerialPort *port = VIRTIO_SERIAL_PORT(VAR_0);",
"VirtIOSerialPortClass *vsc = VIRTIO_SERIAL_PORT_GET_CLASS(port);",
"VirtIOSerialBus *bus = VIRTIO_SERIAL_BUS(qdev_get_parent_bus(VAR_0));",
"int VAR_2;",
"bool plugging_port0;",
"Error *er... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
39
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[
55
],
[
57,
59
],
[
61
],
[
63
... |
20,833 | void *av_malloc(unsigned int size)
{
void *ptr = NULL;
#if CONFIG_MEMALIGN_HACK
long diff;
#endif
/* let's disallow possible ambiguous cases */
if(size > (INT_MAX-16) )
return NULL;
#if CONFIG_MEMALIGN_HACK
ptr = malloc(size+16);
if(!ptr)
return ptr;
diff= ((... | true | FFmpeg | a90de11dba816f57d01cf10b02eaaf90de24d5bb | void *av_malloc(unsigned int size)
{
void *ptr = NULL;
#if CONFIG_MEMALIGN_HACK
long diff;
#endif
if(size > (INT_MAX-16) )
return NULL;
#if CONFIG_MEMALIGN_HACK
ptr = malloc(size+16);
if(!ptr)
return ptr;
diff= ((-(long)ptr - 1)&15) + 1;
ptr = (char*)pt... | {
"code": [
" posix_memalign(&ptr,16,size);"
],
"line_no": [
39
]
} | void *FUNC_0(unsigned int VAR_0)
{
void *VAR_1 = NULL;
#if CONFIG_MEMALIGN_HACK
long diff;
#endif
if(VAR_0 > (INT_MAX-16) )
return NULL;
#if CONFIG_MEMALIGN_HACK
VAR_1 = malloc(VAR_0+16);
if(!VAR_1)
return VAR_1;
diff= ((-(long)VAR_1 - 1)&15) + 1;
VAR_1... | [
"void *FUNC_0(unsigned int VAR_0)\n{",
"void *VAR_1 = NULL;",
"#if CONFIG_MEMALIGN_HACK\nlong diff;",
"#endif\nif(VAR_0 > (INT_MAX-16) )\nreturn NULL;",
"#if CONFIG_MEMALIGN_HACK\nVAR_1 = malloc(VAR_0+16);",
"if(!VAR_1)\nreturn VAR_1;",
"diff= ((-(long)VAR_1 - 1)&15) + 1;",
"VAR_1 = (char*)VAR_1 + dif... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11,
17,
19
],
[
23,
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41,
43
],
[
97,
99
],
[
101,
103
],
[
105
]
] |
20,834 | static int do_token_in(USBDevice *s, USBPacket *p)
{
int request, value, index;
int ret = 0;
if (p->devep != 0)
return s->info->handle_data(s, p);
request = (s->setup_buf[0] << 8) | s->setup_buf[1];
value = (s->setup_buf[3] << 8) | s->setup_buf[2];
index = (s->setup_buf[5... | true | qemu | 4f4321c11ff6e98583846bfd6f0e81954924b003 | static int do_token_in(USBDevice *s, USBPacket *p)
{
int request, value, index;
int ret = 0;
if (p->devep != 0)
return s->info->handle_data(s, p);
request = (s->setup_buf[0] << 8) | s->setup_buf[1];
value = (s->setup_buf[3] << 8) | s->setup_buf[2];
index = (s->setup_buf[5... | {
"code": [
" if (len > p->len)",
" len = p->len;",
" memcpy(p->data, s->data_buf + s->setup_index, len);",
" if (len > p->len)",
" len = p->len;"
],
"line_no": [
65,
67,
69,
65,
67
]
} | static int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)
{
int VAR_2, VAR_3, VAR_4;
int VAR_5 = 0;
if (VAR_1->devep != 0)
return VAR_0->info->handle_data(VAR_0, VAR_1);
VAR_2 = (VAR_0->setup_buf[0] << 8) | VAR_0->setup_buf[1];
VAR_3 = (VAR_0->setup_buf[3] << 8) | VAR_0->setup_buf[2... | [
"static int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4;",
"int VAR_5 = 0;",
"if (VAR_1->devep != 0)\nreturn VAR_0->info->handle_data(VAR_0, VAR_1);",
"VAR_2 = (VAR_0->setup_buf[0] << 8) | VAR_0->setup_buf[1];",
"VAR_3 = (VAR_0->setup_buf[3] << 8) | VAR_0->setup_buf[2];",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27,
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
[
55... |
20,836 | static int qemu_chr_open_socket(QemuOpts *opts, CharDriverState **_chr)
{
CharDriverState *chr = NULL;
TCPCharDriver *s = NULL;
int fd = -1;
int is_listen;
int is_waitconnect;
int do_nodelay;
int is_unix;
int is_telnet;
int ret;
is_listen = qemu_opt_get_bool(opt... | true | qemu | 1f51470d044852592922f91000e741c381582cdc | static int qemu_chr_open_socket(QemuOpts *opts, CharDriverState **_chr)
{
CharDriverState *chr = NULL;
TCPCharDriver *s = NULL;
int fd = -1;
int is_listen;
int is_waitconnect;
int do_nodelay;
int is_unix;
int is_telnet;
int ret;
is_listen = qemu_opt_get_bool(opt... | {
"code": [
" *_chr = chr;",
" return 0;",
" *_chr = chr;",
" return 0;",
" *_chr = chr;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" *_chr = chr;",
" return 0;",
" *_chr = chr;",
" return 0;",
" *_chr = c... | static int FUNC_0(QemuOpts *VAR_0, CharDriverState **VAR_1)
{
CharDriverState *chr = NULL;
TCPCharDriver *s = NULL;
int VAR_2 = -1;
int VAR_3;
int VAR_4;
int VAR_5;
int VAR_6;
int VAR_7;
int VAR_8;
VAR_3 = qemu_opt_get_bool(VAR_0, "server", 0);
VAR_4 = qemu... | [
"static int FUNC_0(QemuOpts *VAR_0, CharDriverState **VAR_1)\n{",
"CharDriverState *chr = NULL;",
"TCPCharDriver *s = NULL;",
"int VAR_2 = -1;",
"int VAR_3;",
"int VAR_4;",
"int VAR_5;",
"int VAR_6;",
"int VAR_7;",
"int VAR_8;",
"VAR_3 = qemu_opt_get_bool(VAR_0, \"server\", 0);",
"VAR_4 =... | [
1,
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,
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... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
41
],
[
43
],
[
47
],
[... |
20,837 | static void imx_serial_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
IMXSerialState *s = (IMXSerialState *)opaque;
unsigned char ch;
DPRINTF("write(offset=0x%" HWADDR_PRIx ", value = 0x%x) to %s\n",
offset, (unsigned int)value, s->chr ? ... | true | qemu | 6ab3fc32ea640026726bc5f9f4db622d0954fb8a | static void imx_serial_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
IMXSerialState *s = (IMXSerialState *)opaque;
unsigned char ch;
DPRINTF("write(offset=0x%" HWADDR_PRIx ", value = 0x%x) to %s\n",
offset, (unsigned int)value, s->chr ? ... | {
"code": [
" qemu_chr_fe_write(s->chr, &ch, 1);",
" qemu_chr_fe_write(s->chr, &ch, 1);"
],
"line_no": [
29,
29
]
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
IMXSerialState *s = (IMXSerialState *)VAR_0;
unsigned char VAR_4;
DPRINTF("write(VAR_1=0x%" HWADDR_PRIx ", VAR_2 = 0x%x) to %s\n",
VAR_1, (unsigned int)VAR_2, s->chr ? s->chr->lab... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"IMXSerialState *s = (IMXSerialState *)VAR_0;",
"unsigned char VAR_4;",
"DPRINTF(\"write(VAR_1=0x%\" HWADDR_PRIx \", VAR_2 = 0x%x) to %s\\n\",\nVAR_1, (unsigned int)VAR_2, s->chr ? s->chr->label : \"NODEV\");",
"switch (VAR... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47,
49
],
[
53
... |
20,838 | static void numa_add(const char *optarg)
{
char option[128];
char *endptr;
unsigned long long value, endvalue;
unsigned long long nodenr;
value = endvalue = 0ULL;
optarg = get_opt_name(option, 128, optarg, ',');
if (*optarg == ',') {
optarg++;
}
if (!strcmp(opt... | true | qemu | 5f1399651eaab1b04e49107250d182968a227aa6 | static void numa_add(const char *optarg)
{
char option[128];
char *endptr;
unsigned long long value, endvalue;
unsigned long long nodenr;
value = endvalue = 0ULL;
optarg = get_opt_name(option, 128, optarg, ',');
if (*optarg == ',') {
optarg++;
}
if (!strcmp(opt... | {
"code": [
" nodenr = strtoull(option, NULL, 10);"
],
"line_no": [
47
]
} | static void FUNC_0(const char *VAR_0)
{
char VAR_1[128];
char *VAR_2;
unsigned long long VAR_3, VAR_4;
unsigned long long VAR_5;
VAR_3 = VAR_4 = 0ULL;
VAR_0 = get_opt_name(VAR_1, 128, VAR_0, ',');
if (*VAR_0 == ',') {
VAR_0++;
}
if (!strcmp(VAR_1, "node")) {
... | [
"static void FUNC_0(const char *VAR_0)\n{",
"char VAR_1[128];",
"char *VAR_2;",
"unsigned long long VAR_3, VAR_4;",
"unsigned long long VAR_5;",
"VAR_3 = VAR_4 = 0ULL;",
"VAR_0 = get_opt_name(VAR_1, 128, VAR_0, ',');",
"if (*VAR_0 == ',') {",
"VAR_0++;",
"}",
"if (!strcmp(VAR_1, \"node\")) {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
20,839 | static int sap_read_header(AVFormatContext *s)
{
struct SAPState *sap = s->priv_data;
char host[1024], path[1024], url[1024];
uint8_t recvbuf[RTP_MAX_PACKET_LENGTH];
int port;
int ret, i;
AVInputFormat* infmt;
if (!ff_network_init())
return AVERROR(EIO);
av_url_spli... | true | FFmpeg | 4641ae352ec587355764ffd5c43dd0d0ebd47654 | static int sap_read_header(AVFormatContext *s)
{
struct SAPState *sap = s->priv_data;
char host[1024], path[1024], url[1024];
uint8_t recvbuf[RTP_MAX_PACKET_LENGTH];
int port;
int ret, i;
AVInputFormat* infmt;
if (!ff_network_init())
return AVERROR(EIO);
av_url_spli... | {
"code": [
" av_assert0(!sap->sdp_ctx->codec_whitelist && !sap->sdp_ctx->format_whitelist);",
" sap->sdp_ctx-> codec_whitelist = av_strdup(s->codec_whitelist);",
" sap->sdp_ctx->format_whitelist = av_strdup(s->format_whitelist);"
],
"line_no": [
199,
201,
203
]
} | static int FUNC_0(AVFormatContext *VAR_0)
{
struct SAPState *VAR_1 = VAR_0->priv_data;
char VAR_2[1024], VAR_3[1024], VAR_4[1024];
uint8_t recvbuf[RTP_MAX_PACKET_LENGTH];
int VAR_5;
int VAR_6, VAR_7;
AVInputFormat* infmt;
if (!ff_network_init())
return AVERROR(EIO);
... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"struct SAPState *VAR_1 = VAR_0->priv_data;",
"char VAR_2[1024], VAR_3[1024], VAR_4[1024];",
"uint8_t recvbuf[RTP_MAX_PACKET_LENGTH];",
"int VAR_5;",
"int VAR_6, VAR_7;",
"AVInputFormat* infmt;",
"if (!ff_network_init())\nreturn AVERROR(EIO);",
"av_url... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25,
27
],
[
29,
31
],
[
35
],
[
39
],
[
41
],
[
45,
47
],
[
49,
51
],
[
53,
55
],
[
59
... |
20,841 | static void arm_gic_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(klass);
ARMGICClass *agc = ARM_GIC_CLASS(klass);
agc->parent_init = sbc->init;
sbc->init = arm_gic_init;
dc->no_user = 1;
}
| true | qemu | 53111180946a56d314a9c1d07d09b9ef91e847b9 | static void arm_gic_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(klass);
ARMGICClass *agc = ARM_GIC_CLASS(klass);
agc->parent_init = sbc->init;
sbc->init = arm_gic_init;
dc->no_user = 1;
}
| {
"code": [
" SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(klass);",
" agc->parent_init = sbc->init;",
" sbc->init = arm_gic_init;"
],
"line_no": [
7,
11,
13
]
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(VAR_0);
ARMGICClass *agc = ARM_GIC_CLASS(VAR_0);
agc->parent_init = sbc->init;
sbc->init = arm_gic_init;
dc->no_user = 1;
}
| [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(VAR_0);",
"ARMGICClass *agc = ARM_GIC_CLASS(VAR_0);",
"agc->parent_init = sbc->init;",
"sbc->init = arm_gic_init;",
"dc->no_user = 1;",
"}"
] | [
0,
0,
1,
0,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
20,842 | static inline int l2_unscale_group(int steps, int mant, int scale_factor)
{
int shift, mod, val;
shift = scale_factor_modshift[scale_factor];
mod = shift & 3;
shift >>= 2;
/* XXX: store the result directly */
val = (2 * (mant - (steps >> 1))) * scale_factor_mult2[steps >> 2][mod];
... | true | FFmpeg | 8155233413540c63e53a620ff5734fb4b0635611 | static inline int l2_unscale_group(int steps, int mant, int scale_factor)
{
int shift, mod, val;
shift = scale_factor_modshift[scale_factor];
mod = shift & 3;
shift >>= 2;
val = (2 * (mant - (steps >> 1))) * scale_factor_mult2[steps >> 2][mod];
return (val + (1 << (shift - 1))) >>... | {
"code": [
" val = (2 * (mant - (steps >> 1))) * scale_factor_mult2[steps >> 2][mod];",
" return (val + (1 << (shift - 1))) >> shift;"
],
"line_no": [
17,
19
]
} | static inline int FUNC_0(int VAR_0, int VAR_1, int VAR_2)
{
int VAR_3, VAR_4, VAR_5;
VAR_3 = scale_factor_modshift[VAR_2];
VAR_4 = VAR_3 & 3;
VAR_3 >>= 2;
VAR_5 = (2 * (VAR_1 - (VAR_0 >> 1))) * scale_factor_mult2[VAR_0 >> 2][VAR_4];
return (VAR_5 + (1 << (VAR_3 - 1))) >> VAR_3;
}... | [
"static inline int FUNC_0(int VAR_0, int VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5;",
"VAR_3 = scale_factor_modshift[VAR_2];",
"VAR_4 = VAR_3 & 3;",
"VAR_3 >>= 2;",
"VAR_5 = (2 * (VAR_1 - (VAR_0 >> 1))) * scale_factor_mult2[VAR_0 >> 2][VAR_4];",
"return (VAR_5 + (1 << (VAR_3 - 1))) >> VAR_3;",
"... | [
0,
0,
0,
0,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
]
] |
20,843 | static void init_proc_970 (CPUPPCState *env)
{
gen_spr_ne_601(env);
gen_spr_7xx(env);
/* Time base */
gen_tbl(env);
/* Hardware implementation registers */
/* XXX : not implemented */
spr_register(env, SPR_HID0, "HID0",
SPR_NOACCESS, SPR_NOACCESS,
... | true | qemu | faadf50e2962dd54175647a80bd6fc4319c91973 | static void init_proc_970 (CPUPPCState *env)
{
gen_spr_ne_601(env);
gen_spr_7xx(env);
gen_tbl(env);
spr_register(env, SPR_HID0, "HID0",
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_clear,
0x60000000);
sp... | {
"code": [
"#endif",
" env->excp_prefix = 0xFFF00000;",
" env->excp_prefix = 0xFFF00000;",
" 0x00000000);",
"#if !defined(CONFIG_USER_ONLY)",
" env->excp_prefix = 0xFFF00000;",
"#endif",
"#if !defined(CONFIG_USER_ONLY)",
" env->excp_prefix = 0xFFF00000;... | static void FUNC_0 (CPUPPCState *VAR_0)
{
gen_spr_ne_601(VAR_0);
gen_spr_7xx(VAR_0);
gen_tbl(VAR_0);
spr_register(VAR_0, SPR_HID0, "HID0",
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_clear,
0x60000000);
... | [
"static void FUNC_0 (CPUPPCState *VAR_0)\n{",
"gen_spr_ne_601(VAR_0);",
"gen_spr_7xx(VAR_0);",
"gen_tbl(VAR_0);",
"spr_register(VAR_0, SPR_HID0, \"HID0\",\nSPR_NOACCESS, SPR_NOACCESS,\n&spr_read_generic, &spr_write_clear,\n0x60000000);",
"spr_register(VAR_0, SPR_HID1, \"HID1\",\nSPR_NOACCESS, SPR_NOACCESS... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
17,
19,
21,
23
],
[
27,
29,
31,
33
],
[
37,
39,
41,
43
],
[
47,
49,
51,
53
],
[
59
],
[
63,
65,
67,
69
],
[
73,
75,
77,
79... |
20,844 | static int mov_write_header(AVFormatContext *s)
{
AVIOContext *pb = s->pb;
MOVMuxContext *mov = s->priv_data;
AVDictionaryEntry *t;
int i, hint_track = 0;
/* Default mode == MP4 */
mov->mode = MODE_MP4;
if (s->oformat != NULL) {
if (!strcmp("3gp", s->oformat->name)) mov-... | true | FFmpeg | a9553bbb336a7186c62b3b14a0499c1b6ba61ebd | static int mov_write_header(AVFormatContext *s)
{
AVIOContext *pb = s->pb;
MOVMuxContext *mov = s->priv_data;
AVDictionaryEntry *t;
int i, hint_track = 0;
mov->mode = MODE_MP4;
if (s->oformat != NULL) {
if (!strcmp("3gp", s->oformat->name)) mov->mode = MODE_3GP;
... | {
"code": [
" mov->mode == MODE_ISM ||",
" mov->flags |= FF_MOV_FLAG_EMPTY_MOOV | FF_MOV_FLAG_SEPARATE_MOOF;"
],
"line_no": [
45,
331
]
} | static int FUNC_0(AVFormatContext *VAR_0)
{
AVIOContext *pb = VAR_0->pb;
MOVMuxContext *mov = VAR_0->priv_data;
AVDictionaryEntry *t;
int VAR_1, VAR_2 = 0;
mov->mode = MODE_MP4;
if (VAR_0->oformat != NULL) {
if (!strcmp("3gp", VAR_0->oformat->name)) mov->mode = MODE_3GP... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"AVIOContext *pb = VAR_0->pb;",
"MOVMuxContext *mov = VAR_0->priv_data;",
"AVDictionaryEntry *t;",
"int VAR_1, VAR_2 = 0;",
"mov->mode = MODE_MP4;",
"if (VAR_0->oformat != NULL) {",
"if (!strcmp(\"3gp\", VAR_0->oformat->name)) mov->mode = MODE_3GP;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
43,
45,
47,
49,
51,
53
],
[
59
],
[
61,
63
... |
20,845 | static void arith2_normalise(ArithCoder *c)
{
while ((c->high >> 15) - (c->low >> 15) < 2) {
if ((c->low ^ c->high) & 0x10000) {
c->high ^= 0x8000;
c->value ^= 0x8000;
c->low ^= 0x8000;
}
c->high = c->high << 8 & 0xFFFFFF | 0xFF;
c->v... | true | FFmpeg | ce81e47c911fcff4f006b3b14b40a396eaa77696 | static void arith2_normalise(ArithCoder *c)
{
while ((c->high >> 15) - (c->low >> 15) < 2) {
if ((c->low ^ c->high) & 0x10000) {
c->high ^= 0x8000;
c->value ^= 0x8000;
c->low ^= 0x8000;
}
c->high = c->high << 8 & 0xFFFFFF | 0xFF;
c->v... | {
"code": [
" c->high = c->high << 8 & 0xFFFFFF | 0xFF;",
" c->value = c->value << 8 & 0xFFFFFF | bytestream2_get_byte(c->gbc.gB);",
" c->low = c->low << 8 & 0xFFFFFF;"
],
"line_no": [
17,
19,
21
]
} | static void FUNC_0(ArithCoder *VAR_0)
{
while ((VAR_0->high >> 15) - (VAR_0->low >> 15) < 2) {
if ((VAR_0->low ^ VAR_0->high) & 0x10000) {
VAR_0->high ^= 0x8000;
VAR_0->value ^= 0x8000;
VAR_0->low ^= 0x8000;
}
VAR_0->high = VAR_0->high << 8 & ... | [
"static void FUNC_0(ArithCoder *VAR_0)\n{",
"while ((VAR_0->high >> 15) - (VAR_0->low >> 15) < 2) {",
"if ((VAR_0->low ^ VAR_0->high) & 0x10000) {",
"VAR_0->high ^= 0x8000;",
"VAR_0->value ^= 0x8000;",
"VAR_0->low ^= 0x8000;",
"}",
"VAR_0->high = VAR_0->high << 8 & 0xFFFFFF | 0xFF;",
"VAR_0->va... | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
20,846 | static int usb_qdev_init(DeviceState *qdev, DeviceInfo *base)
{
USBDevice *dev = DO_UPCAST(USBDevice, qdev, qdev);
USBDeviceInfo *info = DO_UPCAST(USBDeviceInfo, qdev, base);
int rc;
pstrcpy(dev->product_desc, sizeof(dev->product_desc), info->product_desc);
dev->info = info;
dev->auto_a... | true | qemu | db3a5ed7e4422491dac1f83264ebb01f6667ffc8 | static int usb_qdev_init(DeviceState *qdev, DeviceInfo *base)
{
USBDevice *dev = DO_UPCAST(USBDevice, qdev, qdev);
USBDeviceInfo *info = DO_UPCAST(USBDeviceInfo, qdev, base);
int rc;
pstrcpy(dev->product_desc, sizeof(dev->product_desc), info->product_desc);
dev->info = info;
dev->auto_a... | {
"code": [
" goto err;",
" goto err;",
" goto err;",
"err:",
" usb_qdev_exit(qdev);",
" return rc;"
],
"line_no": [
25,
25,
43,
53,
55,
57
]
} | static int FUNC_0(DeviceState *VAR_0, DeviceInfo *VAR_1)
{
USBDevice *dev = DO_UPCAST(USBDevice, VAR_0, VAR_0);
USBDeviceInfo *info = DO_UPCAST(USBDeviceInfo, VAR_0, VAR_1);
int VAR_2;
pstrcpy(dev->product_desc, sizeof(dev->product_desc), info->product_desc);
dev->info = info;
dev->auto... | [
"static int FUNC_0(DeviceState *VAR_0, DeviceInfo *VAR_1)\n{",
"USBDevice *dev = DO_UPCAST(USBDevice, VAR_0, VAR_0);",
"USBDeviceInfo *info = DO_UPCAST(USBDeviceInfo, VAR_0, VAR_1);",
"int VAR_2;",
"pstrcpy(dev->product_desc, sizeof(dev->product_desc), info->product_desc);",
"dev->info = info;",
"dev->a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
20,847 | void ff_eval_coefs(int *coefs, const int *refl)
{
int buffer[LPC_ORDER];
int *b1 = buffer;
int *b2 = coefs;
int i, j;
for (i=0; i < LPC_ORDER; i++) {
b1[i] = refl[i] * 16;
for (j=0; j < i; j++)
b1[j] = ((refl[i] * b2[i-j-1]) >> 12) + b2[j];
FFSWAP(... | true | FFmpeg | 71da0a5c9750e9fd0c9609470f610d32952923eb | void ff_eval_coefs(int *coefs, const int *refl)
{
int buffer[LPC_ORDER];
int *b1 = buffer;
int *b2 = coefs;
int i, j;
for (i=0; i < LPC_ORDER; i++) {
b1[i] = refl[i] * 16;
for (j=0; j < i; j++)
b1[j] = ((refl[i] * b2[i-j-1]) >> 12) + b2[j];
FFSWAP(... | {
"code": [
" b1[j] = ((refl[i] * b2[i-j-1]) >> 12) + b2[j];"
],
"line_no": [
23
]
} | void FUNC_0(int *VAR_0, const int *VAR_1)
{
int VAR_2[LPC_ORDER];
int *VAR_3 = VAR_2;
int *VAR_4 = VAR_0;
int VAR_5, VAR_6;
for (VAR_5=0; VAR_5 < LPC_ORDER; VAR_5++) {
VAR_3[VAR_5] = VAR_1[VAR_5] * 16;
for (VAR_6=0; VAR_6 < VAR_5; VAR_6++)
VAR_3[VAR_6] = ((VA... | [
"void FUNC_0(int *VAR_0, const int *VAR_1)\n{",
"int VAR_2[LPC_ORDER];",
"int *VAR_3 = VAR_2;",
"int *VAR_4 = VAR_0;",
"int VAR_5, VAR_6;",
"for (VAR_5=0; VAR_5 < LPC_ORDER; VAR_5++) {",
"VAR_3[VAR_5] = VAR_1[VAR_5] * 16;",
"for (VAR_6=0; VAR_6 < VAR_5; VAR_6++)",
"VAR_3[VAR_6] = ((VAR_1[VAR_5] * VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
]
] |
20,848 | static int decode_hq_slice(DiracContext *s, DiracSlice *slice, uint8_t *tmp_buf)
{
int i, level, orientation, quant_idx;
int qfactor[MAX_DWT_LEVELS][4], qoffset[MAX_DWT_LEVELS][4];
GetBitContext *gb = &slice->gb;
SliceCoeffs coeffs_num[MAX_DWT_LEVELS];
skip_bits_long(gb, 8*s->highquality.pre... | true | FFmpeg | b946bd8ef2c7aeee09469a4901182a44f9b67189 | static int decode_hq_slice(DiracContext *s, DiracSlice *slice, uint8_t *tmp_buf)
{
int i, level, orientation, quant_idx;
int qfactor[MAX_DWT_LEVELS][4], qoffset[MAX_DWT_LEVELS][4];
GetBitContext *gb = &slice->gb;
SliceCoeffs coeffs_num[MAX_DWT_LEVELS];
skip_bits_long(gb, 8*s->highquality.pre... | {
"code": [
" if (quant_idx > DIRAC_MAX_QUANT_INDEX) {"
],
"line_no": [
21
]
} | static int FUNC_0(DiracContext *VAR_0, DiracSlice *VAR_1, uint8_t *VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6;
int VAR_7[MAX_DWT_LEVELS][4], qoffset[MAX_DWT_LEVELS][4];
GetBitContext *gb = &VAR_1->gb;
SliceCoeffs coeffs_num[MAX_DWT_LEVELS];
skip_bits_long(gb, 8*VAR_0->highquality.prefix_bytes);... | [
"static int FUNC_0(DiracContext *VAR_0, DiracSlice *VAR_1, uint8_t *VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6;",
"int VAR_7[MAX_DWT_LEVELS][4], qoffset[MAX_DWT_LEVELS][4];",
"GetBitContext *gb = &VAR_1->gb;",
"SliceCoeffs coeffs_num[MAX_DWT_LEVELS];",
"skip_bits_long(gb, 8*VAR_0->highquality.prefix_byte... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
51
],
[
53
... |
20,849 | static int ff_h261_resync(H261Context *h){
MpegEncContext * const s = &h->s;
int left, ret;
if(show_bits(&s->gb, 15)==0){
ret= h261_decode_gob_header(h);
if(ret>=0)
return 0;
}
//ok, its not where its supposed to be ...
s->gb= s->last_resync_gb;
align_... | true | FFmpeg | 49e5dcbce5f9e08ec375fd54c413148beb81f1d7 | static int ff_h261_resync(H261Context *h){
MpegEncContext * const s = &h->s;
int left, ret;
if(show_bits(&s->gb, 15)==0){
ret= h261_decode_gob_header(h);
if(ret>=0)
return 0;
}
s->gb= s->last_resync_gb;
align_get_bits(&s->gb);
left= s->gb.size_in... | {
"code": [
" if(show_bits(&s->gb, 15)==0){",
" s->gb= s->last_resync_gb;",
" align_get_bits(&s->gb);",
" left= s->gb.size_in_bits - get_bits_count(&s->gb);",
" for(;left>15+1+4+5; left-=8){",
" GetBitContext bak= s->gb;",
" s->gb= bak;",
" s... | static int FUNC_0(H261Context *VAR_0){
MpegEncContext * const s = &VAR_0->s;
int VAR_1, VAR_2;
if(show_bits(&s->gb, 15)==0){
VAR_2= h261_decode_gob_header(VAR_0);
if(VAR_2>=0)
return 0;
}
s->gb= s->last_resync_gb;
align_get_bits(&s->gb);
VAR_1= s... | [
"static int FUNC_0(H261Context *VAR_0){",
"MpegEncContext * const s = &VAR_0->s;",
"int VAR_1, VAR_2;",
"if(show_bits(&s->gb, 15)==0){",
"VAR_2= h261_decode_gob_header(VAR_0);",
"if(VAR_2>=0)\nreturn 0;",
"}",
"s->gb= s->last_resync_gb;",
"align_get_bits(&s->gb);",
"VAR_1= s->gb.size_in_bits - get... | [
0,
0,
0,
1,
0,
0,
0,
1,
1,
1,
1,
0,
1,
0,
0,
1,
0,
1,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39,
41
],
[
45
],
[
47
],
[
49
],
[
51
],
... |
20,850 | static int epic_decode_tile(ePICContext *dc, uint8_t *out, int tile_height,
int tile_width, int stride)
{
int x, y;
uint32_t pix;
uint32_t *curr_row = NULL, *above_row = NULL, *above2_row;
for (y = 0; y < tile_height; y++, out += stride) {
above2_row = above_... | true | FFmpeg | 030c7f0309ec0e3cadb990408b4bb9b7fd739425 | static int epic_decode_tile(ePICContext *dc, uint8_t *out, int tile_height,
int tile_width, int stride)
{
int x, y;
uint32_t pix;
uint32_t *curr_row = NULL, *above_row = NULL, *above2_row;
for (y = 0; y < tile_height; y++, out += stride) {
above2_row = above_... | {
"code": [
" } else"
],
"line_no": [
63
]
} | static int FUNC_0(ePICContext *VAR_0, uint8_t *VAR_1, int VAR_2,
int VAR_3, int VAR_4)
{
int VAR_5, VAR_6;
uint32_t pix;
uint32_t *curr_row = NULL, *above_row = NULL, *above2_row;
for (VAR_6 = 0; VAR_6 < VAR_2; VAR_6++, VAR_1 += VAR_4) {
above2_row = above_ro... | [
"static int FUNC_0(ePICContext *VAR_0, uint8_t *VAR_1, int VAR_2,\nint VAR_3, int VAR_4)\n{",
"int VAR_5, VAR_6;",
"uint32_t pix;",
"uint32_t *curr_row = NULL, *above_row = NULL, *above2_row;",
"for (VAR_6 = 0; VAR_6 < VAR_2; VAR_6++, VAR_1 += VAR_4) {",
"above2_row = above_row;",
"above_row = curr_row... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27,
29
],
[
33
],
[
37,
39,
41,
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[... |
20,851 | int ff_h264_context_init(H264Context *h)
{
ERContext *er = &h->er;
int mb_array_size = h->mb_height * h->mb_stride;
int y_size = (2 * h->mb_width + 1) * (2 * h->mb_height + 1);
int c_size = h->mb_stride * (h->mb_height + 1);
int yc_size = y_size + 2 * c_size;
int x, y, i;
FF_AL... | false | FFmpeg | cf1e0786ed64e69614760bfb4ecd7adbde8e6094 | int ff_h264_context_init(H264Context *h)
{
ERContext *er = &h->er;
int mb_array_size = h->mb_height * h->mb_stride;
int y_size = (2 * h->mb_width + 1) * (2 * h->mb_height + 1);
int c_size = h->mb_stride * (h->mb_height + 1);
int yc_size = y_size + 2 * c_size;
int x, y, i;
FF_AL... | {
"code": [],
"line_no": []
} | int FUNC_0(H264Context *VAR_0)
{
ERContext *er = &VAR_0->er;
int VAR_1 = VAR_0->mb_height * VAR_0->mb_stride;
int VAR_2 = (2 * VAR_0->mb_width + 1) * (2 * VAR_0->mb_height + 1);
int VAR_3 = VAR_0->mb_stride * (VAR_0->mb_height + 1);
int VAR_4 = VAR_2 + 2 * VAR_3;
int VAR_5, VAR_6, VAR... | [
"int FUNC_0(H264Context *VAR_0)\n{",
"ERContext *er = &VAR_0->er;",
"int VAR_1 = VAR_0->mb_height * VAR_0->mb_stride;",
"int VAR_2 = (2 * VAR_0->mb_width + 1) * (2 * VAR_0->mb_height + 1);",
"int VAR_3 = VAR_0->mb_stride * (VAR_0->mb_height + 1);",
"int VAR_4 = VAR_2 + 2 * VAR_3;",
"int VAR_5, VAR_6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
29,
31,
33,
35,
37,
39
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
59
],
[... |
20,852 | static int thp_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
ThpDemuxContext *thp = s->priv_data;
AVIOContext *pb = s->pb;
unsigned int size;
int ret;
if (thp->audiosize == 0) {
/* Terminate when last frame is reached. */
if (thp->frame >= t... | false | FFmpeg | 6c4b87d3d6ae08a6da16b4616626b4d2a726afbf | static int thp_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
ThpDemuxContext *thp = s->priv_data;
AVIOContext *pb = s->pb;
unsigned int size;
int ret;
if (thp->audiosize == 0) {
if (thp->frame >= thp->framecnt)
return AVERROR_EO... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0,
AVPacket *VAR_1)
{
ThpDemuxContext *thp = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
unsigned int VAR_2;
int VAR_3;
if (thp->audiosize == 0) {
if (thp->frame >= thp->framecnt)
return AV... | [
"static int FUNC_0(AVFormatContext *VAR_0,\nAVPacket *VAR_1)\n{",
"ThpDemuxContext *thp = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"unsigned int VAR_2;",
"int VAR_3;",
"if (thp->audiosize == 0) {",
"if (thp->frame >= thp->framecnt)\nreturn AVERROR_EOF;",
"avio_seek(pb, thp->next_frame, SEEK... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
21,
23
],
[
27
],
[
33
],
[
35
],
[
39
],
[
41
],
[
49,
51
],
[
53,
55
],
[
59
],
[
61
],
[
63
],
[
65
... |
20,853 | static int execute_code(AVCodecContext * avctx, int c)
{
AnsiContext *s = avctx->priv_data;
int ret, i, width, height;
switch(c) {
case 'A': //Cursor Up
s->y = FFMAX(s->y - (s->nb_args > 0 ? s->args[0]*s->font_height : s->font_height), 0);
break;
case 'B': //Cursor Down
... | false | FFmpeg | 0ea55365b91c250012ac8a80be5f0ebacd4fd55d | static int execute_code(AVCodecContext * avctx, int c)
{
AnsiContext *s = avctx->priv_data;
int ret, i, width, height;
switch(c) {
case 'A':
s->y = FFMAX(s->y - (s->nb_args > 0 ? s->args[0]*s->font_height : s->font_height), 0);
break;
case 'B':
s->y = FFMIN(s->y + ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext * VAR_0, int VAR_1)
{
AnsiContext *s = VAR_0->priv_data;
int VAR_2, VAR_3, VAR_4, VAR_5;
switch(VAR_1) {
case 'A':
s->y = FFMAX(s->y - (s->nb_args > 0 ? s->args[0]*s->font_height : s->font_height), 0);
break;
case 'B':
s->y = FFMIN(... | [
"static int FUNC_0(AVCodecContext * VAR_0, int VAR_1)\n{",
"AnsiContext *s = VAR_0->priv_data;",
"int VAR_2, VAR_3, VAR_4, VAR_5;",
"switch(VAR_1) {",
"case 'A':\ns->y = FFMAX(s->y - (s->nb_args > 0 ? s->args[0]*s->font_height : s->font_height), 0);",
"break;",
"case 'B':\ns->y = FFMIN(s->y + (s->nb_arg... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37,
39
],
[
41
],
[
43
],
[
45,
47,
49,... |
20,854 | void ff_h264_filter_mb(H264Context *h, H264SliceContext *sl,
int mb_x, int mb_y,
uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr,
unsigned int linesize, unsigned int uvlinesize)
{
const int mb_xy= mb_x + mb_y*h->mb_stride;
const int mb_... | false | FFmpeg | e6c90ce94f1b07f50cea2babf7471af455cca0ff | void ff_h264_filter_mb(H264Context *h, H264SliceContext *sl,
int mb_x, int mb_y,
uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr,
unsigned int linesize, unsigned int uvlinesize)
{
const int mb_xy= mb_x + mb_y*h->mb_stride;
const int mb_... | {
"code": [],
"line_no": []
} | void FUNC_0(H264Context *VAR_0, H264SliceContext *VAR_1,
int VAR_2, int VAR_3,
uint8_t *VAR_4, uint8_t *VAR_5, uint8_t *VAR_6,
unsigned int VAR_7, unsigned int VAR_8)
{
const int VAR_9= VAR_2 + VAR_3*VAR_0->mb_stride;
const int VAR_10 = ... | [
"void FUNC_0(H264Context *VAR_0, H264SliceContext *VAR_1,\nint VAR_2, int VAR_3,\nuint8_t *VAR_4, uint8_t *VAR_5, uint8_t *VAR_6,\nunsigned int VAR_7, unsigned int VAR_8)\n{",
"const int VAR_9= VAR_2 + VAR_3*VAR_0->mb_stride;",
"const int VAR_10 = VAR_0->cur_pic.VAR_10[VAR_9];",
"const int VAR_11 = IS_INTERLA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29,
33,
37
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
],
[... |
20,855 | e1000_set_link_status(VLANClientState *nc)
{
E1000State *s = DO_UPCAST(NICState, nc, nc)->opaque;
uint32_t old_status = s->mac_reg[STATUS];
if (nc->link_down)
s->mac_reg[STATUS] &= ~E1000_STATUS_LU;
else
s->mac_reg[STATUS] |= E1000_STATUS_LU;
if (s->mac_reg[STATUS] != old... | true | qemu | d4044c2a6b9ba4a00dd653f515a4b0ebfcb7e125 | e1000_set_link_status(VLANClientState *nc)
{
E1000State *s = DO_UPCAST(NICState, nc, nc)->opaque;
uint32_t old_status = s->mac_reg[STATUS];
if (nc->link_down)
s->mac_reg[STATUS] &= ~E1000_STATUS_LU;
else
s->mac_reg[STATUS] |= E1000_STATUS_LU;
if (s->mac_reg[STATUS] != old... | {
"code": [
" if (nc->link_down)"
],
"line_no": [
11
]
} | FUNC_0(VLANClientState *VAR_0)
{
E1000State *s = DO_UPCAST(NICState, VAR_0, VAR_0)->opaque;
uint32_t old_status = s->mac_reg[STATUS];
if (VAR_0->link_down)
s->mac_reg[STATUS] &= ~E1000_STATUS_LU;
else
s->mac_reg[STATUS] |= E1000_STATUS_LU;
if (s->mac_reg[STATUS] != old_st... | [
"FUNC_0(VLANClientState *VAR_0)\n{",
"E1000State *s = DO_UPCAST(NICState, VAR_0, VAR_0)->opaque;",
"uint32_t old_status = s->mac_reg[STATUS];",
"if (VAR_0->link_down)\ns->mac_reg[STATUS] &= ~E1000_STATUS_LU;",
"else\ns->mac_reg[STATUS] |= E1000_STATUS_LU;",
"if (s->mac_reg[STATUS] != old_status)\nset_ics(... | [
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15,
17
],
[
21,
23
],
[
25
]
] |
20,857 | static void tcx_initfn(Object *obj)
{
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
TCXState *s = TCX(obj);
memory_region_init_ram(&s->rom, NULL, "tcx.prom", FCODE_MAX_ROM_SIZE,
&error_abort);
memory_region_set_readonly(&s->rom, true);
sysbus_init_mmio(sbd, &s->rom);
... | true | qemu | f8ed85ac992c48814d916d5df4d44f9a971c5de4 | static void tcx_initfn(Object *obj)
{
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
TCXState *s = TCX(obj);
memory_region_init_ram(&s->rom, NULL, "tcx.prom", FCODE_MAX_ROM_SIZE,
&error_abort);
memory_region_set_readonly(&s->rom, true);
sysbus_init_mmio(sbd, &s->rom);
... | {
"code": [
" &error_abort);",
" &error_abort);",
" &error_abort);",
" &error_abort);",
" &error_abort);",
" &error_abort);",
" ... | static void FUNC_0(Object *VAR_0)
{
SysBusDevice *sbd = SYS_BUS_DEVICE(VAR_0);
TCXState *s = TCX(VAR_0);
memory_region_init_ram(&s->rom, NULL, "tcx.prom", FCODE_MAX_ROM_SIZE,
&error_abort);
memory_region_set_readonly(&s->rom, true);
sysbus_init_mmio(sbd, &s->rom);... | [
"static void FUNC_0(Object *VAR_0)\n{",
"SysBusDevice *sbd = SYS_BUS_DEVICE(VAR_0);",
"TCXState *s = TCX(VAR_0);",
"memory_region_init_ram(&s->rom, NULL, \"tcx.prom\", FCODE_MAX_ROM_SIZE,\n&error_abort);",
"memory_region_set_readonly(&s->rom, true);",
"sysbus_init_mmio(sbd, &s->rom);",
"memory_region_in... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15
],
[
17
],
[
23,
25
],
[
27
],
[
33,
35
],
[
37
],
[
43,
45
],
[
47
],
[
53,
55
],
[
57
],
[
63,
65
],
[
67
],
[
73... |
20,858 | static int alloc_buffer(AVCodecContext *s, InputStream *ist, FrameBuffer **pbuf)
{
FrameBuffer *buf = av_mallocz(sizeof(*buf));
int i, ret;
const int pixel_size = av_pix_fmt_descriptors[s->pix_fmt].comp[0].step_minus1+1;
int h_chroma_shift, v_chroma_shift;
int edge = 32; // XXX should be avco... | true | FFmpeg | 60991ad6ae61e131085891c37e8e517b5014ce21 | static int alloc_buffer(AVCodecContext *s, InputStream *ist, FrameBuffer **pbuf)
{
FrameBuffer *buf = av_mallocz(sizeof(*buf));
int i, ret;
const int pixel_size = av_pix_fmt_descriptors[s->pix_fmt].comp[0].step_minus1+1;
int h_chroma_shift, v_chroma_shift;
int edge = 32;
int w = s->widt... | {
"code": [
" if (s->flags & CODEC_FLAG_EMU_EDGE)"
],
"line_no": [
69
]
} | static int FUNC_0(AVCodecContext *VAR_0, InputStream *VAR_1, FrameBuffer **VAR_2)
{
FrameBuffer *buf = av_mallocz(sizeof(*buf));
int VAR_3, VAR_4;
const int VAR_5 = av_pix_fmt_descriptors[VAR_0->pix_fmt].comp[0].step_minus1+1;
int VAR_6, VAR_7;
int VAR_8 = 32;
int VAR_9 = VAR_0->width, ... | [
"static int FUNC_0(AVCodecContext *VAR_0, InputStream *VAR_1, FrameBuffer **VAR_2)\n{",
"FrameBuffer *buf = av_mallocz(sizeof(*buf));",
"int VAR_3, VAR_4;",
"const int VAR_5 = av_pix_fmt_descriptors[VAR_0->pix_fmt].comp[0].step_minus1+1;",
"int VAR_6, VAR_7;",
"int VAR_8 = 32;",
"int VAR_9 = VAR_0->wid... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
57
],
[
61
... |
20,859 | static void x86_cpu_initfn(Object *obj)
{
CPUState *cs = CPU(obj);
X86CPU *cpu = X86_CPU(obj);
X86CPUClass *xcc = X86_CPU_GET_CLASS(obj);
CPUX86State *env = &cpu->env;
FeatureWord w;
cs->env_ptr = env;
object_property_add(obj, "family", "int",
x86_cpuid_version_get_fa... | true | qemu | d187e08dc4d0793dab1a9747b72b17a1cf0d3e43 | static void x86_cpu_initfn(Object *obj)
{
CPUState *cs = CPU(obj);
X86CPU *cpu = X86_CPU(obj);
X86CPUClass *xcc = X86_CPU_GET_CLASS(obj);
CPUX86State *env = &cpu->env;
FeatureWord w;
cs->env_ptr = env;
object_property_add(obj, "family", "int",
x86_cpuid_version_get_fa... | {
"code": [],
"line_no": []
} | static void FUNC_0(Object *VAR_0)
{
CPUState *cs = CPU(VAR_0);
X86CPU *cpu = X86_CPU(VAR_0);
X86CPUClass *xcc = X86_CPU_GET_CLASS(VAR_0);
CPUX86State *env = &cpu->env;
FeatureWord w;
cs->env_ptr = env;
object_property_add(VAR_0, "family", "int",
x86_cpuid_version_get_... | [
"static void FUNC_0(Object *VAR_0)\n{",
"CPUState *cs = CPU(VAR_0);",
"X86CPU *cpu = X86_CPU(VAR_0);",
"X86CPUClass *xcc = X86_CPU_GET_CLASS(VAR_0);",
"CPUX86State *env = &cpu->env;",
"FeatureWord w;",
"cs->env_ptr = env;",
"object_property_add(VAR_0, \"family\", \"int\",\nx86_cpuid_version_get_family... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9,
10,
11
],
[
12,
13,
14
],
[
15,
16,
17
],
[
18,
19,
20
],
[
21,
22,
23
],
[
24,
25,
26
],
[
27,
... |
20,860 | static void video_refresh_timer(void *opaque)
{
VideoState *is = opaque;
VideoPicture *vp;
SubPicture *sp, *sp2;
if (is->video_st) {
if (is->pictq_size == 0) {
/* if no picture, need to wait */
schedule_refresh(is, 1);
} else {
/* dequeue... | true | FFmpeg | 68aefbe81cb3b9dd002108782bb8d798e1c12806 | static void video_refresh_timer(void *opaque)
{
VideoState *is = opaque;
VideoPicture *vp;
SubPicture *sp, *sp2;
if (is->video_st) {
if (is->pictq_size == 0) {
schedule_refresh(is, 1);
} else {
vp = &is->pictq[is->pictq_rin... | {
"code": [
" is->video_current_pts_time = av_gettime();"
],
"line_no": [
35
]
} | static void FUNC_0(void *VAR_0)
{
VideoState *is = VAR_0;
VideoPicture *vp;
SubPicture *sp, *sp2;
if (is->video_st) {
if (is->pictq_size == 0) {
schedule_refresh(is, 1);
} else {
vp = &is->pictq[is->pictq_rindex];
... | [
"static void FUNC_0(void *VAR_0)\n{",
"VideoState *is = VAR_0;",
"VideoPicture *vp;",
"SubPicture *sp, *sp2;",
"if (is->video_st) {",
"if (is->pictq_size == 0) {",
"schedule_refresh(is, 1);",
"} else {",
"vp = &is->pictq[is->pictq_rindex];",
"is->video_current_pts = vp->pts;",
"is->video_current... | [
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,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
27
],
[
33
],
[
35
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
],
[
61,
63
],
[
67
],
... |
20,861 | static int usb_net_handle_data(USBDevice *dev, USBPacket *p)
{
USBNetState *s = (USBNetState *) dev;
int ret = 0;
switch(p->pid) {
case USB_TOKEN_IN:
switch (p->devep) {
case 1:
ret = usb_net_handle_statusin(s, p);
break;
case 2:
... | true | qemu | 4f4321c11ff6e98583846bfd6f0e81954924b003 | static int usb_net_handle_data(USBDevice *dev, USBPacket *p)
{
USBNetState *s = (USBNetState *) dev;
int ret = 0;
switch(p->pid) {
case USB_TOKEN_IN:
switch (p->devep) {
case 1:
ret = usb_net_handle_statusin(s, p);
break;
case 2:
... | {
"code": [
" \"pid 0x%x ep 0x%x len 0x%x\\n\",",
" p->pid, p->devep, p->len);"
],
"line_no": [
79,
81
]
} | static int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)
{
USBNetState *s = (USBNetState *) VAR_0;
int VAR_2 = 0;
switch(VAR_1->pid) {
case USB_TOKEN_IN:
switch (VAR_1->devep) {
case 1:
VAR_2 = usb_net_handle_statusin(s, VAR_1);
break;
case 2:
... | [
"static int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)\n{",
"USBNetState *s = (USBNetState *) VAR_0;",
"int VAR_2 = 0;",
"switch(VAR_1->pid) {",
"case USB_TOKEN_IN:\nswitch (VAR_1->devep) {",
"case 1:\nVAR_2 = usb_net_handle_statusin(s, VAR_1);",
"break;",
"case 2:\nVAR_2 = usb_net_handle_datain(s, VA... | [
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,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
17,
19
],
[
21
],
[
25,
27
],
[
29
],
[
33,
35
],
[
37
],
[
39
],
[
43,
45
],
[
47,
49
],
[
51
],
[
55,
57
],
... |
20,862 | int net_init_bridge(QemuOpts *opts, const char *name, VLANState *vlan)
{
TAPState *s;
int fd, vnet_hdr;
if (!qemu_opt_get(opts, "br")) {
qemu_opt_set(opts, "br", DEFAULT_BRIDGE_INTERFACE);
}
if (!qemu_opt_get(opts, "helper")) {
qemu_opt_set(opts, "helper", DEFAULT_BRIDGE_HE... | true | qemu | 6687b79d636cd60ed9adb1177d0d946b58fa7717 | int net_init_bridge(QemuOpts *opts, const char *name, VLANState *vlan)
{
TAPState *s;
int fd, vnet_hdr;
if (!qemu_opt_get(opts, "br")) {
qemu_opt_set(opts, "br", DEFAULT_BRIDGE_INTERFACE);
}
if (!qemu_opt_get(opts, "helper")) {
qemu_opt_set(opts, "helper", DEFAULT_BRIDGE_HE... | {
"code": [
" return -1;",
"int net_init_bridge(QemuOpts *opts, const char *name, VLANState *vlan)"
],
"line_no": [
31,
1
]
} | int FUNC_0(QemuOpts *VAR_0, const char *VAR_1, VLANState *VAR_2)
{
TAPState *s;
int VAR_3, VAR_4;
if (!qemu_opt_get(VAR_0, "br")) {
qemu_opt_set(VAR_0, "br", DEFAULT_BRIDGE_INTERFACE);
}
if (!qemu_opt_get(VAR_0, "helper")) {
qemu_opt_set(VAR_0, "helper", DEFAULT_BRIDGE_HELP... | [
"int FUNC_0(QemuOpts *VAR_0, const char *VAR_1, VLANState *VAR_2)\n{",
"TAPState *s;",
"int VAR_3, VAR_4;",
"if (!qemu_opt_get(VAR_0, \"br\")) {",
"qemu_opt_set(VAR_0, \"br\", DEFAULT_BRIDGE_INTERFACE);",
"}",
"if (!qemu_opt_get(VAR_0, \"helper\")) {",
"qemu_opt_set(VAR_0, \"helper\", DEFAULT_BRIDGE_H... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
... |
20,863 | static int vfio_setup_pcie_cap(VFIOPCIDevice *vdev, int pos, uint8_t size,
Error **errp)
{
uint16_t flags;
uint8_t type;
flags = pci_get_word(vdev->pdev.config + pos + PCI_CAP_FLAGS);
type = (flags & PCI_EXP_FLAGS_TYPE) >> 4;
if (type != PCI_EXP_TYPE_ENDPOINT &&
... | true | qemu | 47985727e383eee191a39cc007541c17cd8680ee | static int vfio_setup_pcie_cap(VFIOPCIDevice *vdev, int pos, uint8_t size,
Error **errp)
{
uint16_t flags;
uint8_t type;
flags = pci_get_word(vdev->pdev.config + pos + PCI_CAP_FLAGS);
type = (flags & PCI_EXP_FLAGS_TYPE) >> 4;
if (type != PCI_EXP_TYPE_ENDPOINT &&
... | {
"code": [],
"line_no": []
} | static int FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1, uint8_t VAR_2,
Error **VAR_3)
{
uint16_t flags;
uint8_t type;
flags = pci_get_word(VAR_0->pdev.config + VAR_1 + PCI_CAP_FLAGS);
type = (flags & PCI_EXP_FLAGS_TYPE) >> 4;
if (type != PCI_EXP_TYPE_ENDPOINT &&
typ... | [
"static int FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1, uint8_t VAR_2,\nError **VAR_3)\n{",
"uint16_t flags;",
"uint8_t type;",
"flags = pci_get_word(VAR_0->pdev.config + VAR_1 + PCI_CAP_FLAGS);",
"type = (flags & PCI_EXP_FLAGS_TYPE) >> 4;",
"if (type != PCI_EXP_TYPE_ENDPOINT &&\ntype != PCI_EXP_TYPE_LEG_END ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8,
9,
10
],
[
11,
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17,
18,
19,
20,
21
],
[
22,
23,
24,
25,
26,
27,
28,
... |
20,864 | static int nsv_read_close(AVFormatContext *s)
{
/* int i; */
NSVContext *nsv = s->priv_data;
av_freep(&nsv->nsvs_file_offset);
av_freep(&nsv->nsvs_timestamps);
#if 0
for(i=0;i<s->nb_streams;i++) {
AVStream *st = s->streams[i];
NSVStream *ast = st->priv_data;
... | true | FFmpeg | 1f6d0d42c53cde5e33e92c4529b774c256157f89 | static int nsv_read_close(AVFormatContext *s)
{
NSVContext *nsv = s->priv_data;
av_freep(&nsv->nsvs_file_offset);
av_freep(&nsv->nsvs_timestamps);
#if 0
for(i=0;i<s->nb_streams;i++) {
AVStream *st = s->streams[i];
NSVStream *ast = st->priv_data;
if(ast){
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
NSVContext *nsv = VAR_0->priv_data;
av_freep(&nsv->nsvs_file_offset);
av_freep(&nsv->nsvs_timestamps);
#if 0
for(i=0;i<VAR_0->nb_streams;i++) {
AVStream *st = VAR_0->streams[i];
NSVStream *ast = st->priv_data;
if(as... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"NSVContext *nsv = VAR_0->priv_data;",
"av_freep(&nsv->nsvs_file_offset);",
"av_freep(&nsv->nsvs_timestamps);",
"#if 0\nfor(i=0;i<VAR_0->nb_streams;i++) {",
"AVStream *st = VAR_0->streams[i];",
"NSVStream *ast = st->priv_data;",
"if(ast){",
"av_free(as... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
11
],
[
13
],
[
21,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45,
47
],
[
49
]
] |
20,865 | static int create_vorbis_context(vorbis_enc_context *venc,
AVCodecContext *avctx)
{
vorbis_enc_floor *fc;
vorbis_enc_residue *rc;
vorbis_enc_mapping *mc;
int i, book, ret;
venc->channels = avctx->channels;
venc->sample_rate = avctx->sample_rate;
... | true | FFmpeg | 34c52005605d68f7cd1957b169b6732c7d2447d9 | static int create_vorbis_context(vorbis_enc_context *venc,
AVCodecContext *avctx)
{
vorbis_enc_floor *fc;
vorbis_enc_residue *rc;
vorbis_enc_mapping *mc;
int i, book, ret;
venc->channels = avctx->channels;
venc->sample_rate = avctx->sample_rate;
... | {
"code": [
" if (!venc->saved || !venc->samples || !venc->floor || !venc->coeffs)",
" return AVERROR(ENOMEM);"
],
"line_no": [
375,
31
]
} | static int FUNC_0(vorbis_enc_context *VAR_0,
AVCodecContext *VAR_1)
{
vorbis_enc_floor *fc;
vorbis_enc_residue *rc;
vorbis_enc_mapping *mc;
int VAR_2, VAR_3, VAR_4;
VAR_0->channels = VAR_1->channels;
VAR_0->sample_rate = VAR_1->sample_rate;
VA... | [
"static int FUNC_0(vorbis_enc_context *VAR_0,\nAVCodecContext *VAR_1)\n{",
"vorbis_enc_floor *fc;",
"vorbis_enc_residue *rc;",
"vorbis_enc_mapping *mc;",
"int VAR_2, VAR_3, VAR_4;",
"VAR_0->channels = VAR_1->channels;",
"VAR_0->sample_rate = VAR_1->sample_rate;",
"VAR_0->log2_blocksize[0] = VAR_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,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29,
31
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.