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 |
|---|---|---|---|---|---|---|---|---|---|---|
4,298 | static void gen_arith_imm (CPUState *env, DisasContext *ctx, uint32_t opc,
int rt, int rs, int16_t imm)
{
target_ulong uimm;
const char *opn = "imm arith";
TCGv t0 = tcg_temp_local_new(TCG_TYPE_TL);
if (rt == 0 && opc != OPC_ADDI && opc != OPC_DADDI) {
/* If n... | false | qemu | 507563e85db880ff875f0a9498a1cf58a50cfad3 | static void gen_arith_imm (CPUState *env, DisasContext *ctx, uint32_t opc,
int rt, int rs, int16_t imm)
{
target_ulong uimm;
const char *opn = "imm arith";
TCGv t0 = tcg_temp_local_new(TCG_TYPE_TL);
if (rt == 0 && opc != OPC_ADDI && opc != OPC_DADDI) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0 (CPUState *VAR_0, DisasContext *VAR_1, uint32_t VAR_2,
int VAR_3, int VAR_4, int16_t VAR_5)
{
target_ulong uimm;
const char *VAR_6 = "VAR_5 arith";
TCGv t0 = tcg_temp_local_new(TCG_TYPE_TL);
if (VAR_3 == 0 && VAR_2 != OPC_ADDI && VAR_2 != OPC_DADDI) ... | [
"static void FUNC_0 (CPUState *VAR_0, DisasContext *VAR_1, uint32_t VAR_2,\nint VAR_3, int VAR_4, int16_t VAR_5)\n{",
"target_ulong uimm;",
"const char *VAR_6 = \"VAR_5 arith\";",
"TCGv t0 = tcg_temp_local_new(TCG_TYPE_TL);",
"if (VAR_3 == 0 && VAR_2 != OPC_ADDI && VAR_2 != OPC_DADDI) {",
"MIPS_DEBUG(\"NO... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
33,
35,
37,
39,
41,
43,
45,
47
],
[
51,
53,
55,
57
],
[
59
],
[
61,... |
4,299 | static ImageInfoSpecific *vmdk_get_specific_info(BlockDriverState *bs)
{
int i;
BDRVVmdkState *s = bs->opaque;
ImageInfoSpecific *spec_info = g_new0(ImageInfoSpecific, 1);
ImageInfoList **next;
*spec_info = (ImageInfoSpecific){
.type = IMAGE_INFO_SPECIFIC_KIND_VMDK,
{
... | false | qemu | 32bafa8fdd098d52fbf1102d5a5e48d29398c0aa | static ImageInfoSpecific *vmdk_get_specific_info(BlockDriverState *bs)
{
int i;
BDRVVmdkState *s = bs->opaque;
ImageInfoSpecific *spec_info = g_new0(ImageInfoSpecific, 1);
ImageInfoList **next;
*spec_info = (ImageInfoSpecific){
.type = IMAGE_INFO_SPECIFIC_KIND_VMDK,
{
... | {
"code": [],
"line_no": []
} | static ImageInfoSpecific *FUNC_0(BlockDriverState *bs)
{
int VAR_0;
BDRVVmdkState *s = bs->opaque;
ImageInfoSpecific *spec_info = g_new0(ImageInfoSpecific, 1);
ImageInfoList **next;
*spec_info = (ImageInfoSpecific){
.type = IMAGE_INFO_SPECIFIC_KIND_VMDK,
{
.vmd... | [
"static ImageInfoSpecific *FUNC_0(BlockDriverState *bs)\n{",
"int VAR_0;",
"BDRVVmdkState *s = bs->opaque;",
"ImageInfoSpecific *spec_info = g_new0(ImageInfoSpecific, 1);",
"ImageInfoList **next;",
"*spec_info = (ImageInfoSpecific){",
".type = IMAGE_INFO_SPECIFIC_KIND_VMDK,\n{",
".vmdk = g_new0(ImageI... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
21,
23
],
[
25
],
[
29
],
[
31,
33,
35,
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
4,300 | void do_smbios_option(const char *optarg)
{
#ifdef TARGET_I386
if (smbios_entry_add(optarg) < 0) {
fprintf(stderr, "Wrong smbios provided\n");
exit(1);
}
#endif
}
| false | qemu | 5bb95e41868b461f37159efb48908828ebd7ab36 | void do_smbios_option(const char *optarg)
{
#ifdef TARGET_I386
if (smbios_entry_add(optarg) < 0) {
fprintf(stderr, "Wrong smbios provided\n");
exit(1);
}
#endif
}
| {
"code": [],
"line_no": []
} | void FUNC_0(const char *VAR_0)
{
#ifdef TARGET_I386
if (smbios_entry_add(VAR_0) < 0) {
fprintf(stderr, "Wrong smbios provided\n");
exit(1);
}
#endif
}
| [
"void FUNC_0(const char *VAR_0)\n{",
"#ifdef TARGET_I386\nif (smbios_entry_add(VAR_0) < 0) {",
"fprintf(stderr, \"Wrong smbios provided\\n\");",
"exit(1);",
"}",
"#endif\n}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
13
],
[
15,
17
]
] |
4,301 | static int oss_run_in (HWVoiceIn *hw)
{
OSSVoiceIn *oss = (OSSVoiceIn *) hw;
int hwshift = hw->info.shift;
int i;
int live = audio_pcm_hw_get_live_in (hw);
int dead = hw->samples - live;
size_t read_samples = 0;
struct {
int add;
int len;
} bufs[2] = {
... | false | qemu | 1a40d5e23577b955265fe12a2b7b5222ec2df0f2 | static int oss_run_in (HWVoiceIn *hw)
{
OSSVoiceIn *oss = (OSSVoiceIn *) hw;
int hwshift = hw->info.shift;
int i;
int live = audio_pcm_hw_get_live_in (hw);
int dead = hw->samples - live;
size_t read_samples = 0;
struct {
int add;
int len;
} bufs[2] = {
... | {
"code": [],
"line_no": []
} | static int FUNC_0 (HWVoiceIn *VAR_0)
{
OSSVoiceIn *oss = (OSSVoiceIn *) VAR_0;
int VAR_1 = VAR_0->info.shift;
int VAR_2;
int VAR_3 = audio_pcm_hw_get_live_in (VAR_0);
int VAR_4 = VAR_0->samples - VAR_3;
size_t read_samples = 0;
struct {
int add;
int len;
} VAR_... | [
"static int FUNC_0 (HWVoiceIn *VAR_0)\n{",
"OSSVoiceIn *oss = (OSSVoiceIn *) VAR_0;",
"int VAR_1 = VAR_0->info.shift;",
"int VAR_2;",
"int VAR_3 = audio_pcm_hw_get_live_in (VAR_0);",
"int VAR_4 = VAR_0->samples - VAR_3;",
"size_t read_samples = 0;",
"struct {",
"int add;",
"int len;",
"} VAR_5[2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
... |
4,302 | int bdrv_debug_remove_breakpoint(BlockDriverState *bs, const char *tag)
{
while (bs && bs->drv && !bs->drv->bdrv_debug_remove_breakpoint) {
bs = bs->file;
}
if (bs && bs->drv && bs->drv->bdrv_debug_remove_breakpoint) {
return bs->drv->bdrv_debug_remove_breakpoint(bs, tag);
}
... | false | qemu | 61007b316cd71ee7333ff7a0a749a8949527575f | int bdrv_debug_remove_breakpoint(BlockDriverState *bs, const char *tag)
{
while (bs && bs->drv && !bs->drv->bdrv_debug_remove_breakpoint) {
bs = bs->file;
}
if (bs && bs->drv && bs->drv->bdrv_debug_remove_breakpoint) {
return bs->drv->bdrv_debug_remove_breakpoint(bs, tag);
}
... | {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1)
{
while (VAR_0 && VAR_0->drv && !VAR_0->drv->FUNC_0) {
VAR_0 = VAR_0->file;
}
if (VAR_0 && VAR_0->drv && VAR_0->drv->FUNC_0) {
return VAR_0->drv->FUNC_0(VAR_0, VAR_1);
}
return -ENOTSUP;
}
| [
"int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1)\n{",
"while (VAR_0 && VAR_0->drv && !VAR_0->drv->FUNC_0) {",
"VAR_0 = VAR_0->file;",
"}",
"if (VAR_0 && VAR_0->drv && VAR_0->drv->FUNC_0) {",
"return VAR_0->drv->FUNC_0(VAR_0, VAR_1);",
"}",
"return -ENOTSUP;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
4,303 | int rtp_set_remote_url(URLContext *h, const char *uri)
{
RTPContext *s = h->priv_data;
char hostname[256];
int port;
char buf[1024];
char path[1024];
url_split(NULL, 0, hostname, sizeof(hostname), &port,
path, sizeof(path), uri);
snprintf(buf, sizeof(buf), "... | false | FFmpeg | 6ba5cbc699e77cae66bb719354fa142114b64eab | int rtp_set_remote_url(URLContext *h, const char *uri)
{
RTPContext *s = h->priv_data;
char hostname[256];
int port;
char buf[1024];
char path[1024];
url_split(NULL, 0, hostname, sizeof(hostname), &port,
path, sizeof(path), uri);
snprintf(buf, sizeof(buf), "... | {
"code": [],
"line_no": []
} | int FUNC_0(URLContext *VAR_0, const char *VAR_1)
{
RTPContext *s = VAR_0->priv_data;
char VAR_2[256];
int VAR_3;
char VAR_4[1024];
char VAR_5[1024];
url_split(NULL, 0, VAR_2, sizeof(VAR_2), &VAR_3,
VAR_5, sizeof(VAR_5), VAR_1);
snprintf(VAR_4, sizeof(VAR_4),... | [
"int FUNC_0(URLContext *VAR_0, const char *VAR_1)\n{",
"RTPContext *s = VAR_0->priv_data;",
"char VAR_2[256];",
"int VAR_3;",
"char VAR_4[1024];",
"char VAR_5[1024];",
"url_split(NULL, 0, VAR_2, sizeof(VAR_2), &VAR_3,\nVAR_5, sizeof(VAR_5), VAR_1);",
"snprintf(VAR_4, sizeof(VAR_4), \"udp:\nudp_set_rem... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19,
21
],
[
25,
27
],
[
31,
33
],
[
35
],
[
37
]
] |
4,304 | int vp78_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata, int jobnr,
int threadnr, int is_vp7)
{
VP8Context *s = avctx->priv_data;
VP8ThreadData *td = &s->thread_data[jobnr];
VP8ThreadData *next_td = NULL, *prev_td = NULL;
VP8Frame *curframe = s->curframe;
... | false | FFmpeg | 5098a6f6275a57f122cd8f03e7ffbe5dd090b8e0 | int vp78_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata, int jobnr,
int threadnr, int is_vp7)
{
VP8Context *s = avctx->priv_data;
VP8ThreadData *td = &s->thread_data[jobnr];
VP8ThreadData *next_td = NULL, *prev_td = NULL;
VP8Frame *curframe = s->curframe;
... | {
"code": [],
"line_no": []
} | int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int VAR_2,
int VAR_3, int VAR_4)
{
VP8Context *s = VAR_0->priv_data;
VP8ThreadData *td = &s->thread_data[VAR_2];
VP8ThreadData *next_td = NULL, *prev_td = NULL;
VP8Frame *curframe = s->curframe;
int VAR_5, VAR_6 = s-... | [
"int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int VAR_2,\nint VAR_3, int VAR_4)\n{",
"VP8Context *s = VAR_0->priv_data;",
"VP8ThreadData *td = &s->thread_data[VAR_2];",
"VP8ThreadData *next_td = NULL, *prev_td = NULL;",
"VP8Frame *curframe = s->curframe;",
"int VAR_5, VAR_6 = s->VAR_6;",
"int VAR_7;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33,
35
],
[
37,
39
],
[
41
],
[
45
],
[
47
],
[
51,... |
4,305 | const char *avfilter_configuration(void)
{
return FFMPEG_CONFIGURATION;
}
| false | FFmpeg | 29ba091136a5e04574f7bfc1b17536c923958f6f | const char *avfilter_configuration(void)
{
return FFMPEG_CONFIGURATION;
}
| {
"code": [],
"line_no": []
} | const char *FUNC_0(void)
{
return FFMPEG_CONFIGURATION;
}
| [
"const char *FUNC_0(void)\n{",
"return FFMPEG_CONFIGURATION;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
4,308 | static void uart_send_breaks(UartState *s)
{
int break_enabled = 1;
qemu_chr_fe_ioctl(s->chr, CHR_IOCTL_SERIAL_SET_BREAK,
&break_enabled);
}
| false | qemu | af52fe862fba686713044efdf9158195f84535ab | static void uart_send_breaks(UartState *s)
{
int break_enabled = 1;
qemu_chr_fe_ioctl(s->chr, CHR_IOCTL_SERIAL_SET_BREAK,
&break_enabled);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(UartState *VAR_0)
{
int VAR_1 = 1;
qemu_chr_fe_ioctl(VAR_0->chr, CHR_IOCTL_SERIAL_SET_BREAK,
&VAR_1);
}
| [
"static void FUNC_0(UartState *VAR_0)\n{",
"int VAR_1 = 1;",
"qemu_chr_fe_ioctl(VAR_0->chr, CHR_IOCTL_SERIAL_SET_BREAK,\n&VAR_1);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
]
] |
4,309 | static void cris_alu(DisasContext *dc, int op,
TCGv d, TCGv op_a, TCGv op_b, int size)
{
TCGv tmp;
int writeback;
writeback = 1;
if (op == CC_OP_BOUND || op == CC_OP_BTST)
tmp = tcg_temp_local_new(TCG_TYPE_TL);
if (op == CC_OP_CMP) {
tmp = tcg_temp_new(TCG_TYPE_TL);
writeback = 0;
... | false | qemu | a7812ae412311d7d47f8aa85656faadac9d64b56 | static void cris_alu(DisasContext *dc, int op,
TCGv d, TCGv op_a, TCGv op_b, int size)
{
TCGv tmp;
int writeback;
writeback = 1;
if (op == CC_OP_BOUND || op == CC_OP_BTST)
tmp = tcg_temp_local_new(TCG_TYPE_TL);
if (op == CC_OP_CMP) {
tmp = tcg_temp_new(TCG_TYPE_TL);
writeback = 0;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0, int VAR_1,
TCGv VAR_2, TCGv VAR_3, TCGv VAR_4, int VAR_5)
{
TCGv tmp;
int VAR_6;
VAR_6 = 1;
if (VAR_1 == CC_OP_BOUND || VAR_1 == CC_OP_BTST)
tmp = tcg_temp_local_new(TCG_TYPE_TL);
if (VAR_1 == CC_OP_CMP) {
tmp = tcg_temp_new(TCG_TYPE_TL);
VAR_... | [
"static void FUNC_0(DisasContext *VAR_0, int VAR_1,\nTCGv VAR_2, TCGv VAR_3, TCGv VAR_4, int VAR_5)\n{",
"TCGv tmp;",
"int VAR_6;",
"VAR_6 = 1;",
"if (VAR_1 == CC_OP_BOUND || VAR_1 == CC_OP_BTST)\ntmp = tcg_temp_local_new(TCG_TYPE_TL);",
"if (VAR_1 == CC_OP_CMP) {",
"tmp = tcg_temp_new(TCG_TYPE_TL);",
... | [
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
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
53
],
[
55,
57
],
[... |
4,310 | void ide_atapi_cmd_reply_end(IDEState *s)
{
int byte_count_limit, size, ret;
#ifdef DEBUG_IDE_ATAPI
printf("reply: tx_size=%d elem_tx_size=%d index=%d\n",
s->packet_transfer_size,
s->elementary_transfer_size,
s->io_buffer_index);
#endif
if (s->packet_transfer_size <... | false | qemu | d735b620b58f2fdfddc8e641e9feac3c9671a49d | void ide_atapi_cmd_reply_end(IDEState *s)
{
int byte_count_limit, size, ret;
#ifdef DEBUG_IDE_ATAPI
printf("reply: tx_size=%d elem_tx_size=%d index=%d\n",
s->packet_transfer_size,
s->elementary_transfer_size,
s->io_buffer_index);
#endif
if (s->packet_transfer_size <... | {
"code": [],
"line_no": []
} | void FUNC_0(IDEState *VAR_0)
{
int VAR_1, VAR_2, VAR_3;
#ifdef DEBUG_IDE_ATAPI
printf("reply: tx_size=%d elem_tx_size=%d index=%d\n",
VAR_0->packet_transfer_size,
VAR_0->elementary_transfer_size,
VAR_0->io_buffer_index);
#endif
if (VAR_0->packet_transfer_size <= 0) ... | [
"void FUNC_0(IDEState *VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3;",
"#ifdef DEBUG_IDE_ATAPI\nprintf(\"reply: tx_size=%d elem_tx_size=%d index=%d\\n\",\nVAR_0->packet_transfer_size,\nVAR_0->elementary_transfer_size,\nVAR_0->io_buffer_index);",
"#endif\nif (VAR_0->packet_transfer_size <= 0) {",
"VAR_0->status = RE... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9,
11,
13,
15
],
[
17,
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35,
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
4,311 | static int ehci_execute(EHCIQueue *q)
{
USBDevice *dev;
int ret;
int endp;
int devadr;
if ( !(q->qh.token & QTD_TOKEN_ACTIVE)) {
fprintf(stderr, "Attempting to execute inactive QH\n");
return USB_RET_PROCERR;
}
q->tbytes = (q->qh.token & QTD_TOKEN_TBYTES_MASK) >... | false | qemu | 079d0b7f1eedcc634c371fe05b617fdc55c8b762 | static int ehci_execute(EHCIQueue *q)
{
USBDevice *dev;
int ret;
int endp;
int devadr;
if ( !(q->qh.token & QTD_TOKEN_ACTIVE)) {
fprintf(stderr, "Attempting to execute inactive QH\n");
return USB_RET_PROCERR;
}
q->tbytes = (q->qh.token & QTD_TOKEN_TBYTES_MASK) >... | {
"code": [],
"line_no": []
} | static int FUNC_0(EHCIQueue *VAR_0)
{
USBDevice *dev;
int VAR_1;
int VAR_2;
int VAR_3;
if ( !(VAR_0->qh.token & QTD_TOKEN_ACTIVE)) {
fprintf(stderr, "Attempting to execute inactive QH\n");
return USB_RET_PROCERR;
}
VAR_0->tbytes = (VAR_0->qh.token & QTD_TOKEN_TB... | [
"static int FUNC_0(EHCIQueue *VAR_0)\n{",
"USBDevice *dev;",
"int VAR_1;",
"int VAR_2;",
"int VAR_3;",
"if ( !(VAR_0->qh.token & QTD_TOKEN_ACTIVE)) {",
"fprintf(stderr, \"Attempting to execute inactive QH\\n\");",
"return USB_RET_PROCERR;",
"}",
"VAR_0->tbytes = (VAR_0->qh.token & QTD_TOKEN_TBYTES... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
4,312 | static void sdl_resize(DisplayState *ds, int w, int h)
{
int flags;
// printf("resizing to %d %d\n", w, h);
flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;
flags |= SDL_RESIZABLE;
if (gui_fullscreen)
flags |= SDL_FULLSCREEN;
screen = SDL_SetVideoMode(w, h, 0, flags);
... | false | qemu | 1ff5c1a68e2784722b66ecc40e30908e87e28a3b | static void sdl_resize(DisplayState *ds, int w, int h)
{
int flags;
flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;
flags |= SDL_RESIZABLE;
if (gui_fullscreen)
flags |= SDL_FULLSCREEN;
screen = SDL_SetVideoMode(w, h, 0, flags);
if (!screen) {
fprintf(stderr, "... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisplayState *VAR_0, int VAR_1, int VAR_2)
{
int VAR_3;
VAR_3 = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;
VAR_3 |= SDL_RESIZABLE;
if (gui_fullscreen)
VAR_3 |= SDL_FULLSCREEN;
screen = SDL_SetVideoMode(VAR_1, VAR_2, 0, VAR_3);
if (!screen) {
fp... | [
"static void FUNC_0(DisplayState *VAR_0, int VAR_1, int VAR_2)\n{",
"int VAR_3;",
"VAR_3 = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;",
"VAR_3 |= SDL_RESIZABLE;",
"if (gui_fullscreen)\nVAR_3 |= SDL_FULLSCREEN;",
"screen = SDL_SetVideoMode(VAR_1, VAR_2, 0, VAR_3);",
"if (!screen) {",
"fprintf(stderr, \"C... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
4,313 | static uint64_t imx_avic_read(void *opaque,
target_phys_addr_t offset, unsigned size)
{
IMXAVICState *s = (IMXAVICState *)opaque;
DPRINTF("read(offset = 0x%x)\n", offset >> 2);
switch (offset >> 2) {
case 0: /* INTCNTL */
return s->intcntl;
case 1: ... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t imx_avic_read(void *opaque,
target_phys_addr_t offset, unsigned size)
{
IMXAVICState *s = (IMXAVICState *)opaque;
DPRINTF("read(offset = 0x%x)\n", offset >> 2);
switch (offset >> 2) {
case 0:
return s->intcntl;
case 1:
ret... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque,
target_phys_addr_t offset, unsigned size)
{
IMXAVICState *s = (IMXAVICState *)opaque;
DPRINTF("read(offset = 0x%x)\n", offset >> 2);
switch (offset >> 2) {
case 0:
return s->intcntl;
case 1:
return s->... | [
"static uint64_t FUNC_0(void *opaque,\ntarget_phys_addr_t offset, unsigned size)\n{",
"IMXAVICState *s = (IMXAVICState *)opaque;",
"DPRINTF(\"read(offset = 0x%x)\\n\", offset >> 2);",
"switch (offset >> 2) {",
"case 0:\nreturn s->intcntl;",
"case 1:\nreturn s->intmask;",
"case 2:\ncase 3:\nreturn 0;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
13
],
[
15
],
[
17,
19
],
[
23,
25
],
[
29,
31,
33
],
[
37,
39
],
[
43,
45
],
[
49,
51
],
[
55,
57
],
[
61,
63,
65,
67,
69,
71,
73,
75... |
4,314 | static enum CodecID find_codec_or_die(const char *name, enum AVMediaType type, int encoder)
{
const char *codec_string = encoder ? "encoder" : "decoder";
AVCodec *codec;
if(!name)
return CODEC_ID_NONE;
codec = encoder ?
avcodec_find_encoder_by_name(name) :
avcodec_find_... | false | FFmpeg | 1b648c7cdbee335c642bd2c05fe624fc195b85e6 | static enum CodecID find_codec_or_die(const char *name, enum AVMediaType type, int encoder)
{
const char *codec_string = encoder ? "encoder" : "decoder";
AVCodec *codec;
if(!name)
return CODEC_ID_NONE;
codec = encoder ?
avcodec_find_encoder_by_name(name) :
avcodec_find_... | {
"code": [],
"line_no": []
} | static enum CodecID FUNC_0(const char *VAR_0, enum AVMediaType VAR_1, int VAR_2)
{
const char *VAR_3 = VAR_2 ? "VAR_2" : "decoder";
AVCodec *codec;
if(!VAR_0)
return CODEC_ID_NONE;
codec = VAR_2 ?
avcodec_find_encoder_by_name(VAR_0) :
avcodec_find_decoder_by_name(VAR_0)... | [
"static enum CodecID FUNC_0(const char *VAR_0, enum AVMediaType VAR_1, int VAR_2)\n{",
"const char *VAR_3 = VAR_2 ? \"VAR_2\" : \"decoder\";",
"AVCodec *codec;",
"if(!VAR_0)\nreturn CODEC_ID_NONE;",
"codec = VAR_2 ?\navcodec_find_encoder_by_name(VAR_0) :\navcodec_find_decoder_by_name(VAR_0);",
"if(!codec)... | [
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
]
] |
4,316 | static void sd_blk_read(SDState *sd, uint64_t addr, uint32_t len)
{
uint64_t end = addr + len;
DPRINTF("sd_blk_read: addr = 0x%08llx, len = %d\n",
(unsigned long long) addr, len);
if (!sd->bdrv || bdrv_read(sd->bdrv, addr >> 9, sd->buf, 1) < 0) {
fprintf(stderr, "sd_blk_read: rea... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | static void sd_blk_read(SDState *sd, uint64_t addr, uint32_t len)
{
uint64_t end = addr + len;
DPRINTF("sd_blk_read: addr = 0x%08llx, len = %d\n",
(unsigned long long) addr, len);
if (!sd->bdrv || bdrv_read(sd->bdrv, addr >> 9, sd->buf, 1) < 0) {
fprintf(stderr, "sd_blk_read: rea... | {
"code": [],
"line_no": []
} | static void FUNC_0(SDState *VAR_0, uint64_t VAR_1, uint32_t VAR_2)
{
uint64_t end = VAR_1 + VAR_2;
DPRINTF("FUNC_0: VAR_1 = 0x%08llx, VAR_2 = %d\n",
(unsigned long long) VAR_1, VAR_2);
if (!VAR_0->bdrv || bdrv_read(VAR_0->bdrv, VAR_1 >> 9, VAR_0->buf, 1) < 0) {
fprintf(stderr, "F... | [
"static void FUNC_0(SDState *VAR_0, uint64_t VAR_1, uint32_t VAR_2)\n{",
"uint64_t end = VAR_1 + VAR_2;",
"DPRINTF(\"FUNC_0: VAR_1 = 0x%08llx, VAR_2 = %d\\n\",\n(unsigned long long) VAR_1, VAR_2);",
"if (!VAR_0->bdrv || bdrv_read(VAR_0->bdrv, VAR_1 >> 9, VAR_0->buf, 1) < 0) {",
"fprintf(stderr, \"FUNC_0: re... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
]
] |
4,317 | static void thumb_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu)
{
DisasContext *dc = container_of(dcbase, DisasContext, base);
CPUARMState *env = cpu->env_ptr;
uint32_t insn;
bool is_16bit;
if (arm_pre_translate_insn(dc)) {
return;
}
insn = arm_lduw_code(env... | false | qemu | 2eea841c11096e8dcc457b80e21f3fbdc32d2590 | static void thumb_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu)
{
DisasContext *dc = container_of(dcbase, DisasContext, base);
CPUARMState *env = cpu->env_ptr;
uint32_t insn;
bool is_16bit;
if (arm_pre_translate_insn(dc)) {
return;
}
insn = arm_lduw_code(env... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContextBase *VAR_0, CPUState *VAR_1)
{
DisasContext *dc = container_of(VAR_0, DisasContext, base);
CPUARMState *env = VAR_1->env_ptr;
uint32_t insn;
bool is_16bit;
if (arm_pre_translate_insn(dc)) {
return;
}
insn = arm_lduw_code(env, dc->pc, dc->s... | [
"static void FUNC_0(DisasContextBase *VAR_0, CPUState *VAR_1)\n{",
"DisasContext *dc = container_of(VAR_0, DisasContext, base);",
"CPUARMState *env = VAR_1->env_ptr;",
"uint32_t insn;",
"bool is_16bit;",
"if (arm_pre_translate_insn(dc)) {",
"return;",
"}",
"insn = arm_lduw_code(env, dc->pc, dc->sctl... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
51
... |
4,319 | void qemu_set_dfilter_ranges(const char *filter_spec, Error **errp)
{
gchar **ranges = g_strsplit(filter_spec, ",", 0);
int i;
if (debug_regions) {
g_array_unref(debug_regions);
debug_regions = NULL;
}
debug_regions = g_array_sized_new(FALSE, FALSE,
... | false | qemu | a0efbf16604770b9d805bcf210ec29942321134f | void qemu_set_dfilter_ranges(const char *filter_spec, Error **errp)
{
gchar **ranges = g_strsplit(filter_spec, ",", 0);
int i;
if (debug_regions) {
g_array_unref(debug_regions);
debug_regions = NULL;
}
debug_regions = g_array_sized_new(FALSE, FALSE,
... | {
"code": [],
"line_no": []
} | void FUNC_0(const char *VAR_0, Error **VAR_1)
{
gchar **ranges = g_strsplit(VAR_0, ",", 0);
int VAR_2;
if (debug_regions) {
g_array_unref(debug_regions);
debug_regions = NULL;
}
debug_regions = g_array_sized_new(FALSE, FALSE,
sizeof(... | [
"void FUNC_0(const char *VAR_0, Error **VAR_1)\n{",
"gchar **ranges = g_strsplit(VAR_0, \",\", 0);",
"int VAR_2;",
"if (debug_regions) {",
"g_array_unref(debug_regions);",
"debug_regions = NULL;",
"}",
"debug_regions = g_array_sized_new(FALSE, FALSE,\nsizeof(Range), g_strv_length(ranges));",
"for (V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
... |
4,320 | static void disas_arm_insn(CPUState * env, DisasContext *s)
{
unsigned int cond, insn, val, op1, i, shift, rm, rs, rn, rd, sh;
TCGv tmp;
TCGv tmp2;
TCGv tmp3;
TCGv addr;
TCGv_i64 tmp64;
insn = ldl_code(s->pc);
s->pc += 4;
/* M variants do not implement ARM mode. */
... | false | qemu | be5e7a76010bd14d09f74504ed6368782e701888 | static void disas_arm_insn(CPUState * env, DisasContext *s)
{
unsigned int cond, insn, val, op1, i, shift, rm, rs, rn, rd, sh;
TCGv tmp;
TCGv tmp2;
TCGv tmp3;
TCGv addr;
TCGv_i64 tmp64;
insn = ldl_code(s->pc);
s->pc += 4;
if (IS_M(env))
goto illegal_op;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(CPUState * VAR_0, DisasContext *VAR_1)
{
unsigned int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12;
TCGv tmp;
TCGv tmp2;
TCGv tmp3;
TCGv addr;
TCGv_i64 tmp64;
VAR_3 = ldl_code(VAR_1->pc);
VAR_1->pc += 4;
if (IS_... | [
"static void FUNC_0(CPUState * VAR_0, DisasContext *VAR_1)\n{",
"unsigned int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12;",
"TCGv tmp;",
"TCGv tmp2;",
"TCGv tmp3;",
"TCGv addr;",
"TCGv_i64 tmp64;",
"VAR_3 = ldl_code(VAR_1->pc);",
"VAR_1->pc += 4;",
"if (IS_M(VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
27,
29
],
[
31
],
[
33
],
[
37
],
[
41,
43
],
[
47,
49
],
[
51
],
[
53
],
[
55
],
[... |
4,322 | static int ppc_hash64_translate(CPUPPCState *env, struct mmu_ctx_hash64 *ctx,
target_ulong eaddr, int rwx)
{
int ret;
ppc_slb_t *slb;
hwaddr pte_offset;
ppc_hash_pte64_t pte;
int target_page_bits;
assert((rwx == 0) || (rwx == 1) || (rwx == 2));
/*... | false | qemu | e01b444523e2b0c663b42b3e8f44ef48a6153051 | static int ppc_hash64_translate(CPUPPCState *env, struct mmu_ctx_hash64 *ctx,
target_ulong eaddr, int rwx)
{
int ret;
ppc_slb_t *slb;
hwaddr pte_offset;
ppc_hash_pte64_t pte;
int target_page_bits;
assert((rwx == 0) || (rwx == 1) || (rwx == 2));
... | {
"code": [],
"line_no": []
} | static int FUNC_0(CPUPPCState *VAR_0, struct mmu_ctx_hash64 *VAR_1,
target_ulong VAR_2, int VAR_3)
{
int VAR_4;
ppc_slb_t *slb;
hwaddr pte_offset;
ppc_hash_pte64_t pte;
int VAR_5;
assert((VAR_3 == 0) || (VAR_3 == 1) || (VAR_3 == 2));
if (((V... | [
"static int FUNC_0(CPUPPCState *VAR_0, struct mmu_ctx_hash64 *VAR_1,\ntarget_ulong VAR_2, int VAR_3)\n{",
"int VAR_4;",
"ppc_slb_t *slb;",
"hwaddr pte_offset;",
"ppc_hash_pte64_t pte;",
"int VAR_5;",
"assert((VAR_3 == 0) || (VAR_3 == 1) || (VAR_3 == 2));",
"if (((VAR_3 == 2) && (msr_ir == 0)) || ((VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
25
],
[
31
],
[
33
],
[
35
],
[
37
],
[
43
],
[
47
],
[
49
],
[
51
],
[
57
],
[
59
],
[
61
],
[... |
4,323 | void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,
ISADevice **rtc_state,
ISADevice **floppy,
bool no_vmport)
{
int i;
DriveInfo *fd[MAX_FD];
DeviceState *hpet = NULL;
int pit_isa_irq = 0;
qemu_irq pit_alt_... | false | qemu | c2d8d311c18b13c5282ab7d7b2ae57e3dd1e7f7d | void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,
ISADevice **rtc_state,
ISADevice **floppy,
bool no_vmport)
{
int i;
DriveInfo *fd[MAX_FD];
DeviceState *hpet = NULL;
int pit_isa_irq = 0;
qemu_irq pit_alt_... | {
"code": [],
"line_no": []
} | void FUNC_0(ISABus *VAR_0, qemu_irq *VAR_1,
ISADevice **VAR_2,
ISADevice **VAR_3,
bool VAR_4)
{
int VAR_5;
DriveInfo *fd[MAX_FD];
DeviceState *hpet = NULL;
int VAR_6 = 0;
qemu_irq pit_alt_irq = NULL;
qemu_irq... | [
"void FUNC_0(ISABus *VAR_0, qemu_irq *VAR_1,\nISADevice **VAR_2,\nISADevice **VAR_3,\nbool VAR_4)\n{",
"int VAR_5;",
"DriveInfo *fd[MAX_FD];",
"DeviceState *hpet = NULL;",
"int VAR_6 = 0;",
"qemu_irq pit_alt_irq = NULL;",
"qemu_irq rtc_irq = NULL;",
"qemu_irq *a20_line;",
"ISADevice *i8042, *port92,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
35
],
[
51
],
[
53
],
[
57
],
[
59
],
[
61
],
[
63
],
[... |
4,324 | void stream_start(BlockDriverState *bs, BlockDriverState *base,
const char *base_id, BlockDriverCompletionFunc *cb,
void *opaque, Error **errp)
{
StreamBlockJob *s;
Coroutine *co;
s = block_job_create(&stream_job_type, bs, cb, opaque, errp);
if (!s) {
... | false | qemu | c83c66c3b58893a4dc056e272822beb88fe9ec7f | void stream_start(BlockDriverState *bs, BlockDriverState *base,
const char *base_id, BlockDriverCompletionFunc *cb,
void *opaque, Error **errp)
{
StreamBlockJob *s;
Coroutine *co;
s = block_job_create(&stream_job_type, bs, cb, opaque, errp);
if (!s) {
... | {
"code": [],
"line_no": []
} | void FUNC_0(BlockDriverState *VAR_0, BlockDriverState *VAR_1,
const char *VAR_2, BlockDriverCompletionFunc *VAR_3,
void *VAR_4, Error **VAR_5)
{
StreamBlockJob *s;
Coroutine *co;
s = block_job_create(&stream_job_type, VAR_0, VAR_3, VAR_4, VAR_5);
if (!s) {
... | [
"void FUNC_0(BlockDriverState *VAR_0, BlockDriverState *VAR_1,\nconst char *VAR_2, BlockDriverCompletionFunc *VAR_3,\nvoid *VAR_4, Error **VAR_5)\n{",
"StreamBlockJob *s;",
"Coroutine *co;",
"s = block_job_create(&stream_job_type, VAR_0, VAR_3, VAR_4, VAR_5);",
"if (!s) {",
"return;",
"}",
"s->VAR_1 =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
4,325 | static int decode_subframe(WMAProDecodeCtx *s)
{
int offset = s->samples_per_frame;
int subframe_len = s->samples_per_frame;
int i;
int total_samples = s->samples_per_frame * s->num_channels;
int transmit_coeffs = 0;
int cur_subwoofer_cutoff;
s->subframe_offset = get_bits_count(&... | false | FFmpeg | 97a5addfcf0029d0f5538ed70cb38cae4108a618 | static int decode_subframe(WMAProDecodeCtx *s)
{
int offset = s->samples_per_frame;
int subframe_len = s->samples_per_frame;
int i;
int total_samples = s->samples_per_frame * s->num_channels;
int transmit_coeffs = 0;
int cur_subwoofer_cutoff;
s->subframe_offset = get_bits_count(&... | {
"code": [],
"line_no": []
} | static int FUNC_0(WMAProDecodeCtx *VAR_0)
{
int VAR_1 = VAR_0->samples_per_frame;
int VAR_2 = VAR_0->samples_per_frame;
int VAR_3;
int VAR_4 = VAR_0->samples_per_frame * VAR_0->num_channels;
int VAR_5 = 0;
int VAR_6;
VAR_0->subframe_offset = get_bits_count(&VAR_0->gb);
... | [
"static int FUNC_0(WMAProDecodeCtx *VAR_0)\n{",
"int VAR_1 = VAR_0->samples_per_frame;",
"int VAR_2 = VAR_0->samples_per_frame;",
"int VAR_3;",
"int VAR_4 = VAR_0->samples_per_frame * VAR_0->num_channels;",
"int VAR_5 = 0;",
"int VAR_6;",
"VAR_0->subframe_offset = get_bits_count(&VAR_0->gb);",
"fo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
49,
51
],
[
57
],
[
59
],
[
61
... |
4,326 | int kvm_vm_ioctl(KVMState *s, int type, ...)
{
int ret;
void *arg;
va_list ap;
va_start(ap, type);
arg = va_arg(ap, void *);
va_end(ap);
ret = ioctl(s->vmfd, type, arg);
if (ret == -1)
ret = -errno;
return ret;
}
| false | qemu | a426e122173f36f05ea2cb72dcff77b7408546ce | int kvm_vm_ioctl(KVMState *s, int type, ...)
{
int ret;
void *arg;
va_list ap;
va_start(ap, type);
arg = va_arg(ap, void *);
va_end(ap);
ret = ioctl(s->vmfd, type, arg);
if (ret == -1)
ret = -errno;
return ret;
}
| {
"code": [],
"line_no": []
} | int FUNC_0(KVMState *VAR_0, int VAR_1, ...)
{
int VAR_2;
void *VAR_3;
va_list ap;
va_start(ap, VAR_1);
VAR_3 = va_arg(ap, void *);
va_end(ap);
VAR_2 = ioctl(VAR_0->vmfd, VAR_1, VAR_3);
if (VAR_2 == -1)
VAR_2 = -errno;
return VAR_2;
}
| [
"int FUNC_0(KVMState *VAR_0, int VAR_1, ...)\n{",
"int VAR_2;",
"void *VAR_3;",
"va_list ap;",
"va_start(ap, VAR_1);",
"VAR_3 = va_arg(ap, void *);",
"va_end(ap);",
"VAR_2 = ioctl(VAR_0->vmfd, VAR_1, VAR_3);",
"if (VAR_2 == -1)\nVAR_2 = -errno;",
"return VAR_2;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23,
25
],
[
29
],
[
31
]
] |
4,327 | void kqemu_cpu_interrupt(CPUState *env)
{
#if defined(_WIN32)
/* cancelling the I/O request causes KQEMU to finish executing the
current block and successfully returning. */
CancelIo(kqemu_fd);
#endif
}
| false | qemu | 4a1418e07bdcfaa3177739e04707ecaec75d89e1 | void kqemu_cpu_interrupt(CPUState *env)
{
#if defined(_WIN32)
CancelIo(kqemu_fd);
#endif
}
| {
"code": [],
"line_no": []
} | void FUNC_0(CPUState *VAR_0)
{
#if defined(_WIN32)
CancelIo(kqemu_fd);
#endif
}
| [
"void FUNC_0(CPUState *VAR_0)\n{",
"#if defined(_WIN32)\nCancelIo(kqemu_fd);",
"#endif\n}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5,
11
],
[
13,
15
]
] |
4,328 | target_ulong helper_cfc1(CPUMIPSState *env, uint32_t reg)
{
target_ulong arg1;
switch (reg) {
case 0:
arg1 = (int32_t)env->active_fpu.fcr0;
break;
case 25:
arg1 = ((env->active_fpu.fcr31 >> 24) & 0xfe) | ((env->active_fpu.fcr31 >> 23) & 0x1);
break;
case 2... | false | qemu | 736d120af4bf5f3e13b2f90c464b3a24847f78f0 | target_ulong helper_cfc1(CPUMIPSState *env, uint32_t reg)
{
target_ulong arg1;
switch (reg) {
case 0:
arg1 = (int32_t)env->active_fpu.fcr0;
break;
case 25:
arg1 = ((env->active_fpu.fcr31 >> 24) & 0xfe) | ((env->active_fpu.fcr31 >> 23) & 0x1);
break;
case 2... | {
"code": [],
"line_no": []
} | target_ulong FUNC_0(CPUMIPSState *env, uint32_t reg)
{
target_ulong arg1;
switch (reg) {
case 0:
arg1 = (int32_t)env->active_fpu.fcr0;
break;
case 25:
arg1 = ((env->active_fpu.fcr31 >> 24) & 0xfe) | ((env->active_fpu.fcr31 >> 23) & 0x1);
break;
case 26:
... | [
"target_ulong FUNC_0(CPUMIPSState *env, uint32_t reg)\n{",
"target_ulong arg1;",
"switch (reg) {",
"case 0:\narg1 = (int32_t)env->active_fpu.fcr0;",
"break;",
"case 25:\narg1 = ((env->active_fpu.fcr31 >> 24) & 0xfe) | ((env->active_fpu.fcr31 >> 23) & 0x1);",
"break;",
"case 26:\narg1 = env->active_fpu... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
45
],
[
47
]
] |
4,329 | static void setup_frame(int sig, struct target_sigaction *ka,
target_sigset_t *set, CPUSH4State *regs)
{
struct target_sigframe *frame;
abi_ulong frame_addr;
int i;
int err = 0;
int signal;
frame_addr = get_sigframe(ka, regs->gregs[15], sizeof(*frame));
if ... | false | qemu | 41ecc72ba5932381208e151bf2d2149a0342beff | static void setup_frame(int sig, struct target_sigaction *ka,
target_sigset_t *set, CPUSH4State *regs)
{
struct target_sigframe *frame;
abi_ulong frame_addr;
int i;
int err = 0;
int signal;
frame_addr = get_sigframe(ka, regs->gregs[15], sizeof(*frame));
if ... | {
"code": [],
"line_no": []
} | static void FUNC_0(int VAR_0, struct target_sigaction *VAR_1,
target_sigset_t *VAR_2, CPUSH4State *VAR_3)
{
struct target_sigframe *VAR_4;
abi_ulong frame_addr;
int VAR_5;
int VAR_6 = 0;
int VAR_7;
frame_addr = get_sigframe(VAR_1, VAR_3->gregs[15], sizeof(*VAR_4... | [
"static void FUNC_0(int VAR_0, struct target_sigaction *VAR_1,\ntarget_sigset_t *VAR_2, CPUSH4State *VAR_3)\n{",
"struct target_sigframe *VAR_4;",
"abi_ulong frame_addr;",
"int VAR_5;",
"int VAR_6 = 0;",
"int VAR_7;",
"frame_addr = get_sigframe(VAR_1, VAR_3->gregs[15], sizeof(*VAR_4));",
"if (!lock_us... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
47
],
[
49
],
[
51
],
[
55
],
[
57
],
[
59
... |
4,330 | static int qcow_open(BlockDriverState *bs, const char *filename, int flags)
{
BDRVQcowState *s = bs->opaque;
int len, i, shift, ret;
QCowHeader header;
uint64_t ext_end;
ret = bdrv_file_open(&s->hd, filename, flags);
if (ret < 0)
return ret;
if (bdrv_pread(s->hd, 0, &heade... | false | qemu | 72cf2d4f0e181d0d3a3122e04129c58a95da713e | static int qcow_open(BlockDriverState *bs, const char *filename, int flags)
{
BDRVQcowState *s = bs->opaque;
int len, i, shift, ret;
QCowHeader header;
uint64_t ext_end;
ret = bdrv_file_open(&s->hd, filename, flags);
if (ret < 0)
return ret;
if (bdrv_pread(s->hd, 0, &heade... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1, int VAR_2)
{
BDRVQcowState *s = VAR_0->opaque;
int VAR_3, VAR_4, VAR_5, VAR_6;
QCowHeader header;
uint64_t ext_end;
VAR_6 = bdrv_file_open(&s->hd, VAR_1, VAR_2);
if (VAR_6 < 0)
return VAR_6;
if (bdrv_pread(s->hd... | [
"static int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1, int VAR_2)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"int VAR_3, VAR_4, VAR_5, VAR_6;",
"QCowHeader header;",
"uint64_t ext_end;",
"VAR_6 = bdrv_file_open(&s->hd, VAR_1, VAR_2);",
"if (VAR_6 < 0)\nreturn VAR_6;",
"if (bdrv_pread(s->hd, 0, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
... |
4,331 | static void get_enum(Object *obj, Visitor *v, void *opaque,
const char *name, Error **errp)
{
DeviceState *dev = DEVICE(obj);
Property *prop = opaque;
int *ptr = qdev_get_prop_ptr(dev, prop);
visit_type_enum(v, ptr, prop->info->enum_table,
prop->info->na... | false | qemu | d4d34b0d3f5af5c8e09980da0de2eebe9a27dc71 | static void get_enum(Object *obj, Visitor *v, void *opaque,
const char *name, Error **errp)
{
DeviceState *dev = DEVICE(obj);
Property *prop = opaque;
int *ptr = qdev_get_prop_ptr(dev, prop);
visit_type_enum(v, ptr, prop->info->enum_table,
prop->info->na... | {
"code": [],
"line_no": []
} | static void FUNC_0(Object *VAR_0, Visitor *VAR_1, void *VAR_2,
const char *VAR_3, Error **VAR_4)
{
DeviceState *dev = DEVICE(VAR_0);
Property *prop = VAR_2;
int *VAR_5 = qdev_get_prop_ptr(dev, prop);
visit_type_enum(VAR_1, VAR_5, prop->info->enum_table,
... | [
"static void FUNC_0(Object *VAR_0, Visitor *VAR_1, void *VAR_2,\nconst char *VAR_3, Error **VAR_4)\n{",
"DeviceState *dev = DEVICE(VAR_0);",
"Property *prop = VAR_2;",
"int *VAR_5 = qdev_get_prop_ptr(dev, prop);",
"visit_type_enum(VAR_1, VAR_5, prop->info->enum_table,\nprop->info->VAR_3, prop->VAR_3, VAR_4)... | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
19
]
] |
4,332 | QapiDeallocVisitor *qapi_dealloc_visitor_new(void)
{
QapiDeallocVisitor *v;
v = g_malloc0(sizeof(*v));
v->visitor.type = VISITOR_DEALLOC;
v->visitor.start_struct = qapi_dealloc_start_struct;
v->visitor.end_struct = qapi_dealloc_end_struct;
v->visitor.start_alternate = qapi_dealloc_sta... | false | qemu | 2c0ef9f411ae6081efa9eca5b3eab2dbeee45a6c | QapiDeallocVisitor *qapi_dealloc_visitor_new(void)
{
QapiDeallocVisitor *v;
v = g_malloc0(sizeof(*v));
v->visitor.type = VISITOR_DEALLOC;
v->visitor.start_struct = qapi_dealloc_start_struct;
v->visitor.end_struct = qapi_dealloc_end_struct;
v->visitor.start_alternate = qapi_dealloc_sta... | {
"code": [],
"line_no": []
} | QapiDeallocVisitor *FUNC_0(void)
{
QapiDeallocVisitor *v;
v = g_malloc0(sizeof(*v));
v->visitor.type = VISITOR_DEALLOC;
v->visitor.start_struct = qapi_dealloc_start_struct;
v->visitor.end_struct = qapi_dealloc_end_struct;
v->visitor.start_alternate = qapi_dealloc_start_alternate;
... | [
"QapiDeallocVisitor *FUNC_0(void)\n{",
"QapiDeallocVisitor *v;",
"v = g_malloc0(sizeof(*v));",
"v->visitor.type = VISITOR_DEALLOC;",
"v->visitor.start_struct = qapi_dealloc_start_struct;",
"v->visitor.end_struct = qapi_dealloc_end_struct;",
"v->visitor.start_alternate = qapi_dealloc_start_alternate;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47... |
4,333 | static uint32_t dp8393x_readb(void *opaque, target_phys_addr_t addr)
{
uint16_t v = dp8393x_readw(opaque, addr & ~0x1);
return (v >> (8 * (addr & 0x1))) & 0xff;
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint32_t dp8393x_readb(void *opaque, target_phys_addr_t addr)
{
uint16_t v = dp8393x_readw(opaque, addr & ~0x1);
return (v >> (8 * (addr & 0x1))) & 0xff;
}
| {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(void *opaque, target_phys_addr_t addr)
{
uint16_t v = dp8393x_readw(opaque, addr & ~0x1);
return (v >> (8 * (addr & 0x1))) & 0xff;
}
| [
"static uint32_t FUNC_0(void *opaque, target_phys_addr_t addr)\n{",
"uint16_t v = dp8393x_readw(opaque, addr & ~0x1);",
"return (v >> (8 * (addr & 0x1))) & 0xff;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
4,334 | int tcg_global_mem_new_internal(TCGType type, TCGv_ptr base,
intptr_t offset, const char *name)
{
TCGContext *s = &tcg_ctx;
TCGTemp *ts, *base_ts = &s->temps[GET_TCGV_PTR(base)];
int idx, reg = base_ts->reg;
idx = s->nb_globals;
#if TCG_TARGET_REG_BITS == 32
... | false | qemu | b3a62939561e07bc34493444fa926b6137cba4e8 | int tcg_global_mem_new_internal(TCGType type, TCGv_ptr base,
intptr_t offset, const char *name)
{
TCGContext *s = &tcg_ctx;
TCGTemp *ts, *base_ts = &s->temps[GET_TCGV_PTR(base)];
int idx, reg = base_ts->reg;
idx = s->nb_globals;
#if TCG_TARGET_REG_BITS == 32
... | {
"code": [],
"line_no": []
} | int FUNC_0(TCGType VAR_0, TCGv_ptr VAR_1,
intptr_t VAR_2, const char *VAR_3)
{
TCGContext *s = &tcg_ctx;
TCGTemp *ts, *base_ts = &s->temps[GET_TCGV_PTR(VAR_1)];
int VAR_4, VAR_5 = base_ts->VAR_5;
VAR_4 = s->nb_globals;
#if TCG_TARGET_REG_BITS == 32
if (VAR_0... | [
"int FUNC_0(TCGType VAR_0, TCGv_ptr VAR_1,\nintptr_t VAR_2, const char *VAR_3)\n{",
"TCGContext *s = &tcg_ctx;",
"TCGTemp *ts, *base_ts = &s->temps[GET_TCGV_PTR(VAR_1)];",
"int VAR_4, VAR_5 = base_ts->VAR_5;",
"VAR_4 = s->nb_globals;",
"#if TCG_TARGET_REG_BITS == 32\nif (VAR_0 == TCG_TYPE_I64) {",
"char... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[... |
4,335 | hwaddr sparc_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
{
SPARCCPU *cpu = SPARC_CPU(cs);
CPUSPARCState *env = &cpu->env;
hwaddr phys_addr;
int mmu_idx = cpu_mmu_index(env, false);
MemoryRegionSection section;
if (cpu_sparc_get_phys_page(env, &phys_addr, addr, 2, mmu_idx) != 0) {
... | false | qemu | 7e450a8f50ac12fc8f69b6ce555254c84efcf407 | hwaddr sparc_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
{
SPARCCPU *cpu = SPARC_CPU(cs);
CPUSPARCState *env = &cpu->env;
hwaddr phys_addr;
int mmu_idx = cpu_mmu_index(env, false);
MemoryRegionSection section;
if (cpu_sparc_get_phys_page(env, &phys_addr, addr, 2, mmu_idx) != 0) {
... | {
"code": [],
"line_no": []
} | hwaddr FUNC_0(CPUState *cs, vaddr addr)
{
SPARCCPU *cpu = SPARC_CPU(cs);
CPUSPARCState *env = &cpu->env;
hwaddr phys_addr;
int VAR_0 = cpu_mmu_index(env, false);
MemoryRegionSection section;
if (cpu_sparc_get_phys_page(env, &phys_addr, addr, 2, VAR_0) != 0) {
if (cpu_sparc_get_... | [
"hwaddr FUNC_0(CPUState *cs, vaddr addr)\n{",
"SPARCCPU *cpu = SPARC_CPU(cs);",
"CPUSPARCState *env = &cpu->env;",
"hwaddr phys_addr;",
"int VAR_0 = cpu_mmu_index(env, false);",
"MemoryRegionSection section;",
"if (cpu_sparc_get_phys_page(env, &phys_addr, addr, 2, VAR_0) != 0) {",
"if (cpu_sparc_get_p... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
4,338 | int qed_read_l2_table(BDRVQEDState *s, QEDRequest *request, uint64_t offset)
{
int ret;
qed_unref_l2_cache_entry(request->l2_table);
/* Check for cached L2 entry */
request->l2_table = qed_find_l2_cache_entry(&s->l2_cache, offset);
if (request->l2_table) {
return 0;
}
... | false | qemu | 1f01e50b8330c24714ddca5841fdbb703076b121 | int qed_read_l2_table(BDRVQEDState *s, QEDRequest *request, uint64_t offset)
{
int ret;
qed_unref_l2_cache_entry(request->l2_table);
request->l2_table = qed_find_l2_cache_entry(&s->l2_cache, offset);
if (request->l2_table) {
return 0;
}
request->l2_table = qed_alloc_l... | {
"code": [],
"line_no": []
} | int FUNC_0(BDRVQEDState *VAR_0, QEDRequest *VAR_1, uint64_t VAR_2)
{
int VAR_3;
qed_unref_l2_cache_entry(VAR_1->l2_table);
VAR_1->l2_table = qed_find_l2_cache_entry(&VAR_0->l2_cache, VAR_2);
if (VAR_1->l2_table) {
return 0;
}
VAR_1->l2_table = qed_alloc_l2_cache_entry... | [
"int FUNC_0(BDRVQEDState *VAR_0, QEDRequest *VAR_1, uint64_t VAR_2)\n{",
"int VAR_3;",
"qed_unref_l2_cache_entry(VAR_1->l2_table);",
"VAR_1->l2_table = qed_find_l2_cache_entry(&VAR_0->l2_cache, VAR_2);",
"if (VAR_1->l2_table) {",
"return 0;",
"}",
"VAR_1->l2_table = qed_alloc_l2_cache_entry(&VAR_0->l2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
63
],
[
65... |
4,339 | static int audio_pcm_info_eq (struct audio_pcm_info *info, audsettings_t *as)
{
int bits = 8, sign = 0;
switch (as->fmt) {
case AUD_FMT_S8:
sign = 1;
case AUD_FMT_U8:
break;
case AUD_FMT_S16:
sign = 1;
case AUD_FMT_U16:
bits = 16;
break;
... | false | qemu | 1ea879e5580f63414693655fcf0328559cdce138 | static int audio_pcm_info_eq (struct audio_pcm_info *info, audsettings_t *as)
{
int bits = 8, sign = 0;
switch (as->fmt) {
case AUD_FMT_S8:
sign = 1;
case AUD_FMT_U8:
break;
case AUD_FMT_S16:
sign = 1;
case AUD_FMT_U16:
bits = 16;
break;
... | {
"code": [],
"line_no": []
} | static int FUNC_0 (struct audio_pcm_info *VAR_0, audsettings_t *VAR_1)
{
int VAR_2 = 8, VAR_3 = 0;
switch (VAR_1->fmt) {
case AUD_FMT_S8:
VAR_3 = 1;
case AUD_FMT_U8:
break;
case AUD_FMT_S16:
VAR_3 = 1;
case AUD_FMT_U16:
VAR_2 = 16;
break;
... | [
"static int FUNC_0 (struct audio_pcm_info *VAR_0, audsettings_t *VAR_1)\n{",
"int VAR_2 = 8, VAR_3 = 0;",
"switch (VAR_1->fmt) {",
"case AUD_FMT_S8:\nVAR_3 = 1;",
"case AUD_FMT_U8:\nbreak;",
"case AUD_FMT_S16:\nVAR_3 = 1;",
"case AUD_FMT_U16:\nVAR_2 = 16;",
"break;",
"case AUD_FMT_S32:\nVAR_3 = 1;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15,
17
],
[
21,
23
],
[
25,
27
],
[
29
],
[
33,
35
],
[
37,
39
],
[
41
],
[
43
],
[
45,
47,
49,
51,
53
],
[
55
]
] |
4,340 | static int parse_adaptation_sets(AVFormatContext *s)
{
WebMDashMuxContext *w = s->priv_data;
char *p = w->adaptation_sets;
char *q;
enum { new_set, parsed_id, parsing_streams } state;
// syntax id=0,streams=0,1,2 id=1,streams=3,4 and so on
state = new_set;
while (p < w->adaptation_se... | false | FFmpeg | 72732f2dddabae1d943ce617e0a27e32d13416fb | static int parse_adaptation_sets(AVFormatContext *s)
{
WebMDashMuxContext *w = s->priv_data;
char *p = w->adaptation_sets;
char *q;
enum { new_set, parsed_id, parsing_streams } state;
state = new_set;
while (p < w->adaptation_sets + strlen(w->adaptation_sets)) {
if (*p == '... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
WebMDashMuxContext *w = VAR_0->priv_data;
char *VAR_1 = w->adaptation_sets;
char *VAR_2;
enum { new_set, parsed_id, parsing_streams } VAR_3;
VAR_3 = new_set;
while (VAR_1 < w->adaptation_sets + strlen(w->adaptation_sets)) {
if (*V... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"WebMDashMuxContext *w = VAR_0->priv_data;",
"char *VAR_1 = w->adaptation_sets;",
"char *VAR_2;",
"enum { new_set, parsed_id, parsing_streams } VAR_3;",
"VAR_3 = new_set;",
"while (VAR_1 < w->adaptation_sets + strlen(w->adaptation_sets)) {",
"if (*VAR_1 ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
4,342 | static int filter_frame(AVFilterLink *link, AVFrame *picref)
{
AVFilterContext *ctx = link->dst;
IDETContext *idet = ctx->priv;
if (idet->prev)
av_frame_free(&idet->prev);
idet->prev = idet->cur;
idet->cur = idet->next;
idet->next = picref;
if (!idet->cur)
retu... | false | FFmpeg | dd5d61795690e339ae271692e7ab9df66b5eb153 | static int filter_frame(AVFilterLink *link, AVFrame *picref)
{
AVFilterContext *ctx = link->dst;
IDETContext *idet = ctx->priv;
if (idet->prev)
av_frame_free(&idet->prev);
idet->prev = idet->cur;
idet->cur = idet->next;
idet->next = picref;
if (!idet->cur)
retu... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFilterLink *VAR_0, AVFrame *VAR_1)
{
AVFilterContext *ctx = VAR_0->dst;
IDETContext *idet = ctx->priv;
if (idet->prev)
av_frame_free(&idet->prev);
idet->prev = idet->cur;
idet->cur = idet->next;
idet->next = VAR_1;
if (!idet->cur)
return 0;
... | [
"static int FUNC_0(AVFilterLink *VAR_0, AVFrame *VAR_1)\n{",
"AVFilterContext *ctx = VAR_0->dst;",
"IDETContext *idet = ctx->priv;",
"if (idet->prev)\nav_frame_free(&idet->prev);",
"idet->prev = idet->cur;",
"idet->cur = idet->next;",
"idet->next = VAR_1;",
"if (!idet->cur)\nreturn 0;",
"if (!idet-... | [
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
],
[
23,
25
],
[
29,
31
],
[
35,
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
51
],
[
55
],
[
57
]
] |
4,345 | void ff_dsputil_init_arm(DSPContext* c, AVCodecContext *avctx)
{
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
int cpu_flags = av_get_cpu_flags();
ff_put_pixels_clamped = c->put_pixels_clamped;
ff_add_pixels_clamped = c->add_pixels_clamped;
if (avctx->bits_per_raw_sample <= 8)... | false | FFmpeg | 70d54392f5015b9c6594fcae558f59f952501e3b | void ff_dsputil_init_arm(DSPContext* c, AVCodecContext *avctx)
{
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
int cpu_flags = av_get_cpu_flags();
ff_put_pixels_clamped = c->put_pixels_clamped;
ff_add_pixels_clamped = c->add_pixels_clamped;
if (avctx->bits_per_raw_sample <= 8)... | {
"code": [],
"line_no": []
} | void FUNC_0(DSPContext* VAR_0, AVCodecContext *VAR_1)
{
const int VAR_2 = VAR_1->bits_per_raw_sample > 8;
int VAR_3 = av_get_cpu_flags();
ff_put_pixels_clamped = VAR_0->put_pixels_clamped;
ff_add_pixels_clamped = VAR_0->add_pixels_clamped;
if (VAR_1->bits_per_raw_sample <= 8) {
if... | [
"void FUNC_0(DSPContext* VAR_0, AVCodecContext *VAR_1)\n{",
"const int VAR_2 = VAR_1->bits_per_raw_sample > 8;",
"int VAR_3 = av_get_cpu_flags();",
"ff_put_pixels_clamped = VAR_0->put_pixels_clamped;",
"ff_add_pixels_clamped = VAR_0->add_pixels_clamped;",
"if (VAR_1->bits_per_raw_sample <= 8) {",
"if(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
],
[
11
],
[
13
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
... |
4,347 | static void fft(AC3MDCTContext *mdct, IComplex *z, int ln)
{
int j, l, np, np2;
int nblocks, nloops;
register IComplex *p,*q;
int tmp_re, tmp_im;
np = 1 << ln;
/* reverse */
for (j = 0; j < np; j++) {
int k = av_reverse[j] >> (8 - ln);
if (k < j)
FF... | false | FFmpeg | 79997def65fd2313b48a5f3c3a884c6149ae9b5d | static void fft(AC3MDCTContext *mdct, IComplex *z, int ln)
{
int j, l, np, np2;
int nblocks, nloops;
register IComplex *p,*q;
int tmp_re, tmp_im;
np = 1 << ln;
for (j = 0; j < np; j++) {
int k = av_reverse[j] >> (8 - ln);
if (k < j)
FFSWAP(IComplex... | {
"code": [],
"line_no": []
} | static void FUNC_0(AC3MDCTContext *VAR_0, IComplex *VAR_1, int VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6;
int VAR_7, VAR_8;
register IComplex *VAR_9,*q;
int VAR_10, VAR_11;
VAR_5 = 1 << VAR_2;
for (VAR_3 = 0; VAR_3 < VAR_5; VAR_3++) {
int VAR_12 = av_reverse[VAR_3] >> (8 ... | [
"static void FUNC_0(AC3MDCTContext *VAR_0, IComplex *VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6;",
"int VAR_7, VAR_8;",
"register IComplex *VAR_9,*q;",
"int VAR_10, VAR_11;",
"VAR_5 = 1 << VAR_2;",
"for (VAR_3 = 0; VAR_3 < VAR_5; VAR_3++) {",
"int VAR_12 = av_reverse[VAR_3] >> (8 - VAR_2);... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
[
57
],
[
59
],
[
61
... |
4,348 | static inline void gen_lookup_tb(DisasContext *s)
{
tcg_gen_movi_i32(cpu_R[15], s->pc & ~1);
s->is_jmp = DISAS_UPDATE;
}
| true | qemu | 577bf808958d06497928c639efaa473bf8c5e099 | static inline void gen_lookup_tb(DisasContext *s)
{
tcg_gen_movi_i32(cpu_R[15], s->pc & ~1);
s->is_jmp = DISAS_UPDATE;
}
| {
"code": [
" s->is_jmp = DISAS_UPDATE;",
" s->is_jmp = DISAS_UPDATE;",
" s->is_jmp = DISAS_UPDATE;",
" s->is_jmp = DISAS_UPDATE;",
" s->is_jmp = DISAS_UPDATE;"
],
"line_no": [
7,
7,
7,
7,
7
]
} | static inline void FUNC_0(DisasContext *VAR_0)
{
tcg_gen_movi_i32(cpu_R[15], VAR_0->pc & ~1);
VAR_0->is_jmp = DISAS_UPDATE;
}
| [
"static inline void FUNC_0(DisasContext *VAR_0)\n{",
"tcg_gen_movi_i32(cpu_R[15], VAR_0->pc & ~1);",
"VAR_0->is_jmp = DISAS_UPDATE;",
"}"
] | [
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
4,349 | static int parse_interval(Interval *interval, int interval_count,
const char **buf, void *log_ctx)
{
char *intervalstr;
int ret;
*buf += strspn(*buf, SPACES);
if (!**buf)
return 0;
/* reset data */
memset(interval, 0, sizeof(Interval));
interva... | true | FFmpeg | a9f3e4b138fc14f7512fde821c051fe1ff7f124f | static int parse_interval(Interval *interval, int interval_count,
const char **buf, void *log_ctx)
{
char *intervalstr;
int ret;
*buf += strspn(*buf, SPACES);
if (!**buf)
return 0;
memset(interval, 0, sizeof(Interval));
interval->index = inter... | {
"code": [],
"line_no": []
} | static int FUNC_0(Interval *VAR_0, int VAR_1,
const char **VAR_2, void *VAR_3)
{
char *VAR_4;
int VAR_5;
*VAR_2 += strspn(*VAR_2, SPACES);
if (!**VAR_2)
return 0;
memset(VAR_0, 0, sizeof(Interval));
VAR_0->index = VAR_1;
V... | [
"static int FUNC_0(Interval *VAR_0, int VAR_1,\nconst char **VAR_2, void *VAR_3)\n{",
"char *VAR_4;",
"int VAR_5;",
"*VAR_2 += strspn(*VAR_2, SPACES);",
"if (!**VAR_2)\nreturn 0;",
"memset(VAR_0, 0, sizeof(Interval));",
"VAR_0->index = VAR_1;",
"VAR_4 = av_get_token(VAR_2, DELIMS);",
"if (VAR_4 && V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
23
],
[
25
],
[
35
],
[
37
],
[
39
],
[
43
],
[
52
],
[
55,
57
],
[
63
],
[
65
],
[
68,
70
],
[
74
],
[
76
... |
4,350 | static void gen_load_fp(DisasContext *s, int opsize, TCGv addr, TCGv_ptr fp)
{
TCGv tmp;
TCGv_i64 t64;
int index = IS_USER(s);
t64 = tcg_temp_new_i64();
tmp = tcg_temp_new();
switch (opsize) {
case OS_BYTE:
tcg_gen_qemu_ld8s(tmp, addr, index);
gen_helper_exts32(cp... | true | qemu | 39e3e113bdb27b4144d697fbd6678a9c24740103 | static void gen_load_fp(DisasContext *s, int opsize, TCGv addr, TCGv_ptr fp)
{
TCGv tmp;
TCGv_i64 t64;
int index = IS_USER(s);
t64 = tcg_temp_new_i64();
tmp = tcg_temp_new();
switch (opsize) {
case OS_BYTE:
tcg_gen_qemu_ld8s(tmp, addr, index);
gen_helper_exts32(cp... | {
"code": [
" tcg_temp_free_i64(t64);"
],
"line_no": [
57
]
} | static void FUNC_0(DisasContext *VAR_0, int VAR_1, TCGv VAR_2, TCGv_ptr VAR_3)
{
TCGv tmp;
TCGv_i64 t64;
int VAR_4 = IS_USER(VAR_0);
t64 = tcg_temp_new_i64();
tmp = tcg_temp_new();
switch (VAR_1) {
case OS_BYTE:
tcg_gen_qemu_ld8s(tmp, VAR_2, VAR_4);
gen_helper_ext... | [
"static void FUNC_0(DisasContext *VAR_0, int VAR_1, TCGv VAR_2, TCGv_ptr VAR_3)\n{",
"TCGv tmp;",
"TCGv_i64 t64;",
"int VAR_4 = IS_USER(VAR_0);",
"t64 = tcg_temp_new_i64();",
"tmp = tcg_temp_new();",
"switch (VAR_1) {",
"case OS_BYTE:\ntcg_gen_qemu_ld8s(tmp, VAR_2, VAR_4);",
"gen_helper_exts32(cpu_e... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
... |
4,353 | static av_cold int j2kenc_init(AVCodecContext *avctx)
{
int i, ret;
Jpeg2000EncoderContext *s = avctx->priv_data;
Jpeg2000CodingStyle *codsty = &s->codsty;
Jpeg2000QuantStyle *qntsty = &s->qntsty;
s->avctx = avctx;
av_log(s->avctx, AV_LOG_DEBUG, "init\n");
// defaults:
// T... | false | FFmpeg | dd1382ac9534bd9b5ec7833eed9ab6f383e68a50 | static av_cold int j2kenc_init(AVCodecContext *avctx)
{
int i, ret;
Jpeg2000EncoderContext *s = avctx->priv_data;
Jpeg2000CodingStyle *codsty = &s->codsty;
Jpeg2000QuantStyle *qntsty = &s->qntsty;
s->avctx = avctx;
av_log(s->avctx, AV_LOG_DEBUG, "init\n");
memset(cod... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
int VAR_0, VAR_1;
Jpeg2000EncoderContext *s = avctx->priv_data;
Jpeg2000CodingStyle *codsty = &s->codsty;
Jpeg2000QuantStyle *qntsty = &s->qntsty;
s->avctx = avctx;
av_log(s->avctx, AV_LOG_DEBUG, "init\n");
memset(co... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"int VAR_0, VAR_1;",
"Jpeg2000EncoderContext *s = avctx->priv_data;",
"Jpeg2000CodingStyle *codsty = &s->codsty;",
"Jpeg2000QuantStyle *qntsty = &s->qntsty;",
"s->avctx = avctx;",
"av_log(s->avctx, AV_LOG_DEBUG, \"init\\n\");",
"memset(codsty->lo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
47
],
[
51,
53
],
[
55,
57
],
[... |
4,355 | static int vp9_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_vp9_ctx,
AVStream *st, AVPacket *pkt, uint32_t *timestamp,
const uint8_t *buf, int len, uint16_t seq,
int flags)
{
int has_pic_id, has_layer_idc, has_ref... | true | FFmpeg | bacc92b59bfa5d6a1f631e63e46fc1d2fb934e51 | static int vp9_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_vp9_ctx,
AVStream *st, AVPacket *pkt, uint32_t *timestamp,
const uint8_t *buf, int len, uint16_t seq,
int flags)
{
int has_pic_id, has_layer_idc, has_ref... | {
"code": [
" if (len < 1) {",
" av_log(ctx, AV_LOG_ERROR, \"Too short RTP/VP9 packet\\n\");",
" return AVERROR_INVALIDDATA;"
],
"line_no": [
147,
149,
151
]
} | static int FUNC_0(AVFormatContext *VAR_0, PayloadContext *VAR_1,
AVStream *VAR_2, AVPacket *VAR_3, uint32_t *VAR_4,
const uint8_t *VAR_5, int VAR_6, uint16_t VAR_7,
int VAR_8)
{
int VAR_9, VAR_10, VAR_11, VAR_12, VAR_13;
... | [
"static int FUNC_0(AVFormatContext *VAR_0, PayloadContext *VAR_1,\nAVStream *VAR_2, AVPacket *VAR_3, uint32_t *VAR_4,\nconst uint8_t *VAR_5, int VAR_6, uint16_t VAR_7,\nint VAR_8)\n{",
"int VAR_9, VAR_10, VAR_11, VAR_12, VAR_13;",
"av_unused int pic_id = 0, non_key_frame = 0;",
"av_unused int layer_temporal =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
37
],
[
39
],
[
41
],
[
43
],
[
79
],
[
81
],
[
83
],
[
85
],
[
87
... |
4,356 | int nbd_client_co_preadv(BlockDriverState *bs, uint64_t offset,
uint64_t bytes, QEMUIOVector *qiov, int flags)
{
NBDRequest request = {
.type = NBD_CMD_READ,
.from = offset,
.len = bytes,
};
assert(bytes <= NBD_MAX_BUFFER_SIZE);
assert(!flags);... | true | qemu | f140e3000371e67ff4e00df3213e2d576d9c91be | int nbd_client_co_preadv(BlockDriverState *bs, uint64_t offset,
uint64_t bytes, QEMUIOVector *qiov, int flags)
{
NBDRequest request = {
.type = NBD_CMD_READ,
.from = offset,
.len = bytes,
};
assert(bytes <= NBD_MAX_BUFFER_SIZE);
assert(!flags);... | {
"code": [
" return nbd_co_request(bs, &request, qiov);"
],
"line_no": [
25
]
} | int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1,
uint64_t VAR_2, QEMUIOVector *VAR_3, int VAR_4)
{
NBDRequest request = {
.type = NBD_CMD_READ,
.from = VAR_1,
.len = VAR_2,
};
assert(VAR_2 <= NBD_MAX_BUFFER_SIZE);
assert(!VAR_4);
retu... | [
"int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1,\nuint64_t VAR_2, QEMUIOVector *VAR_3, int VAR_4)\n{",
"NBDRequest request = {",
".type = NBD_CMD_READ,\n.from = VAR_1,\n.len = VAR_2,\n};",
"assert(VAR_2 <= NBD_MAX_BUFFER_SIZE);",
"assert(!VAR_4);",
"return nbd_co_request(VAR_0, &request, VAR_3);",
"... | [
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9,
11,
13,
15
],
[
19
],
[
21
],
[
25
],
[
27
]
] |
4,357 | writev_f(int argc, char **argv)
{
struct timeval t1, t2;
int Cflag = 0, qflag = 0;
int c, cnt;
char *buf;
int64_t offset;
int total;
int nr_iov;
int pattern = 0xcd;
QEMUIOVector qiov;
while ((c = getopt(argc, argv, "CqP:")) != EOF) {
switch (c) {
case 'C':
Cflag = 1;
break;
case ... | true | qemu | 7d8abfcb50a33aed369bbd267852cf04009c49e9 | writev_f(int argc, char **argv)
{
struct timeval t1, t2;
int Cflag = 0, qflag = 0;
int c, cnt;
char *buf;
int64_t offset;
int total;
int nr_iov;
int pattern = 0xcd;
QEMUIOVector qiov;
while ((c = getopt(argc, argv, "CqP:")) != EOF) {
switch (c) {
case 'C':
Cflag = 1;
break;
case ... | {
"code": [
"\t\treturn 0;",
"\t\treturn 0;",
"\t\treturn 0;",
"\t\treturn 0;",
"\t\treturn 0;",
"\t\treturn 0;",
"\t\treturn 0;",
"\t\treturn 0;",
"\tif (optind > argc - 2)",
"\tif (optind > argc - 2)"
],
"line_no": [
69,
69,
69,
69,
69,
69,
69,... | FUNC_0(int VAR_0, char **VAR_1)
{
struct timeval VAR_2, VAR_3;
int VAR_4 = 0, VAR_5 = 0;
int VAR_6, VAR_7;
char *VAR_8;
int64_t offset;
int VAR_9;
int VAR_10;
int VAR_11 = 0xcd;
QEMUIOVector qiov;
while ((VAR_6 = getopt(VAR_0, VAR_1, "CqP:")) != EOF) {
switch (VAR_6) {
case 'C':
VAR_4 =... | [
"FUNC_0(int VAR_0, char **VAR_1)\n{",
"struct timeval VAR_2, VAR_3;",
"int VAR_4 = 0, VAR_5 = 0;",
"int VAR_6, VAR_7;",
"char *VAR_8;",
"int64_t offset;",
"int VAR_9;",
"int VAR_10;",
"int VAR_11 = 0xcd;",
"QEMUIOVector qiov;",
"while ((VAR_6 = getopt(VAR_0, VAR_1, \"CqP:\")) != EOF) {",
"swit... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[... |
4,358 | static off_t read_off(BlockDriverState *bs, int64_t offset)
{
uint64_t buffer;
if (bdrv_pread(bs->file, offset, &buffer, 8) < 8)
return 0;
return be64_to_cpu(buffer);
}
| true | qemu | 69d34a360dfe773e17e72c76d15931c9b9d190f6 | static off_t read_off(BlockDriverState *bs, int64_t offset)
{
uint64_t buffer;
if (bdrv_pread(bs->file, offset, &buffer, 8) < 8)
return 0;
return be64_to_cpu(buffer);
}
| {
"code": [
"static off_t read_off(BlockDriverState *bs, int64_t offset)",
"\tuint64_t buffer;",
"\tif (bdrv_pread(bs->file, offset, &buffer, 8) < 8)",
"\t\treturn 0;",
"\treturn be64_to_cpu(buffer);",
"\t\treturn 0;"
],
"line_no": [
1,
5,
7,
9,
11,
9
]
} | static off_t FUNC_0(BlockDriverState *bs, int64_t offset)
{
uint64_t buffer;
if (bdrv_pread(bs->file, offset, &buffer, 8) < 8)
return 0;
return be64_to_cpu(buffer);
}
| [
"static off_t FUNC_0(BlockDriverState *bs, int64_t offset)\n{",
"uint64_t buffer;",
"if (bdrv_pread(bs->file, offset, &buffer, 8) < 8)\nreturn 0;",
"return be64_to_cpu(buffer);",
"}"
] | [
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
]
] |
4,359 | static void qmp_input_type_int(Visitor *v, int64_t *obj, const char *name,
Error **errp)
{
QmpInputVisitor *qiv = to_qiv(v);
QObject *qobj = qmp_input_get_object(qiv, name, true);
if (!qobj || qobject_type(qobj) != QTYPE_QINT) {
error_setg(errp, QERR_INVALID_PA... | true | qemu | fcf73f66a67f5e58c18216f8c8651e38cf4d90af | static void qmp_input_type_int(Visitor *v, int64_t *obj, const char *name,
Error **errp)
{
QmpInputVisitor *qiv = to_qiv(v);
QObject *qobj = qmp_input_get_object(qiv, name, true);
if (!qobj || qobject_type(qobj) != QTYPE_QINT) {
error_setg(errp, QERR_INVALID_PA... | {
"code": [
" QObject *qobj = qmp_input_get_object(qiv, name, true);",
" if (!qobj || qobject_type(qobj) != QTYPE_QINT) {",
" *obj = qint_get_int(qobject_to_qint(qobj));",
" error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : \"null\","
],
"line_no": [
9,
13,
25... | static void FUNC_0(Visitor *VAR_0, int64_t *VAR_1, const char *VAR_2,
Error **VAR_3)
{
QmpInputVisitor *qiv = to_qiv(VAR_0);
QObject *qobj = qmp_input_get_object(qiv, VAR_2, true);
if (!qobj || qobject_type(qobj) != QTYPE_QINT) {
error_setg(VAR_3, QERR_INVALID_... | [
"static void FUNC_0(Visitor *VAR_0, int64_t *VAR_1, const char *VAR_2,\nError **VAR_3)\n{",
"QmpInputVisitor *qiv = to_qiv(VAR_0);",
"QObject *qobj = qmp_input_get_object(qiv, VAR_2, true);",
"if (!qobj || qobject_type(qobj) != QTYPE_QINT) {",
"error_setg(VAR_3, QERR_INVALID_PARAMETER_TYPE, VAR_2 ? VAR_2 : ... | [
0,
0,
1,
1,
1,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
25
],
[
27
]
] |
4,361 | static void emulated_push_type(EmulatedState *card, uint32_t type)
{
EmulEvent *event = (EmulEvent *)g_malloc(sizeof(EmulEvent));
assert(event);
event->p.gen.type = type;
emulated_push_event(card, event);
}
| true | qemu | 98f343395e937fa1db3a28dfb4f303f97cfddd6c | static void emulated_push_type(EmulatedState *card, uint32_t type)
{
EmulEvent *event = (EmulEvent *)g_malloc(sizeof(EmulEvent));
assert(event);
event->p.gen.type = type;
emulated_push_event(card, event);
}
| {
"code": [
" EmulEvent *event = (EmulEvent *)g_malloc(sizeof(EmulEvent));",
" EmulEvent *event = (EmulEvent *)g_malloc(sizeof(EmulEvent));"
],
"line_no": [
5,
5
]
} | static void FUNC_0(EmulatedState *VAR_0, uint32_t VAR_1)
{
EmulEvent *event = (EmulEvent *)g_malloc(sizeof(EmulEvent));
assert(event);
event->p.gen.VAR_1 = VAR_1;
emulated_push_event(VAR_0, event);
}
| [
"static void FUNC_0(EmulatedState *VAR_0, uint32_t VAR_1)\n{",
"EmulEvent *event = (EmulEvent *)g_malloc(sizeof(EmulEvent));",
"assert(event);",
"event->p.gen.VAR_1 = VAR_1;",
"emulated_push_event(VAR_0, event);",
"}"
] | [
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
4,363 | static target_ulong h_protect(CPUPPCState *env, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
target_ulong flags = args[0];
target_ulong pte_index = args[1];
target_ulong avpn = args[2];
uint8_t *hpte;
target_ulong v, r, rb;
if ((pte_... | true | qemu | 35f9304d925a5423c51bd2c83a81fa3cc2b6e680 | static target_ulong h_protect(CPUPPCState *env, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
target_ulong flags = args[0];
target_ulong pte_index = args[1];
target_ulong avpn = args[2];
uint8_t *hpte;
target_ulong v, r, rb;
if ((pte_... | {
"code": [
" assert(!(ldq_p(hpte) & HPTE_V_HVLOCK));",
" while (!lock_hpte(hpte, HPTE_V_HVLOCK)) {",
" assert(0);",
" stq_p(hpte, v & ~HPTE_V_HVLOCK);",
" assert(!(ldq_p(hpte) & HPTE_V_HVLOCK));",
" assert(!(ldq_p(hpte) & HPTE_V_HVLOCK));",
" while (!lock_... | static target_ulong FUNC_0(CPUPPCState *env, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
target_ulong flags = args[0];
target_ulong pte_index = args[1];
target_ulong avpn = args[2];
uint8_t *hpte;
target_ulong v, r, rb;
if ((pte_ind... | [
"static target_ulong FUNC_0(CPUPPCState *env, sPAPREnvironment *spapr,\ntarget_ulong opcode, target_ulong *args)\n{",
"target_ulong flags = args[0];",
"target_ulong pte_index = args[1];",
"target_ulong avpn = args[2];",
"uint8_t *hpte;",
"target_ulong v, r, rb;",
"if ((pte_index * HASH_PTE_SIZE_64) & ~e... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
35
],
[
37
],
[
41
],
[
43
],
[
47,
49
],
[
51
],
[
53
],
[
55
... |
4,364 | static int ir2_decode_plane_inter(Ir2Context *ctx, int width, int height, uint8_t *dst,
int pitch, const uint8_t *table)
{
int j;
int out = 0;
int c;
int t;
if (width & 1)
for (j = 0; j < height; j++) {
out = 0;
while (out < widt... | true | FFmpeg | b29feec9829cfab2523c8d95e35bd69e689ea4af | static int ir2_decode_plane_inter(Ir2Context *ctx, int width, int height, uint8_t *dst,
int pitch, const uint8_t *table)
{
int j;
int out = 0;
int c;
int t;
if (width & 1)
for (j = 0; j < height; j++) {
out = 0;
while (out < widt... | {
"code": [],
"line_no": []
} | static int FUNC_0(Ir2Context *VAR_0, int VAR_1, int VAR_2, uint8_t *VAR_3,
int VAR_4, const uint8_t *VAR_5)
{
int VAR_6;
int VAR_7 = 0;
int VAR_8;
int VAR_9;
if (VAR_1 & 1)
for (VAR_6 = 0; VAR_6 < VAR_2; VAR_6++) {
VAR_7 = 0;
whi... | [
"static int FUNC_0(Ir2Context *VAR_0, int VAR_1, int VAR_2, uint8_t *VAR_3,\nint VAR_4, const uint8_t *VAR_5)\n{",
"int VAR_6;",
"int VAR_7 = 0;",
"int VAR_8;",
"int VAR_9;",
"if (VAR_1 & 1)\nfor (VAR_6 = 0; VAR_6 < VAR_2; VAR_6++) {",
"VAR_7 = 0;",
"while (VAR_7 < VAR_1) {",
"VAR_8 = ir2_get_code(&... | [
0,
0,
0,
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,
22
],
[
24
],
[
28
],
[
30
],
[
32
],
[
34
],
[
36
],
[
38
],
[
40
],
[
42
],
[
44
],
[
46
],
[
48
],
[
50
... |
4,365 | static ExitStatus op_ex(DisasContext *s, DisasOps *o)
{
/* ??? Perhaps a better way to implement EXECUTE is to set a bit in
tb->flags, (ab)use the tb->cs_base field as the address of
the template in memory, and grab 8 bits of tb->flags/cflags for
the contents of the register. We would the... | true | qemu | ee0d0be16819896cc6c8018cbe171a632b61489c | static ExitStatus op_ex(DisasContext *s, DisasOps *o)
{
TCGv_i64 tmp;
update_psw_addr(s);
update_cc_op(s);
tmp = tcg_const_i64(s->next_pc);
gen_helper_ex(cc_op, cpu_env, cc_op, o->in1, o->in2, tmp);
tcg_temp_free_i64(tmp);
set_cc_static(s);
return... | {
"code": [
" update_cc_op(s);",
" set_cc_static(s);"
],
"line_no": [
33,
45
]
} | static ExitStatus FUNC_0(DisasContext *s, DisasOps *o)
{
TCGv_i64 tmp;
update_psw_addr(s);
update_cc_op(s);
tmp = tcg_const_i64(s->next_pc);
gen_helper_ex(cc_op, cpu_env, cc_op, o->in1, o->in2, tmp);
tcg_temp_free_i64(tmp);
set_cc_static(s);
retur... | [
"static ExitStatus FUNC_0(DisasContext *s, DisasOps *o)\n{",
"TCGv_i64 tmp;",
"update_psw_addr(s);",
"update_cc_op(s);",
"tmp = tcg_const_i64(s->next_pc);",
"gen_helper_ex(cc_op, cpu_env, cc_op, o->in1, o->in2, tmp);",
"tcg_temp_free_i64(tmp);",
"set_cc_static(s);",
"return NO_EXIT;",
"}"
] | [
0,
0,
0,
1,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
]
] |
4,366 | static int initFilter(int16_t **outFilter, int16_t **filterPos, int *outFilterSize, int xInc,
int srcW, int dstW, int filterAlign, int one, int flags, int cpu_flags,
SwsVector *srcFilter, SwsVector *dstFilter, double param[2])
{
int i;
int filterSize;
int fi... | true | FFmpeg | d49352c7cc22fd8928a761a373c3508be17c9f19 | static int initFilter(int16_t **outFilter, int16_t **filterPos, int *outFilterSize, int xInc,
int srcW, int dstW, int filterAlign, int one, int flags, int cpu_flags,
SwsVector *srcFilter, SwsVector *dstFilter, double param[2])
{
int i;
int filterSize;
int fi... | {
"code": [
" SwsVector *srcFilter, SwsVector *dstFilter, double param[2])",
" for (i=0; i<dstW; i++) {",
" int j;",
" if ((*filterPos)[i] < 0) {",
" for (j=1; j<filterSize; j++) {",
" int left= FFMAX(j + (*filterPos)[i], 0);",
... | static int FUNC_0(int16_t **VAR_0, int16_t **VAR_1, int *VAR_2, int VAR_3,
int VAR_4, int VAR_5, int VAR_6, int VAR_7, int VAR_8, int VAR_9,
SwsVector *VAR_10, SwsVector *VAR_11, double VAR_12[2])
{
int VAR_21;
int VAR_14;
int VAR_15;
int VAR_16;
i... | [
"static int FUNC_0(int16_t **VAR_0, int16_t **VAR_1, int *VAR_2, int VAR_3,\nint VAR_4, int VAR_5, int VAR_6, int VAR_7, int VAR_8, int VAR_9,\nSwsVector *VAR_10, SwsVector *VAR_11, double VAR_12[2])\n{",
"int VAR_21;",
"int VAR_14;",
"int VAR_15;",
"int VAR_16;",
"int64_t *filter=NULL;",
"int64_t *filt... | [
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
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
... |
4,367 | int update_dimensions(VP8Context *s, int width, int height, int is_vp7)
{
AVCodecContext *avctx = s->avctx;
int i, ret;
if (width != s->avctx->width ||
height != s->avctx->height) {
vp8_decode_flush_impl(s->avctx, 1);
ret = ff_set_dimensions(s->avctx, width, height);
... | false | FFmpeg | 014b6b416fec89777cb9cff61bcf7896eaf7cf39 | int update_dimensions(VP8Context *s, int width, int height, int is_vp7)
{
AVCodecContext *avctx = s->avctx;
int i, ret;
if (width != s->avctx->width ||
height != s->avctx->height) {
vp8_decode_flush_impl(s->avctx, 1);
ret = ff_set_dimensions(s->avctx, width, height);
... | {
"code": [],
"line_no": []
} | int FUNC_0(VP8Context *VAR_0, int VAR_1, int VAR_2, int VAR_3)
{
AVCodecContext *avctx = VAR_0->avctx;
int VAR_4, VAR_5;
if (VAR_1 != VAR_0->avctx->VAR_1 ||
VAR_2 != VAR_0->avctx->VAR_2) {
vp8_decode_flush_impl(VAR_0->avctx, 1);
VAR_5 = ff_set_dimensions(VAR_0->avctx, VAR... | [
"int FUNC_0(VP8Context *VAR_0, int VAR_1, int VAR_2, int VAR_3)\n{",
"AVCodecContext *avctx = VAR_0->avctx;",
"int VAR_4, VAR_5;",
"if (VAR_1 != VAR_0->avctx->VAR_1 ||\nVAR_2 != VAR_0->avctx->VAR_2) {",
"vp8_decode_flush_impl(VAR_0->avctx, 1);",
"VAR_5 = ff_set_dimensions(VAR_0->avctx, VAR_1, VAR_2);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15
],
[
19
],
[
21,
23
],
[
25
],
[
29
],
[
31
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49,
51
],
[
53
],
... |
4,368 | static int decode_main_header(NUTContext *nut){
AVFormatContext *s= nut->avf;
ByteIOContext *bc = &s->pb;
uint64_t tmp;
int i, j;
get_packetheader(nut, bc, 8, 1);
tmp = get_v(bc);
if (tmp != 1){
av_log(s, AV_LOG_ERROR, "bad version (%Ld)\n", tmp);
return -1;
}
... | false | FFmpeg | aec8f88a9eb0ef8d684a2e76a152c9090da4af51 | static int decode_main_header(NUTContext *nut){
AVFormatContext *s= nut->avf;
ByteIOContext *bc = &s->pb;
uint64_t tmp;
int i, j;
get_packetheader(nut, bc, 8, 1);
tmp = get_v(bc);
if (tmp != 1){
av_log(s, AV_LOG_ERROR, "bad version (%Ld)\n", tmp);
return -1;
}
... | {
"code": [],
"line_no": []
} | static int FUNC_0(NUTContext *VAR_0){
AVFormatContext *s= VAR_0->avf;
ByteIOContext *bc = &s->pb;
uint64_t tmp;
int VAR_1, VAR_2;
get_packetheader(VAR_0, bc, 8, 1);
tmp = get_v(bc);
if (tmp != 1){
av_log(s, AV_LOG_ERROR, "bad version (%Ld)\n", tmp);
return -1;
... | [
"static int FUNC_0(NUTContext *VAR_0){",
"AVFormatContext *s= VAR_0->avf;",
"ByteIOContext *bc = &s->pb;",
"uint64_t tmp;",
"int VAR_1, VAR_2;",
"get_packetheader(VAR_0, bc, 8, 1);",
"tmp = get_v(bc);",
"if (tmp != 1){",
"av_log(s, AV_LOG_ERROR, \"bad version (%Ld)\\n\", tmp);",
"return -1;",
"}... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[... |
4,369 | void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem)
{
/* see similar ffmpeg.c:grow_array() */
int nb, nb_alloc;
intptr_t *tab;
nb = *nb_ptr;
tab = *(intptr_t**)tab_ptr;
if ((nb & (nb - 1)) == 0) {
if (nb == 0)
nb_alloc = 1;
else
nb_al... | true | FFmpeg | ee9794ed20528c2aa4c53cf67cb218bdce6e0485 | void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem)
{
int nb, nb_alloc;
intptr_t *tab;
nb = *nb_ptr;
tab = *(intptr_t**)tab_ptr;
if ((nb & (nb - 1)) == 0) {
if (nb == 0)
nb_alloc = 1;
else
nb_alloc = nb * 2;
tab = av_realloc... | {
"code": [
" if (nb == 0)"
],
"line_no": [
19
]
} | void FUNC_0(void *VAR_0, int *VAR_1, void *VAR_2)
{
int VAR_3, VAR_4;
intptr_t *tab;
VAR_3 = *VAR_1;
tab = *(intptr_t**)VAR_0;
if ((VAR_3 & (VAR_3 - 1)) == 0) {
if (VAR_3 == 0)
VAR_4 = 1;
else
VAR_4 = VAR_3 * 2;
tab = av_realloc(tab,... | [
"void FUNC_0(void *VAR_0, int *VAR_1, void *VAR_2)\n{",
"int VAR_3, VAR_4;",
"intptr_t *tab;",
"VAR_3 = *VAR_1;",
"tab = *(intptr_t**)VAR_0;",
"if ((VAR_3 & (VAR_3 - 1)) == 0) {",
"if (VAR_3 == 0)\nVAR_4 = 1;",
"else\nVAR_4 = VAR_3 * 2;",
"tab = av_realloc(tab, VAR_4 * sizeof(intptr_t));",
"*(intp... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
4,370 | static void write_long(unsigned char *p,uint32_t v)
{
p[0] = v>>24;
p[1] = v>>16;
p[2] = v>>8;
p[3] = v;
}
| true | FFmpeg | f19af812a32c1398d48c3550d11dbc6aafbb2bfc | static void write_long(unsigned char *p,uint32_t v)
{
p[0] = v>>24;
p[1] = v>>16;
p[2] = v>>8;
p[3] = v;
}
| {
"code": [
"\tp[0] = v>>24;",
"\tp[1] = v>>16;",
"\tp[2] = v>>8;",
"\tp[3] = v;"
],
"line_no": [
5,
7,
9,
11
]
} | static void FUNC_0(unsigned char *VAR_0,uint32_t VAR_1)
{
VAR_0[0] = VAR_1>>24;
VAR_0[1] = VAR_1>>16;
VAR_0[2] = VAR_1>>8;
VAR_0[3] = VAR_1;
}
| [
"static void FUNC_0(unsigned char *VAR_0,uint32_t VAR_1)\n{",
"VAR_0[0] = VAR_1>>24;",
"VAR_0[1] = VAR_1>>16;",
"VAR_0[2] = VAR_1>>8;",
"VAR_0[3] = VAR_1;",
"}"
] | [
0,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
4,371 | static void filter_edges_16bit(void *dst1, void *prev1, void *cur1, void *next1,
int w, int prefs, int mrefs, int parity, int mode)
{
uint16_t *dst = dst1;
uint16_t *prev = prev1;
uint16_t *cur = cur1;
uint16_t *next = next1;
int x;
uint16_t *prev2 = pari... | true | FFmpeg | 221f902f1dc167bdc0bfdff6b6af3214ae3cc1f4 | static void filter_edges_16bit(void *dst1, void *prev1, void *cur1, void *next1,
int w, int prefs, int mrefs, int parity, int mode)
{
uint16_t *dst = dst1;
uint16_t *prev = prev1;
uint16_t *cur = cur1;
uint16_t *next = next1;
int x;
uint16_t *prev2 = pari... | {
"code": [
" dst = (uint16_t*)dst1 + w - 3;",
" prev = (uint16_t*)prev1 + w - 3;",
" cur = (uint16_t*)cur1 + w - 3;",
" next = (uint16_t*)next1 + w - 3;"
],
"line_no": [
31,
33,
35,
37
]
} | static void FUNC_0(void *VAR_0, void *VAR_1, void *VAR_2, void *VAR_3,
int VAR_4, int VAR_5, int VAR_6, int VAR_7, int VAR_8)
{
uint16_t *dst = VAR_0;
uint16_t *prev = VAR_1;
uint16_t *cur = VAR_2;
uint16_t *next = VAR_3;
int VAR_9;
uint16_t *prev2 = VAR_... | [
"static void FUNC_0(void *VAR_0, void *VAR_1, void *VAR_2, void *VAR_3,\nint VAR_4, int VAR_5, int VAR_6, int VAR_7, int VAR_8)\n{",
"uint16_t *dst = VAR_0;",
"uint16_t *prev = VAR_1;",
"uint16_t *cur = VAR_2;",
"uint16_t *next = VAR_3;",
"int VAR_9;",
"uint16_t *prev2 = VAR_7 ? prev : cur ;",
"uint... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45,
47
]
] |
4,372 | int32 float32_to_int32_round_to_zero( float32 a STATUS_PARAM )
{
flag aSign;
int16 aExp, shiftCount;
uint32_t aSig;
int32 z;
a = float32_squash_input_denormal(a STATUS_VAR);
aSig = extractFloat32Frac( a );
aExp = extractFloat32Exp( a );
aSign = extractFloat32Sign( a );
sh... | true | qemu | b3a6a2e0417c78ec5491347eb85a7d125a5fefdc | int32 float32_to_int32_round_to_zero( float32 a STATUS_PARAM )
{
flag aSign;
int16 aExp, shiftCount;
uint32_t aSig;
int32 z;
a = float32_squash_input_denormal(a STATUS_VAR);
aSig = extractFloat32Frac( a );
aExp = extractFloat32Exp( a );
aSign = extractFloat32Sign( a );
sh... | {
"code": [
" int32 z;",
" int32 z;",
" int32 z;",
" int32 z;"
],
"line_no": [
11,
11,
11,
11
]
} | int32 FUNC_0( float32 a STATUS_PARAM )
{
flag aSign;
int16 aExp, shiftCount;
uint32_t aSig;
int32 z;
a = float32_squash_input_denormal(a STATUS_VAR);
aSig = extractFloat32Frac( a );
aExp = extractFloat32Exp( a );
aSign = extractFloat32Sign( a );
shiftCount = aExp - 0x9E;
... | [
"int32 FUNC_0( float32 a STATUS_PARAM )\n{",
"flag aSign;",
"int16 aExp, shiftCount;",
"uint32_t aSig;",
"int32 z;",
"a = float32_squash_input_denormal(a STATUS_VAR);",
"aSig = extractFloat32Frac( a );",
"aExp = extractFloat32Exp( a );",
"aSign = extractFloat32Sign( a );",
"shiftCount = aExp - 0x9... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
4,374 | static int avi_load_index(AVFormatContext *s)
{
AVIContext *avi = s->priv_data;
ByteIOContext *pb = s->pb;
uint32_t tag, size;
int64_t pos= url_ftell(pb);
url_fseek(pb, avi->movi_end, SEEK_SET);
#ifdef DEBUG_SEEK
printf("movi_end=0x%"PRIx64"\n", avi->movi_end);
#endif
for(;;) {
... | true | FFmpeg | 44ed34b79097b972095e7c9efae32a13b4bc51dc | static int avi_load_index(AVFormatContext *s)
{
AVIContext *avi = s->priv_data;
ByteIOContext *pb = s->pb;
uint32_t tag, size;
int64_t pos= url_ftell(pb);
url_fseek(pb, avi->movi_end, SEEK_SET);
#ifdef DEBUG_SEEK
printf("movi_end=0x%"PRIx64"\n", avi->movi_end);
#endif
for(;;) {
... | {
"code": [
" url_fseek(pb, avi->movi_end, SEEK_SET);",
" url_fskip(pb, size);",
" return 0;"
],
"line_no": [
15,
69,
81
]
} | static int FUNC_0(AVFormatContext *VAR_0)
{
AVIContext *avi = VAR_0->priv_data;
ByteIOContext *pb = VAR_0->pb;
uint32_t tag, size;
int64_t pos= url_ftell(pb);
url_fseek(pb, avi->movi_end, SEEK_SET);
#ifdef DEBUG_SEEK
printf("movi_end=0x%"PRIx64"\n", avi->movi_end);
#endif
for(;;)... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"AVIContext *avi = VAR_0->priv_data;",
"ByteIOContext *pb = VAR_0->pb;",
"uint32_t tag, size;",
"int64_t pos= url_ftell(pb);",
"url_fseek(pb, avi->movi_end, SEEK_SET);",
"#ifdef DEBUG_SEEK\nprintf(\"movi_end=0x%\"PRIx64\"\\n\", avi->movi_end);",
"#endif\... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
21,
23
],
[
25,
27
],
[
29
],
[
31
],
[
33,
35,
37,
39,
41,
43,
45
],
[
47,
49
],
[
51,
53,
55
... |
4,375 | int usb_desc_handle_control(USBDevice *dev, USBPacket *p,
int request, int value, int index, int length, uint8_t *data)
{
const USBDesc *desc = usb_device_get_usb_desc(dev);
int ret = -1;
assert(desc != NULL);
switch(request) {
case DeviceOutRequest | USB_REQ_SET_ADDRESS:
d... | true | qemu | 8db36e9dddb1b6fab3554a8c00d92268b33a487b | int usb_desc_handle_control(USBDevice *dev, USBPacket *p,
int request, int value, int index, int length, uint8_t *data)
{
const USBDesc *desc = usb_device_get_usb_desc(dev);
int ret = -1;
assert(desc != NULL);
switch(request) {
case DeviceOutRequest | USB_REQ_SET_ADDRESS:
d... | {
"code": [
" data[0] = dev->config->bConfigurationValue;",
" case DeviceRequest | USB_REQ_GET_STATUS:",
" if (dev->config->bmAttributes & 0x40) {"
],
"line_no": [
39,
55,
59
]
} | int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1,
int VAR_2, int VAR_3, int VAR_4, int VAR_5, uint8_t *VAR_6)
{
const USBDesc *VAR_7 = usb_device_get_usb_desc(VAR_0);
int VAR_8 = -1;
assert(VAR_7 != NULL);
switch(VAR_2) {
case DeviceOutRequest | USB_REQ_SET_ADDRESS:
VAR_0->add... | [
"int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1,\nint VAR_2, int VAR_3, int VAR_4, int VAR_5, uint8_t *VAR_6)\n{",
"const USBDesc *VAR_7 = usb_device_get_usb_desc(VAR_0);",
"int VAR_8 = -1;",
"assert(VAR_7 != NULL);",
"switch(VAR_2) {",
"case DeviceOutRequest | USB_REQ_SET_ADDRESS:\nVAR_0->addr = VAR_3;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
33
],
[
37,
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[... |
4,376 | static void imx_eth_write(void *opaque, hwaddr offset, uint64_t value,
unsigned size)
{
IMXFECState *s = IMX_FEC(opaque);
uint32_t index = offset >> 2;
FEC_PRINTF("reg[%s] <= 0x%" PRIx32 "\n", imx_eth_reg_name(s, index),
(uint32_t)value);
switch (ind... | true | qemu | b2b012afdd9c03ba8a1619f45301d34f358d367b | static void imx_eth_write(void *opaque, hwaddr offset, uint64_t value,
unsigned size)
{
IMXFECState *s = IMX_FEC(opaque);
uint32_t index = offset >> 2;
FEC_PRINTF("reg[%s] <= 0x%" PRIx32 "\n", imx_eth_reg_name(s, index),
(uint32_t)value);
switch (ind... | {
"code": [
" imx_eth_enable_rx(s);"
],
"line_no": [
41
]
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1, uint64_t VAR_2,
unsigned VAR_3)
{
IMXFECState *s = IMX_FEC(VAR_0);
uint32_t index = VAR_1 >> 2;
FEC_PRINTF("reg[%s] <= 0x%" PRIx32 "\n", imx_eth_reg_name(s, index),
(uint32_t)VAR_2);
switch (index) {
... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1, uint64_t VAR_2,\nunsigned VAR_3)\n{",
"IMXFECState *s = IMX_FEC(VAR_0);",
"uint32_t index = VAR_1 >> 2;",
"FEC_PRINTF(\"reg[%s] <= 0x%\" PRIx32 \"\\n\", imx_eth_reg_name(s, index),\n(uint32_t)VAR_2);",
"switch (index) {",
"case ENET_EIR:\ns->regs[index] &= ~V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
21,
23
],
[
25
],
[
27,
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
4,377 | int qemu_chr_open_spice(QemuOpts *opts, CharDriverState **_chr)
{
CharDriverState *chr;
SpiceCharDriver *s;
const char* name = qemu_opt_get(opts, "name");
uint32_t debug = qemu_opt_get_number(opts, "debug", 0);
const char** psubtype = spice_server_char_device_recognized_subtypes();
const ... | true | qemu | 1f51470d044852592922f91000e741c381582cdc | int qemu_chr_open_spice(QemuOpts *opts, CharDriverState **_chr)
{
CharDriverState *chr;
SpiceCharDriver *s;
const char* name = qemu_opt_get(opts, "name");
uint32_t debug = qemu_opt_get_number(opts, "debug", 0);
const char** psubtype = spice_server_char_device_recognized_subtypes();
const ... | {
"code": [
" *_chr = chr;",
" return 0;",
" *_chr = chr;",
" return 0;",
" *_chr = chr;",
" return 0;",
" return 0;",
" return 0;",
" return -EINVAL;",
" return 0;",
" *_chr = chr;",
" return 0;",
" *_chr = chr;",
" ... | int FUNC_0(QemuOpts *VAR_0, CharDriverState **VAR_1)
{
CharDriverState *chr;
SpiceCharDriver *s;
const char* VAR_2 = qemu_opt_get(VAR_0, "VAR_2");
uint32_t debug = qemu_opt_get_number(VAR_0, "debug", 0);
const char** VAR_3 = spice_server_char_device_recognized_subtypes();
const char *VAR_... | [
"int FUNC_0(QemuOpts *VAR_0, CharDriverState **VAR_1)\n{",
"CharDriverState *chr;",
"SpiceCharDriver *s;",
"const char* VAR_2 = qemu_opt_get(VAR_0, \"VAR_2\");",
"uint32_t debug = qemu_opt_get_number(VAR_0, \"debug\", 0);",
"const char** VAR_3 = spice_server_char_device_recognized_subtypes();",
"const c... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
4,378 | static char *get_content_url(xmlNodePtr *baseurl_nodes,
int n_baseurl_nodes,
char *rep_id_val,
char *rep_bandwidth_val,
char *val)
{
int i;
char *text;
char *url = NULL;
char tmp_... | true | FFmpeg | 1f48c5c0671bb4f39c9dc3ec44c727f1680547b3 | static char *get_content_url(xmlNodePtr *baseurl_nodes,
int n_baseurl_nodes,
char *rep_id_val,
char *rep_bandwidth_val,
char *val)
{
int i;
char *text;
char *url = NULL;
char tmp_... | {
"code": [
" av_free(url);"
],
"line_no": [
77
]
} | static char *FUNC_0(xmlNodePtr *VAR_0,
int VAR_1,
char *VAR_2,
char *VAR_3,
char *VAR_4)
{
int VAR_5;
char *VAR_6;
char *VAR_7 = NULL;
char VAR_8[MAX_URL_SIZE];
char VAR_9[MA... | [
"static char *FUNC_0(xmlNodePtr *VAR_0,\nint VAR_1,\nchar *VAR_2,\nchar *VAR_3,\nchar *VAR_4)\n{",
"int VAR_5;",
"char *VAR_6;",
"char *VAR_7 = NULL;",
"char VAR_8[MAX_URL_SIZE];",
"char VAR_9[MAX_URL_SIZE];",
"memset(VAR_8, 0, sizeof(VAR_8));",
"for (VAR_5 = 0; VAR_5 < VAR_1; ++VAR_5) {",
"if (VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31,
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
4,379 | av_cold void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx)
{
const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8;
if (avctx->lowres==1) {
c->idct_put = ff_jref_idct4_put;
c->idct_add = ff_jref_idct4_add;
c->idct = ff_j_rev_dct4;
c->perm_type... | true | FFmpeg | 32baeafeee4f8446c2c3720b9223ad2166ca9d30 | av_cold void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx)
{
const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8;
if (avctx->lowres==1) {
c->idct_put = ff_jref_idct4_put;
c->idct_add = ff_jref_idct4_add;
c->idct = ff_j_rev_dct4;
c->perm_type... | {
"code": [
" c->put_pixels_clamped = put_pixels_clamped_c;",
" c->add_pixels_clamped = add_pixels_clamped_c;",
" ff_put_pixels_clamped = c->put_pixels_clamped;",
" ff_add_pixels_clamped = c->add_pixels_clamped;"
],
"line_no": [
105,
109,
145,
147
]
} | av_cold void FUNC_0(IDCTDSPContext *c, AVCodecContext *avctx)
{
const unsigned VAR_0 = avctx->bits_per_raw_sample > 8;
if (avctx->lowres==1) {
c->idct_put = ff_jref_idct4_put;
c->idct_add = ff_jref_idct4_add;
c->idct = ff_j_rev_dct4;
c->perm_type = FF_IDCT_PERM_NO... | [
"av_cold void FUNC_0(IDCTDSPContext *c, AVCodecContext *avctx)\n{",
"const unsigned VAR_0 = avctx->bits_per_raw_sample > 8;",
"if (avctx->lowres==1) {",
"c->idct_put = ff_jref_idct4_put;",
"c->idct_add = ff_jref_idct4_add;",
"c->idct = ff_j_rev_dct4;",
"c->perm_type = FF_IDCT_PERM_NONE;",
"} el... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43... |
4,382 | static void vnc_display_close(VncDisplay *vs)
{
if (!vs)
return;
vs->enabled = false;
vs->is_unix = false;
if (vs->lsock != NULL) {
if (vs->lsock_tag) {
g_source_remove(vs->lsock_tag);
}
object_unref(OBJECT(vs->lsock));
vs->lsock = NULL;
... | true | qemu | 67c4c2bd958b0074ffbcde12cb434cd064adab12 | static void vnc_display_close(VncDisplay *vs)
{
if (!vs)
return;
vs->enabled = false;
vs->is_unix = false;
if (vs->lsock != NULL) {
if (vs->lsock_tag) {
g_source_remove(vs->lsock_tag);
}
object_unref(OBJECT(vs->lsock));
vs->lsock = NULL;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(VncDisplay *VAR_0)
{
if (!VAR_0)
return;
VAR_0->enabled = false;
VAR_0->is_unix = false;
if (VAR_0->lsock != NULL) {
if (VAR_0->lsock_tag) {
g_source_remove(VAR_0->lsock_tag);
}
object_unref(OBJECT(VAR_0->lsock));
VAR_0->l... | [
"static void FUNC_0(VncDisplay *VAR_0)\n{",
"if (!VAR_0)\nreturn;",
"VAR_0->enabled = false;",
"VAR_0->is_unix = false;",
"if (VAR_0->lsock != NULL) {",
"if (VAR_0->lsock_tag) {",
"g_source_remove(VAR_0->lsock_tag);",
"}",
"object_unref(OBJECT(VAR_0->lsock));",
"VAR_0->lsock = NULL;",
"}",
"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
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[... |
4,383 | void cpu_reset(CPUX86State *env)
{
int i;
memset(env, 0, offsetof(CPUX86State, breakpoints));
tlb_flush(env, 1);
env->old_exception = -1;
/* init to reset state */
#ifdef CONFIG_SOFTMMU
env->hflags |= HF_SOFTMMU_MASK;
#endif
env->hflags2 |= HF2_GIF_MASK;
cpu_x86_update_cr0(env, 0x6000001... | true | qemu | eca1bdf415c454093dfc7eb983cd49287c043967 | void cpu_reset(CPUX86State *env)
{
int i;
memset(env, 0, offsetof(CPUX86State, breakpoints));
tlb_flush(env, 1);
env->old_exception = -1;
#ifdef CONFIG_SOFTMMU
env->hflags |= HF_SOFTMMU_MASK;
#endif
env->hflags2 |= HF2_GIF_MASK;
cpu_x86_update_cr0(env, 0x60000010);
env->a20_mask = ~... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUX86State *VAR_0)
{
int VAR_1;
memset(VAR_0, 0, offsetof(CPUX86State, breakpoints));
tlb_flush(VAR_0, 1);
VAR_0->old_exception = -1;
#ifdef CONFIG_SOFTMMU
VAR_0->hflags |= HF_SOFTMMU_MASK;
#endif
VAR_0->hflags2 |= HF2_GIF_MASK;
cpu_x86_update_cr0(VAR_0, 0x60000010);
VA... | [
"void FUNC_0(CPUX86State *VAR_0)\n{",
"int VAR_1;",
"memset(VAR_0, 0, offsetof(CPUX86State, breakpoints));",
"tlb_flush(VAR_0, 1);",
"VAR_0->old_exception = -1;",
"#ifdef CONFIG_SOFTMMU\nVAR_0->hflags |= HF_SOFTMMU_MASK;",
"#endif\nVAR_0->hflags2 |= HF2_GIF_MASK;",
"cpu_x86_update_cr0(VAR_0, 0x6000001... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
8,
9
],
[
10,
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21,
22
],
[
23,
24
]... |
4,384 | static int get_cod(J2kDecoderContext *s, J2kCodingStyle *c, uint8_t *properties)
{
J2kCodingStyle tmp;
int compno;
if (s->buf_end - s->buf < 5)
return AVERROR(EINVAL);
tmp.log2_prec_width =
tmp.log2_prec_height = 15;
tmp.csty = bytestream_get_byte(&s->buf);
if (byte... | true | FFmpeg | ddfa3751c092feaf1e080f66587024689dfe603c | static int get_cod(J2kDecoderContext *s, J2kCodingStyle *c, uint8_t *properties)
{
J2kCodingStyle tmp;
int compno;
if (s->buf_end - s->buf < 5)
return AVERROR(EINVAL);
tmp.log2_prec_width =
tmp.log2_prec_height = 15;
tmp.csty = bytestream_get_byte(&s->buf);
if (byte... | {
"code": [
" return AVERROR(EINVAL);",
" if (s->buf_end - s->buf < 5)",
" if (s->buf_end - s->buf < 5)",
" tmp.csty = bytestream_get_byte(&s->buf);",
" tmp.nlayers = bytestream_get_be16(&s->buf);"
],
"line_no": [
13,
11,
11,
23,
37
]
} | static int FUNC_0(J2kDecoderContext *VAR_0, J2kCodingStyle *VAR_1, uint8_t *VAR_2)
{
J2kCodingStyle tmp;
int VAR_3;
if (VAR_0->buf_end - VAR_0->buf < 5)
return AVERROR(EINVAL);
tmp.log2_prec_width =
tmp.log2_prec_height = 15;
tmp.csty = bytestream_get_byte(&VAR_0->buf);
... | [
"static int FUNC_0(J2kDecoderContext *VAR_0, J2kCodingStyle *VAR_1, uint8_t *VAR_2)\n{",
"J2kCodingStyle tmp;",
"int VAR_3;",
"if (VAR_0->buf_end - VAR_0->buf < 5)\nreturn AVERROR(EINVAL);",
"tmp.log2_prec_width =\ntmp.log2_prec_height = 15;",
"tmp.csty = bytestream_get_byte(&VAR_0->buf);",
"if (bytest... | [
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17,
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47,
49
],
[
51
],
[
53
],
[
55
]
] |
4,386 | static void create_cps(MaltaState *s, const char *cpu_model,
qemu_irq *cbus_irq, qemu_irq *i8259_irq)
{
Error *err = NULL;
s->cps = g_new0(MIPSCPSState, 1);
object_initialize(s->cps, sizeof(MIPSCPSState), TYPE_MIPS_CPS);
qdev_set_parent_bus(DEVICE(s->cps), sysbus_get_defau... | false | qemu | 19494f811a43c6bc226aa272d86300d9229224fe | static void create_cps(MaltaState *s, const char *cpu_model,
qemu_irq *cbus_irq, qemu_irq *i8259_irq)
{
Error *err = NULL;
s->cps = g_new0(MIPSCPSState, 1);
object_initialize(s->cps, sizeof(MIPSCPSState), TYPE_MIPS_CPS);
qdev_set_parent_bus(DEVICE(s->cps), sysbus_get_defau... | {
"code": [],
"line_no": []
} | static void FUNC_0(MaltaState *VAR_0, const char *VAR_1,
qemu_irq *VAR_2, qemu_irq *VAR_3)
{
Error *err = NULL;
VAR_0->cps = g_new0(MIPSCPSState, 1);
object_initialize(VAR_0->cps, sizeof(MIPSCPSState), TYPE_MIPS_CPS);
qdev_set_parent_bus(DEVICE(VAR_0->cps), sysbus_get_defa... | [
"static void FUNC_0(MaltaState *VAR_0, const char *VAR_1,\nqemu_irq *VAR_2, qemu_irq *VAR_3)\n{",
"Error *err = NULL;",
"VAR_0->cps = g_new0(MIPSCPSState, 1);",
"object_initialize(VAR_0->cps, sizeof(MIPSCPSState), TYPE_MIPS_CPS);",
"qdev_set_parent_bus(DEVICE(VAR_0->cps), sysbus_get_default());",
"object_... | [
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
],
[
35
],
[
43
],
[
45
],
[
47
]
] |
4,387 | void qmp_change_backing_file(const char *device,
const char *image_node_name,
const char *backing_file,
Error **errp)
{
BlockBackend *blk;
BlockDriverState *bs = NULL;
AioContext *aio_context;
BlockDriverState... | false | qemu | 621ff94d5074d88253a5818c6b9c4db718fbfc65 | void qmp_change_backing_file(const char *device,
const char *image_node_name,
const char *backing_file,
Error **errp)
{
BlockBackend *blk;
BlockDriverState *bs = NULL;
AioContext *aio_context;
BlockDriverState... | {
"code": [],
"line_no": []
} | void FUNC_0(const char *VAR_0,
const char *VAR_1,
const char *VAR_2,
Error **VAR_3)
{
BlockBackend *blk;
BlockDriverState *bs = NULL;
AioContext *aio_context;
BlockDriverState *image_bs = NULL;
Error *loc... | [
"void FUNC_0(const char *VAR_0,\nconst char *VAR_1,\nconst char *VAR_2,\nError **VAR_3)\n{",
"BlockBackend *blk;",
"BlockDriverState *bs = NULL;",
"AioContext *aio_context;",
"BlockDriverState *image_bs = NULL;",
"Error *local_err = NULL;",
"bool ro;",
"int VAR_4;",
"int VAR_5;",
"blk = blk_by_nam... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49
],
[
51
... |
4,388 | int pci_parse_devaddr(const char *addr, int *domp, int *busp,
unsigned int *slotp, unsigned int *funcp)
{
const char *p;
char *e;
unsigned long val;
unsigned long dom = 0, bus = 0;
unsigned int slot = 0;
unsigned int func = 0;
p = addr;
val = strtoul(p, ... | false | qemu | fdba487859bff44db21dc119ee2b1b3691c69f0f | int pci_parse_devaddr(const char *addr, int *domp, int *busp,
unsigned int *slotp, unsigned int *funcp)
{
const char *p;
char *e;
unsigned long val;
unsigned long dom = 0, bus = 0;
unsigned int slot = 0;
unsigned int func = 0;
p = addr;
val = strtoul(p, ... | {
"code": [],
"line_no": []
} | int FUNC_0(const char *VAR_0, int *VAR_1, int *VAR_2,
unsigned int *VAR_3, unsigned int *VAR_4)
{
const char *VAR_5;
char *VAR_6;
unsigned long VAR_7;
unsigned long VAR_8 = 0, VAR_9 = 0;
unsigned int VAR_10 = 0;
unsigned int VAR_11 = 0;
VAR_5 = VAR_0;
VA... | [
"int FUNC_0(const char *VAR_0, int *VAR_1, int *VAR_2,\nunsigned int *VAR_3, unsigned int *VAR_4)\n{",
"const char *VAR_5;",
"char *VAR_6;",
"unsigned long VAR_7;",
"unsigned long VAR_8 = 0, VAR_9 = 0;",
"unsigned int VAR_10 = 0;",
"unsigned int VAR_11 = 0;",
"VAR_5 = VAR_0;",
"VAR_7 = strtoul(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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[... |
4,390 | static void x86_cpu_load_features(X86CPU *cpu, Error **errp)
{
CPUX86State *env = &cpu->env;
FeatureWord w;
GList *l;
Error *local_err = NULL;
/*TODO: cpu->max_features incorrectly overwrites features
* set using "feat=on|off". Once we fix this, we can convert
* plus_features & m... | false | qemu | b8d834a00fa3ed4dad7d371e1a00938a126a54a0 | static void x86_cpu_load_features(X86CPU *cpu, Error **errp)
{
CPUX86State *env = &cpu->env;
FeatureWord w;
GList *l;
Error *local_err = NULL;
if (cpu->max_features) {
for (w = 0; w < FEATURE_WORDS; w++) {
env->features[w] =
x86_cpu_get_su... | {
"code": [],
"line_no": []
} | static void FUNC_0(X86CPU *VAR_0, Error **VAR_1)
{
CPUX86State *env = &VAR_0->env;
FeatureWord w;
GList *l;
Error *local_err = NULL;
if (VAR_0->max_features) {
for (w = 0; w < FEATURE_WORDS; w++) {
env->features[w] =
x86_cpu_get_supported_... | [
"static void FUNC_0(X86CPU *VAR_0, Error **VAR_1)\n{",
"CPUX86State *env = &VAR_0->env;",
"FeatureWord w;",
"GList *l;",
"Error *local_err = NULL;",
"if (VAR_0->max_features) {",
"for (w = 0; w < FEATURE_WORDS; w++) {",
"env->features[w] =\nx86_cpu_get_supported_feature_word(w, VAR_0->migratable);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[
57
],
[... |
4,391 | static void vnc_init_basic_info(SocketAddressLegacy *addr,
VncBasicInfo *info,
Error **errp)
{
switch (addr->type) {
case SOCKET_ADDRESS_LEGACY_KIND_INET:
info->host = g_strdup(addr->u.inet.data->host);
info->service = g_strd... | false | qemu | bd269ebc82fbaa5fe7ce5bc7c1770ac8acecd884 | static void vnc_init_basic_info(SocketAddressLegacy *addr,
VncBasicInfo *info,
Error **errp)
{
switch (addr->type) {
case SOCKET_ADDRESS_LEGACY_KIND_INET:
info->host = g_strdup(addr->u.inet.data->host);
info->service = g_strd... | {
"code": [],
"line_no": []
} | static void FUNC_0(SocketAddressLegacy *VAR_0,
VncBasicInfo *VAR_1,
Error **VAR_2)
{
switch (VAR_0->type) {
case SOCKET_ADDRESS_LEGACY_KIND_INET:
VAR_1->host = g_strdup(VAR_0->u.inet.data->host);
VAR_1->service = g_strdup(VAR... | [
"static void FUNC_0(SocketAddressLegacy *VAR_0,\nVncBasicInfo *VAR_1,\nError **VAR_2)\n{",
"switch (VAR_0->type) {",
"case SOCKET_ADDRESS_LEGACY_KIND_INET:\nVAR_1->host = g_strdup(VAR_0->u.inet.data->host);",
"VAR_1->service = g_strdup(VAR_0->u.inet.data->port);",
"if (VAR_0->u.inet.data->ipv6) {",
"VAR_1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
43,
45,
47,
49
],
[
51
],
[... |
4,392 | static int mirror_cow_align(MirrorBlockJob *s,
int64_t *sector_num,
int *nb_sectors)
{
bool need_cow;
int ret = 0;
int chunk_sectors = s->granularity >> BDRV_SECTOR_BITS;
int64_t align_sector_num = *sector_num;
int align_nb_sectors = *n... | false | qemu | b436982f04fb33bb29fcdea190bd1fdc97dc65ef | static int mirror_cow_align(MirrorBlockJob *s,
int64_t *sector_num,
int *nb_sectors)
{
bool need_cow;
int ret = 0;
int chunk_sectors = s->granularity >> BDRV_SECTOR_BITS;
int64_t align_sector_num = *sector_num;
int align_nb_sectors = *n... | {
"code": [],
"line_no": []
} | static int FUNC_0(MirrorBlockJob *VAR_0,
int64_t *VAR_1,
int *VAR_2)
{
bool need_cow;
int VAR_3 = 0;
int VAR_4 = VAR_0->granularity >> BDRV_SECTOR_BITS;
int64_t align_sector_num = *VAR_1;
int VAR_5 = *VAR_2;
int VAR_6 = VAR_4 * VAR... | [
"static int FUNC_0(MirrorBlockJob *VAR_0,\nint64_t *VAR_1,\nint *VAR_2)\n{",
"bool need_cow;",
"int VAR_3 = 0;",
"int VAR_4 = VAR_0->granularity >> BDRV_SECTOR_BITS;",
"int64_t align_sector_num = *VAR_1;",
"int VAR_5 = *VAR_2;",
"int VAR_6 = VAR_4 * VAR_0->max_iov;",
"need_cow = !test_bit(*VAR_1 / VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25,
27
],
[
29
],
[
31,
33,
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[
51
... |
4,393 | static void bonito_pciconf_writel(void *opaque, target_phys_addr_t addr,
uint32_t val)
{
PCIBonitoState *s = opaque;
DPRINTF("bonito_pciconf_writel "TARGET_FMT_plx" val %x \n", addr, val);
s->dev.config_write(&s->dev, addr, val, 4);
}
| false | qemu | b2bedb214469af55179d907a60cd67fed6b0779e | static void bonito_pciconf_writel(void *opaque, target_phys_addr_t addr,
uint32_t val)
{
PCIBonitoState *s = opaque;
DPRINTF("bonito_pciconf_writel "TARGET_FMT_plx" val %x \n", addr, val);
s->dev.config_write(&s->dev, addr, val, 4);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint32_t VAR_2)
{
PCIBonitoState *s = VAR_0;
DPRINTF("FUNC_0 "TARGET_FMT_plx" VAR_2 %x \n", VAR_1, VAR_2);
s->dev.config_write(&s->dev, VAR_1, VAR_2, 4);
}
| [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint32_t VAR_2)\n{",
"PCIBonitoState *s = VAR_0;",
"DPRINTF(\"FUNC_0 \"TARGET_FMT_plx\" VAR_2 %x \\n\", VAR_1, VAR_2);",
"s->dev.config_write(&s->dev, VAR_1, VAR_2, 4);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
]
] |
4,394 | static int vhdx_create(const char *filename, QemuOpts *opts, Error **errp)
{
int ret = 0;
uint64_t image_size = (uint64_t) 2 * GiB;
uint32_t log_size = 1 * MiB;
uint32_t block_size = 0;
uint64_t signature;
uint64_t metadata_offset;
bool use_zero_blocks = false;
gunichar2 *cr... | false | qemu | db1e80ee2ed6fc9eb6b203873b39752144f5577f | static int vhdx_create(const char *filename, QemuOpts *opts, Error **errp)
{
int ret = 0;
uint64_t image_size = (uint64_t) 2 * GiB;
uint32_t log_size = 1 * MiB;
uint32_t block_size = 0;
uint64_t signature;
uint64_t metadata_offset;
bool use_zero_blocks = false;
gunichar2 *cr... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0, QemuOpts *VAR_1, Error **VAR_2)
{
int VAR_3 = 0;
uint64_t image_size = (uint64_t) 2 * GiB;
uint32_t log_size = 1 * MiB;
uint32_t block_size = 0;
uint64_t signature;
uint64_t metadata_offset;
bool use_zero_blocks = false;
gunichar2 *creato... | [
"static int FUNC_0(const char *VAR_0, QemuOpts *VAR_1, Error **VAR_2)\n{",
"int VAR_3 = 0;",
"uint64_t image_size = (uint64_t) 2 * GiB;",
"uint32_t log_size = 1 * MiB;",
"uint32_t block_size = 0;",
"uint64_t signature;",
"uint64_t metadata_offset;",
"bool use_zero_blocks = false;",
"gunichar2 *cre... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
4,395 | static void vc1_mc_1mv(VC1Context *v, int dir)
{
MpegEncContext *s = &v->s;
DSPContext *dsp = &v->s.dsp;
H264ChromaContext *h264chroma = &v->h264chroma;
uint8_t *srcY, *srcU, *srcV;
int dxy, mx, my, uvmx, uvmy, src_x, src_y, uvsrc_x, uvsrc_y;
int off, off_uv;
int v_edge_pos = s->v_... | false | FFmpeg | 0d194ee51ed477f843900e657a7edbcbecdffa42 | static void vc1_mc_1mv(VC1Context *v, int dir)
{
MpegEncContext *s = &v->s;
DSPContext *dsp = &v->s.dsp;
H264ChromaContext *h264chroma = &v->h264chroma;
uint8_t *srcY, *srcU, *srcV;
int dxy, mx, my, uvmx, uvmy, src_x, src_y, uvsrc_x, uvsrc_y;
int off, off_uv;
int v_edge_pos = s->v_... | {
"code": [],
"line_no": []
} | static void FUNC_0(VC1Context *VAR_0, int VAR_1)
{
MpegEncContext *s = &VAR_0->s;
DSPContext *dsp = &VAR_0->s.dsp;
H264ChromaContext *h264chroma = &VAR_0->h264chroma;
uint8_t *srcY, *srcU, *srcV;
int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;
int VAR_11, VAR_12;
... | [
"static void FUNC_0(VC1Context *VAR_0, int VAR_1)\n{",
"MpegEncContext *s = &VAR_0->s;",
"DSPContext *dsp = &VAR_0->s.dsp;",
"H264ChromaContext *h264chroma = &VAR_0->h264chroma;",
"uint8_t *srcY, *srcU, *srcV;",
"int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;",
"int VAR_11, VAR_12... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23,
25,
27
],
[
31
],
[
33
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
53
],
[... |
4,396 | static void rng_egd_chr_read(void *opaque, const uint8_t *buf, int size)
{
RngEgd *s = RNG_EGD(opaque);
size_t buf_offset = 0;
while (size > 0 && s->parent.requests) {
RngRequest *req = s->parent.requests->data;
int len = MIN(size, req->size - req->offset);
memcpy(req->dat... | false | qemu | 9f14b0add1dcdbfa2ee61051d068211fb0a1fcc9 | static void rng_egd_chr_read(void *opaque, const uint8_t *buf, int size)
{
RngEgd *s = RNG_EGD(opaque);
size_t buf_offset = 0;
while (size > 0 && s->parent.requests) {
RngRequest *req = s->parent.requests->data;
int len = MIN(size, req->size - req->offset);
memcpy(req->dat... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
RngEgd *s = RNG_EGD(VAR_0);
size_t buf_offset = 0;
while (VAR_2 > 0 && s->parent.requests) {
RngRequest *req = s->parent.requests->data;
int VAR_3 = MIN(VAR_2, req->VAR_2 - req->offset);
memcpy(req->data + ... | [
"static void FUNC_0(void *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"RngEgd *s = RNG_EGD(VAR_0);",
"size_t buf_offset = 0;",
"while (VAR_2 > 0 && s->parent.requests) {",
"RngRequest *req = s->parent.requests->data;",
"int VAR_3 = MIN(VAR_2, req->VAR_2 - req->offset);",
"memcpy(req->data + req->offset... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31,
33
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
]
] |
4,397 | static void virgl_cmd_get_capset(VirtIOGPU *g,
struct virtio_gpu_ctrl_command *cmd)
{
struct virtio_gpu_get_capset gc;
struct virtio_gpu_resp_capset *resp;
uint32_t max_ver, max_size;
VIRTIO_GPU_FILL_CMD(gc);
virgl_renderer_get_cap_set(gc.capset_id, &max_ver... | false | qemu | abd7f08b2353f43274b785db8c7224f082ef4d31 | static void virgl_cmd_get_capset(VirtIOGPU *g,
struct virtio_gpu_ctrl_command *cmd)
{
struct virtio_gpu_get_capset gc;
struct virtio_gpu_resp_capset *resp;
uint32_t max_ver, max_size;
VIRTIO_GPU_FILL_CMD(gc);
virgl_renderer_get_cap_set(gc.capset_id, &max_ver... | {
"code": [],
"line_no": []
} | static void FUNC_0(VirtIOGPU *VAR_0,
struct virtio_gpu_ctrl_command *VAR_1)
{
struct virtio_gpu_get_capset VAR_2;
struct virtio_gpu_resp_capset *VAR_3;
uint32_t max_ver, max_size;
VIRTIO_GPU_FILL_CMD(VAR_2);
virgl_renderer_get_cap_set(VAR_2.capset_id, &max_v... | [
"static void FUNC_0(VirtIOGPU *VAR_0,\nstruct virtio_gpu_ctrl_command *VAR_1)\n{",
"struct virtio_gpu_get_capset VAR_2;",
"struct virtio_gpu_resp_capset *VAR_3;",
"uint32_t max_ver, max_size;",
"VIRTIO_GPU_FILL_CMD(VAR_2);",
"virgl_renderer_get_cap_set(VAR_2.capset_id, &max_ver,\n&max_size);",
"VAR_3 = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
21
],
[
25
],
[
27,
29,
31
],
[
33
],
[
35
],
[
37
]
] |
4,398 | static int get_device_type(SCSIDiskState *s)
{
BlockDriverState *bdrv = s->qdev.conf.bs;
uint8_t cmd[16];
uint8_t buf[36];
uint8_t sensebuf[8];
sg_io_hdr_t io_header;
int ret;
memset(cmd, 0, sizeof(cmd));
memset(buf, 0, sizeof(buf));
cmd[0] = INQUIRY;
cmd[4] = sizeof... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | static int get_device_type(SCSIDiskState *s)
{
BlockDriverState *bdrv = s->qdev.conf.bs;
uint8_t cmd[16];
uint8_t buf[36];
uint8_t sensebuf[8];
sg_io_hdr_t io_header;
int ret;
memset(cmd, 0, sizeof(cmd));
memset(buf, 0, sizeof(buf));
cmd[0] = INQUIRY;
cmd[4] = sizeof... | {
"code": [],
"line_no": []
} | static int FUNC_0(SCSIDiskState *VAR_0)
{
BlockDriverState *bdrv = VAR_0->qdev.conf.bs;
uint8_t cmd[16];
uint8_t buf[36];
uint8_t sensebuf[8];
sg_io_hdr_t io_header;
int VAR_1;
memset(cmd, 0, sizeof(cmd));
memset(buf, 0, sizeof(buf));
cmd[0] = INQUIRY;
cmd[4] = sizeo... | [
"static int FUNC_0(SCSIDiskState *VAR_0)\n{",
"BlockDriverState *bdrv = VAR_0->qdev.conf.bs;",
"uint8_t cmd[16];",
"uint8_t buf[36];",
"uint8_t sensebuf[8];",
"sg_io_hdr_t io_header;",
"int VAR_1;",
"memset(cmd, 0, sizeof(cmd));",
"memset(buf, 0, sizeof(buf));",
"cmd[0] = INQUIRY;",
"cmd[4] = si... | [
0,
0,
0,
0,
0,
0,
0,
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
... |
4,399 | static always_inline void powerpc_excp (CPUState *env,
int excp_model, int excp)
{
target_ulong msr, vector;
int srr0, srr1, asrr0, asrr1;
if (loglevel & CPU_LOG_INT) {
fprintf(logfile, "Raise exception at 0x" ADDRX " => 0x%08x (%02x)\n",
... | false | qemu | e63ecc6f68d5f9349683aef5d74e36137eafb72d | static always_inline void powerpc_excp (CPUState *env,
int excp_model, int excp)
{
target_ulong msr, vector;
int srr0, srr1, asrr0, asrr1;
if (loglevel & CPU_LOG_INT) {
fprintf(logfile, "Raise exception at 0x" ADDRX " => 0x%08x (%02x)\n",
... | {
"code": [],
"line_no": []
} | static always_inline void FUNC_0 (CPUState *env,
int excp_model, int excp)
{
target_ulong msr, vector;
int VAR_0, VAR_1, VAR_2, VAR_3;
if (loglevel & CPU_LOG_INT) {
fprintf(logfile, "Raise exception at 0x" ADDRX " => 0x%08x (%02x)\n",
... | [
"static always_inline void FUNC_0 (CPUState *env,\nint excp_model, int excp)\n{",
"target_ulong msr, vector;",
"int VAR_0, VAR_1, VAR_2, VAR_3;",
"if (loglevel & CPU_LOG_INT) {",
"fprintf(logfile, \"Raise exception at 0x\" ADDRX \" => 0x%08x (%02x)\\n\",\nenv->nip, excp, env->error_code);",
"}",
"msr = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
39
],
[
41,
43
],
[
45
],
[
47,
49
],
[... |
4,400 | static int parse_pair(JSONParserContext *ctxt, QDict *dict, QList **tokens, va_list *ap)
{
QObject *key = NULL, *token = NULL, *value, *peek;
QList *working = qlist_copy(*tokens);
peek = qlist_peek(working);
if (peek == NULL) {
parse_error(ctxt, NULL, "premature EOI");
goto out;... | false | qemu | 65c0f1e9558c7c762cdb333406243fff1d687117 | static int parse_pair(JSONParserContext *ctxt, QDict *dict, QList **tokens, va_list *ap)
{
QObject *key = NULL, *token = NULL, *value, *peek;
QList *working = qlist_copy(*tokens);
peek = qlist_peek(working);
if (peek == NULL) {
parse_error(ctxt, NULL, "premature EOI");
goto out;... | {
"code": [],
"line_no": []
} | static int FUNC_0(JSONParserContext *VAR_0, QDict *VAR_1, QList **VAR_2, va_list *VAR_3)
{
QObject *key = NULL, *token = NULL, *value, *peek;
QList *working = qlist_copy(*VAR_2);
peek = qlist_peek(working);
if (peek == NULL) {
parse_error(VAR_0, NULL, "premature EOI");
goto out;... | [
"static int FUNC_0(JSONParserContext *VAR_0, QDict *VAR_1, QList **VAR_2, va_list *VAR_3)\n{",
"QObject *key = NULL, *token = NULL, *value, *peek;",
"QList *working = qlist_copy(*VAR_2);",
"peek = qlist_peek(working);",
"if (peek == NULL) {",
"parse_error(VAR_0, NULL, \"premature EOI\");",
"goto out;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49... |
4,401 | void qemu_input_event_send_key_number(QemuConsole *src, int num, bool down)
{
KeyValue *key = g_new0(KeyValue, 1);
key->type = KEY_VALUE_KIND_NUMBER;
key->u.number = num;
qemu_input_event_send_key(src, key, down);
}
| false | qemu | 32bafa8fdd098d52fbf1102d5a5e48d29398c0aa | void qemu_input_event_send_key_number(QemuConsole *src, int num, bool down)
{
KeyValue *key = g_new0(KeyValue, 1);
key->type = KEY_VALUE_KIND_NUMBER;
key->u.number = num;
qemu_input_event_send_key(src, key, down);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(QemuConsole *VAR_0, int VAR_1, bool VAR_2)
{
KeyValue *key = g_new0(KeyValue, 1);
key->type = KEY_VALUE_KIND_NUMBER;
key->u.number = VAR_1;
qemu_input_event_send_key(VAR_0, key, VAR_2);
}
| [
"void FUNC_0(QemuConsole *VAR_0, int VAR_1, bool VAR_2)\n{",
"KeyValue *key = g_new0(KeyValue, 1);",
"key->type = KEY_VALUE_KIND_NUMBER;",
"key->u.number = VAR_1;",
"qemu_input_event_send_key(VAR_0, key, VAR_2);",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
4,402 | opts_start_optional(Visitor *v, bool *present, const char *name,
Error **errp)
{
OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, v);
/* we only support a single mandatory scalar field in a list node */
assert(ov->repeated_opts == NULL);
*present = (lookup_distinct(ov, na... | false | qemu | d95704341280fc521dc2b16bbbc5858f6647e2c3 | opts_start_optional(Visitor *v, bool *present, const char *name,
Error **errp)
{
OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, v);
assert(ov->repeated_opts == NULL);
*present = (lookup_distinct(ov, name, NULL) != NULL);
}
| {
"code": [],
"line_no": []
} | FUNC_0(Visitor *VAR_0, bool *VAR_1, const char *VAR_2,
Error **VAR_3)
{
OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, VAR_0);
assert(ov->repeated_opts == NULL);
*VAR_1 = (lookup_distinct(ov, VAR_2, NULL) != NULL);
}
| [
"FUNC_0(Visitor *VAR_0, bool *VAR_1, const char *VAR_2,\nError **VAR_3)\n{",
"OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, VAR_0);",
"assert(ov->repeated_opts == NULL);",
"*VAR_1 = (lookup_distinct(ov, VAR_2, NULL) != NULL);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
13
],
[
15
],
[
17
]
] |
4,403 | static void async_complete(void *opaque)
{
USBHostDevice *s = opaque;
AsyncURB *aurb;
int urbs = 0;
while (1) {
USBPacket *p;
int r = ioctl(s->fd, USBDEVFS_REAPURBNDELAY, &aurb);
if (r < 0) {
if (errno == EAGAIN) {
if (urbs > 2) {
... | false | qemu | 079d0b7f1eedcc634c371fe05b617fdc55c8b762 | static void async_complete(void *opaque)
{
USBHostDevice *s = opaque;
AsyncURB *aurb;
int urbs = 0;
while (1) {
USBPacket *p;
int r = ioctl(s->fd, USBDEVFS_REAPURBNDELAY, &aurb);
if (r < 0) {
if (errno == EAGAIN) {
if (urbs > 2) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
USBHostDevice *s = VAR_0;
AsyncURB *aurb;
int VAR_1 = 0;
while (1) {
USBPacket *p;
int VAR_2 = ioctl(s->fd, USBDEVFS_REAPURBNDELAY, &aurb);
if (VAR_2 < 0) {
if (errno == EAGAIN) {
if (VAR_1 > 2) {
... | [
"static void FUNC_0(void *VAR_0)\n{",
"USBHostDevice *s = VAR_0;",
"AsyncURB *aurb;",
"int VAR_1 = 0;",
"while (1) {",
"USBPacket *p;",
"int VAR_2 = ioctl(s->fd, USBDEVFS_REAPURBNDELAY, &aurb);",
"if (VAR_2 < 0) {",
"if (errno == EAGAIN) {",
"if (VAR_1 > 2) {",
"fprintf(stderr, \"husb: %d iso VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
4,404 | static void next(DBDMA_channel *ch)
{
uint32_t cp;
ch->regs[DBDMA_STATUS] &= cpu_to_be32(~BT);
cp = be32_to_cpu(ch->regs[DBDMA_CMDPTR_LO]);
ch->regs[DBDMA_CMDPTR_LO] = cpu_to_be32(cp + sizeof(dbdma_cmd));
dbdma_cmdptr_load(ch);
}
| false | qemu | ad674e53b5cce265fadafbde2c6a4f190345cd00 | static void next(DBDMA_channel *ch)
{
uint32_t cp;
ch->regs[DBDMA_STATUS] &= cpu_to_be32(~BT);
cp = be32_to_cpu(ch->regs[DBDMA_CMDPTR_LO]);
ch->regs[DBDMA_CMDPTR_LO] = cpu_to_be32(cp + sizeof(dbdma_cmd));
dbdma_cmdptr_load(ch);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(DBDMA_channel *VAR_0)
{
uint32_t cp;
VAR_0->regs[DBDMA_STATUS] &= cpu_to_be32(~BT);
cp = be32_to_cpu(VAR_0->regs[DBDMA_CMDPTR_LO]);
VAR_0->regs[DBDMA_CMDPTR_LO] = cpu_to_be32(cp + sizeof(dbdma_cmd));
dbdma_cmdptr_load(VAR_0);
}
| [
"static void FUNC_0(DBDMA_channel *VAR_0)\n{",
"uint32_t cp;",
"VAR_0->regs[DBDMA_STATUS] &= cpu_to_be32(~BT);",
"cp = be32_to_cpu(VAR_0->regs[DBDMA_CMDPTR_LO]);",
"VAR_0->regs[DBDMA_CMDPTR_LO] = cpu_to_be32(cp + sizeof(dbdma_cmd));",
"dbdma_cmdptr_load(VAR_0);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
4,405 | DeviceState *nand_init(BlockBackend *blk, int manf_id, int chip_id)
{
DeviceState *dev;
if (nand_flash_ids[chip_id].size == 0) {
hw_error("%s: Unsupported NAND chip ID.\n", __FUNCTION__);
}
dev = DEVICE(object_new(TYPE_NAND));
qdev_prop_set_uint8(dev, "manufacturer_id", manf_id);
... | false | qemu | a89f364ae8740dfc31b321eed9ee454e996dc3c1 | DeviceState *nand_init(BlockBackend *blk, int manf_id, int chip_id)
{
DeviceState *dev;
if (nand_flash_ids[chip_id].size == 0) {
hw_error("%s: Unsupported NAND chip ID.\n", __FUNCTION__);
}
dev = DEVICE(object_new(TYPE_NAND));
qdev_prop_set_uint8(dev, "manufacturer_id", manf_id);
... | {
"code": [],
"line_no": []
} | DeviceState *FUNC_0(BlockBackend *blk, int manf_id, int chip_id)
{
DeviceState *dev;
if (nand_flash_ids[chip_id].size == 0) {
hw_error("%s: Unsupported NAND chip ID.\n", __FUNCTION__);
}
dev = DEVICE(object_new(TYPE_NAND));
qdev_prop_set_uint8(dev, "manufacturer_id", manf_id);
... | [
"DeviceState *FUNC_0(BlockBackend *blk, int manf_id, int chip_id)\n{",
"DeviceState *dev;",
"if (nand_flash_ids[chip_id].size == 0) {",
"hw_error(\"%s: Unsupported NAND chip ID.\\n\", __FUNCTION__);",
"}",
"dev = DEVICE(object_new(TYPE_NAND));",
"qdev_prop_set_uint8(dev, \"manufacturer_id\", manf_id);",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
]
] |
4,406 | static void decode_mb(MadContext *t, int inter)
{
MpegEncContext *s = &t->s;
int mv_map = 0;
int mv_x, mv_y;
int j;
if (inter) {
int v = decode210(&s->gb);
if (v < 2) {
mv_map = v ? get_bits(&s->gb, 6) : 63;
mv_x = decode_motion(&s->gb);
... | false | FFmpeg | 1d0ae92a259b924952856de1a5ca0dc6fd5031e5 | static void decode_mb(MadContext *t, int inter)
{
MpegEncContext *s = &t->s;
int mv_map = 0;
int mv_x, mv_y;
int j;
if (inter) {
int v = decode210(&s->gb);
if (v < 2) {
mv_map = v ? get_bits(&s->gb, 6) : 63;
mv_x = decode_motion(&s->gb);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(MadContext *VAR_0, int VAR_1)
{
MpegEncContext *s = &VAR_0->s;
int VAR_2 = 0;
int VAR_3, VAR_4;
int VAR_5;
if (VAR_1) {
int VAR_6 = decode210(&s->gb);
if (VAR_6 < 2) {
VAR_2 = VAR_6 ? get_bits(&s->gb, 6) : 63;
VAR_3 = decode_moti... | [
"static void FUNC_0(MadContext *VAR_0, int VAR_1)\n{",
"MpegEncContext *s = &VAR_0->s;",
"int VAR_2 = 0;",
"int VAR_3, VAR_4;",
"int VAR_5;",
"if (VAR_1) {",
"int VAR_6 = decode210(&s->gb);",
"if (VAR_6 < 2) {",
"VAR_2 = VAR_6 ? get_bits(&s->gb, 6) : 63;",
"VAR_3 = decode_motion(&s->gb);",
"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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[... |
4,407 | static void ioq_submit(LinuxAioState *s)
{
int ret, len;
struct qemu_laiocb *aiocb;
struct iocb *iocbs[MAX_QUEUED_IO];
QSIMPLEQ_HEAD(, qemu_laiocb) completed;
do {
len = 0;
QSIMPLEQ_FOREACH(aiocb, &s->io_q.pending, next) {
iocbs[len++] = &aiocb->iocb;
... | false | qemu | 5e1b34a3fa0a0fbf46628aab10cc49f6f855520e | static void ioq_submit(LinuxAioState *s)
{
int ret, len;
struct qemu_laiocb *aiocb;
struct iocb *iocbs[MAX_QUEUED_IO];
QSIMPLEQ_HEAD(, qemu_laiocb) completed;
do {
len = 0;
QSIMPLEQ_FOREACH(aiocb, &s->io_q.pending, next) {
iocbs[len++] = &aiocb->iocb;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(LinuxAioState *VAR_0)
{
int VAR_1, VAR_2;
struct qemu_laiocb *VAR_3;
struct iocb *VAR_4[MAX_QUEUED_IO];
QSIMPLEQ_HEAD(, qemu_laiocb) completed;
do {
VAR_2 = 0;
QSIMPLEQ_FOREACH(VAR_3, &VAR_0->io_q.pending, next) {
VAR_4[VAR_2++] = &VAR_3->ioc... | [
"static void FUNC_0(LinuxAioState *VAR_0)\n{",
"int VAR_1, VAR_2;",
"struct qemu_laiocb *VAR_3;",
"struct iocb *VAR_4[MAX_QUEUED_IO];",
"QSIMPLEQ_HEAD(, qemu_laiocb) completed;",
"do {",
"VAR_2 = 0;",
"QSIMPLEQ_FOREACH(VAR_3, &VAR_0->io_q.pending, next) {",
"VAR_4[VAR_2++] = &VAR_3->iocb;",
"if (V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
4,409 | static void envelope_instant16(WaveformContext *s, AVFrame *out, int plane, int component)
{
const int dst_linesize = out->linesize[component] / 2;
const int bg = s->bg_color[component] * (s->size / 256);
const int limit = s->size - 1;
const int is_chroma = (component == 1 || component == 2);
... | false | FFmpeg | db592f3b03a21d5bd5237021c00af3ce0431fc60 | static void envelope_instant16(WaveformContext *s, AVFrame *out, int plane, int component)
{
const int dst_linesize = out->linesize[component] / 2;
const int bg = s->bg_color[component] * (s->size / 256);
const int limit = s->size - 1;
const int is_chroma = (component == 1 || component == 2);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(WaveformContext *VAR_0, AVFrame *VAR_1, int VAR_2, int VAR_3)
{
const int VAR_4 = VAR_1->linesize[VAR_3] / 2;
const int VAR_5 = VAR_0->bg_color[VAR_3] * (VAR_0->size / 256);
const int VAR_6 = VAR_0->size - 1;
const int VAR_7 = (VAR_3 == 1 || VAR_3 == 2);
const int VAR_8 = (V... | [
"static void FUNC_0(WaveformContext *VAR_0, AVFrame *VAR_1, int VAR_2, int VAR_3)\n{",
"const int VAR_4 = VAR_1->linesize[VAR_3] / 2;",
"const int VAR_5 = VAR_0->bg_color[VAR_3] * (VAR_0->size / 256);",
"const int VAR_6 = VAR_0->size - 1;",
"const int VAR_7 = (VAR_3 == 1 || VAR_3 == 2);",
"const int VAR_8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
... |
4,410 | static int advanced_decode_picture_header(VC9Context *v)
{
static const int type_table[4] = { P_TYPE, B_TYPE, I_TYPE, BI_TYPE };
int type, i, ret;
if (v->interlace)
{
v->fcm = get_bits(&v->gb, 1);
if (v->fcm) v->fcm = 2+get_bits(&v->gb, 1);
}
type = get_prefix(&v->gb... | false | FFmpeg | e5540b3fd30367ce3cc33b2f34a04b660dbc4b38 | static int advanced_decode_picture_header(VC9Context *v)
{
static const int type_table[4] = { P_TYPE, B_TYPE, I_TYPE, BI_TYPE };
int type, i, ret;
if (v->interlace)
{
v->fcm = get_bits(&v->gb, 1);
if (v->fcm) v->fcm = 2+get_bits(&v->gb, 1);
}
type = get_prefix(&v->gb... | {
"code": [],
"line_no": []
} | static int FUNC_0(VC9Context *VAR_0)
{
static const int VAR_1[4] = { P_TYPE, B_TYPE, I_TYPE, BI_TYPE };
int VAR_2, VAR_3, VAR_4;
if (VAR_0->interlace)
{
VAR_0->fcm = get_bits(&VAR_0->gb, 1);
if (VAR_0->fcm) VAR_0->fcm = 2+get_bits(&VAR_0->gb, 1);
}
VAR_2 = get_prefix... | [
"static int FUNC_0(VC9Context *VAR_0)\n{",
"static const int VAR_1[4] = { P_TYPE, B_TYPE, I_TYPE, BI_TYPE };",
"int VAR_2, VAR_3, VAR_4;",
"if (VAR_0->interlace)\n{",
"VAR_0->fcm = get_bits(&VAR_0->gb, 1);",
"if (VAR_0->fcm) VAR_0->fcm = 2+get_bits(&VAR_0->gb, 1);",
"}",
"VAR_2 = get_prefix(&VAR_0->gb... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
... |
4,412 | static void dss_sp_unpack_coeffs(DssSpContext *p, const uint8_t *src)
{
GetBitContext gb;
DssSpFrame *fparam = &p->fparam;
int i;
int subframe_idx;
uint32_t combined_pitch;
uint32_t tmp;
uint32_t pitch_lag;
for (i = 0; i < DSS_SP_FRAME_SIZE; i += 2) {
p->bits[i] =... | false | FFmpeg | b11edbd289e454a173914049ae4643a5498520d9 | static void dss_sp_unpack_coeffs(DssSpContext *p, const uint8_t *src)
{
GetBitContext gb;
DssSpFrame *fparam = &p->fparam;
int i;
int subframe_idx;
uint32_t combined_pitch;
uint32_t tmp;
uint32_t pitch_lag;
for (i = 0; i < DSS_SP_FRAME_SIZE; i += 2) {
p->bits[i] =... | {
"code": [],
"line_no": []
} | static void FUNC_0(DssSpContext *VAR_0, const uint8_t *VAR_1)
{
GetBitContext gb;
DssSpFrame *fparam = &VAR_0->fparam;
int VAR_2;
int VAR_3;
uint32_t combined_pitch;
uint32_t tmp;
uint32_t pitch_lag;
for (VAR_2 = 0; VAR_2 < DSS_SP_FRAME_SIZE; VAR_2 += 2) {
VAR_0->bits... | [
"static void FUNC_0(DssSpContext *VAR_0, const uint8_t *VAR_1)\n{",
"GetBitContext gb;",
"DssSpFrame *fparam = &VAR_0->fparam;",
"int VAR_2;",
"int VAR_3;",
"uint32_t combined_pitch;",
"uint32_t tmp;",
"uint32_t pitch_lag;",
"for (VAR_2 = 0; VAR_2 < DSS_SP_FRAME_SIZE; VAR_2 += 2) {",
"VAR_0->bits[... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
... |
4,413 | int av_packet_copy_props(AVPacket *dst, const AVPacket *src)
{
int i;
dst->pts = src->pts;
dst->dts = src->dts;
dst->pos = src->pos;
dst->duration = src->duration;
dst->convergence_duration = src->convergence_duration;
... | false | FFmpeg | cdf58f0599c39852ee3beafe5f64af7d57d4215b | int av_packet_copy_props(AVPacket *dst, const AVPacket *src)
{
int i;
dst->pts = src->pts;
dst->dts = src->dts;
dst->pos = src->pos;
dst->duration = src->duration;
dst->convergence_duration = src->convergence_duration;
... | {
"code": [],
"line_no": []
} | int FUNC_0(AVPacket *VAR_0, const AVPacket *VAR_1)
{
int VAR_2;
VAR_0->pts = VAR_1->pts;
VAR_0->dts = VAR_1->dts;
VAR_0->pos = VAR_1->pos;
VAR_0->duration = VAR_1->duration;
VAR_0->convergence_duration = VAR_1->convergence_d... | [
"int FUNC_0(AVPacket *VAR_0, const AVPacket *VAR_1)\n{",
"int VAR_2;",
"VAR_0->pts = VAR_1->pts;",
"VAR_0->dts = VAR_1->dts;",
"VAR_0->pos = VAR_1->pos;",
"VAR_0->duration = VAR_1->duration;",
"VAR_0->convergence_duration = VAR_1->convergenc... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47... |
4,415 | void configure_icount(const char *option)
{
vmstate_register(NULL, 0, &vmstate_timers, &timers_state);
if (!option)
return;
#ifdef CONFIG_IOTHREAD
vm_clock->warp_timer = qemu_new_timer_ns(rt_clock, icount_warp_rt, NULL);
#endif
if (strcmp(option, "auto") != 0) {
icount_time_... | true | qemu | 12d4536f7d911b6d87a766ad7300482ea663cea2 | void configure_icount(const char *option)
{
vmstate_register(NULL, 0, &vmstate_timers, &timers_state);
if (!option)
return;
#ifdef CONFIG_IOTHREAD
vm_clock->warp_timer = qemu_new_timer_ns(rt_clock, icount_warp_rt, NULL);
#endif
if (strcmp(option, "auto") != 0) {
icount_time_... | {
"code": [
"#ifdef CONFIG_IOTHREAD",
"#endif",
"#ifdef CONFIG_IOTHREAD",
"#endif",
"#endif",
"#ifdef CONFIG_IOTHREAD",
"#endif",
"#ifdef CONFIG_IOTHREAD",
"#endif",
"#ifdef CONFIG_IOTHREAD",
"#endif",
"#endif",
"#endif",
"#endif",
"#ifdef CONFIG_IOTHREAD",
... | void FUNC_0(const char *VAR_0)
{
vmstate_register(NULL, 0, &vmstate_timers, &timers_state);
if (!VAR_0)
return;
#ifdef CONFIG_IOTHREAD
vm_clock->warp_timer = qemu_new_timer_ns(rt_clock, icount_warp_rt, NULL);
#endif
if (strcmp(VAR_0, "auto") != 0) {
icount_time_shift = strto... | [
"void FUNC_0(const char *VAR_0)\n{",
"vmstate_register(NULL, 0, &vmstate_timers, &timers_state);",
"if (!VAR_0)\nreturn;",
"#ifdef CONFIG_IOTHREAD\nvm_clock->warp_timer = qemu_new_timer_ns(rt_clock, icount_warp_rt, NULL);",
"#endif\nif (strcmp(VAR_0, \"auto\") != 0) {",
"icount_time_shift = strtol(VAR_0, ... | [
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
13,
15
],
[
17,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
41
],
[
55
],
[
57,
59
],
[
61
],
[
63,
65
],
[
67
]
] |
4,416 | static int spapr_set_associativity(void *fdt, sPAPREnvironment *spapr)
{
int ret = 0, offset;
CPUPPCState *env;
char cpu_model[32];
int smt = kvmppc_smt_threads();
assert(spapr->cpu_model);
for (env = first_cpu; env != NULL; env = env->next_cpu) {
uint32_t associativity[] = {... | true | qemu | 7f763a5d994bbddb50705d2e50decdf52937521f | static int spapr_set_associativity(void *fdt, sPAPREnvironment *spapr)
{
int ret = 0, offset;
CPUPPCState *env;
char cpu_model[32];
int smt = kvmppc_smt_threads();
assert(spapr->cpu_model);
for (env = first_cpu; env != NULL; env = env->next_cpu) {
uint32_t associativity[] = {... | {
"code": [
"static int spapr_set_associativity(void *fdt, sPAPREnvironment *spapr)",
" ret = fdt_setprop(fdt, offset, \"ibm,associativity\", associativity,",
" sizeof(associativity));",
" int smt = kvmppc_smt_threads();",
" if (ret < 0) {",
" for (... | static int FUNC_0(void *VAR_0, sPAPREnvironment *VAR_1)
{
int VAR_2 = 0, VAR_3;
CPUPPCState *env;
char VAR_4[32];
int VAR_5 = kvmppc_smt_threads();
assert(VAR_1->VAR_4);
for (env = first_cpu; env != NULL; env = env->next_cpu) {
uint32_t associativity[] = {cpu_to_be32(0x5),
... | [
"static int FUNC_0(void *VAR_0, sPAPREnvironment *VAR_1)\n{",
"int VAR_2 = 0, VAR_3;",
"CPUPPCState *env;",
"char VAR_4[32];",
"int VAR_5 = kvmppc_smt_threads();",
"assert(VAR_1->VAR_4);",
"for (env = first_cpu; env != NULL; env = env->next_cpu) {",
"uint32_t associativity[] = {cpu_to_be32(0x5),",
"... | [
1,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23,
25,
27,
29,
31
],
[
35
],
[
37
],
[
39
],
[
43,
45
],
[
49
],
[
51
],
[
53
],
[
55
],
[... |
4,417 | static void virtio_net_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq)
{
VirtIONet *n = VIRTIO_NET(vdev);
struct virtio_net_ctrl_hdr ctrl;
virtio_net_ctrl_ack status = VIRTIO_NET_ERR;
VirtQueueElement elem;
size_t s;
struct iovec *iov;
unsigned int iov_cnt;
while (virtqueue_pop... | true | qemu | 771b6ed37e3aa188a7485560b949a41c6cf174dc | static void virtio_net_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq)
{
VirtIONet *n = VIRTIO_NET(vdev);
struct virtio_net_ctrl_hdr ctrl;
virtio_net_ctrl_ack status = VIRTIO_NET_ERR;
VirtQueueElement elem;
size_t s;
struct iovec *iov;
unsigned int iov_cnt;
while (virtqueue_pop... | {
"code": [
" struct iovec *iov;",
" iov = elem.out_sg;"
],
"line_no": [
15,
35
]
} | static void FUNC_0(VirtIODevice *VAR_0, VirtQueue *VAR_1)
{
VirtIONet *n = VIRTIO_NET(VAR_0);
struct virtio_net_ctrl_hdr VAR_2;
virtio_net_ctrl_ack status = VIRTIO_NET_ERR;
VirtQueueElement elem;
size_t s;
struct iovec *VAR_3;
unsigned int VAR_4;
while (virtqueue_pop(VAR_1, &e... | [
"static void FUNC_0(VirtIODevice *VAR_0, VirtQueue *VAR_1)\n{",
"VirtIONet *n = VIRTIO_NET(VAR_0);",
"struct virtio_net_ctrl_hdr VAR_2;",
"virtio_net_ctrl_ack status = VIRTIO_NET_ERR;",
"VirtQueueElement elem;",
"size_t s;",
"struct iovec *VAR_3;",
"unsigned int VAR_4;",
"while (virtqueue_pop(VAR_1,... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
4,418 | static void *oss_audio_init (void)
{
OSSConf *conf = g_malloc(sizeof(OSSConf));
*conf = glob_conf;
if (access(conf->devpath_in, R_OK | W_OK) < 0 ||
access(conf->devpath_out, R_OK | W_OK) < 0) {
return NULL;
}
return conf;
} | true | qemu | 2828a307232ffceeddec9feb6a87ac660b68b693 | static void *oss_audio_init (void)
{
OSSConf *conf = g_malloc(sizeof(OSSConf));
*conf = glob_conf;
if (access(conf->devpath_in, R_OK | W_OK) < 0 ||
access(conf->devpath_out, R_OK | W_OK) < 0) {
return NULL;
}
return conf;
} | {
"code": [],
"line_no": []
} | static void *FUNC_0 (void)
{
OSSConf *conf = g_malloc(sizeof(OSSConf));
*conf = glob_conf;
if (access(conf->devpath_in, R_OK | W_OK) < 0 ||
access(conf->devpath_out, R_OK | W_OK) < 0) {
return NULL;
}
return conf;
} | [
"static void *FUNC_0 (void)\n{",
"OSSConf *conf = g_malloc(sizeof(OSSConf));",
"*conf = glob_conf;",
"if (access(conf->devpath_in, R_OK | W_OK) < 0 ||\naccess(conf->devpath_out, R_OK | W_OK) < 0) {",
"return NULL;",
"}",
"return conf;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
16
],
[
18
],
[
20
],
[
22
]
] |
4,419 | static inline int get_len(LZOContext *c, int x, int mask)
{
int cnt = x & mask;
if (!cnt) {
while (!(x = get_byte(c)))
cnt += 255;
cnt += mask + x;
}
return cnt;
}
| true | FFmpeg | d6af26c55c1ea30f85a7d9edbc373f53be1743ee | static inline int get_len(LZOContext *c, int x, int mask)
{
int cnt = x & mask;
if (!cnt) {
while (!(x = get_byte(c)))
cnt += 255;
cnt += mask + x;
}
return cnt;
}
| {
"code": [
" while (!(x = get_byte(c)))"
],
"line_no": [
9
]
} | static inline int FUNC_0(LZOContext *VAR_0, int VAR_1, int VAR_2)
{
int VAR_3 = VAR_1 & VAR_2;
if (!VAR_3) {
while (!(VAR_1 = get_byte(VAR_0)))
VAR_3 += 255;
VAR_3 += VAR_2 + VAR_1;
}
return VAR_3;
}
| [
"static inline int FUNC_0(LZOContext *VAR_0, int VAR_1, int VAR_2)\n{",
"int VAR_3 = VAR_1 & VAR_2;",
"if (!VAR_3) {",
"while (!(VAR_1 = get_byte(VAR_0)))\nVAR_3 += 255;",
"VAR_3 += VAR_2 + VAR_1;",
"}",
"return VAR_3;",
"}"
] | [
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
4,420 | static void rtas_write_pci_config(sPAPREnvironment *spapr,
uint32_t token, uint32_t nargs,
target_ulong args,
uint32_t nret, target_ulong rets)
{
uint32_t val, size, addr;
PCIDevice *dev = find_dev(spapr,... | true | qemu | c9c3c80af71dd2b7813d1ada9b14cb51df584221 | static void rtas_write_pci_config(sPAPREnvironment *spapr,
uint32_t token, uint32_t nargs,
target_ulong args,
uint32_t nret, target_ulong rets)
{
uint32_t val, size, addr;
PCIDevice *dev = find_dev(spapr,... | {
"code": [
" pci_default_write_config(dev, addr, val, size);",
" pci_default_write_config(dev, addr, val, size);"
],
"line_no": [
31,
31
]
} | static void FUNC_0(sPAPREnvironment *VAR_0,
uint32_t VAR_1, uint32_t VAR_2,
target_ulong VAR_3,
uint32_t VAR_4, target_ulong VAR_5)
{
uint32_t val, size, addr;
PCIDevice *dev = find_dev(VAR_0, 0, rtas_ld(... | [
"static void FUNC_0(sPAPREnvironment *VAR_0,\nuint32_t VAR_1, uint32_t VAR_2,\ntarget_ulong VAR_3,\nuint32_t VAR_4, target_ulong VAR_5)\n{",
"uint32_t val, size, addr;",
"PCIDevice *dev = find_dev(VAR_0, 0, rtas_ld(VAR_3, 0));",
"if (!dev) {",
"rtas_st(VAR_5, 0, -1);",
"return;",
"}",
"val = rtas_ld(V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
4,422 | QEMUFile *qemu_fopen(const char *filename, const char *mode)
{
QEMUFileStdio *s;
if (qemu_file_mode_is_not_valid(mode)) {
return NULL;
}
s = g_malloc0(sizeof(QEMUFileStdio));
s->stdio_file = fopen(filename, mode);
if (!s->stdio_file) {
goto fail;
}
if (... | true | qemu | 97f3ad35517e0d02c0149637d1bb10713c52b057 | QEMUFile *qemu_fopen(const char *filename, const char *mode)
{
QEMUFileStdio *s;
if (qemu_file_mode_is_not_valid(mode)) {
return NULL;
}
s = g_malloc0(sizeof(QEMUFileStdio));
s->stdio_file = fopen(filename, mode);
if (!s->stdio_file) {
goto fail;
}
if (... | {
"code": [
" s = g_malloc0(sizeof(QEMUFileStdio));",
" s = g_malloc0(sizeof(QEMUFileStdio));"
],
"line_no": [
17,
17
]
} | QEMUFile *FUNC_0(const char *filename, const char *mode)
{
QEMUFileStdio *s;
if (qemu_file_mode_is_not_valid(mode)) {
return NULL;
}
s = g_malloc0(sizeof(QEMUFileStdio));
s->stdio_file = fopen(filename, mode);
if (!s->stdio_file) {
goto fail;
}
if (mode... | [
"QEMUFile *FUNC_0(const char *filename, const char *mode)\n{",
"QEMUFileStdio *s;",
"if (qemu_file_mode_is_not_valid(mode)) {",
"return NULL;",
"}",
"s = g_malloc0(sizeof(QEMUFileStdio));",
"s->stdio_file = fopen(filename, mode);",
"if (!s->stdio_file) {",
"goto fail;",
"}",
"if (mode[0] == 'w')... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.