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 |
|---|---|---|---|---|---|---|---|---|---|---|
2,440 | static void handle_port_status_write(EHCIState *s, int port, uint32_t val)
{
uint32_t *portsc = &s->portsc[port];
USBDevice *dev = s->ports[port].dev;
/* Clear rwc bits */
*portsc &= ~(val & PORTSC_RWC_MASK);
/* The guest may clear, but not set the PED bit */
*portsc &= val | ~PORTSC_PE... | true | qemu | 3e4f910c8d490a1490409a7e381dbbb229f9d272 | static void handle_port_status_write(EHCIState *s, int port, uint32_t val)
{
uint32_t *portsc = &s->portsc[port];
USBDevice *dev = s->ports[port].dev;
*portsc &= ~(val & PORTSC_RWC_MASK);
*portsc &= val | ~PORTSC_PED;
handle_port_owner_write(s, port, val);
val &=... | {
"code": [
"static void handle_port_status_write(EHCIState *s, int port, uint32_t val)"
],
"line_no": [
1
]
} | static void FUNC_0(EHCIState *VAR_0, int VAR_1, uint32_t VAR_2)
{
uint32_t *portsc = &VAR_0->portsc[VAR_1];
USBDevice *dev = VAR_0->ports[VAR_1].dev;
*portsc &= ~(VAR_2 & PORTSC_RWC_MASK);
*portsc &= VAR_2 | ~PORTSC_PED;
handle_port_owner_write(VAR_0, VAR_1, VAR_2);
... | [
"static void FUNC_0(EHCIState *VAR_0, int VAR_1, uint32_t VAR_2)\n{",
"uint32_t *portsc = &VAR_0->portsc[VAR_1];",
"USBDevice *dev = VAR_0->ports[VAR_1].dev;",
"*portsc &= ~(VAR_2 & PORTSC_RWC_MASK);",
"*portsc &= VAR_2 | ~PORTSC_PED;",
"handle_port_owner_write(VAR_0, VAR_1, VAR_2);",
"VAR_2 &= PORTSC_R... | [
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
],
[
13
],
[
17
],
[
21
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
59
],
[
61
],
[
63
],
[
65... |
2,441 | static void vp6_build_huff_tree(VP56Context *s, uint8_t coeff_model[],
const uint8_t *map, unsigned size, VLC *vlc)
{
Node nodes[2*size], *tmp = &nodes[size];
int a, b, i;
/* first compute probabilities from model */
tmp[0].count = 256;
for (i=0; i<size-1; i+... | true | FFmpeg | 0a41faa9a77dc83d8d933e99f1ba902ecd146e79 | static void vp6_build_huff_tree(VP56Context *s, uint8_t coeff_model[],
const uint8_t *map, unsigned size, VLC *vlc)
{
Node nodes[2*size], *tmp = &nodes[size];
int a, b, i;
tmp[0].count = 256;
for (i=0; i<size-1; i++) {
a = tmp[i].count * coef... | {
"code": [],
"line_no": []
} | static void FUNC_0(VP56Context *VAR_0, uint8_t VAR_1[],
const uint8_t *VAR_2, unsigned VAR_3, VLC *VAR_4)
{
Node nodes[2*VAR_3], *tmp = &nodes[VAR_3];
int VAR_5, VAR_6, VAR_7;
tmp[0].count = 256;
for (VAR_7=0; VAR_7<VAR_3-1; VAR_7++) {
VAR_5 = tmp[V... | [
"static void FUNC_0(VP56Context *VAR_0, uint8_t VAR_1[],\nconst uint8_t *VAR_2, unsigned VAR_3, VLC *VAR_4)\n{",
"Node nodes[2*VAR_3], *tmp = &nodes[VAR_3];",
"int VAR_5, VAR_6, VAR_7;",
"tmp[0].count = 256;",
"for (VAR_7=0; VAR_7<VAR_3-1; VAR_7++) {",
"VAR_5 = tmp[VAR_7].count * VAR_1[VAR_7] >> 8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
34,
36
],
[
38
]
] |
2,442 | static void vga_putcharxy(DisplayState *ds, int x, int y, int ch,
TextAttributes *t_attrib)
{
uint8_t *d;
const uint8_t *font_ptr;
unsigned int font_data, linesize, xorcol, bpp;
int i;
unsigned int fgcol, bgcol;
#ifdef DEBUG_CONSOLE
printf("x: %2i y: %2i", x,... | true | qemu | 439229c7cb97f6c4cddd3965c3e9d2b8319fe83c | static void vga_putcharxy(DisplayState *ds, int x, int y, int ch,
TextAttributes *t_attrib)
{
uint8_t *d;
const uint8_t *font_ptr;
unsigned int font_data, linesize, xorcol, bpp;
int i;
unsigned int fgcol, bgcol;
#ifdef DEBUG_CONSOLE
printf("x: %2i y: %2i", x,... | {
"code": [
" font_data = 0xFFFF;",
" font_data = 0xFFFF;",
" font_data = 0xFFFF;"
],
"line_no": [
69,
69,
69
]
} | static void FUNC_0(DisplayState *VAR_0, int VAR_1, int VAR_2, int VAR_3,
TextAttributes *VAR_4)
{
uint8_t *d;
const uint8_t *VAR_5;
unsigned int VAR_6, VAR_7, VAR_8, VAR_9;
int VAR_10;
unsigned int VAR_11, VAR_12;
#ifdef DEBUG_CONSOLE
printf("VAR_1: %2i VAR_2... | [
"static void FUNC_0(DisplayState *VAR_0, int VAR_1, int VAR_2, int VAR_3,\nTextAttributes *VAR_4)\n{",
"uint8_t *d;",
"const uint8_t *VAR_5;",
"unsigned int VAR_6, VAR_7, VAR_8, VAR_9;",
"int VAR_10;",
"unsigned int VAR_11, VAR_12;",
"#ifdef DEBUG_CONSOLE\nprintf(\"VAR_1: %2i VAR_2: %2i\", VAR_1, 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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
23
],
[
25,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47,
49
],
[
51
... |
2,443 | static int iscsi_create(const char *filename, QemuOpts *opts, Error **errp)
{
int ret = 0;
int64_t total_size = 0;
BlockDriverState *bs;
IscsiLun *iscsilun = NULL;
QDict *bs_options;
bs = bdrv_new("", &error_abort);
/* Read out options */
total_size =
qemu_opt_get_s... | true | qemu | 5839e53bbc0fec56021d758aab7610df421ed8c8 | static int iscsi_create(const char *filename, QemuOpts *opts, Error **errp)
{
int ret = 0;
int64_t total_size = 0;
BlockDriverState *bs;
IscsiLun *iscsilun = NULL;
QDict *bs_options;
bs = bdrv_new("", &error_abort);
total_size =
qemu_opt_get_size_del(opts, BLOCK_OP... | {
"code": [
" bs->opaque = g_malloc0(sizeof(struct IscsiLun));"
],
"line_no": [
27
]
} | static int FUNC_0(const char *VAR_0, QemuOpts *VAR_1, Error **VAR_2)
{
int VAR_3 = 0;
int64_t total_size = 0;
BlockDriverState *bs;
IscsiLun *iscsilun = NULL;
QDict *bs_options;
bs = bdrv_new("", &error_abort);
total_size =
qemu_opt_get_size_del(VAR_1, BLOCK_OPT_SI... | [
"static int FUNC_0(const char *VAR_0, QemuOpts *VAR_1, Error **VAR_2)\n{",
"int VAR_3 = 0;",
"int64_t total_size = 0;",
"BlockDriverState *bs;",
"IscsiLun *iscsilun = NULL;",
"QDict *bs_options;",
"bs = bdrv_new(\"\", &error_abort);",
"total_size =\nqemu_opt_get_size_del(VAR_1, BLOCK_OPT_SIZE, 0) / BD... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
23,
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
2,444 | static int dvbsub_parse_clut_segment(AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
DVBSubContext *ctx = avctx->priv_data;
const uint8_t *buf_end = buf + buf_size;
int i, clut_id;
int version;
DVBSubCLUT *clut;
int entry_id, depth , f... | true | FFmpeg | ebe3a41ea3b93579379b0460338ff511f9749602 | static int dvbsub_parse_clut_segment(AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
DVBSubContext *ctx = avctx->priv_data;
const uint8_t *buf_end = buf + buf_size;
int i, clut_id;
int version;
DVBSubCLUT *clut;
int entry_id, depth , f... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
const uint8_t *VAR_1, int VAR_2)
{
DVBSubContext *ctx = VAR_0->priv_data;
const uint8_t *VAR_3 = VAR_1 + VAR_2;
int VAR_4, VAR_5;
int VAR_6;
DVBSubCLUT *clut;
int VAR_7, VAR_8 , VAR_9;
int VAR_10, VAR... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nconst uint8_t *VAR_1, int VAR_2)\n{",
"DVBSubContext *ctx = VAR_0->priv_data;",
"const uint8_t *VAR_3 = VAR_1 + VAR_2;",
"int VAR_4, VAR_5;",
"int VAR_6;",
"DVBSubCLUT *clut;",
"int VAR_7, VAR_8 , VAR_9;",
"int VAR_10, VAR_11, VAR_12, VAR_13;",
"int VAR_14,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
43,
45
],
[
49
],
[
51
],
[
53
],
... |
2,445 | static void scsi_write_request(SCSIDiskReq *r)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
uint32_t n;
/* No data transfer may already be in progress */
assert(r->req.aiocb == NULL);
n = r->iov.iov_len / 512;
if (n) {
qemu_iovec_init_external(&r->qiov, &r... | true | qemu | 5c6c0e513600ba57c3e73b7151d3c0664438f7b5 | static void scsi_write_request(SCSIDiskReq *r)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
uint32_t n;
assert(r->req.aiocb == NULL);
n = r->iov.iov_len / 512;
if (n) {
qemu_iovec_init_external(&r->qiov, &r->iov, 1);
r->req.aiocb = bdrv_aio_write... | {
"code": [
"static void scsi_write_request(SCSIDiskReq *r)"
],
"line_no": [
1
]
} | static void FUNC_0(SCSIDiskReq *VAR_0)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0->req.dev);
uint32_t n;
assert(VAR_0->req.aiocb == NULL);
n = VAR_0->iov.iov_len / 512;
if (n) {
qemu_iovec_init_external(&VAR_0->qiov, &VAR_0->iov, 1);
VAR_0->req.aiocb ... | [
"static void FUNC_0(SCSIDiskReq *VAR_0)\n{",
"SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0->req.dev);",
"uint32_t n;",
"assert(VAR_0->req.aiocb == NULL);",
"n = VAR_0->iov.iov_len / 512;",
"if (n) {",
"qemu_iovec_init_external(&VAR_0->qiov, &VAR_0->iov, 1);",
"VAR_0->req.aiocb = bdrv_aio_wr... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
]
] |
2,446 | static int dxa_read_packet(AVFormatContext *s, AVPacket *pkt)
{
DXAContext *c = s->priv_data;
int ret;
uint32_t size;
uint8_t buf[DXA_EXTRA_SIZE], pal[768+4];
int pal_size = 0;
if(!c->readvid && c->has_sound && c->bytes_left){
c->readvid = 1;
avio_seek(s->pb, c->wavpos... | true | FFmpeg | ae09db1023083cbc99009c9f16e83e159d0ea040 | static int dxa_read_packet(AVFormatContext *s, AVPacket *pkt)
{
DXAContext *c = s->priv_data;
int ret;
uint32_t size;
uint8_t buf[DXA_EXTRA_SIZE], pal[768+4];
int pal_size = 0;
if(!c->readvid && c->has_sound && c->bytes_left){
c->readvid = 1;
avio_seek(s->pb, c->wavpos... | {
"code": [
" avio_read(s->pb, buf, 4);",
" avio_read(s->pb, buf + 4, DXA_EXTRA_SIZE - 4);"
],
"line_no": [
45,
81
]
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
DXAContext *c = VAR_0->priv_data;
int VAR_2;
uint32_t size;
uint8_t buf[DXA_EXTRA_SIZE], pal[768+4];
int VAR_3 = 0;
if(!c->readvid && c->has_sound && c->bytes_left){
c->readvid = 1;
avio_seek(VAR_0->pb, c->wa... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"DXAContext *c = VAR_0->priv_data;",
"int VAR_2;",
"uint32_t size;",
"uint8_t buf[DXA_EXTRA_SIZE], pal[768+4];",
"int VAR_3 = 0;",
"if(!c->readvid && c->has_sound && c->bytes_left){",
"c->readvid = 1;",
"avio_seek(VAR_0->pb, c->wavpos,... | [
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,
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
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
2,447 | static int qemu_rdma_post_recv_control(RDMAContext *rdma, int idx)
{
struct ibv_recv_wr *bad_wr;
struct ibv_sge sge = {
.addr = (uint64_t)(rdma->wr_data[idx].control),
.length = RDMA_CONTROL_MAX_BUFFER,
.lkey = rdma->wr_da... | true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static int qemu_rdma_post_recv_control(RDMAContext *rdma, int idx)
{
struct ibv_recv_wr *bad_wr;
struct ibv_sge sge = {
.addr = (uint64_t)(rdma->wr_data[idx].control),
.length = RDMA_CONTROL_MAX_BUFFER,
.lkey = rdma->wr_da... | {
"code": [],
"line_no": []
} | static int FUNC_0(RDMAContext *VAR_0, int VAR_1)
{
struct ibv_recv_wr *VAR_2;
struct ibv_sge VAR_3 = {
.addr = (uint64_t)(VAR_0->wr_data[VAR_1].control),
.length = RDMA_CONTROL_MAX_BUFFER,
.lkey = VAR_0->wr_data[VAR_1].con... | [
"static int FUNC_0(RDMAContext *VAR_0, int VAR_1)\n{",
"struct ibv_recv_wr *VAR_2;",
"struct ibv_sge VAR_3 = {",
".addr = (uint64_t)(VAR_0->wr_data[VAR_1].control),\n.length = RDMA_CONTROL_MAX_BUFFER,\n.lkey = VAR_0->wr_data[VAR_1].control_mr->lkey,\n};",
"struct ibv_recv_wr VAR_4 = {",
".wr_id = RDMA_WRI... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11,
13,
15
],
[
19
],
[
21,
23,
25,
27
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
]
] |
2,448 | static void adx_encode(unsigned char *adx,const short *wav,PREV *prev)
{
int scale;
int i;
int s0,s1,s2,d;
int max=0;
int min=0;
int data[32];
s1 = prev->s1;
s2 = prev->s2;
for(i=0;i<32;i++) {
s0 = wav[i];
d = ((s0<<14) - SCALE1*s1 + SCALE2*s2)/BASEVOL;
data[i]=d;
if (max<d) max=d;
i... | true | FFmpeg | f19af812a32c1398d48c3550d11dbc6aafbb2bfc | static void adx_encode(unsigned char *adx,const short *wav,PREV *prev)
{
int scale;
int i;
int s0,s1,s2,d;
int max=0;
int min=0;
int data[32];
s1 = prev->s1;
s2 = prev->s2;
for(i=0;i<32;i++) {
s0 = wav[i];
d = ((s0<<14) - SCALE1*s1 + SCALE2*s2)/BASEVOL;
data[i]=d;
if (max<d) max=d;
i... | {
"code": [
"\tint scale;",
"\tint i;",
"\tint s0,s1,s2,d;",
"\tint max=0;",
"\tint min=0;",
"\tint data[32];",
"\ts1 = prev->s1;",
"\ts2 = prev->s2;",
"\tfor(i=0;i<32;i++) {",
"\t\ts0 = wav[i];",
"\t\td = ((s0<<14) - SCALE1*s1 + SCALE2*s2)/BASEVOL;",
"\t\tdata[i]=d;",
... | static void FUNC_0(unsigned char *VAR_0,const short *VAR_1,PREV *VAR_2)
{
int VAR_3;
int VAR_4;
int VAR_5,VAR_6,VAR_7,VAR_8;
int VAR_9=0;
int VAR_10=0;
int VAR_11[32];
VAR_6 = VAR_2->VAR_6;
VAR_7 = VAR_2->VAR_7;
for(VAR_4=0;VAR_4<32;VAR_4++) {
VAR_5 = VAR_1[VAR_4];
VAR_8 = ((VAR_5<<14) - SCAL... | [
"static void FUNC_0(unsigned char *VAR_0,const short *VAR_1,PREV *VAR_2)\n{",
"int VAR_3;",
"int VAR_4;",
"int VAR_5,VAR_6,VAR_7,VAR_8;",
"int VAR_9=0;",
"int VAR_10=0;",
"int VAR_11[32];",
"VAR_6 = VAR_2->VAR_6;",
"VAR_7 = VAR_2->VAR_7;",
"for(VAR_4=0;VAR_4<32;VAR_4++) {",
"VAR_5 = VAR_1[VAR_4]... | [
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
2,449 | void virtqueue_fill(VirtQueue *vq, const VirtQueueElement *elem,
unsigned int len, unsigned int idx)
{
VRingUsedElem uelem;
trace_virtqueue_fill(vq, elem, len, idx);
virtqueue_unmap_sg(vq, elem, len);
idx = (idx + vq->used_idx) % vq->vring.num;
uelem.id = elem->index;
uelem.l... | true | qemu | f5ed36635d8fa73feb66fe12b3b9c2ed90a1adbe | void virtqueue_fill(VirtQueue *vq, const VirtQueueElement *elem,
unsigned int len, unsigned int idx)
{
VRingUsedElem uelem;
trace_virtqueue_fill(vq, elem, len, idx);
virtqueue_unmap_sg(vq, elem, len);
idx = (idx + vq->used_idx) % vq->vring.num;
uelem.id = elem->index;
uelem.l... | {
"code": [],
"line_no": []
} | void FUNC_0(VirtQueue *VAR_0, const VirtQueueElement *VAR_1,
unsigned int VAR_2, unsigned int VAR_3)
{
VRingUsedElem uelem;
trace_virtqueue_fill(VAR_0, VAR_1, VAR_2, VAR_3);
virtqueue_unmap_sg(VAR_0, VAR_1, VAR_2);
VAR_3 = (VAR_3 + VAR_0->used_idx) % VAR_0->vring.num;
uelem.id = ... | [
"void FUNC_0(VirtQueue *VAR_0, const VirtQueueElement *VAR_1,\nunsigned int VAR_2, unsigned int VAR_3)\n{",
"VRingUsedElem uelem;",
"trace_virtqueue_fill(VAR_0, VAR_1, VAR_2, VAR_3);",
"virtqueue_unmap_sg(VAR_0, VAR_1, VAR_2);",
"VAR_3 = (VAR_3 + VAR_0->used_idx) % VAR_0->vring.num;",
"uelem.id = VAR_1->i... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
]
] |
2,452 | void rtsp_close_streams(AVFormatContext *s)
{
RTSPState *rt = s->priv_data;
int i;
RTSPStream *rtsp_st;
for (i = 0; i < rt->nb_rtsp_streams; i++) {
rtsp_st = rt->rtsp_streams[i];
if (rtsp_st) {
if (rtsp_st->transport_priv) {
if (s->oformat) {
... | true | FFmpeg | f86f66562311f38b6b7864c19720727916fb0d19 | void rtsp_close_streams(AVFormatContext *s)
{
RTSPState *rt = s->priv_data;
int i;
RTSPStream *rtsp_st;
for (i = 0; i < rt->nb_rtsp_streams; i++) {
rtsp_st = rt->rtsp_streams[i];
if (rtsp_st) {
if (rtsp_st->transport_priv) {
if (s->oformat) {
... | {
"code": [],
"line_no": []
} | void FUNC_0(AVFormatContext *VAR_0)
{
RTSPState *rt = VAR_0->priv_data;
int VAR_1;
RTSPStream *rtsp_st;
for (VAR_1 = 0; VAR_1 < rt->nb_rtsp_streams; VAR_1++) {
rtsp_st = rt->rtsp_streams[VAR_1];
if (rtsp_st) {
if (rtsp_st->transport_priv) {
if (VAR_... | [
"void FUNC_0(AVFormatContext *VAR_0)\n{",
"RTSPState *rt = VAR_0->priv_data;",
"int VAR_1;",
"RTSPStream *rtsp_st;",
"for (VAR_1 = 0; VAR_1 < rt->nb_rtsp_streams; VAR_1++) {",
"rtsp_st = rt->rtsp_streams[VAR_1];",
"if (rtsp_st) {",
"if (rtsp_st->transport_priv) {",
"if (VAR_0->oformat) {",
"AVForm... | [
0,
0,
0,
0,
0,
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
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45,
47
... |
2,453 | void replay_save_instructions(void)
{
if (replay_file && replay_mode == REPLAY_MODE_RECORD) {
replay_mutex_lock();
int diff = (int)(replay_get_current_step() - replay_state.current_step);
if (diff > 0) {
replay_put_event(EVENT_INSTRUCTION);
replay_put_dword(diff);
... | true | qemu | 982263ce714ffcc4c7c41a7b255bd29e093912fe | void replay_save_instructions(void)
{
if (replay_file && replay_mode == REPLAY_MODE_RECORD) {
replay_mutex_lock();
int diff = (int)(replay_get_current_step() - replay_state.current_step);
if (diff > 0) {
replay_put_event(EVENT_INSTRUCTION);
replay_put_dword(diff);
... | {
"code": [],
"line_no": []
} | void FUNC_0(void)
{
if (replay_file && replay_mode == REPLAY_MODE_RECORD) {
replay_mutex_lock();
int VAR_0 = (int)(replay_get_current_step() - replay_state.current_step);
if (VAR_0 > 0) {
replay_put_event(EVENT_INSTRUCTION);
replay_put_dword(VAR_0);
replay... | [
"void FUNC_0(void)\n{",
"if (replay_file && replay_mode == REPLAY_MODE_RECORD) {",
"replay_mutex_lock();",
"int VAR_0 = (int)(replay_get_current_step() - replay_state.current_step);",
"if (VAR_0 > 0) {",
"replay_put_event(EVENT_INSTRUCTION);",
"replay_put_dword(VAR_0);",
"replay_state.current_step += ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
]
] |
2,454 | int load_vmstate(const char *name)
{
BlockDriverState *bs, *bs1;
QEMUSnapshotInfo sn;
QEMUFile *f;
int ret;
/* Verify if there is a device that doesn't support snapshots and is writable */
bs = NULL;
while ((bs = bdrv_next(bs))) {
if (bdrv_is_removable(bs) || bdrv_is_rea... | true | qemu | f0aa7a8b2d518c54430e4382309281b93e51981a | int load_vmstate(const char *name)
{
BlockDriverState *bs, *bs1;
QEMUSnapshotInfo sn;
QEMUFile *f;
int ret;
bs = NULL;
while ((bs = bdrv_next(bs))) {
if (bdrv_is_removable(bs) || bdrv_is_read_only(bs)) {
continue;
}
if (!bdrv_can_snapsho... | {
"code": [
" BlockDriverState *bs, *bs1;",
" bs = bdrv_snapshots();",
" if (!bs) {",
" error_report(\"No block device supports snapshots\");",
" return -EINVAL;",
" bs1 = NULL;",
" while ((bs1 = bdrv_next(bs1))) {",
" if (bdrv_can_snapshot(bs1)) {",... | int FUNC_0(const char *VAR_0)
{
BlockDriverState *bs, *bs1;
QEMUSnapshotInfo sn;
QEMUFile *f;
int VAR_1;
bs = NULL;
while ((bs = bdrv_next(bs))) {
if (bdrv_is_removable(bs) || bdrv_is_read_only(bs)) {
continue;
}
if (!bdrv_can_snapshot(b... | [
"int FUNC_0(const char *VAR_0)\n{",
"BlockDriverState *bs, *bs1;",
"QEMUSnapshotInfo sn;",
"QEMUFile *f;",
"int VAR_1;",
"bs = NULL;",
"while ((bs = bdrv_next(bs))) {",
"if (bdrv_is_removable(bs) || bdrv_is_read_only(bs)) {",
"continue;",
"}",
"if (!bdrv_can_snapshot(bs)) {",
"error_report(\"D... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
0,
1,
1,
1,
1,
0,
1,
0,
0,
1,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
2,455 | static int flv_write_header(AVFormatContext *s)
{
AVIOContext *pb = s->pb;
FLVContext *flv = s->priv_data;
AVCodecContext *audio_enc = NULL, *video_enc = NULL, *data_enc = NULL;
int i, metadata_count = 0;
double framerate = 0.0;
int64_t metadata_size_pos, data_size, metadata_count_pos;
... | true | FFmpeg | aba232cfa9b193604ed98f3fa505378d006b1b3b | static int flv_write_header(AVFormatContext *s)
{
AVIOContext *pb = s->pb;
FLVContext *flv = s->priv_data;
AVCodecContext *audio_enc = NULL, *video_enc = NULL, *data_enc = NULL;
int i, metadata_count = 0;
double framerate = 0.0;
int64_t metadata_size_pos, data_size, metadata_count_pos;
... | {
"code": [
" if (s->streams[i]->r_frame_rate.den &&",
" s->streams[i]->r_frame_rate.num) {",
" framerate = av_q2d(s->streams[i]->r_frame_rate);"
],
"line_no": [
31,
33,
35
]
} | static int FUNC_0(AVFormatContext *VAR_0)
{
AVIOContext *pb = VAR_0->pb;
FLVContext *flv = VAR_0->priv_data;
AVCodecContext *audio_enc = NULL, *video_enc = NULL, *data_enc = NULL;
int VAR_1, VAR_2 = 0;
double VAR_3 = 0.0;
int64_t metadata_size_pos, data_size, metadata_count_pos;
AVDi... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"AVIOContext *pb = VAR_0->pb;",
"FLVContext *flv = VAR_0->priv_data;",
"AVCodecContext *audio_enc = NULL, *video_enc = NULL, *data_enc = NULL;",
"int VAR_1, VAR_2 = 0;",
"double VAR_3 = 0.0;",
"int64_t metadata_size_pos, data_size, metadata_count_pos;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
... |
2,456 | void ff_htmlmarkup_to_ass(void *log_ctx, AVBPrint *dst, const char *in)
{
char *param, buffer[128], tmp[128];
int len, tag_close, sptr = 1, line_start = 1, an = 0, end = 0;
SrtStack stack[16];
stack[0].tag[0] = 0;
strcpy(stack[0].param[PARAM_SIZE], "{\\fs}");
strcpy(stack[0].param[PARA... | true | FFmpeg | f4ae3cce64bd46b1d539bdeac39753f83015f114 | void ff_htmlmarkup_to_ass(void *log_ctx, AVBPrint *dst, const char *in)
{
char *param, buffer[128], tmp[128];
int len, tag_close, sptr = 1, line_start = 1, an = 0, end = 0;
SrtStack stack[16];
stack[0].tag[0] = 0;
strcpy(stack[0].param[PARAM_SIZE], "{\\fs}");
strcpy(stack[0].param[PARA... | {
"code": [
"void ff_htmlmarkup_to_ass(void *log_ctx, AVBPrint *dst, const char *in)"
],
"line_no": [
1
]
} | void FUNC_0(void *VAR_0, AVBPrint *VAR_1, const char *VAR_2)
{
char *VAR_3, VAR_4[128], VAR_5[128];
int VAR_6, VAR_7, VAR_8 = 1, VAR_9 = 1, VAR_10 = 0, VAR_11 = 0;
SrtStack stack[16];
stack[0].tag[0] = 0;
strcpy(stack[0].VAR_3[PARAM_SIZE], "{\\fs}");
strcpy(stack[0].VAR_3[PARAM_COLOR],... | [
"void FUNC_0(void *VAR_0, AVBPrint *VAR_1, const char *VAR_2)\n{",
"char *VAR_3, VAR_4[128], VAR_5[128];",
"int VAR_6, VAR_7, VAR_8 = 1, VAR_9 = 1, VAR_10 = 0, VAR_11 = 0;",
"SrtStack stack[16];",
"stack[0].tag[0] = 0;",
"strcpy(stack[0].VAR_3[PARAM_SIZE], \"{\\\\fs}\");",
"strcpy(stack[0].VAR_3[PARAM_... | [
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
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27,
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
2,457 | static void qpa_fini_in (HWVoiceIn *hw)
{
void *ret;
PAVoiceIn *pa = (PAVoiceIn *) hw;
audio_pt_lock (&pa->pt, AUDIO_FUNC);
pa->done = 1;
audio_pt_unlock_and_signal (&pa->pt, AUDIO_FUNC);
audio_pt_join (&pa->pt, &ret, AUDIO_FUNC);
if (pa->s) {
pa_simple_free (pa->s);
... | true | qemu | ea9ebc2ce69198f7aca4b43652824c5d621ac978 | static void qpa_fini_in (HWVoiceIn *hw)
{
void *ret;
PAVoiceIn *pa = (PAVoiceIn *) hw;
audio_pt_lock (&pa->pt, AUDIO_FUNC);
pa->done = 1;
audio_pt_unlock_and_signal (&pa->pt, AUDIO_FUNC);
audio_pt_join (&pa->pt, &ret, AUDIO_FUNC);
if (pa->s) {
pa_simple_free (pa->s);
... | {
"code": [
" if (pa->s) {",
" pa_simple_free (pa->s);",
" pa->s = NULL;",
" if (pa->s) {",
" pa_simple_free (pa->s);",
" pa->s = NULL;"
],
"line_no": [
21,
23,
25,
21,
23,
25
]
} | static void FUNC_0 (HWVoiceIn *VAR_0)
{
void *VAR_1;
PAVoiceIn *pa = (PAVoiceIn *) VAR_0;
audio_pt_lock (&pa->pt, AUDIO_FUNC);
pa->done = 1;
audio_pt_unlock_and_signal (&pa->pt, AUDIO_FUNC);
audio_pt_join (&pa->pt, &VAR_1, AUDIO_FUNC);
if (pa->s) {
pa_simple_free (pa->s)... | [
"static void FUNC_0 (HWVoiceIn *VAR_0)\n{",
"void *VAR_1;",
"PAVoiceIn *pa = (PAVoiceIn *) VAR_0;",
"audio_pt_lock (&pa->pt, AUDIO_FUNC);",
"pa->done = 1;",
"audio_pt_unlock_and_signal (&pa->pt, AUDIO_FUNC);",
"audio_pt_join (&pa->pt, &VAR_1, AUDIO_FUNC);",
"if (pa->s) {",
"pa_simple_free (pa->s);",... | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
2,458 | static void onenand_reset(OneNANDState *s, int cold)
{
memset(&s->addr, 0, sizeof(s->addr));
s->command = 0;
s->count = 1;
s->bufaddr = 0;
s->config[0] = 0x40c0;
s->config[1] = 0x0000;
onenand_intr_update(s);
qemu_irq_raise(s->rdy);
s->status = 0x0000;
s->intstatus = c... | true | qemu | 441692ddd8321d5e0f09b163e86410e578d87236 | static void onenand_reset(OneNANDState *s, int cold)
{
memset(&s->addr, 0, sizeof(s->addr));
s->command = 0;
s->count = 1;
s->bufaddr = 0;
s->config[0] = 0x40c0;
s->config[1] = 0x0000;
onenand_intr_update(s);
qemu_irq_raise(s->rdy);
s->status = 0x0000;
s->intstatus = c... | {
"code": [
" if (s->blk_cur && blk_read(s->blk_cur, 0, s->boot[0], 8) < 0) {"
],
"line_no": [
51
]
} | static void FUNC_0(OneNANDState *VAR_0, int VAR_1)
{
memset(&VAR_0->addr, 0, sizeof(VAR_0->addr));
VAR_0->command = 0;
VAR_0->count = 1;
VAR_0->bufaddr = 0;
VAR_0->config[0] = 0x40c0;
VAR_0->config[1] = 0x0000;
onenand_intr_update(VAR_0);
qemu_irq_raise(VAR_0->rdy);
VAR_0->... | [
"static void FUNC_0(OneNANDState *VAR_0, int VAR_1)\n{",
"memset(&VAR_0->addr, 0, sizeof(VAR_0->addr));",
"VAR_0->command = 0;",
"VAR_0->count = 1;",
"VAR_0->bufaddr = 0;",
"VAR_0->config[0] = 0x40c0;",
"VAR_0->config[1] = 0x0000;",
"onenand_intr_update(VAR_0);",
"qemu_irq_raise(VAR_0->rdy);",
"VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
... |
2,459 | static void flush_packet(AVFormatContext *ctx, int stream_index,
int64_t pts, int64_t dts, int64_t scr)
{
MpegMuxContext *s = ctx->priv_data;
StreamInfo *stream = ctx->streams[stream_index]->priv_data;
uint8_t *buf_ptr;
int size, payload_size, startcode, id, len, stuffing... | true | FFmpeg | 0dbb48d91e9e97c7eb11f4ebc03c4ff4b6f5b692 | static void flush_packet(AVFormatContext *ctx, int stream_index,
int64_t pts, int64_t dts, int64_t scr)
{
MpegMuxContext *s = ctx->priv_data;
StreamInfo *stream = ctx->streams[stream_index]->priv_data;
uint8_t *buf_ptr;
int size, payload_size, startcode, id, len, stuffing... | {
"code": [
" int size, payload_size, startcode, id, len, stuffing_size, i, header_len;",
" payload_size = s->packet_size - (size + 6 + header_len);",
" put_be16(&ctx->pb, payload_size + header_len);",
" put_byte(&ctx->pb, 1);",
" put_byte(&ctx->pb, 0);",
" ... | static void FUNC_0(AVFormatContext *VAR_0, int VAR_1,
int64_t VAR_2, int64_t VAR_3, int64_t VAR_4)
{
MpegMuxContext *s = VAR_0->priv_data;
StreamInfo *stream = VAR_0->streams[VAR_1]->priv_data;
uint8_t *buf_ptr;
int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_1... | [
"static void FUNC_0(AVFormatContext *VAR_0, int VAR_1,\nint64_t VAR_2, int64_t VAR_3, int64_t VAR_4)\n{",
"MpegMuxContext *s = VAR_0->priv_data;",
"StreamInfo *stream = VAR_0->streams[VAR_1]->priv_data;",
"uint8_t *buf_ptr;",
"int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12;",
"uint8_t buffe... | [
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23,
25,
27
],
[
29,
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
... |
2,460 | static QPCIDevice *get_pci_device(void **bmdma_base, void **ide_base)
{
QPCIDevice *dev;
uint16_t vendor_id, device_id;
if (!pcibus) {
pcibus = qpci_init_pc(NULL);
}
/* Find PCI device and verify it's the right one */
dev = qpci_device_find(pcibus, QPCI_DEVFN(IDE_PCI_DEV, IDE... | true | qemu | b4ba67d9a702507793c2724e56f98e9b0f7be02b | static QPCIDevice *get_pci_device(void **bmdma_base, void **ide_base)
{
QPCIDevice *dev;
uint16_t vendor_id, device_id;
if (!pcibus) {
pcibus = qpci_init_pc(NULL);
}
dev = qpci_device_find(pcibus, QPCI_DEVFN(IDE_PCI_DEV, IDE_PCI_FUNC));
g_assert(dev != NULL);
ven... | {
"code": [
"static QPCIDevice *get_pci_device(void **bmdma_base, void **ide_base)",
" *bmdma_base = qpci_iomap(dev, 4, NULL);",
" *ide_base = qpci_legacy_iomap(dev, IDE_BASE);"
],
"line_no": [
1,
39,
43
]
} | static QPCIDevice *FUNC_0(void **bmdma_base, void **ide_base)
{
QPCIDevice *dev;
uint16_t vendor_id, device_id;
if (!pcibus) {
pcibus = qpci_init_pc(NULL);
}
dev = qpci_device_find(pcibus, QPCI_DEVFN(IDE_PCI_DEV, IDE_PCI_FUNC));
g_assert(dev != NULL);
vendor_id =... | [
"static QPCIDevice *FUNC_0(void **bmdma_base, void **ide_base)\n{",
"QPCIDevice *dev;",
"uint16_t vendor_id, device_id;",
"if (!pcibus) {",
"pcibus = qpci_init_pc(NULL);",
"}",
"dev = qpci_device_find(pcibus, QPCI_DEVFN(IDE_PCI_DEV, IDE_PCI_FUNC));",
"g_assert(dev != NULL);",
"vendor_id = qpci_confi... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
39
],
[
43
],
[
47
],
[
51
],
[
53
]
] |
2,461 | static av_always_inline void rgb16_32ToUV_half_c_template(int16_t *dstU,
int16_t *dstV,
const uint8_t *src,
int width,
... | true | FFmpeg | 293d5d7a8e12e38bf70b51f6aa70321e079ffa64 | static av_always_inline void rgb16_32ToUV_half_c_template(int16_t *dstU,
int16_t *dstV,
const uint8_t *src,
int width,
... | {
"code": [
" int px0 = input_pixel(2 * i + 0) >> shp;",
" int px1 = input_pixel(2 * i + 1) >> shp;"
],
"line_no": [
45,
47
]
} | static av_always_inline void FUNC_0(int16_t *dstU,
int16_t *dstV,
const uint8_t *src,
int width,
... | [
"static av_always_inline void FUNC_0(int16_t *dstU,\nint16_t *dstV,\nconst uint8_t *src,\nint width,\nenum AVPixelFormat origin,\nint shr, int shg,\nint shb, int shp,\nint maskr, int maskg,\nint maskb, int rsh,\nint gsh, int bsh, int S,\nint32_t *rgb2yuv)\n{",
"const int VAR_0 = rgb2yuv[RU_IDX] << rsh, VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
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
],
[
51
],
[
55
],
[
57,... |
2,462 | static int read_header(AVFormatContext *s1)
{
VideoDemuxData *s = s1->priv_data;
int first_index, last_index, ret = 0;
int width = 0, height = 0;
AVStream *st;
enum PixelFormat pix_fmt = PIX_FMT_NONE;
AVRational framerate;
s1->ctx_flags |= AVFMTCTX_NOHEADER;
st = avformat_ne... | false | FFmpeg | 3a06ea843656891fdb4d1072d9df2d5c3c9426f5 | static int read_header(AVFormatContext *s1)
{
VideoDemuxData *s = s1->priv_data;
int first_index, last_index, ret = 0;
int width = 0, height = 0;
AVStream *st;
enum PixelFormat pix_fmt = PIX_FMT_NONE;
AVRational framerate;
s1->ctx_flags |= AVFMTCTX_NOHEADER;
st = avformat_ne... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
VideoDemuxData *s = VAR_0->priv_data;
int VAR_1, VAR_2, VAR_3 = 0;
int VAR_4 = 0, VAR_5 = 0;
AVStream *st;
enum PixelFormat VAR_6 = PIX_FMT_NONE;
AVRational framerate;
VAR_0->ctx_flags |= AVFMTCTX_NOHEADER;
st = avformat_new_stream... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"VideoDemuxData *s = VAR_0->priv_data;",
"int VAR_1, VAR_2, VAR_3 = 0;",
"int VAR_4 = 0, VAR_5 = 0;",
"AVStream *st;",
"enum PixelFormat VAR_6 = PIX_FMT_NONE;",
"AVRational framerate;",
"VAR_0->ctx_flags |= AVFMTCTX_NOHEADER;",
"st = avformat_new_strea... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
2,463 | static int qdraw_probe(AVProbeData *p)
{
const uint8_t *b = p->buf;
if (!b[10] && AV_RB32(b+11) == 0x1102ff0c && !b[15] ||
p->buf_size >= 528 && !b[522] && AV_RB32(b+523) == 0x1102ff0c && !b[527])
return AVPROBE_SCORE_EXTENSION + 1;
return 0;
}
| false | FFmpeg | dee7943819042f310d7995671d3e39f4dd31d770 | static int qdraw_probe(AVProbeData *p)
{
const uint8_t *b = p->buf;
if (!b[10] && AV_RB32(b+11) == 0x1102ff0c && !b[15] ||
p->buf_size >= 528 && !b[522] && AV_RB32(b+523) == 0x1102ff0c && !b[527])
return AVPROBE_SCORE_EXTENSION + 1;
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(AVProbeData *VAR_0)
{
const uint8_t *VAR_1 = VAR_0->buf;
if (!VAR_1[10] && AV_RB32(VAR_1+11) == 0x1102ff0c && !VAR_1[15] ||
VAR_0->buf_size >= 528 && !VAR_1[522] && AV_RB32(VAR_1+523) == 0x1102ff0c && !VAR_1[527])
return AVPROBE_SCORE_EXTENSION + 1;
return 0;
}
| [
"static int FUNC_0(AVProbeData *VAR_0)\n{",
"const uint8_t *VAR_1 = VAR_0->buf;",
"if (!VAR_1[10] && AV_RB32(VAR_1+11) == 0x1102ff0c && !VAR_1[15] ||\nVAR_0->buf_size >= 528 && !VAR_1[522] && AV_RB32(VAR_1+523) == 0x1102ff0c && !VAR_1[527])\nreturn AVPROBE_SCORE_EXTENSION + 1;",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11,
13
],
[
15
],
[
17
]
] |
2,464 | static int decode_format80(VqaContext *s, int src_size,
unsigned char *dest, int dest_size, int check_size) {
int dest_index = 0;
int count, opcode, start;
int src_pos;
unsigned char color;
int i;
start = bytestream2_tell(&s->gb);
while (bytestream2_tell(&s->gb) - start < src... | false | FFmpeg | 263105deebbd0a5737dfd1165668c7afb2cc870a | static int decode_format80(VqaContext *s, int src_size,
unsigned char *dest, int dest_size, int check_size) {
int dest_index = 0;
int count, opcode, start;
int src_pos;
unsigned char color;
int i;
start = bytestream2_tell(&s->gb);
while (bytestream2_tell(&s->gb) - start < src... | {
"code": [],
"line_no": []
} | static int FUNC_0(VqaContext *VAR_0, int VAR_1,
unsigned char *VAR_2, int VAR_3, int VAR_4) {
int VAR_5 = 0;
int VAR_6, VAR_7, VAR_8;
int VAR_9;
unsigned char VAR_10;
int VAR_11;
VAR_8 = bytestream2_tell(&VAR_0->gb);
while (bytestream2_tell(&VAR_0->gb) - VAR_8 < VAR_1) {
... | [
"static int FUNC_0(VqaContext *VAR_0, int VAR_1,\nunsigned char *VAR_2, int VAR_3, int VAR_4) {",
"int VAR_5 = 0;",
"int VAR_6, VAR_7, VAR_8;",
"int VAR_9;",
"unsigned char VAR_10;",
"int VAR_11;",
"VAR_8 = bytestream2_tell(&VAR_0->gb);",
"while (bytestream2_tell(&VAR_0->gb) - VAR_8 < VAR_1) {",
"VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
31,
33
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
49
],
[
53
],
[
55
],
[
57... |
2,465 | static int open_input_file(OptionsContext *o, const char *filename)
{
InputFile *f;
AVFormatContext *ic;
AVInputFormat *file_iformat = NULL;
int err, i, ret;
int64_t timestamp;
uint8_t buf[128];
AVDictionary **opts;
AVDictionary *unused_opts = NULL;
AVDictionaryEntry *e = N... | false | FFmpeg | 56ee3f9de7b9f6090d599a27d33a392890a2f7b8 | static int open_input_file(OptionsContext *o, const char *filename)
{
InputFile *f;
AVFormatContext *ic;
AVInputFormat *file_iformat = NULL;
int err, i, ret;
int64_t timestamp;
uint8_t buf[128];
AVDictionary **opts;
AVDictionary *unused_opts = NULL;
AVDictionaryEntry *e = N... | {
"code": [],
"line_no": []
} | static int FUNC_0(OptionsContext *VAR_0, const char *VAR_1)
{
InputFile *f;
AVFormatContext *ic;
AVInputFormat *file_iformat = NULL;
int VAR_2, VAR_3, VAR_4;
int64_t timestamp;
uint8_t buf[128];
AVDictionary **opts;
AVDictionary *unused_opts = NULL;
AVDictionaryEntry *e = N... | [
"static int FUNC_0(OptionsContext *VAR_0, const char *VAR_1)\n{",
"InputFile *f;",
"AVFormatContext *ic;",
"AVInputFormat *file_iformat = NULL;",
"int VAR_2, VAR_3, VAR_4;",
"int64_t timestamp;",
"uint8_t buf[128];",
"AVDictionary **opts;",
"AVDictionary *unused_opts = NULL;",
"AVDictionaryEntry *... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41,
43
],
[
47,
49
... |
2,467 | static int theora_packet(AVFormatContext *s, int idx)
{
struct ogg *ogg = s->priv_data;
struct ogg_stream *os = ogg->streams + idx;
int duration;
/* first packet handling
here we parse the duration of each packet in the first page and compare
the total duration to the page granule... | false | FFmpeg | 0c1d62ab9d757d546fafca366d776524e7bb9893 | static int theora_packet(AVFormatContext *s, int idx)
{
struct ogg *ogg = s->priv_data;
struct ogg_stream *os = ogg->streams + idx;
int duration;
if ((!os->lastpts || os->lastpts == AV_NOPTS_VALUE) && !(os->flags & OGG_FLAG_EOS)) {
int seg;
duration = 1;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1)
{
struct VAR_2 *VAR_2 = VAR_0->priv_data;
struct ogg_stream *VAR_3 = VAR_2->streams + VAR_1;
int VAR_4;
if ((!VAR_3->lastpts || VAR_3->lastpts == AV_NOPTS_VALUE) && !(VAR_3->flags & OGG_FLAG_EOS)) {
int VAR_5;
... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1)\n{",
"struct VAR_2 *VAR_2 = VAR_0->priv_data;",
"struct ogg_stream *VAR_3 = VAR_2->streams + VAR_1;",
"int VAR_4;",
"if ((!VAR_3->lastpts || VAR_3->lastpts == AV_NOPTS_VALUE) && !(VAR_3->flags & OGG_FLAG_EOS)) {",
"int VAR_5;",
"VAR_4 = 1;",
"for (... | [
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
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[
51
],
[
53
],
[
59
],
[
61
],
[
63
... |
2,468 | static int mov_write_wfex_tag(AVIOContext *pb, MOVTrack *track)
{
int64_t pos = avio_tell(pb);
avio_wb32(pb, 0);
ffio_wfourcc(pb, "wfex");
ff_put_wav_header(pb, track->enc, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX);
return update_size(pb, pos);
}
| false | FFmpeg | dc6b99d6b20e832a7d353474c2d093f8b2fb17d2 | static int mov_write_wfex_tag(AVIOContext *pb, MOVTrack *track)
{
int64_t pos = avio_tell(pb);
avio_wb32(pb, 0);
ffio_wfourcc(pb, "wfex");
ff_put_wav_header(pb, track->enc, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX);
return update_size(pb, pos);
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(AVIOContext *VAR_0, MOVTrack *VAR_1)
{
int64_t pos = avio_tell(VAR_0);
avio_wb32(VAR_0, 0);
ffio_wfourcc(VAR_0, "wfex");
ff_put_wav_header(VAR_0, VAR_1->enc, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX);
return update_size(VAR_0, pos);
}
| [
"static int FUNC_0(AVIOContext *VAR_0, MOVTrack *VAR_1)\n{",
"int64_t pos = avio_tell(VAR_0);",
"avio_wb32(VAR_0, 0);",
"ffio_wfourcc(VAR_0, \"wfex\");",
"ff_put_wav_header(VAR_0, VAR_1->enc, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX);",
"return update_size(VAR_0, pos);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
2,469 | static void denoise_depth(HQDN3DContext *s,
uint8_t *src, uint8_t *dst,
uint16_t *line_ant, uint16_t **frame_ant_ptr,
int w, int h, int sstride, int dstride,
int16_t *spatial, int16_t *temporal, int depth)
{
... | false | FFmpeg | 22b985d59c007c4422aefe3ef3fca0aa0daafa9f | static void denoise_depth(HQDN3DContext *s,
uint8_t *src, uint8_t *dst,
uint16_t *line_ant, uint16_t **frame_ant_ptr,
int w, int h, int sstride, int dstride,
int16_t *spatial, int16_t *temporal, int depth)
{
... | {
"code": [],
"line_no": []
} | static void FUNC_0(HQDN3DContext *VAR_0,
uint8_t *VAR_1, uint8_t *VAR_2,
uint16_t *VAR_3, uint16_t **VAR_4,
int VAR_5, int VAR_6, int VAR_7, int VAR_8,
int16_t *VAR_9, int16_t *VAR_10, int VAR_11)
{
... | [
"static void FUNC_0(HQDN3DContext *VAR_0,\nuint8_t *VAR_1, uint8_t *VAR_2,\nuint16_t *VAR_3, uint16_t **VAR_4,\nint VAR_5, int VAR_6, int VAR_7, int VAR_8,\nint16_t *VAR_9, int16_t *VAR_10, int VAR_11)\n{",
"long VAR_12, VAR_13;",
"uint16_t *frame_ant = *VAR_4;",
"if (!frame_ant) {",
"uint8_t *frame_src = V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41,
43,
45
],
[
47,
49,
51
],
[
53
],
[
55
... |
2,470 | static void FUNC(transquant_bypass8x8)(uint8_t *_dst, int16_t *coeffs,
ptrdiff_t stride)
{
int x, y;
pixel *dst = (pixel *)_dst;
stride /= sizeof(pixel);
for (y = 0; y < 8; y++) {
for (x = 0; x < 8; x++) {
dst[x] += *coeffs;
... | false | FFmpeg | a246d06fe0dc6c2ea65e95327624b4537ff9bd0d | static void FUNC(transquant_bypass8x8)(uint8_t *_dst, int16_t *coeffs,
ptrdiff_t stride)
{
int x, y;
pixel *dst = (pixel *)_dst;
stride /= sizeof(pixel);
for (y = 0; y < 8; y++) {
for (x = 0; x < 8; x++) {
dst[x] += *coeffs;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(transquant_bypass8x8)(uint8_t *_dst, int16_t *coeffs,
ptrdiff_t stride)
{
int VAR_0, VAR_1;
pixel *dst = (pixel *)_dst;
stride /= sizeof(pixel);
for (VAR_1 = 0; VAR_1 < 8; VAR_1++) {
for (VAR_0 = 0; VAR_0 < 8; VAR_0++) {
... | [
"static void FUNC_0(transquant_bypass8x8)(uint8_t *_dst, int16_t *coeffs,\nptrdiff_t stride)\n{",
"int VAR_0, VAR_1;",
"pixel *dst = (pixel *)_dst;",
"stride /= sizeof(pixel);",
"for (VAR_1 = 0; VAR_1 < 8; VAR_1++) {",
"for (VAR_0 = 0; VAR_0 < 8; VAR_0++) {",
"dst[VAR_0] += *coeffs;",
"coeffs++;",
"... | [
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
]
] |
2,472 | static void tcg_out_qemu_st (TCGContext *s, const TCGArg *args, int opc)
{
int addr_reg, r0, r1, rbase, data_reg, mem_index, bswap;
#ifdef CONFIG_SOFTMMU
int r2;
void *label1_ptr, *label2_ptr;
#endif
data_reg = *args++;
addr_reg = *args++;
mem_index = *args;
#ifdef CONFIG_SOFTMMU
... | false | qemu | 355b194369d02df7a97d554eef2a9cffe98d736f | static void tcg_out_qemu_st (TCGContext *s, const TCGArg *args, int opc)
{
int addr_reg, r0, r1, rbase, data_reg, mem_index, bswap;
#ifdef CONFIG_SOFTMMU
int r2;
void *label1_ptr, *label2_ptr;
#endif
data_reg = *args++;
addr_reg = *args++;
mem_index = *args;
#ifdef CONFIG_SOFTMMU
... | {
"code": [],
"line_no": []
} | static void FUNC_0 (TCGContext *VAR_0, const TCGArg *VAR_1, int VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;
#ifdef CONFIG_SOFTMMU
int r2;
void *label1_ptr, *label2_ptr;
#endif
VAR_7 = *VAR_1++;
VAR_3 = *VAR_1++;
VAR_8 = *VAR_1;
#ifdef CONFIG_SOFTMMU
VAR_4 = 3... | [
"static void FUNC_0 (TCGContext *VAR_0, const TCGArg *VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;",
"#ifdef CONFIG_SOFTMMU\nint r2;",
"void *label1_ptr, *label2_ptr;",
"#endif\nVAR_7 = *VAR_1++;",
"VAR_3 = *VAR_1++;",
"VAR_8 = *VAR_1;",
"#ifdef CONFIG_SOFTMMU\nVAR_4 = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13,
17
],
[
19
],
[
21
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
37,
39
],
[
43
],
[
47
],
[
49,
51
],
[
53,
59
],
[
61
... |
2,473 | int omap_validate_imif_addr(struct omap_mpu_state_s *s,
target_phys_addr_t addr)
{
return addr >= OMAP_IMIF_BASE && addr < OMAP_IMIF_BASE + s->sram_size;
}
| false | qemu | b854bc196f5c4b4e3299c0b0ee63cf828ece9e77 | int omap_validate_imif_addr(struct omap_mpu_state_s *s,
target_phys_addr_t addr)
{
return addr >= OMAP_IMIF_BASE && addr < OMAP_IMIF_BASE + s->sram_size;
}
| {
"code": [],
"line_no": []
} | int FUNC_0(struct omap_mpu_state_s *VAR_0,
target_phys_addr_t VAR_1)
{
return VAR_1 >= OMAP_IMIF_BASE && VAR_1 < OMAP_IMIF_BASE + VAR_0->sram_size;
}
| [
"int FUNC_0(struct omap_mpu_state_s *VAR_0,\ntarget_phys_addr_t VAR_1)\n{",
"return VAR_1 >= OMAP_IMIF_BASE && VAR_1 < OMAP_IMIF_BASE + VAR_0->sram_size;",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
]
] |
2,474 | static sPAPRCapabilities default_caps_with_cpu(sPAPRMachineState *spapr,
CPUState *cs)
{
sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(spapr);
sPAPRCapabilities caps;
caps = smc->default_caps;
/* TODO: clamp according to cpu model */
ret... | false | qemu | ee76a09fc72cfbfab2bb5529320ef7e460adffd8 | static sPAPRCapabilities default_caps_with_cpu(sPAPRMachineState *spapr,
CPUState *cs)
{
sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(spapr);
sPAPRCapabilities caps;
caps = smc->default_caps;
return caps;
}
| {
"code": [],
"line_no": []
} | static sPAPRCapabilities FUNC_0(sPAPRMachineState *spapr,
CPUState *cs)
{
sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(spapr);
sPAPRCapabilities caps;
caps = smc->default_caps;
return caps;
}
| [
"static sPAPRCapabilities FUNC_0(sPAPRMachineState *spapr,\nCPUState *cs)\n{",
"sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(spapr);",
"sPAPRCapabilities caps;",
"caps = smc->default_caps;",
"return caps;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
21
],
[
23
]
] |
2,475 | int qio_channel_socket_listen_sync(QIOChannelSocket *ioc,
SocketAddressLegacy *addr,
Error **errp)
{
int fd;
trace_qio_channel_socket_listen_sync(ioc, addr);
fd = socket_listen(addr, errp);
if (fd < 0) {
trace_qio_ch... | false | qemu | bd269ebc82fbaa5fe7ce5bc7c1770ac8acecd884 | int qio_channel_socket_listen_sync(QIOChannelSocket *ioc,
SocketAddressLegacy *addr,
Error **errp)
{
int fd;
trace_qio_channel_socket_listen_sync(ioc, addr);
fd = socket_listen(addr, errp);
if (fd < 0) {
trace_qio_ch... | {
"code": [],
"line_no": []
} | int FUNC_0(QIOChannelSocket *VAR_0,
SocketAddressLegacy *VAR_1,
Error **VAR_2)
{
int VAR_3;
trace_qio_channel_socket_listen_sync(VAR_0, VAR_1);
VAR_3 = socket_listen(VAR_1, VAR_2);
if (VAR_3 < 0) {
trace_qio_channel_... | [
"int FUNC_0(QIOChannelSocket *VAR_0,\nSocketAddressLegacy *VAR_1,\nError **VAR_2)\n{",
"int VAR_3;",
"trace_qio_channel_socket_listen_sync(VAR_0, VAR_1);",
"VAR_3 = socket_listen(VAR_1, VAR_2);",
"if (VAR_3 < 0) {",
"trace_qio_channel_socket_listen_fail(VAR_0);",
"return -1;",
"}",
"trace_qio_channe... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
]
] |
2,476 | uint64_t ptimer_get_count(ptimer_state *s)
{
int64_t now;
uint64_t counter;
if (s->enabled) {
now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
/* Figure out the current counter value. */
if (now - s->next_event > 0
|| s->period == 0) {
/* Prevent timer... | false | qemu | e91171e30235ae99ab8060988aa3c9536692bba8 | uint64_t ptimer_get_count(ptimer_state *s)
{
int64_t now;
uint64_t counter;
if (s->enabled) {
now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
if (now - s->next_event > 0
|| s->period == 0) {
counter = 0;
} else {
... | {
"code": [],
"line_no": []
} | uint64_t FUNC_0(ptimer_state *s)
{
int64_t now;
uint64_t counter;
if (s->enabled) {
now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
if (now - s->next_event > 0
|| s->period == 0) {
counter = 0;
} else {
uint64_t r... | [
"uint64_t FUNC_0(ptimer_state *s)\n{",
"int64_t now;",
"uint64_t counter;",
"if (s->enabled) {",
"now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);",
"if (now - s->next_event > 0\n|| s->period == 0) {",
"counter = 0;",
"} else {",
"uint64_t rem;",
"uint64_t div;",
"int VAR_0, VAR_1;",
"int 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
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17,
19
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
59
],
[
61
],
[
65
],
[
67
],
[
69
],
[
73
],
[
75
],
... |
2,477 | int cpu_x86_handle_mmu_fault(CPUX86State *env, target_ulong addr,
int is_write1, int is_user, int is_softmmu)
{
uint64_t ptep, pte;
uint32_t pdpe_addr, pde_addr, pte_addr;
int error_code, is_dirty, prot, page_size, ret, is_write;
unsigned long paddr, page_offset;
... | false | qemu | 54ca9095f046dfa03c3d093cc55f6d76b61864e1 | int cpu_x86_handle_mmu_fault(CPUX86State *env, target_ulong addr,
int is_write1, int is_user, int is_softmmu)
{
uint64_t ptep, pte;
uint32_t pdpe_addr, pde_addr, pte_addr;
int error_code, is_dirty, prot, page_size, ret, is_write;
unsigned long paddr, page_offset;
... | {
"code": [],
"line_no": []
} | int FUNC_0(CPUX86State *VAR_0, target_ulong VAR_1,
int VAR_2, int VAR_3, int VAR_4)
{
uint64_t ptep, pte;
uint32_t pdpe_addr, pde_addr, pte_addr;
int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;
unsigned long VAR_11, VAR_12;
target_ulong vaddr, virt_addr;
#i... | [
"int FUNC_0(CPUX86State *VAR_0, target_ulong VAR_1,\nint VAR_2, int VAR_3, int VAR_4)\n{",
"uint64_t ptep, pte;",
"uint32_t pdpe_addr, pde_addr, pte_addr;",
"int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;",
"unsigned long VAR_11, VAR_12;",
"target_ulong vaddr, virt_addr;",
"#if defined(DEBUG_MMU)\nprint... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
55,... |
2,478 | static int protocol_client_auth_vnc(VncState *vs, uint8_t *data, size_t len)
{
unsigned char response[VNC_AUTH_CHALLENGE_SIZE];
int i, j, pwlen;
unsigned char key[8];
time_t now = time(NULL);
if (!vs->vd->password || !vs->vd->password[0]) {
VNC_DEBUG("No password configured on serve... | false | qemu | 1cd20f8bf0ecb9d1d1bd5e2ffab3b88835380c9b | static int protocol_client_auth_vnc(VncState *vs, uint8_t *data, size_t len)
{
unsigned char response[VNC_AUTH_CHALLENGE_SIZE];
int i, j, pwlen;
unsigned char key[8];
time_t now = time(NULL);
if (!vs->vd->password || !vs->vd->password[0]) {
VNC_DEBUG("No password configured on serve... | {
"code": [],
"line_no": []
} | static int FUNC_0(VncState *VAR_0, uint8_t *VAR_1, size_t VAR_2)
{
unsigned char VAR_3[VNC_AUTH_CHALLENGE_SIZE];
int VAR_4, VAR_5, VAR_6;
unsigned char VAR_7[8];
time_t now = time(NULL);
if (!VAR_0->vd->password || !VAR_0->vd->password[0]) {
VNC_DEBUG("No password configured on serv... | [
"static int FUNC_0(VncState *VAR_0, uint8_t *VAR_1, size_t VAR_2)\n{",
"unsigned char VAR_3[VNC_AUTH_CHALLENGE_SIZE];",
"int VAR_4, VAR_5, VAR_6;",
"unsigned char VAR_7[8];",
"time_t now = time(NULL);",
"if (!VAR_0->vd->password || !VAR_0->vd->password[0]) {",
"VNC_DEBUG(\"No password configured on serv... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
2,479 | static void img_copy(uint8_t *dst, int dst_wrap,
uint8_t *src, int src_wrap,
int width, int height)
{
for(;height > 0; height--) {
memcpy(dst, src, width);
dst += dst_wrap;
src += src_wrap;
}
}
| false | FFmpeg | 7e7e59409294af9caa63808e56c5cc824c98b4fc | static void img_copy(uint8_t *dst, int dst_wrap,
uint8_t *src, int src_wrap,
int width, int height)
{
for(;height > 0; height--) {
memcpy(dst, src, width);
dst += dst_wrap;
src += src_wrap;
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t *VAR_0, int VAR_1,
uint8_t *VAR_2, int VAR_3,
int VAR_4, int VAR_5)
{
for(;VAR_5 > 0; VAR_5--) {
memcpy(VAR_0, VAR_2, VAR_4);
VAR_0 += VAR_1;
VAR_2 += VAR_3;
}
}
| [
"static void FUNC_0(uint8_t *VAR_0, int VAR_1,\nuint8_t *VAR_2, int VAR_3,\nint VAR_4, int VAR_5)\n{",
"for(;VAR_5 > 0; VAR_5--) {",
"memcpy(VAR_0, VAR_2, VAR_4);",
"VAR_0 += VAR_1;",
"VAR_2 += VAR_3;",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
2,480 | static void patch_instruction(VAPICROMState *s, X86CPU *cpu, target_ulong ip)
{
CPUState *cs = CPU(cpu);
CPUX86State *env = &cpu->env;
VAPICHandlers *handlers;
uint8_t opcode[2];
uint32_t imm32 = 0;
target_ulong current_pc = 0;
target_ulong current_cs_base = 0;
uint32_t current_... | false | qemu | 6886b98036a8f8f5bce8b10756ce080084cef11b | static void patch_instruction(VAPICROMState *s, X86CPU *cpu, target_ulong ip)
{
CPUState *cs = CPU(cpu);
CPUX86State *env = &cpu->env;
VAPICHandlers *handlers;
uint8_t opcode[2];
uint32_t imm32 = 0;
target_ulong current_pc = 0;
target_ulong current_cs_base = 0;
uint32_t current_... | {
"code": [],
"line_no": []
} | static void FUNC_0(VAPICROMState *VAR_0, X86CPU *VAR_1, target_ulong VAR_2)
{
CPUState *cs = CPU(VAR_1);
CPUX86State *env = &VAR_1->env;
VAPICHandlers *handlers;
uint8_t opcode[2];
uint32_t imm32 = 0;
target_ulong current_pc = 0;
target_ulong current_cs_base = 0;
uint32_t curren... | [
"static void FUNC_0(VAPICROMState *VAR_0, X86CPU *VAR_1, target_ulong VAR_2)\n{",
"CPUState *cs = CPU(VAR_1);",
"CPUX86State *env = &VAR_1->env;",
"VAPICHandlers *handlers;",
"uint8_t opcode[2];",
"uint32_t imm32 = 0;",
"target_ulong current_pc = 0;",
"target_ulong current_cs_base = 0;",
"uint32_t c... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37,
39
],
[
41
],
[
45
],
[
49
],
[... |
2,481 | static void qcow_close(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
qcrypto_cipher_free(s->cipher);
s->cipher = NULL;
g_free(s->l1_table);
qemu_vfree(s->l2_cache);
g_free(s->cluster_cache);
g_free(s->cluster_data);
migrate_del_blocker(s->migration_blocker);
er... | false | qemu | d85f4222b4681da7ebf8a90b26e085a68fa2c55a | static void qcow_close(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
qcrypto_cipher_free(s->cipher);
s->cipher = NULL;
g_free(s->l1_table);
qemu_vfree(s->l2_cache);
g_free(s->cluster_cache);
g_free(s->cluster_data);
migrate_del_blocker(s->migration_blocker);
er... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0)
{
BDRVQcowState *s = VAR_0->opaque;
qcrypto_cipher_free(s->cipher);
s->cipher = NULL;
g_free(s->l1_table);
qemu_vfree(s->l2_cache);
g_free(s->cluster_cache);
g_free(s->cluster_data);
migrate_del_blocker(s->migration_blocker);
... | [
"static void FUNC_0(BlockDriverState *VAR_0)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"qcrypto_cipher_free(s->cipher);",
"s->cipher = NULL;",
"g_free(s->l1_table);",
"qemu_vfree(s->l2_cache);",
"g_free(s->cluster_cache);",
"g_free(s->cluster_data);",
"migrate_del_blocker(s->migration_blocker);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
]
] |
2,482 | static void qmp_input_free(Visitor *v)
{
QmpInputVisitor *qiv = to_qiv(v);
while (!QSLIST_EMPTY(&qiv->stack)) {
StackObject *tos = QSLIST_FIRST(&qiv->stack);
QSLIST_REMOVE_HEAD(&qiv->stack, node);
qmp_input_stack_object_free(tos);
}
qobject_decref(qiv->root);
g_f... | false | qemu | 09e68369a88d7de0f988972bf28eec1b80cc47f9 | static void qmp_input_free(Visitor *v)
{
QmpInputVisitor *qiv = to_qiv(v);
while (!QSLIST_EMPTY(&qiv->stack)) {
StackObject *tos = QSLIST_FIRST(&qiv->stack);
QSLIST_REMOVE_HEAD(&qiv->stack, node);
qmp_input_stack_object_free(tos);
}
qobject_decref(qiv->root);
g_f... | {
"code": [],
"line_no": []
} | static void FUNC_0(Visitor *VAR_0)
{
QmpInputVisitor *qiv = to_qiv(VAR_0);
while (!QSLIST_EMPTY(&qiv->stack)) {
StackObject *tos = QSLIST_FIRST(&qiv->stack);
QSLIST_REMOVE_HEAD(&qiv->stack, node);
qmp_input_stack_object_free(tos);
}
qobject_decref(qiv->root);
g_f... | [
"static void FUNC_0(Visitor *VAR_0)\n{",
"QmpInputVisitor *qiv = to_qiv(VAR_0);",
"while (!QSLIST_EMPTY(&qiv->stack)) {",
"StackObject *tos = QSLIST_FIRST(&qiv->stack);",
"QSLIST_REMOVE_HEAD(&qiv->stack, node);",
"qmp_input_stack_object_free(tos);",
"}",
"qobject_decref(qiv->root);",
"g_free(qiv);",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
]
] |
2,484 | static void qcow_aio_write_cb(void *opaque, int ret)
{
QCowAIOCB *acb = opaque;
BlockDriverState *bs = acb->common.bs;
BDRVQcowState *s = bs->opaque;
int index_in_cluster;
const uint8_t *src_buf;
int n_end;
acb->hd_aiocb = NULL;
if (ret >= 0) {
ret = qcow2_alloc_clu... | false | qemu | 72cf2d4f0e181d0d3a3122e04129c58a95da713e | static void qcow_aio_write_cb(void *opaque, int ret)
{
QCowAIOCB *acb = opaque;
BlockDriverState *bs = acb->common.bs;
BDRVQcowState *s = bs->opaque;
int index_in_cluster;
const uint8_t *src_buf;
int n_end;
acb->hd_aiocb = NULL;
if (ret >= 0) {
ret = qcow2_alloc_clu... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, int VAR_1)
{
QCowAIOCB *acb = VAR_0;
BlockDriverState *bs = acb->common.bs;
BDRVQcowState *s = bs->VAR_0;
int VAR_2;
const uint8_t *VAR_3;
int VAR_4;
acb->hd_aiocb = NULL;
if (VAR_1 >= 0) {
VAR_1 = qcow2_alloc_cluster_link_l2(bs, acb-... | [
"static void FUNC_0(void *VAR_0, int VAR_1)\n{",
"QCowAIOCB *acb = VAR_0;",
"BlockDriverState *bs = acb->common.bs;",
"BDRVQcowState *s = bs->VAR_0;",
"int VAR_2;",
"const uint8_t *VAR_3;",
"int VAR_4;",
"acb->hd_aiocb = NULL;",
"if (VAR_1 >= 0) {",
"VAR_1 = qcow2_alloc_cluster_link_l2(bs, acb->cl... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
31
],
[
35,
37
],
[
41
],
[
43
],
[
45
],
[
49
],
[
53
],
[
55
],
[... |
2,485 | int coroutine_fn blk_co_preadv(BlockBackend *blk, int64_t offset,
unsigned int bytes, QEMUIOVector *qiov,
BdrvRequestFlags flags)
{
int ret;
trace_blk_co_preadv(blk, blk_bs(blk), offset, bytes, flags);
ret = blk_check_byte_request(blk, ... | false | qemu | a03ef88f77af045a2eb9629b5ce774a3fb973c5e | int coroutine_fn blk_co_preadv(BlockBackend *blk, int64_t offset,
unsigned int bytes, QEMUIOVector *qiov,
BdrvRequestFlags flags)
{
int ret;
trace_blk_co_preadv(blk, blk_bs(blk), offset, bytes, flags);
ret = blk_check_byte_request(blk, ... | {
"code": [],
"line_no": []
} | int VAR_0 blk_co_preadv(BlockBackend *blk, int64_t offset,
unsigned int bytes, QEMUIOVector *qiov,
BdrvRequestFlags flags)
{
int ret;
trace_blk_co_preadv(blk, blk_bs(blk), offset, bytes, flags);
ret = blk_check_byte_request(blk, offset,... | [
"int VAR_0 blk_co_preadv(BlockBackend *blk, int64_t offset,\nunsigned int bytes, QEMUIOVector *qiov,\nBdrvRequestFlags flags)\n{",
"int ret;",
"trace_blk_co_preadv(blk, blk_bs(blk), offset, bytes, flags);",
"ret = blk_check_byte_request(blk, offset, bytes);",
"if (ret < 0) {",
"return ret;",
"}",
"if ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
]
] |
2,486 | bool virtio_disk_is_scsi(void)
{
if (guessed_disk_nature) {
return (blk_cfg.blk_size == 512);
}
return (blk_cfg.geometry.heads == 255)
&& (blk_cfg.geometry.sectors == 63)
&& (blk_cfg.blk_size == 512);
}
| false | qemu | 92cb05574b7bd489be81f9c58497dc7dfe5d8859 | bool virtio_disk_is_scsi(void)
{
if (guessed_disk_nature) {
return (blk_cfg.blk_size == 512);
}
return (blk_cfg.geometry.heads == 255)
&& (blk_cfg.geometry.sectors == 63)
&& (blk_cfg.blk_size == 512);
}
| {
"code": [],
"line_no": []
} | bool FUNC_0(void)
{
if (guessed_disk_nature) {
return (blk_cfg.blk_size == 512);
}
return (blk_cfg.geometry.heads == 255)
&& (blk_cfg.geometry.sectors == 63)
&& (blk_cfg.blk_size == 512);
}
| [
"bool FUNC_0(void)\n{",
"if (guessed_disk_nature) {",
"return (blk_cfg.blk_size == 512);",
"}",
"return (blk_cfg.geometry.heads == 255)\n&& (blk_cfg.geometry.sectors == 63)\n&& (blk_cfg.blk_size == 512);",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13,
15
],
[
17
]
] |
2,487 | iscsi_aio_discard(BlockDriverState *bs,
int64_t sector_num, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
IscsiLun *iscsilun = bs->opaque;
struct iscsi_context *iscsi = iscsilun->iscsi;
IscsiAIOCB *acb;
struct unmap_list list[1];
acb = q... | false | qemu | 1dde716ed6719c341c1bfa427781f0715af90cbc | iscsi_aio_discard(BlockDriverState *bs,
int64_t sector_num, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
IscsiLun *iscsilun = bs->opaque;
struct iscsi_context *iscsi = iscsilun->iscsi;
IscsiAIOCB *acb;
struct unmap_list list[1];
acb = q... | {
"code": [],
"line_no": []
} | FUNC_0(BlockDriverState *VAR_0,
int64_t VAR_1, int VAR_2,
BlockDriverCompletionFunc *VAR_3, void *VAR_4)
{
IscsiLun *iscsilun = VAR_0->VAR_4;
struct iscsi_context *VAR_5 = iscsilun->VAR_5;
IscsiAIOCB *acb;
struct unmap_list VAR_6[1];
acb = qemu_aio_get(&... | [
"FUNC_0(BlockDriverState *VAR_0,\nint64_t VAR_1, int VAR_2,\nBlockDriverCompletionFunc *VAR_3, void *VAR_4)\n{",
"IscsiLun *iscsilun = VAR_0->VAR_4;",
"struct iscsi_context *VAR_5 = iscsilun->VAR_5;",
"IscsiAIOCB *acb;",
"struct unmap_list VAR_6[1];",
"acb = qemu_aio_get(&iscsi_aiocb_info, VAR_0, VAR_3, V... | [
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
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
41,
43,
45,
47
],
[
49
],
[
51,
53
],
[
55
... |
2,488 | static void stream_desc_store(struct Stream *s, hwaddr addr)
{
struct SDesc *d = &s->desc;
int i;
/* Convert from host endianness into LE. */
d->buffer_address = cpu_to_le64(d->buffer_address);
d->nxtdesc = cpu_to_le64(d->nxtdesc);
d->control = cpu_to_le32(d->control);
d->status =... | false | qemu | 42bb9c9178ae7ac4c439172b1ae99cc29188a5c6 | static void stream_desc_store(struct Stream *s, hwaddr addr)
{
struct SDesc *d = &s->desc;
int i;
d->buffer_address = cpu_to_le64(d->buffer_address);
d->nxtdesc = cpu_to_le64(d->nxtdesc);
d->control = cpu_to_le32(d->control);
d->status = cpu_to_le32(d->status);
for (i = 0; i ... | {
"code": [],
"line_no": []
} | static void FUNC_0(struct Stream *VAR_0, hwaddr VAR_1)
{
struct SDesc *VAR_2 = &VAR_0->desc;
int VAR_3;
VAR_2->buffer_address = cpu_to_le64(VAR_2->buffer_address);
VAR_2->nxtdesc = cpu_to_le64(VAR_2->nxtdesc);
VAR_2->control = cpu_to_le32(VAR_2->control);
VAR_2->status = cpu_to_le... | [
"static void FUNC_0(struct Stream *VAR_0, hwaddr VAR_1)\n{",
"struct SDesc *VAR_2 = &VAR_0->desc;",
"int VAR_3;",
"VAR_2->buffer_address = cpu_to_le64(VAR_2->buffer_address);",
"VAR_2->nxtdesc = cpu_to_le64(VAR_2->nxtdesc);",
"VAR_2->control = cpu_to_le32(VAR_2->control);",
"VAR_2->status = cpu_to_le32(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
2,489 | static void cs_mem_write(void *opaque, target_phys_addr_t addr,
uint64_t val, unsigned size)
{
CSState *s = opaque;
uint32_t saddr;
saddr = addr >> 2;
trace_cs4231_mem_writel_reg(saddr, s->regs[saddr], val);
switch (saddr) {
case 1:
trace_cs4231_mem_wr... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void cs_mem_write(void *opaque, target_phys_addr_t addr,
uint64_t val, unsigned size)
{
CSState *s = opaque;
uint32_t saddr;
saddr = addr >> 2;
trace_cs4231_mem_writel_reg(saddr, s->regs[saddr], val);
switch (saddr) {
case 1:
trace_cs4231_mem_wr... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
CSState *s = VAR_0;
uint32_t saddr;
saddr = VAR_1 >> 2;
trace_cs4231_mem_writel_reg(saddr, s->regs[saddr], VAR_2);
switch (saddr) {
case 1:
trace_cs4231_mem_wri... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"CSState *s = VAR_0;",
"uint32_t saddr;",
"saddr = VAR_1 >> 2;",
"trace_cs4231_mem_writel_reg(saddr, s->regs[saddr], VAR_2);",
"switch (saddr) {",
"case 1:\ntrace_cs4231_mem_writel_dreg(CS_RAP(s), s->dregs[C... | [
0,
0,
0,
0,
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
... |
2,490 | static int mxf_parse_structural_metadata(MXFContext *mxf)
{
MXFPackage *material_package = NULL;
MXFPackage *source_package = NULL;
MXFPackage *temp_package = NULL;
int i, j, k;
dprintf("metadata sets count %d\n", mxf->metadata_sets_count);
/* TODO: handle multiple material packages (OP... | false | FFmpeg | 7f25df4cd38fe9de6dd88f806a3994be5302a823 | static int mxf_parse_structural_metadata(MXFContext *mxf)
{
MXFPackage *material_package = NULL;
MXFPackage *source_package = NULL;
MXFPackage *temp_package = NULL;
int i, j, k;
dprintf("metadata sets count %d\n", mxf->metadata_sets_count);
for (i = 0; i < mxf->packages_count; i++... | {
"code": [],
"line_no": []
} | static int FUNC_0(MXFContext *VAR_0)
{
MXFPackage *material_package = NULL;
MXFPackage *source_package = NULL;
MXFPackage *temp_package = NULL;
int VAR_1, VAR_2, VAR_3;
dprintf("metadata sets count %d\n", VAR_0->metadata_sets_count);
for (VAR_1 = 0; VAR_1 < VAR_0->packages_count; ... | [
"static int FUNC_0(MXFContext *VAR_0)\n{",
"MXFPackage *material_package = NULL;",
"MXFPackage *source_package = NULL;",
"MXFPackage *temp_package = NULL;",
"int VAR_1, VAR_2, VAR_3;",
"dprintf(\"metadata sets count %d\\n\", VAR_0->metadata_sets_count);",
"for (VAR_1 = 0; VAR_1 < VAR_0->packages_count; ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
2,491 | void virtqueue_map(VirtQueueElement *elem)
{
virtqueue_map_iovec(elem->in_sg, elem->in_addr, &elem->in_num,
VIRTQUEUE_MAX_SIZE, 1);
virtqueue_map_iovec(elem->out_sg, elem->out_addr, &elem->out_num,
VIRTQUEUE_MAX_SIZE, 0);
}
| false | qemu | 8607f5c3072caeebbe0217df28651fffd3a79fd9 | void virtqueue_map(VirtQueueElement *elem)
{
virtqueue_map_iovec(elem->in_sg, elem->in_addr, &elem->in_num,
VIRTQUEUE_MAX_SIZE, 1);
virtqueue_map_iovec(elem->out_sg, elem->out_addr, &elem->out_num,
VIRTQUEUE_MAX_SIZE, 0);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(VirtQueueElement *VAR_0)
{
virtqueue_map_iovec(VAR_0->in_sg, VAR_0->in_addr, &VAR_0->in_num,
VIRTQUEUE_MAX_SIZE, 1);
virtqueue_map_iovec(VAR_0->out_sg, VAR_0->out_addr, &VAR_0->out_num,
VIRTQUEUE_MAX_SIZE, 0);
}
| [
"void FUNC_0(VirtQueueElement *VAR_0)\n{",
"virtqueue_map_iovec(VAR_0->in_sg, VAR_0->in_addr, &VAR_0->in_num,\nVIRTQUEUE_MAX_SIZE, 1);",
"virtqueue_map_iovec(VAR_0->out_sg, VAR_0->out_addr, &VAR_0->out_num,\nVIRTQUEUE_MAX_SIZE, 0);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13
]
] |
2,492 | static SCSIDiskReq *scsi_new_request(SCSIDiskState *s, uint32_t tag,
uint32_t lun)
{
SCSIRequest *req;
SCSIDiskReq *r;
req = scsi_req_alloc(sizeof(SCSIDiskReq), &s->qdev, tag, lun);
r = DO_UPCAST(SCSIDiskReq, req, req);
r->iov.iov_base = qemu_blockalign(s->bs, SCSI_DMA_BUF_SIZE);
... | true | qemu | 5c6c0e513600ba57c3e73b7151d3c0664438f7b5 | static SCSIDiskReq *scsi_new_request(SCSIDiskState *s, uint32_t tag,
uint32_t lun)
{
SCSIRequest *req;
SCSIDiskReq *r;
req = scsi_req_alloc(sizeof(SCSIDiskReq), &s->qdev, tag, lun);
r = DO_UPCAST(SCSIDiskReq, req, req);
r->iov.iov_base = qemu_blockalign(s->bs, SCSI_DMA_BUF_SIZE);
... | {
"code": [
" SCSIRequest *req;",
"static SCSIDiskReq *scsi_new_request(SCSIDiskState *s, uint32_t tag,",
" return r;",
" SCSIDiskReq *r;",
" SCSIDiskReq *r;",
" SCSIDiskReq *r;",
" SCSIDiskReq *r;",
" SCSIDiskReq *r;"
],
"line_no": [
7,
1,
19,
... | static SCSIDiskReq *FUNC_0(SCSIDiskState *s, uint32_t tag,
uint32_t lun)
{
SCSIRequest *req;
SCSIDiskReq *r;
req = scsi_req_alloc(sizeof(SCSIDiskReq), &s->qdev, tag, lun);
r = DO_UPCAST(SCSIDiskReq, req, req);
r->iov.iov_base = qemu_blockalign(s->bs, SCSI_DMA_BUF_SIZE);
return ... | [
"static SCSIDiskReq *FUNC_0(SCSIDiskState *s, uint32_t tag,\nuint32_t lun)\n{",
"SCSIRequest *req;",
"SCSIDiskReq *r;",
"req = scsi_req_alloc(sizeof(SCSIDiskReq), &s->qdev, tag, lun);",
"r = DO_UPCAST(SCSIDiskReq, req, req);",
"r->iov.iov_base = qemu_blockalign(s->bs, SCSI_DMA_BUF_SIZE);",
"return r;",
... | [
1,
1,
1,
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
2,494 | static int disas_vfp_insn(CPUARMState * env, DisasContext *s, uint32_t insn)
{
uint32_t rd, rn, rm, op, i, n, offset, delta_d, delta_m, bank_mask;
int dp, veclen;
TCGv addr;
TCGv tmp;
TCGv tmp2;
if (!arm_feature(env, ARM_FEATURE_VFP))
return 1;
if (!s->vfp_enabled) {
... | true | qemu | e4c1cfa5cb8f8bfbbfd949f2fabbe2be35e60c99 | static int disas_vfp_insn(CPUARMState * env, DisasContext *s, uint32_t insn)
{
uint32_t rd, rn, rm, op, i, n, offset, delta_d, delta_m, bank_mask;
int dp, veclen;
TCGv addr;
TCGv tmp;
TCGv tmp2;
if (!arm_feature(env, ARM_FEATURE_VFP))
return 1;
if (!s->vfp_enabled) {
... | {
"code": [
" tmp = load_reg(s, rd);"
],
"line_no": [
163
]
} | static int FUNC_0(CPUARMState * VAR_0, DisasContext *VAR_1, uint32_t VAR_2)
{
uint32_t rd, rn, rm, op, i, n, offset, delta_d, delta_m, bank_mask;
int VAR_3, VAR_4;
TCGv addr;
TCGv tmp;
TCGv tmp2;
if (!arm_feature(VAR_0, ARM_FEATURE_VFP))
return 1;
if (!VAR_1->vfp_enabled... | [
"static int FUNC_0(CPUARMState * VAR_0, DisasContext *VAR_1, uint32_t VAR_2)\n{",
"uint32_t rd, rn, rm, op, i, n, offset, delta_d, delta_m, bank_mask;",
"int VAR_3, VAR_4;",
"TCGv addr;",
"TCGv tmp;",
"TCGv tmp2;",
"if (!arm_feature(VAR_0, ARM_FEATURE_VFP))\nreturn 1;",
"if (!VAR_1->vfp_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,
1,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
23
],
[
27,
29
],
[
31
],
[
33,
35,
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
51
],
[
53
],
[... |
2,495 | static void do_address_space_destroy(AddressSpace *as)
{
MemoryListener *listener;
address_space_destroy_dispatch(as);
QTAILQ_FOREACH(listener, &memory_listeners, link) {
assert(listener->address_space_filter != as);
}
flatview_unref(as->current_map);
g_free(as->name);
g_free(as->ioe... | true | qemu | ac95190ea92f7625bb0065c2864321607b95c26b | static void do_address_space_destroy(AddressSpace *as)
{
MemoryListener *listener;
address_space_destroy_dispatch(as);
QTAILQ_FOREACH(listener, &memory_listeners, link) {
assert(listener->address_space_filter != as);
}
flatview_unref(as->current_map);
g_free(as->name);
g_free(as->ioe... | {
"code": [],
"line_no": []
} | static void FUNC_0(AddressSpace *VAR_0)
{
MemoryListener *listener;
address_space_destroy_dispatch(VAR_0);
QTAILQ_FOREACH(listener, &memory_listeners, link) {
assert(listener->address_space_filter != VAR_0);
}
flatview_unref(VAR_0->current_map);
g_free(VAR_0->name);
g_free(VAR_0->ioe... | [
"static void FUNC_0(AddressSpace *VAR_0)\n{",
"MemoryListener *listener;",
"address_space_destroy_dispatch(VAR_0);",
"QTAILQ_FOREACH(listener, &memory_listeners, link) {",
"assert(listener->address_space_filter != VAR_0);",
"}",
"flatview_unref(VAR_0->current_map);",
"g_free(VAR_0->name);",
"g_free(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
]
] |
2,497 | static int tm2_read_stream(TM2Context *ctx, const uint8_t *buf, int stream_id) {
int i;
int cur = 0;
int skip = 0;
int len, toks;
TM2Codes codes;
/* get stream length in dwords */
len = AV_RB32(buf); buf += 4; cur += 4;
skip = len * 4 + 4;
if(len == 0)
return 4;... | true | FFmpeg | b89f4fb1908f26d2704b9496952131fffd4dafae | static int tm2_read_stream(TM2Context *ctx, const uint8_t *buf, int stream_id) {
int i;
int cur = 0;
int skip = 0;
int len, toks;
TM2Codes codes;
len = AV_RB32(buf); buf += 4; cur += 4;
skip = len * 4 + 4;
if(len == 0)
return 4;
toks = AV_RB32(buf); buf ... | {
"code": [
"static int tm2_read_stream(TM2Context *ctx, const uint8_t *buf, int stream_id) {",
" for(i = 0; i < toks; i++)"
],
"line_no": [
1,
107
]
} | static int FUNC_0(TM2Context *VAR_0, const uint8_t *VAR_1, int VAR_2) {
int VAR_3;
int VAR_4 = 0;
int VAR_5 = 0;
int VAR_6, VAR_7;
TM2Codes codes;
VAR_6 = AV_RB32(VAR_1); VAR_1 += 4; VAR_4 += 4;
VAR_5 = VAR_6 * 4 + 4;
if(VAR_6 == 0)
return 4;
VAR_7 = AV_... | [
"static int FUNC_0(TM2Context *VAR_0, const uint8_t *VAR_1, int VAR_2) {",
"int VAR_3;",
"int VAR_4 = 0;",
"int VAR_5 = 0;",
"int VAR_6, VAR_7;",
"TM2Codes codes;",
"VAR_6 = AV_RB32(VAR_1); VAR_1 += 4; VAR_4 += 4;",
"VAR_5 = VAR_6 * 4 + 4;",
"if(VAR_6 == 0)\nreturn 4;",
"VAR_7 = AV_RB32(VAR_1); VA... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
23,
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[... |
2,498 | static void do_dma_memory_set(dma_addr_t addr, uint8_t c, dma_addr_t len)
{
#define FILLBUF_SIZE 512
uint8_t fillbuf[FILLBUF_SIZE];
int l;
memset(fillbuf, c, FILLBUF_SIZE);
while (len > 0) {
l = len < FILLBUF_SIZE ? len : FILLBUF_SIZE;
cpu_physical_memory_rw(addr, fillbuf, l, t... | true | qemu | bc9b78debf63c9be051abe51403736d386092d09 | static void do_dma_memory_set(dma_addr_t addr, uint8_t c, dma_addr_t len)
{
#define FILLBUF_SIZE 512
uint8_t fillbuf[FILLBUF_SIZE];
int l;
memset(fillbuf, c, FILLBUF_SIZE);
while (len > 0) {
l = len < FILLBUF_SIZE ? len : FILLBUF_SIZE;
cpu_physical_memory_rw(addr, fillbuf, l, t... | {
"code": [
" len -= len;",
" addr += len;"
],
"line_no": [
21,
23
]
} | static void FUNC_0(dma_addr_t VAR_0, uint8_t VAR_1, dma_addr_t VAR_2)
{
#define FILLBUF_SIZE 512
uint8_t fillbuf[FILLBUF_SIZE];
int VAR_3;
memset(fillbuf, VAR_1, FILLBUF_SIZE);
while (VAR_2 > 0) {
VAR_3 = VAR_2 < FILLBUF_SIZE ? VAR_2 : FILLBUF_SIZE;
cpu_physical_memory_rw(VAR_0... | [
"static void FUNC_0(dma_addr_t VAR_0, uint8_t VAR_1, dma_addr_t VAR_2)\n{",
"#define FILLBUF_SIZE 512\nuint8_t fillbuf[FILLBUF_SIZE];",
"int VAR_3;",
"memset(fillbuf, VAR_1, FILLBUF_SIZE);",
"while (VAR_2 > 0) {",
"VAR_3 = VAR_2 < FILLBUF_SIZE ? VAR_2 : FILLBUF_SIZE;",
"cpu_physical_memory_rw(VAR_0, fil... | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
2,499 | static void mm_rearm_timer(struct qemu_alarm_timer *t, int64_t delta)
{
int nearest_delta_ms = (delta + 999999) / 1000000;
if (nearest_delta_ms < 1) {
nearest_delta_ms = 1;
}
timeKillEvent(mm_timer);
mm_timer = timeSetEvent(nearest_delta_ms,
mm_period,
... | true | qemu | 5bfb723f07fde2caafa90cb40c102a4e36dfea9e | static void mm_rearm_timer(struct qemu_alarm_timer *t, int64_t delta)
{
int nearest_delta_ms = (delta + 999999) / 1000000;
if (nearest_delta_ms < 1) {
nearest_delta_ms = 1;
}
timeKillEvent(mm_timer);
mm_timer = timeSetEvent(nearest_delta_ms,
mm_period,
... | {
"code": [
" int nearest_delta_ms = (delta + 999999) / 1000000;",
" mm_timer = timeSetEvent(nearest_delta_ms,"
],
"line_no": [
5,
17
]
} | static void FUNC_0(struct qemu_alarm_timer *VAR_0, int64_t VAR_1)
{
int VAR_2 = (VAR_1 + 999999) / 1000000;
if (VAR_2 < 1) {
VAR_2 = 1;
}
timeKillEvent(mm_timer);
mm_timer = timeSetEvent(VAR_2,
mm_period,
mm_alarm_handler,
... | [
"static void FUNC_0(struct qemu_alarm_timer *VAR_0, int64_t VAR_1)\n{",
"int VAR_2 = (VAR_1 + 999999) / 1000000;",
"if (VAR_2 < 1) {",
"VAR_2 = 1;",
"}",
"timeKillEvent(mm_timer);",
"mm_timer = timeSetEvent(VAR_2,\nmm_period,\nmm_alarm_handler,\n(DWORD_PTR)VAR_0,\nTIME_ONESHOT | TIME_CALLBACK_FUNCTION);... | [
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19,
21,
23,
25
],
[
29
],
[
31,
33
],
[
37
],
[
39
],
[
41
],
[
43
]
] |
2,500 | static void DEF(avg, pixels16_x2)(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
{
MOVQ_BFE(mm6);
JUMPALIGN();
do {
__asm__ volatile(
"movq %1, %%mm0 \n\t"
"movq 1%1, %%mm1 \n\t"
"movq %0, %%mm3 \n\t"
... | false | FFmpeg | 7292b0477ac8a864af9bf97b63362c40062ab805 | static void DEF(avg, pixels16_x2)(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
{
MOVQ_BFE(mm6);
JUMPALIGN();
do {
__asm__ volatile(
"movq %1, %%mm0 \n\t"
"movq 1%1, %%mm1 \n\t"
"movq %0, %%mm3 \n\t"
... | {
"code": [],
"line_no": []
} | static void FUNC_0(avg, pixels16_x2)(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
{
MOVQ_BFE(mm6);
JUMPALIGN();
do {
__asm__ volatile(
"movq %1, %%mm0 \n\t"
"movq 1%1, %%mm1 \n\t"
"movq %0, %%mm3 \n\... | [
"static void FUNC_0(avg, pixels16_x2)(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)\n{",
"MOVQ_BFE(mm6);",
"JUMPALIGN();",
"do {",
"__asm__ volatile(\n\"movq %1, %%mm0 \\n\\t\"\n\"movq 1%1, %%mm1 \\n\\t\"\n\"movq %0, %%mm3 \\n\\t\"\nPAVGB(%%mm0, %%mm1,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13,
15,
17,
19,
21,
23,
25,
27,
29,
31,
33,
35,
37,
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
]
] |
2,501 | static int config_output(AVFilterLink *outlink) {
static const char hdcd_baduse[] =
"The HDCD filter is unlikely to produce a desirable result in this context.";
AVFilterContext *ctx = outlink->src;
HDCDContext *s = ctx->priv;
AVFilterLink *lk = outlink;
while(lk != NULL) {
AV... | false | FFmpeg | 2c3d93648768cf2c00ea1731e096f698c0fae7f6 | static int config_output(AVFilterLink *outlink) {
static const char hdcd_baduse[] =
"The HDCD filter is unlikely to produce a desirable result in this context.";
AVFilterContext *ctx = outlink->src;
HDCDContext *s = ctx->priv;
AVFilterLink *lk = outlink;
while(lk != NULL) {
AV... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFilterLink *VAR_0) {
static const char VAR_1[] =
"The HDCD filter is unlikely to produce a desirable result in this context.";
AVFilterContext *ctx = VAR_0->src;
HDCDContext *s = ctx->priv;
AVFilterLink *lk = VAR_0;
while(lk != NULL) {
AVFilterContext *next... | [
"static int FUNC_0(AVFilterLink *VAR_0) {",
"static const char VAR_1[] =\n\"The HDCD filter is unlikely to produce a desirable result in this context.\";",
"AVFilterContext *ctx = VAR_0->src;",
"HDCDContext *s = ctx->priv;",
"AVFilterLink *lk = VAR_0;",
"while(lk != NULL) {",
"AVFilterContext *nextf = 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,
23,
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45
... |
2,504 | static inline int copy_siginfo_to_user(target_siginfo_t *tinfo,
const target_siginfo_t *info)
{
tswap_siginfo(tinfo, info);
return 0;
}
| false | qemu | b0fd8d18683f0d77a8e6b482771ebea82234d727 | static inline int copy_siginfo_to_user(target_siginfo_t *tinfo,
const target_siginfo_t *info)
{
tswap_siginfo(tinfo, info);
return 0;
}
| {
"code": [],
"line_no": []
} | static inline int FUNC_0(target_siginfo_t *VAR_0,
const target_siginfo_t *VAR_1)
{
tswap_siginfo(VAR_0, VAR_1);
return 0;
}
| [
"static inline int FUNC_0(target_siginfo_t *VAR_0,\nconst target_siginfo_t *VAR_1)\n{",
"tswap_siginfo(VAR_0, VAR_1);",
"return 0;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
]
] |
2,505 | iscsi_aio_writev(BlockDriverState *bs, int64_t sector_num,
QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb,
void *opaque)
{
IscsiLun *iscsilun = bs->opaque;
struct iscsi_context *iscsi = iscsilun->iscsi;
IscsiAIOCB *acb;
size_t... | false | qemu | 1dde716ed6719c341c1bfa427781f0715af90cbc | iscsi_aio_writev(BlockDriverState *bs, int64_t sector_num,
QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb,
void *opaque)
{
IscsiLun *iscsilun = bs->opaque;
struct iscsi_context *iscsi = iscsilun->iscsi;
IscsiAIOCB *acb;
size_t... | {
"code": [],
"line_no": []
} | FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,
QEMUIOVector *VAR_2, int VAR_3,
BlockDriverCompletionFunc *VAR_4,
void *VAR_5)
{
IscsiLun *iscsilun = VAR_0->VAR_5;
struct iscsi_context *VAR_6 = iscsilun->VAR_6;
IscsiAIOCB *acb;
size_t size;
... | [
"FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,\nQEMUIOVector *VAR_2, int VAR_3,\nBlockDriverCompletionFunc *VAR_4,\nvoid *VAR_5)\n{",
"IscsiLun *iscsilun = VAR_0->VAR_5;",
"struct iscsi_context *VAR_6 = iscsilun->VAR_6;",
"IscsiAIOCB *acb;",
"size_t size;",
"uint32_t num_sectors;",
"uint64_t lba;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
2,506 | static void mtree_print_flatview(fprintf_function p, void *f,
AddressSpace *as)
{
FlatView *view = address_space_get_flatview(as);
FlatRange *range = &view->ranges[0];
MemoryRegion *mr;
int n = view->nr;
if (n <= 0) {
p(f, MTREE_INDENT "No rendered ... | false | qemu | 377a07aa0d1617736289bfa9a9cbdc73de4e6542 | static void mtree_print_flatview(fprintf_function p, void *f,
AddressSpace *as)
{
FlatView *view = address_space_get_flatview(as);
FlatRange *range = &view->ranges[0];
MemoryRegion *mr;
int n = view->nr;
if (n <= 0) {
p(f, MTREE_INDENT "No rendered ... | {
"code": [],
"line_no": []
} | static void FUNC_0(fprintf_function VAR_0, void *VAR_1,
AddressSpace *VAR_2)
{
FlatView *view = address_space_get_flatview(VAR_2);
FlatRange *range = &view->ranges[0];
MemoryRegion *mr;
int VAR_3 = view->nr;
if (VAR_3 <= 0) {
VAR_0(VAR_1, MTREE_INDE... | [
"static void FUNC_0(fprintf_function VAR_0, void *VAR_1,\nAddressSpace *VAR_2)\n{",
"FlatView *view = address_space_get_flatview(VAR_2);",
"FlatRange *range = &view->ranges[0];",
"MemoryRegion *mr;",
"int VAR_3 = view->nr;",
"if (VAR_3 <= 0) {",
"VAR_0(VAR_1, MTREE_INDENT \"No rendered FlatView for \"\n... | [
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
],
[
31
],
[
33
],
[
35,
37,
39,
41,
43,
45,
47
],
[
49
],
[
51
],
[
55
... |
2,509 | static inline uint32_t efsctuf(uint32_t val)
{
CPU_FloatU u;
float32 tmp;
u.l = val;
/* NaN are not treated the same way IEEE 754 does */
if (unlikely(float32_is_nan(u.f)))
return 0;
tmp = uint64_to_float32(1ULL << 32, &env->vec_status);
u.f = float32_mul(u.f, tmp, &env->v... | false | qemu | 185698715dfb18c82ad2a5dbc169908602d43e81 | static inline uint32_t efsctuf(uint32_t val)
{
CPU_FloatU u;
float32 tmp;
u.l = val;
if (unlikely(float32_is_nan(u.f)))
return 0;
tmp = uint64_to_float32(1ULL << 32, &env->vec_status);
u.f = float32_mul(u.f, tmp, &env->vec_status);
return float32_to_uint32(u.f, &en... | {
"code": [],
"line_no": []
} | static inline uint32_t FUNC_0(uint32_t val)
{
CPU_FloatU u;
float32 tmp;
u.l = val;
if (unlikely(float32_is_nan(u.f)))
return 0;
tmp = uint64_to_float32(1ULL << 32, &env->vec_status);
u.f = float32_mul(u.f, tmp, &env->vec_status);
return float32_to_uint32(u.f, &env... | [
"static inline uint32_t FUNC_0(uint32_t val)\n{",
"CPU_FloatU u;",
"float32 tmp;",
"u.l = val;",
"if (unlikely(float32_is_nan(u.f)))\nreturn 0;",
"tmp = uint64_to_float32(1ULL << 32, &env->vec_status);",
"u.f = float32_mul(u.f, tmp, &env->vec_status);",
"return float32_to_uint32(u.f, &env->vec_status)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15,
17
],
[
19
],
[
21
],
[
25
],
[
27
]
] |
2,510 | void ppce500_init(PPCE500Params *params)
{
MemoryRegion *address_space_mem = get_system_memory();
MemoryRegion *ram = g_new(MemoryRegion, 1);
PCIBus *pci_bus;
CPUPPCState *env = NULL;
uint64_t elf_entry;
uint64_t elf_lowaddr;
hwaddr entry=0;
hwaddr loadaddr=UIMAGE_LOAD_BASE;
... | false | qemu | 5bac0701113f4de4fee053a3939b0f569a04b88c | void ppce500_init(PPCE500Params *params)
{
MemoryRegion *address_space_mem = get_system_memory();
MemoryRegion *ram = g_new(MemoryRegion, 1);
PCIBus *pci_bus;
CPUPPCState *env = NULL;
uint64_t elf_entry;
uint64_t elf_lowaddr;
hwaddr entry=0;
hwaddr loadaddr=UIMAGE_LOAD_BASE;
... | {
"code": [],
"line_no": []
} | void FUNC_0(PPCE500Params *VAR_0)
{
MemoryRegion *address_space_mem = get_system_memory();
MemoryRegion *ram = g_new(MemoryRegion, 1);
PCIBus *pci_bus;
CPUPPCState *env = NULL;
uint64_t elf_entry;
uint64_t elf_lowaddr;
hwaddr entry=0;
hwaddr loadaddr=UIMAGE_LOAD_BASE;
targe... | [
"void FUNC_0(PPCE500Params *VAR_0)\n{",
"MemoryRegion *address_space_mem = get_system_memory();",
"MemoryRegion *ram = g_new(MemoryRegion, 1);",
"PCIBus *pci_bus;",
"CPUPPCState *env = NULL;",
"uint64_t elf_entry;",
"uint64_t elf_lowaddr;",
"hwaddr entry=0;",
"hwaddr loadaddr=UIMAGE_LOAD_BASE;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
... |
2,511 | int nbd_trip(BlockDriverState *bs, int csock, off_t size,
uint64_t dev_offset, uint32_t nbdflags,
uint8_t *data)
{
struct nbd_request request;
struct nbd_reply reply;
int ret;
TRACE("Reading request.");
if (nbd_receive_request(csock, &request) == -1)
re... | false | qemu | a478f6e595dab1801931d56d097623d65f5b6d1d | int nbd_trip(BlockDriverState *bs, int csock, off_t size,
uint64_t dev_offset, uint32_t nbdflags,
uint8_t *data)
{
struct nbd_request request;
struct nbd_reply reply;
int ret;
TRACE("Reading request.");
if (nbd_receive_request(csock, &request) == -1)
re... | {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState *VAR_0, int VAR_1, off_t VAR_2,
uint64_t VAR_3, uint32_t VAR_4,
uint8_t *VAR_5)
{
struct nbd_request VAR_6;
struct nbd_reply VAR_7;
int VAR_8;
TRACE("Reading VAR_6.");
if (nbd_receive_request(VAR_1, &VAR_6) == -1)
return -1;
... | [
"int FUNC_0(BlockDriverState *VAR_0, int VAR_1, off_t VAR_2,\nuint64_t VAR_3, uint32_t VAR_4,\nuint8_t *VAR_5)\n{",
"struct nbd_request VAR_6;",
"struct nbd_reply VAR_7;",
"int VAR_8;",
"TRACE(\"Reading VAR_6.\");",
"if (nbd_receive_request(VAR_1, &VAR_6) == -1)\nreturn -1;",
"if (VAR_6.len + NBD_REPLY_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21,
23
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[... |
2,512 | test_opts_range_unvisited(void)
{
intList *list = NULL;
intList *tail;
QemuOpts *opts;
Visitor *v;
opts = qemu_opts_parse(qemu_find_opts("userdef"), "ilist=0-2", false,
&error_abort);
v = opts_visitor_new(opts);
visit_start_struct(v, NULL, NULL, 0, &... | false | qemu | a4a1c70dc759e5b81627e96564f344ab43ea86eb | test_opts_range_unvisited(void)
{
intList *list = NULL;
intList *tail;
QemuOpts *opts;
Visitor *v;
opts = qemu_opts_parse(qemu_find_opts("userdef"), "ilist=0-2", false,
&error_abort);
v = opts_visitor_new(opts);
visit_start_struct(v, NULL, NULL, 0, &... | {
"code": [],
"line_no": []
} | FUNC_0(void)
{
intList *list = NULL;
intList *tail;
QemuOpts *opts;
Visitor *v;
opts = qemu_opts_parse(qemu_find_opts("userdef"), "ilist=0-2", false,
&error_abort);
v = opts_visitor_new(opts);
visit_start_struct(v, NULL, NULL, 0, &error_abort);
... | [
"FUNC_0(void)\n{",
"intList *list = NULL;",
"intList *tail;",
"QemuOpts *opts;",
"Visitor *v;",
"opts = qemu_opts_parse(qemu_find_opts(\"userdef\"), \"ilist=0-2\", false,\n&error_abort);",
"v = opts_visitor_new(opts);",
"visit_start_struct(v, NULL, NULL, 0, &error_abort);",
"visit_start_list(v, \"il... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
21
],
[
25
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
... |
2,513 | static int mpeg_decode_mb(MpegEncContext *s,
DCTELEM block[12][64])
{
int i, j, k, cbp, val, mb_type, motion_type;
dprintf("decode_mb: x=%d y=%d\n", s->mb_x, s->mb_y);
assert(s->mb_skiped==0);
if (s->mb_skip_run-- != 0) {
if(s->pict_type == I_TYPE){
... | false | FFmpeg | 461cd5bfb5c38e48a81b4a9a5912dfd65da1ba3d | static int mpeg_decode_mb(MpegEncContext *s,
DCTELEM block[12][64])
{
int i, j, k, cbp, val, mb_type, motion_type;
dprintf("decode_mb: x=%d y=%d\n", s->mb_x, s->mb_y);
assert(s->mb_skiped==0);
if (s->mb_skip_run-- != 0) {
if(s->pict_type == I_TYPE){
... | {
"code": [],
"line_no": []
} | static int FUNC_0(MpegEncContext *VAR_0,
DCTELEM VAR_1[12][64])
{
int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;
dprintf("decode_mb: x=%d y=%d\n", VAR_0->mb_x, VAR_0->mb_y);
assert(VAR_0->mb_skiped==0);
if (VAR_0->mb_skip_run-- != 0) {
if(VAR_0->p... | [
"static int FUNC_0(MpegEncContext *VAR_0,\nDCTELEM VAR_1[12][64])\n{",
"int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;",
"dprintf(\"decode_mb: x=%d y=%d\\n\", VAR_0->mb_x, VAR_0->mb_y);",
"assert(VAR_0->mb_skiped==0);",
"if (VAR_0->mb_skip_run-- != 0) {",
"if(VAR_0->pict_type == I_TYPE){",
"av_log... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43,
45
],
[
47
],
[
51
],
[
53
],
[
55
],
... |
2,514 | static av_cold int rv10_decode_init(AVCodecContext *avctx)
{
RVDecContext *rv = avctx->priv_data;
MpegEncContext *s = &rv->m;
static int done=0;
int major_ver, minor_ver, micro_ver;
if (avctx->extradata_size < 8) {
av_log(avctx, AV_LOG_ERROR, "Extradata is too small.\n");
... | false | FFmpeg | 350128b28fe181087178d128eed84fa269589ffd | static av_cold int rv10_decode_init(AVCodecContext *avctx)
{
RVDecContext *rv = avctx->priv_data;
MpegEncContext *s = &rv->m;
static int done=0;
int major_ver, minor_ver, micro_ver;
if (avctx->extradata_size < 8) {
av_log(avctx, AV_LOG_ERROR, "Extradata is too small.\n");
... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
RVDecContext *rv = avctx->priv_data;
MpegEncContext *s = &rv->m;
static int VAR_0=0;
int VAR_1, VAR_2, VAR_3;
if (avctx->extradata_size < 8) {
av_log(avctx, AV_LOG_ERROR, "Extradata is too small.\n");
return -1;
}
... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"RVDecContext *rv = avctx->priv_data;",
"MpegEncContext *s = &rv->m;",
"static int VAR_0=0;",
"int VAR_1, VAR_2, VAR_3;",
"if (avctx->extradata_size < 8) {",
"av_log(avctx, AV_LOG_ERROR, \"Extradata is too small.\\n\");",
"return -1;",
"}",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49
],
[
51
],
[
53
... |
2,515 | static inline float32 ucf64_itos(uint32_t i)
{
union {
uint32_t i;
float32 s;
} v;
v.i = i;
return v.s;
}
| false | qemu | e8ede0a8bb5298a6979bcf7ed84ef64a64a4e3fe | static inline float32 ucf64_itos(uint32_t i)
{
union {
uint32_t i;
float32 s;
} v;
v.i = i;
return v.s;
}
| {
"code": [],
"line_no": []
} | static inline float32 FUNC_0(uint32_t i)
{
union {
uint32_t i;
float32 s;
} VAR_0;
VAR_0.i = i;
return VAR_0.s;
}
| [
"static inline float32 FUNC_0(uint32_t i)\n{",
"union {",
"uint32_t i;",
"float32 s;",
"} VAR_0;",
"VAR_0.i = i;",
"return VAR_0.s;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
]
] |
2,516 | static int get_whole_cluster(BlockDriverState *bs,
VmdkExtent *extent,
uint64_t cluster_offset,
uint64_t offset,
bool allocate)
{
/* 128 sectors * 512 bytes each = grain size 64KB */
uint8_t whole_grain[extent->cluster_sectors * 512];
... | false | qemu | ae261c86aaed62e7acddafab8262a2bf286d40b7 | static int get_whole_cluster(BlockDriverState *bs,
VmdkExtent *extent,
uint64_t cluster_offset,
uint64_t offset,
bool allocate)
{
uint8_t whole_grain[extent->cluster_sectors * 512];
if (bs->backing_hd) {
int ret;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0,
VmdkExtent *VAR_1,
uint64_t VAR_2,
uint64_t VAR_3,
bool VAR_4)
{
uint8_t whole_grain[VAR_1->cluster_sectors * 512];
if (VAR_0->backing_hd) {
int VAR_5;
if (!vmdk... | [
"static int FUNC_0(BlockDriverState *VAR_0,\nVmdkExtent *VAR_1,\nuint64_t VAR_2,\nuint64_t VAR_3,\nbool VAR_4)\n{",
"uint8_t whole_grain[VAR_1->cluster_sectors * 512];",
"if (VAR_0->backing_hd) {",
"int VAR_5;",
"if (!vmdk_is_cid_valid(VAR_0))\nreturn -1;",
"VAR_3 -= VAR_3 % (VAR_1->cluster_sectors * 512... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
15
],
[
23
],
[
25
],
[
29,
31
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
53,
55
],
[
57
],
[
59
],
[
61
],
[
63
],
[
65
],
[... |
2,517 | static void virtio_pci_reset(DeviceState *qdev)
{
VirtIOPCIProxy *proxy = VIRTIO_PCI(qdev);
VirtioBusState *bus = VIRTIO_BUS(&proxy->bus);
virtio_pci_stop_ioeventfd(proxy);
virtio_bus_reset(bus);
msix_unuse_all_vectors(&proxy->pci_dev);
proxy->flags &= ~VIRTIO_PCI_FLAG_BUS_MASTER_BUG;
}
| false | qemu | 4d43d3f3c8147ade184df9a1e9e82826edd39e19 | static void virtio_pci_reset(DeviceState *qdev)
{
VirtIOPCIProxy *proxy = VIRTIO_PCI(qdev);
VirtioBusState *bus = VIRTIO_BUS(&proxy->bus);
virtio_pci_stop_ioeventfd(proxy);
virtio_bus_reset(bus);
msix_unuse_all_vectors(&proxy->pci_dev);
proxy->flags &= ~VIRTIO_PCI_FLAG_BUS_MASTER_BUG;
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(DeviceState *VAR_0)
{
VirtIOPCIProxy *proxy = VIRTIO_PCI(VAR_0);
VirtioBusState *bus = VIRTIO_BUS(&proxy->bus);
virtio_pci_stop_ioeventfd(proxy);
virtio_bus_reset(bus);
msix_unuse_all_vectors(&proxy->pci_dev);
proxy->flags &= ~VIRTIO_PCI_FLAG_BUS_MASTER_BUG;
}
| [
"static void FUNC_0(DeviceState *VAR_0)\n{",
"VirtIOPCIProxy *proxy = VIRTIO_PCI(VAR_0);",
"VirtioBusState *bus = VIRTIO_BUS(&proxy->bus);",
"virtio_pci_stop_ioeventfd(proxy);",
"virtio_bus_reset(bus);",
"msix_unuse_all_vectors(&proxy->pci_dev);",
"proxy->flags &= ~VIRTIO_PCI_FLAG_BUS_MASTER_BUG;",
"}... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
2,518 | void nbd_client_session_attach_aio_context(NbdClientSession *client,
AioContext *new_context)
{
aio_set_fd_handler(new_context, client->sock,
nbd_reply_ready, NULL, client);
}
| false | qemu | f53a829bb9ef14be800556cbc02d8b20fc1050a7 | void nbd_client_session_attach_aio_context(NbdClientSession *client,
AioContext *new_context)
{
aio_set_fd_handler(new_context, client->sock,
nbd_reply_ready, NULL, client);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(NbdClientSession *VAR_0,
AioContext *VAR_1)
{
aio_set_fd_handler(VAR_1, VAR_0->sock,
nbd_reply_ready, NULL, VAR_0);
}
| [
"void FUNC_0(NbdClientSession *VAR_0,\nAioContext *VAR_1)\n{",
"aio_set_fd_handler(VAR_1, VAR_0->sock,\nnbd_reply_ready, NULL, VAR_0);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7,
9
],
[
11
]
] |
2,519 | int ram_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque)
{
ram_addr_t addr;
uint64_t bytes_transferred_last;
double bwidth = 0;
uint64_t expected_time = 0;
if (stage < 0) {
cpu_physical_memory_set_dirty_tracking(0);
return 0;
}
if (cpu_physical_sync... | false | qemu | 2975725f6b3d634dbe924ea9d9f4d86b8a5b217d | int ram_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque)
{
ram_addr_t addr;
uint64_t bytes_transferred_last;
double bwidth = 0;
uint64_t expected_time = 0;
if (stage < 0) {
cpu_physical_memory_set_dirty_tracking(0);
return 0;
}
if (cpu_physical_sync... | {
"code": [],
"line_no": []
} | int FUNC_0(Monitor *VAR_0, QEMUFile *VAR_1, int VAR_2, void *VAR_3)
{
ram_addr_t addr;
uint64_t bytes_transferred_last;
double VAR_4 = 0;
uint64_t expected_time = 0;
if (VAR_2 < 0) {
cpu_physical_memory_set_dirty_tracking(0);
return 0;
}
if (cpu_physical_sync_di... | [
"int FUNC_0(Monitor *VAR_0, QEMUFile *VAR_1, int VAR_2, void *VAR_3)\n{",
"ram_addr_t addr;",
"uint64_t bytes_transferred_last;",
"double VAR_4 = 0;",
"uint64_t expected_time = 0;",
"if (VAR_2 < 0) {",
"cpu_physical_memory_set_dirty_tracking(0);",
"return 0;",
"}",
"if (cpu_physical_sync_dirty_bit... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
51
... |
2,520 | static void test_submit(void)
{
WorkerTestData data = { .n = 0 };
thread_pool_submit(worker_cb, &data);
qemu_aio_flush();
g_assert_cmpint(data.n, ==, 1);
}
| false | qemu | 8a805c222caa0e20bf11d2267f726d0bb5917d94 | static void test_submit(void)
{
WorkerTestData data = { .n = 0 };
thread_pool_submit(worker_cb, &data);
qemu_aio_flush();
g_assert_cmpint(data.n, ==, 1);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
WorkerTestData data = { .n = 0 };
thread_pool_submit(worker_cb, &data);
qemu_aio_flush();
g_assert_cmpint(data.n, ==, 1);
}
| [
"static void FUNC_0(void)\n{",
"WorkerTestData data = { .n = 0 };",
"thread_pool_submit(worker_cb, &data);",
"qemu_aio_flush();",
"g_assert_cmpint(data.n, ==, 1);",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
2,522 | int bdrv_commit(BlockDriverState *bs)
{
BlockDriver *drv = bs->drv;
int64_t sector, total_sectors, length, backing_length;
int n, ro, open_flags;
int ret = 0;
uint8_t *buf = NULL;
char filename[PATH_MAX];
if (!drv)
return -ENOMEDIUM;
if (!bs->backing_hd) {
... | false | qemu | 3718d8ab65f68de2acccbe6a315907805f54e3cc | int bdrv_commit(BlockDriverState *bs)
{
BlockDriver *drv = bs->drv;
int64_t sector, total_sectors, length, backing_length;
int n, ro, open_flags;
int ret = 0;
uint8_t *buf = NULL;
char filename[PATH_MAX];
if (!drv)
return -ENOMEDIUM;
if (!bs->backing_hd) {
... | {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState *VAR_0)
{
BlockDriver *drv = VAR_0->drv;
int64_t sector, total_sectors, length, backing_length;
int VAR_1, VAR_2, VAR_3;
int VAR_4 = 0;
uint8_t *buf = NULL;
char VAR_5[PATH_MAX];
if (!drv)
return -ENOMEDIUM;
if (!VAR_0->backing_hd) {
... | [
"int FUNC_0(BlockDriverState *VAR_0)\n{",
"BlockDriver *drv = VAR_0->drv;",
"int64_t sector, total_sectors, length, backing_length;",
"int VAR_1, VAR_2, VAR_3;",
"int VAR_4 = 0;",
"uint8_t *buf = NULL;",
"char VAR_5[PATH_MAX];",
"if (!drv)\nreturn -ENOMEDIUM;",
"if (!VAR_0->backing_hd) {",
"return... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
47
],
[
51
],
[
53
],
[... |
2,524 | static inline uint32_t search_chunk(BDRVDMGState* s,int sector_num)
{
/* binary search */
uint32_t chunk1=0,chunk2=s->n_chunks,chunk3;
while(chunk1!=chunk2) {
chunk3 = (chunk1+chunk2)/2;
if(s->sectors[chunk3]>sector_num)
chunk2 = chunk3;
else if(s->sectors[chunk3]+s->sectorcounts[chunk3]>sec... | false | qemu | 2c1885adcf0312da80c7317b09f9adad97fa0fc6 | static inline uint32_t search_chunk(BDRVDMGState* s,int sector_num)
{
uint32_t chunk1=0,chunk2=s->n_chunks,chunk3;
while(chunk1!=chunk2) {
chunk3 = (chunk1+chunk2)/2;
if(s->sectors[chunk3]>sector_num)
chunk2 = chunk3;
else if(s->sectors[chunk3]+s->sectorcounts[chunk3]>sector_num)
retu... | {
"code": [],
"line_no": []
} | static inline uint32_t FUNC_0(BDRVDMGState* s,int sector_num)
{
uint32_t chunk1=0,chunk2=s->n_chunks,chunk3;
while(chunk1!=chunk2) {
chunk3 = (chunk1+chunk2)/2;
if(s->sectors[chunk3]>sector_num)
chunk2 = chunk3;
else if(s->sectors[chunk3]+s->sectorcounts[chunk3]>sector_num)
return chu... | [
"static inline uint32_t FUNC_0(BDRVDMGState* s,int sector_num)\n{",
"uint32_t chunk1=0,chunk2=s->n_chunks,chunk3;",
"while(chunk1!=chunk2) {",
"chunk3 = (chunk1+chunk2)/2;",
"if(s->sectors[chunk3]>sector_num)\nchunk2 = chunk3;",
"else if(s->sectors[chunk3]+s->sectorcounts[chunk3]>sector_num)\nreturn chunk... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
11
],
[
13,
15
],
[
17,
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
]
] |
2,525 | static inline void RENAME(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint8_t *s = src;
const uint8_t *end;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*src):"memory");
_... | true | FFmpeg | 6e42e6c4b410dbef8b593c2d796a5dad95f89ee4 | static inline void RENAME(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint8_t *s = src;
const uint8_t *end;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*src):"memory");
_... | {
"code": [
"\twhile(s < end)",
"\twhile(s < end)",
"\twhile(s < end)",
"\twhile(s < end)",
"#ifdef HAVE_MMX",
"#endif",
"#ifdef HAVE_MMX",
"#endif",
"#endif",
"#endif",
"\t__asm __volatile(",
"\t\t\"movq\t%%mm0, %%mm1\\n\\t\"",
"\t\tMOVNTQ\"\t%%mm0, %0\\n\\t\"",
... | static inline void FUNC_0(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint8_t *VAR_0 = src;
const uint8_t *VAR_1;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
uint16_t *d = (uint16_t *)dst;
VAR_1 = VAR_0 + src_size;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*src):"m... | [
"static inline void FUNC_0(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, long src_size)\n{",
"const uint8_t *VAR_0 = src;",
"const uint8_t *VAR_1;",
"#ifdef HAVE_MMX\nconst uint8_t *mm_end;",
"#endif\nuint16_t *d = (uint16_t *)dst;",
"VAR_1 = VAR_0 + src_size;",
"#ifdef HAVE_MMX\n__asm __volatile(PREF... | [
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13,
15
],
[
17
],
[
19,
21
],
[
23,
25,
27,
29
],
[
31
],
[
33,
35
],
[
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,... |
2,526 | static void conv411(uint8_t *dst, int dst_wrap,
uint8_t *src, int src_wrap,
int width, int height)
{
int w, c;
uint8_t *s1, *s2, *d;
for(;height > 0; height--) {
s1 = src;
s2 = src + src_wrap;
d = dst;
for(w = width;w > 0; w--) {
... | true | FFmpeg | 5064357588a187672ca64c169dc6e6e406777629 | static void conv411(uint8_t *dst, int dst_wrap,
uint8_t *src, int src_wrap,
int width, int height)
{
int w, c;
uint8_t *s1, *s2, *d;
for(;height > 0; height--) {
s1 = src;
s2 = src + src_wrap;
d = dst;
for(w = width;w > 0; w--) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t *VAR_0, int VAR_1,
uint8_t *VAR_2, int VAR_3,
int VAR_4, int VAR_5)
{
int VAR_6, VAR_7;
uint8_t *s1, *s2, *d;
for(;VAR_5 > 0; VAR_5--) {
s1 = VAR_2;
s2 = VAR_2 + VAR_3;
d = VAR_0;
for(VAR_6 = VAR_4;VAR_6 > 0;... | [
"static void FUNC_0(uint8_t *VAR_0, int VAR_1,\nuint8_t *VAR_2, int VAR_3,\nint VAR_4, int VAR_5)\n{",
"int VAR_6, VAR_7;",
"uint8_t *s1, *s2, *d;",
"for(;VAR_5 > 0; VAR_5--) {",
"s1 = VAR_2;",
"s2 = VAR_2 + VAR_3;",
"d = VAR_0;",
"for(VAR_6 = VAR_4;VAR_6 > 0; VAR_6--) {",
"VAR_7 = (s1[0] + s2[0]) >... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3,
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
]
... |
2,527 | static void *acpi_set_bsel(PCIBus *bus, void *opaque)
{
unsigned *bsel_alloc = opaque;
unsigned *bus_bsel;
if (qbus_is_hotpluggable(BUS(bus))) {
bus_bsel = g_malloc(sizeof *bus_bsel);
*bus_bsel = (*bsel_alloc)++;
object_property_add_uint32_ptr(OBJECT(bus), ACPI_PCIHP_PROP_... | true | qemu | f0c9d64a68b776374ec4732424a3e27753ce37b6 | static void *acpi_set_bsel(PCIBus *bus, void *opaque)
{
unsigned *bsel_alloc = opaque;
unsigned *bus_bsel;
if (qbus_is_hotpluggable(BUS(bus))) {
bus_bsel = g_malloc(sizeof *bus_bsel);
*bus_bsel = (*bsel_alloc)++;
object_property_add_uint32_ptr(OBJECT(bus), ACPI_PCIHP_PROP_... | {
"code": [
" bus_bsel, NULL);",
" bus_bsel, NULL);"
],
"line_no": [
21,
21
]
} | static void *FUNC_0(PCIBus *VAR_0, void *VAR_1)
{
unsigned *VAR_2 = VAR_1;
unsigned *VAR_3;
if (qbus_is_hotpluggable(BUS(VAR_0))) {
VAR_3 = g_malloc(sizeof *VAR_3);
*VAR_3 = (*VAR_2)++;
object_property_add_uint32_ptr(OBJECT(VAR_0), ACPI_PCIHP_PROP_BSEL,
... | [
"static void *FUNC_0(PCIBus *VAR_0, void *VAR_1)\n{",
"unsigned *VAR_2 = VAR_1;",
"unsigned *VAR_3;",
"if (qbus_is_hotpluggable(BUS(VAR_0))) {",
"VAR_3 = g_malloc(sizeof *VAR_3);",
"*VAR_3 = (*VAR_2)++;",
"object_property_add_uint32_ptr(OBJECT(VAR_0), ACPI_PCIHP_PROP_BSEL,\nVAR_3, NULL);",
"}",
"ret... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19,
21
],
[
23
],
[
27
],
[
29
]
] |
2,528 | static void vncws_send_handshake_response(VncState *vs, const char* key)
{
char combined_key[WS_CLIENT_KEY_LEN + WS_GUID_LEN + 1];
char hash[SHA1_DIGEST_LEN];
size_t hash_size = SHA1_DIGEST_LEN;
char *accept = NULL, *response = NULL;
gnutls_datum_t in;
g_strlcpy(combined_key, key, WS_CL... | true | qemu | cfba8e6f92d45a2374622c3dc57499e42a1c07e1 | static void vncws_send_handshake_response(VncState *vs, const char* key)
{
char combined_key[WS_CLIENT_KEY_LEN + WS_GUID_LEN + 1];
char hash[SHA1_DIGEST_LEN];
size_t hash_size = SHA1_DIGEST_LEN;
char *accept = NULL, *response = NULL;
gnutls_datum_t in;
g_strlcpy(combined_key, key, WS_CL... | {
"code": [
" char hash[SHA1_DIGEST_LEN];",
" size_t hash_size = SHA1_DIGEST_LEN;",
" if (gnutls_fingerprint(GNUTLS_DIG_SHA1, &in, hash, &hash_size)",
" == GNUTLS_E_SUCCESS) {",
" accept = g_base64_encode((guchar *)hash, SHA1_DIGEST_LEN);"
],
"line_no": [
7,
... | static void FUNC_0(VncState *VAR_0, const char* VAR_1)
{
char VAR_2[WS_CLIENT_KEY_LEN + WS_GUID_LEN + 1];
char VAR_3[SHA1_DIGEST_LEN];
size_t hash_size = SHA1_DIGEST_LEN;
char *VAR_4 = NULL, *VAR_5 = NULL;
gnutls_datum_t in;
g_strlcpy(VAR_2, VAR_1, WS_CLIENT_KEY_LEN + 1);
g_strlcat... | [
"static void FUNC_0(VncState *VAR_0, const char* VAR_1)\n{",
"char VAR_2[WS_CLIENT_KEY_LEN + WS_GUID_LEN + 1];",
"char VAR_3[SHA1_DIGEST_LEN];",
"size_t hash_size = SHA1_DIGEST_LEN;",
"char *VAR_4 = NULL, *VAR_5 = NULL;",
"gnutls_datum_t in;",
"g_strlcpy(VAR_2, VAR_1, WS_CLIENT_KEY_LEN + 1);",
"g_strl... | [
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[... |
2,530 | int ff_audio_mix_set_matrix(AudioMix *am, const double *matrix, int stride)
{
int i, o, i0, o0, ret;
char in_layout_name[128];
char out_layout_name[128];
if ( am->in_channels <= 0 || am->in_channels > AVRESAMPLE_MAX_CHANNELS ||
am->out_channels <= 0 || am->out_channels > AVRESAMPLE_MAX_... | true | FFmpeg | fc6a3ef40d34ce8443ae57c2452f3f273d7d4891 | int ff_audio_mix_set_matrix(AudioMix *am, const double *matrix, int stride)
{
int i, o, i0, o0, ret;
char in_layout_name[128];
char out_layout_name[128];
if ( am->in_channels <= 0 || am->in_channels > AVRESAMPLE_MAX_CHANNELS ||
am->out_channels <= 0 || am->out_channels > AVRESAMPLE_MAX_... | {
"code": [
" if (am->input_skip[i]) \\"
],
"line_no": [
73
]
} | int FUNC_0(AudioMix *VAR_0, const double *VAR_1, int VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;
char VAR_8[128];
char VAR_9[128];
if ( VAR_0->in_channels <= 0 || VAR_0->in_channels > AVRESAMPLE_MAX_CHANNELS ||
VAR_0->out_channels <= 0 || VAR_0->out_channels > AVRESAMPLE_MAX_CHANNEL... | [
"int FUNC_0(AudioMix *VAR_0, const double *VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;",
"char VAR_8[128];",
"char VAR_9[128];",
"if ( VAR_0->in_channels <= 0 || VAR_0->in_channels > AVRESAMPLE_MAX_CHANNELS ||\nVAR_0->out_channels <= 0 || VAR_0->out_channels > AVRESAMPLE_MAX_CHANNELS) {"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
41
],
[
45,
47,
49,
51
],
[
53,
55
],
[... |
2,531 | BlockBackend *blk_new_open(const char *filename, const char *reference,
QDict *options, int flags, Error **errp)
{
BlockBackend *blk;
BlockDriverState *bs;
uint64_t perm;
/* blk_new_open() is mainly used in .bdrv_create implementations and the
* tools where shari... | true | qemu | 50bfbe93b2ca0ab795f3de305bec5ab1df620be4 | BlockBackend *blk_new_open(const char *filename, const char *reference,
QDict *options, int flags, Error **errp)
{
BlockBackend *blk;
BlockDriverState *bs;
uint64_t perm;
perm = BLK_PERM_CONSISTENT_READ;
if (flags & BDRV_O_RDWR) {
perm... | {
"code": [
" perm, BLK_PERM_ALL, blk, &error_abort);"
],
"line_no": [
63
]
} | BlockBackend *FUNC_0(const char *filename, const char *reference,
QDict *options, int flags, Error **errp)
{
BlockBackend *blk;
BlockDriverState *bs;
uint64_t perm;
perm = BLK_PERM_CONSISTENT_READ;
if (flags & BDRV_O_RDWR) {
perm |= BL... | [
"BlockBackend *FUNC_0(const char *filename, const char *reference,\nQDict *options, int flags, Error **errp)\n{",
"BlockBackend *blk;",
"BlockDriverState *bs;",
"uint64_t perm;",
"perm = BLK_PERM_CONSISTENT_READ;",
"if (flags & BDRV_O_RDWR) {",
"perm |= BLK_PERM_WRITE;",
"}",
"if (flags & BDRV_O_RES... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
],
[
61,
63
],
[
67
... |
2,532 | static int pci_dec_21154_init_device(SysBusDevice *dev)
{
UNINState *s;
int pci_mem_config, pci_mem_data;
/* Uninorth bridge */
s = FROM_SYSBUS(UNINState, dev);
// XXX: s = &pci_bridge[2];
pci_mem_config = cpu_register_io_memory(pci_unin_config_read,
... | false | qemu | 4f5e19e6c570459cd524b29b24374f03860f5149 | static int pci_dec_21154_init_device(SysBusDevice *dev)
{
UNINState *s;
int pci_mem_config, pci_mem_data;
s = FROM_SYSBUS(UNINState, dev);
pci_mem_config = cpu_register_io_memory(pci_unin_config_read,
pci_unin_config_write, s);
pci_m... | {
"code": [],
"line_no": []
} | static int FUNC_0(SysBusDevice *VAR_0)
{
UNINState *s;
int VAR_1, VAR_2;
s = FROM_SYSBUS(UNINState, VAR_0);
VAR_1 = cpu_register_io_memory(pci_unin_config_read,
pci_unin_config_write, s);
VAR_2 = cpu_register_io_memory(pci_unin_main_... | [
"static int FUNC_0(SysBusDevice *VAR_0)\n{",
"UNINState *s;",
"int VAR_1, VAR_2;",
"s = FROM_SYSBUS(UNINState, VAR_0);",
"VAR_1 = cpu_register_io_memory(pci_unin_config_read,\npci_unin_config_write, s);",
"VAR_2 = cpu_register_io_memory(pci_unin_main_read,\npci_unin_main_write, &s->host_state);",
"sysbu... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
19,
21
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
]
] |
2,533 | static uint32_t rtas_set_isolation_state(uint32_t idx, uint32_t state)
{
sPAPRDRConnector *drc = spapr_drc_by_index(idx);
sPAPRDRConnectorClass *drck;
if (!drc) {
return RTAS_OUT_PARAM_ERROR;
}
drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);
return drck->set_isolation_state(drc, st... | false | qemu | 0dfabd39d523fc3f6f0f8c441f41c013cc429b52 | static uint32_t rtas_set_isolation_state(uint32_t idx, uint32_t state)
{
sPAPRDRConnector *drc = spapr_drc_by_index(idx);
sPAPRDRConnectorClass *drck;
if (!drc) {
return RTAS_OUT_PARAM_ERROR;
}
drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);
return drck->set_isolation_state(drc, st... | {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(uint32_t idx, uint32_t state)
{
sPAPRDRConnector *drc = spapr_drc_by_index(idx);
sPAPRDRConnectorClass *drck;
if (!drc) {
return RTAS_OUT_PARAM_ERROR;
}
drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);
return drck->set_isolation_state(drc, state);
}
| [
"static uint32_t FUNC_0(uint32_t idx, uint32_t state)\n{",
"sPAPRDRConnector *drc = spapr_drc_by_index(idx);",
"sPAPRDRConnectorClass *drck;",
"if (!drc) {",
"return RTAS_OUT_PARAM_ERROR;",
"}",
"drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);",
"return drck->set_isolation_state(drc, state);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
]
] |
2,536 | static int64_t nfs_get_allocated_file_size(BlockDriverState *bs)
{
NFSClient *client = bs->opaque;
NFSRPC task = {0};
struct stat st;
if (bdrv_is_read_only(bs) &&
!(bs->open_flags & BDRV_O_NOCACHE)) {
return client->st_blocks * 512;
}
task.st = &st;
if (nfs_fsta... | false | qemu | aa92d6c4609e174fc6884e4b7b87367fac33cbe9 | static int64_t nfs_get_allocated_file_size(BlockDriverState *bs)
{
NFSClient *client = bs->opaque;
NFSRPC task = {0};
struct stat st;
if (bdrv_is_read_only(bs) &&
!(bs->open_flags & BDRV_O_NOCACHE)) {
return client->st_blocks * 512;
}
task.st = &st;
if (nfs_fsta... | {
"code": [],
"line_no": []
} | static int64_t FUNC_0(BlockDriverState *bs)
{
NFSClient *client = bs->opaque;
NFSRPC task = {0};
struct stat VAR_0;
if (bdrv_is_read_only(bs) &&
!(bs->open_flags & BDRV_O_NOCACHE)) {
return client->st_blocks * 512;
}
task.VAR_0 = &VAR_0;
if (nfs_fstat_async(clie... | [
"static int64_t FUNC_0(BlockDriverState *bs)\n{",
"NFSClient *client = bs->opaque;",
"NFSRPC task = {0};",
"struct stat VAR_0;",
"if (bdrv_is_read_only(bs) &&\n!(bs->open_flags & BDRV_O_NOCACHE)) {",
"return client->st_blocks * 512;",
"}",
"task.VAR_0 = &VAR_0;",
"if (nfs_fstat_async(client->context... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
17
],
[
19
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
]
] |
2,537 | static CadenceTimerState *cadence_timer_from_addr(void *opaque,
target_phys_addr_t offset)
{
unsigned int index;
CadenceTTCState *s = (CadenceTTCState *)opaque;
index = (offset >> 2) % 3;
return &s->timer[index];
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static CadenceTimerState *cadence_timer_from_addr(void *opaque,
target_phys_addr_t offset)
{
unsigned int index;
CadenceTTCState *s = (CadenceTTCState *)opaque;
index = (offset >> 2) % 3;
return &s->timer[index];
}
| {
"code": [],
"line_no": []
} | static CadenceTimerState *FUNC_0(void *opaque,
target_phys_addr_t offset)
{
unsigned int VAR_0;
CadenceTTCState *s = (CadenceTTCState *)opaque;
VAR_0 = (offset >> 2) % 3;
return &s->timer[VAR_0];
}
| [
"static CadenceTimerState *FUNC_0(void *opaque,\ntarget_phys_addr_t offset)\n{",
"unsigned int VAR_0;",
"CadenceTTCState *s = (CadenceTTCState *)opaque;",
"VAR_0 = (offset >> 2) % 3;",
"return &s->timer[VAR_0];",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
]
] |
2,539 | static ssize_t net_rx_packet(NetClientState *nc, const uint8_t *buf, size_t size)
{
struct XenNetDev *netdev = qemu_get_nic_opaque(nc);
netif_rx_request_t rxreq;
RING_IDX rc, rp;
void *page;
if (netdev->xendev.be_state != XenbusStateConnected) {
return -1;
}
rc = netdev-... | false | qemu | 7bba83bf80eae9c9e323319ff40d0ca477b0a77a | static ssize_t net_rx_packet(NetClientState *nc, const uint8_t *buf, size_t size)
{
struct XenNetDev *netdev = qemu_get_nic_opaque(nc);
netif_rx_request_t rxreq;
RING_IDX rc, rp;
void *page;
if (netdev->xendev.be_state != XenbusStateConnected) {
return -1;
}
rc = netdev-... | {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(NetClientState *nc, const uint8_t *buf, size_t size)
{
struct XenNetDev *VAR_0 = qemu_get_nic_opaque(nc);
netif_rx_request_t rxreq;
RING_IDX rc, rp;
void *VAR_1;
if (VAR_0->xendev.be_state != XenbusStateConnected) {
return -1;
}
rc = VAR_0->rx_ring.... | [
"static ssize_t FUNC_0(NetClientState *nc, const uint8_t *buf, size_t size)\n{",
"struct XenNetDev *VAR_0 = qemu_get_nic_opaque(nc);",
"netif_rx_request_t rxreq;",
"RING_IDX rc, rp;",
"void *VAR_1;",
"if (VAR_0->xendev.be_state != XenbusStateConnected) {",
"return -1;",
"}",
"rc = VAR_0->rx_ring.req... | [
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[... |
2,540 | static void mb_add_mod(MultibootState *s,
target_phys_addr_t start, target_phys_addr_t end,
target_phys_addr_t cmdline_phys)
{
char *p;
assert(s->mb_mods_count < s->mb_mods_avail);
p = (char *)s->mb_buf + s->offset_mbinfo + MB_MOD_SIZE * s->mb_mods_count... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void mb_add_mod(MultibootState *s,
target_phys_addr_t start, target_phys_addr_t end,
target_phys_addr_t cmdline_phys)
{
char *p;
assert(s->mb_mods_count < s->mb_mods_avail);
p = (char *)s->mb_buf + s->offset_mbinfo + MB_MOD_SIZE * s->mb_mods_count... | {
"code": [],
"line_no": []
} | static void FUNC_0(MultibootState *VAR_0,
target_phys_addr_t VAR_1, target_phys_addr_t VAR_2,
target_phys_addr_t VAR_3)
{
char *VAR_4;
assert(VAR_0->mb_mods_count < VAR_0->mb_mods_avail);
VAR_4 = (char *)VAR_0->mb_buf + VAR_0->offset_mbinfo + MB_MOD_SIZE... | [
"static void FUNC_0(MultibootState *VAR_0,\ntarget_phys_addr_t VAR_1, target_phys_addr_t VAR_2,\ntarget_phys_addr_t VAR_3)\n{",
"char *VAR_4;",
"assert(VAR_0->mb_mods_count < VAR_0->mb_mods_avail);",
"VAR_4 = (char *)VAR_0->mb_buf + VAR_0->offset_mbinfo + MB_MOD_SIZE * VAR_0->mb_mods_count;",
"stl_p(VAR_4 +... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
33
],
[
35
]
] |
2,541 | static void vnc_init_basic_info_from_server_addr(QIOChannelSocket *ioc,
VncBasicInfo *info,
Error **errp)
{
SocketAddress *addr = NULL;
if (!ioc) {
error_setg(errp, "No listener socket available");
... | false | qemu | dfd100f242370886bb6732f70f1f7cbd8eb9fedc | static void vnc_init_basic_info_from_server_addr(QIOChannelSocket *ioc,
VncBasicInfo *info,
Error **errp)
{
SocketAddress *addr = NULL;
if (!ioc) {
error_setg(errp, "No listener socket available");
... | {
"code": [],
"line_no": []
} | static void FUNC_0(QIOChannelSocket *VAR_0,
VncBasicInfo *VAR_1,
Error **VAR_2)
{
SocketAddress *addr = NULL;
if (!VAR_0) {
error_setg(VAR_2, "No listener socket available");
return;
}... | [
"static void FUNC_0(QIOChannelSocket *VAR_0,\nVncBasicInfo *VAR_1,\nError **VAR_2)\n{",
"SocketAddress *addr = NULL;",
"if (!VAR_0) {",
"error_setg(VAR_2, \"No listener socket available\");",
"return;",
"}",
"addr = qio_channel_socket_get_local_address(VAR_0, VAR_2);",
"if (!addr) {",
"return;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
]
] |
2,542 | static void nbd_teardown_connection(NbdClientSession *client)
{
/* finish any pending coroutines */
shutdown(client->sock, 2);
nbd_recv_coroutines_enter_all(client);
nbd_client_session_detach_aio_context(client);
closesocket(client->sock);
client->sock = -1;
}
| false | qemu | f53a829bb9ef14be800556cbc02d8b20fc1050a7 | static void nbd_teardown_connection(NbdClientSession *client)
{
shutdown(client->sock, 2);
nbd_recv_coroutines_enter_all(client);
nbd_client_session_detach_aio_context(client);
closesocket(client->sock);
client->sock = -1;
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(NbdClientSession *VAR_0)
{
shutdown(VAR_0->sock, 2);
nbd_recv_coroutines_enter_all(VAR_0);
nbd_client_session_detach_aio_context(VAR_0);
closesocket(VAR_0->sock);
VAR_0->sock = -1;
}
| [
"static void FUNC_0(NbdClientSession *VAR_0)\n{",
"shutdown(VAR_0->sock, 2);",
"nbd_recv_coroutines_enter_all(VAR_0);",
"nbd_client_session_detach_aio_context(VAR_0);",
"closesocket(VAR_0->sock);",
"VAR_0->sock = -1;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
2,543 | static int usb_uhci_common_initfn(UHCIState *s)
{
uint8_t *pci_conf = s->dev.config;
int i;
pci_conf[PCI_REVISION_ID] = 0x01; // revision number
pci_conf[PCI_CLASS_PROG] = 0x00;
pci_config_set_class(pci_conf, PCI_CLASS_SERIAL_USB);
/* TODO: reset value should be 0. */
pci_conf[PCI_... | false | qemu | dc638fadb54c911019227ae37656560c49a209b9 | static int usb_uhci_common_initfn(UHCIState *s)
{
uint8_t *pci_conf = s->dev.config;
int i;
pci_conf[PCI_REVISION_ID] = 0x01;
pci_conf[PCI_CLASS_PROG] = 0x00;
pci_config_set_class(pci_conf, PCI_CLASS_SERIAL_USB);
pci_conf[PCI_INTERRUPT_PIN] = 4;
pci_conf[0x60] = 0x10;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(UHCIState *VAR_0)
{
uint8_t *pci_conf = VAR_0->dev.config;
int VAR_1;
pci_conf[PCI_REVISION_ID] = 0x01;
pci_conf[PCI_CLASS_PROG] = 0x00;
pci_config_set_class(pci_conf, PCI_CLASS_SERIAL_USB);
pci_conf[PCI_INTERRUPT_PIN] = 4;
pci_conf[0x60] = 0x10;
u... | [
"static int FUNC_0(UHCIState *VAR_0)\n{",
"uint8_t *pci_conf = VAR_0->dev.config;",
"int VAR_1;",
"pci_conf[PCI_REVISION_ID] = 0x01;",
"pci_conf[PCI_CLASS_PROG] = 0x00;",
"pci_config_set_class(pci_conf, PCI_CLASS_SERIAL_USB);",
"pci_conf[PCI_INTERRUPT_PIN] = 4;",
"pci_conf[0x60] = 0x10;",
"usb_bus_n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
47
],
[
55,
57
],
... |
2,544 | Object *user_creatable_add_opts(QemuOpts *opts, Error **errp)
{
Visitor *v;
QDict *pdict;
Object *obj;
const char *id = qemu_opts_id(opts);
const char *type = qemu_opt_get(opts, "qom-type");
if (!type) {
error_setg(errp, QERR_MISSING_PARAMETER, "qom-type");
return NULL... | false | qemu | 9a6d1acb3e752e1e0b693cc0491fa12875b76be0 | Object *user_creatable_add_opts(QemuOpts *opts, Error **errp)
{
Visitor *v;
QDict *pdict;
Object *obj;
const char *id = qemu_opts_id(opts);
const char *type = qemu_opt_get(opts, "qom-type");
if (!type) {
error_setg(errp, QERR_MISSING_PARAMETER, "qom-type");
return NULL... | {
"code": [],
"line_no": []
} | Object *FUNC_0(QemuOpts *opts, Error **errp)
{
Visitor *v;
QDict *pdict;
Object *obj;
const char *VAR_0 = qemu_opts_id(opts);
const char *VAR_1 = qemu_opt_get(opts, "qom-VAR_1");
if (!VAR_1) {
error_setg(errp, QERR_MISSING_PARAMETER, "qom-VAR_1");
return NULL;
}
... | [
"Object *FUNC_0(QemuOpts *opts, Error **errp)\n{",
"Visitor *v;",
"QDict *pdict;",
"Object *obj;",
"const char *VAR_0 = qemu_opts_id(opts);",
"const char *VAR_1 = qemu_opt_get(opts, \"qom-VAR_1\");",
"if (!VAR_1) {",
"error_setg(errp, QERR_MISSING_PARAMETER, \"qom-VAR_1\");",
"return NULL;",
"}",
... | [
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
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
... |
2,545 | int ff_generate_sliding_window_mmcos(H264Context *h, int first_slice)
{
MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = first_slice ? h->mmco : mmco_temp;
int mmco_index = 0, i = 0;
assert(h->long_ref_count + h->short_ref_count <= h->sps.ref_frame_count);
if (h->short_ref_count &&
h->long_ref_... | false | FFmpeg | 3176217c60ca7828712985092d9102d331ea4f3d | int ff_generate_sliding_window_mmcos(H264Context *h, int first_slice)
{
MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = first_slice ? h->mmco : mmco_temp;
int mmco_index = 0, i = 0;
assert(h->long_ref_count + h->short_ref_count <= h->sps.ref_frame_count);
if (h->short_ref_count &&
h->long_ref_... | {
"code": [],
"line_no": []
} | int FUNC_0(H264Context *VAR_0, int VAR_1)
{
MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = VAR_1 ? VAR_0->mmco : mmco_temp;
int VAR_2 = 0, VAR_3 = 0;
assert(VAR_0->long_ref_count + VAR_0->short_ref_count <= VAR_0->sps.ref_frame_count);
if (VAR_0->short_ref_count &&
VAR_0->long_ref_count + VAR... | [
"int FUNC_0(H264Context *VAR_0, int VAR_1)\n{",
"MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = VAR_1 ? VAR_0->mmco : mmco_temp;",
"int VAR_2 = 0, VAR_3 = 0;",
"assert(VAR_0->long_ref_count + VAR_0->short_ref_count <= VAR_0->sps.ref_frame_count);",
"if (VAR_0->short_ref_count &&\nVAR_0->long_ref_count + VAR_0->sho... | [
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
],
[
43
],
[
45
],
[
47
],
[
49... |
2,546 | static int do_alloc_cluster_offset(BlockDriverState *bs, uint64_t guest_offset,
uint64_t *host_offset, unsigned int *nb_clusters)
{
BDRVQcowState *s = bs->opaque;
int ret;
trace_qcow2_do_alloc_clusters_offset(qemu_coroutine_self(), guest_offset,
*host_off... | false | qemu | 17a71e58238138c3f02be7e9f5dc8de5d72a9a9d | static int do_alloc_cluster_offset(BlockDriverState *bs, uint64_t guest_offset,
uint64_t *host_offset, unsigned int *nb_clusters)
{
BDRVQcowState *s = bs->opaque;
int ret;
trace_qcow2_do_alloc_clusters_offset(qemu_coroutine_self(), guest_offset,
*host_off... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1,
uint64_t *VAR_2, unsigned int *VAR_3)
{
BDRVQcowState *s = VAR_0->opaque;
int VAR_4;
trace_qcow2_do_alloc_clusters_offset(qemu_coroutine_self(), VAR_1,
*VAR_2, *VAR_3);
VAR_4 = handle_depen... | [
"static int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1,\nuint64_t *VAR_2, unsigned int *VAR_3)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"int VAR_4;",
"trace_qcow2_do_alloc_clusters_offset(qemu_coroutine_self(), VAR_1,\n*VAR_2, *VAR_3);",
"VAR_4 = handle_dependencies(VAR_0, VAR_1, VAR_3);",
"if (VAR_4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
2,547 | static int pit_initfn(ISADevice *dev)
{
PITState *pit = DO_UPCAST(PITState, dev, dev);
PITChannelState *s;
s = &pit->channels[0];
/* the timer 0 is connected to an IRQ */
s->irq_timer = qemu_new_timer(vm_clock, pit_irq_timer, s);
s->irq = isa_reserve_irq(pit->irq);
register_iopor... | false | qemu | ee951a37d8873bff7aa58e23222dfd984111b6cb | static int pit_initfn(ISADevice *dev)
{
PITState *pit = DO_UPCAST(PITState, dev, dev);
PITChannelState *s;
s = &pit->channels[0];
s->irq_timer = qemu_new_timer(vm_clock, pit_irq_timer, s);
s->irq = isa_reserve_irq(pit->irq);
register_ioport_write(pit->iobase, 4, 1, pit_ioport_wr... | {
"code": [],
"line_no": []
} | static int FUNC_0(ISADevice *VAR_0)
{
PITState *pit = DO_UPCAST(PITState, VAR_0, VAR_0);
PITChannelState *s;
s = &pit->channels[0];
s->irq_timer = qemu_new_timer(vm_clock, pit_irq_timer, s);
s->irq = isa_reserve_irq(pit->irq);
register_ioport_write(pit->iobase, 4, 1, pit_ioport_... | [
"static int FUNC_0(ISADevice *VAR_0)\n{",
"PITState *pit = DO_UPCAST(PITState, VAR_0, VAR_0);",
"PITChannelState *s;",
"s = &pit->channels[0];",
"s->irq_timer = qemu_new_timer(vm_clock, pit_irq_timer, s);",
"s->irq = isa_reserve_irq(pit->irq);",
"register_ioport_write(pit->iobase, 4, 1, pit_ioport_write... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
]
] |
2,549 | int64_t bdrv_get_block_status_above(BlockDriverState *bs,
BlockDriverState *base,
int64_t sector_num,
int nb_sectors, int *pnum)
{
Coroutine *co;
BdrvCoGetBlockStatusData data = {
.bs = bs,... | false | qemu | 67a0fd2a9bca204d2b39f910a97c7137636a0715 | int64_t bdrv_get_block_status_above(BlockDriverState *bs,
BlockDriverState *base,
int64_t sector_num,
int nb_sectors, int *pnum)
{
Coroutine *co;
BdrvCoGetBlockStatusData data = {
.bs = bs,... | {
"code": [],
"line_no": []
} | int64_t FUNC_0(BlockDriverState *bs,
BlockDriverState *base,
int64_t sector_num,
int nb_sectors, int *pnum)
{
Coroutine *co;
BdrvCoGetBlockStatusData data = {
.bs = bs,
.base = bas... | [
"int64_t FUNC_0(BlockDriverState *bs,\nBlockDriverState *base,\nint64_t sector_num,\nint nb_sectors, int *pnum)\n{",
"Coroutine *co;",
"BdrvCoGetBlockStatusData data = {",
".bs = bs,\n.base = base,\n.sector_num = sector_num,\n.nb_sectors = nb_sectors,\n.pnum = pnum,\n.done = false,\n};",
"if (qemu_in_corout... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15,
17,
19,
21,
23,
25,
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[... |
2,550 | static int usb_linux_update_endp_table(USBHostDevice *s)
{
uint8_t *descriptors;
uint8_t devep, type, alt_interface;
int interface, length, i, ep, pid;
struct endp_data *epd;
for (i = 0; i < MAX_ENDPOINTS; i++) {
s->ep_in[i].type = INVALID_EP_TYPE;
s->ep_out[i].type = INVAL... | false | qemu | 7279a85f37a9cf20b15c86159f0a1f01ce9cead4 | static int usb_linux_update_endp_table(USBHostDevice *s)
{
uint8_t *descriptors;
uint8_t devep, type, alt_interface;
int interface, length, i, ep, pid;
struct endp_data *epd;
for (i = 0; i < MAX_ENDPOINTS; i++) {
s->ep_in[i].type = INVALID_EP_TYPE;
s->ep_out[i].type = INVAL... | {
"code": [],
"line_no": []
} | static int FUNC_0(USBHostDevice *VAR_0)
{
uint8_t *descriptors;
uint8_t devep, type, alt_interface;
int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5;
struct endp_data *VAR_6;
for (VAR_3 = 0; VAR_3 < MAX_ENDPOINTS; VAR_3++) {
VAR_0->ep_in[VAR_3].type = INVALID_EP_TYPE;
VAR_0->ep_out[VA... | [
"static int FUNC_0(USBHostDevice *VAR_0)\n{",
"uint8_t *descriptors;",
"uint8_t devep, type, alt_interface;",
"int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5;",
"struct endp_data *VAR_6;",
"for (VAR_3 = 0; VAR_3 < MAX_ENDPOINTS; VAR_3++) {",
"VAR_0->ep_in[VAR_3].type = INVALID_EP_TYPE;",
"VAR_0->ep_out[VAR_3].... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31
],
[
39
],
[
41
],
[
43
],
[
47,
49
],
[
51,
53
],
[
55
],
[
57
... |
2,551 | pvscsi_ring_init_msg(PVSCSIRingInfo *m, PVSCSICmdDescSetupMsgRing *ri)
{
int i;
uint32_t len_log2;
uint32_t ring_size;
if (ri->numPages > PVSCSI_SETUP_MSG_RING_MAX_NUM_PAGES) {
return -1;
}
ring_size = ri->numPages * PVSCSI_MAX_NUM_MSG_ENTRIES_PER_PAGE;
len_log2 = pvscsi_l... | false | qemu | f68826989cd4d1217797251339579c57b3c0934e | pvscsi_ring_init_msg(PVSCSIRingInfo *m, PVSCSICmdDescSetupMsgRing *ri)
{
int i;
uint32_t len_log2;
uint32_t ring_size;
if (ri->numPages > PVSCSI_SETUP_MSG_RING_MAX_NUM_PAGES) {
return -1;
}
ring_size = ri->numPages * PVSCSI_MAX_NUM_MSG_ENTRIES_PER_PAGE;
len_log2 = pvscsi_l... | {
"code": [],
"line_no": []
} | FUNC_0(PVSCSIRingInfo *VAR_0, PVSCSICmdDescSetupMsgRing *VAR_1)
{
int VAR_2;
uint32_t len_log2;
uint32_t ring_size;
if (VAR_1->numPages > PVSCSI_SETUP_MSG_RING_MAX_NUM_PAGES) {
return -1;
}
ring_size = VAR_1->numPages * PVSCSI_MAX_NUM_MSG_ENTRIES_PER_PAGE;
len_log2 = pvscs... | [
"FUNC_0(PVSCSIRingInfo *VAR_0, PVSCSICmdDescSetupMsgRing *VAR_1)\n{",
"int VAR_2;",
"uint32_t len_log2;",
"uint32_t ring_size;",
"if (VAR_1->numPages > PVSCSI_SETUP_MSG_RING_MAX_NUM_PAGES) {",
"return -1;",
"}",
"ring_size = VAR_1->numPages * PVSCSI_MAX_NUM_MSG_ENTRIES_PER_PAGE;",
"len_log2 = pvscsi... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
49
],
[
55
],
[
59
... |
2,552 | void ppc_hash64_stop_access(PowerPCCPU *cpu, uint64_t token)
{
if (cpu->env.external_htab == MMU_HASH64_KVM_MANAGED_HPT) {
kvmppc_hash64_free_pteg(token);
}
}
| false | qemu | 1ad9f0a464fe78d30ee60b3629f7a825cf2fab13 | void ppc_hash64_stop_access(PowerPCCPU *cpu, uint64_t token)
{
if (cpu->env.external_htab == MMU_HASH64_KVM_MANAGED_HPT) {
kvmppc_hash64_free_pteg(token);
}
}
| {
"code": [],
"line_no": []
} | void FUNC_0(PowerPCCPU *VAR_0, uint64_t VAR_1)
{
if (VAR_0->env.external_htab == MMU_HASH64_KVM_MANAGED_HPT) {
kvmppc_hash64_free_pteg(VAR_1);
}
}
| [
"void FUNC_0(PowerPCCPU *VAR_0, uint64_t VAR_1)\n{",
"if (VAR_0->env.external_htab == MMU_HASH64_KVM_MANAGED_HPT) {",
"kvmppc_hash64_free_pteg(VAR_1);",
"}",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
2,553 | static void puv3_load_kernel(const char *kernel_filename)
{
int size;
assert(kernel_filename != NULL);
/* only zImage format supported */
size = load_image_targphys(kernel_filename, KERNEL_LOAD_ADDR,
KERNEL_MAX_SIZE);
if (size < 0) {
hw_error("Load kernel error: '%s'\... | false | qemu | 2c62f08ddbf3fa80dc7202eb9a2ea60ae44e2cc5 | static void puv3_load_kernel(const char *kernel_filename)
{
int size;
assert(kernel_filename != NULL);
size = load_image_targphys(kernel_filename, KERNEL_LOAD_ADDR,
KERNEL_MAX_SIZE);
if (size < 0) {
hw_error("Load kernel error: '%s'\n", kernel_filename);
}
... | {
"code": [],
"line_no": []
} | static void FUNC_0(const char *VAR_0)
{
int VAR_1;
assert(VAR_0 != NULL);
VAR_1 = load_image_targphys(VAR_0, KERNEL_LOAD_ADDR,
KERNEL_MAX_SIZE);
if (VAR_1 < 0) {
hw_error("Load kernel error: '%s'\n", VAR_0);
}
graphic_console_init(NULL, NULL, NULL, ... | [
"static void FUNC_0(const char *VAR_0)\n{",
"int VAR_1;",
"assert(VAR_0 != NULL);",
"VAR_1 = load_image_targphys(VAR_0, KERNEL_LOAD_ADDR,\nKERNEL_MAX_SIZE);",
"if (VAR_1 < 0) {",
"hw_error(\"Load kernel error: '%s'\\n\", VAR_0);",
"}",
"graphic_console_init(NULL, NULL, NULL, NULL, NULL);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
29
],
[
31
]
] |
2,554 | static int qemu_rdma_write_one(QEMUFile *f, RDMAContext *rdma,
int current_index, uint64_t current_addr,
uint64_t length)
{
struct ibv_sge sge;
struct ibv_send_wr send_wr = { 0 };
struct ibv_send_wr *bad_wr;
int reg_result_idx, ret, co... | false | qemu | 88571882516a7cb4291a329c537eb79fd126e1f2 | static int qemu_rdma_write_one(QEMUFile *f, RDMAContext *rdma,
int current_index, uint64_t current_addr,
uint64_t length)
{
struct ibv_sge sge;
struct ibv_send_wr send_wr = { 0 };
struct ibv_send_wr *bad_wr;
int reg_result_idx, ret, co... | {
"code": [],
"line_no": []
} | static int FUNC_0(QEMUFile *VAR_0, RDMAContext *VAR_1,
int VAR_2, uint64_t VAR_3,
uint64_t VAR_4)
{
struct ibv_sge VAR_5;
struct ibv_send_wr VAR_6 = { 0 };
struct ibv_send_wr *VAR_7;
int VAR_8, VAR_9, VAR_10 = 0;
uint64_t chunk, c... | [
"static int FUNC_0(QEMUFile *VAR_0, RDMAContext *VAR_1,\nint VAR_2, uint64_t VAR_3,\nuint64_t VAR_4)\n{",
"struct ibv_sge VAR_5;",
"struct ibv_send_wr VAR_6 = { 0 };",
"struct ibv_send_wr *VAR_7;",
"int VAR_8, VAR_9, VAR_10 = 0;",
"uint64_t chunk, chunks;",
"uint8_t *chunk_start, *chunk_end;",
"RDMALo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
33,
35
],
[
39,
41,
43
],
[
45
],
[
49
],
[
51
... |
2,555 | void qmp_block_commit(bool has_job_id, const char *job_id, const char *device,
bool has_base, const char *base,
bool has_top, const char *top,
bool has_backing_file, const char *backing_file,
bool has_speed, int64_t speed,
... | false | qemu | 058223a6e3b73cdf7f56b8d0a55032f99c5f11ac | void qmp_block_commit(bool has_job_id, const char *job_id, const char *device,
bool has_base, const char *base,
bool has_top, const char *top,
bool has_backing_file, const char *backing_file,
bool has_speed, int64_t speed,
... | {
"code": [],
"line_no": []
} | void FUNC_0(bool VAR_0, const char *VAR_1, const char *VAR_2,
bool VAR_3, const char *VAR_4,
bool VAR_5, const char *VAR_6,
bool VAR_7, const char *VAR_8,
bool VAR_9, int64_t VAR_10,
Error **VAR_11)
{
... | [
"void FUNC_0(bool VAR_0, const char *VAR_1, const char *VAR_2,\nbool VAR_3, const char *VAR_4,\nbool VAR_5, const char *VAR_6,\nbool VAR_7, const char *VAR_8,\nbool VAR_9, int64_t VAR_10,\nError **VAR_11)\n{",
"BlockDriverState *bs;",
"BlockDriverState *base_bs, *top_bs;",
"AioContext *aio_context;",
"Error... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
33
],
[
35
],
[
37
],
[
51
],
[
53
],
[
55
],
[
57
],
[
59
],
[
61,
63
],
[
65
],
[
67
... |
2,556 | static void ffmpeg_cleanup(int ret)
{
int i, j;
if (do_benchmark) {
int maxrss = getmaxrss() / 1024;
printf("bench: maxrss=%ikB\n", maxrss);
}
for (i = 0; i < nb_filtergraphs; i++) {
FilterGraph *fg = filtergraphs[i];
avfilter_graph_free(&fg->graph);
... | false | FFmpeg | 04091552616e6c5bea754ebbee26f77cb8ba416e | static void ffmpeg_cleanup(int ret)
{
int i, j;
if (do_benchmark) {
int maxrss = getmaxrss() / 1024;
printf("bench: maxrss=%ikB\n", maxrss);
}
for (i = 0; i < nb_filtergraphs; i++) {
FilterGraph *fg = filtergraphs[i];
avfilter_graph_free(&fg->graph);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(int VAR_0)
{
int VAR_1, VAR_2;
if (do_benchmark) {
int VAR_3 = getmaxrss() / 1024;
printf("bench: VAR_3=%ikB\n", VAR_3);
}
for (VAR_1 = 0; VAR_1 < nb_filtergraphs; VAR_1++) {
FilterGraph *fg = filtergraphs[VAR_1];
avfilter_graph_free(&fg->g... | [
"static void FUNC_0(int VAR_0)\n{",
"int VAR_1, VAR_2;",
"if (do_benchmark) {",
"int VAR_3 = getmaxrss() / 1024;",
"printf(\"bench: VAR_3=%ikB\\n\", VAR_3);",
"}",
"for (VAR_1 = 0; VAR_1 < nb_filtergraphs; VAR_1++) {",
"FilterGraph *fg = filtergraphs[VAR_1];",
"avfilter_graph_free(&fg->graph);",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45... |
2,557 | Aml *aml_local(int num)
{
Aml *var;
uint8_t op = 0x60 /* Local0Op */ + num;
assert(num <= 7);
var = aml_opcode(op);
return var;
}
| false | qemu | 9be385980d37e8f4fd33f605f5fb1c3d144170a8 | Aml *aml_local(int num)
{
Aml *var;
uint8_t op = 0x60 + num;
assert(num <= 7);
var = aml_opcode(op);
return var;
}
| {
"code": [],
"line_no": []
} | Aml *FUNC_0(int num)
{
Aml *var;
uint8_t op = 0x60 + num;
assert(num <= 7);
var = aml_opcode(op);
return var;
}
| [
"Aml *FUNC_0(int num)\n{",
"Aml *var;",
"uint8_t op = 0x60 + num;",
"assert(num <= 7);",
"var = aml_opcode(op);",
"return var;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.