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
s_endmacro
53a05aad0cf55e21d871bf84231d41994b161191fed8e17cf3096e52dd9ca4c2
darwin-on-arm
darwin-sdk
NA
void s_endmacro( uintptr_t value) { const char *errorString; if(!macro_name){ as_bad ("This .endmacro does not match with a preceding .macro"); ignore_rest_of_line(); } else{ (void)(obstack_1grow(&macros, '\0')); errorString = hash_insert(ma_hash, macro_name, obstack_finish(&macros)); if(errorString != NULL && *errorString) as_warn("The macro named \"%s\" is already defined", macro_name); macro_name = NULL; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4108AC", "function_addr": 4262060, "binary_name": "53a05aad0cf55e21d871bf84231d41994b161191fed8e17cf3096e52dd9ca4c2.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, cs:qword_454DA0"], [5, "test rax, rax"], [6, "jnz short loc_4108DD"], [7, "mov edi, offset aThisEndmacroDo"], [8, "mov eax, 0"], [9, "call sub_40B609"], [10, "call sub_40ECE4"], [11, "jmp loc_4109F6"], [12, "mov [rbp+var_8], offset unk_454D60"], [13, "mov rax, [rbp+var_8]"], [14, "mov rax, [rax+18h]"], [15, "lea rdx, [rax+1]"], [16, "mov rax, [rbp+var_8]"], [17, "mov rax, [rax+20h]"], [18, "cmp rdx, rax"], [19, "jbe short loc_41090F"], [20, "mov rax, [rbp+var_8]"], [21, "mov esi, 1"], [22, "mov rdi, rax"], [23, "call _obstack_newchunk"], [24, "mov rax, [rbp+var_8]"], [25, "mov rax, [rax+18h]"], [26, "lea rcx, [rax+1]"], [27, "mov rdx, [rbp+var_8]"], [28, "mov [rdx+18h], rcx"], [29, "mov byte ptr [rax], 0"], [30, "mov [rbp+var_10], offset unk_454D60"], [31, "mov rax, [rbp+var_10]"], [32, "mov rax, [rax+10h]"], [33, "mov [rbp+var_18], rax"], [34, "mov rax, [rbp+var_10]"], [35, "mov rax, [rax+18h]"], [36, "mov rdx, rax"], [37, "mov rax, [rbp+var_10]"], [38, "mov eax, [rax+2Ch]"], [39, "cdqe"], [40, "add rdx, rax"], [41, "mov rax, [rbp+var_10]"], [42, "mov eax, [rax+2Ch]"], [43, "not eax"], [44, "cdqe"], [45, "and rax, rdx"], [46, "mov rdx, rax"], [47, "mov rax, [rbp+var_10]"], [48, "mov [rax+18h], rdx"], [49, "mov rax, [rbp+var_10]"], [50, "mov rdx, [rax+18h]"], [51, "mov rax, [rbp+var_10]"], [52, "mov rax, [rax+20h]"], [53, "cmp rdx, rax"], [54, "jbe short loc_41098F"], [55, "mov rax, [rbp+var_10]"], [56, "mov rdx, [rax+20h]"], [57, "mov rax, [rbp+var_10]"], [58, "mov [rax+18h], rdx"], [59, "mov rax, [rbp+var_10]"], [60, "mov rdx, [rax+18h]"], [61, "mov rax, [rbp+var_10]"], [62, "mov [rax+10h], rdx"], [63, "mov rdx, [rbp+var_18]"], [64, "mov rcx, cs:qword_454DA0"], [65, "mov rax, cs:qword_454D58"], [66, "mov rsi, rcx"], [67, "mov rdi, rax"], [68, "call sub_408239"], [69, "mov [rbp+var_20], rax"], [70, "cmp [rbp+var_20], 0"], [71, "jz short loc_4109EB"], [72, "mov rax, [rbp+var_20]"], [73, "movzx eax, byte ptr [rax]"], [74, "test al, al"], [75, "jz short loc_4109EB"], [76, "mov rax, cs:qword_454DA0"], [77, "mov rsi, rax"], [78, "mov edi, offset aTheMacroNamedS"], [79, "mov eax, 0"], [80, "call sub_40B31A"], [81, "mov cs:qword_454DA0, 0"], [82, "nop"], [83, "leave"], [84, "retn"]], "data_dep": [[5, 4], [6, 5], [13, 12], [14, 13], [15, 14], [16, 12], [17, 16], [18, 17], [18, 15], [19, 18], [20, 12], [22, 20], [24, 12], [25, 24], [26, 25], [27, 12], [28, 27], [28, 26], [29, 25], [31, 30], [32, 29], [32, 31], [33, 32], [34, 30], [35, 34], [35, 29], [36, 35], [37, 30], [38, 29], [38, 37], [40, 36], [40, 38], [41, 30], [42, 41], [42, 29], [43, 42], [45, 43], [45, 40], [46, 45], [47, 30], [48, 47], [48, 46], [49, 30], [50, 49], [50, 48], [51, 30], [52, 51], [52, 48], [53, 50], [53, 52], [54, 53], [55, 30], [56, 28], [56, 55], [56, 48], [56, 29], [56, 58], [57, 30], [58, 56], [58, 57], [59, 30], [60, 28], [60, 48], [60, 62], [60, 59], [60, 29], [60, 58], [61, 30], [62, 60], [62, 61], [63, 33], [66, 64], [67, 65], [69, 68], [70, 69], [71, 70], [72, 69], [73, 28], [73, 62], [73, 48], [73, 72], [73, 29], [73, 58], [74, 73], [75, 74], [77, 76], [84, 68], [84, 10], [84, 74], [84, 80]]}
{"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/53a05aad0cf55e21d871bf84231d41994b161191fed8e17cf3096e52dd9ca4c2_53a05aad0cf55e21d871bf84231d41994b161191fed8e17cf3096e52dd9ca4c2.jsonl.gz", "strip_func_name": "sub_4108AC", "query": "\n\n\nint __fastcall sub_4108AC(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\nconst char *v6; // rax\n_BYTE *v7; // rax\n__int64 v8; // rdx\n__int64 v9; // rcx\n__int64 v10; // r8\n__int64 v11; // r9\n__int64 *v13; // [rsp+18h] [rbp-18h]\n\nif ( qword_454DA0 )\n{\nif ( (unsigned __int64)(*((_QWORD *)&unk_454D60 + 3) + 1LL) > *((_QWORD *)&unk_454D60 + 4) )\nobstack_newchunk((__int64)&unk_454D60, 1);\nv7 = (_BYTE *)*((_QWORD *)&unk_454D60 + 3);\n*((_QWORD *)&unk_454D60 + 3) = v7 + 1;\n*v7 = 0;\nv13 = (__int64 *)*((_QWORD *)&unk_454D60 + 2);\n*((_QWORD *)&unk_454D60 + 3) = (*((int *)&unk_454D60 + 11) + *((_QWORD *)&unk_454D60 + 3)) & ~*((_DWORD *)&unk_454D60\n+ 11);\nif ( *((_QWORD *)&unk_454D60 + 3) > *((_QWORD *)&unk_454D60 + 4) )\n*((_QWORD *)&unk_454D60 + 3) = *((_QWORD *)&unk_454D60 + 4);\n*((_QWORD *)&unk_454D60 + 2) = *((_QWORD *)&unk_454D60 + 3);\nv6 = sub_408239(qword_454D58, (const char *)qword_454DA0, v13);\nif ( v6 )\n{\nLODWORD(v6) = *(unsigned __int8 *)v6;\nif ( (_BYTE)v6 )\nLODWORD(v6) = sub_40B31A(\"The macro named \\\"%s\\\" is already defined\", qword_454DA0, v8, v9, v10, v11);\n}\nqword_454DA0 = 0LL;\n}\nelse\n{\nsub_40B609(\"This .endmacro does not match with a preceding .macro\", a2, a3, a4, a5, a6);\nLODWORD(v6) = (unsigned int)sub_40ECE4();\n}\nreturn (int)v6;\n}\n\n\n\nQ:[a1,v13,sub_4108AC,sub_408239,sub_40B31A,sub_40B609,sub_40ECE4,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'value', 'v13': 'value_0', 'sub_4108AC': 's_endmacro', 'sub_408239': 'hash_insert', 'sub_40B31A': 'as_warn', 'sub_40B609': 'as_bad', 'sub_40ECE4': 'ignore_rest_of_line'}"}
sha1_loose_object_info
fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc
msysgit
msysgit
NA
static int sha1_loose_object_info(const unsigned char *sha1, struct object_info *oi) { int status; unsigned long mapsize, size; void *map; git_zstream stream; char hdr[32]; if (oi->delta_base_sha1) hashclr(oi->delta_base_sha1); /* * If we don't care about type or size, then we don't * need to look inside the object at all. Note that we * do not optimize out the stat call, even if the * caller doesn't care about the disk-size, since our * return value implicitly indicates whether the * object even exists. */ if (!oi->typep && !oi->sizep) { struct stat st; if (stat_sha1_file(sha1, &st) < 0) return -1; if (oi->disk_sizep) *oi->disk_sizep = st.st_size; return 0; } map = map_sha1_file(sha1, &mapsize); if (!map) return -1; if (oi->disk_sizep) *oi->disk_sizep = mapsize; if (unpack_sha1_header(&stream, map, mapsize, hdr, sizeof(hdr)) < 0) status = error("unable to unpack %s header", sha1_to_hex(sha1)); else if ((status = parse_sha1_header(hdr, &size)) < 0) status = error("unable to parse %s header", sha1_to_hex(sha1)); else if (oi->sizep) *oi->sizep = size; git_inflate_end(&stream); munmap(map, mapsize); if (oi->typep) *oi->typep = status; return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41B8FA", "function_addr": 4307194, "binary_name": "fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 180h"], [3, "mov [rbp+var_178], rdi"], [4, "mov [rbp+var_180], rsi"], [5, "mov rax, [rbp+var_180]"], [6, "mov rax, [rax+18h]"], [7, "test rax, rax"], [8, "jz short loc_41B936"], [9, "mov rax, [rbp+var_180]"], [10, "mov rax, [rax+18h]"], [11, "mov rdi, rax"], [12, "call sub_4162A6"], [13, "mov rax, [rbp+var_180]"], [14, "mov rax, [rax]"], [15, "test rax, rax"], [16, "jnz short loc_41B9AB"], [17, "mov rax, [rbp+var_180]"], [18, "mov rax, [rax+8]"], [19, "test rax, rax"], [20, "jnz short loc_41B9AB"], [21, "lea rdx, [rbp+var_170]"], [22, "mov rax, [rbp+var_178]"], [23, "mov rsi, rdx"], [24, "mov rdi, rax"], [25, "call sub_419419"], [26, "test eax, eax"], [27, "jns short loc_41B97C"], [28, "mov eax, 0FFFFFFFFh"], [29, "jmp locret_41BAFA"], [30, "mov rax, [rbp+var_180]"], [31, "mov rax, [rax+10h]"], [32, "test rax, rax"], [33, "jz short loc_41B9A1"], [34, "mov rdx, [rbp+var_140]"], [35, "mov rax, [rbp+var_180]"], [36, "mov rax, [rax+10h]"], [37, "mov [rax], rdx"], [38, "mov eax, 0"], [39, "jmp locret_41BAFA"], [40, "lea rdx, [rbp+len]"], [41, "mov rax, [rbp+var_178]"], [42, "mov rsi, rdx"], [43, "mov rdi, rax"], [44, "call sub_419577"], [45, "mov [rbp+addr], rax"], [46, "cmp [rbp+addr], 0"], [47, "jnz short loc_41B9D6"], [48, "mov eax, 0FFFFFFFFh"], [49, "jmp locret_41BAFA"], [50, "mov rax, [rbp+var_180]"], [51, "mov rax, [rax+10h]"], [52, "test rax, rax"], [53, "jz short loc_41B9F8"], [54, "mov rax, [rbp+var_180]"], [55, "mov rax, [rax+10h]"], [56, "mov rdx, [rbp+len]"], [57, "mov [rax], rdx"], [58, "mov rdx, [rbp+len]"], [59, "lea rcx, [rbp+var_E0]"], [60, "mov rsi, [rbp+addr]"], [61, "lea rax, [rbp+var_C0]"], [62, "mov r8d, 20h "], [63, "mov rdi, rax"], [64, "call sub_419748"], [65, "test eax, eax"], [66, "jns short loc_41BA4A"], [67, "mov rax, [rbp+var_178]"], [68, "mov rdi, rax"], [69, "call sub_40AA3D"], [70, "mov rsi, rax"], [71, "mov edi, offset aUnableToUnpack"], [72, "mov eax, 0"], [73, "call error"], [74, "mov [rbp+var_4], 0FFFFFFFFh"], [75, "jmp short loc_41BAB5"], [76, "lea rdx, [rbp+var_20]"], [77, "lea rax, [rbp+var_E0]"], [78, "mov rsi, rdx"], [79, "mov rdi, rax"], [80, "call sub_419942"], [81, "mov [rbp+var_4], eax"], [82, "cmp [rbp+var_4], 0"], [83, "jns short loc_41BA93"], [84, "mov rax, [rbp+var_178]"], [85, "mov rdi, rax"], [86, "call sub_40AA3D"], [87, "mov rsi, rax"], [88, "mov edi, offset aUnableToParseS"], [89, "mov eax, 0"], [90, "call error"], [91, "mov [rbp+var_4], 0FFFFFFFFh"], [92, "jmp short loc_41BAB5"], [93, "mov rax, [rbp+var_180]"], [94, "mov rax, [rax+8]"], [95, "test rax, rax"], [96, "jz short loc_41BAB5"], [97, "mov rax, [rbp+var_180]"], [98, "mov rax, [rax+8]"], [99, "mov rdx, [rbp+var_20]"], [100, "mov [rax], rdx"], [101, "lea rax, [rbp+var_C0]"], [102, "mov rdi, rax"], [103, "call sub_4292A8"], [104, "mov rdx, [rbp+len]"], [105, "mov rax, [rbp+addr]"], [106, "mov rsi, rdx"], [107, "mov rdi, rax"], [108, "call _munmap"], [109, "mov rax, [rbp+var_180]"], [110, "mov rax, [rax]"], [111, "test rax, rax"], [112, "jz short loc_41BAF5"], [113, "mov rax, [rbp+var_180]"], [114, "mov rax, [rax]"], [115, "mov edx, [rbp+var_4]"], [116, "mov [rax], edx"], [117, "mov eax, 0"], [118, "leave"], [119, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [8, 7], [9, 4], [10, 9], [11, 10], [13, 4], [14, 13], [15, 14], [16, 15], [17, 4], [18, 17], [19, 18], [20, 19], [22, 3], [23, 21], [24, 22], [26, 25], [27, 26], [30, 4], [31, 30], [32, 31], [33, 32], [35, 4], [36, 35], [37, 34], [37, 36], [41, 3], [42, 40], [43, 41], [45, 44], [46, 45], [47, 46], [50, 4], [51, 50], [52, 51], [53, 52], [54, 4], [55, 54], [57, 56], [57, 55], [60, 45], [61, 52], [61, 55], [63, 61], [65, 64], [66, 65], [67, 3], [68, 67], [70, 69], [76, 58], [77, 65], [78, 76], [79, 77], [81, 80], [82, 81], [83, 82], [84, 3], [85, 84], [87, 86], [93, 4], [94, 57], [94, 93], [95, 94], [96, 95], [97, 4], [98, 100], [98, 57], [98, 97], [100, 98], [100, 99], [101, 90], [101, 98], [101, 73], [101, 95], [102, 101], [105, 45], [106, 104], [107, 105], [109, 4], [110, 109], [110, 57], [110, 100], [111, 110], [112, 111], [113, 4], [114, 113], [114, 100], [114, 57], [114, 116], [115, 91], [115, 81], [115, 74], [116, 115], [116, 114], [119, 38], [119, 117], [119, 28], [119, 48]]}
{"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_41B8FA", "query": "\n\n\n__int64 __fastcall sub_41B8FA(unsigned __int8 *a1, __int64 a2)\n{\n__int64 result; // rax\n__int64 v3; // rax\n__int64 v4; // rdx\n__int64 v5; // rcx\n__int64 v6; // r8\n__int64 v7; // r9\n__int64 v8; // rax\n__int64 v9; // rdx\n__int64 v10; // rcx\n__int64 v11; // r8\n__int64 v12; // r9\nchar v13[48]; // [rsp+10h] [rbp-170h] BYREF\n__int64 v14; // [rsp+40h] [rbp-140h]\nchar v15[32]; // [rsp+A0h] [rbp-E0h] BYREF\n_QWORD v16[20]; // [rsp+C0h] [rbp-C0h] BYREF\nunsigned __int64 v17; // [rsp+160h] [rbp-20h] BYREF\nsize_t len; // [rsp+168h] [rbp-18h] BYREF\nvoid *addr; // [rsp+170h] [rbp-10h]\nint v20; // [rsp+17Ch] [rbp-4h]\n\nif ( *(_QWORD *)(a2 + 24) )\nsub_4162A6(*(void **)(a2 + 24));\nif ( *(_QWORD *)a2 || *(_QWORD *)(a2 + 8) )\n{\naddr = sub_419577((__int64)a1, (char *)&len);\nif ( addr )\n{\nif ( *(_QWORD *)(a2 + 16) )\n**(_QWORD **)(a2 + 16) = len;\nif ( (int)sub_419748(v16, (__int64)addr, len, (__int64)v15, 32LL) >= 0 )\n{\nv20 = sub_419942(v15, &v17);\nif ( v20 >= 0 )\n{\nif ( *(_QWORD *)(a2 + 8) )\n**(_QWORD **)(a2 + 8) = v17;\n}\nelse\n{\nv8 = sub_40AA3D(a1);\nerror((__int64)\"unable to parse %s header\", v8, v9, v10, v11, v12);\nv20 = -1;\n}\n}\nelse\n{\nv3 = sub_40AA3D(a1);\nerror((__int64)\"unable to unpack %s header\", v3, v4, v5, v6, v7);\nv20 = -1;\n}\nsub_4292A8(v16);\nmunmap(addr, len);\nif ( *(_QWORD *)a2 )\n**(_DWORD **)a2 = v20;\nresult = 0LL;\n}\nelse\n{\nresult = 0xFFFFFFFFLL;\n}\n}\nelse if ( (int)sub_419419((__int64)a1, v13) >= 0 )\n{\nif ( *(_QWORD *)(a2 + 16) )\n**(_QWORD **)(a2 + 16) = v14;\nresult = 0LL;\n}\nelse\n{\nresult = 0xFFFFFFFFLL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v13,v15,v16,v17,len,addr,v20,sub_41B8FA,sub_4162A6,sub_419577,sub_419748,sub_419942,sub_40AA3D,sub_4292A8,sub_419419,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'sha1', 'a2': 'oi', 'v13': 'st', 'v15': 'hdr', 'v16': 'stream', 'v17': 'size', 'len': 'mapsize', 'addr': 'map', 'v20': 'status', 'sub_41B8FA': 'sha1_loose_object_info', 'sub_4162A6': 'hashclr_0', 'sub_419577': 'map_sha1_file', 'sub_419748': 'unpack_sha1_header', 'sub_419942': 'parse_sha1_header', 'sub_40AA3D': 'sha1_to_hex', 'sub_4292A8': 'git_inflate_end', 'sub_419419': 'stat_sha1_file'}"}
eloop_remove_timeout
208d6f5c4c47e61fc5612dba9824bbb292bc6b59ec61b6b27384dbfe4df358f2
vanhoefm
fragattacks
NA
static void eloop_remove_timeout(struct eloop_timeout *timeout) { dl_list_del(&timeout->list); wpa_trace_remove_ref(timeout, eloop, timeout->eloop_data); wpa_trace_remove_ref(timeout, user, timeout->user_data); os_free(timeout); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_48A3D0", "function_addr": 4760528, "binary_name": "208d6f5c4c47e61fc5612dba9824bbb292bc6b59ec61b6b27384dbfe4df358f2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+ptr], rdi"], [4, "mov rax, [rbp+ptr]"], [5, "mov rdi, rax"], [6, "call sub_489B01"], [7, "mov rax, [rbp+ptr]"], [8, "mov rdi, rax"], [9, "call _free"], [10, "nop"], [11, "leave"], [12, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 3], [8, 7], [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/208d6f5c4c47e61fc5612dba9824bbb292bc6b59ec61b6b27384dbfe4df358f2_208d6f5c4c47e61fc5612dba9824bbb292bc6b59ec61b6b27384dbfe4df358f2.jsonl.gz", "strip_func_name": "sub_48A3D0", "query": "\n\n\nvoid __fastcall sub_48A3D0(_QWORD *a1)\n{\nsub_489B01(a1);\nfree(a1);\n}\n\n\n\nQ:[a1,sub_48A3D0,sub_489B01,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'timeout', 'sub_48A3D0': 'eloop_remove_timeout', 'sub_489B01': 'dl_list_del_6'}"}
helpSQL
06da0488267dd12f9cfef76fa3ce57da628849c8d7a4879a3dd7f0e5e3ba1747
sraoss
pgsql-ivm
NA
void helpSQL(const char *topic, unsigned short int pager) { #define VALUE_OR_NULL(a) ((a) ? (a) : "") if (!topic || strlen(topic) == 0) { /* Print all the available command names */ int screen_width; int ncolumns; int nrows; FILE *output; int i; int j; /* Find screen width to determine how many columns will fit */ #ifdef TIOCGWINSZ struct winsize screen_size; if (ioctl(fileno(stdout), TIOCGWINSZ, &screen_size) == -1) screen_width = 80; /* ioctl failed, assume 80 */ else screen_width = screen_size.ws_col; #else screen_width = 80; /* default assumption */ #endif ncolumns = (screen_width - 3) / (QL_MAX_CMD_LEN + 1); ncolumns = Max(ncolumns, 1); nrows = (QL_HELP_COUNT + (ncolumns - 1)) / ncolumns; output = PageOutput(nrows + 1, pager ? &(pset.popt.topt) : NULL); fputs(_("Available help:\n"), output); for (i = 0; i < nrows; i++) { fprintf(output, " "); for (j = 0; j < ncolumns - 1; j++) fprintf(output, "%-*s", QL_MAX_CMD_LEN + 1, VALUE_OR_NULL(QL_HELP[i + j * nrows].cmd)); if (i + j * nrows < QL_HELP_COUNT) fprintf(output, "%s", VALUE_OR_NULL(QL_HELP[i + j * nrows].cmd)); fputc('\n', output); } ClosePager(output); } else { int i, pass; FILE *output = NULL; size_t len, wordlen, j; int nl_count; /* * len is the amount of the input to compare to the help topic names. * We first try exact match, then first + second words, then first * word only. */ len = strlen(topic); for (pass = 1; pass <= 3; pass++) { if (pass > 1) /* Nothing on first pass - try the opening * word(s) */ { wordlen = j = 1; while (j < len && topic[j++] != ' ') wordlen++; if (pass == 2 && j < len) { wordlen++; while (j < len && topic[j++] != ' ') wordlen++; } if (wordlen >= len) { /* Failed to shorten input, so try next pass if any */ continue; } len = wordlen; } /* * Count newlines for pager. This logic must agree with what the * following loop will do! */ nl_count = 0; for (i = 0; QL_HELP[i].cmd; i++) { if (pg_strncasecmp(topic, QL_HELP[i].cmd, len) == 0 || strcmp(topic, "*") == 0) { /* magic constant here must match format below! */ nl_count += 7 + QL_HELP[i].nl_count; /* If we have an exact match, exit. Fixes \h SELECT */ if (pg_strcasecmp(topic, QL_HELP[i].cmd) == 0) break; } } /* If no matches, don't open the output yet */ if (nl_count == 0) continue; if (!output) output = PageOutput(nl_count, pager ? &(pset.popt.topt) : NULL); for (i = 0; QL_HELP[i].cmd; i++) { if (pg_strncasecmp(topic, QL_HELP[i].cmd, len) == 0 || strcmp(topic, "*") == 0) { PQExpBufferData buffer; char *url; initPQExpBuffer(&buffer); QL_HELP[i].syntaxfunc(&buffer); url = psprintf("https://www.postgresql.org/docs/%s/%s.html", strstr(PG_VERSION, "devel") ? "devel" : PG_MAJORVERSION, QL_HELP[i].docbook_id); /* # of newlines in format must match constant above! */ fprintf(output, _("Command: %s\n" "Description: %s\n" "Syntax:\n%s\n\n" "URL: %s\n\n"), QL_HELP[i].cmd, _(QL_HELP[i].help), buffer.data, url); free(url); termPQExpBuffer(&buffer); /* If we have an exact match, exit. Fixes \h SELECT */ if (pg_strcasecmp(topic, QL_HELP[i].cmd) == 0) break; } } break; } /* If we never found anything, report that */ if (!output) { output = PageOutput(2, pager ? &(pset.popt.topt) : NULL); fprintf(output, _("No help available for \"%s\".\n" "Try \\h with no arguments to see available help.\n"), topic); } ClosePager(output); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4261D3", "function_addr": 4350419, "binary_name": "06da0488267dd12f9cfef76fa3ce57da628849c8d7a4879a3dd7f0e5e3ba1747.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 90h"], [3, "mov [rbp+s1], rdi"], [4, "mov eax, esi"], [5, "mov [rbp+var_8C], ax"], [6, "cmp [rbp+s1], 0"], [7, "jz short loc_42620A"], [8, "mov rax, [rbp+s1]"], [9, "movzx eax, byte ptr [rax]"], [10, "test al, al"], [11, "jnz loc_426443"], [12, "mov rax, cs:stdout"], [13, "mov rdi, rax"], [14, "call _fileno"], [15, "mov ecx, eax"], [16, "lea rax, [rbp+var_60]"], [17, "mov rdx, rax"], [18, "mov esi, 5413h"], [19, "mov edi, ecx"], [20, "mov eax, 0"], [21, "call _ioctl"], [22, "cmp eax, 0FFFFFFFFh"], [23, "jnz short loc_426241"], [24, "mov [rbp+var_4], 50h "], [25, "jmp short loc_42624B"], [26, "movzx eax, [rbp+var_5E]"], [27, "movzx eax, ax"], [28, "mov [rbp+var_4], eax"], [29, "mov eax, [rbp+var_4]"], [30, "sub eax, 3"], [31, "movsxd rdx, eax"], [32, "imul rdx, 3E0F83E1h"], [33, "shr rdx, 20h"], [34, "sar edx, 3"], [35, "sar eax, 1Fh"], [36, "mov ecx, eax"], [37, "mov eax, edx"], [38, "sub eax, ecx"], [39, "mov [rbp+var_4C], eax"], [40, "mov eax, 1"], [41, "cmp [rbp+var_4C], 0"], [42, "cmovg eax, [rbp+var_4C]"], [43, "mov [rbp+var_4C], eax"], [44, "mov eax, [rbp+var_4C]"], [45, "add eax, 0B8h"], [46, "cdq"], [47, "idiv [rbp+var_4C]"], [48, "mov [rbp+var_50], eax"], [49, "cmp [rbp+var_8C], 0"], [50, "jz short loc_42629E"], [51, "mov edx, offset qword_4B4EB0"], [52, "jmp short loc_4262A3"], [53, "mov edx, 0"], [54, "mov eax, [rbp+var_50]"], [55, "add eax, 1"], [56, "mov rsi, rdx"], [57, "mov edi, eax"], [58, "call sub_454394"], [59, "mov [rbp+s], rax"], [60, "mov rax, [rbp+s]"], [61, "mov rcx, rax"], [62, "mov edx, 10h"], [63, "mov esi, 1"], [64, "mov edi, offset aAvailableHelp"], [65, "call _fwrite"], [66, "mov [rbp+var_8], 0"], [67, "jmp loc_426426"], [68, "mov rax, [rbp+s]"], [69, "mov esi, offset asc_47A7FD"], [70, "mov rdi, rax"], [71, "mov eax, 0"], [72, "call sub_462B63"], [73, "mov [rbp+var_C], 0"], [74, "jmp short loc_426378"], [75, "mov eax, [rbp+var_C]"], [76, "imul eax, [rbp+var_50]"], [77, "mov edx, eax"], [78, "mov eax, [rbp+var_8]"], [79, "add eax, edx"], [80, "movsxd rdx, eax"], [81, "mov rax, rdx"], [82, "shl rax, 2"], [83, "add rax, rdx"], [84, "shl rax, 3"], [85, "add rax, 48E340h"], [86, "mov rax, [rax]"], [87, "test rax, rax"], [88, "jz short loc_426354"], [89, "mov eax, [rbp+var_C]"], [90, "imul eax, [rbp+var_50]"], [91, "mov edx, eax"], [92, "mov eax, [rbp+var_8]"], [93, "add eax, edx"], [94, "movsxd rdx, eax"], [95, "mov rax, rdx"], [96, "shl rax, 2"], [97, "add rax, rdx"], [98, "shl rax, 3"], [99, "add rax, 48E340h"], [100, "mov rax, [rax]"], [101, "jmp short loc_426359"], [102, "mov eax, offset unk_47A800"], [103, "mov rdi, [rbp+s]"], [104, "mov rcx, rax"], [105, "mov edx, 21h "], [106, "mov esi, offset aS_18"], [107, "mov eax, 0"], [108, "call sub_462B63"], [109, "add [rbp+var_C], 1"], [110, "mov eax, [rbp+var_4C]"], [111, "sub eax, 1"], [112, "cmp [rbp+var_C], eax"], [113, "jl loc_4262FD"], [114, "mov eax, [rbp+var_C]"], [115, "imul eax, [rbp+var_50]"], [116, "mov edx, eax"], [117, "mov eax, [rbp+var_8]"], [118, "add eax, edx"], [119, "cmp eax, 0B8h"], [120, "jg short loc_426411"], [121, "mov eax, [rbp+var_C]"], [122, "imul eax, [rbp+var_50]"], [123, "mov edx, eax"], [124, "mov eax, [rbp+var_8]"], [125, "add eax, edx"], [126, "movsxd rdx, eax"], [127, "mov rax, rdx"], [128, "shl rax, 2"], [129, "add rax, rdx"], [130, "shl rax, 3"], [131, "add rax, 48E340h"], [132, "mov rax, [rax]"], [133, "test rax, rax"], [134, "jz short loc_4263F3"], [135, "mov eax, [rbp+var_C]"], [136, "imul eax, [rbp+var_50]"], [137, "mov edx, eax"], [138, "mov eax, [rbp+var_8]"], [139, "add eax, edx"], [140, "movsxd rdx, eax"], [141, "mov rax, rdx"], [142, "shl rax, 2"], [143, "add rax, rdx"], [144, "shl rax, 3"], [145, "add rax, 48E340h"], [146, "mov rax, [rax]"], [147, "jmp short loc_4263F8"], [148, "mov eax, offset unk_47A800"], [149, "mov rcx, [rbp+s]"], [150, "mov rdx, rax"], [151, "mov esi, offset aS_17"], [152, "mov rdi, rcx"], [153, "mov eax, 0"], [154, "call sub_462B63"], [155, "mov rax, [rbp+s]"], [156, "mov rsi, rax"], [157, "mov edi, 0Ah"], [158, "call _fputc"], [159, "add [rbp+var_8], 1"], [160, "mov eax, [rbp+var_8]"], [161, "cmp eax, [rbp+var_50]"], [162, "jl loc_4262DE"], [163, "mov rax, [rbp+s]"], [164, "mov rdi, rax"], [165, "call sub_454508"], [166, "jmp loc_426832"], [167, "mov [rbp+var_20], 0"], [168, "mov rax, [rbp+s1]"], [169, "mov rdi, rax"], [170, "call _strlen"], [171, "mov [rbp+var_28], rax"], [172, "mov [rbp+var_14], 1"], [173, "jmp loc_4267D0"], [174, "cmp [rbp+var_14], 1"], [175, "jle loc_42650B"], [176, "mov [rbp+var_38], 1"], [177, "mov rax, [rbp+var_38]"], [178, "mov [rbp+var_30], rax"], [179, "jmp short loc_42648B"], [180, "add [rbp+var_30], 1"], [181, "mov rax, [rbp+var_38]"], [182, "cmp rax, [rbp+var_28]"], [183, "jnb short loc_4264B2"], [184, "mov rax, [rbp+var_38]"], [185, "lea rdx, [rax+1]"], [186, "mov [rbp+var_38], rdx"], [187, "mov rdx, [rbp+s1]"], [188, "add rax, rdx"], [189, "movzx eax, byte ptr [rax]"], [190, "cmp al, 20h "], [191, "jnz short loc_426486"], [192, "cmp [rbp+var_14], 2"], [193, "jnz short loc_4264F5"], [194, "mov rax, [rbp+var_38]"], [195, "cmp rax, [rbp+var_28]"], [196, "jnb short loc_4264F5"], [197, "add [rbp+var_30], 1"], [198, "jmp short loc_4264CE"], [199, "add [rbp+var_30], 1"], [200, "mov rax, [rbp+var_38]"], [201, "cmp rax, [rbp+var_28]"], [202, "jnb short loc_4264F5"], [203, "mov rax, [rbp+var_38]"], [204, "lea rdx, [rax+1]"], [205, "mov [rbp+var_38], rdx"], [206, "mov rdx, [rbp+s1]"], [207, "add rax, rdx"], [208, "movzx eax, byte ptr [rax]"], [209, "cmp al, 20h "], [210, "jnz short loc_4264C9"], [211, "mov rax, [rbp+var_30]"], [212, "cmp rax, [rbp+var_28]"], [213, "jnb loc_4267C8"], [214, "mov rax, [rbp+var_30]"], [215, "mov [rbp+var_28], rax"], [216, "mov [rbp+var_3C], 0"], [217, "mov [rbp+var_10], 0"], [218, "jmp loc_4265C6"], [219, "mov eax, [rbp+var_10]"], [220, "movsxd rdx, eax"], [221, "mov rax, rdx"], [222, "shl rax, 2"], [223, "add rax, rdx"], [224, "shl rax, 3"], [225, "add rax, 48E340h"], [226, "mov rcx, [rax]"], [227, "mov rdx, [rbp+var_28]"], [228, "mov rax, [rbp+s1]"], [229, "mov rsi, rcx"], [230, "mov rdi, rax"], [231, "call sub_461E27"], [232, "test eax, eax"], [233, "jz short loc_42656D"], [234, "mov rax, [rbp+s1]"], [235, "mov esi, offset asc_47A806"], [236, "mov rdi, rax"], [237, "call _strcmp"], [238, "test eax, eax"], [239, "jnz short loc_4265C2"], [240, "mov eax, [rbp+var_10]"], [241, "movsxd rdx, eax"], [242, "mov rax, rdx"], [243, "shl rax, 2"], [244, "add rax, rdx"], [245, "shl rax, 3"], [246, "add rax, 48E360h"], [247, "mov eax, [rax]"], [248, "add eax, 7"], [249, "add [rbp+var_3C], eax"], [250, "mov eax, [rbp+var_10]"], [251, "movsxd rdx, eax"], [252, "mov rax, rdx"], [253, "shl rax, 2"], [254, "add rax, rdx"], [255, "shl rax, 3"], [256, "add rax, 48E340h"], [257, "mov rdx, [rax]"], [258, "mov rax, [rbp+s1]"], [259, "mov rsi, rdx"], [260, "mov rdi, rax"], [261, "call sub_461D2C"], [262, "test eax, eax"], [263, "jz short loc_4265EE"], [264, "add [rbp+var_10], 1"], [265, "mov eax, [rbp+var_10]"], [266, "movsxd rdx, eax"], [267, "mov rax, rdx"], [268, "shl rax, 2"], [269, "add rax, rdx"], [270, "shl rax, 3"], [271, "add rax, 48E340h"], [272, "mov rax, [rax]"], [273, "test rax, rax"], [274, "jnz loc_42651E"], [275, "jmp short loc_4265EF"], [276, "nop"], [277, "cmp [rbp+var_3C], 0"], [278, "jz loc_4267CB"], [279, "cmp [rbp+var_20], 0"], [280, "jnz short loc_426627"], [281, "cmp [rbp+var_8C], 0"], [282, "jz short loc_426611"], [283, "mov edx, offset qword_4B4EB0"], [284, "jmp short loc_426616"], [285, "mov edx, 0"], [286, "mov eax, [rbp+var_3C]"], [287, "mov rsi, rdx"], [288, "mov edi, eax"], [289, "call sub_454394"], [290, "mov [rbp+var_20], rax"], [291, "mov [rbp+var_10], 0"], [292, "jmp loc_4267A0"], [293, "mov eax, [rbp+var_10]"], [294, "movsxd rdx, eax"], [295, "mov rax, rdx"], [296, "shl rax, 2"], [297, "add rax, rdx"], [298, "shl rax, 3"], [299, "add rax, 48E340h"], [300, "mov rcx, [rax]"], [301, "mov rdx, [rbp+var_28]"], [302, "mov rax, [rbp+s1]"], [303, "mov rsi, rcx"], [304, "mov rdi, rax"], [305, "call sub_461E27"], [306, "test eax, eax"], [307, "jz short loc_426686"], [308, "mov rax, [rbp+s1]"], [309, "mov esi, offset asc_47A806"], [310, "mov rdi, rax"], [311, "call _strcmp"], [312, "test eax, eax"], [313, "jnz loc_42679C"], [314, "lea rax, [rbp+var_80]"], [315, "mov rdi, rax"], [316, "call _initPQExpBuffer"], [317, "mov eax, [rbp+var_10]"], [318, "movsxd rdx, eax"], [319, "mov rax, rdx"], [320, "shl rax, 2"], [321, "add rax, rdx"], [322, "shl rax, 3"], [323, "add rax, offset funcs_4266B6"], [324, "mov rdx, [rax]"], [325, "lea rax, [rbp+var_80]"], [326, "mov rdi, rax"], [327, "call rdx"], [328, "mov eax, [rbp+var_10]"], [329, "movsxd rdx, eax"], [330, "mov rax, rdx"], [331, "shl rax, 2"], [332, "add rax, rdx"], [333, "shl rax, 3"], [334, "add rax, 48E350h"], [335, "mov rax, [rax]"], [336, "mov rdx, rax"], [337, "mov esi, offset a16"], [338, "mov edi, offset aHttpsWwwPostgr_0"], [339, "mov eax, 0"], [340, "call sub_45C2E2"], [341, "mov [rbp+ptr], rax"], [342, "mov rsi, [rbp+var_80]"], [343, "mov eax, [rbp+var_10]"], [344, "movsxd rdx, eax"], [345, "mov rax, rdx"], [346, "shl rax, 2"], [347, "add rax, rdx"], [348, "shl rax, 3"], [349, "add rax, 48E348h"], [350, "mov rcx, [rax]"], [351, "mov eax, [rbp+var_10]"], [352, "movsxd rdx, eax"], [353, "mov rax, rdx"], [354, "shl rax, 2"], [355, "add rax, rdx"], [356, "shl rax, 3"], [357, "add rax, 48E340h"], [358, "mov rdx, [rax]"], [359, "mov rdi, [rbp+ptr]"], [360, "mov rax, [rbp+var_20]"], [361, "mov r9, rdi"], [362, "mov r8, rsi"], [363, "mov esi, offset aCommandSDescri"], [364, "mov rdi, rax"], [365, "mov eax, 0"], [366, "call sub_462B63"], [367, "mov rax, [rbp+ptr]"], [368, "mov rdi, rax"], [369, "call _free"], [370, "lea rax, [rbp+var_80]"], [371, "mov rdi, rax"], [372, "call _termPQExpBuffer"], [373, "mov eax, [rbp+var_10]"], [374, "movsxd rdx, eax"], [375, "mov rax, rdx"], [376, "shl rax, 2"], [377, "add rax, rdx"], [378, "shl rax, 3"], [379, "add rax, 48E340h"], [380, "mov rdx, [rax]"], [381, "mov rax, [rbp+s1]"], [382, "mov rsi, rdx"], [383, "mov rdi, rax"], [384, "call sub_461D2C"], [385, "test eax, eax"], [386, "jnz short loc_42679C"], [387, "nop"], [388, "jmp short loc_4267DA"], [389, "add [rbp+var_10], 1"], [390, "mov eax, [rbp+var_10]"], [391, "movsxd rdx, eax"], [392, "mov rax, rdx"], [393, "shl rax, 2"], [394, "add rax, rdx"], [395, "shl rax, 3"], [396, "add rax, 48E340h"], [397, "mov rax, [rax]"], [398, "test rax, rax"], [399, "jnz loc_426633"], [400, "jmp short loc_4267DA"], [401, "nop"], [402, "jmp short loc_4267CC"], [403, "nop"], [404, "add [rbp+var_14], 1"], [405, "cmp [rbp+var_14], 3"], [406, "jle loc_42646A"], [407, "cmp [rbp+var_20], 0"], [408, "jnz short loc_426825"], [409, "cmp [rbp+var_8C], 0"], [410, "jz short loc_4267F2"], [411, "mov eax, offset qword_4B4EB0"], [412, "jmp short loc_4267F7"], [413, "mov eax, 0"], [414, "mov rsi, rax"], [415, "mov edi, 2"], [416, "call sub_454394"], [417, "mov [rbp+var_20], rax"], [418, "mov rdx, [rbp+s1]"], [419, "mov rax, [rbp+var_20]"], [420, "mov esi, offset aNoHelpAvailabl"], [421, "mov rdi, rax"], [422, "mov eax, 0"], [423, "call sub_462B63"], [424, "mov rax, [rbp+var_20]"], [425, "mov rdi, rax"], [426, "call sub_454508"], [427, "nop"], [428, "nop"], [429, "leave"], [430, "retn"]], "data_dep": [[5, 4], [6, 3], [7, 6], [8, 3], [9, 8], [10, 9], [11, 10], [13, 12], [15, 14], [16, 14], [17, 16], [19, 15], [22, 21], [23, 22], [27, 26], [28, 27], [29, 24], [29, 28], [30, 29], [31, 30], [32, 31], [33, 32], [34, 33], [35, 30], [36, 35], [37, 34], [38, 36], [38, 37], [39, 38], [41, 39], [42, 39], [42, 41], [43, 42], [44, 43], [45, 44], [47, 43], [48, 45], [49, 5], [50, 49], [54, 48], [55, 54], [56, 53], [56, 51], [57, 55], [59, 58], [60, 59], [61, 60], [68, 59], [70, 68], [75, 109], [75, 73], [76, 48], [76, 75], [77, 76], [78, 66], [78, 159], [79, 78], [79, 77], [80, 79], [81, 80], [82, 81], [83, 80], [83, 82], [84, 83], [85, 84], [86, 85], [87, 86], [88, 87], [89, 109], [89, 73], [90, 89], [90, 48], [91, 90], [92, 66], [92, 159], [93, 92], [93, 91], [94, 93], [95, 94], [96, 95], [97, 94], [97, 96], [98, 97], [99, 98], [100, 99], [103, 59], [104, 102], [104, 100], [109, 73], [109, 109], [110, 47], [111, 110], [112, 111], [112, 73], [112, 109], [113, 112], [114, 73], [114, 109], [115, 48], [115, 114], [116, 115], [117, 66], [117, 159], [118, 117], [118, 116], [119, 118], [120, 119], [121, 109], [121, 73], [122, 48], [122, 121], [123, 122], [124, 159], [124, 66], [125, 124], [125, 123], [126, 125], [127, 126], [128, 127], [129, 128], [129, 126], [130, 129], [131, 130], [132, 131], [133, 132], [134, 133], [135, 109], [135, 73], [136, 135], [136, 48], [137, 136], [138, 66], [138, 159], [139, 138], [139, 137], [140, 139], [141, 140], [142, 141], [143, 140], [143, 142], [144, 143], [145, 144], [146, 145], [149, 59], [150, 148], [150, 146], [152, 149], [155, 59], [156, 155], [159, 159], [159, 66], [160, 159], [160, 66], [161, 48], [161, 160], [162, 161], [163, 59], [164, 163], [168, 3], [169, 168], [171, 170], [174, 404], [174, 172], [175, 174], [177, 176], [178, 177], [180, 180], [180, 178], [181, 186], [181, 176], [182, 215], [182, 181], [182, 171], [183, 182], [184, 186], [184, 176], [185, 184], [185, 206], [185, 187], [185, 257], [185, 266], [186, 185], [187, 3], [188, 187], [188, 184], [189, 188], [190, 189], [191, 190], [192, 172], [192, 404], [193, 192], [194, 186], [194, 176], [195, 215], [195, 194], [195, 171], [196, 195], [197, 180], [197, 178], [199, 199], [199, 197], [200, 205], [200, 186], [200, 176], [201, 215], [201, 200], [201, 171], [202, 201], [203, 205], [203, 186], [203, 176], [204, 203], [204, 206], [204, 187], [204, 257], [204, 266], [205, 204], [206, 3], [207, 203], [207, 206], [208, 207], [209, 208], [210, 209], [211, 197], [211, 178], [211, 199], [211, 180], [212, 171], [212, 211], [212, 215], [213, 212], [214, 197], [214, 178], [214, 199], [214, 180], [215, 214], [219, 264], [219, 217], [220, 219], [221, 220], [222, 221], [223, 222], [223, 220], [224, 223], [225, 224], [226, 225], [227, 215], [227, 171], [228, 3], [229, 226], [230, 228], [232, 231], [233, 232], [234, 3], [236, 234], [238, 237], [239, 238], [240, 264], [240, 217], [241, 240], [242, 241], [243, 242], [244, 243], [244, 241], [245, 244], [246, 245], [247, 246], [248, 247], [249, 249], [249, 248], [249, 216], [250, 264], [250, 217], [251, 250], [252, 251], [253, 252], [254, 251], [254, 253], [255, 254], [256, 255], [257, 256], [258, 3], [259, 257], [260, 258], [262, 261], [263, 262], [264, 217], [264, 264], [265, 264], [265, 217], [266, 265], [267, 266], [268, 267], [269, 268], [269, 266], [270, 269], [271, 270], [272, 271], [273, 272], [274, 273], [277, 249], [277, 216], [278, 277], [279, 167], [280, 279], [281, 5], [282, 281], [286, 249], [286, 216], [287, 285], [287, 283], [288, 286], [290, 289], [293, 291], [293, 389], [294, 293], [295, 294], [296, 295], [297, 296], [297, 294], [298, 297], [299, 298], [300, 299], [301, 215], [301, 171], [302, 3], [303, 300], [304, 302], [306, 305], [307, 306], [308, 3], [310, 308], [312, 311], [313, 312], [314, 306], [314, 312], [315, 314], [317, 291], [317, 389], [318, 317], [319, 318], [320, 319], [321, 320], [321, 318], [322, 321], [323, 322], [324, 323], [325, 323], [326, 325], [327, 324], [328, 291], [328, 389], [329, 328], [330, 329], [331, 330], [332, 329], [332, 331], [333, 332], [334, 333], [335, 334], [336, 335], [341, 340], [343, 291], [343, 389], [344, 343], [345, 344], [346, 345], [347, 346], [347, 344], [348, 347], [349, 348], [350, 349], [351, 291], [351, 389], [352, 351], [353, 352], [354, 353], [355, 354], [355, 352], [356, 355], [357, 356], [358, 357], [359, 341], [360, 167], [360, 290], [361, 359], [362, 342], [364, 360], [367, 341], [368, 367], [370, 369], [371, 370], [373, 389], [373, 291], [374, 373], [375, 374], [376, 375], [377, 376], [377, 374], [378, 377], [379, 378], [380, 379], [381, 3], [382, 380], [383, 381], [385, 384], [386, 385], [389, 291], [389, 389], [390, 291], [390, 389], [391, 390], [392, 391], [393, 392], [394, 393], [394, 391], [395, 394], [396, 395], [397, 396], [398, 397], [399, 398], [404, 172], [404, 404], [405, 172], [405, 404], [406, 405], [407, 167], [407, 290], [408, 407], [409, 5], [410, 409], [414, 413], [414, 411], [417, 416], [418, 3], [419, 417], [421, 419], [424, 417], [424, 290], [424, 167], [425, 424], [430, 426], [430, 165]]}
{"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/06da0488267dd12f9cfef76fa3ce57da628849c8d7a4879a3dd7f0e5e3ba1747_06da0488267dd12f9cfef76fa3ce57da628849c8d7a4879a3dd7f0e5e3ba1747.jsonl.gz", "strip_func_name": "sub_4261D3", "query": "\n\n\n__int64 __fastcall sub_4261D3(const char *a1, __int16 a2)\n{\nint v2; // eax\nint v3; // eax\n__int64 *v4; // rdx\nint v5; // edx\nint v6; // ecx\nint v7; // er8\nint v8; // er9\nint v9; // er8\nint v10; // er9\nchar *v11; // rax\nchar *v12; // rax\n__int64 v14; // rax\n__int64 v15; // rax\n__int64 *v16; // rdx\nint v17; // ecx\nint v18; // er8\nint v19; // er9\n__int64 *v20; // rax\nint v21; // ecx\nint v22; // er8\nint v23; // er9\n__int64 v24[4]; // [rsp+10h] [rbp-80h] BYREF\nchar v25[2]; // [rsp+30h] [rbp-60h] BYREF\nunsigned __int16 v26; // [rsp+32h] [rbp-5Eh]\nFILE *s; // [rsp+38h] [rbp-58h]\nint v28; // [rsp+40h] [rbp-50h]\nint v29; // [rsp+44h] [rbp-4Ch]\nvoid *ptr; // [rsp+48h] [rbp-48h]\nunsigned int v31; // [rsp+54h] [rbp-3Ch]\nunsigned __int64 v32; // [rsp+58h] [rbp-38h]\nunsigned __int64 l; // [rsp+60h] [rbp-30h]\nsize_t v34; // [rsp+68h] [rbp-28h]\n__int64 v35; // [rsp+70h] [rbp-20h]\nint k; // [rsp+7Ch] [rbp-14h]\nint m; // [rsp+80h] [rbp-10h]\nint j; // [rsp+84h] [rbp-Ch]\nint i; // [rsp+88h] [rbp-8h]\nint v40; // [rsp+8Ch] [rbp-4h]\n\nif ( !a1 || !*a1 )\n{\nv2 = fileno(stdout);\nif ( ioctl(v2, 0x5413uLL, v25) == -1 )\nv40 = 80;\nelse\nv40 = v26;\nv29 = (v40 - 3) / 33;\nv3 = 1;\nif ( v29 > 0 )\nv3 = v29;\nv29 = v3;\nv28 = (v3 + 184) / v3;\nif ( a2 )\nv4 = &qword_4B4EB0;\nelse\nv4 = 0LL;\ns = (FILE *)sub_454394((unsigned int)(v28 + 1), v4);\nfwrite(\"Available help:\\n\", 1uLL, 0x10uLL, s);\nfor ( i = 0; i < v28; ++i )\n{\nsub_462B63((_DWORD)s, (unsigned int)\" \", v5, v6, v7, v8);\nfor ( j = 0; j < v29 - 1; ++j )\n{\nif ( (&off_48E340[5 * v28 * j])[5 * i] )\nv11 = (&off_48E340[5 * v28 * j])[5 * i];\nelse\nv11 = (char *)&unk_47A800;\nsub_462B63((_DWORD)s, (unsigned int)\"%-*s\", 33, (_DWORD)v11, v9, v10);\n}\nif ( v28 * j + i <= 184 )\n{\nif ( (&off_48E340[5 * v28 * j])[5 * i] )\nv12 = (&off_48E340[5 * v28 * j])[5 * i];\nelse\nv12 = (char *)&unk_47A800;\nsub_462B63((_DWORD)s, (unsigned int)\"%s\", (_DWORD)v12, (_DWORD)s, v9, v10);\n}\nfputc(10, s);\n}\nreturn sub_454508(s);\n}\nv35 = 0LL;\nv34 = strlen(a1);\nfor ( k = 1; k <= 3; ++k )\n{\nif ( k > 1 )\n{\nv32 = 1LL;\nfor ( l = 1LL; v32 < v34; ++l )\n{\nv14 = v32++;\nif ( a1[v14] == 32 )\nbreak;\n}\nif ( k == 2 && v32 < v34 )\n{\n++l;\nwhile ( v32 < v34 )\n{\nv15 = v32++;\nif ( a1[v15] == 32 )\nbreak;\n++l;\n}\n}\nif ( l >= v34 )\ncontinue;\nv34 = l;\n}\nv31 = 0;\nfor ( m = 0; off_48E340[5 * m]; ++m )\n{\nif ( !(unsigned int)sub_461E27(a1, off_48E340[5 * m], v34) || !strcmp(a1, \"*\") )\n{\nv31 += dword_48E360[10 * m] + 7;\nif ( !(unsigned int)sub_461D2C(a1, off_48E340[5 * m]) )\nbreak;\n}\n}\nif ( v31 )\n{\nif ( a2 )\nv16 = &qword_4B4EB0;\nelse\nv16 = 0LL;\nv35 = sub_454394(v31, v16);\nfor ( m = 0; off_48E340[5 * m]; ++m )\n{\nif ( !(unsigned int)sub_461E27(a1, off_48E340[5 * m], v34) || !strcmp(a1, \"*\") )\n{\ninitPQExpBuffer();\n((void (__fastcall *)(__int64 *))funcs_4266B6[5 * m])(v24);\nptr = (void *)sub_45C2E2(\n(unsigned int)\"https://www.postgresql.org/docs/%s/%s.html\",\n(unsigned int)\"16\",\n(unsigned int)(&off_48E350)[5 * m],\nv17,\nv18,\nv19);\nsub_462B63(\nv35,\n(unsigned int)\"Command: %s\\nDescription: %s\\nSyntax:\\n%s\\n\\nURL: %s\\n\\n\",\n(unsigned int)off_48E340[5 * m],\n(unsigned int)off_48E348[5 * m],\nv24[0],\n(_DWORD)ptr);\nfree(ptr);\ntermPQExpBuffer();\nif ( !(unsigned int)sub_461D2C(a1, off_48E340[5 * m]) )\nbreak;\n}\n}\nbreak;\n}\n}\nif ( !v35 )\n{\nif ( a2 )\nv20 = &qword_4B4EB0;\nelse\nv20 = 0LL;\nv35 = sub_454394(2LL, v20);\nsub_462B63(\nv35,\n(unsigned int)\"No help available for \\\"%s\\\".\\nTry \\\\h with no arguments to see available help.\\n\",\n(_DWORD)a1,\nv21,\nv22,\nv23);\n}\nreturn sub_454508(v35);\n}\n\n\n\nQ:[a1,a2,v24,v25,s,v28,v29,ptr,v31,v32,l,v34,v35,k,m,v40,sub_4261D3,sub_454394,sub_462B63,sub_454508,sub_461E27,sub_461D2C,sub_45C2E2,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'topic', 'a2': 'pager', 'v24': 'buffer', 'v25': 'screen_size', 's': 'output', 'v28': 'nrows', 'v29': 'ncolumns', 'ptr': 'url', 'v31': 'nl_count', 'v32': 'j_0', 'l': 'wordlen', 'v34': 'len', 'v35': 'output_0', 'k': 'pass', 'm': 'i_0', 'v40': 'screen_width', 'sub_4261D3': 'helpSQL', 'sub_454394': 'PageOutput', 'sub_462B63': 'pg_fprintf', 'sub_454508': 'ClosePager', 'sub_461E27': 'pg_strncasecmp', 'sub_461D2C': 'pg_strcasecmp', 'sub_45C2E2': 'psprintf'}"}
sl_bt_legacy_advertiser_start
81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba
openthread
ot-efr32
NA
sl_status_t sl_bt_legacy_advertiser_start(uint8_t advertising_set, uint8_t connect) { 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; cmd->data.cmd_legacy_advertiser_start.advertising_set=advertising_set; cmd->data.cmd_legacy_advertiser_start.connect=connect; cmd->header=sl_bt_cmd_legacy_advertiser_start_id+(((2)&0xff)<<8)+(((2)&0x700)>>8); sl_bt_host_handle_command(); return rsp->data.rsp_legacy_advertiser_start.result; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405478", "function_addr": 4215928, "binary_name": "81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov edx, edi"], [4, "mov eax, esi"], [5, "mov [rbp+var_14], dl"], [6, "mov [rbp+var_18], al"], [7, "mov rax, cs:off_426240"], [8, "mov [rbp+var_8], rax"], [9, "mov rax, cs:off_426248"], [10, "mov [rbp+var_10], rax"], [11, "mov rax, [rbp+var_8]"], [12, "movzx edx, [rbp+var_14]"], [13, "mov [rax+4], dl"], [14, "mov rax, [rbp+var_8]"], [15, "movzx edx, [rbp+var_18]"], [16, "mov [rax+5], dl"], [17, "mov rax, [rbp+var_8]"], [18, "mov dword ptr [rax], 2560220h"], [19, "mov eax, 0"], [20, "call sub_40406F"], [21, "mov rax, [rbp+var_10]"], [22, "movzx eax, word ptr [rax+4]"], [23, "movzx eax, ax"], [24, "leave"], [25, "retn"]], "data_dep": [[5, 3], [6, 4], [8, 7], [10, 9], [11, 8], [12, 5], [13, 11], [13, 12], [14, 8], [15, 6], [16, 15], [16, 14], [17, 8], [18, 17], [21, 10], [22, 13], [22, 18], [22, 21], [23, 22], [25, 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/81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba_81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba.jsonl.gz", "strip_func_name": "sub_405478", "query": "\n\n\n__int64 __fastcall sub_405478(__int64 a1, __int64 a2)\n{\nunsigned __int16 *v3; // [rsp+10h] [rbp-10h]\n_BYTE *v4; // [rsp+18h] [rbp-8h]\n\nv4 = off_426240;\nv3 = (unsigned __int16 *)off_426248;\n*((_BYTE *)off_426240 + 4) = a1;\nv4[5] = a2;\n*(_DWORD *)v4 = 39191072;\nsub_40406F(a1, a2);\nreturn v3[2];\n}\n\n\n\nQ:[a1,a2,v3,v4,sub_405478,sub_40406F,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'advertising_set', 'a2': 'connect', 'v3': 'rsp_0', 'v4': 'cmd', 'sub_405478': 'sl_bt_legacy_advertiser_start', 'sub_40406F': 'sl_bt_host_handle_command'}"}
is_null_stream_filter
8170503cd1918ecb11237a85c61d9be0cd1209d60b0c8b0e2fb9b8fe47d16590
msysgit
msysgit
NA
int is_null_stream_filter(struct stream_filter *filter) { return filter == &null_filter_singleton; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4659EA", "function_addr": 4610538, "binary_name": "8170503cd1918ecb11237a85c61d9be0cd1209d60b0c8b0e2fb9b8fe47d16590.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "cmp [rbp+var_8], offset off_4FCCE0"], [4, "setz al"], [5, "movzx eax, al"], [6, "pop rbp"], [7, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 0], [7, 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/8170503cd1918ecb11237a85c61d9be0cd1209d60b0c8b0e2fb9b8fe47d16590_8170503cd1918ecb11237a85c61d9be0cd1209d60b0c8b0e2fb9b8fe47d16590.jsonl.gz", "strip_func_name": "sub_4659EA", "query": "\n\n\n_BOOL8 __fastcall sub_4659EA(__int64 (__fastcall ***a1)())\n{\nreturn a1 == &off_4FCCE0;\n}\n\n\n\nQ:[a1,sub_4659EA,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'filter', 'sub_4659EA': 'is_null_stream_filter'}"}
llfloat
396cb6861cfc2d01549ce02bb9ae51640c531e5fea7889b2ffecdf2e4ff99256
vlang
tcc
NA
void llfloat(void) { float fa; double da; LONG_DOUBLE lda; long long la, lb, lc; unsigned long long ula, ulb, ulc; la = 0x12345678; ula = 0x72345678; la = (la << 20) | 0x12345; ula = ula << 33; printf("la=" LONG_LONG_FORMAT " ula=" ULONG_LONG_FORMAT "\n", la, ula); fa = la; da = la; lda = la; printf("lltof: %f %f %Lf\n", fa, da, lda); la = fa; lb = da; lc = lda; printf("ftoll: " LONG_LONG_FORMAT " " LONG_LONG_FORMAT " " LONG_LONG_FORMAT "\n", la, lb, lc); fa = ula; da = ula; lda = ula; printf("ulltof: %f %f %Lf\n", fa, da, lda); ula = fa; ulb = da; ulc = lda; printf("ftoull: " ULONG_LONG_FORMAT " " ULONG_LONG_FORMAT " " ULONG_LONG_FORMAT "\n", ula, ulb, ulc); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_406B9B", "function_addr": 4221851, "binary_name": "396cb6861cfc2d01549ce02bb9ae51640c531e5fea7889b2ffecdf2e4ff99256.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 60h"], [3, "mov [rbp+var_8], 12345678h"], [4, "mov [rbp+var_10], 72345678h"], [5, "mov rax, [rbp+var_8]"], [6, "shl rax, 14h"], [7, "or rax, 12345h"], [8, "mov [rbp+var_8], rax"], [9, "shl [rbp+var_10], 21h"], [10, "mov rdx, [rbp+var_10]"], [11, "mov rax, [rbp+var_8]"], [12, "mov rsi, rax"], [13, "mov edi, offset aLaLdUlaLu"], [14, "mov eax, 0"], [15, "call _printf"], [16, "pxor xmm0, xmm0"], [17, "cvtsi2ss xmm0, [rbp+var_8]"], [18, "movss [rbp+var_14], xmm0"], [19, "pxor xmm0, xmm0"], [20, "cvtsi2sd xmm0, [rbp+var_8]"], [21, "movsd [rbp+var_20], xmm0"], [22, "fild [rbp+var_8]"], [23, "fstp [rbp+var_30]"], [24, "pxor xmm2, xmm2"], [25, "cvtss2sd xmm2, [rbp+var_14]"], [26, "movq rax, xmm2"], [27, "movsd xmm0, [rbp+var_20]"], [28, "push qword ptr [rbp+var_30+8]"], [29, "push qword ptr [rbp+var_30]"], [30, "movapd xmm1, xmm0"], [31, "movq xmm0, rax"], [32, "mov edi, offset aLltofFFLf"], [33, "mov eax, 2"], [34, "call _printf"], [35, "add rsp, 10h"], [36, "movss xmm0, [rbp+var_14]"], [37, "cvttss2si rax, xmm0"], [38, "mov [rbp+var_8], rax"], [39, "movsd xmm0, [rbp+var_20]"], [40, "cvttsd2si rax, xmm0"], [41, "mov [rbp+var_38], rax"], [42, "fld [rbp+var_30]"], [43, "fnstcw [rbp+var_52]"], [44, "movzx eax, [rbp+var_52]"], [45, "or ah, 0Ch"], [46, "mov [rbp+var_54], ax"], [47, "fldcw [rbp+var_54]"], [48, "fistp [rbp+var_40]"], [49, "fldcw [rbp+var_52]"], [50, "mov rcx, [rbp+var_40]"], [51, "mov rdx, [rbp+var_38]"], [52, "mov rax, [rbp+var_8]"], [53, "mov rsi, rax"], [54, "mov edi, offset aFtollLdLdLd"], [55, "mov eax, 0"], [56, "call _printf"], [57, "mov rax, [rbp+var_10]"], [58, "test rax, rax"], [59, "js short loc_406CA5"], [60, "pxor xmm0, xmm0"], [61, "cvtsi2ss xmm0, rax"], [62, "jmp short loc_406CBE"], [63, "mov rdx, rax"], [64, "shr rdx, 1"], [65, "and eax, 1"], [66, "or rdx, rax"], [67, "pxor xmm0, xmm0"], [68, "cvtsi2ss xmm0, rdx"], [69, "addss xmm0, xmm0"], [70, "movss [rbp+var_14], xmm0"], [71, "mov rax, [rbp+var_10]"], [72, "test rax, rax"], [73, "js short loc_406CD7"], [74, "pxor xmm0, xmm0"], [75, "cvtsi2sd xmm0, rax"], [76, "jmp short loc_406CF0"], [77, "mov rdx, rax"], [78, "shr rdx, 1"], [79, "and eax, 1"], [80, "or rdx, rax"], [81, "pxor xmm0, xmm0"], [82, "cvtsi2sd xmm0, rdx"], [83, "addsd xmm0, xmm0"], [84, "movsd [rbp+var_20], xmm0"], [85, "fild [rbp+var_10]"], [86, "cmp [rbp+var_10], 0"], [87, "jns short loc_406D07"], [88, "fld cs:tbyte_40E240"], [89, "faddp st(1), st"], [90, "fstp [rbp+var_30]"], [91, "pxor xmm3, xmm3"], [92, "cvtss2sd xmm3, [rbp+var_14]"], [93, "movq rax, xmm3"], [94, "movsd xmm0, [rbp+var_20]"], [95, "push qword ptr [rbp+var_30+8]"], [96, "push qword ptr [rbp+var_30]"], [97, "movapd xmm1, xmm0"], [98, "movq xmm0, rax"], [99, "mov edi, offset aUlltofFFLf"], [100, "mov eax, 2"], [101, "call _printf"], [102, "add rsp, 10h"], [103, "movss xmm0, [rbp+var_14]"], [104, "comiss xmm0, cs:dword_40E1B4"], [105, "jnb short loc_406D5D"], [106, "movss xmm0, [rbp+var_14]"], [107, "cvttss2si rax, xmm0"], [108, "mov [rbp+var_10], rax"], [109, "jmp short loc_406D85"], [110, "movss xmm0, [rbp+var_14]"], [111, "movss xmm1, cs:dword_40E1B4"], [112, "subss xmm0, xmm1"], [113, "cvttss2si rax, xmm0"], [114, "mov [rbp+var_10], rax"], [115, "mov rax, 8000000000000000h"], [116, "xor [rbp+var_10], rax"], [117, "mov rax, [rbp+var_10]"], [118, "mov [rbp+var_10], rax"], [119, "movsd xmm0, [rbp+var_20]"], [120, "comisd xmm0, cs:qword_40E1F0"], [121, "jnb short loc_406DAC"], [122, "movsd xmm0, [rbp+var_20]"], [123, "cvttsd2si rax, xmm0"], [124, "mov [rbp+var_48], rax"], [125, "jmp short loc_406DD4"], [126, "movsd xmm0, [rbp+var_20]"], [127, "movsd xmm1, cs:qword_40E1F0"], [128, "subsd xmm0, xmm1"], [129, "cvttsd2si rax, xmm0"], [130, "mov [rbp+var_48], rax"], [131, "mov rax, 8000000000000000h"], [132, "xor [rbp+var_48], rax"], [133, "mov rax, [rbp+var_48]"], [134, "mov [rbp+var_48], rax"], [135, "fld cs:tbyte_40E230"], [136, "fld [rbp+var_30]"], [137, "fcomip st, st(1)"], [138, "fstp st"], [139, "jnb short loc_406E07"], [140, "fld [rbp+var_30]"], [141, "fnstcw [rbp+var_52]"], [142, "movzx eax, [rbp+var_52]"], [143, "or ah, 0Ch"], [144, "mov [rbp+var_54], ax"], [145, "fldcw [rbp+var_54]"], [146, "fistp [rbp+var_50]"], [147, "fldcw [rbp+var_52]"], [148, "jmp short loc_406E37"], [149, "fld [rbp+var_30]"], [150, "fld cs:tbyte_40E230"], [151, "fsubp st(1), st"], [152, "fnstcw [rbp+var_52]"], [153, "movzx eax, [rbp+var_52]"], [154, "or ah, 0Ch"], [155, "mov [rbp+var_54], ax"], [156, "fldcw [rbp+var_54]"], [157, "fistp [rbp+var_50]"], [158, "fldcw [rbp+var_52]"], [159, "mov rax, 8000000000000000h"], [160, "xor [rbp+var_50], rax"], [161, "mov rax, [rbp+var_50]"], [162, "mov [rbp+var_50], rax"], [163, "mov rcx, [rbp+var_50]"], [164, "mov rdx, [rbp+var_48]"], [165, "mov rax, [rbp+var_10]"], [166, "mov rsi, rax"], [167, "mov edi, offset aFtoullLuLuLu"], [168, "mov eax, 0"], [169, "call _printf"], [170, "nop"], [171, "leave"], [172, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 7], [9, 4], [10, 9], [11, 8], [12, 11], [17, 16], [17, 8], [18, 17], [20, 8], [20, 19], [21, 20], [22, 8], [25, 18], [25, 24], [26, 25], [27, 21], [29, 23], [30, 27], [31, 26], [35, 2], [36, 18], [37, 34], [37, 36], [38, 37], [39, 21], [40, 37], [40, 39], [41, 40], [42, 23], [44, 43], [45, 44], [46, 45], [47, 46], [49, 43], [50, 48], [51, 41], [52, 38], [53, 52], [57, 9], [58, 57], [59, 58], [61, 58], [61, 60], [63, 58], [64, 63], [65, 58], [66, 64], [66, 65], [68, 66], [68, 67], [69, 68], [70, 61], [70, 69], [71, 9], [72, 71], [73, 72], [75, 72], [75, 74], [77, 72], [78, 77], [79, 72], [80, 78], [80, 79], [82, 81], [82, 80], [83, 82], [84, 75], [84, 83], [85, 9], [86, 85], [87, 86], [90, 42], [92, 70], [92, 91], [93, 92], [94, 84], [96, 90], [97, 94], [98, 93], [102, 35], [103, 70], [104, 103], [105, 102], [106, 70], [107, 106], [107, 101], [108, 107], [110, 70], [112, 111], [112, 110], [113, 101], [113, 112], [114, 113], [116, 115], [116, 114], [117, 108], [117, 116], [118, 117], [119, 84], [120, 119], [121, 116], [121, 102], [122, 84], [123, 122], [123, 117], [124, 123], [126, 84], [128, 126], [128, 127], [129, 128], [129, 117], [130, 129], [132, 130], [132, 131], [133, 132], [133, 124], [134, 133], [136, 90], [137, 89], [138, 137], [139, 132], [139, 116], [139, 102], [140, 136], [141, 49], [142, 141], [143, 142], [144, 143], [145, 144], [147, 141], [149, 136], [150, 135], [151, 89], [151, 138], [152, 49], [153, 152], [154, 153], [155, 154], [156, 155], [158, 152], [160, 157], [160, 159], [161, 160], [161, 146], [162, 161], [163, 162], [164, 134], [165, 118], [166, 165], [172, 169]]}
{"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/396cb6861cfc2d01549ce02bb9ae51640c531e5fea7889b2ffecdf2e4ff99256_396cb6861cfc2d01549ce02bb9ae51640c531e5fea7889b2ffecdf2e4ff99256.jsonl.gz", "strip_func_name": "sub_406B9B", "query": "\n\n\nint sub_406B9B()\n{\ndouble v0; // xmm0_8\nlong double v1; // fst7\nint result; // eax\nunsigned __int64 v3; // [rsp+18h] [rbp-48h]\nfloat v4; // [rsp+4Ch] [rbp-14h]\nunsigned __int64 v5; // [rsp+50h] [rbp-10h]\n\nprintf(\"la=%Ld ula=%Lu\\n\", 0x1234567812345LL, 0xE468ACF000000000LL);\nprintf(\"lltof: %f %f %Lf\\n\", (float)1736516421, (double)1736516421, (long double)0x1234567812345LL);\nprintf(\n\"ftoll: %Ld %Ld %Ld\\n\",\n(unsigned int)(int)(float)1736516421,\n(unsigned int)(int)(double)1736516421,\n(__int64)(long double)0x1234567812345LL);\nv4 = (float)0 + (float)0;\nv0 = (double)0 + (double)0;\nv1 = (long double)0xE468ACF000000000LL;\nprintf(\"ulltof: %f %f %Lf\\n\", v4, v0, v1);\nif ( v4 >= 9.223372e18 )\nv5 = (unsigned int)(int)(float)(v4 - 9.223372e18) ^ 0x8000000000000000LL;\nelse\nv5 = (unsigned int)(int)v4;\nif ( v0 >= 9.223372036854776e18 )\nv3 = (unsigned int)(int)(v0 - 9.223372036854776e18) ^ 0x8000000000000000LL;\nelse\nv3 = (unsigned int)(int)v0;\nif ( v1 >= 9.223372036854775808e18 )\nresult = printf(\"ftoull: %Lu %Lu %Lu\\n\", v5, v3, (__int64)(v1 - 9.223372036854775808e18) ^ 0x8000000000000000LL);\nelse\nresult = printf(\"ftoull: %Lu %Lu %Lu\\n\", v5, v3, (__int64)v1);\nreturn result;\n}\n\n\n\nQ:[v3,v4,v5,sub_406B9B,]\nAssistant: ", "hints": "[]", "response": "{'v3': 'ulb', 'v4': 'fa', 'v5': 'ula', 'sub_406B9B': 'llfloat'}"}
gatt_client_prepare_write
32e5bef9a534f6a023b94f0e20e0c28fed442ec28edeb1e289ac97b9496f472a
micropython
micropython-unicorn
NA
uint8_t gatt_client_prepare_write(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t attribute_handle, uint16_t offset, uint16_t length, uint8_t * data){ gatt_client_t * peripheral = provide_context_for_conn_handle_and_start_timer(con_handle); if (peripheral == NULL) return BTSTACK_MEMORY_ALLOC_FAILED; if (is_ready(peripheral) == 0) return GATT_CLIENT_IN_WRONG_STATE; peripheral->callback = callback; peripheral->attribute_handle = attribute_handle; peripheral->attribute_length = length; peripheral->attribute_offset = offset; peripheral->attribute_value = data; peripheral->gatt_client_state = P_W2_PREPARE_WRITE_SINGLE; gatt_client_run(); return ERROR_CODE_SUCCESS; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_435A7D", "function_addr": 4414077, "binary_name": "32e5bef9a534f6a023b94f0e20e0c28fed442ec28edeb1e289ac97b9496f472a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov eax, ecx"], [5, "mov ecx, r8d"], [6, "mov [rbp+var_30], r9"], [7, "mov [rbp+var_1C], si"], [8, "mov [rbp+var_20], dx"], [9, "mov [rbp+var_24], ax"], [10, "mov eax, ecx"], [11, "mov [rbp+var_28], ax"], [12, "movzx eax, [rbp+var_1C]"], [13, "mov edi, eax"], [14, "call sub_4316F2"], [15, "mov [rbp+var_8], rax"], [16, "cmp [rbp+var_8], 0"], [17, "jnz short loc_435AC1"], [18, "mov eax, 56h "], [19, "jmp short locret_435B29"], [20, "mov rax, [rbp+var_8]"], [21, "mov rdi, rax"], [22, "call sub_43172F"], [23, "test eax, eax"], [24, "jnz short loc_435AD8"], [25, "mov eax, 0FFFFFF95h"], [26, "jmp short locret_435B29"], [27, "mov rax, [rbp+var_8]"], [28, "mov rdx, [rbp+var_18]"], [29, "mov [rax+10h], rdx"], [30, "mov rax, [rbp+var_8]"], [31, "movzx edx, [rbp+var_20]"], [32, "mov [rax+4Eh], dx"], [33, "mov rax, [rbp+var_8]"], [34, "movzx edx, [rbp+var_28]"], [35, "mov [rax+52h], dx"], [36, "mov rax, [rbp+var_8]"], [37, "movzx edx, [rbp+var_24]"], [38, "mov [rax+50h], dx"], [39, "mov rax, [rbp+var_8]"], [40, "mov rdx, [rbp+var_30]"], [41, "mov [rax+58h], rdx"], [42, "mov rax, [rbp+var_8]"], [43, "mov dword ptr [rax+8], 31h "], [44, "call sub_433AA9"], [45, "mov eax, 0"], [46, "leave"], [47, "retn"]], "data_dep": [[9, 4], [10, 5], [11, 10], [12, 7], [13, 12], [15, 14], [16, 15], [17, 16], [20, 15], [21, 20], [23, 22], [24, 23], [27, 15], [28, 3], [29, 28], [29, 27], [30, 15], [31, 8], [32, 31], [32, 30], [33, 15], [34, 11], [35, 33], [35, 34], [36, 15], [37, 9], [38, 37], [38, 36], [39, 15], [40, 6], [41, 40], [41, 39], [42, 15], [43, 42], [47, 25], [47, 18], [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/32e5bef9a534f6a023b94f0e20e0c28fed442ec28edeb1e289ac97b9496f472a_32e5bef9a534f6a023b94f0e20e0c28fed442ec28edeb1e289ac97b9496f472a.jsonl.gz", "strip_func_name": "sub_435A7D", "query": "\n\n\n__int64 __fastcall sub_435A7D(__int64 a1, __int64 a2, __int16 a3, __int16 a4, __int16 a5, __int64 a6)\n{\n_WORD *v11; // [rsp+28h] [rbp-8h]\n\nv11 = sub_4316F2(a2, a2);\nif ( !v11 )\nreturn 86LL;\nif ( !sub_43172F((__int64)v11) )\nreturn 4294967189LL;\n*((_QWORD *)v11 + 2) = a1;\nv11[39] = a3;\nv11[41] = a5;\nv11[40] = a4;\n*((_QWORD *)v11 + 11) = a6;\n*((_DWORD *)v11 + 2) = 49;\nsub_433AA9((__int64)v11, a2);\nreturn 0LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,v11,sub_435A7D,sub_4316F2,sub_43172F,sub_433AA9,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'attribute_handle', 'a4': 'offset', 'a1': 'callback', 'a2': 'con_handle', 'a5': 'length', 'a6': 'data', 'v11': 'peripheral', 'sub_435A7D': 'gatt_client_prepare_write', 'sub_4316F2': 'provide_context_for_conn_handle_and_start_timer', 'sub_43172F': 'is_ready', 'sub_433AA9': 'gatt_client_run'}"}
asinh_test
d32d4bd2f9b9b772bb1441c7c711fd76113598226ed441dc3954fcb692053573
mirage
ocaml-solo5
NA
static void asinh_test (void) { errno = 0; FUNC(asinh) (0.7L); if (errno == ENOSYS) /* Function not implemented. */ return; init_max_error (); check_float ("asinh (0) == 0", FUNC(asinh) (0), 0, 0, 0, 0); check_float ("asinh (-0) == -0", FUNC(asinh) (minus_zero), minus_zero, 0, 0, 0); #ifndef TEST_INLINE check_float ("asinh (inf) == inf", FUNC(asinh) (plus_infty), plus_infty, 0, 0, 0); check_float ("asinh (-inf) == -inf", FUNC(asinh) (minus_infty), minus_infty, 0, 0, 0); #endif check_float ("asinh (NaN) == NaN", FUNC(asinh) (nan_value), nan_value, 0, 0, 0); check_float ("asinh (0.7) == 0.652666566082355786", FUNC(asinh) (0.7L), 0.652666566082355786L, DELTA34, 0, 0); print_max_error ("asinh", DELTAasinh, 0); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40283A", "function_addr": 4204602, "binary_name": "d32d4bd2f9b9b772bb1441c7c711fd76113598226ed441dc3954fcb692053573.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "call ___errno_location"], [4, "mov dword ptr [rax], 0"], [5, "mov rax, cs:qword_42A000"], [6, "movq xmm0, rax"], [7, "call sub_41A452"], [8, "call ___errno_location"], [9, "mov eax, [rax]"], [10, "cmp eax, 26h "], [11, "jz loc_402A20"], [12, "call sub_4011C2"], [13, "pxor xmm0, xmm0"], [14, "call sub_41A452"], [15, "movq rax, xmm0"], [16, "mov edx, 0"], [17, "mov esi, 0"], [18, "pxor xmm2, xmm2"], [19, "pxor xmm1, xmm1"], [20, "movq xmm0, rax"], [21, "lea rdi, aAsinh00"], [22, "call sub_401AE8"], [23, "movsd xmm3, cs:qword_433940"], [24, "movsd [rbp+var_8], xmm3"], [25, "mov rax, cs:qword_433940"], [26, "movq xmm0, rax"], [27, "call sub_41A452"], [28, "movq rax, xmm0"], [29, "mov edx, 0"], [30, "mov esi, 0"], [31, "pxor xmm2, xmm2"], [32, "movsd xmm1, [rbp+var_8]"], [33, "movq xmm0, rax"], [34, "lea rdi, aAsinh00_0"], [35, "call sub_401AE8"], [36, "movsd xmm4, cs:qword_433950"], [37, "movsd [rbp+var_8], xmm4"], [38, "mov rax, cs:qword_433950"], [39, "movq xmm0, rax"], [40, "call sub_41A452"], [41, "movq rax, xmm0"], [42, "mov edx, 0"], [43, "mov esi, 0"], [44, "pxor xmm2, xmm2"], [45, "movsd xmm1, [rbp+var_8]"], [46, "movq xmm0, rax"], [47, "lea rdi, aAsinhInfInf"], [48, "call sub_401AE8"], [49, "movsd xmm5, cs:qword_433958"], [50, "movsd [rbp+var_8], xmm5"], [51, "mov rax, cs:qword_433958"], [52, "movq xmm0, rax"], [53, "call sub_41A452"], [54, "movq rax, xmm0"], [55, "mov edx, 0"], [56, "mov esi, 0"], [57, "pxor xmm2, xmm2"], [58, "movsd xmm1, [rbp+var_8]"], [59, "movq xmm0, rax"], [60, "lea rdi, aAsinhInfInf_0"], [61, "call sub_401AE8"], [62, "movsd xmm6, cs:qword_433960"], [63, "movsd [rbp+var_8], xmm6"], [64, "mov rax, cs:qword_433960"], [65, "movq xmm0, rax"], [66, "call sub_41A452"], [67, "movq rax, xmm0"], [68, "mov edx, 0"], [69, "mov esi, 0"], [70, "pxor xmm2, xmm2"], [71, "movsd xmm1, [rbp+var_8]"], [72, "movq xmm0, rax"], [73, "lea rdi, aAsinhNanNan"], [74, "call sub_401AE8"], [75, "mov rax, cs:qword_42A000"], [76, "movq xmm0, rax"], [77, "call sub_41A452"], [78, "movq rax, xmm0"], [79, "movsd xmm1, cs:qword_429FB0"], [80, "movsd xmm0, cs:qword_42A040"], [81, "mov edx, 0"], [82, "mov esi, 0"], [83, "movapd xmm2, xmm1"], [84, "movapd xmm1, xmm0"], [85, "movq xmm0, rax"], [86, "lea rdi, aAsinh070652666"], [87, "call sub_401AE8"], [88, "mov esi, 0"], [89, "pxor xmm0, xmm0"], [90, "lea rdi, aAsinh"], [91, "call sub_40141B"], [92, "jmp short locret_402A21"], [93, "nop"], [94, "leave"], [95, "retn"]], "data_dep": [[4, 3], [6, 5], [9, 8], [9, 4], [10, 9], [11, 10], [15, 13], [20, 15], [24, 23], [26, 25], [28, 26], [32, 24], [33, 28], [34, 21], [37, 36], [39, 38], [41, 39], [45, 37], [46, 41], [47, 34], [50, 49], [52, 51], [54, 52], [58, 50], [59, 54], [60, 47], [63, 62], [65, 64], [67, 65], [71, 63], [72, 67], [73, 60], [76, 75], [78, 76], [83, 79], [84, 80], [85, 78], [86, 73], [90, 86], [95, 9], [95, 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/d32d4bd2f9b9b772bb1441c7c711fd76113598226ed441dc3954fcb692053573_d32d4bd2f9b9b772bb1441c7c711fd76113598226ed441dc3954fcb692053573.jsonl.gz", "strip_func_name": "sub_40283A", "query": "\n\n\n__int64 sub_40283A()\n{\n__int64 result; // rax\ndouble v1; // xmm0_8\ndouble v2; // xmm0_8\ndouble v3; // xmm0_8\ndouble v4; // xmm0_8\ndouble v5; // xmm0_8\ndouble v6; // xmm0_8\ndouble v7; // [rsp+8h] [rbp-8h]\ndouble v8; // [rsp+8h] [rbp-8h]\ndouble v9; // [rsp+8h] [rbp-8h]\ndouble v10; // [rsp+8h] [rbp-8h]\n\n*__errno_location() = 0;\nsub_41A452(0.7);\nresult = (unsigned int)*__errno_location();\nif ( (_DWORD)result != 38 )\n{\nsub_4011C2();\nv1 = sub_41A452(0.0);\nsub_401AE8(\"asinh (0) == 0\", 0, 0, v1, 0.0, 0.0);\nv7 = *(double *)&qword_433940;\nv2 = sub_41A452(*(double *)&qword_433940);\nsub_401AE8(\"asinh (-0) == -0\", 0, 0, v2, v7, 0.0);\nv8 = *(double *)&qword_433950;\nv3 = sub_41A452(*(double *)&qword_433950);\nsub_401AE8(\"asinh (inf) == inf\", 0, 0, v3, v8, 0.0);\nv9 = *(double *)&qword_433958;\nv4 = sub_41A452(*(double *)&qword_433958);\nsub_401AE8(\"asinh (-inf) == -inf\", 0, 0, v4, v9, 0.0);\nv10 = *(double *)&qword_433960;\nv5 = sub_41A452(*(double *)&qword_433960);\nsub_401AE8(\"asinh (NaN) == NaN\", 0, 0, v5, v10, 0.0);\nv6 = sub_41A452(0.7);\nsub_401AE8(\"asinh (0.7) == 0.652666566082355786\", 0, 0, v6, 0.6526665660823557, 1.0);\nresult = sub_40141B(\"asinh\", 0, 0.0);\n}\nreturn result;\n}\n\n\n\nQ:[v8,sub_40283A,sub_41A452,sub_4011C2,sub_401AE8,sub_40141B,]\nAssistant: ", "hints": "[]", "response": "{'v8': 'expectedb', 'sub_40283A': 'asinh_test', 'sub_41A452': 'asinh', 'sub_4011C2': 'init_max_error', 'sub_401AE8': 'check_float', 'sub_40141B': 'print_max_error'}"}
worksheet_write_rich_string
904bc715a64912f3c45e58cf4d0dc596e8f09d4e25313a1b7583c9384b19fb40
viest
php-ext-xlswriter
NA
lxw_error worksheet_write_rich_string(lxw_worksheet *self, lxw_row_t row_num, lxw_col_t col_num, lxw_rich_string_tuple *rich_strings[], lxw_format *format) { lxw_cell *cell; int32_t string_id; struct sst_element *sst_element; lxw_error err; uint8_t i; long file_size; char *rich_string = NULL; char *string_copy = NULL; lxw_styles *styles = NULL; lxw_format *default_format = NULL; lxw_rich_string_tuple *rich_string_tuple = NULL; FILE *tmpfile; err = _check_dimensions(self, row_num, col_num, LXW_FALSE, LXW_FALSE); if (err) return err; /* Iterate through rich string fragments to check for input errors. */ i = 0; err = LXW_NO_ERROR; while ((rich_string_tuple = rich_strings[i++]) != NULL) { /* Check for NULL or empty strings. */ if (!rich_string_tuple->string || !*rich_string_tuple->string) { err = LXW_ERROR_PARAMETER_VALIDATION; } } /* If there are less than 2 fragments it isn't a rich string. */ if (i <= 2) err = LXW_ERROR_PARAMETER_VALIDATION; if (err) return err; /* Create a tmp file for the styles object. */ tmpfile = lxw_tmpfile(self->tmpdir); if (!tmpfile) return LXW_ERROR_CREATING_TMPFILE; /* Create a temp styles object for writing the font data. */ styles = lxw_styles_new(); GOTO_LABEL_ON_MEM_ERROR(styles, mem_error); styles->file = tmpfile; /* Create a default format for non-formatted text. */ default_format = lxw_format_new(); GOTO_LABEL_ON_MEM_ERROR(default_format, mem_error); /* Iterate through the rich string fragments and write each one out. */ i = 0; while ((rich_string_tuple = rich_strings[i++]) != NULL) { lxw_xml_start_tag(tmpfile, "r", NULL); if (rich_string_tuple->format) { /* Write the user defined font format. */ lxw_styles_write_rich_font(styles, rich_string_tuple->format); } else { /* Write a default font format. Except for the first fragment. */ if (i > 1) lxw_styles_write_rich_font(styles, default_format); } lxw_styles_write_string_fragment(styles, rich_string_tuple->string); lxw_xml_end_tag(tmpfile, "r"); } /* Free the temp objects. */ lxw_styles_free(styles); lxw_format_free(default_format); /* Flush the file and read the size to calculate the required memory. */ fflush(tmpfile); file_size = ftell(tmpfile); /* Allocate a buffer for the rich string xml data. */ rich_string = calloc(file_size + 1, 1); GOTO_LABEL_ON_MEM_ERROR(rich_string, mem_error); /* Rewind the file and read the data into the memory buffer. */ rewind(tmpfile); if (fread(rich_string, file_size, 1, tmpfile) < 1) { fclose(tmpfile); free(rich_string); return LXW_ERROR_READING_TMPFILE; } /* Close the temp file. */ fclose(tmpfile); if (lxw_utf8_strlen(rich_string) > LXW_STR_MAX) { free(rich_string); return LXW_ERROR_MAX_STRING_LENGTH_EXCEEDED; } if (!self->optimize) { /* Get the SST element and string id. */ sst_element = lxw_get_sst_index(self->sst, rich_string, LXW_TRUE); free(rich_string); if (!sst_element) return LXW_ERROR_SHARED_STRING_INDEX_NOT_FOUND; string_id = sst_element->index; cell = _new_string_cell(row_num, col_num, string_id, sst_element->string, format); } else { /* Look for and escape control chars in the string. */ if (lxw_has_control_characters(rich_string)) { string_copy = lxw_escape_control_characters(rich_string); free(rich_string); } else { string_copy = rich_string; } cell = _new_inline_rich_string_cell(row_num, col_num, string_copy, format); } _insert_cell(self, row_num, col_num, cell); return LXW_NO_ERROR; mem_error: lxw_styles_free(styles); lxw_format_free(default_format); fclose(tmpfile); return LXW_ERROR_MEMORY_MALLOC_FAILED; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41D848", "function_addr": 4315208, "binary_name": "904bc715a64912f3c45e58cf4d0dc596e8f09d4e25313a1b7583c9384b19fb40.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "add rsp, 0FFFFFFFFFFFFFF80h"], [3, "mov [rbp+var_68], rdi"], [4, "mov [rbp+var_6C], esi"], [5, "mov eax, edx"], [6, "mov [rbp+var_78], rcx"], [7, "mov [rbp+var_80], r8"], [8, "mov [rbp+var_70], ax"], [9, "mov [rbp+ptr], 0"], [10, "mov [rbp+var_18], 0"], [11, "mov [rbp+var_30], 0"], [12, "mov [rbp+var_20], 0"], [13, "mov [rbp+var_38], 0"], [14, "movzx edx, [rbp+var_70]"], [15, "mov esi, [rbp+var_6C]"], [16, "mov rax, [rbp+var_68]"], [17, "mov r8d, 0"], [18, "mov ecx, 0"], [19, "mov rdi, rax"], [20, "call sub_40C591"], [21, "mov [rbp+var_C], eax"], [22, "cmp [rbp+var_C], 0"], [23, "jz short loc_41D8BC"], [24, "mov eax, [rbp+var_C]"], [25, "jmp locret_41DC99"], [26, "mov [rbp+var_D], 0"], [27, "mov [rbp+var_C], 0"], [28, "jmp short loc_41D8EC"], [29, "mov rax, [rbp+var_38]"], [30, "mov rax, [rax+8]"], [31, "test rax, rax"], [32, "jz short loc_41D8E5"], [33, "mov rax, [rbp+var_38]"], [34, "mov rax, [rax+8]"], [35, "movzx eax, byte ptr [rax]"], [36, "test al, al"], [37, "jnz short loc_41D8EC"], [38, "mov [rbp+var_C], 0Dh"], [39, "movzx eax, [rbp+var_D]"], [40, "lea edx, [rax+1]"], [41, "mov [rbp+var_D], dl"], [42, "movzx eax, al"], [43, "lea rdx, ds:0[rax*8]"], [44, "mov rax, [rbp+var_78]"], [45, "add rax, rdx"], [46, "mov rax, [rax]"], [47, "mov [rbp+var_38], rax"], [48, "cmp [rbp+var_38], 0"], [49, "jnz short loc_41D8C9"], [50, "cmp [rbp+var_D], 2"], [51, "ja short loc_41D923"], [52, "mov [rbp+var_C], 0Dh"], [53, "cmp [rbp+var_C], 0"], [54, "jz short loc_41D931"], [55, "mov eax, [rbp+var_C]"], [56, "jmp locret_41DC99"], [57, "mov rax, [rbp+var_68]"], [58, "mov rax, [rax+0A8h]"], [59, "mov rdi, rax"], [60, "call sub_43BFEF"], [61, "mov [rbp+stream], rax"], [62, "cmp [rbp+stream], 0"], [63, "jnz short loc_41D959"], [64, "mov eax, 3"], [65, "jmp locret_41DC99"], [66, "call sub_43C0F0"], [67, "mov [rbp+var_30], rax"], [68, "cmp [rbp+var_30], 0"], [69, "jnz short loc_41D991"], [70, "mov rax, cs:stderr"], [71, "mov ecx, 1E57h"], [72, "mov edx, offset aWorksheetC"], [73, "mov esi, offset aErrorSDMemoryA_0"], [74, "mov rdi, rax"], [75, "mov eax, 0"], [76, "call _fprintf"], [77, "jmp loc_41DC70"], [78, "mov rax, [rbp+var_30]"], [79, "mov rdx, [rbp+stream]"], [80, "mov [rax], rdx"], [81, "call sub_403896"], [82, "mov [rbp+var_20], rax"], [83, "cmp [rbp+var_20], 0"], [84, "jnz short loc_41D9D4"], [85, "mov rax, cs:stderr"], [86, "mov ecx, 1E5Ch"], [87, "mov edx, offset aWorksheetC"], [88, "mov esi, offset aErrorSDMemoryA_0"], [89, "mov rdi, rax"], [90, "mov eax, 0"], [91, "call _fprintf"], [92, "jmp loc_41DC70"], [93, "mov [rbp+var_D], 0"], [94, "jmp short loc_41DA55"], [95, "mov rax, [rbp+stream]"], [96, "mov edx, 0"], [97, "mov esi, offset aR"], [98, "mov rdi, rax"], [99, "call sub_4227A4"], [100, "mov rax, [rbp+var_38]"], [101, "mov rax, [rax]"], [102, "test rax, rax"], [103, "jz short loc_41DA14"], [104, "mov rax, [rbp+var_38]"], [105, "mov rdx, [rax]"], [106, "mov rax, [rbp+var_30]"], [107, "mov rsi, rdx"], [108, "mov rdi, rax"], [109, "call sub_43C482"], [110, "jmp short loc_41DA2D"], [111, "cmp [rbp+var_D], 1"], [112, "jbe short loc_41DA2D"], [113, "mov rdx, [rbp+var_20]"], [114, "mov rax, [rbp+var_30]"], [115, "mov rsi, rdx"], [116, "mov rdi, rax"], [117, "call sub_43C482"], [118, "mov rax, [rbp+var_38]"], [119, "mov rdx, [rax+8]"], [120, "mov rax, [rbp+var_30]"], [121, "mov rsi, rdx"], [122, "mov rdi, rax"], [123, "call sub_43C362"], [124, "mov rax, [rbp+stream]"], [125, "mov esi, offset aR"], [126, "mov rdi, rax"], [127, "call sub_42288A"], [128, "movzx eax, [rbp+var_D]"], [129, "lea edx, [rax+1]"], [130, "mov [rbp+var_D], dl"], [131, "movzx eax, al"], [132, "lea rdx, ds:0[rax*8]"], [133, "mov rax, [rbp+var_78]"], [134, "add rax, rdx"], [135, "mov rax, [rax]"], [136, "mov [rbp+var_38], rax"], [137, "cmp [rbp+var_38], 0"], [138, "jnz loc_41D9DA"], [139, "mov rax, [rbp+var_30]"], [140, "mov rdi, rax"], [141, "call sub_43C234"], [142, "mov rax, [rbp+var_20]"], [143, "mov rdi, rax"], [144, "call sub_403BDF"], [145, "mov rax, [rbp+stream]"], [146, "mov rdi, rax"], [147, "call _fflush"], [148, "mov rax, [rbp+stream]"], [149, "mov rdi, rax"], [150, "call _ftell"], [151, "mov [rbp+size], rax"], [152, "mov rax, [rbp+size]"], [153, "add rax, 1"], [154, "mov esi, 1"], [155, "mov rdi, rax"], [156, "call _calloc"], [157, "mov [rbp+ptr], rax"], [158, "cmp [rbp+ptr], 0"], [159, "jnz short loc_41DAFF"], [160, "mov rax, cs:stderr"], [161, "mov ecx, 1E7Bh"], [162, "mov edx, offset aWorksheetC"], [163, "mov esi, offset aErrorSDMemoryA_0"], [164, "mov rdi, rax"], [165, "mov eax, 0"], [166, "call _fprintf"], [167, "jmp loc_41DC70"], [168, "mov rax, [rbp+stream]"], [169, "mov rdi, rax"], [170, "call _rewind"], [171, "mov rsi, [rbp+size]"], [172, "mov rdx, [rbp+stream]"], [173, "mov rax, [rbp+ptr]"], [174, "mov rcx, rdx"], [175, "mov edx, 1"], [176, "mov rdi, rax"], [177, "call _fread"], [178, "test rax, rax"], [179, "jnz short loc_41DB4E"], [180, "mov rax, [rbp+stream]"], [181, "mov rdi, rax"], [182, "call _fclose"], [183, "mov rax, [rbp+ptr]"], [184, "mov rdi, rax"], [185, "call _free"], [186, "mov eax, 4"], [187, "jmp locret_41DC99"], [188, "mov rax, [rbp+stream]"], [189, "mov rdi, rax"], [190, "call _fclose"], [191, "mov rax, [rbp+ptr]"], [192, "mov rdi, rax"], [193, "call sub_43BD64"], [194, "cmp rax, 7FFFh"], [195, "jbe short loc_41DB84"], [196, "mov rax, [rbp+ptr]"], [197, "mov rdi, rax"], [198, "call _free"], [199, "mov eax, 15h"], [200, "jmp locret_41DC99"], [201, "mov rax, [rbp+var_68]"], [202, "movzx eax, byte ptr [rax+0FCh]"], [203, "test al, al"], [204, "jnz short loc_41DC02"], [205, "mov rax, [rbp+var_68]"], [206, "mov rax, [rax+90h]"], [207, "mov rcx, [rbp+ptr]"], [208, "mov edx, 1"], [209, "mov rsi, rcx"], [210, "mov rdi, rax"], [211, "call sub_44D952"], [212, "mov [rbp+var_50], rax"], [213, "mov rax, [rbp+ptr]"], [214, "mov rdi, rax"], [215, "call _free"], [216, "cmp [rbp+var_50], 0"], [217, "jnz short loc_41DBD3"], [218, "mov eax, 16h"], [219, "jmp locret_41DC99"], [220, "mov rax, [rbp+var_50]"], [221, "mov eax, [rax]"], [222, "mov [rbp+var_54], eax"], [223, "mov rax, [rbp+var_50]"], [224, "mov rcx, [rax+8]"], [225, "movzx esi, [rbp+var_70]"], [226, "mov rdi, [rbp+var_80]"], [227, "mov edx, [rbp+var_54]"], [228, "mov eax, [rbp+var_6C]"], [229, "mov r8, rdi"], [230, "mov edi, eax"], [231, "call sub_40BC00"], [232, "mov [rbp+var_8], rax"], [233, "jmp short loc_41DC52"], [234, "mov rax, [rbp+ptr]"], [235, "mov rdi, rax"], [236, "call sub_422C5E"], [237, "test al, al"], [238, "jz short loc_41DC30"], [239, "mov rax, [rbp+ptr]"], [240, "mov rdi, rax"], [241, "call sub_422CAB"], [242, "mov [rbp+var_18], rax"], [243, "mov rax, [rbp+ptr]"], [244, "mov rdi, rax"], [245, "call _free"], [246, "jmp short loc_41DC38"], [247, "mov rax, [rbp+ptr]"], [248, "mov [rbp+var_18], rax"], [249, "movzx esi, [rbp+var_70]"], [250, "mov rcx, [rbp+var_80]"], [251, "mov rdx, [rbp+var_18]"], [252, "mov eax, [rbp+var_6C]"], [253, "mov edi, eax"], [254, "call sub_40BD41"], [255, "mov [rbp+var_8], rax"], [256, "movzx edx, [rbp+var_70]"], [257, "mov rcx, [rbp+var_8]"], [258, "mov esi, [rbp+var_6C]"], [259, "mov rax, [rbp+var_68]"], [260, "mov rdi, rax"], [261, "call sub_40C32F"], [262, "mov eax, 0"], [263, "jmp short locret_41DC99"], [264, "mov rax, [rbp+var_30]"], [265, "mov rdi, rax"], [266, "call sub_43C234"], [267, "mov rax, [rbp+var_20]"], [268, "mov rdi, rax"], [269, "call sub_403BDF"], [270, "mov rax, [rbp+stream]"], [271, "mov rdi, rax"], [272, "call _fclose"], [273, "mov eax, 1"], [274, "leave"], [275, "retn"]], "data_dep": [[8, 5], [14, 8], [15, 4], [16, 3], [19, 16], [21, 20], [22, 21], [23, 22], [24, 21], [29, 47], [30, 29], [31, 30], [32, 31], [33, 47], [34, 33], [35, 34], [36, 35], [37, 36], [39, 26], [39, 41], [40, 43], [40, 14], [40, 39], [41, 40], [42, 39], [43, 40], [44, 6], [45, 43], [45, 44], [46, 45], [47, 46], [48, 47], [49, 48], [50, 41], [51, 50], [53, 27], [53, 52], [53, 38], [54, 53], [55, 52], [55, 38], [55, 27], [57, 3], [58, 57], [59, 58], [61, 60], [62, 61], [63, 62], [67, 66], [68, 67], [69, 68], [74, 70], [78, 67], [79, 61], [80, 78], [80, 79], [82, 81], [83, 82], [84, 83], [89, 85], [95, 61], [98, 95], [100, 136], [101, 80], [101, 100], [102, 101], [103, 102], [104, 136], [105, 104], [105, 80], [106, 67], [107, 105], [108, 106], [111, 130], [112, 111], [113, 82], [114, 67], [115, 113], [116, 114], [118, 136], [119, 80], [119, 118], [120, 67], [121, 119], [122, 120], [124, 61], [126, 124], [128, 130], [128, 93], [129, 128], [129, 79], [129, 119], [129, 80], [130, 129], [131, 128], [132, 129], [133, 6], [134, 133], [134, 132], [135, 80], [135, 134], [136, 135], [137, 136], [138, 137], [139, 67], [140, 139], [142, 82], [143, 142], [145, 61], [146, 145], [148, 61], [149, 148], [151, 150], [152, 151], [153, 152], [155, 153], [157, 156], [158, 157], [159, 158], [164, 160], [168, 61], [169, 168], [171, 151], [172, 61], [173, 157], [174, 172], [176, 173], [178, 177], [179, 178], [180, 61], [181, 180], [183, 157], [184, 183], [188, 61], [189, 188], [191, 157], [192, 191], [194, 193], [195, 194], [196, 157], [197, 196], [201, 3], [202, 80], [202, 201], [203, 202], [204, 203], [205, 3], [206, 205], [206, 80], [207, 157], [209, 207], [210, 206], [212, 211], [213, 157], [214, 213], [216, 212], [217, 216], [220, 212], [221, 80], [221, 220], [222, 221], [223, 212], [224, 80], [224, 223], [225, 8], [226, 7], [227, 222], [228, 4], [229, 226], [230, 228], [232, 231], [234, 157], [235, 234], [237, 236], [238, 237], [239, 157], [240, 239], [242, 241], [243, 157], [244, 243], [247, 157], [248, 247], [249, 8], [250, 7], [251, 242], [251, 248], [252, 4], [253, 252], [255, 254], [256, 8], [257, 255], [257, 232], [258, 4], [259, 3], [260, 259], [264, 67], [265, 264], [267, 12], [267, 82], [268, 267], [270, 61], [271, 270], [275, 273], [275, 218], [275, 186], [275, 199], [275, 55], [275, 64], [275, 262], [275, 24]]}
{"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/904bc715a64912f3c45e58cf4d0dc596e8f09d4e25313a1b7583c9384b19fb40_904bc715a64912f3c45e58cf4d0dc596e8f09d4e25313a1b7583c9384b19fb40.jsonl.gz", "strip_func_name": "sub_41D848", "query": "\n\n\n__int64 __fastcall sub_41D848(__int64 a1, unsigned int a2, __int16 a3, __int64 a4, __int64 a5)\n{\nunsigned __int8 v6; // al\nunsigned __int8 v7; // al\n__int64 v11; // [rsp+30h] [rbp-50h]\n__int64 size; // [rsp+38h] [rbp-48h]\nFILE *stream; // [rsp+40h] [rbp-40h]\n__int64 v14; // [rsp+48h] [rbp-38h]\n_QWORD *v15; // [rsp+48h] [rbp-38h]\nFILE **v16; // [rsp+50h] [rbp-30h]\nvoid *ptr; // [rsp+58h] [rbp-28h]\n_QWORD *v18; // [rsp+60h] [rbp-20h]\n__int64 v19; // [rsp+68h] [rbp-18h]\nunsigned __int8 v20; // [rsp+73h] [rbp-Dh]\nunsigned __int8 v21; // [rsp+73h] [rbp-Dh]\nunsigned int v22; // [rsp+74h] [rbp-Ch]\nunsigned int v23; // [rsp+74h] [rbp-Ch]\n_WORD *v24; // [rsp+78h] [rbp-8h]\n_WORD *v25; // [rsp+78h] [rbp-8h]\n\nv18 = 0LL;\nv22 = sub_40C591(a1, a2, a3, 0, 0);\nif ( v22 )\nreturn v22;\nv20 = 0;\nv23 = 0;\nwhile ( 1 )\n{\nv6 = v20++;\nv14 = *(_QWORD *)(8LL * v6 + a4);\nif ( !v14 )\nbreak;\nif ( !*(_QWORD *)(v14 + 8) || !**(_BYTE **)(v14 + 8) )\nv23 = 13;\n}\nif ( v20 <= 2u )\nv23 = 13;\nif ( v23 )\nreturn v23;\nstream = (FILE *)sub_43BFEF(*(_QWORD *)(a1 + 168));\nif ( !stream )\nreturn 3LL;\nv16 = (FILE **)sub_43C0F0();\nif ( !v16 )\n{\nfprintf(stderr, \"[ERROR][%s:%d]: Memory allocation failed.\\n\", \"worksheet.c\", 7767LL);\nLABEL_40:\nsub_43C234(v16);\nsub_403BDF(v18);\nfclose(stream);\nreturn 1LL;\n}\n*v16 = stream;\nv18 = sub_403896();\nif ( !v18 )\n{\nfprintf(stderr, \"[ERROR][%s:%d]: Memory allocation failed.\\n\", \"worksheet.c\", 7772LL);\ngoto LABEL_40;\n}\nv21 = 0;\nwhile ( 1 )\n{\nv7 = v21++;\nv15 = *(_QWORD **)(8LL * v7 + a4);\nif ( !v15 )\nbreak;\nsub_4227A4(stream, \"r\", 0LL);\nif ( *v15 )\n{\nsub_43C482(v16, *v15);\n}\nelse if ( v21 > 1u )\n{\nsub_43C482(v16, v18);\n}\nsub_43C362(v16, v15[1]);\nsub_42288A(stream, \"r\");\n}\nsub_43C234(v16);\nsub_403BDF(v18);\nfflush(stream);\nsize = ftell(stream);\nptr = calloc(size + 1, 1uLL);\nif ( !ptr )\n{\nfprintf(stderr, \"[ERROR][%s:%d]: Memory allocation failed.\\n\", \"worksheet.c\", 7803LL);\ngoto LABEL_40;\n}\nrewind(stream);\nif ( !fread(ptr, size, 1uLL, stream) )\n{\nfclose(stream);\nfree(ptr);\nreturn 4LL;\n}\nfclose(stream);\nif ( (unsigned __int64)sub_43BD64(ptr) > 0x7FFF )\n{\nfree(ptr);\nreturn 21LL;\n}\nif ( *(_BYTE *)(a1 + 252) )\n{\nif ( (unsigned __int8)sub_422C5E(ptr) )\n{\nv19 = sub_422CAB(ptr);\nfree(ptr);\n}\nelse\n{\nv19 = (__int64)ptr;\n}\nv25 = sub_40BD41(a2, a3, v19, a5);\nsub_40C32F(a1, a2, a3, (__int64)v25);\n}\nelse\n{\nv11 = sub_44D952(*(_QWORD *)(a1 + 144), ptr, 1LL);\nfree(ptr);\nif ( !v11 )\nreturn 22LL;\nv24 = sub_40BC00(a2, a3, *(_DWORD *)v11, *(_QWORD *)(v11 + 8), a5);\nsub_40C32F(a1, a2, a3, (__int64)v24);\n}\nreturn 0LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v11,size,stream,v14,v16,ptr,v18,v19,v20,v22,v24,sub_41D848,sub_40C591,sub_43BFEF,sub_43C0F0,sub_43C234,sub_403BDF,sub_403896,sub_4227A4,sub_43C482,sub_43C362,sub_42288A,sub_43BD64,sub_422C5E,sub_422CAB,sub_40BD41,sub_40C32F,sub_44D952,sub_40BC00,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'col_num', 'a4': 'rich_strings', 'a1': 'self', 'a2': 'row_num', 'a5': 'format', 'v11': 'sst_element', 'size': 'file_size', 'stream': 'tmpfile', 'v14': 'rich_string_tuple', 'v16': 'styles', 'ptr': 'rich_string', 'v18': 'default_format', 'v19': 'string_copy', 'v20': 'ia', 'v22': 'erra', 'v24': 'cell', 'sub_41D848': 'worksheet_write_rich_string', 'sub_40C591': '_check_dimensions', 'sub_43BFEF': 'lxw_tmpfile', 'sub_43C0F0': 'lxw_styles_new', 'sub_43C234': 'lxw_styles_free', 'sub_403BDF': 'lxw_format_free', 'sub_403896': 'lxw_format_new', 'sub_4227A4': 'lxw_xml_start_tag', 'sub_43C482': 'lxw_styles_write_rich_font', 'sub_43C362': 'lxw_styles_write_string_fragment', 'sub_42288A': 'lxw_xml_end_tag', 'sub_43BD64': 'lxw_utf8_strlen', 'sub_422C5E': 'lxw_has_control_characters', 'sub_422CAB': 'lxw_escape_control_characters', 'sub_40BD41': '_new_inline_rich_string_cell', 'sub_40C32F': '_insert_cell', 'sub_44D952': 'lxw_get_sst_index', 'sub_40BC00': '_new_string_cell'}"}
mesh_proxy_stop_advertising_with_node_id
1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca
micropython
micropython-unicorn
NA
void mesh_proxy_stop_advertising_with_node_id(void){ mesh_proxy_stop_all_advertising_with_node_id(); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4404FE", "function_addr": 4457726, "binary_name": "1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "call sub_4401B2"], [3, "nop"], [4, "pop rbp"], [5, "retn"]], "data_dep": [[4, 0], [5, 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/1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca_1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca.jsonl.gz", "strip_func_name": "sub_4404FE", "query": "\n\n\n__int64 __fastcall sub_4404FE(__int64 a1, __int64 a2)\n{\nreturn sub_4401B2(a1, a2);\n}\n\n\n\nQ:[sub_4404FE,sub_4401B2,]\nAssistant: ", "hints": "[]", "response": "{'sub_4404FE': 'mesh_proxy_stop_advertising_with_node_id', 'sub_4401B2': 'mesh_proxy_stop_all_advertising_with_node_id'}"}
fpart
137c009bbd0be3a08dc21ce9f8d19526141bdf0b9d4e92e9967c13c9d88d6324
e-n-f
datamaps
NA
static double fpart(double x) { return x - floor(x); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_409E09", "function_addr": 4234761, "binary_name": "137c009bbd0be3a08dc21ce9f8d19526141bdf0b9d4e92e9967c13c9d88d6324.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "movsd [rbp+x], xmm0"], [4, "mov rax, [rbp+x]"], [5, "movq xmm0, rax"], [6, "call _floor"], [7, "movsd xmm1, [rbp+x]"], [8, "subsd xmm1, xmm0"], [9, "movq rax, xmm1"], [10, "movq xmm0, rax"], [11, "leave"], [12, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 3], [8, 7], [8, 5], [9, 8], [10, 9], [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/137c009bbd0be3a08dc21ce9f8d19526141bdf0b9d4e92e9967c13c9d88d6324_137c009bbd0be3a08dc21ce9f8d19526141bdf0b9d4e92e9967c13c9d88d6324.jsonl.gz", "strip_func_name": "sub_409E09", "query": "\n\n\ndouble __fastcall sub_409E09(double a1)\n{\nreturn a1 - floor(a1);\n}\n\n\n\nQ:[a1,sub_409E09,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'x', 'sub_409E09': 'fpart'}"}
sl_bt_nvm_save
622d1151c44212015e375d58327ed96a2cddfd862379acfce0fd9f66455e1219
openthread
ot-efr32
NA
sl_status_t sl_bt_nvm_save(uint16_t key, size_t value_len, const uint8_t* value) { 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; cmd->data.cmd_nvm_save.key=key; if ((3+value_len) > SL_BGAPI_MAX_PAYLOAD_SIZE ) { return SL_STATUS_COMMAND_TOO_LONG; } cmd->data.cmd_nvm_save.value.len=value_len; memcpy(cmd->data.cmd_nvm_save.value.data,value,value_len); cmd->header=sl_bt_cmd_nvm_save_id+(((3+value_len)&0xff)<<8)+(((3+value_len)&0x700)>>8); sl_bt_host_handle_command(); return rsp->data.rsp_nvm_save.result; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_410BCD", "function_addr": 4262861, "binary_name": "622d1151c44212015e375d58327ed96a2cddfd862379acfce0fd9f66455e1219.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov eax, edi"], [4, "mov [rbp+n], rsi"], [5, "mov [rbp+src], rdx"], [6, "mov [rbp+var_14], ax"], [7, "mov rax, cs:off_41C320"], [8, "mov [rbp+var_8], rax"], [9, "mov rax, cs:off_41C328"], [10, "mov [rbp+var_10], rax"], [11, "mov rax, [rbp+var_8]"], [12, "movzx edx, [rbp+var_14]"], [13, "mov [rax+4], dx"], [14, "mov rax, [rbp+n]"], [15, "add rax, 3"], [16, "cmp rax, 100h"], [17, "jbe short loc_410C1C"], [18, "mov eax, 49h "], [19, "jmp short locret_410C83"], [20, "mov rax, [rbp+n]"], [21, "mov edx, eax"], [22, "mov rax, [rbp+var_8]"], [23, "mov [rax+6], dl"], [24, "mov rax, [rbp+var_8]"], [25, "lea rcx, [rax+7]"], [26, "mov rdx, [rbp+n]"], [27, "mov rax, [rbp+src]"], [28, "mov rsi, rax"], [29, "mov rdi, rcx"], [30, "call _memcpy"], [31, "mov rax, [rbp+n]"], [32, "add eax, 3"], [33, "shl eax, 8"], [34, "movzx edx, ax"], [35, "mov rax, [rbp+n]"], [36, "add rax, 3"], [37, "shr rax, 8"], [38, "and eax, 7"], [39, "add eax, edx"], [40, "lea edx, [rax+20D0020h]"], [41, "mov rax, [rbp+var_8]"], [42, "mov [rax], edx"], [43, "mov eax, 0"], [44, "call sub_40C4CE"], [45, "mov rax, [rbp+var_10]"], [46, "movzx eax, word ptr [rax+4]"], [47, "movzx eax, ax"], [48, "leave"], [49, "retn"]], "data_dep": [[6, 3], [8, 7], [10, 9], [11, 8], [12, 6], [13, 11], [13, 12], [14, 4], [15, 14], [16, 15], [17, 16], [20, 4], [21, 20], [22, 8], [23, 22], [23, 21], [24, 8], [25, 23], [25, 24], [26, 4], [27, 5], [28, 27], [29, 25], [31, 4], [32, 31], [33, 32], [34, 33], [35, 4], [36, 35], [37, 36], [38, 37], [39, 38], [39, 34], [40, 23], [40, 34], [40, 39], [41, 8], [42, 41], [42, 40], [45, 10], [46, 42], [46, 45], [46, 13], [47, 46], [49, 47], [49, 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/622d1151c44212015e375d58327ed96a2cddfd862379acfce0fd9f66455e1219_622d1151c44212015e375d58327ed96a2cddfd862379acfce0fd9f66455e1219.jsonl.gz", "strip_func_name": "sub_410BCD", "query": "\n\n\n__int64 __fastcall sub_410BCD(__int16 a1, size_t a2, const void *a3)\n{\nunsigned __int16 *v5; // [rsp+20h] [rbp-10h]\nchar *v6; // [rsp+28h] [rbp-8h]\n\nv6 = (char *)off_41C320;\nv5 = (unsigned __int16 *)off_41C328;\n*((_WORD *)off_41C320 + 2) = a1;\nif ( a2 + 3 > 0x100 )\nreturn 73LL;\nv6[6] = a2;\nmemcpy(v6 + 7, a3, a2);\n*(_DWORD *)v6 = (unsigned __int16)(((_WORD)a2 + 3) << 8) + (((a2 + 3) >> 8) & 7) + 34406432;\nsub_40C4CE(v6 + 7, a3);\nreturn v5[2];\n}\n\n\n\nQ:[a3,a1,a2,v5,v6,sub_410BCD,sub_40C4CE,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'value', 'a1': 'key', 'a2': 'value_len', 'v5': 'rsp_0', 'v6': 'cmd', 'sub_410BCD': 'sl_bt_nvm_save', 'sub_40C4CE': 'sl_bt_host_handle_command'}"}
write_file
81626df9eced6d1674882ffef046ff6e78469b441e70bb8eae6fec403812f036
thoughtpolice
minibsdiff
NA
static void write_file(const char* f, u_char* buf, long sz) { FILE* fp; if ( ((fp = fopen(f, "w+b")) == NULL) || (fwrite(buf, 1, sz, fp) != (size_t)sz) || (fclose(fp) != 0) ) barf("Couldn't open file for writing!\n"); return; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40364F", "function_addr": 4208207, "binary_name": "81626df9eced6d1674882ffef046ff6e78469b441e70bb8eae6fec403812f036.elf_extract.pkl\n"}, "code": [[0, "sub rsp, 38h"], [1, "mov [rsp+38h+filename], rdi"], [2, "mov [rsp+38h+ptr], rsi"], [3, "mov [rsp+38h+n], rdx"], [4, "mov rax, [rsp+38h+filename]"], [5, "mov esi, offset aWB"], [6, "mov rdi, rax"], [7, "call _fopen"], [8, "mov [rsp+38h+s], rax"], [9, "cmp [rsp+38h+s], 0"], [10, "jz short loc_4036B8"], [11, "mov rdx, [rsp+38h+n]"], [12, "mov rcx, [rsp+38h+s]"], [13, "mov rax, [rsp+38h+ptr]"], [14, "mov esi, 1"], [15, "mov rdi, rax"], [16, "call _fwrite"], [17, "mov rdx, [rsp+38h+n]"], [18, "cmp rax, rdx"], [19, "jnz short loc_4036B8"], [20, "mov rax, [rsp+38h+s]"], [21, "mov rdi, rax"], [22, "call _fclose"], [23, "test eax, eax"], [24, "jz short loc_4036C3"], [25, "mov edi, offset aCouldnTOpenFil_0"], [26, "call sub_4034EF"], [27, "nop"], [28, "add rsp, 38h"], [29, "retn"]], "data_dep": [[4, 1], [6, 4], [8, 7], [9, 8], [10, 9], [11, 3], [12, 8], [13, 2], [15, 13], [17, 3], [18, 17], [18, 16], [19, 18], [20, 8], [21, 20], [23, 22], [24, 23], [28, 0], [29, 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/81626df9eced6d1674882ffef046ff6e78469b441e70bb8eae6fec403812f036_81626df9eced6d1674882ffef046ff6e78469b441e70bb8eae6fec403812f036.jsonl.gz", "strip_func_name": "sub_40364F", "query": "\n\n\nint __fastcall sub_40364F(const char *a1, const void *a2, size_t a3)\n{\nint result; // eax\nFILE *s; // [rsp+28h] [rbp-10h]\n\ns = fopen(a1, \"w+b\");\nif ( !s || fwrite(a2, 1uLL, a3, s) != a3 || (result = fclose(s)) != 0 )\nsub_4034EF(\"Couldn't open file for writing!\\n\");\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,s,sub_40364F,sub_4034EF,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'sz', 'a1': 'f', 'a2': 'buf', 's': 'fp', 'sub_40364F': 'write_file', 'sub_4034EF': 'barf'}"}
ZBUFFv06_freeDCtx
865724ebdf8f31c695b0022cc64ebcc76b491dfcaf7d0e9f4ffca1890f30b8c6
facebook
zstd
NA
size_t ZBUFFv06_freeDCtx(ZBUFFv06_DCtx* zbd) { if (zbd==NULL) return 0; /* support free on null */ ZSTDv06_freeDCtx(zbd->zd); free(zbd->inBuff); free(zbd->outBuff); free(zbd); return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4CD978", "function_addr": 5036408, "binary_name": "865724ebdf8f31c695b0022cc64ebcc76b491dfcaf7d0e9f4ffca1890f30b8c6.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+ptr], rdi"], [4, "cmp [rbp+ptr], 0"], [5, "jnz short loc_4CD992"], [6, "mov eax, 0"], [7, "jmp short locret_4CD9D2"], [8, "mov rax, [rbp+ptr]"], [9, "mov rax, [rax]"], [10, "mov rdi, rax"], [11, "call sub_4CB16B"], [12, "mov rax, [rbp+ptr]"], [13, "mov rax, [rax+20h]"], [14, "mov rdi, rax"], [15, "call _free"], [16, "mov rax, [rbp+ptr]"], [17, "mov rax, [rax+38h]"], [18, "mov rdi, rax"], [19, "call _free"], [20, "mov rax, [rbp+ptr]"], [21, "mov rdi, rax"], [22, "call _free"], [23, "mov eax, 0"], [24, "leave"], [25, "retn"]], "data_dep": [[4, 3], [5, 4], [8, 3], [9, 8], [10, 9], [12, 3], [13, 12], [14, 13], [16, 3], [17, 16], [18, 17], [20, 3], [21, 20], [25, 23], [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/865724ebdf8f31c695b0022cc64ebcc76b491dfcaf7d0e9f4ffca1890f30b8c6_865724ebdf8f31c695b0022cc64ebcc76b491dfcaf7d0e9f4ffca1890f30b8c6.jsonl.gz", "strip_func_name": "sub_4CD978", "query": "\n\n\n__int64 __fastcall sub_4CD978(void **a1)\n{\nif ( a1 )\n{\nsub_4CB16B(*a1);\nfree(a1[4]);\nfree(a1[7]);\nfree(a1);\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,sub_4CD978,sub_4CB16B,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'zbd', 'sub_4CD978': 'ZBUFFv06_freeDCtx', 'sub_4CB16B': 'ZSTDv06_freeDCtx'}"}
h_chrlength_init
f88812617d4ad611df60e23779336e62c3d21bb75797d1fab2528abe121a9c6f
shiquan
bamdst
NA
void h_chrlength_init() { h_chrlen = kh_init(chr); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403BF1", "function_addr": 4209649, "binary_name": "f88812617d4ad611df60e23779336e62c3d21bb75797d1fab2528abe121a9c6f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "call sub_4031B6"], [3, "mov cs:qword_425958, rax"], [4, "nop"], [5, "pop rbp"], [6, "retn"]], "data_dep": [[3, 2], [5, 0], [6, 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/f88812617d4ad611df60e23779336e62c3d21bb75797d1fab2528abe121a9c6f_f88812617d4ad611df60e23779336e62c3d21bb75797d1fab2528abe121a9c6f.jsonl.gz", "strip_func_name": "sub_403BF1", "query": "\n\n\nvoid *sub_403BF1()\n{\nvoid *result; // rax\n\nresult = sub_4031B6();\nqword_425958 = (__int64)result;\nreturn result;\n}\n\n\n\nQ:[sub_403BF1,sub_4031B6,]\nAssistant: ", "hints": "[]", "response": "{'sub_403BF1': 'h_chrlength_init', 'sub_4031B6': 'kh_init_chr'}"}
count_graphics
6e348e984bd63ac982d83dafa4e61fb9925c759b418264e141a667eb3a0dba17
RTimothyEdwards
XCircuit
NA
void count_graphics(objectptr thisobj, short *glist) { genericptr *ge; graphicptr gp; Imagedata *iptr; int i; for (ge = thisobj->plist; ge < thisobj->plist + thisobj->parts; ge++) { if (IS_GRAPHIC(*ge)) { gp = TOGRAPHIC(ge); for (i = 0; i < xobjs.images; i++) { iptr = xobjs.imagelist + i; if (iptr->image == gp->source) { glist[i]++; } } } else if (IS_OBJINST(*ge)) { count_graphics(TOOBJINST(ge)->thisobject, glist); } } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_447021", "function_addr": 4485153, "binary_name": "6e348e984bd63ac982d83dafa4e61fb9925c759b418264e141a667eb3a0dba17.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_30], rsi"], [5, "mov rax, [rbp+var_28]"], [6, "mov rax, [rax+68h]"], [7, "mov [rbp+var_8], rax"], [8, "jmp loc_447104"], [9, "mov rax, [rbp+var_8]"], [10, "mov rax, [rax]"], [11, "movzx eax, word ptr [rax]"], [12, "movzx eax, ax"], [13, "and eax, 1FFh"], [14, "cmp eax, 40h "], [15, "jnz short loc_4470CE"], [16, "mov rax, [rbp+var_8]"], [17, "mov rax, [rax]"], [18, "mov [rbp+var_18], rax"], [19, "mov [rbp+var_C], 0"], [20, "jmp short loc_4470BF"], [21, "mov rcx, cs:qword_4E6C28"], [22, "mov eax, [rbp+var_C]"], [23, "movsxd rdx, eax"], [24, "mov rax, rdx"], [25, "add rax, rax"], [26, "add rax, rdx"], [27, "shl rax, 3"], [28, "add rax, rcx"], [29, "mov [rbp+var_20], rax"], [30, "mov rax, [rbp+var_20]"], [31, "mov rdx, [rax]"], [32, "mov rax, [rbp+var_18]"], [33, "mov rax, [rax+20h]"], [34, "cmp rdx, rax"], [35, "jnz short loc_4470BB"], [36, "mov eax, [rbp+var_C]"], [37, "cdqe"], [38, "lea rdx, [rax+rax]"], [39, "mov rax, [rbp+var_30]"], [40, "add rax, rdx"], [41, "movzx edx, word ptr [rax]"], [42, "add edx, 1"], [43, "mov [rax], dx"], [44, "add [rbp+var_C], 1"], [45, "movzx eax, cs:word_4E6C30"], [46, "cwde"], [47, "cmp [rbp+var_C], eax"], [48, "jl short loc_44706D"], [49, "jmp short loc_4470FF"], [50, "mov rax, [rbp+var_8]"], [51, "mov rax, [rax]"], [52, "movzx eax, word ptr [rax]"], [53, "movzx eax, ax"], [54, "and eax, 1FFh"], [55, "cmp eax, 1"], [56, "jnz short loc_4470FF"], [57, "mov rax, [rbp+var_8]"], [58, "mov rax, [rax]"], [59, "mov rax, [rax+20h]"], [60, "mov rdx, [rbp+var_30]"], [61, "mov rsi, rdx"], [62, "mov rdi, rax"], [63, "call sub_447021"], [64, "add [rbp+var_8], 8"], [65, "mov rax, [rbp+var_28]"], [66, "mov rdx, [rax+68h]"], [67, "mov rax, [rbp+var_28]"], [68, "movzx eax, word ptr [rax+64h]"], [69, "movsx rax, ax"], [70, "shl rax, 3"], [71, "add rax, rdx"], [72, "cmp [rbp+var_8], rax"], [73, "jb loc_447042"], [74, "nop"], [75, "nop"], [76, "leave"], [77, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [9, 7], [9, 64], [10, 43], [10, 9], [11, 43], [11, 10], [12, 11], [13, 12], [14, 13], [15, 14], [16, 7], [16, 64], [17, 16], [17, 43], [18, 17], [22, 44], [22, 19], [23, 22], [24, 23], [25, 24], [26, 23], [26, 25], [27, 26], [28, 21], [28, 27], [29, 28], [30, 29], [31, 30], [31, 43], [32, 18], [33, 32], [33, 43], [34, 31], [34, 33], [35, 34], [36, 44], [36, 19], [38, 43], [38, 36], [38, 31], [39, 4], [40, 38], [40, 39], [41, 40], [41, 43], [42, 41], [43, 40], [43, 42], [44, 44], [44, 19], [47, 45], [47, 44], [47, 19], [48, 47], [50, 7], [50, 64], [51, 50], [51, 43], [52, 51], [52, 43], [53, 52], [54, 53], [55, 54], [56, 55], [57, 7], [57, 64], [58, 57], [58, 43], [59, 43], [59, 58], [60, 4], [61, 60], [62, 59], [64, 7], [64, 64], [65, 3], [66, 43], [66, 65], [67, 3], [68, 43], [68, 67], [69, 68], [70, 69], [71, 66], [71, 70], [72, 7], [72, 71], [72, 64], [73, 72], [77, 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/6e348e984bd63ac982d83dafa4e61fb9925c759b418264e141a667eb3a0dba17_6e348e984bd63ac982d83dafa4e61fb9925c759b418264e141a667eb3a0dba17.jsonl.gz", "strip_func_name": "sub_447021", "query": "\n\n\nunsigned __int64 __fastcall sub_447021(__int64 a1, __int64 a2)\n{\nunsigned __int64 result; // rax\n__int64 v3; // [rsp+18h] [rbp-18h]\nint j; // [rsp+24h] [rbp-Ch]\nunsigned __int64 i; // [rsp+28h] [rbp-8h]\n\nfor ( i = *(_QWORD *)(a1 + 104); ; i += 8LL )\n{\nresult = *(_QWORD *)(a1 + 104) + 8LL * *(__int16 *)(a1 + 100);\nif ( i >= result )\nbreak;\nif ( (**(_WORD **)i & 0x1FF) == 64 )\n{\nv3 = *(_QWORD *)i;\nfor ( j = 0; j < word_4E6C30; ++j )\n{\nif ( *((_QWORD *)qword_4E6C28 + 3 * j) == *(_QWORD *)(v3 + 32) )\n++*(_WORD *)(2LL * j + a2);\n}\n}\nelse if ( (**(_WORD **)i & 0x1FF) == 1 )\n{\nsub_447021(*(_QWORD *)(*(_QWORD *)i + 32LL), a2);\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v3,i,sub_447021,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'thisobj', 'a2': 'glist', 'v3': 'gp', 'i': 'ge', 'sub_447021': 'count_graphics'}"}
ResetCategoryList
76c05f321c4703deb67fa538c2cf508c66723817fc1ebd22a9f48d40487c4c60
Wiimm
wiimms-szs-tools
NA
void ResetCategoryList ( mkw_category_list_t *clist ) { if (clist) { if (clist->list) { mkw_category_t *ptr = clist->list; for ( int i = 0; i < clist->used; i++, ptr++ ) { FreeString(ptr->name); FreeString(ptr->info); FreeString(ptr->attrib); } FREE((void*)clist->list); } ResetKTM(&clist->atm); memset(clist,0,sizeof(*clist)); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_488085", "function_addr": 4751493, "binary_name": "76c05f321c4703deb67fa538c2cf508c66723817fc1ebd22a9f48d40487c4c60.elf_extract.pkl\n"}, "code": [[0, "sub rsp, 28h"], [1, "mov [rsp+28h+s], rdi"], [2, "cmp [rsp+28h+s], 0"], [3, "jz loc_488142"], [4, "mov rax, [rsp+28h+s]"], [5, "mov rax, [rax]"], [6, "test rax, rax"], [7, "jz short loc_48811A"], [8, "mov rax, [rsp+28h+s]"], [9, "mov rax, [rax]"], [10, "mov [rsp+28h+var_10], rax"], [11, "mov [rsp+28h+var_14], 0"], [12, "jmp short loc_4880FC"], [13, "mov rax, [rsp+28h+var_10]"], [14, "mov rax, [rax+28h]"], [15, "mov rdi, rax"], [16, "call sub_4096F1"], [17, "mov rax, [rsp+28h+var_10]"], [18, "mov rax, [rax+30h]"], [19, "mov rdi, rax"], [20, "call sub_4096F1"], [21, "mov rax, [rsp+28h+var_10]"], [22, "mov rax, [rax+38h]"], [23, "mov rdi, rax"], [24, "call sub_4096F1"], [25, "add [rsp+28h+var_14], 1"], [26, "add [rsp+28h+var_10], 40h "], [27, "mov rax, [rsp+28h+s]"], [28, "mov eax, [rax+8]"], [29, "cmp [rsp+28h+var_14], eax"], [30, "jl short loc_4880BE"], [31, "mov rax, [rsp+28h+s]"], [32, "mov rax, [rax]"], [33, "mov rdi, rax"], [34, "call sub_42B939"], [35, "mov rax, [rsp+28h+s]"], [36, "add rax, 10h"], [37, "mov rdi, rax"], [38, "call sub_4175BA"], [39, "mov rax, [rsp+28h+s]"], [40, "mov edx, 30h "], [41, "mov esi, 0"], [42, "mov rdi, rax"], [43, "call _memset"], [44, "nop"], [45, "add rsp, 28h"], [46, "retn"]], "data_dep": [[2, 1], [3, 2], [4, 1], [5, 4], [6, 5], [7, 6], [8, 1], [9, 8], [10, 9], [13, 26], [13, 10], [14, 13], [15, 14], [17, 26], [17, 10], [18, 17], [19, 18], [21, 10], [21, 26], [22, 21], [23, 22], [25, 25], [25, 11], [26, 26], [26, 10], [27, 1], [28, 27], [29, 25], [29, 28], [29, 11], [30, 29], [31, 1], [32, 31], [33, 32], [35, 1], [36, 35], [37, 36], [39, 1], [42, 39], [45, 0], [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/76c05f321c4703deb67fa538c2cf508c66723817fc1ebd22a9f48d40487c4c60_76c05f321c4703deb67fa538c2cf508c66723817fc1ebd22a9f48d40487c4c60.jsonl.gz", "strip_func_name": "sub_488085", "query": "\n\n\nvoid *__fastcall sub_488085(__int64 a1)\n{\nvoid *result; // rax\nint i; // [rsp+14h] [rbp-14h]\nvoid **v3; // [rsp+18h] [rbp-10h]\n\nif ( a1 )\n{\nif ( *(_QWORD *)a1 )\n{\nv3 = *(void ***)a1;\nfor ( i = 0; i < *(_DWORD *)(a1 + 8); ++i )\n{\nsub_4096F1(v3[5]);\nsub_4096F1(v3[6]);\nsub_4096F1(v3[7]);\nv3 += 8;\n}\nsub_42B939(*(void **)a1);\n}\nsub_4175BA((_DWORD *)(a1 + 16));\nresult = memset((void *)a1, 0, 0x30uLL);\n}\nreturn result;\n}\n\n\n\nQ:[a1,v3,sub_488085,sub_4096F1,sub_42B939,sub_4175BA,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'clist', 'v3': 'ptr', 'sub_488085': 'ResetCategoryList', 'sub_4096F1': 'FreeString', 'sub_42B939': 'dclib_free', 'sub_4175BA': 'ResetKTM'}"}
ghash_block
ea672c4d8754079dabb6e661f855a53b24d6814bd733effe75b75e97119be4ce
h2o
picotls
NA
static void ghash_block(void *vctx, const uint8_t *data) { ghash_ctx *ctx = vctx; cf_gf128 gfdata; cf_gf128_frombytes_be(data, gfdata); cf_gf128_add(gfdata, ctx->Y, ctx->Y); cf_gf128_mul(ctx->Y, ctx->H, ctx->Y); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40950E", "function_addr": 4232462, "binary_name": "ea672c4d8754079dabb6e661f855a53b24d6814bd733effe75b75e97119be4ce.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_30], rsi"], [5, "mov rax, [rbp+var_28]"], [6, "mov [rbp+var_8], rax"], [7, "lea rdx, [rbp+var_20]"], [8, "mov rax, [rbp+var_30]"], [9, "mov rsi, rdx"], [10, "mov rdi, rax"], [11, "call sub_4061D5"], [12, "mov rax, [rbp+var_8]"], [13, "lea rdx, [rax+10h]"], [14, "mov rax, [rbp+var_8]"], [15, "lea rcx, [rax+10h]"], [16, "lea rax, [rbp+var_20]"], [17, "mov rsi, rcx"], [18, "mov rdi, rax"], [19, "call sub_40642A"], [20, "mov rax, [rbp+var_8]"], [21, "lea rdx, [rax+10h]"], [22, "mov rax, [rbp+var_8]"], [23, "mov rcx, [rbp+var_8]"], [24, "add rcx, 10h"], [25, "mov rsi, rax"], [26, "mov rdi, rcx"], [27, "call sub_4064B1"], [28, "nop"], [29, "leave"], [30, "retn"]], "data_dep": [[5, 3], [6, 5], [8, 4], [9, 7], [10, 8], [12, 6], [13, 7], [13, 12], [14, 6], [15, 14], [16, 14], [17, 15], [18, 16], [20, 6], [21, 13], [21, 20], [22, 6], [23, 6], [24, 23], [25, 22], [26, 24], [30, 27]]}
{"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/ea672c4d8754079dabb6e661f855a53b24d6814bd733effe75b75e97119be4ce_ea672c4d8754079dabb6e661f855a53b24d6814bd733effe75b75e97119be4ce.jsonl.gz", "strip_func_name": "sub_40950E", "query": "\n\n\n__int64 __fastcall sub_40950E(__int64 *a1, unsigned int *a2)\n{\n_DWORD v3[6]; // [rsp+10h] [rbp-20h] BYREF\n__int64 *v4; // [rsp+28h] [rbp-8h]\n\nv4 = a1;\nsub_4061D5(a2, v3);\nsub_40642A(v3, (_DWORD *)v4 + 4, (int *)v4 + 4);\nreturn sub_4064B1((__int64)(v4 + 2), v4, v4 + 2);\n}\n\n\n\nQ:[a1,a2,v3,v4,sub_40950E,sub_4061D5,sub_40642A,sub_4064B1,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'vctx', 'a2': 'data', 'v3': 'gfdata', 'v4': 'ctx', 'sub_40950E': 'ghash_block', 'sub_4061D5': 'cf_gf128_frombytes_be', 'sub_40642A': 'cf_gf128_add', 'sub_4064B1': 'cf_gf128_mul'}"}
construct
5d756e538ec592c451789bc8e4cc9993b7a26799209267d21b163e1af3e3dd8c
openlink
virtuoso-opensource
NA
local int construct(struct huffman *h, short *length, int n) { int symbol; /* current symbol when stepping through length[] */ int len; /* current length when stepping through h->count[] */ int left; /* number of possible codes left of current length */ short offs[MAXBITS+1]; /* offsets in symbol table for each length */ /* count number of codes of each length */ for (len = 0; len <= MAXBITS; len++) h->count[len] = 0; for (symbol = 0; symbol < n; symbol++) (h->count[length[symbol]])++; /* assumes lengths are within bounds */ if (h->count[0] == n) /* no codes! */ return 0; /* complete, but decode() will fail */ /* check for an over-subscribed or incomplete set of lengths */ left = 1; /* one possible code of zero length */ for (len = 1; len <= MAXBITS; len++) { left <<= 1; /* one more bit, double codes left */ left -= h->count[len]; /* deduct count from possible codes */ if (left < 0) return left; /* over-subscribed--return negative */ } /* left > 0 means incomplete */ /* generate offsets into symbol table for each length for sorting */ offs[1] = 0; for (len = 1; len < MAXBITS; len++) offs[len + 1] = offs[len] + h->count[len]; /* * put symbols in table sorted by length, by symbol order within each * length */ for (symbol = 0; symbol < n; symbol++) if (length[symbol] != 0) h->symbol[offs[length[symbol]]++] = symbol; /* return zero for complete set, positive for incomplete set */ return left; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4015EB", "function_addr": 4199915, "binary_name": "5d756e538ec592c451789bc8e4cc9993b7a26799209267d21b163e1af3e3dd8c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_38], rdi"], [3, "mov [rbp+var_40], rsi"], [4, "mov [rbp+var_44], edx"], [5, "mov [rbp+var_8], 0"], [6, "jmp short loc_40161E"], [7, "mov rax, [rbp+var_38]"], [8, "mov rdx, [rax]"], [9, "mov eax, [rbp+var_8]"], [10, "cdqe"], [11, "add rax, rax"], [12, "add rax, rdx"], [13, "mov word ptr [rax], 0"], [14, "add [rbp+var_8], 1"], [15, "cmp [rbp+var_8], 0Fh"], [16, "jle short loc_401603"], [17, "mov [rbp+var_4], 0"], [18, "jmp short loc_40165E"], [19, "mov rax, [rbp+var_38]"], [20, "mov rdx, [rax]"], [21, "mov eax, [rbp+var_4]"], [22, "cdqe"], [23, "lea rcx, [rax+rax]"], [24, "mov rax, [rbp+var_40]"], [25, "add rax, rcx"], [26, "movzx eax, word ptr [rax]"], [27, "movsx rax, ax"], [28, "add rax, rax"], [29, "add rax, rdx"], [30, "movzx edx, word ptr [rax]"], [31, "add edx, 1"], [32, "mov [rax], dx"], [33, "add [rbp+var_4], 1"], [34, "mov eax, [rbp+var_4]"], [35, "cmp eax, [rbp+var_44]"], [36, "jl short loc_40162D"], [37, "mov rax, [rbp+var_38]"], [38, "mov rax, [rax]"], [39, "movzx eax, word ptr [rax]"], [40, "cwde"], [41, "cmp [rbp+var_44], eax"], [42, "jnz short loc_401680"], [43, "mov eax, 0"], [44, "jmp loc_401781"], [45, "mov [rbp+var_C], 1"], [46, "mov [rbp+var_8], 1"], [47, "jmp short loc_4016BE"], [48, "shl [rbp+var_C], 1"], [49, "mov rax, [rbp+var_38]"], [50, "mov rdx, [rax]"], [51, "mov eax, [rbp+var_8]"], [52, "cdqe"], [53, "add rax, rax"], [54, "add rax, rdx"], [55, "movzx eax, word ptr [rax]"], [56, "cwde"], [57, "sub [rbp+var_C], eax"], [58, "cmp [rbp+var_C], 0"], [59, "jns short loc_4016BA"], [60, "mov eax, [rbp+var_C]"], [61, "jmp loc_401781"], [62, "add [rbp+var_8], 1"], [63, "cmp [rbp+var_8], 0Fh"], [64, "jle short loc_401690"], [65, "mov [rbp+var_2E], 0"], [66, "mov [rbp+var_8], 1"], [67, "jmp short loc_401708"], [68, "mov eax, [rbp+var_8]"], [69, "cdqe"], [70, "movzx eax, [rbp+rax*2+var_30]"], [71, "mov ecx, eax"], [72, "mov rax, [rbp+var_38]"], [73, "mov rdx, [rax]"], [74, "mov eax, [rbp+var_8]"], [75, "cdqe"], [76, "add rax, rax"], [77, "add rax, rdx"], [78, "movzx eax, word ptr [rax]"], [79, "lea edx, [rcx+rax]"], [80, "mov eax, [rbp+var_8]"], [81, "add eax, 1"], [82, "cdqe"], [83, "mov [rbp+rax*2+var_30], dx"], [84, "add [rbp+var_8], 1"], [85, "cmp [rbp+var_8], 0Eh"], [86, "jle short loc_4016D3"], [87, "mov [rbp+var_4], 0"], [88, "jmp short loc_401776"], [89, "mov eax, [rbp+var_4]"], [90, "cdqe"], [91, "lea rdx, [rax+rax]"], [92, "mov rax, [rbp+var_40]"], [93, "add rax, rdx"], [94, "movzx eax, word ptr [rax]"], [95, "test ax, ax"], [96, "jz short loc_401772"], [97, "mov rax, [rbp+var_38]"], [98, "mov rsi, [rax+8]"], [99, "mov eax, [rbp+var_4]"], [100, "cdqe"], [101, "lea rdx, [rax+rax]"], [102, "mov rax, [rbp+var_40]"], [103, "add rax, rdx"], [104, "movzx eax, word ptr [rax]"], [105, "movsx edx, ax"], [106, "movsxd rax, edx"], [107, "movzx eax, [rbp+rax*2+var_30]"], [108, "mov ecx, eax"], [109, "add ecx, 1"], [110, "movsxd rdx, edx"], [111, "mov [rbp+rdx*2+var_30], cx"], [112, "movsx rax, ax"], [113, "add rax, rax"], [114, "add rax, rsi"], [115, "mov edx, [rbp+var_4]"], [116, "mov [rax], dx"], [117, "add [rbp+var_4], 1"], [118, "mov eax, [rbp+var_4]"], [119, "cmp eax, [rbp+var_44]"], [120, "jl short loc_401717"], [121, "mov eax, [rbp+var_C]"], [122, "pop rbp"], [123, "retn"]], "data_dep": [[7, 2], [8, 13], [8, 7], [9, 5], [9, 14], [11, 9], [12, 8], [12, 11], [13, 12], [14, 5], [14, 14], [15, 5], [15, 14], [16, 15], [19, 2], [20, 19], [20, 32], [20, 13], [21, 33], [21, 17], [23, 13], [23, 21], [23, 23], [23, 32], [24, 3], [25, 23], [25, 24], [26, 32], [26, 25], [26, 13], [27, 26], [28, 27], [29, 20], [29, 28], [30, 13], [30, 29], [30, 32], [31, 30], [32, 29], [32, 31], [33, 33], [33, 17], [34, 33], [34, 17], [35, 4], [35, 34], [36, 35], [37, 2], [38, 32], [38, 13], [38, 37], [39, 32], [39, 13], [39, 38], [41, 39], [41, 4], [42, 41], [48, 45], [48, 57], [49, 2], [50, 13], [50, 49], [50, 32], [51, 62], [51, 46], [53, 51], [54, 53], [54, 50], [55, 13], [55, 54], [55, 32], [57, 48], [57, 55], [58, 57], [59, 58], [60, 57], [62, 46], [62, 62], [63, 62], [63, 46], [64, 63], [68, 66], [68, 84], [70, 68], [70, 83], [71, 70], [72, 2], [73, 32], [73, 13], [73, 72], [74, 66], [74, 84], [76, 74], [77, 76], [77, 73], [78, 13], [78, 77], [78, 32], [79, 78], [79, 32], [79, 73], [79, 13], [80, 66], [80, 84], [81, 80], [83, 79], [83, 81], [84, 84], [84, 66], [85, 66], [85, 84], [86, 85], [89, 117], [89, 87], [91, 89], [91, 91], [91, 50], [91, 13], [91, 116], [91, 79], [91, 8], [91, 31], [91, 115], [91, 32], [92, 3], [93, 92], [93, 91], [94, 32], [94, 13], [94, 116], [94, 93], [95, 94], [96, 95], [97, 2], [98, 32], [98, 13], [98, 116], [98, 97], [99, 117], [99, 87], [101, 99], [101, 32], [101, 91], [101, 13], [101, 116], [102, 3], [103, 102], [103, 101], [104, 32], [104, 13], [104, 116], [104, 103], [105, 104], [106, 105], [107, 106], [107, 83], [108, 107], [109, 108], [110, 105], [111, 110], [111, 109], [112, 107], [113, 112], [114, 113], [114, 98], [115, 87], [115, 117], [116, 115], [116, 114], [117, 117], [117, 87], [118, 117], [118, 87], [119, 4], [119, 118], [120, 119], [121, 57], [121, 45], [122, 0], [123, 121], [123, 60], [123, 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/5d756e538ec592c451789bc8e4cc9993b7a26799209267d21b163e1af3e3dd8c_5d756e538ec592c451789bc8e4cc9993b7a26799209267d21b163e1af3e3dd8c.jsonl.gz", "strip_func_name": "sub_4015EB", "query": "\n\n\n__int64 __fastcall sub_4015EB(__int16 **a1, __int64 a2, int a3)\n{\n__int16 *v3; // rax\n__int16 *v5; // rsi\n__int16 v6; // ax\n__int16 v8[18]; // [rsp+14h] [rbp-30h]\nunsigned int v9; // [rsp+38h] [rbp-Ch]\nint i; // [rsp+3Ch] [rbp-8h]\nint j; // [rsp+40h] [rbp-4h]\n\nfor ( i = 0; i <= 15; ++i )\n(*a1)[i] = 0;\nfor ( j = 0; j < a3; ++j )\n{\nv3 = &(*a1)[*(__int16 *)(2LL * j + a2)];\n++*v3;\n}\nif ( a3 == **a1 )\nreturn 0LL;\nv9 = 1;\nfor ( i = 1; i <= 15; ++i )\n{\nv9 = 2 * v9 - (*a1)[i];\nif ( (v9 & 0x80000000) != 0 )\nreturn v9;\n}\nv8[1] = 0;\nfor ( i = 1; i <= 14; ++i )\nv8[i + 1] = v8[i] + (*a1)[i];\nfor ( j = 0; j < a3; ++j )\n{\nif ( *(_WORD *)(2LL * j + a2) )\n{\nv5 = a1[1];\nv6 = v8[*(__int16 *)(2LL * j + a2)];\nv8[*(__int16 *)(2LL * j + a2)] = v6 + 1;\nv5[v6] = j;\n}\n}\nreturn v9;\n}\n\n\n\nQ:[a3,a1,a2,v8,v9,i,j,sub_4015EB,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'n', 'a1': 'h', 'a2': 'length', 'v8': 'offs', 'v9': 'left', 'i': 'len', 'j': 'symbol', 'sub_4015EB': 'construct'}"}
snprintf
dc9bed46e45c50668c8ff83233e2f2b29ae3a27255fb800d39f3bde77843bda5
RKX1209
bitvisor-gdb
NA
int snprintf (char *str, size_t size, const char *format, ...) { va_list ap; int r; va_start (ap, format); r = vsnprintf (str, size, format, ap); va_end (ap); return r; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405D1C", "function_addr": 4218140, "binary_name": "dc9bed46e45c50668c8ff83233e2f2b29ae3a27255fb800d39f3bde77843bda5.elf_extract.pkl\n"}, "code": [[0, "sub rsp, 78h"], [1, "mov [rsp+78h+var_60], rdi"], [2, "mov [rsp+78h+var_68], rsi"], [3, "mov [rsp+78h+var_70], rdx"], [4, "mov [rsp+78h+var_20], rcx"], [5, "mov [rsp+78h+var_18], r8"], [6, "mov [rsp+78h+var_10], r9"], [7, "mov [rsp+78h+var_58], 18h"], [8, "lea rax, [rsp+78h+arg_0]"], [9, "mov [rsp+78h+var_50], rax"], [10, "lea rax, [rsp+78h+var_38]"], [11, "mov [rsp+78h+var_48], rax"], [12, "lea rcx, [rsp+78h+var_58]"], [13, "mov rdx, [rsp+78h+var_70]"], [14, "mov rsi, [rsp+78h+var_68]"], [15, "mov rax, [rsp+78h+var_60]"], [16, "mov rdi, rax"], [17, "call sub_405D86"], [18, "mov [rsp+78h+var_3C], eax"], [19, "mov eax, [rsp+78h+var_3C]"], [20, "add rsp, 78h"], [21, "retn"]], "data_dep": [[9, 8], [10, 8], [11, 10], [12, 7], [13, 3], [14, 2], [15, 1], [16, 15], [18, 17], [19, 18], [20, 0], [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/dc9bed46e45c50668c8ff83233e2f2b29ae3a27255fb800d39f3bde77843bda5_dc9bed46e45c50668c8ff83233e2f2b29ae3a27255fb800d39f3bde77843bda5.jsonl.gz", "strip_func_name": "sub_405D1C", "query": "\n\n\n__int64 sub_405D1C(__int64 a1, __int64 a2, __int64 a3, double a4, double a5, double a6, double a7, double a8, double a9, double a10, double a11, ...)\n{\ngcc_va_list va; // [rsp+20h] [rbp-58h] BYREF\n\nva_start(va, a11);\nreturn (unsigned int)sub_405D86(a1, a2, a3, va);\n}\n\n\n\nQ:[a3,a1,a2,va,sub_405D1C,sub_405D86,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'format', 'a1': 'str', 'a2': 'size', 'va': 'ap', 'sub_405D1C': 'snprintf', 'sub_405D86': 'vsnprintf'}"}
maze_get_cell_distance
9820513feff189c82bdddee6a8084c55525ad799f67005835437b5a5fc8fa742
sbinet
perfbook
NA
cell_t maze_get_cell_distance(struct maze *mp, int row, int col) { return maze_get_cell(mp, row, col) & COOKIE; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40532B", "function_addr": 4215595, "binary_name": "9820513feff189c82bdddee6a8084c55525ad799f67005835437b5a5fc8fa742.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_C], esi"], [5, "mov [rbp+var_10], edx"], [6, "mov edx, [rbp+var_10]"], [7, "mov ecx, [rbp+var_C]"], [8, "mov rax, [rbp+var_8]"], [9, "mov esi, ecx"], [10, "mov rdi, rax"], [11, "call sub_40513E"], [12, "and eax, 3FFFFFFh"], [13, "leave"], [14, "retn"]], "data_dep": [[6, 5], [7, 4], [8, 3], [9, 7], [10, 8], [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/9820513feff189c82bdddee6a8084c55525ad799f67005835437b5a5fc8fa742_9820513feff189c82bdddee6a8084c55525ad799f67005835437b5a5fc8fa742.jsonl.gz", "strip_func_name": "sub_40532B", "query": "\n\n\n__int64 __fastcall sub_40532B(int *a1, int a2, int a3)\n{\nreturn sub_40513E(a1, a2, a3) & 0x3FFFFFF;\n}\n\n\n\nQ:[a3,a1,a2,sub_40532B,sub_40513E,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'col', 'a1': 'mp', 'a2': 'row', 'sub_40532B': 'maze_get_cell_distance', 'sub_40513E': 'maze_get_cell_0'}"}
galois_single_divide
16f4579cf7fd57a3318fc6d2f4d4ce88673780c616ee87c6100dc8df90b727ef
shenzr
cross-rack-aware-updates
NA
int galois_single_divide(int a, int b, int w) { int sum_j; if (mult_type[w] == TABLE) { if (galois_div_tables[w] == NULL) { if (galois_create_mult_tables(w) < 0) { fprintf(stderr, "ERROR -- cannot make multiplication tables for w=%d\n", w); exit(1); } } return galois_div_tables[w][(a<<w)|b]; } else if (mult_type[w] == LOGS) { if (b == 0) return -1; if (a == 0) return 0; if (galois_log_tables[w] == NULL) { if (galois_create_log_tables(w) < 0) { fprintf(stderr, "ERROR -- cannot make log tables for w=%d\n", w); exit(1); } } sum_j = galois_log_tables[w][a] - galois_log_tables[w][b]; return galois_ilog_tables[w][sum_j]; } else { if (b == 0) return -1; if (a == 0) return 0; sum_j = galois_inverse(b, w); return galois_single_multiply(a, sum_j, w); } fprintf(stderr, "Galois_single_divide - no implementation for w=%d\n", w); exit(1); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_408E71", "function_addr": 4230769, "binary_name": "16f4579cf7fd57a3318fc6d2f4d4ce88673780c616ee87c6100dc8df90b727ef.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_14], edi"], [4, "mov [rbp+var_18], esi"], [5, "mov [rbp+var_1C], edx"], [6, "mov eax, [rbp+var_1C]"], [7, "cdqe"], [8, "mov eax, dword_40F220[rax*4]"], [9, "cmp eax, 0Bh"], [10, "jnz short loc_408F05"], [11, "mov eax, [rbp+var_1C]"], [12, "cdqe"], [13, "mov rax, ds:qword_4128C0[rax*8]"], [14, "test rax, rax"], [15, "jnz short loc_408ED9"], [16, "mov eax, [rbp+var_1C]"], [17, "mov edi, eax"], [18, "call sub_4086A3"], [19, "test eax, eax"], [20, "jns short loc_408ED9"], [21, "mov rax, cs:stderr"], [22, "mov edx, [rbp+var_1C]"], [23, "mov esi, offset aErrorCannotMak"], [24, "mov rdi, rax"], [25, "mov eax, 0"], [26, "call _fprintf"], [27, "mov edi, 1"], [28, "call _exit"], [29, "mov eax, [rbp+var_1C]"], [30, "cdqe"], [31, "mov rsi, ds:qword_4128C0[rax*8]"], [32, "mov eax, [rbp+var_1C]"], [33, "mov edx, [rbp+var_14]"], [34, "mov ecx, eax"], [35, "shl edx, cl"], [36, "mov eax, edx"], [37, "or eax, [rbp+var_18]"], [38, "cdqe"], [39, "shl rax, 2"], [40, "add rax, rsi"], [41, "mov eax, [rax]"], [42, "jmp locret_409018"], [43, "mov eax, [rbp+var_1C]"], [44, "cdqe"], [45, "mov eax, dword_40F220[rax*4]"], [46, "cmp eax, 0Dh"], [47, "jnz loc_408FDA"], [48, "cmp [rbp+var_18], 0"], [49, "jnz short loc_408F2A"], [50, "mov eax, 0FFFFFFFFh"], [51, "jmp locret_409018"], [52, "cmp [rbp+var_14], 0"], [53, "jnz short loc_408F3A"], [54, "mov eax, 0"], [55, "jmp locret_409018"], [56, "mov eax, [rbp+var_1C]"], [57, "cdqe"], [58, "mov rax, ds:ptr[rax*8]"], [59, "test rax, rax"], [60, "jnz short loc_408F80"], [61, "mov eax, [rbp+var_1C]"], [62, "mov edi, eax"], [63, "call sub_408211"], [64, "test eax, eax"], [65, "jns short loc_408F80"], [66, "mov rax, cs:stderr"], [67, "mov edx, [rbp+var_1C]"], [68, "mov esi, offset aErrorCannotMak_0"], [69, "mov rdi, rax"], [70, "mov eax, 0"], [71, "call _fprintf"], [72, "mov edi, 1"], [73, "call _exit"], [74, "mov eax, [rbp+var_1C]"], [75, "cdqe"], [76, "mov rdx, ds:ptr[rax*8]"], [77, "mov eax, [rbp+var_14]"], [78, "cdqe"], [79, "shl rax, 2"], [80, "add rax, rdx"], [81, "mov edx, [rax]"], [82, "mov eax, [rbp+var_1C]"], [83, "cdqe"], [84, "mov rcx, ds:ptr[rax*8]"], [85, "mov eax, [rbp+var_18]"], [86, "cdqe"], [87, "shl rax, 2"], [88, "add rax, rcx"], [89, "mov ecx, [rax]"], [90, "mov eax, edx"], [91, "sub eax, ecx"], [92, "mov [rbp+var_4], eax"], [93, "mov eax, [rbp+var_1C]"], [94, "cdqe"], [95, "mov rdx, ds:qword_412680[rax*8]"], [96, "mov eax, [rbp+var_4]"], [97, "cdqe"], [98, "shl rax, 2"], [99, "add rax, rdx"], [100, "mov eax, [rax]"], [101, "jmp short locret_409018"], [102, "cmp [rbp+var_18], 0"], [103, "jnz short loc_408FE7"], [104, "mov eax, 0FFFFFFFFh"], [105, "jmp short locret_409018"], [106, "cmp [rbp+var_14], 0"], [107, "jnz short loc_408FF4"], [108, "mov eax, 0"], [109, "jmp short locret_409018"], [110, "mov edx, [rbp+var_1C]"], [111, "mov eax, [rbp+var_18]"], [112, "mov esi, edx"], [113, "mov edi, eax"], [114, "call sub_409844"], [115, "mov [rbp+var_4], eax"], [116, "mov edx, [rbp+var_1C]"], [117, "mov ecx, [rbp+var_4]"], [118, "mov eax, [rbp+var_14]"], [119, "mov esi, ecx"], [120, "mov edi, eax"], [121, "call sub_408C26"], [122, "leave"], [123, "retn"]], "data_dep": [[6, 5], [9, 8], [10, 9], [11, 5], [14, 13], [15, 14], [16, 5], [17, 16], [19, 18], [20, 19], [22, 5], [24, 21], [29, 5], [32, 5], [33, 3], [34, 32], [35, 33], [35, 34], [36, 35], [37, 4], [37, 36], [39, 37], [40, 31], [40, 39], [41, 40], [43, 5], [46, 45], [47, 46], [48, 4], [49, 48], [52, 3], [53, 52], [56, 5], [59, 58], [60, 59], [61, 5], [62, 61], [64, 63], [65, 64], [67, 5], [69, 66], [74, 5], [77, 3], [79, 77], [80, 76], [80, 79], [81, 80], [82, 5], [85, 4], [87, 85], [88, 87], [88, 84], [89, 88], [90, 81], [91, 89], [91, 90], [92, 91], [93, 5], [96, 92], [98, 96], [99, 95], [99, 98], [100, 99], [102, 4], [103, 102], [106, 3], [107, 106], [110, 5], [111, 4], [112, 110], [113, 111], [115, 114], [116, 5], [117, 115], [118, 3], [119, 117], [120, 118], [123, 100], [123, 121], [123, 50], [123, 54], [123, 104], [123, 108], [123, 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/16f4579cf7fd57a3318fc6d2f4d4ce88673780c616ee87c6100dc8df90b727ef_16f4579cf7fd57a3318fc6d2f4d4ce88673780c616ee87c6100dc8df90b727ef.jsonl.gz", "strip_func_name": "sub_408E71", "query": "\n\n\n__int64 __fastcall sub_408E71(int a1, unsigned int a2, int a3)\n{\n__int64 result; // rax\nint v5; // [rsp+1Ch] [rbp-4h]\n\nif ( dword_40F220[a3] == 11 )\n{\nif ( !*(&qword_4128C0 + a3) && (int)sub_4086A3(a3) < 0 )\n{\nfprintf(stderr, \"ERROR -- cannot make multiplication tables for w=%d\\n\", (unsigned int)a3);\nexit(1);\n}\nresult = *((unsigned int *)*(&qword_4128C0 + a3) + (int)(a2 | (a1 << a3)));\n}\nelse if ( dword_40F220[a3] == 13 )\n{\nif ( a2 )\n{\nif ( a1 )\n{\nif ( !*(&ptr + a3) && (int)sub_408211(a3) < 0 )\n{\nfprintf(stderr, \"ERROR -- cannot make log tables for w=%d\\n\", (unsigned int)a3);\nexit(1);\n}\nresult = *(unsigned int *)(qword_412680[a3]\n+ 4LL * (*((_DWORD *)*(&ptr + a3) + a1) - *((_DWORD *)*(&ptr + a3) + (int)a2)));\n}\nelse\n{\nresult = 0LL;\n}\n}\nelse\n{\nresult = 0xFFFFFFFFLL;\n}\n}\nelse if ( a2 )\n{\nif ( a1 )\n{\nv5 = sub_409844(a2, (unsigned int)a3);\nresult = sub_408C26(a1, v5, a3);\n}\nelse\n{\nresult = 0LL;\n}\n}\nelse\n{\nresult = 0xFFFFFFFFLL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v5,sub_408E71,sub_4086A3,sub_408211,sub_409844,sub_408C26,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'w', 'a1': 'a', 'a2': 'b', 'v5': 'sum_j', 'sub_408E71': 'galois_single_divide', 'sub_4086A3': 'galois_create_mult_tables', 'sub_408211': 'galois_create_log_tables', 'sub_409844': 'galois_inverse', 'sub_408C26': 'galois_single_multiply'}"}
fatal
e6951f37e53aa26b8cc1158f7a801b19b5050181eb2932e812d0435a1aa23f66
plasmoduck
suckless
NA
static void fatal(errors e, char * errmsg) { if (err_functions[e] != NULL) err_functions[e](e, cur_state); else { switch (e) { case CTXOPTNOERR: break; case CTXOPTMISPAR: if (cur_state->ctx_par_name != NULL) fprintf(stderr, "the mandatory parameter(s) %s are missing in the context " "introduced by %s.\n", errmsg, cur_state->ctx_par_name); else fprintf(stderr, "The mandatory parameter(s) %s are missing " "in the main context.\n", errmsg); free(errmsg); break; case CTXOPTREQPAR: fprintf(stderr, errmsg, cur_state->req_opt_par_needed, cur_state->req_opt_par); break; case CTXOPTUNXARG: if (cur_state->cur_opt_par_name != NULL) fprintf(stderr, "The parameter %s takes no arguments " "or has too many arguments.\n", cur_state->cur_opt_par_name); break; case CTXOPTMISARG: if (cur_state->pre_opt_par_name != NULL) fprintf(stderr, "%s requires argument(s).\n", cur_state->pre_opt_par_name); else fprintf(stderr, "%s requires argument(s).\n", cur_state->cur_opt_par_name); break; case CTXOPTDUPOPT: if (cur_state->pre_opt_par_name != NULL) fprintf(stderr, "The parameter %s can only appear once in the context " "introduced by %s.\n", cur_state->cur_opt_params, cur_state->ctx_par_name); else fprintf(stderr, "The parameter %s can only appear once " "in the main context.\n", cur_state->cur_opt_params); break; case CTXOPTUNKPAR: fprintf(stderr, "Unknown parameter %s.\n%s", cur_state->cur_opt_par_name, errmsg); break; case CTXOPTINCOPT: fprintf(stderr, "The parameter %s is incompatible with %s.\n", cur_state->cur_opt_par_name, errmsg); break; case CTXOPTCTEOPT: if (cur_state->ctx_par_name) fprintf(stderr, "The parameter %s must appear exactly %d times " "in the context introduced by %s.\n", cur_state->cur_opt_params, cur_state->opts_count, cur_state->ctx_par_name); else fprintf(stderr, "The parameter %s must appear exactly %d times " "in the main context.\n", cur_state->cur_opt_params, cur_state->opts_count); break; case CTXOPTCTLOPT: if (cur_state->ctx_par_name) fprintf(stderr, "The parameter %s must appear less than %d times " "in the context introduced by %s.\n", cur_state->cur_opt_params, cur_state->opts_count, cur_state->ctx_par_name); else fprintf(stderr, "The parameter %s must appear less than %d times " "in the main context.\n", cur_state->cur_opt_params, cur_state->opts_count); break; case CTXOPTCTGOPT: if (cur_state->ctx_par_name) fprintf(stderr, "The parameter %s must appear more than %d times " "in the context introduced by %s.\n", cur_state->cur_opt_params, cur_state->opts_count, cur_state->ctx_par_name); else fprintf(stderr, "The parameter %s must appear more than %d times " "in the main context.\n", cur_state->cur_opt_params, cur_state->opts_count); break; case CTXOPTCTEARG: fprintf(stderr, "The parameter %s must have exactly %d arguments.\n", cur_state->cur_opt_par_name, cur_state->opt_args_count); break; case CTXOPTCTLARG: fprintf(stderr, "The parameter %s must have less than %d arguments.\n", cur_state->cur_opt_par_name, cur_state->opt_args_count); break; case CTXOPTCTGARG: fprintf(stderr, "The parameter %s must have more than %d arguments.\n", cur_state->cur_opt_par_name, cur_state->opt_args_count); break; case CTXOPTERRSIZ: break; } } /* CTXOPTUNKPAR should display the full usage to help the user follow */ /* the chaining of contexts when several possible contexts have been */ /* identified. Otherwise, errmsg is the empty string and the display of */ /* the current usage is enough. */ /* """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" */ if (e == CTXOPTUNKPAR && *errmsg != '\0') ctxopt_disp_usage(continue_after); else ctxopt_ctx_disp_usage(cur_state->ctx_name, continue_after); exit(e); /* Exit with the error id e as return code. */ }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_420AF4", "function_addr": 4328180, "binary_name": "e6951f37e53aa26b8cc1158f7a801b19b5050181eb2932e812d0435a1aa23f66.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+status], edi"], [4, "mov [rbp+ptr], rsi"], [5, "mov rdx, cs:qword_4335F0"], [6, "mov eax, [rbp+status]"], [7, "shl rax, 3"], [8, "add rax, rdx"], [9, "mov rax, [rax]"], [10, "test rax, rax"], [11, "jz short loc_420B46"], [12, "mov rdx, cs:qword_4335F0"], [13, "mov eax, [rbp+status]"], [14, "shl rax, 3"], [15, "add rax, rdx"], [16, "mov rcx, [rax]"], [17, "mov rdx, cs:qword_4335D8"], [18, "mov eax, [rbp+status]"], [19, "mov rsi, rdx"], [20, "mov edi, eax"], [21, "call rcx"], [22, "jmp def_420B5B"], [23, "cmp [rbp+status], 0Eh"], [24, "ja def_420B5B"], [25, "mov eax, [rbp+status]"], [26, "mov rax, ds:jpt_420B5B[rax*8]"], [27, "jmp rax"], [28, "mov rax, cs:qword_4335D8"], [29, "mov rax, [rax+10h]"], [30, "test rax, rax"], [31, "jz short loc_420B97"], [32, "mov rax, cs:qword_4335D8"], [33, "mov rcx, [rax+10h]"], [34, "mov rax, cs:stderr"], [35, "mov rdx, [rbp+ptr]"], [36, "mov esi, offset aTheMandatoryPa"], [37, "mov rdi, rax"], [38, "mov eax, 0"], [39, "call _fprintf"], [40, "jmp short loc_420BB4"], [41, "mov rax, cs:stderr"], [42, "mov rdx, [rbp+ptr]"], [43, "mov esi, offset aTheMandatoryPa_0"], [44, "mov rdi, rax"], [45, "mov eax, 0"], [46, "call _fprintf"], [47, "mov rax, [rbp+ptr]"], [48, "mov rdi, rax"], [49, "call _free"], [50, "jmp def_420B5B"], [51, "mov rax, cs:qword_4335D8"], [52, "mov rcx, [rax+48h]"], [53, "mov rax, cs:qword_4335D8"], [54, "mov rdx, [rax+40h]"], [55, "mov rax, cs:stderr"], [56, "mov rsi, [rbp+ptr]"], [57, "mov rdi, rax"], [58, "mov eax, 0"], [59, "call _fprintf"], [60, "jmp def_420B5B"], [61, "mov rax, cs:qword_4335D8"], [62, "mov rax, [rax+30h]"], [63, "test rax, rax"], [64, "jz loc_420F7D"], [65, "mov rax, cs:qword_4335D8"], [66, "mov rdx, [rax+30h]"], [67, "mov rax, cs:stderr"], [68, "mov esi, offset aTheParameterST"], [69, "mov rdi, rax"], [70, "mov eax, 0"], [71, "call _fprintf"], [72, "jmp loc_420F7D"], [73, "mov rax, cs:qword_4335D8"], [74, "mov rax, [rax+28h]"], [75, "test rax, rax"], [76, "jz short loc_420C6E"], [77, "mov rax, cs:qword_4335D8"], [78, "mov rdx, [rax+28h]"], [79, "mov rax, cs:stderr"], [80, "mov esi, offset aSRequiresArgum"], [81, "mov rdi, rax"], [82, "mov eax, 0"], [83, "call _fprintf"], [84, "jmp def_420B5B"], [85, "mov rax, cs:qword_4335D8"], [86, "mov rdx, [rax+30h]"], [87, "mov rax, cs:stderr"], [88, "mov esi, offset aSRequiresArgum"], [89, "mov rdi, rax"], [90, "mov eax, 0"], [91, "call _fprintf"], [92, "jmp def_420B5B"], [93, "mov rax, cs:qword_4335D8"], [94, "mov rax, [rax+28h]"], [95, "test rax, rax"], [96, "jz short loc_420CDB"], [97, "mov rax, cs:qword_4335D8"], [98, "mov rcx, [rax+10h]"], [99, "mov rax, cs:qword_4335D8"], [100, "mov rdx, [rax+38h]"], [101, "mov rax, cs:stderr"], [102, "mov esi, offset aTheParameterSC"], [103, "mov rdi, rax"], [104, "mov eax, 0"], [105, "call _fprintf"], [106, "jmp def_420B5B"], [107, "mov rax, cs:qword_4335D8"], [108, "mov rdx, [rax+38h]"], [109, "mov rax, cs:stderr"], [110, "mov esi, offset aTheParameterSC_0"], [111, "mov rdi, rax"], [112, "mov eax, 0"], [113, "call _fprintf"], [114, "jmp def_420B5B"], [115, "mov rax, cs:qword_4335D8"], [116, "mov rdx, [rax+30h]"], [117, "mov rax, cs:stderr"], [118, "mov rcx, [rbp+ptr]"], [119, "mov esi, offset aUnknownParamet"], [120, "mov rdi, rax"], [121, "mov eax, 0"], [122, "call _fprintf"], [123, "jmp def_420B5B"], [124, "mov rax, cs:qword_4335D8"], [125, "mov rdx, [rax+30h]"], [126, "mov rax, cs:stderr"], [127, "mov rcx, [rbp+ptr]"], [128, "mov esi, offset aTheParameterSI"], [129, "mov rdi, rax"], [130, "mov eax, 0"], [131, "call _fprintf"], [132, "jmp def_420B5B"], [133, "mov rax, cs:qword_4335D8"], [134, "mov rax, [rax+10h]"], [135, "test rax, rax"], [136, "jz short loc_420DAF"], [137, "mov rax, cs:qword_4335D8"], [138, "mov rsi, [rax+10h]"], [139, "mov rax, cs:qword_4335D8"], [140, "mov ecx, [rax+20h]"], [141, "mov rax, cs:qword_4335D8"], [142, "mov rdx, [rax+38h]"], [143, "mov rax, cs:stderr"], [144, "mov r8, rsi"], [145, "mov esi, offset aTheParameterSM"], [146, "mov rdi, rax"], [147, "mov eax, 0"], [148, "call _fprintf"], [149, "jmp def_420B5B"], [150, "mov rax, cs:qword_4335D8"], [151, "mov ecx, [rax+20h]"], [152, "mov rax, cs:qword_4335D8"], [153, "mov rdx, [rax+38h]"], [154, "mov rax, cs:stderr"], [155, "mov esi, offset aTheParameterSM_0"], [156, "mov rdi, rax"], [157, "mov eax, 0"], [158, "call _fprintf"], [159, "jmp def_420B5B"], [160, "mov rax, cs:qword_4335D8"], [161, "mov rax, [rax+10h]"], [162, "test rax, rax"], [163, "jz short loc_420E33"], [164, "mov rax, cs:qword_4335D8"], [165, "mov rsi, [rax+10h]"], [166, "mov rax, cs:qword_4335D8"], [167, "mov ecx, [rax+20h]"], [168, "mov rax, cs:qword_4335D8"], [169, "mov rdx, [rax+38h]"], [170, "mov rax, cs:stderr"], [171, "mov r8, rsi"], [172, "mov esi, offset aTheParameterSM_1"], [173, "mov rdi, rax"], [174, "mov eax, 0"], [175, "call _fprintf"], [176, "jmp def_420B5B"], [177, "mov rax, cs:qword_4335D8"], [178, "mov ecx, [rax+20h]"], [179, "mov rax, cs:qword_4335D8"], [180, "mov rdx, [rax+38h]"], [181, "mov rax, cs:stderr"], [182, "mov esi, offset aTheParameterSM_2"], [183, "mov rdi, rax"], [184, "mov eax, 0"], [185, "call _fprintf"], [186, "jmp def_420B5B"], [187, "mov rax, cs:qword_4335D8"], [188, "mov rax, [rax+10h]"], [189, "test rax, rax"], [190, "jz short loc_420EB7"], [191, "mov rax, cs:qword_4335D8"], [192, "mov rsi, [rax+10h]"], [193, "mov rax, cs:qword_4335D8"], [194, "mov ecx, [rax+20h]"], [195, "mov rax, cs:qword_4335D8"], [196, "mov rdx, [rax+38h]"], [197, "mov rax, cs:stderr"], [198, "mov r8, rsi"], [199, "mov esi, offset aTheParameterSM_3"], [200, "mov rdi, rax"], [201, "mov eax, 0"], [202, "call _fprintf"], [203, "jmp def_420B5B"], [204, "mov rax, cs:qword_4335D8"], [205, "mov ecx, [rax+20h]"], [206, "mov rax, cs:qword_4335D8"], [207, "mov rdx, [rax+38h]"], [208, "mov rax, cs:stderr"], [209, "mov esi, offset aTheParameterSM_4"], [210, "mov rdi, rax"], [211, "mov eax, 0"], [212, "call _fprintf"], [213, "jmp def_420B5B"], [214, "mov rax, cs:qword_4335D8"], [215, "mov ecx, [rax+24h]"], [216, "mov rax, cs:qword_4335D8"], [217, "mov rdx, [rax+30h]"], [218, "mov rax, cs:stderr"], [219, "mov esi, offset aTheParameterSM_5"], [220, "mov rdi, rax"], [221, "mov eax, 0"], [222, "call _fprintf"], [223, "jmp short def_420B5B"], [224, "mov rax, cs:qword_4335D8"], [225, "mov ecx, [rax+24h]"], [226, "mov rax, cs:qword_4335D8"], [227, "mov rdx, [rax+30h]"], [228, "mov rax, cs:stderr"], [229, "mov esi, offset aTheParameterSM_6"], [230, "mov rdi, rax"], [231, "mov eax, 0"], [232, "call _fprintf"], [233, "jmp short def_420B5B"], [234, "mov rax, cs:qword_4335D8"], [235, "mov ecx, [rax+24h]"], [236, "mov rax, cs:qword_4335D8"], [237, "mov rdx, [rax+30h]"], [238, "mov rax, cs:stderr"], [239, "mov esi, offset aTheParameterSM_7"], [240, "mov rdi, rax"], [241, "mov eax, 0"], [242, "call _fprintf"], [243, "jmp short def_420B5B"], [244, "nop"], [245, "jmp short def_420B5B"], [246, "nop"], [247, "cmp [rbp+status], 5"], [248, "jnz short loc_420F9B"], [249, "mov rax, [rbp+ptr]"], [250, "movzx eax, byte ptr [rax]"], [251, "test al, al"], [252, "jz short loc_420F9B"], [253, "mov edi, 0"], [254, "call sub_426AC2"], [255, "jmp short loc_420FB3"], [256, "mov rax, cs:qword_4335D8"], [257, "mov rax, [rax+8]"], [258, "mov esi, 0"], [259, "mov rdi, rax"], [260, "call sub_42698B"], [261, "mov eax, [rbp+status]"], [262, "mov edi, eax"], [263, "call _exit"]], "data_dep": [[6, 3], [7, 6], [8, 5], [8, 7], [9, 8], [10, 9], [11, 10], [13, 3], [14, 13], [15, 14], [15, 12], [16, 15], [18, 3], [19, 17], [20, 18], [21, 16], [23, 3], [24, 23], [25, 3], [27, 26], [29, 28], [30, 29], [31, 30], [33, 32], [35, 4], [37, 34], [42, 4], [44, 41], [47, 4], [48, 47], [52, 51], [54, 53], [56, 4], [57, 55], [62, 61], [63, 62], [64, 63], [66, 65], [69, 67], [74, 73], [75, 74], [76, 75], [78, 77], [81, 79], [86, 85], [89, 87], [94, 93], [95, 94], [96, 95], [98, 97], [100, 99], [103, 101], [108, 107], [111, 109], [116, 115], [118, 4], [120, 117], [125, 124], [127, 4], [129, 126], [134, 133], [135, 134], [136, 135], [138, 137], [140, 139], [142, 141], [144, 138], [146, 143], [151, 150], [153, 152], [156, 154], [161, 160], [162, 161], [163, 162], [165, 164], [167, 166], [169, 168], [171, 165], [173, 170], [178, 177], [180, 179], [183, 181], [188, 187], [189, 188], [190, 189], [192, 191], [194, 193], [196, 195], [198, 192], [200, 197], [205, 204], [207, 206], [210, 208], [215, 214], [217, 216], [220, 218], [225, 224], [227, 226], [230, 228], [235, 234], [237, 236], [240, 238], [247, 3], [248, 247], [249, 4], [250, 249], [251, 250], [252, 251], [257, 256], [259, 257], [261, 3], [262, 261]]}
{"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/e6951f37e53aa26b8cc1158f7a801b19b5050181eb2932e812d0435a1aa23f66_e6951f37e53aa26b8cc1158f7a801b19b5050181eb2932e812d0435a1aa23f66.jsonl.gz", "strip_func_name": "sub_420AF4", "query": "\n\n\nvoid __fastcall sub_420AF4(unsigned int a1, char *a2)\n{\nif ( *(_QWORD *)(qword_4335F0 + 8LL * a1) )\n{\n(*(void (__fastcall **)(_QWORD, __int64))(qword_4335F0 + 8LL * a1))(a1, qword_4335D8);\n}\nelse\n{\nswitch ( a1 )\n{\ncase 1u:\nif ( *(_QWORD *)(qword_4335D8 + 16) )\nfprintf(\nstderr,\n\"the mandatory parameter(s) %s are missing in the context introduced by %s.\\n\",\na2,\n*(const char **)(qword_4335D8 + 16));\nelse\nfprintf(stderr, \"The mandatory parameter(s) %s are missing in the main context.\\n\", a2);\nfree(a2);\nbreak;\ncase 2u:\nfprintf(stderr, a2, *(_QWORD *)(qword_4335D8 + 64), *(_QWORD *)(qword_4335D8 + 72));\nbreak;\ncase 3u:\nif ( *(_QWORD *)(qword_4335D8 + 40) )\nfprintf(stderr, \"%s requires argument(s).\\n\", *(const char **)(qword_4335D8 + 40));\nelse\nfprintf(stderr, \"%s requires argument(s).\\n\", *(const char **)(qword_4335D8 + 48));\nbreak;\ncase 4u:\nif ( *(_QWORD *)(qword_4335D8 + 40) )\nfprintf(\nstderr,\n\"The parameter %s can only appear once in the context introduced by %s.\\n\",\n*(const char **)(qword_4335D8 + 56),\n*(const char **)(qword_4335D8 + 16));\nelse\nfprintf(\nstderr,\n\"The parameter %s can only appear once in the main context.\\n\",\n*(const char **)(qword_4335D8 + 56));\nbreak;\ncase 5u:\nfprintf(stderr, \"Unknown parameter %s.\\n%s\", *(const char **)(qword_4335D8 + 48), a2);\nbreak;\ncase 6u:\nfprintf(stderr, \"The parameter %s is incompatible with %s.\\n\", *(const char **)(qword_4335D8 + 48), a2);\nbreak;\ncase 7u:\nif ( *(_QWORD *)(qword_4335D8 + 16) )\nfprintf(\nstderr,\n\"The parameter %s must appear exactly %d times in the context introduced by %s.\\n\",\n*(const char **)(qword_4335D8 + 56),\n*(unsigned int *)(qword_4335D8 + 32),\n*(const char **)(qword_4335D8 + 16));\nelse\nfprintf(\nstderr,\n\"The parameter %s must appear exactly %d times in the main context.\\n\",\n*(const char **)(qword_4335D8 + 56),\n*(unsigned int *)(qword_4335D8 + 32));\nbreak;\ncase 8u:\nif ( *(_QWORD *)(qword_4335D8 + 16) )\nfprintf(\nstderr,\n\"The parameter %s must appear less than %d times in the context introduced by %s.\\n\",\n*(const char **)(qword_4335D8 + 56),\n*(unsigned int *)(qword_4335D8 + 32),\n*(const char **)(qword_4335D8 + 16));\nelse\nfprintf(\nstderr,\n\"The parameter %s must appear less than %d times in the main context.\\n\",\n*(const char **)(qword_4335D8 + 56),\n*(unsigned int *)(qword_4335D8 + 32));\nbreak;\ncase 9u:\nif ( *(_QWORD *)(qword_4335D8 + 16) )\nfprintf(\nstderr,\n\"The parameter %s must appear more than %d times in the context introduced by %s.\\n\",\n*(const char **)(qword_4335D8 + 56),\n*(unsigned int *)(qword_4335D8 + 32),\n*(const char **)(qword_4335D8 + 16));\nelse\nfprintf(\nstderr,\n\"The parameter %s must appear more than %d times in the main context.\\n\",\n*(const char **)(qword_4335D8 + 56),\n*(unsigned int *)(qword_4335D8 + 32));\nbreak;\ncase 0xAu:\nfprintf(\nstderr,\n\"The parameter %s must have exactly %d arguments.\\n\",\n*(const char **)(qword_4335D8 + 48),\n*(unsigned int *)(qword_4335D8 + 36));\nbreak;\ncase 0xBu:\nfprintf(\nstderr,\n\"The parameter %s must have less than %d arguments.\\n\",\n*(const char **)(qword_4335D8 + 48),\n*(unsigned int *)(qword_4335D8 + 36));\nbreak;\ncase 0xCu:\nfprintf(\nstderr,\n\"The parameter %s must have more than %d arguments.\\n\",\n*(const char **)(qword_4335D8 + 48),\n*(unsigned int *)(qword_4335D8 + 36));\nbreak;\ncase 0xDu:\nif ( *(_QWORD *)(qword_4335D8 + 48) )\nfprintf(\nstderr,\n\"The parameter %s takes no arguments or has too many arguments.\\n\",\n*(const char **)(qword_4335D8 + 48));\nbreak;\ndefault:\nbreak;\n}\n}\nif ( a1 == 5 && *a2 )\nsub_426AC2(0LL);\nelse\nsub_42698B(*(_QWORD *)(qword_4335D8 + 8), 0LL);\nexit(a1);\n}\n\n\n\nQ:[a1,a2,sub_420AF4,sub_426AC2,sub_42698B,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'e', 'a2': 'errmsg', 'sub_420AF4': 'fatal', 'sub_426AC2': 'ctxopt_disp_usage', 'sub_42698B': 'ctxopt_ctx_disp_usage'}"}
read_M
f6d19e397df5fc897a4738f9fb6aa0f2069771552cafdab9765c3b2b5810222b
EtchedPixels
EmulatorKit
NA
static uint8_t read_M(struct i8008 *cpu) { uint8_t bank = cpu->reg_h & 0x3F; return mem_read(cpu, (bank << 8) | cpu->reg_l, 0); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4021A3", "function_addr": 4202915, "binary_name": "f6d19e397df5fc897a4738f9fb6aa0f2069771552cafdab9765c3b2b5810222b.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, "movzx eax, byte ptr [rax+1Dh]"], [6, "and eax, 3Fh"], [7, "mov [rbp+var_1], al"], [8, "movzx eax, [rbp+var_1]"], [9, "shl eax, 8"], [10, "mov edx, eax"], [11, "mov rax, [rbp+var_18]"], [12, "movzx eax, byte ptr [rax+1Eh]"], [13, "movzx eax, al"], [14, "or eax, edx"], [15, "movzx ecx, ax"], [16, "mov rax, [rbp+var_18]"], [17, "mov edx, 0"], [18, "mov esi, ecx"], [19, "mov rdi, rax"], [20, "call sub_4012A2"], [21, "leave"], [22, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [11, 3], [12, 11], [13, 12], [14, 10], [14, 13], [15, 14], [16, 3], [18, 15], [19, 16], [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/f6d19e397df5fc897a4738f9fb6aa0f2069771552cafdab9765c3b2b5810222b_f6d19e397df5fc897a4738f9fb6aa0f2069771552cafdab9765c3b2b5810222b.jsonl.gz", "strip_func_name": "sub_4021A3", "query": "\n\n\n__int64 __fastcall sub_4021A3(__int64 a1)\n{\nreturn sub_4012A2(a1, ((*(_BYTE *)(a1 + 29) & 0x3Fu) << 8) | *(unsigned __int8 *)(a1 + 30));\n}\n\n\n\nQ:[a1,sub_4021A3,sub_4012A2,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'cpu', 'sub_4021A3': 'read_M', 'sub_4012A2': 'mem_read'}"}
ntt1024_v5
978d1074b6bf2ede5bb1e3064f9fececeb3d153b2dd167a68ee9378cc86b4218
SRI-CSL
NTT
NA
static void ntt1024_v5(int32_t *a) { bitrev_shuffle1024(a); nttmul_gs_rev2std(a, 1024, rev_shoup_ntt1024_12289); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401FF3", "function_addr": 4202483, "binary_name": "978d1074b6bf2ede5bb1e3064f9fececeb3d153b2dd167a68ee9378cc86b4218.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_40137C"], [7, "mov rax, [rbp+var_8]"], [8, "mov edx, offset unk_4083C0"], [9, "mov esi, 400h"], [10, "mov rdi, rax"], [11, "call sub_4040D4"], [12, "nop"], [13, "leave"], [14, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 3], [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/978d1074b6bf2ede5bb1e3064f9fececeb3d153b2dd167a68ee9378cc86b4218_978d1074b6bf2ede5bb1e3064f9fececeb3d153b2dd167a68ee9378cc86b4218.jsonl.gz", "strip_func_name": "sub_401FF3", "query": "\n\n\n__int64 __fastcall sub_401FF3(__int64 a1)\n{\nsub_40137C(a1);\nreturn sub_4040D4(a1, 1024LL, &unk_4083C0);\n}\n\n\n\nQ:[a1,sub_401FF3,sub_40137C,sub_4040D4,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'a', 'sub_401FF3': 'ntt1024_v5', 'sub_40137C': 'bitrev_shuffle1024', 'sub_4040D4': 'nttmul_gs_rev2std'}"}
int_gt_lit
590128985a4641821cc0846c284565f5febb73cfc47f9eb9b972f4e19564e9ac
x43x61x69
gbdk-osx
NA
void int_gt_lit (void) { ASSERT (!(aint1 > 0x10)); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401454", "function_addr": 4199508, "binary_name": "590128985a4641821cc0846c284565f5febb73cfc47f9eb9b972f4e19564e9ac.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, cs:dword_404058"], [3, "add eax, 1"], [4, "mov cs:dword_404058, eax"], [5, "mov eax, cs:dword_404044"], [6, "cmp eax, 10h"], [7, "jbe short loc_40148B"], [8, "mov ecx, 5Eh "], [9, "mov edx, offset aGenHostScottCo"], [10, "mov esi, offset aAint10x10_0"], [11, "mov edi, offset aAssertionFaile"], [12, "call sub_40183C"], [13, "nop"], [14, "pop rbp"], [15, "retn"]], "data_dep": [[3, 2], [4, 3], [6, 5], [7, 6], [14, 0], [15, 5], [15, 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/590128985a4641821cc0846c284565f5febb73cfc47f9eb9b972f4e19564e9ac_590128985a4641821cc0846c284565f5febb73cfc47f9eb9b972f4e19564e9ac.jsonl.gz", "strip_func_name": "sub_401454", "query": "\n\n\n__int64 sub_401454()\n{\n__int64 result; // rax\n\n++dword_404058;\nresult = (unsigned int)dword_404044;\nif ( (unsigned int)dword_404044 > 0x10 )\nresult = sub_40183C(\"Assertion failed\", \"!(aint1 > 0x10)\", \"gen/host/scott-compare2/scott-compare2.c\", 94LL);\nreturn result;\n}\n\n\n\nQ:[sub_401454,]\nAssistant: ", "hints": "[]", "response": "{'sub_401454': 'int_gt_lit'}"}
git_rerere_config
fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc
msysgit
msysgit
NA
static int git_rerere_config(const char *var, const char *value, void *cb) { if (!strcmp(var, "rerere.enabled")) rerere_enabled = git_config_bool(var, value); else if (!strcmp(var, "rerere.autoupdate")) rerere_autoupdate = git_config_bool(var, value); else return git_default_config(var, value, cb); return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4B74A6", "function_addr": 4945062, "binary_name": "fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+s1], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "mov rax, [rbp+s1]"], [7, "mov esi, offset aRerereEnabled"], [8, "mov rdi, rax"], [9, "call _strcmp"], [10, "test eax, eax"], [11, "jnz short loc_4B74EA"], [12, "mov rdx, [rbp+var_10]"], [13, "mov rax, [rbp+s1]"], [14, "mov rsi, rdx"], [15, "mov rdi, rax"], [16, "call sub_44245B"], [17, "mov cs:dword_4FB9E0, eax"], [18, "jmp short loc_4B7533"], [19, "mov rax, [rbp+s1]"], [20, "mov esi, offset aRerereAutoupda"], [21, "mov rdi, rax"], [22, "call _strcmp"], [23, "test eax, eax"], [24, "jnz short loc_4B751A"], [25, "mov rdx, [rbp+var_10]"], [26, "mov rax, [rbp+s1]"], [27, "mov rsi, rdx"], [28, "mov rdi, rax"], [29, "call sub_44245B"], [30, "mov cs:dword_52D8C0, eax"], [31, "jmp short loc_4B7533"], [32, "mov rdx, [rbp+var_18]"], [33, "mov rcx, [rbp+var_10]"], [34, "mov rax, [rbp+s1]"], [35, "mov rsi, rcx"], [36, "mov rdi, rax"], [37, "call sub_44345D"], [38, "jmp short locret_4B7538"], [39, "mov eax, 0"], [40, "leave"], [41, "retn"]], "data_dep": [[6, 3], [8, 6], [10, 9], [11, 10], [12, 4], [13, 3], [14, 12], [15, 13], [17, 16], [19, 3], [21, 19], [23, 22], [24, 23], [25, 4], [26, 3], [27, 25], [28, 26], [30, 29], [32, 5], [33, 4], [34, 3], [35, 33], [36, 34], [41, 39], [41, 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/fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc_fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc.jsonl.gz", "strip_func_name": "sub_4B74A6", "query": "\n\n\n__int64 __fastcall sub_4B74A6(char *a1, char *a2, __int64 a3)\n{\nif ( !strcmp(a1, \"rerere.enabled\") )\n{\ndword_4FB9E0 = sub_44245B((__int64)a1, a2);\n}\nelse\n{\nif ( strcmp(a1, \"rerere.autoupdate\") )\nreturn sub_44345D(a1, a2, a3);\ndword_52D8C0 = sub_44245B((__int64)a1, a2);\n}\nreturn 0LL;\n}\n\n\n\nQ:[a3,a1,a2,sub_4B74A6,sub_44245B,sub_44345D,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'cb', 'a1': 'var', 'a2': 'value', 'sub_4B74A6': 'git_rerere_config', 'sub_44245B': 'git_config_bool', 'sub_44345D': 'git_default_config'}"}
truncate_log_file
f262e46888d8f3739fd5fac7875e321d6f35db11c2e2641652bcf9ba82b48ca3
koolshare
tinyproxy
NA
void truncate_log_file(void) { lseek(log_file_fd, 0, SEEK_SET); ftruncate(log_file_fd, 0); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405CE1", "function_addr": 4218081, "binary_name": "f262e46888d8f3739fd5fac7875e321d6f35db11c2e2641652bcf9ba82b48ca3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, cs:dword_4163E8"], [3, "mov edx, 0"], [4, "mov esi, 0"], [5, "mov edi, eax"], [6, "call _lseek"], [7, "mov eax, cs:dword_4163E8"], [8, "mov esi, 0"], [9, "mov edi, eax"], [10, "call _ftruncate"], [11, "nop"], [12, "pop rbp"], [13, "retn"]], "data_dep": [[5, 2], [9, 7], [12, 0], [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/f262e46888d8f3739fd5fac7875e321d6f35db11c2e2641652bcf9ba82b48ca3_f262e46888d8f3739fd5fac7875e321d6f35db11c2e2641652bcf9ba82b48ca3.jsonl.gz", "strip_func_name": "sub_405CE1", "query": "\n\n\nint sub_405CE1()\n{\nlseek(dword_4163E8, 0LL, 0);\nreturn ftruncate(dword_4163E8, 0LL);\n}\n\n\n\nQ:[sub_405CE1,]\nAssistant: ", "hints": "[]", "response": "{'sub_405CE1': 'truncate_log_file'}"}
unpack_nibbles_to_bytes
876c66eeb75dcc6b58cd0e831d9e3686c74c9461db46cdb0ae21ab820c6c0989
kidanger
high-noise-deblurring
NA
static void unpack_nibbles_to_bytes(uint8_t out[2], uint8_t in) { out[1] = (in & 0x0f); //0b00001111 out[0] = (in & 0xf0)>>4; //0b11110000 }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43572C", "function_addr": 4413228, "binary_name": "876c66eeb75dcc6b58cd0e831d9e3686c74c9461db46cdb0ae21ab820c6c0989.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov eax, esi"], [4, "mov [rbp+var_C], al"], [5, "mov rax, [rbp+var_8]"], [6, "add rax, 1"], [7, "movzx edx, [rbp+var_C]"], [8, "and edx, 0Fh"], [9, "mov [rax], dl"], [10, "movzx eax, [rbp+var_C]"], [11, "shr al, 4"], [12, "mov edx, eax"], [13, "mov rax, [rbp+var_8]"], [14, "mov [rax], dl"], [15, "nop"], [16, "pop rbp"], [17, "retn"]], "data_dep": [[4, 3], [5, 2], [6, 5], [7, 4], [8, 7], [9, 6], [9, 8], [10, 4], [11, 10], [12, 11], [13, 2], [14, 13], [14, 12], [16, 0], [17, 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/876c66eeb75dcc6b58cd0e831d9e3686c74c9461db46cdb0ae21ab820c6c0989_876c66eeb75dcc6b58cd0e831d9e3686c74c9461db46cdb0ae21ab820c6c0989.jsonl.gz", "strip_func_name": "sub_43572C", "query": "\n\n\n_BYTE *__fastcall sub_43572C(_BYTE *a1, unsigned __int8 a2)\n{\n_BYTE *result; // rax\n\na1[1] = a2 & 0xF;\nresult = a1;\n*a1 = a2 >> 4;\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_43572C,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'out', 'a2': 'in', 'sub_43572C': 'unpack_nibbles_to_bytes'}"}
map_elf
892d4ad8f5dfe4411c8390258729963722141430ec472d7869a6e65f44b91019
samdmarshall
Onlive-Source-Backup
NA
static unsigned long map_elf(int elf_fd, const Elf32_Ehdr *ehdr) { Elf32_Phdr phdr[ehdr->e_phnum]; unsigned int i; /* Sanity checks on the main ELF header: an x86 executable with a * reasonable number of correctly-sized program headers. */ if (ehdr->e_type != ET_EXEC || ehdr->e_machine != EM_386 || ehdr->e_phentsize != sizeof(Elf32_Phdr) || ehdr->e_phnum < 1 || ehdr->e_phnum > 65536U/sizeof(Elf32_Phdr)) errx(1, "Malformed elf header"); /* An ELF executable contains an ELF header and a number of "program" * headers which indicate which parts ("segments") of the program to * load where. */ /* We read in all the program headers at once: */ if (lseek(elf_fd, ehdr->e_phoff, SEEK_SET) < 0) err(1, "Seeking to program headers"); if (read(elf_fd, phdr, sizeof(phdr)) != sizeof(phdr)) err(1, "Reading program headers"); /* Try all the headers: there are usually only three. A read-only one, * a read-write one, and a "note" section which we don't load. */ for (i = 0; i < ehdr->e_phnum; i++) { /* If this isn't a loadable segment, we ignore it */ if (phdr[i].p_type != PT_LOAD) continue; verbose("Section %i: size %i addr %p\n", i, phdr[i].p_memsz, (void *)phdr[i].p_paddr); /* We map this section of the file at its physical address. */ map_at(elf_fd, from_guest_phys(phdr[i].p_paddr), phdr[i].p_offset, phdr[i].p_filesz); } /* The entry point is given in the ELF header. */ return ehdr->e_entry; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4028F1", "function_addr": 4204785, "binary_name": "892d4ad8f5dfe4411c8390258729963722141430ec472d7869a6e65f44b91019.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r13"], [3, "push r12"], [4, "push rbx"], [5, "sub rsp, 38h"], [6, "mov [rbp+fd], edi"], [7, "mov [rbp+var_50], rsi"], [8, "mov rax, rsp"], [9, "mov r13, rax"], [10, "mov rax, [rbp+var_50]"], [11, "movzx eax, word ptr [rax+2Ch]"], [12, "movzx eax, ax"], [13, "sub rax, 1"], [14, "mov [rbp+var_30], rax"], [15, "mov rax, [rbp+var_50]"], [16, "movzx eax, word ptr [rax+2Ch]"], [17, "movzx eax, ax"], [18, "mov r8, rax"], [19, "mov r9d, 0"], [20, "mov rax, [rbp+var_50]"], [21, "movzx eax, word ptr [rax+2Ch]"], [22, "movzx eax, ax"], [23, "mov rcx, rax"], [24, "mov ebx, 0"], [25, "mov rax, [rbp+var_50]"], [26, "movzx eax, word ptr [rax+2Ch]"], [27, "movzx eax, ax"], [28, "shl rax, 5"], [29, "mov rdx, rax"], [30, "mov eax, 10h"], [31, "sub rax, 1"], [32, "add rax, rdx"], [33, "mov ebx, 10h"], [34, "mov edx, 0"], [35, "div rbx"], [36, "imul rax, 10h"], [37, "sub rsp, rax"], [38, "mov rax, rsp"], [39, "add rax, 3"], [40, "shr rax, 2"], [41, "shl rax, 2"], [42, "mov [rbp+buf], rax"], [43, "mov rax, [rbp+var_50]"], [44, "movzx eax, word ptr [rax+10h]"], [45, "cmp ax, 2"], [46, "jnz short loc_4029CF"], [47, "mov rax, [rbp+var_50]"], [48, "movzx eax, word ptr [rax+12h]"], [49, "cmp ax, 3"], [50, "jnz short loc_4029CF"], [51, "mov rax, [rbp+var_50]"], [52, "movzx eax, word ptr [rax+2Ah]"], [53, "cmp ax, 20h "], [54, "jnz short loc_4029CF"], [55, "mov rax, [rbp+var_50]"], [56, "movzx eax, word ptr [rax+2Ch]"], [57, "test ax, ax"], [58, "jz short loc_4029CF"], [59, "mov rax, [rbp+var_50]"], [60, "movzx eax, word ptr [rax+2Ch]"], [61, "cmp ax, 800h"], [62, "jbe short loc_4029E3"], [63, "mov esi, offset aMalformedElfHe"], [64, "mov edi, 1"], [65, "mov eax, 0"], [66, "call _errx"], [67, "mov rax, [rbp+var_50]"], [68, "mov eax, [rax+1Ch]"], [69, "mov ecx, eax"], [70, "mov eax, [rbp+fd]"], [71, "mov edx, 0"], [72, "mov rsi, rcx"], [73, "mov edi, eax"], [74, "call _lseek"], [75, "test rax, rax"], [76, "jns short loc_402A17"], [77, "mov esi, offset aSeekingToProgr"], [78, "mov edi, 1"], [79, "mov eax, 0"], [80, "call _err"], [81, "mov rax, [rbp+var_50]"], [82, "movzx eax, word ptr [rax+2Ch]"], [83, "movzx eax, ax"], [84, "shl rax, 5"], [85, "mov rdx, rax"], [86, "mov rcx, [rbp+buf]"], [87, "mov eax, [rbp+fd]"], [88, "mov rsi, rcx"], [89, "mov edi, eax"], [90, "call _read"], [91, "mov rdx, [rbp+var_50]"], [92, "movzx edx, word ptr [rdx+2Ch]"], [93, "movzx edx, dx"], [94, "shl rdx, 5"], [95, "cmp rax, rdx"], [96, "jz short loc_402A62"], [97, "mov esi, offset aReadingProgram"], [98, "mov edi, 1"], [99, "mov eax, 0"], [100, "call _err"], [101, "mov [rbp+var_24], 0"], [102, "jmp loc_402B38"], [103, "mov rdx, [rbp+buf]"], [104, "mov eax, [rbp+var_24]"], [105, "shl rax, 5"], [106, "add rax, rdx"], [107, "mov eax, [rax]"], [108, "cmp eax, 1"], [109, "jnz loc_402B33"], [110, "movzx eax, cs:byte_40A30C"], [111, "test al, al"], [112, "jz short loc_402AD3"], [113, "mov rdx, [rbp+buf]"], [114, "mov eax, [rbp+var_24]"], [115, "shl rax, 5"], [116, "add rax, rdx"], [117, "add rax, 0Ch"], [118, "mov eax, [rax]"], [119, "mov eax, eax"], [120, "mov rcx, rax"], [121, "mov rdx, [rbp+buf]"], [122, "mov eax, [rbp+var_24]"], [123, "shl rax, 5"], [124, "add rax, rdx"], [125, "add rax, 14h"], [126, "mov edx, [rax]"], [127, "mov eax, [rbp+var_24]"], [128, "mov esi, eax"], [129, "mov edi, offset aSectionISizeIA"], [130, "mov eax, 0"], [131, "call _printf"], [132, "mov rdx, [rbp+buf]"], [133, "mov eax, [rbp+var_24]"], [134, "shl rax, 5"], [135, "add rax, rdx"], [136, "add rax, 10h"], [137, "mov eax, [rax]"], [138, "mov r12d, eax"], [139, "mov rdx, [rbp+buf]"], [140, "mov eax, [rbp+var_24]"], [141, "shl rax, 5"], [142, "add rax, rdx"], [143, "add rax, 4"], [144, "mov eax, [rax]"], [145, "mov ebx, eax"], [146, "mov rdx, [rbp+buf]"], [147, "mov eax, [rbp+var_24]"], [148, "shl rax, 5"], [149, "add rax, rdx"], [150, "add rax, 0Ch"], [151, "mov eax, [rax]"], [152, "mov eax, eax"], [153, "mov rdi, rax"], [154, "call sub_4026FC"], [155, "mov rsi, rax"], [156, "mov eax, [rbp+fd]"], [157, "mov rcx, r12"], [158, "mov rdx, rbx"], [159, "mov edi, eax"], [160, "call sub_40285D"], [161, "jmp short loc_402B34"], [162, "nop"], [163, "add [rbp+var_24], 1"], [164, "mov rax, [rbp+var_50]"], [165, "movzx eax, word ptr [rax+2Ch]"], [166, "movzx eax, ax"], [167, "cmp [rbp+var_24], eax"], [168, "jb loc_402A6E"], [169, "mov rax, [rbp+var_50]"], [170, "mov eax, [rax+18h]"], [171, "mov eax, eax"], [172, "mov rsp, r13"], [173, "lea rsp, [rbp-18h]"], [174, "pop rbx"], [175, "pop r12"], [176, "pop r13"], [177, "pop rbp"], [178, "retn"]], "data_dep": [[8, 5], [9, 8], [10, 7], [11, 10], [12, 11], [13, 12], [14, 13], [15, 7], [16, 15], [17, 16], [18, 17], [20, 7], [21, 20], [22, 21], [23, 22], [25, 7], [26, 25], [27, 26], [28, 27], [29, 28], [31, 30], [32, 29], [32, 31], [35, 33], [36, 32], [37, 5], [37, 36], [38, 37], [39, 38], [40, 39], [41, 40], [42, 41], [43, 7], [44, 43], [45, 44], [46, 45], [47, 7], [48, 47], [49, 48], [50, 49], [51, 7], [52, 51], [53, 52], [54, 53], [55, 7], [56, 55], [57, 56], [58, 57], [59, 7], [60, 59], [61, 60], [62, 61], [67, 7], [68, 67], [69, 68], [70, 6], [72, 69], [73, 70], [75, 74], [76, 75], [81, 7], [82, 81], [83, 82], [84, 83], [85, 84], [86, 42], [87, 6], [88, 86], [89, 87], [91, 7], [92, 91], [93, 92], [94, 93], [95, 90], [95, 94], [96, 95], [103, 42], [104, 163], [104, 101], [105, 104], [106, 103], [106, 105], [107, 106], [108, 107], [109, 108], [111, 110], [112, 111], [113, 42], [114, 163], [114, 101], [115, 114], [116, 113], [116, 115], [117, 116], [118, 117], [119, 118], [120, 119], [121, 42], [122, 163], [122, 101], [123, 122], [124, 121], [124, 123], [125, 124], [126, 125], [127, 163], [127, 101], [128, 127], [132, 42], [133, 163], [133, 101], [134, 133], [135, 132], [135, 134], [136, 135], [137, 136], [138, 137], [139, 42], [140, 163], [140, 101], [141, 140], [142, 139], [142, 141], [143, 142], [144, 143], [145, 144], [146, 42], [147, 163], [147, 101], [148, 147], [149, 146], [149, 148], [150, 149], [151, 150], [152, 151], [153, 152], [155, 154], [156, 6], [157, 138], [158, 145], [159, 156], [163, 163], [163, 101], [164, 7], [165, 164], [166, 165], [167, 166], [167, 163], [167, 101], [168, 167], [169, 7], [170, 169], [171, 170], [172, 9], [173, 172], [174, 4], [175, 3], [176, 2], [177, 0], [178, 171]]}
{"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/892d4ad8f5dfe4411c8390258729963722141430ec472d7869a6e65f44b91019_892d4ad8f5dfe4411c8390258729963722141430ec472d7869a6e65f44b91019.jsonl.gz", "strip_func_name": "sub_4028F1", "query": "\n\n\n__int64 __fastcall sub_4028F1(int a1, __int64 a2)\n{\n__int64 v2; // r8\nvoid *v3; // rsp\nssize_t v4; // rax\nsize_t v5; // r12\n__off_t v6; // rbx\nvoid *v7; // rax\n__int64 v9; // [rsp+0h] [rbp-50h] BYREF\nint fd; // [rsp+Ch] [rbp-44h]\nvoid *buf; // [rsp+18h] [rbp-38h]\n__int64 v12; // [rsp+20h] [rbp-30h]\nunsigned int i; // [rsp+2Ch] [rbp-24h]\n\nfd = a1;\nv9 = a2;\nv12 = *(unsigned __int16 *)(a2 + 44) - 1LL;\nv2 = *(unsigned __int16 *)(a2 + 44);\nv3 = alloca(16 * ((32 * v2 + 15) / 0x10uLL));\nbuf = (void *)(4 * (((unsigned __int64)&v9 + 3) >> 2));\nif ( *(_WORD *)(a2 + 16) != 2\n|| *(_WORD *)(v9 + 18) != 3\n|| *(_WORD *)(v9 + 42) != 32\n|| !*(_WORD *)(v9 + 44)\n|| *(_WORD *)(v9 + 44) > 0x800u )\n{\nerrx(1, \"Malformed elf header\", (32 * v2 + 15) % 0x10uLL, v2, v2, 0LL, v9);\n}\nif ( lseek(fd, *(unsigned int *)(v9 + 28), 0) < 0 )\nerr(1, \"Seeking to program headers\");\nv4 = read(fd, buf, 32LL * *(unsigned __int16 *)(v9 + 44));\nif ( v4 != 32LL * *(unsigned __int16 *)(v9 + 44) )\nerr(1, \"Reading program headers\");\nfor ( i = 0; i < *(unsigned __int16 *)(v9 + 44); ++i )\n{\nif ( *((_DWORD *)buf + 8 * i) == 1 )\n{\nif ( byte_40A30C )\nprintf(\n\"Section %i: size %i addr %p\\n\",\ni,\n*((unsigned int *)buf + 8 * i + 5),\n(const void *)*((unsigned int *)buf + 8 * i + 3));\nv5 = *((unsigned int *)buf + 8 * i + 4);\nv6 = *((unsigned int *)buf + 8 * i + 1);\nv7 = (void *)sub_4026FC(*((unsigned int *)buf + 8 * i + 3));\nsub_40285D(fd, v7, v6, v5);\n}\n}\nreturn *(unsigned int *)(v9 + 24);\n}\n\n\n\nQ:[a1,a2,v9,fd,buf,sub_4028F1,sub_4026FC,sub_40285D,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'elf_fd', 'a2': 'ehdr', 'v9': 'ehdra', 'fd': 'elf_fda', 'buf': 'p_phdr', 'sub_4028F1': 'map_elf', 'sub_4026FC': 'from_guest_phys', 'sub_40285D': 'map_at'}"}
photon256_to_sliced_half
922fbcc7f72da3e6ee25595df561529f9c4e624ad482a61976861a82fdfe7fe1
rweather
lwc-finalists
NA
static void photon256_to_sliced_half(const reg_names *regs, int offset) { printf("\tldr\t%s, [r0, #%d]\n", regs->t0, offset); printf("\tldr\t%s, [r0, #%d]\n", regs->t1, offset + 4); printf("\tldr\t%s, [r0, #%d]\n", regs->t2, offset + 8); printf("\tldr\t%s, [r0, #%d]\n", regs->t3, offset + 12); photon256_to_sliced_word(regs, regs->t0); photon256_to_sliced_word(regs, regs->t1); photon256_to_sliced_word(regs, regs->t2); photon256_to_sliced_word(regs, regs->t3); printf("\tuxtb\t%s, %s\n", regs->s0, regs->t0); printf("\tuxtb\t%s, %s, ror #8\n", regs->s1, regs->t0); printf("\tuxtb\t%s, %s, ror #16\n", regs->s2, regs->t0); printf("\tuxtb\t%s, %s, ror #24\n", regs->s3, regs->t0); printf("\tbfi\t%s, %s, #8, #8\n", regs->s0, regs->t1); printf("\tbfi\t%s, %s, #16, #8\n", regs->s0, regs->t2); printf("\tbfi\t%s, %s, #24, #8\n", regs->s0, regs->t3); printf("\tlsr\t%s, %s, #8\n", regs->t1, regs->t1); printf("\tlsr\t%s, %s, #8\n", regs->t2, regs->t2); printf("\tlsr\t%s, %s, #8\n", regs->t3, regs->t3); printf("\tbfi\t%s, %s, #8, #8\n", regs->s1, regs->t1); printf("\tbfi\t%s, %s, #16, #8\n", regs->s1, regs->t2); printf("\tbfi\t%s, %s, #24, #8\n", regs->s1, regs->t3); printf("\tlsr\t%s, %s, #8\n", regs->t1, regs->t1); printf("\tlsr\t%s, %s, #8\n", regs->t2, regs->t2); printf("\tlsr\t%s, %s, #8\n", regs->t3, regs->t3); printf("\tbfi\t%s, %s, #8, #8\n", regs->s2, regs->t1); printf("\tbfi\t%s, %s, #16, #8\n", regs->s2, regs->t2); printf("\tbfi\t%s, %s, #24, #8\n", regs->s2, regs->t3); printf("\tlsr\t%s, %s, #8\n", regs->t1, regs->t1); printf("\tlsr\t%s, %s, #8\n", regs->t2, regs->t2); printf("\tlsr\t%s, %s, #8\n", regs->t3, regs->t3); printf("\tbfi\t%s, %s, #8, #8\n", regs->s3, regs->t1); printf("\tbfi\t%s, %s, #16, #8\n", regs->s3, regs->t2); printf("\tbfi\t%s, %s, #24, #8\n", regs->s3, regs->t3); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4016A2", "function_addr": 4200098, "binary_name": "922fbcc7f72da3e6ee25595df561529f9c4e624ad482a61976861a82fdfe7fe1.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_C], esi"], [5, "mov rax, [rbp+var_8]"], [6, "mov rax, [rax+20h]"], [7, "mov edx, [rbp+var_C]"], [8, "mov rsi, rax"], [9, "mov edi, offset aLdrSR0D"], [10, "mov eax, 0"], [11, "call _printf"], [12, "mov eax, [rbp+var_C]"], [13, "lea edx, [rax+4]"], [14, "mov rax, [rbp+var_8]"], [15, "mov rax, [rax+28h]"], [16, "mov rsi, rax"], [17, "mov edi, offset aLdrSR0D"], [18, "mov eax, 0"], [19, "call _printf"], [20, "mov eax, [rbp+var_C]"], [21, "lea edx, [rax+8]"], [22, "mov rax, [rbp+var_8]"], [23, "mov rax, [rax+30h]"], [24, "mov rsi, rax"], [25, "mov edi, offset aLdrSR0D"], [26, "mov eax, 0"], [27, "call _printf"], [28, "mov eax, [rbp+var_C]"], [29, "lea edx, [rax+0Ch]"], [30, "mov rax, [rbp+var_8]"], [31, "mov rax, [rax+38h]"], [32, "mov rsi, rax"], [33, "mov edi, offset aLdrSR0D"], [34, "mov eax, 0"], [35, "call _printf"], [36, "mov rax, [rbp+var_8]"], [37, "mov rdx, [rax+20h]"], [38, "mov rax, [rbp+var_8]"], [39, "mov rsi, rdx"], [40, "mov rdi, rax"], [41, "call sub_4015AC"], [42, "mov rax, [rbp+var_8]"], [43, "mov rdx, [rax+28h]"], [44, "mov rax, [rbp+var_8]"], [45, "mov rsi, rdx"], [46, "mov rdi, rax"], [47, "call sub_4015AC"], [48, "mov rax, [rbp+var_8]"], [49, "mov rdx, [rax+30h]"], [50, "mov rax, [rbp+var_8]"], [51, "mov rsi, rdx"], [52, "mov rdi, rax"], [53, "call sub_4015AC"], [54, "mov rax, [rbp+var_8]"], [55, "mov rdx, [rax+38h]"], [56, "mov rax, [rbp+var_8]"], [57, "mov rsi, rdx"], [58, "mov rdi, rax"], [59, "call sub_4015AC"], [60, "mov rax, [rbp+var_8]"], [61, "mov rdx, [rax+20h]"], [62, "mov rax, [rbp+var_8]"], [63, "mov rax, [rax]"], [64, "mov rsi, rax"], [65, "mov edi, offset aUxtbSS"], [66, "mov eax, 0"], [67, "call _printf"], [68, "mov rax, [rbp+var_8]"], [69, "mov rdx, [rax+20h]"], [70, "mov rax, [rbp+var_8]"], [71, "mov rax, [rax+8]"], [72, "mov rsi, rax"], [73, "mov edi, offset aUxtbSSRor8"], [74, "mov eax, 0"], [75, "call _printf"], [76, "mov rax, [rbp+var_8]"], [77, "mov rdx, [rax+20h]"], [78, "mov rax, [rbp+var_8]"], [79, "mov rax, [rax+10h]"], [80, "mov rsi, rax"], [81, "mov edi, offset aUxtbSSRor16"], [82, "mov eax, 0"], [83, "call _printf"], [84, "mov rax, [rbp+var_8]"], [85, "mov rdx, [rax+20h]"], [86, "mov rax, [rbp+var_8]"], [87, "mov rax, [rax+18h]"], [88, "mov rsi, rax"], [89, "mov edi, offset aUxtbSSRor24"], [90, "mov eax, 0"], [91, "call _printf"], [92, "mov rax, [rbp+var_8]"], [93, "mov rdx, [rax+28h]"], [94, "mov rax, [rbp+var_8]"], [95, "mov rax, [rax]"], [96, "mov rsi, rax"], [97, "mov edi, offset aBfiSS88"], [98, "mov eax, 0"], [99, "call _printf"], [100, "mov rax, [rbp+var_8]"], [101, "mov rdx, [rax+30h]"], [102, "mov rax, [rbp+var_8]"], [103, "mov rax, [rax]"], [104, "mov rsi, rax"], [105, "mov edi, offset aBfiSS168"], [106, "mov eax, 0"], [107, "call _printf"], [108, "mov rax, [rbp+var_8]"], [109, "mov rdx, [rax+38h]"], [110, "mov rax, [rbp+var_8]"], [111, "mov rax, [rax]"], [112, "mov rsi, rax"], [113, "mov edi, offset aBfiSS248"], [114, "mov eax, 0"], [115, "call _printf"], [116, "mov rax, [rbp+var_8]"], [117, "mov rdx, [rax+28h]"], [118, "mov rax, [rbp+var_8]"], [119, "mov rax, [rax+28h]"], [120, "mov rsi, rax"], [121, "mov edi, offset aLsrSS8"], [122, "mov eax, 0"], [123, "call _printf"], [124, "mov rax, [rbp+var_8]"], [125, "mov rdx, [rax+30h]"], [126, "mov rax, [rbp+var_8]"], [127, "mov rax, [rax+30h]"], [128, "mov rsi, rax"], [129, "mov edi, offset aLsrSS8"], [130, "mov eax, 0"], [131, "call _printf"], [132, "mov rax, [rbp+var_8]"], [133, "mov rdx, [rax+38h]"], [134, "mov rax, [rbp+var_8]"], [135, "mov rax, [rax+38h]"], [136, "mov rsi, rax"], [137, "mov edi, offset aLsrSS8"], [138, "mov eax, 0"], [139, "call _printf"], [140, "mov rax, [rbp+var_8]"], [141, "mov rdx, [rax+28h]"], [142, "mov rax, [rbp+var_8]"], [143, "mov rax, [rax+8]"], [144, "mov rsi, rax"], [145, "mov edi, offset aBfiSS88"], [146, "mov eax, 0"], [147, "call _printf"], [148, "mov rax, [rbp+var_8]"], [149, "mov rdx, [rax+30h]"], [150, "mov rax, [rbp+var_8]"], [151, "mov rax, [rax+8]"], [152, "mov rsi, rax"], [153, "mov edi, offset aBfiSS168"], [154, "mov eax, 0"], [155, "call _printf"], [156, "mov rax, [rbp+var_8]"], [157, "mov rdx, [rax+38h]"], [158, "mov rax, [rbp+var_8]"], [159, "mov rax, [rax+8]"], [160, "mov rsi, rax"], [161, "mov edi, offset aBfiSS248"], [162, "mov eax, 0"], [163, "call _printf"], [164, "mov rax, [rbp+var_8]"], [165, "mov rdx, [rax+28h]"], [166, "mov rax, [rbp+var_8]"], [167, "mov rax, [rax+28h]"], [168, "mov rsi, rax"], [169, "mov edi, offset aLsrSS8"], [170, "mov eax, 0"], [171, "call _printf"], [172, "mov rax, [rbp+var_8]"], [173, "mov rdx, [rax+30h]"], [174, "mov rax, [rbp+var_8]"], [175, "mov rax, [rax+30h]"], [176, "mov rsi, rax"], [177, "mov edi, offset aLsrSS8"], [178, "mov eax, 0"], [179, "call _printf"], [180, "mov rax, [rbp+var_8]"], [181, "mov rdx, [rax+38h]"], [182, "mov rax, [rbp+var_8]"], [183, "mov rax, [rax+38h]"], [184, "mov rsi, rax"], [185, "mov edi, offset aLsrSS8"], [186, "mov eax, 0"], [187, "call _printf"], [188, "mov rax, [rbp+var_8]"], [189, "mov rdx, [rax+28h]"], [190, "mov rax, [rbp+var_8]"], [191, "mov rax, [rax+10h]"], [192, "mov rsi, rax"], [193, "mov edi, offset aBfiSS88"], [194, "mov eax, 0"], [195, "call _printf"], [196, "mov rax, [rbp+var_8]"], [197, "mov rdx, [rax+30h]"], [198, "mov rax, [rbp+var_8]"], [199, "mov rax, [rax+10h]"], [200, "mov rsi, rax"], [201, "mov edi, offset aBfiSS168"], [202, "mov eax, 0"], [203, "call _printf"], [204, "mov rax, [rbp+var_8]"], [205, "mov rdx, [rax+38h]"], [206, "mov rax, [rbp+var_8]"], [207, "mov rax, [rax+10h]"], [208, "mov rsi, rax"], [209, "mov edi, offset aBfiSS248"], [210, "mov eax, 0"], [211, "call _printf"], [212, "mov rax, [rbp+var_8]"], [213, "mov rdx, [rax+28h]"], [214, "mov rax, [rbp+var_8]"], [215, "mov rax, [rax+28h]"], [216, "mov rsi, rax"], [217, "mov edi, offset aLsrSS8"], [218, "mov eax, 0"], [219, "call _printf"], [220, "mov rax, [rbp+var_8]"], [221, "mov rdx, [rax+30h]"], [222, "mov rax, [rbp+var_8]"], [223, "mov rax, [rax+30h]"], [224, "mov rsi, rax"], [225, "mov edi, offset aLsrSS8"], [226, "mov eax, 0"], [227, "call _printf"], [228, "mov rax, [rbp+var_8]"], [229, "mov rdx, [rax+38h]"], [230, "mov rax, [rbp+var_8]"], [231, "mov rax, [rax+38h]"], [232, "mov rsi, rax"], [233, "mov edi, offset aLsrSS8"], [234, "mov eax, 0"], [235, "call _printf"], [236, "mov rax, [rbp+var_8]"], [237, "mov rdx, [rax+28h]"], [238, "mov rax, [rbp+var_8]"], [239, "mov rax, [rax+18h]"], [240, "mov rsi, rax"], [241, "mov edi, offset aBfiSS88"], [242, "mov eax, 0"], [243, "call _printf"], [244, "mov rax, [rbp+var_8]"], [245, "mov rdx, [rax+30h]"], [246, "mov rax, [rbp+var_8]"], [247, "mov rax, [rax+18h]"], [248, "mov rsi, rax"], [249, "mov edi, offset aBfiSS168"], [250, "mov eax, 0"], [251, "call _printf"], [252, "mov rax, [rbp+var_8]"], [253, "mov rdx, [rax+38h]"], [254, "mov rax, [rbp+var_8]"], [255, "mov rax, [rax+18h]"], [256, "mov rsi, rax"], [257, "mov edi, offset aBfiSS248"], [258, "mov eax, 0"], [259, "call _printf"], [260, "nop"], [261, "leave"], [262, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 4], [8, 6], [12, 4], [13, 12], [13, 7], [14, 3], [15, 14], [16, 15], [20, 4], [21, 20], [21, 13], [22, 3], [23, 22], [24, 23], [28, 4], [29, 28], [29, 21], [30, 3], [31, 30], [32, 31], [36, 3], [37, 36], [38, 3], [39, 37], [40, 38], [42, 3], [43, 42], [44, 3], [45, 43], [46, 44], [48, 3], [49, 48], [50, 3], [51, 49], [52, 50], [54, 3], [55, 54], [56, 3], [57, 55], [58, 56], [60, 3], [61, 60], [62, 3], [63, 62], [64, 63], [68, 3], [69, 68], [70, 3], [71, 70], [72, 71], [76, 3], [77, 76], [78, 3], [79, 78], [80, 79], [84, 3], [85, 84], [86, 3], [87, 86], [88, 87], [92, 3], [93, 92], [94, 3], [95, 94], [96, 95], [100, 3], [101, 100], [102, 3], [103, 102], [104, 103], [108, 3], [109, 108], [110, 3], [111, 110], [112, 111], [116, 3], [117, 116], [118, 3], [119, 118], [120, 119], [124, 3], [125, 124], [126, 3], [127, 126], [128, 127], [132, 3], [133, 132], [134, 3], [135, 134], [136, 135], [140, 3], [141, 140], [142, 3], [143, 142], [144, 143], [148, 3], [149, 148], [150, 3], [151, 150], [152, 151], [156, 3], [157, 156], [158, 3], [159, 158], [160, 159], [164, 3], [165, 164], [166, 3], [167, 166], [168, 167], [172, 3], [173, 172], [174, 3], [175, 174], [176, 175], [180, 3], [181, 180], [182, 3], [183, 182], [184, 183], [188, 3], [189, 188], [190, 3], [191, 190], [192, 191], [196, 3], [197, 196], [198, 3], [199, 198], [200, 199], [204, 3], [205, 204], [206, 3], [207, 206], [208, 207], [212, 3], [213, 212], [214, 3], [215, 214], [216, 215], [220, 3], [221, 220], [222, 3], [223, 222], [224, 223], [228, 3], [229, 228], [230, 3], [231, 230], [232, 231], [236, 3], [237, 236], [238, 3], [239, 238], [240, 239], [244, 3], [245, 244], [246, 3], [247, 246], [248, 247], [252, 3], [253, 252], [254, 3], [255, 254], [256, 255], [262, 259]]}
{"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/922fbcc7f72da3e6ee25595df561529f9c4e624ad482a61976861a82fdfe7fe1_922fbcc7f72da3e6ee25595df561529f9c4e624ad482a61976861a82fdfe7fe1.jsonl.gz", "strip_func_name": "sub_4016A2", "query": "\n\n\nint __fastcall sub_4016A2(const char **a1, unsigned int a2)\n{\nprintf(\"\\tldr\\t%s, [r0, #%d]\\n\", a1[4], a2);\nprintf(\"\\tldr\\t%s, [r0, #%d]\\n\", a1[5], a2 + 4);\nprintf(\"\\tldr\\t%s, [r0, #%d]\\n\", a1[6], a2 + 8);\nprintf(\"\\tldr\\t%s, [r0, #%d]\\n\", a1[7], a2 + 12);\nsub_4015AC((__int64)a1, a1[4]);\nsub_4015AC((__int64)a1, a1[5]);\nsub_4015AC((__int64)a1, a1[6]);\nsub_4015AC((__int64)a1, a1[7]);\nprintf(\"\\tuxtb\\t%s, %s\\n\", *a1, a1[4]);\nprintf(\"\\tuxtb\\t%s, %s, ror #8\\n\", a1[1], a1[4]);\nprintf(\"\\tuxtb\\t%s, %s, ror #16\\n\", a1[2], a1[4]);\nprintf(\"\\tuxtb\\t%s, %s, ror #24\\n\", a1[3], a1[4]);\nprintf(\"\\tbfi\\t%s, %s, #8, #8\\n\", *a1, a1[5]);\nprintf(\"\\tbfi\\t%s, %s, #16, #8\\n\", *a1, a1[6]);\nprintf(\"\\tbfi\\t%s, %s, #24, #8\\n\", *a1, a1[7]);\nprintf(\"\\tlsr\\t%s, %s, #8\\n\", a1[5], a1[5]);\nprintf(\"\\tlsr\\t%s, %s, #8\\n\", a1[6], a1[6]);\nprintf(\"\\tlsr\\t%s, %s, #8\\n\", a1[7], a1[7]);\nprintf(\"\\tbfi\\t%s, %s, #8, #8\\n\", a1[1], a1[5]);\nprintf(\"\\tbfi\\t%s, %s, #16, #8\\n\", a1[1], a1[6]);\nprintf(\"\\tbfi\\t%s, %s, #24, #8\\n\", a1[1], a1[7]);\nprintf(\"\\tlsr\\t%s, %s, #8\\n\", a1[5], a1[5]);\nprintf(\"\\tlsr\\t%s, %s, #8\\n\", a1[6], a1[6]);\nprintf(\"\\tlsr\\t%s, %s, #8\\n\", a1[7], a1[7]);\nprintf(\"\\tbfi\\t%s, %s, #8, #8\\n\", a1[2], a1[5]);\nprintf(\"\\tbfi\\t%s, %s, #16, #8\\n\", a1[2], a1[6]);\nprintf(\"\\tbfi\\t%s, %s, #24, #8\\n\", a1[2], a1[7]);\nprintf(\"\\tlsr\\t%s, %s, #8\\n\", a1[5], a1[5]);\nprintf(\"\\tlsr\\t%s, %s, #8\\n\", a1[6], a1[6]);\nprintf(\"\\tlsr\\t%s, %s, #8\\n\", a1[7], a1[7]);\nprintf(\"\\tbfi\\t%s, %s, #8, #8\\n\", a1[3], a1[5]);\nprintf(\"\\tbfi\\t%s, %s, #16, #8\\n\", a1[3], a1[6]);\nreturn printf(\"\\tbfi\\t%s, %s, #24, #8\\n\", a1[3], a1[7]);\n}\n\n\n\nQ:[a1,a2,sub_4016A2,sub_4015AC,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'regs', 'a2': 'offset', 'sub_4016A2': 'photon256_to_sliced_half', 'sub_4015AC': 'photon256_to_sliced_word'}"}
lv_example_flex_1
1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a
FASTSHIFT
lv_gba_emu
NA
void lv_example_flex_1(void) { /*Create a container with ROW flex direction*/ lv_obj_t * cont_row = lv_obj_create(lv_scr_act()); lv_obj_set_size(cont_row, 300, 75); lv_obj_align(cont_row, LV_ALIGN_TOP_MID, 0, 5); lv_obj_set_flex_flow(cont_row, LV_FLEX_FLOW_ROW); /*Create a container with COLUMN flex direction*/ lv_obj_t * cont_col = lv_obj_create(lv_scr_act()); lv_obj_set_size(cont_col, 200, 150); lv_obj_align_to(cont_col, cont_row, LV_ALIGN_OUT_BOTTOM_MID, 0, 5); lv_obj_set_flex_flow(cont_col, LV_FLEX_FLOW_COLUMN); uint32_t i; for(i = 0; i < 10; i++) { lv_obj_t * obj; lv_obj_t * label; /*Add items to the row*/ obj = lv_btn_create(cont_row); lv_obj_set_size(obj, 100, LV_PCT(100)); label = lv_label_create(obj); lv_label_set_text_fmt(label, "Item: %"LV_PRIu32"", i); lv_obj_center(label); /*Add items to the column*/ obj = lv_btn_create(cont_col); lv_obj_set_size(obj, LV_PCT(100), LV_SIZE_CONTENT); label = lv_label_create(obj); lv_label_set_text_fmt(label, "Item: %"LV_PRIu32, i); lv_obj_center(label); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4828E0", "function_addr": 4729056, "binary_name": "1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "call sub_4828A3"], [4, "mov rdi, rax"], [5, "call sub_427F67"], [6, "mov [rbp+var_10], rax"], [7, "mov rax, [rbp+var_10]"], [8, "mov edx, 4Bh "], [9, "mov esi, 12Ch"], [10, "mov rdi, rax"], [11, "call sub_4304B6"], [12, "mov rax, [rbp+var_10]"], [13, "mov ecx, 5"], [14, "mov edx, 0"], [15, "mov esi, 2"], [16, "mov rdi, rax"], [17, "call sub_4308BB"], [18, "mov rax, [rbp+var_10]"], [19, "mov esi, 0"], [20, "mov rdi, rax"], [21, "call sub_44BFD7"], [22, "call sub_4828A3"], [23, "mov rdi, rax"], [24, "call sub_427F67"], [25, "mov [rbp+var_18], rax"], [26, "mov rax, [rbp+var_18]"], [27, "mov edx, 96h"], [28, "mov esi, 0C8h"], [29, "mov rdi, rax"], [30, "call sub_4304B6"], [31, "mov rsi, [rbp+var_10]"], [32, "mov rax, [rbp+var_18]"], [33, "mov r8d, 5"], [34, "mov ecx, 0"], [35, "mov edx, 0Eh"], [36, "mov rdi, rax"], [37, "call sub_430906"], [38, "mov rax, [rbp+var_18]"], [39, "mov esi, 1"], [40, "mov rdi, rax"], [41, "call sub_44BFD7"], [42, "mov [rbp+var_4], 0"], [43, "jmp loc_482A59"], [44, "mov rax, [rbp+var_10]"], [45, "mov rdi, rax"], [46, "call sub_47E8D6"], [47, "mov [rbp+var_20], rax"], [48, "mov rax, [rbp+var_20]"], [49, "mov edx, 2064h"], [50, "mov esi, 64h "], [51, "mov rdi, rax"], [52, "call sub_4304B6"], [53, "mov rax, [rbp+var_20]"], [54, "mov rdi, rax"], [55, "call sub_47B72A"], [56, "mov [rbp+var_28], rax"], [57, "mov edx, [rbp+var_4]"], [58, "mov rax, [rbp+var_28]"], [59, "mov esi, offset aItemU"], [60, "mov rdi, rax"], [61, "mov eax, 0"], [62, "call sub_47B89F"], [63, "mov rax, [rbp+var_28]"], [64, "mov rdi, rax"], [65, "call sub_4828B6"], [66, "mov rax, [rbp+var_18]"], [67, "mov rdi, rax"], [68, "call sub_47E8D6"], [69, "mov [rbp+var_20], rax"], [70, "mov rax, [rbp+var_20]"], [71, "mov edx, 27D1h"], [72, "mov esi, 2064h"], [73, "mov rdi, rax"], [74, "call sub_4304B6"], [75, "mov rax, [rbp+var_20]"], [76, "mov rdi, rax"], [77, "call sub_47B72A"], [78, "mov [rbp+var_28], rax"], [79, "mov edx, [rbp+var_4]"], [80, "mov rax, [rbp+var_28]"], [81, "mov esi, offset aItemU"], [82, "mov rdi, rax"], [83, "mov eax, 0"], [84, "call sub_47B89F"], [85, "mov rax, [rbp+var_28]"], [86, "mov rdi, rax"], [87, "call sub_4828B6"], [88, "add [rbp+var_4], 1"], [89, "cmp [rbp+var_4], 9"], [90, "jbe loc_48299F"], [91, "nop"], [92, "nop"], [93, "leave"], [94, "retn"]], "data_dep": [[4, 3], [6, 5], [7, 6], [10, 7], [12, 6], [16, 12], [18, 6], [20, 18], [23, 22], [25, 24], [26, 25], [29, 26], [31, 6], [32, 25], [36, 32], [38, 25], [40, 38], [44, 6], [45, 44], [47, 46], [48, 47], [51, 48], [53, 47], [54, 53], [56, 55], [57, 88], [57, 42], [58, 56], [60, 58], [63, 56], [64, 63], [66, 25], [67, 66], [69, 68], [70, 69], [73, 70], [75, 69], [76, 75], [78, 77], [79, 88], [79, 42], [80, 78], [82, 80], [85, 78], [86, 85], [88, 42], [88, 88], [89, 88], [89, 42], [90, 89], [94, 87], [94, 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/1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a_1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a.jsonl.gz", "strip_func_name": "sub_4828E0", "query": "\n\n\n__int64 sub_4828E0()\n{\n__int64 v0; // rax\n__int64 v1; // rax\n__int64 result; // rax\n__int64 v3; // rcx\n__int64 v4; // r8\n__int64 v5; // r9\n__int64 v6; // rcx\n__int64 v7; // r8\n__int64 v8; // r9\nint *v9; // [rsp+8h] [rbp-28h]\nint *v10; // [rsp+8h] [rbp-28h]\nint *v11; // [rsp+10h] [rbp-20h]\nint *v12; // [rsp+10h] [rbp-20h]\n__int64 v13; // [rsp+18h] [rbp-18h]\n__int64 v14; // [rsp+20h] [rbp-10h]\nunsigned int i; // [rsp+2Ch] [rbp-4h]\n\nv0 = sub_4828A3();\nv14 = sub_427F67(v0);\nsub_4304B6(v14, 300, 75);\nsub_4308BB(v14, 2u, 0, 5);\nsub_44BFD7(v14, 0);\nv1 = sub_4828A3();\nv13 = sub_427F67(v1);\nsub_4304B6(v13, 200, 150);\nsub_430906(v13, v14, 14, 0, 5);\nresult = sub_44BFD7(v13, 1u);\nfor ( i = 0; i <= 9; ++i )\n{\nv11 = sub_47E8D6(v14);\nsub_4304B6((__int64)v11, 100, 8292);\nv9 = sub_47B72A((__int64)v11);\nsub_47B89F((__int64)v9, \"Item: %u\", i, v3, v4, v5);\nsub_4828B6((__int64)v9);\nv12 = sub_47E8D6(v13);\nsub_4304B6((__int64)v12, 8292, 10193);\nv10 = sub_47B72A((__int64)v12);\nsub_47B89F((__int64)v10, \"Item: %u\", i, v6, v7, v8);\nresult = sub_4828B6((__int64)v10);\n}\nreturn result;\n}\n\n\n\nQ:[v9,v11,v13,v14,sub_4828E0,sub_4828A3,sub_427F67,sub_4304B6,sub_4308BB,sub_44BFD7,sub_430906,sub_47E8D6,sub_47B72A,sub_47B89F,sub_4828B6,]\nAssistant: ", "hints": "[]", "response": "{'v9': 'labela', 'v11': 'obj', 'v13': 'cont_col', 'v14': 'cont_row', 'sub_4828E0': 'lv_example_flex_1', 'sub_4828A3': 'lv_scr_act_33', 'sub_427F67': 'lv_obj_create', 'sub_4304B6': 'lv_obj_set_size', 'sub_4308BB': 'lv_obj_align', 'sub_44BFD7': 'lv_obj_set_flex_flow', 'sub_430906': 'lv_obj_align_to', 'sub_47E8D6': 'lv_btn_create', 'sub_47B72A': 'lv_label_create', 'sub_47B89F': 'lv_label_set_text_fmt', 'sub_4828B6': 'lv_obj_center_30'}"}
BMK_setNbIterations
ca8e612d3fd0fdfbb7d379738cbd55f8d41d34510beb9e95c96b381a701a295d
dinhvh
kvdb
NA
void BMK_setNbIterations(int nbLoops) { nbIterations = nbLoops; DISPLAY("- %i iterations -\n", nbIterations); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_419CD2", "function_addr": 4299986, "binary_name": "ca8e612d3fd0fdfbb7d379738cbd55f8d41d34510beb9e95c96b381a701a295d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_4], edi"], [4, "mov eax, [rbp+var_4]"], [5, "mov cs:dword_425184, eax"], [6, "mov edx, cs:dword_425184"], [7, "mov rax, cs:stderr"], [8, "mov esi, offset format"], [9, "mov rdi, rax"], [10, "mov eax, 0"], [11, "call _fprintf"], [12, "nop"], [13, "leave"], [14, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [9, 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/ca8e612d3fd0fdfbb7d379738cbd55f8d41d34510beb9e95c96b381a701a295d_ca8e612d3fd0fdfbb7d379738cbd55f8d41d34510beb9e95c96b381a701a295d.jsonl.gz", "strip_func_name": "sub_419CD2", "query": "\n\n\nint __fastcall sub_419CD2(unsigned int a1)\n{\ndword_425184 = a1;\nreturn fprintf(stderr, \"- %i iterations -\\n\", a1);\n}\n\n\n\nQ:[a1,sub_419CD2,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'nbLoops', 'sub_419CD2': 'BMK_setNbIterations'}"}
push_break_entry
14b4410c8e8a2353de548309387c938c5992a16f6551c711ac38d6178ebe7243
sunnyxx
quickjs-debug
NA
static void push_break_entry(JSFunctionDef *fd, BlockEnv *be, JSAtom label_name, int label_break, int label_cont, int drop_count) { be->prev = fd->top_break; fd->top_break = be; be->label_name = label_name; be->label_break = label_break; be->label_cont = label_cont; be->drop_count = drop_count; be->label_finally = -1; be->scope_level = fd->scope_level; be->has_iterator = FALSE; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_446996", "function_addr": 4483478, "binary_name": "14b4410c8e8a2353de548309387c938c5992a16f6551c711ac38d6178ebe7243.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_14], edx"], [5, "mov [rbp+var_18], ecx"], [6, "mov [rbp+var_1C], r8d"], [7, "mov [rbp+var_20], r9d"], [8, "mov rax, [rbp+var_8]"], [9, "mov rdx, [rax+158h]"], [10, "mov rax, [rbp+var_10]"], [11, "mov [rax], rdx"], [12, "mov rax, [rbp+var_8]"], [13, "mov rdx, [rbp+var_10]"], [14, "mov [rax+158h], rdx"], [15, "mov rax, [rbp+var_10]"], [16, "mov edx, [rbp+var_14]"], [17, "mov [rax+8], edx"], [18, "mov rax, [rbp+var_10]"], [19, "mov edx, [rbp+var_18]"], [20, "mov [rax+0Ch], edx"], [21, "mov rax, [rbp+var_10]"], [22, "mov edx, [rbp+var_1C]"], [23, "mov [rax+10h], edx"], [24, "mov rax, [rbp+var_10]"], [25, "mov edx, [rbp+var_20]"], [26, "mov [rax+14h], edx"], [27, "mov rax, [rbp+var_10]"], [28, "mov dword ptr [rax+18h], 0FFFFFFFFh"], [29, "mov rax, [rbp+var_8]"], [30, "mov edx, [rax+0C4h]"], [31, "mov rax, [rbp+var_10]"], [32, "mov [rax+1Ch], edx"], [33, "mov rax, [rbp+var_10]"], [34, "mov dword ptr [rax+20h], 0"], [35, "nop"], [36, "pop rbp"], [37, "retn"]], "data_dep": [[8, 2], [9, 8], [10, 3], [11, 10], [11, 9], [12, 2], [13, 3], [14, 13], [14, 12], [15, 3], [16, 4], [17, 15], [17, 16], [18, 3], [19, 5], [20, 19], [20, 18], [21, 3], [22, 6], [23, 22], [23, 21], [24, 3], [25, 7], [26, 24], [26, 25], [27, 3], [28, 27], [29, 2], [30, 29], [30, 28], [31, 3], [32, 31], [32, 30], [33, 3], [34, 33], [36, 0], [37, 33]]}
{"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/14b4410c8e8a2353de548309387c938c5992a16f6551c711ac38d6178ebe7243_14b4410c8e8a2353de548309387c938c5992a16f6551c711ac38d6178ebe7243.jsonl.gz", "strip_func_name": "sub_446996", "query": "\n\n\n__int64 __fastcall sub_446996(__int64 a1, __int64 a2, int a3, int a4, int a5, int a6)\n{\n__int64 result; // rax\n\n*(_QWORD *)a2 = *(_QWORD *)(a1 + 344);\n*(_QWORD *)(a1 + 344) = a2;\n*(_DWORD *)(a2 + 8) = a3;\n*(_DWORD *)(a2 + 12) = a4;\n*(_DWORD *)(a2 + 16) = a5;\n*(_DWORD *)(a2 + 20) = a6;\n*(_DWORD *)(a2 + 24) = -1;\n*(_DWORD *)(a2 + 28) = *(_DWORD *)(a1 + 196);\nresult = a2;\n*(_DWORD *)(a2 + 32) = 0;\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,sub_446996,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'label_name', 'a4': 'label_break', 'a1': 'fd', 'a2': 'be', 'a5': 'label_cont', 'a6': 'drop_count', 'sub_446996': 'push_break_entry'}"}
myencoding_decode_windows_1258
0ba8a8093138821c3e049eff861e4e240142bd87437f4360348cd9ec525238e1
lexborisov
Modest
NA
myencoding_status_t myencoding_decode_windows_1258(unsigned const char data, myencoding_result_t *res) { if(data <= 0x7F) (res->result = data); else (res->result = myencoding_map_windows_1258[(data - 0x80)]); return MyENCODING_STATUS_OK; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4024C8", "function_addr": 4203720, "binary_name": "0ba8a8093138821c3e049eff861e4e240142bd87437f4360348cd9ec525238e1.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, edi"], [3, "mov [rbp+var_10], rsi"], [4, "mov [rbp+var_4], al"], [5, "movzx eax, [rbp+var_4]"], [6, "test al, al"], [7, "js short loc_4024EB"], [8, "movzx edx, [rbp+var_4]"], [9, "mov rax, [rbp+var_10]"], [10, "mov [rax+18h], rdx"], [11, "jmp short loc_40250F"], [12, "movzx eax, [rbp+var_4]"], [13, "add eax, 0FFFFFF80h"], [14, "cdqe"], [15, "lea rdx, ds:0[rax*8]"], [16, "lea rax, unk_4BD7C0"], [17, "mov rdx, [rdx+rax]"], [18, "mov rax, [rbp+var_10]"], [19, "mov [rax+18h], rdx"], [20, "mov eax, 0"], [21, "pop rbp"], [22, "retn"]], "data_dep": [[4, 2], [5, 4], [6, 5], [7, 6], [8, 4], [9, 3], [10, 8], [10, 9], [12, 4], [13, 12], [16, 13], [17, 16], [18, 3], [19, 17], [19, 18], [21, 0], [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/0ba8a8093138821c3e049eff861e4e240142bd87437f4360348cd9ec525238e1_0ba8a8093138821c3e049eff861e4e240142bd87437f4360348cd9ec525238e1.jsonl.gz", "strip_func_name": "sub_4024C8", "query": "\n\n\n__int64 __fastcall sub_4024C8(unsigned __int8 a1, __int64 a2)\n{\nif ( (a1 & 0x80u) != 0 )\n*(_QWORD *)(a2 + 24) = qword_4BD7C0[a1 - 128];\nelse\n*(_QWORD *)(a2 + 24) = a1;\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,sub_4024C8,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'data', 'a2': 'res', 'sub_4024C8': 'myencoding_decode_windows_1258'}"}
detach
59e38d28aabe42db81b9a29bf97cdbff97200e90593c16b1ecf0d6253ce280e0
martanne
dvtm
NA
static void detach(Client *c) { Client *d; if (c->prev) c->prev->next = c->next; if (c->next) { c->next->prev = c->prev; for (d = nextvisible(c->next); d; d = nextvisible(d->next)) --d->order; } if (c == clients) clients = c->next; c->next = c->prev = NULL; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4052FB", "function_addr": 4215547, "binary_name": "59e38d28aabe42db81b9a29bf97cdbff97200e90593c16b1ecf0d6253ce280e0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 18h"], [3, "mov [rbp+var_18], rdi"], [4, "mov rax, [rbp+var_18]"], [5, "mov rax, [rax+160h]"], [6, "test rax, rax"], [7, "jz short loc_405334"], [8, "mov rax, [rbp+var_18]"], [9, "mov rax, [rax+160h]"], [10, "mov rdx, [rbp+var_18]"], [11, "mov rdx, [rdx+158h]"], [12, "mov [rax+158h], rdx"], [13, "mov rax, [rbp+var_18]"], [14, "mov rax, [rax+158h]"], [15, "test rax, rax"], [16, "jz short loc_4053AF"], [17, "mov rax, [rbp+var_18]"], [18, "mov rax, [rax+158h]"], [19, "mov rdx, [rbp+var_18]"], [20, "mov rdx, [rdx+160h]"], [21, "mov [rax+160h], rdx"], [22, "mov rax, [rbp+var_18]"], [23, "mov rax, [rax+158h]"], [24, "mov rdi, rax"], [25, "call sub_4044F7"], [26, "mov [rbp+var_8], rax"], [27, "jmp short loc_4053A8"], [28, "mov rax, [rbp+var_8]"], [29, "mov eax, [rax+138h]"], [30, "lea edx, [rax-1]"], [31, "mov rax, [rbp+var_8]"], [32, "mov [rax+138h], edx"], [33, "mov rax, [rbp+var_8]"], [34, "mov rax, [rax+158h]"], [35, "mov rdi, rax"], [36, "call sub_4044F7"], [37, "mov [rbp+var_8], rax"], [38, "cmp [rbp+var_8], 0"], [39, "jnz short loc_40537A"], [40, "mov rax, cs:qword_4158A0"], [41, "cmp [rbp+var_18], rax"], [42, "jnz short loc_4053CE"], [43, "mov rax, [rbp+var_18]"], [44, "mov rax, [rax+158h]"], [45, "mov cs:qword_4158A0, rax"], [46, "mov rax, [rbp+var_18]"], [47, "mov qword ptr [rax+160h], 0"], [48, "mov rax, [rbp+var_18]"], [49, "mov rdx, [rax+160h]"], [50, "mov rax, [rbp+var_18]"], [51, "mov [rax+158h], rdx"], [52, "nop"], [53, "leave"], [54, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 3], [9, 8], [10, 3], [11, 10], [12, 9], [12, 11], [13, 3], [14, 13], [14, 12], [15, 14], [16, 15], [17, 3], [18, 17], [18, 12], [18, 21], [19, 3], [20, 19], [20, 12], [20, 21], [21, 18], [21, 20], [22, 3], [23, 22], [23, 12], [23, 21], [24, 23], [26, 25], [28, 26], [28, 37], [29, 32], [29, 28], [29, 12], [29, 21], [30, 12], [30, 21], [30, 30], [30, 20], [30, 32], [30, 29], [31, 26], [31, 37], [32, 31], [32, 30], [33, 26], [33, 37], [34, 12], [34, 33], [34, 32], [35, 34], [37, 36], [38, 26], [38, 37], [39, 38], [41, 40], [41, 3], [42, 41], [43, 3], [44, 32], [44, 43], [44, 12], [44, 21], [45, 44], [46, 3], [47, 46], [48, 3], [49, 47], [49, 48], [50, 3], [51, 50], [51, 49], [54, 50]]}
{"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/59e38d28aabe42db81b9a29bf97cdbff97200e90593c16b1ecf0d6253ce280e0_59e38d28aabe42db81b9a29bf97cdbff97200e90593c16b1ecf0d6253ce280e0.jsonl.gz", "strip_func_name": "sub_4052FB", "query": "\n\n\n__int64 __fastcall sub_4052FB(__int64 a1)\n{\n__int64 result; // rax\n__int64 i; // [rsp+10h] [rbp-8h]\n\nif ( *(_QWORD *)(a1 + 352) )\n*(_QWORD *)(*(_QWORD *)(a1 + 352) + 344LL) = *(_QWORD *)(a1 + 344);\nif ( *(_QWORD *)(a1 + 344) )\n{\n*(_QWORD *)(*(_QWORD *)(a1 + 344) + 352LL) = *(_QWORD *)(a1 + 352);\nfor ( i = sub_4044F7(*(_QWORD *)(a1 + 344)); i; i = sub_4044F7(*(_QWORD *)(i + 344)) )\n--*(_DWORD *)(i + 312);\n}\nif ( a1 == qword_4158A0 )\nqword_4158A0 = *(_QWORD *)(a1 + 344);\n*(_QWORD *)(a1 + 352) = 0LL;\nresult = a1;\n*(_QWORD *)(a1 + 344) = *(_QWORD *)(a1 + 352);\nreturn result;\n}\n\n\n\nQ:[a1,i,sub_4052FB,sub_4044F7,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'c', 'i': 'd', 'sub_4052FB': 'detach', 'sub_4044F7': 'nextvisible'}"}
EVP_PKEY_meth_set_ctrl
03c200181d5bd9d9aef7e21f9916a04779b98f82f54c02e756e7d6abb15fdf67
RKX1209
bitvisor-gdb
NA
void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth, int (*ctrl)(EVP_PKEY_CTX *ctx, int type, int p1, void *p2), int (*ctrl_str)(EVP_PKEY_CTX *ctx, const char *type, const char *value)) { pmeth->ctrl = ctrl; pmeth->ctrl_str = ctrl_str; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42A861", "function_addr": 4368481, "binary_name": "03c200181d5bd9d9aef7e21f9916a04779b98f82f54c02e756e7d6abb15fdf67.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 rdx, [rbp+var_10]"], [7, "mov [rax+0C0h], rdx"], [8, "mov rax, [rbp+var_8]"], [9, "mov rdx, [rbp+var_18]"], [10, "mov [rax+0C8h], rdx"], [11, "nop"], [12, "pop rbp"], [13, "retn"]], "data_dep": [[5, 2], [6, 3], [7, 6], [7, 5], [8, 2], [9, 4], [10, 8], [10, 9], [12, 0], [13, 8]]}
{"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_42A861", "query": "\n\n\n__int64 __fastcall sub_42A861(__int64 a1, __int64 a2, __int64 a3)\n{\n__int64 result; // rax\n\n*(_QWORD *)(a1 + 192) = a2;\nresult = a1;\n*(_QWORD *)(a1 + 200) = a3;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_42A861,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'ctrl_str', 'a1': 'pmeth', 'a2': 'ctrl', 'sub_42A861': 'EVP_PKEY_meth_set_ctrl'}"}
cart_init_cartrom
31edd0f0ae447e7af5eb88e621b90258cba9798d06caf6830842b9d85879f0ba
jkbenaim
cboy
NA
void cart_init_cartrom(char *cartromName) { struct stat sb; FILE *fd; // Load the cart rom. // First, find its filesize. if (stat(cartromName, &sb) == -1) { fprintf(stderr, "Couldn't find cart rom: %s.\n", cartromName); exit(1); } if (sb.st_size > MAX_CARTROM_SIZE) cart.cartromsize = MAX_CARTROM_SIZE; else cart.cartromsize = sb.st_size; // Allocate memory for the cartrom. if ((cart.cartrom = (uint8_t *) malloc(cart.cartromsize)) == NULL) { fprintf(stderr, "Cart rom malloc failed.\n"); exit(1); } // Read the cartrom. //printf( "Loading cart rom: %s\n", cartromName ); fd = fopen(cartromName, "r"); if (fread(cart.cartrom, cart.cartromsize, 1, fd) != 1) { fprintf(stderr, "Reading cart rom failed.\n"); exit(1); } fclose(fd); //printf( "Cart rom: %d bytes read.\n", cart.cartromsize ); cart.cartrom_num_banks = cart.cartromsize / 16384; if (cart.cartromsize % 16384 != 0) { printf("Warning: cart rom not a multiple of 16384 bytes\n"); cart.cartrom_num_banks++; } // Set savename romname2savename(cart.savename, cartromName, 256); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404EE3", "function_addr": 4214499, "binary_name": "31edd0f0ae447e7af5eb88e621b90258cba9798d06caf6830842b9d85879f0ba.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0B0h"], [3, "mov [rbp+filename], rdi"], [4, "lea rdx, [rbp+stat_buf]"], [5, "mov rax, [rbp+filename]"], [6, "mov rsi, rdx"], [7, "mov rdi, rax"], [8, "call sub_4118A0"], [9, "cmp eax, 0FFFFFFFFh"], [10, "jnz short loc_404F3D"], [11, "mov rax, cs:__bss_start"], [12, "mov rdx, [rbp+filename]"], [13, "mov esi, offset aCouldnTFindCar"], [14, "mov rdi, rax"], [15, "mov eax, 0"], [16, "call _fprintf"], [17, "mov edi, 1"], [18, "call _exit"], [19, "mov rax, [rbp+stat_buf.st_size]"], [20, "cmp rax, 800000h"], [21, "jle short loc_404F56"], [22, "mov cs:qword_4363B0, 800000h"], [23, "jmp short loc_404F61"], [24, "mov rax, [rbp+stat_buf.st_size]"], [25, "mov cs:qword_4363B0, rax"], [26, "mov rax, cs:qword_4363B0"], [27, "mov rdi, rax"], [28, "call _malloc"], [29, "mov cs:qword_436380, rax"], [30, "mov rax, cs:qword_436380"], [31, "test rax, rax"], [32, "jnz short loc_404FAB"], [33, "mov rax, cs:__bss_start"], [34, "mov rcx, rax"], [35, "mov edx, 18h"], [36, "mov esi, 1"], [37, "mov edi, offset aCartRomMallocF"], [38, "call _fwrite"], [39, "mov edi, 1"], [40, "call _exit"], [41, "mov rax, [rbp+filename]"], [42, "mov esi, offset modes"], [43, "mov rdi, rax"], [44, "call _fopen"], [45, "mov [rbp+stream], rax"], [46, "mov rsi, cs:qword_4363B0"], [47, "mov rax, cs:qword_436380"], [48, "mov rdx, [rbp+stream]"], [49, "mov rcx, rdx"], [50, "mov edx, 1"], [51, "mov rdi, rax"], [52, "call _fread"], [53, "cmp rax, 1"], [54, "jz short loc_405013"], [55, "mov rax, cs:__bss_start"], [56, "mov rcx, rax"], [57, "mov edx, 19h"], [58, "mov esi, 1"], [59, "mov edi, offset aReadingCartRom"], [60, "call _fwrite"], [61, "mov edi, 1"], [62, "call _exit"], [63, "mov rax, [rbp+stream]"], [64, "mov rdi, rax"], [65, "call _fclose"], [66, "mov rax, cs:qword_4363B0"], [67, "shr rax, 0Eh"], [68, "mov cs:dword_436364, eax"], [69, "mov rax, cs:qword_4363B0"], [70, "and eax, 3FFFh"], [71, "test rax, rax"], [72, "jz short loc_40505A"], [73, "mov edi, offset s"], [74, "call _puts"], [75, "mov eax, cs:dword_436364"], [76, "add eax, 1"], [77, "mov cs:dword_436364, eax"], [78, "mov rax, [rbp+filename]"], [79, "mov edx, 100h"], [80, "mov rsi, rax"], [81, "mov edi, offset filename"], [82, "call sub_404AC4"], [83, "nop"], [84, "leave"], [85, "retn"]], "data_dep": [[5, 3], [6, 4], [7, 5], [9, 8], [10, 9], [12, 3], [14, 11], [20, 19], [21, 20], [25, 24], [26, 25], [26, 22], [27, 26], [29, 28], [30, 29], [31, 30], [32, 31], [34, 33], [41, 3], [43, 41], [45, 44], [46, 25], [46, 22], [47, 29], [48, 45], [49, 48], [51, 47], [53, 52], [54, 53], [56, 55], [63, 45], [64, 63], [66, 25], [66, 22], [67, 66], [68, 67], [69, 25], [69, 22], [70, 69], [71, 70], [72, 71], [75, 68], [76, 75], [77, 76], [78, 3], [80, 78], [85, 82]]}
{"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/31edd0f0ae447e7af5eb88e621b90258cba9798d06caf6830842b9d85879f0ba_31edd0f0ae447e7af5eb88e621b90258cba9798d06caf6830842b9d85879f0ba.jsonl.gz", "strip_func_name": "sub_404EE3", "query": "\n\n\nchar *__fastcall sub_404EE3(char *a1)\n{\nstruct stat stat_buf; // [rsp+10h] [rbp-A0h] BYREF\nFILE *stream; // [rsp+A8h] [rbp-8h]\n\nif ( (unsigned int)sub_4118A0(a1, &stat_buf) == -1 )\n{\nfprintf(_bss_start, \"Couldn't find cart rom: %s.\\n\", a1);\nexit(1);\n}\nif ( stat_buf.st_size <= 0x800000 )\nqword_4363B0 = stat_buf.st_size;\nelse\nqword_4363B0 = 0x800000LL;\nqword_436380 = malloc(qword_4363B0);\nif ( !qword_436380 )\n{\nfwrite(\"Cart rom malloc failed.\\n\", 1uLL, 0x18uLL, _bss_start);\nexit(1);\n}\nstream = fopen(a1, \"r\");\nif ( fread(qword_436380, qword_4363B0, 1uLL, stream) != 1 )\n{\nfwrite(\"Reading cart rom failed.\\n\", 1uLL, 0x19uLL, _bss_start);\nexit(1);\n}\nfclose(stream);\ndword_436364 = qword_4363B0 >> 14;\nif ( (qword_4363B0 & 0x3FFF) != 0 )\n{\nputs(\"Warning: cart rom not a multiple of 16384 bytes\");\n++dword_436364;\n}\nreturn sub_404AC4(filename, a1, 256);\n}\n\n\n\nQ:[a1,stat_buf,stream,sub_404EE3,sub_4118A0,sub_404AC4,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'cartromName', 'stat_buf': 'sb', 'stream': 'fd', 'sub_404EE3': 'cart_init_cartrom', 'sub_4118A0': 'stat_0', 'sub_404AC4': 'romname2savename'}"}
wps_process_wsc_nack
20c07804a3f28a6a5c3f8253e79de0ec1aedc41632a0737ad8dad981cd237640
sonic-net
sonic-buildimage
NA
static enum wps_process_res wps_process_wsc_nack(struct wps_data *wps, const struct wpabuf *msg) { struct wps_parse_attr attr; int old_state; u16 config_error; wpa_printf(MSG_DEBUG, "WPS: Received WSC_NACK"); old_state = wps->state; wps->state = SEND_WSC_NACK; if (wps_parse_msg(msg, &attr) < 0) return WPS_FAILURE; if (attr.msg_type == NULL) { wpa_printf(MSG_DEBUG, "WPS: No Message Type attribute"); return WPS_FAILURE; } if (*attr.msg_type != WPS_WSC_NACK) { wpa_printf(MSG_DEBUG, "WPS: Invalid Message Type %d", *attr.msg_type); return WPS_FAILURE; } #ifdef CONFIG_WPS_UPNP if (wps->wps->wps_upnp && wps->ext_reg) { wpa_printf(MSG_DEBUG, "WPS: Negotiation using external " "Registrar terminated by the Enrollee"); return WPS_FAILURE; } #endif /* CONFIG_WPS_UPNP */ if (attr.registrar_nonce == NULL || os_memcmp(wps->nonce_r, attr.registrar_nonce, WPS_NONCE_LEN) != 0) { wpa_printf(MSG_DEBUG, "WPS: Mismatch in registrar nonce"); return WPS_FAILURE; } if (attr.enrollee_nonce == NULL || os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN) != 0) { wpa_printf(MSG_DEBUG, "WPS: Mismatch in enrollee nonce"); return WPS_FAILURE; } if (attr.config_error == NULL) { wpa_printf(MSG_DEBUG, "WPS: No Configuration Error attribute " "in WSC_NACK"); return WPS_FAILURE; } config_error = WPA_GET_BE16(attr.config_error); wpa_printf(MSG_DEBUG, "WPS: Enrollee terminated negotiation with " "Configuration Error %d", config_error); switch (old_state) { case RECV_M3: wps_fail_event(wps->wps, WPS_M2, config_error, wps->error_indication, wps->mac_addr_e); break; case RECV_M5: wps_fail_event(wps->wps, WPS_M4, config_error, wps->error_indication, wps->mac_addr_e); break; case RECV_M7: wps_fail_event(wps->wps, WPS_M6, config_error, wps->error_indication, wps->mac_addr_e); break; case RECV_DONE: wps_fail_event(wps->wps, WPS_M8, config_error, wps->error_indication, wps->mac_addr_e); break; default: break; } return WPS_FAILURE; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_497C3C", "function_addr": 4815932, "binary_name": "20c07804a3f28a6a5c3f8253e79de0ec1aedc41632a0737ad8dad981cd237640.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 320h"], [3, "mov [rbp+var_318], rdi"], [4, "mov [rbp+var_320], rsi"], [5, "mov esi, offset aWpsReceivedWsc_4"], [6, "mov edi, 2"], [7, "mov eax, 0"], [8, "call sub_46FC12"], [9, "mov rax, [rbp+var_318]"], [10, "mov eax, [rax+10h]"], [11, "mov [rbp+var_4], eax"], [12, "mov rax, [rbp+var_318]"], [13, "mov dword ptr [rax+10h], 0Ch"], [14, "lea rdx, [rbp+var_310]"], [15, "mov rax, [rbp+var_320]"], [16, "mov rsi, rdx"], [17, "mov rdi, rax"], [18, "call sub_49C0A8"], [19, "test eax, eax"], [20, "jns short loc_497CAB"], [21, "mov eax, 2"], [22, "jmp locret_497F39"], [23, "mov rax, [rbp+var_300]"], [24, "test rax, rax"], [25, "jnz short loc_497CD5"], [26, "mov esi, offset aWpsNoMessageTy_0"], [27, "mov edi, 2"], [28, "mov eax, 0"], [29, "call sub_46FC12"], [30, "mov eax, 2"], [31, "jmp locret_497F39"], [32, "mov rax, [rbp+var_300]"], [33, "movzx eax, byte ptr [rax]"], [34, "cmp al, 0Eh"], [35, "jz short loc_497D10"], [36, "mov rax, [rbp+var_300]"], [37, "movzx eax, byte ptr [rax]"], [38, "movzx eax, al"], [39, "mov edx, eax"], [40, "mov esi, offset aWpsInvalidMess_0"], [41, "mov edi, 2"], [42, "mov eax, 0"], [43, "call sub_46FC12"], [44, "mov eax, 2"], [45, "jmp locret_497F39"], [46, "mov rax, [rbp+s2]"], [47, "test rax, rax"], [48, "jz short loc_497D42"], [49, "mov rax, [rbp+s2]"], [50, "mov rdx, [rbp+var_318]"], [51, "lea rcx, [rdx+4Ah]"], [52, "mov edx, 10h"], [53, "mov rsi, rax"], [54, "mov rdi, rcx"], [55, "call _memcmp"], [56, "test eax, eax"], [57, "jz short loc_497D60"], [58, "mov esi, offset aWpsMismatchInR_0"], [59, "mov edi, 2"], [60, "mov eax, 0"], [61, "call sub_46FC12"], [62, "mov eax, 2"], [63, "jmp locret_497F39"], [64, "mov rax, [rbp+var_2F8]"], [65, "test rax, rax"], [66, "jz short loc_497D92"], [67, "mov rax, [rbp+var_2F8]"], [68, "mov rdx, [rbp+var_318]"], [69, "lea rcx, [rdx+3Ah]"], [70, "mov edx, 10h"], [71, "mov rsi, rax"], [72, "mov rdi, rcx"], [73, "call _memcmp"], [74, "test eax, eax"], [75, "jz short loc_497DB0"], [76, "mov esi, offset aWpsMismatchInE_0"], [77, "mov edi, 2"], [78, "mov eax, 0"], [79, "call sub_46FC12"], [80, "mov eax, 2"], [81, "jmp locret_497F39"], [82, "mov rax, [rbp+var_298]"], [83, "test rax, rax"], [84, "jnz short loc_497DDA"], [85, "mov esi, offset aWpsNoConfigura_1"], [86, "mov edi, 2"], [87, "mov eax, 0"], [88, "call sub_46FC12"], [89, "mov eax, 2"], [90, "jmp locret_497F39"], [91, "mov rax, [rbp+var_298]"], [92, "mov rdi, rax"], [93, "call sub_49029F"], [94, "mov [rbp+var_6], ax"], [95, "movzx eax, [rbp+var_6]"], [96, "mov edx, eax"], [97, "mov esi, offset aWpsEnrolleeTer"], [98, "mov edi, 2"], [99, "mov eax, 0"], [100, "call sub_46FC12"], [101, "cmp [rbp+var_4], 15h"], [102, "jz loc_497EF7"], [103, "cmp [rbp+var_4], 15h"], [104, "jg loc_497F33"], [105, "cmp [rbp+var_4], 13h"], [106, "jz loc_497EBB"], [107, "cmp [rbp+var_4], 13h"], [108, "jg loc_497F33"], [109, "cmp [rbp+var_4], 0Fh"], [110, "jz short loc_497E40"], [111, "cmp [rbp+var_4], 11h"], [112, "jz short loc_497E7F"], [113, "jmp loc_497F33"], [114, "mov rax, [rbp+var_318]"], [115, "lea rsi, [rax+34h]"], [116, "mov rax, [rbp+var_318]"], [117, "movzx eax, word ptr [rax+322h]"], [118, "movzx ecx, ax"], [119, "movzx edx, [rbp+var_6]"], [120, "mov rax, [rbp+var_318]"], [121, "mov rax, [rax]"], [122, "mov r8, rsi"], [123, "mov esi, 5"], [124, "mov rdi, rax"], [125, "call sub_4898CD"], [126, "jmp loc_497F34"], [127, "mov rax, [rbp+var_318]"], [128, "lea rsi, [rax+34h]"], [129, "mov rax, [rbp+var_318]"], [130, "movzx eax, word ptr [rax+322h]"], [131, "movzx ecx, ax"], [132, "movzx edx, [rbp+var_6]"], [133, "mov rax, [rbp+var_318]"], [134, "mov rax, [rax]"], [135, "mov r8, rsi"], [136, "mov esi, 8"], [137, "mov rdi, rax"], [138, "call sub_4898CD"], [139, "jmp short loc_497F34"], [140, "mov rax, [rbp+var_318]"], [141, "lea rsi, [rax+34h]"], [142, "mov rax, [rbp+var_318]"], [143, "movzx eax, word ptr [rax+322h]"], [144, "movzx ecx, ax"], [145, "movzx edx, [rbp+var_6]"], [146, "mov rax, [rbp+var_318]"], [147, "mov rax, [rax]"], [148, "mov r8, rsi"], [149, "mov esi, 0Ah"], [150, "mov rdi, rax"], [151, "call sub_4898CD"], [152, "jmp short loc_497F34"], [153, "mov rax, [rbp+var_318]"], [154, "lea rsi, [rax+34h]"], [155, "mov rax, [rbp+var_318]"], [156, "movzx eax, word ptr [rax+322h]"], [157, "movzx ecx, ax"], [158, "movzx edx, [rbp+var_6]"], [159, "mov rax, [rbp+var_318]"], [160, "mov rax, [rax]"], [161, "mov r8, rsi"], [162, "mov esi, 0Ch"], [163, "mov rdi, rax"], [164, "call sub_4898CD"], [165, "jmp short loc_497F34"], [166, "nop"], [167, "mov eax, 2"], [168, "leave"], [169, "retn"]], "data_dep": [[9, 3], [10, 9], [11, 10], [12, 3], [13, 12], [15, 4], [16, 14], [17, 15], [19, 18], [20, 19], [24, 23], [25, 24], [33, 13], [33, 32], [34, 33], [35, 34], [37, 36], [37, 13], [38, 37], [39, 38], [47, 46], [48, 47], [50, 3], [51, 50], [51, 13], [53, 49], [54, 51], [56, 55], [57, 56], [65, 64], [66, 65], [68, 3], [69, 51], [69, 68], [69, 13], [71, 67], [72, 69], [74, 73], [75, 74], [83, 82], [84, 83], [92, 91], [94, 93], [95, 94], [96, 95], [101, 11], [102, 101], [103, 11], [104, 103], [105, 11], [106, 105], [107, 11], [108, 107], [109, 11], [110, 109], [111, 11], [112, 111], [114, 3], [115, 114], [115, 13], [115, 97], [116, 3], [117, 13], [117, 116], [118, 117], [119, 94], [120, 3], [121, 13], [121, 120], [122, 115], [124, 121], [127, 3], [128, 13], [128, 127], [128, 97], [129, 3], [130, 13], [130, 129], [131, 130], [132, 94], [133, 3], [134, 133], [134, 13], [135, 128], [137, 134], [140, 3], [141, 140], [141, 97], [141, 13], [142, 3], [143, 142], [143, 13], [144, 143], [145, 94], [146, 3], [147, 146], [147, 13], [148, 141], [150, 147], [153, 3], [154, 97], [154, 153], [154, 13], [155, 3], [156, 155], [156, 13], [157, 156], [158, 94], [159, 3], [160, 13], [160, 159], [161, 154], [163, 160], [169, 44], [169, 62], [169, 21], [169, 30], [169, 167], [169, 80], [169, 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/20c07804a3f28a6a5c3f8253e79de0ec1aedc41632a0737ad8dad981cd237640_20c07804a3f28a6a5c3f8253e79de0ec1aedc41632a0737ad8dad981cd237640.jsonl.gz", "strip_func_name": "sub_497C3C", "query": "\n\n\n__int64 __fastcall sub_497C3C(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 v6; // rdx\n__int64 v7; // rcx\n__int64 v8; // r8\n__int64 v9; // r9\n__int64 result; // rax\n__int64 v11; // rcx\n__int64 v12; // r8\n__int64 v13; // r9\nchar v14[16]; // [rsp+10h] [rbp-310h] BYREF\n_BYTE *v15; // [rsp+20h] [rbp-300h]\nvoid *v16; // [rsp+28h] [rbp-2F8h]\nvoid *s2; // [rsp+30h] [rbp-2F0h]\nunsigned __int8 *v18; // [rsp+88h] [rbp-298h]\nunsigned __int16 v19; // [rsp+31Ah] [rbp-6h]\nint v20; // [rsp+31Ch] [rbp-4h]\n\nsub_46FC12(2, \"WPS: Received WSC_NACK\", a3, a4, a5, a6);\nv20 = *(_DWORD *)(a1 + 16);\n*(_DWORD *)(a1 + 16) = 12;\nif ( (int)sub_49C0A8(a2, v14) < 0 )\nreturn 2LL;\nif ( v15 )\n{\nif ( *v15 == 14 )\n{\nif ( s2 && !memcmp((const void *)(a1 + 74), s2, 0x10uLL) )\n{\nif ( v16 && !memcmp((const void *)(a1 + 58), v16, 0x10uLL) )\n{\nif ( v18 )\n{\nv19 = sub_49029F(v18);\nsub_46FC12(2, \"WPS: Enrollee terminated negotiation with Configuration Error %d\", v19, v11, v12, v13);\nif ( v20 == 21 )\n{\nsub_4898CD(*(_QWORD *)a1, 12, v19, *(_WORD *)(a1 + 802), a1 + 52);\n}\nelse if ( v20 <= 21 )\n{\nif ( v20 == 19 )\n{\nsub_4898CD(*(_QWORD *)a1, 10, v19, *(_WORD *)(a1 + 802), a1 + 52);\n}\nelse if ( v20 <= 19 )\n{\nif ( v20 == 15 )\n{\nsub_4898CD(*(_QWORD *)a1, 5, v19, *(_WORD *)(a1 + 802), a1 + 52);\n}\nelse if ( v20 == 17 )\n{\nsub_4898CD(*(_QWORD *)a1, 8, v19, *(_WORD *)(a1 + 802), a1 + 52);\n}\n}\n}\nresult = 2LL;\n}\nelse\n{\nsub_46FC12(2, \"WPS: No Configuration Error attribute in WSC_NACK\", v6, v7, v8, v9);\nresult = 2LL;\n}\n}\nelse\n{\nsub_46FC12(2, \"WPS: Mismatch in enrollee nonce\", v6, v7, v8, v9);\nresult = 2LL;\n}\n}\nelse\n{\nsub_46FC12(2, \"WPS: Mismatch in registrar nonce\", v6, v7, v8, v9);\nresult = 2LL;\n}\n}\nelse\n{\nsub_46FC12(2, \"WPS: Invalid Message Type %d\", (unsigned __int8)*v15, v7, v8, v9);\nresult = 2LL;\n}\n}\nelse\n{\nsub_46FC12(2, \"WPS: No Message Type attribute\", v6, v7, v8, v9);\nresult = 2LL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v14,v19,v20,sub_497C3C,sub_46FC12,sub_49C0A8,sub_49029F,sub_4898CD,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'wps', 'a2': 'msg', 'v14': 'attr', 'v19': 'config_error', 'v20': 'old_state', 'sub_497C3C': 'wps_process_wsc_nack_0', 'sub_46FC12': 'wpa_printf', 'sub_49C0A8': 'wps_parse_msg', 'sub_49029F': 'WPA_GET_BE16_5', 'sub_4898CD': 'wps_fail_event'}"}
PrepairLoadRegInfoForArgCheck
7a9fd741a95dae0778f24573dd0254b72607ff4da9f089d1feccd19f23d872f4
MEGA65
mega65-tools
NA
void PrepairLoadRegInfoForArgCheck (CodeSeg* S, LoadRegInfo* LRI, CodeEntry* E) /* Set the load src flags and remember to check for load src change if necessary. ** Note: this doesn't assume reloading Y. */ { if (E->AM == AM65_IMM) { /* These insns are all ok and replaceable */ LRI->Flags |= LI_DIRECT; } else if (E->AM == AM65_ZP || E->AM == AM65_ABS) { /* These insns are replaceable only if they are not modified later */ LRI->Flags |= LI_CHECK_ARG; } else if (E->AM == AM65_ZPY || E->AM == AM65_ABSY) { /* These insns are replaceable only if they are not modified later */ LRI->Flags |= LI_CHECK_ARG | LI_CHECK_Y; } else if ((E->AM == AM65_ZP_INDY) && strcmp (E->Arg, "sp") == 0) { /* A load from the stack with known offset is also ok, but in this ** case we must reload the index register later. Please note that ** a load indirect via other zero page locations is not ok, since ** these locations may change between the push and the actual ** operation. */ LRI->Flags |= LI_CHECK_ARG | LI_CHECK_Y; } /* If the load offset has a known value, we can just remember and reload ** it into the index register later. */ if ((LRI->Flags & LI_CHECK_Y) != 0) { if (RegValIsKnown (E->RI->In.RegY)) { LRI->Offs = (unsigned char)E->RI->In.RegY; LRI->Flags &= ~LI_CHECK_Y; LRI->Flags |= LI_RELOAD_Y; } } /* Watch for any change of the load target */ if ((LRI->Flags & LI_CHECK_ARG) != 0) { LRI->LoadIndex = CS_GetEntryIndex (S, E); LRI->LoadEntry = E; } /* We need to check if the src of Y is changed */ if (LRI->LoadYIndex >= 0) { LRI->LoadYEntry = CS_GetEntry (S, LRI->LoadYIndex); } else { LRI->LoadYEntry = 0; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_426A52", "function_addr": 4352594, "binary_name": "7a9fd741a95dae0778f24573dd0254b72607ff4da9f089d1feccd19f23d872f4.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, "movzx eax, byte ptr [rax+1]"], [8, "cmp al, 2"], [9, "jnz short loc_426A88"], [10, "mov rax, [rbp+var_10]"], [11, "mov eax, [rax]"], [12, "or eax, 1"], [13, "mov edx, eax"], [14, "mov rax, [rbp+var_10]"], [15, "mov [rax], edx"], [16, "jmp loc_426B14"], [17, "mov rax, [rbp+var_18]"], [18, "movzx eax, byte ptr [rax+1]"], [19, "cmp al, 3"], [20, "jz short loc_426AA0"], [21, "mov rax, [rbp+var_18]"], [22, "movzx eax, byte ptr [rax+1]"], [23, "cmp al, 6"], [24, "jnz short loc_426AB3"], [25, "mov rax, [rbp+var_10]"], [26, "mov eax, [rax]"], [27, "or eax, 10h"], [28, "mov edx, eax"], [29, "mov rax, [rbp+var_10]"], [30, "mov [rax], edx"], [31, "jmp short loc_426B14"], [32, "mov rax, [rbp+var_18]"], [33, "movzx eax, byte ptr [rax+1]"], [34, "cmp al, 5"], [35, "jz short loc_426ACB"], [36, "mov rax, [rbp+var_18]"], [37, "movzx eax, byte ptr [rax+1]"], [38, "cmp al, 8"], [39, "jnz short loc_426ADE"], [40, "mov rax, [rbp+var_10]"], [41, "mov eax, [rax]"], [42, "or eax, 30h"], [43, "mov edx, eax"], [44, "mov rax, [rbp+var_10]"], [45, "mov [rax], edx"], [46, "jmp short loc_426B14"], [47, "mov rax, [rbp+var_18]"], [48, "movzx eax, byte ptr [rax+1]"], [49, "cmp al, 0Ah"], [50, "jnz short loc_426B14"], [51, "mov rax, [rbp+var_18]"], [52, "mov rax, [rax+8]"], [53, "mov esi, offset aSp_0"], [54, "mov rdi, rax"], [55, "call _strcmp"], [56, "test eax, eax"], [57, "jnz short loc_426B14"], [58, "mov rax, [rbp+var_10]"], [59, "mov eax, [rax]"], [60, "or eax, 30h"], [61, "mov edx, eax"], [62, "mov rax, [rbp+var_10]"], [63, "mov [rax], edx"], [64, "mov rax, [rbp+var_10]"], [65, "mov eax, [rax]"], [66, "and eax, 20h"], [67, "test eax, eax"], [68, "jz short loc_426B71"], [69, "mov rax, [rbp+var_18]"], [70, "mov rax, [rax+48h]"], [71, "movzx eax, word ptr [rax+4]"], [72, "cwde"], [73, "mov edi, eax"], [74, "call sub_425ECB"], [75, "test eax, eax"], [76, "jz short loc_426B71"], [77, "mov rax, [rbp+var_18]"], [78, "mov rax, [rax+48h]"], [79, "movzx eax, word ptr [rax+4]"], [80, "movzx edx, al"], [81, "mov rax, [rbp+var_10]"], [82, "mov [rax+30h], edx"], [83, "mov rax, [rbp+var_10]"], [84, "mov eax, [rax]"], [85, "and eax, 0FFFFFFDFh"], [86, "mov edx, eax"], [87, "mov rax, [rbp+var_10]"], [88, "mov [rax], edx"], [89, "mov rax, [rbp+var_10]"], [90, "mov eax, [rax]"], [91, "or eax, 2"], [92, "mov edx, eax"], [93, "mov rax, [rbp+var_10]"], [94, "mov [rax], edx"], [95, "mov rax, [rbp+var_10]"], [96, "mov eax, [rax]"], [97, "and eax, 10h"], [98, "test eax, eax"], [99, "jz short loc_426BA6"], [100, "mov rdx, [rbp+var_18]"], [101, "mov rax, [rbp+var_8]"], [102, "mov rsi, rdx"], [103, "mov rdi, rax"], [104, "call sub_46456A"], [105, "mov edx, eax"], [106, "mov rax, [rbp+var_10]"], [107, "mov [rax+4], edx"], [108, "mov rax, [rbp+var_10]"], [109, "mov rdx, [rbp+var_18]"], [110, "mov [rax+8], rdx"], [111, "mov rax, [rbp+var_10]"], [112, "mov eax, [rax+10h]"], [113, "test eax, eax"], [114, "js short loc_426BD2"], [115, "mov rax, [rbp+var_10]"], [116, "mov eax, [rax+10h]"], [117, "mov edx, eax"], [118, "mov rax, [rbp+var_8]"], [119, "mov esi, edx"], [120, "mov rdi, rax"], [121, "call sub_425F85"], [122, "mov rdx, [rbp+var_10]"], [123, "mov [rdx+18h], rax"], [124, "jmp short loc_426BDE"], [125, "mov rax, [rbp+var_10]"], [126, "mov qword ptr [rax+18h], 0"], [127, "nop"], [128, "leave"], [129, "retn"]], "data_dep": [[6, 5], [7, 6], [8, 7], [9, 8], [10, 4], [11, 10], [12, 11], [13, 12], [14, 4], [15, 14], [15, 13], [17, 5], [18, 17], [19, 18], [20, 19], [21, 5], [22, 21], [23, 22], [24, 23], [25, 4], [26, 25], [27, 26], [28, 27], [29, 4], [30, 29], [30, 28], [32, 5], [33, 32], [34, 33], [35, 34], [36, 5], [37, 36], [38, 37], [39, 38], [40, 4], [41, 40], [42, 41], [43, 42], [44, 4], [45, 43], [45, 44], [47, 5], [48, 47], [49, 48], [50, 49], [51, 5], [52, 51], [54, 52], [56, 55], [57, 56], [58, 4], [59, 58], [60, 59], [61, 60], [62, 4], [63, 61], [63, 62], [64, 4], [65, 15], [65, 45], [65, 63], [65, 30], [65, 64], [66, 65], [67, 66], [68, 67], [69, 5], [70, 45], [70, 63], [70, 15], [70, 30], [70, 69], [71, 15], [71, 30], [71, 70], [71, 45], [71, 63], [73, 71], [75, 74], [76, 75], [77, 5], [78, 77], [78, 45], [78, 63], [78, 15], [78, 88], [78, 30], [78, 94], [78, 82], [79, 88], [79, 30], [79, 94], [79, 78], [79, 82], [79, 15], [79, 45], [79, 63], [80, 79], [81, 4], [82, 81], [82, 80], [83, 4], [84, 15], [84, 45], [84, 63], [84, 83], [84, 30], [84, 82], [85, 84], [86, 85], [87, 4], [88, 86], [88, 87], [89, 4], [90, 88], [90, 89], [91, 90], [92, 91], [93, 4], [94, 93], [94, 92], [95, 4], [96, 95], [96, 88], [96, 30], [96, 94], [96, 82], [96, 15], [96, 45], [96, 63], [97, 96], [98, 97], [99, 98], [100, 5], [101, 3], [102, 100], [103, 101], [105, 104], [106, 4], [107, 106], [107, 105], [108, 4], [109, 5], [110, 109], [110, 108], [111, 4], [112, 107], [112, 15], [112, 45], [112, 63], [112, 111], [112, 88], [112, 110], [112, 30], [112, 94], [112, 82], [113, 112], [114, 113], [115, 4], [116, 107], [116, 15], [116, 45], [116, 63], [116, 88], [116, 115], [116, 110], [116, 30], [116, 94], [116, 82], [116, 123], [117, 116], [118, 3], [119, 117], [120, 118], [122, 4], [123, 121], [123, 122], [125, 4], [126, 125], [129, 121], [129, 125]]}
{"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/7a9fd741a95dae0778f24573dd0254b72607ff4da9f089d1feccd19f23d872f4_7a9fd741a95dae0778f24573dd0254b72607ff4da9f089d1feccd19f23d872f4.jsonl.gz", "strip_func_name": "sub_426A52", "query": "\n\n\n__int64 __fastcall sub_426A52(__int64 a1, __int64 a2, __int64 a3)\n{\n__int64 result; // rax\n\nswitch ( *(_BYTE *)(a3 + 1) )\n{\ncase 2:\n*(_DWORD *)a2 |= 1u;\nbreak;\ncase 3:\ncase 6:\n*(_DWORD *)a2 |= 0x10u;\nbreak;\ncase 5:\ncase 8:\n*(_DWORD *)a2 |= 0x30u;\nbreak;\ndefault:\nif ( *(_BYTE *)(a3 + 1) == 10 && !strcmp(*(const char **)(a3 + 8), \"sp\") )\n*(_DWORD *)a2 |= 0x30u;\nbreak;\n}\nif ( (*(_DWORD *)a2 & 0x20) != 0 && sub_425ECB(*(_WORD *)(*(_QWORD *)(a3 + 72) + 4LL)) )\n{\n*(_DWORD *)(a2 + 48) = (unsigned __int8)*(_WORD *)(*(_QWORD *)(a3 + 72) + 4LL);\n*(_DWORD *)a2 &= 0xFFFFFFDF;\n*(_DWORD *)a2 |= 2u;\n}\nif ( (*(_DWORD *)a2 & 0x10) != 0 )\n{\n*(_DWORD *)(a2 + 4) = sub_46456A(a1, a3);\n*(_QWORD *)(a2 + 8) = a3;\n}\nif ( *(int *)(a2 + 16) < 0 )\n{\nresult = a2;\n*(_QWORD *)(a2 + 24) = 0LL;\n}\nelse\n{\nresult = sub_425F85(a1, *(_DWORD *)(a2 + 16));\n*(_QWORD *)(a2 + 24) = result;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_426A52,sub_425ECB,sub_46456A,sub_425F85,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'E', 'a1': 'S', 'a2': 'LRI', 'sub_426A52': 'PrepairLoadRegInfoForArgCheck', 'sub_425ECB': 'RegValIsKnown_1', 'sub_46456A': 'CS_GetEntryIndex', 'sub_425F85': 'CS_GetEntry_4'}"}
doc_state_init
52717776acda8a7daffd4b2004e65afc2870dcccd317c12ec9c51d6ff44b5c63
mptre
knfmt
NA
static void doc_state_init(struct doc_state *st, struct doc_exec_arg *arg, enum doc_mode mode) { ASSERT_CONSISTENCY(arg->flags & DOC_EXEC_DIFF, arg->lx); ASSERT_CONSISTENCY(arg->flags & DOC_EXEC_DIFF, arg->diff_chunks); memset(st, 0, sizeof(*st)); st->st_op = arg->op; st->st_st = arg->st; st->st_bf = arg->bf; st->st_lx = arg->lx; st->st_diff_chunks = arg->diff_chunks; st->st_maxlines = 2; st->st_flags = arg->flags; st->st_mode = mode; st->st_diff.beg = 1; st->st_minimize.idx = -1; st->st_minimize.force = -1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4092E4", "function_addr": 4231908, "binary_name": "52717776acda8a7daffd4b2004e65afc2870dcccd317c12ec9c51d6ff44b5c63.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+s], rdi"], [4, "mov [rbp+var_C], esi"], [5, "mov [rbp+var_10], edx"], [6, "mov rax, [rbp+s]"], [7, "mov edx, 0A0h"], [8, "mov esi, 0"], [9, "mov rdi, rax"], [10, "call _memset"], [11, "mov rax, [rbp+s]"], [12, "mov edx, [rbp+var_C]"], [13, "mov [rax+20h], edx"], [14, "mov rax, [rbp+s]"], [15, "mov dword ptr [rax+38h], 1"], [16, "mov rax, [rbp+s]"], [17, "mov edx, [rbp+var_10]"], [18, "mov [rax+9Ch], edx"], [19, "mov rax, [rbp+s]"], [20, "mov dword ptr [rax+58h], 0FFFFFFFFh"], [21, "mov rax, [rbp+s]"], [22, "mov dword ptr [rax+5Ch], 0FFFFFFFFh"], [23, "nop"], [24, "leave"], [25, "retn"]], "data_dep": [[6, 3], [9, 6], [11, 3], [12, 4], [13, 12], [13, 11], [14, 3], [15, 14], [16, 3], [17, 5], [18, 17], [18, 16], [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/52717776acda8a7daffd4b2004e65afc2870dcccd317c12ec9c51d6ff44b5c63_52717776acda8a7daffd4b2004e65afc2870dcccd317c12ec9c51d6ff44b5c63.jsonl.gz", "strip_func_name": "sub_4092E4", "query": "\n\n\n_DWORD *__fastcall sub_4092E4(_DWORD *a1, int a2, int a3)\n{\n_DWORD *result; // rax\n\nmemset(a1, 0, 0xA0uLL);\na1[8] = a2;\na1[14] = 1;\na1[39] = a3;\na1[22] = -1;\nresult = a1;\na1[23] = -1;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_4092E4,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'flags', 'a1': 'st', 'a2': 'mode', 'sub_4092E4': 'doc_state_init'}"}
load_container_imsm
419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934
neilbrown
mdadm
NA
static int load_container_imsm(struct supertype *st, int fd, char *devname) { return load_super_imsm_all(st, fd, &st->sb, devname, NULL, 1); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_464632", "function_addr": 4605490, "binary_name": "419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934.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_C], esi"], [5, "mov [rbp+var_18], rdx"], [6, "mov rax, [rbp+var_8]"], [7, "lea rdi, [rax+30h]"], [8, "mov rdx, [rbp+var_18]"], [9, "mov esi, [rbp+var_C]"], [10, "mov rax, [rbp+var_8]"], [11, "mov r9d, 1"], [12, "mov r8d, 0"], [13, "mov rcx, rdx"], [14, "mov rdx, rdi"], [15, "mov rdi, rax"], [16, "call sub_463FB3"], [17, "leave"], [18, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 5], [9, 4], [10, 3], [13, 8], [14, 7], [15, 10], [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/419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934_419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934.jsonl.gz", "strip_func_name": "sub_464632", "query": "\n\n\n__int64 __fastcall sub_464632(__int64 a1, int a2, const char *a3)\n{\nreturn sub_463FB3(a1, a2, (_QWORD *)(a1 + 48), a3, 0LL, 1u);\n}\n\n\n\nQ:[a3,a1,a2,sub_464632,sub_463FB3,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'devname', 'a1': 'st', 'a2': 'fd', 'sub_464632': 'load_container_imsm', 'sub_463FB3': 'load_super_imsm_all'}"}
caml_input_value
04d915045c8d6a6e6ffd8541db3ef8d847d699fb3a934be690d768413ec7577b
programa-stic
ropc-llvm
NA
CAMLprim value caml_input_value(value vchan) { CAMLparam1 (vchan); struct channel * chan = Channel(vchan); CAMLlocal1 (res); Lock(chan); res = caml_input_val(chan); Unlock(chan); CAMLreturn (res); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "caml_input_value", "function_addr": 4293483, "binary_name": "04d915045c8d6a6e6ffd8541db3ef8d847d699fb3a934be690d768413ec7577b.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, cs:caml_local_roots"], [5, "mov [rbp+var_8], rax"], [6, "mov rax, cs:caml_local_roots"], [7, "mov [rbp+var_70], rax"], [8, "lea rax, [rbp+var_70]"], [9, "mov cs:caml_local_roots, rax"], [10, "mov [rbp+var_60], 1"], [11, "mov [rbp+var_68], 1"], [12, "lea rax, [rbp+var_C8]"], [13, "mov [rbp+var_58], rax"], [14, "mov [rbp+var_C], 0"], [15, "mov rax, [rbp+var_C8]"], [16, "add rax, 8"], [17, "mov rax, [rax]"], [18, "mov [rbp+var_18], rax"], [19, "mov [rbp+var_78], 0"], [20, "mov rax, cs:caml_local_roots"], [21, "mov [rbp+var_C0], rax"], [22, "lea rax, [rbp+var_C0]"], [23, "mov cs:caml_local_roots, rax"], [24, "mov [rbp+var_B0], 1"], [25, "mov [rbp+var_B8], 1"], [26, "lea rax, [rbp+var_78]"], [27, "mov [rbp+var_A8], rax"], [28, "mov [rbp+var_1C], 0"], [29, "mov rax, cs:caml_channel_mutex_lock"], [30, "test rax, rax"], [31, "jz short loc_41843A"], [32, "mov rdx, cs:caml_channel_mutex_lock"], [33, "mov rax, [rbp+var_18]"], [34, "mov rdi, rax"], [35, "call rdx "], [36, "mov rax, [rbp+var_18]"], [37, "mov rdi, rax"], [38, "call caml_input_val"], [39, "mov [rbp+var_78], rax"], [40, "mov rax, cs:caml_channel_mutex_unlock"], [41, "test rax, rax"], [42, "jz short loc_418466"], [43, "mov rdx, cs:caml_channel_mutex_unlock"], [44, "mov rax, [rbp+var_18]"], [45, "mov rdi, rax"], [46, "call rdx "], [47, "mov rax, [rbp+var_78]"], [48, "mov [rbp+var_28], rax"], [49, "mov rax, [rbp+var_8]"], [50, "mov cs:caml_local_roots, rax"], [51, "mov rax, [rbp+var_28]"], [52, "leave"], [53, "retn"]], "data_dep": [[5, 4], [7, 6], [8, 6], [8, 7], [9, 8], [12, 3], [12, 8], [13, 12], [15, 3], [16, 15], [17, 16], [18, 17], [20, 9], [21, 20], [22, 20], [22, 21], [23, 22], [26, 19], [26, 22], [27, 26], [30, 29], [31, 30], [33, 18], [34, 33], [35, 32], [36, 18], [37, 36], [39, 38], [41, 40], [42, 41], [44, 18], [45, 44], [46, 43], [47, 39], [48, 47], [49, 5], [50, 49], [51, 48], [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/04d915045c8d6a6e6ffd8541db3ef8d847d699fb3a934be690d768413ec7577b_04d915045c8d6a6e6ffd8541db3ef8d847d699fb3a934be690d768413ec7577b.jsonl.gz", "strip_func_name": "caml_input_value", "query": "\n\n\nvoid *__fastcall caml_input_value(__int64 a1)\n{\n__int64 v2; // [rsp+8h] [rbp-C8h] BYREF\n__int64 v3[9]; // [rsp+10h] [rbp-C0h] BYREF\nvoid *v4; // [rsp+58h] [rbp-78h] BYREF\n__int64 v5[9]; // [rsp+60h] [rbp-70h] BYREF\nint v6; // [rsp+B4h] [rbp-1Ch]\n__int64 v7; // [rsp+B8h] [rbp-18h]\nint v8; // [rsp+C4h] [rbp-Ch]\n__int64 v9; // [rsp+C8h] [rbp-8h]\n\nv2 = a1;\nv9 = caml_local_roots;\nv5[0] = caml_local_roots;\ncaml_local_roots = (__int64)v5;\nv5[2] = 1LL;\nv5[1] = 1LL;\nv5[3] = (__int64)&v2;\nv8 = 0;\nv7 = *(_QWORD *)(a1 + 8);\nv4 = 0LL;\nv3[0] = (__int64)v5;\ncaml_local_roots = (__int64)v3;\nv3[2] = 1LL;\nv3[1] = 1LL;\nv3[3] = (__int64)&v4;\nv6 = 0;\nif ( caml_channel_mutex_lock )\ncaml_channel_mutex_lock(v7);\nv4 = caml_input_val(v7);\nif ( caml_channel_mutex_unlock )\ncaml_channel_mutex_unlock(v7);\ncaml_local_roots = v9;\nreturn v4;\n}\n\n\n\nQ:[a1,v2,v3,v4,v5,v6,v7,v8,v9,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'vchan', 'v2': 'vchana', 'v3': 'caml__roots_res', 'v4': 'res', 'v5': 'caml__roots_vchan', 'v6': 'caml__dummy_res', 'v7': 'chan', 'v8': 'caml__dummy_vchan', 'v9': 'caml__frame'}"}
do_tcp_metrics
bfd96a4a0bcbadab66a8166e80e069a5d2f416841ca5e57d273a4e4baea323cb
multipath-tcp
iproute-mptcp
NA
int do_tcp_metrics(int argc, char **argv) { int i; if (argc < 1) return tcpm_do_cmd(CMD_LIST, 0, NULL); for (i = 0; i < ARRAY_SIZE(cmds); i++) { if (matches(argv[0], cmds[i].name) == 0) return tcpm_do_cmd(cmds[i].code, argc-1, argv+1); } if (matches(argv[0], "help") == 0) usage(); fprintf(stderr, "Command \"%s\" is unknown, try \"ip tcp_metrics help\".\n", *argv); exit(-1); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "do_tcp_metrics", "function_addr": 4524403, "binary_name": "bfd96a4a0bcbadab66a8166e80e069a5d2f416841ca5e57d273a4e4baea323cb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_14], edi"], [4, "mov [rbp+var_20], rsi"], [5, "cmp [rbp+var_14], 0"], [6, "jg short loc_4509A1"], [7, "mov edx, 0"], [8, "mov esi, 0"], [9, "mov edi, 1"], [10, "call sub_4500CF"], [11, "jmp locret_450A55"], [12, "mov [rbp+var_4], 0"], [13, "jmp short loc_450A03"], [14, "mov eax, [rbp+var_4]"], [15, "cdqe"], [16, "shl rax, 4"], [17, "add rax, 4998C0h"], [18, "mov rdx, [rax]"], [19, "mov rax, [rbp+var_20]"], [20, "mov rax, [rax]"], [21, "mov rsi, rdx"], [22, "mov rdi, rax"], [23, "call matches"], [24, "xor eax, 1"], [25, "test al, al"], [26, "jz short loc_4509FF"], [27, "mov rax, [rbp+var_20]"], [28, "lea rdx, [rax+8]"], [29, "mov eax, [rbp+var_14]"], [30, "lea ecx, [rax-1]"], [31, "mov eax, [rbp+var_4]"], [32, "cdqe"], [33, "shl rax, 4"], [34, "add rax, 4998C8h"], [35, "mov eax, [rax]"], [36, "mov esi, ecx"], [37, "mov edi, eax"], [38, "call sub_4500CF"], [39, "jmp short locret_450A55"], [40, "add [rbp+var_4], 1"], [41, "mov eax, [rbp+var_4]"], [42, "cmp eax, 5"], [43, "jbe short loc_4509AA"], [44, "mov rax, [rbp+var_20]"], [45, "mov rax, [rax]"], [46, "mov esi, offset aHelp_25"], [47, "mov rdi, rax"], [48, "call matches"], [49, "xor eax, 1"], [50, "test al, al"], [51, "jz short loc_450A2B"], [52, "call sub_44F54D"], [53, "mov rax, [rbp+var_20]"], [54, "mov rdx, [rax]"], [55, "mov rax, cs:stderr"], [56, "mov esi, offset aCommandSIsUnkn_16"], [57, "mov rdi, rax"], [58, "mov eax, 0"], [59, "call _fprintf"], [60, "mov edi, 0FFFFFFFFh"], [61, "call _exit"], [62, "leave"], [63, "retn"]], "data_dep": [[5, 3], [6, 5], [14, 40], [14, 12], [16, 14], [17, 16], [18, 17], [19, 4], [20, 19], [21, 18], [22, 20], [24, 23], [25, 24], [26, 25], [27, 4], [28, 18], [28, 27], [29, 3], [30, 29], [31, 40], [31, 12], [33, 31], [34, 33], [35, 34], [36, 30], [37, 35], [40, 40], [40, 12], [41, 40], [41, 12], [42, 41], [43, 42], [44, 4], [45, 44], [47, 45], [49, 48], [50, 49], [51, 50], [53, 4], [54, 53], [57, 55], [63, 38], [63, 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/bfd96a4a0bcbadab66a8166e80e069a5d2f416841ca5e57d273a4e4baea323cb_bfd96a4a0bcbadab66a8166e80e069a5d2f416841ca5e57d273a4e4baea323cb.jsonl.gz", "strip_func_name": "do_tcp_metrics", "query": "\n\n\n__int64 __fastcall do_tcp_metrics(int a1, const char **a2)\n{\nunsigned int i; // [rsp+1Ch] [rbp-4h]\n\nif ( a1 <= 0 )\nreturn sub_4500CF(1, 0, 0LL);\nfor ( i = 0; ; ++i )\n{\nif ( i > 5 )\n{\nif ( (unsigned __int8)matches(*a2, \"help\") != 1 )\nsub_44F54D();\nfprintf(stderr, \"Command \\\"%s\\\" is unknown, try \\\"ip tcp_metrics help\\\".\\n\", *a2);\nexit(-1);\n}\nif ( (unsigned __int8)matches(*a2, qword_4998C0[2 * (int)i]) != 1 )\nbreak;\n}\nreturn sub_4500CF(qword_4998C0[2 * (int)i + 1], a1 - 1, a2 + 1);\n}\n\n\n\nQ:[a1,a2,sub_4500CF,sub_44F54D,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'argc', 'a2': 'argv', 'sub_4500CF': 'tcpm_do_cmd', 'sub_44F54D': 'usage_23'}"}
cmd_history
be79effb398ea232e1aca0be5fa587e26435e1248426375af2f46bf3dfddde7b
kieselsteini
delve
NA
static void cmd_history(char *line) { Selector *to = find_selector(history, line); if (to != NULL) navigate(to); else print_menu(history, next_token(&line)); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4044CC", "function_addr": 4211916, "binary_name": "be79effb398ea232e1aca0be5fa587e26435e1248426375af2f46bf3dfddde7b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov rdx, [rbp+var_18]"], [5, "mov rax, cs:qword_409240"], [6, "mov rsi, rdx"], [7, "mov rdi, rax"], [8, "call sub_402DB3"], [9, "mov [rbp+var_8], rax"], [10, "cmp [rbp+var_8], 0"], [11, "jz short loc_404507"], [12, "mov rax, [rbp+var_8]"], [13, "mov rdi, rax"], [14, "call sub_403FFA"], [15, "jmp short loc_404528"], [16, "lea rax, [rbp+var_18]"], [17, "mov rdi, rax"], [18, "call sub_403161"], [19, "mov rdx, rax"], [20, "mov rax, cs:qword_409240"], [21, "mov rsi, rdx"], [22, "mov rdi, rax"], [23, "call sub_403C5B"], [24, "nop"], [25, "leave"], [26, "retn"]], "data_dep": [[4, 3], [6, 4], [7, 5], [9, 8], [10, 9], [11, 10], [12, 9], [13, 12], [16, 3], [16, 8], [17, 16], [19, 18], [21, 19], [22, 20], [26, 14], [26, 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/be79effb398ea232e1aca0be5fa587e26435e1248426375af2f46bf3dfddde7b_be79effb398ea232e1aca0be5fa587e26435e1248426375af2f46bf3dfddde7b.jsonl.gz", "strip_func_name": "sub_4044CC", "query": "\n\n\nvoid __fastcall sub_4044CC(char *a1)\n{\n_BYTE *v1; // rdx\n_BYTE *v2; // rcx\n_BYTE *v3; // r8\n_BYTE *v4; // r9\nchar *v5; // rax\nchar *v6; // [rsp+8h] [rbp-18h] BYREF\n__int64 *v7; // [rsp+18h] [rbp-8h]\n\nv6 = a1;\nv7 = sub_402DB3((__int64 *)qword_409240, a1);\nif ( v7 )\n{\nsub_403FFA((__int64)v7, a1, v1, v2, v3, v4);\n}\nelse\n{\nv5 = (char *)sub_403161(&v6);\nsub_403C5B(qword_409240, v5);\n}\n}\n\n\n\nQ:[a1,v6,v7,sub_4044CC,sub_402DB3,sub_403FFA,sub_403161,sub_403C5B,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'line', 'v6': 'linea', 'v7': 'to', 'sub_4044CC': 'cmd_history', 'sub_402DB3': 'find_selector', 'sub_403FFA': 'navigate', 'sub_403161': 'next_token', 'sub_403C5B': 'print_menu'}"}
s2n_get_auth_method_for_cert_type
7421faa8c444aeca9266add08f45c75a4f43aebd993f880cd35dd964f63fdfb2
aws
s2n-tls
NA
int s2n_get_auth_method_for_cert_type(s2n_pkey_type cert_type, s2n_authentication_method *auth_method) { switch (cert_type) { case S2N_PKEY_TYPE_RSA: case S2N_PKEY_TYPE_RSA_PSS: *auth_method = S2N_AUTHENTICATION_RSA; return S2N_SUCCESS; case S2N_PKEY_TYPE_ECDSA: *auth_method = S2N_AUTHENTICATION_ECDSA; return S2N_SUCCESS; case S2N_PKEY_TYPE_UNKNOWN: case S2N_PKEY_TYPE_SENTINEL: POSIX_BAIL(S2N_ERR_CERT_TYPE_UNSUPPORTED); } POSIX_BAIL(S2N_ERR_CERT_TYPE_UNSUPPORTED); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43202D", "function_addr": 4399149, "binary_name": "7421faa8c444aeca9266add08f45c75a4f43aebd993f880cd35dd964f63fdfb2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_14], edi"], [4, "mov [rbp+var_20], rsi"], [5, "mov rax, fs:28h"], [6, "mov [rbp+var_8], rax"], [7, "xor eax, eax"], [8, "mov eax, [rbp+var_14]"], [9, "add eax, 1"], [10, "cmp eax, 4"], [11, "ja def_43207A"], [12, "mov eax, eax"], [13, "lea rdx, ds:0[rax*4]"], [14, "lea rax, jpt_43207A"], [15, "mov eax, ds:(jpt_43207A - 57EE08h)[rdx+rax]"], [16, "cdqe"], [17, "lea rdx, jpt_43207A"], [18, "add rax, rdx"], [19, "jmp rax"], [20, "mov rax, [rbp+var_20]"], [21, "mov dword ptr [rax], 0"], [22, "mov eax, 0"], [23, "jmp loc_432117"], [24, "mov rax, [rbp+var_20]"], [25, "mov dword ptr [rax], 1"], [26, "mov eax, 0"], [27, "jmp short loc_432117"], [28, "mov rax, fs:0"], [29, "lea rax, [rax-18h]"], [30, "lea rdx, aErrorEncounter_635"], [31, "mov [rax], rdx"], [32, "mov rax, fs:0"], [33, "lea rax, [rax-20h]"], [34, "mov dword ptr [rax], 1400002Bh"], [35, "call sub_46D9B7"], [36, "mov eax, 0FFFFFFFFh"], [37, "jmp short loc_432117"], [38, "mov rax, fs:0"], [39, "lea rax, [rax-18h]"], [40, "lea rdx, aErrorEncounter_636"], [41, "mov [rax], rdx"], [42, "mov rax, fs:0"], [43, "lea rax, [rax-20h]"], [44, "mov dword ptr [rax], 1400002Bh"], [45, "call sub_46D9B7"], [46, "mov eax, 0FFFFFFFFh"], [47, "mov rcx, [rbp+var_8]"], [48, "sub rcx, fs:28h"], [49, "jz short locret_43212B"], [50, "call ___stack_chk_fail"], [51, "leave"], [52, "retn"]], "data_dep": [[6, 5], [8, 3], [9, 8], [10, 9], [11, 10], [12, 9], [14, 12], [17, 13], [18, 17], [18, 15], [19, 18], [20, 4], [21, 20], [24, 4], [25, 24], [29, 28], [30, 17], [31, 29], [31, 30], [33, 32], [33, 31], [34, 33], [39, 38], [41, 40], [41, 39], [43, 42], [43, 41], [44, 43], [47, 6], [48, 47], [49, 48], [52, 46], [52, 36], [52, 26], [52, 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/7421faa8c444aeca9266add08f45c75a4f43aebd993f880cd35dd964f63fdfb2_7421faa8c444aeca9266add08f45c75a4f43aebd993f880cd35dd964f63fdfb2.jsonl.gz", "strip_func_name": "sub_43202D", "query": "\n\n\n__int64 __fastcall sub_43202D(__int64 a1, _DWORD *a2)\n{\n__int64 result; // rax\n\nswitch ( (int)a1 )\n{\ncase -1:\ncase 3:\n*(_QWORD *)(__readfsqword(0) - 24) = \"Error encountered in s2n_auth_selection.c:54\";\n*(_DWORD *)(__readfsqword(0) - 32) = 335544363;\nsub_46D9B7(a1, a2);\nresult = 0xFFFFFFFFLL;\nbreak;\ncase 0:\ncase 2:\n*a2 = 0;\nresult = 0LL;\nbreak;\ncase 1:\n*a2 = 1;\nresult = 0LL;\nbreak;\ndefault:\n*(_QWORD *)(__readfsqword(0) - 24) = \"Error encountered in s2n_auth_selection.c:56\";\n*(_DWORD *)(__readfsqword(0) - 32) = 335544363;\nsub_46D9B7(a1, a2);\nresult = 0xFFFFFFFFLL;\nbreak;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_43202D,sub_46D9B7,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'cert_type', 'a2': 'auth_method', 'sub_43202D': 's2n_get_auth_method_for_cert_type', 'sub_46D9B7': 's2n_calculate_stacktrace'}"}
inmDumpStats
0c427226ae8203e25e4e665ef4941303743048e59beffdc2e573120600aec2cc
waywardgeek
infnoise
NA
static void inmDumpStats(void) { uint32_t i, j; for(i = 0u; i < inmNumStreams; i++) { printf("*************************************** stream %u\n", i); for(j = 0u; j < 1u << inmN; j++) { printf("%x ones:%u(%.2g%%) zeros:%u(%.2g%%)\n", j, inmOnes[i][j], inmOnes[i][j]*100.0/inmTotalBits, inmZeros[i][j], inmZeros[i][j]*100.0/inmTotalBits); } } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401856", "function_addr": 4200534, "binary_name": "0c427226ae8203e25e4e665ef4941303743048e59beffdc2e573120600aec2cc.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_4], 0"], [4, "jmp loc_401A2C"], [5, "mov eax, [rbp+var_4]"], [6, "mov esi, eax"], [7, "mov edi, offset format"], [8, "mov eax, 0"], [9, "call _printf"], [10, "mov [rbp+var_8], 0"], [11, "jmp loc_401A0A"], [12, "mov rdx, cs:qword_404088"], [13, "mov eax, [rbp+var_4]"], [14, "shl rax, 3"], [15, "add rax, rdx"], [16, "mov rdx, [rax]"], [17, "mov eax, [rbp+var_8]"], [18, "shl rax, 2"], [19, "add rax, rdx"], [20, "mov eax, [rax]"], [21, "mov eax, eax"], [22, "test rax, rax"], [23, "js short loc_4018BC"], [24, "pxor xmm0, xmm0"], [25, "cvtsi2sd xmm0, rax"], [26, "jmp short loc_4018D5"], [27, "mov rdx, rax"], [28, "shr rdx, 1"], [29, "and eax, 1"], [30, "or rdx, rax"], [31, "pxor xmm0, xmm0"], [32, "cvtsi2sd xmm0, rdx"], [33, "addsd xmm0, xmm0"], [34, "movsd xmm1, cs:qword_4022E0"], [35, "mulsd xmm1, xmm0"], [36, "mov rax, cs:qword_4040A0"], [37, "test rax, rax"], [38, "js short loc_4018F8"], [39, "pxor xmm0, xmm0"], [40, "cvtsi2sd xmm0, rax"], [41, "jmp short loc_401911"], [42, "mov rdx, rax"], [43, "shr rdx, 1"], [44, "and eax, 1"], [45, "or rdx, rax"], [46, "pxor xmm0, xmm0"], [47, "cvtsi2sd xmm0, rdx"], [48, "addsd xmm0, xmm0"], [49, "movapd xmm2, xmm1"], [50, "divsd xmm2, xmm0"], [51, "mov rdx, cs:qword_404088"], [52, "mov eax, [rbp+var_4]"], [53, "shl rax, 3"], [54, "add rax, rdx"], [55, "mov rdx, [rax]"], [56, "mov eax, [rbp+var_8]"], [57, "shl rax, 2"], [58, "add rax, rdx"], [59, "mov ecx, [rax]"], [60, "mov rdx, cs:qword_404080"], [61, "mov eax, [rbp+var_4]"], [62, "shl rax, 3"], [63, "add rax, rdx"], [64, "mov rdx, [rax]"], [65, "mov eax, [rbp+var_8]"], [66, "shl rax, 2"], [67, "add rax, rdx"], [68, "mov eax, [rax]"], [69, "mov eax, eax"], [70, "test rax, rax"], [71, "js short loc_40196B"], [72, "pxor xmm0, xmm0"], [73, "cvtsi2sd xmm0, rax"], [74, "jmp short loc_401984"], [75, "mov rdx, rax"], [76, "shr rdx, 1"], [77, "and eax, 1"], [78, "or rdx, rax"], [79, "pxor xmm0, xmm0"], [80, "cvtsi2sd xmm0, rdx"], [81, "addsd xmm0, xmm0"], [82, "movsd xmm1, cs:qword_4022E0"], [83, "mulsd xmm1, xmm0"], [84, "mov rax, cs:qword_4040A0"], [85, "test rax, rax"], [86, "js short loc_4019A7"], [87, "pxor xmm0, xmm0"], [88, "cvtsi2sd xmm0, rax"], [89, "jmp short loc_4019C0"], [90, "mov rdx, rax"], [91, "shr rdx, 1"], [92, "and eax, 1"], [93, "or rdx, rax"], [94, "pxor xmm0, xmm0"], [95, "cvtsi2sd xmm0, rdx"], [96, "addsd xmm0, xmm0"], [97, "divsd xmm1, xmm0"], [98, "movq rsi, xmm1"], [99, "mov rdx, cs:qword_404080"], [100, "mov eax, [rbp+var_4]"], [101, "shl rax, 3"], [102, "add rax, rdx"], [103, "mov rdx, [rax]"], [104, "mov eax, [rbp+var_8]"], [105, "shl rax, 2"], [106, "add rax, rdx"], [107, "mov edx, [rax]"], [108, "mov eax, [rbp+var_8]"], [109, "movapd xmm1, xmm2"], [110, "movq xmm0, rsi"], [111, "mov esi, eax"], [112, "mov edi, offset aXOnesU2gZerosU"], [113, "mov eax, 2"], [114, "call _printf"], [115, "add [rbp+var_8], 1"], [116, "movzx eax, cs:byte_404070"], [117, "movzx eax, al"], [118, "mov edx, 1"], [119, "mov ecx, eax"], [120, "shl edx, cl"], [121, "mov eax, edx"], [122, "cmp [rbp+var_8], eax"], [123, "jb loc_40188A"], [124, "add [rbp+var_4], 1"], [125, "movzx eax, cs:byte_404071"], [126, "movzx eax, al"], [127, "cmp [rbp+var_4], eax"], [128, "jb loc_40186A"], [129, "nop"], [130, "nop"], [131, "leave"], [132, "retn"]], "data_dep": [[5, 3], [5, 124], [6, 5], [13, 3], [13, 124], [14, 13], [15, 14], [15, 12], [16, 15], [17, 115], [17, 10], [18, 17], [19, 18], [19, 16], [20, 19], [21, 20], [22, 21], [23, 22], [25, 22], [25, 24], [27, 22], [28, 27], [29, 22], [30, 29], [30, 28], [32, 30], [32, 31], [33, 32], [35, 33], [35, 25], [35, 34], [37, 36], [38, 37], [40, 37], [40, 39], [42, 37], [43, 42], [44, 37], [45, 43], [45, 44], [47, 45], [47, 46], [48, 47], [49, 35], [50, 40], [50, 49], [50, 48], [52, 3], [52, 124], [53, 52], [54, 51], [54, 53], [55, 54], [56, 10], [56, 115], [57, 56], [58, 55], [58, 57], [59, 58], [61, 3], [61, 124], [62, 61], [63, 60], [63, 62], [64, 63], [65, 115], [65, 10], [66, 65], [67, 64], [67, 66], [68, 67], [69, 68], [70, 69], [71, 70], [73, 70], [73, 72], [75, 70], [76, 75], [77, 70], [78, 77], [78, 76], [80, 78], [80, 79], [81, 80], [83, 73], [83, 82], [83, 81], [85, 84], [86, 85], [88, 85], [88, 87], [90, 85], [91, 90], [92, 85], [93, 92], [93, 91], [95, 93], [95, 94], [96, 95], [97, 88], [97, 83], [97, 96], [98, 97], [100, 3], [100, 124], [101, 100], [102, 99], [102, 101], [103, 102], [104, 115], [104, 10], [105, 104], [106, 103], [106, 105], [107, 106], [108, 115], [108, 10], [109, 50], [110, 98], [111, 108], [115, 115], [115, 10], [117, 116], [119, 117], [120, 119], [120, 118], [121, 120], [122, 115], [122, 121], [122, 10], [123, 122], [124, 3], [124, 124], [126, 125], [127, 3], [127, 124], [127, 126], [128, 127], [132, 126]]}
{"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/0c427226ae8203e25e4e665ef4941303743048e59beffdc2e573120600aec2cc_0c427226ae8203e25e4e665ef4941303743048e59beffdc2e573120600aec2cc.jsonl.gz", "strip_func_name": "sub_401856", "query": "\n\n\n__int64 sub_401856()\n{\ndouble v0; // xmm0_8\ndouble v1; // xmm2_8\ndouble v2; // xmm0_8\n__int64 result; // rax\nunsigned int j; // [rsp+8h] [rbp-8h]\nunsigned int i; // [rsp+Ch] [rbp-4h]\n\nfor ( i = 0; ; ++i )\n{\nresult = (unsigned __int8)byte_404071;\nif ( i >= (unsigned __int8)byte_404071 )\nbreak;\nprintf(\"*************************************** stream %u\\n\", i);\nfor ( j = 0; j < 1 << byte_404070; ++j )\n{\nif ( qword_4040A0 < 0 )\nv0 = (double)(int)(qword_4040A0 & 1 | ((unsigned __int64)qword_4040A0 >> 1))\n+ (double)(int)(qword_4040A0 & 1 | ((unsigned __int64)qword_4040A0 >> 1));\nelse\nv0 = (double)(int)qword_4040A0;\nv1 = 100.0 * (double)*(int *)(*(_QWORD *)(qword_404088 + 8LL * i) + 4LL * j) / v0;\nif ( qword_4040A0 < 0 )\nv2 = (double)(int)(qword_4040A0 & 1 | ((unsigned __int64)qword_4040A0 >> 1))\n+ (double)(int)(qword_4040A0 & 1 | ((unsigned __int64)qword_4040A0 >> 1));\nelse\nv2 = (double)(int)qword_4040A0;\nprintf(\n\"%x ones:%u(%.2g%%) zeros:%u(%.2g%%)\\n\",\nj,\n*(unsigned int *)(*(_QWORD *)(qword_404080 + 8LL * i) + 4LL * j),\n100.0 * (double)*(int *)(*(_QWORD *)(qword_404080 + 8LL * i) + 4LL * j) / v2,\n*(unsigned int *)(*(_QWORD *)(qword_404088 + 8LL * i) + 4LL * j),\nv1);\n}\n}\nreturn result;\n}\n\n\n\nQ:[sub_401856,]\nAssistant: ", "hints": "[]", "response": "{'sub_401856': 'inmDumpStats'}"}
MCOperand_getReg
57a1205861373a750f3e5da5e31d94ad23e74ba0b8590e4f8967e5b3526ffe2e
dnasdw
3dstool
NA
unsigned MCOperand_getReg(const MCOperand *op) { return op->RegVal; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404BF1", "function_addr": 4213745, "binary_name": "57a1205861373a750f3e5da5e31d94ad23e74ba0b8590e4f8967e5b3526ffe2e.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov rax, [rbp+var_8]"], [4, "mov eax, [rax+8]"], [5, "pop rbp"], [6, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 0], [6, 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/57a1205861373a750f3e5da5e31d94ad23e74ba0b8590e4f8967e5b3526ffe2e_57a1205861373a750f3e5da5e31d94ad23e74ba0b8590e4f8967e5b3526ffe2e.jsonl.gz", "strip_func_name": "sub_404BF1", "query": "\n\n\n__int64 __fastcall sub_404BF1(__int64 a1)\n{\nreturn *(unsigned int *)(a1 + 8);\n}\n\n\n\nQ:[a1,sub_404BF1,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'op', 'sub_404BF1': 'MCOperand_getReg'}"}
caml_atan2_float
04d915045c8d6a6e6ffd8541db3ef8d847d699fb3a934be690d768413ec7577b
programa-stic
ropc-llvm
NA
CAMLprim value caml_atan2_float(value f, value g) { return caml_copy_double(atan2(Double_val(f), Double_val(g))); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "caml_atan2_float", "function_addr": 4268663, "binary_name": "04d915045c8d6a6e6ffd8541db3ef8d847d699fb3a934be690d768413ec7577b.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, "movsd xmm0, qword ptr [rax]"], [7, "mov rax, [rbp+var_8]"], [8, "mov rax, [rax]"], [9, "movapd xmm1, xmm0"], [10, "movq xmm0, rax"], [11, "call _atan2"], [12, "movq rax, xmm0"], [13, "movq xmm0, rax"], [14, "call caml_copy_double"], [15, "leave"], [16, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 3], [8, 7], [9, 6], [10, 8], [12, 10], [13, 12], [16, 14]]}
{"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/04d915045c8d6a6e6ffd8541db3ef8d847d699fb3a934be690d768413ec7577b_04d915045c8d6a6e6ffd8541db3ef8d847d699fb3a934be690d768413ec7577b.jsonl.gz", "strip_func_name": "caml_atan2_float", "query": "\n\n\n__int64 __fastcall caml_atan2_float(double *a1, double *a2)\n{\ndouble v2; // xmm0_8\n\nv2 = atan2(*a1, *a2);\nreturn caml_copy_double(v2);\n}\n\n\n\nQ:[a1,a2,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'f', 'a2': 'g'}"}
gettid
42b9cb0422a1c78635feb8fba999ca2c8214840ffb0193952c8a598439ecf984
facebook
openbmc-linux
NA
static int gettid(void) { return syscall(__NR_gettid); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401473", "function_addr": 4199539, "binary_name": "42b9cb0422a1c78635feb8fba999ca2c8214840ffb0193952c8a598439ecf984.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov edi, 0BAh"], [3, "mov eax, 0"], [4, "call _syscall"], [5, "pop rbp"], [6, "retn"]], "data_dep": [[5, 0], [6, 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/42b9cb0422a1c78635feb8fba999ca2c8214840ffb0193952c8a598439ecf984_42b9cb0422a1c78635feb8fba999ca2c8214840ffb0193952c8a598439ecf984.jsonl.gz", "strip_func_name": "sub_401473", "query": "\n\n\n__int64 sub_401473()\n{\nreturn syscall(186LL);\n}\n\n\n\nQ:[sub_401473,]\nAssistant: ", "hints": "[]", "response": "{'sub_401473': 'gettid'}"}
line
df9792983134b4cae5bac5fb5e285f0fcf93cfa78f1b4d58bacff8b93102ff03
janmojzis
dq
NA
static void line(void) { string("\n"); buffer_flush(buffer_2); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_412D0C", "function_addr": 4271372, "binary_name": "df9792983134b4cae5bac5fb5e285f0fcf93cfa78f1b4d58bacff8b93102ff03.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov edi, offset asc_420045"], [3, "call sub_412CE7"], [4, "mov rax, cs:off_426208"], [5, "mov rdi, rax"], [6, "call sub_404A77"], [7, "nop"], [8, "pop rbp"], [9, "retn"]], "data_dep": [[5, 4], [8, 0], [9, 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/df9792983134b4cae5bac5fb5e285f0fcf93cfa78f1b4d58bacff8b93102ff03_df9792983134b4cae5bac5fb5e285f0fcf93cfa78f1b4d58bacff8b93102ff03.jsonl.gz", "strip_func_name": "sub_412D0C", "query": "\n\n\n__int64 sub_412D0C()\n{\nsub_412CE7((__int64)\"\\n\");\nreturn sub_404A77((__int64)off_426208);\n}\n\n\n\nQ:[sub_412D0C,sub_412CE7,sub_404A77,]\nAssistant: ", "hints": "[]", "response": "{'sub_412D0C': 'line', 'sub_412CE7': 'string', 'sub_404A77': 'buffer_flush'}"}
mergetraits
ab255ff95aea848f5e75ce30d5178c77a5cd78bf1743b6b99d8aa551084bee8f
oridb
mc
NA
static void mergetraits(Node *ctx, Type *a, Type *b) { if (b->type == Tyvar) { /* make sure that if a = b, both have same traits */ if (a->trneed && b->trneed) bsunion(b->trneed, a->trneed); else if (a->trneed) b->trneed = bsdup(a->trneed); else if (b->trneed) a->trneed = bsdup(b->trneed); } else { verifytraits(ctx, a, b); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405A0F", "function_addr": 4217359, "binary_name": "ab255ff95aea848f5e75ce30d5178c77a5cd78bf1743b6b99d8aa551084bee8f.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 eax, [rax]"], [8, "cmp eax, 19h"], [9, "jnz loc_405AD5"], [10, "mov rax, [rbp+var_10]"], [11, "mov rax, [rax+80h]"], [12, "test rax, rax"], [13, "jz short loc_405A75"], [14, "mov rax, [rbp+var_18]"], [15, "mov rax, [rax+80h]"], [16, "test rax, rax"], [17, "jz short loc_405A75"], [18, "mov rax, [rbp+var_10]"], [19, "mov rdx, [rax+80h]"], [20, "mov rax, [rbp+var_18]"], [21, "mov rax, [rax+80h]"], [22, "mov rsi, rdx"], [23, "mov rdi, rax"], [24, "call sub_41E6D8"], [25, "jmp short loc_405AEC"], [26, "mov rax, [rbp+var_10]"], [27, "mov rax, [rax+80h]"], [28, "test rax, rax"], [29, "jz short loc_405AA5"], [30, "mov rax, [rbp+var_10]"], [31, "mov rax, [rax+80h]"], [32, "mov rdi, rax"], [33, "call sub_41E2EF"], [34, "mov rdx, [rbp+var_18]"], [35, "mov [rdx+80h], rax"], [36, "jmp short loc_405AEC"], [37, "mov rax, [rbp+var_18]"], [38, "mov rax, [rax+80h]"], [39, "test rax, rax"], [40, "jz short loc_405AEC"], [41, "mov rax, [rbp+var_18]"], [42, "mov rax, [rax+80h]"], [43, "mov rdi, rax"], [44, "call sub_41E2EF"], [45, "mov rdx, [rbp+var_10]"], [46, "mov [rdx+80h], rax"], [47, "jmp short loc_405AEC"], [48, "mov rdx, [rbp+var_18]"], [49, "mov rcx, [rbp+var_10]"], [50, "mov rax, [rbp+var_8]"], [51, "mov rsi, rcx"], [52, "mov rdi, rax"], [53, "call sub_4056F4"], [54, "nop"], [55, "leave"], [56, "retn"]], "data_dep": [[6, 5], [7, 6], [8, 7], [9, 8], [10, 4], [11, 10], [12, 11], [13, 12], [14, 5], [15, 14], [16, 15], [17, 16], [18, 4], [19, 18], [20, 5], [21, 20], [22, 19], [23, 21], [26, 4], [27, 26], [28, 27], [29, 28], [30, 4], [31, 30], [32, 31], [34, 5], [35, 33], [35, 34], [37, 5], [38, 37], [39, 38], [40, 39], [41, 5], [42, 41], [43, 42], [45, 4], [46, 45], [46, 44], [48, 5], [49, 4], [50, 3], [51, 49], [52, 50], [56, 24], [56, 33], [56, 39], [56, 44], [56, 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/ab255ff95aea848f5e75ce30d5178c77a5cd78bf1743b6b99d8aa551084bee8f_ab255ff95aea848f5e75ce30d5178c77a5cd78bf1743b6b99d8aa551084bee8f.jsonl.gz", "strip_func_name": "sub_405A0F", "query": "\n\n\n__int64 __fastcall sub_405A0F(__int64 a1, __int64 a2, __int64 a3)\n{\n__int64 result; // rax\n\nif ( *(_DWORD *)a3 != 25 )\nreturn sub_4056F4(a1, a2, a3);\nif ( *(_QWORD *)(a2 + 128) && *(_QWORD *)(a3 + 128) )\nreturn sub_41E6D8(*(_QWORD *)(a3 + 128), *(_QWORD *)(a2 + 128));\nif ( *(_QWORD *)(a2 + 128) )\n{\nresult = sub_41E2EF(*(_QWORD *)(a2 + 128));\n*(_QWORD *)(a3 + 128) = result;\n}\nelse\n{\nresult = *(_QWORD *)(a3 + 128);\nif ( result )\n{\nresult = sub_41E2EF(*(_QWORD *)(a3 + 128));\n*(_QWORD *)(a2 + 128) = result;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_405A0F,sub_4056F4,sub_41E6D8,sub_41E2EF,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'b', 'a1': 'ctx', 'a2': 'a', 'sub_405A0F': 'mergetraits', 'sub_4056F4': 'verifytraits', 'sub_41E6D8': 'bsunion', 'sub_41E2EF': 'bsdup'}"}
vt_color_get
59e38d28aabe42db81b9a29bf97cdbff97200e90593c16b1ecf0d6253ce280e0
martanne
dvtm
NA
short vt_color_get(Vt *t, short fg, short bg) { if (fg >= COLORS) fg = (t ? t->deffg : default_fg); if (bg >= COLORS) bg = (t ? t->defbg : default_bg); if (!has_default_colors) { if (fg == -1) fg = (t && t->deffg != -1 ? t->deffg : default_fg); if (bg == -1) bg = (t && t->defbg != -1 ? t->defbg : default_bg); } if (!color2palette || (fg == -1 && bg == -1)) return 0; unsigned int index = color_hash(fg, bg); if (color2palette[index] == 0) { short oldfg, oldbg; for (;;) { if (++color_pair_current >= color_pairs_max) color_pair_current = color_pairs_reserved + 1; pair_content(color_pair_current, &oldfg, &oldbg); unsigned int old_index = color_hash(oldfg, oldbg); if (color2palette[old_index] >= 0) { if (init_pair(color_pair_current, fg, bg) == OK) { color2palette[old_index] = 0; color2palette[index] = color_pair_current; } break; } } } short color_pair = color2palette[index]; return color_pair >= 0 ? color_pair : -color_pair; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40D870", "function_addr": 4249712, "binary_name": "59e38d28aabe42db81b9a29bf97cdbff97200e90593c16b1ecf0d6253ce280e0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov ecx, esi"], [5, "mov eax, edx"], [6, "mov edx, ecx"], [7, "mov [rbp+var_1C], dx"], [8, "mov [rbp+var_20], ax"], [9, "movsx edx, [rbp+var_1C]"], [10, "mov eax, cs:COLORS"], [11, "cmp edx, eax"], [12, "jl short loc_40D8B7"], [13, "cmp [rbp+var_18], 0"], [14, "jz short loc_40D8AC"], [15, "mov rax, [rbp+var_18]"], [16, "movzx eax, word ptr [rax+0DCh]"], [17, "jmp short loc_40D8B3"], [18, "movzx eax, cs:word_415930"], [19, "mov [rbp+var_1C], ax"], [20, "movsx edx, [rbp+var_20]"], [21, "mov eax, cs:COLORS"], [22, "cmp edx, eax"], [23, "jl short loc_40D8E4"], [24, "cmp [rbp+var_18], 0"], [25, "jz short loc_40D8D9"], [26, "mov rax, [rbp+var_18]"], [27, "movzx eax, word ptr [rax+0DEh]"], [28, "jmp short loc_40D8E0"], [29, "movzx eax, cs:word_415932"], [30, "mov [rbp+var_20], ax"], [31, "movzx eax, cs:byte_415921"], [32, "xor eax, 1"], [33, "test al, al"], [34, "jz short loc_40D960"], [35, "cmp [rbp+var_1C], 0FFFFh"], [36, "jnz short loc_40D929"], [37, "cmp [rbp+var_18], 0"], [38, "jz short loc_40D91E"], [39, "mov rax, [rbp+var_18]"], [40, "movzx eax, word ptr [rax+0DCh]"], [41, "cmp ax, 0FFFFh"], [42, "jz short loc_40D91E"], [43, "mov rax, [rbp+var_18]"], [44, "movzx eax, word ptr [rax+0DCh]"], [45, "jmp short loc_40D925"], [46, "movzx eax, cs:word_415930"], [47, "mov [rbp+var_1C], ax"], [48, "cmp [rbp+var_20], 0FFFFh"], [49, "jnz short loc_40D960"], [50, "cmp [rbp+var_18], 0"], [51, "jz short loc_40D955"], [52, "mov rax, [rbp+var_18]"], [53, "movzx eax, word ptr [rax+0DEh]"], [54, "cmp ax, 0FFFFh"], [55, "jz short loc_40D955"], [56, "mov rax, [rbp+var_18]"], [57, "movzx eax, word ptr [rax+0DEh]"], [58, "jmp short loc_40D95C"], [59, "movzx eax, cs:word_415932"], [60, "mov [rbp+var_20], ax"], [61, "mov rax, cs:qword_415928"], [62, "test rax, rax"], [63, "jz short loc_40D97A"], [64, "cmp [rbp+var_1C], 0FFFFh"], [65, "jnz short loc_40D984"], [66, "cmp [rbp+var_20], 0FFFFh"], [67, "jnz short loc_40D984"], [68, "mov eax, 0"], [69, "jmp locret_40DAA9"], [70, "movsx edx, [rbp+var_20]"], [71, "movsx eax, [rbp+var_1C]"], [72, "mov esi, edx"], [73, "mov edi, eax"], [74, "call sub_40D823"], [75, "mov [rbp+var_4], eax"], [76, "mov rdx, cs:qword_415928"], [77, "mov eax, [rbp+var_4]"], [78, "add rax, rax"], [79, "add rax, rdx"], [80, "movzx eax, word ptr [rax]"], [81, "test ax, ax"], [82, "jnz loc_40DA80"], [83, "movzx eax, cs:word_415926"], [84, "add eax, 1"], [85, "mov cs:word_415926, ax"], [86, "movzx edx, cs:word_415926"], [87, "movzx eax, cs:word_415924"], [88, "cmp dx, ax"], [89, "jl short loc_40D9E9"], [90, "movzx eax, cs:word_415922"], [91, "add eax, 1"], [92, "mov cs:word_415926, ax"], [93, "movzx eax, cs:word_415926"], [94, "cwde"], [95, "lea rdx, [rbp+var_E]"], [96, "lea rcx, [rbp+var_C]"], [97, "mov rsi, rcx"], [98, "mov edi, eax"], [99, "call _pair_content"], [100, "movzx eax, [rbp+var_E]"], [101, "movsx edx, ax"], [102, "movzx eax, [rbp+var_C]"], [103, "cwde"], [104, "mov esi, edx"], [105, "mov edi, eax"], [106, "call sub_40D823"], [107, "mov [rbp+var_8], eax"], [108, "mov rdx, cs:qword_415928"], [109, "mov eax, [rbp+var_8]"], [110, "add rax, rax"], [111, "add rax, rdx"], [112, "movzx eax, word ptr [rax]"], [113, "test ax, ax"], [114, "js short loc_40D9B4"], [115, "movsx edx, [rbp+var_20]"], [116, "movsx ecx, [rbp+var_1C]"], [117, "movzx eax, cs:word_415926"], [118, "cwde"], [119, "mov esi, ecx"], [120, "mov edi, eax"], [121, "call _init_pair"], [122, "test eax, eax"], [123, "jnz short loc_40DA7F"], [124, "mov rdx, cs:qword_415928"], [125, "mov eax, [rbp+var_8]"], [126, "add rax, rax"], [127, "add rax, rdx"], [128, "mov word ptr [rax], 0"], [129, "mov rdx, cs:qword_415928"], [130, "mov eax, [rbp+var_4]"], [131, "add rax, rax"], [132, "add rdx, rax"], [133, "movzx eax, cs:word_415926"], [134, "mov [rdx], ax"], [135, "nop"], [136, "mov rdx, cs:qword_415928"], [137, "mov eax, [rbp+var_4]"], [138, "add rax, rax"], [139, "add rax, rdx"], [140, "movzx eax, word ptr [rax]"], [141, "mov [rbp+var_A], ax"], [142, "movzx eax, [rbp+var_A]"], [143, "sar ax, 0Fh"], [144, "mov edx, eax"], [145, "mov eax, edx"], [146, "xor ax, [rbp+var_A]"], [147, "sub eax, edx"], [148, "leave"], [149, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 5], [9, 7], [11, 9], [11, 10], [12, 11], [13, 3], [14, 13], [15, 3], [16, 15], [19, 18], [19, 16], [20, 8], [22, 21], [22, 20], [23, 22], [24, 3], [25, 24], [26, 3], [27, 26], [30, 27], [30, 29], [32, 31], [33, 32], [34, 33], [35, 19], [35, 7], [36, 35], [37, 3], [38, 37], [39, 3], [40, 39], [41, 40], [42, 41], [43, 3], [44, 43], [47, 44], [47, 46], [48, 8], [48, 30], [49, 48], [50, 3], [51, 50], [52, 3], [53, 52], [54, 53], [55, 54], [56, 3], [57, 56], [60, 57], [60, 59], [62, 61], [63, 62], [64, 7], [64, 47], [64, 19], [65, 64], [66, 60], [66, 8], [66, 30], [67, 66], [70, 8], [70, 30], [70, 60], [71, 47], [71, 19], [71, 7], [72, 70], [73, 71], [75, 74], [77, 75], [78, 77], [79, 76], [79, 78], [80, 79], [81, 80], [82, 81], [83, 85], [83, 92], [84, 83], [85, 84], [86, 85], [88, 86], [88, 87], [89, 88], [91, 90], [92, 91], [93, 92], [93, 85], [95, 86], [96, 96], [96, 4], [97, 96], [98, 93], [101, 100], [104, 101], [105, 102], [107, 106], [109, 107], [110, 109], [111, 110], [111, 108], [112, 111], [113, 112], [114, 113], [115, 8], [115, 60], [115, 30], [116, 47], [116, 19], [116, 7], [117, 92], [117, 85], [119, 116], [120, 117], [122, 121], [123, 122], [125, 107], [126, 125], [127, 124], [127, 126], [128, 127], [130, 75], [131, 130], [132, 129], [132, 131], [133, 92], [133, 85], [134, 133], [134, 132], [137, 75], [138, 137], [139, 136], [139, 138], [140, 128], [140, 139], [140, 134], [141, 140], [142, 141], [143, 142], [144, 143], [145, 144], [146, 141], [146, 145], [147, 144], [147, 146], [149, 68], [149, 147]]}
{"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/59e38d28aabe42db81b9a29bf97cdbff97200e90593c16b1ecf0d6253ce280e0_59e38d28aabe42db81b9a29bf97cdbff97200e90593c16b1ecf0d6253ce280e0.jsonl.gz", "strip_func_name": "sub_40D870", "query": "\n\n\n__int64 __fastcall sub_40D870(__int64 a1, __int16 a2, __int16 a3)\n{\n__int16 v3; // ax\n__int16 v4; // ax\n__int16 v5; // ax\n__int16 v6; // ax\nint v8; // eax\nint v9; // edx\n__int16 v10; // [rsp+0h] [rbp-20h]\n__int16 v11; // [rsp+4h] [rbp-1Ch]\n__int16 v12; // [rsp+12h] [rbp-Eh] BYREF\n__int16 v13; // [rsp+14h] [rbp-Ch] BYREF\n__int16 v14; // [rsp+16h] [rbp-Ah]\nunsigned int v15; // [rsp+18h] [rbp-8h]\nunsigned int v16; // [rsp+1Ch] [rbp-4h]\n\nv11 = a2;\nv10 = a3;\nif ( a2 >= COLORS )\n{\nif ( a1 )\nv3 = *(_WORD *)(a1 + 220);\nelse\nv3 = word_415930;\nv11 = v3;\n}\nif ( a3 >= COLORS )\n{\nif ( a1 )\nv4 = *(_WORD *)(a1 + 222);\nelse\nv4 = word_415932;\nv10 = v4;\n}\nif ( byte_415921 != 1 )\n{\nif ( v11 == -1 )\n{\nif ( !a1 || *(_WORD *)(a1 + 220) == 0xFFFF )\nv5 = word_415930;\nelse\nv5 = *(_WORD *)(a1 + 220);\nv11 = v5;\n}\nif ( v10 == -1 )\n{\nif ( !a1 || *(_WORD *)(a1 + 222) == 0xFFFF )\nv6 = word_415932;\nelse\nv6 = *(_WORD *)(a1 + 222);\nv10 = v6;\n}\n}\nif ( !qword_415928 || v11 == -1 && v10 == -1 )\nreturn 0LL;\nv16 = sub_40D823(v11, v10);\nif ( !*((_WORD *)qword_415928 + v16) )\n{\ndo\n{\nif ( ++word_415926 >= word_415924 )\nword_415926 = word_415922 + 1;\npair_content(word_415926, &v13, &v12);\nv15 = sub_40D823(v13, v12);\n}\nwhile ( *((__int16 *)qword_415928 + v15) < 0 );\nif ( !init_pair(word_415926, v11, v10) )\n{\n*((_WORD *)qword_415928 + v15) = 0;\n*((_WORD *)qword_415928 + v16) = word_415926;\n}\n}\nv14 = *((_WORD *)qword_415928 + v16);\nv8 = (unsigned __int16)v14;\nLOWORD(v8) = v14 >> 15;\nv9 = v8;\nLOWORD(v8) = v14 ^ (v14 >> 15);\nreturn (unsigned int)(v8 - v9);\n}\n\n\n\nQ:[a3,a1,a2,v9,v10,v11,v12,v13,v15,v16,sub_40D870,sub_40D823,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'bg', 'a1': 't', 'a2': 'fg', 'v9': 'bg', 'v10': 'bga', 'v11': 'fga', 'v12': 'oldbg', 'v13': 'oldfg', 'v15': 'old_index', 'v16': 'index', 'sub_40D870': 'vt_color_get', 'sub_40D823': 'color_hash'}"}
PrintErrorExtractSZS
76c05f321c4703deb67fa538c2cf508c66723817fc1ebd22a9f48d40487c4c60
Wiimm
wiimms-szs-tools
NA
enumError PrintErrorExtractSZS ( szs_extract_t * eszs, // valid data structure ccp fname // filename of source ) { DASSERT(eszs); DASSERT(fname); if (eszs->data) return ERR_OK; if (eszs->szs_found) return ERROR0(ERR_CANT_OPEN,"Sub file not found: %s\n",eszs->subpath); if (eszs->subfile_found) return ERROR0(ERR_CANT_OPEN,"No SZS/U8 file found: %s\n",fname); return ERROR0(ERR_CANT_OPEN,"No sub file specified: %s\n",fname); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4AA9D0", "function_addr": 4893136, "binary_name": "76c05f321c4703deb67fa538c2cf508c66723817fc1ebd22a9f48d40487c4c60.elf_extract.pkl\n"}, "code": [[0, "sub rsp, 18h"], [1, "mov [rsp+18h+var_10], rdi"], [2, "mov [rsp+18h+var_18], rsi"], [3, "mov rax, [rsp+18h+var_10]"], [4, "mov rax, [rax+50h]"], [5, "test rax, rax"], [6, "jz short loc_4AA9F5"], [7, "mov eax, 0"], [8, "jmp loc_4AAABA"], [9, "mov rax, [rsp+18h+var_10]"], [10, "movzx eax, byte ptr [rax+1]"], [11, "test al, al"], [12, "jz short loc_4AAA40"], [13, "mov rax, [rsp+18h+var_10]"], [14, "mov rax, [rax+20h]"], [15, "sub rsp, 8"], [16, "push rax"], [17, "mov r9d, offset aSubFileNotFoun"], [18, "mov r8d, 4Ch "], [19, "mov ecx, 0"], [20, "mov edx, 0AF8h"], [21, "mov esi, offset aSrcLibSzsC"], [22, "mov edi, offset aPrinterrorextr"], [23, "mov eax, 0"], [24, "call sub_429FC9"], [25, "add rsp, 10h"], [26, "jmp short loc_4AAABA"], [27, "mov rax, [rsp+18h+var_10]"], [28, "movzx eax, byte ptr [rax]"], [29, "test al, al"], [30, "jz short loc_4AAA84"], [31, "sub rsp, 8"], [32, "push [rsp+20h+var_18]"], [33, "mov r9d, offset aNoSzsU8FileFou"], [34, "mov r8d, 4Ch "], [35, "mov ecx, 0"], [36, "mov edx, 0AFBh"], [37, "mov esi, offset aSrcLibSzsC"], [38, "mov edi, offset aPrinterrorextr"], [39, "mov eax, 0"], [40, "call sub_429FC9"], [41, "add rsp, 10h"], [42, "jmp short loc_4AAABA"], [43, "sub rsp, 8"], [44, "push [rsp+20h+var_18]"], [45, "mov r9d, offset aNoSubFileSpeci"], [46, "mov r8d, 4Ch "], [47, "mov ecx, 0"], [48, "mov edx, 0AFDh"], [49, "mov esi, offset aSrcLibSzsC"], [50, "mov edi, offset aPrinterrorextr"], [51, "mov eax, 0"], [52, "call sub_429FC9"], [53, "add rsp, 10h"], [54, "add rsp, 18h"], [55, "retn"]], "data_dep": [[3, 1], [4, 3], [5, 4], [6, 5], [9, 1], [10, 9], [11, 10], [12, 11], [13, 1], [14, 13], [15, 0], [16, 14], [25, 15], [27, 1], [28, 27], [29, 28], [30, 29], [31, 0], [41, 31], [43, 0], [53, 43], [54, 25], [54, 0], [54, 41], [54, 53], [55, 7], [55, 40], [55, 52], [55, 24]]}
{"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/76c05f321c4703deb67fa538c2cf508c66723817fc1ebd22a9f48d40487c4c60_76c05f321c4703deb67fa538c2cf508c66723817fc1ebd22a9f48d40487c4c60.jsonl.gz", "strip_func_name": "sub_4AA9D0", "query": "\n\n\n__int64 __fastcall sub_4AA9D0(__int64 a1, __int64 a2)\n{\nif ( *(_QWORD *)(a1 + 80) )\nreturn 0LL;\nif ( *(_BYTE *)(a1 + 1) )\nreturn sub_429FC9(\n(int)\"PrintErrorExtractSZS\",\n(int)\"src/lib-szs.c\",\n2808,\n0,\n76,\n(int)\"Sub file not found: %s\\n\",\n*(_QWORD *)(a1 + 32));\nif ( *(_BYTE *)a1 )\nreturn sub_429FC9(\n(int)\"PrintErrorExtractSZS\",\n(int)\"src/lib-szs.c\",\n2811,\n0,\n76,\n(int)\"No SZS/U8 file found: %s\\n\",\na2);\nreturn sub_429FC9(\n(int)\"PrintErrorExtractSZS\",\n(int)\"src/lib-szs.c\",\n2813,\n0,\n76,\n(int)\"No sub file specified: %s\\n\",\na2);\n}\n\n\n\nQ:[a1,a2,sub_4AA9D0,sub_429FC9,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'eszs', 'a2': 'fname', 'sub_4AA9D0': 'PrintErrorExtractSZS', 'sub_429FC9': 'PrintError'}"}
tcbdbputimpl
812e8dfce92fa099466d25318f60cd3447e0cec291f3b4540a415d01df80fb51
HewlettPackard
nvthreads
NA
static bool tcbdbputimpl(TCBDB *bdb, const void *kbuf, int ksiz, const void *vbuf, int vsiz, int dmode){ assert(bdb && kbuf && ksiz >= 0); BDBLEAF *leaf = NULL; uint64_t hlid = bdb->hleaf; if(hlid < 1 || !(leaf = tcbdbgethistleaf(bdb, kbuf, ksiz, hlid))){ uint64_t pid = tcbdbsearchleaf(bdb, kbuf, ksiz); if(pid < 1) return false; if(!(leaf = tcbdbleafload(bdb, pid))) return false; hlid = 0; } if(!tcbdbleafaddrec(bdb, leaf, dmode, kbuf, ksiz, vbuf, vsiz)){ if(!bdb->tran) tcbdbcacheadjust(bdb); return false; } int rnum = TCPTRLISTNUM(leaf->recs); if(rnum > bdb->lmemb || (rnum > 1 && leaf->size > bdb->lsmax)){ if(hlid > 0 && hlid != tcbdbsearchleaf(bdb, kbuf, ksiz)) return false; bdb->lschk = 0; BDBLEAF *newleaf = tcbdbleafdivide(bdb, leaf); if(!newleaf) return false; if(leaf->id == bdb->last) bdb->last = newleaf->id; uint64_t heir = leaf->id; uint64_t pid = newleaf->id; BDBREC *rec = TCPTRLISTVAL(newleaf->recs, 0); char *dbuf = (char *)rec + sizeof(*rec); int ksiz = rec->ksiz; char *kbuf; TCMEMDUP(kbuf, dbuf, ksiz); while(true){ BDBNODE *node; if(bdb->hnum < 1){ node = tcbdbnodenew(bdb, heir); tcbdbnodeaddidx(bdb, node, true, pid, kbuf, ksiz); bdb->root = node->id; TCFREE(kbuf); break; } uint64_t parent = bdb->hist[--bdb->hnum]; if(!(node = tcbdbnodeload(bdb, parent))){ TCFREE(kbuf); return false; } tcbdbnodeaddidx(bdb, node, false, pid, kbuf, ksiz); TCFREE(kbuf); TCPTRLIST *idxs = node->idxs; int ln = TCPTRLISTNUM(idxs); if(ln <= bdb->nmemb) break; int mid = ln / 2; BDBIDX *idx = TCPTRLISTVAL(idxs, mid); BDBNODE *newnode = tcbdbnodenew(bdb, idx->pid); heir = node->id; pid = newnode->id; char *ebuf = (char *)idx + sizeof(*idx); TCMEMDUP(kbuf, ebuf, idx->ksiz); ksiz = idx->ksiz; for(int i = mid + 1; i < ln; i++){ idx = TCPTRLISTVAL(idxs, i); char *ebuf = (char *)idx + sizeof(*idx); tcbdbnodeaddidx(bdb, newnode, true, idx->pid, ebuf, idx->ksiz); } ln = TCPTRLISTNUM(newnode->idxs); for(int i = 0; i <= ln; i++){ idx = tcptrlistpop(idxs); TCFREE(idx); } node->dirty = true; } if(bdb->capnum > 0 && bdb->rnum > bdb->capnum){ uint64_t xnum = bdb->rnum - bdb->capnum; BDBCUR *cur = tcbdbcurnew(bdb); while((xnum--) > 0){ if((cur->id < 1 || cur->clock != bdb->clock) && !tcbdbcurfirstimpl(cur)){ tcbdbcurdel(cur); return false; } if(!tcbdbcuroutimpl(cur)){ tcbdbcurdel(cur); return false; } } tcbdbcurdel(cur); } } else if(rnum < 1){ if(hlid > 0 && hlid != tcbdbsearchleaf(bdb, kbuf, ksiz)) return false; if(bdb->hnum > 0 && !tcbdbleafkill(bdb, leaf)) return false; } if(!bdb->tran && !tcbdbcacheadjust(bdb)) return false; return true; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_465E07", "function_addr": 4611591, "binary_name": "812e8dfce92fa099466d25318f60cd3447e0cec291f3b4540a415d01df80fb51.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0E0h"], [3, "mov [rbp+var_B8], rdi"], [4, "mov [rbp+var_C0], rsi"], [5, "mov [rbp+var_C4], edx"], [6, "mov [rbp+var_D0], rcx"], [7, "mov [rbp+var_C8], r8d"], [8, "mov [rbp+var_D4], r9d"], [9, "mov [rbp+var_8], 0"], [10, "mov rax, [rbp+var_B8]"], [11, "mov rax, [rax+0A8h]"], [12, "mov [rbp+var_10], rax"], [13, "cmp [rbp+var_10], 0"], [14, "jz short loc_465E87"], [15, "mov rcx, [rbp+var_10]"], [16, "mov edx, [rbp+var_C4]"], [17, "mov rsi, [rbp+var_C0]"], [18, "mov rax, [rbp+var_B8]"], [19, "mov rdi, rax"], [20, "call sub_4619EA"], [21, "mov [rbp+var_8], rax"], [22, "cmp [rbp+var_8], 0"], [23, "jnz short loc_465EEE"], [24, "mov edx, [rbp+var_C4]"], [25, "mov rcx, [rbp+var_C0]"], [26, "mov rax, [rbp+var_B8]"], [27, "mov rsi, rcx"], [28, "mov rdi, rax"], [29, "call sub_464A55"], [30, "mov [rbp+var_48], rax"], [31, "cmp [rbp+var_48], 0"], [32, "jnz short loc_465EBB"], [33, "mov eax, 0"], [34, "jmp locret_466609"], [35, "mov rdx, [rbp+var_48]"], [36, "mov rax, [rbp+var_B8]"], [37, "mov rsi, rdx"], [38, "mov rdi, rax"], [39, "call sub_460CC5"], [40, "mov [rbp+var_8], rax"], [41, "cmp [rbp+var_8], 0"], [42, "jnz short loc_465EE6"], [43, "mov eax, 0"], [44, "jmp locret_466609"], [45, "mov [rbp+var_10], 0"], [46, "mov r9, [rbp+var_D0]"], [47, "mov r8d, [rbp+var_C4]"], [48, "mov rcx, [rbp+var_C0]"], [49, "mov edx, [rbp+var_D4]"], [50, "mov rsi, [rbp+var_8]"], [51, "mov rax, [rbp+var_B8]"], [52, "sub rsp, 8"], [53, "mov edi, [rbp+var_C8]"], [54, "push rdi"], [55, "mov rdi, rax"], [56, "call sub_461CA2"], [57, "add rsp, 10h"], [58, "xor eax, 1"], [59, "test al, al"], [60, "jz short loc_465F60"], [61, "mov rax, [rbp+var_B8]"], [62, "movzx eax, byte ptr [rax+0B8h]"], [63, "xor eax, 1"], [64, "test al, al"], [65, "jz short loc_465F56"], [66, "mov rax, [rbp+var_B8]"], [67, "mov rdi, rax"], [68, "call sub_4652AA"], [69, "mov eax, 0"], [70, "jmp locret_466609"], [71, "mov rax, [rbp+var_8]"], [72, "mov rax, [rax+8]"], [73, "mov eax, [rax+10h]"], [74, "mov [rbp+var_4C], eax"], [75, "mov rax, [rbp+var_B8]"], [76, "mov edx, [rax+24h]"], [77, "mov eax, [rbp+var_4C]"], [78, "cmp edx, eax"], [79, "jb short loc_465FA7"], [80, "cmp [rbp+var_4C], 1"], [81, "jle loc_466563"], [82, "mov rax, [rbp+var_8]"], [83, "mov eax, [rax+10h]"], [84, "mov edx, eax"], [85, "mov rax, [rbp+var_B8]"], [86, "mov eax, [rax+88h]"], [87, "cmp edx, eax"], [88, "jbe loc_466563"], [89, "cmp [rbp+var_10], 0"], [90, "jz short loc_465FDD"], [91, "mov edx, [rbp+var_C4]"], [92, "mov rcx, [rbp+var_C0]"], [93, "mov rax, [rbp+var_B8]"], [94, "mov rsi, rcx"], [95, "mov rdi, rax"], [96, "call sub_464A55"], [97, "cmp [rbp+var_10], rax"], [98, "jz short loc_465FDD"], [99, "mov eax, 0"], [100, "jmp locret_466609"], [101, "mov rax, [rbp+var_B8]"], [102, "mov dword ptr [rax+8Ch], 0"], [103, "mov rdx, [rbp+var_8]"], [104, "mov rax, [rbp+var_B8]"], [105, "mov rsi, rdx"], [106, "mov rdi, rax"], [107, "call sub_462ECB"], [108, "mov [rbp+var_58], rax"], [109, "cmp [rbp+var_58], 0"], [110, "jnz short loc_466019"], [111, "mov eax, 0"], [112, "jmp locret_466609"], [113, "mov rax, [rbp+var_8]"], [114, "mov rdx, [rax]"], [115, "mov rax, [rbp+var_B8]"], [116, "mov rax, [rax+40h]"], [117, "cmp rdx, rax"], [118, "jnz short loc_466042"], [119, "mov rax, [rbp+var_58]"], [120, "mov rdx, [rax]"], [121, "mov rax, [rbp+var_B8]"], [122, "mov [rax+40h], rdx"], [123, "mov rax, [rbp+var_8]"], [124, "mov rax, [rax]"], [125, "mov [rbp+var_18], rax"], [126, "mov rax, [rbp+var_58]"], [127, "mov rax, [rax]"], [128, "mov [rbp+var_20], rax"], [129, "mov rax, [rbp+var_58]"], [130, "mov rax, [rax+8]"], [131, "mov rdx, [rax]"], [132, "mov rax, [rbp+var_58]"], [133, "mov rax, [rax+8]"], [134, "mov eax, [rax+0Ch]"], [135, "cdqe"], [136, "shl rax, 3"], [137, "add rax, rdx"], [138, "mov rax, [rax]"], [139, "mov [rbp+var_60], rax"], [140, "mov rax, [rbp+var_60]"], [141, "add rax, 10h"], [142, "mov [rbp+src], rax"], [143, "mov rax, [rbp+var_60]"], [144, "mov eax, [rax]"], [145, "mov [rbp+var_24], eax"], [146, "mov eax, [rbp+var_24]"], [147, "add eax, 1"], [148, "cdqe"], [149, "mov rdi, rax"], [150, "call _malloc"], [151, "mov [rbp+dest], rax"], [152, "cmp [rbp+dest], 0"], [153, "jnz short loc_4660BA"], [154, "lea rdi, aOutOfMemory_2"], [155, "call sub_427877"], [156, "mov eax, [rbp+var_24]"], [157, "movsxd rdx, eax"], [158, "mov rcx, [rbp+src]"], [159, "mov rax, [rbp+dest]"], [160, "mov rsi, rcx"], [161, "mov rdi, rax"], [162, "call _memcpy"], [163, "mov eax, [rbp+var_24]"], [164, "movsxd rdx, eax"], [165, "mov rax, [rbp+dest]"], [166, "add rax, rdx"], [167, "mov byte ptr [rax], 0"], [168, "mov rax, [rbp+var_B8]"], [169, "mov eax, [rax+0A0h]"], [170, "test eax, eax"], [171, "jg short loc_46615D"], [172, "mov rdx, [rbp+var_18]"], [173, "mov rax, [rbp+var_B8]"], [174, "mov rsi, rdx"], [175, "mov rdi, rax"], [176, "call sub_4632FD"], [177, "mov [rbp+var_78], rax"], [178, "mov edi, [rbp+var_24]"], [179, "mov rcx, [rbp+dest]"], [180, "mov rdx, [rbp+var_20]"], [181, "mov rsi, [rbp+var_78]"], [182, "mov rax, [rbp+var_B8]"], [183, "mov r9d, edi"], [184, "mov r8, rcx"], [185, "mov rcx, rdx"], [186, "mov edx, 1"], [187, "mov rdi, rax"], [188, "call sub_4641A2"], [189, "mov rax, [rbp+var_78]"], [190, "mov rdx, [rax]"], [191, "mov rax, [rbp+var_B8]"], [192, "mov [rax+30h], rdx"], [193, "mov rax, [rbp+dest]"], [194, "mov rdi, rax"], [195, "call free"], [196, "jmp loc_46643A"], [197, "mov rax, [rbp+var_B8]"], [198, "mov rcx, [rax+98h]"], [199, "mov rax, [rbp+var_B8]"], [200, "mov eax, [rax+0A0h]"], [201, "lea edx, [rax-1]"], [202, "mov rax, [rbp+var_B8]"], [203, "mov [rax+0A0h], edx"], [204, "mov rax, [rbp+var_B8]"], [205, "mov eax, [rax+0A0h]"], [206, "cdqe"], [207, "shl rax, 3"], [208, "add rax, rcx"], [209, "mov rax, [rax]"], [210, "mov [rbp+var_70], rax"], [211, "mov rdx, [rbp+var_70]"], [212, "mov rax, [rbp+var_B8]"], [213, "mov rsi, rdx"], [214, "mov rdi, rax"], [215, "call sub_463A97"], [216, "mov [rbp+var_78], rax"], [217, "cmp [rbp+var_78], 0"], [218, "jnz short loc_4661DC"], [219, "mov rax, [rbp+dest]"], [220, "mov rdi, rax"], [221, "call free"], [222, "mov eax, 0"], [223, "jmp locret_466609"], [224, "mov edi, [rbp+var_24]"], [225, "mov rcx, [rbp+dest]"], [226, "mov rdx, [rbp+var_20]"], [227, "mov rsi, [rbp+var_78]"], [228, "mov rax, [rbp+var_B8]"], [229, "mov r9d, edi"], [230, "mov r8, rcx"], [231, "mov rcx, rdx"], [232, "mov edx, 0"], [233, "mov rdi, rax"], [234, "call sub_4641A2"], [235, "mov rax, [rbp+dest]"], [236, "mov rdi, rax"], [237, "call free"], [238, "mov rax, [rbp+var_78]"], [239, "mov rax, [rax+10h]"], [240, "mov [rbp+var_80], rax"], [241, "mov rax, [rbp+var_80]"], [242, "mov eax, [rax+10h]"], [243, "mov [rbp+var_84], eax"], [244, "mov rax, [rbp+var_B8]"], [245, "mov edx, [rax+28h]"], [246, "mov eax, [rbp+var_84]"], [247, "cmp edx, eax"], [248, "jnb loc_466439"], [249, "mov eax, [rbp+var_84]"], [250, "mov edx, eax"], [251, "shr edx, 1Fh"], [252, "add eax, edx"], [253, "sar eax, 1"], [254, "mov [rbp+var_88], eax"], [255, "mov rax, [rbp+var_80]"], [256, "mov rdx, [rax]"], [257, "mov rax, [rbp+var_80]"], [258, "mov ecx, [rax+0Ch]"], [259, "mov eax, [rbp+var_88]"], [260, "add eax, ecx"], [261, "cdqe"], [262, "shl rax, 3"], [263, "add rax, rdx"], [264, "mov rax, [rax]"], [265, "mov [rbp+ptr], rax"], [266, "mov rax, [rbp+ptr]"], [267, "mov rdx, [rax]"], [268, "mov rax, [rbp+var_B8]"], [269, "mov rsi, rdx"], [270, "mov rdi, rax"], [271, "call sub_4632FD"], [272, "mov [rbp+var_98], rax"], [273, "mov rax, [rbp+var_78]"], [274, "mov rax, [rax]"], [275, "mov [rbp+var_18], rax"], [276, "mov rax, [rbp+var_98]"], [277, "mov rax, [rax]"], [278, "mov [rbp+var_20], rax"], [279, "mov rax, [rbp+ptr]"], [280, "add rax, 10h"], [281, "mov [rbp+var_A0], rax"], [282, "mov rax, [rbp+ptr]"], [283, "mov eax, [rax+8]"], [284, "add eax, 1"], [285, "cdqe"], [286, "mov rdi, rax"], [287, "call _malloc"], [288, "mov [rbp+dest], rax"], [289, "cmp [rbp+dest], 0"], [290, "jnz short loc_4662FF"], [291, "lea rdi, aOutOfMemory_2"], [292, "call sub_427877"], [293, "mov rax, [rbp+ptr]"], [294, "mov eax, [rax+8]"], [295, "movsxd rdx, eax"], [296, "mov rcx, [rbp+var_A0]"], [297, "mov rax, [rbp+dest]"], [298, "mov rsi, rcx"], [299, "mov rdi, rax"], [300, "call _memcpy"], [301, "mov rax, [rbp+ptr]"], [302, "mov eax, [rax+8]"], [303, "movsxd rdx, eax"], [304, "mov rax, [rbp+dest]"], [305, "add rax, rdx"], [306, "mov byte ptr [rax], 0"], [307, "mov rax, [rbp+ptr]"], [308, "mov eax, [rax+8]"], [309, "mov [rbp+var_24], eax"], [310, "mov eax, [rbp+var_88]"], [311, "add eax, 1"], [312, "mov [rbp+var_34], eax"], [313, "jmp short loc_4663CF"], [314, "mov rax, [rbp+var_80]"], [315, "mov rdx, [rax]"], [316, "mov rax, [rbp+var_80]"], [317, "mov ecx, [rax+0Ch]"], [318, "mov eax, [rbp+var_34]"], [319, "add eax, ecx"], [320, "cdqe"], [321, "shl rax, 3"], [322, "add rax, rdx"], [323, "mov rax, [rax]"], [324, "mov [rbp+ptr], rax"], [325, "mov rax, [rbp+ptr]"], [326, "add rax, 10h"], [327, "mov [rbp+var_A8], rax"], [328, "mov rax, [rbp+ptr]"], [329, "mov edi, [rax+8]"], [330, "mov rax, [rbp+ptr]"], [331, "mov rdx, [rax]"], [332, "mov rcx, [rbp+var_A8]"], [333, "mov rsi, [rbp+var_98]"], [334, "mov rax, [rbp+var_B8]"], [335, "mov r9d, edi"], [336, "mov r8, rcx"], [337, "mov rcx, rdx"], [338, "mov edx, 1"], [339, "mov rdi, rax"], [340, "call sub_4641A2"], [341, "add [rbp+var_34], 1"], [342, "mov eax, [rbp+var_34]"], [343, "cmp eax, [rbp+var_84]"], [344, "jl loc_466354"], [345, "mov rax, [rbp+var_98]"], [346, "mov rax, [rax+10h]"], [347, "mov eax, [rax+10h]"], [348, "mov [rbp+var_84], eax"], [349, "mov [rbp+var_38], 0"], [350, "jmp short loc_466421"], [351, "mov rax, [rbp+var_80]"], [352, "mov rdi, rax"], [353, "call sub_42728D"], [354, "mov [rbp+ptr], rax"], [355, "mov rax, [rbp+ptr]"], [356, "mov rdi, rax"], [357, "call free"], [358, "add [rbp+var_38], 1"], [359, "mov eax, [rbp+var_38]"], [360, "cmp eax, [rbp+var_84]"], [361, "jle short loc_4663FB"], [362, "mov rax, [rbp+var_78]"], [363, "mov byte ptr [rax+18h], 1"], [364, "jmp loc_4660E3"], [365, "nop"], [366, "mov rax, [rbp+var_B8]"], [367, "mov rax, [rax+90h]"], [368, "test rax, rax"], [369, "jz loc_4665D1"], [370, "mov rax, [rbp+var_B8]"], [371, "mov rdx, [rax+58h]"], [372, "mov rax, [rbp+var_B8]"], [373, "mov rax, [rax+90h]"], [374, "cmp rdx, rax"], [375, "jbe loc_4665D1"], [376, "mov rax, [rbp+var_B8]"], [377, "mov rdx, [rax+58h]"], [378, "mov rax, [rbp+var_B8]"], [379, "mov rcx, [rax+90h]"], [380, "mov rax, rdx"], [381, "sub rax, rcx"], [382, "mov [rbp+var_40], rax"], [383, "mov rax, [rbp+var_B8]"], [384, "mov rdi, rax"], [385, "call sub_45D4BA"], [386, "mov [rbp+var_B0], rax"], [387, "jmp loc_46653D"], [388, "mov rax, [rbp+var_B0]"], [389, "mov rax, [rax+10h]"], [390, "test rax, rax"], [391, "jz short loc_4664DF"], [392, "mov rax, [rbp+var_B0]"], [393, "mov rdx, [rax+8]"], [394, "mov rax, [rbp+var_B8]"], [395, "mov rax, [rax+0C8h]"], [396, "cmp rdx, rax"], [397, "jz short loc_46650E"], [398, "mov rax, [rbp+var_B0]"], [399, "mov rdi, rax"], [400, "call sub_46817A"], [401, "xor eax, 1"], [402, "test al, al"], [403, "jz short loc_46650E"], [404, "mov rax, [rbp+var_B0]"], [405, "mov rdi, rax"], [406, "call sub_45D526"], [407, "mov eax, 0"], [408, "jmp locret_466609"], [409, "mov rax, [rbp+var_B0]"], [410, "mov rdi, rax"], [411, "call sub_4693B6"], [412, "xor eax, 1"], [413, "test al, al"], [414, "jz short loc_46653D"], [415, "mov rax, [rbp+var_B0]"], [416, "mov rdi, rax"], [417, "call sub_45D526"], [418, "mov eax, 0"], [419, "jmp locret_466609"], [420, "mov rax, [rbp+var_40]"], [421, "lea rdx, [rax-1]"], [422, "mov [rbp+var_40], rdx"], [423, "test rax, rax"], [424, "jnz loc_4664B1"], [425, "mov rax, [rbp+var_B0]"], [426, "mov rdi, rax"], [427, "call sub_45D526"], [428, "jmp short loc_4665D1"], [429, "cmp [rbp+var_4C], 0"], [430, "jg short loc_4665D2"], [431, "cmp [rbp+var_10], 0"], [432, "jz short loc_46659C"], [433, "mov edx, [rbp+var_C4]"], [434, "mov rcx, [rbp+var_C0]"], [435, "mov rax, [rbp+var_B8]"], [436, "mov rsi, rcx"], [437, "mov rdi, rax"], [438, "call sub_464A55"], [439, "cmp [rbp+var_10], rax"], [440, "jz short loc_46659C"], [441, "mov eax, 0"], [442, "jmp short locret_466609"], [443, "mov rax, [rbp+var_B8]"], [444, "mov eax, [rax+0A0h]"], [445, "test eax, eax"], [446, "jle short loc_4665D2"], [447, "mov rdx, [rbp+var_8]"], [448, "mov rax, [rbp+var_B8]"], [449, "mov rsi, rdx"], [450, "mov rdi, rax"], [451, "call sub_463139"], [452, "xor eax, 1"], [453, "test al, al"], [454, "jz short loc_4665D2"], [455, "mov eax, 0"], [456, "jmp short locret_466609"], [457, "nop"], [458, "mov rax, [rbp+var_B8]"], [459, "movzx eax, byte ptr [rax+0B8h]"], [460, "xor eax, 1"], [461, "test al, al"], [462, "jz short loc_466604"], [463, "mov rax, [rbp+var_B8]"], [464, "mov rdi, rax"], [465, "call sub_4652AA"], [466, "xor eax, 1"], [467, "test al, al"], [468, "jz short loc_466604"], [469, "mov eax, 0"], [470, "jmp short locret_466609"], [471, "mov eax, 1"], [472, "leave"], [473, "retn"]], "data_dep": [[10, 3], [11, 10], [12, 11], [13, 12], [14, 13], [15, 12], [16, 5], [17, 4], [18, 3], [19, 18], [21, 20], [22, 21], [23, 22], [24, 5], [25, 4], [26, 3], [27, 25], [28, 26], [30, 29], [31, 30], [32, 31], [35, 30], [36, 3], [37, 35], [38, 36], [40, 39], [41, 40], [42, 41], [46, 6], [47, 5], [48, 4], [49, 8], [50, 40], [50, 21], [51, 3], [52, 2], [53, 7], [54, 53], [55, 51], [57, 52], [58, 56], [59, 58], [60, 59], [61, 3], [62, 61], [63, 62], [64, 63], [65, 64], [66, 3], [67, 66], [71, 40], [71, 21], [72, 71], [73, 72], [74, 73], [75, 3], [76, 75], [77, 74], [78, 77], [78, 76], [79, 78], [80, 74], [81, 80], [82, 40], [82, 21], [83, 82], [84, 83], [85, 3], [86, 85], [87, 86], [87, 84], [88, 87], [89, 45], [89, 12], [90, 89], [91, 5], [92, 4], [93, 3], [94, 92], [95, 93], [97, 12], [97, 96], [97, 45], [98, 97], [101, 3], [102, 101], [103, 40], [103, 21], [104, 3], [105, 103], [106, 104], [108, 107], [109, 108], [110, 109], [113, 21], [113, 40], [114, 102], [114, 113], [115, 3], [116, 102], [116, 115], [117, 116], [117, 114], [118, 117], [119, 108], [120, 102], [120, 119], [120, 122], [121, 3], [122, 121], [122, 120], [123, 40], [123, 21], [124, 123], [124, 122], [124, 102], [125, 124], [126, 108], [127, 122], [127, 126], [127, 102], [128, 127], [129, 108], [130, 122], [130, 102], [130, 129], [131, 130], [131, 122], [131, 102], [132, 108], [133, 102], [133, 132], [133, 122], [134, 102], [134, 133], [134, 122], [136, 134], [137, 131], [137, 136], [138, 137], [138, 122], [138, 102], [139, 138], [140, 139], [141, 140], [142, 141], [143, 139], [144, 143], [144, 102], [144, 122], [145, 144], [146, 145], [147, 146], [149, 147], [151, 150], [152, 151], [153, 152], [154, 149], [156, 145], [157, 156], [158, 142], [159, 151], [160, 158], [161, 159], [163, 145], [164, 163], [165, 151], [166, 165], [166, 164], [167, 166], [168, 3], [169, 167], [169, 306], [169, 203], [169, 168], [169, 122], [169, 363], [169, 102], [170, 169], [171, 170], [172, 125], [172, 275], [173, 3], [174, 172], [175, 173], [177, 176], [178, 145], [178, 309], [179, 151], [179, 288], [180, 278], [180, 128], [181, 177], [182, 3], [183, 178], [184, 179], [185, 180], [187, 182], [189, 177], [190, 203], [190, 189], [190, 192], [190, 122], [190, 363], [190, 102], [190, 167], [190, 306], [191, 3], [192, 191], [192, 190], [193, 151], [193, 288], [194, 193], [197, 3], [198, 203], [198, 197], [198, 122], [198, 363], [198, 102], [198, 167], [198, 306], [199, 3], [200, 122], [200, 363], [200, 102], [200, 199], [200, 167], [200, 306], [200, 203], [201, 338], [201, 203], [201, 164], [201, 122], [201, 363], [201, 102], [201, 200], [201, 303], [201, 167], [201, 306], [202, 3], [203, 202], [203, 201], [204, 3], [205, 204], [205, 203], [207, 205], [208, 198], [208, 207], [209, 208], [209, 203], [209, 167], [209, 306], [210, 209], [211, 210], [212, 3], [213, 211], [214, 212], [216, 215], [217, 216], [218, 217], [219, 288], [219, 151], [220, 219], [224, 309], [224, 145], [225, 151], [225, 288], [226, 278], [226, 128], [227, 216], [228, 3], [229, 224], [230, 225], [231, 226], [233, 228], [235, 288], [235, 151], [236, 235], [238, 216], [239, 122], [239, 238], [239, 363], [239, 102], [239, 167], [239, 203], [239, 306], [240, 239], [241, 240], [242, 167], [242, 306], [242, 241], [242, 203], [242, 122], [242, 363], [242, 102], [243, 242], [244, 3], [245, 167], [245, 203], [245, 306], [245, 244], [245, 122], [245, 363], [245, 102], [246, 243], [247, 245], [247, 246], [248, 247], [249, 243], [250, 249], [251, 250], [252, 251], [252, 249], [253, 252], [254, 253], [255, 240], [256, 167], [256, 203], [256, 306], [256, 122], [256, 363], [256, 255], [256, 102], [257, 240], [258, 203], [258, 257], [258, 122], [258, 363], [258, 102], [258, 167], [258, 306], [259, 254], [260, 259], [260, 258], [262, 260], [263, 262], [263, 256], [264, 203], [264, 306], [264, 263], [264, 122], [264, 167], [264, 363], [264, 102], [265, 264], [266, 265], [267, 102], [267, 167], [267, 306], [267, 203], [267, 266], [267, 122], [267, 363], [268, 3], [269, 267], [270, 268], [272, 271], [273, 216], [274, 203], [274, 122], [274, 363], [274, 102], [274, 167], [274, 306], [274, 273], [275, 274], [276, 272], [277, 276], [277, 122], [277, 363], [277, 102], [277, 167], [277, 203], [277, 306], [278, 277], [279, 265], [280, 279], [281, 280], [282, 265], [283, 167], [283, 203], [283, 306], [283, 282], [283, 122], [283, 363], [283, 102], [284, 283], [286, 284], [288, 287], [289, 288], [290, 289], [291, 286], [293, 265], [294, 203], [294, 306], [294, 122], [294, 293], [294, 167], [294, 363], [294, 102], [295, 294], [296, 281], [297, 288], [298, 296], [299, 297], [301, 265], [302, 203], [302, 306], [302, 301], [302, 122], [302, 167], [302, 363], [302, 102], [303, 302], [304, 288], [305, 304], [305, 303], [306, 305], [307, 265], [308, 306], [308, 307], [309, 308], [310, 254], [311, 310], [312, 311], [314, 240], [315, 122], [315, 167], [315, 363], [315, 102], [315, 203], [315, 306], [315, 314], [316, 240], [317, 122], [317, 363], [317, 102], [317, 316], [317, 167], [317, 203], [317, 306], [318, 341], [318, 312], [319, 318], [319, 317], [321, 319], [322, 321], [322, 315], [323, 122], [323, 322], [323, 167], [323, 363], [323, 102], [323, 203], [323, 306], [324, 323], [325, 324], [326, 325], [327, 326], [328, 324], [329, 306], [329, 328], [329, 122], [329, 363], [329, 102], [329, 167], [329, 203], [330, 324], [331, 122], [331, 167], [331, 363], [331, 102], [331, 330], [331, 203], [331, 306], [332, 327], [333, 272], [334, 3], [335, 329], [336, 332], [337, 331], [339, 334], [341, 341], [341, 312], [342, 341], [342, 312], [343, 342], [343, 243], [344, 343], [345, 272], [346, 363], [346, 102], [346, 203], [346, 306], [346, 122], [346, 345], [346, 167], [347, 122], [347, 346], [347, 167], [347, 363], [347, 102], [347, 203], [347, 306], [348, 347], [351, 240], [352, 351], [354, 353], [355, 354], [356, 355], [358, 349], [358, 358], [359, 349], [359, 358], [360, 348], [360, 359], [361, 360], [362, 216], [363, 362], [366, 3], [367, 122], [367, 192], [367, 167], [367, 363], [367, 102], [367, 366], [367, 203], [367, 306], [368, 367], [369, 368], [370, 3], [371, 167], [371, 363], [371, 102], [371, 203], [371, 306], [371, 370], [371, 122], [371, 192], [372, 3], [373, 203], [373, 122], [373, 363], [373, 192], [373, 167], [373, 306], [373, 372], [373, 102], [374, 371], [374, 373], [375, 374], [376, 3], [377, 363], [377, 192], [377, 167], [377, 306], [377, 102], [377, 376], [377, 203], [377, 122], [378, 3], [379, 167], [379, 363], [379, 102], [379, 203], [379, 306], [379, 122], [379, 378], [379, 192], [380, 377], [381, 379], [381, 380], [382, 381], [383, 3], [384, 383], [386, 385], [388, 386], [389, 203], [389, 306], [389, 388], [389, 122], [389, 192], [389, 167], [389, 363], [389, 102], [390, 389], [391, 390], [392, 386], [393, 192], [393, 167], [393, 363], [393, 102], [393, 203], [393, 306], [393, 392], [393, 122], [394, 3], [395, 363], [395, 102], [395, 394], [395, 203], [395, 306], [395, 122], [395, 192], [395, 167], [396, 395], [396, 393], [397, 396], [398, 386], [399, 398], [401, 400], [402, 401], [403, 402], [404, 386], [405, 404], [409, 386], [410, 409], [412, 411], [413, 412], [414, 413], [415, 386], [416, 415], [420, 422], [420, 382], [421, 393], [421, 420], [421, 122], [421, 363], [421, 192], [421, 167], [421, 377], [421, 102], [421, 203], [421, 306], [421, 421], [422, 421], [423, 420], [424, 423], [425, 386], [426, 425], [429, 74], [430, 429], [431, 45], [431, 12], [432, 431], [433, 5], [434, 4], [435, 3], [436, 434], [437, 435], [439, 438], [439, 45], [439, 12], [440, 439], [443, 3], [444, 443], [445, 444], [446, 445], [447, 40], [447, 21], [448, 3], [449, 447], [450, 448], [452, 451], [453, 452], [454, 453], [458, 3], [459, 122], [459, 363], [459, 192], [459, 167], [459, 306], [459, 102], [459, 203], [459, 458], [460, 459], [461, 460], [462, 461], [463, 3], [464, 463], [466, 465], [467, 466], [468, 467], [473, 407], [473, 43], [473, 33], [473, 99], [473, 471], [473, 469], [473, 69], [473, 455], [473, 441], [473, 418], [473, 111], [473, 222]]}
{"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/812e8dfce92fa099466d25318f60cd3447e0cec291f3b4540a415d01df80fb51_812e8dfce92fa099466d25318f60cd3447e0cec291f3b4540a415d01df80fb51.jsonl.gz", "strip_func_name": "sub_465E07", "query": "\n\n\n_BOOL8 __fastcall sub_465E07(__int64 a1, _BYTE *a2, unsigned int a3, _DWORD *a4, int a5, int a6)\n{\n_BOOL8 result; // rax\n__int64 v7; // rcx\n_QWORD *v13; // [rsp+30h] [rbp-B0h]\n__int64 *v14; // [rsp+48h] [rbp-98h]\nchar *ptr; // [rsp+50h] [rbp-90h]\nvoid *ptra; // [rsp+50h] [rbp-90h]\nvoid *ptrb; // [rsp+50h] [rbp-90h]\nint v18; // [rsp+5Ch] [rbp-84h]\nint v19; // [rsp+5Ch] [rbp-84h]\n__int64 v20; // [rsp+60h] [rbp-80h]\nchar *v21; // [rsp+68h] [rbp-78h]\nchar *v22; // [rsp+68h] [rbp-78h]\nsigned int *v23; // [rsp+80h] [rbp-60h]\nchar *v24; // [rsp+88h] [rbp-58h]\nint v25; // [rsp+94h] [rbp-4Ch]\n__int64 v26; // [rsp+98h] [rbp-48h]\n__int64 v27; // [rsp+A0h] [rbp-40h]\nint j; // [rsp+A8h] [rbp-38h]\nint i; // [rsp+ACh] [rbp-34h]\nvoid *dest; // [rsp+B0h] [rbp-30h]\nsigned int v31; // [rsp+BCh] [rbp-24h]\n__int64 v32; // [rsp+C0h] [rbp-20h]\n__int64 v33; // [rsp+C8h] [rbp-18h]\n__int64 v34; // [rsp+D0h] [rbp-10h]\nchar *v35; // [rsp+D8h] [rbp-8h]\n\nv34 = *(_QWORD *)(a1 + 168);\nif ( !v34 || (v35 = sub_4619EA(a1, (__int64)a2, a3, v34)) == 0LL )\n{\nv26 = sub_464A55(a1, (__int64)a2, a3);\nif ( !v26 )\nreturn 0LL;\nv35 = sub_460CC5((_QWORD *)a1, v26);\nif ( !v35 )\nreturn 0LL;\nv34 = 0LL;\n}\nif ( (unsigned __int8)sub_461CA2((_QWORD *)a1, (__int64)v35, a6, a2, a3, a4, a5) != 1 )\n{\nif ( *(_BYTE *)(a1 + 184) != 1 )\nsub_4652AA(a1);\nresult = 0LL;\n}\nelse\n{\nv25 = *(_DWORD *)(*((_QWORD *)v35 + 1) + 16LL);\nif ( *(_DWORD *)(a1 + 36) >= (unsigned int)v25 && (v25 <= 1 || *((_DWORD *)v35 + 4) <= *(_DWORD *)(a1 + 136)) )\n{\nif ( v25 <= 0 )\n{\nif ( v34 && v34 != sub_464A55(a1, (__int64)a2, a3) )\nreturn 0LL;\nif ( *(int *)(a1 + 160) > 0 && (unsigned __int8)sub_463139(a1, (__int64)v35) != 1 )\nreturn 0LL;\n}\n}\nelse\n{\nif ( v34 && v34 != sub_464A55(a1, (__int64)a2, a3) )\nreturn 0LL;\n*(_DWORD *)(a1 + 140) = 0;\nv24 = sub_462ECB((_QWORD *)a1, (__int64)v35);\nif ( !v24 )\nreturn 0LL;\nif ( *(_QWORD *)v35 == *(_QWORD *)(a1 + 64) )\n*(_QWORD *)(a1 + 64) = *(_QWORD *)v24;\nv33 = *(_QWORD *)v35;\nv32 = *(_QWORD *)v24;\nv23 = *(signed int **)(**((_QWORD **)v24 + 1) + 8LL * *(int *)(*((_QWORD *)v24 + 1) + 12LL));\nv31 = *v23;\ndest = malloc(*v23 + 1);\nif ( !dest )\nsub_427877(\"out of memory\");\nmemcpy(dest, v23 + 4, v31);\n*((_BYTE *)dest + v31) = 0;\nwhile ( *(int *)(a1 + 160) > 0 )\n{\nv7 = *(_QWORD *)(a1 + 152);\nv22 = sub_463A97((_QWORD *)a1, *(_QWORD *)(v7 + 8LL * (int)--*(_DWORD *)(a1 + 160)));\nif ( !v22 )\n{\nfree(dest);\nreturn 0LL;\n}\nsub_4641A2(a1, (__int64)v22, 0, v32, (unsigned __int8 *)dest, v31);\nfree(dest);\nv20 = *((_QWORD *)v22 + 2);\nv18 = *(_DWORD *)(v20 + 16);\nif ( *(_DWORD *)(a1 + 40) >= (unsigned int)v18 )\ngoto LABEL_39;\nptr = *(char **)(*(_QWORD *)v20 + 8LL * (*(_DWORD *)(v20 + 12) + v18 / 2));\nv14 = (__int64 *)sub_4632FD(a1, *(_QWORD *)ptr);\nv33 = *(_QWORD *)v22;\nv32 = *v14;\ndest = malloc(*((_DWORD *)ptr + 2) + 1);\nif ( !dest )\nsub_427877(\"out of memory\");\nmemcpy(dest, ptr + 16, *((int *)ptr + 2));\n*((_BYTE *)dest + *((int *)ptr + 2)) = 0;\nv31 = *((_DWORD *)ptr + 2);\nfor ( i = v18 / 2 + 1; i < v18; ++i )\n{\nptra = *(void **)(*(_QWORD *)v20 + 8LL * (*(_DWORD *)(v20 + 12) + i));\nsub_4641A2(a1, (__int64)v14, 1, *(_QWORD *)ptra, (unsigned __int8 *)ptra + 16, *((_DWORD *)ptra + 2));\n}\nv19 = *(_DWORD *)(v14[2] + 16);\nfor ( j = 0; j <= v19; ++j )\n{\nptrb = (void *)sub_42728D(v20);\nfree(ptrb);\n}\nv22[24] = 1;\n}\nv21 = sub_4632FD(a1, v33);\nsub_4641A2(a1, (__int64)v21, 1, v32, (unsigned __int8 *)dest, v31);\n*(_QWORD *)(a1 + 48) = *(_QWORD *)v21;\nfree(dest);\nLABEL_39:\nif ( *(_QWORD *)(a1 + 144) && *(_QWORD *)(a1 + 88) > *(_QWORD *)(a1 + 144) )\n{\nv27 = *(_QWORD *)(a1 + 88) - *(_QWORD *)(a1 + 144);\nv13 = sub_45D4BA(a1);\nwhile ( v27-- )\n{\nif ( (!v13[2] || v13[1] != *(_QWORD *)(a1 + 200)) && (unsigned __int8)sub_46817A(v13) != 1\n|| (unsigned __int8)sub_4693B6(v13) != 1 )\n{\nsub_45D526(v13);\nreturn 0LL;\n}\n}\nsub_45D526(v13);\n}\n}\nresult = *(_BYTE *)(a1 + 184) == 1 || sub_4652AA(a1);\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,v13,v14,ptr,v18,v20,v21,v23,v24,v25,v26,v27,j,dest,v31,v32,v33,v34,v35,sub_465E07,sub_4619EA,sub_464A55,sub_460CC5,sub_461CA2,sub_4652AA,sub_463139,sub_462ECB,sub_427877,sub_463A97,sub_4641A2,sub_4632FD,sub_42728D,sub_45D4BA,sub_46817A,sub_4693B6,sub_45D526,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'ksiz', 'a4': 'vbuf', 'a1': 'bdb', 'a2': 'kbuf', 'a5': 'vsiz', 'a6': 'dmode', 'v13': 'cur', 'v14': 'newnode', 'ptr': 'idxa', 'v18': 'ln', 'v20': 'idxs', 'v21': 'node', 'v23': 'rec', 'v24': 'newleaf', 'v25': 'rnum', 'v26': 'pid', 'v27': 'xnum', 'j': 'i_0', 'dest': 'kbuf_0', 'v31': 'ksiz_0', 'v32': 'pid_0', 'v33': 'heir', 'v34': 'hlid', 'v35': 'leaf', 'sub_465E07': 'tcbdbputimpl', 'sub_4619EA': 'tcbdbgethistleaf', 'sub_464A55': 'tcbdbsearchleaf', 'sub_460CC5': 'tcbdbleafload', 'sub_461CA2': 'tcbdbleafaddrec', 'sub_4652AA': 'tcbdbcacheadjust', 'sub_463139': 'tcbdbleafkill', 'sub_462ECB': 'tcbdbleafdivide', 'sub_427877': 'tcmyfatal', 'sub_463A97': 'tcbdbnodeload', 'sub_4641A2': 'tcbdbnodeaddidx', 'sub_4632FD': 'tcbdbnodenew', 'sub_42728D': 'tcptrlistpop', 'sub_45D4BA': 'tcbdbcurnew', 'sub_46817A': 'tcbdbcurfirstimpl', 'sub_4693B6': 'tcbdbcuroutimpl', 'sub_45D526': 'tcbdbcurdel'}"}
datetime_time_wildcard_set
e42855165e9723a7b478e0600600c036fe09fc1e9321b9dc0d0f997dc06f1011
baidu
iot-edge-sdk-for-iot-parser
NA
void datetime_time_wildcard_set( BACNET_TIME * btime) { if (btime) { btime->hour = 0xFF; btime->min = 0xFF; btime->sec = 0xFF; btime->hundredths = 0xFF; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40EB3A", "function_addr": 4254522, "binary_name": "e42855165e9723a7b478e0600600c036fe09fc1e9321b9dc0d0f997dc06f1011.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "cmp [rbp+var_8], 0"], [4, "jz short loc_40EB68"], [5, "mov rax, [rbp+var_8]"], [6, "mov byte ptr [rax], 0FFh"], [7, "mov rax, [rbp+var_8]"], [8, "mov byte ptr [rax+1], 0FFh"], [9, "mov rax, [rbp+var_8]"], [10, "mov byte ptr [rax+2], 0FFh"], [11, "mov rax, [rbp+var_8]"], [12, "mov byte ptr [rax+3], 0FFh"], [13, "nop"], [14, "pop rbp"], [15, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 2], [6, 5], [7, 2], [8, 7], [9, 2], [10, 9], [11, 2], [12, 11], [14, 0], [15, 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/e42855165e9723a7b478e0600600c036fe09fc1e9321b9dc0d0f997dc06f1011_e42855165e9723a7b478e0600600c036fe09fc1e9321b9dc0d0f997dc06f1011.jsonl.gz", "strip_func_name": "sub_40EB3A", "query": "\n\n\n_BYTE *__fastcall sub_40EB3A(_BYTE *a1)\n{\n_BYTE *result; // rax\n\nif ( a1 )\n{\n*a1 = -1;\na1[1] = -1;\na1[2] = -1;\nresult = a1;\na1[3] = -1;\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_40EB3A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'btime', 'sub_40EB3A': 'datetime_time_wildcard_set'}"}
FSE_freeCTable
bb2c9130d0b8bd97808533789f96868f2bfdb1d453099c4a69e9e71338b36a1d
powturbo
TurboBench
NA
void FSE_freeCTable (FSE_CTable* ct) { free(ct); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_472C74", "function_addr": 4664436, "binary_name": "bb2c9130d0b8bd97808533789f96868f2bfdb1d453099c4a69e9e71338b36a1d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+ptr], rdi"], [4, "mov rax, [rbp+ptr]"], [5, "mov rdi, rax"], [6, "call _free"], [7, "nop"], [8, "leave"], [9, "retn"]], "data_dep": [[4, 3], [5, 4], [9, 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/bb2c9130d0b8bd97808533789f96868f2bfdb1d453099c4a69e9e71338b36a1d_bb2c9130d0b8bd97808533789f96868f2bfdb1d453099c4a69e9e71338b36a1d.jsonl.gz", "strip_func_name": "sub_472C74", "query": "\n\n\nvoid __fastcall sub_472C74(void *a1)\n{\nfree(a1);\n}\n\n\n\nQ:[a1,sub_472C74,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ct', 'sub_472C74': 'FSE_freeCTable'}"}
u8g2_Setup_uc1638_160x128_f
2b9fe636105b1c217d646f6f505ec5c5841c21218c68c54bdc83f742f945e2b5
Ai-Thinker-Open
Ai-Thinker-WB2
NA
void u8g2_Setup_uc1638_160x128_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) { uint8_t tile_buf_height; uint8_t *buf; u8g2_SetupDisplay(u8g2, u8x8_d_uc1638_160x128, u8x8_cad_011, byte_cb, gpio_and_delay_cb); buf = u8g2_m_20_16_f(&tile_buf_height); u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4157A4", "function_addr": 4282276, "binary_name": "2b9fe636105b1c217d646f6f505ec5c5841c21218c68c54bdc83f742f945e2b5.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 [rbp+var_30], rcx"], [7, "mov rcx, [rbp+var_30]"], [8, "mov rdx, [rbp+var_28]"], [9, "mov rax, [rbp+var_18]"], [10, "mov r8, rcx"], [11, "mov rcx, rdx"], [12, "mov edx, offset sub_422B9F"], [13, "mov esi, offset sub_40306D"], [14, "mov rdi, rax"], [15, "call sub_406F92"], [16, "lea rax, [rbp+var_9]"], [17, "mov rdi, rax"], [18, "call sub_43393F"], [19, "mov [rbp+var_8], rax"], [20, "movzx eax, [rbp+var_9]"], [21, "movzx edx, al"], [22, "mov rcx, [rbp+var_20]"], [23, "mov rsi, [rbp+var_8]"], [24, "mov rax, [rbp+var_18]"], [25, "mov r8, rcx"], [26, "mov ecx, offset sub_402AE9"], [27, "mov rdi, rax"], [28, "call sub_42F582"], [29, "nop"], [30, "leave"], [31, "retn"]], "data_dep": [[7, 6], [8, 5], [9, 3], [10, 7], [11, 8], [14, 9], [16, 15], [17, 16], [19, 18], [21, 20], [22, 4], [23, 19], [24, 3], [25, 22], [27, 24], [31, 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/2b9fe636105b1c217d646f6f505ec5c5841c21218c68c54bdc83f742f945e2b5_2b9fe636105b1c217d646f6f505ec5c5841c21218c68c54bdc83f742f945e2b5.jsonl.gz", "strip_func_name": "sub_4157A4", "query": "\n\n\n__int64 __fastcall sub_4157A4(_QWORD *a1, __int64 a2, __int64 a3, __int64 a4)\n{\nunsigned __int8 v5; // [rsp+27h] [rbp-9h] BYREF\n__int64 v6; // [rsp+28h] [rbp-8h]\n\nsub_406F92(a1, (__int64)sub_40306D, (__int64)sub_422B9F, a3, a4);\nv6 = sub_43393F(&v5);\nreturn sub_42F582(a1, v6, v5, sub_402AE9, a2);\n}\n\n\n\nQ:[a3,a4,a1,a2,v5,v6,sub_4157A4,sub_406F92,sub_40306D,sub_422B9F,sub_43393F,sub_42F582,sub_402AE9,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'byte_cb', 'a4': 'gpio_and_delay_cb', 'a1': 'u8g2', 'a2': 'rotation', 'v5': 'tile_buf_height', 'v6': 'buf', 'sub_4157A4': 'u8g2_Setup_uc1638_160x128_f', 'sub_406F92': 'u8x8_Setup', 'sub_40306D': 'u8x8_d_uc1638_160x128', 'sub_422B9F': 'u8x8_cad_011', 'sub_43393F': 'u8g2_m_20_16_f', 'sub_42F582': 'u8g2_SetupBuffer', 'sub_402AE9': 'u8g2_ll_hvline_vertical_top_lsb'}"}
EccPoint_mult
5f5ebc3b2168d6c920c5b624ab2da0e280b9a03146ff50175d9a3c121396694a
bluekitchen
btstack
NA
static void EccPoint_mult(EccPoint * RESTRICT result, const EccPoint * RESTRICT point, const uECC_word_t * RESTRICT scalar, const uECC_word_t * RESTRICT initialZ, bitcount_t numBits) { /* R0 and R1 */ uECC_word_t Rx[2][uECC_WORDS]; uECC_word_t Ry[2][uECC_WORDS]; uECC_word_t z[uECC_WORDS]; bitcount_t i; uECC_word_t nb; vli_set(Rx[1], point->x); vli_set(Ry[1], point->y); XYcZ_initial_double(Rx[1], Ry[1], Rx[0], Ry[0], initialZ); for (i = numBits - 2; i > 0; --i) { nb = !vli_testBit(scalar, i); XYcZ_addC(Rx[1 - nb], Ry[1 - nb], Rx[nb], Ry[nb]); XYcZ_add(Rx[nb], Ry[nb], Rx[1 - nb], Ry[1 - nb]); } nb = !vli_testBit(scalar, 0); XYcZ_addC(Rx[1 - nb], Ry[1 - nb], Rx[nb], Ry[nb]); /* Find final 1/Z value. */ vli_modSub_fast(z, Rx[1], Rx[0]); /* X1 - X0 */ vli_modMult_fast(z, z, Ry[1 - nb]); /* Yb * (X1 - X0) */ vli_modMult_fast(z, z, point->x); /* xP * Yb * (X1 - X0) */ vli_modInv(z, z, curve_p); /* 1 / (xP * Yb * (X1 - X0)) */ vli_modMult_fast(z, z, point->y); /* yP / (xP * Yb * (X1 - X0)) */ vli_modMult_fast(z, z, Rx[1 - nb]); /* Xb * yP / (xP * Yb * (X1 - X0)) */ /* End 1/Z calculation */ XYcZ_add(Rx[nb], Ry[nb], Rx[1 - nb], Ry[1 - nb]); apply_z(Rx[0], Ry[0], z); vli_set(result->x, Rx[0]); vli_set(result->y, Ry[0]); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42B4FD", "function_addr": 4371709, "binary_name": "5f5ebc3b2168d6c920c5b624ab2da0e280b9a03146ff50175d9a3c121396694a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0E0h"], [3, "mov [rbp+var_B8], rdi"], [4, "mov [rbp+var_C0], rsi"], [5, "mov [rbp+var_C8], rdx"], [6, "mov [rbp+var_D0], rcx"], [7, "mov [rbp+var_D4], r8d"], [8, "mov rax, [rbp+var_C0]"], [9, "lea rdx, [rbp+var_50]"], [10, "add rdx, 20h "], [11, "mov rsi, rax"], [12, "mov rdi, rdx"], [13, "call sub_429EFD"], [14, "mov rax, [rbp+var_C0]"], [15, "lea rdx, [rax+20h]"], [16, "lea rax, [rbp+var_90]"], [17, "add rax, 20h "], [18, "mov rsi, rdx"], [19, "mov rdi, rax"], [20, "call sub_429EFD"], [21, "mov r8, [rbp+var_D0]"], [22, "lea rdx, [rbp+var_90]"], [23, "lea rax, [rbp+var_50]"], [24, "lea rcx, [rbp+var_90]"], [25, "lea rsi, [rcx+20h]"], [26, "lea rcx, [rbp+var_50]"], [27, "lea rdi, [rcx+20h]"], [28, "mov rcx, rdx"], [29, "mov rdx, rax"], [30, "call sub_42B0E3"], [31, "mov eax, [rbp+var_D4]"], [32, "sub eax, 2"], [33, "mov [rbp+var_4], eax"], [34, "jmp loc_42B676"], [35, "mov edx, [rbp+var_4]"], [36, "mov rax, [rbp+var_C8]"], [37, "mov esi, edx"], [38, "mov rdi, rax"], [39, "call sub_429EC0"], [40, "test rax, rax"], [41, "setz al"], [42, "movzx eax, al"], [43, "mov [rbp+var_10], rax"], [44, "lea rdx, [rbp+var_90]"], [45, "mov rax, [rbp+var_10]"], [46, "shl rax, 5"], [47, "lea rcx, [rdx+rax]"], [48, "lea rdx, [rbp+var_50]"], [49, "mov rax, [rbp+var_10]"], [50, "shl rax, 5"], [51, "add rdx, rax"], [52, "mov eax, 1"], [53, "sub rax, [rbp+var_10]"], [54, "lea rsi, [rbp+var_90]"], [55, "shl rax, 5"], [56, "add rsi, rax"], [57, "mov eax, 1"], [58, "sub rax, [rbp+var_10]"], [59, "lea rdi, [rbp+var_50]"], [60, "shl rax, 5"], [61, "add rax, rdi"], [62, "mov rdi, rax"], [63, "call sub_42B304"], [64, "mov eax, 1"], [65, "sub rax, [rbp+var_10]"], [66, "lea rdx, [rbp+var_90]"], [67, "shl rax, 5"], [68, "lea rcx, [rdx+rax]"], [69, "mov eax, 1"], [70, "sub rax, [rbp+var_10]"], [71, "lea rdx, [rbp+var_50]"], [72, "shl rax, 5"], [73, "add rdx, rax"], [74, "lea rsi, [rbp+var_90]"], [75, "mov rax, [rbp+var_10]"], [76, "shl rax, 5"], [77, "add rsi, rax"], [78, "lea rdi, [rbp+var_50]"], [79, "mov rax, [rbp+var_10]"], [80, "shl rax, 5"], [81, "add rax, rdi"], [82, "mov rdi, rax"], [83, "call sub_42B19D"], [84, "sub [rbp+var_4], 1"], [85, "cmp [rbp+var_4], 0"], [86, "jg loc_42B5A7"], [87, "mov rax, [rbp+var_C8]"], [88, "mov esi, 0"], [89, "mov rdi, rax"], [90, "call sub_429EC0"], [91, "test rax, rax"], [92, "setz al"], [93, "movzx eax, al"], [94, "mov [rbp+var_10], rax"], [95, "lea rdx, [rbp+var_90]"], [96, "mov rax, [rbp+var_10]"], [97, "shl rax, 5"], [98, "lea rcx, [rdx+rax]"], [99, "lea rdx, [rbp+var_50]"], [100, "mov rax, [rbp+var_10]"], [101, "shl rax, 5"], [102, "add rdx, rax"], [103, "mov eax, 1"], [104, "sub rax, [rbp+var_10]"], [105, "lea rsi, [rbp+var_90]"], [106, "shl rax, 5"], [107, "add rsi, rax"], [108, "mov eax, 1"], [109, "sub rax, [rbp+var_10]"], [110, "lea rdi, [rbp+var_50]"], [111, "shl rax, 5"], [112, "add rax, rdi"], [113, "mov rdi, rax"], [114, "call sub_42B304"], [115, "lea rdx, [rbp+var_50]"], [116, "lea rax, [rbp+var_50]"], [117, "lea rsi, [rax+20h]"], [118, "lea rax, [rbp+var_B0]"], [119, "mov ecx, offset unk_46C3E0"], [120, "mov rdi, rax"], [121, "call sub_42A4F4"], [122, "mov eax, 1"], [123, "sub rax, [rbp+var_10]"], [124, "lea rdx, [rbp+var_90]"], [125, "shl rax, 5"], [126, "add rdx, rax"], [127, "lea rcx, [rbp+var_B0]"], [128, "lea rax, [rbp+var_B0]"], [129, "mov rsi, rcx"], [130, "mov rdi, rax"], [131, "call sub_42AA03"], [132, "mov rdx, [rbp+var_C0]"], [133, "lea rcx, [rbp+var_B0]"], [134, "lea rax, [rbp+var_B0]"], [135, "mov rsi, rcx"], [136, "mov rdi, rax"], [137, "call sub_42AA03"], [138, "lea rcx, [rbp+var_B0]"], [139, "lea rax, [rbp+var_B0]"], [140, "mov edx, offset unk_46C3E0"], [141, "mov rsi, rcx"], [142, "mov rdi, rax"], [143, "call sub_42AA44"], [144, "mov rax, [rbp+var_C0]"], [145, "lea rdx, [rax+20h]"], [146, "lea rcx, [rbp+var_B0]"], [147, "lea rax, [rbp+var_B0]"], [148, "mov rsi, rcx"], [149, "mov rdi, rax"], [150, "call sub_42AA03"], [151, "mov eax, 1"], [152, "sub rax, [rbp+var_10]"], [153, "lea rdx, [rbp+var_50]"], [154, "shl rax, 5"], [155, "add rdx, rax"], [156, "lea rcx, [rbp+var_B0]"], [157, "lea rax, [rbp+var_B0]"], [158, "mov rsi, rcx"], [159, "mov rdi, rax"], [160, "call sub_42AA03"], [161, "mov eax, 1"], [162, "sub rax, [rbp+var_10]"], [163, "lea rdx, [rbp+var_90]"], [164, "shl rax, 5"], [165, "lea rcx, [rdx+rax]"], [166, "mov eax, 1"], [167, "sub rax, [rbp+var_10]"], [168, "lea rdx, [rbp+var_50]"], [169, "shl rax, 5"], [170, "add rdx, rax"], [171, "lea rsi, [rbp+var_90]"], [172, "mov rax, [rbp+var_10]"], [173, "shl rax, 5"], [174, "add rsi, rax"], [175, "lea rdi, [rbp+var_50]"], [176, "mov rax, [rbp+var_10]"], [177, "shl rax, 5"], [178, "add rax, rdi"], [179, "mov rdi, rax"], [180, "call sub_42B19D"], [181, "lea rdx, [rbp+var_B0]"], [182, "lea rcx, [rbp+var_90]"], [183, "lea rax, [rbp+var_50]"], [184, "mov rsi, rcx"], [185, "mov rdi, rax"], [186, "call sub_42B070"], [187, "mov rax, [rbp+var_B8]"], [188, "lea rdx, [rbp+var_50]"], [189, "mov rsi, rdx"], [190, "mov rdi, rax"], [191, "call sub_429EFD"], [192, "mov rax, [rbp+var_B8]"], [193, "lea rdx, [rax+20h]"], [194, "lea rax, [rbp+var_90]"], [195, "mov rsi, rax"], [196, "mov rdi, rdx"], [197, "call sub_429EFD"], [198, "nop"], [199, "leave"], [200, "retn"]], "data_dep": [[8, 4], [10, 9], [11, 8], [12, 10], [14, 4], [15, 14], [15, 10], [16, 14], [17, 16], [18, 15], [19, 17], [21, 6], [22, 15], [23, 20], [25, 18], [25, 24], [26, 24], [27, 26], [27, 19], [28, 22], [29, 23], [31, 7], [32, 31], [33, 32], [35, 33], [35, 84], [36, 5], [37, 35], [38, 36], [40, 39], [41, 40], [42, 41], [43, 42], [44, 35], [45, 43], [46, 45], [47, 68], [47, 28], [47, 46], [48, 44], [49, 43], [50, 49], [51, 50], [51, 48], [53, 43], [53, 52], [54, 37], [55, 53], [56, 55], [56, 54], [58, 57], [58, 43], [59, 38], [60, 58], [61, 60], [61, 59], [62, 61], [65, 43], [65, 64], [66, 51], [67, 65], [68, 47], [68, 67], [70, 43], [70, 69], [71, 66], [72, 70], [73, 71], [73, 72], [74, 56], [75, 43], [76, 75], [77, 76], [77, 74], [78, 62], [79, 43], [80, 79], [81, 78], [81, 80], [82, 81], [84, 84], [84, 33], [85, 84], [85, 33], [86, 85], [87, 5], [89, 87], [91, 90], [92, 91], [93, 92], [94, 93], [95, 29], [95, 73], [96, 94], [97, 96], [98, 68], [98, 97], [98, 28], [99, 95], [100, 94], [101, 100], [102, 99], [102, 101], [104, 94], [104, 103], [105, 88], [106, 104], [107, 106], [107, 105], [109, 108], [109, 94], [110, 89], [111, 109], [112, 111], [112, 110], [113, 112], [115, 102], [116, 114], [117, 107], [117, 116], [118, 116], [120, 118], [123, 122], [123, 94], [124, 115], [125, 123], [126, 125], [126, 124], [127, 119], [128, 125], [129, 127], [130, 128], [132, 4], [133, 127], [134, 131], [135, 133], [136, 134], [138, 133], [139, 137], [141, 138], [142, 139], [144, 4], [145, 144], [145, 140], [146, 138], [147, 144], [148, 146], [149, 147], [152, 94], [152, 151], [153, 145], [154, 152], [155, 153], [155, 154], [156, 146], [157, 154], [158, 156], [159, 157], [162, 161], [162, 94], [163, 155], [164, 162], [165, 156], [165, 164], [167, 166], [167, 94], [168, 163], [169, 167], [170, 169], [170, 168], [171, 158], [172, 94], [173, 172], [174, 171], [174, 173], [175, 159], [176, 94], [177, 176], [178, 175], [178, 177], [179, 178], [181, 170], [182, 165], [183, 180], [184, 182], [185, 183], [187, 3], [188, 181], [189, 188], [190, 187], [192, 3], [193, 188], [193, 192], [194, 192], [195, 194], [196, 193], [200, 197]]}
{"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/5f5ebc3b2168d6c920c5b624ab2da0e280b9a03146ff50175d9a3c121396694a_5f5ebc3b2168d6c920c5b624ab2da0e280b9a03146ff50175d9a3c121396694a.jsonl.gz", "strip_func_name": "sub_42B4FD", "query": "\n\n\n__int64 __fastcall sub_42B4FD(__int64 a1, __int64 a2, __int64 a3, __int64 a4, int a5)\n{\n__int64 v5; // rax\n__int64 v6; // rax\nchar v11[32]; // [rsp+30h] [rbp-B0h] BYREF\n_OWORD v12[2]; // [rsp+50h] [rbp-90h] BYREF\n_BYTE v13[32]; // [rsp+70h] [rbp-70h] BYREF\n_OWORD v14[2]; // [rsp+90h] [rbp-50h] BYREF\n_BYTE v15[32]; // [rsp+B0h] [rbp-30h] BYREF\n_BOOL8 v16; // [rsp+D0h] [rbp-10h]\nint i; // [rsp+DCh] [rbp-4h]\n\nsub_429EFD((__int64)v15, a2);\nsub_429EFD((__int64)v13, a2 + 32);\nsub_42B0E3((unsigned __int64)v15, (__int64)v13, (__int64)v14, (__int64)v12, a4);\nfor ( i = a5 - 2; i > 0; --i )\n{\nv5 = sub_429EC0(a3, i);\nv16 = v5 == 0;\nsub_42B304(\n(__int64)&v14[2 * (v5 != 0)],\n(__int64)&v12[2 * (v5 != 0)],\n(__int64)&v14[2 * v16],\n(__int64)&v12[2 * v16]);\nsub_42B19D(\n(__int64)&v14[2 * v16],\n(__int64)&v12[2 * v16],\n(__int64)&v14[2 * (1 - v16)],\n(__int64)&v12[2 * (1 - v16)]);\n}\nv6 = sub_429EC0(a3, 0);\nv16 = v6 == 0;\nsub_42B304((__int64)&v14[2 * (v6 != 0)], (__int64)&v12[2 * (v6 != 0)], (__int64)&v14[2 * v16], (__int64)&v12[2 * v16]);\nsub_42A4F4((__int64)v11, (__int64)v15, (__int64)v14, (__int64)&unk_46C3E0);\nsub_42AA03((__int64)v11, (__int64)v11, (__int64)&v12[2 * (1 - v16)]);\nsub_42AA03((__int64)v11, (__int64)v11, a2);\nsub_42AA44((__int64)v11, (__int64)v11, (__int64)&unk_46C3E0);\nsub_42AA03((__int64)v11, (__int64)v11, a2 + 32);\nsub_42AA03((__int64)v11, (__int64)v11, (__int64)&v14[2 * (1 - v16)]);\nsub_42B19D((__int64)&v14[2 * v16], (__int64)&v12[2 * v16], (__int64)&v14[2 * (1 - v16)], (__int64)&v12[2 * (1 - v16)]);\nsub_42B070((__int64)v14, (__int64)v12, (__int64)v11);\nsub_429EFD(a1, (__int64)v14);\nreturn sub_429EFD(a1 + 32, (__int64)v12);\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v11,v12,v14,v16,sub_42B4FD,sub_429EFD,sub_42B0E3,sub_429EC0,sub_42B304,sub_42B19D,sub_42A4F4,sub_42AA03,sub_42AA44,sub_42B070,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'scalar', 'a4': 'initialZ', 'a1': 'result', 'a2': 'point', 'a5': 'numBits', 'v11': 'z', 'v12': 'Ry', 'v14': 'Rx', 'v16': 'nb', 'sub_42B4FD': 'EccPoint_mult', 'sub_429EFD': 'vli_set', 'sub_42B0E3': 'XYcZ_initial_double', 'sub_429EC0': 'vli_testBit', 'sub_42B304': 'XYcZ_addC', 'sub_42B19D': 'XYcZ_add', 'sub_42A4F4': 'vli_modSub', 'sub_42AA03': 'vli_modMult_fast', 'sub_42AA44': 'vli_modInv', 'sub_42B070': 'apply_z'}"}
main
44f2fed59f58cdda877dc7e46071152973871474556ed93945505b22c64cfdea
bloominstituteoftechnology
Intro-to-C
NA
int main(void) { char quote1[] = "Don't forget to be awesome"; char quote2[] = "a man a plan a canal panama"; char rv[512]; printf("The string 'Don't forget to be awesome' has %d characters.\n", string_length(quote1)); printf("The string 'a man a plan a canal panama' reversed is: '%s'\n", reverse_string(rv, quote2)); return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "main", "function_addr": 4198716, "binary_name": "44f2fed59f58cdda877dc7e46071152973871474556ed93945505b22c64cfdea.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 240h"], [3, "mov rax, 6F662074276E6F44h"], [4, "mov rdx, 206F742074656772h"], [5, "mov [rbp+var_20], rax"], [6, "mov [rbp+var_18], rdx"], [7, "mov rax, 6F73657761206562h"], [8, "mov [rbp+var_10], rax"], [9, "mov [rbp+var_8], 656Dh"], [10, "mov [rbp+var_6], 0"], [11, "mov rax, 2061206E616D2061h"], [12, "mov rdx, 632061206E616C70h"], [13, "mov [rbp+var_40], rax"], [14, "mov [rbp+var_38], rdx"], [15, "mov rax, 6E6170206C616E61h"], [16, "mov [rbp+var_30], rax"], [17, "mov [rbp+var_28], 616D61h"], [18, "lea rax, [rbp+var_20]"], [19, "mov rdi, rax"], [20, "call sub_401122"], [21, "mov esi, eax"], [22, "mov edi, offset format"], [23, "mov eax, 0"], [24, "call _printf"], [25, "lea rdx, [rbp+var_40]"], [26, "lea rax, [rbp+var_240]"], [27, "mov rsi, rdx"], [28, "mov rdi, rax"], [29, "call sub_40112D"], [30, "mov rsi, rax"], [31, "mov edi, offset aTheStringAManA"], [32, "mov eax, 0"], [33, "call _printf"], [34, "mov eax, 0"], [35, "leave"], [36, "retn"]], "data_dep": [[5, 3], [6, 4], [8, 7], [13, 11], [14, 12], [16, 15], [18, 15], [18, 5], [19, 18], [21, 20], [25, 13], [25, 12], [26, 24], [27, 25], [28, 26], [30, 29], [36, 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/44f2fed59f58cdda877dc7e46071152973871474556ed93945505b22c64cfdea_44f2fed59f58cdda877dc7e46071152973871474556ed93945505b22c64cfdea.jsonl.gz", "strip_func_name": "main", "query": "\n\n\n__int64 __fastcall main(int a1, char **a2, char **a3)\n{\nunsigned int v3; // eax\nconst char *v4; // rax\n\nsub_401122();\nprintf(\"The string 'Don't forget to be awesome' has %d characters.\\n\", v3);\nsub_40112D();\nprintf(\"The string 'a man a plan a canal panama' reversed is: '%s'\\n\", v4);\nreturn 0LL;\n}\n\n\n\nQ:[a2,a3,a1,sub_401122,sub_40112D,]\nAssistant: ", "hints": "[]", "response": "{'a2': 'argv', 'a3': 'envp', 'a1': 'argc', 'sub_401122': 'string_length', 'sub_40112D': 'reverse_string'}"}
hfp_outgoing_call_ringing_handler
5f5ebc3b2168d6c920c5b624ab2da0e280b9a03146ff50175d9a3c121396694a
bluekitchen
btstack
NA
static void hfp_outgoing_call_ringing_handler(btstack_timer_source_t * timer){ UNUSED(timer); printf("Simulate call connected -> start ringing\n"); hfp_ag_outgoing_call_ringing(); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_45CD78", "function_addr": 4574584, "binary_name": "5f5ebc3b2168d6c920c5b624ab2da0e280b9a03146ff50175d9a3c121396694a.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, offset aSimulateCallCo"], [5, "call _puts"], [6, "call sub_45AED4"], [7, "nop"], [8, "leave"], [9, "retn"]], "data_dep": [[9, 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/5f5ebc3b2168d6c920c5b624ab2da0e280b9a03146ff50175d9a3c121396694a_5f5ebc3b2168d6c920c5b624ab2da0e280b9a03146ff50175d9a3c121396694a.jsonl.gz", "strip_func_name": "sub_45CD78", "query": "\n\n\nchar sub_45CD78()\n{\nputs(\"Simulate call connected -> start ringing\");\nreturn sub_45AED4();\n}\n\n\n\nQ:[sub_45CD78,sub_45AED4,]\nAssistant: ", "hints": "[]", "response": "{'sub_45CD78': 'hfp_outgoing_call_ringing_handler', 'sub_45AED4': 'hfp_ag_outgoing_call_ringing'}"}
socket_server_release
ec13b450451a1a6f85448efbf548f41f93dcb45bdcb731e55b9e95be4a5b58ce
cloudwu
socket-server
NA
void socket_server_release(struct socket_server *ss) { int i; struct socket_message dummy; for (i=0;i<MAX_SOCKET;i++) { struct socket *s = &ss->slot[i]; if (s->type != SOCKET_TYPE_RESERVE) { force_close(ss, s , &dummy); } } close(ss->sendctrl_fd); close(ss->recvctrl_fd); sp_release(ss->event_fd); FREE(ss); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401C15", "function_addr": 4201493, "binary_name": "ec13b450451a1a6f85448efbf548f41f93dcb45bdcb731e55b9e95be4a5b58ce.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+ptr], rdi"], [4, "mov [rbp+var_4], 0"], [5, "jmp short loc_401C7D"], [6, "mov eax, [rbp+var_4]"], [7, "movsxd rdx, eax"], [8, "mov rax, rdx"], [9, "shl rax, 2"], [10, "add rax, rdx"], [11, "shl rax, 4"], [12, "lea rdx, [rax+430h]"], [13, "mov rax, [rbp+ptr]"], [14, "add rax, rdx"], [15, "add rax, 8"], [16, "mov [rbp+var_10], rax"], [17, "mov rax, [rbp+var_10]"], [18, "movzx eax, word ptr [rax+3Ah]"], [19, "cmp ax, 1"], [20, "jz short loc_401C79"], [21, "lea rdx, [rbp+var_30]"], [22, "mov rcx, [rbp+var_10]"], [23, "mov rax, [rbp+ptr]"], [24, "mov rsi, rcx"], [25, "mov rdi, rax"], [26, "call sub_401B0A"], [27, "add [rbp+var_4], 1"], [28, "cmp [rbp+var_4], 0FFFFh"], [29, "jle short loc_401C2A"], [30, "mov rax, [rbp+ptr]"], [31, "mov eax, [rax+4]"], [32, "mov edi, eax"], [33, "call _close"], [34, "mov rax, [rbp+ptr]"], [35, "mov eax, [rax]"], [36, "mov edi, eax"], [37, "call _close"], [38, "mov rax, [rbp+ptr]"], [39, "mov eax, [rax+0Ch]"], [40, "mov edi, eax"], [41, "call sub_4013B2"], [42, "mov rax, [rbp+ptr]"], [43, "mov rdi, rax"], [44, "call _free"], [45, "nop"], [46, "leave"], [47, "retn"]], "data_dep": [[6, 27], [6, 4], [7, 6], [8, 7], [9, 8], [10, 9], [10, 7], [11, 10], [12, 7], [12, 11], [13, 3], [14, 13], [14, 12], [15, 14], [16, 15], [17, 16], [18, 17], [19, 18], [20, 19], [21, 12], [22, 16], [23, 3], [24, 22], [25, 23], [27, 4], [27, 27], [28, 27], [28, 4], [29, 28], [30, 3], [31, 30], [32, 31], [34, 3], [35, 34], [36, 35], [38, 3], [39, 38], [40, 39], [42, 3], [43, 42], [47, 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/ec13b450451a1a6f85448efbf548f41f93dcb45bdcb731e55b9e95be4a5b58ce_ec13b450451a1a6f85448efbf548f41f93dcb45bdcb731e55b9e95be4a5b58ce.jsonl.gz", "strip_func_name": "sub_401C15", "query": "\n\n\nvoid __fastcall sub_401C15(int *a1)\n{\n__int64 v1; // rdx\nchar v2[32]; // [rsp+10h] [rbp-30h] BYREF\n__int64 v3; // [rsp+30h] [rbp-10h]\nint i; // [rsp+3Ch] [rbp-4h]\n\nfor ( i = 0; i <= 0xFFFF; ++i )\n{\nv1 = 80LL * i + 1072;\nv3 = (__int64)a1 + v1 + 8;\nif ( *(_WORD *)((char *)a1 + v1 + 66) != 1 )\nsub_401B0A((__int64)a1, v3, (__int64)v2);\n}\nclose(a1[1]);\nclose(*a1);\nsub_4013B2(a1[3]);\nfree(a1);\n}\n\n\n\nQ:[a1,v2,v3,sub_401C15,sub_401B0A,sub_4013B2,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ss_0', 'v2': 'dummy', 'v3': 's', 'sub_401C15': 'socket_server_release', 'sub_401B0A': 'force_close', 'sub_4013B2': 'sp_release'}"}
occli_recv_cmd_resp_from_ocmw
4b54a049054357608bac967eaab9123c1342b8af37eb5c5e55c10ced48d30d5f
Telecominfraproject
OpenCellular
NA
int32_t occli_recv_cmd_resp_from_ocmw(char *resp, int32_t resplen) { char errstr[OCMW_SOCKET_ERROR_SIZE]; int32_t ret = 0; int32_t strLen = sizeof(s_siServer); /* Receive the CLI command execution response string from OCMW over UDP socket */ ret = recvfrom(s_sockFd, resp, resplen, 0, (struct sockaddr*) &s_siServer, (socklen_t*) &strLen); if (ret < 0) { strerror_r(errno, errstr, OCMW_SOCKET_ERROR_SIZE); logerr("Error: 'recvfrom' [%d-%s]", ret, errstr); printf("%s : Error : Timeout from Middleware", s_displayStr); } return ret; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402859", "function_addr": 4204633, "binary_name": "4b54a049054357608bac967eaab9123c1342b8af37eb5c5e55c10ced48d30d5f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 130h"], [3, "mov [rbp+buf], rdi"], [4, "mov [rbp+var_12C], esi"], [5, "mov [rbp+var_4], 0"], [6, "mov [rbp+addr_len], 10h"], [7, "mov eax, [rbp+var_12C]"], [8, "movsxd rdx, eax"], [9, "mov eax, cs:fd"], [10, "lea rcx, [rbp+addr_len]"], [11, "mov rsi, [rbp+buf]"], [12, "mov r9, rcx"], [13, "mov r8d, offset stru_40FF50"], [14, "mov ecx, 0"], [15, "mov edi, eax"], [16, "call _recvfrom"], [17, "mov [rbp+var_4], eax"], [18, "cmp [rbp+var_4], 0"], [19, "jns short loc_40292D"], [20, "call ___errno_location"], [21, "mov eax, [rax]"], [22, "lea rcx, [rbp+var_110]"], [23, "mov edx, 100h"], [24, "mov rsi, rcx"], [25, "mov edi, eax"], [26, "call ___xpg_strerror_r"], [27, "mov esi, offset modes"], [28, "mov edi, offset filename"], [29, "call _fopen"], [30, "mov [rbp+stream], rax"], [31, "lea rcx, [rbp+var_110]"], [32, "mov edx, [rbp+var_4]"], [33, "mov rax, [rbp+stream]"], [34, "mov esi, offset aEErrorRecvfrom"], [35, "mov rdi, rax"], [36, "mov eax, 0"], [37, "call _fprintf"], [38, "mov rax, [rbp+stream]"], [39, "mov rdi, rax"], [40, "call _fclose"], [41, "mov esi, offset dest"], [42, "mov edi, offset aSErrorTimeoutF"], [43, "mov eax, 0"], [44, "call _printf"], [45, "mov eax, [rbp+var_4]"], [46, "leave"], [47, "retn"]], "data_dep": [[7, 4], [8, 7], [10, 6], [11, 3], [12, 10], [15, 9], [17, 16], [18, 17], [19, 18], [21, 20], [22, 14], [24, 22], [25, 21], [30, 29], [31, 22], [32, 17], [33, 30], [35, 33], [38, 30], [39, 38], [45, 17], [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/4b54a049054357608bac967eaab9123c1342b8af37eb5c5e55c10ced48d30d5f_4b54a049054357608bac967eaab9123c1342b8af37eb5c5e55c10ced48d30d5f.jsonl.gz", "strip_func_name": "sub_402859", "query": "\n\n\n__int64 __fastcall sub_402859(void *a1, int a2)\n{\nsocklen_t addr_len; // [rsp+1Ch] [rbp-114h] BYREF\nchar v4[256]; // [rsp+20h] [rbp-110h] BYREF\nFILE *stream; // [rsp+120h] [rbp-10h]\nunsigned int v6; // [rsp+12Ch] [rbp-4h]\n\nv6 = 0;\naddr_len = 16;\nv6 = recvfrom(fd, a1, a2, 0, &stru_40FF50, &addr_len);\nif ( (v6 & 0x80000000) != 0 )\n{\n__errno_location();\n__xpg_strerror_r();\nstream = fopen(\"./log/logFileMW.txt\", \"a\");\nfprintf(stream, \"<e> Error: 'recvfrom' [%d-%s]\\n\", v6, v4);\nfclose(stream);\nprintf(\"%s : Error : Timeout from Middleware\", dest);\n}\nreturn v6;\n}\n\n\n\nQ:[a1,a2,addr_len,v4,stream,sub_402859,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'resp', 'a2': 'resplen', 'addr_len': 'strLen', 'v4': 'errstr', 'stream': 'fp', 'sub_402859': 'occli_recv_cmd_resp_from_ocmw'}"}
_has_field_name
5a624d8d514e5e32cdeca29df98b8a01acc2e5dae4f5e11178902b3cb5c9d86c
bi-zone
masscan-ng
NA
static bool _has_field_name(const char *name, size_t name_length, const unsigned char *hdr, size_t offset, size_t hdr_length) { size_t x; bool found_colon = false; /* Trim leading whitespace */ while (offset < hdr_length && isspace(hdr[offset] & 0xFF) && hdr[offset] != '\n') { offset++; } /* Make sure there's enough space left */ if (hdr_length - offset < name_length) return false; /* Make sure there's colon after */ for (x = offset + name_length; x < hdr_length; x++) { unsigned char c = hdr[x] & 0xFF; if (isspace(c)) continue; else if (c == ':') { found_colon = true; break; } else { /* some unexpected character was found in the name */ return false; } } if (!found_colon) return false; /* Compare the name (case insensitive) */ return memcasecmp(name, hdr + offset, name_length) == 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43042B", "function_addr": 4391979, "binary_name": "5a624d8d514e5e32cdeca29df98b8a01acc2e5dae4f5e11178902b3cb5c9d86c.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_28], rdx"], [6, "mov [rbp+var_30], rcx"], [7, "mov [rbp+var_38], r8"], [8, "mov [rbp+var_9], 0"], [9, "jmp short loc_430452"], [10, "add [rbp+var_30], 1"], [11, "mov rax, [rbp+var_30]"], [12, "cmp rax, [rbp+var_38]"], [13, "jnb short loc_43049C"], [14, "call ___ctype_b_loc"], [15, "mov rdx, [rax]"], [16, "mov rcx, [rbp+var_28]"], [17, "mov rax, [rbp+var_30]"], [18, "add rax, rcx"], [19, "movzx eax, byte ptr [rax]"], [20, "movzx eax, al"], [21, "add rax, rax"], [22, "add rax, rdx"], [23, "movzx eax, word ptr [rax]"], [24, "movzx eax, ax"], [25, "and eax, 2000h"], [26, "test eax, eax"], [27, "jz short loc_43049C"], [28, "mov rdx, [rbp+var_28]"], [29, "mov rax, [rbp+var_30]"], [30, "add rax, rdx"], [31, "movzx eax, byte ptr [rax]"], [32, "cmp al, 0Ah"], [33, "jnz short loc_43044D"], [34, "mov rax, [rbp+var_38]"], [35, "sub rax, [rbp+var_30]"], [36, "cmp [rbp+var_20], rax"], [37, "jbe short loc_4304B4"], [38, "mov eax, 0"], [39, "jmp locret_430552"], [40, "mov rdx, [rbp+var_30]"], [41, "mov rax, [rbp+var_20]"], [42, "add rax, rdx"], [43, "mov [rbp+var_8], rax"], [44, "jmp short loc_430511"], [45, "mov rdx, [rbp+var_28]"], [46, "mov rax, [rbp+var_8]"], [47, "add rax, rdx"], [48, "movzx eax, byte ptr [rax]"], [49, "mov [rbp+var_A], al"], [50, "call ___ctype_b_loc"], [51, "mov rdx, [rax]"], [52, "movzx eax, [rbp+var_A]"], [53, "add rax, rax"], [54, "add rax, rdx"], [55, "movzx eax, word ptr [rax]"], [56, "movzx eax, ax"], [57, "and eax, 2000h"], [58, "test eax, eax"], [59, "jz short loc_4304FE"], [60, "add [rbp+var_8], 1"], [61, "jmp short loc_430511"], [62, "cmp [rbp+var_A], 3Ah "], [63, "jnz short loc_43050A"], [64, "mov [rbp+var_9], 1"], [65, "jmp short loc_43051B"], [66, "mov eax, 0"], [67, "jmp short locret_430552"], [68, "mov rax, [rbp+var_8]"], [69, "cmp rax, [rbp+var_38]"], [70, "jb short loc_4304C5"], [71, "movzx eax, [rbp+var_9]"], [72, "xor eax, 1"], [73, "test al, al"], [74, "jz short loc_43052D"], [75, "mov eax, 0"], [76, "jmp short locret_430552"], [77, "mov rax, [rbp+var_20]"], [78, "mov edx, eax"], [79, "mov rcx, [rbp+var_28]"], [80, "mov rax, [rbp+var_30]"], [81, "add rcx, rax"], [82, "mov rax, [rbp+var_18]"], [83, "mov rsi, rcx"], [84, "mov rdi, rax"], [85, "call sub_45ED72"], [86, "test eax, eax"], [87, "setz al"], [88, "leave"], [89, "retn"]], "data_dep": [[10, 6], [10, 10], [11, 6], [11, 10], [12, 7], [12, 11], [13, 12], [15, 14], [16, 5], [17, 6], [17, 10], [18, 17], [18, 16], [19, 18], [20, 19], [21, 20], [22, 21], [22, 15], [23, 22], [24, 23], [25, 24], [26, 25], [27, 26], [28, 5], [29, 6], [29, 10], [30, 29], [30, 28], [31, 30], [32, 31], [33, 32], [34, 7], [35, 10], [35, 34], [35, 6], [36, 4], [36, 35], [37, 36], [40, 6], [40, 10], [41, 4], [42, 41], [42, 40], [43, 42], [45, 5], [46, 43], [46, 60], [47, 45], [47, 46], [48, 47], [49, 48], [51, 50], [52, 49], [53, 52], [54, 51], [54, 53], [55, 54], [56, 55], [57, 56], [58, 57], [59, 58], [60, 43], [60, 60], [62, 49], [63, 62], [68, 43], [68, 60], [69, 7], [69, 68], [70, 69], [71, 8], [71, 64], [72, 71], [73, 72], [74, 73], [77, 4], [78, 77], [79, 5], [80, 10], [80, 6], [81, 80], [81, 79], [82, 3], [83, 81], [84, 82], [86, 85], [87, 86], [89, 38], [89, 87], [89, 66], [89, 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/5a624d8d514e5e32cdeca29df98b8a01acc2e5dae4f5e11178902b3cb5c9d86c_5a624d8d514e5e32cdeca29df98b8a01acc2e5dae4f5e11178902b3cb5c9d86c.jsonl.gz", "strip_func_name": "sub_43042B", "query": "\n\n\nbool __fastcall sub_43042B(__int64 a1, unsigned __int64 a2, __int64 a3, unsigned __int64 a4, unsigned __int64 a5)\n{\nbool result; // al\nunsigned __int8 v9; // [rsp+36h] [rbp-Ah]\nchar v10; // [rsp+37h] [rbp-9h]\nunsigned __int64 i; // [rsp+38h] [rbp-8h]\n\nv10 = 0;\nwhile ( a4 < a5 && ((*__ctype_b_loc())[*(unsigned __int8 *)(a3 + a4)] & 0x2000) != 0 && *(_BYTE *)(a3 + a4) != 10 )\n++a4;\nif ( a2 > a5 - a4 )\nreturn 0;\nfor ( i = a4 + a2; i < a5; ++i )\n{\nv9 = *(_BYTE *)(a3 + i);\nif ( ((*__ctype_b_loc())[v9] & 0x2000) == 0 )\n{\nif ( v9 != 58 )\nreturn 0;\nv10 = 1;\nbreak;\n}\n}\nif ( v10 != 1 )\nresult = 0;\nelse\nresult = (unsigned int)sub_45ED72(a1, a4 + a3, (unsigned int)a2) == 0;\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v9,v10,i,sub_43042B,sub_45ED72,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'hdr', 'a4': 'offset', 'a1': 'name', 'a2': 'name_length', 'a5': 'hdr_length', 'v9': 'c', 'v10': 'found_colon', 'i': 'x', 'sub_43042B': '_has_field_name', 'sub_45ED72': 'memcasecmp'}"}
pglz_find_match
ce6238578c46b0be420ee05d5faa73253ad947408d8a965cba7aba12ccf1ef79
bitnine-oss
agensgraph
NA
static inline int pglz_find_match(int16 *hstart, const char *input, const char *end, int *lenp, int *offp, int good_match, int good_drop, int mask) { PGLZ_HistEntry *hent; int16 hentno; int32 len = 0; int32 off = 0; /* * Traverse the linked history list until a good enough match is found. */ hentno = hstart[pglz_hist_idx(input, end, mask)]; hent = &hist_entries[hentno]; while (hent != INVALID_ENTRY_PTR) { const char *ip = input; const char *hp = hent->pos; int32 thisoff; int32 thislen; /* * Stop if the offset does not fit into our tag anymore. */ thisoff = ip - hp; if (thisoff >= 0x0fff) break; /* * Determine length of match. A better match must be larger than the * best so far. And if we already have a match of 16 or more bytes, * it's worth the call overhead to use memcmp() to check if this match * is equal for the same size. After that we must fallback to * character by character comparison to know the exact position where * the diff occurred. */ thislen = 0; if (len >= 16) { if (memcmp(ip, hp, len) == 0) { thislen = len; ip += len; hp += len; while (ip < end && *ip == *hp && thislen < PGLZ_MAX_MATCH) { thislen++; ip++; hp++; } } } else { while (ip < end && *ip == *hp && thislen < PGLZ_MAX_MATCH) { thislen++; ip++; hp++; } } /* * Remember this match as the best (if it is) */ if (thislen > len) { len = thislen; off = thisoff; } /* * Advance to the next history entry */ hent = hent->next; /* * Be happy with lesser good matches the more entries we visited. But * no point in doing calculation if we're at end of list. */ if (hent != INVALID_ENTRY_PTR) { if (len >= good_match) break; good_match -= (good_match * good_drop) / 100; } } /* * Return match information only if it results at least in one byte * reduction. */ if (len > 2) { *lenp = len; *offp = off; return 1; } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40F885", "function_addr": 4257925, "binary_name": "ce6238578c46b0be420ee05d5faa73253ad947408d8a965cba7aba12ccf1ef79.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 60h"], [3, "mov [rbp+var_38], rdi"], [4, "mov [rbp+var_40], rsi"], [5, "mov [rbp+var_48], rdx"], [6, "mov [rbp+var_50], rcx"], [7, "mov [rbp+var_58], r8"], [8, "mov [rbp+var_5C], r9d"], [9, "mov [rbp+var_C], 0"], [10, "mov [rbp+var_10], 0"], [11, "mov rax, [rbp+var_48]"], [12, "sub rax, [rbp+var_40]"], [13, "cmp rax, 3"], [14, "jg short loc_40F8CD"], [15, "mov rax, [rbp+var_40]"], [16, "movzx eax, byte ptr [rax]"], [17, "movsx eax, al"], [18, "jmp short loc_40F912"], [19, "mov rax, [rbp+var_40]"], [20, "movzx eax, byte ptr [rax]"], [21, "movsx eax, al"], [22, "shl eax, 6"], [23, "mov edx, eax"], [24, "mov rax, [rbp+var_40]"], [25, "add rax, 1"], [26, "movzx eax, byte ptr [rax]"], [27, "movsx eax, al"], [28, "shl eax, 4"], [29, "xor edx, eax"], [30, "mov rax, [rbp+var_40]"], [31, "add rax, 2"], [32, "movzx eax, byte ptr [rax]"], [33, "movsx eax, al"], [34, "shl eax, 2"], [35, "xor edx, eax"], [36, "mov rax, [rbp+var_40]"], [37, "add rax, 3"], [38, "movzx eax, byte ptr [rax]"], [39, "movsx eax, al"], [40, "xor eax, edx"], [41, "and eax, [rbp+arg_8]"], [42, "cdqe"], [43, "lea rdx, [rax+rax]"], [44, "mov rax, [rbp+var_38]"], [45, "add rax, rdx"], [46, "movzx eax, word ptr [rax]"], [47, "mov [rbp+var_26], ax"], [48, "movsx eax, [rbp+var_26]"], [49, "cdqe"], [50, "shl rax, 5"], [51, "add rax, 429240h"], [52, "mov [rbp+var_8], rax"], [53, "jmp loc_40FA6F"], [54, "mov rax, [rbp+var_40]"], [55, "mov [rbp+s1], rax"], [56, "mov rax, [rbp+var_8]"], [57, "mov rax, [rax+18h]"], [58, "mov [rbp+s2], rax"], [59, "mov rax, [rbp+s1]"], [60, "sub rax, [rbp+s2]"], [61, "mov [rbp+var_2C], eax"], [62, "cmp [rbp+var_2C], 0FFEh"], [63, "jg loc_40FA7F"], [64, "mov [rbp+var_24], 0"], [65, "cmp [rbp+var_C], 0Fh"], [66, "jle short loc_40F9F9"], [67, "mov eax, [rbp+var_C]"], [68, "movsxd rdx, eax"], [69, "mov rcx, [rbp+s2]"], [70, "mov rax, [rbp+s1]"], [71, "mov rsi, rcx"], [72, "mov rdi, rax"], [73, "call _memcmp"], [74, "test eax, eax"], [75, "jnz loc_40FA1E"], [76, "mov eax, [rbp+var_C]"], [77, "mov [rbp+var_24], eax"], [78, "mov eax, [rbp+var_C]"], [79, "cdqe"], [80, "add [rbp+s1], rax"], [81, "mov eax, [rbp+var_C]"], [82, "cdqe"], [83, "add [rbp+s2], rax"], [84, "jmp short loc_40F9C4"], [85, "add [rbp+var_24], 1"], [86, "add [rbp+s1], 1"], [87, "add [rbp+s2], 1"], [88, "mov rax, [rbp+s1]"], [89, "cmp rax, [rbp+var_48]"], [90, "jnb short loc_40FA1E"], [91, "mov rax, [rbp+s1]"], [92, "movzx edx, byte ptr [rax]"], [93, "mov rax, [rbp+s2]"], [94, "movzx eax, byte ptr [rax]"], [95, "cmp dl, al"], [96, "jnz short loc_40FA1E"], [97, "cmp [rbp+var_24], 110h"], [98, "jle short loc_40F9B6"], [99, "jmp short loc_40FA1E"], [100, "add [rbp+var_24], 1"], [101, "add [rbp+s1], 1"], [102, "add [rbp+s2], 1"], [103, "mov rax, [rbp+s1]"], [104, "cmp rax, [rbp+var_48]"], [105, "jnb short loc_40FA1E"], [106, "mov rax, [rbp+s1]"], [107, "movzx edx, byte ptr [rax]"], [108, "mov rax, [rbp+s2]"], [109, "movzx eax, byte ptr [rax]"], [110, "cmp dl, al"], [111, "jnz short loc_40FA1E"], [112, "cmp [rbp+var_24], 110h"], [113, "jle short loc_40F9EB"], [114, "mov eax, [rbp+var_24]"], [115, "cmp eax, [rbp+var_C]"], [116, "jle short loc_40FA32"], [117, "mov eax, [rbp+var_24]"], [118, "mov [rbp+var_C], eax"], [119, "mov eax, [rbp+var_2C]"], [120, "mov [rbp+var_10], eax"], [121, "mov rax, [rbp+var_8]"], [122, "mov rax, [rax]"], [123, "mov [rbp+var_8], rax"], [124, "cmp [rbp+var_8], offset unk_429240"], [125, "jz short loc_40FA6F"], [126, "mov eax, [rbp+var_C]"], [127, "cmp eax, [rbp+var_5C]"], [128, "jge short loc_40FA82"], [129, "mov eax, [rbp+var_5C]"], [130, "imul eax, [rbp+arg_0]"], [131, "movsxd rdx, eax"], [132, "imul rdx, 51EB851Fh"], [133, "shr rdx, 20h"], [134, "sar edx, 5"], [135, "sar eax, 1Fh"], [136, "sub eax, edx"], [137, "add [rbp+var_5C], eax"], [138, "cmp [rbp+var_8], offset unk_429240"], [139, "jnz loc_40F942"], [140, "jmp short loc_40FA83"], [141, "nop"], [142, "jmp short loc_40FA83"], [143, "nop"], [144, "cmp [rbp+var_C], 2"], [145, "jle short loc_40FAA2"], [146, "mov rax, [rbp+var_50]"], [147, "mov edx, [rbp+var_C]"], [148, "mov [rax], edx"], [149, "mov rax, [rbp+var_58]"], [150, "mov edx, [rbp+var_10]"], [151, "mov [rax], edx"], [152, "mov eax, 1"], [153, "jmp short locret_40FAA7"], [154, "mov eax, 0"], [155, "leave"], [156, "retn"]], "data_dep": [[11, 5], [12, 4], [12, 11], [13, 12], [14, 13], [15, 4], [16, 15], [17, 16], [19, 4], [20, 19], [21, 20], [22, 21], [23, 22], [24, 4], [25, 24], [26, 25], [27, 26], [28, 27], [29, 28], [29, 23], [30, 4], [31, 30], [32, 31], [33, 32], [34, 33], [35, 34], [35, 29], [36, 4], [37, 36], [38, 37], [39, 38], [40, 35], [40, 39], [41, 40], [41, 17], [43, 41], [43, 35], [44, 3], [45, 43], [45, 44], [46, 45], [47, 46], [48, 47], [50, 48], [51, 50], [52, 51], [54, 4], [55, 54], [56, 123], [56, 52], [57, 56], [58, 57], [59, 55], [60, 59], [60, 58], [61, 60], [62, 61], [63, 62], [65, 118], [65, 9], [66, 65], [67, 118], [67, 9], [68, 67], [69, 58], [70, 55], [71, 69], [72, 70], [74, 73], [75, 74], [76, 118], [76, 9], [77, 76], [78, 118], [78, 9], [80, 78], [80, 55], [81, 9], [81, 118], [83, 58], [83, 81], [85, 77], [85, 85], [86, 80], [86, 86], [87, 83], [87, 87], [88, 86], [88, 80], [89, 88], [89, 5], [90, 89], [91, 80], [91, 86], [92, 91], [93, 83], [93, 87], [94, 93], [95, 92], [95, 94], [96, 95], [97, 85], [97, 77], [98, 97], [100, 64], [100, 100], [101, 101], [101, 55], [102, 102], [102, 58], [103, 101], [103, 55], [104, 103], [104, 5], [105, 104], [106, 101], [106, 55], [107, 106], [108, 102], [108, 58], [109, 108], [110, 109], [110, 107], [111, 110], [112, 100], [112, 64], [113, 112], [114, 85], [114, 64], [114, 100], [114, 77], [115, 9], [115, 114], [115, 118], [116, 115], [117, 85], [117, 64], [117, 100], [117, 77], [118, 117], [119, 61], [120, 119], [121, 123], [121, 52], [122, 121], [123, 122], [124, 123], [125, 124], [126, 9], [126, 118], [127, 8], [127, 126], [127, 137], [128, 127], [129, 137], [129, 8], [130, 129], [131, 130], [132, 131], [133, 132], [134, 133], [135, 130], [136, 135], [136, 134], [137, 137], [137, 8], [137, 136], [138, 123], [138, 52], [139, 138], [144, 118], [144, 9], [145, 144], [146, 6], [147, 9], [147, 118], [148, 147], [148, 146], [149, 7], [150, 120], [150, 10], [151, 150], [151, 149], [156, 154], [156, 152]]}
{"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/ce6238578c46b0be420ee05d5faa73253ad947408d8a965cba7aba12ccf1ef79_ce6238578c46b0be420ee05d5faa73253ad947408d8a965cba7aba12ccf1ef79.jsonl.gz", "strip_func_name": "sub_40F885", "query": "\n\n\n__int64 __fastcall sub_40F885(__int64 a1, char *a2, unsigned __int64 a3, int *a4, int *a5, int a6, int a7, int a8)\n{\nint v8; // eax\nint v14; // [rsp+34h] [rbp-2Ch]\nint v15; // [rsp+3Ch] [rbp-24h]\n_BYTE *s2; // [rsp+40h] [rbp-20h]\n_BYTE *s2a; // [rsp+40h] [rbp-20h]\nchar *s1; // [rsp+48h] [rbp-18h]\nchar *s1a; // [rsp+48h] [rbp-18h]\nint v20; // [rsp+50h] [rbp-10h]\nint v21; // [rsp+54h] [rbp-Ch]\n__int64 v22; // [rsp+58h] [rbp-8h]\n\nv21 = 0;\nv20 = 0;\nif ( (__int64)(a3 - (_QWORD)a2) > 3 )\nv8 = (4 * a2[2]) ^ (16 * a2[1]) ^ (*a2 << 6) ^ a2[3];\nelse\nv8 = *a2;\nv22 = 32LL * *(__int16 *)(2LL * (a8 & v8) + a1) + 4362816;\nwhile ( (_UNKNOWN *)v22 != &unk_429240 )\n{\ns1 = a2;\ns2 = *(_BYTE **)(v22 + 24);\nv14 = (_DWORD)a2 - (_DWORD)s2;\nif ( (int)a2 - (int)s2 > 4094 )\nbreak;\nv15 = 0;\nif ( v21 <= 15 )\n{\nwhile ( (unsigned __int64)s1 < a3 && *s1 == *s2 && v15 <= 272 )\n{\n++v15;\n++s1;\n++s2;\n}\n}\nelse if ( !memcmp(a2, s2, v21) )\n{\nv15 = v21;\ns1a = &a2[v21];\nfor ( s2a = &s2[v21]; (unsigned __int64)s1a < a3 && *s1a == *s2a && v15 <= 272; ++s2a )\n{\n++v15;\n++s1a;\n}\n}\nif ( v15 > v21 )\n{\nv21 = v15;\nv20 = v14;\n}\nv22 = *(_QWORD *)v22;\nif ( (_UNKNOWN *)v22 != &unk_429240 )\n{\nif ( v21 >= a6 )\nbreak;\na6 += a7 * a6 / -100;\n}\n}\nif ( v21 <= 2 )\nreturn 0LL;\n*a4 = v21;\n*a5 = v20;\nreturn 1LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,a7,a8,v14,v15,s2,s1,v20,v21,v22,sub_40F885,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'end', 'a4': 'lenp', 'a1': 'hstart', 'a2': 'input', 'a5': 'offp', 'a6': 'good_match', 'a7': 'good_drop', 'a8': 'mask', 'v14': 'thisoff', 'v15': 'thislen', 's2': 'hpa', 's1': 'ip_0a', 'v20': 'off', 'v21': 'len', 'v22': 'hent', 'sub_40F885': 'pglz_find_match'}"}
cpuidle_stop
5c0f1155af709b6b528476c4c9f907a23bec64f75fb8c8ada644ea1bd62ec637
google
ghost-kernel
NA
static int cpuidle_stop(void) { int cpu, state; struct timespec end_time; clock_gettime(CLOCK_REALTIME, &end_time); timediff = timespec_diff_us(start_time, end_time); for (cpu = 0; cpu < cpu_count; cpu++) { for (state = 0; state < cpuidle_sysfs_monitor.hw_states_num; state++) { current_count[cpu][state] = cpuidle_state_time(cpu, state); dprint("CPU %d - State: %d - Val: %llu\n", cpu, state, previous_count[cpu][state]); } } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407569", "function_addr": 4224361, "binary_name": "5c0f1155af709b6b528476c4c9f907a23bec64f75fb8c8ada644ea1bd62ec637.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 28h"], [4, "lea rax, [rbp+tp]"], [5, "mov rsi, rax"], [6, "mov edi, 0"], [7, "call _clock_gettime"], [8, "mov rax, [rbp+tp.tv_sec]"], [9, "mov rdx, [rbp+tp.tv_nsec]"], [10, "mov rdi, cs:stru_4157F0.tv_sec"], [11, "mov rsi, cs:stru_4157F0.tv_nsec"], [12, "mov rcx, rdx"], [13, "mov rdx, rax"], [14, "call sub_40890F"], [15, "mov cs:qword_415800, rax"], [16, "mov [rbp+var_14], 0"], [17, "jmp loc_40766C"], [18, "mov [rbp+var_18], 0"], [19, "jmp loc_407659"], [20, "mov edx, [rbp+var_18]"], [21, "mov eax, [rbp+var_14]"], [22, "mov rsi, cs:qword_4157E8"], [23, "mov ecx, [rbp+var_14]"], [24, "movsxd rcx, ecx"], [25, "shl rcx, 3"], [26, "add rcx, rsi"], [27, "mov rsi, [rcx]"], [28, "mov ecx, [rbp+var_18]"], [29, "movsxd rcx, ecx"], [30, "shl rcx, 3"], [31, "lea rbx, [rsi+rcx]"], [32, "mov esi, edx"], [33, "mov edi, eax"], [34, "call _cpuidle_state_time"], [35, "mov [rbx], rax"], [36, "mov eax, cs:dword_4159B8"], [37, "test eax, eax"], [38, "jz short loc_407655"], [39, "mov rdx, cs:qword_4157E0"], [40, "mov eax, [rbp+var_14]"], [41, "cdqe"], [42, "shl rax, 3"], [43, "add rax, rdx"], [44, "mov rdx, [rax]"], [45, "mov eax, [rbp+var_18]"], [46, "cdqe"], [47, "shl rax, 3"], [48, "add rax, rdx"], [49, "mov rsi, [rax]"], [50, "mov rax, cs:stderr"], [51, "mov ecx, [rbp+var_18]"], [52, "mov edx, [rbp+var_14]"], [53, "mov r9, rsi"], [54, "mov r8d, ecx"], [55, "mov ecx, edx"], [56, "mov edx, offset aCpuidleStop"], [57, "mov esi, offset aSCpuDStateDVal"], [58, "mov rdi, rax"], [59, "mov eax, 0"], [60, "call _fprintf"], [61, "add [rbp+var_18], 1"], [62, "mov eax, cs:dword_414B18"], [63, "cmp [rbp+var_18], eax"], [64, "jl loc_4075C3"], [65, "add [rbp+var_14], 1"], [66, "mov eax, cs:dword_415880"], [67, "cmp [rbp+var_14], eax"], [68, "jl loc_4075B7"], [69, "mov eax, 0"], [70, "mov rbx, [rbp+var_8]"], [71, "leave"], [72, "retn"]], "data_dep": [[5, 4], [12, 9], [13, 8], [15, 14], [20, 61], [20, 18], [21, 65], [21, 16], [23, 65], [23, 16], [24, 23], [25, 24], [26, 25], [26, 22], [27, 26], [27, 35], [28, 61], [28, 18], [29, 28], [30, 29], [31, 35], [31, 31], [31, 30], [32, 20], [33, 21], [35, 31], [35, 34], [37, 36], [38, 37], [40, 65], [40, 16], [42, 40], [43, 39], [43, 42], [44, 35], [44, 43], [45, 61], [45, 18], [47, 45], [48, 44], [48, 47], [49, 35], [49, 48], [51, 61], [51, 18], [52, 65], [52, 16], [53, 49], [54, 51], [55, 52], [58, 50], [61, 61], [61, 18], [63, 61], [63, 18], [63, 62], [64, 63], [65, 65], [65, 16], [67, 65], [67, 16], [67, 66], [68, 67], [72, 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/5c0f1155af709b6b528476c4c9f907a23bec64f75fb8c8ada644ea1bd62ec637_5c0f1155af709b6b528476c4c9f907a23bec64f75fb8c8ada644ea1bd62ec637.jsonl.gz", "strip_func_name": "sub_407569", "query": "\n\n\n__int64 sub_407569()\n{\n__int64 *v0; // rbx\nstruct timespec tp; // [rsp+0h] [rbp-30h] BYREF\nunsigned int j; // [rsp+18h] [rbp-18h]\nunsigned int i; // [rsp+1Ch] [rbp-14h]\n\nclock_gettime(0, &tp);\nqword_415800 = sub_40890F(stru_4157F0.tv_sec, stru_4157F0.tv_nsec, tp.tv_sec, tp.tv_nsec);\nfor ( i = 0; (int)i < dword_415880; ++i )\n{\nfor ( j = 0; (int)j < dword_414B18; ++j )\n{\nv0 = (__int64 *)(*((_QWORD *)qword_4157E8 + (int)i) + 8LL * (int)j);\n*v0 = cpuidle_state_time();\nif ( dword_4159B8 )\nfprintf(\nstderr,\n\"%s: CPU %d - State: %d - Val: %llu\\n\",\n\"cpuidle_stop\",\ni,\nj,\n*(_QWORD *)(*((_QWORD *)qword_4157E0 + (int)i) + 8LL * (int)j));\n}\n}\nreturn 0LL;\n}\n\n\n\nQ:[tp,j,i,sub_407569,sub_40890F,]\nAssistant: ", "hints": "[]", "response": "{'tp': 'end_time', 'j': 'state', 'i': 'cpu', 'sub_407569': 'cpuidle_stop', 'sub_40890F': 'timespec_diff_us'}"}
rvvm_set_reset_handler
e21ee1127331112975520015498a17d58c54789e99022cdbe64ddc7645b5d66c
LekKit
RVVM
NA
PUBLIC void rvvm_set_reset_handler(rvvm_machine_t* machine, rvvm_reset_handler_t handler, void* data) { machine->on_reset = handler; machine->reset_data = data; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40B7CE", "function_addr": 4241358, "binary_name": "e21ee1127331112975520015498a17d58c54789e99022cdbe64ddc7645b5d66c.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 rdx, [rbp+var_10]"], [7, "mov [rax+88h], rdx"], [8, "mov rax, [rbp+var_8]"], [9, "mov rdx, [rbp+var_18]"], [10, "mov [rax+90h], rdx"], [11, "nop"], [12, "pop rbp"], [13, "retn"]], "data_dep": [[5, 2], [6, 3], [7, 6], [7, 5], [8, 2], [9, 4], [10, 8], [10, 9], [12, 0], [13, 8]]}
{"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/e21ee1127331112975520015498a17d58c54789e99022cdbe64ddc7645b5d66c_e21ee1127331112975520015498a17d58c54789e99022cdbe64ddc7645b5d66c.jsonl.gz", "strip_func_name": "sub_40B7CE", "query": "\n\n\n__int64 __fastcall sub_40B7CE(__int64 a1, __int64 a2, __int64 a3)\n{\n__int64 result; // rax\n\n*(_QWORD *)(a1 + 136) = a2;\nresult = a1;\n*(_QWORD *)(a1 + 144) = a3;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_40B7CE,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'data', 'a1': 'machine', 'a2': 'handler', 'sub_40B7CE': 'rvvm_set_reset_handler'}"}
tmxr_activate_abs
b3a8b4769bdb267a1562d144bd5416f56584185a8ee940d909e9d5c1f4737051
open-simh
simh
NA
t_stat tmxr_activate_abs (UNIT *uptr, int32 interval) { AIO_VALIDATE(uptr); /* Can't call asynchronously */ sim_cancel (uptr); return tmxr_activate (uptr, interval); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_45A26E", "function_addr": 4563566, "binary_name": "b3a8b4769bdb267a1562d144bd5416f56584185a8ee940d909e9d5c1f4737051.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 18h"], [4, "mov [rbp+var_18], rdi"], [5, "mov [rbp+var_1C], esi"], [6, "mov rbx, cs:thread2"], [7, "call _pthread_self"], [8, "mov rsi, rbx"], [9, "mov rdi, rax"], [10, "call _pthread_equal"], [11, "test eax, eax"], [12, "jnz short loc_45A2C6"], [13, "mov rax, [rbp+var_18]"], [14, "mov rdi, rax"], [15, "call sub_41BDD9"], [16, "mov ecx, 12E5h"], [17, "mov edx, offset aSimTmxrC"], [18, "mov rsi, rax"], [19, "mov edi, offset aImproperThread_1"], [20, "mov eax, 0"], [21, "call sub_42C5F2"], [22, "call _abort"], [23, "mov rax, [rbp+var_18]"], [24, "mov rdi, rax"], [25, "call sub_4262CF"], [26, "mov edx, [rbp+var_1C]"], [27, "mov rax, [rbp+var_18]"], [28, "mov esi, edx"], [29, "mov rdi, rax"], [30, "call sub_45A13F"], [31, "mov rbx, [rbp+var_8]"], [32, "leave"], [33, "retn"]], "data_dep": [[8, 6], [9, 7], [11, 10], [12, 11], [13, 4], [14, 13], [18, 15], [23, 4], [24, 23], [26, 5], [27, 4], [28, 26], [29, 27], [33, 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/b3a8b4769bdb267a1562d144bd5416f56584185a8ee940d909e9d5c1f4737051_b3a8b4769bdb267a1562d144bd5416f56584185a8ee940d909e9d5c1f4737051.jsonl.gz", "strip_func_name": "sub_45A26E", "query": "\n\n\n__int64 __fastcall sub_45A26E(__int64 a1, unsigned int a2)\n{\npthread_t v2; // rbx\npthread_t v3; // rax\nconst char *v4; // rax\n__int64 v5; // r8\n__int64 v6; // r9\n\nv2 = thread2;\nv3 = pthread_self();\nif ( !pthread_equal(v3, v2) )\n{\nv4 = sub_41BDD9(a1);\nsub_42C5F2(\n\"Improper thread context for operation on %s in %s line %d\\n\",\n(__int64)v4,\n(__int64)\"./sim_tmxr.c\",\n4837LL,\nv5,\nv6);\nabort();\n}\nsub_4262CF(a1);\nreturn sub_45A13F(a1, a2);\n}\n\n\n\nQ:[a1,a2,sub_45A26E,sub_41BDD9,sub_42C5F2,sub_4262CF,sub_45A13F,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'uptr', 'a2': 'interval', 'sub_45A26E': 'tmxr_activate_abs', 'sub_41BDD9': 'sim_uname', 'sub_42C5F2': 'sim_printf', 'sub_4262CF': 'sim_cancel', 'sub_45A13F': 'tmxr_activate'}"}
dune_register_signal_handler
4836e25d0d8d212ac458303b3c5541c175eb052efa2695626d0769b11f2db450
ix-project
ix
NA
int dune_register_signal_handler(int signum, dune_intr_cb cb) { return dune_register_intr_handler(DUNE_SIGNAL_INTR_BASE + signum, cb); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_408E7C", "function_addr": 4230780, "binary_name": "4836e25d0d8d212ac458303b3c5541c175eb052efa2695626d0769b11f2db450.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 eax, [rbp+var_4]"], [6, "lea edx, [rax+0C8h]"], [7, "mov rax, [rbp+var_10]"], [8, "mov rsi, rax"], [9, "mov edi, edx"], [10, "call sub_408E43"], [11, "leave"], [12, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 4], [8, 7], [9, 6], [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/4836e25d0d8d212ac458303b3c5541c175eb052efa2695626d0769b11f2db450_4836e25d0d8d212ac458303b3c5541c175eb052efa2695626d0769b11f2db450.jsonl.gz", "strip_func_name": "sub_408E7C", "query": "\n\n\n__int64 __fastcall sub_408E7C(int a1, __int64 a2)\n{\nreturn sub_408E43(a1 + 200, a2);\n}\n\n\n\nQ:[a1,a2,sub_408E7C,sub_408E43,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'signum', 'a2': 'cb', 'sub_408E7C': 'dune_register_signal_handler', 'sub_408E43': 'dune_register_intr_handler'}"}
AcpiExSystemIoSpaceHandler
c8491ae03f8dc9e8695f46c8251e57f69f5ff7c0ed65d1286b5d5158829a78e3
bitdefender
napoca
NA
ACPI_STATUS AcpiExSystemIoSpaceHandler ( UINT32 Function, ACPI_PHYSICAL_ADDRESS Address, UINT32 BitWidth, UINT64 *Value, void *HandlerContext, void *RegionContext) { ACPI_STATUS Status = AE_OK; UINT32 Value32; ACPI_FUNCTION_TRACE (ExSystemIoSpaceHandler); ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "System-IO (width %u) R/W %u Address=%8.8X%8.8X\n", BitWidth, Function, ACPI_FORMAT_UINT64 (Address))); /* Decode the function parameter */ switch (Function) { case ACPI_READ: Status = AcpiHwReadPort ((ACPI_IO_ADDRESS) Address, &Value32, BitWidth); *Value = Value32; break; case ACPI_WRITE: Status = AcpiHwWritePort ((ACPI_IO_ADDRESS) Address, (UINT32) *Value, BitWidth); break; default: Status = AE_BAD_PARAMETER; break; } return_ACPI_STATUS (Status); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41B617", "function_addr": 4306455, "binary_name": "c8491ae03f8dc9e8695f46c8251e57f69f5ff7c0ed65d1286b5d5158829a78e3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 48h"], [4, "mov [rbp+var_24], edi"], [5, "mov [rbp+var_30], rsi"], [6, "mov [rbp+var_28], edx"], [7, "mov [rbp+var_38], rcx"], [8, "mov [rbp+var_40], r8"], [9, "mov [rbp+var_48], r9"], [10, "mov [rbp+var_14], 0"], [11, "mov ecx, 80h"], [12, "mov edx, offset aExregion"], [13, "mov esi, offset aAcpiexsystemio"], [14, "mov edi, 1BBh"], [15, "call sub_438445"], [16, "mov eax, cs:dword_45B874"], [17, "and eax, 4"], [18, "test eax, eax"], [19, "jz short loc_41B6B8"], [20, "mov eax, cs:dword_45B878"], [21, "and eax, 80h"], [22, "test eax, eax"], [23, "jz short loc_41B6B8"], [24, "mov rax, [rbp+var_30]"], [25, "mov edx, eax"], [26, "mov rax, [rbp+var_30]"], [27, "shr rax, 20h"], [28, "push rdx"], [29, "push rax"], [30, "mov eax, [rbp+var_24]"], [31, "push rax"], [32, "mov eax, [rbp+var_28]"], [33, "push rax"], [34, "mov r9d, offset aSystemIoWidthU"], [35, "mov r8d, 80h"], [36, "mov ecx, offset aExregion"], [37, "mov edx, offset aAcpiexsystemio"], [38, "mov esi, 1BEh"], [39, "mov edi, 4"], [40, "mov eax, 0"], [41, "call sub_43817B"], [42, "add rsp, 20h"], [43, "cmp [rbp+var_24], 0"], [44, "jz short loc_41B6C6"], [45, "cmp [rbp+var_24], 1"], [46, "jz short loc_41B6ED"], [47, "jmp short loc_41B70C"], [48, "mov edx, [rbp+var_28]"], [49, "lea rcx, [rbp+var_18]"], [50, "mov rax, [rbp+var_30]"], [51, "mov rsi, rcx"], [52, "mov rdi, rax"], [53, "call sub_4208C0"], [54, "mov [rbp+var_14], eax"], [55, "mov eax, [rbp+var_18]"], [56, "mov edx, eax"], [57, "mov rax, [rbp+var_38]"], [58, "mov [rax], rdx"], [59, "jmp short loc_41B714"], [60, "mov rax, [rbp+var_38]"], [61, "mov rax, [rax]"], [62, "mov ecx, eax"], [63, "mov edx, [rbp+var_28]"], [64, "mov rax, [rbp+var_30]"], [65, "mov esi, ecx"], [66, "mov rdi, rax"], [67, "call sub_4209B4"], [68, "mov [rbp+var_14], eax"], [69, "jmp short loc_41B714"], [70, "mov [rbp+var_14], 1001h"], [71, "nop"], [72, "mov ebx, [rbp+var_14]"], [73, "mov r8d, ebx"], [74, "mov ecx, 80h"], [75, "mov edx, offset aExregion"], [76, "mov esi, offset aAcpiexsystemio"], [77, "mov edi, 1D9h"], [78, "call sub_4386D7"], [79, "mov eax, ebx"], [80, "mov rbx, [rbp+var_8]"], [81, "leave"], [82, "retn"]], "data_dep": [[17, 16], [18, 17], [19, 18], [21, 20], [22, 21], [23, 22], [24, 5], [25, 24], [26, 5], [27, 26], [28, 25], [29, 27], [30, 4], [31, 30], [32, 6], [33, 32], [42, 3], [43, 4], [44, 43], [45, 4], [46, 45], [48, 6], [49, 36], [49, 11], [50, 5], [51, 49], [52, 50], [54, 53], [56, 55], [57, 7], [58, 56], [58, 57], [60, 7], [61, 60], [62, 61], [63, 6], [64, 5], [65, 62], [66, 64], [68, 67], [72, 54], [72, 68], [72, 70], [73, 72], [79, 72], [82, 79]]}
{"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/c8491ae03f8dc9e8695f46c8251e57f69f5ff7c0ed65d1286b5d5158829a78e3_c8491ae03f8dc9e8695f46c8251e57f69f5ff7c0ed65d1286b5d5158829a78e3.jsonl.gz", "strip_func_name": "sub_41B617", "query": "\n\n\n__int64 __fastcall sub_41B617(unsigned int a1, unsigned __int64 a2, unsigned int a3, _QWORD *a4)\n{\nunsigned int v4; // ebx\nunsigned int v8; // [rsp+38h] [rbp-18h] BYREF\nunsigned int v9; // [rsp+3Ch] [rbp-14h]\n\nv9 = 0;\nsub_438445(443LL, \"AcpiExSystemIoSpaceHandler\", \"exregion\", 128LL);\nif ( (dword_45B874 & 4) != 0 && (dword_45B878 & 0x80) != 0 )\nsub_43817B(\n4,\n446,\n(unsigned int)\"AcpiExSystemIoSpaceHandler\",\n(unsigned int)\"exregion\",\n128,\n(unsigned int)\"System-IO (width %u) R/W %u Address=%8.8X%8.8X\\n\",\na3,\na1,\nHIDWORD(a2),\n(unsigned int)a2);\nif ( a1 )\n{\nif ( a1 == 1 )\nv9 = sub_4209B4(a2, (unsigned int)*a4, a3);\nelse\nv9 = 4097;\n}\nelse\n{\nv9 = sub_4208C0(a2, &v8, a3);\n*a4 = v8;\n}\nv4 = v9;\nsub_4386D7(473LL, \"AcpiExSystemIoSpaceHandler\", \"exregion\", 128LL, v9);\nreturn v4;\n}\n\n\n\nQ:[a3,a4,a1,a2,v8,v9,sub_41B617,sub_438445,sub_43817B,sub_4209B4,sub_4208C0,sub_4386D7,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'BitWidth', 'a4': 'Value', 'a1': 'Function', 'a2': 'Address', 'v8': 'Value32', 'v9': 'Status', 'sub_41B617': 'AcpiExSystemIoSpaceHandler', 'sub_438445': 'AcpiUtTrace', 'sub_43817B': 'AcpiDebugPrint', 'sub_4209B4': 'AcpiHwWritePort', 'sub_4208C0': 'AcpiHwReadPort', 'sub_4386D7': 'AcpiUtStatusExit'}"}
att_read_callback_handle_little_endian_32
0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26
Matheus-Garbelini
esp32_bluetooth_classic_sniffer
NA
uint16_t att_read_callback_handle_little_endian_32(uint32_t value, uint16_t offset, uint8_t * buffer, uint16_t buffer_size){ uint8_t value_buffer[4]; little_endian_store_32(value_buffer, 0, value); return att_read_callback_handle_blob(value_buffer, sizeof(value_buffer), offset, buffer, buffer_size); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_423EE6", "function_addr": 4341478, "binary_name": "0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_14], edi"], [4, "mov [rbp+var_20], rdx"], [5, "mov eax, ecx"], [6, "mov edx, esi"], [7, "mov [rbp+var_18], dx"], [8, "mov [rbp+var_24], ax"], [9, "mov edx, [rbp+var_14]"], [10, "lea rax, [rbp+var_4]"], [11, "mov esi, 0"], [12, "mov rdi, rax"], [13, "call sub_4069D8"], [14, "movzx esi, [rbp+var_24]"], [15, "movzx edx, [rbp+var_18]"], [16, "mov rcx, [rbp+var_20]"], [17, "lea rax, [rbp+var_4]"], [18, "mov r8d, esi"], [19, "mov esi, 4"], [20, "mov rdi, rax"], [21, "call sub_423E45"], [22, "leave"], [23, "retn"]], "data_dep": [[7, 6], [8, 5], [9, 3], [10, 5], [12, 10], [14, 8], [15, 7], [16, 4], [17, 13], [18, 14], [20, 17], [23, 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/0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26_0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26.jsonl.gz", "strip_func_name": "sub_423EE6", "query": "\n\n\n__int64 __fastcall sub_423EE6(int a1, unsigned __int16 a2, void *a3, unsigned __int16 a4)\n{\nchar v7[4]; // [rsp+2Ch] [rbp-4h] BYREF\n\nsub_4069D8((__int64)v7, 0, a1);\nreturn sub_423E45((__int64)v7, 4u, a2, a3, a4);\n}\n\n\n\nQ:[a3,a4,a1,a2,v7,sub_423EE6,sub_4069D8,sub_423E45,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'buffer', 'a4': 'buffer_size', 'a1': 'value', 'a2': 'offset', 'v7': 'value_buffer', 'sub_423EE6': 'att_read_callback_handle_little_endian_32', 'sub_4069D8': 'little_endian_store_32', 'sub_423E45': 'att_read_callback_handle_blob'}"}
xml_builder_dump_on_comment
99d13ec00e54e7d9103eebaaf0ff51441bb1651a7d6eabba90a394adc073162f
xianjimli
sysprog-code
NA
static void xml_builder_dump_on_comment(XmlBuilder* thiz, const char* text, size_t length) { PrivInfo* priv = (PrivInfo*)thiz->priv; fprintf(priv->fp, "<!--"); fwrite(text, length, 1, priv->fp); fprintf(priv->fp, "-->\n"); return; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4022A7", "function_addr": 4203175, "binary_name": "99d13ec00e54e7d9103eebaaf0ff51441bb1651a7d6eabba90a394adc073162f.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+ptr], rsi"], [5, "mov [rbp+size], rdx"], [6, "mov rax, [rbp+var_18]"], [7, "add rax, 38h "], [8, "mov [rbp+var_8], rax"], [9, "mov rax, [rbp+var_8]"], [10, "mov rax, [rax]"], [11, "mov rcx, rax"], [12, "mov edx, 4"], [13, "mov esi, 1"], [14, "mov edi, offset asc_404238"], [15, "call _fwrite"], [16, "mov rax, [rbp+var_8]"], [17, "mov rdx, [rax]"], [18, "mov rsi, [rbp+size]"], [19, "mov rax, [rbp+ptr]"], [20, "mov rcx, rdx"], [21, "mov edx, 1"], [22, "mov rdi, rax"], [23, "call _fwrite"], [24, "mov rax, [rbp+var_8]"], [25, "mov rax, [rax]"], [26, "mov rcx, rax"], [27, "mov edx, 4"], [28, "mov esi, 1"], [29, "mov edi, offset asc_40423D"], [30, "call _fwrite"], [31, "nop"], [32, "leave"], [33, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [9, 8], [10, 9], [11, 10], [16, 8], [17, 16], [18, 5], [19, 4], [20, 17], [22, 19], [24, 8], [25, 24], [26, 25], [33, 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/99d13ec00e54e7d9103eebaaf0ff51441bb1651a7d6eabba90a394adc073162f_99d13ec00e54e7d9103eebaaf0ff51441bb1651a7d6eabba90a394adc073162f.jsonl.gz", "strip_func_name": "sub_4022A7", "query": "\n\n\nsize_t __fastcall sub_4022A7(__int64 a1, const void *a2, size_t a3)\n{\nfwrite(\"<!--\", 1uLL, 4uLL, *(FILE **)(a1 + 56));\nfwrite(a2, a3, 1uLL, *(FILE **)(a1 + 56));\nreturn fwrite(\"-->\\n\", 1uLL, 4uLL, *(FILE **)(a1 + 56));\n}\n\n\n\nQ:[a3,a1,a2,sub_4022A7,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'length', 'a1': 'thiz', 'a2': 'text', 'sub_4022A7': 'xml_builder_dump_on_comment'}"}
cmdexchange
562e844c24ca39e63c126362ca0304809b43de4c3d5f7eac328347db72ee60e1
deadpixi
sam
NA
static int64_t cmdexchange(Flayer *l, int64_t a, Text *t, const char *arg) { int w = getlayer(l, t); if (w >= 0){ snarf(t, w); outT0(Tstartsnarf); setlock(); } return a; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405CB0", "function_addr": 4218032, "binary_name": "562e844c24ca39e63c126362ca0304809b43de4c3d5f7eac328347db72ee60e1.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 [rbp+var_30], rcx"], [7, "mov rdx, [rbp+var_28]"], [8, "mov rax, [rbp+var_18]"], [9, "mov rsi, rdx"], [10, "mov rdi, rax"], [11, "call sub_405C56"], [12, "mov [rbp+var_4], eax"], [13, "cmp [rbp+var_4], 0"], [14, "js short loc_405D04"], [15, "mov edx, [rbp+var_4]"], [16, "mov rax, [rbp+var_28]"], [17, "mov esi, edx"], [18, "mov rdi, rax"], [19, "call sub_404537"], [20, "mov edi, 12h"], [21, "call sub_409DEC"], [22, "call sub_409C03"], [23, "mov rax, [rbp+var_20]"], [24, "leave"], [25, "retn"]], "data_dep": [[7, 5], [8, 3], [9, 7], [10, 8], [12, 11], [13, 12], [14, 13], [15, 12], [16, 5], [17, 15], [18, 16], [23, 4], [25, 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/562e844c24ca39e63c126362ca0304809b43de4c3d5f7eac328347db72ee60e1_562e844c24ca39e63c126362ca0304809b43de4c3d5f7eac328347db72ee60e1.jsonl.gz", "strip_func_name": "sub_405CB0", "query": "\n\n\n__int64 __fastcall sub_405CB0(__int64 a1, __int64 a2, __int64 a3)\n{\nint v5; // [rsp+2Ch] [rbp-4h]\n\nv5 = sub_405C56(a1, a3);\nif ( v5 >= 0 )\n{\nsub_404537(a3, v5);\nsub_409DEC(18LL);\nsub_409C03(18LL, (unsigned int)v5);\n}\nreturn a2;\n}\n\n\n\nQ:[a3,a1,a2,v5,sub_405CB0,sub_405C56,sub_404537,sub_409DEC,sub_409C03,]\nAssistant: ", "hints": "[]", "response": "{'a3': 't', 'a1': 'l', 'a2': 'a', 'v5': 'w', 'sub_405CB0': 'cmdexchange', 'sub_405C56': 'getlayer', 'sub_404537': 'snarf', 'sub_409DEC': 'outT0', 'sub_409C03': 'setlock'}"}
graph_indent
5c2a369c2a43bfe06e48866e92fbdc8c356c46190477983799d2e15f105ed3e0
multipath-tcp
iproute-mptcp
NA
static void graph_indent(char *buf, struct graph_node *node, int is_newline, int add_spaces) { char spaces[100] = {0}; while (node && node->parent_node) { node->parent_node->right_node = node; node = node->parent_node; } while (node && node->right_node) { if (node->hlist.next) strcat(buf, "| "); else strcat(buf, " "); node = node->right_node; } if (is_newline) { if (node->hlist.next && node->nodes_count) strcat(buf, "| |"); else if (node->hlist.next) strcat(buf, "| "); else if (node->nodes_count) strcat(buf, " |"); else if (!node->hlist.next) strcat(buf, " "); } if (add_spaces > 0) { sprintf(spaces, "%-*s", add_spaces, ""); strcat(buf, spaces); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40DB91", "function_addr": 4250513, "binary_name": "5c2a369c2a43bfe06e48866e92fbdc8c356c46190477983799d2e15f105ed3e0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 90h"], [3, "mov [rbp+s], rdi"], [4, "mov [rbp+var_80], rsi"], [5, "mov [rbp+var_84], edx"], [6, "mov [rbp+var_88], ecx"], [7, "mov qword ptr [rbp+src], 0"], [8, "mov [rbp+var_68], 0"], [9, "mov [rbp+var_60], 0"], [10, "mov [rbp+var_58], 0"], [11, "mov [rbp+var_50], 0"], [12, "mov [rbp+var_48], 0"], [13, "mov [rbp+var_40], 0"], [14, "mov [rbp+var_38], 0"], [15, "mov [rbp+var_30], 0"], [16, "mov [rbp+var_28], 0"], [17, "mov [rbp+var_20], 0"], [18, "mov [rbp+var_18], 0"], [19, "mov [rbp+var_10], 0"], [20, "jmp short loc_40DC35"], [21, "mov rax, [rbp+var_80]"], [22, "mov rax, [rax+18h]"], [23, "mov rdx, [rbp+var_80]"], [24, "mov [rax+20h], rdx"], [25, "mov rax, [rbp+var_80]"], [26, "mov rax, [rax+18h]"], [27, "mov [rbp+var_80], rax"], [28, "cmp [rbp+var_80], 0"], [29, "jz short loc_40DCA9"], [30, "mov rax, [rbp+var_80]"], [31, "mov rax, [rax+18h]"], [32, "test rax, rax"], [33, "jnz short loc_40DC19"], [34, "jmp short loc_40DCA9"], [35, "mov rax, [rbp+var_80]"], [36, "mov rax, [rax]"], [37, "test rax, rax"], [38, "jz short loc_40DC7B"], [39, "mov rax, [rbp+s]"], [40, "mov rdi, rax"], [41, "call _strlen"], [42, "mov rdx, rax"], [43, "mov rax, [rbp+s]"], [44, "add rax, rdx"], [45, "mov dword ptr [rax], 2020207Ch"], [46, "mov word ptr [rax+4], 20h "], [47, "jmp short loc_40DC9D"], [48, "mov rax, [rbp+s]"], [49, "mov rdi, rax"], [50, "call _strlen"], [51, "mov rdx, rax"], [52, "mov rax, [rbp+s]"], [53, "add rax, rdx"], [54, "mov dword ptr [rax], 20202020h"], [55, "mov word ptr [rax+4], 20h "], [56, "mov rax, [rbp+var_80]"], [57, "mov rax, [rax+20h]"], [58, "mov [rbp+var_80], rax"], [59, "cmp [rbp+var_80], 0"], [60, "jz short loc_40DCBD"], [61, "mov rax, [rbp+var_80]"], [62, "mov rax, [rax+20h]"], [63, "test rax, rax"], [64, "jnz short loc_40DC4B"], [65, "cmp [rbp+var_84], 0"], [66, "jz loc_40DDA5"], [67, "mov rax, [rbp+var_80]"], [68, "mov rax, [rax]"], [69, "test rax, rax"], [70, "jz short loc_40DD0C"], [71, "mov rax, [rbp+var_80]"], [72, "mov eax, [rax+34h]"], [73, "test eax, eax"], [74, "jz short loc_40DD0C"], [75, "mov rax, [rbp+s]"], [76, "mov rdi, rax"], [77, "call _strlen"], [78, "mov rdx, rax"], [79, "mov rax, [rbp+s]"], [80, "add rax, rdx"], [81, "mov dword ptr [rax], 2020207Ch"], [82, "mov word ptr [rax+4], 7C20h"], [83, "mov byte ptr [rax+6], 0"], [84, "jmp loc_40DDA5"], [85, "mov rax, [rbp+var_80]"], [86, "mov rax, [rax]"], [87, "test rax, rax"], [88, "jz short loc_40DD40"], [89, "mov rax, [rbp+s]"], [90, "mov rdi, rax"], [91, "call _strlen"], [92, "mov rdx, rax"], [93, "mov rax, [rbp+s]"], [94, "add rax, rdx"], [95, "mov dword ptr [rax], 2020207Ch"], [96, "mov word ptr [rax+4], 2020h"], [97, "mov byte ptr [rax+6], 0"], [98, "jmp short loc_40DDA5"], [99, "mov rax, [rbp+var_80]"], [100, "mov eax, [rax+34h]"], [101, "test eax, eax"], [102, "jz short loc_40DD73"], [103, "mov rax, [rbp+s]"], [104, "mov rdi, rax"], [105, "call _strlen"], [106, "mov rdx, rax"], [107, "mov rax, [rbp+s]"], [108, "add rax, rdx"], [109, "mov dword ptr [rax], 20202020h"], [110, "mov word ptr [rax+4], 7C20h"], [111, "mov byte ptr [rax+6], 0"], [112, "jmp short loc_40DDA5"], [113, "mov rax, [rbp+var_80]"], [114, "mov rax, [rax]"], [115, "test rax, rax"], [116, "jnz short loc_40DDA5"], [117, "mov rax, [rbp+s]"], [118, "mov rdi, rax"], [119, "call _strlen"], [120, "mov rdx, rax"], [121, "mov rax, [rbp+s]"], [122, "add rax, rdx"], [123, "mov dword ptr [rax], 20202020h"], [124, "mov word ptr [rax+4], 2020h"], [125, "mov byte ptr [rax+6], 0"], [126, "cmp [rbp+var_88], 0"], [127, "jle short loc_40DDE2"], [128, "mov edx, [rbp+var_88]"], [129, "lea rax, [rbp+src]"], [130, "mov ecx, offset unk_476D0C"], [131, "mov esi, offset aS_11"], [132, "mov rdi, rax"], [133, "mov eax, 0"], [134, "call _sprintf"], [135, "lea rdx, [rbp+src]"], [136, "mov rax, [rbp+s]"], [137, "mov rsi, rdx"], [138, "mov rdi, rax"], [139, "call _strcat"], [140, "nop"], [141, "leave"], [142, "retn"]], "data_dep": [[21, 4], [21, 27], [22, 21], [22, 24], [23, 4], [23, 27], [24, 23], [24, 22], [25, 27], [25, 4], [26, 25], [26, 24], [27, 26], [28, 4], [28, 27], [29, 28], [30, 4], [30, 27], [31, 24], [31, 30], [32, 31], [33, 32], [35, 4], [35, 27], [35, 58], [36, 46], [36, 55], [36, 45], [36, 54], [36, 24], [36, 35], [37, 36], [38, 37], [39, 3], [40, 39], [42, 41], [43, 3], [44, 42], [44, 43], [45, 44], [46, 44], [48, 3], [49, 48], [51, 50], [52, 3], [53, 52], [53, 51], [54, 53], [55, 53], [56, 4], [56, 27], [56, 58], [57, 45], [57, 54], [57, 56], [57, 24], [57, 46], [57, 55], [58, 57], [59, 4], [59, 27], [59, 58], [60, 59], [61, 27], [61, 58], [61, 4], [62, 46], [62, 55], [62, 61], [62, 45], [62, 54], [62, 24], [63, 62], [64, 63], [65, 5], [66, 65], [67, 4], [67, 27], [67, 58], [68, 45], [68, 54], [68, 24], [68, 46], [68, 67], [68, 55], [69, 68], [70, 69], [71, 58], [71, 4], [71, 27], [72, 45], [72, 54], [72, 24], [72, 46], [72, 55], [72, 71], [73, 72], [74, 73], [75, 3], [76, 75], [78, 77], [79, 3], [80, 78], [80, 79], [81, 80], [82, 80], [83, 80], [85, 27], [85, 4], [85, 58], [86, 24], [86, 46], [86, 85], [86, 55], [86, 45], [86, 54], [87, 86], [88, 87], [89, 3], [90, 89], [92, 91], [93, 3], [94, 93], [94, 92], [95, 94], [96, 94], [97, 94], [99, 58], [99, 27], [99, 4], [100, 46], [100, 55], [100, 45], [100, 54], [100, 24], [100, 99], [101, 100], [102, 101], [103, 3], [104, 103], [106, 105], [107, 3], [108, 107], [108, 106], [109, 108], [110, 108], [111, 108], [113, 27], [113, 4], [113, 58], [114, 24], [114, 45], [114, 54], [114, 113], [114, 46], [114, 55], [115, 114], [116, 115], [117, 3], [118, 117], [120, 119], [121, 3], [122, 121], [122, 120], [123, 122], [124, 122], [125, 122], [126, 6], [127, 126], [128, 6], [129, 57], [129, 63], [129, 122], [129, 115], [129, 26], [129, 108], [129, 94], [129, 32], [129, 7], [129, 80], [132, 129], [135, 7], [135, 128], [136, 3], [137, 135], [138, 136], [142, 80], [142, 57], [142, 139], [142, 63], [142, 122], [142, 115], [142, 26], [142, 108], [142, 94], [142, 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/5c2a369c2a43bfe06e48866e92fbdc8c356c46190477983799d2e15f105ed3e0_5c2a369c2a43bfe06e48866e92fbdc8c356c46190477983799d2e15f105ed3e0.jsonl.gz", "strip_func_name": "sub_40DB91", "query": "\n\n\nvoid __fastcall sub_40DB91(char *a1, __int64 a2, int a3, int a4)\n{\nchar src[8]; // [rsp+20h] [rbp-70h] BYREF\n__int64 v8; // [rsp+28h] [rbp-68h]\n__int64 v9; // [rsp+30h] [rbp-60h]\n__int64 v10; // [rsp+38h] [rbp-58h]\n__int64 v11; // [rsp+40h] [rbp-50h]\n__int64 v12; // [rsp+48h] [rbp-48h]\n__int64 v13; // [rsp+50h] [rbp-40h]\n__int64 v14; // [rsp+58h] [rbp-38h]\n__int64 v15; // [rsp+60h] [rbp-30h]\n__int64 v16; // [rsp+68h] [rbp-28h]\n__int64 v17; // [rsp+70h] [rbp-20h]\n__int64 v18; // [rsp+78h] [rbp-18h]\nint v19; // [rsp+80h] [rbp-10h]\n\n*(_QWORD *)src = 0LL;\nv8 = 0LL;\nv9 = 0LL;\nv10 = 0LL;\nv11 = 0LL;\nv12 = 0LL;\nv13 = 0LL;\nv14 = 0LL;\nv15 = 0LL;\nv16 = 0LL;\nv17 = 0LL;\nv18 = 0LL;\nv19 = 0;\nwhile ( a2 && *(_QWORD *)(a2 + 24) )\n{\n*(_QWORD *)(*(_QWORD *)(a2 + 24) + 32LL) = a2;\na2 = *(_QWORD *)(a2 + 24);\n}\nwhile ( a2 && *(_QWORD *)(a2 + 32) )\n{\nif ( *(_QWORD *)a2 )\nstrcpy(&a1[strlen(a1)], \"| \");\nelse\nstrcpy(&a1[strlen(a1)], \" \");\na2 = *(_QWORD *)(a2 + 32);\n}\nif ( a3 )\n{\nif ( *(_QWORD *)a2 && *(_DWORD *)(a2 + 52) )\n{\nstrcpy(&a1[strlen(a1)], \"| |\");\n}\nelse if ( *(_QWORD *)a2 )\n{\nstrcpy(&a1[strlen(a1)], \"| \");\n}\nelse if ( *(_DWORD *)(a2 + 52) )\n{\nstrcpy(&a1[strlen(a1)], \" |\");\n}\nelse if ( !*(_QWORD *)a2 )\n{\nstrcpy(&a1[strlen(a1)], \" \");\n}\n}\nif ( a4 > 0 )\n{\nsprintf(src, \"%-*s\", a4, (const char *)&unk_476D0C);\nstrcat(a1, src);\n}\n}\n\n\n\nQ:[a3,a4,a1,a2,src,sub_40DB91,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'is_newline', 'a4': 'add_spaces', 'a1': 'buf', 'a2': 'node', 'src': 'spaces', 'sub_40DB91': 'graph_indent'}"}
testDoublesNotEqualNaNInf
46f2098509954f9b46a13d7d65487eeec0d3b9bfe0bee64bfb7700b5b7a10d06
aws-samples
connected-drink-dispenser-workshop
NA
void testDoublesNotEqualNaNInf(void) { #ifdef UNITY_EXCLUDE_DOUBLE TEST_IGNORE(); #else EXPECT_ABORT_BEGIN TEST_ASSERT_EQUAL_DOUBLE(0.0 / d_zero, 1.0 / d_zero); VERIFY_FAILS_END #endif }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4410BA", "function_addr": 4460730, "binary_name": "46f2098509954f9b46a13d7d65487eeec0d3b9bfe0bee64bfb7700b5b7a10d06.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov rax, cs:qword_46ED40"], [3, "add rax, 1"], [4, "mov cs:qword_46ED40, rax"], [5, "call sub_437A0C"], [6, "mov rax, cs:qword_46ED48"], [7, "add rax, 1"], [8, "mov cs:qword_46ED48, rax"], [9, "mov edi, offset env"], [10, "call __setjmp"], [11, "mov rdx, cs:qword_46ED50"], [12, "add rdx, 1"], [13, "mov cs:qword_46ED50, rdx"], [14, "test eax, eax"], [15, "jnz loc_441190"], [16, "mov rax, cs:qword_46ED58"], [17, "add rax, 1"], [18, "mov cs:qword_46ED58, rax"], [19, "pxor xmm1, xmm1"], [20, "movsd xmm0, cs:qword_450B20"], [21, "movapd xmm4, xmm0"], [22, "divsd xmm4, xmm1"], [23, "pxor xmm1, xmm1"], [24, "pxor xmm0, xmm0"], [25, "movapd xmm3, xmm0"], [26, "divsd xmm3, xmm1"], [27, "pxor xmm2, xmm2"], [28, "pxor xmm0, xmm0"], [29, "movapd xmm1, xmm0"], [30, "divsd xmm1, xmm2"], [31, "movsd xmm0, cs:qword_450C00"], [32, "mulsd xmm1, xmm0"], [33, "movq rax, xmm1"], [34, "mov esi, 1BF3h"], [35, "mov edi, 0"], [36, "movapd xmm2, xmm4"], [37, "movapd xmm1, xmm3"], [38, "movq xmm0, rax"], [39, "call sub_404816"], [40, "mov rax, cs:qword_46ED60"], [41, "add rax, 1"], [42, "mov cs:qword_46ED60, rax"], [43, "call sub_437A39"], [44, "mov rax, cs:qword_46ED68"], [45, "add rax, 1"], [46, "mov cs:qword_46ED68, rax"], [47, "mov rax, cs:qword_46C120"], [48, "cmp rax, 1"], [49, "setnz al"], [50, "movzx eax, al"], [51, "mov cs:qword_46C120, rax"], [52, "mov rax, cs:qword_46C120"], [53, "cmp rax, 1"], [54, "jnz loc_441282"], [55, "mov rax, cs:qword_46ED70"], [56, "add rax, 1"], [57, "mov cs:qword_46ED70, rax"], [58, "mov cs:dword_46D624, 1"], [59, "mov rax, cs:qword_46C100"], [60, "mov rdi, rax"], [61, "call sub_4018BD"], [62, "mov rax, cs:qword_46ED78"], [63, "add rax, 1"], [64, "mov cs:qword_46ED78, rax"], [65, "mov edi, 3Ah "], [66, "call sub_437A88"], [67, "mov rax, cs:qword_46ED80"], [68, "add rax, 1"], [69, "mov cs:qword_46ED80, rax"], [70, "mov rax, cs:qword_46C0E8"], [71, "mov rdi, rax"], [72, "call sub_4014A8"], [73, "mov rax, cs:qword_46ED88"], [74, "add rax, 1"], [75, "mov cs:qword_46ED88, rax"], [76, "mov edi, offset aFailTestShould"], [77, "call sub_4014A8"], [78, "mov rax, cs:qword_46ED90"], [79, "add rax, 1"], [80, "mov cs:qword_46ED90, rax"], [81, "mov edi, 0Ah"], [82, "call sub_437A88"], [83, "mov rax, cs:qword_46ED98"], [84, "add rax, 1"], [85, "mov cs:qword_46ED98, rax"], [86, "nop"], [87, "pop rbp"], [88, "retn"]], "data_dep": [[3, 2], [4, 3], [7, 6], [8, 7], [12, 11], [13, 12], [14, 10], [15, 14], [17, 16], [18, 17], [21, 20], [22, 19], [22, 21], [25, 24], [26, 23], [26, 25], [29, 28], [30, 27], [30, 29], [32, 31], [32, 30], [33, 32], [36, 22], [37, 26], [38, 33], [41, 40], [42, 41], [45, 44], [46, 45], [48, 47], [49, 47], [49, 48], [50, 49], [51, 50], [52, 51], [53, 52], [54, 53], [56, 55], [57, 56], [60, 59], [63, 62], [64, 63], [68, 67], [69, 68], [71, 70], [74, 73], [75, 74], [79, 78], [80, 79], [84, 83], [85, 84], [87, 0], [88, 84], [88, 52]]}
{"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/46f2098509954f9b46a13d7d65487eeec0d3b9bfe0bee64bfb7700b5b7a10d06_46f2098509954f9b46a13d7d65487eeec0d3b9bfe0bee64bfb7700b5b7a10d06.jsonl.gz", "strip_func_name": "sub_4410BA", "query": "\n\n\n__int64 sub_4410BA()\n{\nint v0; // eax\n__int64 result; // rax\n\n++qword_46ED40;\nsub_437A0C();\n++qword_46ED48;\nv0 = _setjmp(env);\n++qword_46ED50;\nif ( !v0 )\n{\n++qword_46ED58;\nsub_404816(0LL, 7155LL, 0.0 / 0.0 * 1.0e-12, 0.0 / 0.0, 1.0 / 0.0);\n++qword_46ED60;\n}\nsub_437A39();\n++qword_46ED68;\nqword_46C120 = qword_46C120 != 1;\nresult = qword_46C120;\nif ( qword_46C120 == 1 )\n{\n++qword_46ED70;\ndword_46D624 = 1;\nsub_4018BD(qword_46C100);\n++qword_46ED78;\nsub_437A88(58);\n++qword_46ED80;\nsub_4014A8((char *)qword_46C0E8);\n++qword_46ED88;\nsub_4014A8(\":FAIL: [[[[ Test Should Have Failed But Did Not ]]]]\");\n++qword_46ED90;\nsub_437A88(10);\nresult = ++qword_46ED98;\n}\nreturn result;\n}\n\n\n\nQ:[sub_4410BA,sub_437A0C,sub_404816,sub_437A39,sub_4018BD,sub_437A88,sub_4014A8,]\nAssistant: ", "hints": "[]", "response": "{'sub_4410BA': 'testDoublesNotEqualNaNInf', 'sub_437A0C': 'startPutcharSpy', 'sub_404816': 'UnityAssertDoublesWithin', 'sub_437A39': 'endPutcharSpy', 'sub_4018BD': 'UnityPrintNumberUnsigned', 'sub_437A88': 'putcharSpy', 'sub_4014A8': 'UnityPrint'}"}
hci_handle_remote_features_received
1ad2950b740aefe99d7642592eec74f4658f7325067c041bb6e985f6d25ec586
bluekitchen
btstack
NA
static void hci_handle_remote_features_received(hci_connection_t * conn){ conn->bonding_flags &= ~BONDING_REMOTE_FEATURES_QUERY_ACTIVE; conn->bonding_flags |= BONDING_RECEIVED_REMOTE_FEATURES; log_info("Remote features %02x, bonding flags %" PRIx32, conn->remote_supported_features[0], conn->bonding_flags); if (conn->bonding_flags & BONDING_DEDICATED){ conn->bonding_flags |= BONDING_SEND_AUTHENTICATE_REQUEST; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4133AA", "function_addr": 4273066, "binary_name": "1ad2950b740aefe99d7642592eec74f4658f7325067c041bb6e985f6d25ec586.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 eax, [rax+1Ch]"], [6, "and eax, 0FFFFFFFEh"], [7, "mov edx, eax"], [8, "mov rax, [rbp+var_8]"], [9, "mov [rax+1Ch], edx"], [10, "mov rax, [rbp+var_8]"], [11, "mov eax, [rax+1Ch]"], [12, "or eax, 10h"], [13, "mov edx, eax"], [14, "mov rax, [rbp+var_8]"], [15, "mov [rax+1Ch], edx"], [16, "mov rax, [rbp+var_8]"], [17, "mov edx, [rax+1Ch]"], [18, "mov rax, [rbp+var_8]"], [19, "movzx eax, byte ptr [rax+3Eh]"], [20, "movzx eax, al"], [21, "mov r9d, edx"], [22, "mov r8d, eax"], [23, "mov ecx, 0A0Ah"], [24, "mov edx, offset aHciC"], [25, "mov esi, offset aSURemoteFeatur"], [26, "mov edi, 1"], [27, "mov eax, 0"], [28, "call sub_41DE87"], [29, "mov rax, [rbp+var_8]"], [30, "mov eax, [rax+1Ch]"], [31, "and eax, 8000h"], [32, "test eax, eax"], [33, "jz short loc_413435"], [34, "mov rax, [rbp+var_8]"], [35, "mov eax, [rax+1Ch]"], [36, "or ah, 8"], [37, "mov edx, eax"], [38, "mov rax, [rbp+var_8]"], [39, "mov [rax+1Ch], edx"], [40, "nop"], [41, "leave"], [42, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 3], [9, 8], [9, 7], [10, 3], [11, 10], [11, 9], [12, 11], [13, 12], [14, 3], [15, 14], [15, 13], [16, 3], [17, 15], [17, 16], [18, 3], [19, 18], [19, 15], [20, 19], [21, 17], [22, 20], [29, 3], [30, 15], [30, 29], [31, 30], [32, 31], [33, 32], [34, 3], [35, 39], [35, 34], [35, 9], [35, 15], [36, 35], [37, 36], [38, 3], [39, 38], [39, 37], [42, 32], [42, 38]]}
{"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/1ad2950b740aefe99d7642592eec74f4658f7325067c041bb6e985f6d25ec586_1ad2950b740aefe99d7642592eec74f4658f7325067c041bb6e985f6d25ec586.jsonl.gz", "strip_func_name": "sub_4133AA", "query": "\n\n\n__int64 __fastcall sub_4133AA(__int64 a1)\n{\n__int64 result; // rax\nint v2; // eax\nint v3; // edx\n\n*(_DWORD *)(a1 + 28) &= 0xFFFFFFFE;\n*(_DWORD *)(a1 + 28) |= 0x10u;\nsub_41DE87(\n1,\n(unsigned int)\"%s.%u: Remote features %02x, bonding flags %x\",\n(unsigned int)\"hci.c\",\n2570,\n*(unsigned __int8 *)(a1 + 62),\n*(_DWORD *)(a1 + 28));\nresult = *(_DWORD *)(a1 + 28) & 0x8000;\nif ( (_DWORD)result )\n{\nv2 = *(_DWORD *)(a1 + 28);\nBYTE1(v2) |= 8u;\nv3 = v2;\nresult = a1;\n*(_DWORD *)(a1 + 28) = v3;\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_4133AA,sub_41DE87,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'conn', 'sub_4133AA': 'hci_handle_remote_features_received', 'sub_41DE87': 'hci_dump_log'}"}
sd_put
85b155da9398d8205348ea0ced3e2882278c593ac26c114c09186fc6052d6150
dfguan
purge_dups
NA
int32_t sd_put(sdict_t *d, const char *name, uint32_t len, uint32_t isq) { if (!name) return -1; shash_t *h = (shash_t*)d->h; khint_t k; int absent; k = kh_put(str, h, name, &absent); if (absent) { sd_seq_t *s; if (d->n_seq == d->m_seq) { d->m_seq = d->m_seq? d->m_seq<<1 : 16; d->seq = (sd_seq_t*)realloc(d->seq, d->m_seq * sizeof(sd_seq_t)); } s = &d->seq[d->n_seq]; s->len = len, s->aux = 0, s->del = 0, s->del2=0, s->isq = !!isq, s->best_hit = -1, s->type = 7; kh_key(h, k) = s->name = strdup(name); kh_val(h, k) = d->n_seq++; } // TODO: test if len is the same; return kh_val(h, k); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4023BB", "function_addr": 4203451, "binary_name": "85b155da9398d8205348ea0ced3e2882278c593ac26c114c09186fc6052d6150.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+s], rsi"], [5, "mov [rbp+var_34], edx"], [6, "mov [rbp+var_38], ecx"], [7, "cmp [rbp+s], 0"], [8, "jnz short loc_4023E2"], [9, "mov eax, 0FFFFFFFFh"], [10, "jmp locret_402576"], [11, "mov rax, [rbp+var_28]"], [12, "mov rax, [rax+10h]"], [13, "mov [rbp+var_8], rax"], [14, "lea rdx, [rbp+var_1C]"], [15, "mov rcx, [rbp+s]"], [16, "mov rax, [rbp+var_8]"], [17, "mov rsi, rcx"], [18, "mov rdi, rax"], [19, "call sub_401F26"], [20, "mov [rbp+var_C], eax"], [21, "mov eax, [rbp+var_1C]"], [22, "test eax, eax"], [23, "jz loc_402562"], [24, "mov rax, [rbp+var_28]"], [25, "mov edx, [rax]"], [26, "mov rax, [rbp+var_28]"], [27, "mov eax, [rax+4]"], [28, "cmp edx, eax"], [29, "jnz short loc_40247B"], [30, "mov rax, [rbp+var_28]"], [31, "mov eax, [rax+4]"], [32, "test eax, eax"], [33, "jz short loc_40243B"], [34, "mov rax, [rbp+var_28]"], [35, "mov eax, [rax+4]"], [36, "lea edx, [rax+rax]"], [37, "jmp short loc_402440"], [38, "mov edx, 10h"], [39, "mov rax, [rbp+var_28]"], [40, "mov [rax+4], edx"], [41, "mov rax, [rbp+var_28]"], [42, "mov eax, [rax+4]"], [43, "mov edx, eax"], [44, "mov rax, rdx"], [45, "add rax, rax"], [46, "add rax, rdx"], [47, "shl rax, 3"], [48, "mov rdx, rax"], [49, "mov rax, [rbp+var_28]"], [50, "mov rax, [rax+8]"], [51, "mov rsi, rdx"], [52, "mov rdi, rax"], [53, "call _realloc"], [54, "mov rdx, [rbp+var_28]"], [55, "mov [rdx+8], rax"], [56, "mov rax, [rbp+var_28]"], [57, "mov rdx, [rax+8]"], [58, "mov rax, [rbp+var_28]"], [59, "mov eax, [rax]"], [60, "mov ecx, eax"], [61, "mov rax, rcx"], [62, "add rax, rax"], [63, "add rax, rcx"], [64, "shl rax, 3"], [65, "add rax, rdx"], [66, "mov [rbp+var_18], rax"], [67, "mov rax, [rbp+var_18]"], [68, "mov edx, [rbp+var_34]"], [69, "mov [rax+8], edx"], [70, "mov rax, [rbp+var_18]"], [71, "mov edx, [rax+0Ch]"], [72, "and edx, 0FC000000h"], [73, "mov [rax+0Ch], edx"], [74, "mov rax, [rbp+var_18]"], [75, "movzx edx, byte ptr [rax+0Fh]"], [76, "and edx, 0FFFFFFBFh"], [77, "mov [rax+0Fh], dl"], [78, "mov rax, [rbp+var_18]"], [79, "movzx edx, byte ptr [rax+0Fh]"], [80, "and edx, 7Fh"], [81, "mov [rax+0Fh], dl"], [82, "cmp [rbp+var_38], 0"], [83, "setnz dl"], [84, "mov rax, [rbp+var_18]"], [85, "and edx, 1"], [86, "mov ecx, edx"], [87, "shl ecx, 5"], [88, "movzx edx, byte ptr [rax+0Fh]"], [89, "and edx, 0FFFFFFDFh"], [90, "or edx, ecx"], [91, "mov [rax+0Fh], dl"], [92, "mov rax, [rbp+var_18]"], [93, "mov dword ptr [rax+10h], 0FFFFFFFFh"], [94, "mov rax, [rbp+var_18]"], [95, "movzx edx, byte ptr [rax+0Fh]"], [96, "or edx, 1Ch"], [97, "mov [rax+0Fh], dl"], [98, "mov rax, [rbp+s]"], [99, "mov rdi, rax"], [100, "call _strdup"], [101, "mov rdx, rax"], [102, "mov rax, [rbp+var_18]"], [103, "mov [rax], rdx"], [104, "mov rax, [rbp+var_8]"], [105, "mov rdx, [rax+18h]"], [106, "mov eax, [rbp+var_C]"], [107, "shl rax, 3"], [108, "add rdx, rax"], [109, "mov rax, [rbp+var_18]"], [110, "mov rax, [rax]"], [111, "mov [rdx], rax"], [112, "mov rax, [rbp+var_28]"], [113, "mov eax, [rax]"], [114, "lea ecx, [rax+1]"], [115, "mov rdx, [rbp+var_28]"], [116, "mov [rdx], ecx"], [117, "mov rdx, [rbp+var_8]"], [118, "mov rcx, [rdx+20h]"], [119, "mov edx, [rbp+var_C]"], [120, "shl rdx, 2"], [121, "add rdx, rcx"], [122, "mov [rdx], eax"], [123, "mov rax, [rbp+var_8]"], [124, "mov rdx, [rax+20h]"], [125, "mov eax, [rbp+var_C]"], [126, "shl rax, 2"], [127, "add rax, rdx"], [128, "mov eax, [rax]"], [129, "leave"], [130, "retn"]], "data_dep": [[7, 4], [8, 7], [11, 3], [12, 11], [13, 12], [15, 4], [16, 13], [17, 15], [18, 16], [20, 19], [22, 21], [23, 22], [24, 3], [25, 24], [26, 3], [27, 26], [28, 25], [28, 27], [29, 28], [30, 3], [31, 30], [32, 31], [33, 32], [34, 3], [35, 34], [36, 25], [36, 35], [39, 3], [40, 36], [40, 38], [40, 39], [41, 3], [42, 41], [42, 40], [43, 42], [44, 43], [45, 44], [46, 43], [46, 45], [47, 46], [48, 47], [49, 3], [50, 40], [50, 49], [51, 48], [52, 50], [54, 3], [55, 54], [55, 53], [56, 3], [57, 91], [57, 77], [57, 116], [57, 93], [57, 111], [57, 56], [57, 40], [57, 122], [57, 97], [57, 81], [57, 103], [57, 69], [57, 55], [57, 73], [58, 3], [59, 55], [59, 73], [59, 103], [59, 116], [59, 91], [59, 93], [59, 111], [59, 77], [59, 40], [59, 97], [59, 81], [59, 58], [59, 122], [59, 69], [60, 59], [61, 60], [62, 61], [63, 60], [63, 62], [64, 63], [65, 64], [65, 57], [66, 65], [67, 66], [68, 5], [69, 67], [69, 68], [70, 66], [71, 69], [71, 70], [72, 71], [73, 70], [73, 72], [74, 66], [75, 74], [75, 73], [76, 75], [77, 76], [77, 74], [78, 66], [79, 78], [79, 77], [80, 79], [81, 78], [81, 80], [82, 6], [83, 80], [83, 82], [84, 66], [85, 83], [86, 85], [87, 86], [88, 81], [88, 84], [89, 88], [90, 87], [90, 89], [91, 84], [91, 90], [92, 66], [93, 92], [94, 66], [95, 93], [95, 94], [95, 91], [96, 95], [97, 94], [97, 96], [98, 4], [99, 98], [101, 100], [102, 66], [103, 102], [103, 101], [104, 13], [105, 104], [105, 103], [106, 20], [107, 106], [108, 105], [108, 107], [109, 66], [110, 109], [110, 103], [111, 110], [111, 108], [112, 3], [113, 103], [113, 112], [113, 111], [114, 111], [114, 113], [114, 87], [115, 3], [116, 115], [116, 114], [117, 13], [118, 117], [118, 116], [119, 20], [120, 119], [121, 118], [121, 120], [122, 113], [122, 121], [123, 13], [124, 111], [124, 40], [124, 122], [124, 97], [124, 69], [124, 55], [124, 103], [124, 73], [124, 91], [124, 93], [124, 123], [124, 77], [124, 116], [124, 81], [125, 20], [126, 125], [127, 124], [127, 126], [128, 55], [128, 103], [128, 69], [128, 73], [128, 91], [128, 93], [128, 77], [128, 116], [128, 127], [128, 81], [128, 111], [128, 40], [128, 122], [128, 97], [130, 128], [130, 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/85b155da9398d8205348ea0ced3e2882278c593ac26c114c09186fc6052d6150_85b155da9398d8205348ea0ced3e2882278c593ac26c114c09186fc6052d6150.jsonl.gz", "strip_func_name": "sub_4023BB", "query": "\n\n\n__int64 __fastcall sub_4023BB(unsigned int *a1, char *a2, int a3, int a4)\n{\nint v5; // edx\nchar *v6; // rax\nint v9; // [rsp+24h] [rbp-1Ch] BYREF\n__int64 v10; // [rsp+28h] [rbp-18h]\nunsigned int v11; // [rsp+34h] [rbp-Ch]\nunsigned int *v12; // [rsp+38h] [rbp-8h]\n\nif ( !a2 )\nreturn 0xFFFFFFFFLL;\nv12 = (unsigned int *)*((_QWORD *)a1 + 2);\nv11 = sub_401F26(v12, a2, &v9);\nif ( v9 )\n{\nif ( *a1 == a1[1] )\n{\nif ( a1[1] )\nv5 = 2 * a1[1];\nelse\nv5 = 16;\na1[1] = v5;\n*((_QWORD *)a1 + 1) = realloc(*((void **)a1 + 1), 24LL * a1[1]);\n}\nv10 = *((_QWORD *)a1 + 1) + 24LL * *a1;\n*(_DWORD *)(v10 + 8) = a3;\n*(_DWORD *)(v10 + 12) &= 0xFC000000;\n*(_BYTE *)(v10 + 15) &= 0xBFu;\n*(_BYTE *)(v10 + 15) &= 0x7Fu;\n*(_BYTE *)(v10 + 15) = (32 * (a4 != 0)) | *(_BYTE *)(v10 + 15) & 0xDF;\n*(_DWORD *)(v10 + 16) = -1;\n*(_BYTE *)(v10 + 15) |= 0x1Cu;\nv6 = strdup(a2);\n*(_QWORD *)v10 = v6;\n*(_QWORD *)(8LL * v11 + *((_QWORD *)v12 + 3)) = *(_QWORD *)v10;\nLODWORD(v6) = (*a1)++;\n*(_DWORD *)(*((_QWORD *)v12 + 4) + 4LL * v11) = (_DWORD)v6;\n}\nreturn *(unsigned int *)(*((_QWORD *)v12 + 4) + 4LL * v11);\n}\n\n\n\nQ:[a3,a4,a1,a2,v9,v10,v12,sub_4023BB,sub_401F26,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'len', 'a4': 'isq', 'a1': 'd', 'a2': 'name', 'v9': 'absent', 'v10': 's', 'v12': 'h', 'sub_4023BB': 'sd_put', 'sub_401F26': 'kh_put_str'}"}
sl_bt_gatt_prepare_characteristic_value_write
81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba
openthread
ot-efr32
NA
sl_status_t sl_bt_gatt_prepare_characteristic_value_write(uint8_t connection, uint16_t characteristic, uint16_t offset, size_t value_len, const uint8_t* value, uint16_t *sent_len) { 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; cmd->data.cmd_gatt_prepare_characteristic_value_write.connection=connection; cmd->data.cmd_gatt_prepare_characteristic_value_write.characteristic=characteristic; cmd->data.cmd_gatt_prepare_characteristic_value_write.offset=offset; if ((6+value_len) > SL_BGAPI_MAX_PAYLOAD_SIZE ) { return SL_STATUS_COMMAND_TOO_LONG; } cmd->data.cmd_gatt_prepare_characteristic_value_write.value.len=value_len; memcpy(cmd->data.cmd_gatt_prepare_characteristic_value_write.value.data,value,value_len); cmd->header=sl_bt_cmd_gatt_prepare_characteristic_value_write_id+(((6+value_len)&0xff)<<8)+(((6+value_len)&0x700)>>8); sl_bt_host_handle_command(); if (sent_len) { *sent_len = rsp->data.rsp_gatt_prepare_characteristic_value_write.sent_len; } return rsp->data.rsp_gatt_prepare_characteristic_value_write.result; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_406ECC", "function_addr": 4222668, "binary_name": "81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov eax, edx"], [4, "mov [rbp+n], rcx"], [5, "mov [rbp+src], r8"], [6, "mov [rbp+var_38], r9"], [7, "mov edx, edi"], [8, "mov [rbp+var_14], dl"], [9, "mov edx, esi"], [10, "mov [rbp+var_18], dx"], [11, "mov [rbp+var_1C], ax"], [12, "mov rax, cs:off_426240"], [13, "mov [rbp+var_8], rax"], [14, "mov rax, cs:off_426248"], [15, "mov [rbp+var_10], rax"], [16, "mov rax, [rbp+var_8]"], [17, "movzx edx, [rbp+var_14]"], [18, "mov [rax+4], dl"], [19, "mov rax, [rbp+var_8]"], [20, "movzx edx, [rbp+var_18]"], [21, "mov [rax+5], dx"], [22, "mov rax, [rbp+var_8]"], [23, "movzx edx, [rbp+var_1C]"], [24, "mov [rax+7], dx"], [25, "mov rax, [rbp+n]"], [26, "add rax, 6"], [27, "cmp rax, 100h"], [28, "jbe short loc_406F41"], [29, "mov eax, 49h "], [30, "jmp short locret_406FBE"], [31, "mov rax, [rbp+n]"], [32, "mov edx, eax"], [33, "mov rax, [rbp+var_8]"], [34, "mov [rax+9], dl"], [35, "mov rax, [rbp+var_8]"], [36, "lea rcx, [rax+0Ah]"], [37, "mov rdx, [rbp+n]"], [38, "mov rax, [rbp+src]"], [39, "mov rsi, rax"], [40, "mov rdi, rcx"], [41, "call _memcpy"], [42, "mov rax, [rbp+n]"], [43, "add eax, 6"], [44, "shl eax, 8"], [45, "movzx edx, ax"], [46, "mov rax, [rbp+n]"], [47, "add rax, 6"], [48, "shr rax, 8"], [49, "and eax, 7"], [50, "add eax, edx"], [51, "lea edx, [rax+0B090020h]"], [52, "mov rax, [rbp+var_8]"], [53, "mov [rax], edx"], [54, "mov eax, 0"], [55, "call sub_40406F"], [56, "cmp [rbp+var_38], 0"], [57, "jz short loc_406FB3"], [58, "mov rax, [rbp+var_10]"], [59, "movzx edx, word ptr [rax+6]"], [60, "mov rax, [rbp+var_38]"], [61, "mov [rax], dx"], [62, "mov rax, [rbp+var_10]"], [63, "movzx eax, word ptr [rax+4]"], [64, "movzx eax, ax"], [65, "leave"], [66, "retn"]], "data_dep": [[8, 7], [10, 9], [11, 3], [13, 12], [15, 14], [16, 13], [17, 8], [18, 17], [18, 16], [19, 13], [20, 10], [21, 19], [21, 20], [22, 13], [23, 11], [24, 23], [24, 22], [25, 4], [26, 25], [27, 26], [28, 27], [31, 4], [32, 31], [33, 13], [34, 33], [34, 32], [35, 13], [36, 34], [36, 35], [37, 4], [38, 5], [39, 38], [40, 36], [42, 4], [43, 42], [44, 43], [45, 44], [46, 4], [47, 46], [48, 47], [49, 48], [50, 49], [50, 45], [51, 50], [51, 34], [51, 45], [52, 13], [53, 52], [53, 51], [56, 6], [57, 56], [58, 15], [59, 61], [59, 58], [59, 18], [59, 21], [59, 24], [59, 53], [59, 34], [60, 6], [61, 60], [61, 59], [62, 15], [63, 34], [63, 61], [63, 18], [63, 21], [63, 24], [63, 62], [63, 53], [64, 63], [66, 29], [66, 64]]}
{"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/81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba_81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba.jsonl.gz", "strip_func_name": "sub_406ECC", "query": "\n\n\n__int64 __fastcall sub_406ECC(char a1, __int16 a2, __int16 a3, size_t a4, const void *a5, _WORD *a6)\n{\n_WORD *v10; // [rsp+30h] [rbp-10h]\nchar *v11; // [rsp+38h] [rbp-8h]\n\nv11 = (char *)off_426240;\nv10 = off_426248;\n*((_BYTE *)off_426240 + 4) = a1;\n*(_WORD *)(v11 + 5) = a2;\n*(_WORD *)(v11 + 7) = a3;\nif ( a4 + 6 > 0x100 )\nreturn 73LL;\nv11[9] = a4;\nmemcpy(v11 + 10, a5, a4);\n*(_DWORD *)v11 = (unsigned __int16)(((_WORD)a4 + 6) << 8) + (((a4 + 6) >> 8) & 7) + 185139232;\nsub_40406F(v11 + 10, a5);\nif ( a6 )\n*a6 = v10[3];\nreturn (unsigned __int16)v10[2];\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,v10,v11,sub_406ECC,sub_40406F,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'offset', 'a4': 'value_len', 'a1': 'connection', 'a2': 'characteristic', 'a5': 'value', 'a6': 'sent_len', 'v10': 'rsp_0', 'v11': 'cmd', 'sub_406ECC': 'sl_bt_gatt_prepare_characteristic_value_write', 'sub_40406F': 'sl_bt_host_handle_command'}"}
hs_regdelete
406d6475d917ac4ca073112b720b74447f364fa734e3f1480dea17856dd38b27
festvox
flite
NA
void hs_regdelete(cst_regex *r) { cst_free(r->program); cst_free(r); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41F8F2", "function_addr": 4323570, "binary_name": "406d6475d917ac4ca073112b720b74447f364fa734e3f1480dea17856dd38b27.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 rax, [rax+18h]"], [6, "mov rdi, rax"], [7, "call sub_404657"], [8, "mov rax, [rbp+var_8]"], [9, "mov rdi, rax"], [10, "call sub_404657"], [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/406d6475d917ac4ca073112b720b74447f364fa734e3f1480dea17856dd38b27_406d6475d917ac4ca073112b720b74447f364fa734e3f1480dea17856dd38b27.jsonl.gz", "strip_func_name": "sub_41F8F2", "query": "\n\n\nvoid __fastcall sub_41F8F2(void **a1)\n{\nsub_404657(a1[3]);\nsub_404657(a1);\n}\n\n\n\nQ:[a1,sub_41F8F2,sub_404657,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'r', 'sub_41F8F2': 'hs_regdelete', 'sub_404657': 'cst_free'}"}
tmxr_set_lnorder
bf7ae1a4450b359f92e96f59068a71bc49375889282b3e96663c3c09631e7838
open-simh
simh
NA
t_stat tmxr_set_lnorder (UNIT *uptr, int32 val, CONST char *cptr, void *desc) { TMXR *mp = (TMXR *) desc; char *tbuf = NULL; char *tptr; t_addr low, high, min, max; int32 *list; t_bool *set; uint32 line, idx; t_addr lncount = (t_addr) (mp->lines - 1); t_stat result = SCPE_OK; if (mp->lnorder == NULL) /* if the connection order array is not defined */ return SCPE_NXPAR; /* then report a "Non-existent parameter" error */ else if ((cptr == NULL) || (*cptr == '\0')) /* otherwise if a line range was not supplied */ return SCPE_MISVAL; /* then report a "Missing value" error */ else { /* otherwise */ min = (t_addr) (val & 0xFFFF); /* split the restriction into */ max = (t_addr) ((val >> 16) & 0xFFFF); /* minimum and maximum line numbers */ if (max == 0) /* if the maximum line number isn't specified */ max = lncount; /* then use the defined maximum */ if (min > lncount || max > lncount || min > max) /* if the restriction isn't valid */ return SCPE_IERR; /* then report an "Internal error" */ } list = (int32 *) calloc (mp->lines, sizeof (int32)); /* allocate the new line order array */ if (list == NULL) /* if the allocation failed */ return SCPE_MEM; /* then report a "Memory exhausted" error */ set = (t_bool *) calloc (mp->lines, sizeof (t_bool)); /* allocate the line set tracking array */ if (set == NULL) { /* if the allocation failed */ free (list); /* then free the successful list allocation */ return SCPE_MEM; /* and report a "Memory exhausted" error */ } tbuf = (char *) calloc (strlen(cptr)+2, sizeof(*cptr)); if (tbuf == NULL) { /* if the allocation failed */ free (set); /* then free the line set tracking array */ free (list); /* and successful list allocation */ return SCPE_MEM; /* and report a "Memory exhausted" error */ } strcpy (tbuf, cptr); tptr = tbuf + strlen (tbuf); /* append a semicolon */ *tptr++ = ';'; /* to the command string */ *tptr = '\0'; /* to make parsing easier for get_range */ cptr = tbuf; idx = 0; /* initialize the index of ordered values */ while (*cptr != '\0') { /* while characters remain in the command string */ if (strncasecmp (cptr, "ALL;", 4) == 0) { /* if the parameter is "ALL" */ if ((val != 0) || ((idx > 0) && (idx <= max))) /* then if some lines are restrictied or unspecified */ for (line = (uint32)min; line <= (uint32)max; line++)/* then fill them in sequentially */ if (set [line] == FALSE) /* setting each unspecified line */ list [idx++] = line; /* into the line order */ cptr = cptr + 4; /* advance past "ALL" and the trailing semicolon */ if (*cptr != '\0') /* if "ALL" is not the last parameter */ result = sim_messagef (SCPE_2MARG, /* then report extraneous items */ "Too many args: %s\n", cptr); break; /* "ALL" terminates the order list */ } cptr = get_range (NULL, cptr, &low, &high, 10, max, ';'); /* get a line range */ if (cptr == NULL) { /* if a parsing error occurred */ result = SCPE_ARG; /* then report an invalid argument */ break; /* and terminate the parse */ } else if ((low < min) || (low > max) || (high > max)) { /* otherwise if the line number is invalid */ result = SCPE_SUB; /* then report the subscript is out of range */ break; /* and terminate the parse */ } else /* otherwise it's a valid range */ for (line = (uint32)low; line <= (uint32)high; line++)/* so add the line(s) to the order */ if (set [line] == FALSE) { /* if the line number has not been specified */ set [line] = TRUE; /* then now it is */ list [idx++] = line; /* and add it to the connection order */ } } if (result == SCPE_OK) { /* if the assignment succeeded */ if (idx <= max) /* then if any lines were not specified */ list [idx] = -1; /* then terminate the order list after the last one */ memcpy (mp->lnorder, list, /* copy the working array to the connection array */ mp->lines * sizeof (int32)); } free (list); /* free the list allocation */ free (set); /* and the set allocation */ free (tbuf); /* and the arg copy with ; */ return result; /* return the status */ }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_46F878", "function_addr": 4651128, "binary_name": "bf7ae1a4450b359f92e96f59068a71bc49375889282b3e96663c3c09631e7838.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_5C], esi"], [5, "mov [rbp+s], rdx"], [6, "mov [rbp+var_70], rcx"], [7, "mov rax, [rbp+var_70]"], [8, "mov [rbp+var_18], rax"], [9, "mov [rbp+dest], 0"], [10, "mov rax, [rbp+var_18]"], [11, "mov eax, [rax]"], [12, "sub eax, 1"], [13, "mov [rbp+var_24], eax"], [14, "mov [rbp+var_10], 0"], [15, "mov rax, [rbp+var_18]"], [16, "mov rax, [rax+20h]"], [17, "test rax, rax"], [18, "jnz short loc_46F8C9"], [19, "mov eax, 63h "], [20, "jmp locret_46FC29"], [21, "cmp [rbp+s], 0"], [22, "jz short loc_46F8DB"], [23, "mov rax, [rbp+s]"], [24, "movzx eax, byte ptr [rax]"], [25, "test al, al"], [26, "jnz short loc_46F8E5"], [27, "mov eax, 5Dh "], [28, "jmp locret_46FC29"], [29, "mov eax, [rbp+var_5C]"], [30, "and eax, 0FFFFh"], [31, "mov [rbp+var_28], eax"], [32, "mov eax, [rbp+var_5C]"], [33, "shr eax, 10h"], [34, "mov [rbp+var_4], eax"], [35, "cmp [rbp+var_4], 0"], [36, "jnz short loc_46F905"], [37, "mov eax, [rbp+var_24]"], [38, "mov [rbp+var_4], eax"], [39, "mov eax, [rbp+var_28]"], [40, "cmp eax, [rbp+var_24]"], [41, "ja short loc_46F91D"], [42, "mov eax, [rbp+var_4]"], [43, "cmp eax, [rbp+var_24]"], [44, "ja short loc_46F91D"], [45, "mov eax, [rbp+var_28]"], [46, "cmp eax, [rbp+var_4]"], [47, "jbe short loc_46F927"], [48, "mov eax, 65h "], [49, "jmp locret_46FC29"], [50, "mov rax, [rbp+var_18]"], [51, "mov eax, [rax]"], [52, "cdqe"], [53, "mov esi, 4"], [54, "mov rdi, rax"], [55, "call _calloc"], [56, "mov [rbp+ptr], rax"], [57, "cmp [rbp+ptr], 0"], [58, "jnz short loc_46F951"], [59, "mov eax, 47h "], [60, "jmp locret_46FC29"], [61, "mov rax, [rbp+var_18]"], [62, "mov eax, [rax]"], [63, "cdqe"], [64, "mov esi, 4"], [65, "mov rdi, rax"], [66, "call _calloc"], [67, "mov [rbp+var_38], rax"], [68, "cmp [rbp+var_38], 0"], [69, "jnz short loc_46F987"], [70, "mov rax, [rbp+ptr]"], [71, "mov rdi, rax"], [72, "call _free"], [73, "mov eax, 47h "], [74, "jmp locret_46FC29"], [75, "mov rax, [rbp+s]"], [76, "mov rdi, rax"], [77, "call _strlen"], [78, "add rax, 2"], [79, "mov esi, 1"], [80, "mov rdi, rax"], [81, "call _calloc"], [82, "mov [rbp+dest], rax"], [83, "cmp [rbp+dest], 0"], [84, "jnz short loc_46F9D1"], [85, "mov rax, [rbp+var_38]"], [86, "mov rdi, rax"], [87, "call _free"], [88, "mov rax, [rbp+ptr]"], [89, "mov rdi, rax"], [90, "call _free"], [91, "mov eax, 47h "], [92, "jmp locret_46FC29"], [93, "mov rdx, [rbp+s]"], [94, "mov rax, [rbp+dest]"], [95, "mov rsi, rdx"], [96, "mov rdi, rax"], [97, "call _strcpy"], [98, "mov rax, [rbp+dest]"], [99, "mov rdi, rax"], [100, "call _strlen"], [101, "mov rdx, [rbp+dest]"], [102, "add rax, rdx"], [103, "mov [rbp+var_40], rax"], [104, "mov rax, [rbp+var_40]"], [105, "lea rdx, [rax+1]"], [106, "mov [rbp+var_40], rdx"], [107, "mov byte ptr [rax], 3Bh "], [108, "mov rax, [rbp+var_40]"], [109, "mov byte ptr [rax], 0"], [110, "mov rax, [rbp+dest]"], [111, "mov [rbp+s], rax"], [112, "mov [rbp+var_C], 0"], [113, "jmp loc_46FBA3"], [114, "mov rax, [rbp+s]"], [115, "mov edx, 4"], [116, "mov esi, offset aAll"], [117, "mov rdi, rax"], [118, "call sub_451ADF"], [119, "test eax, eax"], [120, "jnz loc_46FAD9"], [121, "cmp [rbp+var_5C], 0"], [122, "jnz short loc_46FA57"], [123, "cmp [rbp+var_C], 0"], [124, "jz short loc_46FAA2"], [125, "mov eax, [rbp+var_C]"], [126, "cmp eax, [rbp+var_4]"], [127, "ja short loc_46FAA2"], [128, "mov eax, [rbp+var_28]"], [129, "mov [rbp+var_8], eax"], [130, "jmp short loc_46FA9A"], [131, "mov eax, [rbp+var_8]"], [132, "lea rdx, ds:0[rax*4]"], [133, "mov rax, [rbp+var_38]"], [134, "add rax, rdx"], [135, "mov eax, [rax]"], [136, "test eax, eax"], [137, "jnz short loc_46FA96"], [138, "mov eax, [rbp+var_C]"], [139, "lea edx, [rax+1]"], [140, "mov [rbp+var_C], edx"], [141, "mov eax, eax"], [142, "lea rdx, ds:0[rax*4]"], [143, "mov rax, [rbp+ptr]"], [144, "add rdx, rax"], [145, "mov eax, [rbp+var_8]"], [146, "mov [rdx], eax"], [147, "add [rbp+var_8], 1"], [148, "mov eax, [rbp+var_8]"], [149, "cmp eax, [rbp+var_4]"], [150, "jbe short loc_46FA5F"], [151, "add [rbp+s], 4"], [152, "mov rax, [rbp+s]"], [153, "movzx eax, byte ptr [rax]"], [154, "test al, al"], [155, "jz loc_46FBB4"], [156, "mov rax, [rbp+s]"], [157, "mov rdx, rax"], [158, "mov esi, offset aTooManyArgsS"], [159, "mov edi, 5Fh "], [160, "mov eax, 0"], [161, "call sub_43F60C"], [162, "mov [rbp+var_10], eax"], [163, "jmp loc_46FBB4"], [164, "mov esi, [rbp+var_4]"], [165, "lea rcx, [rbp+var_48]"], [166, "lea rdx, [rbp+var_44]"], [167, "mov rax, [rbp+s]"], [168, "sub rsp, 8"], [169, "push 3Bh "], [170, "mov r9d, esi"], [171, "mov r8d, 0Ah"], [172, "mov rsi, rax"], [173, "mov edi, 0"], [174, "call sub_434F88"], [175, "add rsp, 10h"], [176, "mov [rbp+s], rax"], [177, "cmp [rbp+s], 0"], [178, "jnz short loc_46FB1F"], [179, "mov [rbp+var_10], 48h "], [180, "jmp loc_46FBB5"], [181, "mov eax, [rbp+var_44]"], [182, "cmp [rbp+var_28], eax"], [183, "ja short loc_46FB37"], [184, "mov eax, [rbp+var_44]"], [185, "cmp [rbp+var_4], eax"], [186, "jb short loc_46FB37"], [187, "mov eax, [rbp+var_48]"], [188, "cmp [rbp+var_4], eax"], [189, "jnb short loc_46FB40"], [190, "mov [rbp+var_10], 58h "], [191, "jmp short loc_46FBB5"], [192, "mov eax, [rbp+var_44]"], [193, "mov [rbp+var_8], eax"], [194, "jmp short loc_46FB9B"], [195, "mov eax, [rbp+var_8]"], [196, "lea rdx, ds:0[rax*4]"], [197, "mov rax, [rbp+var_38]"], [198, "add rax, rdx"], [199, "mov eax, [rax]"], [200, "test eax, eax"], [201, "jnz short loc_46FB97"], [202, "mov eax, [rbp+var_8]"], [203, "lea rdx, ds:0[rax*4]"], [204, "mov rax, [rbp+var_38]"], [205, "add rax, rdx"], [206, "mov dword ptr [rax], 1"], [207, "mov eax, [rbp+var_C]"], [208, "lea edx, [rax+1]"], [209, "mov [rbp+var_C], edx"], [210, "mov eax, eax"], [211, "lea rdx, ds:0[rax*4]"], [212, "mov rax, [rbp+ptr]"], [213, "add rdx, rax"], [214, "mov eax, [rbp+var_8]"], [215, "mov [rdx], eax"], [216, "add [rbp+var_8], 1"], [217, "mov eax, [rbp+var_48]"], [218, "cmp [rbp+var_8], eax"], [219, "jbe short loc_46FB48"], [220, "mov rax, [rbp+s]"], [221, "movzx eax, byte ptr [rax]"], [222, "test al, al"], [223, "jnz loc_46FA25"], [224, "jmp short loc_46FBB5"], [225, "nop"], [226, "cmp [rbp+var_10], 0"], [227, "jnz short loc_46FC02"], [228, "mov eax, [rbp+var_C]"], [229, "cmp eax, [rbp+var_4]"], [230, "ja short loc_46FBDB"], [231, "mov eax, [rbp+var_C]"], [232, "lea rdx, ds:0[rax*4]"], [233, "mov rax, [rbp+ptr]"], [234, "add rax, rdx"], [235, "mov dword ptr [rax], 0FFFFFFFFh"], [236, "mov rax, [rbp+var_18]"], [237, "mov eax, [rax]"], [238, "cdqe"], [239, "lea rdx, ds:0[rax*4]"], [240, "mov rax, [rbp+var_18]"], [241, "mov rax, [rax+20h]"], [242, "mov rcx, [rbp+ptr]"], [243, "mov rsi, rcx"], [244, "mov rdi, rax"], [245, "call _memcpy"], [246, "mov rax, [rbp+ptr]"], [247, "mov rdi, rax"], [248, "call _free"], [249, "mov rax, [rbp+var_38]"], [250, "mov rdi, rax"], [251, "call _free"], [252, "mov rax, [rbp+dest]"], [253, "mov rdi, rax"], [254, "call _free"], [255, "mov eax, [rbp+var_10]"], [256, "leave"], [257, "retn"]], "data_dep": [[7, 6], [8, 7], [10, 8], [11, 10], [12, 11], [13, 12], [15, 8], [16, 15], [17, 16], [18, 17], [21, 5], [22, 21], [23, 5], [24, 23], [25, 24], [26, 25], [29, 4], [30, 29], [31, 30], [32, 4], [33, 32], [34, 33], [35, 34], [36, 35], [37, 13], [38, 37], [39, 31], [40, 39], [40, 13], [41, 40], [42, 34], [42, 38], [43, 42], [43, 13], [44, 43], [45, 31], [46, 45], [46, 34], [46, 38], [47, 46], [50, 8], [51, 50], [54, 51], [56, 55], [57, 56], [58, 57], [61, 8], [62, 61], [65, 62], [67, 66], [68, 67], [69, 68], [70, 56], [71, 70], [75, 5], [76, 75], [78, 77], [80, 78], [82, 81], [83, 82], [84, 83], [85, 67], [86, 85], [88, 56], [89, 88], [93, 5], [94, 82], [95, 93], [96, 94], [98, 82], [99, 98], [101, 82], [102, 101], [102, 100], [103, 102], [104, 103], [105, 104], [105, 101], [106, 105], [107, 104], [108, 106], [109, 108], [110, 82], [111, 110], [114, 111], [114, 176], [117, 114], [119, 118], [120, 119], [121, 4], [122, 121], [123, 209], [123, 112], [124, 123], [125, 112], [125, 209], [126, 125], [126, 34], [126, 38], [127, 126], [128, 31], [129, 128], [131, 129], [131, 147], [132, 132], [132, 144], [132, 115], [133, 67], [134, 133], [134, 132], [135, 146], [135, 109], [135, 206], [135, 215], [135, 107], [135, 134], [136, 135], [137, 136], [138, 112], [138, 209], [138, 140], [139, 138], [139, 146], [139, 132], [139, 109], [139, 206], [139, 215], [139, 107], [140, 139], [141, 138], [142, 139], [143, 56], [144, 143], [144, 142], [145, 129], [145, 147], [146, 145], [146, 144], [147, 129], [147, 147], [148, 129], [148, 147], [149, 34], [149, 38], [149, 148], [150, 149], [151, 176], [151, 111], [152, 151], [153, 107], [153, 152], [153, 146], [153, 109], [153, 206], [153, 215], [154, 153], [155, 154], [156, 151], [157, 156], [162, 161], [164, 34], [164, 38], [165, 165], [166, 115], [167, 176], [167, 111], [168, 175], [168, 2], [170, 164], [172, 167], [175, 168], [176, 174], [177, 176], [178, 177], [182, 181], [182, 31], [183, 182], [185, 184], [185, 34], [185, 38], [186, 185], [188, 187], [188, 34], [188, 38], [189, 188], [193, 192], [195, 216], [195, 193], [196, 166], [196, 213], [196, 196], [197, 67], [198, 197], [198, 196], [199, 109], [199, 198], [199, 206], [199, 215], [199, 107], [200, 199], [201, 200], [202, 216], [202, 193], [203, 196], [204, 67], [205, 204], [205, 203], [206, 205], [207, 209], [207, 112], [208, 203], [208, 207], [208, 206], [209, 208], [210, 207], [211, 208], [212, 56], [213, 212], [213, 211], [214, 216], [214, 193], [215, 214], [215, 213], [216, 216], [216, 193], [218, 217], [218, 216], [218, 193], [219, 218], [220, 111], [220, 176], [221, 215], [221, 107], [221, 109], [221, 220], [221, 206], [222, 221], [223, 222], [226, 190], [226, 162], [226, 179], [226, 14], [227, 226], [228, 140], [228, 112], [228, 209], [229, 228], [229, 34], [229, 38], [230, 229], [231, 140], [231, 112], [231, 209], [232, 144], [232, 196], [232, 213], [232, 157], [232, 166], [232, 115], [232, 105], [232, 132], [233, 56], [234, 233], [234, 232], [235, 234], [236, 8], [237, 236], [237, 235], [237, 109], [237, 206], [237, 146], [237, 215], [237, 107], [239, 115], [239, 105], [239, 132], [239, 196], [239, 144], [239, 232], [239, 213], [239, 157], [239, 166], [240, 8], [241, 206], [241, 146], [241, 215], [241, 107], [241, 240], [241, 235], [241, 109], [242, 56], [243, 242], [244, 241], [246, 56], [247, 246], [249, 67], [250, 249], [252, 82], [253, 252], [255, 179], [255, 14], [255, 190], [255, 162], [257, 48], [257, 19], [257, 255], [257, 73], [257, 59], [257, 27], [257, 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/bf7ae1a4450b359f92e96f59068a71bc49375889282b3e96663c3c09631e7838_bf7ae1a4450b359f92e96f59068a71bc49375889282b3e96663c3c09631e7838.jsonl.gz", "strip_func_name": "sub_46F878", "query": "\n\n\n__int64 __fastcall sub_46F878(__int64 a1, unsigned int a2, const char *a3, int *a4)\n{\n__int64 result; // rax\nsize_t v5; // rax\n_BYTE *v6; // rax\n__int64 v7; // rcx\n__int64 v8; // r8\n__int64 v9; // r9\nunsigned int v10; // eax\nunsigned int v11; // eax\nchar *sa; // [rsp+8h] [rbp-68h]\nchar *sb; // [rsp+8h] [rbp-68h]\nunsigned int v16; // [rsp+28h] [rbp-48h] BYREF\nunsigned int v17; // [rsp+2Ch] [rbp-44h] BYREF\n_BYTE *v18; // [rsp+30h] [rbp-40h]\nvoid *v19; // [rsp+38h] [rbp-38h]\nvoid *ptr; // [rsp+40h] [rbp-30h]\nunsigned int v21; // [rsp+48h] [rbp-28h]\nchar v22[12]; // [rsp+4Ch] [rbp-24h]\nint *v23; // [rsp+58h] [rbp-18h]\nunsigned int v24; // [rsp+60h] [rbp-10h]\nunsigned int v25; // [rsp+64h] [rbp-Ch]\nunsigned int i; // [rsp+68h] [rbp-8h]\nunsigned int v27; // [rsp+6Ch] [rbp-4h]\n\nv23 = a4;\n*(_QWORD *)&v22[4] = 0LL;\n*(_QWORD *)v22 = (unsigned int)(*a4 - 1);\nv24 = 0;\nif ( !*((_QWORD *)a4 + 4) )\nreturn 99LL;\nif ( !a3 || !*a3 )\nreturn 93LL;\nv21 = (unsigned __int16)a2;\nv27 = HIWORD(a2);\nif ( !HIWORD(a2) )\nv27 = *(_DWORD *)v22;\nif ( v21 > *(_DWORD *)v22 || v27 > *(_DWORD *)v22 || v21 > v27 )\nreturn 101LL;\nptr = calloc(*v23, 4uLL);\nif ( !ptr )\nreturn 71LL;\nv19 = calloc(*v23, 4uLL);\nif ( v19 )\n{\nv5 = strlen(a3);\n*(_QWORD *)&v22[4] = calloc(v5 + 2, 1uLL);\nif ( *(_QWORD *)&v22[4] )\n{\nstrcpy(*(char **)&v22[4], a3);\nv6 = (_BYTE *)(*(_QWORD *)&v22[4] + strlen(*(const char **)&v22[4]));\nv18 = v6 + 1;\n*v6 = 59;\n*v18 = 0;\nsa = *(char **)&v22[4];\nv25 = 0;\nwhile ( *sa )\n{\nif ( !(unsigned int)sub_451ADF((__int64)sa, (__int64)\"ALL;\", 4uLL) )\n{\nif ( a2 || v25 && v25 <= v27 )\n{\nfor ( i = v21; i <= v27; ++i )\n{\nif ( !*((_DWORD *)v19 + i) )\n{\nv10 = v25++;\n*((_DWORD *)ptr + v10) = i;\n}\n}\n}\nsb = sa + 4;\nif ( *sb )\nv24 = sub_43F60C(95, \"Too many args: %s\\n\", (__int64)sb, v7, v8, v9, a4);\nbreak;\n}\nsa = sub_434F88(0LL, sa, &v17, &v16, 0xAu, v27, 59);\nif ( !sa )\n{\nv24 = 72;\nbreak;\n}\nif ( v21 > v17 || v27 < v17 || v27 < v16 )\n{\nv24 = 88;\nbreak;\n}\nfor ( i = v17; i <= v16; ++i )\n{\nif ( !*((_DWORD *)v19 + i) )\n{\n*((_DWORD *)v19 + i) = 1;\nv11 = v25++;\n*((_DWORD *)ptr + v11) = i;\n}\n}\n}\nif ( !v24 )\n{\nif ( v25 <= v27 )\n*((_DWORD *)ptr + v25) = -1;\nmemcpy(*((void **)v23 + 4), ptr, 4LL * *v23);\n}\nfree(ptr);\nfree(v19);\nfree(*(void **)&v22[4]);\nresult = v24;\n}\nelse\n{\nfree(v19);\nfree(ptr);\nresult = 71LL;\n}\n}\nelse\n{\nfree(ptr);\nresult = 71LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a2,a1,v7,sa,v16,v17,v18,v19,ptr,v21,v22,v23,v24,v25,i,v27,sub_46F878,sub_451ADF,sub_43F60C,sub_434F88,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'cptr', 'a4': 'desc', 'a2': 'val', 'a1': 'uptr', 'v7': 'desc', 'sa': 'cptrb', 'v16': 'high', 'v17': 'low', 'v18': 'tptr', 'v19': 'set', 'ptr': 'list', 'v21': 'min', 'v22': 'lncount', 'v23': 'mp', 'v24': 'result', 'v25': 'idx', 'i': 'line', 'v27': 'max', 'sub_46F878': 'tmxr_set_lnorder', 'sub_451ADF': 'sim_strncasecmp', 'sub_43F60C': 'sim_messagef', 'sub_434F88': 'get_range'}"}
mpi_montmul
cd3b74ec912721ad5b59a28b08fcafb8c2fd693e56eafaf70b22fa8b6ebd580c
openthread
ot-nrf528xx
NA
static void mpi_montmul( mbedtls_mpi *A, const mbedtls_mpi *B, const mbedtls_mpi *N, mbedtls_mpi_uint mm, const mbedtls_mpi *T ) { size_t i, n, m; mbedtls_mpi_uint u0, u1, *d; memset( T->p, 0, T->n * ciL ); d = T->p; n = N->n; m = ( B->n < n ) ? B->n : n; for( i = 0; i < n; i++ ) { /* * T = (T + u0*B + u1*N) / 2^biL */ u0 = A->p[i]; u1 = ( d[0] + u0 * B->p[0] ) * mm; mpi_mul_hlp( m, B->p, d, u0 ); mpi_mul_hlp( n, N->p, d, u1 ); *d++ = u0; d[n + 1] = 0; } /* At this point, d is either the desired result or the desired result * plus N. We now potentially subtract N, avoiding leaking whether the * subtraction is performed through side channels. */ /* Copy the n least significant limbs of d to A, so that * A = d if d < N (recall that N has n limbs). */ memcpy( A->p, d, n * ciL ); /* If d >= N then we want to set A to d - N. To prevent timing attacks, * do the calculation without using conditional tests. */ /* Set d to d0 + (2^biL)^n - N where d0 is the current value of d. */ d[n] += 1; d[n] -= mpi_sub_hlp( n, d, d, N->p ); /* If d0 < N then d < (2^biL)^n * so d[n] == 0 and we want to keep A as it is. * If d0 >= N then d >= (2^biL)^n, and d <= (2^biL)^n + N < 2 * (2^biL)^n * so d[n] == 1 and we want to set A to the result of the subtraction * which is d - (2^biL)^n, i.e. the n least significant limbs of d. * This exactly corresponds to a conditional assignment. */ mbedtls_ct_mpi_uint_cond_assign( n, A->p, d, (unsigned char) d[n] ); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4115C0", "function_addr": 4265408, "binary_name": "cd3b74ec912721ad5b59a28b08fcafb8c2fd693e56eafaf70b22fa8b6ebd580c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 60h"], [3, "mov [rbp+var_38], rdi"], [4, "mov [rbp+var_40], rsi"], [5, "mov [rbp+var_48], rdx"], [6, "mov [rbp+var_50], rcx"], [7, "mov [rbp+var_58], r8"], [8, "mov rax, [rbp+var_58]"], [9, "mov rax, [rax+8]"], [10, "lea rdx, ds:0[rax*8]"], [11, "mov rax, [rbp+var_58]"], [12, "mov rax, [rax+10h]"], [13, "mov esi, 0"], [14, "mov rdi, rax"], [15, "call _memset"], [16, "mov rax, [rbp+var_58]"], [17, "mov rax, [rax+10h]"], [18, "mov [rbp+src], rax"], [19, "mov rax, [rbp+var_48]"], [20, "mov rax, [rax+8]"], [21, "mov [rbp+var_18], rax"], [22, "mov rax, [rbp+var_40]"], [23, "mov rax, [rax+8]"], [24, "cmp [rbp+var_18], rax"], [25, "cmovbe rax, [rbp+var_18]"], [26, "mov [rbp+var_20], rax"], [27, "mov [rbp+var_8], 0"], [28, "jmp loc_4116E9"], [29, "mov rax, [rbp+var_38]"], [30, "mov rdx, [rax+10h]"], [31, "mov rax, [rbp+var_8]"], [32, "shl rax, 3"], [33, "add rax, rdx"], [34, "mov rax, [rax]"], [35, "mov [rbp+var_28], rax"], [36, "mov rax, [rbp+src]"], [37, "mov rdx, [rax]"], [38, "mov rax, [rbp+var_40]"], [39, "mov rax, [rax+10h]"], [40, "mov rax, [rax]"], [41, "imul rax, [rbp+var_28]"], [42, "add rdx, rax"], [43, "mov rax, [rbp+var_50]"], [44, "imul rax, rdx"], [45, "mov [rbp+var_30], rax"], [46, "mov rax, [rbp+var_40]"], [47, "mov rsi, [rax+10h]"], [48, "mov rcx, [rbp+var_28]"], [49, "mov rdx, [rbp+src]"], [50, "mov rax, [rbp+var_20]"], [51, "mov rdi, rax"], [52, "call sub_4101E7"], [53, "mov rax, [rbp+var_48]"], [54, "mov rsi, [rax+10h]"], [55, "mov rcx, [rbp+var_30]"], [56, "mov rdx, [rbp+src]"], [57, "mov rax, [rbp+var_18]"], [58, "mov rdi, rax"], [59, "call sub_4101E7"], [60, "mov rax, [rbp+src]"], [61, "lea rdx, [rax+8]"], [62, "mov [rbp+src], rdx"], [63, "mov rdx, [rbp+var_28]"], [64, "mov [rax], rdx"], [65, "mov rax, [rbp+var_18]"], [66, "add rax, 1"], [67, "lea rdx, ds:0[rax*8]"], [68, "mov rax, [rbp+src]"], [69, "add rax, rdx"], [70, "mov qword ptr [rax], 0"], [71, "add [rbp+var_8], 1"], [72, "mov rax, [rbp+var_8]"], [73, "cmp rax, [rbp+var_18]"], [74, "jb loc_41163B"], [75, "mov rax, [rbp+var_18]"], [76, "lea rdx, ds:0[rax*8]"], [77, "mov rax, [rbp+var_38]"], [78, "mov rax, [rax+10h]"], [79, "mov rcx, [rbp+src]"], [80, "mov rsi, rcx"], [81, "mov rdi, rax"], [82, "call _memcpy"], [83, "mov rax, [rbp+var_18]"], [84, "lea rdx, ds:0[rax*8]"], [85, "mov rax, [rbp+src]"], [86, "add rax, rdx"], [87, "mov rdx, [rax]"], [88, "mov rax, [rbp+var_18]"], [89, "lea rcx, ds:0[rax*8]"], [90, "mov rax, [rbp+src]"], [91, "add rax, rcx"], [92, "add rdx, 1"], [93, "mov [rax], rdx"], [94, "mov rax, [rbp+var_48]"], [95, "mov rcx, [rax+10h]"], [96, "mov rdx, [rbp+src]"], [97, "mov rsi, [rbp+src]"], [98, "mov rax, [rbp+var_18]"], [99, "mov rdi, rax"], [100, "call sub_40FC82"], [101, "mov rcx, rax"], [102, "mov rax, [rbp+var_18]"], [103, "lea rdx, ds:0[rax*8]"], [104, "mov rax, [rbp+src]"], [105, "add rax, rdx"], [106, "mov rdx, [rax]"], [107, "mov rax, [rbp+var_18]"], [108, "lea rsi, ds:0[rax*8]"], [109, "mov rax, [rbp+src]"], [110, "add rax, rsi"], [111, "sub rdx, rcx"], [112, "mov [rax], rdx"], [113, "mov rax, [rbp+var_18]"], [114, "lea rdx, ds:0[rax*8]"], [115, "mov rax, [rbp+src]"], [116, "add rax, rdx"], [117, "mov rax, [rax]"], [118, "movzx ecx, al"], [119, "mov rax, [rbp+var_38]"], [120, "mov rsi, [rax+10h]"], [121, "mov rdx, [rbp+src]"], [122, "mov rax, [rbp+var_18]"], [123, "mov rdi, rax"], [124, "call sub_4141B1"], [125, "nop"], [126, "leave"], [127, "retn"]], "data_dep": [[8, 7], [9, 8], [11, 7], [12, 11], [14, 12], [16, 7], [17, 16], [18, 17], [19, 5], [20, 19], [21, 20], [22, 4], [23, 22], [24, 21], [24, 23], [25, 24], [25, 21], [26, 25], [29, 3], [30, 64], [30, 70], [30, 29], [31, 71], [31, 27], [32, 31], [33, 30], [33, 32], [34, 64], [34, 70], [34, 33], [35, 34], [36, 62], [36, 18], [37, 70], [37, 64], [37, 36], [38, 4], [39, 64], [39, 70], [39, 38], [40, 70], [40, 64], [40, 39], [41, 40], [41, 35], [42, 41], [42, 37], [43, 6], [44, 42], [44, 43], [45, 44], [46, 4], [47, 64], [47, 70], [47, 46], [48, 35], [49, 62], [49, 18], [50, 26], [51, 50], [53, 5], [54, 53], [54, 64], [54, 70], [55, 45], [56, 62], [56, 18], [57, 21], [58, 57], [60, 62], [60, 18], [61, 70], [61, 56], [61, 60], [61, 64], [62, 61], [63, 35], [64, 63], [64, 60], [65, 21], [66, 65], [67, 63], [68, 62], [69, 67], [69, 68], [70, 69], [71, 71], [71, 27], [72, 27], [72, 71], [73, 21], [73, 72], [74, 73], [75, 21], [76, 10], [76, 67], [77, 3], [78, 77], [78, 70], [78, 93], [78, 64], [78, 112], [79, 62], [79, 18], [80, 79], [81, 78], [83, 21], [84, 76], [85, 18], [85, 62], [86, 85], [86, 84], [87, 64], [87, 112], [87, 70], [87, 93], [87, 86], [88, 21], [89, 79], [90, 62], [90, 18], [91, 89], [91, 90], [92, 87], [93, 92], [93, 91], [94, 5], [95, 93], [95, 94], [96, 62], [96, 18], [97, 62], [97, 18], [98, 21], [99, 98], [101, 100], [102, 21], [103, 96], [104, 62], [104, 18], [105, 104], [105, 103], [106, 93], [106, 105], [107, 21], [108, 97], [109, 62], [109, 18], [110, 109], [110, 108], [111, 101], [111, 106], [112, 111], [112, 110], [113, 21], [114, 111], [115, 62], [115, 18], [116, 115], [116, 114], [117, 112], [117, 116], [118, 117], [119, 3], [120, 119], [120, 112], [121, 62], [121, 18], [122, 21], [123, 122], [127, 124]]}
{"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/cd3b74ec912721ad5b59a28b08fcafb8c2fd693e56eafaf70b22fa8b6ebd580c_cd3b74ec912721ad5b59a28b08fcafb8c2fd693e56eafaf70b22fa8b6ebd580c.jsonl.gz", "strip_func_name": "sub_4115C0", "query": "\n\n\nunsigned __int64 __fastcall sub_4115C0(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5)\n{\nunsigned __int64 v5; // rax\nunsigned __int64 *v6; // rax\nunsigned __int64 v11; // [rsp+30h] [rbp-30h]\nunsigned __int64 v12; // [rsp+38h] [rbp-28h]\nunsigned __int64 v13; // [rsp+40h] [rbp-20h]\nunsigned __int64 v14; // [rsp+48h] [rbp-18h]\nunsigned __int64 *src; // [rsp+50h] [rbp-10h]\nunsigned __int64 i; // [rsp+58h] [rbp-8h]\n\nmemset(*(void **)(a5 + 16), 0, 8LL * *(_QWORD *)(a5 + 8));\nsrc = *(unsigned __int64 **)(a5 + 16);\nv14 = *(_QWORD *)(a3 + 8);\nv5 = *(_QWORD *)(a2 + 8);\nif ( v14 <= v5 )\nv5 = *(_QWORD *)(a3 + 8);\nv13 = v5;\nfor ( i = 0LL; i < v14; ++i )\n{\nv12 = *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8 * i);\nv11 = (v12 * **(_QWORD **)(a2 + 16) + *src) * a4;\nsub_4101E7(v13, *(unsigned __int64 **)(a2 + 16), src, v12);\nsub_4101E7(v14, *(unsigned __int64 **)(a3 + 16), src, v11);\nv6 = src++;\n*v6 = v12;\nsrc[v14 + 1] = 0LL;\n}\nmemcpy(*(void **)(a1 + 16), src, 8 * v14);\n++src[v14];\nsrc[v14] -= sub_40FC82(v14, (__int64)src, (__int64)src, *(_QWORD *)(a3 + 16));\nreturn sub_4141B1(v14, *(_QWORD *)(a1 + 16), (__int64)src, src[v14]);\n}\n\n\n\nQ:[a1,a2,a3,a4,a5,v11,v12,v13,v14,src,sub_4115C0,sub_4101E7,sub_40FC82,sub_4141B1,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'A', 'a2': 'B', 'a3': 'N', 'a4': 'mm', 'a5': 'T', 'v11': 'u1', 'v12': 'u0', 'v13': 'm', 'v14': 'n', 'src': 'd', 'sub_4115C0': 'mpi_montmul', 'sub_4101E7': 'mpi_mul_hlp', 'sub_40FC82': 'mpi_sub_hlp', 'sub_4141B1': 'mbedtls_ct_mpi_uint_cond_assign'}"}
tftp_session_in_use
9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23
open-simh
simh
NA
static inline int tftp_session_in_use(struct tftp_session *spt) { return (spt->slirp != NULL); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4C8B46", "function_addr": 5016390, "binary_name": "9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov rax, [rbp+var_8]"], [4, "mov rax, [rax]"], [5, "test rax, rax"], [6, "setnz al"], [7, "movzx eax, al"], [8, "pop rbp"], [9, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 0], [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/9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23_9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23.jsonl.gz", "strip_func_name": "sub_4C8B46", "query": "\n\n\n_BOOL8 __fastcall sub_4C8B46(_QWORD *a1)\n{\nreturn *a1 != 0LL;\n}\n\n\n\nQ:[a1,sub_4C8B46,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'spt', 'sub_4C8B46': 'tftp_session_in_use'}"}
test_scan
f8e82a3dbaa4ed551e4883ddc4d924623ed5bdb55fc6a84ad4852ab590ec173c
koka-lang
nodec
NA
void test_scan (const struct message *r1, const struct message *r2, const struct message *r3) { char total[80*1024] = "\0"; char buf1[80*1024] = "\0"; char buf2[80*1024] = "\0"; char buf3[80*1024] = "\0"; strcat(total, r1->raw); strcat(total, r2->raw); strcat(total, r3->raw); size_t read; int total_len = strlen(total); int total_ops = 2 * (total_len - 1) * (total_len - 2) / 2; int ops = 0 ; size_t buf1_len, buf2_len, buf3_len; int message_count = count_parsed_messages(3, r1, r2, r3); int i,j,type_both; for (type_both = 0; type_both < 2; type_both ++ ) { for (j = 2; j < total_len; j ++ ) { for (i = 1; i < j; i ++ ) { if (ops % 1000 == 0) { printf("\b\b\b\b%3.0f%%", 100 * (float)ops /(float)total_ops); fflush(stdout); } ops += 1; parser_init(type_both ? HTTP_BOTH : r1->type); buf1_len = i; strlncpy(buf1, sizeof(buf1), total, buf1_len); buf1[buf1_len] = 0; buf2_len = j - i; strlncpy(buf2, sizeof(buf1), total+i, buf2_len); buf2[buf2_len] = 0; buf3_len = total_len - j; strlncpy(buf3, sizeof(buf1), total+j, buf3_len); buf3[buf3_len] = 0; assert(num_messages == 0); messages[0].headers_complete_cb_called = FALSE; read = parse(buf1, buf1_len); if (!messages[0].headers_complete_cb_called && parser.nread != read) { print_error(buf1, read); goto error; } if (parser.upgrade) goto test; if (read != buf1_len) { print_error(buf1, read); goto error; } read += parse(buf2, buf2_len); if (parser.upgrade) goto test; if (read != buf1_len + buf2_len) { print_error(buf2, read); goto error; } read += parse(buf3, buf3_len); if (parser.upgrade) goto test; if (read != buf1_len + buf2_len + buf3_len) { print_error(buf3, read); goto error; } parse(NULL, 0); test: if (parser.upgrade) { upgrade_message_fix(total, read, 3, r1, r2, r3); } if (message_count != num_messages) { fprintf(stderr, "\n\nParser didn't see %d messages only %d\n", message_count, num_messages); goto error; } if (!message_eq(0, 0, r1)) { fprintf(stderr, "\n\nError matching messages[0] in test_scan.\n"); goto error; } if (message_count > 1 && !message_eq(1, 0, r2)) { fprintf(stderr, "\n\nError matching messages[1] in test_scan.\n"); goto error; } if (message_count > 2 && !message_eq(2, 0, r3)) { fprintf(stderr, "\n\nError matching messages[2] in test_scan.\n"); goto error; } } } } puts("\b\b\b\b100%"); return; error: fprintf(stderr, "i=%d j=%d\n", i, j); fprintf(stderr, "buf1 (%u) %s\n\n", (unsigned int)buf1_len, buf1); fprintf(stderr, "buf2 (%u) %s\n\n", (unsigned int)buf2_len , buf2); fprintf(stderr, "buf3 (%u) %s\n", (unsigned int)buf3_len, buf3); abort(); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40ADAB", "function_addr": 4238763, "binary_name": "f8e82a3dbaa4ed551e4883ddc4d924623ed5bdb55fc6a84ad4852ab590ec173c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50060h"], [3, "mov [rbp+var_50048], rdi"], [4, "mov [rbp+var_50050], rsi"], [5, "mov [rbp+var_50058], rdx"], [6, "mov qword ptr [rbp+dest], 0"], [7, "mov [rbp+var_14038], 0"], [8, "lea rax, [rbp+s]"], [9, "mov edx, 13FF0h"], [10, "mov esi, 0"], [11, "mov rdi, rax"], [12, "call _memset"], [13, "mov [rbp+var_28040], 0"], [14, "mov [rbp+var_28038], 0"], [15, "lea rax, [rbp+var_28030]"], [16, "mov edx, 13FF0h"], [17, "mov esi, 0"], [18, "mov rdi, rax"], [19, "call _memset"], [20, "mov [rbp+var_3C040], 0"], [21, "mov [rbp+var_3C038], 0"], [22, "lea rax, [rbp+var_3C030]"], [23, "mov edx, 13FF0h"], [24, "mov esi, 0"], [25, "mov rdi, rax"], [26, "call _memset"], [27, "mov [rbp+var_50040], 0"], [28, "mov [rbp+var_50038], 0"], [29, "lea rax, [rbp+var_50030]"], [30, "mov edx, 13FF0h"], [31, "mov esi, 0"], [32, "mov rdi, rax"], [33, "call _memset"], [34, "mov rax, [rbp+var_50048]"], [35, "mov rdx, [rax+8]"], [36, "lea rax, [rbp+dest]"], [37, "mov rsi, rdx"], [38, "mov rdi, rax"], [39, "call _strcat"], [40, "mov rax, [rbp+var_50050]"], [41, "mov rdx, [rax+8]"], [42, "lea rax, [rbp+dest]"], [43, "mov rsi, rdx"], [44, "mov rdi, rax"], [45, "call _strcat"], [46, "mov rax, [rbp+var_50058]"], [47, "mov rdx, [rax+8]"], [48, "lea rax, [rbp+dest]"], [49, "mov rsi, rdx"], [50, "mov rdi, rax"], [51, "call _strcat"], [52, "lea rax, [rbp+dest]"], [53, "mov rdi, rax"], [54, "call _strlen"], [55, "mov [rbp+var_1C], eax"], [56, "mov eax, [rbp+var_1C]"], [57, "lea edx, [rax-1]"], [58, "mov eax, [rbp+var_1C]"], [59, "sub eax, 2"], [60, "imul eax, edx"], [61, "mov [rbp+var_20], eax"], [62, "mov [rbp+var_C], 0"], [63, "mov rcx, [rbp+var_50058]"], [64, "mov rdx, [rbp+var_50050]"], [65, "mov rax, [rbp+var_50048]"], [66, "mov rsi, rax"], [67, "mov edi, 3"], [68, "mov eax, 0"], [69, "call sub_4090EC"], [70, "mov [rbp+var_24], eax"], [71, "mov [rbp+var_18], 0"], [72, "jmp loc_40B3A7"], [73, "mov [rbp+var_14], 2"], [74, "jmp loc_40B397"], [75, "mov [rbp+var_10], 1"], [76, "jmp loc_40B387"], [77, "mov edx, [rbp+var_C]"], [78, "movsxd rax, edx"], [79, "imul rax, 10624DD3h"], [80, "shr rax, 20h"], [81, "sar eax, 6"], [82, "mov ecx, edx"], [83, "sar ecx, 1Fh"], [84, "sub eax, ecx"], [85, "imul ecx, eax, 3E8h"], [86, "mov eax, edx"], [87, "sub eax, ecx"], [88, "test eax, eax"], [89, "jnz short loc_40AFD2"], [90, "pxor xmm1, xmm1"], [91, "cvtsi2ss xmm1, [rbp+var_C]"], [92, "movss xmm0, cs:dword_898738"], [93, "mulss xmm0, xmm1"], [94, "pxor xmm1, xmm1"], [95, "cvtsi2ss xmm1, [rbp+var_20]"], [96, "divss xmm0, xmm1"], [97, "pxor xmm2, xmm2"], [98, "cvtss2sd xmm2, xmm0"], [99, "movq rax, xmm2"], [100, "movq xmm0, rax"], [101, "mov edi, offset a30f"], [102, "mov eax, 1"], [103, "call _printf"], [104, "mov rax, cs:stdout"], [105, "mov rdi, rax"], [106, "call _fflush"], [107, "add [rbp+var_C], 1"], [108, "cmp [rbp+var_18], 0"], [109, "jnz short loc_40AFE8"], [110, "mov rax, [rbp+var_50048]"], [111, "mov eax, [rax+10h]"], [112, "jmp short loc_40AFED"], [113, "mov eax, 2"], [114, "mov edi, eax"], [115, "call sub_4083CD"], [116, "mov eax, [rbp+var_10]"], [117, "cdqe"], [118, "mov [rbp+var_30], rax"], [119, "mov rcx, [rbp+var_30]"], [120, "lea rdx, [rbp+dest]"], [121, "lea rax, [rbp+var_28040]"], [122, "mov esi, 14000h"], [123, "mov rdi, rax"], [124, "call sub_407162"], [125, "lea rdx, [rbp+var_28040]"], [126, "mov rax, [rbp+var_30]"], [127, "add rax, rdx"], [128, "mov byte ptr [rax], 0"], [129, "mov eax, [rbp+var_14]"], [130, "sub eax, [rbp+var_10]"], [131, "cdqe"], [132, "mov [rbp+var_38], rax"], [133, "mov eax, [rbp+var_10]"], [134, "cdqe"], [135, "lea rdx, [rbp+dest]"], [136, "lea rsi, [rdx+rax]"], [137, "mov rdx, [rbp+var_38]"], [138, "lea rax, [rbp+var_3C040]"], [139, "mov rcx, rdx"], [140, "mov rdx, rsi"], [141, "mov esi, 14000h"], [142, "mov rdi, rax"], [143, "call sub_407162"], [144, "lea rdx, [rbp+var_3C040]"], [145, "mov rax, [rbp+var_38]"], [146, "add rax, rdx"], [147, "mov byte ptr [rax], 0"], [148, "mov eax, [rbp+var_1C]"], [149, "sub eax, [rbp+var_14]"], [150, "cdqe"], [151, "mov [rbp+var_40], rax"], [152, "mov eax, [rbp+var_14]"], [153, "cdqe"], [154, "lea rdx, [rbp+dest]"], [155, "lea rsi, [rdx+rax]"], [156, "mov rdx, [rbp+var_40]"], [157, "lea rax, [rbp+var_50040]"], [158, "mov rcx, rdx"], [159, "mov rdx, rsi"], [160, "mov esi, 14000h"], [161, "mov rdi, rax"], [162, "call sub_407162"], [163, "lea rdx, [rbp+var_50040]"], [164, "mov rax, [rbp+var_40]"], [165, "add rax, rdx"], [166, "mov byte ptr [rax], 0"], [167, "mov eax, cs:dword_8EBBB8"], [168, "test eax, eax"], [169, "jz short loc_40B0E6"], [170, "mov ecx, offset aTestScan"], [171, "mov edx, 0F61h"], [172, "mov esi, offset aTestC"], [173, "mov edi, offset aNumMessages0"], [174, "call ___assert_fail"], [175, "mov cs:dword_8AB8C0, 0"], [176, "mov rdx, [rbp+var_30]"], [177, "lea rax, [rbp+var_28040]"], [178, "mov rsi, rdx"], [179, "mov rdi, rax"], [180, "call sub_408408"], [181, "mov [rbp+var_8], rax"], [182, "mov eax, cs:dword_8AB8C0"], [183, "test eax, eax"], [184, "jnz short loc_40B13D"], [185, "mov eax, cs:dword_89B7E4"], [186, "mov eax, eax"], [187, "cmp [rbp+var_8], rax"], [188, "jz short loc_40B13D"], [189, "mov rdx, [rbp+var_8]"], [190, "lea rax, [rbp+var_28040]"], [191, "mov rsi, rdx"], [192, "mov rdi, rax"], [193, "call sub_40940C"], [194, "jmp loc_40B3C0"], [195, "movzx eax, cs:byte_89B7F7"], [196, "and eax, 0FFFFFF80h"], [197, "test al, al"], [198, "jnz loc_40B238"], [199, "mov rax, [rbp+var_8]"], [200, "cmp rax, [rbp+var_30]"], [201, "jz short loc_40B174"], [202, "mov rdx, [rbp+var_8]"], [203, "lea rax, [rbp+var_28040]"], [204, "mov rsi, rdx"], [205, "mov rdi, rax"], [206, "call sub_40940C"], [207, "jmp loc_40B3C0"], [208, "mov rdx, [rbp+var_38]"], [209, "lea rax, [rbp+var_3C040]"], [210, "mov rsi, rdx"], [211, "mov rdi, rax"], [212, "call sub_408408"], [213, "add [rbp+var_8], rax"], [214, "movzx eax, cs:byte_89B7F7"], [215, "and eax, 0FFFFFF80h"], [216, "test al, al"], [217, "jnz loc_40B23B"], [218, "mov rdx, [rbp+var_30]"], [219, "mov rax, [rbp+var_38]"], [220, "add rax, rdx"], [221, "cmp [rbp+var_8], rax"], [222, "jz short loc_40B1CC"], [223, "mov rdx, [rbp+var_8]"], [224, "lea rax, [rbp+var_3C040]"], [225, "mov rsi, rdx"], [226, "mov rdi, rax"], [227, "call sub_40940C"], [228, "jmp loc_40B3C0"], [229, "mov rdx, [rbp+var_40]"], [230, "lea rax, [rbp+var_50040]"], [231, "mov rsi, rdx"], [232, "mov rdi, rax"], [233, "call sub_408408"], [234, "add [rbp+var_8], rax"], [235, "movzx eax, cs:byte_89B7F7"], [236, "and eax, 0FFFFFF80h"], [237, "test al, al"], [238, "jnz short loc_40B23E"], [239, "mov rdx, [rbp+var_30]"], [240, "mov rax, [rbp+var_38]"], [241, "add rdx, rax"], [242, "mov rax, [rbp+var_40]"], [243, "add rax, rdx"], [244, "cmp [rbp+var_8], rax"], [245, "jz short loc_40B227"], [246, "mov rdx, [rbp+var_8]"], [247, "lea rax, [rbp+var_50040]"], [248, "mov rsi, rdx"], [249, "mov rdi, rax"], [250, "call sub_40940C"], [251, "jmp loc_40B3C0"], [252, "mov esi, 0"], [253, "mov edi, 0"], [254, "call sub_408408"], [255, "jmp short loc_40B23F"], [256, "nop"], [257, "jmp short loc_40B23F"], [258, "nop"], [259, "jmp short loc_40B23F"], [260, "nop"], [261, "movzx eax, cs:byte_89B7F7"], [262, "and eax, 0FFFFFF80h"], [263, "test al, al"], [264, "jz short loc_40B288"], [265, "mov rdi, [rbp+var_50058]"], [266, "mov rcx, [rbp+var_50050]"], [267, "mov rdx, [rbp+var_50048]"], [268, "mov rsi, [rbp+var_8]"], [269, "lea rax, [rbp+dest]"], [270, "mov r9, rdi"], [271, "mov r8, rcx"], [272, "mov rcx, rdx"], [273, "mov edx, 3"], [274, "mov rdi, rax"], [275, "mov eax, 0"], [276, "call sub_40920B"], [277, "mov eax, cs:dword_8EBBB8"], [278, "cmp [rbp+var_24], eax"], [279, "jz short loc_40B2BA"], [280, "mov ecx, cs:dword_8EBBB8"], [281, "mov rax, cs:stderr"], [282, "mov edx, [rbp+var_24]"], [283, "mov esi, offset aParserDidnTSee_0"], [284, "mov rdi, rax"], [285, "mov eax, 0"], [286, "call _fprintf"], [287, "jmp loc_40B3C0"], [288, "mov rax, [rbp+var_50048]"], [289, "mov rdx, rax"], [290, "mov esi, 0"], [291, "mov edi, 0"], [292, "call sub_408720"], [293, "test eax, eax"], [294, "jnz short loc_40B2FA"], [295, "mov rax, cs:stderr"], [296, "mov rcx, rax"], [297, "mov edx, 2Bh "], [298, "mov esi, 1"], [299, "mov edi, offset aErrorMatchingM"], [300, "call _fwrite"], [301, "jmp loc_40B3C0"], [302, "cmp [rbp+var_24], 1"], [303, "jle short loc_40B340"], [304, "mov rax, [rbp+var_50050]"], [305, "mov rdx, rax"], [306, "mov esi, 0"], [307, "mov edi, 1"], [308, "call sub_408720"], [309, "test eax, eax"], [310, "jnz short loc_40B340"], [311, "mov rax, cs:stderr"], [312, "mov rcx, rax"], [313, "mov edx, 2Bh "], [314, "mov esi, 1"], [315, "mov edi, offset aErrorMatchingM_0"], [316, "call _fwrite"], [317, "jmp loc_40B3C0"], [318, "cmp [rbp+var_24], 2"], [319, "jle short loc_40B383"], [320, "mov rax, [rbp+var_50058]"], [321, "mov rdx, rax"], [322, "mov esi, 0"], [323, "mov edi, 2"], [324, "call sub_408720"], [325, "test eax, eax"], [326, "jnz short loc_40B383"], [327, "mov rax, cs:stderr"], [328, "mov rcx, rax"], [329, "mov edx, 2Bh "], [330, "mov esi, 1"], [331, "mov edi, offset aErrorMatchingM_1"], [332, "call _fwrite"], [333, "jmp short loc_40B3C0"], [334, "add [rbp+var_10], 1"], [335, "mov eax, [rbp+var_10]"], [336, "cmp eax, [rbp+var_14]"], [337, "jl loc_40AF57"], [338, "add [rbp+var_14], 1"], [339, "mov eax, [rbp+var_14]"], [340, "cmp eax, [rbp+var_1C]"], [341, "jl loc_40AF4B"], [342, "add [rbp+var_18], 1"], [343, "cmp [rbp+var_18], 1"], [344, "jle loc_40AF3F"], [345, "mov edi, offset a100"], [346, "call _puts"], [347, "jmp locret_40B465"], [348, "mov rax, cs:stderr"], [349, "mov ecx, [rbp+var_14]"], [350, "mov edx, [rbp+var_10]"], [351, "mov esi, offset aIDJD"], [352, "mov rdi, rax"], [353, "mov eax, 0"], [354, "call _fprintf"], [355, "mov rax, [rbp+var_30]"], [356, "mov esi, eax"], [357, "mov rax, cs:stderr"], [358, "lea rdx, [rbp+var_28040]"], [359, "mov rcx, rdx"], [360, "mov edx, esi"], [361, "mov esi, offset aBuf1US"], [362, "mov rdi, rax"], [363, "mov eax, 0"], [364, "call _fprintf"], [365, "mov rax, [rbp+var_38]"], [366, "mov esi, eax"], [367, "mov rax, cs:stderr"], [368, "lea rdx, [rbp+var_3C040]"], [369, "mov rcx, rdx"], [370, "mov edx, esi"], [371, "mov esi, offset aBuf2US"], [372, "mov rdi, rax"], [373, "mov eax, 0"], [374, "call _fprintf"], [375, "mov rax, [rbp+var_40]"], [376, "mov esi, eax"], [377, "mov rax, cs:stderr"], [378, "lea rdx, [rbp+var_50040]"], [379, "mov rcx, rdx"], [380, "mov edx, esi"], [381, "mov esi, offset aBuf3US"], [382, "mov rdi, rax"], [383, "mov eax, 0"], [384, "call _fprintf"], [385, "call _abort"], [386, "leave"], [387, "retn"]], "data_dep": [[11, 8], [15, 12], [18, 15], [22, 19], [25, 22], [29, 26], [32, 29], [34, 3], [35, 34], [36, 34], [36, 6], [37, 35], [38, 36], [40, 4], [41, 40], [42, 6], [42, 40], [43, 41], [44, 42], [46, 5], [47, 46], [48, 6], [48, 46], [49, 47], [50, 48], [52, 51], [52, 6], [53, 52], [55, 54], [56, 55], [57, 47], [57, 56], [58, 55], [59, 58], [60, 59], [60, 57], [61, 60], [63, 5], [64, 4], [65, 3], [66, 65], [70, 69], [77, 107], [77, 62], [78, 77], [79, 78], [80, 79], [81, 80], [82, 77], [83, 82], [84, 83], [84, 81], [85, 84], [85, 83], [86, 77], [87, 86], [87, 85], [88, 87], [89, 88], [91, 90], [91, 62], [91, 107], [93, 92], [93, 91], [95, 94], [95, 61], [96, 95], [96, 93], [98, 97], [98, 96], [99, 98], [100, 99], [105, 104], [107, 62], [107, 107], [108, 342], [108, 71], [109, 108], [110, 3], [111, 110], [111, 166], [111, 147], [111, 128], [114, 111], [114, 113], [116, 75], [116, 334], [118, 116], [119, 118], [120, 77], [120, 6], [121, 13], [121, 116], [123, 121], [125, 13], [125, 120], [126, 118], [127, 126], [127, 125], [128, 127], [129, 73], [129, 338], [130, 334], [130, 75], [130, 129], [132, 130], [133, 334], [133, 75], [135, 6], [135, 125], [136, 133], [136, 128], [136, 122], [137, 132], [138, 133], [138, 20], [139, 137], [140, 136], [142, 138], [144, 20], [144, 140], [145, 132], [146, 145], [146, 144], [147, 146], [148, 55], [149, 73], [149, 338], [149, 148], [151, 149], [152, 73], [152, 338], [154, 6], [154, 144], [155, 152], [155, 147], [155, 141], [156, 151], [157, 27], [157, 152], [158, 156], [159, 155], [161, 157], [163, 159], [163, 27], [164, 151], [165, 164], [165, 163], [166, 165], [168, 167], [169, 168], [176, 118], [177, 13], [177, 168], [178, 176], [179, 177], [181, 180], [182, 175], [183, 182], [184, 183], [186, 185], [187, 186], [187, 181], [188, 187], [189, 181], [190, 186], [190, 13], [191, 189], [192, 190], [196, 195], [197, 196], [198, 197], [199, 181], [200, 118], [200, 199], [201, 200], [202, 181], [203, 199], [203, 13], [204, 202], [205, 203], [208, 132], [209, 20], [209, 199], [210, 208], [211, 209], [213, 181], [213, 212], [215, 214], [216, 215], [217, 216], [218, 118], [219, 132], [220, 219], [220, 218], [221, 213], [221, 220], [222, 221], [223, 213], [224, 220], [224, 20], [225, 223], [226, 224], [229, 151], [230, 220], [230, 27], [231, 229], [232, 230], [234, 213], [234, 233], [236, 235], [237, 236], [238, 237], [239, 118], [240, 132], [241, 240], [241, 239], [242, 151], [243, 242], [243, 241], [244, 234], [244, 243], [245, 244], [246, 234], [247, 243], [247, 27], [248, 246], [249, 247], [262, 261], [263, 262], [264, 263], [265, 5], [266, 4], [267, 3], [268, 213], [268, 181], [268, 234], [269, 263], [269, 6], [270, 265], [271, 266], [272, 267], [274, 269], [278, 277], [278, 70], [279, 278], [282, 70], [284, 281], [288, 3], [289, 288], [293, 292], [294, 293], [296, 295], [302, 70], [303, 302], [304, 4], [305, 304], [309, 308], [310, 309], [312, 311], [318, 70], [319, 318], [320, 5], [321, 320], [325, 324], [326, 325], [328, 327], [334, 75], [334, 334], [335, 334], [335, 75], [336, 335], [336, 73], [336, 338], [337, 336], [338, 73], [338, 338], [339, 73], [339, 338], [340, 339], [340, 55], [341, 340], [342, 71], [342, 342], [343, 342], [343, 71], [344, 343], [349, 73], [349, 338], [350, 75], [350, 334], [352, 348], [355, 118], [356, 355], [358, 350], [358, 13], [359, 358], [360, 356], [362, 357], [365, 132], [366, 365], [368, 20], [368, 360], [369, 368], [370, 366], [372, 367], [375, 151], [376, 375], [378, 370], [378, 27], [379, 378], [380, 376], [382, 377], [387, 346]]}
{"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/f8e82a3dbaa4ed551e4883ddc4d924623ed5bdb55fc6a84ad4852ab590ec173c_f8e82a3dbaa4ed551e4883ddc4d924623ed5bdb55fc6a84ad4852ab590ec173c.jsonl.gz", "strip_func_name": "sub_40ADAB", "query": "\n\n\nint __fastcall sub_40ADAB(__int64 a1, __int64 a2, __int64 a3)\n{\n__int64 v3; // r8\n__int64 v4; // r9\nint v5; // eax\n__int64 v6; // rax\n__int64 v7; // rax\n__int64 v10[2]; // [rsp+20h] [rbp-50040h] BYREF\nchar v11[81904]; // [rsp+30h] [rbp-50030h] BYREF\n__int64 v12[2]; // [rsp+14020h] [rbp-3C040h] BYREF\nchar v13[81904]; // [rsp+14030h] [rbp-3C030h] BYREF\n__int64 v14[2]; // [rsp+28020h] [rbp-28040h] BYREF\nchar v15[81904]; // [rsp+28030h] [rbp-28030h] BYREF\nchar dest[8]; // [rsp+3C020h] [rbp-14040h] BYREF\n__int64 v17; // [rsp+3C028h] [rbp-14038h]\nchar s[81904]; // [rsp+3C030h] [rbp-14030h] BYREF\nsize_t v19; // [rsp+50020h] [rbp-40h]\nsize_t v20; // [rsp+50028h] [rbp-38h]\n__int64 v21; // [rsp+50030h] [rbp-30h]\nint v22; // [rsp+5003Ch] [rbp-24h]\nint v23; // [rsp+50040h] [rbp-20h]\nint v24; // [rsp+50044h] [rbp-1Ch]\nint i; // [rsp+50048h] [rbp-18h]\nint j; // [rsp+5004Ch] [rbp-14h]\nunsigned int k; // [rsp+50050h] [rbp-10h]\nint v28; // [rsp+50054h] [rbp-Ch]\n__int64 v29; // [rsp+50058h] [rbp-8h]\n\n*(_QWORD *)dest = 0LL;\nv17 = 0LL;\nmemset(s, 0, sizeof(s));\nv14[0] = 0LL;\nv14[1] = 0LL;\nmemset(v15, 0, sizeof(v15));\nv12[0] = 0LL;\nv12[1] = 0LL;\nmemset(v13, 0, sizeof(v13));\nv10[0] = 0LL;\nv10[1] = 0LL;\nmemset(v11, 0, sizeof(v11));\nstrcat(dest, *(const char **)(a1 + 8));\nstrcat(dest, *(const char **)(a2 + 8));\nstrcat(dest, *(const char **)(a3 + 8));\nv24 = strlen(dest);\nv23 = (v24 - 1) * (v24 - 2);\nv28 = 0;\nv22 = sub_4090EC(3uLL, a1, a2, a3, v3, v4);\nfor ( i = 0; i <= 1; ++i )\n{\nfor ( j = 2; j < v24; ++j )\n{\nfor ( k = 1; (int)k < j; ++k )\n{\nif ( !(v28 % 1000) )\n{\nprintf(\"\\b\\b\\b\\b%3.0f%%\", (float)((float)(100.0 * (float)v28) / (float)v23));\nfflush(stdout);\n}\n++v28;\nif ( i )\nv5 = 2;\nelse\nv5 = *(_DWORD *)(a1 + 16);\nsub_4083CD(v5);\nv21 = (int)k;\nsub_407162(v14, 0x14000uLL, dest, (int)k);\n*((_BYTE *)v14 + v21) = 0;\nv20 = (int)(j - k);\nsub_407162(v12, 0x14000uLL, &dest[k], v20);\n*((_BYTE *)v12 + v20) = 0;\nv19 = v24 - j;\nsub_407162(v10, 0x14000uLL, &dest[j], v19);\n*((_BYTE *)v10 + v19) = 0;\nif ( dword_8EBBB8 )\n__assert_fail(\"num_messages == 0\", \"test.c\", 0xF61u, \"test_scan\");\ndword_8AB8C0[0] = 0;\nv29 = sub_408408((unsigned __int8 *)v14, v21);\nif ( !dword_8AB8C0[0] && v29 != dword_89B7E4 )\n{\nLABEL_13:\nsub_40940C((const char *)v14, v29);\ngoto LABEL_42;\n}\nif ( byte_89B7F7 >= 0 )\n{\nif ( v29 != v21 )\ngoto LABEL_13;\nv6 = sub_408408((unsigned __int8 *)v12, v20);\nv29 += v6;\nif ( byte_89B7F7 >= 0 )\n{\nif ( v29 != v21 + v20 )\n{\nsub_40940C((const char *)v12, v29);\ngoto LABEL_42;\n}\nv7 = sub_408408((unsigned __int8 *)v10, v19);\nv29 += v7;\nif ( byte_89B7F7 >= 0 )\n{\nif ( v29 != v20 + v21 + v19 )\n{\nsub_40940C((const char *)v10, v29);\ngoto LABEL_42;\n}\nsub_408408(0LL, 0LL);\n}\n}\n}\nif ( byte_89B7F7 < 0 )\nsub_40920B((__int64)dest, v29, 3uLL, a1, a2, a3);\nif ( v22 != dword_8EBBB8 )\n{\nfprintf(stderr, \"\\n\\nParser didn't see %d messages only %d\\n\", (unsigned int)v22, (unsigned int)dword_8EBBB8);\ngoto LABEL_42;\n}\nif ( !sub_408720(0, 0, a1) )\n{\nfwrite(\"\\n\\nError matching messages[0] in test_scan.\\n\", 1uLL, 0x2BuLL, stderr);\ngoto LABEL_42;\n}\nif ( v22 > 1 && !sub_408720(1, 0, a2) )\n{\nfwrite(\"\\n\\nError matching messages[1] in test_scan.\\n\", 1uLL, 0x2BuLL, stderr);\ngoto LABEL_42;\n}\nif ( v22 > 2 && !sub_408720(2, 0, a3) )\n{\nfwrite(\"\\n\\nError matching messages[2] in test_scan.\\n\", 1uLL, 0x2BuLL, stderr);\nLABEL_42:\nfprintf(stderr, \"i=%d j=%d\\n\", k, (unsigned int)j);\nfprintf(stderr, \"buf1 (%u) %s\\n\\n\", (unsigned int)v21, (const char *)v14);\nfprintf(stderr, \"buf2 (%u) %s\\n\\n\", (unsigned int)v20, (const char *)v12);\nfprintf(stderr, \"buf3 (%u) %s\\n\", (unsigned int)v19, (const char *)v10);\nabort();\n}\n}\n}\n}\nreturn puts(\"\\b\\b\\b\\b100%\");\n}\n\n\n\nQ:[a3,a1,a2,v10,v12,v14,dest,v19,v20,v21,v22,v23,v24,i,v28,v29,sub_40ADAB,sub_4090EC,sub_4083CD,sub_407162,sub_408408,sub_40940C,sub_40920B,sub_408720,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'r3', 'a1': 'r1', 'a2': 'r2', 'v10': 'buf3', 'v12': 'buf2', 'v14': 'buf1', 'dest': 'total', 'v19': 'buf3_len', 'v20': 'buf2_len', 'v21': 'buf1_len', 'v22': 'message_count', 'v23': 'total_ops', 'v24': 'total_len', 'i': 'type_both', 'v28': 'ops', 'v29': 'read', 'sub_40ADAB': 'test_scan', 'sub_4090EC': 'count_parsed_messages', 'sub_4083CD': 'parser_init', 'sub_407162': 'strlncpy', 'sub_408408': 'parse', 'sub_40940C': 'print_error', 'sub_40920B': 'upgrade_message_fix', 'sub_408720': 'message_eq'}"}
read_beheaded_image
ad3ac0cda59574dd9c04213cb9565db060b56b512d981d9018d4f5ccd012e3d4
gfacciol
mgm
NA
static int read_beheaded_image(struct iio_image *x, FILE *f, char *h, int hn, int fmt) { IIO_DEBUG("rbi fmt = %d\n", fmt); // these functions can be defined in separate, independent files // TODO: turn this function into an array of pointers to functions, // indexed by a format enum switch(fmt) { case IIO_FORMAT_QNM: return read_beheaded_qnm (x, f, h, hn); case IIO_FORMAT_RIM: return read_beheaded_rim (x, f, h, hn); case IIO_FORMAT_PFM: return read_beheaded_pfm (x, f, h, hn); case IIO_FORMAT_FLO: return read_beheaded_flo (x, f, h, hn); case IIO_FORMAT_JUV: return read_beheaded_juv (x, f, h, hn); case IIO_FORMAT_LUM: return read_beheaded_lum (x, f, h, hn); case IIO_FORMAT_PCM: return read_beheaded_pcm (x, f, h, hn); case IIO_FORMAT_ASC: return read_beheaded_asc (x, f, h, hn); case IIO_FORMAT_TXT: return read_beheaded_txt (x, f, h, hn); case IIO_FORMAT_BMP: return read_beheaded_bmp (x, f, h, hn); case IIO_FORMAT_PDS: return read_beheaded_pds (x, f, h, hn); case IIO_FORMAT_RAW: return read_beheaded_raw (x, f, h, hn); case IIO_FORMAT_CSV: return read_beheaded_csv (x, f, h, hn); case IIO_FORMAT_VRT: return read_beheaded_vrt (x, f, h, hn); case IIO_FORMAT_FFD: return read_beheaded_ffd (x, f, h, hn); case IIO_FORMAT_DLM: return read_beheaded_dlm (x, f, h, hn); case IIO_FORMAT_NPY: return read_beheaded_npy (x, f, h, hn); case IIO_FORMAT_RAT: return read_beheaded_rat (x, f, h, hn); case IIO_FORMAT_VIC: return read_beheaded_vic (x, f, h, hn); case IIO_FORMAT_FIT: return read_beheaded_fit (x, f, h, hn); case IIO_FORMAT_CCS: return read_beheaded_ccs (x, f, h, hn); #ifdef I_CAN_HAS_LIBPNG case IIO_FORMAT_PNG: return read_beheaded_png (x, f, h, hn); #endif #ifdef I_CAN_HAS_LIBJPEG case IIO_FORMAT_JPEG: return read_beheaded_jpeg(x, f, h, hn); #endif #ifdef I_CAN_HAS_LIBTIFF case IIO_FORMAT_TIFF: return read_beheaded_tiff(x, f, h, hn); #endif #ifdef I_CAN_HAS_LIBEXR case IIO_FORMAT_EXR: return read_beheaded_exr (x, f, h, hn); #endif #ifdef I_CAN_HAS_LIBHDF5 case IIO_FORMAT_HDF5: return read_beheaded_hdf5 (x, f, h, hn); #endif #ifdef I_CAN_HAS_LIBWEBP case IIO_FORMAT_WEBP: return read_beheaded_webp (x, f, h, hn); #endif #ifdef I_CAN_HAS_LIBHEIF case IIO_FORMAT_HEIF: return read_beheaded_heif (x, f, h, hn); #endif /* case IIO_FORMAT_JP2: return read_beheaded_jp2 (x, f, h, hn); case IIO_FORMAT_VTK: return read_beheaded_vtk (x, f, h, hn); case IIO_FORMAT_CIMG: return read_beheaded_cimg(x, f, h, hn); case IIO_FORMAT_PAU: return read_beheaded_pau (x, f, h, hn); case IIO_FORMAT_DICOM: return read_beheaded_dicom(x, f, h, hn); case IIO_FORMAT_NIFTI: return read_beheaded_nifti(x, f, h, hn); case IIO_FORMAT_PCX: return read_beheaded_pcx (x, f, h, hn); case IIO_FORMAT_GIF: return read_beheaded_gif (x, f, h, hn); case IIO_FORMAT_XPM: return read_beheaded_xpm (x, f, h, hn); case IIO_FORMAT_RAFA: return read_beheaded_rafa (x, f, h, hn); */ #ifdef I_CAN_HAS_WHATEVER case IIO_FORMAT_UNRECOGNIZED: return read_beheaded_whatever(x,f,h,hn); #else case IIO_FORMAT_UNRECOGNIZED: return -2; #endif default: return -17; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42A8F4", "function_addr": 4368628, "binary_name": "ad3ac0cda59574dd9c04213cb9565db060b56b512d981d9018d4f5ccd012e3d4.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 [rbp+var_1C], ecx"], [7, "mov [rbp+var_20], r8d"], [8, "mov edi, offset aIioDebug"], [9, "call sub_4152F0"], [10, "test rax, rax"], [11, "jz loc_42A9D5"], [12, "mov edi, offset aIioDebug"], [13, "call sub_4152F0"], [14, "mov rdi, rax"], [15, "call _atoi"], [16, "cmp eax, 3"], [17, "jz short loc_42A94A"], [18, "cmp eax, 3"], [19, "jg short loc_42A9B8"], [20, "cmp eax, 1"], [21, "jz short loc_42A99A"], [22, "cmp eax, 2"], [23, "jz short loc_42A975"], [24, "jmp short loc_42A9B8"], [25, "mov rax, cs:stderr"], [26, "mov r8d, offset aReadBeheadedIm"], [27, "mov ecx, 13C7h"], [28, "mov edx, offset aIioIioC"], [29, "mov esi, offset aDebugSDS"], [30, "mov rdi, rax"], [31, "mov eax, 0"], [32, "call _fprintf"], [33, "jmp short loc_42A9B8"], [34, "mov rax, cs:stderr"], [35, "mov ecx, 13C7h"], [36, "mov edx, offset aIioIioC"], [37, "mov esi, offset aDebugSD"], [38, "mov rdi, rax"], [39, "mov eax, 0"], [40, "call _fprintf"], [41, "jmp short loc_42A9B8"], [42, "mov rax, cs:stderr"], [43, "mov rcx, rax"], [44, "mov edx, 7"], [45, "mov esi, 1"], [46, "mov edi, offset aDebug"], [47, "call _fwrite"], [48, "nop"], [49, "mov rax, cs:stderr"], [50, "mov edx, [rbp+var_20]"], [51, "mov esi, offset aRbiFmtD"], [52, "mov rdi, rax"], [53, "mov eax, 0"], [54, "call _fprintf"], [55, "mov eax, [rbp+var_20]"], [56, "add eax, 1"], [57, "cmp eax, 26h"], [58, "ja def_42A9EE"], [59, "mov eax, eax"], [60, "mov rax, ds:jpt_42A9EE[rax*8]"], [61, "jmp rax"], [62, "mov ecx, [rbp+var_1C]"], [63, "mov rdx, [rbp+var_18]"], [64, "mov rsi, [rbp+var_10]"], [65, "mov rax, [rbp+var_8]"], [66, "mov rdi, rax"], [67, "call sub_41D829"], [68, "jmp locret_42ACA2"], [69, "mov ecx, [rbp+var_1C]"], [70, "mov rdx, [rbp+var_18]"], [71, "mov rsi, [rbp+var_10]"], [72, "mov rax, [rbp+var_8]"], [73, "mov rdi, rax"], [74, "call sub_41F507"], [75, "jmp locret_42ACA2"], [76, "mov ecx, [rbp+var_1C]"], [77, "mov rdx, [rbp+var_18]"], [78, "mov rsi, [rbp+var_10]"], [79, "mov rax, [rbp+var_8]"], [80, "mov rdi, rax"], [81, "call sub_41F84F"], [82, "jmp locret_42ACA2"], [83, "mov ecx, [rbp+var_1C]"], [84, "mov rdx, [rbp+var_18]"], [85, "mov rsi, [rbp+var_10]"], [86, "mov rax, [rbp+var_8]"], [87, "mov rdi, rax"], [88, "call sub_41F9D6"], [89, "jmp locret_42ACA2"], [90, "mov ecx, [rbp+var_1C]"], [91, "mov rdx, [rbp+var_18]"], [92, "mov rsi, [rbp+var_10]"], [93, "mov rax, [rbp+var_8]"], [94, "mov rdi, rax"], [95, "call sub_41FA9E"], [96, "jmp locret_42ACA2"], [97, "mov ecx, [rbp+var_1C]"], [98, "mov rdx, [rbp+var_18]"], [99, "mov rsi, [rbp+var_10]"], [100, "mov rax, [rbp+var_8]"], [101, "mov rdi, rax"], [102, "call sub_41FEAA"], [103, "jmp locret_42ACA2"], [104, "mov ecx, [rbp+var_1C]"], [105, "mov rdx, [rbp+var_18]"], [106, "mov rsi, [rbp+var_10]"], [107, "mov rax, [rbp+var_8]"], [108, "mov rdi, rax"], [109, "call sub_41E0FD"], [110, "jmp locret_42ACA2"], [111, "mov ecx, [rbp+var_1C]"], [112, "mov rdx, [rbp+var_18]"], [113, "mov rsi, [rbp+var_10]"], [114, "mov rax, [rbp+var_8]"], [115, "mov rdi, rax"], [116, "call sub_420012"], [117, "jmp locret_42ACA2"], [118, "mov ecx, [rbp+var_1C]"], [119, "mov rdx, [rbp+var_18]"], [120, "mov rsi, [rbp+var_10]"], [121, "mov rax, [rbp+var_8]"], [122, "mov rdi, rax"], [123, "call sub_421447"], [124, "jmp locret_42ACA2"], [125, "mov ecx, [rbp+var_1C]"], [126, "mov rdx, [rbp+var_18]"], [127, "mov rsi, [rbp+var_10]"], [128, "mov rax, [rbp+var_8]"], [129, "mov rdi, rax"], [130, "call sub_41FFCE"], [131, "jmp locret_42ACA2"], [132, "mov ecx, [rbp+var_1C]"], [133, "mov rdx, [rbp+var_18]"], [134, "mov rsi, [rbp+var_10]"], [135, "mov rax, [rbp+var_8]"], [136, "mov rdi, rax"], [137, "call sub_4204A5"], [138, "jmp locret_42ACA2"], [139, "mov ecx, [rbp+var_1C]"], [140, "mov rdx, [rbp+var_18]"], [141, "mov rsi, [rbp+var_10]"], [142, "mov rax, [rbp+var_8]"], [143, "mov rdi, rax"], [144, "call sub_42559E"], [145, "jmp locret_42ACA2"], [146, "mov ecx, [rbp+var_1C]"], [147, "mov rdx, [rbp+var_18]"], [148, "mov rsi, [rbp+var_10]"], [149, "mov rax, [rbp+var_8]"], [150, "mov rdi, rax"], [151, "call sub_4212B4"], [152, "jmp locret_42ACA2"], [153, "mov ecx, [rbp+var_1C]"], [154, "mov rdx, [rbp+var_18]"], [155, "mov rsi, [rbp+var_10]"], [156, "mov rax, [rbp+var_8]"], [157, "mov rdi, rax"], [158, "call sub_421802"], [159, "jmp locret_42ACA2"], [160, "mov ecx, [rbp+var_1C]"], [161, "mov rdx, [rbp+var_18]"], [162, "mov rsi, [rbp+var_10]"], [163, "mov rax, [rbp+var_8]"], [164, "mov rdi, rax"], [165, "call sub_421DD3"], [166, "jmp locret_42ACA2"], [167, "mov ecx, [rbp+var_1C]"], [168, "mov rdx, [rbp+var_18]"], [169, "mov rsi, [rbp+var_10]"], [170, "mov rax, [rbp+var_8]"], [171, "mov rdi, rax"], [172, "call sub_4215DA"], [173, "jmp locret_42ACA2"], [174, "mov ecx, [rbp+var_1C]"], [175, "mov rdx, [rbp+var_18]"], [176, "mov rsi, [rbp+var_10]"], [177, "mov rax, [rbp+var_8]"], [178, "mov rdi, rax"], [179, "call sub_4223BA"], [180, "jmp locret_42ACA2"], [181, "mov ecx, [rbp+var_1C]"], [182, "mov rdx, [rbp+var_18]"], [183, "mov rsi, [rbp+var_10]"], [184, "mov rax, [rbp+var_8]"], [185, "mov rdi, rax"], [186, "call sub_421F0A"], [187, "jmp locret_42ACA2"], [188, "mov ecx, [rbp+var_1C]"], [189, "mov rdx, [rbp+var_18]"], [190, "mov rsi, [rbp+var_10]"], [191, "mov rax, [rbp+var_8]"], [192, "mov rdi, rax"], [193, "call sub_422F0C"], [194, "jmp locret_42ACA2"], [195, "mov ecx, [rbp+var_1C]"], [196, "mov rdx, [rbp+var_18]"], [197, "mov rsi, [rbp+var_10]"], [198, "mov rax, [rbp+var_8]"], [199, "mov rdi, rax"], [200, "call sub_423CB7"], [201, "jmp locret_42ACA2"], [202, "mov ecx, [rbp+var_1C]"], [203, "mov rdx, [rbp+var_18]"], [204, "mov rsi, [rbp+var_10]"], [205, "mov rax, [rbp+var_8]"], [206, "mov rdi, rax"], [207, "call sub_423C35"], [208, "jmp short locret_42ACA2"], [209, "mov ecx, [rbp+var_1C]"], [210, "mov rdx, [rbp+var_18]"], [211, "mov rsi, [rbp+var_10]"], [212, "mov rax, [rbp+var_8]"], [213, "mov rdi, rax"], [214, "call sub_41A363"], [215, "jmp short locret_42ACA2"], [216, "mov ecx, [rbp+var_1C]"], [217, "mov rdx, [rbp+var_18]"], [218, "mov rsi, [rbp+var_10]"], [219, "mov rax, [rbp+var_8]"], [220, "mov rdi, rax"], [221, "call sub_41AF3F"], [222, "jmp short locret_42ACA2"], [223, "mov ecx, [rbp+var_1C]"], [224, "mov rdx, [rbp+var_18]"], [225, "mov rsi, [rbp+var_10]"], [226, "mov rax, [rbp+var_8]"], [227, "mov rdi, rax"], [228, "call sub_41D52D"], [229, "jmp short locret_42ACA2"], [230, "mov ecx, [rbp+var_1C]"], [231, "mov rdx, [rbp+var_18]"], [232, "mov rsi, [rbp+var_10]"], [233, "mov rax, [rbp+var_8]"], [234, "mov rdi, rax"], [235, "call sub_425FB6"], [236, "jmp short locret_42ACA2"], [237, "mov eax, 0FFFFFFEFh"], [238, "leave"], [239, "retn"]], "data_dep": [[10, 9], [11, 10], [14, 13], [16, 15], [17, 16], [18, 15], [19, 18], [20, 15], [21, 20], [22, 15], [23, 22], [30, 25], [38, 34], [43, 42], [50, 7], [52, 49], [55, 7], [56, 55], [57, 56], [58, 57], [59, 56], [61, 60], [62, 6], [63, 5], [64, 4], [65, 3], [66, 65], [69, 6], [70, 5], [71, 4], [72, 3], [73, 72], [76, 6], [77, 5], [78, 4], [79, 3], [80, 79], [83, 6], [84, 5], [85, 4], [86, 3], [87, 86], [90, 6], [91, 5], [92, 4], [93, 3], [94, 93], [97, 6], [98, 5], [99, 4], [100, 3], [101, 100], [104, 6], [105, 5], [106, 4], [107, 3], [108, 107], [111, 6], [112, 5], [113, 4], [114, 3], [115, 114], [118, 6], [119, 5], [120, 4], [121, 3], [122, 121], [125, 6], [126, 5], [127, 4], [128, 3], [129, 128], [132, 6], [133, 5], [134, 4], [135, 3], [136, 135], [139, 6], [140, 5], [141, 4], [142, 3], [143, 142], [146, 6], [147, 5], [148, 4], [149, 3], [150, 149], [153, 6], [154, 5], [155, 4], [156, 3], [157, 156], [160, 6], [161, 5], [162, 4], [163, 3], [164, 163], [167, 6], [168, 5], [169, 4], [170, 3], [171, 170], [174, 6], [175, 5], [176, 4], [177, 3], [178, 177], [181, 6], [182, 5], [183, 4], [184, 3], [185, 184], [188, 6], [189, 5], [190, 4], [191, 3], [192, 191], [195, 6], [196, 5], [197, 4], [198, 3], [199, 198], [202, 6], [203, 5], [204, 4], [205, 3], [206, 205], [209, 6], [210, 5], [211, 4], [212, 3], [213, 212], [216, 6], [217, 5], [218, 4], [219, 3], [220, 219], [223, 6], [224, 5], [225, 4], [226, 3], [227, 226], [230, 6], [231, 5], [232, 4], [233, 3], [234, 233], [239, 67], [239, 186], [239, 158], [239, 179], [239, 151], [239, 144], [239, 165], [239, 137], [239, 123], [239, 116], [239, 235], [239, 109], [239, 228], [239, 237], [239, 102], [239, 221], [239, 214], [239, 95], [239, 88], [239, 207], [239, 81], [239, 200], [239, 193], [239, 74]]}
{"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/ad3ac0cda59574dd9c04213cb9565db060b56b512d981d9018d4f5ccd012e3d4_ad3ac0cda59574dd9c04213cb9565db060b56b512d981d9018d4f5ccd012e3d4.jsonl.gz", "strip_func_name": "sub_42A8F4", "query": "\n\n\nint __fastcall sub_42A8F4(_DWORD *a1, FILE *a2, _BYTE *a3, unsigned int a4, unsigned int a5)\n{\n__int64 v5; // r8\n__int64 v6; // r9\nchar *v7; // rax\nint v8; // eax\nint result; // eax\n\nif ( sub_4152F0(\"IIO_DEBUG\") )\n{\nv7 = sub_4152F0(\"IIO_DEBUG\");\nv8 = atoi(v7);\nif ( v8 == 3 )\n{\nfprintf(stderr, \"DEBUG(%s:%d:%s): \", \"iio/iio.c\", 5063LL, \"read_beheaded_image\");\n}\nelse if ( v8 <= 3 )\n{\nif ( v8 == 1 )\n{\nfwrite(\"DEBUG: \", 1uLL, 7uLL, stderr);\n}\nelse if ( v8 == 2 )\n{\nfprintf(stderr, \"DEBUG(%s:%d): \", \"iio/iio.c\", 5063LL);\n}\n}\nfprintf(stderr, \"rbi fmt = %d\\n\", a5);\n}\nswitch ( a5 )\n{\ncase 0xFFFFFFFF:\nresult = sub_425FB6((__int64)a1, a2, a3, a4, v5, v6);\nbreak;\ncase 1u:\nresult = sub_41D829((__int64)a1, (const char *)a2, a3);\nbreak;\ncase 2u:\nresult = sub_41A363((__int64)a1);\nbreak;\ncase 3u:\nresult = sub_41AF3F((__int64)a1, a2, a3, a4, v5, v6);\nbreak;\ncase 4u:\nresult = sub_41D52D((__int64)a1, a2, a3, a4, v5, v6);\nbreak;\ncase 5u:\nresult = sub_41F507((__int64)a1, a2, a3);\nbreak;\ncase 6u:\nsub_41FFCE((__int64)a1, a2, a3, a4, v5, v6);\ncase 0xDu:\nresult = sub_41F84F((__int64)a1, a2, (__int64)a3);\nbreak;\ncase 0x13u:\nresult = sub_41F9D6((__int64)a1, a2);\nbreak;\ncase 0x14u:\nresult = sub_41FA9E((__int64)a1, a2, (__int64)a3, a4);\nbreak;\ncase 0x15u:\nresult = sub_41FEAA((__int64)a1, a2, (__int64)a3, a4, v5, v6);\nbreak;\ncase 0x16u:\nresult = sub_41E0FD((__int64)a1, a2, (__int64)a3, a4);\nbreak;\ncase 0x17u:\nresult = sub_420012((__int64)a1, a2, a3, a4, v5, v6);\nbreak;\ncase 0x18u:\nresult = sub_4204A5((__int64)a1, a2, (__int64)a3, a4);\nbreak;\ncase 0x19u:\nresult = sub_42559E((__int64)a1);\nbreak;\ncase 0x1Bu:\nresult = sub_4212B4((__int64)a1, a2, a3, a4, v5, v6);\nbreak;\ncase 0x1Cu:\nresult = sub_421802((__int64)a1, a2, (__int64)a3, a4);\nbreak;\ncase 0x1Du:\nresult = sub_421DD3((__int64)a1, a2);\nbreak;\ncase 0x1Eu:\nsub_4215DA((__int64)a1, (__int64)a2, (__int64)a3, a4, v5, v6);\ncase 0x1Fu:\nresult = sub_4223BA((__int64)a1, a2, (__int64)a3, a4);\nbreak;\ncase 0x20u:\nresult = sub_422F0C(a1, a2, (__int64)a3, a4);\nbreak;\ncase 0x21u:\nresult = sub_423C35((__int64)a1, a2, (__int64)a3, a4);\nbreak;\ncase 0x22u:\nresult = sub_423CB7((__int64)a1, a2, (__int64)a3, a4);\nbreak;\ncase 0x24u:\nresult = sub_421447((__int64)a1, a2, a3, a4, v5, v6);\nbreak;\ncase 0x25u:\nresult = sub_421F0A((__int64)a1, a2, (__int64)a3, a4);\nbreak;\ndefault:\nresult = -17;\nbreak;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v5,sub_42A8F4,sub_4152F0,sub_425FB6,sub_41D829,sub_41A363,sub_41AF3F,sub_41D52D,sub_41F507,sub_41FFCE,sub_41F84F,sub_41F9D6,sub_41FA9E,sub_41FEAA,sub_41E0FD,sub_420012,sub_4204A5,sub_42559E,sub_4212B4,sub_421802,sub_421DD3,sub_4215DA,sub_4223BA,sub_422F0C,sub_423C35,sub_423CB7,sub_421447,sub_421F0A,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'h', 'a4': 'hn', 'a1': 'x', 'a2': 'f', 'a5': 'fmt', 'v5': 'fmt', 'sub_42A8F4': 'read_beheaded_image', 'sub_4152F0': 'xgetenv', 'sub_425FB6': 'read_beheaded_whatever', 'sub_41D829': 'read_beheaded_qnm', 'sub_41A363': 'read_beheaded_png', 'sub_41AF3F': 'read_beheaded_jpeg', 'sub_41D52D': 'read_beheaded_tiff', 'sub_41F507': 'read_beheaded_rim', 'sub_41FFCE': 'read_beheaded_bmp', 'sub_41F84F': 'read_beheaded_pfm', 'sub_41F9D6': 'read_beheaded_flo', 'sub_41FA9E': 'read_beheaded_juv', 'sub_41FEAA': 'read_beheaded_lum', 'sub_41E0FD': 'read_beheaded_pcm', 'sub_420012': 'read_beheaded_asc', 'sub_4204A5': 'read_beheaded_pds', 'sub_42559E': 'read_beheaded_raw', 'sub_4212B4': 'read_beheaded_csv', 'sub_421802': 'read_beheaded_vrt', 'sub_421DD3': 'read_beheaded_ffd', 'sub_4215DA': 'read_beheaded_dlm', 'sub_4223BA': 'read_beheaded_npy', 'sub_422F0C': 'read_beheaded_vic', 'sub_423C35': 'read_beheaded_ccs', 'sub_423CB7': 'read_beheaded_fit', 'sub_421447': 'read_beheaded_txt', 'sub_421F0A': 'read_beheaded_rat'}"}
watchdog_done
1f74d0f57f4e24f99be82cd8fe6817b70a504280753986e64f01156c5327a579
IAIK
CJAG
NA
void watchdog_done(watchdog_t *w) { if (w) { w->done = 1; w->timeout = w->interval; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401F99", "function_addr": 4202393, "binary_name": "1f74d0f57f4e24f99be82cd8fe6817b70a504280753986e64f01156c5327a579.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "cmp [rbp+var_8], 0"], [4, "jz short loc_401FC0"], [5, "mov rax, [rbp+var_8]"], [6, "mov dword ptr [rax], 1"], [7, "mov rax, [rbp+var_8]"], [8, "mov edx, [rax+4]"], [9, "mov rax, [rbp+var_8]"], [10, "mov [rax+8], edx"], [11, "nop"], [12, "pop rbp"], [13, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 2], [6, 5], [7, 2], [8, 7], [8, 6], [9, 2], [10, 8], [10, 9], [12, 0], [13, 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/1f74d0f57f4e24f99be82cd8fe6817b70a504280753986e64f01156c5327a579_1f74d0f57f4e24f99be82cd8fe6817b70a504280753986e64f01156c5327a579.jsonl.gz", "strip_func_name": "sub_401F99", "query": "\n\n\n_DWORD *__fastcall sub_401F99(_DWORD *a1)\n{\n_DWORD *result; // rax\n\nif ( a1 )\n{\n*a1 = 1;\nresult = a1;\na1[2] = a1[1];\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_401F99,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'w', 'sub_401F99': 'watchdog_done'}"}
_fast_ping_process_icmp
556e0263abbe1e4daef5ea125859adebb55575ea4fa8d33e6255954205d7ba5b
pymumu
smartdns
NA
static int _fast_ping_process_icmp(struct ping_host_struct *ping_host, struct timeval *now) { int len = 0; u_char inpacket[ICMP_INPACKET_SIZE]; struct sockaddr_storage from; struct ping_host_struct *recv_ping_host = NULL; struct fast_ping_packet *packet = NULL; socklen_t from_len = sizeof(from); uint32_t addrkey = 0; struct timeval tvresult = *now; struct timeval *tvsend = NULL; unsigned int sid = 0; unsigned int seq = 0; unsigned int cookie = 0; struct msghdr msg; struct iovec iov; char ans_data[4096]; memset(&msg, 0, sizeof(msg)); iov.iov_base = (char *)inpacket; iov.iov_len = sizeof(inpacket); msg.msg_name = &from; msg.msg_namelen = sizeof(from); msg.msg_iov = &iov; msg.msg_iovlen = 1; msg.msg_control = ans_data; msg.msg_controllen = sizeof(ans_data); len = recvmsg(ping_host->fd, &msg, MSG_DONTWAIT); if (len < 0) { tlog(TLOG_ERROR, "recvfrom failed, %s\n", strerror(errno)); goto errout; } from_len = msg.msg_namelen; packet = _fast_ping_recv_packet(ping_host, &msg, inpacket, len, now); if (packet == NULL) { char name[PING_MAX_HOSTLEN]; if (errno == ENETUNREACH) { goto errout; } tlog(TLOG_DEBUG, "recv ping packet from %s failed.", get_host_by_addr(name, sizeof(name), (struct sockaddr *)&from)); goto errout; } tvsend = &packet->msg.tv; sid = packet->msg.sid; seq = packet->msg.seq; cookie = packet->msg.cookie; addrkey = _fast_ping_hash_key(sid, (struct sockaddr *)&from); pthread_mutex_lock(&ping.map_lock); hash_for_each_possible(ping.addrmap, recv_ping_host, addr_node, addrkey) { if (_fast_ping_sockaddr_ip_cmp(&recv_ping_host->addr, recv_ping_host->addr_len, (struct sockaddr *)&from, from_len) == 0 && recv_ping_host->sid == sid && recv_ping_host->cookie == cookie) { _fast_ping_host_get(recv_ping_host); break; } } pthread_mutex_unlock(&ping.map_lock); if (recv_ping_host == NULL) { return -1; } if (recv_ping_host->seq != seq) { tlog(TLOG_ERROR, "seq num mismatch, expect %u, real %u", recv_ping_host->seq, seq); _fast_ping_host_put(recv_ping_host); return -1; } recv_ping_host->ttl = packet->ttl; tv_sub(&tvresult, tvsend); if (recv_ping_host->ping_callback) { _fast_ping_send_notify_event(recv_ping_host, PING_RESULT_RESPONSE, recv_ping_host->seq, recv_ping_host->ttl, &tvresult); } recv_ping_host->send = 0; if (recv_ping_host->count == 1) { _fast_ping_host_remove(recv_ping_host); } _fast_ping_host_put(recv_ping_host); return 0; errout: return -1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40BE56", "function_addr": 4243030, "binary_name": "556e0263abbe1e4daef5ea125859adebb55575ea4fa8d33e6255954205d7ba5b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 15D0h"], [3, "mov [rbp+var_15C8], rdi"], [4, "mov [rbp+var_15D0], rsi"], [5, "mov [rbp+var_C], 0"], [6, "mov [rbp+var_8], 0"], [7, "mov [rbp+var_18], 0"], [8, "mov [rbp+var_1C], 80h"], [9, "mov [rbp+var_20], 0"], [10, "mov rax, [rbp+var_15D0]"], [11, "mov rdx, [rax+8]"], [12, "mov rax, [rax]"], [13, "mov [rbp+var_4F0], rax"], [14, "mov [rbp+var_4E8], rdx"], [15, "mov [rbp+var_28], 0"], [16, "mov [rbp+var_2C], 0"], [17, "mov [rbp+var_30], 0"], [18, "mov [rbp+var_34], 0"], [19, "lea rax, [rbp+s]"], [20, "mov edx, 38h "], [21, "mov esi, 0"], [22, "mov rdi, rax"], [23, "call _memset"], [24, "lea rax, [rbp+var_460]"], [25, "mov [rbp+var_540], rax"], [26, "mov [rbp+var_538], 400h"], [27, "lea rax, [rbp+var_4E0]"], [28, "mov [rbp+s], rax"], [29, "mov [rbp+var_528], 80h"], [30, "lea rax, [rbp+var_540]"], [31, "mov [rbp+var_520], rax"], [32, "mov [rbp+var_518], 1"], [33, "lea rax, [rbp+var_1540]"], [34, "mov [rbp+var_510], rax"], [35, "mov [rbp+var_508], 1000h"], [36, "mov rax, [rbp+var_15C8]"], [37, "mov eax, [rax+0C8h]"], [38, "lea rcx, [rbp+s]"], [39, "mov edx, 40h "], [40, "mov rsi, rcx"], [41, "mov edi, eax"], [42, "call _recvmsg"], [43, "mov [rbp+var_C], eax"], [44, "cmp [rbp+var_C], 0"], [45, "jns short loc_40BFBB"], [46, "call ___errno_location"], [47, "mov eax, [rax]"], [48, "mov edi, eax"], [49, "call _strerror"], [50, "sub rsp, 8"], [51, "push rax"], [52, "mov r9d, offset aRecvfromFailed"], [53, "mov r8d, 0"], [54, "mov ecx, offset aFastPingProces"], [55, "mov edx, 6A3h"], [56, "mov esi, offset aFastPingC"], [57, "mov edi, 4"], [58, "mov eax, 0"], [59, "call sub_438748"], [60, "add rsp, 10h"], [61, "jmp loc_40C29F"], [62, "mov eax, [rbp+var_528]"], [63, "mov [rbp+var_1C], eax"], [64, "mov rdi, [rbp+var_15D0]"], [65, "mov ecx, [rbp+var_C]"], [66, "lea rdx, [rbp+var_460]"], [67, "lea rsi, [rbp+s]"], [68, "mov rax, [rbp+var_15C8]"], [69, "mov r8, rdi"], [70, "mov rdi, rax"], [71, "call sub_40BC92"], [72, "mov [rbp+var_18], rax"], [73, "cmp [rbp+var_18], 0"], [74, "jnz short loc_40C05C"], [75, "call ___errno_location"], [76, "mov eax, [rax]"], [77, "cmp eax, 65h "], [78, "jz loc_40C29E"], [79, "lea rdx, [rbp+var_4E0]"], [80, "lea rax, [rbp+var_15C0]"], [81, "mov esi, 80h"], [82, "mov rdi, rax"], [83, "call sub_434266"], [84, "sub rsp, 8"], [85, "push rax"], [86, "mov r9d, offset aRecvPingPacket"], [87, "mov r8d, 0"], [88, "mov ecx, offset aFastPingProces"], [89, "mov edx, 6AFh"], [90, "mov esi, offset aFastPingC"], [91, "mov edi, 0"], [92, "mov eax, 0"], [93, "call sub_438748"], [94, "add rsp, 10h"], [95, "jmp loc_40C29F"], [96, "mov rax, [rbp+var_18]"], [97, "add rax, 20h "], [98, "mov [rbp+var_28], rax"], [99, "mov rax, [rbp+var_18]"], [100, "mov eax, [rax+30h]"], [101, "mov [rbp+var_2C], eax"], [102, "mov rax, [rbp+var_18]"], [103, "mov eax, [rax+34h]"], [104, "mov [rbp+var_30], eax"], [105, "mov rax, [rbp+var_18]"], [106, "mov eax, [rax+38h]"], [107, "mov [rbp+var_34], eax"], [108, "lea rdx, [rbp+var_4E0]"], [109, "mov eax, [rbp+var_2C]"], [110, "mov rsi, rdx"], [111, "mov edi, eax"], [112, "call sub_408B3F"], [113, "mov [rbp+var_20], eax"], [114, "mov edi, offset mutex"], [115, "call _pthread_mutex_lock"], [116, "mov eax, [rbp+var_20]"], [117, "mov esi, 6"], [118, "mov edi, eax"], [119, "call sub_40870E"], [120, "mov eax, eax"], [121, "add rax, 0DCh"], [122, "mov rax, ds:qword_467E40[rax*8]"], [123, "mov [rbp+var_40], rax"], [124, "cmp [rbp+var_40], 0"], [125, "jz short loc_40C0E3"], [126, "mov rax, [rbp+var_40]"], [127, "mov [rbp+var_48], rax"], [128, "mov rax, [rbp+var_48]"], [129, "sub rax, 8"], [130, "jmp short loc_40C0E8"], [131, "mov eax, 0"], [132, "mov [rbp+var_8], rax"], [133, "jmp loc_40C175"], [134, "mov rax, [rbp+var_8]"], [135, "mov eax, [rax+124h]"], [136, "mov rdx, [rbp+var_8]"], [137, "lea rdi, [rdx+108h]"], [138, "mov ecx, [rbp+var_1C]"], [139, "lea rdx, [rbp+var_4E0]"], [140, "mov esi, eax"], [141, "call sub_408A5C"], [142, "test eax, eax"], [143, "jnz short loc_40C147"], [144, "mov rax, [rbp+var_8]"], [145, "mov eax, [rax+100h]"], [146, "cmp [rbp+var_2C], eax"], [147, "jnz short loc_40C147"], [148, "mov rax, [rbp+var_8]"], [149, "mov eax, [rax+0FCh]"], [150, "cmp [rbp+var_34], eax"], [151, "jnz short loc_40C147"], [152, "mov rax, [rbp+var_8]"], [153, "mov rdi, rax"], [154, "call sub_409502"], [155, "jmp short loc_40C180"], [156, "mov rax, [rbp+var_8]"], [157, "mov rax, [rax+8]"], [158, "mov [rbp+var_50], rax"], [159, "cmp [rbp+var_50], 0"], [160, "jz short loc_40C16C"], [161, "mov rax, [rbp+var_50]"], [162, "mov [rbp+var_58], rax"], [163, "mov rax, [rbp+var_58]"], [164, "sub rax, 8"], [165, "jmp short loc_40C171"], [166, "mov eax, 0"], [167, "mov [rbp+var_8], rax"], [168, "cmp [rbp+var_8], 0"], [169, "jnz loc_40C0F1"], [170, "mov edi, offset mutex"], [171, "call _pthread_mutex_unlock"], [172, "cmp [rbp+var_8], 0"], [173, "jnz short loc_40C19B"], [174, "mov eax, 0FFFFFFFFh"], [175, "jmp locret_40C2A4"], [176, "mov rax, [rbp+var_8]"], [177, "mov eax, [rax+0CCh]"], [178, "cmp [rbp+var_30], eax"], [179, "jz short loc_40C1FD"], [180, "mov rax, [rbp+var_8]"], [181, "mov eax, [rax+0CCh]"], [182, "mov edx, [rbp+var_30]"], [183, "push rdx"], [184, "push rax"], [185, "mov r9d, offset aSeqNumMismatch"], [186, "mov r8d, 0"], [187, "mov ecx, offset aFastPingProces"], [188, "mov edx, 6CBh"], [189, "mov esi, offset aFastPingC"], [190, "mov edi, 4"], [191, "mov eax, 0"], [192, "call sub_438748"], [193, "add rsp, 10h"], [194, "mov rax, [rbp+var_8]"], [195, "mov rdi, rax"], [196, "call sub_409798"], [197, "mov eax, 0FFFFFFFFh"], [198, "jmp locret_40C2A4"], [199, "mov rax, [rbp+var_18]"], [200, "mov eax, [rax+1Ch]"], [201, "mov edx, eax"], [202, "mov rax, [rbp+var_8]"], [203, "mov [rax+0D0h], edx"], [204, "mov rdx, [rbp+var_28]"], [205, "lea rax, [rbp+var_4F0]"], [206, "mov rsi, rdx"], [207, "mov rdi, rax"], [208, "call sub_40B8CD"], [209, "mov rax, [rbp+var_8]"], [210, "mov rax, [rax+40h]"], [211, "test rax, rax"], [212, "jz short loc_40C262"], [213, "mov rax, [rbp+var_8]"], [214, "mov ecx, [rax+0D0h]"], [215, "mov rax, [rbp+var_8]"], [216, "mov edx, [rax+0CCh]"], [217, "lea rsi, [rbp+var_4F0]"], [218, "mov rax, [rbp+var_8]"], [219, "mov r8, rsi"], [220, "mov esi, 1"], [221, "mov rdi, rax"], [222, "call sub_409690"], [223, "mov rax, [rbp+var_8]"], [224, "mov dword ptr [rax+0F4h], 0"], [225, "mov rax, [rbp+var_8]"], [226, "mov eax, [rax+0F0h]"], [227, "cmp eax, 1"], [228, "jnz short loc_40C28B"], [229, "mov rax, [rbp+var_8]"], [230, "mov rdi, rax"], [231, "call sub_409914"], [232, "mov rax, [rbp+var_8]"], [233, "mov rdi, rax"], [234, "call sub_409798"], [235, "mov eax, 0"], [236, "jmp short locret_40C2A4"], [237, "nop"], [238, "mov eax, 0FFFFFFFFh"], [239, "leave"], [240, "retn"]], "data_dep": [[10, 4], [11, 10], [12, 10], [13, 12], [14, 11], [19, 12], [22, 19], [24, 23], [25, 24], [27, 24], [28, 27], [30, 27], [30, 25], [31, 30], [33, 30], [34, 33], [36, 3], [37, 36], [38, 28], [40, 38], [41, 37], [43, 42], [44, 43], [45, 44], [47, 46], [48, 47], [50, 2], [51, 49], [60, 50], [62, 29], [63, 62], [64, 4], [65, 43], [66, 39], [67, 40], [67, 28], [68, 3], [69, 64], [70, 68], [72, 71], [73, 72], [74, 73], [76, 75], [77, 76], [78, 77], [79, 66], [80, 76], [82, 80], [84, 2], [85, 83], [94, 84], [96, 72], [97, 96], [98, 97], [99, 72], [100, 99], [101, 100], [102, 72], [103, 102], [104, 103], [105, 72], [106, 105], [107, 106], [108, 66], [109, 101], [110, 108], [111, 109], [113, 112], [116, 113], [118, 116], [120, 119], [121, 120], [123, 122], [124, 123], [125, 124], [126, 123], [127, 126], [128, 127], [129, 128], [132, 129], [132, 131], [134, 167], [134, 132], [135, 134], [136, 167], [136, 132], [137, 137], [137, 118], [137, 136], [138, 63], [139, 136], [140, 135], [142, 141], [143, 142], [144, 132], [144, 167], [145, 144], [146, 145], [146, 101], [147, 146], [148, 132], [148, 167], [149, 148], [150, 149], [150, 107], [151, 150], [152, 167], [152, 132], [153, 152], [156, 167], [156, 132], [157, 156], [158, 157], [159, 158], [160, 159], [161, 158], [162, 161], [163, 162], [164, 163], [167, 164], [167, 166], [168, 132], [168, 167], [169, 168], [172, 132], [172, 167], [173, 172], [176, 167], [176, 132], [177, 176], [178, 104], [178, 177], [179, 178], [180, 132], [180, 167], [181, 180], [182, 104], [183, 182], [184, 181], [193, 2], [194, 167], [194, 132], [195, 194], [199, 72], [200, 199], [201, 200], [202, 167], [202, 132], [203, 202], [203, 201], [204, 98], [205, 202], [205, 13], [206, 204], [207, 205], [209, 167], [209, 132], [210, 209], [210, 203], [211, 210], [212, 211], [213, 167], [213, 132], [214, 213], [214, 203], [215, 167], [215, 132], [216, 203], [216, 215], [217, 206], [217, 13], [218, 167], [218, 132], [219, 217], [221, 218], [223, 132], [223, 167], [224, 223], [225, 132], [225, 167], [226, 225], [226, 224], [227, 226], [228, 227], [229, 132], [229, 167], [230, 229], [232, 167], [232, 132], [233, 232], [240, 235], [240, 197], [240, 174], [240, 238]]}
{"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/556e0263abbe1e4daef5ea125859adebb55575ea4fa8d33e6255954205d7ba5b_556e0263abbe1e4daef5ea125859adebb55575ea4fa8d33e6255954205d7ba5b.jsonl.gz", "strip_func_name": "sub_40BE56", "query": "\n\n\n__int64 __fastcall sub_40BE56(__int64 a1, __int64 *a2)\n{\n__int64 v2; // rdx\nint *v3; // rax\nchar *v4; // rax\n__int64 v5; // rax\nvolatile signed __int32 *v6; // rax\nvolatile signed __int32 *v7; // rax\n__int64 result; // rax\nchar v9[128]; // [rsp+10h] [rbp-15C0h] BYREF\nchar v10; // [rsp+90h] [rbp-1540h] BYREF\n__int64 v11[2]; // [rsp+1090h] [rbp-540h] BYREF\nstruct msghdr s; // [rsp+10A0h] [rbp-530h] BYREF\n__int64 v13[2]; // [rsp+10E0h] [rbp-4F0h] BYREF\nunsigned __int16 v14[64]; // [rsp+10F0h] [rbp-4E0h] BYREF\nchar v15[1032]; // [rsp+1170h] [rbp-460h] BYREF\n__int64 v16; // [rsp+1578h] [rbp-58h]\n__int64 v17; // [rsp+1580h] [rbp-50h]\n__int64 v18; // [rsp+1588h] [rbp-48h]\n__int64 v19; // [rsp+1590h] [rbp-40h]\nint v20; // [rsp+159Ch] [rbp-34h]\nunsigned int v21; // [rsp+15A0h] [rbp-30h]\nunsigned int v22; // [rsp+15A4h] [rbp-2Ch]\n_QWORD *v23; // [rsp+15A8h] [rbp-28h]\nint v24; // [rsp+15B0h] [rbp-20h]\nint v25; // [rsp+15B4h] [rbp-1Ch]\n__int64 v26; // [rsp+15B8h] [rbp-18h]\nint v27; // [rsp+15C4h] [rbp-Ch]\nvolatile signed __int32 *i; // [rsp+15C8h] [rbp-8h]\n\nv27 = 0;\ni = 0LL;\nv26 = 0LL;\nv25 = 128;\nv24 = 0;\nv2 = a2[1];\nv13[0] = *a2;\nv13[1] = v2;\nv23 = 0LL;\nv22 = 0;\nv21 = 0;\nv20 = 0;\nmemset(&s, 0, sizeof(s));\nv11[0] = (__int64)v15;\nv11[1] = 1024LL;\ns.msg_name = v14;\ns.msg_namelen = 128;\ns.msg_iov = (iovec *)v11;\ns.msg_iovlen = 1LL;\ns.msg_control = &v10;\ns.msg_controllen = 4096LL;\nv27 = recvmsg(*(_DWORD *)(a1 + 200), &s, 64);\nif ( v27 < 0 )\n{\nv3 = __errno_location();\nv4 = strerror(*v3);\nsub_438748(\n4,\n(unsigned int)\"fast_ping.c\",\n1699,\n(unsigned int)\"_fast_ping_process_icmp\",\n0,\n(unsigned int)\"recvfrom failed, %s\\n\",\nv4);\nreturn 0xFFFFFFFFLL;\n}\nv25 = s.msg_namelen;\nv26 = sub_40BC92(a1, &s, v15, v27);\nif ( !v26 )\n{\nif ( *__errno_location() != 101 )\n{\nv5 = sub_434266(v9, 128LL, v14);\nsub_438748(\n0,\n(unsigned int)\"fast_ping.c\",\n1711,\n(unsigned int)\"_fast_ping_process_icmp\",\n0,\n(unsigned int)\"recv ping packet from %s failed.\",\nv5);\n}\nreturn 0xFFFFFFFFLL;\n}\nv23 = (_QWORD *)(v26 + 32);\nv22 = *(_DWORD *)(v26 + 48);\nv21 = *(_DWORD *)(v26 + 52);\nv20 = *(_DWORD *)(v26 + 56);\nv24 = sub_408B3F(v22, v14);\npthread_mutex_lock(&mutex);\nv19 = qword_467E40[(unsigned int)sub_40870E(v24, 6) + 220];\nif ( v19 )\n{\nv18 = v19;\nv6 = (volatile signed __int32 *)(v19 - 8);\n}\nelse\n{\nv6 = 0LL;\n}\nfor ( i = v6; i; i = v7 )\n{\nif ( !(unsigned int)sub_408A5C((unsigned __int16 *)i + 132, *((_DWORD *)i + 73), v14, v25)\n&& v22 == *((_DWORD *)i + 64)\n&& v20 == *((_DWORD *)i + 63) )\n{\nsub_409502(i);\nbreak;\n}\nv17 = *((_QWORD *)i + 1);\nif ( v17 )\n{\nv16 = v17;\nv7 = (volatile signed __int32 *)(v17 - 8);\n}\nelse\n{\nv7 = 0LL;\n}\n}\npthread_mutex_unlock(&mutex);\nif ( !i )\nreturn 0xFFFFFFFFLL;\nif ( v21 == *((_DWORD *)i + 51) )\n{\n*((_DWORD *)i + 52) = *(_DWORD *)(v26 + 28);\nsub_40B8CD(v13, v23);\nif ( *((_QWORD *)i + 8) )\nsub_409690(i, 1, *((_DWORD *)i + 51), *((_DWORD *)i + 52), v13);\n*((_DWORD *)i + 61) = 0;\nif ( *((_DWORD *)i + 60) == 1 )\nsub_409914((__int64)i);\nsub_409798((__int64)i);\nresult = 0LL;\n}\nelse\n{\nsub_438748(\n4,\n(unsigned int)\"fast_ping.c\",\n1739,\n(unsigned int)\"_fast_ping_process_icmp\",\n0,\n(unsigned int)\"seq num mismatch, expect %u, real %u\",\n*((unsigned int *)i + 51),\nv21);\nsub_409798((__int64)i);\nresult = 0xFFFFFFFFLL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v9,v10,v11,s,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,i,sub_40BE56,sub_438748,sub_40BC92,sub_434266,sub_408B3F,sub_40870E,sub_408A5C,sub_409502,sub_40B8CD,sub_409690,sub_409914,sub_409798,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ping_host', 'a2': 'now', 'v9': 'name', 'v10': 'ans_data', 'v11': 'iov', 's': 'msg', 'v13': 'tvresult', 'v14': 'from', 'v15': 'inpacket', 'v16': '__mptr_0', 'v17': '____ptr_0', 'v18': '__mptr', 'v19': '____ptr', 'v20': 'cookie', 'v21': 'seq', 'v22': 'sid', 'v23': 'tvsend', 'v24': 'addrkey', 'v25': 'from_len', 'v26': 'packet', 'v27': 'len', 'i': 'recv_ping_host', 'sub_40BE56': '_fast_ping_process_icmp', 'sub_438748': 'tlog_ext', 'sub_40BC92': '_fast_ping_recv_packet', 'sub_434266': 'get_host_by_addr', 'sub_408B3F': '_fast_ping_hash_key', 'sub_40870E': 'hash_32_generic', 'sub_408A5C': '_fast_ping_sockaddr_ip_cmp', 'sub_409502': '_fast_ping_host_get', 'sub_40B8CD': 'tv_sub', 'sub_409690': '_fast_ping_send_notify_event', 'sub_409914': '_fast_ping_host_remove', 'sub_409798': '_fast_ping_host_put'}"}
LZ4_decompress_safe_continue
126ce2be747fd65118bbc0808d5fbe9eebbd29c7d3904d7f3845bd289ebd4659
Tina-Linux
tina-V83x
NA
int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int compressedSize, int maxOutputSize) { LZ4_streamDecode_t_internal* lz4sd = &LZ4_streamDecode->internal_donotuse; int result; if (lz4sd->prefixEnd == (BYTE*)dest) { result = LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, usingExtDict, lz4sd->prefixEnd - lz4sd->prefixSize, lz4sd->externalDict, lz4sd->extDictSize); if (result <= 0) return result; lz4sd->prefixSize += result; lz4sd->prefixEnd += result; } else { lz4sd->extDictSize = lz4sd->prefixSize; lz4sd->externalDict = lz4sd->prefixEnd - lz4sd->extDictSize; result = LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, usingExtDict, (BYTE*)dest, lz4sd->externalDict, lz4sd->extDictSize); if (result <= 0) return result; lz4sd->prefixSize = result; lz4sd->prefixEnd = (BYTE*)dest + result; } return result; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40CD2E", "function_addr": 4246830, "binary_name": "126ce2be747fd65118bbc0808d5fbe9eebbd29c7d3904d7f3845bd289ebd4659.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 240h"], [3, "mov [rbp+var_228], rdi"], [4, "mov [rbp+var_230], rsi"], [5, "mov [rbp+var_238], rdx"], [6, "mov [rbp+var_23C], ecx"], [7, "mov [rbp+var_240], r8d"], [8, "mov rax, [rbp+var_228]"], [9, "mov [rbp+var_10], rax"], [10, "mov rax, [rbp+var_10]"], [11, "mov rax, [rax+10h]"], [12, "cmp [rbp+var_238], rax"], [13, "jnz loc_40D72A"], [14, "mov rax, [rbp+var_10]"], [15, "mov rax, [rax+8]"], [16, "mov rdx, [rbp+var_10]"], [17, "mov rdx, [rdx]"], [18, "mov rcx, [rbp+var_10]"], [19, "mov rsi, [rcx+10h]"], [20, "mov rcx, [rbp+var_10]"], [21, "mov rcx, [rcx+18h]"], [22, "neg rcx"], [23, "add rsi, rcx"], [24, "mov rcx, [rbp+var_230]"], [25, "mov [rbp+var_18], rcx"], [26, "mov rcx, [rbp+var_238]"], [27, "mov [rbp+var_20], rcx"], [28, "mov ecx, [rbp+var_23C]"], [29, "mov [rbp+var_24], ecx"], [30, "mov ecx, [rbp+var_240]"], [31, "mov [rbp+var_28], ecx"], [32, "mov [rbp+var_2C], 1"], [33, "mov [rbp+var_30], 0"], [34, "mov [rbp+var_34], 0"], [35, "mov [rbp+var_38], 2"], [36, "mov [rbp+var_40], rsi"], [37, "mov [rbp+var_48], rdx"], [38, "mov [rbp+var_50], rax"], [39, "mov rax, [rbp+var_18]"], [40, "mov [rbp+src], rax"], [41, "mov eax, [rbp+var_24]"], [42, "movsxd rdx, eax"], [43, "mov rax, [rbp+src]"], [44, "add rax, rdx"], [45, "mov [rbp+var_60], rax"], [46, "mov rax, [rbp+var_20]"], [47, "mov [rbp+dest], rax"], [48, "mov eax, [rbp+var_28]"], [49, "movsxd rdx, eax"], [50, "mov rax, [rbp+dest]"], [51, "add rax, rdx"], [52, "mov [rbp+var_70], rax"], [53, "mov eax, [rbp+var_34]"], [54, "movsxd rdx, eax"], [55, "mov rax, [rbp+dest]"], [56, "add rax, rdx"], [57, "mov [rbp+var_78], rax"], [58, "mov rax, [rbp+var_50]"], [59, "neg rax"], [60, "mov rdx, rax"], [61, "mov rax, [rbp+var_40]"], [62, "add rax, rdx"], [63, "mov [rbp+var_80], rax"], [64, "mov rdx, [rbp+var_48]"], [65, "mov rax, [rbp+var_50]"], [66, "add rax, rdx"], [67, "mov [rbp+var_88], rax"], [68, "mov [rbp+var_220], 0"], [69, "mov [rbp+var_21C], 1"], [70, "mov [rbp+var_218], 2"], [71, "mov [rbp+var_214], 1"], [72, "mov [rbp+var_210], 4"], [73, "mov [rbp+var_20C], 4"], [74, "mov [rbp+var_208], 4"], [75, "mov [rbp+var_204], 4"], [76, "mov [rbp+var_200], 0"], [77, "mov [rbp+var_1FC], 0"], [78, "mov [rbp+var_1F8], 0"], [79, "mov [rbp+var_1F4], 0FFFFFFFFh"], [80, "mov [rbp+var_1F0], 0"], [81, "mov [rbp+var_1EC], 1"], [82, "mov [rbp+var_1E8], 2"], [83, "mov [rbp+var_1E4], 3"], [84, "cmp [rbp+var_2C], 1"], [85, "setz al"], [86, "movzx eax, al"], [87, "mov [rbp+var_8C], eax"], [88, "cmp [rbp+var_8C], 0"], [89, "jz short loc_40CF24"], [90, "cmp [rbp+var_50], 0FFFFh"], [91, "ja short loc_40CF24"], [92, "mov eax, 1"], [93, "jmp short loc_40CF29"], [94, "mov eax, 0"], [95, "mov [rbp+var_90], eax"], [96, "cmp [rbp+var_30], 0"], [97, "jz short loc_40CF4F"], [98, "mov rax, [rbp+var_70]"], [99, "sub rax, 0Ch"], [100, "cmp [rbp+var_78], rax"], [101, "jbe short loc_40CF4F"], [102, "mov rax, [rbp+var_70]"], [103, "sub rax, 0Ch"], [104, "mov [rbp+var_78], rax"], [105, "cmp [rbp+var_2C], 0"], [106, "jz short loc_40CF89"], [107, "cmp [rbp+var_28], 0"], [108, "setz al"], [109, "movzx eax, al"], [110, "test rax, rax"], [111, "jz short loc_40CF89"], [112, "cmp [rbp+var_24], 1"], [113, "jnz short loc_40CF7F"], [114, "mov rax, [rbp+src]"], [115, "movzx eax, byte ptr [rax]"], [116, "test al, al"], [117, "jnz short loc_40CF7F"], [118, "mov eax, 0"], [119, "jmp loc_40D6E4"], [120, "mov eax, 0FFFFFFFFh"], [121, "jmp loc_40D6E4"], [122, "cmp [rbp+var_2C], 0"], [123, "jnz short loc_40CFBD"], [124, "cmp [rbp+var_28], 0"], [125, "setz al"], [126, "movzx eax, al"], [127, "test rax, rax"], [128, "jz short loc_40CFBD"], [129, "mov rax, [rbp+src]"], [130, "movzx eax, byte ptr [rax]"], [131, "test al, al"], [132, "jnz short loc_40CFB3"], [133, "mov eax, 1"], [134, "jmp loc_40D6E4"], [135, "mov eax, 0FFFFFFFFh"], [136, "jmp loc_40D6E4"], [137, "mov rax, [rbp+src]"], [138, "lea rdx, [rax+1]"], [139, "mov [rbp+src], rdx"], [140, "movzx eax, byte ptr [rax]"], [141, "movzx eax, al"], [142, "mov [rbp+var_94], eax"], [143, "mov eax, [rbp+var_94]"], [144, "shr eax, 4"], [145, "mov eax, eax"], [146, "mov [rbp+n], rax"], [147, "cmp [rbp+n], 0Fh"], [148, "jnz loc_40D0B7"], [149, "mov rax, [rbp+src]"], [150, "lea rdx, [rax+1]"], [151, "mov [rbp+src], rdx"], [152, "movzx eax, byte ptr [rax]"], [153, "movzx eax, al"], [154, "mov [rbp+var_A4], eax"], [155, "mov eax, [rbp+var_A4]"], [156, "add [rbp+n], rax"], [157, "cmp [rbp+var_2C], 0"], [158, "jz short loc_40D02E"], [159, "mov rax, [rbp+var_60]"], [160, "sub rax, 0Fh"], [161, "cmp [rbp+src], rax"], [162, "jnb short loc_40D035"], [163, "mov eax, 1"], [164, "jmp short loc_40D03A"], [165, "mov eax, 0"], [166, "test eax, eax"], [167, "setnz al"], [168, "movzx eax, al"], [169, "mov rdx, rax"], [170, "cmp [rbp+var_A4], 0FFh"], [171, "setz al"], [172, "movzx eax, al"], [173, "and rax, rdx"], [174, "test rax, rax"], [175, "jnz short loc_40CFF5"], [176, "cmp [rbp+var_8C], 0"], [177, "jz short loc_40D08A"], [178, "mov rdx, [rbp+dest]"], [179, "mov rax, [rbp+n]"], [180, "add rdx, rax"], [181, "mov rax, [rbp+dest]"], [182, "cmp rdx, rax"], [183, "setb al"], [184, "movzx eax, al"], [185, "test rax, rax"], [186, "jnz loc_40D6BE"], [187, "cmp [rbp+var_8C], 0"], [188, "jz short loc_40D0B7"], [189, "mov rdx, [rbp+src]"], [190, "mov rax, [rbp+n]"], [191, "add rdx, rax"], [192, "mov rax, [rbp+src]"], [193, "cmp rdx, rax"], [194, "setb al"], [195, "movzx eax, al"], [196, "test rax, rax"], [197, "jnz loc_40D6C1"], [198, "mov rdx, [rbp+dest]"], [199, "mov rax, [rbp+n]"], [200, "add rax, rdx"], [201, "mov [rbp+var_B0], rax"], [202, "cmp [rbp+var_2C], 0"], [203, "jz short loc_40D10A"], [204, "cmp [rbp+var_30], 0"], [205, "jnz short loc_40D0E2"], [206, "mov rax, [rbp+var_70]"], [207, "sub rax, 0Ch"], [208, "jmp short loc_40D0E6"], [209, "mov rax, [rbp+var_78]"], [210, "cmp [rbp+var_B0], rax"], [211, "ja short loc_40D129"], [212, "mov rdx, [rbp+src]"], [213, "mov rax, [rbp+n]"], [214, "add rdx, rax"], [215, "mov rax, [rbp+var_60]"], [216, "sub rax, 8"], [217, "cmp rdx, rax"], [218, "ja short loc_40D129"], [219, "cmp [rbp+var_2C], 0"], [220, "jnz loc_40D1E5"], [221, "mov rax, [rbp+var_70]"], [222, "sub rax, 8"], [223, "cmp [rbp+var_B0], rax"], [224, "jbe loc_40D1E5"], [225, "cmp [rbp+var_30], 0"], [226, "jz short loc_40D15F"], [227, "mov rax, [rbp+var_70]"], [228, "cmp rax, [rbp+var_B0]"], [229, "jb loc_40D6C4"], [230, "cmp [rbp+var_2C], 0"], [231, "jz short loc_40D1A5"], [232, "mov rdx, [rbp+src]"], [233, "mov rax, [rbp+n]"], [234, "add rax, rdx"], [235, "cmp [rbp+var_60], rax"], [236, "jnb short loc_40D1A5"], [237, "jmp loc_40D6DA"], [238, "cmp [rbp+var_2C], 0"], [239, "jnz short loc_40D176"], [240, "mov rax, [rbp+var_70]"], [241, "cmp rax, [rbp+var_B0]"], [242, "jnz loc_40D6C7"], [243, "cmp [rbp+var_2C], 0"], [244, "jz short loc_40D1A5"], [245, "mov rdx, [rbp+src]"], [246, "mov rax, [rbp+n]"], [247, "add rax, rdx"], [248, "cmp [rbp+var_60], rax"], [249, "jnz loc_40D6CA"], [250, "mov rax, [rbp+var_70]"], [251, "cmp rax, [rbp+var_B0]"], [252, "jb loc_40D6CA"], [253, "mov rdx, [rbp+n]"], [254, "mov rcx, [rbp+src]"], [255, "mov rax, [rbp+dest]"], [256, "mov rsi, rcx"], [257, "mov rdi, rax"], [258, "call _memcpy"], [259, "mov rax, [rbp+n]"], [260, "add [rbp+src], rax"], [261, "mov rax, [rbp+n]"], [262, "add [rbp+dest], rax"], [263, "nop"], [264, "cmp [rbp+var_2C], 0"], [265, "jz loc_40D6B4"], [266, "jmp loc_40D6AA"], [267, "mov rdx, [rbp+var_B0]"], [268, "mov rcx, [rbp+src]"], [269, "mov rax, [rbp+dest]"], [270, "mov rsi, rcx"], [271, "mov rdi, rax"], [272, "call sub_4012C2"], [273, "mov rax, [rbp+n]"], [274, "add [rbp+src], rax"], [275, "mov rax, [rbp+var_B0]"], [276, "mov [rbp+dest], rax"], [277, "mov rax, [rbp+src]"], [278, "mov rdi, rax"], [279, "call sub_401201"], [280, "movzx eax, ax"], [281, "mov [rbp+var_B8], rax"], [282, "add [rbp+src], 2"], [283, "mov rax, [rbp+var_B8]"], [284, "neg rax"], [285, "mov rdx, rax"], [286, "mov rax, [rbp+dest]"], [287, "add rax, rdx"], [288, "mov [rbp+var_C0], rax"], [289, "cmp [rbp+var_90], 0"], [290, "jz short loc_40D26E"], [291, "mov rax, [rbp+var_80]"], [292, "cmp rax, [rbp+var_C0]"], [293, "setnbe al"], [294, "movzx eax, al"], [295, "test rax, rax"], [296, "jnz loc_40D6CD"], [297, "mov rax, [rbp+var_B8]"], [298, "mov edx, eax"], [299, "mov rax, [rbp+dest]"], [300, "mov esi, edx"], [301, "mov rdi, rax"], [302, "call sub_4011EA"], [303, "mov eax, [rbp+var_94]"], [304, "and eax, 0Fh"], [305, "mov [rbp+n], rax"], [306, "cmp [rbp+n], 0Fh"], [307, "jnz short loc_40D315"], [308, "mov rax, [rbp+src]"], [309, "lea rdx, [rax+1]"], [310, "mov [rbp+src], rdx"], [311, "movzx eax, byte ptr [rax]"], [312, "movzx eax, al"], [313, "mov [rbp+var_C4], eax"], [314, "cmp [rbp+var_2C], 0"], [315, "jz short loc_40D2CF"], [316, "mov rax, [rbp+var_60]"], [317, "sub rax, 5"], [318, "cmp [rbp+src], rax"], [319, "ja loc_40D6D0"], [320, "mov eax, [rbp+var_C4]"], [321, "add [rbp+n], rax"], [322, "cmp [rbp+var_C4], 0FFh"], [323, "jz short loc_40D29F"], [324, "cmp [rbp+var_8C], 0"], [325, "jz short loc_40D315"], [326, "mov rdx, [rbp+dest]"], [327, "mov rax, [rbp+n]"], [328, "add rdx, rax"], [329, "mov rax, [rbp+dest]"], [330, "cmp rdx, rax"], [331, "setb al"], [332, "movzx eax, al"], [333, "test rax, rax"], [334, "jnz loc_40D6D3"], [335, "add [rbp+n], 4"], [336, "cmp [rbp+var_38], 2"], [337, "jnz loc_40D4A8"], [338, "mov rax, [rbp+var_40]"], [339, "cmp rax, [rbp+var_C0]"], [340, "jbe loc_40D4A8"], [341, "mov rdx, [rbp+dest]"], [342, "mov rax, [rbp+n]"], [343, "add rdx, rax"], [344, "mov rax, [rbp+var_70]"], [345, "sub rax, 5"], [346, "cmp rdx, rax"], [347, "setnbe al"], [348, "movzx eax, al"], [349, "test rax, rax"], [350, "jnz loc_40D6D6"], [351, "mov rax, [rbp+var_40]"], [352, "sub rax, [rbp+var_C0]"], [353, "cmp [rbp+n], rax"], [354, "ja short loc_40D3B6"], [355, "mov rax, [rbp+var_40]"], [356, "sub rax, [rbp+var_C0]"], [357, "neg rax"], [358, "mov rdx, rax"], [359, "mov rax, [rbp+var_88]"], [360, "lea rcx, [rdx+rax]"], [361, "mov rdx, [rbp+n]"], [362, "mov rax, [rbp+dest]"], [363, "mov rsi, rcx"], [364, "mov rdi, rax"], [365, "call _memmove"], [366, "mov rax, [rbp+n]"], [367, "add [rbp+dest], rax"], [368, "jmp loc_40D6A5"], [369, "mov rax, [rbp+var_40]"], [370, "sub rax, [rbp+var_C0]"], [371, "mov [rbp+var_D0], rax"], [372, "mov rax, [rbp+n]"], [373, "sub rax, [rbp+var_D0]"], [374, "mov [rbp+var_D8], rax"], [375, "mov rax, [rbp+var_D0]"], [376, "neg rax"], [377, "mov rdx, rax"], [378, "mov rax, [rbp+var_88]"], [379, "lea rcx, [rdx+rax]"], [380, "mov rdx, [rbp+var_D0]"], [381, "mov rax, [rbp+dest]"], [382, "mov rsi, rcx"], [383, "mov rdi, rax"], [384, "call _memcpy"], [385, "mov rax, [rbp+var_D0]"], [386, "add [rbp+dest], rax"], [387, "mov rax, [rbp+dest]"], [388, "sub rax, [rbp+var_40]"], [389, "cmp [rbp+var_D8], rax"], [390, "jbe short loc_40D47E"], [391, "mov rdx, [rbp+dest]"], [392, "mov rax, [rbp+var_D8]"], [393, "add rax, rdx"], [394, "mov [rbp+var_E0], rax"], [395, "mov rax, [rbp+var_40]"], [396, "mov [rbp+var_E8], rax"], [397, "jmp short loc_40D46C"], [398, "mov rdx, [rbp+var_E8]"], [399, "lea rax, [rdx+1]"], [400, "mov [rbp+var_E8], rax"], [401, "mov rax, [rbp+dest]"], [402, "lea rcx, [rax+1]"], [403, "mov [rbp+dest], rcx"], [404, "movzx edx, byte ptr [rdx]"], [405, "mov [rax], dl"], [406, "mov rax, [rbp+var_E0]"], [407, "cmp rax, [rbp+dest]"], [408, "ja short loc_40D449"], [409, "jmp loc_40D6A5"], [410, "mov rdx, [rbp+var_D8]"], [411, "mov rcx, [rbp+var_40]"], [412, "mov rax, [rbp+dest]"], [413, "mov rsi, rcx"], [414, "mov rdi, rax"], [415, "call _memcpy"], [416, "mov rax, [rbp+var_D8]"], [417, "add [rbp+dest], rax"], [418, "jmp loc_40D6A5"], [419, "mov rdx, [rbp+dest]"], [420, "mov rax, [rbp+n]"], [421, "add rax, rdx"], [422, "mov [rbp+var_B0], rax"], [423, "cmp [rbp+var_B8], 7"], [424, "setbe al"], [425, "movzx eax, al"], [426, "test rax, rax"], [427, "jz loc_40D575"], [428, "mov rax, [rbp+var_B8]"], [429, "mov eax, [rbp+rax*4+var_200]"], [430, "mov [rbp+var_EC], eax"], [431, "mov rax, [rbp+var_C0]"], [432, "movzx edx, byte ptr [rax]"], [433, "mov rax, [rbp+dest]"], [434, "mov [rax], dl"], [435, "mov rax, [rbp+dest]"], [436, "lea rdx, [rax+1]"], [437, "mov rax, [rbp+var_C0]"], [438, "movzx eax, byte ptr [rax+1]"], [439, "mov [rdx], al"], [440, "mov rax, [rbp+dest]"], [441, "lea rdx, [rax+2]"], [442, "mov rax, [rbp+var_C0]"], [443, "movzx eax, byte ptr [rax+2]"], [444, "mov [rdx], al"], [445, "mov rax, [rbp+dest]"], [446, "lea rdx, [rax+3]"], [447, "mov rax, [rbp+var_C0]"], [448, "movzx eax, byte ptr [rax+3]"], [449, "mov [rdx], al"], [450, "mov rax, [rbp+var_B8]"], [451, "mov eax, [rbp+rax*4+var_220]"], [452, "mov eax, eax"], [453, "add [rbp+var_C0], rax"], [454, "mov rax, [rbp+dest]"], [455, "lea rdx, [rax+4]"], [456, "mov rax, [rbp+var_C0]"], [457, "mov eax, [rax]"], [458, "mov [rdx], eax"], [459, "mov eax, [rbp+var_EC]"], [460, "cdqe"], [461, "neg rax"], [462, "add [rbp+var_C0], rax"], [463, "jmp short loc_40D593"], [464, "mov rdx, [rbp+var_C0]"], [465, "mov rax, [rbp+dest]"], [466, "mov rsi, rdx"], [467, "mov rdi, rax"], [468, "call sub_4012A5"], [469, "add [rbp+var_C0], 8"], [470, "add [rbp+dest], 8"], [471, "mov rax, [rbp+var_70]"], [472, "sub rax, 0Ch"], [473, "cmp [rbp+var_B0], rax"], [474, "setnbe al"], [475, "movzx eax, al"], [476, "test rax, rax"], [477, "jz loc_40D655"], [478, "mov rax, [rbp+var_70]"], [479, "sub rax, 7"], [480, "mov [rbp+var_F8], rax"], [481, "mov rax, [rbp+var_70]"], [482, "sub rax, 5"], [483, "cmp [rbp+var_B0], rax"], [484, "ja loc_40D6D9"], [485, "mov rax, [rbp+dest]"], [486, "cmp rax, [rbp+var_F8]"], [487, "jnb short loc_40D646"], [488, "mov rdx, [rbp+var_F8]"], [489, "mov rcx, [rbp+var_C0]"], [490, "mov rax, [rbp+dest]"], [491, "mov rsi, rcx"], [492, "mov rdi, rax"], [493, "call sub_4012C2"], [494, "mov rax, [rbp+var_F8]"], [495, "sub rax, [rbp+dest]"], [496, "add [rbp+var_C0], rax"], [497, "mov rax, [rbp+var_F8]"], [498, "mov [rbp+dest], rax"], [499, "jmp short loc_40D646"], [500, "mov rdx, [rbp+var_C0]"], [501, "lea rax, [rdx+1]"], [502, "mov [rbp+var_C0], rax"], [503, "mov rax, [rbp+dest]"], [504, "lea rcx, [rax+1]"], [505, "mov [rbp+dest], rcx"], [506, "movzx edx, byte ptr [rdx]"], [507, "mov [rax], dl"], [508, "mov rax, [rbp+var_B0]"], [509, "cmp rax, [rbp+dest]"], [510, "ja short loc_40D623"], [511, "jmp short loc_40D69A"], [512, "mov rdx, [rbp+var_C0]"], [513, "mov rax, [rbp+dest]"], [514, "mov rsi, rdx"], [515, "mov rdi, rax"], [516, "call sub_4012A5"], [517, "cmp [rbp+n], 10h"], [518, "jbe short loc_40D69A"], [519, "mov rax, [rbp+var_C0]"], [520, "lea rsi, [rax+8]"], [521, "mov rax, [rbp+dest]"], [522, "lea rcx, [rax+8]"], [523, "mov rax, [rbp+var_B0]"], [524, "mov rdx, rax"], [525, "mov rdi, rcx"], [526, "call sub_4012C2"], [527, "mov rax, [rbp+var_B0]"], [528, "mov [rbp+dest], rax"], [529, "jmp loc_40CFBD"], [530, "mov rax, [rbp+dest]"], [531, "sub rax, [rbp+var_20]"], [532, "jmp short loc_40D6E4"], [533, "mov rax, [rbp+src]"], [534, "sub rax, [rbp+var_18]"], [535, "jmp short loc_40D6E4"], [536, "nop"], [537, "jmp short loc_40D6DA"], [538, "nop"], [539, "jmp short loc_40D6DA"], [540, "nop"], [541, "jmp short loc_40D6DA"], [542, "nop"], [543, "jmp short loc_40D6DA"], [544, "nop"], [545, "jmp short loc_40D6DA"], [546, "nop"], [547, "jmp short loc_40D6DA"], [548, "nop"], [549, "jmp short loc_40D6DA"], [550, "nop"], [551, "jmp short loc_40D6DA"], [552, "nop"], [553, "jmp short loc_40D6DA"], [554, "nop"], [555, "mov rax, [rbp+src]"], [556, "sub rax, [rbp+var_18]"], [557, "not eax"], [558, "mov [rbp+var_4], eax"], [559, "cmp [rbp+var_4], 0"], [560, "jg short loc_40D6F5"], [561, "mov eax, [rbp+var_4]"], [562, "jmp locret_40E299"], [563, "mov rax, [rbp+var_10]"], [564, "mov rdx, [rax+18h]"], [565, "mov eax, [rbp+var_4]"], [566, "cdqe"], [567, "add rdx, rax"], [568, "mov rax, [rbp+var_10]"], [569, "mov [rax+18h], rdx"], [570, "mov rax, [rbp+var_10]"], [571, "mov rdx, [rax+10h]"], [572, "mov eax, [rbp+var_4]"], [573, "cdqe"], [574, "add rdx, rax"], [575, "mov rax, [rbp+var_10]"], [576, "mov [rax+10h], rdx"], [577, "jmp loc_40E296"], [578, "mov rax, [rbp+var_10]"], [579, "mov rdx, [rax+18h]"], [580, "mov rax, [rbp+var_10]"], [581, "mov [rax+8], rdx"], [582, "mov rax, [rbp+var_10]"], [583, "mov rdx, [rax+10h]"], [584, "mov rax, [rbp+var_10]"], [585, "mov rax, [rax+8]"], [586, "neg rax"], [587, "add rdx, rax"], [588, "mov rax, [rbp+var_10]"], [589, "mov [rax], rdx"], [590, "mov rax, [rbp+var_10]"], [591, "mov rax, [rax+8]"], [592, "mov rdx, [rbp+var_10]"], [593, "mov rdx, [rdx]"], [594, "mov rcx, [rbp+var_230]"], [595, "mov [rbp+var_100], rcx"], [596, "mov rcx, [rbp+var_238]"], [597, "mov [rbp+var_108], rcx"], [598, "mov ecx, [rbp+var_23C]"], [599, "mov [rbp+var_10C], ecx"], [600, "mov ecx, [rbp+var_240]"], [601, "mov [rbp+var_110], ecx"], [602, "mov [rbp+var_114], 1"], [603, "mov [rbp+var_118], 0"], [604, "mov [rbp+var_11C], 0"], [605, "mov [rbp+var_120], 2"], [606, "mov rcx, [rbp+var_238]"], [607, "mov [rbp+var_128], rcx"], [608, "mov [rbp+var_130], rdx"], [609, "mov [rbp+var_138], rax"], [610, "mov rax, [rbp+var_100]"], [611, "mov [rbp+var_140], rax"], [612, "mov eax, [rbp+var_10C]"], [613, "movsxd rdx, eax"], [614, "mov rax, [rbp+var_140]"], [615, "add rax, rdx"], [616, "mov [rbp+var_148], rax"], [617, "mov rax, [rbp+var_108]"], [618, "mov [rbp+var_150], rax"], [619, "mov eax, [rbp+var_110]"], [620, "movsxd rdx, eax"], [621, "mov rax, [rbp+var_150]"], [622, "add rax, rdx"], [623, "mov [rbp+var_158], rax"], [624, "mov eax, [rbp+var_11C]"], [625, "movsxd rdx, eax"], [626, "mov rax, [rbp+var_150]"], [627, "add rax, rdx"], [628, "mov [rbp+var_160], rax"], [629, "mov rax, [rbp+var_138]"], [630, "neg rax"], [631, "mov rdx, rax"], [632, "mov rax, [rbp+var_128]"], [633, "add rax, rdx"], [634, "mov [rbp+var_168], rax"], [635, "mov rdx, [rbp+var_130]"], [636, "mov rax, [rbp+var_138]"], [637, "add rax, rdx"], [638, "mov [rbp+var_170], rax"], [639, "mov [rbp+var_220], 0"], [640, "mov [rbp+var_21C], 1"], [641, "mov [rbp+var_218], 2"], [642, "mov [rbp+var_214], 1"], [643, "mov [rbp+var_210], 4"], [644, "mov [rbp+var_20C], 4"], [645, "mov [rbp+var_208], 4"], [646, "mov [rbp+var_204], 4"], [647, "mov [rbp+var_200], 0"], [648, "mov [rbp+var_1FC], 0"], [649, "mov [rbp+var_1F8], 0"], [650, "mov [rbp+var_1F4], 0FFFFFFFFh"], [651, "mov [rbp+var_1F0], 0"], [652, "mov [rbp+var_1EC], 1"], [653, "mov [rbp+var_1E8], 2"], [654, "mov [rbp+var_1E4], 3"], [655, "cmp [rbp+var_114], 1"], [656, "setz al"], [657, "movzx eax, al"], [658, "mov [rbp+var_174], eax"], [659, "cmp [rbp+var_174], 0"], [660, "jz short loc_40D94E"], [661, "cmp [rbp+var_138], 0FFFFh"], [662, "ja short loc_40D94E"], [663, "mov eax, 1"], [664, "jmp short loc_40D953"], [665, "mov eax, 0"], [666, "mov [rbp+var_178], eax"], [667, "cmp [rbp+var_118], 0"], [668, "jz short loc_40D988"], [669, "mov rax, [rbp+var_158]"], [670, "sub rax, 0Ch"], [671, "cmp [rbp+var_160], rax"], [672, "jbe short loc_40D988"], [673, "mov rax, [rbp+var_158]"], [674, "sub rax, 0Ch"], [675, "mov [rbp+var_160], rax"], [676, "cmp [rbp+var_114], 0"], [677, "jz short loc_40D9CE"], [678, "cmp [rbp+var_110], 0"], [679, "setz al"], [680, "movzx eax, al"], [681, "test rax, rax"], [682, "jz short loc_40D9CE"], [683, "cmp [rbp+var_10C], 1"], [684, "jnz short loc_40D9C4"], [685, "mov rax, [rbp+var_140]"], [686, "movzx eax, byte ptr [rax]"], [687, "test al, al"], [688, "jnz short loc_40D9C4"], [689, "mov eax, 0"], [690, "jmp loc_40E262"], [691, "mov eax, 0FFFFFFFFh"], [692, "jmp loc_40E262"], [693, "cmp [rbp+var_114], 0"], [694, "jnz short loc_40DA0B"], [695, "cmp [rbp+var_110], 0"], [696, "setz al"], [697, "movzx eax, al"], [698, "test rax, rax"], [699, "jz short loc_40DA0B"], [700, "mov rax, [rbp+var_140]"], [701, "movzx eax, byte ptr [rax]"], [702, "test al, al"], [703, "jnz short loc_40DA01"], [704, "mov eax, 1"], [705, "jmp loc_40E262"], [706, "mov eax, 0FFFFFFFFh"], [707, "jmp loc_40E262"], [708, "mov rax, [rbp+var_140]"], [709, "lea rdx, [rax+1]"], [710, "mov [rbp+var_140], rdx"], [711, "movzx eax, byte ptr [rax]"], [712, "movzx eax, al"], [713, "mov [rbp+var_17C], eax"], [714, "mov eax, [rbp+var_17C]"], [715, "shr eax, 4"], [716, "mov eax, eax"], [717, "mov [rbp+var_188], rax"], [718, "cmp [rbp+var_188], 0Fh"], [719, "jnz loc_40DB26"], [720, "mov rax, [rbp+var_140]"], [721, "lea rdx, [rax+1]"], [722, "mov [rbp+var_140], rdx"], [723, "movzx eax, byte ptr [rax]"], [724, "movzx eax, al"], [725, "mov [rbp+var_18C], eax"], [726, "mov eax, [rbp+var_18C]"], [727, "add [rbp+var_188], rax"], [728, "cmp [rbp+var_114], 0"], [729, "jz short loc_40DA91"], [730, "mov rax, [rbp+var_148]"], [731, "sub rax, 0Fh"], [732, "cmp [rbp+var_140], rax"], [733, "jnb short loc_40DA98"], [734, "mov eax, 1"], [735, "jmp short loc_40DA9D"], [736, "mov eax, 0"], [737, "test eax, eax"], [738, "setnz al"], [739, "movzx eax, al"], [740, "mov rdx, rax"], [741, "cmp [rbp+var_18C], 0FFh"], [742, "setz al"], [743, "movzx eax, al"], [744, "and rax, rdx"], [745, "test rax, rax"], [746, "jnz short loc_40DA49"], [747, "cmp [rbp+var_174], 0"], [748, "jz short loc_40DAF3"], [749, "mov rdx, [rbp+var_150]"], [750, "mov rax, [rbp+var_188]"], [751, "add rdx, rax"], [752, "mov rax, [rbp+var_150]"], [753, "cmp rdx, rax"], [754, "setb al"], [755, "movzx eax, al"], [756, "test rax, rax"], [757, "jnz loc_40E236"], [758, "cmp [rbp+var_174], 0"], [759, "jz short loc_40DB26"], [760, "mov rdx, [rbp+var_140]"], [761, "mov rax, [rbp+var_188]"], [762, "add rdx, rax"], [763, "mov rax, [rbp+var_140]"], [764, "cmp rdx, rax"], [765, "setb al"], [766, "movzx eax, al"], [767, "test rax, rax"], [768, "jnz loc_40E239"], [769, "mov rdx, [rbp+var_150]"], [770, "mov rax, [rbp+var_188]"], [771, "add rax, rdx"], [772, "mov [rbp+var_198], rax"], [773, "cmp [rbp+var_114], 0"], [774, "jz short loc_40DB8E"], [775, "cmp [rbp+var_118], 0"], [776, "jnz short loc_40DB5D"], [777, "mov rax, [rbp+var_158]"], [778, "sub rax, 0Ch"], [779, "jmp short loc_40DB64"], [780, "mov rax, [rbp+var_160]"], [781, "cmp [rbp+var_198], rax"], [782, "ja short loc_40DBB3"], [783, "mov rdx, [rbp+var_140]"], [784, "mov rax, [rbp+var_188]"], [785, "add rdx, rax"], [786, "mov rax, [rbp+var_148]"], [787, "sub rax, 8"], [788, "cmp rdx, rax"], [789, "ja short loc_40DBB3"], [790, "cmp [rbp+var_114], 0"], [791, "jnz loc_40DC9F"], [792, "mov rax, [rbp+var_158]"], [793, "sub rax, 8"], [794, "cmp [rbp+var_198], rax"], [795, "jbe loc_40DC9F"], [796, "cmp [rbp+var_118], 0"], [797, "jz short loc_40DBF8"], [798, "mov rax, [rbp+var_158]"], [799, "cmp rax, [rbp+var_198]"], [800, "jb loc_40E23C"], [801, "cmp [rbp+var_114], 0"], [802, "jz short loc_40DC50"], [803, "mov rdx, [rbp+var_140]"], [804, "mov rax, [rbp+var_188]"], [805, "add rax, rdx"], [806, "cmp [rbp+var_148], rax"], [807, "jnb short loc_40DC50"], [808, "jmp loc_40E252"], [809, "cmp [rbp+var_114], 0"], [810, "jnz short loc_40DC15"], [811, "mov rax, [rbp+var_158]"], [812, "cmp rax, [rbp+var_198]"], [813, "jnz loc_40E23F"], [814, "cmp [rbp+var_114], 0"], [815, "jz short loc_40DC50"], [816, "mov rdx, [rbp+var_140]"], [817, "mov rax, [rbp+var_188]"], [818, "add rax, rdx"], [819, "cmp [rbp+var_148], rax"], [820, "jnz loc_40E242"], [821, "mov rax, [rbp+var_158]"], [822, "cmp rax, [rbp+var_198]"], [823, "jb loc_40E242"], [824, "mov rdx, [rbp+var_188]"], [825, "mov rcx, [rbp+var_140]"], [826, "mov rax, [rbp+var_150]"], [827, "mov rsi, rcx"], [828, "mov rdi, rax"], [829, "call _memcpy"], [830, "mov rax, [rbp+var_188]"], [831, "add [rbp+var_140], rax"], [832, "mov rax, [rbp+var_188]"], [833, "add [rbp+var_150], rax"], [834, "nop"], [835, "cmp [rbp+var_114], 0"], [836, "jz loc_40E226"], [837, "jmp loc_40E216"], [838, "mov rdx, [rbp+var_198]"], [839, "mov rcx, [rbp+var_140]"], [840, "mov rax, [rbp+var_150]"], [841, "mov rsi, rcx"], [842, "mov rdi, rax"], [843, "call sub_4012C2"], [844, "mov rax, [rbp+var_188]"], [845, "add [rbp+var_140], rax"], [846, "mov rax, [rbp+var_198]"], [847, "mov [rbp+var_150], rax"], [848, "mov rax, [rbp+var_140]"], [849, "mov rdi, rax"], [850, "call sub_401201"], [851, "movzx eax, ax"], [852, "mov [rbp+var_1A0], rax"], [853, "add [rbp+var_140], 2"], [854, "mov rax, [rbp+var_1A0]"], [855, "neg rax"], [856, "mov rdx, rax"], [857, "mov rax, [rbp+var_150]"], [858, "add rax, rdx"], [859, "mov [rbp+var_1A8], rax"], [860, "cmp [rbp+var_178], 0"], [861, "jz short loc_40DD40"], [862, "mov rax, [rbp+var_168]"], [863, "cmp rax, [rbp+var_1A8]"], [864, "setnbe al"], [865, "movzx eax, al"], [866, "test rax, rax"], [867, "jnz loc_40E245"], [868, "mov rax, [rbp+var_1A0]"], [869, "mov edx, eax"], [870, "mov rax, [rbp+var_150]"], [871, "mov esi, edx"], [872, "mov rdi, rax"], [873, "call sub_4011EA"], [874, "mov eax, [rbp+var_17C]"], [875, "and eax, 0Fh"], [876, "mov [rbp+var_188], rax"], [877, "cmp [rbp+var_188], 0Fh"], [878, "jnz loc_40DE03"], [879, "mov rax, [rbp+var_140]"], [880, "lea rdx, [rax+1]"], [881, "mov [rbp+var_140], rdx"], [882, "movzx eax, byte ptr [rax]"], [883, "movzx eax, al"], [884, "mov [rbp+var_1AC], eax"], [885, "cmp [rbp+var_114], 0"], [886, "jz short loc_40DDB7"], [887, "mov rax, [rbp+var_148]"], [888, "sub rax, 5"], [889, "cmp [rbp+var_140], rax"], [890, "ja loc_40E248"], [891, "mov eax, [rbp+var_1AC]"], [892, "add [rbp+var_188], rax"], [893, "cmp [rbp+var_1AC], 0FFh"], [894, "jz short loc_40DD78"], [895, "cmp [rbp+var_174], 0"], [896, "jz short loc_40DE03"], [897, "mov rdx, [rbp+var_150]"], [898, "mov rax, [rbp+var_188]"], [899, "add rdx, rax"], [900, "mov rax, [rbp+var_150]"], [901, "cmp rdx, rax"], [902, "setb al"], [903, "movzx eax, al"], [904, "test rax, rax"], [905, "jnz loc_40E24B"], [906, "add [rbp+var_188], 4"], [907, "cmp [rbp+var_120], 2"], [908, "jnz loc_40DFD5"], [909, "mov rax, [rbp+var_128]"], [910, "cmp rax, [rbp+var_1A8]"], [911, "jbe loc_40DFD5"], [912, "mov rdx, [rbp+var_150]"], [913, "mov rax, [rbp+var_188]"], [914, "add rdx, rax"], [915, "mov rax, [rbp+var_158]"], [916, "sub rax, 5"], [917, "cmp rdx, rax"], [918, "setnbe al"], [919, "movzx eax, al"], [920, "test rax, rax"], [921, "jnz loc_40E24E"], [922, "mov rax, [rbp+var_128]"], [923, "sub rax, [rbp+var_1A8]"], [924, "cmp [rbp+var_188], rax"], [925, "ja short loc_40DEBC"], [926, "mov rax, [rbp+var_128]"], [927, "sub rax, [rbp+var_1A8]"], [928, "neg rax"], [929, "mov rdx, rax"], [930, "mov rax, [rbp+var_170]"], [931, "lea rcx, [rdx+rax]"], [932, "mov rdx, [rbp+var_188]"], [933, "mov rax, [rbp+var_150]"], [934, "mov rsi, rcx"], [935, "mov rdi, rax"], [936, "call _memmove"], [937, "mov rax, [rbp+var_188]"], [938, "add [rbp+var_150], rax"], [939, "jmp loc_40E211"], [940, "mov rax, [rbp+var_128]"], [941, "sub rax, [rbp+var_1A8]"], [942, "mov [rbp+var_1B8], rax"], [943, "mov rax, [rbp+var_188]"], [944, "sub rax, [rbp+var_1B8]"], [945, "mov [rbp+var_1C0], rax"], [946, "mov rax, [rbp+var_1B8]"], [947, "neg rax"], [948, "mov rdx, rax"], [949, "mov rax, [rbp+var_170]"], [950, "lea rcx, [rdx+rax]"], [951, "mov rdx, [rbp+var_1B8]"], [952, "mov rax, [rbp+var_150]"], [953, "mov rsi, rcx"], [954, "mov rdi, rax"], [955, "call _memcpy"], [956, "mov rax, [rbp+var_1B8]"], [957, "add [rbp+var_150], rax"], [958, "mov rax, [rbp+var_150]"], [959, "sub rax, [rbp+var_128]"], [960, "cmp [rbp+var_1C0], rax"], [961, "jbe short loc_40DFA2"], [962, "mov rdx, [rbp+var_150]"], [963, "mov rax, [rbp+var_1C0]"], [964, "add rax, rdx"], [965, "mov [rbp+var_1C8], rax"], [966, "mov rax, [rbp+var_128]"], [967, "mov [rbp+var_1D0], rax"], [968, "jmp short loc_40DF8D"], [969, "mov rdx, [rbp+var_1D0]"], [970, "lea rax, [rdx+1]"], [971, "mov [rbp+var_1D0], rax"], [972, "mov rax, [rbp+var_150]"], [973, "lea rcx, [rax+1]"], [974, "mov [rbp+var_150], rcx"], [975, "movzx edx, byte ptr [rdx]"], [976, "mov [rax], dl"], [977, "mov rax, [rbp+var_1C8]"], [978, "cmp rax, [rbp+var_150]"], [979, "ja short loc_40DF64"], [980, "jmp loc_40E211"], [981, "mov rdx, [rbp+var_1C0]"], [982, "mov rcx, [rbp+var_128]"], [983, "mov rax, [rbp+var_150]"], [984, "mov rsi, rcx"], [985, "mov rdi, rax"], [986, "call _memcpy"], [987, "mov rax, [rbp+var_1C0]"], [988, "add [rbp+var_150], rax"], [989, "jmp loc_40E211"], [990, "mov rdx, [rbp+var_150]"], [991, "mov rax, [rbp+var_188]"], [992, "add rax, rdx"], [993, "mov [rbp+var_198], rax"], [994, "cmp [rbp+var_1A0], 7"], [995, "setbe al"], [996, "movzx eax, al"], [997, "test rax, rax"], [998, "jz loc_40E0B4"], [999, "mov rax, [rbp+var_1A0]"], [1000, "mov eax, [rbp+rax*4+var_200]"], [1001, "mov [rbp+var_1D4], eax"], [1002, "mov rax, [rbp+var_1A8]"], [1003, "movzx edx, byte ptr [rax]"], [1004, "mov rax, [rbp+var_150]"], [1005, "mov [rax], dl"], [1006, "mov rax, [rbp+var_150]"], [1007, "lea rdx, [rax+1]"], [1008, "mov rax, [rbp+var_1A8]"], [1009, "movzx eax, byte ptr [rax+1]"], [1010, "mov [rdx], al"], [1011, "mov rax, [rbp+var_150]"], [1012, "lea rdx, [rax+2]"], [1013, "mov rax, [rbp+var_1A8]"], [1014, "movzx eax, byte ptr [rax+2]"], [1015, "mov [rdx], al"], [1016, "mov rax, [rbp+var_150]"], [1017, "lea rdx, [rax+3]"], [1018, "mov rax, [rbp+var_1A8]"], [1019, "movzx eax, byte ptr [rax+3]"], [1020, "mov [rdx], al"], [1021, "mov rax, [rbp+var_1A0]"], [1022, "mov eax, [rbp+rax*4+var_220]"], [1023, "mov eax, eax"], [1024, "add [rbp+var_1A8], rax"], [1025, "mov rax, [rbp+var_150]"], [1026, "lea rdx, [rax+4]"], [1027, "mov rax, [rbp+var_1A8]"], [1028, "mov eax, [rax]"], [1029, "mov [rdx], eax"], [1030, "mov eax, [rbp+var_1D4]"], [1031, "cdqe"], [1032, "neg rax"], [1033, "add [rbp+var_1A8], rax"], [1034, "jmp short loc_40E0D5"], [1035, "mov rdx, [rbp+var_1A8]"], [1036, "mov rax, [rbp+var_150]"], [1037, "mov rsi, rdx"], [1038, "mov rdi, rax"], [1039, "call sub_4012A5"], [1040, "add [rbp+var_1A8], 8"], [1041, "add [rbp+var_150], 8"], [1042, "mov rax, [rbp+var_158]"], [1043, "sub rax, 0Ch"], [1044, "cmp [rbp+var_198], rax"], [1045, "setnbe al"], [1046, "movzx eax, al"], [1047, "test rax, rax"], [1048, "jz loc_40E1B8"], [1049, "mov rax, [rbp+var_158]"], [1050, "sub rax, 7"], [1051, "mov [rbp+var_1E0], rax"], [1052, "mov rax, [rbp+var_158]"], [1053, "sub rax, 5"], [1054, "cmp [rbp+var_198], rax"], [1055, "ja loc_40E251"], [1056, "mov rax, [rbp+var_150]"], [1057, "cmp rax, [rbp+var_1E0]"], [1058, "jnb short loc_40E1A6"], [1059, "mov rdx, [rbp+var_1E0]"], [1060, "mov rcx, [rbp+var_1A8]"], [1061, "mov rax, [rbp+var_150]"], [1062, "mov rsi, rcx"], [1063, "mov rdi, rax"], [1064, "call sub_4012C2"], [1065, "mov rax, [rbp+var_1E0]"], [1066, "sub rax, [rbp+var_150]"], [1067, "add [rbp+var_1A8], rax"], [1068, "mov rax, [rbp+var_1E0]"], [1069, "mov [rbp+var_150], rax"], [1070, "jmp short loc_40E1A6"], [1071, "mov rdx, [rbp+var_1A8]"], [1072, "lea rax, [rdx+1]"], [1073, "mov [rbp+var_1A8], rax"], [1074, "mov rax, [rbp+var_150]"], [1075, "lea rcx, [rax+1]"], [1076, "mov [rbp+var_150], rcx"], [1077, "movzx edx, byte ptr [rdx]"], [1078, "mov [rax], dl"], [1079, "mov rax, [rbp+var_198]"], [1080, "cmp rax, [rbp+var_150]"], [1081, "ja short loc_40E17D"], [1082, "jmp short loc_40E203"], [1083, "mov rdx, [rbp+var_1A8]"], [1084, "mov rax, [rbp+var_150]"], [1085, "mov rsi, rdx"], [1086, "mov rdi, rax"], [1087, "call sub_4012A5"], [1088, "cmp [rbp+var_188], 10h"], [1089, "jbe short loc_40E203"], [1090, "mov rax, [rbp+var_1A8]"], [1091, "lea rsi, [rax+8]"], [1092, "mov rax, [rbp+var_150]"], [1093, "lea rcx, [rax+8]"], [1094, "mov rax, [rbp+var_198]"], [1095, "mov rdx, rax"], [1096, "mov rdi, rcx"], [1097, "call sub_4012C2"], [1098, "mov rax, [rbp+var_198]"], [1099, "mov [rbp+var_150], rax"], [1100, "jmp loc_40DA0B"], [1101, "mov rax, [rbp+var_150]"], [1102, "sub rax, [rbp+var_108]"], [1103, "jmp short loc_40E262"], [1104, "mov rax, [rbp+var_140]"], [1105, "sub rax, [rbp+var_100]"], [1106, "jmp short loc_40E262"], [1107, "nop"], [1108, "jmp short loc_40E252"], [1109, "nop"], [1110, "jmp short loc_40E252"], [1111, "nop"], [1112, "jmp short loc_40E252"], [1113, "nop"], [1114, "jmp short loc_40E252"], [1115, "nop"], [1116, "jmp short loc_40E252"], [1117, "nop"], [1118, "jmp short loc_40E252"], [1119, "nop"], [1120, "jmp short loc_40E252"], [1121, "nop"], [1122, "jmp short loc_40E252"], [1123, "nop"], [1124, "jmp short loc_40E252"], [1125, "nop"], [1126, "mov rax, [rbp+var_140]"], [1127, "sub rax, [rbp+var_100]"], [1128, "not eax"], [1129, "mov [rbp+var_4], eax"], [1130, "cmp [rbp+var_4], 0"], [1131, "jg short loc_40E270"], [1132, "mov eax, [rbp+var_4]"], [1133, "jmp short locret_40E299"], [1134, "mov eax, [rbp+var_4]"], [1135, "movsxd rdx, eax"], [1136, "mov rax, [rbp+var_10]"], [1137, "mov [rax+18h], rdx"], [1138, "mov eax, [rbp+var_4]"], [1139, "movsxd rdx, eax"], [1140, "mov rax, [rbp+var_238]"], [1141, "add rdx, rax"], [1142, "mov rax, [rbp+var_10]"], [1143, "mov [rax+10h], rdx"], [1144, "mov eax, [rbp+var_4]"], [1145, "leave"], [1146, "retn"]], "data_dep": [[8, 3], [9, 8], [10, 9], [11, 10], [12, 5], [12, 11], [13, 12], [14, 9], [15, 14], [16, 9], [17, 16], [18, 9], [19, 18], [20, 9], [21, 20], [22, 21], [23, 22], [23, 19], [24, 4], [25, 24], [26, 5], [27, 26], [28, 6], [29, 28], [30, 7], [31, 30], [36, 23], [37, 17], [38, 15], [39, 25], [40, 39], [41, 29], [42, 41], [43, 40], [44, 42], [44, 43], [45, 44], [46, 27], [47, 46], [48, 31], [49, 48], [50, 47], [51, 49], [51, 50], [52, 51], [53, 34], [54, 53], [55, 47], [56, 55], [56, 54], [57, 56], [58, 38], [59, 58], [60, 59], [61, 36], [62, 61], [62, 60], [63, 62], [64, 37], [65, 38], [66, 64], [66, 65], [67, 66], [84, 32], [85, 84], [85, 66], [86, 85], [87, 86], [88, 87], [89, 88], [90, 38], [91, 90], [95, 92], [95, 94], [96, 33], [97, 96], [98, 52], [99, 98], [100, 99], [100, 57], [101, 100], [102, 52], [103, 102], [104, 103], [105, 32], [106, 105], [107, 31], [108, 103], [108, 92], [108, 94], [108, 107], [108, 99], [109, 108], [110, 109], [111, 110], [112, 29], [113, 112], [114, 40], [115, 114], [116, 115], [117, 116], [122, 32], [123, 122], [124, 31], [125, 124], [125, 103], [125, 92], [125, 94], [125, 110], [125, 99], [126, 125], [127, 126], [128, 127], [129, 40], [130, 129], [131, 130], [132, 131], [137, 310], [137, 40], [137, 282], [138, 361], [138, 449], [138, 439], [138, 405], [138, 506], [138, 64], [138, 507], [138, 464], [138, 444], [138, 434], [138, 512], [138, 410], [138, 488], [138, 524], [138, 455], [138, 458], [138, 137], [138, 391], [138, 404], [139, 138], [140, 405], [140, 507], [140, 444], [140, 434], [140, 458], [140, 137], [140, 449], [140, 439], [141, 140], [142, 141], [143, 142], [144, 143], [145, 144], [146, 145], [147, 146], [148, 147], [149, 139], [149, 151], [150, 138], [150, 458], [150, 149], [150, 449], [150, 439], [150, 405], [150, 507], [150, 444], [150, 169], [150, 434], [151, 150], [152, 458], [152, 405], [152, 149], [152, 449], [152, 439], [152, 507], [152, 444], [152, 434], [153, 152], [154, 153], [155, 154], [156, 155], [156, 156], [156, 146], [157, 32], [158, 157], [159, 45], [160, 159], [161, 160], [161, 151], [162, 161], [166, 163], [166, 165], [167, 166], [168, 167], [169, 168], [170, 154], [171, 168], [171, 170], [172, 171], [173, 169], [173, 172], [174, 173], [175, 174], [176, 87], [177, 176], [178, 367], [178, 47], [178, 403], [178, 417], [178, 386], [178, 528], [179, 156], [180, 178], [180, 179], [181, 47], [181, 367], [181, 403], [181, 417], [181, 528], [181, 386], [182, 180], [182, 181], [183, 181], [183, 182], [184, 183], [185, 184], [186, 185], [187, 87], [188, 187], [189, 151], [190, 156], [191, 190], [191, 189], [192, 151], [193, 192], [193, 191], [194, 192], [194, 193], [195, 194], [196, 195], [197, 196], [198, 417], [198, 386], [198, 528], [198, 47], [198, 367], [198, 403], [199, 156], [199, 146], [200, 199], [200, 198], [201, 200], [202, 32], [203, 202], [204, 33], [205, 204], [206, 52], [207, 206], [209, 57], [209, 104], [210, 201], [210, 207], [210, 209], [211, 210], [212, 139], [212, 151], [213, 156], [213, 146], [214, 213], [214, 212], [215, 45], [216, 215], [217, 214], [217, 216], [218, 217], [219, 32], [220, 219], [221, 52], [222, 221], [223, 201], [223, 222], [224, 223], [225, 33], [226, 225], [227, 52], [228, 201], [228, 227], [229, 228], [230, 32], [231, 230], [232, 139], [232, 151], [233, 146], [233, 156], [234, 232], [234, 233], [235, 45], [235, 234], [236, 235], [238, 32], [239, 238], [240, 52], [241, 201], [241, 240], [242, 241], [243, 32], [244, 243], [245, 139], [245, 151], [246, 146], [246, 156], [247, 245], [247, 246], [248, 45], [248, 247], [249, 248], [250, 52], [251, 250], [251, 201], [252, 251], [253, 156], [253, 146], [254, 139], [254, 151], [255, 367], [255, 47], [255, 403], [255, 417], [255, 528], [255, 386], [256, 254], [257, 255], [259, 156], [259, 146], [260, 139], [260, 259], [260, 151], [261, 156], [261, 146], [262, 403], [262, 261], [262, 417], [262, 528], [262, 386], [262, 47], [262, 367], [264, 32], [265, 264], [267, 201], [268, 139], [268, 151], [269, 528], [269, 386], [269, 47], [269, 367], [269, 403], [269, 417], [270, 268], [271, 269], [273, 156], [273, 146], [274, 151], [274, 139], [274, 273], [275, 201], [276, 275], [277, 274], [278, 277], [280, 279], [281, 280], [282, 274], [283, 281], [284, 283], [285, 284], [286, 276], [287, 286], [287, 285], [288, 287], [289, 95], [290, 289], [291, 63], [292, 288], [292, 291], [293, 291], [293, 292], [294, 293], [295, 294], [296, 295], [297, 281], [298, 297], [299, 276], [300, 298], [301, 299], [303, 142], [304, 303], [305, 304], [306, 305], [307, 306], [308, 310], [308, 282], [309, 439], [309, 308], [309, 298], [309, 507], [309, 309], [309, 444], [309, 434], [309, 449], [309, 458], [309, 405], [310, 309], [311, 507], [311, 444], [311, 434], [311, 449], [311, 458], [311, 405], [311, 439], [311, 308], [312, 311], [313, 312], [314, 32], [315, 314], [316, 45], [317, 316], [318, 317], [318, 310], [319, 318], [320, 313], [321, 305], [321, 321], [321, 320], [322, 313], [323, 322], [324, 87], [325, 324], [326, 276], [327, 321], [328, 326], [328, 327], [329, 276], [330, 328], [330, 329], [331, 329], [331, 330], [332, 331], [333, 332], [334, 333], [335, 305], [335, 321], [336, 35], [337, 336], [338, 36], [339, 288], [339, 338], [340, 339], [341, 276], [342, 335], [343, 341], [343, 342], [344, 52], [345, 344], [346, 343], [346, 345], [347, 345], [347, 346], [348, 347], [349, 348], [350, 349], [351, 36], [352, 351], [352, 288], [353, 352], [353, 335], [354, 353], [355, 36], [356, 288], [356, 355], [357, 356], [358, 357], [359, 67], [360, 507], [360, 444], [360, 458], [360, 268], [360, 359], [360, 434], [360, 449], [360, 439], [360, 405], [361, 335], [362, 276], [363, 360], [364, 362], [366, 335], [367, 276], [367, 366], [369, 36], [370, 288], [370, 369], [371, 370], [372, 335], [373, 371], [373, 372], [374, 373], [375, 371], [376, 375], [377, 376], [378, 67], [379, 458], [379, 268], [379, 434], [379, 449], [379, 439], [379, 405], [379, 507], [379, 444], [379, 378], [380, 371], [381, 276], [382, 379], [383, 381], [385, 371], [386, 385], [386, 276], [387, 386], [388, 387], [388, 36], [389, 374], [389, 388], [390, 389], [391, 386], [392, 374], [393, 392], [393, 391], [394, 393], [395, 36], [396, 395], [398, 400], [398, 396], [399, 458], [399, 449], [399, 439], [399, 406], [399, 405], [399, 507], [399, 444], [399, 398], [399, 434], [400, 399], [401, 403], [401, 386], [402, 405], [402, 507], [402, 444], [402, 434], [402, 401], [402, 458], [402, 402], [402, 379], [402, 449], [402, 439], [403, 402], [404, 507], [404, 444], [404, 398], [404, 458], [404, 434], [404, 449], [404, 439], [404, 405], [405, 401], [405, 404], [406, 394], [407, 386], [407, 403], [407, 406], [408, 407], [410, 374], [411, 36], [412, 386], [413, 411], [414, 412], [416, 374], [417, 416], [417, 386], [419, 276], [420, 335], [421, 420], [421, 419], [422, 421], [423, 281], [424, 421], [424, 423], [425, 424], [426, 425], [427, 426], [428, 281], [429, 428], [430, 429], [431, 288], [432, 434], [432, 458], [432, 405], [432, 449], [432, 439], [432, 507], [432, 431], [432, 444], [433, 276], [434, 432], [434, 433], [435, 276], [436, 432], [436, 434], [436, 435], [437, 288], [438, 434], [438, 437], [439, 438], [439, 436], [440, 276], [441, 440], [441, 436], [441, 439], [442, 288], [443, 439], [443, 442], [444, 443], [444, 441], [445, 276], [446, 444], [446, 445], [446, 441], [447, 288], [448, 447], [448, 444], [449, 446], [449, 448], [450, 281], [451, 450], [452, 451], [453, 452], [453, 288], [454, 276], [455, 454], [455, 446], [455, 449], [456, 453], [457, 434], [457, 456], [457, 449], [458, 455], [458, 457], [459, 430], [461, 459], [462, 461], [462, 453], [464, 288], [465, 276], [466, 464], [467, 465], [469, 288], [470, 276], [471, 52], [472, 471], [473, 422], [473, 472], [474, 473], [474, 472], [475, 474], [476, 475], [477, 476], [478, 52], [479, 478], [480, 479], [481, 52], [482, 481], [483, 482], [483, 422], [484, 483], [485, 470], [486, 480], [486, 485], [487, 486], [488, 480], [489, 462], [489, 469], [490, 470], [491, 489], [492, 490], [494, 480], [495, 470], [495, 494], [496, 469], [496, 495], [496, 462], [497, 480], [498, 497], [500, 462], [500, 496], [500, 502], [500, 469], [501, 458], [501, 405], [501, 449], [501, 439], [501, 507], [501, 508], [501, 500], [501, 444], [501, 434], [502, 501], [503, 470], [503, 505], [503, 498], [504, 268], [504, 444], [504, 434], [504, 489], [504, 458], [504, 405], [504, 503], [504, 449], [504, 439], [504, 504], [504, 507], [505, 504], [506, 500], [506, 444], [506, 434], [506, 458], [506, 405], [506, 449], [506, 439], [506, 507], [507, 506], [507, 503], [508, 422], [509, 470], [509, 505], [509, 508], [509, 498], [510, 509], [512, 469], [512, 462], [513, 470], [514, 512], [515, 513], [517, 335], [518, 517], [519, 462], [519, 469], [520, 519], [520, 444], [520, 434], [520, 514], [520, 458], [520, 405], [520, 449], [520, 439], [520, 507], [521, 470], [522, 449], [522, 439], [522, 507], [522, 521], [522, 268], [522, 444], [522, 434], [522, 458], [522, 405], [523, 422], [524, 523], [525, 522], [527, 422], [528, 527], [530, 262], [531, 27], [531, 530], [533, 260], [534, 533], [534, 25], [555, 310], [555, 139], [555, 282], [555, 151], [556, 25], [556, 555], [557, 556], [558, 557], [558, 534], [558, 118], [558, 120], [558, 133], [558, 531], [558, 135], [559, 558], [560, 559], [561, 558], [563, 9], [564, 458], [564, 569], [564, 405], [564, 449], [564, 439], [564, 507], [564, 563], [564, 576], [564, 444], [564, 434], [565, 558], [567, 564], [567, 565], [568, 9], [569, 568], [569, 567], [570, 9], [571, 570], [571, 569], [572, 558], [574, 572], [574, 571], [575, 9], [576, 575], [576, 574], [578, 9], [579, 578], [580, 9], [581, 580], [581, 579], [582, 9], [583, 582], [583, 581], [584, 9], [585, 584], [585, 581], [586, 585], [587, 586], [587, 583], [588, 9], [589, 588], [589, 587], [590, 9], [591, 589], [591, 590], [591, 581], [592, 9], [593, 589], [593, 592], [594, 4], [595, 594], [596, 5], [597, 596], [598, 6], [599, 598], [600, 7], [601, 600], [606, 5], [607, 606], [608, 593], [609, 591], [610, 595], [611, 610], [612, 599], [613, 612], [614, 611], [615, 614], [615, 613], [616, 615], [617, 597], [618, 617], [619, 601], [620, 619], [621, 618], [622, 621], [622, 620], [623, 622], [624, 604], [625, 624], [626, 618], [627, 625], [627, 626], [628, 627], [629, 609], [630, 629], [631, 630], [632, 607], [633, 631], [633, 632], [634, 633], [635, 608], [636, 609], [637, 636], [637, 635], [638, 637], [655, 602], [656, 655], [656, 637], [657, 656], [658, 657], [659, 658], [660, 659], [661, 609], [662, 661], [666, 663], [666, 665], [667, 603], [668, 667], [669, 623], [670, 669], [671, 670], [671, 628], [672, 671], [673, 623], [674, 673], [675, 674], [676, 602], [677, 676], [678, 601], [679, 678], [679, 670], [679, 674], [679, 663], [679, 665], [680, 679], [681, 680], [682, 681], [683, 599], [684, 683], [685, 611], [686, 685], [686, 589], [686, 581], [687, 686], [688, 687], [693, 602], [694, 693], [695, 601], [696, 681], [696, 670], [696, 695], [696, 674], [696, 663], [696, 665], [697, 696], [698, 697], [699, 698], [700, 611], [701, 589], [701, 700], [701, 581], [702, 701], [703, 702], [708, 853], [708, 611], [708, 881], [709, 962], [709, 1083], [709, 1095], [709, 1029], [709, 708], [709, 635], [709, 589], [709, 975], [709, 932], [709, 1020], [709, 1010], [709, 581], [709, 1078], [709, 976], [709, 1077], [709, 981], [709, 1059], [709, 1026], [709, 1035], [709, 1015], [709, 1005], [710, 709], [711, 1029], [711, 708], [711, 976], [711, 589], [711, 1020], [711, 1010], [711, 581], [711, 1078], [711, 1015], [711, 1005], [712, 711], [713, 712], [714, 713], [715, 714], [716, 715], [717, 716], [718, 717], [719, 718], [720, 710], [720, 722], [721, 1015], [721, 740], [721, 1005], [721, 709], [721, 1029], [721, 976], [721, 720], [721, 589], [721, 1020], [721, 1010], [721, 581], [721, 1078], [722, 721], [723, 1015], [723, 1005], [723, 1029], [723, 720], [723, 589], [723, 1020], [723, 1010], [723, 581], [723, 976], [723, 1078], [724, 723], [725, 724], [726, 725], [727, 726], [727, 727], [727, 717], [728, 602], [729, 728], [730, 616], [731, 730], [732, 722], [732, 731], [733, 732], [737, 736], [737, 734], [738, 737], [739, 738], [740, 739], [741, 725], [742, 741], [742, 739], [743, 742], [744, 743], [744, 740], [745, 744], [746, 745], [747, 658], [748, 747], [749, 988], [749, 1099], [749, 957], [749, 618], [749, 938], [749, 974], [750, 727], [751, 749], [751, 750], [752, 957], [752, 938], [752, 618], [752, 974], [752, 988], [752, 1099], [753, 751], [753, 752], [754, 753], [754, 752], [755, 754], [756, 755], [757, 756], [758, 658], [759, 758], [760, 722], [761, 727], [762, 761], [762, 760], [763, 722], [764, 763], [764, 762], [765, 763], [765, 764], [766, 765], [767, 766], [768, 767], [769, 618], [769, 938], [769, 974], [769, 988], [769, 1099], [769, 957], [770, 717], [770, 727], [771, 770], [771, 769], [772, 771], [773, 602], [774, 773], [775, 603], [776, 775], [777, 623], [778, 777], [780, 628], [780, 675], [781, 772], [781, 778], [781, 780], [782, 781], [783, 710], [783, 722], [784, 727], [784, 717], [785, 784], [785, 783], [786, 616], [787, 786], [788, 785], [788, 787], [789, 788], [790, 602], [791, 790], [792, 623], [793, 792], [794, 772], [794, 793], [795, 794], [796, 603], [797, 796], [798, 623], [799, 772], [799, 798], [800, 799], [801, 602], [802, 801], [803, 710], [803, 722], [804, 727], [804, 717], [805, 803], [805, 804], [806, 616], [806, 805], [807, 806], [809, 602], [810, 809], [811, 623], [812, 811], [812, 772], [813, 812], [814, 602], [815, 814], [816, 710], [816, 722], [817, 727], [817, 717], [818, 817], [818, 816], [819, 818], [819, 616], [820, 819], [821, 623], [822, 821], [822, 772], [823, 822], [824, 727], [824, 717], [825, 710], [825, 722], [826, 988], [826, 1099], [826, 957], [826, 618], [826, 938], [826, 974], [827, 825], [828, 826], [830, 727], [830, 717], [831, 830], [831, 722], [831, 710], [832, 727], [832, 717], [833, 618], [833, 938], [833, 974], [833, 832], [833, 988], [833, 1099], [833, 957], [835, 602], [836, 835], [838, 772], [839, 710], [839, 722], [840, 988], [840, 1099], [840, 957], [840, 618], [840, 938], [840, 974], [841, 839], [842, 840], [844, 727], [844, 717], [845, 844], [845, 710], [845, 722], [846, 772], [847, 846], [848, 845], [849, 848], [851, 850], [852, 851], [853, 845], [854, 852], [855, 854], [856, 855], [857, 847], [858, 857], [858, 856], [859, 858], [860, 666], [861, 860], [862, 634], [863, 859], [863, 862], [864, 862], [864, 863], [865, 864], [866, 865], [867, 866], [868, 852], [869, 868], [870, 847], [871, 869], [872, 870], [874, 713], [875, 874], [876, 875], [877, 876], [878, 877], [879, 853], [879, 881], [880, 589], [880, 1020], [880, 1010], [880, 976], [880, 880], [880, 879], [880, 869], [880, 581], [880, 1078], [880, 1015], [880, 1029], [880, 1005], [881, 880], [882, 1020], [882, 1010], [882, 976], [882, 879], [882, 581], [882, 1078], [882, 1015], [882, 1029], [882, 1005], [882, 589], [883, 882], [884, 883], [885, 602], [886, 885], [887, 616], [888, 887], [889, 888], [889, 881], [890, 889], [891, 884], [892, 892], [892, 891], [892, 876], [893, 884], [894, 893], [895, 658], [896, 895], [897, 847], [898, 892], [899, 897], [899, 898], [900, 847], [901, 900], [901, 899], [902, 900], [902, 901], [903, 902], [904, 903], [905, 904], [906, 876], [906, 892], [907, 605], [908, 907], [909, 607], [910, 909], [910, 859], [911, 910], [912, 847], [913, 906], [914, 912], [914, 913], [915, 623], [916, 915], [917, 914], [917, 916], [918, 917], [918, 916], [919, 918], [920, 919], [921, 920], [922, 607], [923, 922], [923, 859], [924, 923], [924, 906], [925, 924], [926, 607], [927, 859], [927, 926], [928, 927], [929, 928], [930, 638], [931, 581], [931, 1078], [931, 1015], [931, 1029], [931, 839], [931, 930], [931, 1005], [931, 589], [931, 1020], [931, 1010], [931, 976], [932, 906], [933, 847], [934, 931], [935, 933], [937, 906], [938, 847], [938, 937], [940, 607], [941, 940], [941, 859], [942, 941], [943, 906], [944, 942], [944, 943], [945, 944], [946, 942], [947, 946], [948, 947], [949, 638], [950, 1078], [950, 839], [950, 1015], [950, 1005], [950, 949], [950, 1029], [950, 589], [950, 1020], [950, 1010], [950, 581], [950, 976], [951, 942], [952, 847], [953, 950], [954, 952], [956, 942], [957, 956], [957, 847], [958, 957], [959, 958], [959, 607], [960, 945], [960, 959], [961, 960], [962, 957], [963, 945], [964, 963], [964, 962], [965, 964], [966, 607], [967, 966], [969, 971], [969, 967], [970, 969], [970, 1015], [970, 1005], [970, 1029], [970, 976], [970, 589], [970, 1020], [970, 1010], [970, 977], [970, 581], [970, 1078], [971, 970], [972, 974], [972, 957], [973, 1005], [973, 589], [973, 1020], [973, 1010], [973, 976], [973, 581], [973, 1078], [973, 1015], [973, 972], [973, 1029], [973, 973], [973, 950], [974, 973], [975, 1020], [975, 1010], [975, 581], [975, 976], [975, 1078], [975, 1015], [975, 969], [975, 1005], [975, 1029], [975, 589], [976, 975], [976, 972], [977, 965], [978, 977], [978, 957], [978, 974], [979, 978], [981, 945], [982, 607], [983, 957], [984, 982], [985, 983], [987, 945], [988, 987], [988, 957], [990, 847], [991, 906], [992, 991], [992, 990], [993, 992], [994, 852], [995, 992], [995, 994], [996, 995], [997, 996], [998, 997], [999, 852], [1000, 999], [1001, 1000], [1002, 859], [1003, 1002], [1003, 1015], [1003, 1005], [1003, 1029], [1003, 976], [1003, 589], [1003, 1020], [1003, 1010], [1003, 581], [1003, 1078], [1004, 847], [1005, 1004], [1005, 1003], [1006, 847], [1007, 1006], [1007, 1003], [1007, 1005], [1008, 859], [1009, 1008], [1009, 1005], [1010, 1009], [1010, 1007], [1011, 847], [1012, 1010], [1012, 1011], [1012, 1007], [1013, 859], [1014, 1013], [1014, 1010], [1015, 1012], [1015, 1014], [1016, 847], [1017, 1012], [1017, 1016], [1017, 1015], [1018, 859], [1019, 1015], [1019, 1018], [1020, 1017], [1020, 1019], [1021, 852], [1022, 1021], [1023, 1022], [1024, 1023], [1024, 859], [1025, 847], [1026, 1020], [1026, 1025], [1026, 1017], [1027, 1024], [1028, 1020], [1028, 1005], [1028, 1027], [1029, 1026], [1029, 1028], [1030, 1001], [1032, 1030], [1033, 1032], [1033, 1024], [1035, 859], [1036, 847], [1037, 1035], [1038, 1036], [1040, 859], [1041, 847], [1042, 623], [1043, 1042], [1044, 993], [1044, 1043], [1045, 1043], [1045, 1044], [1046, 1045], [1047, 1046], [1048, 1047], [1049, 623], [1050, 1049], [1051, 1050], [1052, 623], [1053, 1052], [1054, 993], [1054, 1053], [1055, 1054], [1056, 1041], [1057, 1051], [1057, 1056], [1058, 1057], [1059, 1051], [1060, 1040], [1060, 1033], [1061, 1041], [1062, 1060], [1063, 1061], [1065, 1051], [1066, 1065], [1066, 1041], [1067, 1066], [1067, 1033], [1067, 1040], [1068, 1051], [1069, 1068], [1071, 1073], [1071, 1040], [1071, 1033], [1071, 1067], [1072, 976], [1072, 589], [1072, 1020], [1072, 1010], [1072, 581], [1072, 1078], [1072, 1079], [1072, 1071], [1072, 1015], [1072, 1005], [1072, 1029], [1073, 1072], [1074, 1069], [1074, 1041], [1074, 1076], [1075, 1029], [1075, 976], [1075, 1074], [1075, 589], [1075, 1020], [1075, 1010], [1075, 581], [1075, 1078], [1075, 839], [1075, 1015], [1075, 1005], [1075, 1060], [1075, 1075], [1076, 1075], [1077, 581], [1077, 1078], [1077, 1071], [1077, 1015], [1077, 1005], [1077, 1029], [1077, 976], [1077, 589], [1077, 1020], [1077, 1010], [1078, 1077], [1078, 1074], [1079, 993], [1080, 1079], [1080, 1069], [1080, 1041], [1080, 1076], [1081, 1080], [1083, 1033], [1083, 1040], [1084, 1041], [1085, 1083], [1086, 1084], [1088, 906], [1089, 1088], [1090, 1040], [1090, 1033], [1091, 976], [1091, 589], [1091, 1020], [1091, 1010], [1091, 581], [1091, 1078], [1091, 1090], [1091, 1015], [1091, 1005], [1091, 1085], [1091, 1029], [1092, 1041], [1093, 1029], [1093, 976], [1093, 589], [1093, 1020], [1093, 1010], [1093, 581], [1093, 1078], [1093, 1092], [1093, 839], [1093, 1015], [1093, 1005], [1094, 993], [1095, 1094], [1096, 1093], [1098, 993], [1099, 1098], [1101, 833], [1102, 597], [1102, 1101], [1104, 831], [1105, 595], [1105, 1104], [1126, 710], [1126, 853], [1126, 722], [1126, 881], [1127, 595], [1127, 1126], [1128, 1127], [1129, 704], [1129, 1102], [1129, 706], [1129, 1128], [1129, 1105], [1129, 689], [1129, 691], [1130, 1129], [1131, 1130], [1132, 1129], [1134, 1129], [1135, 1134], [1136, 9], [1137, 1135], [1137, 1136], [1138, 1129], [1139, 1138], [1140, 5], [1141, 1140], [1141, 1139], [1142, 9], [1143, 1141], [1143, 1142], [1144, 1129], [1144, 558], [1146, 1144], [1146, 561], [1146, 1132]]}
{"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/126ce2be747fd65118bbc0808d5fbe9eebbd29c7d3904d7f3845bd289ebd4659_126ce2be747fd65118bbc0808d5fbe9eebbd29c7d3904d7f3845bd289ebd4659.jsonl.gz", "strip_func_name": "sub_40CD2E", "query": "\n\n\n__int64 __fastcall sub_40CD2E(__int64 *a1, char *a2, char *a3, unsigned int a4, unsigned int a5)\n{\nunsigned __int64 v5; // rax\n__int64 v6; // rdx\nvoid *v7; // rsi\nint v8; // eax\nunsigned __int8 *v9; // rax\nunsigned __int8 *v10; // rax\n_BOOL4 v11; // eax\nchar *v12; // rax\nunsigned __int8 *v13; // rax\nchar *v14; // rdx\n_BYTE *v15; // rax\n_BYTE *v16; // rdx\n_BYTE *v17; // rax\nunsigned __int64 v19; // rax\n__int64 v20; // rdx\nint v21; // eax\nunsigned __int8 *v22; // rax\nunsigned __int8 *v23; // rax\n_BOOL4 v24; // eax\nchar *v25; // rax\nunsigned __int8 *v26; // rax\nchar *v27; // rdx\n_BYTE *v28; // rax\n_BYTE *v29; // rdx\n_BYTE *v30; // rax\nint v33; // [rsp+20h] [rbp-220h]\nint v34; // [rsp+24h] [rbp-21Ch]\nint v35; // [rsp+28h] [rbp-218h]\nint v36; // [rsp+2Ch] [rbp-214h]\nint v37; // [rsp+30h] [rbp-210h]\nint v38; // [rsp+34h] [rbp-20Ch]\nint v39; // [rsp+38h] [rbp-208h]\nint v40; // [rsp+3Ch] [rbp-204h]\nint v41; // [rsp+40h] [rbp-200h]\nint v42; // [rsp+44h] [rbp-1FCh]\nint v43; // [rsp+48h] [rbp-1F8h]\nint v44; // [rsp+4Ch] [rbp-1F4h]\nint v45; // [rsp+50h] [rbp-1F0h]\nint v46; // [rsp+54h] [rbp-1ECh]\nint v47; // [rsp+58h] [rbp-1E8h]\nint v48; // [rsp+5Ch] [rbp-1E4h]\nchar *v49; // [rsp+60h] [rbp-1E0h]\nint v50; // [rsp+6Ch] [rbp-1D4h]\nchar *v51; // [rsp+70h] [rbp-1D0h]\nunsigned __int64 v52; // [rsp+78h] [rbp-1C8h]\nsize_t v53; // [rsp+80h] [rbp-1C0h]\nsize_t v54; // [rsp+88h] [rbp-1B8h]\nunsigned int v55; // [rsp+94h] [rbp-1ACh]\n_QWORD *v56; // [rsp+98h] [rbp-1A8h]\nunsigned __int64 v57; // [rsp+A0h] [rbp-1A0h]\nchar *v58; // [rsp+A8h] [rbp-198h]\nunsigned int v59; // [rsp+B4h] [rbp-18Ch]\nsize_t v60; // [rsp+B8h] [rbp-188h]\nunsigned int v61; // [rsp+C4h] [rbp-17Ch]\n_BOOL4 v62; // [rsp+C8h] [rbp-178h]\nint v63; // [rsp+CCh] [rbp-174h]\nunsigned __int64 v64; // [rsp+D0h] [rbp-170h]\nunsigned __int64 v65; // [rsp+D8h] [rbp-168h]\nchar *v66; // [rsp+E0h] [rbp-160h]\nchar *v67; // [rsp+E8h] [rbp-158h]\nvoid *v68; // [rsp+F0h] [rbp-150h]\nchar *v69; // [rsp+F8h] [rbp-148h]\nvoid *v70; // [rsp+100h] [rbp-140h]\nunsigned __int64 v71; // [rsp+108h] [rbp-138h]\n__int64 v72; // [rsp+110h] [rbp-130h]\nvoid *v73; // [rsp+118h] [rbp-128h]\nint v74; // [rsp+120h] [rbp-120h]\nint v75; // [rsp+124h] [rbp-11Ch]\nint v76; // [rsp+128h] [rbp-118h]\nint v77; // [rsp+12Ch] [rbp-114h]\nunsigned __int64 v78; // [rsp+130h] [rbp-110h]\nchar *v79; // [rsp+138h] [rbp-108h]\nchar *v80; // [rsp+140h] [rbp-100h]\nchar *v81; // [rsp+148h] [rbp-F8h]\nint v82; // [rsp+154h] [rbp-ECh]\nchar *v83; // [rsp+158h] [rbp-E8h]\nunsigned __int64 v84; // [rsp+160h] [rbp-E0h]\nsize_t v85; // [rsp+168h] [rbp-D8h]\nsize_t v86; // [rsp+170h] [rbp-D0h]\nunsigned int v87; // [rsp+17Ch] [rbp-C4h]\n_QWORD *v88; // [rsp+180h] [rbp-C0h]\nunsigned __int64 v89; // [rsp+188h] [rbp-B8h]\nchar *v90; // [rsp+190h] [rbp-B0h]\nunsigned int v91; // [rsp+19Ch] [rbp-A4h]\nsize_t n; // [rsp+1A0h] [rbp-A0h]\nunsigned int v93; // [rsp+1ACh] [rbp-94h]\n_BOOL4 v94; // [rsp+1B0h] [rbp-90h]\nint v95; // [rsp+1B4h] [rbp-8Ch]\nunsigned __int64 v96; // [rsp+1B8h] [rbp-88h]\nunsigned __int64 v97; // [rsp+1C0h] [rbp-80h]\nchar *v98; // [rsp+1C8h] [rbp-78h]\nchar *v99; // [rsp+1D0h] [rbp-70h]\nvoid *dest; // [rsp+1D8h] [rbp-68h]\nchar *v101; // [rsp+1E0h] [rbp-60h]\nvoid *src; // [rsp+1E8h] [rbp-58h]\nunsigned __int64 v103; // [rsp+1F0h] [rbp-50h]\n__int64 v104; // [rsp+1F8h] [rbp-48h]\nvoid *v105; // [rsp+200h] [rbp-40h]\nint v106; // [rsp+208h] [rbp-38h]\nint v107; // [rsp+20Ch] [rbp-34h]\nint v108; // [rsp+210h] [rbp-30h]\nint v109; // [rsp+214h] [rbp-2Ch]\nunsigned __int64 v110; // [rsp+218h] [rbp-28h]\nchar *v111; // [rsp+220h] [rbp-20h]\nchar *v112; // [rsp+228h] [rbp-18h]\n__int64 *v113; // [rsp+230h] [rbp-10h]\nunsigned int v114; // [rsp+23Ch] [rbp-4h]\n\nv113 = a1;\nif ( a3 == (char *)a1[2] )\n{\nv5 = v113[1];\nv6 = *v113;\nv7 = (void *)(v113[2] - v113[3]);\nv112 = a2;\nv111 = a3;\nv110 = __PAIR64__(a4, a5);\nv109 = 1;\nv108 = 0;\nv107 = 0;\nv106 = 2;\nv105 = v7;\nv104 = v6;\nv103 = v5;\nsrc = a2;\nv101 = &a2[a4];\ndest = a3;\nv99 = &a3[a5];\nv98 = a3;\nv97 = (unsigned __int64)v7 - v5;\nv96 = v6 + v5;\nv33 = 0;\nv34 = 1;\nv35 = 2;\nv36 = 1;\nv37 = 4;\nv38 = 4;\nv39 = 4;\nv40 = 4;\nv41 = 0;\nv42 = 0;\nv43 = 0;\nv44 = -1;\nv45 = 0;\nv46 = 1;\nv47 = 2;\nv48 = 3;\nv95 = 1;\nv94 = v5 <= 0xFFFF;\nif ( !a5 )\n{\nif ( HIDWORD(v110) != 1 || *(_BYTE *)src )\nv8 = -1;\nelse\nv8 = 0;\ngoto LABEL_71;\n}\nwhile ( 1 )\n{\nv9 = (unsigned __int8 *)src;\nsrc = (char *)src + 1;\nv93 = *v9;\nn = v93 >> 4;\nif ( n == 15 )\n{\ndo\n{\nv10 = (unsigned __int8 *)src;\nsrc = (char *)src + 1;\nv91 = *v10;\nn += v91;\nv11 = !v109 || src < v101 - 15;\n}\nwhile ( v11 && v91 == 255 );\nif ( v95 && (char *)dest + n < dest || v95 && (char *)src + n < src )\ngoto LABEL_70;\n}\nv90 = (char *)dest + n;\nif ( v109 )\n{\nv12 = v108 ? v98 : v99 - 12;\nif ( v90 > v12 || (char *)src + n > v101 - 8 )\nbreak;\n}\nif ( !v109 && v90 > v99 - 8 )\nbreak;\nsub_4012C2(dest, src, (unsigned __int64)v90);\nsrc = (char *)src + n;\ndest = v90;\nv89 = (unsigned __int16)sub_401201((unsigned __int16 *)src);\nsrc = (char *)src + 2;\nv88 = (char *)dest - v89;\nif ( v94 && v97 > (unsigned __int64)v88 )\ngoto LABEL_70;\nsub_4011EA(dest, v89);\nn = v93 & 0xF;\nif ( n == 15 )\n{\nwhile ( 1 )\n{\nv13 = (unsigned __int8 *)src;\nsrc = (char *)src + 1;\nv87 = *v13;\nif ( v109 )\n{\nif ( src > v101 - 5 )\ngoto LABEL_70;\n}\nn += v87;\nif ( v87 != 255 )\n{\nif ( v95 && (char *)dest + n < dest )\ngoto LABEL_70;\nbreak;\n}\n}\n}\nn += 4LL;\nif ( v106 == 2 && v105 > v88 )\n{\nif ( (char *)dest + n > v99 - 5 )\ngoto LABEL_70;\nif ( n > (_BYTE *)v105 - (_BYTE *)v88 )\n{\nv86 = (_BYTE *)v105 - (_BYTE *)v88;\nv85 = n - ((_BYTE *)v105 - (_BYTE *)v88);\nmemcpy(dest, (const void *)((char *)v88 - (_BYTE *)v105 + v96), (_BYTE *)v105 - (_BYTE *)v88);\ndest = (char *)dest + v86;\nif ( v85 <= (_BYTE *)dest - (_BYTE *)v105 )\n{\nmemcpy(dest, v105, v85);\ndest = (char *)dest + v85;\n}\nelse\n{\nv84 = (unsigned __int64)dest + v85;\nv83 = (char *)v105;\nwhile ( v84 > (unsigned __int64)dest )\n{\nv14 = v83++;\nv15 = dest;\ndest = (char *)dest + 1;\n*v15 = *v14;\n}\n}\n}\nelse\n{\nmemmove(dest, (const void *)((char *)v88 - (_BYTE *)v105 + v96), n);\ndest = (char *)dest + n;\n}\n}\nelse\n{\nv90 = (char *)dest + n;\nif ( v89 > 7 )\n{\nsub_4012A5(dest, v88++);\n}\nelse\n{\nv82 = *(&v41 + v89);\n*(_BYTE *)dest = *(_BYTE *)v88;\n*((_BYTE *)dest + 1) = *((_BYTE *)v88 + 1);\n*((_BYTE *)dest + 2) = *((_BYTE *)v88 + 2);\n*((_BYTE *)dest + 3) = *((_BYTE *)v88 + 3);\nv88 = (_QWORD *)((char *)v88 + (unsigned int)*(&v33 + v89));\n*((_DWORD *)dest + 1) = *(_DWORD *)v88;\nv88 = (_QWORD *)((char *)v88 - v82);\n}\ndest = (char *)dest + 8;\nif ( v90 <= v99 - 12 )\n{\nsub_4012A5(dest, v88);\nif ( n > 0x10 )\nsub_4012C2((_QWORD *)dest + 1, v88 + 1, (unsigned __int64)v90);\n}\nelse\n{\nv81 = v99 - 7;\nif ( v90 > v99 - 5 )\ngoto LABEL_70;\nif ( dest < v81 )\n{\nsub_4012C2(dest, v88, (unsigned __int64)v81);\nv88 = (_QWORD *)((char *)v88 + v81 - (_BYTE *)dest);\ndest = v81;\n}\nwhile ( v90 > dest )\n{\nv16 = v88;\nv88 = (_QWORD *)((char *)v88 + 1);\nv17 = dest;\ndest = (char *)dest + 1;\n*v17 = *v16;\n}\n}\ndest = v90;\n}\n}\nif ( v108 )\n{\nif ( v99 < v90 || v109 && v101 < (char *)src + n )\n{\nLABEL_70:\nv8 = ~((_DWORD)src - (_DWORD)v112);\ngoto LABEL_71;\n}\n}\nelse if ( !v109 && v99 != v90 || v109 && (v101 != (char *)src + n || v99 < v90) )\n{\ngoto LABEL_70;\n}\nmemcpy(dest, src, n);\nsrc = (char *)src + n;\ndest = (char *)dest + n;\nif ( v109 )\nv8 = (_DWORD)dest - (_DWORD)v111;\nelse\nv8 = (_DWORD)src - (_DWORD)v112;\nLABEL_71:\nv114 = v8;\nif ( v8 <= 0 )\nreturn v114;\nv113[3] += (int)v114;\nv113[2] += (int)v114;\nreturn v114;\n}\nv113[1] = v113[3];\n*v113 = v113[2] - v113[1];\nv19 = v113[1];\nv20 = *v113;\nv80 = a2;\nv79 = a3;\nv78 = __PAIR64__(a4, a5);\nv77 = 1;\nv76 = 0;\nv75 = 0;\nv74 = 2;\nv73 = a3;\nv72 = v20;\nv71 = v19;\nv70 = a2;\nv69 = &a2[a4];\nv68 = a3;\nv67 = &a3[a5];\nv66 = a3;\nv65 = (unsigned __int64)&a3[-v19];\nv64 = v20 + v19;\nv33 = 0;\nv34 = 1;\nv35 = 2;\nv36 = 1;\nv37 = 4;\nv38 = 4;\nv39 = 4;\nv40 = 4;\nv41 = 0;\nv42 = 0;\nv43 = 0;\nv44 = -1;\nv45 = 0;\nv46 = 1;\nv47 = 2;\nv48 = 3;\nv63 = 1;\nv62 = v19 <= 0xFFFF;\nif ( !a5 )\n{\nif ( HIDWORD(v78) != 1 || *(_BYTE *)v70 )\nv21 = -1;\nelse\nv21 = 0;\ngoto LABEL_143;\n}\nwhile ( 1 )\n{\nv22 = (unsigned __int8 *)v70;\nv70 = (char *)v70 + 1;\nv61 = *v22;\nv60 = v61 >> 4;\nif ( v60 == 15 )\n{\ndo\n{\nv23 = (unsigned __int8 *)v70;\nv70 = (char *)v70 + 1;\nv59 = *v23;\nv60 += v59;\nv24 = !v77 || v70 < v69 - 15;\n}\nwhile ( v24 && v59 == 255 );\nif ( v63 && (char *)v68 + v60 < v68 || v63 && (char *)v70 + v60 < v70 )\ngoto LABEL_142;\n}\nv58 = (char *)v68 + v60;\nif ( v77 )\n{\nv25 = v76 ? v66 : v67 - 12;\nif ( v58 > v25 || (char *)v70 + v60 > v69 - 8 )\nbreak;\n}\nif ( !v77 && v58 > v67 - 8 )\nbreak;\nsub_4012C2(v68, v70, (unsigned __int64)v58);\nv70 = (char *)v70 + v60;\nv68 = v58;\nv57 = (unsigned __int16)sub_401201((unsigned __int16 *)v70);\nv70 = (char *)v70 + 2;\nv56 = (char *)v68 - v57;\nif ( v62 && v65 > (unsigned __int64)v56 )\ngoto LABEL_142;\nsub_4011EA(v68, v57);\nv60 = v61 & 0xF;\nif ( v60 == 15 )\n{\nwhile ( 1 )\n{\nv26 = (unsigned __int8 *)v70;\nv70 = (char *)v70 + 1;\nv55 = *v26;\nif ( v77 )\n{\nif ( v70 > v69 - 5 )\ngoto LABEL_142;\n}\nv60 += v55;\nif ( v55 != 255 )\n{\nif ( v63 && (char *)v68 + v60 < v68 )\ngoto LABEL_142;\nbreak;\n}\n}\n}\nv60 += 4LL;\nif ( v74 == 2 && v73 > v56 )\n{\nif ( (char *)v68 + v60 > v67 - 5 )\ngoto LABEL_142;\nif ( v60 > (_BYTE *)v73 - (_BYTE *)v56 )\n{\nv54 = (_BYTE *)v73 - (_BYTE *)v56;\nv53 = v60 - ((_BYTE *)v73 - (_BYTE *)v56);\nmemcpy(v68, (const void *)((char *)v56 - (_BYTE *)v73 + v64), (_BYTE *)v73 - (_BYTE *)v56);\nv68 = (char *)v68 + v54;\nif ( v53 <= (_BYTE *)v68 - (_BYTE *)v73 )\n{\nmemcpy(v68, v73, v53);\nv68 = (char *)v68 + v53;\n}\nelse\n{\nv52 = (unsigned __int64)v68 + v53;\nv51 = (char *)v73;\nwhile ( v52 > (unsigned __int64)v68 )\n{\nv27 = v51++;\nv28 = v68;\nv68 = (char *)v68 + 1;\n*v28 = *v27;\n}\n}\n}\nelse\n{\nmemmove(v68, (const void *)((char *)v56 - (_BYTE *)v73 + v64), v60);\nv68 = (char *)v68 + v60;\n}\n}\nelse\n{\nv58 = (char *)v68 + v60;\nif ( v57 > 7 )\n{\nsub_4012A5(v68, v56++);\n}\nelse\n{\nv50 = *(&v41 + v57);\n*(_BYTE *)v68 = *(_BYTE *)v56;\n*((_BYTE *)v68 + 1) = *((_BYTE *)v56 + 1);\n*((_BYTE *)v68 + 2) = *((_BYTE *)v56 + 2);\n*((_BYTE *)v68 + 3) = *((_BYTE *)v56 + 3);\nv56 = (_QWORD *)((char *)v56 + (unsigned int)*(&v33 + v57));\n*((_DWORD *)v68 + 1) = *(_DWORD *)v56;\nv56 = (_QWORD *)((char *)v56 - v50);\n}\nv68 = (char *)v68 + 8;\nif ( v58 <= v67 - 12 )\n{\nsub_4012A5(v68, v56);\nif ( v60 > 0x10 )\nsub_4012C2((_QWORD *)v68 + 1, v56 + 1, (unsigned __int64)v58);\n}\nelse\n{\nv49 = v67 - 7;\nif ( v58 > v67 - 5 )\ngoto LABEL_142;\nif ( v68 < v49 )\n{\nsub_4012C2(v68, v56, (unsigned __int64)v49);\nv56 = (_QWORD *)((char *)v56 + v49 - (_BYTE *)v68);\nv68 = v49;\n}\nwhile ( v58 > v68 )\n{\nv29 = v56;\nv56 = (_QWORD *)((char *)v56 + 1);\nv30 = v68;\nv68 = (char *)v68 + 1;\n*v30 = *v29;\n}\n}\nv68 = v58;\n}\n}\nif ( v76 )\n{\nif ( v67 < v58 || v77 && v69 < (char *)v70 + v60 )\n{\nLABEL_142:\nv21 = ~((_DWORD)v70 - (_DWORD)v80);\ngoto LABEL_143;\n}\n}\nelse if ( !v77 && v67 != v58 || v77 && (v69 != (char *)v70 + v60 || v67 < v58) )\n{\ngoto LABEL_142;\n}\nmemcpy(v68, v70, v60);\nv70 = (char *)v70 + v60;\nv68 = (char *)v68 + v60;\nif ( v77 )\nv21 = (_DWORD)v68 - (_DWORD)v79;\nelse\nv21 = (_DWORD)v70 - (_DWORD)v80;\nLABEL_143:\nv114 = v21;\nif ( v21 <= 0 )\nreturn v114;\nv113[3] = (int)v114;\nv113[2] = (__int64)&a3[v114];\nreturn v114;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v68,v70,v88,v89,v90,dest,v113,v114,sub_40CD2E,sub_4012C2,sub_401201,sub_4011EA,sub_4012A5,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'dest', 'a4': 'compressedSize', 'a1': 'LZ4_streamDecode', 'a2': 'source', 'a5': 'maxOutputSize', 'v68': 'dst', 'v70': 'memPtr', 'v88': 'srcPtr', 'v89': 'value', 'v90': 'dstEnd', 'dest': 'dstPtr', 'v113': 'lz4sd', 'v114': 'result', 'sub_40CD2E': 'LZ4_decompress_safe_continue', 'sub_4012C2': 'LZ4_wildCopy', 'sub_401201': 'LZ4_readLE16', 'sub_4011EA': 'LZ4_write32', 'sub_4012A5': 'LZ4_copy8'}"}
vm_dump
bdd2386c9a22d4ad9d01f57af8cd35d23817d3395726dddac071bb8a65789321
linux-apfs
linux-apfs
NA
void vm_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent) { struct userspace_mem_region *region; struct vcpu *vcpu; fprintf(stream, "%*smode: 0x%x\n", indent, "", vm->mode); fprintf(stream, "%*sfd: %i\n", indent, "", vm->fd); fprintf(stream, "%*spage_size: 0x%x\n", indent, "", vm->page_size); fprintf(stream, "%*sMem Regions:\n", indent, ""); for (region = vm->userspace_mem_region_head; region; region = region->next) { fprintf(stream, "%*sguest_phys: 0x%lx size: 0x%lx " "host_virt: %p\n", indent + 2, "", (uint64_t) region->region.guest_phys_addr, (uint64_t) region->region.memory_size, region->host_mem); fprintf(stream, "%*sunused_phy_pages: ", indent + 2, ""); sparsebit_dump(stream, region->unused_phy_pages, 0); } fprintf(stream, "%*sMapped Virtual Pages:\n", indent, ""); sparsebit_dump(stream, vm->vpages_mapped, indent + 2); fprintf(stream, "%*spgd_created: %u\n", indent, "", vm->pgd_created); if (vm->pgd_created) { fprintf(stream, "%*sVirtual Translation Tables:\n", indent + 2, ""); virt_dump(stream, vm, indent + 4); } fprintf(stream, "%*sVCPUs:\n", indent, ""); for (vcpu = vm->vcpu_head; vcpu; vcpu = vcpu->next) vcpu_dump(stream, vm, vcpu->id, indent + 2); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40402C", "function_addr": 4210732, "binary_name": "bdd2386c9a22d4ad9d01f57af8cd35d23817d3395726dddac071bb8a65789321.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+stream], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov eax, edx"], [6, "mov [rbp+var_24], al"], [7, "mov rax, [rbp+var_20]"], [8, "mov ecx, [rax]"], [9, "movzx edx, [rbp+var_24]"], [10, "mov rax, [rbp+stream]"], [11, "mov r8d, ecx"], [12, "mov ecx, offset unk_40D103"], [13, "mov esi, offset aSmode0xX"], [14, "mov rdi, rax"], [15, "mov eax, 0"], [16, "call _fprintf"], [17, "mov rax, [rbp+var_20]"], [18, "mov ecx, [rax+8]"], [19, "movzx edx, [rbp+var_24]"], [20, "mov rax, [rbp+stream]"], [21, "mov r8d, ecx"], [22, "mov ecx, offset unk_40D103"], [23, "mov esi, offset aSfdI"], [24, "mov rdi, rax"], [25, "mov eax, 0"], [26, "call _fprintf"], [27, "mov rax, [rbp+var_20]"], [28, "mov ecx, [rax+10h]"], [29, "movzx edx, [rbp+var_24]"], [30, "mov rax, [rbp+stream]"], [31, "mov r8d, ecx"], [32, "mov ecx, offset unk_40D103"], [33, "mov esi, offset aSpageSize0xX"], [34, "mov rdi, rax"], [35, "mov eax, 0"], [36, "call _fprintf"], [37, "movzx edx, [rbp+var_24]"], [38, "mov rax, [rbp+stream]"], [39, "mov ecx, offset unk_40D103"], [40, "mov esi, offset aSmemRegions"], [41, "mov rdi, rax"], [42, "mov eax, 0"], [43, "call _fprintf"], [44, "mov rax, [rbp+var_20]"], [45, "mov rax, [rax+30h]"], [46, "mov [rbp+var_8], rax"], [47, "jmp loc_40417D"], [48, "mov rax, [rbp+var_8]"], [49, "mov rcx, [rax+48h]"], [50, "mov rax, [rbp+var_8]"], [51, "mov rdi, [rax+20h]"], [52, "mov rax, [rbp+var_8]"], [53, "mov rsi, [rax+18h]"], [54, "movzx eax, [rbp+var_24]"], [55, "lea edx, [rax+2]"], [56, "mov rax, [rbp+stream]"], [57, "sub rsp, 8"], [58, "push rcx"], [59, "mov r9, rdi"], [60, "mov r8, rsi"], [61, "mov ecx, offset unk_40D103"], [62, "mov esi, offset aSguestPhys0xLx"], [63, "mov rdi, rax"], [64, "mov eax, 0"], [65, "call _fprintf"], [66, "add rsp, 10h"], [67, "movzx eax, [rbp+var_24]"], [68, "lea edx, [rax+2]"], [69, "mov rax, [rbp+stream]"], [70, "mov ecx, offset unk_40D103"], [71, "mov esi, offset aSunusedPhyPage"], [72, "mov rdi, rax"], [73, "mov eax, 0"], [74, "call _fprintf"], [75, "mov rax, [rbp+var_8]"], [76, "mov rcx, [rax+30h]"], [77, "mov rax, [rbp+stream]"], [78, "mov edx, 0"], [79, "mov rsi, rcx"], [80, "mov rdi, rax"], [81, "call sub_4070CA"], [82, "mov rax, [rbp+var_8]"], [83, "mov rax, [rax]"], [84, "mov [rbp+var_8], rax"], [85, "cmp [rbp+var_8], 0"], [86, "jnz loc_4040EB"], [87, "movzx edx, [rbp+var_24]"], [88, "mov rax, [rbp+stream]"], [89, "mov ecx, offset unk_40D103"], [90, "mov esi, offset aSmappedVirtual"], [91, "mov rdi, rax"], [92, "mov eax, 0"], [93, "call _fprintf"], [94, "movzx eax, [rbp+var_24]"], [95, "add eax, 2"], [96, "mov edx, eax"], [97, "mov rax, [rbp+var_20]"], [98, "mov rcx, [rax+40h]"], [99, "mov rax, [rbp+stream]"], [100, "mov rsi, rcx"], [101, "mov rdi, rax"], [102, "call sub_4070CA"], [103, "mov rax, [rbp+var_20]"], [104, "movzx eax, byte ptr [rax+49h]"], [105, "movzx ecx, al"], [106, "movzx edx, [rbp+var_24]"], [107, "mov rax, [rbp+stream]"], [108, "mov r8d, ecx"], [109, "mov ecx, offset unk_40D103"], [110, "mov esi, offset aSpgdCreatedU"], [111, "mov rdi, rax"], [112, "mov eax, 0"], [113, "call _fprintf"], [114, "mov rax, [rbp+var_20]"], [115, "movzx eax, byte ptr [rax+49h]"], [116, "test al, al"], [117, "jz short loc_40423F"], [118, "movzx eax, [rbp+var_24]"], [119, "lea edx, [rax+2]"], [120, "mov rax, [rbp+stream]"], [121, "mov ecx, offset unk_40D103"], [122, "mov esi, offset aSvirtualTransl"], [123, "mov rdi, rax"], [124, "mov eax, 0"], [125, "call _fprintf"], [126, "movzx eax, [rbp+var_24]"], [127, "add eax, 4"], [128, "movzx edx, al"], [129, "mov rcx, [rbp+var_20]"], [130, "mov rax, [rbp+stream]"], [131, "mov rsi, rcx"], [132, "mov rdi, rax"], [133, "call sub_4085C9"], [134, "movzx edx, [rbp+var_24]"], [135, "mov rax, [rbp+stream]"], [136, "mov ecx, offset unk_40D103"], [137, "mov esi, offset aSvcpus"], [138, "mov rdi, rax"], [139, "mov eax, 0"], [140, "call _fprintf"], [141, "mov rax, [rbp+var_20]"], [142, "mov rax, [rax+28h]"], [143, "mov [rbp+var_10], rax"], [144, "jmp short loc_404298"], [145, "movzx eax, [rbp+var_24]"], [146, "add eax, 2"], [147, "movzx ecx, al"], [148, "mov rax, [rbp+var_10]"], [149, "mov edx, [rax+10h]"], [150, "mov rsi, [rbp+var_20]"], [151, "mov rax, [rbp+stream]"], [152, "mov rdi, rax"], [153, "call sub_409DC2"], [154, "mov rax, [rbp+var_10]"], [155, "mov rax, [rax]"], [156, "mov [rbp+var_10], rax"], [157, "cmp [rbp+var_10], 0"], [158, "jnz short loc_40426C"], [159, "nop"], [160, "nop"], [161, "leave"], [162, "retn"]], "data_dep": [[6, 5], [7, 4], [8, 7], [9, 6], [10, 3], [11, 8], [14, 10], [17, 4], [18, 17], [19, 6], [20, 3], [21, 18], [24, 20], [27, 4], [28, 27], [29, 6], [30, 3], [31, 28], [34, 30], [37, 6], [38, 3], [41, 38], [44, 4], [45, 44], [46, 45], [48, 46], [48, 84], [49, 48], [50, 84], [50, 46], [51, 50], [52, 46], [52, 84], [53, 52], [54, 6], [55, 54], [55, 37], [55, 78], [56, 3], [57, 2], [57, 66], [58, 49], [59, 51], [60, 53], [63, 56], [66, 57], [67, 6], [68, 67], [68, 55], [69, 3], [72, 69], [75, 46], [75, 84], [76, 75], [77, 3], [79, 76], [80, 77], [82, 46], [82, 84], [83, 82], [84, 83], [85, 84], [85, 46], [86, 85], [87, 6], [88, 3], [91, 88], [94, 6], [95, 94], [96, 95], [97, 4], [98, 97], [99, 3], [100, 98], [101, 99], [103, 4], [104, 103], [105, 104], [106, 6], [107, 3], [108, 105], [111, 107], [114, 4], [115, 114], [116, 115], [117, 116], [118, 6], [119, 118], [119, 106], [120, 3], [123, 120], [126, 6], [127, 126], [128, 127], [129, 4], [130, 3], [131, 129], [132, 130], [134, 6], [135, 3], [138, 135], [141, 4], [142, 141], [143, 142], [145, 6], [146, 145], [147, 146], [148, 143], [148, 156], [149, 148], [150, 4], [151, 3], [152, 151], [154, 156], [154, 143], [155, 154], [156, 155], [157, 143], [157, 156], [158, 157], [162, 142], [162, 155]]}
{"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/bdd2386c9a22d4ad9d01f57af8cd35d23817d3395726dddac071bb8a65789321_bdd2386c9a22d4ad9d01f57af8cd35d23817d3395726dddac071bb8a65789321.jsonl.gz", "strip_func_name": "sub_40402C", "query": "\n\n\n__int64 *__fastcall sub_40402C(FILE *a1, unsigned int *a2, unsigned __int8 a3)\n{\n__int64 *result; // rax\n__int64 *j; // [rsp+20h] [rbp-10h]\n__int64 **i; // [rsp+28h] [rbp-8h]\n\nfprintf(a1, \"%*smode: 0x%x\\n\", a3, (const char *)&unk_40D103, *a2);\nfprintf(a1, \"%*sfd: %i\\n\", a3, (const char *)&unk_40D103, a2[2]);\nfprintf(a1, \"%*spage_size: 0x%x\\n\", a3, (const char *)&unk_40D103, a2[4]);\nfprintf(a1, \"%*sMem Regions:\\n\", a3, (const char *)&unk_40D103);\nfor ( i = (__int64 **)*((_QWORD *)a2 + 6); i; i = (__int64 **)*i )\n{\nfprintf(a1, \"%*sguest_phys: 0x%lx size: 0x%lx host_virt: %p\\n\", a3 + 2, (const char *)&unk_40D103, i[3], i[4], i[9]);\nfprintf(a1, \"%*sunused_phy_pages: \", a3 + 2, (const char *)&unk_40D103);\nsub_4070CA(a1, i[6], 0LL);\n}\nfprintf(a1, \"%*sMapped Virtual Pages:\\n\", a3, (const char *)&unk_40D103);\nsub_4070CA(a1, *((_QWORD *)a2 + 8), (unsigned int)a3 + 2);\nfprintf(a1, \"%*spgd_created: %u\\n\", a3, (const char *)&unk_40D103, *((unsigned __int8 *)a2 + 73));\nif ( *((_BYTE *)a2 + 73) )\n{\nfprintf(a1, \"%*sVirtual Translation Tables:\\n\", a3 + 2, (const char *)&unk_40D103);\nsub_4085C9(a1, a2, (unsigned __int8)(a3 + 4));\n}\nfprintf(a1, \"%*sVCPUs:\\n\", a3, (const char *)&unk_40D103);\nresult = (__int64 *)*((_QWORD *)a2 + 5);\nfor ( j = result; j; j = (__int64 *)*j )\n{\nsub_409DC2(a1, a2, *((unsigned int *)j + 4), (unsigned __int8)(a3 + 2));\nresult = (__int64 *)*j;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,j,i,sub_40402C,sub_4070CA,sub_4085C9,sub_409DC2,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'indent', 'a1': 'stream', 'a2': 'vm', 'j': 'vcpu', 'i': 'region', 'sub_40402C': 'vm_dump', 'sub_4070CA': 'sparsebit_dump', 'sub_4085C9': 'virt_dump', 'sub_409DC2': 'vcpu_dump'}"}
resolve_fwd_id
b671a6d9a865e2a0dfafbbbe0c80f375e68809a88f83415dd956d122fc4f7587
SolidRun
linux-stable
NA
static uint32_t resolve_fwd_id(struct btf_dedup *d, uint32_t type_id) { __u32 orig_type_id = type_id; if (BTF_INFO_KIND(d->btf->types[type_id]->info) != BTF_KIND_FWD) return type_id; while (is_type_mapped(d, type_id) && d->map[type_id] != type_id) type_id = d->map[type_id]; if (BTF_INFO_KIND(d->btf->types[type_id]->info) != BTF_KIND_FWD) return type_id; return orig_type_id; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_418A72", "function_addr": 4295282, "binary_name": "b671a6d9a865e2a0dfafbbbe0c80f375e68809a88f83415dd956d122fc4f7587.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_1C], esi"], [5, "mov eax, [rbp+var_1C]"], [6, "mov [rbp+var_4], eax"], [7, "mov rax, [rbp+var_18]"], [8, "mov rax, [rax]"], [9, "mov rdx, [rax+8]"], [10, "mov eax, [rbp+var_1C]"], [11, "shl rax, 3"], [12, "add rax, rdx"], [13, "mov rax, [rax]"], [14, "mov eax, [rax+4]"], [15, "shr eax, 18h"], [16, "and eax, 0Fh"], [17, "cmp eax, 7"], [18, "jz short loc_418AC9"], [19, "mov eax, [rbp+var_1C]"], [20, "jmp short locret_418B25"], [21, "mov rax, [rbp+var_18]"], [22, "mov rdx, [rax+18h]"], [23, "mov eax, [rbp+var_1C]"], [24, "shl rax, 2"], [25, "add rax, rdx"], [26, "mov eax, [rax]"], [27, "mov [rbp+var_1C], eax"], [28, "mov edx, [rbp+var_1C]"], [29, "mov rax, [rbp+var_18]"], [30, "mov esi, edx"], [31, "mov rdi, rax"], [32, "call sub_4189F1"], [33, "test al, al"], [34, "jz short loc_418AF7"], [35, "mov rax, [rbp+var_18]"], [36, "mov rdx, [rax+18h]"], [37, "mov eax, [rbp+var_1C]"], [38, "shl rax, 2"], [39, "add rax, rdx"], [40, "mov eax, [rax]"], [41, "cmp [rbp+var_1C], eax"], [42, "jnz short loc_418AB2"], [43, "mov rax, [rbp+var_18]"], [44, "mov rax, [rax]"], [45, "mov rdx, [rax+8]"], [46, "mov eax, [rbp+var_1C]"], [47, "shl rax, 3"], [48, "add rax, rdx"], [49, "mov rax, [rax]"], [50, "mov eax, [rax+4]"], [51, "shr eax, 18h"], [52, "and eax, 0Fh"], [53, "cmp eax, 7"], [54, "jz short loc_418B22"], [55, "mov eax, [rbp+var_1C]"], [56, "jmp short locret_418B25"], [57, "mov eax, [rbp+var_4]"], [58, "leave"], [59, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 3], [8, 7], [9, 8], [10, 4], [11, 10], [12, 9], [12, 11], [13, 12], [14, 13], [15, 14], [16, 15], [17, 16], [18, 17], [19, 4], [21, 3], [22, 21], [23, 4], [23, 27], [24, 23], [25, 22], [25, 24], [26, 25], [27, 26], [28, 27], [28, 4], [29, 3], [30, 28], [31, 29], [33, 32], [34, 33], [35, 3], [36, 35], [37, 27], [37, 4], [38, 37], [39, 36], [39, 38], [40, 39], [41, 40], [41, 27], [41, 4], [42, 41], [43, 3], [44, 43], [45, 44], [46, 27], [46, 4], [47, 46], [48, 45], [48, 47], [49, 48], [50, 49], [51, 50], [52, 51], [53, 52], [54, 53], [55, 4], [55, 27], [57, 6], [59, 55], [59, 57], [59, 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/b671a6d9a865e2a0dfafbbbe0c80f375e68809a88f83415dd956d122fc4f7587_b671a6d9a865e2a0dfafbbbe0c80f375e68809a88f83415dd956d122fc4f7587.jsonl.gz", "strip_func_name": "sub_418A72", "query": "\n\n\n__int64 __fastcall sub_418A72(_QWORD *a1, unsigned int a2)\n{\n__int64 result; // rax\nunsigned int v3; // [rsp+4h] [rbp-1Ch]\n\nv3 = a2;\nif ( (HIBYTE(*(_DWORD *)(*(_QWORD *)(*(_QWORD *)(*a1 + 8LL) + 8LL * a2) + 4LL)) & 0xF) != 7 )\nreturn a2;\nwhile ( sub_4189F1((__int64)a1, v3) && v3 != *(_DWORD *)(a1[3] + 4LL * v3) )\nv3 = *(_DWORD *)(a1[3] + 4LL * v3);\nif ( (HIBYTE(*(_DWORD *)(*(_QWORD *)(*(_QWORD *)(*a1 + 8LL) + 8LL * v3) + 4LL)) & 0xF) == 7 )\nresult = a2;\nelse\nresult = v3;\nreturn result;\n}\n\n\n\nQ:[a1,a2,v3,sub_418A72,sub_4189F1,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'd', 'a2': 'type_id', 'v3': 'type_ida', 'sub_418A72': 'resolve_fwd_id', 'sub_4189F1': 'is_type_mapped'}"}
os_memcmp_const
208d6f5c4c47e61fc5612dba9824bbb292bc6b59ec61b6b27384dbfe4df358f2
vanhoefm
fragattacks
NA
int os_memcmp_const(const void *a, const void *b, size_t len) { const u8 *aa = a; const u8 *bb = b; size_t i; u8 res; for (res = 0, i = 0; i < len; i++) res |= aa[i] ^ bb[i]; return res; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_48969E", "function_addr": 4757150, "binary_name": "208d6f5c4c47e61fc5612dba9824bbb292bc6b59ec61b6b27384dbfe4df358f2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_28], rdi"], [3, "mov [rbp+var_30], rsi"], [4, "mov [rbp+var_38], rdx"], [5, "mov rax, [rbp+var_28]"], [6, "mov [rbp+var_18], rax"], [7, "mov rax, [rbp+var_30]"], [8, "mov [rbp+var_20], rax"], [9, "mov [rbp+var_9], 0"], [10, "mov [rbp+var_8], 0"], [11, "jmp short loc_4896F2"], [12, "mov rdx, [rbp+var_18]"], [13, "mov rax, [rbp+var_8]"], [14, "add rax, rdx"], [15, "movzx edx, byte ptr [rax]"], [16, "mov rcx, [rbp+var_20]"], [17, "mov rax, [rbp+var_8]"], [18, "add rax, rcx"], [19, "movzx eax, byte ptr [rax]"], [20, "xor eax, edx"], [21, "or [rbp+var_9], al"], [22, "add [rbp+var_8], 1"], [23, "mov rax, [rbp+var_8]"], [24, "cmp rax, [rbp+var_38]"], [25, "jb short loc_4896CC"], [26, "movzx eax, [rbp+var_9]"], [27, "pop rbp"], [28, "retn"]], "data_dep": [[5, 2], [6, 5], [7, 3], [8, 7], [12, 6], [13, 10], [13, 22], [14, 13], [14, 12], [15, 14], [16, 8], [17, 10], [17, 22], [18, 17], [18, 16], [19, 18], [20, 19], [20, 15], [21, 9], [21, 21], [21, 20], [22, 10], [22, 22], [23, 10], [23, 22], [24, 23], [24, 4], [25, 24], [26, 21], [26, 9], [27, 0], [28, 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/208d6f5c4c47e61fc5612dba9824bbb292bc6b59ec61b6b27384dbfe4df358f2_208d6f5c4c47e61fc5612dba9824bbb292bc6b59ec61b6b27384dbfe4df358f2.jsonl.gz", "strip_func_name": "sub_48969E", "query": "\n\n\n__int64 __fastcall sub_48969E(__int64 a1, __int64 a2, unsigned __int64 a3)\n{\nunsigned __int8 v4; // [rsp+2Fh] [rbp-9h]\nunsigned __int64 i; // [rsp+30h] [rbp-8h]\n\nv4 = 0;\nfor ( i = 0LL; i < a3; ++i )\nv4 |= *(_BYTE *)(a1 + i) ^ *(_BYTE *)(a2 + i);\nreturn v4;\n}\n\n\n\nQ:[a3,a1,a2,v4,sub_48969E,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'len', 'a1': 'a', 'a2': 'b', 'v4': 'res', 'sub_48969E': 'os_memcmp_const'}"}
bgezal_op
88424ee5a5245c37ff242a8659d5e1bc52d42784d25fa569a567fbb8ea10d4c1
chettrick
discobsd
NA
static int bgezal_op (cpu_mips_t * cpu, mips_insn_t insn) { int rs = bits (insn, 21, 25); int offset = bits (insn, 0, 15); m_va_t new_pc; int res; /* compute the new pc */ new_pc = (cpu->pc + 4) + sign_extend (offset << 2, 18); /* set the return address (instruction after the delay slot) */ cpu->reg_set (cpu, MIPS_GPR_RA, cpu->pc + 8); /* take the branch if gpr[rs] >= 0 */ res = ((m_ireg_t) cpu->gpr[rs] >= 0); /* exec the instruction in the delay slot */ int ins_res = mips_exec_bdslot (cpu); if (likely (!ins_res)) { /* take the branch if the test result is true */ if (res) cpu->pc = new_pc; else cpu->pc += 8; } return (1); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_414CBA", "function_addr": 4279482, "binary_name": "88424ee5a5245c37ff242a8659d5e1bc52d42784d25fa569a567fbb8ea10d4c1.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 58h"], [4, "mov [rbp+var_58], rdi"], [5, "mov [rbp+var_5C], esi"], [6, "mov eax, [rbp+var_5C]"], [7, "mov edx, 19h"], [8, "mov esi, 15h"], [9, "mov edi, eax"], [10, "call sub_413532"], [11, "mov [rbp+var_14], eax"], [12, "mov eax, [rbp+var_5C]"], [13, "mov edx, 0Fh"], [14, "mov esi, 0"], [15, "mov edi, eax"], [16, "call sub_413532"], [17, "mov [rbp+var_18], eax"], [18, "mov rax, [rbp+var_58]"], [19, "mov esi, [rax+8]"], [20, "mov eax, [rbp+var_18]"], [21, "shl eax, 2"], [22, "mov [rbp+var_48], eax"], [23, "mov [rbp+var_4C], 12h"], [24, "mov eax, 20h "], [25, "sub eax, [rbp+var_4C]"], [26, "mov [rbp+var_4C], eax"], [27, "mov eax, [rbp+var_4C]"], [28, "mov edx, [rbp+var_48]"], [29, "mov ecx, eax"], [30, "shl edx, cl"], [31, "mov eax, [rbp+var_4C]"], [32, "mov ecx, eax"], [33, "sar edx, cl"], [34, "mov eax, edx"], [35, "add eax, esi"], [36, "add eax, 4"], [37, "mov [rbp+var_1C], eax"], [38, "mov rax, [rbp+var_58]"], [39, "mov rcx, [rax+580h]"], [40, "mov rax, [rbp+var_58]"], [41, "mov eax, [rax+8]"], [42, "lea edx, [rax+8]"], [43, "mov rax, [rbp+var_58]"], [44, "mov esi, 1Fh"], [45, "mov rdi, rax"], [46, "call rcx"], [47, "mov rax, [rbp+var_58]"], [48, "mov edx, [rbp+var_14]"], [49, "movsxd rdx, edx"], [50, "add rdx, 4"], [51, "mov eax, [rax+rdx*4+4]"], [52, "not eax"], [53, "shr eax, 1Fh"], [54, "movzx eax, al"], [55, "mov [rbp+var_20], eax"], [56, "mov rax, [rbp+var_58]"], [57, "mov [rbp+var_30], rax"], [58, "mov [rbp+var_34], 0"], [59, "mov rax, [rbp+var_30]"], [60, "mov eax, [rax+6C0h]"], [61, "mov [rbp+var_38], eax"], [62, "mov rax, [rbp+var_30]"], [63, "mov dword ptr [rax+6BCh], 1"], [64, "mov rax, [rbp+var_30]"], [65, "mov edx, [rax+8]"], [66, "mov eax, [rbp+var_38]"], [67, "lea ecx, [rdx+rax]"], [68, "lea rdx, [rbp+var_50]"], [69, "mov rax, [rbp+var_30]"], [70, "mov esi, ecx"], [71, "mov rdi, rax"], [72, "call sub_41369E"], [73, "mov [rbp+var_34], eax"], [74, "cmp [rbp+var_34], 1"], [75, "jnz short loc_414DDF"], [76, "mov rax, [rbp+var_30]"], [77, "mov dword ptr [rax+6BCh], 0"], [78, "mov eax, 1"], [79, "jmp loc_414F10"], [80, "mov rax, [rbp+var_30]"], [81, "mov dword ptr [rax+6BCh], 1"], [82, "mov rax, [rbp+var_30]"], [83, "mov rax, [rax+0A0h]"], [84, "mov eax, [rax+68h]"], [85, "cmp eax, 2"], [86, "jg short loc_414E39"], [87, "mov rax, [rbp+var_30]"], [88, "mov rax, [rax+0A0h]"], [89, "mov eax, [rax+68h]"], [90, "cmp eax, 1"], [91, "jle loc_414E9C"], [92, "mov rax, [rbp+var_30]"], [93, "mov eax, [rax+0E0h]"], [94, "and eax, 10h"], [95, "test eax, eax"], [96, "jz short loc_414E9C"], [97, "mov rax, [rbp+var_30]"], [98, "mov eax, [rax+0E0h]"], [99, "and eax, 2"], [100, "test eax, eax"], [101, "jnz short loc_414E9C"], [102, "mov eax, [rbp+var_50]"], [103, "mov rdx, [rbp+var_30]"], [104, "mov ecx, [rdx+8]"], [105, "mov edx, [rbp+var_38]"], [106, "add ecx, edx"], [107, "mov edx, eax"], [108, "mov esi, ecx"], [109, "mov edi, offset a08x08x_0"], [110, "mov eax, 0"], [111, "call _printf"], [112, "mov rdi, cs:stdout"], [113, "mov rax, [rbp+var_30]"], [114, "mov ecx, [rax+6C4h]"], [115, "mov esi, [rbp+var_50]"], [116, "mov rax, [rbp+var_30]"], [117, "mov eax, [rax+8]"], [118, "mov edx, [rbp+var_38]"], [119, "mov r8, rdi"], [120, "mov edi, eax"], [121, "call sub_42A2CE"], [122, "mov edi, 0Ah"], [123, "call _putchar"], [124, "mov rax, cs:stdout"], [125, "mov rdi, rax"], [126, "call _fflush"], [127, "mov eax, [rbp+var_50]"], [128, "mov rdx, [rbp+var_30]"], [129, "mov [rbp+var_40], rdx"], [130, "mov [rbp+var_44], eax"], [131, "mov rax, [rbp+var_40]"], [132, "mov eax, [rax+6C4h]"], [133, "cdqe"], [134, "test rax, rax"], [135, "jz short loc_414ECE"], [136, "mov edx, [rbp+var_44]"], [137, "mov rax, [rbp+var_40]"], [138, "mov esi, edx"], [139, "mov rdi, rax"], [140, "call sub_41B905"], [141, "jmp short loc_414EFC"], [142, "mov eax, [rbp+var_44]"], [143, "shr eax, 1Ah"], [144, "mov ebx, eax"], [145, "mov edx, ebx"], [146, "mov rax, rdx"], [147, "add rax, rax"], [148, "add rax, rdx"], [149, "shl rax, 3"], [150, "add rax, offset funcs_41382D"], [151, "mov rcx, [rax]"], [152, "mov edx, [rbp+var_44]"], [153, "mov rax, [rbp+var_40]"], [154, "mov esi, edx"], [155, "mov rdi, rax"], [156, "call rcx"], [157, "mov [rbp+var_34], eax"], [158, "mov rax, [rbp+var_30]"], [159, "mov dword ptr [rax+6BCh], 0"], [160, "mov eax, [rbp+var_34]"], [161, "mov [rbp+var_24], eax"], [162, "cmp [rbp+var_24], 0"], [163, "setz al"], [164, "movzx eax, al"], [165, "test rax, rax"], [166, "jz short loc_414F45"], [167, "cmp [rbp+var_20], 0"], [168, "jz short loc_414F34"], [169, "mov rax, [rbp+var_58]"], [170, "mov edx, [rbp+var_1C]"], [171, "mov [rax+8], edx"], [172, "jmp short loc_414F45"], [173, "mov rax, [rbp+var_58]"], [174, "mov eax, [rax+8]"], [175, "lea edx, [rax+8]"], [176, "mov rax, [rbp+var_58]"], [177, "mov [rax+8], edx"], [178, "mov eax, 1"], [179, "mov rbx, [rbp+var_8]"], [180, "leave"], [181, "retn"]], "data_dep": [[6, 5], [9, 6], [11, 10], [12, 5], [15, 12], [17, 16], [18, 4], [19, 18], [20, 17], [21, 20], [22, 21], [25, 23], [25, 24], [26, 25], [27, 26], [28, 22], [29, 27], [30, 29], [30, 28], [31, 26], [32, 31], [33, 30], [33, 32], [34, 33], [35, 19], [35, 34], [36, 35], [37, 36], [38, 4], [39, 38], [40, 4], [41, 40], [42, 41], [42, 33], [43, 4], [45, 43], [46, 39], [47, 4], [48, 11], [49, 48], [50, 49], [51, 47], [52, 51], [53, 52], [54, 53], [55, 54], [56, 4], [57, 56], [59, 57], [60, 59], [61, 60], [62, 57], [63, 62], [64, 57], [65, 63], [65, 64], [66, 61], [67, 63], [67, 39], [67, 66], [68, 65], [69, 57], [70, 67], [71, 69], [73, 72], [74, 73], [75, 74], [76, 57], [77, 76], [80, 57], [81, 80], [82, 57], [83, 82], [83, 81], [84, 81], [84, 83], [85, 84], [86, 85], [87, 57], [88, 63], [88, 81], [88, 87], [89, 63], [89, 88], [89, 81], [90, 89], [91, 90], [92, 57], [93, 63], [93, 81], [93, 92], [94, 93], [95, 94], [96, 95], [97, 57], [98, 63], [98, 81], [98, 97], [99, 98], [100, 99], [101, 100], [103, 57], [104, 63], [104, 81], [104, 103], [105, 61], [106, 104], [106, 105], [107, 102], [108, 106], [113, 57], [114, 63], [114, 81], [114, 113], [116, 57], [117, 81], [117, 116], [117, 63], [118, 61], [119, 112], [120, 117], [125, 124], [128, 57], [129, 128], [130, 127], [131, 129], [132, 63], [132, 131], [132, 81], [134, 132], [135, 134], [136, 130], [137, 129], [138, 136], [139, 137], [142, 130], [143, 142], [144, 143], [145, 144], [146, 145], [147, 146], [148, 145], [148, 147], [149, 148], [150, 149], [151, 150], [151, 63], [151, 81], [152, 130], [153, 129], [154, 152], [155, 153], [156, 151], [157, 140], [157, 156], [158, 57], [159, 158], [160, 157], [161, 78], [161, 160], [162, 161], [163, 78], [163, 160], [163, 162], [164, 163], [165, 164], [166, 165], [167, 55], [168, 167], [169, 4], [170, 37], [171, 170], [171, 169], [173, 4], [174, 173], [174, 77], [174, 159], [174, 63], [174, 81], [174, 177], [175, 177], [175, 174], [175, 68], [175, 77], [175, 159], [175, 152], [175, 63], [175, 136], [175, 81], [176, 4], [177, 176], [177, 175], [181, 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/88424ee5a5245c37ff242a8659d5e1bc52d42784d25fa569a567fbb8ea10d4c1_88424ee5a5245c37ff242a8659d5e1bc52d42784d25fa569a567fbb8ea10d4c1.jsonl.gz", "strip_func_name": "sub_414CBA", "query": "\n\n\n__int64 __fastcall sub_414CBA(__int64 a1, unsigned int a2)\n{\nint v2; // esi\nint v3; // eax\nint v4; // eax\nint v6[3]; // [rsp+10h] [rbp-50h] BYREF\nunsigned int v7; // [rsp+1Ch] [rbp-44h]\n__int64 v8; // [rsp+20h] [rbp-40h]\nunsigned int v9; // [rsp+28h] [rbp-38h]\nint v10; // [rsp+2Ch] [rbp-34h]\n__int64 v11; // [rsp+30h] [rbp-30h]\nint v12; // [rsp+3Ch] [rbp-24h]\n_BOOL4 v13; // [rsp+40h] [rbp-20h]\nint v14; // [rsp+44h] [rbp-1Ch]\nint v15; // [rsp+48h] [rbp-18h]\nint v16; // [rsp+4Ch] [rbp-14h]\n\nv16 = sub_413532(a2, 21, 25);\nv15 = sub_413532(a2, 0, 15);\nv2 = *(_DWORD *)(a1 + 8);\nv6[2] = 4 * v15;\nv6[1] = 14;\nv14 = v2 + (v15 << 16 >> 14) + 4;\n(*(void (__fastcall **)(__int64, __int64, _QWORD))(a1 + 1408))(a1, 31LL, (unsigned int)(*(_DWORD *)(a1 + 8) + 8));\nv13 = *(_DWORD *)(a1 + 4 * (v16 + 4LL) + 4) >= 0;\nv11 = a1;\nv10 = 0;\nv9 = *(_DWORD *)(a1 + 1728);\n*(_DWORD *)(a1 + 1724) = 1;\nv10 = sub_41369E(v11, *(_DWORD *)(v11 + 8) + v9, v6);\nif ( v10 == 1 )\n{\n*(_DWORD *)(v11 + 1724) = 0;\nv3 = 1;\n}\nelse\n{\n*(_DWORD *)(v11 + 1724) = 1;\nif ( *(int *)(*(_QWORD *)(v11 + 160) + 104LL) > 2\n|| *(int *)(*(_QWORD *)(v11 + 160) + 104LL) > 1\n&& (*(_DWORD *)(v11 + 224) & 0x10) != 0\n&& (*(_DWORD *)(v11 + 224) & 2) == 0 )\n{\nprintf(\"%08x: %08x \", v9 + *(_DWORD *)(v11 + 8), (unsigned int)v6[0]);\nsub_42A2CE(*(unsigned int *)(v11 + 8), (unsigned int)v6[0], v9, *(unsigned int *)(v11 + 1732), stdout);\nputchar(10);\nfflush(stdout);\n}\nv8 = v11;\nv7 = v6[0];\nif ( *(_DWORD *)(v11 + 1732) )\nv4 = sub_41B905(v8, v7);\nelse\nv4 = ((__int64 (__fastcall *)(__int64, _QWORD))funcs_41382D[3 * (v7 >> 26)])(v8, v7);\nv10 = v4;\n*(_DWORD *)(v11 + 1724) = 0;\nv3 = v10;\n}\nv12 = v3;\nif ( !v3 )\n{\nif ( v13 )\n*(_DWORD *)(a1 + 8) = v14;\nelse\n*(_DWORD *)(a1 + 8) += 8;\n}\nreturn 1LL;\n}\n\n\n\nQ:[a1,a2,v6,v7,v9,v12,v13,v14,v15,v16,sub_414CBA,sub_413532,sub_41369E,sub_42A2CE,sub_41B905,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'cpu', 'a2': 'insn', 'v6': 'opcode', 'v7': 'instr', 'v9': 'nbytes', 'v12': 'ins_res', 'v13': 'res', 'v14': 'new_pc', 'v15': 'offset', 'v16': 'rs', 'sub_414CBA': 'bgezal_op', 'sub_413532': 'bits_0', 'sub_41369E': 'mips_fetch_instruction', 'sub_42A2CE': 'print_mips', 'sub_41B905': 'mips_exec_mips16e'}"}
AcpiExCreateMethod
409f7ebd875056ec33b17ff69e77e300c0715d956d9a542312496070b0061f7d
bitdefender
napoca
NA
ACPI_STATUS AcpiExCreateMethod ( UINT8 *AmlStart, UINT32 AmlLength, ACPI_WALK_STATE *WalkState) { ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0]; ACPI_OPERAND_OBJECT *ObjDesc; ACPI_STATUS Status; UINT8 MethodFlags; ACPI_FUNCTION_TRACE_PTR (ExCreateMethod, WalkState); /* Create a new method object */ ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD); if (!ObjDesc) { Status = AE_NO_MEMORY; goto Exit; } /* Save the method's AML pointer and length */ ObjDesc->Method.AmlStart = AmlStart; ObjDesc->Method.AmlLength = AmlLength; ObjDesc->Method.Node = Operand[0]; /* * Disassemble the method flags. Split off the ArgCount, Serialized * flag, and SyncLevel for efficiency. */ MethodFlags = (UINT8) Operand[1]->Integer.Value; ObjDesc->Method.ParamCount = (UINT8) (MethodFlags & AML_METHOD_ARG_COUNT); /* * Get the SyncLevel. If method is serialized, a mutex will be * created for this method when it is parsed. */ if (MethodFlags & AML_METHOD_SERIALIZED) { ObjDesc->Method.InfoFlags = ACPI_METHOD_SERIALIZED; /* * ACPI 1.0: SyncLevel = 0 * ACPI 2.0: SyncLevel = SyncLevel in method declaration */ ObjDesc->Method.SyncLevel = (UINT8) ((MethodFlags & AML_METHOD_SYNC_LEVEL) >> 4); } /* Attach the new object to the method Node */ Status = AcpiNsAttachObject ((ACPI_NAMESPACE_NODE *) Operand[0], ObjDesc, ACPI_TYPE_METHOD); /* Remove local reference to the object */ AcpiUtRemoveReference (ObjDesc); Exit: /* Remove a reference to the operand */ AcpiUtRemoveReference (Operand[1]); return_ACPI_STATUS (Status); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40CDEA", "function_addr": 4247018, "binary_name": "409f7ebd875056ec33b17ff69e77e300c0715d956d9a542312496070b0061f7d.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_2C], esi"], [5, "mov [rbp+var_38], rdx"], [6, "mov rax, [rbp+var_38]"], [7, "add rax, 368h"], [8, "mov [rbp+var_10], rax"], [9, "mov ecx, 8"], [10, "mov edx, 80h"], [11, "mov esi, 260h"], [12, "mov edi, offset aExcreate"], [13, "call sub_428947"], [14, "mov [rbp+var_18], rax"], [15, "cmp [rbp+var_18], 0"], [16, "jnz short loc_40CE3B"], [17, "mov [rbp+var_4], 4"], [18, "jmp loc_40CECF"], [19, "mov rax, [rbp+var_18]"], [20, "mov rdx, [rbp+var_28]"], [21, "mov [rax+20h], rdx"], [22, "mov rax, [rbp+var_18]"], [23, "mov edx, [rbp+var_2C]"], [24, "mov [rax+30h], edx"], [25, "mov rax, [rbp+var_10]"], [26, "mov rdx, [rax]"], [27, "mov rax, [rbp+var_18]"], [28, "mov [rax+18h], rdx"], [29, "mov rax, [rbp+var_10]"], [30, "add rax, 8"], [31, "mov rax, [rax]"], [32, "mov rax, [rax+10h]"], [33, "mov [rbp+var_19], al"], [34, "movzx eax, [rbp+var_19]"], [35, "and eax, 7"], [36, "mov edx, eax"], [37, "mov rax, [rbp+var_18]"], [38, "mov [rax+0Eh], dl"], [39, "movzx eax, [rbp+var_19]"], [40, "and eax, 8"], [41, "test eax, eax"], [42, "jz short loc_40CEA5"], [43, "mov rax, [rbp+var_18]"], [44, "mov byte ptr [rax+0Dh], 4"], [45, "movzx eax, [rbp+var_19]"], [46, "shr al, 4"], [47, "mov edx, eax"], [48, "mov rax, [rbp+var_18]"], [49, "mov [rax+0Fh], dl"], [50, "mov rax, [rbp+var_10]"], [51, "mov rax, [rax]"], [52, "mov rcx, [rbp+var_18]"], [53, "mov edx, 8"], [54, "mov rsi, rcx"], [55, "mov rdi, rax"], [56, "call sub_41807D"], [57, "mov [rbp+var_4], eax"], [58, "mov rax, [rbp+var_18]"], [59, "mov rdi, rax"], [60, "call sub_426B81"], [61, "mov rax, [rbp+var_10]"], [62, "add rax, 8"], [63, "mov rax, [rax]"], [64, "mov rdi, rax"], [65, "call sub_426B81"], [66, "mov eax, [rbp+var_4]"], [67, "leave"], [68, "retn"]], "data_dep": [[6, 5], [7, 6], [8, 7], [14, 13], [15, 14], [16, 15], [19, 14], [20, 3], [21, 19], [21, 20], [22, 14], [23, 4], [24, 23], [24, 22], [25, 8], [26, 24], [26, 25], [27, 14], [28, 27], [28, 26], [29, 8], [30, 29], [31, 28], [31, 30], [32, 31], [32, 28], [33, 32], [34, 33], [35, 34], [36, 35], [37, 14], [38, 37], [38, 36], [39, 33], [40, 39], [41, 40], [42, 41], [43, 14], [44, 43], [45, 33], [46, 45], [47, 46], [48, 14], [49, 47], [49, 48], [50, 8], [51, 38], [51, 44], [51, 50], [51, 28], [51, 49], [51, 21], [51, 24], [52, 14], [54, 52], [55, 51], [57, 56], [58, 14], [59, 58], [61, 8], [62, 61], [63, 28], [63, 49], [63, 21], [63, 24], [63, 38], [63, 44], [63, 62], [64, 63], [66, 57], [66, 17], [68, 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/409f7ebd875056ec33b17ff69e77e300c0715d956d9a542312496070b0061f7d_409f7ebd875056ec33b17ff69e77e300c0715d956d9a542312496070b0061f7d.jsonl.gz", "strip_func_name": "sub_40CDEA", "query": "\n\n\n__int64 __fastcall sub_40CDEA(__int64 a1, int a2, __int64 a3)\n{\nunsigned __int8 v4; // [rsp+27h] [rbp-19h]\n__int64 v5; // [rsp+28h] [rbp-18h]\n_QWORD *v6; // [rsp+30h] [rbp-10h]\nunsigned int v7; // [rsp+3Ch] [rbp-4h]\n\nv6 = (_QWORD *)(a3 + 872);\nv5 = sub_428947(\"excreate\", 608LL, 128LL, 8LL);\nif ( v5 )\n{\n*(_QWORD *)(v5 + 32) = a1;\n*(_DWORD *)(v5 + 48) = a2;\n*(_QWORD *)(v5 + 24) = *v6;\nv4 = *(_QWORD *)(v6[1] + 16LL);\n*(_BYTE *)(v5 + 14) = *(_BYTE *)(v6[1] + 16LL) & 7;\nif ( (v4 & 8) != 0 )\n{\n*(_BYTE *)(v5 + 13) = 4;\n*(_BYTE *)(v5 + 15) = v4 >> 4;\n}\nv7 = sub_41807D(*v6, v5, 8LL);\nsub_426B81(v5);\n}\nelse\n{\nv7 = 4;\n}\nsub_426B81(v6[1]);\nreturn v7;\n}\n\n\n\nQ:[a3,a1,a2,v4,v5,v6,v7,sub_40CDEA,sub_428947,sub_41807D,sub_426B81,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'WalkState', 'a1': 'AmlStart', 'a2': 'AmlLength', 'v4': 'MethodFlags', 'v5': 'ObjDesc', 'v6': 'Operand', 'v7': 'Status', 'sub_40CDEA': 'AcpiExCreateMethod', 'sub_428947': 'AcpiUtCreateInternalObjectDbg', 'sub_41807D': 'AcpiNsAttachObject', 'sub_426B81': 'AcpiUtRemoveReference'}"}
bam_mplp_constructor
785c51c293bc7d0081d0464083dd1c283bca3385870972dfc71f15e86e008169
thegenemyers
FASTK
NA
void bam_mplp_constructor(bam_mplp_t iter, int (*func)(void *arg, const bam1_t *b, bam_pileup_cd *cd)) { int i; for (i = 0; i < iter->n; ++i) bam_plp_constructor(iter->iter[i], func); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42D4DB", "function_addr": 4379867, "binary_name": "785c51c293bc7d0081d0464083dd1c283bca3385870972dfc71f15e86e008169.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 [rbp+var_4], 0"], [6, "jmp short loc_42D51E"], [7, "mov rax, [rbp+var_18]"], [8, "mov rdx, [rax+20h]"], [9, "mov eax, [rbp+var_4]"], [10, "cdqe"], [11, "shl rax, 3"], [12, "add rax, rdx"], [13, "mov rax, [rax]"], [14, "mov rdx, [rbp+var_20]"], [15, "mov rsi, rdx"], [16, "mov rdi, rax"], [17, "call sub_42B46C"], [18, "add [rbp+var_4], 1"], [19, "mov rax, [rbp+var_18]"], [20, "mov eax, [rax]"], [21, "cmp [rbp+var_4], eax"], [22, "jl short loc_42D4F4"], [23, "nop"], [24, "nop"], [25, "leave"], [26, "retn"]], "data_dep": [[7, 3], [8, 7], [9, 5], [9, 18], [11, 9], [12, 11], [12, 8], [13, 12], [14, 4], [15, 14], [16, 13], [18, 18], [18, 5], [19, 3], [20, 19], [21, 18], [21, 5], [21, 20], [22, 21], [26, 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/785c51c293bc7d0081d0464083dd1c283bca3385870972dfc71f15e86e008169_785c51c293bc7d0081d0464083dd1c283bca3385870972dfc71f15e86e008169.jsonl.gz", "strip_func_name": "sub_42D4DB", "query": "\n\n\n__int64 __fastcall sub_42D4DB(unsigned int *a1, __int64 a2)\n{\n__int64 result; // rax\nint i; // [rsp+1Ch] [rbp-4h]\n\nfor ( i = 0; ; ++i )\n{\nresult = *a1;\nif ( i >= (int)result )\nbreak;\nsub_42B46C(*(_QWORD *)(*((_QWORD *)a1 + 4) + 8LL * i), a2);\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_42D4DB,sub_42B46C,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'iter', 'a2': 'func', 'sub_42D4DB': 'bam_mplp_constructor', 'sub_42B46C': 'bam_plp_constructor'}"}
js_aggregate_error_constructor
05a784cbaf63e77696cf61106257fb3d5370a16def412a568e4bf7f4bb9147ce
guidovranken
libfuzzer-js
NA
static JSValue js_aggregate_error_constructor(JSContext *ctx, JSValueConst errors) { JSValue obj; obj = JS_NewObjectProtoClass(ctx, ctx->native_error_proto[JS_AGGREGATE_ERROR], JS_CLASS_ERROR); if (JS_IsException(obj)) return obj; JS_DefinePropertyValue(ctx, obj, JS_ATOM_errors, JS_DupValue(ctx, errors), JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE); return obj; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_471259", "function_addr": 4657753, "binary_name": "05a784cbaf63e77696cf61106257fb3d5370a16def412a568e4bf7f4bb9147ce.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov rcx, rdx"], [5, "mov rax, rsi"], [6, "mov rdx, rdi"], [7, "mov rdx, rcx"], [8, "mov [rbp+var_30], rax"], [9, "mov [rbp+var_28], rdx"], [10, "mov rax, [rbp+var_18]"], [11, "mov rsi, [rax+108h]"], [12, "mov rdx, [rax+110h]"], [13, "mov rax, [rbp+var_18]"], [14, "mov ecx, 3"], [15, "mov rdi, rax"], [16, "call sub_4137F5"], [17, "mov [rbp+var_10], rax"], [18, "mov [rbp+var_8], rdx"], [19, "mov rdx, [rbp+var_10]"], [20, "mov rax, [rbp+var_8]"], [21, "mov rdi, rdx"], [22, "mov rsi, rax"], [23, "call sub_40A7A1"], [24, "test eax, eax"], [25, "jz short loc_4712C5"], [26, "mov rax, [rbp+var_10]"], [27, "mov rdx, [rbp+var_8]"], [28, "jmp short locret_47130D"], [29, "mov rcx, [rbp+var_30]"], [30, "mov rdx, [rbp+var_28]"], [31, "mov rax, [rbp+var_18]"], [32, "mov rsi, rcx"], [33, "mov rdi, rax"], [34, "call sub_40A91D"], [35, "mov rsi, [rbp+var_10]"], [36, "mov r10, [rbp+var_8]"], [37, "mov rdi, [rbp+var_18]"], [38, "sub rsp, 8"], [39, "push 3"], [40, "mov r8, rax"], [41, "mov r9, rdx"], [42, "mov ecx, 34h "], [43, "mov rdx, r10"], [44, "call sub_421C5F"], [45, "add rsp, 10h"], [46, "mov rax, [rbp+var_10]"], [47, "mov rdx, [rbp+var_8]"], [48, "leave"], [49, "retn"]], "data_dep": [[7, 4], [8, 5], [9, 7], [10, 3], [11, 10], [12, 10], [13, 3], [15, 13], [17, 16], [18, 12], [19, 17], [20, 18], [21, 19], [22, 20], [24, 23], [25, 24], [26, 17], [27, 18], [29, 8], [30, 9], [31, 3], [32, 29], [33, 31], [35, 17], [36, 18], [37, 3], [38, 2], [40, 34], [41, 30], [43, 36], [45, 38], [46, 17], [47, 18], [49, 26], [49, 46]]}
{"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/05a784cbaf63e77696cf61106257fb3d5370a16def412a568e4bf7f4bb9147ce_05a784cbaf63e77696cf61106257fb3d5370a16def412a568e4bf7f4bb9147ce.jsonl.gz", "strip_func_name": "sub_471259", "query": "\n\n\n__int64 __fastcall sub_471259(__int64 a1, _DWORD *a2, unsigned int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11)\n{\n__int64 v11; // rdx\n_DWORD *v13; // rax\n__int64 v14; // rdx\ndouble v15; // xmm4_8\ndouble v16; // xmm5_8\n__int64 v18; // [rsp+20h] [rbp-10h]\n__int64 v19; // [rsp+28h] [rbp-8h]\n\nv18 = sub_4137F5(a1, *(_QWORD *)(a1 + 264), *(_QWORD *)(a1 + 272), 3u);\nv19 = v11;\nif ( !sub_40A7A1(v18, v11) )\n{\nv13 = sub_40A91D(a1, a2, a3);\nsub_421C5F(a1, v18, v19, 0x34u, v13, v14, a4, a5, a6, a7, v15, v16, a10, a11, 3u);\n}\nreturn v18;\n}\n\n\n\nQ:[a1,a2,v18,sub_471259,sub_4137F5,sub_40A7A1,sub_40A91D,sub_421C5F,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ctx', 'a2': 'errors', 'v18': 'obj', 'sub_471259': 'js_aggregate_error_constructor', 'sub_4137F5': 'JS_NewObjectProtoClass', 'sub_40A7A1': 'JS_IsException_0', 'sub_40A91D': 'JS_DupValue_0', 'sub_421C5F': 'JS_DefinePropertyValue'}"}
bcm2835_version
93ff8321496f266e0636349715512c5b08cf85171f3c7301da663912d1131b72
miniwinwm
miniwinwm
NA
unsigned int bcm2835_version(void) { return BCM2835_VERSION; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_413AED", "function_addr": 4274925, "binary_name": "93ff8321496f266e0636349715512c5b08cf85171f3c7301da663912d1131b72.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, 2752h"], [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/93ff8321496f266e0636349715512c5b08cf85171f3c7301da663912d1131b72_93ff8321496f266e0636349715512c5b08cf85171f3c7301da663912d1131b72.jsonl.gz", "strip_func_name": "sub_413AED", "query": "\n\n\n__int64 sub_413AED()\n{\nreturn 10066LL;\n}\n\n\n\nQ:[sub_413AED,]\nAssistant: ", "hints": "[]", "response": "{'sub_413AED': 'bcm2835_version'}"}
_pmksa_cache_free_entry
eee7ae2b1fa6343f62d0787a4b4e729e68108fcf48944de5e880c8604be20f95
sonic-net
sonic-buildimage
NA
static void _pmksa_cache_free_entry(struct rsn_pmksa_cache_entry *entry) { bin_clear_free(entry, sizeof(*entry)); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40CB4D", "function_addr": 4246349, "binary_name": "eee7ae2b1fa6343f62d0787a4b4e729e68108fcf48944de5e880c8604be20f95.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 esi, 90h"], [6, "mov rdi, rax"], [7, "call sub_4243EB"], [8, "nop"], [9, "leave"], [10, "retn"]], "data_dep": [[4, 3], [6, 4], [10, 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/eee7ae2b1fa6343f62d0787a4b4e729e68108fcf48944de5e880c8604be20f95_eee7ae2b1fa6343f62d0787a4b4e729e68108fcf48944de5e880c8604be20f95.jsonl.gz", "strip_func_name": "sub_40CB4D", "query": "\n\n\n__int64 __fastcall sub_40CB4D(__int64 a1)\n{\nreturn sub_4243EB(a1, 144LL);\n}\n\n\n\nQ:[a1,sub_40CB4D,sub_4243EB,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'entry', 'sub_40CB4D': '_pmksa_cache_free_entry', 'sub_4243EB': 'bin_clear_free'}"}
make_mb_row_buffer
72303f375450332c393a8a753559999c0acc00cdc494ffcd4522a6d677c4ee69
ArtifexSoftware
ghostpdl
NA
static void make_mb_row_buffer(jxr_image_t image, unsigned use_height) { size_t block_count = EXTENDED_WIDTH_BLOCKS(image) * use_height; int*data, *pred_dclp; size_t idx; int format_scale; int ch; image->mb_row_buffer[0] = (struct macroblock_s*) calloc(block_count, sizeof(struct macroblock_s)); data = (int*) calloc(block_count*256, sizeof(int)); pred_dclp = (int*) calloc(block_count*7, sizeof(int)); assert(image->mb_row_buffer[0]); assert(data); assert(pred_dclp); for (idx = 0 ; idx < block_count ; idx += 1) { image->mb_row_buffer[0][idx].data = data + 256*idx; /* 7 (used as mutilpier) = 1 DC + 3 top LP + 3 left LP coefficients used for prediction */ image->mb_row_buffer[0][idx].pred_dclp = pred_dclp + 7*idx; } format_scale = 256; if (image->use_clr_fmt == 2 /* YUV422 */) { format_scale = 16 + 8*15; } else if (image->use_clr_fmt == 1 /* YUV420 */) { format_scale = 16 + 4*15; } for (ch = 1 ; ch < image->num_channels ; ch += 1) { image->mb_row_buffer[ch] = (struct macroblock_s*) calloc(block_count, sizeof(struct macroblock_s)); data = (int*) calloc(block_count*format_scale, sizeof(int)); pred_dclp = (int*) calloc(block_count*7, sizeof(int)); assert(image->mb_row_buffer[ch]); assert(data); assert(pred_dclp); for (idx = 0 ; idx < block_count ; idx += 1) { image->mb_row_buffer[ch][idx].data = data + format_scale*idx; image->mb_row_buffer[ch][idx].pred_dclp = pred_dclp + 7*idx; } } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41C0C5", "function_addr": 4309189, "binary_name": "72303f375450332c393a8a753559999c0acc00cdc494ffcd4522a6d677c4ee69.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, "mov rax, [rbp+var_38]"], [6, "mov eax, [rax+0Ch]"], [7, "shr eax, 4"], [8, "imul eax, [rbp+var_3C]"], [9, "mov eax, eax"], [10, "mov [rbp+nmemb], rax"], [11, "mov rax, [rbp+nmemb]"], [12, "mov esi, 28h "], [13, "mov rdi, rax"], [14, "call _calloc"], [15, "mov rdx, rax"], [16, "mov rax, [rbp+var_38]"], [17, "mov [rax+400h], rdx"], [18, "mov rax, [rbp+nmemb]"], [19, "shl rax, 8"], [20, "mov esi, 4"], [21, "mov rdi, rax"], [22, "call _calloc"], [23, "mov [rbp+var_20], rax"], [24, "mov rdx, [rbp+nmemb]"], [25, "mov rax, rdx"], [26, "shl rax, 3"], [27, "sub rax, rdx"], [28, "mov esi, 4"], [29, "mov rdi, rax"], [30, "call _calloc"], [31, "mov [rbp+var_28], rax"], [32, "mov rax, [rbp+var_38]"], [33, "mov rax, [rax+400h]"], [34, "test rax, rax"], [35, "jnz short loc_41C168"], [36, "mov ecx, offset aMakeMbRowBuffe"], [37, "mov edx, 71h "], [38, "mov esi, offset aInitC"], [39, "mov edi, offset aImageMbRowBuff"], [40, "call ___assert_fail"], [41, "cmp [rbp+var_20], 0"], [42, "jnz short loc_41C188"], [43, "mov ecx, offset aMakeMbRowBuffe"], [44, "mov edx, 72h "], [45, "mov esi, offset aInitC"], [46, "mov edi, offset aData"], [47, "call ___assert_fail"], [48, "cmp [rbp+var_28], 0"], [49, "jnz short loc_41C1A8"], [50, "mov ecx, offset aMakeMbRowBuffe"], [51, "mov edx, 73h "], [52, "mov esi, offset aInitC"], [53, "mov edi, offset aPredDclp"], [54, "call ___assert_fail"], [55, "mov [rbp+var_8], 0"], [56, "jmp short loc_41C22C"], [57, "mov rax, [rbp+var_8]"], [58, "shl rax, 0Ah"], [59, "mov rsi, rax"], [60, "mov rax, [rbp+var_38]"], [61, "mov rcx, [rax+400h]"], [62, "mov rdx, [rbp+var_8]"], [63, "mov rax, rdx"], [64, "shl rax, 2"], [65, "add rax, rdx"], [66, "shl rax, 3"], [67, "add rax, rcx"], [68, "mov rdx, [rbp+var_20]"], [69, "add rdx, rsi"], [70, "mov [rax], rdx"], [71, "mov rdx, [rbp+var_8]"], [72, "mov rax, rdx"], [73, "shl rax, 3"], [74, "sub rax, rdx"], [75, "shl rax, 2"], [76, "mov rsi, rax"], [77, "mov rax, [rbp+var_38]"], [78, "mov rcx, [rax+400h]"], [79, "mov rdx, [rbp+var_8]"], [80, "mov rax, rdx"], [81, "shl rax, 2"], [82, "add rax, rdx"], [83, "shl rax, 3"], [84, "add rax, rcx"], [85, "mov rdx, [rbp+var_28]"], [86, "add rdx, rsi"], [87, "mov [rax+8], rdx"], [88, "add [rbp+var_8], 1"], [89, "mov rax, [rbp+var_8]"], [90, "cmp rax, [rbp+nmemb]"], [91, "jb loc_41C1B2"], [92, "mov [rbp+var_C], 100h"], [93, "mov rax, [rbp+var_38]"], [94, "movzx eax, byte ptr [rax+1Ch]"], [95, "cmp al, 2"], [96, "jnz short loc_41C256"], [97, "mov [rbp+var_C], 88h"], [98, "jmp short loc_41C269"], [99, "mov rax, [rbp+var_38]"], [100, "movzx eax, byte ptr [rax+1Ch]"], [101, "cmp al, 1"], [102, "jnz short loc_41C269"], [103, "mov [rbp+var_C], 4Ch "], [104, "mov [rbp+var_10], 1"], [105, "jmp loc_41C3F3"], [106, "mov rax, [rbp+nmemb]"], [107, "mov esi, 28h "], [108, "mov rdi, rax"], [109, "call _calloc"], [110, "mov rcx, rax"], [111, "mov rax, [rbp+var_38]"], [112, "mov edx, [rbp+var_10]"], [113, "movsxd rdx, edx"], [114, "sub rdx, 0FFFFFFFFFFFFFF80h"], [115, "mov [rax+rdx*8], rcx"], [116, "mov eax, [rbp+var_C]"], [117, "cdqe"], [118, "imul rax, [rbp+nmemb]"], [119, "mov esi, 4"], [120, "mov rdi, rax"], [121, "call _calloc"], [122, "mov [rbp+var_20], rax"], [123, "mov rdx, [rbp+nmemb]"], [124, "mov rax, rdx"], [125, "shl rax, 3"], [126, "sub rax, rdx"], [127, "mov esi, 4"], [128, "mov rdi, rax"], [129, "call _calloc"], [130, "mov [rbp+var_28], rax"], [131, "mov rax, [rbp+var_38]"], [132, "mov edx, [rbp+var_10]"], [133, "movsxd rdx, edx"], [134, "sub rdx, 0FFFFFFFFFFFFFF80h"], [135, "mov rax, [rax+rdx*8]"], [136, "test rax, rax"], [137, "jnz short loc_41C305"], [138, "mov ecx, offset aMakeMbRowBuffe"], [139, "mov edx, 86h"], [140, "mov esi, offset aInitC"], [141, "mov edi, offset aImageMbRowBuff_0"], [142, "call ___assert_fail"], [143, "cmp [rbp+var_20], 0"], [144, "jnz short loc_41C325"], [145, "mov ecx, offset aMakeMbRowBuffe"], [146, "mov edx, 87h"], [147, "mov esi, offset aInitC"], [148, "mov edi, offset aData"], [149, "call ___assert_fail"], [150, "cmp [rbp+var_28], 0"], [151, "jnz short loc_41C345"], [152, "mov ecx, offset aMakeMbRowBuffe"], [153, "mov edx, 88h"], [154, "mov esi, offset aInitC"], [155, "mov edi, offset aPredDclp"], [156, "call ___assert_fail"], [157, "mov [rbp+var_8], 0"], [158, "jmp loc_41C3E1"], [159, "mov eax, [rbp+var_C]"], [160, "cdqe"], [161, "imul rax, [rbp+var_8]"], [162, "lea rsi, ds:0[rax*4]"], [163, "mov rax, [rbp+var_38]"], [164, "mov edx, [rbp+var_10]"], [165, "movsxd rdx, edx"], [166, "sub rdx, 0FFFFFFFFFFFFFF80h"], [167, "mov rcx, [rax+rdx*8]"], [168, "mov rdx, [rbp+var_8]"], [169, "mov rax, rdx"], [170, "shl rax, 2"], [171, "add rax, rdx"], [172, "shl rax, 3"], [173, "add rax, rcx"], [174, "mov rdx, [rbp+var_20]"], [175, "add rdx, rsi"], [176, "mov [rax], rdx"], [177, "mov rdx, [rbp+var_8]"], [178, "mov rax, rdx"], [179, "shl rax, 3"], [180, "sub rax, rdx"], [181, "shl rax, 2"], [182, "mov rsi, rax"], [183, "mov rax, [rbp+var_38]"], [184, "mov edx, [rbp+var_10]"], [185, "movsxd rdx, edx"], [186, "sub rdx, 0FFFFFFFFFFFFFF80h"], [187, "mov rcx, [rax+rdx*8]"], [188, "mov rdx, [rbp+var_8]"], [189, "mov rax, rdx"], [190, "shl rax, 2"], [191, "add rax, rdx"], [192, "shl rax, 3"], [193, "add rax, rcx"], [194, "mov rdx, [rbp+var_28]"], [195, "add rdx, rsi"], [196, "mov [rax+8], rdx"], [197, "add [rbp+var_8], 1"], [198, "mov rax, [rbp+var_8]"], [199, "cmp rax, [rbp+nmemb]"], [200, "jb loc_41C352"], [201, "add [rbp+var_10], 1"], [202, "mov rax, [rbp+var_38]"], [203, "movzx eax, byte ptr [rax+29h]"], [204, "movzx eax, al"], [205, "cmp [rbp+var_10], eax"], [206, "jl loc_41C275"], [207, "nop"], [208, "nop"], [209, "leave"], [210, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 4], [8, 7], [9, 8], [10, 9], [11, 10], [13, 11], [15, 14], [16, 3], [17, 16], [17, 15], [18, 10], [19, 18], [21, 19], [23, 22], [24, 10], [25, 24], [26, 25], [27, 24], [27, 26], [29, 27], [31, 30], [32, 3], [33, 17], [33, 32], [34, 33], [35, 34], [41, 23], [42, 41], [48, 31], [49, 48], [57, 88], [57, 55], [58, 57], [59, 58], [60, 3], [61, 70], [61, 17], [61, 60], [61, 87], [62, 55], [62, 88], [63, 62], [64, 63], [65, 62], [65, 64], [66, 65], [67, 61], [67, 66], [68, 23], [69, 59], [69, 68], [70, 67], [70, 69], [71, 88], [71, 55], [72, 71], [73, 72], [74, 73], [74, 71], [75, 74], [76, 75], [77, 3], [78, 77], [78, 70], [78, 17], [79, 88], [79, 55], [80, 79], [81, 80], [82, 79], [82, 81], [83, 82], [84, 83], [84, 78], [85, 31], [86, 76], [86, 85], [87, 84], [87, 86], [88, 88], [88, 55], [89, 88], [89, 55], [90, 10], [90, 89], [91, 90], [93, 3], [94, 87], [94, 70], [94, 93], [94, 17], [95, 94], [96, 95], [99, 3], [100, 87], [100, 70], [100, 17], [100, 99], [101, 100], [102, 101], [106, 10], [108, 106], [110, 109], [111, 3], [112, 104], [112, 201], [113, 112], [114, 113], [115, 111], [115, 110], [116, 97], [116, 92], [116, 103], [118, 116], [118, 10], [120, 118], [122, 121], [123, 10], [124, 123], [125, 124], [126, 123], [126, 125], [128, 126], [130, 129], [131, 3], [132, 201], [132, 104], [133, 132], [134, 133], [135, 131], [135, 115], [136, 135], [137, 136], [143, 122], [144, 143], [150, 130], [151, 150], [159, 97], [159, 92], [159, 103], [161, 157], [161, 159], [161, 197], [162, 182], [162, 127], [163, 3], [164, 201], [164, 104], [165, 164], [166, 165], [167, 196], [167, 70], [167, 17], [167, 115], [167, 163], [167, 176], [167, 87], [168, 157], [168, 197], [169, 168], [170, 169], [171, 168], [171, 170], [172, 171], [173, 172], [173, 167], [174, 122], [175, 174], [175, 162], [176, 173], [176, 175], [177, 157], [177, 197], [178, 177], [179, 178], [180, 177], [180, 179], [181, 180], [182, 181], [183, 3], [184, 104], [184, 201], [185, 184], [186, 185], [187, 176], [187, 115], [187, 183], [188, 197], [188, 157], [189, 188], [190, 189], [191, 188], [191, 190], [192, 191], [193, 192], [193, 187], [194, 130], [195, 182], [195, 194], [196, 193], [196, 195], [197, 197], [197, 157], [198, 157], [198, 197], [199, 198], [199, 10], [200, 199], [201, 104], [201, 201], [202, 3], [203, 202], [203, 115], [203, 176], [203, 87], [203, 196], [203, 70], [203, 17], [204, 203], [205, 104], [205, 204], [205, 201], [206, 205], [210, 204]]}
{"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/72303f375450332c393a8a753559999c0acc00cdc494ffcd4522a6d677c4ee69_72303f375450332c393a8a753559999c0acc00cdc494ffcd4522a6d677c4ee69.jsonl.gz", "strip_func_name": "sub_41C0C5", "query": "\n\n\n__int64 __fastcall sub_41C0C5(__int64 a1, int a2)\n{\n__int64 result; // rax\nchar *v3; // [rsp+18h] [rbp-28h]\nchar *v4; // [rsp+18h] [rbp-28h]\nchar *v5; // [rsp+20h] [rbp-20h]\nchar *v6; // [rsp+20h] [rbp-20h]\nsize_t nmemb; // [rsp+28h] [rbp-18h]\nint j; // [rsp+30h] [rbp-10h]\nint v9; // [rsp+34h] [rbp-Ch]\nsize_t i; // [rsp+38h] [rbp-8h]\nsize_t k; // [rsp+38h] [rbp-8h]\n\nnmemb = (unsigned int)(a2 * (*(_DWORD *)(a1 + 12) >> 4));\n*(_QWORD *)(a1 + 1024) = calloc(nmemb, 0x28uLL);\nv5 = (char *)calloc(nmemb << 8, 4uLL);\nv3 = (char *)calloc(7 * nmemb, 4uLL);\nif ( !*(_QWORD *)(a1 + 1024) )\n__assert_fail(\"image->mb_row_buffer[0]\", \"init.c\", 0x71u, \"make_mb_row_buffer\");\nif ( !v5 )\n__assert_fail(\"data\", \"init.c\", 0x72u, \"make_mb_row_buffer\");\nif ( !v3 )\n__assert_fail(\"pred_dclp\", \"init.c\", 0x73u, \"make_mb_row_buffer\");\nfor ( i = 0LL; i < nmemb; ++i )\n{\n*(_QWORD *)(*(_QWORD *)(a1 + 1024) + 40 * i) = &v5[1024 * i];\n*(_QWORD *)(*(_QWORD *)(a1 + 1024) + 40 * i + 8) = &v3[28 * i];\n}\nv9 = 256;\nif ( *(_BYTE *)(a1 + 28) == 2 )\n{\nv9 = 136;\n}\nelse if ( *(_BYTE *)(a1 + 28) == 1 )\n{\nv9 = 76;\n}\nfor ( j = 1; ; ++j )\n{\nresult = *(unsigned __int8 *)(a1 + 41);\nif ( j >= (int)result )\nbreak;\n*(_QWORD *)(a1 + 8 * (j + 128LL)) = calloc(nmemb, 0x28uLL);\nv6 = (char *)calloc(nmemb * v9, 4uLL);\nv4 = (char *)calloc(7 * nmemb, 4uLL);\nif ( !*(_QWORD *)(a1 + 8 * (j + 128LL)) )\n__assert_fail(\"image->mb_row_buffer[ch]\", \"init.c\", 0x86u, \"make_mb_row_buffer\");\nif ( !v6 )\n__assert_fail(\"data\", \"init.c\", 0x87u, \"make_mb_row_buffer\");\nif ( !v4 )\n__assert_fail(\"pred_dclp\", \"init.c\", 0x88u, \"make_mb_row_buffer\");\nfor ( k = 0LL; k < nmemb; ++k )\n{\n*(_QWORD *)(*(_QWORD *)(a1 + 8 * (j + 128LL)) + 40 * k) = &v6[4 * k * v9];\n*(_QWORD *)(*(_QWORD *)(a1 + 8 * (j + 128LL)) + 40 * k + 8) = &v4[28 * k];\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v3,v6,nmemb,j,v9,i,sub_41C0C5,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'image', 'a2': 'use_height', 'v3': 'pred_dclpa', 'v6': 'dataa', 'nmemb': 'block_count', 'j': 'ch_0', 'v9': 'format_scale', 'i': 'idxa', 'sub_41C0C5': 'make_mb_row_buffer'}"}
HUF_selectDecoder
eb7d86e2eb7b883dd570b376ae3766686e7aa3d2ff51944f28920cd05b7b038a
powturbo
TurboBench
NA
U32 HUF_selectDecoder (size_t dstSize, size_t cSrcSize) { /* decoder timing evaluation */ U32 const Q = (U32)(cSrcSize * 16 / dstSize); /* Q < 16 since dstSize > cSrcSize */ U32 const D256 = (U32)(dstSize >> 8); U32 const DTime0 = algoTime[Q][0].tableTime + (algoTime[Q][0].decode256Time * D256); U32 DTime1 = algoTime[Q][1].tableTime + (algoTime[Q][1].decode256Time * D256); DTime1 += DTime1 >> 3; /* advantage to algorithm using less memory, for cache eviction */ return DTime1 < DTime0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_467971", "function_addr": 4618609, "binary_name": "eb7d86e2eb7b883dd570b376ae3766686e7aa3d2ff51944f28920cd05b7b038a.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 rax, [rbp+var_20]"], [5, "shl rax, 4"], [6, "mov edx, 0"], [7, "div [rbp+var_18]"], [8, "mov [rbp+var_4], eax"], [9, "mov rax, [rbp+var_18]"], [10, "shr rax, 8"], [11, "mov [rbp+var_8], eax"], [12, "mov edx, [rbp+var_4]"], [13, "mov rax, rdx"], [14, "add rax, rax"], [15, "add rax, rdx"], [16, "shl rax, 3"], [17, "add rax, 46FA00h"], [18, "mov ecx, [rax]"], [19, "mov edx, [rbp+var_4]"], [20, "mov rax, rdx"], [21, "add rax, rax"], [22, "add rax, rdx"], [23, "shl rax, 3"], [24, "add rax, 46FA04h"], [25, "mov eax, [rax]"], [26, "imul eax, [rbp+var_8]"], [27, "add eax, ecx"], [28, "mov [rbp+var_C], eax"], [29, "mov edx, [rbp+var_4]"], [30, "mov rax, rdx"], [31, "add rax, rax"], [32, "add rax, rdx"], [33, "shl rax, 3"], [34, "add rax, 46FA08h"], [35, "mov ecx, [rax]"], [36, "mov edx, [rbp+var_4]"], [37, "mov rax, rdx"], [38, "add rax, rax"], [39, "add rax, rdx"], [40, "shl rax, 3"], [41, "add rax, 46FA0Ch"], [42, "mov eax, [rax]"], [43, "imul eax, [rbp+var_8]"], [44, "add eax, ecx"], [45, "mov [rbp+var_10], eax"], [46, "mov eax, [rbp+var_10]"], [47, "shr eax, 3"], [48, "add [rbp+var_10], eax"], [49, "mov eax, [rbp+var_10]"], [50, "cmp eax, [rbp+var_C]"], [51, "setb al"], [52, "movzx eax, al"], [53, "pop rbp"], [54, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 2], [8, 5], [9, 7], [10, 9], [11, 10], [12, 8], [13, 12], [14, 13], [15, 14], [15, 12], [16, 15], [17, 16], [18, 17], [19, 8], [20, 19], [21, 20], [22, 19], [22, 21], [23, 22], [24, 23], [25, 24], [26, 11], [26, 25], [27, 18], [27, 26], [28, 27], [29, 8], [30, 29], [31, 30], [32, 31], [32, 29], [33, 32], [34, 33], [35, 34], [36, 8], [37, 36], [38, 37], [39, 36], [39, 38], [40, 39], [41, 40], [42, 41], [43, 42], [43, 11], [44, 35], [44, 43], [45, 44], [46, 45], [47, 46], [48, 45], [48, 47], [49, 48], [50, 49], [50, 28], [51, 50], [51, 49], [52, 51], [53, 0], [54, 52]]}
{"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/eb7d86e2eb7b883dd570b376ae3766686e7aa3d2ff51944f28920cd05b7b038a_eb7d86e2eb7b883dd570b376ae3766686e7aa3d2ff51944f28920cd05b7b038a.jsonl.gz", "strip_func_name": "sub_467971", "query": "\n\n\n_BOOL8 __fastcall sub_467971(unsigned __int64 a1, __int64 a2)\n{\nunsigned int v3; // [rsp+10h] [rbp-10h]\nint v4; // [rsp+18h] [rbp-8h]\nint v5; // [rsp+1Ch] [rbp-4h]\n\nv5 = 16 * a2 / a1;\nv4 = a1 >> 8;\nv3 = dword_46FA00[6 * v5 + 2] + v4 * dword_46FA00[6 * v5 + 3];\nreturn (v3 >> 3) + v3 < dword_46FA00[6 * v5] + v4 * dword_46FA00[6 * v5 + 1];\n}\n\n\n\nQ:[a1,a2,v3,v4,v5,sub_467971,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'dstSize', 'a2': 'cSrcSize', 'v3': 'DTime1', 'v4': 'D256', 'v5': 'Q', 'sub_467971': 'HUF_selectDecoder'}"}
drw_fontset_free
698aad5d3591badf715dbbf786297b197b8e7181f8518c9a5d98d6c7e67889a1
bakkeby
dwm-commented
NA
void drw_fontset_free(Fnt *font) { /* Only enter if we have any more fonts to free. */ if (font) { /* Calls drw_fontset_free recursively. */ drw_fontset_free(font->next); /* Release the memory used by the font. */ xfont_free(font); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403F0D", "function_addr": 4210445, "binary_name": "698aad5d3591badf715dbbf786297b197b8e7181f8518c9a5d98d6c7e67889a1.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "cmp [rbp+var_8], 0"], [5, "jz short loc_403F3C"], [6, "mov rax, [rbp+var_8]"], [7, "mov rax, [rax+20h]"], [8, "mov rdi, rax"], [9, "call sub_403F0D"], [10, "mov rax, [rbp+var_8]"], [11, "mov rdi, rax"], [12, "call sub_403E05"], [13, "nop"], [14, "leave"], [15, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 3], [7, 6], [8, 7], [10, 3], [11, 10], [15, 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/698aad5d3591badf715dbbf786297b197b8e7181f8518c9a5d98d6c7e67889a1_698aad5d3591badf715dbbf786297b197b8e7181f8518c9a5d98d6c7e67889a1.jsonl.gz", "strip_func_name": "sub_403F0D", "query": "\n\n\nvoid __fastcall sub_403F0D(_QWORD *a1)\n{\nif ( a1 )\n{\nsub_403F0D(a1[4]);\nsub_403E05(a1);\n}\n}\n\n\n\nQ:[a1,sub_403F0D,sub_403E05,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'font', 'sub_403F0D': 'drw_fontset_free', 'sub_403E05': 'xfont_free'}"}