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
8,232
static int parse_picture_segment(AVCodecContext *avctx, const uint8_t *buf, int buf_size) { PGSSubContext *ctx = avctx->priv_data; uint8_t sequence_desc; unsigned int rle_bitmap_len, width, height; uint16_t picture_id; if (buf_size <= 4) return -...
true
FFmpeg
1a01dc83434fbdd1f6604c73afc022795bfb4783
static int parse_picture_segment(AVCodecContext *avctx, const uint8_t *buf, int buf_size) { PGSSubContext *ctx = avctx->priv_data; uint8_t sequence_desc; unsigned int rle_bitmap_len, width, height; uint16_t picture_id; if (buf_size <= 4) return -...
{ "code": [ " av_fast_malloc(&ctx->pictures[picture_id].rle, &ctx->pictures[picture_id].rle_buffer_size, rle_bitmap_len);" ], "line_no": [ 117 ] }
static int FUNC_0(AVCodecContext *VAR_0, const uint8_t *VAR_1, int VAR_2) { PGSSubContext *ctx = VAR_0->priv_data; uint8_t sequence_desc; unsigned int VAR_3, VAR_4, VAR_5; uint16_t picture_id; if (VAR_2 <= 4) return -1; VAR_2 -= 4; pi...
[ "static int FUNC_0(AVCodecContext *VAR_0,\nconst uint8_t *VAR_1, int VAR_2)\n{", "PGSSubContext *ctx = VAR_0->priv_data;", "uint8_t sequence_desc;", "unsigned int VAR_3, VAR_4, VAR_5;", "uint16_t picture_id;", "if (VAR_2 <= 4)\nreturn -1;", "VAR_2 -= 4;", "picture_id = bytestream_get_be16(&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, 1, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 19, 21 ], [ 23 ], [ 27 ], [ 33 ], [ 39 ], [ 43 ], [ 47, 49 ], [ 53 ], [ 55 ], [ 57 ], [ 61 ], [ 63 ], [ 67, 69...
8,234
static void sun4m_fdc_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); dc->props = sun4m_fdc_properties; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); }
true
qemu
e4f4fb1eca795e36f363b4647724221e774523c1
static void sun4m_fdc_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); dc->props = sun4m_fdc_properties; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); }
{ "code": [], "line_no": [] }
static void FUNC_0(ObjectClass *VAR_0, void *VAR_1) { DeviceClass *dc = DEVICE_CLASS(VAR_0); dc->props = sun4m_fdc_properties; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); }
[ "static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{", "DeviceClass *dc = DEVICE_CLASS(VAR_0);", "dc->props = sun4m_fdc_properties;", "set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);", "}" ]
[ 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 18 ] ]
8,235
static int64_t get_pts(const char *buf, int *duration) { int i, hour, min, sec, hsec; int he, me, se, mse; for (i=0; i<2; i++) { int64_t start, end; if (sscanf(buf, "%d:%2d:%2d%*1[,.]%3d --> %d:%2d:%2d%*1[,.]%3d", &hour, &min, &sec, &hsec, &he, &me, &se, &mse) == ...
true
FFmpeg
a96b39de622592cb595bf20ae009ed415b98cde9
static int64_t get_pts(const char *buf, int *duration) { int i, hour, min, sec, hsec; int he, me, se, mse; for (i=0; i<2; i++) { int64_t start, end; if (sscanf(buf, "%d:%2d:%2d%*1[,.]%3d --> %d:%2d:%2d%*1[,.]%3d", &hour, &min, &sec, &hsec, &he, &me, &se, &mse) == ...
{ "code": [ " int i, hour, min, sec, hsec;", " int he, me, se, mse;", " int64_t start, end;", " &hour, &min, &sec, &hsec, &he, &me, &se, &mse) == 8) {", " min += 60*hour;", " sec += 60*min;", " start = sec*1000+hsec;", " ...
static int64_t FUNC_0(const char *buf, int *duration) { int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4; int VAR_5, VAR_6, VAR_7, VAR_8; for (VAR_0=0; VAR_0<2; VAR_0++) { int64_t start, end; if (sscanf(buf, "%d:%2d:%2d%*1[,.]%3d --> %d:%2d:%2d%*1[,.]%3d", &VAR_1, &VAR_2, &V...
[ "static int64_t FUNC_0(const char *buf, int *duration)\n{", "int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4;", "int VAR_5, VAR_6, VAR_7, VAR_8;", "for (VAR_0=0; VAR_0<2; VAR_0++) {", "int64_t start, end;", "if (sscanf(buf, \"%d:%2d:%2d%*1[,.]%3d --> %d:%2d:%2d%*1[,.]%3d\",\n&VAR_1, &VAR_2, &VAR_3, &VAR_4, &VAR_5, ...
[ 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15, 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ] ]
8,236
void qemu_savevm_state_begin(QEMUFile *f, const MigrationParams *params) { SaveStateEntry *se; int ret; trace_savevm_state_begin(); QTAILQ_FOREACH(se, &savevm_state.handlers, entry) { if (!se->ops || !se->ops->set_params) { continue; } ...
true
qemu
f68945d42bab700d95b87f62e0898606ce2421ed
void qemu_savevm_state_begin(QEMUFile *f, const MigrationParams *params) { SaveStateEntry *se; int ret; trace_savevm_state_begin(); QTAILQ_FOREACH(se, &savevm_state.handlers, entry) { if (!se->ops || !se->ops->set_params) { continue; } ...
{ "code": [], "line_no": [] }
void FUNC_0(QEMUFile *VAR_0, const MigrationParams *VAR_1) { SaveStateEntry *se; int VAR_2; trace_savevm_state_begin(); QTAILQ_FOREACH(se, &savevm_state.handlers, entry) { if (!se->ops || !se->ops->set_params) { continue; } se-...
[ "void FUNC_0(QEMUFile *VAR_0,\nconst MigrationParams *VAR_1)\n{", "SaveStateEntry *se;", "int VAR_2;", "trace_savevm_state_begin();", "QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {", "if (!se->ops || !se->ops->set_params) {", "continue;", "}", "se->ops->set_params(VAR_1, se->opaque);", "}", ...
[ 0, 0, 0, 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 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [...
8,237
static int gd_vc_chr_write(CharDriverState *chr, const uint8_t *buf, int len) { VirtualConsole *vc = chr->opaque; return vc ? write(vc->fd, buf, len) : len; }
true
qemu
d4370741402a97b8b6d0c38fef18ab38bf25ab22
static int gd_vc_chr_write(CharDriverState *chr, const uint8_t *buf, int len) { VirtualConsole *vc = chr->opaque; return vc ? write(vc->fd, buf, len) : len; }
{ "code": [ " return vc ? write(vc->fd, buf, len) : len;" ], "line_no": [ 9 ] }
static int FUNC_0(CharDriverState *VAR_0, const uint8_t *VAR_1, int VAR_2) { VirtualConsole *vc = VAR_0->opaque; return vc ? write(vc->fd, VAR_1, VAR_2) : VAR_2; }
[ "static int FUNC_0(CharDriverState *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{", "VirtualConsole *vc = VAR_0->opaque;", "return vc ? write(vc->fd, VAR_1, VAR_2) : VAR_2;", "}" ]
[ 0, 0, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ] ]
8,238
int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx) { if (!strcasecmp(color_string, "random") || !strcasecmp(color_string, "bikeshed")) { int rgba = av_get_random_seed(); rgba_color[0] = rgba >> 24; rgba_color[1] = rgba >> 16; rgba_color[2] = rgba >...
false
FFmpeg
8e094dd6674e3fd503e1fc2f68883fd3f73a5bd1
int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx) { if (!strcasecmp(color_string, "random") || !strcasecmp(color_string, "bikeshed")) { int rgba = av_get_random_seed(); rgba_color[0] = rgba >> 24; rgba_color[1] = rgba >> 16; rgba_color[2] = rgba >...
{ "code": [], "line_no": [] }
int FUNC_0(uint8_t *VAR_0, const char *VAR_1, void *VAR_2) { if (!strcasecmp(VAR_1, "random") || !strcasecmp(VAR_1, "bikeshed")) { int VAR_6 = av_get_random_seed(); VAR_0[0] = VAR_6 >> 24; VAR_0[1] = VAR_6 >> 16; VAR_0[2] = VAR_6 >> 8; VAR_0[3] = VAR_6; } else ...
[ "int FUNC_0(uint8_t *VAR_0, const char *VAR_1, void *VAR_2)\n{", "if (!strcasecmp(VAR_1, \"random\") || !strcasecmp(VAR_1, \"bikeshed\")) {", "int VAR_6 = av_get_random_seed();", "VAR_0[0] = VAR_6 >> 24;", "VAR_0[1] = VAR_6 >> 16;", "VAR_0[2] = VAR_6 >> 8;", "VAR_0[3] = VAR_6;", "} else", "if (!strn...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ...
8,239
av_cold int ff_mjpeg_encode_init(MpegEncContext *s) { MJpegContext *m; av_assert0(s->slice_context_count == 1); if (s->width > 65500 || s->height > 65500) { av_log(s, AV_LOG_ERROR, "JPEG does not support resolutions above 65500x65500\n"); return AVERROR(EINVAL); } m = a...
false
FFmpeg
3e1507a9547ac09b6ff4372123cde09f19218f3d
av_cold int ff_mjpeg_encode_init(MpegEncContext *s) { MJpegContext *m; av_assert0(s->slice_context_count == 1); if (s->width > 65500 || s->height > 65500) { av_log(s, AV_LOG_ERROR, "JPEG does not support resolutions above 65500x65500\n"); return AVERROR(EINVAL); } m = a...
{ "code": [], "line_no": [] }
av_cold int FUNC_0(MpegEncContext *s) { MJpegContext *m; av_assert0(s->slice_context_count == 1); if (s->width > 65500 || s->height > 65500) { av_log(s, AV_LOG_ERROR, "JPEG does not support resolutions above 65500x65500\n"); return AVERROR(EINVAL); } m = av_malloc(sizeo...
[ "av_cold int FUNC_0(MpegEncContext *s)\n{", "MJpegContext *m;", "av_assert0(s->slice_context_count == 1);", "if (s->width > 65500 || s->height > 65500) {", "av_log(s, AV_LOG_ERROR, \"JPEG does not support resolutions above 65500x65500\\n\");", "return AVERROR(EINVAL);", "}", "m = av_malloc(sizeof(MJpe...
[ 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 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 23 ], [ 25, 27 ], [ 31 ], [ 33 ], [ 43, 45, 47, 49 ], [ 51, 53, 55, 57 ], [ 59, 61, 63, 65 ], [ 67...
8,240
void fft_calc_altivec(FFTContext *s, FFTComplex *z) { POWERPC_TBL_DECLARE(altivec_fft_num, s->nbits >= 6); #ifdef ALTIVEC_USE_REFERENCE_C_CODE int ln = s->nbits; int j, np, np2; int nblocks, nloops; register FFTComplex *p, *q; FFTComplex *exptab = s->exptab; int l; FFTSample tmp_re...
false
FFmpeg
e45a2872fafe631c14aee9f79d0963d68c4fc1fd
void fft_calc_altivec(FFTContext *s, FFTComplex *z) { POWERPC_TBL_DECLARE(altivec_fft_num, s->nbits >= 6); #ifdef ALTIVEC_USE_REFERENCE_C_CODE int ln = s->nbits; int j, np, np2; int nblocks, nloops; register FFTComplex *p, *q; FFTComplex *exptab = s->exptab; int l; FFTSample tmp_re...
{ "code": [], "line_no": [] }
void FUNC_0(FFTContext *VAR_0, FFTComplex *VAR_1) { POWERPC_TBL_DECLARE(altivec_fft_num, VAR_0->nbits >= 6); #ifdef ALTIVEC_USE_REFERENCE_C_CODE int VAR_3 = VAR_0->nbits; int VAR_4, VAR_5, VAR_6; int VAR_7, VAR_8; register FFTComplex *VAR_9, *q; FFTComplex *exptab = VAR_0->exptab; int l...
[ "void FUNC_0(FFTContext *VAR_0, FFTComplex *VAR_1)\n{", "POWERPC_TBL_DECLARE(altivec_fft_num, VAR_0->nbits >= 6);", "#ifdef ALTIVEC_USE_REFERENCE_C_CODE\nint VAR_3 = VAR_0->nbits;", "int\tVAR_4, VAR_5, VAR_6;", "int\tVAR_7, VAR_8;", "register FFTComplex *VAR_9, *q;", "FFTComplex *exptab = VAR_0->exptab;...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ], [ 29 ], [ 37 ], [ 39 ], [ 41 ], [ 43, 45 ], [ 47 ], [ 49 ], [ 59 ], [ 61 ...
8,242
Aml *aml_and(Aml *arg1, Aml *arg2) { Aml *var = aml_opcode(0x7B /* AndOp */); aml_append(var, arg1); aml_append(var, arg2); build_append_byte(var->buf, 0x00 /* NullNameOp */); return var; }
false
qemu
439e2a6e10ed7f5da819bf7dcaa54b8cfdbeab0d
Aml *aml_and(Aml *arg1, Aml *arg2) { Aml *var = aml_opcode(0x7B ); aml_append(var, arg1); aml_append(var, arg2); build_append_byte(var->buf, 0x00 ); return var; }
{ "code": [], "line_no": [] }
Aml *FUNC_0(Aml *arg1, Aml *arg2) { Aml *var = aml_opcode(0x7B ); aml_append(var, arg1); aml_append(var, arg2); build_append_byte(var->buf, 0x00 ); return var; }
[ "Aml *FUNC_0(Aml *arg1, Aml *arg2)\n{", "Aml *var = aml_opcode(0x7B );", "aml_append(var, arg1);", "aml_append(var, arg2);", "build_append_byte(var->buf, 0x00 );", "return var;", "}" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ] ]
8,243
static QObject *parser_context_peek_token(JSONParserContext *ctxt) { assert(!g_queue_is_empty(ctxt->buf)); return g_queue_peek_head(ctxt->buf); }
false
qemu
9bada8971173345ceb37ed1a47b00a01a4dd48cf
static QObject *parser_context_peek_token(JSONParserContext *ctxt) { assert(!g_queue_is_empty(ctxt->buf)); return g_queue_peek_head(ctxt->buf); }
{ "code": [], "line_no": [] }
static QObject *FUNC_0(JSONParserContext *ctxt) { assert(!g_queue_is_empty(ctxt->buf)); return g_queue_peek_head(ctxt->buf); }
[ "static QObject *FUNC_0(JSONParserContext *ctxt)\n{", "assert(!g_queue_is_empty(ctxt->buf));", "return g_queue_peek_head(ctxt->buf);", "}" ]
[ 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ] ]
8,244
static int nbd_handle_reply_err(QIOChannel *ioc, nbd_opt_reply *reply, Error **errp) { char *msg = NULL; int result = -1; if (!(reply->type & (1 << 31))) { return 1; } if (reply->length) { if (reply->length > NBD_MAX_BUFFER_SIZE) { ...
false
qemu
d1fdf257d52822695f5ace6c586e059aa17d4b79
static int nbd_handle_reply_err(QIOChannel *ioc, nbd_opt_reply *reply, Error **errp) { char *msg = NULL; int result = -1; if (!(reply->type & (1 << 31))) { return 1; } if (reply->length) { if (reply->length > NBD_MAX_BUFFER_SIZE) { ...
{ "code": [], "line_no": [] }
static int FUNC_0(QIOChannel *VAR_0, nbd_opt_reply *VAR_1, Error **VAR_2) { char *VAR_3 = NULL; int VAR_4 = -1; if (!(VAR_1->type & (1 << 31))) { return 1; } if (VAR_1->length) { if (VAR_1->length > NBD_MAX_BUFFER_SIZE) { erro...
[ "static int FUNC_0(QIOChannel *VAR_0, nbd_opt_reply *VAR_1,\nError **VAR_2)\n{", "char *VAR_3 = NULL;", "int VAR_4 = -1;", "if (!(VAR_1->type & (1 << 31))) {", "return 1;", "}", "if (VAR_1->length) {", "if (VAR_1->length > NBD_MAX_BUFFER_SIZE) {", "error_setg(VAR_2, \"server's error message is too l...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 47 ], [...
8,245
static void gen_jmp_tb(DisasContext *s, target_ulong eip, int tb_num) { gen_update_cc_op(s); set_cc_op(s, CC_OP_DYNAMIC); if (s->jmp_opt) { gen_goto_tb(s, tb_num, eip); s->is_jmp = DISAS_TB_JUMP; } else { gen_jmp_im(eip); gen_eob(s); } }
false
qemu
1e39d97af086d525cd0408eaa5d19783ea165906
static void gen_jmp_tb(DisasContext *s, target_ulong eip, int tb_num) { gen_update_cc_op(s); set_cc_op(s, CC_OP_DYNAMIC); if (s->jmp_opt) { gen_goto_tb(s, tb_num, eip); s->is_jmp = DISAS_TB_JUMP; } else { gen_jmp_im(eip); gen_eob(s); } }
{ "code": [], "line_no": [] }
static void FUNC_0(DisasContext *VAR_0, target_ulong VAR_1, int VAR_2) { gen_update_cc_op(VAR_0); set_cc_op(VAR_0, CC_OP_DYNAMIC); if (VAR_0->jmp_opt) { gen_goto_tb(VAR_0, VAR_2, VAR_1); VAR_0->is_jmp = DISAS_TB_JUMP; } else { gen_jmp_im(VAR_1); gen_eob(VAR_0); ...
[ "static void FUNC_0(DisasContext *VAR_0, target_ulong VAR_1, int VAR_2)\n{", "gen_update_cc_op(VAR_0);", "set_cc_op(VAR_0, CC_OP_DYNAMIC);", "if (VAR_0->jmp_opt) {", "gen_goto_tb(VAR_0, VAR_2, VAR_1);", "VAR_0->is_jmp = DISAS_TB_JUMP;", "} else {", "gen_jmp_im(VAR_1);", "gen_eob(VAR_0);", "}", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ] ]
8,246
void helper_movl_sreg_reg (uint32_t sreg, uint32_t reg) { uint32_t srs; srs = env->pregs[PR_SRS]; srs &= 3; env->sregs[srs][sreg] = env->regs[reg]; #if !defined(CONFIG_USER_ONLY) if (srs == 1 || srs == 2) { if (sreg == 6) { /* Writes to tlb-hi write to mm_cause as a side effect. */ env...
false
qemu
3e18c6bf7740e4a75503b803ec7d5dc29a531e4f
void helper_movl_sreg_reg (uint32_t sreg, uint32_t reg) { uint32_t srs; srs = env->pregs[PR_SRS]; srs &= 3; env->sregs[srs][sreg] = env->regs[reg]; #if !defined(CONFIG_USER_ONLY) if (srs == 1 || srs == 2) { if (sreg == 6) { env->sregs[SFR_RW_MM_TLB_HI] = env->regs[reg]; env->sregs[SFR_R_...
{ "code": [], "line_no": [] }
void FUNC_0 (uint32_t VAR_0, uint32_t VAR_1) { uint32_t srs; srs = env->pregs[PR_SRS]; srs &= 3; env->sregs[srs][VAR_0] = env->regs[VAR_1]; #if !defined(CONFIG_USER_ONLY) if (srs == 1 || srs == 2) { if (VAR_0 == 6) { env->sregs[SFR_RW_MM_TLB_HI] = env->regs[VAR_1]; env->sregs[SFR_R_MM_CA...
[ "void FUNC_0 (uint32_t VAR_0, uint32_t VAR_1)\n{", "uint32_t srs;", "srs = env->pregs[PR_SRS];", "srs &= 3;", "env->sregs[srs][VAR_0] = env->regs[VAR_1];", "#if !defined(CONFIG_USER_ONLY)\nif (srs == 1 || srs == 2) {", "if (VAR_0 == 6) {", "env->sregs[SFR_RW_MM_TLB_HI] = env->regs[VAR_1];", "env->sr...
[ 0, 0, 0, 0, 0, 0, 0, 0, 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 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 45 ], [ 47 ], [ 49 ], [...
8,248
static inline void gen_intermediate_code_internal(CPUX86State *env, TranslationBlock *tb, int search_pc) { DisasContext dc1, *dc = &dc1; target_ulong pc_ptr; uint16_t *gen_opc_end; CPUBreakpoint *b...
false
qemu
a9321a4d49d65d29c2926a51aedc5b91a01f3591
static inline void gen_intermediate_code_internal(CPUX86State *env, TranslationBlock *tb, int search_pc) { DisasContext dc1, *dc = &dc1; target_ulong pc_ptr; uint16_t *gen_opc_end; CPUBreakpoint *b...
{ "code": [], "line_no": [] }
static inline void FUNC_0(CPUX86State *VAR_0, TranslationBlock *VAR_1, int VAR_2) { DisasContext dc1, *dc = &dc1; target_ulong pc_ptr; uint16_t *gen_opc_end; CPUBreakpoint *bp; int VAR_3, VAR_...
[ "static inline void FUNC_0(CPUX86State *VAR_0,\nTranslationBlock *VAR_1,\nint VAR_2)\n{", "DisasContext dc1, *dc = &dc1;", "target_ulong pc_ptr;", "uint16_t *gen_opc_end;", "CPUBreakpoint *bp;", "int VAR_3, VAR_4;", "uint64_t flags;", "target_ulong pc_start;", "target_ulong cs_base;", "int VAR_5;"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3, 5, 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 33 ], [ 35 ], [ 37 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ...
8,251
static void vfio_probe_nvidia_bar5_quirk(VFIOPCIDevice *vdev, int nr) { VFIOQuirk *quirk; VFIONvidiaBAR5Quirk *bar5; VFIOConfigWindowQuirk *window; if (!vfio_pci_is(vdev, PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID) || !vdev->has_vga || nr != 5) { return; } quirk = g_malloc0(si...
false
qemu
f5793fd9e1fd89808f4adbfe690235b094176a37
static void vfio_probe_nvidia_bar5_quirk(VFIOPCIDevice *vdev, int nr) { VFIOQuirk *quirk; VFIONvidiaBAR5Quirk *bar5; VFIOConfigWindowQuirk *window; if (!vfio_pci_is(vdev, PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID) || !vdev->has_vga || nr != 5) { return; } quirk = g_malloc0(si...
{ "code": [], "line_no": [] }
static void FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1) { VFIOQuirk *quirk; VFIONvidiaBAR5Quirk *bar5; VFIOConfigWindowQuirk *window; if (!vfio_pci_is(VAR_0, PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID) || !VAR_0->has_vga || VAR_1 != 5) { return; } quirk = g_malloc0(sizeof(*quirk))...
[ "static void FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1)\n{", "VFIOQuirk *quirk;", "VFIONvidiaBAR5Quirk *bar5;", "VFIOConfigWindowQuirk *window;", "if (!vfio_pci_is(VAR_0, PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID) ||\n!VAR_0->has_vga || VAR_1 != 5) {", "return;", "}", "quirk = g_malloc0(sizeof(*quirk));", "quir...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13, 15 ], [ 17 ], [ 19 ], [ 23 ], [ 25 ], [ 27 ], [ 29, 31 ], [ 33 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ...
8,252
static void RENAME(lumRangeToJpeg)(int16_t *dst, int width) { int i; for (i = 0; i < width; i++) dst[i] = (FFMIN(dst[i],30189)*19077 - 39057361)>>14; }
false
FFmpeg
d1adad3cca407f493c3637e20ecd4f7124e69212
static void RENAME(lumRangeToJpeg)(int16_t *dst, int width) { int i; for (i = 0; i < width; i++) dst[i] = (FFMIN(dst[i],30189)*19077 - 39057361)>>14; }
{ "code": [], "line_no": [] }
static void FUNC_0(lumRangeToJpeg)(int16_t *dst, int width) { int VAR_0; for (VAR_0 = 0; VAR_0 < width; VAR_0++) dst[VAR_0] = (FFMIN(dst[VAR_0],30189)*19077 - 39057361)>>14; }
[ "static void FUNC_0(lumRangeToJpeg)(int16_t *dst, int width)\n{", "int VAR_0;", "for (VAR_0 = 0; VAR_0 < width; VAR_0++)", "dst[VAR_0] = (FFMIN(dst[VAR_0],30189)*19077 - 39057361)>>14;", "}" ]
[ 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ] ]
8,253
Coroutine *qemu_coroutine_create(CoroutineEntry *entry) { Coroutine *co; co = QSLIST_FIRST(&pool); if (co) { QSLIST_REMOVE_HEAD(&pool, pool_next); pool_size--; } else { co = qemu_coroutine_new(); } co->entry = entry; return co; }
false
qemu
b84c4586234b26ccc875595713f6f4491e5b3385
Coroutine *qemu_coroutine_create(CoroutineEntry *entry) { Coroutine *co; co = QSLIST_FIRST(&pool); if (co) { QSLIST_REMOVE_HEAD(&pool, pool_next); pool_size--; } else { co = qemu_coroutine_new(); } co->entry = entry; return co; }
{ "code": [], "line_no": [] }
Coroutine *FUNC_0(CoroutineEntry *entry) { Coroutine *co; co = QSLIST_FIRST(&pool); if (co) { QSLIST_REMOVE_HEAD(&pool, pool_next); pool_size--; } else { co = qemu_coroutine_new(); } co->entry = entry; return co; }
[ "Coroutine *FUNC_0(CoroutineEntry *entry)\n{", "Coroutine *co;", "co = QSLIST_FIRST(&pool);", "if (co) {", "QSLIST_REMOVE_HEAD(&pool, pool_next);", "pool_size--;", "} else {", "co = qemu_coroutine_new();", "}", "co->entry = entry;", "return co;", "}" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 25 ], [ 27 ], [ 29 ] ]
8,256
static size_t write_to_port(VirtIOSerialPort *port, const uint8_t *buf, size_t size) { VirtQueueElement elem; VirtQueue *vq; size_t offset = 0; size_t len = 0; vq = port->ivq; if (!virtio_queue_ready(vq)) { return 0; } if (!size) { ...
false
qemu
e30f328c7429d4e891ce6da26af95c607f392739
static size_t write_to_port(VirtIOSerialPort *port, const uint8_t *buf, size_t size) { VirtQueueElement elem; VirtQueue *vq; size_t offset = 0; size_t len = 0; vq = port->ivq; if (!virtio_queue_ready(vq)) { return 0; } if (!size) { ...
{ "code": [], "line_no": [] }
static size_t FUNC_0(VirtIOSerialPort *port, const uint8_t *buf, size_t size) { VirtQueueElement elem; VirtQueue *vq; size_t offset = 0; size_t len = 0; vq = port->ivq; if (!virtio_queue_ready(vq)) { return 0; } if (!size) { retur...
[ "static size_t FUNC_0(VirtIOSerialPort *port,\nconst uint8_t *buf, size_t size)\n{", "VirtQueueElement elem;", "VirtQueue *vq;", "size_t offset = 0;", "size_t len = 0;", "vq = port->ivq;", "if (!virtio_queue_ready(vq)) {", "return 0;", "}", "if (!size) {", "return 0;", "}", "while (offset < ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 39 ], [ 41 ], [ 43 ], [ 47 ], [ 49 ], [...
8,257
static char *tcg_get_arg_str_idx(TCGContext *s, char *buf, int buf_size, int idx) { TCGTemp *ts; assert(idx >= 0 && idx < s->nb_temps); ts = &s->temps[idx]; assert(ts); if (idx < s->nb_globals) { pstrcpy(buf, buf_size, ts->name); } else { ...
false
qemu
9a8a5ae69d3a436e51a7eb2edafe254572f60823
static char *tcg_get_arg_str_idx(TCGContext *s, char *buf, int buf_size, int idx) { TCGTemp *ts; assert(idx >= 0 && idx < s->nb_temps); ts = &s->temps[idx]; assert(ts); if (idx < s->nb_globals) { pstrcpy(buf, buf_size, ts->name); } else { ...
{ "code": [], "line_no": [] }
static char *FUNC_0(TCGContext *VAR_0, char *VAR_1, int VAR_2, int VAR_3) { TCGTemp *ts; assert(VAR_3 >= 0 && VAR_3 < VAR_0->nb_temps); ts = &VAR_0->temps[VAR_3]; assert(ts); if (VAR_3 < VAR_0->nb_globals) { pstrcpy(VAR_1, VAR_2, ts->name); } e...
[ "static char *FUNC_0(TCGContext *VAR_0, char *VAR_1, int VAR_2,\nint VAR_3)\n{", "TCGTemp *ts;", "assert(VAR_3 >= 0 && VAR_3 < VAR_0->nb_temps);", "ts = &VAR_0->temps[VAR_3];", "assert(ts);", "if (VAR_3 < VAR_0->nb_globals) {", "pstrcpy(VAR_1, VAR_2, ts->name);", "} else {", "if (ts->temp_local)\nsn...
[ 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 ] ]
8,258
static ImageInfoSpecific *qcow2_get_specific_info(BlockDriverState *bs) { BDRVQcow2State *s = bs->opaque; ImageInfoSpecific *spec_info = g_new(ImageInfoSpecific, 1); *spec_info = (ImageInfoSpecific){ .kind = IMAGE_INFO_SPECIFIC_KIND_QCOW2, { .qcow2 = g_new(ImageInfoSpec...
false
qemu
6a8f9661dc3c088ed0d2f5b41d940190407cbdc5
static ImageInfoSpecific *qcow2_get_specific_info(BlockDriverState *bs) { BDRVQcow2State *s = bs->opaque; ImageInfoSpecific *spec_info = g_new(ImageInfoSpecific, 1); *spec_info = (ImageInfoSpecific){ .kind = IMAGE_INFO_SPECIFIC_KIND_QCOW2, { .qcow2 = g_new(ImageInfoSpec...
{ "code": [], "line_no": [] }
static ImageInfoSpecific *FUNC_0(BlockDriverState *bs) { BDRVQcow2State *s = bs->opaque; ImageInfoSpecific *spec_info = g_new(ImageInfoSpecific, 1); *spec_info = (ImageInfoSpecific){ .kind = IMAGE_INFO_SPECIFIC_KIND_QCOW2, { .qcow2 = g_new(ImageInfoSpecificQCow2, 1), ...
[ "static ImageInfoSpecific *FUNC_0(BlockDriverState *bs)\n{", "BDRVQcow2State *s = bs->opaque;", "ImageInfoSpecific *spec_info = g_new(ImageInfoSpecific, 1);", "*spec_info = (ImageInfoSpecific){", ".kind = IMAGE_INFO_SPECIFIC_KIND_QCOW2,\n{", ".qcow2 = g_new(ImageInfoSpecificQCow2, 1),\n},", "};", "if...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13, 15 ], [ 17, 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27, 29, 31 ], [ 33 ], [ 35 ], [ 37, 39, 41, 43, 45, 47, 49, 51, 53 ], [ 55...
8,259
static void kvm_cpu_fill_host(x86_def_t *x86_cpu_def) { uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0; assert(kvm_enabled()); x86_cpu_def->name = "host"; host_cpuid(0x0, 0, &eax, &ebx, &ecx, &edx); x86_cpu_def->level = eax; x86_cpu_def->vendor1 = ebx; x86_cpu_def->vendor2 = edx; ...
false
qemu
12869995ea4f436ab76af5059fd2e9ae83c6cf9d
static void kvm_cpu_fill_host(x86_def_t *x86_cpu_def) { uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0; assert(kvm_enabled()); x86_cpu_def->name = "host"; host_cpuid(0x0, 0, &eax, &ebx, &ecx, &edx); x86_cpu_def->level = eax; x86_cpu_def->vendor1 = ebx; x86_cpu_def->vendor2 = edx; ...
{ "code": [], "line_no": [] }
static void FUNC_0(x86_def_t *VAR_0) { uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0; assert(kvm_enabled()); VAR_0->name = "host"; host_cpuid(0x0, 0, &eax, &ebx, &ecx, &edx); VAR_0->level = eax; VAR_0->vendor1 = ebx; VAR_0->vendor2 = edx; VAR_0->vendor3 = ecx; host_cpui...
[ "static void FUNC_0(x86_def_t *VAR_0)\n{", "uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0;", "assert(kvm_enabled());", "VAR_0->name = \"host\";", "host_cpuid(0x0, 0, &eax, &ebx, &ecx, &edx);", "VAR_0->level = eax;", "VAR_0->vendor1 = ebx;", "VAR_0->vendor2 = edx;", "VAR_0->vendor3 = ecx;", "host_cpu...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49...
8,260
static uint32_t scsi_init_iovec(SCSIDiskReq *r, size_t size) { SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev); if (!r->iov.iov_base) { r->buflen = size; r->iov.iov_base = qemu_blockalign(s->qdev.conf.bs, r->buflen); } r->iov.iov_len = MIN(r->sector_count * 512, r-...
false
qemu
4be746345f13e99e468c60acbd3a355e8183e3ce
static uint32_t scsi_init_iovec(SCSIDiskReq *r, size_t size) { SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev); if (!r->iov.iov_base) { r->buflen = size; r->iov.iov_base = qemu_blockalign(s->qdev.conf.bs, r->buflen); } r->iov.iov_len = MIN(r->sector_count * 512, r-...
{ "code": [], "line_no": [] }
static uint32_t FUNC_0(SCSIDiskReq *r, size_t size) { SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev); if (!r->iov.iov_base) { r->buflen = size; r->iov.iov_base = qemu_blockalign(s->qdev.conf.bs, r->buflen); } r->iov.iov_len = MIN(r->sector_count * 512, r->buflen);...
[ "static uint32_t FUNC_0(SCSIDiskReq *r, size_t size)\n{", "SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);", "if (!r->iov.iov_base) {", "r->buflen = size;", "r->iov.iov_base = qemu_blockalign(s->qdev.conf.bs, r->buflen);", "}", "r->iov.iov_len = MIN(r->sector_count * 512, r->buflen);", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ] ]
8,261
static void hax_process_section(MemoryRegionSection *section, uint8_t flags) { MemoryRegion *mr = section->mr; hwaddr start_pa = section->offset_within_address_space; ram_addr_t size = int128_get64(section->size); unsigned int delta; uint64_t host_va; /* We only care about RAM and ROM r...
false
qemu
8297be80f7cf71e09617669a8bd8b2836dcfd4c3
static void hax_process_section(MemoryRegionSection *section, uint8_t flags) { MemoryRegion *mr = section->mr; hwaddr start_pa = section->offset_within_address_space; ram_addr_t size = int128_get64(section->size); unsigned int delta; uint64_t host_va; if (!memory_region_is_ram(mr)...
{ "code": [], "line_no": [] }
static void FUNC_0(MemoryRegionSection *VAR_0, uint8_t VAR_1) { MemoryRegion *mr = VAR_0->mr; hwaddr start_pa = VAR_0->offset_within_address_space; ram_addr_t size = int128_get64(VAR_0->size); unsigned int VAR_2; uint64_t host_va; if (!memory_region_is_ram(mr)) { if (memo...
[ "static void FUNC_0(MemoryRegionSection *VAR_0, uint8_t VAR_1)\n{", "MemoryRegion *mr = VAR_0->mr;", "hwaddr start_pa = VAR_0->offset_within_address_space;", "ram_addr_t size = int128_get64(VAR_0->size);", "unsigned int VAR_2;", "uint64_t host_va;", "if (!memory_region_is_ram(mr)) {", "if (memory_regi...
[ 0, 0, 0, 0, 0, 0, 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, 29 ], [ 31 ], [ 33 ], [ 35 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ], [ 55 ], [ 57 ...
8,263
void avcodec_get_context_defaults(AVCodecContext *s){ memset(s, 0, sizeof(AVCodecContext)); s->av_class= &av_codec_context_class; s->bit_rate= 800*1000; s->bit_rate_tolerance= s->bit_rate*10; s->qmin= 2; s->qmax= 31; s->mb_qmin= 2; s->mb_qmax= 31; s->rc_eq= "tex^qComp"; ...
false
FFmpeg
6e0d8c06c7af61859e8d7bc2351a607d8abeab75
void avcodec_get_context_defaults(AVCodecContext *s){ memset(s, 0, sizeof(AVCodecContext)); s->av_class= &av_codec_context_class; s->bit_rate= 800*1000; s->bit_rate_tolerance= s->bit_rate*10; s->qmin= 2; s->qmax= 31; s->mb_qmin= 2; s->mb_qmax= 31; s->rc_eq= "tex^qComp"; ...
{ "code": [], "line_no": [] }
void FUNC_0(AVCodecContext *VAR_0){ memset(VAR_0, 0, sizeof(AVCodecContext)); VAR_0->av_class= &av_codec_context_class; VAR_0->bit_rate= 800*1000; VAR_0->bit_rate_tolerance= VAR_0->bit_rate*10; VAR_0->qmin= 2; VAR_0->qmax= 31; VAR_0->mb_qmin= 2; VAR_0->mb_qmax= 31; VAR_0->...
[ "void FUNC_0(AVCodecContext *VAR_0){", "memset(VAR_0, 0, sizeof(AVCodecContext));", "VAR_0->av_class= &av_codec_context_class;", "VAR_0->bit_rate= 800*1000;", "VAR_0->bit_rate_tolerance= VAR_0->bit_rate*10;", "VAR_0->qmin= 2;", "VAR_0->qmax= 31;", "VAR_0->mb_qmin= 2;", "VAR_0->mb_qmax= 31;", "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 ]
[ [ 1 ], [ 3 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], ...
8,264
static void gen_sraiq(DisasContext *ctx) { int sh = SH(ctx->opcode); int l1 = gen_new_label(); TCGv t0 = tcg_temp_new(); TCGv t1 = tcg_temp_new(); tcg_gen_shri_tl(t0, cpu_gpr[rS(ctx->opcode)], sh); tcg_gen_shli_tl(t1, cpu_gpr[rS(ctx->opcode)], 32 - sh); tcg_gen_or_tl(t0, t0, t1); ...
false
qemu
42a268c241183877192c376d03bd9b6d527407c7
static void gen_sraiq(DisasContext *ctx) { int sh = SH(ctx->opcode); int l1 = gen_new_label(); TCGv t0 = tcg_temp_new(); TCGv t1 = tcg_temp_new(); tcg_gen_shri_tl(t0, cpu_gpr[rS(ctx->opcode)], sh); tcg_gen_shli_tl(t1, cpu_gpr[rS(ctx->opcode)], 32 - sh); tcg_gen_or_tl(t0, t0, t1); ...
{ "code": [], "line_no": [] }
static void FUNC_0(DisasContext *VAR_0) { int VAR_1 = SH(VAR_0->opcode); int VAR_2 = gen_new_label(); TCGv t0 = tcg_temp_new(); TCGv t1 = tcg_temp_new(); tcg_gen_shri_tl(t0, cpu_gpr[rS(VAR_0->opcode)], VAR_1); tcg_gen_shli_tl(t1, cpu_gpr[rS(VAR_0->opcode)], 32 - VAR_1); tcg_gen_or_tl...
[ "static void FUNC_0(DisasContext *VAR_0)\n{", "int VAR_1 = SH(VAR_0->opcode);", "int VAR_2 = gen_new_label();", "TCGv t0 = tcg_temp_new();", "TCGv t1 = tcg_temp_new();", "tcg_gen_shri_tl(t0, cpu_gpr[rS(VAR_0->opcode)], VAR_1);", "tcg_gen_shli_tl(t1, cpu_gpr[rS(VAR_0->opcode)], 32 - VAR_1);", "tcg_gen_...
[ 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 ] ]
8,265
static const mon_cmd_t *monitor_parse_command(Monitor *mon, const char *cmdline, int start, mon_cmd_t *table, QDict *qdict) { ...
false
qemu
ae50212ff717f3d295ebff352eb7d6cc08332b7e
static const mon_cmd_t *monitor_parse_command(Monitor *mon, const char *cmdline, int start, mon_cmd_t *table, QDict *qdict) { ...
{ "code": [], "line_no": [] }
static const mon_cmd_t *FUNC_0(Monitor *mon, const char *cmdline, int start, mon_cmd_t *table, QDict *qdict) { const char *VAR...
[ "static const mon_cmd_t *FUNC_0(Monitor *mon,\nconst char *cmdline,\nint start,\nmon_cmd_t *table,\nQDict *qdict)\n{", "const char *VAR_0, *VAR_1;", "int VAR_2;", "const mon_cmd_t *VAR_3;", "char VAR_4[256];", "char VAR_5[1024];", "char *VAR_6;", "VAR_0 = get_command_name(cmdline + start, VAR_4, sizeo...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3, 5, 7, 9, 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 29 ], [ 31, 33 ], [ 37 ], [ 39 ], [ 41, 43 ], [ 45 ], [ 47 ], [ 53 ], [ 55 ], [ 57 ...
8,266
opts_start_struct(Visitor *v, void **obj, const char *kind, const char *name, size_t size, Error **errp) { OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, v); const QemuOpt *opt; *obj = g_malloc0(size > 0 ? size : 1); if (ov->depth++ > 0) { return; } ov->...
false
qemu
b774539743c52ef605c6e2cbac19376c2757cb86
opts_start_struct(Visitor *v, void **obj, const char *kind, const char *name, size_t size, Error **errp) { OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, v); const QemuOpt *opt; *obj = g_malloc0(size > 0 ? size : 1); if (ov->depth++ > 0) { return; } ov->...
{ "code": [], "line_no": [] }
FUNC_0(Visitor *VAR_0, void **VAR_1, const char *VAR_2, const char *VAR_3, size_t VAR_4, Error **VAR_5) { OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, VAR_0); const QemuOpt *VAR_6; *VAR_1 = g_malloc0(VAR_4 > 0 ? VAR_4 : 1); if (ov->depth++ > 0) { return; } ...
[ "FUNC_0(Visitor *VAR_0, void **VAR_1, const char *VAR_2,\nconst char *VAR_3, size_t VAR_4, Error **VAR_5)\n{", "OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, VAR_0);", "const QemuOpt *VAR_6;", "*VAR_1 = g_malloc0(VAR_4 > 0 ? VAR_4 : 1);", "if (ov->depth++ > 0) {", "return;", "}", "ov->unprocessed_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 23, 25 ], [ 27 ], [ 31 ], [ 35 ], [ 37 ], [ 41 ], [ 43 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ], [ 55 ...
8,267
static UserDefTwo *nested_struct_create(void) { UserDefTwo *udnp = g_malloc0(sizeof(*udnp)); udnp->string0 = strdup("test_string0"); udnp->dict1 = g_malloc0(sizeof(*udnp->dict1)); udnp->dict1->string1 = strdup("test_string1"); udnp->dict1->dict2 = g_malloc0(sizeof(*udnp->dict1->dict2)); u...
false
qemu
ddf21908961073199f3d186204da4810f2ea150b
static UserDefTwo *nested_struct_create(void) { UserDefTwo *udnp = g_malloc0(sizeof(*udnp)); udnp->string0 = strdup("test_string0"); udnp->dict1 = g_malloc0(sizeof(*udnp->dict1)); udnp->dict1->string1 = strdup("test_string1"); udnp->dict1->dict2 = g_malloc0(sizeof(*udnp->dict1->dict2)); u...
{ "code": [], "line_no": [] }
static UserDefTwo *FUNC_0(void) { UserDefTwo *udnp = g_malloc0(sizeof(*udnp)); udnp->string0 = strdup("test_string0"); udnp->dict1 = g_malloc0(sizeof(*udnp->dict1)); udnp->dict1->string1 = strdup("test_string1"); udnp->dict1->dict2 = g_malloc0(sizeof(*udnp->dict1->dict2)); udnp->dict1->di...
[ "static UserDefTwo *FUNC_0(void)\n{", "UserDefTwo *udnp = g_malloc0(sizeof(*udnp));", "udnp->string0 = strdup(\"test_string0\");", "udnp->dict1 = g_malloc0(sizeof(*udnp->dict1));", "udnp->dict1->string1 = strdup(\"test_string1\");", "udnp->dict1->dict2 = g_malloc0(sizeof(*udnp->dict1->dict2));", "udnp->...
[ 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 ...
8,268
static void gem_write(void *opaque, hwaddr offset, uint64_t val, unsigned size) { GemState *s = (GemState *)opaque; uint32_t readonly; DB_PRINT("offset: 0x%04x write: 0x%08x ", (unsigned)offset, (unsigned)val); offset >>= 2; /* Squash bits which are read only in write value */ ...
false
qemu
8202aa539135a44906c38f82a469234ec65e0ef7
static void gem_write(void *opaque, hwaddr offset, uint64_t val, unsigned size) { GemState *s = (GemState *)opaque; uint32_t readonly; DB_PRINT("offset: 0x%04x write: 0x%08x ", (unsigned)offset, (unsigned)val); offset >>= 2; val &= ~(s->regs_ro[offset]); readonly ...
{ "code": [], "line_no": [] }
static void FUNC_0(void *VAR_0, hwaddr VAR_1, uint64_t VAR_2, unsigned VAR_3) { GemState *s = (GemState *)VAR_0; uint32_t readonly; DB_PRINT("VAR_1: 0x%04x write: 0x%08x ", (unsigned)VAR_1, (unsigned)VAR_2); VAR_1 >>= 2; VAR_2 &= ~(s->regs_ro[VAR_1]); readonly = s...
[ "static void FUNC_0(void *VAR_0, hwaddr VAR_1, uint64_t VAR_2,\nunsigned VAR_3)\n{", "GemState *s = (GemState *)VAR_0;", "uint32_t readonly;", "DB_PRINT(\"VAR_1: 0x%04x write: 0x%08x \", (unsigned)VAR_1, (unsigned)VAR_2);", "VAR_1 >>= 2;", "VAR_2 &= ~(s->regs_ro[VAR_1]);", "readonly = s->regs[VAR_1] & (...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15 ], [ 21 ], [ 25 ], [ 31 ], [ 37 ], [ 43 ], [ 45, 47 ], [ 49 ], [ 51 ], [ 53 ], [ 55 ], [ 57 ], [ 59 ], [ 63 ], [ 65 ...
8,269
uint32_t cpu_ppc_load_decr (CPUState *env) { ppc_tb_t *tb_env = env->tb_env; uint32_t decr; decr = muldiv64(tb_env->decr_next - qemu_get_clock(vm_clock), tb_env->tb_freq, ticks_per_sec); #if defined(DEBUG_TB) printf("%s: 0x%08x\n", __func__, decr); #endif return decr...
false
qemu
4e588a4d0e1683488282658c057d4b44976d77d8
uint32_t cpu_ppc_load_decr (CPUState *env) { ppc_tb_t *tb_env = env->tb_env; uint32_t decr; decr = muldiv64(tb_env->decr_next - qemu_get_clock(vm_clock), tb_env->tb_freq, ticks_per_sec); #if defined(DEBUG_TB) printf("%s: 0x%08x\n", __func__, decr); #endif return decr...
{ "code": [], "line_no": [] }
uint32_t FUNC_0 (CPUState *env) { ppc_tb_t *tb_env = env->tb_env; uint32_t decr; decr = muldiv64(tb_env->decr_next - qemu_get_clock(vm_clock), tb_env->tb_freq, ticks_per_sec); #if defined(DEBUG_TB) printf("%s: 0x%08x\n", __func__, decr); #endif return decr; }
[ "uint32_t FUNC_0 (CPUState *env)\n{", "ppc_tb_t *tb_env = env->tb_env;", "uint32_t decr;", "decr = muldiv64(tb_env->decr_next - qemu_get_clock(vm_clock),\ntb_env->tb_freq, ticks_per_sec);", "#if defined(DEBUG_TB)\nprintf(\"%s: 0x%08x\\n\", __func__, decr);", "#endif\nreturn decr;", "}" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11, 13 ], [ 15, 17 ], [ 19, 23 ], [ 25 ] ]
8,270
static int wm8750_event(I2CSlave *i2c, enum i2c_event event) { WM8750State *s = WM8750(i2c); switch (event) { case I2C_START_SEND: s->i2c_len = 0; break; case I2C_FINISH: #ifdef VERBOSE if (s->i2c_len < 2) printf("%s: message too short (%i bytes)\n", ...
false
qemu
a89f364ae8740dfc31b321eed9ee454e996dc3c1
static int wm8750_event(I2CSlave *i2c, enum i2c_event event) { WM8750State *s = WM8750(i2c); switch (event) { case I2C_START_SEND: s->i2c_len = 0; break; case I2C_FINISH: #ifdef VERBOSE if (s->i2c_len < 2) printf("%s: message too short (%i bytes)\n", ...
{ "code": [], "line_no": [] }
static int FUNC_0(I2CSlave *VAR_0, enum i2c_event VAR_1) { WM8750State *s = WM8750(VAR_0); switch (VAR_1) { case I2C_START_SEND: s->i2c_len = 0; break; case I2C_FINISH: #ifdef VERBOSE if (s->i2c_len < 2) printf("%s: message too short (%i bytes)\n", ...
[ "static int FUNC_0(I2CSlave *VAR_0, enum i2c_event VAR_1)\n{", "WM8750State *s = WM8750(VAR_0);", "switch (VAR_1) {", "case I2C_START_SEND:\ns->i2c_len = 0;", "break;", "case I2C_FINISH:\n#ifdef VERBOSE\nif (s->i2c_len < 2)\nprintf(\"%s: message too short (%i bytes)\\n\",\n__FUNCTION__, s->i2c_len);", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11, 13 ], [ 15 ], [ 17, 19, 21, 23, 25 ], [ 27, 29 ], [ 31, 33 ], [ 35 ], [ 39 ], [ 41 ] ]
8,272
static int amr_wb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) { AMRWBContext *s = avctx->priv_data; const int16_t *samples = (const int16_t *)frame->data[0]; int size, ret; if ((ret = ff_alloc_packet2(avctx, avpkt...
false
FFmpeg
bcaf64b605442e1622d16da89d4ec0e7730b8a8c
static int amr_wb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) { AMRWBContext *s = avctx->priv_data; const int16_t *samples = (const int16_t *)frame->data[0]; int size, ret; if ((ret = ff_alloc_packet2(avctx, avpkt...
{ "code": [], "line_no": [] }
static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1, const AVFrame *VAR_2, int *VAR_3) { AMRWBContext *s = VAR_0->priv_data; const int16_t *VAR_4 = (const int16_t *)VAR_2->data[0]; int VAR_5, VAR_6; if ((VAR_6 = ff_alloc_packet2(VAR_0, VAR_1, MAX_PACKET_SIZE))...
[ "static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,\nconst AVFrame *VAR_2, int *VAR_3)\n{", "AMRWBContext *s = VAR_0->priv_data;", "const int16_t *VAR_4 = (const int16_t *)VAR_2->data[0];", "int VAR_5, VAR_6;", "if ((VAR_6 = ff_alloc_packet2(VAR_0, VAR_1, MAX_PACKET_SIZE)))\nreturn VAR_6;", "if (s-...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15, 17 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 41, 43 ], [ 47 ], [ 49 ], [ 51 ], [...
8,275
static int decode_2(SANMVideoContext *ctx) { int cx, cy, ret; for (cy = 0; cy != ctx->aligned_height; cy += 8) { for (cx = 0; cx != ctx->aligned_width; cx += 8) { if (ret = codec2subblock(ctx, cx, cy, 8)) return ret; } } return 0; }
false
FFmpeg
3b9dd906d18f4cd801ceedd20d800a7e53074be9
static int decode_2(SANMVideoContext *ctx) { int cx, cy, ret; for (cy = 0; cy != ctx->aligned_height; cy += 8) { for (cx = 0; cx != ctx->aligned_width; cx += 8) { if (ret = codec2subblock(ctx, cx, cy, 8)) return ret; } } return 0; }
{ "code": [], "line_no": [] }
static int FUNC_0(SANMVideoContext *VAR_0) { int VAR_1, VAR_2, VAR_3; for (VAR_2 = 0; VAR_2 != VAR_0->aligned_height; VAR_2 += 8) { for (VAR_1 = 0; VAR_1 != VAR_0->aligned_width; VAR_1 += 8) { if (VAR_3 = codec2subblock(VAR_0, VAR_1, VAR_2, 8)) return VAR_3; ...
[ "static int FUNC_0(SANMVideoContext *VAR_0)\n{", "int VAR_1, VAR_2, VAR_3;", "for (VAR_2 = 0; VAR_2 != VAR_0->aligned_height; VAR_2 += 8) {", "for (VAR_1 = 0; VAR_1 != VAR_0->aligned_width; VAR_1 += 8) {", "if (VAR_3 = codec2subblock(VAR_0, VAR_1, VAR_2, 8))\nreturn VAR_3;", "}", "}", "return 0;", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13, 15 ], [ 17 ], [ 19 ], [ 23 ], [ 25 ] ]
8,277
static bool cmd_write_pio(IDEState *s, uint8_t cmd) { bool lba48 = (cmd == WIN_WRITE_EXT); if (!s->bs) { ide_abort_command(s); return true; } ide_cmd_lba48_transform(s, lba48); s->req_nb_sectors = 1; s->status = SEEK_STAT | READY_STAT; ide_transfer_start(s, s-...
false
qemu
4be746345f13e99e468c60acbd3a355e8183e3ce
static bool cmd_write_pio(IDEState *s, uint8_t cmd) { bool lba48 = (cmd == WIN_WRITE_EXT); if (!s->bs) { ide_abort_command(s); return true; } ide_cmd_lba48_transform(s, lba48); s->req_nb_sectors = 1; s->status = SEEK_STAT | READY_STAT; ide_transfer_start(s, s-...
{ "code": [], "line_no": [] }
static bool FUNC_0(IDEState *s, uint8_t cmd) { bool lba48 = (cmd == WIN_WRITE_EXT); if (!s->bs) { ide_abort_command(s); return true; } ide_cmd_lba48_transform(s, lba48); s->req_nb_sectors = 1; s->status = SEEK_STAT | READY_STAT; ide_transfer_start(s, s->io_buf...
[ "static bool FUNC_0(IDEState *s, uint8_t cmd)\n{", "bool lba48 = (cmd == WIN_WRITE_EXT);", "if (!s->bs) {", "ide_abort_command(s);", "return true;", "}", "ide_cmd_lba48_transform(s, lba48);", "s->req_nb_sectors = 1;", "s->status = SEEK_STAT | READY_STAT;", "ide_transfer_start(s, s->io_buffer, 512,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 23 ], [ 25 ], [ 27 ], [ 31 ], [ 35 ], [ 37 ] ]
8,278
static uint64_t cirrus_mmio_read(void *opaque, target_phys_addr_t addr, unsigned size) { CirrusVGAState *s = opaque; if (addr >= 0x100) { return cirrus_mmio_blt_read(s, addr - 0x100); } else { return cirrus_vga_ioport_read(s, addr + 0x3c0); } }...
false
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
static uint64_t cirrus_mmio_read(void *opaque, target_phys_addr_t addr, unsigned size) { CirrusVGAState *s = opaque; if (addr >= 0x100) { return cirrus_mmio_blt_read(s, addr - 0x100); } else { return cirrus_vga_ioport_read(s, addr + 0x3c0); } }...
{ "code": [], "line_no": [] }
static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr, unsigned size) { CirrusVGAState *s = opaque; if (addr >= 0x100) { return cirrus_mmio_blt_read(s, addr - 0x100); } else { return cirrus_vga_ioport_read(s, addr + 0x3c0); } }
[ "static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,\nunsigned size)\n{", "CirrusVGAState *s = opaque;", "if (addr >= 0x100) {", "return cirrus_mmio_blt_read(s, addr - 0x100);", "} else {", "return cirrus_vga_ioport_read(s, addr + 0x3c0);", "}", "}" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ] ]
8,279
static int ffv1_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet) { FFV1Context *f = avctx->priv_data; RangeCoder *const c = &f->slice_context[0]->c; int used_count = 0; uint8_t keystate = 128; uint8_t *buf_p; in...
false
FFmpeg
4bb1070c154e49d35805fbcdac9c9e92f702ef96
static int ffv1_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet) { FFV1Context *f = avctx->priv_data; RangeCoder *const c = &f->slice_context[0]->c; int used_count = 0; uint8_t keystate = 128; uint8_t *buf_p; in...
{ "code": [], "line_no": [] }
static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1, const AVFrame *VAR_2, int *VAR_3) { FFV1Context *f = VAR_0->priv_data; RangeCoder *const c = &f->slice_context[0]->c; int VAR_4 = 0; uint8_t keystate = 128; uint8_t *buf_p; int VAR_7, VAR_6; ...
[ "static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,\nconst AVFrame *VAR_2, int *VAR_3)\n{", "FFV1Context *f = VAR_0->priv_data;", "RangeCoder *const c = &f->slice_context[0]->c;", "int VAR_4 = 0;", "uint8_t keystate = 128;", "uint8_t *buf_p;", "int VAR_7, VAR_6;", "f->frame = VAR_2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 21 ], [ 25, 27, 29 ], [ 31 ], [ 33 ], [ 35 ], [ 39 ], [ 41 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [...
8,280
static void setup_frame(int usig, struct emulated_sigaction *ka, target_sigset_t *set, CPUState *regs) { struct sigframe *frame; abi_ulong frame_addr = get_sigframe(ka, regs, sizeof(*frame)); int i, err = 0; if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 0)) return; err |= setup_sigcontext...
false
qemu
f8b0aa25599782eef91edc00ebf620bd14db720c
static void setup_frame(int usig, struct emulated_sigaction *ka, target_sigset_t *set, CPUState *regs) { struct sigframe *frame; abi_ulong frame_addr = get_sigframe(ka, regs, sizeof(*frame)); int i, err = 0; if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 0)) return; err |= setup_sigcontext...
{ "code": [], "line_no": [] }
static void FUNC_0(int VAR_0, struct emulated_sigaction *VAR_1, target_sigset_t *VAR_2, CPUState *VAR_3) { struct sigframe *VAR_4; abi_ulong frame_addr = get_sigframe(VAR_1, VAR_3, sizeof(*VAR_4)); int VAR_5, VAR_6 = 0; if (!lock_user_struct(VERIFY_WRITE, VAR_4, frame_addr, 0)) return; VAR_6 |= se...
[ "static void FUNC_0(int VAR_0, struct emulated_sigaction *VAR_1,\ntarget_sigset_t *VAR_2, CPUState *VAR_3)\n{", "struct sigframe *VAR_4;", "abi_ulong frame_addr = get_sigframe(VAR_1, VAR_3, sizeof(*VAR_4));", "int VAR_5, VAR_6 = 0;", "if (!lock_user_struct(VERIFY_WRITE, VAR_4, frame_addr, 0))\nreturn;", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15, 17 ], [ 21 ], [ 25 ], [ 27, 29 ], [ 31 ], [ 35, 37 ], [ 41, 43 ], [ 47 ] ]
8,281
int qemu_uuid_parse(const char *str, uint8_t *uuid) { int ret; if(strlen(str) != 36) return -1; ret = sscanf(str, UUID_FMT, &uuid[0], &uuid[1], &uuid[2], &uuid[3], &uuid[4], &uuid[5], &uuid[6], &uuid[7], &uuid[8], &uuid[9], &uuid[10], &uuid[11], &uuid[12], &uuid[13...
false
qemu
ad96090a01d848df67d70c5259ed8aa321fa8716
int qemu_uuid_parse(const char *str, uint8_t *uuid) { int ret; if(strlen(str) != 36) return -1; ret = sscanf(str, UUID_FMT, &uuid[0], &uuid[1], &uuid[2], &uuid[3], &uuid[4], &uuid[5], &uuid[6], &uuid[7], &uuid[8], &uuid[9], &uuid[10], &uuid[11], &uuid[12], &uuid[13...
{ "code": [], "line_no": [] }
int FUNC_0(const char *VAR_0, uint8_t *VAR_1) { int VAR_2; if(strlen(VAR_0) != 36) return -1; VAR_2 = sscanf(VAR_0, UUID_FMT, &VAR_1[0], &VAR_1[1], &VAR_1[2], &VAR_1[3], &VAR_1[4], &VAR_1[5], &VAR_1[6], &VAR_1[7], &VAR_1[8], &VAR_1[9], &VAR_1[10], &VAR_1[11], &VAR_...
[ "int FUNC_0(const char *VAR_0, uint8_t *VAR_1)\n{", "int VAR_2;", "if(strlen(VAR_0) != 36)\nreturn -1;", "VAR_2 = sscanf(VAR_0, UUID_FMT, &VAR_1[0], &VAR_1[1], &VAR_1[2], &VAR_1[3],\n&VAR_1[4], &VAR_1[5], &VAR_1[6], &VAR_1[7], &VAR_1[8], &VAR_1[9],\n&VAR_1[10], &VAR_1[11], &VAR_1[12], &VAR_1[13], &VAR_1[14], ...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9, 11 ], [ 15, 17, 19 ], [ 23, 25 ], [ 29, 31 ], [ 33, 37 ], [ 39 ] ]
8,282
QError *qerror_from_info(const char *file, int linenr, const char *func, const char *fmt, va_list *va) { QError *qerr; qerr = qerror_new(); loc_save(&qerr->loc); qerr->linenr = linenr; qerr->file = file; qerr->func = func; if (!fmt) { qerror_abo...
false
qemu
2a74440547ea0a15195224fa2b7784b267cbfe15
QError *qerror_from_info(const char *file, int linenr, const char *func, const char *fmt, va_list *va) { QError *qerr; qerr = qerror_new(); loc_save(&qerr->loc); qerr->linenr = linenr; qerr->file = file; qerr->func = func; if (!fmt) { qerror_abo...
{ "code": [], "line_no": [] }
QError *FUNC_0(const char *file, int linenr, const char *func, const char *fmt, va_list *va) { QError *qerr; qerr = qerror_new(); loc_save(&qerr->loc); qerr->linenr = linenr; qerr->file = file; qerr->func = func; if (!fmt) { qerror_abort(qerr, "...
[ "QError *FUNC_0(const char *file, int linenr, const char *func,\nconst char *fmt, va_list *va)\n{", "QError *qerr;", "qerr = qerror_new();", "loc_save(&qerr->loc);", "qerr->linenr = linenr;", "qerr->file = file;", "qerr->func = func;", "if (!fmt) {", "qerror_abort(qerr, \"QDict not specified\");", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 23 ], [ 25 ], [ 27 ], [ 31 ], [ 33 ], [ 37 ], [ 39 ] ]
8,283
fork_exec(struct socket *so, const char *ex, int do_pty) { int s; struct sockaddr_in addr; int addrlen = sizeof(addr); int opt; int master = -1; char *argv[256]; #if 0 char buff[256]; #endif /* don't want to clobber the original */ char *bptr; const char *curarg; int c, i, ret; DEBUG...
false
qemu
242acf3af4605adce933906bdc053b2414181ec7
fork_exec(struct socket *so, const char *ex, int do_pty) { int s; struct sockaddr_in addr; int addrlen = sizeof(addr); int opt; int master = -1; char *argv[256]; #if 0 char buff[256]; #endif char *bptr; const char *curarg; int c, i, ret; DEBUG_CALL("fork_exec"); DEBUG_ARG("so = %l...
{ "code": [], "line_no": [] }
FUNC_0(struct socket *VAR_0, const char *VAR_1, int VAR_2) { int VAR_3; struct sockaddr_in VAR_4; int VAR_5 = sizeof(VAR_4); int VAR_6; int VAR_7 = -1; char *VAR_8[256]; #if 0 char VAR_14[256]; #endif char *VAR_9; const char *VAR_10; int VAR_11, VAR_12, VAR_13; DEBUG_CALL("FUNC_0");...
[ "FUNC_0(struct socket *VAR_0, const char *VAR_1, int VAR_2)\n{", "int VAR_3;", "struct sockaddr_in VAR_4;", "int VAR_5 = sizeof(VAR_4);", "int VAR_6;", "int VAR_7 = -1;", "char *VAR_8[256];", "#if 0\nchar VAR_14[256];", "#endif\nchar *VAR_9;", "const char *VAR_10;", "int VAR_11, VAR_12, VAR_13;"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 43 ], [ 45, 47 ], [ 49 ], [...
8,285
static int bmdma_prepare_buf(IDEDMA *dma, int is_write) { BMDMAState *bm = DO_UPCAST(BMDMAState, dma, dma); IDEState *s = bmdma_active_if(bm); struct { uint32_t addr; uint32_t size; } prd; int l, len; qemu_sglist_init(&s->sg, s->nsector / (BMDMA_PAGE_SIZE / 512) + 1); ...
false
qemu
552908fef5b67ad9d96b76d7cb8371ebc26c9bc8
static int bmdma_prepare_buf(IDEDMA *dma, int is_write) { BMDMAState *bm = DO_UPCAST(BMDMAState, dma, dma); IDEState *s = bmdma_active_if(bm); struct { uint32_t addr; uint32_t size; } prd; int l, len; qemu_sglist_init(&s->sg, s->nsector / (BMDMA_PAGE_SIZE / 512) + 1); ...
{ "code": [], "line_no": [] }
static int FUNC_0(IDEDMA *VAR_0, int VAR_1) { BMDMAState *bm = DO_UPCAST(BMDMAState, VAR_0, VAR_0); IDEState *s = bmdma_active_if(bm); struct { uint32_t addr; uint32_t size; } VAR_2; int VAR_3, VAR_4; qemu_sglist_init(&s->sg, s->nsector / (BMDMA_PAGE_SIZE / 512) + 1); ...
[ "static int FUNC_0(IDEDMA *VAR_0, int VAR_1)\n{", "BMDMAState *bm = DO_UPCAST(BMDMAState, VAR_0, VAR_0);", "IDEState *s = bmdma_active_if(bm);", "struct {", "uint32_t addr;", "uint32_t size;", "} VAR_2;", "int VAR_3, VAR_4;", "qemu_sglist_init(&s->sg, s->nsector / (BMDMA_PAGE_SIZE / 512) + 1);", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 31, 33, 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47,...
8,286
void timer_mod(QEMUTimer *ts, int64_t expire_time) { timer_mod_ns(ts, expire_time * ts->scale); }
false
qemu
c2b38b277a7882a592f4f2ec955084b2b756daaa
void timer_mod(QEMUTimer *ts, int64_t expire_time) { timer_mod_ns(ts, expire_time * ts->scale); }
{ "code": [], "line_no": [] }
void FUNC_0(QEMUTimer *VAR_0, int64_t VAR_1) { timer_mod_ns(VAR_0, VAR_1 * VAR_0->scale); }
[ "void FUNC_0(QEMUTimer *VAR_0, int64_t VAR_1)\n{", "timer_mod_ns(VAR_0, VAR_1 * VAR_0->scale);", "}" ]
[ 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ] ]
8,287
ram_addr_t qemu_ram_alloc_from_ptr(DeviceState *dev, const char *name, ram_addr_t size, void *host) { RAMBlock *new_block, *block; size = TARGET_PAGE_ALIGN(size); new_block = qemu_mallocz(sizeof(*new_block)); if (dev && dev->parent_bus && dev->parent_bus->info->get_dev_...
false
qemu
6977dfe6af975d72a8140dbc91effe8b8f2a58f8
ram_addr_t qemu_ram_alloc_from_ptr(DeviceState *dev, const char *name, ram_addr_t size, void *host) { RAMBlock *new_block, *block; size = TARGET_PAGE_ALIGN(size); new_block = qemu_mallocz(sizeof(*new_block)); if (dev && dev->parent_bus && dev->parent_bus->info->get_dev_...
{ "code": [], "line_no": [] }
ram_addr_t FUNC_0(DeviceState *dev, const char *name, ram_addr_t size, void *host) { RAMBlock *new_block, *block; size = TARGET_PAGE_ALIGN(size); new_block = qemu_mallocz(sizeof(*new_block)); if (dev && dev->parent_bus && dev->parent_bus->info->get_dev_path) { ...
[ "ram_addr_t FUNC_0(DeviceState *dev, const char *name,\nram_addr_t size, void *host)\n{", "RAMBlock *new_block, *block;", "size = TARGET_PAGE_ALIGN(size);", "new_block = qemu_mallocz(sizeof(*new_block));", "if (dev && dev->parent_bus && dev->parent_bus->info->get_dev_path) {", "char *VAR_0 = dev->parent_b...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 35 ], [ 37 ], [ 39, 41 ], [ 43 ], [ 45 ], [ 47 ], [ 51...
8,288
static bool qemu_opt_get_bool_helper(QemuOpts *opts, const char *name, bool defval, bool del) { QemuOpt *opt = qemu_opt_find(opts, name); bool ret = defval; if (opt == NULL) { const QemuOptDesc *desc = find_desc_by_name(opts->list->desc, name); i...
false
qemu
435db4cf29b88b6612e30acda01cd18788dff458
static bool qemu_opt_get_bool_helper(QemuOpts *opts, const char *name, bool defval, bool del) { QemuOpt *opt = qemu_opt_find(opts, name); bool ret = defval; if (opt == NULL) { const QemuOptDesc *desc = find_desc_by_name(opts->list->desc, name); i...
{ "code": [], "line_no": [] }
static bool FUNC_0(QemuOpts *opts, const char *name, bool defval, bool del) { QemuOpt *opt = qemu_opt_find(opts, name); bool ret = defval; if (opt == NULL) { const QemuOptDesc *VAR_0 = find_desc_by_name(opts->list->VAR_0, name); if (VAR_0 && VAR_...
[ "static bool FUNC_0(QemuOpts *opts, const char *name,\nbool defval, bool del)\n{", "QemuOpt *opt = qemu_opt_find(opts, name);", "bool ret = defval;", "if (opt == NULL) {", "const QemuOptDesc *VAR_0 = find_desc_by_name(opts->list->VAR_0, name);", "if (VAR_0 && VAR_0->def_value_str) {", "parse_option_bool...
[ 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 ] ]
8,289
static void tcg_out_reloc(TCGContext *s, tcg_insn_unit *code_ptr, int type, int label_index, intptr_t addend) { TCGLabel *l; TCGRelocation *r; l = &s->labels[label_index]; if (l->has_value) { /* FIXME: This may break relocations on RISC targets that ...
false
qemu
bec1631100323fac0900aea71043d5c4e22fc2fa
static void tcg_out_reloc(TCGContext *s, tcg_insn_unit *code_ptr, int type, int label_index, intptr_t addend) { TCGLabel *l; TCGRelocation *r; l = &s->labels[label_index]; if (l->has_value) { patch_reloc(code_ptr, type, l->u.value, addend); }...
{ "code": [], "line_no": [] }
static void FUNC_0(TCGContext *VAR_0, tcg_insn_unit *VAR_1, int VAR_2, int VAR_3, intptr_t VAR_4) { TCGLabel *l; TCGRelocation *r; l = &VAR_0->labels[VAR_3]; if (l->has_value) { patch_reloc(VAR_1, VAR_2, l->u.value, VAR_4); } else { ...
[ "static void FUNC_0(TCGContext *VAR_0, tcg_insn_unit *VAR_1, int VAR_2,\nint VAR_3, intptr_t VAR_4)\n{", "TCGLabel *l;", "TCGRelocation *r;", "l = &VAR_0->labels[VAR_3];", "if (l->has_value) {", "patch_reloc(VAR_1, VAR_2, l->u.value, VAR_4);", "} else {", "r = tcg_malloc(sizeof(TCGRelocation));", "r...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15 ], [ 23 ], [ 25 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ] ]
8,290
static int mov_write_packet(AVFormatContext *s, int stream_index, const uint8_t *buf, int size, int64_t pts) { MOVContext *mov = s->priv_data; ByteIOContext *pb = &s->pb; AVCodecContext *enc = &s->streams[stream_index]->codec; MOVTrack* trk = &mov->tracks[stream_index];...
false
FFmpeg
69dde1ad36b7d95b8b9268f414aa6c076212ed41
static int mov_write_packet(AVFormatContext *s, int stream_index, const uint8_t *buf, int size, int64_t pts) { MOVContext *mov = s->priv_data; ByteIOContext *pb = &s->pb; AVCodecContext *enc = &s->streams[stream_index]->codec; MOVTrack* trk = &mov->tracks[stream_index];...
{ "code": [], "line_no": [] }
static int FUNC_0(AVFormatContext *VAR_0, int VAR_1, const uint8_t *VAR_2, int VAR_3, int64_t VAR_4) { MOVContext *mov = VAR_0->priv_data; ByteIOContext *pb = &VAR_0->pb; AVCodecContext *enc = &VAR_0->streams[VAR_1]->codec; MOVTrack* trk = &mov->tracks[VAR_1]; int ...
[ "static int FUNC_0(AVFormatContext *VAR_0, int VAR_1,\nconst uint8_t *VAR_2, int VAR_3, int64_t VAR_4)\n{", "MOVContext *mov = VAR_0->priv_data;", "ByteIOContext *pb = &VAR_0->pb;", "AVCodecContext *enc = &VAR_0->streams[VAR_1]->codec;", "MOVTrack* trk = &mov->tracks[VAR_1];", "int VAR_5, VAR_6;", "unsi...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 39, 41 ], [ 43 ], [ 47 ], [ 49 ], [ 51 ...
8,292
static uint32_t nvdimm_get_max_xfer_label_size(void) { uint32_t max_get_size, max_set_size, dsm_memory_size = 4096; /* * the max data ACPI can read one time which is transferred by * the response of 'Get Namespace Label Data' function. */ max_get_size = dsm_memory_size - sizeof(Nvdim...
false
qemu
cb88ebd7542458c22f3051646f268dcea6109abc
static uint32_t nvdimm_get_max_xfer_label_size(void) { uint32_t max_get_size, max_set_size, dsm_memory_size = 4096; max_get_size = dsm_memory_size - sizeof(NvdimmFuncGetLabelDataOut); max_set_size = dsm_memory_size - offsetof(NvdimmDsmIn, arg3) - sizeof(Nv...
{ "code": [], "line_no": [] }
static uint32_t FUNC_0(void) { uint32_t max_get_size, max_set_size, dsm_memory_size = 4096; max_get_size = dsm_memory_size - sizeof(NvdimmFuncGetLabelDataOut); max_set_size = dsm_memory_size - offsetof(NvdimmDsmIn, arg3) - sizeof(NvdimmFuncSetLabelDataIn);...
[ "static uint32_t FUNC_0(void)\n{", "uint32_t max_get_size, max_set_size, dsm_memory_size = 4096;", "max_get_size = dsm_memory_size - sizeof(NvdimmFuncGetLabelDataOut);", "max_set_size = dsm_memory_size - offsetof(NvdimmDsmIn, arg3) -\nsizeof(NvdimmFuncSetLabelDataIn);", "return MIN(max_get_size, max_set_siz...
[ 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 17 ], [ 29, 31 ], [ 35 ], [ 37 ] ]
8,293
static void imx_fec_write(void *opaque, hwaddr addr, uint64_t value, unsigned size) { IMXFECState *s = IMX_FEC(opaque); FEC_PRINTF("writing 0x%08x @ 0x%" HWADDR_PRIx "\n", (int)value, addr); switch (addr & 0x3ff) { case 0x004: /* EIR */ s->eir &= ~value; ...
false
qemu
4816dc168b5745708eba4c005f5e8771623ee405
static void imx_fec_write(void *opaque, hwaddr addr, uint64_t value, unsigned size) { IMXFECState *s = IMX_FEC(opaque); FEC_PRINTF("writing 0x%08x @ 0x%" HWADDR_PRIx "\n", (int)value, addr); switch (addr & 0x3ff) { case 0x004: s->eir &= ~value; brea...
{ "code": [], "line_no": [] }
static void FUNC_0(void *VAR_0, hwaddr VAR_1, uint64_t VAR_2, unsigned VAR_3) { IMXFECState *s = IMX_FEC(VAR_0); FEC_PRINTF("writing 0x%08x @ 0x%" HWADDR_PRIx "\n", (int)VAR_2, VAR_1); switch (VAR_1 & 0x3ff) { case 0x004: s->eir &= ~VAR_2; break; ...
[ "static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{", "IMXFECState *s = IMX_FEC(VAR_0);", "FEC_PRINTF(\"writing 0x%08x @ 0x%\" HWADDR_PRIx \"\\n\", (int)VAR_2, VAR_1);", "switch (VAR_1 & 0x3ff) {", "case 0x004:\ns->eir &= ~VAR_2;", "break;", "case 0x008:\ns->eimr = VAR_2;"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3, 5 ], [ 7 ], [ 11 ], [ 15 ], [ 17, 19 ], [ 21 ], [ 23, 25 ], [ 27 ], [ 29, 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39, 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49, 51...
8,294
static void replay_enable(const char *fname, int mode) { const char *fmode = NULL; assert(!replay_file); switch (mode) { case REPLAY_MODE_RECORD: fmode = "wb"; break; case REPLAY_MODE_PLAY: fmode = "rb"; break; default: fprintf(stderr, "Repla...
false
qemu
f186d64d8fda4bb22c15beb8e45b7814fbd8b51e
static void replay_enable(const char *fname, int mode) { const char *fmode = NULL; assert(!replay_file); switch (mode) { case REPLAY_MODE_RECORD: fmode = "wb"; break; case REPLAY_MODE_PLAY: fmode = "rb"; break; default: fprintf(stderr, "Repla...
{ "code": [], "line_no": [] }
static void FUNC_0(const char *VAR_0, int VAR_1) { const char *VAR_2 = NULL; assert(!replay_file); switch (VAR_1) { case REPLAY_MODE_RECORD: VAR_2 = "wb"; break; case REPLAY_MODE_PLAY: VAR_2 = "rb"; break; default: fprintf(stderr, "Replay: in...
[ "static void FUNC_0(const char *VAR_0, int VAR_1)\n{", "const char *VAR_2 = NULL;", "assert(!replay_file);", "switch (VAR_1) {", "case REPLAY_MODE_RECORD:\nVAR_2 = \"wb\";", "break;", "case REPLAY_MODE_PLAY:\nVAR_2 = \"rb\";", "break;", "default:\nfprintf(stderr, \"Replay: internal error: invalid re...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13, 15 ], [ 17 ], [ 19, 21 ], [ 23 ], [ 25, 27 ], [ 29 ], [ 31 ], [ 35 ], [ 39 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], ...
8,295
static bool raw_is_inserted(BlockDriverState *bs) { return bdrv_is_inserted(bs->file->bs); }
false
qemu
1354c473789a91ba603d40bdf2521e3221c0a69f
static bool raw_is_inserted(BlockDriverState *bs) { return bdrv_is_inserted(bs->file->bs); }
{ "code": [], "line_no": [] }
static bool FUNC_0(BlockDriverState *bs) { return bdrv_is_inserted(bs->file->bs); }
[ "static bool FUNC_0(BlockDriverState *bs)\n{", "return bdrv_is_inserted(bs->file->bs);", "}" ]
[ 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ] ]
8,298
static int block_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque) { int ret; DPRINTF("Enter save live stage %d submitted %d transferred %d\n", stage, block_mig_state.submitted, block_mig_state.transferred); if (stage < 0) { blk_mig_cleanup(mon); return 0; ...
false
qemu
539de1246d355d3b8aa33fb7cde732352d8827c7
static int block_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque) { int ret; DPRINTF("Enter save live stage %d submitted %d transferred %d\n", stage, block_mig_state.submitted, block_mig_state.transferred); if (stage < 0) { blk_mig_cleanup(mon); return 0; ...
{ "code": [], "line_no": [] }
static int FUNC_0(Monitor *VAR_0, QEMUFile *VAR_1, int VAR_2, void *VAR_3) { int VAR_4; DPRINTF("Enter save live VAR_2 %d submitted %d transferred %d\n", VAR_2, block_mig_state.submitted, block_mig_state.transferred); if (VAR_2 < 0) { blk_mig_cleanup(VAR_0); return 0; ...
[ "static int FUNC_0(Monitor *VAR_0, QEMUFile *VAR_1, int VAR_2, void *VAR_3)\n{", "int VAR_4;", "DPRINTF(\"Enter save live VAR_2 %d submitted %d transferred %d\\n\",\nVAR_2, block_mig_state.submitted, block_mig_state.transferred);", "if (VAR_2 < 0) {", "blk_mig_cleanup(VAR_0);", "return 0;", "}", "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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9, 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 25 ], [ 29 ], [ 31 ], [ 33 ], [ 37 ], [ 39 ], [ 45 ], [ 47 ], [ 51 ], [ 55 ], [ 57 ], [ 59 ], ...
8,299
int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname) { char line[1024], group[64], id[64], arg[64], value[1024]; Location loc; QemuOptsList *list = NULL; Error *local_err = NULL; QemuOpts *opts = NULL; int res = -1, lno = 0; loc_push_none(&loc); while (fget...
false
qemu
e5766d6ec7524345f4c0fa284c065b68c5e93049
int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname) { char line[1024], group[64], id[64], arg[64], value[1024]; Location loc; QemuOptsList *list = NULL; Error *local_err = NULL; QemuOpts *opts = NULL; int res = -1, lno = 0; loc_push_none(&loc); while (fget...
{ "code": [], "line_no": [] }
int FUNC_0(FILE *VAR_0, QemuOptsList **VAR_1, const char *VAR_2) { char VAR_3[1024], VAR_4[64], VAR_5[64], VAR_6[64], VAR_7[1024]; Location loc; QemuOptsList *list = NULL; Error *local_err = NULL; QemuOpts *opts = NULL; int VAR_8 = -1, VAR_9 = 0; loc_push_none(&loc); while (fg...
[ "int FUNC_0(FILE *VAR_0, QemuOptsList **VAR_1, const char *VAR_2)\n{", "char VAR_3[1024], VAR_4[64], VAR_5[64], VAR_6[64], VAR_7[1024];", "Location loc;", "QemuOptsList *list = NULL;", "Error *local_err = NULL;", "QemuOpts *opts = NULL;", "int VAR_8 = -1, VAR_9 = 0;", "loc_push_none(&loc);", "while ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ], [ 29 ], [ 31 ], [ 33 ], [ 37 ], [ 39 ], [ 41 ], [ 45 ], [ 47 ], [ 49 ...
8,300
static void qmp_input_check_struct(Visitor *v, Error **errp) { QmpInputVisitor *qiv = to_qiv(v); StackObject *tos = &qiv->stack[qiv->nb_stack - 1]; assert(qiv->nb_stack > 0); if (qiv->strict) { GHashTable *const top_ht = tos->h; if (top_ht) { GHashTableIter iter; ...
false
qemu
3d344c2aabb7bc9b414321e3c52872901edebdda
static void qmp_input_check_struct(Visitor *v, Error **errp) { QmpInputVisitor *qiv = to_qiv(v); StackObject *tos = &qiv->stack[qiv->nb_stack - 1]; assert(qiv->nb_stack > 0); if (qiv->strict) { GHashTable *const top_ht = tos->h; if (top_ht) { GHashTableIter iter; ...
{ "code": [], "line_no": [] }
static void FUNC_0(Visitor *VAR_0, Error **VAR_1) { QmpInputVisitor *qiv = to_qiv(VAR_0); StackObject *tos = &qiv->stack[qiv->nb_stack - 1]; assert(qiv->nb_stack > 0); if (qiv->strict) { GHashTable *const top_ht = tos->h; if (top_ht) { GHashTableIter iter; ...
[ "static void FUNC_0(Visitor *VAR_0, Error **VAR_1)\n{", "QmpInputVisitor *qiv = to_qiv(VAR_0);", "StackObject *tos = &qiv->stack[qiv->nb_stack - 1];", "assert(qiv->nb_stack > 0);", "if (qiv->strict) {", "GHashTable *const top_ht = tos->h;", "if (top_ht) {", "GHashTableIter iter;", "const char *VAR_2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ] ]
8,301
int ff_get_line(AVIOContext *s, char *buf, int maxlen) { int i = 0; char c; do { c = avio_r8(s); if (c && i < maxlen-1) buf[i++] = c; } while (c != '\n' && c != '\r' && c); if (c == '\r' && avio_r8(s) != '\n') avio_skip(s, -1); buf[i] = 0; ...
false
FFmpeg
eac5c7b8377f3f0e8262ab44e5ccb2c7ed060cdd
int ff_get_line(AVIOContext *s, char *buf, int maxlen) { int i = 0; char c; do { c = avio_r8(s); if (c && i < maxlen-1) buf[i++] = c; } while (c != '\n' && c != '\r' && c); if (c == '\r' && avio_r8(s) != '\n') avio_skip(s, -1); buf[i] = 0; ...
{ "code": [], "line_no": [] }
int FUNC_0(AVIOContext *VAR_0, char *VAR_1, int VAR_2) { int VAR_3 = 0; char VAR_4; do { VAR_4 = avio_r8(VAR_0); if (VAR_4 && VAR_3 < VAR_2-1) VAR_1[VAR_3++] = VAR_4; } while (VAR_4 != '\n' && VAR_4 != '\r' && VAR_4); if (VAR_4 == '\r' && avio_r8(VAR_0) != '\n'...
[ "int FUNC_0(AVIOContext *VAR_0, char *VAR_1, int VAR_2)\n{", "int VAR_3 = 0;", "char VAR_4;", "do {", "VAR_4 = avio_r8(VAR_0);", "if (VAR_4 && VAR_3 < VAR_2-1)\nVAR_1[VAR_3++] = VAR_4;", "} while (VAR_4 != '\\n' && VAR_4 != '\\r' && VAR_4);", "if (VAR_4 == '\\r' && avio_r8(VAR_0) != '\\n')\navio_skip(...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15, 17 ], [ 19 ], [ 21, 23 ], [ 27 ], [ 29 ], [ 31 ] ]
8,302
e1000e_intrmgr_delay_tx_causes(E1000ECore *core, uint32_t *causes) { static const uint32_t delayable_causes = E1000_ICR_TXQ0 | E1000_ICR_TXQ1 | E1000_ICR_TXQE | E1000_ICR_TXDW;...
false
qemu
1ac6c07f4288b0a563310fad0cdabb3a47c85607
e1000e_intrmgr_delay_tx_causes(E1000ECore *core, uint32_t *causes) { static const uint32_t delayable_causes = E1000_ICR_TXQ0 | E1000_ICR_TXQ1 | E1000_ICR_TXQE | E1000_ICR_TXDW;...
{ "code": [], "line_no": [] }
FUNC_0(E1000ECore *VAR_0, uint32_t *VAR_1) { static const uint32_t VAR_2 = E1000_ICR_TXQ0 | E1000_ICR_TXQ1 | E1000_ICR_TXQE | E1000_ICR_TXDW; if (msix_enabled(VAR_0->own...
[ "FUNC_0(E1000ECore *VAR_0, uint32_t *VAR_1)\n{", "static const uint32_t VAR_2 = E1000_ICR_TXQ0 |\nE1000_ICR_TXQ1 |\nE1000_ICR_TXQE |\nE1000_ICR_TXDW;", "if (msix_enabled(VAR_0->owner)) {", "return false;", "}", "VAR_0->delayed_causes |= *VAR_1 & VAR_2;", "*VAR_1 &= ~VAR_2;", "if (VAR_1 != 0) {", "re...
[ 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 ], [ 33 ], [ 35 ], [ 37 ], [ 43 ], [ 47 ], [ 49 ], [ 51 ], [ 55 ], [ 57 ] ]
8,303
static int qcow2_make_empty(BlockDriverState *bs) { BDRVQcow2State *s = bs->opaque; uint64_t start_sector; int sector_step = INT_MAX / BDRV_SECTOR_SIZE; int l1_clusters, ret = 0; l1_clusters = DIV_ROUND_UP(s->l1_size, s->cluster_size / sizeof(uint64_t)); if (s->qcow_version >= 3 && !s...
false
qemu
a3e1505daec31ef56f0489f8c8fff1b8e4ca92bd
static int qcow2_make_empty(BlockDriverState *bs) { BDRVQcow2State *s = bs->opaque; uint64_t start_sector; int sector_step = INT_MAX / BDRV_SECTOR_SIZE; int l1_clusters, ret = 0; l1_clusters = DIV_ROUND_UP(s->l1_size, s->cluster_size / sizeof(uint64_t)); if (s->qcow_version >= 3 && !s...
{ "code": [], "line_no": [] }
static int FUNC_0(BlockDriverState *VAR_0) { BDRVQcow2State *s = VAR_0->opaque; uint64_t start_sector; int VAR_1 = INT_MAX / BDRV_SECTOR_SIZE; int VAR_2, VAR_3 = 0; VAR_2 = DIV_ROUND_UP(s->l1_size, s->cluster_size / sizeof(uint64_t)); if (s->qcow_version >= 3 && !s->snapshots && ...
[ "static int FUNC_0(BlockDriverState *VAR_0)\n{", "BDRVQcow2State *s = VAR_0->opaque;", "uint64_t start_sector;", "int VAR_1 = INT_MAX / BDRV_SECTOR_SIZE;", "int VAR_2, VAR_3 = 0;", "VAR_2 = DIV_ROUND_UP(s->l1_size, s->cluster_size / sizeof(uint64_t));", "if (s->qcow_version >= 3 && !s->snapshots &&\n3 +...
[ 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 ], [ 33 ], [ 35 ], [ 43 ], [ 45, 47 ], [ 59, 61, 63, 65 ], [ 67 ], [ 69 ], [ 71 ], [ 73 ], [ 77 ], [...
8,304
static void s390_cpu_full_reset(CPUState *s) { S390CPU *cpu = S390_CPU(s); S390CPUClass *scc = S390_CPU_GET_CLASS(cpu); CPUS390XState *env = &cpu->env; int i; scc->parent_reset(s); cpu->env.sigp_order = 0; s390_cpu_set_state(CPU_STATE_STOPPED, cpu); memset(env, 0, offsetof(C...
false
qemu
d516f74c99b1a2c289cfba0bacf125cbc9b681e3
static void s390_cpu_full_reset(CPUState *s) { S390CPU *cpu = S390_CPU(s); S390CPUClass *scc = S390_CPU_GET_CLASS(cpu); CPUS390XState *env = &cpu->env; int i; scc->parent_reset(s); cpu->env.sigp_order = 0; s390_cpu_set_state(CPU_STATE_STOPPED, cpu); memset(env, 0, offsetof(C...
{ "code": [], "line_no": [] }
static void FUNC_0(CPUState *VAR_0) { S390CPU *cpu = S390_CPU(VAR_0); S390CPUClass *scc = S390_CPU_GET_CLASS(cpu); CPUS390XState *env = &cpu->env; int VAR_1; scc->parent_reset(VAR_0); cpu->env.sigp_order = 0; s390_cpu_set_state(CPU_STATE_STOPPED, cpu); memset(env, 0, offseto...
[ "static void FUNC_0(CPUState *VAR_0)\n{", "S390CPU *cpu = S390_CPU(VAR_0);", "S390CPUClass *scc = S390_CPU_GET_CLASS(cpu);", "CPUS390XState *env = &cpu->env;", "int VAR_1;", "scc->parent_reset(VAR_0);", "cpu->env.sigp_order = 0;", "s390_cpu_set_state(CPU_STATE_STOPPED, cpu);", "memset(env, 0, offset...
[ 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 ], [ 29 ], [ 31 ], [ 37 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [ 57, 59 ], [...
8,305
static bool ufd_version_check(int ufd) { struct uffdio_api api_struct; uint64_t ioctl_mask; api_struct.api = UFFD_API; api_struct.features = 0; if (ioctl(ufd, UFFDIO_API, &api_struct)) { error_report("postcopy_ram_supported_by_host: UFFDIO_API failed: %s", stre...
false
qemu
d7651f150d61936344c4fab45eaeb0716c606af2
static bool ufd_version_check(int ufd) { struct uffdio_api api_struct; uint64_t ioctl_mask; api_struct.api = UFFD_API; api_struct.features = 0; if (ioctl(ufd, UFFDIO_API, &api_struct)) { error_report("postcopy_ram_supported_by_host: UFFDIO_API failed: %s", stre...
{ "code": [], "line_no": [] }
static bool FUNC_0(int ufd) { struct uffdio_api VAR_0; uint64_t ioctl_mask; VAR_0.api = UFFD_API; VAR_0.features = 0; if (ioctl(ufd, UFFDIO_API, &VAR_0)) { error_report("postcopy_ram_supported_by_host: UFFDIO_API failed: %s", strerror(errno)); return f...
[ "static bool FUNC_0(int ufd)\n{", "struct uffdio_api VAR_0;", "uint64_t ioctl_mask;", "VAR_0.api = UFFD_API;", "VAR_0.features = 0;", "if (ioctl(ufd, UFFDIO_API, &VAR_0)) {", "error_report(\"postcopy_ram_supported_by_host: UFFDIO_API failed: %s\",\nstrerror(errno));", "return false;", "}", "ioctl_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17, 19 ], [ 21 ], [ 23 ], [ 27, 29 ], [ 31 ], [ 33, 35 ], [ 37 ], [ 39 ], [ 43 ], [ 45 ], [ 49, 51 ], [ 53...
8,306
static void string_output_append(StringOutputVisitor *sov, int64_t a) { Range *r = g_malloc0(sizeof(*r)); r->begin = a; r->end = a + 1; sov->ranges = range_list_insert(sov->ranges, r); }
false
qemu
a0efbf16604770b9d805bcf210ec29942321134f
static void string_output_append(StringOutputVisitor *sov, int64_t a) { Range *r = g_malloc0(sizeof(*r)); r->begin = a; r->end = a + 1; sov->ranges = range_list_insert(sov->ranges, r); }
{ "code": [], "line_no": [] }
static void FUNC_0(StringOutputVisitor *VAR_0, int64_t VAR_1) { Range *r = g_malloc0(sizeof(*r)); r->begin = VAR_1; r->end = VAR_1 + 1; VAR_0->ranges = range_list_insert(VAR_0->ranges, r); }
[ "static void FUNC_0(StringOutputVisitor *VAR_0, int64_t VAR_1)\n{", "Range *r = g_malloc0(sizeof(*r));", "r->begin = VAR_1;", "r->end = VAR_1 + 1;", "VAR_0->ranges = range_list_insert(VAR_0->ranges, r);", "}" ]
[ 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ] ]
8,307
static void aarch64_cpu_register(const ARMCPUInfo *info) { TypeInfo type_info = { .parent = TYPE_AARCH64_CPU, .instance_size = sizeof(ARMCPU), .instance_init = info->initfn, .class_size = sizeof(ARMCPUClass), .class_init = info->class_init, }; /* TODO: drop...
false
qemu
83e6813a93e38976391b8c382c3375e3e188df3e
static void aarch64_cpu_register(const ARMCPUInfo *info) { TypeInfo type_info = { .parent = TYPE_AARCH64_CPU, .instance_size = sizeof(ARMCPU), .instance_init = info->initfn, .class_size = sizeof(ARMCPUClass), .class_init = info->class_init, }; if (!in...
{ "code": [], "line_no": [] }
static void FUNC_0(const ARMCPUInfo *VAR_0) { TypeInfo type_info = { .parent = TYPE_AARCH64_CPU, .instance_size = sizeof(ARMCPU), .instance_init = VAR_0->initfn, .class_size = sizeof(ARMCPUClass), .class_init = VAR_0->class_init, }; if (!VAR_0->name) ...
[ "static void FUNC_0(const ARMCPUInfo *VAR_0)\n{", "TypeInfo type_info = {", ".parent = TYPE_AARCH64_CPU,\n.instance_size = sizeof(ARMCPU),\n.instance_init = VAR_0->initfn,\n.class_size = sizeof(ARMCPUClass),\n.class_init = VAR_0->class_init,\n};", "if (!VAR_0->name) {", "return;", "}", "type_info.name =...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7, 9, 11, 13, 15, 17 ], [ 23 ], [ 25 ], [ 27 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ] ]
8,308
static void tx_fifo_push(lan9118_state *s, uint32_t val) { int n; if (s->txp->fifo_used == s->tx_fifo_size) { s->int_sts |= TDFO_INT; return; } switch (s->txp->state) { case TX_IDLE: s->txp->cmd_a = val & 0x831f37ff; s->txp->fifo_used++; s->txp->s...
false
qemu
c444dfabfc21cb5f093862100e333b808eea32e4
static void tx_fifo_push(lan9118_state *s, uint32_t val) { int n; if (s->txp->fifo_used == s->tx_fifo_size) { s->int_sts |= TDFO_INT; return; } switch (s->txp->state) { case TX_IDLE: s->txp->cmd_a = val & 0x831f37ff; s->txp->fifo_used++; s->txp->s...
{ "code": [], "line_no": [] }
static void FUNC_0(lan9118_state *VAR_0, uint32_t VAR_1) { int VAR_2; if (VAR_0->txp->fifo_used == VAR_0->tx_fifo_size) { VAR_0->int_sts |= TDFO_INT; return; } switch (VAR_0->txp->state) { case TX_IDLE: VAR_0->txp->cmd_a = VAR_1 & 0x831f37ff; VAR_0->txp->f...
[ "static void FUNC_0(lan9118_state *VAR_0, uint32_t VAR_1)\n{", "int VAR_2;", "if (VAR_0->txp->fifo_used == VAR_0->tx_fifo_size) {", "VAR_0->int_sts |= TDFO_INT;", "return;", "}", "switch (VAR_0->txp->state) {", "case TX_IDLE:\nVAR_0->txp->cmd_a = VAR_1 & 0x831f37ff;", "VAR_0->txp->fifo_used++;", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19, 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33, 35 ], [ 39 ], [ 41 ], [ 45 ], [ 47 ], [ 49...
8,309
int ff_h264_decode_ref_pic_list_reordering(H264Context *h) { int list, index, pic_structure, i; print_short_term(h); print_long_term(h); for (list = 0; list < h->list_count; list++) { for (i = 0; i < h->ref_count[list]; i++) COPY_PICTURE(&h->ref_list[list][i], &h->default_...
false
FFmpeg
a553c6a347d3d28d7ee44c3df3d5c4ee780dba23
int ff_h264_decode_ref_pic_list_reordering(H264Context *h) { int list, index, pic_structure, i; print_short_term(h); print_long_term(h); for (list = 0; list < h->list_count; list++) { for (i = 0; i < h->ref_count[list]; i++) COPY_PICTURE(&h->ref_list[list][i], &h->default_...
{ "code": [], "line_no": [] }
int FUNC_0(H264Context *VAR_0) { int VAR_1, VAR_2, VAR_3, VAR_4; print_short_term(VAR_0); print_long_term(VAR_0); for (VAR_1 = 0; VAR_1 < VAR_0->list_count; VAR_1++) { for (VAR_4 = 0; VAR_4 < VAR_0->ref_count[VAR_1]; VAR_4++) COPY_PICTURE(&VAR_0->ref_list[VAR_1][VAR_4], &V...
[ "int FUNC_0(H264Context *VAR_0)\n{", "int VAR_1, VAR_2, VAR_3, VAR_4;", "print_short_term(VAR_0);", "print_long_term(VAR_0);", "for (VAR_1 = 0; VAR_1 < VAR_0->list_count; VAR_1++) {", "for (VAR_4 = 0; VAR_4 < VAR_0->ref_count[VAR_1]; VAR_4++)", "COPY_PICTURE(&VAR_0->ref_list[VAR_1][VAR_4], &VAR_0->defau...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ], [ 15 ], [ 17 ], [ 19 ], [ 23 ], [ 25 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 41, 43 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ], ...
8,310
static enum AVHWDeviceType hw_device_match_type_by_hwaccel(enum HWAccelID hwaccel_id) { int i; if (hwaccel_id == HWACCEL_NONE) return AV_HWDEVICE_TYPE_NONE; for (i = 0; hwaccels[i].name; i++) { if (hwaccels[i].id == hwaccel_id) return hwaccels[i].device_type; } r...
false
FFmpeg
b0cd14fb1dab4b044f7fe6b53ac635409849de77
static enum AVHWDeviceType hw_device_match_type_by_hwaccel(enum HWAccelID hwaccel_id) { int i; if (hwaccel_id == HWACCEL_NONE) return AV_HWDEVICE_TYPE_NONE; for (i = 0; hwaccels[i].name; i++) { if (hwaccels[i].id == hwaccel_id) return hwaccels[i].device_type; } r...
{ "code": [], "line_no": [] }
static enum AVHWDeviceType FUNC_0(enum HWAccelID VAR_0) { int VAR_1; if (VAR_0 == HWACCEL_NONE) return AV_HWDEVICE_TYPE_NONE; for (VAR_1 = 0; hwaccels[VAR_1].name; VAR_1++) { if (hwaccels[VAR_1].id == VAR_0) return hwaccels[VAR_1].device_type; } return AV_HWDEVIC...
[ "static enum AVHWDeviceType FUNC_0(enum HWAccelID VAR_0)\n{", "int VAR_1;", "if (VAR_0 == HWACCEL_NONE)\nreturn AV_HWDEVICE_TYPE_NONE;", "for (VAR_1 = 0; hwaccels[VAR_1].name; VAR_1++) {", "if (hwaccels[VAR_1].id == VAR_0)\nreturn hwaccels[VAR_1].device_type;", "}", "return AV_HWDEVICE_TYPE_NONE;", "}...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7, 9 ], [ 11 ], [ 13, 15 ], [ 17 ], [ 19 ], [ 21 ] ]
8,312
int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_count, const uint8_t *in_arg [SWR_CH_MAX], int in_count){ AudioData * in= &s->in; AudioData *out= &s->out; if(s->drop_output > 0){ int ret; uint8_t *tmp_arg[SWR_CH_MAX]; ...
false
FFmpeg
b481d09bd9c7b3cba617a7811d7015ea0472e4ee
int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_count, const uint8_t *in_arg [SWR_CH_MAX], int in_count){ AudioData * in= &s->in; AudioData *out= &s->out; if(s->drop_output > 0){ int ret; uint8_t *tmp_arg[SWR_CH_MAX]; ...
{ "code": [], "line_no": [] }
int FUNC_0(struct SwrContext *VAR_0, uint8_t *VAR_1[SWR_CH_MAX], int VAR_2, const uint8_t *VAR_3 [SWR_CH_MAX], int VAR_4){ AudioData * in= &VAR_0->in; AudioData *out= &VAR_0->out; if(VAR_0->drop_output > 0){ int VAR_7; uint8_t *tmp_arg[SWR_CH_MAX]; ...
[ "int FUNC_0(struct SwrContext *VAR_0, uint8_t *VAR_1[SWR_CH_MAX], int VAR_2,\nconst uint8_t *VAR_3 [SWR_CH_MAX], int VAR_4){", "AudioData * in= &VAR_0->in;", "AudioData *out= &VAR_0->out;", "if(VAR_0->drop_output > 0){", "int VAR_7;", "uint8_t *tmp_arg[SWR_CH_MAX];", "if((VAR_7=swri_realloc_audio(&VAR_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17, 19 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31, 33 ], [ 37, 39 ], [ 41 ], [ 43 ], [ 47 ], [ 49 ], [ 51, 53...
8,314
av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx) { MJpegDecodeContext *s = avctx->priv_data; int ret; if (!s->picture_ptr) { s->picture = av_frame_alloc(); if (!s->picture) return AVERROR(ENOMEM); s->picture_ptr = s->picture; } s->avctx = avct...
false
FFmpeg
dcc39ee10e82833ce24aa57926c00ffeb1948198
av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx) { MJpegDecodeContext *s = avctx->priv_data; int ret; if (!s->picture_ptr) { s->picture = av_frame_alloc(); if (!s->picture) return AVERROR(ENOMEM); s->picture_ptr = s->picture; } s->avctx = avct...
{ "code": [], "line_no": [] }
av_cold int FUNC_0(AVCodecContext *avctx) { MJpegDecodeContext *s = avctx->priv_data; int VAR_0; if (!s->picture_ptr) { s->picture = av_frame_alloc(); if (!s->picture) return AVERROR(ENOMEM); s->picture_ptr = s->picture; } s->avctx = avctx; ff_b...
[ "av_cold int FUNC_0(AVCodecContext *avctx)\n{", "MJpegDecodeContext *s = avctx->priv_data;", "int VAR_0;", "if (!s->picture_ptr) {", "s->picture = av_frame_alloc();", "if (!s->picture)\nreturn AVERROR(ENOMEM);", "s->picture_ptr = s->picture;", "}", "s->avctx = avctx;", "ff_blockdsp_init(&s->bdsp, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15, 17 ], [ 19 ], [ 21 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33, 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47...
8,315
static int seg_write_trailer(struct AVFormatContext *s) { SegmentContext *seg = s->priv_data; AVFormatContext *oc = seg->avf; int ret = 0; if (!oc) goto fail; if (!seg->write_header_trailer) { if ((ret = segment_end(oc, 0)) < 0) goto fail; open_null_...
false
FFmpeg
8a78ae2d2101622fd244b99178d8bc61175c878e
static int seg_write_trailer(struct AVFormatContext *s) { SegmentContext *seg = s->priv_data; AVFormatContext *oc = seg->avf; int ret = 0; if (!oc) goto fail; if (!seg->write_header_trailer) { if ((ret = segment_end(oc, 0)) < 0) goto fail; open_null_...
{ "code": [], "line_no": [] }
static int FUNC_0(struct AVFormatContext *VAR_0) { SegmentContext *seg = VAR_0->priv_data; AVFormatContext *VAR_1 = seg->avf; int VAR_2 = 0; if (!VAR_1) goto fail; if (!seg->write_header_trailer) { if ((VAR_2 = segment_end(VAR_1, 0)) < 0) goto fail; ...
[ "static int FUNC_0(struct AVFormatContext *VAR_0)\n{", "SegmentContext *seg = VAR_0->priv_data;", "AVFormatContext *VAR_1 = seg->avf;", "int VAR_2 = 0;", "if (!VAR_1)\ngoto fail;", "if (!seg->write_header_trailer) {", "if ((VAR_2 = segment_end(VAR_1, 0)) < 0)\ngoto fail;", "open_null_ctx(&VAR_1->pb);"...
[ 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 ], [ 39, 41 ], [ 45 ], [ 47, 49 ], [ 51 ], [ 55,...
8,316
int ff_tempfile(const char *prefix, char **filename) { int fd=-1; #if !HAVE_MKSTEMP *filename = tempnam(".", prefix); #else size_t len = strlen(prefix) + 12; /* room for "/tmp/" and "XXXXXX\0" */ *filename = av_malloc(len); #endif /* -----common section-----*/ if (*filename == NULL) { ...
false
FFmpeg
f929ab0569ff31ed5a59b0b0adb7ce09df3fca39
int ff_tempfile(const char *prefix, char **filename) { int fd=-1; #if !HAVE_MKSTEMP *filename = tempnam(".", prefix); #else size_t len = strlen(prefix) + 12; *filename = av_malloc(len); #endif if (*filename == NULL) { av_log(NULL, AV_LOG_ERROR, "ff_tempfile: Cannot allocate f...
{ "code": [], "line_no": [] }
int FUNC_0(const char *VAR_0, char **VAR_1) { int VAR_2=-1; #if !HAVE_MKSTEMP *VAR_1 = tempnam(".", VAR_0); #else size_t len = strlen(VAR_0) + 12; *VAR_1 = av_malloc(len); #endif if (*VAR_1 == NULL) { av_log(NULL, AV_LOG_ERROR, "FUNC_0: Cannot allocate file name\n"); ...
[ "int FUNC_0(const char *VAR_0, char **VAR_1) {", "int VAR_2=-1;", "#if !HAVE_MKSTEMP\n*VAR_1 = tempnam(\".\", VAR_0);", "#else\nsize_t len = strlen(VAR_0) + 12;", "*VAR_1 = av_malloc(len);", "#endif\nif (*VAR_1 == NULL) {", "av_log(NULL, AV_LOG_ERROR, \"FUNC_0: Cannot allocate file name\\n\");", "retu...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1 ], [ 3 ], [ 5, 7 ], [ 9, 11 ], [ 13 ], [ 15, 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27, 29 ], [ 31, 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45, 49 ], [...
8,317
static void ffm_seek1(AVFormatContext *s, int64_t pos1) { FFMContext *ffm = s->priv_data; ByteIOContext *pb = s->pb; int64_t pos; pos = pos1 + ffm->write_index; if (pos >= ffm->file_size) pos -= (ffm->file_size - FFM_PACKET_SIZE); #ifdef DEBUG_SEEK av_log(s, AV_LOG_DEBUG, "see...
false
FFmpeg
92a0f338786b629c5661f5b552e32c6154c3389d
static void ffm_seek1(AVFormatContext *s, int64_t pos1) { FFMContext *ffm = s->priv_data; ByteIOContext *pb = s->pb; int64_t pos; pos = pos1 + ffm->write_index; if (pos >= ffm->file_size) pos -= (ffm->file_size - FFM_PACKET_SIZE); #ifdef DEBUG_SEEK av_log(s, AV_LOG_DEBUG, "see...
{ "code": [], "line_no": [] }
static void FUNC_0(AVFormatContext *VAR_0, int64_t VAR_1) { FFMContext *ffm = VAR_0->priv_data; ByteIOContext *pb = VAR_0->pb; int64_t pos; pos = VAR_1 + ffm->write_index; if (pos >= ffm->file_size) pos -= (ffm->file_size - FFM_PACKET_SIZE); #ifdef DEBUG_SEEK av_log(VAR_0, AV_...
[ "static void FUNC_0(AVFormatContext *VAR_0, int64_t VAR_1)\n{", "FFMContext *ffm = VAR_0->priv_data;", "ByteIOContext *pb = VAR_0->pb;", "int64_t pos;", "pos = VAR_1 + ffm->write_index;", "if (pos >= ffm->file_size)\npos -= (ffm->file_size - FFM_PACKET_SIZE);", "#ifdef DEBUG_SEEK\nav_log(VAR_0, AV_LOG_D...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15, 17 ], [ 19, 21 ], [ 23, 25 ], [ 27 ] ]
8,318
static int decode_init(AVCodecContext * avctx) { MPADecodeContext *s = avctx->priv_data; static int init=0; int i, j, k; #if defined(USE_HIGHPRECISION) && defined(CONFIG_AUDIO_NONSHORT) avctx->sample_fmt= SAMPLE_FMT_S32; #else avctx->sample_fmt= SAMPLE_FMT_S16; #endif if(avctx->ant...
false
FFmpeg
bc2d2757bb532fa260c373adb00f4e47766e3449
static int decode_init(AVCodecContext * avctx) { MPADecodeContext *s = avctx->priv_data; static int init=0; int i, j, k; #if defined(USE_HIGHPRECISION) && defined(CONFIG_AUDIO_NONSHORT) avctx->sample_fmt= SAMPLE_FMT_S32; #else avctx->sample_fmt= SAMPLE_FMT_S16; #endif if(avctx->ant...
{ "code": [], "line_no": [] }
static int FUNC_0(AVCodecContext * VAR_0) { MPADecodeContext *s = VAR_0->priv_data; static int VAR_1=0; int VAR_2, VAR_3, VAR_17; #if defined(USE_HIGHPRECISION) && defined(CONFIG_AUDIO_NONSHORT) VAR_0->sample_fmt= SAMPLE_FMT_S32; #else VAR_0->sample_fmt= SAMPLE_FMT_S16; #endif if(V...
[ "static int FUNC_0(AVCodecContext * VAR_0)\n{", "MPADecodeContext *s = VAR_0->priv_data;", "static int VAR_1=0;", "int VAR_2, VAR_3, VAR_17;", "#if defined(USE_HIGHPRECISION) && defined(CONFIG_AUDIO_NONSHORT)\nVAR_0->sample_fmt= SAMPLE_FMT_S32;", "#else\nVAR_0->sample_fmt= SAMPLE_FMT_S16;", "#endif\nif(...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13, 15 ], [ 17, 19 ], [ 21, 25, 27 ], [ 29, 31 ], [ 35 ], [ 39 ], [ 41 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [ 57 ], [ 59 ], [...
8,319
void checkasm_check_vf_threshold(void) { check_threshold_8(); report("threshold8"); }
false
FFmpeg
179a2f04eb2bd6df7221883a92dc4e00cf94394b
void checkasm_check_vf_threshold(void) { check_threshold_8(); report("threshold8"); }
{ "code": [], "line_no": [] }
void FUNC_0(void) { check_threshold_8(); report("threshold8"); }
[ "void FUNC_0(void)\n{", "check_threshold_8();", "report(\"threshold8\");", "}" ]
[ 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ] ]
8,320
int loader_exec(const char * filename, char ** argv, char ** envp, struct target_pt_regs * regs, struct image_info *infop, struct linux_binprm *bprm) { int retval; int i; bprm->p = TARGET_PAGE_SIZE*MAX_ARG_PAGES-sizeof(unsigned int); memset(bprm->page, 0, sizeof(bprm->...
true
qemu
7dd47667b9b0b23807fc1a550644fc2427462f41
int loader_exec(const char * filename, char ** argv, char ** envp, struct target_pt_regs * regs, struct image_info *infop, struct linux_binprm *bprm) { int retval; int i; bprm->p = TARGET_PAGE_SIZE*MAX_ARG_PAGES-sizeof(unsigned int); memset(bprm->page, 0, sizeof(bprm->...
{ "code": [ " free(bprm->page[i]);" ], "line_no": [ 97 ] }
int FUNC_0(const char * VAR_0, char ** VAR_1, char ** VAR_2, struct target_pt_regs * VAR_3, struct image_info *VAR_4, struct linux_binprm *VAR_5) { int VAR_6; int VAR_7; VAR_5->p = TARGET_PAGE_SIZE*MAX_ARG_PAGES-sizeof(unsigned int); memset(VAR_5->page, 0, sizeof(VAR_5...
[ "int FUNC_0(const char * VAR_0, char ** VAR_1, char ** VAR_2,\nstruct target_pt_regs * VAR_3, struct image_info *VAR_4,\nstruct linux_binprm *VAR_5)\n{", "int VAR_6;", "int VAR_7;", "VAR_5->p = TARGET_PAGE_SIZE*MAX_ARG_PAGES-sizeof(unsigned int);", "memset(VAR_5->page, 0, sizeof(VAR_5->page));", "VAR_6 = ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ]
[ [ 1, 3, 5, 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21, 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 39 ], [ 43 ], [ 45, 47, 49, 51 ], [ 53 ...
8,321
static int mp_get_vlc(MotionPixelsContext *mp, GetBitContext *gb) { int i; i = (mp->codes_count == 1) ? 0 : get_vlc2(gb, mp->vlc.table, mp->max_codes_bits, 1); return mp->codes[i].delta; }
true
FFmpeg
ca41c72c6d9515d9045bd3b68104525dee81b8d0
static int mp_get_vlc(MotionPixelsContext *mp, GetBitContext *gb) { int i; i = (mp->codes_count == 1) ? 0 : get_vlc2(gb, mp->vlc.table, mp->max_codes_bits, 1); return mp->codes[i].delta; }
{ "code": [], "line_no": [] }
static int FUNC_0(MotionPixelsContext *VAR_0, GetBitContext *VAR_1) { int VAR_2; VAR_2 = (VAR_0->codes_count == 1) ? 0 : get_vlc2(VAR_1, VAR_0->vlc.table, VAR_0->max_codes_bits, 1); return VAR_0->codes[VAR_2].delta; }
[ "static int FUNC_0(MotionPixelsContext *VAR_0, GetBitContext *VAR_1)\n{", "int VAR_2;", "VAR_2 = (VAR_0->codes_count == 1) ? 0 : get_vlc2(VAR_1, VAR_0->vlc.table, VAR_0->max_codes_bits, 1);", "return VAR_0->codes[VAR_2].delta;", "}" ]
[ 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 12 ], [ 14 ] ]
8,322
uint64_t helper_mulqv(CPUAlphaState *env, uint64_t op1, uint64_t op2) { uint64_t tl, th; muls64(&tl, &th, op1, op2); /* If th != 0 && th != -1, then we had an overflow */ if (unlikely((th + 1) > 1)) { arith_excp(env, GETPC(), EXC_M_IOV, 0); } return tl; }
true
qemu
4d1628e832dfc6ec02b0d196f6cc250aaa7bf3b3
uint64_t helper_mulqv(CPUAlphaState *env, uint64_t op1, uint64_t op2) { uint64_t tl, th; muls64(&tl, &th, op1, op2); if (unlikely((th + 1) > 1)) { arith_excp(env, GETPC(), EXC_M_IOV, 0); } return tl; }
{ "code": [ " arith_excp(env, GETPC(), EXC_M_IOV, 0);", " arith_excp(env, GETPC(), EXC_M_IOV, 0);", " arith_excp(env, GETPC(), EXC_M_IOV, 0);", " arith_excp(env, GETPC(), EXC_M_IOV, 0);", "uint64_t helper_mulqv(CPUAlphaState *env, uint64_t op1, uint64_t op2)", " ...
uint64_t FUNC_0(CPUAlphaState *env, uint64_t op1, uint64_t op2) { uint64_t tl, th; muls64(&tl, &th, op1, op2); if (unlikely((th + 1) > 1)) { arith_excp(env, GETPC(), EXC_M_IOV, 0); } return tl; }
[ "uint64_t FUNC_0(CPUAlphaState *env, uint64_t op1, uint64_t op2)\n{", "uint64_t tl, th;", "muls64(&tl, &th, op1, op2);", "if (unlikely((th + 1) > 1)) {", "arith_excp(env, GETPC(), EXC_M_IOV, 0);", "}", "return tl;", "}" ]
[ 1, 1, 1, 1, 1, 0, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ] ]
8,323
PCIDevice *pci_rtl8139_init(PCIBus *bus, NICInfo *nd, int devfn) { PCIRTL8139State *d; RTL8139State *s; uint8_t *pci_conf; d = (PCIRTL8139State *)pci_register_device(bus, "RTL8139", sizeof(PCIRTL8139State), ...
true
qemu
b946a1533209f61a93e34898aebb5b43154b99c3
PCIDevice *pci_rtl8139_init(PCIBus *bus, NICInfo *nd, int devfn) { PCIRTL8139State *d; RTL8139State *s; uint8_t *pci_conf; d = (PCIRTL8139State *)pci_register_device(bus, "RTL8139", sizeof(PCIRTL8139State), ...
{ "code": [ " rtl8139_receive, rtl8139_can_receive, s);" ], "line_no": [ 73 ] }
PCIDevice *FUNC_0(PCIBus *bus, NICInfo *nd, int devfn) { PCIRTL8139State *d; RTL8139State *s; uint8_t *pci_conf; d = (PCIRTL8139State *)pci_register_device(bus, "RTL8139", sizeof(PCIRTL8139State), devfn,...
[ "PCIDevice *FUNC_0(PCIBus *bus, NICInfo *nd, int devfn)\n{", "PCIRTL8139State *d;", "RTL8139State *s;", "uint8_t *pci_conf;", "d = (PCIRTL8139State *)pci_register_device(bus,\n\"RTL8139\", sizeof(PCIRTL8139State),\ndevfn,\nNULL, NULL);", "pci_conf = d->dev.config;", "pci_config_set_vendor_id(pci_conf, P...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13, 15, 17, 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 41 ], [ 47, 49 ], [ 53, 55 ], [...
8,324
void usb_wakeup(USBEndpoint *ep, unsigned int stream) { USBDevice *dev = ep->dev; USBBus *bus = usb_bus_from_device(dev); if (dev->remote_wakeup && dev->port && dev->port->ops->wakeup) { dev->port->ops->wakeup(dev->port); if (bus->ops->wakeup_endpoint) { bus->ops->wakeu...
true
qemu
26022652c6fd067b9fa09280f5a6d6284a21c73f
void usb_wakeup(USBEndpoint *ep, unsigned int stream) { USBDevice *dev = ep->dev; USBBus *bus = usb_bus_from_device(dev); if (dev->remote_wakeup && dev->port && dev->port->ops->wakeup) { dev->port->ops->wakeup(dev->port); if (bus->ops->wakeup_endpoint) { bus->ops->wakeu...
{ "code": [], "line_no": [] }
void FUNC_0(USBEndpoint *VAR_0, unsigned int VAR_1) { USBDevice *dev = VAR_0->dev; USBBus *bus = usb_bus_from_device(dev); if (dev->remote_wakeup && dev->port && dev->port->ops->wakeup) { dev->port->ops->wakeup(dev->port); if (bus->ops->wakeup_endpoint) { bus->ops->wake...
[ "void FUNC_0(USBEndpoint *VAR_0, unsigned int VAR_1)\n{", "USBDevice *dev = VAR_0->dev;", "USBBus *bus = usb_bus_from_device(dev);", "if (dev->remote_wakeup && dev->port && dev->port->ops->wakeup) {", "dev->port->ops->wakeup(dev->port);", "if (bus->ops->wakeup_endpoint) {", "bus->ops->wakeup_endpoint(bu...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 19 ], [ 21 ], [ 24 ], [ 26 ] ]
8,325
target_ulong helper_load_slb_vsid(CPUPPCState *env, target_ulong rb) { target_ulong rt; if (ppc_load_slb_vsid(env, rb, &rt) < 0) { helper_raise_exception_err(env, POWERPC_EXCP_PROGRAM, POWERPC_EXCP_INVAL); } return rt; }
true
qemu
4cc2cc085586cdb787a24d78a7ba032fa657275a
target_ulong helper_load_slb_vsid(CPUPPCState *env, target_ulong rb) { target_ulong rt; if (ppc_load_slb_vsid(env, rb, &rt) < 0) { helper_raise_exception_err(env, POWERPC_EXCP_PROGRAM, POWERPC_EXCP_INVAL); } return rt; }
{ "code": [ " target_ulong rt;", " target_ulong rt;" ], "line_no": [ 5, 5 ] }
target_ulong FUNC_0(CPUPPCState *env, target_ulong rb) { target_ulong rt; if (ppc_load_slb_vsid(env, rb, &rt) < 0) { helper_raise_exception_err(env, POWERPC_EXCP_PROGRAM, POWERPC_EXCP_INVAL); } return rt; }
[ "target_ulong FUNC_0(CPUPPCState *env, target_ulong rb)\n{", "target_ulong rt;", "if (ppc_load_slb_vsid(env, rb, &rt) < 0) {", "helper_raise_exception_err(env, POWERPC_EXCP_PROGRAM,\nPOWERPC_EXCP_INVAL);", "}", "return rt;", "}" ]
[ 0, 1, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11, 13 ], [ 15 ], [ 17 ], [ 19 ] ]
8,326
static int mov_get_h264_codec_tag(AVFormatContext *s, MOVTrack *track) { int tag = track->par->codec_tag; int interlaced = track->par->field_order > AV_FIELD_PROGRESSIVE; AVStream *st = track->st; int rate = av_q2d(find_fps(s, st)); if (!tag) tag = MKTAG('a', 'v', 'c', 'i'); //fallb...
true
FFmpeg
77bc507f6f001b9f5fa75c664106261bd8f2c971
static int mov_get_h264_codec_tag(AVFormatContext *s, MOVTrack *track) { int tag = track->par->codec_tag; int interlaced = track->par->field_order > AV_FIELD_PROGRESSIVE; AVStream *st = track->st; int rate = av_q2d(find_fps(s, st)); if (!tag) tag = MKTAG('a', 'v', 'c', 'i'); ...
{ "code": [ " int rate = av_q2d(find_fps(s, st));", " int rate = av_q2d(find_fps(s, st));" ], "line_no": [ 11, 11 ] }
static int FUNC_0(AVFormatContext *VAR_0, MOVTrack *VAR_1) { int VAR_2 = VAR_1->par->codec_tag; int VAR_3 = VAR_1->par->field_order > AV_FIELD_PROGRESSIVE; AVStream *st = VAR_1->st; int VAR_4 = av_q2d(find_fps(VAR_0, st)); if (!VAR_2) VAR_2 = MKTAG('a', 'v', 'c', 'i'); if (V...
[ "static int FUNC_0(AVFormatContext *VAR_0, MOVTrack *VAR_1)\n{", "int VAR_2 = VAR_1->par->codec_tag;", "int VAR_3 = VAR_1->par->field_order > AV_FIELD_PROGRESSIVE;", "AVStream *st = VAR_1->st;", "int VAR_4 = av_q2d(find_fps(VAR_0, st));", "if (!VAR_2)\nVAR_2 = MKTAG('a', 'v', 'c', 'i');", "if (VAR_1->pa...
[ 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 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15, 17 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [...
8,327
static int64_t get_dts(AVFormatContext *s, int64_t pos) { AVIOContext *pb = s->pb; int64_t dts; ffm_seek1(s, pos); avio_skip(pb, 4); dts = avio_rb64(pb); av_dlog(s, "dts=%0.6f\n", dts / 1000000.0); return dts; }
false
FFmpeg
229843aa359ae0c9519977d7fa952688db63f559
static int64_t get_dts(AVFormatContext *s, int64_t pos) { AVIOContext *pb = s->pb; int64_t dts; ffm_seek1(s, pos); avio_skip(pb, 4); dts = avio_rb64(pb); av_dlog(s, "dts=%0.6f\n", dts / 1000000.0); return dts; }
{ "code": [], "line_no": [] }
static int64_t FUNC_0(AVFormatContext *s, int64_t pos) { AVIOContext *pb = s->pb; int64_t dts; ffm_seek1(s, pos); avio_skip(pb, 4); dts = avio_rb64(pb); av_dlog(s, "dts=%0.6f\n", dts / 1000000.0); return dts; }
[ "static int64_t FUNC_0(AVFormatContext *s, int64_t pos)\n{", "AVIOContext *pb = s->pb;", "int64_t dts;", "ffm_seek1(s, pos);", "avio_skip(pb, 4);", "dts = avio_rb64(pb);", "av_dlog(s, \"dts=%0.6f\\n\", dts / 1000000.0);", "return dts;", "}" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ] ]
8,328
static void apply_channel_coupling(AC3EncodeContext *s) { LOCAL_ALIGNED_16(CoefType, cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]); #if CONFIG_AC3ENC_FLOAT LOCAL_ALIGNED_16(int32_t, fixed_cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]); #else int32_t (*fixed_cpl_coords)[AC3_MAX_CHAN...
false
FFmpeg
d85ebea3f3b68ebccfe308fa839fc30fa634e4de
static void apply_channel_coupling(AC3EncodeContext *s) { LOCAL_ALIGNED_16(CoefType, cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]); #if CONFIG_AC3ENC_FLOAT LOCAL_ALIGNED_16(int32_t, fixed_cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]); #else int32_t (*fixed_cpl_coords)[AC3_MAX_CHAN...
{ "code": [], "line_no": [] }
static void FUNC_0(AC3EncodeContext *VAR_0) { LOCAL_ALIGNED_16(CoefType, cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]); #if CONFIG_AC3ENC_FLOAT LOCAL_ALIGNED_16(int32_t, fixed_cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]); #else int32_t (*fixed_cpl_coords)[AC3_MAX_CHANNELS][16] = ...
[ "static void FUNC_0(AC3EncodeContext *VAR_0)\n{", "LOCAL_ALIGNED_16(CoefType, cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]);", "#if CONFIG_AC3ENC_FLOAT\nLOCAL_ALIGNED_16(int32_t, fixed_cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]);", "#else\nint32_t (*fixed_cpl_coords)[AC3_MAX_CHANNELS][1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7, 9 ], [ 11, 13 ], [ 15, 17 ], [ 19 ], [ 21 ], [ 25 ], [ 27, 29 ], [ 31, 39 ], [ 41 ], [ 43 ], [ 49 ], [ 51 ], [ 53 ], [ 55, 57 ], [ 59 ...
8,329
static int write_packet(AVFormatContext *s, AVPacket *pkt) { WVMuxContext *wc = s->priv_data; AVCodecContext *codec = s->streams[0]->codec; AVIOContext *pb = s->pb; uint64_t size; uint32_t flags; uint32_t left = pkt->size; uint8_t *ptr = pkt->data; int off = codec->channels > 2 ...
false
FFmpeg
269fc8e04906ffd965aa19425ca90980b23c6508
static int write_packet(AVFormatContext *s, AVPacket *pkt) { WVMuxContext *wc = s->priv_data; AVCodecContext *codec = s->streams[0]->codec; AVIOContext *pb = s->pb; uint64_t size; uint32_t flags; uint32_t left = pkt->size; uint8_t *ptr = pkt->data; int off = codec->channels > 2 ...
{ "code": [], "line_no": [] }
static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1) { WVMuxContext *wc = VAR_0->priv_data; AVCodecContext *codec = VAR_0->streams[0]->codec; AVIOContext *pb = VAR_0->pb; uint64_t size; uint32_t flags; uint32_t left = VAR_1->size; uint8_t *ptr = VAR_1->data; int VAR_2 = co...
[ "static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{", "WVMuxContext *wc = VAR_0->priv_data;", "AVCodecContext *codec = VAR_0->streams[0]->codec;", "AVIOContext *pb = VAR_0->pb;", "uint64_t size;", "uint32_t flags;", "uint32_t left = VAR_1->size;", "uint8_t *ptr = VAR_1->data;", "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, 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 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35, 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 49, 51 ...
8,330
static void compute_antialias_integer(MPADecodeContext *s, GranuleDef *g) { int32_t *ptr, *csa; int n, i; /* we antialias only "long" bands */ if (g->block_type == 2) { if (!g->switch_point) return; /* XXX: check this for 8000Hz case *...
true
FFmpeg
44f1698a3824836d32708ae93e78ac1f2310a07e
static void compute_antialias_integer(MPADecodeContext *s, GranuleDef *g) { int32_t *ptr, *csa; int n, i; if (g->block_type == 2) { if (!g->switch_point) return; n = 1; } else { n = SBLIMIT - 1; } ...
{ "code": [ " tmp0 = 4*(ptr[-1-j]);\\", " tmp1 = 4*(ptr[ j]);\\", " ptr[-1-j] = tmp2 - MULH(tmp1, csa[2+4*j]);\\", " ptr[ j] = tmp2 + MULH(tmp0, csa[3+4*j]);" ], "line_no": [ 43, 45, 49, 51 ] }
static void FUNC_0(MPADecodeContext *VAR_0, GranuleDef *VAR_1) { int32_t *ptr, *csa; int VAR_2, VAR_3; if (VAR_1->block_type == 2) { if (!VAR_1->switch_point) return; VAR_2 = 1; } else { VAR_2 = SBLIMIT - 1; ...
[ "static void FUNC_0(MPADecodeContext *VAR_0,\nGranuleDef *VAR_1)\n{", "int32_t *ptr, *csa;", "int VAR_2, VAR_3;", "if (VAR_1->block_type == 2) {", "if (!VAR_1->switch_point)\nreturn;", "VAR_2 = 1;", "} else {", "VAR_2 = SBLIMIT - 1;", "}", "ptr = VAR_1->sb_hybrid + 18;", "for(VAR_3 = VAR_2;VAR_3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 15 ], [ 17, 19 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41, 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [...
8,331
static int receive_filter(VirtIONet *n, const uint8_t *buf, int size) { static const uint8_t bcast[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; static const uint8_t vlan[] = {0x81, 0x00}; uint8_t *ptr = (uint8_t *)buf; int i; if (n->promisc) return 1; if (!memcmp(&ptr[12], vlan,...
true
qemu
8fd2a2f1a9048b9e37a898c2a5e9ef59d0c1a095
static int receive_filter(VirtIONet *n, const uint8_t *buf, int size) { static const uint8_t bcast[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; static const uint8_t vlan[] = {0x81, 0x00}; uint8_t *ptr = (uint8_t *)buf; int i; if (n->promisc) return 1; if (!memcmp(&ptr[12], vlan,...
{ "code": [ " } else if (n->allmulti) {", " if (!memcmp(ptr, n->mac, ETH_ALEN)) {" ], "line_no": [ 39, 47 ] }
static int FUNC_0(VirtIONet *VAR_0, const uint8_t *VAR_1, int VAR_2) { static const uint8_t VAR_3[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; static const uint8_t VAR_4[] = {0x81, 0x00}; uint8_t *ptr = (uint8_t *)VAR_1; int VAR_5; if (VAR_0->promisc) return 1; if (!memcmp(&ptr[...
[ "static int FUNC_0(VirtIONet *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{", "static const uint8_t VAR_3[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};", "static const uint8_t VAR_4[] = {0x81, 0x00};", "uint8_t *ptr = (uint8_t *)VAR_1;", "int VAR_5;", "if (VAR_0->promisc)\nreturn 1;", "if (!memcmp(&ptr[12], VA...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15, 17 ], [ 21 ], [ 23 ], [ 25, 27 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ...
8,332
static void expand_rle_row(unsigned char *optr, unsigned char *iptr, int chan_offset, int pixelstride) { unsigned char pixel, count; #ifndef WORDS_BIGENDIAN /* rgba -> bgra for rgba32 on little endian cpus */ if (pixelstride == 4 && chan_offset != 3) { chan_offset = 2 - chan_offset...
true
FFmpeg
44f110f509d0ab4fc73b9f2363a97c6577d3850f
static void expand_rle_row(unsigned char *optr, unsigned char *iptr, int chan_offset, int pixelstride) { unsigned char pixel, count; #ifndef WORDS_BIGENDIAN if (pixelstride == 4 && chan_offset != 3) { chan_offset = 2 - chan_offset; } #endif optr += chan_offset...
{ "code": [ "static void expand_rle_row(unsigned char *optr, unsigned char *iptr, ", " pixel = *iptr++;", " *optr = *iptr;", " iptr++;", " pixel = *iptr++;" ], "line_no": [ 1, 31, 45, 49, 55 ] }
static void FUNC_0(unsigned char *VAR_0, unsigned char *VAR_1, int VAR_2, int VAR_3) { unsigned char VAR_4, VAR_5; #ifndef WORDS_BIGENDIAN if (VAR_3 == 4 && VAR_2 != 3) { VAR_2 = 2 - VAR_2; } #endif VAR_0 += VAR_2; while (1) { VAR_4 = *VAR_1++;...
[ "static void FUNC_0(unsigned char *VAR_0, unsigned char *VAR_1,\nint VAR_2, int VAR_3)\n{", "unsigned char VAR_4, VAR_5;", "#ifndef WORDS_BIGENDIAN\nif (VAR_3 == 4 && VAR_2 != 3) {", "VAR_2 = 2 - VAR_2;", "}", "#endif\nVAR_0 += VAR_2;", "while (1) {", "VAR_4 = *VAR_1++;", "if (!(VAR_5 = (VAR_4 & 0x7...
[ 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 11, 15 ], [ 17 ], [ 19 ], [ 21, 25 ], [ 29 ], [ 31 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ], ...
8,333
static void rtsp_cmd_describe(HTTPContext *c, const char *url) { FFStream *stream; char path1[1024]; const char *path; uint8_t *content; int content_length, len; struct sockaddr_in my_addr; /* find which url is asked */ url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(...
true
FFmpeg
25e3e53d4092e7b69a4d681824fa0f7b2731bb1e
static void rtsp_cmd_describe(HTTPContext *c, const char *url) { FFStream *stream; char path1[1024]; const char *path; uint8_t *content; int content_length, len; struct sockaddr_in my_addr; url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url); path = pat...
{ "code": [ " if (!stream->is_feed && !strcmp(stream->fmt->name, \"rtp\") &&" ], "line_no": [ 33 ] }
static void FUNC_0(HTTPContext *VAR_0, const char *VAR_1) { FFStream *stream; char VAR_2[1024]; const char *VAR_3; uint8_t *content; int VAR_4, VAR_5; struct sockaddr_in VAR_6; url_split(NULL, 0, NULL, 0, NULL, 0, NULL, VAR_2, sizeof(VAR_2), VAR_1); VAR_3 = VAR_2; i...
[ "static void FUNC_0(HTTPContext *VAR_0, const char *VAR_1)\n{", "FFStream *stream;", "char VAR_2[1024];", "const char *VAR_3;", "uint8_t *content;", "int VAR_4, VAR_5;", "struct sockaddr_in VAR_6;", "url_split(NULL, 0, NULL, 0, NULL, 0, NULL, VAR_2, sizeof(VAR_2), VAR_1);", "VAR_3 = VAR_2;", "if (...
[ 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 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 21 ], [ 23 ], [ 25, 27 ], [ 31 ], [ 33, 35 ], [ 37 ], [ 39 ], [ 41 ], [ 45 ], [ 47 ], [ 51, 59 ], [...
8,334
av_cold int ff_vp8_decode_free(AVCodecContext *avctx) { VP8Context *s = avctx->priv_data; int i; vp8_decode_flush_impl(avctx, 1); for (i = 0; i < FF_ARRAY_ELEMS(s->frames); i++) av_frame_free(&s->frames[i].tf.f); }
true
FFmpeg
a84f0e8d8f293df3c535f9b893730a835bed6520
av_cold int ff_vp8_decode_free(AVCodecContext *avctx) { VP8Context *s = avctx->priv_data; int i; vp8_decode_flush_impl(avctx, 1); for (i = 0; i < FF_ARRAY_ELEMS(s->frames); i++) av_frame_free(&s->frames[i].tf.f); }
{ "code": [], "line_no": [] }
av_cold int FUNC_0(AVCodecContext *avctx) { VP8Context *s = avctx->priv_data; int VAR_0; vp8_decode_flush_impl(avctx, 1); for (VAR_0 = 0; VAR_0 < FF_ARRAY_ELEMS(s->frames); VAR_0++) av_frame_free(&s->frames[VAR_0].tf.f); }
[ "av_cold int FUNC_0(AVCodecContext *avctx)\n{", "VP8Context *s = avctx->priv_data;", "int VAR_0;", "vp8_decode_flush_impl(avctx, 1);", "for (VAR_0 = 0; VAR_0 < FF_ARRAY_ELEMS(s->frames); VAR_0++)", "av_frame_free(&s->frames[VAR_0].tf.f);", "}" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 2 ], [ 3 ], [ 4 ], [ 5 ], [ 6 ], [ 7 ], [ 8 ] ]
8,335
static void spapr_alloc_htab(sPAPRMachineState *spapr) { long shift; int index; /* allocate hash page table. For now we always make this 16mb, * later we should probably make it scale to the size of guest * RAM */ shift = kvmppc_reset_htab(spapr->htab_shift); if (shift > 0) ...
true
qemu
b41d320fef705289d2b73f4949731eb2e189161d
static void spapr_alloc_htab(sPAPRMachineState *spapr) { long shift; int index; shift = kvmppc_reset_htab(spapr->htab_shift); if (shift > 0) { if (shift != spapr->htab_shift) { error_setg(&error_abort, "Failed to allocate HTAB of requested size, try w...
{ "code": [ " if (shift > 0) {", " if (shift > 0) {" ], "line_no": [ 23, 23 ] }
static void FUNC_0(sPAPRMachineState *VAR_0) { long VAR_1; int VAR_2; VAR_1 = kvmppc_reset_htab(VAR_0->htab_shift); if (VAR_1 > 0) { if (VAR_1 != VAR_0->htab_shift) { error_setg(&error_abort, "Failed to allocate HTAB of requested size, try with smalle...
[ "static void FUNC_0(sPAPRMachineState *VAR_0)\n{", "long VAR_1;", "int VAR_2;", "VAR_1 = kvmppc_reset_htab(VAR_0->htab_shift);", "if (VAR_1 > 0) {", "if (VAR_1 != VAR_0->htab_shift) {", "error_setg(&error_abort, \"Failed to allocate HTAB of requested size, try with smaller maxmem\");", "}", "VAR_0->...
[ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 19 ], [ 23 ], [ 27 ], [ 29 ], [ 31 ], [ 35 ], [ 37 ], [ 39 ], [ 43 ], [ 49 ], [ 53 ], [ 55 ], [ 57 ], [ 59 ], [ 61 ] ]
8,336
static int qemu_rdma_get_buffer(void *opaque, uint8_t *buf, int64_t pos, int size) { QEMUFileRDMA *r = opaque; RDMAContext *rdma = r->rdma; RDMAControlHeader head; int ret = 0; CHECK_ERROR_STATE(); /* * First, we hold on to the last SEND message ...
true
qemu
60fe637bf0e4d7989e21e50f52526444765c63b4
static int qemu_rdma_get_buffer(void *opaque, uint8_t *buf, int64_t pos, int size) { QEMUFileRDMA *r = opaque; RDMAContext *rdma = r->rdma; RDMAControlHeader head; int ret = 0; CHECK_ERROR_STATE(); r->len = qemu_rdma_fill(r->rdma, buf, si...
{ "code": [], "line_no": [] }
static int FUNC_0(void *VAR_0, uint8_t *VAR_1, int64_t VAR_2, int VAR_3) { QEMUFileRDMA *r = VAR_0; RDMAContext *rdma = r->rdma; RDMAControlHeader head; int VAR_4 = 0; CHECK_ERROR_STATE(); r->len = qemu_rdma_fill(r->rdma, VAR_1, VAR_3, 0)...
[ "static int FUNC_0(void *VAR_0, uint8_t *VAR_1,\nint64_t VAR_2, int VAR_3)\n{", "QEMUFileRDMA *r = VAR_0;", "RDMAContext *rdma = r->rdma;", "RDMAControlHeader head;", "int VAR_4 = 0;", "CHECK_ERROR_STATE();", "r->len = qemu_rdma_fill(r->rdma, VAR_1, VAR_3, 0);", "if (r->len) {", "return r->len;", ...
[ 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 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 49 ], [ 53 ], [ 55 ], [ 57 ], [ 59 ], [ 69 ], [ 71 ] ]
8,338
static int ebml_read_binary(AVIOContext *pb, int length, EbmlBin *bin) { av_free(bin->data); if (!(bin->data = av_malloc(length))) return AVERROR(ENOMEM); bin->size = length; bin->pos = avio_tell(pb); if (avio_read(pb, bin->data, length) != length) { av_freep(&bin->data); ...
true
FFmpeg
30be1ea33e5525266ad871bed60b1893a53caeaf
static int ebml_read_binary(AVIOContext *pb, int length, EbmlBin *bin) { av_free(bin->data); if (!(bin->data = av_malloc(length))) return AVERROR(ENOMEM); bin->size = length; bin->pos = avio_tell(pb); if (avio_read(pb, bin->data, length) != length) { av_freep(&bin->data); ...
{ "code": [ " if (!(bin->data = av_malloc(length)))" ], "line_no": [ 7 ] }
static int FUNC_0(AVIOContext *VAR_0, int VAR_1, EbmlBin *VAR_2) { av_free(VAR_2->data); if (!(VAR_2->data = av_malloc(VAR_1))) return AVERROR(ENOMEM); VAR_2->size = VAR_1; VAR_2->pos = avio_tell(VAR_0); if (avio_read(VAR_0, VAR_2->data, VAR_1) != VAR_1) { av_freep(&VAR_2-...
[ "static int FUNC_0(AVIOContext *VAR_0, int VAR_1, EbmlBin *VAR_2)\n{", "av_free(VAR_2->data);", "if (!(VAR_2->data = av_malloc(VAR_1)))\nreturn AVERROR(ENOMEM);", "VAR_2->size = VAR_1;", "VAR_2->pos = avio_tell(VAR_0);", "if (avio_read(VAR_0, VAR_2->data, VAR_1) != VAR_1) {", "av_freep(&VAR_2->data);",...
[ 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7, 9 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 27 ], [ 29 ] ]
8,339
void avcodec_init(void) { static int inited = 0; if (inited != 0) return; inited = 1; dsputil_static_init(); }
false
FFmpeg
5e53486545726987ab4482321d4dcf7e23e7652f
void avcodec_init(void) { static int inited = 0; if (inited != 0) return; inited = 1; dsputil_static_init(); }
{ "code": [], "line_no": [] }
void FUNC_0(void) { static int VAR_0 = 0; if (VAR_0 != 0) return; VAR_0 = 1; dsputil_static_init(); }
[ "void FUNC_0(void)\n{", "static int VAR_0 = 0;", "if (VAR_0 != 0)\nreturn;", "VAR_0 = 1;", "dsputil_static_init();", "}" ]
[ 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9, 11 ], [ 13 ], [ 17 ], [ 19 ] ]
8,341
void swri_get_dither(SwrContext *s, void *dst, int len, unsigned seed, enum AVSampleFormat noise_fmt) { double scale = s->dither.noise_scale; #define TMP_EXTRA 2 double *tmp = av_malloc_array(len + TMP_EXTRA, sizeof(double)); int i; for(i=0; i<len + TMP_EXTRA; i++){ double v; se...
false
FFmpeg
196b885a5f0aa3ca022c1fa99509f47341239784
void swri_get_dither(SwrContext *s, void *dst, int len, unsigned seed, enum AVSampleFormat noise_fmt) { double scale = s->dither.noise_scale; #define TMP_EXTRA 2 double *tmp = av_malloc_array(len + TMP_EXTRA, sizeof(double)); int i; for(i=0; i<len + TMP_EXTRA; i++){ double v; se...
{ "code": [], "line_no": [] }
void FUNC_0(SwrContext *VAR_0, void *VAR_1, int VAR_2, unsigned VAR_3, enum AVSampleFormat VAR_4) { double VAR_5 = VAR_0->dither.noise_scale; #define TMP_EXTRA 2 double *VAR_6 = av_malloc_array(VAR_2 + TMP_EXTRA, sizeof(double)); int VAR_7; for(VAR_7=0; VAR_7<VAR_2 + TMP_EXTRA; VAR_7++){ ...
[ "void FUNC_0(SwrContext *VAR_0, void *VAR_1, int VAR_2, unsigned VAR_3, enum AVSampleFormat VAR_4) {", "double VAR_5 = VAR_0->dither.noise_scale;", "#define TMP_EXTRA 2\ndouble *VAR_6 = av_malloc_array(VAR_2 + TMP_EXTRA, sizeof(double));", "int VAR_7;", "for(VAR_7=0; VAR_7<VAR_2 + TMP_EXTRA; 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 ]
[ [ 1 ], [ 3 ], [ 5, 7 ], [ 9 ], [ 13 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25, 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 45 ], [ 47 ], [...
8,342
static int hls_coding_quadtree(HEVCContext *s, int x0, int y0, int log2_cb_size, int cb_depth) { HEVCLocalContext *lc = s->HEVClc; const int cb_size = 1 << log2_cb_size; int ret; lc->ct.depth = cb_depth; if (x0 + cb_size <= s->sps->width && y0 + c...
true
FFmpeg
96c4ba2392b9cd55a5e84cb28db5c0c7e53cd390
static int hls_coding_quadtree(HEVCContext *s, int x0, int y0, int log2_cb_size, int cb_depth) { HEVCLocalContext *lc = s->HEVClc; const int cb_size = 1 << log2_cb_size; int ret; lc->ct.depth = cb_depth; if (x0 + cb_size <= s->sps->width && y0 + c...
{ "code": [ " if (more_data && x1 < s->sps->width)", " if (more_data && y1 < s->sps->height)" ], "line_no": [ 69, 73 ] }
static int FUNC_0(HEVCContext *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4) { HEVCLocalContext *lc = VAR_0->HEVClc; const int VAR_5 = 1 << VAR_3; int VAR_6; lc->ct.depth = VAR_4; if (VAR_1 + VAR_5 <= VAR_0->sps->width && VAR_2 + VAR_5 <= VAR...
[ "static int FUNC_0(HEVCContext *VAR_0, int VAR_1, int VAR_2,\nint VAR_3, int VAR_4)\n{", "HEVCLocalContext *lc = VAR_0->HEVClc;", "const int VAR_5 = 1 << VAR_3;", "int VAR_6;", "lc->ct.depth = VAR_4;", "if (VAR_1 + VAR_5 <= VAR_0->sps->width &&\nVAR_2 + VAR_5 <= VAR_0->sps->height &&\nVAR_3 > VAR_0->s...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17, 19, 21 ], [ 23, 25 ], [ 27 ], [ 29, 31 ], [ 33 ], [ 35, 37 ], [ 39 ], [ 41 ], [ 43 ], [ 47 ], [ 49 ], [ 51 ...
8,343
static void test_uuid_unparse_strdup(void) { int i; for (i = 0; i < ARRAY_SIZE(uuid_test_data); i++) { char *out; if (!uuid_test_data[i].check_unparse) { continue; } out = qemu_uuid_unparse_strdup(&uuid_test_data[i].uuid); g_assert_cmpstr(uuid_tes...
true
qemu
d9c05e507f7a6647cd7b106c8784f1f15a0e4f5c
static void test_uuid_unparse_strdup(void) { int i; for (i = 0; i < ARRAY_SIZE(uuid_test_data); i++) { char *out; if (!uuid_test_data[i].check_unparse) { continue; } out = qemu_uuid_unparse_strdup(&uuid_test_data[i].uuid); g_assert_cmpstr(uuid_tes...
{ "code": [], "line_no": [] }
static void FUNC_0(void) { int VAR_0; for (VAR_0 = 0; VAR_0 < ARRAY_SIZE(uuid_test_data); VAR_0++) { char *out; if (!uuid_test_data[VAR_0].check_unparse) { continue; } out = qemu_uuid_unparse_strdup(&uuid_test_data[VAR_0].uuid); g_assert_cmpstr(uu...
[ "static void FUNC_0(void)\n{", "int VAR_0;", "for (VAR_0 = 0; VAR_0 < ARRAY_SIZE(uuid_test_data); VAR_0++) {", "char *out;", "if (!uuid_test_data[VAR_0].check_unparse) {", "continue;", "}", "out = qemu_uuid_unparse_strdup(&uuid_test_data[VAR_0].uuid);", "g_assert_cmpstr(uuid_test_data[VAR_0].uuidstr...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 26 ], [ 28 ] ]
8,344
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size) { SmackVContext * const smk = avctx->priv_data; uint8_t *out; uint32_t *pal; GetBitContext gb; int blocks, blk, bw, bh; int i; int stride; if(buf_size == 769) ...
true
FFmpeg
909063f74551141e181ff806fabe133ebc5e369e
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size) { SmackVContext * const smk = avctx->priv_data; uint8_t *out; uint32_t *pal; GetBitContext gb; int blocks, blk, bw, bh; int i; int stride; if(buf_size == 769) ...
{ "code": [ " if(buf_size == 769)" ], "line_no": [ 21 ] }
static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2, const uint8_t *VAR_3, int VAR_4) { SmackVContext * const smk = VAR_0->priv_data; uint8_t *out; uint32_t *pal; GetBitContext gb; int VAR_5, VAR_6, VAR_7, VAR_8; int VAR_9; int VAR_10; if(VAR_4 == 769) re...
[ "static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2, const uint8_t *VAR_3, int VAR_4)\n{", "SmackVContext * const smk = VAR_0->priv_data;", "uint8_t *out;", "uint32_t *pal;", "GetBitContext gb;", "int VAR_5, VAR_6, VAR_7, VAR_8;", "int VAR_9;", "int VAR_10;", "if(VAR_4 == 769)\nreturn ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 21, 23 ], [ 25, 27 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 47 ], [ 49 ], [ 51 ...
8,345
static void core_region_del(MemoryListener *listener, MemoryRegionSection *section) { cpu_register_physical_memory_log(section, false); }
true
qemu
54688b1ec1f468c7272b837ff57298068aaedf5f
static void core_region_del(MemoryListener *listener, MemoryRegionSection *section) { cpu_register_physical_memory_log(section, false); }
{ "code": [ " cpu_register_physical_memory_log(section, false);" ], "line_no": [ 7 ] }
static void FUNC_0(MemoryListener *VAR_0, MemoryRegionSection *VAR_1) { cpu_register_physical_memory_log(VAR_1, false); }
[ "static void FUNC_0(MemoryListener *VAR_0,\nMemoryRegionSection *VAR_1)\n{", "cpu_register_physical_memory_log(VAR_1, false);", "}" ]
[ 0, 1, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ] ]
8,346
void do_store_msr (CPUPPCState *env, target_ulong value) { int enter_pm; value &= env->msr_mask; if (((value >> MSR_IR) & 1) != msr_ir || ((value >> MSR_DR) & 1) != msr_dr) { /* Flush all tlb when changing translation mode */ tlb_flush(env, 1); env->interrupt_reques...
true
qemu
c19dbb9426a34a8e8cfdc5c285e8562ff3fe4f7a
void do_store_msr (CPUPPCState *env, target_ulong value) { int enter_pm; value &= env->msr_mask; if (((value >> MSR_IR) & 1) != msr_ir || ((value >> MSR_DR) & 1) != msr_dr) { tlb_flush(env, 1); env->interrupt_request |= CPU_INTERRUPT_EXITTB; } #if 0 if (...
{ "code": [ " env->halted = 1;", " env->exception_index = EXCP_HLT;", " cpu_loop_exit();" ], "line_no": [ 161, 163, 165 ] }
void FUNC_0 (CPUPPCState *VAR_0, target_ulong VAR_1) { int VAR_2; VAR_1 &= VAR_0->msr_mask; if (((VAR_1 >> MSR_IR) & 1) != msr_ir || ((VAR_1 >> MSR_DR) & 1) != msr_dr) { tlb_flush(VAR_0, 1); VAR_0->interrupt_request |= CPU_INTERRUPT_EXITTB; } #if 0 if (l...
[ "void FUNC_0 (CPUPPCState *VAR_0, target_ulong VAR_1)\n{", "int VAR_2;", "VAR_1 &= VAR_0->msr_mask;", "if (((VAR_1 >> MSR_IR) & 1) != msr_ir ||\n((VAR_1 >> MSR_DR) & 1) != msr_dr) {", "tlb_flush(VAR_0, 1);", "VAR_0->interrupt_request |= CPU_INTERRUPT_EXITTB;", "}", "#if 0\nif (loglevel != 0) {", "fp...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11, 13 ], [ 17 ], [ 19 ], [ 21 ], [ 23, 25 ], [ 27 ], [ 29 ], [ 31, 33 ], [ 35, 37, 39 ], [ 43 ], [ 45 ], [ 47 ], [ 49, 51 ], [ 53...
8,347
static int dv_extract_audio_info(DVDemuxContext* c, uint8_t* frame) { const uint8_t* as_pack; int freq, stype, smpls, quant, i, ach; as_pack = dv_extract_pack(frame, dv_audio_source); if (!as_pack || !c->sys) { /* No audio ? */ c->ach = 0; smpls = as_pack[1] & 0x3f; /* samples in t...
true
FFmpeg
0ab3687924457cb4fd81897bd39ab3cc5b699588
static int dv_extract_audio_info(DVDemuxContext* c, uint8_t* frame) { const uint8_t* as_pack; int freq, stype, smpls, quant, i, ach; as_pack = dv_extract_pack(frame, dv_audio_source); if (!as_pack || !c->sys) { c->ach = 0; smpls = as_pack[1] & 0x3f; freq = (as_pack[4] >> 3) ...
{ "code": [], "line_no": [] }
static int FUNC_0(DVDemuxContext* VAR_0, uint8_t* VAR_1) { const uint8_t* VAR_2; int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8; VAR_2 = dv_extract_pack(VAR_1, dv_audio_source); if (!VAR_2 || !VAR_0->sys) { VAR_0->VAR_8 = 0; VAR_5 = VAR_2[1] & 0x3f; VAR_3 = (VAR_2[4] >> 3) & 0...
[ "static int FUNC_0(DVDemuxContext* VAR_0, uint8_t* VAR_1)\n{", "const uint8_t* VAR_2;", "int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;", "VAR_2 = dv_extract_pack(VAR_1, dv_audio_source);", "if (!VAR_2 || !VAR_0->sys) {", "VAR_0->VAR_8 = 0;", "VAR_5 = VAR_2[1] & 0x3f;", "VAR_3 = (VAR_2[4] >> 3) & 0x0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ], [ 16 ], [ 17, 18 ], [ 20 ], [ 21 ], [ 22 ], [ 23, 24 ],...
8,348
QEMUFile *qemu_fopen_socket(int fd, const char *mode) { QEMUFileSocket *s; if (qemu_file_mode_is_not_valid(mode)) { return NULL; } s = g_malloc0(sizeof(QEMUFileSocket)); s->fd = fd; if (mode[0] == 'w') { qemu_set_block(s->fd); s->file = qemu_fopen_ops(s, &so...
true
qemu
60fe637bf0e4d7989e21e50f52526444765c63b4
QEMUFile *qemu_fopen_socket(int fd, const char *mode) { QEMUFileSocket *s; if (qemu_file_mode_is_not_valid(mode)) { return NULL; } s = g_malloc0(sizeof(QEMUFileSocket)); s->fd = fd; if (mode[0] == 'w') { qemu_set_block(s->fd); s->file = qemu_fopen_ops(s, &so...
{ "code": [], "line_no": [] }
QEMUFile *FUNC_0(int fd, const char *mode) { QEMUFileSocket *s; if (qemu_file_mode_is_not_valid(mode)) { return NULL; } s = g_malloc0(sizeof(QEMUFileSocket)); s->fd = fd; if (mode[0] == 'w') { qemu_set_block(s->fd); s->file = qemu_fopen_ops(s, &socket_write_...
[ "QEMUFile *FUNC_0(int fd, const char *mode)\n{", "QEMUFileSocket *s;", "if (qemu_file_mode_is_not_valid(mode)) {", "return NULL;", "}", "s = g_malloc0(sizeof(QEMUFileSocket));", "s->fd = fd;", "if (mode[0] == 'w') {", "qemu_set_block(s->fd);", "s->file = qemu_fopen_ops(s, &socket_write_ops);", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ] ]
8,349
static void aio_rfifolock_cb(void *opaque) { /* Kick owner thread in case they are blocked in aio_poll() */ aio_notify(opaque); }
true
qemu
ca96ac44dcd290566090b2435bc828fded356ad9
static void aio_rfifolock_cb(void *opaque) { aio_notify(opaque); }
{ "code": [ " aio_notify(opaque);" ], "line_no": [ 7 ] }
static void FUNC_0(void *VAR_0) { aio_notify(VAR_0); }
[ "static void FUNC_0(void *VAR_0)\n{", "aio_notify(VAR_0);", "}" ]
[ 0, 1, 0 ]
[ [ 1, 3 ], [ 7 ], [ 9 ] ]
8,350
int nbd_receive_negotiate(QIOChannel *ioc, const char *name, QCryptoTLSCreds *tlscreds, const char *hostname, QIOChannel **outioc, NBDExportInfo *info, Error **errp) { char buf[256]; uint64_t magic; int rc; bool zeroes = true;...
true
qemu
f140e3000371e67ff4e00df3213e2d576d9c91be
int nbd_receive_negotiate(QIOChannel *ioc, const char *name, QCryptoTLSCreds *tlscreds, const char *hostname, QIOChannel **outioc, NBDExportInfo *info, Error **errp) { char buf[256]; uint64_t magic; int rc; bool zeroes = true;...
{ "code": [ " } else {" ], "line_no": [ 101 ] }
int FUNC_0(QIOChannel *VAR_0, const char *VAR_1, QCryptoTLSCreds *VAR_2, const char *VAR_3, QIOChannel **VAR_4, NBDExportInfo *VAR_5, Error **VAR_6) { char VAR_7[256]; uint64_t magic; int VAR_8; bool zeroes = true; bool st...
[ "int FUNC_0(QIOChannel *VAR_0, const char *VAR_1,\nQCryptoTLSCreds *VAR_2, const char *VAR_3,\nQIOChannel **VAR_4, NBDExportInfo *VAR_5,\nError **VAR_6)\n{", "char VAR_7[256];", "uint64_t magic;", "int VAR_8;", "bool zeroes = true;", "bool structured_reply = VAR_5->structured_reply;", "trace_nbd_receive...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ], [ ...
8,351
static int get_codec_data(AVIOContext *pb, AVStream *vst, AVStream *ast, int myth) { nuv_frametype frametype; if (!vst && !myth) return 1; // no codec data needed while (!pb->eof_reached) { int size, subtype; frametype = avio_r8(pb); swi...
true
FFmpeg
ab87d9b6677c5757d467f532e681b056d3e77e6b
static int get_codec_data(AVIOContext *pb, AVStream *vst, AVStream *ast, int myth) { nuv_frametype frametype; if (!vst && !myth) return 1; while (!pb->eof_reached) { int size, subtype; frametype = avio_r8(pb); switch (frametype) { ...
{ "code": [ " vst->codec->extradata = av_malloc(size);", " return 1;", " return 1;" ], "line_no": [ 37, 45, 131 ] }
static int FUNC_0(AVIOContext *VAR_0, AVStream *VAR_1, AVStream *VAR_2, int VAR_3) { nuv_frametype frametype; if (!VAR_1 && !VAR_3) return 1; while (!VAR_0->eof_reached) { int VAR_4, VAR_5; frametype = avio_r8(VAR_0); switch (frametype)...
[ "static int FUNC_0(AVIOContext *VAR_0, AVStream *VAR_1,\nAVStream *VAR_2, int VAR_3)\n{", "nuv_frametype frametype;", "if (!VAR_1 && !VAR_3)\nreturn 1;", "while (!VAR_0->eof_reached) {", "int VAR_4, VAR_5;", "frametype = avio_r8(VAR_0);", "switch (frametype) {", "case NUV_EXTRADATA:\nVAR_5 = avio_r8(V...
[ 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 11, 13 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25, 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43, 45 ], [ 47 ], [ 49...