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 |
|---|---|---|---|---|---|---|---|---|---|---|
3,424 | static void encode_quant_matrix(VC2EncContext *s)
{
int level, custom_quant_matrix = 0;
if (s->wavelet_depth > 4 || s->quant_matrix != VC2_QM_DEF)
custom_quant_matrix = 1;
put_bits(&s->pb, 1, custom_quant_matrix);
if (custom_quant_matrix) {
init_custom_qm(s);
put_vc2_ue_u... | true | FFmpeg | b88be742fac7a77a8095e8155ba8790db4b77568 | static void encode_quant_matrix(VC2EncContext *s)
{
int level, custom_quant_matrix = 0;
if (s->wavelet_depth > 4 || s->quant_matrix != VC2_QM_DEF)
custom_quant_matrix = 1;
put_bits(&s->pb, 1, custom_quant_matrix);
if (custom_quant_matrix) {
init_custom_qm(s);
put_vc2_ue_u... | {
"code": [
" } else {",
" int level, custom_quant_matrix = 0;",
" if (s->wavelet_depth > 4 || s->quant_matrix != VC2_QM_DEF)",
" custom_quant_matrix = 1;",
" put_bits(&s->pb, 1, custom_quant_matrix);",
" if (custom_quant_matrix) {",
" init_custom_qm(s);",
... | static void FUNC_0(VC2EncContext *VAR_0)
{
int VAR_1, VAR_2 = 0;
if (VAR_0->wavelet_depth > 4 || VAR_0->quant_matrix != VC2_QM_DEF)
VAR_2 = 1;
put_bits(&VAR_0->pb, 1, VAR_2);
if (VAR_2) {
init_custom_qm(VAR_0);
put_vc2_ue_uint(&VAR_0->pb, VAR_0->quant[0][0]);
for... | [
"static void FUNC_0(VC2EncContext *VAR_0)\n{",
"int VAR_1, VAR_2 = 0;",
"if (VAR_0->wavelet_depth > 4 || VAR_0->quant_matrix != VC2_QM_DEF)\nVAR_2 = 1;",
"put_bits(&VAR_0->pb, 1, VAR_2);",
"if (VAR_2) {",
"init_custom_qm(VAR_0);",
"put_vc2_ue_uint(&VAR_0->pb, VAR_0->quant[0][0]);",
"for (VAR_1 = 0; VA... | [
0,
1,
1,
1,
1,
1,
0,
1,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[... |
3,425 | static void fix_bitshift(ShortenContext *s, int32_t *buffer)
{
int i;
if (s->bitshift != 0)
for (i = 0; i < s->blocksize; i++)
buffer[s->nwrap + i] <<= s->bitshift;
}
| true | FFmpeg | f42b3195d3f2692a4dfc0a8668bb4ac35301f2ed | static void fix_bitshift(ShortenContext *s, int32_t *buffer)
{
int i;
if (s->bitshift != 0)
for (i = 0; i < s->blocksize; i++)
buffer[s->nwrap + i] <<= s->bitshift;
}
| {
"code": [
" buffer[s->nwrap + i] <<= s->bitshift;"
],
"line_no": [
13
]
} | static void FUNC_0(ShortenContext *VAR_0, int32_t *VAR_1)
{
int VAR_2;
if (VAR_0->bitshift != 0)
for (VAR_2 = 0; VAR_2 < VAR_0->blocksize; VAR_2++)
VAR_1[VAR_0->nwrap + VAR_2] <<= VAR_0->bitshift;
}
| [
"static void FUNC_0(ShortenContext *VAR_0, int32_t *VAR_1)\n{",
"int VAR_2;",
"if (VAR_0->bitshift != 0)\nfor (VAR_2 = 0; VAR_2 < VAR_0->blocksize; VAR_2++)",
"VAR_1[VAR_0->nwrap + VAR_2] <<= VAR_0->bitshift;",
"}"
] | [
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
],
[
15
]
] |
3,426 | static void wav_capture_destroy (void *opaque)
{
WAVState *wav = opaque;
AUD_del_capture (wav->cap, wav);
} | true | qemu | 7bdfd907e7072e380f325e735d99677df53f00ec | static void wav_capture_destroy (void *opaque)
{
WAVState *wav = opaque;
AUD_del_capture (wav->cap, wav);
} | {
"code": [],
"line_no": []
} | static void FUNC_0 (void *VAR_0)
{
WAVState *wav = VAR_0;
AUD_del_capture (wav->cap, wav);
} | [
"static void FUNC_0 (void *VAR_0)\n{",
"WAVState *wav = VAR_0;",
"AUD_del_capture (wav->cap, wav);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
12
]
] |
3,427 | static uint32_t m5206_mbar_readw(void *opaque, target_phys_addr_t offset)
{
m5206_mbar_state *s = (m5206_mbar_state *)opaque;
int width;
offset &= 0x3ff;
if (offset > 0x200) {
hw_error("Bad MBAR read offset 0x%x", (int)offset);
}
width = m5206_mbar_width[offset >> 2];
if (wi... | true | qemu | a32354e206895400d17c3de9a8df1de96d3df289 | static uint32_t m5206_mbar_readw(void *opaque, target_phys_addr_t offset)
{
m5206_mbar_state *s = (m5206_mbar_state *)opaque;
int width;
offset &= 0x3ff;
if (offset > 0x200) {
hw_error("Bad MBAR read offset 0x%x", (int)offset);
}
width = m5206_mbar_width[offset >> 2];
if (wi... | {
"code": [
" if (offset > 0x200) {",
" if (offset > 0x200) {",
" if (offset > 0x200) {",
" if (offset > 0x200) {",
" if (offset > 0x200) {",
" if (offset > 0x200) {"
],
"line_no": [
11,
11,
11,
11,
11,
11
]
} | static uint32_t FUNC_0(void *opaque, target_phys_addr_t offset)
{
m5206_mbar_state *s = (m5206_mbar_state *)opaque;
int VAR_0;
offset &= 0x3ff;
if (offset > 0x200) {
hw_error("Bad MBAR read offset 0x%x", (int)offset);
}
VAR_0 = m5206_mbar_width[offset >> 2];
if (VAR_0 > 2) {... | [
"static uint32_t FUNC_0(void *opaque, target_phys_addr_t offset)\n{",
"m5206_mbar_state *s = (m5206_mbar_state *)opaque;",
"int VAR_0;",
"offset &= 0x3ff;",
"if (offset > 0x200) {",
"hw_error(\"Bad MBAR read offset 0x%x\", (int)offset);",
"}",
"VAR_0 = m5206_mbar_width[offset >> 2];",
"if (VAR_0 > 2... | [
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
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[... |
3,428 | uint32_t pci_data_read(PCIBus *s, uint32_t addr, int len)
{
PCIDevice *pci_dev = pci_dev_find_by_addr(s, addr);
uint32_t config_addr = addr & (PCI_CONFIG_SPACE_SIZE - 1);
uint32_t val;
assert(len == 1 || len == 2 || len == 4);
if (!pci_dev) {
return ~0x0;
}
val = pci_dev... | true | qemu | 42e4126b793d15ec40f3a84017e1d8afecda1b6d | uint32_t pci_data_read(PCIBus *s, uint32_t addr, int len)
{
PCIDevice *pci_dev = pci_dev_find_by_addr(s, addr);
uint32_t config_addr = addr & (PCI_CONFIG_SPACE_SIZE - 1);
uint32_t val;
assert(len == 1 || len == 2 || len == 4);
if (!pci_dev) {
return ~0x0;
}
val = pci_dev... | {
"code": [
" assert(len == 1 || len == 2 || len == 4);",
" assert(len == 1 || len == 2 || len == 4);",
" val = pci_dev->config_read(pci_dev, config_addr, len);",
" assert(len == 1 || len == 2 || len == 4);"
],
"line_no": [
13,
13,
23,
13
]
} | uint32_t FUNC_0(PCIBus *s, uint32_t addr, int len)
{
PCIDevice *pci_dev = pci_dev_find_by_addr(s, addr);
uint32_t config_addr = addr & (PCI_CONFIG_SPACE_SIZE - 1);
uint32_t val;
assert(len == 1 || len == 2 || len == 4);
if (!pci_dev) {
return ~0x0;
}
val = pci_dev->confi... | [
"uint32_t FUNC_0(PCIBus *s, uint32_t addr, int len)\n{",
"PCIDevice *pci_dev = pci_dev_find_by_addr(s, addr);",
"uint32_t config_addr = addr & (PCI_CONFIG_SPACE_SIZE - 1);",
"uint32_t val;",
"assert(len == 1 || len == 2 || len == 4);",
"if (!pci_dev) {",
"return ~0x0;",
"}",
"val = pci_dev->config_r... | [
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25,
27
],
[
31
],
[
33
]
] |
3,429 | static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
MpegEncContext * const s = &h->s;
AVCodecContext * const avctx= s->avctx;
int buf_index=0;
H264Context *hx; ///< thread context
int context_count = 0;
int next_avc= h->is_avc ? 0 : buf_size;
h->max_contex... | true | FFmpeg | 0424e052f83adc422d8a746e3cdc5ab6bc28679e | static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
MpegEncContext * const s = &h->s;
AVCodecContext * const avctx= s->avctx;
int buf_index=0;
H264Context *hx;
int context_count = 0;
int next_avc= h->is_avc ? 0 : buf_size;
h->max_contexts = (HAVE_THREADS ... | {
"code": [
" int buf_index=0;",
" int context_count = 0;",
" int next_avc= h->is_avc ? 0 : buf_size;",
" decode_postinit(h);"
],
"line_no": [
7,
11,
13,
219
]
} | static int FUNC_0(H264Context *VAR_0, const uint8_t *VAR_1, int VAR_2){
MpegEncContext * const s = &VAR_0->s;
AVCodecContext * const avctx= s->avctx;
int VAR_3=0;
H264Context *hx;
int VAR_4 = 0;
int VAR_5= VAR_0->is_avc ? 0 : VAR_2;
VAR_0->max_contexts = (HAVE_THREADS && (s->avctx-... | [
"static int FUNC_0(H264Context *VAR_0, const uint8_t *VAR_1, int VAR_2){",
"MpegEncContext * const s = &VAR_0->s;",
"AVCodecContext * const avctx= s->avctx;",
"int VAR_3=0;",
"H264Context *hx;",
"int VAR_4 = 0;",
"int VAR_5= VAR_0->is_avc ? 0 : VAR_2;",
"VAR_0->max_contexts = (HAVE_THREADS && (s->avct... | [
0,
0,
0,
1,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
45
],
[
47
... |
3,430 | static int nvdec_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
{
NVDECContext *ctx = avctx->internal->hwaccel_priv_data;
void *tmp;
tmp = av_fast_realloc(ctx->slice_offsets, &ctx->slice_offsets_allocated,
(ctx->nb_slices + 1) * sizeof(*ctx->sl... | false | FFmpeg | 4c7b023d56e09a78a587d036db1b64bf7c493b3d | static int nvdec_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
{
NVDECContext *ctx = avctx->internal->hwaccel_priv_data;
void *tmp;
tmp = av_fast_realloc(ctx->slice_offsets, &ctx->slice_offsets_allocated,
(ctx->nb_slices + 1) * sizeof(*ctx->sl... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, const uint8_t *VAR_1, uint32_t VAR_2)
{
NVDECContext *ctx = VAR_0->internal->hwaccel_priv_data;
void *VAR_3;
VAR_3 = av_fast_realloc(ctx->slice_offsets, &ctx->slice_offsets_allocated,
(ctx->nb_slices + 1) * sizeof(*ctx->slice_offsets)... | [
"static int FUNC_0(AVCodecContext *VAR_0, const uint8_t *VAR_1, uint32_t VAR_2)\n{",
"NVDECContext *ctx = VAR_0->internal->hwaccel_priv_data;",
"void *VAR_3;",
"VAR_3 = av_fast_realloc(ctx->slice_offsets, &ctx->slice_offsets_allocated,\n(ctx->nb_slices + 1) * sizeof(*ctx->slice_offsets));",
"if (!VAR_3)\nre... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15,
17
],
[
19
],
[
23,
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
]
] |
3,431 | static void omap2_inth_write(void *opaque, target_phys_addr_t addr,
uint64_t value, unsigned size)
{
struct omap_intr_handler_s *s = (struct omap_intr_handler_s *) opaque;
int offset = addr;
int bank_no, line_no;
struct omap_intr_handler_bank_s *bank = NULL;
if ... | false | qemu | 0919ac787641db11024912651f3bc5764d4f1286 | static void omap2_inth_write(void *opaque, target_phys_addr_t addr,
uint64_t value, unsigned size)
{
struct omap_intr_handler_s *s = (struct omap_intr_handler_s *) opaque;
int offset = addr;
int bank_no, line_no;
struct omap_intr_handler_bank_s *bank = NULL;
if ... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
struct omap_intr_handler_s *VAR_4 = (struct omap_intr_handler_s *) VAR_0;
int VAR_5 = VAR_1;
int VAR_6, VAR_7;
struct omap_intr_handler_bank_s *VAR_8 = NULL;
if ((VAR_5 &... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"struct omap_intr_handler_s *VAR_4 = (struct omap_intr_handler_s *) VAR_0;",
"int VAR_5 = VAR_1;",
"int VAR_6, VAR_7;",
"struct omap_intr_handler_bank_s *VAR_8 = NULL;",
"if ((VAR_5 & 0xf80) == 0x80) {",
"VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
49,
51
... |
3,432 | static bool pte32_match(target_ulong pte0, target_ulong pte1,
bool secondary, target_ulong ptem)
{
return (pte0 & HPTE32_V_VALID)
&& (secondary == !!(pte0 & HPTE32_V_SECONDARY))
&& HPTE32_V_COMPARE(pte0, ptem);
}
| false | qemu | aea390e4be652d5b5457771d25eded0dba14fe37 | static bool pte32_match(target_ulong pte0, target_ulong pte1,
bool secondary, target_ulong ptem)
{
return (pte0 & HPTE32_V_VALID)
&& (secondary == !!(pte0 & HPTE32_V_SECONDARY))
&& HPTE32_V_COMPARE(pte0, ptem);
}
| {
"code": [],
"line_no": []
} | static bool FUNC_0(target_ulong pte0, target_ulong pte1,
bool secondary, target_ulong ptem)
{
return (pte0 & HPTE32_V_VALID)
&& (secondary == !!(pte0 & HPTE32_V_SECONDARY))
&& HPTE32_V_COMPARE(pte0, ptem);
}
| [
"static bool FUNC_0(target_ulong pte0, target_ulong pte1,\nbool secondary, target_ulong ptem)\n{",
"return (pte0 & HPTE32_V_VALID)\n&& (secondary == !!(pte0 & HPTE32_V_SECONDARY))\n&& HPTE32_V_COMPARE(pte0, ptem);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7,
9,
11
],
[
13
]
] |
3,433 | static int hpet_init(SysBusDevice *dev)
{
HPETState *s = FROM_SYSBUS(HPETState, dev);
int i, iomemtype;
HPETTimer *timer;
if (hpet_cfg.count == UINT8_MAX) {
/* first instance */
hpet_cfg.count = 0;
}
if (hpet_cfg.count == 8) {
fprintf(stderr, "Only 8 instanc... | false | qemu | ee951a37d8873bff7aa58e23222dfd984111b6cb | static int hpet_init(SysBusDevice *dev)
{
HPETState *s = FROM_SYSBUS(HPETState, dev);
int i, iomemtype;
HPETTimer *timer;
if (hpet_cfg.count == UINT8_MAX) {
hpet_cfg.count = 0;
}
if (hpet_cfg.count == 8) {
fprintf(stderr, "Only 8 instances of HPET is allowe... | {
"code": [],
"line_no": []
} | static int FUNC_0(SysBusDevice *VAR_0)
{
HPETState *s = FROM_SYSBUS(HPETState, VAR_0);
int VAR_1, VAR_2;
HPETTimer *timer;
if (hpet_cfg.count == UINT8_MAX) {
hpet_cfg.count = 0;
}
if (hpet_cfg.count == 8) {
fprintf(stderr, "Only 8 instances of HPET is allow... | [
"static int FUNC_0(SysBusDevice *VAR_0)\n{",
"HPETState *s = FROM_SYSBUS(HPETState, VAR_0);",
"int VAR_1, VAR_2;",
"HPETTimer *timer;",
"if (hpet_cfg.count == UINT8_MAX) {",
"hpet_cfg.count = 0;",
"}",
"if (hpet_cfg.count == 8) {",
"fprintf(stderr, \"Only 8 instances of HPET is allowed\\n\");",
"r... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
... |
3,434 | static int send_png_rect(VncState *vs, int x, int y, int w, int h,
QDict *palette)
{
png_byte color_type;
png_structp png_ptr;
png_infop info_ptr;
png_colorp png_palette = NULL;
size_t offset;
int level = tight_conf[vs->tight_compression].raw_zlib_level;
uin... | false | qemu | 3941bf6fb1c98a39bf8a0cfb4feacaef2a23d0db | static int send_png_rect(VncState *vs, int x, int y, int w, int h,
QDict *palette)
{
png_byte color_type;
png_structp png_ptr;
png_infop info_ptr;
png_colorp png_palette = NULL;
size_t offset;
int level = tight_conf[vs->tight_compression].raw_zlib_level;
uin... | {
"code": [],
"line_no": []
} | static int FUNC_0(VncState *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4,
QDict *VAR_5)
{
png_byte color_type;
png_structp png_ptr;
png_infop info_ptr;
png_colorp png_palette = NULL;
size_t offset;
int VAR_6 = tight_conf[VAR_0->tight_compression].raw_zlib_le... | [
"static int FUNC_0(VncState *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4,\nQDict *VAR_5)\n{",
"png_byte color_type;",
"png_structp png_ptr;",
"png_infop info_ptr;",
"png_colorp png_palette = NULL;",
"size_t offset;",
"int VAR_6 = tight_conf[VAR_0->tight_compression].raw_zlib_level;",
"uint8_t *b... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
31,
33
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[... |
3,435 | START_TEST(qdict_put_exists_test)
{
int value;
const char *key = "exists";
qdict_put(tests_dict, key, qint_from_int(1));
qdict_put(tests_dict, key, qint_from_int(2));
value = qdict_get_int(tests_dict, key);
fail_unless(value == 2);
fail_unless(qdict_size(tests_dict) == 1);
}
| false | qemu | ac531cb6e542b1e61d668604adf9dc5306a948c0 | START_TEST(qdict_put_exists_test)
{
int value;
const char *key = "exists";
qdict_put(tests_dict, key, qint_from_int(1));
qdict_put(tests_dict, key, qint_from_int(2));
value = qdict_get_int(tests_dict, key);
fail_unless(value == 2);
fail_unless(qdict_size(tests_dict) == 1);
}
| {
"code": [],
"line_no": []
} | FUNC_0(VAR_0)
{
int VAR_1;
const char *VAR_2 = "exists";
qdict_put(tests_dict, VAR_2, qint_from_int(1));
qdict_put(tests_dict, VAR_2, qint_from_int(2));
VAR_1 = qdict_get_int(tests_dict, VAR_2);
fail_unless(VAR_1 == 2);
fail_unless(qdict_size(tests_dict) == 1);
}
| [
"FUNC_0(VAR_0)\n{",
"int VAR_1;",
"const char *VAR_2 = \"exists\";",
"qdict_put(tests_dict, VAR_2, qint_from_int(1));",
"qdict_put(tests_dict, VAR_2, qint_from_int(2));",
"VAR_1 = qdict_get_int(tests_dict, VAR_2);",
"fail_unless(VAR_1 == 2);",
"fail_unless(qdict_size(tests_dict) == 1);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
23
],
[
25
]
] |
3,438 | static void gt64120_writel (void *opaque, target_phys_addr_t addr,
uint64_t val, unsigned size)
{
GT64120State *s = opaque;
PCIHostState *phb = PCI_HOST_BRIDGE(s);
uint32_t saddr;
if (!(s->regs[GT_CPU] & 0x00001000))
val = bswap32(val);
saddr = (addr &... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void gt64120_writel (void *opaque, target_phys_addr_t addr,
uint64_t val, unsigned size)
{
GT64120State *s = opaque;
PCIHostState *phb = PCI_HOST_BRIDGE(s);
uint32_t saddr;
if (!(s->regs[GT_CPU] & 0x00001000))
val = bswap32(val);
saddr = (addr &... | {
"code": [],
"line_no": []
} | static void FUNC_0 (void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
GT64120State *s = VAR_0;
PCIHostState *phb = PCI_HOST_BRIDGE(s);
uint32_t saddr;
if (!(s->regs[GT_CPU] & 0x00001000))
VAR_2 = bswap32(VAR_2);
saddr = (VAR_1 & ... | [
"static void FUNC_0 (void *VAR_0, target_phys_addr_t VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"GT64120State *s = VAR_0;",
"PCIHostState *phb = PCI_HOST_BRIDGE(s);",
"uint32_t saddr;",
"if (!(s->regs[GT_CPU] & 0x00001000))\nVAR_2 = bswap32(VAR_2);",
"saddr = (VAR_1 & 0xfff) >> 2;",
"switch (saddr) {"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
21
],
[
23
],
[
29,
31
],
[
33
],
[
35,
39
],
[
45,
47
],
[
49
],
[
51
],
[
53
],
[
55,
57
],
[
59
],
[
61
... |
3,439 | static void tcg_constant_folding(TCGContext *s)
{
int oi, oi_next, nb_temps, nb_globals;
/* Array VALS has an element for each temp.
If this temp holds a constant then its value is kept in VALS' element.
If this temp is a copy of other ones then the other copies are
available throug... | false | qemu | 36e60ef6ac5d8a262d0fbeedfdb2b588514cb1ea | static void tcg_constant_folding(TCGContext *s)
{
int oi, oi_next, nb_temps, nb_globals;
nb_temps = s->nb_temps;
nb_globals = s->nb_globals;
reset_all_temps(nb_temps);
for (oi = s->gen_first_op_idx; oi >= 0; oi = oi_next) {
tcg_target_ulong mask, partmask, affected;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(TCGContext *VAR_0)
{
int VAR_1, VAR_2, VAR_3, VAR_4;
VAR_3 = VAR_0->VAR_3;
VAR_4 = VAR_0->VAR_4;
reset_all_temps(VAR_3);
for (VAR_1 = VAR_0->gen_first_op_idx; VAR_1 >= 0; VAR_1 = VAR_2) {
tcg_target_ulong mask, partmask, affected;
int VAR_... | [
"static void FUNC_0(TCGContext *VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3, VAR_4;",
"VAR_3 = VAR_0->VAR_3;",
"VAR_4 = VAR_0->VAR_4;",
"reset_all_temps(VAR_3);",
"for (VAR_1 = VAR_0->gen_first_op_idx; VAR_1 >= 0; VAR_1 = VAR_2) {",
"tcg_target_ulong mask, partmask, affected;",
"int VAR_5, VAR_6, VAR_7;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
],
[
5... |
3,441 | static inline void qpel_motion(MpegEncContext *s,
uint8_t *dest_y,
uint8_t *dest_cb,
uint8_t *dest_cr,
int field_based, int bottom_field,
int field_select, uint... | false | FFmpeg | 0242351390643d176b10600c2eb854414f9559e6 | static inline void qpel_motion(MpegEncContext *s,
uint8_t *dest_y,
uint8_t *dest_cb,
uint8_t *dest_cr,
int field_based, int bottom_field,
int field_select, uint... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(MpegEncContext *VAR_0,
uint8_t *VAR_1,
uint8_t *VAR_2,
uint8_t *VAR_3,
int VAR_4, int VAR_5,
int VAR_6, uint8_t **VAR_7,
... | [
"static inline void FUNC_0(MpegEncContext *VAR_0,\nuint8_t *VAR_1,\nuint8_t *VAR_2,\nuint8_t *VAR_3,\nint VAR_4, int VAR_5,\nint VAR_6, uint8_t **VAR_7,\nVAR_8 (*pix_op)[4],\nVAR_9 (*qpix_op)[16],\nint VAR_10, int VAR_11, int VAR_12)\n{",
"uint8_t *ptr_y, *ptr_cb, *ptr_cr;",
"int VAR_13, VAR_14, VAR_15, VAR_16,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11,
13,
15,
17,
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
... |
3,442 | void do_m68k_simcall(CPUM68KState *env, int nr)
{
uint32_t *args;
args = (uint32_t *)(env->aregs[7] + 4);
switch (nr) {
case SYS_EXIT:
exit(ARG(0));
case SYS_READ:
check_err(env, read(ARG(0), (void *)ARG(1), ARG(2)));
break;
case SYS_WRITE:
check_err(... | false | qemu | ac2567b59d9e4afbcc31c71840d7fe8ef4eee857 | void do_m68k_simcall(CPUM68KState *env, int nr)
{
uint32_t *args;
args = (uint32_t *)(env->aregs[7] + 4);
switch (nr) {
case SYS_EXIT:
exit(ARG(0));
case SYS_READ:
check_err(env, read(ARG(0), (void *)ARG(1), ARG(2)));
break;
case SYS_WRITE:
check_err(... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUM68KState *VAR_0, int VAR_1)
{
uint32_t *args;
args = (uint32_t *)(VAR_0->aregs[7] + 4);
switch (VAR_1) {
case SYS_EXIT:
exit(ARG(0));
case SYS_READ:
check_err(VAR_0, read(ARG(0), (void *)ARG(1), ARG(2)));
break;
case SYS_WRITE:
check_e... | [
"void FUNC_0(CPUM68KState *VAR_0, int VAR_1)\n{",
"uint32_t *args;",
"args = (uint32_t *)(VAR_0->aregs[7] + 4);",
"switch (VAR_1) {",
"case SYS_EXIT:\nexit(ARG(0));",
"case SYS_READ:\ncheck_err(VAR_0, read(ARG(0), (void *)ARG(1), ARG(2)));",
"break;",
"case SYS_WRITE:\ncheck_err(VAR_0, write(ARG(0), (... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13,
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31,
33
],
[
35
],
[
37,
39
],
[
43
],
[
45,
47
],
[
49,
51
],
[
53... |
3,443 | static void do_change(const char *device, const char *target, const char *fmt)
{
if (strcmp(device, "vnc") == 0) {
do_change_vnc(target);
} else {
do_change_block(device, target, fmt);
}
}
| false | qemu | 2569da0cb64506ea05323544c26f3aaffbf3f9fe | static void do_change(const char *device, const char *target, const char *fmt)
{
if (strcmp(device, "vnc") == 0) {
do_change_vnc(target);
} else {
do_change_block(device, target, fmt);
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(const char *VAR_0, const char *VAR_1, const char *VAR_2)
{
if (strcmp(VAR_0, "vnc") == 0) {
do_change_vnc(VAR_1);
} else {
do_change_block(VAR_0, VAR_1, VAR_2);
}
}
| [
"static void FUNC_0(const char *VAR_0, const char *VAR_1, const char *VAR_2)\n{",
"if (strcmp(VAR_0, \"vnc\") == 0) {",
"do_change_vnc(VAR_1);",
"} else {",
"do_change_block(VAR_0, VAR_1, VAR_2);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
3,444 | aio_ctx_dispatch(GSource *source,
GSourceFunc callback,
gpointer user_data)
{
AioContext *ctx = (AioContext *) source;
assert(callback == NULL);
aio_dispatch(ctx, true);
return true;
}
| false | qemu | c2b38b277a7882a592f4f2ec955084b2b756daaa | aio_ctx_dispatch(GSource *source,
GSourceFunc callback,
gpointer user_data)
{
AioContext *ctx = (AioContext *) source;
assert(callback == NULL);
aio_dispatch(ctx, true);
return true;
}
| {
"code": [],
"line_no": []
} | FUNC_0(GSource *VAR_0,
GSourceFunc VAR_1,
gpointer VAR_2)
{
AioContext *ctx = (AioContext *) VAR_0;
assert(VAR_1 == NULL);
aio_dispatch(ctx, true);
return true;
}
| [
"FUNC_0(GSource *VAR_0,\nGSourceFunc VAR_1,\ngpointer VAR_2)\n{",
"AioContext *ctx = (AioContext *) VAR_0;",
"assert(VAR_1 == NULL);",
"aio_dispatch(ctx, true);",
"return true;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
3,445 | S390PCIBusDevice *s390_pci_find_dev_by_fid(uint32_t fid)
{
S390PCIBusDevice *pbdev;
int i;
S390pciState *s = s390_get_phb();
for (i = 0; i < PCI_SLOT_MAX; i++) {
pbdev = s->pbdev[i];
if (pbdev && pbdev->fid == fid) {
return pbdev;
}
}
return NUL... | false | qemu | e70377dfa4bbc2e101066ca35675bed4129c5a8c | S390PCIBusDevice *s390_pci_find_dev_by_fid(uint32_t fid)
{
S390PCIBusDevice *pbdev;
int i;
S390pciState *s = s390_get_phb();
for (i = 0; i < PCI_SLOT_MAX; i++) {
pbdev = s->pbdev[i];
if (pbdev && pbdev->fid == fid) {
return pbdev;
}
}
return NUL... | {
"code": [],
"line_no": []
} | S390PCIBusDevice *FUNC_0(uint32_t fid)
{
S390PCIBusDevice *pbdev;
int VAR_0;
S390pciState *s = s390_get_phb();
for (VAR_0 = 0; VAR_0 < PCI_SLOT_MAX; VAR_0++) {
pbdev = s->pbdev[VAR_0];
if (pbdev && pbdev->fid == fid) {
return pbdev;
}
}
return N... | [
"S390PCIBusDevice *FUNC_0(uint32_t fid)\n{",
"S390PCIBusDevice *pbdev;",
"int VAR_0;",
"S390pciState *s = s390_get_phb();",
"for (VAR_0 = 0; VAR_0 < PCI_SLOT_MAX; VAR_0++) {",
"pbdev = s->pbdev[VAR_0];",
"if (pbdev && pbdev->fid == fid) {",
"return pbdev;",
"}",
"}",
"return NULL;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
]
] |
3,446 | int qcrypto_pbkdf2_count_iters(QCryptoHashAlgorithm hash,
const uint8_t *key, size_t nkey,
const uint8_t *salt, size_t nsalt,
Error **errp)
{
uint8_t out[32];
long long int iterations = (1 << 15);
unsigned lo... | false | qemu | 59b060be184aff59cfa101c937c8139e66f452f2 | int qcrypto_pbkdf2_count_iters(QCryptoHashAlgorithm hash,
const uint8_t *key, size_t nkey,
const uint8_t *salt, size_t nsalt,
Error **errp)
{
uint8_t out[32];
long long int iterations = (1 << 15);
unsigned lo... | {
"code": [],
"line_no": []
} | int FUNC_0(QCryptoHashAlgorithm VAR_0,
const uint8_t *VAR_1, size_t VAR_2,
const uint8_t *VAR_3, size_t VAR_4,
Error **VAR_5)
{
uint8_t out[32];
long long int VAR_6 = (1 << 15);
unsigned long long VAR_7, VAR_... | [
"int FUNC_0(QCryptoHashAlgorithm VAR_0,\nconst uint8_t *VAR_1, size_t VAR_2,\nconst uint8_t *VAR_3, size_t VAR_4,\nError **VAR_5)\n{",
"uint8_t out[32];",
"long long int VAR_6 = (1 << 15);",
"unsigned long long VAR_7, VAR_8, VAR_9;",
"while (1) {",
"if (qcrypto_pbkdf2_get_thread_cpu(&VAR_8, VAR_5) < 0) {"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29,
31,
33,
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
55
... |
3,447 | bool write_cpustate_to_list(ARMCPU *cpu)
{
/* Write the coprocessor state from cpu->env to the (index,value) list. */
int i;
bool ok = true;
for (i = 0; i < cpu->cpreg_array_len; i++) {
uint32_t regidx = kvm_to_cpreg_id(cpu->cpreg_indexes[i]);
const ARMCPRegInfo *ri;
... | false | qemu | 7a0e58fa648736a75f2a6943afd2ab08ea15b8e0 | bool write_cpustate_to_list(ARMCPU *cpu)
{
int i;
bool ok = true;
for (i = 0; i < cpu->cpreg_array_len; i++) {
uint32_t regidx = kvm_to_cpreg_id(cpu->cpreg_indexes[i]);
const ARMCPRegInfo *ri;
ri = get_arm_cp_reginfo(cpu->cp_regs, regidx);
if (!ri) {
... | {
"code": [],
"line_no": []
} | bool FUNC_0(ARMCPU *cpu)
{
int VAR_0;
bool ok = true;
for (VAR_0 = 0; VAR_0 < cpu->cpreg_array_len; VAR_0++) {
uint32_t regidx = kvm_to_cpreg_id(cpu->cpreg_indexes[VAR_0]);
const ARMCPRegInfo *ri;
ri = get_arm_cp_reginfo(cpu->cp_regs, regidx);
if (!ri) {
... | [
"bool FUNC_0(ARMCPU *cpu)\n{",
"int VAR_0;",
"bool ok = true;",
"for (VAR_0 = 0; VAR_0 < cpu->cpreg_array_len; VAR_0++) {",
"uint32_t regidx = kvm_to_cpreg_id(cpu->cpreg_indexes[VAR_0]);",
"const ARMCPRegInfo *ri;",
"ri = get_arm_cp_reginfo(cpu->cp_regs, regidx);",
"if (!ri) {",
"ok = false;",
"co... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
]
] |
3,448 | void *qemu_malloc(size_t size)
{
return malloc(size);
}
| false | qemu | 17e2377abf16c3951d7d34521ceade4d7dc31d01 | void *qemu_malloc(size_t size)
{
return malloc(size);
}
| {
"code": [],
"line_no": []
} | void *FUNC_0(size_t VAR_0)
{
return malloc(VAR_0);
}
| [
"void *FUNC_0(size_t VAR_0)\n{",
"return malloc(VAR_0);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
3,450 | static void intra_predict_plane_16x16_msa(uint8_t *src, int32_t stride)
{
uint8_t lpcnt;
int32_t res0, res1, res2, res3;
uint64_t load0, load1;
v16i8 shf_mask = { 7, 8, 6, 9, 5, 10, 4, 11, 3, 12, 2, 13, 1, 14, 0, 15 };
v8i16 short_multiplier = { 1, 2, 3, 4, 5, 6, 7, 8 };
v4i32 int_multipl... | false | FFmpeg | d6737539e77e78fca9a04914d51996cfd1ccc55c | static void intra_predict_plane_16x16_msa(uint8_t *src, int32_t stride)
{
uint8_t lpcnt;
int32_t res0, res1, res2, res3;
uint64_t load0, load1;
v16i8 shf_mask = { 7, 8, 6, 9, 5, 10, 4, 11, 3, 12, 2, 13, 1, 14, 0, 15 };
v8i16 short_multiplier = { 1, 2, 3, 4, 5, 6, 7, 8 };
v4i32 int_multipl... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t *VAR_0, int32_t VAR_1)
{
uint8_t lpcnt;
int32_t res0, res1, res2, res3;
uint64_t load0, load1;
v16i8 shf_mask = { 7, 8, 6, 9, 5, 10, 4, 11, 3, 12, 2, 13, 1, 14, 0, 15 };
v8i16 short_multiplier = { 1, 2, 3, 4, 5, 6, 7, 8 };
v4i32 int_multiplier = { 0, 1, 2, 3 };
... | [
"static void FUNC_0(uint8_t *VAR_0, int32_t VAR_1)\n{",
"uint8_t lpcnt;",
"int32_t res0, res1, res2, res3;",
"uint64_t load0, load1;",
"v16i8 shf_mask = { 7, 8, 6, 9, 5, 10, 4, 11, 3, 12, 2, 13, 1, 14, 0, 15 };",
"v8i16 short_multiplier = { 1, 2, 3, 4, 5, 6, 7, 8 };",
"v4i32 int_multiplier = { 0, 1, 2, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
53,... |
3,451 | static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame)
{
int (*filter_frame)(AVFilterLink *, AVFrame *);
AVFilterContext *dstctx = link->dst;
AVFilterPad *dst = link->dstpad;
AVFrame *out = NULL;
int ret;
AVFilterCommand *cmd= link->dst->command_queue;
int64_t pts;
... | false | FFmpeg | 2a351f6c5521c199b4285e4e42f2321e312170bd | static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame)
{
int (*filter_frame)(AVFilterLink *, AVFrame *);
AVFilterContext *dstctx = link->dst;
AVFilterPad *dst = link->dstpad;
AVFrame *out = NULL;
int ret;
AVFilterCommand *cmd= link->dst->command_queue;
int64_t pts;
... | {
"code": [],
"line_no": []
} | VAR_4staticVAR_4 VAR_4intVAR_4 VAR_4ff_filter_frame_framedVAR_4(VAR_4AVFilterLinkVAR_4 *VAR_4VAR_0VAR_4, VAR_4AVFrameVAR_4 *VAR_4VAR_1VAR_4)
{
VAR_4intVAR_4 (*VAR_4VAR_2VAR_4)(VAR_4AVFilterLinkVAR_4 *, VAR_4AVFrameVAR_4 *);
VAR_4AVFilterContextVAR_4 *VAR_4dstctxVAR_4 = VAR_4VAR_0VAR_4->VAR_4dstVAR_4;
VA... | [
"VAR_4staticVAR_4 VAR_4intVAR_4 VAR_4ff_filter_frame_framedVAR_4(VAR_4AVFilterLinkVAR_4 *VAR_4VAR_0VAR_4, VAR_4AVFrameVAR_4 *VAR_4VAR_1VAR_4)\n{",
"VAR_4intVAR_4 (*VAR_4VAR_2VAR_4)(VAR_4AVFilterLinkVAR_4 *, VAR_4AVFrameVAR_4 *);",
"VAR_4AVFilterContextVAR_4 *VAR_4dstctxVAR_4 = VAR_4VAR_0VAR_4->VAR_4dstVAR_4;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31,
33
],
[
39
],
[
41
],
[
45
],
[
47,
49
],
[
51
],
[
53,... |
3,453 | static void predict_plane(SnowContext *s, DWTELEM *buf, int plane_index, int add){
Plane *p= &s->plane[plane_index];
const int mb_w= s->mb_band.width;
const int mb_h= s->mb_band.height;
const int mb_stride= s->mb_band.stride;
int x, y, mb_x, mb_y;
int scale = plane_index ? s->mv_scal... | false | FFmpeg | 155ec6edf82692bcf3a5f87d2bc697404f4e5aaf | static void predict_plane(SnowContext *s, DWTELEM *buf, int plane_index, int add){
Plane *p= &s->plane[plane_index];
const int mb_w= s->mb_band.width;
const int mb_h= s->mb_band.height;
const int mb_stride= s->mb_band.stride;
int x, y, mb_x, mb_y;
int scale = plane_index ? s->mv_scal... | {
"code": [],
"line_no": []
} | static void FUNC_0(SnowContext *VAR_0, DWTELEM *VAR_1, int VAR_2, int VAR_3){
Plane *p= &VAR_0->plane[VAR_2];
const int VAR_4= VAR_0->mb_band.width;
const int VAR_5= VAR_0->mb_band.height;
const int VAR_6= VAR_0->mb_band.stride;
int VAR_7, VAR_8, VAR_9, VAR_10;
int VAR_11 = VAR_2 ? V... | [
"static void FUNC_0(SnowContext *VAR_0, DWTELEM *VAR_1, int VAR_2, int VAR_3){",
"Plane *p= &VAR_0->plane[VAR_2];",
"const int VAR_4= VAR_0->mb_band.width;",
"const int VAR_5= VAR_0->mb_band.height;",
"const int VAR_6= VAR_0->mb_band.stride;",
"int VAR_7, VAR_8, VAR_9, VAR_10;",
"int VAR_11 = VAR_2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[... |
3,454 | static void rocker_test_dma_ctrl(Rocker *r, uint32_t val)
{
PCIDevice *dev = PCI_DEVICE(r);
char *buf;
int i;
buf = g_malloc(r->test_dma_size);
if (!buf) {
DPRINTF("test dma buffer alloc failed");
return;
}
switch (val) {
case ROCKER_TEST_DMA_CTRL_CLEAR:
... | true | qemu | 107e4b352cc309f9bd7588ef1a44549200620078 | static void rocker_test_dma_ctrl(Rocker *r, uint32_t val)
{
PCIDevice *dev = PCI_DEVICE(r);
char *buf;
int i;
buf = g_malloc(r->test_dma_size);
if (!buf) {
DPRINTF("test dma buffer alloc failed");
return;
}
switch (val) {
case ROCKER_TEST_DMA_CTRL_CLEAR:
... | {
"code": [
" if (!buf) {",
" DPRINTF(\"test dma buffer alloc failed\");",
" goto err_out;"
],
"line_no": [
17,
19,
57
]
} | static void FUNC_0(Rocker *VAR_0, uint32_t VAR_1)
{
PCIDevice *dev = PCI_DEVICE(VAR_0);
char *VAR_2;
int VAR_3;
VAR_2 = g_malloc(VAR_0->test_dma_size);
if (!VAR_2) {
DPRINTF("test dma buffer alloc failed");
return;
}
switch (VAR_1) {
case ROCKER_TEST_DMA_... | [
"static void FUNC_0(Rocker *VAR_0, uint32_t VAR_1)\n{",
"PCIDevice *dev = PCI_DEVICE(VAR_0);",
"char *VAR_2;",
"int VAR_3;",
"VAR_2 = g_malloc(VAR_0->test_dma_size);",
"if (!VAR_2) {",
"DPRINTF(\"test dma buffer alloc failed\");",
"return;",
"}",
"switch (VAR_1) {",
"case ROCKER_TEST_DMA_CTRL_CL... | [
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[... |
3,455 | xilinx_pcie_init(MemoryRegion *sys_mem, uint32_t bus_nr,
hwaddr cfg_base, uint64_t cfg_size,
hwaddr mmio_base, uint64_t mmio_size,
qemu_irq irq, bool link_up)
{
DeviceState *dev;
MemoryRegion *cfg, *mmio;
dev = qdev_create(NULL, TYPE_XILINX_PCIE_HO... | true | qemu | 2d896b454a0e19ec4c1ddbb0e0b65b7e54fcedf3 | xilinx_pcie_init(MemoryRegion *sys_mem, uint32_t bus_nr,
hwaddr cfg_base, uint64_t cfg_size,
hwaddr mmio_base, uint64_t mmio_size,
qemu_irq irq, bool link_up)
{
DeviceState *dev;
MemoryRegion *cfg, *mmio;
dev = qdev_create(NULL, TYPE_XILINX_PCIE_HO... | {
"code": [
"xilinx_pcie_init(MemoryRegion *sys_mem, uint32_t bus_nr,",
" hwaddr cfg_base, uint64_t cfg_size,",
" hwaddr mmio_base, uint64_t mmio_size,",
" qemu_irq irq, bool link_up)",
" DeviceState *dev;",
" MemoryRegion *cfg, *mmio;",
... | FUNC_0(MemoryRegion *VAR_0, uint32_t VAR_1,
hwaddr VAR_2, uint64_t VAR_3,
hwaddr VAR_4, uint64_t VAR_5,
qemu_irq VAR_6, bool VAR_7)
{
DeviceState *dev;
MemoryRegion *cfg, *mmio;
dev = qdev_create(NULL, TYPE_XILINX_PCIE_HOST);
qdev_prop_set_u... | [
"FUNC_0(MemoryRegion *VAR_0, uint32_t VAR_1,\nhwaddr VAR_2, uint64_t VAR_3,\nhwaddr VAR_4, uint64_t VAR_5,\nqemu_irq VAR_6, bool VAR_7)\n{",
"DeviceState *dev;",
"MemoryRegion *cfg, *mmio;",
"dev = qdev_create(NULL, TYPE_XILINX_PCIE_HOST);",
"qdev_prop_set_uint32(dev, \"VAR_1\", VAR_1);",
"qdev_prop_set_u... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47
],
[
51
],
[
55
],
[
57
]
] |
3,457 | long do_sigreturn(CPUMIPSState *regs)
{
struct sigframe *frame;
abi_ulong frame_addr;
sigset_t blocked;
target_sigset_t target_set;
int i;
#if defined(DEBUG_SIGNAL)
fprintf(stderr, "do_sigreturn\n");
#endif
frame_addr = regs->active_tc.gpr[29];
if (!lock_user_struct(VERIFY_R... | true | qemu | f5f601afcec6c1081128fe5a0f831788ca9f56ed | long do_sigreturn(CPUMIPSState *regs)
{
struct sigframe *frame;
abi_ulong frame_addr;
sigset_t blocked;
target_sigset_t target_set;
int i;
#if defined(DEBUG_SIGNAL)
fprintf(stderr, "do_sigreturn\n");
#endif
frame_addr = regs->active_tc.gpr[29];
if (!lock_user_struct(VERIFY_R... | {
"code": [
" \tif(__get_user(target_set.sig[i], &frame->sf_mask.sig[i]))",
"\t goto badframe;"
],
"line_no": [
33,
35
]
} | long FUNC_0(CPUMIPSState *VAR_0)
{
struct sigframe *VAR_1;
abi_ulong frame_addr;
sigset_t blocked;
target_sigset_t target_set;
int VAR_2;
#if defined(DEBUG_SIGNAL)
fprintf(stderr, "FUNC_0\n");
#endif
frame_addr = VAR_0->active_tc.gpr[29];
if (!lock_user_struct(VERIFY_READ, V... | [
"long FUNC_0(CPUMIPSState *VAR_0)\n{",
"struct sigframe *VAR_1;",
"abi_ulong frame_addr;",
"sigset_t blocked;",
"target_sigset_t target_set;",
"int VAR_2;",
"#if defined(DEBUG_SIGNAL)\nfprintf(stderr, \"FUNC_0\\n\");",
"#endif\nframe_addr = VAR_0->active_tc.gpr[29];",
"if (!lock_user_struct(VERIFY_R... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
21,
23
],
[
25,
27
],
[
31
],
[
33,
35
],
[
37
],
[
41
],
[
43
],
[
47
],
[
51,
59,
61,
63,
65,... |
3,458 | static void pmac_dma_read(BlockBackend *blk,
int64_t offset, unsigned int bytes,
void (*cb)(void *opaque, int ret), void *opaque)
{
DBDMA_io *io = opaque;
MACIOIDEState *m = io->opaque;
IDEState *s = idebus_active_if(&m->bus);
dma_addr_t dma_add... | true | qemu | ac58fe7b2c67a9be142beacd4c6ee51f3264d90f | static void pmac_dma_read(BlockBackend *blk,
int64_t offset, unsigned int bytes,
void (*cb)(void *opaque, int ret), void *opaque)
{
DBDMA_io *io = opaque;
MACIOIDEState *m = io->opaque;
IDEState *s = idebus_active_if(&m->bus);
dma_addr_t dma_add... | {
"code": [
" qemu_iovec_add(&io->iov, &io->remainder, head_bytes);",
" qemu_iovec_add(&io->iov, &io->remainder, align - tail_bytes);",
" nsector = (io->len >> 9);",
" sector_num, nsector);",
" dma_addr = io->addr;",
" dma_len = io->len;",
" mem =... | static void FUNC_0(BlockBackend *VAR_0,
int64_t VAR_1, unsigned int VAR_2,
void (*VAR_3)(void *VAR_6, int VAR_5), void *VAR_6)
{
DBDMA_io *io = VAR_6;
MACIOIDEState *m = io->VAR_6;
IDEState *s = idebus_active_if(&m->bus);
dma_addr_t dma_addr, dm... | [
"static void FUNC_0(BlockBackend *VAR_0,\nint64_t VAR_1, unsigned int VAR_2,\nvoid (*VAR_3)(void *VAR_6, int VAR_5), void *VAR_6)\n{",
"DBDMA_io *io = VAR_6;",
"MACIOIDEState *m = io->VAR_6;",
"IDEState *s = idebus_active_if(&m->bus);",
"dma_addr_t dma_addr, dma_len;",
"void *VAR_6;",
"int64_t sector_nu... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37
],
[
41,
43,
45
],
[
49
],
[
51
],
[
53,... |
3,459 | static void sbr_qmf_analysis(AVFixedDSPContext *dsp, FFTContext *mdct,
#else
static void sbr_qmf_analysis(AVFloatDSPContext *dsp, FFTContext *mdct,
#endif /* USE_FIXED */
SBRDSPContext *sbrdsp, const INTFLOAT *in, INTFLOAT *x,
INTFLOAT z[320], INTFLOAT W[2]... | true | FFmpeg | fdc94db37e89165964fdf34f1cd7632e44108bd0 | static void sbr_qmf_analysis(AVFixedDSPContext *dsp, FFTContext *mdct,
#else
static void sbr_qmf_analysis(AVFloatDSPContext *dsp, FFTContext *mdct,
#endif
SBRDSPContext *sbrdsp, const INTFLOAT *in, INTFLOAT *x,
INTFLOAT z[320], INTFLOAT W[2][32][32][2], in... | {
"code": [],
"line_no": []
} | static void sbr_qmf_analysis(AVFixedDSPContext *dsp, FFTContext *mdct,
#else
static void sbr_qmf_analysis(AVFloatDSPContext *dsp, FFTContext *mdct,
#endif
SBRDSPContext *sbrdsp, const INTFLOAT *in, INTFLOAT *x,
INTFLOAT z[320], INTFLOAT W[2][32][32][2], in... | [
"static void sbr_qmf_analysis(AVFixedDSPContext *dsp, FFTContext *mdct,\n#else\nstatic void sbr_qmf_analysis(AVFloatDSPContext *dsp, FFTContext *mdct,\n#endif\nSBRDSPContext *sbrdsp, const INTFLOAT *in, INTFLOAT *x,\nINTFLOAT z[320], INTFLOAT W[2][32][32][2], int buf_idx)\n{",
"int i;",
"int j;",
"memcpy(x ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
18
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
50
],
[
52
],
[
54
]
] |
3,462 | static CPUArchState *find_cpu(uint32_t thread_id)
{
CPUState *cpu;
cpu = qemu_get_cpu(thread_id);
if (cpu == NULL) {
return NULL;
}
return cpu->env_ptr;
}
| true | qemu | aa48dd9319dcee78ec17f4d516fb7bfc62b1a4d2 | static CPUArchState *find_cpu(uint32_t thread_id)
{
CPUState *cpu;
cpu = qemu_get_cpu(thread_id);
if (cpu == NULL) {
return NULL;
}
return cpu->env_ptr;
}
| {
"code": [
" cpu = qemu_get_cpu(thread_id);",
" if (cpu == NULL) {",
" return NULL;",
" return cpu->env_ptr;"
],
"line_no": [
9,
11,
13,
17
]
} | static CPUArchState *FUNC_0(uint32_t thread_id)
{
CPUState *cpu;
cpu = qemu_get_cpu(thread_id);
if (cpu == NULL) {
return NULL;
}
return cpu->env_ptr;
}
| [
"static CPUArchState *FUNC_0(uint32_t thread_id)\n{",
"CPUState *cpu;",
"cpu = qemu_get_cpu(thread_id);",
"if (cpu == NULL) {",
"return NULL;",
"}",
"return cpu->env_ptr;",
"}"
] | [
0,
0,
1,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
3,463 | static void find_block_motion(DeshakeContext *deshake, uint8_t *src1,
uint8_t *src2, int cx, int cy, int stride,
MotionVector *mv)
{
int x, y;
int diff;
int smallest = INT_MAX;
int tmp, tmp2;
#define CMP(i, j) deshake->c.sad[0](de... | true | FFmpeg | 7cbb32e461cdbe8b745d560c1700c711ba5933cc | static void find_block_motion(DeshakeContext *deshake, uint8_t *src1,
uint8_t *src2, int cx, int cy, int stride,
MotionVector *mv)
{
int x, y;
int diff;
int smallest = INT_MAX;
int tmp, tmp2;
#define CMP(i, j) deshake->c.sad[0](de... | {
"code": [
" MotionVector *mv)"
],
"line_no": [
5
]
} | static void FUNC_0(DeshakeContext *VAR_0, uint8_t *VAR_1,
uint8_t *VAR_2, int VAR_3, int VAR_4, int VAR_5,
MotionVector *VAR_6)
{
int VAR_7, VAR_8;
int VAR_9;
int VAR_10 = INT_MAX;
int VAR_11, VAR_12;
#define CMP(i, j) VAR_0->c.sa... | [
"static void FUNC_0(DeshakeContext *VAR_0, uint8_t *VAR_1,\nuint8_t *VAR_2, int VAR_3, int VAR_4, int VAR_5,\nMotionVector *VAR_6)\n{",
"int VAR_7, VAR_8;",
"int VAR_9;",
"int VAR_10 = INT_MAX;",
"int VAR_11, VAR_12;",
"#define CMP(i, j) VAR_0->c.sad[0](VAR_0, VAR_1 + VAR_4 * VAR_5 + VAR_3, \\\nVAR_2 + (j... | [
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
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21,
23,
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
3,465 | static void replication_close(BlockDriverState *bs)
{
BDRVReplicationState *s = bs->opaque;
if (s->replication_state == BLOCK_REPLICATION_RUNNING) {
replication_stop(s->rs, false, NULL);
if (s->mode == REPLICATION_MODE_SECONDARY) {
g_free(s->top_id);
replication_remove(... | true | qemu | 50ab0e0908d592b8bda56c2d7495e1190d734b0b | static void replication_close(BlockDriverState *bs)
{
BDRVReplicationState *s = bs->opaque;
if (s->replication_state == BLOCK_REPLICATION_RUNNING) {
replication_stop(s->rs, false, NULL);
if (s->mode == REPLICATION_MODE_SECONDARY) {
g_free(s->top_id);
replication_remove(... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0)
{
BDRVReplicationState *s = VAR_0->opaque;
if (s->replication_state == BLOCK_REPLICATION_RUNNING) {
replication_stop(s->rs, false, NULL);
if (s->mode == REPLICATION_MODE_SECONDARY) {
g_free(s->top_id);
replication_remove(s->rs... | [
"static void FUNC_0(BlockDriverState *VAR_0)\n{",
"BDRVReplicationState *s = VAR_0->opaque;",
"if (s->replication_state == BLOCK_REPLICATION_RUNNING) {",
"replication_stop(s->rs, false, NULL);",
"if (s->mode == REPLICATION_MODE_SECONDARY) {",
"g_free(s->top_id);",
"replication_remove(s->rs);"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
19
],
[
21
],
[
26
]
] |
3,466 | static int kvm_irqchip_create(KVMState *s)
{
QemuOptsList *list = qemu_find_opts("machine");
int ret;
if (QTAILQ_EMPTY(&list->head) ||
!qemu_opt_get_bool(QTAILQ_FIRST(&list->head),
"kernel_irqchip", true) ||
!kvm_check_extension(s, KVM_CAP_IRQCHIP)) {
... | true | qemu | 36ad0e948e15d8d86c8dec1c17a8588d87b0107d | static int kvm_irqchip_create(KVMState *s)
{
QemuOptsList *list = qemu_find_opts("machine");
int ret;
if (QTAILQ_EMPTY(&list->head) ||
!qemu_opt_get_bool(QTAILQ_FIRST(&list->head),
"kernel_irqchip", true) ||
!kvm_check_extension(s, KVM_CAP_IRQCHIP)) {
... | {
"code": [
" QemuOptsList *list = qemu_find_opts(\"machine\");",
" if (QTAILQ_EMPTY(&list->head) ||",
" !qemu_opt_get_bool(QTAILQ_FIRST(&list->head),",
" \"kernel_irqchip\", true) ||",
" QemuOptsList *list = qemu_find_opts(\"machine\");",
" QemuOpt... | static int FUNC_0(KVMState *VAR_0)
{
QemuOptsList *list = qemu_find_opts("machine");
int VAR_1;
if (QTAILQ_EMPTY(&list->head) ||
!qemu_opt_get_bool(QTAILQ_FIRST(&list->head),
"kernel_irqchip", true) ||
!kvm_check_extension(VAR_0, KVM_CAP_IRQCHIP)) {
... | [
"static int FUNC_0(KVMState *VAR_0)\n{",
"QemuOptsList *list = qemu_find_opts(\"machine\");",
"int VAR_1;",
"if (QTAILQ_EMPTY(&list->head) ||\n!qemu_opt_get_bool(QTAILQ_FIRST(&list->head),\n\"kernel_irqchip\", true) ||\n!kvm_check_extension(VAR_0, KVM_CAP_IRQCHIP)) {",
"return 0;",
"}",
"VAR_1 = kvm_vm_... | [
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13,
15,
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
45
],
[
47
],
[
51
],
[
55
],
[
57
]
] |
3,467 | uint32_t qpci_io_readl(QPCIDevice *dev, void *data)
{
uintptr_t addr = (uintptr_t)data;
if (addr < QPCI_PIO_LIMIT) {
return dev->bus->pio_readl(dev->bus, addr);
} else {
uint32_t val;
dev->bus->memread(dev->bus, addr, &val, sizeof(val));
return le32_to_cpu(val);
... | true | qemu | b4ba67d9a702507793c2724e56f98e9b0f7be02b | uint32_t qpci_io_readl(QPCIDevice *dev, void *data)
{
uintptr_t addr = (uintptr_t)data;
if (addr < QPCI_PIO_LIMIT) {
return dev->bus->pio_readl(dev->bus, addr);
} else {
uint32_t val;
dev->bus->memread(dev->bus, addr, &val, sizeof(val));
return le32_to_cpu(val);
... | {
"code": [
" uintptr_t addr = (uintptr_t)data;",
" if (addr < QPCI_PIO_LIMIT) {",
" dev->bus->memread(dev->bus, addr, &val, sizeof(val));",
" uintptr_t addr = (uintptr_t)data;",
" if (addr < QPCI_PIO_LIMIT) {",
" dev->bus->memread(dev->bus, addr, &val, sizeof(val));"... | uint32_t FUNC_0(QPCIDevice *dev, void *data)
{
uintptr_t addr = (uintptr_t)data;
if (addr < QPCI_PIO_LIMIT) {
return dev->bus->pio_readl(dev->bus, addr);
} else {
uint32_t val;
dev->bus->memread(dev->bus, addr, &val, sizeof(val));
return le32_to_cpu(val);
}
}
| [
"uint32_t FUNC_0(QPCIDevice *dev, void *data)\n{",
"uintptr_t addr = (uintptr_t)data;",
"if (addr < QPCI_PIO_LIMIT) {",
"return dev->bus->pio_readl(dev->bus, addr);",
"} else {",
"uint32_t val;",
"dev->bus->memread(dev->bus, addr, &val, sizeof(val));",
"return le32_to_cpu(val);",
"}",
"}"
] | [
1,
1,
1,
1,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
3,468 | static void hid_keyboard_process_keycode(HIDState *hs)
{
uint8_t hid_code, index, key;
int i, keycode, slot;
if (hs->n == 0) {
return;
slot = hs->head & QUEUE_MASK; QUEUE_INCR(hs->head); hs->n--;
keycode = hs->kbd.keycodes[slot];
key = keycode & 0x7f;
index = key | ((hs->kbd.modifier... | true | qemu | 2222e0a633070f7f3eafcc9d0e95e7f1a4e6fe36 | static void hid_keyboard_process_keycode(HIDState *hs)
{
uint8_t hid_code, index, key;
int i, keycode, slot;
if (hs->n == 0) {
return;
slot = hs->head & QUEUE_MASK; QUEUE_INCR(hs->head); hs->n--;
keycode = hs->kbd.keycodes[slot];
key = keycode & 0x7f;
index = key | ((hs->kbd.modifier... | {
"code": [],
"line_no": []
} | static void FUNC_0(HIDState *VAR_0)
{
uint8_t hid_code, index, key;
int VAR_1, VAR_2, VAR_3;
if (VAR_0->n == 0) {
return;
VAR_3 = VAR_0->head & QUEUE_MASK; QUEUE_INCR(VAR_0->head); VAR_0->n--;
VAR_2 = VAR_0->kbd.keycodes[VAR_3];
key = VAR_2 & 0x7f;
index = key | ((VAR_0->kbd.modifier... | [
"static void FUNC_0(HIDState *VAR_0)\n{",
"uint8_t hid_code, index, key;",
"int VAR_1, VAR_2, VAR_3;",
"if (VAR_0->n == 0) {",
"return;",
"VAR_3 = VAR_0->head & QUEUE_MASK; QUEUE_INCR(VAR_0->head); VAR_0->n--;",
"VAR_2 = VAR_0->kbd.keycodes[VAR_3];",
"key = VAR_2 & 0x7f;",
"index = key | ((VAR_0->kb... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14,
15
],
[
16,
17
],
[
18
],
[
24
],
[
25
],
[
27,
31
],
[
... |
3,469 | static int nvdec_vc1_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
{
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
NVDECContext *ctx = avctx->internal->hwaccel_priv_data;
CUVIDPICPARAMS *pp = &ctx->pic_params;
FrameDecodeData *fdd;
NVDE... | false | FFmpeg | 4c7b023d56e09a78a587d036db1b64bf7c493b3d | static int nvdec_vc1_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
{
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
NVDECContext *ctx = avctx->internal->hwaccel_priv_data;
CUVIDPICPARAMS *pp = &ctx->pic_params;
FrameDecodeData *fdd;
NVDE... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, const uint8_t *VAR_1, uint32_t VAR_2)
{
VC1Context *v = VAR_0->priv_data;
MpegEncContext *s = &v->s;
NVDECContext *ctx = VAR_0->internal->hwaccel_priv_data;
CUVIDPICPARAMS *pp = &ctx->pic_params;
FrameDecodeData *fdd;
NVDECFrame *cf;
... | [
"static int FUNC_0(AVCodecContext *VAR_0, const uint8_t *VAR_1, uint32_t VAR_2)\n{",
"VC1Context *v = VAR_0->priv_data;",
"MpegEncContext *s = &v->s;",
"NVDECContext *ctx = VAR_0->internal->hwaccel_priv_data;",
"CUVIDPICPARAMS *pp = &ctx->pic_params;",
"FrameDecodeData *fdd;",
"NVDECFrame *cf;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29,
31
],
[
35
],
[
37
],
[
41
],
[
43,
45,
47,
49,
51,
53,
57,
59,
61,
63... |
3,470 | static int frame_thread_init(AVCodecContext *avctx)
{
int thread_count = avctx->thread_count;
AVCodec *codec = avctx->codec;
AVCodecContext *src = avctx;
FrameThreadContext *fctx;
int i, err = 0;
if (!thread_count) {
int nb_cpus = get_logical_cpus(avctx);
// use number... | false | FFmpeg | b12d21733975f9001eecb480fc28e5e4473b1327 | static int frame_thread_init(AVCodecContext *avctx)
{
int thread_count = avctx->thread_count;
AVCodec *codec = avctx->codec;
AVCodecContext *src = avctx;
FrameThreadContext *fctx;
int i, err = 0;
if (!thread_count) {
int nb_cpus = get_logical_cpus(avctx);
if ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0)
{
int VAR_1 = VAR_0->VAR_1;
AVCodec *codec = VAR_0->codec;
AVCodecContext *src = VAR_0;
FrameThreadContext *fctx;
int VAR_2, VAR_3 = 0;
if (!VAR_1) {
int VAR_4 = get_logical_cpus(VAR_0);
if (VAR_4 > 1)
VAR... | [
"static int FUNC_0(AVCodecContext *VAR_0)\n{",
"int VAR_1 = VAR_0->VAR_1;",
"AVCodec *codec = VAR_0->codec;",
"AVCodecContext *src = VAR_0;",
"FrameThreadContext *fctx;",
"int VAR_2, VAR_3 = 0;",
"if (!VAR_1) {",
"int VAR_4 = get_logical_cpus(VAR_0);",
"if (VAR_4 > 1)\nVAR_1 = VAR_0->VAR_1 = VAR_4 +... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53
],
[... |
3,473 | static inline void gen_ins(DisasContext *s, TCGMemOp ot)
{
if (s->base.tb->cflags & CF_USE_ICOUNT) {
gen_io_start();
}
gen_string_movl_A0_EDI(s);
/* Note: we must do this dummy write first to be restartable in
case of page fault. */
tcg_gen_movi_tl(cpu_T0, 0);
gen_op_st_v... | true | qemu | c5a49c63fa26e8825ad101dfe86339ae4c216539 | static inline void gen_ins(DisasContext *s, TCGMemOp ot)
{
if (s->base.tb->cflags & CF_USE_ICOUNT) {
gen_io_start();
}
gen_string_movl_A0_EDI(s);
tcg_gen_movi_tl(cpu_T0, 0);
gen_op_st_v(s, ot, cpu_T0, cpu_A0);
tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_regs[R_EDX]);
tcg_... | {
"code": [
" if (s->base.tb->cflags & CF_USE_ICOUNT) {",
" if (s->base.tb->cflags & CF_USE_ICOUNT) {",
" if (s->base.tb->cflags & CF_USE_ICOUNT) {",
" if (s->base.tb->cflags & CF_USE_ICOUNT) {"
],
"line_no": [
5,
5,
5,
5
]
} | static inline void FUNC_0(DisasContext *VAR_0, TCGMemOp VAR_1)
{
if (VAR_0->base.tb->cflags & CF_USE_ICOUNT) {
gen_io_start();
}
gen_string_movl_A0_EDI(VAR_0);
tcg_gen_movi_tl(cpu_T0, 0);
gen_op_st_v(VAR_0, VAR_1, cpu_T0, cpu_A0);
tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_re... | [
"static inline void FUNC_0(DisasContext *VAR_0, TCGMemOp VAR_1)\n{",
"if (VAR_0->base.tb->cflags & CF_USE_ICOUNT) {",
"gen_io_start();",
"}",
"gen_string_movl_A0_EDI(VAR_0);",
"tcg_gen_movi_tl(cpu_T0, 0);",
"gen_op_st_v(VAR_0, VAR_1, cpu_T0, cpu_A0);",
"tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_regs[R_ED... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
3,474 | static void qht_bucket_reset__locked(struct qht_bucket *head)
{
struct qht_bucket *b = head;
int i;
seqlock_write_begin(&head->sequence);
do {
for (i = 0; i < QHT_BUCKET_ENTRIES; i++) {
if (b->pointers[i] == NULL) {
goto done;
}
b->... | true | qemu | a890643958f03aaa344290700093b280cb606c28 | static void qht_bucket_reset__locked(struct qht_bucket *head)
{
struct qht_bucket *b = head;
int i;
seqlock_write_begin(&head->sequence);
do {
for (i = 0; i < QHT_BUCKET_ENTRIES; i++) {
if (b->pointers[i] == NULL) {
goto done;
}
b->... | {
"code": [
" b->hashes[i] = 0;"
],
"line_no": [
23
]
} | static void FUNC_0(struct qht_bucket *VAR_0)
{
struct qht_bucket *VAR_1 = VAR_0;
int VAR_2;
seqlock_write_begin(&VAR_0->sequence);
do {
for (VAR_2 = 0; VAR_2 < QHT_BUCKET_ENTRIES; VAR_2++) {
if (VAR_1->pointers[VAR_2] == NULL) {
goto done;
}
... | [
"static void FUNC_0(struct qht_bucket *VAR_0)\n{",
"struct qht_bucket *VAR_1 = VAR_0;",
"int VAR_2;",
"seqlock_write_begin(&VAR_0->sequence);",
"do {",
"for (VAR_2 = 0; VAR_2 < QHT_BUCKET_ENTRIES; VAR_2++) {",
"if (VAR_1->pointers[VAR_2] == NULL) {",
"goto done;",
"}",
"VAR_1->hashes[VAR_2] = 0;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
37
]
] |
3,475 | static int read_seek(AVFormatContext *s, int stream_index,
int64_t ts, int flags)
{
WtvContext *wtv = s->priv_data;
AVIOContext *pb = wtv->pb;
AVStream *st = s->streams[0];
int64_t ts_relative;
int i;
if ((flags & AVSEEK_FLAG_FRAME) || (flags & AVSEEK_FLAG_BYTE))
... | true | FFmpeg | 7bcd81299a83b28ee8266079646470dd3e02f2ef | static int read_seek(AVFormatContext *s, int stream_index,
int64_t ts, int flags)
{
WtvContext *wtv = s->priv_data;
AVIOContext *pb = wtv->pb;
AVStream *st = s->streams[0];
int64_t ts_relative;
int i;
if ((flags & AVSEEK_FLAG_FRAME) || (flags & AVSEEK_FLAG_BYTE))
... | {
"code": [
" if (wtv->last_valid_pts == AV_NOPTS_VALUE || ts < wtv->last_valid_pts)",
" avio_seek(pb, 0, SEEK_SET);",
" else if (st->duration != AV_NOPTS_VALUE && ts_relative > st->duration && wtv->nb_index_entries)",
" avio_seek(pb, wtv->index_entries[wtv->nb_inde... | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1,
int64_t VAR_2, int VAR_3)
{
WtvContext *wtv = VAR_0->priv_data;
AVIOContext *pb = wtv->pb;
AVStream *st = VAR_0->streams[0];
int64_t ts_relative;
int VAR_4;
if ((VAR_3 & AVSEEK_FLAG_FRAME) || (VAR_3 & AVSEEK_FLAG... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1,\nint64_t VAR_2, int VAR_3)\n{",
"WtvContext *wtv = VAR_0->priv_data;",
"AVIOContext *pb = wtv->pb;",
"AVStream *st = VAR_0->streams[0];",
"int64_t ts_relative;",
"int VAR_4;",
"if ((VAR_3 & AVSEEK_FLAG_FRAME) || (VAR_3 & AVSEEK_FLAG_BYTE))\nreturn AV... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
29
],
[
31,
33
],
[
37
],
[
39
],
[
41,
43
],
[
45,
47
],
[
49,
51
],
[
53
],
[
55
],
[
57
... |
3,478 | static void mov_parse_stsd_audio(MOVContext *c, AVIOContext *pb,
AVStream *st, MOVStreamContext *sc)
{
int bits_per_sample, flags;
uint16_t version = avio_rb16(pb);
AVDictionaryEntry *compatible_brands = av_dict_get(c->fc->metadata, "compatible_brands", NULL, AV_DICT_MA... | false | FFmpeg | b58cfa616c169c90166938608e7135cdab5820e0 | static void mov_parse_stsd_audio(MOVContext *c, AVIOContext *pb,
AVStream *st, MOVStreamContext *sc)
{
int bits_per_sample, flags;
uint16_t version = avio_rb16(pb);
AVDictionaryEntry *compatible_brands = av_dict_get(c->fc->metadata, "compatible_brands", NULL, AV_DICT_MA... | {
"code": [],
"line_no": []
} | static void FUNC_0(MOVContext *VAR_0, AVIOContext *VAR_1,
AVStream *VAR_2, MOVStreamContext *VAR_3)
{
int VAR_4, VAR_5;
uint16_t version = avio_rb16(VAR_1);
AVDictionaryEntry *compatible_brands = av_dict_get(VAR_0->fc->metadata, "compatible_brands", NULL, AV_DICT_MATCH_... | [
"static void FUNC_0(MOVContext *VAR_0, AVIOContext *VAR_1,\nAVStream *VAR_2, MOVStreamContext *VAR_3)\n{",
"int VAR_4, VAR_5;",
"uint16_t version = avio_rb16(VAR_1);",
"AVDictionaryEntry *compatible_brands = av_dict_get(VAR_0->fc->metadata, \"compatible_brands\", NULL, AV_DICT_MATCH_CASE);",
"avio_rb16(VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
41
],
[
43,
45
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
... |
3,479 | iscsi_aio_ioctl_cb(struct iscsi_context *iscsi, int status,
void *command_data, void *opaque)
{
IscsiAIOCB *acb = opaque;
if (acb->canceled) {
qemu_aio_release(acb);
return;
}
acb->status = 0;
if (status < 0) {
error_report("Failed to ioctl(... | true | qemu | b20909195745c34a819aed14ae996b60ab0f591f | iscsi_aio_ioctl_cb(struct iscsi_context *iscsi, int status,
void *command_data, void *opaque)
{
IscsiAIOCB *acb = opaque;
if (acb->canceled) {
qemu_aio_release(acb);
return;
}
acb->status = 0;
if (status < 0) {
error_report("Failed to ioctl(... | {
"code": [
" if (acb->canceled) {",
" if (acb->canceled) {",
" if (acb->canceled) {",
" if (acb->canceled) {",
" if (acb->canceled) {",
" if (acb->canceled) {"
],
"line_no": [
11,
11,
11,
11,
11,
11
]
} | FUNC_0(struct iscsi_context *VAR_0, int VAR_1,
void *VAR_2, void *VAR_3)
{
IscsiAIOCB *acb = VAR_3;
if (acb->canceled) {
qemu_aio_release(acb);
return;
}
acb->VAR_1 = 0;
if (VAR_1 < 0) {
error_report("Failed to ioctl(SG_IO) to iSCSI lun. %s"... | [
"FUNC_0(struct iscsi_context *VAR_0, int VAR_1,\nvoid *VAR_2, void *VAR_3)\n{",
"IscsiAIOCB *acb = VAR_3;",
"if (acb->canceled) {",
"qemu_aio_release(acb);",
"return;",
"}",
"acb->VAR_1 = 0;",
"if (VAR_1 < 0) {",
"error_report(\"Failed to ioctl(SG_IO) to iSCSI lun. %s\",\niscsi_get_error(VAR_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
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
43,
47
],
[
49
],
[
53
],
[
57
],
... |
3,480 | static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
const uint8_t **buf, int buf_size)
{
AVCodecContext *avctx = s->avctx;
const int lowres = s->avctx->lowres;
const int field_pic = s->picture_structure != PICT_FRAME;
int ret;
s->resync_mb_x =
... | true | FFmpeg | 973c3dba27d0b1a88c70f6661b6a90d2f2e50665 | static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
const uint8_t **buf, int buf_size)
{
AVCodecContext *avctx = s->avctx;
const int lowres = s->avctx->lowres;
const int field_pic = s->picture_structure != PICT_FRAME;
int ret;
s->resync_mb_x =
... | {
"code": [
" left, show_bits(&s->gb, FFMIN(left, 23)));"
],
"line_no": [
359
]
} | static int FUNC_0(MpegEncContext *VAR_0, int VAR_1,
const uint8_t **VAR_2, int VAR_3)
{
AVCodecContext *avctx = VAR_0->avctx;
const int VAR_4 = VAR_0->avctx->VAR_4;
const int VAR_5 = VAR_0->picture_structure != PICT_FRAME;
int VAR_6;
VAR_0->resync_mb_x =
... | [
"static int FUNC_0(MpegEncContext *VAR_0, int VAR_1,\nconst uint8_t **VAR_2, int VAR_3)\n{",
"AVCodecContext *avctx = VAR_0->avctx;",
"const int VAR_4 = VAR_0->avctx->VAR_4;",
"const int VAR_5 = VAR_0->picture_structure != PICT_FRAME;",
"int VAR_6;",
"VAR_0->resync_mb_x =\nVAR_0->resync_mb_y = -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
],
[
17,
19
],
[
23
],
[
27
],
[
29,
31
],
[
35
],
[
37
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
57,
59
],
[
63
... |
3,481 | static int poll_filters(void)
{
AVFilterBufferRef *picref;
AVFrame *filtered_frame = NULL;
int i, ret, ret_all;
unsigned nb_success, nb_eof;
int64_t frame_pts;
while (1) {
/* Reap all buffers present in the buffer sinks */
for (i = 0; i < nb_output_streams; i++) {
... | true | FFmpeg | 8364cb97193829dc3e14484c0aaadf59c0cafc8c | static int poll_filters(void)
{
AVFilterBufferRef *picref;
AVFrame *filtered_frame = NULL;
int i, ret, ret_all;
unsigned nb_success, nb_eof;
int64_t frame_pts;
while (1) {
for (i = 0; i < nb_output_streams; i++) {
OutputStream *ost = output_streams[i];
... | {
"code": [],
"line_no": []
} | static int FUNC_0(void)
{
AVFilterBufferRef *picref;
AVFrame *filtered_frame = NULL;
int VAR_0, VAR_1, VAR_2;
unsigned VAR_3, VAR_4;
int64_t frame_pts;
while (1) {
for (VAR_0 = 0; VAR_0 < nb_output_streams; VAR_0++) {
OutputStream *ost = output_streams[VA... | [
"static int FUNC_0(void)\n{",
"AVFilterBufferRef *picref;",
"AVFrame *filtered_frame = NULL;",
"int VAR_0, VAR_1, VAR_2;",
"unsigned VAR_3, VAR_4;",
"int64_t frame_pts;",
"while (1) {",
"for (VAR_0 = 0; VAR_0 < nb_output_streams; VAR_0++) {",
"OutputStream *ost = output_streams[VAR_0];",
"OutputFi... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31,
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[... |
3,482 | static int parse_hex32(DeviceState *dev, Property *prop, const char *str)
{
uint32_t *ptr = qdev_get_prop_ptr(dev, prop);
if (sscanf(str, "%" PRIx32, ptr) != 1)
return -EINVAL;
return 0;
}
| true | qemu | 449041d4db1f82f281fe097e832f07cd9ee1e864 | static int parse_hex32(DeviceState *dev, Property *prop, const char *str)
{
uint32_t *ptr = qdev_get_prop_ptr(dev, prop);
if (sscanf(str, "%" PRIx32, ptr) != 1)
return -EINVAL;
return 0;
}
| {
"code": [
" if (sscanf(str, \"%\" PRIx32, ptr) != 1)"
],
"line_no": [
9
]
} | static int FUNC_0(DeviceState *VAR_0, Property *VAR_1, const char *VAR_2)
{
uint32_t *ptr = qdev_get_prop_ptr(VAR_0, VAR_1);
if (sscanf(VAR_2, "%" PRIx32, ptr) != 1)
return -EINVAL;
return 0;
}
| [
"static int FUNC_0(DeviceState *VAR_0, Property *VAR_1, const char *VAR_2)\n{",
"uint32_t *ptr = qdev_get_prop_ptr(VAR_0, VAR_1);",
"if (sscanf(VAR_2, \"%\" PRIx32, ptr) != 1)\nreturn -EINVAL;",
"return 0;",
"}"
] | [
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
],
[
15
]
] |
3,483 | void helper_retry(CPUSPARCState *env)
{
trap_state *tsptr = cpu_tsptr(env);
env->pc = tsptr->tpc;
env->npc = tsptr->tnpc;
cpu_put_ccr(env, tsptr->tstate >> 32);
env->asi = (tsptr->tstate >> 24) & 0xff;
cpu_change_pstate(env, (tsptr->tstate >> 8) & 0xf3f);
cpu_put_cwp64(env, tsptr->... | true | qemu | 5ee5993001cf32addb86a92e2ae8cb090fbc1462 | void helper_retry(CPUSPARCState *env)
{
trap_state *tsptr = cpu_tsptr(env);
env->pc = tsptr->tpc;
env->npc = tsptr->tnpc;
cpu_put_ccr(env, tsptr->tstate >> 32);
env->asi = (tsptr->tstate >> 24) & 0xff;
cpu_change_pstate(env, (tsptr->tstate >> 8) & 0xf3f);
cpu_put_cwp64(env, tsptr->... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUSPARCState *VAR_0)
{
trap_state *tsptr = cpu_tsptr(VAR_0);
VAR_0->pc = tsptr->tpc;
VAR_0->npc = tsptr->tnpc;
cpu_put_ccr(VAR_0, tsptr->tstate >> 32);
VAR_0->asi = (tsptr->tstate >> 24) & 0xff;
cpu_change_pstate(VAR_0, (tsptr->tstate >> 8) & 0xf3f);
cpu_put_cwp64(VAR_... | [
"void FUNC_0(CPUSPARCState *VAR_0)\n{",
"trap_state *tsptr = cpu_tsptr(VAR_0);",
"VAR_0->pc = tsptr->tpc;",
"VAR_0->npc = tsptr->tnpc;",
"cpu_put_ccr(VAR_0, tsptr->tstate >> 32);",
"VAR_0->asi = (tsptr->tstate >> 24) & 0xff;",
"cpu_change_pstate(VAR_0, (tsptr->tstate >> 8) & 0xf3f);",
"cpu_put_cwp64(V... | [
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
],
[
37
],
[
41,
43
],
[
46
],
[
49
],
... |
3,485 | static int unpack_superblocks(Vp3DecodeContext *s, GetBitContext *gb)
{
int superblock_starts[3] = { 0, s->u_superblock_start, s->v_superblock_start };
int bit = 0;
int current_superblock = 0;
int current_run = 0;
int num_partial_superblocks = 0;
int i, j;
int current_fragment;
... | true | FFmpeg | 6086731299e4d249ddc459e406b2ebb0cb71f6f4 | static int unpack_superblocks(Vp3DecodeContext *s, GetBitContext *gb)
{
int superblock_starts[3] = { 0, s->u_superblock_start, s->v_superblock_start };
int bit = 0;
int current_superblock = 0;
int current_run = 0;
int num_partial_superblocks = 0;
int i, j;
int current_fragment;
... | {
"code": [
" while (current_superblock < s->superblock_count) {",
" while (superblocks_decoded < s->superblock_count - num_partial_superblocks) {",
" for (i = sb_start; i < sb_end; i++) {"
],
"line_no": [
39,
99,
197
]
} | static int FUNC_0(Vp3DecodeContext *VAR_0, GetBitContext *VAR_1)
{
int VAR_2[3] = { 0, VAR_0->u_superblock_start, VAR_0->v_superblock_start };
int VAR_3 = 0;
int VAR_4 = 0;
int VAR_5 = 0;
int VAR_6 = 0;
int VAR_7, VAR_8;
int VAR_9;
int VAR_10;
if (VAR_0->keyframe) {
... | [
"static int FUNC_0(Vp3DecodeContext *VAR_0, GetBitContext *VAR_1)\n{",
"int VAR_2[3] = { 0, VAR_0->u_superblock_start, VAR_0->v_superblock_start };",
"int VAR_3 = 0;",
"int VAR_4 = 0;",
"int VAR_5 = 0;",
"int VAR_6 = 0;",
"int VAR_7, VAR_8;",
"int VAR_9;",
"int VAR_10;",
"if (VAR_0->keyframe) {",
... | [
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
37
],
[
39
],
[
41,
43
],
[
45,
47
],
[
51
],
[
53
],
[
55
... |
3,486 | static av_cold int mov_text_encode_init(AVCodecContext *avctx)
{
/*
* For now, we'll use a fixed default style. When we add styling
* support, this will be generated from the ASS style.
*/
static const uint8_t text_sample_entry[] = {
0x00, 0x00, 0x00, 0x00, // uint32_t displayFlags... | true | FFmpeg | f95c81ce104554b6860d94724a681a1bac0c4fbd | static av_cold int mov_text_encode_init(AVCodecContext *avctx)
{
static const uint8_t text_sample_entry[] = {
0x00, 0x00, 0x00, 0x00,
0x01,
0xFF,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
0x0... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
static const uint8_t VAR_0[] = {
0x00, 0x00, 0x00, 0x00,
0x01,
0xFF,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"static const uint8_t VAR_0[] = {",
"0x00, 0x00, 0x00, 0x00,\n0x01,\n0xFF,\n0x00, 0x00, 0x00, 0x00,\n0x00, 0x00,\n0x00, 0x00,\n0x00, 0x00,\n0x00, 0x00,\n0x00, 0x00,\n0x00, 0x00,\n0x00, 0x01,\n0x00,\n0x12,\n0xFF, 0xFF, 0xFF, 0xFF,\n0x00, 0x00, 0x00, 0x12,\n'... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
13
],
[
15,
17,
19,
21,
25,
27,
29,
31,
37,
39,
41,
43,
45,
47,
53,
55,
57,
61,
63,
65,
71
],
[
75
],
[
80
],
[
82
],
[
84,
86
],
[
90
],
[
94
],
... |
3,487 | static ssize_t eth_rx(NetClientState *nc, const uint8_t *buf, size_t size)
{
struct xlx_ethlite *s = qemu_get_nic_opaque(nc);
unsigned int rxbase = s->rxbuf * (0x800 / 4);
/* DA filter. */
if (!(buf[0] & 0x80) && memcmp(&s->conf.macaddr.a[0], buf, 6))
return size;
if (s->regs[rxb... | true | qemu | a0d1cbdacff5df4ded16b753b38fdd9da6092968 | static ssize_t eth_rx(NetClientState *nc, const uint8_t *buf, size_t size)
{
struct xlx_ethlite *s = qemu_get_nic_opaque(nc);
unsigned int rxbase = s->rxbuf * (0x800 / 4);
if (!(buf[0] & 0x80) && memcmp(&s->conf.macaddr.a[0], buf, 6))
return size;
if (s->regs[rxbase + R_RX_CTRL0]... | {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(NetClientState *nc, const uint8_t *buf, size_t size)
{
struct xlx_ethlite *VAR_0 = qemu_get_nic_opaque(nc);
unsigned int VAR_1 = VAR_0->rxbuf * (0x800 / 4);
if (!(buf[0] & 0x80) && memcmp(&VAR_0->conf.macaddr.a[0], buf, 6))
return size;
if (VAR_0->regs[VAR_1... | [
"static ssize_t FUNC_0(NetClientState *nc, const uint8_t *buf, size_t size)\n{",
"struct xlx_ethlite *VAR_0 = qemu_get_nic_opaque(nc);",
"unsigned int VAR_1 = VAR_0->rxbuf * (0x800 / 4);",
"if (!(buf[0] & 0x80) && memcmp(&VAR_0->conf.macaddr.a[0], buf, 6))\nreturn size;",
"if (VAR_0->regs[VAR_1 + R_RX_CTRL0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13,
15
],
[
19
],
[
21
],
[
27
],
[
33
],
[
37
],
[
39
],
[
41
],
[
48
],
[
50
]
] |
3,488 | static void init_proc_970MP (CPUPPCState *env)
{
gen_spr_ne_601(env);
gen_spr_7xx(env);
/* Time base */
gen_tbl(env);
/* Hardware implementation registers */
/* XXX : not implemented */
spr_register(env, SPR_HID0, "HID0",
SPR_NOACCESS, SPR_NOACCESS,
... | true | qemu | faadf50e2962dd54175647a80bd6fc4319c91973 | static void init_proc_970MP (CPUPPCState *env)
{
gen_spr_ne_601(env);
gen_spr_7xx(env);
gen_tbl(env);
spr_register(env, SPR_HID0, "HID0",
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_clear,
0x60000000);
... | {
"code": [
"#endif",
" env->excp_prefix = 0xFFF00000;",
" env->excp_prefix = 0xFFF00000;",
" 0x00000000);",
"#if !defined(CONFIG_USER_ONLY)",
" env->excp_prefix = 0xFFF00000;",
"#endif",
"#if !defined(CONFIG_USER_ONLY)",
" env->excp_prefix = 0xFFF00000;... | static void FUNC_0 (CPUPPCState *VAR_0)
{
gen_spr_ne_601(VAR_0);
gen_spr_7xx(VAR_0);
gen_tbl(VAR_0);
spr_register(VAR_0, SPR_HID0, "HID0",
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_clear,
0x60000000);
... | [
"static void FUNC_0 (CPUPPCState *VAR_0)\n{",
"gen_spr_ne_601(VAR_0);",
"gen_spr_7xx(VAR_0);",
"gen_tbl(VAR_0);",
"spr_register(VAR_0, SPR_HID0, \"HID0\",\nSPR_NOACCESS, SPR_NOACCESS,\n&spr_read_generic, &spr_write_clear,\n0x60000000);",
"spr_register(VAR_0, SPR_HID1, \"HID1\",\nSPR_NOACCESS, SPR_NOACCESS... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
17,
19,
21,
23
],
[
27,
29,
31,
33
],
[
37,
39,
41,
43
],
[
47,
49,
51,
53
],
[
59
],
[
63,
65,
67,
69
],
[
73,
75,
77,
79... |
3,489 | void ff_h264_direct_ref_list_init(const H264Context *const h, H264SliceContext *sl)
{
H264Ref *const ref1 = &sl->ref_list[1][0];
H264Picture *const cur = h->cur_pic_ptr;
int list, j, field;
int sidx = (h->picture_structure & 1) ^ 1;
int ref1sidx = (ref1->reference & 1) ^ 1;
for... | true | FFmpeg | 77a644e6fa4aaeb2c26cfaa0e8ec3b19829b8d88 | void ff_h264_direct_ref_list_init(const H264Context *const h, H264SliceContext *sl)
{
H264Ref *const ref1 = &sl->ref_list[1][0];
H264Picture *const cur = h->cur_pic_ptr;
int list, j, field;
int sidx = (h->picture_structure & 1) ^ 1;
int ref1sidx = (ref1->reference & 1) ^ 1;
for... | {
"code": [],
"line_no": []
} | void FUNC_0(const H264Context *const VAR_0, H264SliceContext *VAR_1)
{
H264Ref *const ref1 = &VAR_1->ref_list[1][0];
H264Picture *const cur = VAR_0->cur_pic_ptr;
int VAR_2, VAR_3, VAR_4;
int VAR_5 = (VAR_0->picture_structure & 1) ^ 1;
int VAR_6 = (ref1->reference & 1) ^ 1;
for ... | [
"void FUNC_0(const H264Context *const VAR_0, H264SliceContext *VAR_1)\n{",
"H264Ref *const ref1 = &VAR_1->ref_list[1][0];",
"H264Picture *const cur = VAR_0->cur_pic_ptr;",
"int VAR_2, VAR_3, VAR_4;",
"int VAR_5 = (VAR_0->picture_structure & 1) ^ 1;",
"int VAR_6 = (ref1->reference & 1) ^ 1;",
"f... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
49,
51
],
[
55
... |
3,490 | static coroutine_fn int qcow2_co_write_zeroes(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, BdrvRequestFlags flags)
{
int ret;
BDRVQcow2State *s = bs->opaque;
int head = sector_num % s->cluster_sectors;
int tail = (sector_num + nb_sectors) % s->cluster_sectors;
trace_qcow2... | true | qemu | ebb718a5c7240f6ffb308e0d0b67a92c3b63b91c | static coroutine_fn int qcow2_co_write_zeroes(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, BdrvRequestFlags flags)
{
int ret;
BDRVQcow2State *s = bs->opaque;
int head = sector_num % s->cluster_sectors;
int tail = (sector_num + nb_sectors) % s->cluster_sectors;
trace_qcow2... | {
"code": [
" BDRVQcow2State *s = bs->opaque;",
" BDRVQcow2State *s = bs->opaque;",
" int ret;",
" int head = sector_num % s->cluster_sectors;",
" int tail = (sector_num + nb_sectors) % s->cluster_sectors;",
" if (head != 0 || tail != 0) {",
" sector_num = cl_start... | static coroutine_fn int FUNC_0(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, BdrvRequestFlags flags)
{
int VAR_0;
BDRVQcow2State *s = bs->opaque;
int VAR_1 = sector_num % s->cluster_sectors;
int VAR_2 = (sector_num + nb_sectors) % s->cluster_sectors;
trace_qcow2_write_zero... | [
"static coroutine_fn int FUNC_0(BlockDriverState *bs,\nint64_t sector_num, int nb_sectors, BdrvRequestFlags flags)\n{",
"int VAR_0;",
"BDRVQcow2State *s = bs->opaque;",
"int VAR_1 = sector_num % s->cluster_sectors;",
"int VAR_2 = (sector_num + nb_sectors) % s->cluster_sectors;",
"trace_qcow2_write_zeroes_... | [
0,
1,
1,
1,
1,
0,
1,
0,
0,
1,
1,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19,
21
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
49
],
[
53
],
[
55
],
[
57
],
[
59
... |
3,491 | static int read_packet(AVFormatContext *s1, AVPacket *pkt)
{
VideoDemuxData *s = s1->priv_data;
char filename[1024];
int i;
int size[3]={0}, ret[3]={0};
AVIOContext *f[3];
AVCodecContext *codec= s1->streams[0]->codec;
if (!s->is_pipe) {
/* loop over input */
if (s... | true | FFmpeg | 5e3572893d7f17679c5e051c511bf42f3da77b00 | static int read_packet(AVFormatContext *s1, AVPacket *pkt)
{
VideoDemuxData *s = s1->priv_data;
char filename[1024];
int i;
int size[3]={0}, ret[3]={0};
AVIOContext *f[3];
AVCodecContext *codec= s1->streams[0]->codec;
if (!s->is_pipe) {
if (s->loop && s->img_numb... | {
"code": [
" AVIOContext *f[3];",
" if(i==1)",
" if(size[i]){"
],
"line_no": [
13,
45,
99
]
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
VideoDemuxData *s = VAR_0->priv_data;
char VAR_2[1024];
int VAR_3;
int VAR_4[3]={0}, VAR_5[3]={0};
AVIOContext *f[3];
AVCodecContext *codec= VAR_0->streams[0]->codec;
if (!s->is_pipe) {
if (s->loop && s... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"VideoDemuxData *s = VAR_0->priv_data;",
"char VAR_2[1024];",
"int VAR_3;",
"int VAR_4[3]={0}, VAR_5[3]={0};",
"AVIOContext *f[3];",
"AVCodecContext *codec= VAR_0->streams[0]->codec;",
"if (!s->is_pipe) {",
"if (s->loop && s->img_numbe... | [
0,
0,
0,
0,
0,
1,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33,
35,
37
],
[
39
],
[
41,
43
],
[
45,
47
],
[
49
],
[... |
3,492 | static void fill_float_array(AVLFG *lfg, float *a, int len)
{
int i;
double bmg[2], stddev = 10.0, mean = 0.0;
for (i = 0; i < len; i += 2) {
av_bmg_get(lfg, bmg);
a[i] = bmg[0] * stddev + mean;
a[i + 1] = bmg[1] * stddev + mean;
}
}
| false | FFmpeg | e53c9065ca08a9153ecc73a6a8940bcc6d667e58 | static void fill_float_array(AVLFG *lfg, float *a, int len)
{
int i;
double bmg[2], stddev = 10.0, mean = 0.0;
for (i = 0; i < len; i += 2) {
av_bmg_get(lfg, bmg);
a[i] = bmg[0] * stddev + mean;
a[i + 1] = bmg[1] * stddev + mean;
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(AVLFG *VAR_0, float *VAR_1, int VAR_2)
{
int VAR_3;
double VAR_4[2], VAR_5 = 10.0, VAR_6 = 0.0;
for (VAR_3 = 0; VAR_3 < VAR_2; VAR_3 += 2) {
av_bmg_get(VAR_0, VAR_4);
VAR_1[VAR_3] = VAR_4[0] * VAR_5 + VAR_6;
VAR_1[VAR_3 + 1] = VAR_4[1] * VAR_5 + VAR_6;... | [
"static void FUNC_0(AVLFG *VAR_0, float *VAR_1, int VAR_2)\n{",
"int VAR_3;",
"double VAR_4[2], VAR_5 = 10.0, VAR_6 = 0.0;",
"for (VAR_3 = 0; VAR_3 < VAR_2; VAR_3 += 2) {",
"av_bmg_get(VAR_0, VAR_4);",
"VAR_1[VAR_3] = VAR_4[0] * VAR_5 + VAR_6;",
"VAR_1[VAR_3 + 1] = VAR_4[1] * VAR_5 + VAR_6;",
"}",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
3,493 | static void ff_h264_idct8_add_mmx(uint8_t *dst, int16_t *block, int stride)
{
int i;
DECLARE_ALIGNED(8, int16_t, b2)[64];
block[0] += 32;
for(i=0; i<2; i++){
DECLARE_ALIGNED(8, uint64_t, tmp);
h264_idct8_1d(block+4*i);
__asm__ volatile(
"movq %%mm7,... | false | FFmpeg | 1d16a1cf99488f16492b1bb48e023f4da8377e07 | static void ff_h264_idct8_add_mmx(uint8_t *dst, int16_t *block, int stride)
{
int i;
DECLARE_ALIGNED(8, int16_t, b2)[64];
block[0] += 32;
for(i=0; i<2; i++){
DECLARE_ALIGNED(8, uint64_t, tmp);
h264_idct8_1d(block+4*i);
__asm__ volatile(
"movq %%mm7,... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t *VAR_0, int16_t *VAR_1, int VAR_2)
{
int VAR_3;
DECLARE_ALIGNED(8, int16_t, b2)[64];
VAR_1[0] += 32;
for(VAR_3=0; VAR_3<2; VAR_3++){
DECLARE_ALIGNED(8, uint64_t, tmp);
h264_idct8_1d(VAR_1+4*VAR_3);
__asm__ volatile(
"movq ... | [
"static void FUNC_0(uint8_t *VAR_0, int16_t *VAR_1, int VAR_2)\n{",
"int VAR_3;",
"DECLARE_ALIGNED(8, int16_t, b2)[64];",
"VAR_1[0] += 32;",
"for(VAR_3=0; VAR_3<2; VAR_3++){",
"DECLARE_ALIGNED(8, uint64_t, tmp);",
"h264_idct8_1d(VAR_1+4*VAR_3);",
"__asm__ volatile(\n\"movq %%mm7, %0 \\n\\t\"\nT... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
21
],
[
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57
],
[
59
],
[
63
],
[
65
],
[
69... |
3,495 | void visit_type_uint32(Visitor *v, uint32_t *obj, const char *name, Error **errp)
{
int64_t value;
if (!error_is_set(errp)) {
if (v->type_uint32) {
v->type_uint32(v, obj, name, errp);
} else {
value = *obj;
v->type_int(v, &value, name, errp);
... | true | qemu | 297a3646c2947ee64a6d42ca264039732c6218e0 | void visit_type_uint32(Visitor *v, uint32_t *obj, const char *name, Error **errp)
{
int64_t value;
if (!error_is_set(errp)) {
if (v->type_uint32) {
v->type_uint32(v, obj, name, errp);
} else {
value = *obj;
v->type_int(v, &value, name, errp);
... | {
"code": [
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" } else {",
" value = *obj;",
" v->t... | void FUNC_0(Visitor *VAR_0, uint32_t *VAR_1, const char *VAR_2, Error **VAR_3)
{
int64_t value;
if (!error_is_set(VAR_3)) {
if (VAR_0->type_uint32) {
VAR_0->type_uint32(VAR_0, VAR_1, VAR_2, VAR_3);
} else {
value = *VAR_1;
VAR_0->type_int(VAR_0, &value... | [
"void FUNC_0(Visitor *VAR_0, uint32_t *VAR_1, const char *VAR_2, Error **VAR_3)\n{",
"int64_t value;",
"if (!error_is_set(VAR_3)) {",
"if (VAR_0->type_uint32) {",
"VAR_0->type_uint32(VAR_0, VAR_1, VAR_2, VAR_3);",
"} else {",
"value = *VAR_1;",
"VAR_0->type_int(VAR_0, &value, VAR_2, VAR_3);",
"if (v... | [
0,
0,
1,
1,
1,
0,
1,
1,
1,
1,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
3,496 | static int RENAME(dct_quantize)(MpegEncContext *s,
DCTELEM *block, int n,
int qscale)
{
int i, level, last_non_zero_p1, q;
const UINT16 *qmat;
static __align8 INT16 temp_block[64];
int minLevel, maxLevel;
if(s->avctx!=NULL && s->a... | true | FFmpeg | d7e9533aa06f4073a27812349b35ba5fede11ca1 | static int RENAME(dct_quantize)(MpegEncContext *s,
DCTELEM *block, int n,
int qscale)
{
int i, level, last_non_zero_p1, q;
const UINT16 *qmat;
static __align8 INT16 temp_block[64];
int minLevel, maxLevel;
if(s->avctx!=NULL && s->a... | {
"code": [
" int qscale)",
" int i, level, last_non_zero_p1, q;",
" const UINT16 *qmat;",
" int minLevel, maxLevel;",
" if(s->avctx!=NULL && s->avctx->codec->id==CODEC_ID_MPEG4){",
" minLevel= -2048;",
"\tmaxLevel= 2047;",
" }else if(s-... | static int FUNC_0(dct_quantize)(MpegEncContext *s,
DCTELEM *block, int n,
int qscale)
{
int VAR_0, VAR_1, VAR_2, VAR_3;
const UINT16 *VAR_4;
static __align8 VAR_5 temp_block[64];
int VAR_6, VAR_7;
if(s->avctx!=NULL && s->avctx->co... | [
"static int FUNC_0(dct_quantize)(MpegEncContext *s,\nDCTELEM *block, int n,\nint qscale)\n{",
"int VAR_0, VAR_1, VAR_2, VAR_3;",
"const UINT16 *VAR_4;",
"static __align8 VAR_5 temp_block[64];",
"int VAR_6, VAR_7;",
"if(s->avctx!=NULL && s->avctx->codec->id==CODEC_ID_MPEG4){",
"VAR_6= -2048;",
"VAR_7= ... | [
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
1,
1,
0,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
1,
0,
1,
0,
1,
1,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
55
... |
3,497 | static int mxf_write_packet(AVFormatContext *s, AVPacket *pkt)
{
MXFContext *mxf = s->priv_data;
AVIOContext *pb = s->pb;
AVStream *st = s->streams[pkt->stream_index];
MXFStreamContext *sc = st->priv_data;
MXFIndexEntry ie = {0};
int err;
if (!mxf->edit_unit_byte_count && !(mxf->ed... | true | FFmpeg | b51e7554e74cbf007a1cab83c7bed3ad9fa2793a | static int mxf_write_packet(AVFormatContext *s, AVPacket *pkt)
{
MXFContext *mxf = s->priv_data;
AVIOContext *pb = s->pb;
AVStream *st = s->streams[pkt->stream_index];
MXFStreamContext *sc = st->priv_data;
MXFIndexEntry ie = {0};
int err;
if (!mxf->edit_unit_byte_count && !(mxf->ed... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
MXFContext *mxf = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
AVStream *st = VAR_0->streams[VAR_1->stream_index];
MXFStreamContext *sc = st->priv_data;
MXFIndexEntry ie = {0};
int VAR_2;
if (!mxf->edit_unit_byte_count ... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"MXFContext *mxf = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"AVStream *st = VAR_0->streams[VAR_1->stream_index];",
"MXFStreamContext *sc = st->priv_data;",
"MXFIndexEntry ie = {0};",
"int VAR_2;",
"if (!mxf->edit_unit_byte_cou... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
35
],
[
37
],
[
39
],
[
41
],
[
44
],
[
46
],
[
48
],
[... |
3,498 | static void set_up_watchdog (m48t59_t *NVRAM, uint8_t value)
{
uint64_t interval; /* in 1/16 seconds */
if (NVRAM->wd_timer != NULL) {
qemu_del_timer(NVRAM->wd_timer);
NVRAM->wd_timer = NULL;
}
NVRAM->buffer[0x1FF0] &= ~0x80;
if (value != 0) {
interval = (1 << (2 * (value & 0x03... | true | qemu | 868d585aced5457218b3443398d08594d9c3ba6d | static void set_up_watchdog (m48t59_t *NVRAM, uint8_t value)
{
uint64_t interval;
if (NVRAM->wd_timer != NULL) {
qemu_del_timer(NVRAM->wd_timer);
NVRAM->wd_timer = NULL;
}
NVRAM->buffer[0x1FF0] &= ~0x80;
if (value != 0) {
interval = (1 << (2 * (value & 0x03))) * ((value >> 2) &... | {
"code": [
"\tNVRAM->wd_timer = NULL;",
" NVRAM->buffer[0x1FF0] &= ~0x80;",
" if (value != 0) {",
"\tinterval = (1 << (2 * (value & 0x03))) * ((value >> 2) & 0x1F);",
"\tqemu_mod_timer(NVRAM->wd_timer, ((uint64_t)time(NULL) * 1000) +",
"\t\t ((interval * 1000) >> 4));"
],
"lin... | static void FUNC_0 (m48t59_t *VAR_0, uint8_t VAR_1)
{
uint64_t interval;
if (VAR_0->wd_timer != NULL) {
qemu_del_timer(VAR_0->wd_timer);
VAR_0->wd_timer = NULL;
}
VAR_0->buffer[0x1FF0] &= ~0x80;
if (VAR_1 != 0) {
interval = (1 << (2 * (VAR_1 & 0x03))) * ((VAR_1 >> 2) & 0x1F);
... | [
"static void FUNC_0 (m48t59_t *VAR_0, uint8_t VAR_1)\n{",
"uint64_t interval;",
"if (VAR_0->wd_timer != NULL) {",
"qemu_del_timer(VAR_0->wd_timer);",
"VAR_0->wd_timer = NULL;",
"}",
"VAR_0->buffer[0x1FF0] &= ~0x80;",
"if (VAR_1 != 0) {",
"interval = (1 << (2 * (VAR_1 & 0x03))) * ((VAR_1 >> 2) & 0x1F... | [
0,
0,
0,
0,
1,
0,
1,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
]
] |
3,500 | static float get_band_cost_SQUAD_mips(struct AACEncContext *s,
PutBitContext *pb, const float *in,
const float *scaled, int size, int scale_idx,
int cb, const float lambda, const float uplim,
... | true | FFmpeg | 01ecb7172b684f1c4b3e748f95c5a9a494ca36ec | static float get_band_cost_SQUAD_mips(struct AACEncContext *s,
PutBitContext *pb, const float *in,
const float *scaled, int size, int scale_idx,
int cb, const float lambda, const float uplim,
... | {
"code": [
" int *bits)",
" int *bits)",
" int *bits)"
],
"line_no": [
9,
9,
9
]
} | static float FUNC_0(struct AACEncContext *VAR_0,
PutBitContext *VAR_1, const float *VAR_2,
const float *VAR_3, int VAR_4, int VAR_5,
int VAR_6, const float VAR_7, const float VAR_8,
... | [
"static float FUNC_0(struct AACEncContext *VAR_0,\nPutBitContext *VAR_1, const float *VAR_2,\nconst float *VAR_3, int VAR_4, int VAR_5,\nint VAR_6, const float VAR_7, const float VAR_8,\nint *VAR_9)\n{",
"const float VAR_10 = ff_aac_pow34sf_tab[POW_SF2_ZERO - VAR_5 + SCALE_ONE_POS - SCALE_DIV_512];",
"const flo... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
... |
3,501 | static target_ulong h_register_logical_lan(CPUPPCState *env,
sPAPREnvironment *spapr,
target_ulong opcode,
target_ulong *args)
{
target_ulong reg = args[0];
target_ulong buf_lis... | true | qemu | ad0ebb91cd8b5fdc4a583b03645677771f420a46 | static target_ulong h_register_logical_lan(CPUPPCState *env,
sPAPREnvironment *spapr,
target_ulong opcode,
target_ulong *args)
{
target_ulong reg = args[0];
target_ulong buf_lis... | {
"code": [
" if (check_bd(dev, VLAN_VALID_BD(buf_list, SPAPR_VIO_TCE_PAGE_SIZE),",
" SPAPR_VIO_TCE_PAGE_SIZE) < 0) {",
" filter_list_bd = VLAN_VALID_BD(filter_list, SPAPR_VIO_TCE_PAGE_SIZE);",
" if (check_bd(dev, filter_list_bd, SPAPR_VIO_TCE_PAGE_SIZE) < 0) {",
" stq_... | static target_ulong FUNC_0(CPUPPCState *env,
sPAPREnvironment *spapr,
target_ulong opcode,
target_ulong *args)
{
target_ulong reg = args[0];
target_ulong buf_list = args[1];
... | [
"static target_ulong FUNC_0(CPUPPCState *env,\nsPAPREnvironment *spapr,\ntarget_ulong opcode,\ntarget_ulong *args)\n{",
"target_ulong reg = args[0];",
"target_ulong buf_list = args[1];",
"target_ulong rec_queue = args[2];",
"target_ulong filter_list = args[3];",
"VIOsPAPRDevice *sdev = spapr_vio_find_by_r... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
1,
0,
1,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
47,
49
],
[
51
],
[... |
3,503 | av_cold void ff_psy_preprocess_end(struct FFPsyPreprocessContext *ctx)
{
int i;
ff_iir_filter_free_coeffs(ctx->fcoeffs);
if (ctx->fstate)
for (i = 0; i < ctx->avctx->channels; i++)
ff_iir_filter_free_state(ctx->fstate[i]);
av_freep(&ctx->fstate);
} | true | FFmpeg | 771c86c13d7133035e53f7aeb14407ae5dca6453 | av_cold void ff_psy_preprocess_end(struct FFPsyPreprocessContext *ctx)
{
int i;
ff_iir_filter_free_coeffs(ctx->fcoeffs);
if (ctx->fstate)
for (i = 0; i < ctx->avctx->channels; i++)
ff_iir_filter_free_state(ctx->fstate[i]);
av_freep(&ctx->fstate);
} | {
"code": [],
"line_no": []
} | av_cold void FUNC_0(struct FFPsyPreprocessContext *ctx)
{
int VAR_0;
ff_iir_filter_free_coeffs(ctx->fcoeffs);
if (ctx->fstate)
for (VAR_0 = 0; VAR_0 < ctx->avctx->channels; VAR_0++)
ff_iir_filter_free_state(ctx->fstate[VAR_0]);
av_freep(&ctx->fstate);
} | [
"av_cold void FUNC_0(struct FFPsyPreprocessContext *ctx)\n{",
"int VAR_0;",
"ff_iir_filter_free_coeffs(ctx->fcoeffs);",
"if (ctx->fstate)\nfor (VAR_0 = 0; VAR_0 < ctx->avctx->channels; VAR_0++)",
"ff_iir_filter_free_state(ctx->fstate[VAR_0]);",
"av_freep(&ctx->fstate);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13
],
[
15
],
[
18
]
] |
3,504 | static int bdrv_open_common(BlockDriverState *bs, const char *filename,
int flags, BlockDriver *drv)
{
int ret, open_flags;
assert(drv != NULL);
bs->file = NULL;
bs->total_sectors = 0;
bs->is_temporary = 0;
bs->encrypted = 0;
bs->valid_key = 0;
bs->open_flags = flags;
... | true | qemu | 15c7733bb231090e5ebd6d10060dccdb98bb4941 | static int bdrv_open_common(BlockDriverState *bs, const char *filename,
int flags, BlockDriver *drv)
{
int ret, open_flags;
assert(drv != NULL);
bs->file = NULL;
bs->total_sectors = 0;
bs->is_temporary = 0;
bs->encrypted = 0;
bs->valid_key = 0;
bs->open_flags = flags;
... | {
"code": [
" bs->is_temporary = 0;"
],
"line_no": [
19
]
} | static int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1,
int VAR_2, BlockDriver *VAR_3)
{
int VAR_4, VAR_5;
assert(VAR_3 != NULL);
VAR_0->file = NULL;
VAR_0->total_sectors = 0;
VAR_0->is_temporary = 0;
VAR_0->encrypted = 0;
VAR_0->valid_key = 0;
VAR_0->VAR_5 = VAR_... | [
"static int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1,\nint VAR_2, BlockDriver *VAR_3)\n{",
"int VAR_4, VAR_5;",
"assert(VAR_3 != NULL);",
"VAR_0->file = NULL;",
"VAR_0->total_sectors = 0;",
"VAR_0->is_temporary = 0;",
"VAR_0->encrypted = 0;",
"VAR_0->valid_key = 0;",
"VAR_0->VAR_5 = VAR_2;"... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
63,
65
],
[
77
],
[
87... |
3,505 | void ff_vp3_idct_put_altivec(uint8_t *dst, int stride, DCTELEM block[64])
{
vec_u8 t;
IDCT_START
// pixels are signed; so add 128*16 in addition to the normal 8
vec_s16 v2048 = vec_sl(vec_splat_s16(1), vec_splat_u16(11));
eight = vec_add(eight, v2048);
IDCT_1D(NOP, NOP)
TRANSPOSE... | false | FFmpeg | 28f9ab7029bd1a02f659995919f899f84ee7361b | void ff_vp3_idct_put_altivec(uint8_t *dst, int stride, DCTELEM block[64])
{
vec_u8 t;
IDCT_START
vec_s16 v2048 = vec_sl(vec_splat_s16(1), vec_splat_u16(11));
eight = vec_add(eight, v2048);
IDCT_1D(NOP, NOP)
TRANSPOSE8(b0, b1, b2, b3, b4, b5, b6, b7);
IDCT_1D(ADD8, SHIFT4)
... | {
"code": [],
"line_no": []
} | void FUNC_0(uint8_t *VAR_0, int VAR_1, DCTELEM VAR_2[64])
{
vec_u8 t;
IDCT_START
vec_s16 v2048 = vec_sl(vec_splat_s16(1), vec_splat_u16(11));
eight = vec_add(eight, v2048);
IDCT_1D(NOP, NOP)
TRANSPOSE8(b0, b1, b2, b3, b4, b5, b6, b7);
IDCT_1D(ADD8, SHIFT4)
#define PUT(a)... | [
"void FUNC_0(uint8_t *VAR_0, int VAR_1, DCTELEM VAR_2[64])\n{",
"vec_u8 t;",
"IDCT_START\nvec_s16 v2048 = vec_sl(vec_splat_s16(1), vec_splat_u16(11));",
"eight = vec_add(eight, v2048);",
"IDCT_1D(NOP, NOP)\nTRANSPOSE8(b0, b1, b2, b3, b4, b5, b6, b7);",
"IDCT_1D(ADD8, SHIFT4)\n#define PUT(a)\\\nt = vec_pac... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
13
],
[
15
],
[
19,
21
],
[
23,
27,
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51,
53
]
] |
3,506 | static void lowpass16(WaveformContext *s, AVFrame *in, AVFrame *out,
int component, int intensity, int offset, int column)
{
const int plane = s->desc->comp[component].plane;
const int mirror = s->mirror;
const int is_chroma = (component == 1 || component == 2);
const int shi... | false | FFmpeg | db592f3b03a21d5bd5237021c00af3ce0431fc60 | static void lowpass16(WaveformContext *s, AVFrame *in, AVFrame *out,
int component, int intensity, int offset, int column)
{
const int plane = s->desc->comp[component].plane;
const int mirror = s->mirror;
const int is_chroma = (component == 1 || component == 2);
const int shi... | {
"code": [],
"line_no": []
} | static void FUNC_0(WaveformContext *VAR_0, AVFrame *VAR_1, AVFrame *VAR_2,
int VAR_3, int VAR_4, int VAR_5, int VAR_6)
{
const int VAR_7 = VAR_0->desc->comp[VAR_3].VAR_7;
const int VAR_8 = VAR_0->VAR_8;
const int VAR_9 = (VAR_3 == 1 || VAR_3 == 2);
const int VAR_10 = (VAR_9 ?... | [
"static void FUNC_0(WaveformContext *VAR_0, AVFrame *VAR_1, AVFrame *VAR_2,\nint VAR_3, int VAR_4, int VAR_5, int VAR_6)\n{",
"const int VAR_7 = VAR_0->desc->comp[VAR_3].VAR_7;",
"const int VAR_8 = VAR_0->VAR_8;",
"const int VAR_9 = (VAR_3 == 1 || VAR_3 == 2);",
"const int VAR_10 = (VAR_9 ? VAR_0->desc->log... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[... |
3,507 | static int qemu_dup_flags(int fd, int flags)
{
int ret;
int serrno;
int dup_flags;
int setfl_flags;
#ifdef F_DUPFD_CLOEXEC
ret = fcntl(fd, F_DUPFD_CLOEXEC, 0);
#else
ret = dup(fd);
if (ret != -1) {
qemu_set_cloexec(ret);
}
#endif
if (ret == -1) {
goto... | false | qemu | 3b6eda2f57a5b7ed047077b6272c2b5a9e3531ca | static int qemu_dup_flags(int fd, int flags)
{
int ret;
int serrno;
int dup_flags;
int setfl_flags;
#ifdef F_DUPFD_CLOEXEC
ret = fcntl(fd, F_DUPFD_CLOEXEC, 0);
#else
ret = dup(fd);
if (ret != -1) {
qemu_set_cloexec(ret);
}
#endif
if (ret == -1) {
goto... | {
"code": [],
"line_no": []
} | static int FUNC_0(int VAR_0, int VAR_1)
{
int VAR_2;
int VAR_3;
int VAR_4;
int VAR_5;
#ifdef F_DUPFD_CLOEXEC
VAR_2 = fcntl(VAR_0, F_DUPFD_CLOEXEC, 0);
#else
VAR_2 = dup(VAR_0);
if (VAR_2 != -1) {
qemu_set_cloexec(VAR_2);
}
#endif
if (VAR_2 == -1) {
go... | [
"static int FUNC_0(int VAR_0, int VAR_1)\n{",
"int VAR_2;",
"int VAR_3;",
"int VAR_4;",
"int VAR_5;",
"#ifdef F_DUPFD_CLOEXEC\nVAR_2 = fcntl(VAR_0, F_DUPFD_CLOEXEC, 0);",
"#else\nVAR_2 = dup(VAR_0);",
"if (VAR_2 != -1) {",
"qemu_set_cloexec(VAR_2);",
"}",
"#endif\nif (VAR_2 == -1) {",
"goto fa... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[... |
3,508 | void bdrv_query_image_info(BlockDriverState *bs,
ImageInfo **p_info,
Error **errp)
{
int64_t size;
const char *backing_filename;
BlockDriverInfo bdi;
int ret;
Error *err = NULL;
ImageInfo *info;
size = bdrv_getlength(bs);
... | false | qemu | 9a29e18f7dfd5a0e80d1c60fc856ebba18ddb738 | void bdrv_query_image_info(BlockDriverState *bs,
ImageInfo **p_info,
Error **errp)
{
int64_t size;
const char *backing_filename;
BlockDriverInfo bdi;
int ret;
Error *err = NULL;
ImageInfo *info;
size = bdrv_getlength(bs);
... | {
"code": [],
"line_no": []
} | void FUNC_0(BlockDriverState *VAR_0,
ImageInfo **VAR_1,
Error **VAR_2)
{
int64_t size;
const char *VAR_3;
BlockDriverInfo bdi;
int VAR_4;
Error *err = NULL;
ImageInfo *info;
size = bdrv_getlength(VAR_0);
if (size < 0) {
... | [
"void FUNC_0(BlockDriverState *VAR_0,\nImageInfo **VAR_1,\nError **VAR_2)\n{",
"int64_t size;",
"const char *VAR_3;",
"BlockDriverInfo bdi;",
"int VAR_4;",
"Error *err = NULL;",
"ImageInfo *info;",
"size = bdrv_getlength(VAR_0);",
"if (size < 0) {",
"error_setg_errno(VAR_2, -size, \"Can't get 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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
3,509 | static int vnc_set_x509_credential(VncDisplay *vs,
const char *certdir,
const char *filename,
char **cred,
int ignoreMissing)
{
struct stat sb;
if (*cred) {
qemu_free(*cred);
*cred = NULL;
}
*cred = qemu_malloc(strlen(certdir) + strlen(filename) + 2);
... | false | qemu | 5fb6c7a8b26eab1a22207d24b4784bd2b39ab54b | static int vnc_set_x509_credential(VncDisplay *vs,
const char *certdir,
const char *filename,
char **cred,
int ignoreMissing)
{
struct stat sb;
if (*cred) {
qemu_free(*cred);
*cred = NULL;
}
*cred = qemu_malloc(strlen(certdir) + strlen(filename) + 2);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(VncDisplay *VAR_0,
const char *VAR_1,
const char *VAR_2,
char **VAR_3,
int VAR_4)
{
struct stat VAR_5;
if (*VAR_3) {
qemu_free(*VAR_3);
*VAR_3 = NULL;
}
*VAR_3 = qemu_malloc(strlen(VAR_1) + strlen(VAR_2) + 2);
strcpy(*VAR_3, VAR_1);
... | [
"static int FUNC_0(VncDisplay *VAR_0,\nconst char *VAR_1,\nconst char *VAR_2,\nchar **VAR_3,\nint VAR_4)\n{",
"struct stat VAR_5;",
"if (*VAR_3) {",
"qemu_free(*VAR_3);",
"*VAR_3 = NULL;",
"}",
"*VAR_3 = qemu_malloc(strlen(VAR_1) + strlen(VAR_2) + 2);",
"strcpy(*VAR_3, VAR_1);",
"strcat(*VAR_3, \"/\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[
51
],
[
53
],
[... |
3,510 | void stw_le_phys(target_phys_addr_t addr, uint32_t val)
{
stw_phys_internal(addr, val, DEVICE_LITTLE_ENDIAN);
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | void stw_le_phys(target_phys_addr_t addr, uint32_t val)
{
stw_phys_internal(addr, val, DEVICE_LITTLE_ENDIAN);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(target_phys_addr_t VAR_0, uint32_t VAR_1)
{
stw_phys_internal(VAR_0, VAR_1, DEVICE_LITTLE_ENDIAN);
}
| [
"void FUNC_0(target_phys_addr_t VAR_0, uint32_t VAR_1)\n{",
"stw_phys_internal(VAR_0, VAR_1, DEVICE_LITTLE_ENDIAN);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
3,511 | const char *qdev_fw_name(DeviceState *dev)
{
DeviceClass *dc = DEVICE_GET_CLASS(dev);
if (dc->fw_name) {
return dc->fw_name;
} else if (dc->alias) {
return dc->alias;
}
return object_get_typename(OBJECT(dev));
}
| false | qemu | 6acbe4c6f18e7de00481ff30574262b58526de45 | const char *qdev_fw_name(DeviceState *dev)
{
DeviceClass *dc = DEVICE_GET_CLASS(dev);
if (dc->fw_name) {
return dc->fw_name;
} else if (dc->alias) {
return dc->alias;
}
return object_get_typename(OBJECT(dev));
}
| {
"code": [],
"line_no": []
} | const char *FUNC_0(DeviceState *VAR_0)
{
DeviceClass *dc = DEVICE_GET_CLASS(VAR_0);
if (dc->fw_name) {
return dc->fw_name;
} else if (dc->alias) {
return dc->alias;
}
return object_get_typename(OBJECT(VAR_0));
}
| [
"const char *FUNC_0(DeviceState *VAR_0)\n{",
"DeviceClass *dc = DEVICE_GET_CLASS(VAR_0);",
"if (dc->fw_name) {",
"return dc->fw_name;",
"} else if (dc->alias) {",
"return dc->alias;",
"}",
"return object_get_typename(OBJECT(VAR_0));",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
3,512 | static inline void gen_op_eval_fblg(TCGv dst, TCGv src,
unsigned int fcc_offset)
{
gen_mov_reg_FCC0(dst, src, fcc_offset);
gen_mov_reg_FCC1(cpu_tmp0, src, fcc_offset);
tcg_gen_xor_tl(dst, dst, cpu_tmp0);
}
| false | qemu | de9e9d9f17a36ff76c1a02a5348835e5e0a081b0 | static inline void gen_op_eval_fblg(TCGv dst, TCGv src,
unsigned int fcc_offset)
{
gen_mov_reg_FCC0(dst, src, fcc_offset);
gen_mov_reg_FCC1(cpu_tmp0, src, fcc_offset);
tcg_gen_xor_tl(dst, dst, cpu_tmp0);
}
| {
"code": [],
"line_no": []
} | static inline void FUNC_0(TCGv VAR_0, TCGv VAR_1,
unsigned int VAR_2)
{
gen_mov_reg_FCC0(VAR_0, VAR_1, VAR_2);
gen_mov_reg_FCC1(cpu_tmp0, VAR_1, VAR_2);
tcg_gen_xor_tl(VAR_0, VAR_0, cpu_tmp0);
}
| [
"static inline void FUNC_0(TCGv VAR_0, TCGv VAR_1,\nunsigned int VAR_2)\n{",
"gen_mov_reg_FCC0(VAR_0, VAR_1, VAR_2);",
"gen_mov_reg_FCC1(cpu_tmp0, VAR_1, VAR_2);",
"tcg_gen_xor_tl(VAR_0, VAR_0, cpu_tmp0);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
3,514 | uint32_t omap_badwidth_read32(void *opaque, target_phys_addr_t addr)
{
OMAP_32B_REG(addr);
return 0;
}
| false | qemu | b854bc196f5c4b4e3299c0b0ee63cf828ece9e77 | uint32_t omap_badwidth_read32(void *opaque, target_phys_addr_t addr)
{
OMAP_32B_REG(addr);
return 0;
}
| {
"code": [],
"line_no": []
} | uint32_t FUNC_0(void *opaque, target_phys_addr_t addr)
{
OMAP_32B_REG(addr);
return 0;
}
| [
"uint32_t FUNC_0(void *opaque, target_phys_addr_t addr)\n{",
"OMAP_32B_REG(addr);",
"return 0;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
3,515 | SocketAddressLegacy *socket_parse(const char *str, Error **errp)
{
SocketAddressLegacy *addr;
addr = g_new0(SocketAddressLegacy, 1);
if (strstart(str, "unix:", NULL)) {
if (str[5] == '\0') {
error_setg(errp, "invalid Unix socket address");
goto fail;
} else ... | false | qemu | bd269ebc82fbaa5fe7ce5bc7c1770ac8acecd884 | SocketAddressLegacy *socket_parse(const char *str, Error **errp)
{
SocketAddressLegacy *addr;
addr = g_new0(SocketAddressLegacy, 1);
if (strstart(str, "unix:", NULL)) {
if (str[5] == '\0') {
error_setg(errp, "invalid Unix socket address");
goto fail;
} else ... | {
"code": [],
"line_no": []
} | SocketAddressLegacy *FUNC_0(const char *str, Error **errp)
{
SocketAddressLegacy *addr;
addr = g_new0(SocketAddressLegacy, 1);
if (strstart(str, "unix:", NULL)) {
if (str[5] == '\0') {
error_setg(errp, "invalid Unix socket address");
goto fail;
} else {
... | [
"SocketAddressLegacy *FUNC_0(const char *str, Error **errp)\n{",
"SocketAddressLegacy *addr;",
"addr = g_new0(SocketAddressLegacy, 1);",
"if (strstart(str, \"unix:\", NULL)) {",
"if (str[5] == '\\0') {",
"error_setg(errp, \"invalid Unix socket address\");",
"goto fail;",
"} else {",
"addr->type = SO... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43... |
3,516 | static void do_info_cpus(Monitor *mon, QObject **ret_data)
{
CPUState *env;
QList *cpu_list;
cpu_list = qlist_new();
/* just to set the default cpu if not already done */
mon_get_cpu();
for(env = first_cpu; env != NULL; env = env->next_cpu) {
QDict *cpu;
QObject *o... | false | qemu | ba14414174b72fa231997243a9650feaa520d054 | static void do_info_cpus(Monitor *mon, QObject **ret_data)
{
CPUState *env;
QList *cpu_list;
cpu_list = qlist_new();
mon_get_cpu();
for(env = first_cpu; env != NULL; env = env->next_cpu) {
QDict *cpu;
QObject *obj;
cpu_synchronize_state(env);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(Monitor *VAR_0, QObject **VAR_1)
{
CPUState *env;
QList *cpu_list;
cpu_list = qlist_new();
mon_get_cpu();
for(env = first_cpu; env != NULL; env = env->next_cpu) {
QDict *cpu;
QObject *obj;
cpu_synchronize_state(env);
obj = ... | [
"static void FUNC_0(Monitor *VAR_0, QObject **VAR_1)\n{",
"CPUState *env;",
"QList *cpu_list;",
"cpu_list = qlist_new();",
"mon_get_cpu();",
"for(env = first_cpu; env != NULL; env = env->next_cpu) {",
"QDict *cpu;",
"QObject *obj;",
"cpu_synchronize_state(env);",
"obj = qobject_from_jsonf(\"{ 'CPU... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
33
],
[
35,
37
],
[
39
],
[
43
],
[
47,
49
],
[
51,
53
],
[
55,
57
],
[
59
],
[
61... |
3,518 | void slirp_init(int restricted, const char *special_ip)
{
// debug_init("/tmp/slirp.log", DEBUG_DEFAULT);
#ifdef _WIN32
{
WSADATA Data;
WSAStartup(MAKEWORD(2,0), &Data);
atexit(slirp_cleanup);
}
#endif
link_up = 1;
slirp_restrict = restricted;
if_init();
... | false | qemu | ad196a9d0c14f681f010bb4b979030ec125ba976 | void slirp_init(int restricted, const char *special_ip)
{
#ifdef _WIN32
{
WSADATA Data;
WSAStartup(MAKEWORD(2,0), &Data);
atexit(slirp_cleanup);
}
#endif
link_up = 1;
slirp_restrict = restricted;
if_init();
ip_init();
m_init();
i... | {
"code": [],
"line_no": []
} | void FUNC_0(int VAR_0, const char *VAR_1)
{
#ifdef _WIN32
{
WSADATA Data;
WSAStartup(MAKEWORD(2,0), &Data);
atexit(slirp_cleanup);
}
#endif
link_up = 1;
slirp_restrict = VAR_0;
if_init();
ip_init();
m_init();
inet_aton("127.0.0.1... | [
"void FUNC_0(int VAR_0, const char *VAR_1)\n{",
"#ifdef _WIN32\n{",
"WSADATA Data;",
"WSAStartup(MAKEWORD(2,0), &Data);",
"atexit(slirp_cleanup);",
"}",
"#endif\nlink_up = 1;",
"slirp_restrict = VAR_0;",
"if_init();",
"ip_init();",
"m_init();",
"inet_aton(\"127.0.0.1\", &loopback_addr);",
"i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
25
],
[
27
],
[
31
],
[
33
],
[
39
],
[
45
],
[
49
],
[
51
],
[
53
],
[
55
],
[
59,
61
],
[
65
],
... |
3,519 | static void test_io_channel(bool async,
SocketAddressLegacy *listen_addr,
SocketAddressLegacy *connect_addr,
bool passFD)
{
QIOChannel *src, *dst;
QIOChannelTest *test;
if (async) {
test_io_channel_setup_asyn... | false | qemu | bd269ebc82fbaa5fe7ce5bc7c1770ac8acecd884 | static void test_io_channel(bool async,
SocketAddressLegacy *listen_addr,
SocketAddressLegacy *connect_addr,
bool passFD)
{
QIOChannel *src, *dst;
QIOChannelTest *test;
if (async) {
test_io_channel_setup_asyn... | {
"code": [],
"line_no": []
} | static void FUNC_0(bool VAR_0,
SocketAddressLegacy *VAR_1,
SocketAddressLegacy *VAR_2,
bool VAR_3)
{
QIOChannel *src, *dst;
QIOChannelTest *test;
if (VAR_0) {
test_io_channel_setup_async(VAR_1, VAR_2, &src, &... | [
"static void FUNC_0(bool VAR_0,\nSocketAddressLegacy *VAR_1,\nSocketAddressLegacy *VAR_2,\nbool VAR_3)\n{",
"QIOChannel *src, *dst;",
"QIOChannelTest *test;",
"if (VAR_0) {",
"test_io_channel_setup_async(VAR_1, VAR_2, &src, &dst);",
"g_assert(!VAR_3 ||\nqio_channel_has_feature(src, QIO_CHANNEL_FEATURE_FD_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
25,
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49
],
[
53,
55
],
[
57,... |
3,520 | static int v9fs_synth_name_to_path(FsContext *ctx, V9fsPath *dir_path,
const char *name, V9fsPath *target)
{
V9fsSynthNode *node;
V9fsSynthNode *dir_node;
/* "." and ".." are not allowed */
if (!strcmp(name, ".") || !strcmp(name, "..")) {
errno = EINVA... | false | qemu | 364031f17932814484657e5551ba12957d993d7e | static int v9fs_synth_name_to_path(FsContext *ctx, V9fsPath *dir_path,
const char *name, V9fsPath *target)
{
V9fsSynthNode *node;
V9fsSynthNode *dir_node;
if (!strcmp(name, ".") || !strcmp(name, "..")) {
errno = EINVAL;
return -1;
}
... | {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,
const char *VAR_2, V9fsPath *VAR_3)
{
V9fsSynthNode *node;
V9fsSynthNode *dir_node;
if (!strcmp(VAR_2, ".") || !strcmp(VAR_2, "..")) {
errno = EINVAL;
return -1;
}
if (!VAR_1) {... | [
"static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,\nconst char *VAR_2, V9fsPath *VAR_3)\n{",
"V9fsSynthNode *node;",
"V9fsSynthNode *dir_node;",
"if (!strcmp(VAR_2, \".\") || !strcmp(VAR_2, \"..\")) {",
"errno = EINVAL;",
"return -1;",
"}",
"if (!VAR_1) {",
"dir_node = &v9fs_synth_root;",
"} el... | [
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[... |
3,522 | static void virtio_ccw_9p_realize(VirtioCcwDevice *ccw_dev, Error **errp)
{
V9fsCCWState *dev = VIRTIO_9P_CCW(ccw_dev);
DeviceState *vdev = DEVICE(&dev->vdev);
Error *err = NULL;
qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus));
object_property_set_bool(OBJECT(vdev), true, "realized", &err);
... | false | qemu | 621ff94d5074d88253a5818c6b9c4db718fbfc65 | static void virtio_ccw_9p_realize(VirtioCcwDevice *ccw_dev, Error **errp)
{
V9fsCCWState *dev = VIRTIO_9P_CCW(ccw_dev);
DeviceState *vdev = DEVICE(&dev->vdev);
Error *err = NULL;
qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus));
object_property_set_bool(OBJECT(vdev), true, "realized", &err);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(VirtioCcwDevice *VAR_0, Error **VAR_1)
{
V9fsCCWState *dev = VIRTIO_9P_CCW(VAR_0);
DeviceState *vdev = DEVICE(&dev->vdev);
Error *err = NULL;
qdev_set_parent_bus(vdev, BUS(&VAR_0->bus));
object_property_set_bool(OBJECT(vdev), true, "realized", &err);
if (err) {
... | [
"static void FUNC_0(VirtioCcwDevice *VAR_0, Error **VAR_1)\n{",
"V9fsCCWState *dev = VIRTIO_9P_CCW(VAR_0);",
"DeviceState *vdev = DEVICE(&dev->vdev);",
"Error *err = NULL;",
"qdev_set_parent_bus(vdev, BUS(&VAR_0->bus));",
"object_property_set_bool(OBJECT(vdev), true, \"realized\", &err);",
"if (err) {",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
3,523 | static V9fsFidState *lookup_fid(V9fsState *s, int32_t fid)
{
V9fsFidState *f;
for (f = s->fid_list; f; f = f->next) {
if (f->fid == fid) {
v9fs_do_setuid(s, f->uid);
return f;
}
}
return NULL;
}
| false | qemu | 758e8e38eb582e3dc87fd55a1d234c25108a7b7f | static V9fsFidState *lookup_fid(V9fsState *s, int32_t fid)
{
V9fsFidState *f;
for (f = s->fid_list; f; f = f->next) {
if (f->fid == fid) {
v9fs_do_setuid(s, f->uid);
return f;
}
}
return NULL;
}
| {
"code": [],
"line_no": []
} | static V9fsFidState *FUNC_0(V9fsState *s, int32_t fid)
{
V9fsFidState *f;
for (f = s->fid_list; f; f = f->next) {
if (f->fid == fid) {
v9fs_do_setuid(s, f->uid);
return f;
}
}
return NULL;
}
| [
"static V9fsFidState *FUNC_0(V9fsState *s, int32_t fid)\n{",
"V9fsFidState *f;",
"for (f = s->fid_list; f; f = f->next) {",
"if (f->fid == fid) {",
"v9fs_do_setuid(s, f->uid);",
"return f;",
"}",
"}",
"return NULL;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
]
] |
3,524 | static int hda_audio_post_load(void *opaque, int version)
{
HDAAudioState *a = opaque;
HDAAudioStream *st;
int i;
dprint(a, 1, "%s\n", __FUNCTION__);
if (version == 1) {
/* assume running_compat[] is for output streams */
for (i = 0; i < ARRAY_SIZE(a->running_compat); i++)
... | false | qemu | a89f364ae8740dfc31b321eed9ee454e996dc3c1 | static int hda_audio_post_load(void *opaque, int version)
{
HDAAudioState *a = opaque;
HDAAudioStream *st;
int i;
dprint(a, 1, "%s\n", __FUNCTION__);
if (version == 1) {
for (i = 0; i < ARRAY_SIZE(a->running_compat); i++)
a->running_real[16 + i] = a->running_c... | {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0, int VAR_1)
{
HDAAudioState *a = VAR_0;
HDAAudioStream *st;
int VAR_2;
dprint(a, 1, "%s\n", __FUNCTION__);
if (VAR_1 == 1) {
for (VAR_2 = 0; VAR_2 < ARRAY_SIZE(a->running_compat); VAR_2++)
a->running_real[16 + VAR_2] = a->running_... | [
"static int FUNC_0(void *VAR_0, int VAR_1)\n{",
"HDAAudioState *a = VAR_0;",
"HDAAudioStream *st;",
"int VAR_2;",
"dprint(a, 1, \"%s\\n\", __FUNCTION__);",
"if (VAR_1 == 1) {",
"for (VAR_2 = 0; VAR_2 < ARRAY_SIZE(a->running_compat); VAR_2++)",
"a->running_real[16 + VAR_2] = a->running_compat[VAR_2];",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
]
] |
3,525 | static av_cold int dfa_decode_init(AVCodecContext *avctx)
{
DfaContext *s = avctx->priv_data;
int ret;
avctx->pix_fmt = PIX_FMT_PAL8;
if ((ret = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0)
return ret;
s->frame_buf = av_mallocz(avctx->width * avctx->height + ... | false | FFmpeg | 6fcd4f3c7255014eeb883385d32abc7442426314 | static av_cold int dfa_decode_init(AVCodecContext *avctx)
{
DfaContext *s = avctx->priv_data;
int ret;
avctx->pix_fmt = PIX_FMT_PAL8;
if ((ret = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0)
return ret;
s->frame_buf = av_mallocz(avctx->width * avctx->height + ... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
DfaContext *s = avctx->priv_data;
int VAR_0;
avctx->pix_fmt = PIX_FMT_PAL8;
if ((VAR_0 = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0)
return VAR_0;
s->frame_buf = av_mallocz(avctx->width * avctx->height + AV_... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"DfaContext *s = avctx->priv_data;",
"int VAR_0;",
"avctx->pix_fmt = PIX_FMT_PAL8;",
"if ((VAR_0 = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0)\nreturn VAR_0;",
"s->frame_buf = av_mallocz(avctx->width * avctx->height + AV_LZO_OUTPU... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15,
17
],
[
21
],
[
23,
25
],
[
29
],
[
31
]
] |
3,527 | static int mpeg_field_start(MpegEncContext *s){
AVCodecContext *avctx= s->avctx;
Mpeg1Context *s1 = (Mpeg1Context*)s;
/* start frame decoding */
if(s->first_field || s->picture_structure==PICT_FRAME){
if(MPV_frame_start(s, avctx) < 0)
return -1;
ff_er_frame_start(s... | false | FFmpeg | 9e494ab77cdf519eb5de8056c00469c78bf8a7e8 | static int mpeg_field_start(MpegEncContext *s){
AVCodecContext *avctx= s->avctx;
Mpeg1Context *s1 = (Mpeg1Context*)s;
if(s->first_field || s->picture_structure==PICT_FRAME){
if(MPV_frame_start(s, avctx) < 0)
return -1;
ff_er_frame_start(s);
s-... | {
"code": [],
"line_no": []
} | static int FUNC_0(MpegEncContext *VAR_0){
AVCodecContext *avctx= VAR_0->avctx;
Mpeg1Context *s1 = (Mpeg1Context*)VAR_0;
if(VAR_0->first_field || VAR_0->picture_structure==PICT_FRAME){
if(MPV_frame_start(VAR_0, avctx) < 0)
return -1;
ff_er_frame_start(VAR_0);
... | [
"static int FUNC_0(MpegEncContext *VAR_0){",
"AVCodecContext *avctx= VAR_0->avctx;",
"Mpeg1Context *s1 = (Mpeg1Context*)VAR_0;",
"if(VAR_0->first_field || VAR_0->picture_structure==PICT_FRAME){",
"if(MPV_frame_start(VAR_0, avctx) < 0)\nreturn -1;",
"ff_er_frame_start(VAR_0);",
"VAR_0->current_picture_pt... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
11
],
[
13,
15
],
[
19
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
53
],
[
5... |
3,528 | static void virtio_scsi_handle_cmd(VirtIODevice *vdev, VirtQueue *vq)
{
/* use non-QOM casts in the data path */
VirtIOSCSI *s = (VirtIOSCSI *)vdev;
VirtIOSCSIReq *req, *next;
QTAILQ_HEAD(, VirtIOSCSIReq) reqs = QTAILQ_HEAD_INITIALIZER(reqs);
if (s->ctx && !s->dataplane_started) {
v... | true | qemu | a8f2e5c8fffbaf7fbd4f0efc8efbeebade78008f | static void virtio_scsi_handle_cmd(VirtIODevice *vdev, VirtQueue *vq)
{
VirtIOSCSI *s = (VirtIOSCSI *)vdev;
VirtIOSCSIReq *req, *next;
QTAILQ_HEAD(, VirtIOSCSIReq) reqs = QTAILQ_HEAD_INITIALIZER(reqs);
if (s->ctx && !s->dataplane_started) {
virtio_scsi_dataplane_start(s);
... | {
"code": [
" VirtIOSCSI *s = (VirtIOSCSI *)vdev;",
" if (s->ctx && !s->dataplane_started) {",
" virtio_scsi_dataplane_start(s);",
"static void virtio_scsi_handle_cmd(VirtIODevice *vdev, VirtQueue *vq)",
" VirtIOSCSI *s = (VirtIOSCSI *)vdev;",
" if (s->ctx && !s->dataplane_s... | static void FUNC_0(VirtIODevice *VAR_0, VirtQueue *VAR_1)
{
VirtIOSCSI *s = (VirtIOSCSI *)VAR_0;
VirtIOSCSIReq *req, *next;
QTAILQ_HEAD(, VirtIOSCSIReq) reqs = QTAILQ_HEAD_INITIALIZER(reqs);
if (s->ctx && !s->dataplane_started) {
virtio_scsi_dataplane_start(s);
return;
... | [
"static void FUNC_0(VirtIODevice *VAR_0, VirtQueue *VAR_1)\n{",
"VirtIOSCSI *s = (VirtIOSCSI *)VAR_0;",
"VirtIOSCSIReq *req, *next;",
"QTAILQ_HEAD(, VirtIOSCSIReq) reqs = QTAILQ_HEAD_INITIALIZER(reqs);",
"if (s->ctx && !s->dataplane_started) {",
"virtio_scsi_dataplane_start(s);",
"return;",
"}",
"wh... | [
1,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
3,529 | static inline void RENAME(bgr24ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
{
#if COMPILE_TEMPLATE_MMX
RENAME(bgr24ToUV_mmx)(dstU, dstV, src1, width, PIX_FMT_BGR24);
#else
int i;
for (i=0; i<width; i++) {
int b= src1[3*i + 0];
... | true | FFmpeg | c3ab0004ae4dffc32494ae84dd15cfaa909a7884 | static inline void RENAME(bgr24ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
{
#if COMPILE_TEMPLATE_MMX
RENAME(bgr24ToUV_mmx)(dstU, dstV, src1, width, PIX_FMT_BGR24);
#else
int i;
for (i=0; i<width; i++) {
int b= src1[3*i + 0];
... | {
"code": [
"static inline void RENAME(bgr24ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)"
],
"line_no": [
1
]
} | static inline void FUNC_0(bgr24ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
{
#if COMPILE_TEMPLATE_MMX
FUNC_0(bgr24ToUV_mmx)(dstU, dstV, src1, width, PIX_FMT_BGR24);
#else
int VAR_0;
for (VAR_0=0; VAR_0<width; VAR_0++) {
int b= src... | [
"static inline void FUNC_0(bgr24ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)\n{",
"#if COMPILE_TEMPLATE_MMX\nFUNC_0(bgr24ToUV_mmx)(dstU, dstV, src1, width, PIX_FMT_BGR24);",
"#else\nint VAR_0;",
"for (VAR_0=0; VAR_0<width; VAR_0++) {",
"int b= sr... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
]
] |
3,531 | static QEMUFile *open_test_file(bool write)
{
int fd = dup(temp_fd);
QIOChannel *ioc;
lseek(fd, 0, SEEK_SET);
if (write) {
g_assert_cmpint(ftruncate(fd, 0), ==, 0);
}
ioc = QIO_CHANNEL(qio_channel_file_new_fd(fd));
if (write) {
return qemu_fopen_channel_output(ioc);... | true | qemu | 4ae3c0e27fff7e41fd75fc63a35703bc64785863 | static QEMUFile *open_test_file(bool write)
{
int fd = dup(temp_fd);
QIOChannel *ioc;
lseek(fd, 0, SEEK_SET);
if (write) {
g_assert_cmpint(ftruncate(fd, 0), ==, 0);
}
ioc = QIO_CHANNEL(qio_channel_file_new_fd(fd));
if (write) {
return qemu_fopen_channel_output(ioc);... | {
"code": [
" return qemu_fopen_channel_output(ioc);",
" return qemu_fopen_channel_input(ioc);"
],
"line_no": [
21,
25
]
} | static QEMUFile *FUNC_0(bool write)
{
int VAR_0 = dup(temp_fd);
QIOChannel *ioc;
lseek(VAR_0, 0, SEEK_SET);
if (write) {
g_assert_cmpint(ftruncate(VAR_0, 0), ==, 0);
}
ioc = QIO_CHANNEL(qio_channel_file_new_fd(VAR_0));
if (write) {
return qemu_fopen_channel_output(i... | [
"static QEMUFile *FUNC_0(bool write)\n{",
"int VAR_0 = dup(temp_fd);",
"QIOChannel *ioc;",
"lseek(VAR_0, 0, SEEK_SET);",
"if (write) {",
"g_assert_cmpint(ftruncate(VAR_0, 0), ==, 0);",
"}",
"ioc = QIO_CHANNEL(qio_channel_file_new_fd(VAR_0));",
"if (write) {",
"return qemu_fopen_channel_output(ioc)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
3,532 | static void hScale16_c(SwsContext *c, int16_t *_dst, int dstW, const uint8_t *_src,
const int16_t *filter,
const int16_t *filterPos, int filterSize)
{
int i;
int32_t *dst = (int32_t *) _dst;
const uint16_t *src = (const uint16_t *) _src;
int bits = av... | true | FFmpeg | f44d50a94c120135faeba6b4a1e5551b4397810f | static void hScale16_c(SwsContext *c, int16_t *_dst, int dstW, const uint8_t *_src,
const int16_t *filter,
const int16_t *filterPos, int filterSize)
{
int i;
int32_t *dst = (int32_t *) _dst;
const uint16_t *src = (const uint16_t *) _src;
int bits = av... | {
"code": [
" unsigned int val = 0;"
],
"line_no": [
27
]
} | static void FUNC_0(SwsContext *VAR_0, int16_t *VAR_1, int VAR_2, const uint8_t *VAR_3,
const int16_t *VAR_4,
const int16_t *VAR_5, int VAR_6)
{
int VAR_7;
int32_t *dst = (int32_t *) VAR_1;
const uint16_t *VAR_8 = (const uint16_t *) VAR_3;
int VAR_9 = ... | [
"static void FUNC_0(SwsContext *VAR_0, int16_t *VAR_1, int VAR_2, const uint8_t *VAR_3,\nconst int16_t *VAR_4,\nconst int16_t *VAR_5, int VAR_6)\n{",
"int VAR_7;",
"int32_t *dst = (int32_t *) VAR_1;",
"const uint16_t *VAR_8 = (const uint16_t *) VAR_3;",
"int VAR_9 = av_pix_fmt_descriptors[VAR_0->srcFormat].... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
]
] |
3,533 | static uint64_t kvmppc_read_int_cpu_dt(const char *propname)
{
char buf[PATH_MAX];
union {
uint32_t v32;
uint64_t v64;
} u;
FILE *f;
int len;
if (kvmppc_find_cpu_dt(buf, sizeof(buf))) {
return -1;
}
strncat(buf, "/", sizeof(buf) - strlen(buf));
... | true | qemu | cc64b1a1940dc2e041c5b06b003d9acf64c22372 | static uint64_t kvmppc_read_int_cpu_dt(const char *propname)
{
char buf[PATH_MAX];
union {
uint32_t v32;
uint64_t v64;
} u;
FILE *f;
int len;
if (kvmppc_find_cpu_dt(buf, sizeof(buf))) {
return -1;
}
strncat(buf, "/", sizeof(buf) - strlen(buf));
... | {
"code": [
" char buf[PATH_MAX];",
" strncat(buf, \"/\", sizeof(buf) - strlen(buf));",
" strncat(buf, propname, sizeof(buf) - strlen(buf));",
" f = fopen(buf, \"rb\");"
],
"line_no": [
5,
29,
31,
35
]
} | static uint64_t FUNC_0(const char *propname)
{
char VAR_0[PATH_MAX];
union {
uint32_t v32;
uint64_t v64;
} VAR_1;
FILE *f;
int VAR_2;
if (kvmppc_find_cpu_dt(VAR_0, sizeof(VAR_0))) {
return -1;
}
strncat(VAR_0, "/", sizeof(VAR_0) - strlen(VAR_0));
... | [
"static uint64_t FUNC_0(const char *propname)\n{",
"char VAR_0[PATH_MAX];",
"union {",
"uint32_t v32;",
"uint64_t v64;",
"} VAR_1;",
"FILE *f;",
"int VAR_2;",
"if (kvmppc_find_cpu_dt(VAR_0, sizeof(VAR_0))) {",
"return -1;",
"}",
"strncat(VAR_0, \"/\", sizeof(VAR_0) - strlen(VAR_0));",
"strnc... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
... |
3,534 | void icp_pit_init(uint32_t base, qemu_irq *pic, int irq)
{
int iomemtype;
icp_pit_state *s;
s = (icp_pit_state *)qemu_mallocz(sizeof(icp_pit_state));
s->base = base;
/* Timer 0 runs at the system clock speed (40MHz). */
s->timer[0] = arm_timer_init(40000000, pic[irq]);
/* The othe... | true | qemu | 187337f8b0ec0813dd3876d1efe37d415fb81c2e | void icp_pit_init(uint32_t base, qemu_irq *pic, int irq)
{
int iomemtype;
icp_pit_state *s;
s = (icp_pit_state *)qemu_mallocz(sizeof(icp_pit_state));
s->base = base;
s->timer[0] = arm_timer_init(40000000, pic[irq]);
s->timer[1] = arm_timer_init(1000000, pic[irq + 1]);
s... | {
"code": [
" cpu_register_physical_memory(base, 0x00000fff, iomemtype);",
" cpu_register_physical_memory(base, 0x00000fff, iomemtype);",
" cpu_register_physical_memory(base, 0x00000fff, iomemtype);",
" cpu_register_physical_memory(base, 0x00000fff, iomemtype);",
" cpu_register_phys... | void FUNC_0(uint32_t VAR_0, qemu_irq *VAR_1, int VAR_2)
{
int VAR_3;
icp_pit_state *s;
s = (icp_pit_state *)qemu_mallocz(sizeof(icp_pit_state));
s->VAR_0 = VAR_0;
s->timer[0] = arm_timer_init(40000000, VAR_1[VAR_2]);
s->timer[1] = arm_timer_init(1000000, VAR_1[VAR_2 + 1]);
... | [
"void FUNC_0(uint32_t VAR_0, qemu_irq *VAR_1, int VAR_2)\n{",
"int VAR_3;",
"icp_pit_state *s;",
"s = (icp_pit_state *)qemu_mallocz(sizeof(icp_pit_state));",
"s->VAR_0 = VAR_0;",
"s->timer[0] = arm_timer_init(40000000, VAR_1[VAR_2]);",
"s->timer[1] = arm_timer_init(1000000, VAR_1[VAR_2 + 1]);",
"s->ti... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
27,
29
],
[
31
],
[
35
]
] |
3,535 | static int adts_write_header(AVFormatContext *s)
{
ADTSContext *adts = s->priv_data;
AVCodecContext *avc = s->streams[0]->codec;
if(avc->extradata_size > 0)
decode_extradata(adts, avc->extradata, avc->extradata_size);
return 0;
}
| true | FFmpeg | dd44d9e316c17f473eff9f4a5a94ad0d7adb157e | static int adts_write_header(AVFormatContext *s)
{
ADTSContext *adts = s->priv_data;
AVCodecContext *avc = s->streams[0]->codec;
if(avc->extradata_size > 0)
decode_extradata(adts, avc->extradata, avc->extradata_size);
return 0;
}
| {
"code": [
" if(avc->extradata_size > 0)",
" decode_extradata(adts, avc->extradata, avc->extradata_size);"
],
"line_no": [
11,
13
]
} | static int FUNC_0(AVFormatContext *VAR_0)
{
ADTSContext *adts = VAR_0->priv_data;
AVCodecContext *avc = VAR_0->streams[0]->codec;
if(avc->extradata_size > 0)
decode_extradata(adts, avc->extradata, avc->extradata_size);
return 0;
}
| [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"ADTSContext *adts = VAR_0->priv_data;",
"AVCodecContext *avc = VAR_0->streams[0]->codec;",
"if(avc->extradata_size > 0)\ndecode_extradata(adts, avc->extradata, avc->extradata_size);",
"return 0;",
"}"
] | [
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
19
]
] |
3,536 | start_xmit(E1000State *s)
{
PCIDevice *d = PCI_DEVICE(s);
dma_addr_t base;
struct e1000_tx_desc desc;
uint32_t tdh_start = s->mac_reg[TDH], cause = E1000_ICS_TXQE;
if (!(s->mac_reg[TCTL] & E1000_TCTL_EN)) {
DBGOUT(TX, "tx disabled\n");
return;
}
while (s->mac_re... | true | qemu | dd793a74882477ca38d49e191110c17dfee51dcc | start_xmit(E1000State *s)
{
PCIDevice *d = PCI_DEVICE(s);
dma_addr_t base;
struct e1000_tx_desc desc;
uint32_t tdh_start = s->mac_reg[TDH], cause = E1000_ICS_TXQE;
if (!(s->mac_reg[TCTL] & E1000_TCTL_EN)) {
DBGOUT(TX, "tx disabled\n");
return;
}
while (s->mac_re... | {
"code": [
" if (s->mac_reg[TDH] == tdh_start) {"
],
"line_no": [
63
]
} | FUNC_0(E1000State *VAR_0)
{
PCIDevice *d = PCI_DEVICE(VAR_0);
dma_addr_t base;
struct e1000_tx_desc VAR_1;
uint32_t tdh_start = VAR_0->mac_reg[TDH], cause = E1000_ICS_TXQE;
if (!(VAR_0->mac_reg[TCTL] & E1000_TCTL_EN)) {
DBGOUT(TX, "tx disabled\n");
return;
}
whi... | [
"FUNC_0(E1000State *VAR_0)\n{",
"PCIDevice *d = PCI_DEVICE(VAR_0);",
"dma_addr_t base;",
"struct e1000_tx_desc VAR_1;",
"uint32_t tdh_start = VAR_0->mac_reg[TDH], cause = E1000_ICS_TXQE;",
"if (!(VAR_0->mac_reg[TCTL] & E1000_TCTL_EN)) {",
"DBGOUT(TX, \"tx disabled\\n\");",
"return;",
"}",
"while (... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27,
29
],
[
31
],
[
35,
37,
39
],
[
43
],
[
45
],
[
49,
51
],
[
63
],
[
65,... |
3,537 | static void vector_fmul_window_mips(float *dst, const float *src0,
const float *src1, const float *win, int len)
{
float * dst_j, *win_j, *src0_i, *src1_j, *dst_i, *win_i;
float temp, temp1, temp2, temp3;
float s0, s01, s1, s11;
float wi, wi1, wi2, wi3;
flo... | true | FFmpeg | f8323744a0783d5937232a95cd1cc98f6b70a810 | static void vector_fmul_window_mips(float *dst, const float *src0,
const float *src1, const float *win, int len)
{
float * dst_j, *win_j, *src0_i, *src1_j, *dst_i, *win_i;
float temp, temp1, temp2, temp3;
float s0, s01, s1, s11;
float wi, wi1, wi2, wi3;
flo... | {
"code": [
" \"addiu %[src1_j],-16 \\n\\t\"",
" \"addiu %[win_i], 16 \\n\\t\"",
" \"addiu %[win_j], -16 \\n\\t\"",
" \"addiu %[src0_i], 16 \\n\\t\"",
" \... | static void FUNC_0(float *VAR_0, const float *VAR_1,
const float *VAR_2, const float *VAR_3, int VAR_4)
{
float * VAR_5, *VAR_6, *VAR_7, *VAR_8, *VAR_9, *VAR_10;
float VAR_11, VAR_12, VAR_13, VAR_14;
float VAR_15, VAR_16, VAR_17, VAR_18;
float VAR_19, VAR_20, VA... | [
"static void FUNC_0(float *VAR_0, const float *VAR_1,\nconst float *VAR_2, const float *VAR_3, int VAR_4)\n{",
"float * VAR_5, *VAR_6, *VAR_7, *VAR_8, *VAR_9, *VAR_10;",
"float VAR_11, VAR_12, VAR_13, VAR_14;",
"float VAR_15, VAR_16, VAR_17, VAR_18;",
"float VAR_19, VAR_20, VAR_21, VAR_22;",
"float VAR_23... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,... |
3,538 | PCIBus *typhoon_init(ram_addr_t ram_size, ISABus **isa_bus,
qemu_irq *p_rtc_irq,
AlphaCPU *cpus[4], pci_map_irq_fn sys_map_irq)
{
const uint64_t MB = 1024 * 1024;
const uint64_t GB = 1024 * MB;
MemoryRegion *addr_space = get_system_memory();
MemoryRegion ... | true | qemu | c92458538f501eda585b4b774c50644aed391a8a | PCIBus *typhoon_init(ram_addr_t ram_size, ISABus **isa_bus,
qemu_irq *p_rtc_irq,
AlphaCPU *cpus[4], pci_map_irq_fn sys_map_irq)
{
const uint64_t MB = 1024 * 1024;
const uint64_t GB = 1024 * MB;
MemoryRegion *addr_space = get_system_memory();
MemoryRegion ... | {
"code": [
" CPUAlphaState *env = &cpu->env;",
" env->alarm_timer = qemu_new_timer_ns(rtc_clock,"
],
"line_no": [
51,
53
]
} | PCIBus *FUNC_0(ram_addr_t ram_size, ISABus **isa_bus,
qemu_irq *p_rtc_irq,
AlphaCPU *cpus[4], pci_map_irq_fn sys_map_irq)
{
const uint64_t VAR_0 = 1024 * 1024;
const uint64_t VAR_1 = 1024 * VAR_0;
MemoryRegion *addr_space = get_system_memory();
MemoryRegi... | [
"PCIBus *FUNC_0(ram_addr_t ram_size, ISABus **isa_bus,\nqemu_irq *p_rtc_irq,\nAlphaCPU *cpus[4], pci_map_irq_fn sys_map_irq)\n{",
"const uint64_t VAR_0 = 1024 * 1024;",
"const uint64_t VAR_1 = 1024 * VAR_0;",
"MemoryRegion *addr_space = get_system_memory();",
"MemoryRegion *addr_space_io = get_system_io();"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
3,539 | static int decode_update_thread_context(AVCodecContext *dst, const AVCodecContext *src){
H264Context *h= dst->priv_data, *h1= src->priv_data;
MpegEncContext * const s = &h->s, * const s1 = &h1->s;
int inited = s->context_initialized, err;
int i;
if(dst == src || !s1->context_initialized) retu... | true | FFmpeg | 7e2eb4bacd70541702bd086ab2a39cb7653d314e | static int decode_update_thread_context(AVCodecContext *dst, const AVCodecContext *src){
H264Context *h= dst->priv_data, *h1= src->priv_data;
MpegEncContext * const s = &h->s, * const s1 = &h1->s;
int inited = s->context_initialized, err;
int i;
if(dst == src || !s1->context_initialized) retu... | {
"code": [
" copy_picture_range(h->long_ref, h1->long_ref, 32, s, s1);"
],
"line_no": [
137
]
} | static int FUNC_0(AVCodecContext *VAR_0, const AVCodecContext *VAR_1){
H264Context *h= VAR_0->priv_data, *h1= VAR_1->priv_data;
MpegEncContext * const s = &h->s, * const s1 = &h1->s;
int VAR_2 = s->context_initialized, VAR_3;
int VAR_4;
if(VAR_0 == VAR_1 || !s1->context_initialized) return 0;... | [
"static int FUNC_0(AVCodecContext *VAR_0, const AVCodecContext *VAR_1){",
"H264Context *h= VAR_0->priv_data, *h1= VAR_1->priv_data;",
"MpegEncContext * const s = &h->s, * const s1 = &h1->s;",
"int VAR_2 = s->context_initialized, VAR_3;",
"int VAR_4;",
"if(VAR_0 == VAR_1 || !s1->context_initialized) return... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[... |
3,541 | static int device_open(AVFormatContext *ctx)
{
struct v4l2_capability cap;
int fd;
#if CONFIG_LIBV4L2
int fd_libv4l;
#endif
int res, err;
int flags = O_RDWR;
if (ctx->flags & AVFMT_FLAG_NONBLOCK) {
flags |= O_NONBLOCK;
}
fd = v4l2_open(ctx->filename, flags, 0);
... | true | FFmpeg | fd58678b86023ea98665f06756bf03f91e56be54 | static int device_open(AVFormatContext *ctx)
{
struct v4l2_capability cap;
int fd;
#if CONFIG_LIBV4L2
int fd_libv4l;
#endif
int res, err;
int flags = O_RDWR;
if (ctx->flags & AVFMT_FLAG_NONBLOCK) {
flags |= O_NONBLOCK;
}
fd = v4l2_open(ctx->filename, flags, 0);
... | {
"code": [
"#if CONFIG_LIBV4L2",
" int fd_libv4l;",
"#endif",
"#if CONFIG_LIBV4L2",
" fd_libv4l = v4l2_fd_open(fd, 0);",
" if (fd < 0) {",
" err = AVERROR(errno);",
" av_log(ctx, AV_LOG_ERROR, \"Cannot open video device with libv4l neither %s : %s\\n\",",
" ... | static int FUNC_0(AVFormatContext *VAR_0)
{
struct v4l2_capability VAR_1;
int VAR_2;
#if CONFIG_LIBV4L2
int fd_libv4l;
#endif
int VAR_3, VAR_4;
int VAR_5 = O_RDWR;
if (VAR_0->VAR_5 & AVFMT_FLAG_NONBLOCK) {
VAR_5 |= O_NONBLOCK;
}
VAR_2 = v4l2_open(VAR_0->filename, ... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"struct v4l2_capability VAR_1;",
"int VAR_2;",
"#if CONFIG_LIBV4L2\nint fd_libv4l;",
"#endif\nint VAR_3, VAR_4;",
"int VAR_5 = O_RDWR;",
"if (VAR_0->VAR_5 & AVFMT_FLAG_NONBLOCK) {",
"VAR_5 |= O_NONBLOCK;",
"}",
"VAR_2 = v4l2_open(VAR_0->filename, VAR... | [
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
1,
1,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13,
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37,
39
],
[
43
],
[
45
],
[
47,
49
],
[
51
],
[
53
... |
3,542 | int pcie_cap_init(PCIDevice *dev, uint8_t offset, uint8_t type, uint8_t port)
{
/* PCIe cap v2 init */
int pos;
uint8_t *exp_cap;
assert(pci_is_express(dev));
pos = pci_add_capability(dev, PCI_CAP_ID_EXP, offset, PCI_EXP_VER2_SIZEOF);
if (pos < 0) {
return pos;
}
de... | true | qemu | 6b4495401bdf442457b713b7e3994b465c55af35 | int pcie_cap_init(PCIDevice *dev, uint8_t offset, uint8_t type, uint8_t port)
{
int pos;
uint8_t *exp_cap;
assert(pci_is_express(dev));
pos = pci_add_capability(dev, PCI_CAP_ID_EXP, offset, PCI_EXP_VER2_SIZEOF);
if (pos < 0) {
return pos;
}
dev->exp.exp_cap = pos;
... | {
"code": [
" pcie_cap_v1_fill(exp_cap, port, type, PCI_EXP_FLAGS_VER2);",
" uint8_t *exp_cap;",
" exp_cap = dev->config + pos;"
],
"line_no": [
33,
9,
27
]
} | int FUNC_0(PCIDevice *VAR_0, uint8_t VAR_1, uint8_t VAR_2, uint8_t VAR_3)
{
int VAR_4;
uint8_t *exp_cap;
assert(pci_is_express(VAR_0));
VAR_4 = pci_add_capability(VAR_0, PCI_CAP_ID_EXP, VAR_1, PCI_EXP_VER2_SIZEOF);
if (VAR_4 < 0) {
return VAR_4;
}
VAR_0->exp.exp_ca... | [
"int FUNC_0(PCIDevice *VAR_0, uint8_t VAR_1, uint8_t VAR_2, uint8_t VAR_3)\n{",
"int VAR_4;",
"uint8_t *exp_cap;",
"assert(pci_is_express(VAR_0));",
"VAR_4 = pci_add_capability(VAR_0, PCI_CAP_ID_EXP, VAR_1, PCI_EXP_VER2_SIZEOF);",
"if (VAR_4 < 0) {",
"return VAR_4;",
"}",
"VAR_0->exp.exp_cap = VAR_4... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
33
],
[
39,
41
],
[
45
],
[
47
],
[
49
]
] |
3,543 | void ff_svq3_add_idct_c(uint8_t *dst, DCTELEM *block, int stride, int qp,
int dc)
{
const int qmul = svq3_dequant_coeff[qp];
int i;
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
if (dc) {
dc = 13*13*((dc == 1) ? 1538*block[0] : ((qmul*(block[0] >> 3)) / 2));
... | true | FFmpeg | 436f866f92a9483717e376866783346bf8a00e58 | void ff_svq3_add_idct_c(uint8_t *dst, DCTELEM *block, int stride, int qp,
int dc)
{
const int qmul = svq3_dequant_coeff[qp];
int i;
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
if (dc) {
dc = 13*13*((dc == 1) ? 1538*block[0] : ((qmul*(block[0] >> 3)) / 2));
... | {
"code": [
" uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;",
" dst[i + stride*0] = cm[ dst[i + stride*0] + (((z0 + z3)*qmul + rr) >> 20) ];",
" dst[i + stride*1] = cm[ dst[i + stride*1] + (((z1 + z2)*qmul + rr) >> 20) ];",
" dst[i + stride*2] = cm[ dst[i + stride*2] + (((z1 - z2)*q... | void FUNC_0(uint8_t *VAR_0, DCTELEM *VAR_1, int VAR_2, int VAR_3,
int VAR_4)
{
const int VAR_5 = svq3_dequant_coeff[VAR_3];
int VAR_6;
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
if (VAR_4) {
VAR_4 = 13*13*((VAR_4 == 1) ? 1538*VAR_1[0] : ((VAR_5*(VAR_1[0] >> 3))... | [
"void FUNC_0(uint8_t *VAR_0, DCTELEM *VAR_1, int VAR_2, int VAR_3,\nint VAR_4)\n{",
"const int VAR_5 = svq3_dequant_coeff[VAR_3];",
"int VAR_6;",
"uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;",
"if (VAR_4) {",
"VAR_4 = 13*13*((VAR_4 == 1) ? 1538*VAR_1[0] : ((VAR_5*(VAR_1[0] >> 3)) / 2));",
"VAR_1[0] = 0;",
... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[... |
3,544 | void process_incoming_migration(QEMUFile *f)
{
if (qemu_loadvm_state(f) < 0) {
fprintf(stderr, "load of migration failed\n");
exit(0);
}
qemu_announce_self();
DPRINTF("successfully loaded vm state\n");
if (autostart)
vm_start();
} | true | qemu | 8e84865e54cb66fd7b57bb18c312ad3d56b6e276 | void process_incoming_migration(QEMUFile *f)
{
if (qemu_loadvm_state(f) < 0) {
fprintf(stderr, "load of migration failed\n");
exit(0);
}
qemu_announce_self();
DPRINTF("successfully loaded vm state\n");
if (autostart)
vm_start();
} | {
"code": [],
"line_no": []
} | void FUNC_0(QEMUFile *VAR_0)
{
if (qemu_loadvm_state(VAR_0) < 0) {
fprintf(stderr, "load of migration failed\n");
exit(0);
}
qemu_announce_self();
DPRINTF("successfully loaded vm state\n");
if (autostart)
vm_start();
} | [
"void FUNC_0(QEMUFile *VAR_0)\n{",
"if (qemu_loadvm_state(VAR_0) < 0) {",
"fprintf(stderr, \"load of migration failed\\n\");",
"exit(0);",
"}",
"qemu_announce_self();",
"DPRINTF(\"successfully loaded vm state\\n\");",
"if (autostart)\nvm_start();",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9,
10
],
[
11
]
] |
3,545 | void *av_realloc(void *ptr, unsigned int size)
{
#ifdef MEMALIGN_HACK
//FIXME this isnt aligned correctly though it probably isnt needed
int diff;
if(!ptr) return av_malloc(size);
diff= ((char*)ptr)[-1];
return realloc(ptr - diff, size + diff) + diff;
#else
return realloc(ptr, size);
#endif
} | true | FFmpeg | 0ecca7a49f8e254c12a3a1de048d738bfbb614c6 | void *av_realloc(void *ptr, unsigned int size)
{
#ifdef MEMALIGN_HACK
int diff;
if(!ptr) return av_malloc(size);
diff= ((char*)ptr)[-1];
return realloc(ptr - diff, size + diff) + diff;
#else
return realloc(ptr, size);
#endif
} | {
"code": [],
"line_no": []
} | void *FUNC_0(void *VAR_0, unsigned int VAR_1)
{
#ifdef MEMALIGN_HACK
int diff;
if(!VAR_0) return av_malloc(VAR_1);
diff= ((char*)VAR_0)[-1];
return realloc(VAR_0 - diff, VAR_1 + diff) + diff;
#else
return realloc(VAR_0, VAR_1);
#endif
} | [
"void *FUNC_0(void *VAR_0, unsigned int VAR_1)\n{",
"#ifdef MEMALIGN_HACK\nint diff;",
"if(!VAR_0) return av_malloc(VAR_1);",
"diff= ((char*)VAR_0)[-1];",
"return realloc(VAR_0 - diff, VAR_1 + diff) + diff;",
"#else\nreturn realloc(VAR_0, VAR_1);",
"#endif\n}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3,
5
],
[
6
],
[
7
],
[
8
],
[
9,
10
],
[
11,
12
]
] |
3,547 | static void init_excp_620 (CPUPPCState *env)
{
#if !defined(CONFIG_USER_ONLY)
env->excp_vectors[POWERPC_EXCP_RESET] = 0x00000100;
env->excp_vectors[POWERPC_EXCP_MCHECK] = 0x00000200;
env->excp_vectors[POWERPC_EXCP_DSI] = 0x00000300;
env->excp_vectors[POWERPC_EXCP_ISI] = 0x00000400;
... | true | qemu | faadf50e2962dd54175647a80bd6fc4319c91973 | static void init_excp_620 (CPUPPCState *env)
{
#if !defined(CONFIG_USER_ONLY)
env->excp_vectors[POWERPC_EXCP_RESET] = 0x00000100;
env->excp_vectors[POWERPC_EXCP_MCHECK] = 0x00000200;
env->excp_vectors[POWERPC_EXCP_DSI] = 0x00000300;
env->excp_vectors[POWERPC_EXCP_ISI] = 0x00000400;
... | {
"code": [
"#endif",
"#if !defined(CONFIG_USER_ONLY)",
"#endif",
"#if !defined(CONFIG_USER_ONLY)",
"#endif",
"#if !defined(CONFIG_USER_ONLY)",
"#endif",
"#if !defined(CONFIG_USER_ONLY)",
"#endif",
"#endif"
],
"line_no": [
41,
5,
41,
5,
41,
5,
41... | static void FUNC_0 (CPUPPCState *VAR_0)
{
#if !defined(CONFIG_USER_ONLY)
VAR_0->excp_vectors[POWERPC_EXCP_RESET] = 0x00000100;
VAR_0->excp_vectors[POWERPC_EXCP_MCHECK] = 0x00000200;
VAR_0->excp_vectors[POWERPC_EXCP_DSI] = 0x00000300;
VAR_0->excp_vectors[POWERPC_EXCP_ISI] = 0x0000040... | [
"static void FUNC_0 (CPUPPCState *VAR_0)\n{",
"#if !defined(CONFIG_USER_ONLY)\nVAR_0->excp_vectors[POWERPC_EXCP_RESET] = 0x00000100;",
"VAR_0->excp_vectors[POWERPC_EXCP_MCHECK] = 0x00000200;",
"VAR_0->excp_vectors[POWERPC_EXCP_DSI] = 0x00000300;",
"VAR_0->excp_vectors[POWERPC_EXCP_ISI] = 0x00... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41,
43
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.