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 |
|---|---|---|---|---|---|---|---|---|---|---|
10,084 | static uint16_t md_common_read(PCMCIACardState *card, uint32_t at)
{
MicroDriveState *s = MICRODRIVE(card);
IDEState *ifs;
uint16_t ret;
at -= s->io_base;
switch (s->opt & OPT_MODE) {
case OPT_MODE_MMAP:
if ((at & ~0x3ff) == 0x400) {
at = 0;
}
bre... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | static uint16_t md_common_read(PCMCIACardState *card, uint32_t at)
{
MicroDriveState *s = MICRODRIVE(card);
IDEState *ifs;
uint16_t ret;
at -= s->io_base;
switch (s->opt & OPT_MODE) {
case OPT_MODE_MMAP:
if ((at & ~0x3ff) == 0x400) {
at = 0;
}
bre... | {
"code": [],
"line_no": []
} | static uint16_t FUNC_0(PCMCIACardState *card, uint32_t at)
{
MicroDriveState *s = MICRODRIVE(card);
IDEState *ifs;
uint16_t ret;
at -= s->io_base;
switch (s->opt & OPT_MODE) {
case OPT_MODE_MMAP:
if ((at & ~0x3ff) == 0x400) {
at = 0;
}
break;
... | [
"static uint16_t FUNC_0(PCMCIACardState *card, uint32_t at)\n{",
"MicroDriveState *s = MICRODRIVE(card);",
"IDEState *ifs;",
"uint16_t ret;",
"at -= s->io_base;",
"switch (s->opt & OPT_MODE) {",
"case OPT_MODE_MMAP:\nif ((at & ~0x3ff) == 0x400) {",
"at = 0;",
"}",
"break;",
"case OPT_MODE_IOMAP1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
10,085 | static void usb_msd_handle_data(USBDevice *dev, USBPacket *p)
{
MSDState *s = (MSDState *)dev;
uint32_t tag;
struct usb_msd_cbw cbw;
uint8_t devep = p->ep->nr;
switch (p->pid) {
case USB_TOKEN_OUT:
if (devep != 2)
goto fail;
switch (s->mode) {
c... | false | qemu | a1cbfd554e11bb8af38c2f3e1f1574bf4c563cd2 | static void usb_msd_handle_data(USBDevice *dev, USBPacket *p)
{
MSDState *s = (MSDState *)dev;
uint32_t tag;
struct usb_msd_cbw cbw;
uint8_t devep = p->ep->nr;
switch (p->pid) {
case USB_TOKEN_OUT:
if (devep != 2)
goto fail;
switch (s->mode) {
c... | {
"code": [],
"line_no": []
} | static void FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)
{
MSDState *s = (MSDState *)VAR_0;
uint32_t tag;
struct usb_msd_cbw VAR_2;
uint8_t devep = VAR_1->ep->nr;
switch (VAR_1->pid) {
case USB_TOKEN_OUT:
if (devep != 2)
goto fail;
switch (s->mode) {
... | [
"static void FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)\n{",
"MSDState *s = (MSDState *)VAR_0;",
"uint32_t tag;",
"struct usb_msd_cbw VAR_2;",
"uint8_t devep = VAR_1->ep->nr;",
"switch (VAR_1->pid) {",
"case USB_TOKEN_OUT:\nif (devep != 2)\ngoto fail;",
"switch (s->mode) {",
"case USB_MSDM_CBW:\nif ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
... |
10,086 | void optimize_flags_init(void)
{
cpu_env = tcg_global_reg_new_ptr(TCG_AREG0, "env");
cpu_cc_op = tcg_global_mem_new_i32(TCG_AREG0,
offsetof(CPUX86State, cc_op), "cc_op");
cpu_cc_src = tcg_global_mem_new(TCG_AREG0, offsetof(CPUX86State, cc_src),
... | false | qemu | a3251186fc6a04d421e9c4b65aa04ec32379ec38 | void optimize_flags_init(void)
{
cpu_env = tcg_global_reg_new_ptr(TCG_AREG0, "env");
cpu_cc_op = tcg_global_mem_new_i32(TCG_AREG0,
offsetof(CPUX86State, cc_op), "cc_op");
cpu_cc_src = tcg_global_mem_new(TCG_AREG0, offsetof(CPUX86State, cc_src),
... | {
"code": [],
"line_no": []
} | void FUNC_0(void)
{
cpu_env = tcg_global_reg_new_ptr(TCG_AREG0, "env");
cpu_cc_op = tcg_global_mem_new_i32(TCG_AREG0,
offsetof(CPUX86State, cc_op), "cc_op");
cpu_cc_src = tcg_global_mem_new(TCG_AREG0, offsetof(CPUX86State, cc_src),
... | [
"void FUNC_0(void)\n{",
"cpu_env = tcg_global_reg_new_ptr(TCG_AREG0, \"env\");",
"cpu_cc_op = tcg_global_mem_new_i32(TCG_AREG0,\noffsetof(CPUX86State, cc_op), \"cc_op\");",
"cpu_cc_src = tcg_global_mem_new(TCG_AREG0, offsetof(CPUX86State, cc_src),\n\"cc_src\");",
"cpu_cc_dst = tcg_global_mem_new(TCG_AREG0, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11,
13
],
[
15,
17
],
[
21,
23,
25
],
[
27,
29
],
[
31,
33
],
[
35,
37
],
[
39,
41
],
[
43,
45
],
[
47,
49
],
[
51,
53
],
[
55,... |
10,087 | static size_t handle_aiocb_rw(struct qemu_paiocb *aiocb)
{
size_t nbytes;
char *buf;
if (!(aiocb->aio_type & QEMU_AIO_MISALIGNED)) {
/*
* If there is just a single buffer, and it is properly aligned
* we can just use plain pread/pwrite without any problems.
*/
... | false | qemu | 6769da29c7a3caa9de4020db87f495de692cf8e2 | static size_t handle_aiocb_rw(struct qemu_paiocb *aiocb)
{
size_t nbytes;
char *buf;
if (!(aiocb->aio_type & QEMU_AIO_MISALIGNED)) {
if (aiocb->aio_niov == 1)
return handle_aiocb_rw_linear(aiocb, aiocb->aio_iov->iov_base);
if (preadv_prese... | {
"code": [],
"line_no": []
} | static size_t FUNC_0(struct qemu_paiocb *aiocb)
{
size_t nbytes;
char *VAR_0;
if (!(aiocb->aio_type & QEMU_AIO_MISALIGNED)) {
if (aiocb->aio_niov == 1)
return handle_aiocb_rw_linear(aiocb, aiocb->aio_iov->iov_base);
if (preadv_present) {
... | [
"static size_t FUNC_0(struct qemu_paiocb *aiocb)\n{",
"size_t nbytes;",
"char *VAR_0;",
"if (!(aiocb->aio_type & QEMU_AIO_MISALIGNED)) {",
"if (aiocb->aio_niov == 1)\nreturn handle_aiocb_rw_linear(aiocb, aiocb->aio_iov->iov_base);",
"if (preadv_present) {",
"nbytes = handle_aiocb_rw_vector(aiocb);",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
21,
23
],
[
39
],
[
41
],
[
43,
45
],
[
47,
49
],
[
51
],
[
53
],
[
67
],
[
79
],
[
81
],
[
83
],
[
85
],
[
89
],
[
91
],
... |
10,088 | static int coroutine_fn bdrv_co_do_copy_on_readv(BlockDriverState *bs,
int64_t offset, unsigned int bytes, QEMUIOVector *qiov)
{
/* Perform I/O through a temporary buffer so that users who scribble over
* their read buffer while the operation is in progress do not end up
* modifying the image... | false | qemu | 85c97ca7a10b93216bc95052e9dabe3a4bb8736a | static int coroutine_fn bdrv_co_do_copy_on_readv(BlockDriverState *bs,
int64_t offset, unsigned int bytes, QEMUIOVector *qiov)
{
void *bounce_buffer;
BlockDriver *drv = bs->drv;
struct iovec iov;
QEMUIOVector bounce_qiov;
int64_t cluster_offset;
unsigned int clust... | {
"code": [],
"line_no": []
} | static int VAR_0 bdrv_co_do_copy_on_readv(BlockDriverState *bs,
int64_t offset, unsigned int bytes, QEMUIOVector *qiov)
{
void *bounce_buffer;
BlockDriver *drv = bs->drv;
struct iovec iov;
QEMUIOVector bounce_qiov;
int64_t cluster_offset;
unsigned int cluster_byte... | [
"static int VAR_0 bdrv_co_do_copy_on_readv(BlockDriverState *bs,\nint64_t offset, unsigned int bytes, QEMUIOVector *qiov)\n{",
"void *bounce_buffer;",
"BlockDriver *drv = bs->drv;",
"struct iovec iov;",
"QEMUIOVector bounce_qiov;",
"int64_t cluster_offset;",
"unsigned int cluster_bytes;",
"size_t skip... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
43
],
[
47,
49
],
[
53
],
[
55
],
[
57
],
[
59
],
[
61
],
[
63
],
[
67
],
[
7... |
10,089 | static int sector_limits_lun2qemu(int64_t sector, IscsiLun *iscsilun)
{
int limit = MIN(sector_lun2qemu(sector, iscsilun), INT_MAX / 2 + 1);
return limit < BDRV_REQUEST_MAX_SECTORS ? limit : 0;
}
| false | qemu | b9f7855a50a7cbf04454fa84e9d1f333151f2259 | static int sector_limits_lun2qemu(int64_t sector, IscsiLun *iscsilun)
{
int limit = MIN(sector_lun2qemu(sector, iscsilun), INT_MAX / 2 + 1);
return limit < BDRV_REQUEST_MAX_SECTORS ? limit : 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(int64_t VAR_0, IscsiLun *VAR_1)
{
int VAR_2 = MIN(sector_lun2qemu(VAR_0, VAR_1), INT_MAX / 2 + 1);
return VAR_2 < BDRV_REQUEST_MAX_SECTORS ? VAR_2 : 0;
}
| [
"static int FUNC_0(int64_t VAR_0, IscsiLun *VAR_1)\n{",
"int VAR_2 = MIN(sector_lun2qemu(VAR_0, VAR_1), INT_MAX / 2 + 1);",
"return VAR_2 < BDRV_REQUEST_MAX_SECTORS ? VAR_2 : 0;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
10,090 | static ssize_t test_block_init_func(QCryptoBlock *block,
size_t headerlen,
Error **errp,
void *opaque)
{
Buffer *header = opaque;
g_assert_cmpint(header->capacity, ==, 0);
buffer_reserve(he... | false | qemu | 375092332eeaa6e47561ce47fd36144cdaf964d0 | static ssize_t test_block_init_func(QCryptoBlock *block,
size_t headerlen,
Error **errp,
void *opaque)
{
Buffer *header = opaque;
g_assert_cmpint(header->capacity, ==, 0);
buffer_reserve(he... | {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(QCryptoBlock *block,
size_t headerlen,
Error **errp,
void *opaque)
{
Buffer *header = opaque;
g_assert_cmpint(header->capacity, ==, 0);
buffer_reserve(header, headerle... | [
"static ssize_t FUNC_0(QCryptoBlock *block,\nsize_t headerlen,\nError **errp,\nvoid *opaque)\n{",
"Buffer *header = opaque;",
"g_assert_cmpint(header->capacity, ==, 0);",
"buffer_reserve(header, headerlen);",
"return headerlen;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
15
],
[
19
],
[
23
],
[
25
]
] |
10,091 | e1000_mmio_write(void *opaque, hwaddr addr, uint64_t val,
unsigned size)
{
E1000State *s = opaque;
unsigned int index = (addr & 0x1ffff) >> 2;
if (index < NWRITEOPS && macreg_writeops[index]) {
macreg_writeops[index](s, index, val);
} else if (index < NREADOPS && macreg... | false | qemu | bc0f0674f037a01f2ce0870ad6270a356a7a8347 | e1000_mmio_write(void *opaque, hwaddr addr, uint64_t val,
unsigned size)
{
E1000State *s = opaque;
unsigned int index = (addr & 0x1ffff) >> 2;
if (index < NWRITEOPS && macreg_writeops[index]) {
macreg_writeops[index](s, index, val);
} else if (index < NREADOPS && macreg... | {
"code": [],
"line_no": []
} | FUNC_0(void *VAR_0, hwaddr VAR_1, uint64_t VAR_2,
unsigned VAR_3)
{
E1000State *s = VAR_0;
unsigned int VAR_4 = (VAR_1 & 0x1ffff) >> 2;
if (VAR_4 < NWRITEOPS && macreg_writeops[VAR_4]) {
macreg_writeops[VAR_4](s, VAR_4, VAR_2);
} else if (VAR_4 < NREADOPS && macreg_read... | [
"FUNC_0(void *VAR_0, hwaddr VAR_1, uint64_t VAR_2,\nunsigned VAR_3)\n{",
"E1000State *s = VAR_0;",
"unsigned int VAR_4 = (VAR_1 & 0x1ffff) >> 2;",
"if (VAR_4 < NWRITEOPS && macreg_writeops[VAR_4]) {",
"macreg_writeops[VAR_4](s, VAR_4, VAR_2);",
"} else if (VAR_4 < NREADOPS && macreg_readops[VAR_4]) {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
]
] |
10,092 | void vnc_hextile_set_pixel_conversion(VncState *vs, int generic)
{
if (!generic) {
switch (vs->ds->surface->pf.bits_per_pixel) {
case 8:
vs->send_hextile_tile = send_hextile_tile_8;
break;
case 16:
vs->send_hextile_tile = send_h... | false | qemu | 245f7b51c0ea04fb2224b1127430a096c91aee70 | void vnc_hextile_set_pixel_conversion(VncState *vs, int generic)
{
if (!generic) {
switch (vs->ds->surface->pf.bits_per_pixel) {
case 8:
vs->send_hextile_tile = send_hextile_tile_8;
break;
case 16:
vs->send_hextile_tile = send_h... | {
"code": [],
"line_no": []
} | void FUNC_0(VncState *VAR_0, int VAR_1)
{
if (!VAR_1) {
switch (VAR_0->ds->surface->pf.bits_per_pixel) {
case 8:
VAR_0->send_hextile_tile = send_hextile_tile_8;
break;
case 16:
VAR_0->send_hextile_tile = send_hextile_tile_16;
... | [
"void FUNC_0(VncState *VAR_0, int VAR_1)\n{",
"if (!VAR_1) {",
"switch (VAR_0->ds->surface->pf.bits_per_pixel) {",
"case 8:\nVAR_0->send_hextile_tile = send_hextile_tile_8;",
"break;",
"case 16:\nVAR_0->send_hextile_tile = send_hextile_tile_16;",
"break;",
"case 32:\nVAR_0->send_hextile_tile = send_he... | [
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
... |
10,093 | static void qemu_rbd_aio_event_reader(void *opaque)
{
BDRVRBDState *s = opaque;
ssize_t ret;
do {
char *p = (char *)&s->event_rcb;
/* now read the rcb pointer that was sent from a non qemu thread */
if ((ret = read(s->fds[RBD_FD_READ], p + s->event_reader_pos,
... | false | qemu | dfe80b071b6ef6c9c0b4e36191e2fe2d16050766 | static void qemu_rbd_aio_event_reader(void *opaque)
{
BDRVRBDState *s = opaque;
ssize_t ret;
do {
char *p = (char *)&s->event_rcb;
if ((ret = read(s->fds[RBD_FD_READ], p + s->event_reader_pos,
sizeof(s->event_rcb) - s->event_reader_pos)) > 0) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
BDRVRBDState *s = VAR_0;
ssize_t ret;
do {
char *VAR_1 = (char *)&s->event_rcb;
if ((ret = read(s->fds[RBD_FD_READ], VAR_1 + s->event_reader_pos,
sizeof(s->event_rcb) - s->event_reader_pos)) > 0) {
... | [
"static void FUNC_0(void *VAR_0)\n{",
"BDRVRBDState *s = VAR_0;",
"ssize_t ret;",
"do {",
"char *VAR_1 = (char *)&s->event_rcb;",
"if ((ret = read(s->fds[RBD_FD_READ], VAR_1 + s->event_reader_pos,\nsizeof(s->event_rcb) - s->event_reader_pos)) > 0) {",
"if (ret > 0) {",
"s->event_reader_pos += ret;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
10,094 | static coroutine_fn int send_co_req(int sockfd, SheepdogReq *hdr, void *data,
unsigned int *wlen)
{
int ret;
ret = qemu_co_send(sockfd, hdr, sizeof(*hdr));
if (ret < sizeof(*hdr)) {
error_report("failed to send a req, %s", strerror(errno));
return... | false | qemu | 80731d9da560461bbdcda5ad4b05f4a8a846fccd | static coroutine_fn int send_co_req(int sockfd, SheepdogReq *hdr, void *data,
unsigned int *wlen)
{
int ret;
ret = qemu_co_send(sockfd, hdr, sizeof(*hdr));
if (ret < sizeof(*hdr)) {
error_report("failed to send a req, %s", strerror(errno));
return... | {
"code": [],
"line_no": []
} | static coroutine_fn int FUNC_0(int sockfd, SheepdogReq *hdr, void *data,
unsigned int *wlen)
{
int VAR_0;
VAR_0 = qemu_co_send(sockfd, hdr, sizeof(*hdr));
if (VAR_0 < sizeof(*hdr)) {
error_report("failed to send a req, %s", strerror(errno));
retur... | [
"static coroutine_fn int FUNC_0(int sockfd, SheepdogReq *hdr, void *data,\nunsigned int *wlen)\n{",
"int VAR_0;",
"VAR_0 = qemu_co_send(sockfd, hdr, sizeof(*hdr));",
"if (VAR_0 < sizeof(*hdr)) {",
"error_report(\"failed to send a req, %s\", strerror(errno));",
"return VAR_0;",
"}",
"VAR_0 = qemu_co_se... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
]
] |
10,095 | static inline void start_exclusive(void)
{
CPUState *other;
pthread_mutex_lock(&exclusive_lock);
exclusive_idle();
pending_cpus = 1;
/* Make all other cpus stop executing. */
for (other = first_cpu; other; other = other->next_cpu) {
if (other->running) {
pending_c... | false | qemu | 3098dba01c7daab60762b6f6624ea88c0d6cb65a | static inline void start_exclusive(void)
{
CPUState *other;
pthread_mutex_lock(&exclusive_lock);
exclusive_idle();
pending_cpus = 1;
for (other = first_cpu; other; other = other->next_cpu) {
if (other->running) {
pending_cpus++;
cpu_interrupt(other, C... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(void)
{
CPUState *other;
pthread_mutex_lock(&exclusive_lock);
exclusive_idle();
pending_cpus = 1;
for (other = first_cpu; other; other = other->next_cpu) {
if (other->running) {
pending_cpus++;
cpu_interrupt(other, CPU_INTERR... | [
"static inline void FUNC_0(void)\n{",
"CPUState *other;",
"pthread_mutex_lock(&exclusive_lock);",
"exclusive_idle();",
"pending_cpus = 1;",
"for (other = first_cpu; other; other = other->next_cpu) {",
"if (other->running) {",
"pending_cpus++;",
"cpu_interrupt(other, CPU_INTERRUPT_EXIT);",
"}",
"... | [
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
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
10,096 | matroska_parse_cluster (MatroskaDemuxContext *matroska)
{
int res = 0;
uint32_t id;
uint64_t cluster_time = 0;
uint8_t *data;
int64_t pos;
int size;
av_log(matroska->ctx, AV_LOG_DEBUG,
"parsing cluster at %"PRId64"\n", url_ftell(&matroska->ctx->pb));
while (res =... | false | FFmpeg | 6bed20f45a484f5709fec4c97a238240161b1797 | matroska_parse_cluster (MatroskaDemuxContext *matroska)
{
int res = 0;
uint32_t id;
uint64_t cluster_time = 0;
uint8_t *data;
int64_t pos;
int size;
av_log(matroska->ctx, AV_LOG_DEBUG,
"parsing cluster at %"PRId64"\n", url_ftell(&matroska->ctx->pb));
while (res =... | {
"code": [],
"line_no": []
} | FUNC_0 (MatroskaDemuxContext *VAR_0)
{
int VAR_1 = 0;
uint32_t id;
uint64_t cluster_time = 0;
uint8_t *data;
int64_t pos;
int VAR_2;
av_log(VAR_0->ctx, AV_LOG_DEBUG,
"parsing cluster at %"PRId64"\n", url_ftell(&VAR_0->ctx->pb));
while (VAR_1 == 0) {
if (... | [
"FUNC_0 (MatroskaDemuxContext *VAR_0)\n{",
"int VAR_1 = 0;",
"uint32_t id;",
"uint64_t cluster_time = 0;",
"uint8_t *data;",
"int64_t pos;",
"int VAR_2;",
"av_log(VAR_0->ctx, AV_LOG_DEBUG,\n\"parsing cluster at %\"PRId64\"\\n\", url_ftell(&VAR_0->ctx->pb));",
"while (VAR_1 == 0) {",
"if (!(id = eb... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49
],
[... |
10,097 | static inline void gen_evsel(DisasContext *ctx)
{
int l1 = gen_new_label();
int l2 = gen_new_label();
int l3 = gen_new_label();
int l4 = gen_new_label();
TCGv_i32 t0 = tcg_temp_local_new_i32();
tcg_gen_andi_i32(t0, cpu_crf[ctx->opcode & 0x07], 1 << 3);
tcg_gen_brcondi_i32(TCG_COND_EQ... | false | qemu | 42a268c241183877192c376d03bd9b6d527407c7 | static inline void gen_evsel(DisasContext *ctx)
{
int l1 = gen_new_label();
int l2 = gen_new_label();
int l3 = gen_new_label();
int l4 = gen_new_label();
TCGv_i32 t0 = tcg_temp_local_new_i32();
tcg_gen_andi_i32(t0, cpu_crf[ctx->opcode & 0x07], 1 << 3);
tcg_gen_brcondi_i32(TCG_COND_EQ... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(DisasContext *VAR_0)
{
int VAR_1 = gen_new_label();
int VAR_2 = gen_new_label();
int VAR_3 = gen_new_label();
int VAR_4 = gen_new_label();
TCGv_i32 t0 = tcg_temp_local_new_i32();
tcg_gen_andi_i32(t0, cpu_crf[VAR_0->opcode & 0x07], 1 << 3);
tcg_gen_brcondi_i3... | [
"static inline void FUNC_0(DisasContext *VAR_0)\n{",
"int VAR_1 = gen_new_label();",
"int VAR_2 = gen_new_label();",
"int VAR_3 = gen_new_label();",
"int VAR_4 = gen_new_label();",
"TCGv_i32 t0 = tcg_temp_local_new_i32();",
"tcg_gen_andi_i32(t0, cpu_crf[VAR_0->opcode & 0x07], 1 << 3);",
"tcg_gen_brcon... | [
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
... |
10,098 | static void x86_cpu_realizefn(DeviceState *dev, Error **errp)
{
CPUState *cs = CPU(dev);
X86CPU *cpu = X86_CPU(dev);
X86CPUClass *xcc = X86_CPU_GET_CLASS(dev);
CPUX86State *env = &cpu->env;
Error *local_err = NULL;
static bool ht_warned;
if (xcc->kvm_required && !kvm_enabled()) {
... | true | qemu | ce5b1bbf624b977a55ff7f85bb3871682d03baff | static void x86_cpu_realizefn(DeviceState *dev, Error **errp)
{
CPUState *cs = CPU(dev);
X86CPU *cpu = X86_CPU(dev);
X86CPUClass *xcc = X86_CPU_GET_CLASS(dev);
CPUX86State *env = &cpu->env;
Error *local_err = NULL;
static bool ht_warned;
if (xcc->kvm_required && !kvm_enabled()) {
... | {
"code": [
" cpu_exec_init(cs, &error_abort);",
" cpu_exec_init(cs, &error_abort);",
" cpu_exec_init(cs, &error_abort);",
" cpu_exec_init(cs, &error_abort);",
" cpu_exec_init(cs, &error_abort);",
" cpu_exec_init(cs, &error_abort);",
" cpu_exec_init(cs, &error_abort);"... | static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)
{
CPUState *cs = CPU(VAR_0);
X86CPU *cpu = X86_CPU(VAR_0);
X86CPUClass *xcc = X86_CPU_GET_CLASS(VAR_0);
CPUX86State *env = &cpu->env;
Error *local_err = NULL;
static bool VAR_2;
if (xcc->kvm_required && !kvm_enabled()) {
... | [
"static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)\n{",
"CPUState *cs = CPU(VAR_0);",
"X86CPU *cpu = X86_CPU(VAR_0);",
"X86CPUClass *xcc = X86_CPU_GET_CLASS(VAR_0);",
"CPUX86State *env = &cpu->env;",
"Error *local_err = NULL;",
"static bool VAR_2;",
"if (xcc->kvm_required && !kvm_enabled()) {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
... |
10,099 | static int http_proxy_open(URLContext *h, const char *uri, int flags)
{
HTTPContext *s = h->priv_data;
char hostname[1024], hoststr[1024];
char auth[1024], pathbuf[1024], *path;
char line[1024], lower_url[100];
int port, ret = 0;
HTTPAuthType cur_auth_type;
char *authstr;
h->i... | true | FFmpeg | e75bbcf493aeb549d04c56f49406aeee3950d93b | static int http_proxy_open(URLContext *h, const char *uri, int flags)
{
HTTPContext *s = h->priv_data;
char hostname[1024], hoststr[1024];
char auth[1024], pathbuf[1024], *path;
char line[1024], lower_url[100];
int port, ret = 0;
HTTPAuthType cur_auth_type;
char *authstr;
h->i... | {
"code": [
" int port, ret = 0;",
" if (s->http_code == 407 && cur_auth_type == HTTP_AUTH_NONE &&",
" s->proxy_auth_state.auth_type != HTTP_AUTH_NONE) {"
],
"line_no": [
13,
147,
149
]
} | static int FUNC_0(URLContext *VAR_0, const char *VAR_1, int VAR_2)
{
HTTPContext *s = VAR_0->priv_data;
char VAR_3[1024], VAR_4[1024];
char VAR_5[1024], VAR_6[1024], *VAR_7;
char VAR_8[1024], VAR_9[100];
int VAR_10, VAR_11 = 0;
HTTPAuthType cur_auth_type;
char *VAR_12;
VAR_0->... | [
"static int FUNC_0(URLContext *VAR_0, const char *VAR_1, int VAR_2)\n{",
"HTTPContext *s = VAR_0->priv_data;",
"char VAR_3[1024], VAR_4[1024];",
"char VAR_5[1024], VAR_6[1024], *VAR_7;",
"char VAR_8[1024], VAR_9[100];",
"int VAR_10, VAR_11 = 0;",
"HTTPAuthType cur_auth_type;",
"char *VAR_12;",
"VAR_... | [
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,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25,
27
],
[
29
],
[
31
],
[
33,
35
],
[
39,
41
],
[
43,
45,
47
],
[
49,
51
],
[
55,... |
10,100 | void rtp_parse_close(RTPDemuxContext *s)
{
// TODO: fold this into the protocol specific data fields.
if (!strcmp(ff_rtp_enc_name(s->payload_type), "MP2T")) {
ff_mpegts_parse_close(s->ts);
}
av_free(s);
} | true | FFmpeg | 0e4b185a8df12c7b42642699a8df45e0de48de07 | void rtp_parse_close(RTPDemuxContext *s)
{
if (!strcmp(ff_rtp_enc_name(s->payload_type), "MP2T")) {
ff_mpegts_parse_close(s->ts);
}
av_free(s);
} | {
"code": [],
"line_no": []
} | void FUNC_0(RTPDemuxContext *VAR_0)
{
if (!strcmp(ff_rtp_enc_name(VAR_0->payload_type), "MP2T")) {
ff_mpegts_parse_close(VAR_0->ts);
}
av_free(VAR_0);
} | [
"void FUNC_0(RTPDemuxContext *VAR_0)\n{",
"if (!strcmp(ff_rtp_enc_name(VAR_0->payload_type), \"MP2T\")) {",
"ff_mpegts_parse_close(VAR_0->ts);",
"}",
"av_free(VAR_0);",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
10,101 | static long gethugepagesize(const char *path, Error **errp)
{
struct statfs fs;
int ret;
do {
ret = statfs(path, &fs);
} while (ret != 0 && errno == EINTR);
if (ret != 0) {
error_setg_errno(errp, errno, "failed to get page size of file %s",
path)... | true | qemu | fd97fd4408040a9a6dfaf2fdaeca1c566db6d0aa | static long gethugepagesize(const char *path, Error **errp)
{
struct statfs fs;
int ret;
do {
ret = statfs(path, &fs);
} while (ret != 0 && errno == EINTR);
if (ret != 0) {
error_setg_errno(errp, errno, "failed to get page size of file %s",
path)... | {
"code": [
"static long gethugepagesize(const char *path, Error **errp)",
" ret = statfs(path, &fs);",
" error_setg_errno(errp, errno, \"failed to get page size of file %s\",",
" path);",
" return 0;"
],
"line_no": [
1,
13,
21,
23,
... | static long FUNC_0(const char *VAR_0, Error **VAR_1)
{
struct statfs VAR_2;
int VAR_3;
do {
VAR_3 = statfs(VAR_0, &VAR_2);
} while (VAR_3 != 0 && errno == EINTR);
if (VAR_3 != 0) {
error_setg_errno(VAR_1, errno, "failed to get page size of file %s",
... | [
"static long FUNC_0(const char *VAR_0, Error **VAR_1)\n{",
"struct statfs VAR_2;",
"int VAR_3;",
"do {",
"VAR_3 = statfs(VAR_0, &VAR_2);",
"} while (VAR_3 != 0 && errno == EINTR);",
"if (VAR_3 != 0) {",
"error_setg_errno(VAR_1, errno, \"failed to get page size of file %s\",\nVAR_0);",
"return 0;",
... | [
1,
0,
0,
0,
1,
0,
0,
1,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
31
],
[
33
]
] |
10,102 | void qpci_device_foreach(QPCIBus *bus, int vendor_id, int device_id,
void (*func)(QPCIDevice *dev, int devfn, void *data),
void *data)
{
int slot;
for (slot = 0; slot < 32; slot++) {
int fn;
for (fn = 0; fn < 8; fn++) {
QP... | true | qemu | ea53854a54bc54dddeec0c56572adf53384e960c | void qpci_device_foreach(QPCIBus *bus, int vendor_id, int device_id,
void (*func)(QPCIDevice *dev, int devfn, void *data),
void *data)
{
int slot;
for (slot = 0; slot < 32; slot++) {
int fn;
for (fn = 0; fn < 8; fn++) {
QP... | {
"code": [],
"line_no": []
} | void FUNC_0(QPCIBus *VAR_0, int VAR_1, int VAR_2,
void (*VAR_3)(QPCIDevice *VAR_4, int VAR_5, void *VAR_7),
void *VAR_7)
{
int VAR_7;
for (VAR_7 = 0; VAR_7 < 32; VAR_7++) {
int VAR_8;
for (VAR_8 = 0; VAR_8 < 8; VAR_8++) {
... | [
"void FUNC_0(QPCIBus *VAR_0, int VAR_1, int VAR_2,\nvoid (*VAR_3)(QPCIDevice *VAR_4, int VAR_5, void *VAR_7),\nvoid *VAR_7)\n{",
"int VAR_7;",
"for (VAR_7 = 0; VAR_7 < 32; VAR_7++) {",
"int VAR_8;",
"for (VAR_8 = 0; VAR_8 < 8; VAR_8++) {",
"QPCIDevice *VAR_4;",
"VAR_4 = qpci_device_find(VAR_0, QPCI_DEVF... | [
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
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35,
37
],
[
40
],
[
42
],
[
46,
48
],
[
51
],
[
53
],
[
57
],
[
59
... |
10,103 | static int vc1_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
const uint8_t *buf, int buf_size)
{
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
AVFrame *pict = data;
uint8_t *buf2 = NULL;
/* no suppleme... | true | FFmpeg | 8d8d2b73914a47cf9ce5ca4ff96de6fd067b84a6 | static int vc1_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
const uint8_t *buf, int buf_size)
{
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
AVFrame *pict = data;
uint8_t *buf2 = NULL;
if (buf_... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
const uint8_t *VAR_3, int VAR_4)
{
VC1Context *v = VAR_0->priv_data;
MpegEncContext *s = &v->s;
AVFrame *pict = VAR_1;
uint8_t *buf2 = NULL;
if (VAR_4 == 0) {
... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nconst uint8_t *VAR_3, int VAR_4)\n{",
"VC1Context *v = VAR_0->priv_data;",
"MpegEncContext *s = &v->s;",
"AVFrame *pict = VAR_1;",
"uint8_t *buf2 = NULL;",
"if (VAR_4 == 0) {",
"if (s->low_delay==0 && s->next_picture_ptr) {",
"*pict=... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
49
],
[
51
],
[
53
],
[
55
],
[
61
],
[
63
... |
10,105 | static int configuration_post_load(void *opaque, int version_id)
{
SaveState *state = opaque;
const char *current_name = MACHINE_GET_CLASS(current_machine)->name;
if (strncmp(state->name, current_name, state->len) != 0) {
error_report("Machine type received is '%s' and local is '%s'",
... | true | qemu | 15d61692da651fc79b3fc40050b986c5a73055c0 | static int configuration_post_load(void *opaque, int version_id)
{
SaveState *state = opaque;
const char *current_name = MACHINE_GET_CLASS(current_machine)->name;
if (strncmp(state->name, current_name, state->len) != 0) {
error_report("Machine type received is '%s' and local is '%s'",
... | {
"code": [
" error_report(\"Machine type received is '%s' and local is '%s'\",",
" state->name, current_name);"
],
"line_no": [
13,
15
]
} | static int FUNC_0(void *VAR_0, int VAR_1)
{
SaveState *state = VAR_0;
const char *VAR_2 = MACHINE_GET_CLASS(current_machine)->name;
if (strncmp(state->name, VAR_2, state->len) != 0) {
error_report("Machine type received is '%s' and local is '%s'",
state->name, VAR_2);
... | [
"static int FUNC_0(void *VAR_0, int VAR_1)\n{",
"SaveState *state = VAR_0;",
"const char *VAR_2 = MACHINE_GET_CLASS(current_machine)->name;",
"if (strncmp(state->name, VAR_2, state->len) != 0) {",
"error_report(\"Machine type received is '%s' and local is '%s'\",\nstate->name, VAR_2);",
"return -EINVAL;",... | [
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
10,106 | static inline void vmsvga_copy_rect(struct vmsvga_state_s *s,
int x0, int y0, int x1, int y1, int w, int h)
{
DisplaySurface *surface = qemu_console_surface(s->vga.con);
uint8_t *vram = s->vga.vram_ptr;
int bypl = surface_stride(surface);
int bypp = surface_bytes_per_pixel(surface)... | true | qemu | 61b41b4c20eba08d2185297767e69153d7f3e09d | static inline void vmsvga_copy_rect(struct vmsvga_state_s *s,
int x0, int y0, int x1, int y1, int w, int h)
{
DisplaySurface *surface = qemu_console_surface(s->vga.con);
uint8_t *vram = s->vga.vram_ptr;
int bypl = surface_stride(surface);
int bypp = surface_bytes_per_pixel(surface)... | {
"code": [
"static inline void vmsvga_copy_rect(struct vmsvga_state_s *s,"
],
"line_no": [
1
]
} | static inline void FUNC_0(struct vmsvga_state_s *VAR_0,
int VAR_1, int VAR_2, int VAR_3, int VAR_4, int VAR_5, int VAR_6)
{
DisplaySurface *surface = qemu_console_surface(VAR_0->vga.con);
uint8_t *vram = VAR_0->vga.vram_ptr;
int VAR_7 = surface_stride(surface);
int VAR_8 = surface_... | [
"static inline void FUNC_0(struct vmsvga_state_s *VAR_0,\nint VAR_1, int VAR_2, int VAR_3, int VAR_4, int VAR_5, int VAR_6)\n{",
"DisplaySurface *surface = qemu_console_surface(VAR_0->vga.con);",
"uint8_t *vram = VAR_0->vga.vram_ptr;",
"int VAR_7 = surface_stride(surface);",
"int VAR_8 = surface_bytes_per_p... | [
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
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
10,107 | static inline int decode_mb(MDECContext *a, DCTELEM block[6][64]){
int i;
const int block_index[6]= {5,4,0,1,2,3};
a->dsp.clear_blocks(block[0]);
for(i=0; i<6; i++){
if( mdec_decode_block_intra(a, block[ block_index[i] ], block_index[i]) < 0)
return -1;
}
return 0... | true | FFmpeg | 32ac63ee10ca5daa149344a75d736c1b98177392 | static inline int decode_mb(MDECContext *a, DCTELEM block[6][64]){
int i;
const int block_index[6]= {5,4,0,1,2,3};
a->dsp.clear_blocks(block[0]);
for(i=0; i<6; i++){
if( mdec_decode_block_intra(a, block[ block_index[i] ], block_index[i]) < 0)
return -1;
}
return 0... | {
"code": [
" if( mdec_decode_block_intra(a, block[ block_index[i] ], block_index[i]) < 0)"
],
"line_no": [
15
]
} | static inline int FUNC_0(MDECContext *VAR_0, DCTELEM VAR_1[6][64]){
int VAR_2;
const int VAR_3[6]= {5,4,0,1,2,3};
VAR_0->dsp.clear_blocks(VAR_1[0]);
for(VAR_2=0; VAR_2<6; VAR_2++){
if( mdec_decode_block_intra(VAR_0, VAR_1[ VAR_3[VAR_2] ], VAR_3[VAR_2]) < 0)
return -1;
... | [
"static inline int FUNC_0(MDECContext *VAR_0, DCTELEM VAR_1[6][64]){",
"int VAR_2;",
"const int VAR_3[6]= {5,4,0,1,2,3};",
"VAR_0->dsp.clear_blocks(VAR_1[0]);",
"for(VAR_2=0; VAR_2<6; VAR_2++){",
"if( mdec_decode_block_intra(VAR_0, VAR_1[ VAR_3[VAR_2] ], VAR_3[VAR_2]) < 0)\nreturn -1;",
"}",
"return 0... | [
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
]
] |
10,108 | static int vnc_start_vencrypt_handshake(VncState *vs)
{
int ret;
if ((ret = gnutls_handshake(vs->tls.session)) < 0) {
if (!gnutls_error_is_fatal(ret)) {
VNC_DEBUG("Handshake interrupted (blocking)\n");
if (!gnutls_record_get_direction(vs->tls.session))
qemu_s... | true | qemu | 3e305e4a4752f70c0b5c3cf5b43ec957881714f7 | static int vnc_start_vencrypt_handshake(VncState *vs)
{
int ret;
if ((ret = gnutls_handshake(vs->tls.session)) < 0) {
if (!gnutls_error_is_fatal(ret)) {
VNC_DEBUG("Handshake interrupted (blocking)\n");
if (!gnutls_record_get_direction(vs->tls.session))
qemu_s... | {
"code": [
" int ret;",
" if ((ret = gnutls_handshake(vs->tls.session)) < 0) {",
" if (!gnutls_error_is_fatal(ret)) {",
" VNC_DEBUG(\"Handshake interrupted (blocking)\\n\");",
" if (!gnutls_record_get_direction(vs->tls.session))",
" qemu_set_fd_ha... | static int FUNC_0(VncState *VAR_0)
{
int VAR_1;
if ((VAR_1 = gnutls_handshake(VAR_0->tls.session)) < 0) {
if (!gnutls_error_is_fatal(VAR_1)) {
VNC_DEBUG("Handshake interrupted (blocking)\n");
if (!gnutls_record_get_direction(VAR_0->tls.session))
qemu_set_fd_h... | [
"static int FUNC_0(VncState *VAR_0)\n{",
"int VAR_1;",
"if ((VAR_1 = gnutls_handshake(VAR_0->tls.session)) < 0) {",
"if (!gnutls_error_is_fatal(VAR_1)) {",
"VNC_DEBUG(\"Handshake interrupted (blocking)\\n\");",
"if (!gnutls_record_get_direction(VAR_0->tls.session))\nqemu_set_fd_handler(VAR_0->csock, vnc_t... | [
0,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
0,
1,
1,
1,
1,
1,
0,
1,
0,
0,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15,
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47... |
10,109 | static VirtIOBlockReq *virtio_blk_alloc_request(VirtIOBlock *s)
{
VirtIOBlockReq *req = g_slice_new(VirtIOBlockReq);
req->dev = s;
req->qiov.size = 0;
req->next = NULL;
req->elem = g_slice_new(VirtQueueElement);
return req;
}
| true | qemu | f897bf751fbd95e4015b95d202c706548586813a | static VirtIOBlockReq *virtio_blk_alloc_request(VirtIOBlock *s)
{
VirtIOBlockReq *req = g_slice_new(VirtIOBlockReq);
req->dev = s;
req->qiov.size = 0;
req->next = NULL;
req->elem = g_slice_new(VirtQueueElement);
return req;
}
| {
"code": [
"static VirtIOBlockReq *virtio_blk_alloc_request(VirtIOBlock *s)",
" req->elem = g_slice_new(VirtQueueElement);"
],
"line_no": [
1,
13
]
} | static VirtIOBlockReq *FUNC_0(VirtIOBlock *s)
{
VirtIOBlockReq *req = g_slice_new(VirtIOBlockReq);
req->dev = s;
req->qiov.size = 0;
req->next = NULL;
req->elem = g_slice_new(VirtQueueElement);
return req;
}
| [
"static VirtIOBlockReq *FUNC_0(VirtIOBlock *s)\n{",
"VirtIOBlockReq *req = g_slice_new(VirtIOBlockReq);",
"req->dev = s;",
"req->qiov.size = 0;",
"req->next = NULL;",
"req->elem = g_slice_new(VirtQueueElement);",
"return req;",
"}"
] | [
1,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
10,111 | static int decompress_i(AVCodecContext *avctx, uint32_t *dst, int linesize)
{
SCPRContext *s = avctx->priv_data;
GetByteContext *gb = &s->gb;
int cx = 0, cx1 = 0, k = 0, clr = 0;
int run, r, g, b, off, y = 0, x = 0, z, ret;
unsigned backstep = linesize - avctx->width;
const int cxshift = ... | true | FFmpeg | 5666b95c9f27efa6f9b1e1bb6c592b9a8d78bca5 | static int decompress_i(AVCodecContext *avctx, uint32_t *dst, int linesize)
{
SCPRContext *s = avctx->priv_data;
GetByteContext *gb = &s->gb;
int cx = 0, cx1 = 0, k = 0, clr = 0;
int run, r, g, b, off, y = 0, x = 0, z, ret;
unsigned backstep = linesize - avctx->width;
const int cxshift = ... | {
"code": [
" cx = (clr & 0xFFFFFF) >> 16;"
],
"line_no": [
391
]
} | static int FUNC_0(AVCodecContext *VAR_0, uint32_t *VAR_1, int VAR_2)
{
SCPRContext *s = VAR_0->priv_data;
GetByteContext *gb = &s->gb;
int VAR_3 = 0, VAR_4 = 0, VAR_5 = 0, VAR_6 = 0;
int VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12 = 0, VAR_13 = 0, VAR_14, VAR_15;
unsigned VAR_16 = VAR_2 - VAR_... | [
"static int FUNC_0(AVCodecContext *VAR_0, uint32_t *VAR_1, int VAR_2)\n{",
"SCPRContext *s = VAR_0->priv_data;",
"GetByteContext *gb = &s->gb;",
"int VAR_3 = 0, VAR_4 = 0, VAR_5 = 0, VAR_6 = 0;",
"int VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12 = 0, VAR_13 = 0, VAR_14, VAR_15;",
"unsigned VAR_16 = VAR_2 -... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33,
35
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
51
... |
10,112 | static int scale_vector(int16_t *vector, int length)
{
int bits, max = 0;
int64_t scale;
int i;
for (i = 0; i < length; i++)
max = FFMAX(max, FFABS(vector[i]));
max = FFMIN(max, 0x7FFF);
bits = normalize_bits(max, 15);
scale = (bits == 15) ? 0x7FFF : (1 << bits);
... | true | FFmpeg | 4aca716a531b0bc1f05c96209cf30577d6e48baa | static int scale_vector(int16_t *vector, int length)
{
int bits, max = 0;
int64_t scale;
int i;
for (i = 0; i < length; i++)
max = FFMAX(max, FFABS(vector[i]));
max = FFMIN(max, 0x7FFF);
bits = normalize_bits(max, 15);
scale = (bits == 15) ? 0x7FFF : (1 << bits);
... | {
"code": [
" int64_t scale;",
" max = FFMAX(max, FFABS(vector[i]));",
" scale = (bits == 15) ? 0x7FFF : (1 << bits);",
" for (i = 0; i < length; i++)",
" vector[i] = av_clipl_int32(vector[i] * scale << 1) >> 4;"
],
"line_no": [
7,
17,
25,
15,
31
]
... | static int FUNC_0(int16_t *VAR_0, int VAR_1)
{
int VAR_2, VAR_3 = 0;
int64_t scale;
int VAR_4;
for (VAR_4 = 0; VAR_4 < VAR_1; VAR_4++)
VAR_3 = FFMAX(VAR_3, FFABS(VAR_0[VAR_4]));
VAR_3 = FFMIN(VAR_3, 0x7FFF);
VAR_2 = normalize_bits(VAR_3, 15);
scale = (VAR_2 == 15) ?... | [
"static int FUNC_0(int16_t *VAR_0, int VAR_1)\n{",
"int VAR_2, VAR_3 = 0;",
"int64_t scale;",
"int VAR_4;",
"for (VAR_4 = 0; VAR_4 < VAR_1; VAR_4++)",
"VAR_3 = FFMAX(VAR_3, FFABS(VAR_0[VAR_4]));",
"VAR_3 = FFMIN(VAR_3, 0x7FFF);",
"VAR_2 = normalize_bits(VAR_3, 15);",
"scale = (VAR_2 == 15) ? 0x7F... | [
0,
0,
1,
0,
1,
1,
0,
0,
1,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37
]
] |
10,113 | static int fileTest(uint8_t *ref[4], int refStride[4], int w, int h, FILE *fp,
enum AVPixelFormat srcFormat_in,
enum AVPixelFormat dstFormat_in)
{
char buf[256];
while (fgets(buf, sizeof(buf), fp)) {
struct Results r;
enum AVPixelFormat srcFormat;... | true | FFmpeg | 7796f290653349a4126f2d448d11bb4440b9f257 | static int fileTest(uint8_t *ref[4], int refStride[4], int w, int h, FILE *fp,
enum AVPixelFormat srcFormat_in,
enum AVPixelFormat dstFormat_in)
{
char buf[256];
while (fgets(buf, sizeof(buf), fp)) {
struct Results r;
enum AVPixelFormat srcFormat;... | {
"code": [
" int srcW, srcH;",
" int dstW, dstH;"
],
"line_no": [
21,
27
]
} | static int FUNC_0(uint8_t *VAR_0[4], int VAR_1[4], int VAR_2, int VAR_3, FILE *VAR_4,
enum AVPixelFormat VAR_5,
enum AVPixelFormat VAR_6)
{
char VAR_7[256];
while (fgets(VAR_7, sizeof(VAR_7), VAR_4)) {
struct Results VAR_8;
enum AVPixelFormat VAR_... | [
"static int FUNC_0(uint8_t *VAR_0[4], int VAR_1[4], int VAR_2, int VAR_3, FILE *VAR_4,\nenum AVPixelFormat VAR_5,\nenum AVPixelFormat VAR_6)\n{",
"char VAR_7[256];",
"while (fgets(VAR_7, sizeof(VAR_7), VAR_4)) {",
"struct Results VAR_8;",
"enum AVPixelFormat VAR_9;",
"char VAR_10[12];",
"int VAR_11, VAR... | [
0,
0,
0,
0,
0,
0,
1,
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
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35,
37,
39,
41,
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
10,114 | static int lut2_config_output(AVFilterLink *outlink)
{
AVFilterContext *ctx = outlink->src;
LUT2Context *s = ctx->priv;
AVFilterLink *srcx = ctx->inputs[0];
AVFilterLink *srcy = ctx->inputs[1];
FFFrameSyncIn *in;
int ret;
if (srcx->format != srcy->format) {
av_log(ctx, AV_... | true | FFmpeg | a4d18a3f54e5b0277234d8fcff65dff8516417a0 | static int lut2_config_output(AVFilterLink *outlink)
{
AVFilterContext *ctx = outlink->src;
LUT2Context *s = ctx->priv;
AVFilterLink *srcx = ctx->inputs[0];
AVFilterLink *srcy = ctx->inputs[1];
FFFrameSyncIn *in;
int ret;
if (srcx->format != srcy->format) {
av_log(ctx, AV_... | {
"code": [
" in[0].sync = 1;"
],
"line_no": [
85
]
} | static int FUNC_0(AVFilterLink *VAR_0)
{
AVFilterContext *ctx = VAR_0->src;
LUT2Context *s = ctx->priv;
AVFilterLink *srcx = ctx->inputs[0];
AVFilterLink *srcy = ctx->inputs[1];
FFFrameSyncIn *in;
int VAR_1;
if (srcx->format != srcy->format) {
av_log(ctx, AV_LOG_ERROR, "in... | [
"static int FUNC_0(AVFilterLink *VAR_0)\n{",
"AVFilterContext *ctx = VAR_0->src;",
"LUT2Context *s = ctx->priv;",
"AVFilterLink *srcx = ctx->inputs[0];",
"AVFilterLink *srcy = ctx->inputs[1];",
"FFFrameSyncIn *in;",
"int VAR_1;",
"if (srcx->format != srcy->format) {",
"av_log(ctx, AV_LOG_ERROR, \"in... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29,
31,
33
],
[
35,
37,
39,
41,
43,
45,
47,
49,
51,
53
],
[
55
... |
10,116 | void do_subfe (void)
{
T0 = T1 + ~T0 + xer_ca;
if (likely(T0 >= T1 && (xer_ca == 0 || T0 != T1))) {
xer_ca = 0;
} else {
xer_ca = 1;
}
}
| true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | void do_subfe (void)
{
T0 = T1 + ~T0 + xer_ca;
if (likely(T0 >= T1 && (xer_ca == 0 || T0 != T1))) {
xer_ca = 0;
} else {
xer_ca = 1;
}
}
| {
"code": [
" xer_ca = 1;",
" } else {",
" xer_ca = 0;",
" xer_ca = 1;",
" } else {",
" xer_ca = 0;",
" xer_ca = 1;",
" } else {",
" } else {",
" xer_ca = 0;",
" } else {",
" xer_ca = 1;",
" } else {... | void FUNC_0 (void)
{
T0 = T1 + ~T0 + xer_ca;
if (likely(T0 >= T1 && (xer_ca == 0 || T0 != T1))) {
xer_ca = 0;
} else {
xer_ca = 1;
}
}
| [
"void FUNC_0 (void)\n{",
"T0 = T1 + ~T0 + xer_ca;",
"if (likely(T0 >= T1 && (xer_ca == 0 || T0 != T1))) {",
"xer_ca = 0;",
"} else {",
"xer_ca = 1;",
"}",
"}"
] | [
0,
0,
1,
1,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
10,117 | static inline void unpack_coeffs(SnowContext *s, SubBand *b, SubBand * parent, int orientation){
const int w= b->width;
const int h= b->height;
int x,y;
if(1){
int run;
x_and_coeff *xc= b->x_coeff;
x_and_coeff *prev_xc= NULL;
x_and_coeff *prev2_xc= xc;
... | false | FFmpeg | b44985ba12d927d643a7bc03b0db98b83bf4fc9e | static inline void unpack_coeffs(SnowContext *s, SubBand *b, SubBand * parent, int orientation){
const int w= b->width;
const int h= b->height;
int x,y;
if(1){
int run;
x_and_coeff *xc= b->x_coeff;
x_and_coeff *prev_xc= NULL;
x_and_coeff *prev2_xc= xc;
... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(SnowContext *VAR_0, SubBand *VAR_1, SubBand * VAR_2, int VAR_3){
const int VAR_4= VAR_1->width;
const int VAR_5= VAR_1->height;
int VAR_6,VAR_7;
if(1){
int VAR_8;
x_and_coeff *xc= VAR_1->x_coeff;
x_and_coeff *prev_xc= NULL;
x_and_co... | [
"static inline void FUNC_0(SnowContext *VAR_0, SubBand *VAR_1, SubBand * VAR_2, int VAR_3){",
"const int VAR_4= VAR_1->width;",
"const int VAR_5= VAR_1->height;",
"int VAR_6,VAR_7;",
"if(1){",
"int VAR_8;",
"x_and_coeff *xc= VAR_1->x_coeff;",
"x_and_coeff *prev_xc= NULL;",
"x_and_coeff *prev2_xc= xc... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1
],
[
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
... |
10,118 | static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
VmncContext * const c = avctx->priv_data;
GetByteContext *gb = &c->gb;
uint8_t *outptr;
int dx, dy, w,... | false | FFmpeg | eafbc6716cede6d4a652f8bedf82f2901c68d06d | static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
VmncContext * const c = avctx->priv_data;
GetByteContext *gb = &c->gb;
uint8_t *outptr;
int dx, dy, w,... | {
"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;
VmncContext * const c = VAR_0->priv_data;
GetByteContext *gb = &c->gb;
uint8_t *outptr;
int VAR_6, VAR_7, VAR_8... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"VmncContext * const c = VAR_0->priv_data;",
"GetByteContext *gb = &c->gb;",
"uint8_t *outptr;",
"int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
49,
51
],
[
53
... |
10,119 | void ff_fft_calc_sse(FFTContext *s, FFTComplex *z)
{
int ln = s->nbits;
long i, j;
long nblocks, nloops;
FFTComplex *p, *cptr;
asm volatile(
"movaps %0, %%xmm4 \n\t"
"movaps %1, %%xmm5 \n\t"
::"m"(*p1p1m1m1),
"m"(*(s->inverse ? p1p1m1p1 : p1p1p1m1))
... | false | FFmpeg | 25e4f8aaeee05a963146ebf8cd1d01817dba91d6 | void ff_fft_calc_sse(FFTContext *s, FFTComplex *z)
{
int ln = s->nbits;
long i, j;
long nblocks, nloops;
FFTComplex *p, *cptr;
asm volatile(
"movaps %0, %%xmm4 \n\t"
"movaps %1, %%xmm5 \n\t"
::"m"(*p1p1m1m1),
"m"(*(s->inverse ? p1p1m1p1 : p1p1p1m1))
... | {
"code": [],
"line_no": []
} | void FUNC_0(FFTContext *VAR_0, FFTComplex *VAR_1)
{
int VAR_2 = VAR_0->nbits;
long VAR_3, VAR_4;
long VAR_5, VAR_6;
FFTComplex *p, *cptr;
asm volatile(
"movaps %0, %%xmm4 \n\t"
"movaps %1, %%xmm5 \n\t"
::"m"(*p1p1m1m1),
"m"(*(VAR_0->inverse ? p1p1m1p1 : ... | [
"void FUNC_0(FFTContext *VAR_0, FFTComplex *VAR_1)\n{",
"int VAR_2 = VAR_0->nbits;",
"long VAR_3, VAR_4;",
"long VAR_5, VAR_6;",
"FFTComplex *p, *cptr;",
"asm volatile(\n\"movaps %0, %%xmm4 \\n\\t\"\n\"movaps %1, %%xmm5 \\n\\t\"\n::\"m\"(*p1p1m1m1),\n\"m\"(*(VAR_0->inverse ? p1p1m1p1 : p1p1p1m1))\n);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17,
19,
21,
23,
25
],
[
29
],
[
31,
33,
35,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
63,
65,
69,
71,
73,
75,
77,... |
10,120 | static av_cold int cfhd_decode_init(AVCodecContext *avctx)
{
CFHDContext *s = avctx->priv_data;
avctx->bits_per_raw_sample = 10;
s->avctx = avctx;
avctx->width = 0;
avctx->height = 0;
return ff_cfhd_init_vlcs(s);
}
| false | FFmpeg | 7888ae8266d8f721cc443fe3aa627d350ca01204 | static av_cold int cfhd_decode_init(AVCodecContext *avctx)
{
CFHDContext *s = avctx->priv_data;
avctx->bits_per_raw_sample = 10;
s->avctx = avctx;
avctx->width = 0;
avctx->height = 0;
return ff_cfhd_init_vlcs(s);
}
| {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
CFHDContext *s = avctx->priv_data;
avctx->bits_per_raw_sample = 10;
s->avctx = avctx;
avctx->width = 0;
avctx->height = 0;
return ff_cfhd_init_vlcs(s);
}
| [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"CFHDContext *s = avctx->priv_data;",
"avctx->bits_per_raw_sample = 10;",
"s->avctx = avctx;",
"avctx->width = 0;",
"avctx->height = 0;",
"return ff_cfhd_init_vlcs(s);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
]
] |
10,121 | static int dump_init(DumpState *s, int fd, bool paging, bool has_filter,
int64_t begin, int64_t length, Error **errp)
{
CPUState *cpu;
int nr_cpus;
Error *err = NULL;
int ret;
if (runstate_is_running()) {
vm_stop(RUN_STATE_SAVE_VM);
s->resume = true;
... | false | qemu | c5d7f60f0614250bd925071e25220ce5958f75d0 | static int dump_init(DumpState *s, int fd, bool paging, bool has_filter,
int64_t begin, int64_t length, Error **errp)
{
CPUState *cpu;
int nr_cpus;
Error *err = NULL;
int ret;
if (runstate_is_running()) {
vm_stop(RUN_STATE_SAVE_VM);
s->resume = true;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(DumpState *VAR_0, int VAR_1, bool VAR_2, bool VAR_3,
int64_t VAR_4, int64_t VAR_5, Error **VAR_6)
{
CPUState *cpu;
int VAR_7;
Error *err = NULL;
int VAR_8;
if (runstate_is_running()) {
vm_stop(RUN_STATE_SAVE_VM);
VAR_0->resume = true;... | [
"static int FUNC_0(DumpState *VAR_0, int VAR_1, bool VAR_2, bool VAR_3,\nint64_t VAR_4, int64_t VAR_5, Error **VAR_6)\n{",
"CPUState *cpu;",
"int VAR_7;",
"Error *err = NULL;",
"int VAR_8;",
"if (runstate_is_running()) {",
"vm_stop(RUN_STATE_SAVE_VM);",
"VAR_0->resume = true;",
"} else {",
"VAR_0-... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
53
],
[... |
10,122 | qemu_irq xics_assign_irq(struct icp_state *icp, int irq,
enum xics_irq_type type)
{
if ((irq < icp->ics->offset)
|| (irq >= (icp->ics->offset + icp->ics->nr_irqs))) {
return NULL;
}
assert((type == XICS_MSI) || (type == XICS_LSI));
icp->ics->irqs[irq ... | false | qemu | a307d59434ba78b97544b42b8cfd24a1b62e39a6 | qemu_irq xics_assign_irq(struct icp_state *icp, int irq,
enum xics_irq_type type)
{
if ((irq < icp->ics->offset)
|| (irq >= (icp->ics->offset + icp->ics->nr_irqs))) {
return NULL;
}
assert((type == XICS_MSI) || (type == XICS_LSI));
icp->ics->irqs[irq ... | {
"code": [],
"line_no": []
} | qemu_irq FUNC_0(struct icp_state *icp, int irq,
enum xics_irq_type type)
{
if ((irq < icp->ics->offset)
|| (irq >= (icp->ics->offset + icp->ics->nr_irqs))) {
return NULL;
}
assert((type == XICS_MSI) || (type == XICS_LSI));
icp->ics->irqs[irq - icp->ic... | [
"qemu_irq FUNC_0(struct icp_state *icp, int irq,\nenum xics_irq_type type)\n{",
"if ((irq < icp->ics->offset)\n|| (irq >= (icp->ics->offset + icp->ics->nr_irqs))) {",
"return NULL;",
"}",
"assert((type == XICS_MSI) || (type == XICS_LSI));",
"icp->ics->irqs[irq - icp->ics->offset].type = type;",
"return ... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7,
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
]
] |
10,123 | int load_aout(const char *filename, target_phys_addr_t addr, int max_sz,
int bswap_needed, target_phys_addr_t target_page_size)
{
int fd, size, ret;
struct exec e;
uint32_t magic;
fd = open(filename, O_RDONLY | O_BINARY);
if (fd < 0)
return -1;
size = read(fd, ... | false | qemu | 45a50b1668822c23afc2a89f724654e176518bc4 | int load_aout(const char *filename, target_phys_addr_t addr, int max_sz,
int bswap_needed, target_phys_addr_t target_page_size)
{
int fd, size, ret;
struct exec e;
uint32_t magic;
fd = open(filename, O_RDONLY | O_BINARY);
if (fd < 0)
return -1;
size = read(fd, ... | {
"code": [],
"line_no": []
} | int FUNC_0(const char *VAR_0, target_phys_addr_t VAR_1, int VAR_2,
int VAR_3, target_phys_addr_t VAR_4)
{
int VAR_5, VAR_6, VAR_7;
struct exec VAR_8;
uint32_t magic;
VAR_5 = open(VAR_0, O_RDONLY | O_BINARY);
if (VAR_5 < 0)
return -1;
VAR_6 = read(VAR_5, &VAR_8,... | [
"int FUNC_0(const char *VAR_0, target_phys_addr_t VAR_1, int VAR_2,\nint VAR_3, target_phys_addr_t VAR_4)\n{",
"int VAR_5, VAR_6, VAR_7;",
"struct exec VAR_8;",
"uint32_t magic;",
"VAR_5 = open(VAR_0, O_RDONLY | O_BINARY);",
"if (VAR_5 < 0)\nreturn -1;",
"VAR_6 = read(VAR_5, &VAR_8, sizeof(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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
23
],
[
25,
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43,
45,
47,
49,
51
],
[
53
],
[
55
],
[... |
10,125 | SH7750State *sh7750_init(CPUSH4State * cpu)
{
SH7750State *s;
int sh7750_io_memory;
int cpu_model = SH_CPU_SH7751R; /* for now */
s = qemu_mallocz(sizeof(SH7750State));
s->cpu = cpu;
s->periph_freq = 60000000; /* 60MHz */
sh7750_io_memory = cpu_register_io_memory(0,
sh7... | false | qemu | f26ae302648d2977ba36d3dfcd0b70dce4e51060 | SH7750State *sh7750_init(CPUSH4State * cpu)
{
SH7750State *s;
int sh7750_io_memory;
int cpu_model = SH_CPU_SH7751R;
s = qemu_mallocz(sizeof(SH7750State));
s->cpu = cpu;
s->periph_freq = 60000000;
sh7750_io_memory = cpu_register_io_memory(0,
sh7750_mem_read,
... | {
"code": [],
"line_no": []
} | SH7750State *FUNC_0(CPUSH4State * cpu)
{
SH7750State *s;
int VAR_0;
int VAR_1 = SH_CPU_SH7751R;
s = qemu_mallocz(sizeof(SH7750State));
s->cpu = cpu;
s->periph_freq = 60000000;
VAR_0 = cpu_register_io_memory(0,
sh7750_mem_read,
sh7750_mem_write, s);
cp... | [
"SH7750State *FUNC_0(CPUSH4State * cpu)\n{",
"SH7750State *s;",
"int VAR_0;",
"int VAR_1 = SH_CPU_SH7751R;",
"s = qemu_mallocz(sizeof(SH7750State));",
"s->cpu = cpu;",
"s->periph_freq = 60000000;",
"VAR_0 = cpu_register_io_memory(0,\nsh7750_mem_read,\nsh7750_mem_write, s);",
"cpu_register_physical_m... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19,
21,
23
],
[
25
],
[
29,
31,
33
],
[
37,
39,
41
],
[
45
],
[
47,
49
],
[
53,
55,
57
],
[
63
],
[... |
10,126 | static void *buffered_file_thread(void *opaque)
{
MigrationState *s = opaque;
int64_t initial_time = qemu_get_clock_ms(rt_clock);
int64_t sleep_time = 0;
int64_t max_size = 0;
bool last_round = false;
int ret;
qemu_mutex_lock_iothread();
DPRINTF("beginning savevm\n");
ret... | false | qemu | dba433c03a0f5dc22a459435dd89557886298921 | static void *buffered_file_thread(void *opaque)
{
MigrationState *s = opaque;
int64_t initial_time = qemu_get_clock_ms(rt_clock);
int64_t sleep_time = 0;
int64_t max_size = 0;
bool last_round = false;
int ret;
qemu_mutex_lock_iothread();
DPRINTF("beginning savevm\n");
ret... | {
"code": [],
"line_no": []
} | static void *FUNC_0(void *VAR_0)
{
MigrationState *s = VAR_0;
int64_t initial_time = qemu_get_clock_ms(rt_clock);
int64_t sleep_time = 0;
int64_t max_size = 0;
bool last_round = false;
int VAR_1;
qemu_mutex_lock_iothread();
DPRINTF("beginning savevm\n");
VAR_1 = qemu_save... | [
"static void *FUNC_0(void *VAR_0)\n{",
"MigrationState *s = VAR_0;",
"int64_t initial_time = qemu_get_clock_ms(rt_clock);",
"int64_t sleep_time = 0;",
"int64_t max_size = 0;",
"bool last_round = false;",
"int VAR_1;",
"qemu_mutex_lock_iothread();",
"DPRINTF(\"beginning savevm\\n\");",
"VAR_1 = qem... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
10,127 | static void test_qemu_strtoul_trailing(void)
{
const char *str = "123xxx";
char f = 'X';
const char *endptr = &f;
unsigned long res = 999;
int err;
err = qemu_strtoul(str, &endptr, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, 123);
g_assert(endptr == ... | false | qemu | bc7c08a2c375acb7ae4d433054415588b176d34c | static void test_qemu_strtoul_trailing(void)
{
const char *str = "123xxx";
char f = 'X';
const char *endptr = &f;
unsigned long res = 999;
int err;
err = qemu_strtoul(str, &endptr, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, 123);
g_assert(endptr == ... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
const char *VAR_0 = "123xxx";
char VAR_1 = 'X';
const char *VAR_2 = &VAR_1;
unsigned long VAR_3 = 999;
int VAR_4;
VAR_4 = qemu_strtoul(VAR_0, &VAR_2, 0, &VAR_3);
g_assert_cmpint(VAR_4, ==, 0);
g_assert_cmpint(VAR_3, ==, 123);
g_assert(VAR_2 ==... | [
"static void FUNC_0(void)\n{",
"const char *VAR_0 = \"123xxx\";",
"char VAR_1 = 'X';",
"const char *VAR_2 = &VAR_1;",
"unsigned long VAR_3 = 999;",
"int VAR_4;",
"VAR_4 = qemu_strtoul(VAR_0, &VAR_2, 0, &VAR_3);",
"g_assert_cmpint(VAR_4, ==, 0);",
"g_assert_cmpint(VAR_3, ==, 123);",
"g_assert(VAR_2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
10,129 | static inline void downmix_3f_2r_to_stereo(float *samples)
{
int i;
for (i = 0; i < 256; i++) {
samples[i] += (samples[i + 256] + samples[i + 768]);
samples[i + 256] = (samples[i + 512] + samples[i + 1024]);
samples[i + 512] = samples[i + 768] = samples[i + 1024] = 0;
}
}
| false | FFmpeg | 0058584580b87feb47898e60e4b80c7f425882ad | static inline void downmix_3f_2r_to_stereo(float *samples)
{
int i;
for (i = 0; i < 256; i++) {
samples[i] += (samples[i + 256] + samples[i + 768]);
samples[i + 256] = (samples[i + 512] + samples[i + 1024]);
samples[i + 512] = samples[i + 768] = samples[i + 1024] = 0;
}
}
| {
"code": [],
"line_no": []
} | static inline void FUNC_0(float *VAR_0)
{
int VAR_1;
for (VAR_1 = 0; VAR_1 < 256; VAR_1++) {
VAR_0[VAR_1] += (VAR_0[VAR_1 + 256] + VAR_0[VAR_1 + 768]);
VAR_0[VAR_1 + 256] = (VAR_0[VAR_1 + 512] + VAR_0[VAR_1 + 1024]);
VAR_0[VAR_1 + 512] = VAR_0[VAR_1 + 768] = VAR_0[VAR_1 + 1024] =... | [
"static inline void FUNC_0(float *VAR_0)\n{",
"int VAR_1;",
"for (VAR_1 = 0; VAR_1 < 256; VAR_1++) {",
"VAR_0[VAR_1] += (VAR_0[VAR_1 + 256] + VAR_0[VAR_1 + 768]);",
"VAR_0[VAR_1 + 256] = (VAR_0[VAR_1 + 512] + VAR_0[VAR_1 + 1024]);",
"VAR_0[VAR_1 + 512] = VAR_0[VAR_1 + 768] = VAR_0[VAR_1 + 1024] = 0;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
10,130 | static void mirror_write_complete(void *opaque, int ret)
{
MirrorOp *op = opaque;
MirrorBlockJob *s = op->s;
aio_context_acquire(blk_get_aio_context(s->common.blk));
if (ret < 0) {
BlockErrorAction action;
bdrv_set_dirty_bitmap(s->dirty_bitmap, op->sector_num, op->nb_sectors);... | false | qemu | b436982f04fb33bb29fcdea190bd1fdc97dc65ef | static void mirror_write_complete(void *opaque, int ret)
{
MirrorOp *op = opaque;
MirrorBlockJob *s = op->s;
aio_context_acquire(blk_get_aio_context(s->common.blk));
if (ret < 0) {
BlockErrorAction action;
bdrv_set_dirty_bitmap(s->dirty_bitmap, op->sector_num, op->nb_sectors);... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, int VAR_1)
{
MirrorOp *op = VAR_0;
MirrorBlockJob *s = op->s;
aio_context_acquire(blk_get_aio_context(s->common.blk));
if (VAR_1 < 0) {
BlockErrorAction action;
bdrv_set_dirty_bitmap(s->dirty_bitmap, op->sector_num, op->nb_sectors);
act... | [
"static void FUNC_0(void *VAR_0, int VAR_1)\n{",
"MirrorOp *op = VAR_0;",
"MirrorBlockJob *s = op->s;",
"aio_context_acquire(blk_get_aio_context(s->common.blk));",
"if (VAR_1 < 0) {",
"BlockErrorAction action;",
"bdrv_set_dirty_bitmap(s->dirty_bitmap, op->sector_num, op->nb_sectors);",
"action = mirro... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
10,131 | static void qemu_remap_bucket(MapCacheEntry *entry,
target_phys_addr_t size,
target_phys_addr_t address_index)
{
uint8_t *vaddr_base;
xen_pfn_t *pfns;
int *err;
unsigned int i, j;
target_phys_addr_t nb_pfn = size >> XC_PAGE_SHIFT;
... | false | qemu | ea6c5f8ffe6de12e04e63acbb9937683b30216e2 | static void qemu_remap_bucket(MapCacheEntry *entry,
target_phys_addr_t size,
target_phys_addr_t address_index)
{
uint8_t *vaddr_base;
xen_pfn_t *pfns;
int *err;
unsigned int i, j;
target_phys_addr_t nb_pfn = size >> XC_PAGE_SHIFT;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(MapCacheEntry *VAR_0,
target_phys_addr_t VAR_1,
target_phys_addr_t VAR_2)
{
uint8_t *vaddr_base;
xen_pfn_t *pfns;
int *VAR_3;
unsigned int VAR_4, VAR_5;
target_phys_addr_t nb_pfn = VAR_1 >> XC_PAGE_SHIFT;
t... | [
"static void FUNC_0(MapCacheEntry *VAR_0,\ntarget_phys_addr_t VAR_1,\ntarget_phys_addr_t VAR_2)\n{",
"uint8_t *vaddr_base;",
"xen_pfn_t *pfns;",
"int *VAR_3;",
"unsigned int VAR_4, VAR_5;",
"target_phys_addr_t nb_pfn = VAR_1 >> XC_PAGE_SHIFT;",
"trace_qemu_remap_bucket(VAR_2);",
"pfns = qemu_mallocz(n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53,... |
10,132 | uint64_t kvmppc_hash64_read_pteg(PowerPCCPU *cpu, target_ulong pte_index)
{
int htab_fd;
struct kvm_get_htab_fd ghf;
struct kvm_get_htab_buf *hpte_buf;
ghf.flags = 0;
ghf.start_index = pte_index;
htab_fd = kvm_vm_ioctl(kvm_state, KVM_PPC_GET_HTAB_FD, &ghf);
if (htab_fd < 0) {
... | false | qemu | 1ad9f0a464fe78d30ee60b3629f7a825cf2fab13 | uint64_t kvmppc_hash64_read_pteg(PowerPCCPU *cpu, target_ulong pte_index)
{
int htab_fd;
struct kvm_get_htab_fd ghf;
struct kvm_get_htab_buf *hpte_buf;
ghf.flags = 0;
ghf.start_index = pte_index;
htab_fd = kvm_vm_ioctl(kvm_state, KVM_PPC_GET_HTAB_FD, &ghf);
if (htab_fd < 0) {
... | {
"code": [],
"line_no": []
} | uint64_t FUNC_0(PowerPCCPU *cpu, target_ulong pte_index)
{
int VAR_0;
struct kvm_get_htab_fd VAR_1;
struct kvm_get_htab_buf *VAR_2;
VAR_1.flags = 0;
VAR_1.start_index = pte_index;
VAR_0 = kvm_vm_ioctl(kvm_state, KVM_PPC_GET_HTAB_FD, &VAR_1);
if (VAR_0 < 0) {
goto error_ou... | [
"uint64_t FUNC_0(PowerPCCPU *cpu, target_ulong pte_index)\n{",
"int VAR_0;",
"struct kvm_get_htab_fd VAR_1;",
"struct kvm_get_htab_buf *VAR_2;",
"VAR_1.flags = 0;",
"VAR_1.start_index = pte_index;",
"VAR_0 = kvm_vm_ioctl(kvm_state, KVM_PPC_GET_HTAB_FD, &VAR_1);",
"if (VAR_0 < 0) {",
"goto error_out... | [
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
],
[
27
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49,
51
],
[
53
],
[
55,
57
... |
10,134 | static void xenfb_guest_copy(struct XenFB *xenfb, int x, int y, int w, int h)
{
DisplaySurface *surface = qemu_console_surface(xenfb->c.con);
int line, oops = 0;
int bpp = surface_bits_per_pixel(surface);
int linesize = surface_stride(surface);
uint8_t *data = surface_data(surface);
if ... | false | qemu | 9f2130f58d5dd4e1fcb435cca08bf77e7c32e6c6 | static void xenfb_guest_copy(struct XenFB *xenfb, int x, int y, int w, int h)
{
DisplaySurface *surface = qemu_console_surface(xenfb->c.con);
int line, oops = 0;
int bpp = surface_bits_per_pixel(surface);
int linesize = surface_stride(surface);
uint8_t *data = surface_data(surface);
if ... | {
"code": [],
"line_no": []
} | static void FUNC_0(struct XenFB *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4)
{
DisplaySurface *surface = qemu_console_surface(VAR_0->c.con);
int VAR_5, VAR_6 = 0;
int VAR_7 = surface_bits_per_pixel(surface);
int VAR_8 = surface_stride(surface);
uint8_t *data = surface_data(surface);
... | [
"static void FUNC_0(struct XenFB *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4)\n{",
"DisplaySurface *surface = qemu_console_surface(VAR_0->c.con);",
"int VAR_5, VAR_6 = 0;",
"int VAR_7 = surface_bits_per_pixel(surface);",
"int VAR_8 = surface_stride(surface);",
"uint8_t *data = surface_data(surface)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
... |
10,135 | DISAS_INSN(fbcc)
{
uint32_t offset;
uint32_t addr;
TCGv flag;
int l1;
addr = s->pc;
offset = cpu_ldsw_code(env, s->pc);
s->pc += 2;
if (insn & (1 << 6)) {
offset = (offset << 16) | cpu_lduw_code(env, s->pc);
s->pc += 2;
}
l1 = gen_new_label();
... | false | qemu | 42a268c241183877192c376d03bd9b6d527407c7 | DISAS_INSN(fbcc)
{
uint32_t offset;
uint32_t addr;
TCGv flag;
int l1;
addr = s->pc;
offset = cpu_ldsw_code(env, s->pc);
s->pc += 2;
if (insn & (1 << 6)) {
offset = (offset << 16) | cpu_lduw_code(env, s->pc);
s->pc += 2;
}
l1 = gen_new_label();
... | {
"code": [],
"line_no": []
} | FUNC_0(VAR_0)
{
uint32_t offset;
uint32_t addr;
TCGv flag;
int VAR_1;
addr = s->pc;
offset = cpu_ldsw_code(env, s->pc);
s->pc += 2;
if (insn & (1 << 6)) {
offset = (offset << 16) | cpu_lduw_code(env, s->pc);
s->pc += 2;
}
VAR_1 = gen_new_label();
... | [
"FUNC_0(VAR_0)\n{",
"uint32_t offset;",
"uint32_t addr;",
"TCGv flag;",
"int VAR_1;",
"addr = s->pc;",
"offset = cpu_ldsw_code(env, s->pc);",
"s->pc += 2;",
"if (insn & (1 << 6)) {",
"offset = (offset << 16) | cpu_lduw_code(env, s->pc);",
"s->pc += 2;",
"}",
"VAR_1 = gen_new_label();",
"fl... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37
],
[
41
],
[
43,
45
],
[
47,
49
],
[
51
... |
10,138 | int omap_validate_local_addr(struct omap_mpu_state_s *s,
target_phys_addr_t addr)
{
return addr >= OMAP_LOCALBUS_BASE && addr < OMAP_LOCALBUS_BASE + 0x1000000;
}
| false | qemu | b854bc196f5c4b4e3299c0b0ee63cf828ece9e77 | int omap_validate_local_addr(struct omap_mpu_state_s *s,
target_phys_addr_t addr)
{
return addr >= OMAP_LOCALBUS_BASE && addr < OMAP_LOCALBUS_BASE + 0x1000000;
}
| {
"code": [],
"line_no": []
} | int FUNC_0(struct omap_mpu_state_s *VAR_0,
target_phys_addr_t VAR_1)
{
return VAR_1 >= OMAP_LOCALBUS_BASE && VAR_1 < OMAP_LOCALBUS_BASE + 0x1000000;
}
| [
"int FUNC_0(struct omap_mpu_state_s *VAR_0,\ntarget_phys_addr_t VAR_1)\n{",
"return VAR_1 >= OMAP_LOCALBUS_BASE && VAR_1 < OMAP_LOCALBUS_BASE + 0x1000000;",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
]
] |
10,139 | static void build_pci_bus_state_init(AcpiBuildPciBusHotplugState *state,
AcpiBuildPciBusHotplugState *parent,
bool pcihp_bridge_en)
{
state->parent = parent;
state->device_table = build_alloc_array();
state->notify_table = build... | false | qemu | b23046abe78f48498a423b802d6d86ba0172d57f | static void build_pci_bus_state_init(AcpiBuildPciBusHotplugState *state,
AcpiBuildPciBusHotplugState *parent,
bool pcihp_bridge_en)
{
state->parent = parent;
state->device_table = build_alloc_array();
state->notify_table = build... | {
"code": [],
"line_no": []
} | static void FUNC_0(AcpiBuildPciBusHotplugState *VAR_0,
AcpiBuildPciBusHotplugState *VAR_1,
bool VAR_2)
{
VAR_0->VAR_1 = VAR_1;
VAR_0->device_table = build_alloc_array();
VAR_0->notify_table = build_alloc_array();
VAR_0->VAR... | [
"static void FUNC_0(AcpiBuildPciBusHotplugState *VAR_0,\nAcpiBuildPciBusHotplugState *VAR_1,\nbool VAR_2)\n{",
"VAR_0->VAR_1 = VAR_1;",
"VAR_0->device_table = build_alloc_array();",
"VAR_0->notify_table = build_alloc_array();",
"VAR_0->VAR_2 = VAR_2;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
10,140 | int ff_MPV_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pic_arg, int *got_packet)
{
MpegEncContext *s = avctx->priv_data;
int i, stuffing_count, ret;
int context_count = s->slice_context_count;
s->picture_in_gop_number++;
if (load_input_pic... | false | FFmpeg | 1c7b71a5bdb88ebb69734100405bbb5441b871e8 | int ff_MPV_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pic_arg, int *got_packet)
{
MpegEncContext *s = avctx->priv_data;
int i, stuffing_count, ret;
int context_count = s->slice_context_count;
s->picture_in_gop_number++;
if (load_input_pic... | {
"code": [],
"line_no": []
} | int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,
const AVFrame *VAR_2, int *VAR_3)
{
MpegEncContext *s = VAR_0->priv_data;
int VAR_12, VAR_5, VAR_6;
int VAR_7 = s->slice_context_count;
s->picture_in_gop_number++;
if (load_input_picture(s, VAR_2) < 0)
r... | [
"int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,\nconst AVFrame *VAR_2, int *VAR_3)\n{",
"MpegEncContext *s = VAR_0->priv_data;",
"int VAR_12, VAR_5, VAR_6;",
"int VAR_7 = s->slice_context_count;",
"s->picture_in_gop_number++;",
"if (load_input_picture(s, VAR_2) < 0)\nreturn -1;",
"if (select_input_p... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
35
],
[
37,
39,
41
],
[
43
],
[
45,
47,
49
],
[
51
],
[
53
],
[
57
],
[
59
... |
10,141 | void s390x_cpu_debug_excp_handler(CPUState *cs)
{
S390CPU *cpu = S390_CPU(cs);
CPUS390XState *env = &cpu->env;
CPUWatchpoint *wp_hit = cs->watchpoint_hit;
if (wp_hit && wp_hit->flags & BP_CPU) {
/* FIXME: When the storage-alteration-space control bit is set,
the exception sho... | false | qemu | 6886b98036a8f8f5bce8b10756ce080084cef11b | void s390x_cpu_debug_excp_handler(CPUState *cs)
{
S390CPU *cpu = S390_CPU(cs);
CPUS390XState *env = &cpu->env;
CPUWatchpoint *wp_hit = cs->watchpoint_hit;
if (wp_hit && wp_hit->flags & BP_CPU) {
cs->watchpoint_hit = NULL;
env->per_address = env->psw.addr;
... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUState *VAR_0)
{
S390CPU *cpu = S390_CPU(VAR_0);
CPUS390XState *env = &cpu->env;
CPUWatchpoint *wp_hit = VAR_0->watchpoint_hit;
if (wp_hit && wp_hit->flags & BP_CPU) {
VAR_0->watchpoint_hit = NULL;
env->per_address = env->psw.addr;
env-... | [
"void FUNC_0(CPUState *VAR_0)\n{",
"S390CPU *cpu = S390_CPU(VAR_0);",
"CPUS390XState *env = &cpu->env;",
"CPUWatchpoint *wp_hit = VAR_0->watchpoint_hit;",
"if (wp_hit && wp_hit->flags & BP_CPU) {",
"VAR_0->watchpoint_hit = NULL;",
"env->per_address = env->psw.addr;",
"env->per_perc_atmid |= PER_CODE_E... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
25
],
[
29
],
[
31
],
[
41
],
[
51
],
[
53
],
[
55
],
[
57
]
] |
10,142 | static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int depth, AVFormatContext *s)
{
AVIOContext *pb;
WtvFile *wf;
uint8_t *buffer;
if (seek_by_sector(s->pb, first_sector, 0) < 0)
return NULL;
wf = av_mallocz(sizeof(WtvFile));
if (!wf)
return ... | false | FFmpeg | 8baaa924bd42977c1f5c4aae0fe24985afb52a87 | static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int depth, AVFormatContext *s)
{
AVIOContext *pb;
WtvFile *wf;
uint8_t *buffer;
if (seek_by_sector(s->pb, first_sector, 0) < 0)
return NULL;
wf = av_mallocz(sizeof(WtvFile));
if (!wf)
return ... | {
"code": [],
"line_no": []
} | static AVIOContext * FUNC_0(int first_sector, uint64_t length, int depth, AVFormatContext *s)
{
AVIOContext *pb;
WtvFile *wf;
uint8_t *buffer;
if (seek_by_sector(s->pb, first_sector, 0) < 0)
return NULL;
wf = av_mallocz(sizeof(WtvFile));
if (!wf)
return NULL;
... | [
"static AVIOContext * FUNC_0(int first_sector, uint64_t length, int depth, AVFormatContext *s)\n{",
"AVIOContext *pb;",
"WtvFile *wf;",
"uint8_t *buffer;",
"if (seek_by_sector(s->pb, first_sector, 0) < 0)\nreturn NULL;",
"wf = av_mallocz(sizeof(WtvFile));",
"if (!wf)\nreturn NULL;",
"if (depth == 0) {... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
21,
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
10,143 | static int smacker_probe(AVProbeData *p)
{
if (p->buf_size < 4)
return 0;
if(p->buf[0] == 'S' && p->buf[1] == 'M' && p->buf[2] == 'K'
&& (p->buf[3] == '2' || p->buf[3] == '4'))
return AVPROBE_SCORE_MAX;
else
return 0;
}
| false | FFmpeg | 87e8788680e16c51f6048af26f3f7830c35207a5 | static int smacker_probe(AVProbeData *p)
{
if (p->buf_size < 4)
return 0;
if(p->buf[0] == 'S' && p->buf[1] == 'M' && p->buf[2] == 'K'
&& (p->buf[3] == '2' || p->buf[3] == '4'))
return AVPROBE_SCORE_MAX;
else
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(AVProbeData *VAR_0)
{
if (VAR_0->buf_size < 4)
return 0;
if(VAR_0->buf[0] == 'S' && VAR_0->buf[1] == 'M' && VAR_0->buf[2] == 'K'
&& (VAR_0->buf[3] == '2' || VAR_0->buf[3] == '4'))
return AVPROBE_SCORE_MAX;
else
return 0;
}
| [
"static int FUNC_0(AVProbeData *VAR_0)\n{",
"if (VAR_0->buf_size < 4)\nreturn 0;",
"if(VAR_0->buf[0] == 'S' && VAR_0->buf[1] == 'M' && VAR_0->buf[2] == 'K'\n&& (VAR_0->buf[3] == '2' || VAR_0->buf[3] == '4'))\nreturn AVPROBE_SCORE_MAX;",
"else\nreturn 0;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9,
11,
13
],
[
15,
17
],
[
19
]
] |
10,144 | int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque)
#endif
{
AVDictionary *options = NULL;
AVDictionaryEntry *e;
int ret=0;
if (args && *args) {
if (!filter->filter->priv_class) {
av_log(filter, AV_LOG_ERROR, "This filter does not take any "
... | false | FFmpeg | f1e62af0e03f5d62e3f022031e0fca563fcc2c9d | int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque)
#endif
{
AVDictionary *options = NULL;
AVDictionaryEntry *e;
int ret=0;
if (args && *args) {
if (!filter->filter->priv_class) {
av_log(filter, AV_LOG_ERROR, "This filter does not take any "
... | {
"code": [],
"line_no": []
} | int FUNC_0(AVFilterContext *VAR_0, const char *VAR_1, void *VAR_2)
#endif
{
AVDictionary *options = NULL;
AVDictionaryEntry *e;
int VAR_3=0;
if (VAR_1 && *VAR_1) {
if (!VAR_0->VAR_0->priv_class) {
av_log(VAR_0, AV_LOG_ERROR, "This VAR_0 does not take any "
... | [
"int FUNC_0(AVFilterContext *VAR_0, const char *VAR_1, void *VAR_2)\n#endif\n{",
"AVDictionary *options = NULL;",
"AVDictionaryEntry *e;",
"int VAR_3=0;",
"if (VAR_1 && *VAR_1) {",
"if (!VAR_0->VAR_0->priv_class) {",
"av_log(VAR_0, AV_LOG_ERROR, \"This VAR_0 does not take any \"\n\"options, but options ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
29,
31,
33
],
[
37
],
[
39
],
[
43,
45,
47
],
[
51
],
[
53
],
[
55
],
[
57
... |
10,145 | void audio_encode_example(const char *filename)
{
AVCodec *codec;
AVCodecContext *c= NULL;
int frame_size, i, j, out_size, outbuf_size;
FILE *f;
short *samples;
float t, tincr;
uint8_t *outbuf;
printf("Audio encoding\n");
/* find the MP2 encoder */
codec = avcodec_... | true | FFmpeg | 1c0e205fab4bd5bbfa0399af2cd5e281b414b3d5 | void audio_encode_example(const char *filename)
{
AVCodec *codec;
AVCodecContext *c= NULL;
int frame_size, i, j, out_size, outbuf_size;
FILE *f;
short *samples;
float t, tincr;
uint8_t *outbuf;
printf("Audio encoding\n");
codec = avcodec_find_encoder(CODEC_ID_MP2)... | {
"code": [
" f = fopen(filename, \"w\");",
" f = fopen(filename, \"w\");"
],
"line_no": [
77,
77
]
} | void FUNC_0(const char *VAR_0)
{
AVCodec *codec;
AVCodecContext *c= NULL;
int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5;
FILE *f;
short *VAR_6;
float VAR_7, VAR_8;
uint8_t *outbuf;
printf("Audio encoding\n");
codec = avcodec_find_encoder(CODEC_ID_MP2);
if (!codec) {
... | [
"void FUNC_0(const char *VAR_0)\n{",
"AVCodec *codec;",
"AVCodecContext *c= NULL;",
"int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5;",
"FILE *f;",
"short *VAR_6;",
"float VAR_7, VAR_8;",
"uint8_t *outbuf;",
"printf(\"Audio encoding\\n\");",
"codec = avcodec_find_encoder(CODEC_ID_MP2);",
"if (!codec) {",
... | [
0,
0,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
45
],
[
47
],
[
49
],
[
55
],
[
57
... |
10,147 | static int w64_read_header(AVFormatContext *s)
{
int64_t size, data_ofs = 0;
AVIOContext *pb = s->pb;
WAVDemuxContext *wav = s->priv_data;
AVStream *st;
uint8_t guid[16];
int ret;
avio_read(pb, guid, 16);
if (memcmp(guid, ff_w64_guid_riff, 16))
/* riff + wave + fm... | true | FFmpeg | 3d232196372f309a75ed074c4cef30578eec1782 | static int w64_read_header(AVFormatContext *s)
{
int64_t size, data_ofs = 0;
AVIOContext *pb = s->pb;
WAVDemuxContext *wav = s->priv_data;
AVStream *st;
uint8_t guid[16];
int ret;
avio_read(pb, guid, 16);
if (memcmp(guid, ff_w64_guid_riff, 16))
if (avio_rl64... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
int64_t size, data_ofs = 0;
AVIOContext *pb = VAR_0->pb;
WAVDemuxContext *wav = VAR_0->priv_data;
AVStream *st;
uint8_t guid[16];
int VAR_1;
avio_read(pb, guid, 16);
if (memcmp(guid, ff_w64_guid_riff, 16))
if (avio... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"int64_t size, data_ofs = 0;",
"AVIOContext *pb = VAR_0->pb;",
"WAVDemuxContext *wav = VAR_0->priv_data;",
"AVStream *st;",
"uint8_t guid[16];",
"int VAR_1;",
"avio_read(pb, guid, 16);",
"if (memcmp(guid, ff_w64_guid_riff, 16))\nif (avio_rl64(pb) ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
28,
33
],
[
35
],
[
37
],
[
40
],
[
44
],
[
48
],
[
50,
52
],
[
56
],
[
58,
60
],
[
62
... |
10,148 | static void floor_fit(venc_context_t * venc, floor_t * fc, float * coeffs, int * posts, int samples) {
int range = 255 / fc->multiplier + 1;
int i;
for (i = 0; i < fc->values; i++) {
int position = fc->list[fc->list[i].sort].x;
int begin = fc->list[fc->list[FFMAX(i-1, 0)].sort].x;
... | false | FFmpeg | 68e75e4dec6b5f46a190118eecbba1e95c396e3d | static void floor_fit(venc_context_t * venc, floor_t * fc, float * coeffs, int * posts, int samples) {
int range = 255 / fc->multiplier + 1;
int i;
for (i = 0; i < fc->values; i++) {
int position = fc->list[fc->list[i].sort].x;
int begin = fc->list[fc->list[FFMAX(i-1, 0)].sort].x;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(venc_context_t * VAR_0, floor_t * VAR_1, float * VAR_2, int * VAR_3, int VAR_4) {
int VAR_5 = 255 / VAR_1->multiplier + 1;
int VAR_6;
for (VAR_6 = 0; VAR_6 < VAR_1->values; VAR_6++) {
int position = VAR_1->list[VAR_1->list[VAR_6].sort].x;
int begin = VAR_1->list[VAR_1... | [
"static void FUNC_0(venc_context_t * VAR_0, floor_t * VAR_1, float * VAR_2, int * VAR_3, int VAR_4) {",
"int VAR_5 = 255 / VAR_1->multiplier + 1;",
"int VAR_6;",
"for (VAR_6 = 0; VAR_6 < VAR_1->values; VAR_6++) {",
"int position = VAR_1->list[VAR_1->list[VAR_6].sort].x;",
"int begin = VAR_1->list[VAR_1->l... | [
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
],
[
39
]
] |
10,150 | static int audio_decode_frame(VideoState *is)
{
AVPacket *pkt_temp = &is->audio_pkt_temp;
AVPacket *pkt = &is->audio_pkt;
AVCodecContext *dec = is->audio_st->codec;
int len1, data_size, resampled_data_size;
int64_t dec_channel_layout;
int got_frame;
av_unused double audio_clock0;
... | false | FFmpeg | 782e06e292c59abc8528484bd1cb253a42d7f53e | static int audio_decode_frame(VideoState *is)
{
AVPacket *pkt_temp = &is->audio_pkt_temp;
AVPacket *pkt = &is->audio_pkt;
AVCodecContext *dec = is->audio_st->codec;
int len1, data_size, resampled_data_size;
int64_t dec_channel_layout;
int got_frame;
av_unused double audio_clock0;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(VideoState *VAR_0)
{
AVPacket *pkt_temp = &VAR_0->audio_pkt_temp;
AVPacket *pkt = &VAR_0->audio_pkt;
AVCodecContext *dec = VAR_0->audio_st->codec;
int VAR_1, VAR_2, VAR_3;
int64_t dec_channel_layout;
int VAR_4;
av_unused double audio_clock0;
int VAR_5 = 0;
... | [
"static int FUNC_0(VideoState *VAR_0)\n{",
"AVPacket *pkt_temp = &VAR_0->audio_pkt_temp;",
"AVPacket *pkt = &VAR_0->audio_pkt;",
"AVCodecContext *dec = VAR_0->audio_st->codec;",
"int VAR_1, VAR_2, VAR_3;",
"int64_t dec_channel_layout;",
"int VAR_4;",
"av_unused double audio_clock0;",
"int VAR_5 = 0;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[... |
10,151 | static hwaddr ppc_hash64_pte_raddr(ppc_slb_t *slb, ppc_hash_pte64_t pte,
target_ulong eaddr)
{
hwaddr mask;
int target_page_bits;
hwaddr rpn = pte.pte1 & HPTE64_R_RPN;
/*
* We support 4K, 64K and 16M now
*/
target_page_bits = ppc_hash64_page_shif... | true | qemu | cd6a9bb6e977864b1b7ec21b983fa0678b4b82e9 | static hwaddr ppc_hash64_pte_raddr(ppc_slb_t *slb, ppc_hash_pte64_t pte,
target_ulong eaddr)
{
hwaddr mask;
int target_page_bits;
hwaddr rpn = pte.pte1 & HPTE64_R_RPN;
target_page_bits = ppc_hash64_page_shift(slb);
mask = (1ULL << target_page_bits)... | {
"code": [
"static hwaddr ppc_hash64_pte_raddr(ppc_slb_t *slb, ppc_hash_pte64_t pte,",
" target_ulong eaddr)",
" hwaddr mask;",
" int target_page_bits;",
" hwaddr rpn = pte.pte1 & HPTE64_R_RPN;",
" target_page_bits = ppc_hash64_page_shift(slb);",
... | static hwaddr FUNC_0(ppc_slb_t *slb, ppc_hash_pte64_t pte,
target_ulong eaddr)
{
hwaddr mask;
int VAR_0;
hwaddr rpn = pte.pte1 & HPTE64_R_RPN;
VAR_0 = ppc_hash64_page_shift(slb);
mask = (1ULL << VAR_0) - 1;
return (rpn & ~mask) | (eaddr & mask... | [
"static hwaddr FUNC_0(ppc_slb_t *slb, ppc_hash_pte64_t pte,\ntarget_ulong eaddr)\n{",
"hwaddr mask;",
"int VAR_0;",
"hwaddr rpn = pte.pte1 & HPTE64_R_RPN;",
"VAR_0 = ppc_hash64_page_shift(slb);",
"mask = (1ULL << VAR_0) - 1;",
"return (rpn & ~mask) | (eaddr & mask);",
"}"
] | [
1,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
10,152 | static void nfs_file_close(BlockDriverState *bs)
{
NFSClient *client = bs->opaque;
nfs_client_close(client);
qemu_mutex_destroy(&client->mutex);
}
| true | qemu | 113fe792fd4931dd0538f03859278b8719ee4fa2 | static void nfs_file_close(BlockDriverState *bs)
{
NFSClient *client = bs->opaque;
nfs_client_close(client);
qemu_mutex_destroy(&client->mutex);
}
| {
"code": [
" qemu_mutex_destroy(&client->mutex);"
],
"line_no": [
9
]
} | static void FUNC_0(BlockDriverState *VAR_0)
{
NFSClient *client = VAR_0->opaque;
nfs_client_close(client);
qemu_mutex_destroy(&client->mutex);
}
| [
"static void FUNC_0(BlockDriverState *VAR_0)\n{",
"NFSClient *client = VAR_0->opaque;",
"nfs_client_close(client);",
"qemu_mutex_destroy(&client->mutex);",
"}"
] | [
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
10,153 | static int mp3_seek(AVFormatContext *s, int stream_index, int64_t timestamp,
int flags)
{
MP3Context *mp3 = s->priv_data;
AVIndexEntry *ie;
AVStream *st = s->streams[0];
int64_t ret = av_index_search_timestamp(st, timestamp, flags);
uint32_t header = 0;
if (!mp3->x... | true | FFmpeg | b6267901c466c482b2f1af3578b0a6d88265d144 | static int mp3_seek(AVFormatContext *s, int stream_index, int64_t timestamp,
int flags)
{
MP3Context *mp3 = s->priv_data;
AVIndexEntry *ie;
AVStream *st = s->streams[0];
int64_t ret = av_index_search_timestamp(st, timestamp, flags);
uint32_t header = 0;
if (!mp3->x... | {
"code": [
" while (!s->pb->eof_reached) {",
" header = (header << 8) + avio_r8(s->pb);",
" if (ff_mpa_check_header(header) >= 0) {",
" ff_update_cur_dts(s, st, ie->timestamp);",
" ret = avio_seek(s->pb, -4, SEEK_CUR);",
" st->skip_samples = i... | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1, int64_t VAR_2,
int VAR_3)
{
MP3Context *mp3 = VAR_0->priv_data;
AVIndexEntry *ie;
AVStream *st = VAR_0->streams[0];
int64_t ret = av_index_search_timestamp(st, VAR_2, VAR_3);
uint32_t header = 0;
if (!mp3->xing_t... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1, int64_t VAR_2,\nint VAR_3)\n{",
"MP3Context *mp3 = VAR_0->priv_data;",
"AVIndexEntry *ie;",
"AVStream *st = VAR_0->streams[0];",
"int64_t ret = av_index_search_timestamp(st, VAR_2, VAR_3);",
"uint32_t header = 0;",
"if (!mp3->xing_toc) {",
"st->sk... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
1,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31,
33
],
[
37
],
[
39
],
[
41,
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[... |
10,154 | static void test_bmdma_no_busmaster(void)
{
QPCIDevice *dev;
void *bmdma_base, *ide_base;
uint8_t status;
dev = get_pci_device(&bmdma_base, &ide_base);
/* No PRDT_EOT, each entry addr 0/size 64k, and in theory qemu shouldn't be
* able to access it anyway because the Bus Master bit in... | true | qemu | b4ba67d9a702507793c2724e56f98e9b0f7be02b | static void test_bmdma_no_busmaster(void)
{
QPCIDevice *dev;
void *bmdma_base, *ide_base;
uint8_t status;
dev = get_pci_device(&bmdma_base, &ide_base);
PrdtEntry prdt[4096] = { };
status = send_dma_request(CMD_READ_DMA | CMDF_NO_BM, 0, 512,
... | {
"code": [
" dev = get_pci_device(&bmdma_base, &ide_base);",
" void *bmdma_base, *ide_base;",
" dev = get_pci_device(&bmdma_base, &ide_base);",
" assert_bit_clear(qpci_io_readb(dev, ide_base + reg_status), DF | ERR);",
" assert_bit_clear(qpci_io_readb(dev, ide_base + reg_status), D... | static void FUNC_0(void)
{
QPCIDevice *dev;
void *VAR_0, *VAR_1;
uint8_t status;
dev = get_pci_device(&VAR_0, &VAR_1);
PrdtEntry prdt[4096] = { };
status = send_dma_request(CMD_READ_DMA | CMDF_NO_BM, 0, 512,
prdt, ARRAY_SIZE(prdt), NULL);
... | [
"static void FUNC_0(void)\n{",
"QPCIDevice *dev;",
"void *VAR_0, *VAR_1;",
"uint8_t status;",
"dev = get_pci_device(&VAR_0, &VAR_1);",
"PrdtEntry prdt[4096] = { };",
"status = send_dma_request(CMD_READ_DMA | CMDF_NO_BM, 0, 512,\nprdt, ARRAY_SIZE(prdt), NULL);",
"g_assert_cmphex(status, ==, BM_STS_ACTI... | [
0,
0,
1,
0,
1,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
25
],
[
29,
31
],
[
39
],
[
41
],
[
43
]
] |
10,155 | static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
{
char *pix_fmts;
OutputStream *ost = ofilter->ost;
AVCodecContext *codec = ost->st->codec;
AVFilterContext *last_filter = out->filter_ctx;
int pad_idx = out->pad_idx;
int ret;
char n... | true | FFmpeg | 58dee6e62d593747b5dbe8ce6c2ff1833151b9b0 | static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
{
char *pix_fmts;
OutputStream *ost = ofilter->ost;
AVCodecContext *codec = ost->st->codec;
AVFilterContext *last_filter = out->filter_ctx;
int pad_idx = out->pad_idx;
int ret;
char n... | {
"code": [
" name, NULL, pix_fmts, fg->graph);"
],
"line_no": [
27
]
} | static int FUNC_0(FilterGraph *VAR_0, OutputFilter *VAR_1, AVFilterInOut *VAR_2)
{
char *VAR_3;
OutputStream *ost = VAR_1->ost;
AVCodecContext *codec = ost->st->codec;
AVFilterContext *last_filter = VAR_2->filter_ctx;
int VAR_4 = VAR_2->VAR_4;
int VAR_5;
char VAR_6[255];
snpri... | [
"static int FUNC_0(FilterGraph *VAR_0, OutputFilter *VAR_1, AVFilterInOut *VAR_2)\n{",
"char *VAR_3;",
"OutputStream *ost = VAR_1->ost;",
"AVCodecContext *codec = ost->st->codec;",
"AVFilterContext *last_filter = VAR_2->filter_ctx;",
"int VAR_4 = VAR_2->VAR_4;",
"int VAR_5;",
"char VAR_6[255];",
"sn... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23,
25,
27
],
[
29,
31
],
[
35
],
[
37
],
[
39
],
[
43,
45,
47,
49
],
[
51,
53
],
[... |
10,156 | static inline int handle_cpu_signal(uintptr_t pc, siginfo_t *info,
int is_write, sigset_t *old_set)
{
CPUState *cpu = current_cpu;
CPUClass *cc;
int ret;
unsigned long address = (unsigned long)info->si_addr;
/* We must handle PC addresses from two differe... | true | qemu | 9c4bbee9e3b83544257e82566342c29e15a88637 | static inline int handle_cpu_signal(uintptr_t pc, siginfo_t *info,
int is_write, sigset_t *old_set)
{
CPUState *cpu = current_cpu;
CPUClass *cc;
int ret;
unsigned long address = (unsigned long)info->si_addr;
if (helper_re... | {
"code": [
" if (is_write && h2g_valid(address)) {"
],
"line_no": [
95
]
} | static inline int FUNC_0(uintptr_t VAR_0, siginfo_t *VAR_1,
int VAR_2, sigset_t *VAR_3)
{
CPUState *cpu = current_cpu;
CPUClass *cc;
int VAR_4;
unsigned long VAR_5 = (unsigned long)VAR_1->si_addr;
if (helper_retaddr) {
... | [
"static inline int FUNC_0(uintptr_t VAR_0, siginfo_t *VAR_1,\nint VAR_2, sigset_t *VAR_3)\n{",
"CPUState *cpu = current_cpu;",
"CPUClass *cc;",
"int VAR_4;",
"unsigned long VAR_5 = (unsigned long)VAR_1->si_addr;",
"if (helper_retaddr) {",
"VAR_0 = helper_retaddr;",
"} else {",
"VAR_0 += GETPC_ADJ;",... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
73
],
[
75,
77
],
[
79
],
[
81
],
[
85,
87,
89
],
[
91,
95
],
[
97
],
[... |
10,157 | static void vc1_sprite_flush(AVCodecContext *avctx)
{
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
AVFrame *f = &s->current_picture.f;
int plane, i;
/* Windows Media Image codecs have a convergence interval of two keyframes.
Since we can't enforce it, clear to bla... | true | FFmpeg | f6774f905fb3cfdc319523ac640be30b14c1bc55 | static void vc1_sprite_flush(AVCodecContext *avctx)
{
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
AVFrame *f = &s->current_picture.f;
int plane, i;
if (f->data[0])
for (plane = 0; plane < (s->flags&CODEC_FLAG_GRAY ? 1 : 3); plane++)
for ... | {
"code": [
" AVFrame *f = &s->current_picture.f;"
],
"line_no": [
9
]
} | static void FUNC_0(AVCodecContext *VAR_0)
{
VC1Context *v = VAR_0->priv_data;
MpegEncContext *s = &v->s;
AVFrame *f = &s->current_picture.f;
int VAR_1, VAR_2;
if (f->data[0])
for (VAR_1 = 0; VAR_1 < (s->flags&CODEC_FLAG_GRAY ? 1 : 3); VAR_1++)
for (VAR_2... | [
"static void FUNC_0(AVCodecContext *VAR_0)\n{",
"VC1Context *v = VAR_0->priv_data;",
"MpegEncContext *s = &v->s;",
"AVFrame *f = &s->current_picture.f;",
"int VAR_1, VAR_2;",
"if (f->data[0])\nfor (VAR_1 = 0; VAR_1 < (s->flags&CODEC_FLAG_GRAY ? 1 : 3); VAR_1++)",
"for (VAR_2 = 0; VAR_2 < v->sprite_h... | [
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
]
] |
10,158 | void pause_all_vcpus(void)
{
}
| true | qemu | 12d4536f7d911b6d87a766ad7300482ea663cea2 | void pause_all_vcpus(void)
{
}
| {
"code": [
"void pause_all_vcpus(void)"
],
"line_no": [
1
]
} | void FUNC_0(void)
{
}
| [
"void FUNC_0(void)\n{",
"}"
] | [
1,
0
] | [
[
1,
3
],
[
5
]
] |
10,160 | static int process_command(AVFilterContext *ctx, const char *cmd, const char *args,
char *res, int res_len, int flags)
{
OverlayContext *over = ctx->priv;
int ret;
if (!strcmp(cmd, "x"))
ret = set_expr(&over->x_pexpr, args, ctx);
else if (!strcmp(cmd, "y"... | false | FFmpeg | 9da369604ecf31d9dce2dee21ed214b8c43264c6 | static int process_command(AVFilterContext *ctx, const char *cmd, const char *args,
char *res, int res_len, int flags)
{
OverlayContext *over = ctx->priv;
int ret;
if (!strcmp(cmd, "x"))
ret = set_expr(&over->x_pexpr, args, ctx);
else if (!strcmp(cmd, "y"... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFilterContext *VAR_0, const char *VAR_1, const char *VAR_2,
char *VAR_3, int VAR_4, int VAR_5)
{
OverlayContext *over = VAR_0->priv;
int VAR_6;
if (!strcmp(VAR_1, "x"))
VAR_6 = set_expr(&over->x_pexpr, VAR_2, VAR_0);
else if (!strcmp(V... | [
"static int FUNC_0(AVFilterContext *VAR_0, const char *VAR_1, const char *VAR_2,\nchar *VAR_3, int VAR_4, int VAR_5)\n{",
"OverlayContext *over = VAR_0->priv;",
"int VAR_6;",
"if (!strcmp(VAR_1, \"x\"))\nVAR_6 = set_expr(&over->x_pexpr, VAR_2, VAR_0);",
"else if (!strcmp(VAR_1, \"y\"))\nVAR_6 = set_exp... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13,
15
],
[
17,
19
],
[
21,
23
],
[
25,
27
],
[
31,
33
],
[
37
],
[
39
],
[
41,
43,
45,
47
],
[
49
],
[
51
],
[
53
]
] |
10,162 | static int rv20_decode_picture_header(RVDecContext *rv)
{
MpegEncContext *s = &rv->m;
int seq, mb_pos, i;
int rpr_bits;
#if 0
GetBitContext gb= s->gb;
for(i=0; i<64; i++){
av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&gb));
if(i%4==3) av_log(s->avctx, AV_LOG_DEBUG, " ");... | true | FFmpeg | f65daf577af25df69f3b43a49879158d2f77f3f8 | static int rv20_decode_picture_header(RVDecContext *rv)
{
MpegEncContext *s = &rv->m;
int seq, mb_pos, i;
int rpr_bits;
#if 0
GetBitContext gb= s->gb;
for(i=0; i<64; i++){
av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&gb));
if(i%4==3) av_log(s->avctx, AV_LOG_DEBUG, " ");... | {
"code": [
" if(s->pp_time <=s->pb_time || s->pp_time <= s->pp_time - s->pb_time || s->pp_time<=0){",
" av_log(s->avctx, AV_LOG_DEBUG, \"messed up order, possible from seeking? skipping current b frame\\n\");",
" return FRAME_SKIPPED;",
" ff_mpeg4_i... | static int FUNC_0(RVDecContext *VAR_0)
{
MpegEncContext *s = &VAR_0->m;
int VAR_1, VAR_2, VAR_3;
int VAR_4;
#if 0
GetBitContext gb= s->gb;
for(VAR_3=0; VAR_3<64; VAR_3++){
av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&gb));
if(VAR_3%4==3) av_log(s->avctx, AV_LOG_DEBUG, "... | [
"static int FUNC_0(RVDecContext *VAR_0)\n{",
"MpegEncContext *s = &VAR_0->m;",
"int VAR_1, VAR_2, VAR_3;",
"int VAR_4;",
"#if 0\nGetBitContext gb= s->gb;",
"for(VAR_3=0; VAR_3<64; VAR_3++){",
"av_log(s->avctx, AV_LOG_DEBUG, \"%d\", get_bits1(&gb));",
"if(VAR_3%4==3) av_log(s->avctx, AV_LOG_DEBUG, \" \... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
47
],
[
49
... |
10,163 | void qio_channel_test_validate(QIOChannelTest *test)
{
g_assert_cmpint(memcmp(test->input,
test->output,
test->len), ==, 0);
g_assert(test->readerr == NULL);
g_assert(test->writeerr == NULL);
g_free(test->inputv);
g_free(test->outputv);... | true | qemu | 294bbbb4252ab5ff42d0e2c09f209c0bd7eb9748 | void qio_channel_test_validate(QIOChannelTest *test)
{
g_assert_cmpint(memcmp(test->input,
test->output,
test->len), ==, 0);
g_assert(test->readerr == NULL);
g_assert(test->writeerr == NULL);
g_free(test->inputv);
g_free(test->outputv);... | {
"code": [
" g_assert(test->readerr == NULL);",
" g_assert(test->writeerr == NULL);"
],
"line_no": [
11,
13
]
} | void FUNC_0(QIOChannelTest *VAR_0)
{
g_assert_cmpint(memcmp(VAR_0->input,
VAR_0->output,
VAR_0->len), ==, 0);
g_assert(VAR_0->readerr == NULL);
g_assert(VAR_0->writeerr == NULL);
g_free(VAR_0->inputv);
g_free(VAR_0->outputv);
g_fre... | [
"void FUNC_0(QIOChannelTest *VAR_0)\n{",
"g_assert_cmpint(memcmp(VAR_0->input,\nVAR_0->output,\nVAR_0->len), ==, 0);",
"g_assert(VAR_0->readerr == NULL);",
"g_assert(VAR_0->writeerr == NULL);",
"g_free(VAR_0->inputv);",
"g_free(VAR_0->outputv);",
"g_free(VAR_0->input);",
"g_free(VAR_0->output);",
"g... | [
0,
0,
1,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7,
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
10,164 | static void vapic_map_rom_writable(VAPICROMState *s)
{
hwaddr rom_paddr = s->rom_state_paddr & ROM_BLOCK_MASK;
MemoryRegionSection section;
MemoryRegion *as;
size_t rom_size;
uint8_t *ram;
as = sysbus_address_space(&s->busdev);
if (s->rom_mapped_writable) {
memory_region... | true | qemu | 18e5eec4db96a00907eb588a2b803401637c7f67 | static void vapic_map_rom_writable(VAPICROMState *s)
{
hwaddr rom_paddr = s->rom_state_paddr & ROM_BLOCK_MASK;
MemoryRegionSection section;
MemoryRegion *as;
size_t rom_size;
uint8_t *ram;
as = sysbus_address_space(&s->busdev);
if (s->rom_mapped_writable) {
memory_region... | {
"code": [
"static void vapic_map_rom_writable(VAPICROMState *s)"
],
"line_no": [
1
]
} | static void FUNC_0(VAPICROMState *VAR_0)
{
hwaddr rom_paddr = VAR_0->rom_state_paddr & ROM_BLOCK_MASK;
MemoryRegionSection section;
MemoryRegion *as;
size_t rom_size;
uint8_t *ram;
as = sysbus_address_space(&VAR_0->busdev);
if (VAR_0->rom_mapped_writable) {
memory_region... | [
"static void FUNC_0(VAPICROMState *VAR_0)\n{",
"hwaddr rom_paddr = VAR_0->rom_state_paddr & ROM_BLOCK_MASK;",
"MemoryRegionSection section;",
"MemoryRegion *as;",
"size_t rom_size;",
"uint8_t *ram;",
"as = sysbus_address_space(&VAR_0->busdev);",
"if (VAR_0->rom_mapped_writable) {",
"memory_region_de... | [
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
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
33
],
[
39
],
[
41
],
[
43
],
[
51
],
[
53
],
[
55
],
[
59,
61
],
[... |
10,165 | static int handle_intercept(S390CPU *cpu)
{
CPUState *cs = CPU(cpu);
struct kvm_run *run = cs->kvm_run;
int icpt_code = run->s390_sieic.icptcode;
int r = 0;
DPRINTF("intercept: 0x%x (at 0x%lx)\n", icpt_code,
(long)cs->kvm_run->psw_addr);
switch (icpt_code) {
case I... | true | qemu | a2689242b10a7bbc9a952659a2a5cc04a86d10e1 | static int handle_intercept(S390CPU *cpu)
{
CPUState *cs = CPU(cpu);
struct kvm_run *run = cs->kvm_run;
int icpt_code = run->s390_sieic.icptcode;
int r = 0;
DPRINTF("intercept: 0x%x (at 0x%lx)\n", icpt_code,
(long)cs->kvm_run->psw_addr);
switch (icpt_code) {
case I... | {
"code": [
" QObject *data;",
" data = qobject_from_jsonf(\"{ 'action': %s }\", \"pause\");",
" monitor_protocol_event(QEVENT_GUEST_PANICKED, data);",
" qobject_decref(data);",
" vm_stop(RUN_STATE_GUEST... | static int FUNC_0(S390CPU *VAR_0)
{
CPUState *cs = CPU(VAR_0);
struct kvm_run *VAR_1 = cs->kvm_run;
int VAR_2 = VAR_1->s390_sieic.icptcode;
int VAR_3 = 0;
DPRINTF("intercept: 0x%x (at 0x%lx)\n", VAR_2,
(long)cs->kvm_run->psw_addr);
switch (VAR_2) {
case ICPT_INSTRU... | [
"static int FUNC_0(S390CPU *VAR_0)\n{",
"CPUState *cs = CPU(VAR_0);",
"struct kvm_run *VAR_1 = cs->kvm_run;",
"int VAR_2 = VAR_1->s390_sieic.icptcode;",
"int VAR_3 = 0;",
"DPRINTF(\"intercept: 0x%x (at 0x%lx)\\n\", VAR_2,\n(long)cs->kvm_run->psw_addr);",
"switch (VAR_2) {",
"case ICPT_INSTRUCTION:\nVA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
19
],
[
21,
23
],
[
25
],
[
27,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
10,166 | static void dump_op_count(void)
{
int i;
FILE *f;
f = fopen("/tmp/op.log", "w");
for(i = INDEX_op_end; i < NB_OPS; i++) {
fprintf(f, "%s %" PRId64 "\n", tcg_op_defs[i].name, tcg_table_op_count[i]);
}
fclose(f);
}
| true | qemu | d70724cec84ff99ffc7f70dd567466acf228b389 | static void dump_op_count(void)
{
int i;
FILE *f;
f = fopen("/tmp/op.log", "w");
for(i = INDEX_op_end; i < NB_OPS; i++) {
fprintf(f, "%s %" PRId64 "\n", tcg_op_defs[i].name, tcg_table_op_count[i]);
}
fclose(f);
}
| {
"code": [
" FILE *f;",
" f = fopen(\"/tmp/op.log\", \"w\");",
" fprintf(f, \"%s %\" PRId64 \"\\n\", tcg_op_defs[i].name, tcg_table_op_count[i]);",
" fclose(f);"
],
"line_no": [
7,
9,
13,
17
]
} | static void FUNC_0(void)
{
int VAR_0;
FILE *f;
f = fopen("/tmp/op.log", "w");
for(VAR_0 = INDEX_op_end; VAR_0 < NB_OPS; VAR_0++) {
fprintf(f, "%s %" PRId64 "\n", tcg_op_defs[VAR_0].name, tcg_table_op_count[VAR_0]);
}
fclose(f);
}
| [
"static void FUNC_0(void)\n{",
"int VAR_0;",
"FILE *f;",
"f = fopen(\"/tmp/op.log\", \"w\");",
"for(VAR_0 = INDEX_op_end; VAR_0 < NB_OPS; VAR_0++) {",
"fprintf(f, \"%s %\" PRId64 \"\\n\", tcg_op_defs[VAR_0].name, tcg_table_op_count[VAR_0]);",
"}",
"fclose(f);",
"}"
] | [
0,
0,
1,
1,
0,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
10,167 | static void qed_check_for_leaks(QEDCheck *check)
{
BDRVQEDState *s = check->s;
size_t i;
for (i = s->header.header_size; i < check->nclusters; i++) {
if (!qed_test_bit(check->used_clusters, i)) {
check->result->leaks++;
}
}
}
| true | qemu | 19dfc44a94f759848a0f7de7378b2f8b9af6b5d0 | static void qed_check_for_leaks(QEDCheck *check)
{
BDRVQEDState *s = check->s;
size_t i;
for (i = s->header.header_size; i < check->nclusters; i++) {
if (!qed_test_bit(check->used_clusters, i)) {
check->result->leaks++;
}
}
}
| {
"code": [
" size_t i;"
],
"line_no": [
7
]
} | static void FUNC_0(QEDCheck *VAR_0)
{
BDRVQEDState *s = VAR_0->s;
size_t i;
for (i = s->header.header_size; i < VAR_0->nclusters; i++) {
if (!qed_test_bit(VAR_0->used_clusters, i)) {
VAR_0->result->leaks++;
}
}
}
| [
"static void FUNC_0(QEDCheck *VAR_0)\n{",
"BDRVQEDState *s = VAR_0->s;",
"size_t i;",
"for (i = s->header.header_size; i < VAR_0->nclusters; i++) {",
"if (!qed_test_bit(VAR_0->used_clusters, i)) {",
"VAR_0->result->leaks++;",
"}",
"}",
"}"
] | [
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
10,168 | static void test_qemu_strtol_full_max(void)
{
const char *str = g_strdup_printf("%ld", LONG_MAX);
long res;
int err;
err = qemu_strtol(str, NULL, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, LONG_MAX);
}
| true | qemu | d6f723b513a0c3c4e58343b7c52a2f9850861fa0 | static void test_qemu_strtol_full_max(void)
{
const char *str = g_strdup_printf("%ld", LONG_MAX);
long res;
int err;
err = qemu_strtol(str, NULL, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, LONG_MAX);
}
| {
"code": [
" const char *str = g_strdup_printf(\"%ld\", LONG_MAX);",
" const char *str = g_strdup_printf(\"%ld\", LONG_MAX);"
],
"line_no": [
5,
5
]
} | static void FUNC_0(void)
{
const char *VAR_0 = g_strdup_printf("%ld", LONG_MAX);
long VAR_1;
int VAR_2;
VAR_2 = qemu_strtol(VAR_0, NULL, 0, &VAR_1);
g_assert_cmpint(VAR_2, ==, 0);
g_assert_cmpint(VAR_1, ==, LONG_MAX);
}
| [
"static void FUNC_0(void)\n{",
"const char *VAR_0 = g_strdup_printf(\"%ld\", LONG_MAX);",
"long VAR_1;",
"int VAR_2;",
"VAR_2 = qemu_strtol(VAR_0, NULL, 0, &VAR_1);",
"g_assert_cmpint(VAR_2, ==, 0);",
"g_assert_cmpint(VAR_1, ==, LONG_MAX);",
"}"
] | [
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
]
] |
10,169 | char *spapr_get_cpu_core_type(const char *model)
{
char *core_type;
gchar **model_pieces = g_strsplit(model, ",", 2);
core_type = g_strdup_printf("%s-%s", model_pieces[0], TYPE_SPAPR_CPU_CORE);
g_strfreev(model_pieces);
/* Check whether it exists or whether we have to look up an alias name... | true | qemu | e17a87792d4886d2a508672c1639df3c1d40f1d1 | char *spapr_get_cpu_core_type(const char *model)
{
char *core_type;
gchar **model_pieces = g_strsplit(model, ",", 2);
core_type = g_strdup_printf("%s-%s", model_pieces[0], TYPE_SPAPR_CPU_CORE);
g_strfreev(model_pieces);
if (!object_class_by_name(core_type)) {
const char *rea... | {
"code": [
" g_strfreev(model_pieces);",
" realmodel = ppc_cpu_lookup_alias(model);",
" return spapr_get_cpu_core_type(realmodel);",
" return NULL;"
],
"line_no": [
13,
27,
31,
35
]
} | char *FUNC_0(const char *VAR_0)
{
char *VAR_1;
gchar **model_pieces = g_strsplit(VAR_0, ",", 2);
VAR_1 = g_strdup_printf("%s-%s", model_pieces[0], TYPE_SPAPR_CPU_CORE);
g_strfreev(model_pieces);
if (!object_class_by_name(VAR_1)) {
const char *VAR_2;
g_free(VAR_1);... | [
"char *FUNC_0(const char *VAR_0)\n{",
"char *VAR_1;",
"gchar **model_pieces = g_strsplit(VAR_0, \",\", 2);",
"VAR_1 = g_strdup_printf(\"%s-%s\", model_pieces[0], TYPE_SPAPR_CPU_CORE);",
"g_strfreev(model_pieces);",
"if (!object_class_by_name(VAR_1)) {",
"const char *VAR_2;",
"g_free(VAR_1);",
"VAR_2... | [
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
1,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
]
] |
10,170 | static int get_refcount(BlockDriverState *bs, int64_t cluster_index)
{
BDRVQcowState *s = bs->opaque;
int refcount_table_index, block_index;
int64_t refcount_block_offset;
int ret;
uint16_t *refcount_block;
uint16_t refcount;
refcount_table_index = cluster_index >> (s->cluster_bits... | true | qemu | db8a31d11d6a60f48d6817530640d75aa72a9a2f | static int get_refcount(BlockDriverState *bs, int64_t cluster_index)
{
BDRVQcowState *s = bs->opaque;
int refcount_table_index, block_index;
int64_t refcount_block_offset;
int ret;
uint16_t *refcount_block;
uint16_t refcount;
refcount_table_index = cluster_index >> (s->cluster_bits... | {
"code": [
" int refcount_table_index, block_index;"
],
"line_no": [
7
]
} | static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1)
{
BDRVQcowState *s = VAR_0->opaque;
int VAR_2, VAR_3;
int64_t refcount_block_offset;
int VAR_4;
uint16_t *refcount_block;
uint16_t refcount;
VAR_2 = VAR_1 >> (s->cluster_bits - REFCOUNT_SHIFT);
if (VAR_2 >= s->refcount_... | [
"static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"int VAR_2, VAR_3;",
"int64_t refcount_block_offset;",
"int VAR_4;",
"uint16_t *refcount_block;",
"uint16_t refcount;",
"VAR_2 = VAR_1 >> (s->cluster_bits - REFCOUNT_SHIFT);",
"if (VAR_2 >= s->refcou... | [
0,
0,
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
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
25,
27
],
[
29,
31
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
47,
49
],
[
51
],
[... |
10,171 | static void openpic_irq_raise(OpenPICState *opp, int n_CPU, IRQ_src_t *src)
{
int n_ci = IDR_CI0_SHIFT - n_CPU;
if ((opp->flags & OPENPIC_FLAG_IDE_CRIT) && (src->ide & (1 << n_ci))) {
qemu_irq_raise(opp->dst[n_CPU].irqs[OPENPIC_OUTPUT_CINT]);
} else {
qemu_irq_raise(opp->dst[n_CPU].i... | true | qemu | af7e9e74c6a62a5bcd911726a9e88d28b61490e0 | static void openpic_irq_raise(OpenPICState *opp, int n_CPU, IRQ_src_t *src)
{
int n_ci = IDR_CI0_SHIFT - n_CPU;
if ((opp->flags & OPENPIC_FLAG_IDE_CRIT) && (src->ide & (1 << n_ci))) {
qemu_irq_raise(opp->dst[n_CPU].irqs[OPENPIC_OUTPUT_CINT]);
} else {
qemu_irq_raise(opp->dst[n_CPU].i... | {
"code": [
"static void openpic_irq_raise(OpenPICState *opp, int n_CPU, IRQ_src_t *src)"
],
"line_no": [
1
]
} | static void FUNC_0(OpenPICState *VAR_0, int VAR_1, IRQ_src_t *VAR_2)
{
int VAR_3 = IDR_CI0_SHIFT - VAR_1;
if ((VAR_0->flags & OPENPIC_FLAG_IDE_CRIT) && (VAR_2->ide & (1 << VAR_3))) {
qemu_irq_raise(VAR_0->dst[VAR_1].irqs[OPENPIC_OUTPUT_CINT]);
} else {
qemu_irq_raise(VAR_0->dst[VAR_1... | [
"static void FUNC_0(OpenPICState *VAR_0, int VAR_1, IRQ_src_t *VAR_2)\n{",
"int VAR_3 = IDR_CI0_SHIFT - VAR_1;",
"if ((VAR_0->flags & OPENPIC_FLAG_IDE_CRIT) && (VAR_2->ide & (1 << VAR_3))) {",
"qemu_irq_raise(VAR_0->dst[VAR_1].irqs[OPENPIC_OUTPUT_CINT]);",
"} else {",
"qemu_irq_raise(VAR_0->dst[VAR_1].irq... | [
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
10,172 | static int dx2_decode_slice_420(GetBitContext *gb, AVFrame *frame,
int line, int left,
uint8_t lru[3][8])
{
int x, y;
int width = frame->width;
int ystride = frame->linesize[0];
int ustride = frame->linesize[1];
int vstri... | true | FFmpeg | 6e1a167c5564085385488b4f579e9efb987d4bfa | static int dx2_decode_slice_420(GetBitContext *gb, AVFrame *frame,
int line, int left,
uint8_t lru[3][8])
{
int x, y;
int width = frame->width;
int ystride = frame->linesize[0];
int ustride = frame->linesize[1];
int vstri... | {
"code": [
" for (y = 0; y < left - 1 && get_bits_left(gb) > 16; y += 2) {"
],
"line_no": [
35
]
} | static int FUNC_0(GetBitContext *VAR_0, AVFrame *VAR_1,
int VAR_2, int VAR_3,
uint8_t VAR_4[3][8])
{
int VAR_5, VAR_6;
int VAR_7 = VAR_1->VAR_7;
int VAR_8 = VAR_1->linesize[0];
int VAR_9 = VAR_1->linesize[1];
int VAR_10 =... | [
"static int FUNC_0(GetBitContext *VAR_0, AVFrame *VAR_1,\nint VAR_2, int VAR_3,\nuint8_t VAR_4[3][8])\n{",
"int VAR_5, VAR_6;",
"int VAR_7 = VAR_1->VAR_7;",
"int VAR_8 = VAR_1->linesize[0];",
"int VAR_9 = VAR_1->linesize[1];",
"int VAR_10 = VAR_1->linesize[2];",
"uint8_t *Y = VAR_1->data[0] + VAR_8 ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
... |
10,173 | static inline void RENAME(bgr16ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width)
{
int i;
assert(src1==src2);
for(i=0; i<width; i++)
{
int d0= ((uint32_t*)src1)[i];
int dl= (d0&0x07E0F81F);
int dh= ((d0>>5)&0x07C0F83F);
int dh2= (dh>>11) + (dh<<21);
int d= d... | true | FFmpeg | 2da0d70d5eebe42f9fcd27ee554419ebe2a5da06 | static inline void RENAME(bgr16ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width)
{
int i;
assert(src1==src2);
for(i=0; i<width; i++)
{
int d0= ((uint32_t*)src1)[i];
int dl= (d0&0x07E0F81F);
int dh= ((d0>>5)&0x07C0F83F);
int dh2= (dh>>11) + (dh<<21);
int d= d... | {
"code": [
"\tint i;",
"\tint i;",
"\tint i;",
"\tint i;",
"\tfor(i=0; i<width; i++)",
"\tint i;",
"\tfor(i=0; i<width; i++)",
"\tint i;",
"\tfor(i=0; i<width; i++)",
"\tint i;",
"\tfor(i=0; i<width; i++)",
"\tint i;",
"\tfor(i=0; i<width; i++)",
"\tint i;",
... | static inline void FUNC_0(bgr16ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width)
{
int VAR_0;
assert(src1==src2);
for(VAR_0=0; VAR_0<width; VAR_0++)
{
int d0= ((uint32_t*)src1)[VAR_0];
int dl= (d0&0x07E0F81F);
int dh= ((d0>>5)&0x07C0F83F);
int dh2= (dh>>11) + (... | [
"static inline void FUNC_0(bgr16ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width)\n{",
"int VAR_0;",
"assert(src1==src2);",
"for(VAR_0=0; VAR_0<width; VAR_0++)",
"{",
"int d0= ((uint32_t*)src1)[VAR_0];",
"int dl= (d0&0x07E0F81F);",
"int dh= ((d0>>5)&0x07C0F83F);",
"int dh2... | [
0,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
10,174 | static int file_close_dir(URLContext *h)
{
#if HAVE_DIRENT_H
FileContext *c = h->priv_data;
closedir(c->dir);
return 0;
#else
return AVERROR(ENOSYS);
#endif /* HAVE_DIRENT_H */
}
| false | FFmpeg | d65b9114f35c1afe2a7061f0a1ec957d33ba02b5 | static int file_close_dir(URLContext *h)
{
#if HAVE_DIRENT_H
FileContext *c = h->priv_data;
closedir(c->dir);
return 0;
#else
return AVERROR(ENOSYS);
#endif
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(URLContext *VAR_0)
{
#if HAVE_DIRENT_H
FileContext *c = VAR_0->priv_data;
closedir(c->dir);
return 0;
#else
return AVERROR(ENOSYS);
#endif
}
| [
"static int FUNC_0(URLContext *VAR_0)\n{",
"#if HAVE_DIRENT_H\nFileContext *c = VAR_0->priv_data;",
"closedir(c->dir);",
"return 0;",
"#else\nreturn AVERROR(ENOSYS);",
"#endif\n}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
13,
15
],
[
17,
19
]
] |
10,176 | static int sdp_read_header(AVFormatContext *s,
AVFormatParameters *ap)
{
RTSPState *rt = s->priv_data;
RTSPStream *rtsp_st;
int size, i, err;
char *content;
char url[1024];
/* read the whole sdp file */
/* XXX: better loading */
content = av_malloc(... | false | FFmpeg | c89658008705d949c319df3fa6f400c481ad73e1 | static int sdp_read_header(AVFormatContext *s,
AVFormatParameters *ap)
{
RTSPState *rt = s->priv_data;
RTSPStream *rtsp_st;
int size, i, err;
char *content;
char url[1024];
content = av_malloc(SDP_MAX_SIZE);
size = get_buffer(s->pb, content, ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0,
AVFormatParameters *VAR_1)
{
RTSPState *rt = VAR_0->priv_data;
RTSPStream *rtsp_st;
int VAR_2, VAR_3, VAR_4;
char *VAR_5;
char VAR_6[1024];
VAR_5 = av_malloc(SDP_MAX_SIZE);
VAR_2 = get_buffer(VAR_0->p... | [
"static int FUNC_0(AVFormatContext *VAR_0,\nAVFormatParameters *VAR_1)\n{",
"RTSPState *rt = VAR_0->priv_data;",
"RTSPStream *rtsp_st;",
"int VAR_2, VAR_3, VAR_4;",
"char *VAR_5;",
"char VAR_6[1024];",
"VAR_5 = av_malloc(SDP_MAX_SIZE);",
"VAR_2 = get_buffer(VAR_0->pb, VAR_5, SDP_MAX_SIZE - 1);",
"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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
47
],
[
49
],
[
53,
55,
57,
59,... |
10,177 | static void ff_h264_idct_add16intra_mmx2(uint8_t *dst, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]){
int i;
for(i=0; i<16; i++){
if(nnzc[ scan8[i] ]) ff_h264_idct_add_mmx (dst + block_offset[i], block + i*16, stride);
else if(block[i*16]) ff_h264_idct_dc_a... | false | FFmpeg | 1d16a1cf99488f16492b1bb48e023f4da8377e07 | static void ff_h264_idct_add16intra_mmx2(uint8_t *dst, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]){
int i;
for(i=0; i<16; i++){
if(nnzc[ scan8[i] ]) ff_h264_idct_add_mmx (dst + block_offset[i], block + i*16, stride);
else if(block[i*16]) ff_h264_idct_dc_a... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t *VAR_0, const int *VAR_1, DCTELEM *VAR_2, int VAR_3, const uint8_t VAR_4[6*8]){
int VAR_5;
for(VAR_5=0; VAR_5<16; VAR_5++){
if(VAR_4[ scan8[VAR_5] ]) ff_h264_idct_add_mmx (VAR_0 + VAR_1[VAR_5], VAR_2 + VAR_5*16, VAR_3);
else if(VAR_2[VAR_5*16]) ff_h264_idct_dc_a... | [
"static void FUNC_0(uint8_t *VAR_0, const int *VAR_1, DCTELEM *VAR_2, int VAR_3, const uint8_t VAR_4[6*8]){",
"int VAR_5;",
"for(VAR_5=0; VAR_5<16; VAR_5++){",
"if(VAR_4[ scan8[VAR_5] ]) ff_h264_idct_add_mmx (VAR_0 + VAR_1[VAR_5], VAR_2 + VAR_5*16, VAR_3);",
"else if(VAR_2[VAR_5*16]) ff_h264_idct_dc_add_... | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
10,178 | static void floor_encode(vorbis_enc_context *venc, vorbis_enc_floor *fc,
PutBitContext *pb, uint16_t *posts,
float *floor, int samples)
{
int range = 255 / fc->multiplier + 1;
int coded[MAX_FLOOR_VALUES]; // first 2 values are unused
int i, counter;
... | true | FFmpeg | 1ba08c94f5bb4d1c3c2d3651b5e01edb4ce172e2 | static void floor_encode(vorbis_enc_context *venc, vorbis_enc_floor *fc,
PutBitContext *pb, uint16_t *posts,
float *floor, int samples)
{
int range = 255 / fc->multiplier + 1;
int coded[MAX_FLOOR_VALUES];
int i, counter;
put_bits(pb, 1, 1);
... | {
"code": [
"static void floor_encode(vorbis_enc_context *venc, vorbis_enc_floor *fc,",
" PutBitContext *pb, uint16_t *posts,",
" float *floor, int samples)",
" put_codeword(pb, book, cval);",
" put_codeword(pb, &venc->codebooks... | static void FUNC_0(vorbis_enc_context *VAR_0, vorbis_enc_floor *VAR_1,
PutBitContext *VAR_2, uint16_t *VAR_3,
float *VAR_4, int VAR_5)
{
int VAR_6 = 255 / VAR_1->multiplier + 1;
int VAR_7[MAX_FLOOR_VALUES];
int VAR_8, VAR_9;
put_bits(VAR_2, 1, ... | [
"static void FUNC_0(vorbis_enc_context *VAR_0, vorbis_enc_floor *VAR_1,\nPutBitContext *VAR_2, uint16_t *VAR_3,\nfloat *VAR_4, int VAR_5)\n{",
"int VAR_6 = 255 / VAR_1->multiplier + 1;",
"int VAR_7[MAX_FLOOR_VALUES];",
"int VAR_8, VAR_9;",
"put_bits(VAR_2, 1, 1);",
"put_bits(VAR_2, ilog(VAR_6 - 1), VAR_3[... | [
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,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29,
31,
33,
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
10,179 | void qtest_quit(QTestState *s)
{
int status;
pid_t pid = qtest_qemu_pid(s);
if (pid != -1) {
kill(pid, SIGTERM);
waitpid(pid, &status, 0);
}
unlink(s->pid_file);
unlink(s->socket_path);
unlink(s->qmp_socket_path);
g_free(s->pid_file);
g_free(s->sock... | true | qemu | fdd26fca3ce66863e547560fbde1a444fc5d71b7 | void qtest_quit(QTestState *s)
{
int status;
pid_t pid = qtest_qemu_pid(s);
if (pid != -1) {
kill(pid, SIGTERM);
waitpid(pid, &status, 0);
}
unlink(s->pid_file);
unlink(s->socket_path);
unlink(s->qmp_socket_path);
g_free(s->pid_file);
g_free(s->sock... | {
"code": [],
"line_no": []
} | void FUNC_0(QTestState *VAR_0)
{
int VAR_1;
pid_t pid = qtest_qemu_pid(VAR_0);
if (pid != -1) {
kill(pid, SIGTERM);
waitpid(pid, &VAR_1, 0);
}
unlink(VAR_0->pid_file);
unlink(VAR_0->socket_path);
unlink(VAR_0->qmp_socket_path);
g_free(VAR_0->pid_file);
... | [
"void FUNC_0(QTestState *VAR_0)\n{",
"int VAR_1;",
"pid_t pid = qtest_qemu_pid(VAR_0);",
"if (pid != -1) {",
"kill(pid, SIGTERM);",
"waitpid(pid, &VAR_1, 0);",
"}",
"unlink(VAR_0->pid_file);",
"unlink(VAR_0->socket_path);",
"unlink(VAR_0->qmp_socket_path);",
"g_free(VAR_0->pid_file);",
"g_free... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
24
],
[
26
],
[
28
],
[
30
],
[
32
],
[
34
],
[
37
]
] |
10,181 | static void guess_mv(MpegEncContext *s){
uint8_t fixed[s->mb_stride * s->mb_height];
#define MV_FROZEN 3
#define MV_CHANGED 2
#define MV_UNCHANGED 1
const int mb_stride = s->mb_stride;
const int mb_width = s->mb_width;
const int mb_height= s->mb_height;
int i, depth, num_avail;
int... | true | FFmpeg | 20153fb8f6ce7f482298170d2700befe898fa1cd | static void guess_mv(MpegEncContext *s){
uint8_t fixed[s->mb_stride * s->mb_height];
#define MV_FROZEN 3
#define MV_CHANGED 2
#define MV_UNCHANGED 1
const int mb_stride = s->mb_stride;
const int mb_width = s->mb_width;
const int mb_height= s->mb_height;
int i, depth, num_avail;
int... | {
"code": [],
"line_no": []
} | static void FUNC_0(MpegEncContext *VAR_0){
uint8_t fixed[VAR_0->VAR_1 * VAR_0->VAR_3];
#define MV_FROZEN 3
#define MV_CHANGED 2
#define MV_UNCHANGED 1
const int VAR_1 = VAR_0->VAR_1;
const int VAR_2 = VAR_0->VAR_2;
const int VAR_3= VAR_0->VAR_3;
int VAR_4, VAR_5, VAR_6;
int VAR_14,... | [
"static void FUNC_0(MpegEncContext *VAR_0){",
"uint8_t fixed[VAR_0->VAR_1 * VAR_0->VAR_3];",
"#define MV_FROZEN 3\n#define MV_CHANGED 2\n#define MV_UNCHANGED 1\nconst int VAR_1 = VAR_0->VAR_1;",
"const int VAR_2 = VAR_0->VAR_2;",
"const int VAR_3= VAR_0->VAR_3;",
"int VAR_4, VAR_5, VAR_6;",
"int VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1
],
[
3
],
[
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47,
49
],
[
51
],
[... |
10,182 | void qemu_bh_delete(QEMUBH *bh)
{
qemu_bh_cancel(bh);
qemu_free(bh);
}
| true | qemu | 1b435b10324fe9937f254bb00718f78d5e50837a | void qemu_bh_delete(QEMUBH *bh)
{
qemu_bh_cancel(bh);
qemu_free(bh);
}
| {
"code": [
" qemu_bh_cancel(bh);",
" qemu_free(bh);"
],
"line_no": [
5,
7
]
} | void FUNC_0(QEMUBH *VAR_0)
{
qemu_bh_cancel(VAR_0);
qemu_free(VAR_0);
}
| [
"void FUNC_0(QEMUBH *VAR_0)\n{",
"qemu_bh_cancel(VAR_0);",
"qemu_free(VAR_0);",
"}"
] | [
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
10,183 | static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
{
ALSSpecificConfig *sconf = &ctx->sconf;
AVCodecContext *avctx = ctx->avctx;
GetBitContext *gb = &ctx->gb;
unsigned int k;
unsigned int s[8];
unsigned int sx[8];
unsigned int sub_blocks, log2_sub_blocks, ... | true | FFmpeg | 6c3d6a214c6a5b0a7e9c4aa1990d1c5b290806d5 | static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
{
ALSSpecificConfig *sconf = &ctx->sconf;
AVCodecContext *avctx = ctx->avctx;
GetBitContext *gb = &ctx->gb;
unsigned int k;
unsigned int s[8];
unsigned int sx[8];
unsigned int sub_blocks, log2_sub_blocks, ... | {
"code": [],
"line_no": []
} | static int FUNC_0(ALSDecContext *VAR_0, ALSBlockData *VAR_1)
{
ALSSpecificConfig *sconf = &VAR_0->sconf;
AVCodecContext *avctx = VAR_0->avctx;
GetBitContext *gb = &VAR_0->gb;
unsigned int VAR_2;
unsigned int VAR_3[8];
unsigned int VAR_4[8];
unsigned int VAR_5, VAR_6, VAR_7;... | [
"static int FUNC_0(ALSDecContext *VAR_0, ALSBlockData *VAR_1)\n{",
"ALSSpecificConfig *sconf = &VAR_0->sconf;",
"AVCodecContext *avctx = VAR_0->avctx;",
"GetBitContext *gb = &VAR_0->gb;",
"unsigned int VAR_2;",
"unsigned int VAR_3[8];",
"unsigned int VAR_4[8];",
"unsigned int VAR_5, VAR_6, 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
],
[
27
],
[
35
],
[
39
],
[
41
],
[
45
],
[
51
],
[
53
],
[
55
... |
10,184 | void select_soundhw(const char *optarg)
{
}
| false | qemu | ffa48cf5ab719e1e181e51b87bc0f5d397b791fa | void select_soundhw(const char *optarg)
{
}
| {
"code": [],
"line_no": []
} | void FUNC_0(const char *VAR_0)
{
}
| [
"void FUNC_0(const char *VAR_0)\n{",
"}"
] | [
0,
0
] | [
[
1,
3
],
[
5
]
] |
10,185 | static void cpu_exec_nocache(CPUState *cpu, int max_cycles,
TranslationBlock *orig_tb)
{
TranslationBlock *tb;
/* Should never happen.
We only end up here when an existing TB is too long. */
if (max_cycles > CF_COUNT_MASK)
max_cycles = CF_COUNT_MASK;
... | false | qemu | 56c0269a9ec105d3848d9f900b5e38e6b35e2478 | static void cpu_exec_nocache(CPUState *cpu, int max_cycles,
TranslationBlock *orig_tb)
{
TranslationBlock *tb;
if (max_cycles > CF_COUNT_MASK)
max_cycles = CF_COUNT_MASK;
tb = tb_gen_code(cpu, orig_tb->pc, orig_tb->cs_base, orig_tb->flags,
... | {
"code": [],
"line_no": []
} | static void FUNC_0(CPUState *VAR_0, int VAR_1,
TranslationBlock *VAR_2)
{
TranslationBlock *tb;
if (VAR_1 > CF_COUNT_MASK)
VAR_1 = CF_COUNT_MASK;
tb = tb_gen_code(VAR_0, VAR_2->pc, VAR_2->cs_base, VAR_2->flags,
VAR_1 | CF_NOCACHE);... | [
"static void FUNC_0(CPUState *VAR_0, int VAR_1,\nTranslationBlock *VAR_2)\n{",
"TranslationBlock *tb;",
"if (VAR_1 > CF_COUNT_MASK)\nVAR_1 = CF_COUNT_MASK;",
"tb = tb_gen_code(VAR_0, VAR_2->pc, VAR_2->cs_base, VAR_2->flags,\nVAR_1 | CF_NOCACHE);",
"tb->VAR_2 = tcg_ctx.tb_ctx.tb_invalidated_flag ? NULL : VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
15,
17
],
[
21,
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
10,186 | static int xhci_submit(XHCIState *xhci, XHCITransfer *xfer, XHCIEPContext *epctx)
{
uint64_t mfindex;
DPRINTF("xhci_submit(slotid=%d,epid=%d)\n", xfer->slotid, xfer->epid);
xfer->in_xfer = epctx->type>>2;
switch(epctx->type) {
case ET_INTR_OUT:
case ET_INTR_IN:
xfer->pkts =... | false | qemu | ddb603ab6c981c1d67cb42266fc700c33e5b2d8f | static int xhci_submit(XHCIState *xhci, XHCITransfer *xfer, XHCIEPContext *epctx)
{
uint64_t mfindex;
DPRINTF("xhci_submit(slotid=%d,epid=%d)\n", xfer->slotid, xfer->epid);
xfer->in_xfer = epctx->type>>2;
switch(epctx->type) {
case ET_INTR_OUT:
case ET_INTR_IN:
xfer->pkts =... | {
"code": [],
"line_no": []
} | static int FUNC_0(XHCIState *VAR_0, XHCITransfer *VAR_1, XHCIEPContext *VAR_2)
{
uint64_t mfindex;
DPRINTF("FUNC_0(slotid=%d,epid=%d)\n", VAR_1->slotid, VAR_1->epid);
VAR_1->in_xfer = VAR_2->type>>2;
switch(VAR_2->type) {
case ET_INTR_OUT:
case ET_INTR_IN:
VAR_1->pkts = 0;
... | [
"static int FUNC_0(XHCIState *VAR_0, XHCITransfer *VAR_1, XHCIEPContext *VAR_2)\n{",
"uint64_t mfindex;",
"DPRINTF(\"FUNC_0(slotid=%d,epid=%d)\\n\", VAR_1->slotid, VAR_1->epid);",
"VAR_1->in_xfer = VAR_2->type>>2;",
"switch(VAR_2->type) {",
"case ET_INTR_OUT:\ncase ET_INTR_IN:\nVAR_1->pkts = 0;",
"VAR_1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
17
],
[
19,
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45,
47
],
[
49
],
[
51... |
10,188 | static void nvram_writel (void *opaque, target_phys_addr_t addr, uint32_t value)
{
M48t59State *NVRAM = opaque;
m48t59_write(NVRAM, addr, (value >> 24) & 0xff);
m48t59_write(NVRAM, addr + 1, (value >> 16) & 0xff);
m48t59_write(NVRAM, addr + 2, (value >> 8) & 0xff);
m48t59_write(NVRAM, addr +... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void nvram_writel (void *opaque, target_phys_addr_t addr, uint32_t value)
{
M48t59State *NVRAM = opaque;
m48t59_write(NVRAM, addr, (value >> 24) & 0xff);
m48t59_write(NVRAM, addr + 1, (value >> 16) & 0xff);
m48t59_write(NVRAM, addr + 2, (value >> 8) & 0xff);
m48t59_write(NVRAM, addr +... | {
"code": [],
"line_no": []
} | static void FUNC_0 (void *VAR_0, target_phys_addr_t VAR_1, uint32_t VAR_2)
{
M48t59State *NVRAM = VAR_0;
m48t59_write(NVRAM, VAR_1, (VAR_2 >> 24) & 0xff);
m48t59_write(NVRAM, VAR_1 + 1, (VAR_2 >> 16) & 0xff);
m48t59_write(NVRAM, VAR_1 + 2, (VAR_2 >> 8) & 0xff);
m48t59_write(NVRAM, VAR_1 + 3,... | [
"static void FUNC_0 (void *VAR_0, target_phys_addr_t VAR_1, uint32_t VAR_2)\n{",
"M48t59State *NVRAM = VAR_0;",
"m48t59_write(NVRAM, VAR_1, (VAR_2 >> 24) & 0xff);",
"m48t59_write(NVRAM, VAR_1 + 1, (VAR_2 >> 16) & 0xff);",
"m48t59_write(NVRAM, VAR_1 + 2, (VAR_2 >> 8) & 0xff);",
"m48t59_write(NVRAM, VAR_1 +... | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
10,189 | static QIOChannelSocket *nbd_establish_connection(SocketAddress *saddr,
Error **errp)
{
QIOChannelSocket *sioc;
Error *local_err = NULL;
sioc = qio_channel_socket_new();
qio_channel_set_name(QIO_CHANNEL(sioc), "nbd-client");
qio_channel_so... | false | qemu | 9445673ea67c272616b9f718396e267caa6446b7 | static QIOChannelSocket *nbd_establish_connection(SocketAddress *saddr,
Error **errp)
{
QIOChannelSocket *sioc;
Error *local_err = NULL;
sioc = qio_channel_socket_new();
qio_channel_set_name(QIO_CHANNEL(sioc), "nbd-client");
qio_channel_so... | {
"code": [],
"line_no": []
} | static QIOChannelSocket *FUNC_0(SocketAddress *saddr,
Error **errp)
{
QIOChannelSocket *sioc;
Error *local_err = NULL;
sioc = qio_channel_socket_new();
qio_channel_set_name(QIO_CHANNEL(sioc), "nbd-client");
qio_channel_socket_connect_sync(... | [
"static QIOChannelSocket *FUNC_0(SocketAddress *saddr,\nError **errp)\n{",
"QIOChannelSocket *sioc;",
"Error *local_err = NULL;",
"sioc = qio_channel_socket_new();",
"qio_channel_set_name(QIO_CHANNEL(sioc), \"nbd-client\");",
"qio_channel_socket_connect_sync(sioc,\nsaddr,\n&local_err);",
"if (local_err)... | [
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
],
[
35
],
[
39
],
[
41
]
] |
10,191 | static int write_abst(AVFormatContext *s, OutputStream *os, int final)
{
HDSContext *c = s->priv_data;
AVIOContext *out;
char filename[1024], temp_filename[1024];
int i, ret;
int64_t asrt_pos, afrt_pos;
int start = 0, fragments;
int index = s->streams[os->first_stream]->id;
int6... | false | FFmpeg | 9f61abc8111c7c43f49ca012e957a108b9cc7610 | static int write_abst(AVFormatContext *s, OutputStream *os, int final)
{
HDSContext *c = s->priv_data;
AVIOContext *out;
char filename[1024], temp_filename[1024];
int i, ret;
int64_t asrt_pos, afrt_pos;
int start = 0, fragments;
int index = s->streams[os->first_stream]->id;
int6... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, OutputStream *VAR_1, int VAR_2)
{
HDSContext *c = VAR_0->priv_data;
AVIOContext *out;
char VAR_3[1024], VAR_4[1024];
int VAR_5, VAR_6;
int64_t asrt_pos, afrt_pos;
int VAR_7 = 0, VAR_8;
int VAR_9 = VAR_0->streams[VAR_1->first_stream]->id;
... | [
"static int FUNC_0(AVFormatContext *VAR_0, OutputStream *VAR_1, int VAR_2)\n{",
"HDSContext *c = VAR_0->priv_data;",
"AVIOContext *out;",
"char VAR_3[1024], VAR_4[1024];",
"int VAR_5, VAR_6;",
"int64_t asrt_pos, afrt_pos;",
"int VAR_7 = 0, VAR_8;",
"int VAR_9 = VAR_0->streams[VAR_1->first_stream]->id;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27,
29
],
[
31,
33
],
[
37,
39
],
[
41,
43
],
[
45,
47
],
[
49
... |
10,195 | static int mptsas_process_scsi_io_request(MPTSASState *s,
MPIMsgSCSIIORequest *scsi_io,
hwaddr addr)
{
MPTSASRequest *req;
MPIMsgSCSIIOReply reply;
SCSIDevice *sdev;
int status;
mptsas_fix_scsi_io_endiannes... | false | qemu | 670e56d3ed2918b3861d9216f2c0540d9e9ae0d5 | static int mptsas_process_scsi_io_request(MPTSASState *s,
MPIMsgSCSIIORequest *scsi_io,
hwaddr addr)
{
MPTSASRequest *req;
MPIMsgSCSIIOReply reply;
SCSIDevice *sdev;
int status;
mptsas_fix_scsi_io_endiannes... | {
"code": [],
"line_no": []
} | static int FUNC_0(MPTSASState *VAR_0,
MPIMsgSCSIIORequest *VAR_1,
hwaddr VAR_2)
{
MPTSASRequest *req;
MPIMsgSCSIIOReply reply;
SCSIDevice *sdev;
int VAR_3;
mptsas_fix_scsi_io_endianness(VAR_1);
trace... | [
"static int FUNC_0(MPTSASState *VAR_0,\nMPIMsgSCSIIORequest *VAR_1,\nhwaddr VAR_2)\n{",
"MPTSASRequest *req;",
"MPIMsgSCSIIOReply reply;",
"SCSIDevice *sdev;",
"int VAR_3;",
"mptsas_fix_scsi_io_endianness(VAR_1);",
"trace_mptsas_process_scsi_io_request(VAR_0, VAR_1->Bus, VAR_1->TargetID,\nVAR_1->LUN[1],... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23,
25
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
... |
10,196 | bool s390_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
{
if (interrupt_request & CPU_INTERRUPT_HARD) {
S390CPU *cpu = S390_CPU(cs);
CPUS390XState *env = &cpu->env;
if (env->ex_value) {
/* Execution of the target insn is indivisible from
the pare... | false | qemu | 8417f904bad50021b432dfea12613345d9fb1f68 | bool s390_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
{
if (interrupt_request & CPU_INTERRUPT_HARD) {
S390CPU *cpu = S390_CPU(cs);
CPUS390XState *env = &cpu->env;
if (env->ex_value) {
return false;
}
if (env->psw.mask & PSW_MA... | {
"code": [],
"line_no": []
} | bool FUNC_0(CPUState *cs, int interrupt_request)
{
if (interrupt_request & CPU_INTERRUPT_HARD) {
S390CPU *cpu = S390_CPU(cs);
CPUS390XState *env = &cpu->env;
if (env->ex_value) {
return false;
}
if (env->psw.mask & PSW_MASK_EXT) {
... | [
"bool FUNC_0(CPUState *cs, int interrupt_request)\n{",
"if (interrupt_request & CPU_INTERRUPT_HARD) {",
"S390CPU *cpu = S390_CPU(cs);",
"CPUS390XState *env = &cpu->env;",
"if (env->ex_value) {",
"return false;",
"}",
"if (env->psw.mask & PSW_MASK_EXT) {",
"s390_cpu_do_interrupt(cs);",
"return true... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
10,197 | ioapic_mem_read(void *opaque, target_phys_addr_t addr, unsigned int size)
{
IOAPICCommonState *s = opaque;
int index;
uint32_t val = 0;
switch (addr & 0xff) {
case IOAPIC_IOREGSEL:
val = s->ioregsel;
break;
case IOAPIC_IOWIN:
if (size != 4) {
brea... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | ioapic_mem_read(void *opaque, target_phys_addr_t addr, unsigned int size)
{
IOAPICCommonState *s = opaque;
int index;
uint32_t val = 0;
switch (addr & 0xff) {
case IOAPIC_IOREGSEL:
val = s->ioregsel;
break;
case IOAPIC_IOWIN:
if (size != 4) {
brea... | {
"code": [],
"line_no": []
} | FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, unsigned int VAR_2)
{
IOAPICCommonState *s = VAR_0;
int VAR_3;
uint32_t val = 0;
switch (VAR_1 & 0xff) {
case IOAPIC_IOREGSEL:
val = s->ioregsel;
break;
case IOAPIC_IOWIN:
if (VAR_2 != 4) {
break;
... | [
"FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, unsigned int VAR_2)\n{",
"IOAPICCommonState *s = VAR_0;",
"int VAR_3;",
"uint32_t val = 0;",
"switch (VAR_1 & 0xff) {",
"case IOAPIC_IOREGSEL:\nval = s->ioregsel;",
"break;",
"case IOAPIC_IOWIN:\nif (VAR_2 != 4) {",
"break;",
"}",
"switch (s->ioregs... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37,
39,
41
],
[
43
],
[
45,
47
],
[
49
... |
10,198 | static void piix4_pm_machine_ready(Notifier *n, void *opaque)
{
PIIX4PMState *s = container_of(n, PIIX4PMState, machine_ready);
PCIDevice *d = PCI_DEVICE(s);
MemoryRegion *io_as = pci_address_space_io(d);
uint8_t *pci_conf;
pci_conf = d->config;
pci_conf[0x5f] = 0x10 |
(memory_... | false | qemu | fd56e0612b6454a282fa6a953fdb09281a98c589 | static void piix4_pm_machine_ready(Notifier *n, void *opaque)
{
PIIX4PMState *s = container_of(n, PIIX4PMState, machine_ready);
PCIDevice *d = PCI_DEVICE(s);
MemoryRegion *io_as = pci_address_space_io(d);
uint8_t *pci_conf;
pci_conf = d->config;
pci_conf[0x5f] = 0x10 |
(memory_... | {
"code": [],
"line_no": []
} | static void FUNC_0(Notifier *VAR_0, void *VAR_1)
{
PIIX4PMState *s = container_of(VAR_0, PIIX4PMState, machine_ready);
PCIDevice *d = PCI_DEVICE(s);
MemoryRegion *io_as = pci_address_space_io(d);
uint8_t *pci_conf;
pci_conf = d->config;
pci_conf[0x5f] = 0x10 |
(memory_region_pr... | [
"static void FUNC_0(Notifier *VAR_0, void *VAR_1)\n{",
"PIIX4PMState *s = container_of(VAR_0, PIIX4PMState, machine_ready);",
"PCIDevice *d = PCI_DEVICE(s);",
"MemoryRegion *io_as = pci_address_space_io(d);",
"uint8_t *pci_conf;",
"pci_conf = d->config;",
"pci_conf[0x5f] = 0x10 |\n(memory_region_present... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
10,199 | static void vnc_dpy_resize(DisplayState *ds)
{
int size_changed;
VncDisplay *vd = ds->opaque;
VncState *vs;
/* server surface */
if (!vd->server)
vd->server = qemu_mallocz(sizeof(*vd->server));
if (vd->server->data)
qemu_free(vd->server->data);
*(vd->server) = *(d... | false | qemu | 1d4b638ad1fc273a19d93c7d4725fecdd7e5182a | static void vnc_dpy_resize(DisplayState *ds)
{
int size_changed;
VncDisplay *vd = ds->opaque;
VncState *vs;
if (!vd->server)
vd->server = qemu_mallocz(sizeof(*vd->server));
if (vd->server->data)
qemu_free(vd->server->data);
*(vd->server) = *(ds->surface);
vd... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisplayState *VAR_0)
{
int VAR_1;
VncDisplay *vd = VAR_0->opaque;
VncState *vs;
if (!vd->server)
vd->server = qemu_mallocz(sizeof(*vd->server));
if (vd->server->data)
qemu_free(vd->server->data);
*(vd->server) = *(VAR_0->surface);
vd->serv... | [
"static void FUNC_0(DisplayState *VAR_0)\n{",
"int VAR_1;",
"VncDisplay *vd = VAR_0->opaque;",
"VncState *vs;",
"if (!vd->server)\nvd->server = qemu_mallocz(sizeof(*vd->server));",
"if (vd->server->data)\nqemu_free(vd->server->data);",
"*(vd->server) = *(VAR_0->surface);",
"vd->server->data = qemu_mal... | [
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
],
[
25,
27
],
[
33,
35
],
[
37,
39
],
[
41,
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
],
[
57
... |
10,200 | bool hpet_find(void)
{
return object_resolve_path_type("", TYPE_HPET, NULL);
}
| false | qemu | 142e0950cfaf023a81112dc3cdfa799d769886a4 | bool hpet_find(void)
{
return object_resolve_path_type("", TYPE_HPET, NULL);
}
| {
"code": [],
"line_no": []
} | bool FUNC_0(void)
{
return object_resolve_path_type("", TYPE_HPET, NULL);
}
| [
"bool FUNC_0(void)\n{",
"return object_resolve_path_type(\"\", TYPE_HPET, NULL);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
10,201 | static void gen_load_exclusive(DisasContext *s, int rt, int rt2,
TCGv_i32 addr, int size)
{
TCGv_i32 tmp = tcg_temp_new_i32();
s->is_ldex = true;
switch (size) {
case 0:
gen_aa32_ld8u(tmp, addr, get_mem_index(s));
break;
case 1:
ge... | false | qemu | 30901475b91ef1f46304404ab4bfe89097f61b96 | static void gen_load_exclusive(DisasContext *s, int rt, int rt2,
TCGv_i32 addr, int size)
{
TCGv_i32 tmp = tcg_temp_new_i32();
s->is_ldex = true;
switch (size) {
case 0:
gen_aa32_ld8u(tmp, addr, get_mem_index(s));
break;
case 1:
ge... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0, int VAR_1, int VAR_2,
TCGv_i32 VAR_3, int VAR_4)
{
TCGv_i32 tmp = tcg_temp_new_i32();
VAR_0->is_ldex = true;
switch (VAR_4) {
case 0:
gen_aa32_ld8u(tmp, VAR_3, get_mem_index(VAR_0));
break;
case 1:
... | [
"static void FUNC_0(DisasContext *VAR_0, int VAR_1, int VAR_2,\nTCGv_i32 VAR_3, int VAR_4)\n{",
"TCGv_i32 tmp = tcg_temp_new_i32();",
"VAR_0->is_ldex = true;",
"switch (VAR_4) {",
"case 0:\ngen_aa32_ld8u(tmp, VAR_3, get_mem_index(VAR_0));",
"break;",
"case 1:\ngen_aa32_ld16u(tmp, VAR_3, get_mem_index(VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31,
33
],
[
35
],
[
37,
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55... |
10,202 | static inline void RENAME(bgr24ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused)
{
#if COMPILE_TEMPLATE_MMX
RENAME(bgr24ToUV_mmx)(dstU, dstV, src1, width, PIX_FMT_BGR24);
#else
int i;
for (i=0; i<width; i++) {
int b= src1[3*i + 0];
... | false | FFmpeg | d1adad3cca407f493c3637e20ecd4f7124e69212 | static inline void RENAME(bgr24ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused)
{
#if COMPILE_TEMPLATE_MMX
RENAME(bgr24ToUV_mmx)(dstU, dstV, src1, width, PIX_FMT_BGR24);
#else
int i;
for (i=0; i<width; i++) {
int b= src1[3*i + 0];
... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(bgr24ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused)
{
#if COMPILE_TEMPLATE_MMX
FUNC_0(bgr24ToUV_mmx)(dstU, dstV, src1, width, PIX_FMT_BGR24);
#else
int VAR_0;
for (VAR_0=0; VAR_0<width; VAR_0++) {
int b= sr... | [
"static inline void FUNC_0(bgr24ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused)\n{",
"#if COMPILE_TEMPLATE_MMX\nFUNC_0(bgr24ToUV_mmx)(dstU, dstV, src1, width, PIX_FMT_BGR24);",
"#else\nint VAR_0;",
"for (VAR_0=0; VAR_0<width; VAR_0++) {",
"int b= s... | [
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
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.