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
|
---|---|---|---|---|---|---|---|---|
policy_action_allows | 13014c7dbeb1b5b81c6ead8a50723fc74238a7f46f41025f2efede32765f2664 | neilbrown | mdadm | NA | int policy_action_allows(struct dev_policy *plist, const char *metadata, enum policy_action want)
{
enum policy_action act = policy_action(plist, metadata);
if (act == act_err)
return 0;
return (act >= want);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_413AA3", "function_addr": 4274851, "binary_name": "13014c7dbeb1b5b81c6ead8a50723fc74238a7f46f41025f2efede32765f2664.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_24], edx"], [6, "mov rdx, [rbp+var_20]"], [7, "mov rax, [rbp+var_18]"], [8, "mov rsi, rdx"], [9, "mov rdi, rax"], [10, "call sub_4139FE"], [11, "mov [rbp+var_4], eax"], [12, "cmp [rbp+var_4], 6"], [13, "jnz short loc_413AD9"], [14, "mov eax, 0"], [15, "jmp short locret_413AE5"], [16, "mov eax, [rbp+var_4]"], [17, "cmp eax, [rbp+var_24]"], [18, "setnb al"], [19, "movzx eax, al"], [20, "leave"], [21, "retn"]], "data_dep": [[6, 4], [7, 3], [8, 6], [9, 7], [11, 10], [12, 11], [13, 12], [16, 11], [17, 16], [17, 5], [18, 17], [18, 16], [19, 18], [21, 19], [21, 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/13014c7dbeb1b5b81c6ead8a50723fc74238a7f46f41025f2efede32765f2664_13014c7dbeb1b5b81c6ead8a50723fc74238a7f46f41025f2efede32765f2664.jsonl.gz", "strip_func_name": "sub_413AA3", "query": "\n\n\n_BOOL8 __fastcall sub_413AA3(_QWORD *a1, __int64 a2, unsigned int a3)\n{\n_BOOL8 result; // rax\nunsigned int v5; // [rsp+2Ch] [rbp-4h]\n\nv5 = sub_4139FE(a1, a2);\nif ( v5 == 6 )\nresult = 0LL;\nelse\nresult = v5 >= a3;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v5,sub_413AA3,sub_4139FE,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'want', 'a1': 'plist', 'a2': 'metadata', 'v5': 'act', 'sub_413AA3': 'policy_action_allows', 'sub_4139FE': 'policy_action_0'}"} |
|
DBFIsRecordDeleted | b152f4a88e221a9ddc135cf7fa0477c621ab2603b91e19af96a1603e74d69c18 | anoved | Ground-Track-Generator | NA | int SHPAPI_CALL DBFIsRecordDeleted( DBFHandle psDBF, int iShape )
{
/* -------------------------------------------------------------------- */
/* Verify selection. */
/* -------------------------------------------------------------------- */
if( iShape < 0 || iShape >= psDBF->nRecords )
return TRUE;
/* -------------------------------------------------------------------- */
/* Have we read the record? */
/* -------------------------------------------------------------------- */
if( !DBFLoadRecord( psDBF, iShape ) )
return FALSE;
/* -------------------------------------------------------------------- */
/* '*' means deleted. */
/* -------------------------------------------------------------------- */
return psDBF->pszCurrentRecord[0] == '*';
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40A28F", "function_addr": 4235919, "binary_name": "b152f4a88e221a9ddc135cf7fa0477c621ab2603b91e19af96a1603e74d69c18.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, "cmp [rbp+var_C], 0"], [6, "js short loc_40A2B0"], [7, "mov rax, [rbp+var_8]"], [8, "mov eax, [rax+58h]"], [9, "cmp [rbp+var_C], eax"], [10, "jl short loc_40A2B7"], [11, "mov eax, 1"], [12, "jmp short locret_40A2E9"], [13, "mov edx, [rbp+var_C]"], [14, "mov rax, [rbp+var_8]"], [15, "mov esi, edx"], [16, "mov rdi, rax"], [17, "call sub_4076B0"], [18, "test eax, eax"], [19, "jnz short loc_40A2D3"], [20, "mov eax, 0"], [21, "jmp short locret_40A2E9"], [22, "mov rax, [rbp+var_8]"], [23, "mov rax, [rax+98h]"], [24, "movzx eax, byte ptr [rax]"], [25, "cmp al, 2Ah "], [26, "setz al"], [27, "movzx eax, al"], [28, "leave"], [29, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 3], [8, 7], [9, 8], [9, 4], [10, 9], [13, 4], [14, 3], [15, 13], [16, 14], [18, 17], [19, 18], [22, 3], [23, 22], [24, 23], [25, 24], [26, 24], [26, 25], [27, 26], [29, 20], [29, 27], [29, 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/b152f4a88e221a9ddc135cf7fa0477c621ab2603b91e19af96a1603e74d69c18_b152f4a88e221a9ddc135cf7fa0477c621ab2603b91e19af96a1603e74d69c18.jsonl.gz", "strip_func_name": "sub_40A28F", "query": "\n\n\n_BOOL8 __fastcall sub_40A28F(__int64 a1, int a2)\n{\nif ( a2 < 0 || a2 >= *(_DWORD *)(a1 + 88) )\nreturn 1LL;\nif ( (unsigned int)sub_4076B0(a1, a2) )\nreturn **(_BYTE **)(a1 + 152) == 42;\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,sub_40A28F,sub_4076B0,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'psDBF', 'a2': 'iShape', 'sub_40A28F': 'DBFIsRecordDeleted', 'sub_4076B0': 'DBFLoadRecord'}"} |
|
_iotx_cm_yield | 9bbc9de5dd57f4f934e24f9b8a7ac1dacad3c7a25e14002cbd8d0494c83f5fb1 | Ai-Thinker-Open | GPRS_C_SDK | NA | static int _iotx_cm_yield(int fd, unsigned int timeout)
{
POINTER_SANITY_CHECK(fd_lock, NULL_VALUE_ERROR);
iotx_cm_yield_fp yield_func;
if (fd == -1) {
int i;
for (i = 0; i < CM_MAX_FD_NUM; i++) {
yield_func = NULL;
HAL_MutexLock(fd_lock);
if (_cm_fd[i] != NULL) {
yield_func = _cm_fd[i]->yield_func;
}
HAL_MutexUnlock(fd_lock);
if (yield_func != NULL) {
yield_func(timeout);
}
}
return 0;
}
if (_fd_is_valid(fd) == -1) {
CM_ERR(ERR_INVALID_PARAMS);
return -1;
}
HAL_MutexLock(fd_lock);
yield_func = _cm_fd[fd]->yield_func;
HAL_MutexUnlock(fd_lock);
return yield_func(timeout);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_447915", "function_addr": 4487445, "binary_name": "9bbc9de5dd57f4f934e24f9b8a7ac1dacad3c7a25e14002cbd8d0494c83f5fb1.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 rax, cs:qword_4C11A0"], [6, "test rax, rax"], [7, "jnz short loc_447973"], [8, "mov rax, cs:qword_4C11A0"], [9, "sub rsp, 8"], [10, "push rax"], [11, "mov r9d, offset aFdLock"], [12, "mov r8d, offset aInvalidArgumen_5"], [13, "mov ecx, 2"], [14, "mov edx, 6Bh "], [15, "mov esi, offset aIotxCmYield_0"], [16, "mov edi, offset aUtils_20"], [17, "mov eax, 0"], [18, "call LITE_syslog"], [19, "add rsp, 10h"], [20, "mov eax, 0FFFFFFFEh"], [21, "jmp locret_447A6A"], [22, "cmp [rbp+var_14], 0FFFFFFFFh"], [23, "jnz short loc_4479F2"], [24, "mov [rbp+var_C], 0"], [25, "jmp short loc_4479E5"], [26, "mov [rbp+var_8], 0"], [27, "mov rax, cs:qword_4C11A0"], [28, "mov rdi, rax"], [29, "call HAL_MutexLock"], [30, "mov eax, [rbp+var_C]"], [31, "cdqe"], [32, "mov rax, ds:qword_4C11B0[rax*8]"], [33, "test rax, rax"], [34, "jz short loc_4479C0"], [35, "mov eax, [rbp+var_C]"], [36, "cdqe"], [37, "mov rax, ds:qword_4C11B0[rax*8]"], [38, "mov rax, [rax+48h]"], [39, "mov [rbp+var_8], rax"], [40, "mov rax, cs:qword_4C11A0"], [41, "mov rdi, rax"], [42, "call HAL_MutexUnlock"], [43, "cmp [rbp+var_8], 0"], [44, "jz short loc_4479E1"], [45, "mov eax, [rbp+var_18]"], [46, "mov rdx, [rbp+var_8]"], [47, "mov edi, eax"], [48, "call rdx"], [49, "add [rbp+var_C], 1"], [50, "cmp [rbp+var_C], 2"], [51, "jle short loc_447982"], [52, "mov eax, 0"], [53, "jmp short locret_447A6A"], [54, "mov eax, [rbp+var_14]"], [55, "mov edi, eax"], [56, "call sub_447D48"], [57, "cmp eax, 0FFFFFFFFh"], [58, "jnz short loc_447A2C"], [59, "mov r8d, offset ERR_INVALID_PARAMS"], [60, "mov ecx, 2"], [61, "mov edx, 7Fh"], [62, "mov esi, offset aIotxCmYield_0"], [63, "mov edi, offset aCm"], [64, "mov eax, 0"], [65, "call LITE_syslog"], [66, "mov eax, 0FFFFFFFFh"], [67, "jmp short locret_447A6A"], [68, "mov rax, cs:qword_4C11A0"], [69, "mov rdi, rax"], [70, "call HAL_MutexLock"], [71, "mov eax, [rbp+var_14]"], [72, "cdqe"], [73, "mov rax, ds:qword_4C11B0[rax*8]"], [74, "mov rax, [rax+48h]"], [75, "mov [rbp+var_8], rax"], [76, "mov rax, cs:qword_4C11A0"], [77, "mov rdi, rax"], [78, "call HAL_MutexUnlock"], [79, "mov eax, [rbp+var_18]"], [80, "mov rdx, [rbp+var_8]"], [81, "mov edi, eax"], [82, "call rdx"], [83, "leave"], [84, "retn"]], "data_dep": [[6, 5], [7, 6], [9, 2], [10, 8], [19, 9], [22, 3], [23, 22], [28, 27], [30, 49], [30, 24], [33, 32], [34, 33], [35, 49], [35, 24], [38, 37], [39, 38], [41, 40], [43, 39], [43, 26], [44, 43], [45, 4], [46, 39], [46, 26], [47, 45], [48, 46], [49, 49], [49, 24], [50, 49], [50, 24], [51, 50], [54, 3], [55, 54], [57, 56], [58, 57], [69, 68], [71, 3], [74, 73], [75, 74], [77, 76], [79, 4], [80, 75], [81, 79], [82, 80], [84, 20], [84, 66], [84, 52], [84, 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/9bbc9de5dd57f4f934e24f9b8a7ac1dacad3c7a25e14002cbd8d0494c83f5fb1_9bbc9de5dd57f4f934e24f9b8a7ac1dacad3c7a25e14002cbd8d0494c83f5fb1.jsonl.gz", "strip_func_name": "sub_447915", "query": "\n\n\n__int64 __fastcall sub_447915(unsigned int a1, unsigned int a2)\n{\n__int64 result; // rax\n__int64 v3; // r9\nint i; // [rsp+14h] [rbp-Ch]\nvoid (__fastcall *v5)(_QWORD); // [rsp+18h] [rbp-8h]\n__int64 (__fastcall *v6)(_QWORD); // [rsp+18h] [rbp-8h]\n\nif ( qword_4C11A0 )\n{\nif ( a1 == -1 )\n{\nfor ( i = 0; i <= 2; ++i )\n{\nv5 = 0LL;\nHAL_MutexLock(qword_4C11A0);\nif ( qword_4C11B0[i] )\nv5 = *(void (__fastcall **)(_QWORD))(qword_4C11B0[i] + 72);\nHAL_MutexUnlock(qword_4C11A0);\nif ( v5 )\nv5(a2);\n}\nresult = 0LL;\n}\nelse if ( (unsigned int)sub_447D48(a1) == -1 )\n{\nLITE_syslog((__int64)\"CM\", (int)\"_iotx_cm_yield\", 127, 2, (__int64)\"invalid parameter\", v3);\nresult = 0xFFFFFFFFLL;\n}\nelse\n{\nHAL_MutexLock(qword_4C11A0);\nv6 = *(__int64 (__fastcall **)(_QWORD))(qword_4C11B0[a1] + 72);\nHAL_MutexUnlock(qword_4C11A0);\nresult = v6(a2);\n}\n}\nelse\n{\nLITE_syslog(\n(__int64)\"utils\",\n(int)\"_iotx_cm_yield\",\n107,\n2,\n(__int64)\"Invalid argument, %s = %p\",\n(__int64)\"fd_lock\",\nqword_4C11A0);\nresult = 4294967294LL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v5,sub_447915,sub_447D48,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'fd', 'a2': 'timeout', 'v5': 'yield_funca', 'sub_447915': '_iotx_cm_yield', 'sub_447D48': '_fd_is_valid'}"} |
|
tlsv1_client_global_init | 892109def3973fcbf2ff18d6b91afb36d045fe72303d34be34e9b18fd685ad3d | vanhoefm | hostap-wpa3 | NA | int tlsv1_client_global_init(void)
{
return crypto_global_init();
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4053CA", "function_addr": 4215754, "binary_name": "892109def3973fcbf2ff18d6b91afb36d045fe72303d34be34e9b18fd685ad3d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "call sub_421B96"], [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/892109def3973fcbf2ff18d6b91afb36d045fe72303d34be34e9b18fd685ad3d_892109def3973fcbf2ff18d6b91afb36d045fe72303d34be34e9b18fd685ad3d.jsonl.gz", "strip_func_name": "sub_4053CA", "query": "\n\n\n__int64 sub_4053CA()\n{\nreturn sub_421B96();\n}\n\n\n\nQ:[sub_4053CA,sub_421B96,]\nAssistant: ", "hints": "[]", "response": "{'sub_4053CA': 'tlsv1_client_global_init', 'sub_421B96': 'crypto_global_init'}"} |
|
pj_enum_ip_interface2 | 98c1b283e9476c8bb95f42e4df7f4804ca1f7d9923e0f8202de3a9c87c2fc447 | asterisk | pjproject-archive | NA | PJ_DEF(pj_status_t) pj_enum_ip_interface2( const pj_enum_ip_option *opt,
unsigned *p_cnt,
pj_sockaddr ifs[])
{
pj_enum_ip_option opt_;
if (opt)
opt_ = *opt;
else
pj_enum_ip_option_default(&opt_);
if (opt_.af != pj_AF_INET() && opt_.omit_deprecated_ipv6) {
pj_sockaddr addrs[*p_cnt];
pj_sockaddr deprecatedAddrs[*p_cnt];
unsigned deprecatedCount = *p_cnt;
unsigned cnt = 0;
int i;
pj_status_t status;
status = get_ipv6_deprecated(&deprecatedCount, deprecatedAddrs);
if (status != PJ_SUCCESS)
return status;
status = pj_enum_ip_interface(opt_.af, p_cnt, addrs);
if (status != PJ_SUCCESS)
return status;
for (i = 0; i < *p_cnt; ++i) {
int j;
ifs[cnt++] = addrs[i];
if (addrs[i].addr.sa_family != pj_AF_INET6())
continue;
for (j = 0; j < deprecatedCount; ++j) {
if (pj_sockaddr_cmp(&addrs[i], &deprecatedAddrs[j]) == 0) {
cnt--;
break;
}
}
}
*p_cnt = cnt;
return *p_cnt ? PJ_SUCCESS : PJ_ENOTFOUND;
}
return pj_enum_ip_interface(opt_.af, p_cnt, ifs);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_442C1A", "function_addr": 4467738, "binary_name": "98c1b283e9476c8bb95f42e4df7f4804ca1f7d9923e0f8202de3a9c87c2fc447.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r15"], [3, "push r14"], [4, "push r13"], [5, "push r12"], [6, "push rbx"], [7, "sub rsp, 88h"], [8, "mov [rbp+var_78], rdi"], [9, "mov [rbp+var_80], rsi"], [10, "mov [rbp+var_88], rdx"], [11, "cmp [rbp+var_78], 0"], [12, "jz short loc_442C51"], [13, "mov rax, [rbp+var_78]"], [14, "mov rax, [rax]"], [15, "mov [rbp+var_6C], rax"], [16, "jmp short loc_442C5D"], [17, "lea rax, [rbp+var_6C]"], [18, "mov rdi, rax"], [19, "call sub_442383"], [20, "mov edx, dword ptr [rbp+var_6C]"], [21, "movzx eax, cs:word_44C8B4"], [22, "movzx eax, ax"], [23, "cmp edx, eax"], [24, "jz loc_442FB0"], [25, "mov eax, dword ptr [rbp+var_6C+4]"], [26, "test eax, eax"], [27, "jz loc_442FB0"], [28, "mov rax, rsp"], [29, "mov [rbp+var_90], rax"], [30, "mov rax, [rbp+var_80]"], [31, "mov ecx, [rax]"], [32, "mov eax, ecx"], [33, "sub rax, 1"], [34, "mov [rbp+var_48], rax"], [35, "mov eax, ecx"], [36, "mov [rbp+var_A0], rax"], [37, "mov [rbp+var_98], 0"], [38, "mov r10, [rbp+var_A0]"], [39, "mov r11, [rbp+var_98]"], [40, "imul rdx, r11, 0E0h"], [41, "imul rax, r10, 0"], [42, "lea rsi, [rdx+rax]"], [43, "mov eax, 0E0h"], [44, "mul r10"], [45, "add rsi, rdx"], [46, "mov rdx, rsi"], [47, "mov edx, ecx"], [48, "mov rax, rdx"], [49, "shl rax, 3"], [50, "sub rax, rdx"], [51, "shl rax, 2"], [52, "mov eax, ecx"], [53, "mov [rbp+var_B0], rax"], [54, "mov [rbp+var_A8], 0"], [55, "mov r8, [rbp+var_B0]"], [56, "mov r9, [rbp+var_A8]"], [57, "imul rdx, r9, 0E0h"], [58, "imul rax, r8, 0"], [59, "lea rsi, [rdx+rax]"], [60, "mov eax, 0E0h"], [61, "mul r8"], [62, "add rsi, rdx"], [63, "mov rdx, rsi"], [64, "mov edx, ecx"], [65, "mov rax, rdx"], [66, "shl rax, 3"], [67, "sub rax, rdx"], [68, "shl rax, 2"], [69, "mov rdx, rax"], [70, "mov eax, 10h"], [71, "sub rax, 1"], [72, "add rax, rdx"], [73, "mov ebx, 10h"], [74, "mov edx, 0"], [75, "div rbx"], [76, "imul rax, 10h"], [77, "sub rsp, rax"], [78, "mov rax, rsp"], [79, "add rax, 3"], [80, "shr rax, 2"], [81, "shl rax, 2"], [82, "mov [rbp+var_50], rax"], [83, "mov rax, [rbp+var_80]"], [84, "mov ecx, [rax]"], [85, "mov eax, ecx"], [86, "sub rax, 1"], [87, "mov [rbp+var_58], rax"], [88, "mov eax, ecx"], [89, "mov r14, rax"], [90, "mov r15d, 0"], [91, "imul rdx, r15, 0E0h"], [92, "imul rax, r14, 0"], [93, "lea rsi, [rdx+rax]"], [94, "mov eax, 0E0h"], [95, "mul r14"], [96, "add rsi, rdx"], [97, "mov rdx, rsi"], [98, "mov edx, ecx"], [99, "mov rax, rdx"], [100, "shl rax, 3"], [101, "sub rax, rdx"], [102, "shl rax, 2"], [103, "mov eax, ecx"], [104, "mov r12, rax"], [105, "mov r13d, 0"], [106, "imul rdx, r13, 0E0h"], [107, "imul rax, r12, 0"], [108, "lea rsi, [rdx+rax]"], [109, "mov eax, 0E0h"], [110, "mul r12"], [111, "add rsi, rdx"], [112, "mov rdx, rsi"], [113, "mov edx, ecx"], [114, "mov rax, rdx"], [115, "shl rax, 3"], [116, "sub rax, rdx"], [117, "shl rax, 2"], [118, "mov rdx, rax"], [119, "mov eax, 10h"], [120, "sub rax, 1"], [121, "add rax, rdx"], [122, "mov ebx, 10h"], [123, "mov edx, 0"], [124, "div rbx"], [125, "imul rax, 10h"], [126, "sub rsp, rax"], [127, "mov rax, rsp"], [128, "add rax, 3"], [129, "shr rax, 2"], [130, "shl rax, 2"], [131, "mov [rbp+var_60], rax"], [132, "mov rax, [rbp+var_80]"], [133, "mov eax, [rax]"], [134, "mov [rbp+var_70], eax"], [135, "mov [rbp+var_3C], 0"], [136, "mov rdx, [rbp+var_60]"], [137, "lea rax, [rbp+var_70]"], [138, "mov rsi, rdx"], [139, "mov rdi, rax"], [140, "call sub_442818"], [141, "mov [rbp+var_64], eax"], [142, "cmp [rbp+var_64], 0"], [143, "jz short loc_442E55"], [144, "mov eax, [rbp+var_64]"], [145, "jmp loc_442FA7"], [146, "mov eax, dword ptr [rbp+var_6C]"], [147, "mov rdx, [rbp+var_50]"], [148, "mov rcx, [rbp+var_80]"], [149, "mov rsi, rcx"], [150, "mov edi, eax"], [151, "call sub_442608"], [152, "mov [rbp+var_64], eax"], [153, "cmp [rbp+var_64], 0"], [154, "jz short loc_442E7B"], [155, "mov eax, [rbp+var_64]"], [156, "jmp loc_442FA7"], [157, "mov [rbp+var_38], 0"], [158, "jmp loc_442F77"], [159, "mov eax, [rbp+var_3C]"], [160, "lea edx, [rax+1]"], [161, "mov [rbp+var_3C], edx"], [162, "mov edx, eax"], [163, "mov rax, rdx"], [164, "shl rax, 3"], [165, "sub rax, rdx"], [166, "shl rax, 2"], [167, "mov rdx, rax"], [168, "mov rax, [rbp+var_88]"], [169, "add rdx, rax"], [170, "mov rsi, [rbp+var_50]"], [171, "mov eax, [rbp+var_38]"], [172, "movsxd rcx, eax"], [173, "mov rax, rcx"], [174, "shl rax, 3"], [175, "sub rax, rcx"], [176, "shl rax, 2"], [177, "add rax, rsi"], [178, "mov rcx, [rax]"], [179, "mov rbx, [rax+8]"], [180, "mov [rdx], rcx"], [181, "mov [rdx+8], rbx"], [182, "mov rcx, [rax+10h]"], [183, "mov [rdx+10h], rcx"], [184, "mov eax, [rax+18h]"], [185, "mov [rdx+18h], eax"], [186, "mov rcx, [rbp+var_50]"], [187, "mov eax, [rbp+var_38]"], [188, "movsxd rdx, eax"], [189, "mov rax, rdx"], [190, "shl rax, 3"], [191, "sub rax, rdx"], [192, "shl rax, 2"], [193, "add rax, rcx"], [194, "movzx edx, word ptr [rax]"], [195, "movzx eax, cs:word_44C8B6"], [196, "cmp dx, ax"], [197, "jnz short loc_442F72"], [198, "mov [rbp+var_34], 0"], [199, "jmp short loc_442F66"], [200, "mov eax, [rbp+var_34]"], [201, "movsxd rdx, eax"], [202, "mov rax, rdx"], [203, "shl rax, 3"], [204, "sub rax, rdx"], [205, "shl rax, 2"], [206, "mov rdx, [rbp+var_60]"], [207, "add rdx, rax"], [208, "mov eax, [rbp+var_38]"], [209, "movsxd rcx, eax"], [210, "mov rax, rcx"], [211, "shl rax, 3"], [212, "sub rax, rcx"], [213, "shl rax, 2"], [214, "mov rcx, [rbp+var_50]"], [215, "add rax, rcx"], [216, "mov rsi, rdx"], [217, "mov rdi, rax"], [218, "call sub_43DA97"], [219, "test eax, eax"], [220, "jnz short loc_442F62"], [221, "sub [rbp+var_3C], 1"], [222, "jmp short loc_442F73"], [223, "add [rbp+var_34], 1"], [224, "mov edx, [rbp+var_34]"], [225, "mov eax, [rbp+var_70]"], [226, "cmp edx, eax"], [227, "jb short loc_442F17"], [228, "jmp short loc_442F73"], [229, "nop"], [230, "add [rbp+var_38], 1"], [231, "mov rax, [rbp+var_80]"], [232, "mov edx, [rax]"], [233, "mov eax, [rbp+var_38]"], [234, "cmp edx, eax"], [235, "ja loc_442E87"], [236, "mov rax, [rbp+var_80]"], [237, "mov edx, [rbp+var_3C]"], [238, "mov [rax], edx"], [239, "mov rax, [rbp+var_80]"], [240, "mov eax, [rax]"], [241, "test eax, eax"], [242, "jz short loc_442FA2"], [243, "mov eax, 0"], [244, "jmp short loc_442FA7"], [245, "mov eax, 11176h"], [246, "mov rsp, [rbp+var_90]"], [247, "jmp short loc_442FC8"], [248, "mov eax, dword ptr [rbp+var_6C]"], [249, "mov rdx, [rbp+var_88]"], [250, "mov rcx, [rbp+var_80]"], [251, "mov rsi, rcx"], [252, "mov edi, eax"], [253, "call sub_442608"], [254, "lea rsp, [rbp-28h]"], [255, "pop rbx"], [256, "pop r12"], [257, "pop r13"], [258, "pop r14"], [259, "pop r15"], [260, "pop rbp"], [261, "retn"]], "data_dep": [[11, 8], [12, 11], [13, 8], [14, 13], [15, 14], [18, 17], [20, 15], [22, 21], [23, 20], [23, 22], [24, 23], [26, 25], [27, 26], [28, 7], [29, 28], [30, 9], [31, 30], [32, 31], [33, 32], [34, 33], [35, 31], [36, 35], [38, 36], [39, 37], [40, 20], [40, 39], [41, 35], [41, 38], [42, 41], [44, 38], [45, 40], [45, 42], [46, 45], [47, 31], [48, 47], [49, 48], [50, 47], [50, 49], [51, 50], [52, 31], [53, 52], [55, 53], [56, 54], [57, 47], [57, 56], [58, 55], [58, 52], [59, 45], [59, 58], [61, 55], [62, 57], [62, 59], [63, 62], [64, 31], [65, 64], [66, 65], [67, 64], [67, 66], [68, 67], [69, 68], [71, 70], [72, 69], [72, 71], [75, 73], [76, 72], [77, 76], [77, 7], [78, 77], [79, 78], [80, 79], [81, 80], [82, 81], [83, 9], [84, 83], [85, 84], [86, 85], [87, 86], [88, 84], [89, 88], [91, 74], [91, 90], [92, 88], [92, 89], [93, 62], [93, 92], [95, 89], [96, 91], [96, 93], [97, 96], [98, 84], [99, 98], [100, 99], [101, 98], [101, 100], [102, 101], [103, 84], [104, 103], [106, 105], [106, 98], [107, 104], [107, 103], [108, 107], [108, 96], [110, 104], [111, 106], [111, 108], [112, 111], [113, 84], [114, 113], [115, 114], [116, 113], [116, 115], [117, 116], [118, 117], [120, 119], [121, 118], [121, 120], [124, 122], [125, 121], [126, 77], [126, 125], [127, 126], [128, 127], [129, 128], [130, 129], [131, 130], [132, 9], [133, 132], [134, 133], [136, 131], [137, 133], [137, 134], [138, 136], [139, 137], [141, 140], [142, 141], [143, 142], [144, 141], [146, 15], [147, 82], [148, 9], [149, 148], [150, 146], [152, 151], [153, 152], [154, 153], [155, 152], [159, 135], [159, 221], [159, 161], [160, 183], [160, 185], [160, 159], [160, 180], [160, 232], [160, 181], [161, 160], [162, 159], [163, 162], [164, 163], [165, 162], [165, 164], [166, 165], [167, 166], [168, 10], [169, 167], [169, 168], [170, 82], [171, 157], [171, 230], [172, 171], [173, 172], [174, 173], [175, 172], [175, 174], [176, 175], [177, 176], [177, 170], [178, 177], [178, 181], [178, 183], [178, 185], [178, 180], [179, 181], [179, 183], [179, 185], [179, 180], [179, 177], [180, 169], [180, 178], [181, 169], [181, 179], [182, 177], [182, 181], [183, 169], [183, 182], [184, 177], [184, 183], [185, 169], [185, 184], [186, 82], [187, 157], [187, 230], [188, 187], [189, 188], [190, 189], [191, 188], [191, 190], [192, 191], [193, 186], [193, 192], [194, 185], [194, 193], [196, 194], [196, 195], [197, 196], [200, 223], [200, 198], [201, 200], [202, 201], [203, 202], [204, 201], [204, 203], [205, 204], [206, 131], [207, 206], [207, 205], [208, 157], [208, 230], [209, 208], [210, 209], [211, 210], [212, 209], [212, 211], [213, 212], [214, 82], [215, 214], [215, 213], [216, 207], [217, 215], [219, 218], [220, 219], [221, 161], [223, 223], [223, 198], [224, 223], [224, 198], [225, 134], [226, 225], [226, 224], [227, 226], [230, 157], [230, 230], [231, 9], [232, 181], [232, 183], [232, 231], [232, 185], [232, 180], [233, 157], [233, 230], [234, 233], [234, 232], [235, 234], [236, 9], [237, 161], [237, 135], [237, 221], [238, 236], [238, 237], [239, 9], [240, 238], [240, 239], [241, 240], [242, 241], [246, 29], [248, 15], [249, 10], [250, 9], [251, 250], [252, 248], [254, 7], [254, 246], [255, 6], [256, 5], [257, 4], [258, 3], [259, 2], [260, 0], [261, 253], [261, 155], [261, 243], [261, 245], [261, 144]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/98c1b283e9476c8bb95f42e4df7f4804ca1f7d9923e0f8202de3a9c87c2fc447_98c1b283e9476c8bb95f42e4df7f4804ca1f7d9923e0f8202de3a9c87c2fc447.jsonl.gz", "strip_func_name": "sub_442C1A", "query": "\n\n\n__int64 __fastcall sub_442C1A(__int64 *a1, int *a2, __int64 a3)\n{\nunsigned int v3; // ecx\nvoid *v4; // rsp\nunsigned int v5; // ecx\nvoid *v6; // rsp\n__int64 result; // rax\nunsigned int v8; // eax\n__int64 v9; // rdx\n__int64 v10; // rax\n__int64 v11; // rbx\n__int64 v12[5]; // [rsp+0h] [rbp-B0h] BYREF\n__int64 v13; // [rsp+28h] [rbp-88h]\nint *v14; // [rsp+30h] [rbp-80h]\n__int64 *v15; // [rsp+38h] [rbp-78h]\nunsigned int v16; // [rsp+40h] [rbp-70h] BYREF\n__int64 v17; // [rsp+44h] [rbp-6Ch] BYREF\nunsigned int v18; // [rsp+4Ch] [rbp-64h]\n__int64 v19; // [rsp+50h] [rbp-60h]\n__int64 v20; // [rsp+58h] [rbp-58h]\n__int64 v21; // [rsp+60h] [rbp-50h]\n__int64 v22; // [rsp+68h] [rbp-48h]\nint v23; // [rsp+74h] [rbp-3Ch]\nunsigned int i; // [rsp+78h] [rbp-38h]\nunsigned int j; // [rsp+7Ch] [rbp-34h]\n\nv15 = a1;\nv14 = a2;\nv13 = a3;\nif ( a1 )\nv17 = *v15;\nelse\nsub_442383(&v17);\nif ( (_DWORD)v17 == 2 || !HIDWORD(v17) )\nreturn sub_442608(v17, v14, v13);\nv12[4] = (__int64)v12;\nv3 = *v14;\nv22 = (unsigned int)*v14 - 1LL;\nv12[2] = v3;\nv12[3] = 0LL;\nv12[0] = v3;\nv12[1] = 0LL;\nv4 = alloca(16 * ((28 * (unsigned __int64)v3 + 15) / 0x10));\nv21 = 4 * (((unsigned __int64)v12 + 3) >> 2);\nv5 = *v14;\nv20 = (unsigned int)*v14 - 1LL;\nv6 = alloca(16 * ((28 * (unsigned __int64)v5 + 15) / 0x10));\nv19 = v21;\nv16 = *v14;\nv23 = 0;\nv18 = sub_442818(&v16, v21);\nif ( v18 )\nreturn v18;\nv18 = sub_442608(v17, v14, v21);\nif ( v18 )\nreturn v18;\nfor ( i = 0; *v14 > i; ++i )\n{\nv8 = v23++;\nv9 = v13 + 28LL * v8;\nv10 = v21 + 28LL * (int)i;\nv11 = *(_QWORD *)(v10 + 8);\n*(_QWORD *)v9 = *(_QWORD *)v10;\n*(_QWORD *)(v9 + 8) = v11;\n*(_QWORD *)(v9 + 16) = *(_QWORD *)(v10 + 16);\n*(_DWORD *)(v9 + 24) = *(_DWORD *)(v10 + 24);\nif ( *(_WORD *)(v21 + 28LL * (int)i) == 10 )\n{\nfor ( j = 0; j < v16; ++j )\n{\nif ( !(unsigned int)sub_43DA97((_WORD *)(v21 + 28LL * (int)i), (_WORD *)(28LL * (int)j + v19)) )\n{\n--v23;\nbreak;\n}\n}\n}\n}\n*v14 = v23;\nif ( *v14 )\nresult = 0LL;\nelse\nresult = 70006LL;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v13,v14,v15,v16,v17,v18,v19,v21,v23,sub_442C1A,sub_442383,sub_442608,sub_442818,sub_43DA97,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'ifs', 'a1': 'opt', 'a2': 'p_cnt', 'v13': 'ifsa', 'v14': 'p_cnta', 'v15': 'opta', 'v16': 'deprecatedCount', 'v17': 'opt_', 'v18': 'status', 'v19': 'p_deprecatedAddrs', 'v21': 'p_addrs', 'v23': 'cnt', 'sub_442C1A': 'pj_enum_ip_interface2', 'sub_442383': 'pj_enum_ip_option_default', 'sub_442608': 'pj_enum_ip_interface', 'sub_442818': 'get_ipv6_deprecated', 'sub_43DA97': 'pj_sockaddr_cmp'}"} |
|
perf_evlist__prepare_workload | decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08 | khadas | linux | NA | int perf_evlist__prepare_workload(struct perf_evlist *evlist, struct target *target,
const char *argv[], bool pipe_output,
void (*exec_error)(int signo, siginfo_t *info, void *ucontext))
{
int child_ready_pipe[2], go_pipe[2];
char bf;
if (pipe(child_ready_pipe) < 0) {
perror("failed to create 'ready' pipe");
return -1;
}
if (pipe(go_pipe) < 0) {
perror("failed to create 'go' pipe");
goto out_close_ready_pipe;
}
evlist->workload.pid = fork();
if (evlist->workload.pid < 0) {
perror("failed to fork");
goto out_close_pipes;
}
if (!evlist->workload.pid) {
if (pipe_output)
dup2(2, 1);
signal(SIGTERM, SIG_DFL);
close(child_ready_pipe[0]);
close(go_pipe[1]);
fcntl(go_pipe[0], F_SETFD, FD_CLOEXEC);
/*
* Tell the parent we're ready to go
*/
close(child_ready_pipe[1]);
/*
* Wait until the parent tells us to go.
*/
if (read(go_pipe[0], &bf, 1) == -1)
perror("unable to read pipe");
execvp(argv[0], (char **)argv);
if (exec_error) {
union sigval val;
val.sival_int = errno;
if (sigqueue(getppid(), SIGUSR1, val))
perror(argv[0]);
} else
perror(argv[0]);
exit(-1);
}
if (exec_error) {
struct sigaction act = {
.sa_flags = SA_SIGINFO,
.sa_sigaction = exec_error,
};
sigaction(SIGUSR1, &act, NULL);
}
if (target__none(target))
evlist->threads->map[0] = evlist->workload.pid;
close(child_ready_pipe[1]);
close(go_pipe[0]);
/*
* wait for child to settle
*/
if (read(child_ready_pipe[0], &bf, 1) == -1) {
perror("unable to read pipe");
goto out_close_pipes;
}
fcntl(go_pipe[1], F_SETFD, FD_CLOEXEC);
evlist->workload.cork_fd = go_pipe[1];
close(child_ready_pipe[0]);
return 0;
out_close_pipes:
close(go_pipe[0]);
close(go_pipe[1]);
out_close_ready_pipe:
close(child_ready_pipe[0]);
close(child_ready_pipe[1]);
return -1;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "perf_evlist__prepare_workload", "function_addr": 4629636, "binary_name": "decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0F0h"], [3, "mov [rbp+var_C8], rdi"], [4, "mov [rbp+var_D0], rsi"], [5, "mov [rbp+argv], rdx"], [6, "mov eax, ecx"], [7, "mov [rbp+var_E8], r8"], [8, "mov [rbp+var_DC], al"], [9, "mov rax, fs:28h"], [10, "mov [rbp+var_8], rax"], [11, "xor eax, eax"], [12, "lea rax, [rbp+pipedes]"], [13, "mov rdi, rax"], [14, "call _pipe"], [15, "test eax, eax"], [16, "jns short loc_46A4E9"], [17, "mov edi, offset aFailedToCreate_3"], [18, "call _perror"], [19, "mov eax, 0FFFFFFFFh"], [20, "jmp loc_46A7B2"], [21, "lea rax, [rbp+var_A8]"], [22, "mov rdi, rax"], [23, "call _pipe"], [24, "test eax, eax"], [25, "jns short loc_46A50B"], [26, "mov edi, offset aFailedToCreate_4"], [27, "call _perror"], [28, "jmp loc_46A793"], [29, "call _fork"], [30, "mov edx, eax"], [31, "mov rax, [rbp+var_C8]"], [32, "mov [rax+83Ch], edx"], [33, "mov rax, [rbp+var_C8]"], [34, "mov eax, [rax+83Ch]"], [35, "test eax, eax"], [36, "jns short loc_46A53F"], [37, "mov edi, offset aFailedToFork_0"], [38, "call _perror"], [39, "jmp loc_46A779"], [40, "mov rax, [rbp+var_C8]"], [41, "mov eax, [rax+83Ch]"], [42, "test eax, eax"], [43, "jnz loc_46A66E"], [44, "cmp [rbp+var_DC], 0"], [45, "jz short loc_46A56C"], [46, "mov esi, 1"], [47, "mov edi, 2"], [48, "call _dup2"], [49, "mov esi, 0"], [50, "mov edi, 0Fh"], [51, "call _signal"], [52, "mov eax, [rbp+pipedes]"], [53, "mov edi, eax"], [54, "call _close"], [55, "mov eax, [rbp+var_A8+4]"], [56, "mov edi, eax"], [57, "call _close"], [58, "mov eax, [rbp+var_A8]"], [59, "mov edx, 1"], [60, "mov esi, 2"], [61, "mov edi, eax"], [62, "mov eax, 0"], [63, "call _fcntl64"], [64, "mov eax, [rbp+pipedes+4]"], [65, "mov edi, eax"], [66, "call _close"], [67, "mov eax, [rbp+var_A8]"], [68, "lea rcx, [rbp+buf]"], [69, "mov edx, 1"], [70, "mov rsi, rcx"], [71, "mov edi, eax"], [72, "call _read"], [73, "cmp rax, 0FFFFFFFFFFFFFFFFh"], [74, "jnz short loc_46A5EA"], [75, "mov edi, offset aUnableToReadPi"], [76, "call _perror"], [77, "mov rax, [rbp+argv]"], [78, "mov rax, [rax]"], [79, "mov rdx, [rbp+argv]"], [80, "mov rsi, rdx"], [81, "mov rdi, rax"], [82, "call _execvp"], [83, "cmp [rbp+var_E8], 0"], [84, "jz short loc_46A652"], [85, "call ___errno_location"], [86, "mov eax, [rax]"], [87, "mov dword ptr [rbp+val], eax"], [88, "call _getppid"], [89, "mov ecx, eax"], [90, "mov rax, qword ptr [rbp+val]"], [91, "mov rdx, rax"], [92, "mov esi, 0Ah"], [93, "mov edi, ecx"], [94, "call _sigqueue"], [95, "test eax, eax"], [96, "jz short loc_46A664"], [97, "mov rax, [rbp+argv]"], [98, "mov rax, [rax]"], [99, "mov rdi, rax"], [100, "call _perror"], [101, "jmp short loc_46A664"], [102, "mov rax, [rbp+argv]"], [103, "mov rax, [rax]"], [104, "mov rdi, rax"], [105, "call _perror"], [106, "mov edi, 0FFFFFFFFh"], [107, "call _exit"], [108, "cmp [rbp+var_E8], 0"], [109, "jz short loc_46A6BD"], [110, "lea rdx, [rbp+var_A0]"], [111, "mov eax, 0"], [112, "mov ecx, 13h"], [113, "mov rdi, rdx"], [114, "rep stosq"], [115, "mov rax, [rbp+var_E8]"], [116, "mov [rbp+var_A0], rax"], [117, "mov [rbp+var_18], 4"], [118, "lea rax, [rbp+var_A0]"], [119, "mov edx, 0"], [120, "mov rsi, rax"], [121, "mov edi, 0Ah"], [122, "call _sigaction"], [123, "mov rax, [rbp+var_D0]"], [124, "mov rdi, rax"], [125, "call sub_466EB1"], [126, "test al, al"], [127, "jz short loc_46A6EE"], [128, "mov rax, [rbp+var_C8]"], [129, "mov rax, [rax+858h]"], [130, "mov rdx, [rbp+var_C8]"], [131, "mov edx, [rdx+83Ch]"], [132, "mov [rax+4], edx"], [133, "mov eax, [rbp+pipedes+4]"], [134, "mov edi, eax"], [135, "call _close"], [136, "mov eax, [rbp+var_A8]"], [137, "mov edi, eax"], [138, "call _close"], [139, "mov eax, [rbp+pipedes]"], [140, "lea rcx, [rbp+buf]"], [141, "mov edx, 1"], [142, "mov rsi, rcx"], [143, "mov edi, eax"], [144, "call _read"], [145, "cmp rax, 0FFFFFFFFFFFFFFFFh"], [146, "jnz short loc_46A736"], [147, "mov edi, offset aUnableToReadPi"], [148, "call _perror"], [149, "jmp short loc_46A779"], [150, "mov eax, [rbp+var_A8+4]"], [151, "mov edx, 1"], [152, "mov esi, 2"], [153, "mov edi, eax"], [154, "mov eax, 0"], [155, "call _fcntl64"], [156, "mov edx, [rbp+var_A8+4]"], [157, "mov rax, [rbp+var_C8]"], [158, "mov [rax+838h], edx"], [159, "mov eax, [rbp+pipedes]"], [160, "mov edi, eax"], [161, "call _close"], [162, "mov eax, 0"], [163, "jmp short loc_46A7B2"], [164, "mov eax, [rbp+var_A8]"], [165, "mov edi, eax"], [166, "call _close"], [167, "mov eax, [rbp+var_A8+4]"], [168, "mov edi, eax"], [169, "call _close"], [170, "mov eax, [rbp+pipedes]"], [171, "mov edi, eax"], [172, "call _close"], [173, "mov eax, [rbp+pipedes+4]"], [174, "mov edi, eax"], [175, "call _close"], [176, "mov eax, 0FFFFFFFFh"], [177, "mov rcx, [rbp+var_8]"], [178, "sub rcx, fs:28h"], [179, "jz short locret_46A7C6"], [180, "call ___stack_chk_fail"], [181, "leave"], [182, "retn"]], "data_dep": [[8, 6], [10, 9], [12, 11], [13, 12], [15, 14], [16, 15], [21, 15], [22, 21], [24, 23], [25, 24], [30, 29], [31, 3], [32, 30], [32, 31], [33, 3], [34, 32], [34, 33], [35, 34], [36, 35], [40, 3], [41, 40], [41, 32], [42, 41], [43, 42], [44, 8], [45, 44], [53, 52], [56, 55], [61, 58], [65, 64], [70, 68], [71, 67], [73, 72], [74, 73], [77, 5], [78, 77], [78, 32], [79, 5], [80, 79], [81, 78], [83, 7], [84, 83], [86, 85], [86, 32], [87, 86], [89, 88], [90, 87], [91, 90], [93, 89], [95, 94], [96, 95], [97, 5], [98, 32], [98, 97], [99, 98], [102, 5], [103, 102], [103, 32], [104, 103], [108, 7], [109, 108], [110, 30], [113, 110], [115, 7], [116, 115], [118, 115], [118, 116], [120, 118], [123, 4], [124, 123], [126, 125], [127, 126], [128, 3], [129, 128], [129, 132], [129, 32], [130, 3], [131, 32], [131, 130], [131, 132], [132, 129], [132, 131], [134, 133], [137, 136], [140, 112], [142, 140], [143, 139], [145, 144], [146, 145], [153, 150], [157, 3], [158, 156], [158, 157], [160, 159], [165, 164], [168, 167], [171, 170], [174, 173], [177, 10], [178, 177], [179, 178], [182, 19], [182, 176], [182, 162]]}
| {"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/decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08_decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08.jsonl.gz", "strip_func_name": "perf_evlist__prepare_workload", "query": "\n\n\n__int64 __fastcall perf_evlist__prepare_workload(__int64 a1, _QWORD *a2, const char **a3, char a4, void (*a5)(int))\n{\n__pid_t v6; // eax\nchar buf; // [rsp+37h] [rbp-B9h] BYREF\nunion sigval val; // [rsp+38h] [rbp-B8h]\nint pipedes[2]; // [rsp+40h] [rbp-B0h] BYREF\nint v13[2]; // [rsp+48h] [rbp-A8h] BYREF\nstruct sigaction v14; // [rsp+50h] [rbp-A0h] BYREF\nunsigned __int64 v15; // [rsp+E8h] [rbp-8h]\n\nv15 = __readfsqword(0x28u);\nif ( pipe(pipedes) < 0 )\n{\nperror(\"failed to create 'ready' pipe\");\nreturn 0xFFFFFFFFLL;\n}\nif ( pipe(v13) >= 0 )\n{\n*(_DWORD *)(a1 + 2108) = fork();\nif ( *(int *)(a1 + 2108) >= 0 )\n{\nif ( !*(_DWORD *)(a1 + 2108) )\n{\nif ( a4 )\ndup2(2, 1);\nsignal(15, 0LL);\nclose(pipedes[0]);\nclose(v13[1]);\nfcntl64();\nclose(pipedes[1]);\nif ( read(v13[0], &buf, 1uLL) == -1 )\nperror(\"unable to read pipe\");\nexecvp(*a3, (char *const *)a3);\nif ( !a5 || (val.sival_int = *__errno_location(), v6 = getppid(), sigqueue(v6, 10, val)) )\nperror(*a3);\nexit(-1);\n}\nif ( a5 )\n{\nmemset(&v14, 0, sizeof(v14));\nv14.sa_handler = a5;\nv14.sa_flags = 4;\nsigaction(10, &v14, 0LL);\n}\nif ( sub_466EB1(a2) )\n*(_DWORD *)(*(_QWORD *)(a1 + 2136) + 4LL) = *(_DWORD *)(a1 + 2108);\nclose(pipedes[1]);\nclose(v13[0]);\nif ( read(pipedes[0], &buf, 1uLL) != -1 )\n{\nfcntl64();\n*(_DWORD *)(a1 + 2104) = v13[1];\nclose(pipedes[0]);\nreturn 0LL;\n}\nperror(\"unable to read pipe\");\n}\nelse\n{\nperror(\"failed to fork\");\n}\nclose(v13[0]);\nclose(v13[1]);\n}\nelse\n{\nperror(\"failed to create 'go' pipe\");\n}\nclose(pipedes[0]);\nclose(pipedes[1]);\nreturn 0xFFFFFFFFLL;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,buf,pipedes,v13,v14,sub_466EB1,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'argv', 'a4': 'pipe_output', 'a1': 'evlist', 'a2': 'target', 'a5': 'exec_error', 'buf': 'bf', 'pipedes': 'child_ready_pipe', 'v13': 'go_pipe', 'v14': 'act', 'sub_466EB1': 'target__none_4'}"} |
|
query_token | fc962af895ccfb94c41ff9d7f04eccd599463af591671023af44230c6f9578f3 | analogdevicesinc | linux | NA | static int query_token(__u16 token, struct dell_wmi_smbios_buffer *buffer)
{
__u16 location;
__u16 value;
int ret;
ret = find_token(token, &location, &value);
if (ret != 0) {
printf("unable to find token %04x\n", token);
return 1;
}
return token_is_active(&location, &value, buffer);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401511", "function_addr": 4199697, "binary_name": "fc962af895ccfb94c41ff9d7f04eccd599463af591671023af44230c6f9578f3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov eax, edi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_14], ax"], [6, "movzx eax, [rbp+var_14]"], [7, "lea rdx, [rbp+var_8]"], [8, "lea rcx, [rbp+var_6]"], [9, "mov rsi, rcx"], [10, "mov edi, eax"], [11, "call sub_4012B1"], [12, "mov [rbp+var_4], eax"], [13, "cmp [rbp+var_4], 0"], [14, "jz short loc_40155E"], [15, "movzx eax, [rbp+var_14]"], [16, "mov esi, eax"], [17, "mov edi, offset aUnableToFindTo"], [18, "mov eax, 0"], [19, "call _printf"], [20, "mov eax, 1"], [21, "jmp short locret_401575"], [22, "mov rdx, [rbp+var_20]"], [23, "lea rcx, [rbp+var_8]"], [24, "lea rax, [rbp+var_6]"], [25, "mov rsi, rcx"], [26, "mov rdi, rax"], [27, "call sub_401492"], [28, "leave"], [29, "retn"]], "data_dep": [[5, 3], [6, 5], [9, 8], [10, 6], [12, 11], [13, 12], [14, 13], [15, 5], [16, 15], [22, 4], [23, 8], [24, 11], [25, 23], [26, 24], [29, 27], [29, 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/fc962af895ccfb94c41ff9d7f04eccd599463af591671023af44230c6f9578f3_fc962af895ccfb94c41ff9d7f04eccd599463af591671023af44230c6f9578f3.jsonl.gz", "strip_func_name": "sub_401511", "query": "\n\n\n__int64 __fastcall sub_401511(unsigned __int16 a1, __int64 a2)\n{\nunsigned __int16 v3; // [rsp+18h] [rbp-8h] BYREF\nunsigned __int16 v4; // [rsp+1Ah] [rbp-6h] BYREF\n\nif ( !(unsigned int)sub_4012B1(a1, &v4, &v3) )\nreturn sub_401492(&v4, &v3, a2);\nprintf(\"unable to find token %04x\\n\", a1);\nreturn 1LL;\n}\n\n\n\nQ:[a1,a2,v3,v4,sub_401511,sub_4012B1,sub_401492,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'token', 'a2': 'buffer', 'v3': 'value', 'v4': 'location', 'sub_401511': 'query_token', 'sub_4012B1': 'find_token', 'sub_401492': 'token_is_active'}"} |
|
s2n_connection_free_managed_recv_io | 7421faa8c444aeca9266add08f45c75a4f43aebd993f880cd35dd964f63fdfb2 | aws | s2n-tls | NA | static int s2n_connection_free_managed_recv_io(struct s2n_connection *conn)
{
POSIX_ENSURE_REF(conn);
if (conn->managed_recv_io) {
POSIX_GUARD(s2n_free_object((uint8_t **) &conn->recv_io_context, sizeof(struct s2n_socket_read_io_context)));
conn->managed_recv_io = false;
conn->recv = NULL;
}
return S2N_SUCCESS;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_429F34", "function_addr": 4366132, "binary_name": "7421faa8c444aeca9266add08f45c75a4f43aebd993f880cd35dd964f63fdfb2.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, fs:28h"], [5, "mov [rbp+var_8], rax"], [6, "xor eax, eax"], [7, "cmp [rbp+var_18], 0"], [8, "jnz short loc_429F92"], [9, "mov rax, fs:0"], [10, "lea rax, [rax-18h]"], [11, "lea rdx, aErrorEncounter_415"], [12, "mov [rax], rdx"], [13, "mov rax, fs:0"], [14, "lea rax, [rax-20h]"], [15, "mov dword ptr [rax], 18000009h"], [16, "call sub_46D9B7"], [17, "mov eax, 0FFFFFFFFh"], [18, "jmp short loc_429FE0"], [19, "mov rax, [rbp+var_18]"], [20, "movzx eax, byte ptr [rax+1]"], [21, "and eax, 4"], [22, "test al, al"], [23, "jz short loc_429FDB"], [24, "mov rax, [rbp+var_18]"], [25, "add rax, 48h "], [26, "mov esi, 0Ch"], [27, "mov rdi, rax"], [28, "call sub_41A2F6"], [29, "test eax, eax"], [30, "jns short loc_429FC1"], [31, "mov eax, 0FFFFFFFFh"], [32, "jmp short loc_429FE0"], [33, "mov rax, [rbp+var_18]"], [34, "movzx edx, byte ptr [rax+1]"], [35, "and edx, 0FFFFFFFBh"], [36, "mov [rax+1], dl"], [37, "mov rax, [rbp+var_18]"], [38, "mov qword ptr [rax+38h], 0"], [39, "mov eax, 0"], [40, "mov rcx, [rbp+var_8]"], [41, "sub rcx, fs:28h"], [42, "jz short locret_429FF4"], [43, "call ___stack_chk_fail"], [44, "leave"], [45, "retn"]], "data_dep": [[5, 4], [7, 3], [8, 7], [10, 9], [12, 10], [12, 11], [14, 13], [14, 12], [15, 14], [19, 3], [20, 19], [21, 20], [22, 21], [23, 22], [24, 3], [25, 24], [27, 25], [29, 28], [30, 29], [33, 3], [34, 33], [35, 34], [36, 33], [36, 35], [37, 3], [38, 37], [40, 5], [41, 40], [42, 41], [45, 31], [45, 39], [45, 17]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/7421faa8c444aeca9266add08f45c75a4f43aebd993f880cd35dd964f63fdfb2_7421faa8c444aeca9266add08f45c75a4f43aebd993f880cd35dd964f63fdfb2.jsonl.gz", "strip_func_name": "sub_429F34", "query": "\n\n\n__int64 __fastcall sub_429F34(__int64 a1, __int64 a2)\n{\nif ( !a1 )\n{\n*(_QWORD *)(__readfsqword(0) - 24) = \"Error encountered in s2n_connection.c:165\";\n*(_DWORD *)(__readfsqword(0) - 32) = 402653193;\nsub_46D9B7(0LL, a2);\nreturn 0xFFFFFFFFLL;\n}\nif ( (*(_BYTE *)(a1 + 1) & 4) != 0 )\n{\nif ( (int)sub_41A2F6((__int64 *)(a1 + 72), 12LL) < 0 )\nreturn 0xFFFFFFFFLL;\n*(_BYTE *)(a1 + 1) &= 0xFBu;\n*(_QWORD *)(a1 + 56) = 0LL;\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,sub_429F34,sub_46D9B7,sub_41A2F6,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'conn', 'sub_429F34': 's2n_connection_free_managed_recv_io', 'sub_46D9B7': 's2n_calculate_stacktrace', 'sub_41A2F6': 's2n_free_object'}"} |
|
u8x8_ks0108_out | f223df43e71fd244b2d3fc8309aa4a9e557a38d76ce9c8ff7a1df98b1c82c5e4 | olikraus | u8g2 | NA | static void u8x8_ks0108_out(u8x8_t *u8x8, struct u8x8_ks0108_vars *v, void *arg_ptr)
{
uint8_t cnt;
u8x8_cad_SendCmd(u8x8, 0x040 | ((v->x << 3) & 63) );
u8x8_cad_SendCmd(u8x8, 0x0b8 | (((u8x8_tile_t *)arg_ptr)->y_pos));
while( v->arg_int > 0 )
{
/* calculate tiles to next boundary (end or chip limit) */
cnt = v->x;
cnt += 8;
cnt &= 0x0f8;
cnt -= v->x;
if ( cnt > v->c )
cnt = v->c;
/* of cours we still could use cnt=1 here... */
/* but setting cnt to 1 is not very efficient */
//cnt = 1;
v->x +=cnt;
v->c-=cnt;
cnt<<=3;
u8x8_cad_SendData(u8x8, cnt, v->ptr); /* note: SendData can not handle more than 255 bytes */
v->ptr += cnt;
if ( v->c == 0 )
{
v->ptr = ((u8x8_tile_t *)arg_ptr)->tile_ptr;
v->c = ((u8x8_tile_t *)arg_ptr)->cnt;
v->arg_int--;
}
if ( ((v->x) & 7) == 0 )
break;
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_408A0E", "function_addr": 4229646, "binary_name": "f223df43e71fd244b2d3fc8309aa4a9e557a38d76ce9c8ff7a1df98b1c82c5e4.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "mov rax, [rbp+var_20]"], [7, "movzx eax, byte ptr [rax+8]"], [8, "movzx eax, al"], [9, "shl eax, 3"], [10, "and eax, 3Fh"], [11, "or eax, 40h"], [12, "movzx edx, al"], [13, "mov rax, [rbp+var_18]"], [14, "mov esi, edx"], [15, "mov rdi, rax"], [16, "call sub_424ED1"], [17, "mov rax, [rbp+var_28]"], [18, "movzx eax, byte ptr [rax+0Ah]"], [19, "or eax, 0FFFFFFB8h"], [20, "movzx edx, al"], [21, "mov rax, [rbp+var_18]"], [22, "mov esi, edx"], [23, "mov rdi, rax"], [24, "call sub_424ED1"], [25, "jmp loc_408B46"], [26, "mov rax, [rbp+var_20]"], [27, "movzx eax, byte ptr [rax+8]"], [28, "mov [rbp+var_1], al"], [29, "add [rbp+var_1], 8"], [30, "and [rbp+var_1], 0F8h"], [31, "mov rax, [rbp+var_20]"], [32, "movzx eax, byte ptr [rax+8]"], [33, "sub [rbp+var_1], al"], [34, "mov rax, [rbp+var_20]"], [35, "movzx eax, byte ptr [rax+9]"], [36, "cmp [rbp+var_1], al"], [37, "jbe short loc_408A9E"], [38, "mov rax, [rbp+var_20]"], [39, "movzx eax, byte ptr [rax+9]"], [40, "mov [rbp+var_1], al"], [41, "mov rax, [rbp+var_20]"], [42, "movzx edx, byte ptr [rax+8]"], [43, "movzx eax, [rbp+var_1]"], [44, "add edx, eax"], [45, "mov rax, [rbp+var_20]"], [46, "mov [rax+8], dl"], [47, "mov rax, [rbp+var_20]"], [48, "movzx eax, byte ptr [rax+9]"], [49, "sub al, [rbp+var_1]"], [50, "mov edx, eax"], [51, "mov rax, [rbp+var_20]"], [52, "mov [rax+9], dl"], [53, "shl [rbp+var_1], 3"], [54, "mov rax, [rbp+var_20]"], [55, "mov rdx, [rax]"], [56, "movzx ecx, [rbp+var_1]"], [57, "mov rax, [rbp+var_18]"], [58, "mov esi, ecx"], [59, "mov rdi, rax"], [60, "call sub_424F88"], [61, "mov rax, [rbp+var_20]"], [62, "mov rdx, [rax]"], [63, "movzx eax, [rbp+var_1]"], [64, "add rdx, rax"], [65, "mov rax, [rbp+var_20]"], [66, "mov [rax], rdx"], [67, "mov rax, [rbp+var_20]"], [68, "movzx eax, byte ptr [rax+9]"], [69, "test al, al"], [70, "jnz short loc_408B34"], [71, "mov rax, [rbp+var_28]"], [72, "mov rdx, [rax]"], [73, "mov rax, [rbp+var_20]"], [74, "mov [rax], rdx"], [75, "mov rax, [rbp+var_28]"], [76, "movzx edx, byte ptr [rax+8]"], [77, "mov rax, [rbp+var_20]"], [78, "mov [rax+9], dl"], [79, "mov rax, [rbp+var_20]"], [80, "movzx eax, byte ptr [rax+0Ah]"], [81, "lea edx, [rax-1]"], [82, "mov rax, [rbp+var_20]"], [83, "mov [rax+0Ah], dl"], [84, "mov rax, [rbp+var_20]"], [85, "movzx eax, byte ptr [rax+8]"], [86, "movzx eax, al"], [87, "and eax, 7"], [88, "test eax, eax"], [89, "jz short loc_408B58"], [90, "mov rax, [rbp+var_20]"], [91, "movzx eax, byte ptr [rax+0Ah]"], [92, "test al, al"], [93, "jnz loc_408A68"], [94, "jmp short loc_408B59"], [95, "nop"], [96, "nop"], [97, "leave"], [98, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 7], [9, 8], [10, 9], [11, 10], [12, 11], [13, 3], [14, 12], [15, 13], [17, 5], [18, 17], [19, 18], [20, 19], [21, 3], [22, 20], [23, 21], [26, 4], [27, 52], [27, 26], [27, 74], [27, 83], [27, 46], [27, 78], [27, 66], [28, 27], [29, 28], [30, 29], [31, 4], [32, 46], [32, 78], [32, 66], [32, 52], [32, 31], [32, 74], [32, 83], [33, 30], [33, 32], [34, 4], [35, 74], [35, 83], [35, 78], [35, 46], [35, 66], [35, 34], [35, 52], [36, 33], [36, 35], [37, 36], [38, 4], [39, 74], [39, 83], [39, 46], [39, 78], [39, 66], [39, 52], [39, 38], [40, 39], [41, 4], [42, 66], [42, 41], [42, 52], [42, 74], [42, 83], [42, 78], [42, 46], [43, 40], [43, 33], [44, 42], [44, 43], [45, 4], [46, 45], [46, 44], [47, 4], [48, 47], [48, 46], [48, 78], [48, 52], [49, 48], [49, 40], [49, 33], [50, 49], [51, 4], [52, 51], [52, 50], [53, 40], [53, 33], [54, 4], [55, 66], [55, 52], [55, 54], [55, 74], [56, 53], [57, 3], [58, 56], [59, 57], [61, 4], [62, 74], [62, 66], [62, 52], [62, 61], [63, 53], [64, 62], [64, 63], [65, 4], [66, 64], [66, 65], [67, 4], [68, 66], [68, 52], [68, 67], [69, 68], [70, 69], [71, 5], [72, 66], [72, 52], [72, 74], [72, 83], [72, 46], [72, 78], [72, 71], [73, 4], [74, 73], [74, 72], [75, 5], [76, 74], [76, 46], [76, 75], [77, 4], [78, 77], [78, 76], [79, 4], [80, 83], [80, 78], [80, 79], [81, 76], [81, 78], [81, 80], [82, 4], [83, 82], [83, 81], [84, 4], [85, 66], [85, 84], [85, 52], [85, 74], [85, 83], [85, 46], [85, 78], [86, 85], [87, 86], [88, 87], [89, 88], [90, 4], [91, 66], [91, 52], [91, 74], [91, 90], [91, 83], [91, 46], [91, 78], [92, 91], [93, 92], [98, 92], [98, 88]]}
| {"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/f223df43e71fd244b2d3fc8309aa4a9e557a38d76ce9c8ff7a1df98b1c82c5e4_f223df43e71fd244b2d3fc8309aa4a9e557a38d76ce9c8ff7a1df98b1c82c5e4.jsonl.gz", "strip_func_name": "sub_408A0E", "query": "\n\n\n__int64 __fastcall sub_408A0E(__int64 a1, __int64 a2, __int64 a3)\n{\n__int64 result; // rax\nunsigned __int8 v5; // [rsp+2Fh] [rbp-1h]\nunsigned __int8 v6; // [rsp+2Fh] [rbp-1h]\n\nsub_424ED1(a1, (8 * *(_BYTE *)(a2 + 8)) & 0x3F | 0x40u);\nsub_424ED1(a1, *(_BYTE *)(a3 + 10) | 0xB8u);\ndo\n{\nresult = *(unsigned __int8 *)(a2 + 10);\nif ( !(_BYTE)result )\nbreak;\nv5 = ((*(_BYTE *)(a2 + 8) + 8) & 0xF8) - *(_BYTE *)(a2 + 8);\nif ( v5 > *(_BYTE *)(a2 + 9) )\nv5 = *(_BYTE *)(a2 + 9);\n*(_BYTE *)(a2 + 8) += v5;\n*(_BYTE *)(a2 + 9) -= v5;\nv6 = 8 * v5;\nsub_424F88(a1, v6, *(_QWORD *)a2);\n*(_QWORD *)a2 += v6;\nif ( !*(_BYTE *)(a2 + 9) )\n{\n*(_QWORD *)a2 = *(_QWORD *)a3;\n*(_BYTE *)(a2 + 9) = *(_BYTE *)(a3 + 8);\n--*(_BYTE *)(a2 + 10);\n}\nresult = *(_BYTE *)(a2 + 8) & 7;\n}\nwhile ( (*(_BYTE *)(a2 + 8) & 7) != 0 );\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v5,sub_408A0E,sub_424ED1,sub_424F88,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'arg_ptr', 'a1': 'u8x8', 'a2': 'v', 'v5': 'cnt', 'sub_408A0E': 'u8x8_ks0108_out', 'sub_424ED1': 'u8x8_cad_SendCmd', 'sub_424F88': 'u8x8_cad_SendData'}"} |
|
mesh_delete_subscriptions | 0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb | bluekitchen | btstack | NA | void mesh_delete_subscriptions(void){
printf("Delete Model Subscription Lists\n");
// iterate over elements and models
mesh_element_iterator_t element_it;
mesh_element_iterator_init(&element_it);
while (mesh_element_iterator_has_next(&element_it)){
mesh_element_t * element = mesh_element_iterator_next(&element_it);
mesh_model_iterator_t model_it;
mesh_model_iterator_init(&model_it, element);
while (mesh_model_iterator_has_next(&model_it)){
mesh_model_t * model = mesh_model_iterator_next(&model_it);
mesh_model_delete_subscriptions(model);
}
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_437213", "function_addr": 4420115, "binary_name": "0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov edi, offset aDeleteModelSub"], [4, "call _puts"], [5, "lea rax, [rbp+var_30]"], [6, "mov rdi, rax"], [7, "call sub_44D0F4"], [8, "jmp short loc_437284"], [9, "lea rax, [rbp+var_30]"], [10, "mov rdi, rax"], [11, "call sub_44D131"], [12, "mov [rbp+var_8], rax"], [13, "mov rdx, [rbp+var_8]"], [14, "lea rax, [rbp+var_50]"], [15, "mov rsi, rdx"], [16, "mov rdi, rax"], [17, "call sub_44D31A"], [18, "jmp short loc_437274"], [19, "lea rax, [rbp+var_50]"], [20, "mov rdi, rax"], [21, "call sub_44D361"], [22, "mov [rbp+var_10], rax"], [23, "mov rax, [rbp+var_10]"], [24, "mov rdi, rax"], [25, "call sub_43714E"], [26, "lea rax, [rbp+var_50]"], [27, "mov rdi, rax"], [28, "call sub_44D344"], [29, "test eax, eax"], [30, "jnz short loc_437258"], [31, "lea rax, [rbp+var_30]"], [32, "mov rdi, rax"], [33, "call sub_44D114"], [34, "test eax, eax"], [35, "jnz short loc_437233"], [36, "nop"], [37, "nop"], [38, "leave"], [39, "retn"]], "data_dep": [[5, 4], [6, 5], [9, 34], [10, 9], [12, 11], [13, 12], [14, 11], [15, 13], [16, 14], [19, 29], [20, 19], [22, 21], [23, 22], [24, 23], [26, 17], [26, 25], [27, 26], [29, 28], [30, 29], [31, 29], [31, 7], [32, 31], [34, 33], [35, 34], [39, 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/0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb_0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb.jsonl.gz", "strip_func_name": "sub_437213", "query": "\n\n\n__int64 sub_437213()\n{\n__int64 result; // rax\nchar v1[32]; // [rsp+0h] [rbp-50h] BYREF\nchar v2[32]; // [rsp+20h] [rbp-30h] BYREF\n__int64 v3; // [rsp+40h] [rbp-10h]\n__int64 v4; // [rsp+48h] [rbp-8h]\n\nputs(\"Delete Model Subscription Lists\");\nsub_44D0F4(v2);\nwhile ( 1 )\n{\nresult = sub_44D114(v2);\nif ( !(_DWORD)result )\nbreak;\nv4 = sub_44D131(v2);\nsub_44D31A(v1, v4);\nwhile ( (unsigned int)sub_44D344(v1) )\n{\nv3 = sub_44D361(v1);\nsub_43714E(v3);\n}\n}\nreturn result;\n}\n\n\n\nQ:[v1,v2,v3,v4,sub_437213,sub_44D0F4,sub_44D114,sub_44D131,sub_44D31A,sub_44D344,sub_44D361,sub_43714E,]\nAssistant: ", "hints": "[]", "response": "{'v1': 'model_it', 'v2': 'element_it', 'v3': 'model', 'v4': 'element', 'sub_437213': 'mesh_delete_subscriptions', 'sub_44D0F4': 'mesh_element_iterator_init', 'sub_44D114': 'mesh_element_iterator_has_next', 'sub_44D131': 'mesh_element_iterator_next', 'sub_44D31A': 'mesh_model_iterator_init', 'sub_44D344': 'mesh_model_iterator_has_next', 'sub_44D361': 'mesh_model_iterator_next', 'sub_43714E': 'mesh_model_delete_subscriptions'}"} |
|
unwind_callback | 556e0263abbe1e4daef5ea125859adebb55575ea4fa8d33e6255954205d7ba5b | pymumu | smartdns | NA | static _Unwind_Reason_Code unwind_callback(struct _Unwind_Context *context, void *arg)
{
struct backtrace_state *state = (struct backtrace_state *)(arg);
uintptr_t pc = _Unwind_GetIP(context);
if (pc) {
if (state->current == state->end) {
return _URC_END_OF_STACK;
}
*state->current++ = (void *)(pc);
}
return _URC_NO_REASON;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4368FB", "function_addr": 4417787, "binary_name": "556e0263abbe1e4daef5ea125859adebb55575ea4fa8d33e6255954205d7ba5b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov rax, [rbp+var_20]"], [6, "mov [rbp+var_8], rax"], [7, "mov rax, [rbp+var_18]"], [8, "mov rdi, rax"], [9, "call __Unwind_GetIP"], [10, "mov [rbp+var_10], rax"], [11, "cmp [rbp+var_10], 0"], [12, "jz short loc_43695E"], [13, "mov rax, [rbp+var_8]"], [14, "mov rdx, [rax]"], [15, "mov rax, [rbp+var_8]"], [16, "mov rax, [rax+8]"], [17, "cmp rdx, rax"], [18, "jnz short loc_436945"], [19, "mov eax, 5"], [20, "jmp short locret_436963"], [21, "mov rax, [rbp+var_8]"], [22, "mov rax, [rax]"], [23, "lea rcx, [rax+8]"], [24, "mov rdx, [rbp+var_8]"], [25, "mov [rdx], rcx"], [26, "mov rdx, [rbp+var_10]"], [27, "mov [rax], rdx"], [28, "mov eax, 0"], [29, "leave"], [30, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 3], [8, 7], [10, 9], [11, 10], [12, 11], [13, 6], [14, 13], [15, 6], [16, 15], [17, 14], [17, 16], [18, 17], [21, 6], [22, 21], [23, 22], [24, 6], [25, 23], [25, 24], [26, 10], [27, 22], [27, 26], [30, 19], [30, 28]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/556e0263abbe1e4daef5ea125859adebb55575ea4fa8d33e6255954205d7ba5b_556e0263abbe1e4daef5ea125859adebb55575ea4fa8d33e6255954205d7ba5b.jsonl.gz", "strip_func_name": "sub_4368FB", "query": "\n\n\n__int64 __fastcall sub_4368FB(struct _Unwind_Context *a1, void *a2)\n{\n__int64 v2; // rax\n_QWORD *v4; // rax\n__int64 v5; // [rsp+10h] [rbp-10h]\n\nLODWORD(v2) = _Unwind_GetIP(a1);\nv5 = v2;\nif ( v2 )\n{\nif ( *(_QWORD *)a2 == *((_QWORD *)a2 + 1) )\nreturn 5LL;\nv4 = *(_QWORD **)a2;\n*(_QWORD *)a2 += 8LL;\n*v4 = v5;\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v5,sub_4368FB,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'context', 'a2': 'arg', 'v5': 'pc', 'sub_4368FB': 'unwind_callback'}"} |
|
randombytes | a7d07da17c7774d96dfd5ba41e74481ec66386a675aa3f7c497ef64cfac4fdc4 | microsoft | PQCrypto-LWEKE | NA | int randombytes(unsigned char* random_array, unsigned long long nbytes)
{ // Generation of "nbytes" of random values
#if defined(WINDOWS)
if (!BCRYPT_SUCCESS(BCryptGenRandom(NULL, random_array, (unsigned long)nbytes, BCRYPT_USE_SYSTEM_PREFERRED_RNG))) {
return failed;
}
#elif defined(NIX)
int r, n = (int)nbytes, count = 0;
if (lock == -1) {
do {
lock = open("/dev/urandom", O_RDONLY);
if (lock == -1) {
sleep(1);
}
} while (lock == -1);
}
while (n > 0) {
do {
r = read(lock, random_array+count, n);
if (r == -1) {
sleep(1);
}
} while (r == -1);
count += r;
n -= r;
}
#endif
return passed;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4045E0", "function_addr": 4212192, "binary_name": "a7d07da17c7774d96dfd5ba41e74481ec66386a675aa3f7c497ef64cfac4fdc4.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov rax, [rbp+var_20]"], [6, "mov [rbp+var_4], eax"], [7, "mov [rbp+var_8], 0"], [8, "mov eax, cs:fd"], [9, "cmp eax, 0FFFFFFFFh"], [10, "jnz loc_404691"], [11, "mov esi, 0"], [12, "mov edi, offset file"], [13, "mov eax, 0"], [14, "call _open"], [15, "mov cs:fd, eax"], [16, "mov eax, cs:fd"], [17, "cmp eax, 0FFFFFFFFh"], [18, "jnz short loc_40463C"], [19, "mov edi, 1"], [20, "call _sleep"], [21, "mov eax, cs:fd"], [22, "cmp eax, 0FFFFFFFFh"], [23, "jz short loc_40460D"], [24, "jmp short loc_404691"], [25, "mov eax, [rbp+var_4]"], [26, "movsxd rdx, eax"], [27, "mov eax, [rbp+var_8]"], [28, "movsxd rcx, eax"], [29, "mov rax, [rbp+var_18]"], [30, "add rcx, rax"], [31, "mov eax, cs:fd"], [32, "mov rsi, rcx"], [33, "mov edi, eax"], [34, "call _read"], [35, "mov [rbp+var_C], eax"], [36, "cmp [rbp+var_C], 0FFFFFFFFh"], [37, "jnz short loc_40467F"], [38, "mov edi, 1"], [39, "call _sleep"], [40, "cmp [rbp+var_C], 0FFFFFFFFh"], [41, "jz short loc_404649"], [42, "mov eax, [rbp+var_C]"], [43, "add [rbp+var_8], eax"], [44, "mov eax, [rbp+var_C]"], [45, "sub [rbp+var_4], eax"], [46, "cmp [rbp+var_4], 0"], [47, "jg short loc_404649"], [48, "mov eax, 0"], [49, "leave"], [50, "retn"]], "data_dep": [[5, 4], [6, 5], [9, 8], [10, 9], [15, 14], [16, 15], [17, 16], [18, 17], [21, 15], [22, 21], [23, 22], [25, 6], [25, 45], [26, 25], [27, 7], [27, 43], [28, 27], [29, 3], [30, 29], [30, 28], [31, 15], [32, 30], [33, 31], [35, 34], [36, 35], [37, 36], [40, 35], [41, 40], [42, 35], [43, 43], [43, 42], [43, 7], [44, 35], [45, 6], [45, 45], [45, 44], [46, 45], [46, 6], [47, 46], [50, 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/a7d07da17c7774d96dfd5ba41e74481ec66386a675aa3f7c497ef64cfac4fdc4_a7d07da17c7774d96dfd5ba41e74481ec66386a675aa3f7c497ef64cfac4fdc4.jsonl.gz", "strip_func_name": "sub_4045E0", "query": "\n\n\n__int64 __fastcall sub_4045E0(__int64 a1, int a2)\n{\nint v3; // [rsp+14h] [rbp-Ch]\nint v4; // [rsp+18h] [rbp-8h]\n\nv4 = 0;\nwhile ( fd == -1 )\n{\nfd = open(\"/dev/urandom\", 0);\nif ( fd == -1 )\nsleep(1u);\n}\nwhile ( a2 > 0 )\n{\ndo\n{\nv3 = read(fd, (void *)(a1 + v4), a2);\nif ( v3 == -1 )\nsleep(1u);\n}\nwhile ( v3 == -1 );\nv4 += v3;\na2 -= v3;\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v3,v4,sub_4045E0,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'random_array', 'a2': 'nbytes', 'v3': 'r', 'v4': 'count', 'sub_4045E0': 'randombytes'}"} |
|
get_pe_response | 584748ef46a1f6471ce40c28f15275292d3f9f51b54a89d47ac9afdee669a524 | sergev | pic32prog | NA | static unsigned get_pe_response(mpsse_adapter_t *a)
{
unsigned ctl, response;
// Select Control Register
/* Send command. */
mpsse_sendCommand(a, ETAP_CONTROL, 1); // Command, immediate
// Wait until CPU is ready
// Check if Processor Access bit (bit 18) is set
do {
ctl = mpsse_xferData(a, 32, (CONTROL_PRACC | CONTROL_PROBEN
| CONTROL_PROBTRAP | CONTROL_EJTAGBRK), 1, 1); // Send data, readflag, immediate don't care
} while (! (ctl & CONTROL_PRACC));
// Select Data Register
// Send the instruction
/* Send command. */
mpsse_sendCommand(a, ETAP_DATA, 1);
/* Get data. */
response = mpsse_xferData(a, 32, 0, 1, 1); // Send 32 zeroes, read response, immediate don't care
// Tell CPU to execute NOP instruction
/* Send command. */
mpsse_sendCommand(a, ETAP_CONTROL, 1);
/* Send data. */
mpsse_xferData(a, 32, (CONTROL_PROBEN | CONTROL_PROBTRAP), 0, 1);
if (debug_level > 1)
fprintf(stderr, "%s: get PE response %08x\n", a->name, response);
return response;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41DA52", "function_addr": 4315730, "binary_name": "584748ef46a1f6471ce40c28f15275292d3f9f51b54a89d47ac9afdee669a524.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov rax, [rbp+var_18]"], [5, "mov edx, 1"], [6, "mov esi, 0Ah"], [7, "mov rdi, rax"], [8, "call sub_41CD6A"], [9, "mov rax, [rbp+var_18]"], [10, "mov r8d, 1"], [11, "mov ecx, 1"], [12, "mov edx, 4D000h"], [13, "mov esi, 20h "], [14, "mov rdi, rax"], [15, "call sub_41CE8F"], [16, "mov [rbp+var_4], eax"], [17, "mov eax, [rbp+var_4]"], [18, "and eax, 40000h"], [19, "test eax, eax"], [20, "jz short loc_41DA74"], [21, "mov rax, [rbp+var_18]"], [22, "mov edx, 1"], [23, "mov esi, 9"], [24, "mov rdi, rax"], [25, "call sub_41CD6A"], [26, "mov rax, [rbp+var_18]"], [27, "mov r8d, 1"], [28, "mov ecx, 1"], [29, "mov edx, 0"], [30, "mov esi, 20h "], [31, "mov rdi, rax"], [32, "call sub_41CE8F"], [33, "mov [rbp+var_8], eax"], [34, "mov rax, [rbp+var_18]"], [35, "mov edx, 1"], [36, "mov esi, 0Ah"], [37, "mov rdi, rax"], [38, "call sub_41CD6A"], [39, "mov rax, [rbp+var_18]"], [40, "mov r8d, 1"], [41, "mov ecx, 0"], [42, "mov edx, 0C000h"], [43, "mov esi, 20h "], [44, "mov rdi, rax"], [45, "call sub_41CE8F"], [46, "mov eax, cs:dword_6C6DF4"], [47, "cmp eax, 1"], [48, "jle short loc_41DB47"], [49, "mov rax, [rbp+var_18]"], [50, "mov rdx, [rax+88h]"], [51, "mov rax, cs:stderr"], [52, "mov ecx, [rbp+var_8]"], [53, "mov esi, offset aSGetPeResponse"], [54, "mov rdi, rax"], [55, "mov eax, 0"], [56, "call _fprintf"], [57, "mov eax, [rbp+var_8]"], [58, "leave"], [59, "retn"]], "data_dep": [[4, 3], [7, 4], [9, 3], [14, 9], [16, 15], [17, 16], [18, 17], [19, 18], [20, 19], [21, 3], [24, 21], [26, 3], [31, 26], [33, 32], [34, 3], [37, 34], [39, 3], [44, 39], [47, 46], [48, 47], [49, 3], [50, 49], [52, 33], [54, 51], [57, 33], [59, 57]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/584748ef46a1f6471ce40c28f15275292d3f9f51b54a89d47ac9afdee669a524_584748ef46a1f6471ce40c28f15275292d3f9f51b54a89d47ac9afdee669a524.jsonl.gz", "strip_func_name": "sub_41DA52", "query": "\n\n\n__int64 __fastcall sub_41DA52(__int64 a1)\n{\nunsigned int v2; // [rsp+18h] [rbp-8h]\n\nsub_41CD6A(a1, 0xAu, 1);\nwhile ( (sub_41CE8F(a1, 0x20u, 0x4D000u, 1, 1) & 0x40000) == 0 )\n;\nsub_41CD6A(a1, 9u, 1);\nv2 = sub_41CE8F(a1, 0x20u, 0, 1, 1);\nsub_41CD6A(a1, 0xAu, 1);\nsub_41CE8F(a1, 0x20u, 0xC000u, 0, 1);\nif ( dword_6C6DF4 > 1 )\nfprintf(stderr, \"%s: get PE response %08x\\n\", *(const char **)(a1 + 136), v2);\nreturn v2;\n}\n\n\n\nQ:[a1,v2,sub_41DA52,sub_41CD6A,sub_41CE8F,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'a', 'v2': 'response', 'sub_41DA52': 'get_pe_response_0', 'sub_41CD6A': 'mpsse_sendCommand', 'sub_41CE8F': 'mpsse_xferData'}"} |
|
mbedtls_ctr_drbg_set_entropy_len | 6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7 | mattsta | trade-balancer | NA | void mbedtls_ctr_drbg_set_entropy_len( mbedtls_ctr_drbg_context *ctx,
size_t len )
{
ctx->entropy_len = len;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_440A16", "function_addr": 4459030, "binary_name": "6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov [rbp+var_10], rsi"], [4, "mov rax, [rbp+var_8]"], [5, "mov rdx, [rbp+var_10]"], [6, "mov [rax+18h], rdx"], [7, "nop"], [8, "pop rbp"], [9, "retn"]], "data_dep": [[4, 2], [5, 3], [6, 5], [6, 4], [8, 0], [9, 4]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7_6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7.jsonl.gz", "strip_func_name": "sub_440A16", "query": "\n\n\n__int64 __fastcall sub_440A16(__int64 a1, __int64 a2)\n{\n__int64 result; // rax\n\nresult = a1;\n*(_QWORD *)(a1 + 24) = a2;\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_440A16,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ctx', 'a2': 'len', 'sub_440A16': 'mbedtls_ctr_drbg_set_entropy_len'}"} |
|
OptLoad3 | cc514aea46329b2bbe7d1ede9a05315966bd71bcf8cc0ff6e5ffa267e88c9796 | reidrac | dan64 | NA | static unsigned OptLoad3 (CodeSeg* S)
/* Remove repeated loads from one and the same memory location */
{
unsigned Changes = 0;
CodeEntry* Load = 0;
/* Walk over the entries */
unsigned I = 0;
while (I < CS_GetEntryCount (S)) {
/* Get next entry */
CodeEntry* E = CS_GetEntry (S, I);
/* Forget a preceeding load if we have a label */
if (Load && CE_HasLabel (E)) {
Load = 0;
}
/* Check if this insn is a load */
if (E->Info & OF_LOAD) {
CodeEntry* N;
/* If we had a preceeding load that is identical, remove this one.
** If it is not identical, or we didn't have one, remember it.
*/
if (Load != 0 &&
E->OPC == Load->OPC &&
E->AM == Load->AM &&
((E->Arg == 0 && Load->Arg == 0) ||
strcmp (E->Arg, Load->Arg) == 0) &&
(N = CS_GetNextEntry (S, I)) != 0 &&
(N->Info & OF_CBRA) == 0) {
/* Now remove the call to the subroutine */
CS_DelEntry (S, I);
/* Remember, we had changes */
++Changes;
/* Next insn */
continue;
} else {
Load = E;
}
} else if ((E->Info & OF_CMP) == 0 && (E->Info & OF_CBRA) == 0) {
/* Forget the first load on occurance of any insn we don't like */
Load = 0;
}
/* Next entry */
++I;
}
/* Return the number of changes made */
return Changes;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40B3A4", "function_addr": 4240292, "binary_name": "cc514aea46329b2bbe7d1ede9a05315966bd71bcf8cc0ff6e5ffa267e88c9796.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_4], 0"], [5, "mov [rbp+var_10], 0"], [6, "mov [rbp+var_14], 0"], [7, "jmp loc_40B504"], [8, "mov edx, [rbp+var_14]"], [9, "mov rax, [rbp+var_38]"], [10, "mov esi, edx"], [11, "mov rdi, rax"], [12, "call sub_40AE6E"], [13, "mov [rbp+var_20], rax"], [14, "cmp [rbp+var_10], 0"], [15, "jz short loc_40B3FF"], [16, "mov rax, [rbp+var_20]"], [17, "mov rdi, rax"], [18, "call sub_40ADE6"], [19, "test eax, eax"], [20, "jz short loc_40B3FF"], [21, "mov [rbp+var_10], 0"], [22, "mov rax, [rbp+var_20]"], [23, "movzx eax, word ptr [rax+18h]"], [24, "movzx eax, ax"], [25, "and eax, 40h"], [26, "test eax, eax"], [27, "jz loc_40B4D2"], [28, "cmp [rbp+var_10], 0"], [29, "jz loc_40B4C8"], [30, "mov rax, [rbp+var_20]"], [31, "movzx edx, byte ptr [rax]"], [32, "mov rax, [rbp+var_10]"], [33, "movzx eax, byte ptr [rax]"], [34, "cmp dl, al"], [35, "jnz loc_40B4C8"], [36, "mov rax, [rbp+var_20]"], [37, "movzx edx, byte ptr [rax+1]"], [38, "mov rax, [rbp+var_10]"], [39, "movzx eax, byte ptr [rax+1]"], [40, "cmp dl, al"], [41, "jnz short loc_40B4C8"], [42, "mov rax, [rbp+var_20]"], [43, "mov rax, [rax+8]"], [44, "test rax, rax"], [45, "jnz short loc_40B464"], [46, "mov rax, [rbp+var_10]"], [47, "mov rax, [rax+8]"], [48, "test rax, rax"], [49, "jz short loc_40B483"], [50, "mov rax, [rbp+var_10]"], [51, "mov rdx, [rax+8]"], [52, "mov rax, [rbp+var_20]"], [53, "mov rax, [rax+8]"], [54, "mov rsi, rdx"], [55, "mov rdi, rax"], [56, "call _strcmp"], [57, "test eax, eax"], [58, "jnz short loc_40B4C8"], [59, "mov edx, [rbp+var_14]"], [60, "mov rax, [rbp+var_38]"], [61, "mov esi, edx"], [62, "mov rdi, rax"], [63, "call sub_42DF00"], [64, "mov [rbp+var_28], rax"], [65, "cmp [rbp+var_28], 0"], [66, "jz short loc_40B4C8"], [67, "mov rax, [rbp+var_28]"], [68, "movzx eax, word ptr [rax+18h]"], [69, "movzx eax, ax"], [70, "and eax, 2"], [71, "test eax, eax"], [72, "jnz short loc_40B4C8"], [73, "mov edx, [rbp+var_14]"], [74, "mov rax, [rbp+var_38]"], [75, "mov esi, edx"], [76, "mov rdi, rax"], [77, "call sub_42DD4E"], [78, "add [rbp+var_4], 1"], [79, "jmp short loc_40B504"], [80, "mov rax, [rbp+var_20]"], [81, "mov [rbp+var_10], rax"], [82, "jmp short loc_40B500"], [83, "mov rax, [rbp+var_20]"], [84, "movzx eax, word ptr [rax+18h]"], [85, "movzx eax, ax"], [86, "and eax, 1000h"], [87, "test eax, eax"], [88, "jnz short loc_40B500"], [89, "mov rax, [rbp+var_20]"], [90, "movzx eax, word ptr [rax+18h]"], [91, "movzx eax, ax"], [92, "and eax, 2"], [93, "test eax, eax"], [94, "jnz short loc_40B500"], [95, "mov [rbp+var_10], 0"], [96, "add [rbp+var_14], 1"], [97, "mov rax, [rbp+var_38]"], [98, "mov rdi, rax"], [99, "call sub_40AE50"], [100, "cmp [rbp+var_14], eax"], [101, "jb loc_40B3CB"], [102, "mov eax, [rbp+var_4]"], [103, "leave"], [104, "retn"]], "data_dep": [[8, 96], [8, 6], [9, 3], [10, 8], [11, 9], [13, 12], [14, 95], [14, 81], [14, 21], [14, 5], [15, 14], [16, 13], [17, 16], [19, 18], [20, 19], [22, 13], [23, 22], [24, 23], [25, 24], [26, 25], [27, 26], [28, 21], [28, 5], [28, 95], [28, 81], [29, 28], [30, 13], [31, 30], [32, 21], [32, 5], [32, 95], [32, 81], [33, 32], [34, 31], [34, 33], [35, 34], [36, 13], [37, 36], [38, 95], [38, 81], [38, 21], [38, 5], [39, 38], [40, 37], [40, 39], [41, 40], [42, 13], [43, 42], [44, 43], [45, 44], [46, 95], [46, 81], [46, 21], [46, 5], [47, 46], [48, 47], [49, 48], [50, 95], [50, 81], [50, 21], [50, 5], [51, 50], [52, 13], [53, 52], [54, 51], [55, 53], [57, 56], [58, 57], [59, 96], [59, 6], [60, 3], [61, 59], [62, 60], [64, 63], [65, 64], [66, 65], [67, 64], [68, 67], [69, 68], [70, 69], [71, 70], [72, 71], [73, 96], [73, 6], [74, 3], [75, 73], [76, 74], [78, 4], [78, 78], [80, 13], [81, 80], [83, 13], [84, 83], [85, 84], [86, 85], [87, 86], [88, 87], [89, 13], [90, 89], [91, 90], [92, 91], [93, 92], [94, 93], [96, 96], [96, 6], [97, 3], [98, 97], [100, 96], [100, 6], [100, 99], [101, 100], [102, 4], [102, 78], [104, 102]]}
| {"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/cc514aea46329b2bbe7d1ede9a05315966bd71bcf8cc0ff6e5ffa267e88c9796_cc514aea46329b2bbe7d1ede9a05315966bd71bcf8cc0ff6e5ffa267e88c9796.jsonl.gz", "strip_func_name": "sub_40B3A4", "query": "\n\n\n__int64 __fastcall sub_40B3A4(__int64 a1)\n{\nunsigned int i; // eax\n__int64 v3; // [rsp+18h] [rbp-28h]\n__int64 v4; // [rsp+20h] [rbp-20h]\nunsigned int v5; // [rsp+2Ch] [rbp-14h]\n__int64 v6; // [rsp+30h] [rbp-10h]\nunsigned int v7; // [rsp+3Ch] [rbp-4h]\n\nv7 = 0;\nv6 = 0LL;\nv5 = 0;\nfor ( i = sub_40AE50(a1); v5 < i; i = sub_40AE50(a1) )\n{\nv4 = sub_40AE6E(a1, v5);\nif ( v6 && sub_40ADE6(v4) )\nv6 = 0LL;\nif ( (*(_WORD *)(v4 + 24) & 0x40) != 0 )\n{\nif ( v6\n&& *(_BYTE *)v4 == *(_BYTE *)v6\n&& *(_BYTE *)(v4 + 1) == *(_BYTE *)(v6 + 1)\n&& (!*(_QWORD *)(v4 + 8) && !*(_QWORD *)(v6 + 8) || !strcmp(*(const char **)(v4 + 8), *(const char **)(v6 + 8))) )\n{\nv3 = sub_42DF00(a1, v5);\nif ( v3 )\n{\nif ( (*(_WORD *)(v3 + 24) & 2) == 0 )\n{\nsub_42DD4E(a1, v5);\n++v7;\ncontinue;\n}\n}\n}\nv6 = v4;\n}\nelse if ( (*(_WORD *)(v4 + 24) & 0x1000) == 0 && (*(_WORD *)(v4 + 24) & 2) == 0 )\n{\nv6 = 0LL;\n}\n++v5;\n}\nreturn v7;\n}\n\n\n\nQ:[a1,v3,v4,v5,v6,v7,sub_40B3A4,sub_40AE50,sub_40AE6E,sub_40ADE6,sub_42DF00,sub_42DD4E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'S', 'v3': 'N', 'v4': 'E', 'v5': 'I', 'v6': 'Load', 'v7': 'Changes', 'sub_40B3A4': 'OptLoad3', 'sub_40AE50': 'CS_GetEntryCount_4', 'sub_40AE6E': 'CS_GetEntry_2', 'sub_40ADE6': 'CE_HasLabel_0', 'sub_42DF00': 'CS_GetNextEntry', 'sub_42DD4E': 'CS_DelEntry'}"} |
|
dsprintf | 188521825316f1dd4a5f7a68a55cfef8413d1ed8c86ec170a1b212557172a59c | atsb | Doom64EX-Plus | NA | int dsprintf(char* buf, const char* format, ...) {
va_list arg;
int x;
va_start(arg, format);
#ifdef HAVE_VSNPRINTF
x = vsnprintf(buf, dstrlen(buf), format, arg);
#else
x = vsprintf(buf, format, arg);
#endif
va_end(arg);
return x;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_45F28E", "function_addr": 4584078, "binary_name": "188521825316f1dd4a5f7a68a55cfef8413d1ed8c86ec170a1b212557172a59c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0E0h"], [3, "mov [rbp+s], rdi"], [4, "mov [rbp+format], rsi"], [5, "mov [rbp+var_A0], rdx"], [6, "mov [rbp+var_98], rcx"], [7, "mov [rbp+var_90], r8"], [8, "mov [rbp+var_88], r9"], [9, "test al, al"], [10, "jz short loc_45F2E7"], [11, "movaps [rbp+var_80], xmm0"], [12, "movaps [rbp+var_70], xmm1"], [13, "movaps [rbp+var_60], xmm2"], [14, "movaps [rbp+var_50], xmm3"], [15, "movaps [rbp+var_40], xmm4"], [16, "movaps [rbp+var_30], xmm5"], [17, "movaps [rbp+var_20], xmm6"], [18, "movaps [rbp+var_10], xmm7"], [19, "mov [rbp+arg], 10h"], [20, "mov [rbp+var_CC], 30h "], [21, "lea rax, [rbp+arg_0]"], [22, "mov [rbp+var_C8], rax"], [23, "lea rax, [rbp+var_B0]"], [24, "mov [rbp+var_C0], rax"], [25, "lea rdx, [rbp+arg]"], [26, "mov rcx, [rbp+format]"], [27, "mov rax, [rbp+s]"], [28, "mov rsi, rcx"], [29, "mov rdi, rax"], [30, "call _vsprintf"], [31, "mov [rbp+var_B4], eax"], [32, "mov eax, [rbp+var_B4]"], [33, "leave"], [34, "retn"]], "data_dep": [[10, 9], [21, 9], [22, 21], [23, 21], [24, 23], [25, 19], [26, 4], [27, 3], [28, 26], [29, 27], [31, 30], [32, 31], [34, 32]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/188521825316f1dd4a5f7a68a55cfef8413d1ed8c86ec170a1b212557172a59c_188521825316f1dd4a5f7a68a55cfef8413d1ed8c86ec170a1b212557172a59c.jsonl.gz", "strip_func_name": "sub_45F28E", "query": "\n\n\n__int64 sub_45F28E(char *a1, const char *a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, ...)\n{\ngcc_va_list arg; // [rsp+10h] [rbp-D0h] BYREF\n__int64 v8; // [rsp+40h] [rbp-A0h]\n__int64 v9; // [rsp+48h] [rbp-98h]\n__int64 v10; // [rsp+50h] [rbp-90h]\n__int64 v11; // [rsp+58h] [rbp-88h]\n\nva_start(arg, a6);\nv8 = a3;\nv9 = a4;\nv10 = a5;\nv11 = a6;\narg[0].gp_offset = 16;\nreturn (unsigned int)vsprintf(a1, a2, arg);\n}\n\n\n\nQ:[a1,a2,sub_45F28E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'buf', 'a2': 'format', 'sub_45F28E': 'dsprintf'}"} |
|
sm_pairing_packet_set_code | 1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca | micropython | micropython-unicorn | NA | static inline void sm_pairing_packet_set_code(sm_pairing_packet_t packet, uint8_t code){
packet[0] = code;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41EB2A", "function_addr": 4320042, "binary_name": "1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca.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, "movzx edx, [rbp+var_C]"], [7, "mov [rax], dl"], [8, "nop"], [9, "pop rbp"], [10, "retn"]], "data_dep": [[4, 3], [5, 2], [6, 4], [7, 6], [7, 5], [9, 0], [10, 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/1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca_1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca.jsonl.gz", "strip_func_name": "sub_41EB2A", "query": "\n\n\n_BYTE *__fastcall sub_41EB2A(_BYTE *a1, char a2)\n{\n_BYTE *result; // rax\n\nresult = a1;\n*a1 = a2;\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_41EB2A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'packet', 'a2': 'code', 'sub_41EB2A': 'sm_pairing_packet_set_code'}"} |
|
perf_sched__process_event | decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08 | khadas | linux | NA | static void perf_sched__process_event(struct perf_sched *sched,
struct sched_atom *atom)
{
int ret = 0;
switch (atom->type) {
case SCHED_EVENT_RUN:
burn_nsecs(sched, atom->duration);
break;
case SCHED_EVENT_SLEEP:
if (atom->wait_sem)
ret = sem_wait(atom->wait_sem);
BUG_ON(ret);
break;
case SCHED_EVENT_WAKEUP:
if (atom->wait_sem)
ret = sem_post(atom->wait_sem);
BUG_ON(ret);
break;
case SCHED_EVENT_MIGRATION:
break;
default:
BUG_ON(1);
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_424C7A", "function_addr": 4344954, "binary_name": "decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov rax, fs:28h"], [6, "mov [rbp+var_8], rax"], [7, "xor eax, eax"], [8, "mov [rbp+var_C], 0"], [9, "mov rax, [rbp+var_20]"], [10, "mov eax, [rax]"], [11, "cmp eax, 3"], [12, "jz loc_424D87"], [13, "cmp eax, 3"], [14, "ja loc_424D6E"], [15, "cmp eax, 2"], [16, "jz short loc_424D2F"], [17, "cmp eax, 2"], [18, "ja loc_424D6E"], [19, "test eax, eax"], [20, "jz short loc_424CD4"], [21, "cmp eax, 1"], [22, "jz short loc_424CF0"], [23, "jmp loc_424D6E"], [24, "mov rax, [rbp+var_20]"], [25, "mov rdx, [rax+10h]"], [26, "mov rax, [rbp+var_18]"], [27, "mov rsi, rdx"], [28, "mov rdi, rax"], [29, "call sub_4242D6"], [30, "jmp loc_424D8E"], [31, "mov rax, [rbp+var_20]"], [32, "mov rax, [rax+20h]"], [33, "test rax, rax"], [34, "jz short loc_424D10"], [35, "mov rax, [rbp+var_20]"], [36, "mov rax, [rax+20h]"], [37, "mov rdi, rax"], [38, "call _sem_wait"], [39, "mov [rbp+var_C], eax"], [40, "cmp [rbp+var_C], 0"], [41, "jz short loc_424D8A"], [42, "mov ecx, offset aPerfSchedProce"], [43, "mov edx, 18Fh"], [44, "mov esi, offset aBuiltinSchedC"], [45, "mov edi, offset aRet_0"], [46, "call ___assert_fail"], [47, "mov rax, [rbp+var_20]"], [48, "mov rax, [rax+20h]"], [49, "test rax, rax"], [50, "jz short loc_424D4F"], [51, "mov rax, [rbp+var_20]"], [52, "mov rax, [rax+20h]"], [53, "mov rdi, rax"], [54, "call _sem_post"], [55, "mov [rbp+var_C], eax"], [56, "cmp [rbp+var_C], 0"], [57, "jz short loc_424D8D"], [58, "mov ecx, offset aPerfSchedProce"], [59, "mov edx, 194h"], [60, "mov esi, offset aBuiltinSchedC"], [61, "mov edi, offset aRet_0"], [62, "call ___assert_fail"], [63, "mov ecx, offset aPerfSchedProce"], [64, "mov edx, 199h"], [65, "mov esi, offset aBuiltinSchedC"], [66, "mov edi, offset a1_0"], [67, "call ___assert_fail"], [68, "nop"], [69, "jmp short loc_424D8E"], [70, "nop"], [71, "jmp short loc_424D8E"], [72, "nop"], [73, "nop"], [74, "mov rax, [rbp+var_8]"], [75, "sub rax, fs:28h"], [76, "jz short locret_424DA3"], [77, "call ___stack_chk_fail"], [78, "leave"], [79, "retn"]], "data_dep": [[6, 5], [9, 4], [10, 9], [11, 10], [12, 11], [13, 10], [14, 13], [15, 10], [16, 15], [17, 10], [18, 17], [19, 10], [20, 19], [21, 19], [22, 21], [24, 4], [25, 24], [26, 3], [27, 25], [28, 26], [31, 4], [32, 31], [33, 32], [34, 33], [35, 4], [36, 35], [37, 36], [39, 38], [40, 39], [40, 8], [41, 40], [47, 4], [48, 47], [49, 48], [50, 49], [51, 4], [52, 51], [53, 52], [55, 54], [56, 55], [56, 8], [57, 56], [74, 6], [75, 74], [76, 75], [79, 75]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08_decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08.jsonl.gz", "strip_func_name": "sub_424C7A", "query": "\n\n\nunsigned __int64 __fastcall sub_424C7A(__int64 a1, __int64 a2)\n{\nunsigned int v2; // eax\nint v4; // [rsp+14h] [rbp-Ch]\nunsigned __int64 v5; // [rsp+18h] [rbp-8h]\n\nv5 = __readfsqword(0x28u);\nv4 = 0;\nv2 = *(_DWORD *)a2;\nif ( *(_DWORD *)a2 == 3 )\nreturn v5 - __readfsqword(0x28u);\nif ( v2 > 3 )\ngoto LABEL_15;\nif ( v2 != 2 )\n{\nif ( v2 <= 2 )\n{\nif ( v2 )\n{\nif ( *(_QWORD *)(a2 + 32) )\nv4 = sem_wait(*(sem_t **)(a2 + 32));\nif ( v4 )\n__assert_fail(\"!(ret)\", \"builtin-sched.c\", 0x18Fu, \"perf_sched__process_event\");\n}\nelse\n{\nsub_4242D6(a1, *(_QWORD *)(a2 + 16));\n}\nreturn v5 - __readfsqword(0x28u);\n}\nLABEL_15:\n__assert_fail(\"!(1)\", \"builtin-sched.c\", 0x199u, \"perf_sched__process_event\");\n}\nif ( *(_QWORD *)(a2 + 32) )\nv4 = sem_post(*(sem_t **)(a2 + 32));\nif ( v4 )\n__assert_fail(\"!(ret)\", \"builtin-sched.c\", 0x194u, \"perf_sched__process_event\");\nreturn v5 - __readfsqword(0x28u);\n}\n\n\n\nQ:[a1,a2,sub_424C7A,sub_4242D6,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'sched', 'a2': 'atom', 'sub_424C7A': 'perf_sched__process_event', 'sub_4242D6': 'burn_nsecs'}"} |
|
child_close | 6ff4fe86560154629831ef402a54112bf4957bfcf0075aee410e70b98e28f088 | bigtreetech | CB1-Kernel | NA | static inline void child_close(struct child *child)
{
close(child->fd);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401C0A", "function_addr": 4201482, "binary_name": "6ff4fe86560154629831ef402a54112bf4957bfcf0075aee410e70b98e28f088.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+0Ch]"], [6, "mov edi, eax"], [7, "call _close"], [8, "nop"], [9, "leave"], [10, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [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/6ff4fe86560154629831ef402a54112bf4957bfcf0075aee410e70b98e28f088_6ff4fe86560154629831ef402a54112bf4957bfcf0075aee410e70b98e28f088.jsonl.gz", "strip_func_name": "sub_401C0A", "query": "\n\n\nint __fastcall sub_401C0A(__int64 a1)\n{\nreturn close(*(_DWORD *)(a1 + 12));\n}\n\n\n\nQ:[a1,sub_401C0A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'child', 'sub_401C0A': 'child_close'}"} |
|
check_format | 581b04ef35f63a5c0b4135ce5cb665d6e0a2da0595eec9774cc9b8a5bd81b38b | atomicobject | odo | NA | static bool check_format(const char *buf) {
if (buf[sizeof(counter_t)] != '\n') {
return false;
}
for (uint8_t i = 0; i < sizeof(counter_t); i++) {
if (!isdigit(buf[i])) {
return false;
}
}
return true;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4016C5", "function_addr": 4200133, "binary_name": "581b04ef35f63a5c0b4135ce5cb665d6e0a2da0595eec9774cc9b8a5bd81b38b.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, "add rax, 8"], [6, "movzx eax, byte ptr [rax]"], [7, "cmp al, 0Ah"], [8, "jz short loc_4016E7"], [9, "mov eax, 0"], [10, "jmp short locret_401738"], [11, "mov [rbp+var_1], 0"], [12, "jmp short loc_40172D"], [13, "call ___ctype_b_loc"], [14, "mov rdx, [rax]"], [15, "movzx ecx, [rbp+var_1]"], [16, "mov rax, [rbp+var_18]"], [17, "add rax, rcx"], [18, "movzx eax, byte ptr [rax]"], [19, "movsx rax, al"], [20, "add rax, rax"], [21, "add rax, rdx"], [22, "movzx eax, word ptr [rax]"], [23, "movzx eax, ax"], [24, "and eax, 800h"], [25, "test eax, eax"], [26, "jnz short loc_401723"], [27, "mov eax, 0"], [28, "jmp short locret_401738"], [29, "movzx eax, [rbp+var_1]"], [30, "add eax, 1"], [31, "mov [rbp+var_1], al"], [32, "cmp [rbp+var_1], 7"], [33, "jbe short loc_4016ED"], [34, "mov eax, 1"], [35, "leave"], [36, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [14, 13], [15, 11], [15, 31], [16, 3], [17, 15], [17, 16], [18, 17], [19, 18], [20, 19], [21, 14], [21, 20], [22, 21], [23, 22], [24, 23], [25, 24], [26, 25], [29, 31], [29, 11], [30, 29], [31, 30], [32, 31], [32, 11], [33, 32], [36, 34], [36, 9], [36, 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/581b04ef35f63a5c0b4135ce5cb665d6e0a2da0595eec9774cc9b8a5bd81b38b_581b04ef35f63a5c0b4135ce5cb665d6e0a2da0595eec9774cc9b8a5bd81b38b.jsonl.gz", "strip_func_name": "sub_4016C5", "query": "\n\n\n__int64 __fastcall sub_4016C5(__int64 a1)\n{\nunsigned __int8 i; // [rsp+1Fh] [rbp-1h]\n\nif ( *(_BYTE *)(a1 + 8) != 10 )\nreturn 0LL;\nfor ( i = 0; i <= 7u; ++i )\n{\nif ( ((*__ctype_b_loc())[*(char *)(i + a1)] & 0x800) == 0 )\nreturn 0LL;\n}\nreturn 1LL;\n}\n\n\n\nQ:[a1,sub_4016C5,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'buf', 'sub_4016C5': 'check_format'}"} |
|
agoo_req_create | e3cf12dc8282db536254dfd10adbf01691aabbcfd3b51354ea281f5b59a7391b | ohler55 | agoo-c | NA | agooReq
agoo_req_create(size_t mlen) {
size_t size = mlen + sizeof(struct _agooReq) - 7;
agooReq req = (agooReq)AGOO_MALLOC(size);
if (NULL != req) {
memset(req, 0, size);
req->env = agoo_server.env_nil_value;
req->mlen = mlen;
req->hook = NULL;
}
return req;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_428492", "function_addr": 4359314, "binary_name": "e3cf12dc8282db536254dfd10adbf01691aabbcfd3b51354ea281f5b59a7391b.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, "add rax, 79h "], [6, "mov [rbp+size], rax"], [7, "mov rax, [rbp+size]"], [8, "mov rdi, rax"], [9, "call _malloc"], [10, "mov [rbp+s], rax"], [11, "cmp [rbp+s], 0"], [12, "jz short loc_4284FD"], [13, "mov rdx, [rbp+size]"], [14, "mov rax, [rbp+s]"], [15, "mov esi, 0"], [16, "mov rdi, rax"], [17, "call _memset"], [18, "mov rdx, cs:qword_43F448"], [19, "mov rax, [rbp+s]"], [20, "mov [rax+60h], rdx"], [21, "mov rax, [rbp+s]"], [22, "mov rdx, [rbp+var_18]"], [23, "mov [rax+70h], rdx"], [24, "mov rax, [rbp+s]"], [25, "mov qword ptr [rax+68h], 0"], [26, "mov rax, [rbp+s]"], [27, "leave"], [28, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [10, 9], [11, 10], [12, 11], [13, 6], [14, 10], [16, 14], [19, 10], [20, 19], [20, 18], [21, 10], [22, 3], [23, 22], [23, 21], [24, 10], [25, 24], [26, 10], [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/e3cf12dc8282db536254dfd10adbf01691aabbcfd3b51354ea281f5b59a7391b_e3cf12dc8282db536254dfd10adbf01691aabbcfd3b51354ea281f5b59a7391b.jsonl.gz", "strip_func_name": "sub_428492", "query": "\n\n\n_QWORD *__fastcall sub_428492(__int64 a1)\n{\n_QWORD *s; // [rsp+10h] [rbp-10h]\n\ns = malloc(a1 + 121);\nif ( s )\n{\nmemset(s, 0, a1 + 121);\ns[12] = qword_43F448;\ns[14] = a1;\ns[13] = 0LL;\n}\nreturn s;\n}\n\n\n\nQ:[a1,s,sub_428492,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'mlen', 's': 'req', 'sub_428492': 'agoo_req_create'}"} |
|
acttab_insert | 621e66eae5bc69ceb9ee99c666dc6a91c0b6573d72b5fa9199ea18735a671258 | drhsqlite | pikchr | NA | int acttab_insert(acttab *p, int makeItSafe){
int i, j, k, n, end;
assert( p->nLookahead>0 );
/* Make sure we have enough space to hold the expanded action table
** in the worst case. The worst case occurs if the transaction set
** must be appended to the current action table
*/
n = p->nsymbol + 1;
if( p->nAction + n >= p->nActionAlloc ){
int oldAlloc = p->nActionAlloc;
p->nActionAlloc = p->nAction + n + p->nActionAlloc + 20;
p->aAction = (struct lookahead_action *) realloc( p->aAction,
sizeof(p->aAction[0])*p->nActionAlloc);
if( p->aAction==0 ){
fprintf(stderr,"malloc failed\n");
exit(1);
}
for(i=oldAlloc; i<p->nActionAlloc; i++){
p->aAction[i].lookahead = -1;
p->aAction[i].action = -1;
}
}
/* Scan the existing action table looking for an offset that is a
** duplicate of the current transaction set. Fall out of the loop
** if and when the duplicate is found.
**
** i is the index in p->aAction[] where p->mnLookahead is inserted.
*/
end = makeItSafe ? p->mnLookahead : 0;
for(i=p->nAction-1; i>=end; i--){
if( p->aAction[i].lookahead==p->mnLookahead ){
/* All lookaheads and actions in the aLookahead[] transaction
** must match against the candidate aAction[i] entry. */
if( p->aAction[i].action!=p->mnAction ) continue;
for(j=0; j<p->nLookahead; j++){
k = p->aLookahead[j].lookahead - p->mnLookahead + i;
if( k<0 || k>=p->nAction ) break;
if( p->aLookahead[j].lookahead!=p->aAction[k].lookahead ) break;
if( p->aLookahead[j].action!=p->aAction[k].action ) break;
}
if( j<p->nLookahead ) continue;
/* No possible lookahead value that is not in the aLookahead[]
** transaction is allowed to match aAction[i] */
n = 0;
for(j=0; j<p->nAction; j++){
if( p->aAction[j].lookahead<0 ) continue;
if( p->aAction[j].lookahead==j+p->mnLookahead-i ) n++;
}
if( n==p->nLookahead ){
break; /* An exact match is found at offset i */
}
}
}
/* If no existing offsets exactly match the current transaction, find an
** an empty offset in the aAction[] table in which we can add the
** aLookahead[] transaction.
*/
if( i<end ){
/* Look for holes in the aAction[] table that fit the current
** aLookahead[] transaction. Leave i set to the offset of the hole.
** If no holes are found, i is left at p->nAction, which means the
** transaction will be appended. */
i = makeItSafe ? p->mnLookahead : 0;
for(; i<p->nActionAlloc - p->mxLookahead; i++){
if( p->aAction[i].lookahead<0 ){
for(j=0; j<p->nLookahead; j++){
k = p->aLookahead[j].lookahead - p->mnLookahead + i;
if( k<0 ) break;
if( p->aAction[k].lookahead>=0 ) break;
}
if( j<p->nLookahead ) continue;
for(j=0; j<p->nAction; j++){
if( p->aAction[j].lookahead==j+p->mnLookahead-i ) break;
}
if( j==p->nAction ){
break; /* Fits in empty slots */
}
}
}
}
/* Insert transaction set at index i. */
#if 0
printf("Acttab:");
for(j=0; j<p->nLookahead; j++){
printf(" %d", p->aLookahead[j].lookahead);
}
printf(" inserted at %d\n", i);
#endif
for(j=0; j<p->nLookahead; j++){
k = p->aLookahead[j].lookahead - p->mnLookahead + i;
p->aAction[k] = p->aLookahead[j];
if( k>=p->nAction ) p->nAction = k+1;
}
if( makeItSafe && i+p->nterminal>=p->nAction ) p->nAction = i+p->nterminal+1;
p->nLookahead = 0;
/* Return the offset that is added to the lookahead in order to get the
** index into yy_action of the action */
return i - p->mnLookahead;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401EDD", "function_addr": 4202205, "binary_name": "621e66eae5bc69ceb9ee99c666dc6a91c0b6573d72b5fa9199ea18735a671258.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_2C], esi"], [5, "mov rax, [rbp+var_28]"], [6, "mov eax, [rax+24h]"], [7, "test eax, eax"], [8, "jg short loc_401F10"], [9, "mov ecx, offset function"], [10, "mov edx, 2AAh"], [11, "mov esi, offset file"], [12, "mov edi, offset assertion"], [13, "call ___assert_fail"], [14, "mov rax, [rbp+var_28]"], [15, "mov eax, [rax+30h]"], [16, "add eax, 1"], [17, "mov [rbp+var_C], eax"], [18, "mov rax, [rbp+var_28]"], [19, "mov edx, [rax]"], [20, "mov eax, [rbp+var_C]"], [21, "add edx, eax"], [22, "mov rax, [rbp+var_28]"], [23, "mov eax, [rax+4]"], [24, "cmp edx, eax"], [25, "jl loc_40200D"], [26, "mov rax, [rbp+var_28]"], [27, "mov eax, [rax+4]"], [28, "mov [rbp+var_10], eax"], [29, "mov rax, [rbp+var_28]"], [30, "mov edx, [rax]"], [31, "mov eax, [rbp+var_C]"], [32, "add edx, eax"], [33, "mov rax, [rbp+var_28]"], [34, "mov eax, [rax+4]"], [35, "add eax, edx"], [36, "lea edx, [rax+14h]"], [37, "mov rax, [rbp+var_28]"], [38, "mov [rax+4], edx"], [39, "mov rax, [rbp+var_28]"], [40, "mov eax, [rax+4]"], [41, "cdqe"], [42, "lea rdx, ds:0[rax*8]"], [43, "mov rax, [rbp+var_28]"], [44, "mov rax, [rax+8]"], [45, "mov rsi, rdx"], [46, "mov rdi, rax"], [47, "call _realloc"], [48, "mov rdx, [rbp+var_28]"], [49, "mov [rdx+8], rax"], [50, "mov rax, [rbp+var_28]"], [51, "mov rax, [rax+8]"], [52, "test rax, rax"], [53, "jnz short loc_401FC0"], [54, "mov rax, cs:stderr"], [55, "mov rcx, rax"], [56, "mov edx, 0Eh"], [57, "mov esi, 1"], [58, "mov edi, offset aMallocFailed"], [59, "call _fwrite"], [60, "mov edi, 1"], [61, "call _exit"], [62, "mov eax, [rbp+var_10]"], [63, "mov [rbp+var_4], eax"], [64, "jmp short loc_402001"], [65, "mov rax, [rbp+var_28]"], [66, "mov rdx, [rax+8]"], [67, "mov eax, [rbp+var_4]"], [68, "cdqe"], [69, "shl rax, 3"], [70, "add rax, rdx"], [71, "mov dword ptr [rax], 0FFFFFFFFh"], [72, "mov rax, [rbp+var_28]"], [73, "mov rdx, [rax+8]"], [74, "mov eax, [rbp+var_4]"], [75, "cdqe"], [76, "shl rax, 3"], [77, "add rax, rdx"], [78, "mov dword ptr [rax+4], 0FFFFFFFFh"], [79, "add [rbp+var_4], 1"], [80, "mov rax, [rbp+var_28]"], [81, "mov eax, [rax+4]"], [82, "cmp [rbp+var_4], eax"], [83, "jl short loc_401FC8"], [84, "cmp [rbp+var_2C], 0"], [85, "jz short loc_40201C"], [86, "mov rax, [rbp+var_28]"], [87, "mov eax, [rax+18h]"], [88, "jmp short loc_402021"], [89, "mov eax, 0"], [90, "mov [rbp+var_14], eax"], [91, "mov rax, [rbp+var_28]"], [92, "mov eax, [rax]"], [93, "sub eax, 1"], [94, "mov [rbp+var_4], eax"], [95, "jmp loc_4021CF"], [96, "mov rax, [rbp+var_28]"], [97, "mov rdx, [rax+8]"], [98, "mov eax, [rbp+var_4]"], [99, "cdqe"], [100, "shl rax, 3"], [101, "add rax, rdx"], [102, "mov edx, [rax]"], [103, "mov rax, [rbp+var_28]"], [104, "mov eax, [rax+18h]"], [105, "cmp edx, eax"], [106, "jnz loc_4021CB"], [107, "mov rax, [rbp+var_28]"], [108, "mov rdx, [rax+8]"], [109, "mov eax, [rbp+var_4]"], [110, "cdqe"], [111, "shl rax, 3"], [112, "add rax, rdx"], [113, "mov edx, [rax+4]"], [114, "mov rax, [rbp+var_28]"], [115, "mov eax, [rax+1Ch]"], [116, "cmp edx, eax"], [117, "jnz loc_4021C7"], [118, "mov [rbp+var_8], 0"], [119, "jmp loc_40212E"], [120, "mov rax, [rbp+var_28]"], [121, "mov rdx, [rax+10h]"], [122, "mov eax, [rbp+var_8]"], [123, "cdqe"], [124, "shl rax, 3"], [125, "add rax, rdx"], [126, "mov edx, [rax]"], [127, "mov rax, [rbp+var_28]"], [128, "mov eax, [rax+18h]"], [129, "sub edx, eax"], [130, "mov eax, [rbp+var_4]"], [131, "add eax, edx"], [132, "mov [rbp+var_18], eax"], [133, "cmp [rbp+var_18], 0"], [134, "js loc_402144"], [135, "mov rax, [rbp+var_28]"], [136, "mov eax, [rax]"], [137, "cmp [rbp+var_18], eax"], [138, "jge short loc_402144"], [139, "mov rax, [rbp+var_28]"], [140, "mov rdx, [rax+10h]"], [141, "mov eax, [rbp+var_8]"], [142, "cdqe"], [143, "shl rax, 3"], [144, "add rax, rdx"], [145, "mov edx, [rax]"], [146, "mov rax, [rbp+var_28]"], [147, "mov rcx, [rax+8]"], [148, "mov eax, [rbp+var_18]"], [149, "cdqe"], [150, "shl rax, 3"], [151, "add rax, rcx"], [152, "mov eax, [rax]"], [153, "cmp edx, eax"], [154, "jnz short loc_402140"], [155, "mov rax, [rbp+var_28]"], [156, "mov rdx, [rax+10h]"], [157, "mov eax, [rbp+var_8]"], [158, "cdqe"], [159, "shl rax, 3"], [160, "add rax, rdx"], [161, "mov edx, [rax+4]"], [162, "mov rax, [rbp+var_28]"], [163, "mov rcx, [rax+8]"], [164, "mov eax, [rbp+var_18]"], [165, "cdqe"], [166, "shl rax, 3"], [167, "add rax, rcx"], [168, "mov eax, [rax+4]"], [169, "cmp edx, eax"], [170, "jnz short loc_402143"], [171, "add [rbp+var_8], 1"], [172, "mov rax, [rbp+var_28]"], [173, "mov eax, [rax+24h]"], [174, "cmp [rbp+var_8], eax"], [175, "jl loc_40208C"], [176, "jmp short loc_402144"], [177, "nop"], [178, "jmp short loc_402144"], [179, "nop"], [180, "mov rax, [rbp+var_28]"], [181, "mov eax, [rax+24h]"], [182, "cmp [rbp+var_8], eax"], [183, "jl short loc_4021CA"], [184, "mov [rbp+var_C], 0"], [185, "mov [rbp+var_8], 0"], [186, "jmp short loc_4021AE"], [187, "mov rax, [rbp+var_28]"], [188, "mov rdx, [rax+8]"], [189, "mov eax, [rbp+var_8]"], [190, "cdqe"], [191, "shl rax, 3"], [192, "add rax, rdx"], [193, "mov eax, [rax]"], [194, "test eax, eax"], [195, "js short loc_4021A9"], [196, "mov rax, [rbp+var_28]"], [197, "mov rdx, [rax+8]"], [198, "mov eax, [rbp+var_8]"], [199, "cdqe"], [200, "shl rax, 3"], [201, "add rax, rdx"], [202, "mov edx, [rax]"], [203, "mov rax, [rbp+var_28]"], [204, "mov ecx, [rax+18h]"], [205, "mov eax, [rbp+var_8]"], [206, "add eax, ecx"], [207, "sub eax, [rbp+var_4]"], [208, "cmp edx, eax"], [209, "jnz short loc_4021AA"], [210, "add [rbp+var_C], 1"], [211, "jmp short loc_4021AA"], [212, "nop"], [213, "add [rbp+var_8], 1"], [214, "mov rax, [rbp+var_28]"], [215, "mov eax, [rax]"], [216, "cmp [rbp+var_8], eax"], [217, "jl short loc_402160"], [218, "mov rax, [rbp+var_28]"], [219, "mov eax, [rax+24h]"], [220, "cmp [rbp+var_C], eax"], [221, "jz short loc_4021DD"], [222, "jmp short loc_4021CB"], [223, "nop"], [224, "jmp short loc_4021CB"], [225, "nop"], [226, "sub [rbp+var_4], 1"], [227, "mov eax, [rbp+var_4]"], [228, "cmp eax, [rbp+var_14]"], [229, "jge loc_402035"], [230, "jmp short loc_4021DE"], [231, "nop"], [232, "mov eax, [rbp+var_4]"], [233, "cmp eax, [rbp+var_14]"], [234, "jge loc_40230A"], [235, "cmp [rbp+var_2C], 0"], [236, "jz short loc_4021F9"], [237, "mov rax, [rbp+var_28]"], [238, "mov eax, [rax+18h]"], [239, "jmp short loc_4021FE"], [240, "mov eax, 0"], [241, "mov [rbp+var_4], eax"], [242, "jmp loc_4022EC"], [243, "mov rax, [rbp+var_28]"], [244, "mov rdx, [rax+8]"], [245, "mov eax, [rbp+var_4]"], [246, "cdqe"], [247, "shl rax, 3"], [248, "add rax, rdx"], [249, "mov eax, [rax]"], [250, "test eax, eax"], [251, "jns loc_4022E8"], [252, "mov [rbp+var_8], 0"], [253, "jmp short loc_402278"], [254, "mov rax, [rbp+var_28]"], [255, "mov rdx, [rax+10h]"], [256, "mov eax, [rbp+var_8]"], [257, "cdqe"], [258, "shl rax, 3"], [259, "add rax, rdx"], [260, "mov edx, [rax]"], [261, "mov rax, [rbp+var_28]"], [262, "mov eax, [rax+18h]"], [263, "sub edx, eax"], [264, "mov eax, [rbp+var_4]"], [265, "add eax, edx"], [266, "mov [rbp+var_18], eax"], [267, "cmp [rbp+var_18], 0"], [268, "js short loc_402286"], [269, "mov rax, [rbp+var_28]"], [270, "mov rdx, [rax+8]"], [271, "mov eax, [rbp+var_18]"], [272, "cdqe"], [273, "shl rax, 3"], [274, "add rax, rdx"], [275, "mov eax, [rax]"], [276, "test eax, eax"], [277, "jns short loc_402289"], [278, "add [rbp+var_8], 1"], [279, "mov rax, [rbp+var_28]"], [280, "mov eax, [rax+24h]"], [281, "cmp [rbp+var_8], eax"], [282, "jl short loc_40222D"], [283, "jmp short loc_40228A"], [284, "nop"], [285, "jmp short loc_40228A"], [286, "nop"], [287, "mov rax, [rbp+var_28]"], [288, "mov eax, [rax+24h]"], [289, "cmp [rbp+var_8], eax"], [290, "jl short loc_4022E7"], [291, "mov [rbp+var_8], 0"], [292, "jmp short loc_4022CC"], [293, "mov rax, [rbp+var_28]"], [294, "mov rdx, [rax+8]"], [295, "mov eax, [rbp+var_8]"], [296, "cdqe"], [297, "shl rax, 3"], [298, "add rax, rdx"], [299, "mov edx, [rax]"], [300, "mov rax, [rbp+var_28]"], [301, "mov ecx, [rax+18h]"], [302, "mov eax, [rbp+var_8]"], [303, "add eax, ecx"], [304, "sub eax, [rbp+var_4]"], [305, "cmp edx, eax"], [306, "jz short loc_4022D9"], [307, "add [rbp+var_8], 1"], [308, "mov rax, [rbp+var_28]"], [309, "mov eax, [rax]"], [310, "cmp [rbp+var_8], eax"], [311, "jl short loc_40229F"], [312, "jmp short loc_4022DA"], [313, "nop"], [314, "mov rax, [rbp+var_28]"], [315, "mov eax, [rax]"], [316, "cmp [rbp+var_8], eax"], [317, "jz short loc_402309"], [318, "jmp short loc_4022E8"], [319, "nop"], [320, "add [rbp+var_4], 1"], [321, "mov rax, [rbp+var_28]"], [322, "mov edx, [rax+4]"], [323, "mov rax, [rbp+var_28]"], [324, "mov ecx, [rax+20h]"], [325, "mov eax, edx"], [326, "sub eax, ecx"], [327, "cmp [rbp+var_4], eax"], [328, "jl loc_402206"], [329, "jmp short loc_40230A"], [330, "nop"], [331, "mov [rbp+var_8], 0"], [332, "jmp short loc_402384"], [333, "mov rax, [rbp+var_28]"], [334, "mov rdx, [rax+10h]"], [335, "mov eax, [rbp+var_8]"], [336, "cdqe"], [337, "shl rax, 3"], [338, "add rax, rdx"], [339, "mov edx, [rax]"], [340, "mov rax, [rbp+var_28]"], [341, "mov eax, [rax+18h]"], [342, "sub edx, eax"], [343, "mov eax, [rbp+var_4]"], [344, "add eax, edx"], [345, "mov [rbp+var_18], eax"], [346, "mov rax, [rbp+var_28]"], [347, "mov rdx, [rax+10h]"], [348, "mov eax, [rbp+var_8]"], [349, "cdqe"], [350, "shl rax, 3"], [351, "lea rcx, [rdx+rax]"], [352, "mov rax, [rbp+var_28]"], [353, "mov rdx, [rax+8]"], [354, "mov eax, [rbp+var_18]"], [355, "cdqe"], [356, "shl rax, 3"], [357, "add rdx, rax"], [358, "mov rax, [rcx]"], [359, "mov [rdx], rax"], [360, "mov rax, [rbp+var_28]"], [361, "mov eax, [rax]"], [362, "cmp [rbp+var_18], eax"], [363, "jl short loc_402380"], [364, "mov eax, [rbp+var_18]"], [365, "lea edx, [rax+1]"], [366, "mov rax, [rbp+var_28]"], [367, "mov [rax], edx"], [368, "add [rbp+var_8], 1"], [369, "mov rax, [rbp+var_28]"], [370, "mov eax, [rax+24h]"], [371, "cmp [rbp+var_8], eax"], [372, "jl short loc_402313"], [373, "cmp [rbp+var_2C], 0"], [374, "jz short loc_4023C1"], [375, "mov rax, [rbp+var_28]"], [376, "mov edx, [rax+2Ch]"], [377, "mov eax, [rbp+var_4]"], [378, "add edx, eax"], [379, "mov rax, [rbp+var_28]"], [380, "mov eax, [rax]"], [381, "cmp edx, eax"], [382, "jl short loc_4023C1"], [383, "mov rax, [rbp+var_28]"], [384, "mov edx, [rax+2Ch]"], [385, "mov eax, [rbp+var_4]"], [386, "add eax, edx"], [387, "lea edx, [rax+1]"], [388, "mov rax, [rbp+var_28]"], [389, "mov [rax], edx"], [390, "mov rax, [rbp+var_28]"], [391, "mov dword ptr [rax+24h], 0"], [392, "mov rax, [rbp+var_28]"], [393, "mov edx, [rax+18h]"], [394, "mov eax, [rbp+var_4]"], [395, "sub eax, edx"], [396, "leave"], [397, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 7], [14, 3], [15, 14], [16, 15], [17, 16], [18, 3], [19, 18], [20, 17], [21, 20], [21, 19], [22, 3], [23, 22], [24, 21], [24, 23], [25, 24], [26, 3], [27, 26], [28, 27], [29, 3], [30, 29], [31, 17], [32, 31], [32, 30], [33, 3], [34, 33], [35, 34], [35, 32], [36, 32], [36, 35], [37, 3], [38, 36], [38, 37], [39, 3], [40, 39], [40, 38], [42, 36], [43, 3], [44, 38], [44, 43], [45, 42], [46, 44], [48, 3], [49, 48], [49, 47], [50, 3], [51, 50], [51, 49], [52, 51], [53, 52], [55, 54], [62, 28], [63, 62], [65, 3], [66, 71], [66, 38], [66, 65], [66, 78], [66, 49], [67, 63], [67, 79], [69, 67], [70, 66], [70, 69], [71, 70], [72, 3], [73, 72], [73, 71], [74, 79], [74, 63], [76, 74], [77, 76], [77, 73], [78, 77], [79, 63], [79, 79], [80, 3], [81, 78], [81, 49], [81, 71], [81, 80], [81, 38], [82, 79], [82, 63], [82, 81], [83, 82], [84, 4], [85, 84], [86, 3], [87, 78], [87, 49], [87, 86], [87, 71], [87, 38], [90, 87], [90, 89], [91, 3], [92, 78], [92, 49], [92, 91], [92, 71], [92, 38], [93, 92], [94, 93], [96, 3], [97, 49], [97, 71], [97, 38], [97, 78], [97, 96], [98, 226], [98, 94], [100, 98], [101, 97], [101, 100], [102, 71], [102, 38], [102, 101], [102, 78], [102, 49], [103, 3], [104, 71], [104, 38], [104, 78], [104, 49], [104, 103], [105, 104], [105, 102], [106, 105], [107, 3], [108, 49], [108, 71], [108, 38], [108, 107], [108, 78], [109, 226], [109, 94], [111, 109], [112, 111], [112, 108], [113, 71], [113, 38], [113, 112], [113, 78], [113, 49], [114, 3], [115, 71], [115, 38], [115, 78], [115, 49], [115, 114], [116, 113], [116, 115], [117, 116], [120, 3], [121, 71], [121, 38], [121, 120], [121, 78], [121, 49], [122, 118], [122, 171], [124, 122], [125, 121], [125, 124], [126, 71], [126, 125], [126, 78], [126, 49], [126, 38], [127, 3], [128, 78], [128, 49], [128, 127], [128, 71], [128, 38], [129, 128], [129, 126], [130, 226], [130, 94], [131, 130], [131, 129], [132, 131], [133, 132], [134, 133], [135, 3], [136, 135], [136, 78], [136, 49], [136, 38], [136, 71], [137, 132], [137, 136], [138, 137], [139, 3], [140, 71], [140, 38], [140, 139], [140, 78], [140, 49], [141, 118], [141, 171], [143, 141], [144, 143], [144, 140], [145, 71], [145, 38], [145, 144], [145, 78], [145, 49], [146, 3], [147, 78], [147, 49], [147, 71], [147, 146], [147, 38], [148, 132], [150, 148], [151, 150], [151, 147], [152, 78], [152, 49], [152, 71], [152, 151], [152, 38], [153, 152], [153, 145], [154, 153], [155, 3], [156, 71], [156, 78], [156, 49], [156, 155], [156, 38], [157, 118], [157, 171], [159, 157], [160, 156], [160, 159], [161, 78], [161, 49], [161, 160], [161, 38], [161, 71], [162, 3], [163, 78], [163, 49], [163, 71], [163, 38], [163, 162], [164, 132], [166, 164], [167, 163], [167, 166], [168, 49], [168, 71], [168, 38], [168, 167], [168, 78], [169, 161], [169, 168], [170, 169], [171, 118], [171, 171], [172, 3], [173, 49], [173, 71], [173, 38], [173, 172], [173, 78], [174, 171], [174, 173], [174, 118], [175, 174], [180, 3], [181, 71], [181, 38], [181, 78], [181, 180], [181, 49], [182, 118], [182, 181], [182, 171], [183, 182], [187, 3], [188, 187], [188, 78], [188, 49], [188, 71], [188, 38], [189, 213], [189, 185], [191, 189], [192, 188], [192, 191], [193, 49], [193, 71], [193, 192], [193, 38], [193, 78], [194, 193], [195, 194], [196, 3], [197, 196], [197, 78], [197, 49], [197, 71], [197, 38], [198, 213], [198, 185], [200, 198], [201, 197], [201, 200], [202, 78], [202, 49], [202, 71], [202, 201], [202, 38], [203, 3], [204, 203], [204, 49], [204, 71], [204, 38], [204, 78], [205, 213], [205, 185], [206, 205], [206, 204], [207, 226], [207, 206], [207, 94], [208, 207], [208, 202], [209, 208], [210, 184], [210, 210], [213, 185], [213, 213], [214, 3], [215, 49], [215, 71], [215, 38], [215, 214], [215, 78], [216, 215], [216, 213], [216, 185], [217, 216], [218, 3], [219, 38], [219, 218], [219, 78], [219, 49], [219, 71], [220, 184], [220, 210], [220, 219], [221, 220], [226, 226], [226, 94], [227, 94], [227, 226], [228, 90], [228, 227], [229, 228], [232, 94], [232, 226], [233, 90], [233, 232], [234, 233], [235, 4], [236, 235], [237, 3], [238, 71], [238, 38], [238, 237], [238, 78], [238, 49], [241, 238], [241, 240], [243, 3], [244, 49], [244, 71], [244, 38], [244, 243], [244, 78], [245, 320], [245, 241], [247, 245], [248, 244], [248, 247], [249, 71], [249, 38], [249, 78], [249, 248], [249, 49], [250, 249], [251, 250], [254, 3], [255, 49], [255, 71], [255, 38], [255, 78], [255, 254], [256, 278], [256, 252], [258, 256], [259, 255], [259, 258], [260, 71], [260, 38], [260, 78], [260, 49], [260, 259], [261, 3], [262, 261], [262, 78], [262, 49], [262, 71], [262, 38], [263, 262], [263, 260], [264, 320], [264, 241], [265, 264], [265, 263], [266, 265], [267, 266], [268, 267], [269, 3], [270, 78], [270, 269], [270, 49], [270, 71], [270, 38], [271, 266], [273, 271], [274, 270], [274, 273], [275, 78], [275, 49], [275, 71], [275, 38], [275, 274], [276, 275], [277, 276], [278, 278], [278, 252], [279, 3], [280, 49], [280, 71], [280, 38], [280, 279], [280, 78], [281, 278], [281, 280], [281, 252], [282, 281], [287, 3], [288, 49], [288, 71], [288, 38], [288, 78], [288, 287], [289, 278], [289, 252], [289, 288], [290, 289], [293, 3], [294, 78], [294, 49], [294, 71], [294, 38], [294, 293], [295, 307], [295, 291], [297, 295], [298, 294], [298, 297], [299, 49], [299, 71], [299, 38], [299, 298], [299, 78], [300, 3], [301, 71], [301, 38], [301, 78], [301, 49], [301, 300], [302, 291], [302, 307], [303, 302], [303, 301], [304, 303], [304, 241], [304, 320], [305, 304], [305, 299], [306, 305], [307, 307], [307, 291], [308, 3], [309, 71], [309, 308], [309, 38], [309, 78], [309, 49], [310, 291], [310, 309], [310, 307], [311, 310], [314, 3], [315, 71], [315, 38], [315, 78], [315, 49], [315, 314], [316, 315], [316, 291], [316, 307], [317, 316], [320, 241], [320, 320], [321, 3], [322, 38], [322, 321], [322, 78], [322, 49], [322, 71], [323, 3], [324, 78], [324, 49], [324, 323], [324, 71], [324, 38], [325, 322], [326, 325], [326, 324], [327, 241], [327, 320], [327, 326], [328, 327], [333, 3], [334, 359], [334, 71], [334, 38], [334, 367], [334, 78], [334, 333], [334, 49], [335, 368], [335, 331], [337, 335], [338, 334], [338, 337], [339, 359], [339, 71], [339, 38], [339, 367], [339, 78], [339, 338], [339, 49], [340, 3], [341, 367], [341, 78], [341, 49], [341, 359], [341, 71], [341, 340], [341, 38], [342, 341], [342, 339], [343, 241], [343, 320], [343, 226], [343, 94], [344, 343], [344, 342], [345, 344], [346, 3], [347, 346], [347, 359], [347, 71], [347, 38], [347, 367], [347, 78], [347, 49], [348, 368], [348, 331], [350, 348], [351, 204], [351, 78], [351, 324], [351, 301], [351, 49], [351, 147], [351, 351], [351, 350], [351, 359], [351, 71], [351, 38], [351, 163], [351, 367], [352, 3], [353, 359], [353, 71], [353, 38], [353, 367], [353, 78], [353, 352], [353, 49], [354, 345], [356, 354], [357, 353], [357, 356], [358, 351], [358, 359], [358, 71], [358, 38], [358, 367], [358, 78], [358, 49], [359, 358], [359, 357], [360, 3], [361, 360], [361, 359], [361, 71], [361, 367], [362, 361], [362, 345], [363, 362], [364, 345], [365, 367], [365, 357], [365, 78], [365, 49], [365, 364], [365, 359], [365, 71], [365, 38], [366, 3], [367, 365], [367, 366], [368, 368], [368, 331], [369, 3], [370, 78], [370, 49], [370, 369], [370, 359], [370, 71], [370, 38], [370, 367], [371, 368], [371, 370], [371, 331], [372, 371], [373, 4], [374, 373], [375, 3], [376, 367], [376, 78], [376, 49], [376, 375], [376, 359], [376, 71], [376, 38], [377, 94], [377, 241], [377, 226], [377, 320], [378, 377], [378, 376], [379, 3], [380, 379], [380, 359], [380, 71], [380, 38], [380, 367], [380, 78], [380, 49], [381, 378], [381, 380], [382, 381], [383, 3], [384, 367], [384, 78], [384, 49], [384, 389], [384, 383], [384, 359], [384, 71], [384, 38], [385, 241], [385, 226], [385, 320], [385, 94], [386, 384], [386, 385], [387, 386], [387, 367], [387, 389], [387, 78], [387, 49], [387, 384], [387, 359], [387, 71], [387, 38], [388, 3], [389, 388], [389, 387], [390, 3], [391, 390], [392, 3], [393, 391], [393, 392], [394, 94], [394, 320], [394, 241], [394, 226], [395, 394], [395, 393], [397, 395]]}
| {"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/621e66eae5bc69ceb9ee99c666dc6a91c0b6573d72b5fa9199ea18735a671258_621e66eae5bc69ceb9ee99c666dc6a91c0b6573d72b5fa9199ea18735a671258.jsonl.gz", "strip_func_name": "sub_401EDD", "query": "\n\n\n__int64 __fastcall sub_401EDD(__int64 a1, int a2)\n{\nint v2; // eax\nint v3; // eax\nint v5; // [rsp+18h] [rbp-18h]\nint v6; // [rsp+18h] [rbp-18h]\nint v7; // [rsp+18h] [rbp-18h]\nint v8; // [rsp+20h] [rbp-10h]\nint v9; // [rsp+24h] [rbp-Ch]\nint v10; // [rsp+24h] [rbp-Ch]\nint k; // [rsp+28h] [rbp-8h]\nint l; // [rsp+28h] [rbp-8h]\nint m; // [rsp+28h] [rbp-8h]\nint n; // [rsp+28h] [rbp-8h]\nint ii; // [rsp+28h] [rbp-8h]\nint i; // [rsp+2Ch] [rbp-4h]\nint j; // [rsp+2Ch] [rbp-4h]\n\nif ( *(int *)(a1 + 36) <= 0 )\n__assert_fail(\"p->nLookahead>0\", \"lemon.c\", 0x2AAu, \"acttab_insert\");\nv9 = *(_DWORD *)(a1 + 48) + 1;\nif ( v9 + *(_DWORD *)a1 >= *(_DWORD *)(a1 + 4) )\n{\nv8 = *(_DWORD *)(a1 + 4);\n*(_DWORD *)(a1 + 4) = v9 + *(_DWORD *)a1 + v8 + 20;\n*(_QWORD *)(a1 + 8) = realloc(*(void **)(a1 + 8), 8LL * *(int *)(a1 + 4));\nif ( !*(_QWORD *)(a1 + 8) )\n{\nfwrite(\"malloc failed\\n\", 1uLL, 0xEuLL, stderr);\nexit(1);\n}\nfor ( i = v8; i < *(_DWORD *)(a1 + 4); ++i )\n{\n*(_DWORD *)(*(_QWORD *)(a1 + 8) + 8LL * i) = -1;\n*(_DWORD *)(*(_QWORD *)(a1 + 8) + 8LL * i + 4) = -1;\n}\n}\nif ( a2 )\nv2 = *(_DWORD *)(a1 + 24);\nelse\nv2 = 0;\nfor ( j = *(_DWORD *)a1 - 1; j >= v2; --j )\n{\nif ( *(_DWORD *)(*(_QWORD *)(a1 + 8) + 8LL * j) == *(_DWORD *)(a1 + 24)\n&& *(_DWORD *)(*(_QWORD *)(a1 + 8) + 8LL * j + 4) == *(_DWORD *)(a1 + 28) )\n{\nfor ( k = 0; k < *(_DWORD *)(a1 + 36); ++k )\n{\nv5 = *(_DWORD *)(*(_QWORD *)(a1 + 16) + 8LL * k) - *(_DWORD *)(a1 + 24) + j;\nif ( v5 < 0\n|| v5 >= *(_DWORD *)a1\n|| *(_DWORD *)(*(_QWORD *)(a1 + 16) + 8LL * k) != *(_DWORD *)(*(_QWORD *)(a1 + 8) + 8LL * v5)\n|| *(_DWORD *)(*(_QWORD *)(a1 + 16) + 8LL * k + 4) != *(_DWORD *)(*(_QWORD *)(a1 + 8) + 8LL * v5 + 4) )\n{\nbreak;\n}\n}\nif ( k >= *(_DWORD *)(a1 + 36) )\n{\nv10 = 0;\nfor ( l = 0; l < *(_DWORD *)a1; ++l )\n{\nif ( *(int *)(*(_QWORD *)(a1 + 8) + 8LL * l) >= 0\n&& *(_DWORD *)(*(_QWORD *)(a1 + 8) + 8LL * l) == *(_DWORD *)(a1 + 24) + l - j )\n{\n++v10;\n}\n}\nif ( v10 == *(_DWORD *)(a1 + 36) )\nbreak;\n}\n}\n}\nif ( j < v2 )\n{\nif ( a2 )\nv3 = *(_DWORD *)(a1 + 24);\nelse\nv3 = 0;\nfor ( j = v3; j < *(_DWORD *)(a1 + 4) - *(_DWORD *)(a1 + 32); ++j )\n{\nif ( *(int *)(*(_QWORD *)(a1 + 8) + 8LL * j) < 0 )\n{\nfor ( m = 0; m < *(_DWORD *)(a1 + 36); ++m )\n{\nv6 = *(_DWORD *)(*(_QWORD *)(a1 + 16) + 8LL * m) - *(_DWORD *)(a1 + 24) + j;\nif ( v6 < 0 || *(int *)(*(_QWORD *)(a1 + 8) + 8LL * v6) >= 0 )\nbreak;\n}\nif ( m >= *(_DWORD *)(a1 + 36) )\n{\nfor ( n = 0; n < *(_DWORD *)a1 && *(_DWORD *)(*(_QWORD *)(a1 + 8) + 8LL * n) != *(_DWORD *)(a1 + 24) + n - j; ++n )\n;\nif ( n == *(_DWORD *)a1 )\nbreak;\n}\n}\n}\n}\nfor ( ii = 0; ii < *(_DWORD *)(a1 + 36); ++ii )\n{\nv7 = *(_DWORD *)(*(_QWORD *)(a1 + 16) + 8LL * ii) - *(_DWORD *)(a1 + 24) + j;\n*(_QWORD *)(8LL * v7 + *(_QWORD *)(a1 + 8)) = *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * ii);\nif ( v7 >= *(_DWORD *)a1 )\n*(_DWORD *)a1 = v7 + 1;\n}\nif ( a2 && j + *(_DWORD *)(a1 + 44) >= *(_DWORD *)a1 )\n*(_DWORD *)a1 = *(_DWORD *)(a1 + 44) + j + 1;\n*(_DWORD *)(a1 + 36) = 0;\nreturn (unsigned int)(j - *(_DWORD *)(a1 + 24));\n}\n\n\n\nQ:[a1,a2,v6,v8,v9,sub_401EDD,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'p', 'a2': 'makeItSafe', 'v6': 'ka', 'v8': 'oldAlloc', 'v9': 'n', 'sub_401EDD': 'acttab_insert'}"} |
|
match_scaffold_adaptive | 2628714fc89bbd06927f17c35c7cc10c3c4f3a82276ea56c58894e172e8f25b3 | smarco | gem3-mapper | NA | void match_scaffold_adaptive(
match_scaffold_t* const match_scaffold,
pattern_t* const pattern,
text_trace_t* const text_trace,
alignment_t* const alignment,
const uint64_t global_min_identity,
const uint64_t matching_min_length,
matches_t* const matches,
mm_allocator_t* const mm_allocator) {
PROFILE_START(GP_MATCH_SCAFFOLD_ALIGNMENT,PROFILE_LEVEL);
// Region-Chain scaffolding
if (match_scaffold->scaffold_type == scaffold_none) {
match_scaffold_region_chain(match_scaffold,pattern,text_trace,matches,mm_allocator);
match_scaffold->scaffold_type = scaffold_region_chain; // Set scaffold approach
}
// Levenshtein scaffolding
const uint64_t key_length = pattern->key_length;
if (match_scaffold->scaffold_type <= scaffold_region_chain) {
// Check coverage
const uint64_t match_distance_min_bound = alignment->distance_min_bound;
const uint64_t max_coverage_bound = BOUNDED_SUBTRACTION(key_length,match_distance_min_bound,0);
if (max_coverage_bound < global_min_identity ||
match_scaffold->scaffolding_coverage < max_coverage_bound) {
// Scaffold from Levenshtein-alignment
match_scaffold_levenshtein(
match_scaffold,pattern,text_trace,
alignment,matching_min_length,matches,mm_allocator);
PROF_ADD_COUNTER(GP_MATCH_SCAFFOLD_EDIT_COVERAGE,
(100*match_scaffold->scaffolding_coverage)/key_length);
}
match_scaffold->scaffold_type = scaffold_levenshtein;
}
// // DEBUG
// match_scaffold_print_pretty(stderr,matches,match_scaffold,
// align_input->key,align_input->key_length,
// align_input->text,align_input->text_length,mm_allocator);
// DEBUG
gem_cond_debug_block(DEBUG_MATCH_SCAFFOLD) {
tab_fprintf(gem_log_get_stream(),"[GEM]>Match.Scaffold (scaffold alignment)\n");
tab_global_inc();
match_scaffold_print(stderr,matches,match_scaffold);
tab_global_dec();
}
// CHECK
gem_cond_debug_block(DEBUG_MATCH_SCAFFOLD_CHECK) {
match_scaffold_check(match_scaffold,pattern,text_trace,matches);
}
PROFILE_STOP(GP_MATCH_SCAFFOLD_ALIGNMENT,PROFILE_LEVEL);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_446A8E", "function_addr": 4483726, "binary_name": "2628714fc89bbd06927f17c35c7cc10c3c4f3a82276ea56c58894e172e8f25b3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_38], rdx"], [6, "mov [rbp+var_40], rcx"], [7, "mov [rbp+var_48], r8"], [8, "mov [rbp+var_50], r9"], [9, "mov rax, [rbp+var_28]"], [10, "mov eax, [rax]"], [11, "test eax, eax"], [12, "jnz short loc_446AE1"], [13, "mov rcx, [rbp+arg_8]"], [14, "mov rdx, [rbp+var_38]"], [15, "mov rsi, [rbp+var_30]"], [16, "mov rax, [rbp+var_28]"], [17, "mov r8, rcx"], [18, "mov rcx, [rbp+arg_0]"], [19, "mov rdi, rax"], [20, "call sub_446A0E"], [21, "mov rax, [rbp+var_28]"], [22, "mov dword ptr [rax], 1"], [23, "mov rax, [rbp+var_30]"], [24, "mov rax, [rax+10h]"], [25, "mov [rbp+var_8], rax"], [26, "mov rax, [rbp+var_28]"], [27, "mov eax, [rax]"], [28, "cmp eax, 1"], [29, "ja short loc_446B71"], [30, "mov rax, [rbp+var_40]"], [31, "mov rax, [rax+8]"], [32, "mov [rbp+var_10], rax"], [33, "mov rax, [rbp+var_8]"], [34, "cmp rax, [rbp+var_10]"], [35, "jbe short loc_446B18"], [36, "mov rax, [rbp+var_8]"], [37, "sub rax, [rbp+var_10]"], [38, "jmp short loc_446B1D"], [39, "mov eax, 0"], [40, "mov [rbp+var_18], rax"], [41, "mov rax, [rbp+var_18]"], [42, "cmp rax, [rbp+var_48]"], [43, "jb short loc_446B39"], [44, "mov rax, [rbp+var_28]"], [45, "mov rax, [rax+18h]"], [46, "cmp [rbp+var_18], rax"], [47, "jbe short loc_446B67"], [48, "mov rdi, [rbp+var_50]"], [49, "mov rcx, [rbp+var_40]"], [50, "mov rdx, [rbp+var_38]"], [51, "mov rsi, [rbp+var_30]"], [52, "mov rax, [rbp+var_28]"], [53, "sub rsp, 8"], [54, "push [rbp+arg_8]"], [55, "mov r9, [rbp+arg_0]"], [56, "mov r8, rdi"], [57, "mov rdi, rax"], [58, "call sub_448A06"], [59, "add rsp, 10h"], [60, "mov rax, [rbp+var_28]"], [61, "mov dword ptr [rax], 2"], [62, "nop"], [63, "leave"], [64, "retn"]], "data_dep": [[9, 3], [10, 9], [11, 10], [12, 11], [14, 5], [15, 4], [16, 3], [17, 13], [19, 16], [21, 3], [22, 21], [23, 4], [24, 23], [24, 22], [25, 24], [26, 3], [27, 22], [27, 26], [28, 27], [29, 28], [30, 6], [31, 22], [31, 30], [32, 31], [33, 25], [34, 33], [34, 32], [35, 34], [36, 25], [37, 36], [37, 32], [40, 37], [40, 39], [41, 40], [42, 41], [42, 7], [43, 42], [44, 3], [45, 22], [45, 44], [46, 45], [46, 40], [47, 46], [48, 8], [49, 6], [50, 5], [51, 4], [52, 3], [53, 2], [54, 25], [56, 48], [57, 52], [59, 53], [60, 3], [61, 60], [64, 27], [64, 60]]}
| {"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/2628714fc89bbd06927f17c35c7cc10c3c4f3a82276ea56c58894e172e8f25b3_2628714fc89bbd06927f17c35c7cc10c3c4f3a82276ea56c58894e172e8f25b3.jsonl.gz", "strip_func_name": "sub_446A8E", "query": "\n\n\nunsigned int *__fastcall sub_446A8E(unsigned int *a1, __int64 a2, __int64 a3, __int64 a4, unsigned __int64 a5, int a6, __int64 a7, __int64 a8)\n{\nunsigned int *result; // rax\nunsigned __int64 v9; // rax\nint v13; // [rsp+18h] [rbp-38h]\nunsigned __int64 v14; // [rsp+40h] [rbp-10h]\nunsigned __int64 v15; // [rsp+48h] [rbp-8h]\n\nv13 = a3;\nif ( !*a1 )\n{\nsub_446A0E((__int64)a1, a2, a3, a7, a8);\n*a1 = 1;\n}\nv15 = *(_QWORD *)(a2 + 16);\nresult = (unsigned int *)*a1;\nif ( (unsigned int)result <= 1 )\n{\nv14 = *(_QWORD *)(a4 + 8);\nif ( v15 <= v14 )\nv9 = 0LL;\nelse\nv9 = v15 - v14;\nif ( v9 < a5 || v9 > *((_QWORD *)a1 + 3) )\nsub_448A06((_DWORD)a1, a2, v13, a4, a6, a7, a8);\nresult = a1;\n*a1 = 2;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,a7,a8,v14,v15,sub_446A8E,sub_446A0E,sub_448A06,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'text_trace', 'a4': 'alignment', 'a1': 'match_scaffold', 'a2': 'pattern', 'a5': 'global_min_identity', 'a6': 'matching_min_length', 'a7': 'matches', 'a8': 'mm_allocator', 'v14': 'match_distance_min_bound', 'v15': 'key_length', 'sub_446A8E': 'match_scaffold_adaptive', 'sub_446A0E': 'match_scaffold_region_chain', 'sub_448A06': 'match_scaffold_levenshtein'}"} |
|
destroy_queue | b966b6a0f98e2bb041caa7d7d60fcbc0a72a6bdc6378cc14f28644e8e2e82b2a | shellphish | driller-afl | NA | static void destroy_queue(void) {
struct queue_entry *q = queue, *n;
while (q) {
n = q->next;
ck_free(q->fname);
ck_free(q->trace_mini);
ck_free(q);
q = n;
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4048E2", "function_addr": 4212962, "binary_name": "b966b6a0f98e2bb041caa7d7d60fcbc0a72a6bdc6378cc14f28644e8e2e82b2a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov rax, cs:qword_485A78"], [4, "mov [rbp+var_8], rax"], [5, "jmp short loc_404936"], [6, "mov rax, [rbp+var_8]"], [7, "mov rax, [rax+48h]"], [8, "mov [rbp+var_10], rax"], [9, "mov rax, [rbp+var_8]"], [10, "mov rax, [rax]"], [11, "mov rdi, rax"], [12, "call sub_402826"], [13, "mov rax, [rbp+var_8]"], [14, "mov rax, [rax+38h]"], [15, "mov rdi, rax"], [16, "call sub_402826"], [17, "mov rax, [rbp+var_8]"], [18, "mov rdi, rax"], [19, "call sub_402826"], [20, "mov rax, [rbp+var_10]"], [21, "mov [rbp+var_8], rax"], [22, "cmp [rbp+var_8], 0"], [23, "jnz short loc_4048F7"], [24, "nop"], [25, "nop"], [26, "leave"], [27, "retn"]], "data_dep": [[4, 3], [6, 21], [6, 4], [7, 6], [8, 7], [9, 4], [9, 21], [10, 9], [11, 10], [13, 4], [13, 21], [14, 13], [15, 14], [17, 21], [17, 4], [18, 17], [20, 8], [21, 20], [22, 4], [22, 21], [23, 22], [27, 3], [27, 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/b966b6a0f98e2bb041caa7d7d60fcbc0a72a6bdc6378cc14f28644e8e2e82b2a_b966b6a0f98e2bb041caa7d7d60fcbc0a72a6bdc6378cc14f28644e8e2e82b2a.jsonl.gz", "strip_func_name": "sub_4048E2", "query": "\n\n\n__int64 sub_4048E2()\n{\n__int64 result; // rax\n__int64 *v1; // [rsp+0h] [rbp-10h]\n__int64 *i; // [rsp+8h] [rbp-8h]\n\nresult = qword_485A78;\nfor ( i = (__int64 *)qword_485A78; i; i = v1 )\n{\nv1 = (__int64 *)i[9];\nsub_402826(*i);\nsub_402826(i[7]);\nsub_402826((__int64)i);\nresult = (__int64)v1;\n}\nreturn result;\n}\n\n\n\nQ:[v1,i,sub_4048E2,sub_402826,]\nAssistant: ", "hints": "[]", "response": "{'v1': 'n', 'i': 'q', 'sub_4048E2': 'destroy_queue', 'sub_402826': 'DFL_ck_free'}"} |
|
rc_init | db49f6adc33ec49c5f5c7b6a510c7877a61cedd0e425ecfe219cc51fff56f4c8 | HariboteOS | tolsrc | NA | void rc_init(struct RC *rc, UCHAR *p)
{
rc->p = p;
rc->code = 0;
rc->range = 0xffffffff;
rc->ffnum = 0;
rc->cache = 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_414362", "function_addr": 4277090, "binary_name": "db49f6adc33ec49c5f5c7b6a510c7877a61cedd0e425ecfe219cc51fff56f4c8.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov [rbp+var_10], rsi"], [4, "mov rax, [rbp+var_8]"], [5, "mov rdx, [rbp+var_10]"], [6, "mov [rax], rdx"], [7, "mov rax, [rbp+var_8]"], [8, "mov qword ptr [rax+18h], 0"], [9, "mov rax, [rbp+var_8]"], [10, "mov dword ptr [rax+8], 0FFFFFFFFh"], [11, "mov rax, [rbp+var_8]"], [12, "mov dword ptr [rax+10h], 0"], [13, "mov rax, [rbp+var_8]"], [14, "mov dword ptr [rax+0Ch], 0"], [15, "nop"], [16, "pop rbp"], [17, "retn"]], "data_dep": [[4, 2], [5, 3], [6, 5], [6, 4], [7, 2], [8, 7], [9, 2], [10, 9], [11, 2], [12, 11], [13, 2], [14, 13], [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/db49f6adc33ec49c5f5c7b6a510c7877a61cedd0e425ecfe219cc51fff56f4c8_db49f6adc33ec49c5f5c7b6a510c7877a61cedd0e425ecfe219cc51fff56f4c8.jsonl.gz", "strip_func_name": "sub_414362", "query": "\n\n\n__int64 __fastcall sub_414362(__int64 a1, __int64 a2)\n{\n__int64 result; // rax\n\n*(_QWORD *)a1 = a2;\n*(_QWORD *)(a1 + 24) = 0LL;\n*(_DWORD *)(a1 + 8) = -1;\n*(_DWORD *)(a1 + 16) = 0;\nresult = a1;\n*(_DWORD *)(a1 + 12) = 0;\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_414362,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'rc', 'a2': 'p', 'sub_414362': 'rc_init'}"} |
|
CalculateVhdFooterChecksum | 9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23 | open-simh | simh | NA | static uint32
CalculateVhdFooterChecksum(void *data,
size_t size)
{
uint32 sum = 0;
uint8 *c = (uint8 *)data;
while (size--)
sum += *c++;
return ~sum;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4ADEB9", "function_addr": 4906681, "binary_name": "9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov [rbp+var_20], rsi"], [4, "mov [rbp+var_4], 0"], [5, "mov rax, [rbp+var_18]"], [6, "mov [rbp+var_10], rax"], [7, "jmp short loc_4ADEEB"], [8, "mov rax, [rbp+var_10]"], [9, "lea rdx, [rax+1]"], [10, "mov [rbp+var_10], rdx"], [11, "movzx eax, byte ptr [rax]"], [12, "movzx eax, al"], [13, "add [rbp+var_4], eax"], [14, "mov rax, [rbp+var_20]"], [15, "lea rdx, [rax-1]"], [16, "mov [rbp+var_20], rdx"], [17, "test rax, rax"], [18, "jnz short loc_4ADED6"], [19, "mov eax, [rbp+var_4]"], [20, "not eax"], [21, "pop rbp"], [22, "retn"]], "data_dep": [[5, 2], [6, 5], [8, 6], [8, 10], [9, 8], [9, 15], [10, 9], [11, 8], [12, 11], [13, 4], [13, 13], [13, 12], [14, 16], [14, 3], [15, 14], [15, 9], [16, 15], [17, 14], [18, 17], [19, 4], [19, 13], [20, 19], [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/9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23_9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23.jsonl.gz", "strip_func_name": "sub_4ADEB9", "query": "\n\n\n__int64 __fastcall sub_4ADEB9(unsigned __int8 *a1, __int64 a2)\n{\nunsigned __int8 *v2; // rax\nint i; // [rsp+1Ch] [rbp-4h]\n\nfor ( i = 0; a2--; i += *v2 )\nv2 = a1++;\nreturn (unsigned int)~i;\n}\n\n\n\nQ:[a1,a2,i,sub_4ADEB9,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'data', 'a2': 'size', 'i': 'sum', 'sub_4ADEB9': 'CalculateVhdFooterChecksum'}"} |
|
pj_strncpy_escape | a55437195f8ae7fcbc9fcbc7c4ce7ea2903742f0fcbd5868b140c66600d2ad6c | AonCyberLabs | D-Modem | NA | PJ_DEF(pj_str_t*) pj_strncpy_escape(pj_str_t *dst_str,
const pj_str_t *src_str,
pj_ssize_t max, const pj_cis_t *unres)
{
dst_str->slen = pj_strncpy2_escape(dst_str->ptr, src_str, max, unres);
return dst_str->slen < 0 ? NULL : dst_str;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_478098", "function_addr": 4685976, "binary_name": "a55437195f8ae7fcbc9fcbc7c4ce7ea2903742f0fcbd5868b140c66600d2ad6c.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_20], rcx"], [7, "mov rax, [rbp+var_8]"], [8, "mov rax, [rax]"], [9, "mov rcx, [rbp+var_20]"], [10, "mov rdx, [rbp+var_18]"], [11, "mov rsi, [rbp+var_10]"], [12, "mov rdi, rax"], [13, "call sub_477F78"], [14, "mov rdx, [rbp+var_8]"], [15, "mov [rdx+8], rax"], [16, "mov rax, [rbp+var_8]"], [17, "mov rax, [rax+8]"], [18, "test rax, rax"], [19, "js short loc_4780E6"], [20, "mov rax, [rbp+var_8]"], [21, "jmp short locret_4780EB"], [22, "mov eax, 0"], [23, "leave"], [24, "retn"]], "data_dep": [[7, 3], [8, 7], [9, 6], [10, 5], [11, 4], [12, 8], [14, 3], [15, 14], [15, 13], [16, 3], [17, 16], [17, 15], [18, 17], [19, 18], [20, 3], [24, 20], [24, 22]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/a55437195f8ae7fcbc9fcbc7c4ce7ea2903742f0fcbd5868b140c66600d2ad6c_a55437195f8ae7fcbc9fcbc7c4ce7ea2903742f0fcbd5868b140c66600d2ad6c.jsonl.gz", "strip_func_name": "sub_478098", "query": "\n\n\nunsigned __int64 *__fastcall sub_478098(unsigned __int64 *a1, __int64 a2, __int64 a3, __int64 a4)\n{\nunsigned __int64 *result; // rax\n\na1[1] = sub_477F78(*a1, a2, a3, a4);\nif ( (a1[1] & 0x8000000000000000LL) != 0LL )\nresult = 0LL;\nelse\nresult = a1;\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,sub_478098,sub_477F78,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'max', 'a4': 'unres', 'a1': 'dst_str', 'a2': 'src_str', 'sub_478098': 'pj_strncpy_escape', 'sub_477F78': 'pj_strncpy2_escape'}"} |
|
tunnel_key_parse_tos_ttl | 5c2a369c2a43bfe06e48866e92fbdc8c356c46190477983799d2e15f105ed3e0 | multipath-tcp | iproute-mptcp | NA | static int tunnel_key_parse_tos_ttl(char *str, int type, struct nlmsghdr *n)
{
int ret;
__u8 val;
ret = get_u8(&val, str, 10);
if (ret)
ret = get_u8(&val, str, 16);
if (ret)
return -1;
addattr8(n, MAX_MSG, type, val);
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_44692B", "function_addr": 4483371, "binary_name": "5c2a369c2a43bfe06e48866e92fbdc8c356c46190477983799d2e15f105ed3e0.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_1C], esi"], [5, "mov [rbp+var_28], rdx"], [6, "mov rcx, [rbp+var_18]"], [7, "lea rax, [rbp+var_5]"], [8, "mov edx, 0Ah"], [9, "mov rsi, rcx"], [10, "mov rdi, rax"], [11, "call get_u8"], [12, "mov [rbp+var_4], eax"], [13, "cmp [rbp+var_4], 0"], [14, "jz short loc_44697A"], [15, "mov rcx, [rbp+var_18]"], [16, "lea rax, [rbp+var_5]"], [17, "mov edx, 10h"], [18, "mov rsi, rcx"], [19, "mov rdi, rax"], [20, "call get_u8"], [21, "mov [rbp+var_4], eax"], [22, "cmp [rbp+var_4], 0"], [23, "jz short loc_446987"], [24, "mov eax, 0FFFFFFFFh"], [25, "jmp short locret_4469A7"], [26, "movzx eax, [rbp+var_5]"], [27, "movzx ecx, al"], [28, "mov edx, [rbp+var_1C]"], [29, "mov rax, [rbp+var_28]"], [30, "mov esi, 4000h"], [31, "mov rdi, rax"], [32, "call addattr8"], [33, "mov eax, 0"], [34, "leave"], [35, "retn"]], "data_dep": [[6, 3], [9, 6], [10, 7], [12, 11], [13, 12], [14, 13], [15, 3], [16, 11], [18, 15], [19, 16], [21, 20], [22, 12], [22, 21], [23, 22], [27, 26], [28, 4], [29, 5], [31, 29], [35, 33], [35, 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/5c2a369c2a43bfe06e48866e92fbdc8c356c46190477983799d2e15f105ed3e0_5c2a369c2a43bfe06e48866e92fbdc8c356c46190477983799d2e15f105ed3e0.jsonl.gz", "strip_func_name": "sub_44692B", "query": "\n\n\n__int64 __fastcall sub_44692B(__int64 a1, unsigned int a2, __int64 a3)\n{\nunsigned __int8 v5; // [rsp+2Bh] [rbp-5h] BYREF\nint v6; // [rsp+2Ch] [rbp-4h]\n\nv6 = get_u8(&v5, a1, 10LL);\nif ( v6 )\nv6 = get_u8(&v5, a1, 16LL);\nif ( v6 )\nreturn 0xFFFFFFFFLL;\naddattr8(a3, 0x4000LL, a2, v5);\nreturn 0LL;\n}\n\n\n\nQ:[a3,a1,a2,v5,sub_44692B,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'n', 'a1': 'str', 'a2': 'type', 'v5': 'val', 'sub_44692B': 'tunnel_key_parse_tos_ttl'}"} |
|
addattr32 | 86b5f363f89ca8502d79c2aa1d0254afc58ba4e5bb591d513bb30415ee6274e0 | multipath-tcp | iproute-mptcp | NA | int addattr32(struct nlmsghdr *n, int maxlen, int type, __u32 data)
{
return addattr_l(n, maxlen, type, &data, sizeof(__u32));
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_416449", "function_addr": 4285513, "binary_name": "86b5f363f89ca8502d79c2aa1d0254afc58ba4e5bb591d513bb30415ee6274e0.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_10], edx"], [6, "mov [rbp+var_14], ecx"], [7, "lea rcx, [rbp+var_14]"], [8, "mov edx, [rbp+var_10]"], [9, "mov esi, [rbp+var_C]"], [10, "mov rax, [rbp+var_8]"], [11, "mov r8d, 4"], [12, "mov rdi, rax"], [13, "call sub_4164F2"], [14, "leave"], [15, "retn"]], "data_dep": [[7, 6], [8, 5], [9, 4], [10, 3], [12, 10], [15, 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/86b5f363f89ca8502d79c2aa1d0254afc58ba4e5bb591d513bb30415ee6274e0_86b5f363f89ca8502d79c2aa1d0254afc58ba4e5bb591d513bb30415ee6274e0.jsonl.gz", "strip_func_name": "sub_416449", "query": "\n\n\n__int64 __fastcall sub_416449(__int64 a1, unsigned int a2, unsigned int a3, int a4)\n{\nint v5[3]; // [rsp+Ch] [rbp-14h] BYREF\n__int64 v6; // [rsp+18h] [rbp-8h]\n\nv6 = a1;\nv5[2] = a2;\nv5[1] = a3;\nv5[0] = a4;\nreturn sub_4164F2(a1, a2, a3, v5, 4LL);\n}\n\n\n\nQ:[a3,a4,a1,a2,v5,v6,sub_416449,sub_4164F2,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'type', 'a4': 'data', 'a1': 'n', 'a2': 'maxlen', 'v5': 'dataa', 'v6': 'na', 'sub_416449': 'addattr32', 'sub_4164F2': 'addattr_l'}"} |
|
nl_print_policy | 86b5f363f89ca8502d79c2aa1d0254afc58ba4e5bb591d513bb30415ee6274e0 | multipath-tcp | iproute-mptcp | NA | void nl_print_policy(const struct rtattr *attr, FILE *fp)
{
const struct rtattr *pos;
rtattr_for_each_nested(pos, attr) {
const struct rtattr *attr;
fprintf(fp, " policy[%u]:", pos->rta_type & ~NLA_F_NESTED);
rtattr_for_each_nested(attr, pos) {
struct rtattr *tp[NL_POLICY_TYPE_ATTR_MAX + 1];
parse_rtattr_nested(tp, ARRAY_SIZE(tp) - 1, attr);
if (tp[NL_POLICY_TYPE_ATTR_TYPE])
fprintf(fp, "attr[%u]: type=%s",
attr->rta_type & ~NLA_F_NESTED,
get_nla_type_str(rta_getattr_u32(tp[NL_POLICY_TYPE_ATTR_TYPE])));
if (tp[NL_POLICY_TYPE_ATTR_POLICY_IDX])
fprintf(fp, " policy:%u",
rta_getattr_u32(tp[NL_POLICY_TYPE_ATTR_POLICY_IDX]));
if (tp[NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE])
fprintf(fp, " maxattr:%u",
rta_getattr_u32(tp[NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE]));
if (tp[NL_POLICY_TYPE_ATTR_MIN_VALUE_S] && tp[NL_POLICY_TYPE_ATTR_MAX_VALUE_S])
fprintf(fp, " range:[%lld,%lld]",
(signed long long)rta_getattr_u64(tp[NL_POLICY_TYPE_ATTR_MIN_VALUE_S]),
(signed long long)rta_getattr_u64(tp[NL_POLICY_TYPE_ATTR_MAX_VALUE_S]));
if (tp[NL_POLICY_TYPE_ATTR_MIN_VALUE_U] && tp[NL_POLICY_TYPE_ATTR_MAX_VALUE_U])
fprintf(fp, " range:[%llu,%llu]",
(unsigned long long)rta_getattr_u64(tp[NL_POLICY_TYPE_ATTR_MIN_VALUE_U]),
(unsigned long long)rta_getattr_u64(tp[NL_POLICY_TYPE_ATTR_MAX_VALUE_U]));
if (tp[NL_POLICY_TYPE_ATTR_MIN_LENGTH])
fprintf(fp, " min len:%u",
rta_getattr_u32(tp[NL_POLICY_TYPE_ATTR_MIN_LENGTH]));
if (tp[NL_POLICY_TYPE_ATTR_MAX_LENGTH])
fprintf(fp, " max len:%u",
rta_getattr_u32(tp[NL_POLICY_TYPE_ATTR_MAX_LENGTH]));
}
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_416EDB", "function_addr": 4288219, "binary_name": "86b5f363f89ca8502d79c2aa1d0254afc58ba4e5bb591d513bb30415ee6274e0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 98h"], [4, "mov [rbp+var_98], rdi"], [5, "mov [rbp+stream], rsi"], [6, "mov rax, [rbp+var_98]"], [7, "add rax, 4"], [8, "mov [rbp+var_18], rax"], [9, "jmp loc_4171BC"], [10, "mov rax, [rbp+var_18]"], [11, "movzx eax, word ptr [rax+2]"], [12, "movzx eax, ax"], [13, "and ah, 7Fh"], [14, "mov edx, eax"], [15, "mov rax, [rbp+stream]"], [16, "lea rsi, aPolicyU"], [17, "mov rdi, rax"], [18, "mov eax, 0"], [19, "call _fprintf"], [20, "mov rax, [rbp+var_18]"], [21, "add rax, 4"], [22, "mov [rbp+var_20], rax"], [23, "jmp loc_417140"], [24, "mov rax, [rbp+var_20]"], [25, "movzx eax, word ptr [rax]"], [26, "movzx eax, ax"], [27, "sub eax, 4"], [28, "mov ecx, eax"], [29, "mov rax, [rbp+var_20]"], [30, "lea rdx, [rax+4]"], [31, "lea rax, [rbp+var_90]"], [32, "mov r8d, 8000h"], [33, "mov esi, 0Ch"], [34, "mov rdi, rax"], [35, "call sub_416B71"], [36, "mov rax, [rbp+var_88]"], [37, "test rax, rax"], [38, "jz short loc_416FC6"], [39, "mov rax, [rbp+var_88]"], [40, "mov rdi, rax"], [41, "call sub_413566"], [42, "mov edi, eax"], [43, "call sub_416E14"], [44, "mov rcx, rax"], [45, "mov rax, [rbp+var_20]"], [46, "movzx eax, word ptr [rax+2]"], [47, "movzx eax, ax"], [48, "and ah, 7Fh"], [49, "mov edx, eax"], [50, "mov rax, [rbp+stream]"], [51, "lea rsi, aAttrUTypeS"], [52, "mov rdi, rax"], [53, "mov eax, 0"], [54, "call _fprintf"], [55, "mov rax, [rbp+var_50]"], [56, "test rax, rax"], [57, "jz short loc_416FF8"], [58, "mov rax, [rbp+var_50]"], [59, "mov rdi, rax"], [60, "call sub_413566"], [61, "mov edx, eax"], [62, "mov rax, [rbp+stream]"], [63, "lea rsi, aPolicyU_0"], [64, "mov rdi, rax"], [65, "mov eax, 0"], [66, "call _fprintf"], [67, "mov rax, [rbp+var_48]"], [68, "test rax, rax"], [69, "jz short loc_41702A"], [70, "mov rax, [rbp+var_48]"], [71, "mov rdi, rax"], [72, "call sub_413566"], [73, "mov edx, eax"], [74, "mov rax, [rbp+stream]"], [75, "lea rsi, aMaxattrU"], [76, "mov rdi, rax"], [77, "mov eax, 0"], [78, "call _fprintf"], [79, "mov rax, [rbp+var_80]"], [80, "test rax, rax"], [81, "jz short loc_417078"], [82, "mov rax, [rbp+var_78]"], [83, "test rax, rax"], [84, "jz short loc_417078"], [85, "mov rax, [rbp+var_78]"], [86, "mov rdi, rax"], [87, "call sub_413577"], [88, "mov rbx, rax"], [89, "mov rax, [rbp+var_80]"], [90, "mov rdi, rax"], [91, "call sub_413577"], [92, "mov rdx, rax"], [93, "mov rax, [rbp+stream]"], [94, "mov rcx, rbx"], [95, "lea rsi, aRangeLldLld"], [96, "mov rdi, rax"], [97, "mov eax, 0"], [98, "call _fprintf"], [99, "mov rax, [rbp+var_70]"], [100, "test rax, rax"], [101, "jz short loc_4170C6"], [102, "mov rax, [rbp+var_68]"], [103, "test rax, rax"], [104, "jz short loc_4170C6"], [105, "mov rax, [rbp+var_68]"], [106, "mov rdi, rax"], [107, "call sub_413577"], [108, "mov rbx, rax"], [109, "mov rax, [rbp+var_70]"], [110, "mov rdi, rax"], [111, "call sub_413577"], [112, "mov rdx, rax"], [113, "mov rax, [rbp+stream]"], [114, "mov rcx, rbx"], [115, "lea rsi, aRangeLluLlu"], [116, "mov rdi, rax"], [117, "mov eax, 0"], [118, "call _fprintf"], [119, "mov rax, [rbp+var_60]"], [120, "test rax, rax"], [121, "jz short loc_4170F8"], [122, "mov rax, [rbp+var_60]"], [123, "mov rdi, rax"], [124, "call sub_413566"], [125, "mov edx, eax"], [126, "mov rax, [rbp+stream]"], [127, "lea rsi, aMinLenU"], [128, "mov rdi, rax"], [129, "mov eax, 0"], [130, "call _fprintf"], [131, "mov rax, [rbp+var_58]"], [132, "test rax, rax"], [133, "jz short loc_41712A"], [134, "mov rax, [rbp+var_58]"], [135, "mov rdi, rax"], [136, "call sub_413566"], [137, "mov edx, eax"], [138, "mov rax, [rbp+stream]"], [139, "lea rsi, aMaxLenU"], [140, "mov rdi, rax"], [141, "mov eax, 0"], [142, "call _fprintf"], [143, "mov rax, [rbp+var_20]"], [144, "movzx eax, word ptr [rax]"], [145, "movzx eax, ax"], [146, "add eax, 3"], [147, "mov eax, eax"], [148, "and eax, 0FFFFFFFCh"], [149, "add [rbp+var_20], rax"], [150, "mov rax, [rbp+var_18]"], [151, "movzx eax, word ptr [rax]"], [152, "movzx eax, ax"], [153, "mov rdx, [rbp+var_18]"], [154, "lea rcx, [rdx+4]"], [155, "mov rdx, [rbp+var_20]"], [156, "sub rdx, rcx"], [157, "sub rax, rdx"], [158, "sub rax, 4"], [159, "cmp rax, 3"], [160, "jbe short loc_4171A6"], [161, "mov rax, [rbp+var_20]"], [162, "movzx eax, word ptr [rax]"], [163, "cmp ax, 3"], [164, "jbe short loc_4171A6"], [165, "mov rax, [rbp+var_20]"], [166, "movzx eax, word ptr [rax]"], [167, "movzx edx, ax"], [168, "mov rax, [rbp+var_18]"], [169, "movzx eax, word ptr [rax]"], [170, "movzx eax, ax"], [171, "mov rcx, [rbp+var_18]"], [172, "lea rsi, [rcx+4]"], [173, "mov rcx, [rbp+var_20]"], [174, "sub rcx, rsi"], [175, "sub rax, rcx"], [176, "sub rax, 4"], [177, "cmp rdx, rax"], [178, "jbe loc_416F45"], [179, "mov rax, [rbp+var_18]"], [180, "movzx eax, word ptr [rax]"], [181, "movzx eax, ax"], [182, "add eax, 3"], [183, "mov eax, eax"], [184, "and eax, 0FFFFFFFCh"], [185, "add [rbp+var_18], rax"], [186, "mov rax, [rbp+var_98]"], [187, "movzx eax, word ptr [rax]"], [188, "movzx eax, ax"], [189, "mov rdx, [rbp+var_98]"], [190, "lea rcx, [rdx+4]"], [191, "mov rdx, [rbp+var_18]"], [192, "sub rdx, rcx"], [193, "sub rax, rdx"], [194, "sub rax, 4"], [195, "cmp rax, 3"], [196, "jbe short loc_41722E"], [197, "mov rax, [rbp+var_18]"], [198, "movzx eax, word ptr [rax]"], [199, "cmp ax, 3"], [200, "jbe short loc_41722E"], [201, "mov rax, [rbp+var_18]"], [202, "movzx eax, word ptr [rax]"], [203, "movzx edx, ax"], [204, "mov rax, [rbp+var_98]"], [205, "movzx eax, word ptr [rax]"], [206, "movzx eax, ax"], [207, "mov rcx, [rbp+var_98]"], [208, "lea rsi, [rcx+4]"], [209, "mov rcx, [rbp+var_18]"], [210, "sub rcx, rsi"], [211, "sub rax, rcx"], [212, "sub rax, 4"], [213, "cmp rdx, rax"], [214, "jbe loc_416F09"], [215, "nop"], [216, "mov rbx, [rbp+var_8]"], [217, "leave"], [218, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 7], [10, 8], [10, 185], [11, 10], [12, 11], [13, 12], [14, 13], [15, 5], [16, 208], [17, 15], [20, 8], [20, 185], [21, 20], [22, 21], [24, 149], [24, 22], [25, 24], [26, 25], [27, 26], [28, 27], [29, 22], [29, 149], [30, 29], [30, 167], [31, 29], [34, 31], [37, 36], [38, 37], [40, 39], [42, 41], [44, 43], [45, 149], [45, 22], [46, 45], [47, 46], [48, 47], [49, 48], [50, 5], [51, 33], [52, 50], [56, 55], [57, 56], [59, 58], [61, 60], [62, 5], [63, 33], [63, 51], [64, 62], [68, 67], [69, 68], [71, 70], [73, 72], [74, 5], [75, 51], [75, 63], [75, 33], [76, 74], [80, 79], [81, 80], [83, 82], [84, 83], [86, 85], [88, 87], [90, 89], [92, 91], [93, 5], [94, 88], [95, 75], [95, 63], [95, 33], [95, 51], [96, 93], [100, 99], [101, 100], [103, 102], [104, 103], [106, 105], [108, 107], [110, 109], [112, 111], [113, 5], [114, 108], [115, 75], [115, 63], [115, 95], [115, 33], [115, 51], [116, 113], [120, 119], [121, 120], [123, 122], [125, 124], [126, 5], [127, 63], [127, 95], [127, 33], [127, 51], [127, 115], [127, 75], [128, 126], [132, 131], [133, 132], [135, 134], [137, 136], [138, 5], [139, 75], [139, 95], [139, 63], [139, 127], [139, 33], [139, 51], [139, 115], [140, 138], [143, 149], [143, 22], [144, 143], [145, 144], [146, 145], [147, 146], [148, 147], [149, 149], [149, 148], [149, 22], [150, 8], [150, 185], [151, 150], [152, 151], [153, 185], [153, 8], [154, 44], [154, 28], [154, 94], [154, 114], [154, 153], [154, 210], [155, 149], [155, 22], [156, 154], [156, 155], [157, 152], [157, 156], [158, 157], [159, 158], [160, 159], [161, 22], [161, 149], [162, 161], [163, 162], [164, 163], [165, 149], [165, 22], [166, 165], [167, 166], [168, 8], [168, 185], [169, 168], [170, 169], [171, 8], [171, 185], [172, 75], [172, 139], [172, 95], [172, 63], [172, 127], [172, 33], [172, 51], [172, 115], [172, 16], [172, 171], [173, 149], [173, 22], [174, 173], [174, 172], [175, 170], [175, 174], [176, 175], [177, 167], [177, 176], [178, 177], [179, 185], [179, 8], [180, 179], [181, 180], [182, 181], [183, 182], [184, 183], [185, 8], [185, 184], [185, 185], [186, 4], [187, 186], [188, 187], [189, 4], [190, 174], [190, 189], [190, 154], [191, 8], [191, 185], [192, 191], [192, 190], [193, 188], [193, 192], [194, 193], [195, 194], [196, 195], [197, 8], [197, 185], [198, 197], [199, 198], [200, 199], [201, 8], [201, 185], [202, 201], [203, 202], [204, 4], [205, 204], [206, 205], [207, 4], [208, 16], [208, 75], [208, 139], [208, 95], [208, 207], [208, 63], [208, 127], [208, 33], [208, 51], [208, 115], [208, 172], [209, 8], [209, 185], [210, 209], [210, 208], [211, 206], [211, 210], [212, 211], [213, 203], [213, 212], [214, 213], [218, 194], [218, 212], [218, 198]]}
| {"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/86b5f363f89ca8502d79c2aa1d0254afc58ba4e5bb591d513bb30415ee6274e0_86b5f363f89ca8502d79c2aa1d0254afc58ba4e5bb591d513bb30415ee6274e0.jsonl.gz", "strip_func_name": "sub_416EDB", "query": "\n\n\nunsigned __int64 __fastcall sub_416EDB(unsigned __int16 *a1, FILE *a2)\n{\nunsigned int v2; // eax\nint v3; // eax\nconst char *v4; // rcx\nunsigned int v5; // eax\nunsigned int v6; // eax\nunsigned int v7; // eax\n__int64 v8; // rbx\n__int64 v9; // rax\n__int64 v10; // rbx\n__int64 v11; // rax\nunsigned int v12; // eax\nunsigned int v13; // eax\nunsigned __int64 result; // rax\nchar v15[8]; // [rsp+10h] [rbp-90h] BYREF\n__int64 v16; // [rsp+18h] [rbp-88h]\n__int64 v17; // [rsp+20h] [rbp-80h]\n__int64 v18; // [rsp+28h] [rbp-78h]\n__int64 v19; // [rsp+30h] [rbp-70h]\n__int64 v20; // [rsp+38h] [rbp-68h]\n__int64 v21; // [rsp+40h] [rbp-60h]\n__int64 v22; // [rsp+48h] [rbp-58h]\n__int64 v23; // [rsp+50h] [rbp-50h]\n__int64 v24; // [rsp+58h] [rbp-48h]\nunsigned __int16 *j; // [rsp+80h] [rbp-20h]\nunsigned __int16 *i; // [rsp+88h] [rbp-18h]\n\nfor ( i = a1 + 2; ; i = (unsigned __int16 *)((char *)i + ((*i + 3) & 0xFFFFFFFC)) )\n{\nresult = *a1 - ((char *)i - (char *)a1);\nif ( result <= 3 )\nbreak;\nresult = *i;\nif ( (unsigned __int16)result <= 3u )\nbreak;\nresult = *a1 - ((char *)i - (char *)a1);\nif ( *i > result )\nbreak;\nv2 = i[1];\nBYTE1(v2) &= 0x7Fu;\nfprintf(a2, \" policy[%u]:\", v2);\nfor ( j = i + 2;\n(unsigned __int64)*i - ((char *)j - (char *)i) > 3\n&& *j > 3u\n&& *j <= (unsigned __int64)*i - ((char *)j - (char *)i);\nj = (unsigned __int16 *)((char *)j + ((*j + 3) & 0xFFFFFFFC)) )\n{\nsub_416B71(v15, 12, j + 2, *j - 4, 0x8000);\nif ( v16 )\n{\nv3 = sub_413566(v16);\nv4 = sub_416E14(v3);\nv5 = j[1];\nBYTE1(v5) &= 0x7Fu;\nfprintf(a2, \"attr[%u]: type=%s\", v5, v4);\n}\nif ( v23 )\n{\nv6 = sub_413566(v23);\nfprintf(a2, \" policy:%u\", v6);\n}\nif ( v24 )\n{\nv7 = sub_413566(v24);\nfprintf(a2, \" maxattr:%u\", v7);\n}\nif ( v17 && v18 )\n{\nv8 = sub_413577(v18);\nv9 = sub_413577(v17);\nfprintf(a2, \" range:[%lld,%lld]\", v9, v8);\n}\nif ( v19 && v20 )\n{\nv10 = sub_413577(v20);\nv11 = sub_413577(v19);\nfprintf(a2, \" range:[%llu,%llu]\", v11, v10);\n}\nif ( v21 )\n{\nv12 = sub_413566(v21);\nfprintf(a2, \" min len:%u\", v12);\n}\nif ( v22 )\n{\nv13 = sub_413566(v22);\nfprintf(a2, \" max len:%u\", v13);\n}\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v15,j,i,sub_416EDB,sub_416B71,sub_413566,sub_416E14,sub_413577,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'attr', 'a2': 'fp', 'v15': 'tp', 'j': 'attr_0', 'i': 'pos', 'sub_416EDB': 'nl_print_policy', 'sub_416B71': 'parse_rtattr_flags', 'sub_413566': 'rta_getattr_u32_0', 'sub_416E14': 'get_nla_type_str', 'sub_413577': 'rta_getattr_u64'}"} |
|
ZSTD_optLdm_maybeAddMatch | 8b08b318c3fe660afd20bcbc7296e952d69f907fc52f3fc291fb8235d178ba65 | dimkr | papaw | NA | static void ZSTD_optLdm_maybeAddMatch(ZSTD_match_t* matches, U32* nbMatches,
const ZSTD_optLdm_t* optLdm, U32 currPosInBlock)
{
U32 const posDiff = currPosInBlock - optLdm->startPosInBlock;
/* Note: ZSTD_match_t actually contains offCode and matchLength (before subtracting MINMATCH) */
U32 const candidateMatchLength = optLdm->endPosInBlock - optLdm->startPosInBlock - posDiff;
/* Ensure that current block position is not outside of the match */
if (currPosInBlock < optLdm->startPosInBlock
|| currPosInBlock >= optLdm->endPosInBlock
|| candidateMatchLength < MINMATCH) {
return;
}
if (*nbMatches == 0 || ((candidateMatchLength > matches[*nbMatches-1].len) && *nbMatches < ZSTD_OPT_NUM)) {
U32 const candidateOffCode = STORE_OFFSET(optLdm->offset);
DEBUGLOG(6, "ZSTD_optLdm_maybeAddMatch(): Adding ldm candidate match (offCode: %u matchLength %u) at block position=%u",
candidateOffCode, candidateMatchLength, currPosInBlock);
matches[*nbMatches].len = candidateMatchLength;
matches[*nbMatches].off = candidateOffCode;
(*nbMatches)++;
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4BA8CD", "function_addr": 4958413, "binary_name": "8b08b318c3fe660afd20bcbc7296e952d69f907fc52f3fc291fb8235d178ba65.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov [rbp+var_20], rsi"], [4, "mov [rbp+var_28], rdx"], [5, "mov [rbp+var_2C], ecx"], [6, "mov rax, [rbp+var_28]"], [7, "mov edx, [rax+28h]"], [8, "mov eax, [rbp+var_2C]"], [9, "sub eax, edx"], [10, "mov [rbp+var_4], eax"], [11, "mov rax, [rbp+var_28]"], [12, "mov edx, [rax+2Ch]"], [13, "mov rax, [rbp+var_28]"], [14, "mov ecx, [rax+28h]"], [15, "mov eax, edx"], [16, "sub eax, ecx"], [17, "sub eax, [rbp+var_4]"], [18, "mov [rbp+var_8], eax"], [19, "mov rax, [rbp+var_28]"], [20, "mov eax, [rax+28h]"], [21, "cmp [rbp+var_2C], eax"], [22, "jb loc_4BA9C1"], [23, "mov rax, [rbp+var_28]"], [24, "mov eax, [rax+2Ch]"], [25, "cmp [rbp+var_2C], eax"], [26, "jnb loc_4BA9C1"], [27, "cmp [rbp+var_8], 2"], [28, "jbe loc_4BA9C1"], [29, "mov rax, [rbp+var_20]"], [30, "mov eax, [rax]"], [31, "test eax, eax"], [32, "jz short loc_4BA96A"], [33, "mov rax, [rbp+var_20]"], [34, "mov eax, [rax]"], [35, "sub eax, 1"], [36, "mov eax, eax"], [37, "lea rdx, ds:0[rax*8]"], [38, "mov rax, [rbp+var_18]"], [39, "add rax, rdx"], [40, "mov eax, [rax+4]"], [41, "cmp [rbp+var_8], eax"], [42, "jbe short loc_4BA9C2"], [43, "mov rax, [rbp+var_20]"], [44, "mov eax, [rax]"], [45, "cmp eax, 0FFFh"], [46, "ja short loc_4BA9C2"], [47, "mov rax, [rbp+var_28]"], [48, "mov eax, [rax+30h]"], [49, "add eax, 2"], [50, "mov [rbp+var_C], eax"], [51, "mov rax, [rbp+var_20]"], [52, "mov eax, [rax]"], [53, "mov eax, eax"], [54, "lea rdx, ds:0[rax*8]"], [55, "mov rax, [rbp+var_18]"], [56, "add rdx, rax"], [57, "mov eax, [rbp+var_8]"], [58, "mov [rdx+4], eax"], [59, "mov rax, [rbp+var_20]"], [60, "mov eax, [rax]"], [61, "mov eax, eax"], [62, "lea rdx, ds:0[rax*8]"], [63, "mov rax, [rbp+var_18]"], [64, "add rdx, rax"], [65, "mov eax, [rbp+var_C]"], [66, "mov [rdx], eax"], [67, "mov rax, [rbp+var_20]"], [68, "mov eax, [rax]"], [69, "lea edx, [rax+1]"], [70, "mov rax, [rbp+var_20]"], [71, "mov [rax], edx"], [72, "jmp short loc_4BA9C2"], [73, "nop"], [74, "pop rbp"], [75, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 5], [9, 8], [9, 7], [10, 9], [11, 4], [12, 11], [13, 4], [14, 13], [15, 12], [16, 15], [16, 14], [17, 16], [17, 10], [18, 17], [19, 4], [20, 19], [21, 20], [21, 5], [22, 21], [23, 4], [24, 23], [25, 24], [25, 5], [26, 25], [27, 18], [28, 27], [29, 3], [30, 29], [31, 30], [32, 31], [33, 3], [34, 33], [35, 34], [36, 35], [37, 12], [38, 2], [39, 37], [39, 38], [40, 39], [41, 40], [41, 18], [42, 41], [43, 3], [44, 43], [45, 44], [46, 45], [47, 4], [48, 47], [49, 48], [50, 49], [51, 3], [52, 51], [53, 52], [54, 37], [54, 12], [55, 2], [56, 55], [56, 54], [57, 18], [58, 56], [58, 57], [59, 3], [60, 59], [60, 58], [61, 60], [62, 56], [63, 2], [64, 62], [64, 63], [65, 50], [66, 64], [66, 65], [67, 3], [68, 66], [68, 67], [69, 64], [69, 66], [69, 68], [70, 3], [71, 69], [71, 70], [74, 0], [75, 44], [75, 70], [75, 20], [75, 40], [75, 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/8b08b318c3fe660afd20bcbc7296e952d69f907fc52f3fc291fb8235d178ba65_8b08b318c3fe660afd20bcbc7296e952d69f907fc52f3fc291fb8235d178ba65.jsonl.gz", "strip_func_name": "sub_4BA8CD", "query": "\n\n\nunsigned __int64 __fastcall sub_4BA8CD(__int64 a1, _DWORD *a2, _DWORD *a3, unsigned int a4)\n{\nunsigned __int64 result; // rax\nint v5; // [rsp+20h] [rbp-Ch]\nunsigned int v6; // [rsp+24h] [rbp-8h]\n\nv6 = a3[11] - a3[10] - (a4 - a3[10]);\nresult = (unsigned int)a3[10];\nif ( a4 >= (unsigned int)result )\n{\nresult = (unsigned int)a3[11];\nif ( a4 < (unsigned int)result && v6 > 2 )\n{\nif ( !*a2\n|| (result = *(unsigned int *)(8LL * (unsigned int)(*a2 - 1) + a1 + 4), v6 > (unsigned int)result)\n&& (result = (unsigned int)*a2, (unsigned int)result <= 0xFFF) )\n{\nv5 = a3[12] + 2;\n*(_DWORD *)(a1 + 8LL * (unsigned int)*a2 + 4) = v6;\n*(_DWORD *)(a1 + 8LL * (unsigned int)*a2) = v5;\nresult = (unsigned __int64)a2;\n++*a2;\n}\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,v5,sub_4BA8CD,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'optLdm', 'a4': 'currPosInBlock', 'a1': 'matches', 'a2': 'nbMatches', 'v5': 'candidateOffCode', 'sub_4BA8CD': 'ZSTD_optLdm_maybeAddMatch'}"} |
|
ebt_iterate_matches | e043254bd7392c6f95a6927fa805784890febcf2d9b8dfccb4783ddfb9235a41 | freifunk-gluon | packages | NA | void ebt_iterate_matches(void (*f)(struct ebt_u_match *))
{
struct ebt_u_match *i;
for (i = ebt_matches; i; i = i->next)
f(i);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405FAB", "function_addr": 4218795, "binary_name": "e043254bd7392c6f95a6927fa805784890febcf2d9b8dfccb4783ddfb9235a41.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, cs:qword_416B28"], [5, "mov [rbp+var_8], rax"], [6, "jmp short loc_405FDD"], [7, "mov rax, [rbp+var_8]"], [8, "mov rdx, [rbp+var_18]"], [9, "mov rdi, rax"], [10, "call rdx"], [11, "mov rax, [rbp+var_8]"], [12, "mov rax, [rax+78h]"], [13, "mov [rbp+var_8], rax"], [14, "cmp [rbp+var_8], 0"], [15, "jnz short loc_405FC4"], [16, "nop"], [17, "nop"], [18, "leave"], [19, "retn"]], "data_dep": [[5, 4], [7, 13], [7, 5], [8, 3], [9, 7], [10, 8], [11, 13], [11, 5], [12, 11], [13, 12], [14, 13], [14, 5], [15, 14], [19, 4], [19, 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/e043254bd7392c6f95a6927fa805784890febcf2d9b8dfccb4783ddfb9235a41_e043254bd7392c6f95a6927fa805784890febcf2d9b8dfccb4783ddfb9235a41.jsonl.gz", "strip_func_name": "sub_405FAB", "query": "\n\n\n__int64 __fastcall sub_405FAB(void (__fastcall *a1)(__int64))\n{\n__int64 result; // rax\n__int64 i; // [rsp+18h] [rbp-8h]\n\nresult = qword_416B28;\nfor ( i = qword_416B28; i; i = result )\n{\na1(i);\nresult = *(_QWORD *)(i + 120);\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_405FAB,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'f', 'sub_405FAB': 'ebt_iterate_matches'}"} |
|
homeclusterline | 419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934 | neilbrown | mdadm | NA | void homeclusterline(char *line)
{
char *w;
for (w = dl_next(line); w != line; w = dl_next(w)) {
if (home_cluster == NULL) {
if (strcasecmp(w, "<none>") == 0)
home_cluster = xstrdup("");
else
home_cluster = xstrdup(w);
}
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40A63E", "function_addr": 4236862, "binary_name": "419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934.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, "sub rax, 10h"], [6, "mov rax, [rax+8]"], [7, "mov [rbp+s1], rax"], [8, "jmp short loc_40A6B3"], [9, "mov rax, cs:qword_4AC068"], [10, "test rax, rax"], [11, "jnz short loc_40A6A3"], [12, "mov rax, [rbp+s1]"], [13, "mov esi, offset aNone_1"], [14, "mov rdi, rax"], [15, "call _strcasecmp"], [16, "test eax, eax"], [17, "jnz short loc_40A690"], [18, "mov edi, offset unk_4867AD"], [19, "call sub_47E6F0"], [20, "mov cs:qword_4AC068, rax"], [21, "jmp short loc_40A6A3"], [22, "mov rax, [rbp+s1]"], [23, "mov rdi, rax"], [24, "call sub_47E6F0"], [25, "mov cs:qword_4AC068, rax"], [26, "mov rax, [rbp+s1]"], [27, "sub rax, 10h"], [28, "mov rax, [rax+8]"], [29, "mov [rbp+s1], rax"], [30, "mov rax, [rbp+s1]"], [31, "cmp rax, [rbp+var_18]"], [32, "jnz short loc_40A65C"], [33, "nop"], [34, "nop"], [35, "leave"], [36, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [9, 20], [9, 25], [10, 9], [11, 10], [12, 7], [12, 29], [14, 12], [16, 15], [17, 16], [20, 19], [22, 29], [22, 7], [23, 22], [25, 24], [26, 29], [26, 7], [27, 26], [28, 27], [29, 28], [30, 29], [30, 7], [31, 3], [31, 30], [32, 31], [36, 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/419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934_419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934.jsonl.gz", "strip_func_name": "sub_40A63E", "query": "\n\n\nchar *__fastcall sub_40A63E(char *a1)\n{\nchar *result; // rax\nchar *s1; // [rsp+18h] [rbp-8h]\n\nfor ( s1 = (char *)*((_QWORD *)a1 - 1); ; s1 = (char *)*((_QWORD *)s1 - 1) )\n{\nresult = s1;\nif ( s1 == a1 )\nbreak;\nif ( !qword_4AC068 )\n{\nif ( !strcasecmp(s1, \"<none>\") )\nqword_4AC068 = sub_47E6F0(&unk_4867AD);\nelse\nqword_4AC068 = sub_47E6F0(s1);\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,s1,sub_40A63E,sub_47E6F0,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'line', 's1': 'w', 'sub_40A63E': 'homeclusterline', 'sub_47E6F0': 'xstrdup'}"} |
|
vset_VT_CMP | 2ccf4a36144b806753b4d8b0bd5104a745650a2cbe28986470f69c09b2181958 | frida | tinycc | NA | ST_FUNC void vset_VT_CMP(int op)
{
vtop->r = VT_CMP;
vtop->cmp_op = op;
vtop->jfalse = 0;
vtop->jtrue = 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40DB83", "function_addr": 4250499, "binary_name": "2ccf4a36144b806753b4d8b0bd5104a745650a2cbe28986470f69c09b2181958.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_4], edi"], [3, "mov rax, cs:qword_44A440"], [4, "mov word ptr [rax+10h], 33h "], [5, "mov rax, cs:qword_44A440"], [6, "mov edx, [rbp+var_4]"], [7, "mov [rax+30h], dx"], [8, "mov rax, cs:qword_44A440"], [9, "mov dword ptr [rax+24h], 0"], [10, "mov rax, cs:qword_44A440"], [11, "mov dword ptr [rax+20h], 0"], [12, "nop"], [13, "pop rbp"], [14, "retn"]], "data_dep": [[4, 3], [6, 2], [7, 6], [7, 5], [9, 8], [11, 10], [13, 0], [14, 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/2ccf4a36144b806753b4d8b0bd5104a745650a2cbe28986470f69c09b2181958_2ccf4a36144b806753b4d8b0bd5104a745650a2cbe28986470f69c09b2181958.jsonl.gz", "strip_func_name": "sub_40DB83", "query": "\n\n\nvoid *__fastcall sub_40DB83(__int16 a1)\n{\nvoid *result; // rax\n\n*((_WORD *)qword_44A440 + 8) = 51;\n*((_WORD *)qword_44A440 + 24) = a1;\n*((_DWORD *)qword_44A440 + 9) = 0;\nresult = qword_44A440;\n*((_DWORD *)qword_44A440 + 8) = 0;\nreturn result;\n}\n\n\n\nQ:[a1,sub_40DB83,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'op', 'sub_40DB83': 'vset_VT_CMP'}"} |
|
pjsip_endpt_acquire_transport | 0dba2efb1fd115cd7387120e076fb705039c22af79b652ae5d8f057ceac37356 | asterisk | pjproject-archive | NA | PJ_DEF(pj_status_t) pjsip_endpt_acquire_transport(pjsip_endpoint *endpt,
pjsip_transport_type_e type,
const pj_sockaddr_t *remote,
int addr_len,
const pjsip_tpselector *sel,
pjsip_transport **transport)
{
return pjsip_tpmgr_acquire_transport(endpt->transport_mgr, type,
remote, addr_len, sel, transport);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_412312", "function_addr": 4268818, "binary_name": "0dba2efb1fd115cd7387120e076fb705039c22af79b652ae5d8f057ceac37356.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_C], esi"], [5, "mov [rbp+var_18], rdx"], [6, "mov [rbp+var_10], ecx"], [7, "mov [rbp+var_20], r8"], [8, "mov [rbp+var_28], r9"], [9, "mov rax, [rbp+var_8]"], [10, "mov rax, [rax+30h]"], [11, "mov r8, [rbp+var_28]"], [12, "mov rdi, [rbp+var_20]"], [13, "mov ecx, [rbp+var_10]"], [14, "mov rdx, [rbp+var_18]"], [15, "mov esi, [rbp+var_C]"], [16, "mov r9, r8"], [17, "mov r8, rdi"], [18, "mov rdi, rax"], [19, "call sub_41BA7A"], [20, "leave"], [21, "retn"]], "data_dep": [[9, 3], [10, 9], [11, 8], [12, 7], [13, 6], [14, 5], [15, 4], [16, 11], [17, 12], [18, 10], [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/0dba2efb1fd115cd7387120e076fb705039c22af79b652ae5d8f057ceac37356_0dba2efb1fd115cd7387120e076fb705039c22af79b652ae5d8f057ceac37356.jsonl.gz", "strip_func_name": "sub_412312", "query": "\n\n\n__int64 __fastcall sub_412312(__int64 a1, unsigned int a2, __int64 a3, unsigned int a4, __int64 a5, __int64 a6)\n{\nreturn sub_41BA7A(*(_QWORD *)(a1 + 48), a2, a3, a4, a5, a6);\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,sub_412312,sub_41BA7A,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'remote', 'a4': 'addr_len', 'a1': 'endpt', 'a2': 'type', 'a5': 'sel', 'a6': 'transport', 'sub_412312': 'pjsip_endpt_acquire_transport', 'sub_41BA7A': 'pjsip_tpmgr_acquire_transport'}"} |
|
duk_bw_insert_ensure_slice | 8637b53fba300d2bbda36edc905b4ce0ac17bbe93b75784d9e0ff8ef770869f2 | aliyun | haas-mini-program | NA | DUK_INTERNAL void duk_bw_insert_ensure_slice(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t dst_off, duk_size_t src_off, duk_size_t len) {
DUK_ASSERT(thr != NULL);
DUK_ASSERT(bw != NULL);
DUK_ASSERT(dst_off <= DUK_BW_GET_SIZE(thr, bw));
DUK_ASSERT(src_off <= DUK_BW_GET_SIZE(thr, bw));
DUK_ASSERT(len <= DUK_BW_GET_SIZE(thr, bw));
DUK_ASSERT(src_off + len <= DUK_BW_GET_SIZE(thr, bw));
/* Don't support "straddled" source now. */
DUK_ASSERT(dst_off <= src_off || dst_off >= src_off + len);
DUK_BW_ENSURE(thr, bw, len);
duk_bw_insert_raw_slice(thr, bw, dst_off, src_off, len);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_44C3A5", "function_addr": 4506533, "binary_name": "8637b53fba300d2bbda36edc905b4ce0ac17bbe93b75784d9e0ff8ef770869f2.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 rax, [rbp+var_38]"], [9, "mov [rbp+var_8], rax"], [10, "mov rax, [rbp+var_20]"], [11, "mov rdx, [rax+10h]"], [12, "mov rax, [rbp+var_20]"], [13, "mov rcx, [rax]"], [14, "mov rax, rdx"], [15, "sub rax, rcx"], [16, "mov [rbp+var_10], rax"], [17, "mov rax, [rbp+var_10]"], [18, "cmp rax, [rbp+var_8]"], [19, "jnb short loc_44C403"], [20, "mov rdx, [rbp+var_8]"], [21, "mov rcx, [rbp+var_20]"], [22, "mov rax, [rbp+var_18]"], [23, "mov rsi, rcx"], [24, "mov rdi, rax"], [25, "call sub_44BF55"], [26, "mov rdi, [rbp+var_38]"], [27, "mov rcx, [rbp+var_30]"], [28, "mov rdx, [rbp+var_28]"], [29, "mov rsi, [rbp+var_20]"], [30, "mov rax, [rbp+var_18]"], [31, "mov r8, rdi"], [32, "mov rdi, rax"], [33, "call sub_44C2B7"], [34, "nop"], [35, "leave"], [36, "retn"]], "data_dep": [[8, 7], [9, 8], [10, 4], [11, 10], [12, 4], [13, 12], [14, 11], [15, 14], [15, 13], [16, 15], [17, 16], [18, 17], [18, 9], [19, 18], [20, 9], [21, 4], [22, 3], [23, 21], [24, 22], [26, 7], [27, 6], [28, 5], [29, 4], [30, 3], [31, 26], [32, 30], [36, 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/8637b53fba300d2bbda36edc905b4ce0ac17bbe93b75784d9e0ff8ef770869f2_8637b53fba300d2bbda36edc905b4ce0ac17bbe93b75784d9e0ff8ef770869f2.jsonl.gz", "strip_func_name": "sub_44C3A5", "query": "\n\n\n_QWORD *__fastcall sub_44C3A5(__int64 a1, _QWORD *a2, size_t a3, size_t a4, size_t a5)\n{\nif ( a2[2] - *a2 < a5 )\nsub_44BF55(a1, a2, a5);\nreturn sub_44C2B7(a1, a2, a3, a4, a5);\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,sub_44C3A5,sub_44BF55,sub_44C2B7,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'dst_off', 'a4': 'src_off', 'a1': 'thr', 'a2': 'bw', 'a5': 'len', 'sub_44C3A5': 'duk_bw_insert_ensure_slice', 'sub_44BF55': 'duk_bw_resize', 'sub_44C2B7': 'duk_bw_insert_raw_slice'}"} |
|
ReceiveAndUnpackTarFile | fb857fb1dbafc823487379842430904c4c01132a07e605d0d5259ba02ec4da23 | greenplum-db | gpdb | NA | static void
ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum)
{
char current_path[MAXPGPATH];
char filename[MAXPGPATH];
char gp_tablespace_filename[MAXPGPATH] = {0};
const char *mapped_tblspc_path;
pgoff_t current_len_left = 0;
int current_padding = 0;
bool basetablespace;
char *copybuf = NULL;
FILE *file = NULL;
char log_directory_path[MAXPGPATH];
basetablespace = PQgetisnull(res, rownum, 0);
if (basetablespace)
strlcpy(current_path, basedir, sizeof(current_path));
else
{
strlcpy(current_path,
get_tablespace_mapping(PQgetvalue(res, rownum, 1)),
sizeof(current_path));
if (target_gp_dbid < 1)
{
pg_log_error("cannot restore user-defined tablespaces without the --target-gp-dbid option");
exit(1);
}
/*
* Construct the new tablespace path using the given target gp dbid
*/
snprintf(gp_tablespace_filename, sizeof(filename), "%s/%d/%s",
current_path,
target_gp_dbid,
GP_TABLESPACE_VERSION_DIRECTORY);
}
/*
* Get the COPY data
*/
res = PQgetResult(conn);
if (PQresultStatus(res) != PGRES_COPY_OUT)
{
pg_log_error("could not get COPY data stream: %s",
PQerrorMessage(conn));
exit(1);
}
while (1)
{
int r;
if (copybuf != NULL)
{
PQfreemem(copybuf);
copybuf = NULL;
}
r = PQgetCopyData(conn, ©buf, 0);
if (r == -1)
{
/*
* End of chunk
*/
if (file)
fclose(file);
break;
}
else if (r == -2)
{
pg_log_error("could not read COPY data: %s",
PQerrorMessage(conn));
exit(1);
}
if (file == NULL)
{
int filemode;
/*
* No current file, so this must be the header for a new file
*/
if (r != 512)
{
pg_log_error("invalid tar block header size: %d", r);
exit(1);
}
totaldone += 512;
current_len_left = read_tar_number(©buf[124], 12);
/* Set permissions on the file */
filemode = read_tar_number(©buf[100], 8);
/*
* All files are padded up to 512 bytes
*/
current_padding =
((current_len_left + 511) & ~511) - current_len_left;
/*
* First part of header is zero terminated filename
*/
if (!basetablespace)
{
/*
* Append relfile path to --target-gp-dbid tablespace path.
*
* For example, copybuf can be
* "<GP_TABLESPACE_VERSION_DIRECTORY>_db<dbid>/16384/16385".
* We create a pointer to the dbid and relfile "/16384/16385",
* construct the new tablespace with provided dbid, and append
* the dbid and relfile on top.
*/
char *copybuf_dbid_relfile = strstr(copybuf, "/");
snprintf(filename, sizeof(filename), "%s%s",
gp_tablespace_filename,
copybuf_dbid_relfile);
}
else
{
snprintf(filename, sizeof(filename), "%s/%s", current_path,
copybuf);
}
if (filename[strlen(filename) - 1] == '/')
{
/*
* Ends in a slash means directory or symlink to directory
*/
if (copybuf[156] == '5')
{
/*
* Directory
*/
filename[strlen(filename) - 1] = '\0'; /* Remove trailing slash */
/*
* Since the forceoverwrite flag is being used, the
* directories still exist. Remove them so that
* pg_basebackup can create them. Skip when we detect
* pg_log because we want to retain its contents.
*/
if (forceoverwrite && pg_check_dir(filename) != 0)
{
/*
* We want to retain the contents of pg_log. And for
* pg_xlog we assume is deleted at the start of
* pg_basebackup. We cannot delete pg_xlog because if
* streammode was used then it may have already copied
* new xlog files into pg_xlog directory.
*/
snprintf(log_directory_path, sizeof(log_directory_path), "/%s", log_directory);
if (pg_str_endswith(filename, "/pg_log") ||
pg_str_endswith(filename, "/log") ||
pg_str_endswith(filename, "/pg_wal") ||
pg_str_endswith(filename, "/pg_xlog") ||
pg_str_endswith(filename, log_directory_path))
continue;
rmtree(filename, true);
}
bool is_gp_tablespace_directory = strncmp(gp_tablespace_filename, filename, strlen(filename)) == 0;
if (is_gp_tablespace_directory && !forceoverwrite) {
/*
* This directory has already been created during beginning of BaseBackup().
*/
continue;
}
if (mkdir(filename, pg_dir_create_mode) != 0)
{
/*
* When streaming WAL, pg_wal (or pg_xlog for pre-9.6
* clusters) will have been created by the wal
* receiver process. Also, when the WAL directory
* location was specified, pg_wal (or pg_xlog) has
* already been created as a symbolic link before
* starting the actual backup. So just ignore creation
* failures on related directories.
*/
if (!((pg_str_endswith(filename, "/pg_wal") ||
pg_str_endswith(filename, "/pg_xlog") ||
pg_str_endswith(filename, "/archive_status")) &&
errno == EEXIST))
{
pg_log_error("could not create directory \"%s\": %m",
filename);
exit(1);
}
}
#ifndef WIN32
if (chmod(filename, (mode_t) filemode))
pg_log_error("could not set permissions on directory \"%s\": %m",
filename);
#endif
}
else if (copybuf[156] == '2')
{
/*
* Symbolic link
*
* It's most likely a link in pg_tblspc directory, to the
* location of a tablespace. Apply any tablespace mapping
* given on the command line (--tablespace-mapping). (We
* blindly apply the mapping without checking that the
* link really is inside pg_tblspc. We don't expect there
* to be other symlinks in a data directory, but if there
* are, you can call it an undocumented feature that you
* can map them too.)
*/
filename[strlen(filename) - 1] = '\0'; /* Remove trailing slash */
mapped_tblspc_path = get_tablespace_mapping(©buf[157]);
char *mapped_tblspc_path_with_dbid = psprintf("%s/%d", mapped_tblspc_path, target_gp_dbid);
if (symlink(mapped_tblspc_path_with_dbid, filename) != 0)
{
pg_log_error("could not create symbolic link from \"%s\" to \"%s\": %m",
filename, mapped_tblspc_path);
exit(1);
}
pfree(mapped_tblspc_path_with_dbid);
}
else
{
pg_log_error("unrecognized link indicator \"%c\"",
copybuf[156]);
exit(1);
}
continue; /* directory or link handled */
}
/*
* regular file
*
* In GPDB, we may need to remove the file first if we are forcing
* an overwrite instead of starting with a blank directory. Some
* files may have had their permissions changed to read only.
* Remove the file instead of literally overwriting them.
*/
if (forceoverwrite)
remove(filename);
file = fopen(filename, "wb");
if (!file)
{
pg_log_error("could not create file \"%s\": %m", filename);
exit(1);
}
#ifndef WIN32
if (chmod(filename, (mode_t) filemode))
pg_log_error("could not set permissions on file \"%s\": %m",
filename);
#endif
if (current_len_left == 0)
{
/*
* Done with this file, next one will be a new tar header
*/
fclose(file);
file = NULL;
continue;
}
} /* new file */
else
{
/*
* Continuing blocks in existing file
*/
if (current_len_left == 0 && r == current_padding)
{
/*
* Received the padding block for this file, ignore it and
* close the file, then move on to the next tar header.
*/
fclose(file);
file = NULL;
totaldone += r;
continue;
}
errno = 0;
if (fwrite(copybuf, r, 1, file) != 1)
{
/* if write didn't set errno, assume problem is no disk space */
if (errno == 0)
errno = ENOSPC;
pg_log_error("could not write to file \"%s\": %m", filename);
exit(1);
}
totaldone += r;
progress_report(rownum, filename, false, false);
current_len_left -= r;
if (current_len_left == 0 && current_padding == 0)
{
/*
* Received the last block, and there is no padding to be
* expected. Close the file and move on to the next tar
* header.
*/
fclose(file);
file = NULL;
continue;
}
} /* continuing data in existing file */
} /* loop over all data blocks */
progress_report(rownum, filename, true, false);
if (file != NULL)
{
pg_log_error("COPY stream ended before last file was finished");
exit(1);
}
if (copybuf != NULL)
PQfreemem(copybuf);
if (basetablespace && writerecoveryconf)
WriteRecoveryConfig(conn, basedir, recoveryconfcontents);
if (basetablespace)
WriteInternalConfFile();
/*
* No data is synced here, everything is done for all tablespaces at the
* end.
*/
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4062D7", "function_addr": 4219607, "binary_name": "fb857fb1dbafc823487379842430904c4c01132a07e605d0d5259ba02ec4da23.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 860h"], [3, "mov [rbp+var_848], rdi"], [4, "mov [rbp+var_850], rsi"], [5, "mov [rbp+var_854], edx"], [6, "mov [rbp+var_8], 0"], [7, "mov [rbp+var_C], 0"], [8, "mov [rbp+ptr], 0"], [9, "mov [rbp+stream], 0"], [10, "mov ecx, [rbp+var_854]"], [11, "mov rax, [rbp+var_850]"], [12, "mov edx, 0"], [13, "mov esi, ecx"], [14, "mov rdi, rax"], [15, "call _PQgetisnull"], [16, "test eax, eax"], [17, "setnz al"], [18, "mov [rbp+var_19], al"], [19, "cmp [rbp+var_19], 0"], [20, "jz short loc_406362"], [21, "mov rcx, cs:s1"], [22, "lea rax, [rbp+var_430]"], [23, "mov edx, 400h"], [24, "mov rsi, rcx"], [25, "mov rdi, rax"], [26, "call sub_412265"], [27, "jmp short loc_4063A0"], [28, "mov ecx, [rbp+var_854]"], [29, "mov rax, [rbp+var_850]"], [30, "mov edx, 1"], [31, "mov esi, ecx"], [32, "mov rdi, rax"], [33, "call _PQgetvalue"], [34, "mov rdi, rax"], [35, "call sub_406246"], [36, "mov rcx, rax"], [37, "lea rax, [rbp+var_430]"], [38, "mov edx, 400h"], [39, "mov rsi, rcx"], [40, "mov rdi, rax"], [41, "call sub_412265"], [42, "mov rax, [rbp+var_848]"], [43, "mov rdi, rax"], [44, "call _PQgetResult"], [45, "mov [rbp+var_850], rax"], [46, "mov rax, [rbp+var_850]"], [47, "mov rdi, rax"], [48, "call _PQresultStatus"], [49, "cmp eax, 3"], [50, "jz short loc_40640E"], [51, "mov eax, cs:dword_4222C8"], [52, "cmp eax, 4"], [53, "setbe al"], [54, "movzx eax, al"], [55, "test rax, rax"], [56, "jz short loc_406404"], [57, "mov rax, [rbp+var_848]"], [58, "mov rdi, rax"], [59, "call _PQerrorMessage"], [60, "mov rdx, rax"], [61, "mov esi, offset aCouldNotGetCop"], [62, "mov edi, 4"], [63, "mov eax, 0"], [64, "call sub_411B9E"], [65, "mov edi, 1"], [66, "call _exit"], [67, "mov rax, [rbp+ptr]"], [68, "test rax, rax"], [69, "jz short loc_406434"], [70, "mov rax, [rbp+ptr]"], [71, "mov rdi, rax"], [72, "call _PQfreemem"], [73, "mov [rbp+ptr], 0"], [74, "lea rcx, [rbp+ptr]"], [75, "mov rax, [rbp+var_848]"], [76, "mov edx, 0"], [77, "mov rsi, rcx"], [78, "mov rdi, rax"], [79, "call _PQgetCopyData"], [80, "mov [rbp+var_20], eax"], [81, "cmp [rbp+var_20], 0FFFFFFFFh"], [82, "jnz short loc_406477"], [83, "cmp [rbp+stream], 0"], [84, "jz loc_4069FC"], [85, "mov rax, [rbp+stream]"], [86, "mov rdi, rax"], [87, "call _fclose"], [88, "jmp loc_4069FC"], [89, "cmp [rbp+var_20], 0FFFFFFFEh"], [90, "jnz short loc_4064C1"], [91, "mov eax, cs:dword_4222C8"], [92, "cmp eax, 4"], [93, "setbe al"], [94, "movzx eax, al"], [95, "test rax, rax"], [96, "jz short loc_4064B7"], [97, "mov rax, [rbp+var_848]"], [98, "mov rdi, rax"], [99, "call _PQerrorMessage"], [100, "mov rdx, rax"], [101, "mov esi, offset aCouldNotReadCo"], [102, "mov edi, 4"], [103, "mov eax, 0"], [104, "call sub_411B9E"], [105, "mov edi, 1"], [106, "call _exit"], [107, "cmp [rbp+stream], 0"], [108, "jnz loc_4068CA"], [109, "cmp [rbp+var_20], 200h"], [110, "jz short loc_40650C"], [111, "mov eax, cs:dword_4222C8"], [112, "cmp eax, 4"], [113, "setbe al"], [114, "movzx eax, al"], [115, "test rax, rax"], [116, "jz short loc_406502"], [117, "mov eax, [rbp+var_20]"], [118, "mov edx, eax"], [119, "mov esi, offset aInvalidTarBloc"], [120, "mov edi, 4"], [121, "mov eax, 0"], [122, "call sub_411B9E"], [123, "mov edi, 1"], [124, "call _exit"], [125, "mov rax, cs:qword_421978"], [126, "add rax, 200h"], [127, "mov cs:qword_421978, rax"], [128, "mov rax, [rbp+ptr]"], [129, "add rax, 7Ch "], [130, "mov esi, 0Ch"], [131, "mov rdi, rax"], [132, "call sub_41620C"], [133, "mov [rbp+var_8], rax"], [134, "mov rax, [rbp+ptr]"], [135, "add rax, 64h "], [136, "mov esi, 8"], [137, "mov rdi, rax"], [138, "call sub_41620C"], [139, "mov [rbp+mode], eax"], [140, "mov rax, [rbp+var_8]"], [141, "add eax, 1FFh"], [142, "and eax, 0FFFFFE00h"], [143, "mov edx, eax"], [144, "mov rax, [rbp+var_8]"], [145, "mov ecx, eax"], [146, "mov eax, edx"], [147, "sub eax, ecx"], [148, "mov [rbp+var_C], eax"], [149, "mov rcx, [rbp+ptr]"], [150, "lea rdx, [rbp+var_430]"], [151, "lea rax, [rbp+s]"], [152, "mov r8, rcx"], [153, "mov rcx, rdx"], [154, "mov edx, offset aSS"], [155, "mov esi, 400h"], [156, "mov rdi, rax"], [157, "mov eax, 0"], [158, "call sub_4137C7"], [159, "lea rax, [rbp+s]"], [160, "mov rdi, rax"], [161, "call _strlen"], [162, "sub rax, 1"], [163, "movzx eax, [rbp+rax+s]"], [164, "cmp al, 2Fh "], [165, "jnz loc_406801"], [166, "mov rax, [rbp+ptr]"], [167, "add rax, 9Ch"], [168, "movzx eax, byte ptr [rax]"], [169, "cmp al, 35h "], [170, "jnz loc_40670D"], [171, "lea rax, [rbp+s]"], [172, "mov rdi, rax"], [173, "call _strlen"], [174, "sub rax, 1"], [175, "mov [rbp+rax+s], 0"], [176, "mov eax, cs:mode"], [177, "mov edx, eax"], [178, "lea rax, [rbp+s]"], [179, "mov esi, edx"], [180, "mov rdi, rax"], [181, "call _mkdir"], [182, "test eax, eax"], [183, "jz loc_4066B6"], [184, "lea rax, [rbp+s]"], [185, "mov esi, offset aPgWal_0"], [186, "mov rdi, rax"], [187, "call sub_410B15"], [188, "xor eax, 1"], [189, "test al, al"], [190, "jz short loc_40666E"], [191, "lea rax, [rbp+s]"], [192, "mov esi, offset aPgXlog_0"], [193, "mov rdi, rax"], [194, "call sub_410B15"], [195, "xor eax, 1"], [196, "test al, al"], [197, "jz short loc_40666E"], [198, "lea rax, [rbp+s]"], [199, "mov esi, offset aArchiveStatus"], [200, "mov rdi, rax"], [201, "call sub_410B15"], [202, "xor eax, 1"], [203, "test al, al"], [204, "jnz short loc_40667A"], [205, "call ___errno_location"], [206, "mov eax, [rax]"], [207, "cmp eax, 11h"], [208, "jz short loc_4066B6"], [209, "mov eax, cs:dword_4222C8"], [210, "cmp eax, 4"], [211, "setbe al"], [212, "movzx eax, al"], [213, "test rax, rax"], [214, "jz short loc_4066AC"], [215, "lea rax, [rbp+s]"], [216, "mov rdx, rax"], [217, "mov esi, offset aCouldNotCreate_0"], [218, "mov edi, 4"], [219, "mov eax, 0"], [220, "call sub_411B9E"], [221, "mov edi, 1"], [222, "call _exit"], [223, "mov edx, [rbp+mode]"], [224, "lea rax, [rbp+s]"], [225, "mov esi, edx"], [226, "mov rdi, rax"], [227, "call _chmod"], [228, "test eax, eax"], [229, "jz loc_4069F6"], [230, "mov eax, cs:dword_4222C8"], [231, "cmp eax, 4"], [232, "setbe al"], [233, "movzx eax, al"], [234, "test rax, rax"], [235, "jz loc_4069F6"], [236, "lea rax, [rbp+s]"], [237, "mov rdx, rax"], [238, "mov esi, offset aCouldNotSetPer"], [239, "mov edi, 4"], [240, "mov eax, 0"], [241, "call sub_411B9E"], [242, "jmp loc_4069F6"], [243, "mov rax, [rbp+ptr]"], [244, "add rax, 9Ch"], [245, "movzx eax, byte ptr [rax]"], [246, "cmp al, 32h "], [247, "jnz loc_4067BA"], [248, "lea rax, [rbp+s]"], [249, "mov rdi, rax"], [250, "call _strlen"], [251, "sub rax, 1"], [252, "mov [rbp+rax+s], 0"], [253, "mov rax, [rbp+ptr]"], [254, "add rax, 9Dh"], [255, "mov rdi, rax"], [256, "call sub_406246"], [257, "mov [rbp+from], rax"], [258, "lea rdx, [rbp+s]"], [259, "mov rax, [rbp+from]"], [260, "mov rsi, rdx"], [261, "mov rdi, rax"], [262, "call _symlink"], [263, "test eax, eax"], [264, "jz loc_4069F6"], [265, "mov eax, cs:dword_4222C8"], [266, "cmp eax, 4"], [267, "setbe al"], [268, "movzx eax, al"], [269, "test rax, rax"], [270, "jz short loc_4067B0"], [271, "mov rdx, [rbp+from]"], [272, "lea rax, [rbp+s]"], [273, "mov rcx, rdx"], [274, "mov rdx, rax"], [275, "mov esi, offset aCouldNotCreate_4"], [276, "mov edi, 4"], [277, "mov eax, 0"], [278, "call sub_411B9E"], [279, "mov edi, 1"], [280, "call _exit"], [281, "mov eax, cs:dword_4222C8"], [282, "cmp eax, 4"], [283, "setbe al"], [284, "movzx eax, al"], [285, "test rax, rax"], [286, "jz short loc_4067F7"], [287, "mov rax, [rbp+ptr]"], [288, "add rax, 9Ch"], [289, "movzx eax, byte ptr [rax]"], [290, "movsx eax, al"], [291, "mov edx, eax"], [292, "mov esi, offset aUnrecognizedLi"], [293, "mov edi, 4"], [294, "mov eax, 0"], [295, "call sub_411B9E"], [296, "mov edi, 1"], [297, "call _exit"], [298, "lea rax, [rbp+s]"], [299, "mov esi, offset modes"], [300, "mov rdi, rax"], [301, "call _fopen"], [302, "mov [rbp+stream], rax"], [303, "cmp [rbp+stream], 0"], [304, "jnz short loc_40685C"], [305, "mov eax, cs:dword_4222C8"], [306, "cmp eax, 4"], [307, "setbe al"], [308, "movzx eax, al"], [309, "test rax, rax"], [310, "jz short loc_406852"], [311, "lea rax, [rbp+s]"], [312, "mov rdx, rax"], [313, "mov esi, offset aCouldNotCreate_3"], [314, "mov edi, 4"], [315, "mov eax, 0"], [316, "call sub_411B9E"], [317, "mov edi, 1"], [318, "call _exit"], [319, "mov edx, [rbp+mode]"], [320, "lea rax, [rbp+s]"], [321, "mov esi, edx"], [322, "mov rdi, rax"], [323, "call _chmod"], [324, "test eax, eax"], [325, "jz short loc_4068A6"], [326, "mov eax, cs:dword_4222C8"], [327, "cmp eax, 4"], [328, "setbe al"], [329, "movzx eax, al"], [330, "test rax, rax"], [331, "jz short loc_4068A6"], [332, "lea rax, [rbp+s]"], [333, "mov rdx, rax"], [334, "mov esi, offset aCouldNotSetPer_0"], [335, "mov edi, 4"], [336, "mov eax, 0"], [337, "call sub_411B9E"], [338, "cmp [rbp+var_8], 0"], [339, "jnz loc_40640E"], [340, "mov rax, [rbp+stream]"], [341, "mov rdi, rax"], [342, "call _fclose"], [343, "mov [rbp+stream], 0"], [344, "jmp loc_4069F7"], [345, "cmp [rbp+var_8], 0"], [346, "jnz short loc_406909"], [347, "mov eax, [rbp+var_20]"], [348, "cmp eax, [rbp+var_C]"], [349, "jnz short loc_406909"], [350, "mov rax, [rbp+stream]"], [351, "mov rdi, rax"], [352, "call _fclose"], [353, "mov [rbp+stream], 0"], [354, "mov eax, [rbp+var_20]"], [355, "movsxd rdx, eax"], [356, "mov rax, cs:qword_421978"], [357, "add rax, rdx"], [358, "mov cs:qword_421978, rax"], [359, "jmp loc_4069F7"], [360, "call ___errno_location"], [361, "mov dword ptr [rax], 0"], [362, "mov eax, [rbp+var_20]"], [363, "movsxd rsi, eax"], [364, "mov rax, [rbp+ptr]"], [365, "mov rdx, [rbp+stream]"], [366, "mov rcx, rdx"], [367, "mov edx, 1"], [368, "mov rdi, rax"], [369, "call _fwrite"], [370, "cmp rax, 1"], [371, "jz short loc_40698D"], [372, "call ___errno_location"], [373, "mov eax, [rax]"], [374, "test eax, eax"], [375, "jnz short loc_406951"], [376, "call ___errno_location"], [377, "mov dword ptr [rax], 1Ch"], [378, "mov eax, cs:dword_4222C8"], [379, "cmp eax, 4"], [380, "setbe al"], [381, "movzx eax, al"], [382, "test rax, rax"], [383, "jz short loc_406983"], [384, "lea rax, [rbp+s]"], [385, "mov rdx, rax"], [386, "mov esi, offset aCouldNotWriteT_0"], [387, "mov edi, 4"], [388, "mov eax, 0"], [389, "call sub_411B9E"], [390, "mov edi, 1"], [391, "call _exit"], [392, "mov eax, [rbp+var_20]"], [393, "movsxd rdx, eax"], [394, "mov rax, cs:qword_421978"], [395, "add rax, rdx"], [396, "mov cs:qword_421978, rax"], [397, "lea rsi, [rbp+s]"], [398, "mov eax, [rbp+var_854]"], [399, "mov ecx, 0"], [400, "mov edx, 0"], [401, "mov edi, eax"], [402, "call sub_404CD2"], [403, "mov eax, [rbp+var_20]"], [404, "cdqe"], [405, "sub [rbp+var_8], rax"], [406, "cmp [rbp+var_8], 0"], [407, "jnz loc_40640E"], [408, "cmp [rbp+var_C], 0"], [409, "jnz loc_40640E"], [410, "mov rax, [rbp+stream]"], [411, "mov rdi, rax"], [412, "call _fclose"], [413, "mov [rbp+stream], 0"], [414, "jmp short loc_4069F7"], [415, "nop"], [416, "jmp loc_40640E"], [417, "nop"], [418, "lea rsi, [rbp+s]"], [419, "mov eax, [rbp+var_854]"], [420, "mov ecx, 0"], [421, "mov edx, 1"], [422, "mov edi, eax"], [423, "call sub_404CD2"], [424, "cmp [rbp+stream], 0"], [425, "jz short loc_406A54"], [426, "mov eax, cs:dword_4222C8"], [427, "cmp eax, 4"], [428, "setbe al"], [429, "movzx eax, al"], [430, "test rax, rax"], [431, "jz short loc_406A4A"], [432, "mov esi, offset aCopyStreamEnde"], [433, "mov edi, 4"], [434, "mov eax, 0"], [435, "call sub_411B9E"], [436, "mov edi, 1"], [437, "call _exit"], [438, "mov rax, [rbp+ptr]"], [439, "test rax, rax"], [440, "jz short loc_406A6F"], [441, "mov rax, [rbp+ptr]"], [442, "mov rdi, rax"], [443, "call _PQfreemem"], [444, "cmp [rbp+var_19], 0"], [445, "jz short loc_406A85"], [446, "movzx eax, cs:byte_421945"], [447, "test al, al"], [448, "jz short loc_406A85"], [449, "call sub_406D7F"], [450, "nop"], [451, "leave"], [452, "retn"]], "data_dep": [[10, 5], [11, 4], [13, 10], [14, 11], [16, 15], [17, 16], [18, 17], [19, 18], [20, 19], [22, 17], [24, 21], [25, 22], [28, 5], [29, 4], [31, 28], [32, 29], [34, 33], [36, 35], [37, 35], [39, 36], [40, 37], [42, 3], [43, 42], [45, 44], [46, 45], [47, 46], [49, 48], [50, 49], [52, 51], [53, 52], [53, 51], [54, 53], [55, 54], [56, 55], [57, 3], [58, 57], [60, 59], [67, 8], [67, 73], [68, 67], [69, 68], [70, 73], [70, 8], [71, 70], [74, 153], [74, 399], [74, 8], [74, 74], [74, 73], [74, 36], [74, 21], [75, 3], [77, 74], [78, 75], [80, 79], [81, 80], [82, 81], [83, 302], [83, 9], [83, 413], [83, 353], [83, 343], [84, 83], [85, 302], [85, 9], [85, 413], [85, 353], [85, 343], [86, 85], [89, 80], [90, 89], [92, 91], [93, 92], [93, 91], [94, 93], [95, 94], [96, 95], [97, 3], [98, 97], [100, 99], [107, 302], [107, 9], [107, 413], [107, 353], [107, 343], [108, 107], [109, 80], [110, 109], [112, 111], [113, 112], [113, 111], [114, 113], [115, 114], [116, 115], [117, 80], [118, 117], [125, 358], [125, 127], [125, 396], [126, 125], [127, 126], [128, 8], [128, 73], [129, 128], [131, 129], [133, 132], [134, 8], [134, 73], [135, 134], [137, 135], [139, 138], [140, 133], [141, 140], [142, 141], [143, 142], [144, 133], [145, 144], [146, 143], [147, 146], [147, 145], [148, 147], [149, 73], [149, 8], [150, 143], [151, 147], [152, 149], [153, 150], [156, 151], [159, 158], [160, 159], [162, 161], [163, 175], [163, 252], [163, 162], [164, 163], [165, 164], [166, 8], [166, 73], [167, 166], [168, 361], [168, 167], [169, 168], [170, 169], [171, 168], [172, 171], [174, 173], [175, 174], [177, 176], [178, 176], [179, 177], [180, 178], [182, 181], [183, 182], [184, 182], [186, 184], [188, 187], [189, 188], [190, 189], [191, 189], [193, 191], [195, 194], [196, 195], [197, 196], [198, 196], [200, 198], [202, 201], [203, 202], [204, 203], [206, 205], [206, 361], [207, 206], [208, 207], [210, 209], [211, 210], [211, 209], [212, 211], [213, 212], [214, 213], [215, 213], [216, 215], [223, 139], [224, 182], [224, 206], [225, 223], [226, 224], [228, 227], [229, 228], [231, 230], [232, 231], [232, 230], [233, 232], [234, 233], [235, 234], [236, 234], [237, 236], [243, 73], [243, 8], [244, 243], [245, 361], [245, 244], [246, 245], [247, 246], [248, 245], [249, 248], [251, 250], [252, 251], [253, 8], [253, 73], [254, 253], [255, 254], [257, 256], [258, 154], [259, 257], [260, 258], [261, 259], [263, 262], [264, 263], [266, 265], [267, 266], [267, 265], [268, 267], [269, 268], [270, 269], [271, 257], [272, 269], [273, 271], [274, 272], [282, 281], [283, 282], [283, 281], [284, 283], [285, 284], [286, 285], [287, 73], [287, 8], [288, 287], [289, 361], [289, 288], [290, 289], [291, 290], [298, 163], [300, 298], [302, 301], [303, 302], [304, 303], [306, 305], [307, 306], [307, 305], [308, 307], [309, 308], [310, 309], [311, 309], [312, 311], [319, 139], [320, 301], [321, 319], [322, 320], [324, 323], [325, 324], [327, 326], [328, 327], [328, 326], [329, 328], [330, 329], [331, 330], [332, 330], [333, 332], [338, 133], [339, 338], [340, 302], [341, 340], [345, 133], [345, 6], [345, 405], [346, 345], [347, 80], [348, 7], [348, 148], [348, 347], [349, 348], [350, 302], [350, 9], [350, 353], [350, 343], [350, 413], [351, 350], [354, 80], [355, 354], [356, 127], [356, 396], [356, 358], [357, 356], [357, 355], [358, 357], [361, 360], [362, 80], [363, 362], [364, 8], [364, 73], [365, 353], [365, 343], [365, 302], [365, 9], [365, 413], [366, 365], [368, 364], [370, 369], [371, 370], [373, 361], [373, 372], [374, 373], [375, 374], [377, 376], [379, 378], [380, 379], [380, 378], [381, 380], [382, 381], [383, 382], [384, 382], [385, 384], [392, 80], [393, 392], [394, 127], [394, 396], [394, 358], [395, 394], [395, 393], [396, 395], [397, 363], [398, 5], [401, 398], [403, 80], [405, 403], [405, 133], [405, 6], [405, 405], [406, 405], [407, 406], [408, 7], [408, 148], [409, 408], [410, 353], [410, 302], [410, 9], [410, 413], [410, 343], [411, 410], [418, 77], [419, 5], [422, 419], [424, 302], [424, 9], [424, 413], [424, 353], [424, 343], [425, 424], [427, 426], [428, 427], [428, 426], [429, 428], [430, 429], [431, 430], [438, 73], [438, 8], [439, 438], [440, 439], [441, 73], [441, 8], [442, 441], [444, 18], [445, 444], [447, 446], [448, 447], [452, 449], [452, 439], [452, 443], [452, 447]]}
| {"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/fb857fb1dbafc823487379842430904c4c01132a07e605d0d5259ba02ec4da23_fb857fb1dbafc823487379842430904c4c01132a07e605d0d5259ba02ec4da23.jsonl.gz", "strip_func_name": "sub_4062D7", "query": "\n\n\n__int64 __fastcall sub_4062D7(__int64 a1, __int64 a2, unsigned int a3)\n{\nint v3; // eax\n__int64 v4; // rax\n__int64 v5; // rax\nint v6; // eax\nint v7; // ecx\nint v8; // er8\nint v9; // er9\nint v10; // ecx\nint v11; // er8\nint v12; // er9\nint v13; // eax\nint v14; // ecx\nint v15; // er8\nint v16; // er9\nint v17; // er9\nint v18; // ecx\nint v19; // er8\nint v20; // er9\nint v21; // ecx\nint v22; // er8\nint v23; // er9\nint v24; // ecx\nint v25; // er8\nint v26; // er9\nint v27; // er8\nint v28; // er9\nint v29; // ecx\nint v30; // er8\nint v31; // er9\nint v32; // ecx\nint v33; // er8\nint v34; // er9\nint v35; // ecx\nint v36; // er8\nint v37; // er9\nint v38; // edx\nint v39; // ecx\nint v40; // er8\nint v41; // er9\n__int64 result; // rax\nvoid *ptr; // [rsp+28h] [rbp-838h]\nchar s[1024]; // [rsp+30h] [rbp-830h] BYREF\nchar v46[1024]; // [rsp+430h] [rbp-430h] BYREF\nchar *from; // [rsp+830h] [rbp-30h]\n__mode_t mode; // [rsp+83Ch] [rbp-24h]\nint v49; // [rsp+840h] [rbp-20h]\nchar v50[9]; // [rsp+847h] [rbp-19h]\nint v51; // [rsp+854h] [rbp-Ch]\n__int64 v52; // [rsp+858h] [rbp-8h]\n\nv52 = 0LL;\nv51 = 0;\nptr = 0LL;\nv50[8] = 0;\nv3 = PQgetisnull();\n*(_QWORD *)v50 = v3 != 0;\nif ( v3 )\n{\nsub_412265(v46, s1, 1024LL);\n}\nelse\n{\nv4 = PQgetvalue();\nv5 = sub_406246(v4);\nsub_412265(v46, v5, 1024LL);\n}\nPQgetResult();\nif ( (unsigned int)PQresultStatus() != 3 )\n{\nif ( (unsigned int)dword_4222C8 <= 4 )\n{\nv6 = PQerrorMessage();\nsub_411B9E(4, (unsigned int)\"could not get COPY data stream: %s\", v6, v7, v8, v9);\n}\nexit(1);\n}\nwhile ( 1 )\n{\nif ( ptr )\n{\nPQfreemem();\nptr = 0LL;\n}\nv49 = PQgetCopyData();\nif ( v49 == -1 )\nbreak;\nif ( v49 == -2 )\n{\nif ( (unsigned int)dword_4222C8 <= 4 )\n{\nv13 = PQerrorMessage();\nsub_411B9E(4, (unsigned int)\"could not read COPY data: %s\", v13, v14, v15, v16);\n}\nexit(1);\n}\nif ( *(_QWORD *)&v50[1] )\n{\nif ( v52 || v49 != v51 )\n{\n*__errno_location() = 0;\nif ( fwrite(ptr, v49, 1uLL, *(FILE **)&v50[1]) != 1 )\n{\nif ( !*__errno_location() )\n*__errno_location() = 28;\nif ( (unsigned int)dword_4222C8 <= 4 )\nsub_411B9E(4, (unsigned int)\"could not write to file \\\"%s\\\": %m\", (unsigned int)s, v35, v36, v37);\nexit(1);\n}\nqword_421978 += v49;\nsub_404CD2(a3, s, 0, 0);\nv52 -= v49;\nif ( !v52 && !v51 )\n{\nLABEL_51:\nfclose(*(FILE **)&v50[1]);\n*(_QWORD *)&v50[1] = 0LL;\n}\n}\nelse\n{\nfclose(*(FILE **)&v50[1]);\n*(_QWORD *)&v50[1] = 0LL;\nqword_421978 += v49;\n}\n}\nelse\n{\nif ( v49 != 512 )\n{\nif ( (unsigned int)dword_4222C8 <= 4 )\nsub_411B9E(4, (unsigned int)\"invalid tar block header size: %d\", v49, v10, v11, v12);\nexit(1);\n}\nqword_421978 += 512LL;\nv52 = sub_41620C((char *)ptr + 124, 12LL);\nmode = sub_41620C((char *)ptr + 100, 8LL);\nv51 = ((v52 + 511) & 0xFFFFFE00) - v52;\nsub_4137C7((unsigned int)s, 1024, (unsigned int)\"%s/%s\", (unsigned int)v46, (_DWORD)ptr, v17);\nif ( s[strlen(s) - 1] == 47 )\n{\nif ( *((_BYTE *)ptr + 156) == 53 )\n{\ns[strlen(s) - 1] = 0;\nif ( mkdir(s, ::mode)\n&& ((unsigned __int8)sub_410B15(s, \"/pg_wal\") != 1\n&& (unsigned __int8)sub_410B15(s, \"/pg_xlog\") != 1\n&& (unsigned __int8)sub_410B15(s, \"/archive_status\") != 1\n|| *__errno_location() != 17) )\n{\nif ( (unsigned int)dword_4222C8 <= 4 )\nsub_411B9E(4, (unsigned int)\"could not create directory \\\"%s\\\": %m\", (unsigned int)s, v21, v22, v23);\nexit(1);\n}\nif ( chmod(s, mode) && (unsigned int)dword_4222C8 <= 4 )\nsub_411B9E(\n4,\n(unsigned int)\"could not set permissions on directory \\\"%s\\\": %m\",\n(unsigned int)s,\nv24,\nv25,\nv26);\n}\nelse\n{\nif ( *((_BYTE *)ptr + 156) != 50 )\n{\nif ( (unsigned int)dword_4222C8 <= 4 )\nsub_411B9E(4, (unsigned int)\"unrecognized link indicator \\\"%c\\\"\", *((char *)ptr + 156), v18, v19, v20);\nexit(1);\n}\ns[strlen(s) - 1] = 0;\nfrom = (char *)sub_406246((__int64)ptr + 157);\nif ( symlink(from, s) )\n{\nif ( (unsigned int)dword_4222C8 <= 4 )\nsub_411B9E(\n4,\n(unsigned int)\"could not create symbolic link from \\\"%s\\\" to \\\"%s\\\": %m\",\n(unsigned int)s,\n(_DWORD)from,\nv27,\nv28);\nexit(1);\n}\n}\n}\nelse\n{\n*(_QWORD *)&v50[1] = fopen(s, \"wb\");\nif ( !*(_QWORD *)&v50[1] )\n{\nif ( (unsigned int)dword_4222C8 <= 4 )\nsub_411B9E(4, (unsigned int)\"could not create file \\\"%s\\\": %m\", (unsigned int)s, v29, v30, v31);\nexit(1);\n}\nif ( chmod(s, mode) && (unsigned int)dword_4222C8 <= 4 )\nsub_411B9E(4, (unsigned int)\"could not set permissions on file \\\"%s\\\": %m\", (unsigned int)s, v32, v33, v34);\nif ( !v52 )\ngoto LABEL_51;\n}\n}\n}\nif ( *(_QWORD *)&v50[1] )\nfclose(*(FILE **)&v50[1]);\nsub_404CD2(a3, s, 1, 0);\nif ( *(_QWORD *)&v50[1] )\n{\nif ( (unsigned int)dword_4222C8 <= 4 )\nsub_411B9E(4, (unsigned int)\"COPY stream ended before last file was finished\", v38, v39, v40, v41);\nexit(1);\n}\nresult = (__int64)ptr;\nif ( ptr )\nresult = PQfreemem();\nif ( v50[0] )\n{\nresult = (unsigned __int8)byte_421945;\nif ( byte_421945 )\nresult = sub_406D7F();\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v38,ptr,s,v46,from,mode,v49,v50,v51,v52,sub_4062D7,sub_412265,sub_406246,sub_411B9E,sub_404CD2,sub_41620C,sub_4137C7,sub_410B15,sub_406D7F,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'rownum', 'a1': 'conn', 'a2': 'res', 'v38': 'rownum', 'ptr': 'copybuf', 's': 'filename', 'v46': 'current_path', 'from': 'mapped_tblspc_path', 'mode': 'filemode', 'v49': 'r', 'v50': 'basetablespace', 'v51': 'current_padding', 'v52': 'current_len_left', 'sub_4062D7': 'ReceiveAndUnpackTarFile', 'sub_412265': 'strlcpy', 'sub_406246': 'get_tablespace_mapping', 'sub_411B9E': 'pg_log_generic', 'sub_404CD2': 'progress_report', 'sub_41620C': 'read_tar_number', 'sub_4137C7': 'pg_snprintf', 'sub_410B15': 'pg_str_endswith', 'sub_406D7F': 'WriteRecoveryConf'}"} |
|
IsAutoAddAvailable | 76c05f321c4703deb67fa538c2cf508c66723817fc1ebd22a9f48d40487c4c60 | Wiimm | wiimms-szs-tools | NA | bool IsAutoAddAvailable()
{
const StringField_t *al = GetAutoaddList();
return al->used > 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_483865", "function_addr": 4733029, "binary_name": "76c05f321c4703deb67fa538c2cf508c66723817fc1ebd22a9f48d40487c4c60.elf_extract.pkl\n"}, "code": [[0, "sub rsp, 18h"], [1, "call sub_4836AB"], [2, "mov [rsp+18h+var_10], rax"], [3, "mov rax, [rsp+18h+var_10]"], [4, "mov eax, [rax+8]"], [5, "test eax, eax"], [6, "setnz al"], [7, "add rsp, 18h"], [8, "retn"]], "data_dep": [[2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 0], [8, 6]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/76c05f321c4703deb67fa538c2cf508c66723817fc1ebd22a9f48d40487c4c60_76c05f321c4703deb67fa538c2cf508c66723817fc1ebd22a9f48d40487c4c60.jsonl.gz", "strip_func_name": "sub_483865", "query": "\n\n\nbool sub_483865()\n{\nreturn *((_DWORD *)sub_4836AB() + 2) != 0;\n}\n\n\n\nQ:[sub_483865,sub_4836AB,]\nAssistant: ", "hints": "[]", "response": "{'sub_483865': 'IsAutoAddAvailable', 'sub_4836AB': 'GetAutoaddList'}"} |
|
btstack_tlv_posix_append_tag | 32e5bef9a534f6a023b94f0e20e0c28fed442ec28edeb1e289ac97b9496f472a | micropython | micropython-unicorn | NA | static int btstack_tlv_posix_append_tag(btstack_tlv_posix_t * self, uint32_t tag, const uint8_t * data, uint32_t data_size){
if (!self->file) return 1;
log_info("append tag %04x, len %u", tag, data_size);
uint8_t header[8];
big_endian_store_32(header, 0, tag);
big_endian_store_32(header, 4, data_size);
size_t written_header = fwrite(header, 1, sizeof(header), self->file);
if (written_header != sizeof(header)) return 1;
if (data_size > 0) {
size_t written_value = fwrite(data, 1, data_size, self->file);
if (written_value != data_size) return 1;
}
fflush(self->file);
return 1;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402DED", "function_addr": 4206061, "binary_name": "32e5bef9a534f6a023b94f0e20e0c28fed442ec28edeb1e289ac97b9496f472a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_28], rdi"], [4, "mov dword ptr [rbp+n+4], esi"], [5, "mov [rbp+var_38], rdx"], [6, "mov dword ptr [rbp+n], ecx"], [7, "mov rax, [rbp+var_28]"], [8, "mov rax, [rax+10h]"], [9, "test rax, rax"], [10, "jnz short loc_402E1A"], [11, "mov eax, 1"], [12, "jmp locret_402EEA"], [13, "mov edx, dword ptr [rbp+n]"], [14, "mov eax, dword ptr [rbp+n+4]"], [15, "mov r9d, edx"], [16, "mov r8d, eax"], [17, "mov ecx, 47h "], [18, "mov edx, offset aBtstackTlvPosi"], [19, "mov esi, offset aSUAppendTag04x"], [20, "mov edi, 1"], [21, "mov eax, 0"], [22, "call sub_41A13D"], [23, "mov edx, dword ptr [rbp+n+4]"], [24, "lea rax, [rbp+ptr]"], [25, "mov esi, 0"], [26, "mov rdi, rax"], [27, "call sub_4049FF"], [28, "mov edx, dword ptr [rbp+n]"], [29, "lea rax, [rbp+ptr]"], [30, "mov esi, 4"], [31, "mov rdi, rax"], [32, "call sub_4049FF"], [33, "mov rax, [rbp+var_28]"], [34, "mov rdx, [rax+10h]"], [35, "lea rax, [rbp+ptr]"], [36, "mov rcx, rdx"], [37, "mov edx, 8"], [38, "mov esi, 1"], [39, "mov rdi, rax"], [40, "call _fwrite"], [41, "mov [rbp+var_8], rax"], [42, "cmp [rbp+var_8], 8"], [43, "jz short loc_402E9F"], [44, "mov eax, 1"], [45, "jmp short locret_402EEA"], [46, "cmp dword ptr [rbp+n], 0"], [47, "jz short loc_402ED5"], [48, "mov rax, [rbp+var_28]"], [49, "mov rcx, [rax+10h]"], [50, "mov edx, dword ptr [rbp+n]"], [51, "mov rax, [rbp+var_38]"], [52, "mov esi, 1"], [53, "mov rdi, rax"], [54, "call _fwrite"], [55, "mov [rbp+var_10], rax"], [56, "mov eax, dword ptr [rbp+n]"], [57, "cmp [rbp+var_10], rax"], [58, "jz short loc_402ED5"], [59, "mov eax, 1"], [60, "jmp short locret_402EEA"], [61, "mov rax, [rbp+var_28]"], [62, "mov rax, [rax+10h]"], [63, "mov rdi, rax"], [64, "call _fflush"], [65, "mov eax, 1"], [66, "leave"], [67, "retn"]], "data_dep": [[7, 3], [8, 7], [9, 8], [10, 9], [13, 6], [14, 4], [15, 13], [16, 14], [23, 4], [24, 22], [26, 24], [28, 6], [29, 27], [31, 29], [33, 3], [34, 33], [35, 33], [36, 34], [39, 35], [41, 40], [42, 41], [43, 42], [46, 6], [47, 46], [48, 3], [49, 48], [50, 6], [51, 5], [53, 51], [55, 54], [56, 6], [57, 56], [57, 55], [58, 57], [61, 3], [62, 61], [63, 62], [67, 65], [67, 59], [67, 11], [67, 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/32e5bef9a534f6a023b94f0e20e0c28fed442ec28edeb1e289ac97b9496f472a_32e5bef9a534f6a023b94f0e20e0c28fed442ec28edeb1e289ac97b9496f472a.jsonl.gz", "strip_func_name": "sub_402DED", "query": "\n\n\n__int64 __fastcall sub_402DED(__int64 a1, unsigned int a2, const void *a3, unsigned int a4)\n{\nchar ptr[8]; // [rsp+28h] [rbp-18h] BYREF\nsize_t v8; // [rsp+30h] [rbp-10h]\nsize_t v9; // [rsp+38h] [rbp-8h]\n\nif ( !*(_QWORD *)(a1 + 16) )\nreturn 1LL;\nsub_41A13D(1, (unsigned int)\"%s.%u: append tag %04x, len %u\", (unsigned int)\"btstack_tlv_posix.c\", 71, a2, a4);\nsub_4049FF(ptr, 0LL, a2);\nsub_4049FF(ptr, 4LL, a4);\nv9 = fwrite(ptr, 1uLL, 8uLL, *(FILE **)(a1 + 16));\nif ( v9 != 8 )\nreturn 1LL;\nif ( a4 )\n{\nv8 = fwrite(a3, 1uLL, a4, *(FILE **)(a1 + 16));\nif ( v8 != a4 )\nreturn 1LL;\n}\nfflush(*(FILE **)(a1 + 16));\nreturn 1LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,ptr,v8,v9,sub_402DED,sub_41A13D,sub_4049FF,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'data', 'a4': 'data_size', 'a1': 'self', 'a2': 'tag', 'ptr': 'header', 'v8': 'written_value', 'v9': 'written_header', 'sub_402DED': 'btstack_tlv_posix_append_tag', 'sub_41A13D': 'hci_dump_log', 'sub_4049FF': 'big_endian_store_32'}"} |
|
xor128 | 11d9b3406256c1fcd5bd2ddd8ab421cad29668b27ca06d218669f2b89689e54b | DacoTaco | YASDU | NA | inline static void xor128(u8 *foo, u8 *bar) {
int i;
for (i = 0; i < 16; i++) foo[i] ^= bar[i];
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4038D0", "function_addr": 4208848, "binary_name": "11d9b3406256c1fcd5bd2ddd8ab421cad29668b27ca06d218669f2b89689e54b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov [rbp+var_20], rsi"], [4, "mov [rbp+var_4], 0"], [5, "jmp short loc_40391A"], [6, "mov eax, [rbp+var_4]"], [7, "movsxd rdx, eax"], [8, "mov rax, [rbp+var_18]"], [9, "add rax, rdx"], [10, "movzx ecx, byte ptr [rax]"], [11, "mov eax, [rbp+var_4]"], [12, "movsxd rdx, eax"], [13, "mov rax, [rbp+var_20]"], [14, "add rax, rdx"], [15, "movzx edx, byte ptr [rax]"], [16, "mov eax, [rbp+var_4]"], [17, "movsxd rsi, eax"], [18, "mov rax, [rbp+var_18]"], [19, "add rax, rsi"], [20, "xor edx, ecx"], [21, "mov [rax], dl"], [22, "add [rbp+var_4], 1"], [23, "cmp [rbp+var_4], 0Fh"], [24, "jle short loc_4038E5"], [25, "nop"], [26, "nop"], [27, "pop rbp"], [28, "retn"]], "data_dep": [[6, 4], [6, 22], [7, 6], [8, 2], [9, 8], [9, 7], [10, 9], [10, 21], [11, 4], [11, 22], [12, 11], [13, 3], [14, 13], [14, 12], [15, 21], [15, 14], [16, 4], [16, 22], [17, 16], [18, 2], [19, 18], [19, 17], [20, 10], [20, 15], [21, 19], [21, 20], [22, 4], [22, 22], [23, 4], [23, 22], [24, 23], [27, 0], [28, 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/11d9b3406256c1fcd5bd2ddd8ab421cad29668b27ca06d218669f2b89689e54b_11d9b3406256c1fcd5bd2ddd8ab421cad29668b27ca06d218669f2b89689e54b.jsonl.gz", "strip_func_name": "sub_4038D0", "query": "\n\n\n_BYTE *__fastcall sub_4038D0(__int64 a1, __int64 a2)\n{\n_BYTE *result; // rax\nint i; // [rsp+1Ch] [rbp-4h]\n\nfor ( i = 0; i <= 15; ++i )\n{\nresult = (_BYTE *)(i + a1);\n*result ^= *(_BYTE *)(i + a2);\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_4038D0,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'foo', 'a2': 'bar', 'sub_4038D0': 'xor128'}"} |
|
emit_load | 0bdd3e3355b55ed2816435efa21042f8306da2b2ea7b587febce5c0891e6891f | andoma | vmir | NA | static void
emit_load(ir_unit_t *iu, ir_instr_load_t *ii)
{
const ir_value_t *src = value_get(iu, ii->ptr.value);
const ir_value_t *roff =
ii->value_offset.value >= 0 ? value_get(iu, ii->value_offset.value) : NULL;
const ir_value_t *ret = value_get(iu, ii->super.ii_ret.value);
const ir_type_t *retty = type_get(iu, ii->super.ii_ret.type);
if(ii->cast != -1) {
// Load + Cast
ir_type_t *pointee = type_get(iu, ii->load_type);
switch(COMBINE4(src->iv_class, legalize_type(retty),
legalize_type(pointee), ii->cast)) {
case COMBINE4(IR_VC_REGFRAME, IR_TYPE_INT32, IR_TYPE_INT8, CAST_ZEXT):
emit_op2(iu, roff ? VM_LOAD8_ZEXT_32_ROFF :
VM_LOAD8_ZEXT_32_OFF, value_reg(ret), value_reg(src));
emit_imm16(iu, ii->immediate_offset);
break;
case COMBINE4(IR_VC_REGFRAME, IR_TYPE_INT32, IR_TYPE_INT8, CAST_SEXT):
emit_op2(iu, roff ? VM_LOAD8_SEXT_32_ROFF : VM_LOAD8_SEXT_32_OFF,
value_reg(ret), value_reg(src));
emit_imm16(iu, ii->immediate_offset);
break;
case COMBINE4(IR_VC_REGFRAME, IR_TYPE_INT32, IR_TYPE_INT16, CAST_ZEXT):
emit_op2(iu, roff ? VM_LOAD16_ZEXT_32_ROFF: VM_LOAD16_ZEXT_32_OFF,
value_reg(ret), value_reg(src));
emit_imm16(iu, ii->immediate_offset);
break;
case COMBINE4(IR_VC_REGFRAME, IR_TYPE_INT32, IR_TYPE_INT16, CAST_SEXT):
emit_op2(iu, roff ? VM_LOAD16_SEXT_32_ROFF : VM_LOAD16_SEXT_32_OFF,
value_reg(ret), value_reg(src));
emit_imm16(iu, ii->immediate_offset);
break;
case COMBINE4(IR_VC_CONSTANT, IR_TYPE_INT32, IR_TYPE_INT8, CAST_ZEXT):
emit_op1(iu, VM_LOAD8_G_ZEXT_32, value_reg(ret));
emit_i32(iu, value_get_const32(iu, src) + ii->immediate_offset);
break;
case COMBINE4(IR_VC_CONSTANT, IR_TYPE_INT32, IR_TYPE_INT8, CAST_SEXT):
emit_op1(iu, VM_LOAD8_G_SEXT_32, value_reg(ret));
emit_i32(iu, value_get_const32(iu, src) + ii->immediate_offset);
break;
case COMBINE4(IR_VC_CONSTANT, IR_TYPE_INT32, IR_TYPE_INT16, CAST_ZEXT):
emit_op1(iu, VM_LOAD16_G_ZEXT_32, value_reg(ret));
emit_i32(iu, value_get_const32(iu, src) + ii->immediate_offset);
break;
case COMBINE4(IR_VC_CONSTANT, IR_TYPE_INT32, IR_TYPE_INT16, CAST_SEXT):
emit_op1(iu, VM_LOAD16_G_SEXT_32, value_reg(ret));
emit_i32(iu, value_get_const32(iu, src) + ii->immediate_offset);
break;
default:
parser_error(iu, "Can't load+cast to %s from %s cast:%d (%s)",
type_str(iu, retty),
type_str(iu, pointee),
ii->cast, instr_str(iu, &ii->super, 0));
}
if(roff != NULL) {
emit_i16(iu, value_reg(roff));
emit_i16(iu, ii->value_offset_multiply);
}
return;
}
emit_load1(iu, src, ret, retty, roff, ii->immediate_offset,
ii->value_offset_multiply, ii);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_426AA1", "function_addr": 4352673, "binary_name": "0bdd3e3355b55ed2816435efa21042f8306da2b2ea7b587febce5c0891e6891f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r13"], [3, "push r12"], [4, "push rbx"], [5, "sub rsp, 48h"], [6, "mov [rbp+var_58], rdi"], [7, "mov [rbp+var_60], rsi"], [8, "mov rax, [rbp+var_60]"], [9, "mov eax, [rax+58h]"], [10, "mov edx, eax"], [11, "mov rax, [rbp+var_58]"], [12, "mov esi, edx"], [13, "mov rdi, rax"], [14, "call sub_405159"], [15, "mov [rbp+var_28], rax"], [16, "mov rax, [rbp+var_60]"], [17, "mov eax, [rax+64h]"], [18, "test eax, eax"], [19, "js short loc_426AF5"], [20, "mov rax, [rbp+var_60]"], [21, "mov eax, [rax+64h]"], [22, "mov edx, eax"], [23, "mov rax, [rbp+var_58]"], [24, "mov esi, edx"], [25, "mov rdi, rax"], [26, "call sub_405159"], [27, "jmp short loc_426AFA"], [28, "mov eax, 0"], [29, "mov [rbp+var_30], rax"], [30, "mov rax, [rbp+var_60]"], [31, "mov eax, [rax+2Ch]"], [32, "mov edx, eax"], [33, "mov rax, [rbp+var_58]"], [34, "mov esi, edx"], [35, "mov rdi, rax"], [36, "call sub_405159"], [37, "mov [rbp+var_38], rax"], [38, "mov rax, [rbp+var_60]"], [39, "mov eax, [rax+30h]"], [40, "mov edx, eax"], [41, "mov rax, [rbp+var_58]"], [42, "mov esi, edx"], [43, "mov rdi, rax"], [44, "call sub_403AD0"], [45, "mov [rbp+var_40], rax"], [46, "mov rax, [rbp+var_60]"], [47, "movzx eax, byte ptr [rax+74h]"], [48, "cmp al, 0FFh"], [49, "jz loc_426F95"], [50, "mov rax, [rbp+var_60]"], [51, "mov eax, [rax+70h]"], [52, "mov edx, eax"], [53, "mov rax, [rbp+var_58]"], [54, "mov esi, edx"], [55, "mov rdi, rax"], [56, "call sub_403AD0"], [57, "mov [rbp+var_48], rax"], [58, "mov rax, [rbp+var_28]"], [59, "mov eax, [rax]"], [60, "shl eax, 18h"], [61, "mov ebx, eax"], [62, "mov rax, [rbp+var_40]"], [63, "mov rdi, rax"], [64, "call sub_4048AF"], [65, "shl eax, 10h"], [66, "or ebx, eax"], [67, "mov rax, [rbp+var_48]"], [68, "mov rdi, rax"], [69, "call sub_4048AF"], [70, "shl eax, 8"], [71, "or ebx, eax"], [72, "mov edx, ebx"], [73, "mov rax, [rbp+var_60]"], [74, "movzx eax, byte ptr [rax+74h]"], [75, "movsx eax, al"], [76, "or eax, edx"], [77, "cmp eax, 5050402h"], [78, "jz loc_426D41"], [79, "cmp eax, 5050402h"], [80, "ja loc_426EDB"], [81, "cmp eax, 5050401h"], [82, "jz loc_426CE8"], [83, "cmp eax, 5050401h"], [84, "ja loc_426EDB"], [85, "cmp eax, 5050302h"], [86, "jz loc_426C8F"], [87, "cmp eax, 5050302h"], [88, "ja loc_426EDB"], [89, "cmp eax, 5050301h"], [90, "jz short loc_426C36"], [91, "cmp eax, 5050301h"], [92, "ja loc_426EDB"], [93, "cmp eax, 3050402h"], [94, "jz loc_426E8D"], [95, "cmp eax, 3050402h"], [96, "ja loc_426EDB"], [97, "cmp eax, 3050401h"], [98, "jz loc_426E3C"], [99, "cmp eax, 3050401h"], [100, "ja loc_426EDB"], [101, "cmp eax, 3050301h"], [102, "jz loc_426D9A"], [103, "cmp eax, 3050302h"], [104, "jz loc_426DEB"], [105, "jmp loc_426EDB"], [106, "mov rax, [rbp+var_28]"], [107, "mov rdi, rax"], [108, "call sub_40504A"], [109, "movzx ebx, ax"], [110, "mov rax, [rbp+var_38]"], [111, "mov rdi, rax"], [112, "call sub_40504A"], [113, "movzx edx, ax"], [114, "cmp [rbp+var_30], 0"], [115, "jz short loc_426C62"], [116, "mov esi, 79h "], [117, "jmp short loc_426C67"], [118, "mov esi, 76h "], [119, "mov rax, [rbp+var_58]"], [120, "mov ecx, ebx"], [121, "mov rdi, rax"], [122, "call sub_425479"], [123, "mov rax, [rbp+var_60]"], [124, "mov edx, [rax+60h]"], [125, "mov rax, [rbp+var_58]"], [126, "mov esi, edx"], [127, "mov rdi, rax"], [128, "call sub_425175"], [129, "jmp loc_426F57"], [130, "mov rax, [rbp+var_28]"], [131, "mov rdi, rax"], [132, "call sub_40504A"], [133, "movzx ebx, ax"], [134, "mov rax, [rbp+var_38]"], [135, "mov rdi, rax"], [136, "call sub_40504A"], [137, "movzx edx, ax"], [138, "cmp [rbp+var_30], 0"], [139, "jz short loc_426CBB"], [140, "mov esi, 7Ah "], [141, "jmp short loc_426CC0"], [142, "mov esi, 77h "], [143, "mov rax, [rbp+var_58]"], [144, "mov ecx, ebx"], [145, "mov rdi, rax"], [146, "call sub_425479"], [147, "mov rax, [rbp+var_60]"], [148, "mov edx, [rax+60h]"], [149, "mov rax, [rbp+var_58]"], [150, "mov esi, edx"], [151, "mov rdi, rax"], [152, "call sub_425175"], [153, "jmp loc_426F57"], [154, "mov rax, [rbp+var_28]"], [155, "mov rdi, rax"], [156, "call sub_40504A"], [157, "movzx ebx, ax"], [158, "mov rax, [rbp+var_38]"], [159, "mov rdi, rax"], [160, "call sub_40504A"], [161, "movzx edx, ax"], [162, "cmp [rbp+var_30], 0"], [163, "jz short loc_426D14"], [164, "mov esi, 87h"], [165, "jmp short loc_426D19"], [166, "mov esi, 84h"], [167, "mov rax, [rbp+var_58]"], [168, "mov ecx, ebx"], [169, "mov rdi, rax"], [170, "call sub_425479"], [171, "mov rax, [rbp+var_60]"], [172, "mov edx, [rax+60h]"], [173, "mov rax, [rbp+var_58]"], [174, "mov esi, edx"], [175, "mov rdi, rax"], [176, "call sub_425175"], [177, "jmp loc_426F57"], [178, "mov rax, [rbp+var_28]"], [179, "mov rdi, rax"], [180, "call sub_40504A"], [181, "movzx ebx, ax"], [182, "mov rax, [rbp+var_38]"], [183, "mov rdi, rax"], [184, "call sub_40504A"], [185, "movzx edx, ax"], [186, "cmp [rbp+var_30], 0"], [187, "jz short loc_426D6D"], [188, "mov esi, 88h"], [189, "jmp short loc_426D72"], [190, "mov esi, 85h"], [191, "mov rax, [rbp+var_58]"], [192, "mov ecx, ebx"], [193, "mov rdi, rax"], [194, "call sub_425479"], [195, "mov rax, [rbp+var_60]"], [196, "mov edx, [rax+60h]"], [197, "mov rax, [rbp+var_58]"], [198, "mov esi, edx"], [199, "mov rdi, rax"], [200, "call sub_425175"], [201, "jmp loc_426F57"], [202, "mov rax, [rbp+var_38]"], [203, "mov rdi, rax"], [204, "call sub_40504A"], [205, "movzx edx, ax"], [206, "mov rax, [rbp+var_58]"], [207, "mov esi, 7Bh "], [208, "mov rdi, rax"], [209, "call sub_425431"], [210, "mov rdx, [rbp+var_28]"], [211, "mov rax, [rbp+var_58]"], [212, "mov rsi, rdx"], [213, "mov rdi, rax"], [214, "call sub_40546E"], [215, "mov edx, eax"], [216, "mov rax, [rbp+var_60]"], [217, "mov eax, [rax+60h]"], [218, "add edx, eax"], [219, "mov rax, [rbp+var_58]"], [220, "mov esi, edx"], [221, "mov rdi, rax"], [222, "call sub_425259"], [223, "jmp loc_426F57"], [224, "mov rax, [rbp+var_38]"], [225, "mov rdi, rax"], [226, "call sub_40504A"], [227, "movzx edx, ax"], [228, "mov rax, [rbp+var_58]"], [229, "mov esi, 7Ch "], [230, "mov rdi, rax"], [231, "call sub_425431"], [232, "mov rdx, [rbp+var_28]"], [233, "mov rax, [rbp+var_58]"], [234, "mov rsi, rdx"], [235, "mov rdi, rax"], [236, "call sub_40546E"], [237, "mov edx, eax"], [238, "mov rax, [rbp+var_60]"], [239, "mov eax, [rax+60h]"], [240, "add edx, eax"], [241, "mov rax, [rbp+var_58]"], [242, "mov esi, edx"], [243, "mov rdi, rax"], [244, "call sub_425259"], [245, "jmp loc_426F57"], [246, "mov rax, [rbp+var_38]"], [247, "mov rdi, rax"], [248, "call sub_40504A"], [249, "movzx edx, ax"], [250, "mov rax, [rbp+var_58]"], [251, "mov esi, 89h"], [252, "mov rdi, rax"], [253, "call sub_425431"], [254, "mov rdx, [rbp+var_28]"], [255, "mov rax, [rbp+var_58]"], [256, "mov rsi, rdx"], [257, "mov rdi, rax"], [258, "call sub_40546E"], [259, "mov edx, eax"], [260, "mov rax, [rbp+var_60]"], [261, "mov eax, [rax+60h]"], [262, "add edx, eax"], [263, "mov rax, [rbp+var_58]"], [264, "mov esi, edx"], [265, "mov rdi, rax"], [266, "call sub_425259"], [267, "jmp loc_426F57"], [268, "mov rax, [rbp+var_38]"], [269, "mov rdi, rax"], [270, "call sub_40504A"], [271, "movzx edx, ax"], [272, "mov rax, [rbp+var_58]"], [273, "mov esi, 8Ah"], [274, "mov rdi, rax"], [275, "call sub_425431"], [276, "mov rdx, [rbp+var_28]"], [277, "mov rax, [rbp+var_58]"], [278, "mov rsi, rdx"], [279, "mov rdi, rax"], [280, "call sub_40546E"], [281, "mov edx, eax"], [282, "mov rax, [rbp+var_60]"], [283, "mov eax, [rax+60h]"], [284, "add edx, eax"], [285, "mov rax, [rbp+var_58]"], [286, "mov esi, edx"], [287, "mov rdi, rax"], [288, "call sub_425259"], [289, "jmp short loc_426F57"], [290, "mov rcx, [rbp+var_60]"], [291, "mov rax, [rbp+var_58]"], [292, "mov edx, 0"], [293, "mov rsi, rcx"], [294, "mov rdi, rax"], [295, "call sub_408C23"], [296, "mov rbx, rax"], [297, "mov rax, [rbp+var_60]"], [298, "movzx eax, byte ptr [rax+74h]"], [299, "movsx r12d, al"], [300, "mov rdx, [rbp+var_48]"], [301, "mov rax, [rbp+var_58]"], [302, "mov rsi, rdx"], [303, "mov rdi, rax"], [304, "call sub_4040F1"], [305, "mov r13, rax"], [306, "mov rdx, [rbp+var_40]"], [307, "mov rax, [rbp+var_58]"], [308, "mov rsi, rdx"], [309, "mov rdi, rax"], [310, "call sub_4040F1"], [311, "mov rdx, rax"], [312, "mov rax, [rbp+var_58]"], [313, "push rbx"], [314, "push r12"], [315, "mov r9, r13"], [316, "mov r8, rdx"], [317, "mov ecx, offset aCanTLoadCastTo"], [318, "mov edx, 0B77h"], [319, "mov esi, offset aSrcVmirVmC"], [320, "mov rdi, rax"], [321, "mov eax, 0"], [322, "call sub_4035F5"], [323, "cmp [rbp+var_30], 0"], [324, "jz short loc_426FCA"], [325, "mov rax, [rbp+var_30]"], [326, "mov rdi, rax"], [327, "call sub_40504A"], [328, "movzx edx, ax"], [329, "mov rax, [rbp+var_58]"], [330, "mov esi, edx"], [331, "mov rdi, rax"], [332, "call sub_4250E7"], [333, "mov rax, [rbp+var_60]"], [334, "mov eax, [rax+6Ch]"], [335, "movzx edx, ax"], [336, "mov rax, [rbp+var_58]"], [337, "mov esi, edx"], [338, "mov rdi, rax"], [339, "call sub_4250E7"], [340, "jmp short loc_426FCA"], [341, "mov rax, [rbp+var_60]"], [342, "mov edi, [rax+6Ch]"], [343, "mov rax, [rbp+var_60]"], [344, "mov r9d, [rax+60h]"], [345, "mov r8, [rbp+var_30]"], [346, "mov rcx, [rbp+var_40]"], [347, "mov rdx, [rbp+var_38]"], [348, "mov rsi, [rbp+var_28]"], [349, "mov rax, [rbp+var_58]"], [350, "push [rbp+var_60]"], [351, "push rdi"], [352, "mov rdi, rax"], [353, "call sub_426342"], [354, "add rsp, 10h"], [355, "jmp short loc_426FCB"], [356, "nop"], [357, "lea rsp, [rbp-18h]"], [358, "pop rbx"], [359, "pop r12"], [360, "pop r13"], [361, "pop rbp"], [362, "retn"]], "data_dep": [[8, 7], [9, 8], [10, 9], [11, 6], [12, 10], [13, 11], [15, 14], [16, 7], [17, 16], [18, 17], [19, 18], [20, 7], [21, 20], [22, 21], [23, 6], [24, 22], [25, 23], [29, 26], [29, 28], [30, 7], [31, 30], [32, 31], [33, 6], [34, 32], [35, 33], [37, 36], [38, 7], [39, 38], [40, 39], [41, 6], [42, 40], [43, 41], [45, 44], [46, 7], [47, 46], [48, 47], [49, 48], [50, 7], [51, 50], [52, 51], [53, 6], [54, 52], [55, 53], [57, 56], [58, 15], [59, 58], [60, 59], [61, 60], [62, 45], [63, 62], [65, 64], [66, 61], [66, 65], [67, 57], [68, 67], [70, 69], [71, 66], [71, 70], [72, 71], [73, 7], [74, 73], [75, 74], [76, 72], [76, 75], [77, 76], [78, 77], [79, 76], [80, 79], [81, 76], [82, 81], [83, 76], [84, 83], [85, 76], [86, 85], [87, 76], [88, 87], [89, 76], [90, 89], [91, 76], [92, 91], [93, 76], [94, 93], [95, 76], [96, 95], [97, 76], [98, 97], [99, 76], [100, 99], [101, 76], [102, 101], [103, 76], [104, 103], [106, 15], [107, 106], [109, 108], [110, 37], [111, 110], [113, 112], [114, 29], [115, 114], [119, 6], [120, 109], [121, 119], [123, 7], [124, 123], [125, 6], [126, 124], [127, 125], [130, 15], [131, 130], [133, 132], [134, 37], [135, 134], [137, 136], [138, 29], [139, 138], [143, 6], [144, 133], [145, 143], [147, 7], [148, 147], [149, 6], [150, 148], [151, 149], [154, 15], [155, 154], [157, 156], [158, 37], [159, 158], [161, 160], [162, 29], [163, 162], [167, 6], [168, 157], [169, 167], [171, 7], [172, 171], [173, 6], [174, 172], [175, 173], [178, 15], [179, 178], [181, 180], [182, 37], [183, 182], [185, 184], [186, 29], [187, 186], [191, 6], [192, 181], [193, 191], [195, 7], [196, 195], [197, 6], [198, 196], [199, 197], [202, 37], [203, 202], [205, 204], [206, 6], [208, 206], [210, 15], [211, 6], [212, 210], [213, 211], [215, 214], [216, 7], [217, 216], [218, 215], [218, 217], [219, 6], [220, 218], [221, 219], [224, 37], [225, 224], [227, 226], [228, 6], [230, 228], [232, 15], [233, 6], [234, 232], [235, 233], [237, 236], [238, 7], [239, 238], [240, 237], [240, 239], [241, 6], [242, 240], [243, 241], [246, 37], [247, 246], [249, 248], [250, 6], [252, 250], [254, 15], [255, 6], [256, 254], [257, 255], [259, 258], [260, 7], [261, 260], [262, 261], [262, 259], [263, 6], [264, 262], [265, 263], [268, 37], [269, 268], [271, 270], [272, 6], [274, 272], [276, 15], [277, 6], [278, 276], [279, 277], [281, 280], [282, 7], [283, 282], [284, 283], [284, 281], [285, 6], [286, 284], [287, 285], [290, 7], [291, 6], [293, 290], [294, 291], [296, 295], [297, 7], [298, 297], [299, 298], [300, 57], [301, 6], [302, 300], [303, 301], [305, 304], [306, 45], [307, 6], [308, 306], [309, 307], [311, 310], [312, 6], [313, 296], [314, 299], [315, 305], [316, 311], [320, 312], [323, 29], [324, 323], [325, 29], [326, 325], [328, 327], [329, 6], [330, 328], [331, 329], [333, 7], [334, 333], [335, 334], [336, 6], [337, 335], [338, 336], [341, 7], [342, 341], [343, 7], [344, 343], [345, 29], [346, 45], [347, 37], [348, 15], [349, 6], [350, 7], [351, 342], [352, 349], [354, 5], [357, 5], [357, 354], [358, 4], [359, 3], [360, 2], [361, 0], [362, 266], [362, 339], [362, 222], [362, 128], [362, 176], [362, 244], [362, 200], [362, 152], [362, 353], [362, 288]]}
| {"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/0bdd3e3355b55ed2816435efa21042f8306da2b2ea7b587febce5c0891e6891f_0bdd3e3355b55ed2816435efa21042f8306da2b2ea7b587febce5c0891e6891f.jsonl.gz", "strip_func_name": "sub_426AA1", "query": "\n\n\n_QWORD *__fastcall sub_426AA1(_QWORD *a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 v6; // rcx\n__int64 v7; // r8\n__int64 v8; // r9\n__int64 v9; // rax\n__int64 v10; // rcx\n__int64 v11; // r8\n__int64 v12; // r9\n__int64 v13; // rcx\n__int64 v14; // r8\n__int64 v15; // r9\nunsigned int v16; // ebx\nunsigned int v17; // ebx\nunsigned int v18; // eax\nunsigned __int16 v19; // bx\nunsigned __int16 v20; // dx\nunsigned __int16 v21; // si\n__int64 v22; // rcx\n__int64 v23; // r8\n__int64 v24; // r9\n_QWORD *result; // rax\nunsigned __int16 v26; // ax\n__int64 v27; // rcx\n__int64 v28; // r8\n__int64 v29; // r9\nint v30; // eax\n__int64 v31; // rcx\n__int64 v32; // r8\n__int64 v33; // r9\nunsigned __int16 v34; // ax\n__int64 v35; // rcx\n__int64 v36; // r8\n__int64 v37; // r9\nint v38; // eax\n__int64 v39; // rcx\n__int64 v40; // r8\n__int64 v41; // r9\nunsigned __int16 v42; // ax\n__int64 v43; // rcx\n__int64 v44; // r8\n__int64 v45; // r9\nint v46; // eax\n__int64 v47; // rcx\n__int64 v48; // r8\n__int64 v49; // r9\nunsigned __int16 v50; // ax\n__int64 v51; // rcx\n__int64 v52; // r8\n__int64 v53; // r9\nint v54; // eax\n__int64 v55; // rcx\n__int64 v56; // r8\n__int64 v57; // r9\n__int64 v58; // rbx\n__int64 v59; // r12\n__int64 v60; // r13\n__int64 v61; // rax\nunsigned __int16 v62; // ax\n__int64 v63; // rcx\n__int64 v64; // r8\n__int64 v65; // r9\n__int64 v66; // rcx\n__int64 v67; // r8\n__int64 v68; // r9\nunsigned int *v70; // [rsp+18h] [rbp-48h]\nunsigned int *v71; // [rsp+20h] [rbp-40h]\n_DWORD *v72; // [rsp+28h] [rbp-38h]\n_DWORD *v73; // [rsp+30h] [rbp-30h]\nunsigned int *v74; // [rsp+38h] [rbp-28h]\n\nv74 = (unsigned int *)sub_405159((__int64)a1, *(_DWORD *)(a2 + 88), *(unsigned int *)(a2 + 88), a4, a5, a6);\nif ( *(int *)(a2 + 100) < 0 )\nv9 = 0LL;\nelse\nv9 = sub_405159((__int64)a1, *(_DWORD *)(a2 + 100), *(unsigned int *)(a2 + 100), v6, v7, v8);\nv73 = (_DWORD *)v9;\nv72 = (_DWORD *)sub_405159((__int64)a1, *(_DWORD *)(a2 + 44), *(unsigned int *)(a2 + 44), v6, v7, v8);\nv71 = (unsigned int *)sub_403AD0((__int64)a1, *(_DWORD *)(a2 + 48), *(unsigned int *)(a2 + 48), v10, v11, v12);\nif ( *(_BYTE *)(a2 + 116) == 0xFF )\nreturn sub_426342(a1, v74, v72, v71, v73, *(_DWORD *)(a2 + 96), *(_DWORD *)(a2 + 108), a2);\nv70 = (unsigned int *)sub_403AD0((__int64)a1, *(_DWORD *)(a2 + 112), *(unsigned int *)(a2 + 112), v13, v14, v15);\nv16 = *v74 << 24;\nv17 = ((unsigned int)sub_4048AF(v71) << 16) | v16;\nv18 = ((unsigned int)sub_4048AF(v70) << 8) | v17 | *(char *)(a2 + 116);\nif ( v18 == 84214786 )\n{\nv19 = sub_40504A(v74);\nv20 = sub_40504A(v72);\nif ( v73 )\nv21 = 136;\nelse\nv21 = 133;\n}\nelse\n{\nif ( v18 > 0x5050402 )\ngoto LABEL_34;\nif ( v18 == 84214785 )\n{\nv19 = sub_40504A(v74);\nv20 = sub_40504A(v72);\nif ( v73 )\nv21 = 135;\nelse\nv21 = 132;\n}\nelse if ( v18 == 84214530 )\n{\nv19 = sub_40504A(v74);\nv20 = sub_40504A(v72);\nif ( v73 )\nv21 = 122;\nelse\nv21 = 119;\n}\nelse\n{\nif ( v18 > 0x5050302 )\ngoto LABEL_34;\nif ( v18 != 84214529 )\n{\nif ( v18 == 50660354 )\n{\nv50 = sub_40504A(v72);\nsub_425431(a1, 0x8Au, v50);\nv54 = sub_40546E((__int64)a1, v74, (__int64)v74, v51, v52, v53);\nresult = sub_425259(a1, *(_DWORD *)(a2 + 96) + v54, (unsigned int)(*(_DWORD *)(a2 + 96) + v54), v55, v56, v57);\n}\nelse\n{\nif ( v18 > 0x3050402 )\ngoto LABEL_34;\nswitch ( v18 )\n{\ncase 0x3050401u:\nv42 = sub_40504A(v72);\nsub_425431(a1, 0x89u, v42);\nv46 = sub_40546E((__int64)a1, v74, (__int64)v74, v43, v44, v45);\nresult = sub_425259(\na1,\n*(_DWORD *)(a2 + 96) + v46,\n(unsigned int)(*(_DWORD *)(a2 + 96) + v46),\nv47,\nv48,\nv49);\nbreak;\ncase 0x3050301u:\nv26 = sub_40504A(v72);\nsub_425431(a1, 0x7Bu, v26);\nv30 = sub_40546E((__int64)a1, v74, (__int64)v74, v27, v28, v29);\nresult = sub_425259(\na1,\n*(_DWORD *)(a2 + 96) + v30,\n(unsigned int)(*(_DWORD *)(a2 + 96) + v30),\nv31,\nv32,\nv33);\nbreak;\ncase 0x3050302u:\nv34 = sub_40504A(v72);\nsub_425431(a1, 0x7Cu, v34);\nv38 = sub_40546E((__int64)a1, v74, (__int64)v74, v35, v36, v37);\nresult = sub_425259(\na1,\n*(_DWORD *)(a2 + 96) + v38,\n(unsigned int)(*(_DWORD *)(a2 + 96) + v38),\nv39,\nv40,\nv41);\nbreak;\ndefault:\nLABEL_34:\nv58 = sub_408C23(a1, a2, 0);\nv59 = (unsigned int)*(char *)(a2 + 116);\nv60 = sub_4040F1((__int64)a1, (__int64)v70);\nv61 = sub_4040F1((__int64)a1, (__int64)v71);\nsub_4035F5(\n(__int64)a1,\n(__int64)\"src/vmir_vm.c\",\n0xB77u,\n\"Can't load+cast to %s from %s cast:%d (%s)\",\nv61,\nv60,\nv59,\nv58);\n}\n}\ngoto LABEL_35;\n}\nv19 = sub_40504A(v74);\nv20 = sub_40504A(v72);\nif ( v73 )\nv21 = 121;\nelse\nv21 = 118;\n}\n}\nsub_425479(a1, v21, v20, v19);\nresult = sub_425175(a1, *(_DWORD *)(a2 + 96), *(unsigned int *)(a2 + 96), v22, v23, v24);\nLABEL_35:\nif ( v73 )\n{\nv62 = sub_40504A(v73);\nsub_4250E7(a1, v62, v62, v63, v64, v65);\nresult = sub_4250E7(a1, *(_DWORD *)(a2 + 108), (unsigned __int16)*(_DWORD *)(a2 + 108), v66, v67, v68);\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v70,v71,v73,v74,sub_426AA1,sub_405159,sub_403AD0,sub_426342,sub_4048AF,sub_40504A,sub_425431,sub_40546E,sub_425259,sub_408C23,sub_4040F1,sub_4035F5,sub_425479,sub_425175,sub_4250E7,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'iu', 'a2': 'ii', 'v70': 'pointee', 'v71': 'retty', 'v73': 'roff', 'v74': 'src', 'sub_426AA1': 'emit_load', 'sub_405159': 'value_get', 'sub_403AD0': 'type_get', 'sub_426342': 'emit_load1', 'sub_4048AF': 'legalize_type', 'sub_40504A': 'value_reg', 'sub_425431': 'emit_op1', 'sub_40546E': 'value_get_const32', 'sub_425259': 'emit_i32', 'sub_408C23': 'instr_str', 'sub_4040F1': 'type_str', 'sub_4035F5': 'parser_error0', 'sub_425479': 'emit_op2', 'sub_425175': 'emit_imm16', 'sub_4250E7': 'emit_i16'}"} |
|
end_timer | 076c9a386606a2b4fc158c173e645ec4b4e9f1600f2909b2370b2a17277091de | tridge | junkcode | NA | double end_timer()
{
gettimeofday(&tp2,NULL);
return((tp2.tv_sec - tp1.tv_sec) +
(tp2.tv_usec - tp1.tv_usec)*1.0e-6);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401C9A", "function_addr": 4201626, "binary_name": "076c9a386606a2b4fc158c173e645ec4b4e9f1600f2909b2370b2a17277091de.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov esi, 0"], [3, "mov edi, offset stru_4042E0"], [4, "call _gettimeofday"], [5, "mov rax, cs:stru_4042E0.tv_sec"], [6, "mov rdx, cs:tv.tv_sec"], [7, "sub rax, rdx"], [8, "pxor xmm1, xmm1"], [9, "cvtsi2sd xmm1, rax"], [10, "mov rax, cs:stru_4042E0.tv_usec"], [11, "mov rdx, cs:tv.tv_usec"], [12, "sub rax, rdx"], [13, "pxor xmm2, xmm2"], [14, "cvtsi2sd xmm2, rax"], [15, "movsd xmm0, cs:qword_402288"], [16, "mulsd xmm0, xmm2"], [17, "addsd xmm0, xmm1"], [18, "movq rax, xmm0"], [19, "movq xmm0, rax"], [20, "pop rbp"], [21, "retn"]], "data_dep": [[7, 6], [7, 5], [9, 8], [9, 7], [12, 11], [12, 10], [14, 13], [14, 12], [16, 14], [16, 15], [17, 16], [17, 9], [18, 17], [19, 18], [20, 0], [21, 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/076c9a386606a2b4fc158c173e645ec4b4e9f1600f2909b2370b2a17277091de_076c9a386606a2b4fc158c173e645ec4b4e9f1600f2909b2370b2a17277091de.jsonl.gz", "strip_func_name": "sub_401C9A", "query": "\n\n\ndouble sub_401C9A()\n{\ngettimeofday(&stru_4042E0, 0LL);\nreturn 0.000001 * (double)(LODWORD(stru_4042E0.tv_usec) - LODWORD(tv.tv_usec))\n+ (double)(LODWORD(stru_4042E0.tv_sec) - LODWORD(tv.tv_sec));\n}\n\n\n\nQ:[sub_401C9A,]\nAssistant: ", "hints": "[]", "response": "{'sub_401C9A': 'end_timer'}"} |
|
delayed_trigger | 5b4a6854c7a9b97be9d7bf435821c48ce23e4de1c96dc92250380b12856aa5f8 | hodefoting | kernagic | NA | static gboolean delayed_trigger (gpointer foo)
{
GString *str = g_string_new ("");
configure_kernagic ();
g_string_append (str, gtk_entry_get_text (GTK_ENTRY (test_text)));
if (ipsum)
g_string_append (str, ipsum);
kernagic_set_glyph_string (str->str);
g_string_free (str, TRUE);
kernagic_compute (NULL);
redraw_test_text ( gtk_entry_get_text (GTK_ENTRY (test_text)),toggle_measurement_lines);
gtk_widget_queue_draw (preview);
if (GWindex)
gtk_widget_queue_draw (GWindex);
delayed_updater = 0;
return FALSE;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40E372", "function_addr": 4252530, "binary_name": "5b4a6854c7a9b97be9d7bf435821c48ce23e4de1c96dc92250380b12856aa5f8.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 28h"], [4, "mov [rbp+var_28], rdi"], [5, "lea rdi, aGlyph_1+9"], [6, "call _g_string_new"], [7, "mov [rbp+var_18], rax"], [8, "call sub_40E1AF"], [9, "call _gtk_entry_get_type"], [10, "mov rdx, rax"], [11, "mov rax, cs:qword_41B780"], [12, "mov rsi, rdx"], [13, "mov rdi, rax"], [14, "call _g_type_check_instance_cast"], [15, "mov rdi, rax"], [16, "call _gtk_entry_get_text"], [17, "mov rdx, rax"], [18, "mov rax, [rbp+var_18]"], [19, "mov rsi, rdx"], [20, "mov rdi, rax"], [21, "call _g_string_append"], [22, "mov rax, cs:qword_41B768"], [23, "test rax, rax"], [24, "jz short loc_40E3EA"], [25, "mov rdx, cs:qword_41B768"], [26, "mov rax, [rbp+var_18]"], [27, "mov rsi, rdx"], [28, "mov rdi, rax"], [29, "call _g_string_append"], [30, "mov rax, [rbp+var_18]"], [31, "mov rax, [rax]"], [32, "mov rdi, rax"], [33, "call sub_408D3D"], [34, "mov rax, [rbp+var_18]"], [35, "mov esi, 1"], [36, "mov rdi, rax"], [37, "call _g_string_free"], [38, "mov edi, 0"], [39, "call sub_40A073"], [40, "mov rax, offset unk_41E864"], [41, "mov ebx, [rax]"], [42, "call _gtk_entry_get_type"], [43, "mov rdx, rax"], [44, "mov rax, cs:qword_41B780"], [45, "mov rsi, rdx"], [46, "mov rdi, rax"], [47, "call _g_type_check_instance_cast"], [48, "mov rdi, rax"], [49, "call _gtk_entry_get_text"], [50, "mov esi, ebx"], [51, "mov rdi, rax"], [52, "call sub_4121B6"], [53, "mov rax, cs:qword_41B770"], [54, "mov rdi, rax"], [55, "call _gtk_widget_queue_draw"], [56, "mov rax, cs:qword_41B778"], [57, "test rax, rax"], [58, "jz short loc_40E473"], [59, "mov rax, cs:qword_41B778"], [60, "mov rdi, rax"], [61, "call _gtk_widget_queue_draw"], [62, "mov cs:dword_41B810, 0"], [63, "mov eax, 0"], [64, "mov rbx, [rbp+var_8]"], [65, "leave"], [66, "retn"]], "data_dep": [[7, 6], [10, 9], [12, 10], [13, 11], [15, 14], [17, 16], [18, 7], [19, 17], [20, 18], [23, 22], [24, 23], [26, 7], [27, 25], [28, 26], [30, 7], [31, 30], [32, 31], [34, 7], [36, 34], [41, 40], [43, 42], [45, 43], [46, 44], [48, 47], [50, 41], [51, 49], [54, 53], [57, 56], [58, 57], [60, 59], [66, 63]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/5b4a6854c7a9b97be9d7bf435821c48ce23e4de1c96dc92250380b12856aa5f8_5b4a6854c7a9b97be9d7bf435821c48ce23e4de1c96dc92250380b12856aa5f8.jsonl.gz", "strip_func_name": "sub_40E372", "query": "\n\n\n__int64 __fastcall sub_40E372(double a1)\n{\nunsigned int v1; // ebx\n__int64 v2; // rax\n__int64 *v4; // [rsp+18h] [rbp-18h]\n\nv4 = (__int64 *)g_string_new();\nsub_40E1AF(a1);\ngtk_entry_get_type();\ng_type_check_instance_cast();\ngtk_entry_get_text();\ng_string_append();\nif ( qword_41B768 )\ng_string_append();\nsub_408D3D(*v4);\ng_string_free();\nsub_40A073(0LL, a1);\nv1 = unk_41E864;\ngtk_entry_get_type();\ng_type_check_instance_cast();\nv2 = gtk_entry_get_text();\nsub_4121B6(v2, v1);\ngtk_widget_queue_draw();\nif ( qword_41B778 )\ngtk_widget_queue_draw();\ndword_41B810 = 0;\nreturn 0LL;\n}\n\n\n\nQ:[v4,sub_40E372,sub_40E1AF,sub_408D3D,sub_40A073,sub_4121B6,]\nAssistant: ", "hints": "[]", "response": "{'v4': 'str', 'sub_40E372': 'delayed_trigger', 'sub_40E1AF': 'configure_kernagic', 'sub_408D3D': 'kernagic_set_glyph_string', 'sub_40A073': 'kernagic_compute', 'sub_4121B6': 'redraw_test_text'}"} |
|
_smartdns_load_from_resolv_file | 556e0263abbe1e4daef5ea125859adebb55575ea4fa8d33e6255954205d7ba5b | pymumu | smartdns | NA | static int _smartdns_load_from_resolv_file(const char *resolv_file)
{
FILE *fp = NULL;
char line[MAX_LINE_LEN];
char key[MAX_KEY_LEN] = {0};
char value[MAX_LINE_LEN];
char ns_ip[DNS_MAX_IPLEN];
int port = PORT_NOT_DEFINED;
int ret = -1;
int filed_num = 0;
int line_num = 0;
fp = fopen(resolv_file, "r");
if (fp == NULL) {
tlog(TLOG_ERROR, "open %s failed, %s", resolv_file, strerror(errno));
return -1;
}
while (fgets(line, MAX_LINE_LEN, fp)) {
line_num++;
filed_num = sscanf(line, "%63s %1023[^\r\n]s", key, value);
if (filed_num != 2) {
continue;
}
if (strncmp(key, "nameserver", MAX_KEY_LEN - 1) != 0) {
continue;
}
if (parse_ip(value, ns_ip, &port) != 0) {
continue;
}
if (port == PORT_NOT_DEFINED) {
port = DEFAULT_DNS_PORT;
}
safe_strncpy(dns_conf_servers[dns_conf_server_num].server, ns_ip, DNS_MAX_IPLEN);
dns_conf_servers[dns_conf_server_num].port = port;
dns_conf_servers[dns_conf_server_num].type = DNS_SERVER_UDP;
dns_conf_servers[dns_conf_server_num].set_mark = -1;
dns_conf_server_num++;
ret = 0;
}
fclose(fp);
return ret;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4065A4", "function_addr": 4220324, "binary_name": "556e0263abbe1e4daef5ea125859adebb55575ea4fa8d33e6255954205d7ba5b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40C0h"], [3, "mov [rbp+filename], rdi"], [4, "mov [rbp+stream], 0"], [5, "mov [rbp+var_2060], 0"], [6, "mov [rbp+var_2058], 0"], [7, "mov [rbp+var_2050], 0"], [8, "mov [rbp+var_2048], 0"], [9, "mov [rbp+var_2040], 0"], [10, "mov [rbp+var_2038], 0"], [11, "mov [rbp+var_2030], 0"], [12, "mov [rbp+var_2028], 0"], [13, "mov [rbp+var_40A4], 0FFFFFFFFh"], [14, "mov [rbp+var_4], 0FFFFFFFFh"], [15, "mov [rbp+var_14], 0"], [16, "mov [rbp+var_8], 0"], [17, "mov rax, [rbp+filename]"], [18, "mov esi, offset modes"], [19, "mov rdi, rax"], [20, "call _fopen"], [21, "mov [rbp+stream], rax"], [22, "cmp [rbp+stream], 0"], [23, "jnz loc_4067E4"], [24, "call ___errno_location"], [25, "mov eax, [rax]"], [26, "mov edi, eax"], [27, "call _strerror"], [28, "push rax"], [29, "push [rbp+filename]"], [30, "mov r9d, offset aOpenSFailedS"], [31, "mov r8d, 0"], [32, "mov ecx, offset aSmartdnsLoadFr"], [33, "mov edx, 0C2h"], [34, "mov esi, offset aSmartdnsC"], [35, "mov edi, 4"], [36, "mov eax, 0"], [37, "call sub_438748"], [38, "add rsp, 10h"], [39, "mov eax, 0FFFFFFFFh"], [40, "jmp locret_406814"], [41, "add [rbp+var_8], 1"], [42, "lea rcx, [rbp+var_4060]"], [43, "lea rdx, [rbp+var_2060]"], [44, "lea rax, [rbp+s]"], [45, "mov esi, offset a63s1023S"], [46, "mov rdi, rax"], [47, "mov eax, 0"], [48, "call _sscanf"], [49, "mov [rbp+var_14], eax"], [50, "cmp [rbp+var_14], 2"], [51, "jz short loc_4066DE"], [52, "jmp loc_4067E4"], [53, "lea rax, [rbp+var_2060]"], [54, "mov rdx, rax"], [55, "mov eax, offset aNameserver"], [56, "mov ecx, 0Bh"], [57, "mov rsi, rdx"], [58, "mov rdi, rax"], [59, "repe cmpsb"], [60, "setnbe al"], [61, "setb dl"], [62, "sub eax, edx"], [63, "movsx eax, al"], [64, "test eax, eax"], [65, "jz short loc_40670E"], [66, "jmp loc_4067E4"], [67, "lea rdx, [rbp+var_40A4]"], [68, "lea rcx, [rbp+var_40A0]"], [69, "lea rax, [rbp+var_4060]"], [70, "mov rsi, rcx"], [71, "mov rdi, rax"], [72, "call sub_43475A"], [73, "test eax, eax"], [74, "jz short loc_406737"], [75, "jmp loc_4067E4"], [76, "mov eax, [rbp+var_40A4]"], [77, "cmp eax, 0FFFFFFFFh"], [78, "jnz short loc_40674C"], [79, "mov [rbp+var_40A4], 35h "], [80, "mov eax, cs:dword_581CA0"], [81, "cdqe"], [82, "imul rax, 558h"], [83, "lea rcx, unk_56C620[rax]"], [84, "lea rax, [rbp+var_40A0]"], [85, "mov edx, 40h "], [86, "mov rsi, rax"], [87, "mov rdi, rcx"], [88, "call sub_4060F2"], [89, "mov edx, [rbp+var_40A4]"], [90, "mov eax, cs:dword_581CA0"], [91, "cdqe"], [92, "imul rax, 558h"], [93, "add rax, 56C660h"], [94, "mov [rax], dx"], [95, "mov eax, cs:dword_581CA0"], [96, "cdqe"], [97, "imul rax, 558h"], [98, "add rax, 56C670h"], [99, "mov dword ptr [rax], 0"], [100, "mov eax, cs:dword_581CA0"], [101, "cdqe"], [102, "imul rax, 558h"], [103, "add rax, 56C678h"], [104, "mov qword ptr [rax], 0FFFFFFFFFFFFFFFFh"], [105, "mov eax, cs:dword_581CA0"], [106, "add eax, 1"], [107, "mov cs:dword_581CA0, eax"], [108, "mov [rbp+var_4], 0"], [109, "mov rdx, [rbp+stream]"], [110, "lea rax, [rbp+s]"], [111, "mov esi, 2000h"], [112, "mov rdi, rax"], [113, "call _fgets"], [114, "test rax, rax"], [115, "jnz loc_4066A5"], [116, "mov rax, [rbp+stream]"], [117, "mov rdi, rax"], [118, "call _fclose"], [119, "mov eax, [rbp+var_4]"], [120, "leave"], [121, "retn"]], "data_dep": [[17, 3], [19, 17], [21, 20], [22, 21], [23, 22], [25, 24], [26, 25], [28, 27], [29, 3], [38, 2], [41, 16], [41, 41], [42, 68], [42, 56], [42, 42], [42, 83], [43, 5], [43, 109], [44, 114], [46, 44], [49, 48], [50, 49], [51, 50], [53, 5], [53, 48], [54, 53], [57, 54], [58, 55], [59, 59], [60, 55], [60, 50], [61, 54], [61, 50], [62, 60], [62, 61], [63, 62], [64, 63], [65, 64], [67, 13], [67, 61], [67, 79], [68, 56], [69, 64], [70, 68], [71, 69], [73, 72], [74, 73], [76, 79], [76, 13], [77, 76], [78, 77], [80, 107], [82, 80], [83, 68], [84, 82], [86, 84], [87, 83], [89, 13], [89, 79], [90, 107], [92, 90], [93, 92], [94, 89], [94, 93], [95, 107], [97, 95], [98, 97], [99, 98], [100, 107], [102, 100], [103, 102], [104, 103], [105, 107], [106, 105], [107, 106], [109, 21], [110, 20], [110, 106], [110, 48], [110, 64], [110, 73], [112, 110], [114, 113], [115, 114], [116, 21], [117, 116], [119, 14], [119, 108], [121, 39], [121, 119]]}
| {"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_4065A4", "query": "\n\n\n__int64 __fastcall sub_4065A4(const char *a1)\n{\nint *v1; // rax\nchar *v2; // rax\n__int64 result; // rax\nint v4; // [rsp+1Ch] [rbp-40A4h] BYREF\nchar v5[64]; // [rsp+20h] [rbp-40A0h] BYREF\nchar v6[8192]; // [rsp+60h] [rbp-4060h] BYREF\n__int64 v7[8]; // [rsp+2060h] [rbp-2060h] BYREF\nchar s[8204]; // [rsp+20A0h] [rbp-2020h] BYREF\nint v9; // [rsp+40ACh] [rbp-14h]\nFILE *stream; // [rsp+40B0h] [rbp-10h]\nint v11; // [rsp+40B8h] [rbp-8h]\nunsigned int v12; // [rsp+40BCh] [rbp-4h]\n\nv7[0] = 0LL;\nv7[1] = 0LL;\nv7[2] = 0LL;\nv7[3] = 0LL;\nv7[4] = 0LL;\nv7[5] = 0LL;\nv7[6] = 0LL;\nv7[7] = 0LL;\nv4 = -1;\nv12 = -1;\nv9 = 0;\nv11 = 0;\nstream = fopen(a1, \"r\");\nif ( stream )\n{\nwhile ( fgets(s, 0x2000, stream) )\n{\n++v11;\nv9 = sscanf(s, \"%63s %1023[^\\r\\n]s\", v7, v6);\nif ( v9 == 2 && !strcmp((const char *)v7, \"nameserver\") && !(unsigned int)sub_43475A(v6, v5, &v4) )\n{\nif ( v4 == -1 )\nv4 = 53;\nsub_4060F2(&byte_56C620[1368 * dword_581CA0], v5, 64LL);\n*(_WORD *)&byte_56C620[1368 * dword_581CA0 + 64] = v4;\n*(_DWORD *)&byte_56C620[1368 * dword_581CA0 + 80] = 0;\n*(_QWORD *)&byte_56C620[1368 * dword_581CA0++ + 88] = -1LL;\nv12 = 0;\n}\n}\nfclose(stream);\nresult = v12;\n}\nelse\n{\nv1 = __errno_location();\nv2 = strerror(*v1);\nsub_438748(\n4,\n(unsigned int)\"smartdns.c\",\n194,\n(unsigned int)\"_smartdns_load_from_resolv_file\",\n0,\n(unsigned int)\"open %s failed, %s\",\na1,\nv2);\nresult = 0xFFFFFFFFLL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,v4,v5,v6,v7,s,v9,stream,v11,sub_4065A4,sub_43475A,sub_4060F2,sub_438748,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'resolv_file', 'v4': 'port', 'v5': 'ns_ip', 'v6': 'value', 'v7': 'key', 's': 'line', 'v9': 'filed_num', 'stream': 'fp', 'v11': 'line_num', 'sub_4065A4': '_smartdns_load_from_resolv_file', 'sub_43475A': 'parse_ip', 'sub_4060F2': 'safe_strncpy', 'sub_438748': 'tlog_ext'}"} |
|
usage | 6b67acc992c724fcce2159b155b9110fd46c721e66557f07f2d0b1d080b2928b | hecomi | node-julius | NA | static void
usage(char *s)
{
printf("mkbinhmm: convert HMM definition file to binary format for Julius\n");
printf("usage: %s [-htkconf HTKConfig] hmmdefs binhmm\n", s);
printf("\nLibrary configuration: ");
confout_version(stdout);
confout_am(stdout);
printf("\n");
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402432", "function_addr": 4203570, "binary_name": "6b67acc992c724fcce2159b155b9110fd46c721e66557f07f2d0b1d080b2928b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "lea rdi, s"], [5, "call _puts"], [6, "mov rax, [rbp+var_8]"], [7, "mov rsi, rax"], [8, "lea rdi, format"], [9, "mov eax, 0"], [10, "call _printf"], [11, "lea rdi, aLibraryConfigu"], [12, "mov eax, 0"], [13, "call _printf"], [14, "mov rax, cs:stdout_ptr"], [15, "mov rax, [rax]"], [16, "mov rdi, rax"], [17, "call sub_40B55F"], [18, "mov rax, cs:stdout_ptr"], [19, "mov rax, [rax]"], [20, "mov rdi, rax"], [21, "call sub_40B6EE"], [22, "mov edi, 0Ah"], [23, "call _putchar"], [24, "nop"], [25, "leave"], [26, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 4], [11, 8], [15, 14], [16, 15], [19, 18], [20, 19], [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/6b67acc992c724fcce2159b155b9110fd46c721e66557f07f2d0b1d080b2928b_6b67acc992c724fcce2159b155b9110fd46c721e66557f07f2d0b1d080b2928b.jsonl.gz", "strip_func_name": "sub_402432", "query": "\n\n\nint __fastcall sub_402432(const char *a1)\n{\nputs(\"mkbinhmm: convert HMM definition file to binary format for Julius\");\nprintf(\"usage: %s [-htkconf HTKConfig] hmmdefs binhmm\\n\", a1);\nprintf(\"\\nLibrary configuration: \");\nsub_40B55F(stdout);\nsub_40B6EE(stdout);\nreturn putchar(10);\n}\n\n\n\nQ:[a1,sub_402432,sub_40B55F,sub_40B6EE,]\nAssistant: ", "hints": "[]", "response": "{'a1': 's', 'sub_402432': 'usage', 'sub_40B55F': 'confout_version', 'sub_40B6EE': 'confout_am'}"} |
|
bpf_map__pin | 43930efbf7f49e9230654421eb5b1e9c224e2d5e0333a9e7aabf3997f8c39fd3 | gfreewind | kernel_comment | NA | int bpf_map__pin(struct bpf_map *map, const char *path)
{
int err;
err = check_path(path);
if (err)
return err;
if (map == NULL) {
pr_warning("invalid map pointer\n");
return -EINVAL;
}
if (bpf_obj_pin(map->fd, path)) {
pr_warning("failed to pin map: %s\n", strerror(errno));
return -errno;
}
pr_debug("pinned map '%s'\n", path);
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40ED0C", "function_addr": 4254988, "binary_name": "43930efbf7f49e9230654421eb5b1e9c224e2d5e0333a9e7aabf3997f8c39fd3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 28h"], [4, "mov [rbp+var_28], rdi"], [5, "mov [rbp+var_30], rsi"], [6, "mov rax, [rbp+var_30]"], [7, "mov rdi, rax"], [8, "call sub_40E8A3"], [9, "mov [rbp+var_14], eax"], [10, "cmp [rbp+var_14], 0"], [11, "jz short loc_40ED3A"], [12, "mov eax, [rbp+var_14]"], [13, "jmp loc_40EDEE"], [14, "cmp [rbp+var_28], 0"], [15, "jnz short loc_40ED6C"], [16, "mov rax, cs:off_419360"], [17, "test rax, rax"], [18, "jz short loc_40ED62"], [19, "mov rdx, cs:off_419360"], [20, "lea rdi, aLibbpfInvalidM"], [21, "mov eax, 0"], [22, "call rdx "], [23, "mov eax, 0FFFFFFEAh"], [24, "jmp loc_40EDEE"], [25, "mov rax, [rbp+var_28]"], [26, "mov eax, [rax]"], [27, "mov rdx, [rbp+var_30]"], [28, "mov rsi, rdx"], [29, "mov edi, eax"], [30, "call sub_410D82"], [31, "test eax, eax"], [32, "jz short loc_40EDC1"], [33, "mov rax, cs:off_419360"], [34, "test rax, rax"], [35, "jz short loc_40EDB6"], [36, "mov rbx, cs:off_419360"], [37, "call ___errno_location"], [38, "mov eax, [rax]"], [39, "mov edi, eax"], [40, "call _strerror"], [41, "mov rsi, rax"], [42, "lea rdi, aLibbpfFailedTo_24"], [43, "mov eax, 0"], [44, "call rbx "], [45, "call ___errno_location"], [46, "mov eax, [rax]"], [47, "neg eax"], [48, "jmp short loc_40EDEE"], [49, "mov rax, cs:qword_419440"], [50, "test rax, rax"], [51, "jz short loc_40EDE9"], [52, "mov rdx, cs:qword_419440"], [53, "mov rax, [rbp+var_30]"], [54, "mov rsi, rax"], [55, "lea rdi, aLibbpfPinnedMa"], [56, "mov eax, 0"], [57, "call rdx "], [58, "mov eax, 0"], [59, "mov rbx, [rbp+var_8]"], [60, "leave"], [61, "retn"]], "data_dep": [[6, 5], [7, 6], [9, 8], [10, 9], [11, 10], [12, 9], [14, 4], [15, 14], [17, 16], [18, 17], [20, 7], [22, 19], [25, 4], [26, 25], [27, 5], [28, 27], [29, 26], [31, 30], [32, 31], [34, 33], [35, 34], [38, 37], [39, 38], [41, 40], [42, 39], [44, 36], [46, 45], [47, 46], [50, 49], [51, 50], [53, 5], [54, 53], [55, 29], [57, 52], [61, 58], [61, 12], [61, 23], [61, 47]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/43930efbf7f49e9230654421eb5b1e9c224e2d5e0333a9e7aabf3997f8c39fd3_43930efbf7f49e9230654421eb5b1e9c224e2d5e0333a9e7aabf3997f8c39fd3.jsonl.gz", "strip_func_name": "sub_40ED0C", "query": "\n\n\n__int64 __fastcall sub_40ED0C(unsigned int *a1, const char *a2)\n{\n__int64 result; // rax\nvoid (*v3)(const char *, __int64, __int64, __int64, __int64, __int64, ...); // rbx\nint *v4; // rax\nchar *v5; // rax\n__int64 v6; // rdx\n__int64 v7; // rcx\n__int64 v8; // r8\n__int64 v9; // r9\nunsigned int v10; // [rsp+1Ch] [rbp-14h]\n\nv10 = sub_40E8A3(a2);\nif ( v10 )\nreturn v10;\nif ( a1 )\n{\nif ( (unsigned int)sub_410D82(*a1, a2) )\n{\nif ( off_419360 )\n{\nv3 = (void (*)(const char *, __int64, __int64, __int64, __int64, __int64, ...))off_419360;\nv4 = __errno_location();\nv5 = strerror(*v4);\nv3(\"libbpf: failed to pin map: %s\\n\", (__int64)v5, v6, v7, v8, v9);\n}\nresult = (unsigned int)-*__errno_location();\n}\nelse\n{\nif ( qword_419440 )\nqword_419440(\"libbpf: pinned map '%s'\\n\", a2);\nresult = 0LL;\n}\n}\nelse\n{\nif ( off_419360 )\noff_419360(\"libbpf: invalid map pointer\\n\");\nresult = 4294967274LL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v10,sub_40ED0C,sub_40E8A3,sub_410D82,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'map', 'a2': 'path', 'v10': 'err', 'sub_40ED0C': 'bpf_map__pin', 'sub_40E8A3': 'check_path', 'sub_410D82': 'bpf_obj_pin'}"} |
|
mycss_property_parser_continue | fae6ec7055d349e9fa0a2e92e40c5a6b2d3d093ec925c965855a0e8611ff28e5 | lexborisov | Modest | NA | bool mycss_property_parser_continue(mycss_entry_t* entry, mycss_token_t* token, bool last_response)
{
return mycss_property_shared_switch_to_parse_error(entry);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42EDA6", "function_addr": 4386214, "binary_name": "fae6ec7055d349e9fa0a2e92e40c5a6b2d3d093ec925c965855a0e8611ff28e5.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 eax, edx"], [6, "mov [rbp+var_14], al"], [7, "mov rax, [rbp+var_8]"], [8, "mov rdi, rax"], [9, "call sub_42FF6A"], [10, "leave"], [11, "retn"]], "data_dep": [[6, 5], [7, 3], [8, 7], [11, 9]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/fae6ec7055d349e9fa0a2e92e40c5a6b2d3d093ec925c965855a0e8611ff28e5_fae6ec7055d349e9fa0a2e92e40c5a6b2d3d093ec925c965855a0e8611ff28e5.jsonl.gz", "strip_func_name": "sub_42EDA6", "query": "\n\n\n__int64 __fastcall sub_42EDA6(__int64 a1)\n{\nreturn sub_42FF6A(a1);\n}\n\n\n\nQ:[a1,sub_42EDA6,sub_42FF6A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'entry', 'sub_42EDA6': 'mycss_property_parser_continue', 'sub_42FF6A': 'mycss_property_shared_switch_to_parse_error'}"} |
|
sdb_foreach_cdb | 345e2c68c25dad6a084a3c53539a7cb8620e3db073e7f9dfc62b69896d2a1c26 | radareorg | sdb | NA | static bool sdb_foreach_cdb(Sdb *s, SdbForeachCallback cb, SdbForeachCallback cb2, void *user) {
char *v = NULL;
char k[SDB_MAX_KEY] = {0};
bool found;
sdb_dump_begin (s);
while (sdb_dump_dupnext (s, k, &v, NULL)) {
SdbKv *kv = sdb_ht_find_kvp (s->ht, k, &found);
if (found) {
sdb_gh_free (v);
if (kv && sdbkv_key (kv) && sdbkv_value (kv)) {
if (!cb (user, sdbkv_key (kv), sdbkv_value (kv))) {
return false;
}
if (cb2 && !cb2 (user, k, sdbkv_value (kv))) {
return false;
}
}
} else {
if (!cb (user, k, v)) {
sdb_gh_free (v);
return false;
}
sdb_gh_free (v);
}
}
return true;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_408167", "function_addr": 4227431, "binary_name": "345e2c68c25dad6a084a3c53539a7cb8620e3db073e7f9dfc62b69896d2a1c26.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 148h"], [4, "mov [rbp+var_138], rdi"], [5, "mov [rbp+var_140], rsi"], [6, "mov [rbp+var_148], rdx"], [7, "mov [rbp+var_150], rcx"], [8, "mov [rbp+var_20], 0"], [9, "mov [rbp+var_120], 0"], [10, "mov [rbp+var_118], 0"], [11, "lea rdx, [rbp+var_110]"], [12, "mov eax, 0"], [13, "mov ecx, 1Dh"], [14, "mov rdi, rdx"], [15, "rep stosq"], [16, "mov rdx, rdi"], [17, "mov [rdx], eax"], [18, "add rdx, 4"], [19, "mov [rdx], ax"], [20, "add rdx, 2"], [21, "mov [rdx], al"], [22, "add rdx, 1"], [23, "mov rax, [rbp+var_138]"], [24, "mov rdi, rax"], [25, "call sub_40883D"], [26, "jmp loc_40833F"], [27, "mov rax, [rbp+var_138]"], [28, "mov rax, [rax+2CA0h]"], [29, "lea rdx, [rbp+var_121]"], [30, "lea rcx, [rbp+var_120]"], [31, "mov rsi, rcx"], [32, "mov rdi, rax"], [33, "call sub_405C99"], [34, "mov [rbp+var_18], rax"], [35, "movzx eax, [rbp+var_121]"], [36, "test al, al"], [37, "jz loc_4082F7"], [38, "mov rax, [rbp+var_20]"], [39, "mov rdi, rax"], [40, "call sub_405E24"], [41, "cmp [rbp+var_18], 0"], [42, "jz loc_40833F"], [43, "mov rax, [rbp+var_18]"], [44, "mov rdi, rax"], [45, "call sub_405ECF"], [46, "test rax, rax"], [47, "jz loc_40833F"], [48, "mov rax, [rbp+var_18]"], [49, "mov rdi, rax"], [50, "call sub_405EE0"], [51, "test rax, rax"], [52, "jz loc_40833F"], [53, "mov rax, [rbp+var_18]"], [54, "mov rdi, rax"], [55, "call sub_405EE0"], [56, "mov rbx, rax"], [57, "mov rax, [rbp+var_18]"], [58, "mov rdi, rax"], [59, "call sub_405ECF"], [60, "mov rsi, rax"], [61, "mov rax, [rbp+var_150]"], [62, "mov rcx, [rbp+var_140]"], [63, "mov rdx, rbx"], [64, "mov rdi, rax"], [65, "call rcx"], [66, "xor eax, 1"], [67, "test al, al"], [68, "jz short loc_4082AE"], [69, "mov eax, 0"], [70, "jmp loc_40836B"], [71, "cmp [rbp+var_148], 0"], [72, "jz loc_40833F"], [73, "mov rax, [rbp+var_18]"], [74, "mov rdi, rax"], [75, "call sub_405EE0"], [76, "mov rdx, rax"], [77, "lea rcx, [rbp+var_120]"], [78, "mov rax, [rbp+var_150]"], [79, "mov r8, [rbp+var_148]"], [80, "mov rsi, rcx"], [81, "mov rdi, rax"], [82, "call r8"], [83, "xor eax, 1"], [84, "test al, al"], [85, "jz short loc_40833F"], [86, "mov eax, 0"], [87, "jmp short loc_40836B"], [88, "mov rdx, [rbp+var_20]"], [89, "lea rcx, [rbp+var_120]"], [90, "mov rax, [rbp+var_150]"], [91, "mov r8, [rbp+var_140]"], [92, "mov rsi, rcx"], [93, "mov rdi, rax"], [94, "call r8"], [95, "xor eax, 1"], [96, "test al, al"], [97, "jz short loc_408333"], [98, "mov rax, [rbp+var_20]"], [99, "mov rdi, rax"], [100, "call sub_405E24"], [101, "mov eax, 0"], [102, "jmp short loc_40836B"], [103, "mov rax, [rbp+var_20]"], [104, "mov rdi, rax"], [105, "call sub_405E24"], [106, "lea rdx, [rbp+var_20]"], [107, "lea rsi, [rbp+var_120]"], [108, "mov rax, [rbp+var_138]"], [109, "mov ecx, 0"], [110, "mov rdi, rax"], [111, "call sub_408AE0"], [112, "test al, al"], [113, "jnz loc_4081EE"], [114, "mov eax, 1"], [115, "mov rbx, [rbp+var_8]"], [116, "leave"], [117, "retn"]], "data_dep": [[14, 11], [16, 14], [17, 12], [17, 16], [18, 16], [19, 18], [19, 12], [20, 18], [21, 20], [21, 12], [22, 20], [23, 4], [24, 23], [27, 4], [28, 21], [28, 27], [28, 17], [28, 19], [29, 106], [30, 9], [30, 109], [31, 30], [32, 28], [34, 33], [36, 35], [37, 36], [38, 8], [39, 38], [41, 34], [42, 41], [43, 34], [44, 43], [46, 45], [47, 46], [48, 34], [49, 48], [51, 50], [52, 51], [53, 34], [54, 53], [56, 55], [57, 34], [58, 57], [60, 59], [61, 7], [62, 5], [63, 56], [64, 61], [65, 62], [66, 65], [67, 66], [68, 67], [71, 6], [72, 71], [73, 34], [74, 73], [76, 75], [77, 62], [77, 9], [78, 7], [79, 6], [80, 77], [81, 78], [82, 79], [83, 82], [84, 83], [85, 84], [88, 8], [89, 30], [89, 9], [90, 7], [91, 5], [92, 89], [93, 90], [94, 91], [95, 94], [96, 95], [97, 96], [98, 8], [99, 98], [103, 8], [104, 103], [106, 29], [106, 22], [106, 63], [106, 8], [106, 88], [106, 76], [107, 60], [107, 92], [107, 80], [107, 9], [107, 31], [108, 4], [110, 108], [112, 111], [113, 112], [117, 101], [117, 69], [117, 114], [117, 86]]}
| {"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/345e2c68c25dad6a084a3c53539a7cb8620e3db073e7f9dfc62b69896d2a1c26_345e2c68c25dad6a084a3c53539a7cb8620e3db073e7f9dfc62b69896d2a1c26.jsonl.gz", "strip_func_name": "sub_408167", "query": "\n\n\n__int64 __fastcall sub_408167(__int64 a1, unsigned __int8 (__fastcall *a2)(__int64, __int64, __int64), unsigned __int8 (__fastcall *a3)(__int64, __int64 *, __int64), __int64 a4)\n{\n__int64 v4; // rbx\n__int64 v5; // rax\n__int64 v7; // rax\nchar v10; // [rsp+2Fh] [rbp-121h] BYREF\n__int64 v11[2]; // [rsp+30h] [rbp-120h] BYREF\nchar v12[232]; // [rsp+40h] [rbp-110h] BYREF\nint v13; // [rsp+128h] [rbp-28h]\n__int16 v14; // [rsp+12Ch] [rbp-24h]\nchar v15; // [rsp+12Eh] [rbp-22h]\nvoid *v16; // [rsp+130h] [rbp-20h] BYREF\n__int64 v17; // [rsp+138h] [rbp-18h]\n\nv16 = 0LL;\nv11[0] = 0LL;\nv11[1] = 0LL;\nmemset(v12, 0, sizeof(v12));\nv13 = 0;\nv14 = 0;\nv15 = 0;\nsub_40883D(a1);\nwhile ( (unsigned __int8)sub_408AE0(a1, v11, &v16, 0LL) )\n{\nv17 = sub_405C99(*(_QWORD *)(a1 + 11424), (__int64)v11, (__int64)&v10);\nif ( v10 )\n{\nsub_405E24(v16);\nif ( v17 && sub_405ECF(v17) && sub_405EE0(v17) )\n{\nv4 = sub_405EE0(v17);\nv5 = sub_405ECF(v17);\nif ( a2(a4, v5, v4) != 1 )\nreturn 0LL;\nif ( a3 )\n{\nv7 = sub_405EE0(v17);\nif ( a3(a4, v11, v7) != 1 )\nreturn 0LL;\n}\n}\n}\nelse\n{\nif ( a2(a4, (__int64)v11, (__int64)v16) != 1 )\n{\nsub_405E24(v16);\nreturn 0LL;\n}\nsub_405E24(v16);\n}\n}\nreturn 1LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,v10,v16,v17,sub_408167,sub_40883D,sub_408AE0,sub_405C99,sub_405E24,sub_405ECF,sub_405EE0,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'cb2', 'a4': 'user', 'a1': 's', 'a2': 'cb', 'v10': 'found', 'v16': 'v', 'v17': 'kv', 'sub_408167': 'sdb_foreach_cdb', 'sub_40883D': 'sdb_dump_begin', 'sub_408AE0': 'sdb_dump_dupnext', 'sub_405C99': 'sdb_ht_find_kvp', 'sub_405E24': 'sdb_gh_free_0', 'sub_405ECF': 'sdbkv_key', 'sub_405EE0': 'sdbkv_value'}"} |
|
print_with_line_prefix | c0889e43b9fb99e0a15d5a45e58572120bf2a06ee20b165810a3d68c382cd705 | eerimoq | pbtools | NA | static void print_with_line_prefix(FILE *file_p,
const char *prefix_p,
const char *string_p)
{
fprintf(file_p, "%s", prefix_p);
while (*string_p != '\0') {
fputc(string_p[0], file_p);
if (*string_p == '\n') {
fprintf(file_p, "%s", prefix_p);
}
string_p++;
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4048A7", "function_addr": 4212903, "binary_name": "c0889e43b9fb99e0a15d5a45e58572120bf2a06ee20b165810a3d68c382cd705.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+stream], rdi"], [4, "mov [rbp+s], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "mov rdx, [rbp+stream]"], [7, "mov rax, [rbp+s]"], [8, "mov rsi, rdx"], [9, "mov rdi, rax"], [10, "call _fputs"], [11, "jmp short loc_40490B"], [12, "mov rax, [rbp+var_18]"], [13, "movzx eax, byte ptr [rax]"], [14, "movsx eax, al"], [15, "mov rdx, [rbp+stream]"], [16, "mov rsi, rdx"], [17, "mov edi, eax"], [18, "call _fputc"], [19, "mov rax, [rbp+var_18]"], [20, "movzx eax, byte ptr [rax]"], [21, "cmp al, 0Ah"], [22, "jnz short loc_404906"], [23, "mov rdx, [rbp+stream]"], [24, "mov rax, [rbp+s]"], [25, "mov rsi, rdx"], [26, "mov rdi, rax"], [27, "call _fputs"], [28, "add [rbp+var_18], 1"], [29, "mov rax, [rbp+var_18]"], [30, "movzx eax, byte ptr [rax]"], [31, "test al, al"], [32, "jnz short loc_4048D0"], [33, "nop"], [34, "nop"], [35, "leave"], [36, "retn"]], "data_dep": [[6, 3], [7, 4], [8, 6], [9, 7], [12, 28], [12, 5], [13, 12], [14, 13], [15, 3], [16, 15], [17, 14], [19, 5], [19, 28], [20, 19], [21, 20], [22, 21], [23, 3], [24, 4], [25, 23], [26, 24], [28, 5], [28, 28], [29, 28], [29, 5], [30, 29], [31, 30], [32, 31], [36, 31]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/c0889e43b9fb99e0a15d5a45e58572120bf2a06ee20b165810a3d68c382cd705_c0889e43b9fb99e0a15d5a45e58572120bf2a06ee20b165810a3d68c382cd705.jsonl.gz", "strip_func_name": "sub_4048A7", "query": "\n\n\n__int64 __fastcall sub_4048A7(FILE *a1, const char *a2, _BYTE *a3)\n{\n__int64 result; // rax\n\nfputs(a2, a1);\nwhile ( 1 )\n{\nresult = (unsigned __int8)*a3;\nif ( !(_BYTE)result )\nbreak;\nfputc((char)*a3, a1);\nif ( *a3 == 10 )\nfputs(a2, a1);\n++a3;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_4048A7,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'string_p', 'a1': 'file_p', 'a2': 'prefix_p', 'sub_4048A7': 'print_with_line_prefix'}"} |
|
ul_switch_off_field | 4a8063503b00e2daa87f12503db0823933ebfcd9010aa37d6cf2d80cb8e76487 | nccgroup | proxmark3-amiimicyou | NA | void ul_switch_off_field(void) {
UsbCommand c = {CMD_READER_ISO_14443a, {0, 0, 0}};
clearCommandBuffer();
SendCommand(&c);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "ul_switch_off_field", "function_addr": 4461208, "binary_name": "4a8063503b00e2daa87f12503db0823933ebfcd9010aa37d6cf2d80cb8e76487.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 220h"], [3, "lea rdx, [rbp+var_220]"], [4, "mov eax, 0"], [5, "mov ecx, 44h "], [6, "mov rdi, rdx"], [7, "rep stosq"], [8, "mov [rbp+var_220], 385h"], [9, "mov eax, 0"], [10, "call clearCommandBuffer"], [11, "lea rax, [rbp+var_220]"], [12, "mov rdi, rax"], [13, "call SendCommand"], [14, "nop"], [15, "leave"], [16, "retn"]], "data_dep": [[6, 3], [11, 10], [11, 8], [12, 11], [16, 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/4a8063503b00e2daa87f12503db0823933ebfcd9010aa37d6cf2d80cb8e76487_4a8063503b00e2daa87f12503db0823933ebfcd9010aa37d6cf2d80cb8e76487.jsonl.gz", "strip_func_name": "ul_switch_off_field", "query": "\n\n\n__int64 __fastcall ul_switch_off_field(__int64 a1, __int64 a2)\n{\nint v2; // edx\nint v3; // ecx\nint v4; // er8\nint v5; // er9\n__int64 v7[68]; // [rsp+0h] [rbp-220h] BYREF\n__int64 savedregs; // [rsp+220h] [rbp+0h] BYREF\n\nmemset(v7, 0, sizeof(v7));\nv7[0] = 901LL;\nclearCommandBuffer(&savedregs, a2, v7);\nreturn SendCommand(v7, a2, v2, v3, v4, v5);\n}\n\n\n\nQ:[v7,]\nAssistant: ", "hints": "[]", "response": "{'v7': 'c'}"} |
|
NoticeProcessor | 7795e699c15209370a1dd096e941bccc1506e4372d17236252707305c69661c5 | DataSystemsLab | hippo-postgresql | NA | void
NoticeProcessor(void *arg, const char *message)
{
(void) arg; /* not used */
psql_error("%s", message);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40BE5C", "function_addr": 4243036, "binary_name": "7795e699c15209370a1dd096e941bccc1506e4372d17236252707305c69661c5.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov rax, [rbp+var_10]"], [6, "mov rsi, rax"], [7, "mov edi, offset aS_5"], [8, "mov eax, 0"], [9, "call sub_40BD39"], [10, "nop"], [11, "leave"], [12, "retn"]], "data_dep": [[5, 4], [6, 5], [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/7795e699c15209370a1dd096e941bccc1506e4372d17236252707305c69661c5_7795e699c15209370a1dd096e941bccc1506e4372d17236252707305c69661c5.jsonl.gz", "strip_func_name": "sub_40BE5C", "query": "\n\n\nint __fastcall sub_40BE5C(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\nreturn sub_40BD39(\"%s\", a2, a3, a4, a5, a6, a2, a1);\n}\n\n\n\nQ:[a1,a2,sub_40BE5C,sub_40BD39,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'arg', 'a2': 'message', 'sub_40BE5C': 'NoticeProcessor', 'sub_40BD39': 'psql_error'}"} |
|
printRegisterList | 57a1205861373a750f3e5da5e31d94ad23e74ba0b8590e4f8967e5b3526ffe2e | dnasdw | 3dstool | NA | static void printRegisterList(MCInst *MI, unsigned OpNum, SStream *O)
{
unsigned i, e;
SStream_concat0(O, "{");
for (i = OpNum, e = MCInst_getNumOperands(MI); i != e; ++i) {
if (i != OpNum) SStream_concat0(O, ", ");
printRegName(MI->csh, O, MCOperand_getReg(MCInst_getOperand(MI, i)));
if (MI->csh->detail) {
MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].type = ARM_OP_REG;
MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].reg = MCOperand_getReg(MCInst_getOperand(MI, i));
MI->flat_insn->detail->arm.op_count++;
}
}
SStream_concat0(O, "}");
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_44A0E8", "function_addr": 4497640, "binary_name": "57a1205861373a750f3e5da5e31d94ad23e74ba0b8590e4f8967e5b3526ffe2e.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r12"], [3, "push rbx"], [4, "sub rsp, 30h"], [5, "mov [rbp+var_28], rdi"], [6, "mov [rbp+var_2C], esi"], [7, "mov [rbp+var_38], rdx"], [8, "mov rax, [rbp+var_38]"], [9, "lea rsi, asc_51C0BB"], [10, "mov rdi, rax"], [11, "call sub_403A84"], [12, "mov eax, [rbp+var_2C]"], [13, "mov [rbp+var_14], eax"], [14, "mov rax, [rbp+var_28]"], [15, "mov rdi, rax"], [16, "call sub_404B10"], [17, "mov [rbp+var_18], eax"], [18, "jmp loc_44A25D"], [19, "mov eax, [rbp+var_14]"], [20, "cmp eax, [rbp+var_2C]"], [21, "jz short loc_44A146"], [22, "mov rax, [rbp+var_38]"], [23, "lea rsi, unk_51B1DA"], [24, "mov rdi, rax"], [25, "call sub_403A84"], [26, "mov edx, [rbp+var_14]"], [27, "mov rax, [rbp+var_28]"], [28, "mov esi, edx"], [29, "mov rdi, rax"], [30, "call sub_404AEE"], [31, "mov rdi, rax"], [32, "call sub_404BF1"], [33, "mov edx, eax"], [34, "mov rax, [rbp+var_28]"], [35, "mov rax, [rax+320h]"], [36, "mov rcx, [rbp+var_38]"], [37, "mov rsi, rcx"], [38, "mov rdi, rax"], [39, "call sub_444FCF"], [40, "mov rax, [rbp+var_28]"], [41, "mov rax, [rax+320h]"], [42, "mov eax, [rax+60h]"], [43, "test eax, eax"], [44, "jz loc_44A259"], [45, "mov rax, [rbp+var_28]"], [46, "mov rax, [rax+310h]"], [47, "mov rcx, [rax+0E8h]"], [48, "mov rax, [rbp+var_28]"], [49, "mov rax, [rax+310h]"], [50, "mov rax, [rax+0E8h]"], [51, "movzx eax, byte ptr [rax+50h]"], [52, "movzx eax, al"], [53, "movsxd rdx, eax"], [54, "mov rax, rdx"], [55, "shl rax, 2"], [56, "add rax, rdx"], [57, "shl rax, 3"], [58, "add rax, rcx"], [59, "add rax, 64h "], [60, "mov dword ptr [rax], 1"], [61, "mov edx, [rbp+var_14]"], [62, "mov rax, [rbp+var_28]"], [63, "mov esi, edx"], [64, "mov rdi, rax"], [65, "call sub_404AEE"], [66, "mov rdx, rax"], [67, "mov rax, [rbp+var_28]"], [68, "mov rax, [rax+310h]"], [69, "mov r12, [rax+0E8h]"], [70, "mov rax, [rbp+var_28]"], [71, "mov rax, [rax+310h]"], [72, "mov rax, [rax+0E8h]"], [73, "movzx eax, byte ptr [rax+50h]"], [74, "movzx ebx, al"], [75, "mov rdi, rdx"], [76, "call sub_404BF1"], [77, "mov edx, eax"], [78, "movsxd rcx, ebx"], [79, "mov rax, rcx"], [80, "shl rax, 2"], [81, "add rax, rcx"], [82, "shl rax, 3"], [83, "add rax, r12"], [84, "add rax, 68h "], [85, "mov [rax], edx"], [86, "mov rax, [rbp+var_28]"], [87, "mov rax, [rax+310h]"], [88, "mov rax, [rax+0E8h]"], [89, "movzx edx, byte ptr [rax+50h]"], [90, "add edx, 1"], [91, "mov [rax+50h], dl"], [92, "add [rbp+var_14], 1"], [93, "mov eax, [rbp+var_14]"], [94, "cmp eax, [rbp+var_18]"], [95, "jnz loc_44A12B"], [96, "mov rax, [rbp+var_38]"], [97, "lea rsi, asc_51C00A"], [98, "mov rdi, rax"], [99, "call sub_403A84"], [100, "nop"], [101, "add rsp, 30h"], [102, "pop rbx"], [103, "pop r12"], [104, "pop rbp"], [105, "retn"]], "data_dep": [[8, 7], [10, 8], [12, 6], [13, 12], [14, 5], [15, 14], [17, 16], [19, 13], [19, 92], [20, 19], [20, 6], [21, 20], [22, 7], [23, 63], [23, 37], [23, 9], [24, 22], [26, 13], [26, 92], [27, 5], [28, 26], [29, 27], [31, 30], [33, 32], [34, 5], [35, 85], [35, 60], [35, 34], [35, 91], [36, 7], [37, 36], [38, 35], [40, 5], [41, 40], [41, 85], [41, 60], [41, 91], [42, 41], [42, 91], [42, 85], [42, 60], [43, 42], [44, 43], [45, 5], [46, 91], [46, 45], [46, 85], [46, 60], [47, 91], [47, 46], [47, 85], [47, 60], [48, 5], [49, 48], [49, 91], [49, 85], [49, 60], [50, 91], [50, 49], [50, 85], [50, 60], [51, 91], [51, 50], [51, 60], [51, 85], [52, 51], [53, 52], [54, 53], [55, 54], [56, 53], [56, 55], [57, 56], [58, 57], [58, 47], [59, 58], [60, 59], [61, 92], [61, 13], [62, 5], [63, 61], [64, 62], [66, 65], [67, 5], [68, 67], [68, 60], [69, 60], [69, 68], [70, 5], [71, 60], [71, 70], [72, 60], [72, 71], [73, 60], [73, 91], [73, 72], [74, 73], [75, 66], [77, 76], [78, 74], [79, 78], [80, 79], [81, 78], [81, 80], [82, 81], [83, 69], [83, 82], [84, 83], [85, 84], [85, 77], [86, 5], [87, 86], [87, 85], [88, 85], [88, 87], [89, 88], [89, 85], [89, 91], [90, 89], [91, 88], [91, 90], [92, 92], [92, 13], [93, 13], [93, 92], [94, 93], [94, 17], [95, 94], [96, 7], [97, 37], [97, 9], [97, 63], [98, 96], [101, 4], [102, 3], [103, 2], [104, 0], [105, 99]]}
| {"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_44A0E8", "query": "\n\n\n__int64 __fastcall sub_44A0E8(__int64 a1, unsigned int a2, __int64 a3)\n{\n__int64 v3; // rax\nunsigned int v4; // eax\n__int64 v5; // rax\n__int64 v6; // r12\nint v7; // ebx\nint v10; // [rsp+28h] [rbp-18h]\nunsigned int v11; // [rsp+2Ch] [rbp-14h]\n\nsub_403A84(a3, \"{\");\nv11 = a2;\nv10 = sub_404B10(a1);\nwhile ( v11 != v10 )\n{\nif ( v11 != a2 )\nsub_403A84(a3, \", \");\nv3 = sub_404AEE(a1, v11);\nv4 = sub_404BF1(v3);\nsub_444FCF(*(_QWORD *)(a1 + 800), a3, v4);\nif ( *(_DWORD *)(*(_QWORD *)(a1 + 800) + 96LL) )\n{\n*(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 784) + 232LL)\n+ 40LL * *(unsigned __int8 *)(*(_QWORD *)(*(_QWORD *)(a1 + 784) + 232LL) + 80LL)\n+ 100) = 1;\nv5 = sub_404AEE(a1, v11);\nv6 = *(_QWORD *)(*(_QWORD *)(a1 + 784) + 232LL);\nv7 = *(unsigned __int8 *)(v6 + 80);\n*(_DWORD *)(v6 + 40LL * v7 + 104) = sub_404BF1(v5);\n++*(_BYTE *)(*(_QWORD *)(*(_QWORD *)(a1 + 784) + 232LL) + 80LL);\n}\n++v11;\n}\nreturn sub_403A84(a3, \"}\");\n}\n\n\n\nQ:[a3,a1,a2,v10,sub_44A0E8,sub_403A84,sub_404B10,sub_404AEE,sub_404BF1,sub_444FCF,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'O', 'a1': 'MI', 'a2': 'OpNum', 'v10': 'e', 'sub_44A0E8': 'printRegisterList', 'sub_403A84': 'SStream_concat0', 'sub_404B10': 'MCInst_getNumOperands', 'sub_404AEE': 'MCInst_getOperand', 'sub_404BF1': 'MCOperand_getReg', 'sub_444FCF': 'printRegName'}"} |
|
pjmedia_tonegen_play | 25c5dec96bb3133ec9c32f1c53b06126b3f458e8718b6d0581ace9fa89525fd0 | asterisk | pjproject-archive | NA | PJ_DEF(pj_status_t) pjmedia_tonegen_play( pjmedia_port *port,
unsigned count,
const pjmedia_tone_desc tones[],
unsigned options)
{
struct tonegen *tonegen = (struct tonegen*) port;
unsigned i;
PJ_ASSERT_RETURN(port && port->info.signature == SIGNATURE &&
count && tones, PJ_EINVAL);
/* Don't put more than available buffer */
PJ_ASSERT_RETURN(count+tonegen->count <= PJMEDIA_TONEGEN_MAX_DIGITS,
PJ_ETOOMANY);
pj_lock_acquire(tonegen->lock);
/* Set playback options */
tonegen->playback_options = options;
/* Copy digits */
pj_memcpy(tonegen->digits + tonegen->count,
tones, count * sizeof(pjmedia_tone_desc));
/* Normalize volume, and check if we need to disable fading.
* Disable fading if tone off time is zero. Application probably
* wants to play this tone continuously (e.g. dial tone).
*/
for (i=0; i<count; ++i) {
pjmedia_tone_desc *t = &tonegen->digits[i+tonegen->count];
if (t->volume == 0)
t->volume = AMP;
else if (t->volume < 0)
t->volume = (short) -t->volume;
/* Reset flags */
t->flags = 0;
if (t->off_msec != 0)
t->flags |= PJMEDIA_TONE_ENABLE_FADE;
}
tonegen->count += count;
pj_lock_release(tonegen->lock);
return PJ_SUCCESS;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43E238", "function_addr": 4448824, "binary_name": "25c5dec96bb3133ec9c32f1c53b06126b3f458e8718b6d0581ace9fa89525fd0.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 [rbp+var_30], ecx"], [7, "mov rax, [rbp+var_28]"], [8, "mov [rbp+var_10], rax"], [9, "cmp [rbp+var_28], 0"], [10, "jz short loc_43E278"], [11, "mov rax, [rbp+var_28]"], [12, "mov eax, [rax+10h]"], [13, "cmp eax, 5041544Fh"], [14, "jnz short loc_43E278"], [15, "cmp [rbp+var_2C], 0"], [16, "jz short loc_43E278"], [17, "cmp [rbp+var_38], 0"], [18, "jnz short loc_43E2BD"], [19, "cmp [rbp+var_28], 0"], [20, "jz short loc_43E29A"], [21, "mov rax, [rbp+var_28]"], [22, "mov eax, [rax+10h]"], [23, "cmp eax, 5041544Fh"], [24, "jnz short loc_43E29A"], [25, "cmp [rbp+var_2C], 0"], [26, "jz short loc_43E29A"], [27, "cmp [rbp+var_38], 0"], [28, "jnz short loc_43E2B3"], [29, "mov ecx, offset aPjmediaTonegen_4"], [30, "mov edx, 315h"], [31, "mov esi, offset aSrcPjmediaTone"], [32, "mov edi, offset aPortPortInfoSi"], [33, "call ___assert_fail"], [34, "mov eax, 11174h"], [35, "jmp locret_43E456"], [36, "mov rax, [rbp+var_10]"], [37, "mov edx, [rax+0ACh]"], [38, "mov eax, [rbp+var_2C]"], [39, "add eax, edx"], [40, "cmp eax, 20h "], [41, "jbe short loc_43E308"], [42, "mov rax, [rbp+var_10]"], [43, "mov edx, [rax+0ACh]"], [44, "mov eax, [rbp+var_2C]"], [45, "add eax, edx"], [46, "cmp eax, 20h "], [47, "jbe short loc_43E2FE"], [48, "mov ecx, offset aPjmediaTonegen_4"], [49, "mov edx, 319h"], [50, "mov esi, offset aSrcPjmediaTone"], [51, "mov edi, offset aCountTonegenCo"], [52, "call ___assert_fail"], [53, "mov eax, 1117Ah"], [54, "jmp locret_43E456"], [55, "mov rax, [rbp+var_10]"], [56, "mov rax, [rax+80h]"], [57, "mov rdi, rax"], [58, "call sub_45BDFE"], [59, "mov rax, [rbp+var_10]"], [60, "mov edx, [rbp+var_30]"], [61, "mov [rax+74h], edx"], [62, "mov edx, [rbp+var_2C]"], [63, "mov rax, rdx"], [64, "add rax, rax"], [65, "add rax, rdx"], [66, "shl rax, 2"], [67, "mov rdx, rax"], [68, "mov rax, [rbp+var_10]"], [69, "lea rsi, [rax+0B8h]"], [70, "mov rax, [rbp+var_10]"], [71, "mov eax, [rax+0ACh]"], [72, "mov ecx, eax"], [73, "mov rax, rcx"], [74, "add rax, rax"], [75, "add rax, rcx"], [76, "shl rax, 2"], [77, "lea rcx, [rsi+rax]"], [78, "mov rax, [rbp+var_38]"], [79, "mov rsi, rax"], [80, "mov rdi, rcx"], [81, "call sub_43CD0E"], [82, "mov [rbp+var_4], 0"], [83, "jmp loc_43E419"], [84, "mov rax, [rbp+var_10]"], [85, "mov edx, [rax+0ACh]"], [86, "mov eax, [rbp+var_4]"], [87, "add eax, edx"], [88, "mov edx, eax"], [89, "mov rax, rdx"], [90, "add rax, rax"], [91, "add rax, rdx"], [92, "shl rax, 2"], [93, "lea rdx, [rax+0B0h]"], [94, "mov rax, [rbp+var_10]"], [95, "add rax, rdx"], [96, "add rax, 8"], [97, "mov [rbp+var_18], rax"], [98, "mov rax, [rbp+var_18]"], [99, "movzx eax, word ptr [rax+8]"], [100, "test ax, ax"], [101, "jnz short loc_43E3C8"], [102, "mov rax, [rbp+var_18]"], [103, "mov word ptr [rax+8], 3000h"], [104, "jmp short loc_43E3E9"], [105, "mov rax, [rbp+var_18]"], [106, "movzx eax, word ptr [rax+8]"], [107, "test ax, ax"], [108, "jns short loc_43E3E9"], [109, "mov rax, [rbp+var_18]"], [110, "movzx eax, word ptr [rax+8]"], [111, "neg eax"], [112, "mov edx, eax"], [113, "mov rax, [rbp+var_18]"], [114, "mov [rax+8], dx"], [115, "mov rax, [rbp+var_18]"], [116, "mov word ptr [rax+0Ah], 0"], [117, "mov rax, [rbp+var_18]"], [118, "movzx eax, word ptr [rax+6]"], [119, "test ax, ax"], [120, "jz short loc_43E415"], [121, "mov rax, [rbp+var_18]"], [122, "movzx eax, word ptr [rax+0Ah]"], [123, "or eax, 2"], [124, "mov edx, eax"], [125, "mov rax, [rbp+var_18]"], [126, "mov [rax+0Ah], dx"], [127, "add [rbp+var_4], 1"], [128, "mov eax, [rbp+var_4]"], [129, "cmp eax, [rbp+var_2C]"], [130, "jb loc_43E37B"], [131, "mov rax, [rbp+var_10]"], [132, "mov edx, [rax+0ACh]"], [133, "mov eax, [rbp+var_2C]"], [134, "add edx, eax"], [135, "mov rax, [rbp+var_10]"], [136, "mov [rax+0ACh], edx"], [137, "mov rax, [rbp+var_10]"], [138, "mov rax, [rax+80h]"], [139, "mov rdi, rax"], [140, "call sub_45BE9E"], [141, "mov eax, 0"], [142, "leave"], [143, "retn"]], "data_dep": [[7, 3], [8, 7], [9, 3], [10, 9], [11, 3], [12, 11], [13, 12], [14, 13], [15, 4], [16, 15], [17, 5], [18, 17], [19, 3], [20, 19], [21, 3], [22, 21], [23, 22], [24, 23], [25, 4], [26, 25], [27, 5], [28, 27], [36, 8], [37, 36], [38, 4], [39, 37], [39, 38], [40, 39], [41, 40], [42, 8], [43, 42], [44, 4], [45, 43], [45, 44], [46, 45], [47, 46], [55, 8], [56, 55], [57, 56], [59, 8], [60, 6], [61, 60], [61, 59], [62, 4], [63, 62], [64, 63], [65, 62], [65, 64], [66, 65], [67, 66], [68, 8], [69, 68], [69, 61], [70, 8], [71, 61], [71, 70], [72, 71], [73, 72], [74, 73], [75, 72], [75, 74], [76, 75], [77, 76], [77, 61], [77, 72], [78, 5], [79, 78], [80, 77], [84, 8], [85, 84], [85, 114], [85, 116], [85, 61], [85, 103], [85, 126], [86, 127], [86, 82], [87, 86], [87, 85], [88, 87], [89, 88], [90, 89], [91, 88], [91, 90], [92, 91], [93, 116], [93, 61], [93, 88], [93, 126], [93, 92], [93, 103], [93, 114], [94, 8], [95, 93], [95, 94], [96, 95], [97, 96], [98, 97], [99, 103], [99, 126], [99, 98], [99, 114], [99, 116], [99, 61], [100, 99], [101, 100], [102, 97], [103, 102], [105, 97], [106, 114], [106, 116], [106, 61], [106, 103], [106, 105], [106, 126], [107, 106], [108, 107], [109, 97], [110, 116], [110, 61], [110, 109], [110, 126], [110, 103], [110, 114], [111, 110], [112, 111], [113, 97], [114, 113], [114, 112], [115, 97], [116, 115], [117, 97], [118, 117], [118, 116], [119, 118], [120, 119], [121, 97], [122, 126], [122, 103], [122, 121], [122, 114], [122, 116], [122, 61], [123, 122], [124, 123], [125, 97], [126, 125], [126, 124], [127, 127], [127, 82], [128, 82], [128, 127], [129, 128], [129, 4], [130, 129], [131, 8], [132, 103], [132, 126], [132, 114], [132, 116], [132, 61], [132, 136], [132, 131], [133, 4], [134, 133], [134, 132], [135, 8], [136, 135], [136, 134], [137, 8], [138, 137], [138, 136], [139, 138], [143, 53], [143, 34], [143, 141]]}
| {"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/25c5dec96bb3133ec9c32f1c53b06126b3f458e8718b6d0581ace9fa89525fd0_25c5dec96bb3133ec9c32f1c53b06126b3f458e8718b6d0581ace9fa89525fd0.jsonl.gz", "strip_func_name": "sub_43E238", "query": "\n\n\n__int64 __fastcall sub_43E238(__int64 a1, unsigned int a2, const void *a3, int a4)\n{\n__int64 result; // rax\n__int64 v5; // rdx\nunsigned int i; // [rsp+3Ch] [rbp-4h]\n\nif ( a1 && *(_DWORD *)(a1 + 16) == 1346458703 && a2 && a3 )\n{\nif ( *(_DWORD *)(a1 + 172) + a2 > 0x20 )\n__assert_fail(\"count+tonegen->count <= 32\", \"../src/pjmedia/tonegen.c\", 0x319u, \"pjmedia_tonegen_play\");\nsub_45BDFE(*(_QWORD *)(a1 + 128));\n*(_DWORD *)(a1 + 116) = a4;\nsub_43CD0E((void *)(a1 + 184 + 12LL * *(unsigned int *)(a1 + 172)), a3, 12LL * a2);\nfor ( i = 0; i < a2; ++i )\n{\nv5 = 12LL * (*(_DWORD *)(a1 + 172) + i) + 176;\nif ( *(_WORD *)(v5 + a1 + 16) )\n{\nif ( *(__int16 *)(v5 + a1 + 16) < 0 )\n*(_WORD *)(v5 + a1 + 16) = -*(_WORD *)(v5 + a1 + 16);\n}\nelse\n{\n*(_WORD *)(v5 + a1 + 16) = 12288;\n}\n*(_WORD *)(v5 + a1 + 18) = 0;\nif ( *(_WORD *)(v5 + a1 + 14) )\n*(_WORD *)(v5 + a1 + 18) |= 2u;\n}\n*(_DWORD *)(a1 + 172) += a2;\nsub_45BE9E(*(_QWORD *)(a1 + 128));\nresult = 0LL;\n}\nelse\n{\nif ( !a1 || *(_DWORD *)(a1 + 16) != 1346458703 || !a2 || !a3 )\n__assert_fail(\n\"port && port->info.signature == ( 'P'<<24 | 'A'<<16 | 'T'<<8 | 'O' ) && count && tones\",\n\"../src/pjmedia/tonegen.c\",\n0x315u,\n\"pjmedia_tonegen_play\");\nresult = 70004LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,sub_43E238,sub_45BDFE,sub_43CD0E,sub_45BE9E,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'tones', 'a4': 'options', 'a1': 'port', 'a2': 'count', 'sub_43E238': 'pjmedia_tonegen_play', 'sub_45BDFE': 'pj_lock_acquire', 'sub_43CD0E': 'pj_memcpy_14', 'sub_45BE9E': 'pj_lock_release'}"} |
|
audio_close | eceaa295fd3a2410186e8bae8674274091c230f954372fad2416ce91cd698e89 | festvox | flite | NA | int audio_close(cst_audiodev *ad)
{
if (ad->rateconv)
delete_rateconv(ad->rateconv);
return AUDIO_CLOSE_NATIVE(ad);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42CBC1", "function_addr": 4377537, "binary_name": "eceaa295fd3a2410186e8bae8674274091c230f954372fad2416ce91cd698e89.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+20h]"], [6, "test rax, rax"], [7, "jz short loc_42CBEA"], [8, "mov rax, [rbp+var_8]"], [9, "mov rax, [rax+20h]"], [10, "mov rdi, rax"], [11, "call sub_431831"], [12, "mov rax, [rbp+var_8]"], [13, "mov rdi, rax"], [14, "call sub_42D937"], [15, "leave"], [16, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 3], [9, 8], [10, 9], [12, 3], [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/eceaa295fd3a2410186e8bae8674274091c230f954372fad2416ce91cd698e89_eceaa295fd3a2410186e8bae8674274091c230f954372fad2416ce91cd698e89.jsonl.gz", "strip_func_name": "sub_42CBC1", "query": "\n\n\n__int64 __fastcall sub_42CBC1(__int64 a1)\n{\nif ( *(_QWORD *)(a1 + 32) )\nsub_431831(*(_QWORD *)(a1 + 32));\nreturn sub_42D937(a1);\n}\n\n\n\nQ:[a1,sub_42CBC1,sub_431831,sub_42D937,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ad', 'sub_42CBC1': 'audio_close', 'sub_431831': 'delete_rateconv', 'sub_42D937': 'audio_close_alsa'}"} |
|
lv_txt_get_snippet | 1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a | FASTSHIFT | lv_gba_emu | NA | static bool lv_txt_get_snippet(const char * txt, const lv_font_t * font,
lv_coord_t letter_space, lv_coord_t max_width, lv_text_flag_t flag,
lv_coord_t * use_width, uint32_t * end_ofs)
{
if(txt == NULL || txt[0] == '\0') {
*end_ofs = 0;
*use_width = 0;
return false;
}
lv_coord_t real_max_width = max_width;
#if !LV_USE_FONT_PLACEHOLDER
/* fix incomplete text display when disable the placeholder. */
/* workaround by: https://github.com/lvgl/lvgl/issues/3685 */
real_max_width++;
#endif
uint32_t ofs = _lv_txt_get_next_line(txt, font, letter_space, real_max_width, use_width, flag);
*end_ofs = ofs;
if(txt[ofs] == '\0' && *use_width < max_width) {
return false;
}
else {
return true;
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_461D34", "function_addr": 4594996, "binary_name": "1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a.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 eax, ecx"], [6, "mov ecx, r8d"], [7, "mov [rbp+var_38], r9"], [8, "mov [rbp+var_24], dx"], [9, "mov [rbp+var_28], ax"], [10, "mov eax, ecx"], [11, "mov [rbp+var_2C], al"], [12, "cmp [rbp+var_18], 0"], [13, "jz short loc_461D6C"], [14, "mov rax, [rbp+var_18]"], [15, "movzx eax, byte ptr [rax]"], [16, "test al, al"], [17, "jnz short loc_461D86"], [18, "mov rax, [rbp+arg_0]"], [19, "mov dword ptr [rax], 0"], [20, "mov rax, [rbp+var_38]"], [21, "mov word ptr [rax], 0"], [22, "mov eax, 0"], [23, "jmp short locret_461DEB"], [24, "movzx eax, [rbp+var_28]"], [25, "mov [rbp+var_2], ax"], [26, "movzx r8d, [rbp+var_2C]"], [27, "movsx ecx, [rbp+var_2]"], [28, "movsx edx, [rbp+var_24]"], [29, "mov rdi, [rbp+var_38]"], [30, "mov rsi, [rbp+var_20]"], [31, "mov rax, [rbp+var_18]"], [32, "mov r9d, r8d"], [33, "mov r8, rdi"], [34, "mov rdi, rax"], [35, "call sub_417859"], [36, "mov [rbp+var_8], eax"], [37, "mov rax, [rbp+arg_0]"], [38, "mov edx, [rbp+var_8]"], [39, "mov [rax], edx"], [40, "mov edx, [rbp+var_8]"], [41, "mov rax, [rbp+var_18]"], [42, "add rax, rdx"], [43, "movzx eax, byte ptr [rax]"], [44, "test al, al"], [45, "jnz short loc_461DE6"], [46, "mov rax, [rbp+var_38]"], [47, "movzx eax, word ptr [rax]"], [48, "cmp [rbp+var_28], ax"], [49, "jle short loc_461DE6"], [50, "mov eax, 0"], [51, "jmp short locret_461DEB"], [52, "mov eax, 1"], [53, "leave"], [54, "retn"]], "data_dep": [[9, 5], [10, 6], [11, 10], [12, 3], [13, 12], [14, 3], [15, 14], [16, 15], [17, 16], [19, 18], [20, 7], [21, 20], [24, 9], [25, 24], [26, 11], [27, 25], [28, 8], [29, 7], [30, 4], [31, 3], [32, 26], [33, 29], [34, 31], [36, 35], [38, 36], [39, 38], [39, 37], [40, 36], [41, 3], [42, 41], [42, 40], [43, 39], [43, 42], [44, 43], [45, 44], [46, 7], [47, 46], [47, 39], [48, 47], [48, 9], [49, 48], [54, 22], [54, 52], [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/1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a_1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a.jsonl.gz", "strip_func_name": "sub_461D34", "query": "\n\n\n_BOOL8 __fastcall sub_461D34(_BYTE *a1, __int64 a2, __int16 a3, __int16 a4, char a5, __int16 *a6, _DWORD *a7)\n{\n_BOOL8 result; // rax\nint v8; // eax\n\nif ( a1 && *a1 )\n{\nv8 = sub_417859(a1, a2, a3, a4, a6, a5);\n*a7 = v8;\nresult = a1[v8] || a4 <= *a6;\n}\nelse\n{\n*a7 = 0;\n*a6 = 0;\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,a7,v8,sub_461D34,sub_417859,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'letter_space', 'a4': 'max_width', 'a1': 'txt', 'a2': 'font', 'a5': 'flag', 'a6': 'use_width', 'a7': 'end_ofs', 'v8': 'result', 'sub_461D34': 'lv_txt_get_snippet', 'sub_417859': '_lv_txt_get_next_line'}"} |
|
initialize_tuncompress | fe48bf1ead1cc490c069ff963e663d5a53a5b8882a1eaca7f8aa8a89e063e520 | Wikinaut | agrep | NA | int
initialize_tuncompress()
{
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_414116", "function_addr": 4276502, "binary_name": "fe48bf1ead1cc490c069ff963e663d5a53a5b8882a1eaca7f8aa8a89e063e520.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, 0"], [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/fe48bf1ead1cc490c069ff963e663d5a53a5b8882a1eaca7f8aa8a89e063e520_fe48bf1ead1cc490c069ff963e663d5a53a5b8882a1eaca7f8aa8a89e063e520.jsonl.gz", "strip_func_name": "sub_414116", "query": "\n\n\n__int64 sub_414116()\n{\nreturn 0LL;\n}\n\n\n\nQ:[sub_414116,]\nAssistant: ", "hints": "[]", "response": "{'sub_414116': 'initialize_tuncompress'}"} |
|
create_elf | ddc68a52e638acf3af05a4546d06695c378d1e253df8abffaf1c795f1853f704 | elastic | ebpf | NA | void
create_elf(struct elfcopy *ecp)
{
struct section *shtab;
GElf_Ehdr ieh;
GElf_Ehdr oeh;
size_t ishnum;
ecp->flags |= SYMTAB_INTACT;
ecp->flags &= ~SYMTAB_EXIST;
/* Create EHDR. */
if (gelf_getehdr(ecp->ein, &ieh) == NULL)
errx(EXIT_FAILURE, "gelf_getehdr() failed: %s",
elf_errmsg(-1));
if ((ecp->iec = gelf_getclass(ecp->ein)) == ELFCLASSNONE)
errx(EXIT_FAILURE, "getclass() failed: %s",
elf_errmsg(-1));
if (ecp->oec == ELFCLASSNONE)
ecp->oec = ecp->iec;
if (ecp->oed == ELFDATANONE)
ecp->oed = ieh.e_ident[EI_DATA];
if (gelf_newehdr(ecp->eout, ecp->oec) == NULL)
errx(EXIT_FAILURE, "gelf_newehdr failed: %s",
elf_errmsg(-1));
if (gelf_getehdr(ecp->eout, &oeh) == NULL)
errx(EXIT_FAILURE, "gelf_getehdr() failed: %s",
elf_errmsg(-1));
memcpy(oeh.e_ident, ieh.e_ident, sizeof(ieh.e_ident));
oeh.e_ident[EI_CLASS] = ecp->oec;
oeh.e_ident[EI_DATA] = ecp->oed;
if (ecp->abi != -1)
oeh.e_ident[EI_OSABI] = ecp->abi;
oeh.e_flags = ieh.e_flags;
oeh.e_machine = ieh.e_machine;
oeh.e_type = ieh.e_type;
oeh.e_entry = ieh.e_entry;
oeh.e_version = ieh.e_version;
ecp->flags &= ~(EXECUTABLE | DYNAMIC | RELOCATABLE);
if (ieh.e_type == ET_EXEC)
ecp->flags |= EXECUTABLE;
else if (ieh.e_type == ET_DYN)
ecp->flags |= DYNAMIC;
else if (ieh.e_type == ET_REL)
ecp->flags |= RELOCATABLE;
else
errx(EXIT_FAILURE, "unsupported e_type");
if (!elf_getshnum(ecp->ein, &ishnum))
errx(EXIT_FAILURE, "elf_getshnum failed: %s",
elf_errmsg(-1));
if (ishnum > 0 && (ecp->secndx = calloc(ishnum,
sizeof(*ecp->secndx))) == NULL)
err(EXIT_FAILURE, "calloc failed");
/* Read input object program header. */
setup_phdr(ecp);
/*
* Scan of input sections: we iterate through sections from input
* object, skip sections need to be stripped, allot Elf_Scn and
* create internal section structure for sections we want.
* (i.e., determine output sections)
*/
create_scn(ecp);
/* Apply section address changes, if any. */
adjust_addr(ecp);
/*
* Determine if the symbol table needs to be changed based on
* command line options.
*/
if (ecp->strip == STRIP_DEBUG ||
ecp->strip == STRIP_UNNEEDED ||
ecp->flags & WEAKEN_ALL ||
ecp->flags & LOCALIZE_HIDDEN ||
ecp->flags & DISCARD_LOCAL ||
ecp->flags & DISCARD_LLABEL ||
ecp->prefix_sym != NULL ||
!STAILQ_EMPTY(&ecp->v_symop))
ecp->flags &= ~SYMTAB_INTACT;
/*
* Create symbol table. Symbols are filtered or stripped according to
* command line args specified by user, and later updated for the new
* layout of sections in the output object.
*/
if ((ecp->flags & SYMTAB_EXIST) != 0)
create_symtab(ecp);
/*
* First processing of output sections: at this stage we copy the
* content of each section from input to output object. Section
* content will be modified and printed (mcs) if need. Also content of
* relocation section probably will be filtered and updated according
* to symbol table changes.
*/
copy_content(ecp);
/*
* Write the underlying ehdr. Note that it should be called
* before elf_setshstrndx() since it will overwrite e->e_shstrndx.
*/
if (gelf_update_ehdr(ecp->eout, &oeh) == 0)
errx(EXIT_FAILURE, "gelf_update_ehdr() failed: %s",
elf_errmsg(-1));
/*
* Second processing of output sections: Update section headers.
* At this stage we set name string index, update st_link and st_info
* for output sections.
*/
update_shdr(ecp, 1);
/* Renew oeh to get the updated e_shstrndx. */
if (gelf_getehdr(ecp->eout, &oeh) == NULL)
errx(EXIT_FAILURE, "gelf_getehdr() failed: %s",
elf_errmsg(-1));
/*
* Insert SHDR table into the internal section list as a "pseudo"
* section, so later it will get sorted and resynced just as "normal"
* sections.
*
* Under FreeBSD, Binutils objcopy always put the section header
* at the end of all the sections. We want to do the same here.
*
* However, note that the behaviour is still different with Binutils:
* elfcopy checks the FreeBSD OSABI tag to tell whether it needs to
* move the section headers, while Binutils is probably configured
* this way when it's compiled on FreeBSD.
*/
if (oeh.e_ident[EI_OSABI] == ELFOSABI_FREEBSD)
shtab = insert_shtab(ecp, 1);
else
shtab = insert_shtab(ecp, 0);
/*
* Resync section offsets in the output object. This is needed
* because probably sections are modified or new sections are added,
* as a result overlap/gap might appears.
*/
resync_sections(ecp);
/* Store SHDR offset in EHDR. */
oeh.e_shoff = shtab->off;
/* Put program header table immediately after the Elf header. */
if (ecp->ophnum > 0) {
oeh.e_phoff = gelf_fsize(ecp->eout, ELF_T_EHDR, 1, EV_CURRENT);
if (oeh.e_phoff == 0)
errx(EXIT_FAILURE, "gelf_fsize() failed: %s",
elf_errmsg(-1));
}
/*
* Update ELF object entry point if requested.
*/
if (ecp->change_addr != 0)
oeh.e_entry += ecp->change_addr;
if (ecp->flags & SET_START)
oeh.e_entry = ecp->set_start;
if (ecp->change_start != 0)
oeh.e_entry += ecp->change_start;
/*
* Update ehdr again before we call elf_update(), since we
* modified e_shoff and e_phoff.
*/
if (gelf_update_ehdr(ecp->eout, &oeh) == 0)
errx(EXIT_FAILURE, "gelf_update_ehdr() failed: %s",
elf_errmsg(-1));
if (ecp->ophnum > 0)
copy_phdr(ecp);
/* Write out the output elf object. */
if (elf_update(ecp->eout, ELF_C_WRITE) < 0)
errx(EXIT_FAILURE, "elf_update() failed: %s",
elf_errmsg(-1));
/* Release allocated resource. */
free_elf(ecp);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401640", "function_addr": 4200000, "binary_name": "ddc68a52e638acf3af05a4546d06695c378d1e253df8abffaf1c795f1853f704.elf_extract.pkl\n"}, "code": [[0, "push r12"], [1, "push rbp"], [2, "mov rbp, rdi"], [3, "push rbx"], [4, "sub rsp, 0A0h"], [5, "or dword ptr [rdi+6Ch], 20h"], [6, "mov rdi, [rdi+0E8h]"], [7, "mov rax, cs:qword_55C2C0"], [8, "mov [rsp+0B8h+var_20], rax"], [9, "xor eax, eax"], [10, "test rdi, rdi"], [11, "jnz short loc_401688"], [12, "jmp short loc_4016AC"], [13, "mov rax, [rdi+68h]"], [14, "mov [rbx+68h], rax"], [15, "mov rax, [rdi+68h]"], [16, "mov [rax], rbx"], [17, "call sub_429710"], [18, "mov rdi, rbx"], [19, "mov rbx, [rdi+60h]"], [20, "test rbx, rbx"], [21, "jnz short loc_401671"], [22, "mov rax, [rdi+68h]"], [23, "mov [rbp+0F0h], rax"], [24, "mov rax, [rdi+68h]"], [25, "mov qword ptr [rax], 0"], [26, "call sub_429710"], [27, "mov rdi, [rbp+18h]"], [28, "lea rsi, [rsp+0B8h+var_68]"], [29, "call sub_40A900"], [30, "test rax, rax"], [31, "jz loc_401935"], [32, "mov rdi, [rbp+18h]"], [33, "call sub_4080D0"], [34, "test eax, eax"], [35, "mov [rbp+8], eax"], [36, "jz loc_40198F"], [37, "mov r8d, [rbp+0Ch]"], [38, "test r8d, r8d"], [39, "jnz short loc_4016E3"], [40, "mov [rbp+0Ch], eax"], [41, "cmp byte ptr [rbp+10h], 0"], [42, "jz loc_401903"], [43, "mov esi, [rbp+0Ch]"], [44, "mov rdi, [rbp+20h]"], [45, "call sub_40A700"], [46, "test rax, rax"], [47, "jz loc_401971"], [48, "lea r12, [rsp+0B8h+var_A8]"], [49, "mov rdi, [rbp+20h]"], [50, "mov rsi, r12"], [51, "call sub_40A900"], [52, "test rax, rax"], [53, "jz loc_401935"], [54, "mov rax, [rsp+0B8h+var_68]"], [55, "mov [rsp+0B8h+var_A8], rax"], [56, "mov rax, [rsp+0B8h+var_60]"], [57, "mov [rsp+0B8h+var_A0], rax"], [58, "mov eax, [rbp+0Ch]"], [59, "mov byte ptr [rsp+0B8h+var_A8+4], al"], [60, "movzx eax, byte ptr [rbp+10h]"], [61, "mov byte ptr [rsp+0B8h+var_A8+5], al"], [62, "movzx eax, byte ptr [rsp+0B8h+var_A8+7]"], [63, "mov edx, [rbp+14h]"], [64, "cmp edx, 0FFFFFFFFh"], [65, "cmovnz eax, edx"], [66, "movzx edx, [rsp+0B8h+var_58]"], [67, "mov byte ptr [rsp+0B8h+var_A8+7], al"], [68, "mov eax, [rsp+0B8h+var_38]"], [69, "mov [rsp+0B8h+var_78], eax"], [70, "movzx eax, [rsp+0B8h+var_56]"], [71, "cmp dx, 2"], [72, "mov [rsp+0B8h+var_98], dx"], [73, "mov [rsp+0B8h+var_96], ax"], [74, "mov rax, [rsp+0B8h+var_50]"], [75, "mov [rsp+0B8h+var_90], rax"], [76, "mov eax, [rsp+0B8h+var_54]"], [77, "mov [rsp+0B8h+var_94], eax"], [78, "jz loc_40191D"], [79, "cmp dx, 3"], [80, "jz loc_401926"], [81, "sub dx, 1"], [82, "jnz loc_401A0C"], [83, "or dword ptr [rbp+6Ch], 4"], [84, "mov rdi, [rbp+18h]"], [85, "lea rsi, [rsp+0B8h+var_B0]"], [86, "call sub_4097E0"], [87, "test eax, eax"], [88, "jz loc_4019AD"], [89, "mov rdi, [rsp+0B8h+var_B0]"], [90, "test rdi, rdi"], [91, "jz short loc_4017DB"], [92, "mov esi, 8"], [93, "call sub_42AD40"], [94, "test rax, rax"], [95, "mov [rbp+78h], rax"], [96, "jz loc_401A1D"], [97, "mov rdi, rbp"], [98, "call sub_405140"], [99, "mov rdi, rbp"], [100, "call sub_403880"], [101, "mov eax, [rbp+68h]"], [102, "cmp eax, 2"], [103, "jz short loc_401810"], [104, "cmp eax, 4"], [105, "jz short loc_401810"], [106, "test dword ptr [rbp+6Ch], 180h"], [107, "nop"], [108, "jnz short loc_401810"], [109, "cmp qword ptr [rbp+0C8h], 0"], [110, "jz short loc_401814"], [111, "xchg ax, ax"], [112, "and dword ptr [rbp+6Ch], 0FFFFFFDFh"], [113, "test byte ptr [rbp+6Ch], 10h"], [114, "jnz loc_401910"], [115, "mov rdi, rbp"], [116, "call sub_4042C0"], [117, "mov rdi, [rbp+20h]"], [118, "mov rsi, r12"], [119, "call sub_40A770"], [120, "test eax, eax"], [121, "jz loc_401953"], [122, "mov rdi, rbp"], [123, "call sub_4029A0"], [124, "mov rdi, rbp"], [125, "call sub_402B60"], [126, "mov rdi, [rbp+20h]"], [127, "mov rsi, r12"], [128, "call sub_40A900"], [129, "test rax, rax"], [130, "jz loc_401935"], [131, "mov rdi, rbp"], [132, "call sub_4033A0"], [133, "mov rdi, rbp"], [134, "mov rbx, rax"], [135, "call sub_402E20"], [136, "mov edi, [rbp+2Ch]"], [137, "mov rax, [rbx+20h]"], [138, "test edi, edi"], [139, "mov [rsp+0B8h+var_80], rax"], [140, "jle short loc_4018A8"], [141, "mov rdi, [rbp+20h]"], [142, "mov ecx, 1"], [143, "mov edx, 1"], [144, "mov esi, 4"], [145, "call sub_415E10"], [146, "test rax, rax"], [147, "mov [rsp+0B8h+var_88], rax"], [148, "jz loc_4019EE"], [149, "mov rdi, [rbp+20h]"], [150, "mov rsi, r12"], [151, "call sub_40A770"], [152, "test eax, eax"], [153, "jz loc_401953"], [154, "mov esi, [rbp+2Ch]"], [155, "test esi, esi"], [156, "jle short loc_4018CB"], [157, "mov rdi, rbp"], [158, "call sub_404F50"], [159, "mov rdi, [rbp+20h]"], [160, "mov esi, 7"], [161, "call sub_408120"], [162, "test rax, rax"], [163, "js loc_4019CB"], [164, "mov rax, [rsp+0B8h+var_20]"], [165, "xor rax, cs:qword_55C2C0"], [166, "jnz loc_4019E9"], [167, "add rsp, 0A0h"], [168, "pop rbx"], [169, "pop rbp"], [170, "pop r12"], [171, "retn"], [172, "movzx eax, byte ptr [rsp+0B8h+var_68+5]"], [173, "mov [rbp+10h], al"], [174, "jmp loc_4016ED"], [175, "mov rdi, rbp"], [176, "call sub_405440"], [177, "jmp loc_40181E"], [178, "or dword ptr [rbp+6Ch], 1"], [179, "jmp loc_4017A4"], [180, "or dword ptr [rbp+6Ch], 2"], [181, "xchg ax, ax"], [182, "xchg ax, ax"], [183, "jmp loc_4017A4"], [184, "mov edi, 0FFFFFFFFh"], [185, "call sub_409940"], [186, "mov esi, offset aGelfGetehdrFai"], [187, "mov rdx, rax"], [188, "mov edi, 46h "], [189, "xor eax, eax"], [190, "call sub_42CB00"], [191, "mov edi, 0FFFFFFFFh"], [192, "call sub_409940"], [193, "mov esi, offset aGelfUpdateEhdr"], [194, "mov rdx, rax"], [195, "mov edi, 46h "], [196, "xor eax, eax"], [197, "call sub_42CB00"], [198, "mov edi, 0FFFFFFFFh"], [199, "call sub_409940"], [200, "mov esi, offset aGelfNewehdrFai"], [201, "mov rdx, rax"], [202, "mov edi, 46h "], [203, "xor eax, eax"], [204, "call sub_42CB00"], [205, "mov edi, 0FFFFFFFFh"], [206, "call sub_409940"], [207, "mov esi, offset aGetclassFailed"], [208, "mov rdx, rax"], [209, "mov edi, 46h "], [210, "xor eax, eax"], [211, "call sub_42CB00"], [212, "mov edi, 0FFFFFFFFh"], [213, "call sub_409940"], [214, "mov esi, offset aElfGetshnumFai"], [215, "mov rdx, rax"], [216, "mov edi, 46h "], [217, "xor eax, eax"], [218, "call sub_42CB00"], [219, "mov edi, 0FFFFFFFFh"], [220, "call sub_409940"], [221, "mov esi, offset aElfUpdateFaile"], [222, "mov rdx, rax"], [223, "mov edi, 46h "], [224, "xor eax, eax"], [225, "call sub_42CB00"], [226, "call sub_42C5E0"], [227, "mov edi, 0FFFFFFFFh"], [228, "call sub_409940"], [229, "mov esi, offset aGelfFsizeFaile"], [230, "mov rdx, rax"], [231, "mov edi, 46h "], [232, "xor eax, eax"], [233, "call sub_42CB00"], [234, "mov esi, offset aUnsupportedETy"], [235, "mov edi, 41h "], [236, "xor eax, eax"], [237, "call sub_42CB00"], [238, "mov esi, offset aCallocFailed"], [239, "mov edi, 46h "], [240, "call sub_42CD30"], [241, "xchg ax, ax"]], "data_dep": [[6, 5], [8, 7], [10, 6], [11, 10], [13, 10], [13, 5], [13, 14], [13, 16], [13, 18], [14, 13], [14, 20], [15, 14], [15, 18], [15, 10], [16, 20], [16, 15], [18, 20], [19, 18], [19, 10], [19, 5], [19, 14], [19, 16], [20, 19], [21, 20], [22, 10], [22, 5], [22, 14], [22, 16], [22, 25], [22, 18], [23, 22], [24, 10], [24, 5], [24, 14], [24, 16], [24, 25], [24, 18], [25, 24], [30, 29], [31, 30], [34, 33], [35, 34], [36, 34], [38, 37], [39, 38], [40, 34], [42, 41], [43, 40], [46, 45], [47, 46], [50, 48], [52, 51], [53, 52], [55, 54], [57, 56], [58, 40], [59, 58], [60, 173], [61, 60], [64, 63], [65, 63], [65, 64], [67, 65], [69, 68], [71, 66], [72, 66], [73, 70], [75, 74], [77, 76], [78, 71], [79, 66], [80, 79], [81, 66], [82, 81], [85, 50], [87, 86], [88, 87], [90, 89], [91, 90], [94, 93], [95, 94], [96, 94], [97, 2], [99, 2], [102, 101], [103, 102], [104, 101], [105, 104], [106, 178], [106, 180], [106, 83], [108, 106], [110, 109], [112, 178], [112, 180], [112, 106], [112, 83], [113, 112], [113, 106], [114, 113], [115, 2], [118, 48], [120, 119], [121, 120], [122, 2], [124, 2], [127, 48], [129, 128], [130, 129], [131, 2], [133, 2], [134, 132], [137, 5], [137, 14], [137, 16], [137, 25], [137, 134], [138, 136], [139, 137], [140, 138], [146, 145], [147, 146], [148, 146], [150, 48], [152, 151], [153, 152], [155, 154], [156, 155], [157, 2], [162, 161], [163, 162], [164, 8], [165, 164], [166, 165], [167, 4], [168, 3], [169, 1], [170, 0], [171, 165], [173, 172], [175, 2], [187, 185], [194, 192], [201, 199], [208, 206], [215, 213], [222, 220], [230, 228]]}
| {"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/ddc68a52e638acf3af05a4546d06695c378d1e253df8abffaf1c795f1853f704_ddc68a52e638acf3af05a4546d06695c378d1e253df8abffaf1c795f1853f704.jsonl.gz", "strip_func_name": "sub_401640", "query": "\n\n\n__int64 __fastcall sub_401640(__int64 a1)\n{\n__int64 v2; // rdi\n__int64 v3; // rbx\nint v4; // eax\nint v5; // ecx\nint v6; // er8\nint v7; // er9\nchar v8; // al\nint v9; // edx\n__int64 v10; // rax\nint v11; // edx\nint v12; // ecx\nint v13; // er8\nint v14; // er9\nint v15; // eax\n__int64 v16; // rbx\nint v17; // edi\n__int64 result; // rax\nint v19; // eax\nint v20; // ecx\nint v21; // er8\nint v22; // er9\nint v23; // eax\nint v24; // ecx\nint v25; // er8\nint v26; // er9\nint v27; // eax\nint v28; // ecx\nint v29; // er8\nint v30; // er9\nint v31; // eax\nint v32; // ecx\nint v33; // er8\nint v34; // er9\nint v35; // eax\nint v36; // ecx\nint v37; // er8\nint v38; // er9\nint v39; // eax\nint v40; // ecx\nint v41; // er8\nint v42; // er9\nint v43; // eax\nint v44; // ecx\nint v45; // er8\nint v46; // er9\n__int64 v47; // [rsp+8h] [rbp-B0h] BYREF\n__int64 v48[2]; // [rsp+10h] [rbp-A8h] BYREF\nunsigned __int16 v49; // [rsp+20h] [rbp-98h]\n__int16 v50; // [rsp+22h] [rbp-96h]\nint v51; // [rsp+24h] [rbp-94h]\n__int64 v52; // [rsp+28h] [rbp-90h]\n__int64 v54; // [rsp+38h] [rbp-80h]\nint v55; // [rsp+40h] [rbp-78h]\n__int64 v56[2]; // [rsp+50h] [rbp-68h] BYREF\nunsigned __int16 v57; // [rsp+60h] [rbp-58h]\n__int16 v58; // [rsp+62h] [rbp-56h]\nint v59; // [rsp+64h] [rbp-54h]\n__int64 v60; // [rsp+68h] [rbp-50h]\nint v61; // [rsp+80h] [rbp-38h]\n__int64 v62; // [rsp+98h] [rbp-20h]\n\n*(_DWORD *)(a1 + 108) |= 0x20u;\nv2 = *(_QWORD *)(a1 + 232);\nv62 = qword_55C2C0;\nif ( v2 )\n{\nwhile ( 1 )\n{\nv3 = *(_QWORD *)(v2 + 96);\nif ( !v3 )\nbreak;\n*(_QWORD *)(v3 + 104) = *(_QWORD *)(v2 + 104);\n**(_QWORD **)(v2 + 104) = v3;\nsub_429710(v2);\nv2 = v3;\n}\n*(_QWORD *)(a1 + 240) = *(_QWORD *)(v2 + 104);\n**(_QWORD **)(v2 + 104) = 0LL;\nsub_429710(v2);\n}\nif ( !sub_40A900(*(_QWORD *)(a1 + 24), v56) )\ngoto LABEL_42;\nv4 = sub_4080D0(*(_QWORD *)(a1 + 24));\n*(_DWORD *)(a1 + 8) = v4;\nif ( !v4 )\n{\nLABEL_45:\nv31 = sub_409940(0xFFFFFFFFLL);\nsub_42CB00(70, (unsigned int)\"getclass() failed: %s\", v31, v32, v33, v34);\ngoto LABEL_46;\n}\nif ( !*(_DWORD *)(a1 + 12) )\n*(_DWORD *)(a1 + 12) = v4;\nif ( !*(_BYTE *)(a1 + 16) )\n*(_BYTE *)(a1 + 16) = BYTE5(v56[0]);\nif ( !sub_40A700(*(_QWORD *)(a1 + 32), *(unsigned int *)(a1 + 12)) )\n{\nLABEL_44:\nv27 = sub_409940(0xFFFFFFFFLL);\nsub_42CB00(70, (unsigned int)\"gelf_newehdr failed: %s\", v27, v28, v29, v30);\ngoto LABEL_45;\n}\nif ( !sub_40A900(*(_QWORD *)(a1 + 32), v48) )\ngoto LABEL_42;\nv48[0] = v56[0];\nv48[1] = v56[1];\nBYTE4(v48[0]) = *(_DWORD *)(a1 + 12);\nBYTE5(v48[0]) = *(_BYTE *)(a1 + 16);\nv8 = HIBYTE(v56[0]);\nif ( *(_DWORD *)(a1 + 20) != -1 )\nv8 = *(_DWORD *)(a1 + 20);\nv9 = v57;\nHIBYTE(v48[0]) = v8;\nv55 = v61;\nv49 = v57;\nv50 = v58;\nv52 = v60;\nv51 = v59;\nif ( v57 == 2 )\n{\n*(_DWORD *)(a1 + 108) |= 1u;\n}\nelse if ( v57 == 3 )\n{\n*(_DWORD *)(a1 + 108) |= 2u;\n}\nelse\n{\nLOWORD(v9) = v57 - 1;\nif ( v57 != 1 )\n{\nLABEL_50:\nsub_42CB00(65, (unsigned int)\"unsupported e_type\", v9, v5, v6, v7);\ngoto LABEL_51;\n}\n*(_DWORD *)(a1 + 108) |= 4u;\n}\nif ( !(unsigned int)sub_4097E0(*(_QWORD *)(a1 + 24), &v47) )\n{\nLABEL_46:\nv35 = sub_409940(0xFFFFFFFFLL);\nsub_42CB00(70, (unsigned int)\"elf_getshnum failed: %s\", v35, v36, v37, v38);\nLABEL_47:\nv39 = sub_409940(0xFFFFFFFFLL);\nsub_42CB00(70, (unsigned int)\"elf_update() failed: %s\", v39, v40, v41, v42);\nLABEL_48:\nsub_42C5E0();\n}\nif ( v47 )\n{\nv10 = sub_42AD40(v47, 8LL);\n*(_QWORD *)(a1 + 120) = v10;\nif ( !v10 )\n{\nLABEL_51:\nsub_42CD30(70, (unsigned int)\"calloc failed\", v11, v12, v13, v14);\nreturn sub_401A30();\n}\n}\nsub_405140(a1);\nsub_403880(a1);\nv15 = *(_DWORD *)(a1 + 104);\nif ( v15 == 2 || v15 == 4 || (*(_DWORD *)(a1 + 108) & 0x180) != 0 || *(_QWORD *)(a1 + 200) )\n*(_DWORD *)(a1 + 108) &= 0xFFFFFFDF;\nif ( (*(_BYTE *)(a1 + 108) & 0x10) != 0 )\nsub_405440(a1);\nsub_4042C0(a1);\nif ( !(unsigned int)sub_40A770(*(_QWORD *)(a1 + 32), v48) )\ngoto LABEL_43;\nsub_4029A0(a1);\nsub_402B60(a1);\nif ( !sub_40A900(*(_QWORD *)(a1 + 32), v48) )\n{\nLABEL_42:\nv19 = sub_409940(0xFFFFFFFFLL);\nsub_42CB00(70, (unsigned int)\"gelf_getehdr() failed: %s\", v19, v20, v21, v22);\ngoto LABEL_43;\n}\nv16 = sub_4033A0(a1);\nsub_402E20(a1);\nv17 = *(_DWORD *)(a1 + 44);\nv54 = *(_QWORD *)(v16 + 32);\nif ( v17 > 0 && !sub_415E10(*(_QWORD *)(a1 + 32), 4LL, 1LL, 1LL) )\n{\nv43 = sub_409940(0xFFFFFFFFLL);\nsub_42CB00(70, (unsigned int)\"gelf_fsize() failed: %s\", v43, v44, v45, v46);\ngoto LABEL_50;\n}\nif ( !(unsigned int)sub_40A770(*(_QWORD *)(a1 + 32), v48) )\n{\nLABEL_43:\nv23 = sub_409940(0xFFFFFFFFLL);\nsub_42CB00(70, (unsigned int)\"gelf_update_ehdr() failed: %s\", v23, v24, v25, v26);\ngoto LABEL_44;\n}\nif ( *(int *)(a1 + 44) > 0 )\nsub_404F50(a1);\nif ( sub_408120(*(_QWORD *)(a1 + 32), 7LL) < 0 )\ngoto LABEL_47;\nresult = qword_55C2C0 ^ v62;\nif ( qword_55C2C0 != v62 )\ngoto LABEL_48;\nreturn result;\n}\n\n\n\nQ:[a1,v47,v48,v56,sub_401640,sub_429710,sub_40A900,sub_4080D0,sub_409940,sub_42CB00,sub_40A700,sub_4097E0,sub_42AD40,sub_42CD30,sub_401A30,sub_405140,sub_403880,sub_405440,sub_4042C0,sub_40A770,sub_4029A0,sub_402B60,sub_4033A0,sub_402E20,sub_415E10,sub_404F50,sub_408120,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ecp', 'v47': 'ishnum', 'v48': 'oeh', 'v56': 'ieh', 'sub_401640': 'create_elf', 'sub_429710': 'free', 'sub_40A900': 'gelf_getehdr', 'sub_4080D0': 'gelf_getclass', 'sub_409940': 'elf_errmsg', 'sub_42CB00': 'errx', 'sub_40A700': 'gelf_newehdr', 'sub_4097E0': 'elf_getshnum', 'sub_42AD40': 'calloc', 'sub_42CD30': 'err', 'sub_401A30': 'create_file', 'sub_405140': 'setup_phdr', 'sub_403880': 'create_scn', 'sub_405440': 'create_symtab', 'sub_4042C0': 'copy_content', 'sub_40A770': 'gelf_update_ehdr', 'sub_4029A0': 'set_shstrtab', 'sub_402B60': 'update_shdr', 'sub_4033A0': 'insert_shtab', 'sub_402E20': 'resync_sections', 'sub_415E10': 'gelf_fsize', 'sub_404F50': 'copy_phdr', 'sub_408120': 'elf_update'}"} |
|
sl_btmesh_config_client_set_default_ttl | 81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba | openthread | ot-efr32 | NA | sl_status_t sl_btmesh_config_client_set_default_ttl(uint16_t enc_netkey_index,
uint16_t server_address,
uint8_t value,
uint32_t *handle) {
struct sl_btmesh_packet *cmd = (struct sl_btmesh_packet *)sl_btmesh_cmd_msg;
struct sl_btmesh_packet *rsp = (struct sl_btmesh_packet *)sl_btmesh_rsp_msg;
cmd->data.cmd_config_client_set_default_ttl.enc_netkey_index=enc_netkey_index;
cmd->data.cmd_config_client_set_default_ttl.server_address=server_address;
cmd->data.cmd_config_client_set_default_ttl.value=value;
cmd->header=sl_btmesh_cmd_config_client_set_default_ttl_id+(((5)&0xff)<<8)+(((5)&0x700)>>8);
sl_btmesh_host_handle_command();
if (handle) {
*handle = rsp->data.rsp_config_client_set_default_ttl.handle;
}
return rsp->data.rsp_config_client_set_default_ttl.result;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_412CDB", "function_addr": 4271323, "binary_name": "81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov eax, esi"], [4, "mov [rbp+var_28], rcx"], [5, "mov ecx, edi"], [6, "mov [rbp+var_14], cx"], [7, "mov [rbp+var_18], ax"], [8, "mov eax, edx"], [9, "mov [rbp+var_1C], al"], [10, "mov rax, cs:off_4262A0"], [11, "mov [rbp+var_8], rax"], [12, "mov rax, cs:off_4262A8"], [13, "mov [rbp+var_10], rax"], [14, "mov rax, [rbp+var_8]"], [15, "movzx edx, [rbp+var_14]"], [16, "mov [rax+4], dx"], [17, "mov rax, [rbp+var_8]"], [18, "movzx edx, [rbp+var_18]"], [19, "mov [rax+6], dx"], [20, "mov rax, [rbp+var_8]"], [21, "movzx edx, [rbp+var_1C]"], [22, "mov [rax+8], dl"], [23, "mov rax, [rbp+var_8]"], [24, "mov dword ptr [rax], 1E270528h"], [25, "mov eax, 0"], [26, "call sub_40AE8C"], [27, "cmp [rbp+var_28], 0"], [28, "jz short loc_412D59"], [29, "mov rax, [rbp+var_10]"], [30, "mov edx, [rax+6]"], [31, "mov rax, [rbp+var_28]"], [32, "mov [rax], edx"], [33, "mov rax, [rbp+var_10]"], [34, "movzx eax, word ptr [rax+4]"], [35, "movzx eax, ax"], [36, "leave"], [37, "retn"]], "data_dep": [[6, 5], [7, 3], [9, 8], [11, 10], [13, 12], [14, 11], [15, 6], [16, 15], [16, 14], [17, 11], [18, 7], [19, 18], [19, 17], [20, 11], [21, 9], [22, 20], [22, 21], [23, 11], [24, 23], [27, 4], [28, 27], [29, 13], [30, 24], [30, 32], [30, 29], [30, 16], [30, 19], [30, 22], [31, 4], [32, 31], [32, 30], [33, 13], [34, 16], [34, 19], [34, 22], [34, 24], [34, 33], [34, 32], [35, 34], [37, 35]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba_81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba.jsonl.gz", "strip_func_name": "sub_412CDB", "query": "\n\n\n__int64 __fastcall sub_412CDB(__int64 a1, __int64 a2, unsigned __int8 a3, _DWORD *a4, __int64 a5, __int64 a6)\n{\nchar *v8; // [rsp+20h] [rbp-10h]\n_WORD *v9; // [rsp+28h] [rbp-8h]\n\nv9 = off_4262A0;\nv8 = (char *)off_4262A8;\n*((_WORD *)off_4262A0 + 2) = a1;\nv9[3] = a2;\n*((_BYTE *)v9 + 8) = a3;\n*(_DWORD *)v9 = 505873704;\nsub_40AE8C(a1, a2, a3, (unsigned int)a1, a5, a6);\nif ( a4 )\n*a4 = *(_DWORD *)(v8 + 6);\nreturn *((unsigned __int16 *)v8 + 2);\n}\n\n\n\nQ:[a3,a4,a1,a2,v8,v9,sub_412CDB,sub_40AE8C,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'value', 'a4': 'handle', 'a1': 'enc_netkey_index', 'a2': 'server_address', 'v8': 'rsp_0', 'v9': 'cmd', 'sub_412CDB': 'sl_btmesh_config_client_set_default_ttl', 'sub_40AE8C': 'sl_btmesh_host_handle_command'}"} |
|
load_cal | ef47051ac1df17d055b561c2a3f7651b688226ab2e0c9b40cb9f92aaf4051fb4 | fm4dd | pi-bno055 | NA | int load_cal(char *file) {
/* -------------------------------------------------------- *
* Open the calibration data file for reading. *
* -------------------------------------------------------- */
FILE *calib;
if(! (calib=fopen(file, "r"))) {
printf("Error: Can't open %s for reading.\n", file);
exit(-1);
}
if(verbose == 1) printf("Debug: Load from file: [%s]\n", file);
/* -------------------------------------------------------- *
* Read 34 bytes from file into data[], starting at data[1] *
* -------------------------------------------------------- */
char data[CALIB_BYTECOUNT+1] = {0};
//data[0] = ACC_OFFSET_X_LSB_ADDR;
data[0] = BNO055_SIC_MATRIX_0_LSB_ADDR;
int inbytes = fread(&data[1], 1, CALIB_BYTECOUNT, calib);
fclose(calib);
if(inbytes != CALIB_BYTECOUNT) {
printf("Error: %d/%d bytes read to file.\n", inbytes, CALIB_BYTECOUNT);
return(-1);
}
if(verbose == 1) {
printf("Debug: Calibrationset:");
int i = 1;
while(i<CALIB_BYTECOUNT+1) {
printf(" %02X", data[i]);
i++;
}
printf("\n");
}
/* -------------------------------------------------------- *
* Write 34 bytes from file into sensor registers from 0x43 *
* We need to switch in and out of CONFIG mode if needed... *
* -------------------------------------------------------- */
opmode_t oldmode = get_mode();
set_mode(config);
usleep(50 * 1000);
if(write(i2cfd, data, (CALIB_BYTECOUNT+1)) != (CALIB_BYTECOUNT+1)) {
printf("Error: I2C write failure for register 0x%02X\n", data[0]);
return(-1);
}
/* -------------------------------------------------------- *
* To verify, we read 34 bytes from 0x43 & compare to input *
* -------------------------------------------------------- */
//char reg = ACC_OFFSET_X_LSB_ADDR;
char reg = BNO055_SIC_MATRIX_0_LSB_ADDR;
if(write(i2cfd, ®, 1) != 1) {
printf("Error: I2C write failure for register 0x%02X\n", reg);
return(-1);
}
char newdata[CALIB_BYTECOUNT] = {0};
if(read(i2cfd, newdata, CALIB_BYTECOUNT) != CALIB_BYTECOUNT) {
printf("Error: I2C calibration data read from 0x%02X\n", reg);
return(-1);
}
if(verbose == 1) printf("Debug: Registerupdate:");
int i = 0;
while(i<CALIB_BYTECOUNT) {
if(data[i+1] != newdata[i]) {
printf("\nError: Calibration load failure %02X register 0x%02X\n", newdata[i], reg+i);
//exit(-1);
}
if(verbose == 1) printf(" %02X", newdata[i]);
i++;
}
if(verbose == 1) printf("\n");
set_mode(oldmode);
/* -------------------------------------------------------- *
* 650 ms delay are only needed if -l and -t are both used *
* to let the fusion code process the new calibration data *
* -------------------------------------------------------- */
usleep(650 * 1000);
return(0);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401F7C", "function_addr": 4202364, "binary_name": "ef47051ac1df17d055b561c2a3f7651b688226ab2e0c9b40cb9f92aaf4051fb4.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "add rsp, 0FFFFFFFFFFFFFF80h"], [3, "mov [rbp+filename], rdi"], [4, "mov rax, [rbp+filename]"], [5, "mov esi, offset aR"], [6, "mov rdi, rax"], [7, "call _fopen"], [8, "mov [rbp+stream], rax"], [9, "cmp [rbp+stream], 0"], [10, "jnz short loc_401FC4"], [11, "mov rax, [rbp+filename]"], [12, "mov rsi, rax"], [13, "mov edi, offset aErrorCanTOpenS_0"], [14, "mov eax, 0"], [15, "call _printf"], [16, "mov edi, 0FFFFFFFFh"], [17, "call _exit"], [18, "mov eax, cs:dword_40D340"], [19, "cmp eax, 1"], [20, "jnz short loc_401FE5"], [21, "mov rax, [rbp+filename]"], [22, "mov rsi, rax"], [23, "mov edi, offset aDebugLoadFromF"], [24, "mov eax, 0"], [25, "call _printf"], [26, "mov [rbp+buf], 0"], [27, "mov [rbp+var_38], 0"], [28, "mov [rbp+var_30], 0"], [29, "mov [rbp+var_28], 0"], [30, "mov [rbp+var_20], 0"], [31, "mov [rbp+var_1E], 0"], [32, "mov byte ptr [rbp+buf], 43h "], [33, "mov rax, [rbp+stream]"], [34, "lea rdx, [rbp+buf]"], [35, "lea rdi, [rdx+1]"], [36, "mov rcx, rax"], [37, "mov edx, 22h "], [38, "mov esi, 1"], [39, "call _fread"], [40, "mov [rbp+var_14], eax"], [41, "mov rax, [rbp+stream]"], [42, "mov rdi, rax"], [43, "call _fclose"], [44, "cmp [rbp+var_14], 22h "], [45, "jz short loc_402069"], [46, "mov eax, [rbp+var_14]"], [47, "mov edx, 22h "], [48, "mov esi, eax"], [49, "mov edi, offset aErrorDDBytesRe"], [50, "mov eax, 0"], [51, "call _printf"], [52, "mov eax, 0FFFFFFFFh"], [53, "jmp locret_402295"], [54, "mov eax, cs:dword_40D340"], [55, "cmp eax, 1"], [56, "jnz short loc_4020BE"], [57, "mov edi, offset aDebugCalibrati"], [58, "mov eax, 0"], [59, "call _printf"], [60, "mov [rbp+var_4], 1"], [61, "jmp short loc_4020AE"], [62, "mov eax, [rbp+var_4]"], [63, "cdqe"], [64, "movzx eax, byte ptr [rbp+rax+buf]"], [65, "movsx eax, al"], [66, "mov esi, eax"], [67, "mov edi, offset a02x"], [68, "mov eax, 0"], [69, "call _printf"], [70, "add [rbp+var_4], 1"], [71, "cmp [rbp+var_4], 22h "], [72, "jle short loc_40208C"], [73, "mov edi, 0Ah"], [74, "call _putchar"], [75, "mov eax, 0"], [76, "call sub_4039D8"], [77, "mov [rbp+var_18], eax"], [78, "mov edi, 0"], [79, "call sub_403888"], [80, "mov edi, 0C350h"], [81, "call _usleep"], [82, "mov eax, cs:fd"], [83, "lea rcx, [rbp+buf]"], [84, "mov edx, 23h "], [85, "mov rsi, rcx"], [86, "mov edi, eax"], [87, "call _write"], [88, "cmp rax, 23h "], [89, "jz short loc_402120"], [90, "movzx eax, byte ptr [rbp+buf]"], [91, "movsx eax, al"], [92, "mov esi, eax"], [93, "mov edi, offset aErrorI2cWriteF_0"], [94, "mov eax, 0"], [95, "call _printf"], [96, "mov eax, 0FFFFFFFFh"], [97, "jmp locret_402295"], [98, "mov [rbp+var_41], 43h "], [99, "mov eax, cs:fd"], [100, "lea rcx, [rbp+var_41]"], [101, "mov edx, 1"], [102, "mov rsi, rcx"], [103, "mov edi, eax"], [104, "call _write"], [105, "cmp rax, 1"], [106, "jz short loc_402165"], [107, "movzx eax, [rbp+var_41]"], [108, "movsx eax, al"], [109, "mov esi, eax"], [110, "mov edi, offset aErrorI2cWriteF_0"], [111, "mov eax, 0"], [112, "call _printf"], [113, "mov eax, 0FFFFFFFFh"], [114, "jmp locret_402295"], [115, "mov [rbp+var_70], 0"], [116, "mov [rbp+var_68], 0"], [117, "mov [rbp+var_60], 0"], [118, "mov [rbp+var_58], 0"], [119, "mov [rbp+var_50], 0"], [120, "mov eax, cs:fd"], [121, "lea rcx, [rbp+var_70]"], [122, "mov edx, 22h "], [123, "mov rsi, rcx"], [124, "mov edi, eax"], [125, "call _read"], [126, "cmp rax, 22h "], [127, "jz short loc_4021CC"], [128, "movzx eax, [rbp+var_41]"], [129, "movsx eax, al"], [130, "mov esi, eax"], [131, "mov edi, offset aErrorI2cCalibr"], [132, "mov eax, 0"], [133, "call _printf"], [134, "mov eax, 0FFFFFFFFh"], [135, "jmp locret_402295"], [136, "mov eax, cs:dword_40D340"], [137, "cmp eax, 1"], [138, "jnz short loc_4021E6"], [139, "mov edi, offset aDebugRegisteru"], [140, "mov eax, 0"], [141, "call _printf"], [142, "mov [rbp+var_8], 0"], [143, "jmp short loc_402261"], [144, "mov eax, [rbp+var_8]"], [145, "add eax, 1"], [146, "cdqe"], [147, "movzx edx, byte ptr [rbp+rax+buf]"], [148, "mov eax, [rbp+var_8]"], [149, "cdqe"], [150, "movzx eax, byte ptr [rbp+rax+var_70]"], [151, "cmp dl, al"], [152, "jz short loc_402234"], [153, "movzx eax, [rbp+var_41]"], [154, "movsx edx, al"], [155, "mov eax, [rbp+var_8]"], [156, "add edx, eax"], [157, "mov eax, [rbp+var_8]"], [158, "cdqe"], [159, "movzx eax, byte ptr [rbp+rax+var_70]"], [160, "movsx eax, al"], [161, "mov esi, eax"], [162, "mov edi, offset aErrorCalibrati"], [163, "mov eax, 0"], [164, "call _printf"], [165, "mov eax, cs:dword_40D340"], [166, "cmp eax, 1"], [167, "jnz short loc_40225D"], [168, "mov eax, [rbp+var_8]"], [169, "cdqe"], [170, "movzx eax, byte ptr [rbp+rax+var_70]"], [171, "movsx eax, al"], [172, "mov esi, eax"], [173, "mov edi, offset a02x"], [174, "mov eax, 0"], [175, "call _printf"], [176, "add [rbp+var_8], 1"], [177, "cmp [rbp+var_8], 21h "], [178, "jle short loc_4021EF"], [179, "mov eax, cs:dword_40D340"], [180, "cmp eax, 1"], [181, "jnz short loc_40227C"], [182, "mov edi, 0Ah"], [183, "call _putchar"], [184, "mov eax, [rbp+var_18]"], [185, "mov edi, eax"], [186, "call sub_403888"], [187, "mov edi, 9EB10h"], [188, "call _usleep"], [189, "mov eax, 0"], [190, "leave"], [191, "retn"]], "data_dep": [[4, 3], [6, 4], [8, 7], [9, 8], [10, 9], [11, 3], [12, 11], [19, 18], [20, 19], [21, 3], [22, 21], [33, 8], [34, 32], [35, 23], [35, 34], [35, 6], [36, 33], [40, 39], [41, 8], [42, 41], [44, 40], [45, 44], [46, 40], [48, 46], [55, 54], [56, 55], [62, 60], [62, 70], [64, 62], [65, 64], [66, 65], [70, 70], [70, 60], [71, 60], [71, 70], [72, 71], [77, 76], [83, 32], [83, 36], [85, 83], [86, 82], [88, 87], [89, 88], [90, 32], [91, 90], [92, 91], [100, 83], [100, 98], [102, 100], [103, 99], [105, 104], [106, 105], [107, 98], [108, 107], [109, 108], [121, 100], [121, 115], [123, 121], [124, 120], [126, 125], [127, 126], [128, 98], [129, 128], [130, 129], [137, 136], [138, 137], [144, 176], [144, 142], [145, 144], [147, 145], [148, 142], [148, 176], [150, 148], [151, 150], [151, 147], [152, 151], [153, 98], [154, 153], [155, 176], [155, 142], [156, 154], [156, 155], [157, 176], [157, 142], [159, 157], [160, 159], [161, 160], [166, 165], [167, 166], [168, 142], [168, 176], [170, 168], [171, 170], [172, 171], [176, 176], [176, 142], [177, 176], [177, 142], [178, 177], [180, 179], [181, 180], [184, 77], [185, 184], [191, 52], [191, 189], [191, 134], [191, 113], [191, 96]]}
| {"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/ef47051ac1df17d055b561c2a3f7651b688226ab2e0c9b40cb9f92aaf4051fb4_ef47051ac1df17d055b561c2a3f7651b688226ab2e0c9b40cb9f92aaf4051fb4.jsonl.gz", "strip_func_name": "sub_401F7C", "query": "\n\n\n__int64 __fastcall sub_401F7C(const char *a1)\n{\n__int64 result; // rax\n__int64 v2[4]; // [rsp+10h] [rbp-70h] BYREF\n__int16 v3; // [rsp+30h] [rbp-50h]\nchar v4; // [rsp+3Fh] [rbp-41h] BYREF\n__int64 buf[4]; // [rsp+40h] [rbp-40h] BYREF\n__int16 v6; // [rsp+60h] [rbp-20h]\nchar v7; // [rsp+62h] [rbp-1Eh]\nunsigned int v8; // [rsp+68h] [rbp-18h]\nunsigned int v9; // [rsp+6Ch] [rbp-14h]\nFILE *stream; // [rsp+70h] [rbp-10h]\nint j; // [rsp+78h] [rbp-8h]\nint i; // [rsp+7Ch] [rbp-4h]\n\nstream = fopen(a1, \"r\");\nif ( !stream )\n{\nprintf(\"Error: Can't open %s for reading.\\n\", a1);\nexit(-1);\n}\nif ( dword_40D340 == 1 )\nprintf(\"Debug: Load from file: [%s]\\n\", a1);\nbuf[0] = 67LL;\nbuf[1] = 0LL;\nbuf[2] = 0LL;\nbuf[3] = 0LL;\nv6 = 0;\nv7 = 0;\nv9 = fread((char *)buf + 1, 1uLL, 0x22uLL, stream);\nfclose(stream);\nif ( v9 == 34 )\n{\nif ( dword_40D340 == 1 )\n{\nprintf(\"Debug: Calibrationset:\");\nfor ( i = 1; i <= 34; ++i )\nprintf(\" %02X\", (unsigned int)*((char *)buf + i));\nputchar(10);\n}\nv8 = sub_4039D8();\nsub_403888(0LL);\nusleep(0xC350u);\nif ( write(fd, buf, 0x23uLL) == 35 )\n{\nv4 = 67;\nif ( write(fd, &v4, 1uLL) == 1 )\n{\nv2[0] = 0LL;\nv2[1] = 0LL;\nv2[2] = 0LL;\nv2[3] = 0LL;\nv3 = 0;\nif ( read(fd, v2, 0x22uLL) == 34 )\n{\nif ( dword_40D340 == 1 )\nprintf(\"Debug: Registerupdate:\");\nfor ( j = 0; j <= 33; ++j )\n{\nif ( *((_BYTE *)buf + j + 1) != *((_BYTE *)v2 + j) )\nprintf(\n\"\\nError: Calibration load failure %02X register 0x%02X\\n\",\n(unsigned int)*((char *)v2 + j),\n(unsigned int)(j + v4));\nif ( dword_40D340 == 1 )\nprintf(\" %02X\", (unsigned int)*((char *)v2 + j));\n}\nif ( dword_40D340 == 1 )\nputchar(10);\nsub_403888(v8);\nusleep(0x9EB10u);\nresult = 0LL;\n}\nelse\n{\nprintf(\"Error: I2C calibration data read from 0x%02X\\n\", (unsigned int)v4);\nresult = 0xFFFFFFFFLL;\n}\n}\nelse\n{\nprintf(\"Error: I2C write failure for register 0x%02X\\n\", (unsigned int)v4);\nresult = 0xFFFFFFFFLL;\n}\n}\nelse\n{\nprintf(\"Error: I2C write failure for register 0x%02X\\n\", (unsigned int)SLOBYTE(buf[0]));\nresult = 0xFFFFFFFFLL;\n}\n}\nelse\n{\nprintf(\"Error: %d/%d bytes read to file.\\n\", v9, 34LL);\nresult = 0xFFFFFFFFLL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,v2,v4,buf,v8,v9,stream,i,sub_401F7C,sub_4039D8,sub_403888,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'file', 'v2': 'newdata', 'v4': 'reg', 'buf': 'data', 'v8': 'oldmode', 'v9': 'inbytes', 'stream': 'calib', 'i': 'i_0', 'sub_401F7C': 'load_cal', 'sub_4039D8': 'get_mode', 'sub_403888': 'set_mode'}"} |
|
add_logged_user | 285e8099cb5158870262b7a40450298d7640a5b7a8542769942bd2883c56dc78 | TarlogicSecurity | tickey | NA | static int add_logged_user(users_sessions_list_t* users, user_session_t* user){
user_session_t ** aux_ptr = realloc(users->users,
(users->length + 1) * sizeof(user_session_t*));
if(aux_ptr == NULL){
return -1;
}
users->users = aux_ptr;
users->users[users->length] = user;
users->length++;
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404B00", "function_addr": 4213504, "binary_name": "285e8099cb5158870262b7a40450298d7640a5b7a8542769942bd2883c56dc78.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov rax, [rbp+var_18]"], [6, "mov rax, [rax]"], [7, "add rax, 1"], [8, "lea rdx, ds:0[rax*8]"], [9, "mov rax, [rbp+var_18]"], [10, "mov rax, [rax+8]"], [11, "mov rsi, rdx"], [12, "mov rdi, rax"], [13, "call _realloc"], [14, "mov [rbp+var_8], rax"], [15, "cmp [rbp+var_8], 0"], [16, "jnz short loc_404B48"], [17, "mov eax, 0FFFFFFFFh"], [18, "jmp short locret_404B88"], [19, "mov rax, [rbp+var_18]"], [20, "mov rdx, [rbp+var_8]"], [21, "mov [rax+8], rdx"], [22, "mov rax, [rbp+var_18]"], [23, "mov rdx, [rax+8]"], [24, "mov rax, [rbp+var_18]"], [25, "mov rax, [rax]"], [26, "shl rax, 3"], [27, "add rdx, rax"], [28, "mov rax, [rbp+var_20]"], [29, "mov [rdx], rax"], [30, "mov rax, [rbp+var_18]"], [31, "mov rax, [rax]"], [32, "lea rdx, [rax+1]"], [33, "mov rax, [rbp+var_18]"], [34, "mov [rax], rdx"], [35, "mov eax, 0"], [36, "leave"], [37, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [9, 3], [10, 9], [11, 8], [12, 10], [14, 13], [15, 14], [16, 15], [19, 3], [20, 14], [21, 19], [21, 20], [22, 3], [23, 22], [23, 21], [24, 3], [25, 21], [25, 24], [26, 25], [27, 23], [27, 26], [28, 4], [29, 28], [29, 27], [30, 3], [31, 29], [31, 30], [32, 31], [32, 27], [32, 29], [33, 3], [34, 33], [34, 32], [37, 17], [37, 35]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/285e8099cb5158870262b7a40450298d7640a5b7a8542769942bd2883c56dc78_285e8099cb5158870262b7a40450298d7640a5b7a8542769942bd2883c56dc78.jsonl.gz", "strip_func_name": "sub_404B00", "query": "\n\n\n__int64 __fastcall sub_404B00(__int64 a1, __int64 a2)\n{\nvoid *v3; // [rsp+18h] [rbp-8h]\n\nv3 = realloc(*(void **)(a1 + 8), 8 * (*(_QWORD *)a1 + 1LL));\nif ( !v3 )\nreturn 0xFFFFFFFFLL;\n*(_QWORD *)(a1 + 8) = v3;\n*(_QWORD *)(8LL * (*(_QWORD *)a1)++ + *(_QWORD *)(a1 + 8)) = a2;\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v3,sub_404B00,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'users', 'a2': 'user', 'v3': 'aux_ptr', 'sub_404B00': 'add_logged_user'}"} |
|
clippaste | a9838ca9159ce9b0ee599a872c1ff0d2aebbc40101727b1a5d58bfee9dd9d87b | LukeSmithxyz | st | NA | void
clippaste(const Arg *dummy)
{
Atom clipboard;
clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0);
XConvertSelection(xw.dpy, clipboard, xsel.xtarget, clipboard,
xw.win, CurrentTime);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40B82A", "function_addr": 4241450, "binary_name": "a9838ca9159ce9b0ee599a872c1ff0d2aebbc40101727b1a5d58bfee9dd9d87b.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, cs:display"], [5, "mov edx, 0"], [6, "mov esi, offset aClipboard"], [7, "mov rdi, rax"], [8, "call _XInternAtom"], [9, "mov [rbp+var_8], rax"], [10, "mov rdi, cs:qword_422990"], [11, "mov rdx, cs:qword_422AA0"], [12, "mov rax, cs:display"], [13, "mov rcx, [rbp+var_8]"], [14, "mov rsi, [rbp+var_8]"], [15, "mov r9d, 0"], [16, "mov r8, rdi"], [17, "mov rdi, rax"], [18, "call _XConvertSelection"], [19, "nop"], [20, "leave"], [21, "retn"]], "data_dep": [[7, 4], [9, 8], [13, 9], [14, 9], [16, 10], [17, 12], [21, 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/a9838ca9159ce9b0ee599a872c1ff0d2aebbc40101727b1a5d58bfee9dd9d87b_a9838ca9159ce9b0ee599a872c1ff0d2aebbc40101727b1a5d58bfee9dd9d87b.jsonl.gz", "strip_func_name": "sub_40B82A", "query": "\n\n\nint sub_40B82A()\n{\nAtom v1; // [rsp+18h] [rbp-8h]\n\nv1 = XInternAtom(display, \"CLIPBOARD\", 0);\nreturn XConvertSelection(display, v1, qword_422AA0, v1, qword_422990, 0LL);\n}\n\n\n\nQ:[v1,sub_40B82A,]\nAssistant: ", "hints": "[]", "response": "{'v1': 'clipboard', 'sub_40B82A': 'clippaste'}"} |
|
testHEX8ArrayWithinDeltaExpectedNullAndMessage | 46f2098509954f9b46a13d7d65487eeec0d3b9bfe0bee64bfb7700b5b7a10d06 | aws-samples | connected-drink-dispenser-workshop | NA | void testHEX8ArrayWithinDeltaExpectedNullAndMessage(void)
{
UNITY_UINT8 acutalBigDelta[] = {0x67, 0x88, 0xAC};
EXPECT_ABORT_BEGIN
TEST_ASSERT_HEX8_ARRAY_WITHIN_MESSAGE(60, NULL, acutalBigDelta, 3, "Custom Message.");
VERIFY_FAILS_END
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41C802", "function_addr": 4311042, "binary_name": "46f2098509954f9b46a13d7d65487eeec0d3b9bfe0bee64bfb7700b5b7a10d06.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov rax, cs:qword_476CA0"], [4, "add rax, 1"], [5, "mov cs:qword_476CA0, rax"], [6, "mov [rbp+var_3], 8867h"], [7, "mov [rbp+var_1], 0ACh"], [8, "call sub_437A0C"], [9, "mov rax, cs:qword_476CA8"], [10, "add rax, 1"], [11, "mov cs:qword_476CA8, rax"], [12, "mov edi, offset env"], [13, "call __setjmp"], [14, "mov rdx, cs:qword_476CB0"], [15, "add rdx, 1"], [16, "mov cs:qword_476CB0, rdx"], [17, "test eax, eax"], [18, "jnz short loc_41C8B0"], [19, "mov rax, cs:qword_476CB8"], [20, "add rax, 1"], [21, "mov cs:qword_476CB8, rax"], [22, "lea rax, [rbp+var_3]"], [23, "push 1"], [24, "push 41h "], [25, "mov r9d, 0AD6h"], [26, "mov r8d, offset aCustomMessage"], [27, "mov ecx, 3"], [28, "mov rdx, rax"], [29, "mov esi, 0"], [30, "mov edi, 3Ch "], [31, "call sub_405029"], [32, "add rsp, 10h"], [33, "mov rax, cs:qword_476CC0"], [34, "add rax, 1"], [35, "mov cs:qword_476CC0, rax"], [36, "call sub_437A39"], [37, "mov rax, cs:qword_476CC8"], [38, "add rax, 1"], [39, "mov cs:qword_476CC8, rax"], [40, "mov rax, cs:qword_46C120"], [41, "cmp rax, 1"], [42, "setnz al"], [43, "movzx eax, al"], [44, "mov cs:qword_46C120, rax"], [45, "mov rax, cs:qword_46C120"], [46, "cmp rax, 1"], [47, "jnz loc_41C9A2"], [48, "mov rax, cs:qword_476CD0"], [49, "add rax, 1"], [50, "mov cs:qword_476CD0, rax"], [51, "mov cs:dword_46D624, 1"], [52, "mov rax, cs:qword_46C100"], [53, "mov rdi, rax"], [54, "call sub_4018BD"], [55, "mov rax, cs:qword_476CD8"], [56, "add rax, 1"], [57, "mov cs:qword_476CD8, rax"], [58, "mov edi, 3Ah "], [59, "call sub_437A88"], [60, "mov rax, cs:qword_476CE0"], [61, "add rax, 1"], [62, "mov cs:qword_476CE0, rax"], [63, "mov rax, cs:qword_46C0E8"], [64, "mov rdi, rax"], [65, "call sub_4014A8"], [66, "mov rax, cs:qword_476CE8"], [67, "add rax, 1"], [68, "mov cs:qword_476CE8, rax"], [69, "mov edi, offset aFailTestShould"], [70, "call sub_4014A8"], [71, "mov rax, cs:qword_476CF0"], [72, "add rax, 1"], [73, "mov cs:qword_476CF0, rax"], [74, "mov edi, 0Ah"], [75, "call sub_437A88"], [76, "mov rax, cs:qword_476CF8"], [77, "add rax, 1"], [78, "mov cs:qword_476CF8, rax"], [79, "nop"], [80, "leave"], [81, "retn"]], "data_dep": [[4, 3], [5, 4], [10, 9], [11, 10], [15, 14], [16, 15], [17, 13], [18, 17], [20, 19], [21, 20], [22, 20], [22, 6], [28, 22], [32, 2], [34, 33], [35, 34], [38, 37], [39, 38], [41, 40], [42, 41], [42, 40], [43, 42], [44, 43], [45, 44], [46, 45], [47, 46], [49, 48], [50, 49], [53, 52], [56, 55], [57, 56], [61, 60], [62, 61], [64, 63], [67, 66], [68, 67], [72, 71], [73, 72], [77, 76], [78, 77], [81, 45], [81, 77]]}
| {"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_41C802", "query": "\n\n\n__int64 __fastcall sub_41C802(__int64 a1, __int64 a2, __int64 a3)\n{\n__int64 v3; // rdi\nint v4; // eax\n__int64 v5; // rdx\n__int64 result; // rax\n__int16 v7; // [rsp+Dh] [rbp-3h] BYREF\nchar v8; // [rsp+Fh] [rbp-1h]\n\n++qword_476CA0;\nv7 = -30617;\nv8 = -84;\nsub_437A0C(a1, a2, a3);\n++qword_476CA8;\nv3 = (__int64)env;\nv4 = _setjmp(env);\nv5 = ++qword_476CB0;\nif ( !v4 )\n{\n++qword_476CB8;\na2 = 0LL;\nv3 = 60LL;\nsub_405029(0x3CuLL, 0LL, (__int64)&v7, 3, \"Custom Message.\", 2774LL, 65, 1);\n++qword_476CC0;\n}\nsub_437A39(v3, a2, v5);\n++qword_476CC8;\nqword_46C120 = qword_46C120 != 1;\nresult = qword_46C120;\nif ( qword_46C120 == 1 )\n{\n++qword_476CD0;\ndword_46D624 = 1;\nsub_4018BD(qword_46C100);\n++qword_476CD8;\nsub_437A88(58LL);\n++qword_476CE0;\nsub_4014A8((char *)qword_46C0E8);\n++qword_476CE8;\nsub_4014A8(\":FAIL: [[[[ Test Should Have Failed But Did Not ]]]]\");\n++qword_476CF0;\nsub_437A88(10LL);\nresult = ++qword_476CF8;\n}\nreturn result;\n}\n\n\n\nQ:[v7,sub_41C802,sub_437A0C,sub_405029,sub_437A39,sub_4018BD,sub_437A88,sub_4014A8,]\nAssistant: ", "hints": "[]", "response": "{'v7': 'acutalBigDelta', 'sub_41C802': 'testHEX8ArrayWithinDeltaExpectedNullAndMessage', 'sub_437A0C': 'startPutcharSpy', 'sub_405029': 'UnityAssertNumbersArrayWithin', 'sub_437A39': 'endPutcharSpy', 'sub_4018BD': 'UnityPrintNumberUnsigned', 'sub_437A88': 'putcharSpy', 'sub_4014A8': 'UnityPrint'}"} |
|
Z80free_reset | 867b3f12dd6bc0f5d65f833e0aac6c437c6682ccfe80bbc748ae054ccf229091 | rastersoft | fbzx | NA | void Z80free_reset(Z80FREE *processor) {
processor->PC=0;
processor->IFF1=0;
processor->IFF2=0;
processor->Rm.wr.AF=0xFFFF;
processor->Rm.wr.BC=0xFFFF;
processor->Rm.wr.DE=0xFFFF;
processor->Rm.wr.HL=0xFFFF;
processor->Rm.wr.IX=0xFFFF;
processor->Rm.wr.IY=0xFFFF;
processor->Ra.wr.AF=0xFFFF;
processor->Ra.wr.BC=0xFFFF;
processor->Ra.wr.DE=0xFFFF;
processor->Ra.wr.HL=0xFFFF;
processor->HALT=0;
processor->IM=0;
processor->I=0;
processor->Status=Z80XX;
processor->IAddr_done=0;
processor->INT_P=0;
processor->NMI_P=0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41C320", "function_addr": 4309792, "binary_name": "867b3f12dd6bc0f5d65f833e0aac6c437c6682ccfe80bbc748ae054ccf229091.elf_extract.pkl\n"}, "code": [[0, "xor eax, eax"], [1, "xor edx, edx"], [2, "mov qword ptr [rdi+0Eh], 0FFFFFFFFFFFFFFFFh"], [3, "mov [rdi+1Ch], ax"], [4, "mov dword ptr [rdi+16h], 0FFFFFFFFh"], [5, "mov qword ptr [rdi], 0FFFFFFFFFFFFFFFFh"], [6, "mov dword ptr [rdi+2Ch], 0"], [7, "mov byte ptr [rdi+2Ah], 0"], [8, "mov dword ptr [rdi+20h], 0"], [9, "mov [rdi+24h], dx"], [10, "mov byte ptr [rdi+26h], 0"], [11, "retn"]], "data_dep": [[3, 0], [9, 1], [11, 0]]}
| {"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/867b3f12dd6bc0f5d65f833e0aac6c437c6682ccfe80bbc748ae054ccf229091_867b3f12dd6bc0f5d65f833e0aac6c437c6682ccfe80bbc748ae054ccf229091.jsonl.gz", "strip_func_name": "sub_41C320", "query": "\n\n\n__int64 __fastcall sub_41C320(__int64 a1)\n{\n__int64 result; // rax\n\nresult = 0LL;\n*(_QWORD *)(a1 + 14) = -1LL;\n*(_WORD *)(a1 + 28) = 0;\n*(_DWORD *)(a1 + 22) = -1;\n*(_QWORD *)a1 = -1LL;\n*(_DWORD *)(a1 + 44) = 0;\n*(_BYTE *)(a1 + 42) = 0;\n*(_DWORD *)(a1 + 32) = 0;\n*(_WORD *)(a1 + 36) = 0;\n*(_BYTE *)(a1 + 38) = 0;\nreturn result;\n}\n\n\n\nQ:[a1,sub_41C320,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'processor', 'sub_41C320': 'Z80free_reset'}"} |
|
janet_parser_deinit | 2f87019bcafb28a2aa1cb80b55ea9b24b542c7cbbe0806344c2ec21759477cbf | janet-lang | janet | NA | void janet_parser_deinit(JanetParser *parser) {
janet_free(parser->args);
janet_free(parser->buf);
janet_free(parser->states);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43F420", "function_addr": 4453408, "binary_name": "2f87019bcafb28a2aa1cb80b55ea9b24b542c7cbbe0806344c2ec21759477cbf.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]"], [6, "mov rdi, rax"], [7, "call _free"], [8, "mov rax, [rbp+var_8]"], [9, "mov rax, [rax+18h]"], [10, "mov rdi, rax"], [11, "call _free"], [12, "mov rax, [rbp+var_8]"], [13, "mov rax, [rax+10h]"], [14, "mov rdi, rax"], [15, "call _free"], [16, "nop"], [17, "leave"], [18, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [8, 3], [9, 8], [10, 9], [12, 3], [13, 12], [14, 13], [18, 15]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/2f87019bcafb28a2aa1cb80b55ea9b24b542c7cbbe0806344c2ec21759477cbf_2f87019bcafb28a2aa1cb80b55ea9b24b542c7cbbe0806344c2ec21759477cbf.jsonl.gz", "strip_func_name": "sub_43F420", "query": "\n\n\nvoid __fastcall sub_43F420(void **a1)\n{\nfree(*a1);\nfree(a1[3]);\nfree(a1[2]);\n}\n\n\n\nQ:[a1,sub_43F420,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'parser', 'sub_43F420': 'janet_parser_deinit'}"} |
|
fdSafer | e41b785b10a6c3f156aacd9460bc7c84204caae818717b5becacf646d8d3c153 | lattera | bhyve | NA | int
fdSafer(fd)
int fd;
{
if (STDIN_FILENO <= fd && fd <= STDERR_FILENO) {
int f = dupSafer(fd);
int e = errno;
VOID close(fd);
errno = e;
fd = f;
}
return fd;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4076F2", "function_addr": 4224754, "binary_name": "e41b785b10a6c3f156aacd9460bc7c84204caae818717b5becacf646d8d3c153.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+fd], edi"], [4, "cmp [rbp+fd], 0"], [5, "js short loc_40773A"], [6, "cmp [rbp+fd], 2"], [7, "jg short loc_40773A"], [8, "mov eax, [rbp+fd]"], [9, "mov edi, eax"], [10, "call sub_4076CC"], [11, "mov [rbp+var_4], eax"], [12, "call ___errno_location"], [13, "mov eax, [rax]"], [14, "mov [rbp+var_8], eax"], [15, "mov eax, [rbp+fd]"], [16, "mov edi, eax"], [17, "call _close"], [18, "call ___errno_location"], [19, "mov edx, [rbp+var_8]"], [20, "mov [rax], edx"], [21, "mov eax, [rbp+var_4]"], [22, "mov [rbp+fd], eax"], [23, "mov eax, [rbp+fd]"], [24, "leave"], [25, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 3], [7, 6], [8, 3], [9, 8], [11, 10], [13, 12], [14, 13], [15, 3], [16, 15], [19, 14], [20, 19], [20, 18], [21, 11], [22, 21], [23, 22], [23, 3], [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/e41b785b10a6c3f156aacd9460bc7c84204caae818717b5becacf646d8d3c153_e41b785b10a6c3f156aacd9460bc7c84204caae818717b5becacf646d8d3c153.jsonl.gz", "strip_func_name": "sub_4076F2", "query": "\n\n\n__int64 __fastcall sub_4076F2(int a1)\n{\nunsigned int fd; // [rsp+Ch] [rbp-14h]\nint v3; // [rsp+18h] [rbp-8h]\nint v4; // [rsp+1Ch] [rbp-4h]\n\nfd = a1;\nif ( a1 >= 0 && a1 <= 2 )\n{\nv4 = sub_4076CC(a1);\nv3 = *__errno_location();\nclose(a1);\n*__errno_location() = v3;\nfd = v4;\n}\nreturn fd;\n}\n\n\n\nQ:[a1,fd,v3,v4,sub_4076F2,sub_4076CC,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'fd', 'fd': 'fda', 'v3': 'e', 'v4': 'f', 'sub_4076F2': 'fdSafer', 'sub_4076CC': 'dupSafer'}"} |
|
dm_mgr_device_create | b7cef636e96508e08a38830ae41d7f3db4a312c698fd864ae235aab389bc89e5 | aliyun | iotkit-embedded | NA | int dm_mgr_device_create(_IN_ int dev_type, _IN_ char product_key[IOTX_PRODUCT_KEY_LEN + 1],
_IN_ char device_name[IOTX_DEVICE_NAME_LEN + 1], _IN_ char device_secret[IOTX_DEVICE_SECRET_LEN + 1], _OU_ int *devid)
{
int res = 0;
dm_mgr_ctx *ctx = _dm_mgr_get_ctx();
dm_mgr_dev_node_t *node = NULL;
if (product_key == NULL || device_name == NULL ||
strlen(product_key) >= IOTX_PRODUCT_KEY_LEN + 1 ||
strlen(device_name) >= IOTX_DEVICE_NAME_LEN + 1) {
return DM_INVALID_PARAMETER;
}
if (device_secret != NULL && strlen(device_secret) >= IOTX_DEVICE_SECRET_LEN + 1) {
return DM_INVALID_PARAMETER;
}
res = _dm_mgr_search_dev_by_pkdn(product_key, device_name, &node);
if (res == SUCCESS_RETURN) {
if (devid) {
*devid = node->devid;
}
return SUCCESS_RETURN;
}
node = DM_malloc(sizeof(dm_mgr_dev_node_t));
if (node == NULL) {
return DM_MEMORY_NOT_ENOUGH;
}
memset(node, 0, sizeof(dm_mgr_dev_node_t));
node->devid = _dm_mgr_next_devid();
node->dev_type = dev_type;
#if defined(DEPRECATED_LINKKIT)
node->dev_shadow = NULL;
node->tsl_source = IOTX_DM_TSL_SOURCE_CLOUD;
#endif
memcpy(node->product_key, product_key, strlen(product_key));
memcpy(node->device_name, device_name, strlen(device_name));
if (device_secret != NULL) {
memcpy(node->device_secret, device_secret, strlen(device_secret));
}
node->dev_status = IOTX_DM_DEV_STATUS_AUTHORIZED;
INIT_LIST_HEAD(&node->linked_list);
list_add_tail(&node->linked_list, &ctx->dev_list);
if (devid) {
*devid = node->devid;
}
return SUCCESS_RETURN;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "dm_mgr_device_create", "function_addr": 4257787, "binary_name": "b7cef636e96508e08a38830ae41d7f3db4a312c698fd864ae235aab389bc89e5.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 58h"], [4, "mov [rbp+var_34], edi"], [5, "mov [rbp+s], rsi"], [6, "mov [rbp+var_48], rdx"], [7, "mov [rbp+var_50], rcx"], [8, "mov [rbp+var_58], r8"], [9, "mov [rbp+var_14], 0"], [10, "call sub_40F1DB"], [11, "mov [rbp+var_20], rax"], [12, "mov [rbp+var_28], 0"], [13, "cmp [rbp+s], 0"], [14, "jz short loc_40F861"], [15, "cmp [rbp+var_48], 0"], [16, "jz short loc_40F861"], [17, "mov rax, [rbp+s]"], [18, "mov rdi, rax"], [19, "call _strlen"], [20, "cmp rax, 14h"], [21, "ja short loc_40F861"], [22, "mov rax, [rbp+var_48]"], [23, "mov rdi, rax"], [24, "call _strlen"], [25, "cmp rax, 20h "], [26, "jbe short loc_40F86B"], [27, "mov eax, 0FFFFFFFEh"], [28, "jmp loc_40F9E5"], [29, "cmp [rbp+var_50], 0"], [30, "jz short loc_40F88E"], [31, "mov rax, [rbp+var_50]"], [32, "mov rdi, rax"], [33, "call _strlen"], [34, "cmp rax, 40h "], [35, "jbe short loc_40F88E"], [36, "mov eax, 0FFFFFFFEh"], [37, "jmp loc_40F9E5"], [38, "lea rdx, [rbp+var_28]"], [39, "mov rcx, [rbp+var_48]"], [40, "mov rax, [rbp+s]"], [41, "mov rsi, rcx"], [42, "mov rdi, rax"], [43, "call sub_40F2F4"], [44, "mov [rbp+var_14], eax"], [45, "cmp [rbp+var_14], 0"], [46, "jnz short loc_40F8CB"], [47, "cmp [rbp+var_58], 0"], [48, "jz short loc_40F8C1"], [49, "mov rax, [rbp+var_28]"], [50, "mov edx, [rax]"], [51, "mov rax, [rbp+var_58]"], [52, "mov [rax], edx"], [53, "mov eax, 0"], [54, "jmp loc_40F9E5"], [55, "mov edi, 98h"], [56, "call HAL_Malloc"], [57, "mov [rbp+var_28], rax"], [58, "mov rax, [rbp+var_28]"], [59, "test rax, rax"], [60, "jnz short loc_40F8EC"], [61, "mov eax, 0FFFFFFFDh"], [62, "jmp loc_40F9E5"], [63, "mov rax, [rbp+var_28]"], [64, "mov edx, 98h"], [65, "mov esi, 0"], [66, "mov rdi, rax"], [67, "call _memset"], [68, "mov rbx, [rbp+var_28]"], [69, "call sub_40F244"], [70, "mov [rbx], eax"], [71, "mov rax, [rbp+var_28]"], [72, "mov edx, [rbp+var_34]"], [73, "mov [rax+4], edx"], [74, "mov rax, [rbp+s]"], [75, "mov rdi, rax"], [76, "call _strlen"], [77, "mov rdx, rax"], [78, "mov rax, [rbp+var_28]"], [79, "lea rcx, [rax+8]"], [80, "mov rax, [rbp+s]"], [81, "mov rsi, rax"], [82, "mov rdi, rcx"], [83, "call _memcpy"], [84, "mov rax, [rbp+var_48]"], [85, "mov rdi, rax"], [86, "call _strlen"], [87, "mov rdx, rax"], [88, "mov rax, [rbp+var_28]"], [89, "lea rcx, [rax+1Dh]"], [90, "mov rax, [rbp+var_48]"], [91, "mov rsi, rax"], [92, "mov rdi, rcx"], [93, "call _memcpy"], [94, "cmp [rbp+var_50], 0"], [95, "jz short loc_40F990"], [96, "mov rax, [rbp+var_50]"], [97, "mov rdi, rax"], [98, "call _strlen"], [99, "mov rdx, rax"], [100, "mov rax, [rbp+var_28]"], [101, "lea rcx, [rax+3Eh]"], [102, "mov rax, [rbp+var_50]"], [103, "mov rsi, rax"], [104, "mov rdi, rcx"], [105, "call _memcpy"], [106, "mov rax, [rbp+var_28]"], [107, "mov dword ptr [rax+84h], 1"], [108, "mov rax, [rbp+var_28]"], [109, "add rax, 88h"], [110, "mov rdi, rax"], [111, "call sub_40F1B9"], [112, "mov rax, [rbp+var_20]"], [113, "lea rdx, [rax+10h]"], [114, "mov rax, [rbp+var_28]"], [115, "add rax, 88h"], [116, "mov rsi, rdx"], [117, "mov rdi, rax"], [118, "call sub_40F153"], [119, "cmp [rbp+var_58], 0"], [120, "jz short loc_40F9E0"], [121, "mov rax, [rbp+var_28]"], [122, "mov edx, [rax]"], [123, "mov rax, [rbp+var_58]"], [124, "mov [rax], edx"], [125, "mov eax, 0"], [126, "mov rbx, [rbp+var_8]"], [127, "leave"], [128, "retn"]], "data_dep": [[11, 10], [13, 5], [14, 13], [15, 6], [16, 15], [17, 5], [18, 17], [20, 19], [21, 20], [22, 6], [23, 22], [25, 24], [26, 25], [29, 7], [30, 29], [31, 7], [32, 31], [34, 33], [35, 34], [38, 12], [39, 6], [40, 5], [41, 39], [42, 40], [44, 43], [45, 44], [46, 45], [47, 8], [48, 47], [49, 12], [50, 49], [51, 8], [52, 51], [52, 50], [57, 56], [58, 57], [59, 58], [60, 59], [63, 57], [66, 63], [68, 57], [70, 68], [70, 69], [71, 57], [72, 4], [73, 71], [73, 72], [74, 5], [75, 74], [77, 76], [78, 57], [79, 39], [79, 78], [79, 73], [80, 5], [81, 80], [82, 79], [84, 6], [85, 84], [87, 86], [88, 57], [89, 79], [89, 88], [89, 73], [90, 6], [91, 90], [92, 89], [94, 7], [95, 94], [96, 7], [97, 96], [99, 98], [100, 57], [101, 89], [101, 73], [101, 70], [101, 100], [102, 7], [103, 102], [104, 101], [106, 57], [107, 106], [108, 57], [109, 108], [110, 109], [112, 11], [113, 99], [113, 87], [113, 112], [113, 107], [114, 57], [115, 114], [116, 113], [117, 115], [119, 8], [120, 119], [121, 57], [122, 124], [122, 121], [122, 107], [122, 73], [122, 70], [123, 8], [124, 122], [124, 123], [128, 53], [128, 27], [128, 36], [128, 61], [128, 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/b7cef636e96508e08a38830ae41d7f3db4a312c698fd864ae235aab389bc89e5_b7cef636e96508e08a38830ae41d7f3db4a312c698fd864ae235aab389bc89e5.jsonl.gz", "strip_func_name": "dm_mgr_device_create", "query": "\n\n\n__int64 __fastcall dm_mgr_device_create(int a1, const char *a2, const char *a3, const char *a4, _DWORD *a5)\n{\n__int64 result; // rax\n_DWORD *v6; // rbx\nsize_t v7; // rax\nsize_t v8; // rax\nsize_t v9; // rax\nvoid *v13; // [rsp+38h] [rbp-28h] BYREF\n__int64 *v14; // [rsp+40h] [rbp-20h]\nint v15; // [rsp+4Ch] [rbp-14h]\n\nv15 = 0;\nv14 = (__int64 *)sub_40F1DB();\nv13 = 0LL;\nif ( !a2 || !a3 || strlen(a2) > 0x14 || strlen(a3) > 0x20 )\nreturn 4294967294LL;\nif ( a4 && strlen(a4) > 0x40 )\nreturn 4294967294LL;\nv15 = sub_40F2F4(a2, a3, (__int64 *)&v13);\nif ( v15 )\n{\nv13 = (void *)HAL_Malloc(152LL);\nif ( v13 )\n{\nmemset(v13, 0, 0x98uLL);\nv6 = v13;\n*v6 = sub_40F244();\n*((_DWORD *)v13 + 1) = a1;\nv7 = strlen(a2);\nmemcpy((char *)v13 + 8, a2, v7);\nv8 = strlen(a3);\nmemcpy((char *)v13 + 29, a3, v8);\nif ( a4 )\n{\nv9 = strlen(a4);\nmemcpy((char *)v13 + 62, a4, v9);\n}\n*((_DWORD *)v13 + 33) = 1;\nsub_40F1B9((_QWORD *)v13 + 17);\nsub_40F153((_QWORD *)v13 + 17, v14 + 2);\nif ( a5 )\n*a5 = *(_DWORD *)v13;\nresult = 0LL;\n}\nelse\n{\nresult = 4294967293LL;\n}\n}\nelse\n{\nif ( a5 )\n*a5 = *(_DWORD *)v13;\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v7,v13,v14,v15,sub_40F1DB,sub_40F2F4,sub_40F244,sub_40F1B9,sub_40F153,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'device_name', 'a4': 'device_secret', 'a1': 'dev_type', 'a2': 'product_key', 'a5': 'devid', 'v7': 'result', 'v13': 'node', 'v14': 'ctx', 'v15': 'res', 'sub_40F1DB': '_dm_mgr_get_ctx', 'sub_40F2F4': '_dm_mgr_search_dev_by_pkdn', 'sub_40F244': '_dm_mgr_next_devid', 'sub_40F1B9': 'INIT_AOS_DLIST_HEAD_1', 'sub_40F153': 'dlist_add_tail_1'}"} |
|
fastmalloc_init | eda926e664eaf6d25688cd984ea75bc9cdb228a8e31666968671741e483ad9ff | dcf21 | ephemeris-compute-de430 | NA | void fastmalloc_init() {
int i;
if (_fastmalloc_initialised == 1) return;
_fastmalloc_firstblocklist = (void **) malloc(PPL_MAX_CONTEXTS * sizeof(void *));
_fastmalloc_currentblocklist = (void **) malloc(PPL_MAX_CONTEXTS * sizeof(void *));
_fastmalloc_currentblock_alloc_ptr = (long *) malloc(PPL_MAX_CONTEXTS * sizeof(long));
for (i = 0; i < PPL_MAX_CONTEXTS; i++) _fastmalloc_firstblocklist[i] = NULL;
for (i = 0; i < PPL_MAX_CONTEXTS; i++) _fastmalloc_currentblocklist[i] = NULL;
for (i = 0; i < PPL_MAX_CONTEXTS; i++) _fastmalloc_currentblock_alloc_ptr[i] = 0;
_fastmalloc_callcount = 0;
_fastmalloc_bytecount = 0;
_fastmalloc_malloccount = 0;
_fastmalloc_initialised = 1;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40F3FE", "function_addr": 4256766, "binary_name": "eda926e664eaf6d25688cd984ea75bc9cdb228a8e31666968671741e483ad9ff.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov eax, cs:dword_5B34C0"], [4, "cmp eax, 1"], [5, "jz loc_40F505"], [6, "mov edi, 7D0h"], [7, "call _malloc"], [8, "mov cs:qword_5B3490, rax"], [9, "mov edi, 7D0h"], [10, "call _malloc"], [11, "mov cs:qword_5B3498, rax"], [12, "mov edi, 7D0h"], [13, "call _malloc"], [14, "mov cs:qword_5B34A0, rax"], [15, "mov [rbp+var_4], 0"], [16, "jmp short loc_40F46F"], [17, "mov rdx, cs:qword_5B3490"], [18, "mov eax, [rbp+var_4]"], [19, "cdqe"], [20, "shl rax, 3"], [21, "add rax, rdx"], [22, "mov qword ptr [rax], 0"], [23, "add [rbp+var_4], 1"], [24, "cmp [rbp+var_4], 0F9h"], [25, "jle short loc_40F451"], [26, "mov [rbp+var_4], 0"], [27, "jmp short loc_40F49F"], [28, "mov rdx, cs:qword_5B3498"], [29, "mov eax, [rbp+var_4]"], [30, "cdqe"], [31, "shl rax, 3"], [32, "add rax, rdx"], [33, "mov qword ptr [rax], 0"], [34, "add [rbp+var_4], 1"], [35, "cmp [rbp+var_4], 0F9h"], [36, "jle short loc_40F481"], [37, "mov [rbp+var_4], 0"], [38, "jmp short loc_40F4CF"], [39, "mov rdx, cs:qword_5B34A0"], [40, "mov eax, [rbp+var_4]"], [41, "cdqe"], [42, "shl rax, 3"], [43, "add rax, rdx"], [44, "mov qword ptr [rax], 0"], [45, "add [rbp+var_4], 1"], [46, "cmp [rbp+var_4], 0F9h"], [47, "jle short loc_40F4B1"], [48, "mov cs:qword_5B34A8, 0"], [49, "mov cs:qword_5B34B0, 0"], [50, "mov cs:qword_5B34B8, 0"], [51, "mov cs:dword_5B34C0, 1"], [52, "jmp short locret_40F506"], [53, "nop"], [54, "leave"], [55, "retn"]], "data_dep": [[4, 3], [5, 4], [8, 7], [11, 10], [14, 13], [17, 8], [18, 23], [18, 15], [20, 18], [21, 17], [21, 20], [22, 21], [23, 15], [23, 23], [24, 23], [24, 15], [25, 24], [28, 11], [29, 26], [29, 34], [31, 29], [32, 31], [32, 28], [33, 32], [34, 34], [34, 26], [35, 26], [35, 34], [36, 35], [39, 14], [40, 37], [40, 45], [42, 40], [43, 39], [43, 42], [44, 43], [45, 37], [45, 45], [46, 45], [46, 37], [47, 46], [55, 32], [55, 13], [55, 43], [55, 3], [55, 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/eda926e664eaf6d25688cd984ea75bc9cdb228a8e31666968671741e483ad9ff_eda926e664eaf6d25688cd984ea75bc9cdb228a8e31666968671741e483ad9ff.jsonl.gz", "strip_func_name": "sub_40F3FE", "query": "\n\n\nunsigned __int64 sub_40F3FE()\n{\nunsigned __int64 result; // rax\nint i; // [rsp+Ch] [rbp-4h]\nint j; // [rsp+Ch] [rbp-4h]\nint k; // [rsp+Ch] [rbp-4h]\n\nresult = (unsigned int)dword_5B34C0;\nif ( dword_5B34C0 != 1 )\n{\nqword_5B3490 = malloc(0x7D0uLL);\nqword_5B3498 = malloc(0x7D0uLL);\nresult = (unsigned __int64)malloc(0x7D0uLL);\nqword_5B34A0 = (void *)result;\nfor ( i = 0; i <= 249; ++i )\n{\nresult = (unsigned __int64)qword_5B3490 + 8 * i;\n*(_QWORD *)result = 0LL;\n}\nfor ( j = 0; j <= 249; ++j )\n{\nresult = (unsigned __int64)qword_5B3498 + 8 * j;\n*(_QWORD *)result = 0LL;\n}\nfor ( k = 0; k <= 249; ++k )\n{\nresult = (unsigned __int64)qword_5B34A0 + 8 * k;\n*(_QWORD *)result = 0LL;\n}\nqword_5B34A8 = 0LL;\nqword_5B34B0 = 0LL;\nqword_5B34B8 = 0LL;\ndword_5B34C0 = 1;\n}\nreturn result;\n}\n\n\n\nQ:[i,sub_40F3FE,]\nAssistant: ", "hints": "[]", "response": "{'i': 'ia', 'sub_40F3FE': 'fastmalloc_init'}"} |
|
percent_color_fprintf | decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08 | khadas | linux | NA | int percent_color_fprintf(FILE *fp, const char *fmt, double percent)
{
int r;
const char *color;
color = get_percent_color(percent);
r = color_fprintf(fp, color, fmt, percent);
return r;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "percent_color_fprintf", "function_addr": 4765791, "binary_name": "decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "movsd [rbp+var_38], xmm0"], [6, "mov rax, fs:28h"], [7, "mov [rbp+var_8], rax"], [8, "xor eax, eax"], [9, "mov rax, [rbp+var_38]"], [10, "movq xmm0, rax"], [11, "call get_percent_color"], [12, "mov [rbp+var_10], rax"], [13, "mov rsi, [rbp+var_38]"], [14, "mov rdx, [rbp+var_30]"], [15, "mov rcx, [rbp+var_10]"], [16, "mov rax, [rbp+var_28]"], [17, "movq xmm0, rsi"], [18, "mov rsi, rcx"], [19, "mov rdi, rax"], [20, "mov eax, 1"], [21, "call color_fprintf"], [22, "mov [rbp+var_14], eax"], [23, "mov eax, [rbp+var_14]"], [24, "mov rcx, [rbp+var_8]"], [25, "sub rcx, fs:28h"], [26, "jz short locret_48B8D4"], [27, "call ___stack_chk_fail"], [28, "leave"], [29, "retn"]], "data_dep": [[7, 6], [9, 5], [10, 9], [12, 11], [13, 5], [14, 4], [15, 12], [16, 3], [17, 13], [18, 15], [19, 16], [22, 21], [23, 22], [24, 7], [25, 24], [26, 25], [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/decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08_decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08.jsonl.gz", "strip_func_name": "percent_color_fprintf", "query": "\n\n\n__int64 __fastcall percent_color_fprintf(FILE *a1, const char *a2, double a3)\n{\n__int64 v3; // r8\n__int64 v4; // r9\nconst char *v6; // [rsp+30h] [rbp-10h]\n\nv6 = get_percent_color(a3);\nreturn (unsigned int)color_fprintf(a1, v6, a2, (__int64)v6, v3, v4, a3);\n}\n\n\n\nQ:[a1,a2,a3,v6,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'fp', 'a2': 'fmt', 'a3': 'percent', 'v6': 'color'}"} |
|
xr_rd | b3a8b4769bdb267a1562d144bd5416f56584185a8ee940d909e9d5c1f4737051 | open-simh | simh | NA | uint32 xr_rd (uint32 src)
{
if (cpu_unit.flags & UNIT_GRI99)
return XR;
else return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405DF3", "function_addr": 4218355, "binary_name": "b3a8b4769bdb267a1562d144bd5416f56584185a8ee940d909e9d5c1f4737051.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_4], edi"], [3, "mov eax, cs:dword_4BFE58"], [4, "and eax, 100000h"], [5, "test eax, eax"], [6, "jz short loc_405E11"], [7, "mov eax, cs:dword_4DE890"], [8, "jmp short loc_405E16"], [9, "mov eax, 0"], [10, "pop rbp"], [11, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [10, 0], [11, 7], [11, 9]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/b3a8b4769bdb267a1562d144bd5416f56584185a8ee940d909e9d5c1f4737051_b3a8b4769bdb267a1562d144bd5416f56584185a8ee940d909e9d5c1f4737051.jsonl.gz", "strip_func_name": "sub_405DF3", "query": "\n\n\n__int64 sub_405DF3()\n{\n__int64 result; // rax\n\nif ( (dword_4BFE58 & 0x100000) != 0 )\nresult = (unsigned int)dword_4DE890;\nelse\nresult = 0LL;\nreturn result;\n}\n\n\n\nQ:[sub_405DF3,]\nAssistant: ", "hints": "[]", "response": "{'sub_405DF3': 'xr_rd'}"} |
|
readOperands | 0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8 | michalsc | Emu68 | NA | static int readOperands(struct InternalInstruction *insn)
{
int index;
int hasVVVV, needVVVV;
int sawRegImm = 0;
// printf(">>> readOperands(): ID = %u\n", insn->instructionID);
/* If non-zero vvvv specified, need to make sure one of the operands
uses it. */
hasVVVV = !readVVVV(insn);
needVVVV = hasVVVV && (insn->vvvv != 0);
for (index = 0; index < X86_MAX_OPERANDS; ++index) {
//printf(">>> encoding[%u] = %u\n", index, x86OperandSets[insn->spec->operands][index].encoding);
switch (x86OperandSets[insn->spec->operands][index].encoding) {
case ENCODING_NONE:
case ENCODING_SI:
case ENCODING_DI:
break;
case ENCODING_REG:
CASE_ENCODING_RM:
if (readModRM(insn))
return -1;
if (fixupReg(insn, &x86OperandSets[insn->spec->operands][index]))
return -1;
// Apply the AVX512 compressed displacement scaling factor.
if (x86OperandSets[insn->spec->operands][index].encoding != ENCODING_REG && insn->eaDisplacement == EA_DISP_8)
insn->displacement *= (int64_t)1 << (x86OperandSets[insn->spec->operands][index].encoding - ENCODING_RM);
break;
case ENCODING_CB:
case ENCODING_CW:
case ENCODING_CD:
case ENCODING_CP:
case ENCODING_CO:
case ENCODING_CT:
// dbgprintf(insn, "We currently don't hande code-offset encodings");
return -1;
case ENCODING_IB:
if (sawRegImm) {
/* Saw a register immediate so don't read again and instead split the
previous immediate. FIXME: This is a hack. */
insn->immediates[insn->numImmediatesConsumed] =
insn->immediates[insn->numImmediatesConsumed - 1] & 0xf;
++insn->numImmediatesConsumed;
break;
}
if (readImmediate(insn, 1))
return -1;
if (x86OperandSets[insn->spec->operands][index].type == TYPE_XMM128 ||
x86OperandSets[insn->spec->operands][index].type == TYPE_XMM256)
sawRegImm = 1;
break;
case ENCODING_IW:
if (readImmediate(insn, 2))
return -1;
break;
case ENCODING_ID:
if (readImmediate(insn, 4))
return -1;
break;
case ENCODING_IO:
if (readImmediate(insn, 8))
return -1;
break;
case ENCODING_Iv:
if (readImmediate(insn, insn->immediateSize))
return -1;
break;
case ENCODING_Ia:
if (readImmediate(insn, insn->addressSize))
return -1;
/* Direct memory-offset (moffset) immediate will get mapped
to memory operand later. We want the encoding info to
reflect that as well. */
insn->displacementOffset = insn->immediateOffset;
insn->consumedDisplacement = true;
insn->displacementSize = insn->immediateSize;
insn->displacement = insn->immediates[insn->numImmediatesConsumed - 1];
insn->immediateOffset = 0;
insn->immediateSize = 0;
break;
case ENCODING_RB:
if (readOpcodeRegister(insn, 1))
return -1;
break;
case ENCODING_RW:
if (readOpcodeRegister(insn, 2))
return -1;
break;
case ENCODING_RD:
if (readOpcodeRegister(insn, 4))
return -1;
break;
case ENCODING_RO:
if (readOpcodeRegister(insn, 8))
return -1;
break;
case ENCODING_Rv:
if (readOpcodeRegister(insn, 0))
return -1;
break;
case ENCODING_FP:
break;
case ENCODING_VVVV:
needVVVV = 0; /* Mark that we have found a VVVV operand. */
if (!hasVVVV)
return -1;
if (fixupReg(insn, &x86OperandSets[insn->spec->operands][index]))
return -1;
break;
case ENCODING_WRITEMASK:
if (readMaskRegister(insn))
return -1;
break;
case ENCODING_DUP:
break;
default:
// dbgprintf(insn, "Encountered an operand with an unknown encoding.");
return -1;
}
}
/* If we didn't find ENCODING_VVVV operand, but non-zero vvvv present, fail */
if (needVVVV) return -1;
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_536D56", "function_addr": 5467478, "binary_name": "0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8.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_C], 0"], [5, "mov rax, [rbp+var_18]"], [6, "mov rdi, rax"], [7, "call sub_536C16"], [8, "test eax, eax"], [9, "setz al"], [10, "movzx eax, al"], [11, "mov [rbp+var_10], eax"], [12, "cmp [rbp+var_10], 0"], [13, "jz short loc_536D9B"], [14, "mov rax, [rbp+var_18]"], [15, "mov eax, [rax+108h]"], [16, "test eax, eax"], [17, "jz short loc_536D9B"], [18, "mov eax, 1"], [19, "jmp short loc_536DA0"], [20, "mov eax, 0"], [21, "mov [rbp+var_8], eax"], [22, "mov [rbp+var_4], 0"], [23, "jmp loc_5372E2"], [24, "mov rax, [rbp+var_18]"], [25, "mov rax, [rax+100h]"], [26, "movzx eax, word ptr [rax]"], [27, "movzx eax, ax"], [28, "mov edx, [rbp+var_4]"], [29, "movsxd rcx, edx"], [30, "movsxd rdx, eax"], [31, "mov rax, rdx"], [32, "add rax, rax"], [33, "add rax, rdx"], [34, "add rax, rax"], [35, "add rax, rcx"], [36, "lea rdx, [rax+rax]"], [37, "lea rax, unk_720B60"], [38, "movzx eax, byte ptr [rdx+rax]"], [39, "movzx eax, al"], [40, "cmp eax, 1Fh"], [41, "ja def_536E13"], [42, "mov eax, eax"], [43, "lea rdx, ds:0[rax*4]"], [44, "lea rax, jpt_536E13"], [45, "mov eax, ds:(jpt_536E13 - 789310h)[rdx+rax]"], [46, "cdqe"], [47, "lea rdx, jpt_536E13"], [48, "add rax, rdx"], [49, "jmp rax"], [50, "mov rax, [rbp+var_18]"], [51, "mov rdi, rax"], [52, "call sub_535EBC"], [53, "test eax, eax"], [54, "jz short loc_536E2F"], [55, "mov eax, 0FFFFFFFFh"], [56, "jmp locret_5372FE"], [57, "mov rax, [rbp+var_18]"], [58, "mov rax, [rax+100h]"], [59, "movzx eax, word ptr [rax]"], [60, "movzx eax, ax"], [61, "mov edx, [rbp+var_4]"], [62, "movsxd rcx, edx"], [63, "movsxd rdx, eax"], [64, "mov rax, rdx"], [65, "add rax, rax"], [66, "add rax, rdx"], [67, "add rax, rax"], [68, "add rax, rcx"], [69, "lea rdx, [rax+rax]"], [70, "lea rax, unk_720B60"], [71, "add rdx, rax"], [72, "mov rax, [rbp+var_18]"], [73, "mov rsi, rdx"], [74, "mov rdi, rax"], [75, "call sub_53673A"], [76, "test eax, eax"], [77, "jz short loc_536E83"], [78, "mov eax, 0FFFFFFFFh"], [79, "jmp locret_5372FE"], [80, "mov rax, [rbp+var_18]"], [81, "mov rax, [rax+100h]"], [82, "movzx eax, word ptr [rax]"], [83, "movzx eax, ax"], [84, "mov edx, [rbp+var_4]"], [85, "movsxd rcx, edx"], [86, "movsxd rdx, eax"], [87, "mov rax, rdx"], [88, "add rax, rax"], [89, "add rax, rdx"], [90, "add rax, rax"], [91, "add rax, rcx"], [92, "lea rdx, [rax+rax]"], [93, "lea rax, unk_720B60"], [94, "movzx eax, byte ptr [rdx+rax]"], [95, "cmp al, 1"], [96, "jz loc_5372B9"], [97, "mov rax, [rbp+var_18]"], [98, "mov eax, [rax+13Ch]"], [99, "cmp eax, 1"], [100, "jnz loc_5372B9"], [101, "mov rax, [rbp+var_18]"], [102, "mov rsi, [rax+78h]"], [103, "mov rax, [rbp+var_18]"], [104, "mov rax, [rax+100h]"], [105, "movzx eax, word ptr [rax]"], [106, "movzx eax, ax"], [107, "mov edx, [rbp+var_4]"], [108, "movsxd rcx, edx"], [109, "movsxd rdx, eax"], [110, "mov rax, rdx"], [111, "add rax, rax"], [112, "add rax, rdx"], [113, "add rax, rax"], [114, "add rax, rcx"], [115, "lea rdx, [rax+rax]"], [116, "lea rax, unk_720B60"], [117, "movzx eax, byte ptr [rdx+rax]"], [118, "movzx eax, al"], [119, "sub eax, 2"], [120, "mov ecx, eax"], [121, "shl rsi, cl"], [122, "mov rdx, rsi"], [123, "mov rax, [rbp+var_18]"], [124, "mov [rax+78h], rdx"], [125, "jmp loc_5372B9"], [126, "mov eax, 0FFFFFFFFh"], [127, "jmp locret_5372FE"], [128, "cmp [rbp+var_C], 0"], [129, "jz short loc_536FA0"], [130, "mov rax, [rbp+var_18]"], [131, "movzx eax, byte ptr [rax+90h]"], [132, "movzx eax, al"], [133, "lea edx, [rax-1]"], [134, "mov rax, [rbp+var_18]"], [135, "movsxd rdx, edx"], [136, "add rdx, 22h "], [137, "mov rcx, [rax+rdx*8+8]"], [138, "mov rax, [rbp+var_18]"], [139, "movzx eax, byte ptr [rax+90h]"], [140, "movzx edx, al"], [141, "and ecx, 0Fh"], [142, "mov rax, [rbp+var_18]"], [143, "movsxd rdx, edx"], [144, "add rdx, 22h "], [145, "mov [rax+rdx*8+8], rcx"], [146, "mov rax, [rbp+var_18]"], [147, "movzx eax, byte ptr [rax+90h]"], [148, "lea edx, [rax+1]"], [149, "mov rax, [rbp+var_18]"], [150, "mov [rax+90h], dl"], [151, "jmp loc_5372DE"], [152, "mov rax, [rbp+var_18]"], [153, "mov esi, 1"], [154, "mov rdi, rax"], [155, "call sub_536A31"], [156, "test eax, eax"], [157, "jz short loc_536FBF"], [158, "mov eax, 0FFFFFFFFh"], [159, "jmp locret_5372FE"], [160, "mov rax, [rbp+var_18]"], [161, "mov rax, [rax+100h]"], [162, "movzx eax, word ptr [rax]"], [163, "movzx eax, ax"], [164, "mov edx, [rbp+var_4]"], [165, "movsxd rcx, edx"], [166, "movsxd rdx, eax"], [167, "mov rax, rdx"], [168, "add rax, rax"], [169, "add rax, rdx"], [170, "add rax, rax"], [171, "add rax, rcx"], [172, "lea rdx, [rax+rax]"], [173, "lea rax, unk_720B61"], [174, "movzx eax, byte ptr [rdx+rax]"], [175, "cmp al, 38h "], [176, "jz short loc_53703B"], [177, "mov rax, [rbp+var_18]"], [178, "mov rax, [rax+100h]"], [179, "movzx eax, word ptr [rax]"], [180, "movzx eax, ax"], [181, "mov edx, [rbp+var_4]"], [182, "movsxd rcx, edx"], [183, "movsxd rdx, eax"], [184, "mov rax, rdx"], [185, "add rax, rax"], [186, "add rax, rdx"], [187, "add rax, rax"], [188, "add rax, rcx"], [189, "lea rdx, [rax+rax]"], [190, "lea rax, unk_720B61"], [191, "movzx eax, byte ptr [rdx+rax]"], [192, "cmp al, 39h "], [193, "jnz loc_5372BC"], [194, "mov [rbp+var_C], 1"], [195, "jmp loc_5372BC"], [196, "mov rax, [rbp+var_18]"], [197, "mov esi, 2"], [198, "mov rdi, rax"], [199, "call sub_536A31"], [200, "test eax, eax"], [201, "jz loc_5372BF"], [202, "mov eax, 0FFFFFFFFh"], [203, "jmp locret_5372FE"], [204, "mov rax, [rbp+var_18]"], [205, "mov esi, 4"], [206, "mov rdi, rax"], [207, "call sub_536A31"], [208, "test eax, eax"], [209, "jz loc_5372C2"], [210, "mov eax, 0FFFFFFFFh"], [211, "jmp locret_5372FE"], [212, "mov rax, [rbp+var_18]"], [213, "mov esi, 8"], [214, "mov rdi, rax"], [215, "call sub_536A31"], [216, "test eax, eax"], [217, "jz loc_5372C5"], [218, "mov eax, 0FFFFFFFFh"], [219, "jmp locret_5372FE"], [220, "mov rax, [rbp+var_18]"], [221, "movzx eax, byte ptr [rax+0F3h]"], [222, "movzx edx, al"], [223, "mov rax, [rbp+var_18]"], [224, "mov esi, edx"], [225, "mov rdi, rax"], [226, "call sub_536A31"], [227, "test eax, eax"], [228, "jz loc_5372C8"], [229, "mov eax, 0FFFFFFFFh"], [230, "jmp locret_5372FE"], [231, "mov rax, [rbp+var_18]"], [232, "movzx eax, byte ptr [rax+0F1h]"], [233, "movzx edx, al"], [234, "mov rax, [rbp+var_18]"], [235, "mov esi, edx"], [236, "mov rdi, rax"], [237, "call sub_536A31"], [238, "test eax, eax"], [239, "jz short loc_537108"], [240, "mov eax, 0FFFFFFFFh"], [241, "jmp locret_5372FE"], [242, "mov rax, [rbp+var_18]"], [243, "movzx edx, byte ptr [rax+97h]"], [244, "mov rax, [rbp+var_18]"], [245, "mov [rax+96h], dl"], [246, "mov rax, [rbp+var_18]"], [247, "mov byte ptr [rax+74h], 1"], [248, "mov rax, [rbp+var_18]"], [249, "movzx edx, byte ptr [rax+0F3h]"], [250, "mov rax, [rbp+var_18]"], [251, "mov [rax+0F2h], dl"], [252, "mov rax, [rbp+var_18]"], [253, "movzx eax, byte ptr [rax+90h]"], [254, "movzx eax, al"], [255, "lea edx, [rax-1]"], [256, "mov rax, [rbp+var_18]"], [257, "movsxd rdx, edx"], [258, "add rdx, 22h "], [259, "mov rax, [rax+rdx*8+8]"], [260, "mov rdx, rax"], [261, "mov rax, [rbp+var_18]"], [262, "mov [rax+78h], rdx"], [263, "mov rax, [rbp+var_18]"], [264, "mov byte ptr [rax+97h], 0"], [265, "mov rax, [rbp+var_18]"], [266, "mov byte ptr [rax+0F3h], 0"], [267, "jmp loc_5372DE"], [268, "mov rax, [rbp+var_18]"], [269, "mov esi, 1"], [270, "mov rdi, rax"], [271, "call sub_53689A"], [272, "test eax, eax"], [273, "jz loc_5372CB"], [274, "mov eax, 0FFFFFFFFh"], [275, "jmp locret_5372FE"], [276, "mov rax, [rbp+var_18]"], [277, "mov esi, 2"], [278, "mov rdi, rax"], [279, "call sub_53689A"], [280, "test eax, eax"], [281, "jz loc_5372CE"], [282, "mov eax, 0FFFFFFFFh"], [283, "jmp locret_5372FE"], [284, "mov rax, [rbp+var_18]"], [285, "mov esi, 4"], [286, "mov rdi, rax"], [287, "call sub_53689A"], [288, "test eax, eax"], [289, "jz loc_5372D1"], [290, "mov eax, 0FFFFFFFFh"], [291, "jmp locret_5372FE"], [292, "mov rax, [rbp+var_18]"], [293, "mov esi, 8"], [294, "mov rdi, rax"], [295, "call sub_53689A"], [296, "test eax, eax"], [297, "jz loc_5372D4"], [298, "mov eax, 0FFFFFFFFh"], [299, "jmp locret_5372FE"], [300, "mov rax, [rbp+var_18]"], [301, "mov esi, 0"], [302, "mov rdi, rax"], [303, "call sub_53689A"], [304, "test eax, eax"], [305, "jz loc_5372D7"], [306, "mov eax, 0FFFFFFFFh"], [307, "jmp locret_5372FE"], [308, "mov [rbp+var_8], 0"], [309, "cmp [rbp+var_10], 0"], [310, "jnz short loc_537247"], [311, "mov eax, 0FFFFFFFFh"], [312, "jmp locret_5372FE"], [313, "mov rax, [rbp+var_18]"], [314, "mov rax, [rax+100h]"], [315, "movzx eax, word ptr [rax]"], [316, "movzx eax, ax"], [317, "mov edx, [rbp+var_4]"], [318, "movsxd rcx, edx"], [319, "movsxd rdx, eax"], [320, "mov rax, rdx"], [321, "add rax, rax"], [322, "add rax, rdx"], [323, "add rax, rax"], [324, "add rax, rcx"], [325, "lea rdx, [rax+rax]"], [326, "lea rax, unk_720B60"], [327, "add rdx, rax"], [328, "mov rax, [rbp+var_18]"], [329, "mov rsi, rdx"], [330, "mov rdi, rax"], [331, "call sub_53673A"], [332, "test eax, eax"], [333, "jz short loc_5372DA"], [334, "mov eax, 0FFFFFFFFh"], [335, "jmp short locret_5372FE"], [336, "mov rax, [rbp+var_18]"], [337, "mov rdi, rax"], [338, "call sub_536D14"], [339, "test eax, eax"], [340, "jz short loc_5372DD"], [341, "mov eax, 0FFFFFFFFh"], [342, "jmp short locret_5372FE"], [343, "mov eax, 0FFFFFFFFh"], [344, "jmp short locret_5372FE"], [345, "nop"], [346, "jmp short loc_5372DE"], [347, "nop"], [348, "jmp short loc_5372DE"], [349, "nop"], [350, "jmp short loc_5372DE"], [351, "nop"], [352, "jmp short loc_5372DE"], [353, "nop"], [354, "jmp short loc_5372DE"], [355, "nop"], [356, "jmp short loc_5372DE"], [357, "nop"], [358, "jmp short loc_5372DE"], [359, "nop"], [360, "jmp short loc_5372DE"], [361, "nop"], [362, "jmp short loc_5372DE"], [363, "nop"], [364, "jmp short loc_5372DE"], [365, "nop"], [366, "jmp short loc_5372DE"], [367, "nop"], [368, "jmp short loc_5372DE"], [369, "nop"], [370, "jmp short loc_5372DE"], [371, "nop"], [372, "add [rbp+var_4], 1"], [373, "cmp [rbp+var_4], 5"], [374, "jle loc_536DAF"], [375, "cmp [rbp+var_8], 0"], [376, "jz short loc_5372F9"], [377, "mov eax, 0FFFFFFFFh"], [378, "jmp short locret_5372FE"], [379, "mov eax, 0"], [380, "leave"], [381, "retn"]], "data_dep": [[5, 3], [6, 5], [8, 7], [9, 8], [10, 9], [11, 10], [12, 11], [13, 12], [14, 3], [15, 14], [16, 15], [17, 16], [21, 18], [21, 20], [24, 3], [25, 150], [25, 24], [25, 262], [25, 145], [25, 266], [25, 247], [25, 251], [25, 264], [25, 124], [25, 245], [26, 124], [26, 25], [26, 262], [26, 150], [26, 145], [26, 266], [26, 247], [26, 251], [26, 264], [26, 245], [27, 26], [28, 372], [28, 22], [29, 28], [30, 27], [31, 30], [32, 31], [33, 32], [33, 30], [34, 33], [35, 34], [35, 29], [36, 150], [36, 145], [36, 266], [36, 247], [36, 251], [36, 264], [36, 245], [36, 35], [36, 30], [36, 124], [36, 262], [37, 35], [38, 247], [38, 251], [38, 264], [38, 124], [38, 245], [38, 262], [38, 150], [38, 145], [38, 266], [38, 37], [39, 38], [40, 39], [41, 40], [42, 39], [43, 36], [44, 42], [47, 43], [48, 45], [48, 47], [49, 48], [50, 3], [51, 50], [53, 52], [54, 53], [57, 3], [58, 57], [58, 150], [58, 145], [58, 266], [58, 247], [58, 251], [58, 264], [58, 124], [58, 245], [58, 262], [59, 264], [59, 124], [59, 245], [59, 262], [59, 58], [59, 150], [59, 145], [59, 266], [59, 247], [59, 251], [60, 59], [61, 372], [61, 22], [62, 61], [63, 60], [64, 63], [65, 64], [66, 65], [66, 63], [67, 66], [68, 67], [68, 62], [69, 145], [69, 266], [69, 247], [69, 251], [69, 264], [69, 124], [69, 245], [69, 68], [69, 63], [69, 150], [69, 262], [70, 68], [71, 69], [71, 70], [72, 3], [73, 71], [74, 72], [76, 75], [77, 76], [80, 3], [81, 150], [81, 262], [81, 145], [81, 266], [81, 247], [81, 80], [81, 251], [81, 264], [81, 124], [81, 245], [82, 150], [82, 145], [82, 266], [82, 247], [82, 251], [82, 264], [82, 245], [82, 124], [82, 262], [82, 81], [83, 82], [84, 372], [84, 22], [85, 84], [86, 83], [87, 86], [88, 87], [89, 86], [89, 88], [90, 89], [91, 90], [91, 85], [92, 245], [92, 124], [92, 262], [92, 91], [92, 86], [92, 150], [92, 145], [92, 266], [92, 247], [92, 251], [92, 264], [93, 91], [94, 150], [94, 262], [94, 145], [94, 266], [94, 247], [94, 251], [94, 264], [94, 93], [94, 124], [94, 245], [95, 94], [96, 95], [97, 3], [98, 251], [98, 264], [98, 97], [98, 124], [98, 245], [98, 150], [98, 262], [98, 145], [98, 266], [98, 247], [99, 98], [100, 99], [101, 3], [102, 150], [102, 262], [102, 145], [102, 266], [102, 247], [102, 251], [102, 264], [102, 124], [102, 245], [102, 101], [103, 3], [104, 150], [104, 145], [104, 266], [104, 247], [104, 251], [104, 264], [104, 124], [104, 245], [104, 262], [104, 103], [105, 150], [105, 262], [105, 266], [105, 104], [105, 145], [105, 247], [105, 251], [105, 264], [105, 124], [105, 245], [106, 105], [107, 22], [107, 372], [108, 107], [109, 106], [110, 109], [111, 110], [112, 111], [112, 109], [113, 112], [114, 113], [114, 108], [115, 145], [115, 247], [115, 251], [115, 264], [115, 124], [115, 245], [115, 114], [115, 150], [115, 262], [115, 109], [115, 266], [116, 114], [117, 251], [117, 116], [117, 264], [117, 124], [117, 245], [117, 150], [117, 262], [117, 145], [117, 266], [117, 247], [118, 117], [119, 118], [120, 119], [121, 102], [121, 120], [122, 121], [123, 3], [124, 123], [124, 122], [128, 4], [128, 194], [129, 128], [130, 3], [131, 130], [131, 251], [131, 264], [131, 124], [131, 245], [131, 150], [131, 262], [131, 145], [131, 266], [131, 247], [132, 131], [133, 251], [133, 264], [133, 124], [133, 245], [133, 132], [133, 150], [133, 262], [133, 145], [133, 266], [133, 247], [133, 47], [134, 3], [135, 133], [136, 135], [137, 145], [137, 266], [137, 247], [137, 251], [137, 134], [137, 264], [137, 124], [137, 245], [137, 150], [137, 262], [138, 3], [139, 251], [139, 264], [139, 138], [139, 124], [139, 245], [139, 150], [139, 262], [139, 145], [139, 266], [139, 247], [140, 139], [141, 137], [142, 3], [143, 140], [144, 143], [145, 142], [145, 141], [146, 3], [147, 146], [147, 150], [147, 145], [148, 145], [148, 144], [148, 147], [149, 3], [150, 149], [150, 148], [152, 3], [154, 152], [156, 155], [157, 156], [160, 3], [161, 251], [161, 264], [161, 124], [161, 245], [161, 160], [161, 150], [161, 262], [161, 145], [161, 266], [161, 247], [162, 161], [162, 150], [162, 262], [162, 145], [162, 266], [162, 247], [162, 251], [162, 264], [162, 124], [162, 245], [163, 162], [164, 372], [164, 22], [165, 164], [166, 163], [167, 166], [168, 167], [169, 166], [169, 168], [170, 169], [171, 170], [171, 165], [172, 171], [172, 166], [172, 251], [172, 264], [172, 124], [172, 245], [172, 150], [172, 262], [172, 145], [172, 266], [172, 247], [173, 171], [174, 264], [174, 124], [174, 245], [174, 173], [174, 150], [174, 262], [174, 145], [174, 266], [174, 247], [174, 251], [175, 174], [176, 175], [177, 3], [178, 150], [178, 262], [178, 145], [178, 266], [178, 247], [178, 251], [178, 177], [178, 264], [178, 124], [178, 245], [179, 245], [179, 178], [179, 150], [179, 262], [179, 145], [179, 266], [179, 247], [179, 251], [179, 264], [179, 124], [180, 179], [181, 372], [181, 22], [182, 181], [183, 180], [184, 183], [185, 184], [186, 185], [186, 183], [187, 186], [188, 187], [188, 182], [189, 150], [189, 262], [189, 145], [189, 266], [189, 247], [189, 251], [189, 264], [189, 124], [189, 245], [189, 188], [189, 183], [190, 188], [191, 190], [191, 251], [191, 264], [191, 124], [191, 245], [191, 150], [191, 262], [191, 145], [191, 266], [191, 247], [192, 191], [193, 192], [196, 3], [198, 196], [200, 199], [201, 200], [204, 3], [206, 204], [208, 207], [209, 208], [212, 3], [214, 212], [216, 215], [217, 216], [220, 3], [221, 247], [221, 251], [221, 264], [221, 124], [221, 245], [221, 220], [221, 150], [221, 262], [221, 145], [221, 266], [222, 221], [223, 3], [224, 222], [225, 223], [227, 226], [228, 227], [231, 3], [232, 247], [232, 251], [232, 264], [232, 124], [232, 245], [232, 231], [232, 150], [232, 262], [232, 145], [232, 266], [233, 232], [234, 3], [235, 233], [236, 234], [238, 237], [239, 238], [242, 3], [243, 247], [243, 242], [243, 251], [243, 264], [243, 124], [243, 245], [243, 150], [243, 262], [243, 145], [243, 266], [244, 3], [245, 244], [245, 243], [246, 3], [247, 246], [248, 3], [249, 266], [249, 247], [249, 248], [250, 3], [251, 250], [251, 249], [252, 3], [253, 150], [253, 252], [253, 251], [254, 253], [255, 249], [255, 251], [255, 254], [256, 3], [257, 255], [258, 257], [259, 256], [259, 251], [259, 145], [260, 259], [261, 3], [262, 261], [262, 260], [263, 3], [264, 263], [265, 3], [266, 265], [268, 3], [270, 268], [272, 271], [273, 272], [276, 3], [278, 276], [280, 279], [281, 280], [284, 3], [286, 284], [288, 287], [289, 288], [292, 3], [294, 292], [296, 295], [297, 296], [300, 3], [302, 300], [304, 303], [305, 304], [309, 11], [310, 309], [313, 3], [314, 145], [314, 266], [314, 247], [314, 251], [314, 264], [314, 124], [314, 245], [314, 262], [314, 150], [314, 313], [315, 245], [315, 262], [315, 150], [315, 145], [315, 266], [315, 247], [315, 251], [315, 264], [315, 314], [315, 124], [316, 315], [317, 372], [317, 22], [318, 317], [319, 316], [320, 319], [321, 320], [322, 321], [322, 319], [323, 322], [324, 323], [324, 318], [325, 150], [325, 145], [325, 266], [325, 247], [325, 251], [325, 324], [325, 319], [325, 264], [325, 124], [325, 245], [325, 262], [326, 324], [327, 325], [327, 326], [328, 3], [329, 327], [330, 328], [332, 331], [333, 332], [336, 3], [337, 336], [339, 338], [340, 339], [372, 372], [372, 22], [373, 22], [373, 372], [374, 373], [375, 21], [375, 308], [376, 375], [381, 78], [381, 334], [381, 343], [381, 306], [381, 202], [381, 282], [381, 290], [381, 379], [381, 229], [381, 341], [381, 210], [381, 298], [381, 55], [381, 311], [381, 158], [381, 126], [381, 274], [381, 377], [381, 218], [381, 240]]}
| {"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/0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8_0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8.jsonl.gz", "strip_func_name": "sub_536D56", "query": "\n\n\n__int64 __fastcall sub_536D56(__int64 a1)\n{\nint v1; // eax\n_BOOL4 v2; // eax\n__int64 result; // rax\n_BOOL4 v4; // [rsp+10h] [rbp-10h]\nint v5; // [rsp+14h] [rbp-Ch]\n_BOOL4 v6; // [rsp+18h] [rbp-8h]\nint v7; // [rsp+1Ch] [rbp-4h]\n\nv5 = 0;\nv1 = sub_536C16(a1);\nv4 = v1 == 0;\nv2 = !v1 && *(_DWORD *)(a1 + 264);\nv6 = v2;\nv7 = 0;\nwhile ( v7 <= 5 )\n{\nswitch ( *((_BYTE *)&unk_720B60 + 12 * **(unsigned __int16 **)(a1 + 256) + 2 * v7) )\n{\ncase 0:\ncase 0x19:\ncase 0x1D:\ncase 0x1E:\ncase 0x1F:\ngoto LABEL_50;\ncase 1:\ncase 2:\ncase 3:\ncase 4:\ncase 5:\ncase 6:\ncase 7:\ncase 8:\nif ( (unsigned int)sub_535EBC(a1) )\nreturn 0xFFFFFFFFLL;\nif ( (unsigned int)sub_53673A(\n(_DWORD *)a1,\n(unsigned __int8 *)&unk_720B60 + 12 * **(unsigned __int16 **)(a1 + 256) + 2 * v7) )\nreturn 0xFFFFFFFFLL;\nif ( *((_BYTE *)&unk_720B60 + 12 * **(unsigned __int16 **)(a1 + 256) + 2 * v7) != 1\n&& *(_DWORD *)(a1 + 316) == 1 )\n{\n*(_QWORD *)(a1 + 120) <<= *((_BYTE *)&unk_720B60 + 12 * **(unsigned __int16 **)(a1 + 256) + 2 * v7) - 2;\n}\ngoto LABEL_50;\ncase 9:\nv6 = 0;\nif ( !v4 )\nreturn 0xFFFFFFFFLL;\nif ( (unsigned int)sub_53673A(\n(_DWORD *)a1,\n(unsigned __int8 *)&unk_720B60 + 12 * **(unsigned __int16 **)(a1 + 256) + 2 * v7) )\nreturn 0xFFFFFFFFLL;\nLABEL_50:\n++v7;\nbreak;\ncase 0xA:\nif ( !(unsigned int)sub_536D14(a1) )\ngoto LABEL_50;\nreturn 0xFFFFFFFFLL;\ncase 0xB:\ncase 0xC:\ncase 0xD:\ncase 0xE:\ncase 0xF:\ncase 0x10:\nreturn 0xFFFFFFFFLL;\ncase 0x11:\nif ( v5 )\n{\n*(_QWORD *)(a1 + 8 * (*(unsigned __int8 *)(a1 + 144) + 34LL) + 8) = *(_QWORD *)(a1\n+ 8\n* (*(unsigned __int8 *)(a1 + 144)\n- 1\n+ 34LL)\n+ 8) & 0xFLL;\n++*(_BYTE *)(a1 + 144);\n}\nelse\n{\nif ( (unsigned int)sub_536A31(a1, 1u) )\nreturn 0xFFFFFFFFLL;\nif ( byte_720B61[12 * **(unsigned __int16 **)(a1 + 256) + 2 * v7] == 56\n|| byte_720B61[12 * **(unsigned __int16 **)(a1 + 256) + 2 * v7] == 57 )\n{\nv5 = 1;\n}\n}\ngoto LABEL_50;\ncase 0x12:\nif ( !(unsigned int)sub_536A31(a1, 2u) )\ngoto LABEL_50;\nreturn 0xFFFFFFFFLL;\ncase 0x13:\nif ( !(unsigned int)sub_536A31(a1, 4u) )\ngoto LABEL_50;\nreturn 0xFFFFFFFFLL;\ncase 0x14:\nif ( !(unsigned int)sub_536A31(a1, 8u) )\ngoto LABEL_50;\nreturn 0xFFFFFFFFLL;\ncase 0x15:\nif ( !(unsigned int)sub_53689A(a1, 1u) )\ngoto LABEL_50;\nreturn 0xFFFFFFFFLL;\ncase 0x16:\nif ( !(unsigned int)sub_53689A(a1, 2u) )\ngoto LABEL_50;\nreturn 0xFFFFFFFFLL;\ncase 0x17:\nif ( !(unsigned int)sub_53689A(a1, 4u) )\ngoto LABEL_50;\nreturn 0xFFFFFFFFLL;\ncase 0x18:\nif ( !(unsigned int)sub_53689A(a1, 8u) )\ngoto LABEL_50;\nreturn 0xFFFFFFFFLL;\ncase 0x1A:\nif ( !(unsigned int)sub_536A31(a1, *(_BYTE *)(a1 + 243)) )\ngoto LABEL_50;\nreturn 0xFFFFFFFFLL;\ncase 0x1B:\nif ( (unsigned int)sub_536A31(a1, *(_BYTE *)(a1 + 241)) )\nreturn 0xFFFFFFFFLL;\n*(_BYTE *)(a1 + 150) = *(_BYTE *)(a1 + 151);\n*(_BYTE *)(a1 + 116) = 1;\n*(_BYTE *)(a1 + 242) = *(_BYTE *)(a1 + 243);\n*(_QWORD *)(a1 + 120) = *(_QWORD *)(a1 + 8 * (*(unsigned __int8 *)(a1 + 144) - 1 + 34LL) + 8);\n*(_BYTE *)(a1 + 151) = 0;\n*(_BYTE *)(a1 + 243) = 0;\ngoto LABEL_50;\ncase 0x1C:\nif ( !(unsigned int)sub_53689A(a1, 0) )\ngoto LABEL_50;\nreturn 0xFFFFFFFFLL;\ndefault:\nreturn 0xFFFFFFFFLL;\n}\n}\nif ( v6 )\nresult = 0xFFFFFFFFLL;\nelse\nresult = 0LL;\nreturn result;\n}\n\n\n\nQ:[a1,v4,v5,v6,v7,sub_536D56,sub_536C16,sub_535EBC,sub_53673A,sub_536D14,sub_536A31,sub_53689A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'insn', 'v4': 'hasVVVV', 'v5': 'sawRegImm', 'v6': 'needVVVV', 'v7': 'index', 'sub_536D56': 'readOperands', 'sub_536C16': 'readVVVV', 'sub_535EBC': 'readModRM', 'sub_53673A': 'fixupReg', 'sub_536D14': 'readMaskRegister', 'sub_536A31': 'readImmediate', 'sub_53689A': 'readOpcodeRegister'}"} |
|
main | f21e8a80f89c208c097f277fb30173323ab954afe3f39a1a37b7d6489fcc819f | GBert | openwrt-misc | NA | int main(void) {
int fbfd = 0;
struct fb_var_screeninfo vinfo;
struct fb_fix_screeninfo finfo;
long int screensize = 0;
char *fbp = 0;
/* Open the file for reading and writing */
fbfd = open("/dev/fb0", O_RDWR);
if (!fbfd) {
printf("Error: cannot open framebuffer device.\n");
exit(EXIT_FAILURE);
}
printf("The framebuffer device was opened successfully.\n");
/* Get fixed screen information */
if (ioctl(fbfd, FBIOGET_FSCREENINFO, &finfo)) {
printf("Error reading fixed information.\n");
}
/* Get variable screen information */
if (ioctl(fbfd, FBIOGET_VSCREENINFO, &vinfo)) {
printf("Error reading variable information.\n");
}
printf("%dx%d, %dbpp\n", vinfo.xres, vinfo.yres, vinfo.bits_per_pixel);
/* map fb to user mem */
screensize = finfo.smem_len;
fbp = (char *)mmap(0, screensize, PROT_READ | PROT_WRITE, MAP_SHARED, fbfd, 0);
if ((void *)fbp == MAP_FAILED) {
printf("Failed to mmap.\n");
exit(EXIT_FAILURE);
} else {
/* draw...
just fill upper half of the screen with something */
memset(fbp, 0xff, screensize / 2);
/* and lower half of the screen with something else */
memset(fbp + screensize / 2, 0xff, screensize / 2);
}
/* cleanup */
munmap(fbp, screensize);
close(fbfd);
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "main", "function_addr": 4198818, "binary_name": "f21e8a80f89c208c097f277fb30173323ab954afe3f39a1a37b7d6489fcc819f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 110h"], [3, "mov [rbp+fd], 0"], [4, "mov [rbp+len], 0"], [5, "mov [rbp+s], 0"], [6, "mov esi, 2"], [7, "mov edi, offset file"], [8, "mov eax, 0"], [9, "call _open"], [10, "mov [rbp+fd], eax"], [11, "cmp [rbp+fd], 0"], [12, "jnz short loc_4011F5"], [13, "mov edi, offset s"], [14, "call _puts"], [15, "mov edi, 1"], [16, "call _exit"], [17, "mov edi, offset aTheFramebuffer"], [18, "call _puts"], [19, "lea rdx, [rbp+var_110]"], [20, "mov eax, [rbp+fd]"], [21, "mov esi, 4602h"], [22, "mov edi, eax"], [23, "mov eax, 0"], [24, "call _ioctl"], [25, "test eax, eax"], [26, "jz short loc_401228"], [27, "mov edi, offset aErrorReadingFi"], [28, "call _puts"], [29, "lea rdx, [rbp+var_C0]"], [30, "mov eax, [rbp+fd]"], [31, "mov esi, 4600h"], [32, "mov edi, eax"], [33, "mov eax, 0"], [34, "call _ioctl"], [35, "test eax, eax"], [36, "jz short loc_401251"], [37, "mov edi, offset aErrorReadingVa"], [38, "call _puts"], [39, "mov ecx, [rbp+var_A8]"], [40, "mov edx, [rbp+var_BC]"], [41, "mov eax, [rbp+var_C0]"], [42, "mov esi, eax"], [43, "mov edi, offset format"], [44, "mov eax, 0"], [45, "call _printf"], [46, "mov eax, [rbp+var_F8]"], [47, "mov eax, eax"], [48, "mov [rbp+len], rax"], [49, "mov rax, [rbp+len]"], [50, "mov edx, [rbp+fd]"], [51, "mov r9d, 0"], [52, "mov r8d, edx"], [53, "mov ecx, 1"], [54, "mov edx, 3"], [55, "mov rsi, rax"], [56, "mov edi, 0"], [57, "call _mmap"], [58, "mov [rbp+s], rax"], [59, "cmp [rbp+s], 0FFFFFFFFFFFFFFFFh"], [60, "jnz short loc_4012C6"], [61, "mov edi, offset aFailedToMmap"], [62, "call _puts"], [63, "mov edi, 1"], [64, "call _exit"], [65, "mov rax, [rbp+len]"], [66, "mov rdx, rax"], [67, "shr rdx, 3Fh"], [68, "add rax, rdx"], [69, "sar rax, 1"], [70, "mov rdx, rax"], [71, "mov rax, [rbp+s]"], [72, "mov esi, 0FFh"], [73, "mov rdi, rax"], [74, "call _memset"], [75, "mov rax, [rbp+len]"], [76, "mov rdx, rax"], [77, "shr rdx, 3Fh"], [78, "add rax, rdx"], [79, "sar rax, 1"], [80, "mov rdx, rax"], [81, "mov rax, [rbp+len]"], [82, "mov rcx, rax"], [83, "shr rcx, 3Fh"], [84, "add rax, rcx"], [85, "sar rax, 1"], [86, "mov rcx, rax"], [87, "mov rax, [rbp+s]"], [88, "add rax, rcx"], [89, "mov esi, 0FFh"], [90, "mov rdi, rax"], [91, "call _memset"], [92, "mov rdx, [rbp+len]"], [93, "mov rax, [rbp+s]"], [94, "mov rsi, rdx"], [95, "mov rdi, rax"], [96, "call _munmap"], [97, "mov eax, [rbp+fd]"], [98, "mov edi, eax"], [99, "call _close"], [100, "mov eax, 0"], [101, "leave"], [102, "retn"]], "data_dep": [[10, 9], [11, 10], [12, 11], [20, 10], [22, 20], [25, 24], [26, 25], [29, 19], [30, 10], [32, 30], [35, 34], [36, 35], [42, 41], [47, 46], [48, 47], [49, 48], [50, 10], [52, 50], [55, 49], [58, 57], [59, 58], [60, 59], [65, 48], [66, 65], [67, 66], [68, 65], [68, 67], [69, 68], [70, 69], [71, 58], [73, 71], [75, 48], [76, 75], [77, 76], [78, 77], [78, 75], [79, 78], [80, 79], [81, 48], [82, 81], [83, 82], [84, 81], [84, 83], [85, 84], [86, 85], [87, 58], [88, 87], [88, 86], [90, 88], [92, 48], [93, 58], [94, 92], [95, 93], [97, 10], [98, 97], [102, 100]]}
| {"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/f21e8a80f89c208c097f277fb30173323ab954afe3f39a1a37b7d6489fcc819f_f21e8a80f89c208c097f277fb30173323ab954afe3f39a1a37b7d6489fcc819f.jsonl.gz", "strip_func_name": "main", "query": "\n\n\n__int64 __fastcall main(int a1, char **a2, char **a3)\n{\nchar v4[24]; // [rsp+0h] [rbp-110h] BYREF\nunsigned int v5; // [rsp+18h] [rbp-F8h]\nint v6[42]; // [rsp+50h] [rbp-C0h] BYREF\nvoid *s; // [rsp+F8h] [rbp-18h]\nsize_t len; // [rsp+100h] [rbp-10h]\nint fd; // [rsp+10Ch] [rbp-4h]\n\nlen = 0LL;\ns = 0LL;\nfd = open(\"/dev/fb0\", 2, a3);\nif ( !fd )\n{\nputs(\"Error: cannot open framebuffer device.\");\nexit(1);\n}\nputs(\"The framebuffer device was opened successfully.\");\nif ( ioctl(fd, 0x4602uLL, v4) )\nputs(\"Error reading fixed information.\");\nif ( ioctl(fd, 0x4600uLL, v6) )\nputs(\"Error reading variable information.\");\nprintf(\"%dx%d, %dbpp\\n\", (unsigned int)v6[0], (unsigned int)v6[1], (unsigned int)v6[6]);\nlen = v5;\ns = mmap(0LL, v5, 3, 1, fd, 0LL);\nif ( s == (void *)-1LL )\n{\nputs(\"Failed to mmap.\");\nexit(1);\n}\nmemset(s, 255, (__int64)len / 2);\nmemset((char *)s + (__int64)len / 2, 255, (__int64)len / 2);\nmunmap(s, len);\nclose(fd);\nreturn 0LL;\n}\n\n\n\nQ:[a2,a3,a1,v4,v6,s,len,fd,]\nAssistant: ", "hints": "[]", "response": "{'a2': 'argv', 'a3': 'envp', 'a1': 'argc', 'v4': 'finfo', 'v6': 'vinfo', 's': 'fbp', 'len': 'screensize', 'fd': 'fbfd'}"} |
|
netsock_write | 3e8b342feca530e0eb9cdee3124d9f30765f73331b53a0c41b44e31534b00e37 | V-E-O | rdp2tcp | NA | int netsock_write(netsock_t *ns, const void *buf, unsigned int len)
{
int ret;
unsigned int w;
char host[NETADDRSTR_MAXSIZE];
assert(valid_netsock(ns) && (buf || !len));
ret = net_write(&ns->fd, &ns->u.tuncli.obuf, buf, len, &w);
if (ret < 0) {
netaddr_print(&ns->addr, host);
if (ret == NETERR_CLOSED)
info(0, "connection %s closed", host);
else
error("failed to send data to %s (%s)", host, strerror(errno));
} else if (w > 0) {
print_xfer("tcp", 'w', w);
}
return ret;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401FDB", "function_addr": 4202459, "binary_name": "3e8b342feca530e0eb9cdee3124d9f30765f73331b53a0c41b44e31534b00e37.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 60h"], [3, "mov [rbp+var_48], rdi"], [4, "mov [rbp+var_50], rsi"], [5, "mov [rbp+var_54], edx"], [6, "mov rax, [rbp+var_48]"], [7, "lea rsi, [rax+38h]"], [8, "mov rax, [rbp+var_48]"], [9, "lea rdi, [rax+10h]"], [10, "lea rcx, [rbp+var_8]"], [11, "mov edx, [rbp+var_54]"], [12, "mov rax, [rbp+var_50]"], [13, "mov r8, rcx"], [14, "mov ecx, edx"], [15, "mov rdx, rax"], [16, "call sub_404E6F"], [17, "mov [rbp+var_4], eax"], [18, "cmp [rbp+var_4], 0"], [19, "jns short loc_402085"], [20, "mov rax, [rbp+var_48]"], [21, "lea rdx, [rax+1Ch]"], [22, "lea rax, [rbp+var_40]"], [23, "mov rsi, rax"], [24, "mov rdi, rdx"], [25, "call sub_405147"], [26, "cmp [rbp+var_4], 0FFFFFC18h"], [27, "jnz short loc_40205C"], [28, "lea rax, [rbp+var_40]"], [29, "mov rdx, rax"], [30, "mov esi, offset aConnectionSClo"], [31, "mov edi, 0"], [32, "mov eax, 0"], [33, "call sub_4056ED"], [34, "jmp short loc_4020A0"], [35, "call ___errno_location"], [36, "mov eax, [rax]"], [37, "mov edi, eax"], [38, "call _strerror"], [39, "mov rdx, rax"], [40, "lea rax, [rbp+var_40]"], [41, "mov rsi, rax"], [42, "mov edi, offset aFailedToSendDa"], [43, "mov eax, 0"], [44, "call error"], [45, "jmp short loc_4020A0"], [46, "mov eax, [rbp+var_8]"], [47, "test eax, eax"], [48, "jz short loc_4020A0"], [49, "mov eax, [rbp+var_8]"], [50, "mov edx, eax"], [51, "mov esi, 77h "], [52, "mov edi, offset aTcp"], [53, "call sub_405906"], [54, "mov eax, [rbp+var_4]"], [55, "leave"], [56, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 3], [9, 8], [11, 5], [12, 4], [13, 10], [14, 11], [15, 12], [17, 16], [18, 17], [19, 18], [20, 3], [21, 15], [21, 20], [22, 20], [23, 22], [24, 21], [26, 17], [27, 26], [28, 25], [29, 28], [36, 35], [37, 36], [39, 38], [40, 38], [41, 40], [47, 46], [48, 47], [50, 49], [54, 17], [56, 54]]}
| {"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/3e8b342feca530e0eb9cdee3124d9f30765f73331b53a0c41b44e31534b00e37_3e8b342feca530e0eb9cdee3124d9f30765f73331b53a0c41b44e31534b00e37.jsonl.gz", "strip_func_name": "sub_401FDB", "query": "\n\n\n__int64 __fastcall sub_401FDB(__int64 a1, __int64 a2, unsigned int a3)\n{\nint v3; // ecx\nint v4; // er8\nint v5; // er9\nint *v6; // rax\nunsigned int v7; // eax\nint v8; // ecx\nint v9; // er8\nint v10; // er9\nchar v12[56]; // [rsp+20h] [rbp-40h] BYREF\nunsigned int v13; // [rsp+58h] [rbp-8h] BYREF\nunsigned int v14; // [rsp+5Ch] [rbp-4h]\n\nv14 = sub_404E6F(a1 + 16, a1 + 56, a2, a3, &v13);\nif ( (v14 & 0x80000000) == 0 )\n{\nif ( v13 )\nsub_405906(\"tcp\", 119LL, v13);\n}\nelse\n{\nsub_405147(a1 + 28, v12);\nif ( v14 == -1000 )\n{\nsub_4056ED(0, (unsigned int)\"connection %s closed\", (unsigned int)v12, v3, v4, v5);\n}\nelse\n{\nv6 = __errno_location();\nv7 = (unsigned int)strerror(*v6);\nerror((unsigned int)\"failed to send data to %s (%s)\", (unsigned int)v12, v7, v8, v9, v10);\n}\n}\nreturn v14;\n}\n\n\n\nQ:[a3,a1,a2,v12,v13,sub_401FDB,sub_404E6F,sub_405906,sub_405147,sub_4056ED,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'len', 'a1': 'ns', 'a2': 'buf', 'v12': 'host', 'v13': 'w', 'sub_401FDB': 'netsock_write', 'sub_404E6F': 'net_write', 'sub_405906': 'print_xfer', 'sub_405147': 'netaddr_print', 'sub_4056ED': 'info'}"} |
|
LZ4_compress_fast_extState | 4952c55ee846544aee8106bff7185fc123d06c8cbb979d5e647770d922f15f37 | nathants | bsv | NA | int LZ4_compress_fast_extState(void* state, const char* source, char* dest, int inputSize, int maxOutputSize, int acceleration)
{
LZ4_stream_t_internal* const ctx = & LZ4_initStream(state, sizeof(LZ4_stream_t)) -> internal_donotuse;
assert(ctx != NULL);
if (acceleration < 1) acceleration = LZ4_ACCELERATION_DEFAULT;
if (acceleration > LZ4_ACCELERATION_MAX) acceleration = LZ4_ACCELERATION_MAX;
if (maxOutputSize >= LZ4_compressBound(inputSize)) {
if (inputSize < LZ4_64Klimit) {
return LZ4_compress_generic(ctx, source, dest, inputSize, NULL, 0, notLimited, byU16, noDict, noDictIssue, acceleration);
} else {
const tableType_t tableType = ((sizeof(void*)==4) && ((uptrval)source > LZ4_DISTANCE_MAX)) ? byPtr : byU32;
return LZ4_compress_generic(ctx, source, dest, inputSize, NULL, 0, notLimited, tableType, noDict, noDictIssue, acceleration);
}
} else {
if (inputSize < LZ4_64Klimit) {
return LZ4_compress_generic(ctx, source, dest, inputSize, NULL, maxOutputSize, limitedOutput, byU16, noDict, noDictIssue, acceleration);
} else {
const tableType_t tableType = ((sizeof(void*)==4) && ((uptrval)source > LZ4_DISTANCE_MAX)) ? byPtr : byU32;
return LZ4_compress_generic(ctx, source, dest, inputSize, NULL, maxOutputSize, limitedOutput, tableType, noDict, noDictIssue, acceleration);
}
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40143C", "function_addr": 4199484, "binary_name": "4952c55ee846544aee8106bff7185fc123d06c8cbb979d5e647770d922f15f37.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 1D98h"], [4, "mov [rbp+var_1D78], rdi"], [5, "mov [rbp+var_1D80], rsi"], [6, "mov [rbp+var_1D88], rdx"], [7, "mov [rbp+var_1D8C], ecx"], [8, "mov [rbp+var_1D90], r8d"], [9, "mov [rbp+var_1D94], r9d"], [10, "mov rax, [rbp+var_1D78]"], [11, "mov esi, 4020h"], [12, "mov rdi, rax"], [13, "call sub_424317"], [14, "mov [rbp+var_18], rax"], [15, "cmp [rbp+var_1D94], 0"], [16, "jg short loc_40149C"], [17, "mov [rbp+var_1D94], 1"], [18, "cmp [rbp+var_1D94], 10001h"], [19, "jle short loc_4014B2"], [20, "mov [rbp+var_1D94], 10001h"], [21, "mov eax, [rbp+var_1D8C]"], [22, "mov edi, eax"], [23, "call sub_40136B"], [24, "cmp [rbp+var_1D90], eax"], [25, "jl loc_406FF2"], [26, "mov eax, 1000Bh"], [27, "cmp [rbp+var_1D8C], eax"], [28, "jge loc_4041EF"], [29, "mov rax, [rbp+var_18]"], [30, "mov [rbp+var_28], rax"], [31, "mov rax, [rbp+var_1D80]"], [32, "mov [rbp+var_30], rax"], [33, "mov rax, [rbp+var_1D88]"], [34, "mov [rbp+var_38], rax"], [35, "mov eax, [rbp+var_1D8C]"], [36, "mov [rbp+var_3C], eax"], [37, "mov [rbp+var_48], 0"], [38, "mov eax, [rbp+var_1D94]"], [39, "mov [rbp+var_4C], eax"], [40, "mov eax, [rbp+var_3C]"], [41, "cmp eax, 7E000000h"], [42, "jbe short loc_401528"], [43, "mov eax, 0"], [44, "jmp loc_4041EA"], [45, "cmp [rbp+var_3C], 0"], [46, "jnz short loc_40153F"], [47, "mov rax, [rbp+var_38]"], [48, "mov byte ptr [rax], 0"], [49, "mov eax, 1"], [50, "jmp loc_4041EA"], [51, "mov rax, [rbp+var_28]"], [52, "mov [rbp+var_58], rax"], [53, "mov rax, [rbp+var_30]"], [54, "mov [rbp+var_60], rax"], [55, "mov rax, [rbp+var_38]"], [56, "mov [rbp+var_68], rax"], [57, "mov eax, [rbp+var_3C]"], [58, "mov [rbp+var_6C], eax"], [59, "mov rax, [rbp+var_48]"], [60, "mov [rbp+var_78], rax"], [61, "mov [rbp+var_7C], 0"], [62, "mov [rbp+var_80], 0"], [63, "mov [rbp+var_84], 3"], [64, "mov [rbp+var_88], 0"], [65, "mov [rbp+var_8C], 0"], [66, "mov eax, [rbp+var_4C]"], [67, "mov [rbp+var_90], eax"], [68, "mov rax, [rbp+var_60]"], [69, "mov [rbp+var_98], rax"], [70, "mov rax, [rbp+var_58]"], [71, "mov eax, [rax+4000h]"], [72, "mov [rbp+var_9C], eax"], [73, "mov eax, [rbp+var_9C]"], [74, "neg rax"], [75, "mov rdx, rax"], [76, "mov rax, [rbp+var_60]"], [77, "add rax, rdx"], [78, "mov [rbp+var_A8], rax"], [79, "mov rax, [rbp+var_58]"], [80, "mov rax, [rax+4010h]"], [81, "mov [rbp+var_B0], rax"], [82, "cmp [rbp+var_88], 3"], [83, "jnz short loc_4015FA"], [84, "mov rax, [rbp+var_B0]"], [85, "mov rax, [rax+4008h]"], [86, "jmp short loc_401605"], [87, "mov rax, [rbp+var_58]"], [88, "mov rax, [rax+4008h]"], [89, "mov [rbp+var_B8], rax"], [90, "cmp [rbp+var_88], 3"], [91, "jnz short loc_401624"], [92, "mov rax, [rbp+var_B0]"], [93, "mov eax, [rax+4018h]"], [94, "jmp short loc_40162E"], [95, "mov rax, [rbp+var_58]"], [96, "mov eax, [rax+4018h]"], [97, "mov [rbp+var_BC], eax"], [98, "cmp [rbp+var_88], 3"], [99, "jnz short loc_401654"], [100, "mov rax, [rbp+var_B0]"], [101, "mov edx, [rax+4000h]"], [102, "mov eax, [rbp+var_9C]"], [103, "sub eax, edx"], [104, "jmp short loc_401659"], [105, "mov eax, 0"], [106, "mov [rbp+var_C0], eax"], [107, "cmp [rbp+var_88], 2"], [108, "jz short loc_401671"], [109, "cmp [rbp+var_88], 3"], [110, "jnz short loc_401678"], [111, "mov eax, 1"], [112, "jmp short loc_40167D"], [113, "mov eax, 0"], [114, "mov [rbp+var_C4], eax"], [115, "mov eax, [rbp+var_9C]"], [116, "sub eax, [rbp+var_BC]"], [117, "mov [rbp+var_C8], eax"], [118, "cmp [rbp+var_B8], 0"], [119, "jz short loc_4016B1"], [120, "mov edx, [rbp+var_BC]"], [121, "mov rax, [rbp+var_B8]"], [122, "add rax, rdx"], [123, "jmp short loc_4016B8"], [124, "mov rax, [rbp+var_B8]"], [125, "mov [rbp+var_D0], rax"], [126, "mov rax, [rbp+var_60]"], [127, "mov [rbp+src], rax"], [128, "mov eax, [rbp+var_6C]"], [129, "movsxd rdx, eax"], [130, "mov rax, [rbp+var_98]"], [131, "add rax, rdx"], [132, "mov [rbp+var_E0], rax"], [133, "mov rax, [rbp+var_E0]"], [134, "sub rax, 0Bh"], [135, "mov [rbp+var_E8], rax"], [136, "mov rax, [rbp+var_E0]"], [137, "sub rax, 5"], [138, "mov [rbp+var_F0], rax"], [139, "cmp [rbp+var_B8], 0"], [140, "jz short loc_40175A"], [141, "cmp [rbp+var_88], 3"], [142, "jnz short loc_40173C"], [143, "mov edx, [rbp+var_BC]"], [144, "mov rax, [rbp+var_B0]"], [145, "mov eax, [rax+4000h]"], [146, "mov eax, eax"], [147, "sub rdx, rax"], [148, "mov rax, [rbp+var_B8]"], [149, "add rax, rdx"], [150, "jmp short loc_40175F"], [151, "mov eax, [rbp+var_BC]"], [152, "mov edx, [rbp+var_9C]"], [153, "sub rax, rdx"], [154, "mov rcx, rax"], [155, "mov rax, [rbp+var_B8]"], [156, "add rax, rcx"], [157, "jmp short loc_40175F"], [158, "mov eax, 0"], [159, "mov [rbp+var_F8], rax"], [160, "mov rax, [rbp+var_68]"], [161, "mov [rbp+dest], rax"], [162, "mov eax, [rbp+var_7C]"], [163, "movsxd rdx, eax"], [164, "mov rax, [rbp+dest]"], [165, "add rax, rdx"], [166, "mov [rbp+var_108], rax"], [167, "mov [rbp+var_10C], 0"], [168, "cmp [rbp+var_80], 2"], [169, "jnz short loc_4017A8"], [170, "cmp [rbp+var_7C], 0"], [171, "jg short loc_4017A8"], [172, "mov eax, 0"], [173, "jmp loc_4041E9"], [174, "cmp [rbp+var_84], 3"], [175, "jnz short loc_4017C5"], [176, "mov eax, 1000Bh"], [177, "cmp [rbp+var_6C], eax"], [178, "jl short loc_4017C5"], [179, "mov eax, 0"], [180, "jmp loc_4041E9"], [181, "cmp [rbp+var_88], 1"], [182, "jnz short loc_4017DC"], [183, "mov eax, [rbp+var_BC]"], [184, "neg rax"], [185, "mov rdx, rax"], [186, "jmp short loc_4017E1"], [187, "mov edx, 0"], [188, "mov rax, [rbp+var_60]"], [189, "add rax, rdx"], [190, "mov [rbp+var_118], rax"], [191, "cmp [rbp+var_88], 3"], [192, "jnz short loc_401816"], [193, "mov rax, [rbp+var_58]"], [194, "mov qword ptr [rax+4010h], 0"], [195, "mov edx, [rbp+var_6C]"], [196, "mov rax, [rbp+var_58]"], [197, "mov [rax+4018h], edx"], [198, "jmp short loc_40182F"], [199, "mov rax, [rbp+var_58]"], [200, "mov edx, [rax+4018h]"], [201, "mov eax, [rbp+var_6C]"], [202, "add edx, eax"], [203, "mov rax, [rbp+var_58]"], [204, "mov [rax+4018h], edx"], [205, "mov rax, [rbp+var_58]"], [206, "mov edx, [rax+4000h]"], [207, "mov eax, [rbp+var_6C]"], [208, "add edx, eax"], [209, "mov rax, [rbp+var_58]"], [210, "mov [rax+4000h], edx"], [211, "mov rax, [rbp+var_58]"], [212, "mov edx, [rbp+var_84]"], [213, "mov [rax+4004h], edx"], [214, "mov eax, 0Dh"], [215, "cmp [rbp+var_6C], eax"], [216, "jl loc_404023"], [217, "mov rax, [rbp+var_58]"], [218, "mov rdx, [rbp+var_98]"], [219, "mov [rbp+var_120], rdx"], [220, "mov [rbp+var_128], rax"], [221, "mov eax, [rbp+var_84]"], [222, "mov [rbp+var_12C], eax"], [223, "mov rax, [rbp+var_A8]"], [224, "mov [rbp+var_138], rax"], [225, "mov rax, [rbp+var_120]"], [226, "mov [rbp+var_140], rax"], [227, "mov eax, [rbp+var_12C]"], [228, "mov [rbp+var_144], eax"], [229, "cmp [rbp+var_144], 3"], [230, "jz loc_40197E"], [231, "mov rax, [rbp+var_140]"], [232, "mov rdi, rax"], [233, "call sub_40123D"], [234, "mov [rbp+var_150], rax"], [235, "mov eax, [rbp+var_144]"], [236, "mov [rbp+var_154], eax"], [237, "cmp [rbp+var_154], 3"], [238, "jnz short loc_4018F2"], [239, "mov eax, 0Dh"], [240, "jmp short loc_4018F7"], [241, "mov eax, 0Ch"], [242, "mov [rbp+var_158], eax"], [243, "call sub_401208"], [244, "test eax, eax"], [245, "jz short loc_401942"], [246, "mov rax, 0CF1BBCDCBBh"], [247, "mov [rbp+var_160], rax"], [248, "mov rax, [rbp+var_150]"], [249, "shl rax, 18h"], [250, "imul rax, [rbp+var_160]"], [251, "mov rdx, rax"], [252, "mov eax, 40h "], [253, "sub eax, [rbp+var_158]"], [254, "mov ecx, eax"], [255, "shr rdx, cl"], [256, "mov rax, rdx"], [257, "jmp short loc_40197C"], [258, "mov rax, 9E3779B185EBCA87h"], [259, "mov [rbp+var_168], rax"], [260, "mov rax, [rbp+var_150]"], [261, "shr rax, 18h"], [262, "imul rax, [rbp+var_168]"], [263, "mov rdx, rax"], [264, "mov eax, 40h "], [265, "sub eax, [rbp+var_158]"], [266, "mov ecx, eax"], [267, "shr rdx, cl"], [268, "mov rax, rdx"], [269, "jmp short loc_4019C9"], [270, "mov rax, [rbp+var_140]"], [271, "mov rdi, rax"], [272, "call sub_40122D"], [273, "mov [rbp+var_16C], eax"], [274, "mov eax, [rbp+var_144]"], [275, "mov [rbp+var_170], eax"], [276, "cmp [rbp+var_170], 3"], [277, "jnz short loc_4019B9"], [278, "mov eax, [rbp+var_16C]"], [279, "imul eax, 9E3779B1h"], [280, "shr eax, 13h"], [281, "jmp short loc_4019C8"], [282, "mov eax, [rbp+var_16C]"], [283, "imul eax, 9E3779B1h"], [284, "shr eax, 14h"], [285, "nop"], [286, "mov [rbp+var_174], eax"], [287, "mov rax, [rbp+var_120]"], [288, "mov [rbp+var_180], rax"], [289, "mov eax, [rbp+var_174]"], [290, "mov [rbp+var_184], eax"], [291, "mov rax, [rbp+var_128]"], [292, "mov [rbp+var_190], rax"], [293, "mov eax, [rbp+var_12C]"], [294, "mov [rbp+var_194], eax"], [295, "mov rax, [rbp+var_138]"], [296, "mov [rbp+var_1A0], rax"], [297, "cmp [rbp+var_194], 3"], [298, "jz loc_401AC9"], [299, "cmp [rbp+var_194], 3"], [300, "ja loc_401B02"], [301, "cmp [rbp+var_194], 2"], [302, "jz short loc_401A8E"], [303, "cmp [rbp+var_194], 2"], [304, "ja loc_401B02"], [305, "cmp [rbp+var_194], 0"], [306, "jz loc_401B01"], [307, "cmp [rbp+var_194], 1"], [308, "jz short loc_401A5C"], [309, "jmp loc_401B02"], [310, "mov rax, [rbp+var_190]"], [311, "mov [rbp+var_1A8], rax"], [312, "mov eax, [rbp+var_184]"], [313, "lea rdx, ds:0[rax*8]"], [314, "mov rax, [rbp+var_1A8]"], [315, "add rdx, rax"], [316, "mov rax, [rbp+var_180]"], [317, "mov [rdx], rax"], [318, "jmp short loc_401B02"], [319, "mov rax, [rbp+var_190]"], [320, "mov [rbp+var_1B0], rax"], [321, "mov rax, [rbp+var_180]"], [322, "sub rax, [rbp+var_1A0]"], [323, "mov rdx, rax"], [324, "mov eax, [rbp+var_184]"], [325, "lea rcx, ds:0[rax*4]"], [326, "mov rax, [rbp+var_1B0]"], [327, "add rax, rcx"], [328, "mov [rax], edx"], [329, "jmp short loc_401B02"], [330, "mov rax, [rbp+var_190]"], [331, "mov [rbp+var_1B8], rax"], [332, "mov rax, [rbp+var_180]"], [333, "sub rax, [rbp+var_1A0]"], [334, "mov rdx, rax"], [335, "mov eax, [rbp+var_184]"], [336, "lea rcx, [rax+rax]"], [337, "mov rax, [rbp+var_1B8]"], [338, "add rax, rcx"], [339, "mov [rax], dx"], [340, "jmp short loc_401B02"], [341, "nop"], [342, "nop"], [343, "add [rbp+var_98], 1"], [344, "mov rax, [rbp+var_98]"], [345, "mov [rbp+var_1C0], rax"], [346, "mov eax, [rbp+var_84]"], [347, "mov [rbp+var_1C4], eax"], [348, "cmp [rbp+var_1C4], 3"], [349, "jz loc_401BF0"], [350, "mov rax, [rbp+var_1C0]"], [351, "mov rdi, rax"], [352, "call sub_40123D"], [353, "mov [rbp+var_1D0], rax"], [354, "mov eax, [rbp+var_1C4]"], [355, "mov [rbp+var_1D4], eax"], [356, "cmp [rbp+var_1D4], 3"], [357, "jnz short loc_401B64"], [358, "mov eax, 0Dh"], [359, "jmp short loc_401B69"], [360, "mov eax, 0Ch"], [361, "mov [rbp+var_1D8], eax"], [362, "call sub_401208"], [363, "test eax, eax"], [364, "jz short loc_401BB4"], [365, "mov rax, 0CF1BBCDCBBh"], [366, "mov [rbp+var_1E0], rax"], [367, "mov rax, [rbp+var_1D0]"], [368, "shl rax, 18h"], [369, "imul rax, [rbp+var_1E0]"], [370, "mov rdx, rax"], [371, "mov eax, 40h "], [372, "sub eax, [rbp+var_1D8]"], [373, "mov ecx, eax"], [374, "shr rdx, cl"], [375, "mov rax, rdx"], [376, "jmp short loc_401BEE"], [377, "mov rax, 9E3779B185EBCA87h"], [378, "mov [rbp+var_1E8], rax"], [379, "mov rax, [rbp+var_1D0]"], [380, "shr rax, 18h"], [381, "imul rax, [rbp+var_1E8]"], [382, "mov rdx, rax"], [383, "mov eax, 40h "], [384, "sub eax, [rbp+var_1D8]"], [385, "mov ecx, eax"], [386, "shr rdx, cl"], [387, "mov rax, rdx"], [388, "jmp short loc_401C3B"], [389, "mov rax, [rbp+var_1C0]"], [390, "mov rdi, rax"], [391, "call sub_40122D"], [392, "mov [rbp+var_1EC], eax"], [393, "mov eax, [rbp+var_1C4]"], [394, "mov [rbp+var_1F0], eax"], [395, "cmp [rbp+var_1F0], 3"], [396, "jnz short loc_401C2B"], [397, "mov eax, [rbp+var_1EC]"], [398, "imul eax, 9E3779B1h"], [399, "shr eax, 13h"], [400, "jmp short loc_401C3A"], [401, "mov eax, [rbp+var_1EC]"], [402, "imul eax, 9E3779B1h"], [403, "shr eax, 14h"], [404, "nop"], [405, "mov [rbp+var_1F4], eax"], [406, "cmp [rbp+var_84], 1"], [407, "jnz loc_401FB0"], [408, "mov rax, [rbp+var_98]"], [409, "mov [rbp+var_200], rax"], [410, "mov [rbp+var_204], 1"], [411, "mov edx, 6"], [412, "mov eax, [rbp+var_90]"], [413, "mov ecx, edx"], [414, "shl eax, cl"], [415, "mov [rbp+var_208], eax"], [416, "mov eax, [rbp+var_1F4]"], [417, "mov [rbp+var_20C], eax"], [418, "mov rax, [rbp+var_200]"], [419, "mov [rbp+var_98], rax"], [420, "mov eax, [rbp+var_204]"], [421, "cdqe"], [422, "add [rbp+var_200], rax"], [423, "mov eax, [rbp+var_208]"], [424, "lea edx, [rax+1]"], [425, "mov [rbp+var_208], edx"], [426, "mov edx, 6"], [427, "mov ecx, edx"], [428, "sar eax, cl"], [429, "mov [rbp+var_204], eax"], [430, "mov rax, [rbp+var_E8]"], [431, "cmp rax, [rbp+var_200]"], [432, "setb al"], [433, "movzx eax, al"], [434, "test rax, rax"], [435, "jnz loc_404026"], [436, "mov rsi, [rbp+var_58]"], [437, "mov rcx, [rbp+var_A8]"], [438, "mov edx, [rbp+var_84]"], [439, "mov eax, [rbp+var_20C]"], [440, "mov edi, eax"], [441, "call sub_4013B3"], [442, "mov [rbp+var_218], rax"], [443, "mov rax, [rbp+var_200]"], [444, "mov [rbp+var_220], rax"], [445, "mov eax, [rbp+var_84]"], [446, "mov [rbp+var_224], eax"], [447, "cmp [rbp+var_224], 3"], [448, "jz loc_401DE9"], [449, "mov rax, [rbp+var_220]"], [450, "mov rdi, rax"], [451, "call sub_40123D"], [452, "mov [rbp+var_230], rax"], [453, "mov eax, [rbp+var_224]"], [454, "mov [rbp+var_234], eax"], [455, "cmp [rbp+var_234], 3"], [456, "jnz short loc_401D5D"], [457, "mov eax, 0Dh"], [458, "jmp short loc_401D62"], [459, "mov eax, 0Ch"], [460, "mov [rbp+var_238], eax"], [461, "call sub_401208"], [462, "test eax, eax"], [463, "jz short loc_401DAD"], [464, "mov rax, 0CF1BBCDCBBh"], [465, "mov [rbp+var_240], rax"], [466, "mov rax, [rbp+var_230]"], [467, "shl rax, 18h"], [468, "imul rax, [rbp+var_240]"], [469, "mov rdx, rax"], [470, "mov eax, 40h "], [471, "sub eax, [rbp+var_238]"], [472, "mov ecx, eax"], [473, "shr rdx, cl"], [474, "mov rax, rdx"], [475, "jmp short loc_401DE7"], [476, "mov rax, 9E3779B185EBCA87h"], [477, "mov [rbp+var_248], rax"], [478, "mov rax, [rbp+var_230]"], [479, "shr rax, 18h"], [480, "imul rax, [rbp+var_248]"], [481, "mov rdx, rax"], [482, "mov eax, 40h "], [483, "sub eax, [rbp+var_238]"], [484, "mov ecx, eax"], [485, "shr rdx, cl"], [486, "mov rax, rdx"], [487, "jmp short loc_401E34"], [488, "mov rax, [rbp+var_220]"], [489, "mov rdi, rax"], [490, "call sub_40122D"], [491, "mov [rbp+var_24C], eax"], [492, "mov eax, [rbp+var_224]"], [493, "mov [rbp+var_250], eax"], [494, "cmp [rbp+var_250], 3"], [495, "jnz short loc_401E24"], [496, "mov eax, [rbp+var_24C]"], [497, "imul eax, 9E3779B1h"], [498, "shr eax, 13h"], [499, "jmp short loc_401E33"], [500, "mov eax, [rbp+var_24C]"], [501, "imul eax, 9E3779B1h"], [502, "shr eax, 14h"], [503, "nop"], [504, "mov [rbp+var_1F4], eax"], [505, "mov rax, [rbp+var_58]"], [506, "mov rdx, [rbp+var_98]"], [507, "mov [rbp+var_258], rdx"], [508, "mov edx, [rbp+var_20C]"], [509, "mov [rbp+var_25C], edx"], [510, "mov [rbp+var_268], rax"], [511, "mov eax, [rbp+var_84]"], [512, "mov [rbp+var_26C], eax"], [513, "mov rax, [rbp+var_A8]"], [514, "mov [rbp+var_278], rax"], [515, "cmp [rbp+var_26C], 3"], [516, "jz loc_401F30"], [517, "cmp [rbp+var_26C], 3"], [518, "ja loc_401F69"], [519, "cmp [rbp+var_26C], 2"], [520, "jz short loc_401EF5"], [521, "cmp [rbp+var_26C], 2"], [522, "ja loc_401F69"], [523, "cmp [rbp+var_26C], 0"], [524, "jz loc_401F68"], [525, "cmp [rbp+var_26C], 1"], [526, "jnz loc_401F69"], [527, "mov rax, [rbp+var_268]"], [528, "mov [rbp+var_280], rax"], [529, "mov eax, [rbp+var_25C]"], [530, "lea rdx, ds:0[rax*8]"], [531, "mov rax, [rbp+var_280]"], [532, "add rdx, rax"], [533, "mov rax, [rbp+var_258]"], [534, "mov [rdx], rax"], [535, "jmp short loc_401F69"], [536, "mov rax, [rbp+var_268]"], [537, "mov [rbp+var_288], rax"], [538, "mov rax, [rbp+var_258]"], [539, "sub rax, [rbp+var_278]"], [540, "mov rdx, rax"], [541, "mov eax, [rbp+var_25C]"], [542, "lea rcx, ds:0[rax*4]"], [543, "mov rax, [rbp+var_288]"], [544, "add rax, rcx"], [545, "mov [rax], edx"], [546, "jmp short loc_401F69"], [547, "mov rax, [rbp+var_268]"], [548, "mov [rbp+var_290], rax"], [549, "mov rax, [rbp+var_258]"], [550, "sub rax, [rbp+var_278]"], [551, "mov rdx, rax"], [552, "mov eax, [rbp+var_25C]"], [553, "lea rcx, [rax+rax]"], [554, "mov rax, [rbp+var_290]"], [555, "add rax, rcx"], [556, "mov [rax], dx"], [557, "jmp short loc_401F69"], [558, "nop"], [559, "mov rax, [rbp+var_218]"], [560, "add rax, 0FFFFh"], [561, "cmp [rbp+var_98], rax"], [562, "ja loc_401C7B"], [563, "mov rax, [rbp+var_218]"], [564, "mov rdi, rax"], [565, "call sub_40122D"], [566, "mov ebx, eax"], [567, "mov rax, [rbp+var_98]"], [568, "mov rdi, rax"], [569, "call sub_40122D"], [570, "cmp ebx, eax"], [571, "jnz loc_401C7B"], [572, "jmp loc_4024CA"], [573, "mov rax, [rbp+var_98]"], [574, "mov [rbp+var_298], rax"], [575, "mov [rbp+var_29C], 1"], [576, "mov edx, 6"], [577, "mov eax, [rbp+var_90]"], [578, "mov ecx, edx"], [579, "shl eax, cl"], [580, "mov [rbp+var_2A0], eax"], [581, "mov eax, [rbp+var_1F4]"], [582, "mov [rbp+var_2A4], eax"], [583, "mov rax, [rbp+var_298]"], [584, "sub rax, [rbp+var_A8]"], [585, "mov [rbp+var_2A8], eax"], [586, "mov rax, [rbp+var_58]"], [587, "mov edx, [rbp+var_2A4]"], [588, "mov [rbp+var_2AC], edx"], [589, "mov [rbp+var_2B8], rax"], [590, "mov eax, [rbp+var_84]"], [591, "mov [rbp+var_2BC], eax"], [592, "cmp [rbp+var_2BC], 2"], [593, "jnz short loc_402053"], [594, "mov rax, [rbp+var_2B8]"], [595, "mov [rbp+var_2C8], rax"], [596, "mov eax, [rbp+var_2AC]"], [597, "lea rdx, ds:0[rax*4]"], [598, "mov rax, [rbp+var_2C8]"], [599, "add rax, rdx"], [600, "mov eax, [rax]"], [601, "jmp short loc_40208B"], [602, "cmp [rbp+var_2BC], 3"], [603, "jnz short loc_402086"], [604, "mov rax, [rbp+var_2B8]"], [605, "mov [rbp+var_2D0], rax"], [606, "mov eax, [rbp+var_2AC]"], [607, "lea rdx, [rax+rax]"], [608, "mov rax, [rbp+var_2D0]"], [609, "add rax, rdx"], [610, "movzx eax, word ptr [rax]"], [611, "movzx eax, ax"], [612, "jmp short loc_40208B"], [613, "mov eax, 0"], [614, "mov [rbp+var_2D4], eax"], [615, "mov rax, [rbp+var_298]"], [616, "mov [rbp+var_98], rax"], [617, "mov eax, [rbp+var_29C]"], [618, "cdqe"], [619, "add [rbp+var_298], rax"], [620, "mov eax, [rbp+var_2A0]"], [621, "lea edx, [rax+1]"], [622, "mov [rbp+var_2A0], edx"], [623, "mov edx, 6"], [624, "mov ecx, edx"], [625, "sar eax, cl"], [626, "mov [rbp+var_29C], eax"], [627, "mov rax, [rbp+var_E8]"], [628, "cmp rax, [rbp+var_298]"], [629, "setb al"], [630, "movzx eax, al"], [631, "test rax, rax"], [632, "jnz loc_404029"], [633, "cmp [rbp+var_88], 3"], [634, "jnz loc_4021F7"], [635, "mov eax, [rbp+var_9C]"], [636, "cmp eax, [rbp+var_2D4]"], [637, "jbe loc_4021D3"], [638, "mov rax, [rbp+var_B0]"], [639, "mov edx, [rbp+var_2A4]"], [640, "mov [rbp+var_2D8], edx"], [641, "mov [rbp+var_2E0], rax"], [642, "mov [rbp+var_2E4], 2"], [643, "cmp [rbp+var_2E4], 2"], [644, "jnz short loc_40215F"], [645, "mov rax, [rbp+var_2E0]"], [646, "mov [rbp+var_2F0], rax"], [647, "mov eax, [rbp+var_2D8]"], [648, "lea rdx, ds:0[rax*4]"], [649, "mov rax, [rbp+var_2F0]"], [650, "add rax, rdx"], [651, "mov eax, [rax]"], [652, "jmp short loc_402197"], [653, "cmp [rbp+var_2E4], 3"], [654, "jnz short loc_402192"], [655, "mov rax, [rbp+var_2E0]"], [656, "mov [rbp+var_2F8], rax"], [657, "mov eax, [rbp+var_2D8]"], [658, "lea rdx, [rax+rax]"], [659, "mov rax, [rbp+var_2F8]"], [660, "add rax, rdx"], [661, "movzx eax, word ptr [rax]"], [662, "movzx eax, ax"], [663, "jmp short loc_402197"], [664, "mov eax, 0"], [665, "mov [rbp+var_2D4], eax"], [666, "mov edx, [rbp+var_2D4]"], [667, "mov rax, [rbp+var_F8]"], [668, "add rax, rdx"], [669, "mov [rbp+var_218], rax"], [670, "mov eax, [rbp+var_C0]"], [671, "add [rbp+var_2D4], eax"], [672, "mov rax, [rbp+var_B8]"], [673, "mov [rbp+var_118], rax"], [674, "jmp loc_402270"], [675, "mov edx, [rbp+var_2D4]"], [676, "mov rax, [rbp+var_A8]"], [677, "add rax, rdx"], [678, "mov [rbp+var_218], rax"], [679, "mov rax, [rbp+var_60]"], [680, "mov [rbp+var_118], rax"], [681, "jmp short loc_402270"], [682, "cmp [rbp+var_88], 2"], [683, "jnz short loc_402259"], [684, "mov eax, [rbp+var_9C]"], [685, "cmp eax, [rbp+var_2D4]"], [686, "jbe short loc_402235"], [687, "mov edx, [rbp+var_2D4]"], [688, "mov rax, [rbp+var_F8]"], [689, "add rax, rdx"], [690, "mov [rbp+var_218], rax"], [691, "mov rax, [rbp+var_B8]"], [692, "mov [rbp+var_118], rax"], [693, "jmp short loc_402270"], [694, "mov edx, [rbp+var_2D4]"], [695, "mov rax, [rbp+var_A8]"], [696, "add rax, rdx"], [697, "mov [rbp+var_218], rax"], [698, "mov rax, [rbp+var_60]"], [699, "mov [rbp+var_118], rax"], [700, "jmp short loc_402270"], [701, "mov edx, [rbp+var_2D4]"], [702, "mov rax, [rbp+var_A8]"], [703, "add rax, rdx"], [704, "mov [rbp+var_218], rax"], [705, "mov rax, [rbp+var_298]"], [706, "mov [rbp+var_300], rax"], [707, "mov eax, [rbp+var_84]"], [708, "mov [rbp+var_304], eax"], [709, "cmp [rbp+var_304], 3"], [710, "jz loc_402355"], [711, "mov rax, [rbp+var_300]"], [712, "mov rdi, rax"], [713, "call sub_40123D"], [714, "mov [rbp+var_310], rax"], [715, "mov eax, [rbp+var_304]"], [716, "mov [rbp+var_314], eax"], [717, "cmp [rbp+var_314], 3"], [718, "jnz short loc_4022C9"], [719, "mov eax, 0Dh"], [720, "jmp short loc_4022CE"], [721, "mov eax, 0Ch"], [722, "mov [rbp+var_318], eax"], [723, "call sub_401208"], [724, "test eax, eax"], [725, "jz short loc_402319"], [726, "mov rax, 0CF1BBCDCBBh"], [727, "mov [rbp+var_320], rax"], [728, "mov rax, [rbp+var_310]"], [729, "shl rax, 18h"], [730, "imul rax, [rbp+var_320]"], [731, "mov rdx, rax"], [732, "mov eax, 40h "], [733, "sub eax, [rbp+var_318]"], [734, "mov ecx, eax"], [735, "shr rdx, cl"], [736, "mov rax, rdx"], [737, "jmp short loc_402353"], [738, "mov rax, 9E3779B185EBCA87h"], [739, "mov [rbp+var_328], rax"], [740, "mov rax, [rbp+var_310]"], [741, "shr rax, 18h"], [742, "imul rax, [rbp+var_328]"], [743, "mov rdx, rax"], [744, "mov eax, 40h "], [745, "sub eax, [rbp+var_318]"], [746, "mov ecx, eax"], [747, "shr rdx, cl"], [748, "mov rax, rdx"], [749, "jmp short loc_4023A0"], [750, "mov rax, [rbp+var_300]"], [751, "mov rdi, rax"], [752, "call sub_40122D"], [753, "mov [rbp+var_32C], eax"], [754, "mov eax, [rbp+var_304]"], [755, "mov [rbp+var_330], eax"], [756, "cmp [rbp+var_330], 3"], [757, "jnz short loc_402390"], [758, "mov eax, [rbp+var_32C]"], [759, "imul eax, 9E3779B1h"], [760, "shr eax, 13h"], [761, "jmp short loc_40239F"], [762, "mov eax, [rbp+var_32C]"], [763, "imul eax, 9E3779B1h"], [764, "shr eax, 14h"], [765, "nop"], [766, "mov [rbp+var_1F4], eax"], [767, "mov rax, [rbp+var_58]"], [768, "mov edx, [rbp+var_2A8]"], [769, "mov [rbp+var_334], edx"], [770, "mov edx, [rbp+var_2A4]"], [771, "mov [rbp+var_338], edx"], [772, "mov [rbp+var_340], rax"], [773, "mov eax, [rbp+var_84]"], [774, "mov [rbp+var_344], eax"], [775, "cmp [rbp+var_344], 2"], [776, "jz short loc_4023E9"], [777, "cmp [rbp+var_344], 3"], [778, "jz short loc_402419"], [779, "jmp short loc_402445"], [780, "mov rax, [rbp+var_340]"], [781, "mov [rbp+var_350], rax"], [782, "mov eax, [rbp+var_338]"], [783, "lea rdx, ds:0[rax*4]"], [784, "mov rax, [rbp+var_350]"], [785, "add rdx, rax"], [786, "mov eax, [rbp+var_334]"], [787, "mov [rdx], eax"], [788, "jmp short loc_402445"], [789, "mov rax, [rbp+var_340]"], [790, "mov [rbp+var_358], rax"], [791, "mov eax, [rbp+var_338]"], [792, "lea rdx, [rax+rax]"], [793, "mov rax, [rbp+var_358]"], [794, "add rax, rdx"], [795, "mov edx, [rbp+var_334]"], [796, "mov [rax], dx"], [797, "nop"], [798, "cmp [rbp+var_8C], 1"], [799, "jnz short loc_40245C"], [800, "mov eax, [rbp+var_C8]"], [801, "cmp eax, [rbp+var_2D4]"], [802, "ja short loc_4024BD"], [803, "cmp [rbp+var_84], 3"], [804, "jz short loc_402478"], [805, "mov eax, [rbp+var_2D4]"], [806, "add eax, 0FFFFh"], [807, "cmp [rbp+var_2A8], eax"], [808, "ja short loc_4024C3"], [809, "mov rax, [rbp+var_218]"], [810, "mov rdi, rax"], [811, "call sub_40122D"], [812, "mov ebx, eax"], [813, "mov rax, [rbp+var_98]"], [814, "mov rdi, rax"], [815, "call sub_40122D"], [816, "cmp ebx, eax"], [817, "jnz loc_401FDD"], [818, "cmp [rbp+var_C4], 0"], [819, "jz short loc_4024C9"], [820, "mov eax, [rbp+var_2A8]"], [821, "sub eax, [rbp+var_2D4]"], [822, "mov [rbp+var_10C], eax"], [823, "jmp short loc_4024C9"], [824, "nop"], [825, "jmp loc_401FDD"], [826, "nop"], [827, "jmp loc_401FDD"], [828, "nop"], [829, "mov rax, [rbp+var_98]"], [830, "mov [rbp+var_360], rax"], [831, "jmp short loc_4024EA"], [832, "sub [rbp+var_98], 1"], [833, "sub [rbp+var_218], 1"], [834, "mov rax, [rbp+var_98]"], [835, "cmp rax, [rbp+src]"], [836, "setnbe dl"], [837, "mov rax, [rbp+var_218]"], [838, "cmp rax, [rbp+var_118]"], [839, "setnbe al"], [840, "and eax, edx"], [841, "test al, al"], [842, "jz short loc_40253B"], [843, "mov rax, [rbp+var_98]"], [844, "sub rax, 1"], [845, "movzx edx, byte ptr [rax]"], [846, "mov rax, [rbp+var_218]"], [847, "sub rax, 1"], [848, "movzx eax, byte ptr [rax]"], [849, "cmp dl, al"], [850, "setz al"], [851, "movzx eax, al"], [852, "test rax, rax"], [853, "jnz short loc_4024DA"], [854, "mov rax, [rbp+var_98]"], [855, "sub rax, [rbp+src]"], [856, "mov [rbp+var_364], eax"], [857, "mov rax, [rbp+dest]"], [858, "lea rdx, [rax+1]"], [859, "mov [rbp+dest], rdx"], [860, "mov [rbp+var_370], rax"], [861, "cmp [rbp+var_80], 1"], [862, "jnz short loc_4025BB"], [863, "mov edx, [rbp+var_364]"], [864, "mov eax, [rbp+var_364]"], [865, "mov ecx, eax"], [866, "mov eax, 80808081h"], [867, "imul rax, rcx"], [868, "shr rax, 20h"], [869, "shr eax, 7"], [870, "mov eax, eax"], [871, "add rax, rdx"], [872, "lea rdx, [rax+8]"], [873, "mov rax, [rbp+dest]"], [874, "add rax, rdx"], [875, "cmp [rbp+var_108], rax"], [876, "setb al"], [877, "movzx eax, al"], [878, "test rax, rax"], [879, "jz short loc_4025BB"], [880, "mov eax, 0"], [881, "jmp loc_4041E9"], [882, "cmp [rbp+var_80], 2"], [883, "jnz short loc_402616"], [884, "mov eax, [rbp+var_364]"], [885, "add eax, 0F0h"], [886, "mov edx, eax"], [887, "mov eax, 80808081h"], [888, "imul rax, rdx"], [889, "shr rax, 20h"], [890, "shr eax, 7"], [891, "mov edx, eax"], [892, "mov eax, [rbp+var_364]"], [893, "add rax, rdx"], [894, "lea rdx, [rax+0Bh]"], [895, "mov rax, [rbp+dest]"], [896, "add rax, rdx"], [897, "cmp [rbp+var_108], rax"], [898, "setb al"], [899, "movzx eax, al"], [900, "test rax, rax"], [901, "jz short loc_402616"], [902, "sub [rbp+dest], 1"], [903, "jmp loc_40402D"], [904, "cmp [rbp+var_364], 0Eh"], [905, "jbe short loc_402681"], [906, "mov eax, [rbp+var_364]"], [907, "sub eax, 0Fh"], [908, "mov [rbp+var_374], eax"], [909, "mov rax, [rbp+var_370]"], [910, "mov byte ptr [rax], 0F0h"], [911, "jmp short loc_402659"], [912, "mov rax, [rbp+dest]"], [913, "lea rdx, [rax+1]"], [914, "mov [rbp+dest], rdx"], [915, "mov byte ptr [rax], 0FFh"], [916, "sub [rbp+var_374], 0FFh"], [917, "cmp [rbp+var_374], 0FEh"], [918, "jg short loc_40263A"], [919, "mov rax, [rbp+dest]"], [920, "lea rdx, [rax+1]"], [921, "mov [rbp+dest], rdx"], [922, "mov edx, [rbp+var_374]"], [923, "mov [rax], dl"], [924, "jmp short loc_402695"], [925, "mov eax, [rbp+var_364]"], [926, "shl eax, 4"], [927, "mov edx, eax"], [928, "mov rax, [rbp+var_370]"], [929, "mov [rax], dl"], [930, "mov edx, [rbp+var_364]"], [931, "mov rax, [rbp+dest]"], [932, "add rdx, rax"], [933, "mov rax, [rbp+dest]"], [934, "mov [rbp+var_380], rax"], [935, "mov rax, [rbp+src]"], [936, "mov [rbp+var_388], rax"], [937, "mov [rbp+var_390], rdx"], [938, "mov rax, [rbp+var_380]"], [939, "mov [rbp+var_398], rax"], [940, "mov rax, [rbp+var_388]"], [941, "mov [rbp+var_3A0], rax"], [942, "mov rax, [rbp+var_390]"], [943, "mov [rbp+var_3A8], rax"], [944, "mov rax, [rbp+var_3A0]"], [945, "mov rdx, [rax]"], [946, "mov rax, [rbp+var_398]"], [947, "mov [rax], rdx"], [948, "add [rbp+var_398], 8"], [949, "add [rbp+var_3A0], 8"], [950, "mov rax, [rbp+var_3A8]"], [951, "cmp rax, [rbp+var_398]"], [952, "ja short loc_4026F2"], [953, "nop"], [954, "mov eax, [rbp+var_364]"], [955, "add [rbp+dest], rax"], [956, "cmp [rbp+var_80], 2"], [957, "jnz short loc_402761"], [958, "mov rax, [rbp+dest]"], [959, "add rax, 0Bh"], [960, "cmp [rbp+var_108], rax"], [961, "jnb short loc_402761"], [962, "mov rax, [rbp+var_370]"], [963, "mov [rbp+dest], rax"], [964, "jmp loc_40402D"], [965, "cmp [rbp+var_C4], 0"], [966, "jz short loc_40278E"], [967, "mov eax, [rbp+var_10C]"], [968, "movzx edx, ax"], [969, "mov rax, [rbp+dest]"], [970, "mov esi, edx"], [971, "mov rdi, rax"], [972, "call sub_4012CB"], [973, "add [rbp+dest], 2"], [974, "jmp short loc_4027B8"], [975, "mov rax, [rbp+var_98]"], [976, "sub rax, [rbp+var_218]"], [977, "movzx edx, ax"], [978, "mov rax, [rbp+dest]"], [979, "mov esi, edx"], [980, "mov rdi, rax"], [981, "call sub_4012CB"], [982, "add [rbp+dest], 2"], [983, "cmp [rbp+var_88], 2"], [984, "jz short loc_4027CE"], [985, "cmp [rbp+var_88], 3"], [986, "jnz loc_402CA8"], [987, "mov rax, [rbp+var_B8]"], [988, "cmp rax, [rbp+var_118]"], [989, "jnz loc_402CA8"], [990, "mov rax, [rbp+var_D0]"], [991, "sub rax, [rbp+var_218]"], [992, "mov rdx, rax"], [993, "mov rax, [rbp+var_98]"], [994, "add rax, rdx"], [995, "mov [rbp+var_3B0], rax"], [996, "mov rax, [rbp+var_F0]"], [997, "cmp rax, [rbp+var_3B0]"], [998, "jnb short loc_402822"], [999, "mov rax, [rbp+var_F0]"], [1000, "mov [rbp+var_3B0], rax"], [1001, "mov rax, [rbp+var_218]"], [1002, "add rax, 4"], [1003, "mov rdx, [rbp+var_98]"], [1004, "add rdx, 4"], [1005, "mov [rbp+var_3B8], rdx"], [1006, "mov [rbp+var_3C0], rax"], [1007, "mov rax, [rbp+var_3B0]"], [1008, "mov [rbp+var_3C8], rax"], [1009, "mov rax, [rbp+var_3B8]"], [1010, "mov [rbp+var_3D0], rax"], [1011, "mov rax, [rbp+var_3C8]"], [1012, "sub rax, 7"], [1013, "cmp [rbp+var_3B8], rax"], [1014, "setb al"], [1015, "movzx eax, al"], [1016, "test rax, rax"], [1017, "jz loc_402953"], [1018, "mov rax, [rbp+var_3C0]"], [1019, "mov rdi, rax"], [1020, "call sub_40123D"], [1021, "mov rbx, rax"], [1022, "mov rax, [rbp+var_3B8]"], [1023, "mov rdi, rax"], [1024, "call sub_40123D"], [1025, "xor rax, rbx"], [1026, "mov [rbp+var_3D8], rax"], [1027, "cmp [rbp+var_3D8], 0"], [1028, "jnz short loc_4028CD"], [1029, "add [rbp+var_3B8], 8"], [1030, "add [rbp+var_3C0], 8"], [1031, "jmp loc_402953"], [1032, "mov rax, [rbp+var_3D8]"], [1033, "mov rdi, rax"], [1034, "call sub_401325"], [1035, "jmp loc_402A43"], [1036, "mov rax, [rbp+var_3C0]"], [1037, "mov rdi, rax"], [1038, "call sub_40123D"], [1039, "mov rbx, rax"], [1040, "mov rax, [rbp+var_3B8]"], [1041, "mov rdi, rax"], [1042, "call sub_40123D"], [1043, "xor rax, rbx"], [1044, "mov [rbp+var_3E0], rax"], [1045, "cmp [rbp+var_3E0], 0"], [1046, "jnz short loc_402928"], [1047, "add [rbp+var_3B8], 8"], [1048, "add [rbp+var_3C0], 8"], [1049, "jmp short loc_402953"], [1050, "mov rax, [rbp+var_3E0]"], [1051, "mov rdi, rax"], [1052, "call sub_401325"], [1053, "mov eax, eax"], [1054, "add [rbp+var_3B8], rax"], [1055, "mov rax, [rbp+var_3B8]"], [1056, "sub rax, [rbp+var_3D0]"], [1057, "jmp loc_402A43"], [1058, "mov rax, [rbp+var_3C8]"], [1059, "sub rax, 7"], [1060, "cmp [rbp+var_3B8], rax"], [1061, "setb al"], [1062, "movzx eax, al"], [1063, "test rax, rax"], [1064, "jnz loc_4028E1"], [1065, "mov rax, [rbp+var_3C8]"], [1066, "sub rax, 3"], [1067, "cmp [rbp+var_3B8], rax"], [1068, "jnb short loc_4029BC"], [1069, "mov rax, [rbp+var_3C0]"], [1070, "mov rdi, rax"], [1071, "call sub_40122D"], [1072, "mov ebx, eax"], [1073, "mov rax, [rbp+var_3B8]"], [1074, "mov rdi, rax"], [1075, "call sub_40122D"], [1076, "cmp ebx, eax"], [1077, "jnz short loc_4029BC"], [1078, "add [rbp+var_3B8], 4"], [1079, "add [rbp+var_3C0], 4"], [1080, "mov rax, [rbp+var_3C8]"], [1081, "sub rax, 1"], [1082, "cmp rax, [rbp+var_3B8]"], [1083, "jbe short loc_402A05"], [1084, "mov rax, [rbp+var_3C0]"], [1085, "mov rdi, rax"], [1086, "call sub_40121C"], [1087, "mov ebx, eax"], [1088, "mov rax, [rbp+var_3B8]"], [1089, "mov rdi, rax"], [1090, "call sub_40121C"], [1091, "cmp bx, ax"], [1092, "jnz short loc_402A05"], [1093, "add [rbp+var_3B8], 2"], [1094, "add [rbp+var_3C0], 2"], [1095, "mov rax, [rbp+var_3C8]"], [1096, "cmp rax, [rbp+var_3B8]"], [1097, "jbe short loc_402A35"], [1098, "mov rax, [rbp+var_3C0]"], [1099, "movzx edx, byte ptr [rax]"], [1100, "mov rax, [rbp+var_3B8]"], [1101, "movzx eax, byte ptr [rax]"], [1102, "cmp dl, al"], [1103, "jnz short loc_402A35"], [1104, "add [rbp+var_3B8], 1"], [1105, "mov rax, [rbp+var_3B8]"], [1106, "sub rax, [rbp+var_3D0]"], [1107, "mov [rbp+var_3E4], eax"], [1108, "mov eax, [rbp+var_3E4]"], [1109, "add rax, 4"], [1110, "add [rbp+var_98], rax"], [1111, "mov rax, [rbp+var_3B0]"], [1112, "cmp rax, [rbp+var_98]"], [1113, "jnz loc_402EE2"], [1114, "mov rax, [rbp+var_3B0]"], [1115, "mov [rbp+var_3F0], rax"], [1116, "mov rax, [rbp+var_60]"], [1117, "mov [rbp+var_3F8], rax"], [1118, "mov rax, [rbp+var_F0]"], [1119, "mov [rbp+var_400], rax"], [1120, "mov rax, [rbp+var_3F0]"], [1121, "mov [rbp+var_408], rax"], [1122, "mov rax, [rbp+var_400]"], [1123, "sub rax, 7"], [1124, "cmp [rbp+var_3F0], rax"], [1125, "setb al"], [1126, "movzx eax, al"], [1127, "test rax, rax"], [1128, "jz loc_402B94"], [1129, "mov rax, [rbp+var_3F8]"], [1130, "mov rdi, rax"], [1131, "call sub_40123D"], [1132, "mov rbx, rax"], [1133, "mov rax, [rbp+var_3F0]"], [1134, "mov rdi, rax"], [1135, "call sub_40123D"], [1136, "xor rax, rbx"], [1137, "mov [rbp+var_410], rax"], [1138, "cmp [rbp+var_410], 0"], [1139, "jnz short loc_402B0E"], [1140, "add [rbp+var_3F0], 8"], [1141, "add [rbp+var_3F8], 8"], [1142, "jmp loc_402B94"], [1143, "mov rax, [rbp+var_410]"], [1144, "mov rdi, rax"], [1145, "call sub_401325"], [1146, "jmp loc_402C84"], [1147, "mov rax, [rbp+var_3F8]"], [1148, "mov rdi, rax"], [1149, "call sub_40123D"], [1150, "mov rbx, rax"], [1151, "mov rax, [rbp+var_3F0]"], [1152, "mov rdi, rax"], [1153, "call sub_40123D"], [1154, "xor rax, rbx"], [1155, "mov [rbp+var_418], rax"], [1156, "cmp [rbp+var_418], 0"], [1157, "jnz short loc_402B69"], [1158, "add [rbp+var_3F0], 8"], [1159, "add [rbp+var_3F8], 8"], [1160, "jmp short loc_402B94"], [1161, "mov rax, [rbp+var_418]"], [1162, "mov rdi, rax"], [1163, "call sub_401325"], [1164, "mov eax, eax"], [1165, "add [rbp+var_3F0], rax"], [1166, "mov rax, [rbp+var_3F0]"], [1167, "sub rax, [rbp+var_408]"], [1168, "jmp loc_402C84"], [1169, "mov rax, [rbp+var_400]"], [1170, "sub rax, 7"], [1171, "cmp [rbp+var_3F0], rax"], [1172, "setb al"], [1173, "movzx eax, al"], [1174, "test rax, rax"], [1175, "jnz loc_402B22"], [1176, "mov rax, [rbp+var_400]"], [1177, "sub rax, 3"], [1178, "cmp [rbp+var_3F0], rax"], [1179, "jnb short loc_402BFD"], [1180, "mov rax, [rbp+var_3F8]"], [1181, "mov rdi, rax"], [1182, "call sub_40122D"], [1183, "mov ebx, eax"], [1184, "mov rax, [rbp+var_3F0]"], [1185, "mov rdi, rax"], [1186, "call sub_40122D"], [1187, "cmp ebx, eax"], [1188, "jnz short loc_402BFD"], [1189, "add [rbp+var_3F0], 4"], [1190, "add [rbp+var_3F8], 4"], [1191, "mov rax, [rbp+var_400]"], [1192, "sub rax, 1"], [1193, "cmp rax, [rbp+var_3F0]"], [1194, "jbe short loc_402C46"], [1195, "mov rax, [rbp+var_3F8]"], [1196, "mov rdi, rax"], [1197, "call sub_40121C"], [1198, "mov ebx, eax"], [1199, "mov rax, [rbp+var_3F0]"], [1200, "mov rdi, rax"], [1201, "call sub_40121C"], [1202, "cmp bx, ax"], [1203, "jnz short loc_402C46"], [1204, "add [rbp+var_3F0], 2"], [1205, "add [rbp+var_3F8], 2"], [1206, "mov rax, [rbp+var_400]"], [1207, "cmp rax, [rbp+var_3F0]"], [1208, "jbe short loc_402C76"], [1209, "mov rax, [rbp+var_3F8]"], [1210, "movzx edx, byte ptr [rax]"], [1211, "mov rax, [rbp+var_3F0]"], [1212, "movzx eax, byte ptr [rax]"], [1213, "cmp dl, al"], [1214, "jnz short loc_402C76"], [1215, "add [rbp+var_3F0], 1"], [1216, "mov rax, [rbp+var_3F0]"], [1217, "sub rax, [rbp+var_408]"], [1218, "mov [rbp+var_41C], eax"], [1219, "mov eax, [rbp+var_41C]"], [1220, "add [rbp+var_3E4], eax"], [1221, "mov eax, [rbp+var_41C]"], [1222, "add [rbp+var_98], rax"], [1223, "jmp loc_402EE2"], [1224, "mov rax, [rbp+var_218]"], [1225, "add rax, 4"], [1226, "mov rdx, [rbp+var_98]"], [1227, "add rdx, 4"], [1228, "mov [rbp+var_428], rdx"], [1229, "mov [rbp+var_430], rax"], [1230, "mov rax, [rbp+var_F0]"], [1231, "mov [rbp+var_438], rax"], [1232, "mov rax, [rbp+var_428]"], [1233, "mov [rbp+var_440], rax"], [1234, "mov rax, [rbp+var_438]"], [1235, "sub rax, 7"], [1236, "cmp [rbp+var_428], rax"], [1237, "setb al"], [1238, "movzx eax, al"], [1239, "test rax, rax"], [1240, "jz loc_402DD9"], [1241, "mov rax, [rbp+var_430]"], [1242, "mov rdi, rax"], [1243, "call sub_40123D"], [1244, "mov rbx, rax"], [1245, "mov rax, [rbp+var_428]"], [1246, "mov rdi, rax"], [1247, "call sub_40123D"], [1248, "xor rax, rbx"], [1249, "mov [rbp+var_448], rax"], [1250, "cmp [rbp+var_448], 0"], [1251, "jnz short loc_402D53"], [1252, "add [rbp+var_428], 8"], [1253, "add [rbp+var_430], 8"], [1254, "jmp loc_402DD9"], [1255, "mov rax, [rbp+var_448]"], [1256, "mov rdi, rax"], [1257, "call sub_401325"], [1258, "jmp loc_402EC9"], [1259, "mov rax, [rbp+var_430]"], [1260, "mov rdi, rax"], [1261, "call sub_40123D"], [1262, "mov rbx, rax"], [1263, "mov rax, [rbp+var_428]"], [1264, "mov rdi, rax"], [1265, "call sub_40123D"], [1266, "xor rax, rbx"], [1267, "mov [rbp+var_450], rax"], [1268, "cmp [rbp+var_450], 0"], [1269, "jnz short loc_402DAE"], [1270, "add [rbp+var_428], 8"], [1271, "add [rbp+var_430], 8"], [1272, "jmp short loc_402DD9"], [1273, "mov rax, [rbp+var_450]"], [1274, "mov rdi, rax"], [1275, "call sub_401325"], [1276, "mov eax, eax"], [1277, "add [rbp+var_428], rax"], [1278, "mov rax, [rbp+var_428]"], [1279, "sub rax, [rbp+var_440]"], [1280, "jmp loc_402EC9"], [1281, "mov rax, [rbp+var_438]"], [1282, "sub rax, 7"], [1283, "cmp [rbp+var_428], rax"], [1284, "setb al"], [1285, "movzx eax, al"], [1286, "test rax, rax"], [1287, "jnz loc_402D67"], [1288, "mov rax, [rbp+var_438]"], [1289, "sub rax, 3"], [1290, "cmp [rbp+var_428], rax"], [1291, "jnb short loc_402E42"], [1292, "mov rax, [rbp+var_430]"], [1293, "mov rdi, rax"], [1294, "call sub_40122D"], [1295, "mov ebx, eax"], [1296, "mov rax, [rbp+var_428]"], [1297, "mov rdi, rax"], [1298, "call sub_40122D"], [1299, "cmp ebx, eax"], [1300, "jnz short loc_402E42"], [1301, "add [rbp+var_428], 4"], [1302, "add [rbp+var_430], 4"], [1303, "mov rax, [rbp+var_438]"], [1304, "sub rax, 1"], [1305, "cmp rax, [rbp+var_428]"], [1306, "jbe short loc_402E8B"], [1307, "mov rax, [rbp+var_430]"], [1308, "mov rdi, rax"], [1309, "call sub_40121C"], [1310, "mov ebx, eax"], [1311, "mov rax, [rbp+var_428]"], [1312, "mov rdi, rax"], [1313, "call sub_40121C"], [1314, "cmp bx, ax"], [1315, "jnz short loc_402E8B"], [1316, "add [rbp+var_428], 2"], [1317, "add [rbp+var_430], 2"], [1318, "mov rax, [rbp+var_438]"], [1319, "cmp rax, [rbp+var_428]"], [1320, "jbe short loc_402EBB"], [1321, "mov rax, [rbp+var_430]"], [1322, "movzx edx, byte ptr [rax]"], [1323, "mov rax, [rbp+var_428]"], [1324, "movzx eax, byte ptr [rax]"], [1325, "cmp dl, al"], [1326, "jnz short loc_402EBB"], [1327, "add [rbp+var_428], 1"], [1328, "mov rax, [rbp+var_428]"], [1329, "sub rax, [rbp+var_440]"], [1330, "mov [rbp+var_3E4], eax"], [1331, "mov eax, [rbp+var_3E4]"], [1332, "add rax, 4"], [1333, "add [rbp+var_98], rax"], [1334, "jmp short loc_402EE3"], [1335, "nop"], [1336, "cmp [rbp+var_80], 0"], [1337, "jz loc_4031E9"], [1338, "mov eax, [rbp+var_3E4]"], [1339, "add eax, 0F0h"], [1340, "mov edx, eax"], [1341, "mov eax, 80808081h"], [1342, "imul rax, rdx"], [1343, "shr rax, 20h"], [1344, "shr eax, 7"], [1345, "mov eax, eax"], [1346, "lea rdx, [rax+6]"], [1347, "mov rax, [rbp+dest]"], [1348, "add rax, rdx"], [1349, "cmp [rbp+var_108], rax"], [1350, "setb al"], [1351, "movzx eax, al"], [1352, "test rax, rax"], [1353, "jz loc_4031E9"], [1354, "cmp [rbp+var_80], 2"], [1355, "jnz loc_4031DF"], [1356, "mov rax, [rbp+var_108]"], [1357, "sub rax, [rbp+dest]"], [1358, "mov edx, eax"], [1359, "mov eax, edx"], [1360, "shl eax, 8"], [1361, "sub eax, edx"], [1362, "sub eax, 5ECh"], [1363, "mov [rbp+var_454], eax"], [1364, "mov eax, [rbp+var_3E4]"], [1365, "sub eax, [rbp+var_454]"], [1366, "mov eax, eax"], [1367, "neg rax"], [1368, "add [rbp+var_98], rax"], [1369, "mov eax, [rbp+var_454]"], [1370, "mov [rbp+var_3E4], eax"], [1371, "mov rax, [rbp+var_360]"], [1372, "cmp rax, [rbp+var_98]"], [1373, "setnb al"], [1374, "movzx eax, al"], [1375, "test rax, rax"], [1376, "jz loc_4031E9"], [1377, "mov rax, [rbp+var_98]"], [1378, "mov [rbp+var_460], rax"], [1379, "jmp loc_4031C9"], [1380, "mov rax, [rbp+var_460]"], [1381, "mov [rbp+var_468], rax"], [1382, "mov eax, [rbp+var_84]"], [1383, "mov [rbp+var_46C], eax"], [1384, "cmp [rbp+var_46C], 3"], [1385, "jz loc_403095"], [1386, "mov rax, [rbp+var_468]"], [1387, "mov rdi, rax"], [1388, "call sub_40123D"], [1389, "mov [rbp+var_478], rax"], [1390, "mov eax, [rbp+var_46C]"], [1391, "mov [rbp+var_47C], eax"], [1392, "cmp [rbp+var_47C], 3"], [1393, "jnz short loc_403009"], [1394, "mov eax, 0Dh"], [1395, "jmp short loc_40300E"], [1396, "mov eax, 0Ch"], [1397, "mov [rbp+var_480], eax"], [1398, "call sub_401208"], [1399, "test eax, eax"], [1400, "jz short loc_403059"], [1401, "mov rax, 0CF1BBCDCBBh"], [1402, "mov [rbp+var_488], rax"], [1403, "mov rax, [rbp+var_478]"], [1404, "shl rax, 18h"], [1405, "imul rax, [rbp+var_488]"], [1406, "mov rdx, rax"], [1407, "mov eax, 40h "], [1408, "sub eax, [rbp+var_480]"], [1409, "mov ecx, eax"], [1410, "shr rdx, cl"], [1411, "mov rax, rdx"], [1412, "jmp short loc_403093"], [1413, "mov rax, 9E3779B185EBCA87h"], [1414, "mov [rbp+var_490], rax"], [1415, "mov rax, [rbp+var_478]"], [1416, "shr rax, 18h"], [1417, "imul rax, [rbp+var_490]"], [1418, "mov rdx, rax"], [1419, "mov eax, 40h "], [1420, "sub eax, [rbp+var_480]"], [1421, "mov ecx, eax"], [1422, "shr rdx, cl"], [1423, "mov rax, rdx"], [1424, "jmp short loc_4030E0"], [1425, "mov rax, [rbp+var_468]"], [1426, "mov rdi, rax"], [1427, "call sub_40122D"], [1428, "mov [rbp+var_494], eax"], [1429, "mov eax, [rbp+var_46C]"], [1430, "mov [rbp+var_498], eax"], [1431, "cmp [rbp+var_498], 3"], [1432, "jnz short loc_4030D0"], [1433, "mov eax, [rbp+var_494]"], [1434, "imul eax, 9E3779B1h"], [1435, "shr eax, 13h"], [1436, "jmp short loc_4030DF"], [1437, "mov eax, [rbp+var_494]"], [1438, "imul eax, 9E3779B1h"], [1439, "shr eax, 14h"], [1440, "nop"], [1441, "mov [rbp+var_49C], eax"], [1442, "mov rax, [rbp+var_58]"], [1443, "mov edx, [rbp+var_49C]"], [1444, "mov [rbp+var_4A0], edx"], [1445, "mov [rbp+var_4A8], rax"], [1446, "mov eax, [rbp+var_84]"], [1447, "mov [rbp+var_4AC], eax"], [1448, "cmp [rbp+var_4AC], 3"], [1449, "jz loc_403197"], [1450, "cmp [rbp+var_4AC], 3"], [1451, "ja loc_4031C0"], [1452, "cmp [rbp+var_4AC], 1"], [1453, "jz short loc_40313A"], [1454, "cmp [rbp+var_4AC], 2"], [1455, "jz short loc_403169"], [1456, "jmp loc_4031C0"], [1457, "mov rax, [rbp+var_4A8]"], [1458, "mov [rbp+var_4B8], rax"], [1459, "mov eax, [rbp+var_4A0]"], [1460, "lea rdx, ds:0[rax*8]"], [1461, "mov rax, [rbp+var_4B8]"], [1462, "add rax, rdx"], [1463, "mov qword ptr [rax], 0"], [1464, "jmp short loc_4031C1"], [1465, "mov rax, [rbp+var_4A8]"], [1466, "mov [rbp+var_4C0], rax"], [1467, "mov eax, [rbp+var_4A0]"], [1468, "lea rdx, ds:0[rax*4]"], [1469, "mov rax, [rbp+var_4C0]"], [1470, "add rax, rdx"], [1471, "mov dword ptr [rax], 0"], [1472, "jmp short loc_4031C1"], [1473, "mov rax, [rbp+var_4A8]"], [1474, "mov [rbp+var_4C8], rax"], [1475, "mov eax, [rbp+var_4A0]"], [1476, "lea rdx, [rax+rax]"], [1477, "mov rax, [rbp+var_4C8]"], [1478, "add rax, rdx"], [1479, "mov word ptr [rax], 0"], [1480, "jmp short loc_4031C1"], [1481, "nop"], [1482, "add [rbp+var_460], 1"], [1483, "mov rax, [rbp+var_360]"], [1484, "cmp rax, [rbp+var_460]"], [1485, "jnb loc_402FB0"], [1486, "jmp short loc_4031E9"], [1487, "mov eax, 0"], [1488, "jmp loc_4041E9"], [1489, "cmp [rbp+var_3E4], 0Eh"], [1490, "jbe loc_4032B7"], [1491, "mov rax, [rbp+var_370]"], [1492, "movzx eax, byte ptr [rax]"], [1493, "lea edx, [rax+0Fh]"], [1494, "mov rax, [rbp+var_370]"], [1495, "mov [rax], dl"], [1496, "sub [rbp+var_3E4], 0Fh"], [1497, "mov rax, [rbp+dest]"], [1498, "mov esi, 0FFFFFFFFh"], [1499, "mov rdi, rax"], [1500, "call sub_40126A"], [1501, "jmp short loc_40324F"], [1502, "add [rbp+dest], 4"], [1503, "mov rax, [rbp+dest]"], [1504, "mov esi, 0FFFFFFFFh"], [1505, "mov rdi, rax"], [1506, "call sub_40126A"], [1507, "sub [rbp+var_3E4], 3FCh"], [1508, "cmp [rbp+var_3E4], 3FBh"], [1509, "ja short loc_403229"], [1510, "mov eax, [rbp+var_3E4]"], [1511, "mov edx, eax"], [1512, "mov eax, 80808081h"], [1513, "imul rax, rdx"], [1514, "shr rax, 20h"], [1515, "shr eax, 7"], [1516, "mov eax, eax"], [1517, "add [rbp+dest], rax"], [1518, "mov ecx, [rbp+var_3E4]"], [1519, "mov edx, ecx"], [1520, "mov eax, 80808081h"], [1521, "imul rax, rdx"], [1522, "shr rax, 20h"], [1523, "mov edx, eax"], [1524, "shr edx, 7"], [1525, "mov eax, edx"], [1526, "shl eax, 8"], [1527, "sub eax, edx"], [1528, "sub ecx, eax"], [1529, "mov edx, ecx"], [1530, "mov rax, [rbp+dest]"], [1531, "lea rcx, [rax+1]"], [1532, "mov [rbp+dest], rcx"], [1533, "mov [rax], dl"], [1534, "jmp short loc_4032D2"], [1535, "mov rax, [rbp+var_370]"], [1536, "movzx eax, byte ptr [rax]"], [1537, "mov edx, [rbp+var_3E4]"], [1538, "add edx, eax"], [1539, "mov rax, [rbp+var_370]"], [1540, "mov [rax], dl"], [1541, "mov rax, [rbp+var_98]"], [1542, "mov [rbp+src], rax"], [1543, "mov rax, [rbp+var_E8]"], [1544, "cmp rax, [rbp+var_98]"], [1545, "jbe loc_40402C"], [1546, "mov rax, [rbp+var_58]"], [1547, "mov rdx, [rbp+var_98]"], [1548, "sub rdx, 2"], [1549, "mov [rbp+var_4D0], rdx"], [1550, "mov [rbp+var_4D8], rax"], [1551, "mov eax, [rbp+var_84]"], [1552, "mov [rbp+var_4DC], eax"], [1553, "mov rax, [rbp+var_A8]"], [1554, "mov [rbp+var_4E8], rax"], [1555, "mov rax, [rbp+var_4D0]"], [1556, "mov [rbp+var_4F0], rax"], [1557, "mov eax, [rbp+var_4DC]"], [1558, "mov [rbp+var_4F4], eax"], [1559, "cmp [rbp+var_4F4], 3"], [1560, "jz loc_403410"], [1561, "mov rax, [rbp+var_4F0]"], [1562, "mov rdi, rax"], [1563, "call sub_40123D"], [1564, "mov [rbp+var_500], rax"], [1565, "mov eax, [rbp+var_4F4]"], [1566, "mov [rbp+var_504], eax"], [1567, "cmp [rbp+var_504], 3"], [1568, "jnz short loc_403384"], [1569, "mov eax, 0Dh"], [1570, "jmp short loc_403389"], [1571, "mov eax, 0Ch"], [1572, "mov [rbp+var_508], eax"], [1573, "call sub_401208"], [1574, "test eax, eax"], [1575, "jz short loc_4033D4"], [1576, "mov rax, 0CF1BBCDCBBh"], [1577, "mov [rbp+var_510], rax"], [1578, "mov rax, [rbp+var_500]"], [1579, "shl rax, 18h"], [1580, "imul rax, [rbp+var_510]"], [1581, "mov rdx, rax"], [1582, "mov eax, 40h "], [1583, "sub eax, [rbp+var_508]"], [1584, "mov ecx, eax"], [1585, "shr rdx, cl"], [1586, "mov rax, rdx"], [1587, "jmp short loc_40340E"], [1588, "mov rax, 9E3779B185EBCA87h"], [1589, "mov [rbp+var_518], rax"], [1590, "mov rax, [rbp+var_500]"], [1591, "shr rax, 18h"], [1592, "imul rax, [rbp+var_518]"], [1593, "mov rdx, rax"], [1594, "mov eax, 40h "], [1595, "sub eax, [rbp+var_508]"], [1596, "mov ecx, eax"], [1597, "shr rdx, cl"], [1598, "mov rax, rdx"], [1599, "jmp short loc_40345B"], [1600, "mov rax, [rbp+var_4F0]"], [1601, "mov rdi, rax"], [1602, "call sub_40122D"], [1603, "mov [rbp+var_51C], eax"], [1604, "mov eax, [rbp+var_4F4]"], [1605, "mov [rbp+var_520], eax"], [1606, "cmp [rbp+var_520], 3"], [1607, "jnz short loc_40344B"], [1608, "mov eax, [rbp+var_51C]"], [1609, "imul eax, 9E3779B1h"], [1610, "shr eax, 13h"], [1611, "jmp short loc_40345A"], [1612, "mov eax, [rbp+var_51C]"], [1613, "imul eax, 9E3779B1h"], [1614, "shr eax, 14h"], [1615, "nop"], [1616, "mov [rbp+var_524], eax"], [1617, "mov rax, [rbp+var_4D0]"], [1618, "mov [rbp+var_530], rax"], [1619, "mov eax, [rbp+var_524]"], [1620, "mov [rbp+var_534], eax"], [1621, "mov rax, [rbp+var_4D8]"], [1622, "mov [rbp+var_540], rax"], [1623, "mov eax, [rbp+var_4DC]"], [1624, "mov [rbp+var_544], eax"], [1625, "mov rax, [rbp+var_4E8]"], [1626, "mov [rbp+var_550], rax"], [1627, "cmp [rbp+var_544], 3"], [1628, "jz loc_40355B"], [1629, "cmp [rbp+var_544], 3"], [1630, "ja loc_403594"], [1631, "cmp [rbp+var_544], 2"], [1632, "jz short loc_403520"], [1633, "cmp [rbp+var_544], 2"], [1634, "ja loc_403594"], [1635, "cmp [rbp+var_544], 0"], [1636, "jz loc_403593"], [1637, "cmp [rbp+var_544], 1"], [1638, "jz short loc_4034EE"], [1639, "jmp loc_403594"], [1640, "mov rax, [rbp+var_540]"], [1641, "mov [rbp+var_558], rax"], [1642, "mov eax, [rbp+var_534]"], [1643, "lea rdx, ds:0[rax*8]"], [1644, "mov rax, [rbp+var_558]"], [1645, "add rdx, rax"], [1646, "mov rax, [rbp+var_530]"], [1647, "mov [rdx], rax"], [1648, "jmp short loc_403594"], [1649, "mov rax, [rbp+var_540]"], [1650, "mov [rbp+var_560], rax"], [1651, "mov rax, [rbp+var_530]"], [1652, "sub rax, [rbp+var_550]"], [1653, "mov rdx, rax"], [1654, "mov eax, [rbp+var_534]"], [1655, "lea rcx, ds:0[rax*4]"], [1656, "mov rax, [rbp+var_560]"], [1657, "add rax, rcx"], [1658, "mov [rax], edx"], [1659, "jmp short loc_403594"], [1660, "mov rax, [rbp+var_540]"], [1661, "mov [rbp+var_568], rax"], [1662, "mov rax, [rbp+var_530]"], [1663, "sub rax, [rbp+var_550]"], [1664, "mov rdx, rax"], [1665, "mov eax, [rbp+var_534]"], [1666, "lea rcx, [rax+rax]"], [1667, "mov rax, [rbp+var_568]"], [1668, "add rax, rcx"], [1669, "mov [rax], dx"], [1670, "jmp short loc_403594"], [1671, "nop"], [1672, "nop"], [1673, "cmp [rbp+var_84], 1"], [1674, "jnz loc_403A3A"], [1675, "mov rax, [rbp+var_58]"], [1676, "mov rdx, [rbp+var_98]"], [1677, "mov [rbp+var_570], rdx"], [1678, "mov [rbp+var_578], rax"], [1679, "mov eax, [rbp+var_84]"], [1680, "mov [rbp+var_57C], eax"], [1681, "mov rax, [rbp+var_A8]"], [1682, "mov [rbp+var_588], rax"], [1683, "mov rax, [rbp+var_570]"], [1684, "mov [rbp+var_590], rax"], [1685, "mov eax, [rbp+var_57C]"], [1686, "mov [rbp+var_594], eax"], [1687, "cmp [rbp+var_594], 3"], [1688, "jz loc_4036BA"], [1689, "mov rax, [rbp+var_590]"], [1690, "mov rdi, rax"], [1691, "call sub_40123D"], [1692, "mov [rbp+var_5A0], rax"], [1693, "mov eax, [rbp+var_594]"], [1694, "mov [rbp+var_5A4], eax"], [1695, "cmp [rbp+var_5A4], 3"], [1696, "jnz short loc_40362E"], [1697, "mov eax, 0Dh"], [1698, "jmp short loc_403633"], [1699, "mov eax, 0Ch"], [1700, "mov [rbp+var_5A8], eax"], [1701, "call sub_401208"], [1702, "test eax, eax"], [1703, "jz short loc_40367E"], [1704, "mov rax, 0CF1BBCDCBBh"], [1705, "mov [rbp+var_5B0], rax"], [1706, "mov rax, [rbp+var_5A0]"], [1707, "shl rax, 18h"], [1708, "imul rax, [rbp+var_5B0]"], [1709, "mov rdx, rax"], [1710, "mov eax, 40h "], [1711, "sub eax, [rbp+var_5A8]"], [1712, "mov ecx, eax"], [1713, "shr rdx, cl"], [1714, "mov rax, rdx"], [1715, "jmp short loc_4036B8"], [1716, "mov rax, 9E3779B185EBCA87h"], [1717, "mov [rbp+var_5B8], rax"], [1718, "mov rax, [rbp+var_5A0]"], [1719, "shr rax, 18h"], [1720, "imul rax, [rbp+var_5B8]"], [1721, "mov rdx, rax"], [1722, "mov eax, 40h "], [1723, "sub eax, [rbp+var_5A8]"], [1724, "mov ecx, eax"], [1725, "shr rdx, cl"], [1726, "mov rax, rdx"], [1727, "jmp short loc_403705"], [1728, "mov rax, [rbp+var_590]"], [1729, "mov rdi, rax"], [1730, "call sub_40122D"], [1731, "mov [rbp+var_5BC], eax"], [1732, "mov eax, [rbp+var_594]"], [1733, "mov [rbp+var_5C0], eax"], [1734, "cmp [rbp+var_5C0], 3"], [1735, "jnz short loc_4036F5"], [1736, "mov eax, [rbp+var_5BC]"], [1737, "imul eax, 9E3779B1h"], [1738, "shr eax, 13h"], [1739, "jmp short loc_403704"], [1740, "mov eax, [rbp+var_5BC]"], [1741, "imul eax, 9E3779B1h"], [1742, "shr eax, 14h"], [1743, "nop"], [1744, "mov [rbp+var_5C4], eax"], [1745, "mov rcx, [rbp+var_588]"], [1746, "mov edx, [rbp+var_57C]"], [1747, "mov rsi, [rbp+var_578]"], [1748, "mov eax, [rbp+var_5C4]"], [1749, "mov edi, eax"], [1750, "call sub_4013B3"], [1751, "mov [rbp+var_218], rax"], [1752, "mov rax, [rbp+var_58]"], [1753, "mov rdx, [rbp+var_98]"], [1754, "mov [rbp+var_5D0], rdx"], [1755, "mov [rbp+var_5D8], rax"], [1756, "mov eax, [rbp+var_84]"], [1757, "mov [rbp+var_5DC], eax"], [1758, "mov rax, [rbp+var_A8]"], [1759, "mov [rbp+var_5E8], rax"], [1760, "mov rax, [rbp+var_5D0]"], [1761, "mov [rbp+var_5F0], rax"], [1762, "mov eax, [rbp+var_5DC]"], [1763, "mov [rbp+var_5F4], eax"], [1764, "cmp [rbp+var_5F4], 3"], [1765, "jz loc_40384B"], [1766, "mov rax, [rbp+var_5F0]"], [1767, "mov rdi, rax"], [1768, "call sub_40123D"], [1769, "mov [rbp+var_600], rax"], [1770, "mov eax, [rbp+var_5F4]"], [1771, "mov [rbp+var_604], eax"], [1772, "cmp [rbp+var_604], 3"], [1773, "jnz short loc_4037BF"], [1774, "mov eax, 0Dh"], [1775, "jmp short loc_4037C4"], [1776, "mov eax, 0Ch"], [1777, "mov [rbp+var_608], eax"], [1778, "call sub_401208"], [1779, "test eax, eax"], [1780, "jz short loc_40380F"], [1781, "mov rax, 0CF1BBCDCBBh"], [1782, "mov [rbp+var_610], rax"], [1783, "mov rax, [rbp+var_600]"], [1784, "shl rax, 18h"], [1785, "imul rax, [rbp+var_610]"], [1786, "mov rdx, rax"], [1787, "mov eax, 40h "], [1788, "sub eax, [rbp+var_608]"], [1789, "mov ecx, eax"], [1790, "shr rdx, cl"], [1791, "mov rax, rdx"], [1792, "jmp short loc_403849"], [1793, "mov rax, 9E3779B185EBCA87h"], [1794, "mov [rbp+var_618], rax"], [1795, "mov rax, [rbp+var_600]"], [1796, "shr rax, 18h"], [1797, "imul rax, [rbp+var_618]"], [1798, "mov rdx, rax"], [1799, "mov eax, 40h "], [1800, "sub eax, [rbp+var_608]"], [1801, "mov ecx, eax"], [1802, "shr rdx, cl"], [1803, "mov rax, rdx"], [1804, "jmp short loc_403896"], [1805, "mov rax, [rbp+var_5F0]"], [1806, "mov rdi, rax"], [1807, "call sub_40122D"], [1808, "mov [rbp+var_61C], eax"], [1809, "mov eax, [rbp+var_5F4]"], [1810, "mov [rbp+var_620], eax"], [1811, "cmp [rbp+var_620], 3"], [1812, "jnz short loc_403886"], [1813, "mov eax, [rbp+var_61C]"], [1814, "imul eax, 9E3779B1h"], [1815, "shr eax, 13h"], [1816, "jmp short loc_403895"], [1817, "mov eax, [rbp+var_61C]"], [1818, "imul eax, 9E3779B1h"], [1819, "shr eax, 14h"], [1820, "nop"], [1821, "mov [rbp+var_624], eax"], [1822, "mov rax, [rbp+var_5D0]"], [1823, "mov [rbp+var_630], rax"], [1824, "mov eax, [rbp+var_624]"], [1825, "mov [rbp+var_634], eax"], [1826, "mov rax, [rbp+var_5D8]"], [1827, "mov [rbp+var_640], rax"], [1828, "mov eax, [rbp+var_5DC]"], [1829, "mov [rbp+var_644], eax"], [1830, "mov rax, [rbp+var_5E8]"], [1831, "mov [rbp+var_650], rax"], [1832, "cmp [rbp+var_644], 3"], [1833, "jz loc_403996"], [1834, "cmp [rbp+var_644], 3"], [1835, "ja loc_4039CF"], [1836, "cmp [rbp+var_644], 2"], [1837, "jz short loc_40395B"], [1838, "cmp [rbp+var_644], 2"], [1839, "ja loc_4039CF"], [1840, "cmp [rbp+var_644], 0"], [1841, "jz loc_4039CE"], [1842, "cmp [rbp+var_644], 1"], [1843, "jz short loc_403929"], [1844, "jmp loc_4039CF"], [1845, "mov rax, [rbp+var_640]"], [1846, "mov [rbp+var_658], rax"], [1847, "mov eax, [rbp+var_634]"], [1848, "lea rdx, ds:0[rax*8]"], [1849, "mov rax, [rbp+var_658]"], [1850, "add rdx, rax"], [1851, "mov rax, [rbp+var_630]"], [1852, "mov [rdx], rax"], [1853, "jmp short loc_4039CF"], [1854, "mov rax, [rbp+var_640]"], [1855, "mov [rbp+var_660], rax"], [1856, "mov rax, [rbp+var_630]"], [1857, "sub rax, [rbp+var_650]"], [1858, "mov rdx, rax"], [1859, "mov eax, [rbp+var_634]"], [1860, "lea rcx, ds:0[rax*4]"], [1861, "mov rax, [rbp+var_660]"], [1862, "add rax, rcx"], [1863, "mov [rax], edx"], [1864, "jmp short loc_4039CF"], [1865, "mov rax, [rbp+var_640]"], [1866, "mov [rbp+var_668], rax"], [1867, "mov rax, [rbp+var_630]"], [1868, "sub rax, [rbp+var_650]"], [1869, "mov rdx, rax"], [1870, "mov eax, [rbp+var_634]"], [1871, "lea rcx, [rax+rax]"], [1872, "mov rax, [rbp+var_668]"], [1873, "add rax, rcx"], [1874, "mov [rax], dx"], [1875, "jmp short loc_4039CF"], [1876, "nop"], [1877, "nop"], [1878, "mov rax, [rbp+var_218]"], [1879, "add rax, 0FFFFh"], [1880, "cmp [rbp+var_98], rax"], [1881, "ja loc_403EE0"], [1882, "mov rax, [rbp+var_218]"], [1883, "mov rdi, rax"], [1884, "call sub_40122D"], [1885, "mov ebx, eax"], [1886, "mov rax, [rbp+var_98]"], [1887, "mov rdi, rax"], [1888, "call sub_40122D"], [1889, "cmp ebx, eax"], [1890, "jnz loc_403EE0"], [1891, "mov rax, [rbp+dest]"], [1892, "lea rdx, [rax+1]"], [1893, "mov [rbp+dest], rdx"], [1894, "mov [rbp+var_370], rax"], [1895, "mov rax, [rbp+var_370]"], [1896, "mov byte ptr [rax], 0"], [1897, "jmp loc_402734"], [1898, "mov rax, [rbp+var_98]"], [1899, "mov [rbp+var_670], rax"], [1900, "mov eax, [rbp+var_84]"], [1901, "mov [rbp+var_674], eax"], [1902, "cmp [rbp+var_674], 3"], [1903, "jz loc_403B1F"], [1904, "mov rax, [rbp+var_670]"], [1905, "mov rdi, rax"], [1906, "call sub_40123D"], [1907, "mov [rbp+var_680], rax"], [1908, "mov eax, [rbp+var_674]"], [1909, "mov [rbp+var_684], eax"], [1910, "cmp [rbp+var_684], 3"], [1911, "jnz short loc_403A93"], [1912, "mov eax, 0Dh"], [1913, "jmp short loc_403A98"], [1914, "mov eax, 0Ch"], [1915, "mov [rbp+var_688], eax"], [1916, "call sub_401208"], [1917, "test eax, eax"], [1918, "jz short loc_403AE3"], [1919, "mov rax, 0CF1BBCDCBBh"], [1920, "mov [rbp+var_690], rax"], [1921, "mov rax, [rbp+var_680]"], [1922, "shl rax, 18h"], [1923, "imul rax, [rbp+var_690]"], [1924, "mov rdx, rax"], [1925, "mov eax, 40h "], [1926, "sub eax, [rbp+var_688]"], [1927, "mov ecx, eax"], [1928, "shr rdx, cl"], [1929, "mov rax, rdx"], [1930, "jmp short loc_403B1D"], [1931, "mov rax, 9E3779B185EBCA87h"], [1932, "mov [rbp+var_698], rax"], [1933, "mov rax, [rbp+var_680]"], [1934, "shr rax, 18h"], [1935, "imul rax, [rbp+var_698]"], [1936, "mov rdx, rax"], [1937, "mov eax, 40h "], [1938, "sub eax, [rbp+var_688]"], [1939, "mov ecx, eax"], [1940, "shr rdx, cl"], [1941, "mov rax, rdx"], [1942, "jmp short loc_403B6A"], [1943, "mov rax, [rbp+var_670]"], [1944, "mov rdi, rax"], [1945, "call sub_40122D"], [1946, "mov [rbp+var_69C], eax"], [1947, "mov eax, [rbp+var_674]"], [1948, "mov [rbp+var_6A0], eax"], [1949, "cmp [rbp+var_6A0], 3"], [1950, "jnz short loc_403B5A"], [1951, "mov eax, [rbp+var_69C]"], [1952, "imul eax, 9E3779B1h"], [1953, "shr eax, 13h"], [1954, "jmp short loc_403B69"], [1955, "mov eax, [rbp+var_69C]"], [1956, "imul eax, 9E3779B1h"], [1957, "shr eax, 14h"], [1958, "nop"], [1959, "mov [rbp+var_6A4], eax"], [1960, "mov rax, [rbp+var_98]"], [1961, "sub rax, [rbp+var_A8]"], [1962, "mov [rbp+var_6A8], eax"], [1963, "mov rax, [rbp+var_58]"], [1964, "mov edx, [rbp+var_6A4]"], [1965, "mov [rbp+var_6AC], edx"], [1966, "mov [rbp+var_6B8], rax"], [1967, "mov eax, [rbp+var_84]"], [1968, "mov [rbp+var_6BC], eax"], [1969, "cmp [rbp+var_6BC], 2"], [1970, "jnz short loc_403BDA"], [1971, "mov rax, [rbp+var_6B8]"], [1972, "mov [rbp+var_6C8], rax"], [1973, "mov eax, [rbp+var_6AC]"], [1974, "lea rdx, ds:0[rax*4]"], [1975, "mov rax, [rbp+var_6C8]"], [1976, "add rax, rdx"], [1977, "mov eax, [rax]"], [1978, "jmp short loc_403C12"], [1979, "cmp [rbp+var_6BC], 3"], [1980, "jnz short loc_403C0D"], [1981, "mov rax, [rbp+var_6B8]"], [1982, "mov [rbp+var_6D0], rax"], [1983, "mov eax, [rbp+var_6AC]"], [1984, "lea rdx, [rax+rax]"], [1985, "mov rax, [rbp+var_6D0]"], [1986, "add rax, rdx"], [1987, "movzx eax, word ptr [rax]"], [1988, "movzx eax, ax"], [1989, "jmp short loc_403C12"], [1990, "mov eax, 0"], [1991, "mov [rbp+var_6D4], eax"], [1992, "cmp [rbp+var_88], 3"], [1993, "jnz loc_403D26"], [1994, "mov eax, [rbp+var_9C]"], [1995, "cmp eax, [rbp+var_6D4]"], [1996, "jbe loc_403D02"], [1997, "mov rax, [rbp+var_B0]"], [1998, "mov edx, [rbp+var_6A4]"], [1999, "mov [rbp+var_6D8], edx"], [2000, "mov [rbp+var_6E0], rax"], [2001, "mov [rbp+var_6E4], 2"], [2002, "cmp [rbp+var_6E4], 2"], [2003, "jnz short loc_403C8E"]], "data_dep": [[10, 4], [12, 10], [14, 13], [15, 9], [16, 15], [18, 17], [18, 9], [19, 18], [21, 7], [22, 21], [24, 8], [24, 23], [25, 24], [27, 26], [27, 7], [28, 27], [29, 14], [30, 29], [31, 5], [32, 31], [33, 6], [34, 33], [35, 7], [36, 35], [38, 9], [38, 20], [38, 17], [39, 38], [40, 36], [41, 40], [42, 41], [45, 36], [46, 45], [47, 34], [48, 47], [51, 30], [52, 51], [53, 32], [54, 53], [55, 34], [56, 55], [57, 36], [58, 57], [59, 37], [60, 59], [66, 39], [67, 66], [68, 54], [69, 68], [70, 52], [71, 70], [72, 71], [73, 72], [74, 73], [75, 74], [76, 54], [77, 75], [77, 76], [78, 77], [79, 52], [80, 79], [81, 80], [82, 64], [83, 82], [84, 81], [85, 84], [87, 52], [88, 87], [89, 88], [89, 85], [90, 64], [91, 90], [92, 81], [93, 92], [95, 52], [96, 95], [97, 93], [97, 96], [98, 64], [99, 98], [100, 81], [101, 100], [102, 72], [103, 102], [103, 101], [106, 103], [106, 105], [107, 64], [108, 107], [109, 64], [110, 109], [114, 111], [114, 113], [115, 72], [116, 97], [116, 115], [117, 116], [118, 89], [119, 118], [120, 97], [121, 89], [122, 121], [122, 120], [124, 89], [125, 124], [125, 122], [126, 54], [127, 126], [128, 58], [129, 128], [130, 69], [131, 129], [131, 130], [132, 131], [133, 132], [134, 133], [135, 134], [136, 132], [137, 136], [138, 137], [139, 89], [140, 139], [141, 64], [142, 141], [143, 97], [144, 81], [145, 144], [146, 145], [147, 146], [147, 143], [148, 89], [149, 147], [149, 148], [151, 97], [152, 72], [153, 152], [153, 151], [154, 153], [155, 89], [156, 155], [156, 154], [159, 156], [159, 158], [159, 149], [160, 56], [161, 160], [162, 61], [163, 162], [164, 161], [165, 164], [165, 163], [166, 165], [168, 62], [169, 168], [170, 61], [171, 170], [174, 63], [175, 174], [177, 58], [177, 176], [178, 177], [181, 64], [182, 181], [183, 97], [184, 183], [185, 184], [188, 54], [189, 188], [189, 185], [189, 187], [190, 189], [191, 64], [192, 191], [193, 52], [194, 193], [195, 58], [196, 52], [197, 195], [197, 196], [199, 52], [200, 199], [201, 58], [202, 201], [202, 200], [203, 52], [204, 202], [204, 203], [205, 52], [206, 197], [206, 210], [206, 213], [206, 204], [206, 194], [206, 205], [207, 58], [208, 206], [208, 207], [209, 52], [210, 209], [210, 208], [211, 52], [212, 63], [213, 211], [213, 212], [215, 58], [215, 214], [216, 215], [217, 52], [218, 69], [219, 218], [220, 217], [221, 63], [222, 221], [223, 78], [224, 223], [225, 219], [226, 225], [227, 222], [228, 227], [229, 228], [230, 229], [231, 226], [232, 231], [234, 233], [235, 228], [236, 235], [237, 236], [238, 237], [242, 241], [242, 239], [244, 243], [245, 244], [247, 246], [248, 234], [249, 248], [250, 247], [250, 249], [251, 250], [253, 252], [253, 242], [254, 253], [255, 251], [255, 254], [256, 255], [259, 258], [260, 234], [261, 260], [262, 259], [262, 261], [263, 262], [265, 242], [265, 264], [266, 265], [267, 263], [267, 266], [268, 267], [270, 226], [271, 270], [273, 272], [274, 228], [275, 274], [276, 275], [277, 276], [278, 273], [279, 278], [280, 279], [282, 273], [283, 282], [284, 283], [286, 256], [286, 268], [286, 280], [286, 284], [287, 219], [288, 287], [289, 286], [290, 289], [291, 220], [292, 291], [293, 222], [294, 293], [295, 224], [296, 295], [297, 294], [298, 297], [299, 294], [300, 299], [301, 294], [302, 301], [303, 294], [304, 303], [305, 294], [306, 305], [307, 294], [308, 307], [310, 292], [311, 310], [312, 290], [313, 218], [313, 255], [313, 267], [314, 311], [315, 313], [315, 314], [316, 288], [317, 316], [317, 315], [319, 292], [320, 319], [321, 288], [322, 321], [322, 296], [323, 322], [324, 290], [325, 154], [325, 254], [325, 266], [326, 320], [327, 326], [327, 325], [328, 323], [328, 327], [330, 292], [331, 330], [332, 288], [333, 296], [333, 332], [334, 333], [335, 290], [336, 339], [336, 197], [336, 210], [336, 154], [336, 254], [336, 335], [336, 266], [336, 213], [336, 204], [336, 194], [337, 331], [338, 336], [338, 337], [339, 334], [339, 338], [343, 69], [344, 343], [345, 344], [346, 63], [347, 346], [348, 347], [349, 348], [350, 345], [351, 350], [353, 352], [354, 347], [355, 354], [356, 355], [357, 356], [361, 358], [361, 360], [363, 362], [364, 363], [366, 365], [367, 353], [368, 367], [369, 366], [369, 368], [370, 369], [372, 371], [372, 361], [373, 372], [374, 370], [374, 373], [375, 374], [378, 377], [379, 353], [380, 379], [381, 378], [381, 380], [382, 381], [384, 361], [384, 383], [385, 384], [386, 385], [386, 382], [387, 386], [389, 345], [390, 389], [392, 391], [393, 347], [394, 393], [395, 394], [396, 395], [397, 392], [398, 397], [399, 398], [401, 392], [402, 401], [403, 402], [405, 387], [405, 399], [405, 403], [405, 375], [406, 63], [407, 406], [408, 343], [409, 408], [412, 67], [413, 411], [414, 413], [414, 412], [415, 414], [416, 504], [416, 405], [417, 416], [418, 409], [418, 422], [419, 418], [420, 429], [420, 410], [422, 420], [422, 409], [422, 422], [423, 425], [423, 415], [424, 551], [424, 508], [424, 210], [424, 540], [424, 411], [424, 532], [424, 545], [424, 204], [424, 423], [424, 534], [424, 213], [424, 556], [424, 339], [424, 194], [424, 328], [424, 197], [424, 317], [425, 424], [427, 426], [428, 423], [428, 427], [429, 428], [430, 135], [431, 430], [431, 422], [432, 431], [432, 430], [433, 432], [434, 433], [435, 434], [436, 52], [437, 78], [438, 63], [439, 417], [440, 439], [442, 441], [443, 422], [444, 443], [445, 63], [446, 445], [447, 446], [448, 447], [449, 444], [450, 449], [452, 451], [453, 446], [454, 453], [455, 454], [456, 455], [460, 457], [460, 459], [462, 461], [463, 462], [465, 464], [466, 452], [467, 466], [468, 465], [468, 467], [469, 468], [471, 470], [471, 460], [472, 471], [473, 469], [473, 472], [474, 473], [477, 476], [478, 452], [479, 478], [480, 477], [480, 479], [481, 480], [483, 460], [483, 482], [484, 483], [485, 481], [485, 484], [486, 485], [488, 444], [489, 488], [491, 490], [492, 446], [493, 492], [494, 493], [495, 494], [496, 491], [497, 496], [498, 497], [500, 491], [501, 500], [502, 501], [504, 486], [504, 498], [504, 502], [504, 474], [505, 52], [506, 419], [507, 506], [508, 417], [509, 508], [510, 505], [511, 63], [512, 511], [513, 78], [514, 513], [515, 512], [516, 515], [517, 512], [518, 517], [519, 512], [520, 519], [521, 512], [522, 521], [523, 512], [524, 523], [525, 512], [526, 525], [527, 510], [528, 527], [529, 509], [530, 508], [531, 528], [532, 531], [532, 530], [533, 507], [534, 533], [534, 532], [536, 510], [537, 536], [538, 507], [539, 514], [539, 538], [540, 539], [541, 509], [542, 437], [542, 472], [542, 484], [543, 537], [544, 542], [544, 543], [545, 540], [545, 544], [547, 510], [548, 547], [549, 507], [550, 514], [550, 549], [551, 550], [552, 509], [553, 194], [553, 534], [553, 317], [553, 339], [553, 472], [553, 328], [553, 197], [553, 210], [553, 484], [553, 552], [553, 213], [553, 556], [553, 545], [553, 437], [553, 204], [554, 548], [555, 554], [555, 553], [556, 555], [556, 551], [559, 442], [560, 559], [561, 560], [561, 419], [562, 561], [563, 442], [564, 563], [566, 565], [567, 419], [568, 567], [570, 566], [570, 569], [571, 570], [573, 343], [574, 573], [577, 67], [578, 576], [579, 577], [579, 578], [580, 579], [581, 766], [581, 405], [582, 581], [583, 574], [583, 619], [584, 78], [584, 583], [585, 584], [586, 52], [587, 582], [588, 587], [589, 586], [590, 63], [591, 590], [592, 591], [593, 592], [594, 589], [595, 594], [596, 588], [597, 587], [598, 595], [599, 597], [599, 598], [600, 787], [600, 204], [600, 194], [600, 328], [600, 317], [600, 339], [600, 197], [600, 210], [600, 796], [600, 213], [600, 599], [602, 591], [603, 602], [604, 589], [605, 604], [606, 588], [607, 606], [607, 197], [607, 210], [607, 587], [607, 796], [607, 213], [607, 787], [607, 204], [607, 194], [607, 328], [607, 317], [607, 339], [608, 605], [609, 607], [609, 608], [610, 194], [610, 317], [610, 339], [610, 328], [610, 197], [610, 796], [610, 210], [610, 609], [610, 213], [610, 787], [610, 204], [611, 610], [614, 600], [614, 613], [614, 611], [615, 574], [615, 619], [616, 615], [617, 626], [617, 575], [619, 617], [619, 574], [619, 619], [620, 622], [620, 580], [621, 197], [621, 210], [621, 607], [621, 620], [621, 597], [621, 587], [621, 796], [621, 213], [621, 787], [621, 204], [621, 194], [621, 328], [621, 317], [621, 339], [622, 621], [624, 623], [625, 624], [625, 620], [626, 625], [627, 135], [628, 627], [628, 619], [629, 627], [629, 628], [630, 629], [631, 630], [632, 631], [633, 64], [634, 633], [635, 72], [636, 614], [636, 635], [637, 636], [638, 81], [639, 582], [640, 639], [641, 638], [643, 642], [644, 643], [645, 641], [646, 645], [647, 640], [648, 639], [649, 646], [650, 648], [650, 649], [651, 197], [651, 210], [651, 796], [651, 213], [651, 787], [651, 204], [651, 194], [651, 328], [651, 317], [651, 650], [651, 339], [653, 642], [654, 653], [655, 641], [656, 655], [657, 640], [658, 796], [658, 213], [658, 657], [658, 787], [658, 204], [658, 194], [658, 328], [658, 317], [658, 339], [658, 639], [658, 197], [658, 210], [659, 656], [660, 658], [660, 659], [661, 787], [661, 796], [661, 213], [661, 204], [661, 194], [661, 328], [661, 317], [661, 660], [661, 339], [661, 197], [661, 210], [662, 661], [665, 662], [665, 651], [665, 664], [666, 665], [667, 159], [668, 667], [668, 666], [669, 668], [670, 106], [671, 670], [671, 665], [672, 89], [673, 672], [675, 614], [676, 78], [677, 676], [677, 675], [678, 677], [679, 54], [680, 679], [682, 64], [683, 682], [684, 72], [685, 614], [685, 684], [686, 685], [687, 614], [688, 159], [689, 688], [689, 687], [690, 689], [691, 89], [692, 691], [694, 614], [695, 78], [696, 695], [696, 694], [697, 696], [698, 54], [699, 698], [701, 614], [702, 78], [703, 702], [703, 701], [704, 703], [705, 619], [706, 705], [707, 63], [708, 707], [709, 708], [710, 709], [711, 706], [712, 711], [714, 713], [715, 708], [716, 715], [717, 716], [718, 717], [722, 719], [722, 721], [724, 723], [725, 724], [727, 726], [728, 714], [729, 728], [730, 727], [730, 729], [731, 730], [733, 722], [733, 732], [734, 733], [735, 731], [735, 734], [736, 735], [739, 738], [740, 714], [741, 740], [742, 741], [742, 739], [743, 742], [745, 722], [745, 744], [746, 745], [747, 743], [747, 746], [748, 747], [750, 706], [751, 750], [753, 752], [754, 708], [755, 754], [756, 755], [757, 756], [758, 753], [759, 758], [760, 759], [762, 753], [763, 762], [764, 763], [766, 748], [766, 760], [766, 736], [766, 764], [767, 52], [768, 585], [769, 768], [770, 582], [771, 770], [772, 767], [773, 63], [774, 773], [775, 774], [776, 775], [777, 774], [778, 777], [780, 772], [781, 780], [782, 771], [783, 770], [784, 781], [785, 784], [785, 783], [786, 769], [787, 786], [787, 785], [789, 772], [790, 789], [791, 771], [792, 796], [792, 210], [792, 213], [792, 787], [792, 204], [792, 194], [792, 317], [792, 791], [792, 339], [792, 770], [792, 328], [792, 197], [793, 790], [794, 792], [794, 793], [795, 769], [796, 794], [796, 795], [798, 65], [799, 798], [800, 117], [801, 671], [801, 614], [801, 800], [802, 801], [803, 63], [804, 803], [805, 614], [805, 671], [806, 805], [807, 585], [807, 806], [808, 807], [809, 690], [809, 669], [809, 704], [809, 697], [809, 678], [810, 809], [812, 811], [813, 616], [814, 813], [816, 812], [816, 815], [817, 816], [818, 114], [819, 818], [820, 585], [821, 820], [821, 614], [821, 671], [822, 821], [829, 616], [829, 419], [830, 829], [832, 832], [832, 616], [832, 419], [833, 704], [833, 442], [833, 697], [833, 678], [833, 690], [833, 833], [833, 669], [834, 616], [834, 419], [834, 832], [835, 127], [835, 834], [836, 770], [836, 835], [836, 540], [836, 795], [836, 532], [836, 508], [836, 785], [836, 845], [836, 551], [837, 669], [837, 704], [837, 442], [837, 697], [837, 833], [837, 678], [837, 690], [838, 190], [838, 699], [838, 680], [838, 692], [838, 837], [838, 673], [839, 838], [839, 837], [840, 836], [840, 839], [841, 840], [842, 841], [843, 832], [843, 616], [843, 419], [844, 843], [845, 194], [845, 534], [845, 844], [845, 317], [845, 339], [845, 328], [845, 197], [845, 210], [845, 796], [845, 213], [845, 556], [845, 545], [845, 787], [845, 204], [846, 833], [846, 678], [846, 690], [846, 669], [846, 704], [846, 442], [846, 697], [847, 846], [848, 339], [848, 328], [848, 197], [848, 847], [848, 796], [848, 210], [848, 213], [848, 556], [848, 545], [848, 787], [848, 204], [848, 194], [848, 534], [848, 317], [849, 845], [849, 848], [850, 848], [850, 849], [851, 850], [852, 851], [853, 852], [854, 832], [854, 616], [854, 419], [855, 854], [855, 127], [856, 855], [857, 161], [858, 796], [858, 213], [858, 556], [858, 545], [858, 787], [858, 204], [858, 194], [858, 845], [858, 534], [858, 857], [858, 317], [858, 339], [858, 836], [858, 328], [858, 197], [858, 210], [859, 858], [860, 857], [861, 62], [862, 861], [863, 856], [864, 856], [865, 864], [867, 866], [867, 865], [868, 867], [869, 868], [870, 869], [871, 863], [871, 870], [872, 796], [872, 213], [872, 556], [872, 863], [872, 545], [872, 787], [872, 204], [872, 194], [872, 534], [872, 317], [872, 339], [872, 328], [872, 197], [872, 871], [872, 210], [873, 859], [874, 872], [874, 873], [875, 166], [875, 874], [876, 875], [876, 874], [877, 876], [878, 877], [879, 878], [882, 62], [883, 882], [884, 856], [885, 884], [886, 885], [888, 886], [888, 887], [889, 888], [890, 889], [891, 890], [892, 856], [893, 892], [893, 891], [894, 213], [894, 556], [894, 545], [894, 787], [894, 204], [894, 194], [894, 328], [894, 534], [894, 317], [894, 339], [894, 891], [894, 197], [894, 210], [894, 893], [894, 796], [895, 859], [896, 894], [896, 895], [897, 166], [897, 896], [898, 897], [898, 896], [899, 898], [900, 899], [901, 900], [902, 859], [904, 856], [905, 904], [906, 856], [907, 906], [908, 907], [909, 860], [910, 909], [912, 859], [912, 914], [913, 213], [913, 556], [913, 545], [913, 787], [913, 204], [913, 194], [913, 328], [913, 910], [913, 913], [913, 317], [913, 912], [913, 915], [913, 339], [913, 858], [913, 894], [913, 197], [913, 210], [913, 872], [913, 796], [913, 534], [914, 913], [915, 912], [916, 916], [916, 908], [917, 916], [917, 908], [918, 917], [919, 859], [919, 914], [920, 913], [920, 317], [920, 915], [920, 339], [920, 894], [920, 197], [920, 210], [920, 787], [920, 872], [920, 796], [920, 534], [920, 910], [920, 213], [920, 556], [920, 919], [920, 545], [920, 204], [920, 194], [920, 328], [920, 858], [920, 923], [921, 920], [922, 916], [922, 908], [923, 919], [923, 922], [925, 856], [926, 925], [927, 926], [928, 860], [929, 927], [929, 928], [930, 856], [931, 859], [931, 921], [932, 931], [932, 930], [933, 859], [933, 921], [934, 933], [935, 127], [936, 935], [937, 932], [938, 934], [939, 938], [940, 936], [941, 940], [942, 937], [943, 942], [944, 949], [944, 941], [945, 556], [945, 545], [945, 944], [945, 204], [945, 194], [945, 328], [945, 910], [945, 923], [945, 317], [945, 915], [945, 339], [945, 947], [945, 197], [945, 210], [945, 929], [945, 787], [945, 796], [945, 534], [945, 213], [946, 948], [946, 939], [947, 945], [947, 946], [948, 939], [948, 948], [949, 949], [949, 941], [950, 943], [951, 948], [951, 950], [952, 951], [954, 856], [955, 954], [955, 921], [955, 859], [956, 62], [957, 956], [958, 955], [958, 1893], [959, 958], [960, 959], [960, 166], [961, 960], [962, 1894], [962, 860], [963, 962], [965, 114], [966, 965], [967, 822], [967, 167], [968, 967], [969, 955], [969, 1893], [970, 968], [971, 969], [973, 955], [973, 1893], [975, 1110], [975, 1222], [975, 1333], [975, 616], [975, 1368], [975, 419], [975, 832], [976, 678], [976, 975], [976, 690], [976, 833], [976, 669], [976, 1751], [976, 704], [976, 442], [976, 697], [977, 976], [978, 955], [978, 1893], [979, 977], [980, 978], [982, 955], [982, 1893], [983, 64], [984, 983], [985, 64], [986, 985], [987, 89], [988, 190], [988, 699], [988, 987], [988, 692], [988, 680], [988, 673], [989, 988], [990, 125], [991, 442], [991, 697], [991, 678], [991, 690], [991, 833], [991, 990], [991, 669], [991, 1751], [991, 704], [992, 991], [993, 832], [993, 1110], [993, 1222], [993, 1333], [993, 616], [993, 1368], [993, 419], [994, 992], [994, 993], [995, 994], [996, 138], [997, 996], [997, 995], [998, 997], [999, 138], [1000, 999], [1001, 442], [1001, 697], [1001, 678], [1001, 690], [1001, 833], [1001, 669], [1001, 1751], [1001, 704], [1002, 1001], [1003, 616], [1003, 1110], [1003, 419], [1003, 1333], [1003, 1368], [1003, 832], [1003, 1222], [1004, 1003], [1005, 1004], [1006, 1002], [1007, 995], [1007, 1000], [1008, 1007], [1009, 1005], [1010, 1009], [1011, 1008], [1012, 1011], [1013, 1005], [1013, 1012], [1014, 1012], [1014, 1013], [1015, 1014], [1016, 1015], [1017, 1016], [1018, 1006], [1019, 1018], [1021, 1020], [1022, 1005], [1023, 1022], [1025, 1021], [1025, 1024], [1026, 1025], [1027, 1026], [1028, 1027], [1029, 1005], [1030, 1006], [1032, 1026], [1033, 1032], [1036, 1048], [1036, 1006], [1036, 1030], [1037, 1036], [1039, 1038], [1040, 1029], [1040, 1047], [1040, 1005], [1041, 1040], [1043, 1039], [1043, 1042], [1044, 1043], [1045, 1044], [1046, 1045], [1047, 1047], [1047, 1005], [1047, 1029], [1048, 1030], [1048, 1048], [1048, 1006], [1050, 1044], [1051, 1050], [1053, 1052], [1054, 1005], [1054, 1029], [1054, 1053], [1054, 1047], [1055, 1054], [1056, 1010], [1056, 1055], [1058, 1008], [1059, 1058], [1060, 1029], [1060, 1047], [1060, 1059], [1060, 1005], [1061, 1059], [1061, 1060], [1062, 1061], [1063, 1062], [1064, 1063], [1065, 1008], [1066, 1065], [1067, 1066], [1067, 1047], [1067, 1005], [1067, 1029], [1068, 1067], [1069, 1048], [1069, 1030], [1069, 1006], [1070, 1069], [1072, 1071], [1073, 1029], [1073, 1047], [1073, 1005], [1074, 1073], [1076, 1072], [1076, 1075], [1077, 1076], [1078, 1047], [1078, 1005], [1078, 1029], [1079, 1048], [1079, 1030], [1079, 1006], [1080, 1008], [1081, 1080], [1082, 1081], [1082, 1005], [1082, 1029], [1082, 1078], [1082, 1047], [1083, 1082], [1084, 1048], [1084, 1006], [1084, 1030], [1084, 1079], [1085, 1084], [1087, 1086], [1088, 1005], [1088, 1029], [1088, 1078], [1088, 1047], [1089, 1088], [1091, 1087], [1091, 1090], [1092, 1091], [1093, 1029], [1093, 1078], [1093, 1047], [1093, 1005], [1094, 1030], [1094, 1079], [1094, 1048], [1094, 1006], [1095, 1008], [1096, 1078], [1096, 1047], [1096, 1005], [1096, 1093], [1096, 1095], [1096, 1029], [1097, 1096], [1098, 1048], [1098, 1006], [1098, 1094], [1098, 1030], [1098, 1079], [1099, 339], [1099, 1098], [1099, 947], [1099, 328], [1099, 197], [1099, 210], [1099, 1852], [1099, 1874], [1099, 915], [1099, 1533], [1099, 1896], [1099, 1863], [1099, 796], [1099, 1669], [1099, 213], [1099, 1479], [1099, 929], [1099, 556], [1099, 1658], [1099, 1471], [1099, 545], [1099, 787], [1099, 1647], [1099, 204], [1099, 194], [1099, 534], [1099, 1463], [1099, 910], [1099, 923], [1099, 1495], [1099, 317], [1099, 1540], [1100, 1078], [1100, 1047], [1100, 1005], [1100, 1093], [1100, 1029], [1101, 915], [1101, 1533], [1101, 1896], [1101, 1863], [1101, 796], [1101, 210], [1101, 213], [1101, 1479], [1101, 929], [1101, 1658], [1101, 1471], [1101, 545], [1101, 787], [1101, 1647], [1101, 204], [1101, 194], [1101, 534], [1101, 910], [1101, 1669], [1101, 556], [1101, 1495], [1101, 317], [1101, 1540], [1101, 339], [1101, 947], [1101, 328], [1101, 197], [1101, 1100], [1101, 1463], [1101, 923], [1101, 1852], [1101, 1874], [1102, 1099], [1102, 1101], [1103, 1102], [1104, 1005], [1104, 1093], [1104, 1029], [1104, 1078], [1104, 1047], [1105, 1047], [1105, 1104], [1105, 1005], [1105, 1093], [1105, 1029], [1105, 1078], [1106, 1105], [1106, 1010], [1107, 1106], [1107, 1056], [1107, 1034], [1108, 1107], [1109, 1108], [1110, 1222], [1110, 616], [1110, 1110], [1110, 419], [1110, 1333], [1110, 1368], [1110, 832], [1110, 1109], [1111, 1000], [1111, 995], [1112, 1110], [1112, 1111], [1113, 1112], [1114, 1000], [1114, 995], [1115, 1114], [1116, 54], [1117, 1116], [1118, 138], [1119, 1118], [1120, 1115], [1121, 1120], [1122, 1119], [1123, 1122], [1124, 1123], [1124, 1115], [1125, 1123], [1125, 1124], [1126, 1125], [1127, 1126], [1128, 1127], [1129, 1117], [1130, 1129], [1132, 1131], [1133, 1115], [1134, 1133], [1136, 1132], [1136, 1135], [1137, 1136], [1138, 1137], [1139, 1138], [1140, 1115], [1141, 1117], [1143, 1137], [1144, 1143], [1147, 1117], [1147, 1159], [1147, 1141], [1148, 1147], [1150, 1149], [1151, 1158], [1151, 1115], [1151, 1140], [1152, 1151], [1154, 1150], [1154, 1153], [1155, 1154], [1156, 1155], [1157, 1156], [1158, 1140], [1158, 1158], [1158, 1115], [1159, 1159], [1159, 1141], [1159, 1117], [1161, 1155], [1162, 1161], [1164, 1163], [1165, 1158], [1165, 1115], [1165, 1140], [1165, 1164], [1166, 1165], [1167, 1121], [1167, 1166], [1169, 1119], [1170, 1169], [1171, 1158], [1171, 1115], [1171, 1170], [1171, 1140], [1172, 1171], [1172, 1170], [1173, 1172], [1174, 1173], [1175, 1174], [1176, 1119], [1177, 1176], [1178, 1140], [1178, 1177], [1178, 1158], [1178, 1115], [1179, 1178], [1180, 1117], [1180, 1159], [1180, 1141], [1181, 1180], [1183, 1182], [1184, 1158], [1184, 1115], [1184, 1140], [1185, 1184], [1187, 1183], [1187, 1186], [1188, 1187], [1189, 1140], [1189, 1158], [1189, 1115], [1190, 1117], [1190, 1159], [1190, 1141], [1191, 1119], [1192, 1191], [1193, 1189], [1193, 1158], [1193, 1115], [1193, 1192], [1193, 1140], [1194, 1193], [1195, 1117], [1195, 1141], [1195, 1190], [1195, 1159], [1196, 1195], [1198, 1197], [1199, 1189], [1199, 1158], [1199, 1115], [1199, 1140], [1200, 1199], [1202, 1201], [1202, 1198], [1203, 1202], [1204, 1158], [1204, 1115], [1204, 1140], [1204, 1189], [1205, 1141], [1205, 1190], [1205, 1117], [1205, 1159], [1206, 1119], [1207, 1189], [1207, 1158], [1207, 1115], [1207, 1204], [1207, 1206], [1207, 1140], [1208, 1207], [1209, 1117], [1209, 1205], [1209, 1141], [1209, 1190], [1209, 1159], [1210, 194], [1210, 328], [1210, 1463], [1210, 910], [1210, 923], [1210, 1495], [1210, 317], [1210, 1540], [1210, 339], [1210, 1896], [1210, 947], [1210, 1863], [1210, 197], [1210, 210], [1210, 1852], [1210, 1479], [1210, 1874], [1210, 915], [1210, 1533], [1210, 796], [1210, 534], [1210, 1669], [1210, 213], [1210, 929], [1210, 556], [1210, 1658], [1210, 1471], [1210, 545], [1210, 787], [1210, 1209], [1210, 1647], [1210, 204], [1211, 1140], [1211, 1189], [1211, 1158], [1211, 1115], [1211, 1204], [1212, 1495], [1212, 317], [1212, 1540], [1212, 339], [1212, 1896], [1212, 947], [1212, 1863], [1212, 197], [1212, 210], [1212, 1211], [1212, 1852], [1212, 1479], [1212, 1874], [1212, 915], [1212, 1533], [1212, 1647], [1212, 796], [1212, 534], [1212, 1669], [1212, 213], [1212, 929], [1212, 556], [1212, 1658], [1212, 1471], [1212, 545], [1212, 787], [1212, 204], [1212, 194], [1212, 328], [1212, 1463], [1212, 910], [1212, 923], [1213, 1210], [1213, 1212], [1214, 1213], [1215, 1189], [1215, 1158], [1215, 1115], [1215, 1204], [1215, 1140], [1216, 1189], [1216, 1204], [1216, 1158], [1216, 1115], [1216, 1140], [1216, 1215], [1217, 1216], [1217, 1121], [1218, 1217], [1218, 1145], [1218, 1167], [1219, 1218], [1220, 1219], [1220, 1107], [1221, 1218], [1222, 1110], [1222, 1221], [1224, 678], [1224, 690], [1224, 669], [1224, 1751], [1224, 704], [1224, 442], [1224, 697], [1224, 833], [1225, 1224], [1226, 1222], [1226, 1333], [1226, 616], [1226, 1368], [1226, 419], [1226, 832], [1226, 1110], [1227, 1226], [1228, 1227], [1229, 1225], [1230, 138], [1231, 1230], [1232, 1228], [1233, 1232], [1234, 1231], [1235, 1234], [1236, 1228], [1236, 1235], [1237, 1235], [1237, 1236], [1238, 1237], [1239, 1238], [1240, 1239], [1241, 1229], [1242, 1241], [1244, 1243], [1245, 1228], [1246, 1245], [1248, 1244], [1248, 1247], [1249, 1248], [1250, 1249], [1251, 1250], [1252, 1228], [1253, 1229], [1255, 1249], [1256, 1255], [1259, 1253], [1259, 1271], [1259, 1229], [1260, 1259], [1262, 1261], [1263, 1252], [1263, 1270], [1263, 1228], [1264, 1263], [1266, 1262], [1266, 1265], [1267, 1266], [1268, 1267], [1269, 1268], [1270, 1228], [1270, 1270], [1270, 1252], [1271, 1229], [1271, 1253], [1271, 1271], [1273, 1267], [1274, 1273], [1276, 1275], [1277, 1252], [1277, 1276], [1277, 1270], [1277, 1228], [1278, 1277], [1279, 1233], [1279, 1278], [1281, 1231], [1282, 1281], [1283, 1270], [1283, 1282], [1283, 1228], [1283, 1252], [1284, 1282], [1284, 1283], [1285, 1284], [1286, 1285], [1287, 1286], [1288, 1231], [1289, 1288], [1290, 1289], [1290, 1228], [1290, 1270], [1290, 1252], [1291, 1290], [1292, 1271], [1292, 1253], [1292, 1229], [1293, 1292], [1295, 1294], [1296, 1252], [1296, 1270], [1296, 1228], [1297, 1296], [1299, 1298], [1299, 1295], [1300, 1299], [1301, 1270], [1301, 1228], [1301, 1252], [1302, 1271], [1302, 1229], [1302, 1253], [1303, 1231], [1304, 1303], [1305, 1304], [1305, 1228], [1305, 1252], [1305, 1301], [1305, 1270], [1306, 1305], [1307, 1229], [1307, 1253], [1307, 1302], [1307, 1271], [1308, 1307], [1310, 1309], [1311, 1252], [1311, 1301], [1311, 1270], [1311, 1228], [1312, 1311], [1314, 1313], [1314, 1310], [1315, 1314], [1316, 1228], [1316, 1270], [1316, 1252], [1316, 1301], [1317, 1302], [1317, 1271], [1317, 1253], [1317, 1229], [1318, 1231], [1319, 1228], [1319, 1316], [1319, 1318], [1319, 1252], [1319, 1301], [1319, 1270], [1320, 1319], [1321, 1317], [1321, 1271], [1321, 1253], [1321, 1229], [1321, 1302], [1322, 929], [1322, 1658], [1322, 1471], [1322, 545], [1322, 787], [1322, 1647], [1322, 204], [1322, 534], [1322, 910], [1322, 1669], [1322, 556], [1322, 1495], [1322, 1540], [1322, 339], [1322, 194], [1322, 328], [1322, 197], [1322, 1463], [1322, 923], [1322, 1852], [1322, 317], [1322, 1874], [1322, 1321], [1322, 915], [1322, 1533], [1322, 1896], [1322, 947], [1322, 1863], [1322, 796], [1322, 210], [1322, 213], [1322, 1479], [1323, 1252], [1323, 1301], [1323, 1270], [1323, 1228], [1323, 1316], [1324, 556], [1324, 1495], [1324, 1658], [1324, 1540], [1324, 1471], [1324, 339], [1324, 194], [1324, 328], [1324, 197], [1324, 1463], [1324, 923], [1324, 317], [1324, 1874], [1324, 915], [1324, 1533], [1324, 1896], [1324, 947], [1324, 1863], [1324, 1323], [1324, 796], [1324, 210], [1324, 1852], [1324, 1479], [1324, 929], [1324, 545], [1324, 787], [1324, 1647], [1324, 204], [1324, 534], [1324, 910], [1324, 1669], [1324, 213], [1325, 1322], [1325, 1324], [1326, 1325], [1327, 1252], [1327, 1301], [1327, 1270], [1327, 1228], [1327, 1316], [1328, 1301], [1328, 1270], [1328, 1327], [1328, 1228], [1328, 1316], [1328, 1252], [1329, 1233], [1329, 1328], [1330, 1279], [1330, 1257], [1330, 1329], [1331, 1330], [1332, 1331], [1333, 1333], [1333, 1368], [1333, 832], [1333, 1222], [1333, 616], [1333, 1110], [1333, 1332], [1333, 419], [1336, 62], [1337, 1336], [1338, 1107], [1338, 1220], [1338, 1330], [1339, 1338], [1340, 1339], [1342, 1340], [1342, 1341], [1343, 1342], [1344, 1343], [1345, 1344], [1346, 1495], [1346, 317], [1346, 1540], [1346, 339], [1346, 947], [1346, 328], [1346, 197], [1346, 1463], [1346, 923], [1346, 1345], [1346, 1852], [1346, 1874], [1346, 915], [1346, 1533], [1346, 1896], [1346, 1863], [1346, 796], [1346, 210], [1346, 213], [1346, 1479], [1346, 929], [1346, 556], [1346, 1658], [1346, 1471], [1346, 545], [1346, 1340], [1346, 787], [1346, 1647], [1346, 204], [1346, 194], [1346, 534], [1346, 910], [1346, 1669], [1347, 982], [1347, 973], [1348, 1346], [1348, 1347], [1349, 166], [1349, 1348], [1350, 1348], [1350, 1349], [1351, 1350], [1352, 1351], [1353, 1352], [1354, 62], [1355, 1354], [1356, 166], [1357, 1356], [1357, 982], [1357, 973], [1358, 1357], [1359, 1358], [1360, 1359], [1361, 1358], [1361, 1360], [1362, 1361], [1363, 1362], [1364, 1107], [1364, 1220], [1364, 1330], [1365, 1364], [1365, 1363], [1366, 1365], [1367, 1366], [1368, 1222], [1368, 1110], [1368, 1367], [1368, 1333], [1369, 1363], [1370, 1369], [1371, 830], [1372, 1368], [1372, 1371], [1373, 1372], [1373, 1371], [1374, 1373], [1375, 1374], [1376, 1375], [1377, 1368], [1378, 1377], [1380, 1378], [1380, 1482], [1381, 1380], [1382, 63], [1383, 1382], [1384, 1383], [1385, 1384], [1386, 1381], [1387, 1386], [1389, 1388], [1390, 1383], [1391, 1390], [1392, 1391], [1393, 1392], [1397, 1394], [1397, 1396], [1399, 1398], [1400, 1399], [1402, 1401], [1403, 1389], [1404, 1403], [1405, 1404], [1405, 1402], [1406, 1405], [1408, 1407], [1408, 1397], [1409, 1408], [1410, 1409], [1410, 1406], [1411, 1410], [1414, 1413], [1415, 1389], [1416, 1415], [1417, 1414], [1417, 1416], [1418, 1417], [1420, 1397], [1420, 1419], [1421, 1420], [1422, 1418], [1422, 1421], [1423, 1422], [1425, 1381], [1426, 1425], [1428, 1427], [1429, 1383], [1430, 1429], [1431, 1430], [1432, 1431], [1433, 1428], [1434, 1433], [1435, 1434], [1437, 1428], [1438, 1437], [1439, 1438], [1441, 1439], [1441, 1411], [1441, 1423], [1441, 1435], [1442, 52], [1443, 1441], [1444, 1443], [1445, 1442], [1446, 63], [1447, 1446], [1448, 1447], [1449, 1448], [1450, 1447], [1451, 1450], [1452, 1447], [1453, 1452], [1454, 1447], [1455, 1454], [1457, 1445], [1458, 1457], [1459, 1444], [1460, 1443], [1461, 1458], [1462, 1461], [1462, 1460], [1463, 1462], [1465, 1445], [1466, 1465], [1467, 1444], [1468, 1443], [1469, 1466], [1470, 1468], [1470, 1469], [1471, 1470], [1473, 1445], [1474, 1473], [1475, 1444], [1476, 1471], [1476, 545], [1476, 787], [1476, 204], [1476, 194], [1476, 328], [1476, 1463], [1476, 910], [1476, 923], [1476, 1495], [1476, 317], [1476, 1475], [1476, 1540], [1476, 339], [1476, 1896], [1476, 947], [1476, 1863], [1476, 197], [1476, 210], [1476, 1852], [1476, 1443], [1476, 1479], [1476, 1874], [1476, 915], [1476, 1533], [1476, 1647], [1476, 796], [1476, 534], [1476, 1669], [1476, 213], [1476, 929], [1476, 556], [1476, 1658], [1477, 1474], [1478, 1477], [1478, 1476], [1479, 1478], [1482, 1482], [1482, 1378], [1483, 830], [1484, 1482], [1484, 1483], [1484, 1378], [1485, 1484], [1489, 1330], [1489, 1107], [1489, 1220], [1489, 1370], [1490, 1489], [1491, 1894], [1491, 860], [1492, 545], [1492, 787], [1492, 204], [1492, 194], [1492, 328], [1492, 1463], [1492, 910], [1492, 923], [1492, 1495], [1492, 317], [1492, 1540], [1492, 915], [1492, 339], [1492, 1896], [1492, 947], [1492, 1863], [1492, 197], [1492, 210], [1492, 1852], [1492, 1479], [1492, 1874], [1492, 1491], [1492, 1533], [1492, 1647], [1492, 796], [1492, 534], [1492, 1669], [1492, 213], [1492, 929], [1492, 556], [1492, 1658], [1492, 1471], [1493, 1658], [1493, 1471], [1493, 545], [1493, 204], [1493, 194], [1493, 328], [1493, 1463], [1493, 910], [1493, 923], [1493, 1495], [1493, 1099], [1493, 317], [1493, 1210], [1493, 1540], [1493, 915], [1493, 339], [1493, 1896], [1493, 947], [1493, 1863], [1493, 1346], [1493, 197], [1493, 210], [1493, 1476], [1493, 1322], [1493, 1358], [1493, 1852], [1493, 1443], [1493, 1479], [1493, 1004], [1493, 1874], [1493, 1468], [1493, 1533], [1493, 787], [1493, 1647], [1493, 796], [1493, 1460], [1493, 534], [1493, 1669], [1493, 213], [1493, 1227], [1493, 1492], [1493, 929], [1493, 556], [1494, 860], [1494, 1894], [1495, 1494], [1495, 1493], [1496, 1370], [1496, 1107], [1496, 1330], [1496, 1220], [1497, 982], [1497, 973], [1499, 1497], [1502, 973], [1502, 1502], [1502, 982], [1503, 1502], [1505, 1503], [1507, 1496], [1507, 1507], [1508, 1507], [1508, 1496], [1509, 1508], [1510, 1507], [1510, 1496], [1511, 1510], [1513, 1512], [1513, 1511], [1514, 1513], [1515, 1514], [1516, 1515], [1517, 982], [1517, 1502], [1517, 973], [1517, 1516], [1518, 1496], [1518, 1507], [1519, 1518], [1521, 1519], [1521, 1520], [1522, 1521], [1523, 1522], [1524, 1523], [1525, 1524], [1526, 1525], [1527, 1524], [1527, 1526], [1528, 1518], [1528, 1527], [1529, 1528], [1530, 1517], [1531, 923], [1531, 1528], [1531, 317], [1531, 1874], [1531, 915], [1531, 1530], [1531, 339], [1531, 1533], [1531, 1896], [1531, 947], [1531, 1863], [1531, 210], [1531, 1852], [1531, 1479], [1531, 929], [1531, 787], [1531, 1647], [1531, 796], [1531, 534], [1531, 910], [1531, 1669], [1531, 213], [1531, 556], [1531, 1495], [1531, 1658], [1531, 1540], [1531, 1471], [1531, 545], [1531, 204], [1531, 194], [1531, 328], [1531, 197], [1531, 1463], [1532, 1531], [1533, 1529], [1533, 1530], [1535, 860], [1535, 1894], [1536, 210], [1536, 1852], [1536, 1479], [1536, 929], [1536, 787], [1536, 1647], [1536, 796], [1536, 534], [1536, 1535], [1536, 910], [1536, 1669], [1536, 213], [1536, 556], [1536, 1495], [1536, 1658], [1536, 1540], [1536, 1471], [1536, 545], [1536, 204], [1536, 194], [1536, 328], [1536, 197], [1536, 1463], [1536, 923], [1536, 317], [1536, 1874], [1536, 915], [1536, 339], [1536, 1533], [1536, 1896], [1536, 947], [1536, 1863], [1537, 1330], [1537, 1220], [1537, 1370], [1537, 1107], [1538, 1536], [1538, 1537], [1539, 1894], [1539, 860], [1540, 1538], [1540, 1539], [1541, 1222], [1541, 1333], [1541, 1368], [1541, 1110], [1542, 1541], [1543, 135], [1544, 1543], [1544, 1222], [1544, 1333], [1544, 1368], [1544, 1110], [1545, 1544], [1546, 52], [1547, 1222], [1547, 1333], [1547, 1368], [1547, 1110], [1548, 1547], [1549, 1548], [1550, 1546], [1551, 63], [1552, 1551], [1553, 78], [1554, 1553], [1555, 1549], [1556, 1555], [1557, 1552], [1558, 1557], [1559, 1558], [1560, 1559], [1561, 1556], [1562, 1561], [1564, 1563], [1565, 1558], [1566, 1565], [1567, 1566], [1568, 1567], [1572, 1569], [1572, 1571], [1574, 1573], [1575, 1574], [1577, 1576], [1578, 1564], [1579, 1578], [1580, 1577], [1580, 1579], [1581, 1580], [1583, 1582], [1583, 1572], [1584, 1583], [1585, 1581], [1585, 1584], [1586, 1585], [1589, 1588], [1590, 1564], [1591, 1590], [1592, 1589], [1592, 1591], [1593, 1592], [1595, 1572], [1595, 1594], [1596, 1595], [1597, 1596], [1597, 1593], [1598, 1597], [1600, 1556], [1601, 1600], [1603, 1602], [1604, 1558], [1605, 1604], [1606, 1605], [1607, 1606], [1608, 1603], [1609, 1608], [1610, 1609], [1612, 1603], [1613, 1612], [1614, 1613], [1616, 1598], [1616, 1610], [1616, 1614], [1616, 1586], [1617, 1549], [1618, 1617], [1619, 1616], [1620, 1619], [1621, 1550], [1622, 1621], [1623, 1552], [1624, 1623], [1625, 1554], [1626, 1625], [1627, 1624], [1628, 1627], [1629, 1624], [1630, 1629], [1631, 1624], [1632, 1631], [1633, 1624], [1634, 1633], [1635, 1624], [1636, 1635], [1637, 1624], [1638, 1637], [1640, 1622], [1641, 1640], [1642, 1620], [1643, 1597], [1643, 1548], [1643, 1585], [1644, 1641], [1645, 1644], [1645, 1643], [1646, 1618], [1647, 1646], [1647, 1645], [1649, 1622], [1650, 1649], [1651, 1618], [1652, 1626], [1652, 1651], [1653, 1652], [1654, 1620], [1655, 746], [1655, 1871], [1655, 1596], [1655, 624], [1655, 1409], [1655, 437], [1655, 1860], [1655, 1421], [1655, 472], [1655, 1584], [1655, 1531], [1655, 484], [1655, 542], [1655, 553], [1655, 1789], [1655, 1801], [1655, 865], [1655, 1745], [1655, 734], [1656, 1650], [1657, 1656], [1657, 1655], [1658, 1653], [1658, 1657], [1660, 1622], [1661, 1660], [1662, 1618], [1663, 1626], [1663, 1662], [1664, 1663], [1665, 1620], [1666, 1665], [1666, 1874], [1666, 915], [1666, 542], [1666, 1533], [1666, 1896], [1666, 1863], [1666, 796], [1666, 210], [1666, 213], [1666, 1479], [1666, 553], [1666, 929], [1666, 1789], [1666, 1658], [1666, 1471], [1666, 545], [1666, 787], [1666, 1801], [1666, 1647], [1666, 865], [1666, 1745], [1666, 204], [1666, 734], [1666, 194], [1666, 534], [1666, 910], [1666, 1584], [1666, 1669], [1666, 746], [1666, 556], [1666, 1495], [1666, 317], [1666, 1871], [1666, 1596], [1666, 624], [1666, 1540], [1666, 1409], [1666, 339], [1666, 437], [1666, 1860], [1666, 947], [1666, 1421], [1666, 472], [1666, 328], [1666, 197], [1666, 1463], [1666, 923], [1666, 1852], [1666, 1531], [1666, 484], [1667, 1661], [1668, 1667], [1668, 1666], [1669, 1664], [1669, 1668], [1673, 63], [1674, 1673], [1675, 52], [1676, 1110], [1676, 1368], [1676, 1222], [1676, 1333], [1677, 1676], [1678, 1675], [1679, 63], [1680, 1679], [1681, 78], [1682, 1681], [1683, 1677], [1684, 1683], [1685, 1680], [1686, 1685], [1687, 1686], [1688, 1687], [1689, 1684], [1690, 1689], [1692, 1691], [1693, 1686], [1694, 1693], [1695, 1694], [1696, 1695], [1700, 1697], [1700, 1699], [1702, 1701], [1703, 1702], [1705, 1704], [1706, 1692], [1707, 1706], [1708, 1707], [1708, 1705], [1709, 1708], [1711, 1710], [1711, 1700], [1712, 1711], [1713, 1709], [1713, 1712], [1714, 1713], [1717, 1716], [1718, 1692], [1719, 1718], [1720, 1717], [1720, 1719], [1721, 1720], [1723, 1700], [1723, 1722], [1724, 1723], [1725, 1721], [1725, 1724], [1726, 1725], [1728, 1684], [1729, 1728], [1731, 1730], [1732, 1686], [1733, 1732], [1734, 1733], [1735, 1734], [1736, 1731], [1737, 1736], [1738, 1737], [1740, 1731], [1741, 1740], [1742, 1741], [1744, 1742], [1744, 1714], [1744, 1726], [1744, 1738], [1745, 1682], [1746, 1680], [1747, 1678], [1748, 1744], [1749, 1748], [1751, 1750], [1752, 52], [1753, 1110], [1753, 1222], [1753, 1333], [1753, 1368], [1754, 1753], [1755, 1752], [1756, 63], [1757, 1756], [1758, 78], [1759, 1758], [1760, 1754], [1761, 1760], [1762, 1757], [1763, 1762], [1764, 1763], [1765, 1764], [1766, 1761], [1767, 1766], [1769, 1768], [1770, 1763], [1771, 1770], [1772, 1771], [1773, 1772], [1777, 1774], [1777, 1776], [1779, 1778], [1780, 1779], [1782, 1781], [1783, 1769], [1784, 1783], [1785, 1782], [1785, 1784], [1786, 1785], [1788, 1787], [1788, 1777], [1789, 1788], [1790, 1786], [1790, 1789], [1791, 1790], [1794, 1793], [1795, 1769], [1796, 1795], [1797, 1796], [1797, 1794], [1798, 1797], [1800, 1777], [1800, 1799], [1801, 1800], [1802, 1798], [1802, 1801], [1803, 1802], [1805, 1761], [1806, 1805], [1808, 1807], [1809, 1763], [1810, 1809], [1811, 1810], [1812, 1811], [1813, 1808], [1814, 1813], [1815, 1814], [1817, 1808], [1818, 1817], [1819, 1818], [1821, 1803], [1821, 1815], [1821, 1819], [1821, 1791], [1822, 1754], [1823, 1822], [1824, 1821], [1825, 1824], [1826, 1755], [1827, 1826], [1828, 1757], [1829, 1828], [1830, 1759], [1831, 1830], [1832, 1829], [1833, 1832], [1834, 1829], [1835, 1834], [1836, 1829], [1837, 1836], [1838, 1829], [1839, 1838], [1840, 1829], [1841, 1840], [1842, 1829], [1843, 1842], [1845, 1827], [1846, 1845], [1847, 1825], [1848, 1790], [1848, 1802], [1848, 1753], [1849, 1846], [1850, 1848], [1850, 1849], [1851, 1823], [1852, 1851], [1852, 1850], [1854, 1827], [1855, 1854], [1856, 1823], [1857, 1831], [1857, 1856], [1858, 1857], [1859, 1825], [1860, 1789], [1860, 1801], [1860, 1745], [1861, 1855], [1862, 1860], [1862, 1861], [1863, 1858], [1863, 1862], [1865, 1827], [1866, 1865], [1867, 1823], [1868, 1831], [1868, 1867], [1869, 1868], [1870, 1825], [1871, 1471], [1871, 545], [1871, 1870], [1871, 204], [1871, 194], [1871, 328], [1871, 197], [1871, 1463], [1871, 923], [1871, 317], [1871, 1540], [1871, 1874], [1871, 915], [1871, 339], [1871, 1533], [1871, 1896], [1871, 947], [1871, 1863], [1871, 210], [1871, 1852], [1871, 1479], [1871, 929], [1871, 1789], [1871, 787], [1871, 1801], [1871, 1647], [1871, 1745], [1871, 796], [1871, 534], [1871, 910], [1871, 1669], [1871, 213], [1871, 556], [1871, 1495], [1871, 1658], [1872, 1866], [1873, 1872], [1873, 1871], [1874, 1873], [1874, 1869], [1878, 1751], [1879, 1878], [1880, 1368], [1880, 1879], [1880, 1110], [1880, 1222], [1880, 1333], [1881, 1880], [1882, 1751], [1883, 1882], [1885, 1884], [1886, 1222], [1886, 1110], [1886, 1333], [1886, 1368], [1887, 1886], [1889, 1885], [1889, 1888], [1890, 1889], [1891, 1532], [1891, 982], [1891, 973], [1892, 915], [1892, 339], [1892, 1533], [1892, 1896], [1892, 947], [1892, 1850], [1892, 1863], [1892, 210], [1892, 1852], [1892, 1479], [1892, 929], [1892, 1753], [1892, 787], [1892, 1647], [1892, 204], [1892, 796], [1892, 534], [1892, 910], [1892, 1669], [1892, 213], [1892, 1790], [1892, 1891], [1892, 556], [1892, 1495], [1892, 1858], [1892, 1802], [1892, 1658], [1892, 1540], [1892, 1471], [1892, 545], [1892, 194], [1892, 1869], [1892, 328], [1892, 197], [1892, 1463], [1892, 923], [1892, 317], [1892, 1874], [1893, 1892], [1894, 1891], [1895, 1894], [1896, 1895], [1898, 1333], [1898, 1368], [1898, 1222], [1898, 1110], [1899, 1898], [1900, 63], [1901, 1900], [1902, 1901], [1903, 1902], [1904, 1899], [1905, 1904], [1907, 1906], [1908, 1901], [1909, 1908], [1910, 1909], [1911, 1910], [1915, 1912], [1915, 1914], [1917, 1916], [1918, 1917], [1920, 1919], [1921, 1907], [1922, 1921], [1923, 1920], [1923, 1922], [1924, 1923], [1926, 1915], [1926, 1925], [1927, 1926], [1928, 1924], [1928, 1927], [1929, 1928], [1932, 1931], [1933, 1907], [1934, 1933], [1935, 1932], [1935, 1934], [1936, 1935], [1938, 1915], [1938, 1937], [1939, 1938], [1940, 1936], [1940, 1939], [1941, 1940], [1943, 1899], [1944, 1943], [1946, 1945], [1947, 1901], [1948, 1947], [1949, 1948], [1950, 1949], [1951, 1946], [1952, 1951], [1953, 1952], [1955, 1946], [1956, 1955], [1957, 1956], [1959, 1929], [1959, 1941], [1959, 1953], [1959, 1957], [1960, 1222], [1960, 1333], [1960, 1368], [1960, 1110], [1961, 78], [1961, 1960], [1962, 1961], [1963, 52], [1964, 1959], [1965, 1964], [1966, 1963], [1967, 63], [1968, 1967], [1969, 1968], [1970, 1969], [1971, 1966], [1972, 1971], [1973, 1965], [1974, 1964], [1975, 1972], [1976, 1975], [1976, 1974], [1977, 1874], [1977, 915], [1977, 1533], [1977, 1896], [1977, 1863], [1977, 796], [1977, 210], [1977, 213], [1977, 1479], [1977, 1976], [1977, 929], [1977, 556], [1977, 1658], [1977, 1471], [1977, 545], [1977, 787], [1977, 1647], [1977, 204], [1977, 194], [1977, 534], [1977, 910], [1977, 1669], [1977, 1495], [1977, 317], [1977, 1540], [1977, 339], [1977, 947], [1977, 328], [1977, 197], [1977, 1463], [1977, 923], [1977, 1852], [1979, 1968], [1980, 1979], [1981, 1966], [1982, 1981], [1983, 1965], [1984, 556], [1984, 1495], [1984, 1540], [1984, 339], [1984, 328], [1984, 197], [1984, 1463], [1984, 923], [1984, 1983], [1984, 1852], [1984, 317], [1984, 1874], [1984, 915], [1984, 1533], [1984, 1896], [1984, 947], [1984, 1863], [1984, 796], [1984, 1964], [1984, 210], [1984, 213], [1984, 1479], [1984, 929], [1984, 1658], [1984, 1471], [1984, 545], [1984, 787], [1984, 1647], [1984, 204], [1984, 194], [1984, 534], [1984, 910], [1984, 1669], [1985, 1982], [1986, 1984], [1986, 1985], [1987, 910], [1987, 1669], [1987, 1495], [1987, 317], [1987, 1540], [1987, 339], [1987, 947], [1987, 328], [1987, 197], [1987, 1463], [1987, 923], [1987, 1852], [1987, 1874], [1987, 915], [1987, 1533], [1987, 1896], [1987, 1863], [1987, 796], [1987, 210], [1987, 213], [1987, 1479], [1987, 1986], [1987, 929], [1987, 556], [1987, 1658], [1987, 1471], [1987, 545], [1987, 787], [1987, 1647], [1987, 204], [1987, 194], [1987, 534], [1988, 1987], [1991, 1988], [1991, 1977], [1991, 1990], [1992, 64], [1993, 1992], [1994, 72], [1995, 1991], [1995, 1994], [1996, 1995], [1997, 81], [1998, 1959], [1999, 1998], [2000, 1997], [2002, 2001], [2003, 2002]]}
| {"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/4952c55ee846544aee8106bff7185fc123d06c8cbb979d5e647770d922f15f37_4952c55ee846544aee8106bff7185fc123d06c8cbb979d5e647770d922f15f37.jsonl.gz", "strip_func_name": "sub_40143C", "query": "\n\n\n__int64 __fastcall sub_40143C(__int64 a1, unsigned int *a2, _BYTE *a3, signed int a4, int a5, int a6)\n{\n__int64 result; // rax\nint v7; // eax\nint v8; // ebx\n_BYTE *v9; // rax\nchar *v10; // rax\nchar *v11; // rax\n__int64 v12; // rbx\nunsigned int v13; // eax\n__int64 v14; // rbx\nint v15; // ebx\n__int16 v16; // bx\n_BYTE *v17; // rax\nint v18; // ebx\n_BYTE *v19; // rax\n_BYTE *v20; // rax\nchar *v21; // rax\nchar *v22; // rax\n_BYTE *v23; // rax\nunsigned __int64 v24; // rax\nunsigned __int64 v25; // rax\nint v26; // eax\nunsigned __int64 v27; // rax\nint v28; // ebx\n_BYTE *v29; // rax\nchar *v30; // rax\nchar *v31; // rax\n__int64 v32; // rbx\nunsigned int v33; // eax\n__int64 v34; // rbx\nint v35; // ebx\n__int16 v36; // bx\n_BYTE *v37; // rax\nunsigned __int64 v38; // rax\nunsigned __int64 v39; // rax\nint v40; // ebx\n_BYTE *v41; // rax\nunsigned __int64 v42; // rax\n_BYTE *v43; // rax\nchar *v44; // rax\nchar *v45; // rax\n_BYTE *v46; // rax\nint v47; // eax\nint v48; // ebx\n_BYTE *v49; // rax\nchar *v50; // rax\nchar *v51; // rax\n__int64 v52; // rbx\nunsigned int v53; // eax\n__int64 v54; // rbx\nint v55; // ebx\n__int16 v56; // bx\n_BYTE *v57; // rax\nint v58; // ebx\n_BYTE *v59; // rax\n_BYTE *v60; // rax\nchar *v61; // rax\nchar *v62; // rax\n_BYTE *v63; // rax\nunsigned __int64 v64; // rax\nunsigned __int64 v65; // rax\nint v66; // eax\nunsigned __int64 v67; // rax\nint v68; // ebx\n_BYTE *v69; // rax\nchar *v70; // rax\nchar *v71; // rax\n__int64 v72; // rbx\nunsigned int v73; // eax\n__int64 v74; // rbx\nint v75; // ebx\n__int16 v76; // bx\n_BYTE *v77; // rax\nunsigned __int64 v78; // rax\nunsigned __int64 v79; // rax\nint v80; // ebx\n_BYTE *v81; // rax\nunsigned __int64 v82; // rax\n_BYTE *v83; // rax\nchar *v84; // rax\nchar *v85; // rax\n_BYTE *v86; // rax\nunsigned __int64 v91; // [rsp+40h] [rbp-1D60h]\nsize_t v92; // [rsp+48h] [rbp-1D58h]\nunsigned __int64 v93; // [rsp+70h] [rbp-1D30h]\nunsigned int v94; // [rsp+D4h] [rbp-1CCCh]\nunsigned __int64 v95; // [rsp+128h] [rbp-1C78h]\nunsigned __int64 v96; // [rsp+2A8h] [rbp-1AF8h]\n__int64 v97; // [rsp+358h] [rbp-1A48h]\n__int64 v98; // [rsp+360h] [rbp-1A40h]\nint v99; // [rsp+368h] [rbp-1A38h]\nunsigned int *v100; // [rsp+378h] [rbp-1A28h]\nunsigned int *v101; // [rsp+380h] [rbp-1A20h]\nunsigned int v102; // [rsp+3C4h] [rbp-19DCh]\nunsigned int *v103; // [rsp+408h] [rbp-1998h]\nchar *v104; // [rsp+410h] [rbp-1990h]\nint v105; // [rsp+434h] [rbp-196Ch]\n_BYTE *v106; // [rsp+438h] [rbp-1968h]\nunsigned int v107; // [rsp+444h] [rbp-195Ch]\nunsigned __int64 v108; // [rsp+498h] [rbp-1908h]\nunsigned int v109; // [rsp+4D4h] [rbp-18CCh]\nunsigned int v110; // [rsp+500h] [rbp-18A0h]\nint v111; // [rsp+504h] [rbp-189Ch]\nint v112; // [rsp+508h] [rbp-1898h]\nint v113; // [rsp+50Ch] [rbp-1894h]\nunsigned __int64 v114; // [rsp+510h] [rbp-1890h]\nunsigned int *v115; // [rsp+590h] [rbp-1810h]\nint v116; // [rsp+5B4h] [rbp-17ECh]\nunsigned __int64 v117; // [rsp+5D8h] [rbp-17C8h]\nunsigned __int64 v118; // [rsp+658h] [rbp-1748h]\nchar *v119; // [rsp+6A0h] [rbp-1700h]\n_DWORD *v120; // [rsp+6A8h] [rbp-16F8h]\nchar *v121; // [rsp+6A8h] [rbp-16F8h]\n__int16 *v122; // [rsp+6A8h] [rbp-16F8h]\nchar *v123; // [rsp+6A8h] [rbp-16F8h]\nvoid *v124; // [rsp+6A8h] [rbp-16F8h]\nunsigned __int64 v125; // [rsp+6C0h] [rbp-16E0h]\nunsigned int *v126; // [rsp+6D0h] [rbp-16D0h]\nchar *v127; // [rsp+700h] [rbp-16A0h]\n__int64 v128; // [rsp+710h] [rbp-1690h]\nunsigned int *v129; // [rsp+710h] [rbp-1690h]\nunsigned __int64 v130; // [rsp+798h] [rbp-1608h]\nsize_t v131; // [rsp+7A0h] [rbp-1600h]\nunsigned int v132; // [rsp+85Ch] [rbp-1544h]\n__int64 v133; // [rsp+AB0h] [rbp-12F0h]\n__int64 v134; // [rsp+AB8h] [rbp-12E8h]\nint v135; // [rsp+AC0h] [rbp-12E0h]\nunsigned int *v136; // [rsp+AD0h] [rbp-12D0h]\nunsigned int *v137; // [rsp+AD8h] [rbp-12C8h]\nunsigned int v138; // [rsp+B1Ch] [rbp-1284h]\nunsigned int *v139; // [rsp+B60h] [rbp-1240h]\nchar *v140; // [rsp+B68h] [rbp-1238h]\nint v141; // [rsp+B8Ch] [rbp-1214h]\n_BYTE *v142; // [rsp+B90h] [rbp-1210h]\nunsigned int v143; // [rsp+B9Ch] [rbp-1204h]\n__int16 v144; // [rsp+C58h] [rbp-1148h]\nunsigned int v145; // [rsp+C5Ch] [rbp-1144h]\nint v146; // [rsp+C60h] [rbp-1140h]\nint v147; // [rsp+C64h] [rbp-113Ch]\nunsigned int *v148; // [rsp+C68h] [rbp-1138h]\nunsigned int *v149; // [rsp+CE8h] [rbp-10B8h]\nunsigned int v150; // [rsp+D0Ch] [rbp-1094h]\nchar *v151; // [rsp+DF8h] [rbp-FA8h]\n_DWORD *v152; // [rsp+E00h] [rbp-FA0h]\nchar *v153; // [rsp+E00h] [rbp-FA0h]\n__int16 *v154; // [rsp+E00h] [rbp-FA0h]\nchar *v155; // [rsp+E00h] [rbp-FA0h]\nvoid *v156; // [rsp+E00h] [rbp-FA0h]\nunsigned __int64 v157; // [rsp+E18h] [rbp-F88h]\nunsigned int *v158; // [rsp+E28h] [rbp-F78h]\nchar *v159; // [rsp+E58h] [rbp-F48h]\nunsigned int *v160; // [rsp+E68h] [rbp-F38h]\nunsigned int *v161; // [rsp+E68h] [rbp-F38h]\nunsigned __int64 v162; // [rsp+EE8h] [rbp-EB8h]\nsize_t v163; // [rsp+EF0h] [rbp-EB0h]\nunsigned __int64 v164; // [rsp+F18h] [rbp-E88h]\nunsigned int v165; // [rsp+F7Ch] [rbp-E24h]\nunsigned __int64 v166; // [rsp+FD0h] [rbp-DD0h]\nunsigned __int64 v167; // [rsp+1150h] [rbp-C50h]\n__int64 v168; // [rsp+1200h] [rbp-BA0h]\n__int64 v169; // [rsp+1208h] [rbp-B98h]\nint v170; // [rsp+1210h] [rbp-B90h]\nunsigned int *v171; // [rsp+1220h] [rbp-B80h]\nunsigned int *v172; // [rsp+1228h] [rbp-B78h]\nunsigned int v173; // [rsp+126Ch] [rbp-B34h]\nunsigned int *v174; // [rsp+12B0h] [rbp-AF0h]\nchar *v175; // [rsp+12B8h] [rbp-AE8h]\nint v176; // [rsp+12DCh] [rbp-AC4h]\n_BYTE *v177; // [rsp+12E0h] [rbp-AC0h]\nunsigned int v178; // [rsp+12ECh] [rbp-AB4h]\nunsigned __int64 v179; // [rsp+1340h] [rbp-A60h]\nunsigned int v180; // [rsp+137Ch] [rbp-A24h]\nunsigned int v181; // [rsp+13A8h] [rbp-9F8h]\nint v182; // [rsp+13ACh] [rbp-9F4h]\nint v183; // [rsp+13B0h] [rbp-9F0h]\nint v184; // [rsp+13B4h] [rbp-9ECh]\nunsigned __int64 v185; // [rsp+13B8h] [rbp-9E8h]\nunsigned int *v186; // [rsp+1438h] [rbp-968h]\nint v187; // [rsp+145Ch] [rbp-944h]\nunsigned __int64 v188; // [rsp+1480h] [rbp-920h]\nunsigned __int64 v189; // [rsp+1500h] [rbp-8A0h]\n_DWORD *v190; // [rsp+1550h] [rbp-850h]\nchar *v191; // [rsp+1550h] [rbp-850h]\n__int16 *v192; // [rsp+1550h] [rbp-850h]\nchar *v193; // [rsp+1550h] [rbp-850h]\nvoid *v194; // [rsp+1550h] [rbp-850h]\nunsigned __int64 v195; // [rsp+1568h] [rbp-838h]\nunsigned int *v196; // [rsp+1578h] [rbp-828h]\nchar *v197; // [rsp+15A8h] [rbp-7F8h]\n__int64 v198; // [rsp+15B8h] [rbp-7E8h]\nunsigned int *v199; // [rsp+15B8h] [rbp-7E8h]\nunsigned __int64 v200; // [rsp+1638h] [rbp-768h]\nsize_t n; // [rsp+1640h] [rbp-760h]\nunsigned int v202; // [rsp+16FCh] [rbp-6A4h]\n__int64 v203; // [rsp+1950h] [rbp-450h]\n__int64 v204; // [rsp+1958h] [rbp-448h]\nint v205; // [rsp+1960h] [rbp-440h]\nunsigned int *v206; // [rsp+1970h] [rbp-430h]\nunsigned int *v207; // [rsp+1978h] [rbp-428h]\nunsigned int v208; // [rsp+19BCh] [rbp-3E4h]\nunsigned int *v209; // [rsp+1A00h] [rbp-3A0h]\nchar *v210; // [rsp+1A08h] [rbp-398h]\nint v211; // [rsp+1A2Ch] [rbp-374h]\n_BYTE *v212; // [rsp+1A30h] [rbp-370h]\nunsigned int v213; // [rsp+1A3Ch] [rbp-364h]\n__int16 v214; // [rsp+1AF8h] [rbp-2A8h]\nunsigned int v215; // [rsp+1AFCh] [rbp-2A4h]\nint v216; // [rsp+1B00h] [rbp-2A0h]\nint v217; // [rsp+1B04h] [rbp-29Ch]\nunsigned int *v218; // [rsp+1B08h] [rbp-298h]\nunsigned int *v219; // [rsp+1B88h] [rbp-218h]\nunsigned int v220; // [rsp+1BACh] [rbp-1F4h]\n_DWORD *dest; // [rsp+1CA0h] [rbp-100h]\nchar *desta; // [rsp+1CA0h] [rbp-100h]\n__int16 *destb; // [rsp+1CA0h] [rbp-100h]\nchar *destc; // [rsp+1CA0h] [rbp-100h]\nvoid *destd; // [rsp+1CA0h] [rbp-100h]\nunsigned __int64 v226; // [rsp+1CB8h] [rbp-E8h]\nunsigned int *src; // [rsp+1CC8h] [rbp-D8h]\nchar *v228; // [rsp+1CF8h] [rbp-A8h]\nunsigned int *v229; // [rsp+1D08h] [rbp-98h]\nunsigned int *v230; // [rsp+1D08h] [rbp-98h]\nunsigned int *v231; // [rsp+1D88h] [rbp-18h]\n\nv231 = (unsigned int *)sub_424317(a1, 16416LL);\nif ( a6 <= 0 )\na6 = 1;\nif ( a6 > 65537 )\na6 = 65537;\nif ( a5 < (int)sub_40136B(a4) )\n{\nif ( a4 >= 65547 )\n{\nif ( (unsigned int)a4 <= 0x7E000000 )\n{\nv127 = (char *)a2 - v231[4096];\nv126 = a2;\nv125 = (unsigned __int64)a2 + a4 - 11;\nv120 = a3;\nv119 = &a3[a5];\nv231[4102] += a4;\nv231[4096] += a4;\nv231[4097] = 2;\nv118 = sub_40123D((__int64)a2);\nif ( (unsigned int)sub_401208() )\nv64 = (0xCF1BBCDCBB000000LL * v118) >> 52;\nelse\nLODWORD(v64) = (unsigned int)((0x9E3779B185EBCA87LL * (v118 >> 24)) >> 32) >> 20;\nv231[(unsigned int)v64] = (_DWORD)a2 - (_DWORD)v127;\nv128 = (__int64)a2 + 1;\nv117 = sub_40123D((__int64)a2 + 1);\nif ( (unsigned int)sub_401208() )\nv65 = (0xCF1BBCDCBB000000LL * v117) >> 52;\nelse\nLODWORD(v65) = (unsigned int)((0x9E3779B185EBCA87LL * (v117 >> 24)) >> 32) >> 20;\nv116 = v65;\nLABEL_214:\nv114 = v128;\nv113 = 1;\nv112 = a6 << 6;\nwhile ( 1 )\n{\nv111 = v116;\nv110 = v114 - (_DWORD)v127;\nv109 = v231[v116];\nv129 = (unsigned int *)v114;\nv114 += v113;\nv66 = v112++;\nv113 = v66 >> 6;\nif ( v125 < v114 )\nbreak;\nv115 = (unsigned int *)&v127[v109];\nv108 = sub_40123D(v114);\nif ( (unsigned int)sub_401208() )\nv67 = (0xCF1BBCDCBB000000LL * v108) >> 52;\nelse\nLODWORD(v67) = (unsigned int)((0x9E3779B185EBCA87LL * (v108 >> 24)) >> 32) >> 20;\nv116 = v67;\nv231[v111] = v110;\nif ( v110 <= v109 + 0xFFFF )\n{\nv68 = sub_40122D(v115);\nif ( v68 == (unsigned int)sub_40122D(v129) )\n{\nwhile ( v129 > v126 && v115 > a2 && *((_BYTE *)v129 - 1) == *((_BYTE *)v115 - 1) )\n{\nv129 = (unsigned int *)((char *)v129 - 1);\nv115 = (unsigned int *)((char *)v115 - 1);\n}\nv107 = (_DWORD)v129 - (_DWORD)v126;\nv69 = v120;\nv121 = (char *)v120 + 1;\nv106 = v69;\nif ( v119 < &v121[v107 + 8 + (unsigned __int64)(v107 / 0xFF)] )\nreturn 0LL;\nif ( v107 <= 0xE )\n{\n*v69 = 16 * v107;\n}\nelse\n{\nv105 = v107 - 15;\n*v69 = -16;\nwhile ( v105 > 254 )\n{\nv70 = v121++;\n*v70 = -1;\nv105 -= 255;\n}\nv71 = v121++;\n*v71 = v105;\n}\nv104 = v121;\nv103 = v126;\ndo\n{\n*(_QWORD *)v104 = *(_QWORD *)v103;\nv104 += 8;\nv103 += 2;\n}\nwhile ( &v121[v107] > v104 );\nv122 = (__int16 *)&v121[v107];\nwhile ( 1 )\n{\nsub_4012CB(v122, (_WORD)v129 - (_WORD)v115);\nv120 = v122 + 1;\nv101 = v129 + 1;\nv100 = v115 + 1;\nv99 = (_DWORD)v129 + 4;\nif ( v129 + 1 >= (unsigned int *)((char *)a2 + a4 - 12) )\ngoto LABEL_244;\nv72 = sub_40123D((__int64)v100);\nv98 = v72 ^ sub_40123D((__int64)v101);\nif ( v98 )\n{\nv73 = sub_401325(v98);\n}\nelse\n{\nv101 = v129 + 3;\nv100 = v115 + 3;\nLABEL_244:\nwhile ( v101 < (unsigned int *)((char *)a2 + a4 - 12) )\n{\nv74 = sub_40123D((__int64)v100);\nv97 = v74 ^ sub_40123D((__int64)v101);\nif ( v97 )\n{\nv73 = sub_401325(v97) + (_DWORD)v101 - v99;\ngoto LABEL_255;\n}\nv101 += 2;\nv100 += 2;\n}\nif ( v101 < (unsigned int *)((char *)a2 + a4 - 8) )\n{\nv75 = sub_40122D(v100);\nif ( v75 == (unsigned int)sub_40122D(v101) )\n{\n++v101;\n++v100;\n}\n}\nif ( (unsigned int *)((char *)a2 + a4 - 6) > v101 )\n{\nv76 = sub_40121C((unsigned __int16 *)v100);\nif ( v76 == (unsigned __int16)sub_40121C((unsigned __int16 *)v101) )\n{\nv101 = (unsigned int *)((char *)v101 + 2);\nv100 = (unsigned int *)((char *)v100 + 2);\n}\n}\nif ( (unsigned int *)((char *)a2 + a4 - 5) > v101 && *(_BYTE *)v100 == *(_BYTE *)v101 )\nLODWORD(v101) = (_DWORD)v101 + 1;\nv73 = (_DWORD)v101 - v99;\n}\nLABEL_255:\nv129 = (unsigned int *)((char *)v129 + v73 + 4);\nif ( v119 < (char *)v120 + (v73 + 240) / 0xFF + 6 )\nreturn 0LL;\nif ( v73 <= 0xE )\n{\n*v106 += v73;\n}\nelse\n{\n*v106 += 15;\nv102 = v73 - 15;\nsub_40126A(v120, -1);\nwhile ( v102 > 0x3FB )\n{\nsub_40126A(++v120, -1);\nv102 -= 1020;\n}\nv77 = (char *)v120 + v102 / 0xFF;\nv120 = v77 + 1;\n*v77 = v102 % 0xFF;\n}\nv126 = v129;\nif ( v125 <= (unsigned __int64)v129 )\ngoto LABEL_277;\nv96 = sub_40123D((__int64)v129 - 2);\nif ( (unsigned int)sub_401208() )\nv78 = (0xCF1BBCDCBB000000LL * v96) >> 52;\nelse\nLODWORD(v78) = (unsigned int)((0x9E3779B185EBCA87LL * (v96 >> 24)) >> 32) >> 20;\nv231[(unsigned int)v78] = (_DWORD)v129 - 2 - (_DWORD)v127;\nv95 = sub_40123D((__int64)v129);\nif ( (unsigned int)sub_401208() )\nv79 = (0xCF1BBCDCBB000000LL * v95) >> 52;\nelse\nLODWORD(v79) = (unsigned int)((0x9E3779B185EBCA87LL * (v95 >> 24)) >> 32) >> 20;\nv94 = v231[(unsigned int)v79];\nv115 = (unsigned int *)&v127[v94];\nv231[(unsigned int)v79] = (_DWORD)v129 - (_DWORD)v127;\nif ( (int)v129 - (int)v127 > v94 + 0xFFFF )\nbreak;\nv80 = sub_40122D(v115);\nif ( v80 != (unsigned int)sub_40122D(v129) )\nbreak;\nv81 = v120;\nv122 = (__int16 *)((char *)v120 + 1);\nv106 = v81;\n*v81 = 0;\n}\nv128 = (__int64)v129 + 1;\nv93 = sub_40123D(v128);\nif ( (unsigned int)sub_401208() )\nv82 = (0xCF1BBCDCBB000000LL * v93) >> 52;\nelse\nLODWORD(v82) = (unsigned int)((0x9E3779B185EBCA87LL * (v93 >> 24)) >> 32) >> 20;\nv116 = v82;\ngoto LABEL_214;\n}\n}\n}\nLABEL_277:\nv92 = (char *)a2 + a4 - (char *)v126;\nif ( v119 >= (char *)v120 + (v92 + 240) / 0xFF + v92 + 1 )\n{\nif ( v92 <= 0xE )\n{\nv86 = v120;\nv124 = (char *)v120 + 1;\n*v86 = 16 * v92;\n}\nelse\n{\nv91 = v92 - 15;\nv83 = v120;\nv123 = (char *)v120 + 1;\n*v83 = -16;\nwhile ( v91 > 0xFE )\n{\nv84 = v123++;\n*v84 = -1;\nv91 -= 255LL;\n}\nv85 = v123;\nv124 = v123 + 1;\n*v85 = v91;\n}\nmemcpy(v124, v126, v92);\nresult = (unsigned int)(v92 + (_DWORD)v124 - (_DWORD)a3);\n}\nelse\n{\nresult = 0LL;\n}\n}\nelse\n{\nresult = 0LL;\n}\n}\nelse if ( (unsigned int)a4 <= 0x7E000000 )\n{\nif ( a4 )\n{\nv159 = (char *)a2 - v231[4096];\nv158 = a2;\nv157 = (unsigned __int64)a2 + a4 - 11;\nv152 = a3;\nv151 = &a3[a5];\nv231[4102] += a4;\nv231[4096] += a4;\nv231[4097] = 3;\nif ( a4 >= 13 )\n{\n*((_WORD *)v231 + ((-1640531535 * (unsigned int)sub_40122D(a2)) >> 19)) = (_WORD)a2 - (_WORD)v159;\nv160 = (unsigned int *)((char *)a2 + 1);\nv150 = (-1640531535 * (unsigned int)sub_40122D((unsigned int *)((char *)a2 + 1))) >> 19;\nLABEL_148:\nv148 = v160;\nv147 = 1;\nv146 = a6 << 6;\nwhile ( 1 )\n{\nv145 = v150;\nv144 = (_WORD)v148 - (_WORD)v159;\nv161 = v148;\nv148 = (unsigned int *)((char *)v148 + v147);\nv47 = v146++;\nv147 = v47 >> 6;\nif ( v157 < (unsigned __int64)v148 )\nbreak;\nv149 = (unsigned int *)&v159[*((unsigned __int16 *)v231 + v150)];\nv150 = (-1640531535 * (unsigned int)sub_40122D(v148)) >> 19;\n*((_WORD *)v231 + v145) = v144;\nv48 = sub_40122D(v149);\nif ( v48 == (unsigned int)sub_40122D(v161) )\n{\nwhile ( v161 > v158 && v149 > a2 && *((_BYTE *)v161 - 1) == *((_BYTE *)v149 - 1) )\n{\nv161 = (unsigned int *)((char *)v161 - 1);\nv149 = (unsigned int *)((char *)v149 - 1);\n}\nv143 = (_DWORD)v161 - (_DWORD)v158;\nv49 = v152;\nv153 = (char *)v152 + 1;\nv142 = v49;\nif ( v151 < &v153[v143 + 8 + (unsigned __int64)(v143 / 0xFF)] )\nreturn 0LL;\nif ( v143 <= 0xE )\n{\n*v49 = 16 * v143;\n}\nelse\n{\nv141 = v143 - 15;\n*v49 = -16;\nwhile ( v141 > 254 )\n{\nv50 = v153++;\n*v50 = -1;\nv141 -= 255;\n}\nv51 = v153++;\n*v51 = v141;\n}\nv140 = v153;\nv139 = v158;\ndo\n{\n*(_QWORD *)v140 = *(_QWORD *)v139;\nv140 += 8;\nv139 += 2;\n}\nwhile ( &v153[v143] > v140 );\nv154 = (__int16 *)&v153[v143];\nwhile ( 1 )\n{\nsub_4012CB(v154, (_WORD)v161 - (_WORD)v149);\nv152 = v154 + 1;\nv137 = v161 + 1;\nv136 = v149 + 1;\nv135 = (_DWORD)v161 + 4;\nif ( v161 + 1 >= (unsigned int *)((char *)a2 + a4 - 12) )\ngoto LABEL_173;\nv52 = sub_40123D((__int64)v136);\nv134 = v52 ^ sub_40123D((__int64)v137);\nif ( v134 )\n{\nv53 = sub_401325(v134);\n}\nelse\n{\nv137 = v161 + 3;\nv136 = v149 + 3;\nLABEL_173:\nwhile ( v137 < (unsigned int *)((char *)a2 + a4 - 12) )\n{\nv54 = sub_40123D((__int64)v136);\nv133 = v54 ^ sub_40123D((__int64)v137);\nif ( v133 )\n{\nv53 = sub_401325(v133) + (_DWORD)v137 - v135;\ngoto LABEL_184;\n}\nv137 += 2;\nv136 += 2;\n}\nif ( v137 < (unsigned int *)((char *)a2 + a4 - 8) )\n{\nv55 = sub_40122D(v136);\nif ( v55 == (unsigned int)sub_40122D(v137) )\n{\n++v137;\n++v136;\n}\n}\nif ( (unsigned int *)((char *)a2 + a4 - 6) > v137 )\n{\nv56 = sub_40121C((unsigned __int16 *)v136);\nif ( v56 == (unsigned __int16)sub_40121C((unsigned __int16 *)v137) )\n{\nv137 = (unsigned int *)((char *)v137 + 2);\nv136 = (unsigned int *)((char *)v136 + 2);\n}\n}\nif ( (unsigned int *)((char *)a2 + a4 - 5) > v137 && *(_BYTE *)v136 == *(_BYTE *)v137 )\nLODWORD(v137) = (_DWORD)v137 + 1;\nv53 = (_DWORD)v137 - v135;\n}\nLABEL_184:\nv161 = (unsigned int *)((char *)v161 + v53 + 4);\nif ( v151 < (char *)v152 + (v53 + 240) / 0xFF + 6 )\nreturn 0LL;\nif ( v53 <= 0xE )\n{\n*v142 += v53;\n}\nelse\n{\n*v142 += 15;\nv138 = v53 - 15;\nsub_40126A(v152, -1);\nwhile ( v138 > 0x3FB )\n{\nsub_40126A(++v152, -1);\nv138 -= 1020;\n}\nv57 = (char *)v152 + v138 / 0xFF;\nv152 = v57 + 1;\n*v57 = v138 % 0xFF;\n}\nv158 = v161;\nif ( v157 <= (unsigned __int64)v161 )\ngoto LABEL_196;\n*((_WORD *)v231 + ((-1640531535 * (unsigned int)sub_40122D((unsigned int *)((char *)v161 - 2))) >> 19)) = (_WORD)v161 - 2 - (_WORD)v159;\nv132 = (-1640531535 * (unsigned int)sub_40122D(v161)) >> 19;\nv149 = (unsigned int *)&v159[*((unsigned __int16 *)v231 + v132)];\n*((_WORD *)v231 + v132) = (_WORD)v161 - (_WORD)v159;\nv58 = sub_40122D(v149);\nif ( v58 != (unsigned int)sub_40122D(v161) )\nbreak;\nv59 = v152;\nv154 = (__int16 *)((char *)v152 + 1);\nv142 = v59;\n*v59 = 0;\n}\nv160 = (unsigned int *)((char *)v161 + 1);\nv150 = (-1640531535 * (unsigned int)sub_40122D(v160)) >> 19;\ngoto LABEL_148;\n}\n}\n}\nLABEL_196:\nv131 = (char *)a2 + a4 - (char *)v158;\nif ( v151 >= (char *)v152 + (v131 + 240) / 0xFF + v131 + 1 )\n{\nif ( v131 <= 0xE )\n{\nv63 = v152;\nv156 = (char *)v152 + 1;\n*v63 = 16 * v131;\n}\nelse\n{\nv130 = v131 - 15;\nv60 = v152;\nv155 = (char *)v152 + 1;\n*v60 = -16;\nwhile ( v130 > 0xFE )\n{\nv61 = v155++;\n*v61 = -1;\nv130 -= 255LL;\n}\nv62 = v155;\nv156 = v155 + 1;\n*v62 = v130;\n}\nmemcpy(v156, v158, v131);\nresult = (unsigned int)(v131 + (_DWORD)v156 - (_DWORD)a3);\n}\nelse\n{\nresult = 0LL;\n}\n}\nelse if ( a5 > 0 )\n{\n*a3 = 0;\nresult = 1LL;\n}\nelse\n{\nresult = 0LL;\n}\n}\nelse\n{\nresult = 0LL;\n}\n}\nelse if ( a4 >= 65547 )\n{\nif ( (unsigned int)a4 <= 0x7E000000 )\n{\nv197 = (char *)a2 - v231[4096];\nv196 = a2;\nv195 = (unsigned __int64)a2 + a4 - 11;\nv190 = a3;\nv231[4102] += a4;\nv231[4096] += a4;\nv231[4097] = 2;\nv189 = sub_40123D((__int64)a2);\nif ( (unsigned int)sub_401208() )\nv24 = (0xCF1BBCDCBB000000LL * v189) >> 52;\nelse\nLODWORD(v24) = (unsigned int)((0x9E3779B185EBCA87LL * (v189 >> 24)) >> 32) >> 20;\nv231[(unsigned int)v24] = (_DWORD)a2 - (_DWORD)v197;\nv198 = (__int64)a2 + 1;\nv188 = sub_40123D((__int64)a2 + 1);\nif ( (unsigned int)sub_401208() )\nv25 = (0xCF1BBCDCBB000000LL * v188) >> 52;\nelse\nLODWORD(v25) = (unsigned int)((0x9E3779B185EBCA87LL * (v188 >> 24)) >> 32) >> 20;\nv187 = v25;\nLABEL_73:\nv185 = v198;\nv184 = 1;\nv183 = a6 << 6;\nwhile ( 1 )\n{\nv182 = v187;\nv181 = v185 - (_DWORD)v197;\nv180 = v231[v187];\nv199 = (unsigned int *)v185;\nv185 += v184;\nv26 = v183++;\nv184 = v26 >> 6;\nif ( v195 < v185 )\nbreak;\nv186 = (unsigned int *)&v197[v180];\nv179 = sub_40123D(v185);\nif ( (unsigned int)sub_401208() )\nv27 = (0xCF1BBCDCBB000000LL * v179) >> 52;\nelse\nLODWORD(v27) = (unsigned int)((0x9E3779B185EBCA87LL * (v179 >> 24)) >> 32) >> 20;\nv187 = v27;\nv231[v182] = v181;\nif ( v181 <= v180 + 0xFFFF )\n{\nv28 = sub_40122D(v186);\nif ( v28 == (unsigned int)sub_40122D(v199) )\n{\nwhile ( v199 > v196 && v186 > a2 && *((_BYTE *)v199 - 1) == *((_BYTE *)v186 - 1) )\n{\nv199 = (unsigned int *)((char *)v199 - 1);\nv186 = (unsigned int *)((char *)v186 - 1);\n}\nv178 = (_DWORD)v199 - (_DWORD)v196;\nv29 = v190;\nv191 = (char *)v190 + 1;\nv177 = v29;\nif ( (unsigned int)((_DWORD)v199 - (_DWORD)v196) <= 0xE )\n{\n*v29 = 16 * v178;\n}\nelse\n{\nv176 = v178 - 15;\n*v29 = -16;\nwhile ( v176 > 254 )\n{\nv30 = v191++;\n*v30 = -1;\nv176 -= 255;\n}\nv31 = v191++;\n*v31 = v176;\n}\nv175 = v191;\nv174 = v196;\ndo\n{\n*(_QWORD *)v175 = *(_QWORD *)v174;\nv175 += 8;\nv174 += 2;\n}\nwhile ( &v191[v178] > v175 );\nv192 = (__int16 *)&v191[v178];\nwhile ( 1 )\n{\nsub_4012CB(v192, (_WORD)v199 - (_WORD)v186);\nv190 = v192 + 1;\nv172 = v199 + 1;\nv171 = v186 + 1;\nv170 = (_DWORD)v199 + 4;\nif ( v199 + 1 >= (unsigned int *)((char *)a2 + a4 - 12) )\ngoto LABEL_101;\nv32 = sub_40123D((__int64)v171);\nv169 = v32 ^ sub_40123D((__int64)v172);\nif ( v169 )\n{\nv33 = sub_401325(v169);\n}\nelse\n{\nv172 = v199 + 3;\nv171 = v186 + 3;\nLABEL_101:\nwhile ( v172 < (unsigned int *)((char *)a2 + a4 - 12) )\n{\nv34 = sub_40123D((__int64)v171);\nv168 = v34 ^ sub_40123D((__int64)v172);\nif ( v168 )\n{\nv33 = sub_401325(v168) + (_DWORD)v172 - v170;\ngoto LABEL_112;\n}\nv172 += 2;\nv171 += 2;\n}\nif ( v172 < (unsigned int *)((char *)a2 + a4 - 8) )\n{\nv35 = sub_40122D(v171);\nif ( v35 == (unsigned int)sub_40122D(v172) )\n{\n++v172;\n++v171;\n}\n}\nif ( (unsigned int *)((char *)a2 + a4 - 6) > v172 )\n{\nv36 = sub_40121C((unsigned __int16 *)v171);\nif ( v36 == (unsigned __int16)sub_40121C((unsigned __int16 *)v172) )\n{\nv172 = (unsigned int *)((char *)v172 + 2);\nv171 = (unsigned int *)((char *)v171 + 2);\n}\n}\nif ( (unsigned int *)((char *)a2 + a4 - 5) > v172 && *(_BYTE *)v171 == *(_BYTE *)v172 )\nLODWORD(v172) = (_DWORD)v172 + 1;\nv33 = (_DWORD)v172 - v170;\n}\nLABEL_112:\nv199 = (unsigned int *)((char *)v199 + v33 + 4);\nif ( v33 <= 0xE )\n{\n*v177 += v33;\n}\nelse\n{\n*v177 += 15;\nv173 = v33 - 15;\nsub_40126A(v190, -1);\nwhile ( v173 > 0x3FB )\n{\nsub_40126A(++v190, -1);\nv173 -= 1020;\n}\nv37 = (char *)v190 + v173 / 0xFF;\nv190 = v37 + 1;\n*v37 = v173 % 0xFF;\n}\nv196 = v199;\nif ( v195 <= (unsigned __int64)v199 )\ngoto LABEL_132;\nv167 = sub_40123D((__int64)v199 - 2);\nif ( (unsigned int)sub_401208() )\nv38 = (0xCF1BBCDCBB000000LL * v167) >> 52;\nelse\nLODWORD(v38) = (unsigned int)((0x9E3779B185EBCA87LL * (v167 >> 24)) >> 32) >> 20;\nv231[(unsigned int)v38] = (_DWORD)v199 - 2 - (_DWORD)v197;\nv166 = sub_40123D((__int64)v199);\nif ( (unsigned int)sub_401208() )\nv39 = (0xCF1BBCDCBB000000LL * v166) >> 52;\nelse\nLODWORD(v39) = (unsigned int)((0x9E3779B185EBCA87LL * (v166 >> 24)) >> 32) >> 20;\nv165 = v231[(unsigned int)v39];\nv186 = (unsigned int *)&v197[v165];\nv231[(unsigned int)v39] = (_DWORD)v199 - (_DWORD)v197;\nif ( (int)v199 - (int)v197 > v165 + 0xFFFF\n|| (v40 = sub_40122D(v186), v40 != (unsigned int)sub_40122D(v199)) )\n{\nv198 = (__int64)v199 + 1;\nv164 = sub_40123D(v198);\nif ( (unsigned int)sub_401208() )\nv42 = (0xCF1BBCDCBB000000LL * v164) >> 52;\nelse\nLODWORD(v42) = (unsigned int)((0x9E3779B185EBCA87LL * (v164 >> 24)) >> 32) >> 20;\nv187 = v42;\ngoto LABEL_73;\n}\nv41 = v190;\nv192 = (__int16 *)((char *)v190 + 1);\nv177 = v41;\n*v41 = 0;\n}\n}\n}\n}\nLABEL_132:\nv163 = (char *)a2 + a4 - (char *)v196;\nif ( v163 <= 0xE )\n{\nv46 = v190;\nv194 = (char *)v190 + 1;\n*v46 = 16 * v163;\n}\nelse\n{\nv162 = v163 - 15;\nv43 = v190;\nv193 = (char *)v190 + 1;\n*v43 = -16;\nwhile ( v162 > 0xFE )\n{\nv44 = v193++;\n*v44 = -1;\nv162 -= 255LL;\n}\nv45 = v193;\nv194 = v193 + 1;\n*v45 = v162;\n}\nmemcpy(v194, v196, v163);\nresult = (unsigned int)(v163 + (_DWORD)v194 - (_DWORD)a3);\n}\nelse\n{\nresult = 0LL;\n}\n}\nelse if ( (unsigned int)a4 <= 0x7E000000 )\n{\nif ( a4 )\n{\nv228 = (char *)a2 - v231[4096];\nsrc = a2;\nv226 = (unsigned __int64)a2 + a4 - 11;\ndest = a3;\nv231[4102] += a4;\nv231[4096] += a4;\nv231[4097] = 3;\nif ( a4 >= 13 )\n{\n*((_WORD *)v231 + ((-1640531535 * (unsigned int)sub_40122D(a2)) >> 19)) = (_WORD)a2 - (_WORD)v228;\nv229 = (unsigned int *)((char *)a2 + 1);\nv220 = (-1640531535 * (unsigned int)sub_40122D((unsigned int *)((char *)a2 + 1))) >> 19;\nLABEL_13:\nv218 = v229;\nv217 = 1;\nv216 = a6 << 6;\nwhile ( 1 )\n{\nv215 = v220;\nv214 = (_WORD)v218 - (_WORD)v228;\nv230 = v218;\nv218 = (unsigned int *)((char *)v218 + v217);\nv7 = v216++;\nv217 = v7 >> 6;\nif ( v226 < (unsigned __int64)v218 )\nbreak;\nv219 = (unsigned int *)&v228[*((unsigned __int16 *)v231 + v220)];\nv220 = (-1640531535 * (unsigned int)sub_40122D(v218)) >> 19;\n*((_WORD *)v231 + v215) = v214;\nv8 = sub_40122D(v219);\nif ( v8 == (unsigned int)sub_40122D(v230) )\n{\nwhile ( v230 > src && v219 > a2 && *((_BYTE *)v230 - 1) == *((_BYTE *)v219 - 1) )\n{\nv230 = (unsigned int *)((char *)v230 - 1);\nv219 = (unsigned int *)((char *)v219 - 1);\n}\nv213 = (_DWORD)v230 - (_DWORD)src;\nv9 = dest;\ndesta = (char *)dest + 1;\nv212 = v9;\nif ( (unsigned int)((_DWORD)v230 - (_DWORD)src) <= 0xE )\n{\n*v9 = 16 * v213;\n}\nelse\n{\nv211 = v213 - 15;\n*v9 = -16;\nwhile ( v211 > 254 )\n{\nv10 = desta++;\n*v10 = -1;\nv211 -= 255;\n}\nv11 = desta++;\n*v11 = v211;\n}\nv210 = desta;\nv209 = src;\ndo\n{\n*(_QWORD *)v210 = *(_QWORD *)v209;\nv210 += 8;\nv209 += 2;\n}\nwhile ( &desta[v213] > v210 );\ndestb = (__int16 *)&desta[v213];\nwhile ( 1 )\n{\nsub_4012CB(destb, (_WORD)v230 - (_WORD)v219);\ndest = destb + 1;\nv207 = v230 + 1;\nv206 = v219 + 1;\nv205 = (_DWORD)v230 + 4;\nif ( v230 + 1 >= (unsigned int *)((char *)a2 + a4 - 12) )\ngoto LABEL_36;\nv12 = sub_40123D((__int64)v206);\nv204 = v12 ^ sub_40123D((__int64)v207);\nif ( v204 )\n{\nv13 = sub_401325(v204);\n}\nelse\n{\nv207 = v230 + 3;\nv206 = v219 + 3;\nLABEL_36:\nwhile ( v207 < (unsigned int *)((char *)a2 + a4 - 12) )\n{\nv14 = sub_40123D((__int64)v206);\nv203 = v14 ^ sub_40123D((__int64)v207);\nif ( v203 )\n{\nv13 = sub_401325(v203) + (_DWORD)v207 - v205;\ngoto LABEL_47;\n}\nv207 += 2;\nv206 += 2;\n}\nif ( v207 < (unsigned int *)((char *)a2 + a4 - 8) )\n{\nv15 = sub_40122D(v206);\nif ( v15 == (unsigned int)sub_40122D(v207) )\n{\n++v207;\n++v206;\n}\n}\nif ( (unsigned int *)((char *)a2 + a4 - 6) > v207 )\n{\nv16 = sub_40121C((unsigned __int16 *)v206);\nif ( v16 == (unsigned __int16)sub_40121C((unsigned __int16 *)v207) )\n{\nv207 = (unsigned int *)((char *)v207 + 2);\nv206 = (unsigned int *)((char *)v206 + 2);\n}\n}\nif ( (unsigned int *)((char *)a2 + a4 - 5) > v207 && *(_BYTE *)v206 == *(_BYTE *)v207 )\nLODWORD(v207) = (_DWORD)v207 + 1;\nv13 = (_DWORD)v207 - v205;\n}\nLABEL_47:\nv230 = (unsigned int *)((char *)v230 + v13 + 4);\nif ( v13 <= 0xE )\n{\n*v212 += v13;\n}\nelse\n{\n*v212 += 15;\nv208 = v13 - 15;\nsub_40126A(dest, -1);\nwhile ( v208 > 0x3FB )\n{\nsub_40126A(++dest, -1);\nv208 -= 1020;\n}\nv17 = (char *)dest + v208 / 0xFF;\ndest = v17 + 1;\n*v17 = v208 % 0xFF;\n}\nsrc = v230;\nif ( v226 <= (unsigned __int64)v230 )\ngoto LABEL_57;\n*((_WORD *)v231 + ((-1640531535 * (unsigned int)sub_40122D((unsigned int *)((char *)v230 - 2))) >> 19)) = (_WORD)v230 - 2 - (_WORD)v228;\nv202 = (-1640531535 * (unsigned int)sub_40122D(v230)) >> 19;\nv219 = (unsigned int *)&v228[*((unsigned __int16 *)v231 + v202)];\n*((_WORD *)v231 + v202) = (_WORD)v230 - (_WORD)v228;\nv18 = sub_40122D(v219);\nif ( v18 != (unsigned int)sub_40122D(v230) )\n{\nv229 = (unsigned int *)((char *)v230 + 1);\nv220 = (-1640531535 * (unsigned int)sub_40122D(v229)) >> 19;\ngoto LABEL_13;\n}\nv19 = dest;\ndestb = (__int16 *)((char *)dest + 1);\nv212 = v19;\n*v19 = 0;\n}\n}\n}\n}\nLABEL_57:\nn = (char *)a2 + a4 - (char *)src;\nif ( n <= 0xE )\n{\nv23 = dest;\ndestd = (char *)dest + 1;\n*v23 = 16 * n;\n}\nelse\n{\nv200 = n - 15;\nv20 = dest;\ndestc = (char *)dest + 1;\n*v20 = -16;\nwhile ( v200 > 0xFE )\n{\nv21 = destc++;\n*v21 = -1;\nv200 -= 255LL;\n}\nv22 = destc;\ndestd = destc + 1;\n*v22 = v200;\n}\nmemcpy(destd, src, n);\nresult = (unsigned int)(n + (_DWORD)destd - (_DWORD)a3);\n}\nelse\n{\n*a3 = 0;\nresult = 1LL;\n}\n}\nelse\n{\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,desta,v228,v231,sub_40143C,sub_424317,sub_40136B,sub_40123D,sub_401208,sub_40122D,sub_4012CB,sub_401325,sub_40121C,sub_40126A,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'dest', 'a4': 'inputSize', 'a1': 'state', 'a2': 'source', 'a5': 'maxOutputSize', 'a6': 'acceleration', 'desta': 'memPtrc', 'v228': 'srcBase', 'v231': 'ctx', 'sub_40143C': 'LZ4_compress_fast_extState', 'sub_424317': 'LZ4_initStream', 'sub_40136B': 'LZ4_compressBound', 'sub_40123D': 'LZ4_read_ARCH', 'sub_401208': 'LZ4_isLittleEndian', 'sub_40122D': 'LZ4_read32', 'sub_4012CB': 'LZ4_writeLE16', 'sub_401325': 'LZ4_NbCommonBytes', 'sub_40121C': 'LZ4_read16', 'sub_40126A': 'LZ4_write32'}"} |
|
eloop_unregister_sock | d49ce72d4b74e6bfd63dd52b7af9d46c7505c6b4d001e2dc0bb3777fffdd652c | vanhoefm | apbleed | NA | void eloop_unregister_sock(int sock, eloop_event_type type)
{
struct eloop_sock_table *table;
table = eloop_get_sock_table(type);
eloop_sock_table_remove_sock(table, sock);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40B41B", "function_addr": 4240411, "binary_name": "d49ce72d4b74e6bfd63dd52b7af9d46c7505c6b4d001e2dc0bb3777fffdd652c.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 eax, [rbp+var_18]"], [6, "mov edi, eax"], [7, "call sub_40B377"], [8, "mov [rbp+var_8], rax"], [9, "mov edx, [rbp+var_14]"], [10, "mov rax, [rbp+var_8]"], [11, "mov esi, edx"], [12, "mov rdi, rax"], [13, "call sub_40AF10"], [14, "nop"], [15, "leave"], [16, "retn"]], "data_dep": [[5, 4], [6, 5], [8, 7], [9, 3], [10, 8], [11, 9], [12, 10], [16, 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/d49ce72d4b74e6bfd63dd52b7af9d46c7505c6b4d001e2dc0bb3777fffdd652c_d49ce72d4b74e6bfd63dd52b7af9d46c7505c6b4d001e2dc0bb3777fffdd652c.jsonl.gz", "strip_func_name": "sub_40B41B", "query": "\n\n\nunsigned int *__fastcall sub_40B41B(int a1, unsigned int a2)\n{\nint *v3; // [rsp+18h] [rbp-8h]\n\nv3 = sub_40B377(a2);\nreturn sub_40AF10((unsigned int *)v3, a1);\n}\n\n\n\nQ:[a1,a2,v3,sub_40B41B,sub_40B377,sub_40AF10,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'sock', 'a2': 'type', 'v3': 'table', 'sub_40B41B': 'eloop_unregister_sock', 'sub_40B377': 'eloop_get_sock_table', 'sub_40AF10': 'eloop_sock_table_remove_sock'}"} |
|
i2c_stop | f223df43e71fd244b2d3fc8309aa4a9e557a38d76ce9c8ff7a1df98b1c82c5e4 | olikraus | u8g2 | NA | static void i2c_stop(u8x8_t *u8x8)
{
/* set SDA to 0 */
i2c_clear_sda(u8x8);
i2c_delay(u8x8);
/* now release all lines */
i2c_read_scl_and_delay(u8x8);
/* set SDA to 1 */
i2c_read_sda(u8x8);
i2c_delay(u8x8);
u8x8->i2c_started = 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_437DF0", "function_addr": 4423152, "binary_name": "f223df43e71fd244b2d3fc8309aa4a9e557a38d76ce9c8ff7a1df98b1c82c5e4.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_437D54"], [7, "mov rax, [rbp+var_8]"], [8, "mov rdi, rax"], [9, "call sub_437C64"], [10, "mov rax, [rbp+var_8]"], [11, "mov rdi, rax"], [12, "call sub_437CD9"], [13, "mov rax, [rbp+var_8]"], [14, "mov rdi, rax"], [15, "call sub_437D2F"], [16, "mov rax, [rbp+var_8]"], [17, "mov rdi, rax"], [18, "call sub_437C64"], [19, "mov rax, [rbp+var_8]"], [20, "mov byte ptr [rax+45h], 0"], [21, "nop"], [22, "leave"], [23, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 3], [8, 7], [10, 3], [11, 10], [13, 3], [14, 13], [16, 3], [17, 16], [19, 3], [20, 19], [23, 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/f223df43e71fd244b2d3fc8309aa4a9e557a38d76ce9c8ff7a1df98b1c82c5e4_f223df43e71fd244b2d3fc8309aa4a9e557a38d76ce9c8ff7a1df98b1c82c5e4.jsonl.gz", "strip_func_name": "sub_437DF0", "query": "\n\n\n__int64 __fastcall sub_437DF0(__int64 a1)\n{\n__int64 result; // rax\n\nsub_437D54(a1);\nsub_437C64(a1);\nsub_437CD9(a1);\nsub_437D2F(a1);\nsub_437C64(a1);\nresult = a1;\n*(_BYTE *)(a1 + 69) = 0;\nreturn result;\n}\n\n\n\nQ:[a1,sub_437DF0,sub_437D54,sub_437C64,sub_437CD9,sub_437D2F,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'u8x8', 'sub_437DF0': 'i2c_stop', 'sub_437D54': 'i2c_clear_sda', 'sub_437C64': 'i2c_delay', 'sub_437CD9': 'i2c_read_scl_and_delay', 'sub_437D2F': 'i2c_read_sda'}"} |
|
get_new_cts_state | 1c57951629eaf9c2a56a3776346f70122e53a2482ca8c37826f2035344e94b48 | FozzTexx | tcpser | NA | int get_new_cts_state(modem_config *cfg, int up)
{
return MDM_CL_CTS_HIGH;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_406CDA", "function_addr": 4222170, "binary_name": "1c57951629eaf9c2a56a3776346f70122e53a2482ca8c37826f2035344e94b48.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov [rbp+var_C], esi"], [4, "mov eax, 4"], [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/1c57951629eaf9c2a56a3776346f70122e53a2482ca8c37826f2035344e94b48_1c57951629eaf9c2a56a3776346f70122e53a2482ca8c37826f2035344e94b48.jsonl.gz", "strip_func_name": "sub_406CDA", "query": "\n\n\n__int64 sub_406CDA()\n{\nreturn 4LL;\n}\n\n\n\nQ:[sub_406CDA,]\nAssistant: ", "hints": "[]", "response": "{'sub_406CDA': 'get_new_cts_state'}"} |
|
OGCreateThread | 74428ba179aa977faebf42e9f90931c5fe841a5ac85968d713c2808efe494055 | cnlohr | fx3fun | NA | og_thread_t OGCreateThread( void * (routine)( void * ), void * parameter )
{
pthread_t * ret = malloc( sizeof( pthread_t ) );
int r = pthread_create( ret, 0, routine, parameter );
if( r )
{
free( ret );
return 0;
}
return (og_thread_t)ret;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40284F", "function_addr": 4204623, "binary_name": "74428ba179aa977faebf42e9f90931c5fe841a5ac85968d713c2808efe494055.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+start_routine], rdi"], [4, "mov [rbp+arg], rsi"], [5, "mov edi, 8"], [6, "call _malloc"], [7, "mov [rbp+newthread], rax"], [8, "mov rcx, [rbp+arg]"], [9, "mov rdx, [rbp+start_routine]"], [10, "mov rax, [rbp+newthread]"], [11, "mov esi, 0"], [12, "mov rdi, rax"], [13, "call _pthread_create"], [14, "mov [rbp+var_C], eax"], [15, "cmp [rbp+var_C], 0"], [16, "jz short loc_4028A2"], [17, "mov rax, [rbp+newthread]"], [18, "mov rdi, rax"], [19, "call _free"], [20, "mov eax, 0"], [21, "jmp short locret_4028A6"], [22, "mov rax, [rbp+newthread]"], [23, "leave"], [24, "retn"]], "data_dep": [[7, 6], [8, 4], [9, 3], [10, 7], [12, 10], [14, 13], [15, 14], [16, 15], [17, 7], [18, 17], [22, 7], [24, 20], [24, 22]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/74428ba179aa977faebf42e9f90931c5fe841a5ac85968d713c2808efe494055_74428ba179aa977faebf42e9f90931c5fe841a5ac85968d713c2808efe494055.jsonl.gz", "strip_func_name": "sub_40284F", "query": "\n\n\npthread_t *__fastcall sub_40284F(void *(*a1)(void *), void *a2)\n{\npthread_t *newthread; // [rsp+18h] [rbp-8h]\n\nnewthread = (pthread_t *)malloc(8uLL);\nif ( !pthread_create(newthread, 0LL, a1, a2) )\nreturn newthread;\nfree(newthread);\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,sub_40284F,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'routine', 'a2': 'parameter', 'sub_40284F': 'OGCreateThread'}"} |
|
sdp_client_notify_callbacks | 9b77144fc462e220c73de576c69ed0fe3d0a9aae6d065dbec16cb7a57190910d | Matheus-Garbelini | esp32_bluetooth_classic_sniffer | NA | static void sdp_client_notify_callbacks(void){
if (sdp_client_ready() == false) {
return;
}
btstack_context_callback_registration_t * callback = (btstack_context_callback_registration_t*) btstack_linked_list_pop(&sdp_client_query_requests);
if (callback == NULL) {
return;
}
(*callback->callback)(callback->context);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43CF24", "function_addr": 4443940, "binary_name": "9b77144fc462e220c73de576c69ed0fe3d0a9aae6d065dbec16cb7a57190910d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "call sub_43D689"], [4, "xor eax, 1"], [5, "test al, al"], [6, "jnz short loc_43CF64"], [7, "mov edi, offset unk_47EDD0"], [8, "call sub_40A115"], [9, "mov [rbp+var_8], rax"], [10, "cmp [rbp+var_8], 0"], [11, "jz short loc_43CF67"], [12, "mov rax, [rbp+var_8]"], [13, "mov rdx, [rax+8]"], [14, "mov rax, [rbp+var_8]"], [15, "mov rax, [rax+10h]"], [16, "mov rdi, rax"], [17, "call rdx"], [18, "jmp short locret_43CF68"], [19, "nop"], [20, "jmp short locret_43CF68"], [21, "nop"], [22, "leave"], [23, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [9, 8], [10, 9], [11, 10], [12, 9], [13, 12], [14, 9], [15, 14], [16, 15], [17, 13], [23, 17], [23, 5], [23, 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/9b77144fc462e220c73de576c69ed0fe3d0a9aae6d065dbec16cb7a57190910d_9b77144fc462e220c73de576c69ed0fe3d0a9aae6d065dbec16cb7a57190910d.jsonl.gz", "strip_func_name": "sub_43CF24", "query": "\n\n\n__int64 sub_43CF24()\n{\n__int64 result; // rax\n\nresult = (unsigned int)sub_43D689() ^ 1;\nif ( !(_BYTE)result )\n{\nresult = (__int64)sub_40A115((_QWORD **)&unk_47EDD0);\nif ( result )\nresult = (*(__int64 (__fastcall **)(_QWORD))(result + 8))(*(_QWORD *)(result + 16));\n}\nreturn result;\n}\n\n\n\nQ:[sub_43CF24,sub_43D689,sub_40A115,]\nAssistant: ", "hints": "[]", "response": "{'sub_43CF24': 'sdp_client_notify_callbacks', 'sub_43D689': 'sdp_client_ready', 'sub_40A115': 'btstack_linked_list_pop'}"} |
|
lua_remove | b86b9dfd33c8275007edda4b6afebf56ee91c8c3162c3011a34e3c9568bed96c | erikdubbelboer | libuv-lua-http-server | NA | static void lua_remove(lua_State*L,int idx){
StkId p;
p=index2adr(L,idx);
api_checkvalidindex(L,p);
while(++p<L->top)setobj(L,p-1,p);
L->top--;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_414E5A", "function_addr": 4279898, "binary_name": "b86b9dfd33c8275007edda4b6afebf56ee91c8c3162c3011a34e3c9568bed96c.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_2C], esi"], [5, "mov edx, [rbp+var_2C]"], [6, "mov rax, [rbp+var_28]"], [7, "mov esi, edx"], [8, "mov rdi, rax"], [9, "call sub_414AFE"], [10, "mov [rbp+var_8], rax"], [11, "jmp short loc_414EB0"], [12, "mov rax, [rbp+var_8]"], [13, "mov [rbp+var_10], rax"], [14, "mov rax, [rbp+var_8]"], [15, "sub rax, 10h"], [16, "mov [rbp+var_18], rax"], [17, "mov rax, [rbp+var_18]"], [18, "mov rdx, [rbp+var_10]"], [19, "mov rdx, [rdx]"], [20, "mov [rax], rdx"], [21, "mov rax, [rbp+var_10]"], [22, "mov edx, [rax+8]"], [23, "mov rax, [rbp+var_18]"], [24, "mov [rax+8], edx"], [25, "add [rbp+var_8], 10h"], [26, "mov rax, [rbp+var_28]"], [27, "mov rax, [rax+10h]"], [28, "cmp [rbp+var_8], rax"], [29, "jb short loc_414E80"], [30, "mov rax, [rbp+var_28]"], [31, "mov rax, [rax+10h]"], [32, "lea rdx, [rax-10h]"], [33, "mov rax, [rbp+var_28]"], [34, "mov [rax+10h], rdx"], [35, "nop"], [36, "leave"], [37, "retn"]], "data_dep": [[5, 4], [6, 3], [7, 5], [8, 6], [10, 9], [12, 25], [13, 12], [14, 25], [15, 14], [16, 15], [17, 16], [18, 13], [19, 18], [19, 24], [19, 20], [20, 17], [20, 19], [21, 13], [22, 20], [22, 21], [22, 24], [23, 16], [24, 23], [24, 22], [25, 10], [25, 25], [26, 3], [27, 24], [27, 20], [27, 26], [28, 27], [28, 25], [29, 28], [30, 3], [31, 20], [31, 34], [31, 24], [31, 30], [32, 31], [32, 34], [32, 24], [32, 5], [32, 20], [32, 22], [33, 3], [34, 33], [34, 32], [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/b86b9dfd33c8275007edda4b6afebf56ee91c8c3162c3011a34e3c9568bed96c_b86b9dfd33c8275007edda4b6afebf56ee91c8c3162c3011a34e3c9568bed96c.jsonl.gz", "strip_func_name": "sub_414E5A", "query": "\n\n\n__int64 __fastcall sub_414E5A(__int64 a1, int a2)\n{\n__int64 result; // rax\n_DWORD *i; // [rsp+28h] [rbp-8h]\n\nfor ( i = sub_414AFE(a1, a2); ; *(i - 2) = i[2] )\n{\ni += 4;\nif ( (unsigned __int64)i >= *(_QWORD *)(a1 + 16) )\nbreak;\n*((_QWORD *)i - 2) = *(_QWORD *)i;\n}\nresult = a1;\n*(_QWORD *)(a1 + 16) -= 16LL;\nreturn result;\n}\n\n\n\nQ:[a1,a2,i,sub_414E5A,sub_414AFE,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'L', 'a2': 'idx', 'i': 'p', 'sub_414E5A': 'lua_remove', 'sub_414AFE': 'index2adr'}"} |
|
sim_tape_add_dos11_entry | 52f1da104c77cf2534115453b0acfa2fd0959e3e1f5afe1e26cf18ea69b902cc | open-simh | simh | NA | static void sim_tape_add_dos11_entry (const char *directory,
const char *filename,
t_offset FileSize,
const struct stat *filestat,
void *context)
{
MEMORY_TAPE *tape = (MEMORY_TAPE *)context;
char FullPath[PATH_MAX + 1];
FILE *f;
size_t max_record_size;
t_bool lf_line_endings;
t_bool crlf_line_endings;
uint8 *block = NULL;
int error = 0;
DOS11_HDR hdr;
char fname[9], ext[3];
const char *ptr;
struct tm *tm;
time_t filetime;
uint16 fileday;
int year;
/*
* Compute a suitable year for file creation date. This year will have the
* same calendar as the current year but will be in the 20th century so that
* DOS/BATCH-11 will be able to interpret it correctly.
*/
filetime = (time_t)filestat->st_ctime;
tm = localtime (&filetime);
year = tm->tm_year + 1900;
while (year >= 2000)
year -= 28;
fileday = 1000 * ((year - 70) % 100) + tm->tm_yday + 1;
sprintf (FullPath, "%s%s", directory, filename);
f = tape_open_and_check_file (FullPath);
if (f == NULL)
return;
tape_classify_file_contents (f, &max_record_size, &lf_line_endings, &crlf_line_endings);
memset (&hdr, 0, sizeof (hdr));
memset (fname, ' ', sizeof (fname));
memset (ext, ' ', sizeof (ext));
dos11_sanitize (fname, sizeof (fname), filename);
ptr = strchr (filename, '.');
if (ptr != NULL)
dos11_sanitize (ext, sizeof (ext), ++ptr);
/*
* If we were unable to generate a valid DOS11 filename, generate one based
* on the file number on the tape (000000 - 999999).
*/
if (fname[0] == ' ') {
char temp[10];
sprintf(temp, "%06u ", tape->file_count % 100000);
memcpy(fname, temp, sizeof(fname));
}
hdr.fname[0] = dos11_ascR50 (&fname[0]);
hdr.fname[1] = dos11_ascR50 (&fname[3]);
hdr.ext = dos11_ascR50 (&ext[0]);
hdr.prog = 1;
hdr.proj = 1;
hdr.prot = DOS11_PROT;
hdr.date = fileday;
hdr.fname3 = dos11_ascR50 (&fname[6]);
memory_tape_add_block (tape, (uint8 *)&hdr, sizeof (hdr));
rewind (f);
block = (uint8 *)calloc (tape->block_size, 1);
if (lf_line_endings || crlf_line_endings)
error = dos11_copy_ascii_file (f, tape, (char *)block, tape->block_size);
else {
size_t data_read;
while (!feof (f) && !error) {
data_read = fread (block, 1, tape->block_size, f);
if (data_read > 0)
error = memory_tape_add_block (tape, block, data_read);
}
}
fclose (f);
free (block);
if (error)
sim_messagef (SCPE_IERR, "Error processing input file %s\n", FullPath);
memory_tape_add_block (tape, NULL, 0); /* Tape Mark */
++tape->file_count;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_47BA42", "function_addr": 4700738, "binary_name": "52f1da104c77cf2534115453b0acfa2fd0959e3e1f5afe1e26cf18ea69b902cc.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10D0h"], [3, "mov [rbp+var_10A8], rdi"], [4, "mov [rbp+var_10B0], rsi"], [5, "mov [rbp+var_10B8], rdx"], [6, "mov [rbp+var_10C0], rcx"], [7, "mov [rbp+var_10C8], r8"], [8, "mov rax, [rbp+var_10C8]"], [9, "mov [rbp+var_10], rax"], [10, "mov [rbp+ptr], 0"], [11, "mov [rbp+var_4], 0"], [12, "mov rax, [rbp+var_10C0]"], [13, "mov rax, [rax+68h]"], [14, "mov [rbp+timer], rax"], [15, "lea rax, [rbp+timer]"], [16, "mov rdi, rax"], [17, "call _localtime"], [18, "mov [rbp+var_20], rax"], [19, "mov rax, [rbp+var_20]"], [20, "mov eax, [rax+14h]"], [21, "add eax, 76Ch"], [22, "mov [rbp+var_8], eax"], [23, "jmp short loc_47BAC4"], [24, "sub [rbp+var_8], 1Ch"], [25, "cmp [rbp+var_8], 7CFh"], [26, "jg short loc_47BAC0"], [27, "mov eax, [rbp+var_8]"], [28, "lea edx, [rax-46h]"], [29, "movsxd rax, edx"], [30, "imul rax, 51EB851Fh"], [31, "shr rax, 20h"], [32, "sar eax, 5"], [33, "mov ecx, edx"], [34, "sar ecx, 1Fh"], [35, "sub eax, ecx"], [36, "imul ecx, eax, 64h "], [37, "mov eax, edx"], [38, "sub eax, ecx"], [39, "imul dx, ax, 3E8h"], [40, "mov rax, [rbp+var_20]"], [41, "mov eax, [rax+1Ch]"], [42, "add eax, edx"], [43, "add eax, 1"], [44, "mov [rbp+var_22], ax"], [45, "mov rcx, [rbp+var_10B0]"], [46, "mov rdx, [rbp+var_10A8]"], [47, "lea rax, [rbp+s]"], [48, "mov esi, offset aSS_22"], [49, "mov rdi, rax"], [50, "mov eax, 0"], [51, "call _sprintf"], [52, "lea rax, [rbp+s]"], [53, "mov rdi, rax"], [54, "call sub_47BE38"], [55, "mov [rbp+stream], rax"], [56, "cmp [rbp+stream], 0"], [57, "jz loc_47BE35"], [58, "lea rcx, [rbp+var_1060]"], [59, "lea rdx, [rbp+var_105C]"], [60, "lea rsi, [rbp+var_1058]"], [61, "mov rax, [rbp+stream]"], [62, "mov rdi, rax"], [63, "call sub_47BF6B"], [64, "lea rax, [rbp+var_106E]"], [65, "mov edx, 0Eh"], [66, "mov esi, 0"], [67, "mov rdi, rax"], [68, "call _memset"], [69, "lea rax, [rbp+var_1077]"], [70, "mov edx, 9"], [71, "mov esi, 20h "], [72, "mov rdi, rax"], [73, "call _memset"], [74, "lea rax, [rbp+var_107A]"], [75, "mov edx, 3"], [76, "mov esi, 20h "], [77, "mov rdi, rax"], [78, "call _memset"], [79, "mov rdx, [rbp+var_10B0]"], [80, "lea rax, [rbp+var_1077]"], [81, "mov esi, 9"], [82, "mov rdi, rax"], [83, "call sub_47B789"], [84, "mov rax, [rbp+var_10B0]"], [85, "mov esi, 2Eh "], [86, "mov rdi, rax"], [87, "call _strchr"], [88, "mov [rbp+var_38], rax"], [89, "cmp [rbp+var_38], 0"], [90, "jz short loc_47BC0F"], [91, "add [rbp+var_38], 1"], [92, "mov rdx, [rbp+var_38]"], [93, "lea rax, [rbp+var_107A]"], [94, "mov esi, 3"], [95, "mov rdi, rax"], [96, "call sub_47B789"], [97, "movzx eax, byte ptr [rbp+var_1077]"], [98, "cmp al, 20h "], [99, "jnz short loc_47BC76"], [100, "mov rax, [rbp+var_10]"], [101, "mov edx, [rax+4]"], [102, "mov eax, edx"], [103, "shr eax, 5"], [104, "mov eax, eax"], [105, "imul rax, 0A7C5AC5h"], [106, "shr rax, 20h"], [107, "shr eax, 7"], [108, "imul ecx, eax, 186A0h"], [109, "mov eax, edx"], [110, "sub eax, ecx"], [111, "lea rcx, [rbp+var_1092]"], [112, "mov edx, eax"], [113, "mov esi, offset a06u"], [114, "mov rdi, rcx"], [115, "mov eax, 0"], [116, "call _sprintf"], [117, "mov rax, qword ptr [rbp+var_1092]"], [118, "mov [rbp+var_1077], rax"], [119, "movzx eax, [rbp+var_108A]"], [120, "mov [rbp+var_106F], al"], [121, "lea rax, [rbp+var_1077]"], [122, "mov rdi, rax"], [123, "call sub_47B6D9"], [124, "mov [rbp+var_106E], ax"], [125, "lea rax, [rbp+var_1077]"], [126, "add rax, 3"], [127, "mov rdi, rax"], [128, "call sub_47B6D9"], [129, "mov [rbp+var_106C], ax"], [130, "lea rax, [rbp+var_107A]"], [131, "mov rdi, rax"], [132, "call sub_47B6D9"], [133, "mov [rbp+var_106A], ax"], [134, "mov [rbp+var_1068], 1"], [135, "mov [rbp+var_1067], 1"], [136, "mov [rbp+var_1066], 9Bh"], [137, "movzx eax, [rbp+var_22]"], [138, "mov [rbp+var_1064], ax"], [139, "lea rax, [rbp+var_1077]"], [140, "add rax, 6"], [141, "mov rdi, rax"], [142, "call sub_47B6D9"], [143, "mov [rbp+var_1062], ax"], [144, "lea rcx, [rbp+var_106E]"], [145, "mov rax, [rbp+var_10]"], [146, "mov edx, 0Eh"], [147, "mov rsi, rcx"], [148, "mov rdi, rax"], [149, "call sub_47B48E"], [150, "mov rax, [rbp+stream]"], [151, "mov rdi, rax"], [152, "call _rewind"], [153, "mov rax, [rbp+var_10]"], [154, "mov eax, [rax+10h]"], [155, "mov eax, eax"], [156, "mov esi, 1"], [157, "mov rdi, rax"], [158, "call _calloc"], [159, "mov [rbp+ptr], rax"], [160, "mov eax, [rbp+var_105C]"], [161, "test eax, eax"], [162, "jnz short loc_47BD4D"], [163, "mov eax, [rbp+var_1060]"], [164, "test eax, eax"], [165, "jz short loc_47BDBA"], [166, "mov rax, [rbp+var_10]"], [167, "mov eax, [rax+10h]"], [168, "mov ecx, eax"], [169, "mov rdx, [rbp+ptr]"], [170, "mov rsi, [rbp+var_10]"], [171, "mov rax, [rbp+stream]"], [172, "mov rdi, rax"], [173, "call sub_47B7FE"], [174, "mov [rbp+var_4], eax"], [175, "jmp short loc_47BDD0"], [176, "mov rax, [rbp+var_10]"], [177, "mov eax, [rax+10h]"], [178, "mov esi, eax"], [179, "mov rdx, [rbp+stream]"], [180, "mov rax, [rbp+ptr]"], [181, "mov rcx, rdx"], [182, "mov rdx, rsi"], [183, "mov esi, 1"], [184, "mov rdi, rax"], [185, "call _fread"], [186, "mov [rbp+var_40], rax"], [187, "cmp [rbp+var_40], 0"], [188, "jz short loc_47BDBA"], [189, "mov rax, [rbp+var_40]"], [190, "mov edx, eax"], [191, "mov rcx, [rbp+ptr]"], [192, "mov rax, [rbp+var_10]"], [193, "mov rsi, rcx"], [194, "mov rdi, rax"], [195, "call sub_47B48E"], [196, "mov [rbp+var_4], eax"], [197, "mov rax, [rbp+stream]"], [198, "mov rdi, rax"], [199, "call _feof"], [200, "test eax, eax"], [201, "jnz short loc_47BDD0"], [202, "cmp [rbp+var_4], 0"], [203, "jz short loc_47BD6F"], [204, "mov rax, [rbp+stream]"], [205, "mov rdi, rax"], [206, "call _fclose"], [207, "mov rax, [rbp+ptr]"], [208, "mov rdi, rax"], [209, "call _free"], [210, "cmp [rbp+var_4], 0"], [211, "jz short loc_47BE0C"], [212, "lea rax, [rbp+s]"], [213, "mov rdx, rax"], [214, "mov esi, offset aErrorProcessin"], [215, "mov edi, 65h "], [216, "mov eax, 0"], [217, "call sub_439970"], [218, "mov rax, [rbp+var_10]"], [219, "mov edx, 0"], [220, "mov esi, 0"], [221, "mov rdi, rax"], [222, "call sub_47B48E"], [223, "mov rax, [rbp+var_10]"], [224, "mov eax, [rax+4]"], [225, "lea edx, [rax+1]"], [226, "mov rax, [rbp+var_10]"], [227, "mov [rax+4], edx"], [228, "jmp short locret_47BE36"], [229, "nop"], [230, "leave"], [231, "retn"]], "data_dep": [[8, 7], [9, 8], [12, 6], [13, 12], [14, 13], [15, 14], [15, 13], [16, 15], [18, 17], [19, 18], [20, 19], [21, 20], [22, 21], [24, 22], [24, 24], [25, 22], [25, 24], [26, 25], [27, 22], [27, 24], [28, 27], [29, 28], [30, 29], [31, 30], [32, 31], [33, 28], [34, 33], [35, 32], [35, 34], [36, 34], [36, 35], [37, 28], [38, 36], [38, 37], [39, 28], [39, 38], [40, 18], [41, 40], [42, 39], [42, 41], [43, 42], [44, 43], [45, 4], [46, 3], [47, 43], [49, 47], [52, 51], [53, 52], [55, 54], [56, 55], [57, 56], [58, 45], [59, 46], [60, 48], [61, 55], [62, 61], [64, 63], [67, 64], [69, 68], [72, 69], [74, 73], [77, 74], [79, 4], [80, 78], [82, 80], [84, 4], [86, 84], [88, 87], [89, 88], [90, 89], [91, 88], [92, 91], [93, 87], [95, 93], [98, 97], [99, 98], [100, 9], [101, 100], [102, 101], [103, 102], [104, 103], [105, 104], [106, 105], [107, 106], [108, 107], [108, 58], [109, 101], [110, 109], [110, 108], [111, 108], [112, 110], [114, 111], [118, 117], [120, 119], [121, 119], [121, 118], [121, 97], [122, 121], [124, 123], [125, 123], [125, 118], [126, 125], [127, 126], [129, 128], [130, 128], [131, 130], [133, 132], [137, 44], [138, 137], [139, 137], [139, 118], [140, 139], [141, 140], [143, 142], [144, 111], [144, 58], [144, 124], [145, 9], [147, 144], [148, 145], [150, 55], [151, 150], [153, 9], [154, 153], [155, 154], [157, 155], [159, 158], [161, 160], [162, 161], [164, 163], [165, 164], [166, 9], [167, 166], [168, 167], [169, 159], [170, 9], [171, 55], [172, 171], [174, 173], [176, 9], [177, 176], [178, 177], [179, 55], [180, 159], [181, 179], [182, 178], [184, 180], [186, 185], [187, 186], [188, 187], [189, 186], [190, 189], [191, 159], [192, 9], [193, 191], [194, 192], [196, 195], [197, 55], [198, 197], [200, 199], [201, 200], [202, 11], [202, 196], [203, 202], [204, 55], [205, 204], [207, 159], [208, 207], [210, 196], [210, 174], [210, 11], [211, 210], [212, 209], [213, 212], [218, 9], [221, 218], [223, 9], [224, 223], [225, 224], [225, 219], [226, 9], [227, 225], [227, 226], [231, 226], [231, 54]]}
| {"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/52f1da104c77cf2534115453b0acfa2fd0959e3e1f5afe1e26cf18ea69b902cc_52f1da104c77cf2534115453b0acfa2fd0959e3e1f5afe1e26cf18ea69b902cc.jsonl.gz", "strip_func_name": "sub_47BA42", "query": "\n\n\nFILE *__fastcall sub_47BA42(const char *a1, char *a2, __int64 a3, __int64 a4, __int64 a5)\n{\nFILE *result; // rax\n__int64 v6; // r8\n__int64 v7; // r9\n__int64 v8; // r8\n__int64 v9; // r9\n__int64 v10; // rcx\n__int64 v11; // r8\n__int64 v12; // r9\nchar v13[8]; // [rsp+3Eh] [rbp-1092h] BYREF\nchar v14; // [rsp+46h] [rbp-108Ah]\ntime_t timer; // [rsp+48h] [rbp-1088h] BYREF\nchar v16[3]; // [rsp+56h] [rbp-107Ah] BYREF\n__int64 v17; // [rsp+59h] [rbp-1077h] BYREF\nchar v18; // [rsp+61h] [rbp-106Fh]\n__int16 v19[3]; // [rsp+62h] [rbp-106Eh] BYREF\nchar v20; // [rsp+68h] [rbp-1068h]\nchar v21; // [rsp+69h] [rbp-1067h]\n__int16 v22; // [rsp+6Ah] [rbp-1066h]\n__int16 v23; // [rsp+6Ch] [rbp-1064h]\n__int16 v24; // [rsp+6Eh] [rbp-1062h]\nint v25; // [rsp+70h] [rbp-1060h] BYREF\nint v26; // [rsp+74h] [rbp-105Ch] BYREF\nchar v27[8]; // [rsp+78h] [rbp-1058h] BYREF\nchar s[4112]; // [rsp+80h] [rbp-1050h] BYREF\nsize_t v29; // [rsp+1090h] [rbp-40h]\nchar *v30; // [rsp+1098h] [rbp-38h]\nFILE *stream; // [rsp+10A0h] [rbp-30h]\n__int16 v32; // [rsp+10AEh] [rbp-22h]\nstruct tm *v33; // [rsp+10B0h] [rbp-20h]\nvoid *ptr; // [rsp+10B8h] [rbp-18h]\n__int64 v35; // [rsp+10C0h] [rbp-10h]\nint i; // [rsp+10C8h] [rbp-8h]\nint v37; // [rsp+10CCh] [rbp-4h]\n\nv35 = a5;\nptr = 0LL;\nv37 = 0;\ntimer = *(_QWORD *)(a4 + 104);\nv33 = localtime(&timer);\nfor ( i = v33->tm_year + 1900; i > 1999; i -= 28 )\n;\nv32 = 1000 * ((__int16)(i - 70) % 100) + LOWORD(v33->tm_yday) + 1;\nsprintf(s, \"%s%s\", a1, a2);\nresult = (FILE *)sub_47BE38(s);\nstream = result;\nif ( result )\n{\nsub_47BF6B(stream, v27, &v26, &v25);\nmemset(v19, 0, 0xEuLL);\nmemset(&v17, 32, 9uLL);\nmemset(v16, 32, sizeof(v16));\nsub_47B789(&v17, 9, a2);\nv30 = strchr(a2, 46);\nif ( v30 )\nsub_47B789(v16, 3, ++v30);\nif ( (_BYTE)v17 == 32 )\n{\nsprintf(v13, \"%06u \", *(_DWORD *)(v35 + 4) % 0x186A0u);\nv17 = *(_QWORD *)v13;\nv18 = v14;\n}\nv19[0] = sub_47B6D9((char *)&v17);\nv19[1] = sub_47B6D9((char *)&v17 + 3);\nv19[2] = sub_47B6D9(v16);\nv20 = 1;\nv21 = 1;\nv22 = 155;\nv23 = v32;\nv24 = sub_47B6D9((char *)&v17 + 6);\nsub_47B48E(v35, v19, 0xEu, (__int64)v19, v6, v7);\nrewind(stream);\nptr = calloc(*(unsigned int *)(v35 + 16), 1uLL);\nif ( v26 || v25 )\n{\nv37 = sub_47B7FE(stream, v35, ptr, *(unsigned int *)(v35 + 16));\n}\nelse\n{\nwhile ( !feof(stream) && !v37 )\n{\nv29 = fread(ptr, 1uLL, *(unsigned int *)(v35 + 16), stream);\nif ( v29 )\nv37 = sub_47B48E(v35, ptr, v29, (__int64)ptr, v8, v9);\n}\n}\nfclose(stream);\nfree(ptr);\nif ( v37 )\nsub_439970(101, \"Error processing input file %s\\n\", (__int64)s, v10, v11, v12);\nsub_47B48E(v35, 0LL, 0, v10, v11, v12);\nresult = (FILE *)v35;\n++*(_DWORD *)(v35 + 4);\n}\nreturn result;\n}\n\n\n\nQ:[a4,a1,a2,a5,a3,v11,v10,v13,timer,v16,v17,v19,v25,v26,v27,s,v29,v30,stream,v32,v33,ptr,v35,i,v37,sub_47BA42,sub_47BE38,sub_47BF6B,sub_47B789,sub_47B6D9,sub_47B48E,sub_47B7FE,sub_439970,]\nAssistant: ", "hints": "[]", "response": "{'a4': 'filestat', 'a1': 'directory', 'a2': 'filename', 'a5': 'context', 'a3': 'FileSize', 'v11': 'context', 'v10': 'filestat', 'v13': 'temp', 'timer': 'filetime', 'v16': 'ext', 'v17': 'fname', 'v19': 'hdr', 'v25': 'crlf_line_endings', 'v26': 'lf_line_endings', 'v27': 'max_record_size', 's': 'FullPath', 'v29': 'data_read', 'v30': 'ptr', 'stream': 'f', 'v32': 'fileday', 'v33': 'tm', 'ptr': 'block', 'v35': 'tape', 'i': 'year', 'v37': 'error', 'sub_47BA42': 'sim_tape_add_dos11_entry', 'sub_47BE38': 'tape_open_and_check_file', 'sub_47BF6B': 'tape_classify_file_contents', 'sub_47B789': 'dos11_sanitize', 'sub_47B6D9': 'dos11_ascR50', 'sub_47B48E': 'memory_tape_add_block', 'sub_47B7FE': 'dos11_copy_ascii_file', 'sub_439970': 'sim_messagef'}"} |
|
get_bind_to_device | 9a7206758cb70f11cebe990b5e54789b6be64c18158c9359e506e166ec7e6b21 | intel | mOS | NA | static int get_bind_to_device(int sd, char *name, size_t len)
{
int rc;
socklen_t optlen = len;
name[0] = '\0';
rc = getsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, name, &optlen);
if (rc < 0)
log_err_errno("setsockopt(SO_BINDTODEVICE)");
return rc;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402E46", "function_addr": 4206150, "binary_name": "9a7206758cb70f11cebe990b5e54789b6be64c18158c9359e506e166ec7e6b21.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+fd], edi"], [4, "mov [rbp+optval], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "mov rax, [rbp+var_28]"], [7, "mov [rbp+optlen], eax"], [8, "mov rax, [rbp+optval]"], [9, "mov byte ptr [rax], 0"], [10, "lea rcx, [rbp+optlen]"], [11, "mov rdx, [rbp+optval]"], [12, "mov eax, [rbp+fd]"], [13, "mov r8, rcx"], [14, "mov rcx, rdx"], [15, "mov edx, 19h"], [16, "mov esi, 1"], [17, "mov edi, eax"], [18, "call _getsockopt"], [19, "mov [rbp+var_4], eax"], [20, "cmp [rbp+var_4], 0"], [21, "jns short loc_402EA1"], [22, "mov edi, offset aSetsockoptSoBi"], [23, "mov eax, 0"], [24, "call sub_402796"], [25, "mov eax, [rbp+var_4]"], [26, "leave"], [27, "retn"]], "data_dep": [[6, 5], [7, 6], [8, 4], [9, 8], [10, 7], [11, 4], [12, 3], [13, 10], [14, 11], [17, 12], [19, 18], [20, 19], [21, 20], [25, 19], [27, 25]]}
| {"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/9a7206758cb70f11cebe990b5e54789b6be64c18158c9359e506e166ec7e6b21_9a7206758cb70f11cebe990b5e54789b6be64c18158c9359e506e166ec7e6b21.jsonl.gz", "strip_func_name": "sub_402E46", "query": "\n\n\n__int64 __fastcall sub_402E46(int a1, _BYTE *a2, socklen_t a3)\n{\n__int64 v3; // rdx\n__int64 v4; // rcx\n__int64 v5; // r8\n__int64 v6; // r9\nsocklen_t optlen; // [rsp+28h] [rbp-8h] BYREF\nint v9; // [rsp+2Ch] [rbp-4h]\n\noptlen = a3;\n*a2 = 0;\nv9 = getsockopt(a1, 1, 25, a2, &optlen);\nif ( v9 < 0 )\nsub_402796(\"setsockopt(SO_BINDTODEVICE)\", 1LL, v3, v4, v5, v6);\nreturn (unsigned int)v9;\n}\n\n\n\nQ:[a3,a1,a2,v3,v9,sub_402E46,sub_402796,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'len', 'a1': 'sd', 'a2': 'name', 'v3': 'len', 'v9': 'rc', 'sub_402E46': 'get_bind_to_device', 'sub_402796': 'log_err_errno'}"} |
|
exported_names_cmp | bff35f3b7ff0bbf5e5e52ae6499ba776520880a991546f99df7df7f4351bfb13 | sunnyxx | quickjs-debug | NA | static int exported_names_cmp(const void *p1, const void *p2, void *opaque)
{
JSContext *ctx = opaque;
const ExportedNameEntry *me1 = p1;
const ExportedNameEntry *me2 = p2;
JSValue str1, str2;
int ret;
/* XXX: should avoid allocation memory in atom comparison */
str1 = JS_AtomToString(ctx, me1->export_name);
str2 = JS_AtomToString(ctx, me2->export_name);
if (JS_IsException(str1) || JS_IsException(str2)) {
/* XXX: raise an error ? */
ret = 0;
} else {
ret = js_string_compare(ctx, JS_VALUE_GET_STRING(str1),
JS_VALUE_GET_STRING(str2));
}
JS_FreeValue(ctx, str1);
JS_FreeValue(ctx, str2);
return ret;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_441E3F", "function_addr": 4464191, "binary_name": "bff35f3b7ff0bbf5e5e52ae6499ba776520880a991546f99df7df7f4351bfb13.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 60h"], [3, "mov [rbp+var_48], rdi"], [4, "mov [rbp+var_50], rsi"], [5, "mov [rbp+var_58], rdx"], [6, "mov rax, [rbp+var_58]"], [7, "mov [rbp+var_10], rax"], [8, "mov rax, [rbp+var_48]"], [9, "mov [rbp+var_18], rax"], [10, "mov rax, [rbp+var_50]"], [11, "mov [rbp+var_20], rax"], [12, "mov rax, [rbp+var_18]"], [13, "mov edx, [rax]"], [14, "mov rax, [rbp+var_10]"], [15, "mov esi, edx"], [16, "mov rdi, rax"], [17, "call sub_40878C"], [18, "mov [rbp+var_30], rax"], [19, "mov [rbp+var_28], rdx"], [20, "mov rax, [rbp+var_20]"], [21, "mov edx, [rax]"], [22, "mov rax, [rbp+var_10]"], [23, "mov esi, edx"], [24, "mov rdi, rax"], [25, "call sub_40878C"], [26, "mov [rbp+var_40], rax"], [27, "mov [rbp+var_38], rdx"], [28, "mov rdx, [rbp+var_30]"], [29, "mov rax, [rbp+var_28]"], [30, "mov rdi, rdx"], [31, "mov rsi, rax"], [32, "call sub_405118"], [33, "test eax, eax"], [34, "jnz short loc_441ED1"], [35, "mov rdx, [rbp+var_40]"], [36, "mov rax, [rbp+var_38]"], [37, "mov rdi, rdx"], [38, "mov rsi, rax"], [39, "call sub_405118"], [40, "test eax, eax"], [41, "jz short loc_441EDA"], [42, "mov [rbp+var_4], 0"], [43, "jmp short loc_441EF4"], [44, "mov rdx, [rbp+var_40]"], [45, "mov rcx, [rbp+var_30]"], [46, "mov rax, [rbp+var_10]"], [47, "mov rsi, rcx"], [48, "mov rdi, rax"], [49, "call sub_40B1DA"], [50, "mov [rbp+var_4], eax"], [51, "mov rcx, [rbp+var_30]"], [52, "mov rdx, [rbp+var_28]"], [53, "mov rax, [rbp+var_10]"], [54, "mov rsi, rcx"], [55, "mov rdi, rax"], [56, "call sub_4051CC"], [57, "mov rcx, [rbp+var_40]"], [58, "mov rdx, [rbp+var_38]"], [59, "mov rax, [rbp+var_10]"], [60, "mov rsi, rcx"], [61, "mov rdi, rax"], [62, "call sub_4051CC"], [63, "mov eax, [rbp+var_4]"], [64, "leave"], [65, "retn"]], "data_dep": [[6, 5], [7, 6], [8, 3], [9, 8], [10, 4], [11, 10], [12, 9], [13, 12], [14, 7], [15, 13], [16, 14], [18, 17], [19, 13], [20, 11], [21, 20], [22, 7], [23, 21], [24, 22], [26, 25], [27, 21], [28, 18], [29, 19], [30, 28], [31, 29], [33, 32], [34, 33], [35, 26], [36, 27], [37, 35], [38, 36], [40, 39], [41, 40], [44, 26], [45, 18], [46, 7], [47, 45], [48, 46], [50, 49], [51, 18], [52, 19], [53, 7], [54, 51], [55, 53], [57, 26], [58, 27], [59, 7], [60, 57], [61, 59], [63, 42], [63, 50], [65, 63]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/bff35f3b7ff0bbf5e5e52ae6499ba776520880a991546f99df7df7f4351bfb13_bff35f3b7ff0bbf5e5e52ae6499ba776520880a991546f99df7df7f4351bfb13.jsonl.gz", "strip_func_name": "sub_441E3F", "query": "\n\n\n__int64 __fastcall sub_441E3F(unsigned int *a1, unsigned int *a2, __int64 *a3)\n{\n__int64 v3; // rdx\n__int64 v4; // rdx\n_DWORD *v6; // [rsp+20h] [rbp-40h]\n__int64 v7; // [rsp+28h] [rbp-38h]\n_DWORD *v8; // [rsp+30h] [rbp-30h]\n__int64 v9; // [rsp+38h] [rbp-28h]\nunsigned int v11; // [rsp+5Ch] [rbp-4h]\n\nv8 = sub_40878C(a3, *a1);\nv9 = v3;\nv6 = sub_40878C(a3, *a2);\nv7 = v4;\nif ( sub_405118((__int64)v8, v9) || sub_405118((__int64)v6, v7) )\nv11 = 0;\nelse\nv11 = sub_40B1DA((__int64)a3, (__int64)v8, (__int64)v6);\nsub_4051CC((__int64)a3, v8, v9);\nsub_4051CC((__int64)a3, v6, v7);\nreturn v11;\n}\n\n\n\nQ:[a3,a1,a2,v3,v6,v8,sub_441E3F,sub_40878C,sub_405118,sub_40B1DA,sub_4051CC,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'opaque', 'a1': 'p1', 'a2': 'p2', 'v3': 'opaque', 'v6': 'str2', 'v8': 'str1', 'sub_441E3F': 'exported_names_cmp', 'sub_40878C': 'JS_AtomToString', 'sub_405118': 'JS_IsException_0', 'sub_40B1DA': 'js_string_compare', 'sub_4051CC': 'JS_FreeValue_0'}"} |
|
export_labelfiles | a409f6e7ffbc09a619167b5a9c131be77c0ac2dc4be68404b31ba272dce91bfc | freem | asm6f | NA | void export_labelfiles(void) {
// iterate through all the labels and output FCEUX-compatible label info files
// based on their type (LABEL's,EQUATE's,VALUE's), address (ram/rom), and position (bank)
int i;
int bank;
label *l;
char str[LINEMAX];
char filename[PATH_MAX];
FILE* bankfiles[64];
FILE* ramfile;
char *strptr;
for(i=0;i<64;i++){ bankfiles[i]=0; }
// ram file: <output>.ram.nl
// bank files: <output>.bank#hex.nl
strcpy(filename, outputfilename);
strptr=strrchr(filename,'.'); // strptr ='.'ptr
if(strptr) if(strchr( strptr,'\\' )) strptr = 0; // watch out for "dirname.ext\listfile"
if(!strptr) strptr = filename + strlen(filename); // strptr -> inputfile extension
strcpy(strptr, ".nes.ram.nl");
ramfile=fopen(filename, "w");
// the bank files are created ad-hoc before being written to.
// iNES banks are 16kb. Subtracting the 16 byte header and dividing that by
// 16384 will get us the bank number of a particular label.
// this only applies to labels that are $8000 and up.
// Anything below $8000 is assumed to be RAM.
// todo: include EQUATES for other registers and variables
for(i=labelstart;i<=labelend;i++){
l=labellist[i];
// [freem addition]: handle IGNORENL'd labels
if(l->ignorenl)
continue;
if(
(
l->type==LABEL ||
((l->type==EQUATE || l->type==VALUE) && strlen(l->name) > 1)
)
&& l->value < 0x10000
){
snprintf(str,LINEMAX,"$%04X#%s#\n",(unsigned int)l->value,l->name);
// puts(str);
if(l->value < 0x8000){
// RAM
fwrite((const void *)str,1,strlen(str),ramfile);
}
else{
// ROM
bank=((l->pos - 16)/16384);
if (!bankfiles[bank]){
snprintf(strptr,PATH_MAX,".nes.%X.nl",bank);
bankfiles[bank]=fopen(filename,"w");
}
fwrite((const void *)str,1,strlen(str),bankfiles[bank]);
}
}
}
fclose ( ramfile );
for(i=0;i<64;i++){
if(bankfiles[i]) fclose(bankfiles[i]);
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402892", "function_addr": 4204690, "binary_name": "a409f6e7ffbc09a619167b5a9c131be77c0ac2dc4be68404b31ba272dce91bfc.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 1A38h"], [4, "mov [rbp+var_14], 0"], [5, "jmp short loc_4028BC"], [6, "mov eax, [rbp+var_14]"], [7, "cdqe"], [8, "mov [rbp+rax*8+var_1A40], 0"], [9, "add [rbp+var_14], 1"], [10, "cmp [rbp+var_14], 3Fh "], [11, "jle short loc_4028A7"], [12, "mov rdx, cs:src"], [13, "lea rax, [rbp+dest]"], [14, "mov rsi, rdx"], [15, "mov rdi, rax"], [16, "call _strcpy"], [17, "lea rax, [rbp+dest]"], [18, "mov esi, 2Eh "], [19, "mov rdi, rax"], [20, "call _strrchr"], [21, "mov [rbp+s], rax"], [22, "cmp [rbp+s], 0"], [23, "jz short loc_402918"], [24, "mov rax, [rbp+s]"], [25, "mov esi, 5Ch "], [26, "mov rdi, rax"], [27, "call _strchr"], [28, "test rax, rax"], [29, "jz short loc_402918"], [30, "mov [rbp+s], 0"], [31, "cmp [rbp+s], 0"], [32, "jnz short loc_40293C"], [33, "lea rax, [rbp+dest]"], [34, "mov rdi, rax"], [35, "call _strlen"], [36, "lea rdx, [rbp+dest]"], [37, "add rax, rdx"], [38, "mov [rbp+s], rax"], [39, "mov rax, [rbp+s]"], [40, "mov rbx, 6D61722E73656E2Eh"], [41, "mov [rax], rbx"], [42, "mov dword ptr [rax+8], 6C6E2Eh"], [43, "lea rax, [rbp+dest]"], [44, "mov esi, offset modes"], [45, "mov rdi, rax"], [46, "call _fopen"], [47, "mov [rbp+stream], rax"], [48, "mov eax, cs:dword_410B38"], [49, "mov [rbp+var_14], eax"], [50, "jmp loc_402B1A"], [51, "mov rdx, cs:ptr"], [52, "mov eax, [rbp+var_14]"], [53, "cdqe"], [54, "shl rax, 3"], [55, "add rax, rdx"], [56, "mov rax, [rax]"], [57, "mov [rbp+var_30], rax"], [58, "mov rax, [rbp+var_30]"], [59, "mov eax, [rax+30h]"], [60, "test eax, eax"], [61, "jnz loc_402B15"], [62, "mov rax, [rbp+var_30]"], [63, "mov eax, [rax+20h]"], [64, "test eax, eax"], [65, "jz short loc_4029E3"], [66, "mov rax, [rbp+var_30]"], [67, "mov eax, [rax+20h]"], [68, "cmp eax, 2"], [69, "jz short loc_4029CA"], [70, "mov rax, [rbp+var_30]"], [71, "mov eax, [rax+20h]"], [72, "cmp eax, 1"], [73, "jnz loc_402B16"], [74, "mov rax, [rbp+var_30]"], [75, "mov rax, [rax]"], [76, "mov rdi, rax"], [77, "call _strlen"], [78, "cmp rax, 1"], [79, "jbe loc_402B16"], [80, "mov rax, [rbp+var_30]"], [81, "mov rax, [rax+8]"], [82, "cmp rax, 0FFFFh"], [83, "jg loc_402B16"], [84, "mov rax, [rbp+var_30]"], [85, "mov rdx, [rax]"], [86, "mov rax, [rbp+var_30]"], [87, "mov rax, [rax+8]"], [88, "mov ecx, eax"], [89, "lea rax, [rbp+ptr]"], [90, "mov r8, rdx"], [91, "mov edx, offset format"], [92, "mov esi, 800h"], [93, "mov rdi, rax"], [94, "mov eax, 0"], [95, "call _snprintf"], [96, "mov rax, [rbp+var_30]"], [97, "mov rax, [rax+8]"], [98, "cmp rax, 7FFFh"], [99, "jg short loc_402A6E"], [100, "lea rax, [rbp+ptr]"], [101, "mov rdi, rax"], [102, "call _strlen"], [103, "mov rsi, rax"], [104, "mov rdx, [rbp+stream]"], [105, "lea rax, [rbp+ptr]"], [106, "mov rcx, rdx"], [107, "mov rdx, rsi"], [108, "mov esi, 1"], [109, "mov rdi, rax"], [110, "call _fwrite"], [111, "jmp loc_402B16"], [112, "mov rax, [rbp+var_30]"], [113, "mov eax, [rax+10h]"], [114, "sub eax, 10h"], [115, "lea edx, [rax+3FFFh]"], [116, "test eax, eax"], [117, "cmovs eax, edx"], [118, "sar eax, 0Eh"], [119, "mov [rbp+var_34], eax"], [120, "mov eax, [rbp+var_34]"], [121, "cdqe"], [122, "mov rax, [rbp+rax*8+var_1A40]"], [123, "test rax, rax"], [124, "jnz short loc_402ADD"], [125, "mov edx, [rbp+var_34]"], [126, "mov rax, [rbp+s]"], [127, "mov ecx, edx"], [128, "mov edx, offset aNesXNl"], [129, "mov esi, 1000h"], [130, "mov rdi, rax"], [131, "mov eax, 0"], [132, "call _snprintf"], [133, "lea rax, [rbp+dest]"], [134, "mov esi, offset modes"], [135, "mov rdi, rax"], [136, "call _fopen"], [137, "mov edx, [rbp+var_34]"], [138, "movsxd rdx, edx"], [139, "mov [rbp+rdx*8+var_1A40], rax"], [140, "mov eax, [rbp+var_34]"], [141, "cdqe"], [142, "mov rbx, [rbp+rax*8+var_1A40]"], [143, "lea rax, [rbp+ptr]"], [144, "mov rdi, rax"], [145, "call _strlen"], [146, "mov rdx, rax"], [147, "lea rax, [rbp+ptr]"], [148, "mov rcx, rbx"], [149, "mov esi, 1"], [150, "mov rdi, rax"], [151, "call _fwrite"], [152, "jmp short loc_402B16"], [153, "nop"], [154, "add [rbp+var_14], 1"], [155, "mov eax, cs:dword_410B3C"], [156, "cmp [rbp+var_14], eax"], [157, "jle loc_40297A"], [158, "mov rax, [rbp+stream]"], [159, "mov rdi, rax"], [160, "call _fclose"], [161, "mov [rbp+var_14], 0"], [162, "jmp short loc_402B69"], [163, "mov eax, [rbp+var_14]"], [164, "cdqe"], [165, "mov rax, [rbp+rax*8+var_1A40]"], [166, "test rax, rax"], [167, "jz short loc_402B65"], [168, "mov eax, [rbp+var_14]"], [169, "cdqe"], [170, "mov rax, [rbp+rax*8+var_1A40]"], [171, "mov rdi, rax"], [172, "call _fclose"], [173, "add [rbp+var_14], 1"], [174, "cmp [rbp+var_14], 3Fh "], [175, "jle short loc_402B3E"], [176, "nop"], [177, "nop"], [178, "mov rbx, [rbp+var_8]"], [179, "leave"], [180, "retn"]], "data_dep": [[6, 4], [6, 9], [8, 6], [9, 9], [9, 4], [10, 9], [10, 4], [11, 10], [13, 6], [14, 12], [15, 13], [17, 16], [19, 17], [21, 20], [22, 21], [23, 22], [24, 21], [26, 24], [28, 27], [29, 28], [31, 21], [31, 30], [32, 31], [33, 20], [33, 28], [34, 33], [36, 12], [37, 35], [37, 36], [38, 37], [39, 21], [39, 30], [39, 38], [41, 40], [41, 39], [42, 39], [43, 39], [45, 43], [47, 46], [49, 48], [52, 49], [52, 154], [54, 52], [55, 54], [55, 51], [56, 55], [56, 41], [56, 42], [57, 56], [58, 57], [59, 41], [59, 42], [59, 58], [60, 59], [61, 60], [62, 57], [63, 42], [63, 62], [63, 41], [64, 63], [65, 64], [66, 57], [67, 42], [67, 66], [67, 41], [68, 67], [69, 68], [70, 57], [71, 42], [71, 41], [71, 70], [72, 71], [73, 72], [74, 57], [75, 42], [75, 74], [75, 41], [76, 75], [78, 77], [79, 78], [80, 57], [81, 41], [81, 80], [81, 42], [82, 81], [83, 82], [84, 57], [85, 84], [85, 42], [85, 41], [86, 57], [87, 41], [87, 86], [87, 42], [88, 87], [89, 87], [90, 85], [93, 89], [96, 57], [97, 42], [97, 96], [97, 41], [98, 97], [99, 98], [100, 97], [101, 100], [103, 102], [104, 47], [105, 102], [106, 104], [107, 103], [109, 105], [112, 57], [113, 112], [113, 41], [113, 42], [114, 113], [115, 41], [115, 91], [115, 114], [115, 42], [116, 114], [117, 116], [117, 115], [118, 117], [119, 118], [120, 119], [122, 8], [122, 120], [123, 122], [124, 123], [125, 119], [126, 21], [126, 30], [126, 38], [127, 125], [130, 126], [133, 132], [135, 133], [137, 119], [138, 137], [139, 136], [139, 138], [140, 119], [142, 8], [142, 140], [143, 140], [144, 143], [146, 145], [147, 145], [148, 142], [150, 147], [154, 49], [154, 154], [156, 154], [156, 155], [156, 49], [157, 156], [158, 47], [159, 158], [163, 173], [163, 161], [165, 8], [165, 163], [166, 165], [167, 166], [168, 173], [168, 161], [170, 8], [170, 168], [171, 170], [173, 173], [173, 161], [174, 173], [174, 161], [175, 174], [180, 166], [180, 172], [180, 160]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/a409f6e7ffbc09a619167b5a9c131be77c0ac2dc4be68404b31ba272dce91bfc_a409f6e7ffbc09a619167b5a9c131be77c0ac2dc4be68404b31ba272dce91bfc.jsonl.gz", "strip_func_name": "sub_402892", "query": "\n\n\nint sub_402892()\n{\nchar *v0; // rax\nsize_t v1; // rax\nint v2; // kr00_4\nFILE *v3; // rax\nFILE *v4; // rbx\nsize_t v5; // rax\nFILE *v6; // rax\nFILE *v8[64]; // [rsp+0h] [rbp-1A40h]\nchar dest[4096]; // [rsp+200h] [rbp-1840h] BYREF\nchar ptr[2060]; // [rsp+1200h] [rbp-840h] BYREF\nunsigned int v11; // [rsp+1A0Ch] [rbp-34h]\n__int64 v12; // [rsp+1A10h] [rbp-30h]\nFILE *stream; // [rsp+1A18h] [rbp-28h]\nchar *s; // [rsp+1A20h] [rbp-20h]\nint i; // [rsp+1A2Ch] [rbp-14h]\n\nfor ( i = 0; i <= 63; ++i )\nv8[i] = 0LL;\nstrcpy(dest, src);\ns = strrchr(dest, 46);\nif ( s && strchr(s, 92) )\ns = 0LL;\nif ( !s )\ns = &dest[strlen(dest)];\nv0 = s;\n*(_QWORD *)s = 0x6D61722E73656E2ELL;\n*((_DWORD *)v0 + 2) = 7106094;\nstream = fopen(dest, \"w\");\nfor ( i = dword_410B38; i <= dword_410B3C; ++i )\n{\nv12 = *((_QWORD *)::ptr + i);\nif ( !*(_DWORD *)(v12 + 48)\n&& (!*(_DWORD *)(v12 + 32)\n|| (*(_DWORD *)(v12 + 32) == 2 || *(_DWORD *)(v12 + 32) == 1) && strlen(*(const char **)v12) > 1)\n&& *(__int64 *)(v12 + 8) <= 0xFFFF )\n{\nsnprintf(ptr, 0x800uLL, \"$%04X#%s#\\n\", (unsigned int)*(_QWORD *)(v12 + 8), *(const char **)v12);\nif ( *(__int64 *)(v12 + 8) > 0x7FFF )\n{\nv2 = *(_DWORD *)(v12 + 16) - 16;\nv11 = v2 / 0x4000;\nif ( !v8[v2 / 0x4000] )\n{\nsnprintf(s, 0x1000uLL, \".nes.%X.nl\", v11);\nv3 = fopen(dest, \"w\");\nv8[v11] = v3;\n}\nv4 = v8[v11];\nv5 = strlen(ptr);\nfwrite(ptr, 1uLL, v5, v4);\n}\nelse\n{\nv1 = strlen(ptr);\nfwrite(ptr, 1uLL, v1, stream);\n}\n}\n}\nLODWORD(v6) = fclose(stream);\nfor ( i = 0; i <= 63; ++i )\n{\nv6 = v8[i];\nif ( v6 )\nLODWORD(v6) = fclose(v8[i]);\n}\nreturn (int)v6;\n}\n\n\n\nQ:[v8,dest,ptr,v11,v12,stream,s,sub_402892,]\nAssistant: ", "hints": "[]", "response": "{'v8': 'bankfiles', 'dest': 'filename', 'ptr': 'str', 'v11': 'bank', 'v12': 'l', 'stream': 'ramfile', 's': 'strptr', 'sub_402892': 'export_labelfiles'}"} |
|
ai_cop_mode_brain | d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f | smcameron | space-nerds-in-space | NA | static void ai_cop_mode_brain(struct snis_entity *o)
{
int n = o->tsd.ship.nai_entries - 1;
struct ai_cop_data *patrol = &o->tsd.ship.ai[n].u.cop;
int d;
d = patrol->dest;
ai_trace(o->id, "TO PATROL POINT %d\n", d);
double dist2 = ai_ship_travel_towards(o,
patrol->p[d].v.x, patrol->p[d].v.y, patrol->p[d].v.z);
ai_trace(o->id, "COP MODE DIST TO DEST = %.2f WP = %d ONESHOT = %d",
sqrt(dist2), patrol->dest, patrol->oneshot);
if (has_arrived_at_destination(o, dist2)) {
/* Advance to the next patrol destination */
ai_trace(o->id, "COP MODE ARRIVED AT DEST");
if (patrol->dest + 1 == patrol->npoints && patrol->oneshot) {
pop_ai_stack(o);
ai_trace(o->id, "COP POPPED ONESHOT PATROL ROUTE");
return;
}
set_patrol_waypoint_destination(o, (patrol->dest + 1) % patrol->npoints);
/* But first hang out here awhile... */
n = o->tsd.ship.nai_entries;
if (n < MAX_AI_STACK_ENTRIES) {
ai_trace(o->id, "COP -> HANGOUT");
o->tsd.ship.ai[n].ai_mode = AI_MODE_HANGOUT;
o->tsd.ship.ai[n].u.hangout.time_to_go = 100 + snis_randn(100);
if (o->tsd.ship.ai[n].u.hangout.time_to_go > patrol->max_hangout_time)
o->tsd.ship.ai[n].u.hangout.time_to_go = patrol->max_hangout_time;
o->tsd.ship.desired_velocity = 0;
o->tsd.ship.nai_entries++;
}
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_458C64", "function_addr": 4557924, "binary_name": "d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r12"], [3, "push rbx"], [4, "sub rsp, 30h"], [5, "mov [rbp+var_38], rdi"], [6, "mov rax, [rbp+var_38]"], [7, "mov eax, [rax+300h]"], [8, "sub eax, 1"], [9, "mov [rbp+var_28], eax"], [10, "mov ebx, [rbp+var_28]"], [11, "movsxd rax, ebx"], [12, "cmp rax, 4"], [13, "jbe short loc_458C9F"], [14, "movsxd rax, ebx"], [15, "mov rsi, rax"], [16, "mov edi, offset off_514D60"], [17, "call ___ubsan_handle_out_of_bounds"], [18, "movsxd rdx, ebx"], [19, "mov rax, rdx"], [20, "shl rax, 2"], [21, "add rax, rdx"], [22, "shl rax, 4"], [23, "lea rdx, [rax+160h]"], [24, "mov rax, [rbp+var_38]"], [25, "add rax, rdx"], [26, "add rax, 18h"], [27, "mov [rbp+var_20], rax"], [28, "mov rax, [rbp+var_20]"], [29, "movzx eax, byte ptr [rax+1]"], [30, "movzx eax, al"], [31, "mov [rbp+var_24], eax"], [32, "mov rax, [rbp+var_38]"], [33, "mov eax, [rax]"], [34, "mov edx, [rbp+var_24]"], [35, "mov esi, offset aToPatrolPointD"], [36, "mov edi, eax"], [37, "mov eax, 0"], [38, "call sub_44604E"], [39, "mov rcx, [rbp+var_20]"], [40, "mov eax, [rbp+var_24]"], [41, "movsxd rdx, eax"], [42, "mov rax, rdx"], [43, "add rax, rax"], [44, "add rax, rdx"], [45, "shl rax, 2"], [46, "add rax, rcx"], [47, "add rax, 0Ch"], [48, "movss xmm1, dword ptr [rax]"], [49, "mov rcx, [rbp+var_20]"], [50, "mov eax, [rbp+var_24]"], [51, "movsxd rdx, eax"], [52, "mov rax, rdx"], [53, "add rax, rax"], [54, "add rax, rdx"], [55, "shl rax, 2"], [56, "add rax, rcx"], [57, "add rax, 8"], [58, "movss xmm0, dword ptr [rax]"], [59, "mov rcx, [rbp+var_20]"], [60, "mov eax, [rbp+var_24]"], [61, "movsxd rdx, eax"], [62, "mov rax, rdx"], [63, "add rax, rax"], [64, "add rax, rdx"], [65, "shl rax, 2"], [66, "add rax, rcx"], [67, "add rax, 4"], [68, "mov edx, [rax]"], [69, "mov rax, [rbp+var_38]"], [70, "movaps xmm2, xmm1"], [71, "movaps xmm1, xmm0"], [72, "movd xmm0, edx"], [73, "mov rdi, rax"], [74, "call sub_45514C"], [75, "cvtss2sd xmm0, xmm0"], [76, "movsd [rbp+x], xmm0"], [77, "mov rax, [rbp+var_20]"], [78, "movzx eax, byte ptr [rax+2]"], [79, "movzx r12d, al"], [80, "mov rax, [rbp+var_20]"], [81, "movzx eax, byte ptr [rax+1]"], [82, "movzx ebx, al"], [83, "mov rax, [rbp+x]"], [84, "movq xmm0, rax"], [85, "call _sqrt"], [86, "movq rax, xmm0"], [87, "mov rdx, [rbp+var_38]"], [88, "mov edi, [rdx]"], [89, "mov ecx, r12d"], [90, "mov edx, ebx"], [91, "movq xmm0, rax"], [92, "mov esi, offset aCopModeDistToD"], [93, "mov eax, 1"], [94, "call sub_44604E"], [95, "pxor xmm3, xmm3"], [96, "cvtsd2ss xmm3, [rbp+x]"], [97, "movd edx, xmm3"], [98, "mov rax, [rbp+var_38]"], [99, "movd xmm0, edx"], [100, "mov rdi, rax"], [101, "call sub_454B77"], [102, "test eax, eax"], [103, "jz loc_458FE1"], [104, "mov rax, [rbp+var_38]"], [105, "mov eax, [rax]"], [106, "mov esi, offset aCopModeArrived"], [107, "mov edi, eax"], [108, "mov eax, 0"], [109, "call sub_44604E"], [110, "mov rax, [rbp+var_20]"], [111, "movzx eax, byte ptr [rax+1]"], [112, "movzx eax, al"], [113, "lea edx, [rax+1]"], [114, "mov rax, [rbp+var_20]"], [115, "movzx eax, byte ptr [rax]"], [116, "movzx eax, al"], [117, "cmp edx, eax"], [118, "jnz short loc_458E46"], [119, "mov rax, [rbp+var_20]"], [120, "movzx eax, byte ptr [rax+2]"], [121, "test al, al"], [122, "jz short loc_458E46"], [123, "mov rax, [rbp+var_38]"], [124, "mov rdi, rax"], [125, "call sub_44ADFB"], [126, "mov rax, [rbp+var_38]"], [127, "mov eax, [rax]"], [128, "mov esi, offset aCopPoppedOnesh"], [129, "mov edi, eax"], [130, "mov eax, 0"], [131, "call sub_44604E"], [132, "jmp loc_458FE1"], [133, "mov rax, [rbp+var_20]"], [134, "movzx eax, byte ptr [rax+1]"], [135, "movzx eax, al"], [136, "lea edx, [rax+1]"], [137, "mov rax, [rbp+var_20]"], [138, "movzx eax, byte ptr [rax]"], [139, "movzx ecx, al"], [140, "mov eax, edx"], [141, "cdq"], [142, "idiv ecx"], [143, "mov rax, [rbp+var_38]"], [144, "mov esi, edx"], [145, "mov rdi, rax"], [146, "call sub_4486B2"], [147, "mov rax, [rbp+var_38]"], [148, "mov eax, [rax+300h]"], [149, "mov [rbp+var_28], eax"], [150, "cmp [rbp+var_28], 4"], [151, "jg loc_458FE1"], [152, "mov rax, [rbp+var_38]"], [153, "mov eax, [rax]"], [154, "mov esi, offset aCopHangout"], [155, "mov edi, eax"], [156, "mov eax, 0"], [157, "call sub_44604E"], [158, "mov ebx, [rbp+var_28]"], [159, "movsxd rax, ebx"], [160, "cmp rax, 4"], [161, "jbe short loc_458EBB"], [162, "movsxd rax, ebx"], [163, "mov rsi, rax"], [164, "mov edi, offset off_514D80"], [165, "call ___ubsan_handle_out_of_bounds"], [166, "mov rcx, [rbp+var_38]"], [167, "movsxd rdx, ebx"], [168, "mov rax, rdx"], [169, "shl rax, 2"], [170, "add rax, rdx"], [171, "shl rax, 4"], [172, "add rax, rcx"], [173, "add rax, 170h"], [174, "mov byte ptr [rax], 7"], [175, "mov edi, 64h "], [176, "call snis_randn"], [177, "lea r12d, [rax+64h]"], [178, "mov ebx, [rbp+var_28]"], [179, "movsxd rax, ebx"], [180, "cmp rax, 4"], [181, "jbe short loc_458F06"], [182, "movsxd rax, ebx"], [183, "mov rsi, rax"], [184, "mov edi, offset off_514DA0"], [185, "call ___ubsan_handle_out_of_bounds"], [186, "mov ecx, r12d"], [187, "mov rsi, [rbp+var_38]"], [188, "movsxd rdx, ebx"], [189, "mov rax, rdx"], [190, "shl rax, 2"], [191, "add rax, rdx"], [192, "shl rax, 4"], [193, "add rax, rsi"], [194, "add rax, 178h"], [195, "mov [rax], ecx"], [196, "mov ebx, [rbp+var_28]"], [197, "movsxd rax, ebx"], [198, "cmp rax, 4"], [199, "jbe short loc_458F45"], [200, "movsxd rax, ebx"], [201, "mov rsi, rax"], [202, "mov edi, offset off_514DC0"], [203, "call ___ubsan_handle_out_of_bounds"], [204, "mov rcx, [rbp+var_38]"], [205, "movsxd rdx, ebx"], [206, "mov rax, rdx"], [207, "shl rax, 2"], [208, "add rax, rdx"], [209, "shl rax, 4"], [210, "add rax, rcx"], [211, "add rax, 178h"], [212, "mov edx, [rax]"], [213, "mov rax, [rbp+var_20]"], [214, "movzx eax, byte ptr [rax+3]"], [215, "movzx eax, al"], [216, "cmp edx, eax"], [217, "jbe short loc_458FBD"], [218, "mov rax, [rbp+var_20]"], [219, "movzx r12d, byte ptr [rax+3]"], [220, "mov ebx, [rbp+var_28]"], [221, "movsxd rax, ebx"], [222, "cmp rax, 4"], [223, "jbe short loc_458F99"], [224, "movsxd rax, ebx"], [225, "mov rsi, rax"], [226, "mov edi, offset off_514DE0"], [227, "call ___ubsan_handle_out_of_bounds"], [228, "movzx edx, r12b"], [229, "mov rsi, [rbp+var_38]"], [230, "movsxd rcx, ebx"], [231, "mov rax, rcx"], [232, "shl rax, 2"], [233, "add rax, rcx"], [234, "shl rax, 4"], [235, "add rax, rsi"], [236, "add rax, 178h"], [237, "mov [rax], edx"], [238, "mov rax, [rbp+var_38]"], [239, "pxor xmm0, xmm0"], [240, "movsd qword ptr [rax+70h], xmm0"], [241, "mov rax, [rbp+var_38]"], [242, "mov eax, [rax+300h]"], [243, "lea edx, [rax+1]"], [244, "mov rax, [rbp+var_38]"], [245, "mov [rax+300h], edx"], [246, "add rsp, 30h"], [247, "pop rbx"], [248, "pop r12"], [249, "pop rbp"], [250, "retn"]], "data_dep": [[6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [11, 10], [12, 11], [13, 12], [14, 10], [15, 14], [18, 10], [19, 18], [20, 19], [21, 18], [21, 20], [22, 21], [23, 22], [23, 18], [24, 5], [25, 23], [25, 24], [26, 25], [27, 26], [28, 27], [29, 28], [30, 29], [31, 30], [32, 5], [33, 32], [34, 31], [36, 33], [39, 27], [40, 31], [41, 40], [42, 41], [43, 42], [44, 41], [44, 43], [45, 44], [46, 45], [46, 39], [47, 46], [48, 47], [49, 27], [50, 31], [51, 50], [52, 51], [53, 52], [54, 51], [54, 53], [55, 54], [56, 55], [56, 49], [57, 56], [58, 57], [59, 27], [60, 31], [61, 60], [62, 61], [63, 62], [64, 61], [64, 63], [65, 64], [66, 59], [66, 65], [67, 66], [68, 67], [69, 5], [70, 48], [71, 58], [72, 68], [73, 69], [75, 72], [76, 75], [77, 27], [78, 77], [79, 78], [80, 27], [81, 80], [82, 81], [83, 76], [84, 83], [86, 84], [87, 5], [88, 87], [89, 79], [90, 82], [91, 86], [96, 95], [96, 76], [97, 96], [98, 5], [99, 97], [100, 98], [102, 101], [103, 102], [104, 5], [105, 104], [107, 105], [110, 27], [111, 110], [112, 111], [113, 112], [113, 97], [114, 27], [115, 114], [116, 115], [117, 116], [117, 113], [118, 117], [119, 27], [120, 119], [121, 120], [122, 121], [123, 5], [124, 123], [126, 5], [127, 126], [129, 127], [133, 27], [134, 133], [135, 134], [136, 135], [136, 113], [137, 27], [138, 137], [139, 138], [140, 136], [142, 139], [143, 5], [144, 136], [145, 143], [147, 5], [148, 147], [149, 148], [150, 149], [151, 150], [152, 5], [153, 152], [155, 153], [158, 149], [159, 158], [160, 159], [161, 160], [162, 158], [163, 162], [166, 5], [167, 158], [168, 167], [169, 168], [170, 169], [170, 167], [171, 170], [172, 166], [172, 171], [173, 172], [174, 173], [177, 174], [177, 176], [177, 79], [178, 149], [179, 178], [180, 179], [181, 180], [182, 178], [183, 182], [186, 177], [187, 5], [188, 178], [189, 188], [190, 189], [191, 188], [191, 190], [192, 191], [193, 192], [193, 187], [194, 193], [195, 186], [195, 194], [196, 149], [197, 196], [198, 197], [199, 198], [200, 196], [201, 200], [204, 5], [205, 196], [206, 205], [207, 206], [208, 205], [208, 207], [209, 208], [210, 209], [210, 204], [211, 210], [212, 211], [212, 195], [212, 174], [213, 27], [214, 195], [214, 213], [214, 174], [215, 214], [216, 212], [216, 215], [217, 216], [218, 27], [219, 174], [219, 218], [219, 195], [220, 149], [221, 220], [222, 221], [223, 222], [224, 220], [225, 224], [228, 219], [229, 5], [230, 220], [231, 230], [232, 231], [233, 230], [233, 232], [234, 233], [235, 234], [235, 229], [236, 235], [237, 236], [237, 228], [238, 5], [240, 239], [240, 238], [241, 5], [242, 240], [242, 241], [243, 240], [243, 242], [243, 228], [243, 212], [244, 5], [245, 243], [245, 244], [246, 4], [247, 3], [248, 2], [249, 0], [250, 131], [250, 244], [250, 148], [250, 102]]}
| {"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/d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f_d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f.jsonl.gz", "strip_func_name": "sub_458C64", "query": "\n\n\nunsigned __int64 __fastcall sub_458C64(__int64 a1, double a2, double a3, double a4, double a5, double a6, double a7, double a8, __m128 a9, __int64 a10, __int64 a11, __int64 a12, __int64 a13, __int64 a14)\n{\nint v14; // ebx\n__int64 v15; // rax\nfloat v16; // xmm0_4\ndouble v17; // xmm4_8\ndouble v18; // xmm5_8\nunsigned int v19; // er12\nunsigned int v20; // ebx\ndouble v21; // xmm0_8\n__int64 v22; // r8\n__int64 v23; // r9\n__m128i v24; // xmm3\nunsigned __int64 result; // rax\n__int64 v26; // rdx\n__int64 v27; // rcx\n__int64 v28; // r8\n__int64 v29; // r9\n__int64 v30; // rcx\n__int64 v31; // r8\n__int64 v32; // r9\n__int64 v33; // rdx\n__int64 v34; // rdx\n__int64 v35; // rcx\n__int64 v36; // r8\n__int64 v37; // r9\n__int64 v38; // rdx\n__int64 v39; // rcx\n__int64 v40; // r8\n__int64 v41; // r9\nint v42; // er12\nunsigned __int8 v43; // r12\nint v44; // [rsp+18h] [rbp-28h]\nint v45; // [rsp+1Ch] [rbp-24h]\nunsigned __int8 *v46; // [rsp+20h] [rbp-20h]\ndouble x; // [rsp+28h] [rbp-18h]\n\nv14 = *(_DWORD *)(a1 + 768) - 1;\nif ( (unsigned __int64)v14 > 4 )\n__ubsan_handle_out_of_bounds();\nv15 = 80LL * v14 + 352 + a1;\nv46 = (unsigned __int8 *)(v15 + 24);\nv45 = *(unsigned __int8 *)(v15 + 25);\nsub_44604E(*(_DWORD *)a1, \"TO PATROL POINT %d\\n\", *(unsigned __int8 *)(v15 + 25), a12, a13, a14);\nv16 = *(float *)&v46[12 * v45 + 4];\nsub_45514C(a1, v16, *(float *)&v46[12 * v45 + 8], *(float *)&v46[12 * v45 + 12], a5, v17, v18, a8, a9);\nx = v16;\nv19 = v46[2];\nv20 = v46[1];\nv21 = sqrt(v16);\nsub_44604E(*(_DWORD *)a1, \"COP MODE DIST TO DEST = %.2f WP = %d ONESHOT = %d\", v20, v19, v22, v23, v21);\nv24 = 0LL;\n*(float *)v24.m128i_i32 = x;\nresult = sub_454B77(a1, COERCE_FLOAT(_mm_cvtsi128_si32(v24)));\nif ( (_DWORD)result )\n{\nsub_44604E(*(_DWORD *)a1, \"COP MODE ARRIVED AT DEST\", v26, v27, v28, v29);\nv33 = (unsigned int)v46[1] + 1;\nif ( (_DWORD)v33 == *v46 && v46[2] )\n{\nsub_44ADFB((int *)a1, (__int64)\"COP MODE ARRIVED AT DEST\", v33, v30, v31, v32);\nresult = sub_44604E(*(_DWORD *)a1, \"COP POPPED ONESHOT PATROL ROUTE\", v34, v35, v36, v37);\n}\nelse\n{\nsub_4486B2(a1, (v46[1] + 1) % *v46);\nresult = *(unsigned int *)(a1 + 768);\nv44 = *(_DWORD *)(a1 + 768);\nif ( v44 <= 4 )\n{\nsub_44604E(*(_DWORD *)a1, \"COP -> HANGOUT\", v38, v39, v40, v41);\nif ( (unsigned __int64)v44 > 4 )\n__ubsan_handle_out_of_bounds();\n*(_BYTE *)(a1 + 80LL * v44 + 368) = 7;\nv42 = snis_randn(100) + 100;\nif ( (unsigned __int64)v44 > 4 )\n__ubsan_handle_out_of_bounds();\n*(_DWORD *)(a1 + 80LL * v44 + 376) = v42;\nif ( (unsigned __int64)v44 > 4 )\n__ubsan_handle_out_of_bounds();\nif ( *(_DWORD *)(a1 + 80LL * v44 + 376) > (unsigned int)v46[3] )\n{\nv43 = v46[3];\nif ( (unsigned __int64)v44 > 4 )\n__ubsan_handle_out_of_bounds();\n*(_DWORD *)(a1 + 80LL * v44 + 376) = v43;\n}\n*(_QWORD *)(a1 + 112) = 0LL;\nresult = a1;\n++*(_DWORD *)(a1 + 768);\n}\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,v44,v45,v46,x,sub_458C64,sub_44604E,sub_45514C,sub_454B77,sub_44ADFB,sub_4486B2,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'o', 'v44': 'n', 'v45': 'd', 'v46': 'patrol', 'x': 'dist2', 'sub_458C64': 'ai_cop_mode_brain', 'sub_44604E': 'ai_trace', 'sub_45514C': 'ai_ship_travel_towards', 'sub_454B77': 'has_arrived_at_destination', 'sub_44ADFB': 'pop_ai_stack', 'sub_4486B2': 'set_patrol_waypoint_destination'}"} |
|
tlsv1_set_cert_chain | a00a174460e27c0a15353e4aa238c55e049e0606a381405d5b36ad737c184769 | vanhoefm | hostap-wpa3 | NA | static int tlsv1_set_cert_chain(struct x509_certificate **chain,
const char *cert, const u8 *cert_blob,
size_t cert_blob_len)
{
if (cert_blob)
return tlsv1_add_cert(chain, cert_blob, cert_blob_len);
if (cert) {
u8 *buf;
size_t len;
int ret;
buf = (u8 *) os_readfile(cert, &len);
if (buf == NULL) {
wpa_printf(MSG_INFO, "TLSv1: Failed to read '%s'",
cert);
return -1;
}
ret = tlsv1_add_cert(chain, buf, len);
os_free(buf);
return ret;
}
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_49E301", "function_addr": 4842241, "binary_name": "a00a174460e27c0a15353e4aa238c55e049e0606a381405d5b36ad737c184769.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_38], rdx"], [6, "mov [rbp+var_40], rcx"], [7, "cmp [rbp+var_38], 0"], [8, "jz short loc_49E339"], [9, "mov rdx, [rbp+var_40]"], [10, "mov rcx, [rbp+var_38]"], [11, "mov rax, [rbp+var_28]"], [12, "mov rsi, rcx"], [13, "mov rdi, rax"], [14, "call sub_49E12B"], [15, "jmp short locret_49E3B0"], [16, "cmp [rbp+var_30], 0"], [17, "jz short loc_49E3AB"], [18, "lea rdx, [rbp+var_18]"], [19, "mov rax, [rbp+var_30]"], [20, "mov rsi, rdx"], [21, "mov rdi, rax"], [22, "call sub_48FE05"], [23, "mov [rbp+ptr], rax"], [24, "cmp [rbp+ptr], 0"], [25, "jnz short loc_49E380"], [26, "mov rax, [rbp+var_30]"], [27, "mov rdx, rax"], [28, "mov esi, offset aTlsv1FailedToR_0"], [29, "mov edi, 3"], [30, "mov eax, 0"], [31, "call sub_48D67B"], [32, "mov eax, 0FFFFFFFFh"], [33, "jmp short locret_49E3B0"], [34, "mov rdx, [rbp+var_18]"], [35, "mov rcx, [rbp+ptr]"], [36, "mov rax, [rbp+var_28]"], [37, "mov rsi, rcx"], [38, "mov rdi, rax"], [39, "call sub_49E12B"], [40, "mov [rbp+var_C], eax"], [41, "mov rax, [rbp+ptr]"], [42, "mov rdi, rax"], [43, "call _free"], [44, "mov eax, [rbp+var_C]"], [45, "jmp short locret_49E3B0"], [46, "mov eax, 0"], [47, "leave"], [48, "retn"]], "data_dep": [[7, 5], [8, 7], [9, 6], [10, 5], [11, 3], [12, 10], [13, 11], [16, 4], [17, 16], [19, 4], [20, 18], [21, 19], [23, 22], [24, 23], [25, 24], [26, 4], [27, 26], [35, 23], [36, 3], [37, 35], [38, 36], [40, 39], [41, 23], [42, 41], [44, 40], [48, 14], [48, 32], [48, 44], [48, 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/a00a174460e27c0a15353e4aa238c55e049e0606a381405d5b36ad737c184769_a00a174460e27c0a15353e4aa238c55e049e0606a381405d5b36ad737c184769.jsonl.gz", "strip_func_name": "sub_49E301", "query": "\n\n\n__int64 __fastcall sub_49E301(__int64 **a1, const char *a2, __int64 a3, size_t a4)\n{\n__int64 result; // rax\n__int64 v5; // rcx\n__int64 v6; // r8\n__int64 v7; // r9\nsize_t v8; // [rsp+28h] [rbp-18h] BYREF\nunsigned int v9; // [rsp+34h] [rbp-Ch]\nvoid *ptr; // [rsp+38h] [rbp-8h]\n\nif ( a3 )\nreturn sub_49E12B(a1, a3, a4);\nif ( !a2 )\nreturn 0LL;\nptr = sub_48FE05(a2, &v8);\nif ( ptr )\n{\nv9 = sub_49E12B(a1, (__int64)ptr, v8);\nfree(ptr);\nresult = v9;\n}\nelse\n{\nsub_48D67B(3, \"TLSv1: Failed to read '%s'\", (__int64)a2, v5, v6, v7);\nresult = 0xFFFFFFFFLL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,v5,v8,ptr,sub_49E301,sub_49E12B,sub_48FE05,sub_48D67B,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'cert_blob', 'a4': 'cert_blob_len', 'a1': 'chain', 'a2': 'cert', 'v5': 'cert_blob_len', 'v8': 'len', 'ptr': 'buf', 'sub_49E301': 'tlsv1_set_cert_chain', 'sub_49E12B': 'tlsv1_add_cert', 'sub_48FE05': 'os_readfile', 'sub_48D67B': 'wpa_printf'}"} |
|
pw__hash | 9f5109e955b763f681d4ef8d90342f8cabe8b7736fe977ed19fcadf8bdeb2241 | roleoroleo | sonoff-hack | NA | int pw__hash(const char *password, struct mosquitto_pw *pw, bool new_password, int new_iterations)
{
int rc;
unsigned int hash_len;
const EVP_MD *digest;
int iterations;
#if OPENSSL_VERSION_NUMBER < 0x10100000L
EVP_MD_CTX context;
#else
EVP_MD_CTX *context;
#endif
if(new_password){
rc = RAND_bytes(pw->salt, sizeof(pw->salt));
if(!rc){
return MOSQ_ERR_UNKNOWN;
}
iterations = new_iterations;
}else{
iterations = pw->iterations;
}
if(iterations < 1){
return MOSQ_ERR_INVAL;
}
digest = EVP_get_digestbyname("sha512");
if(!digest){
return MOSQ_ERR_UNKNOWN;
}
if(pw->hashtype == pw_sha512){
#if OPENSSL_VERSION_NUMBER < 0x10100000L
EVP_MD_CTX_init(&context);
EVP_DigestInit_ex(&context, digest, NULL);
EVP_DigestUpdate(&context, password, strlen(password));
EVP_DigestUpdate(&context, pw->salt, sizeof(pw->salt));
EVP_DigestFinal_ex(&context, pw->password_hash, &hash_len);
EVP_MD_CTX_cleanup(&context);
#else
context = EVP_MD_CTX_new();
EVP_DigestInit_ex(context, digest, NULL);
EVP_DigestUpdate(context, password, strlen(password));
EVP_DigestUpdate(context, pw->salt, sizeof(pw->salt));
EVP_DigestFinal_ex(context, pw->password_hash, &hash_len);
EVP_MD_CTX_free(context);
#endif
}else{
pw->iterations = iterations;
hash_len = sizeof(pw->password_hash);
PKCS5_PBKDF2_HMAC(password, (int)strlen(password),
pw->salt, sizeof(pw->salt), iterations,
digest, (int)hash_len, pw->password_hash);
}
return MOSQ_ERR_SUCCESS;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_409CEF", "function_addr": 4234479, "binary_name": "9f5109e955b763f681d4ef8d90342f8cabe8b7736fe977ed19fcadf8bdeb2241.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r13"], [3, "push r12"], [4, "push rbx"], [5, "sub rsp, 48h"], [6, "mov [rbp+s], rdi"], [7, "mov [rbp+var_50], rsi"], [8, "mov eax, edx"], [9, "mov [rbp+var_58], ecx"], [10, "mov [rbp+var_54], al"], [11, "cmp [rbp+var_54], 0"], [12, "jz short loc_409D42"], [13, "mov rax, [rbp+var_50]"], [14, "add rax, 40h "], [15, "mov esi, 0Ch"], [16, "mov rdi, rax"], [17, "call _RAND_bytes"], [18, "mov [rbp+var_28], eax"], [19, "cmp [rbp+var_28], 0"], [20, "jnz short loc_409D3A"], [21, "mov eax, 0Dh"], [22, "jmp loc_409E6E"], [23, "mov eax, [rbp+var_58]"], [24, "mov [rbp+var_24], eax"], [25, "jmp short loc_409D4C"], [26, "mov rax, [rbp+var_50]"], [27, "mov eax, [rax+4Ch]"], [28, "mov [rbp+var_24], eax"], [29, "cmp [rbp+var_24], 0"], [30, "jg short loc_409D5C"], [31, "mov eax, 3"], [32, "jmp loc_409E6E"], [33, "mov edi, offset aSha512"], [34, "call _EVP_get_digestbyname"], [35, "mov [rbp+var_30], rax"], [36, "cmp [rbp+var_30], 0"], [37, "jnz short loc_409D7B"], [38, "mov eax, 0Dh"], [39, "jmp loc_409E6E"], [40, "mov rax, [rbp+var_50]"], [41, "mov eax, [rax+50h]"], [42, "cmp eax, 6"], [43, "jnz loc_409E0F"], [44, "call _EVP_MD_CTX_new"], [45, "mov [rbp+var_38], rax"], [46, "mov rcx, [rbp+var_30]"], [47, "mov rax, [rbp+var_38]"], [48, "mov edx, 0"], [49, "mov rsi, rcx"], [50, "mov rdi, rax"], [51, "call _EVP_DigestInit_ex"], [52, "mov rax, [rbp+s]"], [53, "mov rdi, rax"], [54, "call _strlen"], [55, "mov rdx, rax"], [56, "mov rcx, [rbp+s]"], [57, "mov rax, [rbp+var_38]"], [58, "mov rsi, rcx"], [59, "mov rdi, rax"], [60, "call _EVP_DigestUpdate"], [61, "mov rax, [rbp+var_50]"], [62, "lea rcx, [rax+40h]"], [63, "mov rax, [rbp+var_38]"], [64, "mov edx, 0Ch"], [65, "mov rsi, rcx"], [66, "mov rdi, rax"], [67, "call _EVP_DigestUpdate"], [68, "mov rcx, [rbp+var_50]"], [69, "lea rdx, [rbp+var_3C]"], [70, "mov rax, [rbp+var_38]"], [71, "mov rsi, rcx"], [72, "mov rdi, rax"], [73, "call _EVP_DigestFinal_ex"], [74, "mov rax, [rbp+var_38]"], [75, "mov rdi, rax"], [76, "call _EVP_MD_CTX_free"], [77, "jmp short loc_409E69"], [78, "mov rax, [rbp+var_50]"], [79, "mov edx, [rbp+var_24]"], [80, "mov [rax+4Ch], edx"], [81, "mov [rbp+var_3C], 40h "], [82, "mov r12, [rbp+var_50]"], [83, "mov eax, [rbp+var_3C]"], [84, "mov r13d, eax"], [85, "mov rax, [rbp+var_50]"], [86, "lea rbx, [rax+40h]"], [87, "mov rax, [rbp+s]"], [88, "mov rdi, rax"], [89, "call _strlen"], [90, "mov esi, eax"], [91, "mov rcx, [rbp+var_30]"], [92, "mov edx, [rbp+var_24]"], [93, "mov rax, [rbp+s]"], [94, "push r12"], [95, "push r13"], [96, "mov r9, rcx"], [97, "mov r8d, edx"], [98, "mov ecx, 0Ch"], [99, "mov rdx, rbx"], [100, "mov rdi, rax"], [101, "call _PKCS5_PBKDF2_HMAC"], [102, "add rsp, 10h"], [103, "mov eax, 0"], [104, "lea rsp, [rbp-18h]"], [105, "pop rbx"], [106, "pop r12"], [107, "pop r13"], [108, "pop rbp"], [109, "retn"]], "data_dep": [[10, 8], [11, 10], [12, 11], [13, 7], [14, 13], [16, 14], [18, 17], [19, 18], [20, 19], [23, 9], [24, 23], [26, 7], [27, 26], [28, 27], [29, 24], [29, 28], [30, 29], [35, 34], [36, 35], [37, 36], [40, 7], [41, 40], [42, 41], [43, 42], [45, 44], [46, 35], [47, 45], [49, 46], [50, 47], [52, 6], [53, 52], [55, 54], [56, 6], [57, 45], [58, 56], [59, 57], [61, 7], [62, 61], [62, 56], [63, 45], [65, 62], [66, 63], [68, 7], [69, 64], [70, 45], [71, 68], [72, 70], [74, 45], [75, 74], [78, 7], [79, 24], [79, 28], [80, 78], [80, 79], [82, 7], [83, 81], [84, 83], [85, 7], [86, 85], [86, 80], [87, 6], [88, 87], [90, 89], [91, 35], [92, 24], [92, 28], [93, 6], [94, 82], [95, 84], [96, 91], [97, 92], [99, 86], [100, 93], [102, 5], [104, 102], [104, 5], [105, 4], [106, 3], [106, 94], [107, 95], [107, 2], [108, 0], [109, 31], [109, 21], [109, 103], [109, 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/9f5109e955b763f681d4ef8d90342f8cabe8b7736fe977ed19fcadf8bdeb2241_9f5109e955b763f681d4ef8d90342f8cabe8b7736fe977ed19fcadf8bdeb2241.jsonl.gz", "strip_func_name": "sub_409CEF", "query": "\n\n\n__int64 __fastcall sub_409CEF(const char *a1, __int64 a2, char a3, int a4)\n{\nint v6; // [rsp+3Ch] [rbp-24h]\n\nif ( a3 )\n{\nif ( !(unsigned int)RAND_bytes() )\nreturn 13LL;\nv6 = a4;\n}\nelse\n{\nv6 = *(_DWORD *)(a2 + 76);\n}\nif ( v6 <= 0 )\nreturn 3LL;\nif ( !EVP_get_digestbyname() )\nreturn 13LL;\nif ( *(_DWORD *)(a2 + 80) == 6 )\n{\nEVP_MD_CTX_new();\nEVP_DigestInit_ex();\nstrlen(a1);\nEVP_DigestUpdate();\nEVP_DigestUpdate();\nEVP_DigestFinal_ex();\nEVP_MD_CTX_free();\n}\nelse\n{\n*(_DWORD *)(a2 + 76) = v6;\nstrlen(a1);\nPKCS5_PBKDF2_HMAC();\n}\nreturn 0LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,v6,sub_409CEF,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'new_password', 'a4': 'new_iterations', 'a1': 'password', 'a2': 'pw', 'v6': 'iterations', 'sub_409CEF': 'pw__hash'}"} |
|
XCore_global_init | d6f1c4fccbb8fc2066c0c7749389636df7b33c67e152dc8852a86b3a79bd4c3d | google | honggfuzz | NA | cs_err XCore_global_init(cs_struct *ud)
{
MCRegisterInfo *mri;
mri = cs_mem_malloc(sizeof(*mri));
XCore_init(mri);
ud->printer = XCore_printInst;
ud->printer_info = mri;
ud->getinsn_info = mri;
ud->disasm = XCore_getInstruction;
ud->post_printer = XCore_post_printer;
ud->reg_name = XCore_reg_name;
ud->insn_id = XCore_get_insn_id;
ud->insn_name = XCore_insn_name;
ud->group_name = XCore_group_name;
return CS_ERR_OK;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_435516", "function_addr": 4412694, "binary_name": "d6f1c4fccbb8fc2066c0c7749389636df7b33c67e152dc8852a86b3a79bd4c3d.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, offset off_79D3A0"], [5, "mov rax, [rax]"], [6, "mov edi, 58h "], [7, "call rax"], [8, "mov [rbp+var_8], rax"], [9, "mov rax, [rbp+var_8]"], [10, "mov rdi, rax"], [11, "call sub_517B74"], [12, "mov rax, [rbp+var_18]"], [13, "mov rdx, offset sub_514273"], [14, "mov [rax+8], rdx"], [15, "mov rax, [rbp+var_18]"], [16, "mov rdx, [rbp+var_8]"], [17, "mov [rax+10h], rdx"], [18, "mov rax, [rbp+var_18]"], [19, "mov rdx, [rbp+var_8]"], [20, "mov [rax+20h], rdx"], [21, "mov rax, [rbp+var_18]"], [22, "mov rdx, offset sub_517A47"], [23, "mov [rax+18h], rdx"], [24, "mov rax, [rbp+var_18]"], [25, "mov rdx, offset sub_512980"], [26, "mov [rax+48h], rdx"], [27, "mov rax, [rbp+var_18]"], [28, "mov rdx, offset sub_51261B"], [29, "mov [rax+28h], rdx"], [30, "mov rax, [rbp+var_18]"], [31, "mov rdx, offset sub_5126B4"], [32, "mov [rax+40h], rdx"], [33, "mov rax, [rbp+var_18]"], [34, "mov rdx, offset sub_5128CC"], [35, "mov [rax+30h], rdx"], [36, "mov rax, [rbp+var_18]"], [37, "mov rdx, offset sub_51292E"], [38, "mov [rax+38h], rdx"], [39, "mov eax, 0"], [40, "leave"], [41, "retn"]], "data_dep": [[5, 4], [7, 5], [8, 7], [9, 8], [10, 9], [12, 3], [14, 13], [14, 12], [15, 3], [16, 8], [17, 15], [17, 16], [18, 3], [19, 8], [20, 19], [20, 18], [21, 3], [23, 22], [23, 21], [24, 3], [26, 24], [26, 25], [27, 3], [29, 28], [29, 27], [30, 3], [32, 31], [32, 30], [33, 3], [35, 33], [35, 34], [36, 3], [38, 37], [38, 36], [41, 39]]}
| {"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/d6f1c4fccbb8fc2066c0c7749389636df7b33c67e152dc8852a86b3a79bd4c3d_d6f1c4fccbb8fc2066c0c7749389636df7b33c67e152dc8852a86b3a79bd4c3d.jsonl.gz", "strip_func_name": "sub_435516", "query": "\n\n\n__int64 __fastcall sub_435516(_QWORD *a1)\n{\n__int64 v2; // [rsp+18h] [rbp-8h]\n\nv2 = off_79D3A0(88LL);\nsub_517B74(v2);\na1[1] = sub_514273;\na1[2] = v2;\na1[4] = v2;\na1[3] = sub_517A47;\na1[9] = sub_512980;\na1[5] = sub_51261B;\na1[8] = sub_5126B4;\na1[6] = sub_5128CC;\na1[7] = sub_51292E;\nreturn 0LL;\n}\n\n\n\nQ:[a1,v2,sub_435516,sub_517B74,sub_514273,sub_517A47,sub_512980,sub_51261B,sub_5126B4,sub_5128CC,sub_51292E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ud', 'v2': 'mri', 'sub_435516': 'XCore_global_init', 'sub_517B74': 'XCore_init', 'sub_514273': 'XCore_printInst', 'sub_517A47': 'XCore_getInstruction', 'sub_512980': 'XCore_post_printer', 'sub_51261B': 'XCore_reg_name', 'sub_5126B4': 'XCore_get_insn_id', 'sub_5128CC': 'XCore_insn_name', 'sub_51292E': 'XCore_group_name'}"} |
|
main | e5756dbd6baeaa74c018572c9f05c04f57bb067565a2e407b66552b56fc75bc9 | wbx-github | openadk | NA | int main(int argc, char **argv)
{
int i;
if (argc < 3) {
fprintf(stderr, "Usage: chown <USER>[:GROUP] <FILE1> [FILE2] ...\n");
return 10;
}
// Copy argv[1] to 'user' so we can truncate it at the period
// if a group id specified.
char user[32];
char *group = NULL;
strncpy(user, argv[1], sizeof(user));
if ((group = strchr(user, ':')) != NULL) {
*group++ = '\0';
} else if ((group = strchr(user, '.')) != NULL) {
*group++ = '\0';
}
// Lookup uid (and gid if specified)
struct passwd *pw;
struct group *grp = NULL;
uid_t uid;
gid_t gid = -1; // passing -1 to chown preserves current group
pw = getpwnam(user);
if (pw != NULL) {
uid = pw->pw_uid;
} else {
char* endptr;
uid = (int) strtoul(user, &endptr, 0);
if (endptr == user) { // no conversion
fprintf(stderr, "No such user '%s'\n", user);
return 10;
}
}
if (group != NULL) {
grp = getgrnam(group);
if (grp != NULL) {
gid = grp->gr_gid;
} else {
char* endptr;
gid = (int) strtoul(group, &endptr, 0);
if (endptr == group) { // no conversion
fprintf(stderr, "No such group '%s'\n", group);
return 10;
}
}
}
for (i = 2; i < argc; i++) {
if (chown(argv[i], uid, gid) < 0) {
fprintf(stderr, "Unable to chown %s: %s\n", argv[i], strerror(errno));
return 10;
}
}
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "main", "function_addr": 4198834, "binary_name": "e5756dbd6baeaa74c018572c9f05c04f57bb067565a2e407b66552b56fc75bc9.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 70h"], [3, "mov [rbp+var_64], edi"], [4, "mov [rbp+var_70], rsi"], [5, "cmp [rbp+var_64], 2"], [6, "jg short loc_4011EF"], [7, "mov rax, cs:stderr"], [8, "mov rcx, rax"], [9, "mov edx, 30h "], [10, "mov esi, 1"], [11, "mov edi, offset aUsageChownUser"], [12, "call _fwrite"], [13, "mov eax, 0Ah"], [14, "jmp locret_4013F2"], [15, "mov [rbp+name], 0"], [16, "mov rax, [rbp+var_70]"], [17, "add rax, 8"], [18, "mov rcx, [rax]"], [19, "lea rax, [rbp+dest]"], [20, "mov edx, 20h "], [21, "mov rsi, rcx"], [22, "mov rdi, rax"], [23, "call _strncpy"], [24, "lea rax, [rbp+dest]"], [25, "mov esi, 3Ah "], [26, "mov rdi, rax"], [27, "call _strchr"], [28, "mov [rbp+name], rax"], [29, "cmp [rbp+name], 0"], [30, "jz short loc_401243"], [31, "mov rax, [rbp+name]"], [32, "lea rdx, [rax+1]"], [33, "mov [rbp+name], rdx"], [34, "mov byte ptr [rax], 0"], [35, "jmp short loc_40126E"], [36, "lea rax, [rbp+dest]"], [37, "mov esi, 2Eh "], [38, "mov rdi, rax"], [39, "call _strchr"], [40, "mov [rbp+name], rax"], [41, "cmp [rbp+name], 0"], [42, "jz short loc_40126E"], [43, "mov rax, [rbp+name]"], [44, "lea rdx, [rax+1]"], [45, "mov [rbp+name], rdx"], [46, "mov byte ptr [rax], 0"], [47, "mov [rbp+var_20], 0"], [48, "mov [rbp+group], 0FFFFFFFFh"], [49, "lea rax, [rbp+dest]"], [50, "mov rdi, rax"], [51, "call _getpwnam"], [52, "mov [rbp+var_28], rax"], [53, "cmp [rbp+var_28], 0"], [54, "jz short loc_4012A0"], [55, "mov rax, [rbp+var_28]"], [56, "mov eax, [rax+10h]"], [57, "mov [rbp+owner], eax"], [58, "jmp short loc_4012EF"], [59, "lea rcx, [rbp+endptr]"], [60, "lea rax, [rbp+dest]"], [61, "mov edx, 0"], [62, "mov rsi, rcx"], [63, "mov rdi, rax"], [64, "call _strtoul"], [65, "mov [rbp+owner], eax"], [66, "mov rdx, [rbp+endptr]"], [67, "lea rax, [rbp+dest]"], [68, "cmp rdx, rax"], [69, "jnz short loc_4012EF"], [70, "mov rax, cs:stderr"], [71, "lea rdx, [rbp+dest]"], [72, "mov esi, offset format"], [73, "mov rdi, rax"], [74, "mov eax, 0"], [75, "call _fprintf"], [76, "mov eax, 0Ah"], [77, "jmp locret_4013F2"], [78, "cmp [rbp+name], 0"], [79, "jz short loc_401365"], [80, "mov rax, [rbp+name]"], [81, "mov rdi, rax"], [82, "call _getgrnam"], [83, "mov [rbp+var_20], rax"], [84, "cmp [rbp+var_20], 0"], [85, "jz short loc_401319"], [86, "mov rax, [rbp+var_20]"], [87, "mov eax, [rax+10h]"], [88, "mov [rbp+group], eax"], [89, "jmp short loc_401365"], [90, "lea rcx, [rbp+var_60]"], [91, "mov rax, [rbp+name]"], [92, "mov edx, 0"], [93, "mov rsi, rcx"], [94, "mov rdi, rax"], [95, "call _strtoul"], [96, "mov [rbp+group], eax"], [97, "mov rax, [rbp+var_60]"], [98, "cmp [rbp+name], rax"], [99, "jnz short loc_401365"], [100, "mov rax, cs:stderr"], [101, "mov rdx, [rbp+name]"], [102, "mov esi, offset aNoSuchGroupS"], [103, "mov rdi, rax"], [104, "mov eax, 0"], [105, "call _fprintf"], [106, "mov eax, 0Ah"], [107, "jmp locret_4013F2"], [108, "mov [rbp+var_4], 2"], [109, "jmp short loc_4013E5"], [110, "mov eax, [rbp+var_4]"], [111, "cdqe"], [112, "lea rdx, ds:0[rax*8]"], [113, "mov rax, [rbp+var_70]"], [114, "add rax, rdx"], [115, "mov rax, [rax]"], [116, "mov edx, [rbp+group]"], [117, "mov ecx, [rbp+owner]"], [118, "mov esi, ecx"], [119, "mov rdi, rax"], [120, "call _chown"], [121, "test eax, eax"], [122, "jns short loc_4013E1"], [123, "call ___errno_location"], [124, "mov eax, [rax]"], [125, "mov edi, eax"], [126, "call _strerror"], [127, "mov rcx, rax"], [128, "mov eax, [rbp+var_4]"], [129, "cdqe"], [130, "lea rdx, ds:0[rax*8]"], [131, "mov rax, [rbp+var_70]"], [132, "add rax, rdx"], [133, "mov rdx, [rax]"], [134, "mov rax, cs:stderr"], [135, "mov esi, offset aUnableToChownS"], [136, "mov rdi, rax"], [137, "mov eax, 0"], [138, "call _fprintf"], [139, "mov eax, 0Ah"], [140, "jmp short locret_4013F2"], [141, "add [rbp+var_4], 1"], [142, "mov eax, [rbp+var_4]"], [143, "cmp eax, [rbp+var_64]"], [144, "jl short loc_40136E"], [145, "mov eax, 0"], [146, "leave"], [147, "retn"]], "data_dep": [[5, 3], [6, 5], [8, 7], [16, 4], [17, 16], [18, 17], [19, 17], [21, 18], [22, 19], [24, 23], [26, 24], [28, 27], [29, 28], [30, 29], [31, 28], [32, 20], [32, 31], [33, 32], [34, 31], [36, 27], [38, 36], [40, 39], [41, 40], [42, 41], [43, 40], [44, 20], [44, 43], [45, 44], [46, 43], [49, 39], [49, 43], [49, 31], [50, 49], [52, 51], [53, 52], [54, 53], [55, 52], [56, 46], [56, 55], [56, 34], [57, 56], [59, 18], [60, 51], [62, 59], [63, 60], [65, 64], [67, 64], [68, 66], [68, 67], [69, 68], [71, 66], [73, 70], [78, 45], [78, 40], [78, 33], [79, 78], [80, 40], [80, 33], [80, 45], [81, 80], [83, 82], [84, 83], [85, 84], [86, 83], [87, 34], [87, 86], [87, 46], [88, 87], [90, 18], [90, 59], [91, 45], [91, 40], [91, 33], [93, 90], [94, 91], [96, 95], [98, 45], [98, 40], [98, 33], [98, 97], [99, 98], [101, 33], [101, 45], [101, 40], [103, 100], [110, 141], [110, 108], [112, 66], [112, 20], [112, 116], [112, 44], [112, 92], [112, 32], [113, 4], [114, 113], [114, 112], [115, 34], [115, 114], [115, 46], [116, 88], [116, 48], [116, 96], [117, 57], [117, 65], [118, 117], [119, 115], [121, 120], [122, 121], [124, 46], [124, 34], [124, 123], [125, 124], [127, 126], [128, 108], [128, 141], [130, 116], [131, 4], [132, 130], [132, 131], [133, 132], [133, 46], [133, 34], [136, 134], [141, 108], [141, 141], [142, 141], [142, 108], [143, 142], [143, 3], [144, 143], [147, 139], [147, 13], [147, 145], [147, 76], [147, 106]]}
| {"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/e5756dbd6baeaa74c018572c9f05c04f57bb067565a2e407b66552b56fc75bc9_e5756dbd6baeaa74c018572c9f05c04f57bb067565a2e407b66552b56fc75bc9.jsonl.gz", "strip_func_name": "main", "query": "\n\n\n__int64 __fastcall main(int a1, char **a2, char **a3)\n{\nchar *v4; // rax\nchar *v5; // rax\nint *v6; // rax\nchar *v7; // rax\nchar *v8; // [rsp+10h] [rbp-60h] BYREF\nchar *endptr; // [rsp+18h] [rbp-58h] BYREF\nchar dest[40]; // [rsp+20h] [rbp-50h] BYREF\nstruct passwd *v11; // [rsp+48h] [rbp-28h]\nstruct group *v12; // [rsp+50h] [rbp-20h]\n__gid_t group; // [rsp+58h] [rbp-18h]\n__uid_t owner; // [rsp+5Ch] [rbp-14h]\nchar *name; // [rsp+60h] [rbp-10h]\nint i; // [rsp+6Ch] [rbp-4h]\n\nif ( a1 <= 2 )\n{\nfwrite(\"Usage: chown <USER>[:GROUP] <FILE1> [FILE2] ...\\n\", 1uLL, 0x30uLL, stderr);\nreturn 10LL;\n}\nname = 0LL;\nstrncpy(dest, a2[1], 0x20uLL);\nname = strchr(dest, 58);\nif ( name )\n{\nv4 = name++;\n*v4 = 0;\n}\nelse\n{\nname = strchr(dest, 46);\nif ( name )\n{\nv5 = name++;\n*v5 = 0;\n}\n}\nv12 = 0LL;\ngroup = -1;\nv11 = getpwnam(dest);\nif ( v11 )\n{\nowner = v11->pw_uid;\n}\nelse\n{\nowner = strtoul(dest, &endptr, 0);\nif ( endptr == dest )\n{\nfprintf(stderr, \"No such user '%s'\\n\", dest);\nreturn 10LL;\n}\n}\nif ( name )\n{\nv12 = getgrnam(name);\nif ( v12 )\n{\ngroup = v12->gr_gid;\n}\nelse\n{\ngroup = strtoul(name, &v8, 0);\nif ( name == v8 )\n{\nfprintf(stderr, \"No such group '%s'\\n\", name);\nreturn 10LL;\n}\n}\n}\nfor ( i = 2; i < a1; ++i )\n{\nif ( chown(a2[i], owner, group) < 0 )\n{\nv6 = __errno_location();\nv7 = strerror(*v6);\nfprintf(stderr, \"Unable to chown %s: %s\\n\", a2[i], v7);\nreturn 10LL;\n}\n}\nreturn 0LL;\n}\n\n\n\nQ:[a2,a3,a1,v8,dest,v11,v12,group,owner,name,]\nAssistant: ", "hints": "[]", "response": "{'a2': 'argv', 'a3': 'envp', 'a1': 'argc', 'v8': 'endptr_0', 'dest': 'user', 'v11': 'pw', 'v12': 'grp', 'group': 'gid', 'owner': 'uid', 'name': 'group'}"} |
|
kvm_vm_restart | cdaf5a74165d56b29d53065afebf036d3e081159b34ffd0b6accf8fa4bafa422 | STMicroelectronics | STMems_Linux_Input_drivers | NA | void kvm_vm_restart(struct kvm_vm *vmp, int perm)
{
struct userspace_mem_region *region;
vm_open(vmp, perm);
if (vmp->has_irqchip)
vm_create_irqchip(vmp);
for (region = vmp->userspace_mem_region_head; region;
region = region->next) {
int ret = ioctl(vmp->fd, KVM_SET_USER_MEMORY_REGION, ®ion->region);
TEST_ASSERT(ret == 0, "KVM_SET_USER_MEMORY_REGION IOCTL failed,\n"
" rc: %i errno: %i\n"
" slot: %u flags: 0x%x\n"
" guest_phys_addr: 0x%lx size: 0x%lx",
ret, errno, region->region.slot, region->region.flags,
region->region.guest_phys_addr,
region->region.memory_size);
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402233", "function_addr": 4203059, "binary_name": "cdaf5a74165d56b29d53065afebf036d3e081159b34ffd0b6accf8fa4bafa422.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r14"], [3, "push r13"], [4, "push r12"], [5, "push rbx"], [6, "sub rsp, 20h"], [7, "mov [rbp+var_38], rdi"], [8, "mov [rbp+var_3C], esi"], [9, "mov edx, [rbp+var_3C]"], [10, "mov rax, [rbp+var_38]"], [11, "mov esi, edx"], [12, "mov rdi, rax"], [13, "call sub_401FE7"], [14, "mov rax, [rbp+var_38]"], [15, "movzx eax, byte ptr [rax+40h]"], [16, "test al, al"], [17, "jz short loc_402272"], [18, "mov rax, [rbp+var_38]"], [19, "mov rdi, rax"], [20, "call sub_403B18"], [21, "mov rax, [rbp+var_38]"], [22, "mov rax, [rax+28h]"], [23, "mov [rbp+var_28], rax"], [24, "jmp loc_402318"], [25, "mov rax, [rbp+var_28]"], [26, "lea rdx, [rax+10h]"], [27, "mov rax, [rbp+var_38]"], [28, "mov eax, [rax+8]"], [29, "mov esi, 4020AE46h"], [30, "mov edi, eax"], [31, "mov eax, 0"], [32, "call _ioctl"], [33, "mov [rbp+var_2C], eax"], [34, "mov rax, [rbp+var_28]"], [35, "mov r14, [rax+20h]"], [36, "mov rax, [rbp+var_28]"], [37, "mov r13, [rax+18h]"], [38, "mov rax, [rbp+var_28]"], [39, "mov r12d, [rax+14h]"], [40, "mov rax, [rbp+var_28]"], [41, "mov ebx, [rax+10h]"], [42, "call ___errno_location"], [43, "mov edx, [rax]"], [44, "cmp [rbp+var_2C], 0"], [45, "setz al"], [46, "movzx eax, al"], [47, "mov ecx, [rbp+var_2C]"], [48, "sub rsp, 8"], [49, "push r14"], [50, "push r13"], [51, "push r12"], [52, "push rbx"], [53, "push rdx"], [54, "mov r9d, ecx"], [55, "mov r8d, offset aKvmSetUserMemo"], [56, "mov ecx, 0B9h"], [57, "mov edx, offset aLibKvmUtilC"], [58, "mov esi, offset aRet0"], [59, "mov edi, eax"], [60, "mov eax, 0"], [61, "call sub_401CC8"], [62, "add rsp, 30h"], [63, "mov rax, [rbp+var_28]"], [64, "mov rax, [rax]"], [65, "mov [rbp+var_28], rax"], [66, "cmp [rbp+var_28], 0"], [67, "jnz loc_402283"], [68, "nop"], [69, "nop"], [70, "lea rsp, [rbp-20h]"], [71, "pop rbx"], [72, "pop r12"], [73, "pop r13"], [74, "pop r14"], [75, "pop rbp"], [76, "retn"]], "data_dep": [[9, 8], [10, 7], [11, 9], [12, 10], [14, 7], [15, 14], [16, 15], [17, 16], [18, 7], [19, 18], [21, 7], [22, 21], [23, 22], [25, 23], [25, 65], [26, 57], [26, 25], [26, 9], [27, 7], [28, 27], [30, 28], [33, 32], [34, 65], [34, 23], [35, 34], [36, 65], [36, 23], [37, 36], [38, 23], [38, 65], [39, 38], [40, 23], [40, 65], [41, 40], [43, 42], [44, 33], [45, 42], [45, 44], [46, 45], [47, 33], [48, 62], [48, 6], [49, 35], [50, 37], [51, 39], [52, 41], [53, 43], [54, 47], [59, 46], [62, 48], [63, 23], [63, 65], [64, 63], [65, 64], [66, 23], [66, 65], [67, 66], [70, 6], [70, 62], [71, 5], [71, 52], [72, 51], [72, 4], [73, 50], [73, 3], [74, 49], [74, 2], [75, 0], [76, 64], [76, 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/cdaf5a74165d56b29d53065afebf036d3e081159b34ffd0b6accf8fa4bafa422_cdaf5a74165d56b29d53065afebf036d3e081159b34ffd0b6accf8fa4bafa422.jsonl.gz", "strip_func_name": "sub_402233", "query": "\n\n\n__int64 *__fastcall sub_402233(__int64 a1, int a2)\n{\n__int64 *result; // rax\n__int64 v3; // r14\n__int64 v4; // r13\n__int64 v5; // r12\n__int64 v6; // rbx\nint *v7; // rax\nunsigned int v8; // [rsp+14h] [rbp-2Ch]\n__int64 *i; // [rsp+18h] [rbp-28h]\n\nsub_401FE7(a1, a2);\nif ( *(_BYTE *)(a1 + 64) )\nsub_403B18(a1);\nresult = *(__int64 **)(a1 + 40);\nfor ( i = result; i; i = (__int64 *)*i )\n{\nv8 = ioctl(*(_DWORD *)(a1 + 8), 0x4020AE46uLL, i + 2);\nv3 = i[4];\nv4 = i[3];\nv5 = *((unsigned int *)i + 5);\nv6 = *((unsigned int *)i + 4);\nv7 = __errno_location();\nsub_401CC8(\nv8 == 0,\n\"ret == 0\",\n\"lib/kvm_util.c\",\n0xB9u,\n\"KVM_SET_USER_MEMORY_REGION IOCTL failed,\\n\"\n\" rc: %i errno: %i\\n\"\n\" slot: %u flags: 0x%x\\n\"\n\" guest_phys_addr: 0x%lx size: 0x%lx\",\nv8,\n(unsigned int)*v7,\nv6,\nv5,\nv4,\nv3);\nresult = (__int64 *)*i;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,i,sub_402233,sub_401FE7,sub_403B18,sub_401CC8,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'vmp', 'a2': 'perm', 'i': 'region', 'sub_402233': 'kvm_vm_restart', 'sub_401FE7': 'vm_open', 'sub_403B18': 'vm_create_irqchip', 'sub_401CC8': 'test_assert'}"} |
|
sign_test_init | 4ef53d2d66444cb5a80f23db1ef03d27569bec7ec9ffbb95a7d54df373c2bb06 | sniperHW | chuck | NA | static int sign_test_init(struct evp_test *t, const char *name)
{
return pkey_test_init(t, name, 0, EVP_PKEY_sign_init, EVP_PKEY_sign);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4053F2", "function_addr": 4215794, "binary_name": "4ef53d2d66444cb5a80f23db1ef03d27569bec7ec9ffbb95a7d54df373c2bb06.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 rsi, [rbp+var_10]"], [6, "mov rax, [rbp+var_8]"], [7, "mov r8d, offset _EVP_PKEY_sign"], [8, "mov ecx, offset _EVP_PKEY_sign_init"], [9, "mov edx, 0"], [10, "mov rdi, rax"], [11, "call sub_404F24"], [12, "leave"], [13, "retn"]], "data_dep": [[5, 4], [6, 3], [10, 6], [13, 11]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/4ef53d2d66444cb5a80f23db1ef03d27569bec7ec9ffbb95a7d54df373c2bb06_4ef53d2d66444cb5a80f23db1ef03d27569bec7ec9ffbb95a7d54df373c2bb06.jsonl.gz", "strip_func_name": "sub_4053F2", "query": "\n\n\n_BOOL8 __fastcall sub_4053F2(__int64 a1, const char *a2)\n{\nreturn sub_404F24(a1, a2, 0, (int (__fastcall *)(_QWORD, _QWORD))EVP_PKEY_sign_init, (__int64)EVP_PKEY_sign);\n}\n\n\n\nQ:[a1,a2,sub_4053F2,sub_404F24,]\nAssistant: ", "hints": "[]", "response": "{'a1': 't', 'a2': 'name', 'sub_4053F2': 'sign_test_init', 'sub_404F24': 'pkey_test_init'}"} |
|
show_output | 481d6cb929c4f67b7d0a8134b38a008c44e3c65616a83e55ff6d244db60b2831 | dwelch67 | rpigpu | NA | void show_output ( void )
{
unsigned int ra;
if(pass)
{
printf("// %u",output[doff][0]);
for(ra=0;ra<output[doff][0];ra++)
{
printf(" 0x%04X",output[doff][ra+1]);
}
printf("\n");
{
if(output[doff][0]==0)
{
printf("[0x%08X] no output\n",addr);
}
else
{
diss();
for(ra=0;ra<output[doff][0];ra++)
{
printf("emit1(0x%04X); ",output[doff][ra+1]);
}
printf("\n");
}
}
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4022EB", "function_addr": 4203243, "binary_name": "481d6cb929c4f67b7d0a8134b38a008c44e3c65616a83e55ff6d244db60b2831.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov eax, cs:dword_44F268"], [4, "test eax, eax"], [5, "jz loc_402430"], [6, "mov eax, cs:dword_44F26C"], [7, "mov eax, eax"], [8, "shl rax, 6"], [9, "add rax, 40D260h"], [10, "movzx eax, word ptr [rax]"], [11, "movzx eax, ax"], [12, "mov esi, eax"], [13, "mov edi, offset aU"], [14, "mov eax, 0"], [15, "call _printf"], [16, "mov [rbp+var_4], 0"], [17, "jmp short loc_40236A"], [18, "mov edx, cs:dword_44F26C"], [19, "mov eax, [rbp+var_4]"], [20, "add eax, 1"], [21, "mov ecx, eax"], [22, "mov eax, edx"], [23, "shl rax, 5"], [24, "add rax, rcx"], [25, "movzx eax, ds:word_40D260[rax+rax]"], [26, "movzx eax, ax"], [27, "mov esi, eax"], [28, "mov edi, offset a0x04x_0"], [29, "mov eax, 0"], [30, "call _printf"], [31, "add [rbp+var_4], 1"], [32, "mov eax, cs:dword_44F26C"], [33, "mov eax, eax"], [34, "shl rax, 6"], [35, "add rax, 40D260h"], [36, "movzx eax, word ptr [rax]"], [37, "movzx eax, ax"], [38, "cmp [rbp+var_4], eax"], [39, "jb short loc_402333"], [40, "mov edi, 0Ah"], [41, "call _putchar"], [42, "mov eax, cs:dword_44F26C"], [43, "mov eax, eax"], [44, "shl rax, 6"], [45, "add rax, 40D260h"], [46, "movzx eax, word ptr [rax]"], [47, "test ax, ax"], [48, "jnz short loc_4023C4"], [49, "mov eax, cs:dword_44F264"], [50, "mov esi, eax"], [51, "mov edi, offset a0x08xNoOutput"], [52, "mov eax, 0"], [53, "call _printf"], [54, "jmp short loc_402430"], [55, "call sub_401274"], [56, "mov [rbp+var_4], 0"], [57, "jmp short loc_402409"], [58, "mov edx, cs:dword_44F26C"], [59, "mov eax, [rbp+var_4]"], [60, "add eax, 1"], [61, "mov ecx, eax"], [62, "mov eax, edx"], [63, "shl rax, 5"], [64, "add rax, rcx"], [65, "movzx eax, ds:word_40D260[rax+rax]"], [66, "movzx eax, ax"], [67, "mov esi, eax"], [68, "mov edi, offset aEmit10x04x"], [69, "mov eax, 0"], [70, "call _printf"], [71, "add [rbp+var_4], 1"], [72, "mov eax, cs:dword_44F26C"], [73, "mov eax, eax"], [74, "shl rax, 6"], [75, "add rax, 40D260h"], [76, "movzx eax, word ptr [rax]"], [77, "movzx eax, ax"], [78, "cmp [rbp+var_4], eax"], [79, "jb short loc_4023D2"], [80, "mov edi, 0Ah"], [81, "call _putchar"], [82, "nop"], [83, "leave"], [84, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [8, 7], [9, 8], [10, 9], [11, 10], [12, 11], [19, 16], [19, 31], [20, 19], [21, 20], [22, 18], [23, 22], [24, 23], [24, 21], [26, 25], [27, 26], [31, 16], [31, 31], [33, 32], [34, 33], [35, 34], [36, 35], [37, 36], [38, 16], [38, 31], [38, 37], [39, 38], [43, 42], [44, 43], [45, 44], [46, 45], [47, 46], [48, 47], [50, 49], [59, 56], [59, 71], [60, 59], [61, 60], [62, 58], [63, 62], [64, 61], [64, 63], [66, 65], [67, 66], [71, 56], [71, 71], [73, 72], [74, 73], [75, 74], [76, 75], [77, 76], [78, 71], [78, 77], [78, 56], [79, 78], [84, 81], [84, 53], [84, 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/481d6cb929c4f67b7d0a8134b38a008c44e3c65616a83e55ff6d244db60b2831_481d6cb929c4f67b7d0a8134b38a008c44e3c65616a83e55ff6d244db60b2831.jsonl.gz", "strip_func_name": "sub_4022EB", "query": "\n\n\nint sub_4022EB()\n{\nint result; // eax\nunsigned int i; // [rsp+Ch] [rbp-4h]\nunsigned int j; // [rsp+Ch] [rbp-4h]\n\nresult = dword_44F268;\nif ( dword_44F268 )\n{\nprintf(\"// %u\", (unsigned __int16)word_40D260[32 * (unsigned __int64)(unsigned int)dword_44F26C]);\nfor ( i = 0; i < (unsigned __int16)word_40D260[32 * (unsigned __int64)(unsigned int)dword_44F26C]; ++i )\nprintf(\" 0x%04X\", (unsigned __int16)word_40D260[32 * dword_44F26C + 1 + i]);\nputchar(10);\nif ( word_40D260[32 * (unsigned __int64)(unsigned int)dword_44F26C] )\n{\nsub_401274();\nfor ( j = 0; j < (unsigned __int16)word_40D260[32 * (unsigned __int64)(unsigned int)dword_44F26C]; ++j )\nprintf(\"emit1(0x%04X); \", (unsigned __int16)word_40D260[32 * dword_44F26C + 1 + j]);\nresult = putchar(10);\n}\nelse\n{\nresult = printf(\"[0x%08X] no output\\n\", (unsigned int)dword_44F264);\n}\n}\nreturn result;\n}\n\n\n\nQ:[j,sub_4022EB,sub_401274,]\nAssistant: ", "hints": "[]", "response": "{'j': 'raa', 'sub_4022EB': 'show_output', 'sub_401274': 'diss'}"} |
|
Compile_function | 518a2dbcf2aa822ab5e34f398d32cdd6641f6708a7b6bb6cf2eb3278ed9803db | tekknolagi | ghuloum | NA | int Compile_function(Buffer *buf, ASTNode *node) {
_(Compile_expr(buf, node));
Emit_ret(buf);
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402524", "function_addr": 4203812, "binary_name": "518a2dbcf2aa822ab5e34f398d32cdd6641f6708a7b6bb6cf2eb3278ed9803db.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 rdx, [rbp+var_20]"], [6, "mov rax, [rbp+var_18]"], [7, "mov rsi, rdx"], [8, "mov rdi, rax"], [9, "call sub_4023A7"], [10, "mov [rbp+var_4], eax"], [11, "cmp [rbp+var_4], 0"], [12, "jz short loc_402555"], [13, "mov eax, [rbp+var_4]"], [14, "jmp short locret_402566"], [15, "mov rax, [rbp+var_18]"], [16, "mov rdi, rax"], [17, "call sub_401712"], [18, "mov eax, 0"], [19, "leave"], [20, "retn"]], "data_dep": [[5, 4], [6, 3], [7, 5], [8, 6], [10, 9], [11, 10], [12, 11], [13, 10], [15, 3], [16, 15], [20, 18], [20, 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/518a2dbcf2aa822ab5e34f398d32cdd6641f6708a7b6bb6cf2eb3278ed9803db_518a2dbcf2aa822ab5e34f398d32cdd6641f6708a7b6bb6cf2eb3278ed9803db.jsonl.gz", "strip_func_name": "sub_402524", "query": "\n\n\n__int64 __fastcall sub_402524(_QWORD *a1, unsigned __int64 a2)\n{\nunsigned int v3; // [rsp+1Ch] [rbp-4h]\n\nv3 = sub_4023A7(a1, a2);\nif ( v3 )\nreturn v3;\nsub_401712(a1);\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v3,sub_402524,sub_4023A7,sub_401712,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'buf', 'a2': 'node', 'v3': 'result', 'sub_402524': 'Compile_function', 'sub_4023A7': 'Compile_expr', 'sub_401712': 'Emit_ret'}"} |
|
inflateKey | c09ca5d7b8616df47d83a81f05f2f7fec5acf707ac7c3530cfbed434efbb520e | st4rk | PkgDecrypt | NA | int inflateKey( const uint8_t *in, size_t in_size, uint8_t *license ) {
int result = 0;
z_streamp z_str = malloc( sizeof( z_stream ) );
z_str->next_in = in;
z_str->avail_in = in_size;
z_str->next_out = license;
z_str->avail_out = 512;
z_str->zalloc = Z_NULL;
z_str->zfree = Z_NULL;
z_str->opaque = Z_NULL;
if ( inflateInit2( z_str, 10 ) == Z_OK ) {
if ( inflate( z_str, Z_NO_FLUSH ) == Z_NEED_DICT ) {
if ( inflateSetDictionary( z_str, g_dict, g_dict_size ) == Z_OK ) {
if ( inflate( z_str, Z_FINISH ) == Z_STREAM_END ) {
inflateEnd( z_str );
result = 512 - z_str->avail_out;
} else {
result = 0x80040003;
}
} else {
result = 0x80040002;
}
} else {
result = 0x80040010;
}
} else {
result = 0x80040001;
}
free( z_str );
return result;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40385A", "function_addr": 4208730, "binary_name": "c09ca5d7b8616df47d83a81f05f2f7fec5acf707ac7c3530cfbed434efbb520e.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_4], 0"], [7, "mov edi, 70h "], [8, "call _malloc"], [9, "mov [rbp+ptr], rax"], [10, "mov rax, [rbp+ptr]"], [11, "mov rdx, [rbp+var_18]"], [12, "mov [rax], rdx"], [13, "mov rax, [rbp+var_20]"], [14, "mov edx, eax"], [15, "mov rax, [rbp+ptr]"], [16, "mov [rax+8], edx"], [17, "mov rax, [rbp+ptr]"], [18, "mov rdx, [rbp+var_28]"], [19, "mov [rax+18h], rdx"], [20, "mov rax, [rbp+ptr]"], [21, "mov dword ptr [rax+20h], 200h"], [22, "mov rax, [rbp+ptr]"], [23, "mov qword ptr [rax+40h], 0"], [24, "mov rax, [rbp+ptr]"], [25, "mov qword ptr [rax+48h], 0"], [26, "mov rax, [rbp+ptr]"], [27, "mov qword ptr [rax+50h], 0"], [28, "mov rax, [rbp+ptr]"], [29, "mov ecx, 70h "], [30, "mov edx, offset a1211"], [31, "mov esi, 0Ah"], [32, "mov rdi, rax"], [33, "call _inflateInit2_"], [34, "test eax, eax"], [35, "jnz loc_40397A"], [36, "mov rax, [rbp+ptr]"], [37, "mov esi, 0"], [38, "mov rdi, rax"], [39, "call _inflate"], [40, "cmp eax, 2"], [41, "jnz short loc_403971"], [42, "mov edx, cs:dword_409138"], [43, "mov rax, [rbp+ptr]"], [44, "mov esi, offset unk_406A20"], [45, "mov rdi, rax"], [46, "call _inflateSetDictionary"], [47, "test eax, eax"], [48, "jnz short loc_403968"], [49, "mov rax, [rbp+ptr]"], [50, "mov esi, 4"], [51, "mov rdi, rax"], [52, "call _inflate"], [53, "cmp eax, 1"], [54, "jnz short loc_40395F"], [55, "mov rax, [rbp+ptr]"], [56, "mov rdi, rax"], [57, "call _inflateEnd"], [58, "mov rax, [rbp+ptr]"], [59, "mov edx, [rax+20h]"], [60, "mov eax, 200h"], [61, "sub eax, edx"], [62, "mov [rbp+var_4], eax"], [63, "jmp short loc_403981"], [64, "mov [rbp+var_4], 80040003h"], [65, "jmp short loc_403981"], [66, "mov [rbp+var_4], 80040002h"], [67, "jmp short loc_403981"], [68, "mov [rbp+var_4], 80040010h"], [69, "jmp short loc_403981"], [70, "mov [rbp+var_4], 80040001h"], [71, "mov rax, [rbp+ptr]"], [72, "mov rdi, rax"], [73, "call _free"], [74, "mov eax, [rbp+var_4]"], [75, "leave"], [76, "retn"]], "data_dep": [[9, 8], [10, 9], [11, 3], [12, 10], [12, 11], [13, 4], [14, 13], [15, 9], [16, 14], [16, 15], [17, 9], [18, 5], [19, 18], [19, 17], [20, 9], [21, 20], [22, 9], [23, 22], [24, 9], [25, 24], [26, 9], [27, 26], [28, 9], [32, 28], [34, 33], [35, 34], [36, 9], [38, 36], [40, 39], [41, 40], [43, 9], [45, 43], [47, 46], [48, 47], [49, 9], [51, 49], [53, 52], [54, 53], [55, 9], [56, 55], [58, 9], [59, 58], [59, 12], [59, 21], [59, 27], [59, 23], [59, 16], [59, 19], [59, 25], [61, 60], [61, 59], [62, 61], [71, 9], [72, 71], [74, 64], [74, 70], [74, 66], [74, 68], [74, 62], [76, 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/c09ca5d7b8616df47d83a81f05f2f7fec5acf707ac7c3530cfbed434efbb520e_c09ca5d7b8616df47d83a81f05f2f7fec5acf707ac7c3530cfbed434efbb520e.jsonl.gz", "strip_func_name": "sub_40385A", "query": "\n\n\n__int64 __fastcall sub_40385A(__int64 a1, int a2, __int64 a3)\n{\n_DWORD *ptr; // [rsp+20h] [rbp-10h]\nunsigned int v6; // [rsp+2Ch] [rbp-4h]\n\nptr = malloc(0x70uLL);\n*(_QWORD *)ptr = a1;\nptr[2] = a2;\n*((_QWORD *)ptr + 3) = a3;\nptr[8] = 512;\n*((_QWORD *)ptr + 8) = 0LL;\n*((_QWORD *)ptr + 9) = 0LL;\n*((_QWORD *)ptr + 10) = 0LL;\nif ( (unsigned int)inflateInit2_() )\n{\nv6 = -2147221503;\n}\nelse if ( (unsigned int)inflate() == 2 )\n{\nif ( (unsigned int)inflateSetDictionary() )\n{\nv6 = -2147221502;\n}\nelse if ( (unsigned int)inflate() == 1 )\n{\ninflateEnd();\nv6 = 512 - ptr[8];\n}\nelse\n{\nv6 = -2147221501;\n}\n}\nelse\n{\nv6 = -2147221488;\n}\nfree(ptr);\nreturn v6;\n}\n\n\n\nQ:[a3,a1,a2,ptr,v6,sub_40385A,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'license', 'a1': 'in', 'a2': 'in_size', 'ptr': 'z_str', 'v6': 'result', 'sub_40385A': 'inflateKey'}"} |
|
print_expected | 2ef4a2f588d1a2dbf65e958fb41833556178625ab2abc46bb6787a20d685a3eb | marel-keytech | jsoncc | NA | static void print_expected()
{
if(expect_stack_index_ == 0)
return;
fprintf(stderr, "Expected: '%s'", jslex_tokstr(expect_stack_[0]));
int i;
for(i = 1; i < expect_stack_index_; ++i)
fprintf(stderr, "%s'%s'", i != expect_stack_index_ - 1 ? ", " : " or ",
jslex_tokstr(expect_stack_[i]));
fprintf(stderr, ".\n");
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403DC3", "function_addr": 4210115, "binary_name": "2ef4a2f588d1a2dbf65e958fb41833556178625ab2abc46bb6787a20d685a3eb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov eax, cs:dword_408234"], [4, "test eax, eax"], [5, "jz loc_403EA1"], [6, "mov eax, cs:dword_408240"], [7, "mov edi, eax"], [8, "call sub_403568"], [9, "mov rdx, rax"], [10, "mov rax, cs:stderr_ptr"], [11, "mov rax, [rax]"], [12, "lea rsi, aExpectedS"], [13, "mov rdi, rax"], [14, "mov eax, 0"], [15, "call _fprintf"], [16, "mov [rbp+var_4], 1"], [17, "jmp short loc_403E71"], [18, "mov eax, [rbp+var_4]"], [19, "cdqe"], [20, "lea rdx, ds:0[rax*4]"], [21, "lea rax, dword_408240"], [22, "mov eax, [rdx+rax]"], [23, "mov edi, eax"], [24, "call sub_403568"], [25, "mov rcx, rax"], [26, "mov eax, cs:dword_408234"], [27, "sub eax, 1"], [28, "cmp [rbp+var_4], eax"], [29, "jz short loc_403E48"], [30, "lea rax, asc_405627"], [31, "jmp short loc_403E4F"], [32, "lea rax, aOr"], [33, "mov rdx, cs:stderr_ptr"], [34, "mov rdi, [rdx]"], [35, "mov rdx, rax"], [36, "lea rsi, aSS_0"], [37, "mov eax, 0"], [38, "call _fprintf"], [39, "add [rbp+var_4], 1"], [40, "mov eax, cs:dword_408234"], [41, "cmp [rbp+var_4], eax"], [42, "jl short loc_403E10"], [43, "mov rax, cs:stderr_ptr"], [44, "mov rax, [rax]"], [45, "mov rcx, rax"], [46, "mov edx, 2"], [47, "mov esi, 1"], [48, "lea rdi, asc_405636"], [49, "call _fwrite"], [50, "jmp short locret_403EA2"], [51, "nop"], [52, "leave"], [53, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [9, 8], [11, 10], [13, 11], [18, 16], [18, 39], [20, 35], [20, 9], [21, 18], [22, 21], [23, 22], [25, 24], [27, 26], [28, 27], [28, 39], [28, 16], [29, 28], [30, 27], [32, 27], [34, 33], [35, 30], [35, 32], [36, 12], [36, 36], [39, 39], [39, 16], [41, 40], [41, 39], [41, 16], [42, 41], [44, 43], [45, 44], [48, 13], [48, 34], [53, 4], [53, 49]]}
| {"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/2ef4a2f588d1a2dbf65e958fb41833556178625ab2abc46bb6787a20d685a3eb_2ef4a2f588d1a2dbf65e958fb41833556178625ab2abc46bb6787a20d685a3eb.jsonl.gz", "strip_func_name": "sub_403DC3", "query": "\n\n\nsize_t sub_403DC3()\n{\nsize_t result; // rax\n__int16 *v1; // rax\n__int16 *v2; // rcx\nconst char *v3; // rax\nint i; // [rsp+Ch] [rbp-4h]\n\nresult = (unsigned int)dword_408234;\nif ( dword_408234 )\n{\nv1 = sub_403568(dword_408240[0]);\nfprintf(stderr, \"Expected: '%s'\", (const char *)v1);\nfor ( i = 1; i < dword_408234; ++i )\n{\nv2 = sub_403568(dword_408240[i]);\nif ( i == dword_408234 - 1 )\nv3 = \" or \";\nelse\nv3 = \", \";\nfprintf(stderr, \"%s'%s'\", v3, (const char *)v2);\n}\nresult = fwrite(\".\\n\", 1uLL, 2uLL, stderr);\n}\nreturn result;\n}\n\n\n\nQ:[sub_403DC3,sub_403568,]\nAssistant: ", "hints": "[]", "response": "{'sub_403DC3': 'print_expected', 'sub_403568': 'jslex_tokstr'}"} |
|
pp_title_line | fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc | msysgit | msysgit | NA | void pp_title_line(struct pretty_print_context *pp,
const char **msg_p,
struct strbuf *sb,
const char *encoding,
int need_8bit_cte)
{
static const int max_length = 78; /* per rfc2047 */
struct strbuf title;
strbuf_init(&title, 80);
*msg_p = format_subject(&title, *msg_p,
pp->preserve_subject ? "\n" : " ");
strbuf_grow(sb, title.len + 1024);
if (pp->subject) {
strbuf_addstr(sb, pp->subject);
if (needs_rfc2047_encoding(title.buf, title.len, RFC2047_SUBJECT))
add_rfc2047(sb, title.buf, title.len,
encoding, RFC2047_SUBJECT);
else
strbuf_add_wrapped_bytes(sb, title.buf, title.len,
-last_line_length(sb), 1, max_length);
} else {
strbuf_addbuf(sb, &title);
}
strbuf_addch(sb, '\n');
if (need_8bit_cte == 0) {
int i;
for (i = 0; i < pp->in_body_headers.nr; i++) {
if (has_non_ascii(pp->in_body_headers.items[i].string)) {
need_8bit_cte = 1;
break;
}
}
}
if (need_8bit_cte > 0) {
const char *header_fmt =
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=%s\n"
"Content-Transfer-Encoding: 8bit\n";
strbuf_addf(sb, header_fmt, encoding);
}
if (pp->after_subject) {
strbuf_addstr(sb, pp->after_subject);
}
if (pp->fmt == CMIT_FMT_EMAIL) {
strbuf_addch(sb, '\n');
}
if (pp->in_body_headers.nr) {
int i;
for (i = 0; i < pp->in_body_headers.nr; i++) {
strbuf_addstr(sb, pp->in_body_headers.items[i].string);
free(pp->in_body_headers.items[i].string);
}
string_list_clear(&pp->in_body_headers, 0);
strbuf_addch(sb, '\n');
}
strbuf_release(&title);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_49B706", "function_addr": 4830982, "binary_name": "fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 68h"], [4, "mov [rbp+var_48], rdi"], [5, "mov [rbp+var_50], rsi"], [6, "mov [rbp+var_58], rdx"], [7, "mov [rbp+var_60], rcx"], [8, "mov [rbp+var_64], r8d"], [9, "lea rax, [rbp+var_40]"], [10, "mov esi, 50h "], [11, "mov rdi, rax"], [12, "call sub_408027"], [13, "mov rax, [rbp+var_48]"], [14, "mov eax, [rax+18h]"], [15, "test eax, eax"], [16, "jz short loc_49B746"], [17, "mov edx, offset unk_4D4EFB"], [18, "jmp short loc_49B74B"], [19, "mov edx, offset asc_4D4C07"], [20, "mov rax, [rbp+var_50]"], [21, "mov rcx, [rax]"], [22, "lea rax, [rbp+var_40]"], [23, "mov rsi, rcx"], [24, "mov rdi, rax"], [25, "call sub_499A0C"], [26, "mov rdx, [rbp+var_50]"], [27, "mov [rdx], rax"], [28, "mov rax, [rbp+var_38]"], [29, "lea rdx, [rax+400h]"], [30, "mov rax, [rbp+var_58]"], [31, "mov rsi, rdx"], [32, "mov rdi, rax"], [33, "call sub_408182"], [34, "mov rax, [rbp+var_48]"], [35, "mov rax, [rax+8]"], [36, "test rax, rax"], [37, "jz loc_49B822"], [38, "mov rax, [rbp+var_48]"], [39, "mov rdx, [rax+8]"], [40, "mov rax, [rbp+var_58]"], [41, "mov rsi, rdx"], [42, "mov rdi, rax"], [43, "call sub_4979F6"], [44, "mov rax, [rbp+var_38]"], [45, "mov ecx, eax"], [46, "mov rax, [rbp+var_30]"], [47, "mov edx, 0"], [48, "mov esi, ecx"], [49, "mov rdi, rax"], [50, "call sub_498519"], [51, "test eax, eax"], [52, "jz short loc_49B7E7"], [53, "mov rdx, [rbp+var_38]"], [54, "mov rsi, [rbp+var_30]"], [55, "mov rcx, [rbp+var_60]"], [56, "mov rax, [rbp+var_58]"], [57, "mov r8d, 0"], [58, "mov rdi, rax"], [59, "call sub_4985A7"], [60, "jmp short loc_49B835"], [61, "mov ebx, cs:dword_4D4F94"], [62, "mov rax, [rbp+var_58]"], [63, "mov rdi, rax"], [64, "call sub_49835C"], [65, "neg eax"], [66, "mov edx, eax"], [67, "mov rax, [rbp+var_38]"], [68, "mov edi, eax"], [69, "mov rsi, [rbp+var_30]"], [70, "mov rax, [rbp+var_58]"], [71, "mov r9d, ebx"], [72, "mov r8d, 1"], [73, "mov ecx, edx"], [74, "mov edx, edi"], [75, "mov rdi, rax"], [76, "call sub_46FBD2"], [77, "jmp short loc_49B835"], [78, "lea rdx, [rbp+var_40]"], [79, "mov rax, [rbp+var_58]"], [80, "mov rsi, rdx"], [81, "mov rdi, rax"], [82, "call sub_497A2B"], [83, "mov rax, [rbp+var_58]"], [84, "mov esi, 0Ah"], [85, "mov rdi, rax"], [86, "call sub_497999"], [87, "cmp [rbp+var_64], 0"], [88, "jnz short loc_49B893"], [89, "mov [rbp+var_14], 0"], [90, "jmp short loc_49B885"], [91, "mov rax, [rbp+var_48]"], [92, "mov rdx, [rax+58h]"], [93, "mov eax, [rbp+var_14]"], [94, "cdqe"], [95, "shl rax, 4"], [96, "add rax, rdx"], [97, "mov rax, [rax]"], [98, "mov rdi, rax"], [99, "call sub_49828C"], [100, "test eax, eax"], [101, "jz short loc_49B881"], [102, "mov [rbp+var_64], 1"], [103, "jmp short loc_49B893"], [104, "add [rbp+var_14], 1"], [105, "mov rax, [rbp+var_48]"], [106, "mov edx, [rax+60h]"], [107, "mov eax, [rbp+var_14]"], [108, "cmp edx, eax"], [109, "ja short loc_49B855"], [110, "cmp [rbp+var_64], 0"], [111, "jle short loc_49B8BD"], [112, "mov [rbp+var_20], offset aMimeVersion10C"], [113, "mov rdx, [rbp+var_60]"], [114, "mov rcx, [rbp+var_20]"], [115, "mov rax, [rbp+var_58]"], [116, "mov rsi, rcx"], [117, "mov rdi, rax"], [118, "mov eax, 0"], [119, "call sub_408A1F"], [120, "mov rax, [rbp+var_48]"], [121, "mov rax, [rax+10h]"], [122, "test rax, rax"], [123, "jz short loc_49B8E1"], [124, "mov rax, [rbp+var_48]"], [125, "mov rdx, [rax+10h]"], [126, "mov rax, [rbp+var_58]"], [127, "mov rsi, rdx"], [128, "mov rdi, rax"], [129, "call sub_4979F6"], [130, "mov rax, [rbp+var_48]"], [131, "mov eax, [rax]"], [132, "cmp eax, 6"], [133, "jnz short loc_49B8FD"], [134, "mov rax, [rbp+var_58]"], [135, "mov esi, 0Ah"], [136, "mov rdi, rax"], [137, "call sub_497999"], [138, "mov rax, [rbp+var_48]"], [139, "mov eax, [rax+60h]"], [140, "test eax, eax"], [141, "jz loc_49B992"], [142, "mov [rbp+var_18], 0"], [143, "jmp short loc_49B95E"], [144, "mov rax, [rbp+var_48]"], [145, "mov rdx, [rax+58h]"], [146, "mov eax, [rbp+var_18]"], [147, "cdqe"], [148, "shl rax, 4"], [149, "add rax, rdx"], [150, "mov rdx, [rax]"], [151, "mov rax, [rbp+var_58]"], [152, "mov rsi, rdx"], [153, "mov rdi, rax"], [154, "call sub_4979F6"], [155, "mov rax, [rbp+var_48]"], [156, "mov rdx, [rax+58h]"], [157, "mov eax, [rbp+var_18]"], [158, "cdqe"], [159, "shl rax, 4"], [160, "add rax, rdx"], [161, "mov rax, [rax]"], [162, "mov rdi, rax"], [163, "call _free"], [164, "add [rbp+var_18], 1"], [165, "mov rax, [rbp+var_48]"], [166, "mov edx, [rax+60h]"], [167, "mov eax, [rbp+var_18]"], [168, "cmp edx, eax"], [169, "ja short loc_49B915"], [170, "mov rax, [rbp+var_48]"], [171, "add rax, 58h "], [172, "mov esi, 0"], [173, "mov rdi, rax"], [174, "call sub_424494"], [175, "mov rax, [rbp+var_58]"], [176, "mov esi, 0Ah"], [177, "mov rdi, rax"], [178, "call sub_497999"], [179, "lea rax, [rbp+var_40]"], [180, "mov rdi, rax"], [181, "call sub_40807B"], [182, "nop"], [183, "mov rbx, [rbp+var_8]"], [184, "leave"], [185, "retn"]], "data_dep": [[11, 9], [13, 4], [14, 13], [15, 14], [16, 15], [20, 5], [21, 20], [22, 20], [23, 21], [24, 22], [26, 5], [27, 26], [27, 25], [29, 27], [29, 26], [29, 28], [30, 6], [31, 29], [32, 30], [34, 4], [35, 34], [35, 27], [36, 35], [37, 36], [38, 4], [39, 27], [39, 38], [40, 6], [41, 39], [42, 40], [45, 44], [48, 45], [49, 46], [51, 50], [52, 51], [55, 7], [56, 6], [58, 56], [62, 6], [63, 62], [65, 64], [66, 65], [68, 67], [70, 6], [71, 61], [73, 66], [74, 68], [75, 70], [78, 29], [79, 6], [80, 78], [81, 79], [83, 6], [85, 83], [87, 8], [88, 87], [91, 4], [92, 27], [92, 91], [93, 104], [93, 89], [95, 93], [96, 95], [96, 92], [97, 96], [97, 27], [98, 97], [100, 99], [101, 100], [104, 89], [104, 104], [105, 4], [106, 105], [106, 27], [107, 104], [107, 89], [108, 107], [108, 106], [109, 108], [110, 102], [110, 8], [111, 110], [113, 7], [114, 112], [115, 6], [116, 114], [117, 115], [120, 4], [121, 27], [121, 120], [122, 121], [123, 122], [124, 4], [125, 27], [125, 124], [126, 6], [127, 125], [128, 126], [130, 4], [131, 27], [131, 130], [132, 131], [133, 132], [134, 6], [136, 134], [138, 4], [139, 27], [139, 138], [140, 139], [141, 140], [144, 4], [145, 144], [145, 27], [146, 164], [146, 142], [148, 146], [149, 148], [149, 145], [150, 149], [150, 27], [151, 6], [152, 150], [153, 151], [155, 4], [156, 155], [156, 27], [157, 164], [157, 142], [159, 157], [160, 159], [160, 156], [161, 160], [161, 27], [162, 161], [164, 164], [164, 142], [165, 4], [166, 165], [166, 27], [167, 164], [167, 142], [168, 166], [168, 167], [169, 168], [170, 4], [171, 170], [173, 171], [175, 6], [177, 175], [179, 140], [179, 178], [180, 179], [185, 181]]}
| {"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_49B706", "query": "\n\n\n__int64 __fastcall sub_49B706(__int64 a1, char **a2, _QWORD *a3, const char *a4, int a5)\n{\nconst char *v5; // rdx\nint v6; // ecx\nint v7; // er8\nint v8; // er9\nint v9; // ecx\nint v10; // er8\nint v11; // er9\nint v12; // edx\nint v13; // ecx\nint v14; // er8\nint v15; // er9\nint v16; // eax\nunsigned int v17; // edx\nint v18; // ecx\n__int64 v19; // r8\n__int64 v20; // r9\nint v21; // edx\nint v22; // ecx\nint v23; // er8\nint v24; // er9\n__int64 v29; // [rsp+30h] [rbp-40h] BYREF\nunsigned __int64 v30; // [rsp+38h] [rbp-38h]\nchar *v31; // [rsp+40h] [rbp-30h]\nconst char *v32; // [rsp+50h] [rbp-20h]\nunsigned int j; // [rsp+58h] [rbp-18h]\nunsigned int i; // [rsp+5Ch] [rbp-14h]\n\nsub_408027(&v29, 80LL);\nif ( *(_DWORD *)(a1 + 24) )\nv5 = (const char *)&unk_4D4EFB;\nelse\nv5 = \" \";\n*a2 = sub_499A0C(&v29, *a2, v5);\nsub_408182((__int64)a3, v30 + 1024, v30 + 1024, v6, v7, v8);\nif ( *(_QWORD *)(a1 + 8) )\n{\nsub_4979F6(a3, *(const char **)(a1 + 8));\nif ( (unsigned int)sub_498519((__int64)v31, v30) )\n{\nsub_4985A7(a3, v31, v30, a4, 0);\n}\nelse\n{\nv16 = sub_49835C((__int64)a3);\nsub_46FBD2(a3, v31, v30, -v16, 1, 78);\n}\n}\nelse\n{\nsub_497A2B(a3, (__int64)&v29, (__int64)&v29, v9, v10, v11);\n}\nsub_497999((__int64)a3, 10, v12, v13, v14, v15);\nif ( !a5 )\n{\nfor ( i = 0; ; ++i )\n{\nv17 = *(_DWORD *)(a1 + 96);\nif ( v17 <= i )\nbreak;\nif ( (unsigned int)sub_49828C(*(_BYTE **)(*(_QWORD *)(a1 + 88) + 16LL * (int)i)) )\n{\na5 = 1;\nbreak;\n}\n}\n}\nif ( a5 > 0 )\n{\nv32 = \"MIME-Version: 1.0\\nContent-Type: text/plain; charset=%s\\nContent-Transfer-Encoding: 8bit\\n\";\nsub_408A1F(\n(__int64)a3,\n(__int64)\"MIME-Version: 1.0\\nContent-Type: text/plain; charset=%s\\nContent-Transfer-Encoding: 8bit\\n\",\n(__int64)a4,\n(__int64)\"MIME-Version: 1.0\\nContent-Type: text/plain; charset=%s\\nContent-Transfer-Encoding: 8bit\\n\",\nv19,\nv20);\n}\nif ( *(_QWORD *)(a1 + 16) )\nsub_4979F6(a3, *(const char **)(a1 + 16));\nif ( *(_DWORD *)a1 == 6 )\nsub_497999((__int64)a3, 10, v17, v18, v19, v20);\nif ( *(_DWORD *)(a1 + 96) )\n{\nfor ( j = 0; *(_DWORD *)(a1 + 96) > j; ++j )\n{\nsub_4979F6(a3, *(const char **)(*(_QWORD *)(a1 + 88) + 16LL * (int)j));\nfree(*(void **)(*(_QWORD *)(a1 + 88) + 16LL * (int)j));\n}\nsub_424494(a1 + 88, 0);\nsub_497999((__int64)a3, 10, v21, v22, v23, v24);\n}\nreturn sub_40807B((__int64)&v29);\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v18,v14,v29,v32,j,sub_49B706,sub_408027,sub_499A0C,sub_408182,sub_4979F6,sub_498519,sub_4985A7,sub_49835C,sub_46FBD2,sub_497A2B,sub_497999,sub_49828C,sub_408A1F,sub_424494,sub_40807B,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'sb', 'a4': 'encoding', 'a1': 'pp', 'a2': 'msg_p', 'a5': 'need_8bit_cte', 'v18': 'encoding', 'v14': 'need_8bit_cte', 'v29': 'title', 'v32': 'header_fmt', 'j': 'i_0', 'sub_49B706': 'pp_title_line', 'sub_408027': 'strbuf_init', 'sub_499A0C': 'format_subject', 'sub_408182': 'strbuf_grow', 'sub_4979F6': 'strbuf_addstr_28', 'sub_498519': 'needs_rfc2047_encoding', 'sub_4985A7': 'add_rfc2047', 'sub_49835C': 'last_line_length', 'sub_46FBD2': 'strbuf_add_wrapped_bytes', 'sub_497A2B': 'strbuf_addbuf_3', 'sub_497999': 'strbuf_addch_27', 'sub_49828C': 'has_non_ascii', 'sub_408A1F': 'strbuf_addf', 'sub_424494': 'string_list_clear', 'sub_40807B': 'strbuf_release'}"} |
|
decoder_sink_should_reject_excessively_large_input | dd520d7ca9f517f5e2cb6c9233f8b48f077ac64349ef0986890cc58d2785bee8 | eerimoq | monolinux-jiffy | NA | TEST decoder_sink_should_reject_excessively_large_input(void) {
uint8_t input[] = {0,1,2,3,4,5};
heatshrink_decoder *hsd = heatshrink_decoder_alloc(1,
HEATSHRINK_MIN_WINDOW_BITS, HEATSHRINK_MIN_WINDOW_BITS - 1);
size_t count = 0;
// Sink as much as will fit
HSD_sink_res res = heatshrink_decoder_sink(hsd, input, 6, &count);
ASSERT_EQ(HSDR_SINK_OK, res);
ASSERT_EQ(1, count);
// And now, no more should fit.
res = heatshrink_decoder_sink(hsd, &input[count], sizeof(input) - count, &count);
ASSERT_EQ(HSDR_SINK_FULL, res);
ASSERT_EQ(0, count);
heatshrink_decoder_free(hsd);
PASS();
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402F5D", "function_addr": 4206429, "binary_name": "dd520d7ca9f517f5e2cb6c9233f8b48f077ac64349ef0986890cc58d2785bee8.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_12], 3020100h"], [4, "mov [rbp+var_E], 504h"], [5, "mov edx, 3"], [6, "mov esi, 4"], [7, "mov edi, 1"], [8, "call sub_408B00"], [9, "mov [rbp+var_8], rax"], [10, "mov [rbp+var_20], 0"], [11, "lea rdx, [rbp+var_20]"], [12, "lea rsi, [rbp+var_12]"], [13, "mov rax, [rbp+var_8]"], [14, "mov rcx, rdx"], [15, "mov edx, 6"], [16, "mov rdi, rax"], [17, "call sub_408CAB"], [18, "mov [rbp+var_C], eax"], [19, "mov eax, cs:dword_40E114"], [20, "add eax, 1"], [21, "mov cs:dword_40E114, eax"], [22, "cmp [rbp+var_C], 0"], [23, "jz short loc_402FF0"], [24, "mov cs:qword_40E148, offset aTestHeatshrink"], [25, "mov cs:dword_40E150, 135h"], [26, "mov cs:qword_40E158, offset aHsdrSinkOkRes"], [27, "mov eax, 0FFFFFFFFh"], [28, "jmp locret_4030FE"], [29, "mov eax, cs:dword_40E114"], [30, "add eax, 1"], [31, "mov cs:dword_40E114, eax"], [32, "mov rax, [rbp+var_20]"], [33, "cmp rax, 1"], [34, "jz short loc_403033"], [35, "mov cs:qword_40E148, offset aTestHeatshrink"], [36, "mov cs:dword_40E150, 136h"], [37, "mov cs:qword_40E158, offset a1Count"], [38, "mov eax, 0FFFFFFFFh"], [39, "jmp locret_4030FE"], [40, "mov rax, [rbp+var_20]"], [41, "mov edx, 6"], [42, "mov rdi, rdx"], [43, "sub rdi, rax"], [44, "mov rax, [rbp+var_20]"], [45, "lea rdx, [rbp+var_12]"], [46, "lea rsi, [rdx+rax]"], [47, "lea rdx, [rbp+var_20]"], [48, "mov rax, [rbp+var_8]"], [49, "mov rcx, rdx"], [50, "mov rdx, rdi"], [51, "mov rdi, rax"], [52, "call sub_408CAB"], [53, "mov [rbp+var_C], eax"], [54, "mov eax, cs:dword_40E114"], [55, "add eax, 1"], [56, "mov cs:dword_40E114, eax"], [57, "cmp [rbp+var_C], 1"], [58, "jz short loc_4030A3"], [59, "mov cs:qword_40E148, offset aTestHeatshrink"], [60, "mov cs:dword_40E150, 13Ah"], [61, "mov cs:qword_40E158, offset aHsdrSinkFullRe"], [62, "mov eax, 0FFFFFFFFh"], [63, "jmp short locret_4030FE"], [64, "mov eax, cs:dword_40E114"], [65, "add eax, 1"], [66, "mov cs:dword_40E114, eax"], [67, "mov rax, [rbp+var_20]"], [68, "test rax, rax"], [69, "jz short loc_4030E2"], [70, "mov cs:qword_40E148, offset aTestHeatshrink"], [71, "mov cs:dword_40E150, 13Bh"], [72, "mov cs:qword_40E158, offset a0Count"], [73, "mov eax, 0FFFFFFFFh"], [74, "jmp short locret_4030FE"], [75, "mov rax, [rbp+var_8]"], [76, "mov rdi, rax"], [77, "call sub_408BBA"], [78, "mov cs:qword_40E158, 0"], [79, "mov eax, 0"], [80, "leave"], [81, "retn"]], "data_dep": [[9, 8], [11, 5], [11, 10], [12, 3], [12, 6], [13, 9], [14, 11], [16, 13], [18, 17], [20, 19], [21, 20], [22, 18], [23, 22], [29, 21], [30, 29], [31, 30], [32, 10], [33, 32], [34, 33], [40, 10], [42, 41], [43, 40], [43, 42], [44, 10], [45, 3], [45, 41], [46, 44], [46, 12], [47, 10], [47, 45], [48, 9], [49, 47], [50, 43], [51, 48], [53, 52], [54, 31], [55, 54], [56, 55], [57, 53], [58, 57], [64, 56], [65, 64], [66, 65], [67, 10], [68, 67], [69, 68], [75, 9], [76, 75], [81, 27], [81, 38], [81, 62], [81, 73], [81, 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/dd520d7ca9f517f5e2cb6c9233f8b48f077ac64349ef0986890cc58d2785bee8_dd520d7ca9f517f5e2cb6c9233f8b48f077ac64349ef0986890cc58d2785bee8.jsonl.gz", "strip_func_name": "sub_402F5D", "query": "\n\n\n__int64 sub_402F5D()\n{\n__int64 result; // rax\n__int64 v1; // [rsp+0h] [rbp-20h] BYREF\nint v2; // [rsp+Eh] [rbp-12h] BYREF\n__int16 v3; // [rsp+12h] [rbp-Eh]\nint v4; // [rsp+14h] [rbp-Ch]\n__int64 v5; // [rsp+18h] [rbp-8h]\n\nv2 = 50462976;\nv3 = 1284;\nv5 = sub_408B00(1LL, 4LL, 3LL);\nv1 = 0LL;\nv4 = sub_408CAB(v5, &v2, 6LL, &v1);\n++dword_40E114;\nif ( v4 )\n{\nqword_40E148 = (__int64)\"test_heatshrink_dynamic.c\";\ndword_40E150 = 309;\nqword_40E158 = (__int64)\"HSDR_SINK_OK != res\";\nresult = 0xFFFFFFFFLL;\n}\nelse\n{\n++dword_40E114;\nif ( v1 == 1 )\n{\nv4 = sub_408CAB(v5, (char *)&v2 + 1, 5LL, &v1);\n++dword_40E114;\nif ( v4 == 1 )\n{\n++dword_40E114;\nif ( v1 )\n{\nqword_40E148 = (__int64)\"test_heatshrink_dynamic.c\";\ndword_40E150 = 315;\nqword_40E158 = (__int64)\"0 != count\";\nresult = 0xFFFFFFFFLL;\n}\nelse\n{\nsub_408BBA(v5);\nqword_40E158 = 0LL;\nresult = 0LL;\n}\n}\nelse\n{\nqword_40E148 = (__int64)\"test_heatshrink_dynamic.c\";\ndword_40E150 = 314;\nqword_40E158 = (__int64)\"HSDR_SINK_FULL != res\";\nresult = 0xFFFFFFFFLL;\n}\n}\nelse\n{\nqword_40E148 = (__int64)\"test_heatshrink_dynamic.c\";\ndword_40E150 = 310;\nqword_40E158 = (__int64)\"1 != count\";\nresult = 0xFFFFFFFFLL;\n}\n}\nreturn result;\n}\n\n\n\nQ:[v1,v2,v4,v5,sub_402F5D,sub_408B00,sub_408CAB,sub_408BBA,]\nAssistant: ", "hints": "[]", "response": "{'v1': 'count', 'v2': 'input', 'v4': 'res', 'v5': 'hsd', 'sub_402F5D': 'decoder_sink_should_reject_excessively_large_input', 'sub_408B00': 'heatshrink_decoder_alloc', 'sub_408CAB': 'heatshrink_decoder_sink', 'sub_408BBA': 'heatshrink_decoder_free'}"} |
|
pretty_print_string_list | 26ed2b34fb46086588f2bdc8c38fd25410f82edabc1bab24213dd4c0c0fc7725 | XboxDev | xbox-linux | NA | static void pretty_print_string_list(struct cmdnames *cmds, int longest)
{
int cols = 1, rows;
int space = longest + 1; /* min 1 SP between words */
struct winsize win;
int max_cols;
int i, j;
get_term_dimensions(&win);
max_cols = win.ws_col - 1; /* don't print *on* the edge */
if (space < max_cols)
cols = max_cols / space;
rows = (cmds->cnt + cols - 1) / cols;
for (i = 0; i < rows; i++) {
printf(" ");
for (j = 0; j < cols; j++) {
unsigned int n = j * rows + i;
unsigned int size = space;
if (n >= cmds->cnt)
break;
if (j == cols-1 || n + rows >= cmds->cnt)
size = 1;
printf("%-*s", size, cmds->names[n]->name);
}
putchar('\n');
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4169CE", "function_addr": 4286926, "binary_name": "26ed2b34fb46086588f2bdc8c38fd25410f82edabc1bab24213dd4c0c0fc7725.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 [rbp+var_4], 1"], [6, "mov eax, [rbp+var_3C]"], [7, "add eax, 1"], [8, "mov [rbp+var_14], eax"], [9, "lea rax, [rbp+var_28]"], [10, "mov rdi, rax"], [11, "call sub_4168FD"], [12, "movzx eax, [rbp+var_26]"], [13, "movzx eax, ax"], [14, "sub eax, 1"], [15, "mov [rbp+var_18], eax"], [16, "mov eax, [rbp+var_14]"], [17, "cmp eax, [rbp+var_18]"], [18, "jge short loc_416A18"], [19, "mov eax, [rbp+var_18]"], [20, "cdq"], [21, "idiv [rbp+var_14]"], [22, "mov [rbp+var_4], eax"], [23, "mov rax, [rbp+var_38]"], [24, "mov rdx, [rax+8]"], [25, "mov eax, [rbp+var_4]"], [26, "cdqe"], [27, "add rax, rdx"], [28, "sub rax, 1"], [29, "mov edx, [rbp+var_4]"], [30, "movsxd rcx, edx"], [31, "mov edx, 0"], [32, "div rcx"], [33, "mov [rbp+var_1C], eax"], [34, "mov [rbp+var_8], 0"], [35, "jmp loc_416B06"], [36, "lea rdi, asc_42398A"], [37, "mov eax, 0"], [38, "call _printf"], [39, "mov [rbp+var_C], 0"], [40, "jmp loc_416AE9"], [41, "mov eax, [rbp+var_C]"], [42, "imul eax, [rbp+var_1C]"], [43, "mov edx, eax"], [44, "mov eax, [rbp+var_8]"], [45, "add eax, edx"], [46, "mov [rbp+var_20], eax"], [47, "mov eax, [rbp+var_14]"], [48, "mov [rbp+var_10], eax"], [49, "mov edx, [rbp+var_20]"], [50, "mov rax, [rbp+var_38]"], [51, "mov rax, [rax+8]"], [52, "cmp rdx, rax"], [53, "jnb short loc_416AF7"], [54, "mov eax, [rbp+var_4]"], [55, "sub eax, 1"], [56, "cmp [rbp+var_C], eax"], [57, "jz short loc_416AAF"], [58, "mov edx, [rbp+var_1C]"], [59, "mov eax, [rbp+var_20]"], [60, "add eax, edx"], [61, "mov edx, eax"], [62, "mov rax, [rbp+var_38]"], [63, "mov rax, [rax+8]"], [64, "cmp rdx, rax"], [65, "jb short loc_416AB6"], [66, "mov [rbp+var_10], 1"], [67, "mov rax, [rbp+var_38]"], [68, "mov rdx, [rax+10h]"], [69, "mov eax, [rbp+var_20]"], [70, "shl rax, 3"], [71, "add rax, rdx"], [72, "mov rax, [rax]"], [73, "lea rdx, [rax+8]"], [74, "mov eax, [rbp+var_10]"], [75, "mov esi, eax"], [76, "lea rdi, aS"], [77, "mov eax, 0"], [78, "call _printf"], [79, "add [rbp+var_C], 1"], [80, "mov eax, [rbp+var_C]"], [81, "cmp eax, [rbp+var_4]"], [82, "jl loc_416A66"], [83, "jmp short loc_416AF8"], [84, "nop"], [85, "mov edi, 0Ah"], [86, "call _putchar"], [87, "add [rbp+var_8], 1"], [88, "mov eax, [rbp+var_8]"], [89, "cmp eax, [rbp+var_1C]"], [90, "jl loc_416A49"], [91, "nop"], [92, "nop"], [93, "leave"], [94, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 7], [9, 7], [10, 9], [13, 12], [14, 13], [15, 14], [16, 8], [17, 16], [17, 15], [18, 17], [19, 15], [21, 8], [22, 19], [23, 3], [24, 23], [25, 22], [25, 5], [27, 24], [27, 25], [28, 27], [29, 22], [29, 5], [30, 29], [32, 30], [33, 28], [36, 10], [36, 85], [41, 79], [41, 39], [42, 41], [42, 33], [43, 42], [44, 87], [44, 34], [45, 43], [45, 44], [46, 45], [47, 8], [47, 21], [48, 47], [49, 46], [50, 3], [51, 50], [52, 49], [52, 51], [53, 52], [54, 22], [54, 5], [55, 54], [56, 39], [56, 55], [56, 79], [57, 56], [58, 33], [59, 46], [60, 59], [60, 58], [61, 60], [62, 3], [63, 62], [64, 61], [64, 63], [65, 64], [67, 3], [68, 67], [69, 46], [70, 69], [71, 68], [71, 70], [72, 71], [73, 68], [73, 72], [74, 48], [74, 66], [75, 74], [76, 36], [76, 76], [79, 39], [79, 79], [80, 39], [80, 79], [81, 5], [81, 80], [81, 22], [82, 81], [87, 34], [87, 87], [88, 87], [88, 34], [89, 88], [89, 33], [90, 89], [94, 88]]}
| {"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/26ed2b34fb46086588f2bdc8c38fd25410f82edabc1bab24213dd4c0c0fc7725_26ed2b34fb46086588f2bdc8c38fd25410f82edabc1bab24213dd4c0c0fc7725.jsonl.gz", "strip_func_name": "sub_4169CE", "query": "\n\n\n__int64 __fastcall sub_4169CE(__int64 a1, int a2)\n{\n__int64 result; // rax\n_WORD v3[4]; // [rsp+18h] [rbp-28h] BYREF\nunsigned int v4; // [rsp+20h] [rbp-20h]\nint v5; // [rsp+24h] [rbp-1Ch]\nint v6; // [rsp+28h] [rbp-18h]\nint v7; // [rsp+2Ch] [rbp-14h]\nint v8; // [rsp+30h] [rbp-10h]\nint j; // [rsp+34h] [rbp-Ch]\nunsigned int i; // [rsp+38h] [rbp-8h]\nint v11; // [rsp+3Ch] [rbp-4h]\n\nv11 = 1;\nv7 = a2 + 1;\nsub_4168FD(v3);\nv6 = v3[1] - 1;\nif ( v7 < v6 )\nv11 = v6 / v7;\nv5 = (*(_QWORD *)(a1 + 8) + v11 - 1LL) / (unsigned __int64)v11;\nfor ( i = 0; ; ++i )\n{\nresult = i;\nif ( (int)i >= v5 )\nbreak;\nprintf(\" \");\nfor ( j = 0; j < v11; ++j )\n{\nv4 = v5 * j + i;\nv8 = v7;\nif ( (unsigned __int64)v4 >= *(_QWORD *)(a1 + 8) )\nbreak;\nif ( j == v11 - 1 || (unsigned __int64)(v5 + v4) >= *(_QWORD *)(a1 + 8) )\nv8 = 1;\nprintf(\"%-*s\", v8, (const char *)(*(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * v4) + 8LL));\n}\nputchar(10);\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v3,v4,v5,v6,v7,v8,v11,sub_4169CE,sub_4168FD,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'cmds', 'a2': 'longest', 'v3': 'win', 'v4': 'n', 'v5': 'rows', 'v6': 'max_cols', 'v7': 'space', 'v8': 'size', 'v11': 'cols', 'sub_4169CE': 'pretty_print_string_list', 'sub_4168FD': 'get_term_dimensions'}"} |
|
setup_shm | 1324e44acb9dbcb87afe14eacfe501d6eb9463d58e47f3f61eff0fd7ded06cc7 | mxmssh | drAFL | NA | EXP_ST void setup_shm(void) {
u8* shm_str;
if (!in_bitmap) memset(virgin_bits, 255, MAP_SIZE);
memset(virgin_tmout, 255, MAP_SIZE);
memset(virgin_crash, 255, MAP_SIZE);
shm_id = shmget(IPC_PRIVATE, MAP_SIZE, IPC_CREAT | IPC_EXCL | 0600);
if (shm_id < 0) PFATAL("shmget() failed");
atexit(remove_shm);
shm_str = alloc_printf("%d", shm_id);
/* If somebody is asking us to fuzz instrumented binaries in dumb mode,
we don't want them to detect instrumentation, since we won't be sending
fork server commands. This should be replaced with better auto-detection
later on, perhaps? */
if (!dumb_mode) setenv(SHM_ENV_VAR, shm_str, 1);
ck_free(shm_str);
trace_bits = shmat(shm_id, NULL, 0);
if (!trace_bits) PFATAL("shmat() failed");
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405E0C", "function_addr": 4218380, "binary_name": "1324e44acb9dbcb87afe14eacfe501d6eb9463d58e47f3f61eff0fd7ded06cc7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov rax, cs:qword_4264D0"], [4, "test rax, rax"], [5, "jnz short loc_405E34"], [6, "mov edx, 10000h"], [7, "mov esi, 0FFh"], [8, "mov edi, offset unk_426520"], [9, "call _memset"], [10, "mov edx, 10000h"], [11, "mov esi, 0FFh"], [12, "mov edi, offset unk_436520"], [13, "call _memset"], [14, "mov edx, 10000h"], [15, "mov esi, 0FFh"], [16, "mov edi, offset unk_446520"], [17, "call _memset"], [18, "mov edx, 780h"], [19, "mov esi, 10000h"], [20, "mov edi, 0"], [21, "call _shmget"], [22, "mov cs:shmid, eax"], [23, "mov eax, cs:shmid"], [24, "test eax, eax"], [25, "jns short loc_405EE6"], [26, "mov rax, cs:stdout"], [27, "mov rdi, rax"], [28, "call _fflush"], [29, "mov edi, offset byte_41BB80"], [30, "mov eax, 0"], [31, "call _printf"], [32, "mov ecx, 549h"], [33, "mov edx, offset aAflFuzzC"], [34, "mov esi, offset aSetupShm"], [35, "mov edi, offset a191mStopLocati_0"], [36, "mov eax, 0"], [37, "call _printf"], [38, "call ___errno_location"], [39, "mov eax, [rax]"], [40, "mov edi, eax"], [41, "call _strerror"], [42, "mov rsi, rax"], [43, "mov edi, offset a191mOsMessage0"], [44, "mov eax, 0"], [45, "call _printf"], [46, "mov edi, 1"], [47, "call _exit"], [48, "mov edi, offset sub_405A79"], [49, "call sub_41A0A0"], [50, "mov eax, cs:shmid"], [51, "mov ecx, eax"], [52, "mov edx, offset aD"], [53, "mov esi, 0"], [54, "mov edi, 0"], [55, "mov eax, 0"], [56, "call _snprintf"], [57, "mov [rbp+var_4], eax"], [58, "cmp [rbp+var_4], 0"], [59, "jns short loc_405F51"], [60, "mov edi, offset byte_41B428"], [61, "mov eax, 0"], [62, "call _printf"], [63, "mov ecx, 54Dh"], [64, "mov edx, offset aAflFuzzC"], [65, "mov esi, offset aSetupShm"], [66, "mov edi, offset a191mLocation0m"], [67, "mov eax, 0"], [68, "call _printf"], [69, "mov edi, 1"], [70, "call _exit"], [71, "mov eax, [rbp+var_4]"], [72, "add eax, 1"], [73, "mov edi, eax"], [74, "call sub_40283B"], [75, "mov [rbp+s], rax"], [76, "mov edx, cs:shmid"], [77, "mov eax, [rbp+var_4]"], [78, "add eax, 1"], [79, "movsxd rsi, eax"], [80, "mov rax, [rbp+s]"], [81, "mov ecx, edx"], [82, "mov edx, offset aD"], [83, "mov rdi, rax"], [84, "mov eax, 0"], [85, "call _snprintf"], [86, "mov rax, [rbp+s]"], [87, "mov [rbp+value], rax"], [88, "movzx eax, cs:byte_4264F3"], [89, "test al, al"], [90, "jnz short loc_405FB2"], [91, "mov rax, [rbp+value]"], [92, "mov edx, 1"], [93, "mov rsi, rax"], [94, "mov edi, offset aAflShmId"], [95, "call _setenv"], [96, "mov rax, [rbp+value]"], [97, "mov rdi, rax"], [98, "call sub_402877"], [99, "mov eax, cs:shmid"], [100, "mov edx, 0"], [101, "mov esi, 0"], [102, "mov edi, eax"], [103, "call _shmat"], [104, "mov cs:dest, rax"], [105, "mov rax, cs:dest"], [106, "test rax, rax"], [107, "jnz short loc_40604E"], [108, "mov rax, cs:stdout"], [109, "mov rdi, rax"], [110, "call _fflush"], [111, "mov edi, offset byte_41BBD8"], [112, "mov eax, 0"], [113, "call _printf"], [114, "mov ecx, 55Ah"], [115, "mov edx, offset aAflFuzzC"], [116, "mov esi, offset aSetupShm"], [117, "mov edi, offset a191mStopLocati_0"], [118, "mov eax, 0"], [119, "call _printf"], [120, "call ___errno_location"], [121, "mov eax, [rax]"], [122, "mov edi, eax"], [123, "call _strerror"], [124, "mov rsi, rax"], [125, "mov edi, offset a191mOsMessage0"], [126, "mov eax, 0"], [127, "call _printf"], [128, "mov edi, 1"], [129, "call _exit"], [130, "nop"], [131, "leave"], [132, "retn"]], "data_dep": [[4, 3], [5, 4], [22, 21], [23, 22], [24, 23], [25, 24], [27, 26], [39, 38], [40, 39], [42, 41], [50, 22], [51, 50], [57, 56], [58, 57], [59, 58], [71, 57], [72, 71], [73, 72], [75, 74], [76, 22], [77, 57], [78, 77], [79, 78], [80, 75], [81, 76], [83, 80], [86, 75], [87, 86], [89, 88], [90, 89], [91, 87], [93, 91], [96, 87], [97, 96], [99, 22], [102, 99], [104, 103], [105, 104], [106, 105], [107, 106], [109, 108], [121, 120], [122, 121], [124, 123], [132, 106]]}
| {"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/1324e44acb9dbcb87afe14eacfe501d6eb9463d58e47f3f61eff0fd7ded06cc7_1324e44acb9dbcb87afe14eacfe501d6eb9463d58e47f3f61eff0fd7ded06cc7.jsonl.gz", "strip_func_name": "sub_405E0C", "query": "\n\n\nvoid *sub_405E0C()\n{\nint *v0; // rax\nchar *v1; // rax\nvoid *result; // rax\nint *v3; // rax\nchar *v4; // rax\nchar *s; // [rsp+10h] [rbp-10h]\nint v6; // [rsp+1Ch] [rbp-4h]\n\nif ( !qword_4264D0 )\nmemset(&unk_426520, 255, 0x10000uLL);\nmemset(&unk_436520, 255, 0x10000uLL);\nmemset(&unk_446520, 255, 0x10000uLL);\nshmid = shmget(0, 0x10000uLL, 1920);\nif ( shmid < 0 )\n{\nfflush(stdout);\nprintf(&byte_41BB80);\nprintf(\"\\x1B[1;91m\\n Stop location : \\x1B[0m%s(), %s:%u\\n\", \"setup_shm\", \"afl-fuzz.c\", 1353LL);\nv0 = __errno_location();\nv1 = strerror(*v0);\nprintf(\"\\x1B[1;91m OS message : \\x1B[0m%s\\n\", v1);\nexit(1);\n}\nsub_41A0A0(sub_405A79);\nv6 = snprintf(0LL, 0LL, \"%d\", (unsigned int)shmid);\nif ( v6 < 0 )\n{\nprintf(&byte_41B428);\nprintf(\"\\x1B[1;91m\\n Location : \\x1B[0m%s(), %s:%u\\n\\n\", \"setup_shm\", \"afl-fuzz.c\", 1357LL);\nexit(1);\n}\ns = (char *)sub_40283B(v6 + 1);\nsnprintf(s, v6 + 1, \"%d\", (unsigned int)shmid);\nif ( !byte_4264F3 )\nsetenv(\"__AFL_SHM_ID\", s, 1);\nsub_402877((__int64)s);\ndest = shmat(shmid, 0LL, 0);\nresult = dest;\nif ( !dest )\n{\nfflush(stdout);\nprintf(&byte_41BBD8);\nprintf(\"\\x1B[1;91m\\n Stop location : \\x1B[0m%s(), %s:%u\\n\", \"setup_shm\", \"afl-fuzz.c\", 1370LL);\nv3 = __errno_location();\nv4 = strerror(*v3);\nprintf(\"\\x1B[1;91m OS message : \\x1B[0m%s\\n\", v4);\nexit(1);\n}\nreturn result;\n}\n\n\n\nQ:[s,v6,sub_405E0C,sub_41A0A0,sub_40283B,sub_402877,]\nAssistant: ", "hints": "[]", "response": "{'s': '_tmp', 'v6': '_len', 'sub_405E0C': 'setup_shm', 'sub_41A0A0': 'atexit', 'sub_40283B': 'DFL_ck_alloc', 'sub_402877': 'DFL_ck_free'}"} |
|
map_xi2_button | 9de5ffb56b7f9e34e3bfe99439129c274e487945e3035e4ab59db7f5f4aed2aa | icculus | manymouse | NA | static inline int map_xi2_button(const int button)
{
if (button == 2)
return 3;
else if (button == 3)
return 2;
return button;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4027A4", "function_addr": 4204452, "binary_name": "9de5ffb56b7f9e34e3bfe99439129c274e487945e3035e4ab59db7f5f4aed2aa.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_4], edi"], [3, "cmp [rbp+var_4], 2"], [4, "jnz short loc_4027B8"], [5, "mov eax, 3"], [6, "jmp short loc_4027C8"], [7, "cmp [rbp+var_4], 3"], [8, "jnz short loc_4027C5"], [9, "mov eax, 2"], [10, "jmp short loc_4027C8"], [11, "mov eax, [rbp+var_4]"], [12, "pop rbp"], [13, "retn"]], "data_dep": [[3, 2], [4, 3], [7, 2], [8, 7], [11, 2], [12, 0], [13, 9], [13, 5], [13, 11]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/9de5ffb56b7f9e34e3bfe99439129c274e487945e3035e4ab59db7f5f4aed2aa_9de5ffb56b7f9e34e3bfe99439129c274e487945e3035e4ab59db7f5f4aed2aa.jsonl.gz", "strip_func_name": "sub_4027A4", "query": "\n\n\n__int64 __fastcall sub_4027A4(unsigned int a1)\n{\nif ( a1 == 2 )\nreturn 3LL;\nif ( a1 == 3 )\nreturn 2LL;\nreturn a1;\n}\n\n\n\nQ:[a1,sub_4027A4,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'button', 'sub_4027A4': 'map_xi2_button'}"} |
|
FSEv06_buildDTable_raw | 8344e4f2e71647113a4027b2f26417ee1a42cf3c0de632f9252e1b29c5147f05 | soedinglab | MMseqs2 | NA | size_t FSEv06_buildDTable_raw (FSEv06_DTable* dt, unsigned nbBits)
{
void* ptr = dt;
FSEv06_DTableHeader* const DTableH = (FSEv06_DTableHeader*)ptr;
void* dPtr = dt + 1;
FSEv06_decode_t* const dinfo = (FSEv06_decode_t*)dPtr;
const unsigned tableSize = 1 << nbBits;
const unsigned tableMask = tableSize - 1;
const unsigned maxSV1 = tableMask+1;
unsigned s;
/* Sanity checks */
if (nbBits < 1) return ERROR(GENERIC); /* min size */
/* Build Decoding Table */
DTableH->tableLog = (U16)nbBits;
DTableH->fastMode = 1;
for (s=0; s<maxSV1; s++) {
dinfo[s].newState = 0;
dinfo[s].symbol = (BYTE)s;
dinfo[s].nbBits = (BYTE)nbBits;
}
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_47C0F8", "function_addr": 4702456, "binary_name": "8344e4f2e71647113a4027b2f26417ee1a42cf3c0de632f9252e1b29c5147f05.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_48], rdi"], [3, "mov [rbp+var_4C], esi"], [4, "mov rax, [rbp+var_48]"], [5, "mov [rbp+var_10], rax"], [6, "mov rax, [rbp+var_10]"], [7, "mov [rbp+var_18], rax"], [8, "mov rax, [rbp+var_48]"], [9, "add rax, 4"], [10, "mov [rbp+var_20], rax"], [11, "mov rax, [rbp+var_20]"], [12, "mov [rbp+var_28], rax"], [13, "mov eax, [rbp+var_4C]"], [14, "mov edx, 1"], [15, "mov ecx, eax"], [16, "shl edx, cl"], [17, "mov eax, edx"], [18, "mov [rbp+var_2C], eax"], [19, "mov eax, [rbp+var_2C]"], [20, "sub eax, 1"], [21, "mov [rbp+var_30], eax"], [22, "mov eax, [rbp+var_30]"], [23, "add eax, 1"], [24, "mov [rbp+var_34], eax"], [25, "cmp [rbp+var_4C], 0"], [26, "jnz short loc_47C159"], [27, "mov rax, 0FFFFFFFFFFFFFFFFh"], [28, "jmp short loc_47C1D0"], [29, "mov eax, [rbp+var_4C]"], [30, "mov edx, eax"], [31, "mov rax, [rbp+var_18]"], [32, "mov [rax], dx"], [33, "mov rax, [rbp+var_18]"], [34, "mov word ptr [rax+2], 1"], [35, "mov [rbp+var_4], 0"], [36, "jmp short loc_47C1C3"], [37, "mov eax, [rbp+var_4]"], [38, "lea rdx, ds:0[rax*4]"], [39, "mov rax, [rbp+var_28]"], [40, "add rax, rdx"], [41, "mov word ptr [rax], 0"], [42, "mov eax, [rbp+var_4]"], [43, "lea rdx, ds:0[rax*4]"], [44, "mov rax, [rbp+var_28]"], [45, "add rax, rdx"], [46, "mov edx, [rbp+var_4]"], [47, "mov [rax+2], dl"], [48, "mov eax, [rbp+var_4]"], [49, "lea rdx, ds:0[rax*4]"], [50, "mov rax, [rbp+var_28]"], [51, "add rax, rdx"], [52, "mov edx, [rbp+var_4C]"], [53, "mov [rax+3], dl"], [54, "add [rbp+var_4], 1"], [55, "mov eax, [rbp+var_4]"], [56, "cmp eax, [rbp+var_34]"], [57, "jb short loc_47C178"], [58, "mov eax, 0"], [59, "pop rbp"], [60, "retn"]], "data_dep": [[4, 2], [5, 4], [6, 5], [7, 6], [8, 2], [9, 8], [10, 9], [11, 10], [12, 11], [13, 3], [15, 13], [16, 15], [16, 14], [17, 16], [18, 17], [19, 18], [20, 19], [21, 20], [22, 21], [23, 22], [24, 23], [25, 3], [26, 25], [29, 3], [30, 29], [31, 7], [32, 31], [32, 30], [33, 7], [34, 33], [37, 54], [37, 35], [38, 52], [38, 30], [39, 12], [40, 38], [40, 39], [41, 40], [42, 54], [42, 35], [43, 38], [44, 12], [45, 43], [45, 44], [46, 54], [46, 35], [47, 46], [47, 45], [48, 54], [48, 35], [49, 46], [50, 12], [51, 50], [51, 49], [52, 3], [53, 52], [53, 51], [54, 54], [54, 35], [55, 35], [55, 54], [56, 55], [56, 24], [57, 56], [59, 0], [60, 58], [60, 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/8344e4f2e71647113a4027b2f26417ee1a42cf3c0de632f9252e1b29c5147f05_8344e4f2e71647113a4027b2f26417ee1a42cf3c0de632f9252e1b29c5147f05.jsonl.gz", "strip_func_name": "sub_47C0F8", "query": "\n\n\n__int64 __fastcall sub_47C0F8(_WORD *a1, int a2)\n{\n_WORD *v3; // [rsp+24h] [rbp-28h]\nunsigned int i; // [rsp+48h] [rbp-4h]\n\nv3 = a1 + 2;\nif ( !a2 )\nreturn -1LL;\n*a1 = a2;\na1[1] = 1;\nfor ( i = 0; i < 1 << a2; ++i )\n{\nv3[2 * i] = 0;\nLOBYTE(v3[2 * i + 1]) = i;\nHIBYTE(v3[2 * i + 1]) = a2;\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v3,i,sub_47C0F8,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'dt', 'a2': 'nbBits', 'v3': 'dinfo', 'i': 's', 'sub_47C0F8': 'FSEv06_buildDTable_raw'}"} |