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 |
|---|---|---|---|---|---|---|---|---|---|---|
2,076 | void laio_attach_aio_context(LinuxAioState *s, AioContext *new_context)
{
s->aio_context = new_context;
s->completion_bh = aio_bh_new(new_context, qemu_laio_completion_bh, s);
aio_set_event_notifier(new_context, &s->e, false,
qemu_laio_completion_cb, NULL);
}
| false | qemu | ee68697551cd81186c5b12eba10c158350cf1165 | void laio_attach_aio_context(LinuxAioState *s, AioContext *new_context)
{
s->aio_context = new_context;
s->completion_bh = aio_bh_new(new_context, qemu_laio_completion_bh, s);
aio_set_event_notifier(new_context, &s->e, false,
qemu_laio_completion_cb, NULL);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(LinuxAioState *VAR_0, AioContext *VAR_1)
{
VAR_0->aio_context = VAR_1;
VAR_0->completion_bh = aio_bh_new(VAR_1, qemu_laio_completion_bh, VAR_0);
aio_set_event_notifier(VAR_1, &VAR_0->e, false,
qemu_laio_completion_cb, NULL);
}
| [
"void FUNC_0(LinuxAioState *VAR_0, AioContext *VAR_1)\n{",
"VAR_0->aio_context = VAR_1;",
"VAR_0->completion_bh = aio_bh_new(VAR_1, qemu_laio_completion_bh, VAR_0);",
"aio_set_event_notifier(VAR_1, &VAR_0->e, false,\nqemu_laio_completion_cb, NULL);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13
]
] |
2,077 | process_tx_desc(E1000State *s, struct e1000_tx_desc *dp)
{
PCIDevice *d = PCI_DEVICE(s);
uint32_t txd_lower = le32_to_cpu(dp->lower.data);
uint32_t dtype = txd_lower & (E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_D);
unsigned int split_size = txd_lower & 0xffff, bytes, sz;
unsigned int msh = 0xfffff;
... | false | qemu | 7d08c73e7bdc39b10e5f2f5acdce700f17ffe962 | process_tx_desc(E1000State *s, struct e1000_tx_desc *dp)
{
PCIDevice *d = PCI_DEVICE(s);
uint32_t txd_lower = le32_to_cpu(dp->lower.data);
uint32_t dtype = txd_lower & (E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_D);
unsigned int split_size = txd_lower & 0xffff, bytes, sz;
unsigned int msh = 0xfffff;
... | {
"code": [],
"line_no": []
} | FUNC_0(E1000State *VAR_0, struct e1000_tx_desc *VAR_1)
{
PCIDevice *d = PCI_DEVICE(VAR_0);
uint32_t txd_lower = le32_to_cpu(VAR_1->lower.data);
uint32_t dtype = txd_lower & (E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_D);
unsigned int VAR_2 = txd_lower & 0xffff, VAR_3, VAR_4;
unsigned int VAR_5 = 0xff... | [
"FUNC_0(E1000State *VAR_0, struct e1000_tx_desc *VAR_1)\n{",
"PCIDevice *d = PCI_DEVICE(VAR_0);",
"uint32_t txd_lower = le32_to_cpu(VAR_1->lower.data);",
"uint32_t dtype = txd_lower & (E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_D);",
"unsigned int VAR_2 = txd_lower & 0xffff, VAR_3, VAR_4;",
"unsigned 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
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
... |
2,078 | int unix_socket_outgoing(const char *path)
{
Error *local_err = NULL;
int fd = unix_connect(path, &local_err);
if (local_err != NULL) {
qerror_report_err(local_err);
error_free(local_err);
}
return fd;
}
| false | qemu | 537b41f5013e1951fa15e8f18855b18d76124ce4 | int unix_socket_outgoing(const char *path)
{
Error *local_err = NULL;
int fd = unix_connect(path, &local_err);
if (local_err != NULL) {
qerror_report_err(local_err);
error_free(local_err);
}
return fd;
}
| {
"code": [],
"line_no": []
} | int FUNC_0(const char *VAR_0)
{
Error *local_err = NULL;
int VAR_1 = unix_connect(VAR_0, &local_err);
if (local_err != NULL) {
qerror_report_err(local_err);
error_free(local_err);
}
return VAR_1;
}
| [
"int FUNC_0(const char *VAR_0)\n{",
"Error *local_err = NULL;",
"int VAR_1 = unix_connect(VAR_0, &local_err);",
"if (local_err != NULL) {",
"qerror_report_err(local_err);",
"error_free(local_err);",
"}",
"return VAR_1;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
2,079 | static ssize_t nbd_receive_request(int csock, struct nbd_request *request)
{
uint8_t buf[4 + 4 + 8 + 8 + 4];
uint32_t magic;
if (read_sync(csock, buf, sizeof(buf)) != sizeof(buf)) {
LOG("read failed");
errno = EINVAL;
return -1;
}
/* Request
[ 0 .. 3] ... | false | qemu | 185b43386ad999c80bdc58e41b87f05e5b3e8463 | static ssize_t nbd_receive_request(int csock, struct nbd_request *request)
{
uint8_t buf[4 + 4 + 8 + 8 + 4];
uint32_t magic;
if (read_sync(csock, buf, sizeof(buf)) != sizeof(buf)) {
LOG("read failed");
errno = EINVAL;
return -1;
}
magic = be32... | {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(int csock, struct nbd_request *request)
{
uint8_t buf[4 + 4 + 8 + 8 + 4];
uint32_t magic;
if (read_sync(csock, buf, sizeof(buf)) != sizeof(buf)) {
LOG("read failed");
errno = EINVAL;
return -1;
}
magic = be32_to_cpup((uin... | [
"static ssize_t FUNC_0(int csock, struct nbd_request *request)\n{",
"uint8_t buf[4 + 4 + 8 + 8 + 4];",
"uint32_t magic;",
"if (read_sync(csock, buf, sizeof(buf)) != sizeof(buf)) {",
"LOG(\"read failed\");",
"errno = EINVAL;",
"return -1;",
"}",
"magic = be32_to_cpup((uint32_t*)buf);",
"request->ty... | [
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
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51,
53
],
[
55
],
[
59
],
[
61
],
[
63
],
[
65
],
... |
2,080 | static void raw_close_fd_pool(BDRVRawState *s)
{
int i;
for (i = 0; i < RAW_FD_POOL_SIZE; i++) {
if (s->fd_pool[i] != -1) {
close(s->fd_pool[i]);
s->fd_pool[i] = -1;
}
}
}
| false | qemu | 3c529d935923a70519557d420db1d5a09a65086a | static void raw_close_fd_pool(BDRVRawState *s)
{
int i;
for (i = 0; i < RAW_FD_POOL_SIZE; i++) {
if (s->fd_pool[i] != -1) {
close(s->fd_pool[i]);
s->fd_pool[i] = -1;
}
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(BDRVRawState *VAR_0)
{
int VAR_1;
for (VAR_1 = 0; VAR_1 < RAW_FD_POOL_SIZE; VAR_1++) {
if (VAR_0->fd_pool[VAR_1] != -1) {
close(VAR_0->fd_pool[VAR_1]);
VAR_0->fd_pool[VAR_1] = -1;
}
}
}
| [
"static void FUNC_0(BDRVRawState *VAR_0)\n{",
"int VAR_1;",
"for (VAR_1 = 0; VAR_1 < RAW_FD_POOL_SIZE; VAR_1++) {",
"if (VAR_0->fd_pool[VAR_1] != -1) {",
"close(VAR_0->fd_pool[VAR_1]);",
"VAR_0->fd_pool[VAR_1] = -1;",
"}",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
2,081 | static UHCIAsync *uhci_async_alloc(UHCIState *s)
{
UHCIAsync *async = g_malloc(sizeof(UHCIAsync));
memset(&async->packet, 0, sizeof(async->packet));
async->uhci = s;
async->valid = 0;
async->td = 0;
async->token = 0;
async->done = 0;
async->isoc = 0;
usb_packet_init... | false | qemu | fff23ee9a5de74ab111b3cea9eec56782e7d7c50 | static UHCIAsync *uhci_async_alloc(UHCIState *s)
{
UHCIAsync *async = g_malloc(sizeof(UHCIAsync));
memset(&async->packet, 0, sizeof(async->packet));
async->uhci = s;
async->valid = 0;
async->td = 0;
async->token = 0;
async->done = 0;
async->isoc = 0;
usb_packet_init... | {
"code": [],
"line_no": []
} | static UHCIAsync *FUNC_0(UHCIState *s)
{
UHCIAsync *async = g_malloc(sizeof(UHCIAsync));
memset(&async->packet, 0, sizeof(async->packet));
async->uhci = s;
async->valid = 0;
async->td = 0;
async->token = 0;
async->done = 0;
async->isoc = 0;
usb_packet_init(&async->p... | [
"static UHCIAsync *FUNC_0(UHCIState *s)\n{",
"UHCIAsync *async = g_malloc(sizeof(UHCIAsync));",
"memset(&async->packet, 0, sizeof(async->packet));",
"async->uhci = s;",
"async->valid = 0;",
"async->td = 0;",
"async->token = 0;",
"async->done = 0;",
"async->isoc = 0;",
"usb_packet_init(&async... | [
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
],
[
29
],
[
31
]
] |
2,085 | static void apic_startup(APICState *s, int vector_num)
{
CPUState *env = s->cpu_env;
if (!env->halted)
return;
env->eip = 0;
cpu_x86_load_seg_cache(env, R_CS, vector_num << 8, vector_num << 12,
0xffff, 0);
env->halted = 0;
}
| false | qemu | b09ea7d55cfab5a75912bb56ed1fcd757604a759 | static void apic_startup(APICState *s, int vector_num)
{
CPUState *env = s->cpu_env;
if (!env->halted)
return;
env->eip = 0;
cpu_x86_load_seg_cache(env, R_CS, vector_num << 8, vector_num << 12,
0xffff, 0);
env->halted = 0;
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(APICState *VAR_0, int VAR_1)
{
CPUState *env = VAR_0->cpu_env;
if (!env->halted)
return;
env->eip = 0;
cpu_x86_load_seg_cache(env, R_CS, VAR_1 << 8, VAR_1 << 12,
0xffff, 0);
env->halted = 0;
}
| [
"static void FUNC_0(APICState *VAR_0, int VAR_1)\n{",
"CPUState *env = VAR_0->cpu_env;",
"if (!env->halted)\nreturn;",
"env->eip = 0;",
"cpu_x86_load_seg_cache(env, R_CS, VAR_1 << 8, VAR_1 << 12,\n0xffff, 0);",
"env->halted = 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
]
] |
2,086 | void kvm_s390_virtio_irq(S390CPU *cpu, int config_change, uint64_t token)
{
kvm_s390_interrupt_internal(cpu, KVM_S390_INT_VIRTIO, config_change,
token, 1);
}
| false | qemu | de13d2161473d02ae97ec0f8e4503147554892dd | void kvm_s390_virtio_irq(S390CPU *cpu, int config_change, uint64_t token)
{
kvm_s390_interrupt_internal(cpu, KVM_S390_INT_VIRTIO, config_change,
token, 1);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(S390CPU *VAR_0, int VAR_1, uint64_t VAR_2)
{
kvm_s390_interrupt_internal(VAR_0, KVM_S390_INT_VIRTIO, VAR_1,
VAR_2, 1);
}
| [
"void FUNC_0(S390CPU *VAR_0, int VAR_1, uint64_t VAR_2)\n{",
"kvm_s390_interrupt_internal(VAR_0, KVM_S390_INT_VIRTIO, VAR_1,\nVAR_2, 1);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
]
] |
2,087 | static void bdrv_io_limits_intercept(BlockDriverState *bs,
unsigned int bytes,
bool is_write)
{
/* does this io must wait */
bool must_wait = throttle_schedule_timer(&bs->throttle_state, is_write);
/* if must wait or any reque... | false | qemu | 61007b316cd71ee7333ff7a0a749a8949527575f | static void bdrv_io_limits_intercept(BlockDriverState *bs,
unsigned int bytes,
bool is_write)
{
bool must_wait = throttle_schedule_timer(&bs->throttle_state, is_write);
if (must_wait ||
!qemu_co_queue_empty(&bs... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0,
unsigned int VAR_1,
bool VAR_2)
{
bool must_wait = throttle_schedule_timer(&VAR_0->throttle_state, VAR_2);
if (must_wait ||
!qemu_co_queue_empty(&VAR_0->throttled_req... | [
"static void FUNC_0(BlockDriverState *VAR_0,\nunsigned int VAR_1,\nbool VAR_2)\n{",
"bool must_wait = throttle_schedule_timer(&VAR_0->throttle_state, VAR_2);",
"if (must_wait ||\n!qemu_co_queue_empty(&VAR_0->throttled_reqs[VAR_2])) {",
"qemu_co_queue_wait(&VAR_0->throttled_reqs[VAR_2]);",
"}",
"throttle_a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
11
],
[
17,
19
],
[
21
],
[
23
],
[
29
],
[
37
],
[
39
],
[
41
],
[
47
],
[
49
]
] |
2,088 | static int parse_bintree(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
Plane *plane, int code, Cell *ref_cell,
const int depth, const int strip_width)
{
Cell curr_cell;
int bytes_used;
if (depth <= 0) {
av_log(avctx, AV_LOG_ERROR, ... | false | FFmpeg | e9e642cbfbf36285f60d1dba00103f068b077940 | static int parse_bintree(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
Plane *plane, int code, Cell *ref_cell,
const int depth, const int strip_width)
{
Cell curr_cell;
int bytes_used;
if (depth <= 0) {
av_log(avctx, AV_LOG_ERROR, ... | {
"code": [],
"line_no": []
} | static int FUNC_0(Indeo3DecodeContext *VAR_0, AVCodecContext *VAR_1,
Plane *VAR_2, int VAR_3, Cell *VAR_4,
const int VAR_5, const int VAR_6)
{
Cell curr_cell;
int VAR_7;
if (VAR_5 <= 0) {
av_log(VAR_1, AV_LOG_ERROR, "Stack overflow (c... | [
"static int FUNC_0(Indeo3DecodeContext *VAR_0, AVCodecContext *VAR_1,\nPlane *VAR_2, int VAR_3, Cell *VAR_4,\nconst int VAR_5, const int VAR_6)\n{",
"Cell curr_cell;",
"int VAR_7;",
"if (VAR_5 <= 0) {",
"av_log(VAR_1, AV_LOG_ERROR, \"Stack overflow (corrupted binary tree)!\\n\");",
"return AVERROR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
2,089 | int64_t swr_next_pts(struct SwrContext *s, int64_t pts){
if(pts == INT64_MIN)
return s->outpts;
if(s->min_compensation >= FLT_MAX) {
return (s->outpts = pts - swr_get_delay(s, s->in_sample_rate * (int64_t)s->out_sample_rate));
} else {
int64_t delta = pts - swr_get_delay(s, s->... | false | FFmpeg | d676598f879ba01ddb62f9abe8e17b2e94cb91cd | int64_t swr_next_pts(struct SwrContext *s, int64_t pts){
if(pts == INT64_MIN)
return s->outpts;
if(s->min_compensation >= FLT_MAX) {
return (s->outpts = pts - swr_get_delay(s, s->in_sample_rate * (int64_t)s->out_sample_rate));
} else {
int64_t delta = pts - swr_get_delay(s, s->... | {
"code": [],
"line_no": []
} | int64_t FUNC_0(struct SwrContext *s, int64_t pts){
if(pts == INT64_MIN)
return s->outpts;
if(s->min_compensation >= FLT_MAX) {
return (s->outpts = pts - swr_get_delay(s, s->in_sample_rate * (int64_t)s->out_sample_rate));
} else {
int64_t delta = pts - swr_get_delay(s, s->in_sam... | [
"int64_t FUNC_0(struct SwrContext *s, int64_t pts){",
"if(pts == INT64_MIN)\nreturn s->outpts;",
"if(s->min_compensation >= FLT_MAX) {",
"return (s->outpts = pts - swr_get_delay(s, s->in_sample_rate * (int64_t)s->out_sample_rate));",
"} else {",
"int64_t delta = pts - swr_get_delay(s, s->in_sample_rate * ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
2,090 | int av_utf8_decode(int32_t *codep, const uint8_t **bufp, const uint8_t *buf_end,
unsigned int flags)
{
const uint8_t *p = *bufp;
uint32_t top;
uint64_t code;
int ret = 0;
if (p >= buf_end)
return 0;
code = *p++;
/* first sequence byte starts with 10... | false | FFmpeg | d4ec07dfe7dbc86e8f6403781c511b9463a526d2 | int av_utf8_decode(int32_t *codep, const uint8_t **bufp, const uint8_t *buf_end,
unsigned int flags)
{
const uint8_t *p = *bufp;
uint32_t top;
uint64_t code;
int ret = 0;
if (p >= buf_end)
return 0;
code = *p++;
if ((code & 0xc0) == 0x80 || ... | {
"code": [],
"line_no": []
} | int FUNC_0(int32_t *VAR_0, const uint8_t **VAR_1, const uint8_t *VAR_2,
unsigned int VAR_3)
{
const uint8_t *VAR_4 = *VAR_1;
uint32_t top;
uint64_t code;
int VAR_5 = 0;
if (VAR_4 >= VAR_2)
return 0;
code = *VAR_4++;
if ((code & 0xc0) == 0x80... | [
"int FUNC_0(int32_t *VAR_0, const uint8_t **VAR_1, const uint8_t *VAR_2,\nunsigned int VAR_3)\n{",
"const uint8_t *VAR_4 = *VAR_1;",
"uint32_t top;",
"uint64_t code;",
"int VAR_5 = 0;",
"if (VAR_4 >= VAR_2)\nreturn 0;",
"code = *VAR_4++;",
"if ((code & 0xc0) == 0x80 || code >= 0xFE) {",
"VAR_5 = AVE... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
23
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
59
... |
2,092 | static av_always_inline av_flatten void h264_loop_filter_luma_intra_c(uint8_t *pix, int xstride, int ystride, int alpha, int beta)
{
int d;
for( d = 0; d < 16; d++ ) {
const int p2 = pix[-3*xstride];
const int p1 = pix[-2*xstride];
const int p0 = pix[-1*xstride];
const i... | false | FFmpeg | dd561441b1e849df7d8681c6f32af82d4088dafd | static av_always_inline av_flatten void h264_loop_filter_luma_intra_c(uint8_t *pix, int xstride, int ystride, int alpha, int beta)
{
int d;
for( d = 0; d < 16; d++ ) {
const int p2 = pix[-3*xstride];
const int p1 = pix[-2*xstride];
const int p0 = pix[-1*xstride];
const i... | {
"code": [],
"line_no": []
} | static av_always_inline VAR_0 void FUNC_0(uint8_t *VAR_1, int VAR_2, int VAR_3, int VAR_4, int VAR_5)
{
int VAR_6;
for( VAR_6 = 0; VAR_6 < 16; VAR_6++ ) {
const int VAR_7 = VAR_1[-3*VAR_2];
const int VAR_8 = VAR_1[-2*VAR_2];
const int VAR_9 = VAR_1[-1*VAR_2];
const int V... | [
"static av_always_inline VAR_0 void FUNC_0(uint8_t *VAR_1, int VAR_2, int VAR_3, int VAR_4, int VAR_5)\n{",
"int VAR_6;",
"for( VAR_6 = 0; VAR_6 < 16; VAR_6++ ) {",
"const int VAR_7 = VAR_1[-3*VAR_2];",
"const int VAR_8 = VAR_1[-2*VAR_2];",
"const int VAR_9 = VAR_1[-1*VAR_2];",
"const int VAR_10 = 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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25,
27,
29
],
[
33
],
[
35,
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[... |
2,094 | static void sigbus_handler(int signal)
{
siglongjmp(sigjump, 1);
}
| true | qemu | 1e356fc14beaa3ece6c0e961bd479af58be3198b | static void sigbus_handler(int signal)
{
siglongjmp(sigjump, 1);
}
| {
"code": [
" siglongjmp(sigjump, 1);"
],
"line_no": [
5
]
} | static void FUNC_0(int VAR_0)
{
siglongjmp(sigjump, 1);
}
| [
"static void FUNC_0(int VAR_0)\n{",
"siglongjmp(sigjump, 1);",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
2,095 | void fw_cfg_add_bytes(FWCfgState *s, uint16_t key, uint8_t *data, uint32_t len)
{
int arch = !!(key & FW_CFG_ARCH_LOCAL);
key &= FW_CFG_ENTRY_MASK;
assert(key < FW_CFG_MAX_ENTRY);
s->entries[arch][key].data = data;
s->entries[arch][key].len = len;
}
| true | qemu | 089da572b956ef0f8f5b8d5917358e07892a77c2 | void fw_cfg_add_bytes(FWCfgState *s, uint16_t key, uint8_t *data, uint32_t len)
{
int arch = !!(key & FW_CFG_ARCH_LOCAL);
key &= FW_CFG_ENTRY_MASK;
assert(key < FW_CFG_MAX_ENTRY);
s->entries[arch][key].data = data;
s->entries[arch][key].len = len;
}
| {
"code": [
"void fw_cfg_add_bytes(FWCfgState *s, uint16_t key, uint8_t *data, uint32_t len)",
" assert(key < FW_CFG_MAX_ENTRY);",
" s->entries[arch][key].len = len;",
" s->entries[arch][key].len = len;"
],
"line_no": [
1,
13,
19,
19
]
} | void FUNC_0(FWCfgState *VAR_0, uint16_t VAR_1, uint8_t *VAR_2, uint32_t VAR_3)
{
int VAR_4 = !!(VAR_1 & FW_CFG_ARCH_LOCAL);
VAR_1 &= FW_CFG_ENTRY_MASK;
assert(VAR_1 < FW_CFG_MAX_ENTRY);
VAR_0->entries[VAR_4][VAR_1].VAR_2 = VAR_2;
VAR_0->entries[VAR_4][VAR_1].VAR_3 = VAR_3;
}
| [
"void FUNC_0(FWCfgState *VAR_0, uint16_t VAR_1, uint8_t *VAR_2, uint32_t VAR_3)\n{",
"int VAR_4 = !!(VAR_1 & FW_CFG_ARCH_LOCAL);",
"VAR_1 &= FW_CFG_ENTRY_MASK;",
"assert(VAR_1 < FW_CFG_MAX_ENTRY);",
"VAR_0->entries[VAR_4][VAR_1].VAR_2 = VAR_2;",
"VAR_0->entries[VAR_4][VAR_1].VAR_3 = VAR_3;",
"}"
] | [
1,
0,
0,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
]
] |
2,096 | static void set_bmc_global_enables(IPMIBmcSim *ibs,
uint8_t *cmd, unsigned int cmd_len,
uint8_t *rsp, unsigned int *rsp_len,
unsigned int max_rsp_len)
{
IPMI_CHECK_CMD_LEN(3);
set_global_enables(ibs, c... | true | qemu | 4f298a4b2957b7833bc607c951ca27c458d98d88 | static void set_bmc_global_enables(IPMIBmcSim *ibs,
uint8_t *cmd, unsigned int cmd_len,
uint8_t *rsp, unsigned int *rsp_len,
unsigned int max_rsp_len)
{
IPMI_CHECK_CMD_LEN(3);
set_global_enables(ibs, c... | {
"code": [
" IPMI_CHECK_CMD_LEN(3);",
" IPMI_CHECK_CMD_LEN(3);",
" IPMI_CHECK_CMD_LEN(3);",
" IPMI_CHECK_CMD_LEN(3);",
" IPMI_CHECK_CMD_LEN(3);",
" IPMI_CHECK_CMD_LEN(3);",
" IPMI_CHECK_CMD_LEN(3);",
" IPMI_CHECK_CMD_LEN(3);"
],
"line_no": [
11,
11,... | static void FUNC_0(IPMIBmcSim *VAR_0,
uint8_t *VAR_1, unsigned int VAR_2,
uint8_t *VAR_3, unsigned int *VAR_4,
unsigned int VAR_5)
{
IPMI_CHECK_CMD_LEN(3);
set_global_enables(VAR_0, VAR_1[2]);
}
| [
"static void FUNC_0(IPMIBmcSim *VAR_0,\nuint8_t *VAR_1, unsigned int VAR_2,\nuint8_t *VAR_3, unsigned int *VAR_4,\nunsigned int VAR_5)\n{",
"IPMI_CHECK_CMD_LEN(3);",
"set_global_enables(VAR_0, VAR_1[2]);",
"}"
] | [
0,
1,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
]
] |
2,097 | static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size,
int parse_extradata)
{
AVCodecContext *const avctx = h->avctx;
H264SliceContext *sl;
int buf_index;
unsigned context_count;
int next_avc;
int nals_needed = 0; ///< number of NALs that need d... | true | FFmpeg | 98a0053d0f90e3309dc1038b1bae3a48bbd9067c | static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size,
int parse_extradata)
{
AVCodecContext *const avctx = h->avctx;
H264SliceContext *sl;
int buf_index;
unsigned context_count;
int next_avc;
int nals_needed = 0;
int nal_index;
int idr... | {
"code": [],
"line_no": []
} | static int FUNC_0(H264Context *VAR_0, const uint8_t *VAR_1, int VAR_2,
int VAR_3)
{
AVCodecContext *const avctx = VAR_0->avctx;
H264SliceContext *sl;
int VAR_4;
unsigned VAR_5;
int VAR_6;
int VAR_7 = 0;
int VAR_8;
int VAR_9=0;
int VAR_10 = 0;
VAR_0->n... | [
"static int FUNC_0(H264Context *VAR_0, const uint8_t *VAR_1, int VAR_2,\nint VAR_3)\n{",
"AVCodecContext *const avctx = VAR_0->avctx;",
"H264SliceContext *sl;",
"int VAR_4;",
"unsigned VAR_5;",
"int VAR_6;",
"int VAR_7 = 0;",
"int VAR_8;",
"int VAR_9=0;",
"int VAR_10 = 0;",
"VAR_0->nal_unit_type... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
... |
2,098 | int spapr_h_cas_compose_response(sPAPRMachineState *spapr,
target_ulong addr, target_ulong size,
sPAPROptionVector *ov5_updates)
{
void *fdt, *fdt_skel;
sPAPRDeviceTreeUpdateHeader hdr = { .version_id = 1 };
size -= sizeof(hdr);
... | true | qemu | 10f12e6450407b18b4d5a6b50d3852dcfd7fff75 | int spapr_h_cas_compose_response(sPAPRMachineState *spapr,
target_ulong addr, target_ulong size,
sPAPROptionVector *ov5_updates)
{
void *fdt, *fdt_skel;
sPAPRDeviceTreeUpdateHeader hdr = { .version_id = 1 };
size -= sizeof(hdr);
... | {
"code": [],
"line_no": []
} | int FUNC_0(sPAPRMachineState *VAR_0,
target_ulong VAR_1, target_ulong VAR_2,
sPAPROptionVector *VAR_3)
{
void *VAR_4, *VAR_5;
sPAPRDeviceTreeUpdateHeader hdr = { .version_id = 1 };
VAR_2 -= sizeof(hdr);
VAR_5 = g_malloc0(... | [
"int FUNC_0(sPAPRMachineState *VAR_0,\ntarget_ulong VAR_1, target_ulong VAR_2,\nsPAPROptionVector *VAR_3)\n{",
"void *VAR_4, *VAR_5;",
"sPAPRDeviceTreeUpdateHeader hdr = { .version_id = 1 };",
"VAR_2 -= sizeof(hdr);",
"VAR_5 = g_malloc0(VAR_2);",
"_FDT((fdt_create(VAR_5, VAR_2)));",
"_FDT((fdt_begin_nod... | [
0,
0,
0,
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
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
41
],
[
45
],
[
47
],
[
49
],
[
55
],
[
59
],
[
61
... |
2,099 | static MatroskaLevel1Element *matroska_find_level1_elem(MatroskaDemuxContext *matroska,
uint32_t id)
{
int i;
MatroskaLevel1Element *elem;
// Some files link to all clusters; useless.
if (id == MATROSKA_ID_CLUSTER)
// There can be multiple seek... | true | FFmpeg | 7e240f95818310ed721321e62130aa1c69f9cbe6 | static MatroskaLevel1Element *matroska_find_level1_elem(MatroskaDemuxContext *matroska,
uint32_t id)
{
int i;
MatroskaLevel1Element *elem;
if (id == MATROSKA_ID_CLUSTER)
if (id != MATROSKA_ID_SEEKHEAD) {
for (i = 0; i < matroska->... | {
"code": [],
"line_no": []
} | static MatroskaLevel1Element *FUNC_0(MatroskaDemuxContext *matroska,
uint32_t id)
{
int VAR_0;
MatroskaLevel1Element *elem;
if (id == MATROSKA_ID_CLUSTER)
if (id != MATROSKA_ID_SEEKHEAD) {
for (VAR_0 = 0; VAR_0 < matroska->num_lev... | [
"static MatroskaLevel1Element *FUNC_0(MatroskaDemuxContext *matroska,\nuint32_t id)\n{",
"int VAR_0;",
"MatroskaLevel1Element *elem;",
"if (id == MATROSKA_ID_CLUSTER)\nif (id != MATROSKA_ID_SEEKHEAD) {",
"for (VAR_0 = 0; VAR_0 < matroska->num_level1_elems; VAR_0++) {",
"if (matroska->level1_elems[VAR_0].i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3
],
[
4
],
[
5
],
[
7,
9
],
[
10
],
[
11,
12
],
[
13
],
[
14
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
],
[
23
],
[
24
]
] |
2,100 | static int mp_dacl_removexattr(FsContext *ctx,
const char *path, const char *name)
{
int ret;
char *buffer;
buffer = rpath(ctx, path);
ret = lremovexattr(buffer, MAP_ACL_DEFAULT);
if (ret == -1 && errno == ENODATA) {
/*
* We don't get ENODA... | true | qemu | 72f0d0bf51362011c4d841a89fb8f5cfb16e0bf3 | static int mp_dacl_removexattr(FsContext *ctx,
const char *path, const char *name)
{
int ret;
char *buffer;
buffer = rpath(ctx, path);
ret = lremovexattr(buffer, MAP_ACL_DEFAULT);
if (ret == -1 && errno == ENODATA) {
errno = 0;
... | {
"code": [
" char *buffer;",
" buffer = rpath(ctx, path);",
" g_free(buffer);",
" char *buffer;",
" buffer = rpath(ctx, path);",
" ret = lremovexattr(buffer, MAP_ACL_DEFAULT);",
" g_free(buffer);",
" char *buffer;",
" int ret;",
" buffer = rpath(... | static int FUNC_0(FsContext *VAR_0,
const char *VAR_1, const char *VAR_2)
{
int VAR_3;
char *VAR_4;
VAR_4 = rpath(VAR_0, VAR_1);
VAR_3 = lremovexattr(VAR_4, MAP_ACL_DEFAULT);
if (VAR_3 == -1 && errno == ENODATA) {
errno = 0;
... | [
"static int FUNC_0(FsContext *VAR_0,\nconst char *VAR_1, const char *VAR_2)\n{",
"int VAR_3;",
"char *VAR_4;",
"VAR_4 = rpath(VAR_0, VAR_1);",
"VAR_3 = lremovexattr(VAR_4, MAP_ACL_DEFAULT);",
"if (VAR_3 == -1 && errno == ENODATA) {",
"errno = 0;",
"VAR_3 = 0;",
"}",
"g_free(VAR_4);",
"return VA... | [
0,
1,
1,
1,
1,
0,
0,
0,
0,
1,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
2,101 | static void IRQ_local_pipe(OpenPICState *opp, int n_CPU, int n_IRQ)
{
IRQ_dst_t *dst;
IRQ_src_t *src;
int priority;
dst = &opp->dst[n_CPU];
src = &opp->src[n_IRQ];
priority = IPVP_PRIORITY(src->ipvp);
if (priority <= dst->pctp) {
/* Too low priority */
DPRINTF("%s... | true | qemu | af7e9e74c6a62a5bcd911726a9e88d28b61490e0 | static void IRQ_local_pipe(OpenPICState *opp, int n_CPU, int n_IRQ)
{
IRQ_dst_t *dst;
IRQ_src_t *src;
int priority;
dst = &opp->dst[n_CPU];
src = &opp->src[n_IRQ];
priority = IPVP_PRIORITY(src->ipvp);
if (priority <= dst->pctp) {
DPRINTF("%s: IRQ %d has too low p... | {
"code": [
" IRQ_dst_t *dst;",
" IRQ_src_t *src;",
" IRQ_src_t *src;",
" IRQ_src_t *src;",
" IRQ_dst_t *dst;",
" IRQ_src_t *src;",
" IRQ_dst_t *dst;",
" IRQ_src_t *src;",
" IRQ_dst_t *dst;"
],
"line_no": [
5,
7,
7,
7,
5,
7,
... | static void FUNC_0(OpenPICState *VAR_0, int VAR_1, int VAR_2)
{
IRQ_dst_t *dst;
IRQ_src_t *src;
int VAR_3;
dst = &VAR_0->dst[VAR_1];
src = &VAR_0->src[VAR_2];
VAR_3 = IPVP_PRIORITY(src->ipvp);
if (VAR_3 <= dst->pctp) {
DPRINTF("%s: IRQ %d has too low VAR_3 on CPU... | [
"static void FUNC_0(OpenPICState *VAR_0, int VAR_1, int VAR_2)\n{",
"IRQ_dst_t *dst;",
"IRQ_src_t *src;",
"int VAR_3;",
"dst = &VAR_0->dst[VAR_1];",
"src = &VAR_0->src[VAR_2];",
"VAR_3 = IPVP_PRIORITY(src->ipvp);",
"if (VAR_3 <= dst->pctp) {",
"DPRINTF(\"%s: IRQ %d has too low VAR_3 on CPU %d\\n\",\... | [
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51,... |
2,102 | static void process_incoming_migration_bh(void *opaque)
{
Error *local_err = NULL;
MigrationIncomingState *mis = opaque;
/* Make sure all file formats flush their mutable metadata */
bdrv_invalidate_cache_all(&local_err);
migrate_set_state(&mis->state, MIGRATION_STATUS_ACTIVE,
... | true | qemu | d35ff5e6b3aa3a706b0aa3bcf11400fac945b67a | static void process_incoming_migration_bh(void *opaque)
{
Error *local_err = NULL;
MigrationIncomingState *mis = opaque;
bdrv_invalidate_cache_all(&local_err);
migrate_set_state(&mis->state, MIGRATION_STATUS_ACTIVE,
MIGRATION_STATUS_FAILED);
error_report_err(lo... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
Error *local_err = NULL;
MigrationIncomingState *mis = VAR_0;
bdrv_invalidate_cache_all(&local_err);
migrate_set_state(&mis->state, MIGRATION_STATUS_ACTIVE,
MIGRATION_STATUS_FAILED);
error_report_err(local_err);
migrate... | [
"static void FUNC_0(void *VAR_0)\n{",
"Error *local_err = NULL;",
"MigrationIncomingState *mis = VAR_0;",
"bdrv_invalidate_cache_all(&local_err);",
"migrate_set_state(&mis->state, MIGRATION_STATUS_ACTIVE,\nMIGRATION_STATUS_FAILED);",
"error_report_err(local_err);",
"migrate_decompress_threads_join();",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
6
],
[
7,
8
],
[
9
],
[
10
],
[
11
],
[
16
],
[
20,
21
],
[
22
],
[
23
],
[
24
],
[
25
],
[
26
],
[
27
],
[
28
],
[
34,
35
],
[
... |
2,103 | static int decode_phys_chunk(AVCodecContext *avctx, PNGDecContext *s)
{
if (s->state & PNG_IDAT) {
av_log(avctx, AV_LOG_ERROR, "pHYs after IDAT\n");
return AVERROR_INVALIDDATA;
}
avctx->sample_aspect_ratio.num = bytestream2_get_be32(&s->gb);
avctx->sample_aspect_ratio.den = bytest... | true | FFmpeg | 478f1c3d5e5463a284ea7efecfc62d47ba3be11a | static int decode_phys_chunk(AVCodecContext *avctx, PNGDecContext *s)
{
if (s->state & PNG_IDAT) {
av_log(avctx, AV_LOG_ERROR, "pHYs after IDAT\n");
return AVERROR_INVALIDDATA;
}
avctx->sample_aspect_ratio.num = bytestream2_get_be32(&s->gb);
avctx->sample_aspect_ratio.den = bytest... | {
"code": [
" if (s->state & PNG_IDAT) {",
" if (s->state & PNG_IDAT) {",
" if (s->state & PNG_IDAT) {"
],
"line_no": [
5,
5,
5
]
} | static int FUNC_0(AVCodecContext *VAR_0, PNGDecContext *VAR_1)
{
if (VAR_1->state & PNG_IDAT) {
av_log(VAR_0, AV_LOG_ERROR, "pHYs after IDAT\n");
return AVERROR_INVALIDDATA;
}
VAR_0->sample_aspect_ratio.num = bytestream2_get_be32(&VAR_1->gb);
VAR_0->sample_aspect_ratio.den = bytes... | [
"static int FUNC_0(AVCodecContext *VAR_0, PNGDecContext *VAR_1)\n{",
"if (VAR_1->state & PNG_IDAT) {",
"av_log(VAR_0, AV_LOG_ERROR, \"pHYs after IDAT\\n\");",
"return AVERROR_INVALIDDATA;",
"}",
"VAR_0->sample_aspect_ratio.num = bytestream2_get_be32(&VAR_1->gb);",
"VAR_0->sample_aspect_ratio.den = bytes... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
27
],
[
29
]
] |
2,104 | static int xio3130_downstream_initfn(PCIDevice *d)
{
PCIEPort *p = PCIE_PORT(d);
PCIESlot *s = PCIE_SLOT(d);
int rc;
pci_bridge_initfn(d, TYPE_PCIE_BUS);
pcie_port_init_reg(d);
rc = msi_init(d, XIO3130_MSI_OFFSET, XIO3130_MSI_NR_VECTOR,
XIO3130_MSI_SUPPORTED_FLAGS &... | true | qemu | 1108b2f8a939fb5778d384149e2f1b99062a72da | static int xio3130_downstream_initfn(PCIDevice *d)
{
PCIEPort *p = PCIE_PORT(d);
PCIESlot *s = PCIE_SLOT(d);
int rc;
pci_bridge_initfn(d, TYPE_PCIE_BUS);
pcie_port_init_reg(d);
rc = msi_init(d, XIO3130_MSI_OFFSET, XIO3130_MSI_NR_VECTOR,
XIO3130_MSI_SUPPORTED_FLAGS &... | {
"code": [
" XIO3130_MSI_SUPPORTED_FLAGS & PCI_MSI_FLAGS_MASKBIT);",
" XIO3130_MSI_SUPPORTED_FLAGS & PCI_MSI_FLAGS_MASKBIT);"
],
"line_no": [
23,
23
]
} | static int FUNC_0(PCIDevice *VAR_0)
{
PCIEPort *p = PCIE_PORT(VAR_0);
PCIESlot *s = PCIE_SLOT(VAR_0);
int VAR_1;
pci_bridge_initfn(VAR_0, TYPE_PCIE_BUS);
pcie_port_init_reg(VAR_0);
VAR_1 = msi_init(VAR_0, XIO3130_MSI_OFFSET, XIO3130_MSI_NR_VECTOR,
XIO3130_MSI_SUPPOR... | [
"static int FUNC_0(PCIDevice *VAR_0)\n{",
"PCIEPort *p = PCIE_PORT(VAR_0);",
"PCIESlot *s = PCIE_SLOT(VAR_0);",
"int VAR_1;",
"pci_bridge_initfn(VAR_0, TYPE_PCIE_BUS);",
"pcie_port_init_reg(VAR_0);",
"VAR_1 = msi_init(VAR_0, XIO3130_MSI_OFFSET, XIO3130_MSI_NR_VECTOR,\nXIO3130_MSI_SUPPORTED_FLAGS & PCI_M... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19,
21,
23
],
[
25
],
[
27
],
[
29
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
45,
47
],
[
49
],
[
51
],
[
53
... |
2,105 | static av_cold int hevc_decode_free(AVCodecContext *avctx)
{
HEVCContext *s = avctx->priv_data;
HEVCLocalContext *lc = s->HEVClc;
int i;
pic_arrays_free(s);
av_freep(&s->md5_ctx);
for(i=0; i < s->nals_allocated; i++) {
av_freep(&s->skipped_bytes_pos_nal[i]);
}
... | false | FFmpeg | 3fa9692ae2324b8fcc1a8aa47b9a75826740b32e | static av_cold int hevc_decode_free(AVCodecContext *avctx)
{
HEVCContext *s = avctx->priv_data;
HEVCLocalContext *lc = s->HEVClc;
int i;
pic_arrays_free(s);
av_freep(&s->md5_ctx);
for(i=0; i < s->nals_allocated; i++) {
av_freep(&s->skipped_bytes_pos_nal[i]);
}
... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
HEVCContext *s = avctx->priv_data;
HEVCLocalContext *lc = s->HEVClc;
int VAR_0;
pic_arrays_free(s);
av_freep(&s->md5_ctx);
for(VAR_0=0; VAR_0 < s->nals_allocated; VAR_0++) {
av_freep(&s->skipped_bytes_pos_nal[VAR_0]);... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"HEVCContext *s = avctx->priv_data;",
"HEVCLocalContext *lc = s->HEVClc;",
"int VAR_0;",
"pic_arrays_free(s);",
"av_freep(&s->md5_ctx);",
"for(VAR_0=0; VAR_0 < s->nals_allocated; VAR_0++) {",
"av_freep(&s->skipped_bytes_pos_nal[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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
... |
2,106 | static av_cold int dct_init(MpegEncContext *s)
{
ff_blockdsp_init(&s->bdsp, s->avctx);
ff_hpeldsp_init(&s->hdsp, s->avctx->flags);
ff_me_cmp_init(&s->mecc, s->avctx);
ff_mpegvideodsp_init(&s->mdsp);
ff_videodsp_init(&s->vdsp, s->avctx->bits_per_raw_sample);
s->dct_unquantize_h263_intra ... | false | FFmpeg | cf1e0786ed64e69614760bfb4ecd7adbde8e6094 | static av_cold int dct_init(MpegEncContext *s)
{
ff_blockdsp_init(&s->bdsp, s->avctx);
ff_hpeldsp_init(&s->hdsp, s->avctx->flags);
ff_me_cmp_init(&s->mecc, s->avctx);
ff_mpegvideodsp_init(&s->mdsp);
ff_videodsp_init(&s->vdsp, s->avctx->bits_per_raw_sample);
s->dct_unquantize_h263_intra ... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(MpegEncContext *s)
{
ff_blockdsp_init(&s->bdsp, s->avctx);
ff_hpeldsp_init(&s->hdsp, s->avctx->flags);
ff_me_cmp_init(&s->mecc, s->avctx);
ff_mpegvideodsp_init(&s->mdsp);
ff_videodsp_init(&s->vdsp, s->avctx->bits_per_raw_sample);
s->dct_unquantize_h263_intra = ... | [
"static av_cold int FUNC_0(MpegEncContext *s)\n{",
"ff_blockdsp_init(&s->bdsp, s->avctx);",
"ff_hpeldsp_init(&s->hdsp, s->avctx->flags);",
"ff_me_cmp_init(&s->mecc, s->avctx);",
"ff_mpegvideodsp_init(&s->mdsp);",
"ff_videodsp_init(&s->vdsp, s->avctx->bits_per_raw_sample);",
"s->dct_unquantize_h263_intra... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
35,
37
],
[
41,
43
],
[
45,
47
],
[
49,
51
],
[... |
2,107 | static void filter_mb_edgeh( H264Context *h, uint8_t *pix, int stride, int bS[4], int qp ) {
int i, d;
const int index_a = clip( qp + h->slice_alpha_c0_offset, 0, 51 );
const int alpha = alpha_table[index_a];
const int beta = beta_table[clip( qp + h->slice_beta_offset, 0, 51 )];
const int pix_... | false | FFmpeg | 3ebc7e04dea6072400d91c1c90eb3911754cee06 | static void filter_mb_edgeh( H264Context *h, uint8_t *pix, int stride, int bS[4], int qp ) {
int i, d;
const int index_a = clip( qp + h->slice_alpha_c0_offset, 0, 51 );
const int alpha = alpha_table[index_a];
const int beta = beta_table[clip( qp + h->slice_beta_offset, 0, 51 )];
const int pix_... | {
"code": [],
"line_no": []
} | static void FUNC_0( H264Context *VAR_0, uint8_t *VAR_1, int VAR_2, int VAR_3[4], int VAR_4 ) {
int VAR_5, VAR_6;
const int VAR_7 = clip( VAR_4 + VAR_0->slice_alpha_c0_offset, 0, 51 );
const int VAR_8 = alpha_table[VAR_7];
const int VAR_9 = beta_table[clip( VAR_4 + VAR_0->slice_beta_offset, 0, 51 )]... | [
"static void FUNC_0( H264Context *VAR_0, uint8_t *VAR_1, int VAR_2, int VAR_3[4], int VAR_4 ) {",
"int VAR_5, VAR_6;",
"const int VAR_7 = clip( VAR_4 + VAR_0->slice_alpha_c0_offset, 0, 51 );",
"const int VAR_8 = alpha_table[VAR_7];",
"const int VAR_9 = beta_table[clip( VAR_4 + VAR_0->slice_beta_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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45,
47,
49
],
[... |
2,108 | static void aflat(WaveformContext *s, AVFrame *in, AVFrame *out,
int component, int intensity, int offset, int column)
{
const int plane = s->desc->comp[component].plane;
const int mirror = s->mirror;
const int c0_linesize = in->linesize[ plane + 0 ];
const int c1_linesize = in->... | false | FFmpeg | 5b349c8d7cc5dd26b3fbbce6e3883ce02861eeb7 | static void aflat(WaveformContext *s, AVFrame *in, AVFrame *out,
int component, int intensity, int offset, int column)
{
const int plane = s->desc->comp[component].plane;
const int mirror = s->mirror;
const int c0_linesize = in->linesize[ plane + 0 ];
const int c1_linesize = in->... | {
"code": [],
"line_no": []
} | static void FUNC_0(WaveformContext *VAR_0, AVFrame *VAR_1, AVFrame *VAR_2,
int VAR_3, int VAR_4, int VAR_5, int VAR_6)
{
const int VAR_7 = VAR_0->desc->comp[VAR_3].VAR_7;
const int VAR_8 = VAR_0->VAR_8;
const int VAR_9 = VAR_1->linesize[ VAR_7 + 0 ];
const int VAR_10 = VAR_1->lin... | [
"static void FUNC_0(WaveformContext *VAR_0, AVFrame *VAR_1, AVFrame *VAR_2,\nint VAR_3, int VAR_4, int VAR_5, int VAR_6)\n{",
"const int VAR_7 = VAR_0->desc->comp[VAR_3].VAR_7;",
"const int VAR_8 = VAR_0->VAR_8;",
"const int VAR_9 = VAR_1->linesize[ VAR_7 + 0 ];",
"const int VAR_10 = VAR_1->linesize[(VAR_7 ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[... |
2,109 | int ff_dirac_golomb_read_32bit(DiracGolombLUT *lut_ctx, const uint8_t *buf,
int bytes, uint8_t *_dst, int coeffs)
{
int i, b, c_idx = 0;
int32_t *dst = (int32_t *)_dst;
DiracGolombLUT *future[4], *l = &lut_ctx[2*LUT_SIZE + buf[0]];
INIT_RESIDUE(res);
for (b = ... | false | FFmpeg | f41e37b84f3d57c29d4a2a21f9337159135b981d | int ff_dirac_golomb_read_32bit(DiracGolombLUT *lut_ctx, const uint8_t *buf,
int bytes, uint8_t *_dst, int coeffs)
{
int i, b, c_idx = 0;
int32_t *dst = (int32_t *)_dst;
DiracGolombLUT *future[4], *l = &lut_ctx[2*LUT_SIZE + buf[0]];
INIT_RESIDUE(res);
for (b = ... | {
"code": [],
"line_no": []
} | int FUNC_0(DiracGolombLUT *VAR_0, const uint8_t *VAR_1,
int VAR_2, uint8_t *VAR_3, int VAR_4)
{
int VAR_5, VAR_6, VAR_7 = 0;
int32_t *dst = (int32_t *)VAR_3;
DiracGolombLUT *future[4], *l = &VAR_0[2*LUT_SIZE + VAR_1[0]];
INIT_RESIDUE(res);
for (VAR_6 = 1; VAR_... | [
"int FUNC_0(DiracGolombLUT *VAR_0, const uint8_t *VAR_1,\nint VAR_2, uint8_t *VAR_3, int VAR_4)\n{",
"int VAR_5, VAR_6, VAR_7 = 0;",
"int32_t *dst = (int32_t *)VAR_3;",
"DiracGolombLUT *future[4], *l = &VAR_0[2*LUT_SIZE + VAR_1[0]];",
"INIT_RESIDUE(res);",
"for (VAR_6 = 1; VAR_6 <= VAR_2; 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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
2,111 | static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length){
int x, y;
const int width= f->avctx->width;
const int height= f->avctx->height;
uint16_t *dst= (uint16_t*)f->current_picture.data[0];
const int stride= f->current_picture.linesize[0]>>1;
const unsigned int bitstrea... | true | FFmpeg | 9c661e952fbcbf044709f9a7031c68cc4860336b | static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length){
int x, y;
const int width= f->avctx->width;
const int height= f->avctx->height;
uint16_t *dst= (uint16_t*)f->current_picture.data[0];
const int stride= f->current_picture.linesize[0]>>1;
const unsigned int bitstrea... | {
"code": [
" const int token_count av_unused = AV_RL32(buf + bitstream_size + 8);",
" unsigned int prestream_size= 4*AV_RL32(buf + bitstream_size + 4);",
" const uint8_t *prestream= buf + bitstream_size + 12;",
" if(prestream_size + bitstream_size + 12 != length",
" || bitstream... | static int FUNC_0(FourXContext *VAR_0, const uint8_t *VAR_1, int VAR_2){
int VAR_3, VAR_4;
const int VAR_5= VAR_0->avctx->VAR_5;
const int VAR_6= VAR_0->avctx->VAR_6;
uint16_t *dst= (uint16_t*)VAR_0->current_picture.data[0];
const int VAR_7= VAR_0->current_picture.linesize[0]>>1;
const uns... | [
"static int FUNC_0(FourXContext *VAR_0, const uint8_t *VAR_1, int VAR_2){",
"int VAR_3, VAR_4;",
"const int VAR_5= VAR_0->avctx->VAR_5;",
"const int VAR_6= VAR_0->avctx->VAR_6;",
"uint16_t *dst= (uint16_t*)VAR_0->current_picture.data[0];",
"const int VAR_7= VAR_0->current_picture.linesize[0]>>1;",
"cons... | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
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
],
[
17
],
[
19
],
[
23,
25,
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
41
],
[
45
],
[
49
],
[
51,
53
... |
2,112 | static int pci_pcnet_init(PCIDevice *pci_dev)
{
PCIPCNetState *d = PCI_PCNET(pci_dev);
PCNetState *s = &d->state;
uint8_t *pci_conf;
#if 0
printf("sizeof(RMD)=%d, sizeof(TMD)=%d\n",
sizeof(struct pcnet_RMD), sizeof(struct pcnet_TMD));
#endif
pci_conf = pci_dev->config;
pc... | true | qemu | 4c3b22459d3589cf84d1ccadc6b09e586497820d | static int pci_pcnet_init(PCIDevice *pci_dev)
{
PCIPCNetState *d = PCI_PCNET(pci_dev);
PCNetState *s = &d->state;
uint8_t *pci_conf;
#if 0
printf("sizeof(RMD)=%d, sizeof(TMD)=%d\n",
sizeof(struct pcnet_RMD), sizeof(struct pcnet_TMD));
#endif
pci_conf = pci_dev->config;
pc... | {
"code": [
" return pcnet_common_init(DEVICE(pci_dev), s, &net_pci_pcnet_info);"
],
"line_no": [
77
]
} | static int FUNC_0(PCIDevice *VAR_0)
{
PCIPCNetState *d = PCI_PCNET(VAR_0);
PCNetState *s = &d->state;
uint8_t *pci_conf;
#if 0
printf("sizeof(RMD)=%d, sizeof(TMD)=%d\n",
sizeof(struct pcnet_RMD), sizeof(struct pcnet_TMD));
#endif
pci_conf = VAR_0->config;
pci_set_word(pci... | [
"static int FUNC_0(PCIDevice *VAR_0)\n{",
"PCIPCNetState *d = PCI_PCNET(VAR_0);",
"PCNetState *s = &d->state;",
"uint8_t *pci_conf;",
"#if 0\nprintf(\"sizeof(RMD)=%d, sizeof(TMD)=%d\\n\",\nsizeof(struct pcnet_RMD), sizeof(struct pcnet_TMD));",
"#endif\npci_conf = VAR_0->config;",
"pci_set_word(pci_conf ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15,
17
],
[
19,
23
],
[
27,
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
49,
51
],
[
55,
57
],
[
59
],
[
63
],
[
67
... |
2,113 | void OPPROTO op_fdiv_STN_ST0(void)
{
ST(PARAM1) /= ST0;
}
| true | qemu | 2ee73ac3a855fb0cfba3db91fdd1ecebdbc6f971 | void OPPROTO op_fdiv_STN_ST0(void)
{
ST(PARAM1) /= ST0;
}
| {
"code": [
" ST(PARAM1) /= ST0;"
],
"line_no": [
5
]
} | void VAR_0 op_fdiv_STN_ST0(void)
{
ST(PARAM1) /= ST0;
}
| [
"void VAR_0 op_fdiv_STN_ST0(void)\n{",
"ST(PARAM1) /= ST0;",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
2,114 | static int open_file(AVFormatContext *avf, unsigned fileno)
{
ConcatContext *cat = avf->priv_data;
ConcatFile *file = &cat->files[fileno];
int ret;
if (cat->avf)
avformat_close_input(&cat->avf);
cat->avf = avformat_alloc_context();
if (!cat->avf)
return AVERROR(ENOME... | true | FFmpeg | 0dcac9c3f0f8f32009098edb704fac4b08bac951 | static int open_file(AVFormatContext *avf, unsigned fileno)
{
ConcatContext *cat = avf->priv_data;
ConcatFile *file = &cat->files[fileno];
int ret;
if (cat->avf)
avformat_close_input(&cat->avf);
cat->avf = avformat_alloc_context();
if (!cat->avf)
return AVERROR(ENOME... | {
"code": [
" cat->avf->flags |= avf->flags;"
],
"line_no": [
27
]
} | static int FUNC_0(AVFormatContext *VAR_0, unsigned VAR_1)
{
ConcatContext *cat = VAR_0->priv_data;
ConcatFile *file = &cat->files[VAR_1];
int VAR_2;
if (cat->VAR_0)
avformat_close_input(&cat->VAR_0);
cat->VAR_0 = avformat_alloc_context();
if (!cat->VAR_0)
return AVER... | [
"static int FUNC_0(AVFormatContext *VAR_0, unsigned VAR_1)\n{",
"ConcatContext *cat = VAR_0->priv_data;",
"ConcatFile *file = &cat->files[VAR_1];",
"int VAR_2;",
"if (cat->VAR_0)\navformat_close_input(&cat->VAR_0);",
"cat->VAR_0 = avformat_alloc_context();",
"if (!cat->VAR_0)\nreturn AVERROR(ENOMEM);",
... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
21,
23
],
[
27
],
[
29
],
[
33,
35
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53,
55,
57,... |
2,116 | BlockDirtyInfoList *bdrv_query_dirty_bitmaps(BlockDriverState *bs)
{
BdrvDirtyBitmap *bm;
BlockDirtyInfoList *list = NULL;
BlockDirtyInfoList **plist = &list;
QLIST_FOREACH(bm, &bs->dirty_bitmaps, list) {
BlockDirtyInfo *info = g_malloc0(sizeof(BlockDirtyInfo));
BlockDirtyInfoLi... | true | qemu | 5839e53bbc0fec56021d758aab7610df421ed8c8 | BlockDirtyInfoList *bdrv_query_dirty_bitmaps(BlockDriverState *bs)
{
BdrvDirtyBitmap *bm;
BlockDirtyInfoList *list = NULL;
BlockDirtyInfoList **plist = &list;
QLIST_FOREACH(bm, &bs->dirty_bitmaps, list) {
BlockDirtyInfo *info = g_malloc0(sizeof(BlockDirtyInfo));
BlockDirtyInfoLi... | {
"code": [
" BlockDirtyInfo *info = g_malloc0(sizeof(BlockDirtyInfo));",
" BlockDirtyInfoList *entry = g_malloc0(sizeof(BlockDirtyInfoList));"
],
"line_no": [
15,
17
]
} | BlockDirtyInfoList *FUNC_0(BlockDriverState *bs)
{
BdrvDirtyBitmap *bm;
BlockDirtyInfoList *list = NULL;
BlockDirtyInfoList **plist = &list;
QLIST_FOREACH(bm, &bs->dirty_bitmaps, list) {
BlockDirtyInfo *info = g_malloc0(sizeof(BlockDirtyInfo));
BlockDirtyInfoList *entry = g_mall... | [
"BlockDirtyInfoList *FUNC_0(BlockDriverState *bs)\n{",
"BdrvDirtyBitmap *bm;",
"BlockDirtyInfoList *list = NULL;",
"BlockDirtyInfoList **plist = &list;",
"QLIST_FOREACH(bm, &bs->dirty_bitmaps, list) {",
"BlockDirtyInfo *info = g_malloc0(sizeof(BlockDirtyInfo));",
"BlockDirtyInfoList *entry = g_malloc0(s... | [
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
]
] |
2,117 | void register_displaychangelistener(DisplayChangeListener *dcl)
{
QemuConsole *con;
trace_displaychangelistener_register(dcl, dcl->ops->dpy_name);
dcl->ds = get_alloc_displaystate();
QLIST_INSERT_HEAD(&dcl->ds->listeners, dcl, next);
gui_setup_refresh(dcl->ds);
if (dcl->con) {
... | true | qemu | d3002b0463727bf8110833b9d1a6efaa28990c28 | void register_displaychangelistener(DisplayChangeListener *dcl)
{
QemuConsole *con;
trace_displaychangelistener_register(dcl, dcl->ops->dpy_name);
dcl->ds = get_alloc_displaystate();
QLIST_INSERT_HEAD(&dcl->ds->listeners, dcl, next);
gui_setup_refresh(dcl->ds);
if (dcl->con) {
... | {
"code": [
" if (dcl->ops->dpy_gfx_switch && con) {",
" dcl->ops->dpy_gfx_switch(dcl, con->surface);"
],
"line_no": [
29,
31
]
} | void FUNC_0(DisplayChangeListener *VAR_0)
{
QemuConsole *con;
trace_displaychangelistener_register(VAR_0, VAR_0->ops->dpy_name);
VAR_0->ds = get_alloc_displaystate();
QLIST_INSERT_HEAD(&VAR_0->ds->listeners, VAR_0, next);
gui_setup_refresh(VAR_0->ds);
if (VAR_0->con) {
VAR_0->c... | [
"void FUNC_0(DisplayChangeListener *VAR_0)\n{",
"QemuConsole *con;",
"trace_displaychangelistener_register(VAR_0, VAR_0->ops->dpy_name);",
"VAR_0->ds = get_alloc_displaystate();",
"QLIST_INSERT_HEAD(&VAR_0->ds->listeners, VAR_0, next);",
"gui_setup_refresh(VAR_0->ds);",
"if (VAR_0->con) {",
"VAR_0->co... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
2,118 | static void cpu_ioreq_move(ioreq_t *req)
{
int i, sign;
sign = req->df ? -1 : 1;
if (!req->data_is_ptr) {
if (req->dir == IOREQ_READ) {
for (i = 0; i < req->count; i++) {
cpu_physical_memory_read(
req->addr + (sign * i * (int64_t)req->s... | true | qemu | a38648290ee277c7cb8a53eabdcdb08bb7a9f23f | static void cpu_ioreq_move(ioreq_t *req)
{
int i, sign;
sign = req->df ? -1 : 1;
if (!req->data_is_ptr) {
if (req->dir == IOREQ_READ) {
for (i = 0; i < req->count; i++) {
cpu_physical_memory_read(
req->addr + (sign * i * (int64_t)req->s... | {
"code": [
" int i, sign;",
" sign = req->df ? -1 : 1;",
" cpu_physical_memory_write(",
" req->data + (sign * i * (int64_t)req->size),",
" cpu_physical_memory_read(",
" req->data + (sign * i * (int64_t)req->size... | static void FUNC_0(ioreq_t *VAR_0)
{
int VAR_1, VAR_2;
VAR_2 = VAR_0->df ? -1 : 1;
if (!VAR_0->data_is_ptr) {
if (VAR_0->dir == IOREQ_READ) {
for (VAR_1 = 0; VAR_1 < VAR_0->count; VAR_1++) {
cpu_physical_memory_read(
VAR_0->addr + (VAR_... | [
"static void FUNC_0(ioreq_t *VAR_0)\n{",
"int VAR_1, VAR_2;",
"VAR_2 = VAR_0->df ? -1 : 1;",
"if (!VAR_0->data_is_ptr) {",
"if (VAR_0->dir == IOREQ_READ) {",
"for (VAR_1 = 0; VAR_1 < VAR_0->count; VAR_1++) {",
"cpu_physical_memory_read(\nVAR_0->addr + (VAR_2 * VAR_1 * (int64_t)VAR_0->size),\n(uint8_t *)... | [
0,
1,
1,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19,
21,
23
],
[
25
],
[
27
],
[
29
],
[
31,
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51... |
2,119 | static void imc_get_coeffs(AVCodecContext *avctx,
IMCContext *q, IMCChannel *chctx)
{
int i, j, cw_len, cw;
for (i = 0; i < BANDS; i++) {
if (!chctx->sumLenArr[i])
continue;
if (chctx->bandFlagsBuf[i] || chctx->bandWidthT[i]) {
for (j ... | false | FFmpeg | cbf09545f250a4bd12c50c3a96fe481098ab2d49 | static void imc_get_coeffs(AVCodecContext *avctx,
IMCContext *q, IMCChannel *chctx)
{
int i, j, cw_len, cw;
for (i = 0; i < BANDS; i++) {
if (!chctx->sumLenArr[i])
continue;
if (chctx->bandFlagsBuf[i] || chctx->bandWidthT[i]) {
for (j ... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVCodecContext *VAR_0,
IMCContext *VAR_1, IMCChannel *VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6;
for (VAR_3 = 0; VAR_3 < BANDS; VAR_3++) {
if (!VAR_2->sumLenArr[VAR_3])
continue;
if (VAR_2->bandFlagsBuf[VAR_3] || VAR_2->bandWidthT[... | [
"static void FUNC_0(AVCodecContext *VAR_0,\nIMCContext *VAR_1, IMCChannel *VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6;",
"for (VAR_3 = 0; VAR_3 < BANDS; VAR_3++) {",
"if (!VAR_2->sumLenArr[VAR_3])\ncontinue;",
"if (VAR_2->bandFlagsBuf[VAR_3] || VAR_2->bandWidthT[VAR_3]) {",
"for (VAR_4 = band_tab[VAR_3];... | [
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
],
[
39,
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
]
] |
2,121 | void ff_generate_sliding_window_mmcos(H264Context *h, int first_slice)
{
MpegEncContext * const s = &h->s;
MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = first_slice ? h->mmco : mmco_temp;
int mmco_index = 0, i;
assert(h->long_ref_count + h->short_ref_count <= h->sps.ref_frame_count);
if (h->shor... | false | FFmpeg | ea382767ad2191acbe97e90624059723e15f0e4b | void ff_generate_sliding_window_mmcos(H264Context *h, int first_slice)
{
MpegEncContext * const s = &h->s;
MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = first_slice ? h->mmco : mmco_temp;
int mmco_index = 0, i;
assert(h->long_ref_count + h->short_ref_count <= h->sps.ref_frame_count);
if (h->shor... | {
"code": [],
"line_no": []
} | void FUNC_0(H264Context *VAR_0, int VAR_1)
{
MpegEncContext * const s = &VAR_0->s;
MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = VAR_1 ? VAR_0->mmco : mmco_temp;
int VAR_2 = 0, VAR_3;
assert(VAR_0->long_ref_count + VAR_0->short_ref_count <= VAR_0->sps.ref_frame_count);
if (VAR_0->short_ref_count... | [
"void FUNC_0(H264Context *VAR_0, int VAR_1)\n{",
"MpegEncContext * const s = &VAR_0->s;",
"MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = VAR_1 ? VAR_0->mmco : mmco_temp;",
"int VAR_2 = 0, VAR_3;",
"assert(VAR_0->long_ref_count + VAR_0->short_ref_count <= VAR_0->sps.ref_frame_count);",
"if (VAR_0->short_ref_coun... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17,
19,
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[... |
2,122 | void virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb)
{
uint32_t type;
struct iovec *in_iov = req->elem->in_sg;
struct iovec *iov = req->elem->out_sg;
unsigned in_num = req->elem->in_num;
unsigned out_num = req->elem->out_num;
if (req->elem->out_num < 1 || req->elem->... | true | qemu | f897bf751fbd95e4015b95d202c706548586813a | void virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb)
{
uint32_t type;
struct iovec *in_iov = req->elem->in_sg;
struct iovec *iov = req->elem->out_sg;
unsigned in_num = req->elem->in_num;
unsigned out_num = req->elem->out_num;
if (req->elem->out_num < 1 || req->elem->... | {
"code": [
" struct iovec *in_iov = req->elem->in_sg;",
" struct iovec *iov = req->elem->out_sg;",
" unsigned in_num = req->elem->in_num;",
" unsigned out_num = req->elem->out_num;",
" if (req->elem->out_num < 1 || req->elem->in_num < 1) {",
" strncpy(req->elem->in_sg[0]... | void FUNC_0(VirtIOBlockReq *VAR_0, MultiReqBuffer *VAR_1)
{
uint32_t type;
struct iovec *VAR_2 = VAR_0->elem->in_sg;
struct iovec *VAR_3 = VAR_0->elem->out_sg;
unsigned VAR_4 = VAR_0->elem->VAR_4;
unsigned VAR_5 = VAR_0->elem->VAR_5;
if (VAR_0->elem->VAR_5 < 1 || VAR_0->elem->VAR_4 < 1)... | [
"void FUNC_0(VirtIOBlockReq *VAR_0, MultiReqBuffer *VAR_1)\n{",
"uint32_t type;",
"struct iovec *VAR_2 = VAR_0->elem->in_sg;",
"struct iovec *VAR_3 = VAR_0->elem->out_sg;",
"unsigned VAR_4 = VAR_0->elem->VAR_4;",
"unsigned VAR_5 = VAR_0->elem->VAR_5;",
"if (VAR_0->elem->VAR_5 < 1 || VAR_0->elem->VAR_4 <... | [
0,
0,
1,
1,
1,
1,
1,
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,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
43,
45
],
[
47
],
[
49
],
[
51
... |
2,123 | void OPPROTO op_sdiv_T1_T0(void)
{
int64_t x0;
int32_t x1;
x0 = T0 | ((int64_t) (env->y) << 32);
x1 = T1;
x0 = x0 / x1;
if ((int32_t) x0 != x0) {
T0 = x0 < 0? 0x80000000: 0x7fffffff;
T1 = 1;
} else {
T0 = x0;
T1 = 0;
FORCE_RET(); | true | qemu | 9bb234b3b170299c39c9e88cfe7da5434a92d99d | void OPPROTO op_sdiv_T1_T0(void)
{
int64_t x0;
int32_t x1;
x0 = T0 | ((int64_t) (env->y) << 32);
x1 = T1;
x0 = x0 / x1;
if ((int32_t) x0 != x0) {
T0 = x0 < 0? 0x80000000: 0x7fffffff;
T1 = 1;
} else {
T0 = x0;
T1 = 0;
FORCE_RET(); | {
"code": [],
"line_no": []
} | void VAR_0 op_sdiv_T1_T0(void)
{
int64_t x0;
int32_t x1;
x0 = T0 | ((int64_t) (env->y) << 32);
x1 = T1;
x0 = x0 / x1;
if ((int32_t) x0 != x0) {
T0 = x0 < 0? 0x80000000: 0x7fffffff;
T1 = 1;
} else {
T0 = x0;
T1 = 0;
FORCE_RET(); | [
"void VAR_0 op_sdiv_T1_T0(void)\n{",
"int64_t x0;",
"int32_t x1;",
"x0 = T0 | ((int64_t) (env->y) << 32);",
"x1 = T1;",
"x0 = x0 / x1;",
"if ((int32_t) x0 != x0) {",
"T0 = x0 < 0? 0x80000000: 0x7fffffff;",
"T1 = 1;",
"} else {",
"T0 = x0;",
"T1 = 0;",
"FORCE_RET();"
] | [
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
]
] |
2,125 | static void spapr_machine_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(oc);
FWPathProviderClass *fwc = FW_PATH_PROVIDER_CLASS(oc);
NMIClass *nc = NMI_CLASS(oc);
HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc);
... | true | qemu | c8721d35994fd3731e592f81ba2f9c08e7dc8c31 | static void spapr_machine_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(oc);
FWPathProviderClass *fwc = FW_PATH_PROVIDER_CLASS(oc);
NMIClass *nc = NMI_CLASS(oc);
HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc);
... | {
"code": [
" mc->query_hotpluggable_cpus = spapr_query_hotpluggable_cpus;"
],
"line_no": [
61
]
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
MachineClass *mc = MACHINE_CLASS(VAR_0);
sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(VAR_0);
FWPathProviderClass *fwc = FW_PATH_PROVIDER_CLASS(VAR_0);
NMIClass *nc = NMI_CLASS(VAR_0);
HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(VAR_0);... | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"MachineClass *mc = MACHINE_CLASS(VAR_0);",
"sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(VAR_0);",
"FWPathProviderClass *fwc = FW_PATH_PROVIDER_CLASS(VAR_0);",
"NMIClass *nc = NMI_CLASS(VAR_0);",
"HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(VA... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
... |
2,126 | static int ram_decompress_open(RamDecompressState *s, QEMUFile *f)
{
int ret;
memset(s, 0, sizeof(*s));
s->f = f;
ret = inflateInit(&s->zstream);
if (ret != Z_OK)
return -1;
return 0;
}
| true | qemu | 94fb0909645de18481cc726ee0ec9b5afa861394 | static int ram_decompress_open(RamDecompressState *s, QEMUFile *f)
{
int ret;
memset(s, 0, sizeof(*s));
s->f = f;
ret = inflateInit(&s->zstream);
if (ret != Z_OK)
return -1;
return 0;
}
| {
"code": [
"static int ram_decompress_open(RamDecompressState *s, QEMUFile *f)",
" int ret;",
" memset(s, 0, sizeof(*s));",
" s->f = f;",
" ret = inflateInit(&s->zstream);",
" if (ret != Z_OK)",
" return -1;",
" return 0;",
" return 0;",
" return... | static int FUNC_0(RamDecompressState *VAR_0, QEMUFile *VAR_1)
{
int VAR_2;
memset(VAR_0, 0, sizeof(*VAR_0));
VAR_0->VAR_1 = VAR_1;
VAR_2 = inflateInit(&VAR_0->zstream);
if (VAR_2 != Z_OK)
return -1;
return 0;
}
| [
"static int FUNC_0(RamDecompressState *VAR_0, QEMUFile *VAR_1)\n{",
"int VAR_2;",
"memset(VAR_0, 0, sizeof(*VAR_0));",
"VAR_0->VAR_1 = VAR_1;",
"VAR_2 = inflateInit(&VAR_0->zstream);",
"if (VAR_2 != Z_OK)\nreturn -1;",
"return 0;",
"}"
] | [
1,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
]
] |
2,127 | static int virtio_scsi_vring_init(VirtIOSCSI *s, VirtQueue *vq, int n)
{
BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(s)));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
int rc;
/* Set up virtqueue notify */
rc = k->set_host_notifier(qbus->parent, n, true);
if (rc != 0) {
... | true | qemu | a8f2e5c8fffbaf7fbd4f0efc8efbeebade78008f | static int virtio_scsi_vring_init(VirtIOSCSI *s, VirtQueue *vq, int n)
{
BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(s)));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
int rc;
rc = k->set_host_notifier(qbus->parent, n, true);
if (rc != 0) {
fprintf(stderr, "virtio-scsi:... | {
"code": [
"static int virtio_scsi_vring_init(VirtIOSCSI *s, VirtQueue *vq, int n)"
],
"line_no": [
1
]
} | static int FUNC_0(VirtIOSCSI *VAR_0, VirtQueue *VAR_1, int VAR_2)
{
BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(VAR_0)));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
int VAR_3;
VAR_3 = k->set_host_notifier(qbus->parent, VAR_2, true);
if (VAR_3 != 0) {
fprintf(stderr, "... | [
"static int FUNC_0(VirtIOSCSI *VAR_0, VirtQueue *VAR_1, int VAR_2)\n{",
"BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(VAR_0)));",
"VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);",
"int VAR_3;",
"VAR_3 = k->set_host_notifier(qbus->parent, VAR_2, true);",
"if (VAR_3 != 0) {",
"fprintf(stderr, \"virtio... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
]
] |
2,128 | void qemu_get_guest_memory_mapping(MemoryMappingList *list, Error **errp)
{
CPUState *cpu, *first_paging_enabled_cpu;
RAMBlock *block;
ram_addr_t offset, length;
first_paging_enabled_cpu = find_paging_enabled_cpu(first_cpu);
if (first_paging_enabled_cpu) {
for (cpu = first_paging_en... | true | qemu | 56c4bfb3f07f3107894c00281276aea4f5e8834d | void qemu_get_guest_memory_mapping(MemoryMappingList *list, Error **errp)
{
CPUState *cpu, *first_paging_enabled_cpu;
RAMBlock *block;
ram_addr_t offset, length;
first_paging_enabled_cpu = find_paging_enabled_cpu(first_cpu);
if (first_paging_enabled_cpu) {
for (cpu = first_paging_en... | {
"code": [
" RAMBlock *block;",
" RAMBlock *block;",
" QTAILQ_FOREACH(block, &ram_list.blocks, next) {",
" RAMBlock *block;",
" RAMBlock *block;",
" QTAILQ_FOREACH(block, &ram_list.blocks, next) {",
"void qemu_get_guest_memory_mapping(MemoryMappingList *list, Error **err... | void FUNC_0(MemoryMappingList *VAR_0, Error **VAR_1)
{
CPUState *cpu, *first_paging_enabled_cpu;
RAMBlock *block;
ram_addr_t offset, length;
first_paging_enabled_cpu = find_paging_enabled_cpu(first_cpu);
if (first_paging_enabled_cpu) {
for (cpu = first_paging_enabled_cpu; cpu != NUL... | [
"void FUNC_0(MemoryMappingList *VAR_0, Error **VAR_1)\n{",
"CPUState *cpu, *first_paging_enabled_cpu;",
"RAMBlock *block;",
"ram_addr_t offset, length;",
"first_paging_enabled_cpu = find_paging_enabled_cpu(first_cpu);",
"if (first_paging_enabled_cpu) {",
"for (cpu = first_paging_enabled_cpu; cpu != NULL... | [
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
47
],
[
49
],
[
51
],
[
53
... |
2,129 | static inline void RENAME(rgb24tobgr32)(const uint8_t *src, uint8_t *dst, int src_size)
{
uint8_t *dest = dst;
const uint8_t *s = src;
const uint8_t *end;
const uint8_t *mm_end;
end = s + src_size;
__asm__ volatile(PREFETCH" %0"::"m"(*s):"memory");
mm_end = end - 23;
__asm__ ... | true | FFmpeg | 90540c2d5ace46a1e9789c75fde0b1f7dbb12a9b | static inline void RENAME(rgb24tobgr32)(const uint8_t *src, uint8_t *dst, int src_size)
{
uint8_t *dest = dst;
const uint8_t *s = src;
const uint8_t *end;
const uint8_t *mm_end;
end = s + src_size;
__asm__ volatile(PREFETCH" %0"::"m"(*s):"memory");
mm_end = end - 23;
__asm__ ... | {
"code": [
" PREFETCH\" 32%1 \\n\\t\"",
" \"movd %1, %%mm0 \\n\\t\"",
" \"punpckldq 3%1, %%mm0 \\n\\t\"",
" \"movd 6%1, %%mm1 \\n\\t\"",
" \"punpckldq 9%1, %%mm1 \\n\\t\"",
" \"mo... | static inline void FUNC_0(rgb24tobgr32)(const uint8_t *src, uint8_t *dst, int src_size)
{
uint8_t *dest = dst;
const uint8_t *VAR_0 = src;
const uint8_t *VAR_1;
const uint8_t *VAR_2;
VAR_1 = VAR_0 + src_size;
__asm__ volatile(PREFETCH" %0"::"m"(*VAR_0):"memory");
VAR_2 = VAR_1 - 2... | [
"static inline void FUNC_0(rgb24tobgr32)(const uint8_t *src, uint8_t *dst, int src_size)\n{",
"uint8_t *dest = dst;",
"const uint8_t *VAR_0 = src;",
"const uint8_t *VAR_1;",
"const uint8_t *VAR_2;",
"VAR_1 = VAR_0 + src_size;",
"__asm__ volatile(PREFETCH\" %0\"::\"m\"(*VAR_0):\"memory\");",
"VAR_2 ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,... |
2,131 | int bdrv_open2(BlockDriverState *bs, const char *filename, int flags,
BlockDriver *drv)
{
int ret, open_flags;
char tmp_filename[PATH_MAX];
char backing_filename[PATH_MAX];
bs->read_only = 0;
bs->is_temporary = 0;
bs->encrypted = 0;
if (flags & BDRV_O_SNAPSHOT) {
Block... | true | qemu | 902b27d0b8d5bfa840eaf389d7cbcc28b57e3fbe | int bdrv_open2(BlockDriverState *bs, const char *filename, int flags,
BlockDriver *drv)
{
int ret, open_flags;
char tmp_filename[PATH_MAX];
char backing_filename[PATH_MAX];
bs->read_only = 0;
bs->is_temporary = 0;
bs->encrypted = 0;
if (flags & BDRV_O_SNAPSHOT) {
Block... | {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1, int VAR_2,
BlockDriver *VAR_3)
{
int VAR_4, VAR_5;
char VAR_6[PATH_MAX];
char VAR_7[PATH_MAX];
VAR_0->read_only = 0;
VAR_0->is_temporary = 0;
VAR_0->encrypted = 0;
if (VAR_2 & BDRV_O_SNAPSHOT) {
BlockDriverState *b... | [
"int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1, int VAR_2,\nBlockDriver *VAR_3)\n{",
"int VAR_4, VAR_5;",
"char VAR_6[PATH_MAX];",
"char VAR_7[PATH_MAX];",
"VAR_0->read_only = 0;",
"VAR_0->is_temporary = 0;",
"VAR_0->encrypted = 0;",
"if (VAR_2 & BDRV_O_SNAPSHOT) {",
"BlockDriverState *bs1;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
],
[
23
],
[
24
],
[
... |
2,132 | static int wma_decode_superframe(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
WMACodecContext *s = avctx->priv_data;
int nb_frames, bit_offset, i, pos, len, ret;
uint8_t... | true | FFmpeg | 48f1e5212c90b511c90fa0449655abb06a9edda2 | static int wma_decode_superframe(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
WMACodecContext *s = avctx->priv_data;
int nb_frames, bit_offset, i, pos, len, ret;
uint8_t... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
WMACodecContext *s = VAR_0->priv_data;
int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11;
uint8_t *q;
int16_t *... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"WMACodecContext *s = VAR_0->priv_data;",
"int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11;",
"uint8_t *q;",
"int16_t *samples;",
"tprintf(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,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
41
],
[
45
],
[
49
],
[
51
],
[
53
... |
2,134 | static int vc1_decode_p_mb(VC1Context *v)
{
MpegEncContext *s = &v->s;
GetBitContext *gb = &s->gb;
int i, j;
int mb_pos = s->mb_x + s->mb_y * s->mb_stride;
int cbp; /* cbp decoding stuff */
int mqdiff, mquant; /* MB quantization */
int ttmb = v->ttfrm; /* MB Transform type */
... | true | FFmpeg | a52f443714b5c2a40ed272d8445f4c39220a4b69 | static int vc1_decode_p_mb(VC1Context *v)
{
MpegEncContext *s = &v->s;
GetBitContext *gb = &s->gb;
int i, j;
int mb_pos = s->mb_x + s->mb_y * s->mb_stride;
int cbp;
int mqdiff, mquant;
int ttmb = v->ttfrm;
int mb_has_coeffs = 1;
int dmv_x, dmv_y;
int index, inde... | {
"code": [
" block_intra |= 1 << i;",
" block_intra |= 1 << i;"
],
"line_no": [
191,
191
]
} | static int FUNC_0(VC1Context *VAR_0)
{
MpegEncContext *s = &VAR_0->s;
GetBitContext *gb = &s->gb;
int VAR_1, VAR_2;
int VAR_3 = s->mb_x + s->mb_y * s->mb_stride;
int VAR_4;
int VAR_5, VAR_6;
int VAR_7 = VAR_0->ttfrm;
int VAR_8 = 1;
int VAR_9, VAR_10;
int VAR_11,... | [
"static int FUNC_0(VC1Context *VAR_0)\n{",
"MpegEncContext *s = &VAR_0->s;",
"GetBitContext *gb = &s->gb;",
"int VAR_1, VAR_2;",
"int VAR_3 = s->mb_x + s->mb_y * s->mb_stride;",
"int VAR_4;",
"int VAR_5, VAR_6;",
"int VAR_7 = VAR_0->ttfrm;",
"int VAR_8 = 1;",
"int VAR_9, VAR_10;",
"int VAR_11, V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
43,
45
],
[
47,
49
... |
2,135 | int qdev_build_hotpluggable_device_list(Object *obj, void *opaque)
{
GSList **list = opaque;
DeviceState *dev = DEVICE(obj);
if (dev->realized && object_property_get_bool(obj, "hotpluggable", NULL)) {
*list = g_slist_append(*list, dev);
}
object_child_foreach(obj, qdev_build_hotpl... | true | qemu | 4cae4d5acaea23f3def84c8dc67ef5106323e5cb | int qdev_build_hotpluggable_device_list(Object *obj, void *opaque)
{
GSList **list = opaque;
DeviceState *dev = DEVICE(obj);
if (dev->realized && object_property_get_bool(obj, "hotpluggable", NULL)) {
*list = g_slist_append(*list, dev);
}
object_child_foreach(obj, qdev_build_hotpl... | {
"code": [
"int qdev_build_hotpluggable_device_list(Object *obj, void *opaque)",
" object_child_foreach(obj, qdev_build_hotpluggable_device_list, opaque);"
],
"line_no": [
1,
19
]
} | int FUNC_0(Object *VAR_0, void *VAR_1)
{
GSList **list = VAR_1;
DeviceState *dev = DEVICE(VAR_0);
if (dev->realized && object_property_get_bool(VAR_0, "hotpluggable", NULL)) {
*list = g_slist_append(*list, dev);
}
object_child_foreach(VAR_0, FUNC_0, VAR_1);
return 0;
}
| [
"int FUNC_0(Object *VAR_0, void *VAR_1)\n{",
"GSList **list = VAR_1;",
"DeviceState *dev = DEVICE(VAR_0);",
"if (dev->realized && object_property_get_bool(VAR_0, \"hotpluggable\", NULL)) {",
"*list = g_slist_append(*list, dev);",
"}",
"object_child_foreach(VAR_0, FUNC_0, VAR_1);",
"return 0;",
"}"
] | [
1,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
]
] |
2,136 | static void test_qemu_strtoul_max(void)
{
const char *str = g_strdup_printf("%lu", ULONG_MAX);
char f = 'X';
const char *endptr = &f;
unsigned long res = 999;
int err;
err = qemu_strtoul(str, &endptr, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, ULONG_MAX)... | true | qemu | d6f723b513a0c3c4e58343b7c52a2f9850861fa0 | static void test_qemu_strtoul_max(void)
{
const char *str = g_strdup_printf("%lu", ULONG_MAX);
char f = 'X';
const char *endptr = &f;
unsigned long res = 999;
int err;
err = qemu_strtoul(str, &endptr, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, ULONG_MAX)... | {
"code": [
" const char *str = g_strdup_printf(\"%lu\", ULONG_MAX);",
" const char *str = g_strdup_printf(\"%lu\", ULONG_MAX);"
],
"line_no": [
5,
5
]
} | static void FUNC_0(void)
{
const char *VAR_0 = g_strdup_printf("%lu", ULONG_MAX);
char VAR_1 = 'X';
const char *VAR_2 = &VAR_1;
unsigned long VAR_3 = 999;
int VAR_4;
VAR_4 = qemu_strtoul(VAR_0, &VAR_2, 0, &VAR_3);
g_assert_cmpint(VAR_4, ==, 0);
g_assert_cmpint(VAR_3, ==, ULO... | [
"static void FUNC_0(void)\n{",
"const char *VAR_0 = g_strdup_printf(\"%lu\", ULONG_MAX);",
"char VAR_1 = 'X';",
"const char *VAR_2 = &VAR_1;",
"unsigned long VAR_3 = 999;",
"int VAR_4;",
"VAR_4 = qemu_strtoul(VAR_0, &VAR_2, 0, &VAR_3);",
"g_assert_cmpint(VAR_4, ==, 0);",
"g_assert_cmpint(VAR_3, ==, ... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
2,137 | static int usb_msd_initfn(USBDevice *dev)
{
MSDState *s = DO_UPCAST(MSDState, dev, dev);
if (!s->conf.dinfo || !s->conf.dinfo->bdrv) {
error_report("usb-msd: drive property not set");
s->dev.speed = USB_SPEED_FULL;
scsi_bus_new(&s->bus, &s->dev.qdev, 0, 1, usb_msd_command_complete);
... | true | qemu | fa66b909f382619da15f8c7e323145adfa94fdac | static int usb_msd_initfn(USBDevice *dev)
{
MSDState *s = DO_UPCAST(MSDState, dev, dev);
if (!s->conf.dinfo || !s->conf.dinfo->bdrv) {
error_report("usb-msd: drive property not set");
s->dev.speed = USB_SPEED_FULL;
scsi_bus_new(&s->bus, &s->dev.qdev, 0, 1, usb_msd_command_complete);
... | {
"code": [
" return 0;"
],
"line_no": [
50
]
} | static int FUNC_0(USBDevice *VAR_0)
{
MSDState *s = DO_UPCAST(MSDState, VAR_0, VAR_0);
if (!s->conf.dinfo || !s->conf.dinfo->bdrv) {
error_report("usb-msd: drive property not set");
s->VAR_0.speed = USB_SPEED_FULL;
scsi_bus_new(&s->bus, &s->VAR_0.qdev, 0, 1, usb_msd_command_complete)... | [
"static int FUNC_0(USBDevice *VAR_0)\n{",
"MSDState *s = DO_UPCAST(MSDState, VAR_0, VAR_0);",
"if (!s->conf.dinfo || !s->conf.dinfo->bdrv) {",
"error_report(\"usb-msd: drive property not set\");",
"s->VAR_0.speed = USB_SPEED_FULL;",
"scsi_bus_new(&s->bus, &s->VAR_0.qdev, 0, 1, usb_msd_command_complete);",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
26
],
[
28
],
[
32
],
[
34
],
[
36,
38
],
[
40
],
[
42
],
[
44
],
[
50
]
] |
2,138 | static int net_slirp_init(NetClientState *peer, const char *model,
const char *name, int restricted,
bool ipv4, const char *vnetwork, const char *vhost,
bool ipv6, const char *vprefix6, int vprefix6_len,
const ch... | true | qemu | 5c843af22604edecda10d4bb89d4eede9e1bd3d0 | static int net_slirp_init(NetClientState *peer, const char *model,
const char *name, int restricted,
bool ipv4, const char *vnetwork, const char *vhost,
bool ipv6, const char *vprefix6, int vprefix6_len,
const ch... | {
"code": [
" const char **dnssearch)",
" if ((dns.s_addr & mask.s_addr) != net.s_addr ||",
" dns.s_addr == host.s_addr) {",
" if ((dhcp.s_addr & mask.s_addr) != net.s_addr ||",
" dhcp.s_addr == host.s_addr || dhcp.s_addr == dns.s_addr) {",
" ... | static int FUNC_0(NetClientState *VAR_0, const char *VAR_1,
const char *VAR_2, int VAR_3,
bool VAR_4, const char *VAR_5, const char *VAR_6,
bool VAR_7, const char *VAR_8, int VAR_9,
const char *VAR_10,
... | [
"static int FUNC_0(NetClientState *VAR_0, const char *VAR_1,\nconst char *VAR_2, int VAR_3,\nbool VAR_4, const char *VAR_5, const char *VAR_6,\nbool VAR_7, const char *VAR_8, int VAR_9,\nconst char *VAR_10,\nconst char *VAR_11, const char *VAR_12,\nconst char *VAR_13, const char *VAR_14,\nconst char *VAR_15, const ... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11,
13,
15,
17,
19,
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45,
47
],
[
49
],
[
51
],
[
53
],
[... |
2,139 | size_t qemu_fd_getpagesize(int fd)
{
#ifdef CONFIG_LINUX
struct statfs fs;
int ret;
if (fd != -1) {
do {
ret = fstatfs(fd, &fs);
} while (ret != 0 && errno == EINTR);
if (ret == 0 && fs.f_type == HUGETLBFS_MAGIC) {
return fs.f_bsize;
}
... | true | qemu | 57d1f6d7ce23e79a8ebe4a57bd2363b269b4664b | size_t qemu_fd_getpagesize(int fd)
{
#ifdef CONFIG_LINUX
struct statfs fs;
int ret;
if (fd != -1) {
do {
ret = fstatfs(fd, &fs);
} while (ret != 0 && errno == EINTR);
if (ret == 0 && fs.f_type == HUGETLBFS_MAGIC) {
return fs.f_bsize;
}
... | {
"code": [],
"line_no": []
} | size_t FUNC_0(int fd)
{
#ifdef CONFIG_LINUX
struct statfs fs;
int ret;
if (fd != -1) {
do {
ret = fstatfs(fd, &fs);
} while (ret != 0 && errno == EINTR);
if (ret == 0 && fs.f_type == HUGETLBFS_MAGIC) {
return fs.f_bsize;
}
}
... | [
"size_t FUNC_0(int fd)\n{",
"#ifdef CONFIG_LINUX\nstruct statfs fs;",
"int ret;",
"if (fd != -1) {",
"do {",
"ret = fstatfs(fd, &fs);",
"} while (ret != 0 && errno == EINTR);",
"if (ret == 0 && fs.f_type == HUGETLBFS_MAGIC) {",
"return fs.f_bsize;",
"}",
"}",
"return getpagesize();",
"}"
] | [
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
],
[
38
],
[
40
]
] |
2,140 | static int cpudef_setfield(const char *name, const char *str, void *opaque)
{
x86_def_t *def = opaque;
int err = 0;
if (!strcmp(name, "name")) {
def->name = g_strdup(str);
} else if (!strcmp(name, "model_id")) {
strncpy(def->model_id, str, sizeof (def->model_id));
} else i... | true | qemu | 99e1dec06f343cefecae9baeec0aae2f99f552d5 | static int cpudef_setfield(const char *name, const char *str, void *opaque)
{
x86_def_t *def = opaque;
int err = 0;
if (!strcmp(name, "name")) {
def->name = g_strdup(str);
} else if (!strcmp(name, "model_id")) {
strncpy(def->model_id, str, sizeof (def->model_id));
} else i... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0, const char *VAR_1, void *VAR_2)
{
x86_def_t *def = VAR_2;
int VAR_3 = 0;
if (!strcmp(VAR_0, "VAR_0")) {
def->VAR_0 = g_strdup(VAR_1);
} else if (!strcmp(VAR_0, "model_id")) {
strncpy(def->model_id, VAR_1, sizeof (def->model_id));
} else... | [
"static int FUNC_0(const char *VAR_0, const char *VAR_1, void *VAR_2)\n{",
"x86_def_t *def = VAR_2;",
"int VAR_3 = 0;",
"if (!strcmp(VAR_0, \"VAR_0\")) {",
"def->VAR_0 = g_strdup(VAR_1);",
"} else if (!strcmp(VAR_0, \"model_id\")) {",
"strncpy(def->model_id, VAR_1, sizeof (def->model_id));",
"} else i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
14
],
[
16
],
[
18
],
[
20
],
[
22,
24
],
[
26
],
[
28
],
[
30
],
[
32
],
[
34,
36
],
[
38,
40
],
[
42,
44
],
[
46
],
[
48... |
2,141 | static inline int onenand_prog_spare(OneNANDState *s, int sec, int secn,
void *src)
{
int result = 0;
if (secn > 0) {
const uint8_t *sp = (const uint8_t *)src;
uint8_t *dp = 0, *dpp = 0;
if (s->blk_cur) {
dp = g_malloc(512);
if (!dp
... | true | qemu | 441692ddd8321d5e0f09b163e86410e578d87236 | static inline int onenand_prog_spare(OneNANDState *s, int sec, int secn,
void *src)
{
int result = 0;
if (secn > 0) {
const uint8_t *sp = (const uint8_t *)src;
uint8_t *dp = 0, *dpp = 0;
if (s->blk_cur) {
dp = g_malloc(512);
if (!dp
... | {
"code": [
" || blk_read(s->blk_cur, s->secs_cur + (sec >> 5), dp, 1) < 0) {",
" result = blk_write(s->blk_cur, s->secs_cur + (sec >> 5),",
" dp, 1) < 0;"
],
"line_no": [
21,
57,
59
]
} | static inline int FUNC_0(OneNANDState *VAR_0, int VAR_1, int VAR_2,
void *VAR_3)
{
int VAR_4 = 0;
if (VAR_2 > 0) {
const uint8_t *VAR_5 = (const uint8_t *)VAR_3;
uint8_t *dp = 0, *dpp = 0;
if (VAR_0->blk_cur) {
dp = g_malloc(512);
if (!dp
... | [
"static inline int FUNC_0(OneNANDState *VAR_0, int VAR_1, int VAR_2,\nvoid *VAR_3)\n{",
"int VAR_4 = 0;",
"if (VAR_2 > 0) {",
"const uint8_t *VAR_5 = (const uint8_t *)VAR_3;",
"uint8_t *dp = 0, *dpp = 0;",
"if (VAR_0->blk_cur) {",
"dp = g_malloc(512);",
"if (!dp\n|| blk_read(VAR_0->blk_cur, VAR_0->sec... | [
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,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
2,144 | static int ircam_read_header(AVFormatContext *s)
{
uint32_t magic, sample_rate, channels, tag;
const AVCodecTag *tags;
int le = -1, i;
AVStream *st;
magic = avio_rl32(s->pb);
for (i = 0; i < 7; i++) {
if (magic == table[i].magic) {
le = table[i].is_le;
... | true | FFmpeg | 3d673078a03a3819df9dba7667f9e5d59b8487d0 | static int ircam_read_header(AVFormatContext *s)
{
uint32_t magic, sample_rate, channels, tag;
const AVCodecTag *tags;
int le = -1, i;
AVStream *st;
magic = avio_rl32(s->pb);
for (i = 0; i < 7; i++) {
if (magic == table[i].magic) {
le = table[i].is_le;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
uint32_t magic, sample_rate, channels, tag;
const AVCodecTag *VAR_1;
int VAR_2 = -1, VAR_3;
AVStream *st;
magic = avio_rl32(VAR_0->pb);
for (VAR_3 = 0; VAR_3 < 7; VAR_3++) {
if (magic == table[VAR_3].magic) {
VAR_2 = tabl... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"uint32_t magic, sample_rate, channels, tag;",
"const AVCodecTag *VAR_1;",
"int VAR_2 = -1, VAR_3;",
"AVStream *st;",
"magic = avio_rl32(VAR_0->pb);",
"for (VAR_3 = 0; VAR_3 < 7; VAR_3++) {",
"if (magic == table[VAR_3].magic) {",
"VAR_2 = table[VAR_3].... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
2,145 | static void pc_init_pci_1_6(QEMUMachineInitArgs *args)
{
has_pci_info = false;
pc_init_pci(args);
} | true | qemu | 04920fc0faa4760f9c4fc0e73b992b768099be70 | static void pc_init_pci_1_6(QEMUMachineInitArgs *args)
{
has_pci_info = false;
pc_init_pci(args);
} | {
"code": [],
"line_no": []
} | static void FUNC_0(QEMUMachineInitArgs *VAR_0)
{
has_pci_info = false;
pc_init_pci(VAR_0);
} | [
"static void FUNC_0(QEMUMachineInitArgs *VAR_0)\n{",
"has_pci_info = false;",
"pc_init_pci(VAR_0);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
8
],
[
10
]
] |
2,146 | static char **breakline(char *input, int *count)
{
int c = 0;
char *p;
char **rval = g_malloc0(sizeof(char *));
char **tmp;
while (rval && (p = qemu_strsep(&input, " ")) != NULL) {
if (!*p) {
continue;
}
c++;
tmp = g_realloc(rval, sizeof(*rval... | true | qemu | 5839e53bbc0fec56021d758aab7610df421ed8c8 | static char **breakline(char *input, int *count)
{
int c = 0;
char *p;
char **rval = g_malloc0(sizeof(char *));
char **tmp;
while (rval && (p = qemu_strsep(&input, " ")) != NULL) {
if (!*p) {
continue;
}
c++;
tmp = g_realloc(rval, sizeof(*rval... | {
"code": [
" char **rval = g_malloc0(sizeof(char *));"
],
"line_no": [
9
]
} | static char **FUNC_0(char *VAR_0, int *VAR_1)
{
int VAR_2 = 0;
char *VAR_3;
char **VAR_4 = g_malloc0(sizeof(char *));
char **VAR_5;
while (VAR_4 && (VAR_3 = qemu_strsep(&VAR_0, " ")) != NULL) {
if (!*VAR_3) {
continue;
}
VAR_2++;
VAR_5 = g_rea... | [
"static char **FUNC_0(char *VAR_0, int *VAR_1)\n{",
"int VAR_2 = 0;",
"char *VAR_3;",
"char **VAR_4 = g_malloc0(sizeof(char *));",
"char **VAR_5;",
"while (VAR_4 && (VAR_3 = qemu_strsep(&VAR_0, \" \")) != NULL) {",
"if (!*VAR_3) {",
"continue;",
"}",
"VAR_2++;",
"VAR_5 = g_realloc(VAR_4, sizeof(... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
2,149 | int kvm_arch_release_virq_post(int virq)
{
MSIRouteEntry *entry, *next;
QLIST_FOREACH_SAFE(entry, &msi_route_list, list, next) {
if (entry->virq == virq) {
trace_kvm_x86_remove_msi_route(virq);
QLIST_REMOVE(entry, list);
break;
}
}
return 0;... | true | qemu | 01960e6d21dcfbfc8a03d8fd6284c448cf75865b | int kvm_arch_release_virq_post(int virq)
{
MSIRouteEntry *entry, *next;
QLIST_FOREACH_SAFE(entry, &msi_route_list, list, next) {
if (entry->virq == virq) {
trace_kvm_x86_remove_msi_route(virq);
QLIST_REMOVE(entry, list);
break;
}
}
return 0;... | {
"code": [],
"line_no": []
} | int FUNC_0(int VAR_0)
{
MSIRouteEntry *entry, *next;
QLIST_FOREACH_SAFE(entry, &msi_route_list, list, next) {
if (entry->VAR_0 == VAR_0) {
trace_kvm_x86_remove_msi_route(VAR_0);
QLIST_REMOVE(entry, list);
break;
}
}
return 0;
} | [
"int FUNC_0(int VAR_0)\n{",
"MSIRouteEntry *entry, *next;",
"QLIST_FOREACH_SAFE(entry, &msi_route_list, list, next) {",
"if (entry->VAR_0 == VAR_0) {",
"trace_kvm_x86_remove_msi_route(VAR_0);",
"QLIST_REMOVE(entry, list);",
"break;",
"}",
"}",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
16
],
[
18
],
[
20
],
[
22
],
[
24
]
] |
2,150 | monitor_qapi_event_queue(QAPIEvent event, QDict *qdict, Error **errp)
{
MonitorQAPIEventConf *evconf;
MonitorQAPIEventState *evstate;
assert(event < QAPI_EVENT__MAX);
evconf = &monitor_qapi_event_conf[event];
trace_monitor_protocol_event_queue(event, qdict, evconf->rate);
qemu_mutex_l... | true | qemu | dc5999787181f6d090217f45570067e55333835b | monitor_qapi_event_queue(QAPIEvent event, QDict *qdict, Error **errp)
{
MonitorQAPIEventConf *evconf;
MonitorQAPIEventState *evstate;
assert(event < QAPI_EVENT__MAX);
evconf = &monitor_qapi_event_conf[event];
trace_monitor_protocol_event_queue(event, qdict, evconf->rate);
qemu_mutex_l... | {
"code": [
" int64_t now = qemu_clock_get_ns(QEMU_CLOCK_REALTIME);",
" evstate->timer = timer_new_ns(QEMU_CLOCK_REALTIME,"
],
"line_no": [
75,
93
]
} | FUNC_0(QAPIEvent VAR_0, QDict *VAR_1, Error **VAR_2)
{
MonitorQAPIEventConf *evconf;
MonitorQAPIEventState *evstate;
assert(VAR_0 < QAPI_EVENT__MAX);
evconf = &monitor_qapi_event_conf[VAR_0];
trace_monitor_protocol_event_queue(VAR_0, VAR_1, evconf->rate);
qemu_mutex_lock(&monitor_lock... | [
"FUNC_0(QAPIEvent VAR_0, QDict *VAR_1, Error **VAR_2)\n{",
"MonitorQAPIEventConf *evconf;",
"MonitorQAPIEventState *evstate;",
"assert(VAR_0 < QAPI_EVENT__MAX);",
"evconf = &monitor_qapi_event_conf[VAR_0];",
"trace_monitor_protocol_event_queue(VAR_0, VAR_1, evconf->rate);",
"qemu_mutex_lock(&monitor_loc... | [
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,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
55
],
[
57
],
[
59
],
[
61
],
[
75... |
2,151 | void pdu_submit(V9fsPDU *pdu)
{
Coroutine *co;
CoroutineEntry *handler;
V9fsState *s = pdu->s;
if (pdu->id >= ARRAY_SIZE(pdu_co_handlers) ||
(pdu_co_handlers[pdu->id] == NULL)) {
handler = v9fs_op_not_supp;
} else {
handler = pdu_co_handlers[pdu->id];
}
... | true | qemu | 0b8b8753e4d94901627b3e86431230f2319215c4 | void pdu_submit(V9fsPDU *pdu)
{
Coroutine *co;
CoroutineEntry *handler;
V9fsState *s = pdu->s;
if (pdu->id >= ARRAY_SIZE(pdu_co_handlers) ||
(pdu_co_handlers[pdu->id] == NULL)) {
handler = v9fs_op_not_supp;
} else {
handler = pdu_co_handlers[pdu->id];
}
... | {
"code": [
" co = qemu_coroutine_create(handler);",
" qemu_coroutine_enter(co, pdu);"
],
"line_no": [
33,
35
]
} | void FUNC_0(V9fsPDU *VAR_0)
{
Coroutine *co;
CoroutineEntry *handler;
V9fsState *s = VAR_0->s;
if (VAR_0->id >= ARRAY_SIZE(pdu_co_handlers) ||
(pdu_co_handlers[VAR_0->id] == NULL)) {
handler = v9fs_op_not_supp;
} else {
handler = pdu_co_handlers[VAR_0->id];
}
... | [
"void FUNC_0(V9fsPDU *VAR_0)\n{",
"Coroutine *co;",
"CoroutineEntry *handler;",
"V9fsState *s = VAR_0->s;",
"if (VAR_0->id >= ARRAY_SIZE(pdu_co_handlers) ||\n(pdu_co_handlers[VAR_0->id] == NULL)) {",
"handler = v9fs_op_not_supp;",
"} else {",
"handler = pdu_co_handlers[VAR_0->id];",
"}",
"if (is_r... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
2,152 | static ssize_t socket_writev_buffer(void *opaque, struct iovec *iov, int iovcnt,
int64_t pos)
{
QEMUFileSocket *s = opaque;
ssize_t len;
ssize_t size = iov_size(iov, iovcnt);
len = iov_send(s->fd, iov, iovcnt, 0, size);
if (len < size) {
len = -s... | true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static ssize_t socket_writev_buffer(void *opaque, struct iovec *iov, int iovcnt,
int64_t pos)
{
QEMUFileSocket *s = opaque;
ssize_t len;
ssize_t size = iov_size(iov, iovcnt);
len = iov_send(s->fd, iov, iovcnt, 0, size);
if (len < size) {
len = -s... | {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(void *opaque, struct iovec *iov, int iovcnt,
int64_t pos)
{
QEMUFileSocket *s = opaque;
ssize_t len;
ssize_t size = iov_size(iov, iovcnt);
len = iov_send(s->fd, iov, iovcnt, 0, size);
if (len < size) {
len = -socket_error();... | [
"static ssize_t FUNC_0(void *opaque, struct iovec *iov, int iovcnt,\nint64_t pos)\n{",
"QEMUFileSocket *s = opaque;",
"ssize_t len;",
"ssize_t size = iov_size(iov, iovcnt);",
"len = iov_send(s->fd, iov, iovcnt, 0, size);",
"if (len < size) {",
"len = -socket_error();",
"}",
"return len;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
2,153 | static void assign_storage(SCLPDevice *sclp, SCCB *sccb)
{
MemoryRegion *mr = NULL;
uint64_t this_subregion_size;
AssignStorage *assign_info = (AssignStorage *) sccb;
sclpMemoryHotplugDev *mhd = get_sclp_memory_hotplug_dev();
ram_addr_t assign_addr;
MemoryRegion *sysmem = get_system_memor... | true | qemu | f8ed85ac992c48814d916d5df4d44f9a971c5de4 | static void assign_storage(SCLPDevice *sclp, SCCB *sccb)
{
MemoryRegion *mr = NULL;
uint64_t this_subregion_size;
AssignStorage *assign_info = (AssignStorage *) sccb;
sclpMemoryHotplugDev *mhd = get_sclp_memory_hotplug_dev();
ram_addr_t assign_addr;
MemoryRegion *sysmem = get_system_memor... | {
"code": [
" memory_region_init_ram(standby_ram, NULL, id, this_subregion_size, &error_abort);"
],
"line_no": [
89
]
} | static void FUNC_0(SCLPDevice *VAR_0, SCCB *VAR_1)
{
MemoryRegion *mr = NULL;
uint64_t this_subregion_size;
AssignStorage *assign_info = (AssignStorage *) VAR_1;
sclpMemoryHotplugDev *mhd = get_sclp_memory_hotplug_dev();
ram_addr_t assign_addr;
MemoryRegion *sysmem = get_system_memory();
... | [
"static void FUNC_0(SCLPDevice *VAR_0, SCCB *VAR_1)\n{",
"MemoryRegion *mr = NULL;",
"uint64_t this_subregion_size;",
"AssignStorage *assign_info = (AssignStorage *) VAR_1;",
"sclpMemoryHotplugDev *mhd = get_sclp_memory_hotplug_dev();",
"ram_addr_t assign_addr;",
"MemoryRegion *sysmem = get_system_memor... | [
0,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31,
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
51,
53,
55
],
[... |
2,154 | static int curl_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
BDRVCURLState *s = bs->opaque;
CURLState *state = NULL;
QemuOpts *opts;
Error *local_err = NULL;
const char *file;
const char *cookie;
const char *cookie_secret;
double d;... | true | qemu | 2d25964d1831c99d54981e8b615eba5dd6a63e36 | static int curl_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
BDRVCURLState *s = bs->opaque;
CURLState *state = NULL;
QemuOpts *opts;
Error *local_err = NULL;
const char *file;
const char *cookie;
const char *cookie_secret;
double d;... | {
"code": [
" static int inited = 0;",
" if (!inited) {",
" curl_global_init(CURL_GLOBAL_ALL);",
" inited = 1;"
],
"line_no": [
29,
199,
201,
203
]
} | static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1, int VAR_2,
Error **VAR_3)
{
BDRVCURLState *s = VAR_0->opaque;
CURLState *state = NULL;
QemuOpts *opts;
Error *local_err = NULL;
const char *VAR_4;
const char *VAR_5;
const char *VAR_6;
double VAR_7;
... | [
"static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1, int VAR_2,\nError **VAR_3)\n{",
"BDRVCURLState *s = VAR_0->opaque;",
"CURLState *state = NULL;",
"QemuOpts *opts;",
"Error *local_err = NULL;",
"const char *VAR_4;",
"const char *VAR_5;",
"const char *VAR_6;",
"double VAR_7;",
"const char *... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[... |
2,155 | static void mp3_write_xing(AVFormatContext *s)
{
MP3Context *mp3 = s->priv_data;
AVCodecContext *codec = s->streams[mp3->audio_stream_idx]->codec;
int32_t header;
MPADecodeHeader mpah;
int srate_idx, i, channels;
int bitrate_idx;
int best_bitrate_idx;
int best_bitr... | false | FFmpeg | ef363ebd596da18f889a7d4845023a23dfac84c9 | static void mp3_write_xing(AVFormatContext *s)
{
MP3Context *mp3 = s->priv_data;
AVCodecContext *codec = s->streams[mp3->audio_stream_idx]->codec;
int32_t header;
MPADecodeHeader mpah;
int srate_idx, i, channels;
int bitrate_idx;
int best_bitrate_idx;
int best_bitr... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVFormatContext *VAR_0)
{
MP3Context *mp3 = VAR_0->priv_data;
AVCodecContext *codec = VAR_0->streams[mp3->audio_stream_idx]->codec;
int32_t header;
MPADecodeHeader mpah;
int VAR_1, VAR_2, VAR_3;
int VAR_4;
int VAR_5;
int VAR_6 = INT_MAX;
int... | [
"static void FUNC_0(AVFormatContext *VAR_0)\n{",
"MP3Context *mp3 = VAR_0->priv_data;",
"AVCodecContext *codec = VAR_0->streams[mp3->audio_stream_idx]->codec;",
"int32_t header;",
"MPADecodeHeader mpah;",
"int VAR_1, VAR_2, VAR_3;",
"int VAR_4;",
"int VAR_5;",
"int VAR_6 = INT_MAX;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
2,156 | static int flashsv_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_size, void *data)
{
FlashSVContext * const s = avctx->priv_data;
AVFrame *pict = data;
AVFrame * const p = &s->frame;
int res;
int I_frame = 0;
int opt_w, opt_h;
*p = *pict;
/* First frame needs to ... | false | FFmpeg | d2bc04738b842169b6e32160ffa81db9c868eec4 | static int flashsv_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_size, void *data)
{
FlashSVContext * const s = avctx->priv_data;
AVFrame *pict = data;
AVFrame * const p = &s->frame;
int res;
int I_frame = 0;
int opt_w, opt_h;
*p = *pict;
if (avctx->frame_n... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, uint8_t *VAR_1, int VAR_2, void *VAR_3)
{
FlashSVContext * const s = VAR_0->priv_data;
AVFrame *pict = VAR_3;
AVFrame * const p = &s->frame;
int VAR_4;
int VAR_5 = 0;
int VAR_6, VAR_7;
*p = *pict;
if (VAR_0->frame_number == 0) {... | [
"static int FUNC_0(AVCodecContext *VAR_0, uint8_t *VAR_1, int VAR_2, void *VAR_3)\n{",
"FlashSVContext * const s = VAR_0->priv_data;",
"AVFrame *pict = VAR_3;",
"AVFrame * const p = &s->frame;",
"int VAR_4;",
"int VAR_5 = 0;",
"int VAR_6, VAR_7;",
"*p = *pict;",
"if (VAR_0->frame_number == 0) {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
45
],
[
47
],
[
49
],
[
51
... |
2,159 | static void draw_bar(TestSourceContext *test, const uint8_t color[4],
int x, int y, int w, int h,
AVFrame *frame)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
uint8_t *p, *p0;
int plane;
x = FFMIN(x, test->w - 1);
y = FFMI... | false | FFmpeg | 745f4bcc2c1deaa562cce01fa52e38b0220aed31 | static void draw_bar(TestSourceContext *test, const uint8_t color[4],
int x, int y, int w, int h,
AVFrame *frame)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
uint8_t *p, *p0;
int plane;
x = FFMIN(x, test->w - 1);
y = FFMI... | {
"code": [],
"line_no": []
} | static void FUNC_0(TestSourceContext *VAR_0, const uint8_t VAR_1[4],
int VAR_2, int VAR_3, int VAR_4, int VAR_5,
AVFrame *VAR_6)
{
const AVPixFmtDescriptor *VAR_7 = av_pix_fmt_desc_get(VAR_6->format);
uint8_t *p, *p0;
int VAR_8;
VAR_2 = FFMIN(VAR_2, VAR... | [
"static void FUNC_0(TestSourceContext *VAR_0, const uint8_t VAR_1[4],\nint VAR_2, int VAR_3, int VAR_4, int VAR_5,\nAVFrame *VAR_6)\n{",
"const AVPixFmtDescriptor *VAR_7 = av_pix_fmt_desc_get(VAR_6->format);",
"uint8_t *p, *p0;",
"int VAR_8;",
"VAR_2 = FFMIN(VAR_2, VAR_0->VAR_4 - 1);",
"VAR_3 = FFMIN(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
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
2,161 | static void set_kernel_args_old(const struct arm_boot_info *info)
{
target_phys_addr_t p;
const char *s;
int initrd_size = info->initrd_size;
target_phys_addr_t base = info->loader_start;
/* see linux/include/asm-arm/setup.h */
p = base + KERNEL_ARGS_ADDR;
/* page_size */
WRIT... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void set_kernel_args_old(const struct arm_boot_info *info)
{
target_phys_addr_t p;
const char *s;
int initrd_size = info->initrd_size;
target_phys_addr_t base = info->loader_start;
p = base + KERNEL_ARGS_ADDR;
WRITE_WORD(p, 4096);
WRITE_WORD(p, info->ram_si... | {
"code": [],
"line_no": []
} | static void FUNC_0(const struct arm_boot_info *VAR_0)
{
target_phys_addr_t p;
const char *VAR_1;
int VAR_2 = VAR_0->VAR_2;
target_phys_addr_t base = VAR_0->loader_start;
p = base + KERNEL_ARGS_ADDR;
WRITE_WORD(p, 4096);
WRITE_WORD(p, VAR_0->ram_size / 4096);
... | [
"static void FUNC_0(const struct arm_boot_info *VAR_0)\n{",
"target_phys_addr_t p;",
"const char *VAR_1;",
"int VAR_2 = VAR_0->VAR_2;",
"target_phys_addr_t base = VAR_0->loader_start;",
"p = base + KERNEL_ARGS_ADDR;",
"WRITE_WORD(p, 4096);",
"WRITE_WORD(p, VAR_0->ram_size / 4096);",
"WRITE_WORD(p, 0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
21
],
[
25
],
[
29
],
[
31,
33,
35,
39
],
[
43
],
[
47
],
[
51
],
[
55
],
[
59
],
[
63
],
[
73
],
[
77
],
[... |
2,162 | static void virtio_ccw_net_realize(VirtioCcwDevice *ccw_dev, Error **errp)
{
DeviceState *qdev = DEVICE(ccw_dev);
VirtIONetCcw *dev = VIRTIO_NET_CCW(ccw_dev);
DeviceState *vdev = DEVICE(&dev->vdev);
Error *err = NULL;
virtio_net_set_netclient_name(&dev->vdev, qdev->id,
... | false | qemu | 621ff94d5074d88253a5818c6b9c4db718fbfc65 | static void virtio_ccw_net_realize(VirtioCcwDevice *ccw_dev, Error **errp)
{
DeviceState *qdev = DEVICE(ccw_dev);
VirtIONetCcw *dev = VIRTIO_NET_CCW(ccw_dev);
DeviceState *vdev = DEVICE(&dev->vdev);
Error *err = NULL;
virtio_net_set_netclient_name(&dev->vdev, qdev->id,
... | {
"code": [],
"line_no": []
} | static void FUNC_0(VirtioCcwDevice *VAR_0, Error **VAR_1)
{
DeviceState *qdev = DEVICE(VAR_0);
VirtIONetCcw *dev = VIRTIO_NET_CCW(VAR_0);
DeviceState *vdev = DEVICE(&dev->vdev);
Error *err = NULL;
virtio_net_set_netclient_name(&dev->vdev, qdev->id,
object_g... | [
"static void FUNC_0(VirtioCcwDevice *VAR_0, Error **VAR_1)\n{",
"DeviceState *qdev = DEVICE(VAR_0);",
"VirtIONetCcw *dev = VIRTIO_NET_CCW(VAR_0);",
"DeviceState *vdev = DEVICE(&dev->vdev);",
"Error *err = NULL;",
"virtio_net_set_netclient_name(&dev->vdev, qdev->id,\nobject_get_typename(OBJECT(qdev)));",
... | [
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
]
] |
2,163 | uint8_t cpu_inb(CPUState *env, pio_addr_t addr)
{
uint8_t val;
val = ioport_read(0, addr);
LOG_IOPORT("inb : %04"FMT_pioaddr" %02"PRIx8"\n", addr, val);
#ifdef CONFIG_KQEMU
if (env)
env->last_io_time = cpu_get_time_fast();
#endif
return val;
}
| false | qemu | 4a1418e07bdcfaa3177739e04707ecaec75d89e1 | uint8_t cpu_inb(CPUState *env, pio_addr_t addr)
{
uint8_t val;
val = ioport_read(0, addr);
LOG_IOPORT("inb : %04"FMT_pioaddr" %02"PRIx8"\n", addr, val);
#ifdef CONFIG_KQEMU
if (env)
env->last_io_time = cpu_get_time_fast();
#endif
return val;
}
| {
"code": [],
"line_no": []
} | uint8_t FUNC_0(CPUState *env, pio_addr_t addr)
{
uint8_t val;
val = ioport_read(0, addr);
LOG_IOPORT("inb : %04"FMT_pioaddr" %02"PRIx8"\n", addr, val);
#ifdef CONFIG_KQEMU
if (env)
env->last_io_time = cpu_get_time_fast();
#endif
return val;
}
| [
"uint8_t FUNC_0(CPUState *env, pio_addr_t addr)\n{",
"uint8_t val;",
"val = ioport_read(0, addr);",
"LOG_IOPORT(\"inb : %04\"FMT_pioaddr\" %02\"PRIx8\"\\n\", addr, val);",
"#ifdef CONFIG_KQEMU\nif (env)\nenv->last_io_time = cpu_get_time_fast();",
"#endif\nreturn val;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13,
15
],
[
17,
19
],
[
21
]
] |
2,164 | static void zynq_init(QEMUMachineInitArgs *args)
{
ram_addr_t ram_size = args->ram_size;
const char *cpu_model = args->cpu_model;
const char *kernel_filename = args->kernel_filename;
const char *kernel_cmdline = args->kernel_cmdline;
const char *initrd_filename = args->initrd_filename;
Ob... | false | qemu | ec0e68ef1da316b3ead1943d8f607cc68b13e0d1 | static void zynq_init(QEMUMachineInitArgs *args)
{
ram_addr_t ram_size = args->ram_size;
const char *cpu_model = args->cpu_model;
const char *kernel_filename = args->kernel_filename;
const char *kernel_cmdline = args->kernel_cmdline;
const char *initrd_filename = args->initrd_filename;
Ob... | {
"code": [],
"line_no": []
} | static void FUNC_0(QEMUMachineInitArgs *VAR_0)
{
ram_addr_t ram_size = VAR_0->ram_size;
const char *VAR_1 = VAR_0->VAR_1;
const char *VAR_2 = VAR_0->VAR_2;
const char *VAR_3 = VAR_0->VAR_3;
const char *VAR_4 = VAR_0->VAR_4;
ObjectClass *cpu_oc;
ARMCPU *cpu;
MemoryRegion *address... | [
"static void FUNC_0(QEMUMachineInitArgs *VAR_0)\n{",
"ram_addr_t ram_size = VAR_0->ram_size;",
"const char *VAR_1 = VAR_0->VAR_1;",
"const char *VAR_2 = VAR_0->VAR_2;",
"const char *VAR_3 = VAR_0->VAR_3;",
"const char *VAR_4 = VAR_0->VAR_4;",
"ObjectClass *cpu_oc;",
"ARMCPU *cpu;",
"MemoryRegion *ad... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
... |
2,165 | static void avc_wgt_16width_msa(uint8_t *data,
int32_t stride,
int32_t height,
int32_t log2_denom,
int32_t src_weight,
int32_t offset_in)
{
uint8_t c... | false | FFmpeg | bcd7bf7eeb09a395cc01698842d1b8be9af483fc | static void avc_wgt_16width_msa(uint8_t *data,
int32_t stride,
int32_t height,
int32_t log2_denom,
int32_t src_weight,
int32_t offset_in)
{
uint8_t c... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t *VAR_0,
int32_t VAR_1,
int32_t VAR_2,
int32_t VAR_3,
int32_t VAR_4,
int32_t VAR_5)
{
uint8_t cnt;
v16u8 zero = { 0 };... | [
"static void FUNC_0(uint8_t *VAR_0,\nint32_t VAR_1,\nint32_t VAR_2,\nint32_t VAR_3,\nint32_t VAR_4,\nint32_t VAR_5)\n{",
"uint8_t cnt;",
"v16u8 zero = { 0 };",
"v16u8 src0, src1, src2, src3;",
"v16u8 dst0, dst1, dst2, dst3;",
"v8u16 src0_l, src1_l, src2_l, src3_l;",
"v8u16 src0_r, src1_r, src2_r, src3_r... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53
],
[... |
2,166 | static void mem_info_pae32(Monitor *mon, CPUState *env)
{
unsigned int l1, l2, l3;
int prot, last_prot;
uint64_t pdpe, pde, pte;
uint64_t pdp_addr, pd_addr, pt_addr;
target_phys_addr_t start, end;
pdp_addr = env->cr[3] & ~0x1f;
last_prot = 0;
start = -1;
for (l1 = 0; l1 <... | false | qemu | c76c8416be5631dfdbd13799d3c67ad670637155 | static void mem_info_pae32(Monitor *mon, CPUState *env)
{
unsigned int l1, l2, l3;
int prot, last_prot;
uint64_t pdpe, pde, pte;
uint64_t pdp_addr, pd_addr, pt_addr;
target_phys_addr_t start, end;
pdp_addr = env->cr[3] & ~0x1f;
last_prot = 0;
start = -1;
for (l1 = 0; l1 <... | {
"code": [],
"line_no": []
} | static void FUNC_0(Monitor *VAR_0, CPUState *VAR_1)
{
unsigned int VAR_2, VAR_3, VAR_4;
int VAR_5, VAR_6;
uint64_t pdpe, pde, pte;
uint64_t pdp_addr, pd_addr, pt_addr;
target_phys_addr_t start, end;
pdp_addr = VAR_1->cr[3] & ~0x1f;
VAR_6 = 0;
start = -1;
for (VAR_2 = 0; V... | [
"static void FUNC_0(Monitor *VAR_0, CPUState *VAR_1)\n{",
"unsigned int VAR_2, VAR_3, VAR_4;",
"int VAR_5, VAR_6;",
"uint64_t pdpe, pde, pte;",
"uint64_t pdp_addr, pd_addr, pt_addr;",
"target_phys_addr_t start, end;",
"pdp_addr = VAR_1->cr[3] & ~0x1f;",
"VAR_6 = 0;",
"start = -1;",
"for (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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
2,167 | int64_t helper_fdtox(CPUSPARCState *env, float64 src)
{
int64_t ret;
clear_float_exceptions(env);
ret = float64_to_int64_round_to_zero(src, &env->fp_status);
check_ieee_exceptions(env);
return ret;
}
| false | qemu | 7385aed20db5d83979f683b9d0048674411e963c | int64_t helper_fdtox(CPUSPARCState *env, float64 src)
{
int64_t ret;
clear_float_exceptions(env);
ret = float64_to_int64_round_to_zero(src, &env->fp_status);
check_ieee_exceptions(env);
return ret;
}
| {
"code": [],
"line_no": []
} | int64_t FUNC_0(CPUSPARCState *env, float64 src)
{
int64_t ret;
clear_float_exceptions(env);
ret = float64_to_int64_round_to_zero(src, &env->fp_status);
check_ieee_exceptions(env);
return ret;
}
| [
"int64_t FUNC_0(CPUSPARCState *env, float64 src)\n{",
"int64_t ret;",
"clear_float_exceptions(env);",
"ret = float64_to_int64_round_to_zero(src, &env->fp_status);",
"check_ieee_exceptions(env);",
"return ret;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
2,168 | static inline void gen_op_jz_ecx(TCGMemOp size, int label1)
{
tcg_gen_mov_tl(cpu_tmp0, cpu_regs[R_ECX]);
gen_extu(size, cpu_tmp0);
tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_tmp0, 0, label1);
}
| false | qemu | 42a268c241183877192c376d03bd9b6d527407c7 | static inline void gen_op_jz_ecx(TCGMemOp size, int label1)
{
tcg_gen_mov_tl(cpu_tmp0, cpu_regs[R_ECX]);
gen_extu(size, cpu_tmp0);
tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_tmp0, 0, label1);
}
| {
"code": [],
"line_no": []
} | static inline void FUNC_0(TCGMemOp VAR_0, int VAR_1)
{
tcg_gen_mov_tl(cpu_tmp0, cpu_regs[R_ECX]);
gen_extu(VAR_0, cpu_tmp0);
tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_tmp0, 0, VAR_1);
}
| [
"static inline void FUNC_0(TCGMemOp VAR_0, int VAR_1)\n{",
"tcg_gen_mov_tl(cpu_tmp0, cpu_regs[R_ECX]);",
"gen_extu(VAR_0, cpu_tmp0);",
"tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_tmp0, 0, VAR_1);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
2,169 | void qemu_ram_foreach_block(RAMBlockIterFunc func, void *opaque)
{
RAMBlock *block;
rcu_read_lock();
QLIST_FOREACH_RCU(block, &ram_list.blocks, next) {
func(block->host, block->offset, block->used_length, opaque);
}
rcu_read_unlock();
}
| false | qemu | e3807054e20fb3b94d18cb751c437ee2f43b6fac | void qemu_ram_foreach_block(RAMBlockIterFunc func, void *opaque)
{
RAMBlock *block;
rcu_read_lock();
QLIST_FOREACH_RCU(block, &ram_list.blocks, next) {
func(block->host, block->offset, block->used_length, opaque);
}
rcu_read_unlock();
}
| {
"code": [],
"line_no": []
} | void FUNC_0(RAMBlockIterFunc VAR_0, void *VAR_1)
{
RAMBlock *block;
rcu_read_lock();
QLIST_FOREACH_RCU(block, &ram_list.blocks, next) {
VAR_0(block->host, block->offset, block->used_length, VAR_1);
}
rcu_read_unlock();
}
| [
"void FUNC_0(RAMBlockIterFunc VAR_0, void *VAR_1)\n{",
"RAMBlock *block;",
"rcu_read_lock();",
"QLIST_FOREACH_RCU(block, &ram_list.blocks, next) {",
"VAR_0(block->host, block->offset, block->used_length, VAR_1);",
"}",
"rcu_read_unlock();",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
2,170 | static uint64_t exynos4210_pwm_read(void *opaque, target_phys_addr_t offset,
unsigned size)
{
Exynos4210PWMState *s = (Exynos4210PWMState *)opaque;
uint32_t value = 0;
int index;
switch (offset) {
case TCFG0: case TCFG1:
index = (offset - TCFG0) >> 2;
value = s->re... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t exynos4210_pwm_read(void *opaque, target_phys_addr_t offset,
unsigned size)
{
Exynos4210PWMState *s = (Exynos4210PWMState *)opaque;
uint32_t value = 0;
int index;
switch (offset) {
case TCFG0: case TCFG1:
index = (offset - TCFG0) >> 2;
value = s->re... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t offset,
unsigned size)
{
Exynos4210PWMState *s = (Exynos4210PWMState *)opaque;
uint32_t value = 0;
int VAR_0;
switch (offset) {
case TCFG0: case TCFG1:
VAR_0 = (offset - TCFG0) >> 2;
value = s->reg_tcfg[VAR_0]... | [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t offset,\nunsigned size)\n{",
"Exynos4210PWMState *s = (Exynos4210PWMState *)opaque;",
"uint32_t value = 0;",
"int VAR_0;",
"switch (offset) {",
"case TCFG0: case TCFG1:\nVAR_0 = (offset - TCFG0) >> 2;",
"value = s->reg_tcfg[VAR_0];",
"break;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
27,
29
],
[
31
],
[
35,
37,
39
],
[
41
],
[
43
],
[
47,
49,
51
],
[
53
],
[
55
],
[... |
2,171 | static void apic_init_ipi(APICState *s)
{
int i;
s->tpr = 0;
s->spurious_vec = 0xff;
s->log_dest = 0;
s->dest_mode = 0xf;
memset(s->isr, 0, sizeof(s->isr));
memset(s->tmr, 0, sizeof(s->tmr));
memset(s->irr, 0, sizeof(s->irr));
for(i = 0; i < APIC_LVT_NB; i++)
s->... | false | qemu | b09ea7d55cfab5a75912bb56ed1fcd757604a759 | static void apic_init_ipi(APICState *s)
{
int i;
s->tpr = 0;
s->spurious_vec = 0xff;
s->log_dest = 0;
s->dest_mode = 0xf;
memset(s->isr, 0, sizeof(s->isr));
memset(s->tmr, 0, sizeof(s->tmr));
memset(s->irr, 0, sizeof(s->irr));
for(i = 0; i < APIC_LVT_NB; i++)
s->... | {
"code": [],
"line_no": []
} | static void FUNC_0(APICState *VAR_0)
{
int VAR_1;
VAR_0->tpr = 0;
VAR_0->spurious_vec = 0xff;
VAR_0->log_dest = 0;
VAR_0->dest_mode = 0xf;
memset(VAR_0->isr, 0, sizeof(VAR_0->isr));
memset(VAR_0->tmr, 0, sizeof(VAR_0->tmr));
memset(VAR_0->irr, 0, sizeof(VAR_0->irr));
for(... | [
"static void FUNC_0(APICState *VAR_0)\n{",
"int VAR_1;",
"VAR_0->tpr = 0;",
"VAR_0->spurious_vec = 0xff;",
"VAR_0->log_dest = 0;",
"VAR_0->dest_mode = 0xf;",
"memset(VAR_0->isr, 0, sizeof(VAR_0->isr));",
"memset(VAR_0->tmr, 0, sizeof(VAR_0->tmr));",
"memset(VAR_0->irr, 0, sizeof(VAR_0->irr));",
"f... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
47... |
2,172 | static void init_ppc_proc(PowerPCCPU *cpu)
{
PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
CPUPPCState *env = &cpu->env;
#if !defined(CONFIG_USER_ONLY)
int i;
env->irq_inputs = NULL;
/* Set all exception vectors to an invalid address */
for (i = 0; i < POWERPC_EXCP_NB; i++)
... | false | qemu | 8297be80f7cf71e09617669a8bd8b2836dcfd4c3 | static void init_ppc_proc(PowerPCCPU *cpu)
{
PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
CPUPPCState *env = &cpu->env;
#if !defined(CONFIG_USER_ONLY)
int i;
env->irq_inputs = NULL;
for (i = 0; i < POWERPC_EXCP_NB; i++)
env->excp_vectors[i] = (target_ulong)(-1ULL);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(PowerPCCPU *VAR_0)
{
PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(VAR_0);
CPUPPCState *env = &VAR_0->env;
#if !defined(CONFIG_USER_ONLY)
int VAR_1;
env->irq_inputs = NULL;
for (VAR_1 = 0; VAR_1 < POWERPC_EXCP_NB; VAR_1++)
env->excp_vectors[VAR_1] = (target_... | [
"static void FUNC_0(PowerPCCPU *VAR_0)\n{",
"PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(VAR_0);",
"CPUPPCState *env = &VAR_0->env;",
"#if !defined(CONFIG_USER_ONLY)\nint VAR_1;",
"env->irq_inputs = NULL;",
"for (VAR_1 = 0; VAR_1 < POWERPC_EXCP_NB; VAR_1++)",
"env->excp_vectors[VAR_1] = (target_ulong)(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
41
],
[
43,
47,
49,
51,
53,
55,
57,
59,
61
... |
2,173 | static int set_boot_dev(ISADevice *s, const char *boot_device)
{
#define PC_MAX_BOOT_DEVICES 3
int nbds, bds[3] = { 0, };
int i;
nbds = strlen(boot_device);
if (nbds > PC_MAX_BOOT_DEVICES) {
error_report("Too many boot devices for PC");
return(1);
}
for (i = 0; i < nb... | false | qemu | ddcd55316fb2851e144e719171621ad2816487dc | static int set_boot_dev(ISADevice *s, const char *boot_device)
{
#define PC_MAX_BOOT_DEVICES 3
int nbds, bds[3] = { 0, };
int i;
nbds = strlen(boot_device);
if (nbds > PC_MAX_BOOT_DEVICES) {
error_report("Too many boot devices for PC");
return(1);
}
for (i = 0; i < nb... | {
"code": [],
"line_no": []
} | static int FUNC_0(ISADevice *VAR_0, const char *VAR_1)
{
#define PC_MAX_BOOT_DEVICES 3
int VAR_2, VAR_3[3] = { 0, };
int VAR_4;
VAR_2 = strlen(VAR_1);
if (VAR_2 > PC_MAX_BOOT_DEVICES) {
error_report("Too many boot devices for PC");
return(1);
}
for (VAR_4 = 0; VAR_4 <... | [
"static int FUNC_0(ISADevice *VAR_0, const char *VAR_1)\n{",
"#define PC_MAX_BOOT_DEVICES 3\nint VAR_2, VAR_3[3] = { 0, };",
"int VAR_4;",
"VAR_2 = strlen(VAR_1);",
"if (VAR_2 > PC_MAX_BOOT_DEVICES) {",
"error_report(\"Too many boot devices for PC\");",
"return(1);",
"}",
"for (VAR_4 = 0; VAR_4 < VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
2,174 | static int64_t load_kernel (void)
{
int64_t kernel_entry, kernel_high;
long initrd_size;
ram_addr_t initrd_offset;
int big_endian;
uint32_t *prom_buf;
long prom_size;
int prom_index = 0;
#ifdef TARGET_WORDS_BIGENDIAN
big_endian = 1;
#else
big_endian = 0;
#endif
... | false | qemu | 94c2b6aff43cdfcfdfb552773a6b6b973a72ef0b | static int64_t load_kernel (void)
{
int64_t kernel_entry, kernel_high;
long initrd_size;
ram_addr_t initrd_offset;
int big_endian;
uint32_t *prom_buf;
long prom_size;
int prom_index = 0;
#ifdef TARGET_WORDS_BIGENDIAN
big_endian = 1;
#else
big_endian = 0;
#endif
... | {
"code": [],
"line_no": []
} | static int64_t FUNC_0 (void)
{
int64_t kernel_entry, kernel_high;
long VAR_0;
ram_addr_t initrd_offset;
int VAR_1;
uint32_t *prom_buf;
long VAR_2;
int VAR_3 = 0;
#ifdef TARGET_WORDS_BIGENDIAN
VAR_1 = 1;
#else
VAR_1 = 0;
#endif
if (load_elf(loaderparams.kernel_fi... | [
"static int64_t FUNC_0 (void)\n{",
"int64_t kernel_entry, kernel_high;",
"long VAR_0;",
"ram_addr_t initrd_offset;",
"int VAR_1;",
"uint32_t *prom_buf;",
"long VAR_2;",
"int VAR_3 = 0;",
"#ifdef TARGET_WORDS_BIGENDIAN\nVAR_1 = 1;",
"#else\nVAR_1 = 0;",
"#endif\nif (load_elf(loaderparams.kernel_f... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
25,
27
],
[
29,
33,
35,
37
],
[
39,
41
],
[
43
],
[
45
],
[
51
],
[
53
],
[
55
... |
2,175 | static int nbd_co_receive_reply(NBDClientSession *s,
NBDRequest *request,
QEMUIOVector *qiov)
{
int ret;
int i = HANDLE_TO_INDEX(s, request->handle);
/* Wait until we're woken up by nbd_read_reply_entry. */
s->requests[i].receivin... | false | qemu | 93970672210ca1ee45fdebbc11e1fd97916c7c8e | static int nbd_co_receive_reply(NBDClientSession *s,
NBDRequest *request,
QEMUIOVector *qiov)
{
int ret;
int i = HANDLE_TO_INDEX(s, request->handle);
s->requests[i].receiving = true;
qemu_coroutine_yield();
s->requests[i... | {
"code": [],
"line_no": []
} | static int FUNC_0(NBDClientSession *VAR_0,
NBDRequest *VAR_1,
QEMUIOVector *VAR_2)
{
int VAR_3;
int VAR_4 = HANDLE_TO_INDEX(VAR_0, VAR_1->handle);
VAR_0->requests[VAR_4].receiving = true;
qemu_coroutine_yield();
VAR_0->r... | [
"static int FUNC_0(NBDClientSession *VAR_0,\nNBDRequest *VAR_1,\nQEMUIOVector *VAR_2)\n{",
"int VAR_3;",
"int VAR_4 = HANDLE_TO_INDEX(VAR_0, VAR_1->handle);",
"VAR_0->requests[VAR_4].receiving = true;",
"qemu_coroutine_yield();",
"VAR_0->requests[VAR_4].receiving = false;",
"if (VAR_0->reply.handle != V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
51
],
[... |
2,176 | void ff_h264_init_cabac_states(const H264Context *h, H264SliceContext *sl)
{
int i;
const int8_t (*tab)[2];
const int slice_qp = av_clip(sl->qscale - 6*(h->sps.bit_depth_luma-8), 0, 51);
if (sl->slice_type_nos == AV_PICTURE_TYPE_I) tab = cabac_context_init_I;
else ... | false | FFmpeg | 3176217c60ca7828712985092d9102d331ea4f3d | void ff_h264_init_cabac_states(const H264Context *h, H264SliceContext *sl)
{
int i;
const int8_t (*tab)[2];
const int slice_qp = av_clip(sl->qscale - 6*(h->sps.bit_depth_luma-8), 0, 51);
if (sl->slice_type_nos == AV_PICTURE_TYPE_I) tab = cabac_context_init_I;
else ... | {
"code": [],
"line_no": []
} | void FUNC_0(const H264Context *VAR_0, H264SliceContext *VAR_1)
{
int VAR_2;
const FUNC_1 (*tab)[2];
const int VAR_3 = av_clip(VAR_1->qscale - 6*(VAR_0->sps.bit_depth_luma-8), 0, 51);
if (VAR_1->slice_type_nos == AV_PICTURE_TYPE_I) tab = cabac_context_init_I;
else ... | [
"void FUNC_0(const H264Context *VAR_0, H264SliceContext *VAR_1)\n{",
"int VAR_2;",
"const FUNC_1 (*tab)[2];",
"const int VAR_3 = av_clip(VAR_1->qscale - 6*(VAR_0->sps.bit_depth_luma-8), 0, 51);",
"if (VAR_1->slice_type_nos == AV_PICTURE_TYPE_I) tab = cabac_context_init_I;",
"else ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
21
],
[
23
],
[
27
],
[
29,
31
],
[
35
],
[
37
],
[
39
]
] |
2,177 | static int mov_read_udta(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
{
uint64_t end = url_ftell(pb) + atom.size;
while (url_ftell(pb) + 8 < end) {
uint32_t tag_size = get_be32(pb);
uint32_t tag = get_le32(pb);
uint64_t next = url_ftell(pb) + tag_size - 8;
... | false | FFmpeg | 4e240985d8b856e62e4e0377283138cf51cc398e | static int mov_read_udta(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
{
uint64_t end = url_ftell(pb) + atom.size;
while (url_ftell(pb) + 8 < end) {
uint32_t tag_size = get_be32(pb);
uint32_t tag = get_le32(pb);
uint64_t next = url_ftell(pb) + tag_size - 8;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOV_atom_t VAR_2)
{
uint64_t end = url_ftell(VAR_1) + VAR_2.size;
while (url_ftell(VAR_1) + 8 < end) {
uint32_t tag_size = get_be32(VAR_1);
uint32_t tag = get_le32(VAR_1);
uint64_t next = url_ftell(VAR_1) + tag_s... | [
"static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOV_atom_t VAR_2)\n{",
"uint64_t end = url_ftell(VAR_1) + VAR_2.size;",
"while (url_ftell(VAR_1) + 8 < end) {",
"uint32_t tag_size = get_be32(VAR_1);",
"uint32_t tag = get_le32(VAR_1);",
"uint64_t next = url_ftell(VAR_1) + tag_size - 8;"... | [
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
],
[
19,
21
],
[
25
],
[
27,
29
],
[
31
],
[
33,
35
],
[
37
],
[
39,
41
],
[
43
],
[
45,
47
],
[
49
],
[
51,
53... |
2,178 | static int usb_host_auto_scan(void *opaque, int bus_num, int addr, char *port,
int class_id, int vendor_id, int product_id,
const char *product_name, int speed)
{
struct USBAutoFilter *f;
struct USBHostDevice *s;
/* Ignore hubs */
if (... | false | qemu | 3ee886c5ba77a65d6b2c2a372a091d6796ed502b | static int usb_host_auto_scan(void *opaque, int bus_num, int addr, char *port,
int class_id, int vendor_id, int product_id,
const char *product_name, int speed)
{
struct USBAutoFilter *f;
struct USBHostDevice *s;
if (class_id == 9)
... | {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0, int VAR_1, int VAR_2, char *VAR_3,
int VAR_4, int VAR_5, int VAR_6,
const char *VAR_7, int VAR_8)
{
struct USBAutoFilter *VAR_9;
struct USBHostDevice *VAR_10;
if (VAR_4 == 9)
return 0;
QT... | [
"static int FUNC_0(void *VAR_0, int VAR_1, int VAR_2, char *VAR_3,\nint VAR_4, int VAR_5, int VAR_6,\nconst char *VAR_7, int VAR_8)\n{",
"struct USBAutoFilter *VAR_9;",
"struct USBHostDevice *VAR_10;",
"if (VAR_4 == 9)\nreturn 0;",
"QTAILQ_FOREACH(VAR_10, &hostdevs, next) {",
"VAR_9 = &VAR_10->match;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
17,
19
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
53
],
[... |
2,179 | static int disas_coproc_insn(DisasContext *s, uint32_t insn)
{
int cpnum, is64, crn, crm, opc1, opc2, isread, rt, rt2;
const ARMCPRegInfo *ri;
cpnum = (insn >> 8) & 0xf;
/* First check for coprocessor space used for XScale/iwMMXt insns */
if (arm_dc_feature(s, ARM_FEATURE_XSCALE) && (cpnum... | false | qemu | bd79255d2571a3c68820117caf94ea9afe1d527e | static int disas_coproc_insn(DisasContext *s, uint32_t insn)
{
int cpnum, is64, crn, crm, opc1, opc2, isread, rt, rt2;
const ARMCPRegInfo *ri;
cpnum = (insn >> 8) & 0xf;
if (arm_dc_feature(s, ARM_FEATURE_XSCALE) && (cpnum < 2)) {
if (extract32(s->c15_cpar, cpnum, 1) == 0) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0(DisasContext *VAR_0, uint32_t VAR_1)
{
int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;
const ARMCPRegInfo *VAR_11;
VAR_2 = (VAR_1 >> 8) & 0xf;
if (arm_dc_feature(VAR_0, ARM_FEATURE_XSCALE) && (VAR_2 < 2)) {
if (extract32(VAR_0->c15_cpar, VAR_... | [
"static int FUNC_0(DisasContext *VAR_0, uint32_t VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;",
"const ARMCPRegInfo *VAR_11;",
"VAR_2 = (VAR_1 >> 8) & 0xf;",
"if (arm_dc_feature(VAR_0, ARM_FEATURE_XSCALE) && (VAR_2 < 2)) {",
"if (extract32(VAR_0->c15_cpar, VAR_2, 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
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
43
],
[
45
],
[
49
],
[
51
],
[
55... |
2,180 | e1000_mmio_write(void *opaque, target_phys_addr_t addr, uint64_t val,
unsigned size)
{
E1000State *s = opaque;
unsigned int index = (addr & 0x1ffff) >> 2;
if (index < NWRITEOPS && macreg_writeops[index]) {
macreg_writeops[index](s, index, val);
} else if (index < NREADO... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | e1000_mmio_write(void *opaque, target_phys_addr_t addr, uint64_t val,
unsigned size)
{
E1000State *s = opaque;
unsigned int index = (addr & 0x1ffff) >> 2;
if (index < NWRITEOPS && macreg_writeops[index]) {
macreg_writeops[index](s, index, val);
} else if (index < NREADO... | {
"code": [],
"line_no": []
} | FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint64_t VAR_2,
unsigned VAR_3)
{
E1000State *s = VAR_0;
unsigned int VAR_4 = (VAR_1 & 0x1ffff) >> 2;
if (VAR_4 < NWRITEOPS && macreg_writeops[VAR_4]) {
macreg_writeops[VAR_4](s, VAR_4, VAR_2);
} else if (VAR_4 < NREADOPS &&... | [
"FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint64_t VAR_2,\nunsigned VAR_3)\n{",
"E1000State *s = VAR_0;",
"unsigned int VAR_4 = (VAR_1 & 0x1ffff) >> 2;",
"if (VAR_4 < NWRITEOPS && macreg_writeops[VAR_4]) {",
"macreg_writeops[VAR_4](s, VAR_4, VAR_2);",
"} else if (VAR_4 < NREADOPS && macreg_readops[VA... | [
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
]
] |
2,181 | socket_sockaddr_to_address_unix(struct sockaddr_storage *sa,
socklen_t salen,
Error **errp)
{
SocketAddress *addr;
struct sockaddr_un *su = (struct sockaddr_un *)sa;
addr = g_new0(SocketAddress, 1);
addr->type = SOCKET_ADDRESS_KIND... | false | qemu | 32bafa8fdd098d52fbf1102d5a5e48d29398c0aa | socket_sockaddr_to_address_unix(struct sockaddr_storage *sa,
socklen_t salen,
Error **errp)
{
SocketAddress *addr;
struct sockaddr_un *su = (struct sockaddr_un *)sa;
addr = g_new0(SocketAddress, 1);
addr->type = SOCKET_ADDRESS_KIND... | {
"code": [],
"line_no": []
} | FUNC_0(struct sockaddr_storage *VAR_0,
socklen_t VAR_1,
Error **VAR_2)
{
SocketAddress *addr;
struct sockaddr_un *VAR_3 = (struct sockaddr_un *)VAR_0;
addr = g_new0(SocketAddress, 1);
addr->type = SOCKET_ADDRESS_KIND_UNIX;
add... | [
"FUNC_0(struct sockaddr_storage *VAR_0,\nsocklen_t VAR_1,\nError **VAR_2)\n{",
"SocketAddress *addr;",
"struct sockaddr_un *VAR_3 = (struct sockaddr_un *)VAR_0;",
"addr = g_new0(SocketAddress, 1);",
"addr->type = SOCKET_ADDRESS_KIND_UNIX;",
"addr->u.q_unix = g_new0(UnixSocketAddress, 1);",
"if (VAR_3->s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
31
],
[
33
]
] |
2,184 | static int fetch_active_ports_list(QEMUFile *f, int version_id,
VirtIOSerial *s, uint32_t nr_active_ports)
{
uint32_t i;
s->post_load = g_malloc0(sizeof(*s->post_load));
s->post_load->nr_active_ports = nr_active_ports;
s->post_load->connected =
g_mallo... | false | qemu | 51b19ebe4320f3dcd93cea71235c1219318ddfd2 | static int fetch_active_ports_list(QEMUFile *f, int version_id,
VirtIOSerial *s, uint32_t nr_active_ports)
{
uint32_t i;
s->post_load = g_malloc0(sizeof(*s->post_load));
s->post_load->nr_active_ports = nr_active_ports;
s->post_load->connected =
g_mallo... | {
"code": [],
"line_no": []
} | static int FUNC_0(QEMUFile *VAR_0, int VAR_1,
VirtIOSerial *VAR_2, uint32_t VAR_3)
{
uint32_t i;
VAR_2->post_load = g_malloc0(sizeof(*VAR_2->post_load));
VAR_2->post_load->VAR_3 = VAR_3;
VAR_2->post_load->connected =
g_malloc0(sizeof(*VAR_2->post_load-... | [
"static int FUNC_0(QEMUFile *VAR_0, int VAR_1,\nVirtIOSerial *VAR_2, uint32_t VAR_3)\n{",
"uint32_t i;",
"VAR_2->post_load = g_malloc0(sizeof(*VAR_2->post_load));",
"VAR_2->post_load->VAR_3 = VAR_3;",
"VAR_2->post_load->connected =\ng_malloc0(sizeof(*VAR_2->post_load->connected) * VAR_3);",
"VAR_2->post_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
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15,
17
],
[
21,
23,
25
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
],
[
59... |
2,185 | void qdev_prop_set_globals_for_type(DeviceState *dev, const char *typename,
Error **errp)
{
GlobalProperty *prop;
QTAILQ_FOREACH(prop, &global_props, next) {
Error *err = NULL;
if (strcmp(typename, prop->driver) != 0) {
continue;
... | false | qemu | b3ce84fea466f3bca2ff85d158744f00c0f429bd | void qdev_prop_set_globals_for_type(DeviceState *dev, const char *typename,
Error **errp)
{
GlobalProperty *prop;
QTAILQ_FOREACH(prop, &global_props, next) {
Error *err = NULL;
if (strcmp(typename, prop->driver) != 0) {
continue;
... | {
"code": [],
"line_no": []
} | void FUNC_0(DeviceState *VAR_0, const char *VAR_1,
Error **VAR_2)
{
GlobalProperty *prop;
QTAILQ_FOREACH(prop, &global_props, next) {
Error *err = NULL;
if (strcmp(VAR_1, prop->driver) != 0) {
continue;
}
prop->not_used... | [
"void FUNC_0(DeviceState *VAR_0, const char *VAR_1,\nError **VAR_2)\n{",
"GlobalProperty *prop;",
"QTAILQ_FOREACH(prop, &global_props, next) {",
"Error *err = NULL;",
"if (strcmp(VAR_1, prop->driver) != 0) {",
"continue;",
"}",
"prop->not_used = false;",
"object_property_parse(OBJECT(VAR_0), prop->v... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
2,186 | void bdrv_set_in_use(BlockDriverState *bs, int in_use)
{
assert(bs->in_use != in_use);
bs->in_use = in_use;
}
| false | qemu | 3718d8ab65f68de2acccbe6a315907805f54e3cc | void bdrv_set_in_use(BlockDriverState *bs, int in_use)
{
assert(bs->in_use != in_use);
bs->in_use = in_use;
}
| {
"code": [],
"line_no": []
} | void FUNC_0(BlockDriverState *VAR_0, int VAR_1)
{
assert(VAR_0->VAR_1 != VAR_1);
VAR_0->VAR_1 = VAR_1;
}
| [
"void FUNC_0(BlockDriverState *VAR_0, int VAR_1)\n{",
"assert(VAR_0->VAR_1 != VAR_1);",
"VAR_0->VAR_1 = VAR_1;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
2,189 | static void qvirtio_scsi_stop(void)
{
qtest_end();
}
| false | qemu | a980f7f2c2f4d7e9a1eba4f804cd66dbd458b6d4 | static void qvirtio_scsi_stop(void)
{
qtest_end();
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
qtest_end();
}
| [
"static void FUNC_0(void)\n{",
"qtest_end();",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
2,191 | int qemu_aio_set_fd_handler(int fd,
IOHandler *io_read,
IOHandler *io_write,
AioFlushHandler *io_flush,
void *opaque)
{
AioHandler *node;
node = find_aio_handler(fd);
/* Are we deletin... | false | qemu | 72cf2d4f0e181d0d3a3122e04129c58a95da713e | int qemu_aio_set_fd_handler(int fd,
IOHandler *io_read,
IOHandler *io_write,
AioFlushHandler *io_flush,
void *opaque)
{
AioHandler *node;
node = find_aio_handler(fd);
if (!io_rea... | {
"code": [],
"line_no": []
} | int FUNC_0(int VAR_0,
IOHandler *VAR_1,
IOHandler *VAR_2,
AioFlushHandler *VAR_3,
void *VAR_4)
{
AioHandler *node;
node = find_aio_handler(VAR_0);
if (!VAR_1 && !VAR_2) {
... | [
"int FUNC_0(int VAR_0,\nIOHandler *VAR_1,\nIOHandler *VAR_2,\nAioFlushHandler *VAR_3,\nvoid *VAR_4)\n{",
"AioHandler *node;",
"node = find_aio_handler(VAR_0);",
"if (!VAR_1 && !VAR_2) {",
"if (node) {",
"if (walking_handlers)\nnode->deleted = 1;",
"else {",
"LIST_REMOVE(node, node);",
"qemu_free(nod... | [
0,
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
],
[
23
],
[
25
],
[
29,
31
],
[
33
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
57
],
[
59
],
[
61
],
[
63
],
[... |
2,192 | static pcibus_t pci_bar_address(PCIDevice *d,
int reg, uint8_t type, pcibus_t size)
{
pcibus_t new_addr, last_addr;
int bar = pci_bar(d, reg);
uint16_t cmd = pci_get_word(d->config + PCI_COMMAND);
if (type & PCI_BASE_ADDRESS_SPACE_IO) {
if (!(cmd & PCI_COMMAND_IO)) {
re... | false | qemu | e402463073ae51d00dc6cf98556e2f5c4b008a31 | static pcibus_t pci_bar_address(PCIDevice *d,
int reg, uint8_t type, pcibus_t size)
{
pcibus_t new_addr, last_addr;
int bar = pci_bar(d, reg);
uint16_t cmd = pci_get_word(d->config + PCI_COMMAND);
if (type & PCI_BASE_ADDRESS_SPACE_IO) {
if (!(cmd & PCI_COMMAND_IO)) {
re... | {
"code": [],
"line_no": []
} | static pcibus_t FUNC_0(PCIDevice *d,
int reg, uint8_t type, pcibus_t size)
{
pcibus_t new_addr, last_addr;
int VAR_0 = pci_bar(d, reg);
uint16_t cmd = pci_get_word(d->config + PCI_COMMAND);
if (type & PCI_BASE_ADDRESS_SPACE_IO) {
if (!(cmd & PCI_COMMAND_IO)) {
return PC... | [
"static pcibus_t FUNC_0(PCIDevice *d,\nint reg, uint8_t type, pcibus_t size)\n{",
"pcibus_t new_addr, last_addr;",
"int VAR_0 = pci_bar(d, reg);",
"uint16_t cmd = pci_get_word(d->config + PCI_COMMAND);",
"if (type & PCI_BASE_ADDRESS_SPACE_IO) {",
"if (!(cmd & PCI_COMMAND_IO)) {",
"return PCI_BAR_UNMAPPE... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
2,193 | static void pc_dimm_check_memdev_is_busy(Object *obj, const char *name,
Object *val, Error **errp)
{
MemoryRegion *mr;
Error *local_err = NULL;
mr = host_memory_backend_get_memory(MEMORY_BACKEND(val), &local_err);
if (local_err) {
goto out;
}
... | false | qemu | 2aece63c8a9d2c3a8ff41d2febc4cdeff2633331 | static void pc_dimm_check_memdev_is_busy(Object *obj, const char *name,
Object *val, Error **errp)
{
MemoryRegion *mr;
Error *local_err = NULL;
mr = host_memory_backend_get_memory(MEMORY_BACKEND(val), &local_err);
if (local_err) {
goto out;
}
... | {
"code": [],
"line_no": []
} | static void FUNC_0(Object *VAR_0, const char *VAR_1,
Object *VAR_2, Error **VAR_3)
{
MemoryRegion *mr;
Error *local_err = NULL;
mr = host_memory_backend_get_memory(MEMORY_BACKEND(VAR_2), &local_err);
if (local_err) {
goto out;
}
if (memory... | [
"static void FUNC_0(Object *VAR_0, const char *VAR_1,\nObject *VAR_2, Error **VAR_3)\n{",
"MemoryRegion *mr;",
"Error *local_err = NULL;",
"mr = host_memory_backend_get_memory(MEMORY_BACKEND(VAR_2), &local_err);",
"if (local_err) {",
"goto out;",
"}",
"if (memory_region_is_mapped(mr)) {",
"char *VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37,
39
],
[
41
]
] |
2,194 | static int vhdx_parse_log(BlockDriverState *bs, BDRVVHDXState *s)
{
int ret = 0;
int i;
VHDXHeader *hdr;
hdr = s->headers[s->curr_header];
/* either the log guid, or log length is zero,
* then a replay log is present */
for (i = 0; i < sizeof(hdr->log_guid.data4); i++) {
... | false | qemu | 0a43a1b5d7c33208120eeb2d98ebb9ab15dc2c87 | static int vhdx_parse_log(BlockDriverState *bs, BDRVVHDXState *s)
{
int ret = 0;
int i;
VHDXHeader *hdr;
hdr = s->headers[s->curr_header];
for (i = 0; i < sizeof(hdr->log_guid.data4); i++) {
ret |= hdr->log_guid.data4[i];
}
if (hdr->log_guid.data1 == 0 &&
... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, BDRVVHDXState *VAR_1)
{
int VAR_2 = 0;
int VAR_3;
VHDXHeader *hdr;
hdr = VAR_1->headers[VAR_1->curr_header];
for (VAR_3 = 0; VAR_3 < sizeof(hdr->log_guid.data4); VAR_3++) {
VAR_2 |= hdr->log_guid.data4[VAR_3];
}
if (hdr-... | [
"static int FUNC_0(BlockDriverState *VAR_0, BDRVVHDXState *VAR_1)\n{",
"int VAR_2 = 0;",
"int VAR_3;",
"VHDXHeader *hdr;",
"hdr = VAR_1->headers[VAR_1->curr_header];",
"for (VAR_3 = 0; VAR_3 < sizeof(hdr->log_guid.data4); VAR_3++) {",
"VAR_2 |= hdr->log_guid.data4[VAR_3];",
"}",
"if (hdr->log_guid.d... | [
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
],
[
21
],
[
23
],
[
25
],
[
27,
29,
31,
33
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
],
[
57
],
[... |
2,196 | static void vfio_unmap_bar(VFIOPCIDevice *vdev, int nr)
{
VFIOBAR *bar = &vdev->bars[nr];
if (!bar->region.size) {
return;
}
vfio_bar_quirk_teardown(vdev, nr);
memory_region_del_subregion(&bar->region.mem, &bar->region.mmap_mem);
munmap(bar->region.mmap, memory_region_size(... | false | qemu | ba5e6bfa1aee29a8f72c5538c565dfb9889cf273 | static void vfio_unmap_bar(VFIOPCIDevice *vdev, int nr)
{
VFIOBAR *bar = &vdev->bars[nr];
if (!bar->region.size) {
return;
}
vfio_bar_quirk_teardown(vdev, nr);
memory_region_del_subregion(&bar->region.mem, &bar->region.mmap_mem);
munmap(bar->region.mmap, memory_region_size(... | {
"code": [],
"line_no": []
} | static void FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1)
{
VFIOBAR *bar = &VAR_0->bars[VAR_1];
if (!bar->region.size) {
return;
}
vfio_bar_quirk_teardown(VAR_0, VAR_1);
memory_region_del_subregion(&bar->region.mem, &bar->region.mmap_mem);
munmap(bar->region.mmap, memory_region_s... | [
"static void FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1)\n{",
"VFIOBAR *bar = &VAR_0->bars[VAR_1];",
"if (!bar->region.size) {",
"return;",
"}",
"vfio_bar_quirk_teardown(VAR_0, VAR_1);",
"memory_region_del_subregion(&bar->region.mem, &bar->region.mmap_mem);",
"munmap(bar->region.mmap, memory_region_size(&... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
2,197 | static void pmac_ide_writeb (void *opaque,
target_phys_addr_t addr, uint32_t val)
{
MACIOIDEState *d = opaque;
addr = (addr & 0xFFF) >> 4;
switch (addr) {
case 1 ... 7:
ide_ioport_write(&d->bus, addr, val);
break;
case 8:
case 22:
... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void pmac_ide_writeb (void *opaque,
target_phys_addr_t addr, uint32_t val)
{
MACIOIDEState *d = opaque;
addr = (addr & 0xFFF) >> 4;
switch (addr) {
case 1 ... 7:
ide_ioport_write(&d->bus, addr, val);
break;
case 8:
case 22:
... | {
"code": [],
"line_no": []
} | static void FUNC_0 (void *VAR_0,
target_phys_addr_t VAR_1, uint32_t VAR_2)
{
MACIOIDEState *d = VAR_0;
VAR_1 = (VAR_1 & 0xFFF) >> 4;
switch (VAR_1) {
case 1 ... 7:
ide_ioport_write(&d->bus, VAR_1, VAR_2);
break;
case 8:
case 22:
i... | [
"static void FUNC_0 (void *VAR_0,\ntarget_phys_addr_t VAR_1, uint32_t VAR_2)\n{",
"MACIOIDEState *d = VAR_0;",
"VAR_1 = (VAR_1 & 0xFFF) >> 4;",
"switch (VAR_1) {",
"case 1 ... 7:\nide_ioport_write(&d->bus, VAR_1, VAR_2);",
"break;",
"case 8:\ncase 22:\nide_cmd_write(&d->bus, 0, VAR_2);",
"break;",
"... | [
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
]
] |
2,198 | static int MPA_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr)
{
MpegAudioContext *s = avctx->priv_data;
const int16_t *samples = (const int16_t *)frame->data[0];
short smr[MPA_MAX_CHANNELS][SBLIMIT];
unsigned char bit_all... | false | FFmpeg | 2df0c32ea12ddfa72ba88309812bfb13b674130f | static int MPA_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr)
{
MpegAudioContext *s = avctx->priv_data;
const int16_t *samples = (const int16_t *)frame->data[0];
short smr[MPA_MAX_CHANNELS][SBLIMIT];
unsigned char bit_all... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,
const AVFrame *VAR_2, int *VAR_3)
{
MpegAudioContext *s = VAR_0->priv_data;
const int16_t *VAR_4 = (const int16_t *)VAR_2->data[0];
short VAR_5[MPA_MAX_CHANNELS][SBLIMIT];
unsigned char VAR_6[MPA_MAX_CHANNELS][SB... | [
"static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,\nconst AVFrame *VAR_2, int *VAR_3)\n{",
"MpegAudioContext *s = VAR_0->priv_data;",
"const int16_t *VAR_4 = (const int16_t *)VAR_2->data[0];",
"short VAR_5[MPA_MAX_CHANNELS][SBLIMIT];",
"unsigned char VAR_6[MPA_MAX_CHANNELS][SBLIMIT];",
"int 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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
... |
2,199 | int vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb)
{
av_log(avctx, AV_LOG_DEBUG, "Header: %0X\n", show_bits(gb, 32));
v->profile = get_bits(gb, 2);
if (v->profile == PROFILE_COMPLEX)
{
av_log(avctx, AV_LOG_WARNING, "WMV3 Complex Profile is not fully sup... | false | FFmpeg | f8bed30d8b176fa030f6737765338bb4a2bcabc9 | int vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb)
{
av_log(avctx, AV_LOG_DEBUG, "Header: %0X\n", show_bits(gb, 32));
v->profile = get_bits(gb, 2);
if (v->profile == PROFILE_COMPLEX)
{
av_log(avctx, AV_LOG_WARNING, "WMV3 Complex Profile is not fully sup... | {
"code": [],
"line_no": []
} | int FUNC_0(AVCodecContext *VAR_0, VC1Context *VAR_1, GetBitContext *VAR_2)
{
av_log(VAR_0, AV_LOG_DEBUG, "Header: %0X\n", show_bits(VAR_2, 32));
VAR_1->profile = get_bits(VAR_2, 2);
if (VAR_1->profile == PROFILE_COMPLEX)
{
av_log(VAR_0, AV_LOG_WARNING, "WMV3 Complex Profile is not fully su... | [
"int FUNC_0(AVCodecContext *VAR_0, VC1Context *VAR_1, GetBitContext *VAR_2)\n{",
"av_log(VAR_0, AV_LOG_DEBUG, \"Header: %0X\\n\", show_bits(VAR_2, 32));",
"VAR_1->profile = get_bits(VAR_2, 2);",
"if (VAR_1->profile == PROFILE_COMPLEX)\n{",
"av_log(VAR_0, AV_LOG_WARNING, \"WMV3 Complex Profile is not fully s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13
],
[
15
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.