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 |
|---|---|---|---|---|---|---|---|---|---|---|
7,210 | void os_mem_prealloc(int fd, char *area, size_t memory)
{
int ret;
struct sigaction act, oldact;
sigset_t set, oldset;
memset(&act, 0, sizeof(act));
act.sa_handler = &sigbus_handler;
act.sa_flags = 0;
ret = sigaction(SIGBUS, &act, &oldact);
if (ret) {
perror("os_mem... | false | qemu | 7197fb4058bcb68986bae2bb2c04d6370f3e7218 | void os_mem_prealloc(int fd, char *area, size_t memory)
{
int ret;
struct sigaction act, oldact;
sigset_t set, oldset;
memset(&act, 0, sizeof(act));
act.sa_handler = &sigbus_handler;
act.sa_flags = 0;
ret = sigaction(SIGBUS, &act, &oldact);
if (ret) {
perror("os_mem... | {
"code": [],
"line_no": []
} | void FUNC_0(int VAR_0, char *VAR_1, size_t VAR_2)
{
int VAR_3;
struct sigaction VAR_4, VAR_5;
sigset_t set, oldset;
memset(&VAR_4, 0, sizeof(VAR_4));
VAR_4.sa_handler = &sigbus_handler;
VAR_4.sa_flags = 0;
VAR_3 = sigaction(SIGBUS, &VAR_4, &VAR_5);
if (VAR_3) {
perr... | [
"void FUNC_0(int VAR_0, char *VAR_1, size_t VAR_2)\n{",
"int VAR_3;",
"struct sigaction VAR_4, VAR_5;",
"sigset_t set, oldset;",
"memset(&VAR_4, 0, sizeof(VAR_4));",
"VAR_4.sa_handler = &sigbus_handler;",
"VAR_4.sa_flags = 0;",
"VAR_3 = sigaction(SIGBUS, &VAR_4, &VAR_5);",
"if (VAR_3) {",
"perror(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[... |
7,212 | int usb_handle_packet(USBDevice *dev, USBPacket *p)
{
int ret;
if (dev == NULL) {
return USB_RET_NODEV;
}
assert(dev->addr == p->devaddr);
assert(dev->state == USB_STATE_DEFAULT);
assert(p->state == USB_PACKET_SETUP);
if (p->devep == 0) {
/* control pipe */
... | false | qemu | 079d0b7f1eedcc634c371fe05b617fdc55c8b762 | int usb_handle_packet(USBDevice *dev, USBPacket *p)
{
int ret;
if (dev == NULL) {
return USB_RET_NODEV;
}
assert(dev->addr == p->devaddr);
assert(dev->state == USB_STATE_DEFAULT);
assert(p->state == USB_PACKET_SETUP);
if (p->devep == 0) {
switch (p->pi... | {
"code": [],
"line_no": []
} | int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)
{
int VAR_2;
if (VAR_0 == NULL) {
return USB_RET_NODEV;
}
assert(VAR_0->addr == VAR_1->devaddr);
assert(VAR_0->state == USB_STATE_DEFAULT);
assert(VAR_1->state == USB_PACKET_SETUP);
if (VAR_1->devep == 0) {
... | [
"int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)\n{",
"int VAR_2;",
"if (VAR_0 == NULL) {",
"return USB_RET_NODEV;",
"}",
"assert(VAR_0->addr == VAR_1->devaddr);",
"assert(VAR_0->state == USB_STATE_DEFAULT);",
"assert(VAR_1->state == USB_PACKET_SETUP);",
"if (VAR_1->devep == 0) {",
"switch (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
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47,
49
],
[
51... |
7,214 | build_rsdp(GArray *rsdp_table, BIOSLinker *linker, unsigned rsdt_tbl_offset)
{
AcpiRsdpDescriptor *rsdp = acpi_data_push(rsdp_table, sizeof *rsdp);
unsigned rsdt_pa_size = sizeof(rsdp->rsdt_physical_address);
unsigned rsdt_pa_offset =
(char *)&rsdp->rsdt_physical_address - rsdp_table->data;
... | false | qemu | 28213cb6a61a724e2cb1e3a76d2bb17aa0ce9b36 | build_rsdp(GArray *rsdp_table, BIOSLinker *linker, unsigned rsdt_tbl_offset)
{
AcpiRsdpDescriptor *rsdp = acpi_data_push(rsdp_table, sizeof *rsdp);
unsigned rsdt_pa_size = sizeof(rsdp->rsdt_physical_address);
unsigned rsdt_pa_offset =
(char *)&rsdp->rsdt_physical_address - rsdp_table->data;
... | {
"code": [],
"line_no": []
} | FUNC_0(GArray *VAR_0, BIOSLinker *VAR_1, unsigned VAR_2)
{
AcpiRsdpDescriptor *rsdp = acpi_data_push(VAR_0, sizeof *rsdp);
unsigned VAR_3 = sizeof(rsdp->rsdt_physical_address);
unsigned VAR_4 =
(char *)&rsdp->rsdt_physical_address - VAR_0->data;
bios_linker_loader_alloc(VAR_1, ACPI_BUILD... | [
"FUNC_0(GArray *VAR_0, BIOSLinker *VAR_1, unsigned VAR_2)\n{",
"AcpiRsdpDescriptor *rsdp = acpi_data_push(VAR_0, sizeof *rsdp);",
"unsigned VAR_3 = sizeof(rsdp->rsdt_physical_address);",
"unsigned VAR_4 =\n(char *)&rsdp->rsdt_physical_address - VAR_0->data;",
"bios_linker_loader_alloc(VAR_1, ACPI_BUILD_RSDP... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
15,
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
33,
35,
37
],
[
41
],
[
45,
47,
49
],
[
53
],
[
55
]
] |
7,215 | static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s)
{
uint32_t cmd = s->fifo[CMD(stop) >> 2];
s->cmd->stop = cpu_to_le32(CMD(stop) + 4);
if (CMD(stop) >= CMD(max))
s->cmd->stop = s->cmd->min;
return cmd;
}
| false | qemu | 0d7937974cd0504f30ad483c3368b21da426ddf9 | static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s)
{
uint32_t cmd = s->fifo[CMD(stop) >> 2];
s->cmd->stop = cpu_to_le32(CMD(stop) + 4);
if (CMD(stop) >= CMD(max))
s->cmd->stop = s->cmd->min;
return cmd;
}
| {
"code": [],
"line_no": []
} | static inline uint32_t FUNC_0(struct vmsvga_state_s *s)
{
uint32_t cmd = s->fifo[CMD(stop) >> 2];
s->cmd->stop = cpu_to_le32(CMD(stop) + 4);
if (CMD(stop) >= CMD(max))
s->cmd->stop = s->cmd->min;
return cmd;
}
| [
"static inline uint32_t FUNC_0(struct vmsvga_state_s *s)\n{",
"uint32_t cmd = s->fifo[CMD(stop) >> 2];",
"s->cmd->stop = cpu_to_le32(CMD(stop) + 4);",
"if (CMD(stop) >= CMD(max))\ns->cmd->stop = s->cmd->min;",
"return cmd;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13
],
[
15
]
] |
7,216 | static void rv40_loop_filter(RV34DecContext *r, int row)
{
MpegEncContext *s = &r->s;
int mb_pos, mb_x;
int i, j, k;
uint8_t *Y, *C;
int alpha, beta, betaY, betaC;
int q;
int mbtype[4]; ///< current macroblock and its neighbours types
/**
* flags indicating that macroblo... | false | FFmpeg | d8edf1b515ae9fbcea2103305241d130c16e1003 | static void rv40_loop_filter(RV34DecContext *r, int row)
{
MpegEncContext *s = &r->s;
int mb_pos, mb_x;
int i, j, k;
uint8_t *Y, *C;
int alpha, beta, betaY, betaC;
int q;
int mbtype[4];
int mb_strong[4];
int clip[4];
int cbp[4];
... | {
"code": [],
"line_no": []
} | static void FUNC_0(RV34DecContext *VAR_0, int VAR_1)
{
MpegEncContext *s = &VAR_0->s;
int VAR_2, VAR_3;
int VAR_4, VAR_5, VAR_6;
uint8_t *Y, *C;
int VAR_7, VAR_8, VAR_9, VAR_10;
int VAR_11;
int VAR_12[4];
int VAR_13[4];
int VAR_14[4];
... | [
"static void FUNC_0(RV34DecContext *VAR_0, int VAR_1)\n{",
"MpegEncContext *s = &VAR_0->s;",
"int VAR_2, VAR_3;",
"int VAR_4, VAR_5, VAR_6;",
"uint8_t *Y, *C;",
"int VAR_7, VAR_8, VAR_9, VAR_10;",
"int VAR_11;",
"int VAR_12[4];",
"int VAR_13[4];",
"int VAR_14[4];",
"int VAR_15[4];",
"int VAR_1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
27
],
[
29
],
[
43
],
[
53
],
[
65
],
[
69
],
[
71
],
[
73
],
[
75,
77
],
[
79,
81
],
[
83
... |
7,217 | static void bdrv_replace_child(BdrvChild *child, BlockDriverState *new_bs)
{
BlockDriverState *old_bs = child->bs;
if (old_bs) {
if (old_bs->quiesce_counter && child->role->drained_end) {
child->role->drained_end(child);
}
QLIST_REMOVE(child, next_parent);
}
... | false | qemu | 33a610c398603efafd954c706ba07850835a5098 | static void bdrv_replace_child(BdrvChild *child, BlockDriverState *new_bs)
{
BlockDriverState *old_bs = child->bs;
if (old_bs) {
if (old_bs->quiesce_counter && child->role->drained_end) {
child->role->drained_end(child);
}
QLIST_REMOVE(child, next_parent);
}
... | {
"code": [],
"line_no": []
} | static void FUNC_0(BdrvChild *VAR_0, BlockDriverState *VAR_1)
{
BlockDriverState *old_bs = VAR_0->bs;
if (old_bs) {
if (old_bs->quiesce_counter && VAR_0->role->drained_end) {
VAR_0->role->drained_end(VAR_0);
}
QLIST_REMOVE(VAR_0, next_parent);
}
VAR_0->bs... | [
"static void FUNC_0(BdrvChild *VAR_0, BlockDriverState *VAR_1)\n{",
"BlockDriverState *old_bs = VAR_0->bs;",
"if (old_bs) {",
"if (old_bs->quiesce_counter && VAR_0->role->drained_end) {",
"VAR_0->role->drained_end(VAR_0);",
"}",
"QLIST_REMOVE(VAR_0, next_parent);",
"}",
"VAR_0->bs = VAR_1;",
"if (... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
7,219 | void qemu_ram_free(ram_addr_t addr)
{
RAMBlock *block;
/* This assumes the iothread lock is taken here too. */
qemu_mutex_lock_ramlist();
QTAILQ_FOREACH(block, &ram_list.blocks, next) {
if (addr == block->offset) {
QTAILQ_REMOVE(&ram_list.blocks, block, next);
... | false | qemu | 3435f39513a104294b5e3bbf3612047028d25cfc | void qemu_ram_free(ram_addr_t addr)
{
RAMBlock *block;
qemu_mutex_lock_ramlist();
QTAILQ_FOREACH(block, &ram_list.blocks, next) {
if (addr == block->offset) {
QTAILQ_REMOVE(&ram_list.blocks, block, next);
ram_list.mru_block = NULL;
ram_list.version... | {
"code": [],
"line_no": []
} | void FUNC_0(ram_addr_t VAR_0)
{
RAMBlock *block;
qemu_mutex_lock_ramlist();
QTAILQ_FOREACH(block, &ram_list.blocks, next) {
if (VAR_0 == block->offset) {
QTAILQ_REMOVE(&ram_list.blocks, block, next);
ram_list.mru_block = NULL;
ram_list.version++;
... | [
"void FUNC_0(ram_addr_t VAR_0)\n{",
"RAMBlock *block;",
"qemu_mutex_lock_ramlist();",
"QTAILQ_FOREACH(block, &ram_list.blocks, next) {",
"if (VAR_0 == block->offset) {",
"QTAILQ_REMOVE(&ram_list.blocks, block, next);",
"ram_list.mru_block = NULL;",
"ram_list.version++;",
"if (block->flags & RAM_PREA... | [
0,
0,
0,
0,
0,
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
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
... |
7,220 | static int block_job_finish_sync(BlockJob *job,
void (*finish)(BlockJob *, Error **errp),
Error **errp)
{
BlockDriverState *bs = job->bs;
Error *local_err = NULL;
int ret;
assert(bs->job == job);
block_job_ref(job);
f... | false | qemu | 794f01414f9f4c4d0c6f1961154674961941c197 | static int block_job_finish_sync(BlockJob *job,
void (*finish)(BlockJob *, Error **errp),
Error **errp)
{
BlockDriverState *bs = job->bs;
Error *local_err = NULL;
int ret;
assert(bs->job == job);
block_job_ref(job);
f... | {
"code": [],
"line_no": []
} | VAR_2staticVAR_2 VAR_2intVAR_2 VAR_2block_job_finish_syncVAR_2(VAR_2BlockJobVAR_2 *VAR_2VAR_0VAR_2,
VAR_2voidVAR_2 (*VAR_2VAR_1VAR_2)(VAR_2BlockJobVAR_2 *, VAR_2ErrorVAR_2 **VAR_2errpVAR_2),
VAR_2ErrorVAR_2 **VAR_2errpVAR_2)
{
VAR_2BlockDriverSta... | [
"VAR_2staticVAR_2 VAR_2intVAR_2 VAR_2block_job_finish_syncVAR_2(VAR_2BlockJobVAR_2 *VAR_2VAR_0VAR_2,\nVAR_2voidVAR_2 (*VAR_2VAR_1VAR_2)(VAR_2BlockJobVAR_2 *, VAR_2ErrorVAR_2 **VAR_2errpVAR_2),\nVAR_2ErrorVAR_2 **VAR_2errpVAR_2)\n{",
"VAR_2BlockDriverStateVAR_2 *VAR_2bsVAR_2 = VAR_2VAR_0VAR_2->VAR_2bsVAR_2;",
"V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
7,221 | static uint32_t vmdk_read_cid(BlockDriverState *bs, int parent)
{
char desc[DESC_SIZE];
uint32_t cid;
const char *p_name, *cid_str;
size_t cid_str_size;
BDRVVmdkState *s = bs->opaque;
if (bdrv_pread(bs->file, s->desc_offset, desc, DESC_SIZE) != DESC_SIZE) {
return 0;
}
... | false | qemu | ae261c86aaed62e7acddafab8262a2bf286d40b7 | static uint32_t vmdk_read_cid(BlockDriverState *bs, int parent)
{
char desc[DESC_SIZE];
uint32_t cid;
const char *p_name, *cid_str;
size_t cid_str_size;
BDRVVmdkState *s = bs->opaque;
if (bdrv_pread(bs->file, s->desc_offset, desc, DESC_SIZE) != DESC_SIZE) {
return 0;
}
... | {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(BlockDriverState *bs, int parent)
{
char VAR_0[DESC_SIZE];
uint32_t cid;
const char *VAR_1, *VAR_2;
size_t cid_str_size;
BDRVVmdkState *s = bs->opaque;
if (bdrv_pread(bs->file, s->desc_offset, VAR_0, DESC_SIZE) != DESC_SIZE) {
return 0;
}
if (... | [
"static uint32_t FUNC_0(BlockDriverState *bs, int parent)\n{",
"char VAR_0[DESC_SIZE];",
"uint32_t cid;",
"const char *VAR_1, *VAR_2;",
"size_t cid_str_size;",
"BDRVVmdkState *s = bs->opaque;",
"if (bdrv_pread(bs->file, s->desc_offset, VAR_0, DESC_SIZE) != DESC_SIZE) {",
"return 0;",
"}",
"if (par... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
... |
7,223 | int qemu_chr_fe_ioctl(CharDriverState *s, int cmd, void *arg)
{
if (!s->chr_ioctl)
return -ENOTSUP;
return s->chr_ioctl(s, cmd, arg);
}
| false | qemu | 33577b47c64435fcc2a1bc01c7e82534256f1fc3 | int qemu_chr_fe_ioctl(CharDriverState *s, int cmd, void *arg)
{
if (!s->chr_ioctl)
return -ENOTSUP;
return s->chr_ioctl(s, cmd, arg);
}
| {
"code": [],
"line_no": []
} | int FUNC_0(CharDriverState *VAR_0, int VAR_1, void *VAR_2)
{
if (!VAR_0->chr_ioctl)
return -ENOTSUP;
return VAR_0->chr_ioctl(VAR_0, VAR_1, VAR_2);
}
| [
"int FUNC_0(CharDriverState *VAR_0, int VAR_1, void *VAR_2)\n{",
"if (!VAR_0->chr_ioctl)\nreturn -ENOTSUP;",
"return VAR_0->chr_ioctl(VAR_0, VAR_1, VAR_2);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
]
] |
7,224 | static void e1000_pre_save(void *opaque)
{
E1000State *s = opaque;
NetClientState *nc = qemu_get_queue(s->nic);
/* If the mitigation timer is active, emulate a timeout now. */
if (s->mit_timer_on) {
e1000_mit_timer(s);
}
/*
* If link is down and auto-negotiation is supp... | false | qemu | d7a4155265416a1c8f3067b59e68bf5fda1d6215 | static void e1000_pre_save(void *opaque)
{
E1000State *s = opaque;
NetClientState *nc = qemu_get_queue(s->nic);
if (s->mit_timer_on) {
e1000_mit_timer(s);
}
if (nc->link_down &&
s->compat_flags & E1000_FLAG_AUTONEG &&
s->phy_reg[PHY_CTRL] & MI... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
E1000State *s = VAR_0;
NetClientState *nc = qemu_get_queue(s->nic);
if (s->mit_timer_on) {
e1000_mit_timer(s);
}
if (nc->link_down &&
s->compat_flags & E1000_FLAG_AUTONEG &&
s->phy_reg[PHY_CTRL] & MII_CR_AUTO_... | [
"static void FUNC_0(void *VAR_0)\n{",
"E1000State *s = VAR_0;",
"NetClientState *nc = qemu_get_queue(s->nic);",
"if (s->mit_timer_on) {",
"e1000_mit_timer(s);",
"}",
"if (nc->link_down &&\ns->compat_flags & E1000_FLAG_AUTONEG &&\ns->phy_reg[PHY_CTRL] & MII_CR_AUTO_NEG_EN &&\ns->phy_reg[PHY_CTRL] & MII_C... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
15
],
[
17
],
[
31,
33,
35,
37
],
[
39
],
[
41
],
[
43
]
] |
7,225 | START_TEST(invalid_array_comma)
{
QObject *obj = qobject_from_json("[32,}");
fail_unless(obj == NULL);
}
| false | qemu | ef76dc59fa5203d146a2acf85a0ad5a5971a4824 | START_TEST(invalid_array_comma)
{
QObject *obj = qobject_from_json("[32,}");
fail_unless(obj == NULL);
}
| {
"code": [],
"line_no": []
} | FUNC_0(VAR_0)
{
QObject *obj = qobject_from_json("[32,}");
fail_unless(obj == NULL);
}
| [
"FUNC_0(VAR_0)\n{",
"QObject *obj = qobject_from_json(\"[32,}\");",
"fail_unless(obj == NULL);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
7,226 | static void handle_control_message(VirtIOSerial *vser, void *buf, size_t len)
{
struct VirtIOSerialPort *port;
struct virtio_console_control cpkt, *gcpkt;
uint8_t *buffer;
size_t buffer_len;
gcpkt = buf;
if (len < sizeof(cpkt)) {
/* The guest sent an invalid control packet */... | false | qemu | 2a3d57ce4278dfd898d8b5639ace21fa4a4fb9bd | static void handle_control_message(VirtIOSerial *vser, void *buf, size_t len)
{
struct VirtIOSerialPort *port;
struct virtio_console_control cpkt, *gcpkt;
uint8_t *buffer;
size_t buffer_len;
gcpkt = buf;
if (len < sizeof(cpkt)) {
return;
}
cpkt.event = l... | {
"code": [],
"line_no": []
} | static void FUNC_0(VirtIOSerial *VAR_0, void *VAR_1, size_t VAR_2)
{
struct VirtIOSerialPort *VAR_3;
struct virtio_console_control VAR_4, *VAR_5;
uint8_t *buffer;
size_t buffer_len;
VAR_5 = VAR_1;
if (VAR_2 < sizeof(VAR_4)) {
return;
}
VAR_4.event = lduw... | [
"static void FUNC_0(VirtIOSerial *VAR_0, void *VAR_1, size_t VAR_2)\n{",
"struct VirtIOSerialPort *VAR_3;",
"struct virtio_console_control VAR_4, *VAR_5;",
"uint8_t *buffer;",
"size_t buffer_len;",
"VAR_5 = VAR_1;",
"if (VAR_2 < sizeof(VAR_4)) {",
"return;",
"}",
"VAR_4.event = lduw_p(&VAR_5->even... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37,
39
],
[
43
],
[
45,
47
],
[
49,
51
],
[
53
],
[
55
],
[... |
7,227 | static int mov_write_stbl_tag(ByteIOContext *pb, MOVTrack* track)
{
offset_t pos = url_ftell(pb);
put_be32(pb, 0); /* size */
put_tag(pb, "stbl");
mov_write_stsd_tag(pb, track);
mov_write_stts_tag(pb, track);
if (track->enc->codec_type == CODEC_TYPE_VIDEO &&
track->hasKeyframes <... | false | FFmpeg | b371539a3d9be9b05cb9ea8065e8e3617a45b02f | static int mov_write_stbl_tag(ByteIOContext *pb, MOVTrack* track)
{
offset_t pos = url_ftell(pb);
put_be32(pb, 0);
put_tag(pb, "stbl");
mov_write_stsd_tag(pb, track);
mov_write_stts_tag(pb, track);
if (track->enc->codec_type == CODEC_TYPE_VIDEO &&
track->hasKeyframes < track->en... | {
"code": [],
"line_no": []
} | static int FUNC_0(ByteIOContext *VAR_0, MOVTrack* VAR_1)
{
offset_t pos = url_ftell(VAR_0);
put_be32(VAR_0, 0);
put_tag(VAR_0, "stbl");
mov_write_stsd_tag(VAR_0, VAR_1);
mov_write_stts_tag(VAR_0, VAR_1);
if (VAR_1->enc->codec_type == CODEC_TYPE_VIDEO &&
VAR_1->hasKeyframes < VAR... | [
"static int FUNC_0(ByteIOContext *VAR_0, MOVTrack* VAR_1)\n{",
"offset_t pos = url_ftell(VAR_0);",
"put_be32(VAR_0, 0);",
"put_tag(VAR_0, \"stbl\");",
"mov_write_stsd_tag(VAR_0, VAR_1);",
"mov_write_stts_tag(VAR_0, VAR_1);",
"if (VAR_1->enc->codec_type == CODEC_TYPE_VIDEO &&\nVAR_1->hasKeyframes < VAR_1... | [
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
]
] |
7,228 | static void gen_mtpr(int rb, int regno)
{
TCGv tmp;
int data;
if (rb == 31) {
tmp = tcg_const_i64(0);
} else {
tmp = cpu_ir[rb];
}
/* The basic registers are data only, and unknown registers
are read-zero, write-ignore. */
data = cpu_pr_data(regno);
... | false | qemu | 3b4fefd6e65a7bdb994d10a9fa36c19b5749b502 | static void gen_mtpr(int rb, int regno)
{
TCGv tmp;
int data;
if (rb == 31) {
tmp = tcg_const_i64(0);
} else {
tmp = cpu_ir[rb];
}
data = cpu_pr_data(regno);
if (data != 0) {
if (data & PR_BYTE) {
tcg_gen_st8_i64(tmp, cpu_env, data ... | {
"code": [],
"line_no": []
} | static void FUNC_0(int VAR_0, int VAR_1)
{
TCGv tmp;
int VAR_2;
if (VAR_0 == 31) {
tmp = tcg_const_i64(0);
} else {
tmp = cpu_ir[VAR_0];
}
VAR_2 = cpu_pr_data(VAR_1);
if (VAR_2 != 0) {
if (VAR_2 & PR_BYTE) {
tcg_gen_st8_i64(tmp, cpu... | [
"static void FUNC_0(int VAR_0, int VAR_1)\n{",
"TCGv tmp;",
"int VAR_2;",
"if (VAR_0 == 31) {",
"tmp = tcg_const_i64(0);",
"} else {",
"tmp = cpu_ir[VAR_0];",
"}",
"VAR_2 = cpu_pr_data(VAR_1);",
"if (VAR_2 != 0) {",
"if (VAR_2 & PR_BYTE) {",
"tcg_gen_st8_i64(tmp, cpu_env, VAR_2 & ~PR_BYTE);",
... | [
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
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51... |
7,229 | void qemu_unregister_reset(QEMUResetHandler *func, void *opaque)
{
QEMUResetEntry *re;
TAILQ_FOREACH(re, &reset_handlers, entry) {
if (re->func == func && re->opaque == opaque) {
TAILQ_REMOVE(&reset_handlers, re, entry);
qemu_free(re);
return;
}
... | false | qemu | 72cf2d4f0e181d0d3a3122e04129c58a95da713e | void qemu_unregister_reset(QEMUResetHandler *func, void *opaque)
{
QEMUResetEntry *re;
TAILQ_FOREACH(re, &reset_handlers, entry) {
if (re->func == func && re->opaque == opaque) {
TAILQ_REMOVE(&reset_handlers, re, entry);
qemu_free(re);
return;
}
... | {
"code": [],
"line_no": []
} | void FUNC_0(QEMUResetHandler *VAR_0, void *VAR_1)
{
QEMUResetEntry *re;
TAILQ_FOREACH(re, &reset_handlers, entry) {
if (re->VAR_0 == VAR_0 && re->VAR_1 == VAR_1) {
TAILQ_REMOVE(&reset_handlers, re, entry);
qemu_free(re);
return;
}
}
}
| [
"void FUNC_0(QEMUResetHandler *VAR_0, void *VAR_1)\n{",
"QEMUResetEntry *re;",
"TAILQ_FOREACH(re, &reset_handlers, entry) {",
"if (re->VAR_0 == VAR_0 && re->VAR_1 == VAR_1) {",
"TAILQ_REMOVE(&reset_handlers, re, entry);",
"qemu_free(re);",
"return;",
"}",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
7,230 | static void blizzard_reg_write(void *opaque, uint8_t reg, uint16_t value)
{
BlizzardState *s = (BlizzardState *) opaque;
switch (reg) {
case 0x04: /* PLL M-Divider */
s->pll = (value & 0x3f) + 1;
break;
case 0x06: /* PLL Lock Range Control */
s->pll_range = value & 3;
... | false | qemu | a89f364ae8740dfc31b321eed9ee454e996dc3c1 | static void blizzard_reg_write(void *opaque, uint8_t reg, uint16_t value)
{
BlizzardState *s = (BlizzardState *) opaque;
switch (reg) {
case 0x04:
s->pll = (value & 0x3f) + 1;
break;
case 0x06:
s->pll_range = value & 3;
break;
case 0x08:
s->pll... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, uint8_t VAR_1, uint16_t VAR_2)
{
BlizzardState *s = (BlizzardState *) VAR_0;
switch (VAR_1) {
case 0x04:
s->pll = (VAR_2 & 0x3f) + 1;
break;
case 0x06:
s->pll_range = VAR_2 & 3;
break;
case 0x08:
s->pll_ctrl &= 0... | [
"static void FUNC_0(void *VAR_0, uint8_t VAR_1, uint16_t VAR_2)\n{",
"BlizzardState *s = (BlizzardState *) VAR_0;",
"switch (VAR_1) {",
"case 0x04:\ns->pll = (VAR_2 & 0x3f) + 1;",
"break;",
"case 0x06:\ns->pll_range = VAR_2 & 3;",
"break;",
"case 0x08:\ns->pll_ctrl &= 0xf00;",
"s->pll_ctrl |= (VAR_2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39,
41
],
[
43,
45,
47
],
[
49
],
... |
7,232 | uint64_t qcrypto_pbkdf2_count_iters(QCryptoHashAlgorithm hash,
const uint8_t *key, size_t nkey,
const uint8_t *salt, size_t nsalt,
Error **errp)
{
uint8_t out[32];
uint64_t iterations = (1 << 15);
... | false | qemu | 8813800b7d995d8b54ef0a1e16d41fc13d8b5f3a | uint64_t qcrypto_pbkdf2_count_iters(QCryptoHashAlgorithm hash,
const uint8_t *key, size_t nkey,
const uint8_t *salt, size_t nsalt,
Error **errp)
{
uint8_t out[32];
uint64_t iterations = (1 << 15);
... | {
"code": [],
"line_no": []
} | uint64_t FUNC_0(QCryptoHashAlgorithm hash,
const uint8_t *key, size_t nkey,
const uint8_t *salt, size_t nsalt,
Error **errp)
{
uint8_t out[32];
uint64_t iterations = (1 << 15);
unsigned long lo... | [
"uint64_t FUNC_0(QCryptoHashAlgorithm hash,\nconst uint8_t *key, size_t nkey,\nconst uint8_t *salt, size_t nsalt,\nError **errp)\n{",
"uint8_t out[32];",
"uint64_t iterations = (1 << 15);",
"unsigned long long VAR_0, VAR_1, VAR_2;",
"while (1) {",
"if (qcrypto_pbkdf2_get_thread_cpu(&VAR_1, errp) < 0) {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29,
31,
33,
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
55
... |
7,233 | static int pci_device_hot_remove(Monitor *mon, const char *pci_addr)
{
PCIDevice *d;
int dom, bus;
unsigned slot;
Error *local_err = NULL;
if (pci_read_devaddr(mon, pci_addr, &dom, &bus, &slot)) {
return -1;
}
d = pci_find_device(pci_find_root_bus(dom), bus, PCI_DEVFN(sl... | false | qemu | 79ca616f291124d166ca173e512c4ace1c2fe8b2 | static int pci_device_hot_remove(Monitor *mon, const char *pci_addr)
{
PCIDevice *d;
int dom, bus;
unsigned slot;
Error *local_err = NULL;
if (pci_read_devaddr(mon, pci_addr, &dom, &bus, &slot)) {
return -1;
}
d = pci_find_device(pci_find_root_bus(dom), bus, PCI_DEVFN(sl... | {
"code": [],
"line_no": []
} | static int FUNC_0(Monitor *VAR_0, const char *VAR_1)
{
PCIDevice *d;
int VAR_2, VAR_3;
unsigned VAR_4;
Error *local_err = NULL;
if (pci_read_devaddr(VAR_0, VAR_1, &VAR_2, &VAR_3, &VAR_4)) {
return -1;
}
d = pci_find_device(pci_find_root_bus(VAR_2), VAR_3, PCI_DEVFN(VAR_4... | [
"static int FUNC_0(Monitor *VAR_0, const char *VAR_1)\n{",
"PCIDevice *d;",
"int VAR_2, VAR_3;",
"unsigned VAR_4;",
"Error *local_err = NULL;",
"if (pci_read_devaddr(VAR_0, VAR_1, &VAR_2, &VAR_3, &VAR_4)) {",
"return -1;",
"}",
"d = pci_find_device(pci_find_root_bus(VAR_2), VAR_3, PCI_DEVFN(VAR_4, 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
],
[
49
... |
7,234 | void hmp_info_memdev(Monitor *mon, const QDict *qdict)
{
Error *err = NULL;
MemdevList *memdev_list = qmp_query_memdev(&err);
MemdevList *m = memdev_list;
StringOutputVisitor *ov;
char *str;
int i = 0;
while (m) {
ov = string_output_visitor_new(false);
visit_typ... | false | qemu | e7ca56562990991bc614a43b9351ee0737f3045d | void hmp_info_memdev(Monitor *mon, const QDict *qdict)
{
Error *err = NULL;
MemdevList *memdev_list = qmp_query_memdev(&err);
MemdevList *m = memdev_list;
StringOutputVisitor *ov;
char *str;
int i = 0;
while (m) {
ov = string_output_visitor_new(false);
visit_typ... | {
"code": [],
"line_no": []
} | void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)
{
Error *err = NULL;
MemdevList *memdev_list = qmp_query_memdev(&err);
MemdevList *m = memdev_list;
StringOutputVisitor *ov;
char *VAR_2;
int VAR_3 = 0;
while (m) {
ov = string_output_visitor_new(false);
visit_type... | [
"void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)\n{",
"Error *err = NULL;",
"MemdevList *memdev_list = qmp_query_memdev(&err);",
"MemdevList *m = memdev_list;",
"StringOutputVisitor *ov;",
"char *VAR_2;",
"int VAR_3 = 0;",
"while (m) {",
"ov = string_output_visitor_new(false);",
"visit_type_uint16... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33,
35
],
[
37,
39
],
[
41,
43
],
[
45,
47
],
[
49
],
[... |
7,235 | static void apply_motion_8x8(RoqContext *ri, int x, int y,
unsigned char mv, signed char mean_x, signed char mean_y)
{
int mx, my, i, j, hw;
unsigned char *pa, *pb;
mx = x + 8 - (mv >> 4) - mean_x;
my = y + 8 - (mv & 0xf) - mean_y;
pa = ri->current_frame.data[0] + (y * ri->y_stride) +... | false | FFmpeg | b9029997d4694b6533556480fe0ab1f3f9779a56 | static void apply_motion_8x8(RoqContext *ri, int x, int y,
unsigned char mv, signed char mean_x, signed char mean_y)
{
int mx, my, i, j, hw;
unsigned char *pa, *pb;
mx = x + 8 - (mv >> 4) - mean_x;
my = y + 8 - (mv & 0xf) - mean_y;
pa = ri->current_frame.data[0] + (y * ri->y_stride) +... | {
"code": [],
"line_no": []
} | static void FUNC_0(RoqContext *VAR_0, int VAR_1, int VAR_2,
unsigned char VAR_3, signed char VAR_4, signed char VAR_5)
{
int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;
unsigned char *VAR_11, *VAR_12;
VAR_6 = VAR_1 + 8 - (VAR_3 >> 4) - VAR_4;
VAR_7 = VAR_2 + 8 - (VAR_3 & 0xf) - VAR_5;
VAR_11 ... | [
"static void FUNC_0(RoqContext *VAR_0, int VAR_1, int VAR_2,\nunsigned char VAR_3, signed char VAR_4, signed char VAR_5)\n{",
"int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;",
"unsigned char *VAR_11, *VAR_12;",
"VAR_6 = VAR_1 + 8 - (VAR_3 >> 4) - VAR_4;",
"VAR_7 = VAR_2 + 8 - (VAR_3 & 0xf) - VAR_5;",
"VAR_11 = V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
7,236 | void ff_avg_dirac_pixels16_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h)
{
if (h&3)
ff_avg_dirac_pixels16_c(dst, src, stride, h);
else
ff_avg_pixels16_sse2(dst, src[0], stride, h);
}
| false | FFmpeg | 6a4832caaede15e3d918b1408ff83fe30324507b | void ff_avg_dirac_pixels16_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h)
{
if (h&3)
ff_avg_dirac_pixels16_c(dst, src, stride, h);
else
ff_avg_pixels16_sse2(dst, src[0], stride, h);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1[5], int VAR_2, int VAR_3)
{
if (VAR_3&3)
ff_avg_dirac_pixels16_c(VAR_0, VAR_1, VAR_2, VAR_3);
else
ff_avg_pixels16_sse2(VAR_0, VAR_1[0], VAR_2, VAR_3);
}
| [
"void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1[5], int VAR_2, int VAR_3)\n{",
"if (VAR_3&3)\nff_avg_dirac_pixels16_c(VAR_0, VAR_1, VAR_2, VAR_3);",
"else\nff_avg_pixels16_sse2(VAR_0, VAR_1[0], VAR_2, VAR_3);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13
]
] |
7,237 | int ff_ape_write_tag(AVFormatContext *s)
{
AVDictionaryEntry *e = NULL;
int64_t start, end;
int size, count = 0;
if (!s->pb->seekable)
return 0;
start = avio_tell(s->pb);
// header
avio_write(s->pb, "APETAGEX", 8); // id
avio_wl32 (s->pb, APE_TAG_VERSION); // ve... | false | FFmpeg | 83548fe894cdb455cc127f754d09905b6d23c173 | int ff_ape_write_tag(AVFormatContext *s)
{
AVDictionaryEntry *e = NULL;
int64_t start, end;
int size, count = 0;
if (!s->pb->seekable)
return 0;
start = avio_tell(s->pb);
avio_write(s->pb, "APETAGEX", 8);
avio_wl32 (s->pb, APE_TAG_VERSION);
avio_wl32(s->... | {
"code": [],
"line_no": []
} | int FUNC_0(AVFormatContext *VAR_0)
{
AVDictionaryEntry *e = NULL;
int64_t start, end;
int VAR_1, VAR_2 = 0;
if (!VAR_0->pb->seekable)
return 0;
start = avio_tell(VAR_0->pb);
avio_write(VAR_0->pb, "APETAGEX", 8);
avio_wl32 (VAR_0->pb, APE_TAG_VERSION);
av... | [
"int FUNC_0(AVFormatContext *VAR_0)\n{",
"AVDictionaryEntry *e = NULL;",
"int64_t start, end;",
"int VAR_1, VAR_2 = 0;",
"if (!VAR_0->pb->seekable)\nreturn 0;",
"start = avio_tell(VAR_0->pb);",
"avio_write(VAR_0->pb, \"APETAGEX\", 8);",
"avio_wl32 (VAR_0->pb, APE_TAG_VERSION);",
"avio_wl32(VAR_0->pb... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27
],
[
29
],
[
31
],
[
37,
39
],
[
41
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
],
[
57
],
[
59
... |
7,238 | static void gen_cp0 (CPUMIPSState *env, DisasContext *ctx, uint32_t opc, int rt, int rd)
{
const char *opn = "ldst";
switch (opc) {
case OPC_MFC0:
if (rt == 0) {
/* Treat as NOP. */
return;
}
gen_mfc0(env, ctx, cpu_gpr[rt], rd, ctx->opcode & 0x7);
... | true | qemu | 2e15497c5b8d0d172dece0cf56e2d2e977a6b679 | static void gen_cp0 (CPUMIPSState *env, DisasContext *ctx, uint32_t opc, int rt, int rd)
{
const char *opn = "ldst";
switch (opc) {
case OPC_MFC0:
if (rt == 0) {
return;
}
gen_mfc0(env, ctx, cpu_gpr[rt], rd, ctx->opcode & 0x7);
opn = "mfc... | {
"code": [],
"line_no": []
} | static void FUNC_0 (CPUMIPSState *VAR_0, DisasContext *VAR_1, uint32_t VAR_2, int VAR_3, int VAR_4)
{
const char *VAR_5 = "ldst";
switch (VAR_2) {
case OPC_MFC0:
if (VAR_3 == 0) {
return;
}
gen_mfc0(VAR_0, VAR_1, cpu_gpr[VAR_3], VAR_4, VAR_1->opco... | [
"static void FUNC_0 (CPUMIPSState *VAR_0, DisasContext *VAR_1, uint32_t VAR_2, int VAR_3, int VAR_4)\n{",
"const char *VAR_5 = \"ldst\";",
"switch (VAR_2) {",
"case OPC_MFC0:\nif (VAR_3 == 0) {",
"return;",
"}",
"gen_mfc0(VAR_0, VAR_1, cpu_gpr[VAR_3], VAR_4, VAR_1->opcode & 0x7);",
"VAR_5 = \"mfc0\";"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
10
],
[
12,
14
],
[
18
],
[
20
],
[
22
],
[
24
],
[
26
],
[
28,
30
],
[
32
],
[
36
],
[
38
],
[
40
],
[
42
],
[
44
],
[
46
],
[
48,
50,
5... |
7,239 | static inline uint64_t v4l2_get_pts(V4L2Buffer *avbuf)
{
V4L2m2mContext *s = buf_to_m2mctx(avbuf);
AVRational v4l2_timebase = { 1, USEC_PER_SEC };
int64_t v4l2_pts;
/* convert pts back to encoder timebase */
v4l2_pts = avbuf->buf.timestamp.tv_sec * USEC_PER_SEC + avbuf->buf.timestamp.tv_usec... | true | FFmpeg | 2e96f5278095d44f090a4d89507e62d27cccf3b9 | static inline uint64_t v4l2_get_pts(V4L2Buffer *avbuf)
{
V4L2m2mContext *s = buf_to_m2mctx(avbuf);
AVRational v4l2_timebase = { 1, USEC_PER_SEC };
int64_t v4l2_pts;
v4l2_pts = avbuf->buf.timestamp.tv_sec * USEC_PER_SEC + avbuf->buf.timestamp.tv_usec;
return av_rescale_q(v4l2_pts, v4l... | {
"code": [
" v4l2_pts = avbuf->buf.timestamp.tv_sec * USEC_PER_SEC + avbuf->buf.timestamp.tv_usec;"
],
"line_no": [
15
]
} | static inline uint64_t FUNC_0(V4L2Buffer *avbuf)
{
V4L2m2mContext *s = buf_to_m2mctx(avbuf);
AVRational v4l2_timebase = { 1, USEC_PER_SEC };
int64_t v4l2_pts;
v4l2_pts = avbuf->buf.timestamp.tv_sec * USEC_PER_SEC + avbuf->buf.timestamp.tv_usec;
return av_rescale_q(v4l2_pts, v4l2_time... | [
"static inline uint64_t FUNC_0(V4L2Buffer *avbuf)\n{",
"V4L2m2mContext *s = buf_to_m2mctx(avbuf);",
"AVRational v4l2_timebase = { 1, USEC_PER_SEC };",
"int64_t v4l2_pts;",
"v4l2_pts = avbuf->buf.timestamp.tv_sec * USEC_PER_SEC + avbuf->buf.timestamp.tv_usec;",
"return av_rescale_q(v4l2_pts, v4l2_timebase,... | [
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
15
],
[
19
],
[
21
]
] |
7,240 | static int parallels_create(const char *filename, QemuOpts *opts, Error **errp)
{
int64_t total_size, cl_size;
uint8_t tmp[BDRV_SECTOR_SIZE];
Error *local_err = NULL;
BlockBackend *file;
uint32_t bat_entries, bat_sectors;
ParallelsHeader header;
int ret;
total_size = ROUND_UP(... | true | qemu | 555a608c5d5dcc44e45a483ca09b449d8db519d1 | static int parallels_create(const char *filename, QemuOpts *opts, Error **errp)
{
int64_t total_size, cl_size;
uint8_t tmp[BDRV_SECTOR_SIZE];
Error *local_err = NULL;
BlockBackend *file;
uint32_t bat_entries, bat_sectors;
ParallelsHeader header;
int ret;
total_size = ROUND_UP(... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0, QemuOpts *VAR_1, Error **VAR_2)
{
int64_t total_size, cl_size;
uint8_t tmp[BDRV_SECTOR_SIZE];
Error *local_err = NULL;
BlockBackend *file;
uint32_t bat_entries, bat_sectors;
ParallelsHeader header;
int VAR_3;
total_size = ROUND_UP(qemu_opt_... | [
"static int FUNC_0(const char *VAR_0, QemuOpts *VAR_1, Error **VAR_2)\n{",
"int64_t total_size, cl_size;",
"uint8_t tmp[BDRV_SECTOR_SIZE];",
"Error *local_err = NULL;",
"BlockBackend *file;",
"uint32_t bat_entries, bat_sectors;",
"ParallelsHeader header;",
"int VAR_3;",
"total_size = ROUND_UP(qemu_o... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
25,
27
],
[
35
],
[
37
],
[
40
],
[
45,
47
],
[
49
],
[
52
],
[
57
],
[
61
],
[... |
7,241 | static int stdio_put_buffer(void *opaque, const uint8_t *buf, int64_t pos,
int size)
{
QEMUFileStdio *s = opaque;
return fwrite(buf, 1, size, s->stdio_file);
}
| true | qemu | aded6539d983280212e08d09f14157b1cb4d58cc | static int stdio_put_buffer(void *opaque, const uint8_t *buf, int64_t pos,
int size)
{
QEMUFileStdio *s = opaque;
return fwrite(buf, 1, size, s->stdio_file);
}
| {
"code": [
" return fwrite(buf, 1, size, s->stdio_file);"
],
"line_no": [
9
]
} | static int FUNC_0(void *VAR_0, const uint8_t *VAR_1, int64_t VAR_2,
int VAR_3)
{
QEMUFileStdio *s = VAR_0;
return fwrite(VAR_1, 1, VAR_3, s->stdio_file);
}
| [
"static int FUNC_0(void *VAR_0, const uint8_t *VAR_1, int64_t VAR_2,\nint VAR_3)\n{",
"QEMUFileStdio *s = VAR_0;",
"return fwrite(VAR_1, 1, VAR_3, s->stdio_file);",
"}"
] | [
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
]
] |
7,242 | void *address_space_map(AddressSpace *as,
hwaddr addr,
hwaddr *plen,
bool is_write)
{
hwaddr len = *plen;
hwaddr done = 0;
hwaddr l, xlat, base;
MemoryRegion *mr, *this_mr;
ram_addr_t raddr;
if (len == 0) {
... | true | qemu | c2cba0ffe495b60c4cc58080281e99c7a6580d4b | void *address_space_map(AddressSpace *as,
hwaddr addr,
hwaddr *plen,
bool is_write)
{
hwaddr len = *plen;
hwaddr done = 0;
hwaddr l, xlat, base;
MemoryRegion *mr, *this_mr;
ram_addr_t raddr;
if (len == 0) {
... | {
"code": [
" if (bounce.buffer) {"
],
"line_no": [
37
]
} | void *FUNC_0(AddressSpace *VAR_0,
hwaddr VAR_1,
hwaddr *VAR_2,
bool VAR_3)
{
hwaddr len = *VAR_2;
hwaddr done = 0;
hwaddr l, xlat, base;
MemoryRegion *mr, *this_mr;
ram_addr_t raddr;
if (len == 0) {
retu... | [
"void *FUNC_0(AddressSpace *VAR_0,\nhwaddr VAR_1,\nhwaddr *VAR_2,\nbool VAR_3)\n{",
"hwaddr len = *VAR_2;",
"hwaddr done = 0;",
"hwaddr l, xlat, base;",
"MemoryRegion *mr, *this_mr;",
"ram_addr_t raddr;",
"if (len == 0) {",
"return NULL;",
"}",
"l = len;",
"mr = address_space_translate(VAR_0, VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[... |
7,244 | void ff_aac_search_for_pred(AACEncContext *s, SingleChannelElement *sce)
{
int sfb, i, count = 0, cost_coeffs = 0, cost_pred = 0;
const int pmax = FFMIN(sce->ics.max_sfb, ff_aac_pred_sfb_max[s->samplerate_index]);
float *O34 = &s->scoefs[128*0], *P34 = &s->scoefs[128*1];
float *SENT = &s->scoefs[1... | true | FFmpeg | 01ecb7172b684f1c4b3e748f95c5a9a494ca36ec | void ff_aac_search_for_pred(AACEncContext *s, SingleChannelElement *sce)
{
int sfb, i, count = 0, cost_coeffs = 0, cost_pred = 0;
const int pmax = FFMIN(sce->ics.max_sfb, ff_aac_pred_sfb_max[s->samplerate_index]);
float *O34 = &s->scoefs[128*0], *P34 = &s->scoefs[128*1];
float *SENT = &s->scoefs[1... | {
"code": [
" cb_n, s->lambda / band->threshold, INFINITY, &cost1, 0);",
" &cost2, 0);",
" cb_p, s->lambda / band->threshold, INFINITY, NULL, 0);"
],
"line_no": [
83,
... | void FUNC_0(AACEncContext *VAR_0, SingleChannelElement *VAR_1)
{
int VAR_2, VAR_3, VAR_4 = 0, VAR_5 = 0, VAR_6 = 0;
const int VAR_7 = FFMIN(VAR_1->ics.max_sfb, ff_aac_pred_sfb_max[VAR_0->samplerate_index]);
float *VAR_8 = &VAR_0->scoefs[128*0], *VAR_9 = &VAR_0->scoefs[128*1];
float *VAR_10 = &VAR_... | [
"void FUNC_0(AACEncContext *VAR_0, SingleChannelElement *VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4 = 0, VAR_5 = 0, VAR_6 = 0;",
"const int VAR_7 = FFMIN(VAR_1->ics.max_sfb, ff_aac_pred_sfb_max[VAR_0->samplerate_index]);",
"float *VAR_8 = &VAR_0->scoefs[128*0], *VAR_9 = &VAR_0->scoefs[128*1];",
"float *VAR_10 = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
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... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49
... |
7,245 | static void new_subtitle_stream(AVFormatContext *oc, int file_idx)
{
AVStream *st;
OutputStream *ost;
AVCodec *codec=NULL;
AVCodecContext *subtitle_enc;
enum CodecID codec_id = CODEC_ID_NONE;
if(!subtitle_stream_copy){
if (subtitle_codec_name) {
codec_id = find_cod... | false | FFmpeg | a9eb4f0899de04a3093a04f461611c6f0664398e | static void new_subtitle_stream(AVFormatContext *oc, int file_idx)
{
AVStream *st;
OutputStream *ost;
AVCodec *codec=NULL;
AVCodecContext *subtitle_enc;
enum CodecID codec_id = CODEC_ID_NONE;
if(!subtitle_stream_copy){
if (subtitle_codec_name) {
codec_id = find_cod... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVFormatContext *VAR_0, int VAR_1)
{
AVStream *st;
OutputStream *ost;
AVCodec *codec=NULL;
AVCodecContext *subtitle_enc;
enum CodecID VAR_2 = CODEC_ID_NONE;
if(!subtitle_stream_copy){
if (subtitle_codec_name) {
VAR_2 = find_codec_or_die(subtitle_... | [
"static void FUNC_0(AVFormatContext *VAR_0, int VAR_1)\n{",
"AVStream *st;",
"OutputStream *ost;",
"AVCodec *codec=NULL;",
"AVCodecContext *subtitle_enc;",
"enum CodecID VAR_2 = CODEC_ID_NONE;",
"if(!subtitle_stream_copy){",
"if (subtitle_codec_name) {",
"VAR_2 = find_codec_or_die(subtitle_codec_nam... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[... |
7,246 | static int compile_kernel_file(GPUEnv *gpu_env, const char *build_options)
{
cl_int status;
char *temp, *source_str = NULL;
size_t source_str_len = 0;
int i, ret = 0;
for (i = 0; i < gpu_env->kernel_code_count; i++) {
if (!gpu_env->kernel_code[i].is_compiled)
source_str... | false | FFmpeg | 57d77b3963ce1023eaf5ada8cba58b9379405cc8 | static int compile_kernel_file(GPUEnv *gpu_env, const char *build_options)
{
cl_int status;
char *temp, *source_str = NULL;
size_t source_str_len = 0;
int i, ret = 0;
for (i = 0; i < gpu_env->kernel_code_count; i++) {
if (!gpu_env->kernel_code[i].is_compiled)
source_str... | {
"code": [],
"line_no": []
} | static int FUNC_0(GPUEnv *VAR_0, const char *VAR_1)
{
cl_int status;
char *VAR_2, *VAR_3 = NULL;
size_t source_str_len = 0;
int VAR_4, VAR_5 = 0;
for (VAR_4 = 0; VAR_4 < VAR_0->kernel_code_count; VAR_4++) {
if (!VAR_0->kernel_code[VAR_4].is_compiled)
source_str_len += s... | [
"static int FUNC_0(GPUEnv *VAR_0, const char *VAR_1)\n{",
"cl_int status;",
"char *VAR_2, *VAR_3 = NULL;",
"size_t source_str_len = 0;",
"int VAR_4, VAR_5 = 0;",
"for (VAR_4 = 0; VAR_4 < VAR_0->kernel_code_count; VAR_4++) {",
"if (!VAR_0->kernel_code[VAR_4].is_compiled)\nsource_str_len += strlen(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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
... |
7,247 | static void read_ttag(AVFormatContext *s, int taglen, const char *key)
{
char *q, dst[512];
int len, dstlen = sizeof(dst) - 1;
unsigned genre;
dst[0] = 0;
if (taglen < 1)
return;
taglen--; /* account for encoding type byte */
switch (get_byte(s->pb)) { /* encoding type... | false | FFmpeg | 787f8fad00c66fc225662f7defb90e79c112ed40 | static void read_ttag(AVFormatContext *s, int taglen, const char *key)
{
char *q, dst[512];
int len, dstlen = sizeof(dst) - 1;
unsigned genre;
dst[0] = 0;
if (taglen < 1)
return;
taglen--;
switch (get_byte(s->pb)) {
case 0:
q = dst;
while (... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVFormatContext *VAR_0, int VAR_1, const char *VAR_2)
{
char *VAR_3, VAR_4[512];
int VAR_5, VAR_6 = sizeof(VAR_4) - 1;
unsigned VAR_7;
VAR_4[0] = 0;
if (VAR_1 < 1)
return;
VAR_1--;
switch (get_byte(VAR_0->pb)) {
case 0:
VAR_3 = VA... | [
"static void FUNC_0(AVFormatContext *VAR_0, int VAR_1, const char *VAR_2)\n{",
"char *VAR_3, VAR_4[512];",
"int VAR_5, VAR_6 = sizeof(VAR_4) - 1;",
"unsigned VAR_7;",
"VAR_4[0] = 0;",
"if (VAR_1 < 1)\nreturn;",
"VAR_1--;",
"switch (get_byte(VAR_0->pb)) {",
"case 0:\nVAR_3 = VAR_4;",
"while (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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
21
],
[
25
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47,
49
],
[
51
],
[
53
],
[... |
7,248 | static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s)
{
Jpeg2000CodingStyle *codsty = s->codsty;
Jpeg2000QuantStyle *qntsty = s->qntsty;
uint8_t *properties = s->properties;
for (;;) {
int len, ret = 0;
uint16_t marker;
int oldpos;
if (byt... | false | FFmpeg | b26bcd08e670b90740f7253f21adddafb9d8c478 | static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s)
{
Jpeg2000CodingStyle *codsty = s->codsty;
Jpeg2000QuantStyle *qntsty = s->qntsty;
uint8_t *properties = s->properties;
for (;;) {
int len, ret = 0;
uint16_t marker;
int oldpos;
if (byt... | {
"code": [],
"line_no": []
} | static int FUNC_0(Jpeg2000DecoderContext *VAR_0)
{
Jpeg2000CodingStyle *codsty = VAR_0->codsty;
Jpeg2000QuantStyle *qntsty = VAR_0->qntsty;
uint8_t *properties = VAR_0->properties;
for (;;) {
int VAR_1, VAR_2 = 0;
uint16_t marker;
int VAR_3;
if (byte... | [
"static int FUNC_0(Jpeg2000DecoderContext *VAR_0)\n{",
"Jpeg2000CodingStyle *codsty = VAR_0->codsty;",
"Jpeg2000QuantStyle *qntsty = VAR_0->qntsty;",
"uint8_t *properties = VAR_0->properties;",
"for (;;) {",
"int VAR_1, VAR_2 = 0;",
"uint16_t marker;",
"int VAR_3;",
"if (bytestream2_get_byt... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
53
... |
7,249 | static int unpack_block_qpis(Vp3DecodeContext *s, GetBitContext *gb)
{
int qpi, i, j, bit, run_length, blocks_decoded, num_blocks_at_qpi;
int num_blocks = s->coded_fragment_list_index;
for (qpi = 0; qpi < s->nqps-1 && num_blocks > 0; qpi++) {
i = blocks_decoded = num_blocks_at_qpi = 0;
... | false | FFmpeg | 310afddfe0c31ffd844eb640bdf2b3f052286dbe | static int unpack_block_qpis(Vp3DecodeContext *s, GetBitContext *gb)
{
int qpi, i, j, bit, run_length, blocks_decoded, num_blocks_at_qpi;
int num_blocks = s->coded_fragment_list_index;
for (qpi = 0; qpi < s->nqps-1 && num_blocks > 0; qpi++) {
i = blocks_decoded = num_blocks_at_qpi = 0;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(Vp3DecodeContext *VAR_0, GetBitContext *VAR_1)
{
int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;
int VAR_9 = VAR_0->coded_fragment_list_index;
for (VAR_2 = 0; VAR_2 < VAR_0->nqps-1 && VAR_9 > 0; VAR_2++) {
VAR_3 = VAR_7 = VAR_8 = 0;
VAR_5 = get_bits1(VAR_1);
... | [
"static int FUNC_0(Vp3DecodeContext *VAR_0, GetBitContext *VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;",
"int VAR_9 = VAR_0->coded_fragment_list_index;",
"for (VAR_2 = 0; VAR_2 < VAR_0->nqps-1 && VAR_9 > 0; VAR_2++) {",
"VAR_3 = VAR_7 = VAR_8 = 0;",
"VAR_5 = get_bits1(VAR_1);",
"do... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
33,
35
],
[
39
],
[
41,
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
... |
7,251 | static void v9fs_mkdir(void *opaque)
{
V9fsPDU *pdu = opaque;
size_t offset = 7;
int32_t fid;
struct stat stbuf;
V9fsQID qid;
V9fsString name;
V9fsFidState *fidp;
gid_t gid;
int mode;
int err = 0;
v9fs_string_init(&name);
err = pdu_unmarshal(pdu, offset, "dsdd", &fid, &na... | true | qemu | fff39a7ad09da07ef490de05c92c91f22f8002f2 | static void v9fs_mkdir(void *opaque)
{
V9fsPDU *pdu = opaque;
size_t offset = 7;
int32_t fid;
struct stat stbuf;
V9fsQID qid;
V9fsString name;
V9fsFidState *fidp;
gid_t gid;
int mode;
int err = 0;
v9fs_string_init(&name);
err = pdu_unmarshal(pdu, offset, "dsdd", &fid, &na... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
V9fsPDU *pdu = VAR_0;
size_t offset = 7;
int32_t fid;
struct stat VAR_1;
V9fsQID qid;
V9fsString name;
V9fsFidState *fidp;
gid_t gid;
int VAR_2;
int VAR_3 = 0;
v9fs_string_init(&name);
VAR_3 = pdu_unmarshal(pdu, offset, "dsdd", &fid, &nam... | [
"static void FUNC_0(void *VAR_0)\n{",
"V9fsPDU *pdu = VAR_0;",
"size_t offset = 7;",
"int32_t fid;",
"struct stat VAR_1;",
"V9fsQID qid;",
"V9fsString name;",
"V9fsFidState *fidp;",
"gid_t gid;",
"int VAR_2;",
"int VAR_3 = 0;",
"v9fs_string_init(&name);",
"VAR_3 = pdu_unmarshal(pdu, offset, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],... |
7,252 | static void kvmppc_host_cpu_class_init(ObjectClass *oc, void *data)
{
PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);
uint32_t vmx = kvmppc_get_vmx();
uint32_t dfp = kvmppc_get_dfp();
/* Now fix up the class with information we can query from the host */
if (vmx != -1) {
/* Only o... | true | qemu | 0cbad81f70546b58f08de3225f1eca7a8b869b09 | static void kvmppc_host_cpu_class_init(ObjectClass *oc, void *data)
{
PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);
uint32_t vmx = kvmppc_get_vmx();
uint32_t dfp = kvmppc_get_dfp();
if (vmx != -1) {
alter_insns(&pcc->insns_flags, PPC_ALTIVEC, vmx > 0);
alter_... | {
"code": [],
"line_no": []
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(VAR_0);
uint32_t vmx = kvmppc_get_vmx();
uint32_t dfp = kvmppc_get_dfp();
if (vmx != -1) {
alter_insns(&pcc->insns_flags, PPC_ALTIVEC, vmx > 0);
alter_insns(&pcc->i... | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(VAR_0);",
"uint32_t vmx = kvmppc_get_vmx();",
"uint32_t dfp = kvmppc_get_dfp();",
"if (vmx != -1) {",
"alter_insns(&pcc->insns_flags, PPC_ALTIVEC, vmx > 0);",
"alter_insns(&pcc->insns_flags2, PPC2_VSX, vm... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
]
] |
7,253 | static BlockDriverAIOCB *raw_aio_writev(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
const uint8_t *first_buf;
int first_buf_index = 0, i;
/* This is probably being paranoid, but handle cases of zero size
... | true | qemu | 8b33d9eeba91422ee2d73b6936ad57262d18cf5a | static BlockDriverAIOCB *raw_aio_writev(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
const uint8_t *first_buf;
int first_buf_index = 0, i;
for (i = 0; i < qiov->niov; i++) {
if (qiov->iov[i].iov_... | {
"code": [
" int ret;",
" if (ret < 0) {",
" if (ret < 0) {",
" const uint8_t *first_buf;",
" int first_buf_index = 0, i;",
" for (i = 0; i < qiov->niov; i++) {",
" if (qiov->iov[i].iov_len) {",
" assert(qiov->iov[i].iov_len >= 512);",
... | static BlockDriverAIOCB *FUNC_0(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
const uint8_t *VAR_0;
int VAR_1 = 0, VAR_2;
for (VAR_2 = 0; VAR_2 < qiov->niov; VAR_2++) {
if (qiov->iov[VAR_2].iov_le... | [
"static BlockDriverAIOCB *FUNC_0(BlockDriverState *bs,\nint64_t sector_num, QEMUIOVector *qiov, int nb_sectors,\nBlockDriverCompletionFunc *cb, void *opaque)\n{",
"const uint8_t *VAR_0;",
"int VAR_1 = 0, VAR_2;",
"for (VAR_2 = 0; VAR_2 < qiov->niov; VAR_2++) {",
"if (qiov->iov[VAR_2].iov_len) {",
"assert(... | [
0,
1,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
39
],
[
41
],
[
43
],
[
49
],
[
51
],
[
53
],
[
55
],
[
63
... |
7,254 | void ppc_slb_invalidate_all (CPUPPCState *env)
{
target_phys_addr_t sr_base;
uint64_t tmp64;
int n, do_invalidate;
do_invalidate = 0;
sr_base = env->spr[SPR_ASR];
for (n = 0; n < env->slb_nr; n++) {
tmp64 = ldq_phys(sr_base);
if (slb_is_valid(tmp64)) {
slb... | true | qemu | 2c1ee068b469ef5dcd8ea8f9220256a737e2b810 | void ppc_slb_invalidate_all (CPUPPCState *env)
{
target_phys_addr_t sr_base;
uint64_t tmp64;
int n, do_invalidate;
do_invalidate = 0;
sr_base = env->spr[SPR_ASR];
for (n = 0; n < env->slb_nr; n++) {
tmp64 = ldq_phys(sr_base);
if (slb_is_valid(tmp64)) {
slb... | {
"code": [
" for (n = 0; n < env->slb_nr; n++) {"
],
"line_no": [
17
]
} | void FUNC_0 (CPUPPCState *VAR_0)
{
target_phys_addr_t sr_base;
uint64_t tmp64;
int VAR_1, VAR_2;
VAR_2 = 0;
sr_base = VAR_0->spr[SPR_ASR];
for (VAR_1 = 0; VAR_1 < VAR_0->slb_nr; VAR_1++) {
tmp64 = ldq_phys(sr_base);
if (slb_is_valid(tmp64)) {
slb_invalidat... | [
"void FUNC_0 (CPUPPCState *VAR_0)\n{",
"target_phys_addr_t sr_base;",
"uint64_t tmp64;",
"int VAR_1, VAR_2;",
"VAR_2 = 0;",
"sr_base = VAR_0->spr[SPR_ASR];",
"for (VAR_1 = 0; VAR_1 < VAR_0->slb_nr; VAR_1++) {",
"tmp64 = ldq_phys(sr_base);",
"if (slb_is_valid(tmp64)) {",
"slb_invalidate(&tmp64);",
... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
]
] |
7,255 | static int dirac_header(AVFormatContext *s, int idx)
{
struct ogg *ogg = s->priv_data;
struct ogg_stream *os = ogg->streams + idx;
AVStream *st = s->streams[idx];
dirac_source_params source;
GetBitContext gb;
// already parsed the header
if (st->codec->codec_id == AV_CODEC_ID_DIRAC... | true | FFmpeg | 4f5c2e651a95b950f6a3fb36f2342cbc32515f17 | static int dirac_header(AVFormatContext *s, int idx)
{
struct ogg *ogg = s->priv_data;
struct ogg_stream *os = ogg->streams + idx;
AVStream *st = s->streams[idx];
dirac_source_params source;
GetBitContext gb;
if (st->codec->codec_id == AV_CODEC_ID_DIRAC)
return 0;
... | {
"code": [
" init_get_bits(&gb, os->buf + os->pstart + 13, (os->psize - 13) * 8);",
" if (avpriv_dirac_parse_sequence_header(st->codec, &gb, &source) < 0)",
" return -1;"
],
"line_no": [
25,
27,
29
]
} | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1)
{
struct VAR_2 *VAR_2 = VAR_0->priv_data;
struct ogg_stream *VAR_3 = VAR_2->streams + VAR_1;
AVStream *st = VAR_0->streams[VAR_1];
dirac_source_params source;
GetBitContext gb;
if (st->codec->codec_id == AV_CODEC_ID_DIRAC)
... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1)\n{",
"struct VAR_2 *VAR_2 = VAR_0->priv_data;",
"struct ogg_stream *VAR_3 = VAR_2->streams + VAR_1;",
"AVStream *st = VAR_0->streams[VAR_1];",
"dirac_source_params source;",
"GetBitContext gb;",
"if (st->codec->codec_id == AV_CODEC_ID_DIRAC)\nreturn ... | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
19,
21
],
[
25
],
[
27,
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
]
] |
7,257 | static int targa_encode_frame(AVCodecContext *avctx,
unsigned char *outbuf,
int buf_size, void *data){
AVFrame *p = data;
int bpp, picsize, datasize;
uint8_t *out;
if(avctx->width > 0xffff || avctx->height > 0xffff) {
av_log(av... | false | FFmpeg | d010a2d5befcde4782c4498134bb380e9fb24af6 | static int targa_encode_frame(AVCodecContext *avctx,
unsigned char *outbuf,
int buf_size, void *data){
AVFrame *p = data;
int bpp, picsize, datasize;
uint8_t *out;
if(avctx->width > 0xffff || avctx->height > 0xffff) {
av_log(av... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
unsigned char *VAR_1,
int VAR_2, void *VAR_3){
AVFrame *p = VAR_3;
int VAR_4, VAR_5, VAR_6;
uint8_t *out;
if(VAR_0->width > 0xffff || VAR_0->height > 0xffff) {
av_log(VAR_0, AV_LOG_ERROR... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nunsigned char *VAR_1,\nint VAR_2, void *VAR_3){",
"AVFrame *p = VAR_3;",
"int VAR_4, VAR_5, VAR_6;",
"uint8_t *out;",
"if(VAR_0->width > 0xffff || VAR_0->height > 0xffff) {",
"av_log(VAR_0, AV_LOG_ERROR, \"image dimensions too large\\n\");",
"return -1;",
"}"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
7,258 | static void sdp_parse_fmtp(AVStream *st, const char *p)
{
char attr[256];
/* Vorbis setup headers can be up to 12KB and are sent base64
* encoded, giving a 12KB * (4/3) = 16KB FMTP line. */
char value[16384];
int i;
RTSPStream *rtsp_st = st->priv_data;
AVCodecContext *codec = st->... | false | FFmpeg | c89658008705d949c319df3fa6f400c481ad73e1 | static void sdp_parse_fmtp(AVStream *st, const char *p)
{
char attr[256];
char value[16384];
int i;
RTSPStream *rtsp_st = st->priv_data;
AVCodecContext *codec = st->codec;
RTPPayloadData *rtp_payload_data = &rtsp_st->rtp_payload_data;
while(rtsp_next_attr_and_value(... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVStream *VAR_0, const char *VAR_1)
{
char VAR_2[256];
char VAR_3[16384];
int VAR_4;
RTSPStream *rtsp_st = VAR_0->priv_data;
AVCodecContext *codec = VAR_0->codec;
RTPPayloadData *rtp_payload_data = &rtsp_st->rtp_payload_data;
while(rtsp_next_attr_... | [
"static void FUNC_0(AVStream *VAR_0, const char *VAR_1)\n{",
"char VAR_2[256];",
"char VAR_3[16384];",
"int VAR_4;",
"RTSPStream *rtsp_st = VAR_0->priv_data;",
"AVCodecContext *codec = VAR_0->codec;",
"RTPPayloadData *rtp_payload_data = &rtsp_st->rtp_payload_data;",
"while(rtsp_next_attr_and_value(&VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
27,
29
],
[
33,
35
],
[
39
],
[
41
],
[
43,
45
],
[
47,
49
],
[
51
],
[
53
],
[
55
],
[
57
]
] |
7,259 | static int h261_decode_gob(H261Context *h){
MpegEncContext * const s = &h->s;
int v;
ff_set_qscale(s, s->qscale);
/* check for empty gob */
v= show_bits(&s->gb, 15);
if(get_bits_count(&s->gb) + 15 > s->gb.size_in_bits){
v>>= get_bits_count(&s->gb) + 15 - s->gb.size_in_bi... | true | FFmpeg | 49e5dcbce5f9e08ec375fd54c413148beb81f1d7 | static int h261_decode_gob(H261Context *h){
MpegEncContext * const s = &h->s;
int v;
ff_set_qscale(s, s->qscale);
v= show_bits(&s->gb, 15);
if(get_bits_count(&s->gb) + 15 > s->gb.size_in_bits){
v>>= get_bits_count(&s->gb) + 15 - s->gb.size_in_bits;
}
if(v==0... | {
"code": [
" return -1;",
" int v;",
" v= show_bits(&s->gb, 15);",
" if(get_bits_count(&s->gb) + 15 > s->gb.size_in_bits){",
" v>>= get_bits_count(&s->gb) + 15 - s->gb.size_in_bits;",
" if(v==0){",
" h261_decode_mb_skipped(h, 0, 33);",
" ... | static int FUNC_0(H261Context *VAR_0){
MpegEncContext * const s = &VAR_0->s;
int VAR_1;
ff_set_qscale(s, s->qscale);
VAR_1= show_bits(&s->gb, 15);
if(get_bits_count(&s->gb) + 15 > s->gb.size_in_bits){
VAR_1>>= get_bits_count(&s->gb) + 15 - s->gb.size_in_bits;
}
... | [
"static int FUNC_0(H261Context *VAR_0){",
"MpegEncContext * const s = &VAR_0->s;",
"int VAR_1;",
"ff_set_qscale(s, s->qscale);",
"VAR_1= show_bits(&s->gb, 15);",
"if(get_bits_count(&s->gb) + 15 > s->gb.size_in_bits){",
"VAR_1>>= get_bits_count(&s->gb) + 15 - s->gb.size_in_bits;",
"}",
"if(VAR_1==0){... | [
0,
0,
1,
0,
1,
1,
1,
0,
1,
1,
1,
0,
1,
0,
1,
0,
1,
0,
1,
1,
1,
0,
1,
1,
0,
0,
1,
1,
1,
0,
1,
0,
0,
1,
1,
1,
0,
1,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
9
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
39,
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57... |
7,260 | static int parse_playlist(URLContext *h, const char *url)
{
HLSContext *s = h->priv_data;
AVIOContext *in;
int ret = 0, is_segment = 0, is_variant = 0, bandwidth = 0;
int64_t duration = 0;
char line[1024];
const char *ptr;
if ((ret = avio_open2(&in, url, AVIO_FLAG_READ,
... | true | FFmpeg | 7915e6741dbe1cf3a8781cead3e68a7666de14f4 | static int parse_playlist(URLContext *h, const char *url)
{
HLSContext *s = h->priv_data;
AVIOContext *in;
int ret = 0, is_segment = 0, is_variant = 0, bandwidth = 0;
int64_t duration = 0;
char line[1024];
const char *ptr;
if ((ret = avio_open2(&in, url, AVIO_FLAG_READ,
... | {
"code": [
" if (strcmp(line, \"#EXTM3U\"))",
" return AVERROR_INVALIDDATA;"
],
"line_no": [
29,
31
]
} | static int FUNC_0(URLContext *VAR_0, const char *VAR_1)
{
HLSContext *s = VAR_0->priv_data;
AVIOContext *in;
int VAR_2 = 0, VAR_3 = 0, VAR_4 = 0, VAR_5 = 0;
int64_t duration = 0;
char VAR_6[1024];
const char *VAR_7;
if ((VAR_2 = avio_open2(&in, VAR_1, AVIO_FLAG_READ,
... | [
"static int FUNC_0(URLContext *VAR_0, const char *VAR_1)\n{",
"HLSContext *s = VAR_0->priv_data;",
"AVIOContext *in;",
"int VAR_2 = 0, VAR_3 = 0, VAR_4 = 0, VAR_5 = 0;",
"int64_t duration = 0;",
"char VAR_6[1024];",
"const char *VAR_7;",
"if ((VAR_2 = avio_open2(&in, VAR_1, AVIO_FLAG_READ,\n&VAR_0->in... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21,
23
],
[
27
],
[
29,
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49,
51
... |
7,261 | static int dc1394_read_header(AVFormatContext *c, AVFormatParameters * ap)
{
dc1394_data* dc1394 = c->priv_data;
AVStream* vst;
nodeid_t* camera_nodes;
int res;
struct dc1394_frame_format *fmt;
struct dc1394_frame_rate *fps;
for (fmt = dc1394_frame_formats; fmt->width; fmt++)
... | true | FFmpeg | 43d1a1c05a51dfa340c95319be2608df98e6c3f4 | static int dc1394_read_header(AVFormatContext *c, AVFormatParameters * ap)
{
dc1394_data* dc1394 = c->priv_data;
AVStream* vst;
nodeid_t* camera_nodes;
int res;
struct dc1394_frame_format *fmt;
struct dc1394_frame_rate *fps;
for (fmt = dc1394_frame_formats; fmt->width; fmt++)
... | {
"code": [
" if (fmt->pix_fmt == ap->pix_fmt && fmt->width == ap->width && fmt->height == ap->height)",
" if (fps->frame_rate == av_rescale(1000, ap->time_base.den, ap->time_base.num))"
],
"line_no": [
21,
29
]
} | static int FUNC_0(AVFormatContext *VAR_0, AVFormatParameters * VAR_1)
{
dc1394_data* dc1394 = VAR_0->priv_data;
AVStream* vst;
nodeid_t* camera_nodes;
int VAR_2;
struct dc1394_frame_format *VAR_3;
struct dc1394_frame_rate *VAR_4;
for (VAR_3 = dc1394_frame_formats; VAR_3->width; VAR... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVFormatParameters * VAR_1)\n{",
"dc1394_data* dc1394 = VAR_0->priv_data;",
"AVStream* vst;",
"nodeid_t* camera_nodes;",
"int VAR_2;",
"struct dc1394_frame_format *VAR_3;",
"struct dc1394_frame_rate *VAR_4;",
"for (VAR_3 = dc1394_frame_formats; VAR_3->width; ... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
27
],
[
29,
31
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
7,262 | static void bdrv_aio_bh_cb(void *opaque)
{
BlockDriverAIOCBSync *acb = opaque;
if (!acb->is_write)
qemu_iovec_from_buf(acb->qiov, 0, acb->bounce, acb->qiov->size);
qemu_vfree(acb->bounce);
acb->common.cb(acb->common.opaque, acb->ret);
qemu_bh_delete(acb->bh);
acb->bh = NULL;
... | true | qemu | 857d4f46c31d2f4d57d2f0fad9dfb584262bf9b9 | static void bdrv_aio_bh_cb(void *opaque)
{
BlockDriverAIOCBSync *acb = opaque;
if (!acb->is_write)
qemu_iovec_from_buf(acb->qiov, 0, acb->bounce, acb->qiov->size);
qemu_vfree(acb->bounce);
acb->common.cb(acb->common.opaque, acb->ret);
qemu_bh_delete(acb->bh);
acb->bh = NULL;
... | {
"code": [
" if (!acb->is_write)"
],
"line_no": [
9
]
} | static void FUNC_0(void *VAR_0)
{
BlockDriverAIOCBSync *acb = VAR_0;
if (!acb->is_write)
qemu_iovec_from_buf(acb->qiov, 0, acb->bounce, acb->qiov->size);
qemu_vfree(acb->bounce);
acb->common.cb(acb->common.VAR_0, acb->ret);
qemu_bh_delete(acb->bh);
acb->bh = NULL;
qemu_aio... | [
"static void FUNC_0(void *VAR_0)\n{",
"BlockDriverAIOCBSync *acb = VAR_0;",
"if (!acb->is_write)\nqemu_iovec_from_buf(acb->qiov, 0, acb->bounce, acb->qiov->size);",
"qemu_vfree(acb->bounce);",
"acb->common.cb(acb->common.VAR_0, acb->ret);",
"qemu_bh_delete(acb->bh);",
"acb->bh = NULL;",
"qemu_aio_rele... | [
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
7,264 | static int send_sub_rect_jpeg(VncState *vs, int x, int y, int w, int h,
int bg, int fg, int colors,
VncPalette *palette)
{
int ret;
if (colors == 0) {
if (tight_detect_smooth_image(vs, w, h)) {
int quality = tight_conf[vs->... | true | qemu | ad7ee4ad6c3a5388acf94dd532d291ea6d3a5972 | static int send_sub_rect_jpeg(VncState *vs, int x, int y, int w, int h,
int bg, int fg, int colors,
VncPalette *palette)
{
int ret;
if (colors == 0) {
if (tight_detect_smooth_image(vs, w, h)) {
int quality = tight_conf[vs->... | {
"code": [],
"line_no": []
} | static int FUNC_0(VncState *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4,
int VAR_5, int VAR_6, int VAR_7,
VncPalette *VAR_8)
{
int VAR_9;
if (VAR_7 == 0) {
if (tight_detect_smooth_image(VAR_0, VAR_3, VAR_4)) {
int VAR... | [
"static int FUNC_0(VncState *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4,\nint VAR_5, int VAR_6, int VAR_7,\nVncPalette *VAR_8)\n{",
"int VAR_9;",
"if (VAR_7 == 0) {",
"if (tight_detect_smooth_image(VAR_0, VAR_3, VAR_4)) {",
"int VAR_11 = tight_conf[VAR_0->tight.VAR_11].jpeg_quality;",
"VAR_9 = send... | [
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
],
[
21
],
[
24
],
[
26
],
[
28
],
[
30
],
[
32
],
[
34
],
[
36
],
[
38,
40
],
[
42
],
[
46
],
[
49
],
[
51
],
[... |
7,265 | static uint64_t htonll(uint64_t v)
{
union { uint32_t lv[2]; uint64_t llv; } u;
u.lv[0] = htonl(v >> 32);
u.lv[1] = htonl(v & 0xFFFFFFFFULL);
return u.llv;
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static uint64_t htonll(uint64_t v)
{
union { uint32_t lv[2]; uint64_t llv; } u;
u.lv[0] = htonl(v >> 32);
u.lv[1] = htonl(v & 0xFFFFFFFFULL);
return u.llv;
}
| {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(uint64_t v)
{
union { uint32_t lv[2]; uint64_t llv; } VAR_0;
VAR_0.lv[0] = htonl(v >> 32);
VAR_0.lv[1] = htonl(v & 0xFFFFFFFFULL);
return VAR_0.llv;
}
| [
"static uint64_t FUNC_0(uint64_t v)\n{",
"union { uint32_t lv[2]; uint64_t llv; } VAR_0;",
"VAR_0.lv[0] = htonl(v >> 32);",
"VAR_0.lv[1] = htonl(v & 0xFFFFFFFFULL);",
"return VAR_0.llv;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
7,266 | void op_addo (void)
{
target_ulong tmp;
tmp = T0;
T0 += T1;
if ((T0 >> 31) ^ (T1 >> 31) ^ (tmp >> 31)) {
CALL_FROM_TB1(do_raise_exception_direct, EXCP_OVERFLOW);
}
RETURN();
}
| true | qemu | 76e050c2e62995f1d6905e28674dea3a7fcff1a5 | void op_addo (void)
{
target_ulong tmp;
tmp = T0;
T0 += T1;
if ((T0 >> 31) ^ (T1 >> 31) ^ (tmp >> 31)) {
CALL_FROM_TB1(do_raise_exception_direct, EXCP_OVERFLOW);
}
RETURN();
}
| {
"code": [
" if ((T0 >> 31) ^ (T1 >> 31) ^ (tmp >> 31)) {"
],
"line_no": [
13
]
} | void FUNC_0 (void)
{
target_ulong tmp;
tmp = T0;
T0 += T1;
if ((T0 >> 31) ^ (T1 >> 31) ^ (tmp >> 31)) {
CALL_FROM_TB1(do_raise_exception_direct, EXCP_OVERFLOW);
}
RETURN();
}
| [
"void FUNC_0 (void)\n{",
"target_ulong tmp;",
"tmp = T0;",
"T0 += T1;",
"if ((T0 >> 31) ^ (T1 >> 31) ^ (tmp >> 31)) {",
"CALL_FROM_TB1(do_raise_exception_direct, EXCP_OVERFLOW);",
"}",
"RETURN();",
"}"
] | [
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
7,268 | static av_cold int adpcm_decode_init(AVCodecContext * avctx)
{
ADPCMDecodeContext *c = avctx->priv_data;
unsigned int max_channels = 2;
switch(avctx->codec->id) {
case CODEC_ID_ADPCM_EA_R1:
case CODEC_ID_ADPCM_EA_R2:
case CODEC_ID_ADPCM_EA_R3:
case CODEC_ID_ADPCM_EA_XAS:
m... | true | FFmpeg | e614fac2e6e185a247d722d4e92368b3c3bc4bdb | static av_cold int adpcm_decode_init(AVCodecContext * avctx)
{
ADPCMDecodeContext *c = avctx->priv_data;
unsigned int max_channels = 2;
switch(avctx->codec->id) {
case CODEC_ID_ADPCM_EA_R1:
case CODEC_ID_ADPCM_EA_R2:
case CODEC_ID_ADPCM_EA_R3:
case CODEC_ID_ADPCM_EA_XAS:
m... | {
"code": [
" if(avctx->channels > max_channels){",
" return -1;"
],
"line_no": [
27,
29
]
} | static av_cold int FUNC_0(AVCodecContext * avctx)
{
ADPCMDecodeContext *c = avctx->priv_data;
unsigned int VAR_0 = 2;
switch(avctx->codec->id) {
case CODEC_ID_ADPCM_EA_R1:
case CODEC_ID_ADPCM_EA_R2:
case CODEC_ID_ADPCM_EA_R3:
case CODEC_ID_ADPCM_EA_XAS:
VAR_0 = 6;
... | [
"static av_cold int FUNC_0(AVCodecContext * avctx)\n{",
"ADPCMDecodeContext *c = avctx->priv_data;",
"unsigned int VAR_0 = 2;",
"switch(avctx->codec->id) {",
"case CODEC_ID_ADPCM_EA_R1:\ncase CODEC_ID_ADPCM_EA_R2:\ncase CODEC_ID_ADPCM_EA_R3:\ncase CODEC_ID_ADPCM_EA_XAS:\nVAR_0 = 6;",
"break;",
"}",
"i... | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15,
17,
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37,
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
[
51... |
7,270 | static void test_qemu_strtol_max(void)
{
const char *str = g_strdup_printf("%ld", LONG_MAX);
char f = 'X';
const char *endptr = &f;
long res = 999;
int err;
err = qemu_strtol(str, &endptr, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, LONG_MAX);
g_asse... | true | qemu | d6f723b513a0c3c4e58343b7c52a2f9850861fa0 | static void test_qemu_strtol_max(void)
{
const char *str = g_strdup_printf("%ld", LONG_MAX);
char f = 'X';
const char *endptr = &f;
long res = 999;
int err;
err = qemu_strtol(str, &endptr, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, LONG_MAX);
g_asse... | {
"code": [
" const char *str = g_strdup_printf(\"%ld\", LONG_MAX);",
" const char *str = g_strdup_printf(\"%ld\", LONG_MAX);"
],
"line_no": [
5,
5
]
} | static void FUNC_0(void)
{
const char *VAR_0 = g_strdup_printf("%ld", LONG_MAX);
char VAR_1 = 'X';
const char *VAR_2 = &VAR_1;
long VAR_3 = 999;
int VAR_4;
VAR_4 = qemu_strtol(VAR_0, &VAR_2, 0, &VAR_3);
g_assert_cmpint(VAR_4, ==, 0);
g_assert_cmpint(VAR_3, ==, LONG_MAX);
... | [
"static void FUNC_0(void)\n{",
"const char *VAR_0 = g_strdup_printf(\"%ld\", LONG_MAX);",
"char VAR_1 = 'X';",
"const char *VAR_2 = &VAR_1;",
"long VAR_3 = 999;",
"int VAR_4;",
"VAR_4 = qemu_strtol(VAR_0, &VAR_2, 0, &VAR_3);",
"g_assert_cmpint(VAR_4, ==, 0);",
"g_assert_cmpint(VAR_3, ==, LONG_MAX);"... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
7,271 | static int build_vlc(AVCodecContext *avctx, VLC *vlc, const uint32_t *table)
{
Node nodes[512];
uint32_t bits[256];
int16_t lens[256];
uint8_t xlat[256];
int cur_node, i, j, pos = 0;
ff_free_vlc(vlc);
for (i = 0; i < 256; i++) {
nodes[i].count = table[i];
nodes[... | true | FFmpeg | 67b30decf7793523f7fdaef6fdf7f1179ef42b18 | static int build_vlc(AVCodecContext *avctx, VLC *vlc, const uint32_t *table)
{
Node nodes[512];
uint32_t bits[256];
int16_t lens[256];
uint8_t xlat[256];
int cur_node, i, j, pos = 0;
ff_free_vlc(vlc);
for (i = 0; i < 256; i++) {
nodes[i].count = table[i];
nodes[... | {
"code": [
" int nd, st;"
],
"line_no": [
51
]
} | static int FUNC_0(AVCodecContext *VAR_0, VLC *VAR_1, const uint32_t *VAR_2)
{
Node nodes[512];
uint32_t bits[256];
int16_t lens[256];
uint8_t xlat[256];
int VAR_3, VAR_4, VAR_5, VAR_6 = 0;
ff_free_vlc(VAR_1);
for (VAR_4 = 0; VAR_4 < 256; VAR_4++) {
nodes[VAR_4].count = V... | [
"static int FUNC_0(AVCodecContext *VAR_0, VLC *VAR_1, const uint32_t *VAR_2)\n{",
"Node nodes[512];",
"uint32_t bits[256];",
"int16_t lens[256];",
"uint8_t xlat[256];",
"int VAR_3, VAR_4, VAR_5, VAR_6 = 0;",
"ff_free_vlc(VAR_1);",
"for (VAR_4 = 0; VAR_4 < 256; VAR_4++) {",
"nodes[VAR_4].count = VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
7,272 | static inline void dv_guess_qnos(EncBlockInfo* blks, int* qnos)
{
int size[5];
int i, j, k, a, prev, a2;
EncBlockInfo* b;
size[0] = size[1] = size[2] = size[3] = size[4] = 1<<24;
do {
b = blks;
for (i=0; i<5; i++) {
if (!qnos[i])
continue;
... | false | FFmpeg | d676478c8d29a48f67526afef44c323b74946488 | static inline void dv_guess_qnos(EncBlockInfo* blks, int* qnos)
{
int size[5];
int i, j, k, a, prev, a2;
EncBlockInfo* b;
size[0] = size[1] = size[2] = size[3] = size[4] = 1<<24;
do {
b = blks;
for (i=0; i<5; i++) {
if (!qnos[i])
continue;
... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(EncBlockInfo* VAR_0, int* VAR_1)
{
int VAR_2[5];
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;
EncBlockInfo* b;
VAR_2[0] = VAR_2[1] = VAR_2[2] = VAR_2[3] = VAR_2[4] = 1<<24;
do {
b = VAR_0;
for (VAR_3=0; VAR_3<5; VAR_3++) {
if (!VAR_1[VAR_... | [
"static inline void FUNC_0(EncBlockInfo* VAR_0, int* VAR_1)\n{",
"int VAR_2[5];",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;",
"EncBlockInfo* b;",
"VAR_2[0] = VAR_2[1] = VAR_2[2] = VAR_2[3] = VAR_2[4] = 1<<24;",
"do {",
"b = VAR_0;",
"for (VAR_3=0; VAR_3<5; VAR_3++) {",
"if (!VAR_1[VAR_3])\ncont... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
7,273 | static int vtenc_cm_to_avpacket(
AVCodecContext *avctx,
CMSampleBufferRef sample_buffer,
AVPacket *pkt,
ExtraSEI *sei)
{
VTEncContext *vtctx = avctx->priv_data;
int status;
bool is_key_frame;
bool add_header;
size_t length_code_size;
s... | false | FFmpeg | 9875695e2ceec413f072ac2ef7e8fbc6a4980294 | static int vtenc_cm_to_avpacket(
AVCodecContext *avctx,
CMSampleBufferRef sample_buffer,
AVPacket *pkt,
ExtraSEI *sei)
{
VTEncContext *vtctx = avctx->priv_data;
int status;
bool is_key_frame;
bool add_header;
size_t length_code_size;
s... | {
"code": [],
"line_no": []
} | static int FUNC_0(
AVCodecContext *VAR_0,
CMSampleBufferRef VAR_1,
AVPacket *VAR_2,
ExtraSEI *VAR_3)
{
VTEncContext *vtctx = VAR_0->priv_data;
int VAR_6;
bool is_key_frame;
bool add_header;
size_t length_code_size;
size_t header_size ... | [
"static int FUNC_0(\nAVCodecContext *VAR_0,\nCMSampleBufferRef VAR_1,\nAVPacket *VAR_2,\nExtraSEI *VAR_3)\n{",
"VTEncContext *vtctx = VAR_0->priv_data;",
"int VAR_6;",
"bool is_key_frame;",
"bool add_header;",
"size_t length_code_size;",
"size_t header_size = 0;",
"siz... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
49
],
[
51
... |
7,274 | AVFormatContext *avformat_alloc_context(void)
{
AVFormatContext *ic;
ic = av_malloc(sizeof(AVFormatContext));
if (!ic) return ic;
avformat_get_context_defaults(ic);
ic->av_class = &av_format_context_class;
return ic;
}
| false | FFmpeg | 9ac1bf88c00dbe7eb2191e2d5325fb104b9d8341 | AVFormatContext *avformat_alloc_context(void)
{
AVFormatContext *ic;
ic = av_malloc(sizeof(AVFormatContext));
if (!ic) return ic;
avformat_get_context_defaults(ic);
ic->av_class = &av_format_context_class;
return ic;
}
| {
"code": [],
"line_no": []
} | AVFormatContext *FUNC_0(void)
{
AVFormatContext *ic;
ic = av_malloc(sizeof(AVFormatContext));
if (!ic) return ic;
avformat_get_context_defaults(ic);
ic->av_class = &av_format_context_class;
return ic;
}
| [
"AVFormatContext *FUNC_0(void)\n{",
"AVFormatContext *ic;",
"ic = av_malloc(sizeof(AVFormatContext));",
"if (!ic) return ic;",
"avformat_get_context_defaults(ic);",
"ic->av_class = &av_format_context_class;",
"return ic;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
7,275 | offset_t url_filesize(URLContext *h)
{
offset_t pos, size;
size= url_seek(h, 0, AVSEEK_SIZE);
if(size<0){
pos = url_seek(h, 0, SEEK_CUR);
size = url_seek(h, -1, SEEK_END)+1;
url_seek(h, pos, SEEK_SET);
}
return size;
}
| false | FFmpeg | eabbae730cf732afeb7c2a085e0e5c1e7b1b8614 | offset_t url_filesize(URLContext *h)
{
offset_t pos, size;
size= url_seek(h, 0, AVSEEK_SIZE);
if(size<0){
pos = url_seek(h, 0, SEEK_CUR);
size = url_seek(h, -1, SEEK_END)+1;
url_seek(h, pos, SEEK_SET);
}
return size;
}
| {
"code": [],
"line_no": []
} | offset_t FUNC_0(URLContext *h)
{
offset_t pos, size;
size= url_seek(h, 0, AVSEEK_SIZE);
if(size<0){
pos = url_seek(h, 0, SEEK_CUR);
size = url_seek(h, -1, SEEK_END)+1;
url_seek(h, pos, SEEK_SET);
}
return size;
}
| [
"offset_t FUNC_0(URLContext *h)\n{",
"offset_t pos, size;",
"size= url_seek(h, 0, AVSEEK_SIZE);",
"if(size<0){",
"pos = url_seek(h, 0, SEEK_CUR);",
"size = url_seek(h, -1, SEEK_END)+1;",
"url_seek(h, pos, SEEK_SET);",
"}",
"return size;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
7,276 | static av_noinline void FUNC(hl_decode_mb)(const H264Context *h, H264SliceContext *sl)
{
const int mb_x = sl->mb_x;
const int mb_y = sl->mb_y;
const int mb_xy = sl->mb_xy;
const int mb_type = h->cur_pic.mb_type[mb_xy];
uint8_t *dest_y, *dest_cb, *dest_cr;
int linesize, uvlinesize ... | false | FFmpeg | 3176217c60ca7828712985092d9102d331ea4f3d | static av_noinline void FUNC(hl_decode_mb)(const H264Context *h, H264SliceContext *sl)
{
const int mb_x = sl->mb_x;
const int mb_y = sl->mb_y;
const int mb_xy = sl->mb_xy;
const int mb_type = h->cur_pic.mb_type[mb_xy];
uint8_t *dest_y, *dest_cb, *dest_cr;
int linesize, uvlinesize ... | {
"code": [],
"line_no": []
} | static av_noinline void FUNC_0(hl_decode_mb)(const H264Context *h, H264SliceContext *sl)
{
const int VAR_0 = sl->VAR_0;
const int VAR_1 = sl->VAR_1;
const int VAR_2 = sl->VAR_2;
const int VAR_3 = h->cur_pic.VAR_3[VAR_2];
uint8_t *dest_y, *dest_cb, *dest_cr;
int VAR_4, VAR_5 ;
... | [
"static av_noinline void FUNC_0(hl_decode_mb)(const H264Context *h, H264SliceContext *sl)\n{",
"const int VAR_0 = sl->VAR_0;",
"const int VAR_1 = sl->VAR_1;",
"const int VAR_2 = sl->VAR_2;",
"const int VAR_3 = h->cur_pic.VAR_3[VAR_2];",
"uint8_t *dest_y, *dest_cb, *dest_cr;",
"int VAR_4, VAR_5 ;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
49
... |
7,277 | static int rtp_read(URLContext *h, uint8_t *buf, int size)
{
RTPContext *s = h->priv_data;
struct sockaddr_storage from;
socklen_t from_len;
int len, fd_max, n;
fd_set rfds;
struct timeval tv;
#if 0
for(;;) {
from_len = sizeof(from);
len = recvfrom (s->rtp_fd, buf,... | false | FFmpeg | d0eb91ad0451cdb6c062b2d4760bfa7f8bb4db6b | static int rtp_read(URLContext *h, uint8_t *buf, int size)
{
RTPContext *s = h->priv_data;
struct sockaddr_storage from;
socklen_t from_len;
int len, fd_max, n;
fd_set rfds;
struct timeval tv;
#if 0
for(;;) {
from_len = sizeof(from);
len = recvfrom (s->rtp_fd, buf,... | {
"code": [],
"line_no": []
} | static int FUNC_0(URLContext *VAR_0, uint8_t *VAR_1, int VAR_2)
{
RTPContext *s = VAR_0->priv_data;
struct sockaddr_storage VAR_3;
socklen_t from_len;
int VAR_4, VAR_5, VAR_6;
fd_set rfds;
struct timeval VAR_7;
#if 0
for(;;) {
from_len = sizeof(VAR_3);
VAR_4 = recv... | [
"static int FUNC_0(URLContext *VAR_0, uint8_t *VAR_1, int VAR_2)\n{",
"RTPContext *s = VAR_0->priv_data;",
"struct sockaddr_storage VAR_3;",
"socklen_t from_len;",
"int VAR_4, VAR_5, VAR_6;",
"fd_set rfds;",
"struct timeval VAR_7;",
"#if 0\nfor(;;) {",
"from_len = sizeof(VAR_3);",
"VAR_4 = recvfro... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[... |
7,278 | static int load_apply_palette(FFFrameSync *fs)
{
AVFilterContext *ctx = fs->parent;
AVFilterLink *inlink = ctx->inputs[0];
PaletteUseContext *s = ctx->priv;
AVFrame *master, *second, *out;
int ret;
// writable for error diffusal dithering
ret = ff_framesync_dualinput_get_writable(f... | false | FFmpeg | 6470abc740367cc881c181db866891f8dd1d342f | static int load_apply_palette(FFFrameSync *fs)
{
AVFilterContext *ctx = fs->parent;
AVFilterLink *inlink = ctx->inputs[0];
PaletteUseContext *s = ctx->priv;
AVFrame *master, *second, *out;
int ret;
ret = ff_framesync_dualinput_get_writable(fs, &master, &second);
if (ret < 0)
... | {
"code": [],
"line_no": []
} | static int FUNC_0(FFFrameSync *VAR_0)
{
AVFilterContext *ctx = VAR_0->parent;
AVFilterLink *inlink = ctx->inputs[0];
PaletteUseContext *s = ctx->priv;
AVFrame *master, *second, *out;
int VAR_1;
VAR_1 = ff_framesync_dualinput_get_writable(VAR_0, &master, &second);
if (VAR_1 < ... | [
"static int FUNC_0(FFFrameSync *VAR_0)\n{",
"AVFilterContext *ctx = VAR_0->parent;",
"AVFilterLink *inlink = ctx->inputs[0];",
"PaletteUseContext *s = ctx->priv;",
"AVFrame *master, *second, *out;",
"int VAR_1;",
"VAR_1 = ff_framesync_dualinput_get_writable(VAR_0, &master, &second);",
"if (VAR_1 < 0)\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45,
47
],
[
49
... |
7,279 | static void test_parse_invalid_path(void)
{
g_test_trap_subprocess ("/logging/parse_invalid_path/subprocess", 0, 0);
g_test_trap_assert_passed();
g_test_trap_assert_stdout("");
g_test_trap_assert_stderr("Bad logfile format: /tmp/qemu-%d%d.log\n");
}
| true | qemu | daa76aa416b1e18ab1fac650ff53d966d8f21f68 | static void test_parse_invalid_path(void)
{
g_test_trap_subprocess ("/logging/parse_invalid_path/subprocess", 0, 0);
g_test_trap_assert_passed();
g_test_trap_assert_stdout("");
g_test_trap_assert_stderr("Bad logfile format: /tmp/qemu-%d%d.log\n");
}
| {
"code": [
" g_test_trap_assert_passed();",
" g_test_trap_assert_stdout(\"\");",
"static void test_parse_invalid_path(void)",
" g_test_trap_subprocess (\"/logging/parse_invalid_path/subprocess\", 0, 0);",
" g_test_trap_assert_passed();",
" g_test_trap_assert_stdout(\"\");",
... | static void FUNC_0(void)
{
g_test_trap_subprocess ("/logging/parse_invalid_path/subprocess", 0, 0);
g_test_trap_assert_passed();
g_test_trap_assert_stdout("");
g_test_trap_assert_stderr("Bad logfile format: /tmp/qemu-%d%d.log\n");
}
| [
"static void FUNC_0(void)\n{",
"g_test_trap_subprocess (\"/logging/parse_invalid_path/subprocess\", 0, 0);",
"g_test_trap_assert_passed();",
"g_test_trap_assert_stdout(\"\");",
"g_test_trap_assert_stderr(\"Bad logfile format: /tmp/qemu-%d%d.log\\n\");",
"}"
] | [
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
7,280 | void bdrv_iterate_format(void (*it)(void *opaque, const char *name),
void *opaque)
{
BlockDriver *drv;
int count = 0;
const char **formats = NULL;
QLIST_FOREACH(drv, &bdrv_drivers, list) {
if (drv->format_name) {
bool found = false;
int... | true | qemu | 5839e53bbc0fec56021d758aab7610df421ed8c8 | void bdrv_iterate_format(void (*it)(void *opaque, const char *name),
void *opaque)
{
BlockDriver *drv;
int count = 0;
const char **formats = NULL;
QLIST_FOREACH(drv, &bdrv_drivers, list) {
if (drv->format_name) {
bool found = false;
int... | {
"code": [
" formats = g_realloc(formats, (count + 1) * sizeof(char *));"
],
"line_no": [
33
]
} | void FUNC_0(void (*VAR_0)(void *VAR_3, const char *VAR_2),
void *VAR_3)
{
BlockDriver *drv;
int VAR_3 = 0;
const char **VAR_4 = NULL;
QLIST_FOREACH(drv, &bdrv_drivers, list) {
if (drv->format_name) {
bool found = false;
int i = VAR_3;
... | [
"void FUNC_0(void (*VAR_0)(void *VAR_3, const char *VAR_2),\nvoid *VAR_3)\n{",
"BlockDriver *drv;",
"int VAR_3 = 0;",
"const char **VAR_4 = NULL;",
"QLIST_FOREACH(drv, &bdrv_drivers, list) {",
"if (drv->format_name) {",
"bool found = false;",
"int i = VAR_3;",
"while (VAR_4 && i && !found) {",
"fo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
7,281 | static int ea_read_header(AVFormatContext *s,
AVFormatParameters *ap)
{
EaDemuxContext *ea = s->priv_data;
AVStream *st;
if (!process_ea_header(s))
return AVERROR(EIO);
if (ea->video_codec) {
/* initialize the video decoder stream */
st = av... | true | FFmpeg | 73b16198b6cab1cdafa46143aae7a69e10e130fd | static int ea_read_header(AVFormatContext *s,
AVFormatParameters *ap)
{
EaDemuxContext *ea = s->priv_data;
AVStream *st;
if (!process_ea_header(s))
return AVERROR(EIO);
if (ea->video_codec) {
st = avformat_new_stream(s, NULL);
if (... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0,
AVFormatParameters *VAR_1)
{
EaDemuxContext *ea = VAR_0->priv_data;
AVStream *st;
if (!process_ea_header(VAR_0))
return AVERROR(EIO);
if (ea->video_codec) {
st = avformat_new_stream(VAR_0, NULL);
... | [
"static int FUNC_0(AVFormatContext *VAR_0,\nAVFormatParameters *VAR_1)\n{",
"EaDemuxContext *ea = VAR_0->priv_data;",
"AVStream *st;",
"if (!process_ea_header(VAR_0))\nreturn AVERROR(EIO);",
"if (ea->video_codec) {",
"st = avformat_new_stream(VAR_0, NULL);",
"if (!st)\nreturn AVERROR(ENOMEM);",
"ea->v... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
46
],
[
48
],
[
50
],
[
52
],
[... |
7,282 | static int ac3_encode_frame(AVCodecContext *avctx, unsigned char *frame,
int buf_size, void *data)
{
AC3EncodeContext *s = avctx->priv_data;
const SampleType *samples = data;
int ret;
if (s->bit_alloc.sr_code == 1)
adjust_frame_size(s);
deinterleave_in... | true | FFmpeg | 323e6fead07c75f418e4b60704a4f437bb3483b2 | static int ac3_encode_frame(AVCodecContext *avctx, unsigned char *frame,
int buf_size, void *data)
{
AC3EncodeContext *s = avctx->priv_data;
const SampleType *samples = data;
int ret;
if (s->bit_alloc.sr_code == 1)
adjust_frame_size(s);
deinterleave_in... | {
"code": [
" compute_rematrixing_strategy(s);"
],
"line_no": [
29
]
} | static int FUNC_0(AVCodecContext *VAR_0, unsigned char *VAR_1,
int VAR_2, void *VAR_3)
{
AC3EncodeContext *s = VAR_0->priv_data;
const SampleType *VAR_4 = VAR_3;
int VAR_5;
if (s->bit_alloc.sr_code == 1)
adjust_frame_size(s);
deinterleave_input_samples... | [
"static int FUNC_0(AVCodecContext *VAR_0, unsigned char *VAR_1,\nint VAR_2, void *VAR_3)\n{",
"AC3EncodeContext *s = VAR_0->priv_data;",
"const SampleType *VAR_4 = VAR_3;",
"int VAR_5;",
"if (s->bit_alloc.sr_code == 1)\nadjust_frame_size(s);",
"deinterleave_input_samples(s, VAR_4);",
"apply_mdct(s);",
... | [
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
],
[
15,
17
],
[
21
],
[
25
],
[
29
],
[
33
],
[
37
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
57
],
[
61
],
[
65
... |
7,283 | static void rm_read_audio_stream_info(AVFormatContext *s, AVStream *st,
int read_all)
{
RMContext *rm = s->priv_data;
ByteIOContext *pb = &s->pb;
char buf[256];
uint32_t version;
int i;
/* ra type header */
version = get_be32(pb); /* version *... | true | FFmpeg | a9d4a6ef3437d316450c2e30b9ed6a8fd4df4804 | static void rm_read_audio_stream_info(AVFormatContext *s, AVStream *st,
int read_all)
{
RMContext *rm = s->priv_data;
ByteIOContext *pb = &s->pb;
char buf[256];
uint32_t version;
int i;
version = get_be32(pb);
if (((version >> 16) & 0xf... | {
"code": [
"static void rm_read_audio_stream_info(AVFormatContext *s, AVStream *st,"
],
"line_no": [
1
]
} | static void FUNC_0(AVFormatContext *VAR_0, AVStream *VAR_1,
int VAR_2)
{
RMContext *rm = VAR_0->priv_data;
ByteIOContext *pb = &VAR_0->pb;
char VAR_3[256];
uint32_t version;
int VAR_10;
version = get_be32(pb);
if (((version >> 16) & 0xf... | [
"static void FUNC_0(AVFormatContext *VAR_0, AVStream *VAR_1,\nint VAR_2)\n{",
"RMContext *rm = VAR_0->priv_data;",
"ByteIOContext *pb = &VAR_0->pb;",
"char VAR_3[256];",
"uint32_t version;",
"int VAR_10;",
"version = get_be32(pb);",
"if (((version >> 16) & 0xff) == 3) {",
"int64_t startpos = url_fte... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[... |
7,284 | static void term_init(void)
{
#if HAVE_TERMIOS_H
if(!run_as_daemon){
struct termios tty;
tcgetattr (0, &tty);
oldtty = tty;
atexit(term_exit);
tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
|INLCR|IGNCR|ICRNL|IXON);
tty.c_oflag |= OPOST;
tty.c_lflag... | true | FFmpeg | 71a2c9b26567e2294b54eedafeb23aee08563de7 | static void term_init(void)
{
#if HAVE_TERMIOS_H
if(!run_as_daemon){
struct termios tty;
tcgetattr (0, &tty);
oldtty = tty;
atexit(term_exit);
tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
|INLCR|IGNCR|ICRNL|IXON);
tty.c_oflag |= OPOST;
tty.c_lflag... | {
"code": [
" tcgetattr (0, &tty);"
],
"line_no": [
13
]
} | static void FUNC_0(void)
{
#if HAVE_TERMIOS_H
if(!run_as_daemon){
struct termios tty;
tcgetattr (0, &tty);
oldtty = tty;
atexit(term_exit);
tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
|INLCR|IGNCR|ICRNL|IXON);
tty.c_oflag |= OPOST;
tty.c_lflag &=... | [
"static void FUNC_0(void)\n{",
"#if HAVE_TERMIOS_H\nif(!run_as_daemon){",
"struct termios tty;",
"tcgetattr (0, &tty);",
"oldtty = tty;",
"atexit(term_exit);",
"tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP\n|INLCR|IGNCR|ICRNL|IXON);",
"tty.c_oflag |= OPOST;",
"tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEX... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
51
],
[... |
7,285 | static int tcp_write_packet(AVFormatContext *s, RTSPStream *rtsp_st)
{
RTSPState *rt = s->priv_data;
AVFormatContext *rtpctx = rtsp_st->transport_priv;
uint8_t *buf, *ptr;
int size;
uint8_t *interleave_header, *interleaved_packet;
size = avio_close_dyn_buf(rtpctx->pb, &buf);
ptr = ... | true | FFmpeg | f542dedf72091af8e6f32a12bd64289c58857c21 | static int tcp_write_packet(AVFormatContext *s, RTSPStream *rtsp_st)
{
RTSPState *rt = s->priv_data;
AVFormatContext *rtpctx = rtsp_st->transport_priv;
uint8_t *buf, *ptr;
int size;
uint8_t *interleave_header, *interleaved_packet;
size = avio_close_dyn_buf(rtpctx->pb, &buf);
ptr = ... | {
"code": [
" ffio_open_dyn_packet_buf(&rtpctx->pb, RTSP_TCP_MAX_PACKET_SIZE);",
" return 0;"
],
"line_no": [
71,
73
]
} | static int FUNC_0(AVFormatContext *VAR_0, RTSPStream *VAR_1)
{
RTSPState *rt = VAR_0->priv_data;
AVFormatContext *rtpctx = VAR_1->transport_priv;
uint8_t *buf, *ptr;
int VAR_2;
uint8_t *interleave_header, *interleaved_packet;
VAR_2 = avio_close_dyn_buf(rtpctx->pb, &buf);
ptr = buf;... | [
"static int FUNC_0(AVFormatContext *VAR_0, RTSPStream *VAR_1)\n{",
"RTSPState *rt = VAR_0->priv_data;",
"AVFormatContext *rtpctx = VAR_1->transport_priv;",
"uint8_t *buf, *ptr;",
"int VAR_2;",
"uint8_t *interleave_header, *interleaved_packet;",
"VAR_2 = avio_close_dyn_buf(rtpctx->pb, &buf);",
"ptr = b... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47,
49
],
[
51,
53
],
[
55
],
[... |
7,286 | static int virtio_blk_load(QEMUFile *f, void *opaque, int version_id)
{
VirtIOBlock *s = opaque;
if (version_id != 2)
return -EINVAL;
virtio_load(&s->vdev, f);
while (qemu_get_sbyte(f)) {
VirtIOBlockReq *req = virtio_blk_alloc_request(s);
qemu_get_buffer(f, (unsigned ... | true | qemu | 2a633c461e96cb9a856292c46917653bd43959c8 | static int virtio_blk_load(QEMUFile *f, void *opaque, int version_id)
{
VirtIOBlock *s = opaque;
if (version_id != 2)
return -EINVAL;
virtio_load(&s->vdev, f);
while (qemu_get_sbyte(f)) {
VirtIOBlockReq *req = virtio_blk_alloc_request(s);
qemu_get_buffer(f, (unsigned ... | {
"code": [
" virtio_load(&s->vdev, f);",
" virtio_load(&s->vdev, f);",
" virtio_load(&s->vdev, f);",
" virtio_load(&s->vdev, f);"
],
"line_no": [
15,
15,
15,
15
]
} | static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, int VAR_2)
{
VirtIOBlock *s = VAR_1;
if (VAR_2 != 2)
return -EINVAL;
virtio_load(&s->vdev, VAR_0);
while (qemu_get_sbyte(VAR_0)) {
VirtIOBlockReq *req = virtio_blk_alloc_request(s);
qemu_get_buffer(VAR_0, (unsigned char*... | [
"static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, int VAR_2)\n{",
"VirtIOBlock *s = VAR_1;",
"if (VAR_2 != 2)\nreturn -EINVAL;",
"virtio_load(&s->vdev, VAR_0);",
"while (qemu_get_sbyte(VAR_0)) {",
"VirtIOBlockReq *req = virtio_blk_alloc_request(s);",
"qemu_get_buffer(VAR_0, (unsigned char*)&req->elem, si... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
33,
35
],
[
37
],
[
41
],
[
43
]
] |
7,287 | static TRBCCode xhci_disable_ep(XHCIState *xhci, unsigned int slotid,
unsigned int epid)
{
XHCISlot *slot;
XHCIEPContext *epctx;
int i;
trace_usb_xhci_ep_disable(slotid, epid);
assert(slotid >= 1 && slotid <= xhci->numslots);
assert(epid >= 1 && epid <= 3... | true | qemu | 491d68d9382dbb588f2ff5132ee3d87ce2f1b230 | static TRBCCode xhci_disable_ep(XHCIState *xhci, unsigned int slotid,
unsigned int epid)
{
XHCISlot *slot;
XHCIEPContext *epctx;
int i;
trace_usb_xhci_ep_disable(slotid, epid);
assert(slotid >= 1 && slotid <= xhci->numslots);
assert(epid >= 1 && epid <= 3... | {
"code": [
" xhci_set_ep_state(xhci, epctx, NULL, EP_DISABLED);"
],
"line_no": [
61
]
} | static TRBCCode FUNC_0(XHCIState *xhci, unsigned int slotid,
unsigned int epid)
{
XHCISlot *slot;
XHCIEPContext *epctx;
int VAR_0;
trace_usb_xhci_ep_disable(slotid, epid);
assert(slotid >= 1 && slotid <= xhci->numslots);
assert(epid >= 1 && epid <= 31);
... | [
"static TRBCCode FUNC_0(XHCIState *xhci, unsigned int slotid,\nunsigned int epid)\n{",
"XHCISlot *slot;",
"XHCIEPContext *epctx;",
"int VAR_0;",
"trace_usb_xhci_ep_disable(slotid, epid);",
"assert(slotid >= 1 && slotid <= xhci->numslots);",
"assert(epid >= 1 && epid <= 31);",
"slot = &xhci->slots[slot... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
],
[... |
7,289 | static void parse_mb_skip(Wmv2Context *w)
{
int mb_x, mb_y;
MpegEncContext *const s = &w->s;
uint32_t *const mb_type = s->current_picture_ptr->mb_type;
w->skip_type = get_bits(&s->gb, 2);
switch (w->skip_type) {
case SKIP_TYPE_NONE:
for (mb_y = 0; mb_y < s->mb_height; mb_y++)
... | true | FFmpeg | 65e0a7c473f23f1833538ffecf53c81fe500b5e4 | static void parse_mb_skip(Wmv2Context *w)
{
int mb_x, mb_y;
MpegEncContext *const s = &w->s;
uint32_t *const mb_type = s->current_picture_ptr->mb_type;
w->skip_type = get_bits(&s->gb, 2);
switch (w->skip_type) {
case SKIP_TYPE_NONE:
for (mb_y = 0; mb_y < s->mb_height; mb_y++)
... | {
"code": [
"static void parse_mb_skip(Wmv2Context *w)"
],
"line_no": [
1
]
} | static void FUNC_0(Wmv2Context *VAR_0)
{
int VAR_1, VAR_2;
MpegEncContext *const s = &VAR_0->s;
uint32_t *const mb_type = s->current_picture_ptr->mb_type;
VAR_0->skip_type = get_bits(&s->gb, 2);
switch (VAR_0->skip_type) {
case SKIP_TYPE_NONE:
for (VAR_2 = 0; VAR_2 < s->mb_heig... | [
"static void FUNC_0(Wmv2Context *VAR_0)\n{",
"int VAR_1, VAR_2;",
"MpegEncContext *const s = &VAR_0->s;",
"uint32_t *const mb_type = s->current_picture_ptr->mb_type;",
"VAR_0->skip_type = get_bits(&s->gb, 2);",
"switch (VAR_0->skip_type) {",
"case SKIP_TYPE_NONE:\nfor (VAR_2 = 0; VAR_2 < s->mb_height; V... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[... |
7,290 | static void qemu_chr_free_common(CharDriverState *chr)
{
g_free(chr->filename);
g_free(chr->label);
if (chr->logfd != -1) {
close(chr->logfd);
qemu_mutex_destroy(&chr->chr_write_lock);
g_free(chr);
| true | qemu | 94a40fc56036b5058b0b194d9e372a22e65ce7be | static void qemu_chr_free_common(CharDriverState *chr)
{
g_free(chr->filename);
g_free(chr->label);
if (chr->logfd != -1) {
close(chr->logfd);
qemu_mutex_destroy(&chr->chr_write_lock);
g_free(chr);
| {
"code": [],
"line_no": []
} | static void FUNC_0(CharDriverState *VAR_0)
{
g_free(VAR_0->filename);
g_free(VAR_0->label);
if (VAR_0->logfd != -1) {
close(VAR_0->logfd);
qemu_mutex_destroy(&VAR_0->chr_write_lock);
g_free(VAR_0);
| [
"static void FUNC_0(CharDriverState *VAR_0)\n{",
"g_free(VAR_0->filename);",
"g_free(VAR_0->label);",
"if (VAR_0->logfd != -1) {",
"close(VAR_0->logfd);",
"qemu_mutex_destroy(&VAR_0->chr_write_lock);",
"g_free(VAR_0);"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
8
],
[
10
],
[
12
],
[
14
],
[
17
],
[
19
]
] |
7,291 | void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,
int is_asi, int size)
{
CPUState *saved_env;
int fault_type;
/* XXX: hack to restore env in all cases, even if not called from
generated code */
saved_env = env;
env = cpu_single_... | true | qemu | b14ef7c9ab41ea824c3ccadb070ad95567cca84e | void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,
int is_asi, int size)
{
CPUState *saved_env;
int fault_type;
saved_env = env;
env = cpu_single_env;
#ifdef DEBUG_UNASSIGNED
if (is_asi)
printf("Unassigned mem %s access ... | {
"code": [
"void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,",
"void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,",
" int is_asi, int size)",
" env = cpu_single_env;",
"void do_unassigned_access(target_phys_addr_... | void FUNC_0(target_phys_addr_t VAR_0, int VAR_1, int VAR_2,
int VAR_3, int VAR_4)
{
CPUState *saved_env;
int VAR_5;
saved_env = env;
env = cpu_single_env;
#ifdef DEBUG_UNASSIGNED
if (VAR_3)
printf("Unassigned mem %s access of %d byte%s to " TARGET... | [
"void FUNC_0(target_phys_addr_t VAR_0, int VAR_1, int VAR_2,\nint VAR_3, int VAR_4)\n{",
"CPUState *saved_env;",
"int VAR_5;",
"saved_env = env;",
"env = cpu_single_env;",
"#ifdef DEBUG_UNASSIGNED\nif (VAR_3)\nprintf(\"Unassigned mem %s access of %d byte%s to \" TARGET_FMT_plx\n\" asi 0x%02x from \" TARGE... | [
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
17
],
[
19
],
[
21,
23,
25,
27,
29,
31
],
[
33,
35,
37,
39,
41
],
[
43,
47
],
[
49
],
[
51
],
[
53,
55
],
[
57,
59
],
[
61,
63
... |
7,292 | int coroutine_fn bdrv_co_flush(BlockDriverState *bs)
{
int ret;
BdrvTrackedRequest req;
if (!bs || !bdrv_is_inserted(bs) || bdrv_is_read_only(bs) ||
bdrv_is_sg(bs)) {
return 0;
}
tracked_request_begin(&req, bs, 0, 0, BDRV_TRACKED_FLUSH);
int current_gen = bs->write_gen;
/* Wa... | true | qemu | 3ff2f67a7c24183fcbcfe1332e5223ac6f96438c | int coroutine_fn bdrv_co_flush(BlockDriverState *bs)
{
int ret;
BdrvTrackedRequest req;
if (!bs || !bdrv_is_inserted(bs) || bdrv_is_read_only(bs) ||
bdrv_is_sg(bs)) {
return 0;
}
tracked_request_begin(&req, bs, 0, 0, BDRV_TRACKED_FLUSH);
int current_gen = bs->write_gen;
... | {
"code": [],
"line_no": []
} | int VAR_0 bdrv_co_flush(BlockDriverState *bs)
{
int ret;
BdrvTrackedRequest req;
if (!bs || !bdrv_is_inserted(bs) || bdrv_is_read_only(bs) ||
bdrv_is_sg(bs)) {
return 0;
}
tracked_request_begin(&req, bs, 0, 0, BDRV_TRACKED_FLUSH);
int current_gen = bs->write_gen;
while (... | [
"int VAR_0 bdrv_co_flush(BlockDriverState *bs)\n{",
"int ret;",
"BdrvTrackedRequest req;",
"if (!bs || !bdrv_is_inserted(bs) || bdrv_is_read_only(bs) ||\nbdrv_is_sg(bs)) {",
"return 0;",
"}",
"tracked_request_begin(&req, bs, 0, 0, BDRV_TRACKED_FLUSH);",
"int current_gen = bs->write_gen;",
"while (bs... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5,
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
12
],
[
13
],
[
14
],
[
15
],
[
17
],
[
18
],
[
19
],
[
20
],
[
22
],
[
23
],
[
24
],
[
... |
7,293 | static int modify_current_stream(HTTPContext *c, char *rates)
{
int i;
FFStream *req = c->stream;
int action_required = 0;
for (i = 0; i < req->nb_streams; i++) {
AVCodecContext *codec = &req->streams[i]->codec;
switch(rates[i]) {
case 0:
c->switch_feed_stream... | true | FFmpeg | 001bcd29556b32c1afd686c03f6bdd65dd0e9a36 | static int modify_current_stream(HTTPContext *c, char *rates)
{
int i;
FFStream *req = c->stream;
int action_required = 0;
for (i = 0; i < req->nb_streams; i++) {
AVCodecContext *codec = &req->streams[i]->codec;
switch(rates[i]) {
case 0:
c->switch_feed_stream... | {
"code": [],
"line_no": []
} | static int FUNC_0(HTTPContext *VAR_0, char *VAR_1)
{
int VAR_2;
FFStream *req = VAR_0->stream;
int VAR_3 = 0;
for (VAR_2 = 0; VAR_2 < req->nb_streams; VAR_2++) {
AVCodecContext *codec = &req->streams[VAR_2]->codec;
switch(VAR_1[VAR_2]) {
case 0:
VAR_0->switch_... | [
"static int FUNC_0(HTTPContext *VAR_0, char *VAR_1)\n{",
"int VAR_2;",
"FFStream *req = VAR_0->stream;",
"int VAR_3 = 0;",
"for (VAR_2 = 0; VAR_2 < req->nb_streams; VAR_2++) {",
"AVCodecContext *codec = &req->streams[VAR_2]->codec;",
"switch(VAR_1[VAR_2]) {",
"case 0:\nVAR_0->switch_feed_streams[VAR_2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9,
10
],
[
11
],
[
12,
13
],
[
14
],
[
15,
17
],
[
18,
20
],
[
21
],
[
22,
23
],
[
24
],
[
25,
26
],... |
7,294 | static int cirrus_bitblt_cputovideo(CirrusVGAState * s)
{
int w;
if (blit_is_unsafe(s, true)) {
return 0;
}
s->cirrus_blt_mode &= ~CIRRUS_BLTMODE_MEMSYSSRC;
s->cirrus_srcptr = &s->cirrus_bltbuf[0];
s->cirrus_srcptr_end = &s->cirrus_bltbuf[0];
if (s->cirrus_blt_mode & CIRRUS_BLTMODE_P... | true | qemu | 92f2b88cea48c6aeba8de568a45f2ed958f3c298 | static int cirrus_bitblt_cputovideo(CirrusVGAState * s)
{
int w;
if (blit_is_unsafe(s, true)) {
return 0;
}
s->cirrus_blt_mode &= ~CIRRUS_BLTMODE_MEMSYSSRC;
s->cirrus_srcptr = &s->cirrus_bltbuf[0];
s->cirrus_srcptr_end = &s->cirrus_bltbuf[0];
if (s->cirrus_blt_mode & CIRRUS_BLTMODE_P... | {
"code": [],
"line_no": []
} | static int FUNC_0(CirrusVGAState * VAR_0)
{
int VAR_1;
if (blit_is_unsafe(VAR_0, true)) {
return 0;
}
VAR_0->cirrus_blt_mode &= ~CIRRUS_BLTMODE_MEMSYSSRC;
VAR_0->cirrus_srcptr = &VAR_0->cirrus_bltbuf[0];
VAR_0->cirrus_srcptr_end = &VAR_0->cirrus_bltbuf[0];
if (VAR_0->cirrus_blt_mode ... | [
"static int FUNC_0(CirrusVGAState * VAR_0)\n{",
"int VAR_1;",
"if (blit_is_unsafe(VAR_0, true)) {",
"return 0;",
"}",
"VAR_0->cirrus_blt_mode &= ~CIRRUS_BLTMODE_MEMSYSSRC;",
"VAR_0->cirrus_srcptr = &VAR_0->cirrus_bltbuf[0];",
"VAR_0->cirrus_srcptr_end = &VAR_0->cirrus_bltbuf[0];",
"if (VAR_0->cirrus... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21,
22
],
[
... |
7,296 | static void vfio_amd_xgbe_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
VFIOAmdXgbeDeviceClass *vcxc =
VFIO_AMD_XGBE_DEVICE_CLASS(klass);
vcxc->parent_realize = dc->realize;
dc->realize = amd_xgbe_realize;
dc->desc = "VFIO AMD XGBE";
dc->vmsd... | true | qemu | e4f4fb1eca795e36f363b4647724221e774523c1 | static void vfio_amd_xgbe_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
VFIOAmdXgbeDeviceClass *vcxc =
VFIO_AMD_XGBE_DEVICE_CLASS(klass);
vcxc->parent_realize = dc->realize;
dc->realize = amd_xgbe_realize;
dc->desc = "VFIO AMD XGBE";
dc->vmsd... | {
"code": [],
"line_no": []
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
VFIOAmdXgbeDeviceClass *vcxc =
VFIO_AMD_XGBE_DEVICE_CLASS(VAR_0);
vcxc->parent_realize = dc->realize;
dc->realize = amd_xgbe_realize;
dc->desc = "VFIO AMD XGBE";
dc->vmsd = &vfio_platform... | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"VFIOAmdXgbeDeviceClass *vcxc =\nVFIO_AMD_XGBE_DEVICE_CLASS(VAR_0);",
"vcxc->parent_realize = dc->realize;",
"dc->realize = amd_xgbe_realize;",
"dc->desc = \"VFIO AMD XGBE\";",
"dc->vmsd = &vfio_platform_... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
]
] |
7,297 | static int hls_window(AVFormatContext *s, int last)
{
HLSContext *hls = s->priv_data;
HLSSegment *en;
int target_duration = 0;
int ret = 0;
AVIOContext *out = NULL;
AVIOContext *sub_out = NULL;
char temp_filename[1024];
int64_t sequence = FFMAX(hls->start_sequence, hls->sequence... | true | FFmpeg | c3e279e75227946046ccb447d355b557118a616c | static int hls_window(AVFormatContext *s, int last)
{
HLSContext *hls = s->priv_data;
HLSSegment *en;
int target_duration = 0;
int ret = 0;
AVIOContext *out = NULL;
AVIOContext *sub_out = NULL;
char temp_filename[1024];
int64_t sequence = FFMAX(hls->start_sequence, hls->sequence... | {
"code": [
" } else {",
" if (!((hls->segment_type == SEGMENT_TYPE_FMP4) && (en == hls->segments))) {"
],
"line_no": [
151,
217
]
} | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1)
{
HLSContext *hls = VAR_0->priv_data;
HLSSegment *en;
int VAR_2 = 0;
int VAR_3 = 0;
AVIOContext *out = NULL;
AVIOContext *sub_out = NULL;
char VAR_4[1024];
int64_t sequence = FFMAX(hls->start_sequence, hls->sequence - hls->nb_... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1)\n{",
"HLSContext *hls = VAR_0->priv_data;",
"HLSSegment *en;",
"int VAR_2 = 0;",
"int VAR_3 = 0;",
"AVIOContext *out = NULL;",
"AVIOContext *sub_out = NULL;",
"char VAR_4[1024];",
"int64_t sequence = FFMAX(hls->start_sequence, hls->sequence - hls... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
41
],
[
43
... |
7,298 | static inline void RENAME(nv12ToUV)(uint8_t *dstU, uint8_t *dstV,
const uint8_t *src1, const uint8_t *src2,
int width, uint32_t *unused)
{
RENAME(nvXXtoUV)(dstU, dstV, src1, width);
}
| true | FFmpeg | c3ab0004ae4dffc32494ae84dd15cfaa909a7884 | static inline void RENAME(nv12ToUV)(uint8_t *dstU, uint8_t *dstV,
const uint8_t *src1, const uint8_t *src2,
int width, uint32_t *unused)
{
RENAME(nvXXtoUV)(dstU, dstV, src1, width);
}
| {
"code": [
" int width, uint32_t *unused)",
" int width, uint32_t *unused)"
],
"line_no": [
5,
5
]
} | static inline void FUNC_0(nv12ToUV)(uint8_t *dstU, uint8_t *dstV,
const uint8_t *src1, const uint8_t *src2,
int width, uint32_t *unused)
{
FUNC_0(nvXXtoUV)(dstU, dstV, src1, width);
}
| [
"static inline void FUNC_0(nv12ToUV)(uint8_t *dstU, uint8_t *dstV,\nconst uint8_t *src1, const uint8_t *src2,\nint width, uint32_t *unused)\n{",
"FUNC_0(nvXXtoUV)(dstU, dstV, src1, width);",
"}"
] | [
1,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
]
] |
7,299 | void blk_eject(BlockBackend *blk, bool eject_flag)
{
BlockDriverState *bs = blk_bs(blk);
char *id;
/* blk_eject is only called by qdevified devices */
assert(!blk->legacy_dev);
if (bs) {
bdrv_eject(bs, eject_flag);
id = blk_get_attached_dev_id(blk);
qapi_event_... | true | qemu | c47ee043dc2cc85da710e87524144a720598c096 | void blk_eject(BlockBackend *blk, bool eject_flag)
{
BlockDriverState *bs = blk_bs(blk);
char *id;
assert(!blk->legacy_dev);
if (bs) {
bdrv_eject(bs, eject_flag);
id = blk_get_attached_dev_id(blk);
qapi_event_send_device_tray_moved(blk_name(blk), id,
... | {
"code": [
" id = blk_get_attached_dev_id(blk);",
" qapi_event_send_device_tray_moved(blk_name(blk), id,",
" eject_flag, &error_abort);",
" g_free(id);"
],
"line_no": [
23,
25,
27,
29
]
} | void FUNC_0(BlockBackend *VAR_0, bool VAR_1)
{
BlockDriverState *bs = blk_bs(VAR_0);
char *VAR_2;
assert(!VAR_0->legacy_dev);
if (bs) {
bdrv_eject(bs, VAR_1);
VAR_2 = blk_get_attached_dev_id(VAR_0);
qapi_event_send_device_tray_moved(blk_name(VAR_0), VAR_2,
... | [
"void FUNC_0(BlockBackend *VAR_0, bool VAR_1)\n{",
"BlockDriverState *bs = blk_bs(VAR_0);",
"char *VAR_2;",
"assert(!VAR_0->legacy_dev);",
"if (bs) {",
"bdrv_eject(bs, VAR_1);",
"VAR_2 = blk_get_attached_dev_id(VAR_0);",
"qapi_event_send_device_tray_moved(blk_name(VAR_0), VAR_2,\nVAR_1, &error_abort);... | [
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
17
],
[
19
],
[
23
],
[
25,
27
],
[
29
],
[
33
],
[
35
]
] |
7,300 | static void megasas_scsi_realize(PCIDevice *dev, Error **errp)
{
DeviceState *d = DEVICE(dev);
MegasasState *s = MEGASAS(dev);
MegasasBaseClass *b = MEGASAS_DEVICE_GET_CLASS(s);
uint8_t *pci_conf;
int i, bar_type;
Error *err = NULL;
int ret;
pci_conf = dev->config;
/* P... | true | qemu | ee640c625e190a0c0e6b8966adc0e4720fb75200 | static void megasas_scsi_realize(PCIDevice *dev, Error **errp)
{
DeviceState *d = DEVICE(dev);
MegasasState *s = MEGASAS(dev);
MegasasBaseClass *b = MEGASAS_DEVICE_GET_CLASS(s);
uint8_t *pci_conf;
int i, bar_type;
Error *err = NULL;
int ret;
pci_conf = dev->config;
... | {
"code": [
" &s->mmio_io, b->mmio_bar, 0x3800, 0x68)) {"
],
"line_no": [
89
]
} | static void FUNC_0(PCIDevice *VAR_0, Error **VAR_1)
{
DeviceState *d = DEVICE(VAR_0);
MegasasState *s = MEGASAS(VAR_0);
MegasasBaseClass *b = MEGASAS_DEVICE_GET_CLASS(s);
uint8_t *pci_conf;
int VAR_2, VAR_3;
Error *err = NULL;
int VAR_4;
pci_conf = VAR_0->config;
... | [
"static void FUNC_0(PCIDevice *VAR_0, Error **VAR_1)\n{",
"DeviceState *d = DEVICE(VAR_0);",
"MegasasState *s = MEGASAS(VAR_0);",
"MegasasBaseClass *b = MEGASAS_DEVICE_GET_CLASS(s);",
"uint8_t *pci_conf;",
"int VAR_2, VAR_3;",
"Error *err = NULL;",
"int VAR_4;",
"pci_conf = VAR_0->config;",
"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,
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... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
27
],
[
31
],
[
35
],
[
37
],
[
43
],
[
45
],
[
49,
51
],
[
53
],
[
55
],
[
57
],
[... |
7,301 | int kvm_arch_debug(struct kvm_debug_exit_arch *arch_info)
{
int handle = 0;
int n;
if (arch_info->exception == 1) {
if (arch_info->dr6 & (1 << 14)) {
if (cpu_single_env->singlestep_enabled)
handle = 1;
} else {
for (n = 0; n < 4; n++)
... | true | qemu | b0b1d69079fcb9453f45aade9e9f6b71422147b0 | int kvm_arch_debug(struct kvm_debug_exit_arch *arch_info)
{
int handle = 0;
int n;
if (arch_info->exception == 1) {
if (arch_info->dr6 & (1 << 14)) {
if (cpu_single_env->singlestep_enabled)
handle = 1;
} else {
for (n = 0; n < 4; n++)
... | {
"code": [
" if (!handle)",
" kvm_update_guest_debug(cpu_single_env,",
" (arch_info->exception == 1) ?",
" KVM_GUESTDBG_INJECT_DB : KVM_GUESTDBG_INJECT_BP);"
],
"line_no": [
67,
69,
71,
73
]
} | int FUNC_0(struct kvm_debug_exit_arch *VAR_0)
{
int VAR_1 = 0;
int VAR_2;
if (VAR_0->exception == 1) {
if (VAR_0->dr6 & (1 << 14)) {
if (cpu_single_env->singlestep_enabled)
VAR_1 = 1;
} else {
for (VAR_2 = 0; VAR_2 < 4; VAR_2++)
... | [
"int FUNC_0(struct kvm_debug_exit_arch *VAR_0)\n{",
"int VAR_1 = 0;",
"int VAR_2;",
"if (VAR_0->exception == 1) {",
"if (VAR_0->dr6 & (1 << 14)) {",
"if (cpu_single_env->singlestep_enabled)\nVAR_1 = 1;",
"} else {",
"for (VAR_2 = 0; VAR_2 < 4; VAR_2++)",
"if (VAR_0->dr6 & (1 << VAR_2))\nswitch ((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,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23,
25
],
[
27,
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
... |
7,302 | static int mpegts_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
MpegTSContext *ts = s->priv_data;
int ret, i;
ts->pkt = pkt;
ret = handle_packets(ts, 0);
if (ret < 0) {
/* flush pes data left */
for (i = 0; i < NB_PID_MAX; i++) {
... | true | FFmpeg | df8aa4598c7cc1c2f863f6fc6b2d4b3e6dc7345e | static int mpegts_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
MpegTSContext *ts = s->priv_data;
int ret, i;
ts->pkt = pkt;
ret = handle_packets(ts, 0);
if (ret < 0) {
for (i = 0; i < NB_PID_MAX; i++) {
if (ts->pids[i] && ts... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0,
AVPacket *VAR_1)
{
MpegTSContext *ts = VAR_0->priv_data;
int VAR_2, VAR_3;
ts->VAR_1 = VAR_1;
VAR_2 = handle_packets(ts, 0);
if (VAR_2 < 0) {
for (VAR_3 = 0; VAR_3 < NB_PID_MAX; VAR_3++) {
... | [
"static int FUNC_0(AVFormatContext *VAR_0,\nAVPacket *VAR_1)\n{",
"MpegTSContext *ts = VAR_0->priv_data;",
"int VAR_2, VAR_3;",
"ts->VAR_1 = VAR_1;",
"VAR_2 = handle_packets(ts, 0);",
"if (VAR_2 < 0) {",
"for (VAR_3 = 0; VAR_3 < NB_PID_MAX; VAR_3++) {",
"if (ts->pids[VAR_3] && ts->pids[VAR_3]->type ==... | [
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
],
[
14
],
[
16
],
[
18
],
[
22
],
[
24
],
[
26
],
[
28
],
[
30
],
[
32
],
[
34
],
[
36
],
[
38
],
[
40
],
[
42
],
[
44
],
[
48,
50
... |
7,303 | static int qemu_savevm_state(QEMUFile *f)
{
SaveStateEntry *se;
int len, ret;
int64_t cur_pos, len_pos, total_len_pos;
qemu_put_be32(f, QEMU_VM_FILE_MAGIC);
qemu_put_be32(f, QEMU_VM_FILE_VERSION);
total_len_pos = qemu_ftell(f);
qemu_put_be64(f, 0); /* total size */
for(se = ... | true | qemu | 9366f4186025e1d8fc3bebd41fb714521c170b6f | static int qemu_savevm_state(QEMUFile *f)
{
SaveStateEntry *se;
int len, ret;
int64_t cur_pos, len_pos, total_len_pos;
qemu_put_be32(f, QEMU_VM_FILE_MAGIC);
qemu_put_be32(f, QEMU_VM_FILE_VERSION);
total_len_pos = qemu_ftell(f);
qemu_put_be64(f, 0);
for(se = first_se; se != ... | {
"code": [
"static int qemu_savevm_state(QEMUFile *f)",
" int len, ret;",
" int64_t cur_pos, len_pos, total_len_pos;",
" total_len_pos = qemu_ftell(f);",
" len_pos = qemu_ftell(f);",
" qemu_put_be32(f, 0);",
" cur_pos = qemu_ftell(f);",
" len = cur... | static int FUNC_0(QEMUFile *VAR_0)
{
SaveStateEntry *se;
int VAR_1, VAR_2;
int64_t cur_pos, len_pos, total_len_pos;
qemu_put_be32(VAR_0, QEMU_VM_FILE_MAGIC);
qemu_put_be32(VAR_0, QEMU_VM_FILE_VERSION);
total_len_pos = qemu_ftell(VAR_0);
qemu_put_be64(VAR_0, 0);
for(se = fir... | [
"static int FUNC_0(QEMUFile *VAR_0)\n{",
"SaveStateEntry *se;",
"int VAR_1, VAR_2;",
"int64_t cur_pos, len_pos, total_len_pos;",
"qemu_put_be32(VAR_0, QEMU_VM_FILE_MAGIC);",
"qemu_put_be32(VAR_0, QEMU_VM_FILE_VERSION);",
"total_len_pos = qemu_ftell(VAR_0);",
"qemu_put_be64(VAR_0, 0);",
"for(se = fir... | [
1,
0,
1,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25,
29
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
51
],
[
53
],
[
55
],
[
61
],
[... |
7,304 | static void cmv_decode_inter(CmvContext * s, const uint8_t *buf, const uint8_t *buf_end){
const uint8_t *raw = buf + (s->avctx->width*s->avctx->height/16);
int x,y,i;
i = 0;
for(y=0; y<s->avctx->height/4; y++)
for(x=0; x<s->avctx->width/4 && buf+i<buf_end; x++) {
if (buf[i]==0xFF) {
... | true | FFmpeg | e9064c9ce8ed18c3a3aab61e58e663b8f5b0c551 | static void cmv_decode_inter(CmvContext * s, const uint8_t *buf, const uint8_t *buf_end){
const uint8_t *raw = buf + (s->avctx->width*s->avctx->height/16);
int x,y,i;
i = 0;
for(y=0; y<s->avctx->height/4; y++)
for(x=0; x<s->avctx->width/4 && buf+i<buf_end; x++) {
if (buf[i]==0xFF) {
... | {
"code": [
" for(x=0; x<s->avctx->width/4 && buf+i<buf_end; x++) {"
],
"line_no": [
13
]
} | static void FUNC_0(CmvContext * VAR_0, const uint8_t *VAR_1, const uint8_t *VAR_2){
const uint8_t *VAR_3 = VAR_1 + (VAR_0->avctx->width*VAR_0->avctx->height/16);
int VAR_4,VAR_5,VAR_6;
VAR_6 = 0;
for(VAR_5=0; VAR_5<VAR_0->avctx->height/4; VAR_5++)
for(VAR_4=0; VAR_4<VAR_0->avctx->width/4 && V... | [
"static void FUNC_0(CmvContext * VAR_0, const uint8_t *VAR_1, const uint8_t *VAR_2){",
"const uint8_t *VAR_3 = VAR_1 + (VAR_0->avctx->width*VAR_0->avctx->height/16);",
"int VAR_4,VAR_5,VAR_6;",
"VAR_6 = 0;",
"for(VAR_5=0; VAR_5<VAR_0->avctx->height/4; VAR_5++)",
"for(VAR_4=0; VAR_4<VAR_0->avctx->width/4 &... | [
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
] | [
[
1
],
[
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41,
43,
45... |
7,305 | int bdrv_open(BlockDriverState *bs, const char *filename, QDict *options,
int flags, BlockDriver *drv, Error **errp)
{
int ret;
/* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */
char tmp_filename[PATH_MAX + 1];
BlockDriverState *file = NULL;
QDict *file_optio... | true | qemu | 8f94a6e40e46cbc8e8014da825d25824b1803b34 | int bdrv_open(BlockDriverState *bs, const char *filename, QDict *options,
int flags, BlockDriver *drv, Error **errp)
{
int ret;
char tmp_filename[PATH_MAX + 1];
BlockDriverState *file = NULL;
QDict *file_options = NULL;
const char *drvname;
Error *local_err = NULL;
... | {
"code": [
" drv = bdrv_find_whitelisted_format(drvname, !(flags & BDRV_O_RDWR));",
" drv = bdrv_find_whitelisted_format(drvname, !(flags & BDRV_O_RDWR));"
],
"line_no": [
217,
217
]
} | int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1, QDict *VAR_2,
int VAR_3, BlockDriver *VAR_4, Error **VAR_5)
{
int VAR_6;
char VAR_7[PATH_MAX + 1];
BlockDriverState *file = NULL;
QDict *file_options = NULL;
const char *VAR_8;
Error *local_err = NULL;
... | [
"int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1, QDict *VAR_2,\nint VAR_3, BlockDriver *VAR_4, Error **VAR_5)\n{",
"int VAR_6;",
"char VAR_7[PATH_MAX + 1];",
"BlockDriverState *file = NULL;",
"QDict *file_options = NULL;",
"const char *VAR_8;",
"Error *local_err = NULL;",
"if (VAR_2 == NULL) {"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
... |
7,306 | static int qdm2_parse_packet(AVFormatContext *s, PayloadContext *qdm,
AVStream *st, AVPacket *pkt,
uint32_t *timestamp,
const uint8_t *buf, int len, int flags)
{
int res = AVERROR_INVALIDDATA, n;
const uint8_t *end = bu... | true | FFmpeg | 552a99957f7c6f6ed13795caee7ab7b9deb5d76e | static int qdm2_parse_packet(AVFormatContext *s, PayloadContext *qdm,
AVStream *st, AVPacket *pkt,
uint32_t *timestamp,
const uint8_t *buf, int len, int flags)
{
int res = AVERROR_INVALIDDATA, n;
const uint8_t *end = bu... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, PayloadContext *VAR_1,
AVStream *VAR_2, AVPacket *VAR_3,
uint32_t *VAR_4,
const uint8_t *VAR_5, int VAR_6, int VAR_7)
{
int VAR_8 = AVERROR_INVALIDDATA, VAR_9;
const uint8_t *VA... | [
"static int FUNC_0(AVFormatContext *VAR_0, PayloadContext *VAR_1,\nAVStream *VAR_2, AVPacket *VAR_3,\nuint32_t *VAR_4,\nconst uint8_t *VAR_5, int VAR_6, int VAR_7)\n{",
"int VAR_8 = AVERROR_INVALIDDATA, VAR_9;",
"const uint8_t *VAR_10 = VAR_5 + VAR_6, *p = VAR_5;",
"if (VAR_6 > 0) {",
"if (VAR_6 < 2)\nretur... | [
0,
0,
0,
0,
0,
0,
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
],
[
35
],
[
37
],
[
39
],
[
43,
45
],
[
47
],
[
61
],
[
63
],
[
71
],
[
73,... |
7,307 | av_cold void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact)
{
int mm_flags = av_get_cpu_flags();
if (EXTERNAL_MMX(mm_flags)) {
c->ac3_exponent_min = ff_ac3_exponent_min_mmx;
c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_mmx;
c->ac3_lshift_int16 = ff_ac3_lshift_int16_mm... | true | FFmpeg | 7c00e9d8aed8511c44281d7b05562578a3fcd4c8 | av_cold void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact)
{
int mm_flags = av_get_cpu_flags();
if (EXTERNAL_MMX(mm_flags)) {
c->ac3_exponent_min = ff_ac3_exponent_min_mmx;
c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_mmx;
c->ac3_lshift_int16 = ff_ac3_lshift_int16_mm... | {
"code": [
" c->extract_exponents = ff_ac3_extract_exponents_3dnow;"
],
"line_no": [
23
]
} | av_cold void FUNC_0(AC3DSPContext *c, int bit_exact)
{
int VAR_0 = av_get_cpu_flags();
if (EXTERNAL_MMX(VAR_0)) {
c->ac3_exponent_min = ff_ac3_exponent_min_mmx;
c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_mmx;
c->ac3_lshift_int16 = ff_ac3_lshift_int16_mmx;
c->ac3... | [
"av_cold void FUNC_0(AC3DSPContext *c, int bit_exact)\n{",
"int VAR_0 = av_get_cpu_flags();",
"if (EXTERNAL_MMX(VAR_0)) {",
"c->ac3_exponent_min = ff_ac3_exponent_min_mmx;",
"c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_mmx;",
"c->ac3_lshift_int16 = ff_ac3_lshift_int16_mmx;",
"c->ac3_rshift_int32... | [
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
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43... |
7,310 | void tcg_context_init(TCGContext *s)
{
int op, total_args, n;
TCGOpDef *def;
TCGArgConstraint *args_ct;
int *sorted_args;
memset(s, 0, sizeof(*s));
s->nb_globals = 0;
/* Count total number of arguments and allocate the corresponding
space */
total_args = 0;
... | false | qemu | 100b5e0170e86661aaf830869be930a1a201ed08 | void tcg_context_init(TCGContext *s)
{
int op, total_args, n;
TCGOpDef *def;
TCGArgConstraint *args_ct;
int *sorted_args;
memset(s, 0, sizeof(*s));
s->nb_globals = 0;
total_args = 0;
for(op = 0; op < NB_OPS; op++) {
def = &tcg_op_defs[op];
n = d... | {
"code": [],
"line_no": []
} | void FUNC_0(TCGContext *VAR_0)
{
int VAR_1, VAR_2, VAR_3;
TCGOpDef *def;
TCGArgConstraint *args_ct;
int *VAR_4;
memset(VAR_0, 0, sizeof(*VAR_0));
VAR_0->nb_globals = 0;
VAR_2 = 0;
for(VAR_1 = 0; VAR_1 < NB_OPS; VAR_1++) {
def = &tcg_op_defs[VAR_1];
... | [
"void FUNC_0(TCGContext *VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3;",
"TCGOpDef *def;",
"TCGArgConstraint *args_ct;",
"int *VAR_4;",
"memset(VAR_0, 0, sizeof(*VAR_0));",
"VAR_0->nb_globals = 0;",
"VAR_2 = 0;",
"for(VAR_1 = 0; VAR_1 < NB_OPS; VAR_1++) {",
"def = &tcg_op_defs[VAR_1];",
"VAR_3 = def->nb... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
... |
7,311 | void macio_nvram_setup_bar(MacIONVRAMState *s, MemoryRegion *bar,
target_phys_addr_t mem_base)
{
memory_region_add_subregion(bar, mem_base, &s->mem);
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | void macio_nvram_setup_bar(MacIONVRAMState *s, MemoryRegion *bar,
target_phys_addr_t mem_base)
{
memory_region_add_subregion(bar, mem_base, &s->mem);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(MacIONVRAMState *VAR_0, MemoryRegion *VAR_1,
target_phys_addr_t VAR_2)
{
memory_region_add_subregion(VAR_1, VAR_2, &VAR_0->mem);
}
| [
"void FUNC_0(MacIONVRAMState *VAR_0, MemoryRegion *VAR_1,\ntarget_phys_addr_t VAR_2)\n{",
"memory_region_add_subregion(VAR_1, VAR_2, &VAR_0->mem);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
]
] |
7,312 | int qemu_input_key_value_to_scancode(const KeyValue *value, bool down,
int *codes)
{
int keycode = qemu_input_key_value_to_number(value);
int count = 0;
if (value->type == KEY_VALUE_KIND_QCODE &&
value->u.qcode == Q_KEY_CODE_PAUSE) {
/* specific ... | false | qemu | 32bafa8fdd098d52fbf1102d5a5e48d29398c0aa | int qemu_input_key_value_to_scancode(const KeyValue *value, bool down,
int *codes)
{
int keycode = qemu_input_key_value_to_number(value);
int count = 0;
if (value->type == KEY_VALUE_KIND_QCODE &&
value->u.qcode == Q_KEY_CODE_PAUSE) {
in... | {
"code": [],
"line_no": []
} | int FUNC_0(const KeyValue *VAR_0, bool VAR_1,
int *VAR_2)
{
int VAR_3 = qemu_input_key_value_to_number(VAR_0);
int VAR_4 = 0;
if (VAR_0->type == KEY_VALUE_KIND_QCODE &&
VAR_0->u.qcode == Q_KEY_CODE_PAUSE) {
int VAR_5 = VAR_1 ? 0 : 0x80;... | [
"int FUNC_0(const KeyValue *VAR_0, bool VAR_1,\nint *VAR_2)\n{",
"int VAR_3 = qemu_input_key_value_to_number(VAR_0);",
"int VAR_4 = 0;",
"if (VAR_0->type == KEY_VALUE_KIND_QCODE &&\nVAR_0->u.qcode == Q_KEY_CODE_PAUSE) {",
"int VAR_5 = VAR_1 ? 0 : 0x80;",
"VAR_2[VAR_4++] = 0xe1;",
"VAR_2[VAR_4++] = 0x1d ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
... |
7,313 | static void coroutine_fn verify_self(void *opaque)
{
g_assert(qemu_coroutine_self() == opaque);
}
| false | qemu | 7e70cdba9f220bef3f3481c663c066c2b80469aa | static void coroutine_fn verify_self(void *opaque)
{
g_assert(qemu_coroutine_self() == opaque);
}
| {
"code": [],
"line_no": []
} | static void VAR_0 verify_self(void *opaque)
{
g_assert(qemu_coroutine_self() == opaque);
}
| [
"static void VAR_0 verify_self(void *opaque)\n{",
"g_assert(qemu_coroutine_self() == opaque);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
7,314 | void net_set_boot_mask(int net_boot_mask)
{
int i;
/* Only the first four NICs may be bootable */
net_boot_mask = net_boot_mask & 0xF;
for (i = 0; i < nb_nics; i++) {
if (net_boot_mask & (1 << i)) {
net_boot_mask &= ~(1 << i);
}
}
if (net_boot_mask) {
... | false | qemu | da1fcfda59a6bcbdf58d49243fbced455f2bf78a | void net_set_boot_mask(int net_boot_mask)
{
int i;
net_boot_mask = net_boot_mask & 0xF;
for (i = 0; i < nb_nics; i++) {
if (net_boot_mask & (1 << i)) {
net_boot_mask &= ~(1 << i);
}
}
if (net_boot_mask) {
fprintf(stderr, "Cannot boot from non... | {
"code": [],
"line_no": []
} | void FUNC_0(int VAR_0)
{
int VAR_1;
VAR_0 = VAR_0 & 0xF;
for (VAR_1 = 0; VAR_1 < nb_nics; VAR_1++) {
if (VAR_0 & (1 << VAR_1)) {
VAR_0 &= ~(1 << VAR_1);
}
}
if (VAR_0) {
fprintf(stderr, "Cannot boot from non-existent NIC\n");
exit(1)... | [
"void FUNC_0(int VAR_0)\n{",
"int VAR_1;",
"VAR_0 = VAR_0 & 0xF;",
"for (VAR_1 = 0; VAR_1 < nb_nics; VAR_1++) {",
"if (VAR_0 & (1 << VAR_1)) {",
"VAR_0 &= ~(1 << VAR_1);",
"}",
"}",
"if (VAR_0) {",
"fprintf(stderr, \"Cannot boot from non-existent NIC\\n\");",
"exit(1);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
7,317 | void msix_reset(PCIDevice *dev)
{
if (!(dev->cap_present & QEMU_PCI_CAP_MSIX))
return;
msix_free_irq_entries(dev);
dev->config[dev->msix_cap + MSIX_CONTROL_OFFSET] &=
~dev->wmask[dev->msix_cap + MSIX_CONTROL_OFFSET];
memset(dev->msix_table_page, 0, MSIX_PAGE_SIZE);
msix_mask_all... | false | qemu | 44701ab71ad854e6be567a6294f4665f36651076 | void msix_reset(PCIDevice *dev)
{
if (!(dev->cap_present & QEMU_PCI_CAP_MSIX))
return;
msix_free_irq_entries(dev);
dev->config[dev->msix_cap + MSIX_CONTROL_OFFSET] &=
~dev->wmask[dev->msix_cap + MSIX_CONTROL_OFFSET];
memset(dev->msix_table_page, 0, MSIX_PAGE_SIZE);
msix_mask_all... | {
"code": [],
"line_no": []
} | void FUNC_0(PCIDevice *VAR_0)
{
if (!(VAR_0->cap_present & QEMU_PCI_CAP_MSIX))
return;
msix_free_irq_entries(VAR_0);
VAR_0->config[VAR_0->msix_cap + MSIX_CONTROL_OFFSET] &=
~VAR_0->wmask[VAR_0->msix_cap + MSIX_CONTROL_OFFSET];
memset(VAR_0->msix_table_page, 0, MSIX_PAGE_SIZE);
m... | [
"void FUNC_0(PCIDevice *VAR_0)\n{",
"if (!(VAR_0->cap_present & QEMU_PCI_CAP_MSIX))\nreturn;",
"msix_free_irq_entries(VAR_0);",
"VAR_0->config[VAR_0->msix_cap + MSIX_CONTROL_OFFSET] &=\n~VAR_0->wmask[VAR_0->msix_cap + MSIX_CONTROL_OFFSET];",
"memset(VAR_0->msix_table_page, 0, MSIX_PAGE_SIZE);",
"msix_mask... | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11,
13
],
[
15
],
[
17
],
[
19
]
] |
7,318 | static void pl110_write(void *opaque, hwaddr offset,
uint64_t val, unsigned size)
{
pl110_state *s = (pl110_state *)opaque;
int n;
/* For simplicity invalidate the display whenever a control register
is written to. */
s->invalidate = 1;
if (offset >= 0x200 &... | false | qemu | 375cb560295484b88898262ebf400eff9a011206 | static void pl110_write(void *opaque, hwaddr offset,
uint64_t val, unsigned size)
{
pl110_state *s = (pl110_state *)opaque;
int n;
s->invalidate = 1;
if (offset >= 0x200 && offset < 0x400) {
n = (offset - 0x200) >> 2;
s->raw_palette[(of... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
pl110_state *s = (pl110_state *)VAR_0;
int VAR_4;
s->invalidate = 1;
if (VAR_1 >= 0x200 && VAR_1 < 0x400) {
VAR_4 = (VAR_1 - 0x200) >> 2;
s->raw_palette[(VA... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"pl110_state *s = (pl110_state *)VAR_0;",
"int VAR_4;",
"s->invalidate = 1;",
"if (VAR_1 >= 0x200 && VAR_1 < 0x400) {",
"VAR_4 = (VAR_1 - 0x200) >> 2;",
"s->raw_palette[(VAR_1 - 0x200) >> 2] = VAR_2;",
"pl110_update_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,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[... |
7,319 | static int process_input(void)
{
InputFile *ifile;
AVFormatContext *is;
InputStream *ist;
AVPacket pkt;
int ret, i, j;
int file_index;
/* select the stream that we must read now */
file_index = select_input_file();
/* if none, if is finished */
if (file_index == -2) ... | false | FFmpeg | c5ea3a009b15a3334ca469885303182e9f218836 | static int process_input(void)
{
InputFile *ifile;
AVFormatContext *is;
InputStream *ist;
AVPacket pkt;
int ret, i, j;
int file_index;
file_index = select_input_file();
if (file_index == -2) {
poll_filters() ;
return AVERROR(EAGAIN);
}
i... | {
"code": [],
"line_no": []
} | static int FUNC_0(void)
{
InputFile *ifile;
AVFormatContext *is;
InputStream *ist;
AVPacket pkt;
int VAR_0, VAR_1, VAR_2;
int VAR_3;
VAR_3 = select_input_file();
if (VAR_3 == -2) {
poll_filters() ;
return AVERROR(EAGAIN);
}
if (VAR_3 < 0... | [
"static int FUNC_0(void)\n{",
"InputFile *ifile;",
"AVFormatContext *is;",
"InputStream *ist;",
"AVPacket pkt;",
"int VAR_0, VAR_1, VAR_2;",
"int VAR_3;",
"VAR_3 = select_input_file();",
"if (VAR_3 == -2) {",
"poll_filters() ;",
"return AVERROR(EAGAIN);",
"}",
"if (VAR_3 < 0) {",
"if (got_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
7,320 | static inline void gen_intermediate_code_internal(AlphaCPU *cpu,
TranslationBlock *tb,
bool search_pc)
{
CPUState *cs = CPU(cpu);
CPUAlphaState *env = &cpu->env;
DisasContext ctx, *ctxp = &ctx;
tar... | false | qemu | cd42d5b23691ad73edfd6dbcfc935a960a9c5a65 | static inline void gen_intermediate_code_internal(AlphaCPU *cpu,
TranslationBlock *tb,
bool search_pc)
{
CPUState *cs = CPU(cpu);
CPUAlphaState *env = &cpu->env;
DisasContext ctx, *ctxp = &ctx;
tar... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(AlphaCPU *VAR_0,
TranslationBlock *VAR_1,
bool VAR_2)
{
CPUState *cs = CPU(VAR_0);
CPUAlphaState *env = &VAR_0->env;
DisasContext ctx, *ctxp = &ctx;
target_ulong pc_start;... | [
"static inline void FUNC_0(AlphaCPU *VAR_0,\nTranslationBlock *VAR_1,\nbool VAR_2)\n{",
"CPUState *cs = CPU(VAR_0);",
"CPUAlphaState *env = &VAR_0->env;",
"DisasContext ctx, *ctxp = &ctx;",
"target_ulong pc_start;",
"target_ulong pc_mask;",
"uint32_t insn;",
"uint16_t *gen_opc_end;",
"CPUBreakpoint ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
... |
7,321 | uint64_t helper_fctiwz(CPUPPCState *env, uint64_t arg)
{
CPU_DoubleU farg;
farg.ll = arg;
if (unlikely(float64_is_signaling_nan(farg.d))) {
/* sNaN conversion */
farg.ll = fload_invalid_op_excp(env, POWERPC_EXCP_FP_VXSNAN |
POWERPC_EXCP_FP_V... | false | qemu | 59800ec8e52bcfa271fa61fb0aae19205ef1b7f1 | uint64_t helper_fctiwz(CPUPPCState *env, uint64_t arg)
{
CPU_DoubleU farg;
farg.ll = arg;
if (unlikely(float64_is_signaling_nan(farg.d))) {
farg.ll = fload_invalid_op_excp(env, POWERPC_EXCP_FP_VXSNAN |
POWERPC_EXCP_FP_VXCVI);
} else if... | {
"code": [],
"line_no": []
} | uint64_t FUNC_0(CPUPPCState *env, uint64_t arg)
{
CPU_DoubleU farg;
farg.ll = arg;
if (unlikely(float64_is_signaling_nan(farg.d))) {
farg.ll = fload_invalid_op_excp(env, POWERPC_EXCP_FP_VXSNAN |
POWERPC_EXCP_FP_VXCVI);
} else if (unlik... | [
"uint64_t FUNC_0(CPUPPCState *env, uint64_t arg)\n{",
"CPU_DoubleU farg;",
"farg.ll = arg;",
"if (unlikely(float64_is_signaling_nan(farg.d))) {",
"farg.ll = fload_invalid_op_excp(env, POWERPC_EXCP_FP_VXSNAN |\nPOWERPC_EXCP_FP_VXCVI);",
"} else if (unlikely(float64_is_quiet_nan(farg.d) ||",
"float64_is_i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
17,
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
7,323 | POWERPC_FAMILY(POWER8E)(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);
dc->fw_name = "PowerPC,POWER8";
dc->desc = "POWER8E";
dc->props = powerpc_servercpu_properties;
pcc->pvr_match = ppc_pvr_match_power8;
pcc->pcr_m... | false | qemu | b60c60070c0df4ef01d5c727929fe0e93e6fdd09 | POWERPC_FAMILY(POWER8E)(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);
dc->fw_name = "PowerPC,POWER8";
dc->desc = "POWER8E";
dc->props = powerpc_servercpu_properties;
pcc->pvr_match = ppc_pvr_match_power8;
pcc->pcr_m... | {
"code": [],
"line_no": []
} | FUNC_0(POWER8E)(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);
dc->fw_name = "PowerPC,POWER8";
dc->desc = "POWER8E";
dc->props = powerpc_servercpu_properties;
pcc->pvr_match = ppc_pvr_match_power8;
pcc->pcr_mask = PC... | [
"FUNC_0(POWER8E)(ObjectClass *oc, void *data)\n{",
"DeviceClass *dc = DEVICE_CLASS(oc);",
"PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);",
"dc->fw_name = \"PowerPC,POWER8\";",
"dc->desc = \"POWER8E\";",
"dc->props = powerpc_servercpu_properties;",
"pcc->pvr_match = ppc_pvr_match_power8;",
"pcc->pcr_ma... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47
],
[
49,
51,
53,
55,
57,
59... |
7,328 | static void patch_instruction(VAPICROMState *s, CPUX86State *env, target_ulong ip)
{
target_phys_addr_t paddr;
VAPICHandlers *handlers;
uint8_t opcode[2];
uint32_t imm32;
if (smp_cpus == 1) {
handlers = &s->rom_state.up;
} else {
handlers = &s->rom_state.mp;
}
... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void patch_instruction(VAPICROMState *s, CPUX86State *env, target_ulong ip)
{
target_phys_addr_t paddr;
VAPICHandlers *handlers;
uint8_t opcode[2];
uint32_t imm32;
if (smp_cpus == 1) {
handlers = &s->rom_state.up;
} else {
handlers = &s->rom_state.mp;
}
... | {
"code": [],
"line_no": []
} | static void FUNC_0(VAPICROMState *VAR_0, CPUX86State *VAR_1, target_ulong VAR_2)
{
target_phys_addr_t paddr;
VAPICHandlers *handlers;
uint8_t opcode[2];
uint32_t imm32;
if (smp_cpus == 1) {
handlers = &VAR_0->rom_state.up;
} else {
handlers = &VAR_0->rom_state.mp;
... | [
"static void FUNC_0(VAPICROMState *VAR_0, CPUX86State *VAR_1, target_ulong VAR_2)\n{",
"target_phys_addr_t paddr;",
"VAPICHandlers *handlers;",
"uint8_t opcode[2];",
"uint32_t imm32;",
"if (smp_cpus == 1) {",
"handlers = &VAR_0->rom_state.up;",
"} else {",
"handlers = &VAR_0->rom_state.mp;",
"}",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
51
... |
7,329 | void tlb_fill(unsigned long addr, int is_write, int is_user, void *retaddr)
{
TranslationBlock *tb;
CPUState *saved_env;
unsigned long pc;
int ret;
/* XXX: hack to restore env in all cases, even if not called from
generated code */
saved_env = env;
env = cpu_single_env;
... | false | qemu | b769d8fef6c06ddb39ef0337882a4f8872b9c2bc | void tlb_fill(unsigned long addr, int is_write, int is_user, void *retaddr)
{
TranslationBlock *tb;
CPUState *saved_env;
unsigned long pc;
int ret;
saved_env = env;
env = cpu_single_env;
{
unsigned long tlb_addrr, tlb_addrw;
int index;
index = (ad... | {
"code": [],
"line_no": []
} | void FUNC_0(unsigned long VAR_0, int VAR_1, int VAR_2, void *VAR_3)
{
TranslationBlock *tb;
CPUState *saved_env;
unsigned long VAR_4;
int VAR_5;
saved_env = env;
env = cpu_single_env;
{
unsigned long VAR_9, VAR_9;
int VAR_9;
VAR_9 = (VAR_0 >> TARG... | [
"void FUNC_0(unsigned long VAR_0, int VAR_1, int VAR_2, void *VAR_3)\n{",
"TranslationBlock *tb;",
"CPUState *saved_env;",
"unsigned long VAR_4;",
"int VAR_5;",
"saved_env = env;",
"env = cpu_single_env;",
"{",
"unsigned long VAR_9, VAR_9;",
"int VAR_9;",
"VAR_9 = (VAR_0 >> TARGET_PAGE_BITS) & (... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39,
41,
43,
45,
47,
49
],
[
51
],
[
53,... |
7,330 | static inline int get_cabac_cbf_ctx( H264Context *h, int cat, int idx ) {
int nza, nzb;
int ctx = 0;
if( cat == 0 ) {
nza = h->left_cbp&0x100;
nzb = h-> top_cbp&0x100;
} else if( cat == 1 || cat == 2 ) {
nza = h->non_zero_count_cache[scan8[idx] - 1];
nzb = h->no... | false | FFmpeg | 9588ec340c3f33c7474b4cd2893046cfdaee42bf | static inline int get_cabac_cbf_ctx( H264Context *h, int cat, int idx ) {
int nza, nzb;
int ctx = 0;
if( cat == 0 ) {
nza = h->left_cbp&0x100;
nzb = h-> top_cbp&0x100;
} else if( cat == 1 || cat == 2 ) {
nza = h->non_zero_count_cache[scan8[idx] - 1];
nzb = h->no... | {
"code": [],
"line_no": []
} | static inline int FUNC_0( H264Context *VAR_0, int VAR_1, int VAR_2 ) {
int VAR_3, VAR_4;
int VAR_5 = 0;
if( VAR_1 == 0 ) {
VAR_3 = VAR_0->left_cbp&0x100;
VAR_4 = VAR_0-> top_cbp&0x100;
} else if( VAR_1 == 1 || VAR_1 == 2 ) {
VAR_3 = VAR_0->non_zero_count_cache[scan8[VAR_... | [
"static inline int FUNC_0( H264Context *VAR_0, int VAR_1, int VAR_2 ) {",
"int VAR_3, VAR_4;",
"int VAR_5 = 0;",
"if( VAR_1 == 0 ) {",
"VAR_3 = VAR_0->left_cbp&0x100;",
"VAR_4 = VAR_0-> top_cbp&0x100;",
"} else if( VAR_1 == 1 || VAR_1 == 2 ) {",
"VAR_3 = VAR_0->non_zero_count_cache[scan8[VAR_2] - 1];"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39,
41
],
[
45,
47
],
... |
7,333 | static void add_flagname_to_bitmaps(const char *flagname, uint32_t *features,
uint32_t *ext_features,
uint32_t *ext2_features,
uint32_t *ext3_features,
uint32_t *kvm_featur... | false | qemu | b5ec5ce0e39d6e7ea707d5604a5f6d567dfd2f48 | static void add_flagname_to_bitmaps(const char *flagname, uint32_t *features,
uint32_t *ext_features,
uint32_t *ext2_features,
uint32_t *ext3_features,
uint32_t *kvm_featur... | {
"code": [],
"line_no": []
} | static void FUNC_0(const char *VAR_0, uint32_t *VAR_1,
uint32_t *VAR_2,
uint32_t *VAR_3,
uint32_t *VAR_4,
uint32_t *VAR_5)
{
int VAR_6;
int VAR_7 = 0;
for... | [
"static void FUNC_0(const char *VAR_0, uint32_t *VAR_1,\nuint32_t *VAR_2,\nuint32_t *VAR_3,\nuint32_t *VAR_4,\nuint32_t *VAR_5)\n{",
"int VAR_6;",
"int VAR_7 = 0;",
"for ( VAR_6 = 0 ; VAR_6 < 32 ; VAR_6++ )",
"if (feature_name[VAR_6] && !strcmp (VAR_0, feature_name[VAR_6])) {",
"*VAR_1 |= 1 << VAR_6;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.