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 |
|---|---|---|---|---|---|---|---|---|---|---|
16,692 | static int handle_utimensat(FsContext *ctx, V9fsPath *fs_path,
const struct timespec *buf)
{
int ret;
#ifdef CONFIG_UTIMENSAT
int fd;
struct handle_data *data = (struct handle_data *)ctx->private;
fd = open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK);
if... | true | qemu | 24df3371d97a7516605aef8abbc253a8c162b211 | static int handle_utimensat(FsContext *ctx, V9fsPath *fs_path,
const struct timespec *buf)
{
int ret;
#ifdef CONFIG_UTIMENSAT
int fd;
struct handle_data *data = (struct handle_data *)ctx->private;
fd = open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK);
if... | {
"code": [
"#ifdef CONFIG_UTIMENSAT",
"#else",
" ret = -1;",
" errno = ENOSYS;",
"#endif"
],
"line_no": [
9,
29,
31,
33,
35
]
} | static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,
const struct timespec *VAR_2)
{
int VAR_3;
#ifdef CONFIG_UTIMENSAT
int fd;
struct handle_data *data = (struct handle_data *)VAR_0->private;
fd = open_by_handle(data->mountfd, VAR_1->data, O_NONBLOCK);
if (fd <... | [
"static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,\nconst struct timespec *VAR_2)\n{",
"int VAR_3;",
"#ifdef CONFIG_UTIMENSAT\nint fd;",
"struct handle_data *data = (struct handle_data *)VAR_0->private;",
"fd = open_by_handle(data->mountfd, VAR_1->data, O_NONBLOCK);",
"if (fd < 0) {",
"return fd;",
... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9,
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
]
] |
16,694 | void object_property_add_str(Object *obj, const char *name,
char *(*get)(Object *, Error **),
void (*set)(Object *, const char *, Error **),
Error **errp)
{
StringProperty *prop = g_malloc0(sizeof(*prop));
prop->get = get;
... | true | qemu | a01aedc8d32e6f5b08a4041b62be3c5fab7a3382 | void object_property_add_str(Object *obj, const char *name,
char *(*get)(Object *, Error **),
void (*set)(Object *, const char *, Error **),
Error **errp)
{
StringProperty *prop = g_malloc0(sizeof(*prop));
prop->get = get;
... | {
"code": [
" prop, errp);",
" prop, errp);"
],
"line_no": [
29,
29
]
} | VAR_5voidVAR_5 VAR_5object_property_add_strVAR_5(VAR_5ObjectVAR_5 *VAR_5VAR_0VAR_5, VAR_5constVAR_5 VAR_5charVAR_5 *VAR_5VAR_1VAR_5,
VAR_5charVAR_5 *(*VAR_5VAR_2VAR_5)(VAR_5ObjectVAR_5 *, VAR_5ErrorVAR_5 **),
VAR_5voidVAR_5 (*VAR_5setVAR_5)(VAR_5ObjectVAR_5 *, VAR... | [
"VAR_5voidVAR_5 VAR_5object_property_add_strVAR_5(VAR_5ObjectVAR_5 *VAR_5VAR_0VAR_5, VAR_5constVAR_5 VAR_5charVAR_5 *VAR_5VAR_1VAR_5,\nVAR_5charVAR_5 *(*VAR_5VAR_2VAR_5)(VAR_5ObjectVAR_5 *, VAR_5ErrorVAR_5 **),\nVAR_5voidVAR_5 (*VAR_5setVAR_5)(VAR_5ObjectVAR_5 *, VAR_5constVAR_5 VAR_5charVAR_5 *, VAR_5ErrorVAR_5 **... | [
0,
0,
0,
0,
1,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
15
],
[
17
],
[
21,
23,
25,
27,
29
],
[
31
]
] |
16,695 | static int disas_cp14_write(CPUState * env, DisasContext *s, uint32_t insn)
{
int crn = (insn >> 16) & 0xf;
int crm = insn & 0xf;
int op1 = (insn >> 21) & 7;
int op2 = (insn >> 5) & 7;
int rt = (insn >> 12) & 0xf;
TCGv tmp;
if (arm_feature(env, ARM_FEATURE_THUMB2EE)) {
if ... | true | qemu | 7d1b0095bff7157e856d1d0e6c4295641ced2752 | static int disas_cp14_write(CPUState * env, DisasContext *s, uint32_t insn)
{
int crn = (insn >> 16) & 0xf;
int crm = insn & 0xf;
int op1 = (insn >> 21) & 7;
int op2 = (insn >> 5) & 7;
int rt = (insn >> 12) & 0xf;
TCGv tmp;
if (arm_feature(env, ARM_FEATURE_THUMB2EE)) {
if ... | {
"code": [
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" dead_tmp(tmp);",
... | static int FUNC_0(CPUState * VAR_0, DisasContext *VAR_1, uint32_t VAR_2)
{
int VAR_3 = (VAR_2 >> 16) & 0xf;
int VAR_4 = VAR_2 & 0xf;
int VAR_5 = (VAR_2 >> 21) & 7;
int VAR_6 = (VAR_2 >> 5) & 7;
int VAR_7 = (VAR_2 >> 12) & 0xf;
TCGv tmp;
if (arm_feature(VAR_0, ARM_FEATURE_THUMB2EE))... | [
"static int FUNC_0(CPUState * VAR_0, DisasContext *VAR_1, uint32_t VAR_2)\n{",
"int VAR_3 = (VAR_2 >> 16) & 0xf;",
"int VAR_4 = VAR_2 & 0xf;",
"int VAR_5 = (VAR_2 >> 21) & 7;",
"int VAR_6 = (VAR_2 >> 5) & 7;",
"int VAR_7 = (VAR_2 >> 12) & 0xf;",
"TCGv tmp;",
"if (arm_feature(VAR_0, ARM_FEATURE_THUMB2E... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43,
45
],
[
47
],
[
49
... |
16,696 | static void tcp_wait_for_connect(int fd, Error *err, void *opaque)
{
MigrationState *s = opaque;
if (fd < 0) {
DPRINTF("migrate connect error: %s\n", error_get_pretty(err));
s->to_dst_file = NULL;
migrate_fd_error(s);
} else {
DPRINTF("migrate connect success\n");
... | true | qemu | d59ce6f34434bf47a9b26138c908650bf9a24be1 | static void tcp_wait_for_connect(int fd, Error *err, void *opaque)
{
MigrationState *s = opaque;
if (fd < 0) {
DPRINTF("migrate connect error: %s\n", error_get_pretty(err));
s->to_dst_file = NULL;
migrate_fd_error(s);
} else {
DPRINTF("migrate connect success\n");
... | {
"code": [
" migrate_fd_error(s);",
" migrate_fd_error(s);",
" migrate_fd_error(s);"
],
"line_no": [
15,
15,
15
]
} | static void FUNC_0(int VAR_0, Error *VAR_1, void *VAR_2)
{
MigrationState *s = VAR_2;
if (VAR_0 < 0) {
DPRINTF("migrate connect error: %s\n", error_get_pretty(VAR_1));
s->to_dst_file = NULL;
migrate_fd_error(s);
} else {
DPRINTF("migrate connect success\n");
... | [
"static void FUNC_0(int VAR_0, Error *VAR_1, void *VAR_2)\n{",
"MigrationState *s = VAR_2;",
"if (VAR_0 < 0) {",
"DPRINTF(\"migrate connect error: %s\\n\", error_get_pretty(VAR_1));",
"s->to_dst_file = NULL;",
"migrate_fd_error(s);",
"} else {",
"DPRINTF(\"migrate connect success\\n\");",
"s->to_dst... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
16,697 | static FlatView generate_memory_topology(MemoryRegion *mr)
{
FlatView view;
flatview_init(&view);
render_memory_region(&view, mr, 0, addrrange_make(0, UINT64_MAX));
flatview_simplify(&view);
return view;
}
| true | qemu | 8417cebfda193c7f9ca70be5e308eaa92cf84b94 | static FlatView generate_memory_topology(MemoryRegion *mr)
{
FlatView view;
flatview_init(&view);
render_memory_region(&view, mr, 0, addrrange_make(0, UINT64_MAX));
flatview_simplify(&view);
return view;
}
| {
"code": [
" render_memory_region(&view, mr, 0, addrrange_make(0, UINT64_MAX));"
],
"line_no": [
13
]
} | static FlatView FUNC_0(MemoryRegion *mr)
{
FlatView view;
flatview_init(&view);
render_memory_region(&view, mr, 0, addrrange_make(0, UINT64_MAX));
flatview_simplify(&view);
return view;
}
| [
"static FlatView FUNC_0(MemoryRegion *mr)\n{",
"FlatView view;",
"flatview_init(&view);",
"render_memory_region(&view, mr, 0, addrrange_make(0, UINT64_MAX));",
"flatview_simplify(&view);",
"return view;",
"}"
] | [
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
]
] |
16,699 | static void visit_type_int32(Visitor *v, int *value, const char *name, Error **errp)
{
int64_t val = *value;
visit_type_int(v, &val, name, errp);
}
| true | qemu | 4e27e819bea0ea6c8108dc7e9fa48afd6ec13c46 | static void visit_type_int32(Visitor *v, int *value, const char *name, Error **errp)
{
int64_t val = *value;
visit_type_int(v, &val, name, errp);
}
| {
"code": [
"static void visit_type_int32(Visitor *v, int *value, const char *name, Error **errp)",
" int64_t val = *value;",
" visit_type_int(v, &val, name, errp);"
],
"line_no": [
1,
5,
7
]
} | static void FUNC_0(Visitor *VAR_0, int *VAR_1, const char *VAR_2, Error **VAR_3)
{
int64_t val = *VAR_1;
visit_type_int(VAR_0, &val, VAR_2, VAR_3);
}
| [
"static void FUNC_0(Visitor *VAR_0, int *VAR_1, const char *VAR_2, Error **VAR_3)\n{",
"int64_t val = *VAR_1;",
"visit_type_int(VAR_0, &val, VAR_2, VAR_3);",
"}"
] | [
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
16,701 | static inline int tcg_gen_code_common(TCGContext *s, uint8_t *gen_code_buf,
int do_search_pc,
const uint8_t *searched_pc)
{
int opc, op_index, macro_op_index;
const TCGOpDef *def;
unsigned int dead_iargs;
const TCGArg *ar... | true | qemu | 2ba1eeb62c29d23238b95dc7e9ade3444b49f0a1 | static inline int tcg_gen_code_common(TCGContext *s, uint8_t *gen_code_buf,
int do_search_pc,
const uint8_t *searched_pc)
{
int opc, op_index, macro_op_index;
const TCGOpDef *def;
unsigned int dead_iargs;
const TCGArg *ar... | {
"code": [
" int do_search_pc,",
" const uint8_t *searched_pc)",
" if (do_search_pc) {",
" if (do_search_pc) {",
" if (searched_pc < s->code_ptr) {",
" if (macro_op_index >= 0... | static inline int FUNC_0(TCGContext *VAR_0, uint8_t *VAR_1,
int VAR_2,
const uint8_t *VAR_3)
{
int VAR_4, VAR_5, VAR_6;
const TCGOpDef *VAR_7;
unsigned int VAR_8;
const TCGArg *VAR_9;
#ifdef DEBUG_DISAS
if (unlike... | [
"static inline int FUNC_0(TCGContext *VAR_0, uint8_t *VAR_1,\nint VAR_2,\nconst uint8_t *VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6;",
"const TCGOpDef *VAR_7;",
"unsigned int VAR_8;",
"const TCGArg *VAR_9;",
"#ifdef DEBUG_DISAS\nif (unlikely(loglevel & CPU_LOG_TB_OP)) {",
"fprintf(logfile, \"OP:\\n\");",
"t... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
35
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51,
55
... |
16,702 | static int setup_hwaccel(AVCodecContext *avctx,
const enum AVPixelFormat fmt,
const char *name)
{
AVHWAccel *hwa = find_hwaccel(avctx->codec_id, fmt);
int ret = 0;
if (!hwa) {
"Could not find an AVHWAccel for the pixel format: %s",
... | true | FFmpeg | 31741aecbf9938194b25f14de434104be33f5809 | static int setup_hwaccel(AVCodecContext *avctx,
const enum AVPixelFormat fmt,
const char *name)
{
AVHWAccel *hwa = find_hwaccel(avctx->codec_id, fmt);
int ret = 0;
if (!hwa) {
"Could not find an AVHWAccel for the pixel format: %s",
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
const enum AVPixelFormat VAR_1,
const char *VAR_2)
{
AVHWAccel *hwa = find_hwaccel(VAR_0->codec_id, VAR_1);
int VAR_3 = 0;
if (!hwa) {
"Could not find an AVHWAccel for the pixel format: %s",
... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nconst enum AVPixelFormat VAR_1,\nconst char *VAR_2)\n{",
"AVHWAccel *hwa = find_hwaccel(VAR_0->codec_id, VAR_1);",
"int VAR_3 = 0;",
"if (!hwa) {",
"\"Could not find an AVHWAccel for the pixel format: %s\",\nVAR_2);",
"return AVERROR(ENOENT);",
"if (hwa-... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3,
4
],
[
5
],
[
6
],
[
7
],
[
8,
9
],
[
10
],
[
11,
12
],
[
13,
14
],
[
15
],
[
16
],
[
17
],
[
18,
19
],
[
20
],
[
21
],
[
22
],
[
23
],
[
24
],... |
16,703 | static void rpza_decode_stream(RpzaContext *s)
{
int width = s->avctx->width;
int stride = s->frame.linesize[0] / 2;
int row_inc = stride - 4;
int stream_ptr = 0;
int chunk_size;
unsigned char opcode;
int n_blocks;
unsigned short colorA = 0, colorB;
unsigned short color4[4]... | true | FFmpeg | 78e9852a2e3b198ecd69ffa0deab3fa22a8e5378 | static void rpza_decode_stream(RpzaContext *s)
{
int width = s->avctx->width;
int stride = s->frame.linesize[0] / 2;
int row_inc = stride - 4;
int stream_ptr = 0;
int chunk_size;
unsigned char opcode;
int n_blocks;
unsigned short colorA = 0, colorB;
unsigned short color4[4]... | {
"code": [],
"line_no": []
} | static void FUNC_0(RpzaContext *VAR_0)
{
int VAR_1 = VAR_0->avctx->VAR_1;
int VAR_2 = VAR_0->frame.linesize[0] / 2;
int VAR_3 = VAR_2 - 4;
int VAR_4 = 0;
int VAR_5;
unsigned char VAR_6;
int VAR_7;
unsigned short VAR_8 = 0, VAR_9;
unsigned short VAR_10[4];
unsigned char... | [
"static void FUNC_0(RpzaContext *VAR_0)\n{",
"int VAR_1 = VAR_0->avctx->VAR_1;",
"int VAR_2 = VAR_0->frame.linesize[0] / 2;",
"int VAR_3 = VAR_2 - 4;",
"int VAR_4 = 0;",
"int VAR_5;",
"unsigned char VAR_6;",
"int VAR_7;",
"unsigned short VAR_8 = 0, VAR_9;",
"unsigned short VAR_10[4];",
"unsigned... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
45,
47,
49
... |
16,705 | static int mlib_YUV2RGB420_24(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[]){
if(c->srcFormat == PIX_FMT_YUV422P){
srcStride[1] *= 2;
srcStride[2] *= 2;
}
assert(srcStride[1] == srcStride[2]);
mlib_VideoColorYUV2RG... | true | FFmpeg | 428098165de4c3edfe42c1b7f00627d287015863 | static int mlib_YUV2RGB420_24(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[]){
if(c->srcFormat == PIX_FMT_YUV422P){
srcStride[1] *= 2;
srcStride[2] *= 2;
}
assert(srcStride[1] == srcStride[2]);
mlib_VideoColorYUV2RG... | {
"code": [
" int srcSliceH, uint8_t* dst[], int dstStride[]){",
"\tsrcStride[1] *= 2;",
"\tsrcStride[2] *= 2;",
"\t\t\t srcSliceH, dstStride[0], srcStride[0], srcStride[1]);",
" int srcSliceH, uint8_t* dst[], int dstStride[]){",
"\tsrcStride[1] *= 2;",
"\tsrcSt... | static int FUNC_0(SwsContext *VAR_0, uint8_t* VAR_1[], int VAR_2[], int VAR_3,
int VAR_4, uint8_t* VAR_5[], int VAR_6[]){
if(VAR_0->srcFormat == PIX_FMT_YUV422P){
VAR_2[1] *= 2;
VAR_2[2] *= 2;
}
assert(VAR_2[1] == VAR_2[2]);
mlib_VideoColorYUV2RGB420(VAR_5[0]+VAR_3*VAR_6[0], VA... | [
"static int FUNC_0(SwsContext *VAR_0, uint8_t* VAR_1[], int VAR_2[], int VAR_3,\nint VAR_4, uint8_t* VAR_5[], int VAR_6[]){",
"if(VAR_0->srcFormat == PIX_FMT_YUV422P){",
"VAR_2[1] *= 2;",
"VAR_2[2] *= 2;",
"}",
"assert(VAR_2[1] == VAR_2[2]);",
"mlib_VideoColorYUV2RGB420(VAR_5[0]+VAR_3*VAR_6[0], VAR_1[0]... | [
1,
0,
1,
1,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19,
21
],
[
23
],
[
25
]
] |
16,706 | uint64_t ldq_tce(VIOsPAPRDevice *dev, uint64_t taddr)
{
uint64_t val;
spapr_tce_dma_read(dev, taddr, &val, sizeof(val));
return tswap64(val);
}
| true | qemu | ad0ebb91cd8b5fdc4a583b03645677771f420a46 | uint64_t ldq_tce(VIOsPAPRDevice *dev, uint64_t taddr)
{
uint64_t val;
spapr_tce_dma_read(dev, taddr, &val, sizeof(val));
return tswap64(val);
}
| {
"code": [
"uint64_t ldq_tce(VIOsPAPRDevice *dev, uint64_t taddr)",
" uint64_t val;",
" spapr_tce_dma_read(dev, taddr, &val, sizeof(val));",
" return tswap64(val);"
],
"line_no": [
1,
5,
9,
11
]
} | uint64_t FUNC_0(VIOsPAPRDevice *dev, uint64_t taddr)
{
uint64_t val;
spapr_tce_dma_read(dev, taddr, &val, sizeof(val));
return tswap64(val);
}
| [
"uint64_t FUNC_0(VIOsPAPRDevice *dev, uint64_t taddr)\n{",
"uint64_t val;",
"spapr_tce_dma_read(dev, taddr, &val, sizeof(val));",
"return tswap64(val);",
"}"
] | [
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
]
] |
16,707 | static int raw_reopen_prepare(BDRVReopenState *state,
BlockReopenQueue *queue, Error **errp)
{
BDRVRawState *s;
BDRVRawReopenState *raw_s;
int ret = 0;
Error *local_err = NULL;
assert(state != NULL);
assert(state->bs != NULL);
s = state->bs->opaque;... | true | qemu | 5839e53bbc0fec56021d758aab7610df421ed8c8 | static int raw_reopen_prepare(BDRVReopenState *state,
BlockReopenQueue *queue, Error **errp)
{
BDRVRawState *s;
BDRVRawReopenState *raw_s;
int ret = 0;
Error *local_err = NULL;
assert(state != NULL);
assert(state->bs != NULL);
s = state->bs->opaque;... | {
"code": [
" state->opaque = g_malloc0(sizeof(BDRVRawReopenState));"
],
"line_no": [
27
]
} | static int FUNC_0(BDRVReopenState *VAR_0,
BlockReopenQueue *VAR_1, Error **VAR_2)
{
BDRVRawState *s;
BDRVRawReopenState *raw_s;
int VAR_3 = 0;
Error *local_err = NULL;
assert(VAR_0 != NULL);
assert(VAR_0->bs != NULL);
s = VAR_0->bs->opaque;
V... | [
"static int FUNC_0(BDRVReopenState *VAR_0,\nBlockReopenQueue *VAR_1, Error **VAR_2)\n{",
"BDRVRawState *s;",
"BDRVRawReopenState *raw_s;",
"int VAR_3 = 0;",
"Error *local_err = NULL;",
"assert(VAR_0 != NULL);",
"assert(VAR_0->bs != NULL);",
"s = VAR_0->bs->opaque;",
"VAR_0->opaque = g_malloc0(sizeof... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29
],
[
33,
35
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53,
57
],
[
59
],
[
61
],
[... |
16,710 | int net_init_dump(QemuOpts *opts, const char *name, VLANState *vlan)
{
int len;
const char *file;
char def_file[128];
assert(vlan);
file = qemu_opt_get(opts, "file");
if (!file) {
snprintf(def_file, sizeof(def_file), "qemu-vlan%d.pcap", vlan->id);
file = def_file;
... | true | qemu | 6687b79d636cd60ed9adb1177d0d946b58fa7717 | int net_init_dump(QemuOpts *opts, const char *name, VLANState *vlan)
{
int len;
const char *file;
char def_file[128];
assert(vlan);
file = qemu_opt_get(opts, "file");
if (!file) {
snprintf(def_file, sizeof(def_file), "qemu-vlan%d.pcap", vlan->id);
file = def_file;
... | {
"code": [
"int net_init_dump(QemuOpts *opts, const char *name, VLANState *vlan)"
],
"line_no": [
1
]
} | int FUNC_0(QemuOpts *VAR_0, const char *VAR_1, VLANState *VAR_2)
{
int VAR_3;
const char *VAR_4;
char VAR_5[128];
assert(VAR_2);
VAR_4 = qemu_opt_get(VAR_0, "VAR_4");
if (!VAR_4) {
snprintf(VAR_5, sizeof(VAR_5), "qemu-VAR_2%d.pcap", VAR_2->id);
VAR_4 = VAR_5;
}
... | [
"int FUNC_0(QemuOpts *VAR_0, const char *VAR_1, VLANState *VAR_2)\n{",
"int VAR_3;",
"const char *VAR_4;",
"char VAR_5[128];",
"assert(VAR_2);",
"VAR_4 = qemu_opt_get(VAR_0, \"VAR_4\");",
"if (!VAR_4) {",
"snprintf(VAR_5, sizeof(VAR_5), \"qemu-VAR_2%d.pcap\", VAR_2->id);",
"VAR_4 = VAR_5;",
"}",
... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
33
],
[
35
]
] |
16,711 | static int blk_free(struct XenDevice *xendev)
{
struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev);
struct ioreq *ioreq;
if (blkdev->blk || blkdev->sring) {
blk_disconnect(xendev);
}
/* Free persistent grants */
if (blkdev->feature_persistent) {
... | true | qemu | 2f01dfacb56bc7a0d4639adc9dff9aae131e6216 | static int blk_free(struct XenDevice *xendev)
{
struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev);
struct ioreq *ioreq;
if (blkdev->blk || blkdev->sring) {
blk_disconnect(xendev);
}
if (blkdev->feature_persistent) {
g_tree_destroy(blkdev->per... | {
"code": [
" if (blkdev->feature_persistent) {",
" g_tree_destroy(blkdev->persistent_gnts);"
],
"line_no": [
21,
23
]
} | static int FUNC_0(struct XenDevice *VAR_0)
{
struct XenBlkDev *VAR_1 = container_of(VAR_0, struct XenBlkDev, VAR_0);
struct VAR_2 *VAR_2;
if (VAR_1->blk || VAR_1->sring) {
blk_disconnect(VAR_0);
}
if (VAR_1->feature_persistent) {
g_tree_destroy(VAR_1->persistent_gnt... | [
"static int FUNC_0(struct XenDevice *VAR_0)\n{",
"struct XenBlkDev *VAR_1 = container_of(VAR_0, struct XenBlkDev, VAR_0);",
"struct VAR_2 *VAR_2;",
"if (VAR_1->blk || VAR_1->sring) {",
"blk_disconnect(VAR_0);",
"}",
"if (VAR_1->feature_persistent) {",
"g_tree_destroy(VAR_1->persistent_gnts);",
"}",
... | [
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51... |
16,712 | static void r2d_init(ram_addr_t ram_size, int vga_ram_size,
const char *boot_device,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_model)
{
CPUState *env;
struct SH7750State *s;
ram_addr_t sdram_addr, sm501_vga_ram_ad... | true | qemu | ab2da564d7f8f2a0e4e31875e1cdf87db14500e2 | static void r2d_init(ram_addr_t ram_size, int vga_ram_size,
const char *boot_device,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_model)
{
CPUState *env;
struct SH7750State *s;
ram_addr_t sdram_addr, sm501_vga_ram_ad... | {
"code": [
" mmio_ide_init(0x14001000, 0x1400080c, irq[CF_IDE], 1,",
" drives_table[drive_get_index(IF_IDE, 0, 0)].bdrv, NULL);",
" pci_nic_init(pci, &nd_table[0], 2 << 3, \"rtl8139\");",
" for (i = 1; i < nb_nics; i++)",
" pci_nic_init(pci, &nd_table[i], -1, \"ne2k_pci\");... | static void FUNC_0(ram_addr_t VAR_0, int VAR_1,
const char *VAR_2,
const char *VAR_3, const char *VAR_4,
const char *VAR_5, const char *VAR_6)
{
CPUState *env;
struct SH7750State *VAR_7;
ram_addr_t sdram_addr, sm501_vga_ram_addr;
qemu_irq *irq;
PCIBus *pci;
... | [
"static void FUNC_0(ram_addr_t VAR_0, int VAR_1,\nconst char *VAR_2,\nconst char *VAR_3, const char *VAR_4,\nconst char *VAR_5, const char *VAR_6)\n{",
"CPUState *env;",
"struct SH7750State *VAR_7;",
"ram_addr_t sdram_addr, sm501_vga_ram_addr;",
"qemu_irq *irq;",
"PCIBus *pci;",
"int VAR_8;",
"if (!VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
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
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
... |
16,713 | MigrationIncomingState *migration_incoming_state_new(QEMUFile* f)
{
mis_current = g_malloc0(sizeof(MigrationIncomingState));
mis_current->file = f;
QLIST_INIT(&mis_current->loadvm_handlers);
return mis_current;
}
| true | qemu | 97f3ad35517e0d02c0149637d1bb10713c52b057 | MigrationIncomingState *migration_incoming_state_new(QEMUFile* f)
{
mis_current = g_malloc0(sizeof(MigrationIncomingState));
mis_current->file = f;
QLIST_INIT(&mis_current->loadvm_handlers);
return mis_current;
}
| {
"code": [
" mis_current = g_malloc0(sizeof(MigrationIncomingState));"
],
"line_no": [
5
]
} | MigrationIncomingState *FUNC_0(QEMUFile* f)
{
mis_current = g_malloc0(sizeof(MigrationIncomingState));
mis_current->file = f;
QLIST_INIT(&mis_current->loadvm_handlers);
return mis_current;
}
| [
"MigrationIncomingState *FUNC_0(QEMUFile* f)\n{",
"mis_current = g_malloc0(sizeof(MigrationIncomingState));",
"mis_current->file = f;",
"QLIST_INIT(&mis_current->loadvm_handlers);",
"return mis_current;",
"}"
] | [
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
]
] |
16,714 | double av_get_double(void *obj, const char *name, const AVOption **o_out)
{
int64_t intnum=1;
double num=1;
int den=1;
av_get_number(obj, name, o_out, &num, &den, &intnum);
return num*intnum/den;
}
| true | FFmpeg | 8089b7fa8c5b5a48cc7101daa4be891d0ead5a5e | double av_get_double(void *obj, const char *name, const AVOption **o_out)
{
int64_t intnum=1;
double num=1;
int den=1;
av_get_number(obj, name, o_out, &num, &den, &intnum);
return num*intnum/den;
}
| {
"code": [
" av_get_number(obj, name, o_out, &num, &den, &intnum);",
" av_get_number(obj, name, o_out, &num, &den, &intnum);",
" av_get_number(obj, name, o_out, &num, &den, &intnum);"
],
"line_no": [
13,
13,
13
]
} | double FUNC_0(void *VAR_0, const char *VAR_1, const AVOption **VAR_2)
{
int64_t intnum=1;
double VAR_3=1;
int VAR_4=1;
av_get_number(VAR_0, VAR_1, VAR_2, &VAR_3, &VAR_4, &intnum);
return VAR_3*intnum/VAR_4;
}
| [
"double FUNC_0(void *VAR_0, const char *VAR_1, const AVOption **VAR_2)\n{",
"int64_t intnum=1;",
"double VAR_3=1;",
"int VAR_4=1;",
"av_get_number(VAR_0, VAR_1, VAR_2, &VAR_3, &VAR_4, &intnum);",
"return VAR_3*intnum/VAR_4;",
"}"
] | [
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
]
] |
16,715 | static void laio_cancel(BlockDriverAIOCB *blockacb)
{
struct qemu_laiocb *laiocb = (struct qemu_laiocb *)blockacb;
struct io_event event;
int ret;
if (laiocb->ret != -EINPROGRESS)
return;
/*
* Note that as of Linux 2.6.31 neither the block device code nor any
* filesys... | true | qemu | 771b64daf9c73be98d223d3ab101a61f02cac277 | static void laio_cancel(BlockDriverAIOCB *blockacb)
{
struct qemu_laiocb *laiocb = (struct qemu_laiocb *)blockacb;
struct io_event event;
int ret;
if (laiocb->ret != -EINPROGRESS)
return;
ret = io_cancel(laiocb->ctx->ctx, &laiocb->iocb, &event);
if (ret == 0) {
... | {
"code": [
" if (laiocb->ret != -EINPROGRESS)",
" if (ret == 0) {",
" laiocb->ret = -ECANCELED;",
" while (laiocb->ret == -EINPROGRESS) {",
" qemu_laio_completion_cb(&laiocb->ctx->e);"
],
"line_no": [
13,
31,
33,
55,
57
]
} | static void FUNC_0(BlockDriverAIOCB *VAR_0)
{
struct qemu_laiocb *VAR_1 = (struct qemu_laiocb *)VAR_0;
struct io_event VAR_2;
int VAR_3;
if (VAR_1->VAR_3 != -EINPROGRESS)
return;
VAR_3 = io_cancel(VAR_1->ctx->ctx, &VAR_1->iocb, &VAR_2);
if (VAR_3 == 0) {
... | [
"static void FUNC_0(BlockDriverAIOCB *VAR_0)\n{",
"struct qemu_laiocb *VAR_1 = (struct qemu_laiocb *)VAR_0;",
"struct io_event VAR_2;",
"int VAR_3;",
"if (VAR_1->VAR_3 != -EINPROGRESS)\nreturn;",
"VAR_3 = io_cancel(VAR_1->ctx->ctx, &VAR_1->iocb, &VAR_2);",
"if (VAR_3 == 0) {",
"VAR_1->VAR_3 = -ECANCEL... | [
0,
0,
0,
0,
1,
0,
1,
1,
0,
0,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
55
],
[
57
],
[
59
],
[
61
]
] |
16,716 | static inline void RENAME(yuv2bgr24_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 *... | true | FFmpeg | 009f829dde811af654af7110326aea3a72c05d5e | static inline void RENAME(yuv2bgr24_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 *... | {
"code": [
" x86_reg uv_off = c->uv_off << 1;",
" \"a\" (&c->redDither), \"m\"(uv_off)",
" \"a\" (&c->redDither), \"m\"(uv_off)",
" x86_reg uv_off = c->uv_off << 1;",
" x86_reg uv_off = c->uv_off << 1;",
" x86_reg uv_off = c->uv_off << 1;",
" x86... | static inline void FUNC_0(yuv2bgr24_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 *... | [
"static inline void FUNC_0(yuv2bgr24_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{",
"x86_reg uv_off = c->uv_off ... | [
0,
1,
0,
0,
1,
0,
1,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
17
],
[
21
],
[
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45
],
[
47
],
[
49,
51,
53,
55,
57,
59,
61,
63,
65,
67,
69,... |
16,718 | static int avi_read_idx1(AVFormatContext *s, int size)
{
AVIContext *avi = s->priv_data;
AVIOContext *pb = s->pb;
int nb_index_entries, i;
AVStream *st;
AVIStream *ast;
unsigned int index, tag, flags, pos, len, first_packet = 1;
unsigned last_pos= -1;
int64_t idx1_pos, first_pac... | true | FFmpeg | 3c7f75bd84b4c30a0f86a491a37f759dfaaab86d | static int avi_read_idx1(AVFormatContext *s, int size)
{
AVIContext *avi = s->priv_data;
AVIOContext *pb = s->pb;
int nb_index_entries, i;
AVStream *st;
AVIStream *ast;
unsigned int index, tag, flags, pos, len, first_packet = 1;
unsigned last_pos= -1;
int64_t idx1_pos, first_pac... | {
"code": [
" if(url_feof(pb))",
" return -1;"
],
"line_no": [
95,
97
]
} | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1)
{
AVIContext *avi = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
int VAR_2, VAR_3;
AVStream *st;
AVIStream *ast;
unsigned int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9 = 1;
unsigned VAR_10= -1;
int64_t idx1_pos, first_packet_... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1)\n{",
"AVIContext *avi = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"int VAR_2, VAR_3;",
"AVStream *st;",
"AVIStream *ast;",
"unsigned int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9 = 1;",
"unsigned VAR_10= -1;",
"int64_t idx1_pos, first_pa... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25,
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
49
],
[... |
16,719 | static float quantize_band_cost_bits(struct AACEncContext *s, const float *in,
const float *scaled, int size, int scale_idx,
int cb, const float lambda, const float uplim,
int *bits, int rtz)
{
return... | true | FFmpeg | 01ecb7172b684f1c4b3e748f95c5a9a494ca36ec | static float quantize_band_cost_bits(struct AACEncContext *s, const float *in,
const float *scaled, int size, int scale_idx,
int cb, const float lambda, const float uplim,
int *bits, int rtz)
{
return... | {
"code": [
" int *bits, int rtz)"
],
"line_no": [
7
]
} | static float FUNC_0(struct AACEncContext *VAR_0, const float *VAR_1,
const float *VAR_2, int VAR_3, int VAR_4,
int VAR_5, const float VAR_6, const float VAR_7,
int *VAR_8, int VAR_9)
{
return get_band... | [
"static float FUNC_0(struct AACEncContext *VAR_0, const float *VAR_1,\nconst float *VAR_2, int VAR_3, int VAR_4,\nint VAR_5, const float VAR_6, const float VAR_7,\nint *VAR_8, int VAR_9)\n{",
"return get_band_numbits(VAR_0, NULL, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8);",
"}"
] | [
1,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
]
] |
16,720 | static void coroutine_fn stream_run(void *opaque)
{
StreamBlockJob *s = opaque;
BlockDriverState *bs = s->common.bs;
BlockDriverState *base = s->base;
int64_t sector_num, end;
int error = 0;
int ret = 0;
int n = 0;
void *buf;
s->common.len = bdrv_getlength(bs);
if (s... | true | qemu | c3e4f43a99549daa6e9b87350922e8339341c2ab | static void coroutine_fn stream_run(void *opaque)
{
StreamBlockJob *s = opaque;
BlockDriverState *bs = s->common.bs;
BlockDriverState *base = s->base;
int64_t sector_num, end;
int error = 0;
int ret = 0;
int n = 0;
void *buf;
s->common.len = bdrv_getlength(bs);
if (s... | {
"code": [
" copy = false;",
" if (ret >= 0 && copy) {"
],
"line_no": [
93,
123
]
} | static void VAR_0 stream_run(void *opaque)
{
StreamBlockJob *s = opaque;
BlockDriverState *bs = s->common.bs;
BlockDriverState *base = s->base;
int64_t sector_num, end;
int error = 0;
int ret = 0;
int n = 0;
void *buf;
s->common.len = bdrv_getlength(bs);
if (s->commo... | [
"static void VAR_0 stream_run(void *opaque)\n{",
"StreamBlockJob *s = opaque;",
"BlockDriverState *bs = s->common.bs;",
"BlockDriverState *base = s->base;",
"int64_t sector_num, end;",
"int error = 0;",
"int ret = 0;",
"int n = 0;",
"void *buf;",
"s->common.len = bdrv_getlength(bs);",
"if (s->co... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
51
],
[
53
],
[
55
],
[
59
... |
16,722 | PCIBus *pci_apb_init(hwaddr special_base,
hwaddr mem_base,
qemu_irq *ivec_irqs, PCIBus **busA, PCIBus **busB,
qemu_irq **pbm_irqs)
{
DeviceState *dev;
SysBusDevice *s;
PCIHostState *phb;
APBState *d;
IOMMUState *is;
PCIDevi... | false | qemu | 6864fa38972081833f79b39df74b9c08cc94f6cc | PCIBus *pci_apb_init(hwaddr special_base,
hwaddr mem_base,
qemu_irq *ivec_irqs, PCIBus **busA, PCIBus **busB,
qemu_irq **pbm_irqs)
{
DeviceState *dev;
SysBusDevice *s;
PCIHostState *phb;
APBState *d;
IOMMUState *is;
PCIDevi... | {
"code": [],
"line_no": []
} | PCIBus *FUNC_0(hwaddr special_base,
hwaddr mem_base,
qemu_irq *ivec_irqs, PCIBus **busA, PCIBus **busB,
qemu_irq **pbm_irqs)
{
DeviceState *dev;
SysBusDevice *s;
PCIHostState *phb;
APBState *d;
IOMMUState *is;
PCIDevice *pc... | [
"PCIBus *FUNC_0(hwaddr special_base,\nhwaddr mem_base,\nqemu_irq *ivec_irqs, PCIBus **busA, PCIBus **busB,\nqemu_irq **pbm_irqs)\n{",
"DeviceState *dev;",
"SysBusDevice *s;",
"PCIHostState *phb;",
"APBState *d;",
"IOMMUState *is;",
"PCIDevice *pci_dev;",
"PCIBridge *br;",
"dev = qdev_create(NULL, TY... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
29
],
[
31
],
[
33
],
[
35,
37,
39,
41,
43
],
[
45
],
[
47
],
[
51
],
[
55
],
[... |
16,725 | void register_module_init(void (*fn)(void), module_init_type type)
{
ModuleEntry *e;
ModuleTypeList *l;
e = qemu_mallocz(sizeof(*e));
e->init = fn;
l = find_type(type);
TAILQ_INSERT_TAIL(l, e, node);
}
| false | qemu | 72cf2d4f0e181d0d3a3122e04129c58a95da713e | void register_module_init(void (*fn)(void), module_init_type type)
{
ModuleEntry *e;
ModuleTypeList *l;
e = qemu_mallocz(sizeof(*e));
e->init = fn;
l = find_type(type);
TAILQ_INSERT_TAIL(l, e, node);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(void (*VAR_0)(void), module_init_type VAR_1)
{
ModuleEntry *e;
ModuleTypeList *l;
e = qemu_mallocz(sizeof(*e));
e->init = VAR_0;
l = find_type(VAR_1);
TAILQ_INSERT_TAIL(l, e, node);
}
| [
"void FUNC_0(void (*VAR_0)(void), module_init_type VAR_1)\n{",
"ModuleEntry *e;",
"ModuleTypeList *l;",
"e = qemu_mallocz(sizeof(*e));",
"e->init = VAR_0;",
"l = find_type(VAR_1);",
"TAILQ_INSERT_TAIL(l, e, node);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
]
] |
16,726 | static void spitz_common_init(ram_addr_t ram_size, int vga_ram_size,
const char *kernel_filename,
const char *kernel_cmdline, const char *initrd_filename,
const char *cpu_model, enum spitz_model_e model, int arm_id)
{
struct pxa2xx_state_s *cpu;
struct scoop... | false | qemu | a0b753dfd3920df146a5f4d05e442e3c522900c7 | static void spitz_common_init(ram_addr_t ram_size, int vga_ram_size,
const char *kernel_filename,
const char *kernel_cmdline, const char *initrd_filename,
const char *cpu_model, enum spitz_model_e model, int arm_id)
{
struct pxa2xx_state_s *cpu;
struct scoop... | {
"code": [],
"line_no": []
} | static void FUNC_0(ram_addr_t VAR_0, int VAR_1,
const char *VAR_2,
const char *VAR_3, const char *VAR_4,
const char *VAR_5, enum spitz_model_e VAR_6, int VAR_7)
{
struct pxa2xx_state_s *VAR_8;
struct scoop_info_s *VAR_9, *VAR_10 = NULL;
if (!VAR_5)
... | [
"static void FUNC_0(ram_addr_t VAR_0, int VAR_1,\nconst char *VAR_2,\nconst char *VAR_3, const char *VAR_4,\nconst char *VAR_5, enum spitz_model_e VAR_6, int VAR_7)\n{",
"struct pxa2xx_state_s *VAR_8;",
"struct scoop_info_s *VAR_9, *VAR_10 = NULL;",
"if (!VAR_5)\nVAR_5 = (VAR_6 == terrier) ? \"pxa270-c5\" : \... | [
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
43,
45
],
[
51
],
[
55
],
[
59
],
[
61
],
[
63
],
[
65
... |
16,729 | uint32_t cpu_inl(pio_addr_t addr)
{
uint32_t val;
val = ioport_read(2, addr);
trace_cpu_in(addr, val);
LOG_IOPORT("inl : %04"FMT_pioaddr" %08"PRIx32"\n", addr, val);
return val;
}
| false | qemu | b40acf99bef69fa8ab0f9092ff162fde945eec12 | uint32_t cpu_inl(pio_addr_t addr)
{
uint32_t val;
val = ioport_read(2, addr);
trace_cpu_in(addr, val);
LOG_IOPORT("inl : %04"FMT_pioaddr" %08"PRIx32"\n", addr, val);
return val;
}
| {
"code": [],
"line_no": []
} | uint32_t FUNC_0(pio_addr_t addr)
{
uint32_t val;
val = ioport_read(2, addr);
trace_cpu_in(addr, val);
LOG_IOPORT("inl : %04"FMT_pioaddr" %08"PRIx32"\n", addr, val);
return val;
}
| [
"uint32_t FUNC_0(pio_addr_t addr)\n{",
"uint32_t val;",
"val = ioport_read(2, addr);",
"trace_cpu_in(addr, val);",
"LOG_IOPORT(\"inl : %04\"FMT_pioaddr\" %08\"PRIx32\"\\n\", addr, val);",
"return val;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
16,730 | static int nbd_co_request(BlockDriverState *bs,
NBDRequest *request,
QEMUIOVector *qiov)
{
NBDClientSession *client = nbd_get_client_session(bs);
int ret;
assert(!qiov || request->type == NBD_CMD_WRITE ||
request->type == NBD_CMD_READ);... | false | qemu | 4bfe4478d17679464a2aaa91ed703522ed9af8a0 | static int nbd_co_request(BlockDriverState *bs,
NBDRequest *request,
QEMUIOVector *qiov)
{
NBDClientSession *client = nbd_get_client_session(bs);
int ret;
assert(!qiov || request->type == NBD_CMD_WRITE ||
request->type == NBD_CMD_READ);... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0,
NBDRequest *VAR_1,
QEMUIOVector *VAR_2)
{
NBDClientSession *client = nbd_get_client_session(VAR_0);
int VAR_3;
assert(!VAR_2 || VAR_1->type == NBD_CMD_WRITE ||
VAR_1->type == NBD_CMD_READ);
... | [
"static int FUNC_0(BlockDriverState *VAR_0,\nNBDRequest *VAR_1,\nQEMUIOVector *VAR_2)\n{",
"NBDClientSession *client = nbd_get_client_session(VAR_0);",
"int VAR_3;",
"assert(!VAR_2 || VAR_1->type == NBD_CMD_WRITE ||\nVAR_1->type == NBD_CMD_READ);",
"VAR_3 = nbd_co_send_request(VAR_0, VAR_1,\nVAR_1->type == ... | [
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
]
] |
16,732 | static int posix_aio_process_queue(void *opaque)
{
PosixAioState *s = opaque;
struct qemu_paiocb *acb, **pacb;
int ret;
int result = 0;
int async_context_id = get_async_context_id();
for(;;) {
pacb = &s->first_aio;
for(;;) {
acb = *pacb;
if (!... | false | qemu | 384acbf46b70edf0d2c1648aa1a92a90bcf7057d | static int posix_aio_process_queue(void *opaque)
{
PosixAioState *s = opaque;
struct qemu_paiocb *acb, **pacb;
int ret;
int result = 0;
int async_context_id = get_async_context_id();
for(;;) {
pacb = &s->first_aio;
for(;;) {
acb = *pacb;
if (!... | {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0)
{
PosixAioState *s = VAR_0;
struct qemu_paiocb *VAR_1, **VAR_2;
int VAR_3;
int VAR_4 = 0;
int VAR_5 = get_async_context_id();
for(;;) {
VAR_2 = &s->first_aio;
for(;;) {
VAR_1 = *VAR_2;
if (!VAR_1)
... | [
"static int FUNC_0(void *VAR_0)\n{",
"PosixAioState *s = VAR_0;",
"struct qemu_paiocb *VAR_1, **VAR_2;",
"int VAR_3;",
"int VAR_4 = 0;",
"int VAR_5 = get_async_context_id();",
"for(;;) {",
"VAR_2 = &s->first_aio;",
"for(;;) {",
"VAR_1 = *VAR_2;",
"if (!VAR_1)\nreturn VAR_4;",
"if (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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49
],
[
51
],
[... |
16,733 | static uint32_t isa_mmio_readb (void *opaque, target_phys_addr_t addr)
{
return cpu_inb(addr & IOPORTS_MASK);
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint32_t isa_mmio_readb (void *opaque, target_phys_addr_t addr)
{
return cpu_inb(addr & IOPORTS_MASK);
}
| {
"code": [],
"line_no": []
} | static uint32_t FUNC_0 (void *opaque, target_phys_addr_t addr)
{
return cpu_inb(addr & IOPORTS_MASK);
}
| [
"static uint32_t FUNC_0 (void *opaque, target_phys_addr_t addr)\n{",
"return cpu_inb(addr & IOPORTS_MASK);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
16,734 | static int vpc_create(const char *filename, int64_t total_sectors,
const char *backing_file, int flags)
{
uint8_t buf[1024];
struct vhd_footer* footer = (struct vhd_footer*) buf;
struct vhd_dyndisk_header* dyndisk_header =
(struct vhd_dyndisk_header*) buf;
int fd, i;
uint16_t cyl... | false | qemu | 6e9ea0c0629fe25723494a19498bedf4b781cbfa | static int vpc_create(const char *filename, int64_t total_sectors,
const char *backing_file, int flags)
{
uint8_t buf[1024];
struct vhd_footer* footer = (struct vhd_footer*) buf;
struct vhd_dyndisk_header* dyndisk_header =
(struct vhd_dyndisk_header*) buf;
int fd, i;
uint16_t cyl... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0, int64_t VAR_1,
const char *VAR_2, int VAR_3)
{
uint8_t buf[1024];
struct vhd_footer* VAR_4 = (struct vhd_footer*) buf;
struct vhd_dyndisk_header* VAR_5 =
(struct vhd_dyndisk_header*) buf;
int VAR_6, VAR_7;
uint16_t cyls;
uint8_t heads;
... | [
"static int FUNC_0(const char *VAR_0, int64_t VAR_1,\nconst char *VAR_2, int VAR_3)\n{",
"uint8_t buf[1024];",
"struct vhd_footer* VAR_4 = (struct vhd_footer*) buf;",
"struct vhd_dyndisk_header* VAR_5 =\n(struct vhd_dyndisk_header*) buf;",
"int VAR_6, VAR_7;",
"uint16_t cyls;",
"uint8_t heads;",
"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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
33
],
[
35,
37
],
[
43
],
[
45
],
[
51
],
[
55
],
[
59
],
[
61
... |
16,736 | static int usb_msd_initfn(USBDevice *dev)
{
MSDState *s = DO_UPCAST(MSDState, dev, dev);
BlockDriverState *bs = s->conf.bs;
DriveInfo *dinfo;
if (!bs) {
error_report("usb-msd: drive property not set");
return -1;
}
/*
* Hack alert: this pretends to be a block d... | false | qemu | 6a84cb1f2822e494839b93dd8c7f7f8fa6c261a9 | static int usb_msd_initfn(USBDevice *dev)
{
MSDState *s = DO_UPCAST(MSDState, dev, dev);
BlockDriverState *bs = s->conf.bs;
DriveInfo *dinfo;
if (!bs) {
error_report("usb-msd: drive property not set");
return -1;
}
bdrv_detach_dev(bs, &s->dev.qd... | {
"code": [],
"line_no": []
} | static int FUNC_0(USBDevice *VAR_0)
{
MSDState *s = DO_UPCAST(MSDState, VAR_0, VAR_0);
BlockDriverState *bs = s->conf.bs;
DriveInfo *dinfo;
if (!bs) {
error_report("usb-msd: drive property not set");
return -1;
}
bdrv_detach_dev(bs, &s->VAR_0.qd... | [
"static int FUNC_0(USBDevice *VAR_0)\n{",
"MSDState *s = DO_UPCAST(MSDState, VAR_0, VAR_0);",
"BlockDriverState *bs = s->conf.bs;",
"DriveInfo *dinfo;",
"if (!bs) {",
"error_report(\"usb-msd: drive property not set\");",
"return -1;",
"}",
"bdrv_detach_dev(bs, &s->VAR_0.qdev);",
"s->conf.bs = NULL... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
41
],
[
43
],
[
47
],
[
51
],
[
53
],
[
55
],
[
57
],
[
59
],
[
61
],
[
63
],
[
65
],
[
69
... |
16,738 | static int encode_superframe(AVCodecContext *avctx,
unsigned char *buf, int buf_size, void *data){
WMACodecContext *s = avctx->priv_data;
const short *samples = data;
int i, total_gain;
s->block_len_bits= s->frame_len_bits; //required by non variable block len
s->... | false | FFmpeg | 5d652e063bd3a180f9de8915e5137aa4f938846d | static int encode_superframe(AVCodecContext *avctx,
unsigned char *buf, int buf_size, void *data){
WMACodecContext *s = avctx->priv_data;
const short *samples = data;
int i, total_gain;
s->block_len_bits= s->frame_len_bits;
s->block_len = 1 << s->block_len_bits;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
unsigned char *VAR_1, int VAR_2, void *VAR_3){
WMACodecContext *s = VAR_0->priv_data;
const short *VAR_4 = VAR_3;
int VAR_9, VAR_6;
s->block_len_bits= s->frame_len_bits;
s->block_len = 1 << s->block_len_bits;
apply_... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nunsigned char *VAR_1, int VAR_2, void *VAR_3){",
"WMACodecContext *s = VAR_0->priv_data;",
"const short *VAR_4 = VAR_3;",
"int VAR_9, VAR_6;",
"s->block_len_bits= s->frame_len_bits;",
"s->block_len = 1 << s->block_len_bits;",
"apply_window_and_mdct(VAR_0, VAR_4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
... |
16,739 | static void tgen_movcond(TCGContext *s, TCGType type, TCGCond c, TCGReg dest,
TCGReg c1, TCGArg c2, int c2const, TCGReg r3)
{
int cc;
if (facilities & FACILITY_LOAD_ON_COND) {
cc = tgen_cmp(s, type, c, c1, c2, c2const, false);
tcg_out_insn(s, RRF, LOCGR, dest, r3, ... | false | qemu | b2c98d9d392c87c9b9e975d30f79924719d9cbbe | static void tgen_movcond(TCGContext *s, TCGType type, TCGCond c, TCGReg dest,
TCGReg c1, TCGArg c2, int c2const, TCGReg r3)
{
int cc;
if (facilities & FACILITY_LOAD_ON_COND) {
cc = tgen_cmp(s, type, c, c1, c2, c2const, false);
tcg_out_insn(s, RRF, LOCGR, dest, r3, ... | {
"code": [],
"line_no": []
} | static void FUNC_0(TCGContext *VAR_0, TCGType VAR_1, TCGCond VAR_2, TCGReg VAR_3,
TCGReg VAR_4, TCGArg VAR_5, int VAR_6, TCGReg VAR_7)
{
int VAR_8;
if (facilities & FACILITY_LOAD_ON_COND) {
VAR_8 = tgen_cmp(VAR_0, VAR_1, VAR_2, VAR_4, VAR_5, VAR_6, false);
tcg_out_... | [
"static void FUNC_0(TCGContext *VAR_0, TCGType VAR_1, TCGCond VAR_2, TCGReg VAR_3,\nTCGReg VAR_4, TCGArg VAR_5, int VAR_6, TCGReg VAR_7)\n{",
"int VAR_8;",
"if (facilities & FACILITY_LOAD_ON_COND) {",
"VAR_8 = tgen_cmp(VAR_0, VAR_1, VAR_2, VAR_4, VAR_5, VAR_6, false);",
"tcg_out_insn(VAR_0, RRF, LOCGR, VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
16,740 | static void parse_numa_node(MachineState *ms, NumaNodeOptions *node,
QemuOpts *opts, Error **errp)
{
uint16_t nodenr;
uint16List *cpus = NULL;
MachineClass *mc = MACHINE_GET_CLASS(ms);
if (node->has_nodeid) {
nodenr = node->nodeid;
} else {
node... | false | qemu | cc001888b78090ed08d05453b5574b3253a143c0 | static void parse_numa_node(MachineState *ms, NumaNodeOptions *node,
QemuOpts *opts, Error **errp)
{
uint16_t nodenr;
uint16List *cpus = NULL;
MachineClass *mc = MACHINE_GET_CLASS(ms);
if (node->has_nodeid) {
nodenr = node->nodeid;
} else {
node... | {
"code": [],
"line_no": []
} | static void FUNC_0(MachineState *VAR_0, NumaNodeOptions *VAR_1,
QemuOpts *VAR_2, Error **VAR_3)
{
uint16_t nodenr;
uint16List *cpus = NULL;
MachineClass *mc = MACHINE_GET_CLASS(VAR_0);
if (VAR_1->has_nodeid) {
nodenr = VAR_1->nodeid;
} else {
no... | [
"static void FUNC_0(MachineState *VAR_0, NumaNodeOptions *VAR_1,\nQemuOpts *VAR_2, Error **VAR_3)\n{",
"uint16_t nodenr;",
"uint16List *cpus = NULL;",
"MachineClass *mc = MACHINE_GET_CLASS(VAR_0);",
"if (VAR_1->has_nodeid) {",
"nodenr = VAR_1->nodeid;",
"} else {",
"nodenr = nb_numa_nodes;",
"}",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
... |
16,741 | static int calculate_geometry(int64_t total_sectors, uint16_t* cyls,
uint8_t* heads, uint8_t* secs_per_cyl)
{
uint32_t cyls_times_heads;
if (total_sectors > 65535 * 16 * 255)
return -EFBIG;
if (total_sectors > 65535 * 16 * 63) {
*secs_per_cyl = 255;
*heads = 16;
... | false | qemu | 258d2edbcd4bb5d267c96163333820332e1c14fa | static int calculate_geometry(int64_t total_sectors, uint16_t* cyls,
uint8_t* heads, uint8_t* secs_per_cyl)
{
uint32_t cyls_times_heads;
if (total_sectors > 65535 * 16 * 255)
return -EFBIG;
if (total_sectors > 65535 * 16 * 63) {
*secs_per_cyl = 255;
*heads = 16;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(int64_t VAR_0, uint16_t* VAR_1,
uint8_t* VAR_2, uint8_t* VAR_3)
{
uint32_t cyls_times_heads;
if (VAR_0 > 65535 * 16 * 255)
return -EFBIG;
if (VAR_0 > 65535 * 16 * 63) {
*VAR_3 = 255;
*VAR_2 = 16;
cyls_times_heads = VAR_0 / *VAR_3;
} els... | [
"static int FUNC_0(int64_t VAR_0, uint16_t* VAR_1,\nuint8_t* VAR_2, uint8_t* VAR_3)\n{",
"uint32_t cyls_times_heads;",
"if (VAR_0 > 65535 * 16 * 255)\nreturn -EFBIG;",
"if (VAR_0 > 65535 * 16 * 63) {",
"*VAR_3 = 255;",
"*VAR_2 = 16;",
"cyls_times_heads = VAR_0 / *VAR_3;",
"} else {",
"*VAR_3 = 17;",... | [
0,
0,
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
],
[
35,
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
... |
16,742 | static uint32_t do_csst(CPUS390XState *env, uint32_t r3, uint64_t a1,
uint64_t a2, bool parallel)
{
#if !defined(CONFIG_USER_ONLY) || defined(CONFIG_ATOMIC128)
uint32_t mem_idx = cpu_mmu_index(env, false);
#endif
uintptr_t ra = GETPC();
uint32_t fc = extract32(env->regs[0], 0,... | false | qemu | 8d2f850a5ab7579a852f23b28273940a47dfd7ff | static uint32_t do_csst(CPUS390XState *env, uint32_t r3, uint64_t a1,
uint64_t a2, bool parallel)
{
#if !defined(CONFIG_USER_ONLY) || defined(CONFIG_ATOMIC128)
uint32_t mem_idx = cpu_mmu_index(env, false);
#endif
uintptr_t ra = GETPC();
uint32_t fc = extract32(env->regs[0], 0,... | {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(CPUS390XState *env, uint32_t r3, uint64_t a1,
uint64_t a2, bool parallel)
{
#if !defined(CONFIG_USER_ONLY) || defined(CONFIG_ATOMIC128)
uint32_t mem_idx = cpu_mmu_index(env, false);
#endif
uintptr_t ra = GETPC();
uint32_t fc = extract32(env->regs[0], 0, ... | [
"static uint32_t FUNC_0(CPUS390XState *env, uint32_t r3, uint64_t a1,\nuint64_t a2, bool parallel)\n{",
"#if !defined(CONFIG_USER_ONLY) || defined(CONFIG_ATOMIC128)\nuint32_t mem_idx = cpu_mmu_index(env, false);",
"#endif\nuintptr_t ra = GETPC();",
"uint32_t fc = extract32(env->regs[0], 0, 8);",
"uint32_t s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7,
9
],
[
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
49
],
[
51
],
[... |
16,743 | static void test_visitor_out_native_list_int32(TestOutputVisitorData *data,
const void *unused)
{
test_native_list(data, unused, USER_DEF_NATIVE_LIST_UNION_KIND_S32);
}
| false | qemu | b3db211f3c80bb996a704d665fe275619f728bd4 | static void test_visitor_out_native_list_int32(TestOutputVisitorData *data,
const void *unused)
{
test_native_list(data, unused, USER_DEF_NATIVE_LIST_UNION_KIND_S32);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(TestOutputVisitorData *VAR_0,
const void *VAR_1)
{
test_native_list(VAR_0, VAR_1, USER_DEF_NATIVE_LIST_UNION_KIND_S32);
}
| [
"static void FUNC_0(TestOutputVisitorData *VAR_0,\nconst void *VAR_1)\n{",
"test_native_list(VAR_0, VAR_1, USER_DEF_NATIVE_LIST_UNION_KIND_S32);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
]
] |
16,745 | static void blockdev_mirror_common(BlockDriverState *bs,
BlockDriverState *target,
bool has_replaces, const char *replaces,
enum MirrorSyncMode sync,
bool has_speed, int64_t sp... | false | qemu | 1f0c461b82d5ec2664ca0cfc9548f80da87a8f8a | static void blockdev_mirror_common(BlockDriverState *bs,
BlockDriverState *target,
bool has_replaces, const char *replaces,
enum MirrorSyncMode sync,
bool has_speed, int64_t sp... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0,
BlockDriverState *VAR_1,
bool VAR_2, const char *VAR_3,
enum MirrorSyncMode VAR_4,
bool VAR_5, int64_t VAR_6,
... | [
"static void FUNC_0(BlockDriverState *VAR_0,\nBlockDriverState *VAR_1,\nbool VAR_2, const char *VAR_3,\nenum MirrorSyncMode VAR_4,\nbool VAR_5, int64_t VAR_6,\nbool VAR_7, uint32_t VAR_8,\nbool VAR_9, int64_t VAR_10,\nbool VAR_11,\nBlockdevOnError VAR_12,\nbool VAR_13,\nBlockdevOnError VAR_14,\nbool VAR_15, bool VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13,
15,
17,
19,
21,
23,
25,
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
... |
16,746 | void helper_mtc0_index(CPUMIPSState *env, target_ulong arg1)
{
int num = 1;
unsigned int tmp = env->tlb->nb_tlb;
do {
tmp >>= 1;
num <<= 1;
} while (tmp);
env->CP0_Index = (env->CP0_Index & 0x80000000) | (arg1 & (num - 1));
}
| false | qemu | ba801af429aaa68f6cc03842c8b6be81a6ede65a | void helper_mtc0_index(CPUMIPSState *env, target_ulong arg1)
{
int num = 1;
unsigned int tmp = env->tlb->nb_tlb;
do {
tmp >>= 1;
num <<= 1;
} while (tmp);
env->CP0_Index = (env->CP0_Index & 0x80000000) | (arg1 & (num - 1));
}
| {
"code": [],
"line_no": []
} | void FUNC_0(CPUMIPSState *VAR_0, target_ulong VAR_1)
{
int VAR_2 = 1;
unsigned int VAR_3 = VAR_0->tlb->nb_tlb;
do {
VAR_3 >>= 1;
VAR_2 <<= 1;
} while (VAR_3);
VAR_0->CP0_Index = (VAR_0->CP0_Index & 0x80000000) | (VAR_1 & (VAR_2 - 1));
}
| [
"void FUNC_0(CPUMIPSState *VAR_0, target_ulong VAR_1)\n{",
"int VAR_2 = 1;",
"unsigned int VAR_3 = VAR_0->tlb->nb_tlb;",
"do {",
"VAR_3 >>= 1;",
"VAR_2 <<= 1;",
"} while (VAR_3);",
"VAR_0->CP0_Index = (VAR_0->CP0_Index & 0x80000000) | (VAR_1 & (VAR_2 - 1));",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
16,747 | static ram_addr_t kqemu_ram_alloc(ram_addr_t size)
{
ram_addr_t addr;
if ((last_ram_offset + size) > kqemu_phys_ram_size) {
fprintf(stderr, "Not enough memory (requested_size = %" PRIu64 ", max memory = %" PRIu64 ")\n",
(uint64_t)size, (uint64_t)kqemu_phys_ram_size);
abort(... | false | qemu | 4a1418e07bdcfaa3177739e04707ecaec75d89e1 | static ram_addr_t kqemu_ram_alloc(ram_addr_t size)
{
ram_addr_t addr;
if ((last_ram_offset + size) > kqemu_phys_ram_size) {
fprintf(stderr, "Not enough memory (requested_size = %" PRIu64 ", max memory = %" PRIu64 ")\n",
(uint64_t)size, (uint64_t)kqemu_phys_ram_size);
abort(... | {
"code": [],
"line_no": []
} | static ram_addr_t FUNC_0(ram_addr_t size)
{
ram_addr_t addr;
if ((last_ram_offset + size) > kqemu_phys_ram_size) {
fprintf(stderr, "Not enough memory (requested_size = %" PRIu64 ", max memory = %" PRIu64 ")\n",
(uint64_t)size, (uint64_t)kqemu_phys_ram_size);
abort();
}... | [
"static ram_addr_t FUNC_0(ram_addr_t size)\n{",
"ram_addr_t addr;",
"if ((last_ram_offset + size) > kqemu_phys_ram_size) {",
"fprintf(stderr, \"Not enough memory (requested_size = %\" PRIu64 \", max memory = %\" PRIu64 \")\\n\",\n(uint64_t)size, (uint64_t)kqemu_phys_ram_size);",
"abort();",
"}",
"addr =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
16,748 | void do_cpu_init(X86CPU *cpu)
{
CPUX86State *env = &cpu->env;
int sipi = env->interrupt_request & CPU_INTERRUPT_SIPI;
uint64_t pat = env->pat;
cpu_reset(CPU(cpu));
env->interrupt_request = sipi;
env->pat = pat;
apic_init_reset(env->apic_state);
env->halted = !cpu_is_bsp(env);
... | false | qemu | dd673288a8ff73ad77fcc1c255486d2466a772e1 | void do_cpu_init(X86CPU *cpu)
{
CPUX86State *env = &cpu->env;
int sipi = env->interrupt_request & CPU_INTERRUPT_SIPI;
uint64_t pat = env->pat;
cpu_reset(CPU(cpu));
env->interrupt_request = sipi;
env->pat = pat;
apic_init_reset(env->apic_state);
env->halted = !cpu_is_bsp(env);
... | {
"code": [],
"line_no": []
} | void FUNC_0(X86CPU *VAR_0)
{
CPUX86State *env = &VAR_0->env;
int VAR_1 = env->interrupt_request & CPU_INTERRUPT_SIPI;
uint64_t pat = env->pat;
cpu_reset(CPU(VAR_0));
env->interrupt_request = VAR_1;
env->pat = pat;
apic_init_reset(env->apic_state);
env->halted = !cpu_is_bsp(env... | [
"void FUNC_0(X86CPU *VAR_0)\n{",
"CPUX86State *env = &VAR_0->env;",
"int VAR_1 = env->interrupt_request & CPU_INTERRUPT_SIPI;",
"uint64_t pat = env->pat;",
"cpu_reset(CPU(VAR_0));",
"env->interrupt_request = VAR_1;",
"env->pat = pat;",
"apic_init_reset(env->apic_state);",
"env->halted = !cpu_is_bsp(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
16,749 | static inline int show_tags(WriterContext *wctx, AVDictionary *tags, int section_id)
{
AVDictionaryEntry *tag = NULL;
int ret = 0;
if (!tags)
return 0;
writer_print_section_header(wctx, section_id);
while ((tag = av_dict_get(tags, "", tag, AV_DICT_IGNORE_SUFFIX))) {
ret =... | false | FFmpeg | cbba331aa02f29870581ff0b7ded7477b279ae2c | static inline int show_tags(WriterContext *wctx, AVDictionary *tags, int section_id)
{
AVDictionaryEntry *tag = NULL;
int ret = 0;
if (!tags)
return 0;
writer_print_section_header(wctx, section_id);
while ((tag = av_dict_get(tags, "", tag, AV_DICT_IGNORE_SUFFIX))) {
ret =... | {
"code": [],
"line_no": []
} | static inline int FUNC_0(WriterContext *VAR_0, AVDictionary *VAR_1, int VAR_2)
{
AVDictionaryEntry *tag = NULL;
int VAR_3 = 0;
if (!VAR_1)
return 0;
writer_print_section_header(VAR_0, VAR_2);
while ((tag = av_dict_get(VAR_1, "", tag, AV_DICT_IGNORE_SUFFIX))) {
VAR_3 = wri... | [
"static inline int FUNC_0(WriterContext *VAR_0, AVDictionary *VAR_1, int VAR_2)\n{",
"AVDictionaryEntry *tag = NULL;",
"int VAR_3 = 0;",
"if (!VAR_1)\nreturn 0;",
"writer_print_section_header(VAR_0, VAR_2);",
"while ((tag = av_dict_get(VAR_1, \"\", tag, AV_DICT_IGNORE_SUFFIX))) {",
"VAR_3 = writer_print... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
33
],
[
35
]
] |
16,750 | static void gen_dozi(DisasContext *ctx)
{
target_long simm = SIMM(ctx->opcode);
int l1 = gen_new_label();
int l2 = gen_new_label();
tcg_gen_brcondi_tl(TCG_COND_LT, cpu_gpr[rA(ctx->opcode)], simm, l1);
tcg_gen_subfi_tl(cpu_gpr[rD(ctx->opcode)], simm, cpu_gpr[rA(ctx->opcode)]);
tcg_gen_br(l... | false | qemu | 42a268c241183877192c376d03bd9b6d527407c7 | static void gen_dozi(DisasContext *ctx)
{
target_long simm = SIMM(ctx->opcode);
int l1 = gen_new_label();
int l2 = gen_new_label();
tcg_gen_brcondi_tl(TCG_COND_LT, cpu_gpr[rA(ctx->opcode)], simm, l1);
tcg_gen_subfi_tl(cpu_gpr[rD(ctx->opcode)], simm, cpu_gpr[rA(ctx->opcode)]);
tcg_gen_br(l... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0)
{
target_long simm = SIMM(VAR_0->opcode);
int VAR_1 = gen_new_label();
int VAR_2 = gen_new_label();
tcg_gen_brcondi_tl(TCG_COND_LT, cpu_gpr[rA(VAR_0->opcode)], simm, VAR_1);
tcg_gen_subfi_tl(cpu_gpr[rD(VAR_0->opcode)], simm, cpu_gpr[rA(VAR_0->opcode)]);
... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"target_long simm = SIMM(VAR_0->opcode);",
"int VAR_1 = gen_new_label();",
"int VAR_2 = gen_new_label();",
"tcg_gen_brcondi_tl(TCG_COND_LT, cpu_gpr[rA(VAR_0->opcode)], simm, VAR_1);",
"tcg_gen_subfi_tl(cpu_gpr[rD(VAR_0->opcode)], simm, cpu_gpr[rA(VAR_0->opcode... | [
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
]
] |
16,751 | static inline void t_gen_swapb(TCGv d, TCGv s)
{
TCGv t, org_s;
t = tcg_temp_new(TCG_TYPE_TL);
org_s = tcg_temp_new(TCG_TYPE_TL);
/* d and s may refer to the same object. */
tcg_gen_mov_tl(org_s, s);
tcg_gen_shli_tl(t, org_s, 8);
tcg_gen_andi_tl(d, t, 0xff00ff00);
tcg_gen_shri_tl(t, org_s, 8);
t... | false | qemu | a7812ae412311d7d47f8aa85656faadac9d64b56 | static inline void t_gen_swapb(TCGv d, TCGv s)
{
TCGv t, org_s;
t = tcg_temp_new(TCG_TYPE_TL);
org_s = tcg_temp_new(TCG_TYPE_TL);
tcg_gen_mov_tl(org_s, s);
tcg_gen_shli_tl(t, org_s, 8);
tcg_gen_andi_tl(d, t, 0xff00ff00);
tcg_gen_shri_tl(t, org_s, 8);
tcg_gen_andi_tl(t, t, 0x00ff00ff);
tcg_gen_... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(TCGv VAR_0, TCGv VAR_1)
{
TCGv t, org_s;
t = tcg_temp_new(TCG_TYPE_TL);
org_s = tcg_temp_new(TCG_TYPE_TL);
tcg_gen_mov_tl(org_s, VAR_1);
tcg_gen_shli_tl(t, org_s, 8);
tcg_gen_andi_tl(VAR_0, t, 0xff00ff00);
tcg_gen_shri_tl(t, org_s, 8);
tcg_gen_andi_tl(t, t, 0x00ff00ff);... | [
"static inline void FUNC_0(TCGv VAR_0, TCGv VAR_1)\n{",
"TCGv t, org_s;",
"t = tcg_temp_new(TCG_TYPE_TL);",
"org_s = tcg_temp_new(TCG_TYPE_TL);",
"tcg_gen_mov_tl(org_s, VAR_1);",
"tcg_gen_shli_tl(t, org_s, 8);",
"tcg_gen_andi_tl(VAR_0, t, 0xff00ff00);",
"tcg_gen_shri_tl(t, org_s, 8);",
"tcg_gen_andi... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
]
] |
16,754 | static inline int get_symbol(RangeCoder *c, uint8_t *state, int is_signed){
if(get_rac(c, state+0))
return 0;
else{
int i, e, a;
e= 0;
while(get_rac(c, state+1 + e)){ //1..10
e++;
}
assert(e<=9);
a= 1;
for(i=e-1; i>=0; i--)... | true | FFmpeg | 223d996aaf9f1668c28519d3d7eb756e6cdf3fcf | static inline int get_symbol(RangeCoder *c, uint8_t *state, int is_signed){
if(get_rac(c, state+0))
return 0;
else{
int i, e, a;
e= 0;
while(get_rac(c, state+1 + e)){
e++;
}
assert(e<=9);
a= 1;
for(i=e-1; i>=0; i--){
... | {
"code": [
" assert(e<=9);"
],
"line_no": [
19
]
} | static inline int FUNC_0(RangeCoder *VAR_0, uint8_t *VAR_1, int VAR_2){
if(get_rac(VAR_0, VAR_1+0))
return 0;
else{
int VAR_3, VAR_4, VAR_5;
VAR_4= 0;
while(get_rac(VAR_0, VAR_1+1 + VAR_4)){
VAR_4++;
}
assert(VAR_4<=9);
VAR_5= 1;
... | [
"static inline int FUNC_0(RangeCoder *VAR_0, uint8_t *VAR_1, int VAR_2){",
"if(get_rac(VAR_0, VAR_1+0))\nreturn 0;",
"else{",
"int VAR_3, VAR_4, VAR_5;",
"VAR_4= 0;",
"while(get_rac(VAR_0, VAR_1+1 + VAR_4)){",
"VAR_4++;",
"}",
"assert(VAR_4<=9);",
"VAR_5= 1;",
"for(VAR_3=VAR_4-1; VAR_3>=0; VAR_3... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33,
35
],
[
37,
39
],
[
41
],
[
43
]
] |
16,756 | static int asink_query_formats(AVFilterContext *ctx)
{
BufferSinkContext *buf = ctx->priv;
AVFilterFormats *formats = NULL;
AVFilterChannelLayouts *layouts = NULL;
unsigned i;
int ret;
CHECK_LIST_SIZE(sample_fmts)
CHECK_LIST_SIZE(sample_rates)
CHECK_LIST_SIZE(channel_layouts)
... | true | FFmpeg | fd7a7e11b94b12259c6f1e375da15298cbc37e83 | static int asink_query_formats(AVFilterContext *ctx)
{
BufferSinkContext *buf = ctx->priv;
AVFilterFormats *formats = NULL;
AVFilterChannelLayouts *layouts = NULL;
unsigned i;
int ret;
CHECK_LIST_SIZE(sample_fmts)
CHECK_LIST_SIZE(sample_rates)
CHECK_LIST_SIZE(channel_layouts)
... | {
"code": [
" if ((ret = ff_add_format(&formats, buf->sample_fmts[i])) < 0)",
" if ((ret = ff_add_channel_layout(&layouts, buf->channel_layouts[i])) < 0)",
" if ((ret = ff_add_channel_layout(&layouts, FF_COUNT2LAYOUT(buf->channel_counts[i]))) < 0)",
" if ((r... | static int FUNC_0(AVFilterContext *VAR_0)
{
BufferSinkContext *buf = VAR_0->priv;
AVFilterFormats *formats = NULL;
AVFilterChannelLayouts *layouts = NULL;
unsigned VAR_1;
int VAR_2;
CHECK_LIST_SIZE(sample_fmts)
CHECK_LIST_SIZE(sample_rates)
CHECK_LIST_SIZE(channel_layouts)
... | [
"static int FUNC_0(AVFilterContext *VAR_0)\n{",
"BufferSinkContext *buf = VAR_0->priv;",
"AVFilterFormats *formats = NULL;",
"AVFilterChannelLayouts *layouts = NULL;",
"unsigned VAR_1;",
"int VAR_2;",
"CHECK_LIST_SIZE(sample_fmts)\nCHECK_LIST_SIZE(sample_rates)\nCHECK_LIST_SIZE(channel_layouts)\nCHECK_L... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19,
21,
23,
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
41,
43
],
[
45
],
[
47,
49
],
[
51
],
[
53,
55
... |
16,757 | static int mxf_read_source_package(void *arg, AVIOContext *pb, int tag, int size, UID uid)
{
MXFPackage *package = arg;
switch(tag) {
case 0x4403:
package->tracks_count = avio_rb32(pb);
if (package->tracks_count >= UINT_MAX / sizeof(UID))
return -1;
package->track... | true | FFmpeg | fd34dbea58e097609ff09cf7dcc59f74930195d3 | static int mxf_read_source_package(void *arg, AVIOContext *pb, int tag, int size, UID uid)
{
MXFPackage *package = arg;
switch(tag) {
case 0x4403:
package->tracks_count = avio_rb32(pb);
if (package->tracks_count >= UINT_MAX / sizeof(UID))
return -1;
package->track... | {
"code": [
"static int mxf_read_source_package(void *arg, AVIOContext *pb, int tag, int size, UID uid)"
],
"line_no": [
1
]
} | static int FUNC_0(void *VAR_0, AVIOContext *VAR_1, int VAR_2, int VAR_3, UID VAR_4)
{
MXFPackage *package = VAR_0;
switch(VAR_2) {
case 0x4403:
package->tracks_count = avio_rb32(VAR_1);
if (package->tracks_count >= UINT_MAX / sizeof(UID))
return -1;
package->track... | [
"static int FUNC_0(void *VAR_0, AVIOContext *VAR_1, int VAR_2, int VAR_3, UID VAR_4)\n{",
"MXFPackage *package = VAR_0;",
"switch(VAR_2) {",
"case 0x4403:\npackage->tracks_count = avio_rb32(VAR_1);",
"if (package->tracks_count >= UINT_MAX / sizeof(UID))\nreturn -1;",
"package->tracks_refs = av_malloc(pack... | [
1,
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
],
[... |
16,760 | int ff_lzf_uncompress(GetByteContext *gb, uint8_t **buf, int64_t *size)
{
int ret = 0;
uint8_t *p = *buf;
int64_t len = 0;
while (bytestream2_get_bytes_left(gb) > 2) {
uint8_t s = bytestream2_get_byte(gb);
if (s < LZF_LITERAL_MAX) {
s++;
if (s > ... | true | FFmpeg | bb6a7b6f75ac544c956e3eefee297700ef4d3468 | int ff_lzf_uncompress(GetByteContext *gb, uint8_t **buf, int64_t *size)
{
int ret = 0;
uint8_t *p = *buf;
int64_t len = 0;
while (bytestream2_get_bytes_left(gb) > 2) {
uint8_t s = bytestream2_get_byte(gb);
if (s < LZF_LITERAL_MAX) {
s++;
if (s > ... | {
"code": [],
"line_no": []
} | int FUNC_0(GetByteContext *VAR_0, uint8_t **VAR_1, int64_t *VAR_2)
{
int VAR_3 = 0;
uint8_t *p = *VAR_1;
int64_t len = 0;
while (bytestream2_get_bytes_left(VAR_0) > 2) {
uint8_t s = bytestream2_get_byte(VAR_0);
if (s < LZF_LITERAL_MAX) {
s++;
if ... | [
"int FUNC_0(GetByteContext *VAR_0, uint8_t **VAR_1, int64_t *VAR_2)\n{",
"int VAR_3 = 0;",
"uint8_t *p = *VAR_1;",
"int64_t len = 0;",
"while (bytestream2_get_bytes_left(VAR_0) > 2) {",
"uint8_t s = bytestream2_get_byte(VAR_0);",
"if (s < LZF_LITERAL_MAX) {",
"s++;",
"if (s > *VAR_2 - len) {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
34
],
[
38
],
[
40
],
[
42
],
[
44
],
[
46
],
[
48
],
[... |
16,761 | static int inject_fake_duration_metadata(RTMPContext *rt)
{
// We need to insert the metdata packet directly after the FLV
// header, i.e. we need to move all other already read data by the
// size of our fake metadata packet.
uint8_t* p;
// Keep old flv_data pointer
uint8_t* old_flv_da... | true | FFmpeg | e55376a1fd5abebbb0a082aa20739d58c2260a37 | static int inject_fake_duration_metadata(RTMPContext *rt)
{
uint8_t* p;
uint8_t* old_flv_data = rt->flv_data;
if (!(rt->flv_data = av_malloc(rt->flv_size + 55))) {
rt->flv_data = old_flv_data;
return AVERROR(ENOMEM);
}
memcpy(rt->flv_da... | {
"code": [],
"line_no": []
} | static int FUNC_0(RTMPContext *VAR_0)
{
uint8_t* p;
uint8_t* old_flv_data = VAR_0->flv_data;
if (!(VAR_0->flv_data = av_malloc(VAR_0->flv_size + 55))) {
VAR_0->flv_data = old_flv_data;
return AVERROR(ENOMEM);
}
memcpy(VAR_0->flv_data, o... | [
"static int FUNC_0(RTMPContext *VAR_0)\n{",
"uint8_t* p;",
"uint8_t* old_flv_data = VAR_0->flv_data;",
"if (!(VAR_0->flv_data = av_malloc(VAR_0->flv_size + 55))) {",
"VAR_0->flv_data = old_flv_data;",
"return AVERROR(ENOMEM);",
"}",
"memcpy(VAR_0->flv_data, old_flv_data, 13);",
"memcpy(VAR_0->flv_da... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
33
],
[
37
],
[
41
],
[
45
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
],
[
63
],
[
67
],
[
69
],
[
... |
16,762 | static int dmg_open(BlockDriverState *bs, int flags)
{
BDRVDMGState *s = bs->opaque;
off_t info_begin,info_end,last_in_offset,last_out_offset;
uint32_t count;
uint32_t max_compressed_size=1,max_sectors_per_chunk=1,i;
int64_t offset;
bs->read_only = 1;
s->n_chunks = 0;
s->offse... | true | qemu | 69d34a360dfe773e17e72c76d15931c9b9d190f6 | static int dmg_open(BlockDriverState *bs, int flags)
{
BDRVDMGState *s = bs->opaque;
off_t info_begin,info_end,last_in_offset,last_out_offset;
uint32_t count;
uint32_t max_compressed_size=1,max_sectors_per_chunk=1,i;
int64_t offset;
bs->read_only = 1;
s->n_chunks = 0;
s->offse... | {
"code": [
" off_t info_begin,info_end,last_in_offset,last_out_offset;",
" uint32_t count;",
" info_begin = read_off(bs, offset);",
" if (info_begin == 0) {",
"\tgoto fail;",
" if (read_uint32(bs, info_begin) != 0x100) {",
" count = read_uint32(bs, info_begin + 4);",
... | static int FUNC_0(BlockDriverState *VAR_0, int VAR_1)
{
BDRVDMGState *s = VAR_0->opaque;
off_t info_begin,info_end,last_in_offset,last_out_offset;
uint32_t count;
uint32_t max_compressed_size=1,max_sectors_per_chunk=1,i;
int64_t offset;
VAR_0->read_only = 1;
s->n_chunks = 0;
s... | [
"static int FUNC_0(BlockDriverState *VAR_0, int VAR_1)\n{",
"BDRVDMGState *s = VAR_0->opaque;",
"off_t info_begin,info_end,last_in_offset,last_out_offset;",
"uint32_t count;",
"uint32_t max_compressed_size=1,max_sectors_per_chunk=1,i;",
"int64_t offset;",
"VAR_0->read_only = 1;",
"s->n_chunks = 0;",
... | [
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
1,
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,
1,
1,
0,
1... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
... |
16,763 | static void idct32(int *out, int *tab)
{
int i, j;
int *t, *t1, xr;
const int *xp = costab32;
for(j=31;j>=3;j-=2) tab[j] += tab[j - 2];
t = tab + 30;
t1 = tab + 2;
do {
t[0] += t[-4];
t[1] += t[1 - 4];
t -= 4;
} while (t != t1);
t = tab + 28... | false | FFmpeg | 11f0acf829e26279c5f2a414c6860bd4933f29af | static void idct32(int *out, int *tab)
{
int i, j;
int *t, *t1, xr;
const int *xp = costab32;
for(j=31;j>=3;j-=2) tab[j] += tab[j - 2];
t = tab + 30;
t1 = tab + 2;
do {
t[0] += t[-4];
t[1] += t[1 - 4];
t -= 4;
} while (t != t1);
t = tab + 28... | {
"code": [],
"line_no": []
} | static void FUNC_0(int *VAR_0, int *VAR_1)
{
int VAR_2, VAR_3;
int *VAR_4, *VAR_5, VAR_6;
const int *VAR_7 = costab32;
for(VAR_3=31;VAR_3>=3;VAR_3-=2) VAR_1[VAR_3] += VAR_1[VAR_3 - 2];
VAR_4 = VAR_1 + 30;
VAR_5 = VAR_1 + 2;
do {
VAR_4[0] += VAR_4[-4];
VAR_4[1] +... | [
"static void FUNC_0(int *VAR_0, int *VAR_1)\n{",
"int VAR_2, VAR_3;",
"int *VAR_4, *VAR_5, VAR_6;",
"const int *VAR_7 = costab32;",
"for(VAR_3=31;VAR_3>=3;VAR_3-=2) VAR_1[VAR_3] += VAR_1[VAR_3 - 2];",
"VAR_4 = VAR_1 + 30;",
"VAR_5 = VAR_1 + 2;",
"do {",
"VAR_4[0] += VAR_4[-4];",
"VAR_4[1] += VAR_4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
16,764 | static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size,
const uint8_t *buf, int buf_size)
{
AC3DecodeContext *s = avctx->priv_data;
int16_t *out_samples = (int16_t *)data;
int i, blk, ch, err;
/* initialize the GetBitContext with the start of v... | false | FFmpeg | c78c6d6c588c1db60cf2a1bd5bc65095852f91fc | static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size,
const uint8_t *buf, int buf_size)
{
AC3DecodeContext *s = avctx->priv_data;
int16_t *out_samples = (int16_t *)data;
int i, blk, ch, err;
if (s->input_buffer) {
m... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext * VAR_0, void *VAR_1, int *VAR_2,
const uint8_t *VAR_3, int VAR_4)
{
AC3DecodeContext *s = VAR_0->priv_data;
int16_t *out_samples = (int16_t *)VAR_1;
int VAR_5, VAR_6, VAR_7, VAR_8;
if (s->input_buffer) {
mem... | [
"static int FUNC_0(AVCodecContext * VAR_0, void *VAR_1, int *VAR_2,\nconst uint8_t *VAR_3, int VAR_4)\n{",
"AC3DecodeContext *s = VAR_0->priv_data;",
"int16_t *out_samples = (int16_t *)VAR_1;",
"int VAR_5, VAR_6, VAR_7, VAR_8;",
"if (s->input_buffer) {",
"memcpy(s->input_buffer, VAR_3, FFMIN(VAR_4, AC3_MA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49,
51
],
[
53
],
[
55,
57
... |
16,766 | static void multi_serial_pci_realize(PCIDevice *dev, Error **errp)
{
PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(dev);
PCIMultiSerialState *pci = DO_UPCAST(PCIMultiSerialState, dev, dev);
SerialState *s;
Error *err = NULL;
int i;
switch (pc->device_id) {
case 0x0003:
pci->po... | true | qemu | a48da7b5bc1f0c98e7a124337140efd47049066c | static void multi_serial_pci_realize(PCIDevice *dev, Error **errp)
{
PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(dev);
PCIMultiSerialState *pci = DO_UPCAST(PCIMultiSerialState, dev, dev);
SerialState *s;
Error *err = NULL;
int i;
switch (pc->device_id) {
case 0x0003:
pci->po... | {
"code": [
" int i;",
" pci->ports = 2;",
" pci->ports = 4;",
" assert(pci->ports > 0);",
" assert(pci->ports <= PCI_SERIAL_MAX_PORTS);",
" memory_region_init(&pci->iobar, OBJECT(pci), \"multiserial\", 8 * pci->ports);",
" pci->p... | static void FUNC_0(PCIDevice *VAR_0, Error **VAR_1)
{
PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(VAR_0);
PCIMultiSerialState *pci = DO_UPCAST(PCIMultiSerialState, VAR_0, VAR_0);
SerialState *s;
Error *err = NULL;
int VAR_2;
switch (pc->device_id) {
case 0x0003:
pci->ports =... | [
"static void FUNC_0(PCIDevice *VAR_0, Error **VAR_1)\n{",
"PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(VAR_0);",
"PCIMultiSerialState *pci = DO_UPCAST(PCIMultiSerialState, VAR_0, VAR_0);",
"SerialState *s;",
"Error *err = NULL;",
"int VAR_2;",
"switch (pc->device_id) {",
"case 0x0003:\npci->ports = 2;",... | [
0,
0,
0,
0,
0,
1,
0,
1,
0,
1,
0,
0,
1,
1,
0,
0,
1,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19,
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,... |
16,768 | int ff_h264_decode_picture_parameter_set(H264Context *h, int bit_length){
MpegEncContext * const s = &h->s;
unsigned int pps_id= get_ue_golomb(&s->gb);
PPS *pps;
const int qp_bd_offset = 6*(h->sps.bit_depth_luma-8);
int bits_left;
if(pps_id >= MAX_PPS_COUNT) {
av_log(h->s.avctx,... | true | FFmpeg | 732f9fcfe54fc9a0a7bbce53fe86b38744c2d301 | int ff_h264_decode_picture_parameter_set(H264Context *h, int bit_length){
MpegEncContext * const s = &h->s;
unsigned int pps_id= get_ue_golomb(&s->gb);
PPS *pps;
const int qp_bd_offset = 6*(h->sps.bit_depth_luma-8);
int bits_left;
if(pps_id >= MAX_PPS_COUNT) {
av_log(h->s.avctx,... | {
"code": [],
"line_no": []
} | int FUNC_0(H264Context *VAR_0, int VAR_1){
MpegEncContext * const s = &VAR_0->s;
unsigned int VAR_2= get_ue_golomb(&s->gb);
PPS *pps;
const int VAR_3 = 6*(VAR_0->sps.bit_depth_luma-8);
int VAR_4;
if(VAR_2 >= MAX_PPS_COUNT) {
av_log(VAR_0->s.avctx, AV_LOG_ERROR, "VAR_2 (%d) out o... | [
"int FUNC_0(H264Context *VAR_0, int VAR_1){",
"MpegEncContext * const s = &VAR_0->s;",
"unsigned int VAR_2= get_ue_golomb(&s->gb);",
"PPS *pps;",
"const int VAR_3 = 6*(VAR_0->sps.bit_depth_luma-8);",
"int VAR_4;",
"if(VAR_2 >= MAX_PPS_COUNT) {",
"av_log(VAR_0->s.avctx, AV_LOG_ERROR, \"VAR_2 (%d) out o... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
24
],
[
28
],
[
30,
32
],
[
34
],
[
36
],
[
38
],
[
40
],
[
42
],
[
46
],
[
48
],
[
50
... |
16,769 | int spapr_rtas_device_tree_setup(void *fdt, hwaddr rtas_addr,
hwaddr rtas_size)
{
int ret;
int i;
ret = fdt_add_mem_rsv(fdt, rtas_addr, rtas_size);
if (ret < 0) {
fprintf(stderr, "Couldn't add RTAS reserve entry: %s\n",
fdt_strerror(ret)... | true | qemu | 3a3b8502e6f0c8d30865c5f36d2c3ae4114000b5 | int spapr_rtas_device_tree_setup(void *fdt, hwaddr rtas_addr,
hwaddr rtas_size)
{
int ret;
int i;
ret = fdt_add_mem_rsv(fdt, rtas_addr, rtas_size);
if (ret < 0) {
fprintf(stderr, "Couldn't add RTAS reserve entry: %s\n",
fdt_strerror(ret)... | {
"code": [
" int i;",
" for (i = 0; i < TOKEN_MAX; i++) {",
" i + TOKEN_BASE);"
],
"line_no": [
9,
75,
91
]
} | int FUNC_0(void *VAR_0, hwaddr VAR_1,
hwaddr VAR_2)
{
int VAR_3;
int VAR_4;
VAR_3 = fdt_add_mem_rsv(VAR_0, VAR_1, VAR_2);
if (VAR_3 < 0) {
fprintf(stderr, "Couldn't add RTAS reserve entry: %s\n",
fdt_strerror(VAR_3));
return VAR... | [
"int FUNC_0(void *VAR_0, hwaddr VAR_1,\nhwaddr VAR_2)\n{",
"int VAR_3;",
"int VAR_4;",
"VAR_3 = fdt_add_mem_rsv(VAR_0, VAR_1, VAR_2);",
"if (VAR_3 < 0) {",
"fprintf(stderr, \"Couldn't add RTAS reserve entry: %s\\n\",\nfdt_strerror(VAR_3));",
"return VAR_3;",
"}",
"VAR_3 = qemu_fdt_setprop_cell(VAR_0... | [
0,
0,
1,
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,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
27,
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
43,
45
],
[
47
],
[
49,
51
],
[
53
... |
16,770 | static int get_phys_addr_mpu(CPUARMState *env, uint32_t address,
int access_type, int is_user,
hwaddr *phys_ptr, int *prot)
{
int n;
uint32_t mask;
uint32_t base;
*phys_ptr = address;
for (n = 7; n >= 0; n--) {
base = env->cp15.c6... | true | qemu | 7e09797c299712cafa7bc05dd57c1b13afcc6039 | static int get_phys_addr_mpu(CPUARMState *env, uint32_t address,
int access_type, int is_user,
hwaddr *phys_ptr, int *prot)
{
int n;
uint32_t mask;
uint32_t base;
*phys_ptr = address;
for (n = 7; n >= 0; n--) {
base = env->cp15.c6... | {
"code": [
"\tmask = env->cp15.c5_insn;",
"\tmask = env->cp15.c5_data;"
],
"line_no": [
49,
53
]
} | static int FUNC_0(CPUARMState *VAR_0, uint32_t VAR_1,
int VAR_2, int VAR_3,
hwaddr *VAR_4, int *VAR_5)
{
int VAR_6;
uint32_t mask;
uint32_t base;
*VAR_4 = VAR_1;
for (VAR_6 = 7; VAR_6 >= 0; VAR_6--) {
base = VAR_0->cp15.c6_region[... | [
"static int FUNC_0(CPUARMState *VAR_0, uint32_t VAR_1,\nint VAR_2, int VAR_3,\nhwaddr *VAR_4, int *VAR_5)\n{",
"int VAR_6;",
"uint32_t mask;",
"uint32_t base;",
"*VAR_4 = VAR_1;",
"for (VAR_6 = 7; VAR_6 >= 0; VAR_6--) {",
"base = VAR_0->cp15.c6_region[VAR_6];",
"if ((base & 1) == 0)\ncontinue;",
"ma... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[... |
16,772 | static int huff_build(VLC *vlc, uint8_t *len)
{
HuffEntry he[256];
uint32_t codes[256];
uint8_t bits[256];
uint8_t syms[256];
uint32_t code;
int i;
for (i = 0; i < 256; i++) {
he[i].sym = 255 - i;
he[i].len = len[i];
if (len[i] == 0)
return A... | true | FFmpeg | 341f01290c2353669ed2263f56e1a9f4c67cc597 | static int huff_build(VLC *vlc, uint8_t *len)
{
HuffEntry he[256];
uint32_t codes[256];
uint8_t bits[256];
uint8_t syms[256];
uint32_t code;
int i;
for (i = 0; i < 256; i++) {
he[i].sym = 255 - i;
he[i].len = len[i];
if (len[i] == 0)
return A... | {
"code": [
" if (len[i] == 0)",
" if (len[i] == 0)",
" if (len[i] == 0)"
],
"line_no": [
25,
25,
25
]
} | static int FUNC_0(VLC *VAR_0, uint8_t *VAR_1)
{
HuffEntry he[256];
uint32_t codes[256];
uint8_t bits[256];
uint8_t syms[256];
uint32_t code;
int VAR_2;
for (VAR_2 = 0; VAR_2 < 256; VAR_2++) {
he[VAR_2].sym = 255 - VAR_2;
he[VAR_2].VAR_1 = VAR_1[VAR_2];
if... | [
"static int FUNC_0(VLC *VAR_0, uint8_t *VAR_1)\n{",
"HuffEntry he[256];",
"uint32_t codes[256];",
"uint8_t bits[256];",
"uint8_t syms[256];",
"uint32_t code;",
"int VAR_2;",
"for (VAR_2 = 0; VAR_2 < 256; VAR_2++) {",
"he[VAR_2].sym = 255 - VAR_2;",
"he[VAR_2].VAR_1 = VAR_1[VAR_2];",
"if (VAR_1[V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
16,773 | static int get_cox(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c)
{
uint8_t byte;
if (s->buf_end - s->buf < 5)
return AVERROR(EINVAL);
/* nreslevels = number of resolution levels
= number of decomposition level +1 */
c->nreslevels = bytestream_get_byte(&s->buf) +... | true | FFmpeg | 1a3598aae768465a8efc8475b6df5a8261bc62fc | static int get_cox(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c)
{
uint8_t byte;
if (s->buf_end - s->buf < 5)
return AVERROR(EINVAL);
c->nreslevels = bytestream_get_byte(&s->buf) + 1;
if (c->nreslevels > JPEG2000_MAX_RESLEVELS)
return AVERROR_INVALIDDATA;
... | {
"code": [
" return AVERROR_INVALIDDATA;",
" if (s->buf_end - s->buf < 5)",
" return AVERROR(EINVAL);",
" c->nreslevels = bytestream_get_byte(&s->buf) + 1;",
" c->cblk_style = bytestream_get_byte(&s->buf);",
" byte = bytestream_get_byte(&s->buf);",
" i... | static int FUNC_0(Jpeg2000DecoderContext *VAR_0, Jpeg2000CodingStyle *VAR_1)
{
uint8_t byte;
if (VAR_0->buf_end - VAR_0->buf < 5)
return AVERROR(EINVAL);
VAR_1->nreslevels = bytestream_get_byte(&VAR_0->buf) + 1;
if (VAR_1->nreslevels > JPEG2000_MAX_RESLEVELS)
return AV... | [
"static int FUNC_0(Jpeg2000DecoderContext *VAR_0, Jpeg2000CodingStyle *VAR_1)\n{",
"uint8_t byte;",
"if (VAR_0->buf_end - VAR_0->buf < 5)\nreturn AVERROR(EINVAL);",
"VAR_1->nreslevels = bytestream_get_byte(&VAR_0->buf) + 1;",
"if (VAR_1->nreslevels > JPEG2000_MAX_RESLEVELS)\nreturn AVERROR_INVALIDDATA;",
... | [
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
17
],
[
21,
23
],
[
29,
31
],
[
33,
35
],
[
39
],
[
41
],
[
45,
47
],
[
49
],
[
51
],
[
53
],
[
57
],
[
59
],
[
61
],
[
63
],
... |
16,774 | void qemu_clock_warp(QEMUClockType type)
{
int64_t deadline;
/*
* There are too many global variables to make the "warp" behavior
* applicable to other clocks. But a clock argument removes the
* need for if statements all over the place.
*/
if (type != QEMU_CLOCK_VIRTUAL || !u... | true | qemu | ce78d18ced118b03e821135e702ba1d513c8b2a7 | void qemu_clock_warp(QEMUClockType type)
{
int64_t deadline;
if (type != QEMU_CLOCK_VIRTUAL || !use_icount) {
return;
}
icount_warp_rt(NULL);
if (!all_cpu_threads_idle() || !qemu_clock_has_timers(QEMU_CLOCK_VIRTUAL)) {
timer_del(icount_warp... | {
"code": [
" if (!all_cpu_threads_idle() || !qemu_clock_has_timers(QEMU_CLOCK_VIRTUAL)) {",
" timer_del(icount_warp_timer);",
" vm_clock_warp_start = qemu_clock_get_ns(QEMU_CLOCK_REALTIME);",
" if ((deadline < 0) || (deadline > INT32_MAX)) {",
" deadline = INT32_MAX;",
... | void FUNC_0(QEMUClockType VAR_0)
{
int64_t deadline;
if (VAR_0 != QEMU_CLOCK_VIRTUAL || !use_icount) {
return;
}
icount_warp_rt(NULL);
if (!all_cpu_threads_idle() || !qemu_clock_has_timers(QEMU_CLOCK_VIRTUAL)) {
timer_del(icount_warp_timer)... | [
"void FUNC_0(QEMUClockType VAR_0)\n{",
"int64_t deadline;",
"if (VAR_0 != QEMU_CLOCK_VIRTUAL || !use_icount) {",
"return;",
"}",
"icount_warp_rt(NULL);",
"if (!all_cpu_threads_idle() || !qemu_clock_has_timers(QEMU_CLOCK_VIRTUAL)) {",
"timer_del(icount_warp_timer);",
"return;",
"}",
"if (qtest_en... | [
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
1,
0,
1,
1,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
19
],
[
21
],
[
23
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
57
],
[
59
],
[
63
],
[
67
],
[
81
],
[
83
],
[
85
],
[
89
],
[
1... |
16,775 | void qpci_plug_device_test(const char *driver, const char *id,
uint8_t slot, const char *opts)
{
QDict *response;
char *cmd;
cmd = g_strdup_printf("{'execute': 'device_add',"
" 'arguments': {"
" 'driver': '%s',"
... | false | qemu | acd80015fbe28f4f513e036ad1db2a76738d1f53 | void qpci_plug_device_test(const char *driver, const char *id,
uint8_t slot, const char *opts)
{
QDict *response;
char *cmd;
cmd = g_strdup_printf("{'execute': 'device_add',"
" 'arguments': {"
" 'driver': '%s',"
... | {
"code": [],
"line_no": []
} | void FUNC_0(const char *VAR_0, const char *VAR_1,
uint8_t VAR_2, const char *VAR_3)
{
QDict *response;
char *VAR_4;
VAR_4 = g_strdup_printf("{'execute': 'device_add',"
" 'arguments': {"
" 'VAR_0': '%s',"
... | [
"void FUNC_0(const char *VAR_0, const char *VAR_1,\nuint8_t VAR_2, const char *VAR_3)\n{",
"QDict *response;",
"char *VAR_4;",
"VAR_4 = g_strdup_printf(\"{'execute': 'device_add',\"",
"\" 'arguments': {\"",
"\" 'VAR_0': '%s',\"\n\" 'addr': '%d',\"\n\" %s%s\"\n\" 'VAR_1': '%s'\"\n\"}}\", VAR_0, VAR... | [
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
]
] |
16,778 | void tlb_fill(CPUState *cs, target_ulong addr, int is_write, int mmu_idx,
uintptr_t retaddr)
{
bool ret;
uint32_t fsr = 0;
ARMMMUFaultInfo fi = {};
ret = arm_tlb_fill(cs, addr, is_write, mmu_idx, &fsr, &fi);
if (unlikely(ret)) {
ARMCPU *cpu = ARM_CPU(cs);
CPU... | false | qemu | 094d028a7968236cd2b7f7b96394f7a3b8ad97c8 | void tlb_fill(CPUState *cs, target_ulong addr, int is_write, int mmu_idx,
uintptr_t retaddr)
{
bool ret;
uint32_t fsr = 0;
ARMMMUFaultInfo fi = {};
ret = arm_tlb_fill(cs, addr, is_write, mmu_idx, &fsr, &fi);
if (unlikely(ret)) {
ARMCPU *cpu = ARM_CPU(cs);
CPU... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUState *VAR_0, target_ulong VAR_1, int VAR_2, int VAR_3,
uintptr_t VAR_4)
{
bool ret;
uint32_t fsr = 0;
ARMMMUFaultInfo fi = {};
ret = arm_tlb_fill(VAR_0, VAR_1, VAR_2, VAR_3, &fsr, &fi);
if (unlikely(ret)) {
ARMCPU *cpu = ARM_CPU(VAR_0);
CPUARM... | [
"void FUNC_0(CPUState *VAR_0, target_ulong VAR_1, int VAR_2, int VAR_3,\nuintptr_t VAR_4)\n{",
"bool ret;",
"uint32_t fsr = 0;",
"ARMMMUFaultInfo fi = {};",
"ret = arm_tlb_fill(VAR_0, VAR_1, VAR_2, VAR_3, &fsr, &fi);",
"if (unlikely(ret)) {",
"ARMCPU *cpu = ARM_CPU(VAR_0);",
"CPUARMState *env = &cpu->... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
16,779 | static int local_fstat(FsContext *fs_ctx, int fd, struct stat *stbuf)
{
int err;
err = fstat(fd, stbuf);
if (err) {
return err;
}
if (fs_ctx->fs_sm == SM_MAPPED) {
/* Actual credentials are part of extended attrs */
uid_t tmp_uid;
gid_t tmp_gid;
mod... | false | qemu | b97400caef60ccfb0bc81c59f8bd824c43a0d6c8 | static int local_fstat(FsContext *fs_ctx, int fd, struct stat *stbuf)
{
int err;
err = fstat(fd, stbuf);
if (err) {
return err;
}
if (fs_ctx->fs_sm == SM_MAPPED) {
uid_t tmp_uid;
gid_t tmp_gid;
mode_t tmp_mode;
dev_t tmp_dev;
if... | {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0, int VAR_1, struct stat *VAR_2)
{
int VAR_3;
VAR_3 = fstat(VAR_1, VAR_2);
if (VAR_3) {
return VAR_3;
}
if (VAR_0->fs_sm == SM_MAPPED) {
uid_t tmp_uid;
gid_t tmp_gid;
mode_t tmp_mode;
dev_t tmp_dev;
... | [
"static int FUNC_0(FsContext *VAR_0, int VAR_1, struct stat *VAR_2)\n{",
"int VAR_3;",
"VAR_3 = fstat(VAR_1, VAR_2);",
"if (VAR_3) {",
"return VAR_3;",
"}",
"if (VAR_0->fs_sm == SM_MAPPED) {",
"uid_t tmp_uid;",
"gid_t tmp_gid;",
"mode_t tmp_mode;",
"dev_t tmp_dev;",
"if (fgetxattr(VAR_1, \"use... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
16,781 | static void test_visitor_in_native_list_int8(TestInputVisitorData *data,
const void *unused)
{
test_native_list_integer_helper(data, unused,
USER_DEF_NATIVE_LIST_UNION_KIND_S8);
}
| false | qemu | b3db211f3c80bb996a704d665fe275619f728bd4 | static void test_visitor_in_native_list_int8(TestInputVisitorData *data,
const void *unused)
{
test_native_list_integer_helper(data, unused,
USER_DEF_NATIVE_LIST_UNION_KIND_S8);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(TestInputVisitorData *VAR_0,
const void *VAR_1)
{
test_native_list_integer_helper(VAR_0, VAR_1,
USER_DEF_NATIVE_LIST_UNION_KIND_S8);
}
| [
"static void FUNC_0(TestInputVisitorData *VAR_0,\nconst void *VAR_1)\n{",
"test_native_list_integer_helper(VAR_0, VAR_1,\nUSER_DEF_NATIVE_LIST_UNION_KIND_S8);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7,
9
],
[
11
]
] |
16,782 | static void xen_platform_ioport_writeb(void *opaque, hwaddr addr,
uint64_t val, unsigned int size)
{
PCIXenPlatformState *s = opaque;
PCIDevice *pci_dev = PCI_DEVICE(s);
switch (addr) {
case 0: /* Platform flags */
platform_fixed_ioport_writeb(opaq... | false | qemu | ae4d2eb273b167dad748ea4249720319240b1ac2 | static void xen_platform_ioport_writeb(void *opaque, hwaddr addr,
uint64_t val, unsigned int size)
{
PCIXenPlatformState *s = opaque;
PCIDevice *pci_dev = PCI_DEVICE(s);
switch (addr) {
case 0:
platform_fixed_ioport_writeb(opaque, 0, (uint32_t)val... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned int VAR_3)
{
PCIXenPlatformState *s = VAR_0;
PCIDevice *pci_dev = PCI_DEVICE(s);
switch (VAR_1) {
case 0:
platform_fixed_ioport_writeb(VAR_0, 0, (uint32_t)VAR_2);
brea... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned int VAR_3)\n{",
"PCIXenPlatformState *s = VAR_0;",
"PCIDevice *pci_dev = PCI_DEVICE(s);",
"switch (VAR_1) {",
"case 0:\nplatform_fixed_ioport_writeb(VAR_0, 0, (uint32_t)VAR_2);",
"break;",
"case 4:\nif (VAR_2 == 1) {",
"pci_unplu... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21,
23
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49,
51
],
[
53,
55
],
[
57
],
[
59,
61
],
[
63
],
[
65,... |
16,784 | void ff_thread_release_buffer(AVCodecContext *avctx, ThreadFrame *f)
{
PerThreadContext *p = avctx->internal->thread_ctx;
FrameThreadContext *fctx;
AVFrame *dst, *tmp;
FF_DISABLE_DEPRECATION_WARNINGS
int can_direct_free = !(avctx->active_thread_type & FF_THREAD_FRAME) ||
... | false | FFmpeg | a553c6a347d3d28d7ee44c3df3d5c4ee780dba23 | void ff_thread_release_buffer(AVCodecContext *avctx, ThreadFrame *f)
{
PerThreadContext *p = avctx->internal->thread_ctx;
FrameThreadContext *fctx;
AVFrame *dst, *tmp;
FF_DISABLE_DEPRECATION_WARNINGS
int can_direct_free = !(avctx->active_thread_type & FF_THREAD_FRAME) ||
... | {
"code": [],
"line_no": []
} | void FUNC_0(AVCodecContext *VAR_0, ThreadFrame *VAR_1)
{
PerThreadContext *p = VAR_0->internal->thread_ctx;
FrameThreadContext *fctx;
AVFrame *dst, *tmp;
FF_DISABLE_DEPRECATION_WARNINGS
int can_direct_free = !(VAR_0->active_thread_type & FF_THREAD_FRAME) ||
VAR_0->thread... | [
"void FUNC_0(AVCodecContext *VAR_0, ThreadFrame *VAR_1)\n{",
"PerThreadContext *p = VAR_0->internal->thread_ctx;",
"FrameThreadContext *fctx;",
"AVFrame *dst, *tmp;",
"FF_DISABLE_DEPRECATION_WARNINGS\nint can_direct_free = !(VAR_0->active_thread_type & FF_THREAD_FRAME) ||\nVAR_0->thread_safe_callbacks ... | [
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,
31,
33
],
[
37,
39
],
[
43
],
[
45
],
[
49
],
[
51
],
[
53
],
[
55
],
[
59
],
[
61
... |
16,785 | static int count_contiguous_clusters_by_type(int nb_clusters,
uint64_t *l2_table,
int wanted_type)
{
int i;
for (i = 0; i < nb_clusters; i++) {
int type = qcow2_get_cluster_type(be64_to_cpu(l2_table[i]));
... | false | qemu | 4341df8a83d6a528a1e2855735f87fc3aab42b70 | static int count_contiguous_clusters_by_type(int nb_clusters,
uint64_t *l2_table,
int wanted_type)
{
int i;
for (i = 0; i < nb_clusters; i++) {
int type = qcow2_get_cluster_type(be64_to_cpu(l2_table[i]));
... | {
"code": [],
"line_no": []
} | static int FUNC_0(int VAR_0,
uint64_t *VAR_1,
int VAR_2)
{
int VAR_3;
for (VAR_3 = 0; VAR_3 < VAR_0; VAR_3++) {
int VAR_4 = qcow2_get_cluster_type(be64_to_cpu(VAR_1[VAR_3]));
if (VAR_4 != VAR_2) ... | [
"static int FUNC_0(int VAR_0,\nuint64_t *VAR_1,\nint VAR_2)\n{",
"int VAR_3;",
"for (VAR_3 = 0; VAR_3 < VAR_0; VAR_3++) {",
"int VAR_4 = qcow2_get_cluster_type(be64_to_cpu(VAR_1[VAR_3]));",
"if (VAR_4 != VAR_2) {",
"break;",
"}",
"}",
"return VAR_3;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
]
] |
16,786 | static void scsi_disk_emulate_mode_select(SCSIDiskReq *r, uint8_t *inbuf)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
uint8_t *p = inbuf;
int cmd = r->req.cmd.buf[0];
int len = r->req.cmd.xfer;
int hdr_len = (cmd == MODE_SELECT ? 4 : 8);
int bd_len;
int pass;
... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | static void scsi_disk_emulate_mode_select(SCSIDiskReq *r, uint8_t *inbuf)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
uint8_t *p = inbuf;
int cmd = r->req.cmd.buf[0];
int len = r->req.cmd.xfer;
int hdr_len = (cmd == MODE_SELECT ? 4 : 8);
int bd_len;
int pass;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(SCSIDiskReq *VAR_0, uint8_t *VAR_1)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0->req.dev);
uint8_t *p = VAR_1;
int VAR_2 = VAR_0->req.VAR_2.buf[0];
int VAR_3 = VAR_0->req.VAR_2.xfer;
int VAR_4 = (VAR_2 == MODE_SELECT ? 4 : 8);
int VAR_5;
int VAR_6;
... | [
"static void FUNC_0(SCSIDiskReq *VAR_0, uint8_t *VAR_1)\n{",
"SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0->req.dev);",
"uint8_t *p = VAR_1;",
"int VAR_2 = VAR_0->req.VAR_2.buf[0];",
"int VAR_3 = VAR_0->req.VAR_2.xfer;",
"int VAR_4 = (VAR_2 == MODE_SELECT ? 4 : 8);",
"int VAR_5;",
"int 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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
16,788 | int32 float32_to_int32_round_to_zero( float32 a STATUS_PARAM )
{
flag aSign;
int16 aExp, shiftCount;
bits32 aSig;
int32 z;
aSig = extractFloat32Frac( a );
aExp = extractFloat32Exp( a );
aSign = extractFloat32Sign( a );
shiftCount = aExp - 0x9E;
if ( 0 <= shiftCount ) {
... | false | qemu | f090c9d4ad5812fb92843d6470a1111c15190c4c | int32 float32_to_int32_round_to_zero( float32 a STATUS_PARAM )
{
flag aSign;
int16 aExp, shiftCount;
bits32 aSig;
int32 z;
aSig = extractFloat32Frac( a );
aExp = extractFloat32Exp( a );
aSign = extractFloat32Sign( a );
shiftCount = aExp - 0x9E;
if ( 0 <= shiftCount ) {
... | {
"code": [],
"line_no": []
} | int32 FUNC_0( float32 a STATUS_PARAM )
{
flag aSign;
int16 aExp, shiftCount;
bits32 aSig;
int32 z;
aSig = extractFloat32Frac( a );
aExp = extractFloat32Exp( a );
aSign = extractFloat32Sign( a );
shiftCount = aExp - 0x9E;
if ( 0 <= shiftCount ) {
if ( a != 0xCF000... | [
"int32 FUNC_0( float32 a STATUS_PARAM )\n{",
"flag aSign;",
"int16 aExp, shiftCount;",
"bits32 aSig;",
"int32 z;",
"aSig = extractFloat32Frac( a );",
"aExp = extractFloat32Exp( a );",
"aSign = extractFloat32Sign( a );",
"shiftCount = aExp - 0x9E;",
"if ( 0 <= shiftCount ) {",
"if ( a != 0xCF0000... | [
0,
0,
0,
0,
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
... |
16,789 | QEMUFile *qemu_popen_cmd(const char *command, const char *mode)
{
FILE *stdio_file;
QEMUFileStdio *s;
stdio_file = popen(command, mode);
if (stdio_file == NULL) {
return NULL;
}
if (mode == NULL || (mode[0] != 'r' && mode[0] != 'w') || mode[1] != 0) {
fprintf(stderr,... | false | qemu | a4cc73d629d43c8a4d171d043ff229a959df3ca6 | QEMUFile *qemu_popen_cmd(const char *command, const char *mode)
{
FILE *stdio_file;
QEMUFileStdio *s;
stdio_file = popen(command, mode);
if (stdio_file == NULL) {
return NULL;
}
if (mode == NULL || (mode[0] != 'r' && mode[0] != 'w') || mode[1] != 0) {
fprintf(stderr,... | {
"code": [],
"line_no": []
} | QEMUFile *FUNC_0(const char *command, const char *mode)
{
FILE *stdio_file;
QEMUFileStdio *s;
stdio_file = popen(command, mode);
if (stdio_file == NULL) {
return NULL;
}
if (mode == NULL || (mode[0] != 'r' && mode[0] != 'w') || mode[1] != 0) {
fprintf(stderr, "qemu_p... | [
"QEMUFile *FUNC_0(const char *command, const char *mode)\n{",
"FILE *stdio_file;",
"QEMUFileStdio *s;",
"stdio_file = popen(command, mode);",
"if (stdio_file == NULL) {",
"return NULL;",
"}",
"if (mode == NULL || (mode[0] != 'r' && mode[0] != 'w') || mode[1] != 0) {",
"fprintf(stderr, \"qemu_popen: ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51... |
16,790 | static int openpic_load(QEMUFile* f, void *opaque, int version_id)
{
OpenPICState *opp = (OpenPICState *)opaque;
unsigned int i;
if (version_id != 1)
return -EINVAL;
qemu_get_be32s(f, &opp->glbc);
qemu_get_be32s(f, &opp->veni);
qemu_get_be32s(f, &opp->pint);
qemu_get_be3... | false | qemu | c975330ec4f5674f2899331f914c04ecba6edf26 | static int openpic_load(QEMUFile* f, void *opaque, int version_id)
{
OpenPICState *opp = (OpenPICState *)opaque;
unsigned int i;
if (version_id != 1)
return -EINVAL;
qemu_get_be32s(f, &opp->glbc);
qemu_get_be32s(f, &opp->veni);
qemu_get_be32s(f, &opp->pint);
qemu_get_be3... | {
"code": [],
"line_no": []
} | static int FUNC_0(QEMUFile* VAR_0, void *VAR_1, int VAR_2)
{
OpenPICState *opp = (OpenPICState *)VAR_1;
unsigned int VAR_3;
if (VAR_2 != 1)
return -EINVAL;
qemu_get_be32s(VAR_0, &opp->glbc);
qemu_get_be32s(VAR_0, &opp->veni);
qemu_get_be32s(VAR_0, &opp->pint);
qemu_get_b... | [
"static int FUNC_0(QEMUFile* VAR_0, void *VAR_1, int VAR_2)\n{",
"OpenPICState *opp = (OpenPICState *)VAR_1;",
"unsigned int VAR_3;",
"if (VAR_2 != 1)\nreturn -EINVAL;",
"qemu_get_be32s(VAR_0, &opp->glbc);",
"qemu_get_be32s(VAR_0, &opp->veni);",
"qemu_get_be32s(VAR_0, &opp->pint);",
"qemu_get_be32s(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
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49
],
[
51
],
... |
16,791 | uint64_t HELPER(abs_i64)(int64_t val)
{
HELPER_LOG("%s: val 0x%" PRIx64 "\n", __func__, val);
if (val < 0) {
return -val;
} else {
return val;
}
}
| false | qemu | d30107814c8d02f1896bd57249aef1b5aaed38c9 | uint64_t HELPER(abs_i64)(int64_t val)
{
HELPER_LOG("%s: val 0x%" PRIx64 "\n", __func__, val);
if (val < 0) {
return -val;
} else {
return val;
}
}
| {
"code": [],
"line_no": []
} | uint64_t FUNC_0(abs_i64)(int64_t val)
{
HELPER_LOG("%s: val 0x%" PRIx64 "\n", __func__, val);
if (val < 0) {
return -val;
} else {
return val;
}
}
| [
"uint64_t FUNC_0(abs_i64)(int64_t val)\n{",
"HELPER_LOG(\"%s: val 0x%\" PRIx64 \"\\n\", __func__, val);",
"if (val < 0) {",
"return -val;",
"} else {",
"return val;",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
16,793 | void blk_resume_after_migration(Error **errp)
{
BlockBackend *blk;
Error *local_err = NULL;
for (blk = blk_all_next(NULL); blk; blk = blk_all_next(blk)) {
if (!blk->disable_perm) {
continue;
}
blk->disable_perm = false;
blk_set_perm(blk, blk->perm, ... | false | qemu | 4417ab7adf1613799054be5afedf810fc2524ee8 | void blk_resume_after_migration(Error **errp)
{
BlockBackend *blk;
Error *local_err = NULL;
for (blk = blk_all_next(NULL); blk; blk = blk_all_next(blk)) {
if (!blk->disable_perm) {
continue;
}
blk->disable_perm = false;
blk_set_perm(blk, blk->perm, ... | {
"code": [],
"line_no": []
} | void FUNC_0(Error **VAR_0)
{
BlockBackend *blk;
Error *local_err = NULL;
for (blk = blk_all_next(NULL); blk; blk = blk_all_next(blk)) {
if (!blk->disable_perm) {
continue;
}
blk->disable_perm = false;
blk_set_perm(blk, blk->perm, blk->shared_perm, &... | [
"void FUNC_0(Error **VAR_0)\n{",
"BlockBackend *blk;",
"Error *local_err = NULL;",
"for (blk = blk_all_next(NULL); blk; blk = blk_all_next(blk)) {",
"if (!blk->disable_perm) {",
"continue;",
"}",
"blk->disable_perm = false;",
"blk_set_perm(blk, blk->perm, blk->shared_perm, &local_err);",
"if (loca... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
16,796 | static int vfio_pci_hot_reset(VFIOPCIDevice *vdev, bool single)
{
VFIOGroup *group;
struct vfio_pci_hot_reset_info *info;
struct vfio_pci_dependent_device *devices;
struct vfio_pci_hot_reset *reset;
int32_t *fds;
int ret, i, count;
bool multi = false;
trace_vfio_pci_hot_reset(... | false | qemu | 7df9381b7aa56c897e344f3bfe43bf5848bbd3e0 | static int vfio_pci_hot_reset(VFIOPCIDevice *vdev, bool single)
{
VFIOGroup *group;
struct vfio_pci_hot_reset_info *info;
struct vfio_pci_dependent_device *devices;
struct vfio_pci_hot_reset *reset;
int32_t *fds;
int ret, i, count;
bool multi = false;
trace_vfio_pci_hot_reset(... | {
"code": [],
"line_no": []
} | static int FUNC_0(VFIOPCIDevice *VAR_0, bool VAR_1)
{
VFIOGroup *group;
struct vfio_pci_hot_reset_info *VAR_2;
struct vfio_pci_dependent_device *VAR_3;
struct FUNC_0 *VAR_4;
int32_t *fds;
int VAR_5, VAR_6, VAR_7;
bool multi = false;
trace_vfio_pci_hot_reset(VAR_0->vbasedev.nam... | [
"static int FUNC_0(VFIOPCIDevice *VAR_0, bool VAR_1)\n{",
"VFIOGroup *group;",
"struct vfio_pci_hot_reset_info *VAR_2;",
"struct vfio_pci_dependent_device *VAR_3;",
"struct FUNC_0 *VAR_4;",
"int32_t *fds;",
"int VAR_5, VAR_6, VAR_7;",
"bool multi = false;",
"trace_vfio_pci_hot_reset(VAR_0->vbasedev.... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47,
49
],
[
51
... |
16,797 | pvscsi_ring_pop_req_descr(PVSCSIRingInfo *mgr)
{
uint32_t ready_ptr = RS_GET_FIELD(mgr, reqProdIdx);
if (ready_ptr != mgr->consumed_ptr) {
uint32_t next_ready_ptr =
mgr->consumed_ptr++ & mgr->txr_len_mask;
uint32_t next_ready_page =
next_ready_ptr / PVSCSI_MAX_NU... | false | qemu | d251157ac1928191af851d199a9ff255d330bec9 | pvscsi_ring_pop_req_descr(PVSCSIRingInfo *mgr)
{
uint32_t ready_ptr = RS_GET_FIELD(mgr, reqProdIdx);
if (ready_ptr != mgr->consumed_ptr) {
uint32_t next_ready_ptr =
mgr->consumed_ptr++ & mgr->txr_len_mask;
uint32_t next_ready_page =
next_ready_ptr / PVSCSI_MAX_NU... | {
"code": [],
"line_no": []
} | FUNC_0(PVSCSIRingInfo *VAR_0)
{
uint32_t ready_ptr = RS_GET_FIELD(VAR_0, reqProdIdx);
if (ready_ptr != VAR_0->consumed_ptr) {
uint32_t next_ready_ptr =
VAR_0->consumed_ptr++ & VAR_0->txr_len_mask;
uint32_t next_ready_page =
next_ready_ptr / PVSCSI_MAX_NUM_REQ_ENT... | [
"FUNC_0(PVSCSIRingInfo *VAR_0)\n{",
"uint32_t ready_ptr = RS_GET_FIELD(VAR_0, reqProdIdx);",
"if (ready_ptr != VAR_0->consumed_ptr) {",
"uint32_t next_ready_ptr =\nVAR_0->consumed_ptr++ & VAR_0->txr_len_mask;",
"uint32_t next_ready_page =\nnext_ready_ptr / PVSCSI_MAX_NUM_REQ_ENTRIES_PER_PAGE;",
"uint32_t ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15,
17
],
[
19,
21
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
16,798 | int nbd_receive_negotiate(QIOChannel *ioc, const char *name, uint32_t *flags,
QCryptoTLSCreds *tlscreds, const char *hostname,
QIOChannel **outioc,
off_t *size, Error **errp)
{
char buf[256];
uint64_t magic, s;
int rc;
... | false | qemu | 7423f417827146f956df820f172d0bf80a489495 | int nbd_receive_negotiate(QIOChannel *ioc, const char *name, uint32_t *flags,
QCryptoTLSCreds *tlscreds, const char *hostname,
QIOChannel **outioc,
off_t *size, Error **errp)
{
char buf[256];
uint64_t magic, s;
int rc;
... | {
"code": [],
"line_no": []
} | int FUNC_0(QIOChannel *VAR_0, const char *VAR_1, uint32_t *VAR_2,
QCryptoTLSCreds *VAR_3, const char *VAR_4,
QIOChannel **VAR_5,
off_t *VAR_6, Error **VAR_7)
{
char VAR_8[256];
uint64_t magic, s;
int VAR_9;
TRACE("Re... | [
"int FUNC_0(QIOChannel *VAR_0, const char *VAR_1, uint32_t *VAR_2,\nQCryptoTLSCreds *VAR_3, const char *VAR_4,\nQIOChannel **VAR_5,\noff_t *VAR_6, Error **VAR_7)\n{",
"char VAR_8[256];",
"uint64_t magic, s;",
"int VAR_9;",
"TRACE(\"Receiving negotiation VAR_3=%p VAR_4=%s.\",\nVAR_3, VAR_4 ? VAR_4 : \"<null>... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
... |
16,799 | SCSIRequest *scsi_req_new(SCSIDevice *d, uint32_t tag, uint32_t lun,
uint8_t *buf, void *hba_private)
{
SCSIRequest *req;
req = d->info->alloc_req(d, tag, lun, hba_private);
memcpy(req->cmd.buf, buf, 16);
return req;
}
| false | qemu | afa46c468acc18914c2773538f1b088c507766ee | SCSIRequest *scsi_req_new(SCSIDevice *d, uint32_t tag, uint32_t lun,
uint8_t *buf, void *hba_private)
{
SCSIRequest *req;
req = d->info->alloc_req(d, tag, lun, hba_private);
memcpy(req->cmd.buf, buf, 16);
return req;
}
| {
"code": [],
"line_no": []
} | SCSIRequest *FUNC_0(SCSIDevice *d, uint32_t tag, uint32_t lun,
uint8_t *buf, void *hba_private)
{
SCSIRequest *req;
req = d->info->alloc_req(d, tag, lun, hba_private);
memcpy(req->cmd.buf, buf, 16);
return req;
}
| [
"SCSIRequest *FUNC_0(SCSIDevice *d, uint32_t tag, uint32_t lun,\nuint8_t *buf, void *hba_private)\n{",
"SCSIRequest *req;",
"req = d->info->alloc_req(d, tag, lun, hba_private);",
"memcpy(req->cmd.buf, buf, 16);",
"return req;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
16,800 | int qemu_read_password(char *buf, int buf_size)
{
uint8_t ch;
int i, ret;
printf("password: ");
fflush(stdout);
term_init();
i = 0;
for (;;) {
ret = read(0, &ch, 1);
if (ret == -1) {
if (errno == EAGAIN || errno == EINTR) {
continue;
... | false | qemu | 6a11d5183fb7564a3d32007b46846312fd61a1c5 | int qemu_read_password(char *buf, int buf_size)
{
uint8_t ch;
int i, ret;
printf("password: ");
fflush(stdout);
term_init();
i = 0;
for (;;) {
ret = read(0, &ch, 1);
if (ret == -1) {
if (errno == EAGAIN || errno == EINTR) {
continue;
... | {
"code": [],
"line_no": []
} | int FUNC_0(char *VAR_0, int VAR_1)
{
uint8_t ch;
int VAR_2, VAR_3;
printf("password: ");
fflush(stdout);
term_init();
VAR_2 = 0;
for (;;) {
VAR_3 = read(0, &ch, 1);
if (VAR_3 == -1) {
if (errno == EAGAIN || errno == EINTR) {
continue;... | [
"int FUNC_0(char *VAR_0, int VAR_1)\n{",
"uint8_t ch;",
"int VAR_2, VAR_3;",
"printf(\"password: \");",
"fflush(stdout);",
"term_init();",
"VAR_2 = 0;",
"for (;;) {",
"VAR_3 = read(0, &ch, 1);",
"if (VAR_3 == -1) {",
"if (errno == EAGAIN || errno == EINTR) {",
"continue;",
"} else {",
"bre... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43... |
16,801 | static void qemu_account_warp_timer(void)
{
if (!use_icount || !icount_sleep) {
return;
}
/* Nothing to do if the VM is stopped: QEMU_CLOCK_VIRTUAL timers
* do not fire, so computing the deadline does not make sense.
*/
if (!runstate_is_running()) {
return;
}
... | false | qemu | b39e3f34c9de7ead6a11a74aa2de78baf41d81a7 | static void qemu_account_warp_timer(void)
{
if (!use_icount || !icount_sleep) {
return;
}
if (!runstate_is_running()) {
return;
}
if (!replay_checkpoint(CHECKPOINT_CLOCK_WARP_ACCOUNT)) {
return;
}
timer_del(icount_warp_timer);
ico... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
if (!use_icount || !icount_sleep) {
return;
}
if (!runstate_is_running()) {
return;
}
if (!replay_checkpoint(CHECKPOINT_CLOCK_WARP_ACCOUNT)) {
return;
}
timer_del(icount_warp_timer);
icount_warp_rt();
}... | [
"static void FUNC_0(void)\n{",
"if (!use_icount || !icount_sleep) {",
"return;",
"}",
"if (!runstate_is_running()) {",
"return;",
"}",
"if (!replay_checkpoint(CHECKPOINT_CLOCK_WARP_ACCOUNT)) {",
"return;",
"}",
"timer_del(icount_warp_timer);",
"icount_warp_rt();",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
19
],
[
21
],
[
23
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
]
] |
16,802 | int host_to_target_signal(int sig)
{
if (sig >= _NSIG)
return sig;
return host_to_target_signal_table[sig];
}
| false | qemu | 167c50d8f94e0ffb880aa5cd2a232a3f32f0df1d | int host_to_target_signal(int sig)
{
if (sig >= _NSIG)
return sig;
return host_to_target_signal_table[sig];
}
| {
"code": [],
"line_no": []
} | int FUNC_0(int VAR_0)
{
if (VAR_0 >= _NSIG)
return VAR_0;
return host_to_target_signal_table[VAR_0];
}
| [
"int FUNC_0(int VAR_0)\n{",
"if (VAR_0 >= _NSIG)\nreturn VAR_0;",
"return host_to_target_signal_table[VAR_0];",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
]
] |
16,803 | void process_pending_signals(CPUArchState *cpu_env)
{
CPUState *cpu = ENV_GET_CPU(cpu_env);
int sig;
abi_ulong handler;
sigset_t set, old_set;
target_sigset_t target_old_set;
struct emulated_sigtable *k;
struct target_sigaction *sa;
struct sigqueue *q;
TaskState *ts = cpu->... | false | qemu | 1c275925bfbbc2de84a8f0e09d1dd70bbefb6da3 | void process_pending_signals(CPUArchState *cpu_env)
{
CPUState *cpu = ENV_GET_CPU(cpu_env);
int sig;
abi_ulong handler;
sigset_t set, old_set;
target_sigset_t target_old_set;
struct emulated_sigtable *k;
struct target_sigaction *sa;
struct sigqueue *q;
TaskState *ts = cpu->... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUArchState *VAR_0)
{
CPUState *cpu = ENV_GET_CPU(VAR_0);
int VAR_1;
abi_ulong handler;
sigset_t set, old_set;
target_sigset_t target_old_set;
struct emulated_sigtable *VAR_2;
struct target_sigaction *VAR_3;
struct sigqueue *VAR_4;
TaskState *ts = cpu->opaque;
... | [
"void FUNC_0(CPUArchState *VAR_0)\n{",
"CPUState *cpu = ENV_GET_CPU(VAR_0);",
"int VAR_1;",
"abi_ulong handler;",
"sigset_t set, old_set;",
"target_sigset_t target_old_set;",
"struct emulated_sigtable *VAR_2;",
"struct target_sigaction *VAR_3;",
"struct sigqueue *VAR_4;",
"TaskState *ts = cpu->opa... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
53,... |
16,805 | static void handle_stream_probing(AVStream *st)
{
if (st->codec->codec_id == AV_CODEC_ID_PCM_S16LE) {
st->request_probe = AVPROBE_SCORE_EXTENSION;
st->probe_packets = FFMIN(st->probe_packets, 14);
}
}
| false | FFmpeg | 9f5769437aaab30a359cde254f39d9a28b1ce657 | static void handle_stream_probing(AVStream *st)
{
if (st->codec->codec_id == AV_CODEC_ID_PCM_S16LE) {
st->request_probe = AVPROBE_SCORE_EXTENSION;
st->probe_packets = FFMIN(st->probe_packets, 14);
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(AVStream *VAR_0)
{
if (VAR_0->codec->codec_id == AV_CODEC_ID_PCM_S16LE) {
VAR_0->request_probe = AVPROBE_SCORE_EXTENSION;
VAR_0->probe_packets = FFMIN(VAR_0->probe_packets, 14);
}
}
| [
"static void FUNC_0(AVStream *VAR_0)\n{",
"if (VAR_0->codec->codec_id == AV_CODEC_ID_PCM_S16LE) {",
"VAR_0->request_probe = AVPROBE_SCORE_EXTENSION;",
"VAR_0->probe_packets = FFMIN(VAR_0->probe_packets, 14);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
16,806 | int avcodec_close(AVCodecContext *avctx)
{
/* If there is a user-supplied mutex locking routine, call it. */
if (ff_lockmgr_cb) {
if ((*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_OBTAIN))
return -1;
}
entangled_thread_counter++;
if(entangled_thread_counter != 1){
av_... | false | FFmpeg | dccda293a0576d5414fafc0e95615c82a2f2399f | int avcodec_close(AVCodecContext *avctx)
{
if (ff_lockmgr_cb) {
if ((*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_OBTAIN))
return -1;
}
entangled_thread_counter++;
if(entangled_thread_counter != 1){
av_log(avctx, AV_LOG_ERROR, "insufficient thread locking around avco... | {
"code": [],
"line_no": []
} | int FUNC_0(AVCodecContext *VAR_0)
{
if (ff_lockmgr_cb) {
if ((*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_OBTAIN))
return -1;
}
entangled_thread_counter++;
if(entangled_thread_counter != 1){
av_log(VAR_0, AV_LOG_ERROR, "insufficient thread locking around avcodec_ope... | [
"int FUNC_0(AVCodecContext *VAR_0)\n{",
"if (ff_lockmgr_cb) {",
"if ((*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_OBTAIN))\nreturn -1;",
"}",
"entangled_thread_counter++;",
"if(entangled_thread_counter != 1){",
"av_log(VAR_0, AV_LOG_ERROR, \"insufficient thread locking around avcodec_open/close()\\n\");",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9,
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31,
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
51
],
[
53
],
... |
16,807 | static int a52_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
{
AC3DecodeState *s = avctx->priv_data;
uint8_t *buf_ptr;
int flags, i, len;
int sample_rate, bit_rate;
short *out_samples = data... | false | FFmpeg | 3eca1e6fad56f295fb1ef67cb70aff37ff4936a4 | static int a52_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
{
AC3DecodeState *s = avctx->priv_data;
uint8_t *buf_ptr;
int flags, i, len;
int sample_rate, bit_rate;
short *out_samples = data... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
uint8_t *VAR_3, int VAR_4)
{
AC3DecodeState *s = VAR_0->priv_data;
uint8_t *buf_ptr;
int VAR_5, VAR_6, VAR_7;
int VAR_8, VAR_9;
short *VAR_10 = VAR_1;
float VAR_11;
... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nuint8_t *VAR_3, int VAR_4)\n{",
"AC3DecodeState *s = VAR_0->priv_data;",
"uint8_t *buf_ptr;",
"int VAR_5, VAR_6, VAR_7;",
"int VAR_8, VAR_9;",
"short *VAR_10 = VAR_1;",
"float VAR_11;",
"static const int VAR_12[8] = {",
"2, 1, 2, 3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45,
47
],
[
49
],
[
51
... |
16,809 | static int get_packetheader(NUTContext *nut, ByteIOContext *bc, int calculate_checksum)
{
int64_t start, size;
start= url_ftell(bc) - 8;
init_checksum(bc, calculate_checksum ? update_adler32 : NULL, 0);
size= get_v(bc);
nut->packet_start[2] = start;
nut->written_packet_size= size;
... | false | FFmpeg | a26e1d4c1f7c93d24250dd9c0786241f92fcdea4 | static int get_packetheader(NUTContext *nut, ByteIOContext *bc, int calculate_checksum)
{
int64_t start, size;
start= url_ftell(bc) - 8;
init_checksum(bc, calculate_checksum ? update_adler32 : NULL, 0);
size= get_v(bc);
nut->packet_start[2] = start;
nut->written_packet_size= size;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(NUTContext *VAR_0, ByteIOContext *VAR_1, int VAR_2)
{
int64_t start, size;
start= url_ftell(VAR_1) - 8;
init_checksum(VAR_1, VAR_2 ? update_adler32 : NULL, 0);
size= get_v(VAR_1);
VAR_0->packet_start[2] = start;
VAR_0->written_packet_size= size;
return size;... | [
"static int FUNC_0(NUTContext *VAR_0, ByteIOContext *VAR_1, int VAR_2)\n{",
"int64_t start, size;",
"start= url_ftell(VAR_1) - 8;",
"init_checksum(VAR_1, VAR_2 ? update_adler32 : NULL, 0);",
"size= get_v(VAR_1);",
"VAR_0->packet_start[2] = start;",
"VAR_0->written_packet_size= size;",
"return size;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
]
] |
16,810 | static void rtsp_close_streams(RTSPState *rt)
{
int i;
RTSPStream *rtsp_st;
for(i=0;i<rt->nb_rtsp_streams;i++) {
rtsp_st = rt->rtsp_streams[i];
if (rtsp_st) {
if (rtsp_st->transport_priv) {
if (rt->transport == RTSP_TRANSPORT_RDT)
ff... | false | FFmpeg | c89658008705d949c319df3fa6f400c481ad73e1 | static void rtsp_close_streams(RTSPState *rt)
{
int i;
RTSPStream *rtsp_st;
for(i=0;i<rt->nb_rtsp_streams;i++) {
rtsp_st = rt->rtsp_streams[i];
if (rtsp_st) {
if (rtsp_st->transport_priv) {
if (rt->transport == RTSP_TRANSPORT_RDT)
ff... | {
"code": [],
"line_no": []
} | static void FUNC_0(RTSPState *VAR_0)
{
int VAR_1;
RTSPStream *rtsp_st;
for(VAR_1=0;VAR_1<VAR_0->nb_rtsp_streams;VAR_1++) {
rtsp_st = VAR_0->rtsp_streams[VAR_1];
if (rtsp_st) {
if (rtsp_st->transport_priv) {
if (VAR_0->transport == RTSP_TRANSPORT_RDT)
... | [
"static void FUNC_0(RTSPState *VAR_0)\n{",
"int VAR_1;",
"RTSPStream *rtsp_st;",
"for(VAR_1=0;VAR_1<VAR_0->nb_rtsp_streams;VAR_1++) {",
"rtsp_st = VAR_0->rtsp_streams[VAR_1];",
"if (rtsp_st) {",
"if (rtsp_st->transport_priv) {",
"if (VAR_0->transport == RTSP_TRANSPORT_RDT)\nff_rdt_parse_close(rtsp_st-... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47... |
16,811 | static uint32_t drc_isolate_logical(sPAPRDRConnector *drc)
{
/* if the guest is configuring a device attached to this DRC, we
* should reset the configuration state at this point since it may
* no longer be reliable (guest released device and needs to start
* over, or unplug occurred so the FDT ... | false | qemu | 9d4c0f4f0a71e74fd7e04d73620268484d693adf | static uint32_t drc_isolate_logical(sPAPRDRConnector *drc)
{
g_free(drc->ccs);
drc->ccs = NULL;
if (spapr_drc_type(drc) == SPAPR_DR_CONNECTOR_TYPE_LMB
&& !drc->unplug_requested) {
return RTAS_OUT_HW_ERROR;
}
drc->isolation_state = SPA... | {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(sPAPRDRConnector *drc)
{
g_free(drc->ccs);
drc->ccs = NULL;
if (spapr_drc_type(drc) == SPAPR_DR_CONNECTOR_TYPE_LMB
&& !drc->unplug_requested) {
return RTAS_OUT_HW_ERROR;
}
drc->isolation_state = SPAPR_DR_ISOLATI... | [
"static uint32_t FUNC_0(sPAPRDRConnector *drc)\n{",
"g_free(drc->ccs);",
"drc->ccs = NULL;",
"if (spapr_drc_type(drc) == SPAPR_DR_CONNECTOR_TYPE_LMB\n&& !drc->unplug_requested) {",
"return RTAS_OUT_HW_ERROR;",
"}",
"drc->isolation_state = SPAPR_DR_ISOLATION_STATE_ISOLATED;",
"if (drc->unplug_requested... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
15
],
[
17
],
[
41,
43
],
[
45
],
[
47
],
[
51
],
[
71
],
[
73
],
[
75
],
[
77
],
[
79
],
[
81
],
[
83
],
[
85
],
[
87
],
[
89
],
[
93
],
[
95
]
] |
16,813 | static void compat_free_buffer(void *opaque, uint8_t *data)
{
CompatReleaseBufPriv *priv = opaque;
priv->avctx.release_buffer(&priv->avctx, &priv->frame);
av_freep(&priv);
}
| false | FFmpeg | a2816230c5c0a8fc72bc0163b7d21a96b194d87a | static void compat_free_buffer(void *opaque, uint8_t *data)
{
CompatReleaseBufPriv *priv = opaque;
priv->avctx.release_buffer(&priv->avctx, &priv->frame);
av_freep(&priv);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, uint8_t *VAR_1)
{
CompatReleaseBufPriv *priv = VAR_0;
priv->avctx.release_buffer(&priv->avctx, &priv->frame);
av_freep(&priv);
}
| [
"static void FUNC_0(void *VAR_0, uint8_t *VAR_1)\n{",
"CompatReleaseBufPriv *priv = VAR_0;",
"priv->avctx.release_buffer(&priv->avctx, &priv->frame);",
"av_freep(&priv);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
16,814 | static int aio_write_f(BlockBackend *blk, int argc, char **argv)
{
int nr_iov, c;
int pattern = 0xcd;
struct aio_ctx *ctx = g_new0(struct aio_ctx, 1);
int flags = 0;
ctx->blk = blk;
while ((c = getopt(argc, argv, "CfqP:uz")) != -1) {
switch (c) {
case 'C':
... | false | qemu | 37546ff28fb89744ebf2223db22cbc253592abe1 | static int aio_write_f(BlockBackend *blk, int argc, char **argv)
{
int nr_iov, c;
int pattern = 0xcd;
struct aio_ctx *ctx = g_new0(struct aio_ctx, 1);
int flags = 0;
ctx->blk = blk;
while ((c = getopt(argc, argv, "CfqP:uz")) != -1) {
switch (c) {
case 'C':
... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockBackend *VAR_0, int VAR_1, char **VAR_2)
{
int VAR_3, VAR_4;
int VAR_5 = 0xcd;
struct aio_ctx *VAR_6 = g_new0(struct aio_ctx, 1);
int VAR_7 = 0;
VAR_6->VAR_0 = VAR_0;
while ((VAR_4 = getopt(VAR_1, VAR_2, "CfqP:uz")) != -1) {
switch (VAR_4) {
case... | [
"static int FUNC_0(BlockBackend *VAR_0, int VAR_1, char **VAR_2)\n{",
"int VAR_3, VAR_4;",
"int VAR_5 = 0xcd;",
"struct aio_ctx *VAR_6 = g_new0(struct aio_ctx, 1);",
"int VAR_7 = 0;",
"VAR_6->VAR_0 = VAR_0;",
"while ((VAR_4 = getopt(VAR_1, VAR_2, \"CfqP:uz\")) != -1) {",
"switch (VAR_4) {",
"case 'C... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27,
29
],
[
31
],
[
33,
35
],
[
37
],
[
39,
41
],
[
43
],
[
45,
47
],
[... |
16,815 | void *g_malloc_n(size_t nmemb, size_t size)
{
size_t sz;
void *ptr;
__coverity_negative_sink__(nmemb);
__coverity_negative_sink__(size);
sz = nmemb * size;
ptr = __coverity_alloc__(size);
__coverity_mark_as_uninitialized_buffer__(ptr);
__coverity_mark_as_afm_allocated__(ptr, A... | false | qemu | 7ad4c7200111d20eb97eed4f46b6026e3f0b0eef | void *g_malloc_n(size_t nmemb, size_t size)
{
size_t sz;
void *ptr;
__coverity_negative_sink__(nmemb);
__coverity_negative_sink__(size);
sz = nmemb * size;
ptr = __coverity_alloc__(size);
__coverity_mark_as_uninitialized_buffer__(ptr);
__coverity_mark_as_afm_allocated__(ptr, A... | {
"code": [],
"line_no": []
} | void *FUNC_0(size_t VAR_0, size_t VAR_1)
{
size_t sz;
void *VAR_2;
__coverity_negative_sink__(VAR_0);
__coverity_negative_sink__(VAR_1);
sz = VAR_0 * VAR_1;
VAR_2 = __coverity_alloc__(VAR_1);
__coverity_mark_as_uninitialized_buffer__(VAR_2);
__coverity_mark_as_afm_allocated__(... | [
"void *FUNC_0(size_t VAR_0, size_t VAR_1)\n{",
"size_t sz;",
"void *VAR_2;",
"__coverity_negative_sink__(VAR_0);",
"__coverity_negative_sink__(VAR_1);",
"sz = VAR_0 * VAR_1;",
"VAR_2 = __coverity_alloc__(VAR_1);",
"__coverity_mark_as_uninitialized_buffer__(VAR_2);",
"__coverity_mark_as_afm_allocated... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
16,818 | int i2c_recv(I2CBus *bus)
{
I2CSlaveClass *sc;
if ((QLIST_EMPTY(&bus->current_devs)) || (bus->broadcast)) {
return -1;
}
sc = I2C_SLAVE_GET_CLASS(QLIST_FIRST(&bus->current_devs)->elt);
if (sc->recv) {
return sc->recv(QLIST_FIRST(&bus->current_devs)->elt);
}
retu... | false | qemu | 056fca7b51d949aa0e18e0eb647838874a53bcbe | int i2c_recv(I2CBus *bus)
{
I2CSlaveClass *sc;
if ((QLIST_EMPTY(&bus->current_devs)) || (bus->broadcast)) {
return -1;
}
sc = I2C_SLAVE_GET_CLASS(QLIST_FIRST(&bus->current_devs)->elt);
if (sc->recv) {
return sc->recv(QLIST_FIRST(&bus->current_devs)->elt);
}
retu... | {
"code": [],
"line_no": []
} | int FUNC_0(I2CBus *VAR_0)
{
I2CSlaveClass *sc;
if ((QLIST_EMPTY(&VAR_0->current_devs)) || (VAR_0->broadcast)) {
return -1;
}
sc = I2C_SLAVE_GET_CLASS(QLIST_FIRST(&VAR_0->current_devs)->elt);
if (sc->recv) {
return sc->recv(QLIST_FIRST(&VAR_0->current_devs)->elt);
}
... | [
"int FUNC_0(I2CBus *VAR_0)\n{",
"I2CSlaveClass *sc;",
"if ((QLIST_EMPTY(&VAR_0->current_devs)) || (VAR_0->broadcast)) {",
"return -1;",
"}",
"sc = I2C_SLAVE_GET_CLASS(QLIST_FIRST(&VAR_0->current_devs)->elt);",
"if (sc->recv) {",
"return sc->recv(QLIST_FIRST(&VAR_0->current_devs)->elt);",
"}",
"ret... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
16,819 | static int spapr_vga_init(PCIBus *pci_bus)
{
switch (vga_interface_type) {
case VGA_STD:
pci_std_vga_init(pci_bus);
return 1;
case VGA_NONE:
return 0;
default:
fprintf(stderr, "This vga model is not supported,"
"currently it only supports -vga st... | false | qemu | 1ddcae82a2509668b94a13e84921bdcafddcdfff | static int spapr_vga_init(PCIBus *pci_bus)
{
switch (vga_interface_type) {
case VGA_STD:
pci_std_vga_init(pci_bus);
return 1;
case VGA_NONE:
return 0;
default:
fprintf(stderr, "This vga model is not supported,"
"currently it only supports -vga st... | {
"code": [],
"line_no": []
} | static int FUNC_0(PCIBus *VAR_0)
{
switch (vga_interface_type) {
case VGA_STD:
pci_std_vga_init(VAR_0);
return 1;
case VGA_NONE:
return 0;
default:
fprintf(stderr, "This vga model is not supported,"
"currently it only supports -vga std\n");
... | [
"static int FUNC_0(PCIBus *VAR_0)\n{",
"switch (vga_interface_type) {",
"case VGA_STD:\npci_std_vga_init(VAR_0);",
"return 1;",
"case VGA_NONE:\nreturn 0;",
"default:\nfprintf(stderr, \"This vga model is not supported,\"\n\"currently it only supports -vga std\\n\");",
"exit(0);",
"break;",
"}",
"}... | [
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
]
] |
16,820 | void async_context_pop(void)
{
}
| false | qemu | 4e59b545868a5ee5f59b346337f0c44209929334 | void async_context_pop(void)
{
}
| {
"code": [],
"line_no": []
} | void FUNC_0(void)
{
}
| [
"void FUNC_0(void)\n{",
"}"
] | [
0,
0
] | [
[
1,
3
],
[
5
]
] |
16,822 | static void thread_pool_init_one(ThreadPool *pool, AioContext *ctx)
{
if (!ctx) {
ctx = qemu_get_aio_context();
}
memset(pool, 0, sizeof(*pool));
event_notifier_init(&pool->notifier, false);
pool->ctx = ctx;
qemu_mutex_init(&pool->lock);
qemu_cond_init(&pool->check_cancel)... | false | qemu | c2e50e3d11a0bf4c973cc30478c1af0f2d5f8e81 | static void thread_pool_init_one(ThreadPool *pool, AioContext *ctx)
{
if (!ctx) {
ctx = qemu_get_aio_context();
}
memset(pool, 0, sizeof(*pool));
event_notifier_init(&pool->notifier, false);
pool->ctx = ctx;
qemu_mutex_init(&pool->lock);
qemu_cond_init(&pool->check_cancel)... | {
"code": [],
"line_no": []
} | static void FUNC_0(ThreadPool *VAR_0, AioContext *VAR_1)
{
if (!VAR_1) {
VAR_1 = qemu_get_aio_context();
}
memset(VAR_0, 0, sizeof(*VAR_0));
event_notifier_init(&VAR_0->notifier, false);
VAR_0->VAR_1 = VAR_1;
qemu_mutex_init(&VAR_0->lock);
qemu_cond_init(&VAR_0->check_canc... | [
"static void FUNC_0(ThreadPool *VAR_0, AioContext *VAR_1)\n{",
"if (!VAR_1) {",
"VAR_1 = qemu_get_aio_context();",
"}",
"memset(VAR_0, 0, sizeof(*VAR_0));",
"event_notifier_init(&VAR_0->notifier, false);",
"VAR_0->VAR_1 = VAR_1;",
"qemu_mutex_init(&VAR_0->lock);",
"qemu_cond_init(&VAR_0->check_cance... | [
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
],
[
33
],
[
35
],
[
39
],
[
41
]
] |
16,823 | static always_inline void gen_cmov (TCGCond inv_cond,
int ra, int rb, int rc,
int islit, uint8_t lit, int mask)
{
int l1;
if (unlikely(rc == 31))
return;
l1 = gen_new_label();
if (ra != 31) {
if (mask)... | false | qemu | a7812ae412311d7d47f8aa85656faadac9d64b56 | static always_inline void gen_cmov (TCGCond inv_cond,
int ra, int rb, int rc,
int islit, uint8_t lit, int mask)
{
int l1;
if (unlikely(rc == 31))
return;
l1 = gen_new_label();
if (ra != 31) {
if (mask)... | {
"code": [],
"line_no": []
} | static always_inline void FUNC_0 (TCGCond inv_cond,
int ra, int rb, int rc,
int islit, uint8_t lit, int mask)
{
int VAR_0;
if (unlikely(rc == 31))
return;
VAR_0 = gen_new_label();
if (ra != 31) {
if (m... | [
"static always_inline void FUNC_0 (TCGCond inv_cond,\nint ra, int rb, int rc,\nint islit, uint8_t lit, int mask)\n{",
"int VAR_0;",
"if (unlikely(rc == 31))\nreturn;",
"VAR_0 = gen_new_label();",
"if (ra != 31) {",
"if (mask) {",
"TCGv tmp = tcg_temp_new(TCG_TYPE_I64);",
"tcg_gen_andi_i64(tmp, cpu_ir[... | [
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
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53,
55
... |
16,824 | static int process_tns_coeffs(TemporalNoiseShaping *tns, float *tns_coefs_raw,
int order, int w, int filt)
{
int i, j;
int *idx = tns->coef_idx[w][filt];
float *lpc = tns->coef[w][filt];
const int iqfac_p = ((1 << (MAX_LPC_PRECISION-1)) - 0.5)/(M_PI/2.0);
const i... | false | FFmpeg | f20b67173ca6a05b8c3dee02dad3b7243b96292b | static int process_tns_coeffs(TemporalNoiseShaping *tns, float *tns_coefs_raw,
int order, int w, int filt)
{
int i, j;
int *idx = tns->coef_idx[w][filt];
float *lpc = tns->coef[w][filt];
const int iqfac_p = ((1 << (MAX_LPC_PRECISION-1)) - 0.5)/(M_PI/2.0);
const i... | {
"code": [],
"line_no": []
} | static int FUNC_0(TemporalNoiseShaping *VAR_0, float *VAR_1,
int VAR_2, int VAR_3, int VAR_4)
{
int VAR_5, VAR_6;
int *VAR_7 = VAR_0->coef_idx[VAR_3][VAR_4];
float *VAR_8 = VAR_0->coef[VAR_3][VAR_4];
const int VAR_9 = ((1 << (MAX_LPC_PRECISION-1)) - 0.5)/(M_PI/2.0);
... | [
"static int FUNC_0(TemporalNoiseShaping *VAR_0, float *VAR_1,\nint VAR_2, int VAR_3, int VAR_4)\n{",
"int VAR_5, VAR_6;",
"int *VAR_7 = VAR_0->coef_idx[VAR_3][VAR_4];",
"float *VAR_8 = VAR_0->coef[VAR_3][VAR_4];",
"const int VAR_9 = ((1 << (MAX_LPC_PRECISION-1)) - 0.5)/(M_PI/2.0);",
"const int VAR_10 = ((... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
29
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51,
53
... |
16,825 | static inline void downmix_3f_to_stereo(float *samples)
{
int i;
for (i = 0; i < 256; i++) {
samples[i] += samples[i + 256];
samples[i + 256] = samples[i + 512];
samples[i + 512] = 0;
}
}
| false | FFmpeg | 0058584580b87feb47898e60e4b80c7f425882ad | static inline void downmix_3f_to_stereo(float *samples)
{
int i;
for (i = 0; i < 256; i++) {
samples[i] += samples[i + 256];
samples[i + 256] = samples[i + 512];
samples[i + 512] = 0;
}
}
| {
"code": [],
"line_no": []
} | static inline void FUNC_0(float *VAR_0)
{
int VAR_1;
for (VAR_1 = 0; VAR_1 < 256; VAR_1++) {
VAR_0[VAR_1] += VAR_0[VAR_1 + 256];
VAR_0[VAR_1 + 256] = VAR_0[VAR_1 + 512];
VAR_0[VAR_1 + 512] = 0;
}
}
| [
"static inline void FUNC_0(float *VAR_0)\n{",
"int VAR_1;",
"for (VAR_1 = 0; VAR_1 < 256; VAR_1++) {",
"VAR_0[VAR_1] += VAR_0[VAR_1 + 256];",
"VAR_0[VAR_1 + 256] = VAR_0[VAR_1 + 512];",
"VAR_0[VAR_1 + 512] = 0;",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
16,826 | static int vfio_set_resample_eventfd(VFIOINTp *intp)
{
VFIODevice *vbasedev = &intp->vdev->vbasedev;
struct vfio_irq_set *irq_set;
int argsz, ret;
int32_t *pfd;
argsz = sizeof(*irq_set) + sizeof(*pfd);
irq_set = g_malloc0(argsz);
irq_set->argsz = argsz;
irq_set->flags = VFIO_I... | false | qemu | a22313deca720e038ebc5805cf451b3a685d29ce | static int vfio_set_resample_eventfd(VFIOINTp *intp)
{
VFIODevice *vbasedev = &intp->vdev->vbasedev;
struct vfio_irq_set *irq_set;
int argsz, ret;
int32_t *pfd;
argsz = sizeof(*irq_set) + sizeof(*pfd);
irq_set = g_malloc0(argsz);
irq_set->argsz = argsz;
irq_set->flags = VFIO_I... | {
"code": [],
"line_no": []
} | static int FUNC_0(VFIOINTp *VAR_0)
{
VFIODevice *vbasedev = &VAR_0->vdev->vbasedev;
struct vfio_irq_set *VAR_1;
int VAR_2, VAR_3;
int32_t *pfd;
VAR_2 = sizeof(*VAR_1) + sizeof(*pfd);
VAR_1 = g_malloc0(VAR_2);
VAR_1->VAR_2 = VAR_2;
VAR_1->flags = VFIO_IRQ_SET_DATA_EVENTFD | VFI... | [
"static int FUNC_0(VFIOINTp *VAR_0)\n{",
"VFIODevice *vbasedev = &VAR_0->vdev->vbasedev;",
"struct vfio_irq_set *VAR_1;",
"int VAR_2, VAR_3;",
"int32_t *pfd;",
"VAR_2 = sizeof(*VAR_1) + sizeof(*pfd);",
"VAR_1 = g_malloc0(VAR_2);",
"VAR_1->VAR_2 = VAR_2;",
"VAR_1->flags = VFIO_IRQ_SET_DATA_EVENTFD | ... | [
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
... |
16,827 | static void test_io_channel_unix_fd_pass(void)
{
SocketAddress *listen_addr = g_new0(SocketAddress, 1);
SocketAddress *connect_addr = g_new0(SocketAddress, 1);
QIOChannel *src, *dst;
int testfd;
int fdsend[3];
int *fdrecv = NULL;
size_t nfdrecv = 0;
size_t i;
char bufsend[1... | false | qemu | dfd100f242370886bb6732f70f1f7cbd8eb9fedc | static void test_io_channel_unix_fd_pass(void)
{
SocketAddress *listen_addr = g_new0(SocketAddress, 1);
SocketAddress *connect_addr = g_new0(SocketAddress, 1);
QIOChannel *src, *dst;
int testfd;
int fdsend[3];
int *fdrecv = NULL;
size_t nfdrecv = 0;
size_t i;
char bufsend[1... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
SocketAddress *listen_addr = g_new0(SocketAddress, 1);
SocketAddress *connect_addr = g_new0(SocketAddress, 1);
QIOChannel *src, *dst;
int VAR_0;
int VAR_1[3];
int *VAR_2 = NULL;
size_t nfdrecv = 0;
size_t i;
char VAR_3[12], VAR_4[12];
struct ... | [
"static void FUNC_0(void)\n{",
"SocketAddress *listen_addr = g_new0(SocketAddress, 1);",
"SocketAddress *connect_addr = g_new0(SocketAddress, 1);",
"QIOChannel *src, *dst;",
"int VAR_0;",
"int VAR_1[3];",
"int *VAR_2 = NULL;",
"size_t nfdrecv = 0;",
"size_t i;",
"char VAR_3[12], VAR_4[12];",
"st... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
... |
16,828 | static int raw_open_common(BlockDriverState *bs, const char *filename,
int bdrv_flags, int open_flags)
{
BDRVRawState *s = bs->opaque;
int fd, ret;
ret = raw_normalize_devicepath(&filename);
if (ret != 0) {
return ret;
}
s->open_flags = open_flags ... | false | qemu | fc32a72dc19a79f7e16156784b1e76a128d41841 | static int raw_open_common(BlockDriverState *bs, const char *filename,
int bdrv_flags, int open_flags)
{
BDRVRawState *s = bs->opaque;
int fd, ret;
ret = raw_normalize_devicepath(&filename);
if (ret != 0) {
return ret;
}
s->open_flags = open_flags ... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1,
int VAR_2, int VAR_3)
{
BDRVRawState *s = VAR_0->opaque;
int VAR_4, VAR_5;
VAR_5 = raw_normalize_devicepath(&VAR_1);
if (VAR_5 != 0) {
return VAR_5;
}
s->VAR_3 = VAR_3 | O_BINARY;
s... | [
"static int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1,\nint VAR_2, int VAR_3)\n{",
"BDRVRawState *s = VAR_0->opaque;",
"int VAR_4, VAR_5;",
"VAR_5 = raw_normalize_devicepath(&VAR_1);",
"if (VAR_5 != 0) {",
"return VAR_5;",
"}",
"s->VAR_3 = VAR_3 | O_BINARY;",
"s->VAR_3 &= ~O_ACCMODE;",
"if... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
43,
45
],
[
47,
49
],
[
53
],
[
55
],
[... |
16,830 | static int proxy_close(FsContext *ctx, V9fsFidOpenState *fs)
{
return close(fs->fd);
}
| false | qemu | 494a8ebe713055d3946183f4b395f85a18b43e9e | static int proxy_close(FsContext *ctx, V9fsFidOpenState *fs)
{
return close(fs->fd);
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0, V9fsFidOpenState *VAR_1)
{
return close(VAR_1->fd);
}
| [
"static int FUNC_0(FsContext *VAR_0, V9fsFidOpenState *VAR_1)\n{",
"return close(VAR_1->fd);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.