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
11,702
static void qemu_fill_buffer(QEMUFile *f) { int len; int pending; assert(!qemu_file_is_writable(f)); pending = f->buf_size - f->buf_index; if (pending > 0) { memmove(f->buf, f->buf + f->buf_index, pending); } f->buf_index = 0; f->buf_size = pending; len = f->...
true
qemu
548f52ea06951c20f0b91cae6cde0512ec073c83
static void qemu_fill_buffer(QEMUFile *f) { int len; int pending; assert(!qemu_file_is_writable(f)); pending = f->buf_size - f->buf_index; if (pending > 0) { memmove(f->buf, f->buf + f->buf_index, pending); } f->buf_index = 0; f->buf_size = pending; len = f->...
{ "code": [ "static void qemu_fill_buffer(QEMUFile *f)" ], "line_no": [ 1 ] }
static void FUNC_0(QEMUFile *VAR_0) { int VAR_1; int VAR_2; assert(!qemu_file_is_writable(VAR_0)); VAR_2 = VAR_0->buf_size - VAR_0->buf_index; if (VAR_2 > 0) { memmove(VAR_0->buf, VAR_0->buf + VAR_0->buf_index, VAR_2); } VAR_0->buf_index = 0; VAR_0->buf_size = VAR_2...
[ "static void FUNC_0(QEMUFile *VAR_0)\n{", "int VAR_1;", "int VAR_2;", "assert(!qemu_file_is_writable(VAR_0));", "VAR_2 = VAR_0->buf_size - VAR_0->buf_index;", "if (VAR_2 > 0) {", "memmove(VAR_0->buf, VAR_0->buf + VAR_0->buf_index, VAR_2);", "}", "VAR_0->buf_index = 0;", "VAR_0->buf_size = VAR_2;",...
[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 29, 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], ...
11,703
static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, long src_size) { long idx = 15 - src_size; uint8_t *s = (uint8_t *) src-idx, *d = dst-idx; #ifdef HAVE_MMX __asm __volatile( "test %0, %0 \n\t" "jns 2f \n\t" PREFETCH" (%1, %0) \n\t" "movq %3, %%mm7 \n\t" "pxor %4, ...
true
FFmpeg
6e42e6c4b410dbef8b593c2d796a5dad95f89ee4
static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, long src_size) { long idx = 15 - src_size; uint8_t *s = (uint8_t *) src-idx, *d = dst-idx; #ifdef HAVE_MMX __asm __volatile( "test %0, %0 \n\t" "jns 2f \n\t" PREFETCH" (%1, %0) \n\t" "movq %3, %%mm7 \n\t" "pxor %4, ...
{ "code": [ "#ifdef HAVE_MMX", "#endif", "#ifdef HAVE_MMX", "#endif", "#endif", "#endif", "\t__asm __volatile(", "\t__asm __volatile(", "\t\tASMALIGN(4)", "\t\t\"1:\t\t\t\t\\n\\t\"", "\t\t\"pand %%mm6, %%mm3\t\t\\n\\t\"", "\t\t\"por %%mm3, %%mm0\t\t\\n\\t\"", "\t\t\...
static inline void FUNC_0(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, long src_size) { long VAR_0 = 15 - src_size; uint8_t *s = (uint8_t *) src-VAR_0, *d = dst-VAR_0; #ifdef HAVE_MMX __asm __volatile( "test %0, %0 \n\t" "jns 2f \n\t" PREFETCH" (%1, %0) \n\t" "movq %3, %%mm7 \n\t" "pxo...
[ "static inline void FUNC_0(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, long src_size)\n{", "long VAR_0 = 15 - src_size;", "uint8_t *s = (uint8_t *) src-VAR_0, *d = dst-VAR_0;", "#ifdef HAVE_MMX\n__asm __volatile(\n\"test %0, %0\t\t\t\\n\\t\"\n\"jns 2f\t\t\t\t\\n\\t\"\nPREFETCH\" (%1, %0)\t\t\\n\\t\"\n\"mo...
[ 0, 1, 1, 1, 1, 1, 1, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73,...
11,704
static int xen_pt_initfn(PCIDevice *d) { XenPCIPassthroughState *s = XEN_PT_DEVICE(d); int rc = 0; uint8_t machine_irq = 0, scratch; uint16_t cmd = 0; int pirq = XEN_PT_UNASSIGNED_PIRQ; /* register real device */ XEN_PT_LOG(d, "Assigning real physical device %02x:%02x.%d" ...
true
qemu
3d3697f2576424a2c0830a7b2e7c94c79dea9b50
static int xen_pt_initfn(PCIDevice *d) { XenPCIPassthroughState *s = XEN_PT_DEVICE(d); int rc = 0; uint8_t machine_irq = 0, scratch; uint16_t cmd = 0; int pirq = XEN_PT_UNASSIGNED_PIRQ; XEN_PT_LOG(d, "Assigning real physical device %02x:%02x.%d" " to devfn %#x\n", ...
{ "code": [ " if (xen_host_pci_get_block(&s->real_device, 0, d->config,", " PCI_CONFIG_SPACE_SIZE) < 0) {", " xen_host_pci_device_put(&s->real_device);", " return -1;", " if (xen_pt_config_init(s)) {", " xen_host_pci_device_put(&s->real_...
static int FUNC_0(PCIDevice *VAR_0) { XenPCIPassthroughState *s = XEN_PT_DEVICE(VAR_0); int VAR_1 = 0; uint8_t machine_irq = 0, scratch; uint16_t cmd = 0; int VAR_2 = XEN_PT_UNASSIGNED_PIRQ; XEN_PT_LOG(VAR_0, "Assigning real physical device %02x:%02x.%VAR_0" " to d...
[ "static int FUNC_0(PCIDevice *VAR_0)\n{", "XenPCIPassthroughState *s = XEN_PT_DEVICE(VAR_0);", "int VAR_1 = 0;", "uint8_t machine_irq = 0, scratch;", "uint16_t cmd = 0;", "int VAR_2 = XEN_PT_UNASSIGNED_PIRQ;", "XEN_PT_LOG(VAR_0, \"Assigning real physical device %02x:%02x.%VAR_0\"\n\" to devfn %#x\\n\",\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 19, 21, 23, 25 ], [ 29, 31, 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 45 ], [ 47 ], [ 49, 51, 53 ], [ 55 ], [...
11,705
static inline void RENAME(rgb24tobgr15)(const uint8_t *src, uint8_t *dst, long src_size) { const uint8_t *s = src; const uint8_t *end; #ifdef HAVE_MMX const uint8_t *mm_end; #endif uint16_t *d = (uint16_t *)dst; end = s + src_size; #ifdef HAVE_MMX __asm __volatile(PREFETCH" %0"::"m"(*src):"memory"); _...
true
FFmpeg
6e42e6c4b410dbef8b593c2d796a5dad95f89ee4
static inline void RENAME(rgb24tobgr15)(const uint8_t *src, uint8_t *dst, long src_size) { const uint8_t *s = src; const uint8_t *end; #ifdef HAVE_MMX const uint8_t *mm_end; #endif uint16_t *d = (uint16_t *)dst; end = s + src_size; #ifdef HAVE_MMX __asm __volatile(PREFETCH" %0"::"m"(*src):"memory"); _...
{ "code": [ "\twhile(s < end)", "\twhile(s < end)", "\twhile(s < end)", "\twhile(s < end)", "#ifdef HAVE_MMX", "#endif", "#ifdef HAVE_MMX", "#endif", "#endif", "#endif", "\t__asm __volatile(", "\t\t\"movq\t%%mm0, %%mm1\\n\\t\"", "\t\tMOVNTQ\"\t%%mm0, %0\\n\\t\"", ...
static inline void FUNC_0(rgb24tobgr15)(const uint8_t *src, uint8_t *dst, long src_size) { const uint8_t *VAR_0 = src; const uint8_t *VAR_1; #ifdef HAVE_MMX const uint8_t *mm_end; #endif uint16_t *d = (uint16_t *)dst; VAR_1 = VAR_0 + src_size; #ifdef HAVE_MMX __asm __volatile(PREFETCH" %0"::"m"(*src):"m...
[ "static inline void FUNC_0(rgb24tobgr15)(const uint8_t *src, uint8_t *dst, long src_size)\n{", "const uint8_t *VAR_0 = src;", "const uint8_t *VAR_1;", "#ifdef HAVE_MMX\nconst uint8_t *mm_end;", "#endif\nuint16_t *d = (uint16_t *)dst;", "VAR_1 = VAR_0 + src_size;", "#ifdef HAVE_MMX\n__asm __volatile(PREF...
[ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9, 11 ], [ 13, 15 ], [ 17 ], [ 19, 21 ], [ 23, 25, 27, 29 ], [ 31 ], [ 33, 35 ], [ 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59,...
11,706
int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags) { if(min_ts > ts || max_ts < ts) return -1; ff_read_frame_flush(s); if (s->iformat->read_seek2) return s->iformat->read_seek2(s, stream_index, min_ts, ts, max_ts, fla...
false
FFmpeg
0041cdba98d5b636a8d912352dd3d8ca72bba4ce
int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags) { if(min_ts > ts || max_ts < ts) return -1; ff_read_frame_flush(s); if (s->iformat->read_seek2) return s->iformat->read_seek2(s, stream_index, min_ts, ts, max_ts, fla...
{ "code": [], "line_no": [] }
int FUNC_0(AVFormatContext *VAR_0, int VAR_1, int64_t VAR_2, int64_t VAR_3, int64_t VAR_4, int VAR_5) { if(VAR_2 > VAR_3 || VAR_4 < VAR_3) return -1; ff_read_frame_flush(VAR_0); if (VAR_0->iformat->read_seek2) return VAR_0->iformat->read_seek2(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR...
[ "int FUNC_0(AVFormatContext *VAR_0, int VAR_1, int64_t VAR_2, int64_t VAR_3, int64_t VAR_4, int VAR_5)\n{", "if(VAR_2 > VAR_3 || VAR_4 < VAR_3)\nreturn -1;", "ff_read_frame_flush(VAR_0);", "if (VAR_0->iformat->read_seek2)\nreturn VAR_0->iformat->read_seek2(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5);", "if(VA...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5, 7 ], [ 11 ], [ 15, 17 ], [ 21 ], [ 25 ], [ 33, 35 ], [ 41 ] ]
11,707
static int mov_read_stsz(MOVContext *c, ByteIOContext *pb, MOVAtom atom) { AVStream *st = c->fc->streams[c->fc->nb_streams-1]; MOVStreamContext *sc = st->priv_data; unsigned int i, entries, sample_size, field_size, num_bytes; GetBitContext gb; unsigned char* buf; get_byte(pb); /* versio...
false
FFmpeg
6a63ff19b6a7fe3bc32c7fb4a62fca8f65786432
static int mov_read_stsz(MOVContext *c, ByteIOContext *pb, MOVAtom atom) { AVStream *st = c->fc->streams[c->fc->nb_streams-1]; MOVStreamContext *sc = st->priv_data; unsigned int i, entries, sample_size, field_size, num_bytes; GetBitContext gb; unsigned char* buf; get_byte(pb); get...
{ "code": [], "line_no": [] }
static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOVAtom VAR_2) { AVStream *st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1]; MOVStreamContext *sc = st->priv_data; unsigned int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7; GetBitContext gb; unsigned char* VAR_8; get_byte(VAR_1); ge...
[ "static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOVAtom VAR_2)\n{", "AVStream *st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1];", "MOVStreamContext *sc = st->priv_data;", "unsigned int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;", "GetBitContext gb;", "unsigned char* VAR_8;", "get_byte(VAR_1);", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 23 ], [ 25 ], [ 27, 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 47 ], [...
11,708
static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output) { AVFrame *decoded_frame, *f; AVCodecContext *avctx = ist->dec_ctx; int i, ret, err = 0, resample_changed; AVRational decoded_frame_tb; if (!ist->decoded_frame && !(ist->decoded_frame = av_frame_alloc())) retu...
false
FFmpeg
e2b416b68e85f3495d1a55f202dd405824c044c8
static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output) { AVFrame *decoded_frame, *f; AVCodecContext *avctx = ist->dec_ctx; int i, ret, err = 0, resample_changed; AVRational decoded_frame_tb; if (!ist->decoded_frame && !(ist->decoded_frame = av_frame_alloc())) retu...
{ "code": [], "line_no": [] }
static int FUNC_0(InputStream *VAR_0, AVPacket *VAR_1, int *VAR_2) { AVFrame *decoded_frame, *f; AVCodecContext *avctx = VAR_0->dec_ctx; int VAR_3, VAR_4, VAR_5 = 0, VAR_6; AVRational decoded_frame_tb; if (!VAR_0->decoded_frame && !(VAR_0->decoded_frame = av_frame_alloc())) return A...
[ "static int FUNC_0(InputStream *VAR_0, AVPacket *VAR_1, int *VAR_2)\n{", "AVFrame *decoded_frame, *f;", "AVCodecContext *avctx = VAR_0->dec_ctx;", "int VAR_3, VAR_4, VAR_5 = 0, VAR_6;", "AVRational decoded_frame_tb;", "if (!VAR_0->decoded_frame && !(VAR_0->decoded_frame = av_frame_alloc()))\nreturn AVERRO...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15, 17 ], [ 19, 21 ], [ 23 ], [ 27 ], [ 29 ], [ 31 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 45, 47 ], [ 51, 53 ], [ 57,...
11,709
static void quantize(SnowContext *s, SubBand *b, DWTELEM *src, int stride, int bias){ const int level= b->level; const int w= b->width; const int h= b->height; const int qlog= clip(s->qlog + b->qlog, 0, 128); const int qmul= qexp[qlog&7]<<(qlog>>3); int x,y; assert(QROOT==8); ...
true
FFmpeg
da66b6313e61a861321b7d62a3d12a38877784bb
static void quantize(SnowContext *s, SubBand *b, DWTELEM *src, int stride, int bias){ const int level= b->level; const int w= b->width; const int h= b->height; const int qlog= clip(s->qlog + b->qlog, 0, 128); const int qmul= qexp[qlog&7]<<(qlog>>3); int x,y; assert(QROOT==8); ...
{ "code": [ " int x,y;", " int i= src[x + y*stride]; ", " if(i>=0){", " i<<= QEXPSHIFT;", " i/= qmul;", " src[x + y*stride]= i;", " }else{", " i= -i;", " ...
static void FUNC_0(SnowContext *VAR_0, SubBand *VAR_1, DWTELEM *VAR_2, int VAR_3, int VAR_4){ const int VAR_5= VAR_1->VAR_5; const int VAR_6= VAR_1->width; const int VAR_7= VAR_1->height; const int VAR_8= clip(VAR_0->VAR_8 + VAR_1->VAR_8, 0, 128); const int VAR_9= qexp[VAR_8&7]<<(VAR_8>>3); ...
[ "static void FUNC_0(SnowContext *VAR_0, SubBand *VAR_1, DWTELEM *VAR_2, int VAR_3, int VAR_4){", "const int VAR_5= VAR_1->VAR_5;", "const int VAR_6= VAR_1->width;", "const int VAR_7= VAR_1->height;", "const int VAR_8= clip(VAR_0->VAR_8 + VAR_1->VAR_8, 0, 128);", "const int VAR_9= qexp[VAR_8&7]<<(VAR_8>>3)...
[ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1 ], [ 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 21 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [...
11,710
static void virtio_pci_device_plugged(DeviceState *d, Error **errp) { VirtIOPCIProxy *proxy = VIRTIO_PCI(d); VirtioBusState *bus = &proxy->bus; bool legacy = virtio_pci_legacy(proxy); bool modern; bool modern_pio = proxy->flags & VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY; uint8_t *config; ui...
true
qemu
ee640c625e190a0c0e6b8966adc0e4720fb75200
static void virtio_pci_device_plugged(DeviceState *d, Error **errp) { VirtIOPCIProxy *proxy = VIRTIO_PCI(d); VirtioBusState *bus = &proxy->bus; bool legacy = virtio_pci_legacy(proxy); bool modern; bool modern_pio = proxy->flags & VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY; uint8_t *config; ui...
{ "code": [ " proxy->msix_bar_idx);" ], "line_no": [ 221 ] }
static void FUNC_0(DeviceState *VAR_0, Error **VAR_1) { VirtIOPCIProxy *proxy = VIRTIO_PCI(VAR_0); VirtioBusState *bus = &proxy->bus; bool legacy = virtio_pci_legacy(proxy); bool modern; bool modern_pio = proxy->flags & VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY; uint8_t *config; uint32_t siz...
[ "static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)\n{", "VirtIOPCIProxy *proxy = VIRTIO_PCI(VAR_0);", "VirtioBusState *bus = &proxy->bus;", "bool legacy = virtio_pci_legacy(proxy);", "bool modern;", "bool modern_pio = proxy->flags & VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY;", "uint8_t *config;", "uint32_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ], [ 31, 33 ], [ 35 ], [ 39 ], [ 41, 43 ], [ 45 ], [ 49 ], [ 51 ], [ 53 ], [ 57 ], [ 61 ...
11,711
static void update_cursor_data_virgl(VirtIOGPU *g, struct virtio_gpu_scanout *s, uint32_t resource_id) { uint32_t width, height; uint32_t pixels, *data; data = virgl_renderer_get_cursor_data(resource_id, &width, &height); ...
true
qemu
2d1cd6c7a91a4beb99a0c3a21be529222a708545
static void update_cursor_data_virgl(VirtIOGPU *g, struct virtio_gpu_scanout *s, uint32_t resource_id) { uint32_t width, height; uint32_t pixels, *data; data = virgl_renderer_get_cursor_data(resource_id, &width, &height); ...
{ "code": [], "line_no": [] }
static void FUNC_0(VirtIOGPU *VAR_0, struct virtio_gpu_scanout *VAR_1, uint32_t VAR_2) { uint32_t width, height; uint32_t pixels, *data; data = virgl_renderer_get_cursor_data(VAR_2, &width, &height); if (!data) { ...
[ "static void FUNC_0(VirtIOGPU *VAR_0,\nstruct virtio_gpu_scanout *VAR_1,\nuint32_t VAR_2)\n{", "uint32_t width, height;", "uint32_t pixels, *data;", "data = virgl_renderer_get_cursor_data(VAR_2, &width, &height);", "if (!data) {", "return;", "}", "if (width != VAR_1->current_cursor->width ||\nheight !...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 25, 27 ], [ 30 ], [ 32 ], [ 36 ], [ 38 ], [ 41 ] ]
11,713
static void gen_addc(DisasContext *dc, TCGv dest, TCGv srca, TCGv srcb) { TCGv t0 = tcg_const_tl(0); TCGv res = tcg_temp_new(); TCGv sr_cy = tcg_temp_new(); TCGv sr_ov = tcg_temp_new(); tcg_gen_shri_tl(sr_cy, cpu_sr, ctz32(SR_CY)); tcg_gen_andi_tl(sr_cy, sr_cy, 1); tcg_gen_add2_t...
true
qemu
9745807191a81c45970f780166f44a7f93b18653
static void gen_addc(DisasContext *dc, TCGv dest, TCGv srca, TCGv srcb) { TCGv t0 = tcg_const_tl(0); TCGv res = tcg_temp_new(); TCGv sr_cy = tcg_temp_new(); TCGv sr_ov = tcg_temp_new(); tcg_gen_shri_tl(sr_cy, cpu_sr, ctz32(SR_CY)); tcg_gen_andi_tl(sr_cy, sr_cy, 1); tcg_gen_add2_t...
{ "code": [ " TCGv sr_cy = tcg_temp_new();", " TCGv sr_ov = tcg_temp_new();", " tcg_gen_xor_tl(sr_ov, srca, srcb);", " tcg_gen_andc_tl(sr_ov, t0, sr_ov);", " tcg_gen_shri_tl(sr_ov, sr_ov, TARGET_LONG_BITS - 1);", " tcg_gen_deposit_tl(cpu_sr, cpu_sr, sr_cy, ctz32(SR_CY), 1);",...
static void FUNC_0(DisasContext *VAR_0, TCGv VAR_1, TCGv VAR_2, TCGv VAR_3) { TCGv t0 = tcg_const_tl(0); TCGv res = tcg_temp_new(); TCGv sr_cy = tcg_temp_new(); TCGv sr_ov = tcg_temp_new(); tcg_gen_shri_tl(sr_cy, cpu_sr, ctz32(SR_CY)); tcg_gen_andi_tl(sr_cy, sr_cy, 1); tcg_gen_ad...
[ "static void FUNC_0(DisasContext *VAR_0, TCGv VAR_1, TCGv VAR_2, TCGv VAR_3)\n{", "TCGv t0 = tcg_const_tl(0);", "TCGv res = tcg_temp_new();", "TCGv sr_cy = tcg_temp_new();", "TCGv sr_ov = tcg_temp_new();", "tcg_gen_shri_tl(sr_cy, cpu_sr, ctz32(SR_CY));", "tcg_gen_andi_tl(sr_cy, sr_cy, 1);", "tcg_gen_a...
[ 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 35 ], [ 37 ], [ 41 ], [ 43 ], [ 45 ], [ 49 ], [ 51 ...
11,715
static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **options) { TLSContext *c = h->priv_data; TLSShared *s = &c->tls_shared; int ret; if ((ret = ff_tls_open_underlying(s, h, uri, options)) < 0) goto fail; c->ssl_context = SSLCreateContext(NULL, s->listen ?...
true
FFmpeg
ecefce41d9f9fd10a8f564b011cd565cff2eb3ef
static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **options) { TLSContext *c = h->priv_data; TLSShared *s = &c->tls_shared; int ret; if ((ret = ff_tls_open_underlying(s, h, uri, options)) < 0) goto fail; c->ssl_context = SSLCreateContext(NULL, s->listen ?...
{ "code": [ " CHECK_ERROR(SSLSetSessionOption, c->ssl_context, kSSLSessionOptionBreakOnServerAuth, true);", " if (s->verify)", " CHECK_ERROR(SSLSetPeerDomainName, c->ssl_context, s->host, strlen(s->host));" ], "line_no": [ 37, 47, 49 ] }
static int FUNC_0(URLContext *VAR_0, const char *VAR_1, int VAR_2, AVDictionary **VAR_3) { TLSContext *c = VAR_0->priv_data; TLSShared *s = &c->tls_shared; int VAR_4; if ((VAR_4 = ff_tls_open_underlying(s, VAR_0, VAR_1, VAR_3)) < 0) goto fail; c->ssl_context = SSLCreateContext(NUL...
[ "static int FUNC_0(URLContext *VAR_0, const char *VAR_1, int VAR_2, AVDictionary **VAR_3)\n{", "TLSContext *c = VAR_0->priv_data;", "TLSShared *s = &c->tls_shared;", "int VAR_4;", "if ((VAR_4 = ff_tls_open_underlying(s, VAR_0, VAR_1, VAR_3)) < 0)\ngoto fail;", "c->ssl_context = SSLCreateContext(NULL, s->l...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13, 15 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33, 35 ], [ 37 ], [ 39 ], [ 41, 43, 45 ], [ 47, 49 ], [...
11,716
abi_long do_brk(abi_ulong new_brk) { abi_ulong brk_page; abi_long mapped_addr; int new_alloc_size; if (!new_brk) return target_brk; if (new_brk < target_original_brk) return target_brk; brk_page = HOST_PAGE_ALIGN(target_brk); /* If the new brk is less than thi...
true
qemu
4d1de87c75007ee7e29dd271ebb4afdcf01ad7aa
abi_long do_brk(abi_ulong new_brk) { abi_ulong brk_page; abi_long mapped_addr; int new_alloc_size; if (!new_brk) return target_brk; if (new_brk < target_original_brk) return target_brk; brk_page = HOST_PAGE_ALIGN(target_brk); if (new_brk < brk_page) { ...
{ "code": [ " abi_ulong brk_page;", " if (!new_brk)", " if (new_brk < target_original_brk)", " brk_page = HOST_PAGE_ALIGN(target_brk);", " if (new_brk < brk_page) {", " new_alloc_size = HOST_PAGE_ALIGN(new_brk - brk_page + 1);" ], "line_no": [ 5, 13, 17, 2...
abi_long FUNC_0(abi_ulong new_brk) { abi_ulong brk_page; abi_long mapped_addr; int VAR_0; if (!new_brk) return target_brk; if (new_brk < target_original_brk) return target_brk; brk_page = HOST_PAGE_ALIGN(target_brk); if (new_brk < brk_page) { target_br...
[ "abi_long FUNC_0(abi_ulong new_brk)\n{", "abi_ulong brk_page;", "abi_long mapped_addr;", "int\tVAR_0;", "if (!new_brk)\nreturn target_brk;", "if (new_brk < target_original_brk)\nreturn target_brk;", "brk_page = HOST_PAGE_ALIGN(target_brk);", "if (new_brk < brk_page) {", "target_brk = new_brk;", "r...
[ 0, 1, 0, 0, 1, 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 ], [ 17, 19 ], [ 23 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 51 ], [ 53, 55, 57 ], [ 61 ], [ 63 ], [ 65 ], [ 67 ], [ 75 ...
11,717
static int mkv_write_tracks(AVFormatContext *s) { MatroskaMuxContext *mkv = s->priv_data; AVIOContext *pb = s->pb; ebml_master tracks; int i, j, ret; ret = mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_TRACKS, avio_tell(pb)); if (ret < 0) return ret; tracks = start_ebml_...
true
FFmpeg
2dbc84b1a8d39e7fa0c7d66a120838fced35f5b4
static int mkv_write_tracks(AVFormatContext *s) { MatroskaMuxContext *mkv = s->priv_data; AVIOContext *pb = s->pb; ebml_master tracks; int i, j, ret; ret = mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_TRACKS, avio_tell(pb)); if (ret < 0) return ret; tracks = start_ebml_...
{ "code": [ " int d_width = av_rescale(codec->width, st->sample_aspect_ratio.num, st->sample_aspect_ratio.den);" ], "line_no": [ 227 ] }
static int FUNC_0(AVFormatContext *VAR_0) { MatroskaMuxContext *mkv = VAR_0->priv_data; AVIOContext *pb = VAR_0->pb; ebml_master tracks; int VAR_1, VAR_2, VAR_3; VAR_3 = mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_TRACKS, avio_tell(pb)); if (VAR_3 < 0) return VAR_3; tr...
[ "static int FUNC_0(AVFormatContext *VAR_0)\n{", "MatroskaMuxContext *mkv = VAR_0->priv_data;", "AVIOContext *pb = VAR_0->pb;", "ebml_master tracks;", "int VAR_1, VAR_2, VAR_3;", "VAR_3 = mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_TRACKS, avio_tell(pb));", "if (VAR_3 < 0) return VAR_3;", "t...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 45 ], [ 47 ...
11,718
int qemu_savevm_state_complete(Monitor *mon, QEMUFile *f) { SaveStateEntry *se; QTAILQ_FOREACH(se, &savevm_handlers, entry) { if (se->save_live_state == NULL) continue; /* Section type */ qemu_put_byte(f, QEMU_VM_SECTION_END); qemu_put_be32(f, se->section_id); ...
true
qemu
ea375f9ab8c76686dca0af8cb4f87a4eb569cad3
int qemu_savevm_state_complete(Monitor *mon, QEMUFile *f) { SaveStateEntry *se; QTAILQ_FOREACH(se, &savevm_handlers, entry) { if (se->save_live_state == NULL) continue; qemu_put_byte(f, QEMU_VM_SECTION_END); qemu_put_be32(f, se->section_id); se->save_live_sta...
{ "code": [ " return 0;", " return 0;" ], "line_no": [ 30, 30 ] }
int FUNC_0(Monitor *VAR_0, QEMUFile *VAR_1) { SaveStateEntry *se; QTAILQ_FOREACH(se, &savevm_handlers, entry) { if (se->save_live_state == NULL) continue; qemu_put_byte(VAR_1, QEMU_VM_SECTION_END); qemu_put_be32(VAR_1, se->section_id); se->save_live_state(VAR...
[ "int FUNC_0(Monitor *VAR_0, QEMUFile *VAR_1)\n{", "SaveStateEntry *se;", "QTAILQ_FOREACH(se, &savevm_handlers, entry) {", "if (se->save_live_state == NULL)\ncontinue;", "qemu_put_byte(VAR_1, QEMU_VM_SECTION_END);", "qemu_put_be32(VAR_1, se->section_id);", "se->save_live_state(VAR_0, VAR_1, QEMU_VM_SECTI...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 ]
[ [ 1, 2 ], [ 3 ], [ 4 ], [ 5, 6 ], [ 8 ], [ 9 ], [ 10 ], [ 11 ], [ 12 ], [ 13 ], [ 14, 15 ], [ 17 ], [ 18 ], [ 20 ], [ 21 ], [ 22 ], [ 23 ], [ 24 ], [ 25 ]...
11,719
static int scsi_hot_add(Monitor *mon, DeviceState *adapter, DriveInfo *dinfo, int printinfo) { SCSIBus *scsibus; SCSIDevice *scsidev; scsibus = DO_UPCAST(SCSIBus, qbus, QLIST_FIRST(&adapter->child_bus)); if (!scsibus || strcmp(scsibus->qbus.info->name, "SCSI") != 0) { ...
true
qemu
fa66b909f382619da15f8c7e323145adfa94fdac
static int scsi_hot_add(Monitor *mon, DeviceState *adapter, DriveInfo *dinfo, int printinfo) { SCSIBus *scsibus; SCSIDevice *scsidev; scsibus = DO_UPCAST(SCSIBus, qbus, QLIST_FIRST(&adapter->child_bus)); if (!scsibus || strcmp(scsibus->qbus.info->name, "SCSI") != 0) { ...
{ "code": [ " return 0;" ], "line_no": [ 56 ] }
static int FUNC_0(Monitor *VAR_0, DeviceState *VAR_1, DriveInfo *VAR_2, int VAR_3) { SCSIBus *scsibus; SCSIDevice *scsidev; scsibus = DO_UPCAST(SCSIBus, qbus, QLIST_FIRST(&VAR_1->child_bus)); if (!scsibus || strcmp(scsibus->qbus.info->name, "SCSI") != 0) { error_...
[ "static int FUNC_0(Monitor *VAR_0, DeviceState *VAR_1,\nDriveInfo *VAR_2, int VAR_3)\n{", "SCSIBus *scsibus;", "SCSIDevice *scsidev;", "scsibus = DO_UPCAST(SCSIBus, qbus, QLIST_FIRST(&VAR_1->child_bus));", "if (!scsibus || strcmp(scsibus->qbus.info->name, \"SCSI\") != 0) {", "error_report(\"Device is not ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15 ], [ 17 ], [ 39 ], [ 41 ], [ 46 ], [ 50, 52, 54 ], [ 56 ] ]
11,720
static void blk_mig_cleanup(void) { BlkMigDevState *bmds; BlkMigBlock *blk; bdrv_drain_all(); unset_dirty_tracking(); blk_mig_lock(); while ((bmds = QSIMPLEQ_FIRST(&block_mig_state.bmds_list)) != NULL) { QSIMPLEQ_REMOVE_HEAD(&block_mig_state.bmds_list, entry); bdrv...
true
qemu
60fe637bf0e4d7989e21e50f52526444765c63b4
static void blk_mig_cleanup(void) { BlkMigDevState *bmds; BlkMigBlock *blk; bdrv_drain_all(); unset_dirty_tracking(); blk_mig_lock(); while ((bmds = QSIMPLEQ_FIRST(&block_mig_state.bmds_list)) != NULL) { QSIMPLEQ_REMOVE_HEAD(&block_mig_state.bmds_list, entry); bdrv...
{ "code": [], "line_no": [] }
static void FUNC_0(void) { BlkMigDevState *bmds; BlkMigBlock *blk; bdrv_drain_all(); unset_dirty_tracking(); blk_mig_lock(); while ((bmds = QSIMPLEQ_FIRST(&block_mig_state.bmds_list)) != NULL) { QSIMPLEQ_REMOVE_HEAD(&block_mig_state.bmds_list, entry); bdrv_op_unblo...
[ "static void FUNC_0(void)\n{", "BlkMigDevState *bmds;", "BlkMigBlock *blk;", "bdrv_drain_all();", "unset_dirty_tracking();", "blk_mig_lock();", "while ((bmds = QSIMPLEQ_FIRST(&block_mig_state.bmds_list)) != NULL) {", "QSIMPLEQ_REMOVE_HEAD(&block_mig_state.bmds_list, entry);", "bdrv_op_unblock_all(bm...
[ 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 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49...
11,721
static void do_drive_backup(DriveBackup *backup, BlockJobTxn *txn, Error **errp) { BlockDriverState *bs; BlockDriverState *target_bs; BlockDriverState *source = NULL; BdrvDirtyBitmap *bmap = NULL; AioContext *aio_context; QDict *options = NULL; Error *local_err = NULL; int flags...
true
qemu
111049a4ecefc9cf1ac75c773f4c5c165f27fe63
static void do_drive_backup(DriveBackup *backup, BlockJobTxn *txn, Error **errp) { BlockDriverState *bs; BlockDriverState *target_bs; BlockDriverState *source = NULL; BdrvDirtyBitmap *bmap = NULL; AioContext *aio_context; QDict *options = NULL; Error *local_err = NULL; int flags...
{ "code": [ "static void do_drive_backup(DriveBackup *backup, BlockJobTxn *txn, Error **errp)", " backup_start(backup->job_id, bs, target_bs, backup->speed, backup->sync,", " bmap, backup->compress, backup->on_source_error,", " backup->on_target_error, BLOCK_JOB_DEFA...
static void FUNC_0(DriveBackup *VAR_0, BlockJobTxn *VAR_1, Error **VAR_2) { BlockDriverState *bs; BlockDriverState *target_bs; BlockDriverState *source = NULL; BdrvDirtyBitmap *bmap = NULL; AioContext *aio_context; QDict *options = NULL; Error *local_err = NULL; int VAR_3; ...
[ "static void FUNC_0(DriveBackup *VAR_0, BlockJobTxn *VAR_1, Error **VAR_2)\n{", "BlockDriverState *bs;", "BlockDriverState *target_bs;", "BlockDriverState *source = NULL;", "BdrvDirtyBitmap *bmap = NULL;", "AioContext *aio_context;", "QDict *options = NULL;", "Error *local_err = NULL;", "int VAR_3;"...
[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ...
11,722
static inline int get16(const uint8_t **pp, const uint8_t *p_end) { const uint8_t *p; int c; p = *pp; if ((p + 1) >= p_end) return AVERROR_INVALIDDATA; c = AV_RB16(p); p += 2; *pp = p; return c; }
true
FFmpeg
1b3b018aa4e43d7bf87df5cdf28c69a9ad5a6cbc
static inline int get16(const uint8_t **pp, const uint8_t *p_end) { const uint8_t *p; int c; p = *pp; if ((p + 1) >= p_end) return AVERROR_INVALIDDATA; c = AV_RB16(p); p += 2; *pp = p; return c; }
{ "code": [ " if ((p + 1) >= p_end)" ], "line_no": [ 13 ] }
static inline int FUNC_0(const uint8_t **VAR_0, const uint8_t *VAR_1) { const uint8_t *VAR_2; int VAR_3; VAR_2 = *VAR_0; if ((VAR_2 + 1) >= VAR_1) return AVERROR_INVALIDDATA; VAR_3 = AV_RB16(VAR_2); VAR_2 += 2; *VAR_0 = VAR_2; return VAR_3; }
[ "static inline int FUNC_0(const uint8_t **VAR_0, const uint8_t *VAR_1)\n{", "const uint8_t *VAR_2;", "int VAR_3;", "VAR_2 = *VAR_0;", "if ((VAR_2 + 1) >= VAR_1)\nreturn AVERROR_INVALIDDATA;", "VAR_3 = AV_RB16(VAR_2);", "VAR_2 += 2;", "*VAR_0 = VAR_2;", "return VAR_3;", "}" ]
[ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13, 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ] ]
11,724
static void test_visitor_out_null(TestOutputVisitorData *data, const void *unused) { QObject *arg; QDict *qdict; QObject *nil; visit_start_struct(data->ov, NULL, NULL, 0, &error_abort); visit_type_null(data->ov, "a", &error_abort); visit_end_struct(dat...
true
qemu
15c2f669e3fb2bc97f7b42d1871f595c0ac24af8
static void test_visitor_out_null(TestOutputVisitorData *data, const void *unused) { QObject *arg; QDict *qdict; QObject *nil; visit_start_struct(data->ov, NULL, NULL, 0, &error_abort); visit_type_null(data->ov, "a", &error_abort); visit_end_struct(dat...
{ "code": [ " visit_end_struct(data->ov, &error_abort);" ], "line_no": [ 19 ] }
static void FUNC_0(TestOutputVisitorData *VAR_0, const void *VAR_1) { QObject *arg; QDict *qdict; QObject *nil; visit_start_struct(VAR_0->ov, NULL, NULL, 0, &error_abort); visit_type_null(VAR_0->ov, "a", &error_abort); visit_end_struct(VAR_0->ov, &erro...
[ "static void FUNC_0(TestOutputVisitorData *VAR_0,\nconst void *VAR_1)\n{", "QObject *arg;", "QDict *qdict;", "QObject *nil;", "visit_start_struct(VAR_0->ov, NULL, NULL, 0, &error_abort);", "visit_type_null(VAR_0->ov, \"a\", &error_abort);", "visit_end_struct(VAR_0->ov, &error_abort);", "arg = qmp_outp...
[ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ] ]
11,725
void vnc_client_error(VncState *vs) { vnc_client_io_error(vs, -1, EINVAL); }
true
qemu
198a0039c5fca224a77e9761e2350dd9cc102ad0
void vnc_client_error(VncState *vs) { vnc_client_io_error(vs, -1, EINVAL); }
{ "code": [ " vnc_client_io_error(vs, -1, EINVAL);" ], "line_no": [ 5 ] }
void FUNC_0(VncState *VAR_0) { vnc_client_io_error(VAR_0, -1, EINVAL); }
[ "void FUNC_0(VncState *VAR_0)\n{", "vnc_client_io_error(VAR_0, -1, EINVAL);", "}" ]
[ 0, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ] ]
11,726
static void test_yield(void) { Coroutine *coroutine; bool done = false; int i = -1; /* one extra time to return from coroutine */ coroutine = qemu_coroutine_create(yield_5_times); while (!done) { qemu_coroutine_enter(coroutine, &done); i++; } g_assert_cmpint(i, ==...
true
qemu
0b8b8753e4d94901627b3e86431230f2319215c4
static void test_yield(void) { Coroutine *coroutine; bool done = false; int i = -1; coroutine = qemu_coroutine_create(yield_5_times); while (!done) { qemu_coroutine_enter(coroutine, &done); i++; } g_assert_cmpint(i, ==, 5); }
{ "code": [ " coroutine = qemu_coroutine_create(yield_5_times);", " qemu_coroutine_enter(coroutine, &done);" ], "line_no": [ 13, 17 ] }
static void FUNC_0(void) { Coroutine *coroutine; bool done = false; int VAR_0 = -1; coroutine = qemu_coroutine_create(yield_5_times); while (!done) { qemu_coroutine_enter(coroutine, &done); VAR_0++; } g_assert_cmpint(VAR_0, ==, 5); }
[ "static void FUNC_0(void)\n{", "Coroutine *coroutine;", "bool done = false;", "int VAR_0 = -1;", "coroutine = qemu_coroutine_create(yield_5_times);", "while (!done) {", "qemu_coroutine_enter(coroutine, &done);", "VAR_0++;", "}", "g_assert_cmpint(VAR_0, ==, 5);", "}" ]
[ 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ] ]
11,727
static inline int l3_unscale(int value, int exponent) { unsigned int m; int e; e = table_4_3_exp [4 * value + (exponent & 3)]; m = table_4_3_value[4 * value + (exponent & 3)]; e -= exponent >> 2; assert(e >= 1); if (e > 31) return 0; m = (m + (1 << (e - 1))) >> e; ...
false
FFmpeg
29d1df66adb3723d1e7f2d363984b50792fb7c11
static inline int l3_unscale(int value, int exponent) { unsigned int m; int e; e = table_4_3_exp [4 * value + (exponent & 3)]; m = table_4_3_value[4 * value + (exponent & 3)]; e -= exponent >> 2; assert(e >= 1); if (e > 31) return 0; m = (m + (1 << (e - 1))) >> e; ...
{ "code": [], "line_no": [] }
static inline int FUNC_0(int VAR_0, int VAR_1) { unsigned int VAR_2; int VAR_3; VAR_3 = table_4_3_exp [4 * VAR_0 + (VAR_1 & 3)]; VAR_2 = table_4_3_value[4 * VAR_0 + (VAR_1 & 3)]; VAR_3 -= VAR_1 >> 2; assert(VAR_3 >= 1); if (VAR_3 > 31) return 0; VAR_2 = (VAR_2 + (1...
[ "static inline int FUNC_0(int VAR_0, int VAR_1)\n{", "unsigned int VAR_2;", "int VAR_3;", "VAR_3 = table_4_3_exp [4 * VAR_0 + (VAR_1 & 3)];", "VAR_2 = table_4_3_value[4 * VAR_0 + (VAR_1 & 3)];", "VAR_3 -= VAR_1 >> 2;", "assert(VAR_3 >= 1);", "if (VAR_3 > 31)\nreturn 0;", "VAR_2 = (VAR_2 + (1 << (...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19, 21 ], [ 23 ], [ 27 ], [ 29 ] ]
11,728
static int wsaud_read_packet(AVFormatContext *s, AVPacket *pkt) { AVIOContext *pb = s->pb; unsigned char preamble[AUD_CHUNK_PREAMBLE_SIZE]; unsigned int chunk_size; int ret = 0; AVStream *st = s->streams[0]; if (avio_read(pb, preamble, AUD_CHUNK_PREAMBLE_SI...
false
FFmpeg
172865931951d73f1ac60f4b56cdb4da77f37f1d
static int wsaud_read_packet(AVFormatContext *s, AVPacket *pkt) { AVIOContext *pb = s->pb; unsigned char preamble[AUD_CHUNK_PREAMBLE_SIZE]; unsigned int chunk_size; int ret = 0; AVStream *st = s->streams[0]; if (avio_read(pb, preamble, AUD_CHUNK_PREAMBLE_SI...
{ "code": [], "line_no": [] }
static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1) { AVIOContext *pb = VAR_0->pb; unsigned char VAR_2[AUD_CHUNK_PREAMBLE_SIZE]; unsigned int VAR_3; int VAR_4 = 0; AVStream *st = VAR_0->streams[0]; if (avio_read(pb, VAR_2, AUD_CHUNK_PREAMBLE_SIZE) !=...
[ "static int FUNC_0(AVFormatContext *VAR_0,\nAVPacket *VAR_1)\n{", "AVIOContext *pb = VAR_0->pb;", "unsigned char VAR_2[AUD_CHUNK_PREAMBLE_SIZE];", "unsigned int VAR_3;", "int VAR_4 = 0;", "AVStream *st = VAR_0->streams[0];", "if (avio_read(pb, VAR_2, AUD_CHUNK_PREAMBLE_SIZE) !=\nAUD_CHUNK_PREAMBLE_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 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19, 21, 23 ], [ 29, 31 ], [ 35 ], [ 39 ], [ 49 ], [ 51, 53 ], [ 55, 57 ], [ 59 ], [ 61 ], [ 65 ], [ 67 ...
11,729
void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width, int height, int64_t pts) { ContextInfo *ci = (ContextInfo *) ctx; uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; int rowsize = picture->linesize[0]; #if 0 av_log(NULL, AV_LOG_DEBUG, "pix_fmt = %d, width = %d, pts = %lld, ...
false
FFmpeg
1bbeb06a36ec36ce03e1c882c8e97efdc13c9a9b
void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width, int height, int64_t pts) { ContextInfo *ci = (ContextInfo *) ctx; uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; int rowsize = picture->linesize[0]; #if 0 av_log(NULL, AV_LOG_DEBUG, "pix_fmt = %d, width = %d, pts = %lld, ...
{ "code": [], "line_no": [] }
void FUNC_0(void *VAR_0, AVPicture *VAR_1, enum PixelFormat VAR_2, int VAR_3, int VAR_4, int64_t VAR_5) { ContextInfo *ci = (ContextInfo *) VAR_0; uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; int VAR_6 = VAR_1->linesize[0]; #if 0 av_log(NULL, AV_LOG_DEBUG, "VAR_2 = %d, VAR_3 = %d, VAR_5 = %lld, ci->...
[ "void FUNC_0(void *VAR_0, AVPicture *VAR_1, enum PixelFormat VAR_2, int VAR_3, int VAR_4, int64_t VAR_5)\n{", "ContextInfo *ci = (ContextInfo *) VAR_0;", "uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;", "int VAR_6 = VAR_1->linesize[0];", "#if 0\nav_log(NULL, AV_LOG_DEBUG, \"VAR_2 = %d, VAR_3 = %d, VAR_5 = %lld, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13, 15, 17 ], [ 19, 23, 25 ], [ 29, 31 ], [ 35 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ], [ 57 ], [...
11,730
static int write_skip_frames(AVFormatContext *s, int stream_index, int64_t dts) { AVIStream *avist = s->streams[stream_index]->priv_data; AVCodecContext *enc = s->streams[stream_index]->codec; av_dlog(s, "dts:%s packet_count:%d stream_index:%d\n", av_ts2str(dts), avist->packet_count, stream_index);...
false
FFmpeg
229843aa359ae0c9519977d7fa952688db63f559
static int write_skip_frames(AVFormatContext *s, int stream_index, int64_t dts) { AVIStream *avist = s->streams[stream_index]->priv_data; AVCodecContext *enc = s->streams[stream_index]->codec; av_dlog(s, "dts:%s packet_count:%d stream_index:%d\n", av_ts2str(dts), avist->packet_count, stream_index);...
{ "code": [], "line_no": [] }
static int FUNC_0(AVFormatContext *VAR_0, int VAR_1, int64_t VAR_2) { AVIStream *avist = VAR_0->streams[VAR_1]->priv_data; AVCodecContext *enc = VAR_0->streams[VAR_1]->codec; av_dlog(VAR_0, "VAR_2:%VAR_0 packet_count:%d VAR_1:%d\n", av_ts2str(VAR_2), avist->packet_count, VAR_1); while (enc->bl...
[ "static int FUNC_0(AVFormatContext *VAR_0, int VAR_1, int64_t VAR_2)\n{", "AVIStream *avist = VAR_0->streams[VAR_1]->priv_data;", "AVCodecContext *enc = VAR_0->streams[VAR_1]->codec;", "av_dlog(VAR_0, \"VAR_2:%VAR_0 packet_count:%d VAR_1:%d\\n\", av_ts2str(VAR_2), avist->packet_count, VAR_1);", "while (e...
[ 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 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 47 ], [ 49 ] ]
11,733
MKSCALE16(scale16be, AV_RB16, AV_WB16) MKSCALE16(scale16le, AV_RL16, AV_WL16) static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); RawVideoContext *context = avctx->pr...
true
FFmpeg
46f67f4a34cab5f5686baf1605dd77d3c70740b5
MKSCALE16(scale16be, AV_RB16, AV_WB16) MKSCALE16(scale16le, AV_RL16, AV_WL16) static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); RawVideoContext *context = avctx->pr...
{ "code": [ " int avpkt_stride = avpkt->size / avctx->height;" ], "line_no": [ 21 ] }
MKSCALE16(scale16be, AV_RB16, AV_WB16) MKSCALE16(scale16le, AV_RL16, AV_WL16) static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); RawVideoContext *context = avctx->pr...
[ "MKSCALE16(scale16be, AV_RB16, AV_WB16)\nMKSCALE16(scale16le, AV_RL16, AV_WL16)\nstatic int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,\nAVPacket *avpkt)\n{", "const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);", "RawVideoContext *context = avctx->priv_data;", "const...
[ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3, 7, 9, 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 31 ], [ 35, 37, 39, 41 ], [ 43 ], [ 45, 47, 49 ], [ 51 ], [ 53 ], [ 55...
11,734
static void convert_matrix(int *qmat, UINT16 *qmat16, const UINT16 *quant_matrix, int qscale) { int i; if (av_fdct == jpeg_fdct_ifast) { for(i=0;i<64;i++) { /* 16 <= qscale * quant_matrix[i] <= 7905 */ /* 19952 <= aanscales[i] * qscale * quant_matrix[i] ...
true
FFmpeg
d7e9533aa06f4073a27812349b35ba5fede11ca1
static void convert_matrix(int *qmat, UINT16 *qmat16, const UINT16 *quant_matrix, int qscale) { int i; if (av_fdct == jpeg_fdct_ifast) { for(i=0;i<64;i++) { qmat[block_permute_op(i)] = (int)((UINT64_C(1) << (QMAT_SH...
{ "code": [ "static void convert_matrix(int *qmat, UINT16 *qmat16, const UINT16 *quant_matrix, int qscale)", " int i;", " if (av_fdct == jpeg_fdct_ifast) {", " for(i=0;i<64;i++) {", " qmat[block_permute_op(i)] = (int)((UINT64_C(1) << (QMAT_SHIFT + 11)) / ", " ...
static void FUNC_0(int *VAR_0, UINT16 *VAR_1, const UINT16 *VAR_2, int VAR_3) { int VAR_4; if (av_fdct == jpeg_fdct_ifast) { for(VAR_4=0;VAR_4<64;VAR_4++) { VAR_0[block_permute_op(VAR_4)] = (int)((UINT64_C(1) << (QM...
[ "static void FUNC_0(int *VAR_0, UINT16 *VAR_1, const UINT16 *VAR_2, int VAR_3)\n{", "int VAR_4;", "if (av_fdct == jpeg_fdct_ifast) {", "for(VAR_4=0;VAR_4<64;VAR_4++) {", "VAR_0[block_permute_op(VAR_4)] = (int)((UINT64_C(1) << (QMAT_SHIFT + 11)) /\n(aanscales[VAR_4] * VAR_3 * VAR_2[block_permute_op(VAR_4)]))...
[ 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 23, 25 ], [ 27 ], [ 29 ], [ 31 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ] ]
11,736
static void virtio_console_init_pci(PCIDevice *pci_dev) { VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev); VirtIODevice *vdev; vdev = virtio_console_init(&pci_dev->qdev); virtio_init_pci(proxy, vdev, PCI_VENDOR_ID_REDHAT_QUMRANET, PCI_...
true
qemu
21d58b575e79c5d0739b695b272ea89bb052a7bf
static void virtio_console_init_pci(PCIDevice *pci_dev) { VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev); VirtIODevice *vdev; vdev = virtio_console_init(&pci_dev->qdev); virtio_init_pci(proxy, vdev, PCI_VENDOR_ID_REDHAT_QUMRANET, PCI_...
{ "code": [ "static void virtio_console_init_pci(PCIDevice *pci_dev)", " PCI_CLASS_DISPLAY_OTHER,", " 0x00);" ], "line_no": [ 1, 19, 21 ] }
static void FUNC_0(PCIDevice *VAR_0) { VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, VAR_0, VAR_0); VirtIODevice *vdev; vdev = virtio_console_init(&VAR_0->qdev); virtio_init_pci(proxy, vdev, PCI_VENDOR_ID_REDHAT_QUMRANET, PCI_DEVICE_ID_VIRTIO_CONSOLE,...
[ "static void FUNC_0(PCIDevice *VAR_0)\n{", "VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, VAR_0, VAR_0);", "VirtIODevice *vdev;", "vdev = virtio_console_init(&VAR_0->qdev);", "virtio_init_pci(proxy, vdev,\nPCI_VENDOR_ID_REDHAT_QUMRANET,\nPCI_DEVICE_ID_VIRTIO_CONSOLE,\nPCI_CLASS_DISPLAY_OTHER,\n0x00);", ...
[ 1, 0, 0, 0, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13, 15, 17, 19, 21 ], [ 23 ] ]
11,737
static int g2m_init_buffers(G2MContext *c) { int aligned_height; if (!c->framebuf || c->old_width < c->width || c->old_height < c->height) { c->framebuf_stride = FFALIGN(c->width * 3, 16); aligned_height = FFALIGN(c->height, 16); av_free(c->framebuf); c->framebuf ...
true
FFmpeg
e07ac727c1cc9eed39e7f9117c97006f719864bd
static int g2m_init_buffers(G2MContext *c) { int aligned_height; if (!c->framebuf || c->old_width < c->width || c->old_height < c->height) { c->framebuf_stride = FFALIGN(c->width * 3, 16); aligned_height = FFALIGN(c->height, 16); av_free(c->framebuf); c->framebuf ...
{ "code": [ " c->framebuf_stride = FFALIGN(c->width * 3, 16);", " aligned_height = FFALIGN(c->height, 16);" ], "line_no": [ 11, 13 ] }
static int FUNC_0(G2MContext *VAR_0) { int VAR_1; if (!VAR_0->framebuf || VAR_0->old_width < VAR_0->width || VAR_0->old_height < VAR_0->height) { VAR_0->framebuf_stride = FFALIGN(VAR_0->width * 3, 16); VAR_1 = FFALIGN(VAR_0->height, 16); av_free(VAR_0->framebuf); ...
[ "static int FUNC_0(G2MContext *VAR_0)\n{", "int VAR_1;", "if (!VAR_0->framebuf || VAR_0->old_width < VAR_0->width || VAR_0->old_height < VAR_0->height) {", "VAR_0->framebuf_stride = FFALIGN(VAR_0->width * 3, 16);", "VAR_1 = FFALIGN(VAR_0->height, 16);", "av_free(VAR_0->framebuf);", "VAR_0->frameb...
[ 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19, 21 ], [ 23 ], [ 25, 27, 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], ...
11,738
static bool vmxnet_tx_pkt_parse_headers(struct VmxnetTxPkt *pkt) { struct iovec *l2_hdr, *l3_hdr; size_t bytes_read; size_t full_ip6hdr_len; uint16_t l3_proto; assert(pkt); l2_hdr = &pkt->vec[VMXNET_TX_PKT_L2HDR_FRAG]; l3_hdr = &pkt->vec[VMXNET_TX_PKT_L3HDR_FRAG]; bytes_re...
true
qemu
a7278b36fcab9af469563bd7b9dadebe2ae25e48
static bool vmxnet_tx_pkt_parse_headers(struct VmxnetTxPkt *pkt) { struct iovec *l2_hdr, *l3_hdr; size_t bytes_read; size_t full_ip6hdr_len; uint16_t l3_proto; assert(pkt); l2_hdr = &pkt->vec[VMXNET_TX_PKT_L2HDR_FRAG]; l3_hdr = &pkt->vec[VMXNET_TX_PKT_L3HDR_FRAG]; bytes_re...
{ "code": [ " if (bytes_read < ETH_MAX_L2_HDR_LEN) {", " } else {", " l2_hdr->iov_len = eth_get_l2_hdr_length(l2_hdr->iov_base);" ], "line_no": [ 29, 35, 37 ] }
static bool FUNC_0(struct VmxnetTxPkt *pkt) { struct iovec *VAR_0, *VAR_1; size_t bytes_read; size_t full_ip6hdr_len; uint16_t l3_proto; assert(pkt); VAR_0 = &pkt->vec[VMXNET_TX_PKT_L2HDR_FRAG]; VAR_1 = &pkt->vec[VMXNET_TX_PKT_L3HDR_FRAG]; bytes_read = iov_to_buf(pkt->raw,...
[ "static bool FUNC_0(struct VmxnetTxPkt *pkt)\n{", "struct iovec *VAR_0, *VAR_1;", "size_t bytes_read;", "size_t full_ip6hdr_len;", "uint16_t l3_proto;", "assert(pkt);", "VAR_0 = &pkt->vec[VMXNET_TX_PKT_L2HDR_FRAG];", "VAR_1 = &pkt->vec[VMXNET_TX_PKT_L3HDR_FRAG];", "bytes_read = iov_to_buf(pkt->raw, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 19 ], [ 21 ], [ 25, 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 43 ], [ 47 ], [ 49, 51 ], [ 55,...
11,739
int tpm_register_model(enum TpmModel model) { int i; for (i = 0; i < TPM_MAX_MODELS; i++) { if (tpm_models[i] == -1) { tpm_models[i] = model; return 0; } } error_report("Could not register TPM model"); return 1; }
true
qemu
8cdd2e0abbf593a38a146d8dfc998754cefbc27a
int tpm_register_model(enum TpmModel model) { int i; for (i = 0; i < TPM_MAX_MODELS; i++) { if (tpm_models[i] == -1) { tpm_models[i] = model; return 0; } } error_report("Could not register TPM model"); return 1; }
{ "code": [ " if (tpm_models[i] == -1) {" ], "line_no": [ 11 ] }
int FUNC_0(enum TpmModel VAR_0) { int VAR_1; for (VAR_1 = 0; VAR_1 < TPM_MAX_MODELS; VAR_1++) { if (tpm_models[VAR_1] == -1) { tpm_models[VAR_1] = VAR_0; return 0; } } error_report("Could not register TPM VAR_0"); return 1; }
[ "int FUNC_0(enum TpmModel VAR_0)\n{", "int VAR_1;", "for (VAR_1 = 0; VAR_1 < TPM_MAX_MODELS; VAR_1++) {", "if (tpm_models[VAR_1] == -1) {", "tpm_models[VAR_1] = VAR_0;", "return 0;", "}", "}", "error_report(\"Could not register TPM VAR_0\");", "return 1;", "}" ]
[ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ] ]
11,740
static inline TCGv load_cpu_offset(int offset) { TCGv tmp = new_tmp(); tcg_gen_ld_i32(tmp, cpu_env, offset); return tmp; }
true
qemu
7d1b0095bff7157e856d1d0e6c4295641ced2752
static inline TCGv load_cpu_offset(int offset) { TCGv tmp = new_tmp(); tcg_gen_ld_i32(tmp, cpu_env, offset); return tmp; }
{ "code": [ " TCGv tmp = new_tmp();", " TCGv tmp = new_tmp();", " TCGv tmp = new_tmp();", " TCGv tmp = new_tmp();", " TCGv tmp = new_tmp();", " TCGv tmp = new_tmp();", " TCGv tmp = new_tmp();", " TCGv tmp = new_tmp();", " TCGv tmp = new_tmp();", " ...
static inline TCGv FUNC_0(int offset) { TCGv tmp = new_tmp(); tcg_gen_ld_i32(tmp, cpu_env, offset); return tmp; }
[ "static inline TCGv FUNC_0(int offset)\n{", "TCGv tmp = new_tmp();", "tcg_gen_ld_i32(tmp, cpu_env, offset);", "return tmp;", "}" ]
[ 0, 1, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ] ]
11,741
static int load_xbzrle(QEMUFile *f, ram_addr_t addr, void *host) { int ret, rc = 0; unsigned int xh_len; int xh_flags; if (!XBZRLE.decoded_buf) { XBZRLE.decoded_buf = g_malloc(TARGET_PAGE_SIZE); } /* extract RLE header */ xh_flags = qemu_get_byte(f); xh_len = qemu_g...
true
qemu
905f26f2221e139ac0e7317ddac158c50f5cf876
static int load_xbzrle(QEMUFile *f, ram_addr_t addr, void *host) { int ret, rc = 0; unsigned int xh_len; int xh_flags; if (!XBZRLE.decoded_buf) { XBZRLE.decoded_buf = g_malloc(TARGET_PAGE_SIZE); } xh_flags = qemu_get_byte(f); xh_len = qemu_get_be16(f); if (x...
{ "code": [ " if (!XBZRLE.decoded_buf) {", " XBZRLE.decoded_buf = g_malloc(TARGET_PAGE_SIZE);", " qemu_get_buffer(f, XBZRLE.decoded_buf, xh_len);", " ret = xbzrle_decode_buffer(XBZRLE.decoded_buf, xh_len, host," ], "line_no": [ 13, 15, 49, 55 ] }
static int FUNC_0(QEMUFile *VAR_0, ram_addr_t VAR_1, void *VAR_2) { int VAR_3, VAR_4 = 0; unsigned int VAR_5; int VAR_6; if (!XBZRLE.decoded_buf) { XBZRLE.decoded_buf = g_malloc(TARGET_PAGE_SIZE); } VAR_6 = qemu_get_byte(VAR_0); VAR_5 = qemu_get_be16(VAR_0); ...
[ "static int FUNC_0(QEMUFile *VAR_0, ram_addr_t VAR_1, void *VAR_2)\n{", "int VAR_3, VAR_4 = 0;", "unsigned int VAR_5;", "int VAR_6;", "if (!XBZRLE.decoded_buf) {", "XBZRLE.decoded_buf = g_malloc(TARGET_PAGE_SIZE);", "}", "VAR_6 = qemu_get_byte(VAR_0);", "VAR_5 = qemu_get_be16(VAR_0);", "if (VAR_6 ...
[ 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15 ], [ 17 ], [ 23 ], [ 25 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 49 ], [ 55, 57 ], [...
11,743
static int xv_write_header(AVFormatContext *s) { XVContext *xv = s->priv_data; unsigned int num_adaptors; XvAdaptorInfo *ai; XvImageFormatValues *fv; int num_formats = 0, j; AVCodecContext *encctx = s->streams[0]->codec; if ( s->nb_streams > 1 || encctx->codec_type != AV...
true
FFmpeg
f04fe23a5256cc82c383f2949ead78cb7cc9228d
static int xv_write_header(AVFormatContext *s) { XVContext *xv = s->priv_data; unsigned int num_adaptors; XvAdaptorInfo *ai; XvImageFormatValues *fv; int num_formats = 0, j; AVCodecContext *encctx = s->streams[0]->codec; if ( s->nb_streams > 1 || encctx->codec_type != AV...
{ "code": [], "line_no": [] }
static int FUNC_0(AVFormatContext *VAR_0) { XVContext *xv = VAR_0->priv_data; unsigned int VAR_1; XvAdaptorInfo *ai; XvImageFormatValues *fv; int VAR_2 = 0, VAR_3; AVCodecContext *encctx = VAR_0->streams[0]->codec; if ( VAR_0->nb_streams > 1 || encctx->codec_type != AVME...
[ "static int FUNC_0(AVFormatContext *VAR_0)\n{", "XVContext *xv = VAR_0->priv_data;", "unsigned int VAR_1;", "XvAdaptorInfo *ai;", "XvImageFormatValues *fv;", "int VAR_2 = 0, VAR_3;", "AVCodecContext *encctx = VAR_0->streams[0]->codec;", "if ( VAR_0->nb_streams > 1\n|| encctx->codec_type != AVMEDIA_T...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19, 21, 23 ], [ 25 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 45 ], [ 47 ], [ 49 ...
11,744
static void xscom_write(void *opaque, hwaddr addr, uint64_t val, unsigned width) { PnvChip *chip = opaque; uint32_t pcba = pnv_xscom_pcba(chip, addr); MemTxResult result; /* Handle some SCOMs here before dispatch */ if (xscom_write_default(chip, pcba, val)) { ...
true
qemu
f81e551229070f01bf747eda3f05960182db9d2a
static void xscom_write(void *opaque, hwaddr addr, uint64_t val, unsigned width) { PnvChip *chip = opaque; uint32_t pcba = pnv_xscom_pcba(chip, addr); MemTxResult result; if (xscom_write_default(chip, pcba, val)) { goto complete; } address_space...
{ "code": [ " address_space_stq(&chip->xscom_as, pcba << 3, val, MEMTXATTRS_UNSPECIFIED,", " &result);" ], "line_no": [ 25, 27 ] }
static void FUNC_0(void *VAR_0, hwaddr VAR_1, uint64_t VAR_2, unsigned VAR_3) { PnvChip *chip = VAR_0; uint32_t pcba = pnv_xscom_pcba(chip, VAR_1); MemTxResult result; if (xscom_write_default(chip, pcba, VAR_2)) { goto complete; } address_space_...
[ "static void FUNC_0(void *VAR_0, hwaddr VAR_1, uint64_t VAR_2,\nunsigned VAR_3)\n{", "PnvChip *chip = VAR_0;", "uint32_t pcba = pnv_xscom_pcba(chip, VAR_1);", "MemTxResult result;", "if (xscom_write_default(chip, pcba, VAR_2)) {", "goto complete;", "}", "address_space_stq(&chip->xscom_as, pcba << 3, V...
[ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 17 ], [ 19 ], [ 21 ], [ 25, 27 ], [ 29 ], [ 31, 33, 35 ], [ 37 ], [ 39 ], [ 41 ], [ 45, 47 ], [ 49 ] ]
11,746
void cpu_alpha_store_fpcr (CPUState *env, uint64_t val) { int round_mode, mask; set_float_exception_flags((val >> 52) & 0x3F, &env->fp_status); mask = 0; if (val & FPCR_INVD) mask |= float_flag_invalid; if (val & FPCR_DZED) mask |= float_flag_divbyzero; if (val & FPC...
true
qemu
212df029754caabba45f941fbd22ec219b934ef9
void cpu_alpha_store_fpcr (CPUState *env, uint64_t val) { int round_mode, mask; set_float_exception_flags((val >> 52) & 0x3F, &env->fp_status); mask = 0; if (val & FPCR_INVD) mask |= float_flag_invalid; if (val & FPCR_DZED) mask |= float_flag_divbyzero; if (val & FPC...
{ "code": [], "line_no": [] }
void FUNC_0 (CPUState *VAR_0, uint64_t VAR_1) { int VAR_2, VAR_3; set_float_exception_flags((VAR_1 >> 52) & 0x3F, &VAR_0->fp_status); VAR_3 = 0; if (VAR_1 & FPCR_INVD) VAR_3 |= float_flag_invalid; if (VAR_1 & FPCR_DZED) VAR_3 |= float_flag_divbyzero; if (VAR_1 & FPCR...
[ "void FUNC_0 (CPUState *VAR_0, uint64_t VAR_1)\n{", "int VAR_2, VAR_3;", "set_float_exception_flags((VAR_1 >> 52) & 0x3F, &VAR_0->fp_status);", "VAR_3 = 0;", "if (VAR_1 & FPCR_INVD)\nVAR_3 |= float_flag_invalid;", "if (VAR_1 & FPCR_DZED)\nVAR_3 |= float_flag_divbyzero;", "if (VAR_1 & FPCR_OVFD)\nVAR_3 |...
[ 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 ], [ 13 ], [ 15, 17 ], [ 19, 21 ], [ 23, 25 ], [ 27, 29 ], [ 31, 33 ], [ 35 ], [ 39 ], [ 41, 43 ], [ 45 ], [ 47, 49 ], [ 51 ], [ 53, 55...
11,747
int ff_srtp_decrypt(struct SRTPContext *s, uint8_t *buf, int *lenptr) { uint8_t iv[16] = { 0 }, hmac[20]; int len = *lenptr; int ext, seq_largest; uint32_t ssrc, roc; uint64_t index; int rtcp; // TODO: Missing replay protection if (len < s->hmac_size) return AVERROR...
true
FFmpeg
42364fcbcac99c42a9859c3662a2956e5554b68c
int ff_srtp_decrypt(struct SRTPContext *s, uint8_t *buf, int *lenptr) { uint8_t iv[16] = { 0 }, hmac[20]; int len = *lenptr; int ext, seq_largest; uint32_t ssrc, roc; uint64_t index; int rtcp; if (len < s->hmac_size) return AVERROR_INVALIDDATA; rtcp = RTP_PT...
{ "code": [ " int ext, seq_largest;", " uint32_t ssrc, roc;" ], "line_no": [ 9, 11 ] }
int FUNC_0(struct SRTPContext *VAR_0, uint8_t *VAR_1, int *VAR_2) { uint8_t iv[16] = { 0 }, hmac[20]; int VAR_3 = *VAR_2; int VAR_4, VAR_5; uint32_t ssrc, roc; uint64_t index; int VAR_6; if (VAR_3 < VAR_0->hmac_size) return AVERROR_INVALIDDATA; VAR_6 = RTP_P...
[ "int FUNC_0(struct SRTPContext *VAR_0, uint8_t *VAR_1, int *VAR_2)\n{", "uint8_t iv[16] = { 0 }, hmac[20];", "int VAR_3 = *VAR_2;", "int VAR_4, VAR_5;", "uint32_t ssrc, roc;", "uint64_t index;", "int VAR_6;", "if (VAR_3 < VAR_0->hmac_size)\nreturn AVERROR_INVALIDDATA;", "VAR_6 = RTP_PT_IS_RTCP(VAR_1...
[ 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 23, 25 ], [ 29 ], [ 35 ], [ 39 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 55 ], [ 57 ], [ 59 ], [ 61, 63 ...
11,750
static void celt_pvq_search(float *X, int *y, int K, int N) { int i; float res = 0.0f, y_norm = 0.0f, xy_norm = 0.0f; for (i = 0; i < N; i++) res += FFABS(X[i]); res = K/res; for (i = 0; i < N; i++) { y[i] = lrintf(res*X[i]); y_norm += y[i]*y[i]; xy_n...
true
FFmpeg
70259737cbad1136d942fa0cca5d55be1ca37e0a
static void celt_pvq_search(float *X, int *y, int K, int N) { int i; float res = 0.0f, y_norm = 0.0f, xy_norm = 0.0f; for (i = 0; i < N; i++) res += FFABS(X[i]); res = K/res; for (i = 0; i < N; i++) { y[i] = lrintf(res*X[i]); y_norm += y[i]*y[i]; xy_n...
{ "code": [ " res = K/res;" ], "line_no": [ 17 ] }
static void FUNC_0(float *VAR_0, int *VAR_1, int VAR_2, int VAR_3) { int VAR_4; float VAR_5 = 0.0f, VAR_6 = 0.0f, VAR_7 = 0.0f; for (VAR_4 = 0; VAR_4 < VAR_3; VAR_4++) VAR_5 += FFABS(VAR_0[VAR_4]); VAR_5 = VAR_2/VAR_5; for (VAR_4 = 0; VAR_4 < VAR_3; VAR_4++) { VAR_1[VAR...
[ "static void FUNC_0(float *VAR_0, int *VAR_1, int VAR_2, int VAR_3)\n{", "int VAR_4;", "float VAR_5 = 0.0f, VAR_6 = 0.0f, VAR_7 = 0.0f;", "for (VAR_4 = 0; VAR_4 < VAR_3; VAR_4++)", "VAR_5 += FFABS(VAR_0[VAR_4]);", "VAR_5 = VAR_2/VAR_5;", "for (VAR_4 = 0; VAR_4 < VAR_3; VAR_4++) {", "VAR_1[VAR_4] = lri...
[ 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 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 45 ], [ 53 ], [ 55 ], [ 57...
11,751
static void commit_complete(BlockJob *job, void *opaque) { CommitBlockJob *s = container_of(job, CommitBlockJob, common); CommitCompleteData *data = opaque; BlockDriverState *active = s->active; BlockDriverState *top = blk_bs(s->top); BlockDriverState *base = blk_bs(s->base); BlockDriverState *o...
true
qemu
19ebd13ed45ad5d5f277f5914d55b83f13eb09eb
static void commit_complete(BlockJob *job, void *opaque) { CommitBlockJob *s = container_of(job, CommitBlockJob, common); CommitCompleteData *data = opaque; BlockDriverState *active = s->active; BlockDriverState *top = blk_bs(s->top); BlockDriverState *base = blk_bs(s->base); BlockDriverState *o...
{ "code": [], "line_no": [] }
static void FUNC_0(BlockJob *VAR_0, void *VAR_1) { CommitBlockJob *s = container_of(VAR_0, CommitBlockJob, common); CommitCompleteData *data = VAR_1; BlockDriverState *active = s->active; BlockDriverState *top = blk_bs(s->top); BlockDriverState *base = blk_bs(s->base); BlockDriverState *overlay_...
[ "static void FUNC_0(BlockJob *VAR_0, void *VAR_1)\n{", "CommitBlockJob *s = container_of(VAR_0, CommitBlockJob, common);", "CommitCompleteData *data = VAR_1;", "BlockDriverState *active = s->active;", "BlockDriverState *top = blk_bs(s->top);", "BlockDriverState *base = blk_bs(s->base);", "BlockDriverSta...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 2 ], [ 3 ], [ 4 ], [ 5 ], [ 6 ], [ 7 ], [ 8 ], [ 9 ], [ 10 ], [ 12 ], [ 13 ], [ 16 ], [ 17 ], [ 19, 20 ], [ 21 ], [ 25 ], [ 26 ], [ 30 ], [ 31 ], [ ...
11,752
static void compute_pkt_fields2(AVStream *st, AVPacket *pkt){ int b_frames = FFMAX(st->codec.has_b_frames, st->codec.max_b_frames); int num, den, frame_size; // av_log(NULL, AV_LOG_DEBUG, "av_write_frame: pts:%lld dts:%lld cur_dts:%lld b:%d size:%d st:%d\n", pkt->pts, pkt->dts, st->cur_dts, b_frames, pk...
true
FFmpeg
5edea431d0616737e5a5f58cefc07ba5b2e0875f
static void compute_pkt_fields2(AVStream *st, AVPacket *pkt){ int b_frames = FFMAX(st->codec.has_b_frames, st->codec.max_b_frames); int num, den, frame_size; if(pkt->pts != AV_NOPTS_VALUE) pkt->pts = av_rescale(pkt->pts, st->time_base.den, AV_TIME_BASE * (int64_t)st->...
{ "code": [ "static void compute_pkt_fields2(AVStream *st, AVPacket *pkt){" ], "line_no": [ 1 ] }
static void FUNC_0(AVStream *VAR_0, AVPacket *VAR_1){ int VAR_2 = FFMAX(VAR_0->codec.has_b_frames, VAR_0->codec.max_b_frames); int VAR_3, VAR_4, VAR_5; if(VAR_1->pts != AV_NOPTS_VALUE) VAR_1->pts = av_rescale(VAR_1->pts, VAR_0->time_base.VAR_4, AV_TIME_BASE * (int64_t...
[ "static void FUNC_0(AVStream *VAR_0, AVPacket *VAR_1){", "int VAR_2 = FFMAX(VAR_0->codec.has_b_frames, VAR_0->codec.max_b_frames);", "int VAR_3, VAR_4, VAR_5;", "if(VAR_1->pts != AV_NOPTS_VALUE)\nVAR_1->pts = av_rescale(VAR_1->pts, VAR_0->time_base.VAR_4, AV_TIME_BASE * (int64_t)VAR_0->time_base.VAR_3);", "...
[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1 ], [ 3 ], [ 5 ], [ 19, 21 ], [ 23, 25 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 49 ], [ 51, 55 ], [ 57 ], [ 63 ], [ 65 ], [ 67 ], [ 6...
11,753
static void net_dump_cleanup(VLANClientState *vc) { DumpState *s = vc->opaque; close(s->fd); qemu_free(s); }
true
qemu
731d5856cbb9c160fe02b90cd3cf354ea4f52f34
static void net_dump_cleanup(VLANClientState *vc) { DumpState *s = vc->opaque; close(s->fd); qemu_free(s); }
{ "code": [ " DumpState *s = vc->opaque;", "static void net_dump_cleanup(VLANClientState *vc)", " DumpState *s = vc->opaque;", " qemu_free(s);" ], "line_no": [ 5, 1, 5, 11 ] }
static void FUNC_0(VLANClientState *VAR_0) { DumpState *s = VAR_0->opaque; close(s->fd); qemu_free(s); }
[ "static void FUNC_0(VLANClientState *VAR_0)\n{", "DumpState *s = VAR_0->opaque;", "close(s->fd);", "qemu_free(s);", "}" ]
[ 1, 1, 0, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ] ]
11,754
int virtio_load(VirtIODevice *vdev, QEMUFile *f, int version_id) { int i, ret; int32_t config_len; uint32_t num; uint32_t features; BusState *qbus = qdev_get_parent_bus(DEVICE(vdev)); VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); VirtioDeviceClass *vdc = VIRTIO_DEVICE_GET_CLASS(vde...
true
qemu
874adf45dbfbae2810423527d777ba37bc5ca974
int virtio_load(VirtIODevice *vdev, QEMUFile *f, int version_id) { int i, ret; int32_t config_len; uint32_t num; uint32_t features; BusState *qbus = qdev_get_parent_bus(DEVICE(vdev)); VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); VirtioDeviceClass *vdc = VIRTIO_DEVICE_GET_CLASS(vde...
{ "code": [ " if (vdev->vq[i].vring.desc) {", " virtio_queue_update_rings(vdev, i);", " } else if (vdev->vq[i].last_avail_idx) {", " return -1;" ], "line_no": [ 143, 147, 149, 157 ] }
int FUNC_0(VirtIODevice *VAR_0, QEMUFile *VAR_1, int VAR_2) { int VAR_3, VAR_4; int32_t config_len; uint32_t num; uint32_t features; BusState *qbus = qdev_get_parent_bus(DEVICE(VAR_0)); VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); VirtioDeviceClass *vdc = VIRTIO_DEVICE_GET_CLASS(V...
[ "int FUNC_0(VirtIODevice *VAR_0, QEMUFile *VAR_1, int VAR_2)\n{", "int VAR_3, VAR_4;", "int32_t config_len;", "uint32_t num;", "uint32_t features;", "BusState *qbus = qdev_get_parent_bus(DEVICE(VAR_0));", "VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);", "VirtioDeviceClass *vdc = VIRTIO_DEVICE_GET_CL...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 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 ], [ 29 ], [ 33 ], [ 35 ], [ 37, 39 ], [ 41 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ], [ 55 ], [...
11,755
static int my_log2(unsigned int i) { unsigned int iLog2 = 0; while ((i >> iLog2) > 1) iLog2++; return iLog2; }
true
FFmpeg
dae7ff04160901a30a35af05f2f149b289c4f0b1
static int my_log2(unsigned int i) { unsigned int iLog2 = 0; while ((i >> iLog2) > 1) iLog2++; return iLog2; }
{ "code": [ "\tiLog2++;" ], "line_no": [ 9 ] }
static int FUNC_0(unsigned int VAR_0) { unsigned int VAR_1 = 0; while ((VAR_0 >> VAR_1) > 1) VAR_1++; return VAR_1; }
[ "static int FUNC_0(unsigned int VAR_0)\n{", "unsigned int VAR_1 = 0;", "while ((VAR_0 >> VAR_1) > 1)\nVAR_1++;", "return VAR_1;", "}" ]
[ 0, 0, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7, 9 ], [ 11 ], [ 13 ] ]
11,756
static void usbredir_iso_packet(void *priv, uint64_t id, struct usb_redir_iso_packet_header *iso_packet, uint8_t *data, int data_len) { USBRedirDevice *dev = priv; uint8_t ep = iso_packet->endpoint; DPRINTF2("iso-in status %d ep %02X len %d id %"PRIu64"\n", iso_packet->status, ...
true
qemu
b2d1fe67d09d2b6c7da647fbcea6ca0148c206d3
static void usbredir_iso_packet(void *priv, uint64_t id, struct usb_redir_iso_packet_header *iso_packet, uint8_t *data, int data_len) { USBRedirDevice *dev = priv; uint8_t ep = iso_packet->endpoint; DPRINTF2("iso-in status %d ep %02X len %d id %"PRIu64"\n", iso_packet->status, ...
{ "code": [ " bufp_alloc(dev, data, data_len, iso_packet->status, ep);" ], "line_no": [ 47 ] }
static void FUNC_0(void *VAR_0, uint64_t VAR_1, struct usb_redir_iso_packet_header *VAR_2, uint8_t *VAR_3, int VAR_4) { USBRedirDevice *dev = VAR_0; uint8_t ep = VAR_2->endpoint; DPRINTF2("iso-in status %d ep %02X len %d VAR_1 %"PRIu64"\n", VAR_2->status, ep, VAR_4, VAR_1); ...
[ "static void FUNC_0(void *VAR_0, uint64_t VAR_1,\nstruct usb_redir_iso_packet_header *VAR_2,\nuint8_t *VAR_3, int VAR_4)\n{", "USBRedirDevice *dev = VAR_0;", "uint8_t ep = VAR_2->endpoint;", "DPRINTF2(\"iso-in status %d ep %02X len %d VAR_1 %\"PRIu64\"\\n\",\nVAR_2->status, ep, VAR_4, VAR_1);", "if (dev->en...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 ]
[ [ 1, 3, 5, 7 ], [ 9 ], [ 11 ], [ 15, 17 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 47 ], [ 49 ] ]
11,757
static int vqa_decode_init(AVCodecContext *avctx) { VqaContext *s = avctx->priv_data; unsigned char *vqa_header; int i, j, codebook_index; s->avctx = avctx; avctx->pix_fmt = PIX_FMT_PAL8; dsputil_init(&s->dsp, avctx); /* make sure the extradata made it */ if (s->avctx->extra...
false
FFmpeg
32c3047cac9294bb56d23c89a40a22409db5cc70
static int vqa_decode_init(AVCodecContext *avctx) { VqaContext *s = avctx->priv_data; unsigned char *vqa_header; int i, j, codebook_index; s->avctx = avctx; avctx->pix_fmt = PIX_FMT_PAL8; dsputil_init(&s->dsp, avctx); if (s->avctx->extradata_size != VQA_HEADER_SIZE) { ...
{ "code": [], "line_no": [] }
static int FUNC_0(AVCodecContext *VAR_0) { VqaContext *s = VAR_0->priv_data; unsigned char *VAR_1; int VAR_2, VAR_3, VAR_4; s->VAR_0 = VAR_0; VAR_0->pix_fmt = PIX_FMT_PAL8; dsputil_init(&s->dsp, VAR_0); if (s->VAR_0->extradata_size != VQA_HEADER_SIZE) { av_log(s->V...
[ "static int FUNC_0(AVCodecContext *VAR_0)\n{", "VqaContext *s = VAR_0->priv_data;", "unsigned char *VAR_1;", "int VAR_2, VAR_3, VAR_4;", "s->VAR_0 = VAR_0;", "VAR_0->pix_fmt = PIX_FMT_PAL8;", "dsputil_init(&s->dsp, VAR_0);", "if (s->VAR_0->extradata_size != VQA_HEADER_SIZE) {", "av_log(s->VAR_0, AV_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15 ], [ 17 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ...
11,758
static void decode_hrd(HEVCContext *s, int common_inf_present, int max_sublayers) { GetBitContext *gb = &s->HEVClc->gb; int nal_params_present = 0, vcl_params_present = 0; int subpic_params_present = 0; int i; if (common_inf_present) { nal_params_present = ge...
false
FFmpeg
ba80b8d29b2adc7fd74324c9bd50cd0be7ab2c21
static void decode_hrd(HEVCContext *s, int common_inf_present, int max_sublayers) { GetBitContext *gb = &s->HEVClc->gb; int nal_params_present = 0, vcl_params_present = 0; int subpic_params_present = 0; int i; if (common_inf_present) { nal_params_present = ge...
{ "code": [], "line_no": [] }
static void FUNC_0(HEVCContext *VAR_0, int VAR_1, int VAR_2) { GetBitContext *gb = &VAR_0->HEVClc->gb; int VAR_3 = 0, VAR_4 = 0; int VAR_5 = 0; int VAR_6; if (VAR_1) { VAR_3 = get_bits1(gb); VAR_4 = get_bits1(gb); if (VAR_3 || VAR_4) { ...
[ "static void FUNC_0(HEVCContext *VAR_0, int VAR_1,\nint VAR_2)\n{", "GetBitContext *gb = &VAR_0->HEVClc->gb;", "int VAR_3 = 0, VAR_4 = 0;", "int VAR_5 = 0;", "int VAR_6;", "if (VAR_1) {", "VAR_3 = get_bits1(gb);", "VAR_4 = get_bits1(gb);", "if (VAR_3 || VAR_4) {", "VAR_5 = get_bits1(gb);", "if (...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 21 ], [ 25 ], [ 27 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 45 ], [ 47 ], [ 51, 53 ...
11,759
static void slavio_serial_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val) { SerialState *ser = opaque; ChannelState *s; uint32_t saddr; int newreg, channel; val &= 0xff; saddr = (addr & 3) >> 1; channel = (addr & SERIAL_MAXADDR) >> 2; s = &ser->chn[channel]; ...
false
qemu
b3ceef24f4fee8d5ed96b8c4a5d3e80c0a651f0b
static void slavio_serial_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val) { SerialState *ser = opaque; ChannelState *s; uint32_t saddr; int newreg, channel; val &= 0xff; saddr = (addr & 3) >> 1; channel = (addr & SERIAL_MAXADDR) >> 2; s = &ser->chn[channel]; ...
{ "code": [], "line_no": [] }
static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint32_t VAR_2) { SerialState *ser = VAR_0; ChannelState *s; uint32_t saddr; int VAR_3, VAR_4; VAR_2 &= 0xff; saddr = (VAR_1 & 3) >> 1; VAR_4 = (VAR_1 & SERIAL_MAXADDR) >> 2; s = &ser->chn[VAR_4]; switch (saddr) { ...
[ "static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint32_t VAR_2)\n{", "SerialState *ser = VAR_0;", "ChannelState *s;", "uint32_t saddr;", "int VAR_3, VAR_4;", "VAR_2 &= 0xff;", "saddr = (VAR_1 & 3) >> 1;", "VAR_4 = (VAR_1 & SERIAL_MAXADDR) >> 2;", "s = &ser->chn[VAR_4];", "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 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25, 27 ], [ 29 ], [ 31 ], [ 33, 35 ], [ 37 ], [ 39 ], [ 41, 43 ], [ 45 ], [...
11,760
mst_fpga_writeb(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size) { mst_irq_state *s = (mst_irq_state *) opaque; value &= 0xffffffff; switch (addr) { case MST_LEDDAT1: s->leddat1 = value; break; case MST_LEDDAT2: s->leddat2 = value; break; case MST_LEDCTRL: s->ledctr...
false
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
mst_fpga_writeb(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size) { mst_irq_state *s = (mst_irq_state *) opaque; value &= 0xffffffff; switch (addr) { case MST_LEDDAT1: s->leddat1 = value; break; case MST_LEDDAT2: s->leddat2 = value; break; case MST_LEDCTRL: s->ledctr...
{ "code": [], "line_no": [] }
FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint64_t VAR_2, unsigned VAR_3) { mst_irq_state *s = (mst_irq_state *) VAR_0; VAR_2 &= 0xffffffff; switch (VAR_1) { case MST_LEDDAT1: s->leddat1 = VAR_2; break; case MST_LEDDAT2: s->leddat2 = VAR_2; break; case MST_LEDCTRL: s->ledctrl = VAR_...
[ "FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint64_t VAR_2,\nunsigned VAR_3)\n{", "mst_irq_state *s = (mst_irq_state *) VAR_0;", "VAR_2 &= 0xffffffff;", "switch (VAR_1) {", "case MST_LEDDAT1:\ns->leddat1 = VAR_2;", "break;", "case MST_LEDDAT2:\ns->leddat2 = VAR_2;", "break;", "case MST_LEDCTRL:\n...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15, 17 ], [ 19 ], [ 21, 23 ], [ 25 ], [ 27, 29 ], [ 31 ], [ 33, 35 ], [ 37 ], [ 39, 41 ], [ 43 ], [ 45, 47 ], [ 49 ], [...
11,761
static int sysctl_oldcvt(void *holdp, size_t holdlen, uint32_t kind) { switch (kind & CTLTYPE) { case CTLTYPE_INT: case CTLTYPE_UINT: *(uint32_t *)holdp = tswap32(*(uint32_t *)holdp); break; #ifdef TARGET_ABI32 case CTLTYPE_LONG: case CTLTYPE_ULONG: *(uint32_t *)hol...
false
qemu
e6a3ee5f7981e7df40aa581ebc245fd0a7d3bed0
static int sysctl_oldcvt(void *holdp, size_t holdlen, uint32_t kind) { switch (kind & CTLTYPE) { case CTLTYPE_INT: case CTLTYPE_UINT: *(uint32_t *)holdp = tswap32(*(uint32_t *)holdp); break; #ifdef TARGET_ABI32 case CTLTYPE_LONG: case CTLTYPE_ULONG: *(uint32_t *)hol...
{ "code": [], "line_no": [] }
static int FUNC_0(void *VAR_0, size_t VAR_1, uint32_t VAR_2) { switch (VAR_2 & CTLTYPE) { case CTLTYPE_INT: case CTLTYPE_UINT: *(uint32_t *)VAR_0 = tswap32(*(uint32_t *)VAR_0); break; #ifdef TARGET_ABI32 case CTLTYPE_LONG: case CTLTYPE_ULONG: *(uint32_t *)VAR_0 = ts...
[ "static int FUNC_0(void *VAR_0, size_t VAR_1, uint32_t VAR_2)\n{", "switch (VAR_2 & CTLTYPE) {", "case CTLTYPE_INT:\ncase CTLTYPE_UINT:\n*(uint32_t *)VAR_0 = tswap32(*(uint32_t *)VAR_0);", "break;", "#ifdef TARGET_ABI32\ncase CTLTYPE_LONG:\ncase CTLTYPE_ULONG:\n*(uint32_t *)VAR_0 = tswap32(*(long *)VAR_0);"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7, 9, 11 ], [ 13 ], [ 15, 17, 19, 21 ], [ 23 ], [ 25, 27, 29 ], [ 31, 33 ], [ 35 ], [ 37, 39, 41, 43, 45, 47, 49 ], [ 51 ], [ 53, 55 ], [...
11,762
static void vma_delete(struct mm_struct *mm) { struct vm_area_struct *vma; while ((vma = vma_first(mm)) != NULL) { TAILQ_REMOVE(&mm->mm_mmap, vma, vma_link); qemu_free(vma); } qemu_free(mm); }
false
qemu
72cf2d4f0e181d0d3a3122e04129c58a95da713e
static void vma_delete(struct mm_struct *mm) { struct vm_area_struct *vma; while ((vma = vma_first(mm)) != NULL) { TAILQ_REMOVE(&mm->mm_mmap, vma, vma_link); qemu_free(vma); } qemu_free(mm); }
{ "code": [], "line_no": [] }
static void FUNC_0(struct mm_struct *VAR_0) { struct vm_area_struct *VAR_1; while ((VAR_1 = vma_first(VAR_0)) != NULL) { TAILQ_REMOVE(&VAR_0->mm_mmap, VAR_1, vma_link); qemu_free(VAR_1); } qemu_free(VAR_0); }
[ "static void FUNC_0(struct mm_struct *VAR_0)\n{", "struct vm_area_struct *VAR_1;", "while ((VAR_1 = vma_first(VAR_0)) != NULL) {", "TAILQ_REMOVE(&VAR_0->mm_mmap, VAR_1, vma_link);", "qemu_free(VAR_1);", "}", "qemu_free(VAR_0);", "}" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ] ]
11,763
void OPPROTO op_addl_ESI_T0(void) { ESI = (uint32_t)(ESI + T0); }
false
qemu
6e0d8677cb443e7408c0b7a25a93c6596d7fa380
void OPPROTO op_addl_ESI_T0(void) { ESI = (uint32_t)(ESI + T0); }
{ "code": [], "line_no": [] }
void VAR_0 op_addl_ESI_T0(void) { ESI = (uint32_t)(ESI + T0); }
[ "void VAR_0 op_addl_ESI_T0(void)\n{", "ESI = (uint32_t)(ESI + T0);", "}" ]
[ 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ] ]
11,764
static int rv10_decode_packet(AVCodecContext *avctx, UINT8 *buf, int buf_size) { MpegEncContext *s = avctx->priv_data; int i, mb_count, mb_pos, left; init_get_bits(&s->gb, buf, buf_size); mb_count = rv10_decode_picture_header(s); if (mb_count < 0) { ...
false
FFmpeg
68f593b48433842f3407586679fe07f3e5199ab9
static int rv10_decode_packet(AVCodecContext *avctx, UINT8 *buf, int buf_size) { MpegEncContext *s = avctx->priv_data; int i, mb_count, mb_pos, left; init_get_bits(&s->gb, buf, buf_size); mb_count = rv10_decode_picture_header(s); if (mb_count < 0) { ...
{ "code": [], "line_no": [] }
static int FUNC_0(AVCodecContext *VAR_0, UINT8 *VAR_1, int VAR_2) { MpegEncContext *s = VAR_0->priv_data; int VAR_3, VAR_4, VAR_5, VAR_6; init_get_bits(&s->gb, VAR_1, VAR_2); VAR_4 = rv10_decode_picture_header(s); if (VAR_4 < 0) { fprintf(stderr,...
[ "static int FUNC_0(AVCodecContext *VAR_0,\nUINT8 *VAR_1, int VAR_2)\n{", "MpegEncContext *s = VAR_0->priv_data;", "int VAR_3, VAR_4, VAR_5, VAR_6;", "init_get_bits(&s->gb, VAR_1, VAR_2);", "VAR_4 = rv10_decode_picture_header(s);", "if (VAR_4 < 0) {", "fprintf(stderr, \"HEADER ERROR\\n\");", "return -1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 13 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 29, 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ...
11,765
static int local_setuid(FsContext *ctx, uid_t uid) { struct passwd *pw; gid_t groups[33]; int ngroups; static uid_t cur_uid = -1; if (cur_uid == uid) { return 0; } if (setreuid(0, 0)) { return -1; } pw = getpwuid(uid); if (pw == NULL) { ...
false
qemu
758e8e38eb582e3dc87fd55a1d234c25108a7b7f
static int local_setuid(FsContext *ctx, uid_t uid) { struct passwd *pw; gid_t groups[33]; int ngroups; static uid_t cur_uid = -1; if (cur_uid == uid) { return 0; } if (setreuid(0, 0)) { return -1; } pw = getpwuid(uid); if (pw == NULL) { ...
{ "code": [], "line_no": [] }
static int FUNC_0(FsContext *VAR_0, uid_t VAR_1) { struct passwd *VAR_2; gid_t groups[33]; int VAR_3; static uid_t VAR_4 = -1; if (VAR_4 == VAR_1) { return 0; } if (setreuid(0, 0)) { return -1; } VAR_2 = getpwuid(VAR_1); if (VAR_2 == NULL) { ...
[ "static int FUNC_0(FsContext *VAR_0, uid_t VAR_1)\n{", "struct passwd *VAR_2;", "gid_t groups[33];", "int VAR_3;", "static uid_t VAR_4 = -1;", "if (VAR_4 == VAR_1) {", "return 0;", "}", "if (setreuid(0, 0)) {", "return -1;", "}", "VAR_2 = getpwuid(VAR_1);", "if (VAR_2 == NULL) {", "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 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 23 ], [ 25 ], [ 27 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 51 ...
11,766
static void ps2_keyboard_event(DeviceState *dev, QemuConsole *src, InputEvent *evt) { PS2KbdState *s = (PS2KbdState *)dev; int scancodes[3], i, count; qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER); count = qemu_input_key_value_to_scancode(evt->key->key, ...
false
qemu
568c73a4783cd981e9aa6de4f15dcda7829643ad
static void ps2_keyboard_event(DeviceState *dev, QemuConsole *src, InputEvent *evt) { PS2KbdState *s = (PS2KbdState *)dev; int scancodes[3], i, count; qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER); count = qemu_input_key_value_to_scancode(evt->key->key, ...
{ "code": [], "line_no": [] }
static void FUNC_0(DeviceState *VAR_0, QemuConsole *VAR_1, InputEvent *VAR_2) { PS2KbdState *s = (PS2KbdState *)VAR_0; int VAR_3[3], VAR_4, VAR_5; qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER); VAR_5 = qemu_input_key_value_to_scancode(VAR_2->key->key, ...
[ "static void FUNC_0(DeviceState *VAR_0, QemuConsole *VAR_1,\nInputEvent *VAR_2)\n{", "PS2KbdState *s = (PS2KbdState *)VAR_0;", "int VAR_3[3], VAR_4, VAR_5;", "qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER);", "VAR_5 = qemu_input_key_value_to_scancode(VAR_2->key->key,\nVAR_2->key->down,\nVAR_3);", "f...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15, 17, 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ] ]
11,767
static int check_refcounts_l2(BlockDriverState *bs, BdrvCheckResult *res, uint16_t *refcount_table, int refcount_table_size, int64_t l2_offset, int check_copied) { BDRVQcowState *s = bs->opaque; uint64_t *l2_table, l2_entry; int i, l2_size, nb_csectors, refcount; /* Read L2 table from d...
false
qemu
801f70445293ec8ed2d78fd92313c2f71fa48ac9
static int check_refcounts_l2(BlockDriverState *bs, BdrvCheckResult *res, uint16_t *refcount_table, int refcount_table_size, int64_t l2_offset, int check_copied) { BDRVQcowState *s = bs->opaque; uint64_t *l2_table, l2_entry; int i, l2_size, nb_csectors, refcount; l2_size = s->l2_s...
{ "code": [], "line_no": [] }
static int FUNC_0(BlockDriverState *VAR_0, BdrvCheckResult *VAR_1, uint16_t *VAR_2, int VAR_3, int64_t VAR_4, int VAR_5) { BDRVQcowState *s = VAR_0->opaque; uint64_t *l2_table, l2_entry; int VAR_6, VAR_7, VAR_8, VAR_9; VAR_7 = s->VAR_7 * sizeof(uint64_t); l2_table = g_malloc(...
[ "static int FUNC_0(BlockDriverState *VAR_0, BdrvCheckResult *VAR_1,\nuint16_t *VAR_2, int VAR_3, int64_t VAR_4,\nint VAR_5)\n{", "BDRVQcowState *s = VAR_0->opaque;", "uint64_t *l2_table, l2_entry;", "int VAR_6, VAR_7, VAR_8, VAR_9;", "VAR_7 = s->VAR_7 * sizeof(uint64_t);", "l2_table = g_malloc(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 ]
[ [ 1, 3, 5, 7 ], [ 9 ], [ 11 ], [ 13 ], [ 19 ], [ 21 ], [ 25, 27 ], [ 33 ], [ 35 ], [ 39 ], [ 41, 45 ], [ 47, 49, 51 ], [ 53 ], [ 55 ], [ 57 ], [ 63, 65 ], [...
11,768
uint32_t qemu_devtree_alloc_phandle(void *fdt) { static int phandle = 0x8000; return phandle++; }
false
qemu
4b1b1c896fb38d435f3d350c44b1bdc8b56600a4
uint32_t qemu_devtree_alloc_phandle(void *fdt) { static int phandle = 0x8000; return phandle++; }
{ "code": [], "line_no": [] }
uint32_t FUNC_0(void *fdt) { static int VAR_0 = 0x8000; return VAR_0++; }
[ "uint32_t FUNC_0(void *fdt)\n{", "static int VAR_0 = 0x8000;", "return VAR_0++;", "}" ]
[ 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ] ]
11,769
int event_notifier_init(EventNotifier *e, int active) { #ifdef CONFIG_EVENTFD int fd = eventfd(!!active, EFD_NONBLOCK | EFD_CLOEXEC); if (fd < 0) return -errno; e->fd = fd; return 0; #else return -ENOSYS; #endif }
false
qemu
d0cc2fbfa607678866475383c508be84818ceb64
int event_notifier_init(EventNotifier *e, int active) { #ifdef CONFIG_EVENTFD int fd = eventfd(!!active, EFD_NONBLOCK | EFD_CLOEXEC); if (fd < 0) return -errno; e->fd = fd; return 0; #else return -ENOSYS; #endif }
{ "code": [], "line_no": [] }
int FUNC_0(EventNotifier *VAR_0, int VAR_1) { #ifdef CONFIG_EVENTFD int fd = eventfd(!!VAR_1, EFD_NONBLOCK | EFD_CLOEXEC); if (fd < 0) return -errno; VAR_0->fd = fd; return 0; #else return -ENOSYS; #endif }
[ "int FUNC_0(EventNotifier *VAR_0, int VAR_1)\n{", "#ifdef CONFIG_EVENTFD\nint fd = eventfd(!!VAR_1, EFD_NONBLOCK | EFD_CLOEXEC);", "if (fd < 0)\nreturn -errno;", "VAR_0->fd = fd;", "return 0;", "#else\nreturn -ENOSYS;", "#endif\n}" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5, 7 ], [ 9, 11 ], [ 13 ], [ 15 ], [ 17, 19 ], [ 21, 23 ] ]
11,770
static ssize_t qio_channel_socket_readv(QIOChannel *ioc, const struct iovec *iov, size_t niov, int **fds, size_t *nfds, ...
false
qemu
30fd3e27907dfd1c0c66cc1339657af1a2ce1d4b
static ssize_t qio_channel_socket_readv(QIOChannel *ioc, const struct iovec *iov, size_t niov, int **fds, size_t *nfds, ...
{ "code": [], "line_no": [] }
static ssize_t FUNC_0(QIOChannel *ioc, const struct iovec *iov, size_t niov, int **fds, size_t *nfds, Error **errp)...
[ "static ssize_t FUNC_0(QIOChannel *ioc,\nconst struct iovec *iov,\nsize_t niov,\nint **fds,\nsize_t *nfds,\nError **errp)\n{", "QIOChannelSocket *sioc = QIO_CHANNEL_SOCKET(ioc);", "ssize_t ret;", "struct msghdr VAR_0 = { NULL, };", "char VAR_1[CMSG_SPACE(sizeof(int) * SOCKET_MAX_FDS)];", "int VAR_2 = 0;",...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7, 9, 11, 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 27 ], [ 31, 33 ], [ 35, 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 53, 55 ], [ 57 ...
11,771
float32 float32_sqrt( float32 a STATUS_PARAM ) { flag aSign; int16 aExp, zExp; bits32 aSig, zSig; bits64 rem, term; aSig = extractFloat32Frac( a ); aExp = extractFloat32Exp( a ); aSign = extractFloat32Sign( a ); if ( aExp == 0xFF ) { if ( aSig ) return propagateFloat3...
false
qemu
f090c9d4ad5812fb92843d6470a1111c15190c4c
float32 float32_sqrt( float32 a STATUS_PARAM ) { flag aSign; int16 aExp, zExp; bits32 aSig, zSig; bits64 rem, term; aSig = extractFloat32Frac( a ); aExp = extractFloat32Exp( a ); aSign = extractFloat32Sign( a ); if ( aExp == 0xFF ) { if ( aSig ) return propagateFloat3...
{ "code": [], "line_no": [] }
float32 FUNC_0( float32 a STATUS_PARAM ) { flag aSign; int16 aExp, zExp; bits32 aSig, zSig; bits64 rem, term; aSig = extractFloat32Frac( a ); aExp = extractFloat32Exp( a ); aSign = extractFloat32Sign( a ); if ( aExp == 0xFF ) { if ( aSig ) return propagateFloat32NaN( ...
[ "float32 FUNC_0( float32 a STATUS_PARAM )\n{", "flag aSign;", "int16 aExp, zExp;", "bits32 aSig, zSig;", "bits64 rem, term;", "aSig = extractFloat32Frac( a );", "aExp = extractFloat32Exp( a );", "aSign = extractFloat32Sign( a );", "if ( aExp == 0xFF ) {", "if ( aSig ) return propagateFloat32NaN( a...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ...
11,772
static void xhci_port_update(XHCIPort *port, int is_detach) { port->portsc = PORTSC_PP; if (port->uport->dev && port->uport->dev->attached && !is_detach && (1 << port->uport->dev->speed) & port->speedmask) { port->portsc |= PORTSC_CCS; switch (port->uport->dev->speed) { ca...
false
qemu
6a32f80f056b577d275268e4f6f3477ba721c94f
static void xhci_port_update(XHCIPort *port, int is_detach) { port->portsc = PORTSC_PP; if (port->uport->dev && port->uport->dev->attached && !is_detach && (1 << port->uport->dev->speed) & port->speedmask) { port->portsc |= PORTSC_CCS; switch (port->uport->dev->speed) { ca...
{ "code": [], "line_no": [] }
static void FUNC_0(XHCIPort *VAR_0, int VAR_1) { VAR_0->portsc = PORTSC_PP; if (VAR_0->uport->dev && VAR_0->uport->dev->attached && !VAR_1 && (1 << VAR_0->uport->dev->speed) & VAR_0->speedmask) { VAR_0->portsc |= PORTSC_CCS; switch (VAR_0->uport->dev->speed) { case USB_SPE...
[ "static void FUNC_0(XHCIPort *VAR_0, int VAR_1)\n{", "VAR_0->portsc = PORTSC_PP;", "if (VAR_0->uport->dev && VAR_0->uport->dev->attached && !VAR_1 &&\n(1 << VAR_0->uport->dev->speed) & VAR_0->speedmask) {", "VAR_0->portsc |= PORTSC_CCS;", "switch (VAR_0->uport->dev->speed) {", "case USB_SPEED_LOW:\nVAR_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 ], [ 45 ], [ 47 ], [...
11,773
static void ide_atapi_cmd_ok(IDEState *s) { s->error = 0; s->status = READY_STAT; s->nsector = (s->nsector & ~7) | ATAPI_INT_REASON_IO | ATAPI_INT_REASON_CD; ide_set_irq(s); }
false
qemu
41a2b9596c9ed2a827e16e749632752dd2686647
static void ide_atapi_cmd_ok(IDEState *s) { s->error = 0; s->status = READY_STAT; s->nsector = (s->nsector & ~7) | ATAPI_INT_REASON_IO | ATAPI_INT_REASON_CD; ide_set_irq(s); }
{ "code": [], "line_no": [] }
static void FUNC_0(IDEState *VAR_0) { VAR_0->error = 0; VAR_0->status = READY_STAT; VAR_0->nsector = (VAR_0->nsector & ~7) | ATAPI_INT_REASON_IO | ATAPI_INT_REASON_CD; ide_set_irq(VAR_0); }
[ "static void FUNC_0(IDEState *VAR_0)\n{", "VAR_0->error = 0;", "VAR_0->status = READY_STAT;", "VAR_0->nsector = (VAR_0->nsector & ~7) | ATAPI_INT_REASON_IO | ATAPI_INT_REASON_CD;", "ide_set_irq(VAR_0);", "}" ]
[ 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ] ]
11,774
static void notdirty_mem_write(void *opaque, hwaddr ram_addr, uint64_t val, unsigned size) { if (!cpu_physical_memory_get_dirty_flag(ram_addr, DIRTY_MEMORY_CODE)) { tb_invalidate_phys_page_fast(ram_addr, size); } switch (size) { case 1: stb_p(qemu_g...
false
qemu
6886867e9880830d735d8ae6f6cc63ed9eb2be0c
static void notdirty_mem_write(void *opaque, hwaddr ram_addr, uint64_t val, unsigned size) { if (!cpu_physical_memory_get_dirty_flag(ram_addr, DIRTY_MEMORY_CODE)) { tb_invalidate_phys_page_fast(ram_addr, size); } switch (size) { case 1: stb_p(qemu_g...
{ "code": [], "line_no": [] }
static void FUNC_0(void *VAR_0, hwaddr VAR_1, uint64_t VAR_2, unsigned VAR_3) { if (!cpu_physical_memory_get_dirty_flag(VAR_1, DIRTY_MEMORY_CODE)) { tb_invalidate_phys_page_fast(VAR_1, VAR_3); } switch (VAR_3) { case 1: stb_p(qemu_get_ram_ptr(VAR_1)...
[ "static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{", "if (!cpu_physical_memory_get_dirty_flag(VAR_1, DIRTY_MEMORY_CODE)) {", "tb_invalidate_phys_page_fast(VAR_1, VAR_3);", "}", "switch (VAR_3) {", "case 1:\nstb_p(qemu_get_ram_ptr(VAR_1), VAR_2);", "break;", "case 2:\nst...
[ 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 ], [ 47 ], [ 49 ], [...
11,775
void ff_put_h264_qpel16_mc13_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_hv_qrt_16w_msa(src + stride - 2, src - (stride * 2), stride, dst, stride, 16); }
false
FFmpeg
2aab7c2dfaca4386c38e5d565cd2bf73096bcc86
void ff_put_h264_qpel16_mc13_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_hv_qrt_16w_msa(src + stride - 2, src - (stride * 2), stride, dst, stride, 16); }
{ "code": [], "line_no": [] }
void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1, ptrdiff_t VAR_2) { avc_luma_hv_qrt_16w_msa(VAR_1 + VAR_2 - 2, VAR_1 - (VAR_2 * 2), VAR_2, VAR_0, VAR_2, 16); }
[ "void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1,\nptrdiff_t VAR_2)\n{", "avc_luma_hv_qrt_16w_msa(VAR_1 + VAR_2 - 2,\nVAR_1 - (VAR_2 * 2), VAR_2, VAR_0, VAR_2, 16);", "}" ]
[ 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7, 9 ], [ 11 ] ]
11,776
static void tight_palette_rgb2buf(uint32_t rgb, int bpp, uint8_t buf[6]) { memset(buf, 0, 6); if (bpp == 32) { buf[0] = ((rgb >> 24) & 0xFF); buf[1] = ((rgb >> 16) & 0xFF); buf[2] = ((rgb >> 8) & 0xFF); buf[3] = ((rgb >> 0) & 0xFF); buf[4] = ((buf[0] & 1) == 0...
false
qemu
245f7b51c0ea04fb2224b1127430a096c91aee70
static void tight_palette_rgb2buf(uint32_t rgb, int bpp, uint8_t buf[6]) { memset(buf, 0, 6); if (bpp == 32) { buf[0] = ((rgb >> 24) & 0xFF); buf[1] = ((rgb >> 16) & 0xFF); buf[2] = ((rgb >> 8) & 0xFF); buf[3] = ((rgb >> 0) & 0xFF); buf[4] = ((buf[0] & 1) == 0...
{ "code": [], "line_no": [] }
static void FUNC_0(uint32_t VAR_0, int VAR_1, uint8_t VAR_2[6]) { memset(VAR_2, 0, 6); if (VAR_1 == 32) { VAR_2[0] = ((VAR_0 >> 24) & 0xFF); VAR_2[1] = ((VAR_0 >> 16) & 0xFF); VAR_2[2] = ((VAR_0 >> 8) & 0xFF); VAR_2[3] = ((VAR_0 >> 0) & 0xFF); VAR_2[4] = ((VAR...
[ "static void FUNC_0(uint32_t VAR_0, int VAR_1, uint8_t VAR_2[6])\n{", "memset(VAR_2, 0, 6);", "if (VAR_1 == 32) {", "VAR_2[0] = ((VAR_0 >> 24) & 0xFF);", "VAR_2[1] = ((VAR_0 >> 16) & 0xFF);", "VAR_2[2] = ((VAR_0 >> 8) & 0xFF);", "VAR_2[3] = ((VAR_0 >> 0) & 0xFF);", "VAR_2[4] = ((VAR_2[0] & 1) == 0) ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43...
11,777
void vmexit(uint64_t exit_code, uint64_t exit_info_1) { uint32_t int_ctl; if (loglevel & CPU_LOG_TB_IN_ASM) fprintf(logfile,"vmexit(%016" PRIx64 ", %016" PRIx64 ", %016" PRIx64 ", " TARGET_FMT_lx ")!\n", exit_code, exit_info_1, ldq_phys(env->vm_vmcb + offsetof(str...
false
qemu
3d575329a53ad3b72b07cea0d8f97ccc000df6ff
void vmexit(uint64_t exit_code, uint64_t exit_info_1) { uint32_t int_ctl; if (loglevel & CPU_LOG_TB_IN_ASM) fprintf(logfile,"vmexit(%016" PRIx64 ", %016" PRIx64 ", %016" PRIx64 ", " TARGET_FMT_lx ")!\n", exit_code, exit_info_1, ldq_phys(env->vm_vmcb + offsetof(str...
{ "code": [], "line_no": [] }
void FUNC_0(uint64_t VAR_0, uint64_t VAR_1) { uint32_t int_ctl; if (loglevel & CPU_LOG_TB_IN_ASM) fprintf(logfile,"FUNC_0(%016" PRIx64 ", %016" PRIx64 ", %016" PRIx64 ", " TARGET_FMT_lx ")!\n", VAR_0, VAR_1, ldq_phys(env->vm_vmcb + offsetof(struct vmcb, control.ex...
[ "void FUNC_0(uint64_t VAR_0, uint64_t VAR_1)\n{", "uint32_t int_ctl;", "if (loglevel & CPU_LOG_TB_IN_ASM)\nfprintf(logfile,\"FUNC_0(%016\" PRIx64 \", %016\" PRIx64 \", %016\" PRIx64 \", \" TARGET_FMT_lx \")!\\n\",\nVAR_0, VAR_1,\nldq_phys(env->vm_vmcb + offsetof(struct vmcb, control.exit_info_2)),\nEIP);", "i...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 47 ], [ 49 ], [ 53 ], [ 55 ], [ 59...
11,778
static void slirp_smb_cleanup(SlirpState *s) { char cmd[128]; int ret; if (s->smb_dir[0] != '\0') { snprintf(cmd, sizeof(cmd), "rm -rf %s", s->smb_dir); ret = system(cmd); if (!WIFEXITED(ret)) { qemu_error("'%s' failed.\n", cmd); } else if (WEXITSTATUS(...
false
qemu
24ac07dec7f23c58dc48aa7754f872781b386d46
static void slirp_smb_cleanup(SlirpState *s) { char cmd[128]; int ret; if (s->smb_dir[0] != '\0') { snprintf(cmd, sizeof(cmd), "rm -rf %s", s->smb_dir); ret = system(cmd); if (!WIFEXITED(ret)) { qemu_error("'%s' failed.\n", cmd); } else if (WEXITSTATUS(...
{ "code": [], "line_no": [] }
static void FUNC_0(SlirpState *VAR_0) { char VAR_1[128]; int VAR_2; if (VAR_0->smb_dir[0] != '\0') { snprintf(VAR_1, sizeof(VAR_1), "rm -rf %VAR_0", VAR_0->smb_dir); VAR_2 = system(VAR_1); if (!WIFEXITED(VAR_2)) { qemu_error("'%VAR_0' failed.\n", VAR_1); ...
[ "static void FUNC_0(SlirpState *VAR_0)\n{", "char VAR_1[128];", "int VAR_2;", "if (VAR_0->smb_dir[0] != '\\0') {", "snprintf(VAR_1, sizeof(VAR_1), \"rm -rf %VAR_0\", VAR_0->smb_dir);", "VAR_2 = system(VAR_1);", "if (!WIFEXITED(VAR_2)) {", "qemu_error(\"'%VAR_0' failed.\\n\", VAR_1);", "} else if (WE...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23, 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ] ]
11,779
static uint8_t read_u8(uint8_t *data, size_t offset) { return data[offset]; }
false
qemu
5fb6c7a8b26eab1a22207d24b4784bd2b39ab54b
static uint8_t read_u8(uint8_t *data, size_t offset) { return data[offset]; }
{ "code": [], "line_no": [] }
static uint8_t FUNC_0(uint8_t *data, size_t offset) { return data[offset]; }
[ "static uint8_t FUNC_0(uint8_t *data, size_t offset)\n{", "return data[offset];", "}" ]
[ 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ] ]
11,780
static ssize_t local_lgetxattr(FsContext *ctx, const char *path, const char *name, void *value, size_t size) { if ((ctx->fs_sm == SM_MAPPED) && (strncmp(name, "user.virtfs.", 12) == 0)) { /* * Don't allow fetch of user.virtfs namesapce * in cas...
false
qemu
fc22118d9bb56ec71655b936a29513c140e6c289
static ssize_t local_lgetxattr(FsContext *ctx, const char *path, const char *name, void *value, size_t size) { if ((ctx->fs_sm == SM_MAPPED) && (strncmp(name, "user.virtfs.", 12) == 0)) { errno = ENOATTR; return -1; } return lg...
{ "code": [], "line_no": [] }
static ssize_t FUNC_0(FsContext *ctx, const char *path, const char *name, void *value, size_t size) { if ((ctx->fs_sm == SM_MAPPED) && (strncmp(name, "user.virtfs.", 12) == 0)) { errno = ENOATTR; return -1; } return lgetxattr(r...
[ "static ssize_t FUNC_0(FsContext *ctx, const char *path,\nconst char *name, void *value, size_t size)\n{", "if ((ctx->fs_sm == SM_MAPPED) &&\n(strncmp(name, \"user.virtfs.\", 12) == 0)) {", "errno = ENOATTR;", "return -1;", "}", "return lgetxattr(rpath(ctx, path), name, value, size);", "}" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7, 9 ], [ 19 ], [ 21 ], [ 23 ], [ 27 ], [ 29 ] ]
11,782
static int rtc_start_timer(struct qemu_alarm_timer *t) { int rtc_fd; unsigned long current_rtc_freq = 0; TFR(rtc_fd = open("/dev/rtc", O_RDONLY)); if (rtc_fd < 0) return -1; ioctl(rtc_fd, RTC_IRQP_READ, &current_rtc_freq); if (current_rtc_freq != RTC_FREQ && ioctl(rtc_...
true
qemu
40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4
static int rtc_start_timer(struct qemu_alarm_timer *t) { int rtc_fd; unsigned long current_rtc_freq = 0; TFR(rtc_fd = open("/dev/rtc", O_RDONLY)); if (rtc_fd < 0) return -1; ioctl(rtc_fd, RTC_IRQP_READ, &current_rtc_freq); if (current_rtc_freq != RTC_FREQ && ioctl(rtc_...
{ "code": [ " TFR(rtc_fd = open(\"/dev/rtc\", O_RDONLY));" ], "line_no": [ 11 ] }
static int FUNC_0(struct qemu_alarm_timer *VAR_0) { int VAR_1; unsigned long VAR_2 = 0; TFR(VAR_1 = open("/dev/rtc", O_RDONLY)); if (VAR_1 < 0) return -1; ioctl(VAR_1, RTC_IRQP_READ, &VAR_2); if (VAR_2 != RTC_FREQ && ioctl(VAR_1, RTC_IRQP_SET, RTC_FREQ) < 0) { ...
[ "static int FUNC_0(struct qemu_alarm_timer *VAR_0)\n{", "int VAR_1;", "unsigned long VAR_2 = 0;", "TFR(VAR_1 = open(\"/dev/rtc\", O_RDONLY));", "if (VAR_1 < 0)\nreturn -1;", "ioctl(VAR_1, RTC_IRQP_READ, &VAR_2);", "if (VAR_2 != RTC_FREQ &&\nioctl(VAR_1, RTC_IRQP_SET, RTC_FREQ) < 0) {", "fprintf(stderr...
[ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13, 15 ], [ 17 ], [ 19, 21 ], [ 23, 25, 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35, 37 ], [ 39 ], [ 41 ], [ 45 ], [ 49 ], [ 53 ], ...
11,783
static void h261_encode_motion(H261Context * h, int val){ MpegEncContext * const s = &h->s; int sign, code; if(val==0){ code = 0; put_bits(&s->pb,h261_mv_tab[code][1],h261_mv_tab[code][0]); } else{ if(val > 16) val -=32; if(val < -16) ...
false
FFmpeg
ccff9da62a833238db7a22eb39be0814f522c2c5
static void h261_encode_motion(H261Context * h, int val){ MpegEncContext * const s = &h->s; int sign, code; if(val==0){ code = 0; put_bits(&s->pb,h261_mv_tab[code][1],h261_mv_tab[code][0]); } else{ if(val > 16) val -=32; if(val < -16) ...
{ "code": [], "line_no": [] }
static void FUNC_0(H261Context * VAR_0, int VAR_1){ MpegEncContext * const s = &VAR_0->s; int VAR_2, VAR_3; if(VAR_1==0){ VAR_3 = 0; put_bits(&s->pb,h261_mv_tab[VAR_3][1],h261_mv_tab[VAR_3][0]); } else{ if(VAR_1 > 16) VAR_1 -=32; if(VAR_1 < -16)...
[ "static void FUNC_0(H261Context * VAR_0, int VAR_1){", "MpegEncContext * const s = &VAR_0->s;", "int VAR_2, VAR_3;", "if(VAR_1==0){", "VAR_3 = 0;", "put_bits(&s->pb,h261_mv_tab[VAR_3][1],h261_mv_tab[VAR_3][0]);", "}", "else{", "if(VAR_1 > 16)\nVAR_1 -=32;", "if(VAR_1 < -16)\nVAR_1+=32;", "VAR_2 ...
[ 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 ] ]
11,784
static inline int parse_command_line(AVFormatContext *s, const char *line, int linelen, char *uri, int urisize, char *method, int methodsize, enum RTSPMethod *methodcode) { RTSPState *rt = s->priv_data; ...
true
FFmpeg
c27328e749ff3be648411765cd17362fee017341
static inline int parse_command_line(AVFormatContext *s, const char *line, int linelen, char *uri, int urisize, char *method, int methodsize, enum RTSPMethod *methodcode) { RTSPState *rt = s->priv_data; ...
{ "code": [], "line_no": [] }
static inline int FUNC_0(AVFormatContext *VAR_0, const char *VAR_1, int VAR_2, char *VAR_3, int VAR_4, char *VAR_5, int VAR_6, enum RTSPMethod *VAR_7) { RTSPState *rt = VAR_0->priv_data; const char *VA...
[ "static inline int FUNC_0(AVFormatContext *VAR_0, const char *VAR_1,\nint VAR_2, char *VAR_3, int VAR_4,\nchar *VAR_5, int VAR_6,\nenum RTSPMethod *VAR_7)\n{", "RTSPState *rt = VAR_0->priv_data;", "const char *VAR_8, *VAR_9;", "VAR_8 = strchr(VAR_1, ' ');", "if (VAR_8 - VAR_1 > VAR_6 - 1) {", "av_log(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, 2, 3, 4, 5 ], [ 6 ], [ 7 ], [ 8 ], [ 9 ], [ 10 ], [ 11 ], [ 12 ], [ 13 ], [ 14 ], [ 15 ], [ 16, 17 ], [ 18, 19 ], [ 20, 21 ], [ 22, 23 ], [ 24, 25 ],...
11,785
void ppc40x_core_reset (CPUState *env) { target_ulong dbsr; printf("Reset PowerPC core\n"); cpu_ppc_reset(env); dbsr = env->spr[SPR_40x_DBSR]; dbsr &= ~0x00000300; dbsr |= 0x00000100; env->spr[SPR_40x_DBSR] = dbsr; cpu_loop_exit(); }
true
qemu
ef397e88e96d4a798bd190bcd0c43865c3725ae2
void ppc40x_core_reset (CPUState *env) { target_ulong dbsr; printf("Reset PowerPC core\n"); cpu_ppc_reset(env); dbsr = env->spr[SPR_40x_DBSR]; dbsr &= ~0x00000300; dbsr |= 0x00000100; env->spr[SPR_40x_DBSR] = dbsr; cpu_loop_exit(); }
{ "code": [ " cpu_loop_exit();", " cpu_loop_exit();" ], "line_no": [ 21, 21 ] }
void FUNC_0 (CPUState *VAR_0) { target_ulong dbsr; printf("Reset PowerPC core\n"); cpu_ppc_reset(VAR_0); dbsr = VAR_0->spr[SPR_40x_DBSR]; dbsr &= ~0x00000300; dbsr |= 0x00000100; VAR_0->spr[SPR_40x_DBSR] = dbsr; cpu_loop_exit(); }
[ "void FUNC_0 (CPUState *VAR_0)\n{", "target_ulong dbsr;", "printf(\"Reset PowerPC core\\n\");", "cpu_ppc_reset(VAR_0);", "dbsr = VAR_0->spr[SPR_40x_DBSR];", "dbsr &= ~0x00000300;", "dbsr |= 0x00000100;", "VAR_0->spr[SPR_40x_DBSR] = dbsr;", "cpu_loop_exit();", "}" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ] ]
11,786
void visit_type_any(Visitor *v, const char *name, QObject **obj, Error **errp) { v->type_any(v, name, obj, errp); }
true
qemu
e58d695e6c3a5cfa0aa2fc91b87ade017ef28b05
void visit_type_any(Visitor *v, const char *name, QObject **obj, Error **errp) { v->type_any(v, name, obj, errp); }
{ "code": [ " v->type_any(v, name, obj, errp);" ], "line_no": [ 5 ] }
void FUNC_0(Visitor *VAR_0, const char *VAR_1, QObject **VAR_2, Error **VAR_3) { VAR_0->type_any(VAR_0, VAR_1, VAR_2, VAR_3); }
[ "void FUNC_0(Visitor *VAR_0, const char *VAR_1, QObject **VAR_2, Error **VAR_3)\n{", "VAR_0->type_any(VAR_0, VAR_1, VAR_2, VAR_3);", "}" ]
[ 0, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ] ]
11,787
void error_vprepend(Error **errp, const char *fmt, va_list ap) { GString *newmsg; if (!errp) { return; } newmsg = g_string_new(NULL); g_string_vprintf(newmsg, fmt, ap); g_string_append(newmsg, (*errp)->msg); (*errp)->msg = g_string_free(newmsg, 0); }
true
qemu
536eeea86905237953a7c05c2fa2a3d1f3cba328
void error_vprepend(Error **errp, const char *fmt, va_list ap) { GString *newmsg; if (!errp) { return; } newmsg = g_string_new(NULL); g_string_vprintf(newmsg, fmt, ap); g_string_append(newmsg, (*errp)->msg); (*errp)->msg = g_string_free(newmsg, 0); }
{ "code": [], "line_no": [] }
void FUNC_0(Error **VAR_0, const char *VAR_1, va_list VAR_2) { GString *newmsg; if (!VAR_0) { return; } newmsg = g_string_new(NULL); g_string_vprintf(newmsg, VAR_1, VAR_2); g_string_append(newmsg, (*VAR_0)->msg); (*VAR_0)->msg = g_string_free(newmsg, 0); }
[ "void FUNC_0(Error **VAR_0, const char *VAR_1, va_list VAR_2)\n{", "GString *newmsg;", "if (!VAR_0) {", "return;", "}", "newmsg = g_string_new(NULL);", "g_string_vprintf(newmsg, VAR_1, VAR_2);", "g_string_append(newmsg, (*VAR_0)->msg);", "(*VAR_0)->msg = g_string_free(newmsg, 0);", "}" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 21 ], [ 24 ], [ 26 ] ]
11,788
static void autocorrelate(const float x[40][2], float phi[3][2][2], int lag) { int i; float real_sum = 0.0f; float imag_sum = 0.0f; if (lag) { for (i = 1; i < 38; i++) { real_sum += x[i][0] * x[i+lag][0] + x[i][1] * x[i+lag][1]; imag_sum += x[i][0] * x[i+lag][1] -...
false
FFmpeg
aac46e088d67a390489af686b846dea4987d8ffb
static void autocorrelate(const float x[40][2], float phi[3][2][2], int lag) { int i; float real_sum = 0.0f; float imag_sum = 0.0f; if (lag) { for (i = 1; i < 38; i++) { real_sum += x[i][0] * x[i+lag][0] + x[i][1] * x[i+lag][1]; imag_sum += x[i][0] * x[i+lag][1] -...
{ "code": [], "line_no": [] }
static void FUNC_0(const float VAR_0[40][2], float VAR_1[3][2][2], int VAR_2) { int VAR_3; float VAR_4 = 0.0f; float VAR_5 = 0.0f; if (VAR_2) { for (VAR_3 = 1; VAR_3 < 38; VAR_3++) { VAR_4 += VAR_0[VAR_3][0] * VAR_0[VAR_3+VAR_2][0] + VAR_0[VAR_3][1] * VAR_0[VAR_3+VAR_2][1]; ...
[ "static void FUNC_0(const float VAR_0[40][2], float VAR_1[3][2][2], int VAR_2)\n{", "int VAR_3;", "float VAR_4 = 0.0f;", "float VAR_5 = 0.0f;", "if (VAR_2) {", "for (VAR_3 = 1; VAR_3 < 38; VAR_3++) {", "VAR_4 += VAR_0[VAR_3][0] * VAR_0[VAR_3+VAR_2][0] + VAR_0[VAR_3][1] * VAR_0[VAR_3+VAR_2][1];", "VAR_...
[ 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 ...
11,789
void ff_put_h264_qpel4_mc11_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_hv_qrt_4w_msa(src - 2, src - (stride * 2), stride, dst, stride, 4); }
false
FFmpeg
2aab7c2dfaca4386c38e5d565cd2bf73096bcc86
void ff_put_h264_qpel4_mc11_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_hv_qrt_4w_msa(src - 2, src - (stride * 2), stride, dst, stride, 4); }
{ "code": [], "line_no": [] }
void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1, ptrdiff_t VAR_2) { avc_luma_hv_qrt_4w_msa(VAR_1 - 2, VAR_1 - (VAR_2 * 2), VAR_2, VAR_0, VAR_2, 4); }
[ "void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1,\nptrdiff_t VAR_2)\n{", "avc_luma_hv_qrt_4w_msa(VAR_1 - 2, VAR_1 - (VAR_2 * 2), VAR_2, VAR_0, VAR_2, 4);", "}" ]
[ 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ] ]
11,790
static void lowpass_line_complex_c(uint8_t *dstp, ptrdiff_t linesize, const uint8_t *srcp, ptrdiff_t mref, ptrdiff_t pref) { const uint8_t *srcp_above = srcp + mref; const uint8_t *srcp_below = srcp + pref; const uint8_t *srcp_above...
false
FFmpeg
a7f6bfdc185a04a703bedd712ee306435372af12
static void lowpass_line_complex_c(uint8_t *dstp, ptrdiff_t linesize, const uint8_t *srcp, ptrdiff_t mref, ptrdiff_t pref) { const uint8_t *srcp_above = srcp + mref; const uint8_t *srcp_below = srcp + pref; const uint8_t *srcp_above...
{ "code": [], "line_no": [] }
static void FUNC_0(uint8_t *VAR_0, ptrdiff_t VAR_1, const uint8_t *VAR_2, ptrdiff_t VAR_3, ptrdiff_t VAR_4) { const uint8_t *VAR_5 = VAR_2 + VAR_3; const uint8_t *VAR_6 = VAR_2 + VAR_4; const uint8_t *VAR_7 = VAR_2 + VAR_3 * 2; ...
[ "static void FUNC_0(uint8_t *VAR_0, ptrdiff_t VAR_1,\nconst uint8_t *VAR_2,\nptrdiff_t VAR_3, ptrdiff_t VAR_4)\n{", "const uint8_t *VAR_5 = VAR_2 + VAR_3;", "const uint8_t *VAR_6 = VAR_2 + VAR_4;", "const uint8_t *VAR_7 = VAR_2 + VAR_3 * 2;", "const uint8_t *VAR_8 = VAR_2 + VAR_4 * 2;", "int VAR_9;", "f...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 27, 29, 31 ], [ 33 ], [ 35 ] ]
11,791
static void avc_luma_midv_qrt_and_aver_dst_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, ...
false
FFmpeg
662234a9a22f1cd0f0ac83b8bb1ffadedca90c0a
static void avc_luma_midv_qrt_and_aver_dst_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, ...
{ "code": [], "line_no": [] }
static void FUNC_0(const uint8_t *VAR_0, int32_t VAR_1, uint8_t *VAR_2, int32_t VAR_3, int32_t VAR_4, ...
[ "static void FUNC_0(const uint8_t *VAR_0,\nint32_t VAR_1,\nuint8_t *VAR_2,\nint32_t VAR_3,\nint32_t VAR_4,\nuint8_t VAR_5)\n{", "int32_t loop_cnt;", "int32_t out0, out1;", "v16i8 src0, src1, src2, src3, src4;", "v16u8 dst0, dst1;", "v16i8 mask0, mask1, mask2;", "v8i16 hz_out0, hz_out1, hz_out2, hz_out3;...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7, 9, 11, 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 35 ], [ 37 ], [ 39 ], [ 43 ], [ 47, 49 ], [ 51, 53 ], [...
11,792
static int vc1t_read_header(AVFormatContext *s, AVFormatParameters *ap) { ByteIOContext *pb = s->pb; AVStream *st; int fps, frames; frames = get_le24(pb); if(get_byte(pb) != 0xC5 || get_le32(pb) != 4) return -1; /* init video codec */ st = av_...
false
FFmpeg
05db409c280acc22362c2e79ea67abe3873043a5
static int vc1t_read_header(AVFormatContext *s, AVFormatParameters *ap) { ByteIOContext *pb = s->pb; AVStream *st; int fps, frames; frames = get_le24(pb); if(get_byte(pb) != 0xC5 || get_le32(pb) != 4) return -1; st = av_new_stream(s, 0); ...
{ "code": [], "line_no": [] }
static int FUNC_0(AVFormatContext *VAR_0, AVFormatParameters *VAR_1) { ByteIOContext *pb = VAR_0->pb; AVStream *st; int VAR_2, VAR_3; VAR_3 = get_le24(pb); if(get_byte(pb) != 0xC5 || get_le32(pb) != 4) return -1; st = av_new_stream(VAR_0, 0);...
[ "static int FUNC_0(AVFormatContext *VAR_0,\nAVFormatParameters *VAR_1)\n{", "ByteIOContext *pb = VAR_0->pb;", "AVStream *st;", "int VAR_2, VAR_3;", "VAR_3 = get_le24(pb);", "if(get_byte(pb) != 0xC5 || get_le32(pb) != 4)\nreturn -1;", "st = av_new_stream(VAR_0, 0);", "if (!st)\nreturn -1;", "st->code...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17, 19 ], [ 25 ], [ 27, 29 ], [ 33 ], [ 35 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49, 51 ], [ 53 ], [ 55 ...
11,794
static void filter_line_c(uint8_t *dst, uint8_t *prev, uint8_t *cur, uint8_t *next, int w, int prefs, int mrefs, int parity, int mode) { int x; uint8_t *prev2 = parity ? prev : cur ; uint8_t *next2 = parity ? cur : next; for (x = 0; x < w; x++...
false
FFmpeg
49e617f9565b6528fe707bae7ea4b62b10c771a5
static void filter_line_c(uint8_t *dst, uint8_t *prev, uint8_t *cur, uint8_t *next, int w, int prefs, int mrefs, int parity, int mode) { int x; uint8_t *prev2 = parity ? prev : cur ; uint8_t *next2 = parity ? cur : next; for (x = 0; x < w; x++...
{ "code": [], "line_no": [] }
static void FUNC_0(uint8_t *VAR_0, uint8_t *VAR_1, uint8_t *VAR_2, uint8_t *VAR_3, int VAR_4, int VAR_5, int VAR_6, int VAR_7, int VAR_8) { int VAR_9; uint8_t *prev2 = VAR_7 ? VAR_1 : VAR_2 ; uint8_t *next2 = VAR_7 ? VAR_2 : VAR_3; for (VAR_9 =...
[ "static void FUNC_0(uint8_t *VAR_0,\nuint8_t *VAR_1, uint8_t *VAR_2, uint8_t *VAR_3,\nint VAR_4, int VAR_5, int VAR_6, int VAR_7, int VAR_8)\n{", "int VAR_9;", "uint8_t *prev2 = VAR_7 ? VAR_1 : VAR_2 ;", "uint8_t *next2 = VAR_7 ? VAR_2 : VAR_3;", "for (VAR_9 = 0; VAR_9 < VAR_4; VAR_9++) {", "int VAR_10 ...
[ 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 ], [ 39, 41 ], [ 43, 45 ], [ 47 ], [...
11,796
static void qsv_uninit(AVCodecContext *s) { InputStream *ist = s->opaque; QSVContext *qsv = ist->hwaccel_ctx; av_freep(&qsv->ost->enc_ctx->hwaccel_context); av_freep(&s->hwaccel_context); av_buffer_unref(&qsv->opaque_surfaces_buf); av_freep(&qsv->surface_used); av_freep(&qsv->su...
false
FFmpeg
03cef34aa66662e2ab3681d290e7c5a6634f4058
static void qsv_uninit(AVCodecContext *s) { InputStream *ist = s->opaque; QSVContext *qsv = ist->hwaccel_ctx; av_freep(&qsv->ost->enc_ctx->hwaccel_context); av_freep(&s->hwaccel_context); av_buffer_unref(&qsv->opaque_surfaces_buf); av_freep(&qsv->surface_used); av_freep(&qsv->su...
{ "code": [], "line_no": [] }
static void FUNC_0(AVCodecContext *VAR_0) { InputStream *ist = VAR_0->opaque; QSVContext *qsv = ist->hwaccel_ctx; av_freep(&qsv->ost->enc_ctx->hwaccel_context); av_freep(&VAR_0->hwaccel_context); av_buffer_unref(&qsv->opaque_surfaces_buf); av_freep(&qsv->surface_used); av_freep(...
[ "static void FUNC_0(AVCodecContext *VAR_0)\n{", "InputStream *ist = VAR_0->opaque;", "QSVContext *qsv = ist->hwaccel_ctx;", "av_freep(&qsv->ost->enc_ctx->hwaccel_context);", "av_freep(&VAR_0->hwaccel_context);", "av_buffer_unref(&qsv->opaque_surfaces_buf);", "av_freep(&qsv->surface_used);", "av_freep...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 21 ], [ 25 ], [ 27 ] ]
11,797
int avformat_write_header(AVFormatContext *s, AVDictionary **options) { int ret = 0, i; AVStream *st; AVDictionary *tmp = NULL; AVCodecContext *codec = NULL; AVOutputFormat *of = s->oformat; if (options) av_dict_copy(&tmp, *options, 0); if ((ret = av_opt_set_dict(s, &tmp...
true
FFmpeg
1e46c63eb72be752e044ba32257d77f35cbd9dac
int avformat_write_header(AVFormatContext *s, AVDictionary **options) { int ret = 0, i; AVStream *st; AVDictionary *tmp = NULL; AVCodecContext *codec = NULL; AVOutputFormat *of = s->oformat; if (options) av_dict_copy(&tmp, *options, 0); if ((ret = av_opt_set_dict(s, &tmp...
{ "code": [ "int avformat_write_header(AVFormatContext *s, AVDictionary **options)", " if (s->oformat->write_header) {", " ret = s->oformat->write_header(s);", " if (ret < 0)", " goto fail;", " if (den <= 0) {", " ret = AVERROR_INVALIDD...
int FUNC_0(AVFormatContext *VAR_0, AVDictionary **VAR_1) { int VAR_2 = 0, VAR_3; AVStream *st; AVDictionary *tmp = NULL; AVCodecContext *codec = NULL; AVOutputFormat *of = VAR_0->oformat; if (VAR_1) av_dict_copy(&tmp, *VAR_1, 0); if ((VAR_2 = av_opt_set_dict(VAR_0, &tmp)...
[ "int FUNC_0(AVFormatContext *VAR_0, AVDictionary **VAR_1)\n{", "int VAR_2 = 0, VAR_3;", "AVStream *st;", "AVDictionary *tmp = NULL;", "AVCodecContext *codec = NULL;", "AVOutputFormat *of = VAR_0->oformat;", "if (VAR_1)\nav_dict_copy(&tmp, *VAR_1, 0);", "if ((VAR_2 = av_opt_set_dict(VAR_0, &tmp)) < 0)\...
[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17, 19 ], [ 23, 25 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 43 ], [ 45 ], [ 47 ], [ 51 ], [ 53, 55 ], [...
11,798
static int hevc_decode_extradata(HEVCContext *s, uint8_t *buf, int length) { int ret, i; ret = ff_hevc_decode_extradata(buf, length, &s->ps, &s->sei, &s->is_nalff, &s->nal_length_size, s->avctx->err_recognition, s->apply_defdispwin, s-...
true
FFmpeg
c8cfbc6629c1fe5755b59a3bcfd95ad08b843a07
static int hevc_decode_extradata(HEVCContext *s, uint8_t *buf, int length) { int ret, i; ret = ff_hevc_decode_extradata(buf, length, &s->ps, &s->sei, &s->is_nalff, &s->nal_length_size, s->avctx->err_recognition, s->apply_defdispwin, s-...
{ "code": [ "static int hevc_decode_extradata(HEVCContext *s, uint8_t *buf, int length)", " if (s->ps.sps_list[i]) {" ], "line_no": [ 1, 25 ] }
static int FUNC_0(HEVCContext *VAR_0, uint8_t *VAR_1, int VAR_2) { int VAR_3, VAR_4; VAR_3 = ff_hevc_decode_extradata(VAR_1, VAR_2, &VAR_0->ps, &VAR_0->sei, &VAR_0->is_nalff, &VAR_0->nal_length_size, VAR_0->avctx->err_recognition, VAR_...
[ "static int FUNC_0(HEVCContext *VAR_0, uint8_t *VAR_1, int VAR_2)\n{", "int VAR_3, VAR_4;", "VAR_3 = ff_hevc_decode_extradata(VAR_1, VAR_2, &VAR_0->ps, &VAR_0->sei, &VAR_0->is_nalff,\n&VAR_0->nal_length_size, VAR_0->avctx->err_recognition,\nVAR_0->apply_defdispwin, VAR_0->avctx);", "if (VAR_3 < 0)\nreturn VAR...
[ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9, 11, 13 ], [ 15, 17 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 39 ], [ 41 ] ]
11,799
void palette8torgb15(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette) { unsigned i; for(i=0; i<num_pixels; i++) ((uint16_t *)dst)[i] = ((uint16_t *)palette)[ src[i] ]; }
true
FFmpeg
7f526efd17973ec6d2204f7a47b6923e2be31363
void palette8torgb15(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette) { unsigned i; for(i=0; i<num_pixels; i++) ((uint16_t *)dst)[i] = ((uint16_t *)palette)[ src[i] ]; }
{ "code": [ "\tunsigned i;", "\tunsigned i;", "\tunsigned i;", "\tunsigned i;", "\tunsigned i;", "\tunsigned i;", "void palette8torgb15(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette)", "\tunsigned i;", "\tunsigned i;", "\tunsigned i;", "\tuns...
void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, unsigned VAR_2, const uint8_t *VAR_3) { unsigned VAR_4; for(VAR_4=0; VAR_4<VAR_2; VAR_4++) ((uint16_t *)VAR_1)[VAR_4] = ((uint16_t *)VAR_3)[ VAR_0[VAR_4] ]; }
[ "void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, unsigned VAR_2, const uint8_t *VAR_3)\n{", "unsigned VAR_4;", "for(VAR_4=0; VAR_4<VAR_2; VAR_4++)", "((uint16_t *)VAR_1)[VAR_4] = ((uint16_t *)VAR_3)[ VAR_0[VAR_4] ];", "}" ]
[ 1, 1, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ] ]
11,800
static MemoryRegion *pc_dimm_get_memory_region(PCDIMMDevice *dimm) { return host_memory_backend_get_memory(dimm->hostmem, &error_abort); }
true
qemu
0479097859372a760843ad1b9c6ed3705c6423ca
static MemoryRegion *pc_dimm_get_memory_region(PCDIMMDevice *dimm) { return host_memory_backend_get_memory(dimm->hostmem, &error_abort); }
{ "code": [ "static MemoryRegion *pc_dimm_get_memory_region(PCDIMMDevice *dimm)", " return host_memory_backend_get_memory(dimm->hostmem, &error_abort);" ], "line_no": [ 1, 5 ] }
static MemoryRegion *FUNC_0(PCDIMMDevice *dimm) { return host_memory_backend_get_memory(dimm->hostmem, &error_abort); }
[ "static MemoryRegion *FUNC_0(PCDIMMDevice *dimm)\n{", "return host_memory_backend_get_memory(dimm->hostmem, &error_abort);", "}" ]
[ 1, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ] ]
11,801
PPC_OP(subfic) { T0 = PARAM(1) + ~T0 + 1; if (T0 <= PARAM(1)) { xer_ca = 1; } else { xer_ca = 0; } RETURN(); }
true
qemu
d9bce9d99f4656ae0b0127f7472db9067b8f84ab
PPC_OP(subfic) { T0 = PARAM(1) + ~T0 + 1; if (T0 <= PARAM(1)) { xer_ca = 1; } else { xer_ca = 0; } RETURN(); }
{ "code": [ " RETURN();", " xer_ca = 1;", " } else {", " xer_ca = 0;", " xer_ca = 1;", " } else {", " xer_ca = 0;", " xer_ca = 1;", " } else {", "PPC_OP(subfic)", " T0 = PARAM(1) + ~T0 + 1;", " if (T0 <= PARAM(1)) {",...
FUNC_0(VAR_0) { T0 = PARAM(1) + ~T0 + 1; if (T0 <= PARAM(1)) { xer_ca = 1; } else { xer_ca = 0; } RETURN(); }
[ "FUNC_0(VAR_0)\n{", "T0 = PARAM(1) + ~T0 + 1;", "if (T0 <= PARAM(1)) {", "xer_ca = 1;", "} else {", "xer_ca = 0;", "}", "RETURN();", "}" ]
[ 1, 1, 1, 1, 0, 1, 0, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ] ]
11,802
static inline void RENAME(yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, uint8_t *dst, long width, long height, long srcStride1, long srcStride2, long srcStride3, long dstStride) { long y,x,w,h; w=width/2; h=height; for(y=0;y<h;y++){ const uint8_t* yp=src1...
true
FFmpeg
6e42e6c4b410dbef8b593c2d796a5dad95f89ee4
static inline void RENAME(yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, uint8_t *dst, long width, long height, long srcStride1, long srcStride2, long srcStride3, long dstStride) { long y,x,w,h; w=width/2; h=height; for(y=0;y<h;y++){ const uint8_t* yp=src1...
{ "code": [ "\t\t\tlong width, long height,", "\t\t\tlong srcStride1, long srcStride2,", "\t\t\tuint8_t *dst,", "\t\t\tlong width, long height,", "\t\t\tlong srcStride1, long srcStride2,", "\t\t\tlong width, long height,", "\t\t\tlong srcStride1, long srcStride2,", "\t\t\tuint8_t *dst,...
static inline void FUNC_0(yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, uint8_t *dst, long width, long height, long srcStride1, long srcStride2, long srcStride3, long dstStride) { long VAR_0,VAR_1,VAR_2,VAR_3; VAR_2=width/2; VAR_3=height; for(VAR_0=0;VAR_0<...
[ "static inline void FUNC_0(yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,\nuint8_t *dst,\nlong width, long height,\nlong srcStride1, long srcStride2,\nlong srcStride3, long dstStride)\n{", "long VAR_0,VAR_1,VAR_2,VAR_3;", "VAR_2=width/2; VAR_3=height;", "for(VAR_0=0;VAR_0<VAR_3;V...
[ 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0 ]
[ [ 1, 3, 5, 7, 9, 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29, 31 ], [ 33 ], [ 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57,...
11,803
static int nvme_init(PCIDevice *pci_dev) { NvmeCtrl *n = NVME(pci_dev); NvmeIdCtrl *id = &n->id_ctrl; int i; int64_t bs_size; uint8_t *pci_conf; if (!(n->conf.bs)) { return -1; } bs_size = bdrv_getlength(n->conf.bs); if (bs_size < 0) { return -1; ...
true
qemu
02c4f26b1517d9e403ec10d6f6ca3c0276d19e43
static int nvme_init(PCIDevice *pci_dev) { NvmeCtrl *n = NVME(pci_dev); NvmeIdCtrl *id = &n->id_ctrl; int i; int64_t bs_size; uint8_t *pci_conf; if (!(n->conf.bs)) { return -1; } bs_size = bdrv_getlength(n->conf.bs); if (bs_size < 0) { return -1; ...
{ "code": [ " n->namespaces = g_malloc0(sizeof(*n->namespaces)*n->num_namespaces);", " n->sq = g_malloc0(sizeof(*n->sq)*n->num_queues);", " n->cq = g_malloc0(sizeof(*n->cq)*n->num_queues);" ], "line_no": [ 69, 71, 73 ] }
static int FUNC_0(PCIDevice *VAR_0) { NvmeCtrl *n = NVME(VAR_0); NvmeIdCtrl *id = &n->id_ctrl; int VAR_1; int64_t bs_size; uint8_t *pci_conf; if (!(n->conf.bs)) { return -1; } bs_size = bdrv_getlength(n->conf.bs); if (bs_size < 0) { return -1; }...
[ "static int FUNC_0(PCIDevice *VAR_0)\n{", "NvmeCtrl *n = NVME(VAR_0);", "NvmeIdCtrl *id = &n->id_ctrl;", "int VAR_1;", "int64_t bs_size;", "uint8_t *pci_conf;", "if (!(n->conf.bs)) {", "return -1;", "}", "bs_size = bdrv_getlength(n->conf.bs);", "if (bs_size < 0) {", "return -1;", "}", "blk...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ], [ 23 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 47 ], [ 49 ], [ 51...
11,804
static void send_ext_audio_ack(VncState *vs) { vnc_lock_output(vs); vnc_write_u8(vs, VNC_MSG_SERVER_FRAMEBUFFER_UPDATE); vnc_write_u8(vs, 0); vnc_write_u16(vs, 1); vnc_framebuffer_update(vs, 0, 0, surface_width(vs->vd->ds), surface_height...
true
qemu
bea60dd7679364493a0d7f5b54316c767cf894ef
static void send_ext_audio_ack(VncState *vs) { vnc_lock_output(vs); vnc_write_u8(vs, VNC_MSG_SERVER_FRAMEBUFFER_UPDATE); vnc_write_u8(vs, 0); vnc_write_u16(vs, 1); vnc_framebuffer_update(vs, 0, 0, surface_width(vs->vd->ds), surface_height...
{ "code": [ " surface_width(vs->vd->ds),", " surface_height(vs->vd->ds),", " surface_width(vs->vd->ds),", " surface_height(vs->vd->ds)," ], "line_no": [ 15, 17, 15, 17 ] }
static void FUNC_0(VncState *VAR_0) { vnc_lock_output(VAR_0); vnc_write_u8(VAR_0, VNC_MSG_SERVER_FRAMEBUFFER_UPDATE); vnc_write_u8(VAR_0, 0); vnc_write_u16(VAR_0, 1); vnc_framebuffer_update(VAR_0, 0, 0, surface_width(VAR_0->vd->ds), surfa...
[ "static void FUNC_0(VncState *VAR_0)\n{", "vnc_lock_output(VAR_0);", "vnc_write_u8(VAR_0, VNC_MSG_SERVER_FRAMEBUFFER_UPDATE);", "vnc_write_u8(VAR_0, 0);", "vnc_write_u16(VAR_0, 1);", "vnc_framebuffer_update(VAR_0, 0, 0,\nsurface_width(VAR_0->vd->ds),\nsurface_height(VAR_0->vd->ds),\nVNC_ENCODING_AUDIO);",...
[ 0, 0, 0, 0, 0, 1, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13, 15, 17, 19 ], [ 21 ], [ 23 ], [ 25 ] ]
11,805
target_ulong spapr_hypercall(CPUState *env, target_ulong opcode, target_ulong *args) { if (msr_pr) { hcall_dprintf("Hypercall made with MSR[PR]=1\n"); return H_PRIVILEGE; } if ((opcode <= MAX_HCALL_OPCODE) && ((opcode & 0x3) == 0)) { sp...
true
qemu
39ac8455106af1ed669b8e10223420cf1ac5b190
target_ulong spapr_hypercall(CPUState *env, target_ulong opcode, target_ulong *args) { if (msr_pr) { hcall_dprintf("Hypercall made with MSR[PR]=1\n"); return H_PRIVILEGE; } if ((opcode <= MAX_HCALL_OPCODE) && ((opcode & 0x3) == 0)) { sp...
{ "code": [ " spapr_hcall_fn fn = hypercall_table[opcode / 4];" ], "line_no": [ 21 ] }
target_ulong FUNC_0(CPUState *env, target_ulong opcode, target_ulong *args) { if (msr_pr) { hcall_dprintf("Hypercall made with MSR[PR]=1\n"); return H_PRIVILEGE; } if ((opcode <= MAX_HCALL_OPCODE) && ((opcode & 0x3) == 0)) { spapr_hcall...
[ "target_ulong FUNC_0(CPUState *env, target_ulong opcode,\ntarget_ulong *args)\n{", "if (msr_pr) {", "hcall_dprintf(\"Hypercall made with MSR[PR]=1\\n\");", "return H_PRIVILEGE;", "}", "if ((opcode <= MAX_HCALL_OPCODE)\n&& ((opcode & 0x3) == 0)) {", "spapr_hcall_fn fn = hypercall_table[opcode / 4];", "...
[ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17, 19 ], [ 21 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 35 ], [ 37 ], [ 39 ] ]
11,807
target_ulong helper_emt(target_ulong arg1) { // TODO arg1 = 0; // rt = arg1 return arg1; }
true
qemu
9ed5726c043958359b0f1fa44ab3e4f25f9d9a47
target_ulong helper_emt(target_ulong arg1) { arg1 = 0; return arg1; }
{ "code": [ " arg1 = 0;", " return arg1;", "target_ulong helper_emt(target_ulong arg1)", " arg1 = 0;", " return arg1;", " arg1 = 0;", " return arg1;", " arg1 = 0;", " return arg1;" ], "line_no": [ 7, 13, 1, 7, 13, 7, 13, 7...
target_ulong FUNC_0(target_ulong arg1) { arg1 = 0; return arg1; }
[ "target_ulong FUNC_0(target_ulong arg1)\n{", "arg1 = 0;", "return arg1;", "}" ]
[ 1, 1, 1, 0 ]
[ [ 1, 3 ], [ 7 ], [ 13 ], [ 15 ] ]
11,808
void ff_id3v2_free_extra_meta(ID3v2ExtraMeta **extra_meta) { ID3v2ExtraMeta *current = *extra_meta, *next; void (*free_func)(ID3v2ExtraMeta*); while (current) { if ((free_func = get_extra_meta_func(current->tag, 1)->free)) free_func(current->data); next = current->next; ...
true
FFmpeg
c780b543e72141393ae3c0b0cb2654f9a5e35f73
void ff_id3v2_free_extra_meta(ID3v2ExtraMeta **extra_meta) { ID3v2ExtraMeta *current = *extra_meta, *next; void (*free_func)(ID3v2ExtraMeta*); while (current) { if ((free_func = get_extra_meta_func(current->tag, 1)->free)) free_func(current->data); next = current->next; ...
{ "code": [ " void (*free_func)(ID3v2ExtraMeta*);", " if ((free_func = get_extra_meta_func(current->tag, 1)->free))", " free_func(current->data);" ], "line_no": [ 7, 13, 15 ] }
VAR_2voidVAR_2 VAR_2ff_id3v2_free_extra_metaVAR_2(VAR_2ID3v2ExtraMetaVAR_2 **VAR_2VAR_0VAR_2) { VAR_2ID3v2ExtraMetaVAR_2 *VAR_2currentVAR_2 = *VAR_2VAR_0VAR_2, *VAR_2nextVAR_2; VAR_2voidVAR_2 (*VAR_2VAR_1VAR_2)(VAR_2ID3v2ExtraMetaVAR_2*); VAR_2whileVAR_2 (VAR_2currentVAR_2) { VAR_2ifVAR_2 ((V...
[ "VAR_2voidVAR_2 VAR_2ff_id3v2_free_extra_metaVAR_2(VAR_2ID3v2ExtraMetaVAR_2 **VAR_2VAR_0VAR_2)\n{", "VAR_2ID3v2ExtraMetaVAR_2 *VAR_2currentVAR_2 = *VAR_2VAR_0VAR_2, *VAR_2nextVAR_2;", "VAR_2voidVAR_2 (*VAR_2VAR_1VAR_2)(VAR_2ID3v2ExtraMetaVAR_2*);", "VAR_2whileVAR_2 (VAR_2currentVAR_2) {", "VAR_2ifVAR_2 ((VA...
[ 0, 0, 1, 0, 1, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13, 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ] ]
11,809
static int adb_mouse_request(ADBDevice *d, uint8_t *obuf, const uint8_t *buf, int len) { MouseState *s = ADB_MOUSE(d); int cmd, reg, olen; if ((buf[0] & 0x0f) == ADB_FLUSH) { /* flush mouse fifo */ s->buttons_state = s->last_buttons_state; s->dx...
true
qemu
77cb0f5aafc8e6d0c6d3c339f381c9b7921648e0
static int adb_mouse_request(ADBDevice *d, uint8_t *obuf, const uint8_t *buf, int len) { MouseState *s = ADB_MOUSE(d); int cmd, reg, olen; if ((buf[0] & 0x0f) == ADB_FLUSH) { s->buttons_state = s->last_buttons_state; s->dx = 0; s->dy =...
{ "code": [ " olen = 0;", " return 0;", " return olen;", " int cmd, reg, olen;", " if ((buf[0] & 0x0f) == ADB_FLUSH) {", " return 0;", " cmd = buf[0] & 0xc;", " reg = buf[0] & 0x3;", " olen = 0;", " switch(cmd) {", " case ADB_WRITERE...
static int FUNC_0(ADBDevice *VAR_0, uint8_t *VAR_1, const uint8_t *VAR_2, int VAR_3) { MouseState *s = ADB_MOUSE(VAR_0); int VAR_4, VAR_5, VAR_6; if ((VAR_2[0] & 0x0f) == ADB_FLUSH) { s->buttons_state = s->last_buttons_state; s->dx = 0; ...
[ "static int FUNC_0(ADBDevice *VAR_0, uint8_t *VAR_1,\nconst uint8_t *VAR_2, int VAR_3)\n{", "MouseState *s = ADB_MOUSE(VAR_0);", "int VAR_4, VAR_5, VAR_6;", "if ((VAR_2[0] & 0x0f) == ADB_FLUSH) {", "s->buttons_state = s->last_buttons_state;", "s->dx = 0;", "s->dy = 0;", "s->dz = 0;", "return 0;", ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 13 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39, 41 ], [ 43 ], [ 45, 47 ], [ 49, 51 ...
11,811
static int net_init_nic(const NetClientOptions *opts, const char *name, NetClientState *peer, Error **errp) { /* FIXME error_setg(errp, ...) on failure */ int idx; NICInfo *nd; const NetLegacyNicOptions *nic; assert(opts->kind == NET_CLIENT_OPTIONS_KIND_NIC); ni...
true
qemu
6630886863d4a9b3b7bcb3b0e2895d83eb269c75
static int net_init_nic(const NetClientOptions *opts, const char *name, NetClientState *peer, Error **errp) { int idx; NICInfo *nd; const NetLegacyNicOptions *nic; assert(opts->kind == NET_CLIENT_OPTIONS_KIND_NIC); nic = opts->nic; idx = nic_get_free_idx...
{ "code": [ " error_report(\"Too Many NICs\");", " error_report(\"netdev '%s' not found\", nic->netdev);", " error_report(\"invalid syntax for ethernet address\");", " error_report(\"NIC cannot have multicast MAC address (odd 1st byte)\");", " error_repor...
static int FUNC_0(const NetClientOptions *VAR_0, const char *VAR_1, NetClientState *VAR_2, Error **VAR_3) { int VAR_4; NICInfo *nd; const NetLegacyNicOptions *VAR_5; assert(VAR_0->kind == NET_CLIENT_OPTIONS_KIND_NIC); VAR_5 = VAR_0->VAR_5; VAR_4 = nic_ge...
[ "static int FUNC_0(const NetClientOptions *VAR_0, const char *VAR_1,\nNetClientState *VAR_2, Error **VAR_3)\n{", "int VAR_4;", "NICInfo *nd;", "const NetLegacyNicOptions *VAR_5;", "assert(VAR_0->kind == NET_CLIENT_OPTIONS_KIND_NIC);", "VAR_5 = VAR_0->VAR_5;", "VAR_4 = nic_get_free_idx();", "if (VAR_4 ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 35 ], [ 39 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ], ...
11,812
void migrate_del_blocker(Error *reason) { migration_blockers = g_slist_remove(migration_blockers, reason); }
true
qemu
60fe637bf0e4d7989e21e50f52526444765c63b4
void migrate_del_blocker(Error *reason) { migration_blockers = g_slist_remove(migration_blockers, reason); }
{ "code": [], "line_no": [] }
void FUNC_0(Error *VAR_0) { migration_blockers = g_slist_remove(migration_blockers, VAR_0); }
[ "void FUNC_0(Error *VAR_0)\n{", "migration_blockers = g_slist_remove(migration_blockers, VAR_0);", "}" ]
[ 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ] ]
11,814
char *desc_get_buf(DescInfo *info, bool read_only) { PCIDevice *dev = PCI_DEVICE(info->ring->r); size_t size = read_only ? le16_to_cpu(info->desc.tlv_size) : le16_to_cpu(info->desc.buf_size); if (size > info->buf_size) { info->buf = g_realloc(info->buf, size); ...
true
qemu
107e4b352cc309f9bd7588ef1a44549200620078
char *desc_get_buf(DescInfo *info, bool read_only) { PCIDevice *dev = PCI_DEVICE(info->ring->r); size_t size = read_only ? le16_to_cpu(info->desc.tlv_size) : le16_to_cpu(info->desc.buf_size); if (size > info->buf_size) { info->buf = g_realloc(info->buf, size); ...
{ "code": [ " if (!info->buf) {", " return NULL;", " return NULL;", " return NULL;", " return NULL;", " return NULL;" ], "line_no": [ 23, 25, 25, 25, 25, 25 ] }
char *FUNC_0(DescInfo *VAR_0, bool VAR_1) { PCIDevice *dev = PCI_DEVICE(VAR_0->ring->r); size_t size = VAR_1 ? le16_to_cpu(VAR_0->desc.tlv_size) : le16_to_cpu(VAR_0->desc.buf_size); if (size > VAR_0->buf_size) { VAR_0->buf = g_realloc(VAR_0->buf, size); ...
[ "char *FUNC_0(DescInfo *VAR_0, bool VAR_1)\n{", "PCIDevice *dev = PCI_DEVICE(VAR_0->ring->r);", "size_t size = VAR_1 ? le16_to_cpu(VAR_0->desc.tlv_size) :\nle16_to_cpu(VAR_0->desc.buf_size);", "if (size > VAR_0->buf_size) {", "VAR_0->buf = g_realloc(VAR_0->buf, size);", "VAR_0->buf_size = size;", "}", ...
[ 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7, 9 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 23 ], [ 25 ], [ 27 ], [ 31 ], [ 35 ], [ 37 ] ]
11,815
int qcow2_backing_read1(BlockDriverState *bs, QEMUIOVector *qiov, int64_t sector_num, int nb_sectors) { int n1; if ((sector_num + nb_sectors) <= bs->total_sectors) return nb_sectors; if (sector_num >= bs->total_sectors) n1 = 0; else n1 = bs->total_secto...
true
qemu
e0d9c6f93729c9bfc98fcafcd73098bb8e131aeb
int qcow2_backing_read1(BlockDriverState *bs, QEMUIOVector *qiov, int64_t sector_num, int nb_sectors) { int n1; if ((sector_num + nb_sectors) <= bs->total_sectors) return nb_sectors; if (sector_num >= bs->total_sectors) n1 = 0; else n1 = bs->total_secto...
{ "code": [ " qemu_iovec_memset(qiov, 0, 512 * (nb_sectors - n1));" ], "line_no": [ 23 ] }
int FUNC_0(BlockDriverState *VAR_0, QEMUIOVector *VAR_1, int64_t VAR_2, int VAR_3) { int VAR_4; if ((VAR_2 + VAR_3) <= VAR_0->total_sectors) return VAR_3; if (VAR_2 >= VAR_0->total_sectors) VAR_4 = 0; else VAR_4 = VAR_0->total_sectors - VAR_2; qe...
[ "int FUNC_0(BlockDriverState *VAR_0, QEMUIOVector *VAR_1,\nint64_t VAR_2, int VAR_3)\n{", "int VAR_4;", "if ((VAR_2 + VAR_3) <= VAR_0->total_sectors)\nreturn VAR_3;", "if (VAR_2 >= VAR_0->total_sectors)\nVAR_4 = 0;", "else\nVAR_4 = VAR_0->total_sectors - VAR_2;", "qemu_iovec_memset(VAR_1, 0, 512 * (VAR_3 ...
[ 0, 0, 0, 0, 0, 1, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9, 11 ], [ 13, 15 ], [ 17, 19 ], [ 23 ], [ 27 ], [ 29 ] ]
11,816
void helper_stqf(CPUSPARCState *env, target_ulong addr, int mem_idx) { /* XXX add 128 bit store */ CPU_QuadU u; helper_check_align(env, addr, 7); #if !defined(CONFIG_USER_ONLY) switch (mem_idx) { case MMU_USER_IDX: u.q = QT0; cpu_stq_user(env, addr, u.ll.upper); c...
true
qemu
eb513f82f04fab442cdef9db698dafc852275f7f
void helper_stqf(CPUSPARCState *env, target_ulong addr, int mem_idx) { CPU_QuadU u; helper_check_align(env, addr, 7); #if !defined(CONFIG_USER_ONLY) switch (mem_idx) { case MMU_USER_IDX: u.q = QT0; cpu_stq_user(env, addr, u.ll.upper); cpu_stq_user(env, addr + 8, ...
{ "code": [ " stq_raw(address_mask(env, addr), u.ll.upper);", " stq_raw(address_mask(env, addr + 8), u.ll.lower);" ], "line_no": [ 63, 65 ] }
void FUNC_0(CPUSPARCState *VAR_0, target_ulong VAR_1, int VAR_2) { CPU_QuadU u; helper_check_align(VAR_0, VAR_1, 7); #if !defined(CONFIG_USER_ONLY) switch (VAR_2) { case MMU_USER_IDX: u.q = QT0; cpu_stq_user(VAR_0, VAR_1, u.ll.upper); cpu_stq_user(VAR_0, VAR_1 + ...
[ "void FUNC_0(CPUSPARCState *VAR_0, target_ulong VAR_1, int VAR_2)\n{", "CPU_QuadU u;", "helper_check_align(VAR_0, VAR_1, 7);", "#if !defined(CONFIG_USER_ONLY)\nswitch (VAR_2) {", "case MMU_USER_IDX:\nu.q = QT0;", "cpu_stq_user(VAR_0, VAR_1, u.ll.upper);", "cpu_stq_user(VAR_0, VAR_1 + 8, u.ll.lower);", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0 ]
[ [ 1, 3 ], [ 7 ], [ 11 ], [ 13, 15 ], [ 17, 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27, 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37, 39, 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49, 5...
11,817
static int get_uint64(QEMUFile *f, void *pv, size_t size) { uint64_t *v = pv; qemu_get_be64s(f, v); return 0; }
true
qemu
60fe637bf0e4d7989e21e50f52526444765c63b4
static int get_uint64(QEMUFile *f, void *pv, size_t size) { uint64_t *v = pv; qemu_get_be64s(f, v); return 0; }
{ "code": [], "line_no": [] }
static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2) { uint64_t *v = VAR_1; qemu_get_be64s(VAR_0, v); return 0; }
[ "static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2)\n{", "uint64_t *v = VAR_1;", "qemu_get_be64s(VAR_0, v);", "return 0;", "}" ]
[ 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ] ]