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 |
|---|---|---|---|---|---|---|---|---|---|---|
14,441 | static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
AVStream *st, RMStream *ast, int read_all)
{
char buf[256];
uint32_t version;
int ret;
/* ra type header */
version = avio_rb16(pb); /* version */
if (version == 3) {
... | false | FFmpeg | 4907f813581acd6cf68f1be9eb163464503e8208 | static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
AVStream *st, RMStream *ast, int read_all)
{
char buf[256];
uint32_t version;
int ret;
version = avio_rb16(pb);
if (version == 3) {
int header_size = avio_rb16(pb);... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVIOContext *VAR_1,
AVStream *VAR_2, RMStream *VAR_3, int VAR_4)
{
char VAR_5[256];
uint32_t version;
int VAR_6;
version = avio_rb16(VAR_1);
if (version == 3) {
int VAR_7 = avio_rb16(VAR_1);
... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVIOContext *VAR_1,\nAVStream *VAR_2, RMStream *VAR_3, int VAR_4)\n{",
"char VAR_5[256];",
"uint32_t version;",
"int VAR_6;",
"version = avio_rb16(VAR_1);",
"if (version == 3) {",
"int VAR_7 = avio_rb16(VAR_1);",
"int64_t startpos = avio_tell(VAR_1);",
"avi... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
14,443 | SCSIRequest *scsi_req_new(SCSIDevice *d, uint32_t tag, uint32_t lun,
uint8_t *buf, void *hba_private)
{
SCSIBus *bus = DO_UPCAST(SCSIBus, qbus, d->qdev.parent_bus);
SCSIRequest *req;
SCSICommand cmd;
if (scsi_req_parse(&cmd, d, buf) != 0) {
trace_scsi_req_parse... | true | qemu | 3b6ffe50300f13240e1b46420ad05da1116df410 | SCSIRequest *scsi_req_new(SCSIDevice *d, uint32_t tag, uint32_t lun,
uint8_t *buf, void *hba_private)
{
SCSIBus *bus = DO_UPCAST(SCSIBus, qbus, d->qdev.parent_bus);
SCSIRequest *req;
SCSICommand cmd;
if (scsi_req_parse(&cmd, d, buf) != 0) {
trace_scsi_req_parse... | {
"code": [
" if (req->cmd.lba != -1) {"
],
"line_no": [
27
]
} | SCSIRequest *FUNC_0(SCSIDevice *d, uint32_t tag, uint32_t lun,
uint8_t *buf, void *hba_private)
{
SCSIBus *bus = DO_UPCAST(SCSIBus, qbus, d->qdev.parent_bus);
SCSIRequest *req;
SCSICommand cmd;
if (scsi_req_parse(&cmd, d, buf) != 0) {
trace_scsi_req_parse_bad(d... | [
"SCSIRequest *FUNC_0(SCSIDevice *d, uint32_t tag, uint32_t lun,\nuint8_t *buf, void *hba_private)\n{",
"SCSIBus *bus = DO_UPCAST(SCSIBus, qbus, d->qdev.parent_bus);",
"SCSIRequest *req;",
"SCSICommand cmd;",
"if (scsi_req_parse(&cmd, d, buf) != 0) {",
"trace_scsi_req_parse_bad(d->id, lun, tag, buf[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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
37,
39,
41,
43,
45,
47
],
[
49,
51
],
[
53
],
[... |
14,444 | av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx)
{
MpegEncContext *s = avctx->priv_data;
static volatile int done = 0;
int i;
MVTable *mv;
if (ff_h263_decode_init(avctx) < 0)
ff_msmpeg4_common_init(s);
if (!done) {
for(i=0;i<NB_RL_TABLES;i++) {
ff_init_rl(&ff_rl_... | true | FFmpeg | b7b7e2348c07498f373d3b14a13615de151b2e7e | av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx)
{
MpegEncContext *s = avctx->priv_data;
static volatile int done = 0;
int i;
MVTable *mv;
if (ff_h263_decode_init(avctx) < 0)
ff_msmpeg4_common_init(s);
if (!done) {
for(i=0;i<NB_RL_TABLES;i++) {
ff_init_rl(&ff_rl_... | {
"code": [],
"line_no": []
} | av_cold int FUNC_0(AVCodecContext *avctx)
{
MpegEncContext *s = avctx->priv_data;
static volatile int VAR_0 = 0;
int VAR_1;
MVTable *mv;
if (ff_h263_decode_init(avctx) < 0)
ff_msmpeg4_common_init(s);
if (!VAR_0) {
for(VAR_1=0;VAR_1<NB_RL_TABLES;VAR_1++) {
ff_init_rl(&ff_r... | [
"av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"MpegEncContext *s = avctx->priv_data;",
"static volatile int VAR_0 = 0;",
"int VAR_1;",
"MVTable *mv;",
"if (ff_h263_decode_init(avctx) < 0)\nff_msmpeg4_common_init(s);",
"if (!VAR_0) {",
"for(VAR_1=0;VAR_1<NB_RL_TABLES;VAR_1++) {",
"ff_init_rl(&ff_rl... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7,
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19,
20,
21
],
[
22
],
[
... |
14,446 | void qemu_thread_exit(void *arg)
{
QemuThread *thread = TlsGetValue(qemu_thread_tls_index);
thread->ret = arg;
CloseHandle(thread->thread);
thread->thread = NULL;
ExitThread(0);
}
| true | qemu | 403e633126b7a781ecd48a29e3355770d46bbf1a | void qemu_thread_exit(void *arg)
{
QemuThread *thread = TlsGetValue(qemu_thread_tls_index);
thread->ret = arg;
CloseHandle(thread->thread);
thread->thread = NULL;
ExitThread(0);
}
| {
"code": [
" QemuThread *thread = TlsGetValue(qemu_thread_tls_index);",
" thread->ret = arg;",
" CloseHandle(thread->thread);",
" thread->thread = NULL;",
" ExitThread(0);"
],
"line_no": [
5,
7,
9,
11,
13
]
} | void FUNC_0(void *VAR_0)
{
QemuThread *thread = TlsGetValue(qemu_thread_tls_index);
thread->ret = VAR_0;
CloseHandle(thread->thread);
thread->thread = NULL;
ExitThread(0);
}
| [
"void FUNC_0(void *VAR_0)\n{",
"QemuThread *thread = TlsGetValue(qemu_thread_tls_index);",
"thread->ret = VAR_0;",
"CloseHandle(thread->thread);",
"thread->thread = NULL;",
"ExitThread(0);",
"}"
] | [
0,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
14,447 | int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
AVPicture dummy_pict;
int ret;
if ((ret = av_image_check_size(width, height, 0, NULL)) < 0)
return ret;
if (desc->flags & PIX_FMT_PSEUDOPAL)
... | true | FFmpeg | 2c9639227766fea9a8109f82378b312a8d32a1ee | int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
AVPicture dummy_pict;
int ret;
if ((ret = av_image_check_size(width, height, 0, NULL)) < 0)
return ret;
if (desc->flags & PIX_FMT_PSEUDOPAL)
... | {
"code": [],
"line_no": []
} | int FUNC_0(enum AVPixelFormat VAR_0, int VAR_1, int VAR_2)
{
const AVPixFmtDescriptor *VAR_3 = av_pix_fmt_desc_get(VAR_0);
AVPicture dummy_pict;
int VAR_4;
if ((VAR_4 = av_image_check_size(VAR_1, VAR_2, 0, NULL)) < 0)
return VAR_4;
if (VAR_3->flags & PIX_FMT_PSEUDOPAL)
... | [
"int FUNC_0(enum AVPixelFormat VAR_0, int VAR_1, int VAR_2)\n{",
"const AVPixFmtDescriptor *VAR_3 = av_pix_fmt_desc_get(VAR_0);",
"AVPicture dummy_pict;",
"int VAR_4;",
"if ((VAR_4 = av_image_check_size(VAR_1, VAR_2, 0, NULL)) < 0)\nreturn VAR_4;",
"if (VAR_3->flags & PIX_FMT_PSEUDOPAL)\nreturn VAR_1 * VA... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
15,
17
],
[
19,
23
],
[
25
],
[
27
]
] |
14,448 | static int qcow_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
BDRVQcowState *s = bs->opaque;
int len, i, shift, ret;
QCowHeader header;
ret = bdrv_pread(bs->file, 0, &header, sizeof(header));
if (ret < 0) {
be32_to_cpus(&header.magic);
be32_to_cpu... | true | qemu | 42eb58179b3b215bb507da3262b682b8a2ec10b5 | static int qcow_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
BDRVQcowState *s = bs->opaque;
int len, i, shift, ret;
QCowHeader header;
ret = bdrv_pread(bs->file, 0, &header, sizeof(header));
if (ret < 0) {
be32_to_cpus(&header.magic);
be32_to_cpu... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1, int VAR_2,
Error **VAR_3)
{
BDRVQcowState *s = VAR_0->opaque;
int VAR_4, VAR_5, VAR_6, VAR_7;
QCowHeader header;
VAR_7 = bdrv_pread(VAR_0->file, 0, &header, sizeof(header));
if (VAR_7 < 0) {
be32_to_cpus(&header.magic)... | [
"static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1, int VAR_2,\nError **VAR_3)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"int VAR_4, VAR_5, VAR_6, VAR_7;",
"QCowHeader header;",
"VAR_7 = bdrv_pread(VAR_0->file, 0, &header, sizeof(header));",
"if (VAR_7 < 0) {",
"be32_to_cpus(&header.magic);",
"b... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
2,
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21,
22
],... |
14,449 | void OPPROTO op_idivw_AX_T0(void)
{
int num, den, q, r;
num = (EAX & 0xffff) | ((EDX & 0xffff) << 16);
den = (int16_t)T0;
if (den == 0) {
raise_exception(EXCP00_DIVZ);
}
q = (num / den) & 0xffff;
r = (num % den) & 0xffff;
EAX = (EAX & ~0xffff) | q;
EDX = (EDX & ~... | true | qemu | 45bbbb466cf4a6280076ea5a51f67ef5bedee345 | void OPPROTO op_idivw_AX_T0(void)
{
int num, den, q, r;
num = (EAX & 0xffff) | ((EDX & 0xffff) << 16);
den = (int16_t)T0;
if (den == 0) {
raise_exception(EXCP00_DIVZ);
}
q = (num / den) & 0xffff;
r = (num % den) & 0xffff;
EAX = (EAX & ~0xffff) | q;
EDX = (EDX & ~... | {
"code": [
" q = (num / den) & 0xffff;",
" q = (num / den) & 0xffff;"
],
"line_no": [
19,
19
]
} | void VAR_0 op_idivw_AX_T0(void)
{
int num, den, q, r;
num = (EAX & 0xffff) | ((EDX & 0xffff) << 16);
den = (int16_t)T0;
if (den == 0) {
raise_exception(EXCP00_DIVZ);
}
q = (num / den) & 0xffff;
r = (num % den) & 0xffff;
EAX = (EAX & ~0xffff) | q;
EDX = (EDX & ~0x... | [
"void VAR_0 op_idivw_AX_T0(void)\n{",
"int num, den, q, r;",
"num = (EAX & 0xffff) | ((EDX & 0xffff) << 16);",
"den = (int16_t)T0;",
"if (den == 0) {",
"raise_exception(EXCP00_DIVZ);",
"}",
"q = (num / den) & 0xffff;",
"r = (num % den) & 0xffff;",
"EAX = (EAX & ~0xffff) | q;",
"EDX = (EDX & ~0xf... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
14,450 | static always_inline void gen_op_subfco_64 (void)
{
gen_op_move_T2_T0();
gen_op_subf();
gen_op_check_subfc_64();
gen_op_check_subfo_64();
}
| true | qemu | c3e10c7b4377c1cbc0a4fbc12312c2cf41c0cda7 | static always_inline void gen_op_subfco_64 (void)
{
gen_op_move_T2_T0();
gen_op_subf();
gen_op_check_subfc_64();
gen_op_check_subfo_64();
}
| {
"code": [
" gen_op_move_T2_T0();",
" gen_op_move_T2_T0();",
" gen_op_check_subfo_64();",
" gen_op_move_T2_T0();",
" gen_op_move_T2_T0();",
" gen_op_check_subfo_64();",
" gen_op_move_T2_T0();",
" gen_op_move_T2_T0();",
" gen_op_check_subfo_64();"
],
... | static always_inline void FUNC_0 (void)
{
gen_op_move_T2_T0();
gen_op_subf();
gen_op_check_subfc_64();
gen_op_check_subfo_64();
}
| [
"static always_inline void FUNC_0 (void)\n{",
"gen_op_move_T2_T0();",
"gen_op_subf();",
"gen_op_check_subfc_64();",
"gen_op_check_subfo_64();",
"}"
] | [
0,
1,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
14,451 | static av_cold int wmv2_encode_init(AVCodecContext *avctx){
Wmv2Context * const w= avctx->priv_data;
if(ff_MPV_encode_init(avctx) < 0)
return -1;
ff_wmv2_common_init(w);
avctx->extradata_size= 4;
avctx->extradata= av_mallocz(avctx->extradata_size + 10);
encode_ext_header(w);... | true | FFmpeg | 6e8fe448154e1aa0928cb0d2e1aecb7255c751cc | static av_cold int wmv2_encode_init(AVCodecContext *avctx){
Wmv2Context * const w= avctx->priv_data;
if(ff_MPV_encode_init(avctx) < 0)
return -1;
ff_wmv2_common_init(w);
avctx->extradata_size= 4;
avctx->extradata= av_mallocz(avctx->extradata_size + 10);
encode_ext_header(w);... | {
"code": [
" avctx->extradata= av_mallocz(avctx->extradata_size + 10);"
],
"line_no": [
19
]
} | static av_cold int FUNC_0(AVCodecContext *avctx){
Wmv2Context * const w= avctx->priv_data;
if(ff_MPV_encode_init(avctx) < 0)
return -1;
ff_wmv2_common_init(w);
avctx->extradata_size= 4;
avctx->extradata= av_mallocz(avctx->extradata_size + 10);
encode_ext_header(w);
re... | [
"static av_cold int FUNC_0(AVCodecContext *avctx){",
"Wmv2Context * const w= avctx->priv_data;",
"if(ff_MPV_encode_init(avctx) < 0)\nreturn -1;",
"ff_wmv2_common_init(w);",
"avctx->extradata_size= 4;",
"avctx->extradata= av_mallocz(avctx->extradata_size + 10);",
"encode_ext_header(w);",
"return 0;",
... | [
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1
],
[
3
],
[
7,
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
]
] |
14,452 | static void kvm_arm_gic_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
ARMGICCommonClass *agcc = ARM_GIC_COMMON_CLASS(klass);
KVMARMGICClass *kgc = KVM_ARM_GIC_CLASS(klass);
agcc->pre_save = kvm_arm_gic_get;
agcc->post_load = kvm_arm_gic_put;
kgc->pa... | true | qemu | efec3dd631d94160288392721a5f9c39e50fb2bc | static void kvm_arm_gic_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
ARMGICCommonClass *agcc = ARM_GIC_COMMON_CLASS(klass);
KVMARMGICClass *kgc = KVM_ARM_GIC_CLASS(klass);
agcc->pre_save = kvm_arm_gic_get;
agcc->post_load = kvm_arm_gic_put;
kgc->pa... | {
"code": [
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;"... | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
ARMGICCommonClass *agcc = ARM_GIC_COMMON_CLASS(VAR_0);
KVMARMGICClass *kgc = KVM_ARM_GIC_CLASS(VAR_0);
agcc->pre_save = kvm_arm_gic_get;
agcc->post_load = kvm_arm_gic_put;
kgc->parent_realize = ... | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"ARMGICCommonClass *agcc = ARM_GIC_COMMON_CLASS(VAR_0);",
"KVMARMGICClass *kgc = KVM_ARM_GIC_CLASS(VAR_0);",
"agcc->pre_save = kvm_arm_gic_get;",
"agcc->post_load = kvm_arm_gic_put;",
"kgc->parent_realize... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
14,453 | test_tls_get_ipaddr(const char *addrstr,
char **data,
int *datalen)
{
struct addrinfo *res;
struct addrinfo hints;
memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_NUMERICHOST;
g_assert(getaddrinfo(addrstr, NULL, &hints, &res) == 0);
*dat... | true | qemu | 7b35030eedc26eff82210caa2b0fff2f9d0df453 | test_tls_get_ipaddr(const char *addrstr,
char **data,
int *datalen)
{
struct addrinfo *res;
struct addrinfo hints;
memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_NUMERICHOST;
g_assert(getaddrinfo(addrstr, NULL, &hints, &res) == 0);
*dat... | {
"code": [],
"line_no": []
} | FUNC_0(const char *VAR_0,
char **VAR_1,
int *VAR_2)
{
struct addrinfo *VAR_3;
struct addrinfo VAR_4;
memset(&VAR_4, 0, sizeof(VAR_4));
VAR_4.ai_flags = AI_NUMERICHOST;
g_assert(getaddrinfo(VAR_0, NULL, &VAR_4, &VAR_3) == 0);
*VAR_2 = VAR_3->ai... | [
"FUNC_0(const char *VAR_0,\nchar **VAR_1,\nint *VAR_2)\n{",
"struct addrinfo *VAR_3;",
"struct addrinfo VAR_4;",
"memset(&VAR_4, 0, sizeof(VAR_4));",
"VAR_4.ai_flags = AI_NUMERICHOST;",
"g_assert(getaddrinfo(VAR_0, NULL, &VAR_4, &VAR_3) == 0);",
"*VAR_2 = VAR_3->ai_addrlen;",
"*VAR_1 = g_new(char, *VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
30
]
] |
14,454 | static int adaptive_cb_search(const int16_t *adapt_cb, float *work,
const float *coefs, float *data)
{
int i, best_vect;
float score, gain, best_score, best_gain;
float exc[BLOCKSIZE];
gain = best_score = 0;
for (i = BLOCKSIZE / 2; i <= BUFFERSIZE; i++) {
... | true | FFmpeg | 85a4dbeb9c9aa8b22ca5a7b76aa48f6f44735156 | static int adaptive_cb_search(const int16_t *adapt_cb, float *work,
const float *coefs, float *data)
{
int i, best_vect;
float score, gain, best_score, best_gain;
float exc[BLOCKSIZE];
gain = best_score = 0;
for (i = BLOCKSIZE / 2; i <= BUFFERSIZE; i++) {
... | {
"code": [
" int i, best_vect;",
" float score, gain, best_score, best_gain;"
],
"line_no": [
7,
9
]
} | static int FUNC_0(const int16_t *VAR_0, float *VAR_1,
const float *VAR_2, float *VAR_3)
{
int VAR_4, VAR_5;
float VAR_6, VAR_7, VAR_8, VAR_9;
float VAR_10[BLOCKSIZE];
VAR_7 = VAR_8 = 0;
for (VAR_4 = BLOCKSIZE / 2; VAR_4 <= BUFFERSIZE; VAR_4++) {
create... | [
"static int FUNC_0(const int16_t *VAR_0, float *VAR_1,\nconst float *VAR_2, float *VAR_3)\n{",
"int VAR_4, VAR_5;",
"float VAR_6, VAR_7, VAR_8, VAR_9;",
"float VAR_10[BLOCKSIZE];",
"VAR_7 = VAR_8 = 0;",
"for (VAR_4 = BLOCKSIZE / 2; VAR_4 <= BUFFERSIZE; VAR_4++) {",
"create_adapt_vect(VAR_10, VAR_0, VAR_... | [
0,
1,
1,
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
],
[
49
],
[
51
],
[
53
],
[
55
... |
14,455 | static void pc_cpu_plug(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
CPUArchId *found_cpu;
HotplugHandlerClass *hhc;
Error *local_err = NULL;
PCMachineState *pcms = PC_MACHINE(hotplug_dev);
if (pcms->acpi_dev) {
hhc = HOTPLUG_HANDLER_GET_CL... | true | qemu | 26ef65beab852caf2b1ef4976e3473f2d525164d | static void pc_cpu_plug(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
CPUArchId *found_cpu;
HotplugHandlerClass *hhc;
Error *local_err = NULL;
PCMachineState *pcms = PC_MACHINE(hotplug_dev);
if (pcms->acpi_dev) {
hhc = HOTPLUG_HANDLER_GET_CL... | {
"code": [
" if (dev->hotplugged) {"
],
"line_no": [
37
]
} | static void FUNC_0(HotplugHandler *VAR_0,
DeviceState *VAR_1, Error **VAR_2)
{
CPUArchId *found_cpu;
HotplugHandlerClass *hhc;
Error *local_err = NULL;
PCMachineState *pcms = PC_MACHINE(VAR_0);
if (pcms->acpi_dev) {
hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi... | [
"static void FUNC_0(HotplugHandler *VAR_0,\nDeviceState *VAR_1, Error **VAR_2)\n{",
"CPUArchId *found_cpu;",
"HotplugHandlerClass *hhc;",
"Error *local_err = NULL;",
"PCMachineState *pcms = PC_MACHINE(VAR_0);",
"if (pcms->acpi_dev) {",
"hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);",
"hhc->plug(HOT... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[... |
14,456 | static int transcode(void)
{
int ret, i;
AVFormatContext *is, *os;
OutputStream *ost;
InputStream *ist;
uint8_t *no_packet;
int no_packet_count = 0;
int64_t timer_start;
if (!(no_packet = av_mallocz(nb_input_files)))
exit_program(1);
ret = transcode_init();
... | true | FFmpeg | 369cb092ecbbaff20bb0a2a1d60536c3bc04a8f0 | static int transcode(void)
{
int ret, i;
AVFormatContext *is, *os;
OutputStream *ost;
InputStream *ist;
uint8_t *no_packet;
int no_packet_count = 0;
int64_t timer_start;
if (!(no_packet = av_mallocz(nb_input_files)))
exit_program(1);
ret = transcode_init();
... | {
"code": [
" break;",
" exit_program(1);",
" exit_program(1);",
" exit_program(1);",
" exit_program(1);",
" break;",
" for (i = 0; i < nb_output_streams; i++) {",
" continue;",
" ... | static int FUNC_0(void)
{
int VAR_0, VAR_1;
AVFormatContext *is, *os;
OutputStream *ost;
InputStream *ist;
uint8_t *no_packet;
int VAR_2 = 0;
int64_t timer_start;
if (!(no_packet = av_mallocz(nb_input_files)))
exit_program(1);
VAR_0 = transcode_init();
if ... | [
"static int FUNC_0(void)\n{",
"int VAR_0, VAR_1;",
"AVFormatContext *is, *os;",
"OutputStream *ost;",
"InputStream *ist;",
"uint8_t *no_packet;",
"int VAR_2 = 0;",
"int64_t timer_start;",
"if (!(no_packet = av_mallocz(nb_input_files)))\nexit_program(1);",
"VAR_0 = transcode_init();",
"if (VAR_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,
0,
1,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
27
],
[
29,
31
],
[
35
],
[
37
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
... |
14,457 | static void pc_dimm_plug(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
HotplugHandlerClass *hhc;
Error *local_err = NULL;
PCMachineState *pcms = PC_MACHINE(hotplug_dev);
PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
PCDIMMDevice *dimm = PC_DIMM(d... | true | qemu | 0479097859372a760843ad1b9c6ed3705c6423ca | static void pc_dimm_plug(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
HotplugHandlerClass *hhc;
Error *local_err = NULL;
PCMachineState *pcms = PC_MACHINE(hotplug_dev);
PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
PCDIMMDevice *dimm = PC_DIMM(d... | {
"code": [
" MemoryRegion *mr = ddc->get_memory_region(dimm);",
" MemoryRegion *mr = ddc->get_memory_region(dimm);",
" MemoryRegion *mr = ddc->get_memory_region(dimm);",
" MemoryRegion *mr = ddc->get_memory_region(dimm);",
" MemoryRegion *mr = ddc->get_memory_region(dimm);",
" ... | static void FUNC_0(HotplugHandler *VAR_0,
DeviceState *VAR_1, Error **VAR_2)
{
HotplugHandlerClass *hhc;
Error *local_err = NULL;
PCMachineState *pcms = PC_MACHINE(VAR_0);
PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
PCDIMMDevice *dimm = PC_DIMM(VAR_1);
PCD... | [
"static void FUNC_0(HotplugHandler *VAR_0,\nDeviceState *VAR_1, Error **VAR_2)\n{",
"HotplugHandlerClass *hhc;",
"Error *local_err = NULL;",
"PCMachineState *pcms = PC_MACHINE(VAR_0);",
"PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);",
"PCDIMMDevice *dimm = PC_DIMM(VAR_1);",
"PCDIMMDeviceClass *ddc ... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
47
],
[
49,... |
14,458 | static inline void doVertLowPass_altivec(uint8_t *src, int stride, PPContext *c) {
/*
this code makes no assumption on src or stride.
One could remove the recomputation of the perm
vector by assuming (stride % 16) == 0, unfortunately
this is not always true. Quite a lot of load/stores
can ... | true | FFmpeg | 2f2cabef9ca3d087588cdaa83f29cf5e34bda03e | static inline void doVertLowPass_altivec(uint8_t *src, int stride, PPContext *c) {
uint8_t *src2 = src;
const vector signed int zero = vec_splat_s32(0);
const int properStride = (stride % 16);
const int srcAlign = ((unsigned long)src2 % 16);
DECLARE_ALIGNED(16, short, qp[8])... | {
"code": [
" vector unsigned char vbA0, vbA1, vbA2, vbA3, vbA4, vbA5, vbA6, vbA7, vbA8, vbA9;",
" vector unsigned char vbB0, vbB1, vbB2, vbB3, vbB4, vbB5, vbB6, vbB7, vbB8, vbB9;"
],
"line_no": [
33,
35
]
} | static inline void FUNC_0(uint8_t *VAR_0, int VAR_1, PPContext *VAR_2) {
uint8_t *src2 = VAR_0;
const vector signed int VAR_3 = vec_splat_s32(0);
const int VAR_4 = (VAR_1 % 16);
const int VAR_5 = ((unsigned long)src2 % 16);
DECLARE_ALIGNED(16, short, qp[8]) = {VAR_2->QP};
... | [
"static inline void FUNC_0(uint8_t *VAR_0, int VAR_1, PPContext *VAR_2) {",
"uint8_t *src2 = VAR_0;",
"const vector signed int VAR_3 = vec_splat_s32(0);",
"const int VAR_4 = (VAR_1 % 16);",
"const int VAR_5 = ((unsigned long)src2 % 16);",
"DECLARE_ALIGNED(16, short, qp[8]) = {VAR_2->QP};",
"vector signe... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43,
45,
47,
49,
51,
53,
55,
57,
59,
61
],
[
65
],
[
69
],... |
14,460 | static void decode_hrd(HEVCContext *s, int common_inf_present,
int max_sublayers)
{
GetBitContext *gb = &s->HEVClc.gb;
int nal_params_present = 0, vcl_params_present = 0;
int subpic_params_present = 0;
int i;
if (common_inf_present) {
nal_params_present = get... | true | FFmpeg | 838740e6420538ad45982da6b1d3aa3ae91307f5 | static void decode_hrd(HEVCContext *s, int common_inf_present,
int max_sublayers)
{
GetBitContext *gb = &s->HEVClc.gb;
int nal_params_present = 0, vcl_params_present = 0;
int subpic_params_present = 0;
int i;
if (common_inf_present) {
nal_params_present = get... | {
"code": [
" int nb_cpb = 1;"
],
"line_no": [
73
]
} | static void FUNC_0(HEVCContext *VAR_0, int VAR_1,
int VAR_2)
{
GetBitContext *gb = &VAR_0->HEVClc.gb;
int VAR_3 = 0, VAR_4 = 0;
int VAR_5 = 0;
int VAR_6;
if (VAR_1) {
VAR_3 = get_bits1(gb);
VAR_4 = get_bits1(gb);
if (VAR_3 || VAR_4) {
... | [
"static void FUNC_0(HEVCContext *VAR_0, int VAR_1,\nint VAR_2)\n{",
"GetBitContext *gb = &VAR_0->HEVClc.gb;",
"int VAR_3 = 0, VAR_4 = 0;",
"int VAR_5 = 0;",
"int VAR_6;",
"if (VAR_1) {",
"VAR_3 = get_bits1(gb);",
"VAR_4 = get_bits1(gb);",
"if (VAR_3 || VAR_4) {",
"VAR_5 = get_bits1(gb);",
"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,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
51,
53
... |
14,461 | static uint8_t eepro100_read1(EEPRO100State * s, uint32_t addr)
{
uint8_t val;
if (addr <= sizeof(s->mem) - sizeof(val)) {
memcpy(&val, &s->mem[addr], sizeof(val));
}
switch (addr) {
case SCBStatus:
case SCBAck:
TRACE(OTHER, logout("addr=%s val=0x%02x\n", regname(addr)... | true | qemu | ef4760626e88bc3e7a1b46c7370378cbd12d379f | static uint8_t eepro100_read1(EEPRO100State * s, uint32_t addr)
{
uint8_t val;
if (addr <= sizeof(s->mem) - sizeof(val)) {
memcpy(&val, &s->mem[addr], sizeof(val));
}
switch (addr) {
case SCBStatus:
case SCBAck:
TRACE(OTHER, logout("addr=%s val=0x%02x\n", regname(addr)... | {
"code": [
" uint8_t val;"
],
"line_no": [
5
]
} | static uint8_t FUNC_0(EEPRO100State * s, uint32_t addr)
{
uint8_t val;
if (addr <= sizeof(s->mem) - sizeof(val)) {
memcpy(&val, &s->mem[addr], sizeof(val));
}
switch (addr) {
case SCBStatus:
case SCBAck:
TRACE(OTHER, logout("addr=%s val=0x%02x\n", regname(addr), val));... | [
"static uint8_t FUNC_0(EEPRO100State * s, uint32_t addr)\n{",
"uint8_t val;",
"if (addr <= sizeof(s->mem) - sizeof(val)) {",
"memcpy(&val, &s->mem[addr], sizeof(val));",
"}",
"switch (addr) {",
"case SCBStatus:\ncase SCBAck:\nTRACE(OTHER, logout(\"addr=%s val=0x%02x\\n\", regname(addr), val));",
"brea... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19,
21
],
[
23
],
[
25,
27
],
[
29,
31
],
[
33,
35
],
[
37,
39
],
[
41
],
[
43,
45
],
[
47
],
[
49,
51
... |
14,462 | void qmp_migrate_set_parameters(MigrationParameters *params, Error **errp)
{
MigrationState *s = migrate_get_current();
if (params->has_compress_level &&
(params->compress_level < 0 || params->compress_level > 9)) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "compress_level",
... | true | qemu | 091ecc8b69bd735383e171828d4e8ed5e34c2a3b | void qmp_migrate_set_parameters(MigrationParameters *params, Error **errp)
{
MigrationState *s = migrate_get_current();
if (params->has_compress_level &&
(params->compress_level < 0 || params->compress_level > 9)) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "compress_level",
... | {
"code": [],
"line_no": []
} | void FUNC_0(MigrationParameters *VAR_0, Error **VAR_1)
{
MigrationState *s = migrate_get_current();
if (VAR_0->has_compress_level &&
(VAR_0->compress_level < 0 || VAR_0->compress_level > 9)) {
error_setg(VAR_1, QERR_INVALID_PARAMETER_VALUE, "compress_level",
"is invali... | [
"void FUNC_0(MigrationParameters *VAR_0, Error **VAR_1)\n{",
"MigrationState *s = migrate_get_current();",
"if (VAR_0->has_compress_level &&\n(VAR_0->compress_level < 0 || VAR_0->compress_level > 9)) {",
"error_setg(VAR_1, QERR_INVALID_PARAMETER_VALUE, \"compress_level\",\n\"is invalid, it should be in the ra... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13,
15
],
[
18
],
[
20,
22
],
[
24,
26,
28
],
[
31
],
[
33,
35
],
[
37,
39,
41
],
[
44
],
[
46,
48,
50
],
[
52,
54,
56
],
[
59... |
14,463 | static int vorbis_parse_setup_hdr_floors(vorbis_context *vc)
{
GetBitContext *gb = &vc->gb;
int i,j,k;
vc->floor_count = get_bits(gb, 6) + 1;
vc->floors = av_mallocz(vc->floor_count * sizeof(*vc->floors));
for (i = 0; i < vc->floor_count; ++i) {
vorbis_floor *floor_setup = &vc->... | true | FFmpeg | 11dcecfcca0eca1a571792c4fa3c21fb2cfddddc | static int vorbis_parse_setup_hdr_floors(vorbis_context *vc)
{
GetBitContext *gb = &vc->gb;
int i,j,k;
vc->floor_count = get_bits(gb, 6) + 1;
vc->floors = av_mallocz(vc->floor_count * sizeof(*vc->floors));
for (i = 0; i < vc->floor_count; ++i) {
vorbis_floor *floor_setup = &vc->... | {
"code": [],
"line_no": []
} | static int FUNC_0(vorbis_context *VAR_0)
{
GetBitContext *gb = &VAR_0->gb;
int VAR_1,VAR_2,VAR_3;
VAR_0->floor_count = get_bits(gb, 6) + 1;
VAR_0->floors = av_mallocz(VAR_0->floor_count * sizeof(*VAR_0->floors));
for (VAR_1 = 0; VAR_1 < VAR_0->floor_count; ++VAR_1) {
vorbis_floo... | [
"static int FUNC_0(vorbis_context *VAR_0)\n{",
"GetBitContext *gb = &VAR_0->gb;",
"int VAR_1,VAR_2,VAR_3;",
"VAR_0->floor_count = get_bits(gb, 6) + 1;",
"VAR_0->floors = av_mallocz(VAR_0->floor_count * sizeof(*VAR_0->floors));",
"for (VAR_1 = 0; VAR_1 < VAR_0->floor_count; ++VAR_1) {",
"vorbis_floor *fl... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
19
],
[
21
],
[
25
],
[
29
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
49,
51
],
[
55
],
[
57
],
[
59,
61
],
[
65... |
14,465 | static void ppc_core99_init(MachineState *machine)
{
ram_addr_t ram_size = machine->ram_size;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_filename = machine->initrd_filename;
const char *boot_device = machine-... | true | qemu | 4482e05cbbb7e50e476f6a9500cf0b38913bd939 | static void ppc_core99_init(MachineState *machine)
{
ram_addr_t ram_size = machine->ram_size;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_filename = machine->initrd_filename;
const char *boot_device = machine-... | {
"code": [
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" e... | static void FUNC_0(MachineState *VAR_0)
{
ram_addr_t ram_size = VAR_0->ram_size;
const char *VAR_1 = VAR_0->VAR_1;
const char *VAR_2 = VAR_0->VAR_2;
const char *VAR_3 = VAR_0->VAR_3;
const char *VAR_4 = VAR_0->boot_order;
PowerPCCPU *cpu = NULL;
CPUPPCState *env = NULL;
char *VA... | [
"static void FUNC_0(MachineState *VAR_0)\n{",
"ram_addr_t ram_size = VAR_0->ram_size;",
"const char *VAR_1 = VAR_0->VAR_1;",
"const char *VAR_2 = VAR_0->VAR_2;",
"const char *VAR_3 = VAR_0->VAR_3;",
"const char *VAR_4 = VAR_0->boot_order;",
"PowerPCCPU *cpu = NULL;",
"CPUPPCState *env = NULL;",
"cha... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
... |
14,466 | static void test_qemu_strtoull_empty(void)
{
const char *str = "";
char f = 'X';
const char *endptr = &f;
uint64_t res = 999;
int err;
err = qemu_strtoull(str, &endptr, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, 0);
g_assert(endptr == str);
}
| true | qemu | 47d4be12c3997343e436c6cca89aefbbbeb70863 | static void test_qemu_strtoull_empty(void)
{
const char *str = "";
char f = 'X';
const char *endptr = &f;
uint64_t res = 999;
int err;
err = qemu_strtoull(str, &endptr, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, 0);
g_assert(endptr == str);
}
| {
"code": [
" g_assert_cmpint(err, ==, 0);",
" g_assert_cmpint(res, ==, 0);",
" g_assert(endptr == str);",
" g_assert_cmpint(err, ==, 0);",
" g_assert_cmpint(res, ==, 0);",
" g_assert(endptr == str);",
" g_assert_cmpint(err, ==, 0);",
" g_assert_cmpint(res, ==, ... | static void FUNC_0(void)
{
const char *VAR_0 = "";
char VAR_1 = 'X';
const char *VAR_2 = &VAR_1;
uint64_t res = 999;
int VAR_3;
VAR_3 = qemu_strtoull(VAR_0, &VAR_2, 0, &res);
g_assert_cmpint(VAR_3, ==, 0);
g_assert_cmpint(res, ==, 0);
g_assert(VAR_2 == VAR_0);
}
| [
"static void FUNC_0(void)\n{",
"const char *VAR_0 = \"\";",
"char VAR_1 = 'X';",
"const char *VAR_2 = &VAR_1;",
"uint64_t res = 999;",
"int VAR_3;",
"VAR_3 = qemu_strtoull(VAR_0, &VAR_2, 0, &res);",
"g_assert_cmpint(VAR_3, ==, 0);",
"g_assert_cmpint(res, ==, 0);",
"g_assert(VAR_2 == VAR_0);",
"}... | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
14,467 | void pcmcia_socket_unregister(PCMCIASocket *socket)
{
struct pcmcia_socket_entry_s *entry, **ptr;
ptr = &pcmcia_sockets;
for (entry = *ptr; entry; ptr = &entry->next, entry = *ptr)
if (entry->socket == socket) {
*ptr = entry->next;
g_free(entry);
}
}
| true | qemu | 7797a73947d5c0e63dd5552b348cf66c384b4555 | void pcmcia_socket_unregister(PCMCIASocket *socket)
{
struct pcmcia_socket_entry_s *entry, **ptr;
ptr = &pcmcia_sockets;
for (entry = *ptr; entry; ptr = &entry->next, entry = *ptr)
if (entry->socket == socket) {
*ptr = entry->next;
g_free(entry);
}
}
| {
"code": [
"void pcmcia_socket_unregister(PCMCIASocket *socket)",
" struct pcmcia_socket_entry_s *entry, **ptr;",
" ptr = &pcmcia_sockets;",
" for (entry = *ptr; entry; ptr = &entry->next, entry = *ptr)",
" if (entry->socket == socket) {",
" *ptr = entry->next;",
... | void FUNC_0(PCMCIASocket *VAR_0)
{
struct pcmcia_socket_entry_s *VAR_1, **VAR_2;
VAR_2 = &pcmcia_sockets;
for (VAR_1 = *VAR_2; VAR_1; VAR_2 = &VAR_1->next, VAR_1 = *VAR_2)
if (VAR_1->VAR_0 == VAR_0) {
*VAR_2 = VAR_1->next;
g_free(VAR_1);
}
}
| [
"void FUNC_0(PCMCIASocket *VAR_0)\n{",
"struct pcmcia_socket_entry_s *VAR_1, **VAR_2;",
"VAR_2 = &pcmcia_sockets;",
"for (VAR_1 = *VAR_2; VAR_1; VAR_2 = &VAR_1->next, VAR_1 = *VAR_2)",
"if (VAR_1->VAR_0 == VAR_0) {",
"*VAR_2 = VAR_1->next;",
"g_free(VAR_1);",
"}",
"}"
] | [
1,
1,
1,
1,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
14,468 | static ssize_t qsb_get_iovec(const QEMUSizedBuffer *qsb,
off_t pos, off_t *d_off)
{
ssize_t i;
off_t curr = 0;
if (pos > qsb->used) {
return -1;
}
for (i = 0; i < qsb->n_iov; i++) {
if (curr + qsb->iov[i].iov_len > pos) {
*d_off ... | true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static ssize_t qsb_get_iovec(const QEMUSizedBuffer *qsb,
off_t pos, off_t *d_off)
{
ssize_t i;
off_t curr = 0;
if (pos > qsb->used) {
return -1;
}
for (i = 0; i < qsb->n_iov; i++) {
if (curr + qsb->iov[i].iov_len > pos) {
*d_off ... | {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(const QEMUSizedBuffer *qsb,
off_t pos, off_t *d_off)
{
ssize_t i;
off_t curr = 0;
if (pos > qsb->used) {
return -1;
}
for (i = 0; i < qsb->n_iov; i++) {
if (curr + qsb->iov[i].iov_len > pos) {
*d_off = pos -... | [
"static ssize_t FUNC_0(const QEMUSizedBuffer *qsb,\noff_t pos, off_t *d_off)\n{",
"ssize_t i;",
"off_t curr = 0;",
"if (pos > qsb->used) {",
"return -1;",
"}",
"for (i = 0; i < qsb->n_iov; i++) {",
"if (curr + qsb->iov[i].iov_len > pos) {",
"*d_off = pos - curr;",
"return i;",
"}",
"curr += qs... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
14,470 | static gboolean fd_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
{
CharDriverState *chr = opaque;
FDCharDriver *s = chr->opaque;
int len;
uint8_t buf[READ_BUF_LEN];
GIOStatus status;
gsize bytes_read;
len = sizeof(buf);
if (len > s->max_size) {
len = s->... | true | qemu | 2b316774f60291f57ca9ecb6a9f0712c532cae34 | static gboolean fd_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
{
CharDriverState *chr = opaque;
FDCharDriver *s = chr->opaque;
int len;
uint8_t buf[READ_BUF_LEN];
GIOStatus status;
gsize bytes_read;
len = sizeof(buf);
if (len > s->max_size) {
len = s->... | {
"code": [
" g_source_remove(s->fd_in_tag);"
],
"line_no": [
43
]
} | static gboolean FUNC_0(GIOChannel *chan, GIOCondition cond, void *opaque)
{
CharDriverState *chr = opaque;
FDCharDriver *s = chr->opaque;
int VAR_0;
uint8_t buf[READ_BUF_LEN];
GIOStatus status;
gsize bytes_read;
VAR_0 = sizeof(buf);
if (VAR_0 > s->max_size) {
VAR_0 = ... | [
"static gboolean FUNC_0(GIOChannel *chan, GIOCondition cond, void *opaque)\n{",
"CharDriverState *chr = opaque;",
"FDCharDriver *s = chr->opaque;",
"int VAR_0;",
"uint8_t buf[READ_BUF_LEN];",
"GIOStatus status;",
"gsize bytes_read;",
"VAR_0 = sizeof(buf);",
"if (VAR_0 > s->max_size) {",
"VAR_0 = s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
14,471 | void hmp_drive_add_node(Monitor *mon, const char *optstr)
{
QemuOpts *opts;
QDict *qdict;
Error *local_err = NULL;
opts = qemu_opts_parse_noisily(&qemu_drive_opts, optstr, false);
if (!opts) {
return;
}
qdict = qemu_opts_to_qdict(opts, NULL);
if (!qdict_get_try_st... | true | qemu | f8746fb804dad4858796363adb06c56543111062 | void hmp_drive_add_node(Monitor *mon, const char *optstr)
{
QemuOpts *opts;
QDict *qdict;
Error *local_err = NULL;
opts = qemu_opts_parse_noisily(&qemu_drive_opts, optstr, false);
if (!opts) {
return;
}
qdict = qemu_opts_to_qdict(opts, NULL);
if (!qdict_get_try_st... | {
"code": [],
"line_no": []
} | void FUNC_0(Monitor *VAR_0, const char *VAR_1)
{
QemuOpts *opts;
QDict *qdict;
Error *local_err = NULL;
opts = qemu_opts_parse_noisily(&qemu_drive_opts, VAR_1, false);
if (!opts) {
return;
}
qdict = qemu_opts_to_qdict(opts, NULL);
if (!qdict_get_try_str(qdict, "no... | [
"void FUNC_0(Monitor *VAR_0, const char *VAR_1)\n{",
"QemuOpts *opts;",
"QDict *qdict;",
"Error *local_err = NULL;",
"opts = qemu_opts_parse_noisily(&qemu_drive_opts, VAR_1, false);",
"if (!opts) {",
"return;",
"}",
"qdict = qemu_opts_to_qdict(opts, NULL);",
"if (!qdict_get_try_str(qdict, \"node-n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27
],
[
30
],
[
32
],
[
34
],
[
38
],
[
40
],
[
42
],
[
44
],
[
46
],
[
50
],
[
54,... |
14,473 | void cpu_breakpoint_remove_all(CPUState *cpu, int mask)
{
#if defined(TARGET_HAS_ICE)
CPUBreakpoint *bp, *next;
QTAILQ_FOREACH_SAFE(bp, &cpu->breakpoints, entry, next) {
if (bp->flags & mask) {
cpu_breakpoint_remove_by_ref(cpu, bp);
}
}
#endif
}
| false | qemu | ec53b45bcd1f74f7a4c31331fa6d50b402cd6d26 | void cpu_breakpoint_remove_all(CPUState *cpu, int mask)
{
#if defined(TARGET_HAS_ICE)
CPUBreakpoint *bp, *next;
QTAILQ_FOREACH_SAFE(bp, &cpu->breakpoints, entry, next) {
if (bp->flags & mask) {
cpu_breakpoint_remove_by_ref(cpu, bp);
}
}
#endif
}
| {
"code": [],
"line_no": []
} | void FUNC_0(CPUState *VAR_0, int VAR_1)
{
#if defined(TARGET_HAS_ICE)
CPUBreakpoint *bp, *next;
QTAILQ_FOREACH_SAFE(bp, &VAR_0->breakpoints, entry, next) {
if (bp->flags & VAR_1) {
cpu_breakpoint_remove_by_ref(VAR_0, bp);
}
}
#endif
}
| [
"void FUNC_0(CPUState *VAR_0, int VAR_1)\n{",
"#if defined(TARGET_HAS_ICE)\nCPUBreakpoint *bp, *next;",
"QTAILQ_FOREACH_SAFE(bp, &VAR_0->breakpoints, entry, next) {",
"if (bp->flags & VAR_1) {",
"cpu_breakpoint_remove_by_ref(VAR_0, bp);",
"}",
"}",
"#endif\n}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
]
] |
14,474 | solisten(port, laddr, lport, flags)
u_int port;
u_int32_t laddr;
u_int lport;
int flags;
{
struct sockaddr_in addr;
struct socket *so;
int s, addrlen = sizeof(addr), opt = 1;
DEBUG_CALL("solisten");
DEBUG_ARG("port = %d", port);
DEBUG_ARG("laddr = %x", laddr);
DEBUG_ARG("lport = %d", lport);
... | false | qemu | 242acf3af4605adce933906bdc053b2414181ec7 | solisten(port, laddr, lport, flags)
u_int port;
u_int32_t laddr;
u_int lport;
int flags;
{
struct sockaddr_in addr;
struct socket *so;
int s, addrlen = sizeof(addr), opt = 1;
DEBUG_CALL("solisten");
DEBUG_ARG("port = %d", port);
DEBUG_ARG("laddr = %x", laddr);
DEBUG_ARG("lport = %d", lport);
... | {
"code": [],
"line_no": []
} | solisten(port, VAR_0, VAR_1, VAR_2)
u_int port;
u_int32_t VAR_0;
u_int VAR_1;
int VAR_2;
{
struct sockaddr_in addr;
struct socket *so;
int s, addrlen = sizeof(addr), opt = 1;
DEBUG_CALL("solisten");
DEBUG_ARG("port = %d", port);
DEBUG_ARG("VAR_0 = %x", VAR_0);
DEBUG_ARG("VAR_1 = %d", VAR_1);
... | [
"solisten(port, VAR_0, VAR_1, VAR_2)\nu_int port;",
"u_int32_t VAR_0;",
"u_int VAR_1;",
"int VAR_2;",
"{",
"struct sockaddr_in addr;",
"struct socket *so;",
"int s, addrlen = sizeof(addr), opt = 1;",
"DEBUG_CALL(\"solisten\");",
"DEBUG_ARG(\"port = %d\", port);",
"DEBUG_ARG(\"VAR_0 = %x\", VAR_0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
37
],
[
39
],
[
45
],
[
47
],
[
49
],
[
51
... |
14,475 | static void *qemu_tcg_cpu_thread_fn(void *arg)
{
CPUState *cpu = arg;
qemu_tcg_init_cpu_signals();
qemu_thread_get_self(cpu->thread);
qemu_mutex_lock(&qemu_global_mutex);
CPU_FOREACH(cpu) {
cpu->thread_id = qemu_get_thread_id();
cpu->created = true;
cpu->exceptio... | false | qemu | f9d8f6673591f30028e281e8ff6d5790adc2de83 | static void *qemu_tcg_cpu_thread_fn(void *arg)
{
CPUState *cpu = arg;
qemu_tcg_init_cpu_signals();
qemu_thread_get_self(cpu->thread);
qemu_mutex_lock(&qemu_global_mutex);
CPU_FOREACH(cpu) {
cpu->thread_id = qemu_get_thread_id();
cpu->created = true;
cpu->exceptio... | {
"code": [],
"line_no": []
} | static void *FUNC_0(void *VAR_0)
{
CPUState *cpu = VAR_0;
qemu_tcg_init_cpu_signals();
qemu_thread_get_self(cpu->thread);
qemu_mutex_lock(&qemu_global_mutex);
CPU_FOREACH(cpu) {
cpu->thread_id = qemu_get_thread_id();
cpu->created = true;
cpu->exception_index = -1... | [
"static void *FUNC_0(void *VAR_0)\n{",
"CPUState *cpu = VAR_0;",
"qemu_tcg_init_cpu_signals();",
"qemu_thread_get_self(cpu->thread);",
"qemu_mutex_lock(&qemu_global_mutex);",
"CPU_FOREACH(cpu) {",
"cpu->thread_id = qemu_get_thread_id();",
"cpu->created = true;",
"cpu->exception_index = -1;",
"cpu-... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55... |
14,477 | int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx,
AVPacket *avpkt,
const AVFrame *frame,
int *got_packet_ptr)
{
int ret;
AVPacket user_pkt = *avpkt;
... | false | FFmpeg | 532f1c7aa7390af5e5de2892481041000e4d872b | int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx,
AVPacket *avpkt,
const AVFrame *frame,
int *got_packet_ptr)
{
int ret;
AVPacket user_pkt = *avpkt;
... | {
"code": [],
"line_no": []
} | int VAR_0 avcodec_encode_video2(AVCodecContext *avctx,
AVPacket *avpkt,
const AVFrame *frame,
int *got_packet_ptr)
{
int ret;
AVPacket user_pkt = *avpkt;
*got_pa... | [
"int VAR_0 avcodec_encode_video2(AVCodecContext *avctx,\nAVPacket *avpkt,\nconst AVFrame *frame,\nint *got_packet_ptr)\n{",
"int ret;",
"AVPacket user_pkt = *avpkt;",
"*got_packet_ptr = 0;",
"if (!(avctx->codec->capabilities & CODEC_CAP_DELAY) && !frame) {",
"av_free_packet(avpkt);",
"av_init_packet(avp... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35,
37
],
[
41
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
],
[
57
... |
14,478 | static int net_rx_ok(void *opaque)
{
struct XenNetDev *netdev = opaque;
RING_IDX rc, rp;
if (netdev->xendev.be_state != XenbusStateConnected)
return 0;
rc = netdev->rx_ring.req_cons;
rp = netdev->rx_ring.sring->req_prod;
xen_rmb();
if (rc == rp || RING_REQUEST_CONS_OVERFLOW(&... | false | qemu | e3f5ec2b5e92706e3b807059f79b1fb5d936e567 | static int net_rx_ok(void *opaque)
{
struct XenNetDev *netdev = opaque;
RING_IDX rc, rp;
if (netdev->xendev.be_state != XenbusStateConnected)
return 0;
rc = netdev->rx_ring.req_cons;
rp = netdev->rx_ring.sring->req_prod;
xen_rmb();
if (rc == rp || RING_REQUEST_CONS_OVERFLOW(&... | {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0)
{
struct XenNetDev *VAR_1 = VAR_0;
RING_IDX rc, rp;
if (VAR_1->xendev.be_state != XenbusStateConnected)
return 0;
rc = VAR_1->rx_ring.req_cons;
rp = VAR_1->rx_ring.sring->req_prod;
xen_rmb();
if (rc == rp || RING_REQUEST_CONS_OVERFLOW(&VAR_1->rx... | [
"static int FUNC_0(void *VAR_0)\n{",
"struct XenNetDev *VAR_1 = VAR_0;",
"RING_IDX rc, rp;",
"if (VAR_1->xendev.be_state != XenbusStateConnected)\nreturn 0;",
"rc = VAR_1->rx_ring.req_cons;",
"rp = VAR_1->rx_ring.sring->req_prod;",
"xen_rmb();",
"if (rc == rp || RING_REQUEST_CONS_OVERFLOW(&VAR_1->rx_r... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
14,479 | uint64_t migrate_max_downtime(void)
{
return max_downtime;
}
| false | qemu | 2ff30257974e19ebe2a97baad32ac29c06da5fb9 | uint64_t migrate_max_downtime(void)
{
return max_downtime;
}
| {
"code": [],
"line_no": []
} | uint64_t FUNC_0(void)
{
return max_downtime;
}
| [
"uint64_t FUNC_0(void)\n{",
"return max_downtime;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
14,480 | static void tc6393xb_gpio_set(void *opaque, int line, int level)
{
// TC6393xbState *s = opaque;
if (line > TC6393XB_GPIOS) {
printf("%s: No GPIO pin %i\n", __FUNCTION__, line);
return;
}
// FIXME: how does the chip reflect the GPIO input level change?
}
| false | qemu | a89f364ae8740dfc31b321eed9ee454e996dc3c1 | static void tc6393xb_gpio_set(void *opaque, int line, int level)
{
if (line > TC6393XB_GPIOS) {
printf("%s: No GPIO pin %i\n", __FUNCTION__, line);
return;
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, int VAR_1, int VAR_2)
{
if (VAR_1 > TC6393XB_GPIOS) {
printf("%s: No GPIO pin %i\n", __FUNCTION__, VAR_1);
return;
}
}
| [
"static void FUNC_0(void *VAR_0, int VAR_1, int VAR_2)\n{",
"if (VAR_1 > TC6393XB_GPIOS) {",
"printf(\"%s: No GPIO pin %i\\n\", __FUNCTION__, VAR_1);",
"return;",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
]
] |
14,481 | static void ne2000_receive(void *opaque, const uint8_t *buf, int size)
{
NE2000State *s = opaque;
uint8_t *p;
int total_len, next, avail, len, index, mcast_idx;
uint8_t buf1[60];
static const uint8_t broadcast_macaddr[6] =
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
#if defined(DE... | false | qemu | 0ae045ae439ad83692ad039a554f7d62acf9de5c | static void ne2000_receive(void *opaque, const uint8_t *buf, int size)
{
NE2000State *s = opaque;
uint8_t *p;
int total_len, next, avail, len, index, mcast_idx;
uint8_t buf1[60];
static const uint8_t broadcast_macaddr[6] =
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
#if defined(DE... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
NE2000State *s = VAR_0;
uint8_t *p;
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;
uint8_t buf1[60];
static const uint8_t VAR_9[6] =
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
#if defined(DEBUG_NE2000)
printf(... | [
"static void FUNC_0(void *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"NE2000State *s = VAR_0;",
"uint8_t *p;",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;",
"uint8_t buf1[60];",
"static const uint8_t VAR_9[6] =\n{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };",
"#if defined(DEBUG_NE2000)\nprintf(\"NE2000: ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13,
15
],
[
19,
21
],
[
23,
27,
29
],
[
35
],
[
39
],
[
41
],
[
45,
47
],
[
49
],
[
53,
55
],
[
57
],
[
59,
61
],
[... |
14,482 | static TCGv gen_muls_i64_i32(TCGv a, TCGv b)
{
TCGv tmp1 = tcg_temp_new(TCG_TYPE_I64);
TCGv tmp2 = tcg_temp_new(TCG_TYPE_I64);
tcg_gen_ext_i32_i64(tmp1, a);
dead_tmp(a);
tcg_gen_ext_i32_i64(tmp2, b);
dead_tmp(b);
tcg_gen_mul_i64(tmp1, tmp1, tmp2);
return tmp1;
}
| false | qemu | a7812ae412311d7d47f8aa85656faadac9d64b56 | static TCGv gen_muls_i64_i32(TCGv a, TCGv b)
{
TCGv tmp1 = tcg_temp_new(TCG_TYPE_I64);
TCGv tmp2 = tcg_temp_new(TCG_TYPE_I64);
tcg_gen_ext_i32_i64(tmp1, a);
dead_tmp(a);
tcg_gen_ext_i32_i64(tmp2, b);
dead_tmp(b);
tcg_gen_mul_i64(tmp1, tmp1, tmp2);
return tmp1;
}
| {
"code": [],
"line_no": []
} | static TCGv FUNC_0(TCGv a, TCGv b)
{
TCGv tmp1 = tcg_temp_new(TCG_TYPE_I64);
TCGv tmp2 = tcg_temp_new(TCG_TYPE_I64);
tcg_gen_ext_i32_i64(tmp1, a);
dead_tmp(a);
tcg_gen_ext_i32_i64(tmp2, b);
dead_tmp(b);
tcg_gen_mul_i64(tmp1, tmp1, tmp2);
return tmp1;
}
| [
"static TCGv FUNC_0(TCGv a, TCGv b)\n{",
"TCGv tmp1 = tcg_temp_new(TCG_TYPE_I64);",
"TCGv tmp2 = tcg_temp_new(TCG_TYPE_I64);",
"tcg_gen_ext_i32_i64(tmp1, a);",
"dead_tmp(a);",
"tcg_gen_ext_i32_i64(tmp2, b);",
"dead_tmp(b);",
"tcg_gen_mul_i64(tmp1, tmp1, tmp2);",
"return tmp1;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
14,483 | void runstate_set(RunState new_state)
{
if (new_state >= RUN_STATE_MAX ||
!runstate_valid_transitions[current_run_state][new_state]) {
fprintf(stderr, "invalid runstate transition\n");
abort();
}
current_run_state = new_state;
}
| false | qemu | 207c5cd20c15244b7747cacf45b8dc1fd27deaa4 | void runstate_set(RunState new_state)
{
if (new_state >= RUN_STATE_MAX ||
!runstate_valid_transitions[current_run_state][new_state]) {
fprintf(stderr, "invalid runstate transition\n");
abort();
}
current_run_state = new_state;
}
| {
"code": [],
"line_no": []
} | void FUNC_0(RunState VAR_0)
{
if (VAR_0 >= RUN_STATE_MAX ||
!runstate_valid_transitions[current_run_state][VAR_0]) {
fprintf(stderr, "invalid runstate transition\n");
abort();
}
current_run_state = VAR_0;
}
| [
"void FUNC_0(RunState VAR_0)\n{",
"if (VAR_0 >= RUN_STATE_MAX ||\n!runstate_valid_transitions[current_run_state][VAR_0]) {",
"fprintf(stderr, \"invalid runstate transition\\n\");",
"abort();",
"}",
"current_run_state = VAR_0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
]
] |
14,484 | static int kvmppc_put_books_sregs(PowerPCCPU *cpu)
{
CPUPPCState *env = &cpu->env;
struct kvm_sregs sregs;
int i;
sregs.pvr = env->spr[SPR_PVR];
sregs.u.s.sdr1 = env->spr[SPR_SDR1];
/* Sync SLB */
#ifdef TARGET_PPC64
for (i = 0; i < ARRAY_SIZE(env->slb); i++) {
sregs.... | false | qemu | e5c0d3ce40e40c903a7e65ded61d8742af947655 | static int kvmppc_put_books_sregs(PowerPCCPU *cpu)
{
CPUPPCState *env = &cpu->env;
struct kvm_sregs sregs;
int i;
sregs.pvr = env->spr[SPR_PVR];
sregs.u.s.sdr1 = env->spr[SPR_SDR1];
#ifdef TARGET_PPC64
for (i = 0; i < ARRAY_SIZE(env->slb); i++) {
sregs.u.s.ppc64.slb[... | {
"code": [],
"line_no": []
} | static int FUNC_0(PowerPCCPU *VAR_0)
{
CPUPPCState *env = &VAR_0->env;
struct kvm_sregs VAR_1;
int VAR_2;
VAR_1.pvr = env->spr[SPR_PVR];
VAR_1.u.s.sdr1 = env->spr[SPR_SDR1];
#ifdef TARGET_PPC64
for (VAR_2 = 0; VAR_2 < ARRAY_SIZE(env->slb); VAR_2++) {
VAR_1.u.s.ppc64.... | [
"static int FUNC_0(PowerPCCPU *VAR_0)\n{",
"CPUPPCState *env = &VAR_0->env;",
"struct kvm_sregs VAR_1;",
"int VAR_2;",
"VAR_1.pvr = env->spr[SPR_PVR];",
"VAR_1.u.s.sdr1 = env->spr[SPR_SDR1];",
"#ifdef TARGET_PPC64\nfor (VAR_2 = 0; VAR_2 < ARRAY_SIZE(env->slb); VAR_2++) {",
"VAR_1.u.s.ppc64.slb[VAR_2].... | [
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
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
45
],
[
47
],
[
49
],
[
55
],
[
59,
61
],
[... |
14,485 | int kvmppc_remove_spapr_tce(void *table, int fd, uint32_t window_size)
{
long len;
if (fd < 0) {
return -1;
}
len = (window_size / SPAPR_TCE_PAGE_SIZE)*sizeof(sPAPRTCE);
if ((munmap(table, len) < 0) ||
(close(fd) < 0)) {
fprintf(stderr, "KVM: Unexpected error rem... | false | qemu | a83000f5e3fac30a7f213af1ba6a8f827622854d | int kvmppc_remove_spapr_tce(void *table, int fd, uint32_t window_size)
{
long len;
if (fd < 0) {
return -1;
}
len = (window_size / SPAPR_TCE_PAGE_SIZE)*sizeof(sPAPRTCE);
if ((munmap(table, len) < 0) ||
(close(fd) < 0)) {
fprintf(stderr, "KVM: Unexpected error rem... | {
"code": [],
"line_no": []
} | int FUNC_0(void *VAR_0, int VAR_1, uint32_t VAR_2)
{
long VAR_3;
if (VAR_1 < 0) {
return -1;
}
VAR_3 = (VAR_2 / SPAPR_TCE_PAGE_SIZE)*sizeof(sPAPRTCE);
if ((munmap(VAR_0, VAR_3) < 0) ||
(close(VAR_1) < 0)) {
fprintf(stderr, "KVM: Unexpected error removing TCE VAR_... | [
"int FUNC_0(void *VAR_0, int VAR_1, uint32_t VAR_2)\n{",
"long VAR_3;",
"if (VAR_1 < 0) {",
"return -1;",
"}",
"VAR_3 = (VAR_2 / SPAPR_TCE_PAGE_SIZE)*sizeof(sPAPRTCE);",
"if ((munmap(VAR_0, VAR_3) < 0) ||\n(close(VAR_1) < 0)) {",
"fprintf(stderr, \"KVM: Unexpected error removing TCE VAR_0: %s\",\nstre... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19,
21
],
[
23,
25
],
[
29
],
[
33
],
[
35
]
] |
14,486 | static unsigned int crisv32_decoder(CPUCRISState *env, DisasContext *dc)
{
int insn_len = 2;
int i;
if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP | CPU_LOG_TB_OP_OPT))) {
tcg_gen_debug_insn_start(dc->pc);
}
/* Load a halfword onto the instruction register. */
dc->ir ... | false | qemu | 42a268c241183877192c376d03bd9b6d527407c7 | static unsigned int crisv32_decoder(CPUCRISState *env, DisasContext *dc)
{
int insn_len = 2;
int i;
if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP | CPU_LOG_TB_OP_OPT))) {
tcg_gen_debug_insn_start(dc->pc);
}
dc->ir = cris_fetch(env, dc, dc->pc, 2, 0);
dc-... | {
"code": [],
"line_no": []
} | static unsigned int FUNC_0(CPUCRISState *VAR_0, DisasContext *VAR_1)
{
int VAR_2 = 2;
int VAR_3;
if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP | CPU_LOG_TB_OP_OPT))) {
tcg_gen_debug_insn_start(VAR_1->pc);
}
VAR_1->ir = cris_fetch(VAR_0, VAR_1, VAR_1->pc, 2, 0);
... | [
"static unsigned int FUNC_0(CPUCRISState *VAR_0, DisasContext *VAR_1)\n{",
"int VAR_2 = 2;",
"int VAR_3;",
"if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP | CPU_LOG_TB_OP_OPT))) {",
"tcg_gen_debug_insn_start(VAR_1->pc);",
"}",
"VAR_1->ir = cris_fetch(VAR_0, VAR_1, VAR_1->pc, 2, 0);",
"VAR_1->opcode =... | [
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
21
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
57... |
14,487 | static int64_t coroutine_fn cow_co_get_block_status(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int *num_same)
{
BDRVCowState *s = bs->opaque;
int ret = cow_co_is_allocated(bs, sector_num, nb_sectors, num_same);
int64_t offset = s->cow_sectors_offset + (sector_num << BDRV_SECTOR_B... | false | qemu | 550830f9351291c585c963204ad9127998b1c1ce | static int64_t coroutine_fn cow_co_get_block_status(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int *num_same)
{
BDRVCowState *s = bs->opaque;
int ret = cow_co_is_allocated(bs, sector_num, nb_sectors, num_same);
int64_t offset = s->cow_sectors_offset + (sector_num << BDRV_SECTOR_B... | {
"code": [],
"line_no": []
} | static int64_t VAR_0 cow_co_get_block_status(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int *num_same)
{
BDRVCowState *s = bs->opaque;
int ret = cow_co_is_allocated(bs, sector_num, nb_sectors, num_same);
int64_t offset = s->cow_sectors_offset + (sector_num << BDRV_SECTOR_BITS);
... | [
"static int64_t VAR_0 cow_co_get_block_status(BlockDriverState *bs,\nint64_t sector_num, int nb_sectors, int *num_same)\n{",
"BDRVCowState *s = bs->opaque;",
"int ret = cow_co_is_allocated(bs, sector_num, nb_sectors, num_same);",
"int64_t offset = s->cow_sectors_offset + (sector_num << BDRV_SECTOR_BITS);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
14,488 | static int rle_unpack(unsigned char *src, unsigned char *dest, int len)
{
unsigned char *ps;
unsigned char *pd;
int i, l;
ps = src;
pd = dest;
if (len & 1)
*pd++ = *ps++;
len >>= 1;
i = 0;
do {
l = *ps++;
if (l & 0x80) {
l = (l & ... | false | FFmpeg | 8458dab185ab52c3663c6f5a57c2bee7ca22af37 | static int rle_unpack(unsigned char *src, unsigned char *dest, int len)
{
unsigned char *ps;
unsigned char *pd;
int i, l;
ps = src;
pd = dest;
if (len & 1)
*pd++ = *ps++;
len >>= 1;
i = 0;
do {
l = *ps++;
if (l & 0x80) {
l = (l & ... | {
"code": [],
"line_no": []
} | static int FUNC_0(unsigned char *VAR_0, unsigned char *VAR_1, int VAR_2)
{
unsigned char *VAR_3;
unsigned char *VAR_4;
int VAR_5, VAR_6;
VAR_3 = VAR_0;
VAR_4 = VAR_1;
if (VAR_2 & 1)
*VAR_4++ = *VAR_3++;
VAR_2 >>= 1;
VAR_5 = 0;
do {
VAR_6 = *VAR_3++;
... | [
"static int FUNC_0(unsigned char *VAR_0, unsigned char *VAR_1, int VAR_2)\n{",
"unsigned char *VAR_3;",
"unsigned char *VAR_4;",
"int VAR_5, VAR_6;",
"VAR_3 = VAR_0;",
"VAR_4 = VAR_1;",
"if (VAR_2 & 1)\n*VAR_4++ = *VAR_3++;",
"VAR_2 >>= 1;",
"VAR_5 = 0;",
"do {",
"VAR_6 = *VAR_3++;",
"if (VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17,
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
14,489 | void scsi_bus_legacy_handle_cmdline(SCSIBus *bus, Error **errp)
{
Location loc;
DriveInfo *dinfo;
int unit;
Error *err = NULL;
loc_push_none(&loc);
for (unit = 0; unit <= bus->info->max_target; unit++) {
dinfo = drive_get(IF_SCSI, bus->busnr, unit);
if (dinfo == NULL) ... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | void scsi_bus_legacy_handle_cmdline(SCSIBus *bus, Error **errp)
{
Location loc;
DriveInfo *dinfo;
int unit;
Error *err = NULL;
loc_push_none(&loc);
for (unit = 0; unit <= bus->info->max_target; unit++) {
dinfo = drive_get(IF_SCSI, bus->busnr, unit);
if (dinfo == NULL) ... | {
"code": [],
"line_no": []
} | void FUNC_0(SCSIBus *VAR_0, Error **VAR_1)
{
Location loc;
DriveInfo *dinfo;
int VAR_2;
Error *err = NULL;
loc_push_none(&loc);
for (VAR_2 = 0; VAR_2 <= VAR_0->info->max_target; VAR_2++) {
dinfo = drive_get(IF_SCSI, VAR_0->busnr, VAR_2);
if (dinfo == NULL) {
... | [
"void FUNC_0(SCSIBus *VAR_0, Error **VAR_1)\n{",
"Location loc;",
"DriveInfo *dinfo;",
"int VAR_2;",
"Error *err = NULL;",
"loc_push_none(&loc);",
"for (VAR_2 = 0; VAR_2 <= VAR_0->info->max_target; VAR_2++) {",
"dinfo = drive_get(IF_SCSI, VAR_0->busnr, VAR_2);",
"if (dinfo == NULL) {",
"continue;"... | [
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
],
[... |
14,490 | static void netfilter_print_info(Monitor *mon, NetFilterState *nf)
{
char *str;
ObjectProperty *prop;
ObjectPropertyIterator iter;
StringOutputVisitor *ov;
/* generate info str */
object_property_iter_init(&iter, OBJECT(nf));
while ((prop = object_property_iter_next(&iter))) {
... | false | qemu | 3b098d56979d2f7fd707c5be85555d114353a28d | static void netfilter_print_info(Monitor *mon, NetFilterState *nf)
{
char *str;
ObjectProperty *prop;
ObjectPropertyIterator iter;
StringOutputVisitor *ov;
object_property_iter_init(&iter, OBJECT(nf));
while ((prop = object_property_iter_next(&iter))) {
if (!strcmp(prop->... | {
"code": [],
"line_no": []
} | static void FUNC_0(Monitor *VAR_0, NetFilterState *VAR_1)
{
char *VAR_2;
ObjectProperty *prop;
ObjectPropertyIterator iter;
StringOutputVisitor *ov;
object_property_iter_init(&iter, OBJECT(VAR_1));
while ((prop = object_property_iter_next(&iter))) {
if (!strcmp(prop->name... | [
"static void FUNC_0(Monitor *VAR_0, NetFilterState *VAR_1)\n{",
"char *VAR_2;",
"ObjectProperty *prop;",
"ObjectPropertyIterator iter;",
"StringOutputVisitor *ov;",
"object_property_iter_init(&iter, OBJECT(VAR_1));",
"while ((prop = object_property_iter_next(&iter))) {",
"if (!strcmp(prop->name, \"typ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
14,491 | static int restore_user_regs(CPUPPCState *env,
struct target_mcontext *frame, int sig)
{
target_ulong save_r2 = 0;
target_ulong msr;
target_ulong ccr;
int i;
if (!sig) {
save_r2 = env->gpr[2];
}
/* Restore general registers. */
for (... | false | qemu | c650c008e326f3a1e84083bc269265456057a212 | static int restore_user_regs(CPUPPCState *env,
struct target_mcontext *frame, int sig)
{
target_ulong save_r2 = 0;
target_ulong msr;
target_ulong ccr;
int i;
if (!sig) {
save_r2 = env->gpr[2];
}
for (i = 0; i < ARRAY_SIZE(env->gpr); ... | {
"code": [],
"line_no": []
} | static int FUNC_0(CPUPPCState *VAR_0,
struct target_mcontext *VAR_1, int VAR_2)
{
target_ulong save_r2 = 0;
target_ulong msr;
target_ulong ccr;
int VAR_3;
if (!VAR_2) {
save_r2 = VAR_0->gpr[2];
}
for (VAR_3 = 0; VAR_3 < ARRAY_SIZE(VA... | [
"static int FUNC_0(CPUPPCState *VAR_0,\nstruct target_mcontext *VAR_1, int VAR_2)\n{",
"target_ulong save_r2 = 0;",
"target_ulong msr;",
"target_ulong ccr;",
"int VAR_3;",
"if (!VAR_2) {",
"save_r2 = VAR_0->gpr[2];",
"}",
"for (VAR_3 = 0; VAR_3 < ARRAY_SIZE(VAR_0->gpr); VAR_3++) {",
"if (__get_use... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41,
43,
45,
47
],
[
49,
51
],
[
55
],
[
57
... |
14,492 | static void virtio_pci_config_write(void *opaque, hwaddr addr,
uint64_t val, unsigned size)
{
VirtIOPCIProxy *proxy = opaque;
uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
if (addr < config) {
virtio_ioport_write(proxy, addr, val);
return;
... | false | qemu | 9807caccd605d09a72495637959568d690e10175 | static void virtio_pci_config_write(void *opaque, hwaddr addr,
uint64_t val, unsigned size)
{
VirtIOPCIProxy *proxy = opaque;
uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
if (addr < config) {
virtio_ioport_write(proxy, addr, val);
return;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
VirtIOPCIProxy *proxy = VAR_0;
uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
if (VAR_1 < config) {
virtio_ioport_write(proxy, VAR_1, VAR_2);
return;
}
... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"VirtIOPCIProxy *proxy = VAR_0;",
"uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);",
"if (VAR_1 < config) {",
"virtio_ioport_write(proxy, VAR_1, VAR_2);",
"return;",
"}",
"VAR_1 -= config;",
"switch (VAR_3) {"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
29
],
[
31,
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49,
51
],
[
53
... |
14,493 | int qcow2_alloc_cluster_link_l2(BlockDriverState *bs, QCowL2Meta *m)
{
BDRVQcowState *s = bs->opaque;
int i, j = 0, l2_index, ret;
uint64_t *old_cluster, start_sect, l2_offset, *l2_table;
uint64_t cluster_offset = m->cluster_offset;
bool cow = false;
trace_qcow2_cluster_link_l2(qemu_cor... | false | qemu | 250196f19c6e7df12965d74a5073e10aba06c802 | int qcow2_alloc_cluster_link_l2(BlockDriverState *bs, QCowL2Meta *m)
{
BDRVQcowState *s = bs->opaque;
int i, j = 0, l2_index, ret;
uint64_t *old_cluster, start_sect, l2_offset, *l2_table;
uint64_t cluster_offset = m->cluster_offset;
bool cow = false;
trace_qcow2_cluster_link_l2(qemu_cor... | {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState *VAR_0, QCowL2Meta *VAR_1)
{
BDRVQcowState *s = VAR_0->opaque;
int VAR_2, VAR_3 = 0, VAR_4, VAR_5;
uint64_t *old_cluster, start_sect, l2_offset, *l2_table;
uint64_t cluster_offset = VAR_1->cluster_offset;
bool cow = false;
trace_qcow2_cluster_link_l2(qemu_cor... | [
"int FUNC_0(BlockDriverState *VAR_0, QCowL2Meta *VAR_1)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"int VAR_2, VAR_3 = 0, VAR_4, VAR_5;",
"uint64_t *old_cluster, start_sect, l2_offset, *l2_table;",
"uint64_t cluster_offset = VAR_1->cluster_offset;",
"bool cow = false;",
"trace_qcow2_cluster_link_l2(qemu_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21,
23
],
[
27
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
53
],
[
55
... |
14,494 | MemTxResult address_space_read_continue(AddressSpace *as, hwaddr addr,
MemTxAttrs attrs, uint8_t *buf,
int len, hwaddr addr1, hwaddr l,
MemoryRegion *mr)
{
uint8_t *ptr;
uint64_t val;
... | false | qemu | 04bf2526ce87f21b32c9acba1c5518708c243ad0 | MemTxResult address_space_read_continue(AddressSpace *as, hwaddr addr,
MemTxAttrs attrs, uint8_t *buf,
int len, hwaddr addr1, hwaddr l,
MemoryRegion *mr)
{
uint8_t *ptr;
uint64_t val;
... | {
"code": [],
"line_no": []
} | MemTxResult FUNC_0(AddressSpace *as, hwaddr addr,
MemTxAttrs attrs, uint8_t *buf,
int len, hwaddr addr1, hwaddr l,
MemoryRegion *mr)
{
uint8_t *ptr;
uint64_t val;
MemTxResult result... | [
"MemTxResult FUNC_0(AddressSpace *as, hwaddr addr,\nMemTxAttrs attrs, uint8_t *buf,\nint len, hwaddr addr1, hwaddr l,\nMemoryRegion *mr)\n{",
"uint8_t *ptr;",
"uint64_t val;",
"MemTxResult result = MEMTX_OK;",
"bool release_lock = false;",
"for (;;) {",
"if (!memory_access_is_direct(mr, false)) {",
"r... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
29
],
[
31
],
[
33,
37,
39
],
[
41
],
[
43
],
[
45,
49,
51
],
[
53
],
[
55
],
[... |
14,495 | FsTypeEntry *get_fsdev_fsentry(char *id)
{
struct FsTypeListEntry *fsle;
QTAILQ_FOREACH(fsle, &fstype_entries, next) {
if (strcmp(fsle->fse.fsdev_id, id) == 0) {
return &fsle->fse;
}
}
return NULL;
}
| false | qemu | 9f506893a454ce24263aba49594aa953e9a52853 | FsTypeEntry *get_fsdev_fsentry(char *id)
{
struct FsTypeListEntry *fsle;
QTAILQ_FOREACH(fsle, &fstype_entries, next) {
if (strcmp(fsle->fse.fsdev_id, id) == 0) {
return &fsle->fse;
}
}
return NULL;
}
| {
"code": [],
"line_no": []
} | FsTypeEntry *FUNC_0(char *id)
{
struct FsTypeListEntry *VAR_0;
QTAILQ_FOREACH(VAR_0, &fstype_entries, next) {
if (strcmp(VAR_0->fse.fsdev_id, id) == 0) {
return &VAR_0->fse;
}
}
return NULL;
}
| [
"FsTypeEntry *FUNC_0(char *id)\n{",
"struct FsTypeListEntry *VAR_0;",
"QTAILQ_FOREACH(VAR_0, &fstype_entries, next) {",
"if (strcmp(VAR_0->fse.fsdev_id, id) == 0) {",
"return &VAR_0->fse;",
"}",
"}",
"return NULL;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
14,497 | bool eth_parse_ipv6_hdr(struct iovec *pkt, int pkt_frags,
size_t ip6hdr_off, uint8_t *l4proto,
size_t *full_hdr_len)
{
struct ip6_header ip6_hdr;
struct ip6_ext_hdr ext_hdr;
size_t bytes_read;
bytes_read = iov_to_buf(pkt, pkt_frags, ip6hdr_off,
... | false | qemu | eb700029c7836798046191d62d595363d92c84d4 | bool eth_parse_ipv6_hdr(struct iovec *pkt, int pkt_frags,
size_t ip6hdr_off, uint8_t *l4proto,
size_t *full_hdr_len)
{
struct ip6_header ip6_hdr;
struct ip6_ext_hdr ext_hdr;
size_t bytes_read;
bytes_read = iov_to_buf(pkt, pkt_frags, ip6hdr_off,
... | {
"code": [],
"line_no": []
} | bool FUNC_0(struct iovec *pkt, int pkt_frags,
size_t ip6hdr_off, uint8_t *l4proto,
size_t *full_hdr_len)
{
struct ip6_header VAR_0;
struct ip6_ext_hdr VAR_1;
size_t bytes_read;
bytes_read = iov_to_buf(pkt, pkt_frags, ip6hdr_off,
... | [
"bool FUNC_0(struct iovec *pkt, int pkt_frags,\nsize_t ip6hdr_off, uint8_t *l4proto,\nsize_t *full_hdr_len)\n{",
"struct ip6_header VAR_0;",
"struct ip6_ext_hdr VAR_1;",
"size_t bytes_read;",
"bytes_read = iov_to_buf(pkt, pkt_frags, ip6hdr_off,\n&VAR_0, sizeof(VAR_0));",
"if (bytes_read < sizeof(VAR_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
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[
55
... |
14,498 | static void kvmppc_timer_hack(void *opaque)
{
qemu_service_io();
qemu_mod_timer(kvmppc_timer, qemu_get_clock_ns(vm_clock) + kvmppc_timer_rate);
}
| false | qemu | 74e26c179efa6eed821c2863b8a50c7b586432c4 | static void kvmppc_timer_hack(void *opaque)
{
qemu_service_io();
qemu_mod_timer(kvmppc_timer, qemu_get_clock_ns(vm_clock) + kvmppc_timer_rate);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
qemu_service_io();
qemu_mod_timer(kvmppc_timer, qemu_get_clock_ns(vm_clock) + kvmppc_timer_rate);
}
| [
"static void FUNC_0(void *VAR_0)\n{",
"qemu_service_io();",
"qemu_mod_timer(kvmppc_timer, qemu_get_clock_ns(vm_clock) + kvmppc_timer_rate);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
14,500 | static void setup_rt_frame(int sig, struct target_sigaction *ka,
target_siginfo_t *info,
target_sigset_t *set, CPUPPCState *env)
{
struct target_rt_sigframe *rt_sf;
struct target_mcontext *frame;
target_ulong rt_sf_addr, newsp = 0;
int i, err ... | false | qemu | c650c008e326f3a1e84083bc269265456057a212 | static void setup_rt_frame(int sig, struct target_sigaction *ka,
target_siginfo_t *info,
target_sigset_t *set, CPUPPCState *env)
{
struct target_rt_sigframe *rt_sf;
struct target_mcontext *frame;
target_ulong rt_sf_addr, newsp = 0;
int i, err ... | {
"code": [],
"line_no": []
} | static void FUNC_0(int VAR_0, struct target_sigaction *VAR_1,
target_siginfo_t *VAR_2,
target_sigset_t *VAR_3, CPUPPCState *VAR_4)
{
struct target_rt_sigframe *VAR_5;
struct target_mcontext *VAR_6;
target_ulong rt_sf_addr, newsp = 0;
int VAR_7... | [
"static void FUNC_0(int VAR_0, struct target_sigaction *VAR_1,\ntarget_siginfo_t *VAR_2,\ntarget_sigset_t *VAR_3, CPUPPCState *VAR_4)\n{",
"struct target_rt_sigframe *VAR_5;",
"struct target_mcontext *VAR_6;",
"target_ulong rt_sf_addr, newsp = 0;",
"int VAR_7, VAR_8 = 0;",
"int VAR_9;",
"rt_sf_addr = ge... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23,
25
],
[
29
],
[
33
],
[
37
],
[
39
],
[
41,
43
],
[
45,
47
],
[
49,
51
],
[
53,
55
],
[... |
14,501 | static void gen_test_cc(int cc, int label)
{
TCGv tmp;
TCGv tmp2;
int inv;
switch (cc) {
case 0: /* eq: Z */
tmp = load_cpu_field(ZF);
tcg_gen_brcondi_i32(TCG_COND_EQ, tmp, 0, label);
break;
case 1: /* ne: !Z */
tmp = load_cpu_field(ZF);
tcg_... | false | qemu | 42a268c241183877192c376d03bd9b6d527407c7 | static void gen_test_cc(int cc, int label)
{
TCGv tmp;
TCGv tmp2;
int inv;
switch (cc) {
case 0:
tmp = load_cpu_field(ZF);
tcg_gen_brcondi_i32(TCG_COND_EQ, tmp, 0, label);
break;
case 1:
tmp = load_cpu_field(ZF);
tcg_gen_brcondi_i32(TCG_CON... | {
"code": [],
"line_no": []
} | static void FUNC_0(int VAR_0, int VAR_1)
{
TCGv tmp;
TCGv tmp2;
int VAR_2;
switch (VAR_0) {
case 0:
tmp = load_cpu_field(ZF);
tcg_gen_brcondi_i32(TCG_COND_EQ, tmp, 0, VAR_1);
break;
case 1:
tmp = load_cpu_field(ZF);
tcg_gen_brcondi_i32(TCG_... | [
"static void FUNC_0(int VAR_0, int VAR_1)\n{",
"TCGv tmp;",
"TCGv tmp2;",
"int VAR_2;",
"switch (VAR_0) {",
"case 0:\ntmp = load_cpu_field(ZF);",
"tcg_gen_brcondi_i32(TCG_COND_EQ, tmp, 0, VAR_1);",
"break;",
"case 1:\ntmp = load_cpu_field(ZF);",
"tcg_gen_brcondi_i32(TCG_COND_NE, tmp, 0, VAR_1);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47,... |
14,502 | static int kvm_put_xcrs(X86CPU *cpu)
{
CPUX86State *env = &cpu->env;
struct kvm_xcrs xcrs = {};
if (!kvm_has_xcrs()) {
return 0;
}
xcrs.nr_xcrs = 1;
xcrs.flags = 0;
xcrs.xcrs[0].xcr = 0;
xcrs.xcrs[0].value = env->xcr0;
return kvm_vcpu_ioctl(CPU(cpu), KVM_SET_XC... | false | qemu | 28143b409f698210d85165ca518235ac7e7c5ac5 | static int kvm_put_xcrs(X86CPU *cpu)
{
CPUX86State *env = &cpu->env;
struct kvm_xcrs xcrs = {};
if (!kvm_has_xcrs()) {
return 0;
}
xcrs.nr_xcrs = 1;
xcrs.flags = 0;
xcrs.xcrs[0].xcr = 0;
xcrs.xcrs[0].value = env->xcr0;
return kvm_vcpu_ioctl(CPU(cpu), KVM_SET_XC... | {
"code": [],
"line_no": []
} | static int FUNC_0(X86CPU *VAR_0)
{
CPUX86State *env = &VAR_0->env;
struct kvm_xcrs VAR_1 = {};
if (!kvm_has_xcrs()) {
return 0;
}
VAR_1.nr_xcrs = 1;
VAR_1.flags = 0;
VAR_1.VAR_1[0].xcr = 0;
VAR_1.VAR_1[0].value = env->xcr0;
return kvm_vcpu_ioctl(CPU(VAR_0), KVM... | [
"static int FUNC_0(X86CPU *VAR_0)\n{",
"CPUX86State *env = &VAR_0->env;",
"struct kvm_xcrs VAR_1 = {};",
"if (!kvm_has_xcrs()) {",
"return 0;",
"}",
"VAR_1.nr_xcrs = 1;",
"VAR_1.flags = 0;",
"VAR_1.VAR_1[0].xcr = 0;",
"VAR_1.VAR_1[0].value = env->xcr0;",
"return kvm_vcpu_ioctl(CPU(VAR_0), KVM_SE... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
14,503 | START_TEST(qint_destroy_test)
{
QInt *qi = qint_from_int(0);
QDECREF(qi);
}
| false | qemu | 65cdadd2e2de76f7db3bf6b7d8dd8c67abff9659 | START_TEST(qint_destroy_test)
{
QInt *qi = qint_from_int(0);
QDECREF(qi);
}
| {
"code": [],
"line_no": []
} | FUNC_0(VAR_0)
{
QInt *qi = qint_from_int(0);
QDECREF(qi);
}
| [
"FUNC_0(VAR_0)\n{",
"QInt *qi = qint_from_int(0);",
"QDECREF(qi);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
14,504 | static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
Error **errp)
{
bool is_listen = qemu_opt_get_bool(opts, "server", false);
bool is_waitconnect = is_listen && qemu_opt_get_bool(opts, "wait", true);
bool is_telnet = qemu_opt_get_bool(... | false | qemu | dfd100f242370886bb6732f70f1f7cbd8eb9fedc | static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
Error **errp)
{
bool is_listen = qemu_opt_get_bool(opts, "server", false);
bool is_waitconnect = is_listen && qemu_opt_get_bool(opts, "wait", true);
bool is_telnet = qemu_opt_get_bool(... | {
"code": [],
"line_no": []
} | static void FUNC_0(QemuOpts *VAR_0, ChardevBackend *VAR_1,
Error **VAR_2)
{
bool is_listen = qemu_opt_get_bool(VAR_0, "server", false);
bool is_waitconnect = is_listen && qemu_opt_get_bool(VAR_0, "wait", true);
bool is_telnet = qemu_opt_get_bool(VAR_0, "telne... | [
"static void FUNC_0(QemuOpts *VAR_0, ChardevBackend *VAR_1,\nError **VAR_2)\n{",
"bool is_listen = qemu_opt_get_bool(VAR_0, \"server\", false);",
"bool is_waitconnect = is_listen && qemu_opt_get_bool(VAR_0, \"wait\", true);",
"bool is_telnet = qemu_opt_get_bool(VAR_0, \"telnet\", false);",
"bool i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
14,505 | void ppc_tb_set_jmp_target(uintptr_t jmp_addr, uintptr_t addr)
{
tcg_insn_unit i1, i2;
uint64_t pair;
intptr_t diff = addr - jmp_addr;
if (in_range_b(diff)) {
i1 = B | (diff & 0x3fffffc);
i2 = NOP;
} else if (USE_REG_RA) {
intptr_t lo, hi;
diff = addr - (u... | false | qemu | eabb7b91b36b202b4dac2df2d59d698e3aff197a | void ppc_tb_set_jmp_target(uintptr_t jmp_addr, uintptr_t addr)
{
tcg_insn_unit i1, i2;
uint64_t pair;
intptr_t diff = addr - jmp_addr;
if (in_range_b(diff)) {
i1 = B | (diff & 0x3fffffc);
i2 = NOP;
} else if (USE_REG_RA) {
intptr_t lo, hi;
diff = addr - (u... | {
"code": [],
"line_no": []
} | void FUNC_0(uintptr_t VAR_0, uintptr_t VAR_1)
{
tcg_insn_unit i1, i2;
uint64_t pair;
intptr_t diff = VAR_1 - VAR_0;
if (in_range_b(diff)) {
i1 = B | (diff & 0x3fffffc);
i2 = NOP;
} else if (USE_REG_RA) {
intptr_t lo, hi;
diff = VAR_1 - (uintptr_t)tb_ret_ad... | [
"void FUNC_0(uintptr_t VAR_0, uintptr_t VAR_1)\n{",
"tcg_insn_unit i1, i2;",
"uint64_t pair;",
"intptr_t diff = VAR_1 - VAR_0;",
"if (in_range_b(diff)) {",
"i1 = B | (diff & 0x3fffffc);",
"i2 = NOP;",
"} else if (USE_REG_RA) {",
"intptr_t lo, hi;",
"diff = VAR_1 - (uintptr_t)tb_ret_addr;",
"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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
14,506 | int qcow2_update_header(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
QCowHeader *header;
char *buf;
size_t buflen = s->cluster_size;
int ret;
uint64_t total_size;
uint32_t refcount_table_clusters;
size_t header_length;
Qcow2UnknownHeaderExtension *uext;
buf... | false | qemu | e4603fe139e2161464d7e75faa3a650e31f057fc | int qcow2_update_header(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
QCowHeader *header;
char *buf;
size_t buflen = s->cluster_size;
int ret;
uint64_t total_size;
uint32_t refcount_table_clusters;
size_t header_length;
Qcow2UnknownHeaderExtension *uext;
buf... | {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState *VAR_0)
{
BDRVQcowState *s = VAR_0->opaque;
QCowHeader *header;
char *VAR_1;
size_t buflen = s->cluster_size;
int VAR_2;
uint64_t total_size;
uint32_t refcount_table_clusters;
size_t header_length;
Qcow2UnknownHeaderExtension *uext;
VAR_1 ... | [
"int FUNC_0(BlockDriverState *VAR_0)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"QCowHeader *header;",
"char *VAR_1;",
"size_t buflen = s->cluster_size;",
"int VAR_2;",
"uint64_t total_size;",
"uint32_t refcount_table_clusters;",
"size_t header_length;",
"Qcow2UnknownHeaderExtension *uext;",
"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
],
[
17
],
[
19
],
[
21
],
[
25
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53
... |
14,507 | static void gd_update_cursor(GtkDisplayState *s, gboolean override)
{
GdkWindow *window;
bool on_vga;
window = gtk_widget_get_window(GTK_WIDGET(s->drawing_area));
on_vga = (gtk_notebook_get_current_page(GTK_NOTEBOOK(s->notebook)) == 0);
if ((override || on_vga) && kbd_mouse_is_absolute()... | false | qemu | 5104a1f65088285ddf870aa641b9061064e8757d | static void gd_update_cursor(GtkDisplayState *s, gboolean override)
{
GdkWindow *window;
bool on_vga;
window = gtk_widget_get_window(GTK_WIDGET(s->drawing_area));
on_vga = (gtk_notebook_get_current_page(GTK_NOTEBOOK(s->notebook)) == 0);
if ((override || on_vga) && kbd_mouse_is_absolute()... | {
"code": [],
"line_no": []
} | static void FUNC_0(GtkDisplayState *VAR_0, gboolean VAR_1)
{
GdkWindow *window;
bool on_vga;
window = gtk_widget_get_window(GTK_WIDGET(VAR_0->drawing_area));
on_vga = (gtk_notebook_get_current_page(GTK_NOTEBOOK(VAR_0->notebook)) == 0);
if ((VAR_1 || on_vga) && kbd_mouse_is_absolute()) {
... | [
"static void FUNC_0(GtkDisplayState *VAR_0, gboolean VAR_1)\n{",
"GdkWindow *window;",
"bool on_vga;",
"window = gtk_widget_get_window(GTK_WIDGET(VAR_0->drawing_area));",
"on_vga = (gtk_notebook_get_current_page(GTK_NOTEBOOK(VAR_0->notebook)) == 0);",
"if ((VAR_1 || on_vga) && kbd_mouse_is_absolute()) {",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
14,510 | static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
{
Picture *pic = NULL;
int64_t pts;
int i, display_picture_number = 0, ret;
const int encoding_delay = s->max_b_frames ? s->max_b_frames :
(s->low_delay ? 0 : 1);
int dire... | false | FFmpeg | 7eb6eb03d83a4d6454ce1e20ec672dbf99f8f009 | static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
{
Picture *pic = NULL;
int64_t pts;
int i, display_picture_number = 0, ret;
const int encoding_delay = s->max_b_frames ? s->max_b_frames :
(s->low_delay ? 0 : 1);
int dire... | {
"code": [],
"line_no": []
} | static int FUNC_0(MpegEncContext *VAR_0, const AVFrame *VAR_1)
{
Picture *pic = NULL;
int64_t pts;
int VAR_2, VAR_3 = 0, VAR_4;
const int VAR_5 = VAR_0->max_b_frames ? VAR_0->max_b_frames :
(VAR_0->low_delay ? 0 : 1);
int VAR_6 = 1;
if (... | [
"static int FUNC_0(MpegEncContext *VAR_0, const AVFrame *VAR_1)\n{",
"Picture *pic = NULL;",
"int64_t pts;",
"int VAR_2, VAR_3 = 0, VAR_4;",
"const int VAR_5 = VAR_0->max_b_frames ? VAR_0->max_b_frames :\n(VAR_0->low_delay ? 0 : 1);",
"int VAR_6 = 1;",
"if (VAR_1) {",
"pts = VAR_1->pts;",
"VAR_3 = V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39,
41,
43
],
[
45
],
[
47
],
[
51,
53
... |
14,511 | static void pc_i440fx_2_4_machine_options(MachineClass *m)
{
PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
pc_i440fx_2_5_machine_options(m);
m->alias = NULL;
m->is_default = 0;
pcmc->broken_reserved_end = true;
pcmc->inter_dimm_gap = false;
SET_MACHINE_COMPAT(m, PC_COMPAT_2_4);
}
| true | qemu | 340065e5a11a515382c8b1112424c97e86ad2a3f | static void pc_i440fx_2_4_machine_options(MachineClass *m)
{
PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
pc_i440fx_2_5_machine_options(m);
m->alias = NULL;
m->is_default = 0;
pcmc->broken_reserved_end = true;
pcmc->inter_dimm_gap = false;
SET_MACHINE_COMPAT(m, PC_COMPAT_2_4);
}
| {
"code": [
" pcmc->inter_dimm_gap = false;",
" pcmc->inter_dimm_gap = false;"
],
"line_no": [
15,
15
]
} | static void FUNC_0(MachineClass *VAR_0)
{
PCMachineClass *pcmc = PC_MACHINE_CLASS(VAR_0);
pc_i440fx_2_5_machine_options(VAR_0);
VAR_0->alias = NULL;
VAR_0->is_default = 0;
pcmc->broken_reserved_end = true;
pcmc->inter_dimm_gap = false;
SET_MACHINE_COMPAT(VAR_0, PC_COMPAT_2_4);
}
| [
"static void FUNC_0(MachineClass *VAR_0)\n{",
"PCMachineClass *pcmc = PC_MACHINE_CLASS(VAR_0);",
"pc_i440fx_2_5_machine_options(VAR_0);",
"VAR_0->alias = NULL;",
"VAR_0->is_default = 0;",
"pcmc->broken_reserved_end = true;",
"pcmc->inter_dimm_gap = false;",
"SET_MACHINE_COMPAT(VAR_0, PC_COMPAT_2_4);",... | [
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
14,512 | static int vc1_decode_frame(AVCodecContext *avctx, void *data,
int *data_size, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size, n_slices = 0, i;
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
AVFrame *pict = data;
uint8_t ... | true | FFmpeg | b5f4836f8cb374f1a5ae45db48b61a1dfba0daad | static int vc1_decode_frame(AVCodecContext *avctx, void *data,
int *data_size, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size, n_slices = 0, i;
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
AVFrame *pict = data;
uint8_t ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->VAR_15, VAR_6 = 0, VAR_7;
VC1Context *v = VAR_0->priv_data;
MpegEncContext *s = &v->s;
AVFrame *pict = VAR_1;
uint8_t *buf2 = N... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->VAR_15, VAR_6 = 0, VAR_7;",
"VC1Context *v = VAR_0->priv_data;",
"MpegEncContext *s = &v->s;",
"AVFrame *pict = VAR_1;",
"uint8_t *buf2 = NULL;",
"const... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
2,
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18,
19
],
[
21
],
[
23
],
[
24
],... |
14,513 | static int local_mknod(FsContext *fs_ctx, V9fsPath *dir_path,
const char *name, FsCred *credp)
{
char *path;
int err = -1;
int serrno = 0;
V9fsString fullname;
char *buffer;
v9fs_string_init(&fullname);
v9fs_string_sprintf(&fullname, "%s/%s", dir_path->data,... | true | qemu | 4ed7b2c3a78f785a1bcbe575e08c379b166723e3 | static int local_mknod(FsContext *fs_ctx, V9fsPath *dir_path,
const char *name, FsCred *credp)
{
char *path;
int err = -1;
int serrno = 0;
V9fsString fullname;
char *buffer;
v9fs_string_init(&fullname);
v9fs_string_sprintf(&fullname, "%s/%s", dir_path->data,... | {
"code": [
" char *buffer;",
" g_free(buffer);",
" g_free(buffer);",
" g_free(buffer);",
" g_free(buffer);",
" char *buffer;",
" g_free(buffer);",
" g_free(buffer);",
" g_free(buffer);",
" g_free(buf... | static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,
const char *VAR_2, FsCred *VAR_3)
{
char *VAR_4;
int VAR_5 = -1;
int VAR_6 = 0;
V9fsString fullname;
char *VAR_7;
v9fs_string_init(&fullname);
v9fs_string_sprintf(&fullname, "%s/%s", VAR_1->data, VAR_2);
... | [
"static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,\nconst char *VAR_2, FsCred *VAR_3)\n{",
"char *VAR_4;",
"int VAR_5 = -1;",
"int VAR_6 = 0;",
"V9fsString fullname;",
"char *VAR_7;",
"v9fs_string_init(&fullname);",
"v9fs_string_sprintf(&fullname, \"%s/%s\", VAR_1->data, VAR_2);",
"VAR_4 = fullna... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
14,514 | static int flv_set_video_codec(AVFormatContext *s, AVStream *vstream, int flv_codecid) {
FLVContext *flv = s->priv_data;
AVCodecContext *vcodec = vstream->codec;
switch(flv_codecid) {
case FLV_CODECID_H263 : vcodec->codec_id = CODEC_ID_FLV1 ; break;
case FLV_CODECID_SCREEN: vcodec->c... | false | FFmpeg | df63f130c880c078e4b0ab0652fcb86d31ac1cdd | static int flv_set_video_codec(AVFormatContext *s, AVStream *vstream, int flv_codecid) {
FLVContext *flv = s->priv_data;
AVCodecContext *vcodec = vstream->codec;
switch(flv_codecid) {
case FLV_CODECID_H263 : vcodec->codec_id = CODEC_ID_FLV1 ; break;
case FLV_CODECID_SCREEN: vcodec->c... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVStream *VAR_1, int VAR_2) {
FLVContext *flv = VAR_0->priv_data;
AVCodecContext *vcodec = VAR_1->codec;
switch(VAR_2) {
case FLV_CODECID_H263 : vcodec->codec_id = CODEC_ID_FLV1 ; break;
case FLV_CODECID_SCREEN: vcodec->codec_id = CODEC_ID_FL... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVStream *VAR_1, int VAR_2) {",
"FLVContext *flv = VAR_0->priv_data;",
"AVCodecContext *vcodec = VAR_1->codec;",
"switch(VAR_2) {",
"case FLV_CODECID_H263 : vcodec->codec_id = CODEC_ID_FLV1 ; break;",
"case FLV_CODECID_SCREEN: vcodec->codec_id = CODEC_ID_FLASH... | [
0,
0,
0,
0,
0,
0,
0,
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
... |
14,515 | void wdt_ib700_init(void)
{
watchdog_add_model(&model);
timer = qemu_new_timer(vm_clock, ib700_timer_expired, NULL);
}
| true | qemu | 09aaa1602f9381c0e0fb539390b1793e51bdfc7b | void wdt_ib700_init(void)
{
watchdog_add_model(&model);
timer = qemu_new_timer(vm_clock, ib700_timer_expired, NULL);
}
| {
"code": [
"void wdt_ib700_init(void)",
" timer = qemu_new_timer(vm_clock, ib700_timer_expired, NULL);"
],
"line_no": [
1,
7
]
} | void FUNC_0(void)
{
watchdog_add_model(&model);
timer = qemu_new_timer(vm_clock, ib700_timer_expired, NULL);
}
| [
"void FUNC_0(void)\n{",
"watchdog_add_model(&model);",
"timer = qemu_new_timer(vm_clock, ib700_timer_expired, NULL);",
"}"
] | [
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
14,516 | static int sub2video_prepare(InputStream *ist, InputFilter *ifilter)
{
AVFormatContext *avf = input_files[ist->file_index]->ctx;
int i, w, h;
/* Compute the size of the canvas for the subtitles stream.
If the subtitles codecpar has set a size, use it. Otherwise use the
maximum dimensio... | false | FFmpeg | 31d657130b02b151a2fe6739f782d9d504b2cfda | static int sub2video_prepare(InputStream *ist, InputFilter *ifilter)
{
AVFormatContext *avf = input_files[ist->file_index]->ctx;
int i, w, h;
w = ifilter->width;
h = ifilter->height;
if (!(w && h)) {
for (i = 0; i < avf->nb_streams; i++) {
if (avf->streams[i]-... | {
"code": [],
"line_no": []
} | static int FUNC_0(InputStream *VAR_0, InputFilter *VAR_1)
{
AVFormatContext *avf = input_files[VAR_0->file_index]->ctx;
int VAR_2, VAR_3, VAR_4;
VAR_3 = VAR_1->width;
VAR_4 = VAR_1->height;
if (!(VAR_3 && VAR_4)) {
for (VAR_2 = 0; VAR_2 < avf->nb_streams; VAR_2++) {
... | [
"static int FUNC_0(InputStream *VAR_0, InputFilter *VAR_1)\n{",
"AVFormatContext *avf = input_files[VAR_0->file_index]->ctx;",
"int VAR_2, VAR_3, VAR_4;",
"VAR_3 = VAR_1->width;",
"VAR_4 = VAR_1->height;",
"if (!(VAR_3 && VAR_4)) {",
"for (VAR_2 = 0; VAR_2 < avf->nb_streams; VAR_2++) {",
"if (avf->str... | [
0,
0,
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
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49... |
14,517 | static int parse_inputs(const char **buf, AVFilterInOut **curr_inputs,
AVFilterInOut **open_outputs, AVClass *log_ctx)
{
int pad = 0;
while (**buf == '[') {
char *name = parse_link_name(buf, log_ctx);
AVFilterInOut *match;
if (!name)
return... | false | FFmpeg | 42e7f6d781e0533505ffab53640739c7912a6753 | static int parse_inputs(const char **buf, AVFilterInOut **curr_inputs,
AVFilterInOut **open_outputs, AVClass *log_ctx)
{
int pad = 0;
while (**buf == '[') {
char *name = parse_link_name(buf, log_ctx);
AVFilterInOut *match;
if (!name)
return... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char **VAR_0, AVFilterInOut **VAR_1,
AVFilterInOut **VAR_2, AVClass *VAR_3)
{
int VAR_4 = 0;
while (**VAR_0 == '[') {
char *VAR_5 = parse_link_name(VAR_0, VAR_3);
AVFilterInOut *match;
if (!VAR_5)
return -1;
... | [
"static int FUNC_0(const char **VAR_0, AVFilterInOut **VAR_1,\nAVFilterInOut **VAR_2, AVClass *VAR_3)\n{",
"int VAR_4 = 0;",
"while (**VAR_0 == '[') {",
"char *VAR_5 = parse_link_name(VAR_0, VAR_3);",
"AVFilterInOut *match;",
"if (!VAR_5)\nreturn -1;",
"match = extract_inout(VAR_5, VAR_2);",
"if (matc... | [
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
],
[
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
53
],
[
55
],
[
57
],
[
61... |
14,518 | static int dnxhd_mb_var_thread(AVCodecContext *avctx, void *arg, int jobnr, int threadnr)
{
DNXHDEncContext *ctx = avctx->priv_data;
int mb_y = jobnr, mb_x;
ctx = ctx->thread[threadnr];
if (ctx->cid_table->bit_depth == 8) {
uint8_t *pix = ctx->thread[0]->src[0] + ((mb_y<<4) * ctx->m.linesi... | true | FFmpeg | d341d5fd2cd7e301a20dcb50f3e1445571765023 | static int dnxhd_mb_var_thread(AVCodecContext *avctx, void *arg, int jobnr, int threadnr)
{
DNXHDEncContext *ctx = avctx->priv_data;
int mb_y = jobnr, mb_x;
ctx = ctx->thread[threadnr];
if (ctx->cid_table->bit_depth == 8) {
uint8_t *pix = ctx->thread[0]->src[0] + ((mb_y<<4) * ctx->m.linesi... | {
"code": [
" int varc = (ctx->m.dsp.pix_norm1(pix, ctx->m.linesize) - (((unsigned)(sum*sum))>>8)+128)>>8;"
],
"line_no": [
21
]
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int VAR_2, int VAR_3)
{
DNXHDEncContext *ctx = VAR_0->priv_data;
int VAR_4 = VAR_2, VAR_5;
ctx = ctx->thread[VAR_3];
if (ctx->cid_table->bit_depth == 8) {
uint8_t *pix = ctx->thread[0]->src[0] + ((VAR_4<<4) * ctx->m.VAR_6);
for... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int VAR_2, int VAR_3)\n{",
"DNXHDEncContext *ctx = VAR_0->priv_data;",
"int VAR_4 = VAR_2, VAR_5;",
"ctx = ctx->thread[VAR_3];",
"if (ctx->cid_table->bit_depth == 8) {",
"uint8_t *pix = ctx->thread[0]->src[0] + ((VAR_4<<4) * ctx->m.VAR_6);",
"for (V... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
... |
14,519 | static void virtio_blk_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
dc->exit = virtio_blk_device_exit;
dc->props = virtio_blk_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
vdc->init... | true | qemu | 40dfc16f5fe0afb66f9436718781264dfadb6c61 | static void virtio_blk_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
dc->exit = virtio_blk_device_exit;
dc->props = virtio_blk_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
vdc->init... | {
"code": [
" dc->exit = virtio_blk_device_exit;"
],
"line_no": [
9
]
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(VAR_0);
dc->exit = virtio_blk_device_exit;
dc->props = virtio_blk_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
vdc->init = virtio_blk_... | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(VAR_0);",
"dc->exit = virtio_blk_device_exit;",
"dc->props = virtio_blk_properties;",
"set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);",
"vdc->init = virtio... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
14,520 | static int cirrus_vga_load(QEMUFile *f, void *opaque, int version_id)
{
CirrusVGAState *s = opaque;
int ret;
if (version_id > 2)
return -EINVAL;
if (s->pci_dev && version_id >= 2) {
ret = pci_device_load(s->pci_dev, f);
if (ret < 0)
return ret;
}
... | true | qemu | 9586fefefe383a9aa25ad99bde9a6b240309ca33 | static int cirrus_vga_load(QEMUFile *f, void *opaque, int version_id)
{
CirrusVGAState *s = opaque;
int ret;
if (version_id > 2)
return -EINVAL;
if (s->pci_dev && version_id >= 2) {
ret = pci_device_load(s->pci_dev, f);
if (ret < 0)
return ret;
}
... | {
"code": [
" s->graphic_mode = -1;",
" s->graphic_mode = -1;",
" s->graphic_mode = -1;"
],
"line_no": [
101,
101,
101
]
} | static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, int VAR_2)
{
CirrusVGAState *s = VAR_1;
int VAR_3;
if (VAR_2 > 2)
return -EINVAL;
if (s->pci_dev && VAR_2 >= 2) {
VAR_3 = pci_device_load(s->pci_dev, VAR_0);
if (VAR_3 < 0)
return VAR_3;
}
qemu_g... | [
"static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, int VAR_2)\n{",
"CirrusVGAState *s = VAR_1;",
"int VAR_3;",
"if (VAR_2 > 2)\nreturn -EINVAL;",
"if (s->pci_dev && VAR_2 >= 2) {",
"VAR_3 = pci_device_load(s->pci_dev, VAR_0);",
"if (VAR_3 < 0)\nreturn VAR_3;",
"}",
"qemu_get_be32s(VAR_0, &s->latch);",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49... |
14,522 | static int ide_dev_initfn(IDEDevice *dev, IDEDriveKind kind)
{
IDEBus *bus = DO_UPCAST(IDEBus, qbus, dev->qdev.parent_bus);
IDEState *s = bus->ifs + dev->unit;
Error *err = NULL;
if (dev->conf.discard_granularity == -1) {
dev->conf.discard_granularity = 512;
} else if (dev->conf.discard_gran... | true | qemu | d20051856cd2fa8f10fed2d2a0b2751de5f7b20d | static int ide_dev_initfn(IDEDevice *dev, IDEDriveKind kind)
{
IDEBus *bus = DO_UPCAST(IDEBus, qbus, dev->qdev.parent_bus);
IDEState *s = bus->ifs + dev->unit;
Error *err = NULL;
if (dev->conf.discard_granularity == -1) {
dev->conf.discard_granularity = 512;
} else if (dev->conf.discard_gran... | {
"code": [],
"line_no": []
} | static int FUNC_0(IDEDevice *VAR_0, IDEDriveKind VAR_1)
{
IDEBus *bus = DO_UPCAST(IDEBus, qbus, VAR_0->qdev.parent_bus);
IDEState *s = bus->ifs + VAR_0->unit;
Error *err = NULL;
if (VAR_0->conf.discard_granularity == -1) {
VAR_0->conf.discard_granularity = 512;
} else if (VAR_0->conf.discard... | [
"static int FUNC_0(IDEDevice *VAR_0, IDEDriveKind VAR_1)\n{",
"IDEBus *bus = DO_UPCAST(IDEBus, qbus, VAR_0->qdev.parent_bus);",
"IDEState *s = bus->ifs + VAR_0->unit;",
"Error *err = NULL;",
"if (VAR_0->conf.discard_granularity == -1) {",
"VAR_0->conf.discard_granularity = 512;",
"} else if (VAR_0->conf... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17,
18,
19,
20
],
[
21
],
[
22
],
[
... |
14,523 | static int writer_open(WriterContext **wctx, const Writer *writer, const char *args,
const struct section *sections, int nb_sections)
{
int i, ret = 0;
if (!(*wctx = av_malloc(sizeof(WriterContext)))) {
ret = AVERROR(ENOMEM);
goto fail;
}
if (!((*wctx)-... | true | FFmpeg | e292d75113fdcb28dcd76321771ec139393af35e | static int writer_open(WriterContext **wctx, const Writer *writer, const char *args,
const struct section *sections, int nb_sections)
{
int i, ret = 0;
if (!(*wctx = av_malloc(sizeof(WriterContext)))) {
ret = AVERROR(ENOMEM);
goto fail;
}
if (!((*wctx)-... | {
"code": [
" if (!(*wctx = av_malloc(sizeof(WriterContext)))) {"
],
"line_no": [
11
]
} | static int FUNC_0(WriterContext **VAR_0, const Writer *VAR_1, const char *VAR_2,
const struct section *VAR_3, int VAR_4)
{
int VAR_5, VAR_6 = 0;
if (!(*VAR_0 = av_malloc(sizeof(WriterContext)))) {
VAR_6 = AVERROR(ENOMEM);
goto fail;
}
if (!((*VAR_0)->pr... | [
"static int FUNC_0(WriterContext **VAR_0, const Writer *VAR_1, const char *VAR_2,\nconst struct section *VAR_3, int VAR_4)\n{",
"int VAR_5, VAR_6 = 0;",
"if (!(*VAR_0 = av_malloc(sizeof(WriterContext)))) {",
"VAR_6 = AVERROR(ENOMEM);",
"goto fail;",
"}",
"if (!((*VAR_0)->priv = av_mallocz(VAR_1->priv_si... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
... |
14,524 | int cpu_ppc_handle_mmu_fault (CPUState *env, uint32_t address, int rw,
int is_user, int is_softmmu)
{
mmu_ctx_t ctx;
int exception = 0, error_code = 0;
int access_type;
int ret = 0;
if (rw == 2) {
/* code access */
rw = 0;
access_... | true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | int cpu_ppc_handle_mmu_fault (CPUState *env, uint32_t address, int rw,
int is_user, int is_softmmu)
{
mmu_ctx_t ctx;
int exception = 0, error_code = 0;
int access_type;
int ret = 0;
if (rw == 2) {
rw = 0;
access_type = ACCESS_COD... | {
"code": [
"#if 0",
" } else {",
" } else {",
" } else {",
" } else {",
" } else {",
" } else {",
" } else {",
" } else {",
" } else {",
" } else {",
"#endif",
"#endif"
],
"line_no": [
265,
25,
25,
25,
25,
2... | int FUNC_0 (CPUState *VAR_0, uint32_t VAR_1, int VAR_2,
int VAR_3, int VAR_4)
{
mmu_ctx_t ctx;
int VAR_5 = 0, VAR_6 = 0;
int VAR_7;
int VAR_8 = 0;
if (VAR_2 == 2) {
VAR_2 = 0;
VAR_7 = ACCESS_CODE;
} else {
... | [
"int FUNC_0 (CPUState *VAR_0, uint32_t VAR_1, int VAR_2,\nint VAR_3, int VAR_4)\n{",
"mmu_ctx_t ctx;",
"int VAR_5 = 0, VAR_6 = 0;",
"int VAR_7;",
"int VAR_8 = 0;",
"if (VAR_2 == 2) {",
"VAR_2 = 0;",
"VAR_7 = ACCESS_CODE;",
"} else {",
"VAR_7 = ACCESS_INT;",
"}",
"VAR_8 = get_physical_address(V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43,
45,
47
],
[
49
],
[
51,
53,
55
],
[
57,
59
... |
14,525 | static PCIINTxRoute gpex_route_intx_pin_to_irq(void *opaque, int pin)
{
PCIINTxRoute route;
GPEXHost *s = opaque;
route.mode = PCI_INTX_ENABLED;
route.irq = s->irq_num[pin];
return route;
}
| false | qemu | 168df2dea701bbf3118bdfea7794369dfa694d3d | static PCIINTxRoute gpex_route_intx_pin_to_irq(void *opaque, int pin)
{
PCIINTxRoute route;
GPEXHost *s = opaque;
route.mode = PCI_INTX_ENABLED;
route.irq = s->irq_num[pin];
return route;
}
| {
"code": [],
"line_no": []
} | static PCIINTxRoute FUNC_0(void *opaque, int pin)
{
PCIINTxRoute route;
GPEXHost *s = opaque;
route.mode = PCI_INTX_ENABLED;
route.irq = s->irq_num[pin];
return route;
}
| [
"static PCIINTxRoute FUNC_0(void *opaque, int pin)\n{",
"PCIINTxRoute route;",
"GPEXHost *s = opaque;",
"route.mode = PCI_INTX_ENABLED;",
"route.irq = s->irq_num[pin];",
"return route;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
]
] |
14,526 | static void cuda_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)
{
CUDAState *s = opaque;
addr = (addr >> 9) & 0xf;
CUDA_DPRINTF("write: reg=0x%x val=%02x\n", (int)addr, val);
switch(addr) {
case 0:
s->b = val;
cuda_update(s);
break;
case 1:
... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void cuda_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)
{
CUDAState *s = opaque;
addr = (addr >> 9) & 0xf;
CUDA_DPRINTF("write: reg=0x%x val=%02x\n", (int)addr, val);
switch(addr) {
case 0:
s->b = val;
cuda_update(s);
break;
case 1:
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint32_t VAR_2)
{
CUDAState *s = VAR_0;
VAR_1 = (VAR_1 >> 9) & 0xf;
CUDA_DPRINTF("write: reg=0x%x VAR_2=%02x\n", (int)VAR_1, VAR_2);
switch(VAR_1) {
case 0:
s->b = VAR_2;
cuda_update(s);
break;
case 1... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint32_t VAR_2)\n{",
"CUDAState *s = VAR_0;",
"VAR_1 = (VAR_1 >> 9) & 0xf;",
"CUDA_DPRINTF(\"write: reg=0x%x VAR_2=%02x\\n\", (int)VAR_1, VAR_2);",
"switch(VAR_1) {",
"case 0:\ns->b = VAR_2;",
"cuda_update(s);",
"break;",
"case 1:\ns->a = 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
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31,
33
],
[
35
],
[
37,
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
... |
14,527 | int pci_add_capability(PCIDevice *pdev, uint8_t cap_id,
uint8_t offset, uint8_t size,
Error **errp)
{
uint8_t *config;
int i, overlapping_cap;
if (!offset) {
offset = pci_find_space(pdev, size);
/* out of PCI config space is programming... | false | qemu | fd56e0612b6454a282fa6a953fdb09281a98c589 | int pci_add_capability(PCIDevice *pdev, uint8_t cap_id,
uint8_t offset, uint8_t size,
Error **errp)
{
uint8_t *config;
int i, overlapping_cap;
if (!offset) {
offset = pci_find_space(pdev, size);
assert(offset);
} else {
... | {
"code": [],
"line_no": []
} | int FUNC_0(PCIDevice *VAR_0, uint8_t VAR_1,
uint8_t VAR_2, uint8_t VAR_3,
Error **VAR_4)
{
uint8_t *config;
int VAR_5, VAR_6;
if (!VAR_2) {
VAR_2 = pci_find_space(VAR_0, VAR_3);
assert(VAR_2);
} else {
... | [
"int FUNC_0(PCIDevice *VAR_0, uint8_t VAR_1,\nuint8_t VAR_2, uint8_t VAR_3,\nError **VAR_4)\n{",
"uint8_t *config;",
"int VAR_5, VAR_6;",
"if (!VAR_2) {",
"VAR_2 = pci_find_space(VAR_0, VAR_3);",
"assert(VAR_2);",
"} else {",
"for (VAR_5 = VAR_2; VAR_5 < VAR_2 + VAR_3; VAR_5++) {",
"VAR_6 = pci_find... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
33
],
[
35
],
[
37
],
[
39,
41,
43,
45,
47,
49
],
[
51
],
[
53
],
[
55
],
[
57
],
[
61
],
[... |
14,528 | void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict)
{
MigrationParameters *params;
params = qmp_query_migrate_parameters(NULL);
if (params) {
assert(params->has_compress_level);
monitor_printf(mon, "%s: %" PRId64 "\n",
MigrationParameter_str(MIGRATION_PA... | false | qemu | 741d4086c856320807a2575389d7c0505578270b | void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict)
{
MigrationParameters *params;
params = qmp_query_migrate_parameters(NULL);
if (params) {
assert(params->has_compress_level);
monitor_printf(mon, "%s: %" PRId64 "\n",
MigrationParameter_str(MIGRATION_PA... | {
"code": [],
"line_no": []
} | void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)
{
MigrationParameters *params;
params = qmp_query_migrate_parameters(NULL);
if (params) {
assert(params->has_compress_level);
monitor_printf(VAR_0, "%s: %" PRId64 "\n",
MigrationParameter_str(MIGRATION_PARAMETER_COMPRESS_... | [
"void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)\n{",
"MigrationParameters *params;",
"params = qmp_query_migrate_parameters(NULL);",
"if (params) {",
"assert(params->has_compress_level);",
"monitor_printf(VAR_0, \"%s: %\" PRId64 \"\\n\",\nMigrationParameter_str(MIGRATION_PARAMETER_COMPRESS_LEVEL),\nparam... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17,
19,
21
],
[
23
],
[
25,
27,
29
],
[
31
],
[
33,
35,
37
],
[
39
],
[
41,
43,
45
],
[
47
],
[
49,
51,
53
],
[
55... |
14,529 | static void pxb_dev_realize_common(PCIDevice *dev, bool pcie, Error **errp)
{
PXBDev *pxb = convert_to_pxb(dev);
DeviceState *ds, *bds = NULL;
PCIBus *bus;
const char *dev_name = NULL;
Error *local_err = NULL;
if (pxb->numa_node != NUMA_NODE_UNASSIGNED &&
pxb->numa_node >= nb_n... | false | qemu | fd56e0612b6454a282fa6a953fdb09281a98c589 | static void pxb_dev_realize_common(PCIDevice *dev, bool pcie, Error **errp)
{
PXBDev *pxb = convert_to_pxb(dev);
DeviceState *ds, *bds = NULL;
PCIBus *bus;
const char *dev_name = NULL;
Error *local_err = NULL;
if (pxb->numa_node != NUMA_NODE_UNASSIGNED &&
pxb->numa_node >= nb_n... | {
"code": [],
"line_no": []
} | static void FUNC_0(PCIDevice *VAR_0, bool VAR_1, Error **VAR_2)
{
PXBDev *pxb = convert_to_pxb(VAR_0);
DeviceState *ds, *bds = NULL;
PCIBus *bus;
const char *VAR_3 = NULL;
Error *local_err = NULL;
if (pxb->numa_node != NUMA_NODE_UNASSIGNED &&
pxb->numa_node >= nb_numa_nodes) {
... | [
"static void FUNC_0(PCIDevice *VAR_0, bool VAR_1, Error **VAR_2)\n{",
"PXBDev *pxb = convert_to_pxb(VAR_0);",
"DeviceState *ds, *bds = NULL;",
"PCIBus *bus;",
"const char *VAR_3 = NULL;",
"Error *local_err = NULL;",
"if (pxb->numa_node != NUMA_NODE_UNASSIGNED &&\npxb->numa_node >= nb_numa_nodes) {",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
14,530 | int qemu_read_config_file(const char *filename)
{
FILE *f = fopen(filename, "r");
int ret;
if (f == NULL) {
return -errno;
}
ret = qemu_config_parse(f, vm_config_groups, filename);
fclose(f);
if (ret == 0) {
return 0;
} else {
return -EINVAL;
... | false | qemu | e5766d6ec7524345f4c0fa284c065b68c5e93049 | int qemu_read_config_file(const char *filename)
{
FILE *f = fopen(filename, "r");
int ret;
if (f == NULL) {
return -errno;
}
ret = qemu_config_parse(f, vm_config_groups, filename);
fclose(f);
if (ret == 0) {
return 0;
} else {
return -EINVAL;
... | {
"code": [],
"line_no": []
} | int FUNC_0(const char *VAR_0)
{
FILE *f = fopen(VAR_0, "r");
int VAR_1;
if (f == NULL) {
return -errno;
}
VAR_1 = qemu_config_parse(f, vm_config_groups, VAR_0);
fclose(f);
if (VAR_1 == 0) {
return 0;
} else {
return -EINVAL;
}
}
| [
"int FUNC_0(const char *VAR_0)\n{",
"FILE *f = fopen(VAR_0, \"r\");",
"int VAR_1;",
"if (f == NULL) {",
"return -errno;",
"}",
"VAR_1 = qemu_config_parse(f, vm_config_groups, VAR_0);",
"fclose(f);",
"if (VAR_1 == 0) {",
"return 0;",
"} else {",
"return -EINVAL;",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
14,533 | SocketAddress *socket_parse(const char *str, Error **errp)
{
SocketAddress *addr;
addr = g_new0(SocketAddress, 1);
if (strstart(str, "unix:", NULL)) {
if (str[5] == '\0') {
error_setg(errp, "invalid Unix socket address");
goto fail;
} else {
add... | false | qemu | dfd100f242370886bb6732f70f1f7cbd8eb9fedc | SocketAddress *socket_parse(const char *str, Error **errp)
{
SocketAddress *addr;
addr = g_new0(SocketAddress, 1);
if (strstart(str, "unix:", NULL)) {
if (str[5] == '\0') {
error_setg(errp, "invalid Unix socket address");
goto fail;
} else {
add... | {
"code": [],
"line_no": []
} | SocketAddress *FUNC_0(const char *str, Error **errp)
{
SocketAddress *addr;
addr = g_new0(SocketAddress, 1);
if (strstart(str, "unix:", NULL)) {
if (str[5] == '\0') {
error_setg(errp, "invalid Unix socket address");
goto fail;
} else {
addr->typ... | [
"SocketAddress *FUNC_0(const char *str, Error **errp)\n{",
"SocketAddress *addr;",
"addr = g_new0(SocketAddress, 1);",
"if (strstart(str, \"unix:\", NULL)) {",
"if (str[5] == '\\0') {",
"error_setg(errp, \"invalid Unix socket address\");",
"goto fail;",
"} else {",
"addr->type = SOCKET_ADDRESS_KIND_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43... |
14,534 | static always_inline int translate_one (DisasContext *ctx, uint32_t insn)
{
uint32_t palcode;
int32_t disp21, disp16, disp12;
uint16_t fn11, fn16;
uint8_t opc, ra, rb, rc, sbz, fpfn, fn7, fn2, islit;
uint8_t lit;
int ret;
/* Decode all instruction fields */
opc = insn >> 26;
... | false | qemu | b5d51029042aa7da6a376d39adedb00da9227efe | static always_inline int translate_one (DisasContext *ctx, uint32_t insn)
{
uint32_t palcode;
int32_t disp21, disp16, disp12;
uint16_t fn11, fn16;
uint8_t opc, ra, rb, rc, sbz, fpfn, fn7, fn2, islit;
uint8_t lit;
int ret;
opc = insn >> 26;
ra = (insn >> 21) & 0x1F;
... | {
"code": [],
"line_no": []
} | static always_inline int FUNC_0 (DisasContext *ctx, uint32_t insn)
{
uint32_t palcode;
int32_t disp21, disp16, disp12;
uint16_t fn11, fn16;
uint8_t opc, ra, rb, rc, sbz, fpfn, fn7, fn2, islit;
uint8_t lit;
int VAR_0;
opc = insn >> 26;
ra = (insn >> 21) & 0x1F;
rb = ... | [
"static always_inline int FUNC_0 (DisasContext *ctx, uint32_t insn)\n{",
"uint32_t palcode;",
"int32_t disp21, disp16, disp12;",
"uint16_t fn11, fn16;",
"uint8_t opc, ra, rb, rc, sbz, fpfn, fn7, fn2, islit;",
"uint8_t lit;",
"int VAR_0;",
"opc = insn >> 26;",
"ra = (insn >> 21) & 0x1F;",
"rb = (in... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
14,536 | void helper_restore_mode (void)
{
env->ps = (env->ps & ~0xC) | env->saved_mode;
}
| false | qemu | 2374e73edafff0586cbfb67c333c5a7588f81fd5 | void helper_restore_mode (void)
{
env->ps = (env->ps & ~0xC) | env->saved_mode;
}
| {
"code": [],
"line_no": []
} | void FUNC_0 (void)
{
env->ps = (env->ps & ~0xC) | env->saved_mode;
}
| [
"void FUNC_0 (void)\n{",
"env->ps = (env->ps & ~0xC) | env->saved_mode;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
14,537 | void pc_init_pci64_hole(PcPciInfo *pci_info, uint64_t pci_hole64_start,
uint64_t pci_hole64_size)
{
if ((sizeof(hwaddr) == 4) || (!pci_hole64_size)) {
return;
}
/*
* BIOS does not set MTRR entries for the 64 bit window, so no need to
* align address to power... | false | qemu | 83d08f2673504a299194dcac1657a13754b5932a | void pc_init_pci64_hole(PcPciInfo *pci_info, uint64_t pci_hole64_start,
uint64_t pci_hole64_size)
{
if ((sizeof(hwaddr) == 4) || (!pci_hole64_size)) {
return;
}
pci_info->w64.begin = ROUND_UP(pci_hole64_start, 0x1ULL << 30);
pci_info->w64.end = pci_... | {
"code": [],
"line_no": []
} | void FUNC_0(PcPciInfo *VAR_0, uint64_t VAR_1,
uint64_t VAR_2)
{
if ((sizeof(hwaddr) == 4) || (!VAR_2)) {
return;
}
VAR_0->w64.begin = ROUND_UP(VAR_1, 0x1ULL << 30);
VAR_0->w64.end = VAR_0->w64.begin + VAR_2;
assert(VAR_0->w64.begin <= VAR_0->w6... | [
"void FUNC_0(PcPciInfo *VAR_0, uint64_t VAR_1,\nuint64_t VAR_2)\n{",
"if ((sizeof(hwaddr) == 4) || (!VAR_2)) {",
"return;",
"}",
"VAR_0->w64.begin = ROUND_UP(VAR_1, 0x1ULL << 30);",
"VAR_0->w64.end = VAR_0->w64.begin + VAR_2;",
"assert(VAR_0->w64.begin <= VAR_0->w64.end);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
14,538 | static ssize_t mp_user_getxattr(FsContext *ctx, const char *path,
const char *name, void *value, size_t size)
{
char buffer[PATH_MAX];
if (strncmp(name, "user.virtfs.", 12) == 0) {
/*
* Don't allow fetch of user.virtfs namesapce
* in case of mappe... | false | qemu | 4fa4ce7107c6ec432f185307158c5df91ce54308 | static ssize_t mp_user_getxattr(FsContext *ctx, const char *path,
const char *name, void *value, size_t size)
{
char buffer[PATH_MAX];
if (strncmp(name, "user.virtfs.", 12) == 0) {
errno = ENOATTR;
return -1;
}
return lgetxattr(rpat... | {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(FsContext *ctx, const char *path,
const char *name, void *value, size_t size)
{
char VAR_0[PATH_MAX];
if (strncmp(name, "user.virtfs.", 12) == 0) {
errno = ENOATTR;
return -1;
}
return lgetxattr(rpath(ctx, path... | [
"static ssize_t FUNC_0(FsContext *ctx, const char *path,\nconst char *name, void *value, size_t size)\n{",
"char VAR_0[PATH_MAX];",
"if (strncmp(name, \"user.virtfs.\", 12) == 0) {",
"errno = ENOATTR;",
"return -1;",
"}",
"return lgetxattr(rpath(ctx, path, VAR_0), name, value, size);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
14,539 | void arm_load_kernel(CPUState *env, struct arm_boot_info *info)
{
int kernel_size;
int initrd_size;
int n;
int is_linux = 0;
uint64_t elf_entry;
target_phys_addr_t entry;
int big_endian;
/* Load the kernel. */
if (!info->kernel_filename) {
fprintf(stderr, "Kerne... | false | qemu | f8414cb5c8343bdacfee53ac9e255831aed882fe | void arm_load_kernel(CPUState *env, struct arm_boot_info *info)
{
int kernel_size;
int initrd_size;
int n;
int is_linux = 0;
uint64_t elf_entry;
target_phys_addr_t entry;
int big_endian;
if (!info->kernel_filename) {
fprintf(stderr, "Kernel image must be specifi... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUState *VAR_0, struct arm_boot_info *VAR_1)
{
int VAR_2;
int VAR_3;
int VAR_4;
int VAR_5 = 0;
uint64_t elf_entry;
target_phys_addr_t entry;
int VAR_6;
if (!VAR_1->kernel_filename) {
fprintf(stderr, "Kernel image must be specified\VAR_4");
... | [
"void FUNC_0(CPUState *VAR_0, struct arm_boot_info *VAR_1)\n{",
"int VAR_2;",
"int VAR_3;",
"int VAR_4;",
"int VAR_5 = 0;",
"uint64_t elf_entry;",
"target_phys_addr_t entry;",
"int VAR_6;",
"if (!VAR_1->kernel_filename) {",
"fprintf(stderr, \"Kernel image must be specified\\VAR_4\");",
"exit(1);... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47,
49
],
[... |
14,540 | static void vtd_iotlb_page_invalidate_notify(IntelIOMMUState *s,
uint16_t domain_id, hwaddr addr,
uint8_t am)
{
IntelIOMMUNotifierNode *node;
VTDContextEntry ce;
int ret;
QLIST_FOREACH(node, &(s->notifiers_lis... | false | qemu | 37f51384ae05bd50f83308339dbffa3e78404874 | static void vtd_iotlb_page_invalidate_notify(IntelIOMMUState *s,
uint16_t domain_id, hwaddr addr,
uint8_t am)
{
IntelIOMMUNotifierNode *node;
VTDContextEntry ce;
int ret;
QLIST_FOREACH(node, &(s->notifiers_lis... | {
"code": [],
"line_no": []
} | static void FUNC_0(IntelIOMMUState *VAR_0,
uint16_t VAR_1, hwaddr VAR_2,
uint8_t VAR_3)
{
IntelIOMMUNotifierNode *node;
VTDContextEntry ce;
int VAR_4;
QLIST_FOREACH(node, &(VAR_0->notifiers_list), next) {
... | [
"static void FUNC_0(IntelIOMMUState *VAR_0,\nuint16_t VAR_1, hwaddr VAR_2,\nuint8_t VAR_3)\n{",
"IntelIOMMUNotifierNode *node;",
"VTDContextEntry ce;",
"int VAR_4;",
"QLIST_FOREACH(node, &(VAR_0->notifiers_list), next) {",
"VTDAddressSpace *vtd_as = node->vtd_as;",
"VAR_4 = vtd_dev_to_context_entry(VAR_... | [
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
]
] |
14,541 | int spapr_vio_send_crq(VIOsPAPRDevice *dev, uint8_t *crq)
{
int rc;
uint8_t byte;
if (!dev->crq.qsize) {
fprintf(stderr, "spapr_vio_send_creq on uninitialized queue\n");
return -1;
}
/* Maybe do a fast path for KVM just writing to the pages */
rc = spapr_vio_dma_read... | false | qemu | a307d59434ba78b97544b42b8cfd24a1b62e39a6 | int spapr_vio_send_crq(VIOsPAPRDevice *dev, uint8_t *crq)
{
int rc;
uint8_t byte;
if (!dev->crq.qsize) {
fprintf(stderr, "spapr_vio_send_creq on uninitialized queue\n");
return -1;
}
rc = spapr_vio_dma_read(dev, dev->crq.qladdr + dev->crq.qnext, &byte, 1);
if (... | {
"code": [],
"line_no": []
} | int FUNC_0(VIOsPAPRDevice *VAR_0, uint8_t *VAR_1)
{
int VAR_2;
uint8_t byte;
if (!VAR_0->VAR_1.qsize) {
fprintf(stderr, "spapr_vio_send_creq on uninitialized queue\n");
return -1;
}
VAR_2 = spapr_vio_dma_read(VAR_0, VAR_0->VAR_1.qladdr + VAR_0->VAR_1.qnext, &byte, 1... | [
"int FUNC_0(VIOsPAPRDevice *VAR_0, uint8_t *VAR_1)\n{",
"int VAR_2;",
"uint8_t byte;",
"if (!VAR_0->VAR_1.qsize) {",
"fprintf(stderr, \"spapr_vio_send_creq on uninitialized queue\\n\");",
"return -1;",
"}",
"VAR_2 = spapr_vio_dma_read(VAR_0, VAR_0->VAR_1.qladdr + VAR_0->VAR_1.qnext, &byte, 1);",
"if... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
51
],
... |
14,542 | static void qnull_visit_test(void)
{
QObject *obj;
QmpOutputVisitor *qov;
Visitor *v;
/*
* Most tests of interactions between QObject and visitors are in
* test-qmp-*-visitor; but these tests live here because they
* depend on layering violations to check qnull_ refcnt.
*/... | false | qemu | 1830f22a6777cedaccd67a08f675d30f7a85ebfd | static void qnull_visit_test(void)
{
QObject *obj;
QmpOutputVisitor *qov;
Visitor *v;
g_assert(qnull_.refcnt == 1);
obj = qnull();
v = qmp_input_visitor_new(obj, true);
qobject_decref(obj);
visit_type_null(v, NULL, &error_abort);
visit_free(v);
qov ... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
QObject *obj;
QmpOutputVisitor *qov;
Visitor *v;
g_assert(qnull_.refcnt == 1);
obj = qnull();
v = qmp_input_visitor_new(obj, true);
qobject_decref(obj);
visit_type_null(v, NULL, &error_abort);
visit_free(v);
qov = qmp_outp... | [
"static void FUNC_0(void)\n{",
"QObject *obj;",
"QmpOutputVisitor *qov;",
"Visitor *v;",
"g_assert(qnull_.refcnt == 1);",
"obj = qnull();",
"v = qmp_input_visitor_new(obj, true);",
"qobject_decref(obj);",
"visit_type_null(v, NULL, &error_abort);",
"visit_free(v);",
"qov = qmp_output_visitor_new(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
]
] |
14,544 | vcard_emul_find_vreader_from_slot(PK11SlotInfo *slot)
{
VReaderList *reader_list = vreader_get_reader_list();
VReaderListEntry *current_entry = NULL;
if (reader_list == NULL) {
return NULL;
}
for (current_entry = vreader_list_get_first(reader_list); current_entry;
... | false | qemu | 1687a089f103f9b7a1b4a1555068054cb46ee9e9 | vcard_emul_find_vreader_from_slot(PK11SlotInfo *slot)
{
VReaderList *reader_list = vreader_get_reader_list();
VReaderListEntry *current_entry = NULL;
if (reader_list == NULL) {
return NULL;
}
for (current_entry = vreader_list_get_first(reader_list); current_entry;
... | {
"code": [],
"line_no": []
} | FUNC_0(PK11SlotInfo *VAR_0)
{
VReaderList *reader_list = vreader_get_reader_list();
VReaderListEntry *current_entry = NULL;
if (reader_list == NULL) {
return NULL;
}
for (current_entry = vreader_list_get_first(reader_list); current_entry;
current_entry = vre... | [
"FUNC_0(PK11SlotInfo *VAR_0)\n{",
"VReaderList *reader_list = vreader_get_reader_list();",
"VReaderListEntry *current_entry = NULL;",
"if (reader_list == NULL) {",
"return NULL;",
"}",
"for (current_entry = vreader_list_get_first(reader_list); current_entry;",
"current_entry = vreader_list_get_next(cu... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
]
] |
14,545 | void qemu_del_polling_cb(PollingFunc *func, void *opaque)
{
PollingEntry **ppe, *pe;
for(ppe = &first_polling_entry; *ppe != NULL; ppe = &(*ppe)->next) {
pe = *ppe;
if (pe->func == func && pe->opaque == opaque) {
*ppe = pe->next;
g_free(pe);
break;
... | false | qemu | d3b12f5dec4b27ebab58fb5797cb67bacced773b | void qemu_del_polling_cb(PollingFunc *func, void *opaque)
{
PollingEntry **ppe, *pe;
for(ppe = &first_polling_entry; *ppe != NULL; ppe = &(*ppe)->next) {
pe = *ppe;
if (pe->func == func && pe->opaque == opaque) {
*ppe = pe->next;
g_free(pe);
break;
... | {
"code": [],
"line_no": []
} | void FUNC_0(PollingFunc *VAR_0, void *VAR_1)
{
PollingEntry **ppe, *pe;
for(ppe = &first_polling_entry; *ppe != NULL; ppe = &(*ppe)->next) {
pe = *ppe;
if (pe->VAR_0 == VAR_0 && pe->VAR_1 == VAR_1) {
*ppe = pe->next;
g_free(pe);
break;
}
... | [
"void FUNC_0(PollingFunc *VAR_0, void *VAR_1)\n{",
"PollingEntry **ppe, *pe;",
"for(ppe = &first_polling_entry; *ppe != NULL; ppe = &(*ppe)->next) {",
"pe = *ppe;",
"if (pe->VAR_0 == VAR_0 && pe->VAR_1 == VAR_1) {",
"*ppe = pe->next;",
"g_free(pe);",
"break;",
"}",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
14,546 | static void test_vector_dmul_scalar(const double *src0, const double *src1)
{
LOCAL_ALIGNED_32(double, cdst, [LEN]);
LOCAL_ALIGNED_32(double, odst, [LEN]);
int i;
declare_func(void, double *dst, const double *src, double mul, int len);
call_ref(cdst, src0, src1[0], LEN);
call_new(odst... | false | FFmpeg | 38f966b2222db4bfeeaca4642a63049253536c46 | static void test_vector_dmul_scalar(const double *src0, const double *src1)
{
LOCAL_ALIGNED_32(double, cdst, [LEN]);
LOCAL_ALIGNED_32(double, odst, [LEN]);
int i;
declare_func(void, double *dst, const double *src, double mul, int len);
call_ref(cdst, src0, src1[0], LEN);
call_new(odst... | {
"code": [],
"line_no": []
} | static void FUNC_0(const double *VAR_0, const double *VAR_1)
{
LOCAL_ALIGNED_32(double, cdst, [LEN]);
LOCAL_ALIGNED_32(double, odst, [LEN]);
int VAR_2;
declare_func(void, double *dst, const double *src, double mul, int len);
call_ref(cdst, VAR_0, VAR_1[0], LEN);
call_new(odst, VAR_0, ... | [
"static void FUNC_0(const double *VAR_0, const double *VAR_1)\n{",
"LOCAL_ALIGNED_32(double, cdst, [LEN]);",
"LOCAL_ALIGNED_32(double, odst, [LEN]);",
"int VAR_2;",
"declare_func(void, double *dst, const double *src, double mul, int len);",
"call_ref(cdst, VAR_0, VAR_1[0], LEN);",
"call_new(odst, VAR_0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
14,547 | static void show_packet(WriterContext *w, AVFormatContext *fmt_ctx, AVPacket *pkt, int packet_idx)
{
char val_str[128];
AVStream *st = fmt_ctx->streams[pkt->stream_index];
struct print_buf pbuf = {.s = NULL};
print_section_header("packet");
print_str("codec_type", av_x_if_null(av_get_m... | false | FFmpeg | 0491a2a07a44f6e5e6f34081835e402c07025fd2 | static void show_packet(WriterContext *w, AVFormatContext *fmt_ctx, AVPacket *pkt, int packet_idx)
{
char val_str[128];
AVStream *st = fmt_ctx->streams[pkt->stream_index];
struct print_buf pbuf = {.s = NULL};
print_section_header("packet");
print_str("codec_type", av_x_if_null(av_get_m... | {
"code": [],
"line_no": []
} | static void FUNC_0(WriterContext *VAR_0, AVFormatContext *VAR_1, AVPacket *VAR_2, int VAR_3)
{
char VAR_4[128];
AVStream *st = VAR_1->streams[VAR_2->stream_index];
struct print_buf VAR_5 = {.s = NULL};
print_section_header("packet");
print_str("codec_type", av_x_if_null(av_get_media_ty... | [
"static void FUNC_0(WriterContext *VAR_0, AVFormatContext *VAR_1, AVPacket *VAR_2, int VAR_3)\n{",
"char VAR_4[128];",
"AVStream *st = VAR_1->streams[VAR_2->stream_index];",
"struct print_buf VAR_5 = {.s = NULL};",
"print_section_header(\"packet\");",
"print_str(\"codec_type\", av_x_if_null(av_get_m... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
... |
14,548 | static int event_thread(void *arg)
{
AVFormatContext *s = arg;
SDLContext *sdl = s->priv_data;
int flags = SDL_BASE_FLAGS | (sdl->window_fullscreen ? SDL_FULLSCREEN : 0);
AVStream *st = s->streams[0];
AVCodecContext *encctx = st->codec;
/* initialization */
if (SDL_Init(SDL_INIT_VI... | false | FFmpeg | 70433119691042eaa646adab5903c2302a42fc22 | static int event_thread(void *arg)
{
AVFormatContext *s = arg;
SDLContext *sdl = s->priv_data;
int flags = SDL_BASE_FLAGS | (sdl->window_fullscreen ? SDL_FULLSCREEN : 0);
AVStream *st = s->streams[0];
AVCodecContext *encctx = st->codec;
if (SDL_Init(SDL_INIT_VIDEO) != 0) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0)
{
AVFormatContext *s = VAR_0;
SDLContext *sdl = s->priv_data;
int VAR_1 = SDL_BASE_FLAGS | (sdl->window_fullscreen ? SDL_FULLSCREEN : 0);
AVStream *st = s->streams[0];
AVCodecContext *encctx = st->codec;
if (SDL_Init(SDL_INIT_VIDEO) != 0) {
... | [
"static int FUNC_0(void *VAR_0)\n{",
"AVFormatContext *s = VAR_0;",
"SDLContext *sdl = s->priv_data;",
"int VAR_1 = SDL_BASE_FLAGS | (sdl->window_fullscreen ? SDL_FULLSCREEN : 0);",
"AVStream *st = s->streams[0];",
"AVCodecContext *encctx = st->codec;",
"if (SDL_Init(SDL_INIT_VIDEO) != 0) {",
"av_log(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49,
51
... |
14,549 | static int write_elf_loads(DumpState *s)
{
hwaddr offset;
MemoryMapping *memory_mapping;
uint32_t phdr_index = 1;
int ret;
uint32_t max_index;
if (s->have_section) {
max_index = s->sh_info;
} else {
max_index = s->phdr_num;
}
QTAILQ_FOREACH(memory_mapp... | false | qemu | 2cac260768b9d4253737417ea7501cf2950e257f | static int write_elf_loads(DumpState *s)
{
hwaddr offset;
MemoryMapping *memory_mapping;
uint32_t phdr_index = 1;
int ret;
uint32_t max_index;
if (s->have_section) {
max_index = s->sh_info;
} else {
max_index = s->phdr_num;
}
QTAILQ_FOREACH(memory_mapp... | {
"code": [],
"line_no": []
} | static int FUNC_0(DumpState *VAR_0)
{
hwaddr offset;
MemoryMapping *memory_mapping;
uint32_t phdr_index = 1;
int VAR_1;
uint32_t max_index;
if (VAR_0->have_section) {
max_index = VAR_0->sh_info;
} else {
max_index = VAR_0->phdr_num;
}
QTAILQ_FOREACH(me... | [
"static int FUNC_0(DumpState *VAR_0)\n{",
"hwaddr offset;",
"MemoryMapping *memory_mapping;",
"uint32_t phdr_index = 1;",
"int VAR_1;",
"uint32_t max_index;",
"if (VAR_0->have_section) {",
"max_index = VAR_0->sh_info;",
"} else {",
"max_index = VAR_0->phdr_num;",
"}",
"QTAILQ_FOREACH(memory_ma... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
... |
14,550 | static void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args,
int opc)
{
int addr_regl, addr_reg1, addr_meml;
int data_regl, data_regh, data_reg1, data_reg2;
int mem_index, s_bits;
#if defined(CONFIG_SOFTMMU)
void *label1_ptr, *label2_ptr;
int sp_args;
#endif
#... | false | qemu | 355b194369d02df7a97d554eef2a9cffe98d736f | static void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args,
int opc)
{
int addr_regl, addr_reg1, addr_meml;
int data_regl, data_regh, data_reg1, data_reg2;
int mem_index, s_bits;
#if defined(CONFIG_SOFTMMU)
void *label1_ptr, *label2_ptr;
int sp_args;
#endif
#... | {
"code": [],
"line_no": []
} | static void FUNC_0(TCGContext *VAR_0, const TCGArg *VAR_1,
int VAR_2)
{
int VAR_3, VAR_4, VAR_5;
int VAR_6, VAR_7, VAR_8, VAR_9;
int VAR_10, VAR_11;
#if defined(CONFIG_SOFTMMU)
void *label1_ptr, *label2_ptr;
int sp_args;
#endif
#if TARGET_LONG_BITS == 64
# if d... | [
"static void FUNC_0(TCGContext *VAR_0, const TCGArg *VAR_1,\nint VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5;",
"int VAR_6, VAR_7, VAR_8, VAR_9;",
"int VAR_10, VAR_11;",
"#if defined(CONFIG_SOFTMMU)\nvoid *label1_ptr, *label2_ptr;",
"int sp_args;",
"#endif\n#if TARGET_LONG_BITS == 64\n# if defined(CONFIG_SOFTM... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19,
21,
23,
25
],
[
27,
29
],
[
31,
33
],
[
35,
37
],
[
39,
41
],
[
43
],
[
45,
47
],
[
49,
51
],
[... |
14,551 | static int ram_save_setup(QEMUFile *f, void *opaque)
{
RAMBlock *block;
bytes_transferred = 0;
reset_ram_globals();
if (migrate_use_xbzrle()) {
XBZRLE.cache = cache_init(migrate_xbzrle_cache_size() /
TARGET_PAGE_SIZE,
... | false | qemu | c6bf8e0e0cf04b40a8a22426e00ebbd727331d8b | static int ram_save_setup(QEMUFile *f, void *opaque)
{
RAMBlock *block;
bytes_transferred = 0;
reset_ram_globals();
if (migrate_use_xbzrle()) {
XBZRLE.cache = cache_init(migrate_xbzrle_cache_size() /
TARGET_PAGE_SIZE,
... | {
"code": [],
"line_no": []
} | static int FUNC_0(QEMUFile *VAR_0, void *VAR_1)
{
RAMBlock *block;
bytes_transferred = 0;
reset_ram_globals();
if (migrate_use_xbzrle()) {
XBZRLE.cache = cache_init(migrate_xbzrle_cache_size() /
TARGET_PAGE_SIZE,
TAR... | [
"static int FUNC_0(QEMUFile *VAR_0, void *VAR_1)\n{",
"RAMBlock *block;",
"bytes_transferred = 0;",
"reset_ram_globals();",
"if (migrate_use_xbzrle()) {",
"XBZRLE.cache = cache_init(migrate_xbzrle_cache_size() /\nTARGET_PAGE_SIZE,\nTARGET_PAGE_SIZE);",
"if (!XBZRLE.cache) {",
"DPRINTF(\"Error creating... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
15
],
[
17,
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53... |
14,552 | static int pci_pbm_map_irq(PCIDevice *pci_dev, int irq_num)
{
int bus_offset;
if (pci_dev->devfn & 1)
bus_offset = 16;
else
bus_offset = 0;
return (bus_offset + (PCI_SLOT(pci_dev->devfn) << 2) + irq_num) & 0x1f;
}
| false | qemu | 6864fa38972081833f79b39df74b9c08cc94f6cc | static int pci_pbm_map_irq(PCIDevice *pci_dev, int irq_num)
{
int bus_offset;
if (pci_dev->devfn & 1)
bus_offset = 16;
else
bus_offset = 0;
return (bus_offset + (PCI_SLOT(pci_dev->devfn) << 2) + irq_num) & 0x1f;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(PCIDevice *VAR_0, int VAR_1)
{
int VAR_2;
if (VAR_0->devfn & 1)
VAR_2 = 16;
else
VAR_2 = 0;
return (VAR_2 + (PCI_SLOT(VAR_0->devfn) << 2) + VAR_1) & 0x1f;
}
| [
"static int FUNC_0(PCIDevice *VAR_0, int VAR_1)\n{",
"int VAR_2;",
"if (VAR_0->devfn & 1)\nVAR_2 = 16;",
"else\nVAR_2 = 0;",
"return (VAR_2 + (PCI_SLOT(VAR_0->devfn) << 2) + VAR_1) & 0x1f;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11,
13
],
[
15
],
[
17
]
] |
14,553 | static void xics_reset(void *opaque)
{
struct icp_state *icp = (struct icp_state *)opaque;
struct ics_state *ics = icp->ics;
int i;
for (i = 0; i < icp->nr_servers; i++) {
icp->ss[i].xirr = 0;
icp->ss[i].pending_priority = 0;
icp->ss[i].mfrr = 0xff;
/* Make all... | false | qemu | 044f4c8b0ee90290b6cbbc616c4be3c8aeffcaab | static void xics_reset(void *opaque)
{
struct icp_state *icp = (struct icp_state *)opaque;
struct ics_state *ics = icp->ics;
int i;
for (i = 0; i < icp->nr_servers; i++) {
icp->ss[i].xirr = 0;
icp->ss[i].pending_priority = 0;
icp->ss[i].mfrr = 0xff;
q... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
struct icp_state *VAR_1 = (struct icp_state *)VAR_0;
struct ics_state *VAR_2 = VAR_1->VAR_2;
int VAR_3;
for (VAR_3 = 0; VAR_3 < VAR_1->nr_servers; VAR_3++) {
VAR_1->ss[VAR_3].xirr = 0;
VAR_1->ss[VAR_3].pending_priority = 0;
VAR_1->ss[VA... | [
"static void FUNC_0(void *VAR_0)\n{",
"struct icp_state *VAR_1 = (struct icp_state *)VAR_0;",
"struct ics_state *VAR_2 = VAR_1->VAR_2;",
"int VAR_3;",
"for (VAR_3 = 0; VAR_3 < VAR_1->nr_servers; VAR_3++) {",
"VAR_1->ss[VAR_3].xirr = 0;",
"VAR_1->ss[VAR_3].pending_priority = 0;",
"VAR_1->ss[VAR_3].mfrr... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
]
] |
14,554 | static uint64_t assigned_dev_ioport_rw(AssignedDevRegion *dev_region,
target_phys_addr_t addr, int size,
uint64_t *data)
{
uint64_t val = 0;
int fd = dev_region->region->resource_fd;
if (fd >= 0) {
if (data) {
... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t assigned_dev_ioport_rw(AssignedDevRegion *dev_region,
target_phys_addr_t addr, int size,
uint64_t *data)
{
uint64_t val = 0;
int fd = dev_region->region->resource_fd;
if (fd >= 0) {
if (data) {
... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(AssignedDevRegion *dev_region,
target_phys_addr_t addr, int size,
uint64_t *data)
{
uint64_t val = 0;
int VAR_0 = dev_region->region->resource_fd;
if (VAR_0 >= 0) {
if (data) {
... | [
"static uint64_t FUNC_0(AssignedDevRegion *dev_region,\ntarget_phys_addr_t addr, int size,\nuint64_t *data)\n{",
"uint64_t val = 0;",
"int VAR_0 = dev_region->region->resource_fd;",
"if (VAR_0 >= 0) {",
"if (data) {",
"DEBUG(\"pwrite data=%\" PRIx64 \", size=%d, e_phys=\" TARGET_FMT_plx\n\", addr=\"TARGET... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
49
... |
14,555 | int nbd_client_co_pwritev(BlockDriverState *bs, uint64_t offset,
uint64_t bytes, QEMUIOVector *qiov, int flags)
{
NbdClientSession *client = nbd_get_client_session(bs);
struct nbd_request request = {
.type = NBD_CMD_WRITE,
.from = offset,
.len = bytes,
... | false | qemu | b626b51a6721e53817155af720243f59072e424f | int nbd_client_co_pwritev(BlockDriverState *bs, uint64_t offset,
uint64_t bytes, QEMUIOVector *qiov, int flags)
{
NbdClientSession *client = nbd_get_client_session(bs);
struct nbd_request request = {
.type = NBD_CMD_WRITE,
.from = offset,
.len = bytes,
... | {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1,
uint64_t VAR_2, QEMUIOVector *VAR_3, int VAR_4)
{
NbdClientSession *client = nbd_get_client_session(VAR_0);
struct nbd_request VAR_5 = {
.type = NBD_CMD_WRITE,
.from = VAR_1,
.len = VAR_2,
};
s... | [
"int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1,\nuint64_t VAR_2, QEMUIOVector *VAR_3, int VAR_4)\n{",
"NbdClientSession *client = nbd_get_client_session(VAR_0);",
"struct nbd_request VAR_5 = {",
".type = NBD_CMD_WRITE,\n.from = VAR_1,\n.len = VAR_2,\n};",
"struct nbd_reply VAR_6;",
"ssize_t ret;",
... | [
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
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
14,558 | static void gen_ldf_asi(DisasContext *dc, TCGv addr,
int insn, int size, int rd)
{
TCGv_i32 r_asi, r_size, r_rd;
r_asi = gen_get_asi(dc, insn);
r_size = tcg_const_i32(size);
r_rd = tcg_const_i32(rd);
gen_helper_ldf_asi(cpu_env, addr, r_asi, r_size, r_rd);
tcg_te... | false | qemu | 7ec1e5ea4bd0700fa48da86bffa2fcc6146c410a | static void gen_ldf_asi(DisasContext *dc, TCGv addr,
int insn, int size, int rd)
{
TCGv_i32 r_asi, r_size, r_rd;
r_asi = gen_get_asi(dc, insn);
r_size = tcg_const_i32(size);
r_rd = tcg_const_i32(rd);
gen_helper_ldf_asi(cpu_env, addr, r_asi, r_size, r_rd);
tcg_te... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0, TCGv VAR_1,
int VAR_2, int VAR_3, int VAR_4)
{
TCGv_i32 r_asi, r_size, r_rd;
r_asi = gen_get_asi(VAR_0, VAR_2);
r_size = tcg_const_i32(VAR_3);
r_rd = tcg_const_i32(VAR_4);
gen_helper_ldf_asi(cpu_env, VAR_1, r_asi, r_size, r_rd)... | [
"static void FUNC_0(DisasContext *VAR_0, TCGv VAR_1,\nint VAR_2, int VAR_3, int VAR_4)\n{",
"TCGv_i32 r_asi, r_size, r_rd;",
"r_asi = gen_get_asi(VAR_0, VAR_2);",
"r_size = tcg_const_i32(VAR_3);",
"r_rd = tcg_const_i32(VAR_4);",
"gen_helper_ldf_asi(cpu_env, VAR_1, r_asi, r_size, r_rd);",
"tcg_temp_free_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.