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 |
|---|---|---|---|---|---|---|---|---|---|---|
1,105 | static int mss4_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
MSS4Context *c = avctx->priv_data;
GetBitContext gb;
GetByteContext bc;
uint8_t *dst[3];
int ... | false | FFmpeg | 418be7ceb4717e88b2914a542b68c2c5aba5d677 | static int mss4_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
MSS4Context *c = avctx->priv_data;
GetBitContext gb;
GetByteContext bc;
uint8_t *dst[3];
int ... | {
"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;
MSS4Context *c = VAR_0->priv_data;
GetBitContext gb;
GetByteContext bc;
uint8_t *dst[3];
int VAR_6, VAR_7, ... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"MSS4Context *c = VAR_0->priv_data;",
"GetBitContext gb;",
"GetByteContext bc;",
"uint8_t *dst[3];",
"int VAR_6, VAR_7, VAR_8, VAR_9;",
"int 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
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29,
31,
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
1,106 | static void guest_phys_blocks_region_add(MemoryListener *listener,
MemoryRegionSection *section)
{
GuestPhysListener *g;
uint64_t section_size;
hwaddr target_start, target_end;
uint8_t *host_addr;
GuestPhysBlock *predecessor;
/* we only care abo... | false | qemu | 21e00fa55f3fdfcbb20da7c6876c91ef3609b387 | static void guest_phys_blocks_region_add(MemoryListener *listener,
MemoryRegionSection *section)
{
GuestPhysListener *g;
uint64_t section_size;
hwaddr target_start, target_end;
uint8_t *host_addr;
GuestPhysBlock *predecessor;
if (!memory_r... | {
"code": [],
"line_no": []
} | static void FUNC_0(MemoryListener *VAR_0,
MemoryRegionSection *VAR_1)
{
GuestPhysListener *g;
uint64_t section_size;
hwaddr target_start, target_end;
uint8_t *host_addr;
GuestPhysBlock *predecessor;
if (!memory_region_is_ram(VAR_1->mr) ||
... | [
"static void FUNC_0(MemoryListener *VAR_0,\nMemoryRegionSection *VAR_1)\n{",
"GuestPhysListener *g;",
"uint64_t section_size;",
"hwaddr target_start, target_end;",
"uint8_t *host_addr;",
"GuestPhysBlock *predecessor;",
"if (!memory_region_is_ram(VAR_1->mr) ||\nmemory_region_is_skip_dump(VAR_1->mr)) {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
21,
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
49
],
[
51
],
[
55
],
[... |
1,109 | InputEvent *replay_read_input_event(void)
{
InputEvent evt;
KeyValue keyValue;
InputKeyEvent key;
key.key = &keyValue;
InputBtnEvent btn;
InputMoveEvent rel;
InputMoveEvent abs;
evt.type = replay_get_dword();
switch (evt.type) {
case INPUT_EVENT_KIND_KEY:
ev... | false | qemu | 32bafa8fdd098d52fbf1102d5a5e48d29398c0aa | InputEvent *replay_read_input_event(void)
{
InputEvent evt;
KeyValue keyValue;
InputKeyEvent key;
key.key = &keyValue;
InputBtnEvent btn;
InputMoveEvent rel;
InputMoveEvent abs;
evt.type = replay_get_dword();
switch (evt.type) {
case INPUT_EVENT_KIND_KEY:
ev... | {
"code": [],
"line_no": []
} | InputEvent *FUNC_0(void)
{
InputEvent evt;
KeyValue keyValue;
InputKeyEvent key;
key.key = &keyValue;
InputBtnEvent btn;
InputMoveEvent rel;
InputMoveEvent abs;
evt.type = replay_get_dword();
switch (evt.type) {
case INPUT_EVENT_KIND_KEY:
evt.u.key = &key;
... | [
"InputEvent *FUNC_0(void)\n{",
"InputEvent evt;",
"KeyValue keyValue;",
"InputKeyEvent key;",
"key.key = &keyValue;",
"InputBtnEvent btn;",
"InputMoveEvent rel;",
"InputMoveEvent abs;",
"evt.type = replay_get_dword();",
"switch (evt.type) {",
"case INPUT_EVENT_KIND_KEY:\nevt.u.key = &key;",
"e... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
47
],
[... |
1,110 | build_fadt(GArray *table_data, GArray *linker, AcpiPmInfo *pm,
unsigned facs, unsigned dsdt)
{
AcpiFadtDescriptorRev1 *fadt = acpi_data_push(table_data, sizeof(*fadt));
fadt->firmware_ctrl = cpu_to_le32(facs);
/* FACS address to be filled by Guest linker */
bios_linker_loader_add_poin... | false | qemu | 37ad223c515da2fe9f1c679768cb5ccaa42e57e1 | build_fadt(GArray *table_data, GArray *linker, AcpiPmInfo *pm,
unsigned facs, unsigned dsdt)
{
AcpiFadtDescriptorRev1 *fadt = acpi_data_push(table_data, sizeof(*fadt));
fadt->firmware_ctrl = cpu_to_le32(facs);
bios_linker_loader_add_pointer(linker, ACPI_BUILD_TABLE_FILE,
... | {
"code": [],
"line_no": []
} | FUNC_0(GArray *VAR_0, GArray *VAR_1, AcpiPmInfo *VAR_2,
unsigned VAR_3, unsigned VAR_4)
{
AcpiFadtDescriptorRev1 *fadt = acpi_data_push(VAR_0, sizeof(*fadt));
fadt->firmware_ctrl = cpu_to_le32(VAR_3);
bios_linker_loader_add_pointer(VAR_1, ACPI_BUILD_TABLE_FILE,
... | [
"FUNC_0(GArray *VAR_0, GArray *VAR_1, AcpiPmInfo *VAR_2,\nunsigned VAR_3, unsigned VAR_4)\n{",
"AcpiFadtDescriptorRev1 *fadt = acpi_data_push(VAR_0, sizeof(*fadt));",
"fadt->firmware_ctrl = cpu_to_le32(VAR_3);",
"bios_linker_loader_add_pointer(VAR_1, ACPI_BUILD_TABLE_FILE,\nACPI_BUILD_TABLE_FILE,\nVAR_0, &fad... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
15,
17,
19,
21
],
[
25
],
[
29,
31,
33,
35
],
[
39
],
[
43,
45
],
[
47
]
] |
1,111 | vpc_co_pwritev(BlockDriverState *bs, uint64_t offset, uint64_t bytes,
QEMUIOVector *qiov, int flags)
{
BDRVVPCState *s = bs->opaque;
int64_t image_offset;
int64_t n_bytes;
int64_t bytes_done = 0;
int ret;
VHDFooter *footer = (VHDFooter *) s->footer_buf;
QEMUIOVector ... | false | qemu | a03ef88f77af045a2eb9629b5ce774a3fb973c5e | vpc_co_pwritev(BlockDriverState *bs, uint64_t offset, uint64_t bytes,
QEMUIOVector *qiov, int flags)
{
BDRVVPCState *s = bs->opaque;
int64_t image_offset;
int64_t n_bytes;
int64_t bytes_done = 0;
int ret;
VHDFooter *footer = (VHDFooter *) s->footer_buf;
QEMUIOVector ... | {
"code": [],
"line_no": []
} | FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1, uint64_t VAR_2,
QEMUIOVector *VAR_3, int VAR_4)
{
BDRVVPCState *s = VAR_0->opaque;
int64_t image_offset;
int64_t n_bytes;
int64_t bytes_done = 0;
int VAR_5;
VHDFooter *footer = (VHDFooter *) s->footer_buf;
QEMUIOVector ... | [
"FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1, uint64_t VAR_2,\nQEMUIOVector *VAR_3, int VAR_4)\n{",
"BDRVVPCState *s = VAR_0->opaque;",
"int64_t image_offset;",
"int64_t n_bytes;",
"int64_t bytes_done = 0;",
"int VAR_5;",
"VHDFooter *footer = (VHDFooter *) s->footer_buf;",
"QEMUIOVector local_qiov... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[... |
1,112 | static int debugcon_parse(const char *devname)
{
QemuOpts *opts;
if (!qemu_chr_new("debugcon", devname, NULL)) {
exit(1);
}
opts = qemu_opts_create(qemu_find_opts("device"), "debugcon", 1, NULL);
if (!opts) {
fprintf(stderr, "qemu: already have a debugcon device\n");
... | false | qemu | f61eddcb2bb5cbbdd1d911b7e937db9affc29028 | static int debugcon_parse(const char *devname)
{
QemuOpts *opts;
if (!qemu_chr_new("debugcon", devname, NULL)) {
exit(1);
}
opts = qemu_opts_create(qemu_find_opts("device"), "debugcon", 1, NULL);
if (!opts) {
fprintf(stderr, "qemu: already have a debugcon device\n");
... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0)
{
QemuOpts *opts;
if (!qemu_chr_new("debugcon", VAR_0, NULL)) {
exit(1);
}
opts = qemu_opts_create(qemu_find_opts("device"), "debugcon", 1, NULL);
if (!opts) {
fprintf(stderr, "qemu: already have a debugcon device\n");
exit(1);
... | [
"static int FUNC_0(const char *VAR_0)\n{",
"QemuOpts *opts;",
"if (!qemu_chr_new(\"debugcon\", VAR_0, NULL)) {",
"exit(1);",
"}",
"opts = qemu_opts_create(qemu_find_opts(\"device\"), \"debugcon\", 1, NULL);",
"if (!opts) {",
"fprintf(stderr, \"qemu: already have a debugcon device\\n\");",
"exit(1);"... | [
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
]
] |
1,113 | static void qemu_rbd_parse_filename(const char *filename, QDict *options,
Error **errp)
{
const char *start;
char *p, *buf, *keypairs;
char *found_str;
size_t max_keypair_size;
Error *local_err = NULL;
if (!strstart(filename, "rbd:", &start)) {
... | false | qemu | 730b00bbfdc15f914f47e03a703fa7647c10c4a9 | static void qemu_rbd_parse_filename(const char *filename, QDict *options,
Error **errp)
{
const char *start;
char *p, *buf, *keypairs;
char *found_str;
size_t max_keypair_size;
Error *local_err = NULL;
if (!strstart(filename, "rbd:", &start)) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0(const char *VAR_0, QDict *VAR_1,
Error **VAR_2)
{
const char *VAR_3;
char *VAR_4, *VAR_5, *VAR_6;
char *VAR_7;
size_t max_keypair_size;
Error *local_err = NULL;
if (!strstart(VAR_0, "rbd:", &VAR_3)) {
error_setg(VAR_2, "Fi... | [
"static void FUNC_0(const char *VAR_0, QDict *VAR_1,\nError **VAR_2)\n{",
"const char *VAR_3;",
"char *VAR_4, *VAR_5, *VAR_6;",
"char *VAR_7;",
"size_t max_keypair_size;",
"Error *local_err = NULL;",
"if (!strstart(VAR_0, \"rbd:\", &VAR_3)) {",
"error_setg(VAR_2, \"File VAR_8 must VAR_3 with 'rbd:'\")... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
1,114 | static void register_multipage(MemoryRegionSection *section)
{
target_phys_addr_t start_addr = section->offset_within_address_space;
ram_addr_t size = section->size;
target_phys_addr_t addr;
uint16_t section_index = phys_section_add(section);
assert(size);
addr = start_addr;
phys... | false | qemu | ac1970fbe8ad5a70174f462109ac0f6c7bf1bc43 | static void register_multipage(MemoryRegionSection *section)
{
target_phys_addr_t start_addr = section->offset_within_address_space;
ram_addr_t size = section->size;
target_phys_addr_t addr;
uint16_t section_index = phys_section_add(section);
assert(size);
addr = start_addr;
phys... | {
"code": [],
"line_no": []
} | static void FUNC_0(MemoryRegionSection *VAR_0)
{
target_phys_addr_t start_addr = VAR_0->offset_within_address_space;
ram_addr_t size = VAR_0->size;
target_phys_addr_t addr;
uint16_t section_index = phys_section_add(VAR_0);
assert(size);
addr = start_addr;
phys_page_set(addr >> TA... | [
"static void FUNC_0(MemoryRegionSection *VAR_0)\n{",
"target_phys_addr_t start_addr = VAR_0->offset_within_address_space;",
"ram_addr_t size = VAR_0->size;",
"target_phys_addr_t addr;",
"uint16_t section_index = phys_section_add(VAR_0);",
"assert(size);",
"addr = start_addr;",
"phys_page_set(addr >> T... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21,
23
],
[
25
]
] |
1,115 | static int gdb_breakpoint_insert(CPUState *env, target_ulong addr,
target_ulong len, int type)
{
switch (type) {
case GDB_BREAKPOINT_SW:
case GDB_BREAKPOINT_HW:
return cpu_breakpoint_insert(env, addr, BP_GDB, NULL);
#ifndef CONFIG_USER_ONLY
case GDB_WATCH... | false | qemu | 880a7578381d1c7ed4d41c7599ae3cc06567a824 | static int gdb_breakpoint_insert(CPUState *env, target_ulong addr,
target_ulong len, int type)
{
switch (type) {
case GDB_BREAKPOINT_SW:
case GDB_BREAKPOINT_HW:
return cpu_breakpoint_insert(env, addr, BP_GDB, NULL);
#ifndef CONFIG_USER_ONLY
case GDB_WATCH... | {
"code": [],
"line_no": []
} | static int FUNC_0(CPUState *VAR_0, target_ulong VAR_1,
target_ulong VAR_2, int VAR_3)
{
switch (VAR_3) {
case GDB_BREAKPOINT_SW:
case GDB_BREAKPOINT_HW:
return cpu_breakpoint_insert(VAR_0, VAR_1, BP_GDB, NULL);
#ifndef CONFIG_USER_ONLY
case GDB_WATCHPOINT... | [
"static int FUNC_0(CPUState *VAR_0, target_ulong VAR_1,\ntarget_ulong VAR_2, int VAR_3)\n{",
"switch (VAR_3) {",
"case GDB_BREAKPOINT_SW:\ncase GDB_BREAKPOINT_HW:\nreturn cpu_breakpoint_insert(VAR_0, VAR_1, BP_GDB, NULL);",
"#ifndef CONFIG_USER_ONLY\ncase GDB_WATCHPOINT_WRITE:\ncase GDB_WATCHPOINT_READ:\ncase... | [
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
]
] |
1,116 | ResampleContext *ff_audio_resample_init(AVAudioResampleContext *avr)
{
ResampleContext *c;
int out_rate = avr->out_sample_rate;
int in_rate = avr->in_sample_rate;
double factor = FFMIN(out_rate * avr->cutoff / in_rate, 1.0);
int phase_count = 1 << avr->phase_shift;
int felem_size... | false | FFmpeg | be394968c81019887ef996a78a526bdd85d1e216 | ResampleContext *ff_audio_resample_init(AVAudioResampleContext *avr)
{
ResampleContext *c;
int out_rate = avr->out_sample_rate;
int in_rate = avr->in_sample_rate;
double factor = FFMIN(out_rate * avr->cutoff / in_rate, 1.0);
int phase_count = 1 << avr->phase_shift;
int felem_size... | {
"code": [],
"line_no": []
} | ResampleContext *FUNC_0(AVAudioResampleContext *avr)
{
ResampleContext *c;
int VAR_0 = avr->out_sample_rate;
int VAR_1 = avr->in_sample_rate;
double VAR_2 = FFMIN(VAR_0 * avr->cutoff / VAR_1, 1.0);
int VAR_3 = 1 << avr->phase_shift;
int VAR_4;
if (avr->internal_sample_fmt ... | [
"ResampleContext *FUNC_0(AVAudioResampleContext *avr)\n{",
"ResampleContext *c;",
"int VAR_0 = avr->out_sample_rate;",
"int VAR_1 = avr->in_sample_rate;",
"double VAR_2 = FFMIN(VAR_0 * avr->cutoff / VAR_1, 1.0);",
"int VAR_3 = 1 << avr->phase_shift;",
"int VAR_4;",
"if (avr->internal_sample_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,
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
],
[
45
],
[
47
],
[
49
],
[
51
... |
1,117 | static inline void stl_phys_internal(target_phys_addr_t addr, uint32_t val,
enum device_endian endian)
{
uint8_t *ptr;
MemoryRegionSection *section;
section = phys_page_find(addr >> TARGET_PAGE_BITS);
if (!memory_region_is_ram(section->mr) || section->reado... | false | qemu | ac1970fbe8ad5a70174f462109ac0f6c7bf1bc43 | static inline void stl_phys_internal(target_phys_addr_t addr, uint32_t val,
enum device_endian endian)
{
uint8_t *ptr;
MemoryRegionSection *section;
section = phys_page_find(addr >> TARGET_PAGE_BITS);
if (!memory_region_is_ram(section->mr) || section->reado... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(target_phys_addr_t VAR_0, uint32_t VAR_1,
enum device_endian VAR_2)
{
uint8_t *ptr;
MemoryRegionSection *section;
section = phys_page_find(VAR_0 >> TARGET_PAGE_BITS);
if (!memory_region_is_ram(section->mr) || section->readonly) {
... | [
"static inline void FUNC_0(target_phys_addr_t VAR_0, uint32_t VAR_1,\nenum device_endian VAR_2)\n{",
"uint8_t *ptr;",
"MemoryRegionSection *section;",
"section = phys_page_find(VAR_0 >> TARGET_PAGE_BITS);",
"if (!memory_region_is_ram(section->mr) || section->readonly) {",
"VAR_0 = memory_region_section_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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
... |
1,118 | static int usb_hub_handle_control(USBDevice *dev, int request, int value,
int index, int length, uint8_t *data)
{
USBHubState *s = (USBHubState *)dev;
int ret;
ret = usb_desc_handle_control(dev, request, value, index, length, data);
if (ret >= 0) {
retu... | false | qemu | a980a065fb5e86d6dec337e6cb6ff432f1a143c9 | static int usb_hub_handle_control(USBDevice *dev, int request, int value,
int index, int length, uint8_t *data)
{
USBHubState *s = (USBHubState *)dev;
int ret;
ret = usb_desc_handle_control(dev, request, value, index, length, data);
if (ret >= 0) {
retu... | {
"code": [],
"line_no": []
} | static int FUNC_0(USBDevice *VAR_0, int VAR_1, int VAR_2,
int VAR_3, int VAR_4, uint8_t *VAR_5)
{
USBHubState *s = (USBHubState *)VAR_0;
int VAR_6;
VAR_6 = usb_desc_handle_control(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5);
if (VAR_6 >= 0) {
return VAR_6... | [
"static int FUNC_0(USBDevice *VAR_0, int VAR_1, int VAR_2,\nint VAR_3, int VAR_4, uint8_t *VAR_5)\n{",
"USBHubState *s = (USBHubState *)VAR_0;",
"int VAR_6;",
"VAR_6 = usb_desc_handle_control(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5);",
"if (VAR_6 >= 0) {",
"return VAR_6;",
"}",
"switch(VAR_1) {",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25,
27,
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
1,120 | void nbd_client_close(BlockDriverState *bs)
{
NbdClientSession *client = nbd_get_client_session(bs);
struct nbd_request request = {
.type = NBD_CMD_DISC,
.from = 0,
.len = 0
};
if (client->ioc == NULL) {
return;
}
nbd_send_request(client->ioc, &requ... | false | qemu | b626b51a6721e53817155af720243f59072e424f | void nbd_client_close(BlockDriverState *bs)
{
NbdClientSession *client = nbd_get_client_session(bs);
struct nbd_request request = {
.type = NBD_CMD_DISC,
.from = 0,
.len = 0
};
if (client->ioc == NULL) {
return;
}
nbd_send_request(client->ioc, &requ... | {
"code": [],
"line_no": []
} | void FUNC_0(BlockDriverState *VAR_0)
{
NbdClientSession *client = nbd_get_client_session(VAR_0);
struct nbd_request VAR_1 = {
.type = NBD_CMD_DISC,
.from = 0,
.len = 0
};
if (client->ioc == NULL) {
return;
}
nbd_send_request(client->ioc, &VAR_1);
... | [
"void FUNC_0(BlockDriverState *VAR_0)\n{",
"NbdClientSession *client = nbd_get_client_session(VAR_0);",
"struct nbd_request VAR_1 = {",
".type = NBD_CMD_DISC,\n.from = 0,\n.len = 0\n};",
"if (client->ioc == NULL) {",
"return;",
"}",
"nbd_send_request(client->ioc, &VAR_1);",
"nbd_teardown_connection(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11,
13,
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
33
]
] |
1,123 | static int handle_tsch(S390CPU *cpu)
{
CPUS390XState *env = &cpu->env;
CPUState *cs = CPU(cpu);
struct kvm_run *run = cs->kvm_run;
int ret;
cpu_synchronize_state(cs);
ret = ioinst_handle_tsch(env, env->regs[1], run->s390_tsch.ipb);
if (ret >= 0) {
/* Success; set conditi... | false | qemu | de13d2161473d02ae97ec0f8e4503147554892dd | static int handle_tsch(S390CPU *cpu)
{
CPUS390XState *env = &cpu->env;
CPUState *cs = CPU(cpu);
struct kvm_run *run = cs->kvm_run;
int ret;
cpu_synchronize_state(cs);
ret = ioinst_handle_tsch(env, env->regs[1], run->s390_tsch.ipb);
if (ret >= 0) {
setcc(cpu, re... | {
"code": [],
"line_no": []
} | static int FUNC_0(S390CPU *VAR_0)
{
CPUS390XState *env = &VAR_0->env;
CPUState *cs = CPU(VAR_0);
struct kvm_run *VAR_1 = cs->kvm_run;
int VAR_2;
cpu_synchronize_state(cs);
VAR_2 = ioinst_handle_tsch(env, env->regs[1], VAR_1->s390_tsch.ipb);
if (VAR_2 >= 0) {
se... | [
"static int FUNC_0(S390CPU *VAR_0)\n{",
"CPUS390XState *env = &VAR_0->env;",
"CPUState *cs = CPU(VAR_0);",
"struct kvm_run *VAR_1 = cs->kvm_run;",
"int VAR_2;",
"cpu_synchronize_state(cs);",
"VAR_2 = ioinst_handle_tsch(env, env->regs[1], VAR_1->s390_tsch.ipb);",
"if (VAR_2 >= 0) {",
"setcc(VAR_0, VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49,
51
],
[
55,
57,
59,
61,... |
1,124 | static int read_password(char *buf, int buf_size)
{
uint8_t ch;
int i, ret;
printf("password: ");
fflush(stdout);
term_init();
i = 0;
for(;;) {
ret = read(0, &ch, 1);
if (ret == -1) {
if (errno == EAGAIN || errno == EINTR) {
continue;... | false | qemu | d57e4e482e3997b1382625c84149ad0b69155fc0 | static int read_password(char *buf, int buf_size)
{
uint8_t ch;
int i, ret;
printf("password: ");
fflush(stdout);
term_init();
i = 0;
for(;;) {
ret = read(0, &ch, 1);
if (ret == -1) {
if (errno == EAGAIN || errno == EINTR) {
continue;... | {
"code": [],
"line_no": []
} | static int FUNC_0(char *VAR_0, int VAR_1)
{
uint8_t ch;
int VAR_2, VAR_3;
printf("password: ");
fflush(stdout);
term_init();
VAR_2 = 0;
for(;;) {
VAR_3 = read(0, &ch, 1);
if (VAR_3 == -1) {
if (errno == EAGAIN || errno == EINTR) {
con... | [
"static int FUNC_0(char *VAR_0, int VAR_1)\n{",
"uint8_t ch;",
"int VAR_2, VAR_3;",
"printf(\"password: \");",
"fflush(stdout);",
"term_init();",
"VAR_2 = 0;",
"for(;;) {",
"VAR_3 = read(0, &ch, 1);",
"if (VAR_3 == -1) {",
"if (errno == EAGAIN || errno == EINTR) {",
"continue;",
"} else {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43... |
1,125 | static uint64_t exynos4210_rtc_read(void *opaque, target_phys_addr_t offset,
unsigned size)
{
uint32_t value = 0;
Exynos4210RTCState *s = (Exynos4210RTCState *)opaque;
switch (offset) {
case INTP:
value = s->reg_intp;
break;
case RTCCON:
value = s->reg_rtc... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t exynos4210_rtc_read(void *opaque, target_phys_addr_t offset,
unsigned size)
{
uint32_t value = 0;
Exynos4210RTCState *s = (Exynos4210RTCState *)opaque;
switch (offset) {
case INTP:
value = s->reg_intp;
break;
case RTCCON:
value = s->reg_rtc... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t offset,
unsigned size)
{
uint32_t value = 0;
Exynos4210RTCState *s = (Exynos4210RTCState *)opaque;
switch (offset) {
case INTP:
value = s->reg_intp;
break;
case RTCCON:
value = s->reg_rtccon;
... | [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t offset,\nunsigned size)\n{",
"uint32_t value = 0;",
"Exynos4210RTCState *s = (Exynos4210RTCState *)opaque;",
"switch (offset) {",
"case INTP:\nvalue = s->reg_intp;",
"break;",
"case RTCCON:\nvalue = s->reg_rtccon;",
"break;",
"case TICCNT:\nva... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21,
23
],
[
25
],
[
27,
29
],
[
31
],
[
33,
35
],
[
37
],
[
39,
41
],
[
43
],
[
45,
47
],
[
49
],
[... |
1,126 | static int read_tfra(MOVContext *mov, AVIOContext *f)
{
MOVFragmentIndex* index = NULL;
int version, fieldlength, i, j, err;
int64_t pos = avio_tell(f);
uint32_t size = avio_rb32(f);
if (avio_rb32(f) != MKBETAG('t', 'f', 'r', 'a')) {
return -1;
}
av_log(mov->fc, AV_LOG_VERBO... | true | FFmpeg | db42d93a61be26873be6115c57f5921b4dfdec14 | static int read_tfra(MOVContext *mov, AVIOContext *f)
{
MOVFragmentIndex* index = NULL;
int version, fieldlength, i, j, err;
int64_t pos = avio_tell(f);
uint32_t size = avio_rb32(f);
if (avio_rb32(f) != MKBETAG('t', 'f', 'r', 'a')) {
return -1;
}
av_log(mov->fc, AV_LOG_VERBO... | {
"code": [
" int version, fieldlength, i, j, err;",
" return -1;",
" mov->fragment_index_count++;",
" if ((err = av_reallocp(&mov->fragment_index_data,",
" mov->fragment_index_count *",
" sizeof(MOVFragmentIndex*))) < 0) {",
... | static int FUNC_0(MOVContext *VAR_0, AVIOContext *VAR_1)
{
MOVFragmentIndex* index = NULL;
int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;
int64_t pos = avio_tell(VAR_1);
uint32_t size = avio_rb32(VAR_1);
if (avio_rb32(VAR_1) != MKBETAG('t', 'VAR_1', 'r', 'a')) {
return -1;
}
av_log(... | [
"static int FUNC_0(MOVContext *VAR_0, AVIOContext *VAR_1)\n{",
"MOVFragmentIndex* index = NULL;",
"int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;",
"int64_t pos = avio_tell(VAR_1);",
"uint32_t size = avio_rb32(VAR_1);",
"if (avio_rb32(VAR_1) != MKBETAG('t', 'VAR_1', 'r', 'a')) {",
"return -1;",
"}",
"av_log... | [
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
1,
0,
1,
0,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,... |
1,127 | void ff_h264_direct_ref_list_init(H264Context * const h){
MpegEncContext * const s = &h->s;
Picture * const ref1 = &h->ref_list[1][0];
Picture * const cur = s->current_picture_ptr;
int list, j, field;
int sidx= (s->picture_structure&1)^1;
int ref1sidx = (ref1->f.reference&1)^1;
for(... | true | FFmpeg | 36cf247e4302afcb09e995ad1c594d97897d17ba | void ff_h264_direct_ref_list_init(H264Context * const h){
MpegEncContext * const s = &h->s;
Picture * const ref1 = &h->ref_list[1][0];
Picture * const cur = s->current_picture_ptr;
int list, j, field;
int sidx= (s->picture_structure&1)^1;
int ref1sidx = (ref1->f.reference&1)^1;
for(... | {
"code": [
" if (cur->f.pict_type != AV_PICTURE_TYPE_B || h->direct_spatial_mv_pred)"
],
"line_no": [
63
]
} | void FUNC_0(H264Context * const VAR_0){
MpegEncContext * const s = &VAR_0->s;
Picture * const ref1 = &VAR_0->ref_list[1][0];
Picture * const cur = s->current_picture_ptr;
int VAR_1, VAR_2, VAR_3;
int VAR_4= (s->picture_structure&1)^1;
int VAR_5 = (ref1->f.reference&1)^1;
for(VAR_1=0... | [
"void FUNC_0(H264Context * const VAR_0){",
"MpegEncContext * const s = &VAR_0->s;",
"Picture * const ref1 = &VAR_0->ref_list[1][0];",
"Picture * const cur = s->current_picture_ptr;",
"int VAR_1, VAR_2, VAR_3;",
"int VAR_4= (s->picture_structure&1)^1;",
"int VAR_5 = (ref1->f.reference&1)^1;",
"for(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,
1,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
43
],
[
45
],
[
47
],
[... |
1,128 | static int make_ydt24_entry(int p1, int p2, int16_t *ydt)
{
int lo, hi;
lo = ydt[p1];
hi = ydt[p2];
return (lo + (hi << 8) + (hi << 16)) << 1;
}
| true | FFmpeg | cf818be4f2f1e06bf63da3a6b55a4c3620952070 | static int make_ydt24_entry(int p1, int p2, int16_t *ydt)
{
int lo, hi;
lo = ydt[p1];
hi = ydt[p2];
return (lo + (hi << 8) + (hi << 16)) << 1;
}
| {
"code": [
" return (lo + (hi << 8) + (hi << 16)) << 1;"
],
"line_no": [
13
]
} | static int FUNC_0(int VAR_0, int VAR_1, int16_t *VAR_2)
{
int VAR_3, VAR_4;
VAR_3 = VAR_2[VAR_0];
VAR_4 = VAR_2[VAR_1];
return (VAR_3 + (VAR_4 << 8) + (VAR_4 << 16)) << 1;
}
| [
"static int FUNC_0(int VAR_0, int VAR_1, int16_t *VAR_2)\n{",
"int VAR_3, VAR_4;",
"VAR_3 = VAR_2[VAR_0];",
"VAR_4 = VAR_2[VAR_1];",
"return (VAR_3 + (VAR_4 << 8) + (VAR_4 << 16)) << 1;",
"}"
] | [
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
1,129 | static uint64_t fw_cfg_comb_read(void *opaque, hwaddr addr,
unsigned size)
{
return fw_cfg_read(opaque);
}
| true | qemu | 6c8d56a2e95712a6206a2671d2b04b2e59cabc0b | static uint64_t fw_cfg_comb_read(void *opaque, hwaddr addr,
unsigned size)
{
return fw_cfg_read(opaque);
}
| {
"code": [
"static uint64_t fw_cfg_comb_read(void *opaque, hwaddr addr,",
" unsigned size)",
" return fw_cfg_read(opaque);"
],
"line_no": [
1,
3,
7
]
} | static uint64_t FUNC_0(void *opaque, hwaddr addr,
unsigned size)
{
return fw_cfg_read(opaque);
}
| [
"static uint64_t FUNC_0(void *opaque, hwaddr addr,\nunsigned size)\n{",
"return fw_cfg_read(opaque);",
"}"
] | [
1,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
]
] |
1,133 | static int xan_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int ret, buf_size = avpkt->size;
XanContext *s = avctx->priv_data;
if (avctx->codec->id == CODEC_ID_XAN_WC3) {
... | true | FFmpeg | 56ee5a9ad1b385129c40ba4773f99bc5943ae8af | static int xan_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int ret, buf_size = avpkt->size;
XanContext *s = avctx->priv_data;
if (avctx->codec->id == CODEC_ID_XAN_WC3) {
... | {
"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_6 = VAR_3->VAR_10;
XanContext *s = VAR_0->priv_data;
if (VAR_0->codec->id == CODEC_ID_XAN_WC3) {
const ... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5, VAR_6 = VAR_3->VAR_10;",
"XanContext *s = VAR_0->priv_data;",
"if (VAR_0->codec->id == CODEC_ID_XAN_WC3) {",
"const uint8_t *VAR_7 = VAR_4 + VAR_6;",
"int VAR_8 ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3,
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20,
21,
22,
23
],
[
... |
1,134 | void do_405_check_sat (void)
{
if (!likely(((T1 ^ T2) >> 31) || !((T0 ^ T2) >> 31))) {
/* Saturate result */
if (T2 >> 31) {
T0 = INT32_MIN;
} else {
T0 = INT32_MAX;
}
}
}
| true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | void do_405_check_sat (void)
{
if (!likely(((T1 ^ T2) >> 31) || !((T0 ^ T2) >> 31))) {
if (T2 >> 31) {
T0 = INT32_MIN;
} else {
T0 = INT32_MAX;
}
}
}
| {
"code": [
" if (!likely(((T1 ^ T2) >> 31) || !((T0 ^ T2) >> 31))) {"
],
"line_no": [
5
]
} | void FUNC_0 (void)
{
if (!likely(((T1 ^ T2) >> 31) || !((T0 ^ T2) >> 31))) {
if (T2 >> 31) {
T0 = INT32_MIN;
} else {
T0 = INT32_MAX;
}
}
}
| [
"void FUNC_0 (void)\n{",
"if (!likely(((T1 ^ T2) >> 31) || !((T0 ^ T2) >> 31))) {",
"if (T2 >> 31) {",
"T0 = INT32_MIN;",
"} else {",
"T0 = INT32_MAX;",
"}",
"}",
"}"
] | [
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
1,135 | void *grow_array(void *array, int elem_size, int *size, int new_size)
{
if (new_size >= INT_MAX / elem_size) {
av_log(NULL, AV_LOG_ERROR, "Array too big.\n");
exit(1);
}
if (*size < new_size) {
uint8_t *tmp = av_realloc(array, new_size*elem_size);
if (!tmp) {
... | true | FFmpeg | 636ced8e1dc8248a1353b416240b93d70ad03edb | void *grow_array(void *array, int elem_size, int *size, int new_size)
{
if (new_size >= INT_MAX / elem_size) {
av_log(NULL, AV_LOG_ERROR, "Array too big.\n");
exit(1);
}
if (*size < new_size) {
uint8_t *tmp = av_realloc(array, new_size*elem_size);
if (!tmp) {
... | {
"code": [
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" e... | void *FUNC_0(void *VAR_0, int VAR_1, int *VAR_2, int VAR_3)
{
if (VAR_3 >= INT_MAX / VAR_1) {
av_log(NULL, AV_LOG_ERROR, "Array too big.\n");
exit(1);
}
if (*VAR_2 < VAR_3) {
uint8_t *tmp = av_realloc(VAR_0, VAR_3*VAR_1);
if (!tmp) {
av_log(NULL, AV_LOG_E... | [
"void *FUNC_0(void *VAR_0, int VAR_1, int *VAR_2, int VAR_3)\n{",
"if (VAR_3 >= INT_MAX / VAR_1) {",
"av_log(NULL, AV_LOG_ERROR, \"Array too big.\\n\");",
"exit(1);",
"}",
"if (*VAR_2 < VAR_3) {",
"uint8_t *tmp = av_realloc(VAR_0, VAR_3*VAR_1);",
"if (!tmp) {",
"av_log(NULL, AV_LOG_ERROR, \"Could no... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
1,
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
]
] |
1,139 | static int select_input_file(uint8_t *no_packet)
{
int64_t ipts_min = INT64_MAX;
int i, file_index = -1;
for (i = 0; i < nb_input_streams; i++) {
InputStream *ist = input_streams[i];
int64_t ipts = ist->pts;
if (ist->discard || no_packet[ist->file_index])
... | false | FFmpeg | 1cadab602343c4f577d2710a43bc66fde5a0d20b | static int select_input_file(uint8_t *no_packet)
{
int64_t ipts_min = INT64_MAX;
int i, file_index = -1;
for (i = 0; i < nb_input_streams; i++) {
InputStream *ist = input_streams[i];
int64_t ipts = ist->pts;
if (ist->discard || no_packet[ist->file_index])
... | {
"code": [],
"line_no": []
} | static int FUNC_0(uint8_t *VAR_0)
{
int64_t ipts_min = INT64_MAX;
int VAR_1, VAR_2 = -1;
for (VAR_1 = 0; VAR_1 < nb_input_streams; VAR_1++) {
InputStream *ist = input_streams[VAR_1];
int64_t ipts = ist->pts;
if (ist->discard || VAR_0[ist->VAR_2])
continue;... | [
"static int FUNC_0(uint8_t *VAR_0)\n{",
"int64_t ipts_min = INT64_MAX;",
"int VAR_1, VAR_2 = -1;",
"for (VAR_1 = 0; VAR_1 < nb_input_streams; VAR_1++) {",
"InputStream *ist = input_streams[VAR_1];",
"int64_t ipts = ist->pts;",
"if (ist->discard || VAR_0[ist->VAR_2])\ncontinue;",
"if (!input_files[... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
]
] |
1,140 | static target_ulong get_psr(void)
{
helper_compute_psr();
#if !defined (TARGET_SPARC64)
return env->version | (env->psr & PSR_ICC) |
(env->psref? PSR_EF : 0) |
(env->psrpil << 8) |
(env->psrs? PSR_S : 0) |
(env->psrps? PSR_PS : 0) |
(env->psret? PSR_ET : 0) | e... | true | qemu | 2aae2b8e0abd58e76d616bcbe93c6966d06d0188 | static target_ulong get_psr(void)
{
helper_compute_psr();
#if !defined (TARGET_SPARC64)
return env->version | (env->psr & PSR_ICC) |
(env->psref? PSR_EF : 0) |
(env->psrpil << 8) |
(env->psrs? PSR_S : 0) |
(env->psrps? PSR_PS : 0) |
(env->psret? PSR_ET : 0) | e... | {
"code": [
"#endif",
"#endif",
" return env->version | (env->psr & PSR_ICC) |",
" (env->psref? PSR_EF : 0) |",
" (env->psrpil << 8) |",
" (env->psrs? PSR_S : 0) |",
" (env->psrps? PSR_PS : 0) | env->cwp;",
"#if !defined (TARGET_SPARC64)",
"#endif"
... | static target_ulong FUNC_0(void)
{
helper_compute_psr();
#if !defined (TARGET_SPARC64)
return env->version | (env->psr & PSR_ICC) |
(env->psref? PSR_EF : 0) |
(env->psrpil << 8) |
(env->psrs? PSR_S : 0) |
(env->psrps? PSR_PS : 0) |
(env->psret? PSR_ET : 0) | en... | [
"static target_ulong FUNC_0(void)\n{",
"helper_compute_psr();",
"#if !defined (TARGET_SPARC64)\nreturn env->version | (env->psr & PSR_ICC) |\n(env->psref? PSR_EF : 0) |\n(env->psrpil << 8) |\n(env->psrs? PSR_S : 0) |\n(env->psrps? PSR_PS : 0) |\n(env->psret? PSR_ET : 0) | env->cwp;",
"#else\nreturn env->versi... | [
0,
0,
1,
1,
1
] | [
[
1,
3
],
[
5
],
[
9,
11,
13,
15,
17,
19,
21
],
[
23,
25,
27,
29,
31,
33
],
[
35,
37
]
] |
1,141 | void qpci_iounmap(QPCIDevice *dev, void *data)
{
/* FIXME */
}
| true | qemu | b4ba67d9a702507793c2724e56f98e9b0f7be02b | void qpci_iounmap(QPCIDevice *dev, void *data)
{
}
| {
"code": [
"void qpci_iounmap(QPCIDevice *dev, void *data)"
],
"line_no": [
1
]
} | void FUNC_0(QPCIDevice *VAR_0, void *VAR_1)
{
}
| [
"void FUNC_0(QPCIDevice *VAR_0, void *VAR_1)\n{",
"}"
] | [
1,
0
] | [
[
1,
3
],
[
7
]
] |
1,142 | int rom_add_file(const char *file, const char *fw_dir,
hwaddr addr, int32_t bootindex,
bool option_rom, MemoryRegion *mr)
{
MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());
Rom *rom;
int rc, fd = -1;
char devpath[100];
rom = g_malloc0(sizeof(*rom));
rom... | true | qemu | ed2f3bc1fad37297468234add82f464b59b16830 | int rom_add_file(const char *file, const char *fw_dir,
hwaddr addr, int32_t bootindex,
bool option_rom, MemoryRegion *mr)
{
MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());
Rom *rom;
int rc, fd = -1;
char devpath[100];
rom = g_malloc0(sizeof(*rom));
rom... | {
"code": [],
"line_no": []
} | int FUNC_0(const char *VAR_0, const char *VAR_1,
hwaddr VAR_2, int32_t VAR_3,
bool VAR_4, MemoryRegion *VAR_5)
{
MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());
Rom *rom;
int VAR_6, VAR_7 = -1;
char VAR_8[100];
rom = g_malloc0(sizeof(*rom));
rom->name ... | [
"int FUNC_0(const char *VAR_0, const char *VAR_1,\nhwaddr VAR_2, int32_t VAR_3,\nbool VAR_4, MemoryRegion *VAR_5)\n{",
"MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());",
"Rom *rom;",
"int VAR_6, VAR_7 = -1;",
"char VAR_8[100];",
"rom = g_malloc0(sizeof(*rom));",
"rom->name = g_strdup(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
] | [
[
1,
2,
3,
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16,
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
],
[
... |
1,143 | static inline int find_pte (CPUState *env, mmu_ctx_t *ctx, int h, int rw)
{
#if defined(TARGET_PPC64)
if (env->mmu_model == POWERPC_MMU_64B ||
env->mmu_model == POWERPC_MMU_64BRIDGE)
return find_pte64(ctx, h, rw);
#endif
return find_pte32(ctx, h, rw);
}
| true | qemu | 12de9a396acbc95e25c5d60ed097cc55777eaaed | static inline int find_pte (CPUState *env, mmu_ctx_t *ctx, int h, int rw)
{
#if defined(TARGET_PPC64)
if (env->mmu_model == POWERPC_MMU_64B ||
env->mmu_model == POWERPC_MMU_64BRIDGE)
return find_pte64(ctx, h, rw);
#endif
return find_pte32(ctx, h, rw);
}
| {
"code": [
"#endif",
" if (env->mmu_model == POWERPC_MMU_64B ||",
" env->mmu_model == POWERPC_MMU_64BRIDGE)",
"#endif",
" if (env->mmu_model == POWERPC_MMU_64B ||"
],
"line_no": [
13,
7,
9,
13,
7
]
} | static inline int FUNC_0 (CPUState *VAR_0, mmu_ctx_t *VAR_1, int VAR_2, int VAR_3)
{
#if defined(TARGET_PPC64)
if (VAR_0->mmu_model == POWERPC_MMU_64B ||
VAR_0->mmu_model == POWERPC_MMU_64BRIDGE)
return find_pte64(VAR_1, VAR_2, VAR_3);
#endif
return find_pte32(VAR_1, VAR_2, VAR_3);
}
| [
"static inline int FUNC_0 (CPUState *VAR_0, mmu_ctx_t *VAR_1, int VAR_2, int VAR_3)\n{",
"#if defined(TARGET_PPC64)\nif (VAR_0->mmu_model == POWERPC_MMU_64B ||\nVAR_0->mmu_model == POWERPC_MMU_64BRIDGE)\nreturn find_pte64(VAR_1, VAR_2, VAR_3);",
"#endif\nreturn find_pte32(VAR_1, VAR_2, VAR_3);",
"}"
] | [
0,
1,
1,
0
] | [
[
1,
3
],
[
5,
7,
9,
11
],
[
13,
17
],
[
19
]
] |
1,144 | static void vfio_probe_nvidia_bar5_quirk(VFIOPCIDevice *vdev, int nr)
{
VFIOQuirk *quirk;
VFIONvidiaBAR5Quirk *bar5;
VFIOConfigWindowQuirk *window;
if (!vfio_pci_is(vdev, PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID) ||
!vdev->has_vga || nr != 5) {
return;
}
quirk = g_malloc0(si... | true | qemu | bdd81addf4033ce26e6cd180b060f63095f3ded9 | static void vfio_probe_nvidia_bar5_quirk(VFIOPCIDevice *vdev, int nr)
{
VFIOQuirk *quirk;
VFIONvidiaBAR5Quirk *bar5;
VFIOConfigWindowQuirk *window;
if (!vfio_pci_is(vdev, PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID) ||
!vdev->has_vga || nr != 5) {
return;
}
quirk = g_malloc0(si... | {
"code": [
" quirk->mem = g_malloc0(sizeof(MemoryRegion) * 4);"
],
"line_no": [
25
]
} | static void FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1)
{
VFIOQuirk *quirk;
VFIONvidiaBAR5Quirk *bar5;
VFIOConfigWindowQuirk *window;
if (!vfio_pci_is(VAR_0, PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID) ||
!VAR_0->has_vga || VAR_1 != 5) {
return;
}
quirk = g_malloc0(sizeof(*quirk))... | [
"static void FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1)\n{",
"VFIOQuirk *quirk;",
"VFIONvidiaBAR5Quirk *bar5;",
"VFIOConfigWindowQuirk *window;",
"if (!vfio_pci_is(VAR_0, PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID) ||\n!VAR_0->has_vga || VAR_1 != 5) {",
"return;",
"}",
"quirk = g_malloc0(sizeof(*quirk));",
"quir... | [
0,
0,
0,
0,
0,
0,
0,
0,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
1,146 | static PXA2xxI2SState *pxa2xx_i2s_init(MemoryRegion *sysmem,
hwaddr base,
qemu_irq irq, qemu_irq rx_dma, qemu_irq tx_dma)
{
PXA2xxI2SState *s = (PXA2xxI2SState *)
g_malloc0(sizeof(PXA2xxI2SState));
s->irq = irq;
s->rx_dma = rx_dma;
s->tx_dma = tx_dma... | true | qemu | b45c03f585ea9bb1af76c73e82195418c294919d | static PXA2xxI2SState *pxa2xx_i2s_init(MemoryRegion *sysmem,
hwaddr base,
qemu_irq irq, qemu_irq rx_dma, qemu_irq tx_dma)
{
PXA2xxI2SState *s = (PXA2xxI2SState *)
g_malloc0(sizeof(PXA2xxI2SState));
s->irq = irq;
s->rx_dma = rx_dma;
s->tx_dma = tx_dma... | {
"code": [
" PXA2xxI2SState *s = (PXA2xxI2SState *)",
" g_malloc0(sizeof(PXA2xxI2SState));"
],
"line_no": [
9,
11
]
} | static PXA2xxI2SState *FUNC_0(MemoryRegion *sysmem,
hwaddr base,
qemu_irq irq, qemu_irq rx_dma, qemu_irq tx_dma)
{
PXA2xxI2SState *s = (PXA2xxI2SState *)
g_malloc0(sizeof(PXA2xxI2SState));
s->irq = irq;
s->rx_dma = rx_dma;
s->tx_dma = tx_dma;
s-... | [
"static PXA2xxI2SState *FUNC_0(MemoryRegion *sysmem,\nhwaddr base,\nqemu_irq irq, qemu_irq rx_dma, qemu_irq tx_dma)\n{",
"PXA2xxI2SState *s = (PXA2xxI2SState *)\ng_malloc0(sizeof(PXA2xxI2SState));",
"s->irq = irq;",
"s->rx_dma = rx_dma;",
"s->tx_dma = tx_dma;",
"s->data_req = pxa2xx_i2s_data_req;",
"pxa... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9,
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29,
31
],
[
33
],
[
37
],
[
41
],
[
43
]
] |
1,147 | static void unimp_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = unimp_realize;
dc->props = unimp_properties;
} | true | qemu | e4f4fb1eca795e36f363b4647724221e774523c1 | static void unimp_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = unimp_realize;
dc->props = unimp_properties;
} | {
"code": [],
"line_no": []
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
dc->realize = unimp_realize;
dc->props = unimp_properties;
} | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"dc->realize = unimp_realize;",
"dc->props = unimp_properties;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
18
]
] |
1,148 | int ff_get_qtpalette(int codec_id, AVIOContext *pb, uint32_t *palette)
{
int tmp, bit_depth, color_table_id, greyscale, i;
avio_seek(pb, 82, SEEK_CUR);
/* Get the bit depth and greyscale state */
tmp = avio_rb16(pb);
bit_depth = tmp & 0x1F;
greyscale = tmp & 0x20;
/* Get the co... | true | FFmpeg | 63c9b30f98ce7d160b3a6dec1b36dc05fbb71941 | int ff_get_qtpalette(int codec_id, AVIOContext *pb, uint32_t *palette)
{
int tmp, bit_depth, color_table_id, greyscale, i;
avio_seek(pb, 82, SEEK_CUR);
tmp = avio_rb16(pb);
bit_depth = tmp & 0x1F;
greyscale = tmp & 0x20;
color_table_id = avio_rb16(pb);
if (g... | {
"code": [
" int color_count, color_start, color_end;"
],
"line_no": [
41
]
} | int FUNC_0(int VAR_0, AVIOContext *VAR_1, uint32_t *VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;
avio_seek(VAR_1, 82, SEEK_CUR);
VAR_3 = avio_rb16(VAR_1);
VAR_4 = VAR_3 & 0x1F;
VAR_6 = VAR_3 & 0x20;
VAR_5 = avio_rb16(VAR_1);
if (VAR_6 && VAR_0 == AV_CODEC... | [
"int FUNC_0(int VAR_0, AVIOContext *VAR_1, uint32_t *VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;",
"avio_seek(VAR_1, 82, SEEK_CUR);",
"VAR_3 = avio_rb16(VAR_1);",
"VAR_4 = VAR_3 & 0x1F;",
"VAR_6 = VAR_3 & 0x20;",
"VAR_5 = avio_rb16(VAR_1);",
"if (VAR_6 && VAR_0 == AV_CODEC_ID_CINEPAK)\nreturn ... | [
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
] | [
[
1,
3
],
[
5
],
[
9
],
[
15
],
[
17
],
[
19
],
[
25
],
[
31,
33
],
[
39
],
[
41
],
[
43
],
[
51
],
[
53
],
[
57
],
[
59
],
[
61
],
[
63
],
[
65
],
[
67
],
... |
1,149 | AVCodecParserContext *av_parser_init(int codec_id)
{
AVCodecParserContext *s = NULL;
AVCodecParser *parser;
int ret;
if(codec_id == AV_CODEC_ID_NONE)
return NULL;
for(parser = av_first_parser; parser != NULL; parser = parser->next) {
if (parser->codec_ids[0] == codec_id |... | true | FFmpeg | 0393cf15dbe3b136647b81676a105815924eebcd | AVCodecParserContext *av_parser_init(int codec_id)
{
AVCodecParserContext *s = NULL;
AVCodecParser *parser;
int ret;
if(codec_id == AV_CODEC_ID_NONE)
return NULL;
for(parser = av_first_parser; parser != NULL; parser = parser->next) {
if (parser->codec_ids[0] == codec_id |... | {
"code": [
" if (ff_lock_avcodec(NULL) < 0)",
" goto err_out;",
" ff_unlock_avcodec();"
],
"line_no": [
59,
61,
65
]
} | AVCodecParserContext *FUNC_0(int codec_id)
{
AVCodecParserContext *s = NULL;
AVCodecParser *parser;
int VAR_0;
if(codec_id == AV_CODEC_ID_NONE)
return NULL;
for(parser = av_first_parser; parser != NULL; parser = parser->next) {
if (parser->codec_ids[0] == codec_id ||
... | [
"AVCodecParserContext *FUNC_0(int codec_id)\n{",
"AVCodecParserContext *s = NULL;",
"AVCodecParser *parser;",
"int VAR_0;",
"if(codec_id == AV_CODEC_ID_NONE)\nreturn NULL;",
"for(parser = av_first_parser; parser != NULL; parser = parser->next) {",
"if (parser->codec_ids[0] == codec_id ||\nparser->codec_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
21,
23,
25,
27,
29,
31
],
[
33
],
[
35
],
[
37,
39
],
[
41,
43
],
[
45
],
[
47
],
[
49,
51
],
[
53
],
[... |
1,152 | static int ra288_decode_frame(AVCodecContext * avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
AVFrame *frame = data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
float *out;
int i, ret;
RA288Context *ractx = avctx->priv_data;
... | true | FFmpeg | 194dd155582d5b71fc3bb78ef77ce64d3f6c521d | static int ra288_decode_frame(AVCodecContext * avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
AVFrame *frame = data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
float *out;
int i, ret;
RA288Context *ractx = avctx->priv_data;
... | {
"code": [
" init_get_bits8(&gb, buf, avctx->block_align);"
],
"line_no": [
49
]
} | static int FUNC_0(AVCodecContext * VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
AVFrame *frame = VAR_1;
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
float *VAR_6;
int VAR_7, VAR_8;
RA288Context *ractx = VAR_0->priv_data;
GetBi... | [
"static int FUNC_0(AVCodecContext * VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"AVFrame *frame = VAR_1;",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"float *VAR_6;",
"int VAR_7, VAR_8;",
"RA288Context *ractx = VAR_0->priv_data;",
"GetBitContext gb;",
"if (VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25,
27,
29
],
[
31
],
[
33
],
[
39
],
[
41,
43
],
[
45
],
[
49
],
[
53
],
[
55
... |
1,153 | int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h){
if((int)w>0 && (int)h>0 && (w+128)*(uint64_t)(h+128) < INT_MAX/4)
return 0;
av_log(av_log_ctx, AV_LOG_ERROR, "picture size invalid (%ux%u)\n", w, h);
return -1;
}
| false | FFmpeg | 445f0a8b666a34e6402f6ae96c6804c8bc024baa | int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h){
if((int)w>0 && (int)h>0 && (w+128)*(uint64_t)(h+128) < INT_MAX/4)
return 0;
av_log(av_log_ctx, AV_LOG_ERROR, "picture size invalid (%ux%u)\n", w, h);
return -1;
}
| {
"code": [],
"line_no": []
} | int FUNC_0(void *VAR_0, unsigned int VAR_1, unsigned int VAR_2){
if((int)VAR_1>0 && (int)VAR_2>0 && (VAR_1+128)*(uint64_t)(VAR_2+128) < INT_MAX/4)
return 0;
av_log(VAR_0, AV_LOG_ERROR, "picture size invalid (%ux%u)\n", VAR_1, VAR_2);
return -1;
}
| [
"int FUNC_0(void *VAR_0, unsigned int VAR_1, unsigned int VAR_2){",
"if((int)VAR_1>0 && (int)VAR_2>0 && (VAR_1+128)*(uint64_t)(VAR_2+128) < INT_MAX/4)\nreturn 0;",
"av_log(VAR_0, AV_LOG_ERROR, \"picture size invalid (%ux%u)\\n\", VAR_1, VAR_2);",
"return -1;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1
],
[
3,
5
],
[
9
],
[
11
],
[
13
]
] |
1,154 | static int find_unused_picture(MpegEncContext *s, int shared)
{
int i;
if (shared) {
for (i = 0; i < MAX_PICTURE_COUNT; i++) {
if (s->picture[i].f.data[0] == NULL)
return i;
}
} else {
for (i = 0; i < MAX_PICTURE_COUNT; i++) {
if (p... | false | FFmpeg | a553c6a347d3d28d7ee44c3df3d5c4ee780dba23 | static int find_unused_picture(MpegEncContext *s, int shared)
{
int i;
if (shared) {
for (i = 0; i < MAX_PICTURE_COUNT; i++) {
if (s->picture[i].f.data[0] == NULL)
return i;
}
} else {
for (i = 0; i < MAX_PICTURE_COUNT; i++) {
if (p... | {
"code": [],
"line_no": []
} | static int FUNC_0(MpegEncContext *VAR_0, int VAR_1)
{
int VAR_2;
if (VAR_1) {
for (VAR_2 = 0; VAR_2 < MAX_PICTURE_COUNT; VAR_2++) {
if (VAR_0->picture[VAR_2].f.data[0] == NULL)
return VAR_2;
}
} else {
for (VAR_2 = 0; VAR_2 < MAX_PICTURE_COUNT; ... | [
"static int FUNC_0(MpegEncContext *VAR_0, int VAR_1)\n{",
"int VAR_2;",
"if (VAR_1) {",
"for (VAR_2 = 0; VAR_2 < MAX_PICTURE_COUNT; VAR_2++) {",
"if (VAR_0->picture[VAR_2].f.data[0] == NULL)\nreturn VAR_2;",
"}",
"} else {",
"for (VAR_2 = 0; VAR_2 < MAX_PICTURE_COUNT; VAR_2++) {",
"if (pic_is_unused... | [
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
],
[
33
],
[
35
]
] |
1,155 | static int av_always_inline mlp_thd_probe(AVProbeData *p, uint32_t sync)
{
const uint8_t *buf, *last_buf = p->buf, *end = p->buf + p->buf_size;
int frames = 0, valid = 0, size = 0;
for (buf = p->buf; buf + 8 <= end; buf++) {
if (AV_RB32(buf + 4) == sync) {
frames++;
... | false | FFmpeg | 2ea38a946dbd7c4528f5729f494758cfad491fa8 | static int av_always_inline mlp_thd_probe(AVProbeData *p, uint32_t sync)
{
const uint8_t *buf, *last_buf = p->buf, *end = p->buf + p->buf_size;
int frames = 0, valid = 0, size = 0;
for (buf = p->buf; buf + 8 <= end; buf++) {
if (AV_RB32(buf + 4) == sync) {
frames++;
... | {
"code": [],
"line_no": []
} | static int VAR_0 mlp_thd_probe(AVProbeData *p, uint32_t sync)
{
const uint8_t *buf, *last_buf = p->buf, *end = p->buf + p->buf_size;
int frames = 0, valid = 0, size = 0;
for (buf = p->buf; buf + 8 <= end; buf++) {
if (AV_RB32(buf + 4) == sync) {
frames++;
if (last_bu... | [
"static int VAR_0 mlp_thd_probe(AVProbeData *p, uint32_t sync)\n{",
"const uint8_t *buf, *last_buf = p->buf, *end = p->buf + p->buf_size;",
"int frames = 0, valid = 0, size = 0;",
"for (buf = p->buf; buf + 8 <= end; buf++) {",
"if (AV_RB32(buf + 4) == sync) {",
"frames++;",
"if (last_buf + size == buf) ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
]
] |
1,156 | void gic_complete_irq(GICState *s, int cpu, int irq)
{
int update = 0;
int cm = 1 << cpu;
DPRINTF("EOI %d\n", irq);
if (irq >= s->num_irq) {
/* This handles two cases:
* 1. If software writes the ID of a spurious interrupt [ie 1023]
* to the GICC_EOIR, the GIC ignores t... | false | qemu | f9c6a7f1395c6d88a3bb1a0cb48811994709966e | void gic_complete_irq(GICState *s, int cpu, int irq)
{
int update = 0;
int cm = 1 << cpu;
DPRINTF("EOI %d\n", irq);
if (irq >= s->num_irq) {
return;
}
if (s->running_irq[cpu] == 1023)
return;
if (s->revision == REV_11MPCORE || s->revision ... | {
"code": [],
"line_no": []
} | void FUNC_0(GICState *VAR_0, int VAR_1, int VAR_2)
{
int VAR_3 = 0;
int VAR_4 = 1 << VAR_1;
DPRINTF("EOI %d\n", VAR_2);
if (VAR_2 >= VAR_0->num_irq) {
return;
}
if (VAR_0->running_irq[VAR_1] == 1023)
return;
if (VAR_0->revision == REV_11MP... | [
"void FUNC_0(GICState *VAR_0, int VAR_1, int VAR_2)\n{",
"int VAR_3 = 0;",
"int VAR_4 = 1 << VAR_1;",
"DPRINTF(\"EOI %d\\n\", VAR_2);",
"if (VAR_2 >= VAR_0->num_irq) {",
"return;",
"}",
"if (VAR_0->running_irq[VAR_1] == 1023)\nreturn;",
"if (VAR_0->revision == REV_11MPCORE || VAR_0->revision == REV_... | [
0,
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
31
],
[
33,
35
],
[
39
],
[
45,
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
],
[
61
],
[
65
],
[
67
],
[
69
... |
1,157 | static void core_commit(MemoryListener *listener)
{
PhysPageMap info = cur_map;
cur_map = next_map;
phys_sections_clear(&info);
}
| false | qemu | 6092666ebdc68b2634db050689292c71a5c368c0 | static void core_commit(MemoryListener *listener)
{
PhysPageMap info = cur_map;
cur_map = next_map;
phys_sections_clear(&info);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(MemoryListener *VAR_0)
{
PhysPageMap info = cur_map;
cur_map = next_map;
phys_sections_clear(&info);
}
| [
"static void FUNC_0(MemoryListener *VAR_0)\n{",
"PhysPageMap info = cur_map;",
"cur_map = next_map;",
"phys_sections_clear(&info);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
1,158 | static int ppc_hash32_pte_update_flags(struct mmu_ctx_hash32 *ctx, target_ulong *pte1p,
int ret, int rwx)
{
int store = 0;
/* Update page flags */
if (!(*pte1p & HPTE32_R_R)) {
/* Update accessed flag */
*pte1p |= HPTE32_R_R;
store = 1... | false | qemu | aea390e4be652d5b5457771d25eded0dba14fe37 | static int ppc_hash32_pte_update_flags(struct mmu_ctx_hash32 *ctx, target_ulong *pte1p,
int ret, int rwx)
{
int store = 0;
if (!(*pte1p & HPTE32_R_R)) {
*pte1p |= HPTE32_R_R;
store = 1;
}
if (!(*pte1p & HPTE32_R_C)) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0(struct mmu_ctx_hash32 *VAR_0, target_ulong *VAR_1,
int VAR_2, int VAR_3)
{
int VAR_4 = 0;
if (!(*VAR_1 & HPTE32_R_R)) {
*VAR_1 |= HPTE32_R_R;
VAR_4 = 1;
}
if (!(*VAR_1 & HPTE32_R_C)) {
if (VAR_3 =... | [
"static int FUNC_0(struct mmu_ctx_hash32 *VAR_0, target_ulong *VAR_1,\nint VAR_2, int VAR_3)\n{",
"int VAR_4 = 0;",
"if (!(*VAR_1 & HPTE32_R_R)) {",
"*VAR_1 |= HPTE32_R_R;",
"VAR_4 = 1;",
"}",
"if (!(*VAR_1 & HPTE32_R_C)) {",
"if (VAR_3 == 1 && VAR_2 == 0) {",
"*VAR_1 |= HPTE32_R_C;",
"VAR_4 = 1;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
]
] |
1,159 | static int raw_eject(BlockDriverState *bs, int eject_flag)
{
BDRVRawState *s = bs->opaque;
switch(s->type) {
case FTYPE_CD:
if (eject_flag) {
if (ioctl (s->fd, CDROMEJECT, NULL) < 0)
perror("CDROMEJECT");
} else {
if (ioctl (s->fd, CDROMCLOS... | false | qemu | 3c529d935923a70519557d420db1d5a09a65086a | static int raw_eject(BlockDriverState *bs, int eject_flag)
{
BDRVRawState *s = bs->opaque;
switch(s->type) {
case FTYPE_CD:
if (eject_flag) {
if (ioctl (s->fd, CDROMEJECT, NULL) < 0)
perror("CDROMEJECT");
} else {
if (ioctl (s->fd, CDROMCLOS... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, int VAR_1)
{
BDRVRawState *s = VAR_0->opaque;
switch(s->type) {
case FTYPE_CD:
if (VAR_1) {
if (ioctl (s->VAR_2, CDROMEJECT, NULL) < 0)
perror("CDROMEJECT");
} else {
if (ioctl (s->VAR_2, CDROMCLOSE... | [
"static int FUNC_0(BlockDriverState *VAR_0, int VAR_1)\n{",
"BDRVRawState *s = VAR_0->opaque;",
"switch(s->type) {",
"case FTYPE_CD:\nif (VAR_1) {",
"if (ioctl (s->VAR_2, CDROMEJECT, NULL) < 0)\nperror(\"CDROMEJECT\");",
"} else {",
"if (ioctl (s->VAR_2, CDROMCLOSETRAY, NULL) < 0)\nperror(\"CDROMEJECT\"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15,
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47... |
1,160 | static void usage(void)
{
const struct qemu_argument *arginfo;
int maxarglen;
int maxenvlen;
printf("usage: qemu-" TARGET_ARCH " [options] program [arguments...]\n"
"Linux CPU emulator (compiled for " TARGET_ARCH " emulation)\n"
"\n"
"Options and associated env... | false | qemu | 63ec54d7b319824df8b60cfe25afdfb607ce3905 | static void usage(void)
{
const struct qemu_argument *arginfo;
int maxarglen;
int maxenvlen;
printf("usage: qemu-" TARGET_ARCH " [options] program [arguments...]\n"
"Linux CPU emulator (compiled for " TARGET_ARCH " emulation)\n"
"\n"
"Options and associated env... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
const struct qemu_argument *VAR_0;
int VAR_1;
int VAR_2;
printf("FUNC_0: qemu-" TARGET_ARCH " [options] program [arguments...]\n"
"Linux CPU emulator (compiled for " TARGET_ARCH " emulation)\n"
"\n"
"Options and associated environment... | [
"static void FUNC_0(void)\n{",
"const struct qemu_argument *VAR_0;",
"int VAR_1;",
"int VAR_2;",
"printf(\"FUNC_0: qemu-\" TARGET_ARCH \" [options] program [arguments...]\\n\"\n\"Linux CPU emulator (compiled for \" TARGET_ARCH \" emulation)\\n\"\n\"\\n\"\n\"Options and associated environment variables:\\n\"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15,
17,
19,
21
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47,
49
],
[
53
],
[
55
],
[... |
1,162 | static void qemu_rbd_complete_aio(RADOSCB *rcb)
{
RBDAIOCB *acb = rcb->acb;
int64_t r;
r = rcb->ret;
if (acb->cmd == RBD_AIO_WRITE ||
acb->cmd == RBD_AIO_DISCARD) {
if (r < 0) {
acb->ret = r;
acb->error = 1;
} else if (!acb->error) {
... | false | qemu | dc7588c1eb3008bda53dde1d6b890cd299758155 | static void qemu_rbd_complete_aio(RADOSCB *rcb)
{
RBDAIOCB *acb = rcb->acb;
int64_t r;
r = rcb->ret;
if (acb->cmd == RBD_AIO_WRITE ||
acb->cmd == RBD_AIO_DISCARD) {
if (r < 0) {
acb->ret = r;
acb->error = 1;
} else if (!acb->error) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0(RADOSCB *VAR_0)
{
RBDAIOCB *acb = VAR_0->acb;
int64_t r;
r = VAR_0->ret;
if (acb->cmd == RBD_AIO_WRITE ||
acb->cmd == RBD_AIO_DISCARD) {
if (r < 0) {
acb->ret = r;
acb->error = 1;
} else if (!acb->error) {
acb-... | [
"static void FUNC_0(RADOSCB *VAR_0)\n{",
"RBDAIOCB *acb = VAR_0->acb;",
"int64_t r;",
"r = VAR_0->ret;",
"if (acb->cmd == RBD_AIO_WRITE ||\nacb->cmd == RBD_AIO_DISCARD) {",
"if (r < 0) {",
"acb->ret = r;",
"acb->error = 1;",
"} else if (!acb->error) {",
"acb->ret = VAR_0->size;",
"}",
"} else ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
... |
1,163 | static gboolean gd_window_key_event(GtkWidget *widget, GdkEventKey *key, void *opaque)
{
GtkDisplayState *s = opaque;
GtkAccelGroupEntry *entries;
guint n_entries = 0;
gboolean propagate_accel = TRUE;
gboolean handled = FALSE;
entries = gtk_accel_group_query(s->accel_group, key->keyval,... | false | qemu | b1e749c02172583ca85bb3a964a9b39221f9ac39 | static gboolean gd_window_key_event(GtkWidget *widget, GdkEventKey *key, void *opaque)
{
GtkDisplayState *s = opaque;
GtkAccelGroupEntry *entries;
guint n_entries = 0;
gboolean propagate_accel = TRUE;
gboolean handled = FALSE;
entries = gtk_accel_group_query(s->accel_group, key->keyval,... | {
"code": [],
"line_no": []
} | static gboolean FUNC_0(GtkWidget *widget, GdkEventKey *key, void *opaque)
{
GtkDisplayState *s = opaque;
GtkAccelGroupEntry *entries;
guint n_entries = 0;
gboolean propagate_accel = TRUE;
gboolean handled = FALSE;
entries = gtk_accel_group_query(s->accel_group, key->keyval,
... | [
"static gboolean FUNC_0(GtkWidget *widget, GdkEventKey *key, void *opaque)\n{",
"GtkDisplayState *s = opaque;",
"GtkAccelGroupEntry *entries;",
"guint n_entries = 0;",
"gboolean propagate_accel = TRUE;",
"gboolean handled = FALSE;",
"entries = gtk_accel_group_query(s->accel_group, key->keyval,\nkey->sta... | [
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
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
1,164 | static av_always_inline void hl_decode_mb_predict_luma(H264Context *h,
int mb_type, int is_h264,
int simple,
int transform_bypass,
... | false | FFmpeg | 6f7ca1f55be1270e0d7c33409de4473e4dd00add | static av_always_inline void hl_decode_mb_predict_luma(H264Context *h,
int mb_type, int is_h264,
int simple,
int transform_bypass,
... | {
"code": [],
"line_no": []
} | static av_always_inline void FUNC_0(H264Context *h,
int mb_type, int is_h264,
int simple,
int transform_bypass,
... | [
"static av_always_inline void FUNC_0(H264Context *h,\nint mb_type, int is_h264,\nint simple,\nint transform_bypass,\nint pixel_shift,\nint *block_offset,\nint linesize,\nuint8_t *dest_y, int p)\n{",
"void (*VAR_0)(uint8_t *VAR_5, int16_t *VAR_5, int VAR_5);",
"void (*VAR_4)(uint8_t *VAR_5, int16_t *VAR_5, int 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
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
1,165 | static void mcf_fec_do_tx(mcf_fec_state *s)
{
uint32_t addr;
mcf_fec_bd bd;
int frame_size;
int len;
uint8_t frame[FEC_MAX_FRAME_SIZE];
uint8_t *ptr;
DPRINTF("do_tx\n");
ptr = frame;
frame_size = 0;
addr = s->tx_descriptor;
while (1) {
mcf_fec_read_bd(&... | false | qemu | 070c4b92b8cd5390889716677a0b92444d6e087a | static void mcf_fec_do_tx(mcf_fec_state *s)
{
uint32_t addr;
mcf_fec_bd bd;
int frame_size;
int len;
uint8_t frame[FEC_MAX_FRAME_SIZE];
uint8_t *ptr;
DPRINTF("do_tx\n");
ptr = frame;
frame_size = 0;
addr = s->tx_descriptor;
while (1) {
mcf_fec_read_bd(&... | {
"code": [],
"line_no": []
} | static void FUNC_0(mcf_fec_state *VAR_0)
{
uint32_t addr;
mcf_fec_bd bd;
int VAR_1;
int VAR_2;
uint8_t frame[FEC_MAX_FRAME_SIZE];
uint8_t *ptr;
DPRINTF("do_tx\n");
ptr = frame;
VAR_1 = 0;
addr = VAR_0->tx_descriptor;
while (1) {
mcf_fec_read_bd(&bd, add... | [
"static void FUNC_0(mcf_fec_state *VAR_0)\n{",
"uint32_t addr;",
"mcf_fec_bd bd;",
"int VAR_1;",
"int VAR_2;",
"uint8_t frame[FEC_MAX_FRAME_SIZE];",
"uint8_t *ptr;",
"DPRINTF(\"do_tx\\n\");",
"ptr = frame;",
"VAR_1 = 0;",
"addr = VAR_0->tx_descriptor;",
"while (1) {",
"mcf_fec_read_bd(&bd, a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
1,166 | static void bonito_spciconf_writel(void *opaque, target_phys_addr_t addr,
uint32_t val)
{
PCIBonitoState *s = opaque;
uint32_t pciaddr;
uint16_t status;
DPRINTF("bonito_spciconf_writel "TARGET_FMT_plx" val %x \n", addr, val);
assert((addr&0x3)==0);
... | false | qemu | b2bedb214469af55179d907a60cd67fed6b0779e | static void bonito_spciconf_writel(void *opaque, target_phys_addr_t addr,
uint32_t val)
{
PCIBonitoState *s = opaque;
uint32_t pciaddr;
uint16_t status;
DPRINTF("bonito_spciconf_writel "TARGET_FMT_plx" val %x \n", addr, val);
assert((addr&0x3)==0);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint32_t VAR_2)
{
PCIBonitoState *s = VAR_0;
uint32_t pciaddr;
uint16_t status;
DPRINTF("FUNC_0 "TARGET_FMT_plx" VAR_2 %x \n", VAR_1, VAR_2);
assert((VAR_1&0x3)==0);
pciaddr = bonito_sbridge_... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint32_t VAR_2)\n{",
"PCIBonitoState *s = VAR_0;",
"uint32_t pciaddr;",
"uint16_t status;",
"DPRINTF(\"FUNC_0 \"TARGET_FMT_plx\" VAR_2 %x \\n\", VAR_1, VAR_2);",
"assert((VAR_1&0x3)==0);",
"pciaddr = bonito_sbridge_pciaddr(s, VAR_1);",
"if (p... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
25
],
[
27
],
[
29
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
49
]
] |
1,168 | void ide_init2_with_non_qdev_drives(IDEBus *bus, DriveInfo *hd0,
DriveInfo *hd1, qemu_irq irq)
{
int i;
DriveInfo *dinfo;
for(i = 0; i < 2; i++) {
dinfo = i == 0 ? hd0 : hd1;
ide_init1(bus, i);
if (dinfo) {
if (ide_init_drive... | false | qemu | 27e0c9a1bbd166a67c16291016fba298a8e47140 | void ide_init2_with_non_qdev_drives(IDEBus *bus, DriveInfo *hd0,
DriveInfo *hd1, qemu_irq irq)
{
int i;
DriveInfo *dinfo;
for(i = 0; i < 2; i++) {
dinfo = i == 0 ? hd0 : hd1;
ide_init1(bus, i);
if (dinfo) {
if (ide_init_drive... | {
"code": [],
"line_no": []
} | void FUNC_0(IDEBus *VAR_0, DriveInfo *VAR_1,
DriveInfo *VAR_2, qemu_irq VAR_3)
{
int VAR_4;
DriveInfo *dinfo;
for(VAR_4 = 0; VAR_4 < 2; VAR_4++) {
dinfo = VAR_4 == 0 ? VAR_1 : VAR_2;
ide_init1(VAR_0, VAR_4);
if (dinfo) {
if (... | [
"void FUNC_0(IDEBus *VAR_0, DriveInfo *VAR_1,\nDriveInfo *VAR_2, qemu_irq VAR_3)\n{",
"int VAR_4;",
"DriveInfo *dinfo;",
"for(VAR_4 = 0; VAR_4 < 2; VAR_4++) {",
"dinfo = VAR_4 == 0 ? VAR_1 : VAR_2;",
"ide_init1(VAR_0, VAR_4);",
"if (dinfo) {",
"if (ide_init_drive(&VAR_0->ifs[VAR_4], dinfo->bdrv,\ndinf... | [
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
],
[... |
1,169 | static void pxa2xx_ssp_write(void *opaque, hwaddr addr,
uint64_t value64, unsigned size)
{
PXA2xxSSPState *s = (PXA2xxSSPState *) opaque;
uint32_t value = value64;
switch (addr) {
case SSCR0:
s->sscr[0] = value & 0xc7ffffff;
s->enable = value & SSCR... | false | qemu | a89f364ae8740dfc31b321eed9ee454e996dc3c1 | static void pxa2xx_ssp_write(void *opaque, hwaddr addr,
uint64_t value64, unsigned size)
{
PXA2xxSSPState *s = (PXA2xxSSPState *) opaque;
uint32_t value = value64;
switch (addr) {
case SSCR0:
s->sscr[0] = value & 0xc7ffffff;
s->enable = value & SSCR... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
PXA2xxSSPState *s = (PXA2xxSSPState *) VAR_0;
uint32_t value = VAR_2;
switch (VAR_1) {
case SSCR0:
s->sscr[0] = value & 0xc7ffffff;
s->enable = value & SSCR0_SSE;
... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"PXA2xxSSPState *s = (PXA2xxSSPState *) VAR_0;",
"uint32_t value = VAR_2;",
"switch (VAR_1) {",
"case SSCR0:\ns->sscr[0] = value & 0xc7ffffff;",
"s->enable = value & SSCR0_SSE;",
"if (value & SSCR0_MOD)\nprintf(\"%s: At... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21,
23
],
[
25,
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47,
49
],
[
51,... |
1,170 | static int pci_ne2000_init(PCIDevice *pci_dev)
{
PCINE2000State *d = DO_UPCAST(PCINE2000State, dev, pci_dev);
NE2000State *s;
uint8_t *pci_conf;
pci_conf = d->dev.config;
pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_REALTEK);
pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_REALTEK_... | false | qemu | 18f1c729b88eb7f0f408332132b85dc896bfb145 | static int pci_ne2000_init(PCIDevice *pci_dev)
{
PCINE2000State *d = DO_UPCAST(PCINE2000State, dev, pci_dev);
NE2000State *s;
uint8_t *pci_conf;
pci_conf = d->dev.config;
pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_REALTEK);
pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_REALTEK_... | {
"code": [],
"line_no": []
} | static int FUNC_0(PCIDevice *VAR_0)
{
PCINE2000State *d = DO_UPCAST(PCINE2000State, dev, VAR_0);
NE2000State *s;
uint8_t *pci_conf;
pci_conf = d->dev.config;
pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_REALTEK);
pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_REALTEK_8029);
p... | [
"static int FUNC_0(PCIDevice *VAR_0)\n{",
"PCINE2000State *d = DO_UPCAST(PCINE2000State, dev, VAR_0);",
"NE2000State *s;",
"uint8_t *pci_conf;",
"pci_conf = d->dev.config;",
"pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_REALTEK);",
"pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_REALTEK_8029);",
... | [
0,
0,
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
],
[
27,
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43,
45
],
[
47
],
[
51
],
[
53
],
[
55
... |
1,171 | static void inc_refcounts(BlockDriverState *bs,
uint16_t *refcount_table,
int refcount_table_size,
int64_t offset, int64_t size)
{
BDRVQcowState *s = bs->opaque;
int64_t start, last, cluster_offset;
int k;
if (size <... | false | qemu | e97fc193e1c65deb51643d5251e98affe07c59ca | static void inc_refcounts(BlockDriverState *bs,
uint16_t *refcount_table,
int refcount_table_size,
int64_t offset, int64_t size)
{
BDRVQcowState *s = bs->opaque;
int64_t start, last, cluster_offset;
int k;
if (size <... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0,
uint16_t *VAR_1,
int VAR_2,
int64_t VAR_3, int64_t VAR_4)
{
BDRVQcowState *s = VAR_0->opaque;
int64_t start, last, cluster_offset;
int VAR_5;
if (VAR_4 <= 0)
retur... | [
"static void FUNC_0(BlockDriverState *VAR_0,\nuint16_t *VAR_1,\nint VAR_2,\nint64_t VAR_3, int64_t VAR_4)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"int64_t start, last, cluster_offset;",
"int VAR_5;",
"if (VAR_4 <= 0)\nreturn;",
"start = VAR_3 & ~(s->cluster_size - 1);",
"last = (VAR_3 + VAR_4 - 1) & ~... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
51
... |
1,172 | static int pte_check_hash32(struct mmu_ctx_hash32 *ctx, target_ulong pte0,
target_ulong pte1, int h, int rw, int type)
{
target_ulong mmask;
int access, ret, pp;
ret = -1;
/* Check validity and table match */
if ((pte0 & HPTE32_V_VALID) && (h == !!(pte0 & HPTE32_... | false | qemu | 91cda45b69e45a089f9989979a65db3f710c9925 | static int pte_check_hash32(struct mmu_ctx_hash32 *ctx, target_ulong pte0,
target_ulong pte1, int h, int rw, int type)
{
target_ulong mmask;
int access, ret, pp;
ret = -1;
if ((pte0 & HPTE32_V_VALID) && (h == !!(pte0 & HPTE32_V_SECONDARY))) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0(struct mmu_ctx_hash32 *VAR_0, target_ulong VAR_1,
target_ulong VAR_2, int VAR_3, int VAR_4, int VAR_5)
{
target_ulong mmask;
int VAR_6, VAR_7, VAR_8;
VAR_7 = -1;
if ((VAR_1 & HPTE32_V_VALID) && (VAR_3 == !!(VAR_1 & HPTE32_V_SECONDARY))) {
... | [
"static int FUNC_0(struct mmu_ctx_hash32 *VAR_0, target_ulong VAR_1,\ntarget_ulong VAR_2, int VAR_3, int VAR_4, int VAR_5)\n{",
"target_ulong mmask;",
"int VAR_6, VAR_7, VAR_8;",
"VAR_7 = -1;",
"if ((VAR_1 & HPTE32_V_VALID) && (VAR_3 == !!(VAR_1 & HPTE32_V_SECONDARY))) {",
"mmask = PTE_CHECK_MASK;",
"VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[... |
1,173 | static int aio_read_f(int argc, char **argv)
{
int nr_iov, c;
struct aio_ctx *ctx = calloc(1, sizeof(struct aio_ctx));
while ((c = getopt(argc, argv, "CP:qv")) != EOF) {
switch (c) {
case 'C':
ctx->Cflag = 1;
break;
case 'P':
ctx->Pflag... | false | qemu | 031380d8770d2df6c386e4aeabd412007d3ebd54 | static int aio_read_f(int argc, char **argv)
{
int nr_iov, c;
struct aio_ctx *ctx = calloc(1, sizeof(struct aio_ctx));
while ((c = getopt(argc, argv, "CP:qv")) != EOF) {
switch (c) {
case 'C':
ctx->Cflag = 1;
break;
case 'P':
ctx->Pflag... | {
"code": [],
"line_no": []
} | static int FUNC_0(int VAR_0, char **VAR_1)
{
int VAR_2, VAR_3;
struct aio_ctx *VAR_4 = calloc(1, sizeof(struct aio_ctx));
while ((VAR_3 = getopt(VAR_0, VAR_1, "CP:qv")) != EOF) {
switch (VAR_3) {
case 'C':
VAR_4->Cflag = 1;
break;
case 'P':
... | [
"static int FUNC_0(int VAR_0, char **VAR_1)\n{",
"int VAR_2, VAR_3;",
"struct aio_ctx *VAR_4 = calloc(1, sizeof(struct aio_ctx));",
"while ((VAR_3 = getopt(VAR_0, VAR_1, \"CP:qv\")) != EOF) {",
"switch (VAR_3) {",
"case 'C':\nVAR_4->Cflag = 1;",
"break;",
"case 'P':\nVAR_4->Pflag = 1;",
"VAR_4->patt... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15,
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43,
45
],
[
47... |
1,174 | static void scsi_free_request(SCSIRequest *req)
{
SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req);
qemu_vfree(r->iov.iov_base);
}
| false | qemu | 7285477ab11831b1cf56e45878a89170dd06d9b9 | static void scsi_free_request(SCSIRequest *req)
{
SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req);
qemu_vfree(r->iov.iov_base);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(SCSIRequest *VAR_0)
{
SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, VAR_0, VAR_0);
qemu_vfree(r->iov.iov_base);
}
| [
"static void FUNC_0(SCSIRequest *VAR_0)\n{",
"SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, VAR_0, VAR_0);",
"qemu_vfree(r->iov.iov_base);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
1,175 | void ff_mjpeg_encode_picture_header(AVCodecContext *avctx, PutBitContext *pb,
ScanTable *intra_scantable,
uint16_t intra_matrix[64])
{
int chroma_h_shift, chroma_v_shift;
const int lossless = avctx->codec_id != AV_CODEC_ID_MJPEG;
... | false | FFmpeg | 2862b63783b5556f7f3fb2d097629bc6879f833a | void ff_mjpeg_encode_picture_header(AVCodecContext *avctx, PutBitContext *pb,
ScanTable *intra_scantable,
uint16_t intra_matrix[64])
{
int chroma_h_shift, chroma_v_shift;
const int lossless = avctx->codec_id != AV_CODEC_ID_MJPEG;
... | {
"code": [],
"line_no": []
} | void FUNC_0(AVCodecContext *VAR_0, PutBitContext *VAR_1,
ScanTable *VAR_2,
uint16_t VAR_3[64])
{
int VAR_4, VAR_5;
const int VAR_6 = VAR_0->codec_id != AV_CODEC_ID_MJPEG;
int VAR_7[3], VAR_8[3];
av_pix_fmt_get_chroma_sub_sa... | [
"void FUNC_0(AVCodecContext *VAR_0, PutBitContext *VAR_1,\nScanTable *VAR_2,\nuint16_t VAR_3[64])\n{",
"int VAR_4, VAR_5;",
"const int VAR_6 = VAR_0->codec_id != AV_CODEC_ID_MJPEG;",
"int VAR_7[3], VAR_8[3];",
"av_pix_fmt_get_chroma_sub_sample(VAR_0->pix_fmt, &VAR_4,\n&VAR_5);",
"if (VAR_0->codec->id == A... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
23,
25
],
[
27,
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
55
... |
1,176 | int qemu_paio_error(struct qemu_paiocb *aiocb)
{
ssize_t ret = qemu_paio_return(aiocb);
if (ret < 0)
ret = -ret;
else
ret = 0;
return ret;
}
| false | qemu | 9ef91a677110ec200d7b2904fc4bcae5a77329ad | int qemu_paio_error(struct qemu_paiocb *aiocb)
{
ssize_t ret = qemu_paio_return(aiocb);
if (ret < 0)
ret = -ret;
else
ret = 0;
return ret;
}
| {
"code": [],
"line_no": []
} | int FUNC_0(struct qemu_paiocb *VAR_0)
{
ssize_t ret = qemu_paio_return(VAR_0);
if (ret < 0)
ret = -ret;
else
ret = 0;
return ret;
}
| [
"int FUNC_0(struct qemu_paiocb *VAR_0)\n{",
"ssize_t ret = qemu_paio_return(VAR_0);",
"if (ret < 0)\nret = -ret;",
"else\nret = 0;",
"return ret;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13,
15
],
[
19
],
[
21
]
] |
1,177 | static void arm_gic_common_reset(DeviceState *dev)
{
GICState *s = ARM_GIC_COMMON(dev);
int i;
memset(s->irq_state, 0, GIC_MAXIRQ * sizeof(gic_irq_state));
for (i = 0 ; i < s->num_cpu; i++) {
if (s->revision == REV_11MPCORE) {
s->priority_mask[i] = 0xf0;
} else {
... | false | qemu | 32951860834f09d1c1a0b81d8d7d5529e2d0e074 | static void arm_gic_common_reset(DeviceState *dev)
{
GICState *s = ARM_GIC_COMMON(dev);
int i;
memset(s->irq_state, 0, GIC_MAXIRQ * sizeof(gic_irq_state));
for (i = 0 ; i < s->num_cpu; i++) {
if (s->revision == REV_11MPCORE) {
s->priority_mask[i] = 0xf0;
} else {
... | {
"code": [],
"line_no": []
} | static void FUNC_0(DeviceState *VAR_0)
{
GICState *s = ARM_GIC_COMMON(VAR_0);
int VAR_1;
memset(s->irq_state, 0, GIC_MAXIRQ * sizeof(gic_irq_state));
for (VAR_1 = 0 ; VAR_1 < s->num_cpu; VAR_1++) {
if (s->revision == REV_11MPCORE) {
s->priority_mask[VAR_1] = 0xf0;
} e... | [
"static void FUNC_0(DeviceState *VAR_0)\n{",
"GICState *s = ARM_GIC_COMMON(VAR_0);",
"int VAR_1;",
"memset(s->irq_state, 0, GIC_MAXIRQ * sizeof(gic_irq_state));",
"for (VAR_1 = 0 ; VAR_1 < s->num_cpu; VAR_1++) {",
"if (s->revision == REV_11MPCORE) {",
"s->priority_mask[VAR_1] = 0xf0;",
"} else {",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
... |
1,178 | static int guess_disk_lchs(BlockDriverState *bs,
int *pcylinders, int *pheads, int *psectors)
{
uint8_t buf[BDRV_SECTOR_SIZE];
int i, heads, sectors, cylinders;
struct partition *p;
uint32_t nr_sects;
uint64_t nb_sectors;
bdrv_get_geometry(bs, &nb_sectors);
... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | static int guess_disk_lchs(BlockDriverState *bs,
int *pcylinders, int *pheads, int *psectors)
{
uint8_t buf[BDRV_SECTOR_SIZE];
int i, heads, sectors, cylinders;
struct partition *p;
uint32_t nr_sects;
uint64_t nb_sectors;
bdrv_get_geometry(bs, &nb_sectors);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0,
int *VAR_1, int *VAR_2, int *VAR_3)
{
uint8_t buf[BDRV_SECTOR_SIZE];
int VAR_4, VAR_5, VAR_6, VAR_7;
struct partition *VAR_8;
uint32_t nr_sects;
uint64_t nb_sectors;
bdrv_get_geometry(VAR_0, &nb_sectors);
... | [
"static int FUNC_0(BlockDriverState *VAR_0,\nint *VAR_1, int *VAR_2, int *VAR_3)\n{",
"uint8_t buf[BDRV_SECTOR_SIZE];",
"int VAR_4, VAR_5, VAR_6, VAR_7;",
"struct partition *VAR_8;",
"uint32_t nr_sects;",
"uint64_t nb_sectors;",
"bdrv_get_geometry(VAR_0, &nb_sectors);",
"if (bdrv_read_unthrottled(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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
59
],
[
61
],
[... |
1,179 | static mode_t v9mode_to_mode(uint32_t mode, V9fsString *extension)
{
mode_t ret;
ret = mode & 0777;
if (mode & P9_STAT_MODE_DIR) {
ret |= S_IFDIR;
}
if (mode & P9_STAT_MODE_SYMLINK) {
ret |= S_IFLNK;
}
if (mode & P9_STAT_MODE_SOCKET) {
ret |= S_IFSOCK;
... | false | qemu | c7e587b73ebac05943df78f5f37d80d32ff47d3d | static mode_t v9mode_to_mode(uint32_t mode, V9fsString *extension)
{
mode_t ret;
ret = mode & 0777;
if (mode & P9_STAT_MODE_DIR) {
ret |= S_IFDIR;
}
if (mode & P9_STAT_MODE_SYMLINK) {
ret |= S_IFLNK;
}
if (mode & P9_STAT_MODE_SOCKET) {
ret |= S_IFSOCK;
... | {
"code": [],
"line_no": []
} | static mode_t FUNC_0(uint32_t mode, V9fsString *extension)
{
mode_t ret;
ret = mode & 0777;
if (mode & P9_STAT_MODE_DIR) {
ret |= S_IFDIR;
}
if (mode & P9_STAT_MODE_SYMLINK) {
ret |= S_IFLNK;
}
if (mode & P9_STAT_MODE_SOCKET) {
ret |= S_IFSOCK;
}
... | [
"static mode_t FUNC_0(uint32_t mode, V9fsString *extension)\n{",
"mode_t ret;",
"ret = mode & 0777;",
"if (mode & P9_STAT_MODE_DIR) {",
"ret |= S_IFDIR;",
"}",
"if (mode & P9_STAT_MODE_SYMLINK) {",
"ret |= S_IFLNK;",
"}",
"if (mode & P9_STAT_MODE_SOCKET) {",
"ret |= S_IFSOCK;",
"}",
"if (mod... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45... |
1,181 | int kvm_cpu_exec(CPUState *cpu)
{
struct kvm_run *run = cpu->kvm_run;
int ret, run_ret;
DPRINTF("kvm_cpu_exec()\n");
if (kvm_arch_process_async_events(cpu)) {
cpu->exit_request = 0;
return EXCP_HLT;
}
do {
MemTxAttrs attrs;
if (cpu->kvm_vcpu_dir... | false | qemu | 4b8523ee896750c37b4fa224a40d34703cbdf4c6 | int kvm_cpu_exec(CPUState *cpu)
{
struct kvm_run *run = cpu->kvm_run;
int ret, run_ret;
DPRINTF("kvm_cpu_exec()\n");
if (kvm_arch_process_async_events(cpu)) {
cpu->exit_request = 0;
return EXCP_HLT;
}
do {
MemTxAttrs attrs;
if (cpu->kvm_vcpu_dir... | {
"code": [],
"line_no": []
} | int FUNC_0(CPUState *VAR_0)
{
struct kvm_run *VAR_1 = VAR_0->kvm_run;
int VAR_2, VAR_3;
DPRINTF("FUNC_0()\n");
if (kvm_arch_process_async_events(VAR_0)) {
VAR_0->exit_request = 0;
return EXCP_HLT;
}
do {
MemTxAttrs attrs;
if (VAR_0->kvm_vcpu_dir... | [
"int FUNC_0(CPUState *VAR_0)\n{",
"struct kvm_run *VAR_1 = VAR_0->kvm_run;",
"int VAR_2, VAR_3;",
"DPRINTF(\"FUNC_0()\\n\");",
"if (kvm_arch_process_async_events(VAR_0)) {",
"VAR_0->exit_request = 0;",
"return EXCP_HLT;",
"}",
"do {",
"MemTxAttrs attrs;",
"if (VAR_0->kvm_vcpu_dirty) {",
"kvm_a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
57
],
[
59
],
[
61... |
1,182 | void HELPER(crypto_aese)(CPUARMState *env, uint32_t rd, uint32_t rm,
uint32_t decrypt)
{
static uint8_t const sbox[][256] = { {
/* S-box for encryption */
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5,
0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
0... | false | qemu | f1ecb913d81199758383b8cbc15f4eb435b91753 | void HELPER(crypto_aese)(CPUARMState *env, uint32_t rd, uint32_t rm,
uint32_t decrypt)
{
static uint8_t const sbox[][256] = { {
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5,
0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
0xca, 0x82, 0xc9, 0x7d, 0xf... | {
"code": [],
"line_no": []
} | void FUNC_0(crypto_aese)(CPUARMState *env, uint32_t rd, uint32_t rm,
uint32_t decrypt)
{
static uint8_t const VAR_0[][256] = { {
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5,
0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
0xca, 0x82, 0xc9, 0x7d, 0x... | [
"void FUNC_0(crypto_aese)(CPUARMState *env, uint32_t rd, uint32_t rm,\nuint32_t decrypt)\n{",
"static uint8_t const VAR_0[][256] = { {",
"0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5,\n0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,\n0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0,\n0xad, 0xd4, 0xa2, 0xaf, 0x9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11,
13,
15,
17,
19,
21,
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,
61,
63,
65,
67,
69,
71,
73,
75
],
... |
1,183 | Visitor *string_output_get_visitor(StringOutputVisitor *sov)
{
return &sov->visitor;
}
| false | qemu | 3b098d56979d2f7fd707c5be85555d114353a28d | Visitor *string_output_get_visitor(StringOutputVisitor *sov)
{
return &sov->visitor;
}
| {
"code": [],
"line_no": []
} | Visitor *FUNC_0(StringOutputVisitor *sov)
{
return &sov->visitor;
}
| [
"Visitor *FUNC_0(StringOutputVisitor *sov)\n{",
"return &sov->visitor;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
1,184 | static void spr_write_tbl (DisasContext *ctx, int sprn, int gprn)
{
if (use_icount) {
gen_io_start();
}
gen_helper_store_tbl(cpu_env, cpu_gpr[gprn]);
if (use_icount) {
gen_io_end();
gen_stop_exception(ctx);
}
}
| false | qemu | bd79255d2571a3c68820117caf94ea9afe1d527e | static void spr_write_tbl (DisasContext *ctx, int sprn, int gprn)
{
if (use_icount) {
gen_io_start();
}
gen_helper_store_tbl(cpu_env, cpu_gpr[gprn]);
if (use_icount) {
gen_io_end();
gen_stop_exception(ctx);
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0 (DisasContext *VAR_0, int VAR_1, int VAR_2)
{
if (use_icount) {
gen_io_start();
}
gen_helper_store_tbl(cpu_env, cpu_gpr[VAR_2]);
if (use_icount) {
gen_io_end();
gen_stop_exception(VAR_0);
}
}
| [
"static void FUNC_0 (DisasContext *VAR_0, int VAR_1, int VAR_2)\n{",
"if (use_icount) {",
"gen_io_start();",
"}",
"gen_helper_store_tbl(cpu_env, cpu_gpr[VAR_2]);",
"if (use_icount) {",
"gen_io_end();",
"gen_stop_exception(VAR_0);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
1,185 | static int mig_save_device_dirty(QEMUFile *f, BlkMigDevState *bmds,
int is_async)
{
BlkMigBlock *blk;
BlockDriverState *bs = blk_bs(bmds->blk);
int64_t total_sectors = bmds->total_sectors;
int64_t sector;
int nr_sectors;
int ret = -EIO;
for (sector... | false | qemu | b64bd51efa9bbf30df1b2f91477d2805678d0b93 | static int mig_save_device_dirty(QEMUFile *f, BlkMigDevState *bmds,
int is_async)
{
BlkMigBlock *blk;
BlockDriverState *bs = blk_bs(bmds->blk);
int64_t total_sectors = bmds->total_sectors;
int64_t sector;
int nr_sectors;
int ret = -EIO;
for (sector... | {
"code": [],
"line_no": []
} | static int FUNC_0(QEMUFile *VAR_0, BlkMigDevState *VAR_1,
int VAR_2)
{
BlkMigBlock *blk;
BlockDriverState *bs = blk_bs(VAR_1->blk);
int64_t total_sectors = VAR_1->total_sectors;
int64_t sector;
int VAR_3;
int VAR_4 = -EIO;
for (sector = VAR_1->cur_... | [
"static int FUNC_0(QEMUFile *VAR_0, BlkMigDevState *VAR_1,\nint VAR_2)\n{",
"BlkMigBlock *blk;",
"BlockDriverState *bs = blk_bs(VAR_1->blk);",
"int64_t total_sectors = VAR_1->total_sectors;",
"int64_t sector;",
"int VAR_3;",
"int VAR_4 = -EIO;",
"for (sector = VAR_1->cur_dirty; sector < VAR_1->total_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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[... |
1,186 | static int kvm_get_xcrs(X86CPU *cpu)
{
CPUX86State *env = &cpu->env;
int i, ret;
struct kvm_xcrs xcrs;
if (!kvm_has_xcrs()) {
return 0;
}
ret = kvm_vcpu_ioctl(CPU(cpu), KVM_GET_XCRS, &xcrs);
if (ret < 0) {
return ret;
}
for (i = 0; i < xcrs.nr_xcrs; ... | false | qemu | 28143b409f698210d85165ca518235ac7e7c5ac5 | static int kvm_get_xcrs(X86CPU *cpu)
{
CPUX86State *env = &cpu->env;
int i, ret;
struct kvm_xcrs xcrs;
if (!kvm_has_xcrs()) {
return 0;
}
ret = kvm_vcpu_ioctl(CPU(cpu), KVM_GET_XCRS, &xcrs);
if (ret < 0) {
return ret;
}
for (i = 0; i < xcrs.nr_xcrs; ... | {
"code": [],
"line_no": []
} | static int FUNC_0(X86CPU *VAR_0)
{
CPUX86State *env = &VAR_0->env;
int VAR_1, VAR_2;
struct kvm_xcrs VAR_3;
if (!kvm_has_xcrs()) {
return 0;
}
VAR_2 = kvm_vcpu_ioctl(CPU(VAR_0), KVM_GET_XCRS, &VAR_3);
if (VAR_2 < 0) {
return VAR_2;
}
for (VAR_1 = 0; ... | [
"static int FUNC_0(X86CPU *VAR_0)\n{",
"CPUX86State *env = &VAR_0->env;",
"int VAR_1, VAR_2;",
"struct kvm_xcrs VAR_3;",
"if (!kvm_has_xcrs()) {",
"return 0;",
"}",
"VAR_2 = kvm_vcpu_ioctl(CPU(VAR_0), KVM_GET_XCRS, &VAR_3);",
"if (VAR_2 < 0) {",
"return VAR_2;",
"}",
"for (VAR_1 = 0; VAR_1 < V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
]
] |
1,187 | uint64_t timer_expire_time_ns(QEMUTimer *ts)
{
return timer_pending(ts) ? ts->expire_time : -1;
}
| false | qemu | c2b38b277a7882a592f4f2ec955084b2b756daaa | uint64_t timer_expire_time_ns(QEMUTimer *ts)
{
return timer_pending(ts) ? ts->expire_time : -1;
}
| {
"code": [],
"line_no": []
} | uint64_t FUNC_0(QEMUTimer *ts)
{
return timer_pending(ts) ? ts->expire_time : -1;
}
| [
"uint64_t FUNC_0(QEMUTimer *ts)\n{",
"return timer_pending(ts) ? ts->expire_time : -1;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
1,188 | static int default_fdset_dup_fd_add(int64_t fdset_id, int dup_fd)
{
return -1;
}
| false | qemu | 1f001dc7bc9e435bf231a5b0edcad1c7c2bd6214 | static int default_fdset_dup_fd_add(int64_t fdset_id, int dup_fd)
{
return -1;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(int64_t VAR_0, int VAR_1)
{
return -1;
}
| [
"static int FUNC_0(int64_t VAR_0, int VAR_1)\n{",
"return -1;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
1,189 | static void gen_mfc0 (CPUState *env, DisasContext *ctx, int reg, int sel)
{
const char *rn = "invalid";
if (sel != 0)
check_insn(env, ctx, ISA_MIPS32);
switch (reg) {
case 0:
switch (sel) {
case 0:
gen_op_mfc0_index();
rn = "Index";
... | false | qemu | 7385ac0ba2456159a52b9b2cbb5f6c71921d0c23 | static void gen_mfc0 (CPUState *env, DisasContext *ctx, int reg, int sel)
{
const char *rn = "invalid";
if (sel != 0)
check_insn(env, ctx, ISA_MIPS32);
switch (reg) {
case 0:
switch (sel) {
case 0:
gen_op_mfc0_index();
rn = "Index";
... | {
"code": [],
"line_no": []
} | static void FUNC_0 (CPUState *VAR_0, DisasContext *VAR_1, int VAR_2, int VAR_3)
{
const char *VAR_4 = "invalid";
if (VAR_3 != 0)
check_insn(VAR_0, VAR_1, ISA_MIPS32);
switch (VAR_2) {
case 0:
switch (VAR_3) {
case 0:
gen_op_mfc0_index();
VAR_... | [
"static void FUNC_0 (CPUState *VAR_0, DisasContext *VAR_1, int VAR_2, int VAR_3)\n{",
"const char *VAR_4 = \"invalid\";",
"if (VAR_3 != 0)\ncheck_insn(VAR_0, VAR_1, ISA_MIPS32);",
"switch (VAR_2) {",
"case 0:\nswitch (VAR_3) {",
"case 0:\ngen_op_mfc0_index();",
"VAR_4 = \"Index\";",
"break;",
"case ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
9,
11
],
[
15
],
[
17,
19
],
[
21,
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49,
51... |
1,190 | intptr_t (*checkasm_check_func(intptr_t (*func)(), const char *name, ...))()
{
char name_buf[256];
intptr_t (*ref)() = func;
CheckasmFuncVersion *v;
int name_length;
va_list arg;
va_start(arg, name);
name_length = vsnprintf(name_buf, sizeof(name_buf), name, arg);
va_end(arg);
... | false | FFmpeg | 18b101ff595c7f18e9571d26f8840f556b24ec03 | intptr_t (*checkasm_check_func(intptr_t (*func)(), const char *name, ...))()
{
char name_buf[256];
intptr_t (*ref)() = func;
CheckasmFuncVersion *v;
int name_length;
va_list arg;
va_start(arg, name);
name_length = vsnprintf(name_buf, sizeof(name_buf), name, arg);
va_end(arg);
... | {
"code": [],
"line_no": []
} | FUNC_0 (*checkasm_check_func(FUNC_0 (*func)(), const char *name, ...))()
{
char VAR_0[256];
FUNC_0 (*ref)() = func;
CheckasmFuncVersion *v;
int VAR_1;
va_list arg;
va_start(arg, name);
VAR_1 = vsnprintf(VAR_0, sizeof(VAR_0), name, arg);
va_end(arg);
if (!func || VAR_1 <... | [
"FUNC_0 (*checkasm_check_func(FUNC_0 (*func)(), const char *name, ...))()\n{",
"char VAR_0[256];",
"FUNC_0 (*ref)() = func;",
"CheckasmFuncVersion *v;",
"int VAR_1;",
"va_list arg;",
"va_start(arg, name);",
"VAR_1 = vsnprintf(VAR_0, sizeof(VAR_0), name, arg);",
"va_end(arg);",
"if (!func || 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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45,
47
],
[
51,
53
],
[
57
],
[... |
1,191 | static hwaddr vfio_container_granularity(VFIOContainer *container)
{
return (hwaddr)1 << ctz64(container->iova_pgsizes);
}
| false | qemu | f682e9c244af7166225f4a50cc18ff296bb9d43e | static hwaddr vfio_container_granularity(VFIOContainer *container)
{
return (hwaddr)1 << ctz64(container->iova_pgsizes);
}
| {
"code": [],
"line_no": []
} | static hwaddr FUNC_0(VFIOContainer *container)
{
return (hwaddr)1 << ctz64(container->iova_pgsizes);
}
| [
"static hwaddr FUNC_0(VFIOContainer *container)\n{",
"return (hwaddr)1 << ctz64(container->iova_pgsizes);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
1,192 | void apic_init_reset(DeviceState *dev)
{
APICCommonState *s = APIC_COMMON(dev);
APICCommonClass *info = APIC_COMMON_GET_CLASS(s);
int i;
if (!s) {
return;
}
s->tpr = 0;
s->spurious_vec = 0xff;
s->log_dest = 0;
s->dest_mode = 0xf;
memset(s->isr, 0, sizeof(s->... | false | qemu | 927411fa42c5fcf16ed0fcc0447d5ee8c83b22ca | void apic_init_reset(DeviceState *dev)
{
APICCommonState *s = APIC_COMMON(dev);
APICCommonClass *info = APIC_COMMON_GET_CLASS(s);
int i;
if (!s) {
return;
}
s->tpr = 0;
s->spurious_vec = 0xff;
s->log_dest = 0;
s->dest_mode = 0xf;
memset(s->isr, 0, sizeof(s->... | {
"code": [],
"line_no": []
} | void FUNC_0(DeviceState *VAR_0)
{
APICCommonState *s = APIC_COMMON(VAR_0);
APICCommonClass *info = APIC_COMMON_GET_CLASS(s);
int VAR_1;
if (!s) {
return;
}
s->tpr = 0;
s->spurious_vec = 0xff;
s->log_dest = 0;
s->dest_mode = 0xf;
memset(s->isr, 0, sizeof(s->i... | [
"void FUNC_0(DeviceState *VAR_0)\n{",
"APICCommonState *s = APIC_COMMON(VAR_0);",
"APICCommonClass *info = APIC_COMMON_GET_CLASS(s);",
"int VAR_1;",
"if (!s) {",
"return;",
"}",
"s->tpr = 0;",
"s->spurious_vec = 0xff;",
"s->log_dest = 0;",
"s->dest_mode = 0xf;",
"memset(s->isr, 0, sizeof(s->is... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
1,195 | static void gen_msa(CPUMIPSState *env, DisasContext *ctx)
{
uint32_t opcode = ctx->opcode;
check_insn(ctx, ASE_MSA);
check_msa_access(ctx);
switch (MASK_MSA_MINOR(opcode)) {
case OPC_MSA_I8_00:
case OPC_MSA_I8_01:
case OPC_MSA_I8_02:
gen_msa_i8(env, ctx);
break;
... | false | qemu | adc370a48fd26b92188fa4848dfb088578b1936c | static void gen_msa(CPUMIPSState *env, DisasContext *ctx)
{
uint32_t opcode = ctx->opcode;
check_insn(ctx, ASE_MSA);
check_msa_access(ctx);
switch (MASK_MSA_MINOR(opcode)) {
case OPC_MSA_I8_00:
case OPC_MSA_I8_01:
case OPC_MSA_I8_02:
gen_msa_i8(env, ctx);
break;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(CPUMIPSState *VAR_0, DisasContext *VAR_1)
{
uint32_t opcode = VAR_1->opcode;
check_insn(VAR_1, ASE_MSA);
check_msa_access(VAR_1);
switch (MASK_MSA_MINOR(opcode)) {
case OPC_MSA_I8_00:
case OPC_MSA_I8_01:
case OPC_MSA_I8_02:
gen_msa_i8(VAR_0, VAR_1);
... | [
"static void FUNC_0(CPUMIPSState *VAR_0, DisasContext *VAR_1)\n{",
"uint32_t opcode = VAR_1->opcode;",
"check_insn(VAR_1, ASE_MSA);",
"check_msa_access(VAR_1);",
"switch (MASK_MSA_MINOR(opcode)) {",
"case OPC_MSA_I8_00:\ncase OPC_MSA_I8_01:\ncase OPC_MSA_I8_02:\ngen_msa_i8(VAR_0, VAR_1);",
"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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17,
19,
21
],
[
23
],
[
25,
27,
29
],
[
31
],
[
33,
35,
37
],
[
39
],
[
41,
43,
45,
47,
49,
51,
53,
55,
57,
59
... |
1,196 | int bdrv_snapshot_load_tmp(BlockDriverState *bs,
const char *snapshot_name)
{
BlockDriver *drv = bs->drv;
if (!drv) {
return -ENOMEDIUM;
}
if (!bs->read_only) {
return -EINVAL;
}
if (drv->bdrv_snapshot_load_tmp) {
return drv->bdrv_snapshot_load_tmp(bs, ... | false | qemu | de08c606f9ddafe647b6843e2b10a6d6030b0fc0 | int bdrv_snapshot_load_tmp(BlockDriverState *bs,
const char *snapshot_name)
{
BlockDriver *drv = bs->drv;
if (!drv) {
return -ENOMEDIUM;
}
if (!bs->read_only) {
return -EINVAL;
}
if (drv->bdrv_snapshot_load_tmp) {
return drv->bdrv_snapshot_load_tmp(bs, ... | {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState *VAR_0,
const char *VAR_1)
{
BlockDriver *drv = VAR_0->drv;
if (!drv) {
return -ENOMEDIUM;
}
if (!VAR_0->read_only) {
return -EINVAL;
}
if (drv->FUNC_0) {
return drv->FUNC_0(VAR_0, VAR_1);
}
return -ENOTSUP;
}
| [
"int FUNC_0(BlockDriverState *VAR_0,\nconst char *VAR_1)\n{",
"BlockDriver *drv = VAR_0->drv;",
"if (!drv) {",
"return -ENOMEDIUM;",
"}",
"if (!VAR_0->read_only) {",
"return -EINVAL;",
"}",
"if (drv->FUNC_0) {",
"return drv->FUNC_0(VAR_0, VAR_1);",
"}",
"return -ENOTSUP;",
"}"
] | [
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
]
] |
1,197 | static void io_watch_poll_finalize(GSource *source)
{
IOWatchPoll *iwp = io_watch_poll_from_source(source);
g_source_destroy(iwp->src);
g_source_unref(iwp->src);
iwp->src = NULL;
}
| false | qemu | 910b63682ea72f34307b8797c4cc81a1f2a0c47f | static void io_watch_poll_finalize(GSource *source)
{
IOWatchPoll *iwp = io_watch_poll_from_source(source);
g_source_destroy(iwp->src);
g_source_unref(iwp->src);
iwp->src = NULL;
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(GSource *VAR_0)
{
IOWatchPoll *iwp = io_watch_poll_from_source(VAR_0);
g_source_destroy(iwp->src);
g_source_unref(iwp->src);
iwp->src = NULL;
}
| [
"static void FUNC_0(GSource *VAR_0)\n{",
"IOWatchPoll *iwp = io_watch_poll_from_source(VAR_0);",
"g_source_destroy(iwp->src);",
"g_source_unref(iwp->src);",
"iwp->src = NULL;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
1,198 | static void omap_pin_cfg_init(MemoryRegion *system_memory,
target_phys_addr_t base,
struct omap_mpu_state_s *mpu)
{
memory_region_init_io(&mpu->pin_cfg_iomem, &omap_pin_cfg_ops, mpu,
"omap-pin-cfg", 0x800);
memory_region_add_subregion(system_memory... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void omap_pin_cfg_init(MemoryRegion *system_memory,
target_phys_addr_t base,
struct omap_mpu_state_s *mpu)
{
memory_region_init_io(&mpu->pin_cfg_iomem, &omap_pin_cfg_ops, mpu,
"omap-pin-cfg", 0x800);
memory_region_add_subregion(system_memory... | {
"code": [],
"line_no": []
} | static void FUNC_0(MemoryRegion *VAR_0,
target_phys_addr_t VAR_1,
struct omap_mpu_state_s *VAR_2)
{
memory_region_init_io(&VAR_2->pin_cfg_iomem, &omap_pin_cfg_ops, VAR_2,
"omap-pin-cfg", 0x800);
memory_region_add_subregion(VAR_0, VAR_1, &VAR_2->pin... | [
"static void FUNC_0(MemoryRegion *VAR_0,\ntarget_phys_addr_t VAR_1,\nstruct omap_mpu_state_s *VAR_2)\n{",
"memory_region_init_io(&VAR_2->pin_cfg_iomem, &omap_pin_cfg_ops, VAR_2,\n\"omap-pin-cfg\", 0x800);",
"memory_region_add_subregion(VAR_0, VAR_1, &VAR_2->pin_cfg_iomem);",
"omap_pin_cfg_reset(VAR_2);",
"}... | [
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9,
11
],
[
13
],
[
15
],
[
17
]
] |
1,200 | void cpu_x86_inject_mce(CPUState *cenv, int bank, uint64_t status,
uint64_t mcg_status, uint64_t addr, uint64_t misc,
int broadcast)
{
unsigned bank_num = cenv->mcg_cap & 0xff;
CPUState *env;
int flag = 0;
if (bank >= bank_num || !(status & MCI_ST... | false | qemu | 316378e4d0214b45cfeaa01609aca4dabb18d78b | void cpu_x86_inject_mce(CPUState *cenv, int bank, uint64_t status,
uint64_t mcg_status, uint64_t addr, uint64_t misc,
int broadcast)
{
unsigned bank_num = cenv->mcg_cap & 0xff;
CPUState *env;
int flag = 0;
if (bank >= bank_num || !(status & MCI_ST... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUState *VAR_0, int VAR_1, uint64_t VAR_2,
uint64_t VAR_3, uint64_t VAR_4, uint64_t VAR_5,
int VAR_6)
{
unsigned VAR_7 = VAR_0->mcg_cap & 0xff;
CPUState *env;
int VAR_8 = 0;
if (VAR_1 >= VAR_7 || !(VAR_2 & MCI_STATUS_VAL)) {
... | [
"void FUNC_0(CPUState *VAR_0, int VAR_1, uint64_t VAR_2,\nuint64_t VAR_3, uint64_t VAR_4, uint64_t VAR_5,\nint VAR_6)\n{",
"unsigned VAR_7 = VAR_0->mcg_cap & 0xff;",
"CPUState *env;",
"int VAR_8 = 0;",
"if (VAR_1 >= VAR_7 || !(VAR_2 & MCI_STATUS_VAL)) {",
"return;",
"}",
"if (VAR_6) {",
"if (!cpu_x8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
... |
1,201 | static void psy_3gpp_analyze(FFPsyContext *ctx, int channel,
const float *coefs, const FFPsyWindowInfo *wi)
{
AacPsyContext *pctx = (AacPsyContext*) ctx->model_priv_data;
AacPsyChannel *pch = &pctx->ch[channel];
int start = 0;
int i, w, g;
const int num_bands ... | false | FFmpeg | b7c96769c52a312c6f6abe43f5d8c83701118a0b | static void psy_3gpp_analyze(FFPsyContext *ctx, int channel,
const float *coefs, const FFPsyWindowInfo *wi)
{
AacPsyContext *pctx = (AacPsyContext*) ctx->model_priv_data;
AacPsyChannel *pch = &pctx->ch[channel];
int start = 0;
int i, w, g;
const int num_bands ... | {
"code": [],
"line_no": []
} | static void FUNC_0(FFPsyContext *VAR_0, int VAR_1,
const float *VAR_2, const FFPsyWindowInfo *VAR_3)
{
AacPsyContext *pctx = (AacPsyContext*) VAR_0->model_priv_data;
AacPsyChannel *pch = &pctx->ch[VAR_1];
int VAR_4 = 0;
int VAR_5, VAR_6, VAR_7;
const int VAR_8 ... | [
"static void FUNC_0(FFPsyContext *VAR_0, int VAR_1,\nconst float *VAR_2, const FFPsyWindowInfo *VAR_3)\n{",
"AacPsyContext *pctx = (AacPsyContext*) VAR_0->model_priv_data;",
"AacPsyChannel *pch = &pctx->ch[VAR_1];",
"int VAR_4 = 0;",
"int VAR_5, VAR_6, VAR_7;",
"const int VAR_8 = VAR_0->VAR_8[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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[... |
1,202 | static void dbdma_writel (void *opaque,
target_phys_addr_t addr, uint32_t value)
{
int channel = addr >> DBDMA_CHANNEL_SHIFT;
DBDMA_channel *ch = (DBDMA_channel *)opaque + channel;
int reg = (addr - (channel << DBDMA_CHANNEL_SHIFT)) >> 2;
DBDMA_DPRINTF("writel 0x" TARGE... | false | qemu | ad674e53b5cce265fadafbde2c6a4f190345cd00 | static void dbdma_writel (void *opaque,
target_phys_addr_t addr, uint32_t value)
{
int channel = addr >> DBDMA_CHANNEL_SHIFT;
DBDMA_channel *ch = (DBDMA_channel *)opaque + channel;
int reg = (addr - (channel << DBDMA_CHANNEL_SHIFT)) >> 2;
DBDMA_DPRINTF("writel 0x" TARGE... | {
"code": [],
"line_no": []
} | static void FUNC_0 (void *VAR_0,
target_phys_addr_t VAR_1, uint32_t VAR_2)
{
int VAR_3 = VAR_1 >> DBDMA_CHANNEL_SHIFT;
DBDMA_channel *ch = (DBDMA_channel *)VAR_0 + VAR_3;
int VAR_4 = (VAR_1 - (VAR_3 << DBDMA_CHANNEL_SHIFT)) >> 2;
DBDMA_DPRINTF("writel 0x" TARGET_FMT_plx... | [
"static void FUNC_0 (void *VAR_0,\ntarget_phys_addr_t VAR_1, uint32_t VAR_2)\n{",
"int VAR_3 = VAR_1 >> DBDMA_CHANNEL_SHIFT;",
"DBDMA_channel *ch = (DBDMA_channel *)VAR_0 + VAR_3;",
"int VAR_4 = (VAR_1 - (VAR_3 << DBDMA_CHANNEL_SHIFT)) >> 2;",
"DBDMA_DPRINTF(\"writel 0x\" TARGET_FMT_plx \" <= 0x%08x\\n\", V... | [
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
],
[
27,
29,
31
],
[
35
],
[
39
],
[
41,
43
],
[
45
],
[
47,
51
],
[
53
],
[
55
],
[
57,
59,
61,
63,
67
... |
1,203 | static uint64_t omap_os_timer_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
struct omap_32khz_timer_s *s = (struct omap_32khz_timer_s *) opaque;
int offset = addr & OMAP_MPUI_REG_MASK;
if (size != 4) {
return omap_badwidth_read32(opaque, addr... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t omap_os_timer_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
struct omap_32khz_timer_s *s = (struct omap_32khz_timer_s *) opaque;
int offset = addr & OMAP_MPUI_REG_MASK;
if (size != 4) {
return omap_badwidth_read32(opaque, addr... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,
unsigned size)
{
struct omap_32khz_timer_s *VAR_0 = (struct omap_32khz_timer_s *) opaque;
int VAR_1 = addr & OMAP_MPUI_REG_MASK;
if (size != 4) {
return omap_badwidth_read32(opaque, addr);
}... | [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,\nunsigned size)\n{",
"struct omap_32khz_timer_s *VAR_0 = (struct omap_32khz_timer_s *) opaque;",
"int VAR_1 = addr & OMAP_MPUI_REG_MASK;",
"if (size != 4) {",
"return omap_badwidth_read32(opaque, addr);",
"}",
"switch (VAR_1) {",
"case 0x0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23,
25
],
[
29,
31
],
[
35,
37
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[
51
]
] |
1,204 | static uint64_t ahci_mem_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
AHCIState *s = opaque;
uint32_t val = 0;
if (addr < AHCI_GENERIC_HOST_CONTROL_REGS_MAX_ADDR) {
switch (addr) {
case HOST_CAP:
val = s->control_regs.cap;
... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t ahci_mem_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
AHCIState *s = opaque;
uint32_t val = 0;
if (addr < AHCI_GENERIC_HOST_CONTROL_REGS_MAX_ADDR) {
switch (addr) {
case HOST_CAP:
val = s->control_regs.cap;
... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,
unsigned size)
{
AHCIState *s = opaque;
uint32_t val = 0;
if (addr < AHCI_GENERIC_HOST_CONTROL_REGS_MAX_ADDR) {
switch (addr) {
case HOST_CAP:
val = s->control_regs.cap;
... | [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,\nunsigned size)\n{",
"AHCIState *s = opaque;",
"uint32_t val = 0;",
"if (addr < AHCI_GENERIC_HOST_CONTROL_REGS_MAX_ADDR) {",
"switch (addr) {",
"case HOST_CAP:\nval = s->control_regs.cap;",
"break;",
"case HOST_CTL:\nval = s->control_regs.... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
51
... |
1,205 | static inline uint16_t get_hwc_color(SM501State *state, int crt, int index)
{
uint32_t color_reg = 0;
uint16_t color_565 = 0;
if (index == 0) {
return 0;
}
switch (index) {
case 1:
case 2:
color_reg = crt ? state->dc_crt_hwc_color_1_2
: ... | false | qemu | 6a2a5aae02b9a0b53807b9ad91f15cd4988781f9 | static inline uint16_t get_hwc_color(SM501State *state, int crt, int index)
{
uint32_t color_reg = 0;
uint16_t color_565 = 0;
if (index == 0) {
return 0;
}
switch (index) {
case 1:
case 2:
color_reg = crt ? state->dc_crt_hwc_color_1_2
: ... | {
"code": [],
"line_no": []
} | static inline uint16_t FUNC_0(SM501State *state, int crt, int index)
{
uint32_t color_reg = 0;
uint16_t color_565 = 0;
if (index == 0) {
return 0;
}
switch (index) {
case 1:
case 2:
color_reg = crt ? state->dc_crt_hwc_color_1_2
: state->... | [
"static inline uint16_t FUNC_0(SM501State *state, int crt, int index)\n{",
"uint32_t color_reg = 0;",
"uint16_t color_565 = 0;",
"if (index == 0) {",
"return 0;",
"}",
"switch (index) {",
"case 1:\ncase 2:\ncolor_reg = crt ? state->dc_crt_hwc_color_1_2\n: state->dc_panel_hwc_color_1_2;",
"break;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23,
25,
27
],
[
29
],
[
31,
33,
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
49
],
[
51,
53,
55... |
1,206 | mlt_compensate_output(COOKContext *q, float *decode_buffer,
cook_gains *gains, float *previous_buffer,
int16_t *out, int chan)
{
int j;
cook_imlt(q, decode_buffer, q->mono_mdct_output);
gain_compensate(q, gains, previous_buffer);
/* Clip and convert... | false | FFmpeg | 85e7386ae0d33ede4c575d4df4c1faae6c906338 | mlt_compensate_output(COOKContext *q, float *decode_buffer,
cook_gains *gains, float *previous_buffer,
int16_t *out, int chan)
{
int j;
cook_imlt(q, decode_buffer, q->mono_mdct_output);
gain_compensate(q, gains, previous_buffer);
for (j = 0;... | {
"code": [],
"line_no": []
} | FUNC_0(COOKContext *VAR_0, float *VAR_1,
cook_gains *VAR_2, float *VAR_3,
int16_t *VAR_4, int VAR_5)
{
int VAR_6;
cook_imlt(VAR_0, VAR_1, VAR_0->mono_mdct_output);
gain_compensate(VAR_0, VAR_2, VAR_3);
for (VAR_6 = 0; VAR_6 < VAR_0->samples_... | [
"FUNC_0(COOKContext *VAR_0, float *VAR_1,\ncook_gains *VAR_2, float *VAR_3,\nint16_t *VAR_4, int VAR_5)\n{",
"int VAR_6;",
"cook_imlt(VAR_0, VAR_1, VAR_0->mono_mdct_output);",
"gain_compensate(VAR_0, VAR_2, VAR_3);",
"for (VAR_6 = 0; VAR_6 < VAR_0->samples_per_channel; VAR_6++) {",
"VAR_4[VAR_5 + VAR_0->n... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15
],
[
23
],
[
25,
27
],
[
29
],
[
31
]
] |
1,207 | int main(int argc, char **argv){
int in_sample_rate, out_sample_rate, ch ,i, flush_count;
uint64_t in_ch_layout, out_ch_layout;
enum AVSampleFormat in_sample_fmt, out_sample_fmt;
uint8_t array_in[SAMPLES*8*8];
uint8_t array_mid[SAMPLES*8*8*3];
uint8_t array_out[SAMPLES*8*8+100];
uint8... | false | FFmpeg | dd3e5baa59964d0e98ff94b159684d03db32553e | int main(int argc, char **argv){
int in_sample_rate, out_sample_rate, ch ,i, flush_count;
uint64_t in_ch_layout, out_ch_layout;
enum AVSampleFormat in_sample_fmt, out_sample_fmt;
uint8_t array_in[SAMPLES*8*8];
uint8_t array_mid[SAMPLES*8*8*3];
uint8_t array_out[SAMPLES*8*8+100];
uint8... | {
"code": [],
"line_no": []
} | int FUNC_0(int VAR_0, char **VAR_1){
int VAR_2, VAR_3, VAR_4 ,VAR_5, VAR_6;
uint64_t in_ch_layout, out_ch_layout;
enum AVSampleFormat VAR_7, VAR_8;
uint8_t array_in[SAMPLES*8*8];
uint8_t array_mid[SAMPLES*8*8*3];
uint8_t array_out[SAMPLES*8*8+100];
uint8_t *ain[SWR_CH_MAX];
uint8... | [
"int FUNC_0(int VAR_0, char **VAR_1){",
"int VAR_2, VAR_3, VAR_4 ,VAR_5, VAR_6;",
"uint64_t in_ch_layout, out_ch_layout;",
"enum AVSampleFormat VAR_7, VAR_8;",
"uint8_t array_in[SAMPLES*8*8];",
"uint8_t array_mid[SAMPLES*8*8*3];",
"uint8_t array_out[SAMPLES*8*8+100];",
"uint8_t *ain[SWR_CH_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
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[... |
1,208 | void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
int is_mpeg12)
{
const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration){
ff_xvmc_decode_mb(s);//xvmc uses pblocks
return;
}
... | false | FFmpeg | 70d54392f5015b9c6594fcae558f59f952501e3b | void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
int is_mpeg12)
{
const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration){
ff_xvmc_decode_mb(s);
return;
}
if(s->avctx->debug... | {
"code": [],
"line_no": []
} | void FUNC_0(MpegEncContext *VAR_0, DCTELEM VAR_1[12][64],
int VAR_2)
{
const int VAR_3 = VAR_0->mb_y * VAR_0->mb_stride + VAR_0->mb_x;
if(CONFIG_MPEG_XVMC_DECODER && VAR_0->avctx->xvmc_acceleration){
ff_xvmc_decode_mb(VAR_0);
return;
}
if(VAR_0->avct... | [
"void FUNC_0(MpegEncContext *VAR_0, DCTELEM VAR_1[12][64],\nint VAR_2)\n{",
"const int VAR_3 = VAR_0->mb_y * VAR_0->mb_stride + VAR_0->mb_x;",
"if(CONFIG_MPEG_XVMC_DECODER && VAR_0->avctx->xvmc_acceleration){",
"ff_xvmc_decode_mb(VAR_0);",
"return;",
"}",
"if(VAR_0->avctx->debug&FF_DEBUG_DCT_COEFF) {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[... |
1,209 | int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb,
int first_slice)
{
int i, ret;
MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = mmco_temp;
int mmco_index = 0;
if (h->nal_unit_type == NAL_IDR_SLICE) { // FIXME fields
skip_bits1(gb); // brok... | false | FFmpeg | c51c08e0e70c186971385bdbb225f69edd4e3375 | int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb,
int first_slice)
{
int i, ret;
MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = mmco_temp;
int mmco_index = 0;
if (h->nal_unit_type == NAL_IDR_SLICE) {
skip_bits1(gb);
if (get_bits... | {
"code": [],
"line_no": []
} | int FUNC_0(H264Context *VAR_0, GetBitContext *VAR_1,
int VAR_2)
{
int VAR_3, VAR_4;
MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = mmco_temp;
int VAR_5 = 0;
if (VAR_0->nal_unit_type == NAL_IDR_SLICE) {
skip_bits1(VAR_1);
if (get_bits1(VAR_1)) {
... | [
"int FUNC_0(H264Context *VAR_0, GetBitContext *VAR_1,\nint VAR_2)\n{",
"int VAR_3, VAR_4;",
"MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = mmco_temp;",
"int VAR_5 = 0;",
"if (VAR_0->nal_unit_type == NAL_IDR_SLICE) {",
"skip_bits1(VAR_1);",
"if (get_bits1(VAR_1)) {",
"mmco[0].opcode = MMCO_LONG;",
"mmco[... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43,
45,
47
],
[... |
1,210 | static int init_input_stream(int ist_index, char *error, int error_len)
{
int i;
InputStream *ist = input_streams[ist_index];
if (ist->decoding_needed) {
AVCodec *codec = ist->dec;
if (!codec) {
snprintf(error, error_len, "Decoder (codec id %d) not found for input stream #... | false | FFmpeg | c854102da773fa898cc6dbc8ca474b1088ce5f12 | static int init_input_stream(int ist_index, char *error, int error_len)
{
int i;
InputStream *ist = input_streams[ist_index];
if (ist->decoding_needed) {
AVCodec *codec = ist->dec;
if (!codec) {
snprintf(error, error_len, "Decoder (codec id %d) not found for input stream #... | {
"code": [],
"line_no": []
} | static int FUNC_0(int VAR_0, char *VAR_1, int VAR_2)
{
int VAR_3;
InputStream *ist = input_streams[VAR_0];
if (ist->decoding_needed) {
AVCodec *codec = ist->dec;
if (!codec) {
snprintf(VAR_1, VAR_2, "Decoder (codec id %d) not found for input stream #%d:%d",
... | [
"static int FUNC_0(int VAR_0, char *VAR_1, int VAR_2)\n{",
"int VAR_3;",
"InputStream *ist = input_streams[VAR_0];",
"if (ist->decoding_needed) {",
"AVCodec *codec = ist->dec;",
"if (!codec) {",
"snprintf(VAR_1, VAR_2, \"Decoder (codec id %d) not found for input stream #%d:%d\",\nist->st->codec->codec_i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[... |
1,212 | build_tpm_tcpa(GArray *table_data, BIOSLinker *linker, GArray *tcpalog)
{
Acpi20Tcpa *tcpa = acpi_data_push(table_data, sizeof *tcpa);
tcpa->platform_class = cpu_to_le16(TPM_TCPA_ACPI_CLASS_CLIENT);
tcpa->log_area_minimum_length = cpu_to_le32(TPM_LOG_AREA_MINIMUM_SIZE);
acpi_data_push(tcpalog, le... | false | qemu | 4678124bb9bfb49e93b83f95c4d2feeb443ea38b | build_tpm_tcpa(GArray *table_data, BIOSLinker *linker, GArray *tcpalog)
{
Acpi20Tcpa *tcpa = acpi_data_push(table_data, sizeof *tcpa);
tcpa->platform_class = cpu_to_le16(TPM_TCPA_ACPI_CLASS_CLIENT);
tcpa->log_area_minimum_length = cpu_to_le32(TPM_LOG_AREA_MINIMUM_SIZE);
acpi_data_push(tcpalog, le... | {
"code": [],
"line_no": []
} | FUNC_0(GArray *VAR_0, BIOSLinker *VAR_1, GArray *VAR_2)
{
Acpi20Tcpa *tcpa = acpi_data_push(VAR_0, sizeof *tcpa);
tcpa->platform_class = cpu_to_le16(TPM_TCPA_ACPI_CLASS_CLIENT);
tcpa->log_area_minimum_length = cpu_to_le32(TPM_LOG_AREA_MINIMUM_SIZE);
acpi_data_push(VAR_2, le32_to_cpu(tcpa->log_are... | [
"FUNC_0(GArray *VAR_0, BIOSLinker *VAR_1, GArray *VAR_2)\n{",
"Acpi20Tcpa *tcpa = acpi_data_push(VAR_0, sizeof *tcpa);",
"tcpa->platform_class = cpu_to_le16(TPM_TCPA_ACPI_CLASS_CLIENT);",
"tcpa->log_area_minimum_length = cpu_to_le32(TPM_LOG_AREA_MINIMUM_SIZE);",
"acpi_data_push(VAR_2, le32_to_cpu(tcpa->log_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
25,
27,
29,
31
],
[
35,
37
],
[
39
]
] |
1,213 | static CharDriverState *qemu_chr_open_udp_fd(int fd)
{
CharDriverState *chr = NULL;
NetCharDriver *s = NULL;
chr = g_malloc0(sizeof(CharDriverState));
s = g_malloc0(sizeof(NetCharDriver));
s->fd = fd;
s->chan = io_channel_from_socket(s->fd);
s->bufcnt = 0;
s->bufptr = 0;
... | false | qemu | db39fcf1f690b02d612e2bfc00980700887abe03 | static CharDriverState *qemu_chr_open_udp_fd(int fd)
{
CharDriverState *chr = NULL;
NetCharDriver *s = NULL;
chr = g_malloc0(sizeof(CharDriverState));
s = g_malloc0(sizeof(NetCharDriver));
s->fd = fd;
s->chan = io_channel_from_socket(s->fd);
s->bufcnt = 0;
s->bufptr = 0;
... | {
"code": [],
"line_no": []
} | static CharDriverState *FUNC_0(int fd)
{
CharDriverState *chr = NULL;
NetCharDriver *s = NULL;
chr = g_malloc0(sizeof(CharDriverState));
s = g_malloc0(sizeof(NetCharDriver));
s->fd = fd;
s->chan = io_channel_from_socket(s->fd);
s->bufcnt = 0;
s->bufptr = 0;
chr->opaque ... | [
"static CharDriverState *FUNC_0(int fd)\n{",
"CharDriverState *chr = NULL;",
"NetCharDriver *s = NULL;",
"chr = g_malloc0(sizeof(CharDriverState));",
"s = g_malloc0(sizeof(NetCharDriver));",
"s->fd = fd;",
"s->chan = io_channel_from_socket(s->fd);",
"s->bufcnt = 0;",
"s->bufptr = 0;",
"chr->opaque... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
]
] |
1,214 | static int get_pix_fmt_score(enum AVPixelFormat dst_pix_fmt,
enum AVPixelFormat src_pix_fmt,
unsigned *lossp, unsigned consider)
{
const AVPixFmtDescriptor *src_desc = av_pix_fmt_desc_get(src_pix_fmt);
const AVPixFmtDescriptor *dst_desc = av_pix_f... | false | FFmpeg | 8a442d7a8a687a469ca502a18a0c68f5302b15e0 | static int get_pix_fmt_score(enum AVPixelFormat dst_pix_fmt,
enum AVPixelFormat src_pix_fmt,
unsigned *lossp, unsigned consider)
{
const AVPixFmtDescriptor *src_desc = av_pix_fmt_desc_get(src_pix_fmt);
const AVPixFmtDescriptor *dst_desc = av_pix_f... | {
"code": [],
"line_no": []
} | static int FUNC_0(enum AVPixelFormat VAR_0,
enum AVPixelFormat VAR_1,
unsigned *VAR_2, unsigned VAR_3)
{
const AVPixFmtDescriptor *VAR_4 = av_pix_fmt_desc_get(VAR_1);
const AVPixFmtDescriptor *VAR_5 = av_pix_fmt_desc_get(VAR_0);
int VAR_6, VA... | [
"static int FUNC_0(enum AVPixelFormat VAR_0,\nenum AVPixelFormat VAR_1,\nunsigned *VAR_2, unsigned VAR_3)\n{",
"const AVPixFmtDescriptor *VAR_4 = av_pix_fmt_desc_get(VAR_1);",
"const AVPixFmtDescriptor *VAR_5 = av_pix_fmt_desc_get(VAR_0);",
"int VAR_6, VAR_7;",
"int VAR_8, VAR_9, VAR_10, VAR_11;",
"int VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
31
],
[
35,
37
],
[
41,
43
],
[
45,
47
],
[
51
],
[
53
],
[
55,
57
],
[
59,
61
... |
1,216 | static void pc_init1(ram_addr_t ram_size,
const char *boot_device,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename,
int pci_enabled, const char *cpu_model)
{
char *filename;
int ret, l... | false | qemu | 406c8df3a96414c2c9602081727f0782369de699 | static void pc_init1(ram_addr_t ram_size,
const char *boot_device,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename,
int pci_enabled, const char *cpu_model)
{
char *filename;
int ret, l... | {
"code": [],
"line_no": []
} | static void FUNC_0(ram_addr_t VAR_0,
const char *VAR_1,
const char *VAR_2, const char *VAR_3,
const char *VAR_4,
int VAR_5, const char *VAR_6)
{
char *VAR_7;
int VAR_8, VAR_9, VAR_10;
ram_addr_t ram_addr, bios_offset... | [
"static void FUNC_0(ram_addr_t VAR_0,\nconst char *VAR_1,\nconst char *VAR_2, const char *VAR_3,\nconst char *VAR_4,\nint VAR_5, const char *VAR_6)\n{",
"char *VAR_7;",
"int VAR_8, VAR_9, VAR_10;",
"ram_addr_t ram_addr, bios_offset, option_rom_offset;",
"ram_addr_t below_4g_mem_size, above_4g_mem_size = 0;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
... |
1,217 | static ssize_t v9fs_synth_lgetxattr(FsContext *ctx, V9fsPath *path,
const char *name, void *value, size_t size)
{
errno = ENOTSUP;
return -1;
}
| false | qemu | 364031f17932814484657e5551ba12957d993d7e | static ssize_t v9fs_synth_lgetxattr(FsContext *ctx, V9fsPath *path,
const char *name, void *value, size_t size)
{
errno = ENOTSUP;
return -1;
}
| {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(FsContext *ctx, V9fsPath *path,
const char *name, void *value, size_t size)
{
errno = ENOTSUP;
return -1;
}
| [
"static ssize_t FUNC_0(FsContext *ctx, V9fsPath *path,\nconst char *name, void *value, size_t size)\n{",
"errno = ENOTSUP;",
"return -1;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
]
] |
1,218 | static void aw_emac_cleanup(NetClientState *nc)
{
AwEmacState *s = qemu_get_nic_opaque(nc);
s->nic = NULL;
}
| false | qemu | 57407ea44cc0a3d630b9b89a2be011f1955ce5c1 | static void aw_emac_cleanup(NetClientState *nc)
{
AwEmacState *s = qemu_get_nic_opaque(nc);
s->nic = NULL;
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(NetClientState *VAR_0)
{
AwEmacState *s = qemu_get_nic_opaque(VAR_0);
s->nic = NULL;
}
| [
"static void FUNC_0(NetClientState *VAR_0)\n{",
"AwEmacState *s = qemu_get_nic_opaque(VAR_0);",
"s->nic = NULL;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
1,220 | static void virtio_net_set_features(VirtIODevice *vdev, uint32_t features)
{
VirtIONet *n = VIRTIO_NET(vdev);
int i;
virtio_net_set_multiqueue(n, !!(features & (1 << VIRTIO_NET_F_MQ)),
!!(features & (1 << VIRTIO_NET_F_CTRL_VQ)));
virtio_net_set_mrg_rx_bufs(n, !!(f... | false | qemu | ec57db1630f9cdcd13c8c55acbc8daf5237aabf1 | static void virtio_net_set_features(VirtIODevice *vdev, uint32_t features)
{
VirtIONet *n = VIRTIO_NET(vdev);
int i;
virtio_net_set_multiqueue(n, !!(features & (1 << VIRTIO_NET_F_MQ)),
!!(features & (1 << VIRTIO_NET_F_CTRL_VQ)));
virtio_net_set_mrg_rx_bufs(n, !!(f... | {
"code": [],
"line_no": []
} | static void FUNC_0(VirtIODevice *VAR_0, uint32_t VAR_1)
{
VirtIONet *n = VIRTIO_NET(VAR_0);
int VAR_2;
virtio_net_set_multiqueue(n, !!(VAR_1 & (1 << VIRTIO_NET_F_MQ)),
!!(VAR_1 & (1 << VIRTIO_NET_F_CTRL_VQ)));
virtio_net_set_mrg_rx_bufs(n, !!(VAR_1 & (1 << VIRTIO_... | [
"static void FUNC_0(VirtIODevice *VAR_0, uint32_t VAR_1)\n{",
"VirtIONet *n = VIRTIO_NET(VAR_0);",
"int VAR_2;",
"virtio_net_set_multiqueue(n, !!(VAR_1 & (1 << VIRTIO_NET_F_MQ)),\n!!(VAR_1 & (1 << VIRTIO_NET_F_CTRL_VQ)));",
"virtio_net_set_mrg_rx_bufs(n, !!(VAR_1 & (1 << VIRTIO_NET_F_MRG_RXBUF)));",
"if (... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
21
],
[
23,
25,
27,
29,
31,
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57... |
1,221 | void qemu_del_nic(NICState *nic)
{
int i, queues = nic->conf->queues;
/* If this is a peer NIC and peer has already been deleted, free it now. */
if (nic->peer_deleted) {
for (i = 0; i < queues; i++) {
qemu_free_net_client(qemu_get_subqueue(nic, i)->peer);
}
}
... | false | qemu | b890492110ccdc943554231d40b67d29fef6af82 | void qemu_del_nic(NICState *nic)
{
int i, queues = nic->conf->queues;
if (nic->peer_deleted) {
for (i = 0; i < queues; i++) {
qemu_free_net_client(qemu_get_subqueue(nic, i)->peer);
}
}
for (i = queues - 1; i >= 0; i--) {
NetClientState *nc = qemu_ge... | {
"code": [],
"line_no": []
} | void FUNC_0(NICState *VAR_0)
{
int VAR_1, VAR_2 = VAR_0->conf->VAR_2;
if (VAR_0->peer_deleted) {
for (VAR_1 = 0; VAR_1 < VAR_2; VAR_1++) {
qemu_free_net_client(qemu_get_subqueue(VAR_0, VAR_1)->peer);
}
}
for (VAR_1 = VAR_2 - 1; VAR_1 >= 0; VAR_1--) {
... | [
"void FUNC_0(NICState *VAR_0)\n{",
"int VAR_1, VAR_2 = VAR_0->conf->VAR_2;",
"if (VAR_0->peer_deleted) {",
"for (VAR_1 = 0; VAR_1 < VAR_2; VAR_1++) {",
"qemu_free_net_client(qemu_get_subqueue(VAR_0, VAR_1)->peer);",
"}",
"}",
"for (VAR_1 = VAR_2 - 1; VAR_1 >= 0; VAR_1--) {",
"NetClientState *nc = qe... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
1,222 | static int vfio_initfn(PCIDevice *pdev)
{
VFIOPCIDevice *vdev = DO_UPCAST(VFIOPCIDevice, pdev, pdev);
VFIODevice *vbasedev_iter;
VFIOGroup *group;
char path[PATH_MAX], iommu_group_path[PATH_MAX], *group_name;
ssize_t len;
struct stat st;
int groupid;
int ret;
/* Check tha... | false | qemu | 7df9381b7aa56c897e344f3bfe43bf5848bbd3e0 | static int vfio_initfn(PCIDevice *pdev)
{
VFIOPCIDevice *vdev = DO_UPCAST(VFIOPCIDevice, pdev, pdev);
VFIODevice *vbasedev_iter;
VFIOGroup *group;
char path[PATH_MAX], iommu_group_path[PATH_MAX], *group_name;
ssize_t len;
struct stat st;
int groupid;
int ret;
snprin... | {
"code": [],
"line_no": []
} | static int FUNC_0(PCIDevice *VAR_0)
{
VFIOPCIDevice *vdev = DO_UPCAST(VFIOPCIDevice, VAR_0, VAR_0);
VFIODevice *vbasedev_iter;
VFIOGroup *group;
char VAR_1[PATH_MAX], iommu_group_path[PATH_MAX], *group_name;
ssize_t len;
struct stat VAR_2;
int VAR_3;
int VAR_4;
snpr... | [
"static int FUNC_0(PCIDevice *VAR_0)\n{",
"VFIOPCIDevice *vdev = DO_UPCAST(VFIOPCIDevice, VAR_0, VAR_0);",
"VFIODevice *vbasedev_iter;",
"VFIOGroup *group;",
"char VAR_1[PATH_MAX], iommu_group_path[PATH_MAX], *group_name;",
"ssize_t len;",
"struct stat VAR_2;",
"int VAR_3;",
"int VAR_4;",
"snprint... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25,
27,
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49,
51,
53
],
[... |
1,223 | static void absolute_mouse_grab(void)
{
int mouse_x, mouse_y;
if (SDL_GetAppState() & SDL_APPINPUTFOCUS) {
SDL_GetMouseState(&mouse_x, &mouse_y);
if (mouse_x > 0 && mouse_x < real_screen->w - 1 &&
mouse_y > 0 && mouse_y < real_screen->h - 1) {
sdl_grab_start();
... | false | qemu | 85f94f868fcd868f0f605e9d3c1ad6351c557190 | static void absolute_mouse_grab(void)
{
int mouse_x, mouse_y;
if (SDL_GetAppState() & SDL_APPINPUTFOCUS) {
SDL_GetMouseState(&mouse_x, &mouse_y);
if (mouse_x > 0 && mouse_x < real_screen->w - 1 &&
mouse_y > 0 && mouse_y < real_screen->h - 1) {
sdl_grab_start();
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
int VAR_0, VAR_1;
if (SDL_GetAppState() & SDL_APPINPUTFOCUS) {
SDL_GetMouseState(&VAR_0, &VAR_1);
if (VAR_0 > 0 && VAR_0 < real_screen->w - 1 &&
VAR_1 > 0 && VAR_1 < real_screen->h - 1) {
sdl_grab_start();
}
}
}
| [
"static void FUNC_0(void)\n{",
"int VAR_0, VAR_1;",
"if (SDL_GetAppState() & SDL_APPINPUTFOCUS) {",
"SDL_GetMouseState(&VAR_0, &VAR_1);",
"if (VAR_0 > 0 && VAR_0 < real_screen->w - 1 &&\nVAR_1 > 0 && VAR_1 < real_screen->h - 1) {",
"sdl_grab_start();",
"}",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
1,224 | int socket_dgram(SocketAddress *remote, SocketAddress *local, Error **errp)
{
int fd;
switch (remote->type) {
case SOCKET_ADDRESS_KIND_INET:
fd = inet_dgram_saddr(remote->u.inet, local ? local->u.inet : NULL, errp);
break;
default:
error_setg(errp, "socket type unsupp... | false | qemu | 32bafa8fdd098d52fbf1102d5a5e48d29398c0aa | int socket_dgram(SocketAddress *remote, SocketAddress *local, Error **errp)
{
int fd;
switch (remote->type) {
case SOCKET_ADDRESS_KIND_INET:
fd = inet_dgram_saddr(remote->u.inet, local ? local->u.inet : NULL, errp);
break;
default:
error_setg(errp, "socket type unsupp... | {
"code": [],
"line_no": []
} | int FUNC_0(SocketAddress *VAR_0, SocketAddress *VAR_1, Error **VAR_2)
{
int VAR_3;
switch (VAR_0->type) {
case SOCKET_ADDRESS_KIND_INET:
VAR_3 = inet_dgram_saddr(VAR_0->u.inet, VAR_1 ? VAR_1->u.inet : NULL, VAR_2);
break;
default:
error_setg(VAR_2, "socket type unsupp... | [
"int FUNC_0(SocketAddress *VAR_0, SocketAddress *VAR_1, Error **VAR_2)\n{",
"int VAR_3;",
"switch (VAR_0->type) {",
"case SOCKET_ADDRESS_KIND_INET:\nVAR_3 = inet_dgram_saddr(VAR_0->u.inet, VAR_1 ? VAR_1->u.inet : NULL, VAR_2);",
"break;",
"default:\nerror_setg(VAR_2, \"socket type unsupported for datagram... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
1,225 | static int update_wrap_reference(AVFormatContext *s, AVStream *st, int stream_index)
{
if (s->correct_ts_overflow && st->pts_wrap_bits < 63 &&
st->pts_wrap_reference == AV_NOPTS_VALUE && st->first_dts != AV_NOPTS_VALUE) {
int i;
// reference time stamp should be 60 s before first time... | false | FFmpeg | dd5f925927d6aaf01716a1a802a428340eeea077 | static int update_wrap_reference(AVFormatContext *s, AVStream *st, int stream_index)
{
if (s->correct_ts_overflow && st->pts_wrap_bits < 63 &&
st->pts_wrap_reference == AV_NOPTS_VALUE && st->first_dts != AV_NOPTS_VALUE) {
int i;
int64_t pts_wrap_reference = st->first_dts - a... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVStream *VAR_1, int VAR_2)
{
if (VAR_0->correct_ts_overflow && VAR_1->pts_wrap_bits < 63 &&
VAR_1->pts_wrap_reference == AV_NOPTS_VALUE && VAR_1->first_dts != AV_NOPTS_VALUE) {
int VAR_3;
int64_t pts_wrap_reference = VAR_1->first_dt... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVStream *VAR_1, int VAR_2)\n{",
"if (VAR_0->correct_ts_overflow && VAR_1->pts_wrap_bits < 63 &&\nVAR_1->pts_wrap_reference == AV_NOPTS_VALUE && VAR_1->first_dts != AV_NOPTS_VALUE) {",
"int VAR_3;",
"int64_t pts_wrap_reference = VAR_1->first_dts - av_rescale(60, 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
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
15
],
[
19,
21,
23
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[... |
1,228 | uint64_t HELPER(diag)(CPUS390XState *env, uint32_t num, uint64_t mem,
uint64_t code)
{
uint64_t r;
switch (num) {
case 0x500:
/* KVM hypercall */
r = s390_virtio_hypercall(env);
break;
case 0x44:
/* yield */
r = 0;
break... | false | qemu | 8df7eef3059394bd53cdf7609aac9a50a78aa030 | uint64_t HELPER(diag)(CPUS390XState *env, uint32_t num, uint64_t mem,
uint64_t code)
{
uint64_t r;
switch (num) {
case 0x500:
r = s390_virtio_hypercall(env);
break;
case 0x44:
r = 0;
break;
case 0x308:
... | {
"code": [],
"line_no": []
} | uint64_t FUNC_0(diag)(CPUS390XState *env, uint32_t num, uint64_t mem,
uint64_t code)
{
uint64_t r;
switch (num) {
case 0x500:
r = s390_virtio_hypercall(env);
break;
case 0x44:
r = 0;
break;
case 0x308:
... | [
"uint64_t FUNC_0(diag)(CPUS390XState *env, uint32_t num, uint64_t mem,\nuint64_t code)\n{",
"uint64_t r;",
"switch (num) {",
"case 0x500:\nr = s390_virtio_hypercall(env);",
"break;",
"case 0x44:\nr = 0;",
"break;",
"case 0x308:\nr = 0;",
"break;",
"default:\nr = -1;",
"break;",
"}",
"if (r) ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13,
17
],
[
19
],
[
21,
25
],
[
27
],
[
29,
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
55
],
[
57
]
] |
1,229 | static uint64_t get_cluster_offset(BlockDriverState *bs,
VmdkExtent *extent,
VmdkMetaData *m_data,
uint64_t offset, int allocate)
{
unsigned int l1_index, l2_offset, l2_index;
int min_index, i, j;
... | false | qemu | 91b85bd388c3767e6b63aaf33851dbfe87ea24d1 | static uint64_t get_cluster_offset(BlockDriverState *bs,
VmdkExtent *extent,
VmdkMetaData *m_data,
uint64_t offset, int allocate)
{
unsigned int l1_index, l2_offset, l2_index;
int min_index, i, j;
... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(BlockDriverState *bs,
VmdkExtent *extent,
VmdkMetaData *m_data,
uint64_t offset, int allocate)
{
unsigned int VAR_0, VAR_1, VAR_2;
int VAR_3, VAR_4, VAR_5;
uint32_t min_c... | [
"static uint64_t FUNC_0(BlockDriverState *bs,\nVmdkExtent *extent,\nVmdkMetaData *m_data,\nuint64_t offset, int allocate)\n{",
"unsigned int VAR_0, VAR_1, VAR_2;",
"int VAR_3, VAR_4, VAR_5;",
"uint32_t min_count, *l2_table, tmp = 0;",
"uint64_t cluster_offset;",
"if (m_data)\nm_data->valid = 0;",
"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
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.