function_name
stringlengths
1
87
binary_name
stringlengths
64
64
author_name
stringlengths
2
36
project_name
stringlengths
1
48
opt
stringclasses
1 value
src
stringlengths
11
425k
dbg
stringclasses
1 value
codeart
stringlengths
257
560k
lmpa
stringlengths
619
152k
bpf_create_map_node
f697a76c1b8a68f879e8a28d13b1cbc21453acbdddc35cda76ca2582bbd7166a
Netronome
libkefir
NA
int bpf_create_map_node(enum bpf_map_type map_type, const char *name, int key_size, int value_size, int max_entries, __u32 map_flags, int node) { struct bpf_create_map_attr map_attr = {}; map_attr.name = name; map_attr.map_type = map_type; map_attr.map_flags = map_flags; map_attr.key_size = key_size; map_attr.value_size = value_size; map_attr.max_entries = max_entries; if (node >= 0) { map_attr.numa_node = node; map_attr.map_flags |= BPF_F_NUMA_NODE; } return bpf_create_map_xattr(&map_attr); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41299D", "function_addr": 4270493, "binary_name": "f697a76c1b8a68f879e8a28d13b1cbc21453acbdddc35cda76ca2582bbd7166a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 60h"], [3, "mov [rbp+var_44], edi"], [4, "mov [rbp+var_50], rsi"], [5, "mov [rbp+var_48], edx"], [6, "mov [rbp+var_54], ecx"], [7, "mov [rbp+var_58], r8d"], [8, "mov [rbp+var_5C], r9d"], [9, "mov [rbp+var_40], 0"], [10, "mov [rbp+var_38], 0"], [11, "mov [rbp+var_30], 0"], [12, "mov [rbp+var_28], 0"], [13, "mov [rbp+var_20], 0"], [14, "mov [rbp+var_18], 0"], [15, "mov [rbp+var_10], 0"], [16, "mov rax, [rbp+var_50]"], [17, "mov [rbp+var_40], rax"], [18, "mov eax, [rbp+var_44]"], [19, "mov dword ptr [rbp+var_38], eax"], [20, "mov eax, [rbp+var_5C]"], [21, "mov dword ptr [rbp+var_38+4], eax"], [22, "mov eax, [rbp+var_48]"], [23, "mov dword ptr [rbp+var_30], eax"], [24, "mov eax, [rbp+var_54]"], [25, "mov dword ptr [rbp+var_30+4], eax"], [26, "mov eax, [rbp+var_58]"], [27, "mov dword ptr [rbp+var_28], eax"], [28, "cmp [rbp+arg_0], 0"], [29, "js short loc_412A2D"], [30, "mov eax, [rbp+arg_0]"], [31, "mov dword ptr [rbp+var_28+4], eax"], [32, "mov eax, dword ptr [rbp+var_38+4]"], [33, "or eax, 4"], [34, "mov dword ptr [rbp+var_38+4], eax"], [35, "lea rax, [rbp+var_40]"], [36, "mov rdi, rax"], [37, "call sub_412857"], [38, "leave"], [39, "retn"]], "data_dep": [[16, 4], [17, 16], [18, 3], [19, 18], [20, 8], [21, 20], [22, 5], [23, 22], [24, 6], [25, 24], [26, 7], [27, 26], [29, 28], [31, 30], [32, 21], [33, 32], [34, 33], [35, 33], [35, 17], [35, 26], [36, 35], [39, 37]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/f697a76c1b8a68f879e8a28d13b1cbc21453acbdddc35cda76ca2582bbd7166a_f697a76c1b8a68f879e8a28d13b1cbc21453acbdddc35cda76ca2582bbd7166a.jsonl.gz", "strip_func_name": "sub_41299D", "query": "\n\n\n__int64 __fastcall sub_41299D(unsigned int a1, __int64 a2, unsigned int a3, unsigned int a4, unsigned int a5, unsigned int a6, int a7)\n{\n__int64 v8; // [rsp+20h] [rbp-40h] BYREF\nunsigned __int64 v9; // [rsp+28h] [rbp-38h]\nunsigned __int64 v10; // [rsp+30h] [rbp-30h]\n__int64 v11; // [rsp+38h] [rbp-28h]\n__int64 v12; // [rsp+40h] [rbp-20h]\n__int64 v13; // [rsp+48h] [rbp-18h]\n__int64 v14; // [rsp+50h] [rbp-10h]\n\nv12 = 0LL;\nv13 = 0LL;\nv14 = 0LL;\nv8 = a2;\nv9 = __PAIR64__(a6, a1);\nv10 = __PAIR64__(a4, a3);\nv11 = a5;\nif ( a7 >= 0 )\n{\nHIDWORD(v11) = a7;\nHIDWORD(v9) |= 4u;\n}\nreturn sub_412857((__int64)&v8);\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,a7,v8,sub_41299D,sub_412857,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'key_size', 'a4': 'value_size', 'a1': 'map_type', 'a2': 'name', 'a5': 'max_entries', 'a6': 'map_flags', 'a7': 'node', 'v8': 'map_attr', 'sub_41299D': 'bpf_create_map_node', 'sub_412857': 'bpf_create_map_xattr'}"}
re_compile_fastmap_iter
f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83
msysgit
msysgit
NA
static void re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, char *fastmap) { volatile re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; int node_cnt; int icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE)); for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) { int node = init_state->nodes.elems[node_cnt]; re_token_type_t type = dfa->nodes[node].type; if (type == CHARACTER) { re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); #ifdef RE_ENABLE_I18N if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) { unsigned char *buf = re_malloc (unsigned char, dfa->mb_cur_max), *p; wchar_t wc; mbstate_t state; p = buf; *p++ = dfa->nodes[node].opr.c; while (++node < dfa->nodes_len && dfa->nodes[node].type == CHARACTER && dfa->nodes[node].mb_partial) *p++ = dfa->nodes[node].opr.c; memset (&state, '\0', sizeof (state)); if (__mbrtowc (&wc, (const char *) buf, p - buf, &state) == p - buf && (__wcrtomb ((char *) buf, towlower (wc), &state) != (size_t) -1)) re_set_fastmap (fastmap, 0, buf[0]); re_free (buf); } #endif } else if (type == SIMPLE_BRACKET) { int i, ch; for (i = 0, ch = 0; i < BITSET_WORDS; ++i) { int j; bitset_word_t w = dfa->nodes[node].opr.sbcset[i]; for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) if (w & ((bitset_word_t) 1 << j)) re_set_fastmap (fastmap, icase, ch); } } #ifdef RE_ENABLE_I18N else if (type == COMPLEX_BRACKET) { re_charset_t *cset = dfa->nodes[node].opr.mbcset; int i; # ifdef _LIBC /* See if we have to try all bytes which start multiple collation elements. e.g. In da_DK, we want to catch 'a' since "aa" is a valid collation element, and don't catch 'b' since 'b' is the only collation element which starts from 'b' (and it is caught by SIMPLE_BRACKET). */ if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0 && (cset->ncoll_syms || cset->nranges)) { const int32_t *table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); for (i = 0; i < SBC_MAX; ++i) if (table[i] < 0) re_set_fastmap (fastmap, icase, i); } # endif /* _LIBC */ /* See if we have to start the match at all multibyte characters, i.e. where we would not find an invalid sequence. This only applies to multibyte character sets; for single byte character sets, the SIMPLE_BRACKET again suffices. */ if (dfa->mb_cur_max > 1 && (cset->nchar_classes || cset->non_match || cset->nranges # ifdef _LIBC || cset->nequiv_classes # endif /* _LIBC */ )) { unsigned char c = 0; do { mbstate_t mbs; memset (&mbs, 0, sizeof (mbs)); if (__mbrtowc (NULL, (char *) &c, 1, &mbs) == (size_t) -2) re_set_fastmap (fastmap, false, (int) c); } while (++c != 0); } else { /* ... Else catch all bytes which can start the mbchars. */ for (i = 0; i < cset->nmbchars; ++i) { char buf[256]; mbstate_t state; memset (&state, '\0', sizeof (state)); if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1) re_set_fastmap (fastmap, icase, *(unsigned char *) buf); if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) { if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state) != (size_t) -1) re_set_fastmap (fastmap, false, *(unsigned char *) buf); } } } } #endif /* RE_ENABLE_I18N */ else if (type == OP_PERIOD #ifdef RE_ENABLE_I18N || type == OP_UTF8_PERIOD #endif /* RE_ENABLE_I18N */ || type == END_OF_RE) { memset (fastmap, '\1', sizeof (char) * SBC_MAX); if (type == END_OF_RE) bufp->can_be_null = 1; return; } } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42A93A", "function_addr": 4368698, "binary_name": "f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 70h"], [3, "mov [rbp+var_58], rdi"], [4, "mov [rbp+var_60], rsi"], [5, "mov [rbp+s], rdx"], [6, "mov rax, [rbp+var_58]"], [7, "mov rax, [rax]"], [8, "mov [rbp+var_18], rax"], [9, "mov rax, [rbp+var_18]"], [10, "mov eax, [rax+0A4h]"], [11, "cmp eax, 1"], [12, "jnz short loc_42A981"], [13, "mov rax, [rbp+var_58]"], [14, "mov rax, [rax+18h]"], [15, "and eax, 200000h"], [16, "test rax, rax"], [17, "jz short loc_42A981"], [18, "mov eax, 1"], [19, "jmp short loc_42A986"], [20, "mov eax, 0"], [21, "mov [rbp+var_1C], eax"], [22, "mov [rbp+var_4], 0"], [23, "jmp loc_42AB38"], [24, "mov rax, [rbp+var_60]"], [25, "mov rdx, [rax+10h]"], [26, "mov eax, [rbp+var_4]"], [27, "cdqe"], [28, "shl rax, 2"], [29, "add rax, rdx"], [30, "mov eax, [rax]"], [31, "mov [rbp+var_20], eax"], [32, "mov rax, [rbp+var_18]"], [33, "mov rdx, [rax]"], [34, "mov eax, [rbp+var_20]"], [35, "cdqe"], [36, "shl rax, 4"], [37, "add rax, rdx"], [38, "movzx eax, byte ptr [rax+8]"], [39, "movzx eax, al"], [40, "mov [rbp+var_24], eax"], [41, "cmp [rbp+var_24], 1"], [42, "jnz short loc_42AA31"], [43, "mov rax, [rbp+var_18]"], [44, "mov rdx, [rax]"], [45, "mov eax, [rbp+var_20]"], [46, "cdqe"], [47, "shl rax, 4"], [48, "add rax, rdx"], [49, "movzx eax, byte ptr [rax]"], [50, "movzx eax, al"], [51, "mov rdx, [rbp+s]"], [52, "mov [rbp+var_38], rdx"], [53, "mov edx, [rbp+var_1C]"], [54, "mov [rbp+var_3C], edx"], [55, "mov [rbp+c], eax"], [56, "mov eax, [rbp+c]"], [57, "movsxd rdx, eax"], [58, "mov rax, [rbp+var_38]"], [59, "add rax, rdx"], [60, "mov byte ptr [rax], 1"], [61, "cmp [rbp+var_3C], 0"], [62, "jz loc_42AB33"], [63, "mov eax, [rbp+c]"], [64, "mov edi, eax"], [65, "call _tolower"], [66, "movsxd rdx, eax"], [67, "mov rax, [rbp+var_38]"], [68, "add rax, rdx"], [69, "mov byte ptr [rax], 1"], [70, "jmp loc_42AB33"], [71, "cmp [rbp+var_24], 3"], [72, "jnz loc_42AAFB"], [73, "mov [rbp+var_8], 0"], [74, "mov [rbp+var_C], 0"], [75, "jmp loc_42AAED"], [76, "mov rax, [rbp+var_18]"], [77, "mov rdx, [rax]"], [78, "mov eax, [rbp+var_20]"], [79, "cdqe"], [80, "shl rax, 4"], [81, "add rax, rdx"], [82, "mov rdx, [rax]"], [83, "mov eax, [rbp+var_8]"], [84, "cdqe"], [85, "shl rax, 3"], [86, "add rax, rdx"], [87, "mov rax, [rax]"], [88, "mov [rbp+var_30], rax"], [89, "mov [rbp+var_10], 0"], [90, "jmp short loc_42AAE1"], [91, "mov eax, [rbp+var_10]"], [92, "mov rdx, [rbp+var_30]"], [93, "mov ecx, eax"], [94, "shr rdx, cl"], [95, "mov rax, rdx"], [96, "and eax, 1"], [97, "test rax, rax"], [98, "jz short loc_42AAD9"], [99, "mov rax, [rbp+s]"], [100, "mov [rbp+var_48], rax"], [101, "mov eax, [rbp+var_1C]"], [102, "mov [rbp+var_4C], eax"], [103, "mov eax, [rbp+var_C]"], [104, "mov [rbp+var_50], eax"], [105, "mov eax, [rbp+var_50]"], [106, "movsxd rdx, eax"], [107, "mov rax, [rbp+var_48]"], [108, "add rax, rdx"], [109, "mov byte ptr [rax], 1"], [110, "cmp [rbp+var_4C], 0"], [111, "jz short loc_42AAD8"], [112, "mov eax, [rbp+var_50]"], [113, "mov edi, eax"], [114, "call _tolower"], [115, "movsxd rdx, eax"], [116, "mov rax, [rbp+var_48]"], [117, "add rax, rdx"], [118, "mov byte ptr [rax], 1"], [119, "nop"], [120, "add [rbp+var_10], 1"], [121, "add [rbp+var_C], 1"], [122, "mov eax, [rbp+var_10]"], [123, "cmp eax, 3Fh "], [124, "jbe short loc_42AA80"], [125, "add [rbp+var_8], 1"], [126, "mov eax, [rbp+var_8]"], [127, "cmp eax, 3"], [128, "jbe loc_42AA4E"], [129, "jmp short loc_42AB34"], [130, "cmp [rbp+var_24], 5"], [131, "jz short loc_42AB07"], [132, "cmp [rbp+var_24], 2"], [133, "jnz short loc_42AB34"], [134, "mov rax, [rbp+s]"], [135, "mov edx, 100h"], [136, "mov esi, 1"], [137, "mov rdi, rax"], [138, "call _memset"], [139, "cmp [rbp+var_24], 2"], [140, "jnz short loc_42AB4A"], [141, "mov rax, [rbp+var_58]"], [142, "movzx edx, byte ptr [rax+38h]"], [143, "or edx, 1"], [144, "mov [rax+38h], dl"], [145, "jmp short loc_42AB4A"], [146, "nop"], [147, "add [rbp+var_4], 1"], [148, "mov rax, [rbp+var_60]"], [149, "mov eax, [rax+0Ch]"], [150, "cmp [rbp+var_4], eax"], [151, "jl loc_42A995"], [152, "jmp short locret_42AB4B"], [153, "nop"], [154, "leave"], [155, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [9, 8], [10, 9], [11, 10], [12, 11], [13, 3], [14, 13], [15, 14], [16, 15], [17, 16], [21, 18], [21, 20], [24, 4], [25, 109], [25, 118], [25, 24], [25, 60], [25, 69], [26, 22], [26, 147], [28, 26], [29, 28], [29, 25], [30, 109], [30, 118], [30, 29], [30, 60], [30, 69], [31, 30], [32, 8], [33, 109], [33, 118], [33, 60], [33, 69], [33, 32], [34, 31], [36, 34], [37, 33], [37, 36], [38, 69], [38, 109], [38, 118], [38, 37], [38, 60], [39, 38], [40, 39], [41, 40], [42, 41], [43, 8], [44, 109], [44, 118], [44, 60], [44, 69], [44, 43], [45, 31], [47, 45], [48, 47], [48, 44], [49, 48], [49, 109], [49, 118], [49, 60], [49, 69], [50, 49], [51, 5], [52, 51], [53, 21], [54, 53], [55, 50], [56, 55], [57, 56], [58, 52], [59, 57], [59, 58], [60, 59], [61, 54], [62, 61], [63, 55], [64, 63], [66, 65], [67, 52], [68, 66], [68, 67], [69, 68], [71, 40], [72, 71], [76, 8], [77, 76], [77, 69], [77, 109], [77, 118], [77, 60], [78, 31], [80, 78], [81, 80], [81, 77], [82, 81], [82, 60], [82, 69], [82, 109], [82, 118], [83, 73], [83, 125], [85, 83], [86, 85], [86, 82], [87, 109], [87, 118], [87, 86], [87, 60], [87, 69], [88, 87], [91, 89], [91, 120], [92, 88], [93, 91], [94, 93], [94, 92], [95, 94], [96, 95], [97, 96], [98, 97], [99, 5], [100, 99], [101, 21], [102, 101], [103, 74], [103, 121], [104, 103], [105, 104], [106, 105], [107, 100], [108, 107], [108, 106], [109, 108], [110, 102], [111, 110], [112, 104], [113, 112], [115, 114], [116, 100], [117, 116], [117, 115], [118, 117], [120, 89], [120, 120], [121, 121], [121, 74], [122, 89], [122, 120], [123, 122], [124, 123], [125, 73], [125, 125], [126, 73], [126, 125], [127, 126], [128, 127], [130, 40], [131, 130], [132, 40], [133, 132], [134, 5], [137, 134], [139, 40], [140, 139], [141, 3], [142, 144], [142, 141], [142, 109], [142, 118], [142, 60], [142, 69], [143, 142], [144, 141], [144, 143], [147, 22], [147, 147], [148, 4], [149, 148], [149, 109], [149, 118], [149, 60], [149, 69], [150, 22], [150, 147], [150, 149], [151, 150], [155, 149], [155, 141], [155, 138]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83_f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83.jsonl.gz", "strip_func_name": "sub_42A93A", "query": "\n\n\nvoid *__fastcall sub_42A93A(_QWORD *a1, __int64 a2, _BYTE *a3)\n{\n_BOOL4 v3; // eax\nvoid *result; // rax\nint c; // [rsp+30h] [rbp-40h]\nunsigned __int64 v7; // [rsp+40h] [rbp-30h]\nint v8; // [rsp+4Ch] [rbp-24h]\nint v9; // [rsp+50h] [rbp-20h]\n_BOOL4 v10; // [rsp+54h] [rbp-1Ch]\n_QWORD *v11; // [rsp+58h] [rbp-18h]\nunsigned int j; // [rsp+60h] [rbp-10h]\nint v13; // [rsp+64h] [rbp-Ch]\nunsigned int v14; // [rsp+68h] [rbp-8h]\nint i; // [rsp+6Ch] [rbp-4h]\n\nv11 = (_QWORD *)*a1;\nv3 = *(_DWORD *)(*a1 + 164LL) == 1 && (a1[3] & 0x200000LL) != 0;\nv10 = v3;\nfor ( i = 0; ; ++i )\n{\nresult = (void *)*(unsigned int *)(a2 + 12);\nif ( i >= (int)result )\nbreak;\nv9 = *(_DWORD *)(*(_QWORD *)(a2 + 16) + 4LL * i);\nv8 = *(unsigned __int8 *)(*v11 + 16LL * v9 + 8);\nswitch ( v8 )\n{\ncase 1:\nc = *(unsigned __int8 *)(*v11 + 16LL * v9);\na3[*(unsigned __int8 *)(*v11 + 16LL * v9)] = 1;\nif ( v10 )\na3[tolower(c)] = 1;\nbreak;\ncase 3:\nv14 = 0;\nv13 = 0;\nwhile ( v14 <= 3 )\n{\nv7 = *(_QWORD *)(*(_QWORD *)(*v11 + 16LL * v9) + 8LL * (int)v14);\nfor ( j = 0; j <= 0x3F; ++j )\n{\nif ( ((v7 >> j) & 1) != 0 )\n{\na3[v13] = 1;\nif ( v10 )\na3[tolower(v13)] = 1;\n}\n++v13;\n}\n++v14;\n}\nbreak;\ncase 5:\ncase 2:\nresult = memset(a3, 1, 0x100uLL);\nif ( v8 == 2 )\n{\nresult = a1;\n*((_BYTE *)a1 + 56) |= 1u;\n}\nreturn result;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v7,v8,v9,v10,v11,v13,i,sub_42A93A,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'fastmap', 'a1': 'bufp', 'a2': 'init_state', 'v7': 'w', 'v8': 'type', 'v9': 'node', 'v10': 'icase', 'v11': 'dfa', 'v13': 'ch_0', 'i': 'node_cnt', 'sub_42A93A': 're_compile_fastmap_iter'}"}
interp_Wo
d68176434f077247fc341fc5a78f601fc4013f6cf530a37ed08876b420983acf
shenki
usbaudio-android-demo
NA
void interp_Wo( MODEL *interp, /* interpolated model params */ MODEL *prev, /* previous frames model params */ MODEL *next /* next frames model params */ ) { /* trap corner case where voicing est is probably wrong */ if (interp->voiced && !prev->voiced && !next->voiced) { interp->voiced = 0; } /* Wo depends on voicing of this and adjacent frames */ if (interp->voiced) { if (prev->voiced && next->voiced) interp->Wo = (prev->Wo + next->Wo)/2.0; if (!prev->voiced && next->voiced) interp->Wo = next->Wo; if (prev->voiced && !next->voiced) interp->Wo = prev->Wo; } else { interp->Wo = TWO_PI/P_MAX; } interp->L = PI/interp->Wo; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_406313", "function_addr": 4219667, "binary_name": "d68176434f077247fc341fc5a78f601fc4013f6cf530a37ed08876b420983acf.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov [rbp+var_10], rsi"], [4, "mov [rbp+var_18], rdx"], [5, "mov rax, [rbp+var_8]"], [6, "mov eax, [rax+290h]"], [7, "test eax, eax"], [8, "jz short loc_40635B"], [9, "mov rax, [rbp+var_10]"], [10, "mov eax, [rax+290h]"], [11, "test eax, eax"], [12, "jnz short loc_40635B"], [13, "mov rax, [rbp+var_18]"], [14, "mov eax, [rax+290h]"], [15, "test eax, eax"], [16, "jnz short loc_40635B"], [17, "mov rax, [rbp+var_8]"], [18, "mov dword ptr [rax+290h], 0"], [19, "mov rax, [rbp+var_8]"], [20, "mov eax, [rax+290h]"], [21, "test eax, eax"], [22, "jz loc_40640B"], [23, "mov rax, [rbp+var_10]"], [24, "mov eax, [rax+290h]"], [25, "test eax, eax"], [26, "jz short loc_4063B1"], [27, "mov rax, [rbp+var_18]"], [28, "mov eax, [rax+290h]"], [29, "test eax, eax"], [30, "jz short loc_4063B1"], [31, "mov rax, [rbp+var_10]"], [32, "movss xmm1, dword ptr [rax]"], [33, "mov rax, [rbp+var_18]"], [34, "movss xmm0, dword ptr [rax]"], [35, "addss xmm0, xmm1"], [36, "movss xmm1, cs:dword_4191C0"], [37, "divss xmm0, xmm1"], [38, "mov rax, [rbp+var_8]"], [39, "movss dword ptr [rax], xmm0"], [40, "mov rax, [rbp+var_10]"], [41, "mov eax, [rax+290h]"], [42, "test eax, eax"], [43, "jnz short loc_4063DD"], [44, "mov rax, [rbp+var_18]"], [45, "mov eax, [rax+290h]"], [46, "test eax, eax"], [47, "jz short loc_4063DD"], [48, "mov rax, [rbp+var_18]"], [49, "movss xmm0, dword ptr [rax]"], [50, "mov rax, [rbp+var_8]"], [51, "movss dword ptr [rax], xmm0"], [52, "mov rax, [rbp+var_10]"], [53, "mov eax, [rax+290h]"], [54, "test eax, eax"], [55, "jz short loc_40641B"], [56, "mov rax, [rbp+var_18]"], [57, "mov eax, [rax+290h]"], [58, "test eax, eax"], [59, "jnz short loc_40641B"], [60, "mov rax, [rbp+var_10]"], [61, "movss xmm0, dword ptr [rax]"], [62, "mov rax, [rbp+var_8]"], [63, "movss dword ptr [rax], xmm0"], [64, "jmp short loc_40641B"], [65, "mov rax, [rbp+var_8]"], [66, "movss xmm0, cs:dword_4191C4"], [67, "movss dword ptr [rax], xmm0"], [68, "mov rax, [rbp+var_8]"], [69, "movss xmm0, dword ptr [rax]"], [70, "pxor xmm1, xmm1"], [71, "cvtss2sd xmm1, xmm0"], [72, "movsd xmm0, cs:qword_4191C8"], [73, "divsd xmm0, xmm1"], [74, "cvttsd2si edx, xmm0"], [75, "mov rax, [rbp+var_8]"], [76, "mov [rax+4], edx"], [77, "nop"], [78, "pop rbp"], [79, "retn"]], "data_dep": [[5, 2], [6, 5], [7, 6], [8, 7], [9, 3], [10, 9], [11, 10], [12, 11], [13, 4], [14, 13], [15, 14], [16, 15], [17, 2], [18, 17], [19, 2], [20, 19], [20, 18], [21, 20], [22, 21], [23, 3], [24, 23], [24, 18], [25, 24], [26, 25], [27, 4], [28, 18], [28, 27], [29, 28], [30, 29], [31, 3], [32, 39], [32, 18], [32, 31], [33, 4], [34, 18], [34, 39], [34, 33], [35, 32], [35, 34], [37, 35], [37, 36], [38, 2], [39, 37], [39, 38], [40, 3], [41, 40], [41, 39], [41, 18], [42, 41], [43, 42], [44, 4], [45, 18], [45, 39], [45, 44], [46, 45], [47, 46], [48, 4], [49, 18], [49, 39], [49, 48], [49, 51], [50, 2], [51, 50], [51, 49], [52, 3], [53, 18], [53, 52], [53, 51], [53, 39], [54, 53], [55, 54], [56, 4], [57, 56], [57, 51], [57, 39], [57, 18], [58, 57], [59, 58], [60, 3], [61, 63], [61, 51], [61, 39], [61, 60], [61, 18], [62, 2], [63, 61], [63, 62], [65, 2], [67, 65], [67, 66], [68, 2], [69, 51], [69, 67], [69, 76], [69, 39], [69, 18], [69, 68], [69, 63], [71, 69], [71, 70], [73, 71], [73, 72], [74, 73], [75, 2], [76, 74], [76, 75], [78, 0], [79, 75]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d68176434f077247fc341fc5a78f601fc4013f6cf530a37ed08876b420983acf_d68176434f077247fc341fc5a78f601fc4013f6cf530a37ed08876b420983acf.jsonl.gz", "strip_func_name": "sub_406313", "query": "\n\n\n__int64 __fastcall sub_406313(__int64 a1, __int64 a2, __int64 a3)\n{\n__int64 result; // rax\n\nif ( *(_DWORD *)(a1 + 656) && !*(_DWORD *)(a2 + 656) && !*(_DWORD *)(a3 + 656) )\n*(_DWORD *)(a1 + 656) = 0;\nif ( *(_DWORD *)(a1 + 656) )\n{\nif ( *(_DWORD *)(a2 + 656) && *(_DWORD *)(a3 + 656) )\n*(float *)a1 = (float)(*(float *)a3 + *(float *)a2) / 2.0;\nif ( !*(_DWORD *)(a2 + 656) && *(_DWORD *)(a3 + 656) )\n*(_DWORD *)a1 = *(_DWORD *)a3;\nif ( *(_DWORD *)(a2 + 656) && !*(_DWORD *)(a3 + 656) )\n*(_DWORD *)a1 = *(_DWORD *)a2;\n}\nelse\n{\n*(_DWORD *)a1 = 1025563004;\n}\nresult = a1;\n*(_DWORD *)(a1 + 4) = (int)(3.141592654 / *(float *)a1);\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_406313,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'next', 'a1': 'interp', 'a2': 'prev', 'sub_406313': 'interp_Wo'}"}
read_index_unmerged
f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83
msysgit
msysgit
NA
int read_index_unmerged(struct index_state *istate) { int i; int unmerged = 0; read_index(istate); for (i = 0; i < istate->cache_nr; i++) { struct cache_entry *ce = istate->cache[i]; struct cache_entry *new_ce; int size, len; if (!ce_stage(ce)) continue; unmerged = 1; len = ce_namelen(ce); size = cache_entry_size(len); new_ce = xcalloc(1, size); memcpy(new_ce->name, ce->name, len); new_ce->ce_flags = create_ce_flags(0) | CE_CONFLICTED; new_ce->ce_namelen = len; new_ce->ce_mode = ce->ce_mode; if (add_index_entry(istate, new_ce, 0)) return error("%s: cannot drop to stage #0", ce->name); i = index_name_pos(istate, new_ce->name, len); } return unmerged; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_45AB19", "function_addr": 4565785, "binary_name": "f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_8], 0"], [5, "mov rax, [rbp+var_28]"], [6, "mov rdi, rax"], [7, "call sub_459456"], [8, "mov [rbp+var_4], 0"], [9, "jmp loc_45AC54"], [10, "mov rax, [rbp+var_28]"], [11, "mov rdx, [rax]"], [12, "mov eax, [rbp+var_4]"], [13, "cdqe"], [14, "shl rax, 3"], [15, "add rax, rdx"], [16, "mov rax, [rax]"], [17, "mov [rbp+var_10], rax"], [18, "mov rax, [rbp+var_10]"], [19, "mov eax, [rax+28h]"], [20, "shr eax, 0Ch"], [21, "and eax, 3"], [22, "test eax, eax"], [23, "jz loc_45AC4F"], [24, "mov [rbp+var_8], 1"], [25, "mov rax, [rbp+var_10]"], [26, "mov eax, [rax+2Ch]"], [27, "mov [rbp+var_14], eax"], [28, "mov eax, [rbp+var_14]"], [29, "add eax, 51h "], [30, "mov [rbp+var_18], eax"], [31, "mov eax, [rbp+var_18]"], [32, "cdqe"], [33, "mov rsi, rax"], [34, "mov edi, 1"], [35, "call sub_40569C"], [36, "mov [rbp+var_20], rax"], [37, "mov eax, [rbp+var_14]"], [38, "cdqe"], [39, "mov rdx, [rbp+var_10]"], [40, "lea rsi, [rdx+50h]"], [41, "mov rdx, [rbp+var_20]"], [42, "lea rcx, [rdx+50h]"], [43, "mov rdx, rax"], [44, "mov rdi, rcx"], [45, "call _memcpy"], [46, "mov edi, 0"], [47, "call sub_456848"], [48, "or eax, 800000h"], [49, "mov edx, eax"], [50, "mov rax, [rbp+var_20]"], [51, "mov [rax+28h], edx"], [52, "mov edx, [rbp+var_14]"], [53, "mov rax, [rbp+var_20]"], [54, "mov [rax+2Ch], edx"], [55, "mov rax, [rbp+var_10]"], [56, "mov edx, [rax+24h]"], [57, "mov rax, [rbp+var_20]"], [58, "mov [rax+24h], edx"], [59, "mov rcx, [rbp+var_20]"], [60, "mov rax, [rbp+var_28]"], [61, "mov edx, 0"], [62, "mov rsi, rcx"], [63, "mov rdi, rax"], [64, "call sub_4589DA"], [65, "test eax, eax"], [66, "jz short loc_45AC30"], [67, "mov rax, [rbp+var_10]"], [68, "add rax, 50h "], [69, "mov rsi, rax"], [70, "mov edi, offset aSCannotDropToS"], [71, "mov eax, 0"], [72, "call error"], [73, "mov eax, 0FFFFFFFFh"], [74, "jmp short locret_45AC69"], [75, "mov rax, [rbp+var_20]"], [76, "lea rcx, [rax+50h]"], [77, "mov edx, [rbp+var_14]"], [78, "mov rax, [rbp+var_28]"], [79, "mov rsi, rcx"], [80, "mov rdi, rax"], [81, "call sub_457713"], [82, "mov [rbp+var_4], eax"], [83, "jmp short loc_45AC50"], [84, "nop"], [85, "add [rbp+var_4], 1"], [86, "mov rax, [rbp+var_28]"], [87, "mov edx, [rax+0Ch]"], [88, "mov eax, [rbp+var_4]"], [89, "cmp edx, eax"], [90, "ja loc_45AB44"], [91, "mov eax, [rbp+var_8]"], [92, "leave"], [93, "retn"]], "data_dep": [[5, 3], [6, 5], [10, 3], [11, 51], [11, 54], [11, 10], [11, 58], [12, 8], [12, 85], [14, 12], [15, 14], [15, 11], [16, 15], [16, 58], [16, 51], [16, 54], [17, 16], [18, 17], [19, 18], [19, 54], [19, 51], [19, 58], [20, 19], [21, 20], [22, 21], [23, 22], [25, 17], [26, 25], [26, 54], [26, 58], [26, 51], [27, 26], [28, 27], [29, 28], [30, 29], [31, 30], [33, 31], [36, 35], [37, 27], [39, 17], [40, 54], [40, 58], [40, 33], [40, 51], [40, 39], [41, 36], [42, 41], [42, 54], [42, 58], [42, 76], [42, 51], [43, 37], [44, 42], [48, 47], [49, 48], [50, 36], [51, 50], [51, 49], [52, 27], [53, 36], [54, 53], [54, 52], [55, 17], [56, 55], [56, 54], [56, 58], [57, 36], [58, 56], [58, 57], [59, 36], [60, 3], [62, 59], [63, 60], [65, 64], [66, 65], [67, 17], [68, 67], [69, 68], [75, 36], [76, 54], [76, 58], [76, 51], [76, 75], [76, 59], [77, 27], [78, 3], [79, 76], [80, 78], [82, 81], [85, 82], [85, 8], [85, 85], [86, 3], [87, 54], [87, 86], [87, 58], [87, 51], [88, 8], [88, 85], [89, 88], [89, 87], [90, 89], [91, 4], [91, 24], [93, 73], [93, 91]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83_f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83.jsonl.gz", "strip_func_name": "sub_45AB19", "query": "\n\n\n__int64 __fastcall sub_45AB19(__int64 a1, const char *a2)\n{\n__int64 v2; // rcx\n__int64 v3; // r8\n__int64 v4; // r9\n__int64 v5; // r8\n__int64 v6; // r9\n__int64 v7; // rdx\n__int64 v8; // rcx\n__int64 v9; // r8\n__int64 v10; // r9\n_DWORD *v12; // [rsp+10h] [rbp-20h]\nint v13; // [rsp+1Ch] [rbp-14h]\n_DWORD *v14; // [rsp+20h] [rbp-10h]\nunsigned int v15; // [rsp+28h] [rbp-8h]\nunsigned int i; // [rsp+2Ch] [rbp-4h]\n\nv15 = 0;\nsub_459456(a1, a2);\nfor ( i = 0; *(_DWORD *)(a1 + 12) > i; ++i )\n{\nv14 = *(_DWORD **)(*(_QWORD *)a1 + 8LL * (int)i);\nif ( ((v14[10] >> 12) & 3) != 0 )\n{\nv15 = 1;\nv13 = v14[11];\nv12 = sub_40569C(1uLL, v13 + 81, *(_QWORD *)a1, v2, v3, v4);\nmemcpy(v12 + 20, v14 + 20, v13);\nv12[10] = sub_456848(0) | 0x800000;\nv12[11] = v13;\nv12[9] = v14[9];\nif ( (unsigned int)sub_4589DA(a1, (__int64)v12, 0, (__int64)v12, v5, v6) )\n{\nerror((__int64)\"%s: cannot drop to stage #0\", (__int64)(v14 + 20), v7, v8, v9, v10);\nreturn 0xFFFFFFFFLL;\n}\ni = sub_457713(a1, v12 + 20, v13);\n}\n}\nreturn v15;\n}\n\n\n\nQ:[a1,v12,v13,v14,v15,sub_45AB19,sub_459456,sub_40569C,sub_456848,sub_4589DA,sub_457713,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'istate', 'v12': 'new_ce', 'v13': 'len', 'v14': 'ce', 'v15': 'unmerged', 'sub_45AB19': 'read_index_unmerged', 'sub_459456': 'read_index', 'sub_40569C': 'xcalloc', 'sub_456848': 'create_ce_flags_0', 'sub_4589DA': 'add_index_entry', 'sub_457713': 'index_name_pos'}"}
has_non_ascii
3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7
msysgit
msysgit
NA
int has_non_ascii(const char *s) { int ch; if (!s) return 0; while ((ch = *s++) != '\0') { if (non_ascii(ch)) return 1; } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_499DAA", "function_addr": 4824490, "binary_name": "3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 18h"], [3, "mov [rbp+var_18], rdi"], [4, "cmp [rbp+var_18], 0"], [5, "jnz short loc_499DD9"], [6, "mov eax, 0"], [7, "jmp short locret_499DF9"], [8, "mov eax, [rbp+var_4]"], [9, "mov edi, eax"], [10, "call sub_499D85"], [11, "test eax, eax"], [12, "jz short loc_499DD9"], [13, "mov eax, 1"], [14, "jmp short locret_499DF9"], [15, "mov rax, [rbp+var_18]"], [16, "lea rdx, [rax+1]"], [17, "mov [rbp+var_18], rdx"], [18, "movzx eax, byte ptr [rax]"], [19, "movsx eax, al"], [20, "mov [rbp+var_4], eax"], [21, "cmp [rbp+var_4], 0"], [22, "jnz short loc_499DC4"], [23, "mov eax, 0"], [24, "leave"], [25, "retn"]], "data_dep": [[4, 3], [5, 4], [8, 20], [9, 8], [11, 10], [12, 11], [15, 17], [15, 3], [16, 16], [16, 15], [17, 16], [18, 15], [19, 18], [20, 19], [21, 20], [22, 21], [25, 23], [25, 13], [25, 6]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7_3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7.jsonl.gz", "strip_func_name": "sub_499DAA", "query": "\n\n\n__int64 __fastcall sub_499DAA(_BYTE *a1)\n{\n_BYTE *v2; // rax\n_BYTE *v3; // [rsp+0h] [rbp-18h]\n\nv3 = a1;\nif ( !a1 )\nreturn 0LL;\nwhile ( 1 )\n{\nv2 = v3++;\nif ( !*v2 )\nbreak;\nif ( sub_499D85((char)*v2) )\nreturn 1LL;\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,v3,sub_499DAA,sub_499D85,]\nAssistant: ", "hints": "[]", "response": "{'a1': 's', 'v3': 'sa', 'sub_499DAA': 'has_non_ascii', 'sub_499D85': 'non_ascii'}"}
CfgAssureStr
b5a5da0fac90c978812d6210ca18d5465f705ef59f7da44a10439a03419376b9
dmsc
fastbasic
NA
void CfgAssureStr (void) /* Make sure the next token is a string constant */ { if (CfgTok != CFGTOK_STRCON) { CfgError (&CfgErrorPos, "String constant expected"); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_417337", "function_addr": 4289335, "binary_name": "b5a5da0fac90c978812d6210ca18d5465f705ef59f7da44a10439a03419376b9.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, cs:dword_432DA0"], [3, "cmp eax, 2"], [4, "jz short loc_41735A"], [5, "mov esi, offset aStringConstant"], [6, "mov edi, offset qword_432DD0"], [7, "mov eax, 0"], [8, "call sub_416B06"], [9, "nop"], [10, "pop rbp"], [11, "retn"]], "data_dep": [[3, 2], [4, 3], [10, 0], [11, 2]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/b5a5da0fac90c978812d6210ca18d5465f705ef59f7da44a10439a03419376b9_b5a5da0fac90c978812d6210ca18d5465f705ef59f7da44a10439a03419376b9.jsonl.gz", "strip_func_name": "sub_417337", "query": "\n\n\n__int64 __fastcall sub_417337(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 result; // rax\n\nresult = (unsigned int)dword_432DA0;\nif ( dword_432DA0 != 2 )\nsub_416B06((unsigned int *)&qword_432DD0, (__int64)\"String constant expected\", a3, a4, a5, a6);\nreturn result;\n}\n\n\n\nQ:[sub_417337,sub_416B06,]\nAssistant: ", "hints": "[]", "response": "{'sub_417337': 'CfgAssureStr', 'sub_416B06': 'CfgError'}"}
notes_cache_init
fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc
msysgit
msysgit
NA
void notes_cache_init(struct notes_cache *c, const char *name, const char *validity) { struct strbuf ref = STRBUF_INIT; int flags = 0; memset(c, 0, sizeof(*c)); c->validity = xstrdup(validity); strbuf_addf(&ref, "refs/notes/%s", name); if (!notes_cache_match_validity(ref.buf, validity)) flags = NOTES_INIT_EMPTY; init_notes(&c->tree, ref.buf, combine_notes_overwrite, flags); strbuf_release(&ref); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_493B43", "function_addr": 4799299, "binary_name": "fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+s], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_38], rdx"], [6, "mov [rbp+var_20], 0"], [7, "mov [rbp+var_18], 0"], [8, "mov [rbp+var_10], offset unk_4FFB21"], [9, "mov [rbp+var_4], 0"], [10, "mov rax, [rbp+s]"], [11, "mov edx, 38h "], [12, "mov esi, 0"], [13, "mov rdi, rax"], [14, "call _memset"], [15, "mov rax, [rbp+var_38]"], [16, "mov rdi, rax"], [17, "call sub_40659D"], [18, "mov rdx, [rbp+s]"], [19, "mov [rdx+30h], rax"], [20, "mov rdx, [rbp+var_30]"], [21, "lea rax, [rbp+var_20]"], [22, "mov esi, offset aRefsNotesS"], [23, "mov rdi, rax"], [24, "mov eax, 0"], [25, "call sub_408A1F"], [26, "mov rax, [rbp+var_10]"], [27, "mov rdx, [rbp+var_38]"], [28, "mov rsi, rdx"], [29, "mov rdi, rax"], [30, "call sub_493A43"], [31, "test eax, eax"], [32, "jnz short loc_493BD8"], [33, "mov [rbp+var_4], 1"], [34, "mov rsi, [rbp+var_10]"], [35, "mov rax, [rbp+s]"], [36, "mov edx, [rbp+var_4]"], [37, "mov ecx, edx"], [38, "mov edx, offset sub_49285B"], [39, "mov rdi, rax"], [40, "call sub_492D28"], [41, "lea rax, [rbp+var_20]"], [42, "mov rdi, rax"], [43, "call sub_40807B"], [44, "nop"], [45, "leave"], [46, "retn"]], "data_dep": [[10, 3], [13, 10], [15, 5], [16, 15], [18, 3], [19, 18], [19, 17], [20, 4], [21, 6], [21, 17], [23, 21], [26, 8], [27, 5], [28, 27], [29, 26], [31, 30], [32, 31], [34, 8], [35, 3], [36, 9], [36, 33], [37, 36], [39, 35], [41, 40], [41, 6], [42, 41], [46, 43]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc_fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc.jsonl.gz", "strip_func_name": "sub_493B43", "query": "\n\n\n__int64 __fastcall sub_493B43(_QWORD *a1, __int64 a2, const char *a3)\n{\n__int64 v3; // rcx\n__int64 v4; // r8\n__int64 v5; // r9\nint v6; // er8\nint v7; // er9\n__int64 v10[2]; // [rsp+20h] [rbp-20h] BYREF\nchar *v11; // [rsp+30h] [rbp-10h]\nint v12; // [rsp+3Ch] [rbp-4h]\n\nv10[0] = 0LL;\nv10[1] = 0LL;\nv11 = (char *)&unk_4FFB21;\nv12 = 0;\nmemset(a1, 0, 0x38uLL);\na1[6] = sub_40659D(a3, 0);\nsub_408A1F((__int64)v10, (__int64)\"refs/notes/%s\", a2, v3, v4, v5);\nif ( !sub_493A43(v11, a3) )\nv12 = 1;\nsub_492D28(a1, v11, (__int64)sub_49285B, v12, v6, v7);\nreturn sub_40807B((__int64)v10);\n}\n\n\n\nQ:[a3,a1,a2,v10,v12,sub_493B43,sub_40659D,sub_408A1F,sub_493A43,sub_492D28,sub_49285B,sub_40807B,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'validity', 'a1': 'c', 'a2': 'name', 'v10': 'ref', 'v12': 'flags', 'sub_493B43': 'notes_cache_init', 'sub_40659D': 'xstrdup', 'sub_408A1F': 'strbuf_addf', 'sub_493A43': 'notes_cache_match_validity', 'sub_492D28': 'init_notes', 'sub_49285B': 'combine_notes_overwrite', 'sub_40807B': 'strbuf_release'}"}
displayMagicTopic
5a51c9d5ef2814c801fdc67e9191b92af84684b5df3273cfc43b189428836e99
open-simh
simh
NA
static void displayMagicTopic (FILE *st, DEVICE *dptr, TOPIC *topic) { char tbuf[CBUFSIZE]; size_t i, skiplines = 0; #ifdef _WIN32 FILE *tmp; char *tmpnam; do { int fd; tmpnam = _tempnam (NULL, "simh"); fd = _open (tmpnam, _O_CREAT | _O_RDWR | _O_EXCL, _S_IREAD | _S_IWRITE); if (fd != -1) { tmp = _fdopen (fd, "w+"); break; } } while (1); #else FILE *tmp = tmpfile(); #endif if (!tmp) { fprintf (st, "Unable to create temporary file: %s\n", strerror (errno)); return; } if (topic->title) { fprintf (st, "%s\n", topic->title+1); skiplines = 0; if (dptr) { if (!strcmp (topic->title+1, "Registers")) { fprint_reg_help (tmp, dptr) ; skiplines = 1; } else if (!strcmp (topic->title+1, "Set commands")) { fprint_set_help (tmp, dptr); skiplines = 3; } else if (!strcmp (topic->title+1, "Show commands")) { fprint_show_help (tmp, dptr); skiplines = 3; } } } rewind (tmp); /* Discard leading blank lines/redundant titles */ for (i =0; i < skiplines; i++) if (fgets (tbuf, sizeof (tbuf), tmp)) {}; while (fgets (tbuf, sizeof (tbuf), tmp)) { if (tbuf[0] != '\n') fputs (" ", st); fputs (tbuf, st); } fclose (tmp); #ifdef _WIN32 remove (tmpnam); free (tmpnam); #endif }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43ABA7", "function_addr": 4434855, "binary_name": "5a51c9d5ef2814c801fdc67e9191b92af84684b5df3273cfc43b189428836e99.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10C0h"], [3, "mov [rbp+var_10A8], rdi"], [4, "mov [rbp+var_10B0], rsi"], [5, "mov [rbp+var_10B8], rdx"], [6, "mov [rbp+var_10], 0"], [7, "call _tmpfile"], [8, "mov [rbp+stream], rax"], [9, "cmp [rbp+stream], 0"], [10, "jnz short loc_43AC0E"], [11, "call ___errno_location"], [12, "mov eax, [rax]"], [13, "mov edi, eax"], [14, "call _strerror"], [15, "mov rdx, rax"], [16, "mov rax, [rbp+var_10A8]"], [17, "mov esi, offset aUnableToCreate"], [18, "mov rdi, rax"], [19, "mov eax, 0"], [20, "call sub_4394C9"], [21, "jmp locret_43ADCF"], [22, "mov rax, [rbp+var_10B8]"], [23, "mov rax, [rax+8]"], [24, "test rax, rax"], [25, "jz loc_43AD1E"], [26, "mov rax, [rbp+var_10B8]"], [27, "mov rax, [rax+8]"], [28, "lea rdx, [rax+1]"], [29, "mov rax, [rbp+var_10A8]"], [30, "mov esi, offset aS_5"], [31, "mov rdi, rax"], [32, "mov eax, 0"], [33, "call sub_4394C9"], [34, "mov [rbp+var_10], 0"], [35, "cmp [rbp+var_10B0], 0"], [36, "jz loc_43AD1E"], [37, "mov rax, [rbp+var_10B8]"], [38, "mov rax, [rax+8]"], [39, "add rax, 1"], [40, "mov esi, offset aRegisters_0"], [41, "mov rdi, rax"], [42, "call _strcmp"], [43, "test eax, eax"], [44, "jnz short loc_43ACA0"], [45, "mov rdx, [rbp+var_10B0]"], [46, "mov rax, [rbp+stream]"], [47, "mov rsi, rdx"], [48, "mov rdi, rax"], [49, "call sub_416264"], [50, "mov [rbp+var_10], 1"], [51, "jmp short loc_43AD1E"], [52, "mov rax, [rbp+var_10B8]"], [53, "mov rax, [rax+8]"], [54, "add rax, 1"], [55, "mov esi, offset aSetCommands"], [56, "mov rdi, rax"], [57, "call _strcmp"], [58, "test eax, eax"], [59, "jnz short loc_43ACE0"], [60, "mov rdx, [rbp+var_10B0]"], [61, "mov rax, [rbp+stream]"], [62, "mov rsi, rdx"], [63, "mov rdi, rax"], [64, "call sub_4177DF"], [65, "mov [rbp+var_10], 3"], [66, "jmp short loc_43AD1E"], [67, "mov rax, [rbp+var_10B8]"], [68, "mov rax, [rax+8]"], [69, "add rax, 1"], [70, "mov esi, offset aShowCommands"], [71, "mov rdi, rax"], [72, "call _strcmp"], [73, "test eax, eax"], [74, "jnz short loc_43AD1E"], [75, "mov rdx, [rbp+var_10B0]"], [76, "mov rax, [rbp+stream]"], [77, "mov rsi, rdx"], [78, "mov rdi, rax"], [79, "call sub_417D9F"], [80, "mov [rbp+var_10], 3"], [81, "mov rax, [rbp+stream]"], [82, "mov rdi, rax"], [83, "call _rewind"], [84, "mov [rbp+var_8], 0"], [85, "jmp short loc_43AD51"], [86, "mov rdx, [rbp+stream]"], [87, "lea rax, [rbp+s]"], [88, "mov esi, 1080h"], [89, "mov rdi, rax"], [90, "call _fgets"], [91, "add [rbp+var_8], 1"], [92, "mov rax, [rbp+var_8]"], [93, "cmp rax, [rbp+var_10]"], [94, "jb short loc_43AD34"], [95, "jmp short loc_43ADA6"], [96, "movzx eax, [rbp+s]"], [97, "cmp al, 0Ah"], [98, "jz short loc_43AD86"], [99, "mov rax, [rbp+var_10A8]"], [100, "mov edx, offset asc_4AC24B"], [101, "mov esi, offset aS_4"], [102, "mov rdi, rax"], [103, "mov eax, 0"], [104, "call sub_4394C9"], [105, "lea rdx, [rbp+s]"], [106, "mov rax, [rbp+var_10A8]"], [107, "mov esi, offset aS_4"], [108, "mov rdi, rax"], [109, "mov eax, 0"], [110, "call sub_4394C9"], [111, "mov rdx, [rbp+stream]"], [112, "lea rax, [rbp+s]"], [113, "mov esi, 1080h"], [114, "mov rdi, rax"], [115, "call _fgets"], [116, "test rax, rax"], [117, "jnz short loc_43AD5D"], [118, "mov rax, [rbp+stream]"], [119, "mov rdi, rax"], [120, "call _fclose"], [121, "leave"], [122, "retn"]], "data_dep": [[8, 7], [9, 8], [10, 9], [12, 11], [13, 12], [15, 14], [16, 3], [18, 16], [22, 5], [23, 22], [24, 23], [25, 24], [26, 5], [27, 26], [28, 27], [29, 3], [31, 29], [35, 4], [36, 35], [37, 5], [38, 37], [39, 38], [41, 39], [43, 42], [44, 43], [45, 4], [46, 8], [47, 45], [48, 46], [52, 5], [53, 52], [54, 53], [56, 54], [58, 57], [59, 58], [60, 4], [61, 8], [62, 60], [63, 61], [67, 5], [68, 67], [69, 68], [71, 69], [73, 72], [74, 73], [75, 4], [76, 8], [77, 75], [78, 76], [81, 8], [82, 81], [86, 8], [87, 92], [89, 87], [91, 91], [91, 84], [92, 84], [92, 91], [93, 50], [93, 6], [93, 65], [93, 92], [93, 80], [93, 34], [94, 93], [97, 96], [98, 97], [99, 3], [102, 99], [105, 100], [105, 111], [106, 3], [108, 106], [111, 8], [112, 92], [112, 110], [114, 112], [116, 115], [117, 116], [118, 8], [119, 118], [122, 20], [122, 120]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/5a51c9d5ef2814c801fdc67e9191b92af84684b5df3273cfc43b189428836e99_5a51c9d5ef2814c801fdc67e9191b92af84684b5df3273cfc43b189428836e99.jsonl.gz", "strip_func_name": "sub_43ABA7", "query": "\n\n\nint __fastcall sub_43ABA7(FILE *a1, const char **a2, __int64 a3)\n{\n__int64 v3; // rcx\n__int64 v4; // r8\n__int64 v5; // r9\nint *v6; // rax\nchar *v7; // rax\n__int64 v8; // rcx\n__int64 v9; // r8\n__int64 v10; // r9\nint result; // eax\n__int64 v12; // rcx\nint v13; // er8\nint v14; // er9\n__int64 v15; // rcx\n__int64 v16; // r8\n__int64 v17; // r9\nchar s[4232]; // [rsp+20h] [rbp-10A0h] BYREF\nFILE *stream; // [rsp+10A8h] [rbp-18h]\nunsigned __int64 v21; // [rsp+10B0h] [rbp-10h]\nunsigned __int64 i; // [rsp+10B8h] [rbp-8h]\n\nv21 = 0LL;\nstream = tmpfile();\nif ( stream )\n{\nif ( *(_QWORD *)(a3 + 8) )\n{\nsub_4394C9(a1, \"%s\\n\", *(_QWORD *)(a3 + 8) + 1LL, v3, v4, v5);\nv21 = 0LL;\nif ( a2 )\n{\nif ( !strcmp((const char *)(*(_QWORD *)(a3 + 8) + 1LL), \"Registers\") )\n{\nsub_416264((int)stream, a2, (__int64)a2, v12, v13, v14);\nv21 = 1LL;\n}\nelse if ( !strcmp((const char *)(*(_QWORD *)(a3 + 8) + 1LL), \"Set commands\") )\n{\nsub_4177DF((int)stream, (__int64)a2);\nv21 = 3LL;\n}\nelse if ( !strcmp((const char *)(*(_QWORD *)(a3 + 8) + 1LL), \"Show commands\") )\n{\nsub_417D9F((int)stream, (__int64)a2);\nv21 = 3LL;\n}\n}\n}\nrewind(stream);\nfor ( i = 0LL; i < v21; ++i )\nfgets(s, 4224, stream);\nwhile ( fgets(s, 4224, stream) )\n{\nif ( s[0] != 10 )\nsub_4394C9(a1, \"%s\", (__int64)\" \", v15, v16, v17);\nsub_4394C9(a1, \"%s\", (__int64)s, v15, v16, v17);\n}\nresult = fclose(stream);\n}\nelse\n{\nv6 = __errno_location();\nv7 = strerror(*v6);\nresult = sub_4394C9(a1, \"Unable to create temporary file: %s\\n\", (__int64)v7, v8, v9, v10);\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,s,stream,v21,sub_43ABA7,sub_4394C9,sub_416264,sub_4177DF,sub_417D9F,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'topic', 'a1': 'st', 'a2': 'dptr', 's': 'tbuf', 'stream': 'tmp', 'v21': 'skiplines', 'sub_43ABA7': 'displayMagicTopic', 'sub_4394C9': 'Fprintf', 'sub_416264': 'fprint_reg_help', 'sub_4177DF': 'fprint_set_help', 'sub_417D9F': 'fprint_show_help'}"}
write_prolog
21e12589e411afeaf782b38a410a73dd8bfb7d886e2558fdca0ec7db3eb578b3
microsoft
mu_tiano_platforms
NA
int write_prolog(int ext_cnt, char *ext_filename, uint8_t *image_buf, int image_size, FILE *out_fd) { header_t *header; int main_hdr_size = sizeof(header_t); int prolog_size = main_hdr_size; FILE *ext_fd; char *buf; int written, read; int ret = 1; if (ext_cnt) prolog_size += get_file_size(ext_filename); prolog_size = ((prolog_size + PROLOG_ALIGNMENT) & (~(PROLOG_ALIGNMENT-1))); /* Allocate a zeroed buffer to zero the padding bytes */ buf = calloc(prolog_size, 1); if (buf == NULL) { fprintf(stderr, "Error: failed allocating checksum buffer\n"); return 1; } header = (header_t *)buf; header->magic = MAIN_HDR_MAGIC; header->prolog_size = prolog_size; header->load_addr = opts.load_addr; header->exec_addr = opts.exec_addr; header->io_arg_0 = opts.nfc_io_args; header->ext_count = ext_cnt; header->aux_flags = 0; header->boot_image_size = (image_size + 3) & (~0x3); header->boot_image_checksum = checksum32((uint32_t *)image_buf, image_size); update_uart(header); /* Populate buffer with main header and extensions */ if (ext_cnt) { ext_fd = fopen(ext_filename, "rb"); if (ext_fd == NULL) { fprintf(stderr, "Error: failed to open extensions file\n"); goto error; } read = fread(&buf[main_hdr_size], get_file_size(ext_filename), 1, ext_fd); if (read != 1) { fprintf(stderr, "Error: failed to open extensions file\n"); goto error; } #ifdef CONFIG_MVEBU_SECURE_BOOT /* Secure boot mode? */ if (opts.sec_opts != 0) { ret = finalize_secure_ext(header, (uint8_t *)buf, prolog_size, image_buf, image_size); if (ret != 0) { fprintf(stderr, "Error: failed to handle "); fprintf(stderr, "secure extension!\n"); goto error; } } /* secure boot mode */ #endif } /* Update the total prolog checksum */ header->prolog_checksum = checksum32((uint32_t *)buf, prolog_size); /* Now spill everything to output file */ written = fwrite(buf, prolog_size, 1, out_fd); if (written != 1) { fprintf(stderr, "Error: failed to write prolog to output file\n"); goto error; } ret = 0; error: free(buf); return ret; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40217C", "function_addr": 4202876, "binary_name": "21e12589e411afeaf782b38a410a73dd8bfb7d886e2558fdca0ec7db3eb578b3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_34], edi"], [4, "mov [rbp+filename], rsi"], [5, "mov [rbp+var_48], rdx"], [6, "mov [rbp+var_38], ecx"], [7, "mov [rbp+s], r8"], [8, "mov [rbp+var_C], 40h "], [9, "mov eax, [rbp+var_C]"], [10, "mov [rbp+var_4], eax"], [11, "mov [rbp+var_8], 1"], [12, "cmp [rbp+var_34], 0"], [13, "jz short loc_4021BF"], [14, "mov rax, [rbp+filename]"], [15, "mov rdi, rax"], [16, "call sub_401431"], [17, "add [rbp+var_4], eax"], [18, "mov eax, [rbp+var_4]"], [19, "add eax, 2000h"], [20, "and eax, 0FFFFE000h"], [21, "mov [rbp+var_4], eax"], [22, "mov eax, [rbp+var_4]"], [23, "cdqe"], [24, "mov esi, 1"], [25, "mov rdi, rax"], [26, "call _calloc"], [27, "mov [rbp+ptr], rax"], [28, "cmp [rbp+ptr], 0"], [29, "jnz short loc_402214"], [30, "mov rax, cs:stderr"], [31, "mov rcx, rax"], [32, "mov edx, 29h "], [33, "mov esi, 1"], [34, "mov edi, offset aErrorFailedAll"], [35, "call _fwrite"], [36, "mov eax, 1"], [37, "jmp locret_4023B8"], [38, "mov rax, [rbp+ptr]"], [39, "mov [rbp+var_20], rax"], [40, "mov rax, [rbp+var_20]"], [41, "mov dword ptr [rax], 0B105B002h"], [42, "mov edx, [rbp+var_4]"], [43, "mov rax, [rbp+var_20]"], [44, "mov [rax+4], edx"], [45, "mov edx, cs:dword_406310"], [46, "mov rax, [rbp+var_20]"], [47, "mov [rax+18h], edx"], [48, "mov edx, cs:dword_406314"], [49, "mov rax, [rbp+var_20]"], [50, "mov [rax+1Ch], edx"], [51, "mov edx, cs:dword_406320"], [52, "mov rax, [rbp+var_20]"], [53, "mov [rax+24h], edx"], [54, "mov eax, [rbp+var_34]"], [55, "mov edx, eax"], [56, "mov rax, [rbp+var_20]"], [57, "mov [rax+22h], dl"], [58, "mov rax, [rbp+var_20]"], [59, "mov byte ptr [rax+23h], 0"], [60, "mov eax, [rbp+var_38]"], [61, "add eax, 3"], [62, "and eax, 0FFFFFFFCh"], [63, "mov edx, eax"], [64, "mov rax, [rbp+var_20]"], [65, "mov [rax+0Ch], edx"], [66, "mov edx, [rbp+var_38]"], [67, "mov rax, [rbp+var_48]"], [68, "mov esi, edx"], [69, "mov rdi, rax"], [70, "call sub_40146D"], [71, "mov rdx, [rbp+var_20]"], [72, "mov [rdx+10h], eax"], [73, "mov rax, [rbp+var_20]"], [74, "mov rdi, rax"], [75, "call sub_402119"], [76, "cmp [rbp+var_34], 0"], [77, "jz loc_402343"], [78, "mov rax, [rbp+filename]"], [79, "mov esi, offset modes"], [80, "mov rdi, rax"], [81, "call _fopen"], [82, "mov [rbp+stream], rax"], [83, "cmp [rbp+stream], 0"], [84, "jnz short loc_4022EA"], [85, "mov rax, cs:stderr"], [86, "mov rcx, rax"], [87, "mov edx, 26h "], [88, "mov esi, 1"], [89, "mov edi, offset aErrorFailedToO"], [90, "call _fwrite"], [91, "jmp loc_4023A9"], [92, "mov rax, [rbp+filename]"], [93, "mov rdi, rax"], [94, "call sub_401431"], [95, "cdqe"], [96, "mov edx, [rbp+var_C]"], [97, "movsxd rcx, edx"], [98, "mov rdx, [rbp+ptr]"], [99, "lea rdi, [rcx+rdx]"], [100, "mov rdx, [rbp+stream]"], [101, "mov rcx, rdx"], [102, "mov edx, 1"], [103, "mov rsi, rax"], [104, "call _fread"], [105, "mov [rbp+var_2C], eax"], [106, "cmp [rbp+var_2C], 1"], [107, "jz short loc_402343"], [108, "mov rax, cs:stderr"], [109, "mov rcx, rax"], [110, "mov edx, 26h "], [111, "mov esi, 1"], [112, "mov edi, offset aErrorFailedToO"], [113, "call _fwrite"], [114, "jmp short loc_4023A9"], [115, "mov edx, [rbp+var_4]"], [116, "mov rax, [rbp+ptr]"], [117, "mov esi, edx"], [118, "mov rdi, rax"], [119, "call sub_40146D"], [120, "mov rdx, [rbp+var_20]"], [121, "mov [rdx+8], eax"], [122, "mov eax, [rbp+var_4]"], [123, "movsxd rsi, eax"], [124, "mov rdx, [rbp+s]"], [125, "mov rax, [rbp+ptr]"], [126, "mov rcx, rdx"], [127, "mov edx, 1"], [128, "mov rdi, rax"], [129, "call _fwrite"], [130, "mov [rbp+var_30], eax"], [131, "cmp [rbp+var_30], 1"], [132, "jz short loc_4023A2"], [133, "mov rax, cs:stderr"], [134, "mov rcx, rax"], [135, "mov edx, 2Dh "], [136, "mov esi, 1"], [137, "mov edi, offset aErrorFailedToW"], [138, "call _fwrite"], [139, "jmp short loc_4023A9"], [140, "mov [rbp+var_8], 0"], [141, "mov rax, [rbp+ptr]"], [142, "mov rdi, rax"], [143, "call _free"], [144, "mov eax, [rbp+var_8]"], [145, "leave"], [146, "retn"]], "data_dep": [[9, 8], [10, 9], [12, 3], [13, 12], [14, 4], [15, 14], [17, 16], [17, 10], [18, 17], [18, 10], [19, 18], [20, 19], [21, 20], [22, 21], [25, 22], [27, 26], [28, 27], [29, 28], [31, 30], [38, 27], [39, 38], [40, 39], [41, 40], [42, 21], [43, 39], [44, 42], [44, 43], [46, 39], [47, 45], [47, 46], [49, 39], [50, 49], [50, 48], [52, 39], [53, 52], [53, 51], [54, 3], [55, 54], [56, 39], [57, 56], [57, 55], [58, 39], [59, 58], [60, 6], [61, 60], [62, 61], [63, 62], [64, 39], [65, 63], [65, 64], [66, 6], [67, 5], [68, 66], [69, 67], [71, 39], [72, 70], [72, 71], [73, 39], [74, 73], [76, 3], [77, 76], [78, 4], [80, 78], [82, 81], [83, 82], [84, 83], [86, 85], [92, 4], [93, 92], [96, 8], [97, 96], [98, 27], [99, 72], [99, 93], [99, 47], [99, 65], [99, 97], [99, 44], [99, 53], [99, 57], [99, 41], [99, 50], [99, 59], [100, 82], [101, 100], [103, 94], [105, 104], [106, 105], [107, 106], [109, 108], [115, 21], [116, 27], [117, 115], [118, 116], [120, 39], [121, 119], [121, 120], [122, 21], [123, 122], [124, 7], [125, 27], [126, 124], [128, 125], [130, 129], [131, 130], [132, 131], [134, 133], [141, 27], [142, 141], [144, 140], [144, 11], [146, 36], [146, 144]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/21e12589e411afeaf782b38a410a73dd8bfb7d886e2558fdca0ec7db3eb578b3_21e12589e411afeaf782b38a410a73dd8bfb7d886e2558fdca0ec7db3eb578b3.jsonl.gz", "strip_func_name": "sub_40217C", "query": "\n\n\n__int64 __fastcall sub_40217C(int a1, char *a2, _DWORD *a3, int a4, FILE *a5)\n{\n__int64 result; // rax\nint v6; // eax\nFILE *stream; // [rsp+28h] [rbp-28h]\n_DWORD *ptr; // [rsp+38h] [rbp-18h]\nunsigned int v12; // [rsp+48h] [rbp-8h]\nint v13; // [rsp+4Ch] [rbp-4h]\nint v14; // [rsp+4Ch] [rbp-4h]\n\nv13 = 64;\nv12 = 1;\nif ( a1 )\nv13 = sub_401431(a2) + 64;\nv14 = (v13 + 0x2000) & 0xFFFFE000;\nptr = calloc(v14, 1uLL);\nif ( ptr )\n{\n*ptr = -1325027326;\nptr[1] = v14;\nptr[6] = dword_406310;\nptr[7] = dword_406314;\nptr[9] = dword_406320;\n*((_WORD *)ptr + 17) = (unsigned __int8)a1;\nptr[3] = (a4 + 3) & 0xFFFFFFFC;\nptr[4] = sub_40146D(a3, a4);\nsub_402119((__int64)ptr);\nif ( !a1\n|| (stream = fopen(a2, \"rb\")) != 0LL\n&& (v6 = sub_401431(a2), (unsigned int)fread(ptr + 16, v6, 1uLL, stream) == 1) )\n{\nptr[2] = sub_40146D(ptr, v14);\nif ( (unsigned int)fwrite(ptr, v14, 1uLL, a5) == 1 )\nv12 = 0;\nelse\nfwrite(\"Error: failed to write prolog to output file\\n\", 1uLL, 0x2DuLL, stderr);\n}\nelse\n{\nfwrite(\"Error: failed to open extensions file\\n\", 1uLL, 0x26uLL, stderr);\n}\nfree(ptr);\nresult = v12;\n}\nelse\n{\nfwrite(\"Error: failed allocating checksum buffer\\n\", 1uLL, 0x29uLL, stderr);\nresult = 1LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,stream,ptr,v14,sub_40217C,sub_401431,sub_40146D,sub_402119,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'image_buf', 'a4': 'image_size', 'a1': 'ext_cnt', 'a2': 'ext_filename', 'a5': 'out_fd', 'stream': 'ext_fd', 'ptr': 'buf', 'v14': 'prolog_sizea', 'sub_40217C': 'write_prolog', 'sub_401431': 'get_file_size', 'sub_40146D': 'checksum32', 'sub_402119': 'update_uart'}"}
sp_256_mod_9
7219b0ef569734ba548000b39f891b63e71d053f533c94257503597f308a3fd2
wolfSSL
wolfBoot
NA
static int sp_256_mod_9(sp_digit* r, const sp_digit* a, const sp_digit* m) { return sp_256_div_9(a, m, NULL, r); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4638FC", "function_addr": 4602108, "binary_name": "7219b0ef569734ba548000b39f891b63e71d053f533c94257503597f308a3fd2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 18h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "mov rdx, [rbp+var_8]"], [7, "mov rsi, [rbp+var_18]"], [8, "mov rax, [rbp+var_10]"], [9, "mov rcx, rdx"], [10, "mov edx, 0"], [11, "mov rdi, rax"], [12, "call sub_4636D8"], [13, "leave"], [14, "retn"]], "data_dep": [[6, 3], [7, 5], [8, 4], [9, 6], [11, 8], [14, 12]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/7219b0ef569734ba548000b39f891b63e71d053f533c94257503597f308a3fd2_7219b0ef569734ba548000b39f891b63e71d053f533c94257503597f308a3fd2.jsonl.gz", "strip_func_name": "sub_4638FC", "query": "\n\n\n__int64 __fastcall sub_4638FC(__int64 a1, _DWORD *a2, int *a3)\n{\nreturn sub_4636D8(a2, a3, 0LL, a1);\n}\n\n\n\nQ:[a3,a1,a2,sub_4638FC,sub_4636D8,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'm', 'a1': 'r', 'a2': 'a', 'sub_4638FC': 'sp_256_mod_9', 'sub_4636D8': 'sp_256_div_9'}"}
sl_system_init
d641d4455ba968ec8cdc678803903e8adc4e0f690e4b42f19186ba657d295323
openthread
ot-efr32
NA
void sl_system_init(void) { sl_bt_init(); #ifdef BTMESH sl_btmesh_init(); #endif // BTMESH #ifdef SL_CATALOG_APP_TIMER_PRESENT app_timer_init(); #endif // SL_CATALOG_APP_TIMER_PRESENT #ifdef SL_CATALOG_NCP_RESET_PRESENT ncp_reset_init(); #endif // SL_CATALOG_NCP_RESET_PRESENT }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4298F8", "function_addr": 4364536, "binary_name": "d641d4455ba968ec8cdc678803903e8adc4e0f690e4b42f19186ba657d295323.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "call sub_429939"], [3, "call sub_429977"], [4, "call sub_4266C7"], [5, "nop"], [6, "pop rbp"], [7, "retn"]], "data_dep": [[6, 0], [7, 4]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d641d4455ba968ec8cdc678803903e8adc4e0f690e4b42f19186ba657d295323_d641d4455ba968ec8cdc678803903e8adc4e0f690e4b42f19186ba657d295323.jsonl.gz", "strip_func_name": "sub_4298F8", "query": "\n\n\nint sub_4298F8()\n{\nsub_429939();\nsub_429977();\nreturn sub_4266C7();\n}\n\n\n\nQ:[sub_4298F8,sub_429939,sub_429977,sub_4266C7,]\nAssistant: ", "hints": "[]", "response": "{'sub_4298F8': 'sl_system_init', 'sub_429939': 'sl_bt_init', 'sub_429977': 'sl_btmesh_init', 'sub_4266C7': 'sl_simple_timer_init'}"}
opt_show_longlongval_si
d2fc0ac00dfc26f78eaec1426a809a39309dfb557f1d3082055c6447be90a531
rustyrussell
ccan
NA
bool opt_show_longlongval_si(char *buf, size_t len, const long long *x) { show_llong_with_suffix(buf, len, *x, 1000); return true; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41EFAC", "function_addr": 4321196, "binary_name": "d2fc0ac00dfc26f78eaec1426a809a39309dfb557f1d3082055c6447be90a531.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov rax, [rbp+var_10]"], [6, "mov rcx, [rax]"], [7, "mov rax, [rbp+var_8]"], [8, "mov edx, 3E8h"], [9, "mov rsi, rcx"], [10, "mov rdi, rax"], [11, "call sub_41EC3E"], [12, "nop"], [13, "leave"], [14, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 3], [9, 6], [10, 7], [14, 11]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d2fc0ac00dfc26f78eaec1426a809a39309dfb557f1d3082055c6447be90a531_d2fc0ac00dfc26f78eaec1426a809a39309dfb557f1d3082055c6447be90a531.jsonl.gz", "strip_func_name": "sub_41EFAC", "query": "\n\n\nint __fastcall sub_41EFAC(char *a1, __int64 *a2)\n{\nreturn sub_41EC3E(a1, *a2, 1000LL);\n}\n\n\n\nQ:[a1,a2,sub_41EFAC,sub_41EC3E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'buf', 'a2': 'x', 'sub_41EFAC': 'opt_show_longlongval_si', 'sub_41EC3E': 'show_llong_with_suffix'}"}
open_menu
276536b89cc3e58f9e6dd34cde9d9d4ba21328c5a859320d5e06460e1ec2c7de
LIJI32
SameBoy
NA
static void open_menu(void) { bool audio_playing = GB_audio_is_playing(); if (audio_playing) { GB_audio_set_paused(true); } size_t previous_width = GB_get_screen_width(&gb); run_gui(true); SDL_ShowCursor(SDL_DISABLE); if (audio_playing) { GB_audio_set_paused(false); } GB_set_color_correction_mode(&gb, configuration.color_correction_mode); GB_set_light_temperature(&gb, (configuration.color_temperature - 10.0) / 10.0); GB_set_interference_volume(&gb, configuration.interference_volume / 100.0); GB_set_border_mode(&gb, configuration.border_mode); update_palette(); GB_set_highpass_filter_mode(&gb, configuration.highpass_mode); GB_set_rewind_length(&gb, configuration.rewind_length); GB_set_rtc_mode(&gb, configuration.rtc_mode); if (previous_width != GB_get_screen_width(&gb)) { screen_size_changed(); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_449814", "function_addr": 4495380, "binary_name": "276536b89cc3e58f9e6dd34cde9d9d4ba21328c5a859320d5e06460e1ec2c7de.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "call sub_440D49"], [4, "mov [rbp+var_1], al"], [5, "cmp [rbp+var_1], 0"], [6, "jz short loc_449834"], [7, "mov edi, 1"], [8, "call sub_440D77"], [9, "mov edi, offset unk_473400"], [10, "call sub_424D5E"], [11, "mov eax, eax"], [12, "mov [rbp+var_10], rax"], [13, "mov edi, 1"], [14, "call sub_4471F9"], [15, "mov edi, 0"], [16, "call _SDL_ShowCursor"], [17, "cmp [rbp+var_1], 0"], [18, "jz short loc_449868"], [19, "mov edi, 0"], [20, "call sub_440D77"], [21, "mov eax, cs:dword_470424"], [22, "mov esi, eax"], [23, "mov edi, offset unk_473400"], [24, "call sub_418118"], [25, "movzx eax, cs:byte_470520"], [26, "movzx eax, al"], [27, "pxor xmm0, xmm0"], [28, "cvtsi2sd xmm0, eax"], [29, "movsd xmm1, cs:qword_460C70"], [30, "subsd xmm0, xmm1"], [31, "movsd xmm1, cs:qword_460C70"], [32, "divsd xmm0, xmm1"], [33, "movq rax, xmm0"], [34, "movq xmm0, rax"], [35, "mov edi, offset unk_473400"], [36, "call sub_418191"], [37, "movzx eax, cs:byte_471521"], [38, "movzx eax, al"], [39, "pxor xmm0, xmm0"], [40, "cvtsi2sd xmm0, eax"], [41, "movsd xmm1, cs:qword_460C78"], [42, "divsd xmm0, xmm1"], [43, "movq rax, xmm0"], [44, "movq xmm0, rax"], [45, "mov edi, offset unk_473400"], [46, "call sub_409F98"], [47, "mov eax, cs:dword_47050C"], [48, "mov esi, eax"], [49, "mov edi, offset unk_473400"], [50, "call sub_424D32"], [51, "call sub_449765"], [52, "mov eax, cs:dword_470430"], [53, "mov esi, eax"], [54, "mov edi, offset unk_473400"], [55, "call sub_409F7D"], [56, "mov eax, cs:dword_47045C"], [57, "mov eax, eax"], [58, "test rax, rax"], [59, "js short loc_449930"], [60, "pxor xmm2, xmm2"], [61, "cvtsi2sd xmm2, rax"], [62, "movq rax, xmm2"], [63, "jmp short loc_44994E"], [64, "mov rdx, rax"], [65, "shr rdx, 1"], [66, "and eax, 1"], [67, "or rdx, rax"], [68, "pxor xmm0, xmm0"], [69, "cvtsi2sd xmm0, rdx"], [70, "addsd xmm0, xmm0"], [71, "movq rax, xmm0"], [72, "movq xmm0, rax"], [73, "mov edi, offset unk_473400"], [74, "call sub_42E36A"], [75, "mov eax, cs:dword_471524"], [76, "mov esi, eax"], [77, "mov edi, offset unk_473400"], [78, "call sub_43F6DA"], [79, "mov edi, offset unk_473400"], [80, "call sub_424D5E"], [81, "mov eax, eax"], [82, "cmp [rbp+var_10], rax"], [83, "jz short loc_449986"], [84, "call sub_44977E"], [85, "nop"], [86, "leave"], [87, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [11, 10], [12, 11], [17, 4], [18, 17], [22, 21], [26, 25], [28, 27], [28, 26], [30, 29], [30, 28], [32, 31], [32, 30], [33, 32], [34, 33], [38, 37], [40, 38], [40, 39], [42, 41], [42, 40], [43, 42], [44, 43], [48, 47], [53, 52], [57, 56], [58, 57], [59, 58], [61, 58], [61, 60], [62, 61], [64, 58], [65, 64], [66, 58], [67, 65], [67, 66], [69, 68], [69, 67], [70, 69], [71, 70], [72, 62], [72, 71], [76, 75], [81, 80], [82, 81], [82, 12], [83, 82], [87, 84], [87, 81]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/276536b89cc3e58f9e6dd34cde9d9d4ba21328c5a859320d5e06460e1ec2c7de_276536b89cc3e58f9e6dd34cde9d9d4ba21328c5a859320d5e06460e1ec2c7de.jsonl.gz", "strip_func_name": "sub_449814", "query": "\n\n\n__int64 sub_449814()\n{\n__int64 result; // rax\n__int64 v1; // [rsp+0h] [rbp-10h]\nchar v2; // [rsp+Fh] [rbp-1h]\n\nv2 = sub_440D49();\nif ( v2 )\nsub_440D77(1u);\nv1 = (unsigned int)sub_424D5E((__int64)qword_473400);\nsub_4471F9(1u);\nSDL_ShowCursor();\nif ( v2 )\nsub_440D77(0);\nsub_418118((__int64)qword_473400, dword_470424);\nsub_418191((__int64)qword_473400, ((double)(unsigned __int8)byte_470520 - 10.0) / 10.0);\nsub_409F98((__int64)qword_473400, (double)(unsigned __int8)byte_471521 / 100.0);\nsub_424D32((__int64)qword_473400, dword_47050C);\nsub_449765();\nsub_409F7D((__int64)qword_473400, dword_470430);\nsub_42E36A((__int64)qword_473400, (double)dword_47045C);\nsub_43F6DA((__int64)qword_473400, dword_471524);\nresult = (unsigned int)sub_424D5E((__int64)qword_473400);\nif ( v1 != (unsigned int)result )\nresult = sub_44977E();\nreturn result;\n}\n\n\n\nQ:[v1,v2,sub_449814,sub_440D49,sub_440D77,sub_424D5E,sub_4471F9,sub_418118,sub_418191,sub_409F98,sub_424D32,sub_449765,sub_409F7D,sub_42E36A,sub_43F6DA,sub_44977E,]\nAssistant: ", "hints": "[]", "response": "{'v1': 'previous_width', 'v2': 'audio_playing', 'sub_449814': 'open_menu', 'sub_440D49': 'GB_audio_is_playing', 'sub_440D77': 'GB_audio_set_paused', 'sub_424D5E': 'GB_get_screen_width', 'sub_4471F9': 'run_gui', 'sub_418118': 'GB_set_color_correction_mode', 'sub_418191': 'GB_set_light_temperature', 'sub_409F98': 'GB_set_interference_volume', 'sub_424D32': 'GB_set_border_mode', 'sub_449765': 'update_palette', 'sub_409F7D': 'GB_set_highpass_filter_mode', 'sub_42E36A': 'GB_set_rewind_length', 'sub_43F6DA': 'GB_set_rtc_mode', 'sub_44977E': 'screen_size_changed'}"}
err
43c73e5640b3729e7b9715e2718a282d1c6f9a648f9acf68d6a945819ddc96a2
EtchedPixels
CC6303
NA
void err(char c, uint8_t code) { if (pass > 1) { printf("%s: %d: %c: ", fname, line, toupper(c)); errstr(code); noobj = 1; } if (c == 'q') longjmp(env, 1); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "err", "function_addr": 4205606, "binary_name": "43c73e5640b3729e7b9715e2718a282d1c6f9a648f9acf68d6a945819ddc96a2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov edx, edi"], [4, "mov eax, esi"], [5, "mov [rbp+var_4], dl"], [6, "mov [rbp+var_8], al"], [7, "mov eax, cs:dword_40A060"], [8, "cmp eax, 1"], [9, "jle short loc_402C84"], [10, "movsx eax, [rbp+var_4]"], [11, "mov edi, eax"], [12, "call _toupper"], [13, "mov ecx, eax"], [14, "mov edx, cs:dword_40A064"], [15, "mov rax, cs:ptr"], [16, "mov rsi, rax"], [17, "mov edi, offset aSDC"], [18, "mov eax, 0"], [19, "call _printf"], [20, "movzx eax, [rbp+var_8]"], [21, "mov edi, eax"], [22, "call sub_402BC8"], [23, "mov cs:status, 1"], [24, "cmp [rbp+var_4], 71h "], [25, "jnz short loc_402C99"], [26, "mov esi, 1"], [27, "mov edi, offset env"], [28, "call _longjmp"], [29, "nop"], [30, "leave"], [31, "retn"]], "data_dep": [[5, 3], [6, 4], [8, 7], [9, 8], [10, 5], [11, 10], [13, 12], [16, 15], [20, 6], [21, 20], [24, 5], [25, 24], [31, 22], [31, 7]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/43c73e5640b3729e7b9715e2718a282d1c6f9a648f9acf68d6a945819ddc96a2_43c73e5640b3729e7b9715e2718a282d1c6f9a648f9acf68d6a945819ddc96a2.jsonl.gz", "strip_func_name": "err", "query": "\n\n\nvoid __fastcall __noreturn err(char a1, unsigned __int8 a2)\n{\nunsigned int v2; // eax\n\nif ( dword_40A060 > 1 )\n{\nv2 = toupper(a1);\nprintf(\"%s: %d: %c: \", (const char *)ptr, (unsigned int)dword_40A064, v2);\nsub_402BC8(a2);\nstatus = 1;\n}\nif ( a1 == 113 )\nlongjmp(env, 1);\n}\n\n\n\nQ:[a1,a2,sub_402BC8,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'c', 'a2': 'code', 'sub_402BC8': 'errstr'}"}
io_noclose
38bb5bcc430e0fa7d34733714ee56efeac7c173483e07cba4dab1c923e34ac41
etlegacy
etlegacy
NA
static int io_noclose (lua_State *L) { LStream *p = tolstream(L); p->closef = &io_noclose; /* keep file opened */ luaL_pushfail(L); lua_pushliteral(L, "cannot close standard file"); return 2; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43566B", "function_addr": 4413035, "binary_name": "38bb5bcc430e0fa7d34733714ee56efeac7c173483e07cba4dab1c923e34ac41.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov rax, [rbp+var_18]"], [5, "mov edx, offset aFile"], [6, "mov esi, 1"], [7, "mov rdi, rax"], [8, "call luaL_checkudata"], [9, "mov [rbp+var_8], rax"], [10, "mov rax, [rbp+var_8]"], [11, "mov qword ptr [rax+8], offset sub_43566B"], [12, "mov rax, [rbp+var_18]"], [13, "mov rdi, rax"], [14, "call lua_pushnil"], [15, "mov rax, [rbp+var_18]"], [16, "mov esi, offset aCannotCloseSta"], [17, "mov rdi, rax"], [18, "call lua_pushstring"], [19, "mov eax, 2"], [20, "leave"], [21, "retn"]], "data_dep": [[4, 3], [7, 4], [9, 8], [10, 9], [11, 10], [12, 3], [13, 12], [15, 3], [17, 15], [21, 19]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/38bb5bcc430e0fa7d34733714ee56efeac7c173483e07cba4dab1c923e34ac41_38bb5bcc430e0fa7d34733714ee56efeac7c173483e07cba4dab1c923e34ac41.jsonl.gz", "strip_func_name": "sub_43566B", "query": "\n\n\n__int64 __fastcall sub_43566B(_QWORD *a1)\n{\n*(_QWORD *)(luaL_checkudata(a1, 1u, (__int64)\"FILE*\") + 8) = sub_43566B;\nlua_pushnil((__int64)a1);\nlua_pushstring((__int64)a1, (__int64)\"cannot close standard file\");\nreturn 2LL;\n}\n\n\n\nQ:[a1,sub_43566B,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'L', 'sub_43566B': 'io_noclose'}"}
_lv_style_get_prop_group
53faff7486da2db257c0486a573e49eb3e70656a42b3e2ad40ce428af0925783
sukesh-ak
ESP32-TUX
NA
uint8_t _lv_style_get_prop_group(lv_style_prop_t prop) { uint16_t group = (prop & 0x1FF) >> 4; if(group > 7) group = 7; /*The MSB marks all the custom properties*/ return (uint8_t)group; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_470EF6", "function_addr": 4656886, "binary_name": "53faff7486da2db257c0486a573e49eb3e70656a42b3e2ad40ce428af0925783.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_14], edi"], [3, "mov eax, [rbp+var_14]"], [4, "shr eax, 4"], [5, "and eax, 1Fh"], [6, "mov [rbp+var_2], ax"], [7, "cmp [rbp+var_2], 7"], [8, "jbe short loc_470F17"], [9, "mov [rbp+var_2], 7"], [10, "movzx eax, [rbp+var_2]"], [11, "pop rbp"], [12, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [10, 6], [10, 9], [11, 0], [12, 10]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/53faff7486da2db257c0486a573e49eb3e70656a42b3e2ad40ce428af0925783_53faff7486da2db257c0486a573e49eb3e70656a42b3e2ad40ce428af0925783.jsonl.gz", "strip_func_name": "sub_470EF6", "query": "\n\n\n__int64 __fastcall sub_470EF6(unsigned int a1)\n{\nunsigned __int16 v2; // [rsp+12h] [rbp-2h]\n\nv2 = (a1 >> 4) & 0x1F;\nif ( v2 > 7u )\nv2 = 7;\nreturn v2;\n}\n\n\n\nQ:[a1,v2,sub_470EF6,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'prop', 'v2': 'group', 'sub_470EF6': '_lv_style_get_prop_group'}"}
io_uring_submit
830326b3d3ca9f1914b664a8cdd7fd554d968fdd14bff6ad08605edb7eb7020b
axboe
liburing
NA
int io_uring_submit(struct io_uring *ring) { return __io_uring_submit_and_wait(ring, 0); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_406520", "function_addr": 4220192, "binary_name": "830326b3d3ca9f1914b664a8cdd7fd554d968fdd14bff6ad08605edb7eb7020b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 8"], [3, "mov [rbp+var_8], rdi"], [4, "mov rax, [rbp+var_8]"], [5, "mov esi, 0"], [6, "mov rdi, rax"], [7, "call sub_4064ED"], [8, "leave"], [9, "retn"]], "data_dep": [[4, 3], [6, 4], [9, 7]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/830326b3d3ca9f1914b664a8cdd7fd554d968fdd14bff6ad08605edb7eb7020b_830326b3d3ca9f1914b664a8cdd7fd554d968fdd14bff6ad08605edb7eb7020b.jsonl.gz", "strip_func_name": "sub_406520", "query": "\n\n\n__int64 __fastcall sub_406520(__int64 a1)\n{\nreturn sub_4064ED(a1, 0);\n}\n\n\n\nQ:[a1,sub_406520,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ring', 'sub_406520': 'io_uring_submit'}"}
redisContextConnectTcp
1b585c1f400377fd1b50c31be1be21c077380d7410752164fffa7857ed70bb27
jingchunzhang
56vfs
NA
int redisContextConnectTcp(redisContext *c, const char *addr, int port, const struct timeval *timeout) { int s, rv; char _port[6]; /* strlen("65535"); */ struct addrinfo hints, *servinfo, *p; int blocking = (c->flags & REDIS_BLOCK); snprintf(_port, 6, "%d", port); memset(&hints,0,sizeof(hints)); hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; /* Try with IPv6 if no IPv4 address was found. We do it in this order since * in a Redis client you can't afford to test if you have IPv6 connectivity * as this would add latency to every connect. Otherwise a more sensible * route could be: Use IPv6 if both addresses are available and there is IPv6 * connectivity. */ if ((rv = getaddrinfo(addr,_port,&hints,&servinfo)) != 0) { hints.ai_family = AF_INET6; if ((rv = getaddrinfo(addr,_port,&hints,&servinfo)) != 0) { __redisSetError(c,REDIS_ERR_OTHER,gai_strerror(rv)); return REDIS_ERR; } } for (p = servinfo; p != NULL; p = p->ai_next) { if ((s = socket(p->ai_family,p->ai_socktype,p->ai_protocol)) == -1) continue; if (redisSetBlocking(c,s,0) != REDIS_OK) goto error; if (connect(s,p->ai_addr,p->ai_addrlen) == -1) { if (errno == EHOSTUNREACH) { close(s); continue; } else if (errno == EINPROGRESS && !blocking) { /* This is ok. */ } else { if (redisContextWaitReady(c,s,timeout) != REDIS_OK) goto error; } } if (blocking && redisSetBlocking(c,s,1) != REDIS_OK) goto error; if (redisSetTcpNoDelay(c,s) != REDIS_OK) goto error; c->fd = s; c->flags |= REDIS_CONNECTED; rv = REDIS_OK; goto end; } if (p == NULL) { char buf[128]; snprintf(buf,sizeof(buf),"Can't create socket: %s",strerror(errno)); __redisSetError(c,REDIS_ERR_OTHER,buf); goto error; } error: rv = REDIS_ERR; end: freeaddrinfo(servinfo); return rv; // Need to return REDIS_OK if alright }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "redisContextConnectTcp", "function_addr": 4232652, "binary_name": "1b585c1f400377fd1b50c31be1be21c077380d7410752164fffa7857ed70bb27.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 100h"], [3, "mov [rbp+var_E8], rdi"], [4, "mov [rbp+name], rsi"], [5, "mov [rbp+var_F4], edx"], [6, "mov [rbp+var_100], rcx"], [7, "mov rax, [rbp+var_E8]"], [8, "mov eax, [rax+88h]"], [9, "and eax, 1"], [10, "mov [rbp+var_14], eax"], [11, "mov edx, [rbp+var_F4]"], [12, "lea rax, [rbp+s]"], [13, "mov ecx, edx"], [14, "lea rdx, aD_0"], [15, "mov esi, 6"], [16, "mov rdi, rax"], [17, "mov eax, 0"], [18, "call _snprintf"], [19, "lea rax, [rbp+req]"], [20, "mov edx, 30h "], [21, "mov esi, 0"], [22, "mov rdi, rax"], [23, "call _memset"], [24, "mov [rbp+req.ai_family], 2"], [25, "mov [rbp+req.ai_socktype], 1"], [26, "lea rcx, [rbp+pai]"], [27, "lea rdx, [rbp+req]"], [28, "lea rsi, [rbp+s]"], [29, "mov rax, [rbp+name]"], [30, "mov rdi, rax"], [31, "call _getaddrinfo"], [32, "mov [rbp+ecode], eax"], [33, "cmp [rbp+ecode], 0"], [34, "jz short loc_4096C8"], [35, "mov [rbp+req.ai_family], 0Ah"], [36, "lea rcx, [rbp+pai]"], [37, "lea rdx, [rbp+req]"], [38, "lea rsi, [rbp+s]"], [39, "mov rax, [rbp+name]"], [40, "mov rdi, rax"], [41, "call _getaddrinfo"], [42, "mov [rbp+ecode], eax"], [43, "cmp [rbp+ecode], 0"], [44, "jz short loc_4096C8"], [45, "mov eax, [rbp+ecode]"], [46, "mov edi, eax"], [47, "call _gai_strerror"], [48, "mov rdx, rax"], [49, "mov rax, [rbp+var_E8]"], [50, "mov esi, 2"], [51, "mov rdi, rax"], [52, "call __redisSetError"], [53, "mov eax, 0FFFFFFFFh"], [54, "jmp locret_4098A6"], [55, "mov rax, [rbp+pai]"], [56, "mov [rbp+var_10], rax"], [57, "jmp loc_409820"], [58, "mov rax, [rbp+var_10]"], [59, "mov edx, [rax+0Ch]"], [60, "mov rax, [rbp+var_10]"], [61, "mov ecx, [rax+8]"], [62, "mov rax, [rbp+var_10]"], [63, "mov eax, [rax+4]"], [64, "mov esi, ecx"], [65, "mov edi, eax"], [66, "call _socket"], [67, "mov [rbp+fd], eax"], [68, "cmp [rbp+fd], 0FFFFFFFFh"], [69, "jz loc_409813"], [70, "mov ecx, [rbp+fd]"], [71, "mov rax, [rbp+var_E8]"], [72, "mov edx, 0"], [73, "mov esi, ecx"], [74, "mov rdi, rax"], [75, "call sub_408FDB"], [76, "test eax, eax"], [77, "jnz loc_409883"], [78, "mov rax, [rbp+var_10]"], [79, "mov edx, [rax+10h]"], [80, "mov rax, [rbp+var_10]"], [81, "mov rax, [rax+18h]"], [82, "mov rcx, rax"], [83, "mov eax, [rbp+fd]"], [84, "mov rsi, rcx"], [85, "mov edi, eax"], [86, "call _connect"], [87, "cmp eax, 0FFFFFFFFh"], [88, "jnz short loc_409795"], [89, "call ___errno_location"], [90, "mov eax, [rax]"], [91, "cmp eax, 71h "], [92, "jnz short loc_409760"], [93, "mov eax, [rbp+fd]"], [94, "mov edi, eax"], [95, "call _close"], [96, "jmp loc_409814"], [97, "call ___errno_location"], [98, "mov eax, [rax]"], [99, "cmp eax, 73h "], [100, "jnz short loc_409772"], [101, "cmp [rbp+var_14], 0"], [102, "jz short loc_409795"], [103, "mov rdx, [rbp+var_100]"], [104, "mov ecx, [rbp+fd]"], [105, "mov rax, [rbp+var_E8]"], [106, "mov esi, ecx"], [107, "mov rdi, rax"], [108, "call sub_4092A2"], [109, "test eax, eax"], [110, "jnz loc_409886"], [111, "cmp [rbp+var_14], 0"], [112, "jz short loc_4097BC"], [113, "mov ecx, [rbp+fd]"], [114, "mov rax, [rbp+var_E8]"], [115, "mov edx, 1"], [116, "mov esi, ecx"], [117, "mov rdi, rax"], [118, "call sub_408FDB"], [119, "test eax, eax"], [120, "jnz loc_409889"], [121, "mov edx, [rbp+fd]"], [122, "mov rax, [rbp+var_E8]"], [123, "mov esi, edx"], [124, "mov rdi, rax"], [125, "call sub_409236"], [126, "test eax, eax"], [127, "jnz loc_40988C"], [128, "mov rax, [rbp+var_E8]"], [129, "mov edx, [rbp+fd]"], [130, "mov [rax+84h], edx"], [131, "mov rax, [rbp+var_E8]"], [132, "mov eax, [rax+88h]"], [133, "or eax, 2"], [134, "mov edx, eax"], [135, "mov rax, [rbp+var_E8]"], [136, "mov [rax+88h], edx"], [137, "mov [rbp+ecode], 0"], [138, "jmp loc_409897"], [139, "nop"], [140, "mov rax, [rbp+var_10]"], [141, "mov rax, [rax+28h]"], [142, "mov [rbp+var_10], rax"], [143, "cmp [rbp+var_10], 0"], [144, "jnz loc_4096D5"], [145, "cmp [rbp+var_10], 0"], [146, "jnz short loc_40988F"], [147, "call ___errno_location"], [148, "mov eax, [rax]"], [149, "mov edi, eax"], [150, "call _strerror"], [151, "mov rdx, rax"], [152, "lea rax, [rbp+var_E0]"], [153, "mov rcx, rdx"], [154, "lea rdx, aCanTCreateSock"], [155, "mov esi, 80h"], [156, "mov rdi, rax"], [157, "mov eax, 0"], [158, "call _snprintf"], [159, "lea rdx, [rbp+var_E0]"], [160, "mov rax, [rbp+var_E8]"], [161, "mov esi, 2"], [162, "mov rdi, rax"], [163, "call __redisSetError"], [164, "jmp short loc_409890"], [165, "nop"], [166, "jmp short loc_409890"], [167, "nop"], [168, "jmp short loc_409890"], [169, "nop"], [170, "jmp short loc_409890"], [171, "nop"], [172, "jmp short loc_409890"], [173, "nop"], [174, "mov [rbp+ecode], 0FFFFFFFFh"], [175, "mov rax, [rbp+pai]"], [176, "mov rdi, rax"], [177, "call _freeaddrinfo"], [178, "mov eax, [rbp+ecode]"], [179, "leave"], [180, "retn"]], "data_dep": [[7, 3], [8, 7], [9, 8], [10, 9], [11, 5], [12, 9], [13, 11], [14, 11], [16, 12], [19, 18], [22, 19], [26, 13], [27, 20], [28, 21], [29, 4], [30, 29], [32, 31], [33, 32], [34, 33], [36, 26], [37, 27], [38, 28], [39, 4], [40, 39], [42, 41], [43, 42], [44, 43], [45, 42], [46, 45], [48, 47], [49, 3], [51, 49], [56, 55], [58, 56], [58, 142], [59, 58], [60, 142], [60, 56], [61, 60], [62, 142], [62, 56], [63, 62], [64, 61], [65, 63], [67, 66], [68, 67], [69, 68], [70, 67], [71, 3], [73, 70], [74, 71], [76, 75], [77, 76], [78, 56], [78, 142], [79, 78], [80, 56], [80, 142], [81, 80], [82, 81], [83, 67], [84, 82], [85, 83], [87, 86], [88, 87], [90, 89], [91, 90], [92, 91], [93, 67], [94, 93], [98, 97], [99, 98], [100, 99], [101, 10], [102, 101], [103, 6], [104, 67], [105, 3], [106, 104], [107, 105], [109, 108], [110, 109], [111, 10], [112, 111], [113, 67], [114, 3], [116, 113], [117, 114], [119, 118], [120, 119], [121, 67], [122, 3], [123, 121], [124, 122], [126, 125], [127, 126], [128, 3], [129, 67], [130, 128], [130, 129], [131, 3], [132, 130], [132, 131], [133, 132], [134, 133], [135, 3], [136, 135], [136, 134], [140, 56], [140, 142], [141, 140], [142, 141], [143, 142], [143, 56], [144, 143], [145, 142], [145, 56], [146, 145], [148, 147], [149, 148], [151, 150], [152, 150], [153, 151], [154, 151], [156, 152], [159, 154], [160, 3], [162, 160], [176, 175], [178, 174], [178, 137], [180, 53], [180, 178]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1b585c1f400377fd1b50c31be1be21c077380d7410752164fffa7857ed70bb27_1b585c1f400377fd1b50c31be1be21c077380d7410752164fffa7857ed70bb27.jsonl.gz", "strip_func_name": "redisContextConnectTcp", "query": "\n\n\n__int64 __fastcall redisContextConnectTcp(__int64 a1, const char *a2, unsigned int a3, __int64 *a4)\n{\nconst char *v4; // rax\nint *v6; // rax\nchar *v7; // rax\nchar v9[136]; // [rsp+20h] [rbp-E0h] BYREF\nstruct addrinfo *pai; // [rsp+A8h] [rbp-58h] BYREF\nstruct addrinfo req; // [rsp+B0h] [rbp-50h] BYREF\nchar s[6]; // [rsp+E2h] [rbp-1Eh] BYREF\nint fd; // [rsp+E8h] [rbp-18h]\nint v14; // [rsp+ECh] [rbp-14h]\nstruct addrinfo *i; // [rsp+F0h] [rbp-10h]\nint ecode; // [rsp+FCh] [rbp-4h]\n\nv14 = *(_DWORD *)(a1 + 136) & 1;\nsnprintf(s, 6uLL, \"%d\", a3);\nmemset(&req, 0, sizeof(req));\nreq.ai_family = 2;\nreq.ai_socktype = 1;\necode = getaddrinfo(a2, s, &req, &pai);\nif ( ecode )\n{\nreq.ai_family = 10;\necode = getaddrinfo(a2, s, &req, &pai);\nif ( ecode )\n{\nv4 = gai_strerror(ecode);\n_redisSetError((char *)a1, 2, v4);\nreturn 0xFFFFFFFFLL;\n}\n}\nfor ( i = pai; ; i = i->ai_next )\n{\nif ( !i )\n{\nv6 = __errno_location();\nv7 = strerror(*v6);\nsnprintf(v9, 0x80uLL, \"Can't create socket: %s\", v7);\n_redisSetError((char *)a1, 2, v9);\ngoto LABEL_20;\n}\nfd = socket(i->ai_family, i->ai_socktype, i->ai_protocol);\nif ( fd != -1 )\nbreak;\nLABEL_17:\n;\n}\nif ( (unsigned int)sub_408FDB((char *)a1, fd, 0) )\ngoto LABEL_20;\nif ( connect(fd, i->ai_addr, i->ai_addrlen) != -1 )\ngoto LABEL_13;\nif ( *__errno_location() == 113 )\n{\nclose(fd);\ngoto LABEL_17;\n}\nif ( (*__errno_location() != 115 || v14) && (unsigned int)sub_4092A2((char *)a1, fd, a4) )\ngoto LABEL_20;\nLABEL_13:\nif ( (!v14 || !(unsigned int)sub_408FDB((char *)a1, fd, 1)) && !(unsigned int)sub_409236((char *)a1, fd) )\n{\n*(_DWORD *)(a1 + 132) = fd;\n*(_DWORD *)(a1 + 136) |= 2u;\necode = 0;\ngoto LABEL_21;\n}\nLABEL_20:\necode = -1;\nLABEL_21:\nfreeaddrinfo(pai);\nreturn (unsigned int)ecode;\n}\n\n\n\nQ:[a3,a4,a1,a2,v9,pai,req,s,fd,v14,i,ecode,sub_408FDB,sub_4092A2,sub_409236,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'port', 'a4': 'timeout', 'a1': 'c', 'a2': 'addr', 'v9': 'buf', 'pai': 'servinfo', 'req': 'hints', 's': '_port', 'fd': 's', 'v14': 'blocking', 'i': 'p', 'ecode': 'rv', 'sub_408FDB': 'redisSetBlocking', 'sub_4092A2': 'redisContextWaitReady', 'sub_409236': 'redisSetTcpNoDelay'}"}
inx
1311b7e7dc6fbb4b737efd00c3ef17ff79cf78a6b10ffa5b4dd9014fc71f68f7
mist64
kernalemu
NA
static void inx() { x++; zerocalc(x); signcalc(x); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407622", "function_addr": 4224546, "binary_name": "1311b7e7dc6fbb4b737efd00c3ef17ff79cf78a6b10ffa5b4dd9014fc71f68f7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "movzx eax, cs:byte_43030C"], [3, "add eax, 1"], [4, "mov cs:byte_43030C, al"], [5, "movzx eax, cs:byte_43030C"], [6, "test al, al"], [7, "jz short loc_407653"], [8, "movzx eax, cs:byte_43030E"], [9, "and eax, 0FFFFFFFDh"], [10, "mov cs:byte_43030E, al"], [11, "jmp short loc_407663"], [12, "movzx eax, cs:byte_43030E"], [13, "or eax, 2"], [14, "mov cs:byte_43030E, al"], [15, "movzx eax, cs:byte_43030C"], [16, "test al, al"], [17, "jns short loc_407680"], [18, "movzx eax, cs:byte_43030E"], [19, "or eax, 0FFFFFF80h"], [20, "mov cs:byte_43030E, al"], [21, "jmp short loc_407690"], [22, "movzx eax, cs:byte_43030E"], [23, "and eax, 7Fh"], [24, "mov cs:byte_43030E, al"], [25, "nop"], [26, "pop rbp"], [27, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [9, 8], [10, 9], [13, 12], [14, 13], [15, 4], [16, 15], [17, 16], [18, 10], [18, 14], [19, 18], [20, 19], [22, 14], [22, 10], [23, 22], [24, 23], [26, 0], [27, 19], [27, 23]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1311b7e7dc6fbb4b737efd00c3ef17ff79cf78a6b10ffa5b4dd9014fc71f68f7_1311b7e7dc6fbb4b737efd00c3ef17ff79cf78a6b10ffa5b4dd9014fc71f68f7.jsonl.gz", "strip_func_name": "sub_407622", "query": "\n\n\n__int64 sub_407622()\n{\n__int64 result; // rax\n\nLOBYTE(word_43030C) = word_43030C + 1;\nif ( (_BYTE)word_43030C )\nbyte_43030E &= 0xFDu;\nelse\nbyte_43030E |= 2u;\nif ( (word_43030C & 0x80u) == 0 )\n{\nresult = byte_43030E & 0x7F;\nbyte_43030E &= 0x7Fu;\n}\nelse\n{\nresult = (unsigned __int8)byte_43030E | 0xFFFFFF80;\nbyte_43030E |= 0x80u;\n}\nreturn result;\n}\n\n\n\nQ:[sub_407622,]\nAssistant: ", "hints": "[]", "response": "{'sub_407622': 'inx'}"}
disasm_clr_a
18ff9bd9c1637b628af63c86f48edfbee6b6b7371ac92f808a17f2cbb8eb4fe5
jarikomppa
emu8051
NA
static uint8_t disasm_clr_a(struct em8051 *aCPU, uint16_t aPosition, char *aBuffer) { sprintf(aBuffer,"CLR A"); return 1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_416133", "function_addr": 4284723, "binary_name": "18ff9bd9c1637b628af63c86f48edfbee6b6b7371ac92f808a17f2cbb8eb4fe5.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], rdi"], [4, "mov eax, esi"], [5, "mov [rbp+s], rdx"], [6, "mov [rbp+var_C], ax"], [7, "mov rax, [rbp+s]"], [8, "mov esi, offset aClrA"], [9, "mov rdi, rax"], [10, "mov eax, 0"], [11, "call _sprintf"], [12, "mov eax, 1"], [13, "leave"], [14, "retn"]], "data_dep": [[6, 4], [7, 5], [9, 7], [14, 12]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/18ff9bd9c1637b628af63c86f48edfbee6b6b7371ac92f808a17f2cbb8eb4fe5_18ff9bd9c1637b628af63c86f48edfbee6b6b7371ac92f808a17f2cbb8eb4fe5.jsonl.gz", "strip_func_name": "sub_416133", "query": "\n\n\n__int64 __fastcall sub_416133(__int64 a1, __int64 a2, char *a3)\n{\nsprintf(a3, \"CLR A\");\nreturn 1LL;\n}\n\n\n\nQ:[a3,a1,a2,sub_416133,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'aBuffer', 'a1': 'aCPU', 'a2': 'aPosition', 'sub_416133': 'disasm_clr_a'}"}
r_remove_first_order_prefix
2eb83c415560a14c7931e6c8dcec619df0abbc7811f3da18932e1361a7ff0c7c
hthetiot
node-snowball
NA
static int r_remove_first_order_prefix(struct SN_env * z) { int among_var; z->bra = z->c; if (z->c + 1 >= z->l || (z->p[z->c + 1] != 105 && z->p[z->c + 1] != 101)) return 0; among_var = find_among(z, a_3, 12); if (!(among_var)) return 0; z->ket = z->c; switch (among_var) { case 1: { int ret = slice_del(z); if (ret < 0) return ret; } z->I[0] = 1; z->I[1] -= 1; break; case 2: { int ret = slice_del(z); if (ret < 0) return ret; } z->I[0] = 3; z->I[1] -= 1; break; case 3: z->I[0] = 1; { int ret = slice_from_s(z, 1, s_1); if (ret < 0) return ret; } z->I[1] -= 1; break; case 4: z->I[0] = 3; { int ret = slice_from_s(z, 1, s_2); if (ret < 0) return ret; } z->I[1] -= 1; break; case 5: z->I[0] = 1; z->I[1] -= 1; { int c1 = z->c; { int c2 = z->c; if (in_grouping_U(z, g_vowel, 97, 117, 0)) goto lab1; z->c = c2; { int ret = slice_from_s(z, 1, s_3); if (ret < 0) return ret; } } goto lab0; lab1: z->c = c1; { int ret = slice_del(z); if (ret < 0) return ret; } } lab0: break; case 6: z->I[0] = 3; z->I[1] -= 1; { int c3 = z->c; { int c4 = z->c; if (in_grouping_U(z, g_vowel, 97, 117, 0)) goto lab3; z->c = c4; { int ret = slice_from_s(z, 1, s_4); if (ret < 0) return ret; } } goto lab2; lab3: z->c = c3; { int ret = slice_del(z); if (ret < 0) return ret; } } lab2: break; } return 1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_422964", "function_addr": 4335972, "binary_name": "2eb83c415560a14c7931e6c8dcec619df0abbc7811f3da18932e1361a7ff0c7c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_48], rdi"], [4, "mov rax, [rbp+var_48]"], [5, "mov edx, [rax+8]"], [6, "mov rax, [rbp+var_48]"], [7, "mov [rax+14h], edx"], [8, "mov rax, [rbp+var_48]"], [9, "mov eax, [rax+8]"], [10, "lea edx, [rax+1]"], [11, "mov rax, [rbp+var_48]"], [12, "mov eax, [rax+0Ch]"], [13, "cmp edx, eax"], [14, "jge short loc_4229CF"], [15, "mov rax, [rbp+var_48]"], [16, "mov rdx, [rax]"], [17, "mov rax, [rbp+var_48]"], [18, "mov eax, [rax+8]"], [19, "cdqe"], [20, "add rax, 1"], [21, "add rax, rdx"], [22, "movzx eax, byte ptr [rax]"], [23, "cmp al, 69h "], [24, "jz short loc_4229D9"], [25, "mov rax, [rbp+var_48]"], [26, "mov rdx, [rax]"], [27, "mov rax, [rbp+var_48]"], [28, "mov eax, [rax+8]"], [29, "cdqe"], [30, "add rax, 1"], [31, "add rax, rdx"], [32, "movzx eax, byte ptr [rax]"], [33, "cmp al, 65h "], [34, "jz short loc_4229D9"], [35, "mov eax, 0"], [36, "jmp locret_422CED"], [37, "mov rax, [rbp+var_48]"], [38, "mov edx, 0Ch"], [39, "mov esi, offset unk_4702E0"], [40, "mov rdi, rax"], [41, "call sub_442537"], [42, "mov [rbp+var_4], eax"], [43, "cmp [rbp+var_4], 0"], [44, "jnz short loc_422A02"], [45, "mov eax, 0"], [46, "jmp locret_422CED"], [47, "mov rax, [rbp+var_48]"], [48, "mov edx, [rax+8]"], [49, "mov rax, [rbp+var_48]"], [50, "mov [rax+18h], edx"], [51, "cmp [rbp+var_4], 6"], [52, "ja def_422A25"], [53, "mov eax, [rbp+var_4]"], [54, "mov rax, ds:jpt_422A25[rax*8]"], [55, "jmp rax"], [56, "mov rax, [rbp+var_48]"], [57, "mov rdi, rax"], [58, "call sub_442C28"], [59, "mov [rbp+var_34], eax"], [60, "cmp [rbp+var_34], 0"], [61, "jns short loc_422A44"], [62, "mov eax, [rbp+var_34]"], [63, "jmp locret_422CED"], [64, "mov rax, [rbp+var_48]"], [65, "mov rax, [rax+28h]"], [66, "add rax, 4"], [67, "mov dword ptr [rax], 1"], [68, "mov rax, [rbp+var_48]"], [69, "mov rax, [rax+28h]"], [70, "mov edx, [rax]"], [71, "mov rax, [rbp+var_48]"], [72, "mov rax, [rax+28h]"], [73, "sub edx, 1"], [74, "mov [rax], edx"], [75, "jmp def_422A25"], [76, "mov rax, [rbp+var_48]"], [77, "mov rdi, rax"], [78, "call sub_442C28"], [79, "mov [rbp+var_30], eax"], [80, "cmp [rbp+var_30], 0"], [81, "jns short loc_422A8F"], [82, "mov eax, [rbp+var_30]"], [83, "jmp locret_422CED"], [84, "mov rax, [rbp+var_48]"], [85, "mov rax, [rax+28h]"], [86, "add rax, 4"], [87, "mov dword ptr [rax], 3"], [88, "mov rax, [rbp+var_48]"], [89, "mov rax, [rax+28h]"], [90, "mov edx, [rax]"], [91, "mov rax, [rbp+var_48]"], [92, "mov rax, [rax+28h]"], [93, "sub edx, 1"], [94, "mov [rax], edx"], [95, "jmp def_422A25"], [96, "mov rax, [rbp+var_48]"], [97, "mov rax, [rax+28h]"], [98, "add rax, 4"], [99, "mov dword ptr [rax], 1"], [100, "mov rax, [rbp+var_48]"], [101, "mov edx, 470545h"], [102, "mov esi, 1"], [103, "mov rdi, rax"], [104, "call sub_442BA4"], [105, "mov [rbp+var_2C], eax"], [106, "cmp [rbp+var_2C], 0"], [107, "jns short loc_422AF6"], [108, "mov eax, [rbp+var_2C]"], [109, "jmp locret_422CED"], [110, "mov rax, [rbp+var_48]"], [111, "mov rax, [rax+28h]"], [112, "mov edx, [rax]"], [113, "mov rax, [rbp+var_48]"], [114, "mov rax, [rax+28h]"], [115, "sub edx, 1"], [116, "mov [rax], edx"], [117, "jmp def_422A25"], [118, "mov rax, [rbp+var_48]"], [119, "mov rax, [rax+28h]"], [120, "add rax, 4"], [121, "mov dword ptr [rax], 3"], [122, "mov rax, [rbp+var_48]"], [123, "mov edx, 470546h"], [124, "mov esi, 1"], [125, "mov rdi, rax"], [126, "call sub_442BA4"], [127, "mov [rbp+var_28], eax"], [128, "cmp [rbp+var_28], 0"], [129, "jns short loc_422B4B"], [130, "mov eax, [rbp+var_28]"], [131, "jmp locret_422CED"], [132, "mov rax, [rbp+var_48]"], [133, "mov rax, [rax+28h]"], [134, "mov edx, [rax]"], [135, "mov rax, [rbp+var_48]"], [136, "mov rax, [rax+28h]"], [137, "sub edx, 1"], [138, "mov [rax], edx"], [139, "jmp def_422A25"], [140, "mov rax, [rbp+var_48]"], [141, "mov rax, [rax+28h]"], [142, "add rax, 4"], [143, "mov dword ptr [rax], 1"], [144, "mov rax, [rbp+var_48]"], [145, "mov rax, [rax+28h]"], [146, "mov edx, [rax]"], [147, "mov rax, [rbp+var_48]"], [148, "mov rax, [rax+28h]"], [149, "sub edx, 1"], [150, "mov [rax], edx"], [151, "mov rax, [rbp+var_48]"], [152, "mov eax, [rax+8]"], [153, "mov [rbp+var_18], eax"], [154, "mov rax, [rbp+var_48]"], [155, "mov eax, [rax+8]"], [156, "mov [rbp+var_1C], eax"], [157, "mov rax, [rbp+var_48]"], [158, "mov r8d, 0"], [159, "mov ecx, 75h "], [160, "mov edx, 61h "], [161, "mov esi, offset unk_470540"], [162, "mov rdi, rax"], [163, "call sub_441E37"], [164, "test eax, eax"], [165, "jnz short loc_422BFA"], [166, "mov rax, [rbp+var_48]"], [167, "mov edx, [rbp+var_1C]"], [168, "mov [rax+8], edx"], [169, "mov rax, [rbp+var_48]"], [170, "mov edx, 470547h"], [171, "mov esi, 1"], [172, "mov rdi, rax"], [173, "call sub_442BA4"], [174, "mov [rbp+var_20], eax"], [175, "cmp [rbp+var_20], 0"], [176, "jns short loc_422C22"], [177, "mov eax, [rbp+var_20]"], [178, "jmp locret_422CED"], [179, "nop"], [180, "mov rax, [rbp+var_48]"], [181, "mov edx, [rbp+var_18]"], [182, "mov [rax+8], edx"], [183, "mov rax, [rbp+var_48]"], [184, "mov rdi, rax"], [185, "call sub_442C28"], [186, "mov [rbp+var_24], eax"], [187, "cmp [rbp+var_24], 0"], [188, "jns short loc_422C28"], [189, "mov eax, [rbp+var_24]"], [190, "jmp locret_422CED"], [191, "nop"], [192, "jmp def_422A25"], [193, "nop"], [194, "jmp def_422A25"], [195, "mov rax, [rbp+var_48]"], [196, "mov rax, [rax+28h]"], [197, "add rax, 4"], [198, "mov dword ptr [rax], 3"], [199, "mov rax, [rbp+var_48]"], [200, "mov rax, [rax+28h]"], [201, "mov edx, [rax]"], [202, "mov rax, [rbp+var_48]"], [203, "mov rax, [rax+28h]"], [204, "sub edx, 1"], [205, "mov [rax], edx"], [206, "mov rax, [rbp+var_48]"], [207, "mov eax, [rax+8]"], [208, "mov [rbp+var_8], eax"], [209, "mov rax, [rbp+var_48]"], [210, "mov eax, [rax+8]"], [211, "mov [rbp+var_C], eax"], [212, "mov rax, [rbp+var_48]"], [213, "mov r8d, 0"], [214, "mov ecx, 75h "], [215, "mov edx, 61h "], [216, "mov esi, offset unk_470540"], [217, "mov rdi, rax"], [218, "call sub_441E37"], [219, "test eax, eax"], [220, "jnz short loc_422CBE"], [221, "mov rax, [rbp+var_48]"], [222, "mov edx, [rbp+var_C]"], [223, "mov [rax+8], edx"], [224, "mov rax, [rbp+var_48]"], [225, "mov edx, 470548h"], [226, "mov esi, 1"], [227, "mov rdi, rax"], [228, "call sub_442BA4"], [229, "mov [rbp+var_10], eax"], [230, "cmp [rbp+var_10], 0"], [231, "jns short loc_422CE3"], [232, "mov eax, [rbp+var_10]"], [233, "jmp short locret_422CED"], [234, "nop"], [235, "mov rax, [rbp+var_48]"], [236, "mov edx, [rbp+var_8]"], [237, "mov [rax+8], edx"], [238, "mov rax, [rbp+var_48]"], [239, "mov rdi, rax"], [240, "call sub_442C28"], [241, "mov [rbp+var_14], eax"], [242, "cmp [rbp+var_14], 0"], [243, "jns short loc_422CE6"], [244, "mov eax, [rbp+var_14]"], [245, "jmp short locret_422CED"], [246, "nop"], [247, "jmp short loc_422CE7"], [248, "nop"], [249, "nop"], [250, "mov eax, 1"], [251, "leave"], [252, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 3], [7, 5], [7, 6], [8, 3], [9, 8], [9, 7], [10, 5], [10, 7], [10, 9], [11, 3], [12, 7], [12, 11], [13, 10], [13, 12], [14, 13], [15, 3], [16, 15], [16, 7], [17, 3], [18, 17], [18, 7], [20, 18], [21, 16], [21, 20], [22, 21], [22, 7], [23, 22], [24, 23], [25, 3], [26, 7], [26, 25], [27, 3], [28, 7], [28, 27], [30, 28], [31, 26], [31, 30], [32, 7], [32, 31], [33, 32], [34, 33], [37, 3], [40, 37], [42, 41], [43, 42], [44, 43], [47, 3], [48, 47], [48, 7], [48, 50], [49, 3], [50, 49], [50, 48], [51, 42], [52, 51], [53, 42], [55, 54], [56, 3], [57, 56], [59, 58], [60, 59], [61, 60], [62, 59], [64, 3], [65, 67], [65, 74], [65, 7], [65, 64], [65, 50], [66, 65], [67, 66], [68, 3], [69, 67], [69, 68], [70, 67], [70, 69], [71, 3], [72, 67], [72, 71], [73, 70], [74, 73], [74, 72], [76, 3], [77, 76], [79, 78], [80, 79], [81, 80], [82, 79], [84, 3], [85, 84], [85, 50], [85, 94], [85, 87], [85, 7], [86, 85], [87, 86], [88, 3], [89, 88], [89, 87], [90, 87], [90, 89], [91, 3], [92, 87], [92, 91], [93, 90], [94, 93], [94, 92], [96, 3], [97, 99], [97, 96], [97, 7], [97, 50], [98, 97], [99, 98], [100, 3], [103, 100], [105, 104], [106, 105], [107, 106], [108, 105], [110, 3], [111, 110], [111, 7], [111, 50], [111, 116], [111, 99], [112, 50], [112, 116], [112, 111], [112, 99], [112, 7], [113, 3], [114, 113], [114, 99], [114, 50], [114, 7], [114, 116], [115, 112], [116, 115], [116, 114], [118, 3], [119, 50], [119, 7], [119, 121], [119, 118], [120, 119], [121, 120], [122, 3], [125, 122], [127, 126], [128, 127], [129, 128], [130, 127], [132, 3], [133, 132], [133, 138], [133, 7], [133, 121], [133, 50], [134, 133], [134, 7], [134, 121], [134, 50], [134, 138], [135, 3], [136, 121], [136, 50], [136, 7], [136, 135], [136, 138], [137, 134], [138, 137], [138, 136], [140, 3], [141, 140], [141, 50], [141, 7], [141, 150], [141, 143], [142, 141], [143, 142], [144, 3], [145, 144], [145, 143], [146, 143], [146, 145], [147, 3], [148, 143], [148, 147], [149, 146], [150, 148], [150, 149], [151, 3], [152, 151], [152, 150], [153, 152], [154, 3], [155, 150], [155, 154], [156, 155], [157, 3], [162, 157], [164, 163], [165, 164], [166, 3], [167, 156], [168, 166], [168, 167], [169, 3], [172, 169], [174, 173], [175, 174], [176, 175], [177, 174], [180, 3], [181, 153], [182, 181], [182, 180], [183, 3], [184, 183], [186, 185], [187, 186], [188, 187], [189, 186], [195, 3], [196, 50], [196, 7], [196, 205], [196, 198], [196, 195], [197, 196], [198, 197], [199, 3], [200, 199], [200, 198], [201, 198], [201, 200], [202, 3], [203, 202], [203, 198], [204, 201], [205, 204], [205, 203], [206, 3], [207, 206], [207, 205], [208, 207], [209, 3], [210, 205], [210, 209], [211, 210], [212, 3], [217, 212], [219, 218], [220, 219], [221, 3], [222, 211], [223, 221], [223, 222], [224, 3], [227, 224], [229, 228], [230, 229], [231, 230], [232, 229], [235, 3], [236, 208], [237, 236], [237, 235], [238, 3], [239, 238], [241, 240], [242, 241], [243, 242], [244, 241], [252, 232], [252, 177], [252, 35], [252, 108], [252, 250], [252, 62], [252, 82], [252, 130], [252, 244], [252, 189], [252, 45]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/2eb83c415560a14c7931e6c8dcec619df0abbc7811f3da18932e1361a7ff0c7c_2eb83c415560a14c7931e6c8dcec619df0abbc7811f3da18932e1361a7ff0c7c.jsonl.gz", "strip_func_name": "sub_422964", "query": "\n\n\n__int64 __fastcall sub_422964(__int64 a1)\n{\n__int64 result; // rax\nint v2; // [rsp+1Ch] [rbp-34h]\nint v3; // [rsp+20h] [rbp-30h]\nint v4; // [rsp+24h] [rbp-2Ch]\nint v5; // [rsp+28h] [rbp-28h]\nint v6; // [rsp+2Ch] [rbp-24h]\nint v7; // [rsp+30h] [rbp-20h]\nint v8; // [rsp+38h] [rbp-18h]\nint v9; // [rsp+3Ch] [rbp-14h]\nint v10; // [rsp+40h] [rbp-10h]\nint v11; // [rsp+48h] [rbp-8h]\nint v12; // [rsp+4Ch] [rbp-4h]\n\n*(_DWORD *)(a1 + 20) = *(_DWORD *)(a1 + 8);\nif ( *(_DWORD *)(a1 + 8) + 1 >= *(_DWORD *)(a1 + 12)\n|| *(_BYTE *)(*(_QWORD *)a1 + *(int *)(a1 + 8) + 1LL) != 105\n&& *(_BYTE *)(*(_QWORD *)a1 + *(int *)(a1 + 8) + 1LL) != 101 )\n{\nreturn 0LL;\n}\nv12 = sub_442537(a1, &unk_4702E0, 12LL);\nif ( !v12 )\nreturn 0LL;\n*(_DWORD *)(a1 + 24) = *(_DWORD *)(a1 + 8);\nswitch ( v12 )\n{\ncase 1:\nv2 = sub_442C28(a1);\nif ( v2 >= 0 )\n{\n*(_DWORD *)(*(_QWORD *)(a1 + 40) + 4LL) = 1;\n--**(_DWORD **)(a1 + 40);\ngoto LABEL_32;\n}\nresult = (unsigned int)v2;\nbreak;\ncase 2:\nv3 = sub_442C28(a1);\nif ( v3 >= 0 )\n{\n*(_DWORD *)(*(_QWORD *)(a1 + 40) + 4LL) = 3;\n--**(_DWORD **)(a1 + 40);\ngoto LABEL_32;\n}\nresult = (unsigned int)v3;\nbreak;\ncase 3:\n*(_DWORD *)(*(_QWORD *)(a1 + 40) + 4LL) = 1;\nv4 = sub_442BA4(a1, 1LL, 4654405LL);\nif ( v4 >= 0 )\n{\n--**(_DWORD **)(a1 + 40);\ngoto LABEL_32;\n}\nresult = (unsigned int)v4;\nbreak;\ncase 4:\n*(_DWORD *)(*(_QWORD *)(a1 + 40) + 4LL) = 3;\nv5 = sub_442BA4(a1, 1LL, 4654406LL);\nif ( v5 >= 0 )\n{\n--**(_DWORD **)(a1 + 40);\ngoto LABEL_32;\n}\nresult = (unsigned int)v5;\nbreak;\ncase 5:\n*(_DWORD *)(*(_QWORD *)(a1 + 40) + 4LL) = 1;\n--**(_DWORD **)(a1 + 40);\nv8 = *(_DWORD *)(a1 + 8);\nif ( (unsigned int)sub_441E37(a1, &unk_470540, 97LL, 117LL, 0LL) )\n{\n*(_DWORD *)(a1 + 8) = v8;\nv6 = sub_442C28(a1);\nif ( v6 >= 0 )\ngoto LABEL_32;\nresult = (unsigned int)v6;\n}\nelse\n{\n*(_DWORD *)(a1 + 8) = v8;\nv7 = sub_442BA4(a1, 1LL, 4654407LL);\nif ( v7 >= 0 )\ngoto LABEL_32;\nresult = (unsigned int)v7;\n}\nbreak;\ncase 6:\n*(_DWORD *)(*(_QWORD *)(a1 + 40) + 4LL) = 3;\n--**(_DWORD **)(a1 + 40);\nv11 = *(_DWORD *)(a1 + 8);\nif ( (unsigned int)sub_441E37(a1, &unk_470540, 97LL, 117LL, 0LL) )\n{\n*(_DWORD *)(a1 + 8) = v11;\nv9 = sub_442C28(a1);\nif ( v9 >= 0 )\ngoto LABEL_32;\nresult = (unsigned int)v9;\n}\nelse\n{\n*(_DWORD *)(a1 + 8) = v11;\nv10 = sub_442BA4(a1, 1LL, 4654408LL);\nif ( v10 >= 0 )\ngoto LABEL_32;\nresult = (unsigned int)v10;\n}\nbreak;\ndefault:\nLABEL_32:\nresult = 1LL;\nbreak;\n}\nreturn result;\n}\n\n\n\nQ:[a1,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,sub_422964,sub_442537,sub_442C28,sub_442BA4,sub_441E37,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'z', 'v3': 'ret_0', 'v4': 'ret_1', 'v5': 'ret_2', 'v6': 'ret_4', 'v7': 'ret_3', 'v8': 'c1', 'v9': 'ret_6', 'v10': 'ret_5', 'v11': 'c3', 'v12': 'among_var', 'sub_422964': 'r_remove_first_order_prefix_0', 'sub_442537': 'find_among', 'sub_442C28': 'slice_del', 'sub_442BA4': 'slice_from_s', 'sub_441E37': 'in_grouping_U'}"}
close_func
f68b12b76f68351e9f048bd28a697879a69b1799fbf8bdd30581dce70b5e806b
aerospike
aerospike-client-c
NA
static void close_func (LexState *ls) { lua_State *L = ls->L; FuncState *fs = ls->fs; Proto *f = fs->f; luaK_ret(fs, luaY_nvarstack(fs), 0); /* final return */ leaveblock(fs); lua_assert(fs->bl == NULL); luaK_finish(fs); luaM_shrinkvector(L, f->code, f->sizecode, fs->pc, Instruction); luaM_shrinkvector(L, f->lineinfo, f->sizelineinfo, fs->pc, ls_byte); luaM_shrinkvector(L, f->abslineinfo, f->sizeabslineinfo, fs->nabslineinfo, AbsLineInfo); luaM_shrinkvector(L, f->k, f->sizek, fs->nk, TValue); luaM_shrinkvector(L, f->p, f->sizep, fs->np, Proto *); luaM_shrinkvector(L, f->locvars, f->sizelocvars, fs->ndebugvars, LocVar); luaM_shrinkvector(L, f->upvalues, f->sizeupvalues, fs->nups, Upvaldesc); ls->fs = fs->prev; luaC_checkGC(L); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_47A5BE", "function_addr": 4695486, "binary_name": "f68b12b76f68351e9f048bd28a697879a69b1799fbf8bdd30581dce70b5e806b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_28], rdi"], [4, "mov rax, [rbp+var_28]"], [5, "mov rax, [rax+38h]"], [6, "mov [rbp+var_8], rax"], [7, "mov rax, [rbp+var_28]"], [8, "mov rax, [rax+30h]"], [9, "mov [rbp+var_10], rax"], [10, "mov rax, [rbp+var_10]"], [11, "mov rax, [rax]"], [12, "mov [rbp+var_18], rax"], [13, "mov rax, [rbp+var_28]"], [14, "mov esi, 0"], [15, "mov rdi, rax"], [16, "call sub_479B9D"], [17, "mov rax, [rbp+var_10]"], [18, "mov edx, 0"], [19, "mov esi, 0"], [20, "mov rdi, rax"], [21, "call sub_4991B5"], [22, "mov rax, [rbp+var_10]"], [23, "mov eax, [rax+30h]"], [24, "cmp eax, 0FFFFFFFFh"], [25, "jl short loc_47A658"], [26, "mov rax, [rbp+var_10]"], [27, "mov eax, [rax+30h]"], [28, "cdqe"], [29, "lea rcx, ds:0[rax*4]"], [30, "mov rax, [rbp+var_18]"], [31, "mov eax, [rax+50h]"], [32, "cdqe"], [33, "lea rdx, ds:0[rax*4]"], [34, "mov rax, [rbp+var_18]"], [35, "mov rsi, [rax+18h]"], [36, "mov rax, [rbp+var_8]"], [37, "mov rdi, rax"], [38, "call sub_476DDA"], [39, "jmp short loc_47A664"], [40, "mov rax, [rbp+var_8]"], [41, "mov rdi, rax"], [42, "call sub_476DAF"], [43, "mov rdx, [rbp+var_18]"], [44, "mov [rdx+18h], rax"], [45, "mov rax, [rbp+var_10]"], [46, "mov edx, [rax+30h]"], [47, "mov rax, [rbp+var_18]"], [48, "mov [rax+50h], edx"], [49, "mov rax, [rbp+var_10]"], [50, "mov eax, [rax+30h]"], [51, "cmp eax, 0FFFFFFFFh"], [52, "jl short loc_47A6BE"], [53, "mov rax, [rbp+var_10]"], [54, "mov eax, [rax+30h]"], [55, "cdqe"], [56, "lea rcx, ds:0[rax*4]"], [57, "mov rax, [rbp+var_18]"], [58, "mov eax, [rax+54h]"], [59, "cdqe"], [60, "lea rdx, ds:0[rax*4]"], [61, "mov rax, [rbp+var_18]"], [62, "mov rsi, [rax+28h]"], [63, "mov rax, [rbp+var_8]"], [64, "mov rdi, rax"], [65, "call sub_476DDA"], [66, "jmp short loc_47A6CA"], [67, "mov rax, [rbp+var_8]"], [68, "mov rdi, rax"], [69, "call sub_476DAF"], [70, "mov rdx, [rbp+var_18]"], [71, "mov [rdx+28h], rax"], [72, "mov rax, [rbp+var_10]"], [73, "mov edx, [rax+30h]"], [74, "mov rax, [rbp+var_18]"], [75, "mov [rax+54h], edx"], [76, "mov rax, [rbp+var_10]"], [77, "mov eax, [rax+40h]"], [78, "cmp eax, 0FFFFFFFFh"], [79, "jl short loc_47A722"], [80, "mov rax, [rbp+var_10]"], [81, "mov eax, [rax+40h]"], [82, "cdqe"], [83, "shl rax, 4"], [84, "mov rcx, rax"], [85, "mov rax, [rbp+var_18]"], [86, "mov eax, [rax+4Ch]"], [87, "cdqe"], [88, "shl rax, 4"], [89, "mov rdx, rax"], [90, "mov rax, [rbp+var_18]"], [91, "mov rsi, [rax+10h]"], [92, "mov rax, [rbp+var_8]"], [93, "mov rdi, rax"], [94, "call sub_476DDA"], [95, "jmp short loc_47A72E"], [96, "mov rax, [rbp+var_8]"], [97, "mov rdi, rax"], [98, "call sub_476DAF"], [99, "mov rdx, [rbp+var_18]"], [100, "mov [rdx+10h], rax"], [101, "mov rax, [rbp+var_10]"], [102, "mov edx, [rax+40h]"], [103, "mov rax, [rbp+var_18]"], [104, "mov [rax+4Ch], edx"], [105, "mov rax, [rbp+var_10]"], [106, "mov eax, [rax+44h]"], [107, "cmp eax, 0FFFFFFFFh"], [108, "jl short loc_47A788"], [109, "mov rax, [rbp+var_10]"], [110, "mov eax, [rax+44h]"], [111, "cdqe"], [112, "lea rcx, ds:0[rax*8]"], [113, "mov rax, [rbp+var_18]"], [114, "mov eax, [rax+58h]"], [115, "cdqe"], [116, "lea rdx, ds:0[rax*8]"], [117, "mov rax, [rbp+var_18]"], [118, "mov rsi, [rax+20h]"], [119, "mov rax, [rbp+var_8]"], [120, "mov rdi, rax"], [121, "call sub_476DDA"], [122, "jmp short loc_47A794"], [123, "mov rax, [rbp+var_8]"], [124, "mov rdi, rax"], [125, "call sub_476DAF"], [126, "mov rdx, [rbp+var_18]"], [127, "mov [rdx+20h], rax"], [128, "mov rax, [rbp+var_10]"], [129, "mov edx, [rax+44h]"], [130, "mov rax, [rbp+var_18]"], [131, "mov [rax+58h], edx"], [132, "mov rax, [rbp+var_10]"], [133, "movzx eax, word ptr [rax+48h]"], [134, "cmp ax, 0FFFFh"], [135, "jl short loc_47A7F1"], [136, "mov rax, [rbp+var_10]"], [137, "movzx eax, word ptr [rax+48h]"], [138, "movsx rax, ax"], [139, "shl rax, 4"], [140, "mov rcx, rax"], [141, "mov rax, [rbp+var_18]"], [142, "mov eax, [rax+5Ch]"], [143, "cdqe"], [144, "shl rax, 4"], [145, "mov rdx, rax"], [146, "mov rax, [rbp+var_18]"], [147, "mov rsi, [rax+30h]"], [148, "mov rax, [rbp+var_8]"], [149, "mov rdi, rax"], [150, "call sub_476DDA"], [151, "jmp short loc_47A7FD"], [152, "mov rax, [rbp+var_8]"], [153, "mov rdi, rax"], [154, "call sub_476DAF"], [155, "mov rdx, [rbp+var_18]"], [156, "mov [rdx+30h], rax"], [157, "mov rax, [rbp+var_10]"], [158, "movzx eax, word ptr [rax+48h]"], [159, "movsx edx, ax"], [160, "mov rax, [rbp+var_18]"], [161, "mov [rax+5Ch], edx"], [162, "mov rax, [rbp+var_18]"], [163, "movzx eax, byte ptr [rax+70h]"], [164, "movzx eax, al"], [165, "lea rcx, ds:0[rax*8]"], [166, "mov rax, [rbp+var_18]"], [167, "mov eax, [rax+48h]"], [168, "cdqe"], [169, "lea rdx, ds:0[rax*8]"], [170, "mov rax, [rbp+var_18]"], [171, "mov rsi, [rax+38h]"], [172, "mov rax, [rbp+var_8]"], [173, "mov rdi, rax"], [174, "call sub_476DDA"], [175, "mov rdx, [rbp+var_18]"], [176, "mov [rdx+38h], rax"], [177, "mov rax, [rbp+var_18]"], [178, "movzx eax, byte ptr [rax+70h]"], [179, "movzx edx, al"], [180, "mov rax, [rbp+var_18]"], [181, "mov [rax+48h], edx"], [182, "mov rax, [rbp+var_10]"], [183, "mov rdx, [rax+10h]"], [184, "mov rax, [rbp+var_28]"], [185, "mov [rax+30h], rdx"], [186, "cmp [rbp+var_10], 0"], [187, "jz short loc_47A88C"], [188, "mov rax, [rbp+var_28]"], [189, "mov rdi, rax"], [190, "call sub_4795FD"], [191, "mov rax, [rbp+var_8]"], [192, "mov rax, [rax+10h]"], [193, "lea rdx, [rax-20h]"], [194, "mov rax, [rbp+var_8]"], [195, "mov [rax+10h], rdx"], [196, "nop"], [197, "leave"], [198, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 3], [8, 7], [9, 8], [10, 9], [11, 10], [12, 11], [13, 3], [15, 13], [17, 9], [20, 17], [22, 9], [23, 22], [24, 23], [25, 24], [26, 9], [27, 26], [30, 12], [31, 30], [33, 18], [34, 12], [35, 34], [36, 6], [37, 36], [40, 6], [41, 40], [43, 12], [44, 38], [44, 43], [45, 9], [46, 45], [46, 44], [47, 12], [48, 47], [48, 46], [49, 9], [50, 49], [50, 48], [51, 50], [52, 51], [53, 9], [54, 44], [54, 53], [54, 48], [56, 29], [57, 12], [58, 44], [58, 48], [58, 57], [60, 46], [61, 12], [62, 44], [62, 48], [62, 61], [63, 6], [64, 63], [67, 6], [68, 67], [70, 12], [71, 65], [71, 70], [72, 9], [73, 71], [73, 72], [74, 12], [75, 74], [75, 73], [76, 9], [77, 76], [77, 75], [78, 77], [79, 78], [80, 9], [81, 48], [81, 71], [81, 80], [81, 75], [81, 44], [83, 81], [84, 83], [85, 12], [86, 44], [86, 85], [86, 48], [86, 71], [86, 75], [88, 86], [89, 88], [90, 12], [91, 71], [91, 75], [91, 90], [91, 44], [91, 48], [92, 6], [93, 92], [96, 6], [97, 96], [99, 12], [100, 94], [100, 99], [101, 9], [102, 100], [102, 101], [103, 12], [104, 102], [104, 103], [105, 9], [106, 104], [106, 105], [107, 106], [108, 107], [109, 9], [110, 75], [110, 109], [110, 104], [110, 44], [110, 48], [110, 71], [110, 100], [112, 84], [113, 12], [114, 104], [114, 113], [114, 44], [114, 48], [114, 71], [114, 100], [114, 75], [116, 102], [117, 12], [118, 104], [118, 44], [118, 117], [118, 48], [118, 71], [118, 100], [118, 75], [119, 6], [120, 119], [123, 6], [124, 123], [126, 12], [127, 126], [127, 121], [128, 9], [129, 128], [129, 127], [130, 12], [131, 129], [131, 130], [132, 9], [133, 132], [133, 131], [134, 133], [135, 134], [136, 9], [137, 104], [137, 131], [137, 44], [137, 48], [137, 71], [137, 100], [137, 75], [137, 127], [137, 136], [138, 137], [139, 138], [140, 139], [141, 12], [142, 71], [142, 100], [142, 75], [142, 141], [142, 127], [142, 104], [142, 131], [142, 44], [142, 48], [144, 142], [145, 144], [146, 12], [147, 48], [147, 146], [147, 100], [147, 75], [147, 127], [147, 104], [147, 131], [147, 44], [147, 71], [148, 6], [149, 148], [152, 6], [153, 152], [155, 12], [156, 155], [156, 150], [157, 9], [158, 156], [158, 157], [159, 158], [160, 12], [161, 159], [161, 160], [162, 12], [163, 161], [163, 162], [164, 163], [165, 140], [166, 12], [167, 166], [167, 161], [169, 159], [170, 12], [171, 161], [171, 170], [172, 6], [173, 172], [175, 12], [176, 175], [176, 174], [177, 12], [178, 177], [178, 176], [179, 178], [180, 12], [181, 180], [181, 179], [182, 9], [183, 181], [183, 182], [184, 3], [185, 184], [185, 183], [186, 9], [187, 186], [188, 3], [189, 188], [191, 6], [192, 104], [192, 191], [192, 195], [192, 131], [192, 161], [192, 44], [192, 181], [192, 156], [192, 48], [192, 176], [192, 185], [192, 71], [192, 100], [192, 75], [192, 127], [193, 100], [193, 75], [193, 104], [193, 161], [193, 127], [193, 156], [193, 131], [193, 195], [193, 44], [193, 181], [193, 71], [193, 183], [193, 192], [193, 48], [193, 176], [193, 185], [194, 6], [195, 193], [195, 194], [198, 194]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/f68b12b76f68351e9f048bd28a697879a69b1799fbf8bdd30581dce70b5e806b_f68b12b76f68351e9f048bd28a697879a69b1799fbf8bdd30581dce70b5e806b.jsonl.gz", "strip_func_name": "sub_47A5BE", "query": "\n\n\n_QWORD *__fastcall sub_47A5BE(__int64 a1)\n{\n__int64 v1; // rdx\n__int64 v2; // rcx\n__int64 v3; // r8\n__int64 v4; // r9\n__int64 v5; // rsi\n__int64 v6; // rax\n__int64 v7; // rcx\n__int64 v8; // r8\n__int64 v9; // r9\n__int64 v10; // rdx\n__int64 v11; // rsi\n__int64 v12; // rax\n__int64 v13; // rcx\n__int64 v14; // r8\n__int64 v15; // r9\n__int64 v16; // rdx\n__int64 v17; // rsi\n__int64 v18; // rax\n__int64 v19; // rcx\n__int64 v20; // r8\n__int64 v21; // r9\n__int64 v22; // rdx\n__int64 v23; // rsi\n__int64 v24; // rax\n__int64 v25; // rcx\n__int64 v26; // r8\n__int64 v27; // r9\n__int64 v28; // rdx\n_QWORD *result; // rax\n__int64 v30; // [rsp+18h] [rbp-18h]\nint *v31; // [rsp+20h] [rbp-10h]\n_QWORD *v32; // [rsp+28h] [rbp-8h]\n\nv32 = *(_QWORD **)(a1 + 56);\nv31 = *(int **)(a1 + 48);\nv30 = *(_QWORD *)v31;\nsub_479B9D(a1, 0);\nsub_4991B5(v31, 0LL, 0LL);\nif ( v31[12] < -1 )\nsub_476DAF(v32, 0LL, v1, v2, v3, v4);\nv5 = *(_QWORD *)(v30 + 24);\nv6 = sub_476DDA((__int64)v32, v5, 4LL * *(int *)(v30 + 80), 4LL * v31[12]);\n*(_QWORD *)(v30 + 24) = v6;\nv10 = (unsigned int)v31[12];\n*(_DWORD *)(v30 + 80) = v10;\nif ( v31[12] < -1 )\nsub_476DAF(v32, v5, v10, v7, v8, v9);\nv11 = *(_QWORD *)(v30 + 40);\nv12 = sub_476DDA((__int64)v32, v11, 4LL * *(int *)(v30 + 84), 4LL * v31[12]);\n*(_QWORD *)(v30 + 40) = v12;\nv16 = (unsigned int)v31[12];\n*(_DWORD *)(v30 + 84) = v16;\nif ( v31[16] < -1 )\nsub_476DAF(v32, v11, v16, v13, v14, v15);\nv17 = *(_QWORD *)(v30 + 16);\nv18 = sub_476DDA((__int64)v32, v17, 16LL * *(int *)(v30 + 76), 16LL * v31[16]);\n*(_QWORD *)(v30 + 16) = v18;\nv22 = (unsigned int)v31[16];\n*(_DWORD *)(v30 + 76) = v22;\nif ( v31[17] < -1 )\nsub_476DAF(v32, v17, v22, v19, v20, v21);\nv23 = *(_QWORD *)(v30 + 32);\nv24 = sub_476DDA((__int64)v32, v23, 8LL * *(int *)(v30 + 88), 8LL * v31[17]);\n*(_QWORD *)(v30 + 32) = v24;\nv28 = (unsigned int)v31[17];\n*(_DWORD *)(v30 + 88) = v28;\nif ( *((__int16 *)v31 + 36) < -1 )\nsub_476DAF(v32, v23, v28, v25, v26, v27);\n*(_QWORD *)(v30 + 48) = sub_476DDA(\n(__int64)v32,\n*(_QWORD *)(v30 + 48),\n16LL * *(int *)(v30 + 92),\n16LL * *((__int16 *)v31 + 36));\n*(_DWORD *)(v30 + 92) = *((__int16 *)v31 + 36);\n*(_QWORD *)(v30 + 56) = sub_476DDA(\n(__int64)v32,\n*(_QWORD *)(v30 + 56),\n8LL * *(int *)(v30 + 72),\n8LL * *(unsigned __int8 *)(v30 + 112));\n*(_DWORD *)(v30 + 72) = *(unsigned __int8 *)(v30 + 112);\n*(_QWORD *)(a1 + 48) = *((_QWORD *)v31 + 2);\nif ( v31 )\nsub_4795FD(a1);\nresult = v32;\nv32[2] -= 32LL;\nreturn result;\n}\n\n\n\nQ:[a1,v30,v31,v32,sub_47A5BE,sub_479B9D,sub_4991B5,sub_476DAF,sub_476DDA,sub_4795FD,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ls', 'v30': 'f', 'v31': 'fs_0', 'v32': 'L', 'sub_47A5BE': 'close_func', 'sub_479B9D': 'removevars', 'sub_4991B5': 'luaK_ret', 'sub_476DAF': 'luaM_toobig', 'sub_476DDA': 'luaM_realloc_', 'sub_4795FD': 'anchor_token'}"}
jumponcond
b86b9dfd33c8275007edda4b6afebf56ee91c8c3162c3011a34e3c9568bed96c
erikdubbelboer
libuv-lua-http-server
NA
static int jumponcond(FuncState*fs,expdesc*e,int cond){ if(e->k==VRELOCABLE){ Instruction ie=getcode(fs,e); if(GET_OPCODE(ie)==OP_NOT){ fs->pc--; return condjump(fs,OP_TEST,GETARG_B(ie),0,!cond); } } discharge2anyreg(fs,e); freeexp(fs,e); return condjump(fs,OP_TESTSET,((1<<8)-1),e->u.s.info,cond); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40CA4A", "function_addr": 4246090, "binary_name": "b86b9dfd33c8275007edda4b6afebf56ee91c8c3162c3011a34e3c9568bed96c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_24], edx"], [6, "mov rax, [rbp+var_20]"], [7, "mov eax, [rax]"], [8, "cmp eax, 0Bh"], [9, "jnz short loc_40CAD3"], [10, "mov rax, [rbp+var_18]"], [11, "mov rax, [rax]"], [12, "mov rdx, [rax+18h]"], [13, "mov rax, [rbp+var_20]"], [14, "mov eax, [rax+8]"], [15, "cdqe"], [16, "shl rax, 2"], [17, "add rax, rdx"], [18, "mov eax, [rax]"], [19, "mov [rbp+var_4], eax"], [20, "mov eax, [rbp+var_4]"], [21, "and eax, 3Fh"], [22, "cmp eax, 13h"], [23, "jnz short loc_40CAD3"], [24, "mov rax, [rbp+var_18]"], [25, "mov eax, [rax+30h]"], [26, "lea edx, [rax-1]"], [27, "mov rax, [rbp+var_18]"], [28, "mov [rax+30h], edx"], [29, "cmp [rbp+var_24], 0"], [30, "setz al"], [31, "movzx edx, al"], [32, "mov eax, [rbp+var_4]"], [33, "shr eax, 17h"], [34, "mov esi, eax"], [35, "mov rax, [rbp+var_18]"], [36, "mov r8d, edx"], [37, "mov ecx, 0"], [38, "mov edx, esi"], [39, "mov esi, 1Ah"], [40, "mov rdi, rax"], [41, "call sub_40B66B"], [42, "jmp short locret_40CB1E"], [43, "mov rdx, [rbp+var_20]"], [44, "mov rax, [rbp+var_18]"], [45, "mov rsi, rdx"], [46, "mov rdi, rax"], [47, "call sub_40C3BA"], [48, "mov rdx, [rbp+var_20]"], [49, "mov rax, [rbp+var_18]"], [50, "mov rsi, rdx"], [51, "mov rdi, rax"], [52, "call sub_40BBC9"], [53, "mov rax, [rbp+var_20]"], [54, "mov edx, [rax+8]"], [55, "mov ecx, [rbp+var_24]"], [56, "mov rax, [rbp+var_18]"], [57, "mov r8d, ecx"], [58, "mov ecx, edx"], [59, "mov edx, 0FFh"], [60, "mov esi, 1Bh"], [61, "mov rdi, rax"], [62, "call sub_40B66B"], [63, "leave"], [64, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 7], [9, 8], [10, 3], [11, 10], [12, 11], [13, 4], [14, 13], [16, 14], [17, 12], [17, 16], [18, 17], [19, 18], [20, 19], [21, 20], [22, 21], [23, 22], [24, 3], [25, 24], [26, 25], [26, 12], [27, 3], [28, 27], [28, 26], [29, 5], [30, 27], [30, 29], [31, 30], [32, 19], [33, 32], [34, 33], [35, 3], [36, 31], [38, 34], [40, 35], [43, 4], [44, 3], [45, 43], [46, 44], [48, 4], [49, 3], [50, 48], [51, 49], [53, 4], [54, 53], [55, 5], [56, 3], [57, 55], [58, 54], [61, 56], [64, 41], [64, 62]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/b86b9dfd33c8275007edda4b6afebf56ee91c8c3162c3011a34e3c9568bed96c_b86b9dfd33c8275007edda4b6afebf56ee91c8c3162c3011a34e3c9568bed96c.jsonl.gz", "strip_func_name": "sub_40CA4A", "query": "\n\n\n__int64 __fastcall sub_40CA4A(_DWORD *a1, __int64 a2, unsigned int a3)\n{\n__int64 result; // rax\nunsigned int v5; // [rsp+2Ch] [rbp-4h]\n\nif ( *(_DWORD *)a2 == 11\n&& (v5 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL) + 4LL * *(int *)(a2 + 8)), (v5 & 0x3F) == 19) )\n{\n--a1[12];\nresult = sub_40B66B((__int64)a1, 0x1Au, v5 >> 23, 0, a3 == 0);\n}\nelse\n{\nsub_40C3BA((__int64)a1, (double *)a2);\nsub_40BBC9((__int64)a1, (unsigned int *)a2);\nresult = sub_40B66B((__int64)a1, 0x1Bu, 0xFFu, *(_DWORD *)(a2 + 8), a3);\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v5,sub_40CA4A,sub_40B66B,sub_40C3BA,sub_40BBC9,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'cond', 'a1': 'fs_0', 'a2': 'e', 'v5': 'ie', 'sub_40CA4A': 'jumponcond', 'sub_40B66B': 'condjump', 'sub_40C3BA': 'discharge2anyreg', 'sub_40BBC9': 'freeexp'}"}
msgpack_compare_map
8e89f9502949c1a463a3dd08a58c3c7a60591689c0f4de603abd6f5993935ae2
aerospike
aerospike-tools-backup
NA
static msgpack_compare_t msgpack_compare_map(as_unpacker *pk1, as_unpacker *pk2, size_t depth) { int64_t len1 = as_unpack_map_header_element_count(pk1); int64_t len2 = as_unpack_map_header_element_count(pk2); int64_t minlen = (len1 < len2) ? len1 : len2; if (minlen < 0) { return MSGPACK_COMPARE_ERROR; } if (len1 != len2) { if (! msgpack_skip(pk1, len1)) { return MSGPACK_COMPARE_ERROR; } if (! msgpack_skip(pk2, len2)) { return MSGPACK_COMPARE_ERROR; } MSGPACK_COMPARE_RET_LESS_OR_GREATER(len1, len2); } if (minlen == 0) { return MSGPACK_COMPARE_EQUAL; } as_val_t type1 = as_unpack_peek_type(pk1); as_val_t type2 = as_unpack_peek_type(pk2); if (type1 == type2 && type1 == AS_CMP_EXT) { msgpack_compare_t ret = compare_ext(pk1, pk2); if (ret == MSGPACK_COMPARE_ERROR || ! msgpack_skip(pk1, 1) || ! msgpack_skip(pk2, 1)) { return MSGPACK_COMPARE_ERROR; } if (ret != MSGPACK_COMPARE_EQUAL) { if (! msgpack_skip(pk1, len1 - 1)) { return MSGPACK_COMPARE_ERROR; } if (! msgpack_skip(pk2, len2 - 1)) { return MSGPACK_COMPARE_ERROR; } return ret; } minlen--; } for (int64_t i = 0; i < minlen; i++) { as_val_t type; msgpack_compare_t ret = msgpack_compare_internal(pk1, pk2, depth, &type); if (ret != MSGPACK_COMPARE_EQUAL|| type == AS_CMP_WILDCARD) { if (! msgpack_skip(pk1, 2 * (len1 - i) - 1)) { return MSGPACK_COMPARE_ERROR; } if (! msgpack_skip(pk2, 2 * (len2 - i) - 1)) { return MSGPACK_COMPARE_ERROR; } return ret; } ret = msgpack_compare_internal(pk1, pk2, depth, &type); if (ret != MSGPACK_COMPARE_EQUAL || type == AS_CMP_WILDCARD) { if (! msgpack_skip(pk1, 2 * (len1 - i - 1))) { return MSGPACK_COMPARE_ERROR; } if (! msgpack_skip(pk2, 2 * (len2 - i - 1))) { return MSGPACK_COMPARE_ERROR; } return ret; } } return MSGPACK_COMPARE_EQUAL; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43DA7F", "function_addr": 4446847, "binary_name": "8e89f9502949c1a463a3dd08a58c3c7a60591689c0f4de603abd6f5993935ae2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_38], rdi"], [4, "mov [rbp+var_40], rsi"], [5, "mov [rbp+var_48], rdx"], [6, "mov rax, [rbp+var_38]"], [7, "mov rdi, rax"], [8, "call sub_43D0BF"], [9, "mov [rbp+var_18], rax"], [10, "mov rax, [rbp+var_40]"], [11, "mov rdi, rax"], [12, "call sub_43D0BF"], [13, "mov [rbp+var_20], rax"], [14, "mov rax, [rbp+var_18]"], [15, "cmp [rbp+var_20], rax"], [16, "cmovle rax, [rbp+var_20]"], [17, "mov [rbp+var_8], rax"], [18, "cmp [rbp+var_8], 0"], [19, "jns short loc_43DAD5"], [20, "mov eax, 0FFFFFFFEh"], [21, "jmp locret_43DD9A"], [22, "mov rax, [rbp+var_18]"], [23, "cmp rax, [rbp+var_20]"], [24, "jz short loc_43DB4F"], [25, "mov rdx, [rbp+var_18]"], [26, "mov rax, [rbp+var_38]"], [27, "mov rsi, rdx"], [28, "mov rdi, rax"], [29, "call sub_43D52F"], [30, "xor eax, 1"], [31, "test al, al"], [32, "jz short loc_43DB03"], [33, "mov eax, 0FFFFFFFEh"], [34, "jmp locret_43DD9A"], [35, "mov rdx, [rbp+var_20]"], [36, "mov rax, [rbp+var_40]"], [37, "mov rsi, rdx"], [38, "mov rdi, rax"], [39, "call sub_43D52F"], [40, "xor eax, 1"], [41, "test al, al"], [42, "jz short loc_43DB27"], [43, "mov eax, 0FFFFFFFEh"], [44, "jmp locret_43DD9A"], [45, "mov rax, [rbp+var_18]"], [46, "cmp rax, [rbp+var_20]"], [47, "jge short loc_43DB3B"], [48, "mov eax, 0"], [49, "jmp locret_43DD9A"], [50, "mov rax, [rbp+var_18]"], [51, "cmp rax, [rbp+var_20]"], [52, "jle short loc_43DB4F"], [53, "mov eax, 2"], [54, "jmp locret_43DD9A"], [55, "cmp [rbp+var_8], 0"], [56, "jnz short loc_43DB60"], [57, "mov eax, 1"], [58, "jmp locret_43DD9A"], [59, "mov rax, [rbp+var_38]"], [60, "mov rdi, rax"], [61, "call sub_43BE09"], [62, "mov [rbp+var_21], al"], [63, "mov rax, [rbp+var_40]"], [64, "mov rdi, rax"], [65, "call sub_43BE09"], [66, "mov [rbp+var_22], al"], [67, "movzx eax, [rbp+var_21]"], [68, "cmp al, [rbp+var_22]"], [69, "jnz loc_43DC54"], [70, "cmp [rbp+var_21], 0Ch"], [71, "jnz loc_43DC54"], [72, "mov rdx, [rbp+var_40]"], [73, "mov rax, [rbp+var_38]"], [74, "mov rsi, rdx"], [75, "mov rdi, rax"], [76, "call sub_43D999"], [77, "mov [rbp+var_28], eax"], [78, "cmp [rbp+var_28], 0FFFFFFFEh"], [79, "jz short loc_43DBE1"], [80, "mov rax, [rbp+var_38]"], [81, "mov esi, 1"], [82, "mov rdi, rax"], [83, "call sub_43D52F"], [84, "xor eax, 1"], [85, "test al, al"], [86, "jnz short loc_43DBE1"], [87, "mov rax, [rbp+var_40]"], [88, "mov esi, 1"], [89, "mov rdi, rax"], [90, "call sub_43D52F"], [91, "xor eax, 1"], [92, "test al, al"], [93, "jz short loc_43DBEB"], [94, "mov eax, 0FFFFFFFEh"], [95, "jmp locret_43DD9A"], [96, "cmp [rbp+var_28], 1"], [97, "jz short loc_43DC4F"], [98, "mov rax, [rbp+var_18]"], [99, "sub rax, 1"], [100, "mov rdx, rax"], [101, "mov rax, [rbp+var_38]"], [102, "mov rsi, rdx"], [103, "mov rdi, rax"], [104, "call sub_43D52F"], [105, "xor eax, 1"], [106, "test al, al"], [107, "jz short loc_43DC1C"], [108, "mov eax, 0FFFFFFFEh"], [109, "jmp locret_43DD9A"], [110, "mov rax, [rbp+var_20]"], [111, "sub rax, 1"], [112, "mov rdx, rax"], [113, "mov rax, [rbp+var_40]"], [114, "mov rsi, rdx"], [115, "mov rdi, rax"], [116, "call sub_43D52F"], [117, "xor eax, 1"], [118, "test al, al"], [119, "jz short loc_43DC47"], [120, "mov eax, 0FFFFFFFEh"], [121, "jmp locret_43DD9A"], [122, "mov eax, [rbp+var_28]"], [123, "jmp locret_43DD9A"], [124, "sub [rbp+var_8], 1"], [125, "mov [rbp+var_10], 0"], [126, "jmp loc_43DD87"], [127, "lea rcx, [rbp+var_2D]"], [128, "mov rdx, [rbp+var_48]"], [129, "mov rsi, [rbp+var_40]"], [130, "mov rax, [rbp+var_38]"], [131, "mov rdi, rax"], [132, "call sub_43E38A"], [133, "mov [rbp+var_2C], eax"], [134, "cmp [rbp+var_2C], 1"], [135, "jnz short loc_43DC8A"], [136, "movzx eax, [rbp+var_2D]"], [137, "cmp al, 0Dh"], [138, "jnz short loc_43DCF6"], [139, "mov rax, [rbp+var_18]"], [140, "sub rax, [rbp+var_10]"], [141, "add rax, rax"], [142, "sub rax, 1"], [143, "mov rdx, rax"], [144, "mov rax, [rbp+var_38]"], [145, "mov rsi, rdx"], [146, "mov rdi, rax"], [147, "call sub_43D52F"], [148, "xor eax, 1"], [149, "test al, al"], [150, "jz short loc_43DCBC"], [151, "mov eax, 0FFFFFFFEh"], [152, "jmp locret_43DD9A"], [153, "mov rax, [rbp+var_20]"], [154, "sub rax, [rbp+var_10]"], [155, "add rax, rax"], [156, "sub rax, 1"], [157, "mov rdx, rax"], [158, "mov rax, [rbp+var_40]"], [159, "mov rsi, rdx"], [160, "mov rdi, rax"], [161, "call sub_43D52F"], [162, "xor eax, 1"], [163, "test al, al"], [164, "jz short loc_43DCEE"], [165, "mov eax, 0FFFFFFFEh"], [166, "jmp locret_43DD9A"], [167, "mov eax, [rbp+var_2C]"], [168, "jmp locret_43DD9A"], [169, "lea rcx, [rbp+var_2D]"], [170, "mov rdx, [rbp+var_48]"], [171, "mov rsi, [rbp+var_40]"], [172, "mov rax, [rbp+var_38]"], [173, "mov rdi, rax"], [174, "call sub_43E38A"], [175, "mov [rbp+var_2C], eax"], [176, "cmp [rbp+var_2C], 1"], [177, "jnz short loc_43DD1F"], [178, "movzx eax, [rbp+var_2D]"], [179, "cmp al, 0Dh"], [180, "jnz short loc_43DD82"], [181, "mov rax, [rbp+var_18]"], [182, "sub rax, [rbp+var_10]"], [183, "sub rax, 1"], [184, "add rax, rax"], [185, "mov rdx, rax"], [186, "mov rax, [rbp+var_38]"], [187, "mov rsi, rdx"], [188, "mov rdi, rax"], [189, "call sub_43D52F"], [190, "xor eax, 1"], [191, "test al, al"], [192, "jz short loc_43DD4E"], [193, "mov eax, 0FFFFFFFEh"], [194, "jmp short locret_43DD9A"], [195, "mov rax, [rbp+var_20]"], [196, "sub rax, [rbp+var_10]"], [197, "sub rax, 1"], [198, "add rax, rax"], [199, "mov rdx, rax"], [200, "mov rax, [rbp+var_40]"], [201, "mov rsi, rdx"], [202, "mov rdi, rax"], [203, "call sub_43D52F"], [204, "xor eax, 1"], [205, "test al, al"], [206, "jz short loc_43DD7D"], [207, "mov eax, 0FFFFFFFEh"], [208, "jmp short locret_43DD9A"], [209, "mov eax, [rbp+var_2C]"], [210, "jmp short locret_43DD9A"], [211, "add [rbp+var_10], 1"], [212, "mov rax, [rbp+var_10]"], [213, "cmp rax, [rbp+var_8]"], [214, "jl loc_43DC61"], [215, "mov eax, 1"], [216, "leave"], [217, "retn"]], "data_dep": [[6, 3], [7, 6], [9, 8], [10, 4], [11, 10], [13, 12], [14, 9], [15, 14], [15, 13], [16, 13], [17, 16], [18, 17], [19, 18], [22, 9], [23, 13], [23, 22], [24, 23], [25, 9], [26, 3], [27, 25], [28, 26], [30, 29], [31, 30], [32, 31], [35, 13], [36, 4], [37, 35], [38, 36], [40, 39], [41, 40], [42, 41], [45, 9], [46, 13], [46, 45], [47, 46], [50, 9], [51, 50], [51, 13], [52, 51], [55, 17], [56, 55], [59, 3], [60, 59], [62, 61], [63, 4], [64, 63], [66, 65], [67, 62], [68, 66], [68, 67], [69, 68], [70, 62], [71, 70], [72, 4], [73, 3], [74, 72], [75, 73], [77, 76], [78, 77], [79, 78], [80, 3], [82, 80], [84, 83], [85, 84], [86, 85], [87, 4], [89, 87], [91, 90], [92, 91], [93, 92], [96, 77], [97, 96], [98, 9], [99, 98], [100, 99], [101, 3], [102, 100], [103, 101], [105, 104], [106, 105], [107, 106], [110, 13], [111, 110], [112, 111], [113, 4], [114, 112], [115, 113], [117, 116], [118, 117], [119, 118], [122, 77], [124, 17], [127, 169], [128, 5], [129, 4], [130, 3], [131, 130], [133, 132], [134, 133], [135, 134], [137, 136], [138, 137], [139, 9], [140, 139], [140, 125], [140, 211], [141, 140], [142, 141], [143, 142], [144, 3], [145, 143], [146, 144], [148, 147], [149, 148], [150, 149], [153, 13], [154, 211], [154, 153], [154, 125], [155, 154], [156, 155], [157, 156], [158, 4], [159, 157], [160, 158], [162, 161], [163, 162], [164, 163], [167, 133], [169, 127], [170, 5], [171, 4], [172, 3], [173, 172], [175, 174], [176, 175], [177, 176], [179, 178], [180, 179], [181, 9], [182, 125], [182, 211], [182, 181], [183, 182], [184, 183], [185, 184], [186, 3], [187, 185], [188, 186], [190, 189], [191, 190], [192, 191], [195, 13], [196, 125], [196, 211], [196, 195], [197, 196], [198, 197], [199, 198], [200, 4], [201, 199], [202, 200], [204, 203], [205, 204], [206, 205], [209, 175], [211, 125], [211, 211], [212, 125], [212, 211], [213, 124], [213, 212], [213, 17], [214, 213], [217, 165], [217, 94], [217, 48], [217, 167], [217, 57], [217, 151], [217, 215], [217, 43], [217, 20], [217, 207], [217, 209], [217, 120], [217, 193], [217, 122], [217, 33], [217, 108], [217, 53]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/8e89f9502949c1a463a3dd08a58c3c7a60591689c0f4de603abd6f5993935ae2_8e89f9502949c1a463a3dd08a58c3c7a60591689c0f4de603abd6f5993935ae2.jsonl.gz", "strip_func_name": "sub_43DA7F", "query": "\n\n\n__int64 __fastcall sub_43DA7F(__int64 a1, __int64 a2, __int64 a3)\n{\n__int64 v3; // rax\nchar v6; // [rsp+23h] [rbp-2Dh] BYREF\nunsigned int v7; // [rsp+24h] [rbp-2Ch]\nunsigned int v8; // [rsp+28h] [rbp-28h]\nchar v9; // [rsp+2Eh] [rbp-22h]\nchar v10; // [rsp+2Fh] [rbp-21h]\n__int64 v11; // [rsp+30h] [rbp-20h]\n__int64 v12; // [rsp+38h] [rbp-18h]\n__int64 i; // [rsp+40h] [rbp-10h]\n__int64 v14; // [rsp+48h] [rbp-8h]\n\nv12 = sub_43D0BF(a1);\nv11 = sub_43D0BF(a2);\nv3 = v12;\nif ( v11 <= v12 )\nv3 = v11;\nv14 = v3;\nif ( v3 < 0 )\nreturn 4294967294LL;\nif ( v12 != v11 )\n{\nif ( (unsigned __int8)sub_43D52F(a1, v12) != 1 )\nreturn 4294967294LL;\nif ( (unsigned __int8)sub_43D52F(a2, v11) != 1 )\nreturn 4294967294LL;\nif ( v12 < v11 )\nreturn 0LL;\nif ( v12 > v11 )\nreturn 2LL;\n}\nif ( !v14 )\nreturn 1LL;\nv10 = sub_43BE09(a1);\nv9 = sub_43BE09(a2);\nif ( v10 == v9 && v10 == 12 )\n{\nv8 = sub_43D999(a1, a2);\nif ( v8 == -2 || (unsigned __int8)sub_43D52F(a1, 1uLL) != 1 || (unsigned __int8)sub_43D52F(a2, 1uLL) != 1 )\nreturn 4294967294LL;\nif ( v8 != 1 )\n{\nif ( (unsigned __int8)sub_43D52F(a1, v12 - 1) != 1 )\nreturn 4294967294LL;\nif ( (unsigned __int8)sub_43D52F(a2, v11 - 1) != 1 )\nreturn 4294967294LL;\nreturn v8;\n}\n--v14;\n}\nfor ( i = 0LL; ; ++i )\n{\nif ( i >= v14 )\nreturn 1LL;\nv7 = sub_43E38A(a1, a2, a3, &v6);\nif ( v7 != 1 || v6 == 13 )\n{\nif ( (unsigned __int8)sub_43D52F(a1, 2 * (v12 - i) - 1) != 1 )\nreturn 4294967294LL;\nif ( (unsigned __int8)sub_43D52F(a2, 2 * (v11 - i) - 1) != 1 )\nreturn 4294967294LL;\nreturn v7;\n}\nv7 = sub_43E38A(a1, a2, a3, &v6);\nif ( v7 != 1 || v6 == 13 )\nbreak;\n}\nif ( (unsigned __int8)sub_43D52F(a1, 2 * (v12 - i - 1)) != 1 )\nreturn 4294967294LL;\nif ( (unsigned __int8)sub_43D52F(a2, 2 * (v11 - i - 1)) != 1 )\nreturn 4294967294LL;\nreturn v7;\n}\n\n\n\nQ:[a3,a1,a2,v6,v7,v9,v10,v11,v12,v14,sub_43DA7F,sub_43D0BF,sub_43D52F,sub_43BE09,sub_43D999,sub_43E38A,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'depth', 'a1': 'pk1', 'a2': 'pk2', 'v6': 'type', 'v7': 'ret_0', 'v9': 'type2', 'v10': 'type1', 'v11': 'len2', 'v12': 'len1', 'v14': 'minlen', 'sub_43DA7F': 'msgpack_compare_map', 'sub_43D0BF': 'as_unpack_map_header_element_count', 'sub_43D52F': 'msgpack_skip', 'sub_43BE09': 'as_unpack_peek_type', 'sub_43D999': 'compare_ext', 'sub_43E38A': 'msgpack_compare_internal'}"}
SetSignalStates
d08e849fccddd177d1c140c7984670e0e0a17aec74dfd9249b5e78acd3cac90d
interkosmos
micropolis
NA
static int SetSignalStates (interp, signalListSize, signalList, actionFunc, command) Tcl_Interp *interp; int signalListSize; int signalList [MAXSIG]; signalProcPtr_t actionFunc; char *command; { int idx, signalNum, commandLen; if (command != NULL) commandLen = strlen (command); for (idx = 0; idx < signalListSize; idx ++) { signalNum = signalList [idx]; if (signalTrapCmds [signalNum] != NULL) { ckfree (signalTrapCmds [signalNum]); signalTrapCmds [signalNum] = NULL; } if (!SetSignalAction (signalNum, actionFunc)) goto unixSigError; if (command != NULL) { signalTrapCmds [signalNum] = ckalloc (commandLen + 1); strcpy (signalTrapCmds [signalNum], command); } } return TCL_OK; unixSigError: interp->result = Tcl_UnixError (interp); return TCL_ERROR; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4AF023", "function_addr": 4911139, "binary_name": "d08e849fccddd177d1c140c7984670e0e0a17aec74dfd9249b5e78acd3cac90d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_1C], esi"], [5, "mov [rbp+var_28], rdx"], [6, "mov [rbp+var_30], rcx"], [7, "mov [rbp+s], r8"], [8, "cmp [rbp+s], 0"], [9, "jz short loc_4AF054"], [10, "mov rax, [rbp+s]"], [11, "mov rdi, rax"], [12, "call _strlen"], [13, "mov [rbp+var_8], eax"], [14, "mov [rbp+var_4], 0"], [15, "jmp loc_4AF10D"], [16, "mov eax, [rbp+var_4]"], [17, "cdqe"], [18, "lea rdx, ds:0[rax*4]"], [19, "mov rax, [rbp+var_28]"], [20, "add rax, rdx"], [21, "mov eax, [rax]"], [22, "mov [rbp+var_C], eax"], [23, "mov eax, [rbp+var_C]"], [24, "cdqe"], [25, "mov rax, ds:qword_502F80[rax*8]"], [26, "test rax, rax"], [27, "jz short loc_4AF0B1"], [28, "mov eax, [rbp+var_C]"], [29, "cdqe"], [30, "mov rax, ds:qword_502F80[rax*8]"], [31, "mov rdi, rax"], [32, "call _free"], [33, "mov eax, [rbp+var_C]"], [34, "cdqe"], [35, "mov ds:qword_502F80[rax*8], 0"], [36, "mov rdx, [rbp+var_30]"], [37, "mov eax, [rbp+var_C]"], [38, "mov rsi, rdx"], [39, "mov edi, eax"], [40, "call sub_4AE7B4"], [41, "test eax, eax"], [42, "jz short loc_4AF120"], [43, "cmp [rbp+s], 0"], [44, "jz short loc_4AF109"], [45, "mov eax, [rbp+var_8]"], [46, "add eax, 1"], [47, "cdqe"], [48, "mov rdi, rax"], [49, "call _malloc"], [50, "mov rdx, rax"], [51, "mov eax, [rbp+var_C]"], [52, "cdqe"], [53, "mov ds:qword_502F80[rax*8], rdx"], [54, "mov eax, [rbp+var_C]"], [55, "cdqe"], [56, "mov rax, ds:qword_502F80[rax*8]"], [57, "mov rdx, [rbp+s]"], [58, "mov rsi, rdx"], [59, "mov rdi, rax"], [60, "call _strcpy"], [61, "add [rbp+var_4], 1"], [62, "mov eax, [rbp+var_4]"], [63, "cmp eax, [rbp+var_1C]"], [64, "jl loc_4AF060"], [65, "mov eax, 0"], [66, "jmp short locret_4AF139"], [67, "nop"], [68, "mov rax, [rbp+var_18]"], [69, "mov rdi, rax"], [70, "call sub_49E854"], [71, "mov rdx, [rbp+var_18]"], [72, "mov [rdx], rax"], [73, "mov eax, 1"], [74, "leave"], [75, "retn"]], "data_dep": [[8, 7], [9, 8], [10, 7], [11, 10], [13, 12], [16, 61], [16, 14], [18, 36], [18, 57], [19, 5], [20, 19], [20, 18], [21, 20], [22, 21], [23, 22], [25, 35], [25, 53], [26, 25], [27, 26], [28, 22], [30, 35], [30, 53], [31, 30], [33, 22], [36, 6], [37, 22], [38, 36], [39, 37], [41, 40], [42, 41], [43, 7], [44, 43], [45, 13], [46, 45], [48, 46], [50, 49], [51, 22], [53, 50], [54, 22], [56, 53], [57, 7], [58, 57], [59, 56], [61, 61], [61, 14], [62, 14], [62, 61], [63, 4], [63, 62], [64, 63], [68, 3], [69, 68], [71, 3], [72, 71], [72, 70], [75, 65], [75, 73]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d08e849fccddd177d1c140c7984670e0e0a17aec74dfd9249b5e78acd3cac90d_d08e849fccddd177d1c140c7984670e0e0a17aec74dfd9249b5e78acd3cac90d.jsonl.gz", "strip_func_name": "sub_4AF023", "query": "\n\n\n__int64 __fastcall sub_4AF023(char **a1, int a2, __int64 a3, void (*a4)(int), const char *a5)\n{\nint v9; // [rsp+34h] [rbp-Ch]\nint v10; // [rsp+38h] [rbp-8h]\nint i; // [rsp+3Ch] [rbp-4h]\n\nif ( a5 )\nv10 = strlen(a5);\nfor ( i = 0; ; ++i )\n{\nif ( i >= a2 )\nreturn 0LL;\nv9 = *(_DWORD *)(4LL * i + a3);\nif ( (&qword_502F80)[v9] )\n{\nfree((&qword_502F80)[v9]);\n(&qword_502F80)[v9] = 0LL;\n}\nif ( !sub_4AE7B4(v9, a4) )\nbreak;\nif ( a5 )\n{\n(&qword_502F80)[v9] = (char *)malloc(v10 + 1);\nstrcpy((&qword_502F80)[v9], a5);\n}\n}\n*a1 = sub_49E854((__int64)a1);\nreturn 1LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v9,v10,i,sub_4AF023,sub_4AE7B4,sub_49E854,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'signalList', 'a4': 'actionFunc', 'a1': 'interp', 'a2': 'signalListSize', 'a5': 'command', 'v9': 'signalNum', 'v10': 'commandLen', 'i': 'idx', 'sub_4AF023': 'SetSignalStates', 'sub_4AE7B4': 'SetSignalAction', 'sub_49E854': 'Tcl_UnixError'}"}
die_nice
2433789cfbf36bb9ffc4a81ff63b734fb9ef3dcdd81b361cffc64cd0d9125dfe
psas
stm32
NA
void die_nice(char *s) { perror(s); exit(1); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4011F2", "function_addr": 4198898, "binary_name": "2433789cfbf36bb9ffc4a81ff63b734fb9ef3dcdd81b361cffc64cd0d9125dfe.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+s], rdi"], [4, "mov rax, [rbp+s]"], [5, "mov rdi, rax"], [6, "call _perror"], [7, "mov edi, 1"], [8, "call _exit"]], "data_dep": [[4, 3], [5, 4]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/2433789cfbf36bb9ffc4a81ff63b734fb9ef3dcdd81b361cffc64cd0d9125dfe_2433789cfbf36bb9ffc4a81ff63b734fb9ef3dcdd81b361cffc64cd0d9125dfe.jsonl.gz", "strip_func_name": "sub_4011F2", "query": "\n\n\nvoid __fastcall __noreturn sub_4011F2(const char *a1)\n{\nperror(a1);\nexit(1);\n}\n\n\n\nQ:[a1,sub_4011F2,]\nAssistant: ", "hints": "[]", "response": "{'a1': 's', 'sub_4011F2': 'die_nice'}"}
main
4e0e10499f28a0bf0c484f94a6d4b531df9c566c5efc730dda8b188f14e3df8b
creationix
uscript
NA
int main() { S.malloc = malloc; S.free = free; S.funcs = funcs; S.num_funcs = 0; while (funcs[S.num_funcs].name) S.num_funcs++; #ifdef BCM2708_PERI_BASE setup_io(); #endif printf("Welcome to uscript.\n"); FILE* fd = fopen(DATA_FILE, "r"); if (fd) { if (fgetc(fd) == 'u') { while (1) { int key = fgetc(fd); if (key == 'u') break; printf("Loading %c...\n", key + 'a'); int len = fgetc(fd); len = (len << 8) | fgetc(fd); uint8_t* stub = S.stubs[key] = malloc(len); int j; for (j = 0; j < len; j++) { stub[j] = fgetc(fd); } } } fclose(fd); } if (S.stubs[0]) { printf("Running auto script...\n"); number out; signal(SIGINT, intHandler); stopLoop = 0; eval(&S, S.stubs[0], &out); signal(SIGINT, SIG_DFL); } uint8_t* line = NULL; size_t size = 0; while (1) { printf(KNRM "> " KGRN); if (getline((char**)&line, &size, stdin) < 0) { printf(KNRM "\n"); return 0; } printf(KNRM); int len = compile(&S, line); if ((int) len < 0) { int offset = 1 - (int)len; while (offset--) printf(" "); printf(KRED "^\n"); printf("Unexpected input\n" KNRM); continue; } uint8_t* program = line; while (program - line < len) { number result; signal(SIGINT, intHandler); stopLoop = 0; program = eval(&S, program, &result); signal(SIGINT, SIG_DFL); printf("%s%"PRId64"%s\n", KBLU, result, KNRM); } } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "main", "function_addr": 4209374, "binary_name": "4e0e10499f28a0bf0c484f94a6d4b531df9c566c5efc730dda8b188f14e3df8b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 58h"], [4, "mov cs:qword_406160, offset _malloc"], [5, "mov cs:qword_406168, offset _free"], [6, "mov cs:qword_406B78, offset off_4060C0"], [7, "mov cs:dword_406B80, 0"], [8, "jmp short loc_403B23"], [9, "mov eax, cs:dword_406B80"], [10, "add eax, 1"], [11, "mov cs:dword_406B80, eax"], [12, "mov eax, cs:dword_406B80"], [13, "cdqe"], [14, "shl rax, 4"], [15, "add rax, 4060C0h"], [16, "mov rax, [rax]"], [17, "test rax, rax"], [18, "jnz short loc_403B14"], [19, "mov edi, offset s"], [20, "call _puts"], [21, "mov esi, offset aR"], [22, "mov edi, offset filename"], [23, "call _fopen"], [24, "mov [rbp+stream], rax"], [25, "cmp [rbp+stream], 0"], [26, "jz loc_403C50"], [27, "mov rax, [rbp+stream]"], [28, "mov rdi, rax"], [29, "call _fgetc"], [30, "cmp eax, 75h "], [31, "jnz loc_403C44"], [32, "mov rax, [rbp+stream]"], [33, "mov rdi, rax"], [34, "call _fgetc"], [35, "mov [rbp+var_2C], eax"], [36, "cmp [rbp+var_2C], 75h "], [37, "jz loc_403C43"], [38, "mov eax, [rbp+var_2C]"], [39, "add eax, 61h "], [40, "mov esi, eax"], [41, "mov edi, offset aLoadingC"], [42, "mov eax, 0"], [43, "call _printf"], [44, "mov rax, [rbp+stream]"], [45, "mov rdi, rax"], [46, "call _fgetc"], [47, "mov [rbp+var_30], eax"], [48, "mov eax, [rbp+var_30]"], [49, "shl eax, 8"], [50, "mov ebx, eax"], [51, "mov rax, [rbp+stream]"], [52, "mov rdi, rax"], [53, "call _fgetc"], [54, "or eax, ebx"], [55, "mov [rbp+var_30], eax"], [56, "mov eax, [rbp+var_30]"], [57, "cdqe"], [58, "mov rdi, rax"], [59, "call _malloc"], [60, "mov rdx, rax"], [61, "mov eax, [rbp+var_2C]"], [62, "cdqe"], [63, "add rax, 102h"], [64, "mov ds:qword_406168[rax*8], rdx"], [65, "mov eax, [rbp+var_2C]"], [66, "cdqe"], [67, "add rax, 102h"], [68, "mov rax, ds:qword_406168[rax*8]"], [69, "mov [rbp+var_38], rax"], [70, "mov [rbp+var_14], 0"], [71, "jmp short loc_403C36"], [72, "mov rax, [rbp+stream]"], [73, "mov rdi, rax"], [74, "call _fgetc"], [75, "mov edx, eax"], [76, "mov eax, [rbp+var_14]"], [77, "movsxd rcx, eax"], [78, "mov rax, [rbp+var_38]"], [79, "add rax, rcx"], [80, "mov [rax], dl"], [81, "add [rbp+var_14], 1"], [82, "mov eax, [rbp+var_14]"], [83, "cmp eax, [rbp+var_30]"], [84, "jl short loc_403C15"], [85, "jmp loc_403B7A"], [86, "nop"], [87, "mov rax, [rbp+stream]"], [88, "mov rdi, rax"], [89, "call _fclose"], [90, "mov rax, cs:qword_406978"], [91, "test rax, rax"], [92, "jz short loc_403CA6"], [93, "mov edi, offset aRunningAutoScr"], [94, "call _puts"], [95, "mov esi, offset handler"], [96, "mov edi, 2"], [97, "call _signal"], [98, "mov cs:dword_406140, 0"], [99, "mov rax, cs:qword_406978"], [100, "lea rdx, [rbp+var_58]"], [101, "mov rsi, rax"], [102, "mov edi, offset qword_406160"], [103, "call sub_401A62"], [104, "mov esi, 0"], [105, "mov edi, 2"], [106, "call _signal"], [107, "mov [rbp+lineptr], 0"], [108, "mov [rbp+n], 0"], [109, "mov edi, offset a0m132m"], [110, "mov eax, 0"], [111, "call _printf"], [112, "mov rdx, cs:stdin"], [113, "lea rcx, [rbp+n]"], [114, "lea rax, [rbp+lineptr]"], [115, "mov rsi, rcx"], [116, "mov rdi, rax"], [117, "call _getline"], [118, "test rax, rax"], [119, "jns short loc_403CF8"], [120, "mov edi, offset a0m"], [121, "call _puts"], [122, "mov eax, 0"], [123, "jmp loc_403DEB"], [124, "mov edi, offset a0m"], [125, "mov eax, 0"], [126, "call _printf"], [127, "mov rax, [rbp+lineptr]"], [128, "mov rsi, rax"], [129, "mov edi, offset qword_406160"], [130, "call sub_401394"], [131, "mov [rbp+var_3C], eax"], [132, "cmp [rbp+var_3C], 0"], [133, "jns short loc_403D63"], [134, "mov eax, 1"], [135, "sub eax, [rbp+var_3C]"], [136, "mov [rbp+var_18], eax"], [137, "jmp short loc_403D38"], [138, "mov edi, 20h "], [139, "call _putchar"], [140, "mov eax, [rbp+var_18]"], [141, "lea edx, [rax-1]"], [142, "mov [rbp+var_18], edx"], [143, "test eax, eax"], [144, "jnz short loc_403D2E"], [145, "mov edi, offset a31m"], [146, "call _puts"], [147, "mov edi, offset aUnexpectedInpu"], [148, "mov eax, 0"], [149, "call _printf"], [150, "jmp loc_403DE6"], [151, "mov rax, [rbp+lineptr]"], [152, "mov [rbp+var_20], rax"], [153, "jmp short loc_403DCE"], [154, "mov esi, offset handler"], [155, "mov edi, 2"], [156, "call _signal"], [157, "mov cs:dword_406140, 0"], [158, "lea rdx, [rbp+var_60]"], [159, "mov rax, [rbp+var_20]"], [160, "mov rsi, rax"], [161, "mov edi, offset qword_406160"], [162, "call sub_401A62"], [163, "mov [rbp+var_20], rax"], [164, "mov esi, 0"], [165, "mov edi, 2"], [166, "call _signal"], [167, "mov rax, [rbp+var_60]"], [168, "mov ecx, offset a0m"], [169, "mov rdx, rax"], [170, "mov esi, offset a134m"], [171, "mov edi, offset aSLdS"], [172, "mov eax, 0"], [173, "call _printf"], [174, "mov rcx, [rbp+lineptr]"], [175, "mov rax, [rbp+var_20]"], [176, "sub rax, rcx"], [177, "mov rdx, rax"], [178, "mov eax, [rbp+var_3C]"], [179, "cdqe"], [180, "cmp rdx, rax"], [181, "jl short loc_403D6D"], [182, "jmp loc_403CB6"], [183, "mov rbx, [rbp+var_8]"], [184, "leave"], [185, "retn"]], "data_dep": [[9, 7], [9, 11], [10, 9], [11, 10], [12, 7], [12, 11], [14, 12], [15, 14], [16, 15], [17, 16], [18, 17], [24, 23], [25, 24], [26, 25], [27, 24], [28, 27], [30, 29], [31, 30], [32, 24], [33, 32], [35, 34], [36, 35], [37, 36], [38, 35], [39, 38], [40, 39], [44, 24], [45, 44], [47, 46], [48, 47], [49, 48], [50, 49], [51, 24], [52, 51], [54, 53], [54, 50], [55, 54], [56, 55], [58, 56], [60, 59], [61, 35], [63, 61], [64, 60], [65, 35], [67, 65], [68, 64], [69, 68], [72, 24], [73, 72], [75, 74], [76, 70], [76, 81], [77, 76], [78, 69], [79, 78], [79, 77], [80, 75], [80, 79], [81, 70], [81, 81], [82, 81], [82, 70], [83, 55], [83, 82], [84, 83], [87, 24], [88, 87], [91, 90], [92, 91], [100, 75], [100, 60], [101, 99], [113, 108], [113, 174], [113, 77], [113, 113], [114, 111], [114, 107], [115, 113], [116, 114], [118, 117], [119, 118], [127, 107], [128, 127], [131, 130], [132, 131], [133, 132], [135, 131], [135, 134], [136, 135], [140, 136], [140, 142], [141, 140], [141, 112], [141, 80], [141, 141], [142, 141], [143, 140], [144, 143], [151, 107], [152, 151], [158, 177], [159, 152], [159, 163], [160, 159], [163, 162], [169, 167], [174, 107], [175, 163], [175, 152], [176, 175], [176, 174], [177, 176], [178, 131], [180, 177], [180, 178], [181, 180], [185, 122]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/4e0e10499f28a0bf0c484f94a6d4b531df9c566c5efc730dda8b188f14e3df8b_4e0e10499f28a0bf0c484f94a6d4b531df9c566c5efc730dda8b188f14e3df8b.jsonl.gz", "strip_func_name": "main", "query": "\n\n\n__int64 __fastcall main(int a1, char **a2, char **a3)\n{\nint v3; // ebx\n__int64 v6; // [rsp+0h] [rbp-60h] BYREF\n__int64 v7; // [rsp+8h] [rbp-58h] BYREF\nsize_t n; // [rsp+10h] [rbp-50h] BYREF\nchar *lineptr; // [rsp+18h] [rbp-48h] BYREF\nint v10; // [rsp+24h] [rbp-3Ch]\n__int64 v11; // [rsp+28h] [rbp-38h]\nint v12; // [rsp+30h] [rbp-30h]\nint v13; // [rsp+34h] [rbp-2Ch]\nFILE *stream; // [rsp+38h] [rbp-28h]\nunsigned __int8 *v15; // [rsp+40h] [rbp-20h]\nint v16; // [rsp+48h] [rbp-18h]\nint i; // [rsp+4Ch] [rbp-14h]\n\nqword_406160 = (__int64)malloc;\nqword_406168[0] = (__int64)free;\nqword_406B78 = (__int64)&off_4060C0;\nfor ( dword_406B80 = 0; (&off_4060C0)[2 * dword_406B80]; ++dword_406B80 )\n;\nputs(\"Welcome to uscript.\");\nstream = fopen(\"uscript.dat\", \"r\");\nif ( stream )\n{\nif ( fgetc(stream) == 117 )\n{\nwhile ( 1 )\n{\nv13 = fgetc(stream);\nif ( v13 == 117 )\nbreak;\nprintf(\"Loading %c...\\n\", (unsigned int)(v13 + 97));\nv3 = fgetc(stream) << 8;\nv12 = v3 | fgetc(stream);\nqword_406168[v13 + 258] = (__int64)malloc(v12);\nv11 = qword_406168[v13 + 258];\nfor ( i = 0; i < v12; ++i )\n*(_BYTE *)(i + v11) = fgetc(stream);\n}\n}\nfclose(stream);\n}\nif ( qword_406978 )\n{\nputs(\"Running auto script...\");\nsignal(2, (__sighandler_t)handler);\ndword_406140 = 0;\nsub_401A62((__int64)&qword_406160, (unsigned __int8 *)qword_406978, &v7);\nsignal(2, 0LL);\n}\nlineptr = 0LL;\nn = 0LL;\nwhile ( 1 )\n{\nprintf(\"\\x1B[0m> \\x1B[1;32m\");\nif ( getline(&lineptr, &n, stdin) < 0 )\nbreak;\nprintf(\"\\x1B[0m\");\nv10 = sub_401394((__int64)&qword_406160, (unsigned __int8 *)lineptr);\nif ( v10 >= 0 )\n{\nv15 = (unsigned __int8 *)lineptr;\nwhile ( v15 - (unsigned __int8 *)lineptr < v10 )\n{\nsignal(2, (__sighandler_t)handler);\ndword_406140 = 0;\nv15 = (unsigned __int8 *)sub_401A62((__int64)&qword_406160, v15, &v6);\nsignal(2, 0LL);\nprintf(\"%s%ld%s\\n\", \"\\x1B[1;34m\", v6, \"\\x1B[0m\");\n}\n}\nelse\n{\nv16 = 1 - v10;\nwhile ( v16-- )\nputchar(32);\nputs(\"\\x1B[31m^\");\nprintf(\"Unexpected input\\n\\x1B[0m\");\n}\n}\nputs(\"\\x1B[0m\");\nreturn 0LL;\n}\n\n\n\nQ:[a2,a3,a1,v6,v7,n,lineptr,v10,v11,v12,v13,stream,v15,v16,sub_401A62,sub_401394,]\nAssistant: ", "hints": "[]", "response": "{'a2': 'argv', 'a3': 'envp', 'a1': 'argc', 'v6': 'result', 'v7': 'out', 'n': 'size', 'lineptr': 'line', 'v10': 'len_0', 'v11': 'stub', 'v12': 'len', 'v13': 'key', 'stream': 'fd', 'v15': 'program', 'v16': 'offset', 'sub_401A62': 'eval', 'sub_401394': 'compile'}"}
LZ4_decompress_fast_withPrefix64k
0b8c67ee93fba49de3f09104fd7808938c39f70133a1545b88bd81023895423c
Tina-Linux
tina-V83x
NA
int LZ4_decompress_fast_withPrefix64k(const char* source, char* dest, int originalSize) { return LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, withPrefix64k, (BYTE*)dest - 64 KB, NULL, 64 KB); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_416356", "function_addr": 4285270, "binary_name": "0b8c67ee93fba49de3f09104fd7808938c39f70133a1545b88bd81023895423c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 140h"], [3, "mov [rbp+var_128], rdi"], [4, "mov [rbp+var_130], rsi"], [5, "mov [rbp+var_134], edx"], [6, "mov rax, [rbp+var_130]"], [7, "lea rdx, [rax-10000h]"], [8, "mov rax, [rbp+var_128]"], [9, "mov [rbp+var_8], rax"], [10, "mov rax, [rbp+var_130]"], [11, "mov [rbp+var_10], rax"], [12, "mov [rbp+var_14], 0"], [13, "mov eax, [rbp+var_134]"], [14, "mov [rbp+var_18], eax"], [15, "mov [rbp+var_1C], 0"], [16, "mov [rbp+var_20], 0"], [17, "mov [rbp+var_24], 0"], [18, "mov [rbp+var_28], 1"], [19, "mov [rbp+var_30], rdx"], [20, "mov rax, [rbp+var_8]"], [21, "mov [rbp+src], rax"], [22, "mov eax, [rbp+var_14]"], [23, "movsxd rdx, eax"], [24, "mov rax, [rbp+src]"], [25, "add rax, rdx"], [26, "mov [rbp+var_40], rax"], [27, "mov rax, [rbp+var_10]"], [28, "mov [rbp+dest], rax"], [29, "mov eax, [rbp+var_18]"], [30, "movsxd rdx, eax"], [31, "mov rax, [rbp+dest]"], [32, "add rax, rdx"], [33, "mov [rbp+var_50], rax"], [34, "mov eax, [rbp+var_24]"], [35, "movsxd rdx, eax"], [36, "mov rax, [rbp+dest]"], [37, "add rax, rdx"], [38, "mov [rbp+var_58], rax"], [39, "mov rdx, 0FFFFFFFFFFFF0000h"], [40, "mov rax, [rbp+var_30]"], [41, "add rax, rdx"], [42, "mov [rbp+var_60], rax"], [43, "mov [rbp+var_68], 10000h"], [44, "mov [rbp+var_120], 0"], [45, "mov [rbp+var_11C], 1"], [46, "mov [rbp+var_118], 2"], [47, "mov [rbp+var_114], 1"], [48, "mov [rbp+var_110], 4"], [49, "mov [rbp+var_10C], 4"], [50, "mov [rbp+var_108], 4"], [51, "mov [rbp+var_104], 4"], [52, "mov [rbp+var_100], 0"], [53, "mov [rbp+var_FC], 0"], [54, "mov [rbp+var_F8], 0"], [55, "mov [rbp+var_F4], 0FFFFFFFFh"], [56, "mov [rbp+var_F0], 0"], [57, "mov [rbp+var_EC], 1"], [58, "mov [rbp+var_E8], 2"], [59, "mov [rbp+var_E4], 3"], [60, "cmp [rbp+var_1C], 1"], [61, "setz al"], [62, "movzx eax, al"], [63, "mov [rbp+var_6C], eax"], [64, "mov eax, 0"], [65, "mov [rbp+var_70], eax"], [66, "cmp [rbp+var_20], 0"], [67, "jz short loc_4164FB"], [68, "mov rax, [rbp+var_50]"], [69, "sub rax, 0Ch"], [70, "cmp [rbp+var_58], rax"], [71, "jbe short loc_4164FB"], [72, "mov rax, [rbp+var_50]"], [73, "sub rax, 0Ch"], [74, "mov [rbp+var_58], rax"], [75, "cmp [rbp+var_1C], 0"], [76, "jz short loc_416535"], [77, "cmp [rbp+var_18], 0"], [78, "setz al"], [79, "movzx eax, al"], [80, "test rax, rax"], [81, "jz short loc_416535"], [82, "cmp [rbp+var_14], 1"], [83, "jnz short loc_41652B"], [84, "mov rax, [rbp+src]"], [85, "movzx eax, byte ptr [rax]"], [86, "test al, al"], [87, "jnz short loc_41652B"], [88, "mov eax, 0"], [89, "jmp locret_416C2A"], [90, "mov eax, 0FFFFFFFFh"], [91, "jmp locret_416C2A"], [92, "cmp [rbp+var_1C], 0"], [93, "jnz short loc_416569"], [94, "cmp [rbp+var_18], 0"], [95, "setz al"], [96, "movzx eax, al"], [97, "test rax, rax"], [98, "jz short loc_416569"], [99, "mov rax, [rbp+src]"], [100, "movzx eax, byte ptr [rax]"], [101, "test al, al"], [102, "jnz short loc_41655F"], [103, "mov eax, 1"], [104, "jmp locret_416C2A"], [105, "mov eax, 0FFFFFFFFh"], [106, "jmp locret_416C2A"], [107, "mov rax, [rbp+src]"], [108, "lea rdx, [rax+1]"], [109, "mov [rbp+src], rdx"], [110, "movzx eax, byte ptr [rax]"], [111, "movzx eax, al"], [112, "mov [rbp+var_74], eax"], [113, "mov eax, [rbp+var_74]"], [114, "shr eax, 4"], [115, "mov eax, eax"], [116, "mov [rbp+n], rax"], [117, "cmp [rbp+n], 0Fh"], [118, "jnz loc_416648"], [119, "mov rax, [rbp+src]"], [120, "lea rdx, [rax+1]"], [121, "mov [rbp+src], rdx"], [122, "movzx eax, byte ptr [rax]"], [123, "movzx eax, al"], [124, "mov [rbp+var_84], eax"], [125, "mov eax, [rbp+var_84]"], [126, "add [rbp+n], rax"], [127, "cmp [rbp+var_1C], 0"], [128, "jz short loc_4165CB"], [129, "mov rax, [rbp+var_40]"], [130, "sub rax, 0Fh"], [131, "cmp [rbp+src], rax"], [132, "jnb short loc_4165D2"], [133, "mov eax, 1"], [134, "jmp short loc_4165D7"], [135, "mov eax, 0"], [136, "test eax, eax"], [137, "setnz al"], [138, "movzx eax, al"], [139, "mov rdx, rax"], [140, "cmp [rbp+var_84], 0FFh"], [141, "setz al"], [142, "movzx eax, al"], [143, "and rax, rdx"], [144, "test rax, rax"], [145, "jnz short loc_416595"], [146, "cmp [rbp+var_6C], 0"], [147, "jz short loc_416621"], [148, "mov rdx, [rbp+dest]"], [149, "mov rax, [rbp+n]"], [150, "add rdx, rax"], [151, "mov rax, [rbp+dest]"], [152, "cmp rdx, rax"], [153, "setb al"], [154, "movzx eax, al"], [155, "test rax, rax"], [156, "jnz loc_416C04"], [157, "cmp [rbp+var_6C], 0"], [158, "jz short loc_416648"], [159, "mov rdx, [rbp+src]"], [160, "mov rax, [rbp+n]"], [161, "add rdx, rax"], [162, "mov rax, [rbp+src]"], [163, "cmp rdx, rax"], [164, "setb al"], [165, "movzx eax, al"], [166, "test rax, rax"], [167, "jnz loc_416C07"], [168, "mov rdx, [rbp+dest]"], [169, "mov rax, [rbp+n]"], [170, "add rax, rdx"], [171, "mov [rbp+var_90], rax"], [172, "cmp [rbp+var_1C], 0"], [173, "jz short loc_416695"], [174, "cmp [rbp+var_20], 0"], [175, "jnz short loc_416670"], [176, "mov rax, [rbp+var_50]"], [177, "sub rax, 0Ch"], [178, "jmp short loc_416674"], [179, "mov rax, [rbp+var_58]"], [180, "cmp [rbp+var_90], rax"], [181, "ja short loc_4166B4"], [182, "mov rdx, [rbp+src]"], [183, "mov rax, [rbp+n]"], [184, "add rdx, rax"], [185, "mov rax, [rbp+var_40]"], [186, "sub rax, 8"], [187, "cmp rdx, rax"], [188, "ja short loc_4166B4"], [189, "cmp [rbp+var_1C], 0"], [190, "jnz loc_416761"], [191, "mov rax, [rbp+var_50]"], [192, "sub rax, 8"], [193, "cmp [rbp+var_90], rax"], [194, "jbe loc_416761"], [195, "cmp [rbp+var_20], 0"], [196, "jz short loc_4166E7"], [197, "mov rax, [rbp+var_50]"], [198, "cmp rax, [rbp+var_90]"], [199, "jb loc_416C0A"], [200, "cmp [rbp+var_1C], 0"], [201, "jz short loc_41672A"], [202, "mov rdx, [rbp+src]"], [203, "mov rax, [rbp+n]"], [204, "add rax, rdx"], [205, "cmp [rbp+var_40], rax"], [206, "jnb short loc_41672A"], [207, "jmp loc_416C20"], [208, "cmp [rbp+var_1C], 0"], [209, "jnz short loc_4166FE"], [210, "mov rax, [rbp+var_50]"], [211, "cmp rax, [rbp+var_90]"], [212, "jnz loc_416C0D"], [213, "cmp [rbp+var_1C], 0"], [214, "jz short loc_41672A"], [215, "mov rdx, [rbp+src]"], [216, "mov rax, [rbp+n]"], [217, "add rax, rdx"], [218, "cmp [rbp+var_40], rax"], [219, "jnz loc_416C10"], [220, "mov rax, [rbp+var_50]"], [221, "cmp rax, [rbp+var_90]"], [222, "jb loc_416C10"], [223, "mov rdx, [rbp+n]"], [224, "mov rcx, [rbp+src]"], [225, "mov rax, [rbp+dest]"], [226, "mov rsi, rcx"], [227, "mov rdi, rax"], [228, "call _memcpy"], [229, "mov rax, [rbp+n]"], [230, "add [rbp+src], rax"], [231, "mov rax, [rbp+n]"], [232, "add [rbp+dest], rax"], [233, "nop"], [234, "cmp [rbp+var_1C], 0"], [235, "jz loc_416BFA"], [236, "jmp loc_416BF0"], [237, "mov rdx, [rbp+var_90]"], [238, "mov rcx, [rbp+src]"], [239, "mov rax, [rbp+dest]"], [240, "mov rsi, rcx"], [241, "mov rdi, rax"], [242, "call sub_401432"], [243, "mov rax, [rbp+n]"], [244, "add [rbp+src], rax"], [245, "mov rax, [rbp+var_90]"], [246, "mov [rbp+dest], rax"], [247, "mov rax, [rbp+src]"], [248, "mov rdi, rax"], [249, "call sub_401371"], [250, "movzx eax, ax"], [251, "mov [rbp+var_98], rax"], [252, "add [rbp+src], 2"], [253, "mov rax, [rbp+var_98]"], [254, "neg rax"], [255, "mov rdx, rax"], [256, "mov rax, [rbp+dest]"], [257, "add rax, rdx"], [258, "mov [rbp+var_A0], rax"], [259, "cmp [rbp+var_70], 0"], [260, "jz short loc_4167E4"], [261, "mov rax, [rbp+var_60]"], [262, "cmp rax, [rbp+var_A0]"], [263, "setnbe al"], [264, "movzx eax, al"], [265, "test rax, rax"], [266, "jnz loc_416C13"], [267, "mov rax, [rbp+var_98]"], [268, "mov edx, eax"], [269, "mov rax, [rbp+dest]"], [270, "mov esi, edx"], [271, "mov rdi, rax"], [272, "call sub_40135A"], [273, "mov eax, [rbp+var_74]"], [274, "and eax, 0Fh"], [275, "mov [rbp+n], rax"], [276, "cmp [rbp+n], 0Fh"], [277, "jnz short loc_416879"], [278, "mov rax, [rbp+src]"], [279, "lea rdx, [rax+1]"], [280, "mov [rbp+src], rdx"], [281, "movzx eax, byte ptr [rax]"], [282, "movzx eax, al"], [283, "mov [rbp+var_A4], eax"], [284, "cmp [rbp+var_1C], 0"], [285, "jz short loc_41683C"], [286, "mov rax, [rbp+var_40]"], [287, "sub rax, 5"], [288, "cmp [rbp+src], rax"], [289, "ja loc_416C16"], [290, "mov eax, [rbp+var_A4]"], [291, "add [rbp+n], rax"], [292, "cmp [rbp+var_A4], 0FFh"], [293, "jz short loc_41680C"], [294, "cmp [rbp+var_6C], 0"], [295, "jz short loc_416879"], [296, "mov rdx, [rbp+dest]"], [297, "mov rax, [rbp+n]"], [298, "add rdx, rax"], [299, "mov rax, [rbp+dest]"], [300, "cmp rdx, rax"], [301, "setb al"], [302, "movzx eax, al"], [303, "test rax, rax"], [304, "jnz loc_416C19"], [305, "add [rbp+n], 4"], [306, "cmp [rbp+var_28], 2"], [307, "jnz loc_4169F4"], [308, "mov rax, [rbp+var_30]"], [309, "cmp rax, [rbp+var_A0]"], [310, "jbe loc_4169F4"], [311, "mov rdx, [rbp+dest]"], [312, "mov rax, [rbp+n]"], [313, "add rdx, rax"], [314, "mov rax, [rbp+var_50]"], [315, "sub rax, 5"], [316, "cmp rdx, rax"], [317, "setnbe al"], [318, "movzx eax, al"], [319, "test rax, rax"], [320, "jnz loc_416C1C"], [321, "mov rax, [rbp+var_30]"], [322, "sub rax, [rbp+var_A0]"], [323, "cmp [rbp+n], rax"], [324, "ja short loc_416908"], [325, "mov rax, [rbp+var_30]"], [326, "sub rax, [rbp+var_A0]"], [327, "neg rax"], [328, "mov rdx, rax"], [329, "mov rax, [rbp+var_68]"], [330, "lea rcx, [rdx+rax]"], [331, "mov rdx, [rbp+n]"], [332, "mov rax, [rbp+dest]"], [333, "mov rsi, rcx"], [334, "mov rdi, rax"], [335, "call _memmove"], [336, "mov rax, [rbp+n]"], [337, "add [rbp+dest], rax"], [338, "jmp loc_416BEB"], [339, "mov rax, [rbp+var_30]"], [340, "sub rax, [rbp+var_A0]"], [341, "mov [rbp+var_B0], rax"], [342, "mov rax, [rbp+n]"], [343, "sub rax, [rbp+var_B0]"], [344, "mov [rbp+var_B8], rax"], [345, "mov rax, [rbp+var_B0]"], [346, "neg rax"], [347, "mov rdx, rax"], [348, "mov rax, [rbp+var_68]"], [349, "lea rcx, [rdx+rax]"], [350, "mov rdx, [rbp+var_B0]"], [351, "mov rax, [rbp+dest]"], [352, "mov rsi, rcx"], [353, "mov rdi, rax"], [354, "call _memcpy"], [355, "mov rax, [rbp+var_B0]"], [356, "add [rbp+dest], rax"], [357, "mov rax, [rbp+dest]"], [358, "sub rax, [rbp+var_30]"], [359, "cmp [rbp+var_B8], rax"], [360, "jbe short loc_4169CA"], [361, "mov rdx, [rbp+dest]"], [362, "mov rax, [rbp+var_B8]"], [363, "add rax, rdx"], [364, "mov [rbp+var_C0], rax"], [365, "mov rax, [rbp+var_30]"], [366, "mov [rbp+var_C8], rax"], [367, "jmp short loc_4169B8"], [368, "mov rdx, [rbp+var_C8]"], [369, "lea rax, [rdx+1]"], [370, "mov [rbp+var_C8], rax"], [371, "mov rax, [rbp+dest]"], [372, "lea rcx, [rax+1]"], [373, "mov [rbp+dest], rcx"], [374, "movzx edx, byte ptr [rdx]"], [375, "mov [rax], dl"], [376, "mov rax, [rbp+var_C0]"], [377, "cmp rax, [rbp+dest]"], [378, "ja short loc_416995"], [379, "jmp loc_416BEB"], [380, "mov rdx, [rbp+var_B8]"], [381, "mov rcx, [rbp+var_30]"], [382, "mov rax, [rbp+dest]"], [383, "mov rsi, rcx"], [384, "mov rdi, rax"], [385, "call _memcpy"], [386, "mov rax, [rbp+var_B8]"], [387, "add [rbp+dest], rax"], [388, "jmp loc_416BEB"], [389, "mov rdx, [rbp+dest]"], [390, "mov rax, [rbp+n]"], [391, "add rax, rdx"], [392, "mov [rbp+var_90], rax"], [393, "cmp [rbp+var_98], 7"], [394, "setbe al"], [395, "movzx eax, al"], [396, "test rax, rax"], [397, "jz loc_416ABE"], [398, "mov rax, [rbp+var_98]"], [399, "mov eax, [rbp+rax*4+var_100]"], [400, "mov [rbp+var_CC], eax"], [401, "mov rax, [rbp+var_A0]"], [402, "movzx edx, byte ptr [rax]"], [403, "mov rax, [rbp+dest]"], [404, "mov [rax], dl"], [405, "mov rax, [rbp+dest]"], [406, "lea rdx, [rax+1]"], [407, "mov rax, [rbp+var_A0]"], [408, "movzx eax, byte ptr [rax+1]"], [409, "mov [rdx], al"], [410, "mov rax, [rbp+dest]"], [411, "lea rdx, [rax+2]"], [412, "mov rax, [rbp+var_A0]"], [413, "movzx eax, byte ptr [rax+2]"], [414, "mov [rdx], al"], [415, "mov rax, [rbp+dest]"], [416, "lea rdx, [rax+3]"], [417, "mov rax, [rbp+var_A0]"], [418, "movzx eax, byte ptr [rax+3]"], [419, "mov [rdx], al"], [420, "mov rax, [rbp+var_98]"], [421, "mov eax, [rbp+rax*4+var_120]"], [422, "mov eax, eax"], [423, "add [rbp+var_A0], rax"], [424, "mov rax, [rbp+dest]"], [425, "lea rdx, [rax+4]"], [426, "mov rax, [rbp+var_A0]"], [427, "mov eax, [rax]"], [428, "mov [rdx], eax"], [429, "mov eax, [rbp+var_CC]"], [430, "cdqe"], [431, "neg rax"], [432, "add [rbp+var_A0], rax"], [433, "jmp short loc_416ADC"], [434, "mov rdx, [rbp+var_A0]"], [435, "mov rax, [rbp+dest]"], [436, "mov rsi, rdx"], [437, "mov rdi, rax"], [438, "call sub_401415"], [439, "add [rbp+var_A0], 8"], [440, "add [rbp+dest], 8"], [441, "mov rax, [rbp+var_50]"], [442, "sub rax, 0Ch"], [443, "cmp [rbp+var_90], rax"], [444, "setnbe al"], [445, "movzx eax, al"], [446, "test rax, rax"], [447, "jz loc_416B9E"], [448, "mov rax, [rbp+var_50]"], [449, "sub rax, 7"], [450, "mov [rbp+var_D8], rax"], [451, "mov rax, [rbp+var_50]"], [452, "sub rax, 5"], [453, "cmp [rbp+var_90], rax"], [454, "ja loc_416C1F"], [455, "mov rax, [rbp+dest]"], [456, "cmp rax, [rbp+var_D8]"], [457, "jnb short loc_416B8F"], [458, "mov rdx, [rbp+var_D8]"], [459, "mov rcx, [rbp+var_A0]"], [460, "mov rax, [rbp+dest]"], [461, "mov rsi, rcx"], [462, "mov rdi, rax"], [463, "call sub_401432"], [464, "mov rax, [rbp+var_D8]"], [465, "sub rax, [rbp+dest]"], [466, "add [rbp+var_A0], rax"], [467, "mov rax, [rbp+var_D8]"], [468, "mov [rbp+dest], rax"], [469, "jmp short loc_416B8F"], [470, "mov rdx, [rbp+var_A0]"], [471, "lea rax, [rdx+1]"], [472, "mov [rbp+var_A0], rax"], [473, "mov rax, [rbp+dest]"], [474, "lea rcx, [rax+1]"], [475, "mov [rbp+dest], rcx"], [476, "movzx edx, byte ptr [rdx]"], [477, "mov [rax], dl"], [478, "mov rax, [rbp+var_90]"], [479, "cmp rax, [rbp+dest]"], [480, "ja short loc_416B6C"], [481, "jmp short loc_416BE0"], [482, "mov rdx, [rbp+var_A0]"], [483, "mov rax, [rbp+dest]"], [484, "mov rsi, rdx"], [485, "mov rdi, rax"], [486, "call sub_401415"], [487, "cmp [rbp+n], 10h"], [488, "jbe short loc_416BE0"], [489, "mov rax, [rbp+var_A0]"], [490, "lea rsi, [rax+8]"], [491, "mov rax, [rbp+dest]"], [492, "lea rcx, [rax+8]"], [493, "mov rax, [rbp+var_90]"], [494, "mov rdx, rax"], [495, "mov rdi, rcx"], [496, "call sub_401432"], [497, "mov rax, [rbp+var_90]"], [498, "mov [rbp+dest], rax"], [499, "jmp loc_416569"], [500, "mov rax, [rbp+dest]"], [501, "sub rax, [rbp+var_10]"], [502, "jmp short locret_416C2A"], [503, "mov rax, [rbp+src]"], [504, "sub rax, [rbp+var_8]"], [505, "jmp short locret_416C2A"], [506, "nop"], [507, "jmp short loc_416C20"], [508, "nop"], [509, "jmp short loc_416C20"], [510, "nop"], [511, "jmp short loc_416C20"], [512, "nop"], [513, "jmp short loc_416C20"], [514, "nop"], [515, "jmp short loc_416C20"], [516, "nop"], [517, "jmp short loc_416C20"], [518, "nop"], [519, "jmp short loc_416C20"], [520, "nop"], [521, "jmp short loc_416C20"], [522, "nop"], [523, "jmp short loc_416C20"], [524, "nop"], [525, "mov rax, [rbp+src]"], [526, "sub rax, [rbp+var_8]"], [527, "not eax"], [528, "leave"], [529, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 3], [9, 8], [10, 4], [11, 10], [13, 5], [14, 13], [19, 7], [20, 9], [21, 20], [22, 12], [23, 22], [24, 21], [25, 24], [25, 23], [26, 25], [27, 11], [28, 27], [29, 14], [30, 29], [31, 28], [32, 31], [32, 30], [33, 32], [34, 17], [35, 34], [36, 28], [37, 35], [37, 36], [38, 37], [40, 19], [41, 40], [41, 39], [42, 41], [60, 15], [61, 60], [61, 41], [62, 61], [63, 62], [65, 64], [66, 16], [67, 66], [68, 33], [69, 68], [70, 38], [70, 69], [71, 70], [72, 33], [73, 72], [74, 73], [75, 15], [76, 75], [77, 14], [78, 77], [78, 69], [78, 64], [78, 73], [79, 78], [80, 79], [81, 80], [82, 12], [83, 82], [84, 21], [85, 84], [86, 85], [87, 86], [92, 15], [93, 92], [94, 14], [95, 69], [95, 64], [95, 73], [95, 94], [95, 80], [96, 95], [97, 96], [98, 97], [99, 21], [100, 99], [101, 100], [102, 101], [107, 252], [107, 21], [107, 280], [108, 477], [108, 39], [108, 425], [108, 375], [108, 374], [108, 458], [108, 476], [108, 494], [108, 331], [108, 434], [108, 419], [108, 428], [108, 414], [108, 409], [108, 404], [108, 107], [108, 380], [108, 361], [108, 482], [109, 108], [110, 107], [110, 419], [110, 428], [110, 414], [110, 409], [110, 404], [110, 375], [110, 477], [111, 110], [112, 111], [113, 112], [114, 113], [115, 114], [116, 115], [117, 116], [118, 117], [119, 109], [119, 121], [120, 419], [120, 428], [120, 414], [120, 409], [120, 139], [120, 404], [120, 375], [120, 477], [120, 119], [120, 108], [121, 120], [122, 119], [122, 375], [122, 477], [122, 419], [122, 428], [122, 414], [122, 409], [122, 404], [123, 122], [124, 123], [125, 124], [126, 126], [126, 116], [126, 125], [127, 15], [128, 127], [129, 26], [130, 129], [131, 130], [131, 121], [132, 131], [136, 135], [136, 133], [137, 136], [138, 137], [139, 138], [140, 124], [141, 138], [141, 140], [142, 141], [143, 139], [143, 142], [144, 143], [145, 144], [146, 63], [147, 146], [148, 387], [148, 373], [148, 498], [148, 28], [148, 356], [148, 337], [149, 126], [150, 149], [150, 148], [151, 387], [151, 373], [151, 498], [151, 28], [151, 356], [151, 337], [152, 151], [152, 150], [153, 152], [153, 151], [154, 153], [155, 154], [156, 155], [157, 63], [158, 157], [159, 121], [160, 126], [161, 160], [161, 159], [162, 121], [163, 161], [163, 162], [164, 163], [164, 162], [165, 164], [166, 165], [167, 166], [168, 356], [168, 337], [168, 387], [168, 373], [168, 498], [168, 28], [169, 126], [169, 116], [170, 169], [170, 168], [171, 170], [172, 15], [173, 172], [174, 16], [175, 174], [176, 33], [177, 176], [179, 38], [179, 74], [180, 177], [180, 171], [180, 179], [181, 180], [182, 109], [182, 121], [183, 126], [183, 116], [184, 183], [184, 182], [185, 26], [186, 185], [187, 184], [187, 186], [188, 187], [189, 15], [190, 189], [191, 33], [192, 191], [193, 192], [193, 171], [194, 193], [195, 16], [196, 195], [197, 33], [198, 197], [198, 171], [199, 198], [200, 15], [201, 200], [202, 121], [202, 109], [203, 126], [203, 116], [204, 203], [204, 202], [205, 204], [205, 26], [206, 205], [208, 15], [209, 208], [210, 33], [211, 210], [211, 171], [212, 211], [213, 15], [214, 213], [215, 109], [215, 121], [216, 126], [216, 116], [217, 216], [217, 215], [218, 26], [218, 217], [219, 218], [220, 33], [221, 171], [221, 220], [222, 221], [223, 126], [223, 116], [224, 121], [224, 109], [225, 356], [225, 337], [225, 387], [225, 373], [225, 498], [225, 28], [226, 224], [227, 225], [229, 126], [229, 116], [230, 229], [230, 121], [230, 109], [231, 126], [231, 116], [232, 373], [232, 498], [232, 231], [232, 356], [232, 337], [232, 28], [232, 387], [234, 15], [235, 234], [237, 171], [238, 121], [238, 109], [239, 356], [239, 337], [239, 28], [239, 387], [239, 373], [239, 498], [240, 238], [241, 239], [243, 126], [243, 116], [244, 109], [244, 243], [244, 121], [245, 171], [246, 245], [247, 244], [248, 247], [250, 249], [251, 250], [252, 244], [253, 251], [254, 253], [255, 254], [256, 246], [257, 256], [257, 255], [258, 257], [259, 65], [260, 259], [261, 42], [262, 261], [262, 258], [263, 262], [263, 261], [264, 263], [265, 264], [266, 265], [267, 251], [268, 267], [269, 246], [270, 268], [271, 269], [273, 112], [274, 273], [275, 274], [276, 275], [277, 276], [278, 280], [278, 252], [279, 419], [279, 414], [279, 279], [279, 428], [279, 409], [279, 404], [279, 278], [279, 268], [279, 375], [279, 477], [280, 279], [281, 409], [281, 404], [281, 278], [281, 375], [281, 477], [281, 419], [281, 428], [281, 414], [282, 281], [283, 282], [284, 15], [285, 284], [286, 26], [287, 286], [288, 280], [288, 287], [289, 288], [290, 283], [291, 291], [291, 290], [291, 275], [292, 283], [293, 292], [294, 63], [295, 294], [296, 246], [297, 291], [298, 297], [298, 296], [299, 246], [300, 299], [300, 298], [301, 299], [301, 300], [302, 301], [303, 302], [304, 303], [305, 291], [305, 275], [306, 18], [307, 306], [308, 19], [309, 308], [309, 258], [310, 309], [311, 246], [312, 305], [313, 311], [313, 312], [314, 33], [315, 314], [316, 315], [316, 313], [317, 316], [317, 315], [318, 317], [319, 318], [320, 319], [321, 19], [322, 321], [322, 258], [323, 322], [323, 305], [324, 323], [325, 19], [326, 258], [326, 325], [327, 326], [328, 327], [329, 43], [330, 419], [330, 428], [330, 414], [330, 409], [330, 404], [330, 329], [330, 375], [330, 477], [330, 238], [331, 305], [332, 246], [333, 330], [334, 332], [336, 305], [337, 336], [337, 246], [339, 19], [340, 258], [340, 339], [341, 340], [342, 305], [343, 342], [343, 341], [344, 343], [345, 341], [346, 345], [347, 346], [348, 43], [349, 414], [349, 409], [349, 404], [349, 348], [349, 375], [349, 477], [349, 238], [349, 419], [349, 428], [350, 341], [351, 246], [352, 349], [353, 351], [355, 341], [356, 355], [356, 246], [357, 356], [358, 19], [358, 357], [359, 358], [359, 344], [360, 359], [361, 356], [362, 344], [363, 362], [363, 361], [364, 363], [365, 19], [366, 365], [368, 366], [368, 370], [369, 368], [369, 419], [369, 428], [369, 414], [369, 409], [369, 404], [369, 376], [369, 375], [369, 477], [370, 369], [371, 356], [371, 373], [372, 375], [372, 477], [372, 419], [372, 428], [372, 414], [372, 409], [372, 404], [372, 372], [372, 349], [372, 371], [373, 372], [374, 419], [374, 428], [374, 414], [374, 409], [374, 404], [374, 375], [374, 477], [374, 368], [375, 374], [375, 371], [376, 364], [377, 373], [377, 376], [377, 356], [378, 377], [380, 344], [381, 19], [382, 356], [383, 381], [384, 382], [386, 344], [387, 386], [387, 356], [389, 246], [390, 305], [391, 390], [391, 389], [392, 391], [393, 251], [394, 393], [394, 391], [395, 394], [396, 395], [397, 396], [398, 251], [399, 398], [400, 399], [401, 258], [402, 401], [402, 419], [402, 428], [402, 414], [402, 409], [402, 404], [402, 375], [402, 477], [403, 246], [404, 403], [404, 402], [405, 246], [406, 404], [406, 402], [406, 405], [407, 258], [408, 407], [408, 404], [409, 408], [409, 406], [410, 246], [411, 406], [411, 410], [411, 409], [412, 258], [413, 412], [413, 409], [414, 413], [414, 411], [415, 246], [416, 411], [416, 415], [416, 414], [417, 258], [418, 414], [418, 417], [419, 416], [419, 418], [420, 251], [421, 420], [422, 421], [423, 422], [423, 258], [424, 246], [425, 416], [425, 424], [425, 419], [426, 423], [427, 426], [427, 419], [427, 404], [428, 427], [428, 425], [429, 400], [431, 429], [432, 423], [432, 431], [434, 258], [435, 246], [436, 434], [437, 435], [439, 258], [440, 246], [441, 33], [442, 441], [443, 392], [443, 442], [444, 443], [444, 442], [445, 444], [446, 445], [447, 446], [448, 33], [449, 448], [450, 449], [451, 33], [452, 451], [453, 452], [453, 392], [454, 453], [455, 440], [456, 455], [456, 450], [457, 456], [458, 450], [459, 432], [459, 439], [460, 440], [461, 459], [462, 460], [464, 450], [465, 440], [465, 464], [466, 432], [466, 439], [466, 465], [467, 450], [468, 467], [470, 439], [470, 466], [470, 432], [470, 472], [471, 375], [471, 478], [471, 477], [471, 470], [471, 419], [471, 428], [471, 414], [471, 409], [471, 404], [472, 471], [473, 475], [473, 468], [473, 440], [474, 409], [474, 404], [474, 375], [474, 473], [474, 459], [474, 477], [474, 419], [474, 238], [474, 474], [474, 428], [474, 414], [475, 474], [476, 477], [476, 470], [476, 419], [476, 428], [476, 414], [476, 409], [476, 404], [476, 375], [477, 473], [477, 476], [478, 392], [479, 478], [479, 468], [479, 440], [479, 475], [480, 479], [482, 439], [482, 432], [483, 440], [484, 482], [485, 483], [487, 305], [488, 487], [489, 439], [489, 432], [490, 375], [490, 477], [490, 419], [490, 489], [490, 484], [490, 428], [490, 414], [490, 409], [490, 404], [491, 440], [492, 238], [492, 419], [492, 428], [492, 414], [492, 409], [492, 404], [492, 375], [492, 491], [492, 477], [493, 392], [494, 493], [495, 492], [497, 392], [498, 497], [500, 232], [501, 500], [501, 11], [503, 230], [504, 9], [504, 503], [525, 109], [525, 280], [525, 252], [525, 121], [526, 9], [526, 525], [527, 526], [529, 88], [529, 501], [529, 105], [529, 504], [529, 90], [529, 527], [529, 103]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/0b8c67ee93fba49de3f09104fd7808938c39f70133a1545b88bd81023895423c_0b8c67ee93fba49de3f09104fd7808938c39f70133a1545b88bd81023895423c.jsonl.gz", "strip_func_name": "sub_416356", "query": "\n\n\n__int64 __fastcall sub_416356(char *a1, char *a2, int a3)\n{\n__int64 result; // rax\nunsigned __int8 *v4; // rax\nunsigned __int8 *v5; // rax\n_BOOL4 v6; // eax\nchar *v7; // rax\nunsigned __int8 *v8; // rax\nchar *v9; // rdx\n_BYTE *v10; // rax\n_BYTE *v11; // rdx\n_BYTE *v12; // rax\nint v13[8]; // [rsp+20h] [rbp-120h]\nint v14[10]; // [rsp+40h] [rbp-100h]\nchar *v15; // [rsp+68h] [rbp-D8h]\nint v16; // [rsp+74h] [rbp-CCh]\nchar *v17; // [rsp+78h] [rbp-C8h]\nunsigned __int64 v18; // [rsp+80h] [rbp-C0h]\nsize_t v19; // [rsp+88h] [rbp-B8h]\nsize_t v20; // [rsp+90h] [rbp-B0h]\nunsigned int v21; // [rsp+9Ch] [rbp-A4h]\n_QWORD *v22; // [rsp+A0h] [rbp-A0h]\nunsigned __int64 v23; // [rsp+A8h] [rbp-98h]\nchar *v24; // [rsp+B0h] [rbp-90h]\nunsigned int v25; // [rsp+BCh] [rbp-84h]\nsize_t n; // [rsp+C0h] [rbp-80h]\nunsigned int v27; // [rsp+CCh] [rbp-74h]\nint v28; // [rsp+D0h] [rbp-70h]\nint v29; // [rsp+D4h] [rbp-6Ch]\n__int64 v30; // [rsp+D8h] [rbp-68h]\nunsigned __int64 v31; // [rsp+E0h] [rbp-60h]\nchar *v32; // [rsp+E8h] [rbp-58h]\nchar *v33; // [rsp+F0h] [rbp-50h]\nvoid *dest; // [rsp+F8h] [rbp-48h]\nchar *v35; // [rsp+100h] [rbp-40h]\nvoid *src; // [rsp+108h] [rbp-38h]\nvoid *v37; // [rsp+110h] [rbp-30h]\nint v38; // [rsp+118h] [rbp-28h]\nint v39; // [rsp+11Ch] [rbp-24h]\nint v40; // [rsp+120h] [rbp-20h]\nint v41; // [rsp+124h] [rbp-1Ch]\nint v42; // [rsp+128h] [rbp-18h]\nint v43; // [rsp+12Ch] [rbp-14h]\nchar *v44; // [rsp+130h] [rbp-10h]\n_BYTE *v45; // [rsp+138h] [rbp-8h]\n\nv45 = a1;\nv44 = a2;\nv43 = 0;\nv42 = a3;\nv41 = 0;\nv40 = 0;\nv39 = 0;\nv38 = 1;\nv37 = a2 - 0x10000;\nsrc = a1;\nv35 = a1;\ndest = a2;\nv33 = &a2[a3];\nv32 = a2;\nv31 = (unsigned __int64)(a2 - 0x20000);\nv30 = 0x10000LL;\nv13[0] = 0;\nv13[1] = 1;\nv13[2] = 2;\nv13[3] = 1;\nv13[4] = 4;\nv13[5] = 4;\nv13[6] = 4;\nv13[7] = 4;\nv14[0] = 0;\nv14[1] = 0;\nv14[2] = 0;\nv14[3] = -1;\nv14[4] = 0;\nv14[5] = 1;\nv14[6] = 2;\nv14[7] = 3;\nv29 = 0;\nv28 = 0;\nif ( !a3 )\n{\nif ( *(_BYTE *)src )\nresult = 0xFFFFFFFFLL;\nelse\nresult = 1LL;\nreturn result;\n}\nwhile ( 1 )\n{\nv4 = (unsigned __int8 *)src;\nsrc = (char *)src + 1;\nv27 = *v4;\nn = v27 >> 4;\nif ( n == 15 )\n{\ndo\n{\nv5 = (unsigned __int8 *)src;\nsrc = (char *)src + 1;\nv25 = *v5;\nn += v25;\nv6 = !v41 || src < v35 - 15;\n}\nwhile ( v6 && v25 == 255 );\nif ( v29 && (char *)dest + n < dest || v29 && (char *)src + n < src )\nreturn (unsigned int)~((_DWORD)src - (_DWORD)v45);\n}\nv24 = (char *)dest + n;\nif ( v41 )\n{\nv7 = v40 ? v32 : v33 - 12;\nif ( v24 > v7 || (char *)src + n > v35 - 8 )\nbreak;\n}\nif ( !v41 && v24 > v33 - 8 )\nbreak;\nsub_401432(dest, src, (unsigned __int64)v24);\nsrc = (char *)src + n;\ndest = v24;\nv23 = (unsigned __int16)sub_401371((unsigned __int16 *)src);\nsrc = (char *)src + 2;\nv22 = (char *)dest - v23;\nif ( v28 && v31 > (unsigned __int64)v22 )\nreturn (unsigned int)~((_DWORD)src - (_DWORD)v45);\nsub_40135A(dest, v23);\nn = v27 & 0xF;\nif ( n == 15 )\n{\nwhile ( 1 )\n{\nv8 = (unsigned __int8 *)src;\nsrc = (char *)src + 1;\nv21 = *v8;\nif ( v41 )\n{\nif ( src > v35 - 5 )\nreturn (unsigned int)~((_DWORD)src - (_DWORD)v45);\n}\nn += v21;\nif ( v21 != 255 )\n{\nif ( v29 && (char *)dest + n < dest )\nreturn (unsigned int)~((_DWORD)src - (_DWORD)v45);\nbreak;\n}\n}\n}\nn += 4LL;\nif ( v38 == 2 && v37 > v22 )\n{\nif ( (char *)dest + n > v33 - 5 )\nreturn (unsigned int)~((_DWORD)src - (_DWORD)v45);\nif ( n > (_BYTE *)v37 - (_BYTE *)v22 )\n{\nv20 = (_BYTE *)v37 - (_BYTE *)v22;\nv19 = n - ((_BYTE *)v37 - (_BYTE *)v22);\nmemcpy(dest, (const void *)((char *)v22 - (_BYTE *)v37 + v30), (_BYTE *)v37 - (_BYTE *)v22);\ndest = (char *)dest + v20;\nif ( v19 <= (_BYTE *)dest - (_BYTE *)v37 )\n{\nmemcpy(dest, v37, v19);\ndest = (char *)dest + v19;\n}\nelse\n{\nv18 = (unsigned __int64)dest + v19;\nv17 = (char *)v37;\nwhile ( v18 > (unsigned __int64)dest )\n{\nv9 = v17++;\nv10 = dest;\ndest = (char *)dest + 1;\n*v10 = *v9;\n}\n}\n}\nelse\n{\nmemmove(dest, (const void *)((char *)v22 - (_BYTE *)v37 + v30), n);\ndest = (char *)dest + n;\n}\n}\nelse\n{\nv24 = (char *)dest + n;\nif ( v23 > 7 )\n{\nsub_401415(dest, v22++);\n}\nelse\n{\nv16 = v14[v23];\n*(_BYTE *)dest = *(_BYTE *)v22;\n*((_BYTE *)dest + 1) = *((_BYTE *)v22 + 1);\n*((_BYTE *)dest + 2) = *((_BYTE *)v22 + 2);\n*((_BYTE *)dest + 3) = *((_BYTE *)v22 + 3);\nv22 = (_QWORD *)((char *)v22 + (unsigned int)v13[v23]);\n*((_DWORD *)dest + 1) = *(_DWORD *)v22;\nv22 = (_QWORD *)((char *)v22 - v16);\n}\ndest = (char *)dest + 8;\nif ( v24 <= v33 - 12 )\n{\nsub_401415(dest, v22);\nif ( n > 0x10 )\nsub_401432((_QWORD *)dest + 1, v22 + 1, (unsigned __int64)v24);\n}\nelse\n{\nv15 = v33 - 7;\nif ( v24 > v33 - 5 )\nreturn (unsigned int)~((_DWORD)src - (_DWORD)v45);\nif ( dest < v15 )\n{\nsub_401432(dest, v22, (unsigned __int64)v15);\nv22 = (_QWORD *)((char *)v22 + v15 - (_BYTE *)dest);\ndest = v15;\n}\nwhile ( v24 > dest )\n{\nv11 = v22;\nv22 = (_QWORD *)((char *)v22 + 1);\nv12 = dest;\ndest = (char *)dest + 1;\n*v12 = *v11;\n}\n}\ndest = v24;\n}\n}\nif ( v40 )\n{\nif ( v33 < v24 || v41 && v35 < (char *)src + n )\nreturn (unsigned int)~((_DWORD)src - (_DWORD)v45);\n}\nelse if ( !v41 && v33 != v24 || v41 && (v35 != (char *)src + n || v33 < v24) )\n{\nreturn (unsigned int)~((_DWORD)src - (_DWORD)v45);\n}\nmemcpy(dest, src, n);\nsrc = (char *)src + n;\ndest = (char *)dest + n;\nif ( v41 )\nresult = (_BYTE *)dest - v44;\nelse\nresult = (_BYTE *)src - v45;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v22,v23,v24,dest,sub_416356,sub_401432,sub_401371,sub_40135A,sub_401415,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'originalSize', 'a1': 'source', 'a2': 'dest', 'v22': 'srcPtr', 'v23': 'value', 'v24': 'dstEnd', 'dest': 'dstPtr', 'sub_416356': 'LZ4_decompress_fast_withPrefix64k', 'sub_401432': 'LZ4_wildCopy', 'sub_401371': 'LZ4_readLE16', 'sub_40135A': 'LZ4_write32', 'sub_401415': 'LZ4_copy8'}"}
print_error
03c200181d5bd9d9aef7e21f9916a04779b98f82f54c02e756e7d6abb15fdf67
RKX1209
bitvisor-gdb
NA
static int print_error(const char *str, size_t len, UI *ui) { UI_STRING uis; memset(&uis, 0, sizeof(uis)); uis.type = UIT_ERROR; uis.out_string = str; if (ui->meth->ui_write_string && !ui->meth->ui_write_string(ui, &uis)) return -1; return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40779D", "function_addr": 4224925, "binary_name": "03c200181d5bd9d9aef7e21f9916a04779b98f82f54c02e756e7d6abb15fdf67.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 60h"], [3, "mov [rbp+var_48], rdi"], [4, "mov [rbp+var_50], rsi"], [5, "mov [rbp+var_58], rdx"], [6, "lea rax, [rbp+s]"], [7, "mov edx, 40h "], [8, "mov esi, 0"], [9, "mov rdi, rax"], [10, "call _memset"], [11, "mov [rbp+s], 5"], [12, "mov rax, [rbp+var_48]"], [13, "mov [rbp+var_38], rax"], [14, "mov rax, [rbp+var_58]"], [15, "mov rax, [rax]"], [16, "mov rax, [rax+10h]"], [17, "test rax, rax"], [18, "jz short loc_40780C"], [19, "mov rax, [rbp+var_58]"], [20, "mov rax, [rax]"], [21, "mov rcx, [rax+10h]"], [22, "lea rdx, [rbp+s]"], [23, "mov rax, [rbp+var_58]"], [24, "mov rsi, rdx"], [25, "mov rdi, rax"], [26, "call rcx"], [27, "test eax, eax"], [28, "jnz short loc_40780C"], [29, "mov eax, 0FFFFFFFFh"], [30, "jmp short locret_407811"], [31, "mov eax, 0"], [32, "leave"], [33, "retn"]], "data_dep": [[9, 6], [12, 3], [13, 12], [14, 5], [15, 14], [16, 15], [17, 16], [18, 17], [19, 5], [20, 19], [21, 20], [22, 11], [22, 7], [23, 5], [24, 22], [25, 23], [26, 21], [27, 26], [28, 27], [33, 29], [33, 31]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/03c200181d5bd9d9aef7e21f9916a04779b98f82f54c02e756e7d6abb15fdf67_03c200181d5bd9d9aef7e21f9916a04779b98f82f54c02e756e7d6abb15fdf67.jsonl.gz", "strip_func_name": "sub_40779D", "query": "\n\n\n__int64 __fastcall sub_40779D(__int64 a1, __int64 a2, __int64 a3)\n{\n__int64 result; // rax\nint s; // [rsp+20h] [rbp-40h] BYREF\n__int64 v6; // [rsp+28h] [rbp-38h]\n\nmemset(&s, 0, 0x40uLL);\ns = 5;\nv6 = a1;\nif ( !*(_QWORD *)(*(_QWORD *)a3 + 16LL)\n|| (*(unsigned int (__fastcall **)(__int64, int *))(*(_QWORD *)a3 + 16LL))(a3, &s) )\n{\nresult = 0LL;\n}\nelse\n{\nresult = 0xFFFFFFFFLL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,s,sub_40779D,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'ui', 'a1': 'str', 'a2': 'len', 's': 'uis', 'sub_40779D': 'print_error'}"}
get_prop
799e6b75a8571511ab0fd04348389f6c13cecbb53dc805d18143c39358d68836
ValveSoftware
steamos-compositor
NA
static unsigned int get_prop(Display *dpy, Window win, Atom prop, unsigned int def) { Atom actual; int format; unsigned long n, left; unsigned char *data; int result = XGetWindowProperty(dpy, win, prop, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, &data); if (result == Success && data != NULL) { unsigned int i; memcpy (&i, data, sizeof (unsigned int)); XFree( (void *) data); return i; } return def; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4067C2", "function_addr": 4220866, "binary_name": "799e6b75a8571511ab0fd04348389f6c13cecbb53dc805d18143c39358d68836.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 60h"], [3, "mov [rbp+var_48], rdi"], [4, "mov [rbp+var_50], rsi"], [5, "mov [rbp+var_58], rdx"], [6, "mov [rbp+var_5C], ecx"], [7, "mov rdx, [rbp+var_58]"], [8, "mov rsi, [rbp+var_50]"], [9, "mov rax, [rbp+var_48]"], [10, "lea rcx, [rbp+var_30]"], [11, "push rcx"], [12, "lea rcx, [rbp+var_28]"], [13, "push rcx"], [14, "lea rcx, [rbp+var_20]"], [15, "push rcx"], [16, "lea rcx, [rbp+var_14]"], [17, "push rcx"], [18, "lea rcx, [rbp+var_10]"], [19, "push rcx"], [20, "push 6"], [21, "mov r9d, 0"], [22, "mov r8d, 1"], [23, "mov ecx, 0"], [24, "mov rdi, rax"], [25, "call _XGetWindowProperty"], [26, "add rsp, 30h"], [27, "mov [rbp+var_4], eax"], [28, "cmp [rbp+var_4], 0"], [29, "jnz short loc_406849"], [30, "mov rax, [rbp+var_30]"], [31, "test rax, rax"], [32, "jz short loc_406849"], [33, "mov rax, [rbp+var_30]"], [34, "mov eax, [rax]"], [35, "mov [rbp+var_34], eax"], [36, "mov rax, [rbp+var_30]"], [37, "mov rdi, rax"], [38, "call _XFree"], [39, "mov eax, [rbp+var_34]"], [40, "jmp short locret_40684C"], [41, "mov eax, [rbp+var_5C]"], [42, "leave"], [43, "retn"]], "data_dep": [[7, 5], [8, 4], [9, 3], [11, 10], [12, 10], [13, 12], [14, 12], [15, 14], [16, 14], [17, 16], [18, 16], [19, 18], [24, 9], [26, 2], [27, 25], [28, 27], [29, 28], [31, 30], [32, 31], [34, 33], [35, 34], [37, 36], [39, 35], [41, 6], [43, 39], [43, 41]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/799e6b75a8571511ab0fd04348389f6c13cecbb53dc805d18143c39358d68836_799e6b75a8571511ab0fd04348389f6c13cecbb53dc805d18143c39358d68836.jsonl.gz", "strip_func_name": "sub_4067C2", "query": "\n\n\n__int64 __fastcall sub_4067C2(Display *a1, Window a2, Atom a3, unsigned int a4)\n{\nunsigned int v6; // [rsp+2Ch] [rbp-34h]\nunsigned __int8 *v7; // [rsp+30h] [rbp-30h] BYREF\nunsigned __int64 v8; // [rsp+38h] [rbp-28h] BYREF\nunsigned __int64 v9; // [rsp+40h] [rbp-20h] BYREF\nint v10; // [rsp+4Ch] [rbp-14h] BYREF\nAtom v11; // [rsp+50h] [rbp-10h] BYREF\nint v12; // [rsp+5Ch] [rbp-4h]\n\nv12 = XGetWindowProperty(a1, a2, a3, 0LL, 1LL, 0, 6uLL, &v11, &v10, &v9, &v8, &v7);\nif ( v12 || !v7 )\nreturn a4;\nv6 = *(_DWORD *)v7;\nXFree(v7);\nreturn v6;\n}\n\n\n\nQ:[a3,a4,a1,a2,v7,v8,v9,v10,v11,v12,sub_4067C2,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'prop', 'a4': 'def', 'a1': 'dpy', 'a2': 'win', 'v7': 'data', 'v8': 'left', 'v9': 'n', 'v10': 'format', 'v11': 'actual', 'v12': 'result', 'sub_4067C2': 'get_prop'}"}
gap_security_level
4f50d4a61abfbd8c407aba68361e53a458c52f761b528ded37cf6ddc166819b1
micropython
micropython-unicorn
NA
gap_security_level_t gap_security_level(hci_con_handle_t con_handle){ hci_connection_t * connection = hci_connection_for_handle(con_handle); if (!connection) return LEVEL_0; return gap_security_level_for_connection(connection); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4176E1", "function_addr": 4290273, "binary_name": "4f50d4a61abfbd8c407aba68361e53a458c52f761b528ded37cf6ddc166819b1.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov eax, edi"], [4, "mov [rbp+var_14], ax"], [5, "movzx eax, [rbp+var_14]"], [6, "mov edi, eax"], [7, "call sub_40DF56"], [8, "mov [rbp+var_8], rax"], [9, "cmp [rbp+var_8], 0"], [10, "jnz short loc_41770C"], [11, "mov eax, 0"], [12, "jmp short locret_417718"], [13, "mov rax, [rbp+var_8]"], [14, "mov rdi, rax"], [15, "call sub_417478"], [16, "leave"], [17, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [8, 7], [9, 8], [10, 9], [13, 8], [14, 13], [17, 15], [17, 11]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/4f50d4a61abfbd8c407aba68361e53a458c52f761b528ded37cf6ddc166819b1_4f50d4a61abfbd8c407aba68361e53a458c52f761b528ded37cf6ddc166819b1.jsonl.gz", "strip_func_name": "sub_4176E1", "query": "\n\n\n__int64 __fastcall sub_4176E1(__int16 a1)\n{\n__int64 result; // rax\n__int64 v2; // [rsp+18h] [rbp-8h]\n\nv2 = sub_40DF56(a1);\nif ( v2 )\nresult = sub_417478(v2);\nelse\nresult = 0LL;\nreturn result;\n}\n\n\n\nQ:[a1,v2,sub_4176E1,sub_40DF56,sub_417478,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'con_handle', 'v2': 'connection', 'sub_4176E1': 'gap_security_level', 'sub_40DF56': 'hci_connection_for_handle', 'sub_417478': 'gap_security_level_for_connection'}"}
net_receive
582f982c59fc8593699262daf0c0d9e85e1b7a2853b8c1412673625abfbd977e
MagerValp
CGTerm
NA
signed int net_receive(void) { if (!ISCONNECTED()) { return(-2); } if (!buflen) { buflen = recv(conn, buffer, BUFSIZE, 0); if (buflen == 0) { net_disconnect(); return(-2); } else if (buflen < 0) { buflen = 0; if (WOULDBLOCK()) { return(-1); } else { if (net_status) net_status(2, strerror(errno)); net_disconnect(); return(-2); } } bufptr = buffer; } --buflen; return(*bufptr++); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4052A4", "function_addr": 4215460, "binary_name": "582f982c59fc8593699262daf0c0d9e85e1b7a2853b8c1412673625abfbd977e.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 8"], [4, "mov eax, cs:fd"], [5, "cmp eax, 0FFFFFFFFh"], [6, "jnz short loc_4052C2"], [7, "mov eax, 0FFFFFFFEh"], [8, "jmp loc_40539B"], [9, "mov eax, cs:dword_41B388"], [10, "test eax, eax"], [11, "jnz loc_405374"], [12, "mov eax, cs:fd"], [13, "mov ecx, 0"], [14, "mov edx, 400h"], [15, "mov esi, offset unk_41AF80"], [16, "mov edi, eax"], [17, "call _recv"], [18, "mov cs:dword_41B388, eax"], [19, "mov eax, cs:dword_41B388"], [20, "test eax, eax"], [21, "jnz short loc_40530B"], [22, "call sub_40540D"], [23, "mov eax, 0FFFFFFFEh"], [24, "jmp loc_40539B"], [25, "mov eax, cs:dword_41B388"], [26, "test eax, eax"], [27, "jns short loc_405369"], [28, "mov cs:dword_41B388, 0"], [29, "call ___errno_location"], [30, "mov eax, [rax]"], [31, "cmp eax, 0Bh"], [32, "jnz short loc_405332"], [33, "mov eax, 0FFFFFFFFh"], [34, "jmp short loc_40539B"], [35, "mov rax, cs:qword_41B390"], [36, "test rax, rax"], [37, "jz short loc_40535D"], [38, "mov rbx, cs:qword_41B390"], [39, "call ___errno_location"], [40, "mov eax, [rax]"], [41, "mov edi, eax"], [42, "call _strerror"], [43, "mov rsi, rax"], [44, "mov edi, 2"], [45, "call rbx "], [46, "call sub_40540D"], [47, "mov eax, 0FFFFFFFEh"], [48, "jmp short loc_40539B"], [49, "mov cs:qword_41B380, offset unk_41AF80"], [50, "mov eax, cs:dword_41B388"], [51, "sub eax, 1"], [52, "mov cs:dword_41B388, eax"], [53, "mov rax, cs:qword_41B380"], [54, "lea rdx, [rax+1]"], [55, "mov cs:qword_41B380, rdx"], [56, "movzx eax, byte ptr [rax]"], [57, "movzx eax, al"], [58, "mov rbx, [rbp+var_8]"], [59, "leave"], [60, "retn"]], "data_dep": [[5, 4], [6, 5], [10, 9], [11, 10], [16, 12], [18, 17], [19, 18], [20, 19], [21, 20], [25, 18], [26, 25], [27, 26], [30, 29], [31, 30], [32, 31], [36, 35], [37, 36], [40, 39], [41, 40], [43, 42], [45, 38], [50, 18], [51, 50], [52, 51], [53, 49], [54, 14], [54, 53], [55, 54], [56, 53], [57, 56], [60, 47], [60, 7], [60, 33], [60, 57], [60, 23]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/582f982c59fc8593699262daf0c0d9e85e1b7a2853b8c1412673625abfbd977e_582f982c59fc8593699262daf0c0d9e85e1b7a2853b8c1412673625abfbd977e.jsonl.gz", "strip_func_name": "sub_4052A4", "query": "\n\n\n__int64 sub_4052A4()\n{\nvoid (__fastcall *v1)(__int64, char *); // rbx\nint *v2; // rax\nchar *v3; // rax\nunsigned __int8 *v4; // rax\n\nif ( fd == -1 )\nreturn 4294967294LL;\nif ( dword_41B388 )\ngoto LABEL_13;\ndword_41B388 = recv(fd, &unk_41AF80, 0x400uLL, 0);\nif ( !dword_41B388 )\n{\nLABEL_5:\nsub_40540D();\nreturn 4294967294LL;\n}\nif ( dword_41B388 >= 0 )\n{\nqword_41B380 = (__int64)&unk_41AF80;\nLABEL_13:\n--dword_41B388;\nv4 = (unsigned __int8 *)qword_41B380++;\nreturn *v4;\n}\ndword_41B388 = 0;\nif ( *__errno_location() != 11 )\n{\nif ( qword_41B390 )\n{\nv1 = (void (__fastcall *)(__int64, char *))qword_41B390;\nv2 = __errno_location();\nv3 = strerror(*v2);\nv1(2LL, v3);\n}\ngoto LABEL_5;\n}\nreturn 0xFFFFFFFFLL;\n}\n\n\n\nQ:[sub_4052A4,sub_40540D,]\nAssistant: ", "hints": "[]", "response": "{'sub_4052A4': 'net_receive', 'sub_40540D': 'net_disconnect'}"}
timerqueue_delete
84c68e63a0b4b842f0b8fdacbffaff77aec527268373db3f6af9b80b1a32ee43
Tarsnap
kivaloo
NA
void timerqueue_delete(struct timerqueue * Q, void * cookie) { struct timerrec * r = cookie; /* Remove the record from the heap. */ ptrheap_delete(Q->H, r->rc); /* Free the record. */ free(r); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4135AC", "function_addr": 4273580, "binary_name": "84c68e63a0b4b842f0b8fdacbffaff77aec527268373db3f6af9b80b1a32ee43.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov rax, [rbp+var_20]"], [6, "mov [rbp+ptr], rax"], [7, "mov rax, [rbp+ptr]"], [8, "mov rdx, [rax+10h]"], [9, "mov rax, [rbp+var_18]"], [10, "mov rax, [rax]"], [11, "mov rsi, rdx"], [12, "mov rdi, rax"], [13, "call sub_4151CD"], [14, "mov rax, [rbp+ptr]"], [15, "mov rdi, rax"], [16, "call _free"], [17, "nop"], [18, "leave"], [19, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [8, 7], [9, 3], [10, 9], [11, 8], [12, 10], [14, 6], [15, 14], [19, 16]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/84c68e63a0b4b842f0b8fdacbffaff77aec527268373db3f6af9b80b1a32ee43_84c68e63a0b4b842f0b8fdacbffaff77aec527268373db3f6af9b80b1a32ee43.jsonl.gz", "strip_func_name": "sub_4135AC", "query": "\n\n\nvoid __fastcall sub_4135AC(_QWORD *a1, _QWORD *a2)\n{\nsub_4151CD(*a1, a2[2]);\nfree(a2);\n}\n\n\n\nQ:[a1,a2,sub_4135AC,sub_4151CD,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'Q', 'a2': 'cookie', 'sub_4135AC': 'timerqueue_delete', 'sub_4151CD': 'ptrheap_delete'}"}
ucg_dev_ili9341_18x240x320
601bbf0a3c8af2b2ed9b72c83eea51f15b606cb2973e6cbbce20f33cb84f643f
olikraus
ucglib
NA
ucg_int_t ucg_dev_ili9341_18x240x320(ucg_t *ucg, ucg_int_t msg, void *data) { switch(msg) { case UCG_MSG_DEV_POWER_UP: /* 1. Call to the controller procedures to setup the com interface */ if ( ucg_dev_ic_ili9341_18(ucg, msg, data) == 0 ) return 0; /* 2. Send specific init sequence for this display module */ ucg_com_SendCmdSeq(ucg, ucg_tft_240x320_ili9341_init_seq); return 1; case UCG_MSG_DEV_POWER_DOWN: /* let do power down by the conroller procedures */ return ucg_dev_ic_ili9341_18(ucg, msg, data); case UCG_MSG_GET_DIMENSION: ((ucg_wh_t *)data)->w = 240; ((ucg_wh_t *)data)->h = 320; return 1; } /* all other messages are handled by the controller procedures */ return ucg_dev_ic_ili9341_18(ucg, msg, data); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40805D", "function_addr": 4227165, "binary_name": "601bbf0a3c8af2b2ed9b72c83eea51f15b606cb2973e6cbbce20f33cb84f643f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], rdi"], [4, "mov eax, esi"], [5, "mov [rbp+var_18], rdx"], [6, "mov [rbp+var_C], ax"], [7, "movsx eax, [rbp+var_C]"], [8, "cmp eax, 0Fh"], [9, "jz short loc_4080DF"], [10, "cmp eax, 0Fh"], [11, "jg short loc_4080F9"], [12, "cmp eax, 0Ah"], [13, "jz short loc_40808D"], [14, "cmp eax, 0Bh"], [15, "jz short loc_4080C7"], [16, "jmp short loc_4080F9"], [17, "movsx ecx, [rbp+var_C]"], [18, "mov rdx, [rbp+var_18]"], [19, "mov rax, [rbp+var_8]"], [20, "mov esi, ecx"], [21, "mov rdi, rax"], [22, "call sub_4051A1"], [23, "test ax, ax"], [24, "jnz short loc_4080AF"], [25, "mov eax, 0"], [26, "jmp short locret_40810F"], [27, "mov rax, [rbp+var_8]"], [28, "mov esi, offset unk_40D340"], [29, "mov rdi, rax"], [30, "call sub_402D99"], [31, "mov eax, 1"], [32, "jmp short locret_40810F"], [33, "movsx ecx, [rbp+var_C]"], [34, "mov rdx, [rbp+var_18]"], [35, "mov rax, [rbp+var_8]"], [36, "mov esi, ecx"], [37, "mov rdi, rax"], [38, "call sub_4051A1"], [39, "jmp short locret_40810F"], [40, "mov rax, [rbp+var_18]"], [41, "mov word ptr [rax], 0F0h"], [42, "mov rax, [rbp+var_18]"], [43, "mov word ptr [rax+2], 140h"], [44, "mov eax, 1"], [45, "jmp short locret_40810F"], [46, "movsx ecx, [rbp+var_C]"], [47, "mov rdx, [rbp+var_18]"], [48, "mov rax, [rbp+var_8]"], [49, "mov esi, ecx"], [50, "mov rdi, rax"], [51, "call sub_4051A1"], [52, "leave"], [53, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 7], [9, 8], [10, 7], [11, 10], [12, 7], [13, 12], [14, 7], [15, 14], [17, 6], [18, 5], [19, 3], [20, 17], [21, 19], [23, 22], [24, 23], [27, 3], [29, 27], [33, 6], [34, 5], [35, 3], [36, 33], [37, 35], [40, 5], [41, 40], [42, 5], [43, 42], [46, 6], [47, 5], [48, 3], [49, 46], [50, 48], [53, 38], [53, 44], [53, 25], [53, 31], [53, 51]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/601bbf0a3c8af2b2ed9b72c83eea51f15b606cb2973e6cbbce20f33cb84f643f_601bbf0a3c8af2b2ed9b72c83eea51f15b606cb2973e6cbbce20f33cb84f643f.jsonl.gz", "strip_func_name": "sub_40805D", "query": "\n\n\n__int64 __fastcall sub_40805D(__int64 a1, __int16 a2, _WORD *a3)\n{\n__int64 result; // rax\n\nif ( a2 == 15 )\n{\n*a3 = 240;\na3[1] = 320;\nresult = 1LL;\n}\nelse if ( a2 <= 15 && a2 == 10 )\n{\nif ( (unsigned __int16)sub_4051A1(a1, a2, (__int64)a3) )\n{\nsub_402D99(a1, byte_40D340);\nresult = 1LL;\n}\nelse\n{\nresult = 0LL;\n}\n}\nelse\n{\nresult = sub_4051A1(a1, a2, (__int64)a3);\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_40805D,sub_4051A1,sub_402D99,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'data', 'a1': 'ucg', 'a2': 'msg', 'sub_40805D': 'ucg_dev_ili9341_18x240x320', 'sub_4051A1': 'ucg_dev_ic_ili9341_18', 'sub_402D99': 'ucg_com_SendCmdSeq'}"}
yyget_debug
07dd222079148daa15fb0ceac0bdaec5d545a3715bac9918bee8eb5d2463d62a
hanwckf
immortalwrt-mt798x
NA
int yyget_debug (void) { return yy_flex_debug; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40B5FD", "function_addr": 4240893, "binary_name": "07dd222079148daa15fb0ceac0bdaec5d545a3715bac9918bee8eb5d2463d62a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, cs:dword_424928"], [3, "pop rbp"], [4, "retn"]], "data_dep": [[3, 0], [4, 2]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/07dd222079148daa15fb0ceac0bdaec5d545a3715bac9918bee8eb5d2463d62a_07dd222079148daa15fb0ceac0bdaec5d545a3715bac9918bee8eb5d2463d62a.jsonl.gz", "strip_func_name": "sub_40B5FD", "query": "\n\n\n__int64 sub_40B5FD()\n{\nreturn (unsigned int)dword_424928;\n}\n\n\n\nQ:[sub_40B5FD,]\nAssistant: ", "hints": "[]", "response": "{'sub_40B5FD': 'yyget_debug'}"}
ZSTD_checkCParams
2f91978c4963d9d742b336bb9bf6c83ff51c5a97f2b6e1fd1fbd2d6ab517b224
dimkr
szl
NA
size_t ZSTD_checkCParams(ZSTD_compressionParameters cParams) { # define CLAMPCHECK(val,min,max) { if ((val<min) | (val>max)) return ERROR(compressionParameter_unsupported); } CLAMPCHECK(cParams.windowLog, ZSTD_WINDOWLOG_MIN, ZSTD_WINDOWLOG_MAX); CLAMPCHECK(cParams.chainLog, ZSTD_CHAINLOG_MIN, ZSTD_CHAINLOG_MAX); CLAMPCHECK(cParams.hashLog, ZSTD_HASHLOG_MIN, ZSTD_HASHLOG_MAX); CLAMPCHECK(cParams.searchLog, ZSTD_SEARCHLOG_MIN, ZSTD_SEARCHLOG_MAX); { U32 const searchLengthMin = ((cParams.strategy == ZSTD_fast) | (cParams.strategy == ZSTD_greedy)) ? ZSTD_SEARCHLENGTH_MIN+1 : ZSTD_SEARCHLENGTH_MIN; U32 const searchLengthMax = (cParams.strategy == ZSTD_fast) ? ZSTD_SEARCHLENGTH_MAX : ZSTD_SEARCHLENGTH_MAX-1; CLAMPCHECK(cParams.searchLength, searchLengthMin, searchLengthMax); } CLAMPCHECK(cParams.targetLength, ZSTD_TARGETLENGTH_MIN, ZSTD_TARGETLENGTH_MAX); if ((U32)(cParams.strategy) > (U32)ZSTD_btopt2) return ERROR(compressionParameter_unsupported); return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4143CC", "function_addr": 4277196, "binary_name": "2f91978c4963d9d742b336bb9bf6c83ff51c5a97f2b6e1fd1fbd2d6ab517b224.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r12"], [3, "push rbx"], [4, "sub rsp, 10h"], [5, "mov eax, [rbp+arg_0]"], [6, "cmp eax, 9"], [7, "setbe r12b"], [8, "mov ebx, [rbp+arg_0]"], [9, "call sub_4138F5"], [10, "test eax, eax"], [11, "jz short loc_4143F4"], [12, "mov eax, 19h"], [13, "jmp short loc_4143F9"], [14, "mov eax, 1Bh"], [15, "cmp eax, ebx"], [16, "setb al"], [17, "or eax, r12d"], [18, "test al, al"], [19, "jz short loc_414411"], [20, "mov rax, 0FFFFFFFFFFFFFFF8h"], [21, "jmp loc_414554"], [22, "mov eax, [rbp+arg_4]"], [23, "cmp eax, 5"], [24, "setbe r12b"], [25, "mov ebx, [rbp+arg_4]"], [26, "call sub_4138F5"], [27, "test eax, eax"], [28, "jz short loc_41442E"], [29, "mov eax, 1Ah"], [30, "jmp short loc_414433"], [31, "mov eax, 1Ch"], [32, "cmp eax, ebx"], [33, "setb al"], [34, "or eax, r12d"], [35, "test al, al"], [36, "jz short loc_41444B"], [37, "mov rax, 0FFFFFFFFFFFFFFF8h"], [38, "jmp loc_414554"], [39, "mov eax, [rbp+arg_8]"], [40, "cmp eax, 5"], [41, "setbe r12b"], [42, "mov ebx, [rbp+arg_8]"], [43, "call sub_4138F5"], [44, "test eax, eax"], [45, "jz short loc_414468"], [46, "mov eax, 19h"], [47, "jmp short loc_41446D"], [48, "mov eax, 1Bh"], [49, "cmp eax, ebx"], [50, "setb al"], [51, "or eax, r12d"], [52, "test al, al"], [53, "jz short loc_414485"], [54, "mov rax, 0FFFFFFFFFFFFFFF8h"], [55, "jmp loc_414554"], [56, "mov eax, [rbp+arg_C]"], [57, "test eax, eax"], [58, "setz r12b"], [59, "mov ebx, [rbp+arg_C]"], [60, "call sub_4138F5"], [61, "test eax, eax"], [62, "jz short loc_4144A1"], [63, "mov eax, 18h"], [64, "jmp short loc_4144A6"], [65, "mov eax, 1Ah"], [66, "cmp eax, ebx"], [67, "setb al"], [68, "or eax, r12d"], [69, "test al, al"], [70, "jz short loc_4144BE"], [71, "mov rax, 0FFFFFFFFFFFFFFF8h"], [72, "jmp loc_414554"], [73, "mov eax, [rbp+arg_18]"], [74, "test eax, eax"], [75, "setz dl"], [76, "mov eax, [rbp+arg_18]"], [77, "cmp eax, 2"], [78, "setz al"], [79, "or eax, edx"], [80, "test al, al"], [81, "jz short loc_4144DC"], [82, "mov eax, 4"], [83, "jmp short loc_4144E1"], [84, "mov eax, 3"], [85, "mov [rbp+var_14], eax"], [86, "mov eax, [rbp+arg_18]"], [87, "test eax, eax"], [88, "jnz short loc_4144F2"], [89, "mov eax, 7"], [90, "jmp short loc_4144F7"], [91, "mov eax, 6"], [92, "mov [rbp+var_18], eax"], [93, "mov eax, [rbp+arg_10]"], [94, "cmp [rbp+var_14], eax"], [95, "setnbe dl"], [96, "mov eax, [rbp+arg_10]"], [97, "cmp [rbp+var_18], eax"], [98, "setb al"], [99, "or eax, edx"], [100, "test al, al"], [101, "jz short loc_41451B"], [102, "mov rax, 0FFFFFFFFFFFFFFF8h"], [103, "jmp short loc_414554"], [104, "mov eax, [rbp+arg_14]"], [105, "cmp eax, 3"], [106, "setbe dl"], [107, "mov eax, [rbp+arg_14]"], [108, "cmp eax, 3E7h"], [109, "setnbe al"], [110, "or eax, edx"], [111, "test al, al"], [112, "jz short loc_41453E"], [113, "mov rax, 0FFFFFFFFFFFFFFF8h"], [114, "jmp short loc_414554"], [115, "mov eax, [rbp+arg_18]"], [116, "cmp eax, 7"], [117, "jbe short loc_41454F"], [118, "mov rax, 0FFFFFFFFFFFFFFF8h"], [119, "jmp short loc_414554"], [120, "mov eax, 0"], [121, "add rsp, 10h"], [122, "pop rbx"], [123, "pop r12"], [124, "pop rbp"], [125, "retn"]], "data_dep": [[6, 5], [7, 6], [10, 9], [11, 10], [15, 14], [15, 8], [15, 12], [16, 15], [16, 12], [16, 14], [17, 7], [17, 16], [18, 17], [19, 18], [23, 22], [24, 23], [24, 7], [27, 26], [28, 27], [32, 25], [32, 29], [32, 31], [33, 29], [33, 31], [33, 32], [34, 24], [34, 33], [35, 34], [36, 35], [40, 39], [41, 40], [41, 24], [44, 43], [45, 44], [49, 46], [49, 48], [49, 42], [50, 49], [50, 46], [50, 48], [51, 50], [51, 41], [52, 51], [53, 52], [57, 56], [58, 57], [58, 41], [61, 60], [62, 61], [66, 59], [66, 63], [66, 65], [67, 63], [67, 65], [67, 66], [68, 58], [68, 67], [69, 68], [70, 69], [74, 73], [75, 74], [77, 76], [78, 77], [78, 76], [79, 78], [79, 75], [80, 79], [81, 80], [85, 82], [85, 84], [87, 86], [88, 87], [92, 89], [92, 91], [94, 85], [94, 93], [95, 75], [95, 94], [97, 92], [97, 96], [98, 96], [98, 97], [99, 95], [99, 98], [100, 99], [101, 100], [104, 85], [105, 104], [106, 95], [106, 105], [107, 85], [108, 107], [109, 108], [109, 107], [110, 109], [110, 106], [111, 110], [112, 111], [115, 92], [116, 115], [117, 116], [121, 4], [122, 3], [123, 2], [124, 0], [125, 20], [125, 54], [125, 118], [125, 102], [125, 120], [125, 113], [125, 37], [125, 71]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/2f91978c4963d9d742b336bb9bf6c83ff51c5a97f2b6e1fd1fbd2d6ab517b224_2f91978c4963d9d742b336bb9bf6c83ff51c5a97f2b6e1fd1fbd2d6ab517b224.jsonl.gz", "strip_func_name": "sub_4143CC", "query": "\n\n\n__int64 __fastcall sub_4143CC(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, __int64 a7, __int64 a8, __int64 a9, unsigned int a10)\n{\nunsigned int v10; // eax\nunsigned int v12; // eax\nunsigned int v13; // eax\nunsigned int v14; // eax\nint v15; // eax\nunsigned int v16; // eax\nunsigned int v17; // [rsp+Ch] [rbp-14h]\n\nif ( (unsigned int)sub_4138F5() )\nv10 = 25;\nelse\nv10 = 27;\nif ( (unsigned int)a7 <= 9 || v10 < (unsigned int)a7 )\nreturn -8LL;\nif ( (unsigned int)sub_4138F5() )\nv12 = 26;\nelse\nv12 = 28;\nif ( HIDWORD(a7) <= 5 || v12 < HIDWORD(a7) )\nreturn -8LL;\nif ( (unsigned int)sub_4138F5() )\nv13 = 25;\nelse\nv13 = 27;\nif ( (unsigned int)a8 <= 5 || v13 < (unsigned int)a8 )\nreturn -8LL;\nif ( (unsigned int)sub_4138F5() )\nv14 = 24;\nelse\nv14 = 26;\nif ( HIDWORD(a8) == 0 || v14 < HIDWORD(a8) )\nreturn -8LL;\nif ( a10 == 0 || a10 == 2 )\nv15 = 4;\nelse\nv15 = 3;\nv17 = v15;\nif ( a10 )\nv16 = 6;\nelse\nv16 = 7;\nif ( v17 > (unsigned int)a9 || v16 < (unsigned int)a9 )\nreturn -8LL;\nif ( HIDWORD(a9) <= 3 || HIDWORD(a9) > 0x3E7 )\nreturn -8LL;\nif ( a10 <= 7 )\nreturn 0LL;\nreturn -8LL;\n}\n\n\n\nQ:[a7,v17,sub_4143CC,sub_4138F5,]\nAssistant: ", "hints": "[]", "response": "{'a7': 'cParams', 'v17': 'searchLengthMin', 'sub_4143CC': 'ZSTD_checkCParams', 'sub_4138F5': 'MEM_32bits'}"}
zpl_time_rel_ms
ad2904313f7d3a0c80f51b09ff645152589d2f2362a5acffb02170d4bcf28522
zpl-c
zpl
NA
zpl_u64 zpl_time_rel_ms(void) { # if defined(ZPL_SYSTEM_OSX) zpl_u64 result; zpl_local_persist zpl_u64 timebase = 0; zpl_local_persist zpl_u64 timestart = 0; if (!timestart) { mach_timebase_info_data_t tb = { 0 }; mach_timebase_info(&tb); timebase = tb.numer; timebase /= tb.denom; timestart = mach_absolute_time(); } // NOTE: mach_absolute_time() returns things in nanoseconds result = 1.0e-6 * (mach_absolute_time() - timestart) * timebase; return result; # else zpl_local_persist zpl_u64 unix_timestart = 0.0; if (!unix_timestart) { unix_timestart = zpl__unix_gettime( ); } zpl_u64 now = zpl__unix_gettime( ); return (now - unix_timestart); # endif }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40B778", "function_addr": 4241272, "binary_name": "ad2904313f7d3a0c80f51b09ff645152589d2f2362a5acffb02170d4bcf28522.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov rax, cs:qword_419460"], [4, "test rax, rax"], [5, "jnz short loc_40B798"], [6, "call sub_40B6E8"], [7, "mov cs:qword_419460, rax"], [8, "call sub_40B6E8"], [9, "mov [rbp+var_8], rax"], [10, "mov rdx, cs:qword_419460"], [11, "mov rax, [rbp+var_8]"], [12, "sub rax, rdx"], [13, "leave"], [14, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [9, 8], [10, 7], [11, 9], [12, 10], [12, 11], [14, 12]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/ad2904313f7d3a0c80f51b09ff645152589d2f2362a5acffb02170d4bcf28522_ad2904313f7d3a0c80f51b09ff645152589d2f2362a5acffb02170d4bcf28522.jsonl.gz", "strip_func_name": "sub_40B778", "query": "\n\n\nunsigned __int64 sub_40B778()\n{\nif ( !qword_419460 )\nqword_419460 = sub_40B6E8();\nreturn sub_40B6E8() - qword_419460;\n}\n\n\n\nQ:[sub_40B778,sub_40B6E8,]\nAssistant: ", "hints": "[]", "response": "{'sub_40B778': 'zpl_time_rel_ms', 'sub_40B6E8': 'zpl__unix_gettime'}"}
cpu_is_not_present
88b297ed3b6e932b99641b5620aeec3cd941b4e06cb37924289772eefa3de8b7
trailofbits
ebpf-verifier
NA
int cpu_is_not_present(int cpu) { return !CPU_ISSET_S(cpu, cpu_present_setsize, cpu_present_set); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4026E7", "function_addr": 4204263, "binary_name": "88b297ed3b6e932b99641b5620aeec3cd941b4e06cb37924289772eefa3de8b7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_14], edi"], [3, "mov eax, [rbp+var_14]"], [4, "cdqe"], [5, "mov [rbp+var_8], rax"], [6, "mov rax, [rbp+var_8]"], [7, "shr rax, 3"], [8, "mov rdx, rax"], [9, "mov rax, cs:n"], [10, "cmp rdx, rax"], [11, "jnb short loc_402748"], [12, "mov rax, cs:s"], [13, "mov rdx, rax"], [14, "mov rax, [rbp+var_8]"], [15, "shr rax, 6"], [16, "shl rax, 3"], [17, "add rax, rdx"], [18, "mov rdx, [rax]"], [19, "mov rax, [rbp+var_8]"], [20, "and eax, 3Fh"], [21, "mov ecx, eax"], [22, "shr rdx, cl"], [23, "mov rax, rdx"], [24, "and eax, 1"], [25, "test rax, rax"], [26, "jz short loc_402748"], [27, "mov eax, 1"], [28, "jmp short loc_40274D"], [29, "mov eax, 0"], [30, "test eax, eax"], [31, "setz al"], [32, "movzx eax, al"], [33, "pop rbp"], [34, "retn"]], "data_dep": [[3, 2], [5, 3], [6, 5], [7, 6], [8, 7], [10, 9], [10, 8], [11, 10], [13, 12], [14, 5], [15, 14], [16, 15], [17, 16], [17, 13], [18, 17], [19, 5], [20, 19], [21, 20], [22, 18], [22, 21], [23, 22], [24, 23], [25, 24], [26, 25], [30, 27], [30, 29], [31, 30], [32, 31], [33, 0], [34, 32]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/88b297ed3b6e932b99641b5620aeec3cd941b4e06cb37924289772eefa3de8b7_88b297ed3b6e932b99641b5620aeec3cd941b4e06cb37924289772eefa3de8b7.jsonl.gz", "strip_func_name": "sub_4026E7", "query": "\n\n\n_BOOL8 __fastcall sub_4026E7(int a1)\n{\n_BOOL4 v1; // eax\n\nv1 = (unsigned __int64)a1 >> 3 < n && ((s->__bits[(unsigned __int64)a1 >> 6] >> (a1 & 0x3F)) & 1) != 0;\nreturn !v1;\n}\n\n\n\nQ:[a1,sub_4026E7,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'cpu', 'sub_4026E7': 'cpu_is_not_present'}"}
fcs16_crc
9861972866b8ccea0a5b33e64b5d5e1a71dd13da10d037c25b6e25d222407eb3
sj15712795029
bluetooth_stack
NA
uint16_t fcs16_crc(struct bt_pbuf_t *p, uint16_t len) { struct bt_pbuf_t *q; uint8_t i; uint8_t *payload; uint16_t fcs = INITFCS16; for(q = p; q != NULL && len > 0; q = q->next) { payload = q->payload; for(i = 0; len > 0 && i < q->len; ++i) { fcs = (fcs >> 8) ^ crc16table[(fcs ^ payload[i]) & 0xff]; --len; } } return fcs; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4152BC", "function_addr": 4281020, "binary_name": "9861972866b8ccea0a5b33e64b5d5e1a71dd13da10d037c25b6e25d222407eb3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_28], rdi"], [3, "mov eax, esi"], [4, "mov [rbp+var_2C], ax"], [5, "mov [rbp+var_C], 0FFFFh"], [6, "mov rax, [rbp+var_28]"], [7, "mov [rbp+var_8], rax"], [8, "jmp short loc_41534C"], [9, "mov rax, [rbp+var_8]"], [10, "mov rax, [rax+8]"], [11, "mov [rbp+var_18], rax"], [12, "mov [rbp+var_9], 0"], [13, "jmp short loc_415329"], [14, "movzx eax, [rbp+var_C]"], [15, "shr ax, 8"], [16, "mov esi, eax"], [17, "movzx edx, [rbp+var_C]"], [18, "movzx ecx, [rbp+var_9]"], [19, "mov rax, [rbp+var_18]"], [20, "add rax, rcx"], [21, "movzx eax, byte ptr [rax]"], [22, "movzx eax, al"], [23, "xor eax, edx"], [24, "movzx eax, al"], [25, "cdqe"], [26, "movzx eax, ds:word_447160[rax+rax]"], [27, "xor eax, esi"], [28, "mov [rbp+var_C], ax"], [29, "sub [rbp+var_2C], 1"], [30, "add [rbp+var_9], 1"], [31, "cmp [rbp+var_2C], 0"], [32, "jz short loc_415341"], [33, "movzx edx, [rbp+var_9]"], [34, "mov rax, [rbp+var_8]"], [35, "movzx eax, word ptr [rax+12h]"], [36, "cmp dx, ax"], [37, "jb short loc_4152EC"], [38, "mov rax, [rbp+var_8]"], [39, "mov rax, [rax]"], [40, "mov [rbp+var_8], rax"], [41, "cmp [rbp+var_8], 0"], [42, "jz short loc_41535A"], [43, "cmp [rbp+var_2C], 0"], [44, "jnz short loc_4152DA"], [45, "movzx eax, [rbp+var_C]"], [46, "pop rbp"], [47, "retn"]], "data_dep": [[4, 3], [6, 2], [7, 6], [9, 7], [9, 40], [10, 9], [11, 10], [14, 28], [14, 5], [15, 14], [16, 15], [17, 5], [17, 28], [18, 12], [18, 30], [19, 11], [20, 19], [20, 18], [21, 20], [22, 21], [23, 22], [23, 17], [24, 23], [27, 16], [27, 26], [28, 27], [29, 29], [29, 4], [30, 12], [30, 30], [31, 29], [31, 4], [32, 31], [33, 12], [33, 30], [34, 7], [34, 40], [35, 34], [36, 33], [36, 35], [37, 36], [38, 7], [38, 40], [39, 38], [40, 39], [41, 40], [41, 7], [42, 41], [43, 29], [43, 4], [44, 43], [45, 28], [45, 5], [46, 0], [47, 45]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/9861972866b8ccea0a5b33e64b5d5e1a71dd13da10d037c25b6e25d222407eb3_9861972866b8ccea0a5b33e64b5d5e1a71dd13da10d037c25b6e25d222407eb3.jsonl.gz", "strip_func_name": "sub_4152BC", "query": "\n\n\n__int64 __fastcall sub_4152BC(__int64 *a1, __int16 a2)\n{\nunsigned __int16 v4; // [rsp+20h] [rbp-Ch]\nunsigned __int8 i; // [rsp+23h] [rbp-9h]\n\nv4 = -1;\nwhile ( a1 && a2 )\n{\nfor ( i = 0; a2 && i < (unsigned int)*((_WORD *)a1 + 9); ++i )\n{\nv4 = HIBYTE(v4) ^ word_447160[(unsigned __int8)(v4 ^ *(_BYTE *)(i + a1[1]))];\n--a2;\n}\na1 = (__int64 *)*a1;\n}\nreturn v4;\n}\n\n\n\nQ:[a1,a2,v4,sub_4152BC,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'p', 'a2': 'len', 'v4': 'fcs', 'sub_4152BC': 'fcs16_crc'}"}
GB_audio_get_queue_length
276536b89cc3e58f9e6dd34cde9d9d4ba21328c5a859320d5e06460e1ec2c7de
LIJI32
SameBoy
NA
size_t GB_audio_get_queue_length(void) { if (unlikely(!driver)) return 0; return driver->audio_get_queue_length(); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_440E0B", "function_addr": 4460043, "binary_name": "276536b89cc3e58f9e6dd34cde9d9d4ba21328c5a859320d5e06460e1ec2c7de.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov rax, cs:qword_472F18"], [3, "test rax, rax"], [4, "setz al"], [5, "movzx eax, al"], [6, "test rax, rax"], [7, "jz short loc_440E2B"], [8, "mov eax, 0"], [9, "jmp short loc_440E38"], [10, "mov rax, cs:qword_472F18"], [11, "mov rax, [rax+20h]"], [12, "call rax"], [13, "pop rbp"], [14, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [11, 10], [12, 11], [13, 0], [14, 8], [14, 12]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/276536b89cc3e58f9e6dd34cde9d9d4ba21328c5a859320d5e06460e1ec2c7de_276536b89cc3e58f9e6dd34cde9d9d4ba21328c5a859320d5e06460e1ec2c7de.jsonl.gz", "strip_func_name": "sub_440E0B", "query": "\n\n\n__int64 sub_440E0B()\n{\n__int64 result; // rax\n\nif ( qword_472F18 )\nresult = (*(__int64 (**)(void))(qword_472F18 + 32))();\nelse\nresult = 0LL;\nreturn result;\n}\n\n\n\nQ:[sub_440E0B,]\nAssistant: ", "hints": "[]", "response": "{'sub_440E0B': 'GB_audio_get_queue_length'}"}
pj_grp_lock_tryacquire
a919fc39a5af9b1355a81d3146876c0fc5147fd6c16c81f57145538a5f7e2e46
asterisk
pjproject-archive
NA
PJ_DEF(pj_status_t) pj_grp_lock_tryacquire( pj_grp_lock_t *grp_lock) { return grp_lock_tryacquire(grp_lock); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43696F", "function_addr": 4417903, "binary_name": "a919fc39a5af9b1355a81d3146876c0fc5147fd6c16c81f57145538a5f7e2e46.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov rax, [rbp+var_8]"], [5, "mov rdi, rax"], [6, "call sub_436422"], [7, "leave"], [8, "retn"]], "data_dep": [[4, 3], [5, 4], [8, 6]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/a919fc39a5af9b1355a81d3146876c0fc5147fd6c16c81f57145538a5f7e2e46_a919fc39a5af9b1355a81d3146876c0fc5147fd6c16c81f57145538a5f7e2e46.jsonl.gz", "strip_func_name": "sub_43696F", "query": "\n\n\n__int64 __fastcall sub_43696F(__int64 a1)\n{\nreturn sub_436422(a1);\n}\n\n\n\nQ:[a1,sub_43696F,sub_436422,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'grp_lock', 'sub_43696F': 'pj_grp_lock_tryacquire', 'sub_436422': 'grp_lock_tryacquire'}"}
inet_addr_match_rta
866119e843c576da0d5be4aee49bcdefb830f4174c180740ed9987c1f137b153
multipath-tcp
iproute-mptcp
NA
int inet_addr_match_rta(const inet_prefix *m, const struct rtattr *rta) { inet_prefix dst; if (!rta || m->family == AF_UNSPEC || m->bitlen <= 0) return 0; if (get_addr_rta(&dst, rta, m->family)) return -1; return inet_addr_match(&dst, m, m->bitlen); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40DF31", "function_addr": 4251441, "binary_name": "866119e843c576da0d5be4aee49bcdefb830f4174c180740ed9987c1f137b153.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 120h"], [3, "mov [rbp+var_118], rdi"], [4, "mov [rbp+var_120], rsi"], [5, "cmp [rbp+var_120], 0"], [6, "jz short loc_40DF74"], [7, "mov rax, [rbp+var_118]"], [8, "movzx eax, word ptr [rax+6]"], [9, "test ax, ax"], [10, "jz short loc_40DF74"], [11, "mov rax, [rbp+var_118]"], [12, "movzx eax, word ptr [rax+4]"], [13, "test ax, ax"], [14, "jg short loc_40DF7B"], [15, "mov eax, 0"], [16, "jmp short locret_40DFD4"], [17, "mov rax, [rbp+var_118]"], [18, "movzx eax, word ptr [rax+6]"], [19, "movzx edx, ax"], [20, "mov rcx, [rbp+var_120]"], [21, "lea rax, [rbp+var_110]"], [22, "mov rsi, rcx"], [23, "mov rdi, rax"], [24, "call sub_40D94C"], [25, "test eax, eax"], [26, "jz short loc_40DFAD"], [27, "mov eax, 0FFFFFFFFh"], [28, "jmp short locret_40DFD4"], [29, "mov rax, [rbp+var_118]"], [30, "movzx eax, word ptr [rax+4]"], [31, "movsx edx, ax"], [32, "mov rcx, [rbp+var_118]"], [33, "lea rax, [rbp+var_110]"], [34, "mov rsi, rcx"], [35, "mov rdi, rax"], [36, "call sub_40DE5C"], [37, "leave"], [38, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 3], [8, 7], [9, 8], [10, 9], [11, 3], [12, 11], [13, 12], [14, 13], [17, 3], [18, 17], [19, 18], [20, 4], [21, 18], [22, 20], [23, 21], [25, 24], [26, 25], [29, 3], [30, 29], [31, 30], [32, 3], [33, 30], [34, 32], [35, 33], [38, 15], [38, 27], [38, 36]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/866119e843c576da0d5be4aee49bcdefb830f4174c180740ed9987c1f137b153_866119e843c576da0d5be4aee49bcdefb830f4174c180740ed9987c1f137b153.jsonl.gz", "strip_func_name": "sub_40DF31", "query": "\n\n\n__int64 __fastcall sub_40DF31(__int64 a1, __int64 a2)\n{\nchar v3[272]; // [rsp+10h] [rbp-110h] BYREF\n\nif ( !a2 || !*(_WORD *)(a1 + 6) || *(__int16 *)(a1 + 4) <= 0 )\nreturn 0LL;\nif ( (unsigned int)sub_40D94C((__int64)v3, a2, *(unsigned __int16 *)(a1 + 6)) )\nreturn 0xFFFFFFFFLL;\nreturn sub_40DE5C((__int64)v3, a1, *(__int16 *)(a1 + 4));\n}\n\n\n\nQ:[a1,a2,v3,sub_40DF31,sub_40D94C,sub_40DE5C,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'm', 'a2': 'rta', 'v3': 'dst', 'sub_40DF31': 'inet_addr_match_rta', 'sub_40D94C': 'get_addr_rta', 'sub_40DE5C': 'inet_addr_match'}"}
irish_UTF_8_stem
2eb83c415560a14c7931e6c8dcec619df0abbc7811f3da18932e1361a7ff0c7c
hthetiot
node-snowball
NA
extern int irish_UTF_8_stem(struct SN_env * z) { { int c1 = z->c; { int ret = r_initial_morph(z); if (ret < 0) return ret; } z->c = c1; } { int ret = r_mark_regions(z); if (ret < 0) return ret; } z->lb = z->c; z->c = z->l; { int m2 = z->l - z->c; (void)m2; { int ret = r_noun_sfx(z); if (ret < 0) return ret; } z->c = z->l - m2; } { int m3 = z->l - z->c; (void)m3; { int ret = r_deriv(z); if (ret < 0) return ret; } z->c = z->l - m3; } { int m4 = z->l - z->c; (void)m4; { int ret = r_verb_sfx(z); if (ret < 0) return ret; } z->c = z->l - m4; } z->c = z->lb; return 1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_424472", "function_addr": 4342898, "binary_name": "2eb83c415560a14c7931e6c8dcec619df0abbc7811f3da18932e1361a7ff0c7c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_38], rdi"], [4, "mov rax, [rbp+var_38]"], [5, "mov eax, [rax+8]"], [6, "mov [rbp+var_4], eax"], [7, "mov rax, [rbp+var_38]"], [8, "mov rdi, rax"], [9, "call sub_423E3E"], [10, "mov [rbp+var_8], eax"], [11, "cmp [rbp+var_8], 0"], [12, "jns short loc_4244A5"], [13, "mov eax, [rbp+var_8]"], [14, "jmp locret_4245C4"], [15, "mov rax, [rbp+var_38]"], [16, "mov edx, [rbp+var_4]"], [17, "mov [rax+8], edx"], [18, "mov rax, [rbp+var_38]"], [19, "mov rdi, rax"], [20, "call sub_423C45"], [21, "mov [rbp+var_C], eax"], [22, "cmp [rbp+var_C], 0"], [23, "jns short loc_4244CC"], [24, "mov eax, [rbp+var_C]"], [25, "jmp locret_4245C4"], [26, "mov rax, [rbp+var_38]"], [27, "mov edx, [rax+8]"], [28, "mov rax, [rbp+var_38]"], [29, "mov [rax+10h], edx"], [30, "mov rax, [rbp+var_38]"], [31, "mov edx, [rax+0Ch]"], [32, "mov rax, [rbp+var_38]"], [33, "mov [rax+8], edx"], [34, "mov rax, [rbp+var_38]"], [35, "mov edx, [rax+0Ch]"], [36, "mov rax, [rbp+var_38]"], [37, "mov ecx, [rax+8]"], [38, "mov eax, edx"], [39, "sub eax, ecx"], [40, "mov [rbp+var_10], eax"], [41, "mov rax, [rbp+var_38]"], [42, "mov rdi, rax"], [43, "call sub_4240E1"], [44, "mov [rbp+var_14], eax"], [45, "cmp [rbp+var_14], 0"], [46, "jns short loc_42451A"], [47, "mov eax, [rbp+var_14]"], [48, "jmp locret_4245C4"], [49, "mov rax, [rbp+var_38]"], [50, "mov eax, [rax+0Ch]"], [51, "sub eax, [rbp+var_10]"], [52, "mov edx, eax"], [53, "mov rax, [rbp+var_38]"], [54, "mov [rax+8], edx"], [55, "mov rax, [rbp+var_38]"], [56, "mov edx, [rax+0Ch]"], [57, "mov rax, [rbp+var_38]"], [58, "mov ecx, [rax+8]"], [59, "mov eax, edx"], [60, "sub eax, ecx"], [61, "mov [rbp+var_18], eax"], [62, "mov rax, [rbp+var_38]"], [63, "mov rdi, rax"], [64, "call sub_4241B3"], [65, "mov [rbp+var_1C], eax"], [66, "cmp [rbp+var_1C], 0"], [67, "jns short loc_42455C"], [68, "mov eax, [rbp+var_1C]"], [69, "jmp short locret_4245C4"], [70, "mov rax, [rbp+var_38]"], [71, "mov eax, [rax+0Ch]"], [72, "sub eax, [rbp+var_18]"], [73, "mov edx, eax"], [74, "mov rax, [rbp+var_38]"], [75, "mov [rax+8], edx"], [76, "mov rax, [rbp+var_38]"], [77, "mov edx, [rax+0Ch]"], [78, "mov rax, [rbp+var_38]"], [79, "mov ecx, [rax+8]"], [80, "mov eax, edx"], [81, "sub eax, ecx"], [82, "mov [rbp+var_20], eax"], [83, "mov rax, [rbp+var_38]"], [84, "mov rdi, rax"], [85, "call sub_42432E"], [86, "mov [rbp+var_24], eax"], [87, "cmp [rbp+var_24], 0"], [88, "jns short loc_42459E"], [89, "mov eax, [rbp+var_24]"], [90, "jmp short locret_4245C4"], [91, "mov rax, [rbp+var_38]"], [92, "mov eax, [rax+0Ch]"], [93, "sub eax, [rbp+var_20]"], [94, "mov edx, eax"], [95, "mov rax, [rbp+var_38]"], [96, "mov [rax+8], edx"], [97, "mov rax, [rbp+var_38]"], [98, "mov edx, [rax+10h]"], [99, "mov rax, [rbp+var_38]"], [100, "mov [rax+8], edx"], [101, "mov eax, 1"], [102, "leave"], [103, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 3], [8, 7], [10, 9], [11, 10], [12, 11], [13, 10], [15, 3], [16, 6], [17, 16], [17, 15], [18, 3], [19, 18], [21, 20], [22, 21], [23, 22], [24, 21], [26, 3], [27, 29], [27, 33], [27, 17], [27, 26], [28, 3], [29, 27], [29, 28], [30, 3], [31, 29], [31, 30], [32, 3], [33, 31], [33, 32], [34, 3], [35, 33], [35, 34], [36, 3], [37, 33], [37, 36], [38, 35], [39, 37], [39, 38], [40, 39], [41, 3], [42, 41], [44, 43], [45, 44], [46, 45], [47, 44], [49, 3], [50, 54], [50, 29], [50, 49], [50, 33], [50, 17], [51, 50], [51, 40], [52, 51], [53, 3], [54, 53], [54, 52], [55, 3], [56, 55], [56, 54], [57, 3], [58, 57], [58, 54], [59, 56], [60, 59], [60, 58], [61, 60], [62, 3], [63, 62], [65, 64], [66, 65], [67, 66], [68, 65], [70, 3], [71, 29], [71, 33], [71, 17], [71, 75], [71, 70], [71, 54], [72, 61], [72, 71], [73, 72], [74, 3], [75, 74], [75, 73], [76, 3], [77, 76], [77, 75], [78, 3], [79, 78], [79, 75], [80, 77], [81, 80], [81, 79], [82, 81], [83, 3], [84, 83], [86, 85], [87, 86], [88, 87], [89, 86], [91, 3], [92, 33], [92, 17], [92, 96], [92, 75], [92, 91], [92, 100], [92, 54], [92, 29], [93, 92], [93, 82], [94, 93], [95, 3], [96, 95], [96, 94], [97, 3], [98, 96], [98, 29], [98, 97], [99, 3], [100, 98], [100, 99], [103, 47], [103, 24], [103, 101], [103, 89], [103, 68], [103, 13]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/2eb83c415560a14c7931e6c8dcec619df0abbc7811f3da18932e1361a7ff0c7c_2eb83c415560a14c7931e6c8dcec619df0abbc7811f3da18932e1361a7ff0c7c.jsonl.gz", "strip_func_name": "sub_424472", "query": "\n\n\n__int64 __fastcall sub_424472(_DWORD *a1)\n{\nint v2; // [rsp+1Ch] [rbp-24h]\nint v3; // [rsp+20h] [rbp-20h]\nint v4; // [rsp+24h] [rbp-1Ch]\nint v5; // [rsp+28h] [rbp-18h]\nint v6; // [rsp+2Ch] [rbp-14h]\nint v7; // [rsp+30h] [rbp-10h]\nint v8; // [rsp+34h] [rbp-Ch]\nint v9; // [rsp+38h] [rbp-8h]\nint v10; // [rsp+3Ch] [rbp-4h]\n\nv10 = a1[2];\nv9 = sub_423E3E(a1);\nif ( v9 < 0 )\nreturn (unsigned int)v9;\na1[2] = v10;\nv8 = sub_423C45((__int64)a1);\nif ( v8 < 0 )\nreturn (unsigned int)v8;\na1[4] = a1[2];\na1[2] = a1[3];\nv7 = a1[3] - a1[2];\nv6 = sub_4240E1(a1);\nif ( v6 < 0 )\nreturn (unsigned int)v6;\na1[2] = a1[3] - v7;\nv5 = a1[3] - a1[2];\nv4 = sub_4241B3(a1);\nif ( v4 < 0 )\nreturn (unsigned int)v4;\na1[2] = a1[3] - v5;\nv3 = a1[3] - a1[2];\nv2 = sub_42432E((__int64)a1);\nif ( v2 < 0 )\nreturn (unsigned int)v2;\na1[2] = a1[3] - v3;\na1[2] = a1[4];\nreturn 1LL;\n}\n\n\n\nQ:[a1,v2,v3,v4,v5,v6,v7,v8,v10,sub_424472,sub_423E3E,sub_423C45,sub_4240E1,sub_4241B3,sub_42432E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'z', 'v2': 'ret_3', 'v3': 'm4', 'v4': 'ret_2', 'v5': 'm3', 'v6': 'ret_1', 'v7': 'm2', 'v8': 'ret_0', 'v10': 'c1', 'sub_424472': 'irish_UTF_8_stem', 'sub_423E3E': 'r_initial_morph_0', 'sub_423C45': 'r_mark_regions_18', 'sub_4240E1': 'r_noun_sfx_0', 'sub_4241B3': 'r_deriv_0', 'sub_42432E': 'r_verb_sfx_0'}"}
bpf_object__pin_programs
a5d8596ab3b246bba01345e353d76e3fa79d745b18c5651256422d2bee933d7c
sfjro
aufs4-linux
NA
int bpf_object__pin_programs(struct bpf_object *obj, const char *path) { struct bpf_program *prog; int err; if (!obj) return -ENOENT; if (!obj->loaded) { pr_warning("object not yet loaded; load it first\n"); return -ENOENT; } err = make_dir(path); if (err) return err; bpf_object__for_each_program(prog, obj) { char buf[PATH_MAX]; int len; len = snprintf(buf, PATH_MAX, "%s/%s", path, prog->pin_name); if (len < 0) { err = -EINVAL; goto err_unpin_programs; } else if (len >= PATH_MAX) { err = -ENAMETOOLONG; goto err_unpin_programs; } err = bpf_program__pin(prog, buf); if (err) goto err_unpin_programs; } return 0; err_unpin_programs: while ((prog = bpf_program__prev(prog, obj))) { char buf[PATH_MAX]; int len; len = snprintf(buf, PATH_MAX, "%s/%s", path, prog->pin_name); if (len < 0) continue; else if (len >= PATH_MAX) continue; bpf_program__unpin(prog, buf); } return err; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40D67F", "function_addr": 4249215, "binary_name": "a5d8596ab3b246bba01345e353d76e3fa79d745b18c5651256422d2bee933d7c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 1030h"], [3, "mov [rbp+var_1028], rdi"], [4, "mov [rbp+var_1030], rsi"], [5, "cmp [rbp+var_1028], 0"], [6, "jnz short loc_40D6AC"], [7, "mov eax, 0FFFFFFFEh"], [8, "jmp locret_40D85B"], [9, "mov rax, [rbp+var_1028]"], [10, "movzx eax, byte ptr [rax+68h]"], [11, "xor eax, 1"], [12, "test al, al"], [13, "jz short loc_40D6E9"], [14, "mov rax, cs:off_4BA300"], [15, "test rax, rax"], [16, "jz short loc_40D6DF"], [17, "mov rdx, cs:off_4BA300"], [18, "lea rdi, aLibbpfObjectNo"], [19, "mov eax, 0"], [20, "call rdx "], [21, "mov eax, 0FFFFFFFEh"], [22, "jmp locret_40D85B"], [23, "mov rax, [rbp+var_1030]"], [24, "mov rdi, rax"], [25, "call sub_40CD61"], [26, "mov [rbp+var_C], eax"], [27, "cmp [rbp+var_C], 0"], [28, "jz short loc_40D709"], [29, "mov eax, [rbp+var_C]"], [30, "jmp locret_40D85B"], [31, "mov rax, [rbp+var_1028]"], [32, "mov rsi, rax"], [33, "mov edi, 0"], [34, "call sub_40DEF8"], [35, "mov [rbp+var_8], rax"], [36, "jmp loc_40D7B8"], [37, "mov rax, [rbp+var_8]"], [38, "mov rcx, [rax+20h]"], [39, "mov rdx, [rbp+var_1030]"], [40, "lea rax, [rbp+s]"], [41, "mov r8, rcx"], [42, "mov rcx, rdx"], [43, "lea rdx, aSS"], [44, "mov esi, 1000h"], [45, "mov rdi, rax"], [46, "mov eax, 0"], [47, "call _snprintf"], [48, "mov [rbp+var_10], eax"], [49, "cmp [rbp+var_10], 0"], [50, "jns short loc_40D76D"], [51, "mov [rbp+var_C], 0FFFFFFEAh"], [52, "jmp short loc_40D7CE"], [53, "cmp [rbp+var_10], 0FFFh"], [54, "jle short loc_40D77F"], [55, "mov [rbp+var_C], 0FFFFFFDCh"], [56, "jmp short loc_40D7CE"], [57, "lea rdx, [rbp+s]"], [58, "mov rax, [rbp+var_8]"], [59, "mov rsi, rdx"], [60, "mov rdi, rax"], [61, "call sub_40CE05"], [62, "mov [rbp+var_C], eax"], [63, "cmp [rbp+var_C], 0"], [64, "jnz short loc_40D7CD"], [65, "mov rdx, [rbp+var_1028]"], [66, "mov rax, [rbp+var_8]"], [67, "mov rsi, rdx"], [68, "mov rdi, rax"], [69, "call sub_40DEF8"], [70, "mov [rbp+var_8], rax"], [71, "cmp [rbp+var_8], 0"], [72, "jnz loc_40D726"], [73, "mov eax, 0"], [74, "jmp locret_40D85B"], [75, "nop"], [76, "jmp short loc_40D833"], [77, "mov rax, [rbp+var_8]"], [78, "mov rcx, [rax+20h]"], [79, "mov rdx, [rbp+var_1030]"], [80, "lea rax, [rbp+s]"], [81, "mov r8, rcx"], [82, "mov rcx, rdx"], [83, "lea rdx, aSS"], [84, "mov esi, 1000h"], [85, "mov rdi, rax"], [86, "mov eax, 0"], [87, "call _snprintf"], [88, "mov [rbp+var_14], eax"], [89, "cmp [rbp+var_14], 0"], [90, "js short loc_40D82F"], [91, "cmp [rbp+var_14], 0FFFh"], [92, "jg short loc_40D832"], [93, "lea rdx, [rbp+s]"], [94, "mov rax, [rbp+var_8]"], [95, "mov rsi, rdx"], [96, "mov rdi, rax"], [97, "call sub_40D038"], [98, "jmp short loc_40D833"], [99, "nop"], [100, "jmp short loc_40D833"], [101, "nop"], [102, "mov rdx, [rbp+var_1028]"], [103, "mov rax, [rbp+var_8]"], [104, "mov rsi, rdx"], [105, "mov rdi, rax"], [106, "call sub_40DF50"], [107, "mov [rbp+var_8], rax"], [108, "cmp [rbp+var_8], 0"], [109, "jnz loc_40D7D0"], [110, "mov eax, [rbp+var_C]"], [111, "leave"], [112, "retn"]], "data_dep": [[5, 3], [6, 5], [9, 3], [10, 9], [11, 10], [12, 11], [13, 12], [15, 14], [16, 15], [20, 17], [23, 4], [24, 23], [26, 25], [27, 26], [28, 27], [29, 26], [31, 3], [32, 31], [35, 34], [37, 70], [37, 35], [38, 37], [39, 4], [40, 37], [41, 38], [42, 39], [43, 39], [45, 40], [48, 47], [49, 48], [50, 49], [53, 48], [54, 53], [57, 43], [58, 35], [58, 70], [59, 57], [60, 58], [62, 61], [63, 62], [64, 63], [65, 3], [66, 70], [66, 35], [67, 65], [68, 66], [70, 69], [71, 35], [71, 70], [72, 71], [77, 107], [78, 77], [79, 4], [80, 77], [81, 78], [82, 79], [83, 79], [85, 80], [88, 87], [89, 88], [90, 89], [91, 88], [92, 91], [93, 83], [94, 107], [95, 93], [96, 94], [102, 3], [103, 35], [103, 107], [103, 70], [104, 102], [105, 103], [107, 106], [108, 107], [109, 108], [110, 51], [110, 62], [110, 55], [112, 29], [112, 110], [112, 21], [112, 7], [112, 73]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/a5d8596ab3b246bba01345e353d76e3fa79d745b18c5651256422d2bee933d7c_a5d8596ab3b246bba01345e353d76e3fa79d745b18c5651256422d2bee933d7c.jsonl.gz", "strip_func_name": "sub_40D67F", "query": "\n\n\n__int64 __fastcall sub_40D67F(__int64 a1, const char *a2)\n{\n__int64 result; // rax\nchar s[4108]; // [rsp+10h] [rbp-1020h] BYREF\nint v4; // [rsp+101Ch] [rbp-14h]\nint v5; // [rsp+1020h] [rbp-10h]\nunsigned int v6; // [rsp+1024h] [rbp-Ch]\n__int64 i; // [rsp+1028h] [rbp-8h]\n\nif ( !a1 )\nreturn 4294967294LL;\nif ( *(_BYTE *)(a1 + 104) != 1 )\n{\nif ( off_4BA300 )\noff_4BA300(\"libbpf: object not yet loaded; load it first\\n\");\nresult = 4294967294LL;\n}\nelse\n{\nv6 = sub_40CD61(a2);\nif ( v6 )\n{\nresult = v6;\n}\nelse\n{\nfor ( i = sub_40DEF8(0LL, a1); ; i = sub_40DEF8(i, a1) )\n{\nif ( !i )\nreturn 0LL;\nv5 = snprintf(s, 0x1000uLL, \"%s/%s\", a2, *(const char **)(i + 32));\nif ( v5 < 0 )\n{\nv6 = -22;\ngoto LABEL_22;\n}\nif ( v5 > 4095 )\nbreak;\nv6 = sub_40CE05(i, s);\nif ( v6 )\ngoto LABEL_22;\n}\nv6 = -36;\nLABEL_22:\nwhile ( 1 )\n{\ni = sub_40DF50(i, a1);\nif ( !i )\nbreak;\nv4 = snprintf(s, 0x1000uLL, \"%s/%s\", a2, *(const char **)(i + 32));\nif ( v4 >= 0 && v4 <= 4095 )\nsub_40D038(i, s);\n}\nresult = v6;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,s,v4,v5,v6,i,sub_40D67F,sub_40CD61,sub_40DEF8,sub_40CE05,sub_40DF50,sub_40D038,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'obj', 'a2': 'path', 's': 'buf', 'v4': 'len_0', 'v5': 'len', 'v6': 'err', 'i': 'prog', 'sub_40D67F': 'bpf_object__pin_programs', 'sub_40CD61': 'make_dir', 'sub_40DEF8': 'bpf_program__next', 'sub_40CE05': 'bpf_program__pin', 'sub_40DF50': 'bpf_program__prev', 'sub_40D038': 'bpf_program__unpin'}"}
closecal
1a071294b8031f979fc42c3cbcee6405e54f9607e343642cad026cab2c804cfb
leahneukirchen
outils
NA
void closecal(FILE *fp) { struct stat sbuf; int nread, pdes[2], status; char buf[1024]; pid_t pid = -1; if (!doall) return; (void)rewind(fp); if (fstat(fileno(fp), &sbuf) || !sbuf.st_size) goto done; if (pipe(pdes) == -1) goto done; switch ((pid = vfork())) { case -1: /* error */ (void)close(pdes[0]); (void)close(pdes[1]); goto done; case 0: /* child -- set stdin to pipe output */ if (pdes[0] != STDIN_FILENO) { (void)dup2(pdes[0], STDIN_FILENO); (void)close(pdes[0]); } (void)close(pdes[1]); execl(_PATH_SENDMAIL, "sendmail", "-i", "-t", "-F", "\"Reminder Service\"", (char *)NULL); warn(_PATH_SENDMAIL); _exit(1); } /* parent -- write to pipe input */ (void)close(pdes[0]); header[1].iov_base = header[3].iov_base = pw->pw_name; header[1].iov_len = header[3].iov_len = strlen(pw->pw_name); writev(pdes[1], header, 8); while ((nread = read(fileno(fp), buf, sizeof(buf))) > 0) (void)write(pdes[1], buf, nread); (void)close(pdes[1]); done: (void)fclose(fp); if (pid != -1) { while (waitpid(pid, &status, 0) == -1) { if (errno != EINTR) break; } } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40590A", "function_addr": 4217098, "binary_name": "1a071294b8031f979fc42c3cbcee6405e54f9607e343642cad026cab2c804cfb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 4C0h"], [3, "mov [rbp+stream], rdi"], [4, "mov [rbp+pid], 0FFFFFFFFh"], [5, "mov eax, cs:dword_4105A8"], [6, "test eax, eax"], [7, "jz loc_405B59"], [8, "mov rax, [rbp+stream]"], [9, "mov rdi, rax"], [10, "call _rewind"], [11, "mov rax, [rbp+stream]"], [12, "mov rdi, rax"], [13, "call _fileno"], [14, "mov edx, eax"], [15, "lea rax, [rbp+stat_buf]"], [16, "mov rsi, rax"], [17, "mov edi, edx"], [18, "call sub_40CB40"], [19, "test eax, eax"], [20, "jnz loc_405B12"], [21, "mov rax, [rbp+stat_buf.st_size]"], [22, "test rax, rax"], [23, "jz loc_405B12"], [24, "lea rax, [rbp+pipedes]"], [25, "mov rdi, rax"], [26, "call _pipe"], [27, "cmp eax, 0FFFFFFFFh"], [28, "jz loc_405B15"], [29, "call _vfork"], [30, "mov [rbp+pid], eax"], [31, "cmp [rbp+pid], 0FFFFFFFFh"], [32, "jz short loc_4059A8"], [33, "cmp [rbp+pid], 0"], [34, "jz short loc_4059C7"], [35, "jmp loc_405A4A"], [36, "mov eax, [rbp+pipedes]"], [37, "mov edi, eax"], [38, "call _close"], [39, "mov eax, [rbp+pipedes+4]"], [40, "mov edi, eax"], [41, "call _close"], [42, "jmp loc_405B16"], [43, "mov eax, [rbp+pipedes]"], [44, "test eax, eax"], [45, "jz short loc_4059F0"], [46, "mov eax, [rbp+pipedes]"], [47, "mov esi, 0"], [48, "mov edi, eax"], [49, "call _dup2"], [50, "mov eax, [rbp+pipedes]"], [51, "mov edi, eax"], [52, "call _close"], [53, "mov eax, [rbp+pipedes+4]"], [54, "mov edi, eax"], [55, "call _close"], [56, "sub rsp, 8"], [57, "push 0"], [58, "mov r9d, offset aReminderServic"], [59, "mov r8d, offset asc_40D5F9"], [60, "mov ecx, offset aT"], [61, "mov edx, offset aI_0"], [62, "mov esi, offset aSendmail"], [63, "mov edi, offset aUsrSbinSendmai"], [64, "mov eax, 0"], [65, "call _execl"], [66, "add rsp, 10h"], [67, "mov edi, offset aUsrSbinSendmai"], [68, "mov eax, 0"], [69, "call _warn"], [70, "mov edi, 1"], [71, "call __exit"], [72, "mov eax, [rbp+pipedes]"], [73, "mov edi, eax"], [74, "call _close"], [75, "mov rax, cs:qword_4105A0"], [76, "mov rax, [rax]"], [77, "mov cs:qword_4104D0, rax"], [78, "mov rax, cs:qword_4104D0"], [79, "mov cs:qword_4104B0, rax"], [80, "mov rax, cs:qword_4105A0"], [81, "mov rax, [rax]"], [82, "mov rdi, rax"], [83, "call _strlen"], [84, "mov cs:qword_4104D8, rax"], [85, "mov rax, cs:qword_4104D8"], [86, "mov cs:qword_4104B8, rax"], [87, "mov eax, [rbp+pipedes+4]"], [88, "mov edx, 8"], [89, "mov esi, offset stru_4104A0"], [90, "mov edi, eax"], [91, "call _writev"], [92, "jmp short loc_405AD3"], [93, "mov eax, [rbp+var_8]"], [94, "movsxd rdx, eax"], [95, "mov eax, [rbp+pipedes+4]"], [96, "lea rcx, [rbp+buf]"], [97, "mov rsi, rcx"], [98, "mov edi, eax"], [99, "call _write"], [100, "mov rax, [rbp+stream]"], [101, "mov rdi, rax"], [102, "call _fileno"], [103, "mov ecx, eax"], [104, "lea rax, [rbp+buf]"], [105, "mov edx, 400h"], [106, "mov rsi, rax"], [107, "mov edi, ecx"], [108, "call _read"], [109, "mov [rbp+var_8], eax"], [110, "cmp [rbp+var_8], 0"], [111, "jg short loc_405AB6"], [112, "mov eax, [rbp+pipedes+4]"], [113, "mov edi, eax"], [114, "call _close"], [115, "jmp short loc_405B16"], [116, "nop"], [117, "jmp short loc_405B16"], [118, "nop"], [119, "mov rax, [rbp+stream]"], [120, "mov rdi, rax"], [121, "call _fclose"], [122, "cmp [rbp+pid], 0FFFFFFFFh"], [123, "jz short locret_405B5D"], [124, "jmp short loc_405B39"], [125, "call ___errno_location"], [126, "mov eax, [rax]"], [127, "cmp eax, 4"], [128, "jnz short loc_405B5C"], [129, "lea rcx, [rbp+stat_loc]"], [130, "mov eax, [rbp+pid]"], [131, "mov edx, 0"], [132, "mov rsi, rcx"], [133, "mov edi, eax"], [134, "call _waitpid"], [135, "cmp eax, 0FFFFFFFFh"], [136, "jz short loc_405B2D"], [137, "jmp short locret_405B5D"], [138, "nop"], [139, "jmp short locret_405B5D"], [140, "nop"], [141, "leave"], [142, "retn"]], "data_dep": [[6, 5], [7, 6], [8, 3], [9, 8], [11, 3], [12, 11], [14, 13], [15, 13], [16, 15], [17, 14], [19, 18], [20, 19], [22, 21], [23, 22], [24, 22], [25, 24], [27, 26], [28, 27], [30, 29], [31, 30], [32, 31], [33, 30], [34, 33], [37, 36], [40, 39], [44, 43], [45, 44], [48, 46], [51, 50], [54, 53], [56, 2], [66, 56], [73, 72], [76, 75], [77, 76], [78, 77], [79, 78], [81, 80], [82, 81], [84, 83], [85, 84], [86, 85], [90, 87], [93, 109], [94, 93], [96, 103], [97, 96], [98, 95], [100, 3], [101, 100], [103, 102], [104, 102], [106, 104], [107, 103], [109, 108], [110, 109], [111, 110], [113, 112], [119, 3], [120, 119], [122, 30], [122, 4], [123, 122], [126, 125], [127, 126], [128, 127], [129, 129], [129, 103], [130, 30], [130, 4], [132, 129], [133, 130], [135, 134], [136, 135], [142, 126], [142, 121], [142, 6], [142, 134]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1a071294b8031f979fc42c3cbcee6405e54f9607e343642cad026cab2c804cfb_1a071294b8031f979fc42c3cbcee6405e54f9607e343642cad026cab2c804cfb.jsonl.gz", "strip_func_name": "sub_40590A", "query": "\n\n\nint __fastcall sub_40590A(FILE *a1)\n{\nint result; // eax\nint v2; // eax\nint v3; // eax\nchar buf[1028]; // [rsp+10h] [rbp-4B0h] BYREF\nint stat_loc; // [rsp+414h] [rbp-ACh] BYREF\nint pipedes[2]; // [rsp+418h] [rbp-A8h] BYREF\nstruct stat stat_buf; // [rsp+420h] [rbp-A0h] BYREF\nint v8; // [rsp+4B8h] [rbp-8h]\n__pid_t pid; // [rsp+4BCh] [rbp-4h]\n\npid = -1;\nresult = dword_4105A8;\nif ( dword_4105A8 )\n{\nrewind(a1);\nv2 = fileno(a1);\nif ( !(unsigned int)sub_40CB40(v2, &stat_buf) && stat_buf.st_size && pipe(pipedes) != -1 )\n{\npid = vfork();\nif ( pid == -1 )\n{\nclose(pipedes[0]);\nclose(pipedes[1]);\n}\nelse\n{\nif ( !pid )\n{\nif ( pipedes[0] )\n{\ndup2(pipedes[0], 0);\nclose(pipedes[0]);\n}\nclose(pipedes[1]);\nexecl(\"/usr/sbin/sendmail\", \"sendmail\", \"-i\", \"-t\", \"-F\", \"\\\"Reminder Service\\\"\", 0LL);\nwarn(\"/usr/sbin/sendmail\");\n_exit(1);\n}\nclose(pipedes[0]);\nqword_4104D0 = *(_QWORD *)qword_4105A0;\nqword_4104B0 = qword_4104D0;\nqword_4104D8 = strlen(*(const char **)qword_4105A0);\nqword_4104B8 = qword_4104D8;\nwritev(pipedes[1], &stru_4104A0, 8);\nwhile ( 1 )\n{\nv3 = fileno(a1);\nv8 = read(v3, buf, 0x400uLL);\nif ( v8 <= 0 )\nbreak;\nwrite(pipedes[1], buf, v8);\n}\nclose(pipedes[1]);\n}\n}\nresult = fclose(a1);\nif ( pid != -1 )\n{\ndo\n{\nresult = waitpid(pid, &stat_loc, 0);\nif ( result != -1 )\nbreak;\nresult = *__errno_location();\n}\nwhile ( result == 4 );\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,stat_loc,pipedes,stat_buf,v8,sub_40590A,sub_40CB40,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'fp', 'stat_loc': 'status', 'pipedes': 'pdes', 'stat_buf': 'sbuf', 'v8': 'nread', 'sub_40590A': 'closecal', 'sub_40CB40': 'fstat'}"}
serve_client_no_new_privs
d7f9432df4c8840f25ff0216b922b4238e4233502aafc7d48c4c9156a0299363
vi
dive
NA
int serve_client_no_new_privs(struct dived_options *opts, struct serve_client_context *ctx) { if (opts->no_new_privs) { #ifndef PR_SET_NO_NEW_PRIVS #define PR_SET_NO_NEW_PRIVS 38 #endif if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) == -1) { perror("prctl(PR_SET_NO_NEW_PRIVS)"); return -1; } } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403E00", "function_addr": 4210176, "binary_name": "d7f9432df4c8840f25ff0216b922b4238e4233502aafc7d48c4c9156a0299363.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov rax, [rbp+var_8]"], [6, "mov eax, [rax+168h]"], [7, "test eax, eax"], [8, "jz short loc_403E58"], [9, "mov r8d, 0"], [10, "mov ecx, 0"], [11, "mov edx, 0"], [12, "mov esi, 1"], [13, "mov edi, 26h "], [14, "mov eax, 0"], [15, "call _prctl"], [16, "cmp eax, 0FFFFFFFFh"], [17, "jnz short loc_403E58"], [18, "mov edi, offset aPrctlPrSetNoNe"], [19, "call _perror"], [20, "mov eax, 0FFFFFFFFh"], [21, "jmp short locret_403E5D"], [22, "mov eax, 0"], [23, "leave"], [24, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 7], [16, 15], [17, 16], [24, 20], [24, 22]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d7f9432df4c8840f25ff0216b922b4238e4233502aafc7d48c4c9156a0299363_d7f9432df4c8840f25ff0216b922b4238e4233502aafc7d48c4c9156a0299363.jsonl.gz", "strip_func_name": "sub_403E00", "query": "\n\n\n__int64 __fastcall sub_403E00(__int64 a1)\n{\nif ( !*(_DWORD *)(a1 + 360) || prctl(38, 1LL, 0LL, 0LL, 0LL) != -1 )\nreturn 0LL;\nperror(\"prctl(PR_SET_NO_NEW_PRIVS)\");\nreturn 0xFFFFFFFFLL;\n}\n\n\n\nQ:[a1,sub_403E00,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'opts', 'sub_403E00': 'serve_client_no_new_privs'}"}
validate_doc
21ec570edffa9218508b4464f26703b15ddd9ff122ae322a90c284d140140eec
ohler55
agoo-c
NA
static int validate_doc(agooErr err, gqlDoc doc) { gqlOp op; gqlType schema; gqlType type = NULL; gqlFrag frag; int cnt; if (NULL == (schema = gql_root_type())) { return agoo_err_set(err, AGOO_ERR_EVAL, "No root (schema) type defined."); } for (frag = doc->frags; NULL != frag; frag = frag->next) { if (AGOO_ERR_OK != sel_set_type(err, frag->on, frag->sels, false)) { return err->code; } } cnt = 0; for (op = doc->ops; NULL != op; op = op->next) { if (NULL == op->name) { cnt++; if (1 < cnt) { return agoo_err_set(err, AGOO_ERR_EVAL, "Multiple un-named operation."); } } else { gqlOp o2 = op->next; for (; NULL != o2; o2 = o2->next) { if (NULL == o2->name) { continue; } if (0 == strcmp(o2->name, op->name)) { return agoo_err_set(err, AGOO_ERR_EVAL, "Multiple operation named '%s'.", op->name); } } } } for (op = doc->ops; NULL != op; op = op->next) { switch (op->kind) { case GQL_QUERY: type = lookup_field_type(schema, query_str, false); break; case GQL_MUTATION: type = lookup_field_type(schema, mutation_str, false); break; case GQL_SUBSCRIPTION: type = lookup_field_type(schema, subscription_str, false); break; default: break; } if (NULL == type) { return agoo_err_set(err, AGOO_ERR_EVAL, "Not a supported operation type."); } if (AGOO_ERR_OK != sel_set_type(err, type, op->sels, GQL_QUERY == op->kind)) { return err->code; } } return AGOO_ERR_OK; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_426EEB", "function_addr": 4353771, "binary_name": "21ec570edffa9218508b4464f26703b15ddd9ff122ae322a90c284d140140eec.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_38], rdi"], [4, "mov [rbp+var_40], rsi"], [5, "mov [rbp+var_10], 0"], [6, "mov eax, 0"], [7, "call sub_410AC7"], [8, "mov [rbp+var_30], rax"], [9, "cmp [rbp+var_30], 0"], [10, "jnz short loc_426F38"], [11, "mov rax, [rbp+var_38]"], [12, "mov edx, offset aNoRootSchemaTy"], [13, "mov esi, 139h"], [14, "mov rdi, rax"], [15, "mov eax, 0"], [16, "call sub_40BE72"], [17, "jmp locret_42715A"], [18, "mov rax, [rbp+var_40]"], [19, "mov rax, [rax+10h]"], [20, "mov [rbp+var_18], rax"], [21, "jmp short loc_426F81"], [22, "mov rax, [rbp+var_18]"], [23, "mov rdx, [rax+20h]"], [24, "mov rax, [rbp+var_18]"], [25, "mov rsi, [rax+18h]"], [26, "mov rax, [rbp+var_38]"], [27, "mov ecx, 0"], [28, "mov rdi, rax"], [29, "call sub_426D93"], [30, "test eax, eax"], [31, "jz short loc_426F76"], [32, "mov rax, [rbp+var_38]"], [33, "mov eax, [rax]"], [34, "jmp locret_42715A"], [35, "mov rax, [rbp+var_18]"], [36, "mov rax, [rax]"], [37, "mov [rbp+var_18], rax"], [38, "cmp [rbp+var_18], 0"], [39, "jnz short loc_426F46"], [40, "mov [rbp+var_1C], 0"], [41, "mov rax, [rbp+var_40]"], [42, "mov rax, [rax]"], [43, "mov [rbp+var_8], rax"], [44, "jmp loc_42705C"], [45, "mov rax, [rbp+var_8]"], [46, "mov rax, [rax+8]"], [47, "test rax, rax"], [48, "jnz short loc_426FDA"], [49, "add [rbp+var_1C], 1"], [50, "cmp [rbp+var_1C], 1"], [51, "jle loc_427051"], [52, "mov rax, [rbp+var_38]"], [53, "mov edx, offset aMultipleUnName"], [54, "mov esi, 139h"], [55, "mov rdi, rax"], [56, "mov eax, 0"], [57, "call sub_40BE72"], [58, "jmp locret_42715A"], [59, "mov rax, [rbp+var_8]"], [60, "mov rax, [rax]"], [61, "mov [rbp+var_28], rax"], [62, "jmp short loc_42704A"], [63, "mov rax, [rbp+var_28]"], [64, "mov rax, [rax+8]"], [65, "test rax, rax"], [66, "jz short loc_42703E"], [67, "mov rax, [rbp+var_8]"], [68, "mov rdx, [rax+8]"], [69, "mov rax, [rbp+var_28]"], [70, "mov rax, [rax+8]"], [71, "mov rsi, rdx"], [72, "mov rdi, rax"], [73, "call _strcmp"], [74, "test eax, eax"], [75, "jnz short loc_42703F"], [76, "mov rax, [rbp+var_8]"], [77, "mov rdx, [rax+8]"], [78, "mov rax, [rbp+var_38]"], [79, "mov rcx, rdx"], [80, "mov edx, offset aMultipleOperat"], [81, "mov esi, 139h"], [82, "mov rdi, rax"], [83, "mov eax, 0"], [84, "call sub_40BE72"], [85, "jmp locret_42715A"], [86, "nop"], [87, "mov rax, [rbp+var_28]"], [88, "mov rax, [rax]"], [89, "mov [rbp+var_28], rax"], [90, "cmp [rbp+var_28], 0"], [91, "jnz short loc_426FE7"], [92, "mov rax, [rbp+var_8]"], [93, "mov rax, [rax]"], [94, "mov [rbp+var_8], rax"], [95, "cmp [rbp+var_8], 0"], [96, "jnz loc_426F9F"], [97, "mov rax, [rbp+var_40]"], [98, "mov rax, [rax]"], [99, "mov [rbp+var_8], rax"], [100, "jmp loc_42714A"], [101, "mov rax, [rbp+var_8]"], [102, "mov eax, [rax+28h]"], [103, "cmp eax, 53h "], [104, "jz short loc_4270CA"], [105, "cmp eax, 53h "], [106, "ja short loc_4270E6"], [107, "cmp eax, 4Dh "], [108, "jz short loc_4270AE"], [109, "cmp eax, 51h "], [110, "jnz short loc_4270E6"], [111, "mov rax, [rbp+var_30]"], [112, "mov edx, 0"], [113, "mov esi, offset aQuery_6"], [114, "mov rdi, rax"], [115, "call sub_426C49"], [116, "mov [rbp+var_10], rax"], [117, "jmp short loc_4270E7"], [118, "mov rax, [rbp+var_30]"], [119, "mov edx, 0"], [120, "mov esi, offset aMutation_5"], [121, "mov rdi, rax"], [122, "call sub_426C49"], [123, "mov [rbp+var_10], rax"], [124, "jmp short loc_4270E7"], [125, "mov rax, [rbp+var_30]"], [126, "mov edx, 0"], [127, "mov esi, offset aSubscription_4"], [128, "mov rdi, rax"], [129, "call sub_426C49"], [130, "mov [rbp+var_10], rax"], [131, "jmp short loc_4270E7"], [132, "nop"], [133, "cmp [rbp+var_10], 0"], [134, "jnz short loc_42710B"], [135, "mov rax, [rbp+var_38]"], [136, "mov edx, offset aNotASupportedO"], [137, "mov esi, 139h"], [138, "mov rdi, rax"], [139, "mov eax, 0"], [140, "call sub_40BE72"], [141, "jmp short locret_42715A"], [142, "mov rax, [rbp+var_8]"], [143, "mov eax, [rax+28h]"], [144, "cmp eax, 51h "], [145, "setz al"], [146, "movzx ecx, al"], [147, "mov rax, [rbp+var_8]"], [148, "mov rdx, [rax+20h]"], [149, "mov rsi, [rbp+var_10]"], [150, "mov rax, [rbp+var_38]"], [151, "mov rdi, rax"], [152, "call sub_426D93"], [153, "test eax, eax"], [154, "jz short loc_42713F"], [155, "mov rax, [rbp+var_38]"], [156, "mov eax, [rax]"], [157, "jmp short locret_42715A"], [158, "mov rax, [rbp+var_8]"], [159, "mov rax, [rax]"], [160, "mov [rbp+var_8], rax"], [161, "cmp [rbp+var_8], 0"], [162, "jnz loc_427077"], [163, "mov eax, 0"], [164, "leave"], [165, "retn"]], "data_dep": [[8, 7], [9, 8], [10, 9], [11, 3], [14, 11], [18, 4], [19, 18], [20, 19], [22, 37], [22, 20], [23, 22], [24, 37], [24, 20], [25, 24], [26, 3], [28, 26], [30, 29], [31, 30], [32, 3], [33, 32], [35, 37], [35, 20], [36, 35], [37, 36], [38, 20], [38, 37], [39, 38], [41, 4], [42, 41], [43, 42], [45, 94], [45, 43], [46, 45], [47, 46], [48, 47], [49, 40], [49, 49], [50, 49], [51, 50], [52, 3], [55, 52], [59, 43], [59, 94], [60, 59], [61, 60], [63, 89], [63, 61], [64, 63], [65, 64], [66, 65], [67, 43], [67, 94], [68, 67], [69, 89], [69, 61], [70, 69], [71, 68], [72, 70], [74, 73], [75, 74], [76, 43], [76, 94], [77, 76], [78, 3], [79, 77], [82, 78], [87, 89], [87, 61], [88, 87], [89, 88], [90, 89], [90, 61], [91, 90], [92, 94], [92, 43], [93, 92], [94, 93], [95, 43], [95, 94], [96, 95], [97, 4], [98, 97], [99, 98], [101, 99], [101, 160], [102, 101], [103, 102], [104, 103], [105, 102], [106, 105], [107, 102], [108, 107], [109, 102], [110, 109], [111, 8], [114, 111], [116, 115], [118, 8], [121, 118], [123, 122], [125, 8], [128, 125], [130, 129], [133, 123], [133, 116], [133, 5], [133, 130], [134, 133], [135, 3], [138, 135], [142, 99], [142, 160], [143, 142], [144, 143], [145, 144], [145, 143], [146, 145], [147, 160], [147, 99], [148, 147], [149, 5], [149, 130], [149, 123], [149, 116], [150, 3], [151, 150], [153, 152], [154, 153], [155, 3], [156, 155], [158, 99], [158, 160], [159, 158], [160, 159], [161, 99], [161, 160], [162, 161], [165, 140], [165, 33], [165, 163], [165, 156], [165, 16], [165, 57], [165, 84]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/21ec570edffa9218508b4464f26703b15ddd9ff122ae322a90c284d140140eec_21ec570edffa9218508b4464f26703b15ddd9ff122ae322a90c284d140140eec.jsonl.gz", "strip_func_name": "sub_426EEB", "query": "\n\n\n__int64 __fastcall sub_426EEB(char *a1, __int64 a2)\n{\n__int64 v2; // rcx\n__int64 v3; // r8\n__int64 v4; // r9\nunsigned int v6; // eax\n__int64 v7; // [rsp+10h] [rbp-30h]\n_QWORD *k; // [rsp+18h] [rbp-28h]\nint v9; // [rsp+24h] [rbp-1Ch]\n__int64 **i; // [rsp+28h] [rbp-18h]\n__int64 v11; // [rsp+30h] [rbp-10h]\n_QWORD *j; // [rsp+38h] [rbp-8h]\n_QWORD *l; // [rsp+38h] [rbp-8h]\n\nv11 = 0LL;\nv7 = sub_410AC7();\nif ( !v7 )\nreturn sub_40BE72(a1, 313, \"No root (schema) type defined.\", v2, v3, v4);\nfor ( i = *(__int64 ***)(a2 + 16); i; i = (__int64 **)*i )\n{\nif ( (unsigned int)sub_426D93(a1, (__int64)i[3], (__int64 **)i[4], 0) )\nreturn *(unsigned int *)a1;\n}\nv9 = 0;\nfor ( j = *(_QWORD **)a2; j; j = (_QWORD *)*j )\n{\nif ( j[1] )\n{\nfor ( k = (_QWORD *)*j; k; k = (_QWORD *)*k )\n{\nif ( k[1] && !strcmp((const char *)k[1], (const char *)j[1]) )\nreturn sub_40BE72(a1, 313, \"Multiple operation named '%s'.\", j[1], v3, v4);\n}\n}\nelse if ( ++v9 > 1 )\n{\nreturn sub_40BE72(a1, 313, \"Multiple un-named operation.\", v2, v3, v4);\n}\n}\nfor ( l = *(_QWORD **)a2; l; l = (_QWORD *)*l )\n{\nv6 = *((_DWORD *)l + 10);\nif ( v6 == 83 )\n{\nv11 = sub_426C49(v7, \"subscription\", 0);\n}\nelse if ( v6 <= 0x53 )\n{\nif ( v6 == 77 )\n{\nv11 = sub_426C49(v7, \"mutation\", 0);\n}\nelse if ( v6 == 81 )\n{\nv11 = sub_426C49(v7, \"query\", 0);\n}\n}\nif ( !v11 )\nreturn sub_40BE72(a1, 313, \"Not a supported operation type.\", v2, v3, v4);\nif ( (unsigned int)sub_426D93(a1, v11, (__int64 **)l[4], *((_DWORD *)l + 10) == 81) )\nreturn *(unsigned int *)a1;\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v7,k,v9,i,v11,j,sub_426EEB,sub_410AC7,sub_40BE72,sub_426D93,sub_426C49,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'err', 'a2': 'doc', 'v7': 'schema', 'k': 'o2', 'v9': 'cnt', 'i': 'frag', 'v11': 'type', 'j': 'opa', 'sub_426EEB': 'validate_doc', 'sub_410AC7': 'gql_root_type', 'sub_40BE72': 'agoo_err_set', 'sub_426D93': 'sel_set_type', 'sub_426C49': 'lookup_field_type'}"}
register_bdt_data
e42a8d093b4f15689eebba189d44fd4a14db0c5463048521fe435f848a56f2f1
system76
firmware-open
NA
static void register_bdt_data(amd_bios_type type, int sub, int ins, char name[]) { uint32_t i; for (i = 0; i < sizeof(amd_bios_table) / sizeof(amd_bios_entry); i++) { if (amd_bios_table[i].type == type && amd_bios_table[i].inst == ins && amd_bios_table[i].subpr == sub) { amd_bios_table[i].filename = name; return; } } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4066EF", "function_addr": 4220655, "binary_name": "e42a8d093b4f15689eebba189d44fd4a14db0c5463048521fe435f848a56f2f1.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_14], edi"], [3, "mov [rbp+var_18], esi"], [4, "mov [rbp+var_1C], edx"], [5, "mov [rbp+var_28], rcx"], [6, "mov [rbp+var_4], 0"], [7, "jmp short loc_406788"], [8, "mov edx, [rbp+var_4]"], [9, "mov rax, rdx"], [10, "shl rax, 2"], [11, "add rax, rdx"], [12, "shl rax, 4"], [13, "add rax, 410AA0h"], [14, "mov eax, [rax]"], [15, "cmp [rbp+var_14], eax"], [16, "jnz short loc_406784"], [17, "mov edx, [rbp+var_4]"], [18, "mov rax, rdx"], [19, "shl rax, 2"], [20, "add rax, rdx"], [21, "shl rax, 4"], [22, "add rax, 410AC8h"], [23, "mov eax, [rax]"], [24, "cmp [rbp+var_1C], eax"], [25, "jnz short loc_406784"], [26, "mov edx, [rbp+var_4]"], [27, "mov rax, rdx"], [28, "shl rax, 2"], [29, "add rax, rdx"], [30, "shl rax, 4"], [31, "add rax, 410AB0h"], [32, "mov eax, [rax]"], [33, "cmp [rbp+var_18], eax"], [34, "jnz short loc_406784"], [35, "mov edx, [rbp+var_4]"], [36, "mov rax, rdx"], [37, "shl rax, 2"], [38, "add rax, rdx"], [39, "shl rax, 4"], [40, "lea rdx, unk_410AA8[rax]"], [41, "mov rax, [rbp+var_28]"], [42, "mov [rdx], rax"], [43, "jmp short loc_406792"], [44, "add [rbp+var_4], 1"], [45, "cmp [rbp+var_4], 46h "], [46, "jbe loc_406709"], [47, "pop rbp"], [48, "retn"]], "data_dep": [[8, 6], [8, 44], [9, 8], [10, 9], [11, 8], [11, 10], [12, 11], [13, 12], [14, 13], [15, 2], [15, 14], [16, 15], [17, 6], [17, 44], [18, 17], [19, 18], [20, 17], [20, 19], [21, 20], [22, 21], [23, 22], [24, 23], [24, 4], [25, 24], [26, 44], [26, 6], [27, 26], [28, 27], [29, 26], [29, 28], [30, 29], [31, 30], [32, 31], [33, 32], [33, 3], [34, 33], [35, 44], [35, 6], [36, 35], [37, 36], [38, 35], [38, 37], [39, 38], [40, 35], [41, 5], [42, 41], [42, 40], [44, 44], [44, 6], [45, 6], [45, 44], [46, 45], [47, 0], [48, 14], [48, 32], [48, 23], [48, 41]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/e42a8d093b4f15689eebba189d44fd4a14db0c5463048521fe435f848a56f2f1_e42a8d093b4f15689eebba189d44fd4a14db0c5463048521fe435f848a56f2f1.jsonl.gz", "strip_func_name": "sub_4066EF", "query": "\n\n\n__int64 __fastcall sub_4066EF(int a1, int a2, int a3, __int64 a4)\n{\n__int64 result; // rax\nunsigned int i; // [rsp+24h] [rbp-4h]\n\nfor ( i = 0; i <= 0x46; ++i )\n{\nresult = *((unsigned int *)&unk_410AA0 + 20 * i);\nif ( a1 == (_DWORD)result )\n{\nresult = LODWORD(qword_410AA8[10 * i + 4]);\nif ( a3 == (_DWORD)result )\n{\nresult = LODWORD(qword_410AA8[10 * i + 1]);\nif ( a2 == (_DWORD)result )\n{\nresult = a4;\nqword_410AA8[10 * i] = a4;\nreturn result;\n}\n}\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,sub_4066EF,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'ins', 'a4': 'name', 'a1': 'type', 'a2': 'sub', 'sub_4066EF': 'register_bdt_data'}"}
wc_PemToDer
7219b0ef569734ba548000b39f891b63e71d053f533c94257503597f308a3fd2
wolfSSL
wolfBoot
NA
int wc_PemToDer(const unsigned char* buff, long longSz, int type, DerBuffer** pDer, void* heap, EncryptedInfo* info, int* keyFormat) { int ret = PemToDer(buff, longSz, type, pDer, heap, info, keyFormat); #if defined(HAVE_PKCS8) || defined(HAVE_PKCS12) if (ret == 0 && type == PRIVATEKEY_TYPE) { DerBuffer* der = *pDer; /* if a PKCS8 key header exists remove it */ ret = ToTraditional(der->buffer, der->length); if (ret > 0) { der->length = (word32)ret; } ret = 0; /* ignore error removing PKCS8 header */ } #endif return ret; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40E483", "function_addr": 4252803, "binary_name": "7219b0ef569734ba548000b39f891b63e71d053f533c94257503597f308a3fd2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_24], edx"], [6, "mov [rbp+var_30], rcx"], [7, "mov [rbp+var_38], r8"], [8, "mov [rbp+var_40], r9"], [9, "mov r8, [rbp+var_40]"], [10, "mov rdi, [rbp+var_38]"], [11, "mov rcx, [rbp+var_30]"], [12, "mov edx, [rbp+var_24]"], [13, "mov rsi, [rbp+var_20]"], [14, "mov rax, [rbp+var_18]"], [15, "sub rsp, 8"], [16, "push [rbp+arg_0]"], [17, "mov r9, r8"], [18, "mov r8, rdi"], [19, "mov rdi, rax"], [20, "call sub_40E0B0"], [21, "add rsp, 10h"], [22, "mov [rbp+var_4], eax"], [23, "cmp [rbp+var_4], 0"], [24, "jnz short loc_40E51E"], [25, "cmp [rbp+var_24], 1"], [26, "jnz short loc_40E51E"], [27, "mov rax, [rbp+var_30]"], [28, "mov rax, [rax]"], [29, "mov [rbp+var_10], rax"], [30, "mov rax, [rbp+var_10]"], [31, "mov edx, [rax+10h]"], [32, "mov rax, [rbp+var_10]"], [33, "mov rax, [rax]"], [34, "mov esi, edx"], [35, "mov rdi, rax"], [36, "call sub_4067F3"], [37, "mov [rbp+var_4], eax"], [38, "cmp [rbp+var_4], 0"], [39, "jle short loc_40E517"], [40, "mov edx, [rbp+var_4]"], [41, "mov rax, [rbp+var_10]"], [42, "mov [rax+10h], edx"], [43, "mov [rbp+var_4], 0"], [44, "mov eax, [rbp+var_4]"], [45, "leave"], [46, "retn"]], "data_dep": [[9, 8], [10, 7], [11, 6], [12, 5], [13, 4], [14, 3], [15, 2], [17, 9], [18, 10], [19, 14], [21, 15], [22, 20], [23, 22], [24, 23], [25, 5], [26, 25], [27, 6], [28, 27], [29, 28], [30, 29], [31, 30], [32, 29], [33, 32], [34, 31], [35, 33], [37, 36], [38, 37], [39, 38], [40, 37], [41, 29], [42, 41], [42, 40], [44, 22], [44, 43], [46, 44]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/7219b0ef569734ba548000b39f891b63e71d053f533c94257503597f308a3fd2_7219b0ef569734ba548000b39f891b63e71d053f533c94257503597f308a3fd2.jsonl.gz", "strip_func_name": "sub_40E483", "query": "\n\n\n__int64 __fastcall sub_40E483(__int64 a1, __int64 a2, int a3, void **a4, __int64 a5, _QWORD *a6, _DWORD *a7)\n{\n_DWORD *v10; // [rsp+38h] [rbp-10h]\nunsigned int v11; // [rsp+44h] [rbp-4h]\nint v12; // [rsp+44h] [rbp-4h]\n\nv11 = sub_40E0B0(a1, a2, a3, a4, a5, a6, a7);\nif ( !v11 && a3 == 1 )\n{\nv10 = *a4;\nv12 = sub_4067F3(*(char **)*a4, *((_DWORD *)*a4 + 4));\nif ( v12 > 0 )\nv10[4] = v12;\nv11 = 0;\n}\nreturn v11;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,a7,v10,sub_40E483,sub_40E0B0,sub_4067F3,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'type', 'a4': 'pDer', 'a1': 'buff', 'a2': 'longSz', 'a5': 'heap', 'a6': 'info', 'a7': 'keyFormat', 'v10': 'der', 'sub_40E483': 'wc_PemToDer', 'sub_40E0B0': 'PemToDer', 'sub_4067F3': 'ToTraditional'}"}
make_file_key
8871daa959bea3240b158f2695663688e19c2f35cb5aa4cdb64eb0ad0773f659
michaelrsweet
pdfio
NA
static void make_file_key( pdfio_encryption_t encryption, // I - Type of encryption pdfio_permission_t permissions, // I - File permissions const unsigned char *file_id, // I - File ID value size_t file_idlen, // I - Length of file ID const uint8_t *user_pad, // I - Padded user password const uint8_t *owner_key, // I - Owner key uint8_t file_key[16]) // O - Encryption key { size_t i; // Looping var uint8_t perm_bytes[4]; // Permissions bytes _pdfio_md5_t md5; // MD5 context uint8_t digest[16]; // 128-bit MD5 digest perm_bytes[0] = (uint8_t)permissions; perm_bytes[1] = (uint8_t)(permissions >> 8); perm_bytes[2] = (uint8_t)(permissions >> 16); perm_bytes[3] = (uint8_t)(permissions >> 24); _pdfioCryptoMD5Init(&md5); _pdfioCryptoMD5Append(&md5, user_pad, 32); _pdfioCryptoMD5Append(&md5, owner_key, 32); _pdfioCryptoMD5Append(&md5, perm_bytes, 4); _pdfioCryptoMD5Append(&md5, file_id, file_idlen); _pdfioCryptoMD5Finish(&md5, digest); if (encryption != PDFIO_ENCRYPTION_RC4_40) { // MD5 the result 50 times.. for (i = 0; i < 50; i ++) { _pdfioCryptoMD5Init(&md5); _pdfioCryptoMD5Append(&md5, digest, 16); _pdfioCryptoMD5Finish(&md5, digest); } } memcpy(file_key, digest, 16); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_410516", "function_addr": 4261142, "binary_name": "8871daa959bea3240b158f2695663688e19c2f35cb5aa4cdb64eb0ad0773f659.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0B0h"], [3, "mov [rbp+var_84], edi"], [4, "mov [rbp+var_88], esi"], [5, "mov [rbp+var_90], rdx"], [6, "mov [rbp+var_98], rcx"], [7, "mov [rbp+var_A0], r8"], [8, "mov [rbp+var_A8], r9"], [9, "mov eax, [rbp+var_88]"], [10, "mov [rbp+var_C], al"], [11, "mov eax, [rbp+var_88]"], [12, "sar eax, 8"], [13, "mov [rbp+var_B], al"], [14, "mov eax, [rbp+var_88]"], [15, "sar eax, 10h"], [16, "mov [rbp+var_A], al"], [17, "mov eax, [rbp+var_88]"], [18, "sar eax, 18h"], [19, "mov [rbp+var_9], al"], [20, "lea rax, [rbp+var_70]"], [21, "mov rdi, rax"], [22, "call sub_412AC0"], [23, "mov rcx, [rbp+var_A0]"], [24, "lea rax, [rbp+var_70]"], [25, "mov edx, 20h "], [26, "mov rsi, rcx"], [27, "mov rdi, rax"], [28, "call sub_412B0F"], [29, "mov rcx, [rbp+var_A8]"], [30, "lea rax, [rbp+var_70]"], [31, "mov edx, 20h "], [32, "mov rsi, rcx"], [33, "mov rdi, rax"], [34, "call sub_412B0F"], [35, "lea rcx, [rbp+var_C]"], [36, "lea rax, [rbp+var_70]"], [37, "mov edx, 4"], [38, "mov rsi, rcx"], [39, "mov rdi, rax"], [40, "call sub_412B0F"], [41, "mov rdx, [rbp+var_98]"], [42, "mov rcx, [rbp+var_90]"], [43, "lea rax, [rbp+var_70]"], [44, "mov rsi, rcx"], [45, "mov rdi, rax"], [46, "call sub_412B0F"], [47, "lea rdx, [rbp+var_80]"], [48, "lea rax, [rbp+var_70]"], [49, "mov rsi, rdx"], [50, "mov rdi, rax"], [51, "call sub_412C79"], [52, "cmp [rbp+var_84], 1"], [53, "jz short loc_410656"], [54, "mov [rbp+var_8], 0"], [55, "jmp short loc_41064F"], [56, "lea rax, [rbp+var_70]"], [57, "mov rdi, rax"], [58, "call sub_412AC0"], [59, "lea rcx, [rbp+var_80]"], [60, "lea rax, [rbp+var_70]"], [61, "mov edx, 10h"], [62, "mov rsi, rcx"], [63, "mov rdi, rax"], [64, "call sub_412B0F"], [65, "lea rdx, [rbp+var_80]"], [66, "lea rax, [rbp+var_70]"], [67, "mov rsi, rdx"], [68, "mov rdi, rax"], [69, "call sub_412C79"], [70, "add [rbp+var_8], 1"], [71, "cmp [rbp+var_8], 31h "], [72, "jbe short loc_410613"], [73, "mov rax, [rbp+var_80]"], [74, "mov rdx, [rbp+var_78]"], [75, "mov rcx, [rbp+arg_0]"], [76, "mov [rcx], rax"], [77, "mov [rcx+8], rdx"], [78, "nop"], [79, "leave"], [80, "retn"]], "data_dep": [[9, 4], [10, 9], [11, 4], [12, 11], [13, 12], [14, 4], [15, 14], [16, 15], [17, 4], [18, 17], [19, 18], [20, 18], [21, 20], [23, 7], [24, 22], [26, 23], [27, 24], [29, 8], [30, 28], [32, 29], [33, 30], [35, 29], [35, 10], [36, 34], [38, 35], [39, 36], [41, 6], [42, 5], [43, 40], [44, 42], [45, 43], [47, 41], [48, 46], [49, 47], [50, 48], [52, 3], [53, 52], [56, 51], [56, 69], [57, 56], [59, 42], [59, 59], [60, 58], [62, 59], [63, 60], [65, 61], [66, 64], [67, 65], [68, 66], [70, 70], [70, 54], [71, 70], [71, 54], [72, 71], [76, 73], [76, 75], [77, 75], [77, 74], [80, 73]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/8871daa959bea3240b158f2695663688e19c2f35cb5aa4cdb64eb0ad0773f659_8871daa959bea3240b158f2695663688e19c2f35cb5aa4cdb64eb0ad0773f659.jsonl.gz", "strip_func_name": "sub_410516", "query": "\n\n\n__int64 __fastcall sub_410516(int a1, int a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, _QWORD *a7)\n{\n__int64 result; // rax\n__int64 v8; // rdx\n__int64 v13[2]; // [rsp+30h] [rbp-80h] BYREF\nchar v14[100]; // [rsp+40h] [rbp-70h] BYREF\nint v15; // [rsp+A4h] [rbp-Ch] BYREF\nunsigned __int64 i; // [rsp+A8h] [rbp-8h]\n\nv15 = a2;\nsub_412AC0(v14);\nsub_412B0F(v14, a5, 32LL);\nsub_412B0F(v14, a6, 32LL);\nsub_412B0F(v14, &v15, 4LL);\nsub_412B0F(v14, a3, a4);\nsub_412C79(v14, v13);\nif ( a1 != 1 )\n{\nfor ( i = 0LL; i <= 0x31; ++i )\n{\nsub_412AC0(v14);\nsub_412B0F(v14, v13, 16LL);\nsub_412C79(v14, v13);\n}\n}\nresult = v13[0];\nv8 = v13[1];\n*a7 = v13[0];\na7[1] = v8;\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,a7,v13,v14,v15,sub_410516,sub_412AC0,sub_412B0F,sub_412C79,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'file_id', 'a4': 'file_idlen', 'a1': 'encryption', 'a2': 'permissions', 'a5': 'user_pad', 'a6': 'owner_key', 'a7': 'file_key', 'v13': 'digest', 'v14': 'md5', 'v15': 'perm_bytes', 'sub_410516': 'make_file_key', 'sub_412AC0': '_pdfioCryptoMD5Init', 'sub_412B0F': '_pdfioCryptoMD5Append', 'sub_412C79': '_pdfioCryptoMD5Finish'}"}
as_event_close_cluster_event_loop
f68b12b76f68351e9f048bd28a697879a69b1799fbf8bdd30581dce70b5e806b
aerospike
aerospike-client-c
NA
static void as_event_close_cluster_event_loop( as_event_loop* event_loop, as_event_close_state* state, as_event_state* event_state ) { event_state->closed = true; if (as_aaf_uint32_rls(&state->event_loop_count, -1) == 0) { as_fence_acq(); as_cluster_destroy(state->cluster); if (state->monitor) { as_monitor_notify(state->monitor); } cf_free(state); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42A482", "function_addr": 4367490, "binary_name": "f68b12b76f68351e9f048bd28a697879a69b1799fbf8bdd30581dce70b5e806b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "mov rax, [rbp+var_18]"], [7, "mov byte ptr [rax+4], 1"], [8, "mov rax, [rbp+var_10]"], [9, "add rax, 10h"], [10, "mov esi, 0FFFFFFFFh"], [11, "mov rdi, rax"], [12, "call sub_425E75"], [13, "test eax, eax"], [14, "jnz short loc_42A4EE"], [15, "mov rax, [rbp+var_10]"], [16, "mov rax, [rax+8]"], [17, "mov rdi, rax"], [18, "call sub_4251F1"], [19, "mov rax, [rbp+var_10]"], [20, "mov rax, [rax]"], [21, "test rax, rax"], [22, "jz short loc_42A4E2"], [23, "mov rax, [rbp+var_10]"], [24, "mov rax, [rax]"], [25, "mov rdi, rax"], [26, "call sub_426441"], [27, "mov rax, [rbp+var_10]"], [28, "mov rdi, rax"], [29, "call sub_45A374"], [30, "nop"], [31, "leave"], [32, "retn"]], "data_dep": [[6, 5], [7, 6], [8, 4], [9, 8], [11, 9], [13, 12], [14, 13], [15, 4], [16, 7], [16, 15], [17, 16], [19, 4], [20, 7], [20, 19], [21, 20], [22, 21], [23, 4], [24, 23], [24, 7], [25, 24], [27, 4], [28, 27], [32, 29], [32, 13]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/f68b12b76f68351e9f048bd28a697879a69b1799fbf8bdd30581dce70b5e806b_f68b12b76f68351e9f048bd28a697879a69b1799fbf8bdd30581dce70b5e806b.jsonl.gz", "strip_func_name": "sub_42A482", "query": "\n\n\n__int64 __fastcall sub_42A482(__int64 a1, __int64 a2, __int64 a3)\n{\n__int64 result; // rax\n\n*(_BYTE *)(a3 + 4) = 1;\nresult = sub_425E75((volatile signed __int32 *)(a2 + 16), 0xFFFFFFFF);\nif ( !(_DWORD)result )\n{\nsub_4251F1(*(__int64 **)(a2 + 8));\nif ( *(_QWORD *)a2 )\nsub_426441(*(_QWORD *)a2);\nresult = sub_45A374(a2);\n}\nreturn result;\n}\n\n\n\nQ:[a3,a2,a1,sub_42A482,sub_425E75,sub_4251F1,sub_426441,sub_45A374,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'event_state', 'a2': 'state', 'a1': 'event_loop', 'sub_42A482': 'as_event_close_cluster_event_loop', 'sub_425E75': 'as_aaf_uint32_rls_7', 'sub_4251F1': 'as_cluster_destroy', 'sub_426441': 'as_monitor_notify_0', 'sub_45A374': 'cf_free'}"}
print_version
e2598a7edd2402f26a8bbd3f8912fd56a4f4cf3f81418f2e012c0e2bb1d6b154
rvaiya
warpd
NA
static void print_version() { printf("warpd " VERSION"\n"); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_409471", "function_addr": 4232305, "binary_name": "e2598a7edd2402f26a8bbd3f8912fd56a4f4cf3f81418f2e012c0e2bb1d6b154.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov edi, offset aWarpdV135Built"], [3, "call _puts"], [4, "nop"], [5, "pop rbp"], [6, "retn"]], "data_dep": [[5, 0], [6, 3]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/e2598a7edd2402f26a8bbd3f8912fd56a4f4cf3f81418f2e012c0e2bb1d6b154_e2598a7edd2402f26a8bbd3f8912fd56a4f4cf3f81418f2e012c0e2bb1d6b154.jsonl.gz", "strip_func_name": "sub_409471", "query": "\n\n\nint sub_409471()\n{\nreturn puts(\"warpd v1.3.5 (built from: 01650ea)\");\n}\n\n\n\nQ:[sub_409471,]\nAssistant: ", "hints": "[]", "response": "{'sub_409471': 'print_version'}"}
frag_new
dd1ff0e4669f93380ed9fd7e06bc6887c7f71c1897119ba61f472370a436c8a8
darwin-on-arm
darwin-sdk
NA
void frag_new( int old_frags_var_max_size) /* Number of chars (already allocated on obstack frags) in variable_length part of frag. */ { register fragS * former_last_fragP; /* char *throw_away_pointer; JF unused */ register frchainS * frchP; int32_t tmp; /* JF */ if(frags.chunk_size == 0){ know(flagseen['n']); as_fatal("with -n a section directive must be seen before assembly " "can begin"); } frag_now->fr_fix = (char *) (obstack_next_free (&frags)) - (frag_now->fr_literal) - old_frags_var_max_size; /* Fix up old frag's fr_fix. */ (void)obstack_finish (&frags); /* This will align the obstack so the */ /* next struct we allocate on it will */ /* begin at a correct boundary. */ frchP = frchain_now; know (frchP); former_last_fragP = frchP->frch_last; know (former_last_fragP); know (former_last_fragP == frag_now); obstack_blank (&frags, SIZEOF_STRUCT_FRAG); /* We expect this will begin at a correct */ /* boundary for a struct. */ tmp=obstack_alignment_mask(&frags); obstack_alignment_mask(&frags)=0; /* Turn off alignment */ /* If we ever hit a machine where strings must be aligned, we Lose Big */ frag_now=(fragS *)obstack_finish(&frags); obstack_alignment_mask(&frags)=tmp; /* Restore alignment */ /* Just in case we don't get zero'd bytes */ memset(frag_now, '\0', SIZEOF_STRUCT_FRAG); /* obstack_unaligned_done (&frags, &frag_now); */ /* know (frags.obstack_c_next_free == frag_now->fr_literal); */ /* Generally, frag_now->points to an */ /* address rounded up to next alignment. */ /* However, characters will add to obstack */ /* frags IMMEDIATELY after the struct frag, */ /* even if they are not starting at an */ /* alignment address. */ former_last_fragP->fr_next = frag_now; frchP->frch_last = frag_now; frag_now->fr_next = NULL; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407B72", "function_addr": 4225906, "binary_name": "dd1ff0e4669f93380ed9fd7e06bc6887c7f71c1897119ba61f472370a436c8a8.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r12"], [3, "push rbx"], [4, "sub rsp, 40h"], [5, "mov [rbp+var_44], edi"], [6, "mov rax, cs:qword_44CCC0"], [7, "test rax, rax"], [8, "jnz short loc_407B9B"], [9, "mov edi, offset aWithNASectionD"], [10, "mov eax, 0"], [11, "call sub_40B673"], [12, "mov rax, cs:qword_44CCD8"], [13, "mov rdx, cs:qword_44CD00"], [14, "add rdx, 40h "], [15, "sub rax, rdx"], [16, "mov edx, eax"], [17, "mov eax, [rbp+var_44]"], [18, "sub edx, eax"], [19, "mov rax, cs:qword_44CD00"], [20, "mov [rax+18h], edx"], [21, "mov [rbp+var_18], offset qword_44CCC0"], [22, "mov rax, [rbp+var_18]"], [23, "mov rax, [rax+10h]"], [24, "mov [rbp+var_20], rax"], [25, "mov rax, [rbp+var_18]"], [26, "mov rax, [rax+18h]"], [27, "mov rdx, rax"], [28, "mov rax, [rbp+var_18]"], [29, "mov eax, [rax+2Ch]"], [30, "cdqe"], [31, "add rdx, rax"], [32, "mov rax, [rbp+var_18]"], [33, "mov eax, [rax+2Ch]"], [34, "not eax"], [35, "cdqe"], [36, "and rax, rdx"], [37, "mov rdx, rax"], [38, "mov rax, [rbp+var_18]"], [39, "mov [rax+18h], rdx"], [40, "mov rax, [rbp+var_18]"], [41, "mov rdx, [rax+18h]"], [42, "mov rax, [rbp+var_18]"], [43, "mov rax, [rax+20h]"], [44, "cmp rdx, rax"], [45, "jbe short loc_407C2A"], [46, "mov rax, [rbp+var_18]"], [47, "mov rdx, [rax+20h]"], [48, "mov rax, [rbp+var_18]"], [49, "mov [rax+18h], rdx"], [50, "mov rax, [rbp+var_18]"], [51, "mov rdx, [rax+18h]"], [52, "mov rax, [rbp+var_18]"], [53, "mov [rax+10h], rdx"], [54, "mov rbx, cs:qword_44EFC8"], [55, "mov r12, [rbx+8]"], [56, "mov [rbp+var_28], offset qword_44CCC0"], [57, "mov [rbp+var_2C], 40h "], [58, "mov rax, [rbp+var_28]"], [59, "mov rdx, [rax+18h]"], [60, "mov eax, [rbp+var_2C]"], [61, "cdqe"], [62, "add rdx, rax"], [63, "mov rax, [rbp+var_28]"], [64, "mov rax, [rax+20h]"], [65, "cmp rdx, rax"], [66, "jbe short loc_407C82"], [67, "mov edx, [rbp+var_2C]"], [68, "mov rax, [rbp+var_28]"], [69, "mov esi, edx"], [70, "mov rdi, rax"], [71, "call _obstack_newchunk"], [72, "mov rax, [rbp+var_28]"], [73, "mov rdx, [rax+18h]"], [74, "mov eax, [rbp+var_2C]"], [75, "cdqe"], [76, "add rdx, rax"], [77, "mov rax, [rbp+var_28]"], [78, "mov [rax+18h], rdx"], [79, "mov eax, cs:dword_44CCEC"], [80, "mov [rbp+var_30], eax"], [81, "mov cs:dword_44CCEC, 0"], [82, "mov [rbp+var_38], offset qword_44CCC0"], [83, "mov rax, [rbp+var_38]"], [84, "mov rax, [rax+10h]"], [85, "mov [rbp+var_40], rax"], [86, "mov rax, [rbp+var_38]"], [87, "mov rax, [rax+18h]"], [88, "mov rdx, rax"], [89, "mov rax, [rbp+var_38]"], [90, "mov eax, [rax+2Ch]"], [91, "cdqe"], [92, "add rdx, rax"], [93, "mov rax, [rbp+var_38]"], [94, "mov eax, [rax+2Ch]"], [95, "not eax"], [96, "cdqe"], [97, "and rax, rdx"], [98, "mov rdx, rax"], [99, "mov rax, [rbp+var_38]"], [100, "mov [rax+18h], rdx"], [101, "mov rax, [rbp+var_38]"], [102, "mov rdx, [rax+18h]"], [103, "mov rax, [rbp+var_38]"], [104, "mov rax, [rax+20h]"], [105, "cmp rdx, rax"], [106, "jbe short loc_407D16"], [107, "mov rax, [rbp+var_38]"], [108, "mov rdx, [rax+20h]"], [109, "mov rax, [rbp+var_38]"], [110, "mov [rax+18h], rdx"], [111, "mov rax, [rbp+var_38]"], [112, "mov rdx, [rax+18h]"], [113, "mov rax, [rbp+var_38]"], [114, "mov [rax+10h], rdx"], [115, "mov rax, [rbp+var_40]"], [116, "mov cs:qword_44CD00, rax"], [117, "mov eax, [rbp+var_30]"], [118, "mov cs:dword_44CCEC, eax"], [119, "mov rax, cs:qword_44CD00"], [120, "mov edx, 40h "], [121, "mov esi, 0"], [122, "mov rdi, rax"], [123, "call _memset"], [124, "mov rax, cs:qword_44CD00"], [125, "mov [r12+10h], rax"], [126, "mov rax, cs:qword_44CD00"], [127, "mov [rbx+8], rax"], [128, "mov rax, cs:qword_44CD00"], [129, "mov qword ptr [rax+10h], 0"], [130, "nop"], [131, "add rsp, 40h"], [132, "pop rbx"], [133, "pop r12"], [134, "pop rbp"], [135, "retn"]], "data_dep": [[7, 6], [8, 7], [14, 13], [15, 14], [15, 12], [16, 15], [17, 5], [18, 17], [18, 16], [20, 19], [20, 18], [22, 21], [23, 20], [23, 22], [24, 23], [25, 21], [26, 25], [26, 20], [27, 26], [28, 21], [29, 20], [29, 28], [31, 29], [31, 27], [32, 21], [33, 20], [33, 32], [34, 33], [36, 34], [36, 31], [37, 36], [38, 21], [39, 37], [39, 38], [40, 21], [41, 40], [41, 39], [42, 21], [43, 39], [43, 42], [44, 41], [44, 43], [45, 44], [46, 21], [47, 20], [47, 49], [47, 46], [47, 39], [48, 21], [49, 48], [49, 47], [50, 21], [51, 20], [51, 50], [51, 49], [51, 53], [51, 39], [52, 21], [53, 52], [53, 51], [55, 54], [55, 53], [58, 56], [59, 39], [59, 49], [59, 58], [59, 53], [60, 57], [62, 60], [62, 59], [63, 56], [64, 63], [64, 53], [65, 62], [65, 64], [66, 65], [67, 57], [68, 56], [69, 67], [70, 68], [72, 56], [73, 53], [73, 39], [73, 78], [73, 20], [73, 100], [73, 72], [73, 49], [74, 57], [76, 74], [76, 73], [77, 56], [78, 77], [78, 76], [80, 79], [83, 82], [84, 53], [84, 83], [84, 78], [85, 84], [86, 82], [87, 86], [87, 78], [88, 87], [89, 82], [90, 78], [90, 89], [92, 88], [92, 90], [93, 82], [94, 78], [94, 93], [95, 94], [97, 95], [97, 92], [98, 97], [99, 82], [100, 98], [100, 99], [101, 82], [102, 100], [102, 101], [103, 82], [104, 100], [104, 103], [105, 102], [105, 104], [106, 105], [107, 82], [108, 20], [108, 107], [108, 100], [108, 49], [108, 110], [108, 39], [108, 78], [108, 53], [109, 82], [110, 109], [110, 108], [111, 82], [112, 100], [112, 20], [112, 114], [112, 125], [112, 127], [112, 111], [112, 129], [112, 49], [112, 53], [112, 110], [112, 39], [112, 78], [113, 82], [114, 113], [114, 112], [115, 85], [116, 115], [117, 80], [118, 117], [119, 116], [122, 119], [124, 116], [125, 55], [125, 124], [126, 116], [127, 54], [127, 126], [128, 116], [129, 128], [131, 4], [132, 3], [133, 2], [134, 0], [135, 128]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/dd1ff0e4669f93380ed9fd7e06bc6887c7f71c1897119ba61f472370a436c8a8_dd1ff0e4669f93380ed9fd7e06bc6887c7f71c1897119ba61f472370a436c8a8.jsonl.gz", "strip_func_name": "sub_407B72", "query": "\n\n\nvoid *__fastcall sub_407B72(int a1, int a2, int a3, int a4, int a5, int a6)\n{\n__int64 v6; // rbx\n__int64 v7; // r12\nvoid *result; // rax\nvoid *v9; // [rsp+10h] [rbp-40h]\nint v10; // [rsp+20h] [rbp-30h]\n\nif ( !qword_44CCC0 )\nsub_40B673((unsigned int)\"with -n a section directive must be seen before assembly can begin\", a2, a3, a4, a5, a6);\n*((_DWORD *)qword_44CD00 + 6) = qword_44CCD8 - ((_DWORD)qword_44CD00 + 64) - a1;\n*(&qword_44CCC0 + 3) = (*((int *)&qword_44CCC0 + 11) + *(&qword_44CCC0 + 3)) & ~*((_DWORD *)&qword_44CCC0 + 11);\nif ( *(&qword_44CCC0 + 3) > (unsigned __int64)*(&qword_44CCC0 + 4) )\n*(&qword_44CCC0 + 3) = *(&qword_44CCC0 + 4);\n*(&qword_44CCC0 + 2) = *(&qword_44CCC0 + 3);\nv6 = qword_44EFC8;\nv7 = *(_QWORD *)(qword_44EFC8 + 8);\nif ( *(&qword_44CCC0 + 3) + 64 > (unsigned __int64)*(&qword_44CCC0 + 4) )\nobstack_newchunk(&qword_44CCC0, 64LL);\n*(&qword_44CCC0 + 3) += 64LL;\nv10 = dword_44CCEC;\ndword_44CCEC = 0;\nv9 = (void *)*(&qword_44CCC0 + 2);\n*(&qword_44CCC0 + 3) = (*((int *)&qword_44CCC0 + 11) + *(&qword_44CCC0 + 3)) & ~*((_DWORD *)&qword_44CCC0 + 11);\nif ( *(&qword_44CCC0 + 3) > (unsigned __int64)*(&qword_44CCC0 + 4) )\n*(&qword_44CCC0 + 3) = *(&qword_44CCC0 + 4);\n*(&qword_44CCC0 + 2) = *(&qword_44CCC0 + 3);\nqword_44CD00 = v9;\ndword_44CCEC = v10;\nmemset(v9, 0, 0x40uLL);\n*(_QWORD *)(v7 + 16) = qword_44CD00;\n*(_QWORD *)(v6 + 8) = qword_44CD00;\nresult = qword_44CD00;\n*((_QWORD *)qword_44CD00 + 2) = 0LL;\nreturn result;\n}\n\n\n\nQ:[a1,v9,v10,sub_407B72,sub_40B673,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'old_frags_var_max_size', 'v9': 'value_0', 'v10': 'tmp', 'sub_407B72': 'frag_new', 'sub_40B673': 'as_fatal'}"}
get_be64
bfd96a4a0bcbadab66a8166e80e069a5d2f416841ca5e57d273a4e4baea323cb
multipath-tcp
iproute-mptcp
NA
int get_be64(__be64 *val, const char *arg, int base) { __u64 v; int ret = get_u64(&v, arg, base); if (!ret) *val = htonll(v); return ret; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "get_be64", "function_addr": 4667575, "binary_name": "bfd96a4a0bcbadab66a8166e80e069a5d2f416841ca5e57d273a4e4baea323cb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 38h"], [4, "mov [rbp+var_28], rdi"], [5, "mov [rbp+var_30], rsi"], [6, "mov [rbp+var_34], edx"], [7, "mov edx, [rbp+var_34]"], [8, "mov rcx, [rbp+var_30]"], [9, "lea rax, [rbp+hostlong]"], [10, "mov rsi, rcx"], [11, "mov rdi, rax"], [12, "call get_u64"], [13, "mov [rbp+var_14], eax"], [14, "cmp [rbp+var_14], 0"], [15, "jnz short loc_47392E"], [16, "mov edi, 1"], [17, "call _htonl"], [18, "cmp eax, 1"], [19, "jz short loc_473923"], [20, "mov rax, qword ptr [rbp+hostlong]"], [21, "mov edi, eax"], [22, "call _htonl"], [23, "mov eax, eax"], [24, "shl rax, 20h"], [25, "mov rbx, rax"], [26, "mov rax, qword ptr [rbp+hostlong]"], [27, "shr rax, 20h"], [28, "mov edi, eax"], [29, "call _htonl"], [30, "mov eax, eax"], [31, "or rax, rbx"], [32, "jmp short loc_473927"], [33, "mov rax, qword ptr [rbp+hostlong]"], [34, "mov rdx, [rbp+var_28]"], [35, "mov [rdx], rax"], [36, "mov eax, [rbp+var_14]"], [37, "mov rbx, [rbp+var_8]"], [38, "leave"], [39, "retn"]], "data_dep": [[7, 6], [8, 5], [10, 8], [11, 9], [13, 12], [14, 13], [15, 14], [18, 17], [19, 18], [21, 20], [23, 22], [24, 23], [25, 24], [27, 26], [28, 27], [30, 29], [31, 25], [31, 30], [34, 4], [35, 33], [35, 31], [35, 34], [36, 13], [39, 36]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/bfd96a4a0bcbadab66a8166e80e069a5d2f416841ca5e57d273a4e4baea323cb_bfd96a4a0bcbadab66a8166e80e069a5d2f416841ca5e57d273a4e4baea323cb.jsonl.gz", "strip_func_name": "get_be64", "query": "\n\n\n__int64 __fastcall get_be64(unsigned __int64 *a1, const char *a2, int a3)\n{\nunsigned __int64 v3; // rbx\nunsigned __int64 v4; // rax\nuint32_t hostlong[2]; // [rsp+20h] [rbp-20h] BYREF\nunsigned int v7; // [rsp+2Ch] [rbp-14h]\n\nv7 = get_u64((unsigned __int64 *)hostlong, a2, a3);\nif ( !v7 )\n{\nif ( htonl(1u) == 1 )\n{\nv4 = *(_QWORD *)hostlong;\n}\nelse\n{\nv3 = (unsigned __int64)htonl(hostlong[0]) << 32;\nv4 = v3 | htonl(hostlong[1]);\n}\n*a1 = v4;\n}\nreturn v7;\n}\n\n\n\nQ:[a3,a1,a2,hostlong,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'base', 'a1': 'val', 'a2': 'arg', 'hostlong': 'v'}"}
_type_init
efec0669d8928f35c10d441625aa516e9c89e71dc034afe38aaa2fe73d307505
klange
ponyos
NA
static KrkValue _type_init(int argc, KrkValue argv[], int hasKw) { if (argc != 2) return krk_runtimeError(vm.exceptions->argumentError, "type() takes 1 argument"); return OBJECT_VAL(krk_getType(argv[1])); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_45C8BF", "function_addr": 4573375, "binary_name": "efec0669d8928f35c10d441625aa516e9c89e71dc034afe38aaa2fe73d307505.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_4], edi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_8], edx"], [6, "cmp [rbp+var_4], 2"], [7, "jz short loc_45C8F6"], [8, "mov rax, cs:qword_496B20"], [9, "mov rax, [rax+10h]"], [10, "mov esi, offset aTypeTakes1Argu"], [11, "mov rdi, rax"], [12, "mov eax, 0"], [13, "call krk_runtimeError"], [14, "jmp short locret_45C926"], [15, "mov rax, [rbp+var_10]"], [16, "add rax, 8"], [17, "mov rax, [rax]"], [18, "mov rdi, rax"], [19, "call krk_getType"], [20, "mov rdx, rax"], [21, "mov rax, 0FFFFFFFFFFFFh"], [22, "and rdx, rax"], [23, "mov rax, 7FFD000000000000h"], [24, "or rax, rdx"], [25, "leave"], [26, "retn"]], "data_dep": [[6, 3], [7, 6], [9, 8], [11, 9], [15, 4], [16, 15], [17, 16], [18, 17], [20, 19], [22, 21], [22, 20], [24, 23], [24, 22], [26, 24], [26, 13]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/efec0669d8928f35c10d441625aa516e9c89e71dc034afe38aaa2fe73d307505_efec0669d8928f35c10d441625aa516e9c89e71dc034afe38aaa2fe73d307505.jsonl.gz", "strip_func_name": "sub_45C8BF", "query": "\n\n\n__int64 __fastcall sub_45C8BF(unsigned int a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 result; // rax\n\nif ( a1 == 2 )\nresult = krk_getType(*(_QWORD *)(a2 + 8)) & 0xFFFFFFFFFFFFLL | 0x7FFD000000000000LL;\nelse\nresult = krk_runtimeError(\n*(_QWORD *)(qword_496B20 + 16),\n\"type() takes 1 argument\",\na3,\na4,\na5,\na6,\na2,\n__PAIR64__(a1, a3));\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_45C8BF,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'hasKw', 'a1': 'argc', 'a2': 'argv', 'sub_45C8BF': '_type_init'}"}
HUFv07_decompress4X2
865724ebdf8f31c695b0022cc64ebcc76b491dfcaf7d0e9f4ffca1890f30b8c6
facebook
zstd
NA
size_t HUFv07_decompress4X2 (void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize) { HUFv07_CREATE_STATIC_DTABLEX2(DTable, HUFv07_TABLELOG_MAX); return HUFv07_decompress4X2_DCtx(DTable, dst, dstSize, cSrc, cSrcSize); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4D0F02", "function_addr": 5050114, "binary_name": "865724ebdf8f31c695b0022cc64ebcc76b491dfcaf7d0e9f4ffca1890f30b8c6.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 2030h"], [3, "mov [rbp+var_2018], rdi"], [4, "mov [rbp+var_2020], rsi"], [5, "mov [rbp+var_2028], rdx"], [6, "mov [rbp+var_2030], rcx"], [7, "lea rax, [rbp+s]"], [8, "mov edx, 2004h"], [9, "mov esi, 0"], [10, "mov rdi, rax"], [11, "call _memset"], [12, "mov [rbp+s], 0B00000Bh"], [13, "mov rdi, [rbp+var_2030]"], [14, "mov rcx, [rbp+var_2028]"], [15, "mov rdx, [rbp+var_2020]"], [16, "mov rsi, [rbp+var_2018]"], [17, "lea rax, [rbp+s]"], [18, "mov r8, rdi"], [19, "mov rdi, rax"], [20, "call sub_4D0E69"], [21, "leave"], [22, "retn"]], "data_dep": [[10, 7], [13, 6], [14, 5], [15, 4], [16, 3], [17, 12], [17, 11], [18, 13], [19, 17], [22, 20]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/865724ebdf8f31c695b0022cc64ebcc76b491dfcaf7d0e9f4ffca1890f30b8c6_865724ebdf8f31c695b0022cc64ebcc76b491dfcaf7d0e9f4ffca1890f30b8c6.jsonl.gz", "strip_func_name": "sub_4D0F02", "query": "\n\n\n__int64 __fastcall sub_4D0F02(__int64 a1, __int64 a2, unsigned __int8 *a3, unsigned __int64 a4)\n{\nunsigned int s[2052]; // [rsp+20h] [rbp-2010h] BYREF\n\nmemset(s, 0, 0x2004uLL);\ns[0] = 184549387;\nreturn sub_4D0E69(s, a1, a2, a3, a4);\n}\n\n\n\nQ:[a3,a4,a1,a2,s,sub_4D0F02,sub_4D0E69,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'cSrc', 'a4': 'cSrcSize', 'a1': 'dst', 'a2': 'dstSize', 's': 'DTable', 'sub_4D0F02': 'HUFv07_decompress4X2', 'sub_4D0E69': 'HUFv07_decompress4X2_DCtx'}"}
genxor
7081e45cc9c4fbe9cf3486887760c2a5d1804b34cd8c38ec851c47429d0144e8
DoctorWkt
SubC
NA
void genxor(void) { gentext(); cgxor(); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407427", "function_addr": 4224039, "binary_name": "7081e45cc9c4fbe9cf3486887760c2a5d1804b34cd8c38ec851c47429d0144e8.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "call sub_407106"], [3, "call sub_4022D1"], [4, "nop"], [5, "pop rbp"], [6, "retn"]], "data_dep": [[5, 0], [6, 3]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/7081e45cc9c4fbe9cf3486887760c2a5d1804b34cd8c38ec851c47429d0144e8_7081e45cc9c4fbe9cf3486887760c2a5d1804b34cd8c38ec851c47429d0144e8.jsonl.gz", "strip_func_name": "sub_407427", "query": "\n\n\n__int64 sub_407427()\n{\nsub_407106();\nreturn sub_4022D1();\n}\n\n\n\nQ:[sub_407427,sub_407106,sub_4022D1,]\nAssistant: ", "hints": "[]", "response": "{'sub_407427': 'genxor', 'sub_407106': 'gentext', 'sub_4022D1': 'cgxor'}"}
asinhf
307aa35045457a12f9839fa7e02a022f4ac2aede35e11cb8e76b24ad63eee97a
mirage
ocaml-solo5
NA
OLM_DLLEXPORT float asinhf(float x) { float t,w; int32_t hx,ix; GET_FLOAT_WORD(hx,x); ix = hx&0x7fffffff; if(ix>=0x7f800000) return x+x; /* x is inf or NaN */ if(ix< 0x31800000) { /* |x|<2**-28 */ if(huge+x>one) return x; /* return x inexact except 0 */ } if(ix>0x4d800000) { /* |x| > 2**28 */ w = __ieee754_logf(fabsf(x))+ln2; } else if (ix>0x40000000) { /* 2**28 > |x| > 2.0 */ t = fabsf(x); w = __ieee754_logf((float)2.0*t+one/(__ieee754_sqrtf(x*x+one)+t)); } else { /* 2.0 > |x| > 2**-28 */ t = x*x; w =log1pf(fabsf(x)+t/(one+__ieee754_sqrtf(one+t))); } if(hx>0) return w; else return -w; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_417158", "function_addr": 4288856, "binary_name": "307aa35045457a12f9839fa7e02a022f4ac2aede35e11cb8e76b24ad63eee97a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "movss [rbp+var_24], xmm0"], [4, "movss xmm0, [rbp+var_24]"], [5, "movss [rbp+var_14], xmm0"], [6, "mov eax, [rbp+var_14]"], [7, "mov [rbp+var_8], eax"], [8, "mov eax, [rbp+var_8]"], [9, "and eax, 7FFFFFFFh"], [10, "mov [rbp+var_C], eax"], [11, "cmp [rbp+var_C], 7F7FFFFFh"], [12, "jle short loc_417197"], [13, "movss xmm0, [rbp+var_24]"], [14, "addss xmm0, xmm0"], [15, "jmp locret_41731D"], [16, "cmp [rbp+var_C], 317FFFFFh"], [17, "jg short loc_4171C4"], [18, "movss xmm0, cs:dword_42700C"], [19, "addss xmm0, [rbp+var_24]"], [20, "movss xmm1, cs:dword_427010"], [21, "comiss xmm0, xmm1"], [22, "jbe short loc_4171C4"], [23, "movss xmm0, [rbp+var_24]"], [24, "jmp locret_41731D"], [25, "cmp [rbp+var_C], 4D800000h"], [26, "jle short loc_4171FC"], [27, "mov eax, [rbp+var_24]"], [28, "movd xmm0, eax"], [29, "call sub_418DD8"], [30, "movd eax, xmm0"], [31, "movd xmm0, eax"], [32, "call sub_415AB0"], [33, "movss xmm1, cs:dword_427014"], [34, "addss xmm0, xmm1"], [35, "movss [rbp+var_4], xmm0"], [36, "jmp loc_417300"], [37, "cmp [rbp+var_C], 40000000h"], [38, "jle loc_417293"], [39, "mov eax, [rbp+var_24]"], [40, "movd xmm0, eax"], [41, "call sub_418DD8"], [42, "movd eax, xmm0"], [43, "mov [rbp+var_10], eax"], [44, "movss xmm0, [rbp+var_10]"], [45, "addss xmm0, xmm0"], [46, "movss [rbp+var_28], xmm0"], [47, "movss xmm3, cs:dword_427010"], [48, "movss [rbp+var_2C], xmm3"], [49, "movss xmm0, [rbp+var_24]"], [50, "movaps xmm1, xmm0"], [51, "mulss xmm1, xmm0"], [52, "movss xmm0, cs:dword_427010"], [53, "addss xmm1, xmm0"], [54, "movd eax, xmm1"], [55, "movd xmm0, eax"], [56, "call sub_41B850"], [57, "movd eax, xmm0"], [58, "movd xmm1, eax"], [59, "addss xmm1, [rbp+var_10]"], [60, "movss xmm3, [rbp+var_2C]"], [61, "divss xmm3, xmm1"], [62, "movaps xmm0, xmm3"], [63, "movaps xmm4, xmm0"], [64, "addss xmm4, [rbp+var_28]"], [65, "movd eax, xmm4"], [66, "movd xmm0, eax"], [67, "call sub_415AB0"], [68, "movd eax, xmm0"], [69, "mov [rbp+var_4], eax"], [70, "jmp short loc_417300"], [71, "movss xmm0, [rbp+var_24]"], [72, "mulss xmm0, xmm0"], [73, "movss [rbp+var_10], xmm0"], [74, "mov eax, [rbp+var_24]"], [75, "movd xmm0, eax"], [76, "call sub_418DD8"], [77, "movss [rbp+var_28], xmm0"], [78, "movss xmm0, cs:dword_427010"], [79, "movaps xmm5, xmm0"], [80, "addss xmm5, [rbp+var_10]"], [81, "movd eax, xmm5"], [82, "movd xmm0, eax"], [83, "call sub_41B850"], [84, "movss xmm1, cs:dword_427010"], [85, "addss xmm1, xmm0"], [86, "movss xmm0, [rbp+var_10]"], [87, "divss xmm0, xmm1"], [88, "movaps xmm6, xmm0"], [89, "addss xmm6, [rbp+var_28]"], [90, "movd eax, xmm6"], [91, "movd xmm0, eax"], [92, "call sub_4198CA"], [93, "movd eax, xmm0"], [94, "mov [rbp+var_4], eax"], [95, "cmp [rbp+var_8], 0"], [96, "jle short loc_41730D"], [97, "movss xmm0, [rbp+var_4]"], [98, "jmp short locret_41731D"], [99, "movss xmm0, [rbp+var_4]"], [100, "movss xmm1, cs:dword_427020"], [101, "xorps xmm0, xmm1"], [102, "leave"], [103, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [11, 10], [12, 11], [13, 3], [14, 13], [16, 10], [17, 16], [19, 18], [19, 3], [21, 20], [21, 19], [22, 16], [23, 3], [25, 10], [26, 25], [27, 3], [28, 27], [30, 28], [31, 30], [34, 31], [34, 33], [35, 34], [37, 10], [38, 37], [39, 3], [40, 39], [42, 40], [43, 42], [44, 43], [45, 44], [46, 45], [48, 47], [49, 3], [50, 49], [51, 50], [51, 49], [53, 52], [53, 51], [54, 53], [55, 54], [57, 55], [58, 57], [59, 43], [59, 58], [60, 48], [61, 60], [61, 59], [62, 61], [63, 62], [64, 63], [64, 46], [65, 64], [66, 65], [68, 66], [69, 68], [71, 3], [72, 71], [73, 72], [74, 3], [75, 74], [77, 75], [79, 78], [80, 73], [80, 79], [81, 80], [82, 81], [85, 82], [85, 84], [86, 73], [87, 86], [87, 85], [88, 87], [89, 77], [89, 88], [90, 89], [91, 90], [93, 91], [94, 93], [95, 7], [96, 95], [97, 35], [97, 94], [97, 69], [99, 35], [99, 94], [99, 69], [101, 99], [101, 100], [103, 32], [103, 9], [103, 93], [103, 68]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/307aa35045457a12f9839fa7e02a022f4ac2aede35e11cb8e76b24ad63eee97a_307aa35045457a12f9839fa7e02a022f4ac2aede35e11cb8e76b24ad63eee97a.jsonl.gz", "strip_func_name": "sub_417158", "query": "\n\n\n__m128 __fastcall sub_417158(__m128 result)\n{\n__m128i v1; // xmm0\n__m128i v2; // xmm0\n__m128i v3; // xmm1\n__m128i v4; // xmm0\n__m128i v5; // xmm3\n__m128i v6; // xmm4\n__m128i v7; // xmm0\ndouble v8; // xmm0_8\n__m128i v9; // xmm5\ndouble v10; // xmm0_8\nfloat v11; // xmm1_4\n__m128i v12; // xmm0\n__m128i v13; // xmm6\nfloat v14; // [rsp+8h] [rbp-28h]\nfloat v15; // [rsp+Ch] [rbp-24h]\nfloat v16; // [rsp+20h] [rbp-10h]\nint v17; // [rsp+28h] [rbp-8h]\nfloat v18; // [rsp+2Ch] [rbp-4h]\n\nv15 = result.m128_f32[0];\nv17 = result.m128_i32[0];\nif ( (result.m128_i32[0] & 0x7FFFFFFFu) <= 0x7F7FFFFF )\n{\nif ( (result.m128_i32[0] & 0x7FFFFFFFu) > 0x317FFFFF || (float)(result.m128_f32[0] + 1.0e30) <= 1.0 )\n{\nif ( (result.m128_i32[0] & 0x7FFFFFFFu) <= 0x4D800000 )\n{\nif ( (result.m128_i32[0] & 0x7FFFFFFFu) <= 0x40000000 )\n{\nv8 = sub_418DD8(*(double *)_mm_cvtsi32_si128(result.m128_u32[0]).m128i_i64);\nv14 = *(float *)&v8;\nv9 = (__m128i)0x3F800000u;\n*(float *)v9.m128i_i32 = (float)(v15 * v15) + 1.0;\nv10 = sub_41B850(COERCE_FLOAT(_mm_cvtsi128_si32(v9)));\nv11 = *(float *)&v10 + 1.0;\nv12 = (__m128i)COERCE_UNSIGNED_INT(v15 * v15);\n*(float *)v12.m128i_i32 = (float)(v15 * v15) / v11;\nv13 = v12;\n*(float *)v13.m128i_i32 = *(float *)v12.m128i_i32 + v14;\nv7 = _mm_cvtsi32_si128(_mm_cvtsi128_si32(v13));\n*(double *)v7.m128i_i64 = sub_4198CA(*(double *)v7.m128i_i64);\n}\nelse\n{\nv2 = _mm_cvtsi32_si128(result.m128_u32[0]);\n*(double *)v2.m128i_i64 = sub_418DD8(*(double *)v2.m128i_i64);\nv16 = COERCE_FLOAT(_mm_cvtsi128_si32(v2));\nv3 = (__m128i)LODWORD(v15);\n*(float *)v3.m128i_i32 = (float)(*(float *)v3.m128i_i32 * *(float *)v3.m128i_i32) + 1.0;\nv4 = _mm_cvtsi32_si128(_mm_cvtsi128_si32(v3));\n*(double *)v4.m128i_i64 = sub_41B850(*(float *)v4.m128i_i32);\nv5 = (__m128i)0x3F800000u;\n*(float *)v5.m128i_i32 = 1.0 / (float)(COERCE_FLOAT(_mm_cvtsi128_si32(v4)) + v16);\nv6 = v5;\n*(float *)v6.m128i_i32 = *(float *)v5.m128i_i32 + (float)(v16 + v16);\nv7 = _mm_cvtsi32_si128(_mm_cvtsi128_si32(v6));\n*(float *)v7.m128i_i32 = sub_415AB0(*(float *)v7.m128i_i32);\n}\nv18 = COERCE_FLOAT(_mm_cvtsi128_si32(v7));\n}\nelse\n{\nv1 = _mm_cvtsi32_si128(result.m128_u32[0]);\n*(double *)v1.m128i_i64 = sub_418DD8(*(double *)v1.m128i_i64);\nv18 = sub_415AB0(COERCE_FLOAT(_mm_cvtsi128_si32(v1))) + 0.69314718;\n}\nif ( v17 <= 0 )\nresult = _mm_xor_ps((__m128)LODWORD(v18), (__m128)0x80000000);\nelse\nresult = (__m128)LODWORD(v18);\n}\nelse\n{\nresult = (__m128)result.m128_u32[0];\n}\n}\nelse\n{\nresult = (__m128)result.m128_u32[0];\nresult.m128_f32[0] = result.m128_f32[0] + result.m128_f32[0];\n}\nreturn result;\n}\n\n\n\nQ:[result,v15,v16,v17,v18,sub_417158,sub_418DD8,sub_41B850,sub_4198CA,sub_415AB0,]\nAssistant: ", "hints": "[]", "response": "{'result': 'x', 'v15': 'xa', 'v16': 't', 'v17': 'hx', 'v18': 'w', 'sub_417158': 'asinhf', 'sub_418DD8': 'fabsf', 'sub_41B850': 'sqrtf', 'sub_4198CA': 'log1pf', 'sub_415AB0': 'logf'}"}
FreeIdDesc
aeb2614dcd74c7b9c53d8d96f9f865e8c3003aa55654ca3473af19e1d35bb1d1
dmsc
fastbasic
NA
static void FreeIdDesc (IdDesc* ID) /* Free an IdDesc */ { /* Free the name */ SB_Done (&ID->Id); /* Free the structure itself */ xfree (ID); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4095F9", "function_addr": 4232697, "binary_name": "aeb2614dcd74c7b9c53d8d96f9f865e8c3003aa55654ca3473af19e1d35bb1d1.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov rax, [rbp+var_8]"], [5, "add rax, 8"], [6, "mov rdi, rax"], [7, "call sub_41C55F"], [8, "mov rax, [rbp+var_8]"], [9, "mov rdi, rax"], [10, "call sub_41D712"], [11, "nop"], [12, "leave"], [13, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [8, 3], [9, 8], [13, 10]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/aeb2614dcd74c7b9c53d8d96f9f865e8c3003aa55654ca3473af19e1d35bb1d1_aeb2614dcd74c7b9c53d8d96f9f865e8c3003aa55654ca3473af19e1d35bb1d1.jsonl.gz", "strip_func_name": "sub_4095F9", "query": "\n\n\n__int64 __fastcall sub_4095F9(__int64 a1)\n{\nsub_41C55F(a1 + 8);\nreturn sub_41D712(a1);\n}\n\n\n\nQ:[a1,sub_4095F9,sub_41C55F,sub_41D712,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ID', 'sub_4095F9': 'FreeIdDesc', 'sub_41C55F': 'SB_Done', 'sub_41D712': 'xfree'}"}
myencoding_decode_utf_16le
0ba8a8093138821c3e049eff861e4e240142bd87437f4360348cd9ec525238e1
lexborisov
Modest
NA
myencoding_status_t myencoding_decode_utf_16le(unsigned const char data, myencoding_result_t *res) { if(res->flag) res->flag = 0; return myencoding_decode_shared_utf_16(data, res); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4034D4", "function_addr": 4207828, "binary_name": "0ba8a8093138821c3e049eff861e4e240142bd87437f4360348cd9ec525238e1.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov eax, edi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_4], al"], [6, "mov rax, [rbp+var_10]"], [7, "mov rax, [rax+28h]"], [8, "test rax, rax"], [9, "jz short loc_4034FE"], [10, "mov rax, [rbp+var_10]"], [11, "mov qword ptr [rax+28h], 0"], [12, "movzx eax, [rbp+var_4]"], [13, "mov rdx, [rbp+var_10]"], [14, "mov rsi, rdx"], [15, "mov edi, eax"], [16, "call sub_403302"], [17, "leave"], [18, "retn"]], "data_dep": [[5, 3], [6, 4], [7, 6], [8, 7], [9, 8], [10, 4], [11, 10], [12, 5], [13, 4], [14, 13], [15, 12], [18, 16]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/0ba8a8093138821c3e049eff861e4e240142bd87437f4360348cd9ec525238e1_0ba8a8093138821c3e049eff861e4e240142bd87437f4360348cd9ec525238e1.jsonl.gz", "strip_func_name": "sub_4034D4", "query": "\n\n\n__int64 __fastcall sub_4034D4(unsigned __int8 a1, _QWORD *a2)\n{\nif ( a2[5] )\na2[5] = 0LL;\nreturn sub_403302(a1, a2);\n}\n\n\n\nQ:[a1,a2,sub_4034D4,sub_403302,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'data', 'a2': 'res', 'sub_4034D4': 'myencoding_decode_utf_16le', 'sub_403302': 'myencoding_decode_shared_utf_16'}"}
binmark_cb_to_cb
b23d3b3c6d30cab509ca26d5ffb0f0195d1f18b96b3cd80b7d9c523fb296cdf3
njh
binmark
NA
int binmark_cb_to_cb(void* input, void* output, binmark_read_cb read_cb, binmark_write_cb write_cb) { size_t count = 0; int readahead = 0; while (1) { int chr; if (readahead) { chr = readahead; readahead = 0; } else { chr = read_cb(input); } if (chr == EOF) { break; } else if (isspace(chr) || chr == ':' || chr == '-') { /* Ignore */ continue; } else if (chr == '#') { /* Ignore the rest of the line */ while (1) { int chr2 = read_cb(input); if (chr2 == EOF || chr2 == '\n' || chr2 == '\r') break; } } else if (isxdigit(chr)) { int chr2 = read_cb(input); if (!isxdigit(chr2)) { fprintf(stderr, "Error: got non-hex digit after hex digit: '%c'\n", chr2); break; } write_cb((ascii_to_hex(chr) << 4) + ascii_to_hex(chr2), output); count++; } else if (chr == '.') { /* 8-bit Integer */ char chars[5]; int digits = 0; while (digits < 4) { int chr2 = read_cb(input); if (isdigit(chr2) || chr2 == '-') { chars[digits++] = chr2; } else { /* Store the extra character for later */ readahead = chr2; break; } } chars[digits] = '\0'; if (digits < 1 || digits > 4) { fprintf(stderr, "Error: invalid integer: %s\n", chars); break; } else { int num = atoi(chars); write_cb((uint8_t)num & 0xFF, output); count++; } } else if (chr == '"') { while (1) { int chr2 = read_cb(input); if (chr2 == EOF || chr2 == '"') { break; } else if (chr2 == '\\') { int chr3 = read_cb(input); int escaped = escape_to_hex(chr3); if (escaped < 0) { fprintf(stderr, "Error: invalid escape sequence '%c'\n", chr3); break; } else { write_cb(escaped, output); count++; } } else { write_cb(chr2, output); count++; } } } else if (chr == '\\') { int chr2 = read_cb(input); if (chr2 == EOF) { break; } else { int escaped = escape_to_hex(chr2); if (escaped < 0) { fprintf(stderr, "Error: invalid escape sequence '%c'\n", chr2); break; } else { write_cb(escaped, output); count++; } } } else { fprintf(stderr, "Error: unrecognised character in input: '%c'\n", chr); break; } } return count; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401279", "function_addr": 4199033, "binary_name": "b23d3b3c6d30cab509ca26d5ffb0f0195d1f18b96b3cd80b7d9c523fb296cdf3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 68h"], [4, "mov [rbp+var_58], rdi"], [5, "mov [rbp+var_60], rsi"], [6, "mov [rbp+var_68], rdx"], [7, "mov [rbp+var_70], rcx"], [8, "mov [rbp+var_18], 0"], [9, "mov [rbp+var_1C], 0"], [10, "cmp [rbp+var_1C], 0"], [11, "jz short loc_4012B6"], [12, "mov eax, [rbp+var_1C]"], [13, "mov [rbp+var_20], eax"], [14, "mov [rbp+var_1C], 0"], [15, "jmp short loc_4012C6"], [16, "mov rax, [rbp+var_58]"], [17, "mov rdx, [rbp+var_68]"], [18, "mov rdi, rax"], [19, "call rdx"], [20, "mov [rbp+var_20], eax"], [21, "cmp [rbp+var_20], 0FFFFFFFFh"], [22, "jz loc_401604"], [23, "call ___ctype_b_loc"], [24, "mov rdx, [rax]"], [25, "mov eax, [rbp+var_20]"], [26, "cdqe"], [27, "add rax, rax"], [28, "add rax, rdx"], [29, "movzx eax, word ptr [rax]"], [30, "movzx eax, ax"], [31, "and eax, 2000h"], [32, "test eax, eax"], [33, "jnz loc_4015FE"], [34, "cmp [rbp+var_20], 3Ah "], [35, "jz loc_4015FE"], [36, "cmp [rbp+var_20], 2Dh "], [37, "jz loc_4015FE"], [38, "cmp [rbp+var_20], 23h "], [39, "jnz short loc_401340"], [40, "mov rax, [rbp+var_58]"], [41, "mov rdx, [rbp+var_68]"], [42, "mov rdi, rax"], [43, "call rdx"], [44, "mov [rbp+var_48], eax"], [45, "cmp [rbp+var_48], 0FFFFFFFFh"], [46, "jz loc_4012A1"], [47, "cmp [rbp+var_48], 0Ah"], [48, "jz loc_4012A1"], [49, "cmp [rbp+var_48], 0Dh"], [50, "jz loc_4012A1"], [51, "jmp short loc_401310"], [52, "call ___ctype_b_loc"], [53, "mov rdx, [rax]"], [54, "mov eax, [rbp+var_20]"], [55, "cdqe"], [56, "add rax, rax"], [57, "add rax, rdx"], [58, "movzx eax, word ptr [rax]"], [59, "movzx eax, ax"], [60, "and eax, 1000h"], [61, "test eax, eax"], [62, "jz loc_4013F4"], [63, "mov rax, [rbp+var_58]"], [64, "mov rdx, [rbp+var_68]"], [65, "mov rdi, rax"], [66, "call rdx"], [67, "mov [rbp+var_44], eax"], [68, "call ___ctype_b_loc"], [69, "mov rdx, [rax]"], [70, "mov eax, [rbp+var_44]"], [71, "cdqe"], [72, "add rax, rax"], [73, "add rax, rdx"], [74, "movzx eax, word ptr [rax]"], [75, "movzx eax, ax"], [76, "and eax, 1000h"], [77, "test eax, eax"], [78, "jnz short loc_4013B9"], [79, "mov rax, cs:stderr"], [80, "mov edx, [rbp+var_44]"], [81, "mov esi, offset format"], [82, "mov rdi, rax"], [83, "mov eax, 0"], [84, "call _fprintf"], [85, "jmp loc_401608"], [86, "mov eax, [rbp+var_20]"], [87, "movsx eax, al"], [88, "mov edi, eax"], [89, "call sub_4011C2"], [90, "shl eax, 4"], [91, "mov ebx, eax"], [92, "mov eax, [rbp+var_44]"], [93, "movsx eax, al"], [94, "mov edi, eax"], [95, "call sub_4011C2"], [96, "lea ecx, [rbx+rax]"], [97, "mov rax, [rbp+var_60]"], [98, "mov rdx, [rbp+var_70]"], [99, "mov rsi, rax"], [100, "mov edi, ecx"], [101, "call rdx"], [102, "add [rbp+var_18], 1"], [103, "jmp loc_4012A1"], [104, "cmp [rbp+var_20], 2Eh "], [105, "jnz loc_4014C7"], [106, "mov [rbp+var_24], 0"], [107, "jmp short loc_40145B"], [108, "mov rax, [rbp+var_58]"], [109, "mov rdx, [rbp+var_68]"], [110, "mov rdi, rax"], [111, "call rdx"], [112, "mov [rbp+var_3C], eax"], [113, "call ___ctype_b_loc"], [114, "mov rdx, [rax]"], [115, "mov eax, [rbp+var_3C]"], [116, "cdqe"], [117, "add rax, rax"], [118, "add rax, rdx"], [119, "movzx eax, word ptr [rax]"], [120, "movzx eax, ax"], [121, "and eax, 800h"], [122, "test eax, eax"], [123, "jnz short loc_40143F"], [124, "cmp [rbp+var_3C], 2Dh "], [125, "jnz short loc_401453"], [126, "mov eax, [rbp+var_24]"], [127, "lea edx, [rax+1]"], [128, "mov [rbp+var_24], edx"], [129, "mov edx, [rbp+var_3C]"], [130, "cdqe"], [131, "mov [rbp+rax+nptr], dl"], [132, "jmp short loc_40145B"], [133, "mov eax, [rbp+var_3C]"], [134, "mov [rbp+var_1C], eax"], [135, "jmp short loc_401461"], [136, "cmp [rbp+var_24], 3"], [137, "jle short loc_401407"], [138, "mov eax, [rbp+var_24]"], [139, "cdqe"], [140, "mov [rbp+rax+nptr], 0"], [141, "cmp [rbp+var_24], 0"], [142, "jle short loc_401477"], [143, "cmp [rbp+var_24], 4"], [144, "jle short loc_401499"], [145, "mov rax, cs:stderr"], [146, "lea rdx, [rbp+nptr]"], [147, "mov esi, offset aErrorInvalidIn"], [148, "mov rdi, rax"], [149, "mov eax, 0"], [150, "call _fprintf"], [151, "jmp loc_401608"], [152, "lea rax, [rbp+nptr]"], [153, "mov rdi, rax"], [154, "call _atoi"], [155, "mov [rbp+var_40], eax"], [156, "mov eax, [rbp+var_40]"], [157, "movzx eax, al"], [158, "mov rdx, [rbp+var_60]"], [159, "mov rcx, [rbp+var_70]"], [160, "mov rsi, rdx"], [161, "mov edi, eax"], [162, "call rcx"], [163, "add [rbp+var_18], 1"], [164, "jmp loc_4012A1"], [165, "cmp [rbp+var_20], 22h "], [166, "jnz loc_401577"], [167, "mov rax, [rbp+var_58]"], [168, "mov rdx, [rbp+var_68]"], [169, "mov rdi, rax"], [170, "call rdx"], [171, "mov [rbp+var_30], eax"], [172, "cmp [rbp+var_30], 0FFFFFFFFh"], [173, "jz loc_4012A1"], [174, "cmp [rbp+var_30], 22h "], [175, "jz loc_4012A1"], [176, "cmp [rbp+var_30], 5Ch "], [177, "jnz short loc_40155B"], [178, "mov rax, [rbp+var_58]"], [179, "mov rdx, [rbp+var_68]"], [180, "mov rdi, rax"], [181, "call rdx"], [182, "mov [rbp+var_34], eax"], [183, "mov eax, [rbp+var_34]"], [184, "mov edi, eax"], [185, "call sub_401200"], [186, "mov [rbp+var_38], eax"], [187, "cmp [rbp+var_38], 0"], [188, "jns short loc_40153F"], [189, "mov rax, cs:stderr"], [190, "mov edx, [rbp+var_34]"], [191, "mov esi, offset aErrorInvalidEs"], [192, "mov rdi, rax"], [193, "mov eax, 0"], [194, "call _fprintf"], [195, "jmp loc_4015FF"], [196, "mov rdx, [rbp+var_60]"], [197, "mov eax, [rbp+var_38]"], [198, "mov rcx, [rbp+var_70]"], [199, "mov rsi, rdx"], [200, "mov edi, eax"], [201, "call rcx"], [202, "add [rbp+var_18], 1"], [203, "jmp loc_4014D1"], [204, "mov rdx, [rbp+var_60]"], [205, "mov eax, [rbp+var_30]"], [206, "mov rcx, [rbp+var_70]"], [207, "mov rsi, rdx"], [208, "mov edi, eax"], [209, "call rcx"], [210, "add [rbp+var_18], 1"], [211, "jmp loc_4014D1"], [212, "cmp [rbp+var_20], 5Ch "], [213, "jnz short loc_4015E0"], [214, "mov rax, [rbp+var_58]"], [215, "mov rdx, [rbp+var_68]"], [216, "mov rdi, rax"], [217, "call rdx"], [218, "mov [rbp+var_28], eax"], [219, "cmp [rbp+var_28], 0FFFFFFFFh"], [220, "jz short loc_401607"], [221, "mov eax, [rbp+var_28]"], [222, "mov edi, eax"], [223, "call sub_401200"], [224, "mov [rbp+var_2C], eax"], [225, "cmp [rbp+var_2C], 0"], [226, "jns short loc_4015C4"], [227, "mov rax, cs:stderr"], [228, "mov edx, [rbp+var_28]"], [229, "mov esi, offset aErrorInvalidEs"], [230, "mov rdi, rax"], [231, "mov eax, 0"], [232, "call _fprintf"], [233, "jmp short loc_401608"], [234, "mov rdx, [rbp+var_60]"], [235, "mov eax, [rbp+var_2C]"], [236, "mov rcx, [rbp+var_70]"], [237, "mov rsi, rdx"], [238, "mov edi, eax"], [239, "call rcx"], [240, "add [rbp+var_18], 1"], [241, "jmp loc_4012A1"], [242, "mov rax, cs:stderr"], [243, "mov edx, [rbp+var_20]"], [244, "mov esi, offset aErrorUnrecogni"], [245, "mov rdi, rax"], [246, "mov eax, 0"], [247, "call _fprintf"], [248, "jmp short loc_401608"], [249, "nop"], [250, "jmp loc_4012A1"], [251, "nop"], [252, "jmp short loc_401608"], [253, "nop"], [254, "mov rax, [rbp+var_18]"], [255, "mov rbx, [rbp+var_8]"], [256, "leave"], [257, "retn"]], "data_dep": [[10, 134], [10, 14], [10, 9], [11, 10], [12, 134], [12, 14], [12, 9], [13, 12], [16, 4], [17, 6], [18, 16], [19, 17], [20, 19], [21, 20], [21, 13], [22, 21], [24, 23], [25, 20], [25, 13], [27, 25], [28, 27], [28, 24], [29, 28], [30, 29], [31, 30], [32, 31], [33, 32], [34, 20], [34, 13], [35, 34], [36, 20], [36, 13], [37, 36], [38, 20], [38, 13], [39, 38], [40, 4], [41, 6], [42, 40], [43, 41], [44, 43], [45, 44], [46, 45], [47, 44], [48, 47], [49, 44], [50, 49], [53, 52], [54, 13], [54, 20], [56, 54], [57, 56], [57, 53], [58, 57], [59, 58], [60, 59], [61, 60], [62, 61], [63, 4], [64, 6], [65, 63], [66, 64], [67, 66], [69, 68], [70, 67], [72, 70], [73, 69], [73, 72], [74, 73], [75, 74], [76, 75], [77, 76], [78, 77], [80, 67], [82, 79], [86, 20], [86, 13], [87, 86], [88, 87], [90, 89], [91, 90], [92, 67], [93, 92], [94, 93], [96, 95], [96, 159], [96, 236], [96, 206], [96, 96], [96, 198], [97, 5], [98, 7], [99, 97], [100, 96], [101, 98], [102, 210], [102, 8], [102, 102], [102, 202], [102, 163], [102, 240], [104, 20], [104, 13], [105, 104], [108, 4], [109, 6], [110, 108], [111, 109], [112, 111], [114, 113], [115, 112], [117, 115], [118, 117], [118, 114], [119, 118], [120, 119], [121, 120], [122, 121], [123, 122], [124, 112], [125, 124], [126, 128], [126, 106], [127, 126], [127, 114], [128, 127], [129, 112], [131, 129], [131, 126], [133, 112], [134, 133], [136, 106], [136, 128], [137, 136], [138, 128], [138, 106], [140, 138], [141, 106], [141, 128], [142, 141], [143, 128], [143, 106], [144, 143], [146, 114], [146, 129], [146, 53], [148, 145], [152, 138], [153, 152], [155, 154], [156, 155], [157, 156], [158, 5], [159, 7], [160, 158], [161, 157], [162, 159], [163, 8], [163, 102], [163, 202], [163, 163], [163, 240], [163, 210], [165, 20], [165, 13], [166, 165], [167, 4], [168, 6], [169, 167], [170, 168], [171, 170], [172, 171], [173, 172], [174, 171], [175, 174], [176, 171], [177, 176], [178, 4], [179, 6], [180, 178], [181, 179], [182, 181], [183, 182], [184, 183], [186, 185], [187, 186], [188, 187], [190, 182], [192, 189], [196, 5], [197, 186], [198, 7], [199, 196], [200, 197], [201, 198], [202, 240], [202, 210], [202, 102], [202, 8], [202, 163], [202, 202], [204, 5], [205, 171], [206, 7], [207, 204], [208, 205], [209, 206], [210, 8], [210, 202], [210, 163], [210, 240], [210, 210], [210, 102], [212, 20], [212, 13], [213, 212], [214, 4], [215, 6], [216, 214], [217, 215], [218, 217], [219, 218], [220, 219], [221, 218], [222, 221], [224, 223], [225, 224], [226, 225], [228, 218], [230, 227], [234, 5], [235, 224], [236, 7], [237, 234], [238, 235], [239, 236], [240, 102], [240, 8], [240, 163], [240, 202], [240, 210], [240, 240], [243, 20], [243, 13], [245, 242], [254, 8], [254, 163], [254, 202], [254, 240], [254, 210], [254, 102], [257, 254]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/b23d3b3c6d30cab509ca26d5ffb0f0195d1f18b96b3cd80b7d9c523fb296cdf3_b23d3b3c6d30cab509ca26d5ffb0f0195d1f18b96b3cd80b7d9c523fb296cdf3.jsonl.gz", "strip_func_name": "sub_401279", "query": "\n\n\n__int64 __fastcall sub_401279(__int64 a1, __int64 a2, __int64 (__fastcall *a3)(__int64), void (__fastcall *a4)(_QWORD, __int64))\n{\nint v4; // ebx\nint v5; // eax\nint v6; // eax\nchar nptr[5]; // [rsp+23h] [rbp-4Dh] BYREF\nint v11; // [rsp+28h] [rbp-48h]\nunsigned int v12; // [rsp+2Ch] [rbp-44h]\nint v13; // [rsp+30h] [rbp-40h]\nunsigned int v14; // [rsp+34h] [rbp-3Ch]\nunsigned int v15; // [rsp+38h] [rbp-38h]\nunsigned int v16; // [rsp+3Ch] [rbp-34h]\nunsigned int v17; // [rsp+40h] [rbp-30h]\nunsigned int v18; // [rsp+44h] [rbp-2Ch]\nunsigned int v19; // [rsp+48h] [rbp-28h]\nint v20; // [rsp+4Ch] [rbp-24h]\nunsigned int v21; // [rsp+50h] [rbp-20h]\nunsigned int v22; // [rsp+54h] [rbp-1Ch]\n__int64 v23; // [rsp+58h] [rbp-18h]\n\nv23 = 0LL;\nv22 = 0;\nLABEL_2:\nwhile ( 1 )\n{\nif ( v22 )\n{\nv21 = v22;\nv22 = 0;\n}\nelse\n{\nv21 = a3(a1);\n}\nif ( v21 == -1 )\nreturn v23;\nif ( ((*__ctype_b_loc())[v21] & 0x2000) == 0 && v21 != 58 && v21 != 45 )\n{\nif ( v21 == 35 )\n{\ndo\nv11 = a3(a1);\nwhile ( v11 != -1 && v11 != 10 && v11 != 13 );\n}\nelse if ( ((*__ctype_b_loc())[v21] & 0x1000) != 0 )\n{\nv12 = a3(a1);\nif ( ((*__ctype_b_loc())[v12] & 0x1000) == 0 )\n{\nfprintf(stderr, \"Error: got non-hex digit after hex digit: '%c'\\n\", v12);\nreturn v23;\n}\nv4 = 16 * sub_4011C2(v21);\nv5 = sub_4011C2(v12);\na4((unsigned int)(v4 + v5), a2);\n++v23;\n}\nelse\n{\nswitch ( v21 )\n{\ncase '.':\nv20 = 0;\nwhile ( v20 <= 3 )\n{\nv14 = a3(a1);\nif ( ((*__ctype_b_loc())[v14] & 0x800) == 0 && v14 != 45 )\n{\nv22 = v14;\nbreak;\n}\nv6 = v20++;\nnptr[v6] = v14;\n}\nnptr[v20] = 0;\nif ( v20 <= 0 || v20 > 4 )\n{\nfprintf(stderr, \"Error: invalid integer: %s\\n\", nptr);\nreturn v23;\n}\nv13 = atoi(nptr);\na4((unsigned __int8)v13, a2);\n++v23;\nbreak;\ncase '\"':\nwhile ( 1 )\n{\nv17 = a3(a1);\nif ( v17 == -1 || v17 == 34 )\nbreak;\nif ( v17 == 92 )\n{\nv16 = a3(a1);\nv15 = sub_401200(v16);\nif ( (v15 & 0x80000000) != 0 )\n{\nfprintf(stderr, \"Error: invalid escape sequence '%c'\\n\", v16);\ngoto LABEL_2;\n}\na4(v15, a2);\n++v23;\n}\nelse\n{\na4(v17, a2);\n++v23;\n}\n}\nbreak;\ncase '\\\\':\nv19 = a3(a1);\nif ( v19 == -1 )\nreturn v23;\nv18 = sub_401200(v19);\nif ( (v18 & 0x80000000) != 0 )\n{\nfprintf(stderr, \"Error: invalid escape sequence '%c'\\n\", v19);\nreturn v23;\n}\na4(v18, a2);\n++v23;\nbreak;\ndefault:\nfprintf(stderr, \"Error: unrecognised character in input: '%c'\\n\", v21);\nreturn v23;\n}\n}\n}\n}\n}\n\n\n\nQ:[a3,a4,a1,a2,nptr,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,sub_401279,sub_4011C2,sub_401200,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'read_cb', 'a4': 'write_cb', 'a1': 'input', 'a2': 'output', 'nptr': 'chars', 'v11': 'chr2', 'v12': 'chr2_0', 'v13': 'num', 'v14': 'chr2_1', 'v15': 'escaped', 'v16': 'chr3', 'v17': 'chr2_2', 'v18': 'escaped_0', 'v19': 'chr2_3', 'v20': 'digits', 'v21': 'chr', 'v22': 'readahead', 'v23': 'count', 'sub_401279': 'binmark_cb_to_cb', 'sub_4011C2': 'ascii_to_hex', 'sub_401200': 'escape_to_hex'}"}
parse_str
f98a28e7df450a9c09e5e577bfcbb6fd0a09e06cc912fe81b95ae2cdb045e015
emersion
mrsh
NA
static bool parse_str(struct mrsh_parser *parser, const char *str) { size_t len = strlen(str); for (size_t i = 0; i < len; ++i) { parser_peek(parser, NULL, i + 1); if (parser->buf.data[i] != str[i]) { return false; } } parser_read(parser, NULL, len); return true; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41AC06", "function_addr": 4303878, "binary_name": "f98a28e7df450a9c09e5e577bfcbb6fd0a09e06cc912fe81b95ae2cdb045e015.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+s], rsi"], [5, "mov rax, [rbp+s]"], [6, "mov rdi, rax"], [7, "call _strlen"], [8, "mov [rbp+var_10], rax"], [9, "mov [rbp+var_8], 0"], [10, "jmp short loc_41AC79"], [11, "mov rax, [rbp+var_8]"], [12, "lea rdx, [rax+1]"], [13, "mov rax, [rbp+var_18]"], [14, "mov esi, 0"], [15, "mov rdi, rax"], [16, "call sub_409387"], [17, "mov rax, [rbp+var_18]"], [18, "mov rdx, [rax+18h]"], [19, "mov rax, [rbp+var_8]"], [20, "add rax, rdx"], [21, "movzx edx, byte ptr [rax]"], [22, "mov rcx, [rbp+s]"], [23, "mov rax, [rbp+var_8]"], [24, "add rax, rcx"], [25, "movzx eax, byte ptr [rax]"], [26, "cmp dl, al"], [27, "jz short loc_41AC74"], [28, "mov eax, 0"], [29, "jmp short locret_41AC9D"], [30, "add [rbp+var_8], 1"], [31, "mov rax, [rbp+var_8]"], [32, "cmp rax, [rbp+var_10]"], [33, "jb short loc_41AC30"], [34, "mov rdx, [rbp+var_10]"], [35, "mov rax, [rbp+var_18]"], [36, "mov esi, 0"], [37, "mov rdi, rax"], [38, "call sub_4094C8"], [39, "mov eax, 1"], [40, "leave"], [41, "retn"]], "data_dep": [[5, 4], [6, 5], [8, 7], [11, 9], [11, 30], [12, 21], [12, 11], [13, 3], [15, 13], [17, 3], [18, 17], [19, 9], [19, 30], [20, 19], [20, 18], [21, 20], [22, 4], [23, 9], [23, 30], [24, 23], [24, 22], [25, 24], [26, 21], [26, 25], [27, 26], [30, 9], [30, 30], [31, 9], [31, 30], [32, 31], [32, 8], [33, 32], [34, 8], [35, 3], [37, 35], [41, 39], [41, 28]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/f98a28e7df450a9c09e5e577bfcbb6fd0a09e06cc912fe81b95ae2cdb045e015_f98a28e7df450a9c09e5e577bfcbb6fd0a09e06cc912fe81b95ae2cdb045e015.jsonl.gz", "strip_func_name": "sub_41AC06", "query": "\n\n\n__int64 __fastcall sub_41AC06(__int64 a1, const char *a2)\n{\nsize_t v3; // [rsp+10h] [rbp-10h]\nsize_t i; // [rsp+18h] [rbp-8h]\n\nv3 = strlen(a2);\nfor ( i = 0LL; i < v3; ++i )\n{\nsub_409387(a1, 0LL, i + 1);\nif ( *(_BYTE *)(*(_QWORD *)(a1 + 24) + i) != a2[i] )\nreturn 0LL;\n}\nsub_4094C8(a1, 0LL, v3);\nreturn 1LL;\n}\n\n\n\nQ:[a1,a2,v3,sub_41AC06,sub_409387,sub_4094C8,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'parser', 'a2': 'str', 'v3': 'len', 'sub_41AC06': 'parse_str', 'sub_409387': 'parser_peek', 'sub_4094C8': 'parser_read'}"}
ConstraintsCPY
766fcda9ae8f843f16029f36de9fe2b19ddfd2d7a292f41ecb27d8ce5fd424d3
mindThomas
Kugle-MATLAB
NA
void ConstraintsCPY( Constraints* FROM, Constraints* TO ) { int i; TO->n = FROM->n; TO->noLower = FROM->noLower; TO->noUpper = FROM->noUpper; if ( FROM->n != 0 ) { for( i=0; i<TO->n; ++i ) { TO->type[i] = FROM->type[i]; TO->status[i] = FROM->status[i]; } } IndexlistCPY( &(FROM->active),&(TO->active) ); IndexlistCPY( &(FROM->inactive),&(TO->inactive) ); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42A723", "function_addr": 4368163, "binary_name": "766fcda9ae8f843f16029f36de9fe2b19ddfd2d7a292f41ecb27d8ce5fd424d3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov rax, [rbp+var_18]"], [6, "mov edx, [rax]"], [7, "mov rax, [rbp+var_20]"], [8, "mov [rax], edx"], [9, "mov rax, [rbp+var_18]"], [10, "mov edx, [rax+324h]"], [11, "mov rax, [rbp+var_20]"], [12, "mov [rax+324h], edx"], [13, "mov rax, [rbp+var_18]"], [14, "mov edx, [rax+328h]"], [15, "mov rax, [rbp+var_20]"], [16, "mov [rax+328h], edx"], [17, "mov rax, [rbp+var_18]"], [18, "mov eax, [rax]"], [19, "test eax, eax"], [20, "jz short loc_42A7C9"], [21, "mov [rbp+var_4], 0"], [22, "jmp short loc_42A7BE"], [23, "mov rax, [rbp+var_18]"], [24, "mov edx, [rbp+var_4]"], [25, "movsxd rdx, edx"], [26, "mov ecx, [rax+rdx*4+4]"], [27, "mov rax, [rbp+var_20]"], [28, "mov edx, [rbp+var_4]"], [29, "movsxd rdx, edx"], [30, "mov [rax+rdx*4+4], ecx"], [31, "mov rax, [rbp+var_18]"], [32, "mov edx, [rbp+var_4]"], [33, "movsxd rdx, edx"], [34, "add rdx, 64h "], [35, "mov edx, [rax+rdx*4+4]"], [36, "mov rax, [rbp+var_20]"], [37, "mov ecx, [rbp+var_4]"], [38, "movsxd rcx, ecx"], [39, "add rcx, 64h "], [40, "mov [rax+rcx*4+4], edx"], [41, "add [rbp+var_4], 1"], [42, "mov rax, [rbp+var_20]"], [43, "mov eax, [rax]"], [44, "cmp [rbp+var_4], eax"], [45, "jl short loc_42A77A"], [46, "mov rax, [rbp+var_20]"], [47, "lea rdx, [rax+32Ch]"], [48, "mov rax, [rbp+var_18]"], [49, "add rax, 32Ch"], [50, "mov rsi, rdx"], [51, "mov rdi, rax"], [52, "call sub_42C080"], [53, "mov rax, [rbp+var_20]"], [54, "lea rdx, [rax+660h]"], [55, "mov rax, [rbp+var_18]"], [56, "add rax, 660h"], [57, "mov rsi, rdx"], [58, "mov rdi, rax"], [59, "call sub_42C080"], [60, "nop"], [61, "leave"], [62, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 4], [8, 6], [8, 7], [9, 3], [10, 8], [10, 9], [11, 4], [12, 10], [12, 11], [13, 3], [14, 13], [14, 12], [15, 4], [16, 15], [16, 14], [17, 3], [18, 17], [18, 16], [18, 8], [19, 18], [20, 19], [23, 3], [24, 21], [24, 41], [25, 24], [26, 30], [26, 23], [26, 16], [26, 40], [26, 8], [26, 12], [27, 4], [28, 21], [28, 41], [29, 28], [30, 27], [30, 26], [31, 3], [32, 21], [32, 41], [33, 32], [34, 33], [35, 30], [35, 31], [36, 4], [37, 21], [37, 41], [38, 37], [39, 38], [40, 36], [40, 35], [41, 21], [41, 41], [42, 4], [43, 12], [43, 30], [43, 16], [43, 8], [43, 40], [43, 42], [44, 21], [44, 41], [44, 43], [45, 44], [46, 4], [47, 16], [47, 40], [47, 8], [47, 35], [47, 46], [47, 12], [47, 30], [47, 14], [48, 3], [49, 48], [50, 47], [51, 49], [53, 4], [54, 40], [54, 8], [54, 12], [54, 30], [54, 53], [54, 16], [54, 47], [55, 3], [56, 55], [57, 54], [58, 56], [62, 59]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/766fcda9ae8f843f16029f36de9fe2b19ddfd2d7a292f41ecb27d8ce5fd424d3_766fcda9ae8f843f16029f36de9fe2b19ddfd2d7a292f41ecb27d8ce5fd424d3.jsonl.gz", "strip_func_name": "sub_42A723", "query": "\n\n\n__int64 __fastcall sub_42A723(_DWORD *a1, _DWORD *a2)\n{\nint i; // [rsp+1Ch] [rbp-4h]\n\n*a2 = *a1;\na2[201] = a1[201];\na2[202] = a1[202];\nif ( *a1 )\n{\nfor ( i = 0; i < *a2; ++i )\n{\na2[i + 1] = a1[i + 1];\na2[i + 101] = a1[i + 101];\n}\n}\nsub_42C080(a1 + 203, a2 + 203);\nreturn sub_42C080(a1 + 408, a2 + 408);\n}\n\n\n\nQ:[a1,a2,sub_42A723,sub_42C080,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'FROM', 'a2': 'TO', 'sub_42A723': 'ConstraintsCPY', 'sub_42C080': 'IndexlistCPY'}"}
check_str_eq
4c29e2570dae32ac48ec047c2899deb56754c761ed786d7f743cd03ba3376c28
ShadowsocksR-Live
shadowsocksr-native
NA
static inline int check_str_eq (const struct message *m, const char *prop, const char *expected, const char *found) { if ((expected == NULL) != (found == NULL)) { printf("\n*** Error: %s in '%s' ***\n\n", prop, m->name); printf("expected %s\n", (expected == NULL) ? "NULL" : expected); printf(" found %s\n", (found == NULL) ? "NULL" : found); return 0; } if (expected != NULL && 0 != strcmp(expected, found)) { printf("\n*** Error: %s in '%s' ***\n\n", prop, m->name); printf("expected '%s'\n", expected); printf(" found '%s'\n", found); return 0; } return 1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_408841", "function_addr": 4229185, "binary_name": "4c29e2570dae32ac48ec047c2899deb56754c761ed786d7f743cd03ba3376c28.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+s1], rdx"], [6, "mov [rbp+s2], rcx"], [7, "cmp [rbp+s1], 0"], [8, "setz dl"], [9, "cmp [rbp+s2], 0"], [10, "setz al"], [11, "xor eax, edx"], [12, "test al, al"], [13, "jz short loc_4088DB"], [14, "mov rax, [rbp+var_8]"], [15, "mov rdx, [rax]"], [16, "mov rax, [rbp+var_10]"], [17, "mov rsi, rax"], [18, "mov edi, offset format"], [19, "mov eax, 0"], [20, "call _printf"], [21, "cmp [rbp+s1], 0"], [22, "jz short loc_408899"], [23, "mov rax, [rbp+s1]"], [24, "jmp short loc_40889E"], [25, "mov eax, offset aNull"], [26, "mov rsi, rax"], [27, "mov edi, offset aExpectedS"], [28, "mov eax, 0"], [29, "call _printf"], [30, "cmp [rbp+s2], 0"], [31, "jz short loc_4088BD"], [32, "mov rax, [rbp+s2]"], [33, "jmp short loc_4088C2"], [34, "mov eax, offset aNull"], [35, "mov rsi, rax"], [36, "mov edi, offset aFoundS"], [37, "mov eax, 0"], [38, "call _printf"], [39, "mov eax, 0"], [40, "jmp short locret_40894E"], [41, "cmp [rbp+s1], 0"], [42, "jz short loc_408949"], [43, "mov rdx, [rbp+s2]"], [44, "mov rax, [rbp+s1]"], [45, "mov rsi, rdx"], [46, "mov rdi, rax"], [47, "call _strcmp"], [48, "test eax, eax"], [49, "jz short loc_408949"], [50, "mov rax, [rbp+var_8]"], [51, "mov rdx, [rax]"], [52, "mov rax, [rbp+var_10]"], [53, "mov rsi, rax"], [54, "mov edi, offset format"], [55, "mov eax, 0"], [56, "call _printf"], [57, "mov rax, [rbp+s1]"], [58, "mov rsi, rax"], [59, "mov edi, offset aExpectedS_0"], [60, "mov eax, 0"], [61, "call _printf"], [62, "mov rax, [rbp+s2]"], [63, "mov rsi, rax"], [64, "mov edi, offset aFoundS_0"], [65, "mov eax, 0"], [66, "call _printf"], [67, "mov eax, 0"], [68, "jmp short locret_40894E"], [69, "mov eax, 1"], [70, "leave"], [71, "retn"]], "data_dep": [[7, 5], [8, 7], [9, 6], [10, 9], [11, 8], [11, 10], [12, 11], [13, 12], [14, 3], [15, 14], [16, 4], [17, 16], [21, 5], [22, 21], [23, 5], [26, 23], [26, 25], [30, 6], [31, 30], [32, 6], [35, 32], [35, 34], [41, 5], [42, 41], [43, 6], [44, 5], [45, 43], [46, 44], [48, 47], [49, 48], [50, 3], [51, 50], [52, 4], [53, 52], [57, 5], [58, 57], [62, 6], [63, 62], [71, 67], [71, 39], [71, 69]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/4c29e2570dae32ac48ec047c2899deb56754c761ed786d7f743cd03ba3376c28_4c29e2570dae32ac48ec047c2899deb56754c761ed786d7f743cd03ba3376c28.jsonl.gz", "strip_func_name": "sub_408841", "query": "\n\n\n__int64 __fastcall sub_408841(const char **a1, const char *a2, const char *a3, const char *a4)\n{\nconst char *v4; // rax\nconst char *v5; // rax\n__int64 result; // rax\n\nif ( (a3 == 0LL) != (a4 == 0LL) )\n{\nprintf(\"\\n*** Error: %s in '%s' ***\\n\\n\", a2, *a1);\nif ( a3 )\nv4 = a3;\nelse\nv4 = \"NULL\";\nprintf(\"expected %s\\n\", v4);\nif ( a4 )\nv5 = a4;\nelse\nv5 = \"NULL\";\nprintf(\" found %s\\n\", v5);\nresult = 0LL;\n}\nelse if ( !a3 || !strcmp(a3, a4) )\n{\nresult = 1LL;\n}\nelse\n{\nprintf(\"\\n*** Error: %s in '%s' ***\\n\\n\", a2, *a1);\nprintf(\"expected '%s'\\n\", a3);\nprintf(\" found '%s'\\n\", a4);\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,v4,sub_408841,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'expected', 'a4': 'found', 'a1': 'm', 'a2': 'prop', 'v4': 'result', 'sub_408841': 'check_str_eq'}"}
OptDumpOptions
d4d6e62ec6bd027ec9b7879f172ad4cafeb75ad8a3a7b999a62f803b758a2422
MEGA65
mega65-tools
NA
static void OptDumpOptions (const char* Opt attribute ((unused)), const char* Arg attribute ((unused))) /* Dump the object file options */ { What |= D_OPTIONS; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403505", "function_addr": 4207877, "binary_name": "d4d6e62ec6bd027ec9b7879f172ad4cafeb75ad8a3a7b999a62f803b758a2422.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov [rbp+var_10], rsi"], [4, "mov eax, cs:dword_40B16C"], [5, "or eax, 2"], [6, "mov cs:dword_40B16C, eax"], [7, "nop"], [8, "pop rbp"], [9, "retn"]], "data_dep": [[5, 4], [6, 5], [8, 0], [9, 5]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d4d6e62ec6bd027ec9b7879f172ad4cafeb75ad8a3a7b999a62f803b758a2422_d4d6e62ec6bd027ec9b7879f172ad4cafeb75ad8a3a7b999a62f803b758a2422.jsonl.gz", "strip_func_name": "sub_403505", "query": "\n\n\n__int64 sub_403505()\n{\n__int64 result; // rax\n\nresult = dword_40B16C | 2u;\ndword_40B16C |= 2u;\nreturn result;\n}\n\n\n\nQ:[sub_403505,]\nAssistant: ", "hints": "[]", "response": "{'sub_403505': 'OptDumpOptions'}"}
fb_coalesce
f14a1d20dccae52d0374ff0cd8bebddd7da7d0aa9709a541936e521303fbdf2f
TobleMiner
shoreline
NA
int fb_coalesce(struct fb* fb, struct llist* fbs) { struct llist_entry* cursor; struct fb* other; size_t i, j, fb_size = fb->size.width * fb->size.height, num_fbs = llist_length(fbs); unsigned int indices[num_fbs]; for(i = 0; i < num_fbs; i++) { indices[i] = i; } ARRAY_SHUFFLE(indices, num_fbs); for(i = 0; i < num_fbs; i++) { cursor = llist_get_entry(fbs, indices[i]); other = llist_entry_get_value(cursor, struct fb, list); if(fb->size.width != other->size.width || fb->size.height != other->size.height) { return -EINVAL; } for(j = 0; j < fb_size; j++) { if(other->pixels[j].color.alpha == 0) { continue; } #ifdef FEATURE_ALPHA_BLENDING if(other->pixels[j].color.alpha == 0xff) { fb->pixels[j] = other->pixels[j]; } else { FB_ALPHA_BLEND_PIXEL(fb->pixels[j], other->pixels[j], fb->pixels[j]); } #else fb->pixels[j] = other->pixels[j]; #endif // Reset to fully transparent other->pixels[j].color.alpha = 0; } } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40423C", "function_addr": 4211260, "binary_name": "f14a1d20dccae52d0374ff0cd8bebddd7da7d0aa9709a541936e521303fbdf2f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r15"], [3, "push r14"], [4, "push r13"], [5, "push r12"], [6, "push rbx"], [7, "sub rsp, 78h"], [8, "mov [rbp+var_98], rdi"], [9, "mov [rbp+var_A0], rsi"], [10, "mov rax, rsp"], [11, "mov rbx, rax"], [12, "mov rax, [rbp+var_98]"], [13, "mov edx, [rax]"], [14, "mov rax, [rbp+var_98]"], [15, "mov eax, [rax+4]"], [16, "imul eax, edx"], [17, "mov eax, eax"], [18, "mov [rbp+var_50], rax"], [19, "mov rax, [rbp+var_A0]"], [20, "mov rdi, rax"], [21, "call sub_404752"], [22, "mov [rbp+var_58], rax"], [23, "mov rax, [rbp+var_58]"], [24, "mov rdx, rax"], [25, "sub rdx, 1"], [26, "mov [rbp+var_60], rdx"], [27, "mov r14, rax"], [28, "mov r15d, 0"], [29, "mov r12, rax"], [30, "mov r13d, 0"], [31, "lea rdx, ds:0[rax*4]"], [32, "mov eax, 10h"], [33, "sub rax, 1"], [34, "add rax, rdx"], [35, "mov esi, 10h"], [36, "mov edx, 0"], [37, "div rsi"], [38, "imul rax, 10h"], [39, "sub rsp, rax"], [40, "mov rax, rsp"], [41, "add rax, 3"], [42, "shr rax, 2"], [43, "shl rax, 2"], [44, "mov [rbp+var_68], rax"], [45, "mov [rbp+var_48], 0"], [46, "jmp short loc_40430C"], [47, "mov rax, [rbp+var_48]"], [48, "mov ecx, eax"], [49, "mov rax, [rbp+var_68]"], [50, "mov rdx, [rbp+var_48]"], [51, "mov [rax+rdx*4], ecx"], [52, "add [rbp+var_48], 1"], [53, "mov rax, [rbp+var_48]"], [54, "cmp rax, [rbp+var_58]"], [55, "jb short loc_4042F6"], [56, "mov [rbp+var_38], 0"], [57, "jmp loc_4043A6"], [58, "call _rand"], [59, "movsxd rcx, eax"], [60, "mov rax, [rbp+var_58]"], [61, "sub rax, [rbp+var_38]"], [62, "mov rsi, rax"], [63, "mov eax, 7FFFFFFFh"], [64, "mov edx, 0"], [65, "div rsi"], [66, "lea rdi, [rax+1]"], [67, "mov rax, rcx"], [68, "mov edx, 0"], [69, "div rdi"], [70, "mov rdx, rax"], [71, "mov rax, [rbp+var_38]"], [72, "add rax, rdx"], [73, "mov [rbp+var_88], rax"], [74, "mov rax, [rbp+var_68]"], [75, "mov rdx, [rbp+var_88]"], [76, "mov eax, [rax+rdx*4]"], [77, "mov [rbp+var_8C], eax"], [78, "mov rax, [rbp+var_68]"], [79, "mov rdx, [rbp+var_38]"], [80, "mov ecx, [rax+rdx*4]"], [81, "mov rax, [rbp+var_68]"], [82, "mov rdx, [rbp+var_88]"], [83, "mov [rax+rdx*4], ecx"], [84, "mov rax, [rbp+var_68]"], [85, "mov rdx, [rbp+var_38]"], [86, "mov ecx, [rbp+var_8C]"], [87, "mov [rax+rdx*4], ecx"], [88, "add [rbp+var_38], 1"], [89, "mov rax, [rbp+var_38]"], [90, "add rax, 1"], [91, "cmp [rbp+var_58], rax"], [92, "ja loc_404323"], [93, "mov [rbp+var_48], 0"], [94, "jmp loc_4044AA"], [95, "mov rax, [rbp+var_68]"], [96, "mov rdx, [rbp+var_48]"], [97, "mov edx, [rax+rdx*4]"], [98, "mov rax, [rbp+var_A0]"], [99, "mov esi, edx"], [100, "mov rdi, rax"], [101, "call sub_40478C"], [102, "mov [rbp+var_70], rax"], [103, "mov rax, [rbp+var_70]"], [104, "mov [rbp+var_78], rax"], [105, "mov rax, [rbp+var_78]"], [106, "sub rax, 18h"], [107, "mov [rbp+var_80], rax"], [108, "mov rax, [rbp+var_98]"], [109, "mov edx, [rax]"], [110, "mov rax, [rbp+var_80]"], [111, "mov eax, [rax]"], [112, "cmp edx, eax"], [113, "jnz short loc_404421"], [114, "mov rax, [rbp+var_98]"], [115, "mov edx, [rax+4]"], [116, "mov rax, [rbp+var_80]"], [117, "mov eax, [rax+4]"], [118, "cmp edx, eax"], [119, "jz short loc_40442B"], [120, "mov eax, 0FFFFFFEAh"], [121, "jmp loc_4044BD"], [122, "mov [rbp+var_40], 0"], [123, "jmp short loc_40449B"], [124, "mov rax, [rbp+var_80]"], [125, "mov rdx, [rax+8]"], [126, "mov rax, [rbp+var_40]"], [127, "shl rax, 2"], [128, "add rax, rdx"], [129, "movzx eax, byte ptr [rax]"], [130, "test al, al"], [131, "jz short loc_404495"], [132, "mov rax, [rbp+var_80]"], [133, "mov rdx, [rax+8]"], [134, "mov rax, [rbp+var_40]"], [135, "shl rax, 2"], [136, "lea rcx, [rdx+rax]"], [137, "mov rax, [rbp+var_98]"], [138, "mov rdx, [rax+8]"], [139, "mov rax, [rbp+var_40]"], [140, "shl rax, 2"], [141, "add rdx, rax"], [142, "mov eax, [rcx]"], [143, "mov [rdx], eax"], [144, "mov rax, [rbp+var_80]"], [145, "mov rdx, [rax+8]"], [146, "mov rax, [rbp+var_40]"], [147, "shl rax, 2"], [148, "add rax, rdx"], [149, "mov byte ptr [rax], 0"], [150, "jmp short loc_404496"], [151, "nop"], [152, "add [rbp+var_40], 1"], [153, "mov rax, [rbp+var_40]"], [154, "cmp rax, [rbp+var_50]"], [155, "jb short loc_404435"], [156, "add [rbp+var_48], 1"], [157, "mov rax, [rbp+var_48]"], [158, "cmp rax, [rbp+var_58]"], [159, "jb loc_4043C5"], [160, "mov eax, 0"], [161, "mov rsp, rbx"], [162, "lea rsp, [rbp-28h]"], [163, "pop rbx"], [164, "pop r12"], [165, "pop r13"], [166, "pop r14"], [167, "pop r15"], [168, "pop rbp"], [169, "retn"]], "data_dep": [[10, 7], [11, 10], [12, 8], [13, 12], [14, 8], [15, 14], [16, 13], [16, 15], [17, 16], [18, 17], [19, 9], [20, 19], [22, 21], [23, 22], [24, 23], [25, 24], [26, 25], [27, 23], [29, 23], [31, 25], [33, 32], [34, 31], [34, 33], [37, 35], [38, 34], [39, 7], [39, 38], [40, 39], [41, 40], [42, 41], [43, 42], [44, 43], [47, 52], [47, 45], [48, 47], [49, 44], [50, 52], [50, 45], [51, 49], [51, 48], [52, 52], [52, 45], [53, 52], [53, 45], [54, 22], [54, 53], [55, 54], [59, 58], [60, 22], [61, 56], [61, 88], [61, 60], [62, 61], [65, 62], [66, 69], [66, 87], [66, 63], [66, 20], [66, 51], [66, 83], [67, 59], [69, 66], [70, 67], [71, 56], [71, 88], [72, 70], [72, 71], [73, 72], [74, 44], [75, 73], [76, 74], [76, 51], [76, 83], [76, 87], [77, 76], [78, 44], [79, 88], [79, 56], [80, 51], [80, 83], [80, 78], [80, 87], [81, 44], [82, 73], [83, 80], [83, 81], [84, 44], [85, 56], [85, 88], [86, 77], [87, 84], [87, 86], [88, 56], [88, 88], [89, 56], [89, 88], [90, 89], [91, 22], [91, 90], [92, 91], [95, 44], [96, 156], [96, 93], [97, 95], [97, 51], [97, 83], [97, 149], [97, 87], [97, 143], [98, 9], [99, 97], [100, 98], [102, 101], [103, 102], [104, 103], [105, 104], [106, 105], [107, 106], [108, 8], [109, 51], [109, 108], [109, 83], [109, 149], [109, 87], [109, 143], [110, 107], [111, 83], [111, 110], [111, 149], [111, 87], [111, 143], [111, 51], [112, 109], [112, 111], [113, 112], [114, 8], [115, 87], [115, 114], [115, 143], [115, 51], [115, 83], [115, 149], [116, 107], [117, 83], [117, 149], [117, 87], [117, 116], [117, 143], [117, 51], [118, 115], [118, 117], [119, 118], [124, 107], [125, 143], [125, 51], [125, 124], [125, 83], [125, 149], [125, 87], [126, 152], [126, 122], [127, 126], [128, 125], [128, 127], [129, 128], [129, 143], [129, 51], [129, 83], [129, 149], [129, 87], [130, 129], [131, 130], [132, 107], [133, 132], [133, 143], [133, 51], [133, 83], [133, 149], [133, 87], [134, 122], [134, 152], [135, 134], [136, 149], [136, 48], [136, 87], [136, 135], [136, 86], [136, 143], [136, 136], [136, 83], [136, 51], [137, 8], [138, 149], [138, 87], [138, 137], [138, 143], [138, 51], [138, 83], [139, 152], [139, 122], [140, 139], [141, 138], [141, 140], [142, 143], [142, 136], [142, 51], [142, 83], [142, 149], [142, 87], [143, 142], [143, 141], [144, 107], [145, 144], [145, 143], [146, 122], [146, 152], [147, 146], [148, 145], [148, 147], [149, 148], [152, 122], [152, 152], [153, 152], [153, 122], [154, 153], [154, 18], [155, 154], [156, 156], [156, 93], [157, 93], [157, 156], [158, 157], [158, 22], [159, 158], [161, 11], [162, 161], [163, 6], [164, 5], [165, 4], [166, 3], [167, 2], [168, 0], [169, 120], [169, 160]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/f14a1d20dccae52d0374ff0cd8bebddd7da7d0aa9709a541936e521303fbdf2f_f14a1d20dccae52d0374ff0cd8bebddd7da7d0aa9709a541936e521303fbdf2f.jsonl.gz", "strip_func_name": "sub_40423C", "query": "\n\n\n__int64 __fastcall sub_40423C(_DWORD *a1, __int64 a2)\n{\nvoid *v2; // rsp\n__int64 v4; // [rsp+0h] [rbp-A0h] BYREF\n_DWORD *v5; // [rsp+8h] [rbp-98h]\nint v6; // [rsp+14h] [rbp-8Ch]\n__int64 v7; // [rsp+18h] [rbp-88h]\n__int64 v8; // [rsp+20h] [rbp-80h]\n__int64 v9; // [rsp+28h] [rbp-78h]\n__int64 v10; // [rsp+30h] [rbp-70h]\nunsigned __int64 v11; // [rsp+38h] [rbp-68h]\nunsigned __int64 v12; // [rsp+40h] [rbp-60h]\nunsigned __int64 v13; // [rsp+48h] [rbp-58h]\nunsigned __int64 v14; // [rsp+50h] [rbp-50h]\nunsigned __int64 i; // [rsp+58h] [rbp-48h]\nunsigned __int64 k; // [rsp+60h] [rbp-40h]\n__int64 j; // [rsp+68h] [rbp-38h]\n\nv5 = a1;\nv4 = a2;\nv14 = (unsigned int)(*a1 * a1[1]);\nv13 = sub_404752(a2);\nv12 = v13 - 1;\nv2 = alloca(16 * ((4 * v13 + 15) / 0x10));\nv11 = 4 * (((unsigned __int64)&v4 + 3) >> 2);\nfor ( i = 0LL; i < v13; ++i )\n*(_DWORD *)(v11 + 4 * i) = i;\nfor ( j = 0LL; v13 > j + 1; ++j )\n{\nv7 = rand() / (0x7FFFFFFF / (v13 - j) + 1) + j;\nv6 = *(_DWORD *)(v11 + 4 * v7);\n*(_DWORD *)(v11 + 4 * v7) = *(_DWORD *)(v11 + 4 * j);\n*(_DWORD *)(v11 + 4 * j) = v6;\n}\nfor ( i = 0LL; i < v13; ++i )\n{\nv10 = sub_40478C(v4, *(unsigned int *)(v11 + 4 * i));\nv9 = v10;\nv8 = v10 - 24;\nif ( *v5 != *(_DWORD *)(v10 - 24) || v5[1] != *(_DWORD *)(v8 + 4) )\nreturn 4294967274LL;\nfor ( k = 0LL; k < v14; ++k )\n{\nif ( *(_BYTE *)(*(_QWORD *)(v8 + 8) + 4 * k) )\n{\n*(_DWORD *)(4 * k + *((_QWORD *)v5 + 1)) = *(_DWORD *)(*(_QWORD *)(v8 + 8) + 4 * k);\n*(_BYTE *)(*(_QWORD *)(v8 + 8) + 4 * k) = 0;\n}\n}\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v4,v5,v6,v7,v8,v9,v10,v11,v13,v14,j,sub_40423C,sub_404752,sub_40478C,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'fb', 'a2': 'fbs', 'v4': 'fbsa', 'v5': 'fba', 'v6': 'tmp', 'v7': 'j_0', 'v8': 'other', 'v9': '__mptr', 'v10': 'cursor', 'v11': 'p_indices', 'v13': 'num_fbs', 'v14': 'fb_size', 'j': 'i_0', 'sub_40423C': 'fb_coalesce', 'sub_404752': 'llist_length', 'sub_40478C': 'llist_get_entry'}"}
event_cb
53faff7486da2db257c0486a573e49eb3e70656a42b3e2ad40ce428af0925783
sukesh-ak
ESP32-TUX
NA
static void event_cb(lv_event_t * e) { static int32_t last_id = -1; lv_event_code_t code = lv_event_get_code(e); lv_obj_t * obj = lv_event_get_target(e); if(code == LV_EVENT_VALUE_CHANGED) { last_id = lv_chart_get_pressed_point(obj); if(last_id != LV_CHART_POINT_NONE) { lv_chart_set_cursor_point(obj, cursor, NULL, last_id); } } else if(code == LV_EVENT_DRAW_PART_END) { lv_obj_draw_part_dsc_t * dsc = lv_event_get_draw_part_dsc(e); if(!lv_obj_draw_part_check_type(dsc, &lv_chart_class, LV_CHART_DRAW_PART_CURSOR)) return; if(dsc->p1 == NULL || dsc->p2 == NULL || dsc->p1->y != dsc->p2->y || last_id < 0) return; lv_coord_t * data_array = lv_chart_get_y_array(chart, ser); lv_coord_t v = data_array[last_id]; char buf[16]; lv_snprintf(buf, sizeof(buf), "%d", v); lv_point_t size; lv_txt_get_size(&size, buf, LV_FONT_DEFAULT, 0, 0, LV_COORD_MAX, LV_TEXT_FLAG_NONE); lv_area_t a; a.y2 = dsc->p1->y - 5; a.y1 = a.y2 - size.y - 10; a.x1 = dsc->p1->x + 10; a.x2 = a.x1 + size.x + 10; lv_draw_rect_dsc_t draw_rect_dsc; lv_draw_rect_dsc_init(&draw_rect_dsc); draw_rect_dsc.bg_color = lv_palette_main(LV_PALETTE_BLUE); draw_rect_dsc.radius = 3; lv_draw_rect(dsc->draw_ctx, &draw_rect_dsc, &a); lv_draw_label_dsc_t draw_label_dsc; lv_draw_label_dsc_init(&draw_label_dsc); draw_label_dsc.color = lv_color_white(); a.x1 += 5; a.x2 -= 5; a.y1 += 5; a.y2 -= 5; lv_draw_label(dsc->draw_ctx, &draw_label_dsc, &a, buf, NULL); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40D798", "function_addr": 4249496, "binary_name": "53faff7486da2db257c0486a573e49eb3e70656a42b3e2ad40ce428af0925783.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0D0h"], [3, "mov [rbp+var_C8], rdi"], [4, "mov rax, [rbp+var_C8]"], [5, "mov rdi, rax"], [6, "call sub_428C26"], [7, "mov [rbp+var_4], eax"], [8, "mov rax, [rbp+var_C8]"], [9, "mov rdi, rax"], [10, "call sub_428C03"], [11, "mov [rbp+var_10], rax"], [12, "cmp [rbp+var_4], 1Ch"], [13, "jnz short loc_40D820"], [14, "mov rax, [rbp+var_10]"], [15, "mov rdi, rax"], [16, "call sub_45EED6"], [17, "mov cs:dword_50D2CC, eax"], [18, "mov eax, cs:dword_50D2CC"], [19, "cmp eax, 7FFFh"], [20, "jz locret_40DA3D"], [21, "mov eax, cs:dword_50D2CC"], [22, "movzx edx, ax"], [23, "mov rsi, cs:qword_539CB8"], [24, "mov rax, [rbp+var_10]"], [25, "mov ecx, edx"], [26, "mov edx, 0"], [27, "mov rdi, rax"], [28, "call sub_45EA28"], [29, "jmp locret_40DA3D"], [30, "cmp [rbp+var_4], 1Bh"], [31, "jnz locret_40DA3D"], [32, "mov rax, [rbp+var_C8]"], [33, "mov rdi, rax"], [34, "call sub_42952B"], [35, "mov [rbp+var_18], rax"], [36, "mov rax, [rbp+var_18]"], [37, "mov edx, 5"], [38, "mov esi, offset off_4E9660"], [39, "mov rdi, rax"], [40, "call sub_41DC64"], [41, "xor eax, 1"], [42, "test al, al"], [43, "jnz loc_40DA39"], [44, "mov rax, [rbp+var_18]"], [45, "mov rax, [rax+48h]"], [46, "test rax, rax"], [47, "jz loc_40DA3C"], [48, "mov rax, [rbp+var_18]"], [49, "mov rax, [rax+50h]"], [50, "test rax, rax"], [51, "jz loc_40DA3C"], [52, "mov rax, [rbp+var_18]"], [53, "mov rax, [rax+48h]"], [54, "movzx edx, word ptr [rax+2]"], [55, "mov rax, [rbp+var_18]"], [56, "mov rax, [rax+50h]"], [57, "movzx eax, word ptr [rax+2]"], [58, "cmp dx, ax"], [59, "jnz loc_40DA3C"], [60, "mov eax, cs:dword_50D2CC"], [61, "test eax, eax"], [62, "js loc_40DA3C"], [63, "mov rdx, cs:qword_539CB0"], [64, "mov rax, cs:qword_539CA8"], [65, "mov rsi, rdx"], [66, "mov rdi, rax"], [67, "call sub_45EE99"], [68, "mov [rbp+var_20], rax"], [69, "mov eax, cs:dword_50D2CC"], [70, "cdqe"], [71, "lea rdx, [rax+rax]"], [72, "mov rax, [rbp+var_20]"], [73, "add rax, rdx"], [74, "movzx eax, word ptr [rax]"], [75, "mov [rbp+var_22], ax"], [76, "movsx edx, [rbp+var_22]"], [77, "lea rax, [rbp+var_40]"], [78, "mov ecx, edx"], [79, "mov edx, offset unk_4E6F32"], [80, "mov esi, 10h"], [81, "mov rdi, rax"], [82, "mov eax, 0"], [83, "call sub_470538"], [84, "lea rsi, [rbp+var_40]"], [85, "lea rax, [rbp+var_44]"], [86, "sub rsp, 8"], [87, "push 0"], [88, "mov r9d, 1FFFh"], [89, "mov r8d, 0"], [90, "mov ecx, 0"], [91, "mov edx, offset off_4ED060"], [92, "mov rdi, rax"], [93, "call sub_4745F5"], [94, "add rsp, 10h"], [95, "mov rax, [rbp+var_18]"], [96, "mov rax, [rax+48h]"], [97, "movzx eax, word ptr [rax+2]"], [98, "sub eax, 5"], [99, "mov [rbp+var_46], ax"], [100, "movzx eax, [rbp+var_46]"], [101, "mov edx, eax"], [102, "movzx eax, [rbp+var_42]"], [103, "mov ecx, eax"], [104, "mov eax, edx"], [105, "sub eax, ecx"], [106, "sub eax, 0Ah"], [107, "mov [rbp+var_4A], ax"], [108, "mov rax, [rbp+var_18]"], [109, "mov rax, [rax+48h]"], [110, "movzx eax, word ptr [rax]"], [111, "add eax, 0Ah"], [112, "mov [rbp+var_4C], ax"], [113, "movzx eax, [rbp+var_4C]"], [114, "mov edx, eax"], [115, "movzx eax, [rbp+var_44]"], [116, "add eax, edx"], [117, "add eax, 0Ah"], [118, "mov [rbp+var_48], ax"], [119, "lea rax, [rbp+var_90]"], [120, "mov rdi, rax"], [121, "call sub_43279A"], [122, "mov edi, 5"], [123, "call sub_46B7AF"], [124, "mov [rbp+var_8C], ax"], [125, "mov [rbp+var_90], 3"], [126, "mov rax, [rbp+var_18]"], [127, "mov rax, [rax]"], [128, "lea rdx, [rbp+var_4C]"], [129, "lea rcx, [rbp+var_90]"], [130, "mov rsi, rcx"], [131, "mov rdi, rax"], [132, "call sub_432855"], [133, "lea rax, [rbp+var_C0]"], [134, "mov rdi, rax"], [135, "call sub_42D9BE"], [136, "call sub_40D76B"], [137, "mov [rbp+var_B0], ax"], [138, "movzx eax, [rbp+var_4C]"], [139, "add eax, 5"], [140, "mov [rbp+var_4C], ax"], [141, "movzx eax, [rbp+var_48]"], [142, "sub eax, 5"], [143, "mov [rbp+var_48], ax"], [144, "movzx eax, [rbp+var_4A]"], [145, "add eax, 5"], [146, "mov [rbp+var_4A], ax"], [147, "movzx eax, [rbp+var_46]"], [148, "sub eax, 5"], [149, "mov [rbp+var_46], ax"], [150, "mov rax, [rbp+var_18]"], [151, "mov rax, [rax]"], [152, "lea rcx, [rbp+var_40]"], [153, "lea rdx, [rbp+var_4C]"], [154, "lea rsi, [rbp+var_C0]"], [155, "mov r8d, 0"], [156, "mov rdi, rax"], [157, "call sub_42DA40"], [158, "jmp short locret_40DA3D"], [159, "nop"], [160, "jmp short locret_40DA3D"], [161, "nop"], [162, "leave"], [163, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [8, 3], [9, 8], [11, 10], [12, 7], [13, 12], [14, 11], [15, 14], [17, 16], [18, 17], [19, 18], [20, 19], [21, 17], [22, 21], [24, 11], [25, 22], [27, 24], [30, 7], [31, 30], [32, 3], [33, 32], [35, 34], [36, 35], [39, 36], [41, 40], [42, 41], [43, 42], [44, 35], [45, 44], [46, 45], [47, 46], [48, 35], [49, 48], [50, 49], [51, 50], [52, 35], [53, 52], [54, 53], [55, 35], [56, 55], [57, 56], [58, 57], [58, 54], [59, 58], [61, 60], [62, 61], [65, 63], [66, 64], [68, 67], [71, 69], [71, 63], [72, 68], [73, 71], [73, 72], [74, 73], [75, 74], [76, 75], [77, 74], [78, 76], [81, 77], [84, 80], [85, 83], [86, 2], [92, 85], [94, 86], [95, 35], [96, 95], [97, 96], [98, 97], [99, 98], [100, 99], [101, 100], [103, 102], [104, 101], [105, 104], [105, 103], [106, 105], [107, 106], [108, 35], [109, 108], [110, 109], [111, 110], [112, 111], [113, 112], [114, 113], [116, 115], [116, 114], [117, 116], [118, 117], [119, 117], [120, 119], [124, 123], [126, 35], [127, 126], [128, 112], [128, 114], [129, 125], [129, 103], [130, 129], [131, 127], [133, 132], [134, 133], [137, 136], [138, 112], [139, 138], [140, 139], [141, 118], [142, 141], [143, 142], [144, 107], [145, 144], [146, 145], [147, 99], [148, 147], [149, 148], [150, 35], [151, 150], [152, 129], [153, 128], [153, 140], [154, 130], [156, 151], [163, 57], [163, 157], [163, 50], [163, 61], [163, 10], [163, 42], [163, 28], [163, 46], [163, 18]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/53faff7486da2db257c0486a573e49eb3e70656a42b3e2ad40ce428af0925783_53faff7486da2db257c0486a573e49eb3e70656a42b3e2ad40ce428af0925783.jsonl.gz", "strip_func_name": "sub_40D798", "query": "\n\n\n__int64 __fastcall sub_40D798(__int64 a1)\n{\n__int64 result; // rax\nint v2; // er8\nint v3; // er9\nchar v4[16]; // [rsp+10h] [rbp-C0h] BYREF\n__int16 v5; // [rsp+20h] [rbp-B0h]\n__int16 v6[34]; // [rsp+40h] [rbp-90h] BYREF\n__int16 v7; // [rsp+84h] [rbp-4Ch] BYREF\n__int16 v8; // [rsp+86h] [rbp-4Ah]\n__int16 v9; // [rsp+88h] [rbp-48h]\n__int16 v10; // [rsp+8Ah] [rbp-46h]\n__int16 v11[2]; // [rsp+8Ch] [rbp-44h] BYREF\nchar v12[30]; // [rsp+90h] [rbp-40h] BYREF\n__int16 v13; // [rsp+AEh] [rbp-22h]\n__int64 v14; // [rsp+B0h] [rbp-20h]\n_QWORD *v15; // [rsp+B8h] [rbp-18h]\n__int64 v16; // [rsp+C0h] [rbp-10h]\nint v17; // [rsp+CCh] [rbp-4h]\n\nv17 = sub_428C26(a1);\nresult = sub_428C03(a1);\nv16 = result;\nif ( v17 == 28 )\n{\ndword_50D2CC = sub_45EED6(v16);\nresult = (unsigned int)dword_50D2CC;\nif ( dword_50D2CC != 0x7FFF )\nresult = sub_45EA28(v16, qword_539CB8, 0LL, (unsigned __int16)dword_50D2CC);\n}\nelse if ( v17 == 27 )\n{\nv15 = (_QWORD *)sub_42952B(a1);\nresult = (unsigned int)sub_41DC64(v15, &off_4E9660, 5LL) ^ 1;\nif ( !(_BYTE)result )\n{\nresult = v15[9];\nif ( result )\n{\nresult = v15[10];\nif ( result )\n{\nresult = *(unsigned __int16 *)(v15[10] + 2LL);\nif ( *(_WORD *)(v15[9] + 2LL) == (_WORD)result )\n{\nresult = (unsigned int)dword_50D2CC;\nif ( dword_50D2CC >= 0 )\n{\nv14 = sub_45EE99(qword_539CA8, qword_539CB0);\nv13 = *(_WORD *)(2LL * dword_50D2CC + v14);\nsub_470538((unsigned int)v12, 16, (unsigned int)&unk_4E6F32, v13, v2, v3);\nsub_4745F5((unsigned int)v11, (unsigned int)v12, (unsigned int)off_4ED060, 0, 0, 0x1FFF, 0);\nv10 = *(_WORD *)(v15[9] + 2LL) - 5;\nv8 = v10 - v11[1] - 10;\nv7 = *(_WORD *)v15[9] + 10;\nv9 = v7 + v11[0] + 10;\nsub_43279A(v6);\nv6[2] = sub_46B7AF(5LL);\nv6[0] = 3;\nsub_432855(*v15, v6, &v7);\nsub_42D9BE(v4);\nv5 = sub_40D76B();\nv7 += 5;\nv9 -= 5;\nv8 += 5;\nv10 -= 5;\nresult = sub_42DA40(*v15, v4, &v7, v12, 0LL);\n}\n}\n}\n}\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,v4,v6,v7,v11,v12,v13,v14,v15,v16,v17,sub_40D798,sub_428C26,sub_428C03,sub_45EED6,sub_45EA28,sub_42952B,sub_41DC64,sub_45EE99,sub_470538,sub_4745F5,sub_43279A,sub_46B7AF,sub_432855,sub_42D9BE,sub_40D76B,sub_42DA40,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'e', 'v4': 'draw_label_dsc', 'v6': 'draw_rect_dsc', 'v7': 'a', 'v11': 'size', 'v12': 'buf', 'v13': 'v', 'v14': 'data_array', 'v15': 'dsc', 'v16': 'obj', 'v17': 'code', 'sub_40D798': 'event_cb_6', 'sub_428C26': 'lv_event_get_code', 'sub_428C03': 'lv_event_get_target', 'sub_45EED6': 'lv_chart_get_pressed_point', 'sub_45EA28': 'lv_chart_set_cursor_point', 'sub_42952B': 'lv_event_get_draw_part_dsc', 'sub_41DC64': 'lv_obj_draw_part_check_type', 'sub_45EE99': 'lv_chart_get_y_array', 'sub_470538': 'lv_snprintf', 'sub_4745F5': 'lv_txt_get_size', 'sub_43279A': 'lv_draw_rect_dsc_init', 'sub_46B7AF': 'lv_palette_main', 'sub_432855': 'lv_draw_rect', 'sub_42D9BE': 'lv_draw_label_dsc_init', 'sub_40D76B': 'lv_color_white_5', 'sub_42DA40': 'lv_draw_label'}"}
count_bits
9c4eb45616cf68f899f481bb462a5f7bc8353e57fe3d33fddecbe769a3efc9eb
RadeonOpenCompute
ROCK-Kernel-Driver
NA
unsigned int count_bits(unsigned long n) { unsigned int count = 0; while (n) { count += n & 1; n >>= 1; } return count; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_409659", "function_addr": 4232793, "binary_name": "9c4eb45616cf68f899f481bb462a5f7bc8353e57fe3d33fddecbe769a3efc9eb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov [rbp+var_4], 0"], [4, "jmp short loc_409678"], [5, "mov rax, [rbp+var_18]"], [6, "and eax, 1"], [7, "add [rbp+var_4], eax"], [8, "shr [rbp+var_18], 1"], [9, "cmp [rbp+var_18], 0"], [10, "jnz short loc_40966A"], [11, "mov eax, [rbp+var_4]"], [12, "pop rbp"], [13, "retn"]], "data_dep": [[5, 8], [5, 2], [6, 5], [7, 7], [7, 3], [7, 6], [8, 8], [8, 2], [9, 2], [9, 8], [10, 9], [11, 7], [11, 3], [12, 0], [13, 11]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/9c4eb45616cf68f899f481bb462a5f7bc8353e57fe3d33fddecbe769a3efc9eb_9c4eb45616cf68f899f481bb462a5f7bc8353e57fe3d33fddecbe769a3efc9eb.jsonl.gz", "strip_func_name": "sub_409659", "query": "\n\n\n__int64 __fastcall sub_409659(unsigned __int64 a1)\n{\nunsigned int v3; // [rsp+14h] [rbp-4h]\n\nv3 = 0;\nwhile ( a1 )\n{\nv3 += a1 & 1;\na1 >>= 1;\n}\nreturn v3;\n}\n\n\n\nQ:[a1,v3,sub_409659,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'n', 'v3': 'count', 'sub_409659': 'count_bits'}"}
rd_exec_require_dev
e5c9c8d20ccd38c24e98831a3071d55eb048ec7424cd008d9cfca20a4e22e2e6
multipath-tcp
iproute-mptcp
NA
int rd_exec_require_dev(struct rd *rd, int (*cb)(struct rd *rd)) { if (rd_no_arg(rd)) { pr_err("Please provide device name.\n"); return -EINVAL; } return rd_exec_dev(rd, cb); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4051CB", "function_addr": 4215243, "binary_name": "e5c9c8d20ccd38c24e98831a3071d55eb048ec7424cd008d9cfca20a4e22e2e6.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov rax, [rbp+var_8]"], [6, "mov rdi, rax"], [7, "call sub_4040B5"], [8, "test al, al"], [9, "jz short loc_405210"], [10, "mov rax, cs:stderr"], [11, "mov rcx, rax"], [12, "mov edx, 1Ch"], [13, "mov esi, 1"], [14, "mov edi, offset aPleaseProvideD"], [15, "call _fwrite"], [16, "mov eax, 0FFFFFFEAh"], [17, "jmp short locret_405223"], [18, "mov rdx, [rbp+var_10]"], [19, "mov rax, [rbp+var_8]"], [20, "mov rsi, rdx"], [21, "mov rdi, rax"], [22, "call sub_4050AE"], [23, "leave"], [24, "retn"]], "data_dep": [[5, 3], [6, 5], [8, 7], [9, 8], [11, 10], [18, 4], [19, 3], [20, 18], [21, 19], [24, 16], [24, 22]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/e5c9c8d20ccd38c24e98831a3071d55eb048ec7424cd008d9cfca20a4e22e2e6_e5c9c8d20ccd38c24e98831a3071d55eb048ec7424cd008d9cfca20a4e22e2e6.jsonl.gz", "strip_func_name": "sub_4051CB", "query": "\n\n\n__int64 __fastcall sub_4051CB(unsigned int *a1, __int64 (__fastcall *a2)(__int64))\n{\nif ( !sub_4040B5(a1) )\nreturn sub_4050AE((__int64)a1, a2);\nfwrite(\"Please provide device name.\\n\", 1uLL, 0x1CuLL, stderr);\nreturn 4294967274LL;\n}\n\n\n\nQ:[a1,a2,sub_4051CB,sub_4040B5,sub_4050AE,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'rd', 'a2': 'cb', 'sub_4051CB': 'rd_exec_require_dev', 'sub_4040B5': 'rd_no_arg', 'sub_4050AE': 'rd_exec_dev'}"}
relocate_sections
10234337b781aefe0c85e88240b5adf9448012909ae92ff04b1710188c7cae8a
C-Chads
tinycc
NA
ST_FUNC void relocate_sections(TCCState *s1) { int i; Section *s, *sr; for (i = 1; i < s1->nb_sections; ++i) { sr = s1->sections[i]; if (sr->sh_type != SHT_RELX) continue; s = s1->sections[sr->sh_info]; #ifndef TCC_TARGET_MACHO if (s != s1->got || s1->static_link || s1->output_type == TCC_OUTPUT_MEMORY) #endif { relocate_section(s1, s, sr); } #ifndef ELF_OBJ_ONLY if (sr->sh_flags & SHF_ALLOC) { ElfW_Rel *rel; /* relocate relocation table in 'sr' */ for_each_elem(sr, 0, rel, ElfW_Rel) rel->r_offset += s->sh_addr; } #endif } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42BC65", "function_addr": 4373605, "binary_name": "10234337b781aefe0c85e88240b5adf9448012909ae92ff04b1710188c7cae8a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_4], 1"], [5, "jmp loc_42BD66"], [6, "mov rax, [rbp+var_28]"], [7, "mov rdx, [rax+4F0h]"], [8, "mov eax, [rbp+var_4]"], [9, "cdqe"], [10, "shl rax, 3"], [11, "add rax, rdx"], [12, "mov rax, [rax]"], [13, "mov [rbp+var_18], rax"], [14, "mov rax, [rbp+var_18]"], [15, "mov eax, [rax+28h]"], [16, "cmp eax, 4"], [17, "jnz loc_42BD61"], [18, "mov rax, [rbp+var_28]"], [19, "mov rdx, [rax+4F0h]"], [20, "mov rax, [rbp+var_18]"], [21, "mov eax, [rax+30h]"], [22, "cdqe"], [23, "shl rax, 3"], [24, "add rax, rdx"], [25, "mov rax, [rax]"], [26, "mov [rbp+var_20], rax"], [27, "mov rax, [rbp+var_28]"], [28, "mov rax, [rax+570h]"], [29, "cmp [rbp+var_20], rax"], [30, "jnz short loc_42BCF6"], [31, "mov rax, [rbp+var_28]"], [32, "movzx eax, byte ptr [rax+4]"], [33, "test al, al"], [34, "jnz short loc_42BCF6"], [35, "mov rax, [rbp+var_28]"], [36, "mov eax, [rax+78h]"], [37, "cmp eax, 1"], [38, "jnz short loc_42BD0D"], [39, "mov rdx, [rbp+var_18]"], [40, "mov rcx, [rbp+var_20]"], [41, "mov rax, [rbp+var_28]"], [42, "mov rsi, rcx"], [43, "mov rdi, rax"], [44, "call sub_42BA1C"], [45, "mov rax, [rbp+var_18]"], [46, "mov eax, [rax+2Ch]"], [47, "and eax, 2"], [48, "test eax, eax"], [49, "jz short loc_42BD62"], [50, "mov rax, [rbp+var_18]"], [51, "mov rax, [rax+8]"], [52, "mov [rbp+var_10], rax"], [53, "jmp short loc_42BD47"], [54, "mov rax, [rbp+var_10]"], [55, "mov rdx, [rax]"], [56, "mov rax, [rbp+var_20]"], [57, "mov rax, [rax+48h]"], [58, "add rdx, rax"], [59, "mov rax, [rbp+var_10]"], [60, "mov [rax], rdx"], [61, "add [rbp+var_10], 18h"], [62, "mov rax, [rbp+var_18]"], [63, "mov rdx, [rax+8]"], [64, "mov rax, [rbp+var_18]"], [65, "mov rax, [rax]"], [66, "add rax, rdx"], [67, "cmp [rbp+var_10], rax"], [68, "jb short loc_42BD29"], [69, "jmp short loc_42BD62"], [70, "nop"], [71, "add [rbp+var_4], 1"], [72, "mov rax, [rbp+var_28]"], [73, "mov eax, [rax+4F8h]"], [74, "cmp [rbp+var_4], eax"], [75, "jl loc_42BC7D"], [76, "nop"], [77, "nop"], [78, "leave"], [79, "retn"]], "data_dep": [[6, 3], [7, 60], [7, 6], [8, 4], [8, 71], [10, 8], [11, 7], [11, 10], [12, 60], [12, 11], [13, 12], [14, 13], [15, 60], [15, 14], [16, 15], [17, 16], [18, 3], [19, 18], [19, 60], [20, 13], [21, 20], [21, 60], [23, 21], [24, 19], [24, 23], [25, 24], [25, 60], [26, 25], [27, 3], [28, 60], [28, 27], [29, 26], [29, 28], [30, 29], [31, 3], [32, 60], [32, 31], [33, 32], [34, 33], [35, 3], [36, 35], [36, 60], [37, 36], [38, 37], [39, 13], [40, 26], [41, 3], [42, 40], [43, 41], [45, 13], [46, 45], [46, 60], [47, 46], [48, 47], [49, 48], [50, 13], [51, 50], [51, 60], [52, 51], [54, 52], [54, 61], [55, 54], [55, 60], [56, 26], [57, 56], [57, 60], [58, 55], [58, 57], [59, 52], [59, 61], [60, 59], [60, 58], [61, 52], [61, 61], [62, 13], [63, 60], [63, 62], [64, 13], [65, 60], [65, 64], [66, 63], [66, 65], [67, 52], [67, 61], [67, 66], [68, 67], [71, 71], [71, 4], [72, 3], [73, 60], [73, 72], [74, 73], [74, 4], [74, 71], [75, 74], [79, 73]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/10234337b781aefe0c85e88240b5adf9448012909ae92ff04b1710188c7cae8a_10234337b781aefe0c85e88240b5adf9448012909ae92ff04b1710188c7cae8a.jsonl.gz", "strip_func_name": "sub_42BC65", "query": "\n\n\n__int64 __fastcall sub_42BC65(__int64 a1)\n{\n__int64 result; // rax\n__int64 v2; // [rsp+10h] [rbp-20h]\n__int64 v3; // [rsp+18h] [rbp-18h]\n_QWORD *j; // [rsp+20h] [rbp-10h]\nint i; // [rsp+2Ch] [rbp-4h]\n\nfor ( i = 1; ; ++i )\n{\nresult = *(unsigned int *)(a1 + 1272);\nif ( i >= (int)result )\nbreak;\nv3 = *(_QWORD *)(*(_QWORD *)(a1 + 1264) + 8LL * i);\nif ( *(_DWORD *)(v3 + 40) == 4 )\n{\nv2 = *(_QWORD *)(*(_QWORD *)(a1 + 1264) + 8LL * *(int *)(v3 + 48));\nif ( v2 != *(_QWORD *)(a1 + 1392) || *(_BYTE *)(a1 + 4) || *(_DWORD *)(a1 + 120) == 1 )\nsub_42BA1C(a1, v2, v3);\nif ( (*(_DWORD *)(v3 + 44) & 2) != 0 )\n{\nfor ( j = *(_QWORD **)(v3 + 8); (unsigned __int64)j < *(_QWORD *)(v3 + 8) + *(_QWORD *)v3; j += 3 )\n*j += *(_QWORD *)(v2 + 72);\n}\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,v2,v3,j,sub_42BC65,sub_42BA1C,]\nAssistant: ", "hints": "[]", "response": "{'a1': 's1', 'v2': 's', 'v3': 'sr', 'j': 'rel', 'sub_42BC65': 'relocate_sections', 'sub_42BA1C': 'relocate_section'}"}
Validate_tref_Atom
4ceeddb7b16a39fbeac8045d03e7837b1e77a7d5a4a95cb0c916d11a714f4010
macosforge
ValidateMP4
NA
OSErr Validate_tref_Atom( atomOffsetEntry *aoe, void *refcon ) { OSErr err = noErr; long cnt; atomOffsetEntry *list; long i; OSErr atomerr = noErr; long mvhdCnt = 0; long trakCnt = 0; long iodsCnt = 0; atomOffsetEntry *entry; UInt64 minOffset, maxOffset; atomprintnotab(">\n"); minOffset = aoe->offset + aoe->atomStartSize; maxOffset = aoe->offset + aoe->size - aoe->atomStartSize; BAILIFERR( FindAtomOffsets( aoe, minOffset, maxOffset, &cnt, &list ) ); // Process 'tref_hint' atoms atomerr = ValidateAtomOfType( 'hint', kTypeAtomFlagCanHaveAtMostOne, Validate_tref_hint_Atom, cnt, list, refcon ); if (!err) err = atomerr; // Process 'tref_dpnd' atoms atomerr = ValidateAtomOfType( 'dpnd', kTypeAtomFlagCanHaveAtMostOne, Validate_tref_dpnd_Atom, cnt, list, refcon ); if (!err) err = atomerr; // Process 'tref_ipir' atoms atomerr = ValidateAtomOfType( 'ipir', kTypeAtomFlagCanHaveAtMostOne, Validate_tref_ipir_Atom, cnt, list, refcon ); if (!err) err = atomerr; // Process 'tref_mpod' atoms atomerr = ValidateAtomOfType( 'mpod', kTypeAtomFlagCanHaveAtMostOne, Validate_tref_mpod_Atom, cnt, list, refcon ); if (!err) err = atomerr; // Process 'tref_sync' atoms atomerr = ValidateAtomOfType( 'sync', kTypeAtomFlagCanHaveAtMostOne, Validate_tref_sync_Atom, cnt, list, refcon ); if (!err) err = atomerr; // for (i = 0; i < cnt; i++) { entry = &list[i]; if (entry->aoeflags & kAtomValidated) continue; switch (entry->type) { default: warnprint("WARNING: unknown track reference atom '%s'\n",ostypetostr(entry->type)); break; } if (!err) err = atomerr; } aoe->aoeflags |= kAtomValidated; bail: return err; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404D3C", "function_addr": 4214076, "binary_name": "4ceeddb7b16a39fbeac8045d03e7837b1e77a7d5a4a95cb0c916d11a714f4010.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 70h"], [3, "mov [rbp+var_68], rdi"], [4, "mov [rbp+var_70], rsi"], [5, "mov [rbp+var_2], 0"], [6, "mov [rbp+var_12], 0"], [7, "mov [rbp+var_20], 0"], [8, "mov [rbp+var_28], 0"], [9, "mov [rbp+var_30], 0"], [10, "mov edi, offset asc_424029"], [11, "mov eax, 0"], [12, "call sub_421E6D"], [13, "mov rax, [rbp+var_68]"], [14, "mov rdx, [rax+20h]"], [15, "mov rax, [rbp+var_68]"], [16, "mov eax, [rax+30h]"], [17, "mov eax, eax"], [18, "add rax, rdx"], [19, "mov [rbp+var_38], rax"], [20, "mov rax, [rbp+var_68]"], [21, "mov rdx, [rax+20h]"], [22, "mov rax, [rbp+var_68]"], [23, "mov rax, [rax+18h]"], [24, "add rdx, rax"], [25, "mov rax, [rbp+var_68]"], [26, "mov eax, [rax+30h]"], [27, "mov ecx, eax"], [28, "mov rax, rdx"], [29, "sub rax, rcx"], [30, "mov [rbp+var_40], rax"], [31, "lea rdi, [rbp+var_58]"], [32, "lea rcx, [rbp+var_50]"], [33, "mov rdx, [rbp+var_40]"], [34, "mov rsi, [rbp+var_38]"], [35, "mov rax, [rbp+var_68]"], [36, "mov r8, rdi"], [37, "mov rdi, rax"], [38, "call sub_4012E2"], [39, "mov [rbp+var_2], ax"], [40, "cmp [rbp+var_2], 0"], [41, "jnz loc_404F98"], [42, "mov rdx, [rbp+var_58]"], [43, "mov rax, [rbp+var_50]"], [44, "mov rcx, [rbp+var_70]"], [45, "mov r9, rcx"], [46, "mov r8, rdx"], [47, "mov rcx, rax"], [48, "mov edx, offset sub_40A297"], [49, "mov esi, 2"], [50, "mov edi, 68696E74h"], [51, "call sub_4035F6"], [52, "mov [rbp+var_12], ax"], [53, "cmp [rbp+var_2], 0"], [54, "jnz short loc_404E27"], [55, "movzx eax, [rbp+var_12]"], [56, "mov [rbp+var_2], ax"], [57, "mov rdx, [rbp+var_58]"], [58, "mov rax, [rbp+var_50]"], [59, "mov rcx, [rbp+var_70]"], [60, "mov r9, rcx"], [61, "mov r8, rdx"], [62, "mov rcx, rax"], [63, "mov edx, offset sub_40A2F3"], [64, "mov esi, 2"], [65, "mov edi, 64706E64h"], [66, "call sub_4035F6"], [67, "mov [rbp+var_12], ax"], [68, "cmp [rbp+var_2], 0"], [69, "jnz short loc_404E63"], [70, "movzx eax, [rbp+var_12]"], [71, "mov [rbp+var_2], ax"], [72, "mov rdx, [rbp+var_58]"], [73, "mov rax, [rbp+var_50]"], [74, "mov rcx, [rbp+var_70]"], [75, "mov r9, rcx"], [76, "mov r8, rdx"], [77, "mov rcx, rax"], [78, "mov edx, offset sub_40A31F"], [79, "mov esi, 2"], [80, "mov edi, 69706972h"], [81, "call sub_4035F6"], [82, "mov [rbp+var_12], ax"], [83, "cmp [rbp+var_2], 0"], [84, "jnz short loc_404E9F"], [85, "movzx eax, [rbp+var_12]"], [86, "mov [rbp+var_2], ax"], [87, "mov rdx, [rbp+var_58]"], [88, "mov rax, [rbp+var_50]"], [89, "mov rcx, [rbp+var_70]"], [90, "mov r9, rcx"], [91, "mov r8, rdx"], [92, "mov rcx, rax"], [93, "mov edx, offset sub_40A34B"], [94, "mov esi, 2"], [95, "mov edi, 6D706F64h"], [96, "call sub_4035F6"], [97, "mov [rbp+var_12], ax"], [98, "cmp [rbp+var_2], 0"], [99, "jnz short loc_404EDB"], [100, "movzx eax, [rbp+var_12]"], [101, "mov [rbp+var_2], ax"], [102, "mov rdx, [rbp+var_58]"], [103, "mov rax, [rbp+var_50]"], [104, "mov rcx, [rbp+var_70]"], [105, "mov r9, rcx"], [106, "mov r8, rdx"], [107, "mov rcx, rax"], [108, "mov edx, offset sub_40A377"], [109, "mov esi, 2"], [110, "mov edi, 73796E63h"], [111, "call sub_4035F6"], [112, "mov [rbp+var_12], ax"], [113, "cmp [rbp+var_2], 0"], [114, "jnz short loc_404F17"], [115, "movzx eax, [rbp+var_12]"], [116, "mov [rbp+var_2], ax"], [117, "mov [rbp+var_10], 0"], [118, "jmp short loc_404F79"], [119, "mov rdx, [rbp+var_58]"], [120, "mov rax, [rbp+var_10]"], [121, "shl rax, 6"], [122, "add rax, rdx"], [123, "mov [rbp+var_48], rax"], [124, "mov rax, [rbp+var_48]"], [125, "mov eax, [rax+34h]"], [126, "and eax, 1"], [127, "test eax, eax"], [128, "jnz short loc_404F73"], [129, "mov rax, [rbp+var_48]"], [130, "mov eax, [rax]"], [131, "mov edi, eax"], [132, "call sub_4227FA"], [133, "mov rsi, rax"], [134, "mov edi, offset aWarningUnknown_8"], [135, "mov eax, 0"], [136, "call sub_4225F4"], [137, "nop"], [138, "cmp [rbp+var_2], 0"], [139, "jnz short loc_404F74"], [140, "movzx eax, [rbp+var_12]"], [141, "mov [rbp+var_2], ax"], [142, "jmp short loc_404F74"], [143, "nop"], [144, "add [rbp+var_10], 1"], [145, "mov rax, [rbp+var_50]"], [146, "cmp [rbp+var_10], rax"], [147, "jl short loc_404F21"], [148, "mov rax, [rbp+var_68]"], [149, "mov eax, [rax+34h]"], [150, "or eax, 1"], [151, "mov edx, eax"], [152, "mov rax, [rbp+var_68]"], [153, "mov [rax+34h], edx"], [154, "jmp short loc_404F99"], [155, "nop"], [156, "movzx eax, [rbp+var_2]"], [157, "leave"], [158, "retn"]], "data_dep": [[13, 3], [14, 13], [15, 3], [16, 15], [17, 16], [18, 17], [18, 14], [19, 18], [20, 3], [21, 20], [22, 3], [23, 22], [24, 21], [24, 23], [25, 3], [26, 25], [27, 26], [28, 24], [29, 27], [29, 28], [30, 29], [31, 10], [32, 27], [33, 30], [34, 19], [35, 3], [36, 31], [37, 35], [39, 38], [40, 39], [41, 40], [44, 4], [45, 44], [46, 42], [47, 43], [52, 51], [53, 39], [54, 53], [55, 52], [56, 55], [59, 4], [60, 59], [61, 57], [62, 58], [67, 66], [68, 56], [68, 39], [69, 68], [70, 67], [71, 70], [74, 4], [75, 74], [76, 72], [77, 73], [82, 81], [83, 39], [83, 71], [83, 56], [84, 83], [85, 82], [86, 85], [89, 4], [90, 89], [91, 87], [92, 88], [97, 96], [98, 39], [98, 71], [98, 86], [98, 56], [99, 98], [100, 97], [101, 100], [104, 4], [105, 104], [106, 102], [107, 103], [112, 111], [113, 101], [113, 39], [113, 71], [113, 56], [113, 86], [114, 113], [115, 112], [116, 115], [120, 117], [120, 144], [121, 120], [122, 119], [122, 121], [123, 122], [124, 123], [125, 124], [126, 125], [127, 126], [128, 127], [129, 123], [130, 129], [131, 130], [133, 132], [138, 39], [138, 71], [138, 141], [138, 86], [138, 116], [138, 56], [138, 101], [139, 138], [140, 112], [141, 140], [144, 117], [144, 144], [146, 145], [146, 117], [146, 144], [147, 146], [148, 3], [149, 148], [150, 149], [151, 150], [152, 3], [153, 152], [153, 151], [156, 101], [156, 39], [156, 71], [156, 141], [156, 86], [156, 116], [156, 56], [158, 156]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/4ceeddb7b16a39fbeac8045d03e7837b1e77a7d5a4a95cb0c916d11a714f4010_4ceeddb7b16a39fbeac8045d03e7837b1e77a7d5a4a95cb0c916d11a714f4010.jsonl.gz", "strip_func_name": "sub_404D3C", "query": "\n\n\n__int64 __fastcall sub_404D3C(__int64 a1, int a2, int a3, int a4, int a5, int a6)\n{\nint v6; // eax\nint v7; // edx\nint v8; // ecx\nint v9; // er8\nint v10; // er9\nchar v12; // [rsp+0h] [rbp-70h]\nunsigned int *v14; // [rsp+18h] [rbp-58h] BYREF\n__int64 v15; // [rsp+20h] [rbp-50h] BYREF\nunsigned int *v16; // [rsp+28h] [rbp-48h]\nunsigned __int64 v17; // [rsp+30h] [rbp-40h]\nunsigned __int64 v18; // [rsp+38h] [rbp-38h]\n__int64 v19; // [rsp+40h] [rbp-30h]\n__int64 v20; // [rsp+48h] [rbp-28h]\n__int64 v21; // [rsp+50h] [rbp-20h]\nunsigned __int16 v22; // [rsp+5Eh] [rbp-12h]\n__int64 i; // [rsp+60h] [rbp-10h]\nunsigned __int16 v24; // [rsp+6Eh] [rbp-2h]\n\nv24 = 0;\nv22 = 0;\nv21 = 0LL;\nv20 = 0LL;\nv19 = 0LL;\nsub_421E6D((unsigned int)\">\\n\", a2, a3, a4, a5, a6, a2);\nv18 = *(_QWORD *)(a1 + 32) + *(unsigned int *)(a1 + 48);\nv17 = *(_QWORD *)(a1 + 24) + *(_QWORD *)(a1 + 32) - *(unsigned int *)(a1 + 48);\nv24 = sub_4012E2(a1, v18, v17, &v15, (void **)&v14);\nif ( !v24 )\n{\nv22 = sub_4035F6(0x68696E74u, (char *)2, (__int64 (__fastcall *)(unsigned int *, __int64))sub_40A297, v15, v14, v12);\nif ( !v24 )\nv24 = v22;\nv22 = sub_4035F6(0x64706E64u, (char *)2, (__int64 (__fastcall *)(unsigned int *, __int64))sub_40A2F3, v15, v14, v12);\nif ( !v24 )\nv24 = v22;\nv22 = sub_4035F6(0x69706972u, (char *)2, (__int64 (__fastcall *)(unsigned int *, __int64))sub_40A31F, v15, v14, v12);\nif ( !v24 )\nv24 = v22;\nv22 = sub_4035F6(0x6D706F64u, (char *)2, (__int64 (__fastcall *)(unsigned int *, __int64))sub_40A34B, v15, v14, v12);\nif ( !v24 )\nv24 = v22;\nv22 = sub_4035F6(0x73796E63u, (char *)2, (__int64 (__fastcall *)(unsigned int *, __int64))sub_40A377, v15, v14, v12);\nif ( !v24 )\nv24 = v22;\nfor ( i = 0LL; i < v15; ++i )\n{\nv16 = &v14[16 * i];\nif ( (v16[13] & 1) == 0 )\n{\nv6 = sub_4227FA(*v16);\nsub_4225F4((unsigned int)\"WARNING: unknown track reference atom '%s'\\n\", v6, v7, v8, v9, v10, v12);\nif ( !v24 )\nv24 = v22;\n}\n}\n*(_DWORD *)(a1 + 52) |= 1u;\n}\nreturn v24;\n}\n\n\n\nQ:[a1,a2,v14,v15,v16,v17,v18,v19,v20,v21,v22,v24,sub_404D3C,sub_421E6D,sub_4012E2,sub_4035F6,sub_40A297,sub_40A2F3,sub_40A31F,sub_40A34B,sub_40A377,sub_4227FA,sub_4225F4,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'aoe', 'a2': 'refcon', 'v14': 'list', 'v15': 'cnt', 'v16': 'entry', 'v17': 'maxOffset', 'v18': 'minOffset', 'v19': 'iodsCnt', 'v20': 'trakCnt', 'v21': 'mvhdCnt', 'v22': 'atomerr', 'v24': 'err', 'sub_404D3C': 'Validate_tref_Atom', 'sub_421E6D': 'atomprintnotab', 'sub_4012E2': 'FindAtomOffsets', 'sub_4035F6': 'ValidateAtomOfType', 'sub_40A297': 'Validate_tref_hint_Atom', 'sub_40A2F3': 'Validate_tref_dpnd_Atom', 'sub_40A31F': 'Validate_tref_ipir_Atom', 'sub_40A34B': 'Validate_tref_mpod_Atom', 'sub_40A377': 'Validate_tref_sync_Atom', 'sub_4227FA': 'ostypetostr', 'sub_4225F4': 'warnprint'}"}
CalculateSum16
70a98a21769767873a5c3f7a842aac1b1eb8a278ee26a51540fcfdc066ab8fa0
tianocore
udk
NA
UINT16 CalculateSum16 ( IN UINT16 *Buffer, IN UINTN Size ) /*++ Routine Description: This function calculates the UINT16 sum for the requested region. Arguments: Buffer Pointer to buffer containing byte data of component. Size Size of the buffer Returns: The 16 bit checksum --*/ { UINTN Index; UINT16 Sum; Sum = 0; // // Perform the word sum for buffer // for (Index = 0; Index < Size; Index++) { Sum = (UINT16) (Sum + Buffer[Index]); } return (UINT16) Sum; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403B01", "function_addr": 4209409, "binary_name": "70a98a21769767873a5c3f7a842aac1b1eb8a278ee26a51540fcfdc066ab8fa0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov [rbp+var_20], rsi"], [4, "mov [rbp+var_A], 0"], [5, "mov [rbp+var_8], 0"], [6, "jmp short loc_403B38"], [7, "mov rax, [rbp+var_8]"], [8, "lea rdx, [rax+rax]"], [9, "mov rax, [rbp+var_18]"], [10, "add rax, rdx"], [11, "movzx eax, word ptr [rax]"], [12, "add [rbp+var_A], ax"], [13, "add [rbp+var_8], 1"], [14, "mov rax, [rbp+var_8]"], [15, "cmp rax, [rbp+var_20]"], [16, "jb short loc_403B1D"], [17, "movzx eax, [rbp+var_A]"], [18, "pop rbp"], [19, "retn"]], "data_dep": [[7, 13], [7, 5], [8, 8], [8, 7], [9, 2], [10, 9], [10, 8], [11, 10], [12, 4], [12, 12], [12, 11], [13, 5], [13, 13], [14, 13], [14, 5], [15, 14], [15, 3], [16, 15], [17, 12], [17, 4], [18, 0], [19, 17]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/70a98a21769767873a5c3f7a842aac1b1eb8a278ee26a51540fcfdc066ab8fa0_70a98a21769767873a5c3f7a842aac1b1eb8a278ee26a51540fcfdc066ab8fa0.jsonl.gz", "strip_func_name": "sub_403B01", "query": "\n\n\n__int64 __fastcall sub_403B01(__int64 a1, unsigned __int64 a2)\n{\nunsigned __int16 v3; // [rsp+16h] [rbp-Ah]\nunsigned __int64 i; // [rsp+18h] [rbp-8h]\n\nv3 = 0;\nfor ( i = 0LL; i < a2; ++i )\nv3 += *(_WORD *)(2 * i + a1);\nreturn v3;\n}\n\n\n\nQ:[a1,a2,v3,i,sub_403B01,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'Buffer', 'a2': 'Size', 'v3': 'Sum', 'i': 'Index', 'sub_403B01': 'CalculateSum16'}"}
WriteToOutputBuffer
e5551560f8b354cac7e81d30589c87f7b1a2d81f26b84dd1f7b737c5a12ee612
Comcast
caption-inspector
NA
void WriteToOutputBuffer( char* fmt, ... ) { va_list args; char message[1024]; va_start(args, fmt); vsprintf(message, fmt, args); va_end(args); strcat(textBuffer, message); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40673D", "function_addr": 4220733, "binary_name": "e5551560f8b354cac7e81d30589c87f7b1a2d81f26b84dd1f7b737c5a12ee612.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 4E0h"], [3, "mov [rbp+format], rdi"], [4, "mov [rbp+var_A8], rsi"], [5, "mov [rbp+var_A0], rdx"], [6, "mov [rbp+var_98], rcx"], [7, "mov [rbp+var_90], r8"], [8, "mov [rbp+var_88], r9"], [9, "test al, al"], [10, "jz short loc_406796"], [11, "movaps [rbp+var_80], xmm0"], [12, "movaps [rbp+var_70], xmm1"], [13, "movaps [rbp+var_60], xmm2"], [14, "movaps [rbp+var_50], xmm3"], [15, "movaps [rbp+var_40], xmm4"], [16, "movaps [rbp+var_30], xmm5"], [17, "movaps [rbp+var_20], xmm6"], [18, "movaps [rbp+var_10], xmm7"], [19, "mov [rbp+arg], 8"], [20, "mov [rbp+var_C4], 30h "], [21, "lea rax, [rbp+arg_0]"], [22, "mov [rbp+var_C0], rax"], [23, "lea rax, [rbp+var_B0]"], [24, "mov [rbp+var_B8], rax"], [25, "lea rdx, [rbp+arg]"], [26, "mov rcx, [rbp+format]"], [27, "lea rax, [rbp+s]"], [28, "mov rsi, rcx"], [29, "mov rdi, rax"], [30, "call _vsprintf"], [31, "lea rax, [rbp+s]"], [32, "mov rsi, rax"], [33, "lea rdi, dest"], [34, "call _strcat"], [35, "nop"], [36, "leave"], [37, "retn"]], "data_dep": [[10, 9], [21, 9], [22, 21], [23, 21], [24, 23], [25, 19], [26, 3], [27, 23], [28, 26], [29, 27], [31, 30], [32, 31], [33, 29], [37, 34]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/e5551560f8b354cac7e81d30589c87f7b1a2d81f26b84dd1f7b737c5a12ee612_e5551560f8b354cac7e81d30589c87f7b1a2d81f26b84dd1f7b737c5a12ee612.jsonl.gz", "strip_func_name": "sub_40673D", "query": "\n\n\nchar *sub_40673D(const char *a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, ...)\n{\nchar s[1032]; // [rsp+10h] [rbp-4D0h] BYREF\ngcc_va_list arg; // [rsp+418h] [rbp-C8h] BYREF\n__int64 v9; // [rsp+438h] [rbp-A8h]\n__int64 v10; // [rsp+440h] [rbp-A0h]\n__int64 v11; // [rsp+448h] [rbp-98h]\n__int64 v12; // [rsp+450h] [rbp-90h]\n__int64 v13; // [rsp+458h] [rbp-88h]\n\nva_start(arg, a6);\nv9 = a2;\nv10 = a3;\nv11 = a4;\nv12 = a5;\nv13 = a6;\narg[0].gp_offset = 8;\nvsprintf(s, a1, arg);\nreturn strcat(&dest, s);\n}\n\n\n\nQ:[a1,s,arg,sub_40673D,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'fmt', 's': 'message', 'arg': 'args', 'sub_40673D': 'WriteToOutputBuffer'}"}
AcpiOsVprintf
409f7ebd875056ec33b17ff69e77e300c0715d956d9a542312496070b0061f7d
bitdefender
napoca
NA
void AcpiOsVprintf ( const char *Fmt, va_list Args) { UINT8 Flags; char Buffer[ACPI_VPRINTF_BUFFER_SIZE]; /* * We build the output string in a local buffer because we may be * outputting the buffer twice. Using vfprintf is problematic because * some implementations modify the args pointer/structure during * execution. Thus, we use the local buffer for portability. * * Note: Since this module is intended for use by the various ACPICA * utilities/applications, we can safely declare the buffer on the stack. * Also, This function is used for relatively small error messages only. */ vsnprintf (Buffer, ACPI_VPRINTF_BUFFER_SIZE, Fmt, Args); Flags = AcpiGbl_DbOutputFlags; if (Flags & ACPI_DB_REDIRECTABLE_OUTPUT) { /* Output is directable to either a file (if open) or the console */ if (AcpiGbl_DebugFile) { /* Output file is open, send the output there */ fputs (Buffer, AcpiGbl_DebugFile); } else { /* No redirection, send output to console (once only!) */ Flags |= ACPI_DB_CONSOLE_OUTPUT; } } if (Flags & ACPI_DB_CONSOLE_OUTPUT) { fputs (Buffer, AcpiGbl_OutputFile); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41D16E", "function_addr": 4313454, "binary_name": "409f7ebd875056ec33b17ff69e77e300c0715d956d9a542312496070b0061f7d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 220h"], [3, "mov [rbp+format], rdi"], [4, "mov [rbp+arg], rsi"], [5, "mov rcx, [rbp+arg]"], [6, "mov rdx, [rbp+format]"], [7, "lea rax, [rbp+s]"], [8, "mov esi, 200h"], [9, "mov rdi, rax"], [10, "call _vsnprintf"], [11, "movzx eax, cs:byte_43D80E"], [12, "mov [rbp+var_1], al"], [13, "movzx eax, [rbp+var_1]"], [14, "and eax, 1"], [15, "test eax, eax"], [16, "jz short loc_41D1E9"], [17, "mov rax, cs:stream"], [18, "test rax, rax"], [19, "jz short loc_41D1E5"], [20, "mov rdx, cs:stream"], [21, "lea rax, [rbp+s]"], [22, "mov rsi, rdx"], [23, "mov rdi, rax"], [24, "call _fputs"], [25, "jmp short loc_41D1E9"], [26, "or [rbp+var_1], 2"], [27, "movzx eax, [rbp+var_1]"], [28, "and eax, 2"], [29, "test eax, eax"], [30, "jz short loc_41D20D"], [31, "mov rdx, cs:qword_43E408"], [32, "lea rax, [rbp+s]"], [33, "mov rsi, rdx"], [34, "mov rdi, rax"], [35, "call _fputs"], [36, "nop"], [37, "leave"], [38, "retn"]], "data_dep": [[5, 4], [6, 3], [9, 7], [12, 11], [13, 12], [14, 13], [15, 14], [16, 15], [18, 17], [19, 18], [21, 18], [22, 20], [23, 21], [26, 12], [27, 12], [27, 26], [28, 27], [29, 28], [30, 29], [32, 29], [33, 31], [34, 32], [38, 29], [38, 35]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/409f7ebd875056ec33b17ff69e77e300c0715d956d9a542312496070b0061f7d_409f7ebd875056ec33b17ff69e77e300c0715d956d9a542312496070b0061f7d.jsonl.gz", "strip_func_name": "sub_41D16E", "query": "\n\n\nint __fastcall sub_41D16E(const char *a1, void *a2)\n{\nint result; // eax\nchar s[527]; // [rsp+10h] [rbp-210h] BYREF\nchar v4; // [rsp+21Fh] [rbp-1h]\n\nvsnprintf(s, 0x200uLL, a1, a2);\nv4 = byte_43D80E;\nif ( (byte_43D80E & 1) != 0 )\n{\nif ( stream )\nfputs(s, stream);\nelse\nv4 |= 2u;\n}\nresult = v4 & 2;\nif ( (v4 & 2) != 0 )\nresult = fputs(s, qword_43E408);\nreturn result;\n}\n\n\n\nQ:[a1,a2,s,v4,sub_41D16E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'Fmt', 'a2': 'Args', 's': 'Buffer', 'v4': 'Flags', 'sub_41D16E': 'AcpiOsVprintf'}"}
bpf_program__set_priv
43930efbf7f49e9230654421eb5b1e9c224e2d5e0333a9e7aabf3997f8c39fd3
gfreewind
kernel_comment
NA
int bpf_program__set_priv(struct bpf_program *prog, void *priv, bpf_program_clear_priv_t clear_priv) { if (prog->priv && prog->clear_priv) prog->clear_priv(prog, prog->priv); prog->priv = priv; prog->clear_priv = clear_priv; return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40F4F4", "function_addr": 4257012, "binary_name": "43930efbf7f49e9230654421eb5b1e9c224e2d5e0333a9e7aabf3997f8c39fd3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "mov rax, [rbp+var_8]"], [7, "mov rax, [rax+70h]"], [8, "test rax, rax"], [9, "jz short loc_40F53E"], [10, "mov rax, [rbp+var_8]"], [11, "mov rax, [rax+78h]"], [12, "test rax, rax"], [13, "jz short loc_40F53E"], [14, "mov rax, [rbp+var_8]"], [15, "mov rcx, [rax+78h]"], [16, "mov rax, [rbp+var_8]"], [17, "mov rdx, [rax+70h]"], [18, "mov rax, [rbp+var_8]"], [19, "mov rsi, rdx"], [20, "mov rdi, rax"], [21, "call rcx"], [22, "mov rax, [rbp+var_8]"], [23, "mov rdx, [rbp+var_10]"], [24, "mov [rax+70h], rdx"], [25, "mov rax, [rbp+var_8]"], [26, "mov rdx, [rbp+var_18]"], [27, "mov [rax+78h], rdx"], [28, "mov eax, 0"], [29, "leave"], [30, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [9, 8], [10, 3], [11, 10], [12, 11], [13, 12], [14, 3], [15, 14], [16, 3], [17, 16], [18, 3], [19, 17], [20, 18], [21, 15], [22, 3], [23, 4], [24, 23], [24, 22], [25, 3], [26, 5], [27, 25], [27, 26], [30, 28]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/43930efbf7f49e9230654421eb5b1e9c224e2d5e0333a9e7aabf3997f8c39fd3_43930efbf7f49e9230654421eb5b1e9c224e2d5e0333a9e7aabf3997f8c39fd3.jsonl.gz", "strip_func_name": "sub_40F4F4", "query": "\n\n\n__int64 __fastcall sub_40F4F4(__int64 a1, __int64 a2, __int64 a3)\n{\nif ( *(_QWORD *)(a1 + 112) && *(_QWORD *)(a1 + 120) )\n(*(void (__fastcall **)(__int64, _QWORD))(a1 + 120))(a1, *(_QWORD *)(a1 + 112));\n*(_QWORD *)(a1 + 112) = a2;\n*(_QWORD *)(a1 + 120) = a3;\nreturn 0LL;\n}\n\n\n\nQ:[a3,a1,a2,sub_40F4F4,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'clear_priv', 'a1': 'prog', 'a2': 'priv', 'sub_40F4F4': 'bpf_program__set_priv'}"}
rsa_check_pair_wrap
6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7
mattsta
trade-balancer
NA
static int rsa_check_pair_wrap( const void *pub, const void *prv ) { return( mbedtls_rsa_check_pub_priv( (const mbedtls_rsa_context *) pub, (const mbedtls_rsa_context *) prv ) ); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4587F6", "function_addr": 4556790, "binary_name": "6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov rdx, [rbp+var_10]"], [6, "mov rax, [rbp+var_8]"], [7, "mov rsi, rdx"], [8, "mov rdi, rax"], [9, "call sub_43288D"], [10, "leave"], [11, "retn"]], "data_dep": [[5, 4], [6, 3], [7, 5], [8, 6], [11, 9]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7_6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7.jsonl.gz", "strip_func_name": "sub_4587F6", "query": "\n\n\n__int64 __fastcall sub_4587F6(_QWORD *a1, _QWORD *a2)\n{\nreturn sub_43288D(a1, a2);\n}\n\n\n\nQ:[a1,a2,sub_4587F6,sub_43288D,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'pub', 'a2': 'prv', 'sub_4587F6': 'rsa_check_pair_wrap', 'sub_43288D': 'mbedtls_rsa_check_pub_priv'}"}
pj_scan_get_until_chr
c4c7b2a78179a69953804608dac176cec14e731b69aa3ba1c38a73cb48268178
asterisk
pjproject-archive
NA
PJ_DEF(void) pj_scan_get_until_chr( pj_scanner *scanner, const char *until_spec, pj_str_t *out) { register char *s = scanner->curptr; pj_size_t speclen; if (s >= scanner->end) { pj_scan_syntax_err(scanner); return; } speclen = strlen(until_spec); while (PJ_SCAN_CHECK_EOF(s) && !memchr(until_spec, *s, speclen)) { ++s; } pj_strset3(out, scanner->curptr, s); scanner->curptr = s; if (PJ_SCAN_IS_PROBABLY_SPACE(*s) && scanner->skip_ws) { pj_scan_skip_whitespace(scanner); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42BBCD", "function_addr": 4373453, "binary_name": "c4c7b2a78179a69953804608dac176cec14e731b69aa3ba1c38a73cb48268178.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 38h"], [4, "mov [rbp+var_28], rdi"], [5, "mov [rbp+s], rsi"], [6, "mov [rbp+var_38], rdx"], [7, "mov rax, [rbp+var_28]"], [8, "mov rbx, [rax+10h]"], [9, "mov rax, [rbp+var_28]"], [10, "mov rax, [rax+8]"], [11, "cmp rbx, rax"], [12, "jb short loc_42BC08"], [13, "mov rax, [rbp+var_28]"], [14, "mov rdi, rax"], [15, "call sub_42AC4C"], [16, "jmp loc_42BC88"], [17, "mov rax, [rbp+s]"], [18, "mov rdi, rax"], [19, "call _strlen"], [20, "mov [rbp+n], rax"], [21, "jmp short loc_42BC1E"], [22, "add rbx, 1"], [23, "mov rax, [rbp+var_28]"], [24, "mov rax, [rax+8]"], [25, "cmp rbx, rax"], [26, "jz short loc_42BC48"], [27, "movzx eax, byte ptr [rbx]"], [28, "movsx ecx, al"], [29, "mov rdx, [rbp+n]"], [30, "mov rax, [rbp+s]"], [31, "mov esi, ecx"], [32, "mov rdi, rax"], [33, "call _memchr"], [34, "test rax, rax"], [35, "jz short loc_42BC1A"], [36, "mov rax, [rbp+var_28]"], [37, "mov rcx, [rax+10h]"], [38, "mov rax, [rbp+var_38]"], [39, "mov rdx, rbx"], [40, "mov rsi, rcx"], [41, "mov rdi, rax"], [42, "call sub_42A9FA"], [43, "mov rax, [rbp+var_28]"], [44, "mov [rax+10h], rbx"], [45, "movzx eax, byte ptr [rbx]"], [46, "cmp al, 20h "], [47, "jg short loc_42BC88"], [48, "mov rax, [rbp+var_28]"], [49, "mov eax, [rax+28h]"], [50, "test eax, eax"], [51, "jz short loc_42BC88"], [52, "mov rax, [rbp+var_28]"], [53, "mov rdi, rax"], [54, "call sub_42B098"], [55, "mov rbx, [rbp+var_8]"], [56, "leave"], [57, "retn"]], "data_dep": [[7, 4], [8, 7], [9, 4], [10, 9], [11, 8], [11, 10], [12, 11], [13, 4], [14, 13], [17, 5], [18, 17], [20, 19], [22, 8], [22, 22], [23, 4], [24, 23], [25, 22], [25, 24], [25, 8], [26, 25], [27, 22], [27, 8], [28, 27], [29, 20], [30, 5], [31, 28], [32, 30], [34, 33], [35, 34], [36, 4], [37, 36], [38, 6], [39, 8], [39, 22], [40, 37], [41, 38], [43, 4], [44, 8], [44, 22], [44, 43], [45, 22], [45, 8], [45, 44], [46, 45], [47, 46], [48, 4], [49, 44], [49, 48], [50, 49], [51, 50], [52, 4], [53, 52], [57, 45], [57, 54], [57, 50], [57, 15]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/c4c7b2a78179a69953804608dac176cec14e731b69aa3ba1c38a73cb48268178_c4c7b2a78179a69953804608dac176cec14e731b69aa3ba1c38a73cb48268178.jsonl.gz", "strip_func_name": "sub_42BBCD", "query": "\n\n\n__int64 __fastcall sub_42BBCD(__int64 a1, const char *a2, _QWORD *a3)\n{\nunsigned __int8 *v3; // rbx\n__int64 result; // rax\nsize_t n; // [rsp+28h] [rbp-18h]\n\nv3 = *(unsigned __int8 **)(a1 + 16);\nif ( (unsigned __int64)v3 >= *(_QWORD *)(a1 + 8) )\nreturn sub_42AC4C(a1);\nn = strlen(a2);\nwhile ( v3 != *(unsigned __int8 **)(a1 + 8) && !memchr(a2, (char)*v3, n) )\n++v3;\nsub_42A9FA(a3, *(_QWORD *)(a1 + 16), (__int64)v3);\n*(_QWORD *)(a1 + 16) = v3;\nresult = *v3;\nif ( (char)result <= 32 )\n{\nresult = *(unsigned int *)(a1 + 40);\nif ( (_DWORD)result )\nresult = sub_42B098(a1);\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,n,sub_42BBCD,sub_42AC4C,sub_42A9FA,sub_42B098,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'out', 'a1': 'scanner', 'a2': 'until_spec', 'n': 'speclen', 'sub_42BBCD': 'pj_scan_get_until_chr', 'sub_42AC4C': 'pj_scan_syntax_err', 'sub_42A9FA': 'pj_strset3', 'sub_42B098': 'pj_scan_skip_whitespace'}"}
cpp_init
2fec72a0d684270ed27e67e3baa32c7521fe5b1b5afd5e6b127dddef513ead4f
shinh
elvm
NA
void cpp_init() { setlocale(LC_ALL, "C"); init_keywords(); init_now(); init_predefined_macros(); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405FC3", "function_addr": 4218819, "binary_name": "2fec72a0d684270ed27e67e3baa32c7521fe5b1b5afd5e6b127dddef513ead4f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov esi, offset locale"], [3, "mov edi, 6"], [4, "call _setlocale"], [5, "mov eax, 0"], [6, "call sub_405798"], [7, "call sub_405F99"], [8, "mov eax, 0"], [9, "call sub_405E11"], [10, "nop"], [11, "pop rbp"], [12, "retn"]], "data_dep": [[11, 0], [12, 9]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/2fec72a0d684270ed27e67e3baa32c7521fe5b1b5afd5e6b127dddef513ead4f_2fec72a0d684270ed27e67e3baa32c7521fe5b1b5afd5e6b127dddef513ead4f.jsonl.gz", "strip_func_name": "sub_405FC3", "query": "\n\n\n__int64 sub_405FC3()\n{\nsetlocale(6, \"C\");\nsub_405798();\nsub_405F99();\nreturn sub_405E11();\n}\n\n\n\nQ:[sub_405FC3,sub_405798,sub_405F99,sub_405E11,]\nAssistant: ", "hints": "[]", "response": "{'sub_405FC3': 'cpp_init', 'sub_405798': 'init_keywords', 'sub_405F99': 'init_now', 'sub_405E11': 'init_predefined_macros'}"}
main
047915a1cc0cf73bdee2763d113cd47b6dc99c8d40b84c91e5a918fae8594603
diku-compSys
compSys-e2021-pub
NA
int main() { char *my_line = NULL; ssize_t line_len; size_t buf_len = 0; // Create the threads. int num_threads = sysconf(_SC_NPROCESSORS_ONLN); pthread_t *threads = malloc(num_threads*sizeof(pthread_t)); for (int i = 0; i < num_threads; i++) { pthread_create(&threads[i], NULL, worker, NULL); } while ((line_len = getline(&my_line, &buf_len, stdin)) != -1) { int done = 0; while (!done) { assert(pthread_mutex_lock(&line_mutex) == 0); if (line == NULL) { line = strdup(my_line); done = 1; } assert(pthread_mutex_unlock(&line_mutex) == 0); } } die = 1; for (int i = 0; i < num_threads; i++) { pthread_join(threads[i], NULL); } free(my_line); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "main", "function_addr": 4199183, "binary_name": "047915a1cc0cf73bdee2763d113cd47b6dc99c8d40b84c91e5a918fae8594603.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+s], 0"], [4, "mov [rbp+n], 0"], [5, "mov edi, 54h "], [6, "call _sysconf"], [7, "mov [rbp+var_10], eax"], [8, "mov eax, [rbp+var_10]"], [9, "cdqe"], [10, "shl rax, 3"], [11, "mov rdi, rax"], [12, "call _malloc"], [13, "mov [rbp+var_18], rax"], [14, "mov [rbp+var_4], 0"], [15, "jmp short loc_401381"], [16, "mov eax, [rbp+var_4]"], [17, "cdqe"], [18, "lea rdx, ds:0[rax*8]"], [19, "mov rax, [rbp+var_18]"], [20, "add rax, rdx"], [21, "mov ecx, 0"], [22, "mov edx, offset start_routine"], [23, "mov esi, 0"], [24, "mov rdi, rax"], [25, "call _pthread_create"], [26, "add [rbp+var_4], 1"], [27, "mov eax, [rbp+var_4]"], [28, "cmp eax, [rbp+var_10]"], [29, "jl short loc_401352"], [30, "jmp loc_401411"], [31, "mov [rbp+var_8], 0"], [32, "jmp short loc_40140B"], [33, "mov edi, offset mutex"], [34, "call _pthread_mutex_lock"], [35, "test eax, eax"], [36, "jz short loc_4013BE"], [37, "mov ecx, offset aMain"], [38, "mov edx, 40h "], [39, "mov esi, offset file"], [40, "mov edi, offset assertion"], [41, "call ___assert_fail"], [42, "mov rax, cs:qword_4040E8"], [43, "test rax, rax"], [44, "jnz short loc_4013E4"], [45, "mov rax, [rbp+s]"], [46, "mov rdi, rax"], [47, "call _strdup"], [48, "mov cs:qword_4040E8, rax"], [49, "mov [rbp+var_8], 1"], [50, "mov edi, offset mutex"], [51, "call _pthread_mutex_unlock"], [52, "test eax, eax"], [53, "jz short loc_40140B"], [54, "mov ecx, offset aMain"], [55, "mov edx, 45h "], [56, "mov esi, offset file"], [57, "mov edi, offset aPthreadMutexUn_0"], [58, "call ___assert_fail"], [59, "cmp [rbp+var_8], 0"], [60, "jz short loc_401397"], [61, "mov rdx, cs:stdin"], [62, "lea rcx, [rbp+n]"], [63, "lea rax, [rbp+s]"], [64, "mov rsi, rcx"], [65, "mov rdi, rax"], [66, "call _getline"], [67, "mov [rbp+var_20], rax"], [68, "cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh"], [69, "jnz loc_40138E"], [70, "mov cs:dword_4040F0, 1"], [71, "mov [rbp+var_C], 0"], [72, "jmp short loc_401475"], [73, "mov eax, [rbp+var_C]"], [74, "cdqe"], [75, "lea rdx, ds:0[rax*8]"], [76, "mov rax, [rbp+var_18]"], [77, "add rax, rdx"], [78, "mov rax, [rax]"], [79, "mov esi, 0"], [80, "mov rdi, rax"], [81, "call _pthread_join"], [82, "add [rbp+var_C], 1"], [83, "mov eax, [rbp+var_C]"], [84, "cmp eax, [rbp+var_10]"], [85, "jl short loc_40144D"], [86, "mov rax, [rbp+s]"], [87, "mov rdi, rax"], [88, "call _free"], [89, "mov eax, 0"], [90, "leave"], [91, "retn"]], "data_dep": [[7, 6], [8, 7], [10, 8], [11, 10], [13, 12], [16, 26], [16, 14], [18, 22], [19, 13], [20, 19], [20, 18], [24, 20], [26, 14], [26, 26], [27, 14], [27, 26], [28, 27], [28, 7], [29, 28], [35, 34], [36, 35], [42, 48], [43, 42], [44, 43], [45, 3], [46, 45], [48, 47], [52, 51], [53, 52], [59, 31], [59, 49], [60, 59], [62, 4], [62, 62], [62, 21], [63, 52], [63, 3], [63, 27], [63, 66], [64, 62], [65, 63], [67, 66], [68, 67], [69, 68], [73, 71], [73, 82], [75, 75], [75, 61], [76, 13], [77, 75], [77, 76], [78, 77], [80, 78], [82, 71], [82, 82], [83, 82], [83, 71], [84, 7], [84, 83], [85, 84], [86, 3], [87, 86], [91, 89]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/047915a1cc0cf73bdee2763d113cd47b6dc99c8d40b84c91e5a918fae8594603_047915a1cc0cf73bdee2763d113cd47b6dc99c8d40b84c91e5a918fae8594603.jsonl.gz", "strip_func_name": "main", "query": "\n\n\n__int64 __fastcall main(int a1, char **a2, char **a3)\n{\nsize_t n; // [rsp+0h] [rbp-30h] BYREF\nchar *s; // [rsp+8h] [rbp-28h] BYREF\n__ssize_t v6; // [rsp+10h] [rbp-20h]\npthread_t *v7; // [rsp+18h] [rbp-18h]\nint v8; // [rsp+20h] [rbp-10h]\nint j; // [rsp+24h] [rbp-Ch]\nint v10; // [rsp+28h] [rbp-8h]\nint i; // [rsp+2Ch] [rbp-4h]\n\ns = 0LL;\nn = 0LL;\nv8 = sysconf(84);\nv7 = (pthread_t *)malloc(8LL * v8);\nfor ( i = 0; i < v8; ++i )\npthread_create(&v7[i], 0LL, start_routine, 0LL);\nwhile ( 1 )\n{\nv6 = getline(&s, &n, stdin);\nif ( v6 == -1 )\nbreak;\nv10 = 0;\nwhile ( !v10 )\n{\nif ( pthread_mutex_lock(&mutex) )\n__assert_fail(\"pthread_mutex_lock(&line_mutex) == 0\", \"fibs-threadpool-spin.c\", 0x40u, \"main\");\nif ( !qword_4040E8 )\n{\nqword_4040E8 = (__int64)strdup(s);\nv10 = 1;\n}\nif ( pthread_mutex_unlock(&mutex) )\n__assert_fail(\"pthread_mutex_unlock(&line_mutex) == 0\", \"fibs-threadpool-spin.c\", 0x45u, \"main\");\n}\n}\ndword_4040F0 = 1;\nfor ( j = 0; j < v8; ++j )\npthread_join(v7[j], 0LL);\nfree(s);\nreturn 0LL;\n}\n\n\n\nQ:[a2,a3,a1,n,s,v6,v7,v8,j,v10,]\nAssistant: ", "hints": "[]", "response": "{'a2': 'argv', 'a3': 'envp', 'a1': 'argc', 'n': 'buf_len', 's': 'my_line', 'v6': 'line_len', 'v7': 'threads', 'v8': 'num_threads', 'j': 'i_0', 'v10': 'done'}"}
duk_debug_remove_breakpoint
3eef51aaf1b7c436a69b2722242bd3a427d13d57fe49c5d2c5815175a4745eea
creationix
dukluv
NA
DUK_INTERNAL duk_bool_t duk_debug_remove_breakpoint(duk_hthread *thr, duk_small_uint_t breakpoint_index) { duk_heap *heap; duk_hstring *h; duk_breakpoint *b; duk_size_t move_size; /* Caller must trigger recomputation of active breakpoint list. To * ensure stale values are not used if that doesn't happen, clear the * active breakpoint list here. */ DUK_ASSERT(thr != NULL); heap = thr->heap; DUK_ASSERT(heap != NULL); DUK_ASSERT(DUK_HEAP_IS_DEBUGGER_ATTACHED(thr->heap)); DUK_ASSERT_DISABLE(breakpoint_index >= 0); /* unsigned */ if (breakpoint_index >= heap->dbg_breakpoint_count) { DUK_D(DUK_DPRINT("invalid breakpoint index: %ld", (long) breakpoint_index)); return 0; } b = heap->dbg_breakpoints + breakpoint_index; h = b->filename; DUK_ASSERT(h != NULL); move_size = sizeof(duk_breakpoint) * (heap->dbg_breakpoint_count - breakpoint_index - 1); if (move_size > 0) { DUK_MEMMOVE((void *) b, (const void *) (b + 1), (size_t) move_size); } heap->dbg_breakpoint_count--; heap->dbg_breakpoints_active[0] = (duk_breakpoint *) NULL; DUK_HSTRING_DECREF(thr, h); /* side effects */ DUK_UNREF(h); /* w/o refcounting */ /* Breakpoint entries above the used area are left as garbage. */ return 1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_44C9F2", "function_addr": 4508146, "binary_name": "3eef51aaf1b7c436a69b2722242bd3a427d13d57fe49c5d2c5815175a4745eea.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_38], rdi"], [4, "mov [rbp+var_3C], esi"], [5, "cmp [rbp+var_38], 0"], [6, "jnz short loc_44CA17"], [7, "mov esi, offset aAssertionFaile_4433"], [8, "mov edi, 36h "], [9, "call sub_402AA8"], [10, "mov rax, [rbp+var_38]"], [11, "mov rax, [rax+48h]"], [12, "mov [rbp+var_8], rax"], [13, "cmp [rbp+var_8], 0"], [14, "jnz short loc_44CA39"], [15, "mov esi, offset aAssertionFaile_4434"], [16, "mov edi, 36h "], [17, "call sub_402AA8"], [18, "mov rax, [rbp+var_38]"], [19, "mov rax, [rax+48h]"], [20, "mov rax, [rax+0C0h]"], [21, "test rax, rax"], [22, "jnz short loc_44CA5C"], [23, "mov esi, offset aAssertionFaile_4435"], [24, "mov edi, 36h "], [25, "call sub_402AA8"], [26, "mov rax, [rbp+var_8]"], [27, "mov eax, [rax+230h]"], [28, "cmp [rbp+var_3C], eax"], [29, "jb short loc_44CA75"], [30, "mov eax, 0"], [31, "jmp locret_44CBA3"], [32, "mov rax, [rbp+var_8]"], [33, "lea rdx, [rax+130h]"], [34, "mov eax, [rbp+var_3C]"], [35, "shl rax, 4"], [36, "add rax, rdx"], [37, "mov [rbp+dest], rax"], [38, "mov rax, [rbp+dest]"], [39, "mov rax, [rax]"], [40, "mov [rbp+var_18], rax"], [41, "cmp [rbp+var_18], 0"], [42, "jnz short loc_44CAAF"], [43, "mov esi, offset aAssertionFaile_4436"], [44, "mov edi, 36h "], [45, "call sub_402AA8"], [46, "mov rax, [rbp+var_8]"], [47, "mov eax, [rax+230h]"], [48, "sub eax, [rbp+var_3C]"], [49, "sub eax, 1"], [50, "mov eax, eax"], [51, "shl rax, 4"], [52, "mov [rbp+n], rax"], [53, "cmp [rbp+n], 0"], [54, "jz short loc_44CAEB"], [55, "mov rax, [rbp+dest]"], [56, "lea rcx, [rax+10h]"], [57, "mov rdx, [rbp+n]"], [58, "mov rax, [rbp+dest]"], [59, "mov rsi, rcx"], [60, "mov rdi, rax"], [61, "call _memmove"], [62, "mov rax, [rbp+var_8]"], [63, "mov eax, [rax+230h]"], [64, "lea edx, [rax-1]"], [65, "mov rax, [rbp+var_8]"], [66, "mov [rax+230h], edx"], [67, "mov rax, [rbp+var_8]"], [68, "mov qword ptr [rax+238h], 0"], [69, "mov rax, [rbp+var_18]"], [70, "mov [rbp+var_28], rax"], [71, "cmp [rbp+var_28], 0"], [72, "jnz short loc_44CB2F"], [73, "mov esi, offset aAssertionFaile_4437"], [74, "mov edi, 36h "], [75, "call sub_402AA8"], [76, "mov rax, [rbp+var_28]"], [77, "mov eax, [rax]"], [78, "mov eax, eax"], [79, "and eax, 3"], [80, "test rax, rax"], [81, "jnz short loc_44CB4E"], [82, "mov esi, offset aAssertionFaile_4438"], [83, "mov edi, 36h "], [84, "call sub_402AA8"], [85, "mov rax, [rbp+var_28]"], [86, "mov rax, [rax+8]"], [87, "test rax, rax"], [88, "jnz short loc_44CB6A"], [89, "mov esi, offset aAssertionFaile_4439"], [90, "mov edi, 36h "], [91, "call sub_402AA8"], [92, "mov rax, [rbp+var_28]"], [93, "mov rax, [rax+8]"], [94, "lea rdx, [rax-1]"], [95, "mov rax, [rbp+var_28]"], [96, "mov [rax+8], rdx"], [97, "mov rax, [rbp+var_28]"], [98, "mov rax, [rax+8]"], [99, "test rax, rax"], [100, "jnz short loc_44CB9E"], [101, "mov rdx, [rbp+var_28]"], [102, "mov rax, [rbp+var_38]"], [103, "mov rsi, rdx"], [104, "mov rdi, rax"], [105, "call sub_45163B"], [106, "mov eax, 1"], [107, "leave"], [108, "retn"]], "data_dep": [[5, 3], [6, 5], [10, 3], [11, 10], [12, 11], [13, 12], [14, 13], [18, 3], [19, 18], [20, 19], [21, 20], [22, 21], [26, 12], [27, 26], [28, 4], [28, 27], [29, 28], [32, 12], [33, 32], [34, 4], [35, 34], [36, 33], [36, 35], [37, 36], [38, 37], [39, 38], [40, 39], [41, 40], [42, 41], [46, 12], [47, 46], [48, 47], [48, 4], [49, 48], [50, 49], [51, 50], [52, 51], [53, 52], [54, 53], [55, 37], [56, 55], [57, 52], [58, 37], [59, 56], [60, 58], [62, 12], [63, 62], [64, 57], [64, 63], [64, 33], [65, 12], [66, 64], [66, 65], [67, 12], [68, 67], [69, 40], [70, 69], [71, 70], [72, 71], [76, 70], [77, 76], [77, 66], [77, 68], [78, 77], [79, 78], [80, 79], [81, 80], [85, 70], [86, 85], [86, 66], [86, 68], [87, 86], [88, 87], [92, 70], [93, 68], [93, 92], [93, 96], [93, 66], [94, 96], [94, 64], [94, 66], [94, 68], [94, 93], [95, 70], [96, 95], [96, 94], [97, 70], [98, 96], [98, 97], [99, 98], [100, 99], [101, 70], [102, 3], [103, 101], [104, 102], [108, 106], [108, 30]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3eef51aaf1b7c436a69b2722242bd3a427d13d57fe49c5d2c5815175a4745eea_3eef51aaf1b7c436a69b2722242bd3a427d13d57fe49c5d2c5815175a4745eea.jsonl.gz", "strip_func_name": "sub_44C9F2", "query": "\n\n\n__int64 __fastcall sub_44C9F2(__int64 a1, unsigned int a2)\n{\n__int64 n; // [rsp+20h] [rbp-20h]\n__int64 v4; // [rsp+28h] [rbp-18h]\n__int64 v5; // [rsp+38h] [rbp-8h]\n\nif ( !a1 )\nsub_402AA8(54, \"assertion failed: thr != NULL (duk_debugger.c:2735)\");\nv5 = *(_QWORD *)(a1 + 72);\nif ( !v5 )\nsub_402AA8(54, \"assertion failed: heap != NULL (duk_debugger.c:2737)\");\nif ( !*(_QWORD *)(*(_QWORD *)(a1 + 72) + 192LL) )\nsub_402AA8(54, \"assertion failed: DUK_HEAP_IS_DEBUGGER_ATTACHED(thr->heap) (duk_debugger.c:2738)\");\nif ( a2 >= *(_DWORD *)(v5 + 560) )\nreturn 0LL;\nv4 = *(_QWORD *)(v5 + 304 + 16LL * a2);\nif ( !v4 )\nsub_402AA8(54, \"assertion failed: h != NULL (duk_debugger.c:2748)\");\nn = 16LL * (*(_DWORD *)(v5 + 560) - a2 - 1);\nif ( n )\nmemmove((void *)(v5 + 304 + 16LL * a2), (const void *)(v5 + 304 + 16LL * a2 + 16), n);\n--*(_DWORD *)(v5 + 560);\n*(_QWORD *)(v5 + 568) = 0LL;\nif ( (*(_DWORD *)v4 & 3) == 0 )\nsub_402AA8(54, \"assertion failed: DUK_HEAPHDR_HTYPE_VALID(duk__h) (duk_debugger.c:2759)\");\nif ( !*(_QWORD *)(v4 + 8) )\nsub_402AA8(54, \"assertion failed: DUK_HEAPHDR_GET_REFCOUNT(duk__h) > 0 (duk_debugger.c:2759)\");\nif ( !--*(_QWORD *)(v4 + 8) )\nsub_45163B(a1, v4);\nreturn 1LL;\n}\n\n\n\nQ:[a1,a2,n,v4,v5,sub_44C9F2,sub_402AA8,sub_45163B,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'thr', 'a2': 'breakpoint_index', 'n': 'move_size', 'v4': 'h', 'v5': 'heap', 'sub_44C9F2': 'duk_debug_remove_breakpoint', 'sub_402AA8': 'duk_default_panic_handler', 'sub_45163B': 'duk_heaphdr_refzero'}"}
get_doc_path
43408ffd93aa77ba43ec436018c0e9cfda03520527a70b6dfa0fc26faef7e8e8
DataSystemsLab
hippo-postgresql
NA
void get_doc_path(const char *my_exec_path, char *ret_path) { make_relative_path(ret_path, DOCDIR, PGBINDIR, my_exec_path); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40EC51", "function_addr": 4254801, "binary_name": "43408ffd93aa77ba43ec436018c0e9cfda03520527a70b6dfa0fc26faef7e8e8.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov rdx, [rbp+var_8]"], [6, "mov rax, [rbp+var_10]"], [7, "mov rcx, rdx"], [8, "mov edx, offset aUsrLocalPgsqlB"], [9, "mov esi, offset aUsrLocalPgsqlS_1"], [10, "mov rdi, rax"], [11, "call sub_40E71E"], [12, "nop"], [13, "leave"], [14, "retn"]], "data_dep": [[5, 3], [6, 4], [7, 5], [10, 6], [14, 11]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/43408ffd93aa77ba43ec436018c0e9cfda03520527a70b6dfa0fc26faef7e8e8_43408ffd93aa77ba43ec436018c0e9cfda03520527a70b6dfa0fc26faef7e8e8.jsonl.gz", "strip_func_name": "sub_40EC51", "query": "\n\n\nint __fastcall sub_40EC51(_BYTE *a1, char *a2)\n{\nreturn sub_40E71E(a2, \"/usr/local/pgsql/share/doc/\", \"/usr/local/pgsql/bin\", a1);\n}\n\n\n\nQ:[a1,a2,sub_40EC51,sub_40E71E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'my_exec_path', 'a2': 'ret_path', 'sub_40EC51': 'get_doc_path', 'sub_40E71E': 'make_relative_path'}"}
AL_Common_Encoder_InitSkippedPicture
44e8aed08fe933b793e356a871e8f31cdd3a534e9dca1fb63610d519aee2b0ea
Xilinx
vcu-ctrl-sw
NA
void AL_Common_Encoder_InitSkippedPicture(AL_TSkippedPicture* pSkipPicture) { pSkipPicture->pBuffer = (uint8_t*)Rtos_Malloc(2 * 1024); assert(pSkipPicture->pBuffer); pSkipPicture->iBufSize = 2 * 1024; pSkipPicture->iNumBits = 0; pSkipPicture->iNumBins = 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_483409", "function_addr": 4731913, "binary_name": "44e8aed08fe933b793e356a871e8f31cdd3a534e9dca1fb63610d519aee2b0ea.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov edi, 800h"], [5, "call sub_480B66"], [6, "mov rdx, [rbp+var_8]"], [7, "mov [rdx], rax"], [8, "mov rax, [rbp+var_8]"], [9, "mov rax, [rax]"], [10, "test rax, rax"], [11, "jnz short loc_483451"], [12, "lea rcx, aAlCommonEncode_2"], [13, "mov edx, 332h"], [14, "lea rsi, aLibEncodeComEn"], [15, "lea rdi, aPskippicturePb"], [16, "call ___assert_fail"], [17, "mov rax, [rbp+var_8]"], [18, "mov dword ptr [rax+8], 800h"], [19, "mov rax, [rbp+var_8]"], [20, "mov dword ptr [rax+0Ch], 0"], [21, "mov rax, [rbp+var_8]"], [22, "mov dword ptr [rax+10h], 0"], [23, "nop"], [24, "leave"], [25, "retn"]], "data_dep": [[6, 3], [7, 6], [7, 5], [8, 3], [9, 8], [9, 7], [10, 9], [11, 10], [15, 4], [17, 3], [18, 17], [19, 3], [20, 19], [21, 3], [22, 21], [25, 21]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/44e8aed08fe933b793e356a871e8f31cdd3a534e9dca1fb63610d519aee2b0ea_44e8aed08fe933b793e356a871e8f31cdd3a534e9dca1fb63610d519aee2b0ea.jsonl.gz", "strip_func_name": "sub_483409", "query": "\n\n\n__int64 __fastcall sub_483409(__int64 a1)\n{\n__int64 result; // rax\n\n*(_QWORD *)a1 = sub_480B66(0x800uLL);\nif ( !*(_QWORD *)a1 )\n__assert_fail(\"pSkipPicture->pBuffer\", \"lib_encode/Com_Encoder.c\", 0x332u, \"AL_Common_Encoder_InitSkippedPicture\");\n*(_DWORD *)(a1 + 8) = 2048;\n*(_DWORD *)(a1 + 12) = 0;\nresult = a1;\n*(_DWORD *)(a1 + 16) = 0;\nreturn result;\n}\n\n\n\nQ:[a1,sub_483409,sub_480B66,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'pSkipPicture', 'sub_483409': 'AL_Common_Encoder_InitSkippedPicture', 'sub_480B66': 'Rtos_Malloc'}"}
delete_temp_files
2fec72a0d684270ed27e67e3baa32c7521fe5b1b5afd5e6b127dddef513ead4f
shinh
elvm
NA
static void delete_temp_files() { for (int i = 0; i < vec_len(tmpfiles); i++) unlink(vec_get(tmpfiles, i)); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402494", "function_addr": 4203668, "binary_name": "2fec72a0d684270ed27e67e3baa32c7521fe5b1b5afd5e6b127dddef513ead4f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_4], 0"], [4, "jmp short loc_4024C5"], [5, "mov rax, cs:off_4251D0"], [6, "mov edx, [rbp+var_4]"], [7, "mov esi, edx"], [8, "mov rdi, rax"], [9, "call sub_40D8EF"], [10, "mov rdi, rax"], [11, "call _unlink"], [12, "add [rbp+var_4], 1"], [13, "mov rax, cs:off_4251D0"], [14, "mov rdi, rax"], [15, "call sub_40DABC"], [16, "cmp [rbp+var_4], eax"], [17, "jl short loc_4024A5"], [18, "nop"], [19, "nop"], [20, "leave"], [21, "retn"]], "data_dep": [[6, 12], [6, 3], [7, 6], [8, 5], [10, 9], [12, 3], [12, 12], [14, 13], [16, 3], [16, 12], [16, 15], [17, 16], [21, 15]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/2fec72a0d684270ed27e67e3baa32c7521fe5b1b5afd5e6b127dddef513ead4f_2fec72a0d684270ed27e67e3baa32c7521fe5b1b5afd5e6b127dddef513ead4f.jsonl.gz", "strip_func_name": "sub_402494", "query": "\n\n\n__int64 sub_402494()\n{\nconst char *v0; // rax\n__int64 result; // rax\nint i; // [rsp+Ch] [rbp-4h]\n\nfor ( i = 0; ; ++i )\n{\nresult = sub_40DABC(off_4251D0);\nif ( i >= (int)result )\nbreak;\nv0 = (const char *)sub_40D8EF(off_4251D0, (unsigned int)i);\nunlink(v0);\n}\nreturn result;\n}\n\n\n\nQ:[sub_402494,sub_40DABC,sub_40D8EF,]\nAssistant: ", "hints": "[]", "response": "{'sub_402494': 'delete_temp_files', 'sub_40DABC': 'vec_len', 'sub_40D8EF': 'vec_get'}"}
sl_bt_ota_set_device_name
d641d4455ba968ec8cdc678803903e8adc4e0f690e4b42f19186ba657d295323
openthread
ot-efr32
NA
sl_status_t sl_bt_ota_set_device_name(size_t name_len, const uint8_t* name) { struct sl_bt_packet *cmd = (struct sl_bt_packet *)sl_bt_cmd_msg; struct sl_bt_packet *rsp = (struct sl_bt_packet *)sl_bt_rsp_msg; if ((1+name_len) > SL_BGAPI_MAX_PAYLOAD_SIZE ) { return SL_STATUS_COMMAND_TOO_LONG; } cmd->data.cmd_ota_set_device_name.name.len=name_len; memcpy(cmd->data.cmd_ota_set_device_name.name.data,name,name_len); cmd->header=sl_bt_cmd_ota_set_device_name_id+(((1+name_len)&0xff)<<8)+(((1+name_len)&0x700)>>8); sl_bt_host_handle_command(); return rsp->data.rsp_ota_set_device_name.result; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_408DC2", "function_addr": 4230594, "binary_name": "d641d4455ba968ec8cdc678803903e8adc4e0f690e4b42f19186ba657d295323.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+n], rdi"], [4, "mov [rbp+src], rsi"], [5, "mov rax, cs:off_43E240"], [6, "mov [rbp+var_8], rax"], [7, "mov rax, cs:off_43E248"], [8, "mov [rbp+var_10], rax"], [9, "mov rax, [rbp+n]"], [10, "add rax, 1"], [11, "cmp rax, 100h"], [12, "jbe short loc_408DFF"], [13, "mov eax, 49h "], [14, "jmp short locret_408E66"], [15, "mov rax, [rbp+n]"], [16, "mov edx, eax"], [17, "mov rax, [rbp+var_8]"], [18, "mov [rax+4], dl"], [19, "mov rax, [rbp+var_8]"], [20, "lea rcx, [rax+5]"], [21, "mov rdx, [rbp+n]"], [22, "mov rax, [rbp+src]"], [23, "mov rsi, rax"], [24, "mov rdi, rcx"], [25, "call _memcpy"], [26, "mov rax, [rbp+n]"], [27, "add eax, 1"], [28, "shl eax, 8"], [29, "movzx edx, ax"], [30, "mov rax, [rbp+n]"], [31, "add rax, 1"], [32, "shr rax, 8"], [33, "and eax, 7"], [34, "add eax, edx"], [35, "lea edx, [rax+1100020h]"], [36, "mov rax, [rbp+var_8]"], [37, "mov [rax], edx"], [38, "mov eax, 0"], [39, "call sub_4038FE"], [40, "mov rax, [rbp+var_10]"], [41, "movzx eax, word ptr [rax+4]"], [42, "movzx eax, ax"], [43, "leave"], [44, "retn"]], "data_dep": [[6, 5], [8, 7], [9, 3], [10, 9], [11, 10], [12, 11], [15, 3], [16, 15], [17, 6], [18, 17], [18, 16], [19, 6], [20, 19], [20, 18], [21, 3], [22, 4], [23, 22], [24, 20], [26, 3], [27, 26], [28, 27], [29, 28], [30, 3], [31, 30], [32, 31], [33, 32], [34, 33], [34, 29], [35, 29], [35, 18], [35, 34], [36, 6], [37, 36], [37, 35], [40, 8], [41, 40], [41, 18], [41, 37], [42, 41], [44, 42], [44, 13]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d641d4455ba968ec8cdc678803903e8adc4e0f690e4b42f19186ba657d295323_d641d4455ba968ec8cdc678803903e8adc4e0f690e4b42f19186ba657d295323.jsonl.gz", "strip_func_name": "sub_408DC2", "query": "\n\n\n__int64 __fastcall sub_408DC2(size_t a1, const void *a2)\n{\nunsigned __int16 *v3; // [rsp+10h] [rbp-10h]\n_DWORD *v4; // [rsp+18h] [rbp-8h]\n\nv4 = off_43E240;\nv3 = (unsigned __int16 *)off_43E248;\nif ( a1 + 1 > 0x100 )\nreturn 73LL;\n*((_BYTE *)off_43E240 + 4) = a1;\nmemcpy((char *)v4 + 5, a2, a1);\n*v4 = (unsigned __int16)(((_WORD)a1 + 1) << 8) + (((a1 + 1) >> 8) & 7) + 17825824;\nsub_4038FE((char *)v4 + 5, a2);\nreturn v3[2];\n}\n\n\n\nQ:[a1,a2,v3,v4,sub_408DC2,sub_4038FE,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'name_len', 'a2': 'name', 'v3': 'rsp_0', 'v4': 'cmd', 'sub_408DC2': 'sl_bt_ota_set_device_name', 'sub_4038FE': 'sl_bt_host_handle_command'}"}
montMulAdd0
04d8823c76520ae1089bbbea1bae33e06060d76862b01c4ae315d6882e788bce
Telecominfraproject
OpenCellular
NA
static void montMulAdd0(const struct vb2_public_key *key, uint32_t *c, const uint32_t *b) { uint32_t d0 = c[0] * key->n0inv; uint64_t B = (uint64_t)d0 * key->n[0] + c[0]; uint32_t i; for (i = 1; i < key->arrsize; ++i) { B = (B >> 32) + (uint64_t)d0 * key->n[i] + c[i]; c[i - 1] = (uint32_t)B; } c[i - 1] = B >> 32; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4077E2", "function_addr": 4224994, "binary_name": "04d8823c76520ae1089bbbea1bae33e06060d76862b01c4ae315d6882e788bce.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov [rbp+var_20], rsi"], [4, "mov [rbp+var_28], rdx"], [5, "mov rax, [rbp+var_20]"], [6, "mov edx, [rax]"], [7, "mov rax, [rbp+var_18]"], [8, "mov eax, [rax+4]"], [9, "imul eax, edx"], [10, "mov [rbp+var_10], eax"], [11, "mov edx, [rbp+var_10]"], [12, "mov rax, [rbp+var_18]"], [13, "mov rax, [rax+8]"], [14, "mov eax, [rax]"], [15, "mov eax, eax"], [16, "imul rdx, rax"], [17, "mov rax, [rbp+var_20]"], [18, "mov eax, [rax]"], [19, "mov eax, eax"], [20, "add rax, rdx"], [21, "mov [rbp+var_8], rax"], [22, "mov [rbp+var_C], 1"], [23, "jmp short loc_40789A"], [24, "mov rax, [rbp+var_8]"], [25, "shr rax, 20h"], [26, "mov rsi, rax"], [27, "mov edx, [rbp+var_10]"], [28, "mov rax, [rbp+var_18]"], [29, "mov rcx, [rax+8]"], [30, "mov eax, [rbp+var_C]"], [31, "shl rax, 2"], [32, "add rax, rcx"], [33, "mov eax, [rax]"], [34, "mov eax, eax"], [35, "imul rax, rdx"], [36, "lea rdx, [rsi+rax]"], [37, "mov eax, [rbp+var_C]"], [38, "lea rcx, ds:0[rax*4]"], [39, "mov rax, [rbp+var_20]"], [40, "add rax, rcx"], [41, "mov eax, [rax]"], [42, "mov eax, eax"], [43, "add rax, rdx"], [44, "mov [rbp+var_8], rax"], [45, "mov eax, [rbp+var_C]"], [46, "sub eax, 1"], [47, "mov eax, eax"], [48, "lea rdx, ds:0[rax*4]"], [49, "mov rax, [rbp+var_20]"], [50, "add rax, rdx"], [51, "mov rdx, [rbp+var_8]"], [52, "mov [rax], edx"], [53, "add [rbp+var_C], 1"], [54, "mov rax, [rbp+var_18]"], [55, "mov eax, [rax]"], [56, "cmp [rbp+var_C], eax"], [57, "jb short loc_407830"], [58, "mov rax, [rbp+var_8]"], [59, "shr rax, 20h"], [60, "mov rdx, rax"], [61, "mov eax, [rbp+var_C]"], [62, "sub eax, 1"], [63, "mov eax, eax"], [64, "lea rcx, ds:0[rax*4]"], [65, "mov rax, [rbp+var_20]"], [66, "add rax, rcx"], [67, "mov [rax], edx"], [68, "nop"], [69, "pop rbp"], [70, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 2], [8, 7], [9, 8], [9, 6], [10, 9], [11, 10], [12, 2], [13, 12], [14, 13], [15, 14], [16, 15], [16, 11], [17, 3], [18, 17], [19, 18], [20, 19], [20, 16], [21, 20], [24, 44], [24, 21], [25, 24], [26, 25], [27, 10], [28, 2], [29, 52], [29, 28], [30, 22], [30, 53], [31, 30], [32, 29], [32, 31], [33, 32], [33, 52], [34, 33], [35, 34], [35, 27], [36, 52], [36, 27], [36, 35], [37, 53], [37, 22], [38, 29], [39, 3], [40, 38], [40, 39], [41, 40], [41, 52], [42, 41], [43, 36], [43, 42], [44, 43], [45, 53], [45, 22], [46, 45], [47, 46], [48, 36], [49, 3], [50, 49], [50, 48], [51, 44], [52, 51], [52, 50], [53, 22], [53, 53], [54, 2], [55, 52], [55, 54], [56, 53], [56, 55], [56, 22], [57, 56], [58, 44], [58, 21], [59, 58], [60, 59], [61, 22], [61, 53], [62, 61], [63, 62], [64, 38], [65, 3], [66, 64], [66, 65], [67, 60], [67, 66], [69, 0], [70, 66]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/04d8823c76520ae1089bbbea1bae33e06060d76862b01c4ae315d6882e788bce_04d8823c76520ae1089bbbea1bae33e06060d76862b01c4ae315d6882e788bce.jsonl.gz", "strip_func_name": "sub_4077E2", "query": "\n\n\n_DWORD *__fastcall sub_4077E2(__int64 a1, _DWORD *a2)\n{\n_DWORD *result; // rax\nunsigned int v3; // [rsp+18h] [rbp-10h]\nunsigned int i; // [rsp+1Ch] [rbp-Ch]\nunsigned __int64 v5; // [rsp+20h] [rbp-8h]\n\nv3 = *a2 * *(_DWORD *)(a1 + 4);\nv5 = **(unsigned int **)(a1 + 8) * (unsigned __int64)v3 + (unsigned int)*a2;\nfor ( i = 1; i < *(_DWORD *)a1; ++i )\n{\nv5 = HIDWORD(v5) + v3 * (unsigned __int64)*(unsigned int *)(*(_QWORD *)(a1 + 8) + 4LL * i) + (unsigned int)a2[i];\na2[i - 1] = v5;\n}\nresult = &a2[i - 1];\n*result = HIDWORD(v5);\nreturn result;\n}\n\n\n\nQ:[a1,a2,v3,v5,sub_4077E2,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'key', 'a2': 'c', 'v3': 'd0', 'v5': 'B', 'sub_4077E2': 'montMulAdd0'}"}
gt_alignment_set_counters_vector
507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69
smarco
gem3-mapper
NA
GT_INLINE void gt_alignment_set_counters_vector(gt_alignment* const alignment,gt_vector* const counters) { GT_ALIGNMENT_CHECK(alignment); alignment->counters = counters; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_409450", "function_addr": 4232272, "binary_name": "507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov [rbp+var_10], rsi"], [4, "mov rax, [rbp+var_8]"], [5, "mov rdx, [rbp+var_10]"], [6, "mov [rax+20h], rdx"], [7, "nop"], [8, "pop rbp"], [9, "retn"]], "data_dep": [[4, 2], [5, 3], [6, 5], [6, 4], [8, 0], [9, 4]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69_507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69.jsonl.gz", "strip_func_name": "sub_409450", "query": "\n\n\n__int64 __fastcall sub_409450(__int64 a1, __int64 a2)\n{\n__int64 result; // rax\n\nresult = a1;\n*(_QWORD *)(a1 + 32) = a2;\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_409450,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'alignment', 'a2': 'counters', 'sub_409450': 'gt_alignment_set_counters_vector'}"}
main
0afc2d54d1a9719cdc4bd0539ee454739c85ef347b9ee9533a549a3c87d55317
x43x61x69
gbdk-osx
NA
int main(void) { TESTFUNP *cases; int numCases = 0; __printf("--- Running: %s\n", getSuiteName()); cases = suite(); while (*cases) { __printf("Running %u\n", numCases); (*cases)(); cases++; numCases++; } __printf("--- Summary: %u/%u/%u: %u failed of %u tests in %u cases.\n", __numFailures, __numTests, numCases, __numFailures, __numTests, numCases ); _exitEmu(); return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "main", "function_addr": 4200070, "binary_name": "0afc2d54d1a9719cdc4bd0539ee454739c85ef347b9ee9533a549a3c87d55317.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_C], 0"], [4, "call sub_40139B"], [5, "mov rsi, rax"], [6, "mov edi, offset aRunningS"], [7, "mov eax, 0"], [8, "call sub_401450"], [9, "call sub_401390"], [10, "mov [rbp+var_8], rax"], [11, "jmp short loc_4016DD"], [12, "mov eax, [rbp+var_C]"], [13, "mov esi, eax"], [14, "mov edi, offset aRunningU"], [15, "mov eax, 0"], [16, "call sub_401450"], [17, "mov rax, [rbp+var_8]"], [18, "mov rax, [rax]"], [19, "call rax"], [20, "add [rbp+var_8], 8"], [21, "add [rbp+var_C], 1"], [22, "mov rax, [rbp+var_8]"], [23, "mov rax, [rax]"], [24, "test rax, rax"], [25, "jnz short loc_4016B7"], [26, "mov r8d, cs:dword_40405C"], [27, "mov edi, cs:dword_404060"], [28, "mov edx, cs:dword_40405C"], [29, "mov eax, cs:dword_404060"], [30, "mov ecx, [rbp+var_C]"], [31, "sub rsp, 8"], [32, "mov esi, [rbp+var_C]"], [33, "push rsi"], [34, "mov r9d, r8d"], [35, "mov r8d, edi"], [36, "mov esi, eax"], [37, "mov edi, offset aSummaryUUUUFai"], [38, "mov eax, 0"], [39, "call sub_401450"], [40, "add rsp, 10h"], [41, "call sub_40174F"]], "data_dep": [[5, 4], [10, 9], [12, 3], [12, 21], [13, 12], [17, 20], [17, 10], [18, 17], [19, 18], [20, 20], [20, 10], [21, 3], [21, 21], [22, 20], [22, 10], [23, 22], [24, 23], [25, 24], [30, 3], [30, 21], [31, 2], [32, 3], [32, 21], [33, 32], [34, 26], [35, 27], [36, 29], [40, 31]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/0afc2d54d1a9719cdc4bd0539ee454739c85ef347b9ee9533a549a3c87d55317_0afc2d54d1a9719cdc4bd0539ee454739c85ef347b9ee9533a549a3c87d55317.jsonl.gz", "strip_func_name": "main", "query": "\n\n\nvoid __fastcall __noreturn main(int a1, char **a2, char **a3)\n{\nconst char *v3; // rax\n__int64 v4; // rdx\n__int64 v5; // rcx\n__int64 v6; // r8\n__int64 v7; // r9\n__int64 v8; // rdx\n__int64 v9; // rcx\n__int64 v10; // r8\n__int64 v11; // r9\nunsigned int v12; // [rsp+4h] [rbp-Ch]\n__int64 (__fastcall **i)(); // [rsp+8h] [rbp-8h]\n\nv12 = 0;\nv3 = sub_40139B();\nsub_401450(\"--- Running: %s\\n\", (__int64)v3, v4, v5, v6, v7);\nfor ( i = sub_401390(); *i; ++i )\n{\nsub_401450(\"Running %u\\n\", v12, v8, v9, v10, v11);\n(*i)();\n++v12;\n}\nsub_401450(\n\"--- Summary: %u/%u/%u: %u failed of %u tests in %u cases.\\n\",\n(unsigned int)dword_404060,\n(unsigned int)dword_40405C,\nv12,\n(unsigned int)dword_404060,\n(unsigned int)dword_40405C,\nv12);\nsub_40174F();\n}\n\n\n\nQ:[a2,a3,a1,v8,v12,i,sub_40139B,sub_401390,sub_40174F,]\nAssistant: ", "hints": "[]", "response": "{'a2': 'argv', 'a3': 'envp', 'a1': 'argc', 'v8': 'envp', 'v12': 'numCases', 'i': 'cases', 'sub_40139B': 'getSuiteName', 'sub_401390': 'suite', 'sub_40174F': '_exitEmu'}"}
appendStringLiteralDQ
03cb21066879bf2566b6b00ca99c237086584928f4ea06d7e91f257b75439064
DataSystemsLab
hippo-postgresql
NA
void appendStringLiteralDQ(PQExpBuffer buf, const char *str, const char *dqprefix) { static const char suffixes[] = "_XXXXXXX"; int nextchar = 0; PQExpBuffer delimBuf = createPQExpBuffer(); /* start with $ + dqprefix if not NULL */ appendPQExpBufferChar(delimBuf, '$'); if (dqprefix) appendPQExpBufferStr(delimBuf, dqprefix); /* * Make sure we choose a delimiter which (without the trailing $) is not * present in the string being quoted. We don't check with the trailing $ * because a string ending in $foo must not be quoted with $foo$. */ while (strstr(str, delimBuf->data) != NULL) { appendPQExpBufferChar(delimBuf, suffixes[nextchar++]); nextchar %= sizeof(suffixes) - 1; } /* add trailing $ */ appendPQExpBufferChar(delimBuf, '$'); /* quote it and we are all done */ appendPQExpBufferStr(buf, delimBuf->data); appendPQExpBufferStr(buf, str); appendPQExpBufferStr(buf, delimBuf->data); destroyPQExpBuffer(delimBuf); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_406490", "function_addr": 4220048, "binary_name": "03cb21066879bf2566b6b00ca99c237086584928f4ea06d7e91f257b75439064.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+haystack], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "mov [rbp+var_4], 0"], [7, "call _createPQExpBuffer"], [8, "mov [rbp+var_10], rax"], [9, "mov rax, [rbp+var_10]"], [10, "mov esi, 24h "], [11, "mov rdi, rax"], [12, "call _appendPQExpBufferChar"], [13, "cmp [rbp+var_28], 0"], [14, "jz short loc_406508"], [15, "mov rdx, [rbp+var_28]"], [16, "mov rax, [rbp+var_10]"], [17, "mov rsi, rdx"], [18, "mov rdi, rax"], [19, "call _appendPQExpBufferStr"], [20, "jmp short loc_406508"], [21, "mov eax, [rbp+var_4]"], [22, "lea edx, [rax+1]"], [23, "mov [rbp+var_4], edx"], [24, "cdqe"], [25, "movzx eax, ds:byte_408ED0[rax]"], [26, "movsx edx, al"], [27, "mov rax, [rbp+var_10]"], [28, "mov esi, edx"], [29, "mov rdi, rax"], [30, "call _appendPQExpBufferChar"], [31, "and [rbp+var_4], 7"], [32, "mov rax, [rbp+var_10]"], [33, "mov rdx, [rax]"], [34, "mov rax, [rbp+haystack]"], [35, "mov rsi, rdx"], [36, "mov rdi, rax"], [37, "call _strstr"], [38, "test rax, rax"], [39, "jnz short loc_4064E1"], [40, "mov rax, [rbp+var_10]"], [41, "mov esi, 24h "], [42, "mov rdi, rax"], [43, "call _appendPQExpBufferChar"], [44, "mov rax, [rbp+var_10]"], [45, "mov rdx, [rax]"], [46, "mov rax, [rbp+var_18]"], [47, "mov rsi, rdx"], [48, "mov rdi, rax"], [49, "call _appendPQExpBufferStr"], [50, "mov rdx, [rbp+haystack]"], [51, "mov rax, [rbp+var_18]"], [52, "mov rsi, rdx"], [53, "mov rdi, rax"], [54, "call _appendPQExpBufferStr"], [55, "mov rax, [rbp+var_10]"], [56, "mov rdx, [rax]"], [57, "mov rax, [rbp+var_18]"], [58, "mov rsi, rdx"], [59, "mov rdi, rax"], [60, "call _appendPQExpBufferStr"], [61, "mov rax, [rbp+var_10]"], [62, "mov rdi, rax"], [63, "call _destroyPQExpBuffer"], [64, "nop"], [65, "leave"], [66, "retn"]], "data_dep": [[8, 7], [9, 8], [11, 9], [13, 5], [14, 13], [15, 5], [16, 8], [17, 15], [18, 16], [21, 31], [21, 6], [22, 21], [22, 33], [23, 22], [26, 25], [27, 8], [28, 26], [29, 27], [31, 23], [32, 8], [33, 32], [34, 4], [35, 33], [36, 34], [38, 37], [39, 38], [40, 8], [42, 40], [44, 8], [45, 44], [46, 3], [47, 45], [48, 46], [50, 4], [51, 3], [52, 50], [53, 51], [55, 8], [56, 55], [57, 3], [58, 56], [59, 57], [61, 8], [62, 61], [66, 63]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/03cb21066879bf2566b6b00ca99c237086584928f4ea06d7e91f257b75439064_03cb21066879bf2566b6b00ca99c237086584928f4ea06d7e91f257b75439064.jsonl.gz", "strip_func_name": "sub_406490", "query": "\n\n\n__int64 __fastcall sub_406490(__int64 a1, const char *a2, __int64 a3)\n{\nconst char **v5; // [rsp+20h] [rbp-10h]\nchar v6; // [rsp+2Ch] [rbp-4h]\n\nv6 = 0;\nv5 = (const char **)createPQExpBuffer();\nappendPQExpBufferChar();\nif ( a3 )\nappendPQExpBufferStr();\nwhile ( strstr(a2, *v5) )\n{\nappendPQExpBufferChar();\nv6 = (v6 + 1) & 7;\n}\nappendPQExpBufferChar();\nappendPQExpBufferStr();\nappendPQExpBufferStr();\nappendPQExpBufferStr();\nreturn destroyPQExpBuffer();\n}\n\n\n\nQ:[a3,a2,a1,v5,v6,sub_406490,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'dqprefix', 'a2': 'str', 'a1': 'buf', 'v5': 'delimBuf', 'v6': 'nextchar', 'sub_406490': 'appendStringLiteralDQ'}"}
cleanup_children
0751e249e278081842d74c20af54dbc95f1a371e2f46402cafa4c4cbd3d44694
robertdavidgraham
rdpscan
NA
static void cleanup_children(struct spawned *children, size_t *children_count) { for (;;) { int pid; /* Reap children. * The first parameter is set to -1 to indicate that we want * information about ANY of our children processes. * The second paremeter is set to NULL to indicate that we * aren't interested in knowing the status/result code from * the process. * The third parameter is WNOHHANG, meaning that we want to return * immediately */ pid = waitpid(-1, 0, WNOHANG); if (pid > 0) { /* If we get back a valid PID, that means the child process * has terminated. We want to decrement our count by one * then loop around looking for more child processes. */ (*children_count) --; //fprintf(stderr, "[ ] children left = %u\n", (unsigned)*children_count); continue; } else if (pid == 0) { /* if none of our children are currently exited, then this * value of zero is returned. */ break; } else if (pid == -1 && errno == ECHILD) { /* In this condition, there are no child processes. In this * case, we just want to handle this the same as pid=0 */ //fprintf(stderr, "[ ] no children left\n"); break; } else if (pid < 0) { /* Some extraordinary error occured */ //fprintf(stderr, "[-] waitpid() %s\n", strerror(errno)); exit(1); } } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_420E28", "function_addr": 4329000, "binary_name": "0751e249e278081842d74c20af54dbc95f1a371e2f46402cafa4c4cbd3d44694.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov edx, 1"], [6, "mov esi, 0"], [7, "mov edi, 0FFFFFFFFh"], [8, "call _waitpid"], [9, "mov [rbp+var_4], eax"], [10, "cmp [rbp+var_4], 0"], [11, "jle short loc_420E69"], [12, "mov rax, [rbp+var_20]"], [13, "mov rax, [rax]"], [14, "lea rdx, [rax-1]"], [15, "mov rax, [rbp+var_20]"], [16, "mov [rax], rdx"], [17, "jmp short loc_420E91"], [18, "cmp [rbp+var_4], 0"], [19, "jz short loc_420E93"], [20, "cmp [rbp+var_4], 0FFFFFFFFh"], [21, "jnz short loc_420E81"], [22, "call ___errno_location"], [23, "mov eax, [rax]"], [24, "cmp eax, 0Ah"], [25, "jz short loc_420E94"], [26, "cmp [rbp+var_4], 0"], [27, "jns short loc_420E38"], [28, "mov edi, 1"], [29, "call _exit"], [30, "jmp short loc_420E38"], [31, "nop"], [32, "nop"], [33, "leave"], [34, "retn"]], "data_dep": [[9, 8], [10, 9], [11, 10], [12, 4], [13, 16], [13, 12], [14, 16], [14, 13], [14, 5], [15, 4], [16, 15], [16, 14], [18, 9], [19, 18], [20, 9], [21, 20], [23, 16], [23, 22], [24, 23], [25, 24], [26, 9], [27, 26], [34, 8], [34, 23]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/0751e249e278081842d74c20af54dbc95f1a371e2f46402cafa4c4cbd3d44694_0751e249e278081842d74c20af54dbc95f1a371e2f46402cafa4c4cbd3d44694.jsonl.gz", "strip_func_name": "sub_420E28", "query": "\n\n\n__pid_t __fastcall sub_420E28(__int64 a1, _QWORD *a2)\n{\n__pid_t result; // eax\nint v3; // [rsp+1Ch] [rbp-4h]\n\nwhile ( 1 )\n{\nwhile ( 1 )\n{\nresult = waitpid(-1, 0LL, 1);\nv3 = result;\nif ( result <= 0 )\nbreak;\n--*a2;\n}\nif ( !result )\nbreak;\nif ( result == -1 )\n{\nresult = *__errno_location();\nif ( result == 10 )\nbreak;\n}\nif ( v3 < 0 )\nexit(1);\n}\nreturn result;\n}\n\n\n\nQ:[a2,a1,v3,sub_420E28,]\nAssistant: ", "hints": "[]", "response": "{'a2': 'children_count', 'a1': 'children', 'v3': 'pid', 'sub_420E28': 'cleanup_children'}"}
vb2_secdata_get
a97a959f5a5bbcfbc13eaf601fe5a3d4d6f443efbaca9a1e6880d3b64fa82be1
Telecominfraproject
OpenCellular
NA
int vb2_secdata_get(struct vb2_context *ctx, enum vb2_secdata_param param, uint32_t *dest) { struct vb2_secdata *sec = (struct vb2_secdata *)ctx->secdata; if (!(vb2_get_sd(ctx)->status & VB2_SD_STATUS_SECDATA_INIT)) return VB2_ERROR_SECDATA_GET_UNINITIALIZED; switch(param) { case VB2_SECDATA_FLAGS: *dest = sec->flags; return VB2_SUCCESS; case VB2_SECDATA_VERSIONS: *dest = sec->fw_versions; return VB2_SUCCESS; default: return VB2_ERROR_SECDATA_GET_PARAM; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404F30", "function_addr": 4214576, "binary_name": "a97a959f5a5bbcfbc13eaf601fe5a3d4d6f443efbaca9a1e6880d3b64fa82be1.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 28h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_1C], esi"], [5, "mov [rbp+var_28], rdx"], [6, "mov rax, [rbp+var_18]"], [7, "add rax, 54h "], [8, "mov [rbp+var_8], rax"], [9, "mov rax, [rbp+var_18]"], [10, "mov rdi, rax"], [11, "call sub_404DE8"], [12, "mov eax, [rax+20h]"], [13, "and eax, 4"], [14, "test eax, eax"], [15, "jnz short loc_404F6C"], [16, "mov eax, 10040006h"], [17, "jmp short locret_404FAB"], [18, "cmp [rbp+var_1C], 0"], [19, "jz short loc_404F7A"], [20, "cmp [rbp+var_1C], 1"], [21, "jz short loc_404F92"], [22, "jmp short loc_404FA6"], [23, "mov rax, [rbp+var_8]"], [24, "movzx eax, byte ptr [rax+1]"], [25, "movzx edx, al"], [26, "mov rax, [rbp+var_28]"], [27, "mov [rax], edx"], [28, "mov eax, 0"], [29, "jmp short locret_404FAB"], [30, "mov rax, [rbp+var_8]"], [31, "mov edx, [rax+2]"], [32, "mov rax, [rbp+var_28]"], [33, "mov [rax], edx"], [34, "mov eax, 0"], [35, "jmp short locret_404FAB"], [36, "mov eax, 10040003h"], [37, "leave"], [38, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [9, 3], [10, 9], [12, 11], [13, 12], [14, 13], [15, 14], [18, 4], [19, 18], [20, 4], [21, 20], [23, 8], [24, 23], [25, 24], [26, 5], [27, 25], [27, 26], [30, 8], [31, 30], [32, 5], [33, 32], [33, 31], [38, 16], [38, 28], [38, 34], [38, 36]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/a97a959f5a5bbcfbc13eaf601fe5a3d4d6f443efbaca9a1e6880d3b64fa82be1_a97a959f5a5bbcfbc13eaf601fe5a3d4d6f443efbaca9a1e6880d3b64fa82be1.jsonl.gz", "strip_func_name": "sub_404F30", "query": "\n\n\n__int64 __fastcall sub_404F30(__int64 a1, int a2, _DWORD *a3)\n{\n__int64 result; // rax\n\nif ( (*(_DWORD *)(sub_404DE8(a1) + 32) & 4) == 0 )\nreturn 268697606LL;\nif ( a2 )\n{\nif ( a2 == 1 )\n{\n*a3 = *(_DWORD *)(a1 + 86);\nresult = 0LL;\n}\nelse\n{\nresult = 268697603LL;\n}\n}\nelse\n{\n*a3 = *(unsigned __int8 *)(a1 + 85);\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_404F30,sub_404DE8,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'dest', 'a1': 'ctx', 'a2': 'param', 'sub_404F30': 'vb2_secdata_get', 'sub_404DE8': 'vb2_get_sd_4'}"}
freqt
eceaa295fd3a2410186e8bae8674274091c230f954372fad2416ce91cd698e89
festvox
flite
NA
static void freqt (double *c1, int m1, double *c2, int m2, double a, VocoderSetup *vs) { int i, j; double b; if (vs->d==NULL) { vs->size = m2; vs->d = cst_alloc(double,vs->size + vs->size + 2); vs->g = vs->d+vs->size+1; } if (m2>vs->size) { cst_free(vs->d); vs->size = m2; vs->d = cst_alloc(double,vs->size + vs->size + 2); vs->g = vs->d+vs->size+1; } b = 1-a*a; for (i=0; i<m2+1; i++) vs->g[i] = 0.0; for (i=-m1; i<=0; i++) { if (0 <= m2) vs->g[0] = c1[-i]+a*(vs->d[0]=vs->g[0]); if (1 <= m2) vs->g[1] = b*vs->d[0]+a*(vs->d[1]=vs->g[1]); for (j=2; j<=m2; j++) vs->g[j] = vs->d[j-1]+a*((vs->d[j]=vs->g[j])-vs->g[j-1]); } memmove(c2,vs->g,sizeof(double)*(m2+1)); return; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4256BB", "function_addr": 4347579, "binary_name": "eceaa295fd3a2410186e8bae8674274091c230f954372fad2416ce91cd698e89.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_1C], esi"], [5, "mov [rbp+dest], rdx"], [6, "mov [rbp+var_20], ecx"], [7, "movsd [rbp+var_30], xmm0"], [8, "mov [rbp+var_38], r8"], [9, "mov rax, [rbp+var_38]"], [10, "mov rax, [rax+138h]"], [11, "test rax, rax"], [12, "jnz short loc_42574A"], [13, "mov rax, [rbp+var_38]"], [14, "mov edx, [rbp+var_20]"], [15, "mov [rax+134h], edx"], [16, "mov rax, [rbp+var_38]"], [17, "mov eax, [rax+134h]"], [18, "add eax, 1"], [19, "add eax, eax"], [20, "cdqe"], [21, "shl eax, 3"], [22, "mov edi, eax"], [23, "call sub_40F3AA"], [24, "mov rdx, [rbp+var_38]"], [25, "mov [rdx+138h], rax"], [26, "mov rax, [rbp+var_38]"], [27, "mov rdx, [rax+138h]"], [28, "mov rax, [rbp+var_38]"], [29, "mov eax, [rax+134h]"], [30, "cdqe"], [31, "add rax, 1"], [32, "shl rax, 3"], [33, "add rdx, rax"], [34, "mov rax, [rbp+var_38]"], [35, "mov [rax+140h], rdx"], [36, "mov rax, [rbp+var_38]"], [37, "mov eax, [rax+134h]"], [38, "cmp [rbp+var_20], eax"], [39, "jle short loc_4257CC"], [40, "mov rax, [rbp+var_38]"], [41, "mov rax, [rax+138h]"], [42, "mov rdi, rax"], [43, "call sub_40F51F"], [44, "mov rax, [rbp+var_38]"], [45, "mov edx, [rbp+var_20]"], [46, "mov [rax+134h], edx"], [47, "mov rax, [rbp+var_38]"], [48, "mov eax, [rax+134h]"], [49, "add eax, 1"], [50, "add eax, eax"], [51, "cdqe"], [52, "shl eax, 3"], [53, "mov edi, eax"], [54, "call sub_40F3AA"], [55, "mov rdx, [rbp+var_38]"], [56, "mov [rdx+138h], rax"], [57, "mov rax, [rbp+var_38]"], [58, "mov rdx, [rax+138h]"], [59, "mov rax, [rbp+var_38]"], [60, "mov eax, [rax+134h]"], [61, "cdqe"], [62, "add rax, 1"], [63, "shl rax, 3"], [64, "add rdx, rax"], [65, "mov rax, [rbp+var_38]"], [66, "mov [rax+140h], rdx"], [67, "movsd xmm0, [rbp+var_30]"], [68, "movapd xmm1, xmm0"], [69, "mulsd xmm1, xmm0"], [70, "movsd xmm0, cs:qword_8AB738"], [71, "subsd xmm0, xmm1"], [72, "movsd [rbp+var_10], xmm0"], [73, "mov [rbp+var_4], 0"], [74, "jmp short loc_425816"], [75, "mov rax, [rbp+var_38]"], [76, "mov rdx, [rax+140h]"], [77, "mov eax, [rbp+var_4]"], [78, "cdqe"], [79, "shl rax, 3"], [80, "add rax, rdx"], [81, "pxor xmm0, xmm0"], [82, "movsd qword ptr [rax], xmm0"], [83, "add [rbp+var_4], 1"], [84, "mov eax, [rbp+var_20]"], [85, "cmp eax, [rbp+var_4]"], [86, "jge short loc_4257F3"], [87, "mov eax, [rbp+var_1C]"], [88, "neg eax"], [89, "mov [rbp+var_4], eax"], [90, "jmp loc_4259A6"], [91, "cmp [rbp+var_20], 0"], [92, "js short loc_425885"], [93, "mov eax, [rbp+var_4]"], [94, "neg eax"], [95, "cdqe"], [96, "lea rdx, ds:0[rax*8]"], [97, "mov rax, [rbp+var_18]"], [98, "add rax, rdx"], [99, "movsd xmm1, qword ptr [rax]"], [100, "mov rax, [rbp+var_38]"], [101, "mov rdx, [rax+140h]"], [102, "mov rax, [rbp+var_38]"], [103, "mov rax, [rax+138h]"], [104, "movsd xmm0, qword ptr [rdx]"], [105, "movsd qword ptr [rax], xmm0"], [106, "movsd xmm0, qword ptr [rax]"], [107, "mulsd xmm0, [rbp+var_30]"], [108, "mov rax, [rbp+var_38]"], [109, "mov rax, [rax+140h]"], [110, "addsd xmm0, xmm1"], [111, "movsd qword ptr [rax], xmm0"], [112, "cmp [rbp+var_20], 0"], [113, "jle short loc_4258E6"], [114, "mov rax, [rbp+var_38]"], [115, "mov rax, [rax+138h]"], [116, "movsd xmm0, qword ptr [rax]"], [117, "movapd xmm1, xmm0"], [118, "mulsd xmm1, [rbp+var_10]"], [119, "mov rax, [rbp+var_38]"], [120, "mov rdx, [rax+140h]"], [121, "mov rax, [rbp+var_38]"], [122, "mov rax, [rax+138h]"], [123, "add rax, 8"], [124, "movsd xmm0, qword ptr [rdx+8]"], [125, "movsd qword ptr [rax], xmm0"], [126, "movsd xmm0, qword ptr [rax]"], [127, "mulsd xmm0, [rbp+var_30]"], [128, "mov rax, [rbp+var_38]"], [129, "mov rax, [rax+140h]"], [130, "add rax, 8"], [131, "addsd xmm0, xmm1"], [132, "movsd qword ptr [rax], xmm0"], [133, "mov [rbp+var_8], 2"], [134, "jmp loc_425996"], [135, "mov rax, [rbp+var_38]"], [136, "mov rdx, [rax+138h]"], [137, "mov eax, [rbp+var_8]"], [138, "cdqe"], [139, "shl rax, 3"], [140, "sub rax, 8"], [141, "add rax, rdx"], [142, "movsd xmm1, qword ptr [rax]"], [143, "mov rax, [rbp+var_38]"], [144, "mov rdx, [rax+140h]"], [145, "mov eax, [rbp+var_8]"], [146, "cdqe"], [147, "shl rax, 3"], [148, "add rdx, rax"], [149, "mov rax, [rbp+var_38]"], [150, "mov rcx, [rax+138h]"], [151, "mov eax, [rbp+var_8]"], [152, "cdqe"], [153, "shl rax, 3"], [154, "add rax, rcx"], [155, "movsd xmm0, qword ptr [rdx]"], [156, "movsd qword ptr [rax], xmm0"], [157, "movsd xmm0, qword ptr [rax]"], [158, "mov rax, [rbp+var_38]"], [159, "mov rdx, [rax+140h]"], [160, "mov eax, [rbp+var_8]"], [161, "cdqe"], [162, "shl rax, 3"], [163, "sub rax, 8"], [164, "add rax, rdx"], [165, "movsd xmm2, qword ptr [rax]"], [166, "subsd xmm0, xmm2"], [167, "mulsd xmm0, [rbp+var_30]"], [168, "mov rax, [rbp+var_38]"], [169, "mov rdx, [rax+140h]"], [170, "mov eax, [rbp+var_8]"], [171, "cdqe"], [172, "shl rax, 3"], [173, "add rax, rdx"], [174, "addsd xmm0, xmm1"], [175, "movsd qword ptr [rax], xmm0"], [176, "add [rbp+var_8], 1"], [177, "mov eax, [rbp+var_8]"], [178, "cmp eax, [rbp+var_20]"], [179, "jle loc_4258F2"], [180, "add [rbp+var_4], 1"], [181, "cmp [rbp+var_4], 0"], [182, "jle loc_42582B"], [183, "mov eax, [rbp+var_20]"], [184, "add eax, 1"], [185, "cdqe"], [186, "lea rdx, ds:0[rax*8]"], [187, "mov rax, [rbp+var_38]"], [188, "mov rcx, [rax+140h]"], [189, "mov rax, [rbp+dest]"], [190, "mov rsi, rcx"], [191, "mov rdi, rax"], [192, "call _memmove"], [193, "nop"], [194, "leave"], [195, "retn"]], "data_dep": [[9, 8], [10, 9], [11, 10], [12, 11], [13, 8], [14, 6], [15, 14], [15, 13], [16, 8], [17, 15], [17, 16], [18, 17], [19, 18], [21, 19], [22, 21], [24, 8], [25, 24], [25, 23], [26, 8], [27, 26], [27, 25], [28, 8], [29, 25], [29, 15], [29, 28], [31, 29], [32, 31], [33, 32], [33, 27], [34, 8], [35, 34], [35, 33], [36, 8], [37, 35], [37, 25], [37, 15], [37, 36], [38, 6], [38, 37], [39, 38], [40, 8], [41, 15], [41, 46], [41, 40], [41, 35], [41, 25], [41, 66], [41, 56], [42, 41], [44, 8], [45, 6], [46, 45], [46, 44], [47, 8], [48, 47], [48, 46], [49, 48], [50, 49], [52, 50], [53, 52], [55, 8], [56, 55], [56, 54], [57, 8], [58, 57], [58, 56], [59, 8], [60, 46], [60, 59], [60, 56], [62, 60], [63, 62], [64, 63], [64, 58], [65, 8], [66, 65], [66, 64], [67, 7], [68, 67], [69, 67], [69, 68], [71, 69], [71, 70], [72, 71], [75, 8], [76, 82], [76, 35], [76, 25], [76, 15], [76, 66], [76, 75], [76, 56], [76, 46], [77, 83], [77, 73], [79, 77], [80, 76], [80, 79], [82, 81], [82, 80], [83, 83], [83, 73], [84, 6], [85, 84], [85, 83], [85, 73], [86, 85], [87, 4], [88, 87], [89, 88], [91, 6], [92, 91], [93, 180], [93, 89], [94, 93], [96, 76], [96, 33], [96, 120], [96, 101], [96, 64], [96, 169], [97, 3], [98, 97], [98, 96], [99, 98], [99, 66], [99, 56], [99, 46], [99, 125], [99, 111], [99, 105], [99, 82], [99, 175], [99, 35], [99, 156], [99, 25], [99, 132], [99, 15], [100, 8], [101, 46], [101, 125], [101, 111], [101, 105], [101, 82], [101, 175], [101, 35], [101, 156], [101, 25], [101, 132], [101, 15], [101, 100], [101, 66], [101, 56], [102, 8], [103, 102], [103, 111], [103, 105], [103, 82], [103, 175], [103, 35], [103, 156], [103, 25], [103, 132], [103, 15], [103, 66], [103, 56], [103, 46], [103, 125], [104, 66], [104, 56], [104, 46], [104, 125], [104, 111], [104, 101], [104, 82], [104, 175], [104, 35], [104, 156], [104, 25], [104, 105], [104, 132], [104, 15], [105, 104], [105, 103], [106, 105], [106, 103], [107, 106], [107, 7], [108, 8], [109, 35], [109, 105], [109, 108], [109, 66], [110, 99], [110, 107], [111, 110], [111, 109], [112, 6], [113, 112], [114, 8], [115, 66], [115, 56], [115, 46], [115, 125], [115, 111], [115, 105], [115, 82], [115, 175], [115, 35], [115, 156], [115, 25], [115, 114], [115, 132], [115, 15], [116, 175], [116, 35], [116, 156], [116, 25], [116, 132], [116, 15], [116, 66], [116, 56], [116, 46], [116, 125], [116, 111], [116, 115], [116, 105], [116, 82], [117, 116], [118, 117], [118, 72], [119, 8], [120, 46], [120, 125], [120, 111], [120, 105], [120, 82], [120, 175], [120, 35], [120, 156], [120, 25], [120, 119], [120, 132], [120, 15], [120, 66], [120, 56], [121, 8], [122, 105], [122, 82], [122, 175], [122, 35], [122, 156], [122, 25], [122, 132], [122, 15], [122, 121], [122, 66], [122, 56], [122, 46], [122, 125], [122, 111], [123, 122], [124, 175], [124, 35], [124, 156], [124, 25], [124, 132], [124, 15], [124, 66], [124, 56], [124, 46], [124, 125], [124, 111], [124, 120], [124, 105], [124, 82], [125, 124], [125, 123], [126, 125], [126, 123], [127, 7], [127, 126], [128, 8], [129, 128], [129, 66], [129, 125], [129, 35], [130, 129], [131, 118], [131, 127], [132, 131], [132, 130], [135, 8], [136, 135], [136, 125], [136, 111], [136, 105], [136, 82], [136, 175], [136, 35], [136, 156], [136, 25], [136, 132], [136, 15], [136, 66], [136, 56], [136, 46], [137, 176], [137, 133], [139, 137], [140, 139], [141, 136], [141, 140], [142, 66], [142, 56], [142, 46], [142, 125], [142, 111], [142, 105], [142, 82], [142, 175], [142, 35], [142, 156], [142, 25], [142, 132], [142, 141], [142, 15], [143, 8], [144, 125], [144, 143], [144, 111], [144, 105], [144, 82], [144, 175], [144, 35], [144, 156], [144, 25], [144, 132], [144, 15], [144, 66], [144, 56], [144, 46], [145, 176], [145, 133], [147, 145], [148, 144], [148, 147], [149, 8], [150, 56], [150, 46], [150, 149], [150, 125], [150, 111], [150, 105], [150, 82], [150, 175], [150, 35], [150, 156], [150, 25], [150, 132], [150, 15], [150, 66], [151, 176], [151, 133], [153, 151], [154, 150], [154, 153], [155, 46], [155, 148], [155, 125], [155, 111], [155, 105], [155, 82], [155, 175], [155, 35], [155, 156], [155, 25], [155, 132], [155, 15], [155, 66], [155, 56], [156, 154], [156, 155], [157, 156], [157, 154], [158, 8], [159, 66], [159, 158], [159, 35], [159, 156], [160, 176], [160, 133], [162, 160], [163, 162], [164, 163], [164, 159], [165, 156], [165, 164], [166, 157], [166, 165], [167, 166], [167, 7], [168, 8], [169, 35], [169, 156], [169, 168], [169, 66], [170, 176], [170, 133], [172, 170], [173, 169], [173, 172], [174, 142], [174, 167], [175, 173], [175, 174], [176, 176], [176, 133], [177, 176], [177, 133], [178, 6], [178, 177], [179, 178], [180, 180], [180, 89], [181, 89], [181, 180], [182, 181], [183, 6], [184, 183], [186, 33], [186, 64], [186, 120], [186, 101], [186, 76], [186, 169], [187, 8], [188, 187], [188, 56], [188, 46], [188, 125], [188, 111], [188, 105], [188, 82], [188, 175], [188, 35], [188, 156], [188, 25], [188, 132], [188, 15], [188, 66], [189, 5], [190, 188], [191, 189], [195, 192]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/eceaa295fd3a2410186e8bae8674274091c230f954372fad2416ce91cd698e89_eceaa295fd3a2410186e8bae8674274091c230f954372fad2416ce91cd698e89.jsonl.gz", "strip_func_name": "sub_4256BB", "query": "\n\n\nvoid *__fastcall sub_4256BB(__int64 a1, __int64 a2, void *a3, int a4, __int64 a5, int a6, double a7)\n{\nint v7; // ecx\nint v8; // er8\nint v9; // er9\ndouble v10; // xmm1_8\ndouble *v11; // rax\ndouble v12; // xmm1_8\ndouble *v13; // rax\ndouble v14; // xmm1_8\ndouble *v15; // rax\nint k; // [rsp+38h] [rbp-8h]\nint i; // [rsp+3Ch] [rbp-4h]\nint j; // [rsp+3Ch] [rbp-4h]\n\nif ( !*(_QWORD *)(a5 + 312) )\n{\n*(_DWORD *)(a5 + 308) = a4;\n*(_QWORD *)(a5 + 312) = sub_40F3AA(16 * (*(_DWORD *)(a5 + 308) + 1), a2, a4, a4, a5, a6);\n*(_QWORD *)(a5 + 320) = 8 * (*(int *)(a5 + 308) + 1LL) + *(_QWORD *)(a5 + 312);\n}\nif ( a4 > *(_DWORD *)(a5 + 308) )\n{\nsub_40F51F(*(void **)(a5 + 312));\n*(_DWORD *)(a5 + 308) = a4;\n*(_QWORD *)(a5 + 312) = sub_40F3AA(16 * (*(_DWORD *)(a5 + 308) + 1), a2, a4, v7, v8, v9);\n*(_QWORD *)(a5 + 320) = 8 * (*(int *)(a5 + 308) + 1LL) + *(_QWORD *)(a5 + 312);\n}\nfor ( i = 0; a4 >= i; ++i )\n*(_QWORD *)(*(_QWORD *)(a5 + 320) + 8LL * i) = 0LL;\nfor ( j = -(int)a2; j <= 0; ++j )\n{\nif ( a4 >= 0 )\n{\nv10 = *(double *)(8LL * -j + a1);\nv11 = *(double **)(a5 + 312);\n*v11 = **(double **)(a5 + 320);\n**(double **)(a5 + 320) = *v11 * a7 + v10;\n}\nif ( a4 > 0 )\n{\nv12 = **(double **)(a5 + 312) * (1.0 - a7 * a7);\nv13 = (double *)(*(_QWORD *)(a5 + 312) + 8LL);\n*v13 = *(double *)(*(_QWORD *)(a5 + 320) + 8LL);\n*(double *)(*(_QWORD *)(a5 + 320) + 8LL) = *v13 * a7 + v12;\n}\nfor ( k = 2; k <= a4; ++k )\n{\nv14 = *(double *)(*(_QWORD *)(a5 + 312) + 8LL * k - 8);\nv15 = (double *)(*(_QWORD *)(a5 + 312) + 8LL * k);\n*v15 = *(double *)(8LL * k + *(_QWORD *)(a5 + 320));\n*(double *)(*(_QWORD *)(a5 + 320) + 8LL * k) = (*v15 - *(double *)(*(_QWORD *)(a5 + 320) + 8LL * k - 8)) * a7\n+ v14;\n}\n}\nreturn memmove(a3, *(const void **)(a5 + 320), 8LL * (a4 + 1));\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a7,v7,v8,sub_4256BB,sub_40F3AA,sub_40F51F,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'c2', 'a4': 'm2', 'a1': 'c1', 'a2': 'm1', 'a5': 'vs', 'a7': 'a', 'v7': 'm2', 'v8': 'vs', 'sub_4256BB': 'freqt', 'sub_40F3AA': 'cst_safe_alloc', 'sub_40F51F': 'cst_free'}"}
ha_boot_disk
9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23
open-simh
simh
NA
static void ha_boot_disk(UNIT *uptr, uint8 tc) { t_seccnt sectsread; t_stat r; uint8 buf[HA_BLKSZ]; uint32 i, boot_loc; /* Read in the Physical Descriptor (PD) block (block 0) */ r = sim_disk_rdsect(uptr, 0, buf, &sectsread, 1); if (r != SCPE_OK) { sim_debug(HA_TRACE, &ha_dev, "[ha_boot_disk] Could not read LBA 0\n"); HA_STAT(tc, HA_CKCON, CIO_SUCCESS); return; } /* Store the Physical Descriptor (PD) block at well-known address 0x2004400 */ sim_debug(HA_TRACE, &ha_dev, "[ha_boot_disk] Storing PD block at 0x%08x.\n", HA_PDINFO_ADDR); for (i = 0; i < HA_BLKSZ; i++) { pwrite_b(HA_PDINFO_ADDR + i, buf[i], BUS_PER); } /* The PD block points to the logical start of disk */ boot_loc = ATOW(buf, HA_PDLS_OFF); sim_debug(HA_TRACE, &ha_dev, "[ha_boot_disk] Logical Start is at 0x%x\n", boot_loc); r = sim_disk_rdsect(uptr, boot_loc, buf, &sectsread, 1); sim_debug(HA_TRACE, &ha_dev, "[ha_boot_disk] Storing boot block %d at 0x%08x.\n", boot_loc, HA_BOOT_ADDR); for (i = 0; i < HA_BLKSZ; i++) { pwrite_b(HA_BOOT_ADDR + i, buf[i], BUS_PER); } sim_debug(HA_TRACE, &ha_dev, "[ha_boot_disk] Done storing boot block at 0x%08x\n", HA_BOOT_ADDR); HA_STAT(tc, HA_GOOD, CIO_SUCCESS); ha_state.ts[tc].rep.addr = HA_BOOT_ADDR; ha_state.ts[tc].rep.len = HA_BLKSZ; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4261C0", "function_addr": 4350400, "binary_name": "9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 220h"], [3, "mov [rbp+var_218], rdi"], [4, "mov eax, esi"], [5, "mov [rbp+var_21C], al"], [6, "lea rcx, [rbp+var_10]"], [7, "lea rdx, [rbp+var_210]"], [8, "mov rax, [rbp+var_218]"], [9, "mov r8d, 1"], [10, "mov esi, 0"], [11, "mov rdi, rax"], [12, "call sub_4A325B"], [13, "mov [rbp+var_8], eax"], [14, "cmp [rbp+var_8], 0"], [15, "jz short loc_426271"], [16, "mov rax, cs:qword_537120"], [17, "test rax, rax"], [18, "jz short loc_42623A"], [19, "mov eax, cs:dword_524094"], [20, "and eax, 1"], [21, "test eax, eax"], [22, "jz short loc_42623A"], [23, "mov edx, offset aHaBootDiskCoul"], [24, "mov esi, offset off_524020"], [25, "mov edi, 1"], [26, "mov eax, 0"], [27, "call sub_45610E"], [28, "movzx eax, [rbp+var_21C]"], [29, "cdqe"], [30, "imul rax, 1B4h"], [31, "add rax, 535194h"], [32, "mov byte ptr [rax], 2"], [33, "movzx eax, [rbp+var_21C]"], [34, "cdqe"], [35, "imul rax, 1B4h"], [36, "add rax, 535191h"], [37, "mov byte ptr [rax], 0"], [38, "jmp locret_426493"], [39, "mov rax, cs:qword_537120"], [40, "test rax, rax"], [41, "jz short loc_4262A8"], [42, "mov eax, cs:dword_524094"], [43, "and eax, 1"], [44, "test eax, eax"], [45, "jz short loc_4262A8"], [46, "mov ecx, 2004400h"], [47, "mov edx, offset aHaBootDiskStor"], [48, "mov esi, offset off_524020"], [49, "mov edi, 1"], [50, "mov eax, 0"], [51, "call sub_45610E"], [52, "mov [rbp+var_4], 0"], [53, "jmp short loc_4262DA"], [54, "mov eax, [rbp+var_4]"], [55, "movzx eax, [rbp+rax+var_210]"], [56, "movzx eax, al"], [57, "mov edx, [rbp+var_4]"], [58, "lea ecx, [rdx+2004400h]"], [59, "mov edx, 0"], [60, "mov esi, eax"], [61, "mov edi, ecx"], [62, "call sub_41C363"], [63, "add [rbp+var_4], 1"], [64, "cmp [rbp+var_4], 1FFh"], [65, "jbe short loc_4262B1"], [66, "movzx eax, [rbp+var_1E5]"], [67, "movzx edx, al"], [68, "movzx eax, [rbp+var_1E6]"], [69, "movzx eax, al"], [70, "shl eax, 8"], [71, "add edx, eax"], [72, "movzx eax, [rbp+var_1E7]"], [73, "movzx eax, al"], [74, "shl eax, 10h"], [75, "add edx, eax"], [76, "movzx eax, [rbp+var_1E8]"], [77, "movzx eax, al"], [78, "shl eax, 18h"], [79, "add eax, edx"], [80, "mov [rbp+var_C], eax"], [81, "mov rax, cs:qword_537120"], [82, "test rax, rax"], [83, "jz short loc_426354"], [84, "mov eax, cs:dword_524094"], [85, "and eax, 1"], [86, "test eax, eax"], [87, "jz short loc_426354"], [88, "mov eax, [rbp+var_C]"], [89, "mov ecx, eax"], [90, "mov edx, offset aHaBootDiskLogi"], [91, "mov esi, offset off_524020"], [92, "mov edi, 1"], [93, "mov eax, 0"], [94, "call sub_45610E"], [95, "lea rcx, [rbp+var_10]"], [96, "lea rdx, [rbp+var_210]"], [97, "mov esi, [rbp+var_C]"], [98, "mov rax, [rbp+var_218]"], [99, "mov r8d, 1"], [100, "mov rdi, rax"], [101, "call sub_4A325B"], [102, "mov [rbp+var_8], eax"], [103, "mov rax, cs:qword_537120"], [104, "test rax, rax"], [105, "jz short loc_4263B7"], [106, "mov eax, cs:dword_524094"], [107, "and eax, 1"], [108, "test eax, eax"], [109, "jz short loc_4263B7"], [110, "mov eax, [rbp+var_C]"], [111, "mov r8d, 2004000h"], [112, "mov ecx, eax"], [113, "mov edx, offset aHaBootDiskStor_0"], [114, "mov esi, offset off_524020"], [115, "mov edi, 1"], [116, "mov eax, 0"], [117, "call sub_45610E"], [118, "mov [rbp+var_4], 0"], [119, "jmp short loc_4263E9"], [120, "mov eax, [rbp+var_4]"], [121, "movzx eax, [rbp+rax+var_210]"], [122, "movzx eax, al"], [123, "mov edx, [rbp+var_4]"], [124, "lea ecx, [rdx+2004000h]"], [125, "mov edx, 0"], [126, "mov esi, eax"], [127, "mov edi, ecx"], [128, "call sub_41C363"], [129, "add [rbp+var_4], 1"], [130, "cmp [rbp+var_4], 1FFh"], [131, "jbe short loc_4263C0"], [132, "mov rax, cs:qword_537120"], [133, "test rax, rax"], [134, "jz short loc_426429"], [135, "mov eax, cs:dword_524094"], [136, "and eax, 1"], [137, "test eax, eax"], [138, "jz short loc_426429"], [139, "mov ecx, 2004000h"], [140, "mov edx, offset aHaBootDiskDone"], [141, "mov esi, offset off_524020"], [142, "mov edi, 1"], [143, "mov eax, 0"], [144, "call sub_45610E"], [145, "movzx eax, [rbp+var_21C]"], [146, "cdqe"], [147, "imul rax, 1B4h"], [148, "add rax, 535194h"], [149, "mov byte ptr [rax], 0"], [150, "movzx eax, [rbp+var_21C]"], [151, "cdqe"], [152, "imul rax, 1B4h"], [153, "add rax, 535191h"], [154, "mov byte ptr [rax], 0"], [155, "movzx eax, [rbp+var_21C]"], [156, "cdqe"], [157, "imul rax, 1B4h"], [158, "add rax, 535198h"], [159, "mov dword ptr [rax], 2004000h"], [160, "movzx eax, [rbp+var_21C]"], [161, "cdqe"], [162, "imul rax, 1B4h"], [163, "add rax, 53519Ch"], [164, "mov dword ptr [rax], 200h"], [165, "leave"], [166, "retn"]], "data_dep": [[5, 4], [8, 3], [11, 8], [13, 12], [14, 13], [15, 14], [17, 16], [18, 17], [20, 19], [21, 20], [22, 21], [28, 5], [30, 28], [31, 30], [32, 31], [33, 5], [35, 33], [36, 35], [37, 36], [40, 39], [41, 40], [43, 42], [44, 43], [45, 44], [54, 52], [54, 63], [55, 54], [56, 55], [57, 52], [57, 63], [58, 58], [58, 46], [58, 57], [58, 6], [60, 56], [61, 58], [63, 52], [63, 63], [64, 52], [64, 63], [65, 64], [67, 66], [69, 68], [70, 69], [71, 67], [71, 70], [73, 72], [74, 73], [75, 74], [75, 71], [77, 76], [78, 77], [79, 78], [79, 75], [80, 79], [82, 81], [83, 82], [85, 84], [86, 85], [87, 86], [88, 80], [89, 88], [95, 6], [95, 58], [95, 46], [95, 89], [96, 90], [96, 75], [97, 80], [98, 3], [100, 98], [102, 101], [104, 103], [105, 104], [107, 106], [108, 107], [109, 108], [110, 80], [112, 110], [120, 129], [120, 118], [121, 120], [122, 121], [123, 118], [123, 129], [124, 124], [124, 112], [124, 123], [124, 95], [126, 122], [127, 124], [129, 118], [129, 129], [130, 118], [130, 129], [131, 130], [133, 132], [134, 133], [136, 135], [137, 136], [138, 137], [145, 5], [147, 145], [148, 147], [149, 148], [150, 5], [152, 150], [153, 152], [154, 153], [155, 5], [157, 155], [158, 157], [159, 158], [160, 5], [162, 160], [163, 162], [164, 163], [166, 36], [166, 163]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23_9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23.jsonl.gz", "strip_func_name": "sub_4261C0", "query": "\n\n\n__int64 __fastcall sub_4261C0(__int64 a1, unsigned __int8 a2)\n{\nint v2; // ecx\nint v3; // er8\nint v4; // er9\n__int64 result; // rax\nint v6; // er8\nint v7; // er9\nchar v8[512]; // [rsp+10h] [rbp-210h] BYREF\nchar v9[4]; // [rsp+210h] [rbp-10h] BYREF\nunsigned int v10; // [rsp+214h] [rbp-Ch]\nint v11; // [rsp+218h] [rbp-8h]\nunsigned int i; // [rsp+21Ch] [rbp-4h]\n\nv11 = sub_4A325B(a1, 0LL, v8, v9, 1LL);\nif ( v11 )\n{\nif ( qword_537120 )\n{\nif ( (dword_524094 & 1) != 0 )\nsub_45610E(1, (unsigned int)&off_524020, (unsigned int)\"[ha_boot_disk] Could not read LBA 0\\n\", v2, v3, v4);\n}\n*((_BYTE *)&unk_535194 + 436 * a2) = 2;\nresult = 436LL * a2 + 5460369;\nbyte_535191[436 * a2] = 0;\n}\nelse\n{\nif ( qword_537120 && (dword_524094 & 1) != 0 )\nsub_45610E(\n1,\n(unsigned int)&off_524020,\n(unsigned int)\"[ha_boot_disk] Storing PD block at 0x%08x.\\n\",\n33571840,\nv3,\nv4);\nfor ( i = 0; i <= 0x1FF; ++i )\nsub_41C363(i + 33571840, (unsigned __int8)v8[i], 0, i + 33571840, v3, v4);\nv10 = ((unsigned __int8)v8[41] << 16)\n+ ((unsigned __int8)v8[42] << 8)\n+ (unsigned __int8)v8[43]\n+ ((unsigned __int8)v8[40] << 24);\nif ( qword_537120 && (dword_524094 & 1) != 0 )\nsub_45610E(1, (unsigned int)&off_524020, (unsigned int)\"[ha_boot_disk] Logical Start is at 0x%x\\n\", v10, v3, v4);\nv11 = sub_4A325B(a1, v10, v8, v9, 1LL);\nif ( qword_537120 && (dword_524094 & 1) != 0 )\nsub_45610E(\n1,\n(unsigned int)&off_524020,\n(unsigned int)\"[ha_boot_disk] Storing boot block %d at 0x%08x.\\n\",\nv10,\n33570816,\nv7);\nfor ( i = 0; i <= 0x1FF; ++i )\nsub_41C363(i + 33570816, (unsigned __int8)v8[i], 0, i + 33570816, v6, v7);\nif ( qword_537120 && (dword_524094 & 1) != 0 )\nsub_45610E(\n1,\n(unsigned int)&off_524020,\n(unsigned int)\"[ha_boot_disk] Done storing boot block at 0x%08x\\n\",\n33570816,\nv6,\nv7);\n*((_BYTE *)&unk_535194 + 436 * a2) = 0;\nbyte_535191[436 * a2] = 0;\ndword_535198[109 * a2] = 33570816;\nresult = 436LL * a2 + 5460380;\ndword_53519C[109 * a2] = 512;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v8,v9,v10,v11,sub_4261C0,sub_4A325B,sub_45610E,sub_41C363,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'uptr', 'a2': 'tc', 'v8': 'buf', 'v9': 'sectsread', 'v10': 'boot_loc', 'v11': 'r', 'sub_4261C0': 'ha_boot_disk', 'sub_4A325B': 'sim_disk_rdsect', 'sub_45610E': '_sim_debug_device', 'sub_41C363': 'pwrite_b'}"}
AribToStringInternal
d99916b7a75ea9d192399f9f8639ddd4f5f1e5ddc1d591ae4a3dc71937a8f672
stz2012
epgdump
NA
const DWORD AribToStringInternal(TCHAR *lpszDst, const BYTE *pSrcData, const DWORD dwSrcLen) { if(!pSrcData || !dwSrcLen || !lpszDst)return 0UL; DWORD dwSrcPos = 0UL; DWORD dwDstLen = 0UL; int dwSrcData; // 状態初期設定 m_byEscSeqCount = 0U; m_pSingleGL = NULL; m_CodeG[0] = CODE_KANJI; m_CodeG[1] = CODE_ALPHANUMERIC; m_CodeG[2] = CODE_HIRAGANA; m_CodeG[3] = CODE_KATAKANA; m_pLockingGL = &m_CodeG[0]; m_pLockingGR = &m_CodeG[2]; m_emStrSize = STR_NORMAL; while(dwSrcPos < dwSrcLen){ dwSrcData = pSrcData[dwSrcPos] & 0xFF; if(!m_byEscSeqCount){ // GL/GR領域 if((dwSrcData >= 0x21U) && (dwSrcData <= 0x7EU)){ // GL領域 const CODE_SET CurCodeSet = (m_pSingleGL)? *m_pSingleGL : *m_pLockingGL; m_pSingleGL = NULL; if(abCharSizeTable[CurCodeSet]){ // 2バイトコード if((dwSrcLen - dwSrcPos) < 2UL)break; dwDstLen += ProcessCharCode(&lpszDst[dwDstLen], ((WORD)pSrcData[dwSrcPos + 0] << 8) | (WORD)pSrcData[dwSrcPos + 1], CurCodeSet); dwSrcPos++; } else{ // 1バイトコード dwDstLen += ProcessCharCode(&lpszDst[dwDstLen], (WORD)dwSrcData, CurCodeSet); } } else if((dwSrcData >= 0xA1U) && (dwSrcData <= 0xFEU)){ // GR領域 const CODE_SET CurCodeSet = *m_pLockingGR; if(abCharSizeTable[CurCodeSet]){ // 2バイトコード if((dwSrcLen - dwSrcPos) < 2UL)break; dwDstLen += ProcessCharCode(&lpszDst[dwDstLen], ((WORD)(pSrcData[dwSrcPos + 0] & 0x7FU) << 8) | (WORD)(pSrcData[dwSrcPos + 1] & 0x7FU), CurCodeSet); dwSrcPos++; } else{ // 1バイトコード dwDstLen += ProcessCharCode(&lpszDst[dwDstLen], (WORD)(dwSrcData & 0x7FU), CurCodeSet); } } else{ // 制御コード switch(dwSrcData){ case 0x0FU : LockingShiftGL(0U); break; // LS0 case 0x0EU : LockingShiftGL(1U); break; // LS1 case 0x19U : SingleShiftGL(2U); break; // SS2 case 0x1DU : SingleShiftGL(3U); break; // SS3 case 0x1BU : m_byEscSeqCount = 1U; break; // ESC case 0x89U : m_emStrSize = STR_MEDIUM; break; // MSZ case 0x8AU : m_emStrSize = STR_NORMAL; break; // NSZ case 0x20U : case 0xA0U : //SP 空白 //空白は文字サイズの影響あり if( IsSmallCharMode() == false ){ strcpy(&lpszDst[dwDstLen], " "); dwDstLen += 3U; } else { lpszDst[dwDstLen++] = TEXT(' '); } break; default : break; // 非対応 } } } else{ // エスケープシーケンス処理 ProcessEscapeSeq(dwSrcData); } dwSrcPos++; } // 終端文字 lpszDst[dwDstLen] = TEXT('\0'); return dwDstLen; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401D84", "function_addr": 4201860, "binary_name": "d99916b7a75ea9d192399f9f8639ddd4f5f1e5ddc1d591ae4a3dc71937a8f672.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_34], edx"], [6, "cmp [rbp+var_30], 0"], [7, "jz short loc_401DAB"], [8, "cmp [rbp+var_34], 0"], [9, "jz short loc_401DAB"], [10, "cmp [rbp+var_28], 0"], [11, "jnz short loc_401DB5"], [12, "mov eax, 0"], [13, "jmp locret_40213F"], [14, "mov [rbp+var_4], 0"], [15, "mov [rbp+var_8], 0"], [16, "mov cs:byte_40D148, 0"], [17, "mov cs:qword_40D140, 0"], [18, "mov cs:dword_40D120, 1"], [19, "mov cs:dword_40D124, 2"], [20, "mov cs:dword_40D128, 3"], [21, "mov cs:dword_40D12C, 4"], [22, "mov cs:qword_40D130, offset dword_40D120"], [23, "mov cs:qword_40D138, offset dword_40D128"], [24, "mov cs:dword_40D110, 2"], [25, "jmp loc_40211A"], [26, "mov eax, [rbp+var_4]"], [27, "movsxd rdx, eax"], [28, "mov rax, [rbp+var_30]"], [29, "add rax, rdx"], [30, "movzx eax, byte ptr [rax]"], [31, "movsx eax, al"], [32, "and eax, 0FFh"], [33, "mov [rbp+var_C], eax"], [34, "movzx eax, cs:byte_40D148"], [35, "test al, al"], [36, "jnz loc_402106"], [37, "mov eax, [rbp+var_C]"], [38, "cmp eax, 20h "], [39, "jbe loc_401F30"], [40, "mov eax, [rbp+var_C]"], [41, "cmp eax, 7Eh "], [42, "ja loc_401F30"], [43, "mov rax, cs:qword_40D140"], [44, "test rax, rax"], [45, "jz short loc_401E7B"], [46, "mov rax, cs:qword_40D140"], [47, "mov eax, [rax]"], [48, "jmp short loc_401E84"], [49, "mov rax, cs:qword_40D130"], [50, "mov eax, [rax]"], [51, "mov [rbp+var_10], eax"], [52, "mov cs:qword_40D140, 0"], [53, "mov eax, [rbp+var_10]"], [54, "cdqe"], [55, "mov eax, ds:dword_407600[rax*4]"], [56, "test eax, eax"], [57, "jz short loc_401F0A"], [58, "mov eax, [rbp+var_34]"], [59, "sub eax, [rbp+var_4]"], [60, "cmp eax, 1"], [61, "jbe loc_402128"], [62, "mov eax, [rbp+var_4]"], [63, "movsxd rdx, eax"], [64, "mov rax, [rbp+var_30]"], [65, "add rax, rdx"], [66, "movzx eax, byte ptr [rax]"], [67, "movsx eax, al"], [68, "shl eax, 8"], [69, "mov edx, eax"], [70, "mov eax, [rbp+var_4]"], [71, "cdqe"], [72, "lea rcx, [rax+1]"], [73, "mov rax, [rbp+var_30]"], [74, "add rax, rcx"], [75, "movzx eax, byte ptr [rax]"], [76, "movsx eax, al"], [77, "mov esi, edx"], [78, "or esi, eax"], [79, "mov eax, [rbp+var_8]"], [80, "movsxd rdx, eax"], [81, "mov rax, [rbp+var_28]"], [82, "lea rcx, [rdx+rax]"], [83, "mov eax, [rbp+var_10]"], [84, "mov edx, eax"], [85, "mov rdi, rcx"], [86, "call sub_402141"], [87, "add [rbp+var_8], eax"], [88, "add [rbp+var_4], 1"], [89, "jmp loc_402116"], [90, "mov eax, [rbp+var_8]"], [91, "movsxd rdx, eax"], [92, "mov rax, [rbp+var_28]"], [93, "lea rcx, [rdx+rax]"], [94, "mov edx, [rbp+var_10]"], [95, "mov eax, [rbp+var_C]"], [96, "mov esi, eax"], [97, "mov rdi, rcx"], [98, "call sub_402141"], [99, "add [rbp+var_8], eax"], [100, "jmp loc_402116"], [101, "mov eax, [rbp+var_C]"], [102, "cmp eax, 0A0h"], [103, "jbe loc_402003"], [104, "mov eax, [rbp+var_C]"], [105, "cmp eax, 0FEh"], [106, "ja loc_402003"], [107, "mov rax, cs:qword_40D138"], [108, "mov eax, [rax]"], [109, "mov [rbp+var_14], eax"], [110, "mov eax, [rbp+var_14]"], [111, "cdqe"], [112, "mov eax, ds:dword_407600[rax*4]"], [113, "test eax, eax"], [114, "jz short loc_401FD8"], [115, "mov eax, [rbp+var_34]"], [116, "sub eax, [rbp+var_4]"], [117, "cmp eax, 1"], [118, "jbe loc_40212B"], [119, "mov eax, [rbp+var_4]"], [120, "movsxd rdx, eax"], [121, "mov rax, [rbp+var_30]"], [122, "add rax, rdx"], [123, "movzx eax, byte ptr [rax]"], [124, "movsx eax, al"], [125, "shl eax, 8"], [126, "and eax, 7F00h"], [127, "mov edx, eax"], [128, "mov eax, [rbp+var_4]"], [129, "cdqe"], [130, "lea rcx, [rax+1]"], [131, "mov rax, [rbp+var_30]"], [132, "add rax, rcx"], [133, "movzx eax, byte ptr [rax]"], [134, "movsx eax, al"], [135, "and eax, 7Fh"], [136, "mov esi, edx"], [137, "or esi, eax"], [138, "mov eax, [rbp+var_8]"], [139, "movsxd rdx, eax"], [140, "mov rax, [rbp+var_28]"], [141, "lea rcx, [rdx+rax]"], [142, "mov eax, [rbp+var_14]"], [143, "mov edx, eax"], [144, "mov rdi, rcx"], [145, "call sub_402141"], [146, "add [rbp+var_8], eax"], [147, "add [rbp+var_4], 1"], [148, "jmp loc_402116"], [149, "mov eax, [rbp+var_C]"], [150, "and eax, 7Fh"], [151, "mov esi, eax"], [152, "mov eax, [rbp+var_8]"], [153, "movsxd rdx, eax"], [154, "mov rax, [rbp+var_28]"], [155, "lea rcx, [rdx+rax]"], [156, "mov eax, [rbp+var_14]"], [157, "mov edx, eax"], [158, "mov rdi, rcx"], [159, "call sub_402141"], [160, "add [rbp+var_8], eax"], [161, "jmp loc_402116"], [162, "cmp [rbp+var_C], 0A0h"], [163, "jz loc_4020C7"], [164, "cmp [rbp+var_C], 0A0h"], [165, "jg def_402060"], [166, "cmp [rbp+var_C], 8Ah"], [167, "jz loc_4020BB"], [168, "cmp [rbp+var_C], 8Ah"], [169, "jg def_402060"], [170, "cmp [rbp+var_C], 20h "], [171, "jg short loc_402062"], [172, "cmp [rbp+var_C], 0Eh"], [173, "jl def_402060"], [174, "mov eax, [rbp+var_C]"], [175, "sub eax, 0Eh"], [176, "cmp eax, 12h"], [177, "ja def_402060"], [178, "mov eax, eax"], [179, "mov rax, ds:jpt_402060[rax*8]"], [180, "jmp rax"], [181, "cmp [rbp+var_C], 89h"], [182, "jz short loc_4020AF"], [183, "jmp def_402060"], [184, "mov edi, 0"], [185, "call sub_4028CC"], [186, "jmp loc_402116"], [187, "mov edi, 1"], [188, "call sub_4028CC"], [189, "jmp loc_402116"], [190, "mov edi, 2"], [191, "call sub_402912"], [192, "jmp short loc_402116"], [193, "mov edi, 3"], [194, "call sub_402912"], [195, "jmp short loc_402116"], [196, "mov cs:byte_40D148, 1"], [197, "jmp short loc_402116"], [198, "mov cs:dword_40D110, 1"], [199, "jmp short loc_402116"], [200, "mov cs:dword_40D110, 2"], [201, "jmp short loc_402116"], [202, "call sub_401CE0"], [203, "test eax, eax"], [204, "jnz short loc_4020EE"], [205, "mov eax, [rbp+var_8]"], [206, "movsxd rdx, eax"], [207, "mov rax, [rbp+var_28]"], [208, "add rax, rdx"], [209, "mov dword ptr [rax], 8080E3h"], [210, "mov eax, [rbp+var_8]"], [211, "add eax, 3"], [212, "mov [rbp+var_8], eax"], [213, "jmp short loc_402116"], [214, "mov eax, [rbp+var_8]"], [215, "lea edx, [rax+1]"], [216, "mov [rbp+var_8], edx"], [217, "movsxd rdx, eax"], [218, "mov rax, [rbp+var_28]"], [219, "add rax, rdx"], [220, "mov byte ptr [rax], 20h "], [221, "jmp short loc_402116"], [222, "mov eax, [rbp+var_C]"], [223, "movsx eax, al"], [224, "mov edi, eax"], [225, "call sub_40263E"], [226, "jmp short loc_402116"], [227, "nop"], [228, "add [rbp+var_4], 1"], [229, "mov eax, [rbp+var_4]"], [230, "cmp eax, [rbp+var_34]"], [231, "jl loc_401E22"], [232, "jmp short loc_40212C"], [233, "nop"], [234, "jmp short loc_40212C"], [235, "nop"], [236, "mov eax, [rbp+var_8]"], [237, "movsxd rdx, eax"], [238, "mov rax, [rbp+var_28]"], [239, "add rax, rdx"], [240, "mov byte ptr [rax], 0"], [241, "mov eax, [rbp+var_8]"], [242, "leave"], [243, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 5], [9, 8], [10, 3], [11, 10], [26, 14], [26, 228], [27, 26], [28, 4], [29, 27], [29, 28], [30, 209], [30, 220], [30, 29], [31, 30], [32, 31], [33, 32], [34, 16], [34, 196], [35, 34], [36, 35], [37, 33], [38, 37], [39, 38], [40, 33], [41, 40], [42, 41], [43, 17], [43, 52], [44, 43], [45, 44], [46, 17], [46, 52], [47, 46], [47, 209], [47, 220], [49, 22], [50, 220], [50, 209], [50, 49], [51, 50], [51, 47], [53, 51], [56, 55], [57, 56], [58, 5], [59, 58], [59, 14], [59, 228], [60, 59], [61, 60], [62, 14], [62, 228], [63, 62], [64, 4], [65, 64], [65, 63], [66, 209], [66, 65], [66, 220], [67, 66], [68, 67], [69, 68], [70, 14], [70, 228], [72, 155], [72, 141], [72, 220], [72, 93], [72, 70], [72, 209], [72, 82], [73, 4], [74, 73], [74, 72], [75, 220], [75, 209], [75, 74], [76, 75], [77, 69], [78, 77], [78, 76], [79, 87], [79, 212], [79, 160], [79, 146], [79, 15], [79, 216], [79, 99], [80, 79], [81, 3], [82, 209], [82, 72], [82, 81], [82, 220], [83, 51], [84, 83], [85, 82], [87, 87], [87, 212], [87, 160], [87, 146], [87, 86], [87, 216], [87, 99], [87, 15], [88, 14], [88, 228], [90, 87], [90, 212], [90, 160], [90, 146], [90, 15], [90, 216], [90, 99], [91, 90], [92, 3], [93, 209], [93, 92], [93, 82], [93, 155], [93, 141], [93, 220], [93, 93], [94, 51], [95, 33], [96, 95], [97, 93], [99, 216], [99, 99], [99, 98], [99, 87], [99, 212], [99, 160], [99, 146], [99, 15], [101, 33], [102, 101], [103, 102], [104, 33], [105, 104], [106, 105], [107, 23], [108, 220], [108, 107], [108, 209], [109, 108], [110, 109], [113, 112], [114, 113], [115, 5], [116, 228], [116, 14], [116, 115], [117, 116], [118, 117], [119, 228], [119, 14], [120, 119], [121, 4], [122, 121], [122, 120], [123, 209], [123, 122], [123, 220], [124, 123], [125, 124], [126, 125], [127, 126], [128, 14], [128, 228], [130, 209], [130, 82], [130, 128], [130, 155], [130, 141], [130, 220], [130, 93], [131, 4], [132, 131], [132, 130], [133, 132], [133, 220], [133, 209], [134, 133], [135, 134], [136, 127], [137, 135], [137, 136], [138, 87], [138, 212], [138, 216], [138, 160], [138, 146], [138, 15], [138, 99], [139, 138], [140, 3], [141, 140], [141, 220], [141, 209], [141, 130], [142, 109], [143, 142], [144, 141], [146, 212], [146, 160], [146, 146], [146, 15], [146, 216], [146, 99], [146, 145], [146, 87], [147, 14], [147, 228], [149, 33], [150, 149], [151, 150], [152, 87], [152, 212], [152, 216], [152, 160], [152, 146], [152, 15], [152, 99], [153, 152], [154, 3], [155, 82], [155, 155], [155, 141], [155, 220], [155, 93], [155, 209], [155, 154], [156, 109], [157, 156], [158, 155], [160, 87], [160, 212], [160, 216], [160, 160], [160, 146], [160, 159], [160, 15], [160, 99], [162, 33], [163, 162], [164, 33], [165, 164], [166, 33], [167, 166], [168, 33], [169, 168], [170, 33], [171, 170], [172, 33], [173, 172], [174, 33], [175, 174], [176, 175], [177, 176], [178, 175], [180, 179], [181, 33], [182, 181], [203, 202], [204, 203], [205, 99], [205, 87], [205, 212], [205, 216], [205, 160], [205, 146], [205, 15], [206, 205], [207, 3], [208, 207], [208, 206], [209, 208], [210, 87], [210, 212], [210, 216], [210, 160], [210, 146], [210, 15], [210, 99], [211, 210], [212, 211], [214, 216], [214, 99], [214, 160], [214, 146], [214, 15], [214, 87], [214, 212], [215, 27], [215, 220], [215, 214], [215, 209], [216, 215], [217, 214], [218, 3], [219, 218], [219, 217], [220, 219], [222, 33], [223, 222], [224, 223], [228, 14], [228, 228], [228, 88], [228, 147], [229, 228], [229, 14], [230, 5], [230, 229], [231, 230], [236, 87], [236, 212], [236, 216], [236, 160], [236, 146], [236, 15], [236, 99], [237, 236], [238, 3], [239, 238], [239, 237], [240, 239], [241, 160], [241, 146], [241, 15], [241, 99], [241, 87], [241, 212], [241, 216], [243, 241], [243, 12]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d99916b7a75ea9d192399f9f8639ddd4f5f1e5ddc1d591ae4a3dc71937a8f672_d99916b7a75ea9d192399f9f8639ddd4f5f1e5ddc1d591ae4a3dc71937a8f672.jsonl.gz", "strip_func_name": "sub_401D84", "query": "\n\n\n__int64 __fastcall sub_401D84(__int64 a1, __int64 a2, int a3)\n{\nunsigned int v4; // eax\nint v5; // eax\nunsigned int v7; // [rsp+2Ch] [rbp-14h]\nunsigned int v8; // [rsp+34h] [rbp-Ch]\nunsigned int v9; // [rsp+38h] [rbp-8h]\nint v10; // [rsp+3Ch] [rbp-4h]\n\nif ( !a2 || !a3 || !a1 )\nreturn 0LL;\nv10 = 0;\nv9 = 0;\nbyte_40D148 = 0;\nqword_40D140 = 0LL;\ndword_40D120 = 1;\ndword_40D124 = 2;\ndword_40D128 = 3;\ndword_40D12C = 4;\nqword_40D130 = (__int64)&dword_40D120;\nqword_40D138 = (__int64)&dword_40D128;\ndword_40D110 = 2;\nwhile ( v10 < a3 )\n{\nv8 = *(unsigned __int8 *)(v10 + a2);\nif ( byte_40D148 )\n{\nsub_40263E((unsigned int)(char)v8);\n}\nelse if ( v8 <= 0x20 || v8 > 0x7E )\n{\nif ( v8 <= 0xA0 || *(unsigned __int8 *)(v10 + a2) == 255 )\n{\nif ( v8 == 160 )\n{\nLABEL_38:\nif ( (unsigned int)sub_401CE0() )\n{\nv5 = v9++;\n*(_BYTE *)(v5 + a1) = 32;\n}\nelse\n{\n*(_DWORD *)((int)v9 + a1) = 8421603;\nv9 += 3;\n}\n}\nelse if ( *(unsigned __int8 *)(v10 + a2) <= 0xA0u )\n{\nif ( v8 == 138 )\n{\ndword_40D110 = 2;\n}\nelse if ( *(unsigned __int8 *)(v10 + a2) <= 0x8Au )\n{\nif ( *(unsigned __int8 *)(v10 + a2) > 0x20u )\n{\nif ( v8 == 137 )\ndword_40D110 = 1;\n}\nelse if ( *(unsigned __int8 *)(v10 + a2) >= 0xEu )\n{\nswitch ( *(_BYTE *)(v10 + a2) )\n{\ncase 0xE:\nsub_4028CC(1LL);\nbreak;\ncase 0xF:\nsub_4028CC(0LL);\nbreak;\ncase 0x19:\nsub_402912(2LL);\nbreak;\ncase 0x1B:\nbyte_40D148 = 1;\nbreak;\ncase 0x1D:\nsub_402912(3LL);\nbreak;\ncase 0x20:\ngoto LABEL_38;\ndefault:\nbreak;\n}\n}\n}\n}\n}\nelse\n{\nv7 = *(_DWORD *)qword_40D138;\nif ( dword_407600[*(int *)qword_40D138] )\n{\nif ( (unsigned int)(a3 - v10) <= 1 )\nbreak;\nv9 += sub_402141((int)v9 + a1, *(_BYTE *)(v10 + 1LL + a2) & 0x7F | (*(char *)(v10 + a2) << 8) & 0x7F00u, v7);\n++v10;\n}\nelse\n{\nv9 += sub_402141((int)v9 + a1, v8 & 0x7F, v7);\n}\n}\n}\nelse\n{\nif ( qword_40D140 )\nv4 = *(_DWORD *)qword_40D140;\nelse\nv4 = *(_DWORD *)qword_40D130;\nqword_40D140 = 0LL;\nif ( dword_407600[v4] )\n{\nif ( (unsigned int)(a3 - v10) <= 1 )\nbreak;\nv9 += sub_402141((int)v9 + a1, *(char *)(v10 + 1LL + a2) | (unsigned int)(*(char *)(v10 + a2) << 8), v4);\n++v10;\n}\nelse\n{\nv9 += sub_402141((int)v9 + a1, v8, v4);\n}\n}\n++v10;\n}\n*(_BYTE *)((int)v9 + a1) = 0;\nreturn v9;\n}\n\n\n\nQ:[a3,a1,a2,v7,v8,v9,v10,sub_401D84,sub_40263E,sub_401CE0,sub_4028CC,sub_402912,sub_402141,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'dwSrcLen', 'a1': 'lpszDst', 'a2': 'pSrcData', 'v7': 'CurCodeSet_0', 'v8': 'dwSrcData', 'v9': 'dwDstLen', 'v10': 'dwSrcPos', 'sub_401D84': 'AribToStringInternal', 'sub_40263E': 'ProcessEscapeSeq', 'sub_401CE0': 'IsSmallCharMode', 'sub_4028CC': 'LockingShiftGL', 'sub_402912': 'SingleShiftGL', 'sub_402141': 'ProcessCharCode'}"}
tok_text_size
09e593e1a10a4f6cadf5c016cb4c8cfb0a3586515f0619eba999737feb58c9d7
imatix
gsl
NA
size_t tok_text_size ( char **token_list) { size_t text_size; int word_nbr; text_size = 0; for (word_nbr = 0; token_list [word_nbr]; word_nbr++) text_size += strlen (token_list [word_nbr]) + 1; return (text_size); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_465D1B", "function_addr": 4611355, "binary_name": "09e593e1a10a4f6cadf5c016cb4c8cfb0a3586515f0619eba999737feb58c9d7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_8], 0"], [5, "mov [rbp+var_C], 0"], [6, "jmp short loc_465D6A"], [7, "mov eax, [rbp+var_C]"], [8, "cdqe"], [9, "lea rdx, ds:0[rax*8]"], [10, "mov rax, [rbp+var_18]"], [11, "add rax, rdx"], [12, "mov rax, [rax]"], [13, "mov rdi, rax"], [14, "call _strlen"], [15, "mov rdx, [rbp+var_8]"], [16, "add rax, rdx"], [17, "add rax, 1"], [18, "mov [rbp+var_8], rax"], [19, "add [rbp+var_C], 1"], [20, "mov eax, [rbp+var_C]"], [21, "cdqe"], [22, "lea rdx, ds:0[rax*8]"], [23, "mov rax, [rbp+var_18]"], [24, "add rax, rdx"], [25, "mov rax, [rax]"], [26, "test rax, rax"], [27, "jnz short loc_465D38"], [28, "mov rax, [rbp+var_8]"], [29, "leave"], [30, "retn"]], "data_dep": [[7, 5], [7, 19], [9, 22], [10, 3], [11, 10], [11, 9], [12, 11], [13, 12], [15, 4], [15, 18], [16, 15], [16, 14], [17, 16], [18, 17], [19, 5], [19, 19], [20, 5], [20, 19], [22, 15], [23, 3], [24, 23], [24, 22], [25, 24], [26, 25], [27, 26], [28, 18], [28, 4], [30, 28]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/09e593e1a10a4f6cadf5c016cb4c8cfb0a3586515f0619eba999737feb58c9d7_09e593e1a10a4f6cadf5c016cb4c8cfb0a3586515f0619eba999737feb58c9d7.jsonl.gz", "strip_func_name": "sub_465D1B", "query": "\n\n\n__int64 __fastcall sub_465D1B(__int64 a1)\n{\nint i; // [rsp+14h] [rbp-Ch]\n__int64 v3; // [rsp+18h] [rbp-8h]\n\nv3 = 0LL;\nfor ( i = 0; *(_QWORD *)(8LL * i + a1); ++i )\nv3 += strlen(*(const char **)(8LL * i + a1)) + 1;\nreturn v3;\n}\n\n\n\nQ:[a1,i,v3,sub_465D1B,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'token_list', 'i': 'word_nbr', 'v3': 'text_size', 'sub_465D1B': 'tok_text_size'}"}
parse_nested
52717776acda8a7daffd4b2004e65afc2870dcccd317c12ec9c51d6ff44b5c63
mptre
knfmt
NA
static int parse_nested(struct style *st, struct lexer *lx, const struct style_option *so) { int scope; if (!lexer_if(lx, so->so_type, NULL)) return NONE; if (!lexer_expect(lx, Colon, NULL)) return FAIL; scope = st->st_scope; st->st_scope = so->so_type; style_parse_yaml1(st, lx); st->st_scope = scope; return GOOD; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41D406", "function_addr": 4314118, "binary_name": "52717776acda8a7daffd4b2004e65afc2870dcccd317c12ec9c51d6ff44b5c63.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "mov rax, [rbp+var_28]"], [7, "mov ecx, [rax+18h]"], [8, "mov rax, [rbp+var_20]"], [9, "mov edx, 0"], [10, "mov esi, ecx"], [11, "mov rdi, rax"], [12, "call sub_40EE31"], [13, "test eax, eax"], [14, "jnz short loc_41D43F"], [15, "mov eax, 0"], [16, "jmp short locret_41D4A5"], [17, "mov rax, [rbp+var_20]"], [18, "mov r8d, 2ABh"], [19, "mov ecx, offset aParseNested"], [20, "mov edx, 0"], [21, "mov esi, 4Bh "], [22, "mov rdi, rax"], [23, "call sub_40EC22"], [24, "test eax, eax"], [25, "jnz short loc_41D46B"], [26, "mov eax, 4"], [27, "jmp short locret_41D4A5"], [28, "mov rax, [rbp+var_18]"], [29, "mov eax, [rax+8]"], [30, "mov [rbp+var_4], eax"], [31, "mov rax, [rbp+var_28]"], [32, "mov edx, [rax+18h]"], [33, "mov rax, [rbp+var_18]"], [34, "mov [rax+8], edx"], [35, "mov rdx, [rbp+var_20]"], [36, "mov rax, [rbp+var_18]"], [37, "mov rsi, rdx"], [38, "mov rdi, rax"], [39, "call sub_41C5E7"], [40, "mov rax, [rbp+var_18]"], [41, "mov edx, [rbp+var_4]"], [42, "mov [rax+8], edx"], [43, "mov eax, 1"], [44, "leave"], [45, "retn"]], "data_dep": [[6, 5], [7, 6], [8, 4], [10, 7], [11, 8], [13, 12], [14, 13], [17, 4], [22, 17], [24, 23], [25, 24], [28, 3], [29, 28], [30, 29], [31, 5], [32, 31], [33, 3], [34, 33], [34, 32], [35, 4], [36, 3], [37, 35], [38, 36], [40, 3], [41, 30], [42, 41], [42, 40], [45, 43], [45, 15], [45, 26]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/52717776acda8a7daffd4b2004e65afc2870dcccd317c12ec9c51d6ff44b5c63_52717776acda8a7daffd4b2004e65afc2870dcccd317c12ec9c51d6ff44b5c63.jsonl.gz", "strip_func_name": "sub_41D406", "query": "\n\n\n__int64 __fastcall sub_41D406(__int64 a1, __int64 *a2, __int64 a3)\n{\nint v5; // [rsp+2Ch] [rbp-4h]\n\nif ( !sub_40EE31(a2, *(_DWORD *)(a3 + 24), 0LL) )\nreturn 0LL;\nif ( !(unsigned int)sub_40EC22((__int64)a2, 0x4Bu, 0LL, (__int64)\"parse_nested\", 0x2ABu) )\nreturn 4LL;\nv5 = *(_DWORD *)(a1 + 8);\n*(_DWORD *)(a1 + 8) = *(_DWORD *)(a3 + 24);\nsub_41C5E7(a1, a2);\n*(_DWORD *)(a1 + 8) = v5;\nreturn 1LL;\n}\n\n\n\nQ:[a3,a1,a2,v5,sub_41D406,sub_40EE31,sub_40EC22,sub_41C5E7,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'so', 'a1': 'st', 'a2': 'lx', 'v5': 'scope', 'sub_41D406': 'parse_nested', 'sub_40EE31': 'lexer_if', 'sub_40EC22': 'lexer_expect0', 'sub_41C5E7': 'style_parse_yaml1'}"}
CreateOutputFile
01f9d6cfdb2fdf7f2ab03abd1a224bf88003dc8629439375a6202c9b1832af29
Comcast
caption-inspector
NA
void CreateOutputFile( const char* fileNameStr ) { time_t t = time(NULL); struct tm tm = *localtime(&t); if( fileNameStr == NULL ) { sprintf(outputFileName, "%d_%d_%d__%d_%d_%d__test_output.xml", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); } else { strcpy(outputFileName, fileNameStr); } printf("Writing to New Existing Output File: %s\n", outputFileName); outputFilePtr = fopen(outputFileName, "w"); textBuffer[0] = '\0'; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405060", "function_addr": 4214880, "binary_name": "01f9d6cfdb2fdf7f2ab03abd1a224bf88003dc8629439375a6202c9b1832af29.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 58h"], [4, "mov [rbp+src], rdi"], [5, "mov edi, 0"], [6, "call _time"], [7, "mov [rbp+timer], rax"], [8, "lea rax, [rbp+timer]"], [9, "mov rdi, rax"], [10, "call _localtime"], [11, "mov rcx, [rax]"], [12, "mov rbx, [rax+8]"], [13, "mov [rbp+var_50], rcx"], [14, "mov [rbp+var_48], rbx"], [15, "mov rcx, [rax+10h]"], [16, "mov rbx, [rax+18h]"], [17, "mov [rbp+var_40], rcx"], [18, "mov [rbp+var_38], rbx"], [19, "mov rcx, [rax+20h]"], [20, "mov rbx, [rax+28h]"], [21, "mov [rbp+var_30], rcx"], [22, "mov [rbp+var_28], rbx"], [23, "mov rax, [rax+30h]"], [24, "mov [rbp+var_20], rax"], [25, "cmp [rbp+src], 0"], [26, "jnz short loc_40510A"], [27, "mov esi, dword ptr [rbp+var_50]"], [28, "mov ecx, dword ptr [rbp+var_50+4]"], [29, "mov r8d, dword ptr [rbp+var_48]"], [30, "mov edi, dword ptr [rbp+var_48+4]"], [31, "mov eax, dword ptr [rbp+var_40]"], [32, "lea edx, [rax+1]"], [33, "mov eax, dword ptr [rbp+var_40+4]"], [34, "add eax, 76Ch"], [35, "push rsi"], [36, "push rcx"], [37, "mov r9d, r8d"], [38, "mov r8d, edi"], [39, "mov ecx, edx"], [40, "mov edx, eax"], [41, "lea rsi, aDDDDDDTestOutp"], [42, "lea rdi, filename"], [43, "mov eax, 0"], [44, "call _sprintf"], [45, "add rsp, 10h"], [46, "jmp short loc_40511D"], [47, "mov rax, [rbp+src]"], [48, "mov rsi, rax"], [49, "lea rdi, filename"], [50, "call _strcpy"], [51, "lea rsi, filename"], [52, "lea rdi, aWritingToNewEx"], [53, "mov eax, 0"], [54, "call _printf"], [55, "lea rsi, aW"], [56, "lea rdi, filename"], [57, "call _fopen"], [58, "mov cs:qword_40B498, rax"], [59, "mov cs:dest, 0"], [60, "nop"], [61, "mov rbx, [rbp+var_8]"], [62, "leave"], [63, "retn"]], "data_dep": [[7, 6], [8, 6], [8, 7], [9, 8], [11, 10], [12, 10], [13, 11], [14, 12], [15, 10], [16, 10], [17, 15], [18, 16], [19, 10], [20, 10], [21, 19], [22, 20], [23, 10], [24, 23], [25, 4], [26, 25], [27, 13], [29, 14], [31, 17], [32, 31], [34, 33], [35, 27], [36, 28], [37, 29], [38, 30], [39, 32], [40, 34], [41, 27], [42, 30], [45, 3], [47, 4], [48, 47], [49, 9], [51, 48], [51, 41], [52, 49], [52, 42], [55, 51], [56, 52], [58, 57], [63, 57]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/01f9d6cfdb2fdf7f2ab03abd1a224bf88003dc8629439375a6202c9b1832af29_01f9d6cfdb2fdf7f2ab03abd1a224bf88003dc8629439375a6202c9b1832af29.jsonl.gz", "strip_func_name": "sub_405060", "query": "\n\n\nFILE *__fastcall sub_405060(const char *a1)\n{\nstruct tm *v1; // rax\nFILE *result; // rax\ntime_t timer; // [rsp+48h] [rbp-18h] BYREF\n\ntimer = time(0LL);\nv1 = localtime(&timer);\nif ( a1 )\nstrcpy(filename, a1);\nelse\nsprintf(\nfilename,\n\"%d_%d_%d__%d_%d_%d__test_output.xml\",\n(unsigned int)(HIDWORD(*(_QWORD *)&v1->tm_mon) + 1900),\n(unsigned int)*(_QWORD *)&v1->tm_mon + 1,\nHIDWORD(*(_QWORD *)&v1->tm_hour),\n(unsigned int)*(_QWORD *)&v1->tm_hour,\nHIDWORD(*(_QWORD *)&v1->tm_sec),\n(unsigned int)*(_QWORD *)&v1->tm_sec);\nprintf(\"Writing to New Existing Output File: %s\\n\", filename);\nresult = fopen(filename, \"w\");\nqword_40B498 = result;\ndest = 0;\nreturn result;\n}\n\n\n\nQ:[a1,timer,sub_405060,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'fileNameStr', 'timer': 't', 'sub_405060': 'CreateOutputFile'}"}
mbedtls_ssl_conf_session_tickets_cb
3b74425ebd08a392f4ae9edeeb2c0e66063e0975fecada2a05be00f888a73010
Wiznet
RP2040-HAT-C
NA
void mbedtls_ssl_conf_session_tickets_cb( mbedtls_ssl_config *conf, mbedtls_ssl_ticket_write_t *f_ticket_write, mbedtls_ssl_ticket_parse_t *f_ticket_parse, void *p_ticket ) { conf->f_ticket_write = f_ticket_write; conf->f_ticket_parse = f_ticket_parse; conf->p_ticket = p_ticket; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41822F", "function_addr": 4293167, "binary_name": "3b74425ebd08a392f4ae9edeeb2c0e66063e0975fecada2a05be00f888a73010.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov [rbp+var_10], rsi"], [4, "mov [rbp+var_18], rdx"], [5, "mov [rbp+var_20], rcx"], [6, "mov rax, [rbp+var_8]"], [7, "mov rdx, [rbp+var_10]"], [8, "mov [rax+88h], rdx"], [9, "mov rax, [rbp+var_8]"], [10, "mov rdx, [rbp+var_18]"], [11, "mov [rax+90h], rdx"], [12, "mov rax, [rbp+var_8]"], [13, "mov rdx, [rbp+var_20]"], [14, "mov [rax+98h], rdx"], [15, "nop"], [16, "pop rbp"], [17, "retn"]], "data_dep": [[6, 2], [7, 3], [8, 7], [8, 6], [9, 2], [10, 4], [11, 10], [11, 9], [12, 2], [13, 5], [14, 13], [14, 12], [16, 0], [17, 12]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3b74425ebd08a392f4ae9edeeb2c0e66063e0975fecada2a05be00f888a73010_3b74425ebd08a392f4ae9edeeb2c0e66063e0975fecada2a05be00f888a73010.jsonl.gz", "strip_func_name": "sub_41822F", "query": "\n\n\n_QWORD *__fastcall sub_41822F(_QWORD *a1, __int64 a2, __int64 a3, __int64 a4)\n{\n_QWORD *result; // rax\n\na1[17] = a2;\na1[18] = a3;\nresult = a1;\na1[19] = a4;\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,sub_41822F,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'f_ticket_parse', 'a4': 'p_ticket', 'a1': 'conf', 'a2': 'f_ticket_write', 'sub_41822F': 'mbedtls_ssl_conf_session_tickets_cb'}"}
PHYSFS_getCdRomDirsCallback
83a9aa4126c589a6f8453a0849c3fcd29d44c939e30436d38b3d30eb244fd78e
solenum
exengine
NA
void PHYSFS_getCdRomDirsCallback(PHYSFS_StringCallback callback, void *data) { __PHYSFS_platformDetectAvailableCDs(callback, data); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_420C55", "function_addr": 4328533, "binary_name": "83a9aa4126c589a6f8453a0849c3fcd29d44c939e30436d38b3d30eb244fd78e.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov rdx, [rbp+var_10]"], [6, "mov rax, [rbp+var_8]"], [7, "mov rsi, rdx"], [8, "mov rdi, rax"], [9, "call sub_41CC04"], [10, "nop"], [11, "leave"], [12, "retn"]], "data_dep": [[5, 4], [6, 3], [7, 5], [8, 6], [12, 9]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/83a9aa4126c589a6f8453a0849c3fcd29d44c939e30436d38b3d30eb244fd78e_83a9aa4126c589a6f8453a0849c3fcd29d44c939e30436d38b3d30eb244fd78e.jsonl.gz", "strip_func_name": "sub_420C55", "query": "\n\n\nint __fastcall sub_420C55(void (__fastcall *a1)(__int64, char *), __int64 a2)\n{\nreturn sub_41CC04(a1, a2);\n}\n\n\n\nQ:[a1,a2,sub_420C55,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'callback', 'a2': 'data', 'sub_420C55': 'PHYSFS_getCdRomDirsCallback'}"}
r_more_than_one_syllable_word
9acf456e98009cb498ed5cac4153ab67c8dd7caf33921402739ca86e36cd0298
hthetiot
php-stemmer
NA
static int r_more_than_one_syllable_word(struct SN_env * z) { { int c_test = z->c; /* test, line 446 */ { int i = 2; while(1) { /* atleast, line 446 */ int c1 = z->c; { /* gopast */ /* grouping vowel, line 446 */ int ret = out_grouping_U(z, g_vowel, 97, 305, 1); if (ret < 0) goto lab0; z->c += ret; } i--; continue; lab0: z->c = c1; break; } if (i > 0) return 0; } z->c = c_test; } return 1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4324C2", "function_addr": 4400322, "binary_name": "9acf456e98009cb498ed5cac4153ab67c8dd7caf33921402739ca86e36cd0298.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov rax, [rbp+var_18]"], [5, "mov eax, [rax+8]"], [6, "mov [rbp+var_8], eax"], [7, "mov [rbp+var_4], 2"], [8, "mov rax, [rbp+var_18]"], [9, "mov eax, [rax+8]"], [10, "mov [rbp+var_C], eax"], [11, "mov rax, [rbp+var_18]"], [12, "mov r8d, 1"], [13, "mov ecx, 131h"], [14, "mov edx, 61h "], [15, "lea rsi, unk_438C90"], [16, "mov rdi, rax"], [17, "call sub_433077"], [18, "mov [rbp+var_10], eax"], [19, "cmp [rbp+var_10], 0"], [20, "js short loc_43252E"], [21, "mov rax, [rbp+var_18]"], [22, "mov edx, [rax+8]"], [23, "mov eax, [rbp+var_10]"], [24, "add edx, eax"], [25, "mov rax, [rbp+var_18]"], [26, "mov [rax+8], edx"], [27, "sub [rbp+var_4], 1"], [28, "jmp short loc_4324DF"], [29, "nop"], [30, "mov rax, [rbp+var_18]"], [31, "mov edx, [rbp+var_C]"], [32, "mov [rax+8], edx"], [33, "nop"], [34, "cmp [rbp+var_4], 0"], [35, "jle short loc_432547"], [36, "mov eax, 0"], [37, "jmp short locret_432556"], [38, "mov rax, [rbp+var_18]"], [39, "mov edx, [rbp+var_8]"], [40, "mov [rax+8], edx"], [41, "mov eax, 1"], [42, "leave"], [43, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [8, 3], [9, 8], [9, 26], [10, 9], [11, 3], [15, 15], [16, 11], [18, 17], [19, 18], [20, 19], [21, 3], [22, 26], [22, 21], [23, 18], [24, 23], [24, 22], [25, 3], [26, 24], [26, 25], [27, 7], [27, 27], [30, 3], [31, 10], [32, 31], [32, 30], [34, 7], [34, 27], [35, 34], [38, 3], [39, 6], [40, 38], [40, 39], [43, 36], [43, 41]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/9acf456e98009cb498ed5cac4153ab67c8dd7caf33921402739ca86e36cd0298_9acf456e98009cb498ed5cac4153ab67c8dd7caf33921402739ca86e36cd0298.jsonl.gz", "strip_func_name": "sub_4324C2", "query": "\n\n\n__int64 __fastcall sub_4324C2(__int64 a1)\n{\nint v2; // [rsp+10h] [rbp-10h]\nint v3; // [rsp+14h] [rbp-Ch]\nint v4; // [rsp+18h] [rbp-8h]\nint i; // [rsp+1Ch] [rbp-4h]\n\nv4 = *(_DWORD *)(a1 + 8);\nfor ( i = 2; ; --i )\n{\nv3 = *(_DWORD *)(a1 + 8);\nv2 = sub_433077(a1, &unk_438C90, 97LL, 305LL, 1LL);\nif ( v2 < 0 )\nbreak;\n*(_DWORD *)(a1 + 8) += v2;\n}\n*(_DWORD *)(a1 + 8) = v3;\nif ( i > 0 )\nreturn 0LL;\n*(_DWORD *)(a1 + 8) = v4;\nreturn 1LL;\n}\n\n\n\nQ:[a1,v3,v4,sub_4324C2,sub_433077,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'z', 'v3': 'c1', 'v4': 'c_test', 'sub_4324C2': 'r_more_than_one_syllable_word', 'sub_433077': 'out_grouping_U'}"}
noise_gradient
bf9c74cce88cc010e3d3a572df8191c6dec6747df48ee39ea2eb16d62e4a60fa
smcameron
gaseous-giganticus
NA
static union vec3 noise_gradient(union vec3 position, float w, float noise_scale, const int octaves) { union vec3 g; const float dx = noise_scale * (0.05f / (float) DIM); const float dy = noise_scale * (0.05f / (float) DIM); const float dz = noise_scale * (0.05f / (float) DIM); float (*const noise)(float x, float y, float z, float w) = fbmnoise4[octaves]; g.v.x = noise(position.v.x + dx, position.v.y, position.v.z, w) - noise(position.v.x - dx, position.v.y, position.v.z, w); g.v.y = noise(position.v.x, position.v.y + dy, position.v.z, w) - noise(position.v.x, position.v.y - dy, position.v.z, w); g.v.z = noise(position.v.x, position.v.y, position.v.z + dz, w) - noise(position.v.x, position.v.y, position.v.z - dz, w); return g; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407CF2", "function_addr": 4226290, "binary_name": "bf9c74cce88cc010e3d3a572df8191c6dec6747df48ee39ea2eb16d62e4a60fa.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 68h"], [4, "movq rax, xmm0"], [5, "movq rdx, xmm1"], [6, "movss [rbp+var_54], xmm2"], [7, "movss [rbp+var_58], xmm3"], [8, "mov [rbp+var_5C], edi"], [9, "mov [rbp+var_50], rax"], [10, "mov eax, [rbp+var_48]"], [11, "and eax, 0"], [12, "or eax, edx"], [13, "mov [rbp+var_48], eax"], [14, "movss xmm1, [rbp+var_58]"], [15, "movss xmm0, cs:dword_420C38"], [16, "mulss xmm0, xmm1"], [17, "movss [rbp+var_14], xmm0"], [18, "movss xmm1, [rbp+var_58]"], [19, "movss xmm0, cs:dword_420C38"], [20, "mulss xmm0, xmm1"], [21, "movss [rbp+var_18], xmm0"], [22, "movss xmm1, [rbp+var_58]"], [23, "movss xmm0, cs:dword_420C38"], [24, "mulss xmm0, xmm1"], [25, "movss [rbp+var_1C], xmm0"], [26, "mov eax, [rbp+var_5C]"], [27, "cdqe"], [28, "mov rax, ds:funcs_407D9C[rax*8]"], [29, "mov [rbp+var_28], rax"], [30, "movss xmm2, [rbp+var_48]"], [31, "movss xmm1, dword ptr [rbp+var_50+4]"], [32, "movss xmm0, dword ptr [rbp+var_50]"], [33, "addss xmm0, [rbp+var_14]"], [34, "movd eax, xmm0"], [35, "movss xmm0, [rbp+var_54]"], [36, "mov rdx, [rbp+var_28]"], [37, "movaps xmm3, xmm0"], [38, "movd xmm0, eax"], [39, "call rdx"], [40, "movd ebx, xmm0"], [41, "movss xmm2, [rbp+var_48]"], [42, "movss xmm1, dword ptr [rbp+var_50+4]"], [43, "movss xmm0, dword ptr [rbp+var_50]"], [44, "subss xmm0, [rbp+var_14]"], [45, "movd eax, xmm0"], [46, "movss xmm0, [rbp+var_54]"], [47, "mov rdx, [rbp+var_28]"], [48, "movaps xmm3, xmm0"], [49, "movd xmm0, eax"], [50, "call rdx"], [51, "movaps xmm1, xmm0"], [52, "movd xmm0, ebx"], [53, "subss xmm0, xmm1"], [54, "movss dword ptr [rbp+var_40], xmm0"], [55, "movss xmm1, [rbp+var_48]"], [56, "movss xmm0, dword ptr [rbp+var_50+4]"], [57, "addss xmm0, [rbp+var_18]"], [58, "mov eax, dword ptr [rbp+var_50]"], [59, "movss xmm2, [rbp+var_54]"], [60, "mov rdx, [rbp+var_28]"], [61, "movaps xmm3, xmm2"], [62, "movaps xmm2, xmm1"], [63, "movaps xmm1, xmm0"], [64, "movd xmm0, eax"], [65, "call rdx"], [66, "movd ebx, xmm0"], [67, "movss xmm1, [rbp+var_48]"], [68, "movss xmm0, dword ptr [rbp+var_50+4]"], [69, "subss xmm0, [rbp+var_18]"], [70, "mov eax, dword ptr [rbp+var_50]"], [71, "movss xmm2, [rbp+var_54]"], [72, "mov rdx, [rbp+var_28]"], [73, "movaps xmm3, xmm2"], [74, "movaps xmm2, xmm1"], [75, "movaps xmm1, xmm0"], [76, "movd xmm0, eax"], [77, "call rdx"], [78, "movaps xmm1, xmm0"], [79, "movd xmm0, ebx"], [80, "subss xmm0, xmm1"], [81, "movss dword ptr [rbp+var_40+4], xmm0"], [82, "movss xmm0, [rbp+var_48]"], [83, "movaps xmm1, xmm0"], [84, "addss xmm1, [rbp+var_1C]"], [85, "movss xmm0, dword ptr [rbp+var_50+4]"], [86, "mov eax, dword ptr [rbp+var_50]"], [87, "movss xmm2, [rbp+var_54]"], [88, "mov rdx, [rbp+var_28]"], [89, "movaps xmm3, xmm2"], [90, "movaps xmm2, xmm1"], [91, "movaps xmm1, xmm0"], [92, "movd xmm0, eax"], [93, "call rdx"], [94, "movd ebx, xmm0"], [95, "movss xmm0, [rbp+var_48]"], [96, "movaps xmm1, xmm0"], [97, "subss xmm1, [rbp+var_1C]"], [98, "movss xmm0, dword ptr [rbp+var_50+4]"], [99, "mov eax, dword ptr [rbp+var_50]"], [100, "movss xmm2, [rbp+var_54]"], [101, "mov rdx, [rbp+var_28]"], [102, "movaps xmm3, xmm2"], [103, "movaps xmm2, xmm1"], [104, "movaps xmm1, xmm0"], [105, "movd xmm0, eax"], [106, "call rdx"], [107, "movaps xmm1, xmm0"], [108, "movd xmm0, ebx"], [109, "subss xmm0, xmm1"], [110, "movss [rbp+var_38], xmm0"], [111, "mov rax, [rbp+var_40]"], [112, "mov [rbp+var_34], rax"], [113, "mov eax, [rbp+var_38]"], [114, "mov [rbp+var_2C], eax"], [115, "mov rdx, [rbp+var_34]"], [116, "mov eax, [rbp+var_2C]"], [117, "movq xmm0, rdx"], [118, "movq xmm1, rax"], [119, "mov rbx, [rbp+var_8]"], [120, "leave"], [121, "retn"]], "data_dep": [[9, 4], [11, 10], [12, 5], [12, 11], [13, 12], [14, 7], [16, 15], [16, 14], [17, 16], [18, 7], [20, 19], [20, 18], [21, 20], [22, 7], [24, 23], [24, 22], [25, 24], [26, 8], [29, 28], [30, 13], [32, 9], [33, 17], [33, 32], [34, 33], [35, 6], [36, 29], [37, 35], [38, 34], [39, 36], [40, 38], [41, 13], [43, 9], [44, 17], [44, 43], [45, 44], [46, 6], [47, 29], [48, 46], [49, 45], [50, 47], [51, 49], [52, 40], [53, 52], [53, 51], [54, 53], [55, 13], [57, 56], [57, 21], [58, 9], [59, 6], [60, 29], [61, 59], [62, 55], [63, 57], [64, 58], [65, 60], [66, 64], [67, 13], [69, 21], [69, 68], [70, 9], [71, 6], [72, 29], [73, 71], [74, 67], [75, 69], [76, 70], [77, 72], [78, 76], [79, 66], [80, 78], [80, 79], [81, 80], [82, 13], [83, 82], [84, 83], [84, 25], [86, 9], [87, 6], [88, 29], [89, 87], [90, 84], [91, 85], [92, 86], [93, 88], [94, 92], [95, 13], [96, 95], [97, 96], [97, 25], [99, 9], [100, 6], [101, 29], [102, 100], [103, 97], [104, 98], [105, 99], [106, 101], [107, 105], [108, 94], [109, 108], [109, 107], [110, 109], [111, 54], [112, 111], [113, 110], [114, 113], [115, 112], [116, 114], [117, 115], [118, 116], [121, 116]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/bf9c74cce88cc010e3d3a572df8191c6dec6747df48ee39ea2eb16d62e4a60fa_bf9c74cce88cc010e3d3a572df8191c6dec6747df48ee39ea2eb16d62e4a60fa.jsonl.gz", "strip_func_name": "sub_407CF2", "query": "\n\n\ndouble __fastcall sub_407CF2(int a1, __m128i a2, float a3, float a4, float a5)\n{\nfloat v6; // xmm1_4\n__m128i v7; // xmm0\nfloat v8; // ebx\n__m128i v9; // xmm0\n__m128i v10; // xmm0\nunsigned __int64 v13; // [rsp+20h] [rbp-50h]\nfloat v14; // [rsp+28h] [rbp-48h]\ndouble v15; // [rsp+30h] [rbp-40h]\nfloat (__fastcall *v16)(float, float, float, float); // [rsp+48h] [rbp-28h]\n\nv13 = a2.m128i_i64[0];\nv14 = a3;\nv16 = (float (__fastcall *)(float, float, float, float))funcs_407D9C[a1];\nv6 = *(float *)&a2.m128i_i32[1];\na2 = (__m128i)a2.m128i_u32[0];\n*(float *)a2.m128i_i32 = *(float *)a2.m128i_i32 + (float)(0.000048828126 * a5);\nv7 = _mm_cvtsi32_si128(_mm_cvtsi128_si32(a2));\n*(float *)v7.m128i_i32 = v16(*(float *)v7.m128i_i32, v6, a3, a4);\nv8 = COERCE_FLOAT(_mm_cvtsi128_si32(v7));\nv9 = (__m128i)(unsigned int)v13;\n*(float *)v9.m128i_i32 = *(float *)&v13 - (float)(0.000048828126 * a5);\n*(float *)&v15 = v8 - v16(COERCE_FLOAT(_mm_cvtsi128_si32(v9)), *((float *)&v13 + 1), v14, a4);\nv10 = _mm_cvtsi32_si128(v13);\n*(float *)v10.m128i_i32 = v16(*(float *)v10.m128i_i32, *((float *)&v13 + 1) + (float)(0.000048828126 * a5), v14, a4);\n*((float *)&v15 + 1) = COERCE_FLOAT(_mm_cvtsi128_si32(v10))\n- v16(*(float *)&v13, *((float *)&v13 + 1) - (float)(0.000048828126 * a5), v14, a4);\nv16(*(float *)&v13, *((float *)&v13 + 1), v14 + (float)(0.000048828126 * a5), a4);\nv16(*(float *)&v13, *((float *)&v13 + 1), v14 - (float)(0.000048828126 * a5), a4);\nreturn v15;\n}\n\n\n\nQ:[a1,a4,a5,v13,v15,v16,sub_407CF2,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'octaves', 'a4': 'w', 'a5': 'noise_scale', 'v13': 'positiona', 'v15': 'g', 'v16': 'noise', 'sub_407CF2': 'noise_gradient'}"}