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 |
|---|---|---|---|---|---|---|---|---|---|---|
25,633 | void cpu_loop(CPUS390XState *env)
{
CPUState *cs = CPU(s390_env_get_cpu(env));
int trapnr, n, sig;
target_siginfo_t info;
target_ulong addr;
while (1) {
cpu_exec_start(cs);
trapnr = cpu_s390x_exec(cs);
cpu_exec_end(cs);
switch (trapnr) {
case EXCP... | false | qemu | 47405ab642101c8ea0472ae434ab4bd2bc1fa41f | void cpu_loop(CPUS390XState *env)
{
CPUState *cs = CPU(s390_env_get_cpu(env));
int trapnr, n, sig;
target_siginfo_t info;
target_ulong addr;
while (1) {
cpu_exec_start(cs);
trapnr = cpu_s390x_exec(cs);
cpu_exec_end(cs);
switch (trapnr) {
case EXCP... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUS390XState *VAR_0)
{
CPUState *cs = CPU(s390_env_get_cpu(VAR_0));
int VAR_1, VAR_2, VAR_3;
target_siginfo_t info;
target_ulong addr;
while (1) {
cpu_exec_start(cs);
VAR_1 = cpu_s390x_exec(cs);
cpu_exec_end(cs);
switch (VAR_1) {
case... | [
"void FUNC_0(CPUS390XState *VAR_0)\n{",
"CPUState *cs = CPU(s390_env_get_cpu(VAR_0));",
"int VAR_1, VAR_2, VAR_3;",
"target_siginfo_t info;",
"target_ulong addr;",
"while (1) {",
"cpu_exec_start(cs);",
"VAR_1 = cpu_s390x_exec(cs);",
"cpu_exec_end(cs);",
"switch (VAR_1) {",
"case EXCP_INTERRUPT:\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
29
],
[
33,
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47,
49,
51
],
[
53
... |
25,634 | Object *object_resolve_path_component(Object *parent, const gchar *part)
{
ObjectProperty *prop = object_property_find(parent, part, NULL);
if (prop == NULL) {
return NULL;
}
if (object_property_is_link(prop)) {
LinkProperty *lprop = prop->opaque;
return *lprop->child;
... | false | qemu | 64607d088132abdb25bf30d93e97d0c8df7b364c | Object *object_resolve_path_component(Object *parent, const gchar *part)
{
ObjectProperty *prop = object_property_find(parent, part, NULL);
if (prop == NULL) {
return NULL;
}
if (object_property_is_link(prop)) {
LinkProperty *lprop = prop->opaque;
return *lprop->child;
... | {
"code": [],
"line_no": []
} | Object *FUNC_0(Object *parent, const gchar *part)
{
ObjectProperty *prop = object_property_find(parent, part, NULL);
if (prop == NULL) {
return NULL;
}
if (object_property_is_link(prop)) {
LinkProperty *lprop = prop->opaque;
return *lprop->child;
} else if (object_... | [
"Object *FUNC_0(Object *parent, const gchar *part)\n{",
"ObjectProperty *prop = object_property_find(parent, part, NULL);",
"if (prop == NULL) {",
"return NULL;",
"}",
"if (object_property_is_link(prop)) {",
"LinkProperty *lprop = prop->opaque;",
"return *lprop->child;",
"} else if (object_property_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
25,635 | static void *virtio_scsi_load_request(QEMUFile *f, SCSIRequest *sreq)
{
SCSIBus *bus = sreq->bus;
VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus);
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
VirtIOSCSIReq *req;
uint32_t n;
req = g_malloc(sizeof(*req));
qemu_get_be32s(f, &n);
... | false | qemu | 36b15c79aa1bef5fe7543f9f2629b6413720bbfb | static void *virtio_scsi_load_request(QEMUFile *f, SCSIRequest *sreq)
{
SCSIBus *bus = sreq->bus;
VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus);
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
VirtIOSCSIReq *req;
uint32_t n;
req = g_malloc(sizeof(*req));
qemu_get_be32s(f, &n);
... | {
"code": [],
"line_no": []
} | static void *FUNC_0(QEMUFile *VAR_0, SCSIRequest *VAR_1)
{
SCSIBus *bus = VAR_1->bus;
VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus);
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
VirtIOSCSIReq *req;
uint32_t n;
req = g_malloc(sizeof(*req));
qemu_get_be32s(VAR_0, &n);
asse... | [
"static void *FUNC_0(QEMUFile *VAR_0, SCSIRequest *VAR_1)\n{",
"SCSIBus *bus = VAR_1->bus;",
"VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus);",
"VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);",
"VirtIOSCSIReq *req;",
"uint32_t n;",
"req = g_malloc(sizeof(*req));",
"qemu_get_be32s(VAR_0, &n);",
"a... | [
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
],
[
33,
35,
37,
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53,
55
],
[
59
... |
25,637 | static void phys_sections_free(PhysPageMap *map)
{
while (map->sections_nb > 0) {
MemoryRegionSection *section = &map->sections[--map->sections_nb];
phys_section_destroy(section->mr);
}
g_free(map->sections);
g_free(map->nodes);
g_free(map);
}
| false | qemu | 53cb28cbfea038f8ad50132dc8a684e638c7d48b | static void phys_sections_free(PhysPageMap *map)
{
while (map->sections_nb > 0) {
MemoryRegionSection *section = &map->sections[--map->sections_nb];
phys_section_destroy(section->mr);
}
g_free(map->sections);
g_free(map->nodes);
g_free(map);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(PhysPageMap *VAR_0)
{
while (VAR_0->sections_nb > 0) {
MemoryRegionSection *section = &VAR_0->sections[--VAR_0->sections_nb];
phys_section_destroy(section->mr);
}
g_free(VAR_0->sections);
g_free(VAR_0->nodes);
g_free(VAR_0);
}
| [
"static void FUNC_0(PhysPageMap *VAR_0)\n{",
"while (VAR_0->sections_nb > 0) {",
"MemoryRegionSection *section = &VAR_0->sections[--VAR_0->sections_nb];",
"phys_section_destroy(section->mr);",
"}",
"g_free(VAR_0->sections);",
"g_free(VAR_0->nodes);",
"g_free(VAR_0);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
25,638 | static void fill_buffer(ByteIOContext *s)
{
int len;
/* no need to do anything if EOF already reached */
if (s->eof_reached)
return;
if(s->update_checksum){
if(s->buf_end > s->checksum_ptr)
s->checksum= s->update_checksum(s->checksum, s->checksum_ptr, s->buf_end -... | false | FFmpeg | 602dd8f6c4d4f7e1b5f48cc580fd9b694d41d602 | static void fill_buffer(ByteIOContext *s)
{
int len;
if (s->eof_reached)
return;
if(s->update_checksum){
if(s->buf_end > s->checksum_ptr)
s->checksum= s->update_checksum(s->checksum, s->checksum_ptr, s->buf_end - s->checksum_ptr);
s->checksum_ptr= s->buf... | {
"code": [],
"line_no": []
} | static void FUNC_0(ByteIOContext *VAR_0)
{
int VAR_1;
if (VAR_0->eof_reached)
return;
if(VAR_0->update_checksum){
if(VAR_0->buf_end > VAR_0->checksum_ptr)
VAR_0->checksum= VAR_0->update_checksum(VAR_0->checksum, VAR_0->checksum_ptr, VAR_0->buf_end - VAR_0->checks... | [
"static void FUNC_0(ByteIOContext *VAR_0)\n{",
"int VAR_1;",
"if (VAR_0->eof_reached)\nreturn;",
"if(VAR_0->update_checksum){",
"if(VAR_0->buf_end > VAR_0->checksum_ptr)\nVAR_0->checksum= VAR_0->update_checksum(VAR_0->checksum, VAR_0->checksum_ptr, VAR_0->buf_end - VAR_0->checksum_ptr);",
"VAR_0->checksum... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
11,
13
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
]
] |
25,639 | static int adx_encode_frame(AVCodecContext *avctx, uint8_t *frame,
int buf_size, void *data)
{
ADXContext *c = avctx->priv_data;
const int16_t *samples = data;
uint8_t *dst = frame;
int ch;
if (!c->header_parsed) {
int hdrsize = adx_en... | false | FFmpeg | 754ebd1a5b68dd63ccceb50a8a852fe8d0c94354 | static int adx_encode_frame(AVCodecContext *avctx, uint8_t *frame,
int buf_size, void *data)
{
ADXContext *c = avctx->priv_data;
const int16_t *samples = data;
uint8_t *dst = frame;
int ch;
if (!c->header_parsed) {
int hdrsize = adx_en... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, uint8_t *VAR_1,
int VAR_2, void *VAR_3)
{
ADXContext *c = VAR_0->priv_data;
const int16_t *VAR_4 = VAR_3;
uint8_t *dst = VAR_1;
int VAR_5;
if (!c->header_parsed) {
int VAR_6 = adx_encode_header(... | [
"static int FUNC_0(AVCodecContext *VAR_0, uint8_t *VAR_1,\nint VAR_2, void *VAR_3)\n{",
"ADXContext *c = VAR_0->priv_data;",
"const int16_t *VAR_4 = VAR_3;",
"uint8_t *dst = VAR_1;",
"int VAR_5;",
"if (!c->header_parsed) {",
"int VAR_6 = adx_encode_header(VAR_0, dst, VAR_2);",
"dst ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
25,640 | static int bmp_parse(AVCodecParserContext *s, AVCodecContext *avctx,
const uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size)
{
BMPParseContext *bpc = s->priv_data;
uint64_t state = bpc->pc.state64;
int next = END_NOT_FOUND;
int i = 0... | false | FFmpeg | 43a4276c6964a2ec57e08c3c622bb94d35c0441f | static int bmp_parse(AVCodecParserContext *s, AVCodecContext *avctx,
const uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size)
{
BMPParseContext *bpc = s->priv_data;
uint64_t state = bpc->pc.state64;
int next = END_NOT_FOUND;
int i = 0... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecParserContext *VAR_0, AVCodecContext *VAR_1,
const uint8_t **VAR_2, int *VAR_3,
const uint8_t *VAR_4, int VAR_5)
{
BMPParseContext *bpc = VAR_0->priv_data;
uint64_t state = bpc->pc.state64;
int VAR_6 = END_NOT_FOUND;
int VAR_7 = 0... | [
"static int FUNC_0(AVCodecParserContext *VAR_0, AVCodecContext *VAR_1,\nconst uint8_t **VAR_2, int *VAR_3,\nconst uint8_t *VAR_4, int VAR_5)\n{",
"BMPParseContext *bpc = VAR_0->priv_data;",
"uint64_t state = bpc->pc.state64;",
"int VAR_6 = END_NOT_FOUND;",
"int VAR_7 = 0;",
"*VAR_3 = 0;",
"restart:\nif ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[... |
25,641 | static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
{
AVIContext *avi = s->priv_data;
AVStream *st;
int i, index;
int64_t pos;
AVIStream *ast;
if (!avi->index_loaded) {
/* we only load the index on demand */
avi_load_index(s);
... | false | FFmpeg | 570a4a0189946c2c983da41d37fdd67fa13266e7 | static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
{
AVIContext *avi = s->priv_data;
AVStream *st;
int i, index;
int64_t pos;
AVIStream *ast;
if (!avi->index_loaded) {
avi_load_index(s);
avi->index_loaded = 1;
}
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1, int64_t VAR_2, int VAR_3)
{
AVIContext *avi = VAR_0->priv_data;
AVStream *st;
int VAR_4, VAR_5;
int64_t pos;
AVIStream *ast;
if (!avi->index_loaded) {
avi_load_index(VAR_0);
avi->index_loaded = 1;
}
... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1, int64_t VAR_2, int VAR_3)\n{",
"AVIContext *avi = VAR_0->priv_data;",
"AVStream *st;",
"int VAR_4, VAR_5;",
"int64_t pos;",
"AVIStream *ast;",
"if (!avi->index_loaded) {",
"avi_load_index(VAR_0);",
"avi->index_loaded = 1;",
"}",
"assert(VAR_1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
45
],
[
47
],
[
51,
53
],
[
57
... |
25,642 | static int opt_streamid(const char *opt, const char *arg)
{
int idx;
char *p;
char idx_str[16];
av_strlcpy(idx_str, arg, sizeof(idx_str));
p = strchr(idx_str, ':');
if (!p) {
fprintf(stderr,
"Invalid value '%s' for option '%s', required syntax is 'index:value'\... | false | FFmpeg | c31a5b23b4cd566724743685e5ea158b0c818647 | static int opt_streamid(const char *opt, const char *arg)
{
int idx;
char *p;
char idx_str[16];
av_strlcpy(idx_str, arg, sizeof(idx_str));
p = strchr(idx_str, ':');
if (!p) {
fprintf(stderr,
"Invalid value '%s' for option '%s', required syntax is 'index:value'\... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0, const char *VAR_1)
{
int VAR_2;
char *VAR_3;
char VAR_4[16];
av_strlcpy(VAR_4, VAR_1, sizeof(VAR_4));
VAR_3 = strchr(VAR_4, ':');
if (!VAR_3) {
fprintf(stderr,
"Invalid value '%s' for option '%s', required syntax is 'index:v... | [
"static int FUNC_0(const char *VAR_0, const char *VAR_1)\n{",
"int VAR_2;",
"char *VAR_3;",
"char VAR_4[16];",
"av_strlcpy(VAR_4, VAR_1, sizeof(VAR_4));",
"VAR_3 = strchr(VAR_4, ':');",
"if (!VAR_3) {",
"fprintf(stderr,\n\"Invalid value '%s' for option '%s', required syntax is 'index:value'\\n\",\nVAR... | [
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
]
] |
25,643 | static void avc_luma_midv_qrt_16w_msa(const uint8_t *src, int32_t src_stride,
uint8_t *dst, int32_t dst_stride,
int32_t height, uint8_t vert_offset)
{
uint32_t multiple8_cnt;
for (multiple8_cnt = 2; multiple8_cnt--;) {
a... | false | FFmpeg | 662234a9a22f1cd0f0ac83b8bb1ffadedca90c0a | static void avc_luma_midv_qrt_16w_msa(const uint8_t *src, int32_t src_stride,
uint8_t *dst, int32_t dst_stride,
int32_t height, uint8_t vert_offset)
{
uint32_t multiple8_cnt;
for (multiple8_cnt = 2; multiple8_cnt--;) {
a... | {
"code": [],
"line_no": []
} | static void FUNC_0(const uint8_t *VAR_0, int32_t VAR_1,
uint8_t *VAR_2, int32_t VAR_3,
int32_t VAR_4, uint8_t VAR_5)
{
uint32_t multiple8_cnt;
for (multiple8_cnt = 2; multiple8_cnt--;) {
avc_luma_midv_qrt_8w_msa(VAR_0, V... | [
"static void FUNC_0(const uint8_t *VAR_0, int32_t VAR_1,\nuint8_t *VAR_2, int32_t VAR_3,\nint32_t VAR_4, uint8_t VAR_5)\n{",
"uint32_t multiple8_cnt;",
"for (multiple8_cnt = 2; multiple8_cnt--;) {",
"avc_luma_midv_qrt_8w_msa(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4,\nVAR_5);",
"VAR_0 += 8;",
"VAR_2 += 8;",
"}"... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15,
17
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
25,645 | static void RENAME(yuv2rgb32_1)(SwsContext *c, const uint16_t *buf0,
const uint16_t *ubuf0, const uint16_t *ubuf1,
const uint16_t *vbuf0, const uint16_t *vbuf1,
const uint16_t *abuf0, uint8_t *dest,
... | false | FFmpeg | 13a099799e89a76eb921ca452e1b04a7a28a9855 | static void RENAME(yuv2rgb32_1)(SwsContext *c, const uint16_t *buf0,
const uint16_t *ubuf0, const uint16_t *ubuf1,
const uint16_t *vbuf0, const uint16_t *vbuf1,
const uint16_t *abuf0, uint8_t *dest,
... | {
"code": [],
"line_no": []
} | static void FUNC_0(yuv2rgb32_1)(SwsContext *c, const uint16_t *buf0,
const uint16_t *ubuf0, const uint16_t *ubuf1,
const uint16_t *vbuf0, const uint16_t *vbuf1,
const uint16_t *abuf0, uint8_t *dest,
... | [
"static void FUNC_0(yuv2rgb32_1)(SwsContext *c, const uint16_t *buf0,\nconst uint16_t *ubuf0, const uint16_t *ubuf1,\nconst uint16_t *vbuf0, const uint16_t *vbuf1,\nconst uint16_t *abuf0, uint8_t *dest,\nint dstW, int uvalpha, enum PixelFormat dstFormat,\nint flags, int y)\n{",
"const uint16_t *VAR_0= buf0;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
19
],
[
21
],
[
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45
],
[
47
],
[
49,
51,
53,
55,
57,
59,
61,
63,
65,
67,
69,... |
25,646 | static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size){
HYuvContext *s = avctx->priv_data;
const int width= s->width;
const int width2= s->width>>1;
const int height= s->height;
int fake_ystride, fake_ustride, fake_vstride;
AVFrame * const p=... | false | FFmpeg | 68f593b48433842f3407586679fe07f3e5199ab9 | static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size){
HYuvContext *s = avctx->priv_data;
const int width= s->width;
const int width2= s->width>>1;
const int height= s->height;
int fake_ystride, fake_ustride, fake_vstride;
AVFrame * const p=... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2, uint8_t *VAR_3, int VAR_4){
HYuvContext *s = VAR_0->priv_data;
const int VAR_5= s->VAR_5;
const int VAR_6= s->VAR_5>>1;
const int VAR_7= s->VAR_7;
int VAR_8, VAR_9, VAR_10;
AVFrame * const p= &s->picture;
AVFrame *pic... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2, uint8_t *VAR_3, int VAR_4){",
"HYuvContext *s = VAR_0->priv_data;",
"const int VAR_5= s->VAR_5;",
"const int VAR_6= s->VAR_5>>1;",
"const int VAR_7= s->VAR_7;",
"int VAR_8, VAR_9, VAR_10;",
"AVFrame * const p= &s->picture;",
"AVFrame *... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27,
29
],
[
33
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
],
[
57
... |
25,647 | static QemuOpts *opts_parse(QemuOptsList *list, const char *params,
int permit_abbrev, bool defaults)
{
const char *firstname;
char value[1024], *id = NULL;
const char *p;
QemuOpts *opts;
Error *local_err = NULL;
assert(!permit_abbrev || list->implied_opt_name);
f... | true | qemu | cb77d1925ac4d673e19be58aa39fc53c5d2fed10 | static QemuOpts *opts_parse(QemuOptsList *list, const char *params,
int permit_abbrev, bool defaults)
{
const char *firstname;
char value[1024], *id = NULL;
const char *p;
QemuOpts *opts;
Error *local_err = NULL;
assert(!permit_abbrev || list->implied_opt_name);
f... | {
"code": [],
"line_no": []
} | static QemuOpts *FUNC_0(QemuOptsList *list, const char *params,
int permit_abbrev, bool defaults)
{
const char *VAR_0;
char VAR_1[1024], *VAR_2 = NULL;
const char *VAR_3;
QemuOpts *opts;
Error *local_err = NULL;
assert(!permit_abbrev || list->implied_opt_name);
VA... | [
"static QemuOpts *FUNC_0(QemuOptsList *list, const char *params,\nint permit_abbrev, bool defaults)\n{",
"const char *VAR_0;",
"char VAR_1[1024], *VAR_2 = NULL;",
"const char *VAR_3;",
"QemuOpts *opts;",
"Error *local_err = NULL;",
"assert(!permit_abbrev || list->implied_opt_name);",
"VAR_0 = permit_a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
... |
25,648 | static int get_bool(QEMUFile *f, void *pv, size_t size)
{
bool *v = pv;
*v = qemu_get_byte(f);
return 0;
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static int get_bool(QEMUFile *f, void *pv, size_t size)
{
bool *v = pv;
*v = qemu_get_byte(f);
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2)
{
bool *v = VAR_1;
*v = qemu_get_byte(VAR_0);
return 0;
}
| [
"static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2)\n{",
"bool *v = VAR_1;",
"*v = qemu_get_byte(VAR_0);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
25,649 | int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
AVFrame *frame,
int *got_frame_ptr,
AVPacket *avpkt)
{
int planar, channels;
int ret = 0;
*got_frame_... | true | FFmpeg | 1bc64c2814d409d3cc129c27c493ee915bebdc4a | int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
AVFrame *frame,
int *got_frame_ptr,
AVPacket *avpkt)
{
int planar, channels;
int ret = 0;
*got_frame_... | {
"code": [],
"line_no": []
} | int VAR_0 avcodec_decode_audio4(AVCodecContext *avctx,
AVFrame *frame,
int *got_frame_ptr,
AVPacket *avpkt)
{
int planar, channels;
int ret = 0;
*got_frame_ptr = 0;
a... | [
"int VAR_0 avcodec_decode_audio4(AVCodecContext *avctx,\nAVFrame *frame,\nint *got_frame_ptr,\nAVPacket *avpkt)\n{",
"int planar, channels;",
"int ret = 0;",
"*got_frame_ptr = 0;",
"avctx->pkt = avpkt;",
"if (!avpkt->data && avpkt->size) {",
"av_log(avctx, AV_LOG_ERROR, \"invalid packet: NULL data, size... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3,
4,
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20,
21
],
[
22
],
[
23
],... |
25,650 | int ff_j2k_init_component(Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty, Jpeg2000QuantStyle *qntsty, int cbps, int dx, int dy)
{
int reslevelno, bandno, gbandno = 0, ret, i, j, csize = 1;
if (ret=ff_j2k_dwt_init(&comp->dwt, comp->coord, codsty->nreslevels-1, codsty->transform))
return ret;
... | true | FFmpeg | 9ea242962c4093a5523deef124a98193bbb36730 | int ff_j2k_init_component(Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty, Jpeg2000QuantStyle *qntsty, int cbps, int dx, int dy)
{
int reslevelno, bandno, gbandno = 0, ret, i, j, csize = 1;
if (ret=ff_j2k_dwt_init(&comp->dwt, comp->coord, codsty->nreslevels-1, codsty->transform))
return ret;
... | {
"code": [
" comp->data = av_malloc(csize * sizeof(int));",
" comp->reslevel = av_malloc(codsty->nreslevels * sizeof(Jpeg2000ResLevel));",
" reslevel->band = av_malloc(reslevel->nbands * sizeof(Jpeg2000Band));",
" band->cblk = av_malloc(sizeof(Jpeg2000Cblk) * band->cblknx * ba... | int FUNC_0(Jpeg2000Component *VAR_0, Jpeg2000CodingStyle *VAR_1, Jpeg2000QuantStyle *VAR_2, int VAR_3, int VAR_4, int VAR_5)
{
int VAR_6, VAR_7, VAR_8 = 0, VAR_9, VAR_10, VAR_11, VAR_12 = 1;
if (VAR_9=ff_j2k_dwt_init(&VAR_0->dwt, VAR_0->coord, VAR_1->nreslevels-1, VAR_1->transform))
return VAR_9;
... | [
"int FUNC_0(Jpeg2000Component *VAR_0, Jpeg2000CodingStyle *VAR_1, Jpeg2000QuantStyle *VAR_2, int VAR_3, int VAR_4, int VAR_5)\n{",
"int VAR_6, VAR_7, VAR_8 = 0, VAR_9, VAR_10, VAR_11, VAR_12 = 1;",
"if (VAR_9=ff_j2k_dwt_init(&VAR_0->dwt, VAR_0->coord, VAR_1->nreslevels-1, VAR_1->transform))\nreturn VAR_9;",
"... | [
0,
0,
0,
0,
0,
1,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
25
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45,
47
],
[
51,
53
],
[
55,
57... |
25,651 | static int disas_cp_insn(CPUState *env, DisasContext *s, uint32_t insn)
{
TCGv tmp, tmp2;
uint32_t rd = (insn >> 12) & 0xf;
uint32_t cp = (insn >> 8) & 0xf;
if (IS_USER(s)) {
return 1;
}
if (insn & ARM_CP_RW_BIT) {
if (!env->cp[cp].cp_read)
return 1;
... | true | qemu | 7d1b0095bff7157e856d1d0e6c4295641ced2752 | static int disas_cp_insn(CPUState *env, DisasContext *s, uint32_t insn)
{
TCGv tmp, tmp2;
uint32_t rd = (insn >> 12) & 0xf;
uint32_t cp = (insn >> 8) & 0xf;
if (IS_USER(s)) {
return 1;
}
if (insn & ARM_CP_RW_BIT) {
if (!env->cp[cp].cp_read)
return 1;
... | {
"code": [
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" tmp = new_tmp();",
" dead_tmp(tmp);",
" tmp = new_tmp();",
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" tmp = new_tmp();",
... | static int FUNC_0(CPUState *VAR_0, DisasContext *VAR_1, uint32_t VAR_2)
{
TCGv tmp, tmp2;
uint32_t rd = (VAR_2 >> 12) & 0xf;
uint32_t cp = (VAR_2 >> 8) & 0xf;
if (IS_USER(VAR_1)) {
return 1;
}
if (VAR_2 & ARM_CP_RW_BIT) {
if (!VAR_0->cp[cp].cp_read)
return... | [
"static int FUNC_0(CPUState *VAR_0, DisasContext *VAR_1, uint32_t VAR_2)\n{",
"TCGv tmp, tmp2;",
"uint32_t rd = (VAR_2 >> 12) & 0xf;",
"uint32_t cp = (VAR_2 >> 8) & 0xf;",
"if (IS_USER(VAR_1)) {",
"return 1;",
"}",
"if (VAR_2 & ARM_CP_RW_BIT) {",
"if (!VAR_0->cp[cp].cp_read)\nreturn 1;",
"gen_set_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
... |
25,652 | static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)
{
AVStream *st;
int len, ret, i;
av_init_packet(pkt);
for(;;) {
/* select current input stream component */
st = s->cur_st;
if (st) {
if (!st->need_parsing || !st->parser) {
... | true | FFmpeg | d64066f6e88c827e33002b2c7740efd62cd5ba7f | static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)
{
AVStream *st;
int len, ret, i;
av_init_packet(pkt);
for(;;) {
st = s->cur_st;
if (st) {
if (!st->need_parsing || !st->parser) {
*pkt ... | {
"code": [
" *pkt = st->cur_pkt; st->cur_pkt.data= NULL;"
],
"line_no": [
29
]
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
AVStream *st;
int VAR_2, VAR_3, VAR_4;
av_init_packet(VAR_1);
for(;;) {
st = VAR_0->cur_st;
if (st) {
if (!st->need_parsing || !st->parser) {
... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"AVStream *st;",
"int VAR_2, VAR_3, VAR_4;",
"av_init_packet(VAR_1);",
"for(;;) {",
"st = VAR_0->cur_st;",
"if (st) {",
"if (!st->need_parsing || !st->parser) {",
"*VAR_1 = st->cur_pkt; st->cur_pkt.data= NULL;",
"compute_pkt_fields(V... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49,
51,
53,
55... |
25,653 | void qemu_co_rwlock_unlock(CoRwlock *lock)
{
assert(qemu_in_coroutine());
if (lock->writer) {
lock->writer = false;
qemu_co_queue_restart_all(&lock->queue);
} else {
lock->reader--;
assert(lock->reader >= 0);
/* Wakeup only one waiting writer */
if (!lock->rea... | true | qemu | 1b7f01d966f97b7820f3cdd471461cf0799a93cc | void qemu_co_rwlock_unlock(CoRwlock *lock)
{
assert(qemu_in_coroutine());
if (lock->writer) {
lock->writer = false;
qemu_co_queue_restart_all(&lock->queue);
} else {
lock->reader--;
assert(lock->reader >= 0);
if (!lock->reader) {
qemu_co_queue_nex... | {
"code": [],
"line_no": []
} | void FUNC_0(CoRwlock *VAR_0)
{
assert(qemu_in_coroutine());
if (VAR_0->writer) {
VAR_0->writer = false;
qemu_co_queue_restart_all(&VAR_0->queue);
} else {
VAR_0->reader--;
assert(VAR_0->reader >= 0);
if (!VAR_0->reader) {
qemu_co_queue_next(&VAR_0... | [
"void FUNC_0(CoRwlock *VAR_0)\n{",
"assert(qemu_in_coroutine());",
"if (VAR_0->writer) {",
"VAR_0->writer = false;",
"qemu_co_queue_restart_all(&VAR_0->queue);",
"} else {",
"VAR_0->reader--;",
"assert(VAR_0->reader >= 0);",
"if (!VAR_0->reader) {",
"qemu_co_queue_next(&VAR_0->queue);",
"}",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
]
] |
25,654 | void do_addzeo (void)
{
T1 = T0;
T0 += xer_ca;
if (likely(!((T1 ^ (-1)) & (T1 ^ T0) & (1 << 31)))) {
xer_ov = 0;
} else {
xer_so = 1;
xer_ov = 1;
}
if (likely(T0 >= T1)) {
xer_ca = 0;
} else {
xer_ca = 1;
}
}
| true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | void do_addzeo (void)
{
T1 = T0;
T0 += xer_ca;
if (likely(!((T1 ^ (-1)) & (T1 ^ T0) & (1 << 31)))) {
xer_ov = 0;
} else {
xer_so = 1;
xer_ov = 1;
}
if (likely(T0 >= T1)) {
xer_ca = 0;
} else {
xer_ca = 1;
}
}
| {
"code": [
" xer_ca = 1;",
" T1 = T0;",
" } else {",
" xer_ca = 0;",
" T1 = T0;",
" T1 = T0;",
" xer_ca = 1;",
" } else {",
" xer_ca = 0;",
" xer_ca = 1;",
" } else {",
" T1 = T0;",
" xer_ov = 0;",
... | void FUNC_0 (void)
{
T1 = T0;
T0 += xer_ca;
if (likely(!((T1 ^ (-1)) & (T1 ^ T0) & (1 << 31)))) {
xer_ov = 0;
} else {
xer_so = 1;
xer_ov = 1;
}
if (likely(T0 >= T1)) {
xer_ca = 0;
} else {
xer_ca = 1;
}
}
| [
"void FUNC_0 (void)\n{",
"T1 = T0;",
"T0 += xer_ca;",
"if (likely(!((T1 ^ (-1)) & (T1 ^ T0) & (1 << 31)))) {",
"xer_ov = 0;",
"} else {",
"xer_so = 1;",
"xer_ov = 1;",
"}",
"if (likely(T0 >= T1)) {",
"xer_ca = 0;",
"} else {",
"xer_ca = 1;",
"}",
"}"
] | [
1,
1,
1,
1,
1,
0,
1,
1,
0,
1,
1,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
25,655 | void ide_atapi_cmd_reply_end(IDEState *s)
{
int byte_count_limit, size, ret;
#ifdef DEBUG_IDE_ATAPI
printf("reply: tx_size=%d elem_tx_size=%d index=%d\n",
s->packet_transfer_size,
s->elementary_transfer_size,
s->io_buffer_index);
#endif
if (s->packet_transfer_size <... | true | qemu | 5f81724d80a1492c73d329242663962139db739b | void ide_atapi_cmd_reply_end(IDEState *s)
{
int byte_count_limit, size, ret;
#ifdef DEBUG_IDE_ATAPI
printf("reply: tx_size=%d elem_tx_size=%d index=%d\n",
s->packet_transfer_size,
s->elementary_transfer_size,
s->io_buffer_index);
#endif
if (s->packet_transfer_size <... | {
"code": [
" printf(\"status=0x%x\\n\", s->status);",
" ret = cd_read_sector(s, s->lba, s->io_buffer, s->cd_sector_size);",
" if (ret < 0) {",
" ide_atapi_io_error(s, ret);",
" s->lba++;",
" s->io_buffer_index = 0;"
],
"lin... | void FUNC_0(IDEState *VAR_0)
{
int VAR_1, VAR_2, VAR_3;
#ifdef DEBUG_IDE_ATAPI
printf("reply: tx_size=%d elem_tx_size=%d index=%d\n",
VAR_0->packet_transfer_size,
VAR_0->elementary_transfer_size,
VAR_0->io_buffer_index);
#endif
if (VAR_0->packet_transfer_size <= 0) ... | [
"void FUNC_0(IDEState *VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3;",
"#ifdef DEBUG_IDE_ATAPI\nprintf(\"reply: tx_size=%d elem_tx_size=%d index=%d\\n\",\nVAR_0->packet_transfer_size,\nVAR_0->elementary_transfer_size,\nVAR_0->io_buffer_index);",
"#endif\nif (VAR_0->packet_transfer_size <= 0) {",
"ide_atapi_cmd_ok(V... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
1,
1,
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
] | [
[
1,
3
],
[
5
],
[
7,
9,
11,
13,
15
],
[
17,
19
],
[
23
],
[
25
],
[
27,
29
],
[
31,
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
25,656 | static int read_filter_params(MLPDecodeContext *m, GetBitContext *gbp,
unsigned int substr, unsigned int channel,
unsigned int filter)
{
SubStream *s = &m->substream[substr];
FilterParams *fp = &s->channel_params[channel].filter_params[filter];
... | true | FFmpeg | 552adf1dd3a38fb7a1a6109dd2b517d63290f20e | static int read_filter_params(MLPDecodeContext *m, GetBitContext *gbp,
unsigned int substr, unsigned int channel,
unsigned int filter)
{
SubStream *s = &m->substream[substr];
FilterParams *fp = &s->channel_params[channel].filter_params[filter];
... | {
"code": [
" fp->state[i] = state_bits ? get_sbits(gbp, state_bits) << state_shift : 0;"
],
"line_no": [
133
]
} | static int FUNC_0(MLPDecodeContext *VAR_0, GetBitContext *VAR_1,
unsigned int VAR_2, unsigned int VAR_3,
unsigned int VAR_4)
{
SubStream *s = &VAR_0->substream[VAR_2];
FilterParams *fp = &s->channel_params[VAR_3].filter_params[VAR_4];
const i... | [
"static int FUNC_0(MLPDecodeContext *VAR_0, GetBitContext *VAR_1,\nunsigned int VAR_2, unsigned int VAR_3,\nunsigned int VAR_4)\n{",
"SubStream *s = &VAR_0->substream[VAR_2];",
"FilterParams *fp = &s->channel_params[VAR_3].filter_params[VAR_4];",
"const int VAR_5 = VAR_4 ? MAX_IIR_ORDER : MAX_FIR_ORDER;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41,
43,
45
],
[
47
],
[
49
],
[
51
],
[
55
... |
25,657 | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref)
{
IlContext *il = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFilterBufferRef *out;
int ret;
out = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h);
if (!out) {
... | true | FFmpeg | 63a99622876ff79a07862167f243a7d3823b7315 | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref)
{
IlContext *il = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFilterBufferRef *out;
int ret;
out = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h);
if (!out) {
... | {
"code": [
" int ret;",
" il->width, inlink->h,",
" if (il->nb_planes > 2) {",
" interleave(out->data[1], inpicref->data[1],",
" il->chroma_width, il->chroma_height,",
" out->linesize[1], inpicref->linesize[1],",
" ... | static int FUNC_0(AVFilterLink *VAR_0, AVFilterBufferRef *VAR_1)
{
IlContext *il = VAR_0->dst->priv;
AVFilterLink *outlink = VAR_0->dst->outputs[0];
AVFilterBufferRef *out;
int VAR_2;
out = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h);
if (!out) {
avfilte... | [
"static int FUNC_0(AVFilterLink *VAR_0, AVFilterBufferRef *VAR_1)\n{",
"IlContext *il = VAR_0->dst->priv;",
"AVFilterLink *outlink = VAR_0->dst->outputs[0];",
"AVFilterBufferRef *out;",
"int VAR_2;",
"out = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h);",
"if (!out) {",
"avfilter... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
1,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29,
31,
33,
35
],
[
39
],
[
41,
43,
45,
47
],
[
49,
51,
53,
55
],
[... |
25,658 | decode_lpc(WmallDecodeCtx *s)
{
int ch, i, cbits;
s->lpc_order = get_bits(&s->gb, 5) + 1;
s->lpc_scaling = get_bits(&s->gb, 4);
s->lpc_intbits = get_bits(&s->gb, 3) + 1;
cbits = s->lpc_scaling + s->lpc_intbits;
for(ch = 0; ch < s->num_channels; ch++) {
for(i = 0; i < s->lpc_order; i++) ... | true | FFmpeg | dae7ff04160901a30a35af05f2f149b289c4f0b1 | decode_lpc(WmallDecodeCtx *s)
{
int ch, i, cbits;
s->lpc_order = get_bits(&s->gb, 5) + 1;
s->lpc_scaling = get_bits(&s->gb, 4);
s->lpc_intbits = get_bits(&s->gb, 3) + 1;
cbits = s->lpc_scaling + s->lpc_intbits;
for(ch = 0; ch < s->num_channels; ch++) {
for(i = 0; i < s->lpc_order; i++) ... | {
"code": [
"\tfor(i = 0; i < s->lpc_order; i++) {",
"\t s->lpc_coefs[ch][i] = get_sbits(&s->gb, cbits);"
],
"line_no": [
17,
19
]
} | FUNC_0(WmallDecodeCtx *VAR_0)
{
int VAR_1, VAR_2, VAR_3;
VAR_0->lpc_order = get_bits(&VAR_0->gb, 5) + 1;
VAR_0->lpc_scaling = get_bits(&VAR_0->gb, 4);
VAR_0->lpc_intbits = get_bits(&VAR_0->gb, 3) + 1;
VAR_3 = VAR_0->lpc_scaling + VAR_0->lpc_intbits;
for(VAR_1 = 0; VAR_1 < VAR_0->num_chann... | [
"FUNC_0(WmallDecodeCtx *VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3;",
"VAR_0->lpc_order = get_bits(&VAR_0->gb, 5) + 1;",
"VAR_0->lpc_scaling = get_bits(&VAR_0->gb, 4);",
"VAR_0->lpc_intbits = get_bits(&VAR_0->gb, 3) + 1;",
"VAR_3 = VAR_0->lpc_scaling + VAR_0->lpc_intbits;",
"for(VAR_1 = 0; VAR_1 < VAR_0->num_... | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
25,659 | static double get_scene_score(AVFilterContext *ctx, AVFrame *crnt, AVFrame *next)
{
FrameRateContext *s = ctx->priv;
double ret = 0;
ff_dlog(ctx, "get_scene_score()\n");
if (crnt->height == next->height &&
crnt->width == next->width) {
int64_t sad;
double mafd, diff;... | true | FFmpeg | e403e4bdbea08af0c4a068eb560b577d1b64cf7a | static double get_scene_score(AVFilterContext *ctx, AVFrame *crnt, AVFrame *next)
{
FrameRateContext *s = ctx->priv;
double ret = 0;
ff_dlog(ctx, "get_scene_score()\n");
if (crnt->height == next->height &&
crnt->width == next->width) {
int64_t sad;
double mafd, diff;... | {
"code": [
" sad = scene_sad8(s, crnt->data[0], crnt->linesize[0], next->data[0], next->linesize[0], crnt->height);",
" sad = scene_sad16(s, (const uint16_t*)crnt->data[0], crnt->linesize[0] >> 1, (const uint16_t*)next->data[0], next->linesize[0] >> 1, crnt->height);",
" mafd... | static double FUNC_0(AVFilterContext *VAR_0, AVFrame *VAR_1, AVFrame *VAR_2)
{
FrameRateContext *s = VAR_0->priv;
double VAR_3 = 0;
ff_dlog(VAR_0, "FUNC_0()\n");
if (VAR_1->height == VAR_2->height &&
VAR_1->width == VAR_2->width) {
int64_t sad;
double VAR_4, VAR_5;
... | [
"static double FUNC_0(AVFilterContext *VAR_0, AVFrame *VAR_1, AVFrame *VAR_2)\n{",
"FrameRateContext *s = VAR_0->priv;",
"double VAR_3 = 0;",
"ff_dlog(VAR_0, \"FUNC_0()\\n\");",
"if (VAR_1->height == VAR_2->height &&\nVAR_1->width == VAR_2->width) {",
"int64_t sad;",
"double VAR_4, VAR_5;",
"ff_dlog(... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15,
17
],
[
19
],
[
21
],
[
25
],
[
27,
29
],
[
31,
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
]
] |
25,660 | int main(int argc,char* argv[]){
int i, j;
uint64_t sse=0;
uint64_t dev;
FILE *f[2];
uint8_t buf[2][SIZE];
uint64_t psnr;
int len= argc<4 ? 1 : atoi(argv[3]);
int64_t max= (1<<(8*len))-1;
int shift= argc<5 ? 0 : atoi(argv[4]);
int skip_bytes = argc<6 ? 0 : atoi(argv[5])... | false | FFmpeg | 1e90317b655699a2877478e335e998fb5e4b79d8 | int main(int argc,char* argv[]){
int i, j;
uint64_t sse=0;
uint64_t dev;
FILE *f[2];
uint8_t buf[2][SIZE];
uint64_t psnr;
int len= argc<4 ? 1 : atoi(argv[3]);
int64_t max= (1<<(8*len))-1;
int shift= argc<5 ? 0 : atoi(argv[4]);
int skip_bytes = argc<6 ? 0 : atoi(argv[5])... | {
"code": [],
"line_no": []
} | int FUNC_0(int VAR_0,char* VAR_1[]){
int VAR_2, VAR_3;
uint64_t sse=0;
uint64_t dev;
FILE *f[2];
uint8_t buf[2][SIZE];
uint64_t psnr;
int VAR_4= VAR_0<4 ? 1 : atoi(VAR_1[3]);
int64_t max= (1<<(8*VAR_4))-1;
int VAR_5= VAR_0<5 ? 0 : atoi(VAR_1[4]);
int VAR_6 = VAR_0<6 ? 0... | [
"int FUNC_0(int VAR_0,char* VAR_1[]){",
"int VAR_2, VAR_3;",
"uint64_t sse=0;",
"uint64_t dev;",
"FILE *f[2];",
"uint8_t buf[2][SIZE];",
"uint64_t psnr;",
"int VAR_4= VAR_0<4 ? 1 : atoi(VAR_1[3]);",
"int64_t max= (1<<(8*VAR_4))-1;",
"int VAR_5= VAR_0<5 ? 0 : atoi(VAR_1[4]);",
"int VAR_6 = VAR_0<... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[... |
25,661 | StrongARMState *sa1110_init(MemoryRegion *sysmem,
unsigned int sdram_size, const char *rev)
{
StrongARMState *s;
int i;
s = g_new0(StrongARMState, 1);
if (!rev) {
rev = "sa1110-b5";
}
if (strncmp(rev, "sa1110", 6)) {
error_report("Machi... | true | qemu | 4482e05cbbb7e50e476f6a9500cf0b38913bd939 | StrongARMState *sa1110_init(MemoryRegion *sysmem,
unsigned int sdram_size, const char *rev)
{
StrongARMState *s;
int i;
s = g_new0(StrongARMState, 1);
if (!rev) {
rev = "sa1110-b5";
}
if (strncmp(rev, "sa1110", 6)) {
error_report("Machi... | {
"code": [
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" if (!s->cpu) {",
" error_report(\"Unable to find CPU definition\");",
" exit(1);",
" exit(1);",
" exit(1);",
... | StrongARMState *FUNC_0(MemoryRegion *sysmem,
unsigned int sdram_size, const char *rev)
{
StrongARMState *s;
int VAR_0;
s = g_new0(StrongARMState, 1);
if (!rev) {
rev = "sa1110-b5";
}
if (strncmp(rev, "sa1110", 6)) {
error_report("Machin... | [
"StrongARMState *FUNC_0(MemoryRegion *sysmem,\nunsigned int sdram_size, const char *rev)\n{",
"StrongARMState *s;",
"int VAR_0;",
"s = g_new0(StrongARMState, 1);",
"if (!rev) {",
"rev = \"sa1110-b5\";",
"}",
"if (strncmp(rev, \"sa1110\", 6)) {",
"error_report(\"Machine requires a SA1110 processor.\"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49,
51
],
[
53
],
[
57,... |
25,662 | static int celt_header(AVFormatContext *s, int idx)
{
struct ogg *ogg = s->priv_data;
struct ogg_stream *os = ogg->streams + idx;
AVStream *st = s->streams[idx];
struct oggcelt_private *priv = os->private;
uint8_t *p = os->buf + os->pstart;
if (os->psize == 60 &&
!memcmp(p, ff_... | true | FFmpeg | 7140761481e4296723a592019a0244ebe6c1a8cf | static int celt_header(AVFormatContext *s, int idx)
{
struct ogg *ogg = s->priv_data;
struct ogg_stream *os = ogg->streams + idx;
AVStream *st = s->streams[idx];
struct oggcelt_private *priv = os->private;
uint8_t *p = os->buf + os->pstart;
if (os->psize == 60 &&
!memcmp(p, ff_... | {
"code": [
" priv->extra_headers_left = 1 + extra_headers;",
" av_free(os->private);"
],
"line_no": [
71,
73
]
} | 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;
AVStream *st = VAR_0->streams[VAR_1];
struct oggcelt_private *VAR_4 = VAR_3->private;
uint8_t *p = VAR_3->buf + VAR_3->pstart;
if (VAR_3->psi... | [
"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;",
"AVStream *st = VAR_0->streams[VAR_1];",
"struct oggcelt_private *VAR_4 = VAR_3->private;",
"uint8_t *p = VAR_3->buf + VAR_3->pstart;",
"if (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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
25
],
[
27
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
53
... |
25,663 | static abi_long do_sendrecvmsg_locked(int fd, struct target_msghdr *msgp,
int flags, int send)
{
abi_long ret, len;
struct msghdr msg;
int count;
struct iovec *vec;
abi_ulong target_vec;
if (msgp->msg_name) {
msg.msg_namelen = tswap32(msgp... | true | qemu | 7d61d892327d803ae43d14500601e48031b4632c | static abi_long do_sendrecvmsg_locked(int fd, struct target_msghdr *msgp,
int flags, int send)
{
abi_long ret, len;
struct msghdr msg;
int count;
struct iovec *vec;
abi_ulong target_vec;
if (msgp->msg_name) {
msg.msg_namelen = tswap32(msgp... | {
"code": [
" ret = fd_trans_target_to_host_data(fd)(msg.msg_iov->iov_base,",
" if (ret == 0) {",
" ret = get_errno(safe_sendmsg(fd, &msg, flags));"
],
"line_no": [
79,
89,
91
]
} | static abi_long FUNC_0(int fd, struct target_msghdr *msgp,
int flags, int send)
{
abi_long ret, len;
struct msghdr VAR_0;
int VAR_1;
struct iovec *VAR_2;
abi_ulong target_vec;
if (msgp->msg_name) {
VAR_0.msg_namelen = tswap32(msgp->msg_nam... | [
"static abi_long FUNC_0(int fd, struct target_msghdr *msgp,\nint flags, int send)\n{",
"abi_long ret, len;",
"struct msghdr VAR_0;",
"int VAR_1;",
"struct iovec *VAR_2;",
"abi_ulong target_vec;",
"if (msgp->msg_name) {",
"VAR_0.msg_namelen = tswap32(msgp->msg_namelen);",
"VAR_0.msg_name = alloca(VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25,
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
25,664 | static int decode_group3_1d_line(AVCodecContext *avctx, GetBitContext *gb,
int pix_left, int *runs)
{
int mode = 0, run = 0;
unsigned int t;
for(;;){
t = get_vlc2(gb, ccitt_vlc[mode].table, 9, 2);
run += t;
if(t < 64){
pix_left -=... | false | FFmpeg | d68542f019c89e7938297a18da282e3a892718aa | static int decode_group3_1d_line(AVCodecContext *avctx, GetBitContext *gb,
int pix_left, int *runs)
{
int mode = 0, run = 0;
unsigned int t;
for(;;){
t = get_vlc2(gb, ccitt_vlc[mode].table, 9, 2);
run += t;
if(t < 64){
pix_left -=... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, GetBitContext *VAR_1,
int VAR_2, int *VAR_3)
{
int VAR_4 = 0, VAR_5 = 0;
unsigned int VAR_6;
for(;;){
VAR_6 = get_vlc2(VAR_1, ccitt_vlc[VAR_4].table, 9, 2);
VAR_5 += VAR_6;
if(VAR_6 < 64){
... | [
"static int FUNC_0(AVCodecContext *VAR_0, GetBitContext *VAR_1,\nint VAR_2, int *VAR_3)\n{",
"int VAR_4 = 0, VAR_5 = 0;",
"unsigned int VAR_6;",
"for(;;){",
"VAR_6 = get_vlc2(VAR_1, ccitt_vlc[VAR_4].table, 9, 2);",
"VAR_5 += VAR_6;",
"if(VAR_6 < 64){",
"VAR_2 -= VAR_5;",
"*VAR_3++ = VAR_5;",
"if(V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
25,665 | static int get_qcx(Jpeg2000DecoderContext *s, int n, Jpeg2000QuantStyle *q)
{
int i, x;
if (s->buf_end - s->buf < 1)
return AVERROR(EINVAL);
x = bytestream_get_byte(&s->buf); // Sqcd
q->nguardbits = x >> 5;
q->quantsty = x & 0x1f;
if (q->quantsty == JPEG2000_QSTY_NONE) ... | false | FFmpeg | 0b42631641d998e509cde6fa344edc6ab5cb4ac8 | static int get_qcx(Jpeg2000DecoderContext *s, int n, Jpeg2000QuantStyle *q)
{
int i, x;
if (s->buf_end - s->buf < 1)
return AVERROR(EINVAL);
x = bytestream_get_byte(&s->buf);
q->nguardbits = x >> 5;
q->quantsty = x & 0x1f;
if (q->quantsty == JPEG2000_QSTY_NONE) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0(Jpeg2000DecoderContext *VAR_0, int VAR_1, Jpeg2000QuantStyle *VAR_2)
{
int VAR_3, VAR_4;
if (VAR_0->buf_end - VAR_0->buf < 1)
return AVERROR(EINVAL);
VAR_4 = bytestream_get_byte(&VAR_0->buf);
VAR_2->nguardbits = VAR_4 >> 5;
VAR_2->quantsty = VAR_4 & 0x1f;
... | [
"static int FUNC_0(Jpeg2000DecoderContext *VAR_0, int VAR_1, Jpeg2000QuantStyle *VAR_2)\n{",
"int VAR_3, VAR_4;",
"if (VAR_0->buf_end - VAR_0->buf < 1)\nreturn AVERROR(EINVAL);",
"VAR_4 = bytestream_get_byte(&VAR_0->buf);",
"VAR_2->nguardbits = VAR_4 >> 5;",
"VAR_2->quantsty = VAR_4 & 0x1f;",
"if (VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
... |
25,666 | void do_compare_and_swap32(void *cpu_env, int num)
{
#ifdef TARGET_I386
uint32_t old = ((CPUX86State*)cpu_env)->regs[R_EAX];
uint32_t *value = (uint32_t*)((CPUX86State*)cpu_env)->regs[R_ECX];
DPRINTF("commpage: compare_and_swap32(%x,new,%p)\n", old, value);
if(value && old == tswap32(*value))
... | true | qemu | 70afb8ff90e9d922ed729e6dbabaff6d67c461aa | void do_compare_and_swap32(void *cpu_env, int num)
{
#ifdef TARGET_I386
uint32_t old = ((CPUX86State*)cpu_env)->regs[R_EAX];
uint32_t *value = (uint32_t*)((CPUX86State*)cpu_env)->regs[R_ECX];
DPRINTF("commpage: compare_and_swap32(%x,new,%p)\n", old, value);
if(value && old == tswap32(*value))
... | {
"code": [
" if(value && old == tswap32(*value))"
],
"line_no": [
15
]
} | void FUNC_0(void *VAR_0, int VAR_1)
{
#ifdef TARGET_I386
uint32_t old = ((CPUX86State*)VAR_0)->regs[R_EAX];
uint32_t *value = (uint32_t*)((CPUX86State*)VAR_0)->regs[R_ECX];
DPRINTF("commpage: compare_and_swap32(%x,new,%p)\n", old, value);
if(value && old == tswap32(*value))
{
uint3... | [
"void FUNC_0(void *VAR_0, int VAR_1)\n{",
"#ifdef TARGET_I386\nuint32_t old = ((CPUX86State*)VAR_0)->regs[R_EAX];",
"uint32_t *value = (uint32_t*)((CPUX86State*)VAR_0)->regs[R_ECX];",
"DPRINTF(\"commpage: compare_and_swap32(%x,new,%p)\\n\", old, value);",
"if(value && old == tswap32(*value))\n{",
"uint32_... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
15,
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
37
],
[
39
],
[
41,
43
],
[
45,
47
]
] |
25,667 | static void ready_residue(vorbis_enc_residue *rc, vorbis_enc_context *venc)
{
int i;
assert(rc->type == 2);
rc->maxes = av_mallocz(sizeof(float[2]) * rc->classifications);
for (i = 0; i < rc->classifications; i++) {
int j;
vorbis_enc_codebook * cb;
for (j = 0; j < 8; j++)... | true | FFmpeg | be8d812c9635f31f69c30dff9ebf565a07a7dab7 | static void ready_residue(vorbis_enc_residue *rc, vorbis_enc_context *venc)
{
int i;
assert(rc->type == 2);
rc->maxes = av_mallocz(sizeof(float[2]) * rc->classifications);
for (i = 0; i < rc->classifications; i++) {
int j;
vorbis_enc_codebook * cb;
for (j = 0; j < 8; j++)... | {
"code": [
"static void ready_residue(vorbis_enc_residue *rc, vorbis_enc_context *venc)"
],
"line_no": [
1
]
} | static void FUNC_0(vorbis_enc_residue *VAR_0, vorbis_enc_context *VAR_1)
{
int VAR_2;
assert(VAR_0->type == 2);
VAR_0->maxes = av_mallocz(sizeof(float[2]) * VAR_0->classifications);
for (VAR_2 = 0; VAR_2 < VAR_0->classifications; VAR_2++) {
int j;
vorbis_enc_codebook * cb;
... | [
"static void FUNC_0(vorbis_enc_residue *VAR_0, vorbis_enc_context *VAR_1)\n{",
"int VAR_2;",
"assert(VAR_0->type == 2);",
"VAR_0->maxes = av_mallocz(sizeof(float[2]) * VAR_0->classifications);",
"for (VAR_2 = 0; VAR_2 < VAR_0->classifications; VAR_2++) {",
"int j;",
"vorbis_enc_codebook * cb;",
"for (... | [
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
],
[
15
],
[
17
],
[
19,
21
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45,
47
... |
25,668 | BlockDriverState *bdrv_all_find_vmstate_bs(void)
{
bool not_found = true;
BlockDriverState *bs;
BdrvNextIterator *it = NULL;
while (not_found && (it = bdrv_next(it, &bs))) {
AioContext *ctx = bdrv_get_aio_context(bs);
aio_context_acquire(ctx);
not_found = !bdrv_can_sn... | true | qemu | 88be7b4be4aa17c88247e162bdd7577ea79db94f | BlockDriverState *bdrv_all_find_vmstate_bs(void)
{
bool not_found = true;
BlockDriverState *bs;
BdrvNextIterator *it = NULL;
while (not_found && (it = bdrv_next(it, &bs))) {
AioContext *ctx = bdrv_get_aio_context(bs);
aio_context_acquire(ctx);
not_found = !bdrv_can_sn... | {
"code": [
" BdrvNextIterator *it = NULL;",
" BdrvNextIterator *it = NULL;",
" BdrvNextIterator *it = NULL;",
" BlockDriverState *bs;",
" BdrvNextIterator *it = NULL;",
" BdrvNextIterator *it = NULL;",
" BdrvNextIterator *it = NULL;",
" BdrvNextIterator *it = N... | BlockDriverState *FUNC_0(void)
{
bool not_found = true;
BlockDriverState *bs;
BdrvNextIterator *it = NULL;
while (not_found && (it = bdrv_next(it, &bs))) {
AioContext *ctx = bdrv_get_aio_context(bs);
aio_context_acquire(ctx);
not_found = !bdrv_can_snapshot(bs);
... | [
"BlockDriverState *FUNC_0(void)\n{",
"bool not_found = true;",
"BlockDriverState *bs;",
"BdrvNextIterator *it = NULL;",
"while (not_found && (it = bdrv_next(it, &bs))) {",
"AioContext *ctx = bdrv_get_aio_context(bs);",
"aio_context_acquire(ctx);",
"not_found = !bdrv_can_snapshot(bs);",
"aio_context_... | [
0,
1,
1,
1,
1,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
25,671 | static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos,
int *outFilterSize, int xInc, int srcW,
int dstW, int filterAlign, int one,
int flags, int cpu_flags,
SwsVector *srcFilter, ... | false | FFmpeg | f61bece684d9685b07895508e6c1c733b5564ccf | static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos,
int *outFilterSize, int xInc, int srcW,
int dstW, int filterAlign, int one,
int flags, int cpu_flags,
SwsVector *srcFilter, ... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(int16_t **outFilter, int32_t **filterPos,
int *outFilterSize, int xInc, int srcW,
int dstW, int filterAlign, int one,
int flags, int cpu_flags,
SwsVector *srcFilter, SwsV... | [
"static av_cold int FUNC_0(int16_t **outFilter, int32_t **filterPos,\nint *outFilterSize, int xInc, int srcW,\nint dstW, int filterAlign, int one,\nint flags, int cpu_flags,\nSwsVector *srcFilter, SwsVector *dstFilter,\ndouble param[2], int is_horizontal)\n{",
"int VAR_8;",
"int VAR_1;",
"int VAR_2;",
"int ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49,
51
],
[
55
],
[
57
... |
25,673 | int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes,
const void *bits, int bits_wrap, int bits_size,
const void *codes, int codes_wrap, int codes_size,
const void *symbols, int symbols_wrap, int symbols_size,
int flag... | true | FFmpeg | aa74810fc6b9afe21c9be3725e3d078d10633670 | int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes,
const void *bits, int bits_wrap, int bits_size,
const void *codes, int codes_wrap, int codes_size,
const void *symbols, int symbols_wrap, int symbols_size,
int flag... | {
"code": [],
"line_no": []
} | int FUNC_0(VLC *VAR_0, int VAR_1, int VAR_2,
const void *VAR_3, int VAR_4, int VAR_5,
const void *VAR_6, int VAR_7, int VAR_8,
const void *VAR_9, int VAR_10, int VAR_11,
int VAR_12)
{
VLCcode *buf;
int VAR_13, VAR... | [
"int FUNC_0(VLC *VAR_0, int VAR_1, int VAR_2,\nconst void *VAR_3, int VAR_4, int VAR_5,\nconst void *VAR_6, int VAR_7, int VAR_8,\nconst void *VAR_9, int VAR_10, int VAR_11,\nint VAR_12)\n{",
"VLCcode *buf;",
"int VAR_13, VAR_14, VAR_15;",
"VAR_0->VAR_3 = VAR_1;",
"if (VAR_12 & INIT_VLC_USE_NEW_STATIC) {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
33,
35,
37,
39,
41
],
[
43
],
[
45
],
[
47,
49
],
[
51
],
[
53
],
[
55
],
[
57
... |
25,674 | static uint64_t macio_nvram_readb(void *opaque, hwaddr addr,
unsigned size)
{
MacIONVRAMState *s = opaque;
uint32_t value;
addr = (addr >> s->it_shift) & (s->size - 1);
value = s->data[addr];
NVR_DPRINTF("readb addr %04x val %x\n", (int)addr, value);
... | true | qemu | 2f448e415f364d0ec4c5556993e44ca183e31c5c | static uint64_t macio_nvram_readb(void *opaque, hwaddr addr,
unsigned size)
{
MacIONVRAMState *s = opaque;
uint32_t value;
addr = (addr >> s->it_shift) & (s->size - 1);
value = s->data[addr];
NVR_DPRINTF("readb addr %04x val %x\n", (int)addr, value);
... | {
"code": [
" NVR_DPRINTF(\"readb addr %04x val %x\\n\", (int)addr, value);"
],
"line_no": [
17
]
} | static uint64_t FUNC_0(void *opaque, hwaddr addr,
unsigned size)
{
MacIONVRAMState *s = opaque;
uint32_t value;
addr = (addr >> s->it_shift) & (s->size - 1);
value = s->data[addr];
NVR_DPRINTF("readb addr %04x val %x\n", (int)addr, value);
return val... | [
"static uint64_t FUNC_0(void *opaque, hwaddr addr,\nunsigned size)\n{",
"MacIONVRAMState *s = opaque;",
"uint32_t value;",
"addr = (addr >> s->it_shift) & (s->size - 1);",
"value = s->data[addr];",
"NVR_DPRINTF(\"readb addr %04x val %x\\n\", (int)addr, value);",
"return value;",
"}"
] | [
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
25,675 | void HELPER(v7m_msr)(CPUARMState *env, uint32_t reg, uint32_t val)
{
ARMCPU *cpu = arm_env_get_cpu(env);
switch (reg) {
case 0: /* APSR */
xpsr_write(env, val, 0xf8000000);
break;
case 1: /* IAPSR */
xpsr_write(env, val, 0xf8000000);
break;
case 2: /* EAPS... | true | qemu | 58117c9bb429cd9552d998687aa99088eb1d8528 | void HELPER(v7m_msr)(CPUARMState *env, uint32_t reg, uint32_t val)
{
ARMCPU *cpu = arm_env_get_cpu(env);
switch (reg) {
case 0:
xpsr_write(env, val, 0xf8000000);
break;
case 1:
xpsr_write(env, val, 0xf8000000);
break;
case 2:
xpsr_write(env, va... | {
"code": [
" ARMCPU *cpu = arm_env_get_cpu(env);",
" ARMCPU *cpu = arm_env_get_cpu(env);",
" xpsr_write(env, val, 0xf8000000);",
" break;",
" xpsr_write(env, val, 0xf8000000);",
" break;",
" xpsr_write(env, val, 0xfe00fc00);",
" break;",... | void FUNC_0(v7m_msr)(CPUARMState *env, uint32_t reg, uint32_t val)
{
ARMCPU *cpu = arm_env_get_cpu(env);
switch (reg) {
case 0:
xpsr_write(env, val, 0xf8000000);
break;
case 1:
xpsr_write(env, val, 0xf8000000);
break;
case 2:
xpsr_write(env, va... | [
"void FUNC_0(v7m_msr)(CPUARMState *env, uint32_t reg, uint32_t val)\n{",
"ARMCPU *cpu = arm_env_get_cpu(env);",
"switch (reg) {",
"case 0:\nxpsr_write(env, val, 0xf8000000);",
"break;",
"case 1:\nxpsr_write(env, val, 0xf8000000);",
"break;",
"case 2:\nxpsr_write(env, val, 0xfe00fc00);",
"break;",
... | [
0,
1,
0,
1,
1,
0,
0,
1,
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,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
39
],
[
41,
43
],
[
45
],
[
47,
49
],
[
51
],
... |
25,677 | AVRational av_d2q(double d, int max)
{
AVRational a;
int exponent;
int64_t den;
if (isnan(d))
return (AVRational) { 0,0 };
if (fabs(d) > INT_MAX + 3LL)
return (AVRational) { d < 0 ? -1 : 1, 0 };
frexp(d, &exponent);
exponent = FFMAX(exponent-1, 0);
den = 1LL <<... | false | FFmpeg | 7dabc78ce13e3baa37292f42df2364b4ccd2aa78 | AVRational av_d2q(double d, int max)
{
AVRational a;
int exponent;
int64_t den;
if (isnan(d))
return (AVRational) { 0,0 };
if (fabs(d) > INT_MAX + 3LL)
return (AVRational) { d < 0 ? -1 : 1, 0 };
frexp(d, &exponent);
exponent = FFMAX(exponent-1, 0);
den = 1LL <<... | {
"code": [],
"line_no": []
} | AVRational FUNC_0(double d, int max)
{
AVRational a;
int VAR_0;
int64_t den;
if (isnan(d))
return (AVRational) { 0,0 };
if (fabs(d) > INT_MAX + 3LL)
return (AVRational) { d < 0 ? -1 : 1, 0 };
frexp(d, &VAR_0);
VAR_0 = FFMAX(VAR_0-1, 0);
den = 1LL << (61 - VAR_0... | [
"AVRational FUNC_0(double d, int max)\n{",
"AVRational a;",
"int VAR_0;",
"int64_t den;",
"if (isnan(d))\nreturn (AVRational) { 0,0 };",
"if (fabs(d) > INT_MAX + 3LL)\nreturn (AVRational) { d < 0 ? -1 : 1, 0 };",
"frexp(d, &VAR_0);",
"VAR_0 = FFMAX(VAR_0-1, 0);",
"den = 1LL << (61 - VAR_0);",
"av_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29,
31
],
[
35
],
[
37
]
] |
25,678 | static unsigned tget(GetByteContext *gb, int type, int le)
{
switch (type) {
case TIFF_BYTE : return bytestream2_get_byteu(gb);
case TIFF_SHORT: return tget_short(gb, le);
case TIFF_LONG : return tget_long(gb, le);
default : return UINT_MAX;
}
}
| false | FFmpeg | ce1ebb31a9a0e556a89cd7681082af19fbc1cced | static unsigned tget(GetByteContext *gb, int type, int le)
{
switch (type) {
case TIFF_BYTE : return bytestream2_get_byteu(gb);
case TIFF_SHORT: return tget_short(gb, le);
case TIFF_LONG : return tget_long(gb, le);
default : return UINT_MAX;
}
}
| {
"code": [],
"line_no": []
} | static unsigned FUNC_0(GetByteContext *VAR_0, int VAR_1, int VAR_2)
{
switch (VAR_1) {
case TIFF_BYTE : return bytestream2_get_byteu(VAR_0);
case TIFF_SHORT: return tget_short(VAR_0, VAR_2);
case TIFF_LONG : return tget_long(VAR_0, VAR_2);
default : return UINT_MAX;
}
}
| [
"static unsigned FUNC_0(GetByteContext *VAR_0, int VAR_1, int VAR_2)\n{",
"switch (VAR_1) {",
"case TIFF_BYTE : return bytestream2_get_byteu(VAR_0);",
"case TIFF_SHORT: return tget_short(VAR_0, VAR_2);",
"case TIFF_LONG : return tget_long(VAR_0, VAR_2);",
"default : return UINT_MAX;",
"}",
"}"
... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
25,679 | PCIDevice *pci_pcnet_init(PCIBus *bus, NICInfo *nd, int devfn)
{
PCNetState *d;
uint8_t *pci_conf;
#if 0
printf("sizeof(RMD)=%d, sizeof(TMD)=%d\n",
sizeof(struct pcnet_RMD), sizeof(struct pcnet_TMD));
#endif
d = (PCNetState *)pci_register_device(bus, "PCNet", sizeof(PCNetState),
... | true | qemu | b946a1533209f61a93e34898aebb5b43154b99c3 | PCIDevice *pci_pcnet_init(PCIBus *bus, NICInfo *nd, int devfn)
{
PCNetState *d;
uint8_t *pci_conf;
#if 0
printf("sizeof(RMD)=%d, sizeof(TMD)=%d\n",
sizeof(struct pcnet_RMD), sizeof(struct pcnet_TMD));
#endif
d = (PCNetState *)pci_register_device(bus, "PCNet", sizeof(PCNetState),
... | {
"code": [
" pcnet_common_init(d, nd);",
" pcnet_common_init(d, nd);",
"#endif",
"#endif"
],
"line_no": [
93,
93,
17,
17
]
} | PCIDevice *FUNC_0(PCIBus *bus, NICInfo *nd, int devfn)
{
PCNetState *d;
uint8_t *pci_conf;
#if 0
printf("sizeof(RMD)=%d, sizeof(TMD)=%d\n",
sizeof(struct pcnet_RMD), sizeof(struct pcnet_TMD));
#endif
d = (PCNetState *)pci_register_device(bus, "PCNet", sizeof(PCNetState),
... | [
"PCIDevice *FUNC_0(PCIBus *bus, NICInfo *nd, int devfn)\n{",
"PCNetState *d;",
"uint8_t *pci_conf;",
"#if 0\nprintf(\"sizeof(RMD)=%d, sizeof(TMD)=%d\\n\",\nsizeof(struct pcnet_RMD), sizeof(struct pcnet_TMD));",
"#endif\nd = (PCNetState *)pci_register_device(bus, \"PCNet\", sizeof(PCNetState),\ndevfn, NULL, ... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13,
15
],
[
17,
21,
23
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
55
],
[
57... |
25,680 | void aio_notify(AioContext *ctx)
{
/* Write e.g. bh->scheduled before reading ctx->dispatching. */
smp_mb();
if (!ctx->dispatching) {
event_notifier_set(&ctx->notifier);
}
}
| true | qemu | eabc977973103527bbb8fed69c91cfaa6691f8ab | void aio_notify(AioContext *ctx)
{
smp_mb();
if (!ctx->dispatching) {
event_notifier_set(&ctx->notifier);
}
}
| {
"code": [
" if (!ctx->dispatching) {"
],
"line_no": [
9
]
} | void FUNC_0(AioContext *VAR_0)
{
smp_mb();
if (!VAR_0->dispatching) {
event_notifier_set(&VAR_0->notifier);
}
}
| [
"void FUNC_0(AioContext *VAR_0)\n{",
"smp_mb();",
"if (!VAR_0->dispatching) {",
"event_notifier_set(&VAR_0->notifier);",
"}",
"}"
] | [
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
25,681 | static void tb_invalidate_phys_page(tb_page_addr_t addr,
uintptr_t pc, void *puc)
{
TranslationBlock *tb;
PageDesc *p;
int n;
#ifdef TARGET_HAS_PRECISE_SMC
TranslationBlock *current_tb = NULL;
CPUState *cpu = current_cpu;
CPUArchState *env = NULL;
... | true | qemu | d02532f08e207419e412ea7cd4eb8b36f04f426d | static void tb_invalidate_phys_page(tb_page_addr_t addr,
uintptr_t pc, void *puc)
{
TranslationBlock *tb;
PageDesc *p;
int n;
#ifdef TARGET_HAS_PRECISE_SMC
TranslationBlock *current_tb = NULL;
CPUState *cpu = current_cpu;
CPUArchState *env = NULL;
... | {
"code": [
" uintptr_t pc, void *puc)"
],
"line_no": [
3
]
} | static void FUNC_0(tb_page_addr_t VAR_0,
uintptr_t VAR_1, void *VAR_2)
{
TranslationBlock *tb;
PageDesc *p;
int VAR_3;
#ifdef TARGET_HAS_PRECISE_SMC
TranslationBlock *current_tb = NULL;
CPUState *cpu = current_cpu;
CPUArchState *env = NULL;
int c... | [
"static void FUNC_0(tb_page_addr_t VAR_0,\nuintptr_t VAR_1, void *VAR_2)\n{",
"TranslationBlock *tb;",
"PageDesc *p;",
"int VAR_3;",
"#ifdef TARGET_HAS_PRECISE_SMC\nTranslationBlock *current_tb = NULL;",
"CPUState *cpu = current_cpu;",
"CPUArchState *env = NULL;",
"int current_tb_modified = 0;",
"ta... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
... |
25,683 | static int rtp_parse_mp4_au(PayloadContext *data, const uint8_t *buf)
{
int au_headers_length, au_header_size, i;
GetBitContext getbitcontext;
/* decode the first 2 bytes where the AUHeader sections are stored
length in bits */
au_headers_length = AV_RB16(buf);
if (au_headers_lengt... | true | FFmpeg | a7ba3244131d96d9ab7a99ef30dc7276efd05cc7 | static int rtp_parse_mp4_au(PayloadContext *data, const uint8_t *buf)
{
int au_headers_length, au_header_size, i;
GetBitContext getbitcontext;
au_headers_length = AV_RB16(buf);
if (au_headers_length > RTP_MAX_PACKET_LENGTH)
return -1;
data->au_headers_length_bytes = (au_he... | {
"code": [
"static int rtp_parse_mp4_au(PayloadContext *data, const uint8_t *buf)"
],
"line_no": [
1
]
} | static int FUNC_0(PayloadContext *VAR_0, const uint8_t *VAR_1)
{
int VAR_2, VAR_3, VAR_4;
GetBitContext getbitcontext;
VAR_2 = AV_RB16(VAR_1);
if (VAR_2 > RTP_MAX_PACKET_LENGTH)
return -1;
VAR_0->au_headers_length_bytes = (VAR_2 + 7) / 8;
VAR_1 += 2;
in... | [
"static int FUNC_0(PayloadContext *VAR_0, const uint8_t *VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4;",
"GetBitContext getbitcontext;",
"VAR_2 = AV_RB16(VAR_1);",
"if (VAR_2 > RTP_MAX_PACKET_LENGTH)\nreturn -1;",
"VAR_0->au_headers_length_bytes = (VAR_2 + 7) / 8;",
"VAR_1 += 2;",
"init_get_bits(&getbitcontex... | [
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,
3
],
[
5
],
[
7
],
[
15
],
[
19,
21
],
[
25
],
[
31
],
[
35
],
[
41
],
[
43,
45
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57,
59
],
[
61
],
[
63
],
[
73
],
... |
25,684 | static inline void RENAME(palToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width, uint32_t *pal)
{
int i;
assert(src1 == src2);
for(i=0; i<width; i++)
{
int p= pal[src1[i]];
dstU[i]= p>>8;
dstV[i]= p>>16;
}
}
| true | FFmpeg | 2da0d70d5eebe42f9fcd27ee554419ebe2a5da06 | static inline void RENAME(palToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width, uint32_t *pal)
{
int i;
assert(src1 == src2);
for(i=0; i<width; i++)
{
int p= pal[src1[i]];
dstU[i]= p>>8;
dstV[i]= p>>16;
}
}
| {
"code": [
"\tint i;",
"\tint i;",
"\tint i;",
"\tint i;",
"\tfor(i=0; i<width; i++)",
"\tint i;",
"\tfor(i=0; i<width; i++)",
" assert(src1 == src2);",
"\tint i;",
"\tfor(i=0; i<width; i++)",
"\tint i;",
"\tfor(i=0; i<width; i++)",
" assert(src1 == s... | static inline void FUNC_0(palToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width, uint32_t *pal)
{
int VAR_0;
assert(src1 == src2);
for(VAR_0=0; VAR_0<width; VAR_0++)
{
int p= pal[src1[VAR_0]];
dstU[VAR_0]= p>>8;
dstV[VAR_0]= p>>16;
}
}
| [
"static inline void FUNC_0(palToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width, uint32_t *pal)\n{",
"int VAR_0;",
"assert(src1 == src2);",
"for(VAR_0=0; VAR_0<width; VAR_0++)",
"{",
"int p= pal[src1[VAR_0]];",
"dstU[VAR_0]= p>>8;",
"dstV[VAR_0]= p>>16;",
"}",
"}"
] | [
0,
1,
1,
1,
0,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
25,685 | static uint64_t pl011_read(void *opaque, target_phys_addr_t offset,
unsigned size)
{
pl011_state *s = (pl011_state *)opaque;
uint32_t c;
if (offset >= 0xfe0 && offset < 0x1000) {
return s->id[(offset - 0xfe0) >> 2];
}
switch (offset >> 2) {
case 0: /... | true | qemu | 0d4abda8f7328c8911c1d020bb6961650eaf7801 | static uint64_t pl011_read(void *opaque, target_phys_addr_t offset,
unsigned size)
{
pl011_state *s = (pl011_state *)opaque;
uint32_t c;
if (offset >= 0xfe0 && offset < 0x1000) {
return s->id[(offset - 0xfe0) >> 2];
}
switch (offset >> 2) {
case 0:
... | {
"code": [
" qemu_chr_accept_input(s->chr);"
],
"line_no": [
49
]
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t offset,
unsigned size)
{
pl011_state *s = (pl011_state *)opaque;
uint32_t c;
if (offset >= 0xfe0 && offset < 0x1000) {
return s->id[(offset - 0xfe0) >> 2];
}
switch (offset >> 2) {
case 0:
... | [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t offset,\nunsigned size)\n{",
"pl011_state *s = (pl011_state *)opaque;",
"uint32_t c;",
"if (offset >= 0xfe0 && offset < 0x1000) {",
"return s->id[(offset - 0xfe0) >> 2];",
"}",
"switch (offset >> 2) {",
"case 0:\ns->flags &= ~PL011_FLAG_RXFF;",
... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
... |
25,688 | static void icp_pit_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
icp_pit_state *s = (icp_pit_state *)opaque;
int n;
n = offset >> 8;
if (n > 2) {
qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad timer %d\n", __func__, n);
}
arm_timer_... | true | qemu | cba933b2257ef0ad241756a0ff86bc0acda685ca | static void icp_pit_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
icp_pit_state *s = (icp_pit_state *)opaque;
int n;
n = offset >> 8;
if (n > 2) {
qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad timer %d\n", __func__, n);
}
arm_timer_... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
icp_pit_state *s = (icp_pit_state *)VAR_0;
int VAR_4;
VAR_4 = VAR_1 >> 8;
if (VAR_4 > 2) {
qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad timer %d\VAR_4", __func__, VAR_4);
}
... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"icp_pit_state *s = (icp_pit_state *)VAR_0;",
"int VAR_4;",
"VAR_4 = VAR_1 >> 8;",
"if (VAR_4 > 2) {",
"qemu_log_mask(LOG_GUEST_ERROR, \"%s: Bad timer %d\\VAR_4\", __func__, VAR_4);",
"}",
"arm_timer_write(s->timer[VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
20
],
[
24
],
[
26
]
] |
25,689 | static void targa_decode_rle(AVCodecContext *avctx, TargaContext *s, const uint8_t *src, uint8_t *dst, int w, int h, int stride, int bpp)
{
int i, x, y;
int depth = (bpp + 1) >> 3;
int type, count;
int diff;
diff = stride - w * depth;
x = y = 0;
while(y < h){
type = *src++... | true | FFmpeg | 7782cb207a09f4acf0b2a935ca81076b117660a2 | static void targa_decode_rle(AVCodecContext *avctx, TargaContext *s, const uint8_t *src, uint8_t *dst, int w, int h, int stride, int bpp)
{
int i, x, y;
int depth = (bpp + 1) >> 3;
int type, count;
int diff;
diff = stride - w * depth;
x = y = 0;
while(y < h){
type = *src++... | {
"code": [
"static void targa_decode_rle(AVCodecContext *avctx, TargaContext *s, const uint8_t *src, uint8_t *dst, int w, int h, int stride, int bpp)"
],
"line_no": [
1
]
} | static void FUNC_0(AVCodecContext *VAR_0, TargaContext *VAR_1, const uint8_t *VAR_2, uint8_t *VAR_3, int VAR_4, int VAR_5, int VAR_6, int VAR_7)
{
int VAR_8, VAR_9, VAR_10;
int VAR_11 = (VAR_7 + 1) >> 3;
int VAR_12, VAR_13;
int VAR_14;
VAR_14 = VAR_6 - VAR_4 * VAR_11;
VAR_9 = VAR_10 = 0... | [
"static void FUNC_0(AVCodecContext *VAR_0, TargaContext *VAR_1, const uint8_t *VAR_2, uint8_t *VAR_3, int VAR_4, int VAR_5, int VAR_6, int VAR_7)\n{",
"int VAR_8, VAR_9, VAR_10;",
"int VAR_11 = (VAR_7 + 1) >> 3;",
"int VAR_12, VAR_13;",
"int VAR_14;",
"VAR_14 = VAR_6 - VAR_4 * VAR_11;",
"VAR_9 = VAR_10 ... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[... |
25,690 | static int aasc_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AascContext *s = avctx->priv_data;
int compr, i, stride, psize;
s->frame.refere... | true | FFmpeg | e1631f8ebe9a8f2a9cca85d60160b9be94eb63f3 | static int aasc_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AascContext *s = avctx->priv_data;
int compr, i, stride, psize;
s->frame.refere... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
AascContext *s = VAR_0->priv_data;
int VAR_6, VAR_7, VAR_8, VAR_9;
s->frame.reference = 3;
... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"AascContext *s = VAR_0->priv_data;",
"int VAR_6, VAR_7, VAR_8, VAR_9;",
"s->frame.reference = 3;",
"s->frame.buffer_hints = FF_BUFFER_HINTS_VALI... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3,
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19,
20
],
[
21
],
[
22
],
[
... |
25,691 | int qcow2_pre_write_overlap_check(BlockDriverState *bs, int ign, int64_t offset,
int64_t size)
{
int ret = qcow2_check_metadata_overlap(bs, ign, offset, size);
if (ret < 0) {
return ret;
} else if (ret > 0) {
int metadata_ol_bitnr = ffs(ret) - 1;
... | true | qemu | adb435522b86b3fca2324cb8c94e17b55ae071f1 | int qcow2_pre_write_overlap_check(BlockDriverState *bs, int ign, int64_t offset,
int64_t size)
{
int ret = qcow2_check_metadata_overlap(bs, ign, offset, size);
if (ret < 0) {
return ret;
} else if (ret > 0) {
int metadata_ol_bitnr = ffs(ret) - 1;
... | {
"code": [
" char *message;",
" fprintf(stderr, \"qcow2: Preventing invalid write on metadata (overlaps \"",
" \"with %s); image marked as corrupt.\\n\",",
" metadata_ol_names[metadata_ol_bitnr]);",
" message = g_strdup_printf(\"Prevented %s over... | int FUNC_0(BlockDriverState *VAR_0, int VAR_1, int64_t VAR_2,
int64_t VAR_3)
{
int VAR_4 = qcow2_check_metadata_overlap(VAR_0, VAR_1, VAR_2, VAR_3);
if (VAR_4 < 0) {
return VAR_4;
} else if (VAR_4 > 0) {
int VAR_5 = ffs(VAR_4) - 1;
char *VA... | [
"int FUNC_0(BlockDriverState *VAR_0, int VAR_1, int64_t VAR_2,\nint64_t VAR_3)\n{",
"int VAR_4 = qcow2_check_metadata_overlap(VAR_0, VAR_1, VAR_2, VAR_3);",
"if (VAR_4 < 0) {",
"return VAR_4;",
"} else if (VAR_4 > 0) {",
"int VAR_5 = ffs(VAR_4) - 1;",
"char *VAR_6;",
"assert(VAR_5 < QCOW2_OL_MAX_BITNR... | [
0,
0,
0,
0,
0,
0,
1,
0,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27,
29
],
[
31
],
[
33,
35
],
[
37,
39,
41,
43,
45,
47,
49,
51
],
[
53
],
[
57
],
[
59... |
25,692 | static int dmg_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
BDRVDMGState *s = bs->opaque;
uint64_t info_begin, info_end, last_in_offset, last_out_offset;
uint32_t count, tmp;
uint32_t max_compressed_size = 1, max_sectors_per_chunk = 1, i;
int64_t offset;
... | true | qemu | c165f7758009a4f793c1fc19ebb69cf55313450b | static int dmg_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
BDRVDMGState *s = bs->opaque;
uint64_t info_begin, info_end, last_in_offset, last_out_offset;
uint32_t count, tmp;
uint32_t max_compressed_size = 1, max_sectors_per_chunk = 1, i;
int64_t offset;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1, int VAR_2,
Error **VAR_3)
{
BDRVDMGState *s = VAR_0->opaque;
uint64_t info_begin, info_end, last_in_offset, last_out_offset;
uint32_t count, tmp;
uint32_t max_compressed_size = 1, max_sectors_per_chunk = 1, i;
int64_t offse... | [
"static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1, int VAR_2,\nError **VAR_3)\n{",
"BDRVDMGState *s = VAR_0->opaque;",
"uint64_t info_begin, info_end, last_in_offset, last_out_offset;",
"uint32_t count, tmp;",
"uint32_t max_compressed_size = 1, max_sectors_per_chunk = 1, i;",
"int64_t offset;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
2,
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
],
[
... |
25,695 | int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
{
int len, nb_components, i, width, height, pix_fmt_id;
s->cur_scan = 0;
s->upscale_h = s->upscale_v = 0;
/* XXX: verify len field validity */
len = get_bits(&s->gb, 16);
s->bits = get_bits(&s->gb, 8);
if (s->pegasus_rct)
... | false | FFmpeg | a2f680c7bc7642c687aeb4e14d00ac74833c7a09 | int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
{
int len, nb_components, i, width, height, pix_fmt_id;
s->cur_scan = 0;
s->upscale_h = s->upscale_v = 0;
len = get_bits(&s->gb, 16);
s->bits = get_bits(&s->gb, 8);
if (s->pegasus_rct)
s->bits = 9;
if (s->bits ==... | {
"code": [],
"line_no": []
} | int FUNC_0(MJpegDecodeContext *VAR_0)
{
int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;
VAR_0->cur_scan = 0;
VAR_0->upscale_h = VAR_0->upscale_v = 0;
VAR_1 = get_bits(&VAR_0->gb, 16);
VAR_0->bits = get_bits(&VAR_0->gb, 8);
if (VAR_0->pegasus_rct)
VAR_0->bits = 9;
... | [
"int FUNC_0(MJpegDecodeContext *VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;",
"VAR_0->cur_scan = 0;",
"VAR_0->upscale_h = VAR_0->upscale_v = 0;",
"VAR_1 = get_bits(&VAR_0->gb, 16);",
"VAR_0->bits = get_bits(&VAR_0->gb, 8);",
"if (VAR_0->pegasus_rct)\nVAR_0->bits = 9;",
"if (VAR_0->b... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
17
],
[
19
],
[
23,
25
],
[
27,
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
],
[
61... |
25,696 | void bdrv_set_on_error(BlockDriverState *bs, BlockdevOnError on_read_error,
BlockdevOnError on_write_error)
{
bs->on_read_error = on_read_error;
bs->on_write_error = on_write_error;
}
| false | qemu | 61007b316cd71ee7333ff7a0a749a8949527575f | void bdrv_set_on_error(BlockDriverState *bs, BlockdevOnError on_read_error,
BlockdevOnError on_write_error)
{
bs->on_read_error = on_read_error;
bs->on_write_error = on_write_error;
}
| {
"code": [],
"line_no": []
} | void FUNC_0(BlockDriverState *VAR_0, BlockdevOnError VAR_1,
BlockdevOnError VAR_2)
{
VAR_0->VAR_1 = VAR_1;
VAR_0->VAR_2 = VAR_2;
}
| [
"void FUNC_0(BlockDriverState *VAR_0, BlockdevOnError VAR_1,\nBlockdevOnError VAR_2)\n{",
"VAR_0->VAR_1 = VAR_1;",
"VAR_0->VAR_2 = VAR_2;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
]
] |
25,697 | static void test_acpi_one(const char *params, test_data *data)
{
char *args;
uint8_t signature_low;
uint8_t signature_high;
uint16_t signature;
int i;
const char *device = "";
if (!g_strcmp0(data->machine, MACHINE_Q35)) {
device = ",id=hd -device ide-hd,drive=hd";
}
... | false | qemu | 4500bc98a6aab1734d865afaeade3509eb65b560 | static void test_acpi_one(const char *params, test_data *data)
{
char *args;
uint8_t signature_low;
uint8_t signature_high;
uint16_t signature;
int i;
const char *device = "";
if (!g_strcmp0(data->machine, MACHINE_Q35)) {
device = ",id=hd -device ide-hd,drive=hd";
}
... | {
"code": [],
"line_no": []
} | static void FUNC_0(const char *VAR_0, test_data *VAR_1)
{
char *VAR_2;
uint8_t signature_low;
uint8_t signature_high;
uint16_t signature;
int VAR_3;
const char *VAR_4 = "";
if (!g_strcmp0(VAR_1->machine, MACHINE_Q35)) {
VAR_4 = ",id=hd -VAR_4 ide-hd,drive=hd";
}
... | [
"static void FUNC_0(const char *VAR_0, test_data *VAR_1)\n{",
"char *VAR_2;",
"uint8_t signature_low;",
"uint8_t signature_high;",
"uint16_t signature;",
"int VAR_3;",
"const char *VAR_4 = \"\";",
"if (!g_strcmp0(VAR_1->machine, MACHINE_Q35)) {",
"VAR_4 = \",id=hd -VAR_4 ide-hd,drive=hd\";",
"}",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
31
],
[
37,
39,
51
],
[
53
],
[
55
],
[
57
],
[
59
],
[
61
],
[... |
25,698 | static void rocker_io_writel(void *opaque, hwaddr addr, uint32_t val)
{
Rocker *r = opaque;
if (rocker_addr_is_desc_reg(r, addr)) {
unsigned index = ROCKER_RING_INDEX(addr);
unsigned offset = addr & ROCKER_DMA_DESC_MASK;
switch (offset) {
case ROCKER_DMA_DESC_ADDR_OFFS... | false | qemu | 8caed3d564672e8bc6d2e4c6a35228afd01f4723 | static void rocker_io_writel(void *opaque, hwaddr addr, uint32_t val)
{
Rocker *r = opaque;
if (rocker_addr_is_desc_reg(r, addr)) {
unsigned index = ROCKER_RING_INDEX(addr);
unsigned offset = addr & ROCKER_DMA_DESC_MASK;
switch (offset) {
case ROCKER_DMA_DESC_ADDR_OFFS... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1, uint32_t VAR_2)
{
Rocker *r = VAR_0;
if (rocker_addr_is_desc_reg(r, VAR_1)) {
unsigned VAR_3 = ROCKER_RING_INDEX(VAR_1);
unsigned VAR_4 = VAR_1 & ROCKER_DMA_DESC_MASK;
switch (VAR_4) {
case ROCKER_DMA_DESC_ADDR_OFFSET:
... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1, uint32_t VAR_2)\n{",
"Rocker *r = VAR_0;",
"if (rocker_addr_is_desc_reg(r, VAR_1)) {",
"unsigned VAR_3 = ROCKER_RING_INDEX(VAR_1);",
"unsigned VAR_4 = VAR_1 & ROCKER_DMA_DESC_MASK;",
"switch (VAR_4) {",
"case ROCKER_DMA_DESC_ADDR_OFFSET:\nr->lower32 = (uint... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19,
21
],
[
23
],
[
25,
27,
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
... |
25,699 | build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets)
{
AcpiRsdtDescriptorRev1 *rsdt;
size_t rsdt_len;
int i;
const int table_data_len = (sizeof(uint32_t) * table_offsets->len);
rsdt_len = sizeof(*rsdt) + table_data_len;
rsdt = acpi_data_push(table_data, rsdt_len);
... | false | qemu | 5151355898699eb66fad0a710b8b6011690a0dfc | build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets)
{
AcpiRsdtDescriptorRev1 *rsdt;
size_t rsdt_len;
int i;
const int table_data_len = (sizeof(uint32_t) * table_offsets->len);
rsdt_len = sizeof(*rsdt) + table_data_len;
rsdt = acpi_data_push(table_data, rsdt_len);
... | {
"code": [],
"line_no": []
} | FUNC_0(GArray *VAR_0, GArray *VAR_1, GArray *VAR_2)
{
AcpiRsdtDescriptorRev1 *rsdt;
size_t rsdt_len;
int VAR_3;
const int VAR_4 = (sizeof(uint32_t) * VAR_2->len);
rsdt_len = sizeof(*rsdt) + VAR_4;
rsdt = acpi_data_push(VAR_0, rsdt_len);
memcpy(rsdt->table_offset_entry, VAR_2->data,... | [
"FUNC_0(GArray *VAR_0, GArray *VAR_1, GArray *VAR_2)\n{",
"AcpiRsdtDescriptorRev1 *rsdt;",
"size_t rsdt_len;",
"int VAR_3;",
"const int VAR_4 = (sizeof(uint32_t) * VAR_2->len);",
"rsdt_len = sizeof(*rsdt) + VAR_4;",
"rsdt = acpi_data_push(VAR_0, rsdt_len);",
"memcpy(rsdt->table_offset_entry, VAR_2->da... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27,
29,
31,
33
],
[
35
],
[
37,
39
],
[
41
]
] |
25,700 | int nbd_client_session_co_writev(NbdClientSession *client, int64_t sector_num,
int nb_sectors, QEMUIOVector *qiov)
{
int offset = 0;
int ret;
while (nb_sectors > NBD_MAX_SECTORS) {
ret = nbd_co_writev_1(client, sector_num,
NBD_MAX... | false | qemu | f53a829bb9ef14be800556cbc02d8b20fc1050a7 | int nbd_client_session_co_writev(NbdClientSession *client, int64_t sector_num,
int nb_sectors, QEMUIOVector *qiov)
{
int offset = 0;
int ret;
while (nb_sectors > NBD_MAX_SECTORS) {
ret = nbd_co_writev_1(client, sector_num,
NBD_MAX... | {
"code": [],
"line_no": []
} | int FUNC_0(NbdClientSession *VAR_0, int64_t VAR_1,
int VAR_2, QEMUIOVector *VAR_3)
{
int VAR_4 = 0;
int VAR_5;
while (VAR_2 > NBD_MAX_SECTORS) {
VAR_5 = nbd_co_writev_1(VAR_0, VAR_1,
NBD_MAX_SECTORS, VAR_3, VAR_4);
if (VA... | [
"int FUNC_0(NbdClientSession *VAR_0, int64_t VAR_1,\nint VAR_2, QEMUIOVector *VAR_3)\n{",
"int VAR_4 = 0;",
"int VAR_5;",
"while (VAR_2 > NBD_MAX_SECTORS) {",
"VAR_5 = nbd_co_writev_1(VAR_0, VAR_1,\nNBD_MAX_SECTORS, VAR_3, VAR_4);",
"if (VAR_5 < 0) {",
"return VAR_5;",
"}",
"VAR_4 += NBD_MAX_SECTORS... | [
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
]
] |
25,701 | static int scsi_disk_emulate_mode_sense(SCSIDiskReq *r, uint8_t *outbuf)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
uint64_t nb_sectors;
bool dbd;
int page, buflen, ret, page_control;
uint8_t *p;
uint8_t dev_specific_param;
dbd = (r->req.cmd.buf[1] & 0x8) != 0... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | static int scsi_disk_emulate_mode_sense(SCSIDiskReq *r, uint8_t *outbuf)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
uint64_t nb_sectors;
bool dbd;
int page, buflen, ret, page_control;
uint8_t *p;
uint8_t dev_specific_param;
dbd = (r->req.cmd.buf[1] & 0x8) != 0... | {
"code": [],
"line_no": []
} | static int FUNC_0(SCSIDiskReq *VAR_0, uint8_t *VAR_1)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0->req.dev);
uint64_t nb_sectors;
bool dbd;
int VAR_2, VAR_3, VAR_4, VAR_5;
uint8_t *p;
uint8_t dev_specific_param;
dbd = (VAR_0->req.cmd.buf[1] & 0x8) != 0;
VAR_2 = V... | [
"static int FUNC_0(SCSIDiskReq *VAR_0, uint8_t *VAR_1)\n{",
"SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0->req.dev);",
"uint64_t nb_sectors;",
"bool dbd;",
"int VAR_2, VAR_3, VAR_4, VAR_5;",
"uint8_t *p;",
"uint8_t dev_specific_param;",
"dbd = (VAR_0->req.cmd.buf[1] & 0x8) != 0;",
"VAR_2 ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
25,702 | static void qemu_chr_parse_pipe(QemuOpts *opts, ChardevBackend *backend,
Error **errp)
{
const char *device = qemu_opt_get(opts, "path");
ChardevHostdev *dev;
if (device == NULL) {
error_setg(errp, "chardev: pipe: no device path given");
return;
... | false | qemu | 32bafa8fdd098d52fbf1102d5a5e48d29398c0aa | static void qemu_chr_parse_pipe(QemuOpts *opts, ChardevBackend *backend,
Error **errp)
{
const char *device = qemu_opt_get(opts, "path");
ChardevHostdev *dev;
if (device == NULL) {
error_setg(errp, "chardev: pipe: no device path given");
return;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(QemuOpts *VAR_0, ChardevBackend *VAR_1,
Error **VAR_2)
{
const char *VAR_3 = qemu_opt_get(VAR_0, "path");
ChardevHostdev *dev;
if (VAR_3 == NULL) {
error_setg(VAR_2, "chardev: pipe: no VAR_3 path given");
return;
}
dev = V... | [
"static void FUNC_0(QemuOpts *VAR_0, ChardevBackend *VAR_1,\nError **VAR_2)\n{",
"const char *VAR_3 = qemu_opt_get(VAR_0, \"path\");",
"ChardevHostdev *dev;",
"if (VAR_3 == NULL) {",
"error_setg(VAR_2, \"chardev: pipe: no VAR_3 path given\");",
"return;",
"}",
"dev = VAR_1->u.pipe = g_new0(ChardevHost... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
25,703 | static int mov_read_stts(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
{
AVStream *st = c->fc->streams[c->fc->nb_streams-1];
MOVStreamContext *sc = st->priv_data;
unsigned int i, entries;
int64_t duration=0;
int64_t total_sample_count=0;
get_byte(pb); /* version */
get_be24(pb); ... | false | FFmpeg | 6a63ff19b6a7fe3bc32c7fb4a62fca8f65786432 | static int mov_read_stts(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
{
AVStream *st = c->fc->streams[c->fc->nb_streams-1];
MOVStreamContext *sc = st->priv_data;
unsigned int i, entries;
int64_t duration=0;
int64_t total_sample_count=0;
get_byte(pb);
get_be24(pb);
entries... | {
"code": [],
"line_no": []
} | static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOVAtom VAR_2)
{
AVStream *st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1];
MOVStreamContext *sc = st->priv_data;
unsigned int VAR_3, VAR_4;
int64_t duration=0;
int64_t total_sample_count=0;
get_byte(VAR_1);
get_be24(VAR_... | [
"static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOVAtom VAR_2)\n{",
"AVStream *st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1];",
"MOVStreamContext *sc = st->priv_data;",
"unsigned int VAR_3, VAR_4;",
"int64_t duration=0;",
"int64_t total_sample_count=0;",
"get_byte(VAR_1);",
"get_be24(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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
... |
25,705 | static void bt_submit_sco(struct HCIInfo *info,
const uint8_t *data, int length)
{
struct bt_hci_s *hci = hci_from_info(info);
uint16_t handle;
int datalen;
if (length < 3)
return;
handle = acl_handle((data[1] << 8) | data[0]);
datalen = data[2];
length ... | false | qemu | a89f364ae8740dfc31b321eed9ee454e996dc3c1 | static void bt_submit_sco(struct HCIInfo *info,
const uint8_t *data, int length)
{
struct bt_hci_s *hci = hci_from_info(info);
uint16_t handle;
int datalen;
if (length < 3)
return;
handle = acl_handle((data[1] << 8) | data[0]);
datalen = data[2];
length ... | {
"code": [],
"line_no": []
} | static void FUNC_0(struct HCIInfo *VAR_0,
const uint8_t *VAR_1, int VAR_2)
{
struct bt_hci_s *VAR_3 = hci_from_info(VAR_0);
uint16_t handle;
int VAR_4;
if (VAR_2 < 3)
return;
handle = acl_handle((VAR_1[1] << 8) | VAR_1[0]);
VAR_4 = VAR_1[2];
VAR_2 -= 3;
... | [
"static void FUNC_0(struct HCIInfo *VAR_0,\nconst uint8_t *VAR_1, int VAR_2)\n{",
"struct bt_hci_s *VAR_3 = hci_from_info(VAR_0);",
"uint16_t handle;",
"int VAR_4;",
"if (VAR_2 < 3)\nreturn;",
"handle = acl_handle((VAR_1[1] << 8) | VAR_1[0]);",
"VAR_4 = VAR_1[2];",
"VAR_2 -= 3;",
"if (bt_hci_handle_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
[
65
]
] |
25,707 | static void do_v7m_exception_exit(ARMCPU *cpu)
{
CPUARMState *env = &cpu->env;
uint32_t type;
uint32_t xpsr;
bool ufault = false;
bool return_to_sp_process = false;
bool return_to_handler = false;
bool rettobase = false;
/* We can only get here from an EXCP_EXCEPTION_EXIT, and... | false | qemu | 334e8dad7a109d15cb20b090131374ae98682a50 | static void do_v7m_exception_exit(ARMCPU *cpu)
{
CPUARMState *env = &cpu->env;
uint32_t type;
uint32_t xpsr;
bool ufault = false;
bool return_to_sp_process = false;
bool return_to_handler = false;
bool rettobase = false;
assert(arm_v7m_is_handler_mode(env));
... | {
"code": [],
"line_no": []
} | static void FUNC_0(ARMCPU *VAR_0)
{
CPUARMState *env = &VAR_0->env;
uint32_t type;
uint32_t xpsr;
bool ufault = false;
bool return_to_sp_process = false;
bool return_to_handler = false;
bool rettobase = false;
assert(arm_v7m_is_handler_mode(env));
... | [
"static void FUNC_0(ARMCPU *VAR_0)\n{",
"CPUARMState *env = &VAR_0->env;",
"uint32_t type;",
"uint32_t xpsr;",
"bool ufault = false;",
"bool return_to_sp_process = false;",
"bool return_to_handler = false;",
"bool rettobase = false;",
"assert(arm_v7m_is_handler_mode(env));",
"type = env->regs[15];... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
49
],
[
51
],
[
53
],
[
55
],
[
59,
61,
63
],
[
67
],
[
69,
71
],
[
73
],
[
77
],
[... |
25,708 | static int check_refcounts_l2(BlockDriverState *bs, BdrvCheckResult *res,
uint16_t *refcount_table, int refcount_table_size, int64_t l2_offset,
int flags)
{
BDRVQcowState *s = bs->opaque;
uint64_t *l2_table, l2_entry;
uint64_t next_contiguous_offset = 0;
int i, l2_size, nb_csectors;
... | false | qemu | 713d9675e0e31c627d08b6a33d3a92e4b8505b40 | static int check_refcounts_l2(BlockDriverState *bs, BdrvCheckResult *res,
uint16_t *refcount_table, int refcount_table_size, int64_t l2_offset,
int flags)
{
BDRVQcowState *s = bs->opaque;
uint64_t *l2_table, l2_entry;
uint64_t next_contiguous_offset = 0;
int i, l2_size, nb_csectors;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, BdrvCheckResult *VAR_1,
uint16_t *VAR_2, int VAR_3, int64_t VAR_4,
int VAR_5)
{
BDRVQcowState *s = VAR_0->opaque;
uint64_t *l2_table, l2_entry;
uint64_t next_contiguous_offset = 0;
int VAR_6, VAR_7, VAR_8;
VAR_7 = s->VAR_7 * sizeof(u... | [
"static int FUNC_0(BlockDriverState *VAR_0, BdrvCheckResult *VAR_1,\nuint16_t *VAR_2, int VAR_3, int64_t VAR_4,\nint VAR_5)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"uint64_t *l2_table, l2_entry;",
"uint64_t next_contiguous_offset = 0;",
"int VAR_6, VAR_7, VAR_8;",
"VAR_7 = s->VAR_7 * sizeof(uint64_t);",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
],
[
23
],
[
27,
29
],
[
35
],
[
37
],
[
41
],
[
43,
47
],
[
49,
51,
53
],
[
55
],
[
57
],
[
59
],
[
65,... |
25,709 | static inline void gen_op_fcmpq(int fccno)
{
switch (fccno) {
case 0:
gen_helper_fcmpq(cpu_env);
break;
case 1:
gen_helper_fcmpq_fcc1(cpu_env);
break;
case 2:
gen_helper_fcmpq_fcc2(cpu_env);
break;
case 3:
gen_helper_fcmpq_fcc3(cpu... | false | qemu | 7385aed20db5d83979f683b9d0048674411e963c | static inline void gen_op_fcmpq(int fccno)
{
switch (fccno) {
case 0:
gen_helper_fcmpq(cpu_env);
break;
case 1:
gen_helper_fcmpq_fcc1(cpu_env);
break;
case 2:
gen_helper_fcmpq_fcc2(cpu_env);
break;
case 3:
gen_helper_fcmpq_fcc3(cpu... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(int VAR_0)
{
switch (VAR_0) {
case 0:
gen_helper_fcmpq(cpu_env);
break;
case 1:
gen_helper_fcmpq_fcc1(cpu_env);
break;
case 2:
gen_helper_fcmpq_fcc2(cpu_env);
break;
case 3:
gen_helper_fcmpq_fcc3(cpu_env);... | [
"static inline void FUNC_0(int VAR_0)\n{",
"switch (VAR_0) {",
"case 0:\ngen_helper_fcmpq(cpu_env);",
"break;",
"case 1:\ngen_helper_fcmpq_fcc1(cpu_env);",
"break;",
"case 2:\ngen_helper_fcmpq_fcc2(cpu_env);",
"break;",
"case 3:\ngen_helper_fcmpq_fcc3(cpu_env);",
"break;",
"}",
"}"
] | [
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
]
] |
25,712 | static int proxy_closedir(FsContext *ctx, V9fsFidOpenState *fs)
{
return closedir(fs->dir);
}
| false | qemu | 494a8ebe713055d3946183f4b395f85a18b43e9e | static int proxy_closedir(FsContext *ctx, V9fsFidOpenState *fs)
{
return closedir(fs->dir);
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0, V9fsFidOpenState *VAR_1)
{
return closedir(VAR_1->dir);
}
| [
"static int FUNC_0(FsContext *VAR_0, V9fsFidOpenState *VAR_1)\n{",
"return closedir(VAR_1->dir);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
25,715 | static int ne2000_can_receive(void *opaque)
{
NE2000State *s = opaque;
int avail, index, boundary;
if (s->cmd & E8390_STOP)
return 0;
index = s->curpag << 8;
boundary = s->boundary << 8;
if (index < boundary)
avail = boundary - index;
else
avail = (s-... | true | qemu | d861b05ea30e6ac177de9b679da96194ebe21afc | static int ne2000_can_receive(void *opaque)
{
NE2000State *s = opaque;
int avail, index, boundary;
if (s->cmd & E8390_STOP)
return 0;
index = s->curpag << 8;
boundary = s->boundary << 8;
if (index < boundary)
avail = boundary - index;
else
avail = (s-... | {
"code": [
"static int ne2000_can_receive(void *opaque)",
" NE2000State *s = opaque;",
" if (s->cmd & E8390_STOP)",
" return 0;",
" return 0;",
" return MAX_ETH_FRAME_SIZE;"
],
"line_no": [
1,
5,
11,
13,
13,
31
]
} | static int FUNC_0(void *VAR_0)
{
NE2000State *s = VAR_0;
int VAR_1, VAR_2, VAR_3;
if (s->cmd & E8390_STOP)
return 0;
VAR_2 = s->curpag << 8;
VAR_3 = s->VAR_3 << 8;
if (VAR_2 < VAR_3)
VAR_1 = VAR_3 - VAR_2;
else
VAR_1 = (s->stop - s->start) - (VAR_2 - ... | [
"static int FUNC_0(void *VAR_0)\n{",
"NE2000State *s = VAR_0;",
"int VAR_1, VAR_2, VAR_3;",
"if (s->cmd & E8390_STOP)\nreturn 0;",
"VAR_2 = s->curpag << 8;",
"VAR_3 = s->VAR_3 << 8;",
"if (VAR_2 < VAR_3)\nVAR_1 = VAR_3 - VAR_2;",
"else\nVAR_1 = (s->stop - s->start) - (VAR_2 - VAR_3);",
"if (VAR_1 < ... | [
1,
1,
0,
1,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15
],
[
17
],
[
19,
21
],
[
23,
25
],
[
27,
29
],
[
31
],
[
33
]
] |
25,716 | static void test_qemu_strtoll_invalid(void)
{
const char *str = " xxxx \t abc";
char f = 'X';
const char *endptr = &f;
int64_t res = 999;
int err;
err = qemu_strtoll(str, &endptr, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert(endptr == str);
}
| true | qemu | 47d4be12c3997343e436c6cca89aefbbbeb70863 | static void test_qemu_strtoll_invalid(void)
{
const char *str = " xxxx \t abc";
char f = 'X';
const char *endptr = &f;
int64_t res = 999;
int err;
err = qemu_strtoll(str, &endptr, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert(endptr == str);
}
| {
"code": [
" g_assert_cmpint(err, ==, 0);",
" g_assert(endptr == str);",
" g_assert_cmpint(err, ==, 0);",
" g_assert(endptr == str);",
" g_assert_cmpint(err, ==, 0);",
" g_assert(endptr == str);",
" g_assert_cmpint(err, ==, 0);",
" g_assert_cmpint(err, ==, 0);"... | static void FUNC_0(void)
{
const char *VAR_0 = " xxxx \t abc";
char VAR_1 = 'X';
const char *VAR_2 = &VAR_1;
int64_t res = 999;
int VAR_3;
VAR_3 = qemu_strtoll(VAR_0, &VAR_2, 0, &res);
g_assert_cmpint(VAR_3, ==, 0);
g_assert(VAR_2 == VAR_0);
}
| [
"static void FUNC_0(void)\n{",
"const char *VAR_0 = \" xxxx \\t abc\";",
"char VAR_1 = 'X';",
"const char *VAR_2 = &VAR_1;",
"int64_t res = 999;",
"int VAR_3;",
"VAR_3 = qemu_strtoll(VAR_0, &VAR_2, 0, &res);",
"g_assert_cmpint(VAR_3, ==, 0);",
"g_assert(VAR_2 == VAR_0);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
]
] |
25,718 | static int decode_i_picture_secondary_header(VC9Context *v)
{
int status;
#if HAS_ADVANCED_PROFILE
if (v->profile > PROFILE_MAIN)
{
v->s.ac_pred = get_bits(&v->s.gb, 1);
if (v->postprocflag) v->postproc = get_bits(&v->s.gb, 1);
/* 7.1.1.34 + 8.5.2 */
if (v->overlap &... | true | FFmpeg | 7cc84d241ba6ef8e27e4d057176a4ad385ad3d59 | static int decode_i_picture_secondary_header(VC9Context *v)
{
int status;
#if HAS_ADVANCED_PROFILE
if (v->profile > PROFILE_MAIN)
{
v->s.ac_pred = get_bits(&v->s.gb, 1);
if (v->postprocflag) v->postproc = get_bits(&v->s.gb, 1);
if (v->overlap && v->pq<9)
{
... | {
"code": [
"#endif",
"#endif",
"# endif",
"#endif",
"#endif",
" if (v->profile > PROFILE_MAIN)",
"#endif",
"# if TRACE",
"# endif",
" if (v->profile > PROFILE_MAIN)",
" if (v->profile > PROFILE_MAIN)",
" if (v->profile > PROFILE_MAIN)",
" if (v->p... | static int FUNC_0(VC9Context *VAR_0)
{
int VAR_1;
#if HAS_ADVANCED_PROFILE
if (VAR_0->profile > PROFILE_MAIN)
{
VAR_0->s.ac_pred = get_bits(&VAR_0->s.gb, 1);
if (VAR_0->postprocflag) VAR_0->postproc = get_bits(&VAR_0->s.gb, 1);
if (VAR_0->overlap && VAR_0->pq<9)
... | [
"static int FUNC_0(VC9Context *VAR_0)\n{",
"int VAR_1;",
"#if HAS_ADVANCED_PROFILE\nif (VAR_0->profile > PROFILE_MAIN)\n{",
"VAR_0->s.ac_pred = get_bits(&VAR_0->s.gb, 1);",
"if (VAR_0->postprocflag) VAR_0->postproc = get_bits(&VAR_0->s.gb, 1);",
"if (VAR_0->overlap && VAR_0->pq<9)\n{",
"VAR_0->condover ... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7,
9,
11
],
[
13
],
[
15
],
[
19,
21
],
[
23
],
[
25,
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39,
41,
43
],
[
45,
47
],
[
49
],
[
51
... |
25,719 | void visit_type_enum(Visitor *v, int *obj, const char *strings[],
const char *kind, const char *name, Error **errp)
{
if (!error_is_set(errp)) {
v->type_enum(v, obj, strings, kind, name, errp);
}
}
| true | qemu | 297a3646c2947ee64a6d42ca264039732c6218e0 | void visit_type_enum(Visitor *v, int *obj, const char *strings[],
const char *kind, const char *name, Error **errp)
{
if (!error_is_set(errp)) {
v->type_enum(v, obj, strings, kind, name, errp);
}
}
| {
"code": [
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" v->type_enum(v, obj, strings, kind, name, errp);",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!... | void FUNC_0(Visitor *VAR_0, int *VAR_1, const char *VAR_2[],
const char *VAR_3, const char *VAR_4, Error **VAR_5)
{
if (!error_is_set(VAR_5)) {
VAR_0->type_enum(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5);
}
}
| [
"void FUNC_0(Visitor *VAR_0, int *VAR_1, const char *VAR_2[],\nconst char *VAR_3, const char *VAR_4, Error **VAR_5)\n{",
"if (!error_is_set(VAR_5)) {",
"VAR_0->type_enum(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5);",
"}",
"}"
] | [
0,
1,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
25,720 | static AVStream *get_subtitle_pkt(AVFormatContext *s, AVStream *next_st,
AVPacket *pkt)
{
AVIStream *ast, *next_ast = next_st->priv_data;
int64_t ts, next_ts, ts_min = INT64_MAX;
AVStream *st, *sub_st = NULL;
int i;
next_ts = av_rescale_q(next_ast->frame_of... | true | FFmpeg | 4ed899f2c5848b75b61d13ad42942ecc2a4386f9 | static AVStream *get_subtitle_pkt(AVFormatContext *s, AVStream *next_st,
AVPacket *pkt)
{
AVIStream *ast, *next_ast = next_st->priv_data;
int64_t ts, next_ts, ts_min = INT64_MAX;
AVStream *st, *sub_st = NULL;
int i;
next_ts = av_rescale_q(next_ast->frame_of... | {
"code": [
" if (st->discard < AVDISCARD_ALL && ast->sub_pkt.data) {"
],
"line_no": [
29
]
} | static AVStream *FUNC_0(AVFormatContext *s, AVStream *next_st,
AVPacket *pkt)
{
AVIStream *ast, *next_ast = next_st->priv_data;
int64_t ts, next_ts, ts_min = INT64_MAX;
AVStream *st, *sub_st = NULL;
int VAR_0;
next_ts = av_rescale_q(next_ast->frame_offset, ... | [
"static AVStream *FUNC_0(AVFormatContext *s, AVStream *next_st,\nAVPacket *pkt)\n{",
"AVIStream *ast, *next_ast = next_st->priv_data;",
"int64_t ts, next_ts, ts_min = INT64_MAX;",
"AVStream *st, *sub_st = NULL;",
"int VAR_0;",
"next_ts = av_rescale_q(next_ast->frame_offset, next_st->time_base,\nAV_TIME_BA... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
... |
25,721 | static void adb_keyboard_event(DeviceState *dev, QemuConsole *src,
InputEvent *evt)
{
KBDState *s = (KBDState *)dev;
int qcode, keycode;
qcode = qemu_input_key_value_to_qcode(evt->u.key.data->key);
if (qcode >= ARRAY_SIZE(qcode_to_adb_keycode)) {
return;
... | true | qemu | 77cb0f5aafc8e6d0c6d3c339f381c9b7921648e0 | static void adb_keyboard_event(DeviceState *dev, QemuConsole *src,
InputEvent *evt)
{
KBDState *s = (KBDState *)dev;
int qcode, keycode;
qcode = qemu_input_key_value_to_qcode(evt->u.key.data->key);
if (qcode >= ARRAY_SIZE(qcode_to_adb_keycode)) {
return;
... | {
"code": [
"static void adb_keyboard_event(DeviceState *dev, QemuConsole *src,",
" InputEvent *evt)",
" KBDState *s = (KBDState *)dev;",
" int qcode, keycode;",
" qcode = qemu_input_key_value_to_qcode(evt->u.key.data->key);",
" if (qcode >= ARRAY_SIZE... | static void FUNC_0(DeviceState *VAR_0, QemuConsole *VAR_1,
InputEvent *VAR_2)
{
KBDState *s = (KBDState *)VAR_0;
int VAR_3, VAR_4;
VAR_3 = qemu_input_key_value_to_qcode(VAR_2->u.key.data->key);
if (VAR_3 >= ARRAY_SIZE(qcode_to_adb_keycode)) {
return;
... | [
"static void FUNC_0(DeviceState *VAR_0, QemuConsole *VAR_1,\nInputEvent *VAR_2)\n{",
"KBDState *s = (KBDState *)VAR_0;",
"int VAR_3, VAR_4;",
"VAR_3 = qemu_input_key_value_to_qcode(VAR_2->u.key.data->key);",
"if (VAR_3 >= ARRAY_SIZE(qcode_to_adb_keycode)) {",
"return;",
"}",
"VAR_4 = qcode_to_adb_keyc... | [
1,
1,
1,
1,
1,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
]
] |
25,722 | void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
{
mm_flags = mm_support();
if (avctx->dsp_mask) {
if (avctx->dsp_mask & FF_MM_FORCE)
mm_flags |= (avctx->dsp_mask & 0xffff);
else
mm_flags &= ~(avctx->dsp_mask & 0xffff);
}
#if 0
av_log(avct... | false | FFmpeg | daa1ea049a9445b7bed03963cb789497065dd1eb | void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
{
mm_flags = mm_support();
if (avctx->dsp_mask) {
if (avctx->dsp_mask & FF_MM_FORCE)
mm_flags |= (avctx->dsp_mask & 0xffff);
else
mm_flags &= ~(avctx->dsp_mask & 0xffff);
}
#if 0
av_log(avct... | {
"code": [],
"line_no": []
} | void FUNC_0(DSPContext* VAR_0, AVCodecContext *VAR_1)
{
mm_flags = mm_support();
if (VAR_1->dsp_mask) {
if (VAR_1->dsp_mask & FF_MM_FORCE)
mm_flags |= (VAR_1->dsp_mask & 0xffff);
else
mm_flags &= ~(VAR_1->dsp_mask & 0xffff);
}
#if 0
av_log(VAR_1, AV_... | [
"void FUNC_0(DSPContext* VAR_0, AVCodecContext *VAR_1)\n{",
"mm_flags = mm_support();",
"if (VAR_1->dsp_mask) {",
"if (VAR_1->dsp_mask & FF_MM_FORCE)\nmm_flags |= (VAR_1->dsp_mask & 0xffff);",
"else\nmm_flags &= ~(VAR_1->dsp_mask & 0xffff);",
"}",
"#if 0\nav_log(VAR_1, AV_LOG_INFO, \"libavcodec: CPU fla... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15,
17
],
[
19
],
[
23,
25
],
[
27,
29
],
[
31,
33
],
[
35,
37
],
[
39,
41
],
[
43,
45
],
[
47
],
[
49,
53
],
[
55
],
... |
25,723 | static void iscsi_retry_timer_expired(void *opaque)
{
struct IscsiTask *iTask = opaque;
iTask->complete = 1;
if (iTask->co) {
qemu_coroutine_enter(iTask->co, NULL);
}
}
| true | qemu | 0b8b8753e4d94901627b3e86431230f2319215c4 | static void iscsi_retry_timer_expired(void *opaque)
{
struct IscsiTask *iTask = opaque;
iTask->complete = 1;
if (iTask->co) {
qemu_coroutine_enter(iTask->co, NULL);
}
}
| {
"code": [
" qemu_coroutine_enter(iTask->co, NULL);"
],
"line_no": [
11
]
} | static void FUNC_0(void *VAR_0)
{
struct IscsiTask *VAR_1 = VAR_0;
VAR_1->complete = 1;
if (VAR_1->co) {
qemu_coroutine_enter(VAR_1->co, NULL);
}
}
| [
"static void FUNC_0(void *VAR_0)\n{",
"struct IscsiTask *VAR_1 = VAR_0;",
"VAR_1->complete = 1;",
"if (VAR_1->co) {",
"qemu_coroutine_enter(VAR_1->co, NULL);",
"}",
"}"
] | [
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
25,725 | int qemu_shutdown_requested_get(void)
{
return shutdown_requested;
}
| true | qemu | aedbe19297907143f17b733a7ff0e0534377bed1 | int qemu_shutdown_requested_get(void)
{
return shutdown_requested;
}
| {
"code": [
"int qemu_shutdown_requested_get(void)"
],
"line_no": [
1
]
} | int FUNC_0(void)
{
return shutdown_requested;
}
| [
"int FUNC_0(void)\n{",
"return shutdown_requested;",
"}"
] | [
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
25,727 | static inline void RENAME(rgb15ToY)(uint8_t *dst, uint8_t *src, int width)
{
int i;
for(i=0; i<width; i++)
{
int d= ((uint16_t*)src)[i];
int r= d&0x1F;
int g= (d>>5)&0x1F;
int b= (d>>10)&0x1F;
dst[i]= ((RY*r + GY*g + BY*b)>>(RGB2YUV_SHIFT-3)) + 16;
}
}
| true | FFmpeg | 2da0d70d5eebe42f9fcd27ee554419ebe2a5da06 | static inline void RENAME(rgb15ToY)(uint8_t *dst, uint8_t *src, int width)
{
int i;
for(i=0; i<width; i++)
{
int d= ((uint16_t*)src)[i];
int r= d&0x1F;
int g= (d>>5)&0x1F;
int b= (d>>10)&0x1F;
dst[i]= ((RY*r + GY*g + BY*b)>>(RGB2YUV_SHIFT-3)) + 16;
}
}
| {
"code": [
"\tint i;",
"\tint i;",
"\tint i;",
"\tint i;",
"\tfor(i=0; i<width; i++)",
"\tint i;",
"\tfor(i=0; i<width; i++)",
"\tint i;",
"\tfor(i=0; i<width; i++)",
"\tint i;",
"\tfor(i=0; i<width; i++)",
"\tint i;",
"\tfor(i=0; i<width; i++)",
"\tint i;",
... | static inline void FUNC_0(rgb15ToY)(uint8_t *dst, uint8_t *src, int width)
{
int VAR_0;
for(VAR_0=0; VAR_0<width; VAR_0++)
{
int d= ((uint16_t*)src)[VAR_0];
int r= d&0x1F;
int g= (d>>5)&0x1F;
int b= (d>>10)&0x1F;
dst[VAR_0]= ((RY*r + GY*g + BY*b)>>(RGB2YUV_SHIFT-3)) + 16;
}
}
| [
"static inline void FUNC_0(rgb15ToY)(uint8_t *dst, uint8_t *src, int width)\n{",
"int VAR_0;",
"for(VAR_0=0; VAR_0<width; VAR_0++)",
"{",
"int d= ((uint16_t*)src)[VAR_0];",
"int r= d&0x1F;",
"int g= (d>>5)&0x1F;",
"int b= (d>>10)&0x1F;",
"dst[VAR_0]= ((RY*r + GY*g + BY*b)>>(RGB2YUV_SHIFT-3)) + 16;",... | [
0,
1,
1,
0,
1,
1,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
]
] |
25,728 | static int kvm_dirty_pages_log_change(target_phys_addr_t phys_addr, target_phys_addr_t end_addr,
unsigned flags,
unsigned mask)
{
KVMState *s = kvm_state;
KVMSlot *mem = kvm_lookup_slot(s, phys_addr);
if (mem == NULL) {
... | true | qemu | d3f8d37fe2d0c24ec8bac9c94d5b0e2dc09c0d2a | static int kvm_dirty_pages_log_change(target_phys_addr_t phys_addr, target_phys_addr_t end_addr,
unsigned flags,
unsigned mask)
{
KVMState *s = kvm_state;
KVMSlot *mem = kvm_lookup_slot(s, phys_addr);
if (mem == NULL) {
... | {
"code": [
"static int kvm_dirty_pages_log_change(target_phys_addr_t phys_addr, target_phys_addr_t end_addr,",
" unsigned flags,",
" KVMSlot *mem = kvm_lookup_slot(s, phys_addr);",
" dprintf(\"invalid parameters %llx-%llx\\n\", phys_addr, end_addr);"... | static int FUNC_0(target_phys_addr_t VAR_0, target_phys_addr_t VAR_1,
unsigned VAR_2,
unsigned VAR_3)
{
KVMState *s = kvm_state;
KVMSlot *mem = kvm_lookup_slot(s, VAR_0);
if (mem == NULL) {
dprintf("invalid param... | [
"static int FUNC_0(target_phys_addr_t VAR_0, target_phys_addr_t VAR_1,\nunsigned VAR_2,\nunsigned VAR_3)\n{",
"KVMState *s = kvm_state;",
"KVMSlot *mem = kvm_lookup_slot(s, VAR_0);",
"if (mem == NULL) {",
"dprintf(\"invalid parameters %llx-%llx\\n\", VAR_0, VAR_1);",
"return -EINVAL;",
"}",
"VAR_2 = ... | [
1,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27,
29
],
[
33
],
[
37
],
[
39
]
] |
25,730 | static void RENAME(uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
long width, long height,
long lumStride, long chromStride, long srcStride)
{
long y;
const long chromWidth= -((-width)>>1);
fo... | false | FFmpeg | d1adad3cca407f493c3637e20ecd4f7124e69212 | static void RENAME(uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
long width, long height,
long lumStride, long chromStride, long srcStride)
{
long y;
const long chromWidth= -((-width)>>1);
fo... | {
"code": [],
"line_no": []
} | static void FUNC_0(uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
long width, long height,
long lumStride, long chromStride, long srcStride)
{
long VAR_0;
const long VAR_1= -((-width)>>1);
for... | [
"static void FUNC_0(uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,\nlong width, long height,\nlong lumStride, long chromStride, long srcStride)\n{",
"long VAR_0;",
"const long VAR_1= -((-width)>>1);",
"for (VAR_0=0; VAR_0<height; VAR_0++) {",
"FUNC_0(extract_even)(src+1, ydst... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37,
39,
41,
43,
45,
47
],
[
49,
51
]
] |
25,731 | static int bayer_to_yv12_wrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[])
{
const uint8_t *srcPtr= src[0];
uint8_t *dstY= dst[0];
uint8_t *dstU= dst[1];
uint8_t *dstV= dst[2];
int i;
... | false | FFmpeg | 757248ea3cd917a7755cb15f817a9b1f15578718 | static int bayer_to_yv12_wrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[])
{
const uint8_t *srcPtr= src[0];
uint8_t *dstY= dst[0];
uint8_t *dstU= dst[1];
uint8_t *dstV= dst[2];
int i;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(SwsContext *VAR_0, const uint8_t* VAR_18[], int VAR_2[], int VAR_3,
int VAR_4, uint8_t* VAR_5[], int VAR_6[])
{
const uint8_t *VAR_7= VAR_18[0];
uint8_t *VAR_18= VAR_5[0];
uint8_t *VAR_18= VAR_5[1];
uint8_t *VAR_18= VAR_5[2];
int VAR_8;
... | [
"static int FUNC_0(SwsContext *VAR_0, const uint8_t* VAR_18[], int VAR_2[], int VAR_3,\nint VAR_4, uint8_t* VAR_5[], int VAR_6[])\n{",
"const uint8_t *VAR_7= VAR_18[0];",
"uint8_t *VAR_18= VAR_5[0];",
"uint8_t *VAR_18= VAR_5[1];",
"uint8_t *VAR_18= VAR_5[2];",
"int VAR_8;",
"void (*VAR_9) (const u... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,... |
25,733 | static int vaapi_encode_h264_init_picture_params(AVCodecContext *avctx,
VAAPIEncodePicture *pic)
{
VAAPIEncodeContext *ctx = avctx->priv_data;
VAEncSequenceParameterBufferH264 *vseq = ctx->codec_sequence_params;
VAEncPictureParameterBuffer... | false | FFmpeg | e72662e131e5099e34d5a7519c5690d2fff7b83f | static int vaapi_encode_h264_init_picture_params(AVCodecContext *avctx,
VAAPIEncodePicture *pic)
{
VAAPIEncodeContext *ctx = avctx->priv_data;
VAEncSequenceParameterBufferH264 *vseq = ctx->codec_sequence_params;
VAEncPictureParameterBuffer... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
VAAPIEncodePicture *VAR_1)
{
VAAPIEncodeContext *ctx = VAR_0->priv_data;
VAEncSequenceParameterBufferH264 *vseq = ctx->codec_sequence_params;
VAEncPictureParameterBufferH264 *vpic = VAR_1->codec_pi... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nVAAPIEncodePicture *VAR_1)\n{",
"VAAPIEncodeContext *ctx = VAR_0->priv_data;",
"VAEncSequenceParameterBufferH264 *vseq = ctx->codec_sequence_params;",
"VAEncPictureParameterBufferH264 *vpic = VAR_1->codec_picture_params;",
"VAAPIEncodeH264Context ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
25,735 | static inline int is_bit_set(BlockDriverState *bs, int64_t bitnum)
{
uint64_t offset = sizeof(struct cow_header_v2) + bitnum / 8;
uint8_t bitmap;
if (bdrv_pread(bs->file, offset, &bitmap, sizeof(bitmap)) !=
sizeof(bitmap)) {
return -errno;
}
return !!(bitmap & (1 << (bitnum %... | true | qemu | b0ad5a455d7e5352d4c86ba945112011dbeadfb8 | static inline int is_bit_set(BlockDriverState *bs, int64_t bitnum)
{
uint64_t offset = sizeof(struct cow_header_v2) + bitnum / 8;
uint8_t bitmap;
if (bdrv_pread(bs->file, offset, &bitmap, sizeof(bitmap)) !=
sizeof(bitmap)) {
return -errno;
}
return !!(bitmap & (1 << (bitnum %... | {
"code": [
" if (bdrv_pread(bs->file, offset, &bitmap, sizeof(bitmap)) !=",
"\t sizeof(bitmap)) {",
" return -errno;",
"\t sizeof(bitmap)) {",
" return -errno;",
" if (bdrv_pread(bs->file, offset, &bitmap, sizeof(bitmap)) !=",
"\t sizeof(bitmap)) {",
" ... | static inline int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1)
{
uint64_t offset = sizeof(struct cow_header_v2) + VAR_1 / 8;
uint8_t bitmap;
if (bdrv_pread(VAR_0->file, offset, &bitmap, sizeof(bitmap)) !=
sizeof(bitmap)) {
return -errno;
}
return !!(bitmap & (1 << (VAR_1 % ... | [
"static inline int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1)\n{",
"uint64_t offset = sizeof(struct cow_header_v2) + VAR_1 / 8;",
"uint8_t bitmap;",
"if (bdrv_pread(VAR_0->file, offset, &bitmap, sizeof(bitmap)) !=\nsizeof(bitmap)) {",
"return -errno;",
"}",
"return !!(bitmap & (1 << (VAR_1 % 8)));",... | [
0,
0,
0,
1,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
25,736 | bool st_init(const char *file)
{
pthread_t thread;
pthread_attr_t attr;
sigset_t set, oldset;
int ret;
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
sigfillset(&set);
pthread_sigmask(SIG_SETMASK, &set, &oldset);
ret = pthread_cre... | true | qemu | e4858974ec36afd8a6b3a9e2b0ad8f357f28efc7 | bool st_init(const char *file)
{
pthread_t thread;
pthread_attr_t attr;
sigset_t set, oldset;
int ret;
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
sigfillset(&set);
pthread_sigmask(SIG_SETMASK, &set, &oldset);
ret = pthread_cre... | {
"code": [
"bool st_init(const char *file)",
" return false;",
" atexit(st_flush_trace_buffer);",
" st_set_trace_file(file);",
" return true;"
],
"line_no": [
1,
33,
39,
41,
43
]
} | bool FUNC_0(const char *file)
{
pthread_t thread;
pthread_attr_t attr;
sigset_t set, oldset;
int VAR_0;
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
sigfillset(&set);
pthread_sigmask(SIG_SETMASK, &set, &oldset);
VAR_0 = pthread_... | [
"bool FUNC_0(const char *file)\n{",
"pthread_t thread;",
"pthread_attr_t attr;",
"sigset_t set, oldset;",
"int VAR_0;",
"pthread_attr_init(&attr);",
"pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);",
"sigfillset(&set);",
"pthread_sigmask(SIG_SETMASK, &set, &oldset);",
"VAR_0 = pthread... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
25,739 | static int libquvi_close(AVFormatContext *s)
{
LibQuviContext *qc = s->priv_data;
if (qc->fmtctx)
avformat_close_input(&qc->fmtctx);
return 0;
}
| true | FFmpeg | 2d40a09b6e73230b160a505f01ed1acf169e1d9f | static int libquvi_close(AVFormatContext *s)
{
LibQuviContext *qc = s->priv_data;
if (qc->fmtctx)
avformat_close_input(&qc->fmtctx);
return 0;
}
| {
"code": [
"static int libquvi_close(AVFormatContext *s)",
" LibQuviContext *qc = s->priv_data;",
" if (qc->fmtctx)",
" avformat_close_input(&qc->fmtctx);",
" return 0;",
" LibQuviContext *qc = s->priv_data;",
" return 0;",
" LibQuviContext *qc = s->priv_data;... | static int FUNC_0(AVFormatContext *VAR_0)
{
LibQuviContext *qc = VAR_0->priv_data;
if (qc->fmtctx)
avformat_close_input(&qc->fmtctx);
return 0;
}
| [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"LibQuviContext *qc = VAR_0->priv_data;",
"if (qc->fmtctx)\navformat_close_input(&qc->fmtctx);",
"return 0;",
"}"
] | [
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
]
] |
25,740 | static void aspeed_soc_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
AspeedSoCClass *sc = ASPEED_SOC_CLASS(oc);
sc->info = (AspeedSoCInfo *) data;
dc->realize = aspeed_soc_realize;
} | true | qemu | 469f3da42ef4af347fa7831e1cc0bd35d17f5b83 | static void aspeed_soc_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
AspeedSoCClass *sc = ASPEED_SOC_CLASS(oc);
sc->info = (AspeedSoCInfo *) data;
dc->realize = aspeed_soc_realize;
} | {
"code": [],
"line_no": []
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
AspeedSoCClass *sc = ASPEED_SOC_CLASS(VAR_0);
sc->info = (AspeedSoCInfo *) VAR_1;
dc->realize = aspeed_soc_realize;
} | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"AspeedSoCClass *sc = ASPEED_SOC_CLASS(VAR_0);",
"sc->info = (AspeedSoCInfo *) VAR_1;",
"dc->realize = aspeed_soc_realize;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
]
] |
25,742 | static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
struct in_addr my_ip)
{
AVFormatContext *avc;
AVStream avs[MAX_STREAMS];
int i;
avc = avformat_alloc_context();
if (avc == NULL) {
return -1;
}
av_metadata_set2(&av... | true | FFmpeg | ea4f8aabab2a5a7ebd232b45557c11c4c59c332b | static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
struct in_addr my_ip)
{
AVFormatContext *avc;
AVStream avs[MAX_STREAMS];
int i;
avc = avformat_alloc_context();
if (avc == NULL) {
return -1;
}
av_metadata_set2(&av... | {
"code": [],
"line_no": []
} | static int FUNC_0(FFStream *VAR_0, uint8_t **VAR_1,
struct in_addr VAR_2)
{
AVFormatContext *avc;
AVStream avs[MAX_STREAMS];
int VAR_3;
avc = avformat_alloc_context();
if (avc == NULL) {
return -1;
}
av_metadata_set2(&avc->metadata, "ti... | [
"static int FUNC_0(FFStream *VAR_0, uint8_t **VAR_1,\nstruct in_addr VAR_2)\n{",
"AVFormatContext *avc;",
"AVStream avs[MAX_STREAMS];",
"int VAR_3;",
"avc = avformat_alloc_context();",
"if (avc == NULL) {",
"return -1;",
"}",
"av_metadata_set2(&avc->metadata, \"title\",\nVAR_0->title[0] ? VAR_0->ti... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
31,
33,
35
],
[
37
],
[
39,
41
],
[
45
],
[
47
],
[
49
],
[... |
25,745 | static int dvdsub_decode(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
DVDSubContext *ctx = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AVSubtitle *sub = data;
int is_menu;
if... | true | FFmpeg | 816577716bc6170bccfea3b9e865618b69a4b426 | static int dvdsub_decode(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
DVDSubContext *ctx = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AVSubtitle *sub = data;
int is_menu;
if... | {
"code": [
" if (ctx->buf) {",
" av_freep(&ctx->buf);",
" av_freep(&ctx->buf);"
],
"line_no": [
21,
105,
105
]
} | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
DVDSubContext *ctx = VAR_0->priv_data;
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
AVSubtitle *sub = VAR_1;
int VAR_6;
if (ctx->VAR_... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"DVDSubContext *ctx = VAR_0->priv_data;",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"AVSubtitle *sub = VAR_1;",
"int VAR_6;",
"if (ctx->VAR_4) {",
"int VAR_7 = append_to_cached_buf(VAR_... | [
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,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
... |
25,746 | static void ibm_40p_init(MachineState *machine)
{
CPUPPCState *env = NULL;
uint16_t cmos_checksum;
PowerPCCPU *cpu;
DeviceState *dev;
SysBusDevice *pcihost;
Nvram *m48t59 = NULL;
PCIBus *pci_bus;
ISABus *isa_bus;
void *fw_cfg;
int i;
uint32_t kernel_base = 0, init... | true | qemu | 4482e05cbbb7e50e476f6a9500cf0b38913bd939 | static void ibm_40p_init(MachineState *machine)
{
CPUPPCState *env = NULL;
uint16_t cmos_checksum;
PowerPCCPU *cpu;
DeviceState *dev;
SysBusDevice *pcihost;
Nvram *m48t59 = NULL;
PCIBus *pci_bus;
ISABus *isa_bus;
void *fw_cfg;
int i;
uint32_t kernel_base = 0, init... | {
"code": [
" if (!cpu) {",
" exit(1);",
" exit(1);",
" if (!cpu) {",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exi... | static void FUNC_0(MachineState *VAR_0)
{
CPUPPCState *env = NULL;
uint16_t cmos_checksum;
PowerPCCPU *cpu;
DeviceState *dev;
SysBusDevice *pcihost;
Nvram *m48t59 = NULL;
PCIBus *pci_bus;
ISABus *isa_bus;
void *VAR_1;
int VAR_2;
uint32_t kernel_base = 0, initrd_ba... | [
"static void FUNC_0(MachineState *VAR_0)\n{",
"CPUPPCState *env = NULL;",
"uint16_t cmos_checksum;",
"PowerPCCPU *cpu;",
"DeviceState *dev;",
"SysBusDevice *pcihost;",
"Nvram *m48t59 = NULL;",
"PCIBus *pci_bus;",
"ISABus *isa_bus;",
"void *VAR_1;",
"int VAR_2;",
"uint32_t kernel_base = 0, init... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,... |
25,747 | static void *iommu_init(target_phys_addr_t addr, uint32_t version, qemu_irq irq)
{
DeviceState *dev;
SysBusDevice *s;
dev = qdev_create(NULL, "iommu");
qdev_prop_set_uint32(dev, "version", version);
qdev_init(dev);
s = sysbus_from_qdev(dev);
sysbus_connect_irq(s, 0, irq);
sysb... | true | qemu | e23a1b33b53d25510320b26d9f154e19c6c99725 | static void *iommu_init(target_phys_addr_t addr, uint32_t version, qemu_irq irq)
{
DeviceState *dev;
SysBusDevice *s;
dev = qdev_create(NULL, "iommu");
qdev_prop_set_uint32(dev, "version", version);
qdev_init(dev);
s = sysbus_from_qdev(dev);
sysbus_connect_irq(s, 0, irq);
sysb... | {
"code": [
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" ... | static void *FUNC_0(target_phys_addr_t VAR_0, uint32_t VAR_1, qemu_irq VAR_2)
{
DeviceState *dev;
SysBusDevice *s;
dev = qdev_create(NULL, "iommu");
qdev_prop_set_uint32(dev, "VAR_1", VAR_1);
qdev_init(dev);
s = sysbus_from_qdev(dev);
sysbus_connect_irq(s, 0, VAR_2);
sysbus_mm... | [
"static void *FUNC_0(target_phys_addr_t VAR_0, uint32_t VAR_1, qemu_irq VAR_2)\n{",
"DeviceState *dev;",
"SysBusDevice *s;",
"dev = qdev_create(NULL, \"iommu\");",
"qdev_prop_set_uint32(dev, \"VAR_1\", VAR_1);",
"qdev_init(dev);",
"s = sysbus_from_qdev(dev);",
"sysbus_connect_irq(s, 0, VAR_2);",
"sy... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
]
] |
25,749 | static void test_qemu_strtoull_full_empty(void)
{
const char *str = "";
uint64_t res = 999;
int err;
err = qemu_strtoull(str, NULL, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, 0);
}
| true | qemu | 47d4be12c3997343e436c6cca89aefbbbeb70863 | static void test_qemu_strtoull_full_empty(void)
{
const char *str = "";
uint64_t res = 999;
int err;
err = qemu_strtoull(str, NULL, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, 0);
}
| {
"code": [
" g_assert_cmpint(err, ==, 0);",
" g_assert_cmpint(res, ==, 0);",
" g_assert_cmpint(err, ==, 0);",
" g_assert_cmpint(res, ==, 0);",
" g_assert_cmpint(err, ==, 0);",
" g_assert_cmpint(res, ==, 0);",
" g_assert_cmpint(err, ==, 0);",
" g_assert_cmpint(r... | static void FUNC_0(void)
{
const char *VAR_0 = "";
uint64_t res = 999;
int VAR_1;
VAR_1 = qemu_strtoull(VAR_0, NULL, 0, &res);
g_assert_cmpint(VAR_1, ==, 0);
g_assert_cmpint(res, ==, 0);
}
| [
"static void FUNC_0(void)\n{",
"const char *VAR_0 = \"\";",
"uint64_t res = 999;",
"int VAR_1;",
"VAR_1 = qemu_strtoull(VAR_0, NULL, 0, &res);",
"g_assert_cmpint(VAR_1, ==, 0);",
"g_assert_cmpint(res, ==, 0);",
"}"
] | [
0,
0,
0,
0,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
]
] |
25,750 | static inline void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,
int dstWidth, const uint8_t *src1,
const uint8_t *src2, int srcW, int xInc)
{
int32_t *filterPos = c->hChrFilterPos;
int16_t *filter = c->h... | false | FFmpeg | 9bcbb250e23959075765edd3cb4c1fcb46736d7d | static inline void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,
int dstWidth, const uint8_t *src1,
const uint8_t *src2, int srcW, int xInc)
{
int32_t *filterPos = c->hChrFilterPos;
int16_t *filter = c->h... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,
int dstWidth, const uint8_t *src1,
const uint8_t *src2, int srcW, int xInc)
{
int32_t *filterPos = c->hChrFilterPos;
int16_t *filter = c->h... | [
"static inline void FUNC_0(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,\nint dstWidth, const uint8_t *src1,\nconst uint8_t *src2, int srcW, int xInc)\n{",
"int32_t *filterPos = c->hChrFilterPos;",
"int16_t *filter = c->hChrFilter;",
"void *VAR_0= c->chrMmx2FilterCode;",
"int VAR_1;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17,
19
],
[
21,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
53,
55,
57,
59,
61,
63,
65,
67,
69,
71,... |
25,751 | static void get_pointer(Object *obj, Visitor *v, Property *prop,
const char *(*print)(void *ptr),
const char *name, Error **errp)
{
DeviceState *dev = DEVICE(obj);
void **ptr = qdev_get_prop_ptr(dev, prop);
char *p;
p = (char *) (*ptr ? print(*ptr... | false | qemu | d4d34b0d3f5af5c8e09980da0de2eebe9a27dc71 | static void get_pointer(Object *obj, Visitor *v, Property *prop,
const char *(*print)(void *ptr),
const char *name, Error **errp)
{
DeviceState *dev = DEVICE(obj);
void **ptr = qdev_get_prop_ptr(dev, prop);
char *p;
p = (char *) (*ptr ? print(*ptr... | {
"code": [],
"line_no": []
} | static void FUNC_0(Object *VAR_0, Visitor *VAR_1, Property *VAR_2,
const char *(*VAR_3)(void *VAR_7),
const char *VAR_5, Error **VAR_6)
{
DeviceState *dev = DEVICE(VAR_0);
void **VAR_7 = qdev_get_prop_ptr(dev, VAR_2);
char *VAR_7;
VAR_7 = (char *)... | [
"static void FUNC_0(Object *VAR_0, Visitor *VAR_1, Property *VAR_2,\nconst char *(*VAR_3)(void *VAR_7),\nconst char *VAR_5, Error **VAR_6)\n{",
"DeviceState *dev = DEVICE(VAR_0);",
"void **VAR_7 = qdev_get_prop_ptr(dev, VAR_2);",
"char *VAR_7;",
"VAR_7 = (char *) (*VAR_7 ? VAR_3(*VAR_7) : \"\");",
"visit_... | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
]
] |
25,752 | static uint64_t jazz_led_read(void *opaque, target_phys_addr_t addr,
unsigned int size)
{
LedState *s = opaque;
uint8_t val;
val = s->segments;
trace_jazz_led_read(addr, val);
return val;
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t jazz_led_read(void *opaque, target_phys_addr_t addr,
unsigned int size)
{
LedState *s = opaque;
uint8_t val;
val = s->segments;
trace_jazz_led_read(addr, val);
return val;
}
| {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,
unsigned int size)
{
LedState *s = opaque;
uint8_t val;
val = s->segments;
trace_jazz_led_read(addr, val);
return val;
}
| [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,\nunsigned int size)\n{",
"LedState *s = opaque;",
"uint8_t val;",
"val = s->segments;",
"trace_jazz_led_read(addr, val);",
"return val;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
]
] |
25,754 | float32 HELPER(ucf64_divs)(float32 a, float32 b, CPUUniCore32State *env)
{
return float32_div(a, b, &env->ucf64.fp_status);
}
| false | qemu | e8ede0a8bb5298a6979bcf7ed84ef64a64a4e3fe | float32 HELPER(ucf64_divs)(float32 a, float32 b, CPUUniCore32State *env)
{
return float32_div(a, b, &env->ucf64.fp_status);
}
| {
"code": [],
"line_no": []
} | float32 FUNC_0(ucf64_divs)(float32 a, float32 b, CPUUniCore32State *env)
{
return float32_div(a, b, &env->ucf64.fp_status);
}
| [
"float32 FUNC_0(ucf64_divs)(float32 a, float32 b, CPUUniCore32State *env)\n{",
"return float32_div(a, b, &env->ucf64.fp_status);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
25,755 | static void scsi_generic_class_initfn(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SCSIDeviceClass *sc = SCSI_DEVICE_CLASS(klass);
sc->realize = scsi_generic_realize;
sc->unrealize = scsi_unrealize;
sc->alloc_req = scsi_new_request;
sc->parse_cdb ... | false | qemu | fb7b5c0df6e3c501973ce4d57eb2b1d4344a519d | static void scsi_generic_class_initfn(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SCSIDeviceClass *sc = SCSI_DEVICE_CLASS(klass);
sc->realize = scsi_generic_realize;
sc->unrealize = scsi_unrealize;
sc->alloc_req = scsi_new_request;
sc->parse_cdb ... | {
"code": [],
"line_no": []
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
SCSIDeviceClass *sc = SCSI_DEVICE_CLASS(VAR_0);
sc->realize = scsi_generic_realize;
sc->unrealize = scsi_unrealize;
sc->alloc_req = scsi_new_request;
sc->parse_cdb = scsi_generic_p... | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"SCSIDeviceClass *sc = SCSI_DEVICE_CLASS(VAR_0);",
"sc->realize = scsi_generic_realize;",
"sc->unrealize = scsi_unrealize;",
"sc->alloc_req = scsi_new_request;",
"sc->parse_cdb = scsi_generi... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
25,756 | START_TEST(qlist_destroy_test)
{
int i;
QList *qlist;
qlist = qlist_new();
for (i = 0; i < 42; i++)
qlist_append(qlist, qint_from_int(i));
QDECREF(qlist);
}
| false | qemu | 91479dd0b5bd3b087b92ddd7bc3f2c54982cfe17 | START_TEST(qlist_destroy_test)
{
int i;
QList *qlist;
qlist = qlist_new();
for (i = 0; i < 42; i++)
qlist_append(qlist, qint_from_int(i));
QDECREF(qlist);
}
| {
"code": [],
"line_no": []
} | FUNC_0(VAR_0)
{
int VAR_1;
QList *qlist;
qlist = qlist_new();
for (VAR_1 = 0; VAR_1 < 42; VAR_1++)
qlist_append(qlist, qint_from_int(VAR_1));
QDECREF(qlist);
}
| [
"FUNC_0(VAR_0)\n{",
"int VAR_1;",
"QList *qlist;",
"qlist = qlist_new();",
"for (VAR_1 = 0; VAR_1 < 42; VAR_1++)",
"qlist_append(qlist, qint_from_int(VAR_1));",
"QDECREF(qlist);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
25,757 | static void vnc_client_read(void *opaque)
{
VncState *vs = opaque;
long ret;
buffer_reserve(&vs->input, 4096);
#ifdef CONFIG_VNC_TLS
if (vs->tls_session) {
ret = gnutls_read(vs->tls_session, buffer_end(&vs->input), 4096);
if (ret < 0) {
if (ret == GNUTLS_E_AGAIN)
errno = EAGAIN;
... | false | qemu | 5fb6c7a8b26eab1a22207d24b4784bd2b39ab54b | static void vnc_client_read(void *opaque)
{
VncState *vs = opaque;
long ret;
buffer_reserve(&vs->input, 4096);
#ifdef CONFIG_VNC_TLS
if (vs->tls_session) {
ret = gnutls_read(vs->tls_session, buffer_end(&vs->input), 4096);
if (ret < 0) {
if (ret == GNUTLS_E_AGAIN)
errno = EAGAIN;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
VncState *vs = VAR_0;
long VAR_2;
buffer_reserve(&vs->input, 4096);
#ifdef CONFIG_VNC_TLS
if (vs->tls_session) {
VAR_2 = gnutls_read(vs->tls_session, buffer_end(&vs->input), 4096);
if (VAR_2 < 0) {
if (VAR_2 == GNUTLS_E_AGAIN)
errno = EAGAIN;
... | [
"static void FUNC_0(void *VAR_0)\n{",
"VncState *vs = VAR_0;",
"long VAR_2;",
"buffer_reserve(&vs->input, 4096);",
"#ifdef CONFIG_VNC_TLS\nif (vs->tls_session) {",
"VAR_2 = gnutls_read(vs->tls_session, buffer_end(&vs->input), 4096);",
"if (VAR_2 < 0) {",
"if (VAR_2 == GNUTLS_E_AGAIN)\nerrno = EAGAIN;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15,
17
],
[
19
],
[
21
],
[
23,
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43,
45
],
[
49
],
[
53
],
... |
25,758 | POWERPC_FAMILY(e5500)(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);
dc->desc = "e5500 core";
pcc->init_proc = init_proc_e5500;
pcc->check_pow = check_pow_none;
pcc->insns_flags = PPC_INSNS_BASE | PPC_ISEL |
... | false | qemu | 4171853cf4dfb88da93bf77a4c9d319d6ba2bdc6 | POWERPC_FAMILY(e5500)(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);
dc->desc = "e5500 core";
pcc->init_proc = init_proc_e5500;
pcc->check_pow = check_pow_none;
pcc->insns_flags = PPC_INSNS_BASE | PPC_ISEL |
... | {
"code": [],
"line_no": []
} | FUNC_0(e5500)(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);
dc->desc = "e5500 core";
pcc->init_proc = init_proc_e5500;
pcc->check_pow = check_pow_none;
pcc->insns_flags = PPC_INSNS_BASE | PPC_ISEL |
... | [
"FUNC_0(e5500)(ObjectClass *oc, void *data)\n{",
"DeviceClass *dc = DEVICE_CLASS(oc);",
"PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);",
"dc->desc = \"e5500 core\";",
"pcc->init_proc = init_proc_e5500;",
"pcc->check_pow = check_pow_none;",
"pcc->insns_flags = PPC_INSNS_BASE | PPC_ISEL |\nPPC_WRTEE | PPC... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17,
19,
21,
23,
25,
27,
29,
31,
33
],
[
35
],
[
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,
61,
63,
65... |
25,759 | void av_md5_update(AVMD5 *ctx, const uint8_t *src, int len)
{
const uint8_t *end;
int j;
j = ctx->len & 63;
ctx->len += len;
if (j) {
int cnt = FFMIN(len, 64 - j);
memcpy(ctx->block + j, src, cnt);
src += cnt;
len -= cnt;
if (j + cnt < 64)
... | false | FFmpeg | a67304d05f11b2377bf157a356d7ebb00f3e06dd | void av_md5_update(AVMD5 *ctx, const uint8_t *src, int len)
{
const uint8_t *end;
int j;
j = ctx->len & 63;
ctx->len += len;
if (j) {
int cnt = FFMIN(len, 64 - j);
memcpy(ctx->block + j, src, cnt);
src += cnt;
len -= cnt;
if (j + cnt < 64)
... | {
"code": [],
"line_no": []
} | void FUNC_0(AVMD5 *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
const uint8_t *VAR_3;
int VAR_4;
VAR_4 = VAR_0->VAR_2 & 63;
VAR_0->VAR_2 += VAR_2;
if (VAR_4) {
int VAR_5 = FFMIN(VAR_2, 64 - VAR_4);
memcpy(VAR_0->block + VAR_4, VAR_1, VAR_5);
VAR_1 += VAR_5;
... | [
"void FUNC_0(AVMD5 *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"const uint8_t *VAR_3;",
"int VAR_4;",
"VAR_4 = VAR_0->VAR_2 & 63;",
"VAR_0->VAR_2 += VAR_2;",
"if (VAR_4) {",
"int VAR_5 = FFMIN(VAR_2, 64 - VAR_4);",
"memcpy(VAR_0->block + VAR_4, VAR_1, VAR_5);",
"VAR_1 += VAR_5;",
"VAR_2 -= VAR_5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
... |
25,760 | int main()
{
int rt, rs;
int achi, acli;
int dsp;
int acho, aclo;
int resulth, resultl;
int resdsp;
achi = 0x05;
acli = 0xB4CB;
rs = 0xFF06;
rt = 0xCB00;
resulth = 0x04;
resultl = 0x947438CB;
__asm
("mthi %2, $ac1\n\t"
"mtlo %3, ... | false | qemu | beb3faaa0027c114e37317fdba38a8a7facf3f9b | int main()
{
int rt, rs;
int achi, acli;
int dsp;
int acho, aclo;
int resulth, resultl;
int resdsp;
achi = 0x05;
acli = 0xB4CB;
rs = 0xFF06;
rt = 0xCB00;
resulth = 0x04;
resultl = 0x947438CB;
__asm
("mthi %2, $ac1\n\t"
"mtlo %3, ... | {
"code": [],
"line_no": []
} | int FUNC_0()
{
int VAR_0, VAR_1;
int VAR_2, VAR_3;
int VAR_4;
int VAR_5, VAR_6;
int VAR_7, VAR_8;
int VAR_9;
VAR_2 = 0x05;
VAR_3 = 0xB4CB;
VAR_1 = 0xFF06;
VAR_0 = 0xCB00;
VAR_7 = 0x04;
VAR_8 = 0x947438CB;
__asm
("mthi %2, $ac1\n\t"
... | [
"int FUNC_0()\n{",
"int VAR_0, VAR_1;",
"int VAR_2, VAR_3;",
"int VAR_4;",
"int VAR_5, VAR_6;",
"int VAR_7, VAR_8;",
"int VAR_9;",
"VAR_2 = 0x05;",
"VAR_3 = 0xB4CB;",
"VAR_1 = 0xFF06;",
"VAR_0 = 0xCB00;",
"VAR_7 = 0x04;",
"VAR_8 = 0x947438CB;",
"__asm\n(\"mthi %2, $ac1\\n\\t\"\n\"mtlo %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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33,
35,
37,
39,
41,
43,
45,
47,
49
],
[
51
],
[
53
... |
25,761 | int ide_init_drive(IDEState *s, BlockDriverState *bs, IDEDriveKind kind,
const char *version, const char *serial)
{
int cylinders, heads, secs;
uint64_t nb_sectors;
s->bs = bs;
s->drive_kind = kind;
bdrv_get_geometry(bs, &nb_sectors);
bdrv_guess_geometry(bs, &cylin... | false | qemu | 27e0c9a1bbd166a67c16291016fba298a8e47140 | int ide_init_drive(IDEState *s, BlockDriverState *bs, IDEDriveKind kind,
const char *version, const char *serial)
{
int cylinders, heads, secs;
uint64_t nb_sectors;
s->bs = bs;
s->drive_kind = kind;
bdrv_get_geometry(bs, &nb_sectors);
bdrv_guess_geometry(bs, &cylin... | {
"code": [],
"line_no": []
} | int FUNC_0(IDEState *VAR_0, BlockDriverState *VAR_1, IDEDriveKind VAR_2,
const char *VAR_3, const char *VAR_4)
{
int VAR_5, VAR_6, VAR_7;
uint64_t nb_sectors;
VAR_0->VAR_1 = VAR_1;
VAR_0->drive_kind = VAR_2;
bdrv_get_geometry(VAR_1, &nb_sectors);
bdrv_guess_geometr... | [
"int FUNC_0(IDEState *VAR_0, BlockDriverState *VAR_1, IDEDriveKind VAR_2,\nconst char *VAR_3, const char *VAR_4)\n{",
"int VAR_5, VAR_6, VAR_7;",
"uint64_t nb_sectors;",
"VAR_0->VAR_1 = VAR_1;",
"VAR_0->drive_kind = VAR_2;",
"bdrv_get_geometry(VAR_1, &nb_sectors);",
"bdrv_guess_geometry(VAR_1, &VAR_5, &... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
25,762 | int subch_device_load(SubchDev *s, QEMUFile *f)
{
SubchDev *old_s;
Error *err = NULL;
uint16_t old_schid = s->schid;
uint16_t old_devno = s->devno;
int i;
s->cssid = qemu_get_byte(f);
s->ssid = qemu_get_byte(f);
s->schid = qemu_get_be16(f);
s->devno = qemu_get_be16(f);
... | false | qemu | 517ff12c7d000fa1f5b1e989b22fb86a286f9cc2 | int subch_device_load(SubchDev *s, QEMUFile *f)
{
SubchDev *old_s;
Error *err = NULL;
uint16_t old_schid = s->schid;
uint16_t old_devno = s->devno;
int i;
s->cssid = qemu_get_byte(f);
s->ssid = qemu_get_byte(f);
s->schid = qemu_get_be16(f);
s->devno = qemu_get_be16(f);
... | {
"code": [],
"line_no": []
} | int FUNC_0(SubchDev *VAR_0, QEMUFile *VAR_1)
{
SubchDev *old_s;
Error *err = NULL;
uint16_t old_schid = VAR_0->schid;
uint16_t old_devno = VAR_0->devno;
int VAR_2;
VAR_0->cssid = qemu_get_byte(VAR_1);
VAR_0->ssid = qemu_get_byte(VAR_1);
VAR_0->schid = qemu_get_be16(VAR_1);
... | [
"int FUNC_0(SubchDev *VAR_0, QEMUFile *VAR_1)\n{",
"SubchDev *old_s;",
"Error *err = NULL;",
"uint16_t old_schid = VAR_0->schid;",
"uint16_t old_devno = VAR_0->devno;",
"int VAR_2;",
"VAR_0->cssid = qemu_get_byte(VAR_1);",
"VAR_0->ssid = qemu_get_byte(VAR_1);",
"VAR_0->schid = qemu_get_be16(VAR_1);"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
31
],
[
33,
35,
37,
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.