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 |
|---|---|---|---|---|---|---|---|---|---|---|
15,438 | void bdrv_flush_io_queue(BlockDriverState *bs)
{
BlockDriver *drv = bs->drv;
if (drv && drv->bdrv_flush_io_queue) {
drv->bdrv_flush_io_queue(bs);
} else if (bs->file) {
bdrv_flush_io_queue(bs->file);
}
}
| false | qemu | 61007b316cd71ee7333ff7a0a749a8949527575f | void bdrv_flush_io_queue(BlockDriverState *bs)
{
BlockDriver *drv = bs->drv;
if (drv && drv->bdrv_flush_io_queue) {
drv->bdrv_flush_io_queue(bs);
} else if (bs->file) {
bdrv_flush_io_queue(bs->file);
}
}
| {
"code": [],
"line_no": []
} | void FUNC_0(BlockDriverState *VAR_0)
{
BlockDriver *drv = VAR_0->drv;
if (drv && drv->FUNC_0) {
drv->FUNC_0(VAR_0);
} else if (VAR_0->file) {
FUNC_0(VAR_0->file);
}
}
| [
"void FUNC_0(BlockDriverState *VAR_0)\n{",
"BlockDriver *drv = VAR_0->drv;",
"if (drv && drv->FUNC_0) {",
"drv->FUNC_0(VAR_0);",
"} else if (VAR_0->file) {",
"FUNC_0(VAR_0->file);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
15,439 | static void rtas_event_log_queue(int log_type, void *data, bool exception)
{
sPAPRMachineState *spapr = SPAPR_MACHINE(qdev_get_machine());
sPAPREventLogEntry *entry = g_new(sPAPREventLogEntry, 1);
g_assert(data);
entry->log_type = log_type;
entry->exception = exception;
entry->data = da... | false | qemu | bff3063837a76b37a4bbbfe614324ca38e859f2b | static void rtas_event_log_queue(int log_type, void *data, bool exception)
{
sPAPRMachineState *spapr = SPAPR_MACHINE(qdev_get_machine());
sPAPREventLogEntry *entry = g_new(sPAPREventLogEntry, 1);
g_assert(data);
entry->log_type = log_type;
entry->exception = exception;
entry->data = da... | {
"code": [],
"line_no": []
} | static void FUNC_0(int VAR_0, void *VAR_1, bool VAR_2)
{
sPAPRMachineState *spapr = SPAPR_MACHINE(qdev_get_machine());
sPAPREventLogEntry *entry = g_new(sPAPREventLogEntry, 1);
g_assert(VAR_1);
entry->VAR_0 = VAR_0;
entry->VAR_2 = VAR_2;
entry->VAR_1 = VAR_1;
QTAILQ_INSERT_TAIL(&sp... | [
"static void FUNC_0(int VAR_0, void *VAR_1, bool VAR_2)\n{",
"sPAPRMachineState *spapr = SPAPR_MACHINE(qdev_get_machine());",
"sPAPREventLogEntry *entry = g_new(sPAPREventLogEntry, 1);",
"g_assert(VAR_1);",
"entry->VAR_0 = VAR_0;",
"entry->VAR_2 = VAR_2;",
"entry->VAR_1 = VAR_1;",
"QTAILQ_INSERT_TAIL(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
15,440 | static int pci_set_default_subsystem_id(PCIDevice *pci_dev)
{
uint16_t *id;
id = (void*)(&pci_dev->config[PCI_SUBSYSTEM_VENDOR_ID]);
id[0] = cpu_to_le16(pci_default_sub_vendor_id);
id[1] = cpu_to_le16(pci_default_sub_device_id);
return 0;
}
| false | qemu | 5e434f4e60f8e5a9dadf324b3ee31c3ce0e80165 | static int pci_set_default_subsystem_id(PCIDevice *pci_dev)
{
uint16_t *id;
id = (void*)(&pci_dev->config[PCI_SUBSYSTEM_VENDOR_ID]);
id[0] = cpu_to_le16(pci_default_sub_vendor_id);
id[1] = cpu_to_le16(pci_default_sub_device_id);
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(PCIDevice *VAR_0)
{
uint16_t *id;
id = (void*)(&VAR_0->config[PCI_SUBSYSTEM_VENDOR_ID]);
id[0] = cpu_to_le16(pci_default_sub_vendor_id);
id[1] = cpu_to_le16(pci_default_sub_device_id);
return 0;
}
| [
"static int FUNC_0(PCIDevice *VAR_0)\n{",
"uint16_t *id;",
"id = (void*)(&VAR_0->config[PCI_SUBSYSTEM_VENDOR_ID]);",
"id[0] = cpu_to_le16(pci_default_sub_vendor_id);",
"id[1] = cpu_to_le16(pci_default_sub_device_id);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
15,441 | static inline uint8_t *get_seg_base(uint32_t e1, uint32_t e2)
{
return (uint8_t *)((e1 >> 16) | ((e2 & 0xff) << 16) | (e2 & 0xff000000));
}
| false | qemu | 7e84c2498f0ff3999937d18d1e9abaa030400000 | static inline uint8_t *get_seg_base(uint32_t e1, uint32_t e2)
{
return (uint8_t *)((e1 >> 16) | ((e2 & 0xff) << 16) | (e2 & 0xff000000));
}
| {
"code": [],
"line_no": []
} | static inline uint8_t *FUNC_0(uint32_t e1, uint32_t e2)
{
return (uint8_t *)((e1 >> 16) | ((e2 & 0xff) << 16) | (e2 & 0xff000000));
}
| [
"static inline uint8_t *FUNC_0(uint32_t e1, uint32_t e2)\n{",
"return (uint8_t *)((e1 >> 16) | ((e2 & 0xff) << 16) | (e2 & 0xff000000));",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
15,442 | int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx,
H264ParamSets *ps, int ignore_truncation)
{
AVBufferRef *sps_buf;
int profile_idc, level_idc, constraint_set_flags = 0;
unsigned int sps_id;
int i, log2_max_frame_num_minus4;
SP... | false | FFmpeg | 4cc1ce4a91788a71670ea43fa0026b5a969e9e9e | int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx,
H264ParamSets *ps, int ignore_truncation)
{
AVBufferRef *sps_buf;
int profile_idc, level_idc, constraint_set_flags = 0;
unsigned int sps_id;
int i, log2_max_frame_num_minus4;
SP... | {
"code": [],
"line_no": []
} | int FUNC_0(GetBitContext *VAR_0, AVCodecContext *VAR_1,
H264ParamSets *VAR_2, int VAR_3)
{
AVBufferRef *sps_buf;
int VAR_4, VAR_5, VAR_6 = 0;
unsigned int VAR_7;
int VAR_8, VAR_9;
SPS *sps;
sps_buf = av_buffer_allocz(sizeof(*sps));
if (!sps_buf... | [
"int FUNC_0(GetBitContext *VAR_0, AVCodecContext *VAR_1,\nH264ParamSets *VAR_2, int VAR_3)\n{",
"AVBufferRef *sps_buf;",
"int VAR_4, VAR_5, VAR_6 = 0;",
"unsigned int VAR_7;",
"int VAR_8, VAR_9;",
"SPS *sps;",
"sps_buf = av_buffer_allocz(sizeof(*sps));",
"if (!sps_buf)\nreturn AVERROR(ENOMEM);",
"sp... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
... |
15,443 | static void invalidate_and_set_dirty(MemoryRegion *mr, hwaddr addr,
hwaddr length)
{
if (cpu_physical_memory_range_includes_clean(addr, length)) {
uint8_t dirty_log_mask = memory_region_get_dirty_log_mask(mr);
if (dirty_log_mask & (1 << DIRTY_MEMORY_CODE)) {... | false | qemu | e87f7778b64d4a6a78e16c288c7fdc6c15317d5f | static void invalidate_and_set_dirty(MemoryRegion *mr, hwaddr addr,
hwaddr length)
{
if (cpu_physical_memory_range_includes_clean(addr, length)) {
uint8_t dirty_log_mask = memory_region_get_dirty_log_mask(mr);
if (dirty_log_mask & (1 << DIRTY_MEMORY_CODE)) {... | {
"code": [],
"line_no": []
} | static void FUNC_0(MemoryRegion *VAR_0, hwaddr VAR_1,
hwaddr VAR_2)
{
if (cpu_physical_memory_range_includes_clean(VAR_1, VAR_2)) {
uint8_t dirty_log_mask = memory_region_get_dirty_log_mask(VAR_0);
if (dirty_log_mask & (1 << DIRTY_MEMORY_CODE)) {
... | [
"static void FUNC_0(MemoryRegion *VAR_0, hwaddr VAR_1,\nhwaddr VAR_2)\n{",
"if (cpu_physical_memory_range_includes_clean(VAR_1, VAR_2)) {",
"uint8_t dirty_log_mask = memory_region_get_dirty_log_mask(VAR_0);",
"if (dirty_log_mask & (1 << DIRTY_MEMORY_CODE)) {",
"tb_invalidate_phys_range(VAR_1, VAR_1 + VAR_2)... | [
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
]
] |
15,444 | void ich9_lpc_pm_init(PCIDevice *lpc_pci)
{
ICH9LPCState *lpc = ICH9_LPC_DEVICE(lpc_pci);
ich9_pm_init(lpc_pci, &lpc->pm, qemu_allocate_irq(ich9_set_sci, lpc, 0));
ich9_lpc_reset(&lpc->d.qdev);
}
| false | qemu | fba72476c6b7be60ac74c5bcdc06c61242d1fe4f | void ich9_lpc_pm_init(PCIDevice *lpc_pci)
{
ICH9LPCState *lpc = ICH9_LPC_DEVICE(lpc_pci);
ich9_pm_init(lpc_pci, &lpc->pm, qemu_allocate_irq(ich9_set_sci, lpc, 0));
ich9_lpc_reset(&lpc->d.qdev);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(PCIDevice *VAR_0)
{
ICH9LPCState *lpc = ICH9_LPC_DEVICE(VAR_0);
ich9_pm_init(VAR_0, &lpc->pm, qemu_allocate_irq(ich9_set_sci, lpc, 0));
ich9_lpc_reset(&lpc->d.qdev);
}
| [
"void FUNC_0(PCIDevice *VAR_0)\n{",
"ICH9LPCState *lpc = ICH9_LPC_DEVICE(VAR_0);",
"ich9_pm_init(VAR_0, &lpc->pm, qemu_allocate_irq(ich9_set_sci, lpc, 0));",
"ich9_lpc_reset(&lpc->d.qdev);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
]
] |
15,446 | static void term_show_prompt(void)
{
term_show_prompt2();
term_cmd_buf_index = 0;
term_cmd_buf_size = 0;
}
| false | qemu | 7e2515e87c41e2e658aaed466e11cbdf1ea8bcb1 | static void term_show_prompt(void)
{
term_show_prompt2();
term_cmd_buf_index = 0;
term_cmd_buf_size = 0;
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
term_show_prompt2();
term_cmd_buf_index = 0;
term_cmd_buf_size = 0;
}
| [
"static void FUNC_0(void)\n{",
"term_show_prompt2();",
"term_cmd_buf_index = 0;",
"term_cmd_buf_size = 0;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
15,447 | static int vfio_add_capabilities(VFIOPCIDevice *vdev)
{
PCIDevice *pdev = &vdev->pdev;
int ret;
if (!(pdev->config[PCI_STATUS] & PCI_STATUS_CAP_LIST) ||
!pdev->config[PCI_CAPABILITY_LIST]) {
return 0; /* Nothing to add */
}
ret = vfio_add_std_cap(vdev, pdev->config[PCI_CA... | false | qemu | e37dac06dc4e85a2f46c24261c0dfdf2a30b50e3 | static int vfio_add_capabilities(VFIOPCIDevice *vdev)
{
PCIDevice *pdev = &vdev->pdev;
int ret;
if (!(pdev->config[PCI_STATUS] & PCI_STATUS_CAP_LIST) ||
!pdev->config[PCI_CAPABILITY_LIST]) {
return 0;
}
ret = vfio_add_std_cap(vdev, pdev->config[PCI_CAPABILITY_LIST]);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(VFIOPCIDevice *VAR_0)
{
PCIDevice *pdev = &VAR_0->pdev;
int VAR_1;
if (!(pdev->config[PCI_STATUS] & PCI_STATUS_CAP_LIST) ||
!pdev->config[PCI_CAPABILITY_LIST]) {
return 0;
}
VAR_1 = vfio_add_std_cap(VAR_0, pdev->config[PCI_CAPABILITY_LIST]);
if (VA... | [
"static int FUNC_0(VFIOPCIDevice *VAR_0)\n{",
"PCIDevice *pdev = &VAR_0->pdev;",
"int VAR_1;",
"if (!(pdev->config[PCI_STATUS] & PCI_STATUS_CAP_LIST) ||\n!pdev->config[PCI_CAPABILITY_LIST]) {",
"return 0;",
"}",
"VAR_1 = vfio_add_std_cap(VAR_0, pdev->config[PCI_CAPABILITY_LIST]);",
"if (VAR_1) {",
"... | [
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
],
[
33,
35,
37
],
[
39
],
[
41
],
[
45
],
[
47
]
] |
15,448 | static void test_qemu_strtosz_units(void)
{
const char *none = "1";
const char *b = "1B";
const char *k = "1K";
const char *m = "1M";
const char *g = "1G";
const char *t = "1T";
const char *p = "1P";
const char *e = "1E";
char *endptr = NULL;
int64_t res;
/* def... | false | qemu | f17fd4fdf0df3d2f3444399d04c38d22b9a3e1b7 | static void test_qemu_strtosz_units(void)
{
const char *none = "1";
const char *b = "1B";
const char *k = "1K";
const char *m = "1M";
const char *g = "1G";
const char *t = "1T";
const char *p = "1P";
const char *e = "1E";
char *endptr = NULL;
int64_t res;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
const char *VAR_0 = "1";
const char *VAR_1 = "1B";
const char *VAR_2 = "1K";
const char *VAR_3 = "1M";
const char *VAR_4 = "1G";
const char *VAR_5 = "1T";
const char *VAR_6 = "1P";
const char *VAR_7 = "1E";
char *VAR_8 = NULL;
int64_t res;
... | [
"static void FUNC_0(void)\n{",
"const char *VAR_0 = \"1\";",
"const char *VAR_1 = \"1B\";",
"const char *VAR_2 = \"1K\";",
"const char *VAR_3 = \"1M\";",
"const char *VAR_4 = \"1G\";",
"const char *VAR_5 = \"1T\";",
"const char *VAR_6 = \"1P\";",
"const char *VAR_7 = \"1E\";",
"char *VAR_8 = NULL;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
... |
15,450 | static inline void gen_op_arith_divd(DisasContext *ctx, TCGv ret, TCGv arg1,
TCGv arg2, int sign, int compute_ov)
{
int l1 = gen_new_label();
int l2 = gen_new_label();
tcg_gen_brcondi_i64(TCG_COND_EQ, arg2, 0, l1);
if (sign) {
int l3 = gen_new_label(... | false | qemu | 42a268c241183877192c376d03bd9b6d527407c7 | static inline void gen_op_arith_divd(DisasContext *ctx, TCGv ret, TCGv arg1,
TCGv arg2, int sign, int compute_ov)
{
int l1 = gen_new_label();
int l2 = gen_new_label();
tcg_gen_brcondi_i64(TCG_COND_EQ, arg2, 0, l1);
if (sign) {
int l3 = gen_new_label(... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(DisasContext *VAR_0, TCGv VAR_1, TCGv VAR_2,
TCGv VAR_3, int VAR_4, int VAR_5)
{
int VAR_6 = gen_new_label();
int VAR_7 = gen_new_label();
tcg_gen_brcondi_i64(TCG_COND_EQ, VAR_3, 0, VAR_6);
if (VAR_4) {
int VAR_8 = gen_new_l... | [
"static inline void FUNC_0(DisasContext *VAR_0, TCGv VAR_1, TCGv VAR_2,\nTCGv VAR_3, int VAR_4, int VAR_5)\n{",
"int VAR_6 = gen_new_label();",
"int VAR_7 = gen_new_label();",
"tcg_gen_brcondi_i64(TCG_COND_EQ, VAR_3, 0, VAR_6);",
"if (VAR_4) {",
"int VAR_8 = gen_new_label();",
"tcg_gen_brcondi_i64(TCG_C... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
15,451 | static int os_host_main_loop_wait(int timeout)
{
int ret, i;
PollingEntry *pe;
WaitObjects *w = &wait_objects;
static struct timeval tv0;
/* XXX: need to suppress polling by better using win32 events */
ret = 0;
for (pe = first_polling_entry; pe != NULL; pe = pe->next) {
r... | false | qemu | ea26ce765cb661a13e4055f38744036a19465e87 | static int os_host_main_loop_wait(int timeout)
{
int ret, i;
PollingEntry *pe;
WaitObjects *w = &wait_objects;
static struct timeval tv0;
ret = 0;
for (pe = first_polling_entry; pe != NULL; pe = pe->next) {
ret |= pe->func(pe->opaque);
}
if (ret != 0) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0(int VAR_0)
{
int VAR_1, VAR_2;
PollingEntry *pe;
WaitObjects *w = &wait_objects;
static struct timeval VAR_3;
VAR_1 = 0;
for (pe = first_polling_entry; pe != NULL; pe = pe->next) {
VAR_1 |= pe->func(pe->opaque);
}
if (VAR_1 != 0) {
ret... | [
"static int FUNC_0(int VAR_0)\n{",
"int VAR_1, VAR_2;",
"PollingEntry *pe;",
"WaitObjects *w = &wait_objects;",
"static struct timeval VAR_3;",
"VAR_1 = 0;",
"for (pe = first_polling_entry; pe != NULL; pe = pe->next) {",
"VAR_1 |= pe->func(pe->opaque);",
"}",
"if (VAR_1 != 0) {",
"return 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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
... |
15,452 | static int asf_write_header(AVFormatContext *s)
{
ASFContext *asf = s->priv_data;
asf->packet_size = PACKET_SIZE;
asf->nb_packets = 0;
asf->last_indexed_pts = 0;
asf->index_ptr = (ASFIndex*)av_malloc( sizeof(ASFIndex) * ASF_INDEX_BLOCK );
asf->nb_index_memory_alloc = ASF_INDEX_BLOCK;
... | false | FFmpeg | 90901860c21468d6e9ae437c2bacb099c7bd3acf | static int asf_write_header(AVFormatContext *s)
{
ASFContext *asf = s->priv_data;
asf->packet_size = PACKET_SIZE;
asf->nb_packets = 0;
asf->last_indexed_pts = 0;
asf->index_ptr = (ASFIndex*)av_malloc( sizeof(ASFIndex) * ASF_INDEX_BLOCK );
asf->nb_index_memory_alloc = ASF_INDEX_BLOCK;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
ASFContext *asf = VAR_0->priv_data;
asf->packet_size = PACKET_SIZE;
asf->nb_packets = 0;
asf->last_indexed_pts = 0;
asf->index_ptr = (ASFIndex*)av_malloc( sizeof(ASFIndex) * ASF_INDEX_BLOCK );
asf->nb_index_memory_alloc = ASF_INDEX_BLOCK;
... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"ASFContext *asf = VAR_0->priv_data;",
"asf->packet_size = PACKET_SIZE;",
"asf->nb_packets = 0;",
"asf->last_indexed_pts = 0;",
"asf->index_ptr = (ASFIndex*)av_malloc( sizeof(ASFIndex) * ASF_INDEX_BLOCK );",
"asf->nb_index_memory_alloc = ASF_INDEX_BLOCK;",... | [
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
],
[
33
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53,
55
],
[
59
],
[
61
]
] |
15,453 | static int do_syscall(CPUState *env,
struct kqemu_cpu_state *kenv)
{
int selector;
selector = (env->star >> 32) & 0xffff;
#ifdef TARGET_X86_64
if (env->hflags & HF_LMA_MASK) {
int code64;
env->regs[R_ECX] = kenv->next_eip;
env->regs[11] = env->eflag... | false | qemu | 4a1418e07bdcfaa3177739e04707ecaec75d89e1 | static int do_syscall(CPUState *env,
struct kqemu_cpu_state *kenv)
{
int selector;
selector = (env->star >> 32) & 0xffff;
#ifdef TARGET_X86_64
if (env->hflags & HF_LMA_MASK) {
int code64;
env->regs[R_ECX] = kenv->next_eip;
env->regs[11] = env->eflag... | {
"code": [],
"line_no": []
} | static int FUNC_0(CPUState *VAR_0,
struct kqemu_cpu_state *VAR_1)
{
int VAR_2;
VAR_2 = (VAR_0->star >> 32) & 0xffff;
#ifdef TARGET_X86_64
if (VAR_0->hflags & HF_LMA_MASK) {
int code64;
VAR_0->regs[R_ECX] = VAR_1->next_eip;
VAR_0->regs[11] = VAR_0->e... | [
"static int FUNC_0(CPUState *VAR_0,\nstruct kqemu_cpu_state *VAR_1)\n{",
"int VAR_2;",
"VAR_2 = (VAR_0->star >> 32) & 0xffff;",
"#ifdef TARGET_X86_64\nif (VAR_0->hflags & HF_LMA_MASK) {",
"int code64;",
"VAR_0->regs[R_ECX] = VAR_1->next_eip;",
"VAR_0->regs[11] = VAR_0->eflags;",
"code64 = VAR_0->hflag... | [
0,
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
],
[
27
],
[
31
],
[
33,
35,
37,
39,
41
],
[
43,
45,
47,
49,
51
],
[
53
],
[
55,
57
],
[
59,
61... |
15,454 | gdb_handlesig(CPUState *cpu, int sig)
{
GDBState *s;
char buf[256];
int n;
s = gdbserver_state;
if (gdbserver_fd < 0 || s->fd < 0) {
return sig;
}
/* disable single step if it was enabled */
cpu_single_step(cpu, 0);
tb_flush(cpu);
if (sig != 0) {
... | false | qemu | 5819e3e072f41cbf81ad80d822a5c468a91f54e0 | gdb_handlesig(CPUState *cpu, int sig)
{
GDBState *s;
char buf[256];
int n;
s = gdbserver_state;
if (gdbserver_fd < 0 || s->fd < 0) {
return sig;
}
cpu_single_step(cpu, 0);
tb_flush(cpu);
if (sig != 0) {
snprintf(buf, sizeof(buf), "S%02x", targe... | {
"code": [],
"line_no": []
} | FUNC_0(CPUState *VAR_0, int VAR_1)
{
GDBState *s;
char VAR_2[256];
int VAR_3;
s = gdbserver_state;
if (gdbserver_fd < 0 || s->fd < 0) {
return VAR_1;
}
cpu_single_step(VAR_0, 0);
tb_flush(VAR_0);
if (VAR_1 != 0) {
snprintf(VAR_2, sizeof(VAR_2),... | [
"FUNC_0(CPUState *VAR_0, int VAR_1)\n{",
"GDBState *s;",
"char VAR_2[256];",
"int VAR_3;",
"s = gdbserver_state;",
"if (gdbserver_fd < 0 || s->fd < 0) {",
"return VAR_1;",
"}",
"cpu_single_step(VAR_0, 0);",
"tb_flush(VAR_0);",
"if (VAR_1 != 0) {",
"snprintf(VAR_2, sizeof(VAR_2), \"S%02x\", tar... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
... |
15,455 | void xen_map_cache_init(void)
{
unsigned long size;
struct rlimit rlimit_as;
mapcache = g_malloc0(sizeof (MapCache));
QTAILQ_INIT(&mapcache->locked_entries);
mapcache->last_address_index = -1;
if (geteuid() == 0) {
rlimit_as.rlim_cur = RLIM_INFINITY;
rlimit_as.rlim... | false | qemu | cd1ba7de230b3a85fb4dba53bb681b7ea626b4eb | void xen_map_cache_init(void)
{
unsigned long size;
struct rlimit rlimit_as;
mapcache = g_malloc0(sizeof (MapCache));
QTAILQ_INIT(&mapcache->locked_entries);
mapcache->last_address_index = -1;
if (geteuid() == 0) {
rlimit_as.rlim_cur = RLIM_INFINITY;
rlimit_as.rlim... | {
"code": [],
"line_no": []
} | void FUNC_0(void)
{
unsigned long VAR_0;
struct rlimit VAR_1;
mapcache = g_malloc0(sizeof (MapCache));
QTAILQ_INIT(&mapcache->locked_entries);
mapcache->last_address_index = -1;
if (geteuid() == 0) {
VAR_1.rlim_cur = RLIM_INFINITY;
VAR_1.rlim_max = RLIM_INFINITY;
... | [
"void FUNC_0(void)\n{",
"unsigned long VAR_0;",
"struct rlimit VAR_1;",
"mapcache = g_malloc0(sizeof (MapCache));",
"QTAILQ_INIT(&mapcache->locked_entries);",
"mapcache->last_address_index = -1;",
"if (geteuid() == 0) {",
"VAR_1.rlim_cur = RLIM_INFINITY;",
"VAR_1.rlim_max = RLIM_INFINITY;",
"mapca... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47,
49
],
[
51... |
15,456 | static void nvdimm_build_nfit(AcpiNVDIMMState *state, GArray *table_offsets,
GArray *table_data, BIOSLinker *linker)
{
NvdimmFitBuffer *fit_buf = &state->fit_buf;
unsigned int header;
/* NVDIMM device is not plugged? */
if (!fit_buf->fit->len) {
return;
... | false | qemu | 264813cb9d0eea199d48c6ea917060683685d1e0 | static void nvdimm_build_nfit(AcpiNVDIMMState *state, GArray *table_offsets,
GArray *table_data, BIOSLinker *linker)
{
NvdimmFitBuffer *fit_buf = &state->fit_buf;
unsigned int header;
if (!fit_buf->fit->len) {
return;
}
acpi_add_table(table_o... | {
"code": [],
"line_no": []
} | static void FUNC_0(AcpiNVDIMMState *VAR_0, GArray *VAR_1,
GArray *VAR_2, BIOSLinker *VAR_3)
{
NvdimmFitBuffer *fit_buf = &VAR_0->fit_buf;
unsigned int VAR_4;
if (!fit_buf->fit->len) {
return;
}
acpi_add_table(VAR_1, VAR_2);
VAR_4... | [
"static void FUNC_0(AcpiNVDIMMState *VAR_0, GArray *VAR_1,\nGArray *VAR_2, BIOSLinker *VAR_3)\n{",
"NvdimmFitBuffer *fit_buf = &VAR_0->fit_buf;",
"unsigned int VAR_4;",
"if (!fit_buf->fit->len) {",
"return;",
"}",
"acpi_add_table(VAR_1, VAR_2);",
"VAR_4 = VAR_2->len;",
"acpi_data_push(VAR_2, sizeof(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
17
],
[
19
],
[
21
],
[
25
],
[
31
],
[
33
],
[
37
],
[
41,
43,
45
],
[
47
]
] |
15,459 | static inline uint32_t efsctui(uint32_t val)
{
CPU_FloatU u;
u.l = val;
/* NaN are not treated the same way IEEE 754 does */
if (unlikely(float32_is_nan(u.f)))
return 0;
return float32_to_uint32(u.f, &env->vec_status);
}
| false | qemu | 185698715dfb18c82ad2a5dbc169908602d43e81 | static inline uint32_t efsctui(uint32_t val)
{
CPU_FloatU u;
u.l = val;
if (unlikely(float32_is_nan(u.f)))
return 0;
return float32_to_uint32(u.f, &env->vec_status);
}
| {
"code": [],
"line_no": []
} | static inline uint32_t FUNC_0(uint32_t val)
{
CPU_FloatU u;
u.l = val;
if (unlikely(float32_is_nan(u.f)))
return 0;
return float32_to_uint32(u.f, &env->vec_status);
}
| [
"static inline uint32_t FUNC_0(uint32_t val)\n{",
"CPU_FloatU u;",
"u.l = val;",
"if (unlikely(float32_is_nan(u.f)))\nreturn 0;",
"return float32_to_uint32(u.f, &env->vec_status);",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13,
15
],
[
19
],
[
21
]
] |
15,460 | BlockAIOCB *bdrv_aio_ioctl(BlockDriverState *bs,
unsigned long int req, void *buf,
BlockCompletionFunc *cb, void *opaque)
{
BlockDriver *drv = bs->drv;
if (drv && drv->bdrv_aio_ioctl)
return drv->bdrv_aio_ioctl(bs, req, buf, cb, opaque);
return NULL;
}
| false | qemu | 61007b316cd71ee7333ff7a0a749a8949527575f | BlockAIOCB *bdrv_aio_ioctl(BlockDriverState *bs,
unsigned long int req, void *buf,
BlockCompletionFunc *cb, void *opaque)
{
BlockDriver *drv = bs->drv;
if (drv && drv->bdrv_aio_ioctl)
return drv->bdrv_aio_ioctl(bs, req, buf, cb, opaque);
return NULL;
}
| {
"code": [],
"line_no": []
} | BlockAIOCB *FUNC_0(BlockDriverState *bs,
unsigned long int req, void *buf,
BlockCompletionFunc *cb, void *opaque)
{
BlockDriver *drv = bs->drv;
if (drv && drv->FUNC_0)
return drv->FUNC_0(bs, req, buf, cb, opaque);
return NULL;
}
| [
"BlockAIOCB *FUNC_0(BlockDriverState *bs,\nunsigned long int req, void *buf,\nBlockCompletionFunc *cb, void *opaque)\n{",
"BlockDriver *drv = bs->drv;",
"if (drv && drv->FUNC_0)\nreturn drv->FUNC_0(bs, req, buf, cb, opaque);",
"return NULL;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13,
15
],
[
17
],
[
19
]
] |
15,461 | static int lsi_scsi_init(PCIDevice *dev)
{
LSIState *s = DO_UPCAST(LSIState, dev, dev);
uint8_t *pci_conf;
pci_conf = s->dev.config;
/* PCI Vendor ID (word) */
pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_LSI_LOGIC);
/* PCI device ID (word) */
pci_config_set_device_id(pci_con... | false | qemu | af5374aa044af8ebc5a7dd387ea0dec48b5d956b | static int lsi_scsi_init(PCIDevice *dev)
{
LSIState *s = DO_UPCAST(LSIState, dev, dev);
uint8_t *pci_conf;
pci_conf = s->dev.config;
pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_LSI_LOGIC);
pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_LSI_53C895A);
pci_config... | {
"code": [],
"line_no": []
} | static int FUNC_0(PCIDevice *VAR_0)
{
LSIState *s = DO_UPCAST(LSIState, VAR_0, VAR_0);
uint8_t *pci_conf;
pci_conf = s->VAR_0.config;
pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_LSI_LOGIC);
pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_LSI_53C895A);
pci_confi... | [
"static int FUNC_0(PCIDevice *VAR_0)\n{",
"LSIState *s = DO_UPCAST(LSIState, VAR_0, VAR_0);",
"uint8_t *pci_conf;",
"pci_conf = s->VAR_0.config;",
"pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_LSI_LOGIC);",
"pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_LSI_53C895A);",
"pci_config_set_class(pci_c... | [
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
],
[
17
],
[
21
],
[
25
],
[
29
],
[
31
],
[
35
],
[
41
],
[
45,
47,
49
],
[
51,
53,
55
],
[
59,
61
],
[
63
],
[
65,
67
],
[
69... |
15,462 | void cpu_physical_memory_write_rom(hwaddr addr,
const uint8_t *buf, int len)
{
hwaddr l;
uint8_t *ptr;
hwaddr addr1;
MemoryRegion *mr;
while (len > 0) {
l = len;
mr = address_space_translate(&address_space_memory,
... | false | qemu | 582b55a96ac4f66cea64d82e47651bd5ef38a8ec | void cpu_physical_memory_write_rom(hwaddr addr,
const uint8_t *buf, int len)
{
hwaddr l;
uint8_t *ptr;
hwaddr addr1;
MemoryRegion *mr;
while (len > 0) {
l = len;
mr = address_space_translate(&address_space_memory,
... | {
"code": [],
"line_no": []
} | void FUNC_0(hwaddr VAR_0,
const uint8_t *VAR_1, int VAR_2)
{
hwaddr l;
uint8_t *ptr;
hwaddr addr1;
MemoryRegion *mr;
while (VAR_2 > 0) {
l = VAR_2;
mr = address_space_translate(&address_space_memory,
... | [
"void FUNC_0(hwaddr VAR_0,\nconst uint8_t *VAR_1, int VAR_2)\n{",
"hwaddr l;",
"uint8_t *ptr;",
"hwaddr addr1;",
"MemoryRegion *mr;",
"while (VAR_2 > 0) {",
"l = VAR_2;",
"mr = address_space_translate(&address_space_memory,\nVAR_0, &addr1, &l, true);",
"if (!(memory_region_is_ram(mr) ||\nmemory_regi... | [
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
],
[
27,
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
15,464 | static int decode_cabac_mb_type( H264Context *h ) {
MpegEncContext * const s = &h->s;
if( h->slice_type == I_TYPE ) {
return decode_cabac_intra_mb_type(h, 3, 1);
} else if( h->slice_type == P_TYPE ) {
if( get_cabac( &h->cabac, &h->cabac_state[14] ) == 0 ) {
/* P-type */
... | false | FFmpeg | 851ded8918c977d8160c6617b69604f758cabf50 | static int decode_cabac_mb_type( H264Context *h ) {
MpegEncContext * const s = &h->s;
if( h->slice_type == I_TYPE ) {
return decode_cabac_intra_mb_type(h, 3, 1);
} else if( h->slice_type == P_TYPE ) {
if( get_cabac( &h->cabac, &h->cabac_state[14] ) == 0 ) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0( H264Context *VAR_0 ) {
MpegEncContext * const s = &VAR_0->s;
if( VAR_0->slice_type == I_TYPE ) {
return decode_cabac_intra_mb_type(VAR_0, 3, 1);
} else if( VAR_0->slice_type == P_TYPE ) {
if( get_cabac( &VAR_0->cabac, &VAR_0->cabac_state[14] ) == 0 ) {
... | [
"static int FUNC_0( H264Context *VAR_0 ) {",
"MpegEncContext * const s = &VAR_0->s;",
"if( VAR_0->slice_type == I_TYPE ) {",
"return decode_cabac_intra_mb_type(VAR_0, 3, 1);",
"} else if( VAR_0->slice_type == P_TYPE ) {",
"if( get_cabac( &VAR_0->cabac, &VAR_0->cabac_state[14] ) == 0 ) {",
"if( get_cabac... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49,
51... |
15,465 | static int ehci_state_fetchentry(EHCIState *ehci, int async)
{
int again = 0;
uint32_t entry = ehci_get_fetch_addr(ehci, async);
if (entry < 0x1000) {
DPRINTF("fetchentry: entry invalid (0x%08x)\n", entry);
ehci_set_state(ehci, async, EST_ACTIVE);
goto out;
}
/* ... | false | qemu | 2a5ff735dc1074171a0cbb1dc228d6d6e907f571 | static int ehci_state_fetchentry(EHCIState *ehci, int async)
{
int again = 0;
uint32_t entry = ehci_get_fetch_addr(ehci, async);
if (entry < 0x1000) {
DPRINTF("fetchentry: entry invalid (0x%08x)\n", entry);
ehci_set_state(ehci, async, EST_ACTIVE);
goto out;
}
... | {
"code": [],
"line_no": []
} | static int FUNC_0(EHCIState *VAR_0, int VAR_1)
{
int VAR_2 = 0;
uint32_t entry = ehci_get_fetch_addr(VAR_0, VAR_1);
if (entry < 0x1000) {
DPRINTF("fetchentry: entry invalid (0x%08x)\n", entry);
ehci_set_state(VAR_0, VAR_1, EST_ACTIVE);
goto out;
}
if (VAR_1... | [
"static int FUNC_0(EHCIState *VAR_0, int VAR_1)\n{",
"int VAR_2 = 0;",
"uint32_t entry = ehci_get_fetch_addr(VAR_0, VAR_1);",
"if (entry < 0x1000) {",
"DPRINTF(\"fetchentry: entry invalid (0x%08x)\\n\", entry);",
"ehci_set_state(VAR_0, VAR_1, EST_ACTIVE);",
"goto out;",
"}",
"if (VAR_1 && (NLPTR_TYP... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
47,
49
],
[
51
],
[
53... |
15,466 | static int ssi_slave_init(DeviceState *dev, DeviceInfo *base_info)
{
SSISlaveInfo *info = container_of(base_info, SSISlaveInfo, qdev);
SSISlave *s = SSI_SLAVE_FROM_QDEV(dev);
SSIBus *bus;
bus = FROM_QBUS(SSIBus, qdev_get_parent_bus(dev));
if (LIST_FIRST(&bus->qbus.children) != dev
|... | false | qemu | 72cf2d4f0e181d0d3a3122e04129c58a95da713e | static int ssi_slave_init(DeviceState *dev, DeviceInfo *base_info)
{
SSISlaveInfo *info = container_of(base_info, SSISlaveInfo, qdev);
SSISlave *s = SSI_SLAVE_FROM_QDEV(dev);
SSIBus *bus;
bus = FROM_QBUS(SSIBus, qdev_get_parent_bus(dev));
if (LIST_FIRST(&bus->qbus.children) != dev
|... | {
"code": [],
"line_no": []
} | static int FUNC_0(DeviceState *VAR_0, DeviceInfo *VAR_1)
{
SSISlaveInfo *info = container_of(VAR_1, SSISlaveInfo, qdev);
SSISlave *s = SSI_SLAVE_FROM_QDEV(VAR_0);
SSIBus *bus;
bus = FROM_QBUS(SSIBus, qdev_get_parent_bus(VAR_0));
if (LIST_FIRST(&bus->qbus.children) != VAR_0
|| LIST_N... | [
"static int FUNC_0(DeviceState *VAR_0, DeviceInfo *VAR_1)\n{",
"SSISlaveInfo *info = container_of(VAR_1, SSISlaveInfo, qdev);",
"SSISlave *s = SSI_SLAVE_FROM_QDEV(VAR_0);",
"SSIBus *bus;",
"bus = FROM_QBUS(SSIBus, qdev_get_parent_bus(VAR_0));",
"if (LIST_FIRST(&bus->qbus.children) != VAR_0\n|| LIST_NEXT(V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
]
] |
15,467 | struct pxa2xx_state_s *pxa255_init(unsigned int sdram_size,
DisplayState *ds)
{
struct pxa2xx_state_s *s;
struct pxa2xx_ssp_s *ssp;
int iomemtype, i;
s = (struct pxa2xx_state_s *) qemu_mallocz(sizeof(struct pxa2xx_state_s));
s->env = cpu_init();
cpu_arm_set_model(s->env... | false | qemu | 2a1639291bf9f3c88c62d10459fedaa677536ff5 | struct pxa2xx_state_s *pxa255_init(unsigned int sdram_size,
DisplayState *ds)
{
struct pxa2xx_state_s *s;
struct pxa2xx_ssp_s *ssp;
int iomemtype, i;
s = (struct pxa2xx_state_s *) qemu_mallocz(sizeof(struct pxa2xx_state_s));
s->env = cpu_init();
cpu_arm_set_model(s->env... | {
"code": [],
"line_no": []
} | struct pxa2xx_state_s *FUNC_0(unsigned int VAR_0,
DisplayState *VAR_1)
{
struct pxa2xx_state_s *VAR_2;
struct pxa2xx_ssp_s *VAR_3;
int VAR_4, VAR_5;
VAR_2 = (struct pxa2xx_state_s *) qemu_mallocz(sizeof(struct pxa2xx_state_s));
VAR_2->env = cpu_init();
cpu_arm_set_model... | [
"struct pxa2xx_state_s *FUNC_0(unsigned int VAR_0,\nDisplayState *VAR_1)\n{",
"struct pxa2xx_state_s *VAR_2;",
"struct pxa2xx_ssp_s *VAR_3;",
"int VAR_4, VAR_5;",
"VAR_2 = (struct pxa2xx_state_s *) qemu_mallocz(sizeof(struct pxa2xx_state_s));",
"VAR_2->env = cpu_init();",
"cpu_arm_set_model(VAR_2->env, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27,
29
],
[
31,
33
],
[
37
],
[
41
],
[
45
],
[
49
],
[
53
],
[
57
],
[
59,
61,
63
],
[... |
15,468 | void stq_le_phys(target_phys_addr_t addr, uint64_t val)
{
val = cpu_to_le64(val);
cpu_physical_memory_write(addr, &val, 8);
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | void stq_le_phys(target_phys_addr_t addr, uint64_t val)
{
val = cpu_to_le64(val);
cpu_physical_memory_write(addr, &val, 8);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(target_phys_addr_t VAR_0, uint64_t VAR_1)
{
VAR_1 = cpu_to_le64(VAR_1);
cpu_physical_memory_write(VAR_0, &VAR_1, 8);
}
| [
"void FUNC_0(target_phys_addr_t VAR_0, uint64_t VAR_1)\n{",
"VAR_1 = cpu_to_le64(VAR_1);",
"cpu_physical_memory_write(VAR_0, &VAR_1, 8);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
15,469 | static int arm946_prbs_write(CPUARMState *env, const ARMCPRegInfo *ri,
uint64_t value)
{
if (ri->crm >= 8) {
return EXCP_UDEF;
}
env->cp15.c6_region[ri->crm] = value;
return 0;
}
| false | qemu | e508a92b621c7160122e99d3754e568f2b8e255e | static int arm946_prbs_write(CPUARMState *env, const ARMCPRegInfo *ri,
uint64_t value)
{
if (ri->crm >= 8) {
return EXCP_UDEF;
}
env->cp15.c6_region[ri->crm] = value;
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(CPUARMState *VAR_0, const ARMCPRegInfo *VAR_1,
uint64_t VAR_2)
{
if (VAR_1->crm >= 8) {
return EXCP_UDEF;
}
VAR_0->cp15.c6_region[VAR_1->crm] = VAR_2;
return 0;
}
| [
"static int FUNC_0(CPUARMState *VAR_0, const ARMCPRegInfo *VAR_1,\nuint64_t VAR_2)\n{",
"if (VAR_1->crm >= 8) {",
"return EXCP_UDEF;",
"}",
"VAR_0->cp15.c6_region[VAR_1->crm] = VAR_2;",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
15,470 | static int64_t get_clock(void)
{
#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000) \
|| defined(__DragonFly__)
if (use_rt_clock) {
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return ts.tv_sec * 1000000000LL + ts.tv_nsec;
} else
#endif
... | false | qemu | 21d5d12bb0ad4de7cc92a7a2d018e7ec0f9fd148 | static int64_t get_clock(void)
{
#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000) \
|| defined(__DragonFly__)
if (use_rt_clock) {
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return ts.tv_sec * 1000000000LL + ts.tv_nsec;
} else
#endif
... | {
"code": [],
"line_no": []
} | static int64_t FUNC_0(void)
{
#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000) \
|| defined(__DragonFly__)
if (use_rt_clock) {
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return ts.tv_sec * 1000000000LL + ts.tv_nsec;
} else
#endif
... | [
"static int64_t FUNC_0(void)\n{",
"#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000) \\\n|| defined(__DragonFly__)\nif (use_rt_clock) {",
"struct timespec ts;",
"clock_gettime(CLOCK_MONOTONIC, &ts);",
"return ts.tv_sec * 1000000000LL + ts.tv_nsec;",
"} else",
"#endif\n{",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
15,471 | static void setup_frame(int sig, struct emulated_sigaction * ka,
target_sigset_t *set, CPUState *regs)
{
struct sigframe *frame;
abi_ulong frame_addr;
int i;
frame_addr = get_sigframe(ka, regs, sizeof(*frame));
if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 0... | false | qemu | f8b0aa25599782eef91edc00ebf620bd14db720c | static void setup_frame(int sig, struct emulated_sigaction * ka,
target_sigset_t *set, CPUState *regs)
{
struct sigframe *frame;
abi_ulong frame_addr;
int i;
frame_addr = get_sigframe(ka, regs, sizeof(*frame));
if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 0... | {
"code": [],
"line_no": []
} | static void FUNC_0(int VAR_0, struct emulated_sigaction * VAR_1,
target_sigset_t *VAR_2, CPUState *VAR_3)
{
struct sigframe *VAR_4;
abi_ulong frame_addr;
int VAR_5;
frame_addr = get_sigframe(VAR_1, VAR_3, sizeof(*VAR_4));
if (!lock_user_struct(VERIFY_WRITE, VAR_4, fr... | [
"static void FUNC_0(int VAR_0, struct emulated_sigaction * VAR_1,\ntarget_sigset_t *VAR_2, CPUState *VAR_3)\n{",
"struct sigframe *VAR_4;",
"abi_ulong frame_addr;",
"int VAR_5;",
"frame_addr = get_sigframe(VAR_1, VAR_3, sizeof(*VAR_4));",
"if (!lock_user_struct(VERIFY_WRITE, VAR_4, frame_addr, 0))\ngoto g... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
23
],
[
27,
29
],
[
33
],
[
35,
37
],
[
39
],
[
63
],
[
65
],
[
67
],
[
69
],
[
71
],
[
79
],
[
81
... |
15,473 | static void vmsvga_text_update(void *opaque, console_ch_t *chardata)
{
struct vmsvga_state_s *s = opaque;
if (s->vga.text_update)
s->vga.text_update(&s->vga, chardata);
}
| false | qemu | 0d7937974cd0504f30ad483c3368b21da426ddf9 | static void vmsvga_text_update(void *opaque, console_ch_t *chardata)
{
struct vmsvga_state_s *s = opaque;
if (s->vga.text_update)
s->vga.text_update(&s->vga, chardata);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, console_ch_t *VAR_1)
{
struct vmsvga_state_s *VAR_2 = VAR_0;
if (VAR_2->vga.text_update)
VAR_2->vga.text_update(&VAR_2->vga, VAR_1);
}
| [
"static void FUNC_0(void *VAR_0, console_ch_t *VAR_1)\n{",
"struct vmsvga_state_s *VAR_2 = VAR_0;",
"if (VAR_2->vga.text_update)\nVAR_2->vga.text_update(&VAR_2->vga, VAR_1);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
]
] |
15,474 | static int send_response(GAState *s, QObject *payload)
{
const char *buf;
QString *payload_qstr;
GIOStatus status;
g_assert(payload && s->channel);
payload_qstr = qobject_to_json(payload);
if (!payload_qstr) {
return -EINVAL;
}
qstring_append_chr(payload_qstr, '\n... | false | qemu | 3cf0bed8369267184e5dc5b58882811519d67437 | static int send_response(GAState *s, QObject *payload)
{
const char *buf;
QString *payload_qstr;
GIOStatus status;
g_assert(payload && s->channel);
payload_qstr = qobject_to_json(payload);
if (!payload_qstr) {
return -EINVAL;
}
qstring_append_chr(payload_qstr, '\n... | {
"code": [],
"line_no": []
} | static int FUNC_0(GAState *VAR_0, QObject *VAR_1)
{
const char *VAR_2;
QString *payload_qstr;
GIOStatus status;
g_assert(VAR_1 && VAR_0->channel);
payload_qstr = qobject_to_json(VAR_1);
if (!payload_qstr) {
return -EINVAL;
}
qstring_append_chr(payload_qstr, '\n');... | [
"static int FUNC_0(GAState *VAR_0, QObject *VAR_1)\n{",
"const char *VAR_2;",
"QString *payload_qstr;",
"GIOStatus status;",
"g_assert(VAR_1 && VAR_0->channel);",
"payload_qstr = qobject_to_json(VAR_1);",
"if (!payload_qstr) {",
"return -EINVAL;",
"}",
"qstring_append_chr(payload_qstr, '\\n');",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
]
] |
15,475 | float64 HELPER(ucf64_addd)(float64 a, float64 b, CPUUniCore32State *env)
{
return float64_add(a, b, &env->ucf64.fp_status);
}
| false | qemu | e8ede0a8bb5298a6979bcf7ed84ef64a64a4e3fe | float64 HELPER(ucf64_addd)(float64 a, float64 b, CPUUniCore32State *env)
{
return float64_add(a, b, &env->ucf64.fp_status);
}
| {
"code": [],
"line_no": []
} | float64 FUNC_0(ucf64_addd)(float64 a, float64 b, CPUUniCore32State *env)
{
return float64_add(a, b, &env->ucf64.fp_status);
}
| [
"float64 FUNC_0(ucf64_addd)(float64 a, float64 b, CPUUniCore32State *env)\n{",
"return float64_add(a, b, &env->ucf64.fp_status);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
15,477 | static void term_exit(void)
{
tcsetattr (0, TCSANOW, &oldtty);
}
| false | qemu | d57e4e482e3997b1382625c84149ad0b69155fc0 | static void term_exit(void)
{
tcsetattr (0, TCSANOW, &oldtty);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
tcsetattr (0, TCSANOW, &oldtty);
}
| [
"static void FUNC_0(void)\n{",
"tcsetattr (0, TCSANOW, &oldtty);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
15,478 | void timer_mod_ns(QEMUTimer *ts, int64_t expire_time)
{
QEMUTimerList *timer_list = ts->timer_list;
bool rearm;
qemu_mutex_lock(&timer_list->active_timers_lock);
timer_del_locked(timer_list, ts);
rearm = timer_mod_ns_locked(timer_list, ts, expire_time);
qemu_mutex_unlock(&timer_list->ac... | false | qemu | c2b38b277a7882a592f4f2ec955084b2b756daaa | void timer_mod_ns(QEMUTimer *ts, int64_t expire_time)
{
QEMUTimerList *timer_list = ts->timer_list;
bool rearm;
qemu_mutex_lock(&timer_list->active_timers_lock);
timer_del_locked(timer_list, ts);
rearm = timer_mod_ns_locked(timer_list, ts, expire_time);
qemu_mutex_unlock(&timer_list->ac... | {
"code": [],
"line_no": []
} | void FUNC_0(QEMUTimer *VAR_0, int64_t VAR_1)
{
QEMUTimerList *timer_list = VAR_0->timer_list;
bool rearm;
qemu_mutex_lock(&timer_list->active_timers_lock);
timer_del_locked(timer_list, VAR_0);
rearm = timer_mod_ns_locked(timer_list, VAR_0, VAR_1);
qemu_mutex_unlock(&timer_list->active_t... | [
"void FUNC_0(QEMUTimer *VAR_0, int64_t VAR_1)\n{",
"QEMUTimerList *timer_list = VAR_0->timer_list;",
"bool rearm;",
"qemu_mutex_lock(&timer_list->active_timers_lock);",
"timer_del_locked(timer_list, VAR_0);",
"rearm = timer_mod_ns_locked(timer_list, VAR_0, VAR_1);",
"qemu_mutex_unlock(&timer_list->activ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
15,479 | static int convert_do_copy(ImgConvertState *s)
{
uint8_t *buf = NULL;
int64_t sector_num, allocated_done;
int ret;
int n;
/* Check whether we have zero initialisation or can get it efficiently */
s->has_zero_init = s->min_sparse && !s->target_has_backing
? bdrv_has... | false | qemu | aad15de4275d2fc90acdf6101493dfee4e39b803 | static int convert_do_copy(ImgConvertState *s)
{
uint8_t *buf = NULL;
int64_t sector_num, allocated_done;
int ret;
int n;
s->has_zero_init = s->min_sparse && !s->target_has_backing
? bdrv_has_zero_init(blk_bs(s->target))
: false;
if (!... | {
"code": [],
"line_no": []
} | static int FUNC_0(ImgConvertState *VAR_0)
{
uint8_t *buf = NULL;
int64_t sector_num, allocated_done;
int VAR_1;
int VAR_2;
VAR_0->has_zero_init = VAR_0->min_sparse && !VAR_0->target_has_backing
? bdrv_has_zero_init(blk_bs(VAR_0->target))
: fa... | [
"static int FUNC_0(ImgConvertState *VAR_0)\n{",
"uint8_t *buf = NULL;",
"int64_t sector_num, allocated_done;",
"int VAR_1;",
"int VAR_2;",
"VAR_0->has_zero_init = VAR_0->min_sparse && !VAR_0->target_has_backing\n? bdrv_has_zero_init(blk_bs(VAR_0->target))\n: false;",
"if (!VAR_0->has_zero_init && !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,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17,
19,
21
],
[
25,
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
... |
15,480 | static void test_visitor_in_native_list_uint16(TestInputVisitorData *data,
const void *unused)
{
test_native_list_integer_helper(data, unused,
USER_DEF_NATIVE_LIST_UNION_KIND_U16);
}
| false | qemu | b3db211f3c80bb996a704d665fe275619f728bd4 | static void test_visitor_in_native_list_uint16(TestInputVisitorData *data,
const void *unused)
{
test_native_list_integer_helper(data, unused,
USER_DEF_NATIVE_LIST_UNION_KIND_U16);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(TestInputVisitorData *VAR_0,
const void *VAR_1)
{
test_native_list_integer_helper(VAR_0, VAR_1,
USER_DEF_NATIVE_LIST_UNION_KIND_U16);
}
| [
"static void FUNC_0(TestInputVisitorData *VAR_0,\nconst void *VAR_1)\n{",
"test_native_list_integer_helper(VAR_0, VAR_1,\nUSER_DEF_NATIVE_LIST_UNION_KIND_U16);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7,
9
],
[
11
]
] |
15,481 | static void validate_bootdevices(char *devices)
{
/* We just do some generic consistency checks */
const char *p;
int bitmap = 0;
for (p = devices; *p != '\0'; p++) {
/* Allowed boot devices are:
* a-b: floppy disk drives
* c-f: IDE disk drives
* g-m: machin... | false | qemu | 6ef4716cecdfa1b3794c1a33edba9840e1aa6b5f | static void validate_bootdevices(char *devices)
{
const char *p;
int bitmap = 0;
for (p = devices; *p != '\0'; p++) {
if (*p < 'a' || *p > 'p') {
fprintf(stderr, "Invalid boot device '%c'\n", *p);
exit(1);
}
if (bitma... | {
"code": [],
"line_no": []
} | static void FUNC_0(char *VAR_0)
{
const char *VAR_1;
int VAR_2 = 0;
for (VAR_1 = VAR_0; *VAR_1 != '\0'; VAR_1++) {
if (*VAR_1 < 'a' || *VAR_1 > 'VAR_1') {
fprintf(stderr, "Invalid boot device '%c'\n", *VAR_1);
exit(1);
}
... | [
"static void FUNC_0(char *VAR_0)\n{",
"const char *VAR_1;",
"int VAR_2 = 0;",
"for (VAR_1 = VAR_0; *VAR_1 != '\\0'; VAR_1++) {",
"if (*VAR_1 < 'a' || *VAR_1 > 'VAR_1') {",
"fprintf(stderr, \"Invalid boot device '%c'\\n\", *VAR_1);",
"exit(1);",
"}",
"if (VAR_2 & (1 << (*VAR_1 - 'a'))) {",
"fprintf... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
13
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
]
] |
15,483 | void s390_add_running_cpu(S390CPU *cpu)
{
CPUState *cs = CPU(cpu);
if (cs->halted) {
s390_running_cpus++;
cs->halted = 0;
cs->exception_index = -1;
}
}
| false | qemu | 75973bfe415774babe7c1e18fa682c050fdce73b | void s390_add_running_cpu(S390CPU *cpu)
{
CPUState *cs = CPU(cpu);
if (cs->halted) {
s390_running_cpus++;
cs->halted = 0;
cs->exception_index = -1;
}
}
| {
"code": [],
"line_no": []
} | void FUNC_0(S390CPU *VAR_0)
{
CPUState *cs = CPU(VAR_0);
if (cs->halted) {
s390_running_cpus++;
cs->halted = 0;
cs->exception_index = -1;
}
}
| [
"void FUNC_0(S390CPU *VAR_0)\n{",
"CPUState *cs = CPU(VAR_0);",
"if (cs->halted) {",
"s390_running_cpus++;",
"cs->halted = 0;",
"cs->exception_index = -1;",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
15,484 | static int usb_audio_handle_data(USBDevice *dev, USBPacket *p)
{
USBAudioState *s = (USBAudioState *) dev;
int ret = 0;
switch (p->pid) {
case USB_TOKEN_OUT:
switch (p->devep) {
case 1:
ret = usb_audio_handle_dataout(s, p);
break;
default:
... | false | qemu | 079d0b7f1eedcc634c371fe05b617fdc55c8b762 | static int usb_audio_handle_data(USBDevice *dev, USBPacket *p)
{
USBAudioState *s = (USBAudioState *) dev;
int ret = 0;
switch (p->pid) {
case USB_TOKEN_OUT:
switch (p->devep) {
case 1:
ret = usb_audio_handle_dataout(s, p);
break;
default:
... | {
"code": [],
"line_no": []
} | static int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)
{
USBAudioState *s = (USBAudioState *) VAR_0;
int VAR_2 = 0;
switch (VAR_1->pid) {
case USB_TOKEN_OUT:
switch (VAR_1->devep) {
case 1:
VAR_2 = usb_audio_handle_dataout(s, VAR_1);
break;
defa... | [
"static int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)\n{",
"USBAudioState *s = (USBAudioState *) VAR_0;",
"int VAR_2 = 0;",
"switch (VAR_1->pid) {",
"case USB_TOKEN_OUT:\nswitch (VAR_1->devep) {",
"case 1:\nVAR_2 = usb_audio_handle_dataout(s, VAR_1);",
"break;",
"default:\ngoto fail;",
"}",
"brea... | [
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
],
[
33,
35,
37
],
[
39
],
[
41
],
[
43
],
[
45,
47,
49
],
[
51
],
... |
15,485 | int arm_cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cs,
int cpuid, void *opaque)
{
struct arm_note note;
CPUARMState *env = &ARM_CPU(cs)->env;
DumpState *s = opaque;
int ret, i;
arm_note_init(¬e, s, "CORE", 5, NT_PRSTATUS, sizeof(note.prstatus));
... | false | qemu | ade0d0c0d3a0444c626ec5f46ef75af7395236f6 | int arm_cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cs,
int cpuid, void *opaque)
{
struct arm_note note;
CPUARMState *env = &ARM_CPU(cs)->env;
DumpState *s = opaque;
int ret, i;
arm_note_init(¬e, s, "CORE", 5, NT_PRSTATUS, sizeof(note.prstatus));
... | {
"code": [],
"line_no": []
} | int FUNC_0(WriteCoreDumpFunction VAR_0, CPUState *VAR_1,
int VAR_2, void *VAR_3)
{
struct arm_note VAR_4;
CPUARMState *env = &ARM_CPU(VAR_1)->env;
DumpState *s = VAR_3;
int VAR_5, VAR_6;
arm_note_init(&VAR_4, s, "CORE", 5, NT_PRSTATUS, sizeof(VAR_4.prstatus));
... | [
"int FUNC_0(WriteCoreDumpFunction VAR_0, CPUState *VAR_1,\nint VAR_2, void *VAR_3)\n{",
"struct arm_note VAR_4;",
"CPUARMState *env = &ARM_CPU(VAR_1)->env;",
"DumpState *s = VAR_3;",
"int VAR_5, VAR_6;",
"arm_note_init(&VAR_4, s, \"CORE\", 5, NT_PRSTATUS, sizeof(VAR_4.prstatus));",
"VAR_4.prstatus.pr_pi... | [
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
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
]
] |
15,487 | static int write_manifest(AVFormatContext *s, int final)
{
DASHContext *c = s->priv_data;
AVIOContext *out;
char temp_filename[1024];
int ret, i;
const char *proto = avio_find_protocol_name(s->filename);
int use_rename = proto && !strcmp(proto, "file");
static unsigned int warned_non... | false | FFmpeg | d24e08e978792e09d212018677d1c0b8208ecef8 | static int write_manifest(AVFormatContext *s, int final)
{
DASHContext *c = s->priv_data;
AVIOContext *out;
char temp_filename[1024];
int ret, i;
const char *proto = avio_find_protocol_name(s->filename);
int use_rename = proto && !strcmp(proto, "file");
static unsigned int warned_non... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1)
{
DASHContext *c = VAR_0->priv_data;
AVIOContext *out;
char VAR_2[1024];
int VAR_3, VAR_4;
const char *VAR_5 = avio_find_protocol_name(VAR_0->filename);
int VAR_6 = VAR_5 && !strcmp(VAR_5, "file");
static unsigned int VAR_7 = 0;
... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1)\n{",
"DASHContext *c = VAR_0->priv_data;",
"AVIOContext *out;",
"char VAR_2[1024];",
"int VAR_3, VAR_4;",
"const char *VAR_5 = avio_find_protocol_name(VAR_0->filename);",
"int VAR_6 = VAR_5 && !strcmp(VAR_5, \"file\");",
"static unsigned int VAR_7 ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45,
47,
49,... |
15,488 | static void curl_close(BlockDriverState *bs)
{
BDRVCURLState *s = bs->opaque;
int i;
DPRINTF("CURL: Close\n");
for (i=0; i<CURL_NUM_STATES; i++) {
if (s->states[i].in_use)
curl_clean_state(&s->states[i]);
if (s->states[i].curl) {
curl_easy_cleanup(s->st... | false | qemu | 63f0f45f2e89b60ff8245fec81328ddfde42a303 | static void curl_close(BlockDriverState *bs)
{
BDRVCURLState *s = bs->opaque;
int i;
DPRINTF("CURL: Close\n");
for (i=0; i<CURL_NUM_STATES; i++) {
if (s->states[i].in_use)
curl_clean_state(&s->states[i]);
if (s->states[i].curl) {
curl_easy_cleanup(s->st... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0)
{
BDRVCURLState *s = VAR_0->opaque;
int VAR_1;
DPRINTF("CURL: Close\n");
for (VAR_1=0; VAR_1<CURL_NUM_STATES; VAR_1++) {
if (s->states[VAR_1].in_use)
curl_clean_state(&s->states[VAR_1]);
if (s->states[VAR_1].curl) {
... | [
"static void FUNC_0(BlockDriverState *VAR_0)\n{",
"BDRVCURLState *s = VAR_0->opaque;",
"int VAR_1;",
"DPRINTF(\"CURL: Close\\n\");",
"for (VAR_1=0; VAR_1<CURL_NUM_STATES; VAR_1++) {",
"if (s->states[VAR_1].in_use)\ncurl_clean_state(&s->states[VAR_1]);",
"if (s->states[VAR_1].curl) {",
"curl_easy_clean... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
43
],
[
47
],
[
49... |
15,490 | if_output(struct socket *so, struct mbuf *ifm)
{
struct mbuf *ifq;
int on_fastq = 1;
DEBUG_CALL("if_output");
DEBUG_ARG("so = %lx", (long)so);
DEBUG_ARG("ifm = %lx", (long)ifm);
/*
* First remove the mbuf from m_usedlist,
* since we're gonna use m_next and m_prev ourselves
* XXX Shouldn't need... | false | qemu | b5302e1a9d8a47bd29a3e1876fba34be111728a2 | if_output(struct socket *so, struct mbuf *ifm)
{
struct mbuf *ifq;
int on_fastq = 1;
DEBUG_CALL("if_output");
DEBUG_ARG("so = %lx", (long)so);
DEBUG_ARG("ifm = %lx", (long)ifm);
if (ifm->m_flags & M_USEDLIST) {
remque(ifm);
ifm->m_flags &= ~M_USEDLIST;
}
for (ifq =... | {
"code": [],
"line_no": []
} | FUNC_0(struct socket *VAR_0, struct mbuf *VAR_1)
{
struct mbuf *VAR_2;
int VAR_3 = 1;
DEBUG_CALL("FUNC_0");
DEBUG_ARG("VAR_0 = %lx", (long)VAR_0);
DEBUG_ARG("VAR_1 = %lx", (long)VAR_1);
if (VAR_1->m_flags & M_USEDLIST) {
remque(VAR_1);
VAR_1->m_flags &= ~M_USEDLIST;
}
... | [
"FUNC_0(struct socket *VAR_0, struct mbuf *VAR_1)\n{",
"struct mbuf *VAR_2;",
"int VAR_3 = 1;",
"DEBUG_CALL(\"FUNC_0\");",
"DEBUG_ARG(\"VAR_0 = %lx\", (long)VAR_0);",
"DEBUG_ARG(\"VAR_1 = %lx\", (long)VAR_1);",
"if (VAR_1->m_flags & M_USEDLIST) {",
"remque(VAR_1);",
"VAR_1->m_flags &= ~M_USEDLIST;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
31
],
[
33
],
[
35
],
[
53
],
[
55
],
[
59
],
[
61
],
[
63
],
[
65
],
[
67
],
[
73
],
[
75
],
[
77... |
15,491 | static int ne2000_can_receive(void *opaque)
{
NE2000State *s = opaque;
if (s->cmd & E8390_STOP)
return 1;
return !ne2000_buffer_full(s);
}
| false | qemu | e3f5ec2b5e92706e3b807059f79b1fb5d936e567 | static int ne2000_can_receive(void *opaque)
{
NE2000State *s = opaque;
if (s->cmd & E8390_STOP)
return 1;
return !ne2000_buffer_full(s);
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0)
{
NE2000State *s = VAR_0;
if (s->cmd & E8390_STOP)
return 1;
return !ne2000_buffer_full(s);
}
| [
"static int FUNC_0(void *VAR_0)\n{",
"NE2000State *s = VAR_0;",
"if (s->cmd & E8390_STOP)\nreturn 1;",
"return !ne2000_buffer_full(s);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
],
[
15
]
] |
15,493 | static void *bochs_bios_init(void)
{
void *fw_cfg;
uint8_t *smbios_table;
size_t smbios_len;
uint64_t *numa_fw_cfg;
int i, j;
register_ioport_write(0x400, 1, 2, bochs_bios_write, NULL);
register_ioport_write(0x401, 1, 2, bochs_bios_write, NULL);
register_ioport_write(0x402, 1,... | false | qemu | 9b5b76d44930dc9266bb6d30862704cb3c86d2ca | static void *bochs_bios_init(void)
{
void *fw_cfg;
uint8_t *smbios_table;
size_t smbios_len;
uint64_t *numa_fw_cfg;
int i, j;
register_ioport_write(0x400, 1, 2, bochs_bios_write, NULL);
register_ioport_write(0x401, 1, 2, bochs_bios_write, NULL);
register_ioport_write(0x402, 1,... | {
"code": [],
"line_no": []
} | static void *FUNC_0(void)
{
void *VAR_0;
uint8_t *smbios_table;
size_t smbios_len;
uint64_t *numa_fw_cfg;
int VAR_1, VAR_2;
register_ioport_write(0x400, 1, 2, bochs_bios_write, NULL);
register_ioport_write(0x401, 1, 2, bochs_bios_write, NULL);
register_ioport_write(0x402, 1, 1... | [
"static void *FUNC_0(void)\n{",
"void *VAR_0;",
"uint8_t *smbios_table;",
"size_t smbios_len;",
"uint64_t *numa_fw_cfg;",
"int VAR_1, VAR_2;",
"register_ioport_write(0x400, 1, 2, bochs_bios_write, NULL);",
"register_ioport_write(0x401, 1, 2, bochs_bios_write, NULL);",
"register_ioport_write(0x402, 1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
47
],
[
49,... |
15,494 | static int xen_pt_word_reg_read(XenPCIPassthroughState *s, XenPTReg *cfg_entry,
uint16_t *value, uint16_t valid_mask)
{
XenPTRegInfo *reg = cfg_entry->reg;
uint16_t valid_emu_mask = 0;
/* emulate word register */
valid_emu_mask = reg->emu_mask & valid_mask;
*... | false | qemu | e2779de053b64f023de382fd87b3596613d47d1e | static int xen_pt_word_reg_read(XenPCIPassthroughState *s, XenPTReg *cfg_entry,
uint16_t *value, uint16_t valid_mask)
{
XenPTRegInfo *reg = cfg_entry->reg;
uint16_t valid_emu_mask = 0;
valid_emu_mask = reg->emu_mask & valid_mask;
*value = XEN_PT_MERGE_VALUE(... | {
"code": [],
"line_no": []
} | static int FUNC_0(XenPCIPassthroughState *VAR_0, XenPTReg *VAR_1,
uint16_t *VAR_2, uint16_t VAR_3)
{
XenPTRegInfo *reg = VAR_1->reg;
uint16_t valid_emu_mask = 0;
valid_emu_mask = reg->emu_mask & VAR_3;
*VAR_2 = XEN_PT_MERGE_VALUE(*VAR_2, VAR_1->data, ~valid_... | [
"static int FUNC_0(XenPCIPassthroughState *VAR_0, XenPTReg *VAR_1,\nuint16_t *VAR_2, uint16_t VAR_3)\n{",
"XenPTRegInfo *reg = VAR_1->reg;",
"uint16_t valid_emu_mask = 0;",
"valid_emu_mask = reg->emu_mask & VAR_3;",
"*VAR_2 = XEN_PT_MERGE_VALUE(*VAR_2, VAR_1->data, ~valid_emu_mask);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
15,496 | static int img_rebase(int argc, char **argv)
{
BlockDriverState *bs, *bs_old_backing = NULL, *bs_new_backing = NULL;
BlockDriver *old_backing_drv, *new_backing_drv;
char *filename;
const char *fmt, *cache, *out_basefmt, *out_baseimg;
int c, flags, ret;
int unsafe = 0;
int progress = ... | false | qemu | f0536bb848ad6eb2709a7dc675f261bd160c751b | static int img_rebase(int argc, char **argv)
{
BlockDriverState *bs, *bs_old_backing = NULL, *bs_new_backing = NULL;
BlockDriver *old_backing_drv, *new_backing_drv;
char *filename;
const char *fmt, *cache, *out_basefmt, *out_baseimg;
int c, flags, ret;
int unsafe = 0;
int progress = ... | {
"code": [],
"line_no": []
} | static int FUNC_0(int VAR_0, char **VAR_1)
{
BlockDriverState *bs, *bs_old_backing = NULL, *bs_new_backing = NULL;
BlockDriver *old_backing_drv, *new_backing_drv;
char *VAR_2;
const char *VAR_3, *VAR_4, *VAR_5, *VAR_6;
int VAR_7, VAR_8, VAR_9;
int VAR_10 = 0;
int VAR_11 = 0;
... | [
"static int FUNC_0(int VAR_0, char **VAR_1)\n{",
"BlockDriverState *bs, *bs_old_backing = NULL, *bs_new_backing = NULL;",
"BlockDriver *old_backing_drv, *new_backing_drv;",
"char *VAR_2;",
"const char *VAR_3, *VAR_4, *VAR_5, *VAR_6;",
"int VAR_7, VAR_8, VAR_9;",
"int VAR_10 = 0;",
"int VAR_11 = 0;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45,
47
... |
15,497 | int get_buffer(ByteIOContext *s, unsigned char *buf, int size)
{
int len, size1;
size1 = size;
while (size > 0) {
len = s->buf_end - s->buf_ptr;
if (len > size)
len = size;
if (len == 0) {
fill_buffer(s);
len = s->buf_end - s->buf_ptr;
... | false | FFmpeg | 3e2b6358e0c9744aee2a024c2be8e51e8900b0b1 | int get_buffer(ByteIOContext *s, unsigned char *buf, int size)
{
int len, size1;
size1 = size;
while (size > 0) {
len = s->buf_end - s->buf_ptr;
if (len > size)
len = size;
if (len == 0) {
fill_buffer(s);
len = s->buf_end - s->buf_ptr;
... | {
"code": [],
"line_no": []
} | int FUNC_0(ByteIOContext *VAR_0, unsigned char *VAR_1, int VAR_2)
{
int VAR_3, VAR_4;
VAR_4 = VAR_2;
while (VAR_2 > 0) {
VAR_3 = VAR_0->buf_end - VAR_0->buf_ptr;
if (VAR_3 > VAR_2)
VAR_3 = VAR_2;
if (VAR_3 == 0) {
fill_buffer(VAR_0);
VA... | [
"int FUNC_0(ByteIOContext *VAR_0, unsigned char *VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4;",
"VAR_4 = VAR_2;",
"while (VAR_2 > 0) {",
"VAR_3 = VAR_0->buf_end - VAR_0->buf_ptr;",
"if (VAR_3 > VAR_2)\nVAR_3 = VAR_2;",
"if (VAR_3 == 0) {",
"fill_buffer(VAR_0);",
"VAR_3 = VAR_0->buf_end - VAR_0->buf_ptr... | [
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
],
[
45... |
15,498 | AVFilterFormats *ff_make_format_list(const int *fmts)
{
AVFilterFormats *formats;
int count;
for (count = 0; fmts[count] != -1; count++)
;
formats = av_mallocz(sizeof(*formats));
if (count)
formats->formats = av_malloc(sizeof(*formats->formats) * count);
... | false | FFmpeg | c3bd1d60af97e8d2568dac9fcce7bdabb4ff93c8 | AVFilterFormats *ff_make_format_list(const int *fmts)
{
AVFilterFormats *formats;
int count;
for (count = 0; fmts[count] != -1; count++)
;
formats = av_mallocz(sizeof(*formats));
if (count)
formats->formats = av_malloc(sizeof(*formats->formats) * count);
... | {
"code": [],
"line_no": []
} | AVFilterFormats *FUNC_0(const int *fmts)
{
AVFilterFormats *formats;
int VAR_0;
for (VAR_0 = 0; fmts[VAR_0] != -1; VAR_0++)
;
formats = av_mallocz(sizeof(*formats));
if (VAR_0)
formats->formats = av_malloc(sizeof(*formats->formats) * VAR_0);
formats->n... | [
"AVFilterFormats *FUNC_0(const int *fmts)\n{",
"AVFilterFormats *formats;",
"int VAR_0;",
"for (VAR_0 = 0; fmts[VAR_0] != -1; VAR_0++)",
";",
"formats = av_mallocz(sizeof(*formats));",
"if (VAR_0)\nformats->formats = av_malloc(sizeof(*formats->formats) * VAR_0);",
"formats->nb_formats =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
29
],
[
31
]
] |
15,500 | void qemu_cond_destroy(QemuCond *cond)
{
BOOL result;
result = CloseHandle(cond->continue_event);
if (!result) {
error_exit(GetLastError(), __func__);
}
cond->continue_event = 0;
result = CloseHandle(cond->sema);
if (!result) {
error_exit(GetLastError(), __func__);
... | true | qemu | 12f8def0e02232d7c6416ad9b66640f973c531d1 | void qemu_cond_destroy(QemuCond *cond)
{
BOOL result;
result = CloseHandle(cond->continue_event);
if (!result) {
error_exit(GetLastError(), __func__);
}
cond->continue_event = 0;
result = CloseHandle(cond->sema);
if (!result) {
error_exit(GetLastError(), __func__);
... | {
"code": [
" error_exit(GetLastError(), __func__);",
" error_exit(GetLastError(), __func__);",
" BOOL result;",
" result = CloseHandle(cond->continue_event);",
" if (!result) {",
" error_exit(GetLastError(), __func__);",
" cond->continue_event = 0;",
"... | void FUNC_0(QemuCond *VAR_0)
{
BOOL result;
result = CloseHandle(VAR_0->continue_event);
if (!result) {
error_exit(GetLastError(), __func__);
}
VAR_0->continue_event = 0;
result = CloseHandle(VAR_0->sema);
if (!result) {
error_exit(GetLastError(), __func__);
}
... | [
"void FUNC_0(QemuCond *VAR_0)\n{",
"BOOL result;",
"result = CloseHandle(VAR_0->continue_event);",
"if (!result) {",
"error_exit(GetLastError(), __func__);",
"}",
"VAR_0->continue_event = 0;",
"result = CloseHandle(VAR_0->sema);",
"if (!result) {",
"error_exit(GetLastError(), __func__);",
"}",
... | [
0,
1,
1,
1,
1,
0,
1,
1,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
15,502 | static inline void gen_intermediate_code_internal(CPUARMState *env,
TranslationBlock *tb,
int search_pc)
{
DisasContext dc1, *dc = &dc1;
CPUBreakpoint *bp;
uint16_t *gen_opc_end;
int j, lj;
ta... | true | qemu | d8fd2954996255ba6ad610917e7849832d0120b7 | static inline void gen_intermediate_code_internal(CPUARMState *env,
TranslationBlock *tb,
int search_pc)
{
DisasContext dc1, *dc = &dc1;
CPUBreakpoint *bp;
uint16_t *gen_opc_end;
int j, lj;
ta... | {
"code": [
" log_target_disas(pc_start, dc->pc - pc_start, dc->thumb);"
],
"line_no": [
517
]
} | static inline void FUNC_0(CPUARMState *VAR_0,
TranslationBlock *VAR_1,
int VAR_2)
{
DisasContext dc1, *dc = &dc1;
CPUBreakpoint *bp;
uint16_t *gen_opc_end;
int VAR_3, VAR_4;
target_ulong pc_st... | [
"static inline void FUNC_0(CPUARMState *VAR_0,\nTranslationBlock *VAR_1,\nint VAR_2)\n{",
"DisasContext dc1, *dc = &dc1;",
"CPUBreakpoint *bp;",
"uint16_t *gen_opc_end;",
"int VAR_3, VAR_4;",
"target_ulong pc_start;",
"uint32_t next_page_start;",
"int VAR_5;",
"int VAR_6;",
"pc_start = VAR_1->pc;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
29
],
[
33
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
... |
15,503 | static int ram_save_page(RAMState *rs, PageSearchStatus *pss, bool last_stage)
{
int pages = -1;
uint64_t bytes_xmit;
ram_addr_t current_addr;
uint8_t *p;
int ret;
bool send_async = true;
RAMBlock *block = pss->block;
ram_addr_t offset = pss->page << TARGET_PAGE_BITS;
p =... | true | qemu | 2bf3aa85f08186b8162b76e7e8efe5b5a44306a6 | static int ram_save_page(RAMState *rs, PageSearchStatus *pss, bool last_stage)
{
int pages = -1;
uint64_t bytes_xmit;
ram_addr_t current_addr;
uint8_t *p;
int ret;
bool send_async = true;
RAMBlock *block = pss->block;
ram_addr_t offset = pss->page << TARGET_PAGE_BITS;
p =... | {
"code": [
" rs->bytes_transferred += save_page_header(rs, block,"
],
"line_no": [
117
]
} | static int FUNC_0(RAMState *VAR_0, PageSearchStatus *VAR_1, bool VAR_2)
{
int VAR_3 = -1;
uint64_t bytes_xmit;
ram_addr_t current_addr;
uint8_t *p;
int VAR_4;
bool send_async = true;
RAMBlock *block = VAR_1->block;
ram_addr_t offset = VAR_1->page << TARGET_PAGE_BITS;
p = ... | [
"static int FUNC_0(RAMState *VAR_0, PageSearchStatus *VAR_1, bool VAR_2)\n{",
"int VAR_3 = -1;",
"uint64_t bytes_xmit;",
"ram_addr_t current_addr;",
"uint8_t *p;",
"int VAR_4;",
"bool send_async = true;",
"RAMBlock *block = VAR_1->block;",
"ram_addr_t offset = VAR_1->page << TARGET_PAGE_BITS;",
"p... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
51
],
[... |
15,504 | static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s)
{
if (!s->config || !s->enable)
return 1;
return (s->cmd->next_cmd == s->cmd->stop);
}
| true | qemu | 4dedc07ffbbc66002e0fd2b97d5516fe6aca5eea | static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s)
{
if (!s->config || !s->enable)
return 1;
return (s->cmd->next_cmd == s->cmd->stop);
}
| {
"code": [
"static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s)",
" return 1;",
" return (s->cmd->next_cmd == s->cmd->stop);"
],
"line_no": [
1,
7,
9
]
} | static inline int FUNC_0(struct vmsvga_state_s *VAR_0)
{
if (!VAR_0->config || !VAR_0->enable)
return 1;
return (VAR_0->cmd->next_cmd == VAR_0->cmd->stop);
}
| [
"static inline int FUNC_0(struct vmsvga_state_s *VAR_0)\n{",
"if (!VAR_0->config || !VAR_0->enable)\nreturn 1;",
"return (VAR_0->cmd->next_cmd == VAR_0->cmd->stop);",
"}"
] | [
1,
1,
1,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
]
] |
15,505 | static int dnxhd_decode_dct_block_10_444(const DNXHDContext *ctx,
RowContext *row, int n)
{
return dnxhd_decode_dct_block(ctx, row, n, 6, 32, 6);
}
| false | FFmpeg | 6f1ccca4ae3b93b6a2a820a7a0e72081ab35767c | static int dnxhd_decode_dct_block_10_444(const DNXHDContext *ctx,
RowContext *row, int n)
{
return dnxhd_decode_dct_block(ctx, row, n, 6, 32, 6);
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(const DNXHDContext *VAR_0,
RowContext *VAR_1, int VAR_2)
{
return dnxhd_decode_dct_block(VAR_0, VAR_1, VAR_2, 6, 32, 6);
}
| [
"static int FUNC_0(const DNXHDContext *VAR_0,\nRowContext *VAR_1, int VAR_2)\n{",
"return dnxhd_decode_dct_block(VAR_0, VAR_1, VAR_2, 6, 32, 6);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
]
] |
15,506 | av_cold int swri_rematrix_init(SwrContext *s){
int i, j;
int nb_in = av_get_channel_layout_nb_channels(s->in_ch_layout);
int nb_out = av_get_channel_layout_nb_channels(s->out_ch_layout);
s->mix_any_f = NULL;
if (!s->rematrix_custom) {
int r = auto_matrix(s);
if (r)
... | false | FFmpeg | b74ecb82fa51aba52a95992668546afe8ed2bd9f | av_cold int swri_rematrix_init(SwrContext *s){
int i, j;
int nb_in = av_get_channel_layout_nb_channels(s->in_ch_layout);
int nb_out = av_get_channel_layout_nb_channels(s->out_ch_layout);
s->mix_any_f = NULL;
if (!s->rematrix_custom) {
int r = auto_matrix(s);
if (r)
... | {
"code": [],
"line_no": []
} | av_cold int FUNC_0(SwrContext *s){
int VAR_0, VAR_1;
int VAR_2 = av_get_channel_layout_nb_channels(s->in_ch_layout);
int VAR_3 = av_get_channel_layout_nb_channels(s->out_ch_layout);
s->mix_any_f = NULL;
if (!s->rematrix_custom) {
int VAR_4 = auto_matrix(s);
if (VAR_4)
... | [
"av_cold int FUNC_0(SwrContext *s){",
"int VAR_0, VAR_1;",
"int VAR_2 = av_get_channel_layout_nb_channels(s->in_ch_layout);",
"int VAR_3 = av_get_channel_layout_nb_channels(s->out_ch_layout);",
"s->mix_any_f = NULL;",
"if (!s->rematrix_custom) {",
"int VAR_4 = auto_matrix(s);",
"if (VAR_4)\nreturn VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45... |
15,507 | static int unpack_modes(Vp3DecodeContext *s, GetBitContext *gb)
{
int i, j, k, sb_x, sb_y;
int scheme;
int current_macroblock;
int current_fragment;
int coding_mode;
int custom_mode_alphabet[CODING_MODE_COUNT];
if (s->keyframe) {
for (i = 0; i < s->fragment_count; i++)
... | false | FFmpeg | 7c2e31d1f0198fad23cddbd8f206a04173fe6d0d | static int unpack_modes(Vp3DecodeContext *s, GetBitContext *gb)
{
int i, j, k, sb_x, sb_y;
int scheme;
int current_macroblock;
int current_fragment;
int coding_mode;
int custom_mode_alphabet[CODING_MODE_COUNT];
if (s->keyframe) {
for (i = 0; i < s->fragment_count; i++)
... | {
"code": [],
"line_no": []
} | static int FUNC_0(Vp3DecodeContext *VAR_0, GetBitContext *VAR_1)
{
int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;
int VAR_7;
int VAR_8;
int VAR_9;
int VAR_10;
int VAR_11[CODING_MODE_COUNT];
if (VAR_0->keyframe) {
for (VAR_2 = 0; VAR_2 < VAR_0->fragment_count; VAR_2++)
... | [
"static int FUNC_0(Vp3DecodeContext *VAR_0, GetBitContext *VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;",
"int VAR_7;",
"int VAR_8;",
"int VAR_9;",
"int VAR_10;",
"int VAR_11[CODING_MODE_COUNT];",
"if (VAR_0->keyframe) {",
"for (VAR_2 = 0; VAR_2 < VAR_0->fragment_count; VAR_2++)",
"VAR_0->a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
57
],
[
59
... |
15,508 | static int h264_probe(AVProbeData *p)
{
uint32_t code = -1;
int sps = 0, pps = 0, idr = 0, res = 0, sli = 0;
int i;
for (i = 0; i < p->buf_size; i++) {
code = (code << 8) + p->buf[i];
if ((code & 0xffffff00) == 0x100) {
int ref_idc = (code >> 5) & 3;
in... | false | FFmpeg | 3646ef6f7c0c02dc6d2f393f9fd0f6ebcbf15b44 | static int h264_probe(AVProbeData *p)
{
uint32_t code = -1;
int sps = 0, pps = 0, idr = 0, res = 0, sli = 0;
int i;
for (i = 0; i < p->buf_size; i++) {
code = (code << 8) + p->buf[i];
if ((code & 0xffffff00) == 0x100) {
int ref_idc = (code >> 5) & 3;
in... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVProbeData *VAR_0)
{
uint32_t code = -1;
int VAR_1 = 0, VAR_2 = 0, VAR_3 = 0, VAR_4 = 0, VAR_5 = 0;
int VAR_6;
for (VAR_6 = 0; VAR_6 < VAR_0->buf_size; VAR_6++) {
code = (code << 8) + VAR_0->buf[VAR_6];
if ((code & 0xffffff00) == 0x100) {
int ref_... | [
"static int FUNC_0(AVProbeData *VAR_0)\n{",
"uint32_t code = -1;",
"int VAR_1 = 0, VAR_2 = 0, VAR_3 = 0, VAR_4 = 0, VAR_5 = 0;",
"int VAR_6;",
"for (VAR_6 = 0; VAR_6 < VAR_0->buf_size; VAR_6++) {",
"code = (code << 8) + VAR_0->buf[VAR_6];",
"if ((code & 0xffffff00) == 0x100) {",
"int ref_idc = (code >... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27,
29,
31,
33
],
[
37,
39
],
[
43,
45
],
[
47,
49
],
[
51
],
[
53,
55
... |
15,509 | static int mov_write_tapt_tag(AVIOContext *pb, MOVTrack *track)
{
int32_t width = av_rescale(track->enc->sample_aspect_ratio.num, track->enc->width,
track->enc->sample_aspect_ratio.den);
int64_t pos = avio_tell(pb);
avio_wb32(pb, 0); /* size */
ffio_wfourcc(pb, "... | false | FFmpeg | 373211d828f351d86908d47828444f620bfd176d | static int mov_write_tapt_tag(AVIOContext *pb, MOVTrack *track)
{
int32_t width = av_rescale(track->enc->sample_aspect_ratio.num, track->enc->width,
track->enc->sample_aspect_ratio.den);
int64_t pos = avio_tell(pb);
avio_wb32(pb, 0);
ffio_wfourcc(pb, "tapt");
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVIOContext *VAR_0, MOVTrack *VAR_1)
{
int32_t width = av_rescale(VAR_1->enc->sample_aspect_ratio.num, VAR_1->enc->width,
VAR_1->enc->sample_aspect_ratio.den);
int64_t pos = avio_tell(VAR_0);
avio_wb32(VAR_0, 0);
ffio_wfourcc(VAR_0, "tapt");
... | [
"static int FUNC_0(AVIOContext *VAR_0, MOVTrack *VAR_1)\n{",
"int32_t width = av_rescale(VAR_1->enc->sample_aspect_ratio.num, VAR_1->enc->width,\nVAR_1->enc->sample_aspect_ratio.den);",
"int64_t pos = avio_tell(VAR_0);",
"avio_wb32(VAR_0, 0);",
"ffio_wfourcc(VAR_0, \"tapt\");",
"avio_wb32(VAR_0, 20);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
]
] |
15,510 | static inline void RENAME(rgb24ToUV_half)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused)
{
int i;
assert(src1==src2);
for (i=0; i<width; i++) {
int r= src1[6*i + 0] + src1[6*i + 3];
int g= src1[6*i + 1] + src1[6*i + 4];
in... | false | FFmpeg | d1adad3cca407f493c3637e20ecd4f7124e69212 | static inline void RENAME(rgb24ToUV_half)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused)
{
int i;
assert(src1==src2);
for (i=0; i<width; i++) {
int r= src1[6*i + 0] + src1[6*i + 3];
int g= src1[6*i + 1] + src1[6*i + 4];
in... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(rgb24ToUV_half)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused)
{
int VAR_0;
assert(src1==src2);
for (VAR_0=0; VAR_0<width; VAR_0++) {
int r= src1[6*VAR_0 + 0] + src1[6*VAR_0 + 3];
int g= src1[6*VAR_0 + 1] ... | [
"static inline void FUNC_0(rgb24ToUV_half)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused)\n{",
"int VAR_0;",
"assert(src1==src2);",
"for (VAR_0=0; VAR_0<width; VAR_0++) {",
"int r= src1[6*VAR_0 + 0] + src1[6*VAR_0 + 3];",
"int g= src1[6*VAR_0 + 1] + s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
15,511 | static inline int parse_nal_units(AVCodecParserContext *s,
AVCodecContext *avctx,
const uint8_t * const buf, int buf_size)
{
H264ParseContext *p = s->priv_data;
H2645NAL nal = { NULL };
int buf_index, next_avc;
unsigned int pps_i... | false | FFmpeg | 6a37abc59af4d87d4c55f7d812ac62d4d6a7464b | static inline int parse_nal_units(AVCodecParserContext *s,
AVCodecContext *avctx,
const uint8_t * const buf, int buf_size)
{
H264ParseContext *p = s->priv_data;
H2645NAL nal = { NULL };
int buf_index, next_avc;
unsigned int pps_i... | {
"code": [],
"line_no": []
} | static inline int FUNC_0(AVCodecParserContext *VAR_0,
AVCodecContext *VAR_1,
const uint8_t * const VAR_2, int VAR_3)
{
H264ParseContext *p = VAR_0->priv_data;
H2645NAL nal = { NULL };
int VAR_4, VAR_5;
unsigned int VAR_6;
un... | [
"static inline int FUNC_0(AVCodecParserContext *VAR_0,\nAVCodecContext *VAR_1,\nconst uint8_t * const VAR_2, int VAR_3)\n{",
"H264ParseContext *p = VAR_0->priv_data;",
"H2645NAL nal = { NULL };",
"int VAR_4, VAR_5;",
"unsigned int VAR_6;",
"unsigned int VAR_7;",
"int VAR_8 = -1, VAR_9 = 0;",
"int VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45,
47
],
[
51
],
[
53
],
[... |
15,512 | static void balloon_stats_change_timer(VirtIOBalloon *s, int secs)
{
timer_mod(s->stats_timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + secs * 1000);
}
| true | qemu | 1f9296b51a26650916a2c4191268bb64057bdc5f | static void balloon_stats_change_timer(VirtIOBalloon *s, int secs)
{
timer_mod(s->stats_timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + secs * 1000);
}
| {
"code": [
"static void balloon_stats_change_timer(VirtIOBalloon *s, int secs)"
],
"line_no": [
1
]
} | static void FUNC_0(VirtIOBalloon *VAR_0, int VAR_1)
{
timer_mod(VAR_0->stats_timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + VAR_1 * 1000);
}
| [
"static void FUNC_0(VirtIOBalloon *VAR_0, int VAR_1)\n{",
"timer_mod(VAR_0->stats_timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + VAR_1 * 1000);",
"}"
] | [
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
15,513 | static int tta_decode_init(AVCodecContext * avctx)
{
TTAContext *s = avctx->priv_data;
int i;
s->avctx = avctx;
// 30bytes includes a seektable with one frame
if (avctx->extradata_size < 30)
init_get_bits(&s->gb, avctx->extradata, avctx->extradata_size);
if (show_bits_long(&s->gb, 32) == bsw... | true | FFmpeg | 3a1a7e32ace7af47de74e8ae779cb4e04c89aa97 | static int tta_decode_init(AVCodecContext * avctx)
{
TTAContext *s = avctx->priv_data;
int i;
s->avctx = avctx;
if (avctx->extradata_size < 30)
init_get_bits(&s->gb, avctx->extradata, avctx->extradata_size);
if (show_bits_long(&s->gb, 32) == bswap_32(ff_get_fourcc("TTA1")))
{
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext * VAR_0)
{
TTAContext *s = VAR_0->priv_data;
int VAR_1;
s->VAR_0 = VAR_0;
if (VAR_0->extradata_size < 30)
init_get_bits(&s->gb, VAR_0->extradata, VAR_0->extradata_size);
if (show_bits_long(&s->gb, 32) == bswap_32(ff_get_fourcc("TTA1")))
{
... | [
"static int FUNC_0(AVCodecContext * VAR_0)\n{",
"TTAContext *s = VAR_0->priv_data;",
"int VAR_1;",
"s->VAR_0 = VAR_0;",
"if (VAR_0->extradata_size < 30)\ninit_get_bits(&s->gb, VAR_0->extradata, VAR_0->extradata_size);",
"if (show_bits_long(&s->gb, 32) == bswap_32(ff_get_fourcc(\"TTA1\")))\n{",
"skip_bit... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
7,
8
],
[
9,
10
],
[
12
],
[
17
],
[
18,
19
],
[
20
],
[
21
],
[
22
],
[
23
],
[
24
],
[
25
],
[
26
],
[
27
],
[
28
],
[
... |
15,516 | void show_licence(void)
{
printf(
"ffmpeg version " FFMPEG_VERSION "\n"
"Copyright (c) 2000, 2001, 2002 Gerard Lantau\n"
"This program is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Fou... | true | FFmpeg | bf5af5687569e34d6e3a4d31fc6bb5dc44efdb29 | void show_licence(void)
{
printf(
"ffmpeg version " FFMPEG_VERSION "\n"
"Copyright (c) 2000, 2001, 2002 Gerard Lantau\n"
"This program is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Fou... | {
"code": [
" \"Copyright (c) 2000, 2001, 2002 Gerard Lantau\\n\"",
" \"This program is free software; you can redistribute it and/or modify\\n\"",
" \"it under the terms of the GNU General Public License as published by\\n\"",
" \"the Free Software Foundation; either version 2 of the Lice... | void FUNC_0(void)
{
printf(
"ffmpeg version " FFMPEG_VERSION "\n"
"Copyright (c) 2000, 2001, 2002 Gerard Lantau\n"
"This program is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundatio... | [
"void FUNC_0(void)\n{",
"printf(\n\"ffmpeg version \" FFMPEG_VERSION \"\\n\"\n\"Copyright (c) 2000, 2001, 2002 Gerard Lantau\\n\"\n\"This program is free software; you can redistribute it and/or modify\\n\"",
"\"it under the terms of the GNU General Public License as published by\\n\"\n\"the Free Software Found... | [
0,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5,
7,
9,
11
],
[
13,
15
],
[
17,
19,
21,
23
],
[
25,
27,
29,
31,
33
],
[
35,
37
],
[
39
],
[
41
]
] |
15,518 | static int parse_hex64(DeviceState *dev, Property *prop, const char *str)
{
uint64_t *ptr = qdev_get_prop_ptr(dev, prop);
if (sscanf(str, "%" PRIx64, ptr) != 1)
return -EINVAL;
return 0;
}
| true | qemu | 449041d4db1f82f281fe097e832f07cd9ee1e864 | static int parse_hex64(DeviceState *dev, Property *prop, const char *str)
{
uint64_t *ptr = qdev_get_prop_ptr(dev, prop);
if (sscanf(str, "%" PRIx64, ptr) != 1)
return -EINVAL;
return 0;
}
| {
"code": [
" if (sscanf(str, \"%\" PRIx64, ptr) != 1)"
],
"line_no": [
9
]
} | static int FUNC_0(DeviceState *VAR_0, Property *VAR_1, const char *VAR_2)
{
uint64_t *ptr = qdev_get_prop_ptr(VAR_0, VAR_1);
if (sscanf(VAR_2, "%" PRIx64, ptr) != 1)
return -EINVAL;
return 0;
}
| [
"static int FUNC_0(DeviceState *VAR_0, Property *VAR_1, const char *VAR_2)\n{",
"uint64_t *ptr = qdev_get_prop_ptr(VAR_0, VAR_1);",
"if (sscanf(VAR_2, \"%\" PRIx64, ptr) != 1)\nreturn -EINVAL;",
"return 0;",
"}"
] | [
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
],
[
15
]
] |
15,519 | const TPMDriverOps *tpm_get_backend_driver(const char *type)
{
int i;
for (i = 0; i < TPM_MAX_DRIVERS && be_drivers[i] != NULL; i++) {
if (!strcmp(TpmType_lookup[be_drivers[i]->type], type)) {
return be_drivers[i];
}
}
return NULL;
}
| true | qemu | a9a72aeefbd3ef8bcbbeeccaf174ee10db2978ac | const TPMDriverOps *tpm_get_backend_driver(const char *type)
{
int i;
for (i = 0; i < TPM_MAX_DRIVERS && be_drivers[i] != NULL; i++) {
if (!strcmp(TpmType_lookup[be_drivers[i]->type], type)) {
return be_drivers[i];
}
}
return NULL;
}
| {
"code": [
" int i;",
" for (i = 0; i < TPM_MAX_DRIVERS && be_drivers[i] != NULL; i++) {",
" if (!strcmp(TpmType_lookup[be_drivers[i]->type], type)) {",
" return be_drivers[i];",
" return NULL;",
" int i;",
" for (i = 0; i < TPM_MAX_DRIVERS && be_drivers[i... | const TPMDriverOps *FUNC_0(const char *type)
{
int VAR_0;
for (VAR_0 = 0; VAR_0 < TPM_MAX_DRIVERS && be_drivers[VAR_0] != NULL; VAR_0++) {
if (!strcmp(TpmType_lookup[be_drivers[VAR_0]->type], type)) {
return be_drivers[VAR_0];
}
}
return NULL;
}
| [
"const TPMDriverOps *FUNC_0(const char *type)\n{",
"int VAR_0;",
"for (VAR_0 = 0; VAR_0 < TPM_MAX_DRIVERS && be_drivers[VAR_0] != NULL; VAR_0++) {",
"if (!strcmp(TpmType_lookup[be_drivers[VAR_0]->type], type)) {",
"return be_drivers[VAR_0];",
"}",
"}",
"return NULL;",
"}"
] | [
0,
1,
1,
1,
1,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
15,522 | static void glib_pollfds_fill(int64_t *cur_timeout)
{
GMainContext *context = g_main_context_default();
int timeout = 0;
int64_t timeout_ns;
int n;
g_main_context_prepare(context, &max_priority);
glib_pollfds_idx = gpollfds->len;
n = glib_n_poll_fds;
do {
GPollFD *p... | false | qemu | c2b38b277a7882a592f4f2ec955084b2b756daaa | static void glib_pollfds_fill(int64_t *cur_timeout)
{
GMainContext *context = g_main_context_default();
int timeout = 0;
int64_t timeout_ns;
int n;
g_main_context_prepare(context, &max_priority);
glib_pollfds_idx = gpollfds->len;
n = glib_n_poll_fds;
do {
GPollFD *p... | {
"code": [],
"line_no": []
} | static void FUNC_0(int64_t *VAR_0)
{
GMainContext *context = g_main_context_default();
int VAR_1 = 0;
int64_t timeout_ns;
int VAR_2;
g_main_context_prepare(context, &max_priority);
glib_pollfds_idx = gpollfds->len;
VAR_2 = glib_n_poll_fds;
do {
GPollFD *pfds;
... | [
"static void FUNC_0(int64_t *VAR_0)\n{",
"GMainContext *context = g_main_context_default();",
"int VAR_1 = 0;",
"int64_t timeout_ns;",
"int VAR_2;",
"g_main_context_prepare(context, &max_priority);",
"glib_pollfds_idx = gpollfds->len;",
"VAR_2 = glib_n_poll_fds;",
"do {",
"GPollFD *pfds;",
"glib... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
15,525 | static uint64_t musicpal_misc_read(void *opaque, target_phys_addr_t offset,
unsigned size)
{
switch (offset) {
case MP_MISC_BOARD_REVISION:
return MP_BOARD_REVISION;
default:
return 0;
}
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t musicpal_misc_read(void *opaque, target_phys_addr_t offset,
unsigned size)
{
switch (offset) {
case MP_MISC_BOARD_REVISION:
return MP_BOARD_REVISION;
default:
return 0;
}
}
| {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t offset,
unsigned size)
{
switch (offset) {
case MP_MISC_BOARD_REVISION:
return MP_BOARD_REVISION;
default:
return 0;
}
}
| [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t offset,\nunsigned size)\n{",
"switch (offset) {",
"case MP_MISC_BOARD_REVISION:\nreturn MP_BOARD_REVISION;",
"default:\nreturn 0;",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9,
11
],
[
15,
17
],
[
19
],
[
21
]
] |
15,527 | static void dmg_refresh_limits(BlockDriverState *bs, Error **errp)
{
bs->request_alignment = BDRV_SECTOR_SIZE; /* No sub-sector I/O supported */
}
| false | qemu | a5b8dd2ce83208cd7d6eb4562339ecf5aae13574 | static void dmg_refresh_limits(BlockDriverState *bs, Error **errp)
{
bs->request_alignment = BDRV_SECTOR_SIZE;
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0, Error **VAR_1)
{
VAR_0->request_alignment = BDRV_SECTOR_SIZE;
}
| [
"static void FUNC_0(BlockDriverState *VAR_0, Error **VAR_1)\n{",
"VAR_0->request_alignment = BDRV_SECTOR_SIZE;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
15,528 | static void sigp_store_adtl_status(void *arg)
{
SigpInfo *si = arg;
if (!kvm_check_extension(kvm_state, KVM_CAP_S390_VECTOR_REGISTERS)) {
set_sigp_status(si, SIGP_STAT_INVALID_ORDER);
return;
}
/* cpu has to be stopped */
if (s390_cpu_get_state(si->cpu) != CPU_STATE_STOPP... | false | qemu | 7c72ac49ae9f38fa0125296e05988655157decb5 | static void sigp_store_adtl_status(void *arg)
{
SigpInfo *si = arg;
if (!kvm_check_extension(kvm_state, KVM_CAP_S390_VECTOR_REGISTERS)) {
set_sigp_status(si, SIGP_STAT_INVALID_ORDER);
return;
}
if (s390_cpu_get_state(si->cpu) != CPU_STATE_STOPPED) {
set_sigp_sta... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
SigpInfo *si = VAR_0;
if (!kvm_check_extension(kvm_state, KVM_CAP_S390_VECTOR_REGISTERS)) {
set_sigp_status(si, SIGP_STAT_INVALID_ORDER);
return;
}
if (s390_cpu_get_state(si->cpu) != CPU_STATE_STOPPED) {
set_sigp_status(si, SIGP... | [
"static void FUNC_0(void *VAR_0)\n{",
"SigpInfo *si = VAR_0;",
"if (!kvm_check_extension(kvm_state, KVM_CAP_S390_VECTOR_REGISTERS)) {",
"set_sigp_status(si, SIGP_STAT_INVALID_ORDER);",
"return;",
"}",
"if (s390_cpu_get_state(si->cpu) != CPU_STATE_STOPPED) {",
"set_sigp_status(si, SIGP_STAT_INCORRECT_S... | [
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
],
[
21
],
[
23
],
[
25
],
[
27
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55... |
15,529 | static void rom_reset(void *unused)
{
Rom *rom;
QTAILQ_FOREACH(rom, &roms, next) {
if (rom->fw_file) {
continue;
}
if (rom->data == NULL)
continue;
cpu_physical_memory_write_rom(rom->addr, rom->data, rom->romsize);
if (rom->isrom) {
... | false | qemu | bdb5ee3064d5ae786b0bcb6cf6ff4e3554a72990 | static void rom_reset(void *unused)
{
Rom *rom;
QTAILQ_FOREACH(rom, &roms, next) {
if (rom->fw_file) {
continue;
}
if (rom->data == NULL)
continue;
cpu_physical_memory_write_rom(rom->addr, rom->data, rom->romsize);
if (rom->isrom) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
Rom *rom;
QTAILQ_FOREACH(rom, &roms, next) {
if (rom->fw_file) {
continue;
}
if (rom->data == NULL)
continue;
cpu_physical_memory_write_rom(rom->addr, rom->data, rom->romsize);
if (rom->isrom) {
... | [
"static void FUNC_0(void *VAR_0)\n{",
"Rom *rom;",
"QTAILQ_FOREACH(rom, &roms, next) {",
"if (rom->fw_file) {",
"continue;",
"}",
"if (rom->data == NULL)\ncontinue;",
"cpu_physical_memory_write_rom(rom->addr, rom->data, rom->romsize);",
"if (rom->isrom) {",
"qemu_free(rom->data);",
"rom->data = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
15,531 | static void mp3_parse_info_tag(AVFormatContext *s, AVStream *st,
MPADecodeHeader *c, uint32_t spf)
{
#define LAST_BITS(k, n) ((k) & ((1 << (n)) - 1))
#define MIDDLE_BITS(k, m, n) LAST_BITS((k) >> (m), ((n) - (m)))
uint16_t crc;
uint32_t v;
char version[10];
u... | false | FFmpeg | 6c7f1155bb648eced8e5aa08b1fd490df2f8b325 | static void mp3_parse_info_tag(AVFormatContext *s, AVStream *st,
MPADecodeHeader *c, uint32_t spf)
{
#define LAST_BITS(k, n) ((k) & ((1 << (n)) - 1))
#define MIDDLE_BITS(k, m, n) LAST_BITS((k) >> (m), ((n) - (m)))
uint16_t crc;
uint32_t v;
char version[10];
u... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVFormatContext *VAR_0, AVStream *VAR_1,
MPADecodeHeader *VAR_2, uint32_t VAR_3)
{
#define LAST_BITS(k, n) ((k) & ((1 << (n)) - 1))
#define MIDDLE_BITS(k, m, n) LAST_BITS((k) >> (m), ((n) - (m)))
uint16_t crc;
uint32_t v;
char VAR_4[10];
ui... | [
"static void FUNC_0(AVFormatContext *VAR_0, AVStream *VAR_1,\nMPADecodeHeader *VAR_2, uint32_t VAR_3)\n{",
"#define LAST_BITS(k, n) ((k) & ((1 << (n)) - 1))\n#define MIDDLE_BITS(k, m, n) LAST_BITS((k) >> (m), ((n) - (m)))\nuint16_t crc;",
"uint32_t v;",
"char VAR_4[10];",
"uint32_t peak = 0;",
"int32_t ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7,
9,
13
],
[
15
],
[
19
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
51
],
[
53,
55
],
[
57,
59
],
[
61
... |
15,532 | int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels,
int nb_samples, enum AVSampleFormat sample_fmt, int align)
{
uint8_t *buf;
int size = av_samples_get_buffer_size(NULL, nb_channels, nb_samples,
sample_fmt, align);
... | false | FFmpeg | cd15b7c03d8df29d4c69b0620cf27d4a8c9dfb65 | int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels,
int nb_samples, enum AVSampleFormat sample_fmt, int align)
{
uint8_t *buf;
int size = av_samples_get_buffer_size(NULL, nb_channels, nb_samples,
sample_fmt, align);
... | {
"code": [],
"line_no": []
} | int FUNC_0(uint8_t **VAR_0, int *VAR_1, int VAR_2,
int VAR_3, enum AVSampleFormat VAR_4, int VAR_5)
{
uint8_t *buf;
int VAR_6 = av_samples_get_buffer_size(NULL, VAR_2, VAR_3,
VAR_4, VAR_5);
if (VAR_6 < 0)
return VAR_6;
buf ... | [
"int FUNC_0(uint8_t **VAR_0, int *VAR_1, int VAR_2,\nint VAR_3, enum AVSampleFormat VAR_4, int VAR_5)\n{",
"uint8_t *buf;",
"int VAR_6 = av_samples_get_buffer_size(NULL, VAR_2, VAR_3,\nVAR_4, VAR_5);",
"if (VAR_6 < 0)\nreturn VAR_6;",
"buf = av_mallocz(VAR_6);",
"if (!buf)\nreturn AVERROR(ENOMEM);",
"VA... | [
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
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
15,533 | static void do_interrupt_protected(int intno, int is_int, int error_code,
unsigned int next_eip, int is_hw)
{
SegmentCache *dt;
uint8_t *ptr, *ssp;
int type, dpl, selector, ss_dpl, cpl, sp_mask;
int has_error_code, new_stack, shift;
uint32_t e1, e2, offset, ... | false | qemu | 8e682019e37c8f8939244fcf44a592fa6347d127 | static void do_interrupt_protected(int intno, int is_int, int error_code,
unsigned int next_eip, int is_hw)
{
SegmentCache *dt;
uint8_t *ptr, *ssp;
int type, dpl, selector, ss_dpl, cpl, sp_mask;
int has_error_code, new_stack, shift;
uint32_t e1, e2, offset, ... | {
"code": [],
"line_no": []
} | static void FUNC_0(int VAR_0, int VAR_1, int VAR_2,
unsigned int VAR_3, int VAR_4)
{
SegmentCache *dt;
uint8_t *ptr, *ssp;
int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;
int VAR_11, VAR_12, VAR_13;
uint32_t e1, e2, offset, ss, esp, ss_e1, ss_e2;
uint32_... | [
"static void FUNC_0(int VAR_0, int VAR_1, int VAR_2,\nunsigned int VAR_3, int VAR_4)\n{",
"SegmentCache *dt;",
"uint8_t *ptr, *ssp;",
"int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;",
"int VAR_11, VAR_12, VAR_13;",
"uint32_t e1, e2, offset, ss, esp, ss_e1, ss_e2;",
"uint32_t old_eip;",
"VAR_11 = 0;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27,
29,
31,
33,
35,
37,
39,
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53,... |
15,536 | static int v9fs_synth_remove(FsContext *ctx, const char *path)
{
errno = EPERM;
return -1;
}
| false | qemu | 364031f17932814484657e5551ba12957d993d7e | static int v9fs_synth_remove(FsContext *ctx, const char *path)
{
errno = EPERM;
return -1;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0, const char *VAR_1)
{
errno = EPERM;
return -1;
}
| [
"static int FUNC_0(FsContext *VAR_0, const char *VAR_1)\n{",
"errno = EPERM;",
"return -1;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
15,538 | static void dec_b(DisasContext *dc)
{
if (dc->r0 == R_RA) {
LOG_DIS("ret\n");
} else if (dc->r0 == R_EA) {
LOG_DIS("eret\n");
} else if (dc->r0 == R_BA) {
LOG_DIS("bret\n");
} else {
LOG_DIS("b r%d\n", dc->r0);
}
/* restore IE.IE in case of an eret */... | false | qemu | 42a268c241183877192c376d03bd9b6d527407c7 | static void dec_b(DisasContext *dc)
{
if (dc->r0 == R_RA) {
LOG_DIS("ret\n");
} else if (dc->r0 == R_EA) {
LOG_DIS("eret\n");
} else if (dc->r0 == R_BA) {
LOG_DIS("bret\n");
} else {
LOG_DIS("b r%d\n", dc->r0);
}
if (dc->r0 == R_EA) {
T... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0)
{
if (VAR_0->r0 == R_RA) {
LOG_DIS("ret\n");
} else if (VAR_0->r0 == R_EA) {
LOG_DIS("eret\n");
} else if (VAR_0->r0 == R_BA) {
LOG_DIS("bret\n");
} else {
LOG_DIS("b r%d\n", VAR_0->r0);
}
if (VAR_0->r0 ==... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"if (VAR_0->r0 == R_RA) {",
"LOG_DIS(\"ret\\n\");",
"} else if (VAR_0->r0 == R_EA) {",
"LOG_DIS(\"eret\\n\");",
"} else if (VAR_0->r0 == R_BA) {",
"LOG_DIS(\"bret\\n\");",
"} else {",
"LOG_DIS(\"b r%d\\n\", VAR_0->r0);",
"}",
"if (VAR_0->r0 == R_EA) ... | [
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
15,539 | static void query_facilities(void)
{
unsigned long hwcap = qemu_getauxval(AT_HWCAP);
/* Is STORE FACILITY LIST EXTENDED available? Honestly, I believe this
is present on all 64-bit systems, but let's check for it anyway. */
if (hwcap & HWCAP_S390_STFLE) {
register int r0 __asm__("0"... | false | qemu | b2c98d9d392c87c9b9e975d30f79924719d9cbbe | static void query_facilities(void)
{
unsigned long hwcap = qemu_getauxval(AT_HWCAP);
if (hwcap & HWCAP_S390_STFLE) {
register int r0 __asm__("0");
register void *r1 __asm__("1");
r1 = &facilities;
asm volatile(".word 0xb2b0,0x1000"
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
unsigned long VAR_0 = qemu_getauxval(AT_HWCAP);
if (VAR_0 & HWCAP_S390_STFLE) {
register int VAR_1 __asm__("0");
register void *VAR_2 __asm__("1");
VAR_2 = &facilities;
asm volatile(".word 0xb2b0,0x1000"
... | [
"static void FUNC_0(void)\n{",
"unsigned long VAR_0 = qemu_getauxval(AT_HWCAP);",
"if (VAR_0 & HWCAP_S390_STFLE) {",
"register int VAR_1 __asm__(\"0\");",
"register void *VAR_2 __asm__(\"1\");",
"VAR_2 = &facilities;",
"asm volatile(\".word 0xb2b0,0x1000\"\n: \"=r\"(VAR_1) : \"0\"(0), \"r\"(VAR_2) : \"m... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25,
27
],
[
29
],
[
31
]
] |
15,540 | static void setup_rt_frame(int sig, struct target_sigaction *ka,
target_siginfo_t *info,
target_sigset_t *set, CPUOpenRISCState *env)
{
int err = 0;
abi_ulong frame_addr;
unsigned long return_ip;
struct target_rt_sigframe *frame;
abi_ulon... | false | qemu | 41ecc72ba5932381208e151bf2d2149a0342beff | static void setup_rt_frame(int sig, struct target_sigaction *ka,
target_siginfo_t *info,
target_sigset_t *set, CPUOpenRISCState *env)
{
int err = 0;
abi_ulong frame_addr;
unsigned long return_ip;
struct target_rt_sigframe *frame;
abi_ulon... | {
"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, CPUOpenRISCState *VAR_4)
{
int VAR_5 = 0;
abi_ulong frame_addr;
unsigned long VAR_6;
struct target_rt_sigframe *VAR_7;
abi_ulon... | [
"static void FUNC_0(int VAR_0, struct target_sigaction *VAR_1,\ntarget_siginfo_t *VAR_2,\ntarget_sigset_t *VAR_3, CPUOpenRISCState *VAR_4)\n{",
"int VAR_5 = 0;",
"abi_ulong frame_addr;",
"unsigned long VAR_6;",
"struct target_rt_sigframe *VAR_7;",
"abi_ulong info_addr, uc_addr;",
"frame_addr = get_sigfr... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
51
],
[
53
... |
15,541 | static void imx_enet_do_tx(IMXFECState *s)
{
int frame_size = 0;
uint8_t frame[ENET_MAX_FRAME_SIZE];
uint8_t *ptr = frame;
uint32_t addr = s->tx_descriptor;
while (1) {
IMXENETBufDesc bd;
int len;
imx_enet_read_bd(&bd, addr);
FEC_PRINTF("tx_bd %x flags %... | false | qemu | 81f17e0d435c3db3a3e67e0d32ebf9c98973211f | static void imx_enet_do_tx(IMXFECState *s)
{
int frame_size = 0;
uint8_t frame[ENET_MAX_FRAME_SIZE];
uint8_t *ptr = frame;
uint32_t addr = s->tx_descriptor;
while (1) {
IMXENETBufDesc bd;
int len;
imx_enet_read_bd(&bd, addr);
FEC_PRINTF("tx_bd %x flags %... | {
"code": [],
"line_no": []
} | static void FUNC_0(IMXFECState *VAR_0)
{
int VAR_1 = 0;
uint8_t frame[ENET_MAX_FRAME_SIZE];
uint8_t *ptr = frame;
uint32_t addr = VAR_0->tx_descriptor;
while (1) {
IMXENETBufDesc bd;
int VAR_2;
imx_enet_read_bd(&bd, addr);
FEC_PRINTF("tx_bd %x flags %04x... | [
"static void FUNC_0(IMXFECState *VAR_0)\n{",
"int VAR_1 = 0;",
"uint8_t frame[ENET_MAX_FRAME_SIZE];",
"uint8_t *ptr = frame;",
"uint32_t addr = VAR_0->tx_descriptor;",
"while (1) {",
"IMXENETBufDesc bd;",
"int VAR_2;",
"imx_enet_read_bd(&bd, addr);",
"FEC_PRINTF(\"tx_bd %x flags %04x VAR_2 %d data... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25,
27,
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
15,542 | static uint64_t ne2000_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
NE2000State *s = opaque;
if (addr < 0x10 && size == 1) {
return ne2000_ioport_read(s, addr);
} else if (addr == 0x10) {
if (size <= 2) {
return ne2000_asic_io... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t ne2000_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
NE2000State *s = opaque;
if (addr < 0x10 && size == 1) {
return ne2000_ioport_read(s, addr);
} else if (addr == 0x10) {
if (size <= 2) {
return ne2000_asic_io... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,
unsigned size)
{
NE2000State *s = opaque;
if (addr < 0x10 && size == 1) {
return ne2000_ioport_read(s, addr);
} else if (addr == 0x10) {
if (size <= 2) {
return ne2000_asic_ioport_... | [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,\nunsigned size)\n{",
"NE2000State *s = opaque;",
"if (addr < 0x10 && size == 1) {",
"return ne2000_ioport_read(s, addr);",
"} else if (addr == 0x10) {",
"if (size <= 2) {",
"return ne2000_asic_ioport_read(s, addr);",
"} else {",
"return ... | [
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
]
] |
15,543 | static const OptionDef *find_option(const OptionDef *po, const char *name)
{
const char *p = strchr(name, ':');
int len = p ? p - name : strlen(name);
while (po->name != NULL) {
if (!strncmp(name, po->name, len) && strlen(po->name) == len)
break;
po++;
}
return... | false | FFmpeg | 4b1f5e5090abed6c618c8ba380cd7d28d140f867 | static const OptionDef *find_option(const OptionDef *po, const char *name)
{
const char *p = strchr(name, ':');
int len = p ? p - name : strlen(name);
while (po->name != NULL) {
if (!strncmp(name, po->name, len) && strlen(po->name) == len)
break;
po++;
}
return... | {
"code": [],
"line_no": []
} | static const OptionDef *FUNC_0(const OptionDef *po, const char *name)
{
const char *VAR_0 = strchr(name, ':');
int VAR_1 = VAR_0 ? VAR_0 - name : strlen(name);
while (po->name != NULL) {
if (!strncmp(name, po->name, VAR_1) && strlen(po->name) == VAR_1)
break;
po++;
... | [
"static const OptionDef *FUNC_0(const OptionDef *po, const char *name)\n{",
"const char *VAR_0 = strchr(name, ':');",
"int VAR_1 = VAR_0 ? VAR_0 - name : strlen(name);",
"while (po->name != NULL) {",
"if (!strncmp(name, po->name, VAR_1) && strlen(po->name) == VAR_1)\nbreak;",
"po++;",
"}",
"return po;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
15,544 | uint32 float64_to_uint32( float64 a STATUS_PARAM )
{
int64_t v;
uint32 res;
v = float64_to_int64(a STATUS_VAR);
if (v < 0) {
res = 0;
float_raise( float_flag_invalid STATUS_VAR);
} else if (v > 0xffffffff) {
res = 0xffffffff;
float_raise( float_flag_invali... | false | qemu | 8d551c988e96ac4cfe462e6b34d513bba2da572f | uint32 float64_to_uint32( float64 a STATUS_PARAM )
{
int64_t v;
uint32 res;
v = float64_to_int64(a STATUS_VAR);
if (v < 0) {
res = 0;
float_raise( float_flag_invalid STATUS_VAR);
} else if (v > 0xffffffff) {
res = 0xffffffff;
float_raise( float_flag_invali... | {
"code": [],
"line_no": []
} | uint32 FUNC_0( float64 a STATUS_PARAM )
{
int64_t v;
uint32 res;
v = float64_to_int64(a STATUS_VAR);
if (v < 0) {
res = 0;
float_raise( float_flag_invalid STATUS_VAR);
} else if (v > 0xffffffff) {
res = 0xffffffff;
float_raise( float_flag_invalid STATUS_VA... | [
"uint32 FUNC_0( float64 a STATUS_PARAM )\n{",
"int64_t v;",
"uint32 res;",
"v = float64_to_int64(a STATUS_VAR);",
"if (v < 0) {",
"res = 0;",
"float_raise( float_flag_invalid STATUS_VAR);",
"} else if (v > 0xffffffff) {",
"res = 0xffffffff;",
"float_raise( float_flag_invalid STATUS_VAR);",
"} el... | [
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
]
] |
15,545 | static void virtio_gpu_handle_cursor(VirtIODevice *vdev, VirtQueue *vq)
{
VirtIOGPU *g = VIRTIO_GPU(vdev);
VirtQueueElement elem;
size_t s;
struct virtio_gpu_update_cursor cursor_info;
if (!virtio_queue_ready(vq)) {
return;
}
while (virtqueue_pop(vq, &elem)) {
s =... | false | qemu | 51b19ebe4320f3dcd93cea71235c1219318ddfd2 | static void virtio_gpu_handle_cursor(VirtIODevice *vdev, VirtQueue *vq)
{
VirtIOGPU *g = VIRTIO_GPU(vdev);
VirtQueueElement elem;
size_t s;
struct virtio_gpu_update_cursor cursor_info;
if (!virtio_queue_ready(vq)) {
return;
}
while (virtqueue_pop(vq, &elem)) {
s =... | {
"code": [],
"line_no": []
} | static void FUNC_0(VirtIODevice *VAR_0, VirtQueue *VAR_1)
{
VirtIOGPU *g = VIRTIO_GPU(VAR_0);
VirtQueueElement elem;
size_t s;
struct virtio_gpu_update_cursor VAR_2;
if (!virtio_queue_ready(VAR_1)) {
return;
}
while (virtqueue_pop(VAR_1, &elem)) {
s = iov_to_buf(e... | [
"static void FUNC_0(VirtIODevice *VAR_0, VirtQueue *VAR_1)\n{",
"VirtIOGPU *g = VIRTIO_GPU(VAR_0);",
"VirtQueueElement elem;",
"size_t s;",
"struct virtio_gpu_update_cursor VAR_2;",
"if (!virtio_queue_ready(VAR_1)) {",
"return;",
"}",
"while (virtqueue_pop(VAR_1, &elem)) {",
"s = iov_to_buf(elem.o... | [
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
],
[... |
15,546 | static int iscsi_truncate(BlockDriverState *bs, int64_t offset)
{
IscsiLun *iscsilun = bs->opaque;
Error *local_err = NULL;
if (iscsilun->type != TYPE_DISK) {
return -ENOTSUP;
}
iscsi_readcapacity_sync(iscsilun, &local_err);
if (local_err != NULL) {
error_free(local_... | false | qemu | e1123a3b40a1a9a625a29c8ed4debb7e206ea690 | static int iscsi_truncate(BlockDriverState *bs, int64_t offset)
{
IscsiLun *iscsilun = bs->opaque;
Error *local_err = NULL;
if (iscsilun->type != TYPE_DISK) {
return -ENOTSUP;
}
iscsi_readcapacity_sync(iscsilun, &local_err);
if (local_err != NULL) {
error_free(local_... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1)
{
IscsiLun *iscsilun = VAR_0->opaque;
Error *local_err = NULL;
if (iscsilun->type != TYPE_DISK) {
return -ENOTSUP;
}
iscsi_readcapacity_sync(iscsilun, &local_err);
if (local_err != NULL) {
error_free(local_err... | [
"static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1)\n{",
"IscsiLun *iscsilun = VAR_0->opaque;",
"Error *local_err = NULL;",
"if (iscsilun->type != TYPE_DISK) {",
"return -ENOTSUP;",
"}",
"iscsi_readcapacity_sync(iscsilun, &local_err);",
"if (local_err != NULL) {",
"error_free(local_err);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51... |
15,547 | static void save_native_fp_fxsave(CPUState *env)
{
struct fpxstate *fp = &fpx1;
int fptag, i, j;
uint16_t fpuc;
asm volatile ("fxsave %0" : : "m" (*fp));
env->fpuc = fp->fpuc;
env->fpstt = (fp->fpus >> 11) & 7;
env->fpus = fp->fpus & ~0x3800;
fptag = fp->fptag ^ 0xff;
for... | false | qemu | 4a1418e07bdcfaa3177739e04707ecaec75d89e1 | static void save_native_fp_fxsave(CPUState *env)
{
struct fpxstate *fp = &fpx1;
int fptag, i, j;
uint16_t fpuc;
asm volatile ("fxsave %0" : : "m" (*fp));
env->fpuc = fp->fpuc;
env->fpstt = (fp->fpus >> 11) & 7;
env->fpus = fp->fpus & ~0x3800;
fptag = fp->fptag ^ 0xff;
for... | {
"code": [],
"line_no": []
} | static void FUNC_0(CPUState *VAR_0)
{
struct fpxstate *VAR_1 = &fpx1;
int VAR_2, VAR_3, VAR_4;
uint16_t fpuc;
asm volatile ("fxsave %0" : : "m" (*VAR_1));
VAR_0->fpuc = VAR_1->fpuc;
VAR_0->fpstt = (VAR_1->fpus >> 11) & 7;
VAR_0->fpus = VAR_1->fpus & ~0x3800;
VAR_2 = VAR_1->VAR... | [
"static void FUNC_0(CPUState *VAR_0)\n{",
"struct fpxstate *VAR_1 = &fpx1;",
"int VAR_2, VAR_3, VAR_4;",
"uint16_t fpuc;",
"asm volatile (\"fxsave %0\" : : \"m\" (*VAR_1));",
"VAR_0->fpuc = VAR_1->fpuc;",
"VAR_0->fpstt = (VAR_1->fpus >> 11) & 7;",
"VAR_0->fpus = VAR_1->fpus & ~0x3800;",
"VAR_2 = VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
15,548 | static int vmdk_create(const char *filename, QemuOpts *opts, Error **errp)
{
int idx = 0;
BlockDriverState *new_bs = NULL;
Error *local_err = NULL;
char *desc = NULL;
int64_t total_size = 0, filesize;
char *adapter_type = NULL;
char *backing_file = NULL;
char *fmt = NULL;
i... | false | qemu | 1085daf9411e355ce3bd6d7034e23a8405599889 | static int vmdk_create(const char *filename, QemuOpts *opts, Error **errp)
{
int idx = 0;
BlockDriverState *new_bs = NULL;
Error *local_err = NULL;
char *desc = NULL;
int64_t total_size = 0, filesize;
char *adapter_type = NULL;
char *backing_file = NULL;
char *fmt = NULL;
i... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0, QemuOpts *VAR_1, Error **VAR_2)
{
int VAR_3 = 0;
BlockDriverState *new_bs = NULL;
Error *local_err = NULL;
char *VAR_4 = NULL;
int64_t total_size = 0, filesize;
char *VAR_5 = NULL;
char *VAR_6 = NULL;
char *VAR_7 = NULL;
int VAR_8 = 0;
... | [
"static int FUNC_0(const char *VAR_0, QemuOpts *VAR_1, Error **VAR_2)\n{",
"int VAR_3 = 0;",
"BlockDriverState *new_bs = NULL;",
"Error *local_err = NULL;",
"char *VAR_4 = NULL;",
"int64_t total_size = 0, filesize;",
"char *VAR_5 = NULL;",
"char *VAR_6 = NULL;",
"char *VAR_7 = NULL;",
"int VAR_8 =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
... |
15,551 | void bdrv_reset_dirty_bitmap(BdrvDirtyBitmap *bitmap,
int64_t cur_sector, int64_t nr_sectors)
{
assert(bdrv_dirty_bitmap_enabled(bitmap));
hbitmap_reset(bitmap->bitmap, cur_sector, nr_sectors);
}
| false | qemu | b64bd51efa9bbf30df1b2f91477d2805678d0b93 | void bdrv_reset_dirty_bitmap(BdrvDirtyBitmap *bitmap,
int64_t cur_sector, int64_t nr_sectors)
{
assert(bdrv_dirty_bitmap_enabled(bitmap));
hbitmap_reset(bitmap->bitmap, cur_sector, nr_sectors);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(BdrvDirtyBitmap *VAR_0,
int64_t VAR_1, int64_t VAR_2)
{
assert(bdrv_dirty_bitmap_enabled(VAR_0));
hbitmap_reset(VAR_0->VAR_0, VAR_1, VAR_2);
}
| [
"void FUNC_0(BdrvDirtyBitmap *VAR_0,\nint64_t VAR_1, int64_t VAR_2)\n{",
"assert(bdrv_dirty_bitmap_enabled(VAR_0));",
"hbitmap_reset(VAR_0->VAR_0, VAR_1, VAR_2);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
]
] |
15,553 | static int set_string(void *obj, const AVOption *o, const char *val, uint8_t **dst)
{
av_freep(dst);
*dst = av_strdup(val);
return 0;
}
| false | FFmpeg | b1306823d0b3ae998c8e10ad832004eb13bdd93e | static int set_string(void *obj, const AVOption *o, const char *val, uint8_t **dst)
{
av_freep(dst);
*dst = av_strdup(val);
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0, const AVOption *VAR_1, const char *VAR_2, uint8_t **VAR_3)
{
av_freep(VAR_3);
*VAR_3 = av_strdup(VAR_2);
return 0;
}
| [
"static int FUNC_0(void *VAR_0, const AVOption *VAR_1, const char *VAR_2, uint8_t **VAR_3)\n{",
"av_freep(VAR_3);",
"*VAR_3 = av_strdup(VAR_2);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
15,554 | static int mkv_write_native_codecprivate(AVFormatContext *s,
AVCodecParameters *par,
AVIOContext *dyn_cp)
{
switch (par->codec_id) {
case AV_CODEC_ID_VORBIS:
case AV_CODEC_ID_THEORA:
return put_xiph_codecpriv(s,... | false | FFmpeg | 7631f14bb35e8467d4ffaaa2b34e60614eb37c71 | static int mkv_write_native_codecprivate(AVFormatContext *s,
AVCodecParameters *par,
AVIOContext *dyn_cp)
{
switch (par->codec_id) {
case AV_CODEC_ID_VORBIS:
case AV_CODEC_ID_THEORA:
return put_xiph_codecpriv(s,... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0,
AVCodecParameters *VAR_1,
AVIOContext *VAR_2)
{
switch (VAR_1->codec_id) {
case AV_CODEC_ID_VORBIS:
case AV_CODEC_ID_THEORA:
return put_xiph_codecpriv(VAR_0, VAR_2, VAR_... | [
"static int FUNC_0(AVFormatContext *VAR_0,\nAVCodecParameters *VAR_1,\nAVIOContext *VAR_2)\n{",
"switch (VAR_1->codec_id) {",
"case AV_CODEC_ID_VORBIS:\ncase AV_CODEC_ID_THEORA:\nreturn put_xiph_codecpriv(VAR_0, VAR_2, VAR_1);",
"case AV_CODEC_ID_FLAC:\nreturn put_flac_codecpriv(VAR_0, VAR_2, VAR_1);",
"cas... | [
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
],
[
53,
55
... |
15,556 | static void set_cfg_value(bool is_max, int index, int value)
{
if (is_max) {
cfg.buckets[index].max = value;
} else {
cfg.buckets[index].avg = value;
}
} | true | qemu | 6f9b6d57ae3cd8a5f82e06f79d22e7a591116b5b | static void set_cfg_value(bool is_max, int index, int value)
{
if (is_max) {
cfg.buckets[index].max = value;
} else {
cfg.buckets[index].avg = value;
}
} | {
"code": [],
"line_no": []
} | static void FUNC_0(bool VAR_0, int VAR_1, int VAR_2)
{
if (VAR_0) {
cfg.buckets[VAR_1].max = VAR_2;
} else {
cfg.buckets[VAR_1].avg = VAR_2;
}
} | [
"static void FUNC_0(bool VAR_0, int VAR_1, int VAR_2)\n{",
"if (VAR_0) {",
"cfg.buckets[VAR_1].max = VAR_2;",
"} else {",
"cfg.buckets[VAR_1].avg = VAR_2;",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
15,557 | static int coroutine_fn mirror_iteration(MirrorBlockJob *s)
{
BlockDriverState *source = s->common.bs;
BlockDriverState *target = s->target;
QEMUIOVector qiov;
int ret, nb_sectors;
int64_t end;
struct iovec iov;
end = s->common.len >> BDRV_SECTOR_BITS;
s->sector_num = bdrv_get... | true | qemu | b952b5589a36114e06201c0d2e82c293dbad2b1f | static int coroutine_fn mirror_iteration(MirrorBlockJob *s)
{
BlockDriverState *source = s->common.bs;
BlockDriverState *target = s->target;
QEMUIOVector qiov;
int ret, nb_sectors;
int64_t end;
struct iovec iov;
end = s->common.len >> BDRV_SECTOR_BITS;
s->sector_num = bdrv_get... | {
"code": [
"static int coroutine_fn mirror_iteration(MirrorBlockJob *s)",
" return ret;",
" return bdrv_co_writev(target, s->sector_num, nb_sectors, &qiov);"
],
"line_no": [
1,
45,
49
]
} | static int VAR_0 mirror_iteration(MirrorBlockJob *s)
{
BlockDriverState *source = s->common.bs;
BlockDriverState *target = s->target;
QEMUIOVector qiov;
int ret, nb_sectors;
int64_t end;
struct iovec iov;
end = s->common.len >> BDRV_SECTOR_BITS;
s->sector_num = bdrv_get_next_d... | [
"static int VAR_0 mirror_iteration(MirrorBlockJob *s)\n{",
"BlockDriverState *source = s->common.bs;",
"BlockDriverState *target = s->target;",
"QEMUIOVector qiov;",
"int ret, nb_sectors;",
"int64_t end;",
"struct iovec iov;",
"end = s->common.len >> BDRV_SECTOR_BITS;",
"s->sector_num = bdrv_get_nex... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
15,558 | static void decode_rr_divide(CPUTriCoreState *env, DisasContext *ctx)
{
uint32_t op2;
int r1, r2, r3;
TCGv temp, temp2;
op2 = MASK_OP_RR_OP2(ctx->opcode);
r3 = MASK_OP_RR_D(ctx->opcode);
r2 = MASK_OP_RR_S2(ctx->opcode);
r1 = MASK_OP_RR_S1(ctx->opcode);
switch (op2) {
... | true | qemu | 2b9d09bb3c44de934de03864d56ddd8a38ed863a | static void decode_rr_divide(CPUTriCoreState *env, DisasContext *ctx)
{
uint32_t op2;
int r1, r2, r3;
TCGv temp, temp2;
op2 = MASK_OP_RR_OP2(ctx->opcode);
r3 = MASK_OP_RR_D(ctx->opcode);
r2 = MASK_OP_RR_S2(ctx->opcode);
r1 = MASK_OP_RR_S1(ctx->opcode);
switch (op2) {
... | {
"code": [
" TCGv temp, temp2;",
" tcg_gen_neg_tl(temp, cpu_gpr_d[r3+1]);",
" tcg_gen_movcond_tl(TCG_COND_LT, temp, cpu_gpr_d[r3+1], cpu_PSW_AV,",
" temp, cpu_gpr_d[r3+1]);",
" tcg_gen_shri_tl(temp, cpu_gpr_d[r1], 8);",
" tc... | static void FUNC_0(CPUTriCoreState *VAR_0, DisasContext *VAR_1)
{
uint32_t op2;
int VAR_2, VAR_3, VAR_4;
TCGv temp, temp2;
op2 = MASK_OP_RR_OP2(VAR_1->opcode);
VAR_4 = MASK_OP_RR_D(VAR_1->opcode);
VAR_3 = MASK_OP_RR_S2(VAR_1->opcode);
VAR_2 = MASK_OP_RR_S1(VAR_1->opcode);
... | [
"static void FUNC_0(CPUTriCoreState *VAR_0, DisasContext *VAR_1)\n{",
"uint32_t op2;",
"int VAR_2, VAR_3, VAR_4;",
"TCGv temp, temp2;",
"op2 = MASK_OP_RR_OP2(VAR_1->opcode);",
"VAR_4 = MASK_OP_RR_D(VAR_1->opcode);",
"VAR_3 = MASK_OP_RR_S2(VAR_1->opcode);",
"VAR_2 = MASK_OP_RR_S1(VAR_1->opcode);",
"s... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
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... | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27,
29
],
[
31
],
[
33,
35
],
[
37
],
[
39,
41,
43
],
[
45
],
[
47,
49
],
[
51
],
... |
15,559 | static int local_unlinkat(FsContext *ctx, V9fsPath *dir,
const char *name, int flags)
{
int ret;
V9fsString fullname;
char *buffer;
v9fs_string_init(&fullname);
v9fs_string_sprintf(&fullname, "%s/%s", dir->data, name);
if (ctx->export_flags & V9FS_SM_MAPPED_... | true | qemu | df4938a6651b1f980018f9eaf86af43e6b9d7fed | static int local_unlinkat(FsContext *ctx, V9fsPath *dir,
const char *name, int flags)
{
int ret;
V9fsString fullname;
char *buffer;
v9fs_string_init(&fullname);
v9fs_string_sprintf(&fullname, "%s/%s", dir->data, name);
if (ctx->export_flags & V9FS_SM_MAPPED_... | {
"code": [
" V9fsString fullname;",
" char *buffer;",
" v9fs_string_init(&fullname);",
" v9fs_string_sprintf(&fullname, \"%s/%s\", dir->data, name);",
" if (ctx->export_flags & V9FS_SM_MAPPED_FILE) {",
" if (flags == AT_REMOVEDIR) {",
" buffer = g_strdup_p... | static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,
const char *VAR_2, int VAR_3)
{
int VAR_4;
V9fsString fullname;
char *VAR_5;
v9fs_string_init(&fullname);
v9fs_string_sprintf(&fullname, "%s/%s", VAR_1->data, VAR_2);
if (VAR_0->export_flags & V9FS_SM_MAPP... | [
"static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,\nconst char *VAR_2, int VAR_3)\n{",
"int VAR_4;",
"V9fsString fullname;",
"char *VAR_5;",
"v9fs_string_init(&fullname);",
"v9fs_string_sprintf(&fullname, \"%s/%s\", VAR_1->data, VAR_2);",
"if (VAR_0->export_flags & V9FS_SM_MAPPED_FILE) {",
"if (VAR... | [
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
51
],
[
53
],
[
55
],
[
65
],
[
67
],
[
69
],
[
71
... |
15,560 | static uint64_t pl011_read(void *opaque, hwaddr offset,
unsigned size)
{
PL011State *s = (PL011State *)opaque;
uint32_t c;
if (offset >= 0xfe0 && offset < 0x1000) {
return s->id[(offset - 0xfe0) >> 2];
}
switch (offset >> 2) {
case 0: /* UARTDR */
... | true | qemu | ce8f0905a59232982c8a220169e11c14c73e7dea | static uint64_t pl011_read(void *opaque, hwaddr offset,
unsigned size)
{
PL011State *s = (PL011State *)opaque;
uint32_t c;
if (offset >= 0xfe0 && offset < 0x1000) {
return s->id[(offset - 0xfe0) >> 2];
}
switch (offset >> 2) {
case 0:
s->fl... | {
"code": [
" return 0;"
],
"line_no": [
59
]
} | static uint64_t FUNC_0(void *opaque, hwaddr offset,
unsigned size)
{
PL011State *s = (PL011State *)opaque;
uint32_t c;
if (offset >= 0xfe0 && offset < 0x1000) {
return s->id[(offset - 0xfe0) >> 2];
}
switch (offset >> 2) {
case 0:
s->flags ... | [
"static uint64_t FUNC_0(void *opaque, hwaddr offset,\nunsigned size)\n{",
"PL011State *s = (PL011State *)opaque;",
"uint32_t c;",
"if (offset >= 0xfe0 && offset < 0x1000) {",
"return s->id[(offset - 0xfe0) >> 2];",
"}",
"switch (offset >> 2) {",
"case 0:\ns->flags &= ~PL011_FLAG_RXFF;",
"c = s->read... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
... |
15,561 | static BlockAIOCB *inject_error(BlockDriverState *bs,
BlockCompletionFunc *cb, void *opaque, BlkdebugRule *rule)
{
BDRVBlkdebugState *s = bs->opaque;
int error = rule->options.inject.error;
struct BlkdebugAIOCB *acb;
QEMUBH *bh;
if (rule->options.inject.once) {
QSIMPLEQ_INIT(&s... | true | qemu | a069e2f1372a0a823ab506fc019852a2a652aa54 | static BlockAIOCB *inject_error(BlockDriverState *bs,
BlockCompletionFunc *cb, void *opaque, BlkdebugRule *rule)
{
BDRVBlkdebugState *s = bs->opaque;
int error = rule->options.inject.error;
struct BlkdebugAIOCB *acb;
QEMUBH *bh;
if (rule->options.inject.once) {
QSIMPLEQ_INIT(&s... | {
"code": [
" QSIMPLEQ_INIT(&s->active_rules);",
" if (rule->options.inject.immediately) {"
],
"line_no": [
19,
25
]
} | static BlockAIOCB *FUNC_0(BlockDriverState *bs,
BlockCompletionFunc *cb, void *opaque, BlkdebugRule *rule)
{
BDRVBlkdebugState *s = bs->opaque;
int VAR_0 = rule->options.inject.VAR_0;
struct BlkdebugAIOCB *VAR_1;
QEMUBH *bh;
if (rule->options.inject.once) {
QSIMPLEQ_INIT(&s->ac... | [
"static BlockAIOCB *FUNC_0(BlockDriverState *bs,\nBlockCompletionFunc *cb, void *opaque, BlkdebugRule *rule)\n{",
"BDRVBlkdebugState *s = bs->opaque;",
"int VAR_0 = rule->options.inject.VAR_0;",
"struct BlkdebugAIOCB *VAR_1;",
"QEMUBH *bh;",
"if (rule->options.inject.once) {",
"QSIMPLEQ_INIT(&s->active_... | [
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
]
] |
15,562 | static void colo_old_packet_check_one_conn(void *opaque,
void *user_data)
{
Connection *conn = opaque;
GList *result = NULL;
int64_t check_time = REGULAR_PACKET_CHECK_MS;
result = g_queue_find_custom(&conn->primary_list,
... | true | qemu | d25a7dabf242163ce95b60f6f75cf017b1715d55 | static void colo_old_packet_check_one_conn(void *opaque,
void *user_data)
{
Connection *conn = opaque;
GList *result = NULL;
int64_t check_time = REGULAR_PACKET_CHECK_MS;
result = g_queue_find_custom(&conn->primary_list,
... | {
"code": [
"static void colo_old_packet_check_one_conn(void *opaque,",
" void *user_data)",
" Connection *conn = opaque;"
],
"line_no": [
1,
3,
7
]
} | static void FUNC_0(void *VAR_0,
void *VAR_1)
{
Connection *conn = VAR_0;
GList *result = NULL;
int64_t check_time = REGULAR_PACKET_CHECK_MS;
result = g_queue_find_custom(&conn->primary_list,
&check_time,
... | [
"static void FUNC_0(void *VAR_0,\nvoid *VAR_1)\n{",
"Connection *conn = VAR_0;",
"GList *result = NULL;",
"int64_t check_time = REGULAR_PACKET_CHECK_MS;",
"result = g_queue_find_custom(&conn->primary_list,\n&check_time,\n(GCompareFunc)colo_old_packet_check_one);",
"if (result) {",
"}",
"}"
] | [
1,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15,
17,
19
],
[
23
],
[
29
],
[
31
]
] |
15,563 | int bdrv_open(BlockDriverState *bs, const char *filename, int snapshot)
{
int fd;
int64_t size;
struct cow_header_v2 cow_header;
#ifndef _WIN32
char template[] = "/tmp/vl.XXXXXX";
int cow_fd;
struct stat st;
#endif
bs->read_only = 0;
bs->fd = -1;
bs->cow_fd = -1;
b... | true | qemu | eba2af633fb8fa3b20ad578184d79e1f0eabcefe | int bdrv_open(BlockDriverState *bs, const char *filename, int snapshot)
{
int fd;
int64_t size;
struct cow_header_v2 cow_header;
#ifndef _WIN32
char template[] = "/tmp/vl.XXXXXX";
int cow_fd;
struct stat st;
#endif
bs->read_only = 0;
bs->fd = -1;
bs->cow_fd = -1;
b... | {
"code": [
" strcpy(bs->filename, filename);"
],
"line_no": [
31
]
} | int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1, int VAR_2)
{
int VAR_3;
int64_t size;
struct cow_header_v2 VAR_4;
#ifndef _WIN32
char VAR_5[] = "/tmp/vl.XXXXXX";
int VAR_6;
struct stat VAR_7;
#endif
VAR_0->read_only = 0;
VAR_0->VAR_3 = -1;
VAR_0->VAR_6 = -1;
... | [
"int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1, int VAR_2)\n{",
"int VAR_3;",
"int64_t size;",
"struct cow_header_v2 VAR_4;",
"#ifndef _WIN32\nchar VAR_5[] = \"/tmp/vl.XXXXXX\";",
"int VAR_6;",
"struct stat VAR_7;",
"#endif\nVAR_0->read_only = 0;",
"VAR_0->VAR_3 = -1;",
"VAR_0->VAR_6 = -1;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
],
[
17
],
[
19,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
37,
39
],
[
41,
43
],
[
45,
47
],
[
51,
53
],
[
55,... |
15,564 | static void ehci_detach(USBPort *port)
{
EHCIState *s = port->opaque;
uint32_t *portsc = &s->portsc[port->index];
const char *owner = (*portsc & PORTSC_POWNER) ? "comp" : "ehci";
trace_usb_ehci_port_detach(port->index, owner);
if (*portsc & PORTSC_POWNER) {
USBPort *companion = s-... | true | qemu | cbf82fa01e6fd4ecb234b235b10ffce548154a95 | static void ehci_detach(USBPort *port)
{
EHCIState *s = port->opaque;
uint32_t *portsc = &s->portsc[port->index];
const char *owner = (*portsc & PORTSC_POWNER) ? "comp" : "ehci";
trace_usb_ehci_port_detach(port->index, owner);
if (*portsc & PORTSC_POWNER) {
USBPort *companion = s-... | {
"code": [
" *portsc &= ~(PORTSC_CONNECT|PORTSC_PED);"
],
"line_no": [
47
]
} | static void FUNC_0(USBPort *VAR_0)
{
EHCIState *s = VAR_0->opaque;
uint32_t *portsc = &s->portsc[VAR_0->index];
const char *VAR_1 = (*portsc & PORTSC_POWNER) ? "comp" : "ehci";
trace_usb_ehci_port_detach(VAR_0->index, VAR_1);
if (*portsc & PORTSC_POWNER) {
USBPort *companion = s->... | [
"static void FUNC_0(USBPort *VAR_0)\n{",
"EHCIState *s = VAR_0->opaque;",
"uint32_t *portsc = &s->portsc[VAR_0->index];",
"const char *VAR_1 = (*portsc & PORTSC_POWNER) ? \"comp\" : \"ehci\";",
"trace_usb_ehci_port_detach(VAR_0->index, VAR_1);",
"if (*portsc & PORTSC_POWNER) {",
"USBPort *companion = s-... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
47
],
[
49
],
[
53
],
[
55
]
] |
15,565 | static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint8_t *s = src;
const uint8_t *end;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
mm_end = end - 15;
#if 1 //is faster only if multiplies ar... | true | FFmpeg | 6e42e6c4b410dbef8b593c2d796a5dad95f89ee4 | static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint8_t *s = src;
const uint8_t *end;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
mm_end = end - 15;
#if 1
asm volatile(
"movq %3, %%m... | {
"code": [
"\twhile(s < end)",
"\twhile(s < end)",
"\twhile(s < end)",
"\twhile(s < end)",
"#ifdef HAVE_MMX",
"#endif",
"#ifdef HAVE_MMX",
"#endif",
"#else",
"#endif",
"#endif",
"\t__asm __volatile(",
"\t\t\"movq\t%%mm0, %%mm1\\n\\t\"",
"\t\tMOVNTQ\"\t%%mm0, %0... | static inline void FUNC_0(rgb32to15)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint8_t *VAR_0 = src;
const uint8_t *VAR_1;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
uint16_t *d = (uint16_t *)dst;
VAR_1 = VAR_0 + src_size;
#ifdef HAVE_MMX
mm_end = VAR_1 - 15;
#if 1
asm volatile(
... | [
"static inline void FUNC_0(rgb32to15)(const uint8_t *src, uint8_t *dst, long src_size)\n{",
"const uint8_t *VAR_0 = src;",
"const uint8_t *VAR_1;",
"#ifdef HAVE_MMX\nconst uint8_t *mm_end;",
"#endif\nuint16_t *d = (uint16_t *)dst;",
"VAR_1 = VAR_0 + src_size;",
"#ifdef HAVE_MMX\nmm_end = VAR_1 - 15;",
... | [
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13,
15
],
[
17
],
[
19,
21
],
[
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,
61,
63,
65,... |
15,566 | PPC_OP(tlbie)
{
do_tlbie();
RETURN();
}
| true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | PPC_OP(tlbie)
{
do_tlbie();
RETURN();
}
| {
"code": [
" RETURN();",
"PPC_OP(tlbie)",
" RETURN();"
],
"line_no": [
7,
1,
7
]
} | FUNC_0(VAR_0)
{
do_tlbie();
RETURN();
}
| [
"FUNC_0(VAR_0)\n{",
"do_tlbie();",
"RETURN();",
"}"
] | [
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
15,568 | static int avs_probe(AVProbeData * p)
{
const uint8_t *d;
if (p->buf_size < 2)
return 0;
d = p->buf;
if (d[0] == 'w' && d[1] == 'W' && d[2] == 0x10 && d[3] == 0)
return 50;
return 0;
}
| false | FFmpeg | 87e8788680e16c51f6048af26f3f7830c35207a5 | static int avs_probe(AVProbeData * p)
{
const uint8_t *d;
if (p->buf_size < 2)
return 0;
d = p->buf;
if (d[0] == 'w' && d[1] == 'W' && d[2] == 0x10 && d[3] == 0)
return 50;
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(AVProbeData * VAR_0)
{
const uint8_t *VAR_1;
if (VAR_0->buf_size < 2)
return 0;
VAR_1 = VAR_0->buf;
if (VAR_1[0] == 'w' && VAR_1[1] == 'W' && VAR_1[2] == 0x10 && VAR_1[3] == 0)
return 50;
return 0;
}
| [
"static int FUNC_0(AVProbeData * VAR_0)\n{",
"const uint8_t *VAR_1;",
"if (VAR_0->buf_size < 2)\nreturn 0;",
"VAR_1 = VAR_0->buf;",
"if (VAR_1[0] == 'w' && VAR_1[1] == 'W' && VAR_1[2] == 0x10 && VAR_1[3] == 0)\nreturn 50;",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
],
[
15,
17
],
[
21
],
[
23
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.