id int32 0 27.3k | func stringlengths 26 142k | target bool 2
classes | project stringclasses 2
values | commit_id stringlengths 40 40 | func_clean stringlengths 26 131k | vul_lines dict | normalized_func stringlengths 24 132k | lines listlengths 1 2.8k | label listlengths 1 2.8k | line_no listlengths 1 2.8k |
|---|---|---|---|---|---|---|---|---|---|---|
7,082 | static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, TranslationBlock *itb)
{
CPUArchState *env = cpu->env_ptr;
uintptr_t ret;
TranslationBlock *last_tb;
int tb_exit;
uint8_t *tb_ptr = itb->tc_ptr;
qemu_log_mask_and_addr(CPU_LOG_EXEC, itb->pc,
"Trace %p ... | false | qemu | be2208e2a50f4b50980d92c26f2e12cb2bda4afc | static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, TranslationBlock *itb)
{
CPUArchState *env = cpu->env_ptr;
uintptr_t ret;
TranslationBlock *last_tb;
int tb_exit;
uint8_t *tb_ptr = itb->tc_ptr;
qemu_log_mask_and_addr(CPU_LOG_EXEC, itb->pc,
"Trace %p ... | {
"code": [],
"line_no": []
} | static inline tcg_target_ulong FUNC_0(CPUState *cpu, TranslationBlock *itb)
{
CPUArchState *env = cpu->env_ptr;
uintptr_t ret;
TranslationBlock *last_tb;
int VAR_0;
uint8_t *tb_ptr = itb->tc_ptr;
qemu_log_mask_and_addr(CPU_LOG_EXEC, itb->pc,
"Trace %p [" TARG... | [
"static inline tcg_target_ulong FUNC_0(CPUState *cpu, TranslationBlock *itb)\n{",
"CPUArchState *env = cpu->env_ptr;",
"uintptr_t ret;",
"TranslationBlock *last_tb;",
"int VAR_0;",
"uint8_t *tb_ptr = itb->tc_ptr;",
"qemu_log_mask_and_addr(CPU_LOG_EXEC, itb->pc,\n\"Trace %p [\" TARGET_FMT_lx \"] %s\\n\",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25,
27
],
[
29,
31
],
[
33,
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
49,
51
],
[
53,
57
... |
7,084 | static int get_para_features(CPUState *env)
{
int i, features = 0;
for (i = 0; i < ARRAY_SIZE(para_features) - 1; i++) {
if (kvm_check_extension(env->kvm_state, para_features[i].cap))
features |= (1 << para_features[i].feature);
}
return... | false | qemu | b9bec74bcb16519a876ec21cd5277c526a9b512d | static int get_para_features(CPUState *env)
{
int i, features = 0;
for (i = 0; i < ARRAY_SIZE(para_features) - 1; i++) {
if (kvm_check_extension(env->kvm_state, para_features[i].cap))
features |= (1 << para_features[i].feature);
}
return... | {
"code": [],
"line_no": []
} | static int FUNC_0(CPUState *VAR_0)
{
int VAR_1, VAR_2 = 0;
for (VAR_1 = 0; VAR_1 < ARRAY_SIZE(para_features) - 1; VAR_1++) {
if (kvm_check_extension(VAR_0->kvm_state, para_features[VAR_1].cap))
VAR_2 |= (1 << para_features[VAR_1].feature);
}
... | [
"static int FUNC_0(CPUState *VAR_0)\n{",
"int VAR_1, VAR_2 = 0;",
"for (VAR_1 = 0; VAR_1 < ARRAY_SIZE(para_features) - 1; VAR_1++) {",
"if (kvm_check_extension(VAR_0->kvm_state, para_features[VAR_1].cap))\nVAR_2 |= (1 << para_features[VAR_1].feature);",
"}",
"return VAR_2;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
19
],
[
21
]
] |
7,085 | int msix_init_exclusive_bar(PCIDevice *dev, unsigned short nentries,
uint8_t bar_nr)
{
int ret;
char *name;
/*
* Migration compatibility dictates that this remains a 4k
* BAR with the vector table in the lower half and PBA in
* the upper half. Do not use... | false | qemu | a0ccd2123ee2f83a1f081e4c39013c3316f9ec7a | int msix_init_exclusive_bar(PCIDevice *dev, unsigned short nentries,
uint8_t bar_nr)
{
int ret;
char *name;
#define MSIX_EXCLUSIVE_BAR_SIZE 4096
#define MSIX_EXCLUSIVE_BAR_TABLE_OFFSET 0
#define MSIX_EXCLUSIVE_BAR_PBA_OFFSET (MSIX_EXCLUSIVE_BAR_SIZE / 2)
#defi... | {
"code": [],
"line_no": []
} | int FUNC_0(PCIDevice *VAR_0, unsigned short VAR_1,
uint8_t VAR_2)
{
int VAR_3;
char *VAR_4;
#define MSIX_EXCLUSIVE_BAR_SIZE 4096
#define MSIX_EXCLUSIVE_BAR_TABLE_OFFSET 0
#define MSIX_EXCLUSIVE_BAR_PBA_OFFSET (MSIX_EXCLUSIVE_BAR_SIZE / 2)
#define MSIX_EXCLUSIV... | [
"int FUNC_0(PCIDevice *VAR_0, unsigned short VAR_1,\nuint8_t VAR_2)\n{",
"int VAR_3;",
"char *VAR_4;",
"#define MSIX_EXCLUSIVE_BAR_SIZE 4096\n#define MSIX_EXCLUSIVE_BAR_TABLE_OFFSET 0\n#define MSIX_EXCLUSIVE_BAR_PBA_OFFSET (MSIX_EXCLUSIVE_BAR_SIZE / 2)\n#define MSIX_EXCLUSIVE_CAP_OFFSET 0\nif (VAR_1 * PCI_MSI... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
23,
25,
27,
29,
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
49,
51,
53,
55
],
[
57
],
[
59
],
[
61
],
[
65,
67
],
[
71
],
[... |
7,086 | static int armv7m_nvic_init(SysBusDevice *dev)
{
nvic_state *s = NVIC(dev);
NVICClass *nc = NVIC_GET_CLASS(s);
/* The NVIC always has only one CPU */
s->gic.num_cpu = 1;
/* Tell the common code we're an NVIC */
s->gic.revision = 0xffffffff;
s->gic.num_irq = s->num_irq;
nc->par... | false | qemu | 55e00a19b6dc8f20e5688866451bb4a60e649459 | static int armv7m_nvic_init(SysBusDevice *dev)
{
nvic_state *s = NVIC(dev);
NVICClass *nc = NVIC_GET_CLASS(s);
s->gic.num_cpu = 1;
s->gic.revision = 0xffffffff;
s->gic.num_irq = s->num_irq;
nc->parent_init(dev);
gic_init_irqs_and_distributor(&s->gic, s->num_irq);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(SysBusDevice *VAR_0)
{
nvic_state *s = NVIC(VAR_0);
NVICClass *nc = NVIC_GET_CLASS(s);
s->gic.num_cpu = 1;
s->gic.revision = 0xffffffff;
s->gic.num_irq = s->num_irq;
nc->parent_init(VAR_0);
gic_init_irqs_and_distributor(&s->gic, s->num_irq);
... | [
"static int FUNC_0(SysBusDevice *VAR_0)\n{",
"nvic_state *s = NVIC(VAR_0);",
"NVICClass *nc = NVIC_GET_CLASS(s);",
"s->gic.num_cpu = 1;",
"s->gic.revision = 0xffffffff;",
"s->gic.num_irq = s->num_irq;",
"nc->parent_init(VAR_0);",
"gic_init_irqs_and_distributor(&s->gic, s->num_irq);",
"memory_region_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
39
],
[
47,
49
],
[
51
],
[
59,
61
],
[
63
],
[
71
],
[
73
],
[
75
],
[
77
]
] |
7,087 | static int get_mmu_address(CPUState * env, target_ulong * physical,
int *prot, target_ulong address,
int rw, int access_type)
{
int use_asid, n;
tlb_t *matching = NULL;
use_asid = (env->mmucr & MMUCR_SV) == 0 || (env->sr & SR_MD) == 0;
if (rw == 2) {
n = find_itlb_entry(env, add... | false | qemu | 4d1e4ff63ce7c23256b24c3f1722d1abccb26451 | static int get_mmu_address(CPUState * env, target_ulong * physical,
int *prot, target_ulong address,
int rw, int access_type)
{
int use_asid, n;
tlb_t *matching = NULL;
use_asid = (env->mmucr & MMUCR_SV) == 0 || (env->sr & SR_MD) == 0;
if (rw == 2) {
n = find_itlb_entry(env, add... | {
"code": [],
"line_no": []
} | static int FUNC_0(CPUState * VAR_0, target_ulong * VAR_1,
int *VAR_2, target_ulong VAR_3,
int VAR_4, int VAR_5)
{
int VAR_6, VAR_7;
tlb_t *matching = NULL;
VAR_6 = (VAR_0->mmucr & MMUCR_SV) == 0 || (VAR_0->sr & SR_MD) == 0;
if (VAR_4 == 2) {
VAR_7 = find_itlb_entry(VAR_0, VAR_3,... | [
"static int FUNC_0(CPUState * VAR_0, target_ulong * VAR_1,\nint *VAR_2, target_ulong VAR_3,\nint VAR_4, int VAR_5)\n{",
"int VAR_6, VAR_7;",
"tlb_t *matching = NULL;",
"VAR_6 = (VAR_0->mmucr & MMUCR_SV) == 0 || (VAR_0->sr & SR_MD) == 0;",
"if (VAR_4 == 2) {",
"VAR_7 = find_itlb_entry(VAR_0, VAR_3, VAR_6, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,
49,
51,... |
7,088 | static void add_codec(FFStream *stream, AVCodecContext *av)
{
AVStream *st;
if(stream->nb_streams >= FF_ARRAY_ELEMS(stream->streams))
return;
/* compute default parameters */
switch(av->codec_type) {
case AVMEDIA_TYPE_AUDIO:
if (av->bit_rate == 0)
av->bit_rat... | false | FFmpeg | e85771f26814ae192f511a1b01b17ae0d62d62ab | static void add_codec(FFStream *stream, AVCodecContext *av)
{
AVStream *st;
if(stream->nb_streams >= FF_ARRAY_ELEMS(stream->streams))
return;
switch(av->codec_type) {
case AVMEDIA_TYPE_AUDIO:
if (av->bit_rate == 0)
av->bit_rate = 64000;
if (av->samp... | {
"code": [],
"line_no": []
} | static void FUNC_0(FFStream *VAR_0, AVCodecContext *VAR_1)
{
AVStream *st;
if(VAR_0->nb_streams >= FF_ARRAY_ELEMS(VAR_0->streams))
return;
switch(VAR_1->codec_type) {
case AVMEDIA_TYPE_AUDIO:
if (VAR_1->bit_rate == 0)
VAR_1->bit_rate = 64000;
if (VA... | [
"static void FUNC_0(FFStream *VAR_0, AVCodecContext *VAR_1)\n{",
"AVStream *st;",
"if(VAR_0->nb_streams >= FF_ARRAY_ELEMS(VAR_0->streams))\nreturn;",
"switch(VAR_1->codec_type) {",
"case AVMEDIA_TYPE_AUDIO:\nif (VAR_1->bit_rate == 0)\nVAR_1->bit_rate = 64000;",
"if (VAR_1->sample_rate == 0)\nVAR_1->sample... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
17
],
[
19,
21,
23
],
[
25,
27
],
[
29,
31
],
[
33
],
[
35,
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
... |
7,091 | START_TEST(qdict_put_obj_test)
{
QInt *qi;
QDict *qdict;
QDictEntry *ent;
const int num = 42;
qdict = qdict_new();
// key "" will have tdb hash 12345
qdict_put_obj(qdict, "", QOBJECT(qint_from_int(num)));
fail_unless(qdict_size(qdict) == 1);
ent = QLIST_FIRST(&qdict->... | false | qemu | ac531cb6e542b1e61d668604adf9dc5306a948c0 | START_TEST(qdict_put_obj_test)
{
QInt *qi;
QDict *qdict;
QDictEntry *ent;
const int num = 42;
qdict = qdict_new();
qdict_put_obj(qdict, "", QOBJECT(qint_from_int(num)));
fail_unless(qdict_size(qdict) == 1);
ent = QLIST_FIRST(&qdict->table[12345 % QDICT_BUCKET_MAX]);
... | {
"code": [],
"line_no": []
} | FUNC_0(VAR_0)
{
QInt *qi;
QDict *qdict;
QDictEntry *ent;
const int VAR_1 = 42;
qdict = qdict_new();
qdict_put_obj(qdict, "", QOBJECT(qint_from_int(VAR_1)));
fail_unless(qdict_size(qdict) == 1);
ent = QLIST_FIRST(&qdict->table[12345 % QDICT_BUCKET_MAX]);
qi = qob... | [
"FUNC_0(VAR_0)\n{",
"QInt *qi;",
"QDict *qdict;",
"QDictEntry *ent;",
"const int VAR_1 = 42;",
"qdict = qdict_new();",
"qdict_put_obj(qdict, \"\", QOBJECT(qint_from_int(VAR_1)));",
"fail_unless(qdict_size(qdict) == 1);",
"ent = QLIST_FIRST(&qdict->table[12345 % QDICT_BUCKET_MAX]);",
"qi = qobject_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
7,092 | static int v9fs_do_mkdir(V9fsState *s, V9fsString *path, mode_t mode)
{
return s->ops->mkdir(&s->ctx, path->data, mode);
}
| false | qemu | 00ec5c37601accb2b85b089d72fc7ddff2f4222e | static int v9fs_do_mkdir(V9fsState *s, V9fsString *path, mode_t mode)
{
return s->ops->mkdir(&s->ctx, path->data, mode);
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(V9fsState *VAR_0, V9fsString *VAR_1, mode_t VAR_2)
{
return VAR_0->ops->mkdir(&VAR_0->ctx, VAR_1->data, VAR_2);
}
| [
"static int FUNC_0(V9fsState *VAR_0, V9fsString *VAR_1, mode_t VAR_2)\n{",
"return VAR_0->ops->mkdir(&VAR_0->ctx, VAR_1->data, VAR_2);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
7,093 | static uint32_t slow_bar_readb(void *opaque, target_phys_addr_t addr)
{
AssignedDevRegion *d = opaque;
uint8_t *in = d->u.r_virtbase + addr;
uint32_t r;
r = *in;
DEBUG("slow_bar_readl addr=0x" TARGET_FMT_plx " val=0x%08x\n", addr, r);
return r;
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint32_t slow_bar_readb(void *opaque, target_phys_addr_t addr)
{
AssignedDevRegion *d = opaque;
uint8_t *in = d->u.r_virtbase + addr;
uint32_t r;
r = *in;
DEBUG("slow_bar_readl addr=0x" TARGET_FMT_plx " val=0x%08x\n", addr, r);
return r;
}
| {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(void *opaque, target_phys_addr_t addr)
{
AssignedDevRegion *d = opaque;
uint8_t *in = d->u.r_virtbase + addr;
uint32_t r;
r = *in;
DEBUG("slow_bar_readl addr=0x" TARGET_FMT_plx " val=0x%08x\n", addr, r);
return r;
}
| [
"static uint32_t FUNC_0(void *opaque, target_phys_addr_t addr)\n{",
"AssignedDevRegion *d = opaque;",
"uint8_t *in = d->u.r_virtbase + addr;",
"uint32_t r;",
"r = *in;",
"DEBUG(\"slow_bar_readl addr=0x\" TARGET_FMT_plx \" val=0x%08x\\n\", addr, r);",
"return r;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
]
] |
7,094 | uint32_t HELPER(tprot)(uint64_t a1, uint64_t a2)
{
/* XXX implement */
return 0;
}
| false | qemu | bb8794307252be791f1723eae47983f815882376 | uint32_t HELPER(tprot)(uint64_t a1, uint64_t a2)
{
return 0;
}
| {
"code": [],
"line_no": []
} | uint32_t FUNC_0(tprot)(uint64_t a1, uint64_t a2)
{
return 0;
}
| [
"uint32_t FUNC_0(tprot)(uint64_t a1, uint64_t a2)\n{",
"return 0;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
]
] |
7,095 | static void ds1338_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
I2CSlaveClass *k = I2C_SLAVE_CLASS(klass);
k->init = ds1338_init;
k->event = ds1338_event;
k->recv = ds1338_recv;
k->send = ds1338_send;
dc->reset = ds1338_reset;
dc->vmsd = ... | false | qemu | 9e41bade85ef338afd983c109368d1bbbe931f80 | static void ds1338_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
I2CSlaveClass *k = I2C_SLAVE_CLASS(klass);
k->init = ds1338_init;
k->event = ds1338_event;
k->recv = ds1338_recv;
k->send = ds1338_send;
dc->reset = ds1338_reset;
dc->vmsd = ... | {
"code": [],
"line_no": []
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
I2CSlaveClass *k = I2C_SLAVE_CLASS(VAR_0);
k->init = ds1338_init;
k->event = ds1338_event;
k->recv = ds1338_recv;
k->send = ds1338_send;
dc->reset = ds1338_reset;
dc->vmsd = &vmstate_d... | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"I2CSlaveClass *k = I2C_SLAVE_CLASS(VAR_0);",
"k->init = ds1338_init;",
"k->event = ds1338_event;",
"k->recv = ds1338_recv;",
"k->send = ds1338_send;",
"dc->reset = ds1338_reset;",
"dc->vmsd = &vmstat... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
7,096 | static void extend_solid_area(VncState *vs, int x, int y, int w, int h,
uint32_t color, int *x_ptr, int *y_ptr,
int *w_ptr, int *h_ptr)
{
int cx, cy;
/* Try to extend the area upwards. */
for ( cy = *y_ptr - 1;
cy >= y && check_s... | false | qemu | 245f7b51c0ea04fb2224b1127430a096c91aee70 | static void extend_solid_area(VncState *vs, int x, int y, int w, int h,
uint32_t color, int *x_ptr, int *y_ptr,
int *w_ptr, int *h_ptr)
{
int cx, cy;
for ( cy = *y_ptr - 1;
cy >= y && check_solid_tile(vs, *x_ptr, cy, *w_ptr, 1, ... | {
"code": [],
"line_no": []
} | static void FUNC_0(VncState *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4,
uint32_t VAR_5, int *VAR_6, int *VAR_7,
int *VAR_8, int *VAR_9)
{
int VAR_10, VAR_11;
for ( VAR_11 = *VAR_7 - 1;
VAR_11 >= VAR_2 && check_solid_tile... | [
"static void FUNC_0(VncState *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4,\nuint32_t VAR_5, int *VAR_6, int *VAR_7,\nint *VAR_8, int *VAR_9)\n{",
"int VAR_10, VAR_11;",
"for ( VAR_11 = *VAR_7 - 1;",
"VAR_11 >= VAR_2 && check_solid_tile(VAR_0, *VAR_6, VAR_11, *VAR_8, 1, &VAR_5, true);",
"VAR_11-- );",
... | [
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
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
57
],
[
59,
61
... |
7,097 | static inline void RET_CHG_FLOW (DisasContext *ctx)
{
ctx->exception = EXCP_MTMSR;
}
| false | qemu | e1833e1f96456fd8fc17463246fe0b2050e68efb | static inline void RET_CHG_FLOW (DisasContext *ctx)
{
ctx->exception = EXCP_MTMSR;
}
| {
"code": [],
"line_no": []
} | static inline void FUNC_0 (DisasContext *VAR_0)
{
VAR_0->exception = EXCP_MTMSR;
}
| [
"static inline void FUNC_0 (DisasContext *VAR_0)\n{",
"VAR_0->exception = EXCP_MTMSR;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
7,098 | static void setup_sigframe_v2(struct target_ucontext_v2 *uc,
target_sigset_t *set, CPUState *env)
{
struct target_sigaltstack stack;
int i;
/* Clear all the bits of the ucontext we don't use. */
memset(uc, 0, offsetof(struct target_ucontext_v2, tuc_mcontext));
... | false | qemu | 0d871bdbaac428601c84d29233a49f7cf6ecb6fc | static void setup_sigframe_v2(struct target_ucontext_v2 *uc,
target_sigset_t *set, CPUState *env)
{
struct target_sigaltstack stack;
int i;
memset(uc, 0, offsetof(struct target_ucontext_v2, tuc_mcontext));
memset(&stack, 0, sizeof(stack));
__put_user(ta... | {
"code": [],
"line_no": []
} | static void FUNC_0(struct target_ucontext_v2 *VAR_0,
target_sigset_t *VAR_1, CPUState *VAR_2)
{
struct target_sigaltstack VAR_3;
int VAR_4;
memset(VAR_0, 0, offsetof(struct target_ucontext_v2, tuc_mcontext));
memset(&VAR_3, 0, sizeof(VAR_3));
__put_user... | [
"static void FUNC_0(struct target_ucontext_v2 *VAR_0,\ntarget_sigset_t *VAR_1, CPUState *VAR_2)\n{",
"struct target_sigaltstack VAR_3;",
"int VAR_4;",
"memset(VAR_0, 0, offsetof(struct target_ucontext_v2, tuc_mcontext));",
"memset(&VAR_3, 0, sizeof(VAR_3));",
"__put_user(target_sigaltstack_used.ss_sp, &VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
7,100 | static av_cold int vdadec_close(AVCodecContext *avctx)
{
VDADecoderContext *ctx = avctx->priv_data;
/* release buffers and decoder */
ff_vda_destroy_decoder(&ctx->vda_ctx);
/* close H.264 decoder */
if (ctx->h264_initialized)
ff_h264_decoder.close(avctx);
return 0;
}
| false | FFmpeg | 973b1a6b9070e2bf17d17568cbaf4043ce931f51 | static av_cold int vdadec_close(AVCodecContext *avctx)
{
VDADecoderContext *ctx = avctx->priv_data;
ff_vda_destroy_decoder(&ctx->vda_ctx);
if (ctx->h264_initialized)
ff_h264_decoder.close(avctx);
return 0;
}
| {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
VDADecoderContext *ctx = avctx->priv_data;
ff_vda_destroy_decoder(&ctx->vda_ctx);
if (ctx->h264_initialized)
ff_h264_decoder.close(avctx);
return 0;
}
| [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"VDADecoderContext *ctx = avctx->priv_data;",
"ff_vda_destroy_decoder(&ctx->vda_ctx);",
"if (ctx->h264_initialized)\nff_h264_decoder.close(avctx);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13,
15
],
[
17
],
[
19
]
] |
7,101 | void pci_bridge_write_config(PCIDevice *d,
uint32_t address, uint32_t val, int len)
{
PCIBridge *s = PCI_BRIDGE(d);
uint16_t oldctl = pci_get_word(d->config + PCI_BRIDGE_CONTROL);
uint16_t newctl;
pci_default_write_config(d, address, val, len);
if (ranges_over... | false | qemu | 81e3e75b6461c53724fe7c7918bc54468fcdaf9d | void pci_bridge_write_config(PCIDevice *d,
uint32_t address, uint32_t val, int len)
{
PCIBridge *s = PCI_BRIDGE(d);
uint16_t oldctl = pci_get_word(d->config + PCI_BRIDGE_CONTROL);
uint16_t newctl;
pci_default_write_config(d, address, val, len);
if (ranges_over... | {
"code": [],
"line_no": []
} | void FUNC_0(PCIDevice *VAR_0,
uint32_t VAR_1, uint32_t VAR_2, int VAR_3)
{
PCIBridge *s = PCI_BRIDGE(VAR_0);
uint16_t oldctl = pci_get_word(VAR_0->config + PCI_BRIDGE_CONTROL);
uint16_t newctl;
pci_default_write_config(VAR_0, VAR_1, VAR_2, VAR_3);
if (ranges_o... | [
"void FUNC_0(PCIDevice *VAR_0,\nuint32_t VAR_1, uint32_t VAR_2, int VAR_3)\n{",
"PCIBridge *s = PCI_BRIDGE(VAR_0);",
"uint16_t oldctl = pci_get_word(VAR_0->config + PCI_BRIDGE_CONTROL);",
"uint16_t newctl;",
"pci_default_write_config(VAR_0, VAR_1, VAR_2, VAR_3);",
"if (ranges_overlap(VAR_1, VAR_3, PCI_COM... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19,
25,
33,
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
53
],
[
55
],
[
57
]
] |
7,102 | static inline int ucf64_exceptbits_to_host(int target_bits)
{
int host_bits = 0;
if (target_bits & UCF64_FPSCR_FLAG_INVALID) {
host_bits |= float_flag_invalid;
}
if (target_bits & UCF64_FPSCR_FLAG_DIVZERO) {
host_bits |= float_flag_divbyzero;
}
if (target_bits & UCF64_... | false | qemu | e8ede0a8bb5298a6979bcf7ed84ef64a64a4e3fe | static inline int ucf64_exceptbits_to_host(int target_bits)
{
int host_bits = 0;
if (target_bits & UCF64_FPSCR_FLAG_INVALID) {
host_bits |= float_flag_invalid;
}
if (target_bits & UCF64_FPSCR_FLAG_DIVZERO) {
host_bits |= float_flag_divbyzero;
}
if (target_bits & UCF64_... | {
"code": [],
"line_no": []
} | static inline int FUNC_0(int VAR_0)
{
int VAR_1 = 0;
if (VAR_0 & UCF64_FPSCR_FLAG_INVALID) {
VAR_1 |= float_flag_invalid;
}
if (VAR_0 & UCF64_FPSCR_FLAG_DIVZERO) {
VAR_1 |= float_flag_divbyzero;
}
if (VAR_0 & UCF64_FPSCR_FLAG_OVERFLOW) {
VAR_1 |= float_flag_ov... | [
"static inline int FUNC_0(int VAR_0)\n{",
"int VAR_1 = 0;",
"if (VAR_0 & UCF64_FPSCR_FLAG_INVALID) {",
"VAR_1 |= float_flag_invalid;",
"}",
"if (VAR_0 & UCF64_FPSCR_FLAG_DIVZERO) {",
"VAR_1 |= float_flag_divbyzero;",
"}",
"if (VAR_0 & UCF64_FPSCR_FLAG_OVERFLOW) {",
"VAR_1 |= float_flag_overflow;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
7,103 | static void qmp_output_start_list(Visitor *v, const char *name, Error **errp)
{
QmpOutputVisitor *qov = to_qov(v);
QList *list = qlist_new();
qmp_output_add(qov, name, list);
qmp_output_push(qov, list);
}
| false | qemu | d9f62dde1303286b24ac8ce88be27e2b9b9c5f46 | static void qmp_output_start_list(Visitor *v, const char *name, Error **errp)
{
QmpOutputVisitor *qov = to_qov(v);
QList *list = qlist_new();
qmp_output_add(qov, name, list);
qmp_output_push(qov, list);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(Visitor *VAR_0, const char *VAR_1, Error **VAR_2)
{
QmpOutputVisitor *qov = to_qov(VAR_0);
QList *list = qlist_new();
qmp_output_add(qov, VAR_1, list);
qmp_output_push(qov, list);
}
| [
"static void FUNC_0(Visitor *VAR_0, const char *VAR_1, Error **VAR_2)\n{",
"QmpOutputVisitor *qov = to_qov(VAR_0);",
"QList *list = qlist_new();",
"qmp_output_add(qov, VAR_1, list);",
"qmp_output_push(qov, list);",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
]
] |
7,104 | static int scsi_hot_add(Monitor *mon, DeviceState *adapter,
DriveInfo *dinfo, int printinfo)
{
SCSIBus *scsibus;
SCSIDevice *scsidev;
scsibus = DO_UPCAST(SCSIBus, qbus, QLIST_FIRST(&adapter->child_bus));
if (!scsibus || strcmp(scsibus->qbus.info->name, "SCSI") != 0) {
... | false | qemu | f8b6cc0070aab8b75bd082582c829be1353f395f | static int scsi_hot_add(Monitor *mon, DeviceState *adapter,
DriveInfo *dinfo, int printinfo)
{
SCSIBus *scsibus;
SCSIDevice *scsidev;
scsibus = DO_UPCAST(SCSIBus, qbus, QLIST_FIRST(&adapter->child_bus));
if (!scsibus || strcmp(scsibus->qbus.info->name, "SCSI") != 0) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0(Monitor *VAR_0, DeviceState *VAR_1,
DriveInfo *VAR_2, int VAR_3)
{
SCSIBus *scsibus;
SCSIDevice *scsidev;
scsibus = DO_UPCAST(SCSIBus, qbus, QLIST_FIRST(&VAR_1->child_bus));
if (!scsibus || strcmp(scsibus->qbus.info->name, "SCSI") != 0) {
error_... | [
"static int FUNC_0(Monitor *VAR_0, DeviceState *VAR_1,\nDriveInfo *VAR_2, int VAR_3)\n{",
"SCSIBus *scsibus;",
"SCSIDevice *scsidev;",
"scsibus = DO_UPCAST(SCSIBus, qbus, QLIST_FIRST(&VAR_1->child_bus));",
"if (!scsibus || strcmp(scsibus->qbus.info->name, \"SCSI\") != 0) {",
"error_report(\"Device is not ... | [
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
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55,
57,
59
],
[
61
],
[
63
]
] |
7,106 | float64 float64_round_to_int( float64 a STATUS_PARAM )
{
flag aSign;
int16 aExp;
bits64 lastBitMask, roundBitsMask;
int8 roundingMode;
float64 z;
aExp = extractFloat64Exp( a );
if ( 0x433 <= aExp ) {
if ( ( aExp == 0x7FF ) && extractFloat64Frac( a ) ) {
return... | false | qemu | f090c9d4ad5812fb92843d6470a1111c15190c4c | float64 float64_round_to_int( float64 a STATUS_PARAM )
{
flag aSign;
int16 aExp;
bits64 lastBitMask, roundBitsMask;
int8 roundingMode;
float64 z;
aExp = extractFloat64Exp( a );
if ( 0x433 <= aExp ) {
if ( ( aExp == 0x7FF ) && extractFloat64Frac( a ) ) {
return... | {
"code": [],
"line_no": []
} | float64 FUNC_0( float64 a STATUS_PARAM )
{
flag aSign;
int16 aExp;
bits64 lastBitMask, roundBitsMask;
int8 roundingMode;
float64 z;
aExp = extractFloat64Exp( a );
if ( 0x433 <= aExp ) {
if ( ( aExp == 0x7FF ) && extractFloat64Frac( a ) ) {
return propagateFloa... | [
"float64 FUNC_0( float64 a STATUS_PARAM )\n{",
"flag aSign;",
"int16 aExp;",
"bits64 lastBitMask, roundBitsMask;",
"int8 roundingMode;",
"float64 z;",
"aExp = extractFloat64Exp( a );",
"if ( 0x433 <= aExp ) {",
"if ( ( aExp == 0x7FF ) && extractFloat64Frac( a ) ) {",
"return propagateFloat64NaN( a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[... |
7,107 | static void scsi_cd_class_initfn(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SCSIDeviceClass *sc = SCSI_DEVICE_CLASS(klass);
sc->init = scsi_cd_initfn;
sc->destroy = scsi_destroy;
sc->alloc_req = scsi_new_request;
sc->unit_attention_reported ... | false | qemu | a818a4b69d47ca3826dee36878074395aeac2083 | static void scsi_cd_class_initfn(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SCSIDeviceClass *sc = SCSI_DEVICE_CLASS(klass);
sc->init = scsi_cd_initfn;
sc->destroy = scsi_destroy;
sc->alloc_req = scsi_new_request;
sc->unit_attention_reported ... | {
"code": [],
"line_no": []
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
SCSIDeviceClass *sc = SCSI_DEVICE_CLASS(VAR_0);
sc->init = scsi_cd_initfn;
sc->destroy = scsi_destroy;
sc->alloc_req = scsi_new_request;
sc->unit_attention_reported = scsi_disk_u... | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"SCSIDeviceClass *sc = SCSI_DEVICE_CLASS(VAR_0);",
"sc->init = scsi_cd_initfn;",
"sc->destroy = scsi_destroy;",
"sc->alloc_req = scsi_new_request;",
"sc->unit_attention_reported = scsi_dis... | [
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
]
] |
7,108 | static int local_post_create_passthrough(FsContext *fs_ctx, const char *path,
FsCred *credp)
{
char buffer[PATH_MAX];
if (chmod(rpath(fs_ctx, path, buffer), credp->fc_mode & 07777) < 0) {
return -1;
}
if (lchown(rpath(fs_ctx, path, buffer), credp... | false | qemu | b97400caef60ccfb0bc81c59f8bd824c43a0d6c8 | static int local_post_create_passthrough(FsContext *fs_ctx, const char *path,
FsCred *credp)
{
char buffer[PATH_MAX];
if (chmod(rpath(fs_ctx, path, buffer), credp->fc_mode & 07777) < 0) {
return -1;
}
if (lchown(rpath(fs_ctx, path, buffer), credp... | {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0, const char *VAR_1,
FsCred *VAR_2)
{
char VAR_3[PATH_MAX];
if (chmod(rpath(VAR_0, VAR_1, VAR_3), VAR_2->fc_mode & 07777) < 0) {
return -1;
}
if (lchown(rpath(VAR_0, VAR_1, VAR_3), VAR_2->fc_uid,
... | [
"static int FUNC_0(FsContext *VAR_0, const char *VAR_1,\nFsCred *VAR_2)\n{",
"char VAR_3[PATH_MAX];",
"if (chmod(rpath(VAR_0, VAR_1, VAR_3), VAR_2->fc_mode & 07777) < 0) {",
"return -1;",
"}",
"if (lchown(rpath(VAR_0, VAR_1, VAR_3), VAR_2->fc_uid,\nVAR_2->fc_gid) < 0) {",
"if (VAR_0->fs_sm != SM_NONE) {... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17,
19
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
7,110 | uint8_t cpu_inb(pio_addr_t addr)
{
uint8_t val;
val = ioport_read(0, addr);
trace_cpu_in(addr, val);
LOG_IOPORT("inb : %04"FMT_pioaddr" %02"PRIx8"\n", addr, val);
return val;
}
| false | qemu | b40acf99bef69fa8ab0f9092ff162fde945eec12 | uint8_t cpu_inb(pio_addr_t addr)
{
uint8_t val;
val = ioport_read(0, addr);
trace_cpu_in(addr, val);
LOG_IOPORT("inb : %04"FMT_pioaddr" %02"PRIx8"\n", addr, val);
return val;
}
| {
"code": [],
"line_no": []
} | uint8_t FUNC_0(pio_addr_t addr)
{
uint8_t val;
val = ioport_read(0, addr);
trace_cpu_in(addr, val);
LOG_IOPORT("inb : %04"FMT_pioaddr" %02"PRIx8"\n", addr, val);
return val;
}
| [
"uint8_t FUNC_0(pio_addr_t addr)\n{",
"uint8_t val;",
"val = ioport_read(0, addr);",
"trace_cpu_in(addr, val);",
"LOG_IOPORT(\"inb : %04\"FMT_pioaddr\" %02\"PRIx8\"\\n\", addr, val);",
"return val;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
7,112 | void s390_init_cpus(const char *cpu_model)
{
int i;
if (cpu_model == NULL) {
cpu_model = "host";
}
ipi_states = g_malloc(sizeof(S390CPU *) * smp_cpus);
for (i = 0; i < smp_cpus; i++) {
S390CPU *cpu;
CPUState *cs;
cpu = cpu_s390x_init(cpu_model);
... | false | qemu | d2eae20790e825656b205dbe347826ff991fb3d8 | void s390_init_cpus(const char *cpu_model)
{
int i;
if (cpu_model == NULL) {
cpu_model = "host";
}
ipi_states = g_malloc(sizeof(S390CPU *) * smp_cpus);
for (i = 0; i < smp_cpus; i++) {
S390CPU *cpu;
CPUState *cs;
cpu = cpu_s390x_init(cpu_model);
... | {
"code": [],
"line_no": []
} | void FUNC_0(const char *VAR_0)
{
int VAR_1;
if (VAR_0 == NULL) {
VAR_0 = "host";
}
ipi_states = g_malloc(sizeof(S390CPU *) * smp_cpus);
for (VAR_1 = 0; VAR_1 < smp_cpus; VAR_1++) {
S390CPU *cpu;
CPUState *cs;
cpu = cpu_s390x_init(VAR_0);
cs ... | [
"void FUNC_0(const char *VAR_0)\n{",
"int VAR_1;",
"if (VAR_0 == NULL) {",
"VAR_0 = \"host\";",
"}",
"ipi_states = g_malloc(sizeof(S390CPU *) * smp_cpus);",
"for (VAR_1 = 0; VAR_1 < smp_cpus; VAR_1++) {",
"S390CPU *cpu;",
"CPUState *cs;",
"cpu = cpu_s390x_init(VAR_0);",
"cs = CPU(cpu);",
"ipi_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
]
] |
7,113 | static int virtio_scsi_do_tmf(VirtIOSCSI *s, VirtIOSCSIReq *req)
{
SCSIDevice *d = virtio_scsi_device_find(s, req->req.tmf.lun);
SCSIRequest *r, *next;
BusChild *kid;
int target;
int ret = 0;
if (s->dataplane_started && bdrv_get_aio_context(d->conf.bs) != s->ctx) {
aio_context_... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | static int virtio_scsi_do_tmf(VirtIOSCSI *s, VirtIOSCSIReq *req)
{
SCSIDevice *d = virtio_scsi_device_find(s, req->req.tmf.lun);
SCSIRequest *r, *next;
BusChild *kid;
int target;
int ret = 0;
if (s->dataplane_started && bdrv_get_aio_context(d->conf.bs) != s->ctx) {
aio_context_... | {
"code": [],
"line_no": []
} | static int FUNC_0(VirtIOSCSI *VAR_0, VirtIOSCSIReq *VAR_1)
{
SCSIDevice *d = virtio_scsi_device_find(VAR_0, VAR_1->VAR_1.tmf.lun);
SCSIRequest *r, *next;
BusChild *kid;
int VAR_2;
int VAR_3 = 0;
if (VAR_0->dataplane_started && bdrv_get_aio_context(d->conf.bs) != VAR_0->ctx) {
a... | [
"static int FUNC_0(VirtIOSCSI *VAR_0, VirtIOSCSIReq *VAR_1)\n{",
"SCSIDevice *d = virtio_scsi_device_find(VAR_0, VAR_1->VAR_1.tmf.lun);",
"SCSIRequest *r, *next;",
"BusChild *kid;",
"int VAR_2;",
"int VAR_3 = 0;",
"if (VAR_0->dataplane_started && bdrv_get_aio_context(d->conf.bs) != VAR_0->ctx) {",
"ai... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33
],
[
35
],
[
37,
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
7,114 | static BlockDriverAIOCB *raw_aio_write(BlockDriverState *bs,
int64_t sector_num, const uint8_t *buf, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
RawAIOCB *acb;
/*
* If O_DIRECT is used and the buffer is not aligned fall back
* to synchronous IO.
*/
... | false | qemu | 3c529d935923a70519557d420db1d5a09a65086a | static BlockDriverAIOCB *raw_aio_write(BlockDriverState *bs,
int64_t sector_num, const uint8_t *buf, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
RawAIOCB *acb;
BDRVRawState *s = bs->opaque;
if (unlikely(s->aligned_buf != NULL && ((uintptr_t) buf % 512... | {
"code": [],
"line_no": []
} | static BlockDriverAIOCB *FUNC_0(BlockDriverState *bs,
int64_t sector_num, const uint8_t *buf, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
RawAIOCB *acb;
BDRVRawState *s = bs->opaque;
if (unlikely(s->aligned_buf != NULL && ((uintptr_t) buf % 512))) {
... | [
"static BlockDriverAIOCB *FUNC_0(BlockDriverState *bs,\nint64_t sector_num, const uint8_t *buf, int nb_sectors,\nBlockDriverCompletionFunc *cb, void *opaque)\n{",
"RawAIOCB *acb;",
"BDRVRawState *s = bs->opaque;",
"if (unlikely(s->aligned_buf != NULL && ((uintptr_t) buf % 512))) {",
"QEMUBH *bh;",
"acb = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
],
[... |
7,116 | static void vnc_init_basic_info_from_remote_addr(QIOChannelSocket *ioc,
VncBasicInfo *info,
Error **errp)
{
SocketAddress *addr = NULL;
addr = qio_channel_socket_get_remote_address(ioc, errp);
if (!addr... | false | qemu | dfd100f242370886bb6732f70f1f7cbd8eb9fedc | static void vnc_init_basic_info_from_remote_addr(QIOChannelSocket *ioc,
VncBasicInfo *info,
Error **errp)
{
SocketAddress *addr = NULL;
addr = qio_channel_socket_get_remote_address(ioc, errp);
if (!addr... | {
"code": [],
"line_no": []
} | static void FUNC_0(QIOChannelSocket *VAR_0,
VncBasicInfo *VAR_1,
Error **VAR_2)
{
SocketAddress *addr = NULL;
addr = qio_channel_socket_get_remote_address(VAR_0, VAR_2);
if (!addr) {
return;
... | [
"static void FUNC_0(QIOChannelSocket *VAR_0,\nVncBasicInfo *VAR_1,\nError **VAR_2)\n{",
"SocketAddress *addr = NULL;",
"addr = qio_channel_socket_get_remote_address(VAR_0, VAR_2);",
"if (!addr) {",
"return;",
"}",
"vnc_init_basic_info(addr, VAR_1, VAR_2);",
"qapi_free_SocketAddress(addr);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
]
] |
7,117 | static void vnc_write_u8(VncState *vs, uint8_t value)
{
vnc_write(vs, (char *)&value, 1);
}
| false | qemu | 5fb6c7a8b26eab1a22207d24b4784bd2b39ab54b | static void vnc_write_u8(VncState *vs, uint8_t value)
{
vnc_write(vs, (char *)&value, 1);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(VncState *VAR_0, uint8_t VAR_1)
{
vnc_write(VAR_0, (char *)&VAR_1, 1);
}
| [
"static void FUNC_0(VncState *VAR_0, uint8_t VAR_1)\n{",
"vnc_write(VAR_0, (char *)&VAR_1, 1);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
7,118 | void helper_mtc0_pagemask(CPUMIPSState *env, target_ulong arg1)
{
/* 1k pages not implemented */
env->CP0_PageMask = arg1 & (0x1FFFFFFF & (TARGET_PAGE_MASK << 1));
}
| false | qemu | ba801af429aaa68f6cc03842c8b6be81a6ede65a | void helper_mtc0_pagemask(CPUMIPSState *env, target_ulong arg1)
{
env->CP0_PageMask = arg1 & (0x1FFFFFFF & (TARGET_PAGE_MASK << 1));
}
| {
"code": [],
"line_no": []
} | void FUNC_0(CPUMIPSState *VAR_0, target_ulong VAR_1)
{
VAR_0->CP0_PageMask = VAR_1 & (0x1FFFFFFF & (TARGET_PAGE_MASK << 1));
}
| [
"void FUNC_0(CPUMIPSState *VAR_0, target_ulong VAR_1)\n{",
"VAR_0->CP0_PageMask = VAR_1 & (0x1FFFFFFF & (TARGET_PAGE_MASK << 1));",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
]
] |
7,120 | static void memory_region_prepare_ram_addr(MemoryRegion *mr)
{
if (mr->backend_registered) {
return;
}
mr->destructor = memory_region_destructor_iomem;
mr->ram_addr = cpu_register_io_memory(memory_region_read_thunk,
memory_region_write_thunk,
... | false | qemu | 26a83ad0e793465b74a8b06a65f2f6fdc5615413 | static void memory_region_prepare_ram_addr(MemoryRegion *mr)
{
if (mr->backend_registered) {
return;
}
mr->destructor = memory_region_destructor_iomem;
mr->ram_addr = cpu_register_io_memory(memory_region_read_thunk,
memory_region_write_thunk,
... | {
"code": [],
"line_no": []
} | static void FUNC_0(MemoryRegion *VAR_0)
{
if (VAR_0->backend_registered) {
return;
}
VAR_0->destructor = memory_region_destructor_iomem;
VAR_0->ram_addr = cpu_register_io_memory(memory_region_read_thunk,
memory_region_write_thunk,
... | [
"static void FUNC_0(MemoryRegion *VAR_0)\n{",
"if (VAR_0->backend_registered) {",
"return;",
"}",
"VAR_0->destructor = memory_region_destructor_iomem;",
"VAR_0->ram_addr = cpu_register_io_memory(memory_region_read_thunk,\nmemory_region_write_thunk,\nVAR_0);",
"VAR_0->backend_registered = true;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17,
19
],
[
21
],
[
23
]
] |
7,121 | static void virtio_blk_reset(VirtIODevice *vdev)
{
VirtIOBlock *s = VIRTIO_BLK(vdev);
AioContext *ctx;
VirtIOBlockReq *req;
ctx = blk_get_aio_context(s->blk);
aio_context_acquire(ctx);
blk_drain(s->blk);
/* We drop queued requests after blk_drain() because blk_drain() itself can
... | false | qemu | 9ffe337c08388d5c587eae1d77db1b0d1a47c7b1 | static void virtio_blk_reset(VirtIODevice *vdev)
{
VirtIOBlock *s = VIRTIO_BLK(vdev);
AioContext *ctx;
VirtIOBlockReq *req;
ctx = blk_get_aio_context(s->blk);
aio_context_acquire(ctx);
blk_drain(s->blk);
while (s->rq) {
req = s->rq;
s->rq = req->next;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(VirtIODevice *VAR_0)
{
VirtIOBlock *s = VIRTIO_BLK(VAR_0);
AioContext *ctx;
VirtIOBlockReq *req;
ctx = blk_get_aio_context(s->blk);
aio_context_acquire(ctx);
blk_drain(s->blk);
while (s->rq) {
req = s->rq;
s->rq = req->next;
v... | [
"static void FUNC_0(VirtIODevice *VAR_0)\n{",
"VirtIOBlock *s = VIRTIO_BLK(VAR_0);",
"AioContext *ctx;",
"VirtIOBlockReq *req;",
"ctx = blk_get_aio_context(s->blk);",
"aio_context_acquire(ctx);",
"blk_drain(s->blk);",
"while (s->rq) {",
"req = s->rq;",
"s->rq = req->next;",
"virtqueue_detach_ele... | [
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
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
]
] |
7,123 | static void avc_h_loop_filter_luma_mbaff_msa(uint8_t *in, int32_t stride,
int32_t alpha_in, int32_t beta_in,
int8_t *tc0)
{
uint8_t *data = in;
uint32_t out0, out1, out2, out3;
uint64_t load;
uint32_t tc_val... | false | FFmpeg | bcd7bf7eeb09a395cc01698842d1b8be9af483fc | static void avc_h_loop_filter_luma_mbaff_msa(uint8_t *in, int32_t stride,
int32_t alpha_in, int32_t beta_in,
int8_t *tc0)
{
uint8_t *data = in;
uint32_t out0, out1, out2, out3;
uint64_t load;
uint32_t tc_val... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t *VAR_0, int32_t VAR_1,
int32_t VAR_2, int32_t VAR_3,
int8_t *VAR_4)
{
uint8_t *data = VAR_0;
uint32_t out0, out1, out2, out3;
uint64_t load;
uint32_t tc_val;
v16u8 alpha, beta... | [
"static void FUNC_0(uint8_t *VAR_0, int32_t VAR_1,\nint32_t VAR_2, int32_t VAR_3,\nint8_t *VAR_4)\n{",
"uint8_t *data = VAR_0;",
"uint32_t out0, out1, out2, out3;",
"uint64_t load;",
"uint32_t tc_val;",
"v16u8 alpha, beta;",
"v16i8 inp0 = { 0 };",
"v16i8 inp1 = { 0 };",
"v16i8 inp2 = { 0 };",
"v16... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
7,124 | ISADevice *rtc_init(ISABus *bus, int base_year, qemu_irq intercept_irq)
{
DeviceState *dev;
ISADevice *isadev;
RTCState *s;
isadev = isa_create(bus, TYPE_MC146818_RTC);
dev = DEVICE(isadev);
s = MC146818_RTC(isadev);
qdev_prop_set_int32(dev, "base_year", base_year);
qdev_init_... | false | qemu | 3638439d541835f20fb76346f14549800046af76 | ISADevice *rtc_init(ISABus *bus, int base_year, qemu_irq intercept_irq)
{
DeviceState *dev;
ISADevice *isadev;
RTCState *s;
isadev = isa_create(bus, TYPE_MC146818_RTC);
dev = DEVICE(isadev);
s = MC146818_RTC(isadev);
qdev_prop_set_int32(dev, "base_year", base_year);
qdev_init_... | {
"code": [],
"line_no": []
} | ISADevice *FUNC_0(ISABus *bus, int base_year, qemu_irq intercept_irq)
{
DeviceState *dev;
ISADevice *isadev;
RTCState *s;
isadev = isa_create(bus, TYPE_MC146818_RTC);
dev = DEVICE(isadev);
s = MC146818_RTC(isadev);
qdev_prop_set_int32(dev, "base_year", base_year);
qdev_init_no... | [
"ISADevice *FUNC_0(ISABus *bus, int base_year, qemu_irq intercept_irq)\n{",
"DeviceState *dev;",
"ISADevice *isadev;",
"RTCState *s;",
"isadev = isa_create(bus, TYPE_MC146818_RTC);",
"dev = DEVICE(isadev);",
"s = MC146818_RTC(isadev);",
"qdev_prop_set_int32(dev, \"base_year\", base_year);",
"qdev_in... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
]
] |
7,126 | static int decode_gop_header(IVI5DecContext *ctx, AVCodecContext *avctx)
{
int result, i, p, tile_size, pic_size_indx, mb_size, blk_size;
int quant_mat, blk_size_changed = 0;
IVIBandDesc *band, *band1, *band2;
IVIPicConfig pic_conf;
ctx->gop_flags = get_bits(&c... | true | FFmpeg | d46bc4133c104188dd6719365605e42bd1b5e2ff | static int decode_gop_header(IVI5DecContext *ctx, AVCodecContext *avctx)
{
int result, i, p, tile_size, pic_size_indx, mb_size, blk_size;
int quant_mat, blk_size_changed = 0;
IVIBandDesc *band, *band1, *band2;
IVIPicConfig pic_conf;
ctx->gop_flags = get_bits(&c... | {
"code": [
" int result, i, p, tile_size, pic_size_indx, mb_size, blk_size;",
" ctx->is_scalable = pic_conf.luma_bands != 1 || pic_conf.chroma_bands != 1;",
" if (ctx->is_scalable && (pic_conf.luma_bands != 4 || pic_conf.chroma_bands != 1)) {"
],
"line_no": [
5,
49,
5... | static int FUNC_0(IVI5DecContext *VAR_0, AVCodecContext *VAR_1)
{
int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;
int VAR_9, VAR_10 = 0;
IVIBandDesc *band, *band1, *band2;
IVIPicConfig pic_conf;
VAR_0->gop_flags = get_bits(&VAR_0->gb, 8);
VAR_0->gop... | [
"static int FUNC_0(IVI5DecContext *VAR_0, AVCodecContext *VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;",
"int VAR_9, VAR_10 = 0;",
"IVIBandDesc *band, *band1, *band2;",
"IVIPicConfig pic_conf;",
"VAR_0->gop_flags = get_bits(&VAR_0->gb, 8);",
"VAR_0->go... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
23,
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53,
55
],
[
57
... |
7,127 | static int build_huff(const uint8_t *src, VLC *vlc, int *fsym)
{
int i;
HuffEntry he[256];
int last;
uint32_t codes[256];
uint8_t bits[256];
uint8_t syms[256];
uint32_t code;
*fsym = -1;
for (i = 0; i < 256; i++) {
he[i].sym = i;
he[i].len = *src++;
... | true | FFmpeg | 48efe9ec86acf6dcf6aabef2114f8dd04e4fbce4 | static int build_huff(const uint8_t *src, VLC *vlc, int *fsym)
{
int i;
HuffEntry he[256];
int last;
uint32_t codes[256];
uint8_t bits[256];
uint8_t syms[256];
uint32_t code;
*fsym = -1;
for (i = 0; i < 256; i++) {
he[i].sym = i;
he[i].len = *src++;
... | {
"code": [
" if (he[0].len > 32)",
" return -1;"
],
"line_no": [
43,
45
]
} | static int FUNC_0(const uint8_t *VAR_0, VLC *VAR_1, int *VAR_2)
{
int VAR_3;
HuffEntry he[256];
int VAR_4;
uint32_t codes[256];
uint8_t bits[256];
uint8_t syms[256];
uint32_t code;
*VAR_2 = -1;
for (VAR_3 = 0; VAR_3 < 256; VAR_3++) {
he[VAR_3].sym = VAR_3;
... | [
"static int FUNC_0(const uint8_t *VAR_0, VLC *VAR_1, int *VAR_2)\n{",
"int VAR_3;",
"HuffEntry he[256];",
"int VAR_4;",
"uint32_t codes[256];",
"uint8_t bits[256];",
"uint8_t syms[256];",
"uint32_t code;",
"*VAR_2 = -1;",
"for (VAR_3 = 0; VAR_3 < 256; VAR_3++) {",
"he[VAR_3].sym = VAR_3;",
"he... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[... |
7,128 | static int nist_read_header(AVFormatContext *s)
{
char buffer[32], coding[32] = "pcm", format[32] = "01";
int bps = 0, be = 0;
int32_t header_size;
AVStream *st;
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDI... | true | FFmpeg | 632fdec9f4eb80dc8301cb938bce4b470fed0c11 | static int nist_read_header(AVFormatContext *s)
{
char buffer[32], coding[32] = "pcm", format[32] = "01";
int bps = 0, be = 0;
int32_t header_size;
AVStream *st;
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDI... | {
"code": [
" int32_t header_size;"
],
"line_no": [
9
]
} | static int FUNC_0(AVFormatContext *VAR_0)
{
char VAR_1[32], VAR_2[32] = "pcm", VAR_3[32] = "01";
int VAR_4 = 0, VAR_5 = 0;
int32_t header_size;
AVStream *st;
st = avformat_new_stream(VAR_0, NULL);
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDI... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"char VAR_1[32], VAR_2[32] = \"pcm\", VAR_3[32] = \"01\";",
"int VAR_4 = 0, VAR_5 = 0;",
"int32_t header_size;",
"AVStream *st;",
"st = avformat_new_stream(VAR_0, NULL);",
"if (!st)\nreturn AVERROR(ENOMEM);",
"st->codec->codec_type = AVMEDIA_TYPE_AUDIO;"... | [
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,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
39
],
[
41
],
[
45,
47
],
[
51
],
[
53,
55
],
[
59
... |
7,129 | static int pcm_read_header(AVFormatContext *s)
{
PCMAudioDemuxerContext *s1 = s->priv_data;
AVStream *st;
uint8_t *mime_type = NULL;
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
st->codecpar->codec_... | true | FFmpeg | a5b5ce2658bf7506bb31f0b2b4cb44ddbf9a3955 | static int pcm_read_header(AVFormatContext *s)
{
PCMAudioDemuxerContext *s1 = s->priv_data;
AVStream *st;
uint8_t *mime_type = NULL;
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
st->codecpar->codec_... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
PCMAudioDemuxerContext *s1 = VAR_0->priv_data;
AVStream *st;
uint8_t *mime_type = NULL;
st = avformat_new_stream(VAR_0, NULL);
if (!st)
return AVERROR(ENOMEM);
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
st->codecpar->cod... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"PCMAudioDemuxerContext *s1 = VAR_0->priv_data;",
"AVStream *st;",
"uint8_t *mime_type = NULL;",
"st = avformat_new_stream(VAR_0, NULL);",
"if (!st)\nreturn AVERROR(ENOMEM);",
"st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;",
"st->codecpar->codec_id ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
7,131 | static int amrnb_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
AMRContext *p = avctx->priv_data; // pointer to private data
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
float *buf_out; ... | true | FFmpeg | 7f09791d28c82c9169d1612a6192851837341ca9 | static int amrnb_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
AMRContext *p = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
float *buf_out;
int i... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
AMRContext *p = VAR_0->priv_data;
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
float *VAR_6;
int VAR_7, VAR_8, VAR_9;
... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"AMRContext *p = VAR_0->priv_data;",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"float *VAR_6;",
"int VAR_7, VAR_8, VAR_9;",
"float VAR_10;",
"AMRFixed fixed_sparse = {0};",
"floa... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33
],
[
35
],
[
37
],
[
39
],
[
42
],
[
46
],
[
48
],
[
50
],
... |
7,132 | void bdrv_set_aio_context(BlockDriverState *bs, AioContext *new_context)
{
bdrv_drain(bs); /* ensure there are no in-flight requests */
bdrv_detach_aio_context(bs);
/* This function executes in the old AioContext so acquire the new one in
* case it runs in a different thread.
*/
aio_context_ac... | true | qemu | c2b6428d388b3f03261be7b0be770919e4e3e5ec | void bdrv_set_aio_context(BlockDriverState *bs, AioContext *new_context)
{
bdrv_drain(bs);
bdrv_detach_aio_context(bs);
aio_context_acquire(new_context);
bdrv_attach_aio_context(bs, new_context);
aio_context_release(new_context); | {
"code": [],
"line_no": []
} | void FUNC_0(BlockDriverState *VAR_0, AioContext *VAR_1)
{
bdrv_drain(VAR_0);
bdrv_detach_aio_context(VAR_0);
aio_context_acquire(VAR_1);
bdrv_attach_aio_context(VAR_0, VAR_1);
aio_context_release(VAR_1); | [
"void FUNC_0(BlockDriverState *VAR_0, AioContext *VAR_1)\n{",
"bdrv_drain(VAR_0);",
"bdrv_detach_aio_context(VAR_0);",
"aio_context_acquire(VAR_1);",
"bdrv_attach_aio_context(VAR_0, VAR_1);",
"aio_context_release(VAR_1);"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
8
],
[
9
],
[
10
]
] |
7,133 | static uint32_t fdctrl_read_data(FDCtrl *fdctrl)
{
FDrive *cur_drv;
uint32_t retval = 0;
int pos;
cur_drv = get_cur_drv(fdctrl);
fdctrl->dsr &= ~FD_DSR_PWRDOWN;
if (!(fdctrl->msr & FD_MSR_RQM) || !(fdctrl->msr & FD_MSR_DIO)) {
FLOPPY_DPRINTF("error: controller not ready for rea... | true | qemu | e907746266721f305d67bc0718795fedee2e824c | static uint32_t fdctrl_read_data(FDCtrl *fdctrl)
{
FDrive *cur_drv;
uint32_t retval = 0;
int pos;
cur_drv = get_cur_drv(fdctrl);
fdctrl->dsr &= ~FD_DSR_PWRDOWN;
if (!(fdctrl->msr & FD_MSR_RQM) || !(fdctrl->msr & FD_MSR_DIO)) {
FLOPPY_DPRINTF("error: controller not ready for rea... | {
"code": [
" int pos;",
" pos %= FD_SECTOR_LEN;",
" int pos;"
],
"line_no": [
9,
29,
9
]
} | static uint32_t FUNC_0(FDCtrl *fdctrl)
{
FDrive *cur_drv;
uint32_t retval = 0;
int VAR_0;
cur_drv = get_cur_drv(fdctrl);
fdctrl->dsr &= ~FD_DSR_PWRDOWN;
if (!(fdctrl->msr & FD_MSR_RQM) || !(fdctrl->msr & FD_MSR_DIO)) {
FLOPPY_DPRINTF("error: controller not ready for reading\n")... | [
"static uint32_t FUNC_0(FDCtrl *fdctrl)\n{",
"FDrive *cur_drv;",
"uint32_t retval = 0;",
"int VAR_0;",
"cur_drv = get_cur_drv(fdctrl);",
"fdctrl->dsr &= ~FD_DSR_PWRDOWN;",
"if (!(fdctrl->msr & FD_MSR_RQM) || !(fdctrl->msr & FD_MSR_DIO)) {",
"FLOPPY_DPRINTF(\"error: controller not ready for reading\\n\... | [
0,
0,
0,
1,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
37,
39
],
[
41
],
[
43
],
[
45,... |
7,134 | static int decode_residuals(FLACContext *s, int channel, int pred_order)
{
int i, tmp, partition, method_type, rice_order;
int sample = 0, samples;
method_type = get_bits(&s->gb, 2);
if (method_type != 0){
av_log(s->avctx, AV_LOG_DEBUG, "illegal residual coding method %d\n", method_type)... | true | FFmpeg | 5484dad7f6122a4d4dbc28e867a8c71d22ba2297 | static int decode_residuals(FLACContext *s, int channel, int pred_order)
{
int i, tmp, partition, method_type, rice_order;
int sample = 0, samples;
method_type = get_bits(&s->gb, 2);
if (method_type != 0){
av_log(s->avctx, AV_LOG_DEBUG, "illegal residual coding method %d\n", method_type)... | {
"code": [],
"line_no": []
} | static int FUNC_0(FLACContext *VAR_0, int VAR_1, int VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;
int VAR_8 = 0, VAR_9;
VAR_6 = get_bits(&VAR_0->gb, 2);
if (VAR_6 != 0){
av_log(VAR_0->avctx, AV_LOG_DEBUG, "illegal residual coding method %d\n", VAR_6);
VAR_7 = get_bits(&VAR_0-... | [
"static int FUNC_0(FLACContext *VAR_0, int VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;",
"int VAR_8 = 0, VAR_9;",
"VAR_6 = get_bits(&VAR_0->gb, 2);",
"if (VAR_6 != 0){",
"av_log(VAR_0->avctx, AV_LOG_DEBUG, \"illegal residual coding method %d\\n\", VAR_6);",
"VAR_7 = get_bits(&VAR_0->g... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
21
],
[
25
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
56,
58
],
... |
7,135 | static void qemu_tcg_init_cpu_signals(void)
{
#ifdef CONFIG_IOTHREAD
sigset_t set;
struct sigaction sigact;
memset(&sigact, 0, sizeof(sigact));
sigact.sa_handler = cpu_signal;
sigaction(SIG_IPI, &sigact, NULL);
sigemptyset(&set);
sigaddset(&set, SIG_IPI);
pthread_sigmask(SI... | true | qemu | 12d4536f7d911b6d87a766ad7300482ea663cea2 | static void qemu_tcg_init_cpu_signals(void)
{
#ifdef CONFIG_IOTHREAD
sigset_t set;
struct sigaction sigact;
memset(&sigact, 0, sizeof(sigact));
sigact.sa_handler = cpu_signal;
sigaction(SIG_IPI, &sigact, NULL);
sigemptyset(&set);
sigaddset(&set, SIG_IPI);
pthread_sigmask(SI... | {
"code": [
"#ifdef CONFIG_IOTHREAD",
"#endif",
"#ifdef CONFIG_IOTHREAD",
"#endif",
"#endif",
"#ifdef CONFIG_IOTHREAD",
" sigemptyset(&set);",
"#endif",
"#ifdef CONFIG_IOTHREAD",
" sigemptyset(&set);",
" sigaddset(&set, SIG_IPI);",
"#endif",
"#ifdef CONFIG_... | static void FUNC_0(void)
{
#ifdef CONFIG_IOTHREAD
sigset_t set;
struct sigaction sigact;
memset(&sigact, 0, sizeof(sigact));
sigact.sa_handler = cpu_signal;
sigaction(SIG_IPI, &sigact, NULL);
sigemptyset(&set);
sigaddset(&set, SIG_IPI);
pthread_sigmask(SIG_UNBLOCK, &set, NU... | [
"static void FUNC_0(void)\n{",
"#ifdef CONFIG_IOTHREAD\nsigset_t set;",
"struct sigaction sigact;",
"memset(&sigact, 0, sizeof(sigact));",
"sigact.sa_handler = cpu_signal;",
"sigaction(SIG_IPI, &sigact, NULL);",
"sigemptyset(&set);",
"sigaddset(&set, SIG_IPI);",
"pthread_sigmask(SIG_UNBLOCK, &set, N... | [
0,
1,
0,
0,
0,
0,
1,
1,
0,
1
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27,
29
]
] |
7,136 | static void test_aio_external_client(void)
{
int i, j;
for (i = 1; i < 3; i++) {
EventNotifierTestData data = { .n = 0, .active = 10, .auto_set = true };
event_notifier_init(&data.e, false);
aio_set_event_notifier(ctx, &data.e, true, event_ready_cb);
event_notifier_set(&... | true | qemu | 7595ed743914b9de1d146213dedc1e007283f723 | static void test_aio_external_client(void)
{
int i, j;
for (i = 1; i < 3; i++) {
EventNotifierTestData data = { .n = 0, .active = 10, .auto_set = true };
event_notifier_init(&data.e, false);
aio_set_event_notifier(ctx, &data.e, true, event_ready_cb);
event_notifier_set(&... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
int VAR_0, VAR_1;
for (VAR_0 = 1; VAR_0 < 3; VAR_0++) {
EventNotifierTestData data = { .n = 0, .active = 10, .auto_set = true };
event_notifier_init(&data.e, false);
aio_set_event_notifier(ctx, &data.e, true, event_ready_cb);
event_notifier_set... | [
"static void FUNC_0(void)\n{",
"int VAR_0, VAR_1;",
"for (VAR_0 = 1; VAR_0 < 3; VAR_0++) {",
"EventNotifierTestData data = { .n = 0, .active = 10, .auto_set = true };",
"event_notifier_init(&data.e, false);",
"aio_set_event_notifier(ctx, &data.e, true, event_ready_cb);",
"event_notifier_set(&data.e);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
40
],
[
42
],
[
44... |
7,137 | static QemuConsole *new_console(DisplayState *ds, console_type_t console_type)
{
Error *local_err = NULL;
Object *obj;
QemuConsole *s;
int i;
if (nb_consoles >= MAX_CONSOLES)
return NULL;
obj = object_new(TYPE_QEMU_CONSOLE);
s = QEMU_CONSOLE(obj);
object_property_ad... | true | qemu | afff2b15e89ac81c113f2ebfd729aaa02b40edb6 | static QemuConsole *new_console(DisplayState *ds, console_type_t console_type)
{
Error *local_err = NULL;
Object *obj;
QemuConsole *s;
int i;
if (nb_consoles >= MAX_CONSOLES)
return NULL;
obj = object_new(TYPE_QEMU_CONSOLE);
s = QEMU_CONSOLE(obj);
object_property_ad... | {
"code": [
"static QemuConsole *new_console(DisplayState *ds, console_type_t console_type)",
" Error *local_err = NULL;",
" &local_err);",
" &s->head, &local_err);",
" Error *local_err = NULL;",
" Error *local_err = NULL;"... | static QemuConsole *FUNC_0(DisplayState *ds, console_type_t console_type)
{
Error *local_err = NULL;
Object *obj;
QemuConsole *s;
int VAR_0;
if (nb_consoles >= MAX_CONSOLES)
return NULL;
obj = object_new(TYPE_QEMU_CONSOLE);
s = QEMU_CONSOLE(obj);
object_property_add... | [
"static QemuConsole *FUNC_0(DisplayState *ds, console_type_t console_type)\n{",
"Error *local_err = NULL;",
"Object *obj;",
"QemuConsole *s;",
"int VAR_0;",
"if (nb_consoles >= MAX_CONSOLES)\nreturn NULL;",
"obj = object_new(TYPE_QEMU_CONSOLE);",
"s = QEMU_CONSOLE(obj);",
"object_property_add_link(o... | [
1,
1,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
21
],
[
23
],
[
25,
27,
29,
31,
33
],
[
35,
37
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[... |
7,140 | static void result_to_network(RDMARegisterResult *result)
{
result->rkey = htonl(result->rkey);
result->host_addr = htonll(result->host_addr);
};
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static void result_to_network(RDMARegisterResult *result)
{
result->rkey = htonl(result->rkey);
result->host_addr = htonll(result->host_addr);
};
| {
"code": [],
"line_no": []
} | static void FUNC_0(RDMARegisterResult *VAR_0)
{
VAR_0->rkey = htonl(VAR_0->rkey);
VAR_0->host_addr = htonll(VAR_0->host_addr);
};
| [
"static void FUNC_0(RDMARegisterResult *VAR_0)\n{",
"VAR_0->rkey = htonl(VAR_0->rkey);",
"VAR_0->host_addr = htonll(VAR_0->host_addr);",
"};"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
7,141 | static int nprobe(AVFormatContext *s, uint8_t *enc_header, int size,
const uint8_t *n_val)
{
OMAContext *oc = s->priv_data;
uint32_t pos, taglen, datalen;
struct AVDES av_des;
if (!enc_header || !n_val)
return -1;
pos = OMA_ENC_HEADER_SIZE + oc->k_size;
if ... | true | FFmpeg | 9d0b45ade864f3d2ccd8610149fe1fff53c4e937 | static int nprobe(AVFormatContext *s, uint8_t *enc_header, int size,
const uint8_t *n_val)
{
OMAContext *oc = s->priv_data;
uint32_t pos, taglen, datalen;
struct AVDES av_des;
if (!enc_header || !n_val)
return -1;
pos = OMA_ENC_HEADER_SIZE + oc->k_size;
if ... | {
"code": [
"static int nprobe(AVFormatContext *s, uint8_t *enc_header, int size,",
" uint32_t pos, taglen, datalen;",
" if (!enc_header || !n_val)",
" if (taglen + (((uint64_t)datalen) << 4) + 44 > size)",
" return -1;",
" if (!rprobe(s, enc_header, oc->r_val))"
],
... | static int FUNC_0(AVFormatContext *VAR_0, uint8_t *VAR_1, int VAR_2,
const uint8_t *VAR_3)
{
OMAContext *oc = VAR_0->priv_data;
uint32_t pos, taglen, datalen;
struct AVDES VAR_4;
if (!VAR_1 || !VAR_3)
return -1;
pos = OMA_ENC_HEADER_SIZE + oc->k_size;
if (!... | [
"static int FUNC_0(AVFormatContext *VAR_0, uint8_t *VAR_1, int VAR_2,\nconst uint8_t *VAR_3)\n{",
"OMAContext *oc = VAR_0->priv_data;",
"uint32_t pos, taglen, datalen;",
"struct AVDES VAR_4;",
"if (!VAR_1 || !VAR_3)\nreturn -1;",
"pos = OMA_ENC_HEADER_SIZE + oc->k_size;",
"if (!memcmp(&VAR_1[pos], \"EKB... | [
1,
0,
1,
0,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
21
],
[
23,
25
],
[
29,
31
],
[
35
],
[
37
],
[
41,
43
],
[
47
],
[
51
],
[
53
],
[
55
],
[
57
],
[
59,
61
... |
7,142 | static AVFrame *do_vmaf(AVFilterContext *ctx, AVFrame *main, const AVFrame *ref)
{
LIBVMAFContext *s = ctx->priv;
pthread_mutex_lock(&s->lock);
while (s->frame_set != 0) {
pthread_cond_wait(&s->cond, &s->lock);
}
av_frame_ref(s->gref, ref);
av_frame_ref(s->gmain, main);
... | true | FFmpeg | a8ab52fae7286d4e7eec9256a08b6ad0b1e39d6c | static AVFrame *do_vmaf(AVFilterContext *ctx, AVFrame *main, const AVFrame *ref)
{
LIBVMAFContext *s = ctx->priv;
pthread_mutex_lock(&s->lock);
while (s->frame_set != 0) {
pthread_cond_wait(&s->cond, &s->lock);
}
av_frame_ref(s->gref, ref);
av_frame_ref(s->gmain, main);
... | {
"code": [
"static AVFrame *do_vmaf(AVFilterContext *ctx, AVFrame *main, const AVFrame *ref)",
" return main;"
],
"line_no": [
1,
37
]
} | static AVFrame *FUNC_0(AVFilterContext *ctx, AVFrame *main, const AVFrame *ref)
{
LIBVMAFContext *s = ctx->priv;
pthread_mutex_lock(&s->lock);
while (s->frame_set != 0) {
pthread_cond_wait(&s->cond, &s->lock);
}
av_frame_ref(s->gref, ref);
av_frame_ref(s->gmain, main);
... | [
"static AVFrame *FUNC_0(AVFilterContext *ctx, AVFrame *main, const AVFrame *ref)\n{",
"LIBVMAFContext *s = ctx->priv;",
"pthread_mutex_lock(&s->lock);",
"while (s->frame_set != 0) {",
"pthread_cond_wait(&s->cond, &s->lock);",
"}",
"av_frame_ref(s->gref, ref);",
"av_frame_ref(s->gmain, main);",
"s->f... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39
]
] |
7,143 | int ff_audio_interleave_init(AVFormatContext *s,
const int *samples_per_frame,
AVRational time_base)
{
int i;
if (!samples_per_frame)
return -1;
if (!time_base.num) {
av_log(s, AV_LOG_ERROR, "timebase not set for audio int... | true | FFmpeg | 2ed9e17ed1793b3b66ed27c0a113676a46eb9871 | int ff_audio_interleave_init(AVFormatContext *s,
const int *samples_per_frame,
AVRational time_base)
{
int i;
if (!samples_per_frame)
return -1;
if (!time_base.num) {
av_log(s, AV_LOG_ERROR, "timebase not set for audio int... | {
"code": [
" aic->fifo= av_fifo_alloc_array(100, *aic->samples);"
],
"line_no": [
59
]
} | int FUNC_0(AVFormatContext *VAR_0,
const int *VAR_1,
AVRational VAR_2)
{
int VAR_3;
if (!VAR_1)
return -1;
if (!VAR_2.num) {
av_log(VAR_0, AV_LOG_ERROR, "timebase not set for audio interleave\n");
return -1;
... | [
"int FUNC_0(AVFormatContext *VAR_0,\nconst int *VAR_1,\nAVRational VAR_2)\n{",
"int VAR_3;",
"if (!VAR_1)\nreturn -1;",
"if (!VAR_2.num) {",
"av_log(VAR_0, AV_LOG_ERROR, \"timebase not set for audio interleave\\n\");",
"return -1;",
"}",
"for (VAR_3 = 0; VAR_3 < VAR_0->nb_streams; VAR_3++) {",
"AVSt... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13,
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
7,144 | static int local_mkdir(FsContext *fs_ctx, V9fsPath *dir_path,
const char *name, FsCred *credp)
{
char *path;
int err = -1;
int serrno = 0;
V9fsString fullname;
char *buffer = NULL;
v9fs_string_init(&fullname);
v9fs_string_sprintf(&fullname, "%s/%s", dir_path... | true | qemu | 3f3a16990b09e62d787bd2eb2dd51aafbe90019a | static int local_mkdir(FsContext *fs_ctx, V9fsPath *dir_path,
const char *name, FsCred *credp)
{
char *path;
int err = -1;
int serrno = 0;
V9fsString fullname;
char *buffer = NULL;
v9fs_string_init(&fullname);
v9fs_string_sprintf(&fullname, "%s/%s", dir_path... | {
"code": [
" char *path;",
" int serrno = 0;",
" V9fsString fullname;",
" char *buffer = NULL;",
" v9fs_string_init(&fullname);",
" v9fs_string_sprintf(&fullname, \"%s/%s\", dir_path->data, name);",
" path = fullname.data;",
" if (fs_ctx->export_flags & V9FS_SM... | static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,
const char *VAR_2, FsCred *VAR_3)
{
char *VAR_4;
int VAR_5 = -1;
int VAR_6 = 0;
V9fsString fullname;
char *VAR_7 = NULL;
v9fs_string_init(&fullname);
v9fs_string_sprintf(&fullname, "%s/%s", VAR_1->data, VA... | [
"static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,\nconst char *VAR_2, FsCred *VAR_3)\n{",
"char *VAR_4;",
"int VAR_5 = -1;",
"int VAR_6 = 0;",
"V9fsString fullname;",
"char *VAR_7 = NULL;",
"v9fs_string_init(&fullname);",
"v9fs_string_sprintf(&fullname, \"%s/%s\", VAR_1->data, VAR_2);",
"VAR_4 =... | [
0,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
0,
1,
1,
0,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
1,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
7,145 | static void fd_revalidate(FDrive *drv)
{
int rc;
FLOPPY_DPRINTF("revalidate\n");
if (drv->blk != NULL) {
drv->ro = blk_is_read_only(drv->blk);
if (!blk_is_inserted(drv->blk)) {
FLOPPY_DPRINTF("No disk in drive\n");
drv->disk = FLOPPY_DRIVE_TYPE_NONE;
... | true | qemu | fd9bdbd3459e5b9d51534f0747049bc5b6145e07 | static void fd_revalidate(FDrive *drv)
{
int rc;
FLOPPY_DPRINTF("revalidate\n");
if (drv->blk != NULL) {
drv->ro = blk_is_read_only(drv->blk);
if (!blk_is_inserted(drv->blk)) {
FLOPPY_DPRINTF("No disk in drive\n");
drv->disk = FLOPPY_DRIVE_TYPE_NONE;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(FDrive *VAR_0)
{
int VAR_1;
FLOPPY_DPRINTF("revalidate\n");
if (VAR_0->blk != NULL) {
VAR_0->ro = blk_is_read_only(VAR_0->blk);
if (!blk_is_inserted(VAR_0->blk)) {
FLOPPY_DPRINTF("No disk in drive\n");
VAR_0->disk = FLOPPY_DRIVE_TYPE_NONE;... | [
"static void FUNC_0(FDrive *VAR_0)\n{",
"int VAR_1;",
"FLOPPY_DPRINTF(\"revalidate\\n\");",
"if (VAR_0->blk != NULL) {",
"VAR_0->ro = blk_is_read_only(VAR_0->blk);",
"if (!blk_is_inserted(VAR_0->blk)) {",
"FLOPPY_DPRINTF(\"No disk in drive\\n\");",
"VAR_0->disk = FLOPPY_DRIVE_TYPE_NONE;",
"} else if... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
22
],
[
24
],
[
26
],
[
28
],
[
30
],
[
32
],
[
34,
36,
38,
40
],
[
42
],
[
44
],
[
46
],
... |
7,146 | static coroutine_fn void reconnect_to_sdog(void *opaque)
{
Error *local_err = NULL;
BDRVSheepdogState *s = opaque;
AIOReq *aio_req, *next;
aio_set_fd_handler(s->aio_context, s->fd, NULL, NULL, NULL);
close(s->fd);
s->fd = -1;
/* Wait for outstanding write requests to be completed... | true | qemu | a780dea0454d2820e31407c33f167acf00fe447d | static coroutine_fn void reconnect_to_sdog(void *opaque)
{
Error *local_err = NULL;
BDRVSheepdogState *s = opaque;
AIOReq *aio_req, *next;
aio_set_fd_handler(s->aio_context, s->fd, NULL, NULL, NULL);
close(s->fd);
s->fd = -1;
while (s->co_send != NULL) {
co_write_r... | {
"code": [
" Error *local_err = NULL;"
],
"line_no": [
5
]
} | static coroutine_fn void FUNC_0(void *opaque)
{
Error *local_err = NULL;
BDRVSheepdogState *s = opaque;
AIOReq *aio_req, *next;
aio_set_fd_handler(s->aio_context, s->fd, NULL, NULL, NULL);
close(s->fd);
s->fd = -1;
while (s->co_send != NULL) {
co_write_request(opaq... | [
"static coroutine_fn void FUNC_0(void *opaque)\n{",
"Error *local_err = NULL;",
"BDRVSheepdogState *s = opaque;",
"AIOReq *aio_req, *next;",
"aio_set_fd_handler(s->aio_context, s->fd, NULL, NULL, NULL);",
"close(s->fd);",
"s->fd = -1;",
"while (s->co_send != NULL) {",
"co_write_request(opaque);",
... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[... |
7,147 | static void set_frame_distances(MpegEncContext * s){
assert(s->current_picture_ptr->f.pts != AV_NOPTS_VALUE);
s->time = s->current_picture_ptr->f.pts * s->avctx->time_base.num;
if(s->pict_type==AV_PICTURE_TYPE_B){
s->pb_time= s->pp_time - (s->last_non_b_time - s->time);
assert(s->pb_t... | true | FFmpeg | f6774f905fb3cfdc319523ac640be30b14c1bc55 | static void set_frame_distances(MpegEncContext * s){
assert(s->current_picture_ptr->f.pts != AV_NOPTS_VALUE);
s->time = s->current_picture_ptr->f.pts * s->avctx->time_base.num;
if(s->pict_type==AV_PICTURE_TYPE_B){
s->pb_time= s->pp_time - (s->last_non_b_time - s->time);
assert(s->pb_t... | {
"code": [
" assert(s->current_picture_ptr->f.pts != AV_NOPTS_VALUE);",
" s->time = s->current_picture_ptr->f.pts * s->avctx->time_base.num;"
],
"line_no": [
3,
5
]
} | static void FUNC_0(MpegEncContext * VAR_0){
assert(VAR_0->current_picture_ptr->f.pts != AV_NOPTS_VALUE);
VAR_0->time = VAR_0->current_picture_ptr->f.pts * VAR_0->avctx->time_base.num;
if(VAR_0->pict_type==AV_PICTURE_TYPE_B){
VAR_0->pb_time= VAR_0->pp_time - (VAR_0->last_non_b_time - VAR_0->tim... | [
"static void FUNC_0(MpegEncContext * VAR_0){",
"assert(VAR_0->current_picture_ptr->f.pts != AV_NOPTS_VALUE);",
"VAR_0->time = VAR_0->current_picture_ptr->f.pts * VAR_0->avctx->time_base.num;",
"if(VAR_0->pict_type==AV_PICTURE_TYPE_B){",
"VAR_0->pb_time= VAR_0->pp_time - (VAR_0->last_non_b_time - VAR_0->time... | [
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
7,148 | static void load_tc(QEMUFile *f, TCState *tc)
{
int i;
/* Save active TC */
for(i = 0; i < 32; i++)
qemu_get_betls(f, &tc->gpr[i]);
qemu_get_betls(f, &tc->PC);
for(i = 0; i < MIPS_DSP_ACC; i++)
qemu_get_betls(f, &tc->HI[i]);
for(i = 0; i < MIPS_DSP_ACC; i++)
q... | true | qemu | d279279e2b5cd40dbcc863fb66a695990f304077 | static void load_tc(QEMUFile *f, TCState *tc)
{
int i;
for(i = 0; i < 32; i++)
qemu_get_betls(f, &tc->gpr[i]);
qemu_get_betls(f, &tc->PC);
for(i = 0; i < MIPS_DSP_ACC; i++)
qemu_get_betls(f, &tc->HI[i]);
for(i = 0; i < MIPS_DSP_ACC; i++)
qemu_get_betls(f, &tc... | {
"code": [
"static void load_tc(QEMUFile *f, TCState *tc)"
],
"line_no": [
1
]
} | static void FUNC_0(QEMUFile *VAR_0, TCState *VAR_1)
{
int VAR_2;
for(VAR_2 = 0; VAR_2 < 32; VAR_2++)
qemu_get_betls(VAR_0, &VAR_1->gpr[VAR_2]);
qemu_get_betls(VAR_0, &VAR_1->PC);
for(VAR_2 = 0; VAR_2 < MIPS_DSP_ACC; VAR_2++)
qemu_get_betls(VAR_0, &VAR_1->HI[VAR_2]);
f... | [
"static void FUNC_0(QEMUFile *VAR_0, TCState *VAR_1)\n{",
"int VAR_2;",
"for(VAR_2 = 0; VAR_2 < 32; VAR_2++)",
"qemu_get_betls(VAR_0, &VAR_1->gpr[VAR_2]);",
"qemu_get_betls(VAR_0, &VAR_1->PC);",
"for(VAR_2 = 0; VAR_2 < MIPS_DSP_ACC; VAR_2++)",
"qemu_get_betls(VAR_0, &VAR_1->HI[VAR_2]);",
"for(VAR_2 = ... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
4... |
7,149 | static inline void RENAME(rgb16to24)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *end;
#ifdef HAVE_MMX
const uint16_t *mm_end;
#endif
uint8_t *d = (uint8_t *)dst;
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*s... | true | FFmpeg | 6e42e6c4b410dbef8b593c2d796a5dad95f89ee4 | static inline void RENAME(rgb16to24)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *end;
#ifdef HAVE_MMX
const uint16_t *mm_end;
#endif
uint8_t *d = (uint8_t *)dst;
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*s... | {
"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;",
"\... | static inline void FUNC_0(rgb16to24)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *VAR_0;
#ifdef HAVE_MMX
const uint16_t *mm_end;
#endif
uint8_t *d = (uint8_t *)dst;
const uint16_t *VAR_1 = (const uint16_t *)src;
VAR_0 = VAR_1 + src_size/2;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH"... | [
"static inline void FUNC_0(rgb16to24)(const uint8_t *src, uint8_t *dst, long src_size)\n{",
"const uint16_t *VAR_0;",
"#ifdef HAVE_MMX\nconst uint16_t *mm_end;",
"#endif\nuint8_t *d = (uint8_t *)dst;",
"const uint16_t *VAR_1 = (const uint16_t *)src;",
"VAR_0 = VAR_1 + src_size/2;",
"#ifdef HAVE_MMX\n__a... | [
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
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,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,
61,... |
7,151 | int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx,
HEVCParamSets *ps)
{
HEVCSPS *sps = NULL;
int i, ret = 0;
unsigned int pps_id = 0;
ptrdiff_t nal_size;
AVBufferRef *pps_buf;
HEVCPPS *pps = av_mallocz(sizeof(*pps));
if (!pps)
... | true | FFmpeg | 74c1c22d7f0d25f527ed2ebf62493be5ad52c972 | int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx,
HEVCParamSets *ps)
{
HEVCSPS *sps = NULL;
int i, ret = 0;
unsigned int pps_id = 0;
ptrdiff_t nal_size;
AVBufferRef *pps_buf;
HEVCPPS *pps = av_mallocz(sizeof(*pps));
if (!pps)
... | {
"code": [
" pps->log2_parallel_merge_level = get_ue_golomb_long(gb) + 2;",
" if (pps->log2_parallel_merge_level > sps->log2_ctb_size) {",
" pps->log2_parallel_merge_level - 2);"
],
"line_no": [
409,
411,
415
]
} | int FUNC_0(GetBitContext *VAR_0, AVCodecContext *VAR_1,
HEVCParamSets *VAR_2)
{
HEVCSPS *sps = NULL;
int VAR_3, VAR_4 = 0;
unsigned int VAR_5 = 0;
ptrdiff_t nal_size;
AVBufferRef *pps_buf;
HEVCPPS *pps = av_mallocz(sizeof(*pps));
if (!pps)
... | [
"int FUNC_0(GetBitContext *VAR_0, AVCodecContext *VAR_1,\nHEVCParamSets *VAR_2)\n{",
"HEVCSPS *sps = NULL;",
"int VAR_3, VAR_4 = 0;",
"unsigned int VAR_5 = 0;",
"ptrdiff_t nal_size;",
"AVBufferRef *pps_buf;",
"HEVCPPS *pps = av_mallocz(sizeof(*pps));",
"if (!pps)\nreturn AVERROR(ENOMEM);",
"pps... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
25
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49
],
[
51,
53,
55
],
[... |
7,153 | static inline int onenand_erase(OneNANDState *s, int sec, int num)
{
uint8_t *blankbuf, *tmpbuf;
blankbuf = g_malloc(512);
tmpbuf = g_malloc(512);
memset(blankbuf, 0xff, 512);
for (; num > 0; num--, sec++) {
if (s->blk_cur) {
int erasesec = s->secs_cur + (sec >> 5);
... | true | qemu | 441692ddd8321d5e0f09b163e86410e578d87236 | static inline int onenand_erase(OneNANDState *s, int sec, int num)
{
uint8_t *blankbuf, *tmpbuf;
blankbuf = g_malloc(512);
tmpbuf = g_malloc(512);
memset(blankbuf, 0xff, 512);
for (; num > 0; num--, sec++) {
if (s->blk_cur) {
int erasesec = s->secs_cur + (sec >> 5);
... | {
"code": [
" if (blk_write(s->blk_cur, sec, blankbuf, 1) < 0) {",
" if (blk_read(s->blk_cur, erasesec, tmpbuf, 1) < 0) {",
" if (blk_write(s->blk_cur, erasesec, tmpbuf, 1) < 0) {"
],
"line_no": [
21,
27,
35
]
} | static inline int FUNC_0(OneNANDState *VAR_0, int VAR_1, int VAR_2)
{
uint8_t *blankbuf, *tmpbuf;
blankbuf = g_malloc(512);
tmpbuf = g_malloc(512);
memset(blankbuf, 0xff, 512);
for (; VAR_2 > 0; VAR_2--, VAR_1++) {
if (VAR_0->blk_cur) {
int VAR_3 = VAR_0->secs_cur + (VA... | [
"static inline int FUNC_0(OneNANDState *VAR_0, int VAR_1, int VAR_2)\n{",
"uint8_t *blankbuf, *tmpbuf;",
"blankbuf = g_malloc(512);",
"tmpbuf = g_malloc(512);",
"memset(blankbuf, 0xff, 512);",
"for (; VAR_2 > 0; VAR_2--, VAR_1++) {",
"if (VAR_0->blk_cur) {",
"int VAR_3 = VAR_0->secs_cur + (VAR_1 >> 5)... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43... |
7,154 | static av_cold int cinepak_encode_init(AVCodecContext *avctx)
{
CinepakEncContext *s = avctx->priv_data;
int x, mb_count, strip_buf_size, frame_buf_size;
if (avctx->width & 3 || avctx->height & 3) {
av_log(avctx, AV_LOG_ERROR, "width and height must be multiples of four (got %ix%i)\n",
... | true | FFmpeg | 7da9f4523159670d577a2808d4481e64008a8894 | static av_cold int cinepak_encode_init(AVCodecContext *avctx)
{
CinepakEncContext *s = avctx->priv_data;
int x, mb_count, strip_buf_size, frame_buf_size;
if (avctx->width & 3 || avctx->height & 3) {
av_log(avctx, AV_LOG_ERROR, "width and height must be multiples of four (got %ix%i)\n",
... | {
"code": [
"#endif",
" if (!(s->codebook_input = av_malloc(sizeof(int) * (avctx->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4) * (avctx->width * avctx->height) >> 2)))",
" for(x = 0; x < 3; x++)",
" if(!(s->pict_bufs[x] = av_malloc((avctx->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4) * (avctx->width ... | static av_cold int FUNC_0(AVCodecContext *avctx)
{
CinepakEncContext *s = avctx->priv_data;
int VAR_0, VAR_1, VAR_2, VAR_3;
if (avctx->width & 3 || avctx->height & 3) {
av_log(avctx, AV_LOG_ERROR, "width and height must be multiples of four (got %ix%i)\n",
avctx->width, avctx... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"CinepakEncContext *s = avctx->priv_data;",
"int VAR_0, VAR_1, VAR_2, VAR_3;",
"if (avctx->width & 3 || avctx->height & 3) {",
"av_log(avctx, AV_LOG_ERROR, \"width and height must be multiples of four (got %ix%i)\\n\",\navctx->width, avctx->height);",
... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
1,
0,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
1,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
23,
25
],
[
29,
31
],
[
35
],
[
37,
39
],
[
43
],
[
49
],
[
53
],
[
57,
59
],
[
63,
65
],
[
69... |
7,155 | static int count_contiguous_clusters(int nb_clusters, int cluster_size,
uint64_t *l2_table, uint64_t stop_flags)
{
int i;
uint64_t mask = stop_flags | L2E_OFFSET_MASK | QCOW_OFLAG_COMPRESSED;
uint64_t first_entry = be64_to_cpu(l2_table[0]);
uint64_t offset = first_entry & mask;
if (... | true | qemu | a99dfb45f26bface6830ee5465e57bcdbc53c6c8 | static int count_contiguous_clusters(int nb_clusters, int cluster_size,
uint64_t *l2_table, uint64_t stop_flags)
{
int i;
uint64_t mask = stop_flags | L2E_OFFSET_MASK | QCOW_OFLAG_COMPRESSED;
uint64_t first_entry = be64_to_cpu(l2_table[0]);
uint64_t offset = first_entry & mask;
if (... | {
"code": [
" assert(qcow2_get_cluster_type(first_entry) != QCOW2_CLUSTER_COMPRESSED);"
],
"line_no": [
23
]
} | static int FUNC_0(int VAR_0, int VAR_1,
uint64_t *VAR_2, uint64_t VAR_3)
{
int VAR_4;
uint64_t mask = VAR_3 | L2E_OFFSET_MASK | QCOW_OFLAG_COMPRESSED;
uint64_t first_entry = be64_to_cpu(VAR_2[0]);
uint64_t offset = first_entry & mask;
if (!offset)
return 0;
assert(qc... | [
"static int FUNC_0(int VAR_0, int VAR_1,\nuint64_t *VAR_2, uint64_t VAR_3)\n{",
"int VAR_4;",
"uint64_t mask = VAR_3 | L2E_OFFSET_MASK | QCOW_OFLAG_COMPRESSED;",
"uint64_t first_entry = be64_to_cpu(VAR_2[0]);",
"uint64_t offset = first_entry & mask;",
"if (!offset)\nreturn 0;",
"assert(qcow2_get_cluster... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
]
] |
7,156 | static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon,
const char *devaddr,
const char *opts_str)
{
Error *local_err = NULL;
QemuOpts *opts;
PCIBus *root = pci_find_primary_bus();
PCIBus *bus;
int ret, devfn;
... | true | qemu | f51074cdc6e750daa3b6df727d83449a7e42b391 | static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon,
const char *devaddr,
const char *opts_str)
{
Error *local_err = NULL;
QemuOpts *opts;
PCIBus *root = pci_find_primary_bus();
PCIBus *bus;
int ret, devfn;
... | {
"code": [
"static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon,",
" const char *devaddr,",
" const char *opts_str)",
" Error *local_err = NULL;",
" QemuOpts *opts;",
" PCIBus *root = pci_find_primary_bus();"... | static PCIDevice *FUNC_0(Monitor *mon,
const char *devaddr,
const char *opts_str)
{
Error *local_err = NULL;
QemuOpts *opts;
PCIBus *root = pci_find_primary_bus();
PCIBus *bus;
int VAR_0, VAR_1;
if (!root) {... | [
"static PCIDevice *FUNC_0(Monitor *mon,\nconst char *devaddr,\nconst char *opts_str)\n{",
"Error *local_err = NULL;",
"QemuOpts *opts;",
"PCIBus *root = pci_find_primary_bus();",
"PCIBus *bus;",
"int VAR_0, VAR_1;",
"if (!root) {",
"monitor_printf(mon, \"no primary PCI bus (if there are multiple\"\n\"... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
0,
0,
1,
1,
0,
0,
1,
1,
0,
0,
1,
1,
1,
1,
1,
0,
0,
1,
1,
0,
0,
1,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
7,158 | void rdma_start_outgoing_migration(void *opaque,
const char *host_port, Error **errp)
{
MigrationState *s = opaque;
Error *local_err = NULL, **temp = &local_err;
RDMAContext *rdma = qemu_rdma_data_init(host_port, &local_err);
int ret = 0;
if (rdma == NULL) {
... | true | qemu | d59ce6f34434bf47a9b26138c908650bf9a24be1 | void rdma_start_outgoing_migration(void *opaque,
const char *host_port, Error **errp)
{
MigrationState *s = opaque;
Error *local_err = NULL, **temp = &local_err;
RDMAContext *rdma = qemu_rdma_data_init(host_port, &local_err);
int ret = 0;
if (rdma == NULL) {
... | {
"code": [
" Error *local_err = NULL, **temp = &local_err;",
" RDMAContext *rdma = qemu_rdma_data_init(host_port, &local_err);",
" ERROR(temp, \"Failed to initialize RDMA data structures! %d\", ret);",
" ret = qemu_rdma_source_init(rdma, &local_err,",
" ret = qemu_rdma_connect(... | void FUNC_0(void *VAR_0,
const char *VAR_1, Error **VAR_2)
{
MigrationState *s = VAR_0;
Error *local_err = NULL, **temp = &local_err;
RDMAContext *rdma = qemu_rdma_data_init(VAR_1, &local_err);
int VAR_3 = 0;
if (rdma == NULL) {
ERROR(temp, "Failed to in... | [
"void FUNC_0(void *VAR_0,\nconst char *VAR_1, Error **VAR_2)\n{",
"MigrationState *s = VAR_0;",
"Error *local_err = NULL, **temp = &local_err;",
"RDMAContext *rdma = qemu_rdma_data_init(VAR_1, &local_err);",
"int VAR_3 = 0;",
"if (rdma == NULL) {",
"ERROR(temp, \"Failed to initialize RDMA data structure... | [
0,
0,
1,
1,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
55
... |
7,159 | grlib_irqmp_writel(void *opaque, target_phys_addr_t addr, uint32_t value)
{
IRQMP *irqmp = opaque;
IRQMPState *state;
assert(irqmp != NULL);
state = irqmp->state;
assert(state != NULL);
addr &= 0xff;
/* global registers */
switch (addr) {
case LEVEL_OFFSET:
... | true | qemu | b4548fcc0314f5e118ed45b5774e9cd99f9a97d3 | grlib_irqmp_writel(void *opaque, target_phys_addr_t addr, uint32_t value)
{
IRQMP *irqmp = opaque;
IRQMPState *state;
assert(irqmp != NULL);
state = irqmp->state;
assert(state != NULL);
addr &= 0xff;
switch (addr) {
case LEVEL_OFFSET:
value &= 0xFFFF <<... | {
"code": [
" trace_grlib_irqmp_unknown_register(\"write\", addr);"
],
"line_no": [
167
]
} | FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint32_t VAR_2)
{
IRQMP *irqmp = VAR_0;
IRQMPState *state;
assert(irqmp != NULL);
state = irqmp->state;
assert(state != NULL);
VAR_1 &= 0xff;
switch (VAR_1) {
case LEVEL_OFFSET:
VAR_2 &= 0xFFFF << 1;
... | [
"FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint32_t VAR_2)\n{",
"IRQMP *irqmp = VAR_0;",
"IRQMPState *state;",
"assert(irqmp != NULL);",
"state = irqmp->state;",
"assert(state != NULL);",
"VAR_1 &= 0xff;",
"switch (VAR_1) {",
"case LEVEL_OFFSET:\nVAR_2 &= 0xFFFF << 1;",
"state->level = VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
37,
41
],
[
45,
51
],
[
53
],
[
55
],
[
57
],
[
61,
63
],
[
65... |
7,160 | static void qvirtio_pci_queue_select(QVirtioDevice *d, uint16_t index)
{
QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;
qpci_io_writeb(dev->pdev, dev->addr + VIRTIO_PCI_QUEUE_SEL, index);
}
| true | qemu | b4ba67d9a702507793c2724e56f98e9b0f7be02b | static void qvirtio_pci_queue_select(QVirtioDevice *d, uint16_t index)
{
QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;
qpci_io_writeb(dev->pdev, dev->addr + VIRTIO_PCI_QUEUE_SEL, index);
}
| {
"code": [
" qpci_io_writeb(dev->pdev, dev->addr + VIRTIO_PCI_QUEUE_SEL, index);"
],
"line_no": [
7
]
} | static void FUNC_0(QVirtioDevice *VAR_0, uint16_t VAR_1)
{
QVirtioPCIDevice *dev = (QVirtioPCIDevice *)VAR_0;
qpci_io_writeb(dev->pdev, dev->addr + VIRTIO_PCI_QUEUE_SEL, VAR_1);
}
| [
"static void FUNC_0(QVirtioDevice *VAR_0, uint16_t VAR_1)\n{",
"QVirtioPCIDevice *dev = (QVirtioPCIDevice *)VAR_0;",
"qpci_io_writeb(dev->pdev, dev->addr + VIRTIO_PCI_QUEUE_SEL, VAR_1);",
"}"
] | [
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
7,161 | static int cbr_bit_allocation(AC3EncodeContext *s)
{
int ch;
int bits_left;
int snr_offset, snr_incr;
bits_left = 8 * s->frame_size - (s->frame_bits + s->exponent_bits);
snr_offset = s->coarse_snr_offset << 4;
while (snr_offset >= 0 &&
bit_alloc(s, snr_offset) > bits_lef... | false | FFmpeg | 5128842ea2057c86550b833c9141c271df1bdc94 | static int cbr_bit_allocation(AC3EncodeContext *s)
{
int ch;
int bits_left;
int snr_offset, snr_incr;
bits_left = 8 * s->frame_size - (s->frame_bits + s->exponent_bits);
snr_offset = s->coarse_snr_offset << 4;
while (snr_offset >= 0 &&
bit_alloc(s, snr_offset) > bits_lef... | {
"code": [],
"line_no": []
} | static int FUNC_0(AC3EncodeContext *VAR_0)
{
int VAR_1;
int VAR_2;
int VAR_3, VAR_4;
VAR_2 = 8 * VAR_0->frame_size - (VAR_0->frame_bits + VAR_0->exponent_bits);
VAR_3 = VAR_0->coarse_snr_offset << 4;
while (VAR_3 >= 0 &&
bit_alloc(VAR_0, VAR_3) > VAR_2) {
VAR_3 ... | [
"static int FUNC_0(AC3EncodeContext *VAR_0)\n{",
"int VAR_1;",
"int VAR_2;",
"int VAR_3, VAR_4;",
"VAR_2 = 8 * VAR_0->frame_size - (VAR_0->frame_bits + VAR_0->exponent_bits);",
"VAR_3 = VAR_0->coarse_snr_offset << 4;",
"while (VAR_3 >= 0 &&\nbit_alloc(VAR_0, VAR_3) > VAR_2) {",
"VAR_3 -= 64;",
"}",
... | [
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
],
[
21,
23
],
[
25
],
[
27
],
[
29,
31
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
7,162 | static int apng_encode_frame(AVCodecContext *avctx, const AVFrame *pict,
APNGFctlChunk *best_fctl_chunk, APNGFctlChunk *best_last_fctl_chunk)
{
PNGEncContext *s = avctx->priv_data;
int ret;
unsigned int y;
AVFrame* diffFrame;
uint8_t bpp = (s->bits_per_pixel + 7) ... | false | FFmpeg | 1490682bcb0fe359e05b85bb7198bb87be686054 | static int apng_encode_frame(AVCodecContext *avctx, const AVFrame *pict,
APNGFctlChunk *best_fctl_chunk, APNGFctlChunk *best_last_fctl_chunk)
{
PNGEncContext *s = avctx->priv_data;
int ret;
unsigned int y;
AVFrame* diffFrame;
uint8_t bpp = (s->bits_per_pixel + 7) ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, const AVFrame *VAR_1,
APNGFctlChunk *VAR_2, APNGFctlChunk *VAR_3)
{
PNGEncContext *s = VAR_0->priv_data;
int VAR_4;
unsigned int VAR_5;
AVFrame* diffFrame;
uint8_t bpp = (s->bits_per_pixel + 7) >> 3;
uint8_t *original_... | [
"static int FUNC_0(AVCodecContext *VAR_0, const AVFrame *VAR_1,\nAPNGFctlChunk *VAR_2, APNGFctlChunk *VAR_3)\n{",
"PNGEncContext *s = VAR_0->priv_data;",
"int VAR_4;",
"unsigned int VAR_5;",
"AVFrame* diffFrame;",
"uint8_t bpp = (s->bits_per_pixel + 7) >> 3;",
"uint8_t *original_bytestream, *original_by... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
7,163 | static inline void transpose4x4(uint8_t *dst, uint8_t *src, x86_reg dst_stride, x86_reg src_stride){
__asm__ volatile( //FIXME could save 1 instruction if done as 8x4 ...
"movd (%1), %%mm0 \n\t"
"add %3, %1 \n\t"
"movd (%1), %%mm1 \n\t"
... | false | FFmpeg | 659d4ba5af5d72716ee370bb367c741bd15e75b4 | static inline void transpose4x4(uint8_t *dst, uint8_t *src, x86_reg dst_stride, x86_reg src_stride){
__asm__ volatile(
"movd (%1), %%mm0 \n\t"
"add %3, %1 \n\t"
"movd (%1), %%mm1 \n\t"
"movd (%1,%3,1), %%mm2 \n\t"
... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(uint8_t *VAR_0, uint8_t *VAR_1, x86_reg VAR_2, x86_reg VAR_3){
__asm__ volatile(
"movd (%1), %%mm0 \n\t"
"add %3, %1 \n\t"
"movd (%1), %%mm1 \n\t"
"movd (%1,%3,1), %%mm2 \n\t"
"movd (%1... | [
"static inline void FUNC_0(uint8_t *VAR_0, uint8_t *VAR_1, x86_reg VAR_2, x86_reg VAR_3){",
"__asm__ volatile(\n\"movd (%1), %%mm0 \\n\\t\"\n\"add %3, %1 \\n\\t\"\n\"movd (%1), %%mm1 \\n\\t\"\n\"movd (%1,%3,1), %%mm2 \\n\\t\"\n\"movd (%1,%3,2), %%mm3 ... | [
0,
0,
0
] | [
[
1
],
[
3,
5,
7,
9,
11,
13,
15,
17,
19,
21,
23,
25,
27,
29,
31,
33,
35,
37,
41,
43,
45,
47,
49,
51
],
[
53
]
] |
7,165 | uint64_t helper_ld_asi(target_ulong addr, int asi, int size, int sign)
{
uint64_t ret = 0;
#if defined(DEBUG_ASI)
target_ulong last_addr = addr;
#endif
asi &= 0xff;
if ((asi < 0x80 && (env->pstate & PS_PRIV) == 0)
|| ((env->def->features & CPU_FEATURE_HYPV)
&& asi >= 0x3... | true | qemu | 2aae2b8e0abd58e76d616bcbe93c6966d06d0188 | uint64_t helper_ld_asi(target_ulong addr, int asi, int size, int sign)
{
uint64_t ret = 0;
#if defined(DEBUG_ASI)
target_ulong last_addr = addr;
#endif
asi &= 0xff;
if ((asi < 0x80 && (env->pstate & PS_PRIV) == 0)
|| ((env->def->features & CPU_FEATURE_HYPV)
&& asi >= 0x3... | {
"code": [
"#endif",
"#endif",
"#endif",
" || ((env->def->features & CPU_FEATURE_HYPV)",
" if ((env->def->features & CPU_FEATURE_HYPV)",
" && env->hpstate & HS_PRIV) {",
" || ((env->def->features & CPU_FEATURE_HYPV)",
" if ((env->def-... | uint64_t FUNC_0(target_ulong addr, int asi, int size, int sign)
{
uint64_t ret = 0;
#if defined(DEBUG_ASI)
target_ulong last_addr = addr;
#endif
asi &= 0xff;
if ((asi < 0x80 && (env->pstate & PS_PRIV) == 0)
|| ((env->def->features & CPU_FEATURE_HYPV)
&& asi >= 0x30 && as... | [
"uint64_t FUNC_0(target_ulong addr, int asi, int size, int sign)\n{",
"uint64_t ret = 0;",
"#if defined(DEBUG_ASI)\ntarget_ulong last_addr = addr;",
"#endif\nasi &= 0xff;",
"if ((asi < 0x80 && (env->pstate & PS_PRIV) == 0)\n|| ((env->def->features & CPU_FEATURE_HYPV)\n&& asi >= 0x30 && asi < 0x80\n&& !(env-... | [
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11,
15
],
[
19,
21,
23,
25,
27
],
[
31
],
[
33
],
[
35,
37,
39,
41,
43
],
[
47,
49
],
[
53
],
[
55,
57
],
[
59,
61
],
[
63
],
[... |
7,166 | static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int depth, AVFormatContext *s)
{
AVIOContext *pb;
WtvFile *wf;
uint8_t *buffer;
if (avio_seek(s->pb, (int64_t)first_sector << WTV_SECTOR_BITS, SEEK_SET) < 0)
return NULL;
wf = av_mallocz(sizeof(WtvFile));
... | true | FFmpeg | 3317414fc11a9a187b474141f4ac13f895c0b493 | static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int depth, AVFormatContext *s)
{
AVIOContext *pb;
WtvFile *wf;
uint8_t *buffer;
if (avio_seek(s->pb, (int64_t)first_sector << WTV_SECTOR_BITS, SEEK_SET) < 0)
return NULL;
wf = av_mallocz(sizeof(WtvFile));
... | {
"code": [
" if (wf->sectors[wf->nb_sectors - 1] << WTV_SECTOR_BITS > avio_tell(s->pb))"
],
"line_no": [
115
]
} | static AVIOContext * FUNC_0(int first_sector, uint64_t length, int depth, AVFormatContext *s)
{
AVIOContext *pb;
WtvFile *wf;
uint8_t *buffer;
if (avio_seek(s->pb, (int64_t)first_sector << WTV_SECTOR_BITS, SEEK_SET) < 0)
return NULL;
wf = av_mallocz(sizeof(WtvFile));
if (!wf)... | [
"static AVIOContext * FUNC_0(int first_sector, uint64_t length, int depth, AVFormatContext *s)\n{",
"AVIOContext *pb;",
"WtvFile *wf;",
"uint8_t *buffer;",
"if (avio_seek(s->pb, (int64_t)first_sector << WTV_SECTOR_BITS, SEEK_SET) < 0)\nreturn NULL;",
"wf = av_mallocz(sizeof(WtvFile));",
"if (!wf)\nretur... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
21,
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
7,167 | static uint32_t ehci_mem_readb(void *ptr, target_phys_addr_t addr)
{
EHCIState *s = ptr;
uint32_t val;
val = s->mmio[addr];
return val;
}
| true | qemu | 3e4f910c8d490a1490409a7e381dbbb229f9d272 | static uint32_t ehci_mem_readb(void *ptr, target_phys_addr_t addr)
{
EHCIState *s = ptr;
uint32_t val;
val = s->mmio[addr];
return val;
}
| {
"code": [
"static uint32_t ehci_mem_readb(void *ptr, target_phys_addr_t addr)",
" uint32_t val;",
" val = s->mmio[addr];",
" return val;"
],
"line_no": [
1,
7,
11,
15
]
} | static uint32_t FUNC_0(void *ptr, target_phys_addr_t addr)
{
EHCIState *s = ptr;
uint32_t val;
val = s->mmio[addr];
return val;
}
| [
"static uint32_t FUNC_0(void *ptr, target_phys_addr_t addr)\n{",
"EHCIState *s = ptr;",
"uint32_t val;",
"val = s->mmio[addr];",
"return val;",
"}"
] | [
1,
0,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
]
] |
7,170 | static void gen_tlbli_74xx(DisasContext *ctx)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
#else
if (unlikely(ctx->pr)) {
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
return;
}
gen_helper_74xx_tlbi(cpu_env, cpu_gpr[rB(ctx->opcode)]);
#end... | true | qemu | 9b2fadda3e0196ffd485adde4fe9cdd6fae35300 | static void gen_tlbli_74xx(DisasContext *ctx)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
#else
if (unlikely(ctx->pr)) {
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
return;
}
gen_helper_74xx_tlbi(cpu_env, cpu_gpr[rB(ctx->opcode)]);
#end... | {
"code": [
" gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);",
" gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);",
" if (unlikely(ctx->pr)) {",
" gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);",
" gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);",
" if (unlikely(... | static void FUNC_0(DisasContext *VAR_0)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);
#else
if (unlikely(VAR_0->pr)) {
gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);
return;
}
gen_helper_74xx_tlbi(cpu_env, cpu_gpr[rB(VAR_0->opcode)]);
#e... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"#if defined(CONFIG_USER_ONLY)\ngen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);",
"#else\nif (unlikely(VAR_0->pr)) {",
"gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);",
"return;",
"}",
"gen_helper_74xx_tlbi(cpu_env, cpu_gpr[rB(VAR_0->opcode)]);",
"#... | [
0,
1,
1,
1,
0,
0,
0,
1
] | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
]
] |
7,172 | int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size){
int i, j;
uint32_t c;
if (bits < 8 || bits > 32 || poly >= (1LL<<bits))
return -1;
if (ctx_size != sizeof(AVCRC)*257 && ctx_size != sizeof(AVCRC)*1024)
return -1;
for (i = 0; i < 256; i++) {
... | true | FFmpeg | 8b19ae07616bbd18969b94cbf5d74308a8f2bbdf | int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size){
int i, j;
uint32_t c;
if (bits < 8 || bits > 32 || poly >= (1LL<<bits))
return -1;
if (ctx_size != sizeof(AVCRC)*257 && ctx_size != sizeof(AVCRC)*1024)
return -1;
for (i = 0; i < 256; i++) {
... | {
"code": [
" int i, j;"
],
"line_no": [
3
]
} | int FUNC_0(AVCRC *VAR_0, int VAR_1, int VAR_2, uint32_t VAR_3, int VAR_4){
int VAR_5, VAR_6;
uint32_t c;
if (VAR_2 < 8 || VAR_2 > 32 || VAR_3 >= (1LL<<VAR_2))
return -1;
if (VAR_4 != sizeof(AVCRC)*257 && VAR_4 != sizeof(AVCRC)*1024)
return -1;
for (VAR_5 = 0; VAR_5 < 256; ... | [
"int FUNC_0(AVCRC *VAR_0, int VAR_1, int VAR_2, uint32_t VAR_3, int VAR_4){",
"int VAR_5, VAR_6;",
"uint32_t c;",
"if (VAR_2 < 8 || VAR_2 > 32 || VAR_3 >= (1LL<<VAR_2))\nreturn -1;",
"if (VAR_4 != sizeof(AVCRC)*257 && VAR_4 != sizeof(AVCRC)*1024)\nreturn -1;",
"for (VAR_5 = 0; VAR_5 < 256; VAR_5++) {",
... | [
0,
1,
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
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45,
47
],
... |
7,173 | static void sbr_gain_calc(AACContext *ac, SpectralBandReplication *sbr,
SBRData *ch_data, const int e_a[2])
{
int e, k, m;
// max gain limits : -3dB, 0dB, 3dB, inf dB (limiter off)
static const SoftFloat limgain[4] = { { 760155524, 0 }, { 0x20000000, 1 },
... | true | FFmpeg | 7d1dec466895eed12f2c79b7ab5447f5390fe869 | static void sbr_gain_calc(AACContext *ac, SpectralBandReplication *sbr,
SBRData *ch_data, const int e_a[2])
{
int e, k, m;
static const SoftFloat limgain[4] = { { 760155524, 0 }, { 0x20000000, 1 },
{ 758351638, 1 }, { 625000000,... | {
"code": [],
"line_no": []
} | static void FUNC_0(AACContext *VAR_0, SpectralBandReplication *VAR_1,
SBRData *VAR_2, const int VAR_3[2])
{
int VAR_4, VAR_5, VAR_6;
static const SoftFloat VAR_7[4] = { { 760155524, 0 }, { 0x20000000, 1 },
{ 758351638, 1 }, { 62... | [
"static void FUNC_0(AACContext *VAR_0, SpectralBandReplication *VAR_1,\nSBRData *VAR_2, const int VAR_3[2])\n{",
"int VAR_4, VAR_5, VAR_6;",
"static const SoftFloat VAR_7[4] = { { 760155524, 0 }, { 0x20000000, 1 },",
"{ 758351638, 1 }, { 625000000, 34 } };",
"for (VAR_4 = 0; VAR_4 < VAR_2->bs_num_env; VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45,
47
],
[
49... |
7,175 | void tcg_dump_ops(TCGContext *s)
{
char buf[128];
TCGOp *op;
int oi;
for (oi = s->gen_op_buf[0].next; oi != 0; oi = op->next) {
int i, k, nb_oargs, nb_iargs, nb_cargs;
const TCGOpDef *def;
TCGOpcode c;
int col = 0;
op = &s->gen_op_buf[oi];
c... | true | qemu | 15fa08f8451babc88d733bd411d4c94976f9d0f8 | void tcg_dump_ops(TCGContext *s)
{
char buf[128];
TCGOp *op;
int oi;
for (oi = s->gen_op_buf[0].next; oi != 0; oi = op->next) {
int i, k, nb_oargs, nb_iargs, nb_cargs;
const TCGOpDef *def;
TCGOpcode c;
int col = 0;
op = &s->gen_op_buf[oi];
c... | {
"code": [
"#endif",
" int oi;",
" for (oi = s->gen_op_buf[0].next; oi != 0; oi = op->next) {",
" op = &s->gen_op_buf[oi];",
" col += qemu_log(\"%s ----\", oi != s->gen_op_buf[0].next ? \"\\n\" : \"\");"
],
"line_no": [
51,
9,
13,
25,
35
]
} | void FUNC_0(TCGContext *VAR_0)
{
char VAR_1[128];
TCGOp *op;
int VAR_2;
for (VAR_2 = VAR_0->gen_op_buf[0].next; VAR_2 != 0; VAR_2 = op->next) {
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;
const TCGOpDef *VAR_8;
TCGOpcode c;
int VAR_9 = 0;
op = &VAR_0->gen... | [
"void FUNC_0(TCGContext *VAR_0)\n{",
"char VAR_1[128];",
"TCGOp *op;",
"int VAR_2;",
"for (VAR_2 = VAR_0->gen_op_buf[0].next; VAR_2 != 0; VAR_2 = op->next) {",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;",
"const TCGOpDef *VAR_8;",
"TCGOpcode c;",
"int VAR_9 = 0;",
"op = &VAR_0->gen_op_buf[VAR_2];",
... | [
0,
0,
0,
1,
1,
0,
0,
0,
0,
1,
0,
0,
0,
1,
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... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43,
45
],
[
47,
49
],
[
51,... |
7,176 | static int vtd_remap_irq_get(IntelIOMMUState *iommu, uint16_t index, VTDIrq *irq)
{
VTD_IRTE irte = { 0 };
int ret = 0;
ret = vtd_irte_get(iommu, index, &irte);
if (ret) {
return ret;
}
irq->trigger_mode = irte.trigger_mode;
irq->vector = irte.vector;
irq->delivery_... | true | qemu | 09cd058a2cf77bb7a3b10ff93c1f80ed88bca364 | static int vtd_remap_irq_get(IntelIOMMUState *iommu, uint16_t index, VTDIrq *irq)
{
VTD_IRTE irte = { 0 };
int ret = 0;
ret = vtd_irte_get(iommu, index, &irte);
if (ret) {
return ret;
}
irq->trigger_mode = irte.trigger_mode;
irq->vector = irte.vector;
irq->delivery_... | {
"code": [
" VTD_IRTE irte = { 0 };"
],
"line_no": [
5
]
} | static int FUNC_0(IntelIOMMUState *VAR_0, uint16_t VAR_1, VTDIrq *VAR_2)
{
VTD_IRTE irte = { 0 };
int VAR_3 = 0;
VAR_3 = vtd_irte_get(VAR_0, VAR_1, &irte);
if (VAR_3) {
return VAR_3;
}
VAR_2->trigger_mode = irte.trigger_mode;
VAR_2->vector = irte.vector;
VAR_2->deli... | [
"static int FUNC_0(IntelIOMMUState *VAR_0, uint16_t VAR_1, VTDIrq *VAR_2)\n{",
"VTD_IRTE irte = { 0 };",
"int VAR_3 = 0;",
"VAR_3 = vtd_irte_get(VAR_0, VAR_1, &irte);",
"if (VAR_3) {",
"return VAR_3;",
"}",
"VAR_2->trigger_mode = irte.trigger_mode;",
"VAR_2->vector = irte.vector;",
"VAR_2->deliver... | [
0,
1,
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
],
[
29,
31,
33,
35
],
[
37
],
[
39
],
[
43,
45,
47,
49
],
[
53
],
[
55
]
] |
7,178 | void exynos4210_init_board_irqs(Exynos4210Irq *s)
{
uint32_t grp, bit, irq_id, n;
for (n = 0; n < EXYNOS4210_MAX_EXT_COMBINER_IN_IRQ; n++) {
s->board_irqs[n] = qemu_irq_split(s->int_combiner_irq[n],
s->ext_combiner_irq[n]);
irq_id = 0;
if (n == EXYNOS4210_COMBI... | true | qemu | 9ff7f5bddbe5814bafe5e798d2cf1087b58dc7b6 | void exynos4210_init_board_irqs(Exynos4210Irq *s)
{
uint32_t grp, bit, irq_id, n;
for (n = 0; n < EXYNOS4210_MAX_EXT_COMBINER_IN_IRQ; n++) {
s->board_irqs[n] = qemu_irq_split(s->int_combiner_irq[n],
s->ext_combiner_irq[n]);
irq_id = 0;
if (n == EXYNOS4210_COMBI... | {
"code": [
" s->board_irqs[n] = qemu_irq_split(s->int_combiner_irq[n],",
" s->ext_combiner_irq[n]);"
],
"line_no": [
11,
13
]
} | void FUNC_0(Exynos4210Irq *VAR_0)
{
uint32_t grp, bit, irq_id, n;
for (n = 0; n < EXYNOS4210_MAX_EXT_COMBINER_IN_IRQ; n++) {
VAR_0->board_irqs[n] = qemu_irq_split(VAR_0->int_combiner_irq[n],
VAR_0->ext_combiner_irq[n]);
irq_id = 0;
if (n == EXYNOS4210_COMBINER_... | [
"void FUNC_0(Exynos4210Irq *VAR_0)\n{",
"uint32_t grp, bit, irq_id, n;",
"for (n = 0; n < EXYNOS4210_MAX_EXT_COMBINER_IN_IRQ; n++) {",
"VAR_0->board_irqs[n] = qemu_irq_split(VAR_0->int_combiner_irq[n],\nVAR_0->ext_combiner_irq[n]);",
"irq_id = 0;",
"if (n == EXYNOS4210_COMBINER_GET_IRQ_NUM(1, 4) ||\nn == ... | [
0,
0,
0,
1,
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,
21
],
[
25
],
[
27
],
[
29,
31
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
49
],
[
51
],
[
55
],
[
57... |
7,179 | static BlockDriverAIOCB *bdrv_aio_rw_vector(BlockDriverState *bs,
int64_t sector_num,
QEMUIOVector *iov,
int nb_sectors,
BlockDriverCompleti... | true | qemu | c240b9af599d20e06a58090366be682684bd8555 | static BlockDriverAIOCB *bdrv_aio_rw_vector(BlockDriverState *bs,
int64_t sector_num,
QEMUIOVector *iov,
int nb_sectors,
BlockDriverCompleti... | {
"code": [],
"line_no": []
} | static BlockDriverAIOCB *FUNC_0(BlockDriverState *bs,
int64_t sector_num,
QEMUIOVector *iov,
int nb_sectors,
BlockDriverCompletionFunc *cb,
... | [
"static BlockDriverAIOCB *FUNC_0(BlockDriverState *bs,\nint64_t sector_num,\nQEMUIOVector *iov,\nint nb_sectors,\nBlockDriverCompletionFunc *cb,\nvoid *opaque,\nint is_write)\n{",
"VectorTranslationAIOCB *s = qemu_aio_get_pool(&vectored_aio_pool, bs,\ncb, opaque);",
"s->iov = iov;",
"s->bounce = qemu_memalign... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13,
17
],
[
19,
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
51
]
] |
7,181 | int ff_lock_avcodec(AVCodecContext *log_ctx, const AVCodec *codec)
{
if (codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE || !codec->init)
return 0;
if (ff_mutex_lock(&codec_mutex))
return -1;
if (atomic_fetch_add(&entangled_thread_counter, 1)) {
av_log(log_ctx, AV_LOG_... | true | FFmpeg | 4ed66517c62c599701b3793fa2843d5a8530a4f4 | int ff_lock_avcodec(AVCodecContext *log_ctx, const AVCodec *codec)
{
if (codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE || !codec->init)
return 0;
if (ff_mutex_lock(&codec_mutex))
return -1;
if (atomic_fetch_add(&entangled_thread_counter, 1)) {
av_log(log_ctx, AV_LOG_... | {
"code": [
"int ff_lock_avcodec(AVCodecContext *log_ctx, const AVCodec *codec)",
" if (codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE || !codec->init)",
" return 0;",
" if (ff_mutex_lock(&codec_mutex))",
" return -1;",
" if (atomic_fetch_add(&entangled_thread_count... | int FUNC_0(AVCodecContext *VAR_0, const AVCodec *VAR_1)
{
if (VAR_1->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE || !VAR_1->init)
return 0;
if (ff_mutex_lock(&codec_mutex))
return -1;
if (atomic_fetch_add(&entangled_thread_counter, 1)) {
av_log(VAR_0, AV_LOG_ERROR,
... | [
"int FUNC_0(AVCodecContext *VAR_0, const AVCodec *VAR_1)\n{",
"if (VAR_1->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE || !VAR_1->init)\nreturn 0;",
"if (ff_mutex_lock(&codec_mutex))\nreturn -1;",
"if (atomic_fetch_add(&entangled_thread_counter, 1)) {",
"av_log(VAR_0, AV_LOG_ERROR,\n\"Insufficient thread lo... | [
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
0
] | [
[
1,
3
],
[
5,
7
],
[
11,
13
],
[
17
],
[
19,
21,
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
7,182 | static void do_mchk_interrupt(CPUS390XState *env)
{
S390CPU *cpu = s390_env_get_cpu(env);
uint64_t mask, addr;
LowCore *lowcore;
MchkQueue *q;
int i;
if (!(env->psw.mask & PSW_MASK_MCHECK)) {
cpu_abort(CPU(cpu), "Machine check w/o mchk mask\n");
}
if (env->mchk_inde... | true | qemu | 1a71992376792a0d11ea27688bd1a21cdffd1826 | static void do_mchk_interrupt(CPUS390XState *env)
{
S390CPU *cpu = s390_env_get_cpu(env);
uint64_t mask, addr;
LowCore *lowcore;
MchkQueue *q;
int i;
if (!(env->psw.mask & PSW_MASK_MCHECK)) {
cpu_abort(CPU(cpu), "Machine check w/o mchk mask\n");
}
if (env->mchk_inde... | {
"code": [
" if (env->mchk_index < 0 || env->mchk_index > MAX_MCHK_QUEUE) {"
],
"line_no": [
25
]
} | static void FUNC_0(CPUS390XState *VAR_0)
{
S390CPU *cpu = s390_env_get_cpu(VAR_0);
uint64_t mask, addr;
LowCore *lowcore;
MchkQueue *q;
int VAR_1;
if (!(VAR_0->psw.mask & PSW_MASK_MCHECK)) {
cpu_abort(CPU(cpu), "Machine check w/o mchk mask\n");
}
if (VAR_0->mchk_ind... | [
"static void FUNC_0(CPUS390XState *VAR_0)\n{",
"S390CPU *cpu = s390_env_get_cpu(VAR_0);",
"uint64_t mask, addr;",
"LowCore *lowcore;",
"MchkQueue *q;",
"int VAR_1;",
"if (!(VAR_0->psw.mask & PSW_MASK_MCHECK)) {",
"cpu_abort(CPU(cpu), \"Machine check w/o mchk mask\\n\");",
"}",
"if (VAR_0->mchk_ind... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
33
],
[
37
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
55
... |
7,183 | uint16_t acpi_pm1_evt_get_sts(ACPIREGS *ar, int64_t overflow_time)
{
int64_t d = acpi_pm_tmr_get_clock();
if (d >= overflow_time) {
ar->pm1.evt.sts |= ACPI_BITMASK_TIMER_STATUS;
}
return ar->pm1.evt.sts;
}
| true | qemu | 2886be1b01c274570fa139748a402207482405bd | uint16_t acpi_pm1_evt_get_sts(ACPIREGS *ar, int64_t overflow_time)
{
int64_t d = acpi_pm_tmr_get_clock();
if (d >= overflow_time) {
ar->pm1.evt.sts |= ACPI_BITMASK_TIMER_STATUS;
}
return ar->pm1.evt.sts;
}
| {
"code": [
"uint16_t acpi_pm1_evt_get_sts(ACPIREGS *ar, int64_t overflow_time)",
" if (d >= overflow_time) {"
],
"line_no": [
1,
7
]
} | uint16_t FUNC_0(ACPIREGS *ar, int64_t overflow_time)
{
int64_t d = acpi_pm_tmr_get_clock();
if (d >= overflow_time) {
ar->pm1.evt.sts |= ACPI_BITMASK_TIMER_STATUS;
}
return ar->pm1.evt.sts;
}
| [
"uint16_t FUNC_0(ACPIREGS *ar, int64_t overflow_time)\n{",
"int64_t d = acpi_pm_tmr_get_clock();",
"if (d >= overflow_time) {",
"ar->pm1.evt.sts |= ACPI_BITMASK_TIMER_STATUS;",
"}",
"return ar->pm1.evt.sts;",
"}"
] | [
1,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
7,184 | static int ide_drive_pio_post_load(void *opaque, int version_id)
{
IDEState *s = opaque;
if (s->end_transfer_fn_idx > ARRAY_SIZE(transfer_end_table)) {
return -EINVAL;
}
s->end_transfer_func = transfer_end_table[s->end_transfer_fn_idx];
s->data_ptr = s->io_buffer + s->cur_io_buffer_... | true | qemu | fb60105d4942a26f571b1be92a8b9e7528d0c4d8 | static int ide_drive_pio_post_load(void *opaque, int version_id)
{
IDEState *s = opaque;
if (s->end_transfer_fn_idx > ARRAY_SIZE(transfer_end_table)) {
return -EINVAL;
}
s->end_transfer_func = transfer_end_table[s->end_transfer_fn_idx];
s->data_ptr = s->io_buffer + s->cur_io_buffer_... | {
"code": [
" if (s->end_transfer_fn_idx > ARRAY_SIZE(transfer_end_table)) {"
],
"line_no": [
9
]
} | static int FUNC_0(void *VAR_0, int VAR_1)
{
IDEState *s = VAR_0;
if (s->end_transfer_fn_idx > ARRAY_SIZE(transfer_end_table)) {
return -EINVAL;
}
s->end_transfer_func = transfer_end_table[s->end_transfer_fn_idx];
s->data_ptr = s->io_buffer + s->cur_io_buffer_offset;
s->data_end... | [
"static int FUNC_0(void *VAR_0, int VAR_1)\n{",
"IDEState *s = VAR_0;",
"if (s->end_transfer_fn_idx > ARRAY_SIZE(transfer_end_table)) {",
"return -EINVAL;",
"}",
"s->end_transfer_func = transfer_end_table[s->end_transfer_fn_idx];",
"s->data_ptr = s->io_buffer + s->cur_io_buffer_offset;",
"s->data_end ... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
]
] |
7,185 | int av_get_packet(AVIOContext *s, AVPacket *pkt, int size)
{
int ret= av_new_packet(pkt, size);
if(ret<0)
return ret;
pkt->pos= avio_tell(s);
ret= avio_read(s, pkt->data, size);
if(ret<=0)
av_free_packet(pkt);
else
av_shrink_packet(pkt, ret);
return... | false | FFmpeg | 47572323f2f908913b4d031af733047d481fb1f6 | int av_get_packet(AVIOContext *s, AVPacket *pkt, int size)
{
int ret= av_new_packet(pkt, size);
if(ret<0)
return ret;
pkt->pos= avio_tell(s);
ret= avio_read(s, pkt->data, size);
if(ret<=0)
av_free_packet(pkt);
else
av_shrink_packet(pkt, ret);
return... | {
"code": [],
"line_no": []
} | int FUNC_0(AVIOContext *VAR_0, AVPacket *VAR_1, int VAR_2)
{
int VAR_3= av_new_packet(VAR_1, VAR_2);
if(VAR_3<0)
return VAR_3;
VAR_1->pos= avio_tell(VAR_0);
VAR_3= avio_read(VAR_0, VAR_1->data, VAR_2);
if(VAR_3<=0)
av_free_packet(VAR_1);
else
av_shrink_pac... | [
"int FUNC_0(AVIOContext *VAR_0, AVPacket *VAR_1, int VAR_2)\n{",
"int VAR_3= av_new_packet(VAR_1, VAR_2);",
"if(VAR_3<0)\nreturn VAR_3;",
"VAR_1->pos= avio_tell(VAR_0);",
"VAR_3= avio_read(VAR_0, VAR_1->data, VAR_2);",
"if(VAR_3<=0)\nav_free_packet(VAR_1);",
"else\nav_shrink_packet(VAR_1, VAR_3);",
"r... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
15
],
[
19
],
[
21,
23
],
[
25,
27
],
[
31
],
[
33
]
] |
7,186 | void ff_rtp_send_aac(AVFormatContext *s1, const uint8_t *buff, int size)
{
RTPMuxContext *s = s1->priv_data;
int len, max_packet_size;
uint8_t *p;
/* skip ADTS header, if present */
if ((s1->streams[0]->codec->extradata_size) == 0) {
size -= 7;
buff += 7;
}
max_pa... | false | FFmpeg | ddffcb2d3a81e203cff6f3e39e40bf5720f7391e | void ff_rtp_send_aac(AVFormatContext *s1, const uint8_t *buff, int size)
{
RTPMuxContext *s = s1->priv_data;
int len, max_packet_size;
uint8_t *p;
if ((s1->streams[0]->codec->extradata_size) == 0) {
size -= 7;
buff += 7;
}
max_packet_size = s->max_payload_size - ... | {
"code": [],
"line_no": []
} | void FUNC_0(AVFormatContext *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
RTPMuxContext *s = VAR_0->priv_data;
int VAR_3, VAR_4;
uint8_t *p;
if ((VAR_0->streams[0]->codec->extradata_size) == 0) {
VAR_2 -= 7;
VAR_1 += 7;
}
VAR_4 = s->max_payload_size - MAX_AU_HEADERS... | [
"void FUNC_0(AVFormatContext *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"RTPMuxContext *s = VAR_0->priv_data;",
"int VAR_3, VAR_4;",
"uint8_t *p;",
"if ((VAR_0->streams[0]->codec->extradata_size) == 0) {",
"VAR_2 -= 7;",
"VAR_1 += 7;",
"}",
"VAR_4 = s->max_payload_size - MAX_AU_HEADERS_SIZE;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
53
],
[
57
... |
7,188 | static int check_pes(uint8_t *p, uint8_t *end){
int pes1;
int pes2= (p[3] & 0xC0) == 0x80
&& (p[4] & 0xC0) != 0x40
&&((p[4] & 0xC0) == 0x00 || (p[4]&0xC0)>>2 == (p[6]&0xF0));
for(p+=3; p<end && *p == 0xFF; p++);
if((*p&0xC0) == 0x40) p+=2;
if((*p&0xF0) =... | false | FFmpeg | e8c93839148a168aedc978388f14c3599dd072f8 | static int check_pes(uint8_t *p, uint8_t *end){
int pes1;
int pes2= (p[3] & 0xC0) == 0x80
&& (p[4] & 0xC0) != 0x40
&&((p[4] & 0xC0) == 0x00 || (p[4]&0xC0)>>2 == (p[6]&0xF0));
for(p+=3; p<end && *p == 0xFF; p++);
if((*p&0xC0) == 0x40) p+=2;
if((*p&0xF0) =... | {
"code": [],
"line_no": []
} | static int FUNC_0(uint8_t *VAR_0, uint8_t *VAR_1){
int VAR_2;
int VAR_3= (VAR_0[3] & 0xC0) == 0x80
&& (VAR_0[4] & 0xC0) != 0x40
&&((VAR_0[4] & 0xC0) == 0x00 || (VAR_0[4]&0xC0)>>2 == (VAR_0[6]&0xF0));
for(VAR_0+=3; VAR_0<VAR_1 && *VAR_0 == 0xFF; VAR_0++);
if((... | [
"static int FUNC_0(uint8_t *VAR_0, uint8_t *VAR_1){",
"int VAR_2;",
"int VAR_3= (VAR_0[3] & 0xC0) == 0x80\n&& (VAR_0[4] & 0xC0) != 0x40\n&&((VAR_0[4] & 0xC0) == 0x00 || (VAR_0[4]&0xC0)>>2 == (VAR_0[6]&0xF0));",
"for(VAR_0+=3; VAR_0<VAR_1 && *VAR_0 == 0xFF; VAR_0++);",
"if((*VAR_0&0xC0) == 0x40) VAR_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
],
[
35
],
[
37
]
] |
7,189 | static int dpcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
const uint8_t *buf_end = buf + buf_size;
DPCMContext *s = avctx->priv_data;
int out = 0;
int predi... | false | FFmpeg | e79da63282b354fb721ac4b763d268649f0efd76 | static int dpcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
const uint8_t *buf_end = buf + buf_size;
DPCMContext *s = avctx->priv_data;
int out = 0;
int predi... | {
"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;
const uint8_t *VAR_6 = VAR_4 + VAR_5;
DPCMContext *s = VAR_0->priv_data;
int VAR_7 = 0;
int VAR_8[2];
int V... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"const uint8_t *VAR_6 = VAR_4 + VAR_5;",
"DPCMContext *s = VAR_0->priv_data;",
"int VAR_7 = 0;",
"int VAR_8[2];",
"int VAR_9 = 0;",
"int VAR_1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
35
],
[
37,
39
],
[
41
],
[
43,
45
],
[
47
],
[
49,
51
],
[... |
7,190 | static void gen_logicq_cc(TCGv_i64 val)
{
TCGv tmp = new_tmp();
gen_helper_logicq_cc(tmp, val);
gen_logic_CC(tmp);
dead_tmp(tmp);
}
| true | qemu | 7d1b0095bff7157e856d1d0e6c4295641ced2752 | static void gen_logicq_cc(TCGv_i64 val)
{
TCGv tmp = new_tmp();
gen_helper_logicq_cc(tmp, val);
gen_logic_CC(tmp);
dead_tmp(tmp);
}
| {
"code": [
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" dead_tmp(tmp);",
" TCGv tmp = new_tmp();",
" dead_tmp(tmp);",
" TCGv tmp = new_tmp();",
" dead_tmp(tmp);",
" TCGv tmp = new_tmp();",
" dead_tmp(tmp);",
... | static void FUNC_0(TCGv_i64 VAR_0)
{
TCGv tmp = new_tmp();
gen_helper_logicq_cc(tmp, VAR_0);
gen_logic_CC(tmp);
dead_tmp(tmp);
}
| [
"static void FUNC_0(TCGv_i64 VAR_0)\n{",
"TCGv tmp = new_tmp();",
"gen_helper_logicq_cc(tmp, VAR_0);",
"gen_logic_CC(tmp);",
"dead_tmp(tmp);",
"}"
] | [
0,
1,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
7,192 | static coroutine_fn int qcow2_co_pwritev(BlockDriverState *bs, uint64_t offset,
uint64_t bytes, QEMUIOVector *qiov,
int flags)
{
BDRVQcow2State *s = bs->opaque;
int offset_in_cluster;
int ret;
unsigned int cur_bytes... | true | qemu | 4652b8f3e1ec91bb9d6f00e40df7f96d1f1aafee | static coroutine_fn int qcow2_co_pwritev(BlockDriverState *bs, uint64_t offset,
uint64_t bytes, QEMUIOVector *qiov,
int flags)
{
BDRVQcow2State *s = bs->opaque;
int offset_in_cluster;
int ret;
unsigned int cur_bytes... | {
"code": [
" if (qcrypto_block_encrypt(s->crypto, offset >> BDRV_SECTOR_BITS,"
],
"line_no": [
127
]
} | static coroutine_fn int FUNC_0(BlockDriverState *bs, uint64_t offset,
uint64_t bytes, QEMUIOVector *qiov,
int flags)
{
BDRVQcow2State *s = bs->opaque;
int VAR_0;
int VAR_1;
unsigned int VAR_2;
uint64_t cluster... | [
"static coroutine_fn int FUNC_0(BlockDriverState *bs, uint64_t offset,\nuint64_t bytes, QEMUIOVector *qiov,\nint flags)\n{",
"BDRVQcow2State *s = bs->opaque;",
"int VAR_0;",
"int VAR_1;",
"unsigned int VAR_2;",
"uint64_t cluster_offset;",
"QEMUIOVector hd_qiov;",
"uint64_t bytes_done = 0;",
"uint8_t... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
33
],
[
37
],
[
41
],
[
45
],
[
49
],
[
53
],
[
55
],
[
57
... |
7,193 | static int ape_probe(AVProbeData * p)
{
if (p->buf[0] == 'M' && p->buf[1] == 'A' && p->buf[2] == 'C' && p->buf[3] == ' ')
return AVPROBE_SCORE_MAX;
return 0;
}
| true | FFmpeg | b57083529650be5417056453fae8b2bf2dface59 | static int ape_probe(AVProbeData * p)
{
if (p->buf[0] == 'M' && p->buf[1] == 'A' && p->buf[2] == 'C' && p->buf[3] == ' ')
return AVPROBE_SCORE_MAX;
return 0;
}
| {
"code": [
" if (p->buf[0] == 'M' && p->buf[1] == 'A' && p->buf[2] == 'C' && p->buf[3] == ' ')",
" return AVPROBE_SCORE_MAX;",
" return 0;"
],
"line_no": [
5,
7,
11
]
} | static int FUNC_0(AVProbeData * VAR_0)
{
if (VAR_0->buf[0] == 'M' && VAR_0->buf[1] == 'A' && VAR_0->buf[2] == 'C' && VAR_0->buf[3] == ' ')
return AVPROBE_SCORE_MAX;
return 0;
}
| [
"static int FUNC_0(AVProbeData * VAR_0)\n{",
"if (VAR_0->buf[0] == 'M' && VAR_0->buf[1] == 'A' && VAR_0->buf[2] == 'C' && VAR_0->buf[3] == ' ')\nreturn AVPROBE_SCORE_MAX;",
"return 0;",
"}"
] | [
0,
1,
1,
0
] | [
[
1,
3
],
[
5,
7
],
[
11
],
[
13
]
] |
7,194 | static void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,
int dstWidth, const uint8_t *src1,
const uint8_t *src2, int srcW, int xInc)
{
int16_t *filterPos = c->hChrFilterPos;
int16_t *filter = c->hChrFilter;
void ... | true | FFmpeg | 2254b559cbcfc0418135f09add37c0a5866b1981 | static void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,
int dstWidth, const uint8_t *src1,
const uint8_t *src2, int srcW, int xInc)
{
int16_t *filterPos = c->hChrFilterPos;
int16_t *filter = c->hChrFilter;
void ... | {
"code": [
" int16_t *filterPos = c->hChrFilterPos;"
],
"line_no": [
9
]
} | static void FUNC_0(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,
int dstWidth, const uint8_t *src1,
const uint8_t *src2, int srcW, int xInc)
{
int16_t *filterPos = c->hChrFilterPos;
int16_t *filter = c->hChrFilter;
void ... | [
"static void FUNC_0(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,\nint dstWidth, const uint8_t *src1,\nconst uint8_t *src2, int srcW, int xInc)\n{",
"int16_t *filterPos = c->hChrFilterPos;",
"int16_t *filter = c->hChrFilter;",
"void *VAR_0= c->chrMmx2FilterCode;",
"int VAR_1;",
"#if def... | [
0,
1,
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,
51,
53,
55,
57,
59,
61,
63,
65,
67,... |
7,195 | static void ide_device_class_init(ObjectClass *klass, void *data)
{
DeviceClass *k = DEVICE_CLASS(klass);
k->init = ide_qdev_init;
set_bit(DEVICE_CATEGORY_STORAGE, k->categories);
k->bus_type = TYPE_IDE_BUS;
k->props = ide_props;
} | true | qemu | ca44141d5fb801dd5903102acefd0f2d8e8bb6a1 | static void ide_device_class_init(ObjectClass *klass, void *data)
{
DeviceClass *k = DEVICE_CLASS(klass);
k->init = ide_qdev_init;
set_bit(DEVICE_CATEGORY_STORAGE, k->categories);
k->bus_type = TYPE_IDE_BUS;
k->props = ide_props;
} | {
"code": [],
"line_no": []
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *k = DEVICE_CLASS(VAR_0);
k->init = ide_qdev_init;
set_bit(DEVICE_CATEGORY_STORAGE, k->categories);
k->bus_type = TYPE_IDE_BUS;
k->props = ide_props;
} | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *k = DEVICE_CLASS(VAR_0);",
"k->init = ide_qdev_init;",
"set_bit(DEVICE_CATEGORY_STORAGE, k->categories);",
"k->bus_type = TYPE_IDE_BUS;",
"k->props = ide_props;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
14
],
[
16
]
] |
7,196 | void memory_region_del_eventfd(MemoryRegion *mr,
hwaddr addr,
unsigned size,
bool match_data,
uint64_t data,
EventNotifier *e)
{
MemoryRegionIoeventfd mrf... | true | qemu | b8aecea23aaccf39da54c77ef248f5fa50dcfbc1 | void memory_region_del_eventfd(MemoryRegion *mr,
hwaddr addr,
unsigned size,
bool match_data,
uint64_t data,
EventNotifier *e)
{
MemoryRegionIoeventfd mrf... | {
"code": [
" adjust_endianness(mr, &mrfd.data, size);",
" adjust_endianness(mr, &mrfd.data, size);"
],
"line_no": [
33,
33
]
} | void FUNC_0(MemoryRegion *VAR_0,
hwaddr VAR_1,
unsigned VAR_2,
bool VAR_3,
uint64_t VAR_4,
EventNotifier *VAR_5)
{
MemoryRegionIoeventfd mrfd = {
... | [
"void FUNC_0(MemoryRegion *VAR_0,\nhwaddr VAR_1,\nunsigned VAR_2,\nbool VAR_3,\nuint64_t VAR_4,\nEventNotifier *VAR_5)\n{",
"MemoryRegionIoeventfd mrfd = {",
".VAR_1.start = int128_make64(VAR_1),\n.VAR_1.VAR_2 = int128_make64(VAR_2),\n.VAR_3 = VAR_3,\n.VAR_4 = VAR_4,\n.VAR_5 = VAR_5,\n};",
"unsigned VAR_6;",
... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
17,
19,
21,
23,
25,
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49,
51
],
[
53
],
[... |
7,197 | void pc_system_firmware_init(MemoryRegion *rom_memory)
{
DriveInfo *pflash_drv;
PcSysFwDevice *sysfw_dev;
/*
* TODO This device exists only so that users can switch between
* use of flash and ROM for the BIOS. The ability to switch was
* created because flash doesn't work with KVM. ... | true | qemu | 9e1c2ec8fd8d9a9ee299ea86c5f6c986fe25e838 | void pc_system_firmware_init(MemoryRegion *rom_memory)
{
DriveInfo *pflash_drv;
PcSysFwDevice *sysfw_dev;
sysfw_dev = (PcSysFwDevice*) qdev_create(NULL, "pc-sysfw");
qdev_init_nofail(DEVICE(sysfw_dev));
if (sysfw_dev->rom_only) {
old_pc_system_rom_init(rom_memory... | {
"code": [
" if (pc_sysfw_flash_vs_rom_bug_compatible && kvm_enabled()) {"
],
"line_no": [
57
]
} | void FUNC_0(MemoryRegion *VAR_0)
{
DriveInfo *pflash_drv;
PcSysFwDevice *sysfw_dev;
sysfw_dev = (PcSysFwDevice*) qdev_create(NULL, "pc-sysfw");
qdev_init_nofail(DEVICE(sysfw_dev));
if (sysfw_dev->rom_only) {
old_pc_system_rom_init(VAR_0);
return;
}
... | [
"void FUNC_0(MemoryRegion *VAR_0)\n{",
"DriveInfo *pflash_drv;",
"PcSysFwDevice *sysfw_dev;",
"sysfw_dev = (PcSysFwDevice*) qdev_create(NULL, \"pc-sysfw\");",
"qdev_init_nofail(DEVICE(sysfw_dev));",
"if (sysfw_dev->rom_only) {",
"old_pc_system_rom_init(VAR_0);",
"return;",
"}",
"pflash_drv = drive... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
23
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
57
],
[
59
],
[
61
],
[
63
],
[
65
],
[
67
],
[
69
],
[
71
],
[
73
],
[
75... |
7,198 | static int32_t scalarproduct_and_madd_int32_c(int16_t *v1, const int32_t *v2,
const int16_t *v3,
int order, int mul)
{
int res = 0;
while (order--) {
res += *v1 * *v2++;
*v1++ += mul * *v3++;
... | true | FFmpeg | 9ca16bdd3f0461b40d369080647747ae70715daf | static int32_t scalarproduct_and_madd_int32_c(int16_t *v1, const int32_t *v2,
const int16_t *v3,
int order, int mul)
{
int res = 0;
while (order--) {
res += *v1 * *v2++;
*v1++ += mul * *v3++;
... | {
"code": [
" while (order--) {",
" while (order--) {"
],
"line_no": [
13,
13
]
} | static int32_t FUNC_0(int16_t *v1, const int32_t *v2,
const int16_t *v3,
int order, int mul)
{
int VAR_0 = 0;
while (order--) {
VAR_0 += *v1 * *v2++;
*v1++ += mul * *v3++;
}
return VA... | [
"static int32_t FUNC_0(int16_t *v1, const int32_t *v2,\nconst int16_t *v3,\nint order, int mul)\n{",
"int VAR_0 = 0;",
"while (order--) {",
"VAR_0 += *v1 * *v2++;",
"*v1++ += mul * *v3++;",
"}",
"return VAR_0;",
"}"
] | [
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
7,199 | static int spapr_nvram_init(VIOsPAPRDevice *dev)
{
sPAPRNVRAM *nvram = VIO_SPAPR_NVRAM(dev);
if (nvram->drive) {
nvram->size = bdrv_getlength(nvram->drive);
} else {
nvram->size = DEFAULT_NVRAM_SIZE;
nvram->buf = g_malloc0(nvram->size);
}
if ((nvram->size < MIN_N... | true | qemu | 3a3b8502e6f0c8d30865c5f36d2c3ae4114000b5 | static int spapr_nvram_init(VIOsPAPRDevice *dev)
{
sPAPRNVRAM *nvram = VIO_SPAPR_NVRAM(dev);
if (nvram->drive) {
nvram->size = bdrv_getlength(nvram->drive);
} else {
nvram->size = DEFAULT_NVRAM_SIZE;
nvram->buf = g_malloc0(nvram->size);
}
if ((nvram->size < MIN_N... | {
"code": [
" spapr_rtas_register(\"nvram-fetch\", rtas_nvram_fetch);",
" spapr_rtas_register(\"nvram-store\", rtas_nvram_store);"
],
"line_no": [
35,
37
]
} | static int FUNC_0(VIOsPAPRDevice *VAR_0)
{
sPAPRNVRAM *nvram = VIO_SPAPR_NVRAM(VAR_0);
if (nvram->drive) {
nvram->size = bdrv_getlength(nvram->drive);
} else {
nvram->size = DEFAULT_NVRAM_SIZE;
nvram->buf = g_malloc0(nvram->size);
}
if ((nvram->size < MIN_NVRAM_S... | [
"static int FUNC_0(VIOsPAPRDevice *VAR_0)\n{",
"sPAPRNVRAM *nvram = VIO_SPAPR_NVRAM(VAR_0);",
"if (nvram->drive) {",
"nvram->size = bdrv_getlength(nvram->drive);",
"} else {",
"nvram->size = DEFAULT_NVRAM_SIZE;",
"nvram->buf = g_malloc0(nvram->size);",
"}",
"if ((nvram->size < MIN_NVRAM_SIZE) || (nv... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
41
],
[
43
]
] |
7,200 | static CharDriverState *qemu_chr_open_pp(QemuOpts *opts)
{
const char *filename = qemu_opt_get(opts, "path");
CharDriverState *chr;
int fd;
fd = open(filename, O_RDWR);
if (fd < 0)
return NULL;
chr = g_malloc0(sizeof(CharDriverState));
chr->opaque = (void *)(intptr_t)fd;... | true | qemu | b181e04777da67acbc7448f87e4ae9f1518e08b2 | static CharDriverState *qemu_chr_open_pp(QemuOpts *opts)
{
const char *filename = qemu_opt_get(opts, "path");
CharDriverState *chr;
int fd;
fd = open(filename, O_RDWR);
if (fd < 0)
return NULL;
chr = g_malloc0(sizeof(CharDriverState));
chr->opaque = (void *)(intptr_t)fd;... | {
"code": [
" fd = open(filename, O_RDWR);"
],
"line_no": [
13
]
} | static CharDriverState *FUNC_0(QemuOpts *opts)
{
const char *VAR_0 = qemu_opt_get(opts, "path");
CharDriverState *chr;
int VAR_1;
VAR_1 = open(VAR_0, O_RDWR);
if (VAR_1 < 0)
return NULL;
chr = g_malloc0(sizeof(CharDriverState));
chr->opaque = (void *)(intptr_t)VAR_1;
... | [
"static CharDriverState *FUNC_0(QemuOpts *opts)\n{",
"const char *VAR_0 = qemu_opt_get(opts, \"path\");",
"CharDriverState *chr;",
"int VAR_1;",
"VAR_1 = open(VAR_0, O_RDWR);",
"if (VAR_1 < 0)\nreturn NULL;",
"chr = g_malloc0(sizeof(CharDriverState));",
"chr->opaque = (void *)(intptr_t)VAR_1;",
"chr... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
7,201 | static void pvpanic_fw_cfg(ISADevice *dev, FWCfgState *fw_cfg)
{
PVPanicState *s = ISA_PVPANIC_DEVICE(dev);
fw_cfg_add_file(fw_cfg, "etc/pvpanic-port",
g_memdup(&s->ioport, sizeof(s->ioport)),
sizeof(s->ioport));
}
| true | qemu | fea7d5966a54a5e5400cd38897a95ea576b5af4d | static void pvpanic_fw_cfg(ISADevice *dev, FWCfgState *fw_cfg)
{
PVPanicState *s = ISA_PVPANIC_DEVICE(dev);
fw_cfg_add_file(fw_cfg, "etc/pvpanic-port",
g_memdup(&s->ioport, sizeof(s->ioport)),
sizeof(s->ioport));
}
| {
"code": [
" fw_cfg_add_file(fw_cfg, \"etc/pvpanic-port\",",
" g_memdup(&s->ioport, sizeof(s->ioport)),",
" sizeof(s->ioport));"
],
"line_no": [
9,
11,
13
]
} | static void FUNC_0(ISADevice *VAR_0, FWCfgState *VAR_1)
{
PVPanicState *s = ISA_PVPANIC_DEVICE(VAR_0);
fw_cfg_add_file(VAR_1, "etc/pvpanic-port",
g_memdup(&s->ioport, sizeof(s->ioport)),
sizeof(s->ioport));
}
| [
"static void FUNC_0(ISADevice *VAR_0, FWCfgState *VAR_1)\n{",
"PVPanicState *s = ISA_PVPANIC_DEVICE(VAR_0);",
"fw_cfg_add_file(VAR_1, \"etc/pvpanic-port\",\ng_memdup(&s->ioport, sizeof(s->ioport)),\nsizeof(s->ioport));",
"}"
] | [
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9,
11,
13
],
[
15
]
] |
7,202 | int net_client_init(Monitor *mon, const char *device, const char *p)
{
char buf[1024];
int vlan_id, ret;
VLANState *vlan;
char *name = NULL;
vlan_id = 0;
if (get_param_value(buf, sizeof(buf), "vlan", p)) {
vlan_id = strtol(buf, NULL, 0);
}
vlan = qemu_find_vlan(vlan_i... | true | qemu | 0752706de257b38763006ff5bb6b39a97e669ba2 | int net_client_init(Monitor *mon, const char *device, const char *p)
{
char buf[1024];
int vlan_id, ret;
VLANState *vlan;
char *name = NULL;
vlan_id = 0;
if (get_param_value(buf, sizeof(buf), "vlan", p)) {
vlan_id = strtol(buf, NULL, 0);
}
vlan = qemu_find_vlan(vlan_i... | {
"code": [
" slirp_guestfwd(QTAILQ_FIRST(&slirp_stacks), mon, p, 1);",
" ret = 0;",
" tap_set_sndbuf(s, sndbuf_str, mon);",
" ret = 0;"
],
"line_no": [
419,
185,
571,
573
]
} | int FUNC_0(Monitor *VAR_0, const char *VAR_1, const char *VAR_2)
{
char VAR_3[1024];
int VAR_4, VAR_5;
VLANState *vlan;
char *VAR_6 = NULL;
VAR_4 = 0;
if (get_param_value(VAR_3, sizeof(VAR_3), "vlan", VAR_2)) {
VAR_4 = strtol(VAR_3, NULL, 0);
}
vlan = qemu_find_vlan(V... | [
"int FUNC_0(Monitor *VAR_0, const char *VAR_1, const char *VAR_2)\n{",
"char VAR_3[1024];",
"int VAR_4, VAR_5;",
"VLANState *vlan;",
"char *VAR_6 = NULL;",
"VAR_4 = 0;",
"if (get_param_value(VAR_3, sizeof(VAR_3), \"vlan\", VAR_2)) {",
"VAR_4 = strtol(VAR_3, NULL, 0);",
"}",
"vlan = qemu_find_vlan(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[... |
7,203 | static void cmv_decode_intra(CmvContext * s, const uint8_t *buf, const uint8_t *buf_end){
unsigned char *dst = s->frame.data[0];
int i;
for (i=0; i < s->avctx->height && buf+s->avctx->width<=buf_end; i++) {
memcpy(dst, buf, s->avctx->width);
dst += s->frame.linesize[0];
buf +... | true | FFmpeg | e9064c9ce8ed18c3a3aab61e58e663b8f5b0c551 | static void cmv_decode_intra(CmvContext * s, const uint8_t *buf, const uint8_t *buf_end){
unsigned char *dst = s->frame.data[0];
int i;
for (i=0; i < s->avctx->height && buf+s->avctx->width<=buf_end; i++) {
memcpy(dst, buf, s->avctx->width);
dst += s->frame.linesize[0];
buf +... | {
"code": [
" for (i=0; i < s->avctx->height && buf+s->avctx->width<=buf_end; i++) {"
],
"line_no": [
9
]
} | static void FUNC_0(CmvContext * VAR_0, const uint8_t *VAR_1, const uint8_t *VAR_2){
unsigned char *VAR_3 = VAR_0->frame.data[0];
int VAR_4;
for (VAR_4=0; VAR_4 < VAR_0->avctx->height && VAR_1+VAR_0->avctx->width<=VAR_2; VAR_4++) {
memcpy(VAR_3, VAR_1, VAR_0->avctx->width);
VAR_3 += VA... | [
"static void FUNC_0(CmvContext * VAR_0, const uint8_t *VAR_1, const uint8_t *VAR_2){",
"unsigned char *VAR_3 = VAR_0->frame.data[0];",
"int VAR_4;",
"for (VAR_4=0; VAR_4 < VAR_0->avctx->height && VAR_1+VAR_0->avctx->width<=VAR_2; VAR_4++) {",
"memcpy(VAR_3, VAR_1, VAR_0->avctx->width);",
"VAR_3 += VAR_0->... | [
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
7,205 | int av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags)
{
BufferSinkContext *buf = ctx->priv;
AVFilterLink *inlink = ctx->inputs[0];
int ret;
AVFrame *cur_frame;
/* no picref available, fetch it from the filterchain */
if (!av_fifo_size(buf->fifo)) {
... | true | FFmpeg | d8dccf69ff2df7014a2bb8e0e17828a820f45b27 | int av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags)
{
BufferSinkContext *buf = ctx->priv;
AVFilterLink *inlink = ctx->inputs[0];
int ret;
AVFrame *cur_frame;
if (!av_fifo_size(buf->fifo)) {
if (flags & AV_BUFFERSINK_FLAG_NO_REQUEST)
... | {
"code": [
"int av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags)"
],
"line_no": [
1
]
} | int FUNC_0(AVFilterContext *VAR_0, AVFrame *VAR_1, int VAR_2)
{
BufferSinkContext *buf = VAR_0->priv;
AVFilterLink *inlink = VAR_0->inputs[0];
int VAR_3;
AVFrame *cur_frame;
if (!av_fifo_size(buf->fifo)) {
if (VAR_2 & AV_BUFFERSINK_FLAG_NO_REQUEST)
return AVERROR(... | [
"int FUNC_0(AVFilterContext *VAR_0, AVFrame *VAR_1, int VAR_2)\n{",
"BufferSinkContext *buf = VAR_0->priv;",
"AVFilterLink *inlink = VAR_0->inputs[0];",
"int VAR_3;",
"AVFrame *cur_frame;",
"if (!av_fifo_size(buf->fifo)) {",
"if (VAR_2 & AV_BUFFERSINK_FLAG_NO_REQUEST)\nreturn AVERROR(EAGAIN);",
"if ((... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19,
21
],
[
23,
25
],
[
27
],
[
31,
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
7,207 | static int dump_iterate(DumpState *s)
{
RAMBlock *block;
int64_t size;
int ret;
while (1) {
block = s->block;
size = block->length;
if (s->has_filter) {
size -= s->start;
if (s->begin + s->length < block->offset + block->length) {
... | true | qemu | 56c4bfb3f07f3107894c00281276aea4f5e8834d | static int dump_iterate(DumpState *s)
{
RAMBlock *block;
int64_t size;
int ret;
while (1) {
block = s->block;
size = block->length;
if (s->has_filter) {
size -= s->start;
if (s->begin + s->length < block->offset + block->length) {
... | {
"code": [
" RAMBlock *block;",
" RAMBlock *block;",
" if (s->begin + s->length < block->offset + block->length) {",
" RAMBlock *block;",
" block = s->block;",
" size = block->length;",
" if (s->begin + s->length < block->offset + block->length... | static int FUNC_0(DumpState *VAR_0)
{
RAMBlock *block;
int64_t size;
int VAR_1;
while (1) {
block = VAR_0->block;
size = block->length;
if (VAR_0->has_filter) {
size -= VAR_0->start;
if (VAR_0->begin + VAR_0->length < block->offset + block->l... | [
"static int FUNC_0(DumpState *VAR_0)\n{",
"RAMBlock *block;",
"int64_t size;",
"int VAR_1;",
"while (1) {",
"block = VAR_0->block;",
"size = block->length;",
"if (VAR_0->has_filter) {",
"size -= VAR_0->start;",
"if (VAR_0->begin + VAR_0->length < block->offset + block->length) {",
"size -= block... | [
0,
1,
0,
0,
0,
1,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
... |
7,208 | static void lsi_reg_writeb(LSIState *s, int offset, uint8_t val)
{
#define CASE_SET_REG24(name, addr) \
case addr : s->name &= 0xffffff00; s->name |= val; break; \
case addr + 1: s->name &= 0xffff00ff; s->name |= val << 8; break; \
case addr + 2: s->name &= 0xff00ffff; s->name |= val << 16; b... | true | qemu | 2f0772c5b4818d4b2078be9dace0036d1030faee | static void lsi_reg_writeb(LSIState *s, int offset, uint8_t val)
{
#define CASE_SET_REG24(name, addr) \
case addr : s->name &= 0xffffff00; s->name |= val; break; \
case addr + 1: s->name &= 0xffff00ff; s->name |= val << 8; break; \
case addr + 2: s->name &= 0xff00ffff; s->name |= val << 16; b... | {
"code": [
" lsi_soft_reset(s);"
],
"line_no": [
183
]
} | static void FUNC_0(LSIState *VAR_0, int VAR_1, uint8_t VAR_2)
{
#define CASE_SET_REG24(name, addr) \
case addr : VAR_0->name &= 0xffffff00; VAR_0->name |= VAR_2; break; \
case addr + 1: VAR_0->name &= 0xffff00ff; VAR_0->name |= VAR_2 << 8; break; \
case addr + 2: VAR_0->name &= 0xff00ffff; VA... | [
"static void FUNC_0(LSIState *VAR_0, int VAR_1, uint8_t VAR_2)\n{",
"#define CASE_SET_REG24(name, addr) \\\ncase addr : VAR_0->name &= 0xffffff00; VAR_0->name |= VAR_2; break; \\",
"case addr + 1: VAR_0->name &= 0xffff00ff; VAR_0->name |= VAR_2 << 8; break; \\",
"case addr + 2: VAR_0->name &= 0xff00... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
31,
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[
51
... |
7,209 | static inline void tcg_out_op(TCGContext *s, int opc, const TCGArg *args,
const int *const_args)
{
int c;
switch (opc) {
case INDEX_op_exit_tb:
tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_I0, args[0]);
tcg_out32(s, JMPL | INSN_RD(TCG_REG_G0) | INSN_RS1(TCG_RE... | false | qemu | f02ca5cbeaf86038834c1953247a1579d7921927 | static inline void tcg_out_op(TCGContext *s, int opc, const TCGArg *args,
const int *const_args)
{
int c;
switch (opc) {
case INDEX_op_exit_tb:
tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_I0, args[0]);
tcg_out32(s, JMPL | INSN_RD(TCG_REG_G0) | INSN_RS1(TCG_RE... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(TCGContext *VAR_0, int VAR_1, const TCGArg *VAR_2,
const int *VAR_3)
{
int VAR_4;
switch (VAR_1) {
case INDEX_op_exit_tb:
tcg_out_movi(VAR_0, TCG_TYPE_PTR, TCG_REG_I0, VAR_2[0]);
tcg_out32(VAR_0, JMPL | INSN_RD(TCG_REG_G0) | IN... | [
"static inline void FUNC_0(TCGContext *VAR_0, int VAR_1, const TCGArg *VAR_2,\nconst int *VAR_3)\n{",
"int VAR_4;",
"switch (VAR_1) {",
"case INDEX_op_exit_tb:\ntcg_out_movi(VAR_0, TCG_TYPE_PTR, TCG_REG_I0, VAR_2[0]);",
"tcg_out32(VAR_0, JMPL | INSN_RD(TCG_REG_G0) | INSN_RS1(TCG_REG_I7) |\nINSN_IMM13(8));",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13,
15
],
[
17,
19
],
[
21,
23
],
[
25
],
[
27,
29
],
[
33,
35
],
[
37,
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[
53... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.