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 |
|---|---|---|---|---|---|---|---|---|---|---|
17,081 | static int proxy_truncate(FsContext *ctx, V9fsPath *fs_path, off_t size)
{
int retval;
retval = v9fs_request(ctx->private, T_TRUNCATE, NULL, "sq", fs_path, size);
if (retval < 0) {
errno = -retval;
return -1;
}
return 0;
}
| false | qemu | 494a8ebe713055d3946183f4b395f85a18b43e9e | static int proxy_truncate(FsContext *ctx, V9fsPath *fs_path, off_t size)
{
int retval;
retval = v9fs_request(ctx->private, T_TRUNCATE, NULL, "sq", fs_path, size);
if (retval < 0) {
errno = -retval;
return -1;
}
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1, off_t VAR_2)
{
int VAR_3;
VAR_3 = v9fs_request(VAR_0->private, T_TRUNCATE, NULL, "sq", VAR_1, VAR_2);
if (VAR_3 < 0) {
errno = -VAR_3;
return -1;
}
return 0;
}
| [
"static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1, off_t VAR_2)\n{",
"int VAR_3;",
"VAR_3 = v9fs_request(VAR_0->private, T_TRUNCATE, NULL, \"sq\", VAR_1, VAR_2);",
"if (VAR_3 < 0) {",
"errno = -VAR_3;",
"return -1;",
"}",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
17,083 | static uint64_t e1000_io_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
E1000State *s = opaque;
(void)s;
return 0;
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t e1000_io_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
E1000State *s = opaque;
(void)s;
return 0;
}
| {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,
unsigned size)
{
E1000State *s = opaque;
(void)s;
return 0;
}
| [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,\nunsigned size)\n{",
"E1000State *s = opaque;",
"(void)s;",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
]
] |
17,084 | static void pci_vpb_init(Object *obj)
{
PCIHostState *h = PCI_HOST_BRIDGE(obj);
PCIVPBState *s = PCI_VPB(obj);
memory_region_init(&s->pci_io_space, OBJECT(s), "pci_io", 1ULL << 32);
memory_region_init(&s->pci_mem_space, OBJECT(s), "pci_mem", 1ULL << 32);
pci_bus_new_inplace(&s->pci_bus, si... | false | qemu | d28fca153bb27ff965b9eb26d73327fa4d2402c8 | static void pci_vpb_init(Object *obj)
{
PCIHostState *h = PCI_HOST_BRIDGE(obj);
PCIVPBState *s = PCI_VPB(obj);
memory_region_init(&s->pci_io_space, OBJECT(s), "pci_io", 1ULL << 32);
memory_region_init(&s->pci_mem_space, OBJECT(s), "pci_mem", 1ULL << 32);
pci_bus_new_inplace(&s->pci_bus, si... | {
"code": [],
"line_no": []
} | static void FUNC_0(Object *VAR_0)
{
PCIHostState *h = PCI_HOST_BRIDGE(VAR_0);
PCIVPBState *s = PCI_VPB(VAR_0);
memory_region_init(&s->pci_io_space, OBJECT(s), "pci_io", 1ULL << 32);
memory_region_init(&s->pci_mem_space, OBJECT(s), "pci_mem", 1ULL << 32);
pci_bus_new_inplace(&s->pci_bus, si... | [
"static void FUNC_0(Object *VAR_0)\n{",
"PCIHostState *h = PCI_HOST_BRIDGE(VAR_0);",
"PCIVPBState *s = PCI_VPB(VAR_0);",
"memory_region_init(&s->pci_io_space, OBJECT(s), \"pci_io\", 1ULL << 32);",
"memory_region_init(&s->pci_mem_space, OBJECT(s), \"pci_mem\", 1ULL << 32);",
"pci_bus_new_inplace(&s->pci_bu... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17,
19,
21
],
[
23
],
[
27
],
[
29
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
17,086 | BlockDriverState *bdrv_new(const char *device_name)
{
BlockDriverState *bs;
bs = g_malloc0(sizeof(BlockDriverState));
QLIST_INIT(&bs->dirty_bitmaps);
pstrcpy(bs->device_name, sizeof(bs->device_name), device_name);
if (device_name[0] != '\0') {
QTAILQ_INSERT_TAIL(&bdrv_states, bs, de... | false | qemu | 98522f63f40adaebc412481e1d2e9170160d4539 | BlockDriverState *bdrv_new(const char *device_name)
{
BlockDriverState *bs;
bs = g_malloc0(sizeof(BlockDriverState));
QLIST_INIT(&bs->dirty_bitmaps);
pstrcpy(bs->device_name, sizeof(bs->device_name), device_name);
if (device_name[0] != '\0') {
QTAILQ_INSERT_TAIL(&bdrv_states, bs, de... | {
"code": [],
"line_no": []
} | BlockDriverState *FUNC_0(const char *device_name)
{
BlockDriverState *bs;
bs = g_malloc0(sizeof(BlockDriverState));
QLIST_INIT(&bs->dirty_bitmaps);
pstrcpy(bs->device_name, sizeof(bs->device_name), device_name);
if (device_name[0] != '\0') {
QTAILQ_INSERT_TAIL(&bdrv_states, bs, devi... | [
"BlockDriverState *FUNC_0(const char *device_name)\n{",
"BlockDriverState *bs;",
"bs = g_malloc0(sizeof(BlockDriverState));",
"QLIST_INIT(&bs->dirty_bitmaps);",
"pstrcpy(bs->device_name, sizeof(bs->device_name), device_name);",
"if (device_name[0] != '\\0') {",
"QTAILQ_INSERT_TAIL(&bdrv_states, bs, devi... | [
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
],
[
35
],
[
37
]
] |
17,087 | static inline int get_scale(GetBitContext *gb, int level, int value)
{
if (level < 5) {
/* huffman encoded */
value += get_bitalloc(gb, &dca_scalefactor, level);
} else if (level < 8)
value = get_bits(gb, level + 1);
return value;
}
| false | FFmpeg | e6ffd997cbc06426e75d3fa291b991866c84a79b | static inline int get_scale(GetBitContext *gb, int level, int value)
{
if (level < 5) {
value += get_bitalloc(gb, &dca_scalefactor, level);
} else if (level < 8)
value = get_bits(gb, level + 1);
return value;
}
| {
"code": [],
"line_no": []
} | static inline int FUNC_0(GetBitContext *VAR_0, int VAR_1, int VAR_2)
{
if (VAR_1 < 5) {
VAR_2 += get_bitalloc(VAR_0, &dca_scalefactor, VAR_1);
} else if (VAR_1 < 8)
VAR_2 = get_bits(VAR_0, VAR_1 + 1);
return VAR_2;
}
| [
"static inline int FUNC_0(GetBitContext *VAR_0, int VAR_1, int VAR_2)\n{",
"if (VAR_1 < 5) {",
"VAR_2 += get_bitalloc(VAR_0, &dca_scalefactor, VAR_1);",
"} else if (VAR_1 < 8)",
"VAR_2 = get_bits(VAR_0, VAR_1 + 1);",
"return VAR_2;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
17,089 | int s390_cpu_handle_mmu_fault(CPUState *cs, vaddr orig_vaddr,
int rw, int mmu_idx)
{
S390CPU *cpu = S390_CPU(cs);
CPUS390XState *env = &cpu->env;
target_ulong vaddr, raddr;
uint64_t asc;
int prot;
DPRINTF("%s: address 0x%" VADDR_PRIx " rw %d mmu_idx %d\n",... | false | qemu | 2bcf018340cbf233f7145e643fc1bb367f23fd90 | int s390_cpu_handle_mmu_fault(CPUState *cs, vaddr orig_vaddr,
int rw, int mmu_idx)
{
S390CPU *cpu = S390_CPU(cs);
CPUS390XState *env = &cpu->env;
target_ulong vaddr, raddr;
uint64_t asc;
int prot;
DPRINTF("%s: address 0x%" VADDR_PRIx " rw %d mmu_idx %d\n",... | {
"code": [],
"line_no": []
} | int FUNC_0(CPUState *VAR_0, vaddr VAR_1,
int VAR_2, int VAR_3)
{
S390CPU *cpu = S390_CPU(VAR_0);
CPUS390XState *env = &cpu->env;
target_ulong vaddr, raddr;
uint64_t asc;
int VAR_4;
DPRINTF("%s: address 0x%" VADDR_PRIx " VAR_2 %d VAR_3 %d\n",
_... | [
"int FUNC_0(CPUState *VAR_0, vaddr VAR_1,\nint VAR_2, int VAR_3)\n{",
"S390CPU *cpu = S390_CPU(VAR_0);",
"CPUS390XState *env = &cpu->env;",
"target_ulong vaddr, raddr;",
"uint64_t asc;",
"int VAR_4;",
"DPRINTF(\"%s: address 0x%\" VADDR_PRIx \" VAR_2 %d VAR_3 %d\\n\",\n__func__, VAR_1, VAR_2, VAR_3);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
17,090 | uint64_t kvmppc_rma_size(uint64_t current_size, unsigned int hash_shift)
{
if (cap_ppc_rma >= 2) {
return current_size;
}
return MIN(current_size,
getrampagesize() << (hash_shift - 7));
}
| false | qemu | f36951c19f15f3c053a31234bd2c297d86c1a052 | uint64_t kvmppc_rma_size(uint64_t current_size, unsigned int hash_shift)
{
if (cap_ppc_rma >= 2) {
return current_size;
}
return MIN(current_size,
getrampagesize() << (hash_shift - 7));
}
| {
"code": [],
"line_no": []
} | uint64_t FUNC_0(uint64_t current_size, unsigned int hash_shift)
{
if (cap_ppc_rma >= 2) {
return current_size;
}
return MIN(current_size,
getrampagesize() << (hash_shift - 7));
}
| [
"uint64_t FUNC_0(uint64_t current_size, unsigned int hash_shift)\n{",
"if (cap_ppc_rma >= 2) {",
"return current_size;",
"}",
"return MIN(current_size,\ngetrampagesize() << (hash_shift - 7));",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
]
] |
17,093 | setup_sigcontext(struct target_sigcontext *sc, /*struct _fpstate *fpstate,*/
CPUState *env, unsigned long mask)
{
int err = 0;
__put_user_error(env->regs[0], &sc->arm_r0, err);
__put_user_error(env->regs[1], &sc->arm_r1, err);
__put_user_error(env->regs[2], &sc->arm_r2, err);
__put_user_error(env->regs... | false | qemu | f8b0aa25599782eef91edc00ebf620bd14db720c | setup_sigcontext(struct target_sigcontext *sc,
CPUState *env, unsigned long mask)
{
int err = 0;
__put_user_error(env->regs[0], &sc->arm_r0, err);
__put_user_error(env->regs[1], &sc->arm_r1, err);
__put_user_error(env->regs[2], &sc->arm_r2, err);
__put_user_error(env->regs[3], &sc->arm_r3, err);
__p... | {
"code": [],
"line_no": []
} | FUNC_0(struct target_sigcontext *VAR_0,
CPUState *VAR_1, unsigned long VAR_2)
{
int VAR_3 = 0;
__put_user_error(VAR_1->regs[0], &VAR_0->arm_r0, VAR_3);
__put_user_error(VAR_1->regs[1], &VAR_0->arm_r1, VAR_3);
__put_user_error(VAR_1->regs[2], &VAR_0->arm_r2, VAR_3);
__put_user_error(VAR_1->regs[3], &VA... | [
"FUNC_0(struct target_sigcontext *VAR_0,\nCPUState *VAR_1, unsigned long VAR_2)\n{",
"int VAR_3 = 0;",
"__put_user_error(VAR_1->regs[0], &VAR_0->arm_r0, VAR_3);",
"__put_user_error(VAR_1->regs[1], &VAR_0->arm_r1, VAR_3);",
"__put_user_error(VAR_1->regs[2], &VAR_0->arm_r2, VAR_3);",
"__put_user_error(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
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45... |
17,094 | void hd_geometry_guess(BlockDriverState *bs,
int *pcyls, int *pheads, int *psecs)
{
int cylinders, heads, secs, translation;
bdrv_get_geometry_hint(bs, &cylinders, &heads, &secs);
translation = bdrv_get_translation_hint(bs);
if (cylinders != 0) {
/* already got ... | false | qemu | dc28c0cd30d7b122500b17eedc7e070624fd7c86 | void hd_geometry_guess(BlockDriverState *bs,
int *pcyls, int *pheads, int *psecs)
{
int cylinders, heads, secs, translation;
bdrv_get_geometry_hint(bs, &cylinders, &heads, &secs);
translation = bdrv_get_translation_hint(bs);
if (cylinders != 0) {
*pcyl... | {
"code": [],
"line_no": []
} | void FUNC_0(BlockDriverState *VAR_0,
int *VAR_1, int *VAR_2, int *VAR_3)
{
int VAR_4, VAR_5, VAR_6, VAR_7;
bdrv_get_geometry_hint(VAR_0, &VAR_4, &VAR_5, &VAR_6);
VAR_7 = bdrv_get_translation_hint(VAR_0);
if (VAR_4 != 0) {
*VAR_1 = VAR_4;
*VAR_... | [
"void FUNC_0(BlockDriverState *VAR_0,\nint *VAR_1, int *VAR_2, int *VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6, VAR_7;",
"bdrv_get_geometry_hint(VAR_0, &VAR_4, &VAR_5, &VAR_6);",
"VAR_7 = bdrv_get_translation_hint(VAR_0);",
"if (VAR_4 != 0) {",
"*VAR_1 = VAR_4;",
"*VAR_2 = VAR_5;",
"*VAR_3 = VAR_6;",
"ret... | [
0,
0,
0,
0,
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
],
[
37
],
[
39
],
[
47
],
[
49
],
[
51,
53,
55,
57
],
[
59
],
[
61... |
17,095 | static void test_visitor_in_intList(TestInputVisitorData *data,
const void *unused)
{
int64_t value[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20};
int16List *res = NULL, *tmp;
Error *err = NULL;
Visitor *v;
int i = 0;
v = visitor_input_test_init(data, "1,2,... | false | qemu | d9f62dde1303286b24ac8ce88be27e2b9b9c5f46 | static void test_visitor_in_intList(TestInputVisitorData *data,
const void *unused)
{
int64_t value[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20};
int16List *res = NULL, *tmp;
Error *err = NULL;
Visitor *v;
int i = 0;
v = visitor_input_test_init(data, "1,2,... | {
"code": [],
"line_no": []
} | static void FUNC_0(TestInputVisitorData *VAR_0,
const void *VAR_1)
{
int64_t value[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20};
int16List *res = NULL, *tmp;
Error *err = NULL;
Visitor *v;
int VAR_2 = 0;
v = visitor_input_test_init(VAR_0, "1,2,0,2-4,20,5-9... | [
"static void FUNC_0(TestInputVisitorData *VAR_0,\nconst void *VAR_1)\n{",
"int64_t value[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20};",
"int16List *res = NULL, *tmp;",
"Error *err = NULL;",
"Visitor *v;",
"int VAR_2 = 0;",
"v = visitor_input_test_init(VAR_0, \"1,2,0,2-4,20,5-9,1-8\");",
"visit_type_int16Li... | [
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
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
49
],
[
55
],
[... |
17,096 | int init_timer_alarm(void)
{
struct qemu_alarm_timer *t = NULL;
int i, err = -1;
for (i = 0; alarm_timers[i].name; i++) {
t = &alarm_timers[i];
err = t->start(t);
if (!err)
break;
}
if (err) {
err = -ENOENT;
goto fail;
}
... | false | qemu | de188751da8db3c77a681bf903035a0e5218c463 | int init_timer_alarm(void)
{
struct qemu_alarm_timer *t = NULL;
int i, err = -1;
for (i = 0; alarm_timers[i].name; i++) {
t = &alarm_timers[i];
err = t->start(t);
if (!err)
break;
}
if (err) {
err = -ENOENT;
goto fail;
}
... | {
"code": [],
"line_no": []
} | int FUNC_0(void)
{
struct qemu_alarm_timer *VAR_0 = NULL;
int VAR_1, VAR_2 = -1;
for (VAR_1 = 0; alarm_timers[VAR_1].name; VAR_1++) {
VAR_0 = &alarm_timers[VAR_1];
VAR_2 = VAR_0->start(VAR_0);
if (!VAR_2)
break;
}
if (VAR_2) {
VAR_2 = -ENO... | [
"int FUNC_0(void)\n{",
"struct qemu_alarm_timer *VAR_0 = NULL;",
"int VAR_1, VAR_2 = -1;",
"for (VAR_1 = 0; alarm_timers[VAR_1].name; VAR_1++) {",
"VAR_0 = &alarm_timers[VAR_1];",
"VAR_2 = VAR_0->start(VAR_0);",
"if (!VAR_2)\nbreak;",
"}",
"if (VAR_2) {",
"VAR_2 = -ENOENT;",
"goto fail;",
"}",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19,
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
39
],
[
41
],
[
43
],
[
47
],
[
51,
53
],
[
55
]
] |
17,097 | static void i386_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu)
{
DisasContext *dc = container_of(dcbase, DisasContext, base);
target_ulong pc_next = disas_insn(dc, cpu);
if (dc->tf || (dc->base.tb->flags & HF_INHIBIT_IRQ_MASK)) {
/* if single step mode, we generate only one instr... | true | qemu | c5a49c63fa26e8825ad101dfe86339ae4c216539 | static void i386_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu)
{
DisasContext *dc = container_of(dcbase, DisasContext, base);
target_ulong pc_next = disas_insn(dc, cpu);
if (dc->tf || (dc->base.tb->flags & HF_INHIBIT_IRQ_MASK)) {
dc->base.is_jmp = DISAS_... | {
"code": [
" } else if ((dc->base.tb->cflags & CF_USE_ICOUNT)"
],
"line_no": [
25
]
} | static void FUNC_0(DisasContextBase *VAR_0, CPUState *VAR_1)
{
DisasContext *dc = container_of(VAR_0, DisasContext, base);
target_ulong pc_next = disas_insn(dc, VAR_1);
if (dc->tf || (dc->base.tb->flags & HF_INHIBIT_IRQ_MASK)) {
dc->base.is_jmp = DISAS_TOO_MANY;
... | [
"static void FUNC_0(DisasContextBase *VAR_0, CPUState *VAR_1)\n{",
"DisasContext *dc = container_of(VAR_0, DisasContext, base);",
"target_ulong pc_next = disas_insn(dc, VAR_1);",
"if (dc->tf || (dc->base.tb->flags & HF_INHIBIT_IRQ_MASK)) {",
"dc->base.is_jmp = DISAS_TOO_MANY;",
"} else if ((dc->base.tb->c... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
23
],
[
25
],
[
27,
29,
31,
33
],
[
47
],
[
49
],
[
51
],
[
53
],
[
57
],
[
59
]
] |
17,098 | static av_cold int alac_decode_init(AVCodecContext * avctx)
{
int ret;
int req_packed;
ALACContext *alac = avctx->priv_data;
alac->avctx = avctx;
/* initialize from the extradata */
if (alac->avctx->extradata_size != ALAC_EXTRADATA_SIZE) {
av_log(avctx, AV_LOG_ERROR, "expected ... | false | FFmpeg | 001af703c6bff7cb8009db3ac882b8d929d67d9e | static av_cold int alac_decode_init(AVCodecContext * avctx)
{
int ret;
int req_packed;
ALACContext *alac = avctx->priv_data;
alac->avctx = avctx;
if (alac->avctx->extradata_size != ALAC_EXTRADATA_SIZE) {
av_log(avctx, AV_LOG_ERROR, "expected %d extradata bytes\n",
... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext * avctx)
{
int VAR_0;
int VAR_1;
ALACContext *alac = avctx->priv_data;
alac->avctx = avctx;
if (alac->avctx->extradata_size != ALAC_EXTRADATA_SIZE) {
av_log(avctx, AV_LOG_ERROR, "expected %d extradata bytes\n",
ALAC_EXTRADA... | [
"static av_cold int FUNC_0(AVCodecContext * avctx)\n{",
"int VAR_0;",
"int VAR_1;",
"ALACContext *alac = avctx->priv_data;",
"alac->avctx = avctx;",
"if (alac->avctx->extradata_size != ALAC_EXTRADATA_SIZE) {",
"av_log(avctx, AV_LOG_ERROR, \"expected %d extradata bytes\\n\",\nALAC_EXTRADATA_SIZE);",
"r... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
... |
17,099 | static void qtrle_decode_8bpp(QtrleContext *s)
{
int stream_ptr;
int header;
int start_line;
int lines_to_change;
signed char rle_code;
int row_ptr, pixel_ptr;
int row_inc = s->frame.linesize[0];
unsigned char pi1, pi2, pi3, pi4; /* 4 palette indices */
unsigned char *rgb ... | true | FFmpeg | e102fcf7f0f78bbdd395f05bb5b2fca83297749b | static void qtrle_decode_8bpp(QtrleContext *s)
{
int stream_ptr;
int header;
int start_line;
int lines_to_change;
signed char rle_code;
int row_ptr, pixel_ptr;
int row_inc = s->frame.linesize[0];
unsigned char pi1, pi2, pi3, pi4;
unsigned char *rgb = s->frame.data[0];
... | {
"code": [
" signed char rle_code;"
],
"line_no": [
13
]
} | static void FUNC_0(QtrleContext *VAR_0)
{
int VAR_1;
int VAR_2;
int VAR_3;
int VAR_4;
signed char VAR_5;
int VAR_6, VAR_7;
int VAR_8 = VAR_0->frame.linesize[0];
unsigned char VAR_9, VAR_10, VAR_11, VAR_12;
unsigned char *VAR_13 = VAR_0->frame.data[0];
int VAR_14 = VA... | [
"static void FUNC_0(QtrleContext *VAR_0)\n{",
"int VAR_1;",
"int VAR_2;",
"int VAR_3;",
"int VAR_4;",
"signed char VAR_5;",
"int VAR_6, VAR_7;",
"int VAR_8 = VAR_0->frame.linesize[0];",
"unsigned char VAR_9, VAR_10, VAR_11, VAR_12;",
"unsigned char *VAR_13 = VAR_0->frame.data[0];",
"int VAR_14 =... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
29,
31
],
[
37
],
[
43
],
[
45
],
[
47
],
[
53
],
[
55
],
[
57
],
[... |
17,100 | static int mxf_read_source_package(MXFPackage *package, ByteIOContext *pb, int tag)
{
switch(tag) {
case 0x4403:
package->tracks_count = get_be32(pb);
if (package->tracks_count >= UINT_MAX / sizeof(UID))
return -1;
package->tracks_refs = av_malloc(package->tracks_count... | true | FFmpeg | 39bb30f6640fe1faf4bbc779a79786028febc95d | static int mxf_read_source_package(MXFPackage *package, ByteIOContext *pb, int tag)
{
switch(tag) {
case 0x4403:
package->tracks_count = get_be32(pb);
if (package->tracks_count >= UINT_MAX / sizeof(UID))
return -1;
package->tracks_refs = av_malloc(package->tracks_count... | {
"code": [
"static int mxf_read_source_package(MXFPackage *package, ByteIOContext *pb, int tag)"
],
"line_no": [
1
]
} | static int FUNC_0(MXFPackage *VAR_0, ByteIOContext *VAR_1, int VAR_2)
{
switch(VAR_2) {
case 0x4403:
VAR_0->tracks_count = get_be32(VAR_1);
if (VAR_0->tracks_count >= UINT_MAX / sizeof(UID))
return -1;
VAR_0->tracks_refs = av_malloc(VAR_0->tracks_count * sizeof(UID));
... | [
"static int FUNC_0(MXFPackage *VAR_0, ByteIOContext *VAR_1, int VAR_2)\n{",
"switch(VAR_2) {",
"case 0x4403:\nVAR_0->tracks_count = get_be32(VAR_1);",
"if (VAR_0->tracks_count >= UINT_MAX / sizeof(UID))\nreturn -1;",
"VAR_0->tracks_refs = av_malloc(VAR_0->tracks_count * sizeof(UID));",
"if (!VAR_0->tracks... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11,
13
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
27,
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
]
] |
17,102 | static int decode_packet(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket* avpkt)
{
WMAProDecodeCtx *s = avctx->priv_data;
GetBitContext* gb = &s->pgb;
const uint8_t* buf = avpkt->data;
int buf_size = avpkt->size;
int num_bits_prev_frame;
int packet... | true | FFmpeg | 7ad698e24e6b9dde57c4e01c145bcddfe9d6e4a3 | static int decode_packet(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket* avpkt)
{
WMAProDecodeCtx *s = avctx->priv_data;
GetBitContext* gb = &s->pgb;
const uint8_t* buf = avpkt->data;
int buf_size = avpkt->size;
int num_bits_prev_frame;
int packet... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket* VAR_3)
{
WMAProDecodeCtx *s = VAR_0->priv_data;
GetBitContext* gb = &s->pgb;
const uint8_t* VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
int VAR_6;
int VAR_7;
*VAR_2 = 0;
if (s->... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket* VAR_3)\n{",
"WMAProDecodeCtx *s = VAR_0->priv_data;",
"GetBitContext* gb = &s->pgb;",
"const uint8_t* VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"int VAR_6;",
"int VAR_7;",
"*VAR_2 = 0;",
"if (s->skip_packe... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
17
],
[
18,
19
],
[
20
],
[
21
],
[
22
],
[
23
],... |
17,103 | int ff_pca(PCA *pca, double *eigenvector, double *eigenvalue){
int i, j, k, pass;
const int n= pca->n;
double z[n];
memset(eigenvector, 0, sizeof(double)*n*n);
for(j=0; j<n; j++){
pca->mean[j] /= pca->count;
eigenvector[j + j*n] = 1.0;
for(i=0; i<=j; i++){
... | true | FFmpeg | ecad9872fb8c50dc88e8298535603e04fd9cf8b4 | int ff_pca(PCA *pca, double *eigenvector, double *eigenvalue){
int i, j, k, pass;
const int n= pca->n;
double z[n];
memset(eigenvector, 0, sizeof(double)*n*n);
for(j=0; j<n; j++){
pca->mean[j] /= pca->count;
eigenvector[j + j*n] = 1.0;
for(i=0; i<=j; i++){
... | {
"code": [
" int i, j, k, pass;"
],
"line_no": [
3
]
} | int FUNC_0(PCA *VAR_0, double *VAR_1, double *VAR_2){
int VAR_3, VAR_4, VAR_5, VAR_6;
const int VAR_7= VAR_0->VAR_7;
double VAR_8[VAR_7];
memset(VAR_1, 0, sizeof(double)*VAR_7*VAR_7);
for(VAR_4=0; VAR_4<VAR_7; VAR_4++){
VAR_0->mean[VAR_4] /= VAR_0->count;
VAR_1[VAR_4 + VAR... | [
"int FUNC_0(PCA *VAR_0, double *VAR_1, double *VAR_2){",
"int VAR_3, VAR_4, VAR_5, VAR_6;",
"const int VAR_7= VAR_0->VAR_7;",
"double VAR_8[VAR_7];",
"memset(VAR_1, 0, sizeof(double)*VAR_7*VAR_7);",
"for(VAR_4=0; VAR_4<VAR_7; VAR_4++){",
"VAR_0->mean[VAR_4] /= VAR_0->count;",
"VAR_1[VAR_4 + VAR_4*VAR_... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1
],
[
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47
],
... |
17,104 | qcrypto_tls_creds_check_cert_key_purpose(QCryptoTLSCredsX509 *creds,
gnutls_x509_crt_t cert,
const char *certFile,
bool isServer,
Error **errp)
{
... | true | qemu | 0e1d02452bf2c3486406dd48524a5b1de3c0eba8 | qcrypto_tls_creds_check_cert_key_purpose(QCryptoTLSCredsX509 *creds,
gnutls_x509_crt_t cert,
const char *certFile,
bool isServer,
Error **errp)
{
... | {
"code": [],
"line_no": []
} | FUNC_0(QCryptoTLSCredsX509 *VAR_0,
gnutls_x509_crt_t VAR_1,
const char *VAR_2,
bool VAR_3,
Error **VAR_4)
{
int VAR_5;
size_t i;
unsigne... | [
"FUNC_0(QCryptoTLSCredsX509 *VAR_0,\ngnutls_x509_crt_t VAR_1,\nconst char *VAR_2,\nbool VAR_3,\nError **VAR_4)\n{",
"int VAR_5;",
"size_t i;",
"unsigned int VAR_6;",
"unsigned int VAR_7;",
"char *VAR_8 = NULL;",
"size_t size;",
"bool allowClient = false, allowServer = false;",
"VAR_7 = 0;",
"for (... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
41
],
[
49
],
[
51
],
[
53
],
[
55
],
[... |
17,105 | void HELPER(window_check)(CPUXtensaState *env, uint32_t pc, uint32_t w)
{
uint32_t windowbase = windowbase_bound(env->sregs[WINDOW_BASE], env);
uint32_t windowstart = env->sregs[WINDOW_START];
uint32_t m, n;
if ((env->sregs[PS] & (PS_WOE | PS_EXCM)) ^ PS_WOE) {
return;
}
for ... | true | qemu | 2db59a76c421cdd1039d10e32a9798952d3ff5ba | void HELPER(window_check)(CPUXtensaState *env, uint32_t pc, uint32_t w)
{
uint32_t windowbase = windowbase_bound(env->sregs[WINDOW_BASE], env);
uint32_t windowstart = env->sregs[WINDOW_START];
uint32_t m, n;
if ((env->sregs[PS] & (PS_WOE | PS_EXCM)) ^ PS_WOE) {
return;
}
for ... | {
"code": [
" uint32_t windowstart = env->sregs[WINDOW_START];",
" uint32_t m, n;",
" if ((env->sregs[PS] & (PS_WOE | PS_EXCM)) ^ PS_WOE) {",
" for (n = 1; ; ++n) {",
" if (n > w) {",
" if (windowstart & windowstart_bit(windowbase + n, env)) {",
" break... | void FUNC_0(window_check)(CPUXtensaState *env, uint32_t pc, uint32_t w)
{
uint32_t windowbase = windowbase_bound(env->sregs[WINDOW_BASE], env);
uint32_t windowstart = env->sregs[WINDOW_START];
uint32_t m, n;
if ((env->sregs[PS] & (PS_WOE | PS_EXCM)) ^ PS_WOE) {
return;
}
for ... | [
"void FUNC_0(window_check)(CPUXtensaState *env, uint32_t pc, uint32_t w)\n{",
"uint32_t windowbase = windowbase_bound(env->sregs[WINDOW_BASE], env);",
"uint32_t windowstart = env->sregs[WINDOW_START];",
"uint32_t m, n;",
"if ((env->sregs[PS] & (PS_WOE | PS_EXCM)) ^ PS_WOE) {",
"return;",
"}",
"for (n ... | [
0,
0,
1,
1,
1,
0,
0,
1,
1,
0,
0,
1,
1,
0,
0,
1,
0,
0,
0,
1,
0,
1,
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
],
[... |
17,106 | QDict *qobject_to_qdict(const QObject *obj)
{
if (qobject_type(obj) != QTYPE_QDICT)
return NULL;
return container_of(obj, QDict, base);
}
| true | qemu | 89cad9f3ec6b30d7550fb5704475fc9c3393a066 | QDict *qobject_to_qdict(const QObject *obj)
{
if (qobject_type(obj) != QTYPE_QDICT)
return NULL;
return container_of(obj, QDict, base);
}
| {
"code": [
" if (qobject_type(obj) != QTYPE_QDICT)"
],
"line_no": [
5
]
} | QDict *FUNC_0(const QObject *obj)
{
if (qobject_type(obj) != QTYPE_QDICT)
return NULL;
return container_of(obj, QDict, base);
}
| [
"QDict *FUNC_0(const QObject *obj)\n{",
"if (qobject_type(obj) != QTYPE_QDICT)\nreturn NULL;",
"return container_of(obj, QDict, base);",
"}"
] | [
0,
1,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
11
],
[
13
]
] |
17,107 | PXA2xxLCDState *pxa2xx_lcdc_init(MemoryRegion *sysmem,
target_phys_addr_t base, qemu_irq irq)
{
PXA2xxLCDState *s;
s = (PXA2xxLCDState *) g_malloc0(sizeof(PXA2xxLCDState));
s->invalidated = 1;
s->irq = irq;
s->sysmem = sysmem;
pxa2xx_lcdc_orientation(... | true | qemu | 167351020420c285b67cdf0603501b3d3b15e3f7 | PXA2xxLCDState *pxa2xx_lcdc_init(MemoryRegion *sysmem,
target_phys_addr_t base, qemu_irq irq)
{
PXA2xxLCDState *s;
s = (PXA2xxLCDState *) g_malloc0(sizeof(PXA2xxLCDState));
s->invalidated = 1;
s->irq = irq;
s->sysmem = sysmem;
pxa2xx_lcdc_orientation(... | {
"code": [
" pxa2xx_screen_dump, NULL, s);"
],
"line_no": [
37
]
} | PXA2xxLCDState *FUNC_0(MemoryRegion *sysmem,
target_phys_addr_t base, qemu_irq irq)
{
PXA2xxLCDState *s;
s = (PXA2xxLCDState *) g_malloc0(sizeof(PXA2xxLCDState));
s->invalidated = 1;
s->irq = irq;
s->sysmem = sysmem;
pxa2xx_lcdc_orientation(s, graphic... | [
"PXA2xxLCDState *FUNC_0(MemoryRegion *sysmem,\ntarget_phys_addr_t base, qemu_irq irq)\n{",
"PXA2xxLCDState *s;",
"s = (PXA2xxLCDState *) g_malloc0(sizeof(PXA2xxLCDState));",
"s->invalidated = 1;",
"s->irq = irq;",
"s->sysmem = sysmem;",
"pxa2xx_lcdc_orientation(s, graphic_rotate);",
"memory_region_ini... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25,
27
],
[
29
],
[
33,
35,
37
],
[
41
],
[
43,
45
],
[
47
],
[
49,
51
],
[
53
],
[
55
],
[
57... |
17,108 | static int decode_mips16_opc (CPUMIPSState *env, DisasContext *ctx,
int *is_branch)
{
int rx, ry;
int sa;
int op, cnvt_op, op1, offset;
int funct;
int n_bytes;
op = (ctx->opcode >> 11) & 0x1f;
sa = (ctx->opcode >> 2) & 0x7;
sa = sa == 0 ? 8 : sa;... | true | qemu | 240ce26a0533a6e5ee472789fbfbd9f7f939197e | static int decode_mips16_opc (CPUMIPSState *env, DisasContext *ctx,
int *is_branch)
{
int rx, ry;
int sa;
int op, cnvt_op, op1, offset;
int funct;
int n_bytes;
op = (ctx->opcode >> 11) & 0x1f;
sa = (ctx->opcode >> 2) & 0x7;
sa = sa == 0 ? 8 : sa;... | {
"code": [
"static int decode_mips16_opc (CPUMIPSState *env, DisasContext *ctx,",
" int *is_branch)",
" *is_branch = 1;",
" if (!nd) {",
" *is_branch = 1;",
" decode_extended_mips16_opc(env, ctx, is_branch);",
" ... | static int FUNC_0 (CPUMIPSState *VAR_0, DisasContext *VAR_1,
int *VAR_2)
{
int VAR_3, VAR_4;
int VAR_5;
int VAR_6, VAR_7, VAR_8, VAR_9;
int VAR_10;
int VAR_11;
VAR_6 = (VAR_1->opcode >> 11) & 0x1f;
VAR_5 = (VAR_1->opcode >> 2) & 0x7;
VAR_5 = VAR_... | [
"static int FUNC_0 (CPUMIPSState *VAR_0, DisasContext *VAR_1,\nint *VAR_2)\n{",
"int VAR_3, VAR_4;",
"int VAR_5;",
"int VAR_6, VAR_7, VAR_8, VAR_9;",
"int VAR_10;",
"int VAR_11;",
"VAR_6 = (VAR_1->opcode >> 11) & 0x1f;",
"VAR_5 = (VAR_1->opcode >> 2) & 0x7;",
"VAR_5 = VAR_5 == 0 ? 8 : VAR_5;",
"VA... | [
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
39
],
[
41,
43
],
[
45
],
[
49
],
[
51
... |
17,109 | static int arm_gic_common_init(SysBusDevice *dev)
{
GICState *s = FROM_SYSBUS(GICState, dev);
int num_irq = s->num_irq;
if (s->num_cpu > NCPU) {
hw_error("requested %u CPUs exceeds GIC maximum %d\n",
s->num_cpu, NCPU);
}
s->num_irq += GIC_BASE_IRQ;
if (s->num_... | true | qemu | 53111180946a56d314a9c1d07d09b9ef91e847b9 | static int arm_gic_common_init(SysBusDevice *dev)
{
GICState *s = FROM_SYSBUS(GICState, dev);
int num_irq = s->num_irq;
if (s->num_cpu > NCPU) {
hw_error("requested %u CPUs exceeds GIC maximum %d\n",
s->num_cpu, NCPU);
}
s->num_irq += GIC_BASE_IRQ;
if (s->num_... | {
"code": [
" GICState *s = FROM_SYSBUS(GICState, dev);",
" return 0;",
"static int arm_gic_common_init(SysBusDevice *dev)",
" GICState *s = FROM_SYSBUS(GICState, dev);",
" hw_error(\"requested %u CPUs exceeds GIC maximum %d\\n\",",
" s->num_cpu, NCPU);",
" ... | static int FUNC_0(SysBusDevice *VAR_0)
{
GICState *s = FROM_SYSBUS(GICState, VAR_0);
int VAR_1 = s->VAR_1;
if (s->num_cpu > NCPU) {
hw_error("requested %u CPUs exceeds GIC maximum %d\n",
s->num_cpu, NCPU);
}
s->VAR_1 += GIC_BASE_IRQ;
if (s->VAR_1 > GIC_MAXIRQ)... | [
"static int FUNC_0(SysBusDevice *VAR_0)\n{",
"GICState *s = FROM_SYSBUS(GICState, VAR_0);",
"int VAR_1 = s->VAR_1;",
"if (s->num_cpu > NCPU) {",
"hw_error(\"requested %u CPUs exceeds GIC maximum %d\\n\",\ns->num_cpu, NCPU);",
"}",
"s->VAR_1 += GIC_BASE_IRQ;",
"if (s->VAR_1 > GIC_MAXIRQ) {",
"hw_erro... | [
1,
1,
0,
0,
1,
0,
0,
0,
1,
0,
0,
1,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
37
],
[
39,
41
],
[
43
],
[
47
],
[
49
],
[
51
]
] |
17,110 | static kbd_layout_t *parse_keyboard_layout(const name2keysym_t *table,
const char *language,
kbd_layout_t * k)
{
FILE *f;
char * filename;
char line[1024];
int len;
filename = qemu_find_file(QEMU_FILE_TYPE_KEYMAP, language);
if (!k)
k = g_malloc0(sizeof(kbd_layout_... | true | qemu | f2d3476eba17486c42357ba25c36bd26e627d1d7 | static kbd_layout_t *parse_keyboard_layout(const name2keysym_t *table,
const char *language,
kbd_layout_t * k)
{
FILE *f;
char * filename;
char line[1024];
int len;
filename = qemu_find_file(QEMU_FILE_TYPE_KEYMAP, language);
if (!k)
k = g_malloc0(sizeof(kbd_layout_... | {
"code": [
" if (!k)",
"\tk = g_malloc0(sizeof(kbd_layout_t));",
" if (!(filename && (f = fopen(filename, \"r\")))) {",
" g_free(filename);"
],
"line_no": [
23,
25,
27,
37
]
} | static kbd_layout_t *FUNC_0(const name2keysym_t *table,
const char *language,
kbd_layout_t * k)
{
FILE *f;
char * VAR_0;
char VAR_1[1024];
int VAR_2;
VAR_0 = qemu_find_file(QEMU_FILE_TYPE_KEYMAP, language);
if (!k)
k = g_malloc0(sizeof(kbd_layout_t));
if (!(VA... | [
"static kbd_layout_t *FUNC_0(const name2keysym_t *table,\nconst char *language,\nkbd_layout_t * k)\n{",
"FILE *f;",
"char * VAR_0;",
"char VAR_1[1024];",
"int VAR_2;",
"VAR_0 = qemu_find_file(QEMU_FILE_TYPE_KEYMAP, language);",
"if (!k)\nk = g_malloc0(sizeof(kbd_layout_t));",
"if (!(VAR_0 && (f = fope... | [
0,
0,
0,
0,
0,
0,
1,
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,
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
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
47,
49
],
[
51,... |
17,111 | static void *virtio_scsi_load_request(QEMUFile *f, SCSIRequest *sreq)
{
SCSIBus *bus = sreq->bus;
VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus);
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
VirtIOSCSIReq *req;
uint32_t n;
req = g_malloc(sizeof(*req));
qemu_get_be32s(f, &n);
... | true | qemu | 3c3ce981423e0d6c18af82ee62f1850c2cda5976 | static void *virtio_scsi_load_request(QEMUFile *f, SCSIRequest *sreq)
{
SCSIBus *bus = sreq->bus;
VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus);
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
VirtIOSCSIReq *req;
uint32_t n;
req = g_malloc(sizeof(*req));
qemu_get_be32s(f, &n);
... | {
"code": [],
"line_no": []
} | static void *FUNC_0(QEMUFile *VAR_0, SCSIRequest *VAR_1)
{
SCSIBus *bus = VAR_1->bus;
VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus);
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
VirtIOSCSIReq *req;
uint32_t n;
req = g_malloc(sizeof(*req));
qemu_get_be32s(VAR_0, &n);
asse... | [
"static void *FUNC_0(QEMUFile *VAR_0, SCSIRequest *VAR_1)\n{",
"SCSIBus *bus = VAR_1->bus;",
"VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus);",
"VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);",
"VirtIOSCSIReq *req;",
"uint32_t n;",
"req = g_malloc(sizeof(*req));",
"qemu_get_be32s(VAR_0, &n);",
"a... | [
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
],
[
34
],
[
38
],
[
40
],
[
42
],
[
44,
46
],
[
50
],
[
52
],
[
54
],
[
56
]
] |
17,112 | static int svq1_decode_frame(AVCodecContext *avctx, void *data,
int *data_size, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
MpegEncContext *s = avctx->priv_data;
uint8_t *current, *previous;
int result, i, x, y, width, h... | true | FFmpeg | 0a373c31cb7f8dae84857881cd7e3829a6483efe | static int svq1_decode_frame(AVCodecContext *avctx, void *data,
int *data_size, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
MpegEncContext *s = avctx->priv_data;
uint8_t *current, *previous;
int result, i, x, y, width, h... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
MpegEncContext *s = VAR_0->priv_data;
uint8_t *current, *previous;
int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"MpegEncContext *s = VAR_0->priv_data;",
"uint8_t *current, *previous;",
"int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11;",
"AVFrame *pict ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
31
],
[
35,
37
],
[
43
],
[
45
],
[
49,
51
],
[
55
],
[
57
],
[
59
],
[
63
],
[... |
17,114 | bool migrate_rdma_pin_all(void)
{
MigrationState *s;
s = migrate_get_current();
return s->enabled_capabilities[MIGRATION_CAPABILITY_RDMA_PIN_ALL];
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | bool migrate_rdma_pin_all(void)
{
MigrationState *s;
s = migrate_get_current();
return s->enabled_capabilities[MIGRATION_CAPABILITY_RDMA_PIN_ALL];
}
| {
"code": [],
"line_no": []
} | bool FUNC_0(void)
{
MigrationState *s;
s = migrate_get_current();
return s->enabled_capabilities[MIGRATION_CAPABILITY_RDMA_PIN_ALL];
}
| [
"bool FUNC_0(void)\n{",
"MigrationState *s;",
"s = migrate_get_current();",
"return s->enabled_capabilities[MIGRATION_CAPABILITY_RDMA_PIN_ALL];",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
]
] |
17,115 | static void openpic_reset (void *opaque)
{
openpic_t *opp = (openpic_t *)opaque;
int i;
opp->glbc = 0x80000000;
/* Initialise controller registers */
opp->frep = ((OPENPIC_EXT_IRQ - 1) << 16) | ((MAX_CPU - 1) << 8) | VID;
opp->veni = VENI;
opp->pint = 0x00000000;
opp->spve = 0... | true | qemu | d14ed2548c3163cdb316eb4da36cd7a6a8975da4 | static void openpic_reset (void *opaque)
{
openpic_t *opp = (openpic_t *)opaque;
int i;
opp->glbc = 0x80000000;
opp->frep = ((OPENPIC_EXT_IRQ - 1) << 16) | ((MAX_CPU - 1) << 8) | VID;
opp->veni = VENI;
opp->pint = 0x00000000;
opp->spve = 0x000000FF;
opp->tifr = 0x003F7A0... | {
"code": [],
"line_no": []
} | static void FUNC_0 (void *VAR_0)
{
openpic_t *opp = (openpic_t *)VAR_0;
int VAR_1;
opp->glbc = 0x80000000;
opp->frep = ((OPENPIC_EXT_IRQ - 1) << 16) | ((MAX_CPU - 1) << 8) | VID;
opp->veni = VENI;
opp->pint = 0x00000000;
opp->spve = 0x000000FF;
opp->tifr = 0x003F7A00;
... | [
"static void FUNC_0 (void *VAR_0)\n{",
"openpic_t *opp = (openpic_t *)VAR_0;",
"int VAR_1;",
"opp->glbc = 0x80000000;",
"opp->frep = ((OPENPIC_EXT_IRQ - 1) << 16) | ((MAX_CPU - 1) << 8) | VID;",
"opp->veni = VENI;",
"opp->pint = 0x00000000;",
"opp->spve = 0x000000FF;",
"opp->tifr = 0x003F7A00;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
50
],
[
53... |
17,116 | static av_cold void movie_uninit(AVFilterContext *ctx)
{
MovieContext *movie = ctx->priv;
int i;
for (i = 0; i < ctx->nb_outputs; i++) {
av_freep(&ctx->output_pads[i].name);
if (movie->st[i].st)
avcodec_close(movie->st[i].st->codec);
}
av_freep(&movie->st);
... | true | FFmpeg | 97392553656a7f4fabde9ded4d2b7f538d98ee17 | static av_cold void movie_uninit(AVFilterContext *ctx)
{
MovieContext *movie = ctx->priv;
int i;
for (i = 0; i < ctx->nb_outputs; i++) {
av_freep(&ctx->output_pads[i].name);
if (movie->st[i].st)
avcodec_close(movie->st[i].st->codec);
}
av_freep(&movie->st);
... | {
"code": [
" av_frame_free(&movie->frame);"
],
"line_no": [
25
]
} | static av_cold void FUNC_0(AVFilterContext *ctx)
{
MovieContext *movie = ctx->priv;
int VAR_0;
for (VAR_0 = 0; VAR_0 < ctx->nb_outputs; VAR_0++) {
av_freep(&ctx->output_pads[VAR_0].name);
if (movie->st[VAR_0].st)
avcodec_close(movie->st[VAR_0].st->codec);
}
av_... | [
"static av_cold void FUNC_0(AVFilterContext *ctx)\n{",
"MovieContext *movie = ctx->priv;",
"int VAR_0;",
"for (VAR_0 = 0; VAR_0 < ctx->nb_outputs; VAR_0++) {",
"av_freep(&ctx->output_pads[VAR_0].name);",
"if (movie->st[VAR_0].st)\navcodec_close(movie->st[VAR_0].st->codec);",
"}",
"av_freep(&movie->st)... | [
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
]
] |
17,117 | static XICSState *xics_system_init(MachineState *machine,
int nr_servers, int nr_irqs)
{
XICSState *icp = NULL;
if (kvm_enabled()) {
Error *err = NULL;
if (machine_kernel_irqchip_allowed(machine)) {
icp = try_create_xics(TYPE_KVM_XICS, nr... | true | qemu | 903a41d3415960240cb3b9f1d66f3707b27010d6 | static XICSState *xics_system_init(MachineState *machine,
int nr_servers, int nr_irqs)
{
XICSState *icp = NULL;
if (kvm_enabled()) {
Error *err = NULL;
if (machine_kernel_irqchip_allowed(machine)) {
icp = try_create_xics(TYPE_KVM_XICS, nr... | {
"code": [],
"line_no": []
} | static XICSState *FUNC_0(MachineState *machine,
int nr_servers, int nr_irqs)
{
XICSState *icp = NULL;
if (kvm_enabled()) {
Error *err = NULL;
if (machine_kernel_irqchip_allowed(machine)) {
icp = try_create_xics(TYPE_KVM_XICS, nr_servers, ... | [
"static XICSState *FUNC_0(MachineState *machine,\nint nr_servers, int nr_irqs)\n{",
"XICSState *icp = NULL;",
"if (kvm_enabled()) {",
"Error *err = NULL;",
"if (machine_kernel_irqchip_allowed(machine)) {",
"icp = try_create_xics(TYPE_KVM_XICS, nr_servers, nr_irqs, &err);",
"}",
"if (machine_kernel_irq... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
32
],
[
36
],
[
38
],
[
40
],
[
44
],
[
46
]
] |
17,119 | static void chroma(WaveformContext *s, AVFrame *in, AVFrame *out,
int component, int intensity, int offset, int column)
{
const int plane = s->desc->comp[component].plane;
const int mirror = s->mirror;
const int c0_linesize = in->linesize[(plane + 1) % s->ncomp];
const int c1_li... | false | FFmpeg | 5b349c8d7cc5dd26b3fbbce6e3883ce02861eeb7 | static void chroma(WaveformContext *s, AVFrame *in, AVFrame *out,
int component, int intensity, int offset, int column)
{
const int plane = s->desc->comp[component].plane;
const int mirror = s->mirror;
const int c0_linesize = in->linesize[(plane + 1) % s->ncomp];
const int c1_li... | {
"code": [],
"line_no": []
} | static void FUNC_0(WaveformContext *VAR_0, AVFrame *VAR_1, AVFrame *VAR_2,
int VAR_3, int VAR_4, int VAR_5, int VAR_6)
{
const int VAR_7 = VAR_0->desc->comp[VAR_3].VAR_7;
const int VAR_8 = VAR_0->VAR_8;
const int VAR_9 = VAR_1->linesize[(VAR_7 + 1) % VAR_0->ncomp];
const int VAR... | [
"static void FUNC_0(WaveformContext *VAR_0, AVFrame *VAR_1, AVFrame *VAR_2,\nint VAR_3, int VAR_4, int VAR_5, int VAR_6)\n{",
"const int VAR_7 = VAR_0->desc->comp[VAR_3].VAR_7;",
"const int VAR_8 = VAR_0->VAR_8;",
"const int VAR_9 = VAR_1->linesize[(VAR_7 + 1) % VAR_0->ncomp];",
"const int VAR_10 = VAR_1->l... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
17,121 | target_ulong helper_lwr(CPUMIPSState *env, target_ulong arg1,
target_ulong arg2, int mem_idx)
{
target_ulong tmp;
tmp = do_lbu(env, arg2, mem_idx);
arg1 = (arg1 & 0xFFFFFF00) | tmp;
if (GET_LMASK(arg2) >= 1) {
tmp = do_lbu(env, GET_OFFSET(arg2, -1), mem_idx);
... | true | qemu | fc40787abcf8452b8f50d92b7a13243a12972c7a | target_ulong helper_lwr(CPUMIPSState *env, target_ulong arg1,
target_ulong arg2, int mem_idx)
{
target_ulong tmp;
tmp = do_lbu(env, arg2, mem_idx);
arg1 = (arg1 & 0xFFFFFF00) | tmp;
if (GET_LMASK(arg2) >= 1) {
tmp = do_lbu(env, GET_OFFSET(arg2, -1), mem_idx);
... | {
"code": [
" target_ulong arg2, int mem_idx)",
" target_ulong tmp;",
" tmp = do_lbu(env, arg2, mem_idx);",
" arg1 = (arg1 & 0xFF00FFFF) | (tmp << 16);",
" arg1 = (arg1 & 0xFFFF00FF) | (tmp << 8);",
" return (int32_t)arg1;",
"target_ulong helpe... | target_ulong FUNC_0(CPUMIPSState *env, target_ulong arg1,
target_ulong arg2, int mem_idx)
{
target_ulong tmp;
tmp = do_lbu(env, arg2, mem_idx);
arg1 = (arg1 & 0xFFFFFF00) | tmp;
if (GET_LMASK(arg2) >= 1) {
tmp = do_lbu(env, GET_OFFSET(arg2, -1), mem_idx);
... | [
"target_ulong FUNC_0(CPUMIPSState *env, target_ulong arg1,\ntarget_ulong arg2, int mem_idx)\n{",
"target_ulong tmp;",
"tmp = do_lbu(env, arg2, mem_idx);",
"arg1 = (arg1 & 0xFFFFFF00) | tmp;",
"if (GET_LMASK(arg2) >= 1) {",
"tmp = do_lbu(env, GET_OFFSET(arg2, -1), mem_idx);",
"arg1 = (arg1 & 0xFFFF00FF) ... | [
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
0,
1,
1,
1,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
]
] |
17,122 | read_help(void)
{
printf(
"\n"
" reads a range of bytes from the given offset\n"
"\n"
" Example:\n"
" 'read -v 512 1k' - dumps 1 kilobyte read from 512 bytes into the file\n"
"\n"
" Reads a segment of the currently open file, optionally dumping it to the\n"
" standard output stream (with -v option) for subse... | true | qemu | d9654a58576dae982458bdb1eb565c9876c24c22 | read_help(void)
{
printf(
"\n"
" reads a range of bytes from the given offset\n"
"\n"
" Example:\n"
" 'read -v 512 1k' - dumps 1 kilobyte read from 512 bytes into the file\n"
"\n"
" Reads a segment of the currently open file, optionally dumping it to the\n"
" standard output stream (with -v option) for subse... | {
"code": [
"\" -C, -- report statistics in a machine parsable format\\n\"",
"\" -v, -- dump buffer to standard output\\n\""
],
"line_no": [
27,
29
]
} | FUNC_0(void)
{
printf(
"\n"
" reads a range of bytes from the given offset\n"
"\n"
" Example:\n"
" 'read -v 512 1k' - dumps 1 kilobyte read from 512 bytes into the file\n"
"\n"
" Reads a segment of the currently open file, optionally dumping it to the\n"
" standard output stream (with -v option) for subseque... | [
"FUNC_0(void)\n{",
"printf(\n\"\\n\"\n\" reads a range of bytes from the given offset\\n\"\n\"\\n\"\n\" Example:\\n\"\n\" 'read -v 512 1k' - dumps 1 kilobyte read from 512 bytes into the file\\n\"\n\"\\n\"\n\" Reads a segment of the currently open file, optionally dumping it to the\\n\"\n\" standard output stream... | [
0,
1,
0
] | [
[
1,
3
],
[
5,
7,
9,
11,
13,
15,
17,
19,
21,
23,
25,
27,
29,
31,
33
],
[
35
]
] |
17,123 | QEMUSizedBuffer *qsb_clone(const QEMUSizedBuffer *qsb)
{
QEMUSizedBuffer *out = qsb_create(NULL, qsb_get_length(qsb));
size_t i;
ssize_t res;
off_t pos = 0;
if (!out) {
return NULL;
}
for (i = 0; i < qsb->n_iov; i++) {
res = qsb_write_at(out, qsb->iov[i].iov_ba... | true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | QEMUSizedBuffer *qsb_clone(const QEMUSizedBuffer *qsb)
{
QEMUSizedBuffer *out = qsb_create(NULL, qsb_get_length(qsb));
size_t i;
ssize_t res;
off_t pos = 0;
if (!out) {
return NULL;
}
for (i = 0; i < qsb->n_iov; i++) {
res = qsb_write_at(out, qsb->iov[i].iov_ba... | {
"code": [],
"line_no": []
} | QEMUSizedBuffer *FUNC_0(const QEMUSizedBuffer *qsb)
{
QEMUSizedBuffer *out = qsb_create(NULL, qsb_get_length(qsb));
size_t i;
ssize_t res;
off_t pos = 0;
if (!out) {
return NULL;
}
for (i = 0; i < qsb->n_iov; i++) {
res = qsb_write_at(out, qsb->iov[i].iov_base,... | [
"QEMUSizedBuffer *FUNC_0(const QEMUSizedBuffer *qsb)\n{",
"QEMUSizedBuffer *out = qsb_create(NULL, qsb_get_length(qsb));",
"size_t i;",
"ssize_t res;",
"off_t pos = 0;",
"if (!out) {",
"return NULL;",
"}",
"for (i = 0; i < qsb->n_iov; i++) {",
"res = qsb_write_at(out, qsb->iov[i].iov_base,\npos, ... | [
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
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
]
] |
17,125 | int put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
{
int bps, blkalign, bytespersec;
int hdrsize = 18;
if(!enc->codec_tag || enc->codec_tag > 0xffff)
enc->codec_tag = codec_get_tag(codec_wav_tags, enc->codec_id);
if(!enc->codec_tag)
return -1;
put_le16(pb, enc->cod... | false | FFmpeg | 92eb82325e8bddc56daa8dbd1308efd4896c6114 | int put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
{
int bps, blkalign, bytespersec;
int hdrsize = 18;
if(!enc->codec_tag || enc->codec_tag > 0xffff)
enc->codec_tag = codec_get_tag(codec_wav_tags, enc->codec_id);
if(!enc->codec_tag)
return -1;
put_le16(pb, enc->cod... | {
"code": [],
"line_no": []
} | int FUNC_0(ByteIOContext *VAR_0, AVCodecContext *VAR_1)
{
int VAR_2, VAR_3, VAR_4;
int VAR_5 = 18;
if(!VAR_1->codec_tag || VAR_1->codec_tag > 0xffff)
VAR_1->codec_tag = codec_get_tag(codec_wav_tags, VAR_1->codec_id);
if(!VAR_1->codec_tag)
return -1;
put_le16(VAR_0, VAR_1->... | [
"int FUNC_0(ByteIOContext *VAR_0, AVCodecContext *VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4;",
"int VAR_5 = 18;",
"if(!VAR_1->codec_tag || VAR_1->codec_tag > 0xffff)\nVAR_1->codec_tag = codec_get_tag(codec_wav_tags, VAR_1->codec_id);",
"if(!VAR_1->codec_tag)\nreturn -1;",
"put_le16(VAR_0, VAR_1->codec_tag);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15,
17
],
[
21
],
[
23
],
[
25
],
[
27,
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49... |
17,126 | static inline int get_egolomb(GetBitContext *gb)
{
int v = 4;
while (get_bits1(gb)) v++;
return (1 << v) + get_bits(gb, v);
}
| false | FFmpeg | 2884cf205a9a29d89db7a444c5b1613cdfe37acf | static inline int get_egolomb(GetBitContext *gb)
{
int v = 4;
while (get_bits1(gb)) v++;
return (1 << v) + get_bits(gb, v);
}
| {
"code": [],
"line_no": []
} | static inline int FUNC_0(GetBitContext *VAR_0)
{
int VAR_1 = 4;
while (get_bits1(VAR_0)) VAR_1++;
return (1 << VAR_1) + get_bits(VAR_0, VAR_1);
}
| [
"static inline int FUNC_0(GetBitContext *VAR_0)\n{",
"int VAR_1 = 4;",
"while (get_bits1(VAR_0)) VAR_1++;",
"return (1 << VAR_1) + get_bits(VAR_0, VAR_1);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
]
] |
17,127 | static int read_access_unit(AVCodecContext *avctx, void* data, int *data_size,
const uint8_t *buf, int buf_size)
{
MLPDecodeContext *m = avctx->priv_data;
GetBitContext gb;
unsigned int length, substr;
unsigned int substream_start;
unsigned int header_size = 4;
... | false | FFmpeg | cc9c5126387a1d8093ca8cc1df6ab2c535c35dba | static int read_access_unit(AVCodecContext *avctx, void* data, int *data_size,
const uint8_t *buf, int buf_size)
{
MLPDecodeContext *m = avctx->priv_data;
GetBitContext gb;
unsigned int length, substr;
unsigned int substream_start;
unsigned int header_size = 4;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void* VAR_1, int *VAR_2,
const uint8_t *VAR_3, int VAR_4)
{
MLPDecodeContext *m = VAR_0->priv_data;
GetBitContext gb;
unsigned int VAR_5, VAR_6;
unsigned int VAR_7;
unsigned int VAR_8 = 4;
unsigned int VAR_9 = 0;
u... | [
"static int FUNC_0(AVCodecContext *VAR_0, void* VAR_1, int *VAR_2,\nconst uint8_t *VAR_3, int VAR_4)\n{",
"MLPDecodeContext *m = VAR_0->priv_data;",
"GetBitContext gb;",
"unsigned int VAR_5, VAR_6;",
"unsigned int VAR_7;",
"unsigned int VAR_8 = 4;",
"unsigned int VAR_9 = 0;",
"uint8_t substream_parity... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
33
],
[
37,
39
],
[
43
],
[
47
],
[
49,
51
],
[
53
],
[
55
... |
17,129 | int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
{
int ret;
switch (avctx->codec_type) {
case AVMEDIA_TYPE_VIDEO:
if (!frame->width)
frame->width = avctx->width;
if (!frame->height)
frame->height = avctx->height;... | false | FFmpeg | 2eba9087f3031c6050f8dcd996225490be6c2410 | int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
{
int ret;
switch (avctx->codec_type) {
case AVMEDIA_TYPE_VIDEO:
if (!frame->width)
frame->width = avctx->width;
if (!frame->height)
frame->height = avctx->height;... | {
"code": [],
"line_no": []
} | int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1, int VAR_2)
{
int VAR_3;
switch (VAR_0->codec_type) {
case AVMEDIA_TYPE_VIDEO:
if (!VAR_1->width)
VAR_1->width = VAR_0->width;
if (!VAR_1->height)
VAR_1->height = VAR_0->height;
... | [
"int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1, int VAR_2)\n{",
"int VAR_3;",
"switch (VAR_0->codec_type) {",
"case AVMEDIA_TYPE_VIDEO:\nif (!VAR_1->width)\nVAR_1->width = VAR_0->width;",
"if (!VAR_1->height)\nVAR_1->height = VAR_0->height;",
"if (VAR_1->format < 0)\nVAR_1->f... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31,
33
],
[
35
],
[
37,
39,
41
],
[
43,
45
],
[
47,
49
],
[
51
],
[
53
],
[
55... |
17,130 | static av_cold void common_init(H264Context *h){
MpegEncContext * const s = &h->s;
s->width = s->avctx->width;
s->height = s->avctx->height;
s->codec_id= s->avctx->codec->id;
ff_h264dsp_init(&h->h264dsp, 8, 1);
ff_h264_pred_init(&h->hpc, s->codec_id, 8, 1);
h->dequant_coeff_pps=... | false | FFmpeg | a51fbb56bb9352476affaef1fc6773c8b059db91 | static av_cold void common_init(H264Context *h){
MpegEncContext * const s = &h->s;
s->width = s->avctx->width;
s->height = s->avctx->height;
s->codec_id= s->avctx->codec->id;
ff_h264dsp_init(&h->h264dsp, 8, 1);
ff_h264_pred_init(&h->hpc, s->codec_id, 8, 1);
h->dequant_coeff_pps=... | {
"code": [],
"line_no": []
} | static av_cold void FUNC_0(H264Context *h){
MpegEncContext * const s = &h->s;
s->width = s->avctx->width;
s->height = s->avctx->height;
s->codec_id= s->avctx->codec->id;
ff_h264dsp_init(&h->h264dsp, 8, 1);
ff_h264_pred_init(&h->hpc, s->codec_id, 8, 1);
h->dequant_coeff_pps= -1;
... | [
"static av_cold void FUNC_0(H264Context *h){",
"MpegEncContext * const s = &h->s;",
"s->width = s->avctx->width;",
"s->height = s->avctx->height;",
"s->codec_id= s->avctx->codec->id;",
"ff_h264dsp_init(&h->h264dsp, 8, 1);",
"ff_h264_pred_init(&h->hpc, s->codec_id, 8, 1);",
"h->dequant_coeff_pps= -1;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
33
],
[
35
],
[
37
]
] |
17,131 | static void RENAME(yuv2rgb555_2)(SwsContext *c, const uint16_t *buf0,
const uint16_t *buf1, const uint16_t *ubuf0,
const uint16_t *ubuf1, const uint16_t *vbuf0,
const uint16_t *vbuf1, const uint16_t *abuf0,
... | false | FFmpeg | 13a099799e89a76eb921ca452e1b04a7a28a9855 | static void RENAME(yuv2rgb555_2)(SwsContext *c, const uint16_t *buf0,
const uint16_t *buf1, const uint16_t *ubuf0,
const uint16_t *ubuf1, const uint16_t *vbuf0,
const uint16_t *vbuf1, const uint16_t *abuf0,
... | {
"code": [],
"line_no": []
} | static void FUNC_0(yuv2rgb555_2)(SwsContext *c, const uint16_t *buf0,
const uint16_t *buf1, const uint16_t *ubuf0,
const uint16_t *ubuf1, const uint16_t *vbuf0,
const uint16_t *vbuf1, const uint16_t *abuf0,
... | [
"static void FUNC_0(yuv2rgb555_2)(SwsContext *c, const uint16_t *buf0,\nconst uint16_t *buf1, const uint16_t *ubuf0,\nconst uint16_t *ubuf1, const uint16_t *vbuf0,\nconst uint16_t *vbuf1, const uint16_t *abuf0,\nconst uint16_t *abuf1, uint8_t *dest,\nint dstW, int yalpha, int uvalpha, int y)\n{",
"__asm__ volatil... | [
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13
],
[
17,
19,
21,
23,
25,
27,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51
],
[
53
]
] |
17,132 | static void device_finalize(Object *obj)
{
DeviceState *dev = DEVICE(obj);
BusState *bus;
DeviceClass *dc = DEVICE_GET_CLASS(dev);
if (dev->realized) {
while (dev->num_child_bus) {
bus = QLIST_FIRST(&dev->child_bus);
qbus_free(bus);
}
if (qdev_... | false | qemu | 06f7f2bb562826101468f387b4a34971b16e9aee | static void device_finalize(Object *obj)
{
DeviceState *dev = DEVICE(obj);
BusState *bus;
DeviceClass *dc = DEVICE_GET_CLASS(dev);
if (dev->realized) {
while (dev->num_child_bus) {
bus = QLIST_FIRST(&dev->child_bus);
qbus_free(bus);
}
if (qdev_... | {
"code": [],
"line_no": []
} | static void FUNC_0(Object *VAR_0)
{
DeviceState *dev = DEVICE(VAR_0);
BusState *bus;
DeviceClass *dc = DEVICE_GET_CLASS(dev);
if (dev->realized) {
while (dev->num_child_bus) {
bus = QLIST_FIRST(&dev->child_bus);
qbus_free(bus);
}
if (qdev_get_v... | [
"static void FUNC_0(Object *VAR_0)\n{",
"DeviceState *dev = DEVICE(VAR_0);",
"BusState *bus;",
"DeviceClass *dc = DEVICE_GET_CLASS(dev);",
"if (dev->realized) {",
"while (dev->num_child_bus) {",
"bus = QLIST_FIRST(&dev->child_bus);",
"qbus_free(bus);",
"}",
"if (qdev_get_vmsd(dev)) {",
"vmstate_... | [
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
... |
17,134 | static int pte_check_hash32(mmu_ctx_t *ctx, target_ulong pte0,
target_ulong pte1, int h, int rw, int type)
{
target_ulong ptem, mmask;
int access, ret, pteh, ptev, pp;
ret = -1;
/* Check validity and table match */
ptev = pte_is_valid_hash32(pte0);
pteh = (p... | false | qemu | 496272a7018ba01aa2b87a1a5ed866ff85133401 | static int pte_check_hash32(mmu_ctx_t *ctx, target_ulong pte0,
target_ulong pte1, int h, int rw, int type)
{
target_ulong ptem, mmask;
int access, ret, pteh, ptev, pp;
ret = -1;
ptev = pte_is_valid_hash32(pte0);
pteh = (pte0 >> 6) & 1;
if (ptev && h ==... | {
"code": [],
"line_no": []
} | static int FUNC_0(mmu_ctx_t *VAR_0, target_ulong VAR_1,
target_ulong VAR_2, int VAR_3, int VAR_4, int VAR_5)
{
target_ulong ptem, mmask;
int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;
VAR_7 = -1;
VAR_9 = pte_is_valid_hash32(VAR_1);
VAR_8 = (VAR_1 >> 6) & 1;
i... | [
"static int FUNC_0(mmu_ctx_t *VAR_0, target_ulong VAR_1,\ntarget_ulong VAR_2, int VAR_3, int VAR_4, int VAR_5)\n{",
"target_ulong ptem, mmask;",
"int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;",
"VAR_7 = -1;",
"VAR_9 = pte_is_valid_hash32(VAR_1);",
"VAR_8 = (VAR_1 >> 6) & 1;",
"if (VAR_9 && VAR_3 == VAR_8) {",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
53
],
[... |
17,135 | static void gen_lea_modrm(DisasContext *s, int modrm, int *reg_ptr, int *offset_ptr)
{
int havesib;
int base, disp;
int index;
int scale;
int opreg;
int mod, rm, code, override, must_add_seg;
/* XXX: add a generation time variable to tell if base == 0 in DS/ES/SS */
override =... | false | qemu | 9c605cb13547a5faa5cb1092e3e44ac8b0d0b841 | static void gen_lea_modrm(DisasContext *s, int modrm, int *reg_ptr, int *offset_ptr)
{
int havesib;
int base, disp;
int index;
int scale;
int opreg;
int mod, rm, code, override, must_add_seg;
override = -1;
must_add_seg = s->addseg;
if (s->prefix & (PREFIX_CS | PREF... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0, int VAR_1, int *VAR_2, int *VAR_3)
{
int VAR_4;
int VAR_5, VAR_6;
int VAR_7;
int VAR_8;
int VAR_9;
int VAR_10, VAR_11, VAR_12, VAR_13, VAR_14;
VAR_13 = -1;
VAR_14 = VAR_0->addseg;
if (VAR_0->prefix & (PREFIX_CS | PREFIX_SS | P... | [
"static void FUNC_0(DisasContext *VAR_0, int VAR_1, int *VAR_2, int *VAR_3)\n{",
"int VAR_4;",
"int VAR_5, VAR_6;",
"int VAR_7;",
"int VAR_8;",
"int VAR_9;",
"int VAR_10, VAR_11, VAR_12, VAR_13, VAR_14;",
"VAR_13 = -1;",
"VAR_14 = VAR_0->addseg;",
"if (VAR_0->prefix & (PREFIX_CS | PREFIX_SS | PREF... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
51
],
[... |
17,136 | static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, int64_t pos)
{
VideoPicture *vp;
#if CONFIG_AVFILTER
AVPicture pict_src;
#else
int dst_pix_fmt = AV_PIX_FMT_YUV420P;
#endif
/* wait until we have space to put a new picture */
SDL_LockMutex(is->pictq_mutex);
if ... | false | FFmpeg | f929ab0569ff31ed5a59b0b0adb7ce09df3fca39 | static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, int64_t pos)
{
VideoPicture *vp;
#if CONFIG_AVFILTER
AVPicture pict_src;
#else
int dst_pix_fmt = AV_PIX_FMT_YUV420P;
#endif
SDL_LockMutex(is->pictq_mutex);
if (is->pictq_size >= VIDEO_PICTURE_QUEUE_SIZE && !is-... | {
"code": [],
"line_no": []
} | static int FUNC_0(VideoState *VAR_0, AVFrame *VAR_1, double VAR_2, int64_t VAR_3)
{
VideoPicture *vp;
#if CONFIG_AVFILTER
AVPicture pict_src;
#else
int VAR_4 = AV_PIX_FMT_YUV420P;
#endif
SDL_LockMutex(VAR_0->pictq_mutex);
if (VAR_0->pictq_size >= VIDEO_PICTURE_QUEUE_SIZE && !VAR_0->... | [
"static int FUNC_0(VideoState *VAR_0, AVFrame *VAR_1, double VAR_2, int64_t VAR_3)\n{",
"VideoPicture *vp;",
"#if CONFIG_AVFILTER\nAVPicture pict_src;",
"#else\nint VAR_4 = AV_PIX_FMT_YUV420P;",
"#endif\nSDL_LockMutex(VAR_0->pictq_mutex);",
"if (VAR_0->pictq_size >= VIDEO_PICTURE_QUEUE_SIZE && !VAR_0->ref... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
23,
25
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
41,
43
],
[
47
],
[
51
],
[
57,
59,
61,
63
],
[
65,
67,... |
17,137 | float64 int64_to_float64( int64 a STATUS_PARAM )
{
flag zSign;
if ( a == 0 ) return 0;
if ( a == (sbits64) LIT64( 0x8000000000000000 ) ) {
return packFloat64( 1, 0x43E, 0 );
}
zSign = ( a < 0 );
return normalizeRoundAndPackFloat64( zSign, 0x43C, zSign ? - a : a STATUS_VAR );
... | false | qemu | f090c9d4ad5812fb92843d6470a1111c15190c4c | float64 int64_to_float64( int64 a STATUS_PARAM )
{
flag zSign;
if ( a == 0 ) return 0;
if ( a == (sbits64) LIT64( 0x8000000000000000 ) ) {
return packFloat64( 1, 0x43E, 0 );
}
zSign = ( a < 0 );
return normalizeRoundAndPackFloat64( zSign, 0x43C, zSign ? - a : a STATUS_VAR );
... | {
"code": [],
"line_no": []
} | float64 FUNC_0( int64 a STATUS_PARAM )
{
flag zSign;
if ( a == 0 ) return 0;
if ( a == (sbits64) LIT64( 0x8000000000000000 ) ) {
return packFloat64( 1, 0x43E, 0 );
}
zSign = ( a < 0 );
return normalizeRoundAndPackFloat64( zSign, 0x43C, zSign ? - a : a STATUS_VAR );
}
| [
"float64 FUNC_0( int64 a STATUS_PARAM )\n{",
"flag zSign;",
"if ( a == 0 ) return 0;",
"if ( a == (sbits64) LIT64( 0x8000000000000000 ) ) {",
"return packFloat64( 1, 0x43E, 0 );",
"}",
"zSign = ( a < 0 );",
"return normalizeRoundAndPackFloat64( zSign, 0x43C, zSign ? - a : a STATUS_VAR );",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
]
] |
17,138 | static void rtas_ibm_change_msi(sPAPREnvironment *spapr,
uint32_t token, uint32_t nargs,
target_ulong args, uint32_t nret,
target_ulong rets)
{
uint32_t config_addr = rtas_ld(args, 0);
uint64_t buid = ((uint64_... | false | qemu | 210b580b106fa798149e28aa13c66b325a43204e | static void rtas_ibm_change_msi(sPAPREnvironment *spapr,
uint32_t token, uint32_t nargs,
target_ulong args, uint32_t nret,
target_ulong rets)
{
uint32_t config_addr = rtas_ld(args, 0);
uint64_t buid = ((uint64_... | {
"code": [],
"line_no": []
} | static void FUNC_0(sPAPREnvironment *VAR_0,
uint32_t VAR_1, uint32_t VAR_2,
target_ulong VAR_3, uint32_t VAR_4,
target_ulong VAR_5)
{
uint32_t config_addr = rtas_ld(VAR_3, 0);
uint64_t buid = ((uint64_t)rtas_ld... | [
"static void FUNC_0(sPAPREnvironment *VAR_0,\nuint32_t VAR_1, uint32_t VAR_2,\ntarget_ulong VAR_3, uint32_t VAR_4,\ntarget_ulong VAR_5)\n{",
"uint32_t config_addr = rtas_ld(VAR_3, 0);",
"uint64_t buid = ((uint64_t)rtas_ld(VAR_3, 1) << 32) | rtas_ld(VAR_3, 2);",
"unsigned int VAR_6 = rtas_ld(VAR_3, 3);",
"un... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33,
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47,
49
],
[... |
17,139 | static void gic_dist_writel(void *opaque, target_phys_addr_t offset,
uint32_t value)
{
GICState *s = (GICState *)opaque;
if (offset == 0xf00) {
int cpu;
int irq;
int mask;
cpu = gic_get_current_cpu(s);
irq = value & 0x3ff;
s... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void gic_dist_writel(void *opaque, target_phys_addr_t offset,
uint32_t value)
{
GICState *s = (GICState *)opaque;
if (offset == 0xf00) {
int cpu;
int irq;
int mask;
cpu = gic_get_current_cpu(s);
irq = value & 0x3ff;
s... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint32_t VAR_2)
{
GICState *s = (GICState *)VAR_0;
if (VAR_1 == 0xf00) {
int VAR_3;
int VAR_4;
int VAR_5;
VAR_3 = gic_get_current_cpu(s);
VAR_4 = VAR_2 & 0x3ff;
switc... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint32_t VAR_2)\n{",
"GICState *s = (GICState *)VAR_0;",
"if (VAR_1 == 0xf00) {",
"int VAR_3;",
"int VAR_4;",
"int VAR_5;",
"VAR_3 = gic_get_current_cpu(s);",
"VAR_4 = VAR_2 & 0x3ff;",
"switch ((VAR_2 >> 24) & 3) {",
"case 0:\nVAR_5 = (VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31,
33
],
[
35
],
[
37,
39
],
[
41
],
[
43,
45
],
[
47
],
[... |
17,142 | void eth_setup_vlan_headers(struct eth_header *ehdr, uint16_t vlan_tag,
bool *is_new)
{
struct vlan_header *vhdr = PKT_GET_VLAN_HDR(ehdr);
switch (be16_to_cpu(ehdr->h_proto)) {
case ETH_P_VLAN:
case ETH_P_DVLAN:
/* vlan hdr exists */
*is_new = false;
break;
... | false | qemu | eb700029c7836798046191d62d595363d92c84d4 | void eth_setup_vlan_headers(struct eth_header *ehdr, uint16_t vlan_tag,
bool *is_new)
{
struct vlan_header *vhdr = PKT_GET_VLAN_HDR(ehdr);
switch (be16_to_cpu(ehdr->h_proto)) {
case ETH_P_VLAN:
case ETH_P_DVLAN:
*is_new = false;
break;
default:
... | {
"code": [],
"line_no": []
} | void FUNC_0(struct eth_header *VAR_0, uint16_t VAR_1,
bool *VAR_2)
{
struct vlan_header *VAR_3 = PKT_GET_VLAN_HDR(VAR_0);
switch (be16_to_cpu(VAR_0->h_proto)) {
case ETH_P_VLAN:
case ETH_P_DVLAN:
*VAR_2 = false;
break;
default:
VAR_3->h_p... | [
"void FUNC_0(struct eth_header *VAR_0, uint16_t VAR_1,\nbool *VAR_2)\n{",
"struct vlan_header *VAR_3 = PKT_GET_VLAN_HDR(VAR_0);",
"switch (be16_to_cpu(VAR_0->h_proto)) {",
"case ETH_P_VLAN:\ncase ETH_P_DVLAN:\n*VAR_2 = false;",
"break;",
"default:\nVAR_3->h_proto = VAR_0->h_proto;",
"VAR_0->h_proto = cp... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13,
15,
19
],
[
21
],
[
25,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
17,143 | static void qemu_laio_completion_cb(void *opaque)
{
struct qemu_laio_state *s = opaque;
while (1) {
struct io_event events[MAX_EVENTS];
uint64_t val;
ssize_t ret;
struct timespec ts = { 0 };
int nevents, i;
do {
ret = read(s->efd, &val, s... | false | qemu | 2be5064953540d5451480375519389f104eb7909 | static void qemu_laio_completion_cb(void *opaque)
{
struct qemu_laio_state *s = opaque;
while (1) {
struct io_event events[MAX_EVENTS];
uint64_t val;
ssize_t ret;
struct timespec ts = { 0 };
int nevents, i;
do {
ret = read(s->efd, &val, s... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
struct qemu_laio_state *VAR_1 = VAR_0;
while (1) {
struct io_event VAR_2[MAX_EVENTS];
uint64_t val;
ssize_t ret;
struct timespec VAR_3 = { 0 };
int VAR_4, VAR_5;
do {
ret = read(VAR_1->efd, &val, sizeof(v... | [
"static void FUNC_0(void *VAR_0)\n{",
"struct qemu_laio_state *VAR_1 = VAR_0;",
"while (1) {",
"struct io_event VAR_2[MAX_EVENTS];",
"uint64_t val;",
"ssize_t ret;",
"struct timespec VAR_3 = { 0 };",
"int VAR_4, VAR_5;",
"do {",
"ret = read(VAR_1->efd, &val, sizeof(val));",
"} while (ret == 1 &&... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
31,
33
],
[
37,
39
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55... |
17,145 | static void virtio_ccw_blk_realize(VirtioCcwDevice *ccw_dev, Error **errp)
{
VirtIOBlkCcw *dev = VIRTIO_BLK_CCW(ccw_dev);
DeviceState *vdev = DEVICE(&dev->vdev);
Error *err = NULL;
qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus));
object_property_set_bool(OBJECT(vdev), true, "realized", &err);
... | false | qemu | 621ff94d5074d88253a5818c6b9c4db718fbfc65 | static void virtio_ccw_blk_realize(VirtioCcwDevice *ccw_dev, Error **errp)
{
VirtIOBlkCcw *dev = VIRTIO_BLK_CCW(ccw_dev);
DeviceState *vdev = DEVICE(&dev->vdev);
Error *err = NULL;
qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus));
object_property_set_bool(OBJECT(vdev), true, "realized", &err);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(VirtioCcwDevice *VAR_0, Error **VAR_1)
{
VirtIOBlkCcw *dev = VIRTIO_BLK_CCW(VAR_0);
DeviceState *vdev = DEVICE(&dev->vdev);
Error *err = NULL;
qdev_set_parent_bus(vdev, BUS(&VAR_0->bus));
object_property_set_bool(OBJECT(vdev), true, "realized", &err);
if (err) {
... | [
"static void FUNC_0(VirtioCcwDevice *VAR_0, Error **VAR_1)\n{",
"VirtIOBlkCcw *dev = VIRTIO_BLK_CCW(VAR_0);",
"DeviceState *vdev = DEVICE(&dev->vdev);",
"Error *err = NULL;",
"qdev_set_parent_bus(vdev, BUS(&VAR_0->bus));",
"object_property_set_bool(OBJECT(vdev), true, \"realized\", &err);",
"if (err) {"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
17,146 | S390PCIBusDevice *s390_pci_find_dev_by_idx(uint32_t idx)
{
S390PCIBusDevice *pbdev;
int i;
int j = 0;
S390pciState *s = S390_PCI_HOST_BRIDGE(
object_resolve_path(TYPE_S390_PCI_HOST_BRIDGE, NULL));
if (!s) {
return NULL;
}
for (i = 0; i < PCI_SLOT_MAX; i++) {
... | false | qemu | e7d336959b7c01699702dcda4b54a822972d74a8 | S390PCIBusDevice *s390_pci_find_dev_by_idx(uint32_t idx)
{
S390PCIBusDevice *pbdev;
int i;
int j = 0;
S390pciState *s = S390_PCI_HOST_BRIDGE(
object_resolve_path(TYPE_S390_PCI_HOST_BRIDGE, NULL));
if (!s) {
return NULL;
}
for (i = 0; i < PCI_SLOT_MAX; i++) {
... | {
"code": [],
"line_no": []
} | S390PCIBusDevice *FUNC_0(uint32_t idx)
{
S390PCIBusDevice *pbdev;
int VAR_0;
int VAR_1 = 0;
S390pciState *s = S390_PCI_HOST_BRIDGE(
object_resolve_path(TYPE_S390_PCI_HOST_BRIDGE, NULL));
if (!s) {
return NULL;
}
for (VAR_0 = 0; VAR_0 < PCI_SLOT_MAX; VAR_0++) {
... | [
"S390PCIBusDevice *FUNC_0(uint32_t idx)\n{",
"S390PCIBusDevice *pbdev;",
"int VAR_0;",
"int VAR_1 = 0;",
"S390pciState *s = S390_PCI_HOST_BRIDGE(\nobject_resolve_path(TYPE_S390_PCI_HOST_BRIDGE, NULL));",
"if (!s) {",
"return NULL;",
"}",
"for (VAR_0 = 0; VAR_0 < PCI_SLOT_MAX; VAR_0++) {",
"pbdev =... | [
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
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[... |
17,147 | hadamard_func(mmxext)
hadamard_func(sse2)
hadamard_func(ssse3)
av_cold void ff_dsputilenc_init_mmx(DSPContext *c, AVCodecContext *avctx)
{
int cpu_flags = av_get_cpu_flags();
#if HAVE_YASM
int bit_depth = avctx->bits_per_raw_sample;
if (EXTERNAL_MMX(cpu_flags)) {
if (bit_depth <= 8)
... | false | FFmpeg | 6369ba3c9cc74becfaad2a8882dff3dd3e7ae3c0 | hadamard_func(mmxext)
hadamard_func(sse2)
hadamard_func(ssse3)
av_cold void ff_dsputilenc_init_mmx(DSPContext *c, AVCodecContext *avctx)
{
int cpu_flags = av_get_cpu_flags();
#if HAVE_YASM
int bit_depth = avctx->bits_per_raw_sample;
if (EXTERNAL_MMX(cpu_flags)) {
if (bit_depth <= 8)
... | {
"code": [],
"line_no": []
} | hadamard_func(mmxext)
hadamard_func(sse2)
hadamard_func(ssse3)
av_cold void ff_dsputilenc_init_mmx(DSPContext *c, AVCodecContext *avctx)
{
int cpu_flags = av_get_cpu_flags();
#if HAVE_YASM
int bit_depth = avctx->bits_per_raw_sample;
if (EXTERNAL_MMX(cpu_flags)) {
if (bit_depth <= 8)
... | [
"hadamard_func(mmxext)\nhadamard_func(sse2)\nhadamard_func(ssse3)\nav_cold void ff_dsputilenc_init_mmx(DSPContext *c, AVCodecContext *avctx)\n{",
"int cpu_flags = av_get_cpu_flags();",
"#if HAVE_YASM\nint bit_depth = avctx->bits_per_raw_sample;",
"if (EXTERNAL_MMX(cpu_flags)) {",
"if (bit_depth <= 8)\nc->ge... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
17,
19
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39,
41,
43
],
[
45,
49,
51
],
[
53
],
[
55,
57
],
[
59
],
[
61... |
17,148 | void aio_set_fd_poll(AioContext *ctx, int fd,
IOHandler *io_poll_begin,
IOHandler *io_poll_end)
{
/* Not implemented */
}
| false | qemu | c2b38b277a7882a592f4f2ec955084b2b756daaa | void aio_set_fd_poll(AioContext *ctx, int fd,
IOHandler *io_poll_begin,
IOHandler *io_poll_end)
{
}
| {
"code": [],
"line_no": []
} | void FUNC_0(AioContext *VAR_0, int VAR_1,
IOHandler *VAR_2,
IOHandler *VAR_3)
{
}
| [
"void FUNC_0(AioContext *VAR_0, int VAR_1,\nIOHandler *VAR_2,\nIOHandler *VAR_3)\n{",
"}"
] | [
0,
0
] | [
[
1,
3,
5,
7
],
[
11
]
] |
17,149 | static void raw_invalidate_cache(BlockDriverState *bs, Error **errp)
{
BDRVRawState *s = bs->opaque;
int ret;
assert(!(bdrv_get_flags(bs) & BDRV_O_INACTIVE));
ret = raw_handle_perm_lock(bs, RAW_PL_PREPARE, s->perm, s->shared_perm,
errp);
if (ret) {
re... | false | qemu | 22d5cd82e98b61b1dbd791fab9f4ae0f77c0ed14 | static void raw_invalidate_cache(BlockDriverState *bs, Error **errp)
{
BDRVRawState *s = bs->opaque;
int ret;
assert(!(bdrv_get_flags(bs) & BDRV_O_INACTIVE));
ret = raw_handle_perm_lock(bs, RAW_PL_PREPARE, s->perm, s->shared_perm,
errp);
if (ret) {
re... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0, Error **VAR_1)
{
BDRVRawState *s = VAR_0->opaque;
int VAR_2;
assert(!(bdrv_get_flags(VAR_0) & BDRV_O_INACTIVE));
VAR_2 = raw_handle_perm_lock(VAR_0, RAW_PL_PREPARE, s->perm, s->shared_perm,
VAR_1);
if (VAR_2) {
... | [
"static void FUNC_0(BlockDriverState *VAR_0, Error **VAR_1)\n{",
"BDRVRawState *s = VAR_0->opaque;",
"int VAR_2;",
"assert(!(bdrv_get_flags(VAR_0) & BDRV_O_INACTIVE));",
"VAR_2 = raw_handle_perm_lock(VAR_0, RAW_PL_PREPARE, s->perm, s->shared_perm,\nVAR_1);",
"if (VAR_2) {",
"return;",
"}",
"raw_hand... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
17,150 | static uint64_t bw_conf1_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
PCIBus *b = opaque;
return pci_data_read(b, addr, size);
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t bw_conf1_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
PCIBus *b = opaque;
return pci_data_read(b, addr, size);
}
| {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,
unsigned size)
{
PCIBus *b = opaque;
return pci_data_read(b, addr, size);
}
| [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,\nunsigned size)\n{",
"PCIBus *b = opaque;",
"return pci_data_read(b, addr, size);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
]
] |
17,151 | int bdrv_open(BlockDriverState *bs, const char *filename, QDict *options,
int flags, BlockDriver *drv)
{
int ret;
/* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */
char tmp_filename[PATH_MAX + 1];
BlockDriverState *file = NULL;
/* NULL means an empty set of... | false | qemu | 4d70655bcb852ea0a006d3923f0b0a9c69ff462e | int bdrv_open(BlockDriverState *bs, const char *filename, QDict *options,
int flags, BlockDriver *drv)
{
int ret;
char tmp_filename[PATH_MAX + 1];
BlockDriverState *file = NULL;
if (options == NULL) {
options = qdict_new();
}
bs->options = options;
... | {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1, QDict *VAR_2,
int VAR_3, BlockDriver *VAR_4)
{
int VAR_5;
char VAR_6[PATH_MAX + 1];
BlockDriverState *file = NULL;
if (VAR_2 == NULL) {
VAR_2 = qdict_new();
}
VAR_0->VAR_2 = VAR_2;
VAR_2 = ... | [
"int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1, QDict *VAR_2,\nint VAR_3, BlockDriver *VAR_4)\n{",
"int VAR_5;",
"char VAR_6[PATH_MAX + 1];",
"BlockDriverState *file = NULL;",
"if (VAR_2 == NULL) {",
"VAR_2 = qdict_new();",
"}",
"VAR_0->VAR_2 = VAR_2;",
"VAR_2 = qdict_clone_shallow(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
],
[
7
],
[
11
],
[
13
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
59
],
[
61
],
[
63
],
... |
17,153 | static uint32_t omap_sysctl_read(void *opaque, target_phys_addr_t addr)
{
struct omap_sysctl_s *s = (struct omap_sysctl_s *) opaque;
switch (addr) {
case 0x000: /* CONTROL_REVISION */
return 0x20;
case 0x010: /* CONTROL_SYSCONFIG */
return s->sysconfig;
case 0x030 ... 0... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint32_t omap_sysctl_read(void *opaque, target_phys_addr_t addr)
{
struct omap_sysctl_s *s = (struct omap_sysctl_s *) opaque;
switch (addr) {
case 0x000:
return 0x20;
case 0x010:
return s->sysconfig;
case 0x030 ... 0x140:
return s->padconf[(addr - 0x3... | {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(void *opaque, target_phys_addr_t addr)
{
struct omap_sysctl_s *VAR_0 = (struct omap_sysctl_s *) opaque;
switch (addr) {
case 0x000:
return 0x20;
case 0x010:
return VAR_0->sysconfig;
case 0x030 ... 0x140:
return VAR_0->padconf[(addr - 0... | [
"static uint32_t FUNC_0(void *opaque, target_phys_addr_t addr)\n{",
"struct omap_sysctl_s *VAR_0 = (struct omap_sysctl_s *) opaque;",
"switch (addr) {",
"case 0x000:\nreturn 0x20;",
"case 0x010:\nreturn VAR_0->sysconfig;",
"case 0x030 ... 0x140:\nreturn VAR_0->padconf[(addr - 0x30) >> 2];",
"case 0x270:... | [
0,
0,
0,
0,
0,
0,
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
],
[
17,
19
],
[
23,
25
],
[
29,
31
],
[
35,
37
],
[
41,
43
],
[
47,
49
],
[
51,
53
],
[
55,
57
],
[
59,
61
],
[
63,
65
],
... |
17,154 | static void gen_dmtc0 (DisasContext *ctx, int reg, int sel)
{
const char *rn = "invalid";
switch (reg) {
case 0:
switch (sel) {
case 0:
gen_op_mtc0_index();
rn = "Index";
break;
case 1:
// gen_op_dmtc0_mvpcontrol(); /* MT ASE *... | false | qemu | b29a0341d7ed7e7df4bf77a41db8e614f1ddb645 | static void gen_dmtc0 (DisasContext *ctx, int reg, int sel)
{
const char *rn = "invalid";
switch (reg) {
case 0:
switch (sel) {
case 0:
gen_op_mtc0_index();
rn = "Index";
break;
case 1:
rn = "MVPControl";
case ... | {
"code": [],
"line_no": []
} | static void FUNC_0 (DisasContext *VAR_0, int VAR_1, int VAR_2)
{
const char *VAR_3 = "invalid";
switch (VAR_1) {
case 0:
switch (VAR_2) {
case 0:
gen_op_mtc0_index();
VAR_3 = "Index";
break;
case 1:
VAR_3 = "MVPControl";
... | [
"static void FUNC_0 (DisasContext *VAR_0, int VAR_1, int VAR_2)\n{",
"const char *VAR_3 = \"invalid\";",
"switch (VAR_1) {",
"case 0:\nswitch (VAR_2) {",
"case 0:\ngen_op_mtc0_index();",
"VAR_3 = \"Index\";",
"break;",
"case 1:\nVAR_3 = \"MVPControl\";",
"case 2:\nVAR_3 = \"MVPConf0\";",
"case 3:\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15,
17
],
[
19
],
[
21
],
[
23,
27
],
[
31,
35
],
[
39,
43
],
[
47,
49
],
[
51
],
[
53
],
[
55,
57
],
[
59,
63
],
[
65... |
17,155 | static void xilinx_spips_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
int mask = ~0;
int man_start_com = 0;
XilinxSPIPS *s = opaque;
DB_PRINT("addr=" TARGET_FMT_plx " = %x\n", addr, (unsigned)value);
addr >>= 2;
switch (addr)... | false | qemu | 2133a5f6b8f8941a6a3734c6c1990656553de76c | static void xilinx_spips_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
int mask = ~0;
int man_start_com = 0;
XilinxSPIPS *s = opaque;
DB_PRINT("addr=" TARGET_FMT_plx " = %x\n", addr, (unsigned)value);
addr >>= 2;
switch (addr)... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
int VAR_4 = ~0;
int VAR_5 = 0;
XilinxSPIPS *s = VAR_0;
DB_PRINT("VAR_1=" TARGET_FMT_plx " = %x\n", VAR_1, (unsigned)VAR_2);
VAR_1 >>= 2;
switch (VAR_1) {
case R_... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"int VAR_4 = ~0;",
"int VAR_5 = 0;",
"XilinxSPIPS *s = VAR_0;",
"DB_PRINT(\"VAR_1=\" TARGET_FMT_plx \" = %x\\n\", VAR_1, (unsigned)VAR_2);",
"VAR_1 >>= 2;",
"switch (VAR_1) {",
"case R_CONFIG:\nVAR_4 = 0x0002FFFF;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
... |
17,156 | int nbd_init(int fd, QIOChannelSocket *ioc, uint32_t flags, off_t size)
{
return -ENOTSUP;
}
| false | qemu | 7423f417827146f956df820f172d0bf80a489495 | int nbd_init(int fd, QIOChannelSocket *ioc, uint32_t flags, off_t size)
{
return -ENOTSUP;
}
| {
"code": [],
"line_no": []
} | int FUNC_0(int VAR_0, QIOChannelSocket *VAR_1, uint32_t VAR_2, off_t VAR_3)
{
return -ENOTSUP;
}
| [
"int FUNC_0(int VAR_0, QIOChannelSocket *VAR_1, uint32_t VAR_2, off_t VAR_3)\n{",
"return -ENOTSUP;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
17,158 | static int dca_find_frame_end(DCAParseContext *pc1, const uint8_t *buf,
int buf_size)
{
int start_found, i;
uint32_t state;
ParseContext *pc = &pc1->pc;
start_found = pc->frame_start_found;
state = pc->state;
i = 0;
if (!start_found) {
... | false | FFmpeg | e80b2b9c81716a5d9f559c04cfe69d76b04e4cd3 | static int dca_find_frame_end(DCAParseContext *pc1, const uint8_t *buf,
int buf_size)
{
int start_found, i;
uint32_t state;
ParseContext *pc = &pc1->pc;
start_found = pc->frame_start_found;
state = pc->state;
i = 0;
if (!start_found) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0(DCAParseContext *VAR_0, const uint8_t *VAR_1,
int VAR_2)
{
int VAR_3, VAR_4;
uint32_t state;
ParseContext *pc = &VAR_0->pc;
VAR_3 = pc->frame_start_found;
state = pc->state;
VAR_4 = 0;
if (!VAR_3) {
for (VAR_4 = 0; V... | [
"static int FUNC_0(DCAParseContext *VAR_0, const uint8_t *VAR_1,\nint VAR_2)\n{",
"int VAR_3, VAR_4;",
"uint32_t state;",
"ParseContext *pc = &VAR_0->pc;",
"VAR_3 = pc->frame_start_found;",
"state = pc->state;",
"VAR_4 = 0;",
"if (!VAR_3) {",
"for (VAR_4 = 0; VAR_4 < VAR_2; VAR_4++) {",
"sta... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
17,159 | static int connect_to_sdog(BDRVSheepdogState *s, Error **errp)
{
int fd;
fd = socket_connect(s->addr, NULL, NULL, errp);
if (s->addr->type == SOCKET_ADDRESS_KIND_INET && fd >= 0) {
int ret = socket_set_nodelay(fd);
if (ret < 0) {
error_report("%s", strerror(errno));
... | false | qemu | dfd100f242370886bb6732f70f1f7cbd8eb9fedc | static int connect_to_sdog(BDRVSheepdogState *s, Error **errp)
{
int fd;
fd = socket_connect(s->addr, NULL, NULL, errp);
if (s->addr->type == SOCKET_ADDRESS_KIND_INET && fd >= 0) {
int ret = socket_set_nodelay(fd);
if (ret < 0) {
error_report("%s", strerror(errno));
... | {
"code": [],
"line_no": []
} | static int FUNC_0(BDRVSheepdogState *VAR_0, Error **VAR_1)
{
int VAR_2;
VAR_2 = socket_connect(VAR_0->addr, NULL, NULL, VAR_1);
if (VAR_0->addr->type == SOCKET_ADDRESS_KIND_INET && VAR_2 >= 0) {
int VAR_3 = socket_set_nodelay(VAR_2);
if (VAR_3 < 0) {
error_report("%VAR... | [
"static int FUNC_0(BDRVSheepdogState *VAR_0, Error **VAR_1)\n{",
"int VAR_2;",
"VAR_2 = socket_connect(VAR_0->addr, NULL, NULL, VAR_1);",
"if (VAR_0->addr->type == SOCKET_ADDRESS_KIND_INET && VAR_2 >= 0) {",
"int VAR_3 = socket_set_nodelay(VAR_2);",
"if (VAR_3 < 0) {",
"error_report(\"%VAR_0\", strerror... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
]
] |
17,160 | static void do_info_block(int argc, const char **argv)
{
bdrv_info();
}
| false | qemu | 9307c4c1d93939db9b04117b654253af5113dc21 | static void do_info_block(int argc, const char **argv)
{
bdrv_info();
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(int VAR_0, const char **VAR_1)
{
bdrv_info();
}
| [
"static void FUNC_0(int VAR_0, const char **VAR_1)\n{",
"bdrv_info();",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
17,161 | static void buffered_flush(QEMUFileBuffered *s)
{
size_t offset = 0;
int error;
error = qemu_file_get_error(s->file);
if (error != 0) {
DPRINTF("flush when error, bailing: %s\n", strerror(-error));
return;
}
DPRINTF("flushing %zu byte(s) of data\n", s->buffer_size);
... | false | qemu | 3d6dff316f20137a87e099c30136358df029c0f6 | static void buffered_flush(QEMUFileBuffered *s)
{
size_t offset = 0;
int error;
error = qemu_file_get_error(s->file);
if (error != 0) {
DPRINTF("flush when error, bailing: %s\n", strerror(-error));
return;
}
DPRINTF("flushing %zu byte(s) of data\n", s->buffer_size);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(QEMUFileBuffered *VAR_0)
{
size_t offset = 0;
int VAR_1;
VAR_1 = qemu_file_get_error(VAR_0->file);
if (VAR_1 != 0) {
DPRINTF("flush when VAR_1, bailing: %VAR_0\n", strerror(-VAR_1));
return;
}
DPRINTF("flushing %zu byte(VAR_0) of data\n", VAR_0->bu... | [
"static void FUNC_0(QEMUFileBuffered *VAR_0)\n{",
"size_t offset = 0;",
"int VAR_1;",
"VAR_1 = qemu_file_get_error(VAR_0->file);",
"if (VAR_1 != 0) {",
"DPRINTF(\"flush when VAR_1, bailing: %VAR_0\\n\", strerror(-VAR_1));",
"return;",
"}",
"DPRINTF(\"flushing %zu byte(VAR_0) of data\\n\", VAR_0->buf... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
... |
17,162 | static int vt82c686b_mc97_initfn(PCIDevice *dev)
{
VT686MC97State *s = DO_UPCAST(VT686MC97State, dev, dev);
uint8_t *pci_conf = s->dev.config;
pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_VIA);
pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_VIA_MC97);
pci_config_set_class(pci_conf, PCI... | false | qemu | 1cf0d2b8352a2df35919030b84dbfc713ee9b9be | static int vt82c686b_mc97_initfn(PCIDevice *dev)
{
VT686MC97State *s = DO_UPCAST(VT686MC97State, dev, dev);
uint8_t *pci_conf = s->dev.config;
pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_VIA);
pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_VIA_MC97);
pci_config_set_class(pci_conf, PCI... | {
"code": [],
"line_no": []
} | static int FUNC_0(PCIDevice *VAR_0)
{
VT686MC97State *s = DO_UPCAST(VT686MC97State, VAR_0, VAR_0);
uint8_t *pci_conf = s->VAR_0.config;
pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_VIA);
pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_VIA_MC97);
pci_config_set_class(pci_conf, PCI_CLASS_... | [
"static int FUNC_0(PCIDevice *VAR_0)\n{",
"VT686MC97State *s = DO_UPCAST(VT686MC97State, VAR_0, VAR_0);",
"uint8_t *pci_conf = s->VAR_0.config;",
"pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_VIA);",
"pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_VIA_MC97);",
"pci_config_set_class(pci_conf, PCI_CLA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
25
],
[
27
],
[
31
],
[
33
]
] |
17,163 | PCIBus *pci_gt64120_init(qemu_irq *pic)
{
GT64120State *s;
PCIDevice *d;
(void)&pci_host_data_writeb; /* avoid warning */
(void)&pci_host_data_writew; /* avoid warning */
(void)&pci_host_data_writel; /* avoid warning */
(void)&pci_host_data_readb; /* avoid warning */
(void)&pci_hos... | false | qemu | 4f5e19e6c570459cd524b29b24374f03860f5149 | PCIBus *pci_gt64120_init(qemu_irq *pic)
{
GT64120State *s;
PCIDevice *d;
(void)&pci_host_data_writeb;
(void)&pci_host_data_writew;
(void)&pci_host_data_writel;
(void)&pci_host_data_readb;
(void)&pci_host_data_readw;
(void)&pci_host_data_readl;
s = qemu_mallocz(siz... | {
"code": [],
"line_no": []
} | PCIBus *FUNC_0(qemu_irq *pic)
{
GT64120State *s;
PCIDevice *d;
(void)&pci_host_data_writeb;
(void)&pci_host_data_writew;
(void)&pci_host_data_writel;
(void)&pci_host_data_readb;
(void)&pci_host_data_readw;
(void)&pci_host_data_readl;
s = qemu_mallocz(sizeof(GT6412... | [
"PCIBus *FUNC_0(qemu_irq *pic)\n{",
"GT64120State *s;",
"PCIDevice *d;",
"(void)&pci_host_data_writeb;",
"(void)&pci_host_data_writew;",
"(void)&pci_host_data_writel;",
"(void)&pci_host_data_readb;",
"(void)&pci_host_data_readw;",
"(void)&pci_host_data_readl;",
"s = qemu_mallocz(sizeof(GT64120Stat... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31,
33,
35
],
[
37
],
[
39,
41
],
[
49
],
[
51
],
[
55
],
[
57
],
... |
17,164 | static void enter_pgmcheck(S390CPU *cpu, uint16_t code)
{
kvm_s390_interrupt(cpu, KVM_S390_PROGRAM_INT, code);
}
| false | qemu | de13d2161473d02ae97ec0f8e4503147554892dd | static void enter_pgmcheck(S390CPU *cpu, uint16_t code)
{
kvm_s390_interrupt(cpu, KVM_S390_PROGRAM_INT, code);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(S390CPU *VAR_0, uint16_t VAR_1)
{
kvm_s390_interrupt(VAR_0, KVM_S390_PROGRAM_INT, VAR_1);
}
| [
"static void FUNC_0(S390CPU *VAR_0, uint16_t VAR_1)\n{",
"kvm_s390_interrupt(VAR_0, KVM_S390_PROGRAM_INT, VAR_1);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
17,165 | static void add_xblock(DWTELEM *dst, uint8_t *src, uint8_t *obmc, int s_x, int s_y, int b_w, int b_h, int mv_x, int mv_y, int w, int h, int dst_stride, int src_stride, int obmc_stride, int mb_type, int add){
uint8_t tmp[src_stride*(b_h+5)]; //FIXME move to context to gurantee alignment
int x,y;
if(s_x<... | false | FFmpeg | 155ec6edf82692bcf3a5f87d2bc697404f4e5aaf | static void add_xblock(DWTELEM *dst, uint8_t *src, uint8_t *obmc, int s_x, int s_y, int b_w, int b_h, int mv_x, int mv_y, int w, int h, int dst_stride, int src_stride, int obmc_stride, int mb_type, int add){
uint8_t tmp[src_stride*(b_h+5)];
int x,y;
if(s_x<0){
obmc -= s_x;
b_w += s_x... | {
"code": [],
"line_no": []
} | static void FUNC_0(DWTELEM *VAR_0, uint8_t *VAR_1, uint8_t *VAR_2, int VAR_3, int VAR_4, int VAR_5, int VAR_6, int VAR_7, int VAR_8, int VAR_9, int VAR_10, int VAR_11, int VAR_12, int VAR_13, int VAR_14, int VAR_15){
uint8_t tmp[VAR_12*(VAR_6+5)];
int VAR_16,VAR_17;
if(VAR_3<0){
VAR_2 -= VAR_... | [
"static void FUNC_0(DWTELEM *VAR_0, uint8_t *VAR_1, uint8_t *VAR_2, int VAR_3, int VAR_4, int VAR_5, int VAR_6, int VAR_7, int VAR_8, int VAR_9, int VAR_10, int VAR_11, int VAR_12, int VAR_13, int VAR_14, int VAR_15){",
"uint8_t tmp[VAR_12*(VAR_6+5)];",
"int VAR_16,VAR_17;",
"if(VAR_3<0){",
"VAR_2 -= VAR_3;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
39
],
[
43
],
[
47
],
... |
17,166 | int av_buffersrc_add_ref(AVFilterContext *buffer_filter,
AVFilterBufferRef *picref, int flags)
{
BufferSourceContext *c = buffer_filter->priv;
AVFilterLink *outlink = buffer_filter->outputs[0];
AVFilterBufferRef *buf;
int ret;
if (!picref) {
c->eof = 1;
... | false | FFmpeg | f94b150a0342fc5a7d0b0f0c82d0d9c3aec3c49f | int av_buffersrc_add_ref(AVFilterContext *buffer_filter,
AVFilterBufferRef *picref, int flags)
{
BufferSourceContext *c = buffer_filter->priv;
AVFilterLink *outlink = buffer_filter->outputs[0];
AVFilterBufferRef *buf;
int ret;
if (!picref) {
c->eof = 1;
... | {
"code": [],
"line_no": []
} | int FUNC_0(AVFilterContext *VAR_0,
AVFilterBufferRef *VAR_1, int VAR_2)
{
BufferSourceContext *c = VAR_0->priv;
AVFilterLink *outlink = VAR_0->outputs[0];
AVFilterBufferRef *buf;
int VAR_3;
if (!VAR_1) {
c->eof = 1;
return 0;
} else if (c->eof... | [
"int FUNC_0(AVFilterContext *VAR_0,\nAVFilterBufferRef *VAR_1, int VAR_2)\n{",
"BufferSourceContext *c = VAR_0->priv;",
"AVFilterLink *outlink = VAR_0->outputs[0];",
"AVFilterBufferRef *buf;",
"int VAR_3;",
"if (!VAR_1) {",
"c->eof = 1;",
"return 0;",
"} else if (c->eof)",
"return AVERROR(EINVAL);... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29,
31,
33,
35
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53,
55,
57,... |
17,167 | int avformat_write_header(AVFormatContext *s, AVDictionary **options)
{
int ret = 0, i;
AVStream *st;
AVDictionary *tmp = NULL;
if (options)
av_dict_copy(&tmp, *options, 0);
if ((ret = av_opt_set_dict(s, &tmp)) < 0)
goto fail;
if (s->priv_data && s->oformat->priv_class... | false | FFmpeg | 75a9479b393a02ffa03436f275ad2b91bd2acd26 | int avformat_write_header(AVFormatContext *s, AVDictionary **options)
{
int ret = 0, i;
AVStream *st;
AVDictionary *tmp = NULL;
if (options)
av_dict_copy(&tmp, *options, 0);
if ((ret = av_opt_set_dict(s, &tmp)) < 0)
goto fail;
if (s->priv_data && s->oformat->priv_class... | {
"code": [],
"line_no": []
} | int FUNC_0(AVFormatContext *VAR_0, AVDictionary **VAR_1)
{
int VAR_2 = 0, VAR_3;
AVStream *st;
AVDictionary *tmp = NULL;
if (VAR_1)
av_dict_copy(&tmp, *VAR_1, 0);
if ((VAR_2 = av_opt_set_dict(VAR_0, &tmp)) < 0)
goto fail;
if (VAR_0->priv_data && VAR_0->oformat->priv_cl... | [
"int FUNC_0(AVFormatContext *VAR_0, AVDictionary **VAR_1)\n{",
"int VAR_2 = 0, VAR_3;",
"AVStream *st;",
"AVDictionary *tmp = NULL;",
"if (VAR_1)\nav_dict_copy(&tmp, *VAR_1, 0);",
"if ((VAR_2 = av_opt_set_dict(VAR_0, &tmp)) < 0)\ngoto fail;",
"if (VAR_0->priv_data && VAR_0->oformat->priv_class && *(cons... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49
],
[
51,
53
],
[
55
],
[... |
17,168 | static int decode_slice_header(H264Context *h){
MpegEncContext * const s = &h->s;
int first_mb_in_slice, pps_id;
int num_ref_idx_active_override_flag;
static const uint8_t slice_type_map[5]= {P_TYPE, B_TYPE, I_TYPE, SP_TYPE, SI_TYPE};
int slice_type;
int default_ref_list_done = 0;
s... | false | FFmpeg | af8aa846fa5b9f2c7dcde451c872426528b8b561 | static int decode_slice_header(H264Context *h){
MpegEncContext * const s = &h->s;
int first_mb_in_slice, pps_id;
int num_ref_idx_active_override_flag;
static const uint8_t slice_type_map[5]= {P_TYPE, B_TYPE, I_TYPE, SP_TYPE, SI_TYPE};
int slice_type;
int default_ref_list_done = 0;
s... | {
"code": [],
"line_no": []
} | static int FUNC_0(H264Context *VAR_0){
MpegEncContext * const s = &VAR_0->s;
int VAR_1, VAR_2;
int VAR_3;
static const uint8_t VAR_4[5]= {P_TYPE, B_TYPE, I_TYPE, SP_TYPE, SI_TYPE};
int VAR_5;
int VAR_6 = 0;
s->current_picture.reference= VAR_0->nal_ref_idc != 0;
s->dropable= VAR... | [
"static int FUNC_0(H264Context *VAR_0){",
"MpegEncContext * const s = &VAR_0->s;",
"int VAR_1, VAR_2;",
"int VAR_3;",
"static const uint8_t VAR_4[5]= {P_TYPE, B_TYPE, I_TYPE, SP_TYPE, SI_TYPE};",
"int VAR_5;",
"int VAR_6 = 0;",
"s->current_picture.reference= VAR_0->nal_ref_idc != 0;",
"s->dropable= ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
17,169 | void ff_put_h264_qpel8_mc12_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride)
{
avc_luma_midh_qrt_8w_msa(src - (2 * stride) - 2, stride, dst, stride, 8, 0);
}
| false | FFmpeg | e549933a270dd2cfc36f2cf9bb6b29acf3dc6d08 | void ff_put_h264_qpel8_mc12_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride)
{
avc_luma_midh_qrt_8w_msa(src - (2 * stride) - 2, stride, dst, stride, 8, 0);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1,
ptrdiff_t VAR_2)
{
avc_luma_midh_qrt_8w_msa(VAR_1 - (2 * VAR_2) - 2, VAR_2, VAR_0, VAR_2, 8, 0);
}
| [
"void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1,\nptrdiff_t VAR_2)\n{",
"avc_luma_midh_qrt_8w_msa(VAR_1 - (2 * VAR_2) - 2, VAR_2, VAR_0, VAR_2, 8, 0);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
]
] |
17,170 | static void become_daemon(const char *pidfile)
{
#ifndef _WIN32
pid_t pid, sid;
pid = fork();
if (pid < 0) {
exit(EXIT_FAILURE);
}
if (pid > 0) {
exit(EXIT_SUCCESS);
}
if (pidfile) {
if (!ga_open_pidfile(pidfile)) {
g_critical("failed to c... | true | qemu | 226a48949cf74006a94b5931e50352b2af801ac7 | static void become_daemon(const char *pidfile)
{
#ifndef _WIN32
pid_t pid, sid;
pid = fork();
if (pid < 0) {
exit(EXIT_FAILURE);
}
if (pid > 0) {
exit(EXIT_SUCCESS);
}
if (pidfile) {
if (!ga_open_pidfile(pidfile)) {
g_critical("failed to c... | {
"code": [
" close(STDIN_FILENO);",
" close(STDOUT_FILENO);",
" close(STDERR_FILENO);"
],
"line_no": [
59,
61,
63
]
} | static void FUNC_0(const char *VAR_0)
{
#ifndef _WIN32
pid_t pid, sid;
pid = fork();
if (pid < 0) {
exit(EXIT_FAILURE);
}
if (pid > 0) {
exit(EXIT_SUCCESS);
}
if (VAR_0) {
if (!ga_open_pidfile(VAR_0)) {
g_critical("failed to create VAR_0")... | [
"static void FUNC_0(const char *VAR_0)\n{",
"#ifndef _WIN32\npid_t pid, sid;",
"pid = fork();",
"if (pid < 0) {",
"exit(EXIT_FAILURE);",
"}",
"if (pid > 0) {",
"exit(EXIT_SUCCESS);",
"}",
"if (VAR_0) {",
"if (!ga_open_pidfile(VAR_0)) {",
"g_critical(\"failed to create VAR_0\");",
"exit(EXIT_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
... |
17,171 | static int msvideo1_decode_frame(AVCodecContext *avctx,
void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
Msvideo1Context *s = avctx->priv_data;
int ret;
s->buf = buf;
s->si... | true | FFmpeg | cabfed6895fcc679cd6a6244a12d800e0f3f2d20 | static int msvideo1_decode_frame(AVCodecContext *avctx,
void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
Msvideo1Context *s = avctx->priv_data;
int ret;
s->buf = buf;
s->si... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->VAR_7;
Msvideo1Context *s = VAR_0->priv_data;
int VAR_6;
s->VAR_4 = VAR_4;
s->VAR_7 = VAR_5... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->VAR_7;",
"Msvideo1Context *s = VAR_0->priv_data;",
"int VAR_6;",
"s->VAR_4 = VAR_4;",
"s->VAR_7 = VAR_5;",
"if ((VAR_6 = ff_reget_buffer(VAR_0, s->fram... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3,
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11,
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21,
22
],
[
23,
... |
17,173 | void rgb16tobgr24(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *end;
uint8_t *d = (uint8_t *)dst;
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
while(s < end)
{
register uint16_t bgr;
bgr = *s++;
*d++ = (bgr&0xF800)>>8;
*d++ = (bgr&0x7E0)>>3;
*d++ = (b... | true | FFmpeg | 6e42e6c4b410dbef8b593c2d796a5dad95f89ee4 | void rgb16tobgr24(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *end;
uint8_t *d = (uint8_t *)dst;
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
while(s < end)
{
register uint16_t bgr;
bgr = *s++;
*d++ = (bgr&0xF800)>>8;
*d++ = (bgr&0x7E0)>>3;
*d++ = (b... | {
"code": [
"\tconst uint16_t *end;",
"\tuint8_t *d = (uint8_t *)dst;",
"\tend = s + src_size/2;",
"\twhile(s < end)",
"\t\tregister uint16_t bgr;",
"\t\tbgr = *s++;",
"\tconst uint16_t *end;",
"\tuint8_t *d = (uint8_t *)dst;",
"\tconst uint16_t *s = (const uint16_t *)src;",
"\... | void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, long VAR_2)
{
const uint16_t *VAR_3;
uint8_t *d = (uint8_t *)VAR_1;
const uint16_t *VAR_4 = (const uint16_t *)VAR_0;
VAR_3 = VAR_4 + VAR_2/2;
while(VAR_4 < VAR_3)
{
register uint16_t VAR_5;
VAR_5 = *VAR_4++;
*d++ = (VAR_5&0xF800)>>8;
*d++ = (VAR... | [
"void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, long VAR_2)\n{",
"const uint16_t *VAR_3;",
"uint8_t *d = (uint8_t *)VAR_1;",
"const uint16_t *VAR_4 = (const uint16_t *)VAR_0;",
"VAR_3 = VAR_4 + VAR_2/2;",
"while(VAR_4 < VAR_3)\n{",
"register uint16_t VAR_5;",
"VAR_5 = *VAR_4++;",
"*d++ = (VAR_5&0... | [
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
17,174 | static void serial_receive_byte(SerialState *s, int ch)
{
s->rbr = ch;
s->lsr |= UART_LSR_DR;
serial_update_irq(s);
}
| true | qemu | 81174dae3f9189519cd60c7b79e91c291b021bbe | static void serial_receive_byte(SerialState *s, int ch)
{
s->rbr = ch;
s->lsr |= UART_LSR_DR;
serial_update_irq(s);
}
| {
"code": [
" serial_update_irq(s);",
"static void serial_receive_byte(SerialState *s, int ch)",
" s->rbr = ch;",
" s->lsr |= UART_LSR_DR;",
" serial_update_irq(s);"
],
"line_no": [
9,
1,
5,
7,
9
]
} | static void FUNC_0(SerialState *VAR_0, int VAR_1)
{
VAR_0->rbr = VAR_1;
VAR_0->lsr |= UART_LSR_DR;
serial_update_irq(VAR_0);
}
| [
"static void FUNC_0(SerialState *VAR_0, int VAR_1)\n{",
"VAR_0->rbr = VAR_1;",
"VAR_0->lsr |= UART_LSR_DR;",
"serial_update_irq(VAR_0);",
"}"
] | [
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
17,175 | ram_addr_t migration_bitmap_find_and_reset_dirty(RAMBlock *rb,
ram_addr_t start)
{
unsigned long base = rb->offset >> TARGET_PAGE_BITS;
unsigned long nr = base + (start >> TARGET_PAGE_BITS);
uint64_t rb_size = rb->used_length;
unsigned long size = b... | true | qemu | 60be6340796e66b5ac8aac2d98dde5c79336a89c | ram_addr_t migration_bitmap_find_and_reset_dirty(RAMBlock *rb,
ram_addr_t start)
{
unsigned long base = rb->offset >> TARGET_PAGE_BITS;
unsigned long nr = base + (start >> TARGET_PAGE_BITS);
uint64_t rb_size = rb->used_length;
unsigned long size = b... | {
"code": [
" bitmap = atomic_rcu_read(&migration_bitmap);",
" bitmap = atomic_rcu_read(&migration_bitmap);"
],
"line_no": [
23,
23
]
} | ram_addr_t FUNC_0(RAMBlock *rb,
ram_addr_t start)
{
unsigned long VAR_0 = rb->offset >> TARGET_PAGE_BITS;
unsigned long VAR_1 = VAR_0 + (start >> TARGET_PAGE_BITS);
uint64_t rb_size = rb->used_length;
unsigned long VAR_2 = VAR_0 + (rb_size >> TARGET... | [
"ram_addr_t FUNC_0(RAMBlock *rb,\nram_addr_t start)\n{",
"unsigned long VAR_0 = rb->offset >> TARGET_PAGE_BITS;",
"unsigned long VAR_1 = VAR_0 + (start >> TARGET_PAGE_BITS);",
"uint64_t rb_size = rb->used_length;",
"unsigned long VAR_2 = VAR_0 + (rb_size >> TARGET_PAGE_BITS);",
"unsigned long *VAR_3;",
... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
]
] |
17,176 | static int svq1_motion_inter_block(DSPContext *dsp, GetBitContext *bitbuf,
uint8_t *current, uint8_t *previous,
int pitch, svq1_pmv *motion, int x, int y)
{
uint8_t *src;
uint8_t *dst;
svq1_pmv mv;
svq1_pmv *pmv[3];
int re... | true | FFmpeg | ecff5acb5a738fcb4f9e206a12070dac4bf259b3 | static int svq1_motion_inter_block(DSPContext *dsp, GetBitContext *bitbuf,
uint8_t *current, uint8_t *previous,
int pitch, svq1_pmv *motion, int x, int y)
{
uint8_t *src;
uint8_t *dst;
svq1_pmv mv;
svq1_pmv *pmv[3];
int re... | {
"code": [
" int pitch, svq1_pmv *motion, int x, int y)",
" if (y + (mv.y >> 1) < 0)",
" mv.y = 0;",
" if (x + (mv.x >> 1) < 0)",
" mv.x = 0;",
" int pitch, svq1_pmv *motion, int x, int y)"
],
"line_no... | static int FUNC_0(DSPContext *VAR_0, GetBitContext *VAR_1,
uint8_t *VAR_2, uint8_t *VAR_3,
int VAR_4, svq1_pmv *VAR_5, int VAR_6, int VAR_7)
{
uint8_t *src;
uint8_t *dst;
svq1_pmv mv;
svq1_pmv *pmv[3];
int VAR_8;
... | [
"static int FUNC_0(DSPContext *VAR_0, GetBitContext *VAR_1,\nuint8_t *VAR_2, uint8_t *VAR_3,\nint VAR_4, svq1_pmv *VAR_5, int VAR_6, int VAR_7)\n{",
"uint8_t *src;",
"uint8_t *dst;",
"svq1_pmv mv;",
"svq1_pmv *pmv[3];",
"int VAR_8;",
"pmv[0] = &VAR_5[0];",
"if (VAR_7 == 0) {",
"pmv[1] =\npmv[2] = pm... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45,
47
],
[
51,
53,
55
],
[
57,... |
17,177 | static inline TCGv gen_ld8u(TCGv addr, int index)
{
TCGv tmp = new_tmp();
tcg_gen_qemu_ld8u(tmp, addr, index);
return tmp;
}
| true | qemu | 7d1b0095bff7157e856d1d0e6c4295641ced2752 | static inline TCGv gen_ld8u(TCGv addr, int index)
{
TCGv tmp = new_tmp();
tcg_gen_qemu_ld8u(tmp, addr, index);
return tmp;
}
| {
"code": [
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" ... | static inline TCGv FUNC_0(TCGv addr, int index)
{
TCGv tmp = new_tmp();
tcg_gen_qemu_ld8u(tmp, addr, index);
return tmp;
}
| [
"static inline TCGv FUNC_0(TCGv addr, int index)\n{",
"TCGv tmp = new_tmp();",
"tcg_gen_qemu_ld8u(tmp, addr, index);",
"return tmp;",
"}"
] | [
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
17,178 | void replay_account_executed_instructions(void)
{
if (replay_mode == REPLAY_MODE_PLAY) {
replay_mutex_lock();
if (replay_state.instructions_count > 0) {
int count = (int)(replay_get_current_step()
- replay_state.current_step);
replay_state.instru... | true | qemu | 982263ce714ffcc4c7c41a7b255bd29e093912fe | void replay_account_executed_instructions(void)
{
if (replay_mode == REPLAY_MODE_PLAY) {
replay_mutex_lock();
if (replay_state.instructions_count > 0) {
int count = (int)(replay_get_current_step()
- replay_state.current_step);
replay_state.instru... | {
"code": [],
"line_no": []
} | void FUNC_0(void)
{
if (replay_mode == REPLAY_MODE_PLAY) {
replay_mutex_lock();
if (replay_state.instructions_count > 0) {
int VAR_0 = (int)(replay_get_current_step()
- replay_state.current_step);
replay_state.instructions_count -= VAR_0;
... | [
"void FUNC_0(void)\n{",
"if (replay_mode == REPLAY_MODE_PLAY) {",
"replay_mutex_lock();",
"if (replay_state.instructions_count > 0) {",
"int VAR_0 = (int)(replay_get_current_step()\n- replay_state.current_step);",
"replay_state.instructions_count -= VAR_0;",
"replay_state.current_step += VAR_0;",
"if ... | [
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
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
]
] |
17,179 | static int decode_tile(J2kDecoderContext *s, J2kTile *tile)
{
int compno, reslevelno, bandno;
int x, y, *src[4];
uint8_t *line;
J2kT1Context t1;
for (compno = 0; compno < s->ncomponents; compno++){
J2kComponent *comp = tile->comp + compno;
J2kCodingStyle *codsty = tile->cod... | true | FFmpeg | ddfa3751c092feaf1e080f66587024689dfe603c | static int decode_tile(J2kDecoderContext *s, J2kTile *tile)
{
int compno, reslevelno, bandno;
int x, y, *src[4];
uint8_t *line;
J2kT1Context t1;
for (compno = 0; compno < s->ncomponents; compno++){
J2kComponent *comp = tile->comp + compno;
J2kCodingStyle *codsty = tile->cod... | {
"code": [
" dst = line + (x * s->ncomponents + compno) * 2;"
],
"line_no": [
205
]
} | static int FUNC_0(J2kDecoderContext *VAR_0, J2kTile *VAR_1)
{
int VAR_2, VAR_3, VAR_4;
int VAR_5, VAR_6, *VAR_7[4];
uint8_t *line;
J2kT1Context t1;
for (VAR_2 = 0; VAR_2 < VAR_0->ncomponents; VAR_2++){
J2kComponent *comp = VAR_1->comp + VAR_2;
J2kCodingStyle *codsty = VAR_1... | [
"static int FUNC_0(J2kDecoderContext *VAR_0, J2kTile *VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4;",
"int VAR_5, VAR_6, *VAR_7[4];",
"uint8_t *line;",
"J2kT1Context t1;",
"for (VAR_2 = 0; VAR_2 < VAR_0->ncomponents; VAR_2++){",
"J2kComponent *comp = VAR_1->comp + VAR_2;",
"J2kCodingStyle *codsty = VAR_1->cod... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
39
],
[
41
],
[
43,
45
],
[
49,
51
],
[
55
... |
17,180 | void boot_sector_test(void)
{
uint8_t signature_low;
uint8_t signature_high;
uint16_t signature;
int i;
/* Wait at most 90 seconds */
#define TEST_DELAY (1 * G_USEC_PER_SEC / 10)
#define TEST_CYCLES MAX((90 * G_USEC_PER_SEC / TEST_DELAY), 1)
/* Poll until code has run and modified m... | true | qemu | 83898cce62ba25a473af6a164388105994481e9c | void boot_sector_test(void)
{
uint8_t signature_low;
uint8_t signature_high;
uint16_t signature;
int i;
#define TEST_DELAY (1 * G_USEC_PER_SEC / 10)
#define TEST_CYCLES MAX((90 * G_USEC_PER_SEC / TEST_DELAY), 1)
for (i = 0; i < TEST_CYCLES; ++i) {
signature_low... | {
"code": [
" signature_low = readb(BOOT_SECTOR_ADDRESS + SIGNATURE_OFFSET);",
" signature_high = readb(BOOT_SECTOR_ADDRESS + SIGNATURE_OFFSET + 1);"
],
"line_no": [
33,
35
]
} | void FUNC_0(void)
{
uint8_t signature_low;
uint8_t signature_high;
uint16_t signature;
int VAR_0;
#define TEST_DELAY (1 * G_USEC_PER_SEC / 10)
#define TEST_CYCLES MAX((90 * G_USEC_PER_SEC / TEST_DELAY), 1)
for (VAR_0 = 0; VAR_0 < TEST_CYCLES; ++VAR_0) {
signatu... | [
"void FUNC_0(void)\n{",
"uint8_t signature_low;",
"uint8_t signature_high;",
"uint16_t signature;",
"int VAR_0;",
"#define TEST_DELAY (1 * G_USEC_PER_SEC / 10)\n#define TEST_CYCLES MAX((90 * G_USEC_PER_SEC / TEST_DELAY), 1)\nfor (VAR_0 = 0; VAR_0 < TEST_CYCLES; ++VAR_0) {",
"signature_low = readb(BOOT_S... | [
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17,
19,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
]
] |
17,181 | int scsi_req_parse_cdb(SCSIDevice *dev, SCSICommand *cmd, uint8_t *buf)
{
int rc;
cmd->lba = -1;
cmd->len = scsi_cdb_length(buf);
switch (dev->type) {
case TYPE_TAPE:
rc = scsi_req_stream_xfer(cmd, dev, buf);
break;
case TYPE_MEDIUM_CHANGER:
rc = scsi_req_me... | true | qemu | c170aad8b057223b1139d72e5ce7acceafab4fa9 | int scsi_req_parse_cdb(SCSIDevice *dev, SCSICommand *cmd, uint8_t *buf)
{
int rc;
cmd->lba = -1;
cmd->len = scsi_cdb_length(buf);
switch (dev->type) {
case TYPE_TAPE:
rc = scsi_req_stream_xfer(cmd, dev, buf);
break;
case TYPE_MEDIUM_CHANGER:
rc = scsi_req_me... | {
"code": [
" cmd->len = scsi_cdb_length(buf);"
],
"line_no": [
11
]
} | int FUNC_0(SCSIDevice *VAR_0, SCSICommand *VAR_1, uint8_t *VAR_2)
{
int VAR_3;
VAR_1->lba = -1;
VAR_1->len = scsi_cdb_length(VAR_2);
switch (VAR_0->type) {
case TYPE_TAPE:
VAR_3 = scsi_req_stream_xfer(VAR_1, VAR_0, VAR_2);
break;
case TYPE_MEDIUM_CHANGER:
VA... | [
"int FUNC_0(SCSIDevice *VAR_0, SCSICommand *VAR_1, uint8_t *VAR_2)\n{",
"int VAR_3;",
"VAR_1->lba = -1;",
"VAR_1->len = scsi_cdb_length(VAR_2);",
"switch (VAR_0->type) {",
"case TYPE_TAPE:\nVAR_3 = scsi_req_stream_xfer(VAR_1, VAR_0, VAR_2);",
"break;",
"case TYPE_MEDIUM_CHANGER:\nVAR_3 = scsi_req_medi... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
39,
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53... |
17,182 | static int graph_config_formats(AVFilterGraph *graph, AVClass *log_ctx)
{
int ret;
/* find supported formats from sub-filters, and merge along links */
if ((ret = query_formats(graph, log_ctx)) < 0)
return ret;
/* Once everything is merged, it's possible that we'll still have
* m... | false | FFmpeg | 125acd215250ead008938266efcacd56743f3a2a | static int graph_config_formats(AVFilterGraph *graph, AVClass *log_ctx)
{
int ret;
if ((ret = query_formats(graph, log_ctx)) < 0)
return ret;
reduce_formats(graph);
swap_sample_fmts(graph);
swap_samplerates(graph);
swap_channel_layouts(graph);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFilterGraph *VAR_0, AVClass *VAR_1)
{
int VAR_2;
if ((VAR_2 = query_formats(VAR_0, VAR_1)) < 0)
return VAR_2;
reduce_formats(VAR_0);
swap_sample_fmts(VAR_0);
swap_samplerates(VAR_0);
swap_channel_layouts(VAR_0);
if ((VAR_2 ... | [
"static int FUNC_0(AVFilterGraph *VAR_0, AVClass *VAR_1)\n{",
"int VAR_2;",
"if ((VAR_2 = query_formats(VAR_0, VAR_1)) < 0)\nreturn VAR_2;",
"reduce_formats(VAR_0);",
"swap_sample_fmts(VAR_0);",
"swap_samplerates(VAR_0);",
"swap_channel_layouts(VAR_0);",
"if ((VAR_2 = pick_formats(VAR_0)) < 0)\nreturn... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
11,
13
],
[
23
],
[
31
],
[
33
],
[
35
],
[
39,
41
],
[
45
],
[
47
]
] |
17,184 | static int pred(float *in, float *tgt, int n)
{
int x, y;
float *p1, *p2;
double f0, f1, f2;
float temp;
if (in[n] == 0)
return 0;
if ((f0 = *in) <= 0)
return 0;
for (x=1 ; ; x++) {
if (n < x)
return 1;
p1 = in + x;
p2... | false | FFmpeg | 69c23e6f33c38ebc03ce7f51fcb963deaff7383b | static int pred(float *in, float *tgt, int n)
{
int x, y;
float *p1, *p2;
double f0, f1, f2;
float temp;
if (in[n] == 0)
return 0;
if ((f0 = *in) <= 0)
return 0;
for (x=1 ; ; x++) {
if (n < x)
return 1;
p1 = in + x;
p2... | {
"code": [],
"line_no": []
} | static int FUNC_0(float *VAR_0, float *VAR_1, int VAR_2)
{
int VAR_3, VAR_4;
float *VAR_5, *VAR_6;
double VAR_7, VAR_8, VAR_9;
float VAR_10;
if (VAR_0[VAR_2] == 0)
return 0;
if ((VAR_7 = *VAR_0) <= 0)
return 0;
for (VAR_3=1 ; ; VAR_3++) {
if (VAR_2 < ... | [
"static int FUNC_0(float *VAR_0, float *VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4;",
"float *VAR_5, *VAR_6;",
"double VAR_7, VAR_8, VAR_9;",
"float VAR_10;",
"if (VAR_0[VAR_2] == 0)\nreturn 0;",
"if ((VAR_7 = *VAR_0) <= 0)\nreturn 0;",
"for (VAR_3=1 ; ; VAR_3++) {",
"if (VAR_2 < VAR_3)\nreturn 1;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
21,
23
],
[
27
],
[
29,
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[... |
17,185 | void watchdog_perform_action(void)
{
switch (watchdog_action) {
case WDT_RESET: /* same as 'system_reset' in monitor */
qapi_event_send_watchdog(WATCHDOG_EXPIRATION_ACTION_RESET, &error_abort);
qemu_system_reset_request();
break;
case WDT_SHUTDOWN: /* sa... | true | qemu | 30e5210a706ca6b52cbefa8b71e40ae614ffd6e5 | void watchdog_perform_action(void)
{
switch (watchdog_action) {
case WDT_RESET:
qapi_event_send_watchdog(WATCHDOG_EXPIRATION_ACTION_RESET, &error_abort);
qemu_system_reset_request();
break;
case WDT_SHUTDOWN:
qapi_event_send_watchdog(WATCHDOG_... | {
"code": [
" vm_stop(RUN_STATE_WATCHDOG);"
],
"line_no": [
39
]
} | void FUNC_0(void)
{
switch (watchdog_action) {
case WDT_RESET:
qapi_event_send_watchdog(WATCHDOG_EXPIRATION_ACTION_RESET, &error_abort);
qemu_system_reset_request();
break;
case WDT_SHUTDOWN:
qapi_event_send_watchdog(WATCHDOG_EXPIRATION_ACTION... | [
"void FUNC_0(void)\n{",
"switch (watchdog_action) {",
"case WDT_RESET:\nqapi_event_send_watchdog(WATCHDOG_EXPIRATION_ACTION_RESET, &error_abort);",
"qemu_system_reset_request();",
"break;",
"case WDT_SHUTDOWN:\nqapi_event_send_watchdog(WATCHDOG_EXPIRATION_ACTION_SHUTDOWN, &error_abort);",
"qemu_system_p... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
],
[
17,
19
],
[
21
],
[
23
],
[
27,
29
],
[
31
],
[
35,
37
],
[
39
],
[
41
],
[
45,
47
],
[
49
],
[
51
],
[
55,
57
... |
17,186 | static void *spapr_create_fdt_skel(hwaddr initrd_base,
hwaddr initrd_size,
hwaddr kernel_size,
bool little_endian,
const char *kernel_cmdline,
... | true | qemu | 0ddbd0536296f5a36c8f225edd4d14441be6b153 | static void *spapr_create_fdt_skel(hwaddr initrd_base,
hwaddr initrd_size,
hwaddr kernel_size,
bool little_endian,
const char *kernel_cmdline,
... | {
"code": [
" kvmppc_get_hypercall(first_cpu->env_ptr, hypercall,",
" sizeof(hypercall));",
" _FDT((fdt_property(fdt, \"hcall-instructions\", hypercall,",
" sizeof(hypercall))));"
],
"line_no": [
373,
375,
... | static void *FUNC_0(hwaddr VAR_0,
hwaddr VAR_1,
hwaddr VAR_2,
bool VAR_3,
const char *VAR_4,
uint32_t VAR_5)
{
void *VAR_6;
uint3... | [
"static void *FUNC_0(hwaddr VAR_0,\nhwaddr VAR_1,\nhwaddr VAR_2,\nbool VAR_3,\nconst char *VAR_4,\nuint32_t VAR_5)\n{",
"void *VAR_6;",
"uint32_t start_prop = cpu_to_be32(VAR_0);",
"uint32_t end_prop = cpu_to_be32(VAR_0 + VAR_1);",
"GString *hypertas = g_string_sized_new(256);",
"GString *qemu_hypertas = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
17,187 | static inline struct rgbvec interp_trilinear(const LUT3DContext *lut3d,
const struct rgbvec *s)
{
const struct rgbvec d = {s->r - PREV(s->r), s->g - PREV(s->g), s->b - PREV(s->b)};
const struct rgbvec c000 = lut3d->lut[PREV(s->r)][PREV(s->g)][PREV(s->b)];
co... | true | FFmpeg | b6ee25e300420a3c98b78a1c2e983250ff065038 | static inline struct rgbvec interp_trilinear(const LUT3DContext *lut3d,
const struct rgbvec *s)
{
const struct rgbvec d = {s->r - PREV(s->r), s->g - PREV(s->g), s->b - PREV(s->b)};
const struct rgbvec c000 = lut3d->lut[PREV(s->r)][PREV(s->g)][PREV(s->b)];
co... | {
"code": [
" const struct rgbvec d = {s->r - PREV(s->r), s->g - PREV(s->g), s->b - PREV(s->b)};",
" const struct rgbvec c000 = lut3d->lut[PREV(s->r)][PREV(s->g)][PREV(s->b)];",
" const struct rgbvec c001 = lut3d->lut[PREV(s->r)][PREV(s->g)][NEXT(s->b)];",
" const struct rgbvec c010 = lut3... | static inline struct rgbvec FUNC_0(const LUT3DContext *VAR_0,
const struct rgbvec *VAR_1)
{
const struct rgbvec VAR_2 = {VAR_1->r - PREV(VAR_1->r), VAR_1->g - PREV(VAR_1->g), VAR_1->b - PREV(VAR_1->b)};
const struct rgbvec VAR_3 = VAR_0->lut[PREV(VAR_1->r)][PREV(... | [
"static inline struct rgbvec FUNC_0(const LUT3DContext *VAR_0,\nconst struct rgbvec *VAR_1)\n{",
"const struct rgbvec VAR_2 = {VAR_1->r - PREV(VAR_1->r), VAR_1->g - PREV(VAR_1->g), VAR_1->b - PREV(VAR_1->b)};",
"const struct rgbvec VAR_3 = VAR_0->lut[PREV(VAR_1->r)][PREV(VAR_1->g)][PREV(VAR_1->b)];",
"const s... | [
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
]
] |
17,188 | static void mux_chr_accept_input(CharDriverState *chr)
{
int m = chr->focus;
MuxDriver *d = chr->opaque;
while (d->prod != d->cons &&
d->chr_can_read[m] &&
d->chr_can_read[m](d->ext_opaque[m])) {
d->chr_read[m](d->ext_opaque[m],
&d->buffer[d->co... | true | qemu | a80bf99fa3dd829ecea88b9bfb4f7cf146208f07 | static void mux_chr_accept_input(CharDriverState *chr)
{
int m = chr->focus;
MuxDriver *d = chr->opaque;
while (d->prod != d->cons &&
d->chr_can_read[m] &&
d->chr_can_read[m](d->ext_opaque[m])) {
d->chr_read[m](d->ext_opaque[m],
&d->buffer[d->co... | {
"code": [
" while (d->prod != d->cons &&",
" &d->buffer[d->cons++ & MUX_BUFFER_MASK], 1);"
],
"line_no": [
11,
19
]
} | static void FUNC_0(CharDriverState *VAR_0)
{
int VAR_1 = VAR_0->focus;
MuxDriver *d = VAR_0->opaque;
while (d->prod != d->cons &&
d->chr_can_read[VAR_1] &&
d->chr_can_read[VAR_1](d->ext_opaque[VAR_1])) {
d->chr_read[VAR_1](d->ext_opaque[VAR_1],
... | [
"static void FUNC_0(CharDriverState *VAR_0)\n{",
"int VAR_1 = VAR_0->focus;",
"MuxDriver *d = VAR_0->opaque;",
"while (d->prod != d->cons &&\nd->chr_can_read[VAR_1] &&\nd->chr_can_read[VAR_1](d->ext_opaque[VAR_1])) {",
"d->chr_read[VAR_1](d->ext_opaque[VAR_1],\n&d->buffer[d->cons++ & MUX_BUFFER_MASK], 1);",... | [
0,
0,
0,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13,
15
],
[
17,
19
],
[
21
],
[
23
]
] |
17,189 | static int ogg_read_close(AVFormatContext *s)
{
struct ogg *ogg = s->priv_data;
int i;
for (i = 0; i < ogg->nstreams; i++) {
av_free(ogg->streams[i].buf);
av_free(ogg->streams[i].private);
}
av_free(ogg->streams);
return 0;
}
| true | FFmpeg | 89b51b570daa80e6e3790fcd449fe61fc5574e07 | static int ogg_read_close(AVFormatContext *s)
{
struct ogg *ogg = s->priv_data;
int i;
for (i = 0; i < ogg->nstreams; i++) {
av_free(ogg->streams[i].buf);
av_free(ogg->streams[i].private);
}
av_free(ogg->streams);
return 0;
}
| {
"code": [
"static int ogg_read_close(AVFormatContext *s)",
" struct ogg *ogg = s->priv_data;",
" int i;",
" for (i = 0; i < ogg->nstreams; i++) {",
" av_free(ogg->streams[i].buf);",
" av_free(ogg->streams[i].private);",
" av_free(ogg->streams);",
" return... | static int FUNC_0(AVFormatContext *VAR_0)
{
struct VAR_1 *VAR_1 = VAR_0->priv_data;
int VAR_2;
for (VAR_2 = 0; VAR_2 < VAR_1->nstreams; VAR_2++) {
av_free(VAR_1->streams[VAR_2].buf);
av_free(VAR_1->streams[VAR_2].private);
}
av_free(VAR_1->streams);
return 0;
}
| [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"struct VAR_1 *VAR_1 = VAR_0->priv_data;",
"int VAR_2;",
"for (VAR_2 = 0; VAR_2 < VAR_1->nstreams; VAR_2++) {",
"av_free(VAR_1->streams[VAR_2].buf);",
"av_free(VAR_1->streams[VAR_2].private);",
"}",
"av_free(VAR_1->streams);",
"return 0;",
"}"
] | [
1,
1,
1,
1,
1,
1,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
17,190 | static int theora_decode_tables(AVCodecContext *avctx, GetBitContext *gb)
{
Vp3DecodeContext *s = avctx->priv_data;
int i, n, matrices, inter, plane;
if (s->theora >= 0x030200) {
n = get_bits(gb, 3);
/* loop filter limit values table */
if (n) {
for (i = 0; i < 64; ... | true | FFmpeg | 1a48a57071df7756a92dee147acb2123cb92a799 | static int theora_decode_tables(AVCodecContext *avctx, GetBitContext *gb)
{
Vp3DecodeContext *s = avctx->priv_data;
int i, n, matrices, inter, plane;
if (s->theora >= 0x030200) {
n = get_bits(gb, 3);
if (n) {
for (i = 0; i < 64; i++) {
s->filter_limit_... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, GetBitContext *VAR_1)
{
Vp3DecodeContext *s = VAR_0->priv_data;
int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;
if (s->theora >= 0x030200) {
VAR_3 = get_bits(VAR_1, 3);
if (VAR_3) {
for (VAR_2 = 0; VAR_2 < 64; VAR_2++) {
... | [
"static int FUNC_0(AVCodecContext *VAR_0, GetBitContext *VAR_1)\n{",
"Vp3DecodeContext *s = VAR_0->priv_data;",
"int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;",
"if (s->theora >= 0x030200) {",
"VAR_3 = get_bits(VAR_1, 3);",
"if (VAR_3) {",
"for (VAR_2 = 0; VAR_2 < 64; VAR_2++) {",
"s->filter_limit_values[VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
35,
37
],
[
39,
41
],
[
45
],
[
47
],
[
51,
53
],
[
55,
57
],
[
61... |
17,192 | int64_t qcow2_alloc_bytes(BlockDriverState *bs, int size)
{
BDRVQcowState *s = bs->opaque;
int64_t offset;
size_t free_in_cluster;
int ret;
BLKDBG_EVENT(bs->file, BLKDBG_CLUSTER_ALLOC_BYTES);
assert(size > 0 && size <= s->cluster_size);
assert(!s->free_byte_offset || offset_into_cl... | true | qemu | 3e5feb6202149e8a963a33b911216e40d790f1d7 | int64_t qcow2_alloc_bytes(BlockDriverState *bs, int size)
{
BDRVQcowState *s = bs->opaque;
int64_t offset;
size_t free_in_cluster;
int ret;
BLKDBG_EVENT(bs->file, BLKDBG_CLUSTER_ALLOC_BYTES);
assert(size > 0 && size <= s->cluster_size);
assert(!s->free_byte_offset || offset_into_cl... | {
"code": [
" if (!offset || free_in_cluster < size) {",
" int64_t new_cluster = alloc_clusters_noref(bs, s->cluster_size);",
" if (new_cluster < 0) {",
" return new_cluster;",
" if (!offset || ROUND_UP(offset, s->cluster_size) != new_cluster) {",
" ... | int64_t FUNC_0(BlockDriverState *bs, int size)
{
BDRVQcowState *s = bs->opaque;
int64_t offset;
size_t free_in_cluster;
int VAR_0;
BLKDBG_EVENT(bs->file, BLKDBG_CLUSTER_ALLOC_BYTES);
assert(size > 0 && size <= s->cluster_size);
assert(!s->free_byte_offset || offset_into_cluster(s, ... | [
"int64_t FUNC_0(BlockDriverState *bs, int size)\n{",
"BDRVQcowState *s = bs->opaque;",
"int64_t offset;",
"size_t free_in_cluster;",
"int VAR_0;",
"BLKDBG_EVENT(bs->file, BLKDBG_CLUSTER_ALLOC_BYTES);",
"assert(size > 0 && size <= s->cluster_size);",
"assert(!s->free_byte_offset || offset_into_cluster(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
1,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
... |
17,194 | void aio_co_schedule(AioContext *ctx, Coroutine *co)
{
trace_aio_co_schedule(ctx, co);
QSLIST_INSERT_HEAD_ATOMIC(&ctx->scheduled_coroutines,
co, co_scheduled_next);
qemu_bh_schedule(ctx->co_schedule_bh); | true | qemu | 6133b39f3c36623425a6ede9e89d93175fde15cd | void aio_co_schedule(AioContext *ctx, Coroutine *co)
{
trace_aio_co_schedule(ctx, co);
QSLIST_INSERT_HEAD_ATOMIC(&ctx->scheduled_coroutines,
co, co_scheduled_next);
qemu_bh_schedule(ctx->co_schedule_bh); | {
"code": [],
"line_no": []
} | void FUNC_0(AioContext *VAR_0, Coroutine *VAR_1)
{
trace_aio_co_schedule(VAR_0, VAR_1);
QSLIST_INSERT_HEAD_ATOMIC(&VAR_0->scheduled_coroutines,
VAR_1, co_scheduled_next);
qemu_bh_schedule(VAR_0->co_schedule_bh); | [
"void FUNC_0(AioContext *VAR_0, Coroutine *VAR_1)\n{",
"trace_aio_co_schedule(VAR_0, VAR_1);",
"QSLIST_INSERT_HEAD_ATOMIC(&VAR_0->scheduled_coroutines,\nVAR_1, co_scheduled_next);",
"qemu_bh_schedule(VAR_0->co_schedule_bh);"
] | [
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4,
5
],
[
6
]
] |
17,196 | static void xtensa_sim_init(MachineState *machine)
{
XtensaCPU *cpu = NULL;
CPUXtensaState *env = NULL;
ram_addr_t ram_size = machine->ram_size;
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
int n;
if (!cpu_model) {
cpu... | true | qemu | 4482e05cbbb7e50e476f6a9500cf0b38913bd939 | static void xtensa_sim_init(MachineState *machine)
{
XtensaCPU *cpu = NULL;
CPUXtensaState *env = NULL;
ram_addr_t ram_size = machine->ram_size;
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
int n;
if (!cpu_model) {
cpu... | {
"code": [
" if (cpu == NULL) {",
" if (cpu == NULL) {",
" if (cpu == NULL) {",
" if (cpu == NULL) {",
" if (cpu == NULL) {",
" if (cpu == NULL) {",
" if (cpu == NULL) {",
" if (cpu == NULL) {",
" error_report(\"un... | static void FUNC_0(MachineState *VAR_0)
{
XtensaCPU *cpu = NULL;
CPUXtensaState *env = NULL;
ram_addr_t ram_size = VAR_0->ram_size;
const char *VAR_1 = VAR_0->VAR_1;
const char *VAR_2 = VAR_0->VAR_2;
int VAR_3;
if (!VAR_1) {
VAR_1 = XTENSA_DEFAULT_CPU_MODEL;
}
... | [
"static void FUNC_0(MachineState *VAR_0)\n{",
"XtensaCPU *cpu = NULL;",
"CPUXtensaState *env = NULL;",
"ram_addr_t ram_size = VAR_0->ram_size;",
"const char *VAR_1 = VAR_0->VAR_1;",
"const char *VAR_2 = VAR_0->VAR_2;",
"int VAR_3;",
"if (!VAR_1) {",
"VAR_1 = XTENSA_DEFAULT_CPU_MODEL;",
"}",
"for... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[... |
17,197 | void cpu_physical_memory_write_rom(target_phys_addr_t addr,
const uint8_t *buf, int len)
{
int l;
uint8_t *ptr;
target_phys_addr_t page;
MemoryRegionSection *section;
while (len > 0) {
page = addr & TARGET_PAGE_MASK;
l = (page + TARGET_PA... | true | qemu | 0b57e287138728f72d88b06e69b970c5d745c44a | void cpu_physical_memory_write_rom(target_phys_addr_t addr,
const uint8_t *buf, int len)
{
int l;
uint8_t *ptr;
target_phys_addr_t page;
MemoryRegionSection *section;
while (len > 0) {
page = addr & TARGET_PAGE_MASK;
l = (page + TARGET_PA... | {
"code": [],
"line_no": []
} | void FUNC_0(target_phys_addr_t VAR_0,
const uint8_t *VAR_1, int VAR_2)
{
int VAR_3;
uint8_t *ptr;
target_phys_addr_t page;
MemoryRegionSection *section;
while (VAR_2 > 0) {
page = VAR_0 & TARGET_PAGE_MASK;
VAR_3 = (page + TARGET_PAGE_SIZE... | [
"void FUNC_0(target_phys_addr_t VAR_0,\nconst uint8_t *VAR_1, int VAR_2)\n{",
"int VAR_3;",
"uint8_t *ptr;",
"target_phys_addr_t page;",
"MemoryRegionSection *section;",
"while (VAR_2 > 0) {",
"page = VAR_0 & TARGET_PAGE_MASK;",
"VAR_3 = (page + TARGET_PAGE_SIZE) - VAR_0;",
"if (VAR_3 > VAR_2)\nVAR_... | [
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
],
[
31,
33
],
[
37
],
[
39
],
[
41,
43
],
[
47
],
[
49
],
[
58
],
[
61
... |
17,198 | av_cold void ff_blockdsp_init(BlockDSPContext *c, AVCodecContext *avctx)
{
c->clear_block = clear_block_8_c;
c->clear_blocks = clear_blocks_8_c;
c->fill_block_tab[0] = fill_block16_c;
c->fill_block_tab[1] = fill_block8_c;
if (ARCH_ARM)
ff_blockdsp_init_arm(c);
if (ARCH_PPC)
... | false | FFmpeg | dcc39ee10e82833ce24aa57926c00ffeb1948198 | av_cold void ff_blockdsp_init(BlockDSPContext *c, AVCodecContext *avctx)
{
c->clear_block = clear_block_8_c;
c->clear_blocks = clear_blocks_8_c;
c->fill_block_tab[0] = fill_block16_c;
c->fill_block_tab[1] = fill_block8_c;
if (ARCH_ARM)
ff_blockdsp_init_arm(c);
if (ARCH_PPC)
... | {
"code": [],
"line_no": []
} | av_cold void FUNC_0(BlockDSPContext *c, AVCodecContext *avctx)
{
c->clear_block = clear_block_8_c;
c->clear_blocks = clear_blocks_8_c;
c->fill_block_tab[0] = fill_block16_c;
c->fill_block_tab[1] = fill_block8_c;
if (ARCH_ARM)
ff_blockdsp_init_arm(c);
if (ARCH_PPC)
f... | [
"av_cold void FUNC_0(BlockDSPContext *c, AVCodecContext *avctx)\n{",
"c->clear_block = clear_block_8_c;",
"c->clear_blocks = clear_blocks_8_c;",
"c->fill_block_tab[0] = fill_block16_c;",
"c->fill_block_tab[1] = fill_block8_c;",
"if (ARCH_ARM)\nff_blockdsp_init_arm(c);",
"if (ARCH_PPC)\nff_blockdsp_init... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17,
19
],
[
21,
23
],
[
25,
27,
29
],
[
31,
33
],
[
35,
37
]
] |
17,200 | static void estimate_timings_from_bit_rate(AVFormatContext *ic)
{
int64_t filesize, duration;
int i;
AVStream *st;
/* if bit_rate is already set, we believe it */
if (ic->bit_rate <= 0) {
int bit_rate = 0;
for(i=0;i<ic->nb_streams;i++) {
st = ic->streams[i];
... | true | FFmpeg | 26f027fba1c5ab482fa2488fbe0fa36c8bb33b69 | static void estimate_timings_from_bit_rate(AVFormatContext *ic)
{
int64_t filesize, duration;
int i;
AVStream *st;
if (ic->bit_rate <= 0) {
int bit_rate = 0;
for(i=0;i<ic->nb_streams;i++) {
st = ic->streams[i];
if (st->codec->bit_rate > 0) {
... | {
"code": [
" if (INT_MAX - st->codec->bit_rate > bit_rate) {"
],
"line_no": [
25
]
} | static void FUNC_0(AVFormatContext *VAR_0)
{
int64_t filesize, duration;
int VAR_1;
AVStream *st;
if (VAR_0->VAR_2 <= 0) {
int VAR_2 = 0;
for(VAR_1=0;VAR_1<VAR_0->nb_streams;VAR_1++) {
st = VAR_0->streams[VAR_1];
if (st->codec->VAR_2 > 0) {
... | [
"static void FUNC_0(AVFormatContext *VAR_0)\n{",
"int64_t filesize, duration;",
"int VAR_1;",
"AVStream *st;",
"if (VAR_0->VAR_2 <= 0) {",
"int VAR_2 = 0;",
"for(VAR_1=0;VAR_1<VAR_0->nb_streams;VAR_1++) {",
"st = VAR_0->streams[VAR_1];",
"if (st->codec->VAR_2 > 0) {",
"if (INT_MAX - st->codec->VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
47,
49
],
[... |
17,201 | AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask)
{
AVFilterBufferRef *ret = av_malloc(sizeof(AVFilterBufferRef));
if (!ret)
return NULL;
*ret = *ref;
if (ref->type == AVMEDIA_TYPE_VIDEO) {
ret->video = av_malloc(sizeof(AVFilterBufferRefVideoProps));
if (!... | true | FFmpeg | 6fb2fd895e858ab93f46e656a322778ee181c307 | AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask)
{
AVFilterBufferRef *ret = av_malloc(sizeof(AVFilterBufferRef));
if (!ret)
return NULL;
*ret = *ref;
if (ref->type == AVMEDIA_TYPE_VIDEO) {
ret->video = av_malloc(sizeof(AVFilterBufferRefVideoProps));
if (!... | {
"code": [],
"line_no": []
} | AVFilterBufferRef *FUNC_0(AVFilterBufferRef *ref, int pmask)
{
AVFilterBufferRef *ret = av_malloc(sizeof(AVFilterBufferRef));
if (!ret)
return NULL;
*ret = *ref;
if (ref->type == AVMEDIA_TYPE_VIDEO) {
ret->video = av_malloc(sizeof(AVFilterBufferRefVideoProps));
if (!ret->video) {... | [
"AVFilterBufferRef *FUNC_0(AVFilterBufferRef *ref, int pmask)\n{",
"AVFilterBufferRef *ret = av_malloc(sizeof(AVFilterBufferRef));",
"if (!ret)\nreturn NULL;",
"*ret = *ref;",
"if (ref->type == AVMEDIA_TYPE_VIDEO) {",
"ret->video = av_malloc(sizeof(AVFilterBufferRefVideoProps));",
"if (!ret->video) {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
... |
17,202 | static int parse_playlist(AppleHTTPContext *c, const char *url,
struct variant *var, AVIOContext *in)
{
int ret = 0, duration = 0, is_segment = 0, is_variant = 0, bandwidth = 0;
enum KeyType key_type = KEY_NONE;
uint8_t iv[16] = "";
int has_iv = 0;
char key[MAX_URL_S... | true | FFmpeg | c41b9842ceac42bedfd74a7ba2d02add82f818a9 | static int parse_playlist(AppleHTTPContext *c, const char *url,
struct variant *var, AVIOContext *in)
{
int ret = 0, duration = 0, is_segment = 0, is_variant = 0, bandwidth = 0;
enum KeyType key_type = KEY_NONE;
uint8_t iv[16] = "";
int has_iv = 0;
char key[MAX_URL_S... | {
"code": [
" char key[MAX_URL_SIZE];"
],
"line_no": [
15
]
} | static int FUNC_0(AppleHTTPContext *VAR_0, const char *VAR_1,
struct variant *VAR_2, AVIOContext *VAR_3)
{
int VAR_4 = 0, VAR_5 = 0, VAR_6 = 0, VAR_7 = 0, VAR_8 = 0;
enum KeyType VAR_9 = KEY_NONE;
uint8_t iv[16] = "";
int VAR_10 = 0;
char VAR_11[MAX_URL_SIZE];
c... | [
"static int FUNC_0(AppleHTTPContext *VAR_0, const char *VAR_1,\nstruct variant *VAR_2, AVIOContext *VAR_3)\n{",
"int VAR_4 = 0, VAR_5 = 0, VAR_6 = 0, VAR_7 = 0, VAR_8 = 0;",
"enum KeyType VAR_9 = KEY_NONE;",
"uint8_t iv[16] = \"\";",
"int VAR_10 = 0;",
"char VAR_11[MAX_URL_SIZE];",
"char VAR_12[1024];",... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29,
31,
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
17,204 | static int integrate(hdcd_state_t *state, int *flag, const int32_t *samples, int count, int stride)
{
uint32_t bits = 0;
int result = FFMIN(state->readahead, count);
int i;
*flag = 0;
for (i = result - 1; i >= 0; i--) {
bits |= (*samples & 1) << i; /* might be better as a conditiona... | false | FFmpeg | 5836a5037ecbbd9b10ac85cdec5ff8cccb1177d0 | static int integrate(hdcd_state_t *state, int *flag, const int32_t *samples, int count, int stride)
{
uint32_t bits = 0;
int result = FFMIN(state->readahead, count);
int i;
*flag = 0;
for (i = result - 1; i >= 0; i--) {
bits |= (*samples & 1) << i;
samples += stride;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(hdcd_state_t *VAR_0, int *VAR_1, const int32_t *VAR_2, int VAR_3, int VAR_4)
{
uint32_t bits = 0;
int VAR_5 = FFMIN(VAR_0->readahead, VAR_3);
int VAR_6;
*VAR_1 = 0;
for (VAR_6 = VAR_5 - 1; VAR_6 >= 0; VAR_6--) {
bits |= (*VAR_2 & 1) << VAR_6;
VAR_2 += VAR... | [
"static int FUNC_0(hdcd_state_t *VAR_0, int *VAR_1, const int32_t *VAR_2, int VAR_3, int VAR_4)\n{",
"uint32_t bits = 0;",
"int VAR_5 = FFMIN(VAR_0->readahead, VAR_3);",
"int VAR_6;",
"*VAR_1 = 0;",
"for (VAR_6 = VAR_5 - 1; VAR_6 >= 0; VAR_6--) {",
"bits |= (*VAR_2 & 1) << VAR_6;",
"VAR_2 += VAR_4;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29,
31
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.