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
get_share_path
07d5f0a7dd34ad0b369201e3ba5f71beb97baab12b2e358b74a3a83fbd920a70
sraoss
pgsql-ivm
NA
void get_share_path(const char *my_exec_path, char *ret_path) { make_relative_path(ret_path, PGSHAREDIR, PGBINDIR, my_exec_path); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40A6FE", "function_addr": 4237054, "binary_name": "07d5f0a7dd34ad0b369201e3ba5f71beb97baab12b2e358b74a3a83fbd920a70.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov rdx, [rbp+var_8]"], [6, "mov rax, [rbp+var_10]"], [7, "mov rcx, rdx"], [8, "mov edx, offset aUsrLocalPgsqlB"], [9, "mov esi, offset aUsrLocalPgsqlS"], [10, "mov rdi, rax"], [11, "call sub_40A35A"], [12, "nop"], [13, "leave"], [14, "retn"]], "data_dep": [[5, 3], [6, 4], [7, 5], [10, 6], [14, 11]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/07d5f0a7dd34ad0b369201e3ba5f71beb97baab12b2e358b74a3a83fbd920a70_07d5f0a7dd34ad0b369201e3ba5f71beb97baab12b2e358b74a3a83fbd920a70.jsonl.gz", "strip_func_name": "sub_40A6FE", "query": "\n\n\nunsigned __int64 __fastcall sub_40A6FE(_BYTE *a1, char *a2)\n{\nreturn sub_40A35A(a2, \"/usr/local/pgsql/share\", \"/usr/local/pgsql/bin\", a1);\n}\n\n\n\nQ:[a1,a2,sub_40A6FE,sub_40A35A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'my_exec_path', 'a2': 'ret_path', 'sub_40A6FE': 'get_share_path', 'sub_40A35A': 'make_relative_path'}"}
muxi_svc
13f2671241114a962235990a8a53447d965ef69e183b81e214ebbded998f318a
open-simh
simh
NA
t_stat muxi_svc (UNIT *uptr) { int32 ln, c, t; if ((uptr->flags & UNIT_ATT) == 0) /* attached? */ return SCPE_OK; t = sim_rtcn_calb (mux_tps, TMR_MUX); /* calibrate */ sim_activate (uptr, t); /* continue poll */ ln = tmxr_poll_conn (&mux_desc); /* look for connect */ if (ln >= 0) { /* got one? */ if (!PROJ_GENIE && (mux_sta[ln] & MUX_SLNE)) { /* modem & DTR? */ mux_sta[ln] = mux_sta[ln] | (MUX_SCRO|MUX_SDSR);/* carrier on */ MUX_SETFLG (ln, MUX_FCRN); /* set carr on flag */ mux_scan_next (); /* kick scanner */ } mux_ldsc[ln].rcve = 1; /* set rcv enable */ } tmxr_poll_rx (&mux_desc); /* poll for input */ for (ln = 0; ln < MUX_NUMLIN; ln++) { /* loop thru lines */ if (mux_ldsc[ln].conn) { /* connected? */ if ((c = tmxr_getc_ln (&mux_ldsc[ln]))) { /* get char */ if (mux_sta[ln] & MUX_SCHP) /* already got one? */ mux_sta[ln] = mux_sta[ln] | MUX_SOVR; /* overrun */ else mux_sta[ln] = mux_sta[ln] | MUX_SCHP; /* char pending */ if (c & SCPE_BREAK) /* break? */ c = 0; else c = sim_tt_inpcvt (c, TT_GET_MODE (muxl_unit[ln].flags)); mux_rbuf[ln] = c; /* save char */ MUX_SETFLG (ln, MUX_FRCV); /* set rcv flag */ mux_scan_next (); /* kick scanner */ } } else mux_sta[ln] = 0; /* disconnected */ } /* end for */ return SCPE_OK; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40D3BD", "function_addr": 4248509, "binary_name": "13f2671241114a962235990a8a53447d965ef69e183b81e214ebbded998f318a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov rax, [rbp+var_18]"], [5, "mov eax, [rax+38h]"], [6, "and eax, 10h"], [7, "test eax, eax"], [8, "jnz short loc_40D3E1"], [9, "mov eax, 0"], [10, "jmp locret_40D5DD"], [11, "mov eax, cs:dword_4D2B40"], [12, "mov esi, 1"], [13, "mov edi, eax"], [14, "call sub_448CE4"], [15, "mov [rbp+var_C], eax"], [16, "mov edx, [rbp+var_C]"], [17, "mov rax, [rbp+var_18]"], [18, "mov esi, edx"], [19, "mov rdi, rax"], [20, "call sub_4631EA"], [21, "mov edi, offset dword_4D2B60"], [22, "call sub_456907"], [23, "mov [rbp+var_4], eax"], [24, "cmp [rbp+var_4], 0"], [25, "js short loc_40D492"], [26, "mov eax, cs:dword_4CE678"], [27, "and eax, 10000h"], [28, "test eax, eax"], [29, "jnz short loc_40D472"], [30, "mov eax, [rbp+var_4]"], [31, "cdqe"], [32, "movzx eax, ds:byte_546EE0[rax]"], [33, "movzx eax, al"], [34, "and eax, 4"], [35, "test eax, eax"], [36, "jz short loc_40D472"], [37, "mov eax, [rbp+var_4]"], [38, "cdqe"], [39, "movzx eax, ds:byte_546EE0[rax]"], [40, "or eax, 30h"], [41, "mov edx, eax"], [42, "mov eax, [rbp+var_4]"], [43, "cdqe"], [44, "mov ds:byte_546EE0[rax], dl"], [45, "mov eax, [rbp+var_4]"], [46, "shl eax, 2"], [47, "add eax, 2"], [48, "cdqe"], [49, "mov ds:byte_546F00[rax], 1"], [50, "call sub_40D726"], [51, "mov eax, [rbp+var_4]"], [52, "movsxd rdx, eax"], [53, "mov rax, rdx"], [54, "shl rax, 6"], [55, "add rax, rdx"], [56, "shl rax, 3"], [57, "add rax, 546FDCh"], [58, "mov dword ptr [rax], 1"], [59, "mov edi, offset dword_4D2B60"], [60, "call sub_45B710"], [61, "mov [rbp+var_4], 0"], [62, "jmp loc_40D5C9"], [63, "mov eax, [rbp+var_4]"], [64, "movsxd rdx, eax"], [65, "mov rax, rdx"], [66, "shl rax, 6"], [67, "add rax, rdx"], [68, "shl rax, 3"], [69, "add rax, 546FA0h"], [70, "mov eax, [rax]"], [71, "test eax, eax"], [72, "jz loc_40D5B9"], [73, "mov eax, [rbp+var_4]"], [74, "movsxd rdx, eax"], [75, "mov rax, rdx"], [76, "shl rax, 6"], [77, "add rax, rdx"], [78, "shl rax, 3"], [79, "add rax, 546FA0h"], [80, "mov rdi, rax"], [81, "call sub_45AE13"], [82, "mov [rbp+var_8], eax"], [83, "cmp [rbp+var_8], 0"], [84, "jz loc_40D5C5"], [85, "mov eax, [rbp+var_4]"], [86, "cdqe"], [87, "movzx eax, ds:byte_546EE0[rax]"], [88, "movzx eax, al"], [89, "and eax, 1"], [90, "test eax, eax"], [91, "jz short loc_40D52F"], [92, "mov eax, [rbp+var_4]"], [93, "cdqe"], [94, "movzx eax, ds:byte_546EE0[rax]"], [95, "or eax, 2"], [96, "mov edx, eax"], [97, "mov eax, [rbp+var_4]"], [98, "cdqe"], [99, "mov ds:byte_546EE0[rax], dl"], [100, "jmp short loc_40D54B"], [101, "mov eax, [rbp+var_4]"], [102, "cdqe"], [103, "movzx eax, ds:byte_546EE0[rax]"], [104, "or eax, 1"], [105, "mov edx, eax"], [106, "mov eax, [rbp+var_4]"], [107, "cdqe"], [108, "mov ds:byte_546EE0[rax], dl"], [109, "mov eax, [rbp+var_8]"], [110, "and eax, 20000000h"], [111, "test eax, eax"], [112, "jz short loc_40D560"], [113, "mov [rbp+var_8], 0"], [114, "jmp short loc_40D593"], [115, "mov eax, [rbp+var_4]"], [116, "movsxd rdx, eax"], [117, "mov rax, rdx"], [118, "shl rax, 5"], [119, "add rax, rdx"], [120, "shl rax, 3"], [121, "add rax, 4D4298h"], [122, "mov eax, [rax]"], [123, "shr eax, 10h"], [124, "and eax, 0Fh"], [125, "mov edx, eax"], [126, "mov eax, [rbp+var_8]"], [127, "mov esi, edx"], [128, "mov edi, eax"], [129, "call sub_444DAC"], [130, "mov [rbp+var_8], eax"], [131, "mov eax, [rbp+var_8]"], [132, "mov edx, eax"], [133, "mov eax, [rbp+var_4]"], [134, "cdqe"], [135, "mov ds:byte_546EA0[rax], dl"], [136, "mov eax, [rbp+var_4]"], [137, "shl eax, 2"], [138, "cdqe"], [139, "mov ds:byte_546F00[rax], 1"], [140, "call sub_40D726"], [141, "jmp short loc_40D5C5"], [142, "mov eax, [rbp+var_4]"], [143, "cdqe"], [144, "mov ds:byte_546EE0[rax], 0"], [145, "add [rbp+var_4], 1"], [146, "mov eax, cs:dword_4D2B60"], [147, "cmp [rbp+var_4], eax"], [148, "jl loc_40D4A8"], [149, "mov eax, 0"], [150, "leave"], [151, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [13, 11], [15, 14], [16, 15], [17, 3], [18, 16], [19, 17], [23, 22], [24, 23], [25, 24], [27, 26], [28, 27], [29, 28], [30, 23], [33, 32], [34, 33], [35, 34], [36, 35], [37, 23], [40, 39], [41, 40], [42, 23], [44, 41], [45, 23], [46, 45], [47, 46], [51, 23], [52, 51], [53, 52], [54, 53], [55, 52], [55, 54], [56, 55], [57, 56], [58, 57], [63, 61], [63, 145], [64, 63], [65, 64], [66, 65], [67, 64], [67, 66], [68, 67], [69, 68], [70, 58], [70, 69], [71, 70], [72, 71], [73, 145], [73, 61], [74, 73], [75, 74], [76, 75], [77, 76], [77, 74], [78, 77], [79, 78], [80, 79], [82, 81], [83, 82], [84, 83], [85, 61], [85, 145], [87, 144], [87, 99], [87, 44], [87, 108], [88, 87], [89, 88], [90, 89], [91, 90], [92, 145], [92, 61], [94, 144], [94, 99], [94, 44], [94, 108], [95, 94], [96, 95], [97, 145], [97, 61], [99, 96], [101, 145], [101, 61], [103, 99], [103, 44], [103, 108], [103, 144], [104, 103], [105, 104], [106, 61], [106, 145], [108, 105], [109, 82], [110, 109], [111, 110], [112, 111], [115, 61], [115, 145], [116, 115], [117, 116], [118, 117], [119, 116], [119, 118], [120, 119], [121, 120], [122, 58], [122, 121], [123, 122], [124, 123], [125, 124], [126, 82], [127, 125], [128, 126], [130, 129], [131, 113], [131, 130], [132, 131], [133, 61], [133, 145], [135, 132], [136, 61], [136, 145], [137, 136], [142, 61], [142, 145], [145, 61], [145, 145], [147, 146], [147, 61], [147, 145], [148, 147], [151, 9], [151, 149]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/13f2671241114a962235990a8a53447d965ef69e183b81e214ebbded998f318a_13f2671241114a962235990a8a53447d965ef69e183b81e214ebbded998f318a.jsonl.gz", "strip_func_name": "sub_40D3BD", "query": "\n\n\n__int64 __fastcall sub_40D3BD(__int64 a1)\n{\nunsigned int v2; // [rsp+14h] [rbp-Ch]\nunsigned int v3; // [rsp+18h] [rbp-8h]\nchar v4; // [rsp+18h] [rbp-8h]\nint v5; // [rsp+1Ch] [rbp-4h]\nint i; // [rsp+1Ch] [rbp-4h]\n\nif ( (*(_DWORD *)(a1 + 56) & 0x10) == 0 )\nreturn 0LL;\nv2 = sub_448CE4((unsigned int)dword_4D2B40, 1LL);\nsub_4631EA(a1, v2);\nv5 = sub_456907(&dword_4D2B60);\nif ( v5 >= 0 )\n{\nif ( (dword_4CE678 & 0x10000) == 0 && (byte_546EE0[v5] & 4) != 0 )\n{\nbyte_546EE0[v5] |= 0x30u;\nbyte_546F00[4 * v5 + 2] = 1;\nsub_40D726();\n}\ndword_546FA0[130 * v5 + 15] = 1;\n}\nsub_45B710(&dword_4D2B60);\nfor ( i = 0; i < dword_4D2B60; ++i )\n{\nif ( dword_546FA0[130 * i] )\n{\nv3 = sub_45AE13(520LL * i + 5533600);\nif ( v3 )\n{\nif ( (byte_546EE0[i] & 1) != 0 )\nbyte_546EE0[i] |= 2u;\nelse\nbyte_546EE0[i] |= 1u;\nif ( (v3 & 0x20000000) != 0 )\nv4 = 0;\nelse\nv4 = sub_444DAC(v3, HIWORD(*((_DWORD *)&unk_4D4298 + 66 * i)) & 0xF);\nbyte_546EA0[i] = v4;\nbyte_546F00[4 * i] = 1;\nsub_40D726();\n}\n}\nelse\n{\nbyte_546EE0[i] = 0;\n}\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,v3,i,sub_40D3BD,sub_448CE4,sub_4631EA,sub_456907,sub_40D726,sub_45B710,sub_45AE13,sub_444DAC,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'uptr', 'v3': 'ca', 'i': 'ln', 'sub_40D3BD': 'muxi_svc', 'sub_448CE4': 'sim_rtcn_calb', 'sub_4631EA': 'tmxr_activate', 'sub_456907': 'tmxr_poll_conn', 'sub_40D726': 'mux_scan_next', 'sub_45B710': 'tmxr_poll_rx', 'sub_45AE13': 'tmxr_getc_ln', 'sub_444DAC': 'sim_tt_inpcvt'}"}
parse_rwflags
e5ee0203e1b19b8999a5a0fc3546f2fbd5543cbefd2ec1cd7236ad2356113f8c
Mithreindeir
Dynzasm
NA
void parse_rwflags(struct dsem *sem, char *line) { int len = strlen(line); char *val = line; while (val && val!=(line+len) && *val) { char *ft = strchr(val, '$'); if (!ft) return; val = strchr(val, '='); if (!val) return; val++; unsigned char flags = 0; int fv = 0; while ((fv=val[0])) { flags |= FVAL(fv); val++; } if (!strncmp(ft, "$mf", 3)) sem->mflags |= flags; if (!strncmp(ft, "$rf", 3)) sem->rflags |= flags; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402FEA", "function_addr": 4206570, "binary_name": "e5ee0203e1b19b8999a5a0fc3546f2fbd5543cbefd2ec1cd7236ad2356113f8c.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+s], rsi"], [5, "mov rax, [rbp+s]"], [6, "mov rdi, rax"], [7, "call _strlen"], [8, "mov [rbp+var_10], eax"], [9, "mov rax, [rbp+s]"], [10, "mov [rbp+var_8], rax"], [11, "jmp loc_40314B"], [12, "mov rax, [rbp+var_8]"], [13, "mov esi, 24h "], [14, "mov rdi, rax"], [15, "call _strchr"], [16, "mov [rbp+s1], rax"], [17, "cmp [rbp+s1], 0"], [18, "jz loc_403176"], [19, "mov rax, [rbp+var_8]"], [20, "mov esi, 3Dh "], [21, "mov rdi, rax"], [22, "call _strchr"], [23, "mov [rbp+var_8], rax"], [24, "cmp [rbp+var_8], 0"], [25, "jz loc_403179"], [26, "add [rbp+var_8], 1"], [27, "mov [rbp+var_9], 0"], [28, "mov [rbp+var_1C], 0"], [29, "jmp short loc_4030D8"], [30, "cmp [rbp+var_1C], 6Fh "], [31, "jz short loc_4030C5"], [32, "cmp [rbp+var_1C], 64h "], [33, "jz short loc_4030BE"], [34, "cmp [rbp+var_1C], 69h "], [35, "jz short loc_4030B7"], [36, "cmp [rbp+var_1C], 73h "], [37, "jz short loc_4030B0"], [38, "cmp [rbp+var_1C], 7Ah "], [39, "jz short loc_4030A9"], [40, "cmp [rbp+var_1C], 61h "], [41, "jz short loc_4030A2"], [42, "cmp [rbp+var_1C], 70h "], [43, "jz short loc_40309B"], [44, "cmp [rbp+var_1C], 63h "], [45, "setz al"], [46, "jmp short loc_4030CA"], [47, "mov eax, 2"], [48, "jmp short loc_4030CA"], [49, "mov eax, 4"], [50, "jmp short loc_4030CA"], [51, "mov eax, 8"], [52, "jmp short loc_4030CA"], [53, "mov eax, 10h"], [54, "jmp short loc_4030CA"], [55, "mov eax, 20h "], [56, "jmp short loc_4030CA"], [57, "mov eax, 40h "], [58, "jmp short loc_4030CA"], [59, "mov eax, 0FFFFFF80h"], [60, "movzx edx, [rbp+var_9]"], [61, "or eax, edx"], [62, "mov [rbp+var_9], al"], [63, "add [rbp+var_8], 1"], [64, "mov rax, [rbp+var_8]"], [65, "movzx eax, byte ptr [rax]"], [66, "movsx eax, al"], [67, "mov [rbp+var_1C], eax"], [68, "cmp [rbp+var_1C], 0"], [69, "jnz loc_403068"], [70, "mov rax, [rbp+s1]"], [71, "mov edx, 3"], [72, "mov esi, offset aMf"], [73, "mov rdi, rax"], [74, "call _strncmp"], [75, "test eax, eax"], [76, "jnz short loc_40311D"], [77, "mov rax, [rbp+var_28]"], [78, "movzx eax, byte ptr [rax+41h]"], [79, "or al, [rbp+var_9]"], [80, "mov edx, eax"], [81, "mov rax, [rbp+var_28]"], [82, "mov [rax+41h], dl"], [83, "mov rax, [rbp+s1]"], [84, "mov edx, 3"], [85, "mov esi, offset aRf"], [86, "mov rdi, rax"], [87, "call _strncmp"], [88, "test eax, eax"], [89, "jnz short loc_40314B"], [90, "mov rax, [rbp+var_28]"], [91, "movzx eax, byte ptr [rax+40h]"], [92, "or al, [rbp+var_9]"], [93, "mov edx, eax"], [94, "mov rax, [rbp+var_28]"], [95, "mov [rax+40h], dl"], [96, "cmp [rbp+var_8], 0"], [97, "jz short locret_40317A"], [98, "mov eax, [rbp+var_10]"], [99, "movsxd rdx, eax"], [100, "mov rax, [rbp+s]"], [101, "add rax, rdx"], [102, "cmp [rbp+var_8], rax"], [103, "jz short locret_40317A"], [104, "mov rax, [rbp+var_8]"], [105, "movzx eax, byte ptr [rax]"], [106, "test al, al"], [107, "jnz loc_403016"], [108, "jmp short locret_40317A"], [109, "nop"], [110, "jmp short locret_40317A"], [111, "nop"], [112, "leave"], [113, "retn"]], "data_dep": [[5, 4], [6, 5], [8, 7], [9, 4], [10, 9], [12, 63], [12, 26], [12, 10], [14, 12], [16, 15], [17, 16], [18, 17], [19, 63], [19, 26], [19, 10], [21, 19], [23, 22], [24, 23], [25, 24], [26, 23], [30, 67], [31, 30], [32, 67], [33, 32], [34, 67], [35, 34], [36, 67], [37, 36], [38, 67], [39, 38], [40, 67], [41, 40], [42, 67], [43, 42], [44, 67], [45, 66], [45, 44], [60, 62], [60, 27], [61, 45], [61, 47], [61, 49], [61, 51], [61, 60], [61, 53], [61, 55], [61, 57], [61, 59], [62, 61], [63, 63], [63, 26], [64, 63], [64, 26], [65, 95], [65, 64], [65, 82], [66, 65], [67, 66], [68, 67], [69, 68], [70, 16], [73, 70], [75, 74], [76, 75], [77, 3], [78, 77], [78, 95], [78, 82], [79, 78], [79, 62], [79, 27], [80, 79], [81, 3], [82, 81], [82, 80], [83, 16], [86, 83], [88, 87], [89, 88], [90, 3], [91, 82], [91, 95], [91, 90], [92, 62], [92, 27], [92, 91], [93, 92], [94, 3], [95, 93], [95, 94], [96, 26], [96, 10], [96, 63], [97, 96], [98, 8], [99, 98], [100, 4], [101, 99], [101, 100], [102, 63], [102, 10], [102, 26], [102, 101], [103, 102], [104, 63], [104, 26], [104, 10], [105, 95], [105, 104], [105, 82], [106, 105], [107, 106], [113, 101], [113, 94], [113, 9], [113, 22], [113, 15], [113, 88], [113, 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/e5ee0203e1b19b8999a5a0fc3546f2fbd5543cbefd2ec1cd7236ad2356113f8c_e5ee0203e1b19b8999a5a0fc3546f2fbd5543cbefd2ec1cd7236ad2356113f8c.jsonl.gz", "strip_func_name": "sub_402FEA", "query": "\n\n\nint __fastcall sub_402FEA(__int64 a1, const char *a2)\n{\nchar *v2; // rax\nchar v3; // al\nint v5; // [rsp+14h] [rbp-1Ch]\nchar *s1; // [rsp+18h] [rbp-18h]\nint v7; // [rsp+20h] [rbp-10h]\nchar v8; // [rsp+27h] [rbp-9h]\nchar *v9; // [rsp+28h] [rbp-8h]\n\nv7 = strlen(a2);\nLODWORD(v2) = (_DWORD)a2;\nv9 = (char *)a2;\nwhile ( v9 )\n{\nv2 = (char *)&a2[v7];\nif ( v9 == v2 )\nbreak;\nLODWORD(v2) = (unsigned __int8)*v9;\nif ( !(_BYTE)v2 )\nbreak;\nv2 = strchr(v9, 36);\ns1 = v2;\nif ( !v2 )\nbreak;\nv2 = strchr(v9, 61);\nif ( !v2 )\nbreak;\nv9 = v2 + 1;\nv8 = 0;\nwhile ( 1 )\n{\nv5 = *v9;\nif ( !*v9 )\nbreak;\nswitch ( v5 )\n{\ncase 'o':\nv3 = 0x80;\nbreak;\ncase 'd':\nv3 = 64;\nbreak;\ncase 'i':\nv3 = 32;\nbreak;\ncase 's':\nv3 = 16;\nbreak;\ncase 'z':\nv3 = 8;\nbreak;\ncase 'a':\nv3 = 4;\nbreak;\ncase 'p':\nv3 = 2;\nbreak;\ndefault:\nv3 = v5 == 99;\nbreak;\n}\nv8 |= v3;\n++v9;\n}\nif ( !strncmp(s1, \"$mf\", 3uLL) )\n*(_BYTE *)(a1 + 65) |= v8;\nLODWORD(v2) = strncmp(s1, \"$rf\", 3uLL);\nif ( !(_DWORD)v2 )\n{\nLODWORD(v2) = a1;\n*(_BYTE *)(a1 + 64) |= v8;\n}\n}\nreturn (int)v2;\n}\n\n\n\nQ:[a1,a2,v5,s1,v7,v8,v9,sub_402FEA,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'sem', 'a2': 'line', 'v5': 'fv', 's1': 'ft', 'v7': 'len', 'v8': 'flags', 'v9': 'vala', 'sub_402FEA': 'parse_rwflags'}"}
RedInodeDataUnreserve
ebce38d56473c420b2dd35734b38c295e926b8a2feaa22442c4129495df4ce92
tuxera
reliance-edge
NA
REDSTATUS RedInodeDataUnreserve( CINODE *pInode, uint64_t ullOffset) { REDSTATUS ret; if(!CINODE_IS_MOUNTED(pInode) || (ullOffset > pInode->pInodeBuf->ullSize)) { ret = -RED_EINVAL; } else if(gpRedCoreVol->ulReservedInodes == 0U) { CRITICAL_ERROR(); ret = -RED_EFUBAR; } else { uint32_t ulReclaimBlocks; ret = CountSparseBlocks(pInode, ullOffset, pInode->pInodeBuf->ullSize - ullOffset, &ulReclaimBlocks); if(ret == 0) { if(gpRedCoreVol->ulReservedInodeBlocks < ulReclaimBlocks) { CRITICAL_ERROR(); ret = -RED_EFUBAR; } else { gpRedCoreVol->ulReservedInodes--; gpRedCoreVol->ulReservedInodeBlocks -= ulReclaimBlocks; } } } return ret; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4092A5", "function_addr": 4231845, "binary_name": "ebce38d56473c420b2dd35734b38c295e926b8a2feaa22442c4129495df4ce92.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, "cmp [rbp+var_18], 0"], [6, "jz short loc_4092FD"], [7, "mov rax, [rbp+var_18]"], [8, "mov eax, [rax]"], [9, "cmp eax, 1"], [10, "jbe short loc_4092FD"], [11, "mov rax, [rbp+var_18]"], [12, "mov edx, [rax]"], [13, "mov rax, cs:off_4146D0"], [14, "mov eax, [rax+0Ch]"], [15, "add eax, 2"], [16, "cmp edx, eax"], [17, "jnb short loc_4092FD"], [18, "mov rax, [rbp+var_18]"], [19, "mov rax, [rax+8]"], [20, "test rax, rax"], [21, "jz short loc_4092FD"], [22, "mov rax, [rbp+var_18]"], [23, "mov rax, [rax+8]"], [24, "mov rax, [rax+10h]"], [25, "cmp [rbp+var_20], rax"], [26, "jbe short loc_409309"], [27, "mov [rbp+var_4], 0FFFFFFEAh"], [28, "jmp loc_4093C6"], [29, "mov rax, cs:off_4146D0"], [30, "mov eax, [rax+2024h]"], [31, "test eax, eax"], [32, "jnz short loc_409335"], [33, "mov esi, 3E0h"], [34, "mov edi, offset aCoreDriverInod_0"], [35, "call sub_40B74A"], [36, "mov [rbp+var_4], 0FFFFFFEAh"], [37, "jmp loc_4093C6"], [38, "mov rax, [rbp+var_18]"], [39, "mov rax, [rax+8]"], [40, "mov rax, [rax+10h]"], [41, "sub rax, [rbp+var_20]"], [42, "mov rdx, rax"], [43, "lea rcx, [rbp+var_8]"], [44, "mov rsi, [rbp+var_20]"], [45, "mov rax, [rbp+var_18]"], [46, "mov rdi, rax"], [47, "call sub_4093CB"], [48, "mov [rbp+var_4], eax"], [49, "cmp [rbp+var_4], 0"], [50, "jnz short loc_4093C6"], [51, "mov rax, cs:off_4146D0"], [52, "mov edx, [rax+2028h]"], [53, "mov eax, [rbp+var_8]"], [54, "cmp edx, eax"], [55, "jnb short loc_409391"], [56, "mov esi, 3EDh"], [57, "mov edi, offset aCoreDriverInod_0"], [58, "call sub_40B74A"], [59, "mov [rbp+var_4], 0FFFFFFEAh"], [60, "jmp short loc_4093C6"], [61, "mov rax, cs:off_4146D0"], [62, "mov edx, [rax+2024h]"], [63, "sub edx, 1"], [64, "mov [rax+2024h], edx"], [65, "mov rax, cs:off_4146D0"], [66, "mov edx, [rax+2028h]"], [67, "mov ecx, [rbp+var_8]"], [68, "mov rax, cs:off_4146D0"], [69, "sub edx, ecx"], [70, "mov [rax+2028h], edx"], [71, "mov eax, [rbp+var_4]"], [72, "leave"], [73, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 3], [8, 7], [9, 8], [10, 9], [11, 3], [12, 11], [14, 13], [15, 14], [16, 12], [16, 15], [17, 16], [18, 3], [19, 18], [20, 19], [21, 20], [22, 3], [23, 22], [24, 23], [25, 4], [25, 24], [26, 25], [30, 29], [31, 30], [32, 31], [38, 3], [39, 38], [40, 39], [41, 40], [41, 4], [42, 41], [44, 4], [45, 3], [46, 45], [48, 47], [49, 48], [50, 49], [52, 51], [54, 52], [54, 53], [55, 54], [62, 61], [63, 62], [64, 61], [64, 63], [66, 65], [66, 64], [69, 67], [69, 66], [70, 69], [70, 68], [71, 59], [71, 27], [71, 36], [71, 48], [73, 71]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/ebce38d56473c420b2dd35734b38c295e926b8a2feaa22442c4129495df4ce92_ebce38d56473c420b2dd35734b38c295e926b8a2feaa22442c4129495df4ce92.jsonl.gz", "strip_func_name": "sub_4092A5", "query": "\n\n\n__int64 __fastcall sub_4092A5(__int64 a1, unsigned __int64 a2)\n{\nunsigned int v3; // [rsp+18h] [rbp-8h] BYREF\nunsigned int v4; // [rsp+1Ch] [rbp-4h]\n\nif ( !a1\n|| *(_DWORD *)a1 <= 1u\n|| *(_DWORD *)a1 >= (unsigned int)(dword_4284A0[3] + 2)\n|| !*(_QWORD *)(a1 + 8)\n|| a2 > *(_QWORD *)(*(_QWORD *)(a1 + 8) + 16LL) )\n{\nreturn (unsigned int)-22;\n}\nif ( !dword_4284A0[2057] )\nsub_40B74A(\"../../../core/driver/inodedata.c\", 992LL);\nv4 = sub_4093CB(a1, a2, *(_QWORD *)(*(_QWORD *)(a1 + 8) + 16LL) - a2, &v3);\nif ( !v4 )\n{\nif ( dword_4284A0[2058] < v3 )\nsub_40B74A(\"../../../core/driver/inodedata.c\", 1005LL);\n--dword_4284A0[2057];\ndword_4284A0[2058] -= v3;\n}\nreturn v4;\n}\n\n\n\nQ:[a1,a2,v3,sub_4092A5,sub_40B74A,sub_4093CB,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'pInode', 'a2': 'ullOffset', 'v3': 'ulReclaimBlocks', 'sub_4092A5': 'RedInodeDataUnreserve', 'sub_40B74A': 'RedVolCriticalError', 'sub_4093CB': 'CountSparseBlocks'}"}
bam_aux_append
362955a1d3230a4d03d634c3e5bff13ca4ae6a5e24e02b2cad6e9251388f57a8
shiquan
PISA
NA
int bam_aux_append(bam1_t *b, const char tag[2], char type, int len, const uint8_t *data) { uint32_t new_len; assert(b->l_data >= 0); new_len = b->l_data + 3 + len; if (new_len > INT32_MAX || new_len < b->l_data) goto nomem; if (realloc_bam_data(b, new_len) < 0) return -1; b->data[b->l_data] = tag[0]; b->data[b->l_data + 1] = tag[1]; b->data[b->l_data + 2] = type; #ifdef HTS_LITTLE_ENDIAN memcpy(b->data + b->l_data + 3, data, len); #else if (aux_to_le(type, b->data + b->l_data + 3, data, len) != 0) { errno = EINVAL; return -1; } #endif b->l_data = new_len; return 0; nomem: errno = ENOMEM; return -1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_47BE77", "function_addr": 4701815, "binary_name": "362955a1d3230a4d03d634c3e5bff13ca4ae6a5e24e02b2cad6e9251388f57a8.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 eax, edx"], [6, "mov [rbp+var_28], ecx"], [7, "mov [rbp+src], r8"], [8, "mov [rbp+var_24], al"], [9, "mov rax, [rbp+var_18]"], [10, "mov eax, [rax+40h]"], [11, "test eax, eax"], [12, "jns short loc_47BEB7"], [13, "mov ecx, offset aBamAuxAppend"], [14, "mov edx, 0D25h"], [15, "mov esi, offset aSamC"], [16, "mov edi, offset aBLData0"], [17, "call ___assert_fail"], [18, "mov rax, [rbp+var_18]"], [19, "mov eax, [rax+40h]"], [20, "lea edx, [rax+3]"], [21, "mov eax, [rbp+var_28]"], [22, "add eax, edx"], [23, "mov [rbp+var_4], eax"], [24, "mov eax, [rbp+var_4]"], [25, "test eax, eax"], [26, "js loc_47BFA2"], [27, "mov rax, [rbp+var_18]"], [28, "mov eax, [rax+40h]"], [29, "cmp [rbp+var_4], eax"], [30, "jb loc_47BFA2"], [31, "mov edx, [rbp+var_4]"], [32, "mov rax, [rbp+var_18]"], [33, "mov rsi, rdx"], [34, "mov rdi, rax"], [35, "call sub_471284"], [36, "test eax, eax"], [37, "jns short loc_47BF04"], [38, "mov eax, 0FFFFFFFFh"], [39, "jmp locret_47BFB3"], [40, "mov rax, [rbp+var_20]"], [41, "movzx edx, byte ptr [rax]"], [42, "mov rax, [rbp+var_18]"], [43, "mov rcx, [rax+38h]"], [44, "mov rax, [rbp+var_18]"], [45, "mov eax, [rax+40h]"], [46, "cdqe"], [47, "add rax, rcx"], [48, "mov [rax], dl"], [49, "mov rax, [rbp+var_20]"], [50, "add rax, 1"], [51, "movzx edx, byte ptr [rax]"], [52, "mov rax, [rbp+var_18]"], [53, "mov rcx, [rax+38h]"], [54, "mov rax, [rbp+var_18]"], [55, "mov eax, [rax+40h]"], [56, "cdqe"], [57, "add rax, 1"], [58, "add rax, rcx"], [59, "mov [rax], dl"], [60, "mov rax, [rbp+var_18]"], [61, "mov rdx, [rax+38h]"], [62, "mov rax, [rbp+var_18]"], [63, "mov eax, [rax+40h]"], [64, "cdqe"], [65, "add rax, 2"], [66, "add rdx, rax"], [67, "movzx eax, [rbp+var_24]"], [68, "mov [rdx], al"], [69, "mov eax, [rbp+var_28]"], [70, "movsxd rdx, eax"], [71, "mov rax, [rbp+var_18]"], [72, "mov rcx, [rax+38h]"], [73, "mov rax, [rbp+var_18]"], [74, "mov eax, [rax+40h]"], [75, "cdqe"], [76, "add rax, 3"], [77, "add rcx, rax"], [78, "mov rax, [rbp+src]"], [79, "mov rsi, rax"], [80, "mov rdi, rcx"], [81, "call _memcpy"], [82, "mov edx, [rbp+var_4]"], [83, "mov rax, [rbp+var_18]"], [84, "mov [rax+40h], edx"], [85, "mov eax, 0"], [86, "jmp short locret_47BFB3"], [87, "nop"], [88, "call ___errno_location"], [89, "mov dword ptr [rax], 0Ch"], [90, "mov eax, 0FFFFFFFFh"], [91, "leave"], [92, "retn"]], "data_dep": [[8, 5], [9, 3], [10, 9], [11, 10], [12, 11], [18, 3], [19, 18], [20, 19], [21, 6], [22, 21], [22, 20], [23, 22], [24, 23], [25, 24], [26, 25], [27, 3], [28, 27], [29, 28], [29, 23], [30, 29], [31, 23], [32, 3], [33, 31], [34, 32], [36, 35], [37, 36], [40, 4], [41, 40], [42, 3], [43, 42], [44, 3], [45, 44], [47, 43], [47, 45], [48, 47], [48, 41], [49, 4], [50, 49], [51, 50], [51, 48], [52, 3], [53, 48], [53, 52], [54, 3], [55, 54], [55, 48], [57, 55], [58, 53], [58, 57], [59, 58], [59, 51], [60, 3], [61, 60], [61, 59], [62, 3], [63, 62], [63, 59], [65, 63], [66, 61], [66, 65], [67, 8], [68, 66], [68, 67], [69, 6], [70, 69], [71, 3], [72, 68], [72, 71], [73, 3], [74, 73], [74, 68], [76, 74], [77, 76], [77, 72], [78, 7], [79, 78], [80, 77], [82, 23], [83, 3], [84, 83], [84, 82], [89, 88], [92, 90], [92, 85], [92, 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/362955a1d3230a4d03d634c3e5bff13ca4ae6a5e24e02b2cad6e9251388f57a8_362955a1d3230a4d03d634c3e5bff13ca4ae6a5e24e02b2cad6e9251388f57a8.jsonl.gz", "strip_func_name": "sub_47BE77", "query": "\n\n\n__int64 __fastcall sub_47BE77(__int64 a1, _BYTE *a2, char a3, int a4, const void *a5)\n{\n__int64 result; // rax\nint v9; // [rsp+2Ch] [rbp-4h]\n\nif ( *(int *)(a1 + 64) < 0 )\n__assert_fail(\"b->l_data >= 0\", \"sam.c\", 0xD25u, \"bam_aux_append\");\nv9 = *(_DWORD *)(a1 + 64) + 3 + a4;\nif ( v9 < 0 || (unsigned int)v9 < *(_DWORD *)(a1 + 64) )\n{\n*__errno_location() = 12;\nresult = 0xFFFFFFFFLL;\n}\nelse if ( (int)sub_471284(a1, (unsigned int)v9) >= 0 )\n{\n*(_BYTE *)(*(_QWORD *)(a1 + 56) + *(int *)(a1 + 64)) = *a2;\n*(_BYTE *)(*(_QWORD *)(a1 + 56) + *(int *)(a1 + 64) + 1LL) = a2[1];\n*(_BYTE *)(*(int *)(a1 + 64) + 2LL + *(_QWORD *)(a1 + 56)) = a3;\nmemcpy((void *)(*(int *)(a1 + 64) + 3LL + *(_QWORD *)(a1 + 56)), a5, a4);\n*(_DWORD *)(a1 + 64) = v9;\nresult = 0LL;\n}\nelse\n{\nresult = 0xFFFFFFFFLL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v9,sub_47BE77,sub_471284,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'type', 'a4': 'len', 'a1': 'b', 'a2': 'tag', 'a5': 'data', 'v9': 'new_len', 'sub_47BE77': 'bam_aux_append', 'sub_471284': 'realloc_bam_data'}"}
sm_handle_random_result_ph3_div
4f50d4a61abfbd8c407aba68361e53a458c52f761b528ded37cf6ddc166819b1
micropython
micropython-unicorn
NA
static void sm_handle_random_result_ph3_div(void * arg){ hci_con_handle_t con_handle = (hci_con_handle_t) (uintptr_t) arg; sm_connection_t * connection = sm_get_connection_for_handle(con_handle); if (connection == NULL) return; // use 16 bit from random value as div setup->sm_local_div = big_endian_read_16(sm_random_data, 0); log_info_hex16("div", setup->sm_local_div); connection->sm_engine_state = SM_PH3_Y_GET_ENC; sm_run(); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42E07E", "function_addr": 4382846, "binary_name": "4f50d4a61abfbd8c407aba68361e53a458c52f761b528ded37cf6ddc166819b1.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 [rbp+var_2], ax"], [6, "movzx eax, [rbp+var_2]"], [7, "mov edi, eax"], [8, "call sub_42FF22"], [9, "mov [rbp+var_10], rax"], [10, "cmp [rbp+var_10], 0"], [11, "jz short loc_42E0F6"], [12, "mov esi, 0"], [13, "mov edi, offset unk_488550"], [14, "call sub_40CA7A"], [15, "mov edx, eax"], [16, "mov rax, cs:off_486340"], [17, "mov [rax+18Eh], dx"], [18, "mov rax, cs:off_486340"], [19, "movzx eax, word ptr [rax+18Eh]"], [20, "movzx eax, ax"], [21, "mov esi, eax"], [22, "mov edi, offset aDiv"], [23, "call sub_427E0D"], [24, "mov rax, [rbp+var_10]"], [25, "mov dword ptr [rax+0Ch], 13h"], [26, "call sub_42BF4E"], [27, "jmp short locret_42E0F7"], [28, "nop"], [29, "leave"], [30, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [9, 8], [10, 9], [11, 10], [15, 14], [17, 16], [17, 15], [19, 17], [19, 18], [20, 19], [21, 20], [24, 9], [25, 24], [30, 8], [30, 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/4f50d4a61abfbd8c407aba68361e53a458c52f761b528ded37cf6ddc166819b1_4f50d4a61abfbd8c407aba68361e53a458c52f761b528ded37cf6ddc166819b1.jsonl.gz", "strip_func_name": "sub_42E07E", "query": "\n\n\nchar __fastcall sub_42E07E(unsigned __int16 a1)\n{\n__int64 v1; // rax\n__int64 v2; // rsi\n__int64 v4; // [rsp+10h] [rbp-10h]\n\nv1 = sub_42FF22(a1);\nv4 = v1;\nif ( v1 )\n{\n*((_WORD *)off_486340 + 199) = sub_40CA7A((__int64)&unk_488550, 0);\nv2 = *((unsigned __int16 *)off_486340 + 199);\nsub_427E0D((__int64)\"div\", v2);\n*(_DWORD *)(v4 + 12) = 19;\nLOBYTE(v1) = sub_42BF4E((__int64)\"div\", v2);\n}\nreturn v1;\n}\n\n\n\nQ:[a1,v4,sub_42E07E,sub_42FF22,sub_40CA7A,sub_427E0D,sub_42BF4E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'arg', 'v4': 'connection', 'sub_42E07E': 'sm_handle_random_result_ph3_div', 'sub_42FF22': 'sm_get_connection_for_handle_0', 'sub_40CA7A': 'big_endian_read_16', 'sub_427E0D': 'log_info_hex16', 'sub_42BF4E': 'sm_run'}"}
midi_clock_init
c9c1aea48fdd1166563bd3be85809ebfa36ac8da6b2d38740797a0491fcc3352
monome
teletype
NA
void midi_clock_init(midi_clock_t *c) { c->running = true; c->pulse_period = 20; // 20 ms is 120 bpm at 24 ppq c->pulse_count = 0; c->trigger = 0; midi_clock_set_div(c, 1); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4016F4", "function_addr": 4200180, "binary_name": "c9c1aea48fdd1166563bd3be85809ebfa36ac8da6b2d38740797a0491fcc3352.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 byte ptr [rax], 1"], [6, "mov rax, [rbp+var_8]"], [7, "mov word ptr [rax+2], 14h"], [8, "mov rax, [rbp+var_8]"], [9, "mov byte ptr [rax+4], 0"], [10, "mov rax, [rbp+var_8]"], [11, "mov byte ptr [rax+7], 0"], [12, "mov rax, [rbp+var_8]"], [13, "mov esi, 1"], [14, "mov rdi, rax"], [15, "call sub_4017A2"], [16, "nop"], [17, "leave"], [18, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 3], [7, 6], [8, 3], [9, 8], [10, 3], [11, 10], [12, 3], [14, 12], [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/c9c1aea48fdd1166563bd3be85809ebfa36ac8da6b2d38740797a0491fcc3352_c9c1aea48fdd1166563bd3be85809ebfa36ac8da6b2d38740797a0491fcc3352.jsonl.gz", "strip_func_name": "sub_4016F4", "query": "\n\n\n__int64 __fastcall sub_4016F4(__int64 a1)\n{\n*(_BYTE *)a1 = 1;\n*(_WORD *)(a1 + 2) = 20;\n*(_BYTE *)(a1 + 4) = 0;\n*(_BYTE *)(a1 + 7) = 0;\nreturn sub_4017A2(a1, 1LL);\n}\n\n\n\nQ:[a1,sub_4016F4,sub_4017A2,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'c', 'sub_4016F4': 'midi_clock_init', 'sub_4017A2': 'midi_clock_set_div'}"}
create_thread_info
a606346ee9b7281ad873ab5350c1e46bdc49467b47f3f7fc7a985bddd41f2b93
Xilinx
XRT
NA
static int create_thread_info(struct dmaxfer_io_info *list, unsigned int num_entries, unsigned int num_jobs) { unsigned int base = 0; unsigned int i, j; struct io_info *_info; int shmid; if ((shmid = shmget(IPC_PRIVATE, num_jobs * sizeof(struct io_info), IPC_CREAT | 0666)) < 0) { perror("smget returned -1\n"); error(-1, errno, " "); return -EINVAL; } if ((_info = (struct io_info *) shmat(shmid, NULL, 0)) == (struct io_info *) -1) { perror("Process shmat returned NULL\n"); error(-1, errno, " "); } for (i = 0; i < num_entries; i++) { for (j = 0; j < list[i].num_jobs; j++) { if ((list[i].write == DMAIO_RDWR) || (list[i].write == DMAIO_READ)) { dmasetio_info(_info, list + i, base, DMAIO_READ); base++; } if ((list[i].write == DMAIO_RDWR) || (list[i].write == DMAIO_WRITE)) { dmasetio_info(_info, list + i, base, DMAIO_WRITE); base++; } //dump_thrd_info(&_info[i]); } } if (shmdt(_info) == -1) { perror("shmdt returned -1\n"); error(-1, errno, " "); } return shmid; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40763A", "function_addr": 4224570, "binary_name": "a606346ee9b7281ad873ab5350c1e46bdc49467b47f3f7fc7a985bddd41f2b93.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 60h"], [3, "mov [rbp+var_58], rdi"], [4, "mov [rbp+var_5C], esi"], [5, "mov [rbp+var_60], edx"], [6, "mov [rbp+var_4], 0"], [7, "mov eax, [rbp+var_60]"], [8, "imul rax, 0E8h"], [9, "mov edx, 3B6h"], [10, "mov rsi, rax"], [11, "mov edi, 0"], [12, "call _shmget"], [13, "mov [rbp+shmid], eax"], [14, "cmp [rbp+shmid], 0"], [15, "jns short loc_4076BE"], [16, "mov edi, offset aSmgetReturned1"], [17, "call _perror"], [18, "call ___errno_location"], [19, "mov eax, [rax]"], [20, "mov [rbp+status], 0FFFFFFFFh"], [21, "mov [rbp+errnum], eax"], [22, "mov [rbp+format], offset asc_40CC69"], [23, "mov rdx, [rbp+format]"], [24, "mov ecx, [rbp+errnum]"], [25, "mov eax, [rbp+status]"], [26, "mov esi, ecx"], [27, "mov edi, eax"], [28, "mov eax, 0"], [29, "call _error"], [30, "nop"], [31, "mov eax, 0FFFFFFEAh"], [32, "jmp locret_40786A"], [33, "mov eax, [rbp+shmid]"], [34, "mov edx, 0"], [35, "mov esi, 0"], [36, "mov edi, eax"], [37, "call _shmat"], [38, "mov [rbp+shmaddr], rax"], [39, "cmp [rbp+shmaddr], 0FFFFFFFFFFFFFFFFh"], [40, "jnz short loc_407719"], [41, "mov edi, offset aProcessShmatRe"], [42, "call _perror"], [43, "call ___errno_location"], [44, "mov eax, [rax]"], [45, "mov [rbp+var_2C], 0FFFFFFFFh"], [46, "mov [rbp+var_30], eax"], [47, "mov [rbp+var_38], offset asc_40CC69"], [48, "mov rdx, [rbp+var_38]"], [49, "mov ecx, [rbp+var_30]"], [50, "mov eax, [rbp+var_2C]"], [51, "mov esi, ecx"], [52, "mov edi, eax"], [53, "mov eax, 0"], [54, "call _error"], [55, "nop"], [56, "mov [rbp+var_8], 0"], [57, "jmp loc_40780E"], [58, "mov [rbp+var_C], 0"], [59, "jmp loc_4077ED"], [60, "mov eax, [rbp+var_8]"], [61, "shl rax, 6"], [62, "mov rdx, rax"], [63, "mov rax, [rbp+var_58]"], [64, "add rax, rdx"], [65, "movzx eax, byte ptr [rax+8]"], [66, "cmp al, 2"], [67, "jz short loc_407763"], [68, "mov eax, [rbp+var_8]"], [69, "shl rax, 6"], [70, "mov rdx, rax"], [71, "mov rax, [rbp+var_58]"], [72, "add rax, rdx"], [73, "movzx eax, byte ptr [rax+8]"], [74, "test al, al"], [75, "jnz short loc_40778D"], [76, "mov eax, [rbp+var_8]"], [77, "shl rax, 6"], [78, "mov rdx, rax"], [79, "mov rax, [rbp+var_58]"], [80, "lea rsi, [rdx+rax]"], [81, "mov edx, [rbp+var_4]"], [82, "mov rax, [rbp+shmaddr]"], [83, "mov ecx, 0"], [84, "mov rdi, rax"], [85, "call sub_407540"], [86, "add [rbp+var_4], 1"], [87, "mov eax, [rbp+var_8]"], [88, "shl rax, 6"], [89, "mov rdx, rax"], [90, "mov rax, [rbp+var_58]"], [91, "add rax, rdx"], [92, "movzx eax, byte ptr [rax+8]"], [93, "cmp al, 2"], [94, "jz short loc_4077BF"], [95, "mov eax, [rbp+var_8]"], [96, "shl rax, 6"], [97, "mov rdx, rax"], [98, "mov rax, [rbp+var_58]"], [99, "add rax, rdx"], [100, "movzx eax, byte ptr [rax+8]"], [101, "cmp al, 1"], [102, "jnz short loc_4077E9"], [103, "mov eax, [rbp+var_8]"], [104, "shl rax, 6"], [105, "mov rdx, rax"], [106, "mov rax, [rbp+var_58]"], [107, "lea rsi, [rdx+rax]"], [108, "mov edx, [rbp+var_4]"], [109, "mov rax, [rbp+shmaddr]"], [110, "mov ecx, 1"], [111, "mov rdi, rax"], [112, "call sub_407540"], [113, "add [rbp+var_4], 1"], [114, "add [rbp+var_C], 1"], [115, "mov eax, [rbp+var_8]"], [116, "shl rax, 6"], [117, "mov rdx, rax"], [118, "mov rax, [rbp+var_58]"], [119, "add rax, rdx"], [120, "mov eax, [rax+0Ch]"], [121, "cmp [rbp+var_C], eax"], [122, "jb loc_407731"], [123, "add [rbp+var_8], 1"], [124, "mov eax, [rbp+var_8]"], [125, "cmp eax, [rbp+var_5C]"], [126, "jb loc_407725"], [127, "mov rax, [rbp+shmaddr]"], [128, "mov rdi, rax"], [129, "call _shmdt"], [130, "cmp eax, 0FFFFFFFFh"], [131, "jnz short loc_407867"], [132, "mov edi, offset aShmdtReturned1"], [133, "call _perror"], [134, "call ___errno_location"], [135, "mov eax, [rax]"], [136, "mov [rbp+var_3C], 0FFFFFFFFh"], [137, "mov [rbp+var_40], eax"], [138, "mov [rbp+var_48], offset asc_40CC69"], [139, "mov rdx, [rbp+var_48]"], [140, "mov ecx, [rbp+var_40]"], [141, "mov eax, [rbp+var_3C]"], [142, "mov esi, ecx"], [143, "mov edi, eax"], [144, "mov eax, 0"], [145, "call _error"], [146, "nop"], [147, "mov eax, [rbp+shmid]"], [148, "leave"], [149, "retn"]], "data_dep": [[7, 5], [8, 7], [10, 8], [13, 12], [14, 13], [15, 14], [19, 18], [21, 19], [23, 22], [24, 21], [25, 20], [26, 24], [27, 25], [33, 13], [36, 33], [38, 37], [39, 38], [40, 39], [44, 43], [46, 44], [48, 47], [49, 46], [50, 45], [51, 49], [52, 50], [60, 123], [60, 56], [61, 60], [62, 61], [63, 3], [64, 62], [64, 63], [65, 64], [66, 65], [67, 66], [68, 123], [68, 56], [69, 68], [70, 69], [71, 3], [72, 70], [72, 71], [73, 72], [74, 73], [75, 74], [76, 56], [76, 123], [77, 76], [78, 77], [79, 3], [80, 51], [80, 35], [80, 80], [80, 107], [80, 79], [81, 86], [81, 6], [81, 113], [82, 38], [84, 82], [86, 113], [86, 86], [86, 6], [87, 123], [87, 56], [88, 87], [89, 88], [90, 3], [91, 89], [91, 90], [92, 91], [93, 92], [94, 93], [95, 123], [95, 56], [96, 95], [97, 96], [98, 3], [99, 97], [99, 98], [100, 99], [101, 100], [102, 101], [103, 56], [103, 123], [104, 103], [105, 104], [106, 3], [107, 106], [107, 51], [107, 35], [107, 80], [107, 107], [108, 6], [108, 86], [108, 113], [109, 38], [111, 109], [113, 6], [113, 86], [113, 113], [114, 58], [114, 114], [115, 123], [115, 56], [116, 115], [117, 116], [118, 3], [119, 118], [119, 117], [120, 119], [121, 114], [121, 120], [121, 58], [122, 121], [123, 123], [123, 56], [124, 56], [124, 123], [125, 4], [125, 124], [126, 125], [127, 38], [128, 127], [130, 129], [131, 130], [135, 134], [137, 135], [139, 138], [140, 137], [141, 136], [142, 140], [143, 141], [147, 13], [149, 31], [149, 147]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/a606346ee9b7281ad873ab5350c1e46bdc49467b47f3f7fc7a985bddd41f2b93_a606346ee9b7281ad873ab5350c1e46bdc49467b47f3f7fc7a985bddd41f2b93.jsonl.gz", "strip_func_name": "sub_40763A", "query": "\n\n\n__int64 __fastcall sub_40763A(__int64 a1, unsigned int a2, unsigned int a3)\n{\n__int64 result; // rax\nint v4; // [rsp+20h] [rbp-40h]\nint v5; // [rsp+30h] [rbp-30h]\nint errnum; // [rsp+40h] [rbp-20h]\nconst void *shmaddr; // [rsp+48h] [rbp-18h]\nint shmid; // [rsp+50h] [rbp-10h]\nunsigned int j; // [rsp+54h] [rbp-Ch]\nunsigned int i; // [rsp+58h] [rbp-8h]\nunsigned int v11; // [rsp+5Ch] [rbp-4h]\n\nv11 = 0;\nshmid = shmget(0, 232LL * a3, 950);\nif ( shmid >= 0 )\n{\nshmaddr = shmat(shmid, 0LL, 0);\nif ( shmaddr == (const void *)-1LL )\n{\nperror(\"Process shmat returned NULL\\n\");\nv5 = *__errno_location();\nerror(-1, v5, \" \");\n}\nfor ( i = 0; i < a2; ++i )\n{\nfor ( j = 0; j < *(_DWORD *)(((unsigned __int64)i << 6) + a1 + 12); ++j )\n{\nif ( *(_BYTE *)(((unsigned __int64)i << 6) + a1 + 8) == 2 || !*(_BYTE *)(((unsigned __int64)i << 6) + a1 + 8) )\nsub_407540((__int64)shmaddr, ((unsigned __int64)i << 6) + a1, v11++, 0);\nif ( *(_BYTE *)(((unsigned __int64)i << 6) + a1 + 8) == 2\n|| *(_BYTE *)(((unsigned __int64)i << 6) + a1 + 8) == 1 )\n{\nsub_407540((__int64)shmaddr, ((unsigned __int64)i << 6) + a1, v11++, 1);\n}\n}\n}\nif ( shmdt(shmaddr) == -1 )\n{\nperror(\"shmdt returned -1\\n\");\nv4 = *__errno_location();\nerror(-1, v4, \" \");\n}\nresult = (unsigned int)shmid;\n}\nelse\n{\nperror(\"smget returned -1\\n\");\nerrnum = *__errno_location();\nerror(-1, errnum, \" \");\nresult = 4294967274LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,shmaddr,v11,sub_40763A,sub_407540,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'num_jobs', 'a1': 'list', 'a2': 'num_entries', 'shmaddr': '_info', 'v11': 'base', 'sub_40763A': 'create_thread_info', 'sub_407540': 'dmasetio_info'}"}
bpf_obj_get_info_by_fd
cd5d458e24a840e7dfaa928e4d74d69f5b9c9acff4463255e6fd63574381de85
mandiant
rvmi
NA
int bpf_obj_get_info_by_fd(int prog_fd, void *info, __u32 *info_len) { union bpf_attr attr; int err; bzero(&attr, sizeof(attr)); bzero(info, *info_len); attr.info.bpf_fd = prog_fd; attr.info.info_len = *info_len; attr.info.info = ptr_to_u64(info); err = sys_bpf(BPF_OBJ_GET_INFO_BY_FD, &attr, sizeof(attr)); if (!err) *info_len = attr.info.info_len; return err; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407B3E", "function_addr": 4225854, "binary_name": "cd5d458e24a840e7dfaa928e4d74d69f5b9c9acff4463255e6fd63574381de85.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 60h"], [3, "mov [rbp+var_44], edi"], [4, "mov [rbp+s], rsi"], [5, "mov [rbp+var_58], rdx"], [6, "lea rax, [rbp+var_40]"], [7, "mov qword ptr [rax], 0"], [8, "mov qword ptr [rax+8], 0"], [9, "mov qword ptr [rax+10h], 0"], [10, "mov qword ptr [rax+18h], 0"], [11, "mov qword ptr [rax+20h], 0"], [12, "mov qword ptr [rax+28h], 0"], [13, "mov rax, [rbp+var_58]"], [14, "mov eax, [rax]"], [15, "mov edx, eax"], [16, "mov rax, [rbp+s]"], [17, "mov esi, 0"], [18, "mov rdi, rax"], [19, "call _memset"], [20, "mov eax, [rbp+var_44]"], [21, "mov [rbp+var_40], eax"], [22, "mov rax, [rbp+var_58]"], [23, "mov eax, [rax]"], [24, "mov [rbp+var_3C], eax"], [25, "mov rax, [rbp+s]"], [26, "mov rdi, rax"], [27, "call sub_407223"], [28, "mov [rbp+var_38], rax"], [29, "lea rax, [rbp+var_40]"], [30, "mov edx, 30h "], [31, "mov rsi, rax"], [32, "mov edi, 0Fh"], [33, "call sub_407231"], [34, "mov [rbp+var_4], eax"], [35, "cmp [rbp+var_4], 0"], [36, "jnz short loc_407BE4"], [37, "mov edx, [rbp+var_3C]"], [38, "mov rax, [rbp+var_58]"], [39, "mov [rax], edx"], [40, "mov eax, [rbp+var_4]"], [41, "leave"], [42, "retn"]], "data_dep": [[7, 6], [8, 6], [9, 6], [10, 6], [11, 6], [12, 6], [13, 5], [14, 7], [14, 13], [14, 12], [15, 14], [16, 4], [18, 16], [20, 3], [21, 20], [22, 5], [23, 7], [23, 22], [23, 12], [24, 23], [25, 4], [26, 25], [28, 27], [29, 21], [29, 27], [31, 29], [34, 33], [35, 34], [36, 35], [37, 24], [38, 5], [39, 38], [39, 37], [40, 34], [42, 40]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/cd5d458e24a840e7dfaa928e4d74d69f5b9c9acff4463255e6fd63574381de85_cd5d458e24a840e7dfaa928e4d74d69f5b9c9acff4463255e6fd63574381de85.jsonl.gz", "strip_func_name": "sub_407B3E", "query": "\n\n\n__int64 __fastcall sub_407B3E(int a1, void *a2, _DWORD *a3)\n{\n__int128 v5; // [rsp+20h] [rbp-40h] BYREF\n__int64 v6; // [rsp+30h] [rbp-30h]\n__int64 v7; // [rsp+38h] [rbp-28h]\n__int64 v8; // [rsp+40h] [rbp-20h]\n__int64 v9; // [rsp+48h] [rbp-18h]\nunsigned int v10; // [rsp+5Ch] [rbp-4h]\n\nv5 = 0uLL;\nv6 = 0LL;\nv7 = 0LL;\nv8 = 0LL;\nv9 = 0LL;\nmemset(a2, 0, (unsigned int)*a3);\nLODWORD(v5) = a1;\n*(_QWORD *)((char *)&v5 + 4) = (unsigned int)*a3;\n*((_QWORD *)&v5 + 1) = sub_407223((__int64)a2);\nv10 = sub_407231(0xFu, (__int64)&v5, 0x30u);\nif ( !v10 )\n*a3 = DWORD1(v5);\nreturn v10;\n}\n\n\n\nQ:[a3,a1,a2,v5,v10,sub_407B3E,sub_407223,sub_407231,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'info_len', 'a1': 'prog_fd', 'a2': 'info', 'v5': 'attr', 'v10': 'err', 'sub_407B3E': 'bpf_obj_get_info_by_fd', 'sub_407223': 'ptr_to_u64', 'sub_407231': 'sys_bpf'}"}
swap
9a70ded1e776a2fa9e42a44a62d0ae25ccfb90235740f7e32a8c02cd3581c467
Tarsnap
kivaloo
NA
static void swap(PTRLIST elems, size_t i, size_t j, void (* setreccookie)(void *, void *, size_t), void * cookie) { void * tmp; /* Swap the elements. */ tmp = *ptrlist_get(elems, i); *ptrlist_get(elems, i) = *ptrlist_get(elems, j); *ptrlist_get(elems, j) = tmp; /* Notify about the moved elements. */ if (setreccookie != NULL) { setreccookie(cookie, *ptrlist_get(elems, i), i); setreccookie(cookie, *ptrlist_get(elems, j), j); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_410477", "function_addr": 4260983, "binary_name": "9a70ded1e776a2fa9e42a44a62d0ae25ccfb90235740f7e32a8c02cd3581c467.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 48h"], [4, "mov [rbp+var_28], rdi"], [5, "mov [rbp+var_30], rsi"], [6, "mov [rbp+var_38], rdx"], [7, "mov [rbp+var_40], rcx"], [8, "mov [rbp+var_48], r8"], [9, "mov rdx, [rbp+var_30]"], [10, "mov rax, [rbp+var_28]"], [11, "mov rsi, rdx"], [12, "mov rdi, rax"], [13, "call sub_410423"], [14, "mov rax, [rax]"], [15, "mov [rbp+var_18], rax"], [16, "mov rdx, [rbp+var_38]"], [17, "mov rax, [rbp+var_28]"], [18, "mov rsi, rdx"], [19, "mov rdi, rax"], [20, "call sub_410423"], [21, "mov rbx, rax"], [22, "mov rdx, [rbp+var_30]"], [23, "mov rax, [rbp+var_28]"], [24, "mov rsi, rdx"], [25, "mov rdi, rax"], [26, "call sub_410423"], [27, "mov rdx, [rbx]"], [28, "mov [rax], rdx"], [29, "mov rdx, [rbp+var_38]"], [30, "mov rax, [rbp+var_28]"], [31, "mov rsi, rdx"], [32, "mov rdi, rax"], [33, "call sub_410423"], [34, "mov rdx, [rbp+var_18]"], [35, "mov [rax], rdx"], [36, "cmp [rbp+var_40], 0"], [37, "jz short loc_410554"], [38, "mov rdx, [rbp+var_30]"], [39, "mov rax, [rbp+var_28]"], [40, "mov rsi, rdx"], [41, "mov rdi, rax"], [42, "call sub_410423"], [43, "mov rcx, [rax]"], [44, "mov rdx, [rbp+var_30]"], [45, "mov rax, [rbp+var_48]"], [46, "mov r8, [rbp+var_40]"], [47, "mov rsi, rcx"], [48, "mov rdi, rax"], [49, "call r8"], [50, "mov rdx, [rbp+var_38]"], [51, "mov rax, [rbp+var_28]"], [52, "mov rsi, rdx"], [53, "mov rdi, rax"], [54, "call sub_410423"], [55, "mov rcx, [rax]"], [56, "mov rdx, [rbp+var_38]"], [57, "mov rax, [rbp+var_48]"], [58, "mov r8, [rbp+var_40]"], [59, "mov rsi, rcx"], [60, "mov rdi, rax"], [61, "call r8"], [62, "nop"], [63, "mov rbx, [rbp+var_8]"], [64, "leave"], [65, "retn"]], "data_dep": [[9, 5], [10, 4], [11, 9], [12, 10], [14, 13], [15, 14], [16, 6], [17, 4], [18, 16], [19, 17], [21, 20], [22, 5], [23, 4], [24, 22], [25, 23], [27, 21], [28, 27], [28, 26], [29, 6], [30, 4], [31, 29], [32, 30], [34, 15], [35, 33], [35, 34], [36, 7], [37, 36], [38, 5], [39, 4], [40, 38], [41, 39], [43, 42], [43, 35], [43, 28], [44, 5], [45, 8], [46, 7], [47, 43], [48, 45], [49, 46], [50, 6], [51, 4], [52, 50], [53, 51], [55, 35], [55, 28], [55, 54], [56, 6], [57, 8], [58, 7], [59, 55], [60, 57], [61, 58], [65, 61], [65, 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/9a70ded1e776a2fa9e42a44a62d0ae25ccfb90235740f7e32a8c02cd3581c467_9a70ded1e776a2fa9e42a44a62d0ae25ccfb90235740f7e32a8c02cd3581c467.jsonl.gz", "strip_func_name": "sub_410477", "query": "\n\n\n_QWORD *__fastcall sub_410477(__int64 a1, __int64 a2, __int64 a3, void (__fastcall *a4)(__int64, _QWORD, __int64), __int64 a5)\n{\n_QWORD *v5; // rbx\n_QWORD *result; // rax\n_QWORD *v7; // rax\n_QWORD *v8; // rax\n__int64 v12; // [rsp+38h] [rbp-18h]\n\nv12 = *(_QWORD *)sub_410423(a1, a2);\nv5 = (_QWORD *)sub_410423(a1, a3);\n*(_QWORD *)sub_410423(a1, a2) = *v5;\nresult = (_QWORD *)sub_410423(a1, a3);\n*result = v12;\nif ( a4 )\n{\nv7 = (_QWORD *)sub_410423(a1, a2);\na4(a5, *v7, a2);\nv8 = (_QWORD *)sub_410423(a1, a3);\nresult = (_QWORD *)((__int64 (__fastcall *)(__int64, _QWORD, __int64))a4)(a5, *v8, a3);\n}\nreturn result;\n}\n\n\n\nQ:[a4,a1,a5,v12,sub_410477,sub_410423,]\nAssistant: ", "hints": "[]", "response": "{'a4': 'setreccookie', 'a1': 'elems', 'a5': 'cookie', 'v12': 'tmp', 'sub_410477': 'swap', 'sub_410423': 'ptrlist_get'}"}
add_helpers1
05a784cbaf63e77696cf61106257fb3d5370a16def412a568e4bf7f4bb9147ce
guidovranken
libfuzzer-js
NA
static JSValue add_helpers1(JSContext *ctx) { JSValue global_obj; JSValue obj262, obj; global_obj = JS_GetGlobalObject(ctx); JS_SetPropertyStr(ctx, global_obj, "print", JS_NewCFunction(ctx, js_print, "print", 1)); /* $262 special object used by the tests */ obj262 = JS_NewObject(ctx); JS_SetPropertyStr(ctx, obj262, "detachArrayBuffer", JS_NewCFunction(ctx, js_detachArrayBuffer, "detachArrayBuffer", 1)); JS_SetPropertyStr(ctx, obj262, "evalScript", JS_NewCFunction(ctx, js_evalScript, "evalScript", 1)); JS_SetPropertyStr(ctx, obj262, "codePointRange", JS_NewCFunction(ctx, js_string_codePointRange, "codePointRange", 2)); #ifdef CONFIG_AGENT JS_SetPropertyStr(ctx, obj262, "agent", js_new_agent(ctx)); #endif JS_SetPropertyStr(ctx, obj262, "global", JS_DupValue(ctx, global_obj)); JS_SetPropertyStr(ctx, obj262, "createRealm", JS_NewCFunction(ctx, js_createRealm, "createRealm", 0)); obj = JS_NewCFunction(ctx, js_IsHTMLDDA, "IsHTMLDDA", 0); JS_SetIsHTMLDDA(ctx, obj); JS_SetPropertyStr(ctx, obj262, "IsHTMLDDA", obj); JS_SetPropertyStr(ctx, global_obj, "$262", JS_DupValue(ctx, obj262)); JS_FreeValue(ctx, global_obj); return obj262; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405A27", "function_addr": 4217383, "binary_name": "05a784cbaf63e77696cf61106257fb3d5370a16def412a568e4bf7f4bb9147ce.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_38], rdi"], [4, "mov rax, [rbp+var_38]"], [5, "mov rdi, rax"], [6, "call sub_417AF7"], [7, "mov [rbp+var_10], rax"], [8, "mov [rbp+var_8], rdx"], [9, "mov rax, [rbp+var_38]"], [10, "mov ecx, 1"], [11, "mov edx, offset aPrint"], [12, "mov esi, offset sub_404B0B"], [13, "mov rdi, rax"], [14, "call sub_403D8B"], [15, "mov rsi, [rbp+var_10]"], [16, "mov r10, [rbp+var_8]"], [17, "mov rdi, [rbp+var_38]"], [18, "mov r8, rax"], [19, "mov r9, rdx"], [20, "mov ecx, offset aPrint"], [21, "mov rdx, r10"], [22, "call sub_4200BF"], [23, "mov rax, [rbp+var_38]"], [24, "mov rdi, rax"], [25, "call sub_413A56"], [26, "mov [rbp+var_20], rax"], [27, "mov [rbp+var_18], rdx"], [28, "mov rax, [rbp+var_38]"], [29, "mov ecx, 1"], [30, "mov edx, offset aDetacharraybuf"], [31, "mov esi, offset sub_404C5A"], [32, "mov rdi, rax"], [33, "call sub_403D8B"], [34, "mov rsi, [rbp+var_20]"], [35, "mov r10, [rbp+var_18]"], [36, "mov rdi, [rbp+var_38]"], [37, "mov r8, rax"], [38, "mov r9, rdx"], [39, "mov ecx, offset aDetacharraybuf"], [40, "mov rdx, r10"], [41, "call sub_4200BF"], [42, "mov rax, [rbp+var_38]"], [43, "mov ecx, 1"], [44, "mov edx, offset aEvalscript_0"], [45, "mov esi, offset sub_404CAE"], [46, "mov rdi, rax"], [47, "call sub_403D8B"], [48, "mov rsi, [rbp+var_20]"], [49, "mov r10, [rbp+var_18]"], [50, "mov rdi, [rbp+var_38]"], [51, "mov r8, rax"], [52, "mov r9, rdx"], [53, "mov ecx, offset aEvalscript_0"], [54, "mov rdx, r10"], [55, "call sub_4200BF"], [56, "mov rax, [rbp+var_38]"], [57, "mov ecx, 2"], [58, "mov edx, offset aCodepointrange"], [59, "mov esi, offset sub_47A0CA"], [60, "mov rdi, rax"], [61, "call sub_403D8B"], [62, "mov rsi, [rbp+var_20]"], [63, "mov r10, [rbp+var_18]"], [64, "mov rdi, [rbp+var_38]"], [65, "mov r8, rax"], [66, "mov r9, rdx"], [67, "mov ecx, offset aCodepointrange"], [68, "mov rdx, r10"], [69, "call sub_4200BF"], [70, "mov rax, [rbp+var_38]"], [71, "mov rdi, rax"], [72, "call sub_40592D"], [73, "mov rsi, [rbp+var_20]"], [74, "mov r10, [rbp+var_18]"], [75, "mov rdi, [rbp+var_38]"], [76, "mov r8, rax"], [77, "mov r9, rdx"], [78, "mov ecx, offset aAgent"], [79, "mov rdx, r10"], [80, "call sub_4200BF"], [81, "mov rcx, [rbp+var_10]"], [82, "mov rdx, [rbp+var_8]"], [83, "mov rax, [rbp+var_38]"], [84, "mov rsi, rcx"], [85, "mov rdi, rax"], [86, "call sub_403C91"], [87, "mov rsi, [rbp+var_20]"], [88, "mov r10, [rbp+var_18]"], [89, "mov rdi, [rbp+var_38]"], [90, "mov r8, rax"], [91, "mov r9, rdx"], [92, "mov ecx, offset aGlobal"], [93, "mov rdx, r10"], [94, "call sub_4200BF"], [95, "mov rax, [rbp+var_38]"], [96, "mov ecx, 0"], [97, "mov edx, offset aCreaterealm"], [98, "mov esi, offset sub_405976"], [99, "mov rdi, rax"], [100, "call sub_403D8B"], [101, "mov rsi, [rbp+var_20]"], [102, "mov r10, [rbp+var_18]"], [103, "mov rdi, [rbp+var_38]"], [104, "mov r8, rax"], [105, "mov r9, rdx"], [106, "mov ecx, offset aCreaterealm"], [107, "mov rdx, r10"], [108, "call sub_4200BF"], [109, "mov rax, [rbp+var_38]"], [110, "mov ecx, 0"], [111, "mov edx, offset aIshtmldda"], [112, "mov esi, offset sub_4059F1"], [113, "mov rdi, rax"], [114, "call sub_403D8B"], [115, "mov [rbp+var_30], rax"], [116, "mov [rbp+var_28], rdx"], [117, "mov rcx, [rbp+var_30]"], [118, "mov rdx, [rbp+var_28]"], [119, "mov rax, [rbp+var_38]"], [120, "mov rsi, rcx"], [121, "mov rdi, rax"], [122, "call sub_423D74"], [123, "mov rax, [rbp+var_30]"], [124, "mov rdx, [rbp+var_28]"], [125, "mov rsi, [rbp+var_20]"], [126, "mov r10, [rbp+var_18]"], [127, "mov rdi, [rbp+var_38]"], [128, "mov r8, rax"], [129, "mov r9, rdx"], [130, "mov ecx, offset aIshtmldda"], [131, "mov rdx, r10"], [132, "call sub_4200BF"], [133, "mov rcx, [rbp+var_20]"], [134, "mov rdx, [rbp+var_18]"], [135, "mov rax, [rbp+var_38]"], [136, "mov rsi, rcx"], [137, "mov rdi, rax"], [138, "call sub_403C91"], [139, "mov rsi, [rbp+var_10]"], [140, "mov r10, [rbp+var_8]"], [141, "mov rdi, [rbp+var_38]"], [142, "mov r8, rax"], [143, "mov r9, rdx"], [144, "mov ecx, offset a262"], [145, "mov rdx, r10"], [146, "call sub_4200BF"], [147, "mov rcx, [rbp+var_10]"], [148, "mov rdx, [rbp+var_8]"], [149, "mov rax, [rbp+var_38]"], [150, "mov rsi, rcx"], [151, "mov rdi, rax"], [152, "call sub_403C2D"], [153, "mov rax, [rbp+var_20]"], [154, "mov rdx, [rbp+var_18]"], [155, "leave"], [156, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [9, 3], [13, 9], [15, 7], [16, 8], [17, 3], [18, 14], [19, 11], [21, 16], [23, 3], [24, 23], [26, 25], [27, 21], [28, 3], [32, 28], [34, 26], [35, 27], [36, 3], [37, 33], [38, 30], [40, 35], [42, 3], [46, 42], [48, 26], [49, 27], [50, 3], [51, 47], [52, 44], [54, 49], [56, 3], [60, 56], [62, 26], [63, 27], [64, 3], [65, 61], [66, 58], [68, 63], [70, 3], [71, 70], [73, 26], [74, 27], [75, 3], [76, 72], [77, 68], [79, 74], [81, 7], [82, 8], [83, 3], [84, 81], [85, 83], [87, 26], [88, 27], [89, 3], [90, 86], [91, 82], [93, 88], [95, 3], [99, 95], [101, 26], [102, 27], [103, 3], [104, 100], [105, 97], [107, 102], [109, 3], [113, 109], [115, 114], [116, 111], [117, 115], [118, 116], [119, 3], [120, 117], [121, 119], [123, 115], [124, 116], [125, 26], [126, 27], [127, 3], [128, 123], [129, 124], [131, 126], [133, 26], [134, 27], [135, 3], [136, 133], [137, 135], [139, 7], [140, 8], [141, 3], [142, 138], [143, 134], [145, 140], [147, 7], [148, 8], [149, 3], [150, 147], [151, 149], [153, 26], [154, 27], [156, 153]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/05a784cbaf63e77696cf61106257fb3d5370a16def412a568e4bf7f4bb9147ce_05a784cbaf63e77696cf61106257fb3d5370a16def412a568e4bf7f4bb9147ce.jsonl.gz", "strip_func_name": "sub_405A27", "query": "\n\n\n_DWORD *__fastcall sub_405A27(__int64 a1)\n{\n__int64 v1; // rdx\n__int64 v2; // rax\n__int64 v3; // rdx\n__int64 v4; // rdx\n__int64 v5; // rax\n__int64 v6; // rdx\n__int64 v7; // rax\n__int64 v8; // rdx\n__int64 v9; // rax\n__int64 v10; // rdx\n__int64 v11; // rax\n__int64 v12; // rdx\n_DWORD *v13; // rax\n__int64 v14; // rdx\n__int64 v15; // rax\n__int64 v16; // rdx\n__int64 v17; // rdx\n_DWORD *v18; // rax\n__int64 v19; // rdx\n__int64 v21; // [rsp+10h] [rbp-30h]\n__int64 v22; // [rsp+18h] [rbp-28h]\n_DWORD *v23; // [rsp+20h] [rbp-20h]\n__int64 v24; // [rsp+28h] [rbp-18h]\n_DWORD *v25; // [rsp+30h] [rbp-10h]\n__int64 v26; // [rsp+38h] [rbp-8h]\n\nv25 = (_DWORD *)sub_417AF7(a1);\nv26 = v1;\nv2 = sub_403D8B(a1, (__int64)sub_404B0B, (__int64)\"print\", 1u);\nsub_4200BF(a1, v25, v26, \"print\", v2, v3);\nv23 = (_DWORD *)sub_413A56(a1);\nv24 = v4;\nv5 = sub_403D8B(a1, (__int64)sub_404C5A, (__int64)\"detachArrayBuffer\", 1u);\nsub_4200BF(a1, v23, v24, \"detachArrayBuffer\", v5, v6);\nv7 = sub_403D8B(a1, (__int64)sub_404CAE, (__int64)\"evalScript\", 1u);\nsub_4200BF(a1, v23, v24, \"evalScript\", v7, v8);\nv9 = sub_403D8B(a1, (__int64)sub_47A0CA, (__int64)\"codePointRange\", 2u);\nsub_4200BF(a1, v23, v24, \"codePointRange\", v9, v10);\nv11 = sub_40592D(a1);\nsub_4200BF(a1, v23, v24, \"agent\", v11, v12);\nv13 = sub_403C91(a1, v25, v26);\nsub_4200BF(a1, v23, v24, \"global\", v13, v14);\nv15 = sub_403D8B(a1, (__int64)sub_405976, (__int64)\"createRealm\", 0);\nsub_4200BF(a1, v23, v24, \"createRealm\", v15, v16);\nv21 = sub_403D8B(a1, (__int64)sub_4059F1, (__int64)\"IsHTMLDDA\", 0);\nv22 = v17;\nsub_423D74(a1, v21, v17);\nsub_4200BF(a1, v23, v24, \"IsHTMLDDA\", v21, v22);\nv18 = sub_403C91(a1, v23, v24);\nsub_4200BF(a1, v25, v26, \"$262\", v18, v19);\nsub_403C2D(a1, v25, v26);\nreturn v23;\n}\n\n\n\nQ:[a1,v21,v23,v25,sub_405A27,sub_417AF7,sub_403D8B,sub_404B0B,sub_4200BF,sub_413A56,sub_404C5A,sub_404CAE,sub_47A0CA,sub_40592D,sub_403C91,sub_405976,sub_4059F1,sub_423D74,sub_403C2D,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ctx', 'v21': 'obj', 'v23': 'obj262', 'v25': 'global_obj', 'sub_405A27': 'add_helpers1', 'sub_417AF7': 'JS_GetGlobalObject', 'sub_403D8B': 'JS_NewCFunction', 'sub_404B0B': 'js_print', 'sub_4200BF': 'JS_SetPropertyStr', 'sub_413A56': 'JS_NewObject', 'sub_404C5A': 'js_detachArrayBuffer', 'sub_404CAE': 'js_evalScript', 'sub_47A0CA': 'js_string_codePointRange', 'sub_40592D': 'js_new_agent', 'sub_403C91': 'JS_DupValue', 'sub_405976': 'js_createRealm', 'sub_4059F1': 'js_IsHTMLDDA', 'sub_423D74': 'JS_SetIsHTMLDDA', 'sub_403C2D': 'JS_FreeValue'}"}
Destroy
6e348e984bd63ac982d83dafa4e61fb9925c759b418264e141a667eb3a0dba17
RTimothyEdwards
XCircuit
NA
static void Destroy (fw) XwFormWidget fw; { XtFree ((char *)(fw -> form.width_tree)); XtFree ((char *)(fw -> form.height_tree)); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_493A4B", "function_addr": 4799051, "binary_name": "6e348e984bd63ac982d83dafa4e61fb9925c759b418264e141a667eb3a0dba17.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+138h]"], [6, "mov rdi, rax"], [7, "call _XtFree"], [8, "mov rax, [rbp+var_8]"], [9, "mov rax, [rax+140h]"], [10, "mov rdi, rax"], [11, "call _XtFree"], [12, "nop"], [13, "leave"], [14, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [8, 3], [9, 8], [10, 9], [14, 11]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/6e348e984bd63ac982d83dafa4e61fb9925c759b418264e141a667eb3a0dba17_6e348e984bd63ac982d83dafa4e61fb9925c759b418264e141a667eb3a0dba17.jsonl.gz", "strip_func_name": "sub_493A4B", "query": "\n\n\n__int64 sub_493A4B()\n{\nXtFree();\nreturn XtFree();\n}\n\n\n\nQ:[sub_493A4B,]\nAssistant: ", "hints": "[]", "response": "{'sub_493A4B': 'Destroy'}"}
nic_w5100_compute_ir
b2470140fe241e0bd4ba7a04cd28e0632bafc1f756ae7bfe0f121c1e0a915f61
EtchedPixels
EmulatorKit
NA
static uint8_t nic_w5100_compute_ir(nic_w5100_t *self) { uint8_t r = 0x00; int i; for (i = 0; i < 4; i++) if (self->socket[i].ir) r |= (1 << i); return r; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_409282", "function_addr": 4231810, "binary_name": "b2470140fe241e0bd4ba7a04cd28e0632bafc1f756ae7bfe0f121c1e0a915f61.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov [rbp+var_1], 0"], [4, "mov [rbp+var_8], 0"], [5, "jmp short loc_4092D2"], [6, "mov rdx, [rbp+var_18]"], [7, "mov eax, [rbp+var_8]"], [8, "cdqe"], [9, "imul rax, 10C4h"], [10, "add rax, rdx"], [11, "add rax, 28h "], [12, "movzx eax, byte ptr [rax]"], [13, "test al, al"], [14, "jz short loc_4092CE"], [15, "mov eax, [rbp+var_8]"], [16, "mov edx, 1"], [17, "mov ecx, eax"], [18, "shl edx, cl"], [19, "mov eax, edx"], [20, "mov edx, eax"], [21, "movzx eax, [rbp+var_1]"], [22, "or eax, edx"], [23, "mov [rbp+var_1], al"], [24, "add [rbp+var_8], 1"], [25, "cmp [rbp+var_8], 3"], [26, "jle short loc_409297"], [27, "movzx eax, [rbp+var_1]"], [28, "pop rbp"], [29, "retn"]], "data_dep": [[6, 2], [7, 4], [7, 24], [9, 7], [10, 6], [10, 9], [11, 10], [12, 11], [13, 12], [14, 13], [15, 24], [15, 4], [17, 15], [18, 17], [18, 16], [19, 18], [20, 19], [21, 3], [21, 23], [22, 20], [22, 21], [23, 22], [24, 4], [24, 24], [25, 4], [25, 24], [26, 25], [27, 3], [27, 23], [28, 0], [29, 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/b2470140fe241e0bd4ba7a04cd28e0632bafc1f756ae7bfe0f121c1e0a915f61_b2470140fe241e0bd4ba7a04cd28e0632bafc1f756ae7bfe0f121c1e0a915f61.jsonl.gz", "strip_func_name": "sub_409282", "query": "\n\n\n__int64 __fastcall sub_409282(__int64 a1)\n{\nint i; // [rsp+10h] [rbp-8h]\nunsigned __int8 v3; // [rsp+17h] [rbp-1h]\n\nv3 = 0;\nfor ( i = 0; i <= 3; ++i )\n{\nif ( *(_BYTE *)(a1 + 4292LL * i + 40) )\nv3 |= 1 << i;\n}\nreturn v3;\n}\n\n\n\nQ:[a1,v3,sub_409282,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'self', 'v3': 'r', 'sub_409282': 'nic_w5100_compute_ir'}"}
AcpiExStopTraceOpcode
c8491ae03f8dc9e8695f46c8251e57f69f5ff7c0ed65d1286b5d5158829a78e3
bitdefender
napoca
NA
void AcpiExStopTraceOpcode ( ACPI_PARSE_OBJECT *Op, ACPI_WALK_STATE *WalkState) { return; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401F65", "function_addr": 4202341, "binary_name": "c8491ae03f8dc9e8695f46c8251e57f69f5ff7c0ed65d1286b5d5158829a78e3.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, "nop"], [5, "pop rbp"], [6, "retn"]], "data_dep": [[5, 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/c8491ae03f8dc9e8695f46c8251e57f69f5ff7c0ed65d1286b5d5158829a78e3_c8491ae03f8dc9e8695f46c8251e57f69f5ff7c0ed65d1286b5d5158829a78e3.jsonl.gz", "strip_func_name": "sub_401F65", "query": "\n\n\nvoid sub_401F65()\n{\n;\n}\n\n\n\nQ:[sub_401F65,]\nAssistant: ", "hints": "[]", "response": "{'sub_401F65': 'AcpiExStopTraceOpcode'}"}
ppe_parse_ip_protocol_ICMP__
a7ee28fac247a90985baa623246f120e383625b5e201cc1a0fad679dd75b91d6
Broadcom-Switch
of-dpa
NA
static inline int ppe_parse_ip_protocol_ICMP__(ppe_packet_t* ppep, uint8_t* data, int size) { AIM_REFERENCE(size); PPE_PACKET_HEADER_SET(ppep, PPE_HEADER_ICMP, data); return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_419A47", "function_addr": 4299335, "binary_name": "a7ee28fac247a90985baa623246f120e383625b5e201cc1a0fad679dd75b91d6.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov [rbp+var_10], rsi"], [4, "mov [rbp+var_14], edx"], [5, "mov rax, [rbp+var_8]"], [6, "mov eax, [rax+0Ch]"], [7, "or eax, 10000h"], [8, "mov edx, eax"], [9, "mov rax, [rbp+var_8]"], [10, "mov [rax+0Ch], edx"], [11, "mov rax, [rbp+var_8]"], [12, "mov rdx, [rbp+var_10]"], [13, "mov [rax+90h], rdx"], [14, "mov eax, 0"], [15, "pop rbp"], [16, "retn"]], "data_dep": [[5, 2], [6, 5], [7, 6], [8, 7], [9, 2], [10, 8], [10, 9], [11, 2], [12, 3], [13, 12], [13, 11], [15, 0], [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/a7ee28fac247a90985baa623246f120e383625b5e201cc1a0fad679dd75b91d6_a7ee28fac247a90985baa623246f120e383625b5e201cc1a0fad679dd75b91d6.jsonl.gz", "strip_func_name": "sub_419A47", "query": "\n\n\n__int64 __fastcall sub_419A47(__int64 a1, __int64 a2)\n{\n*(_DWORD *)(a1 + 12) |= 0x10000u;\n*(_QWORD *)(a1 + 144) = a2;\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,sub_419A47,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ppep', 'a2': 'data', 'sub_419A47': 'ppe_parse_ip_protocol_ICMP__'}"}
i8080_add
35bd89b0f2cc132aff2fa958b2326a6346d9e5f588536727f83c46d9ba46f70d
superzazu
8080
NA
static inline void i8080_add( i8080* const c, uint8_t* const reg, uint8_t val, bool cy) { uint8_t result = *reg + val + cy; c->cf = carry(8, *reg, val, cy); c->hf = carry(4, *reg, val, cy); SET_ZSP(c, result); *reg = result; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40159C", "function_addr": 4199836, "binary_name": "35bd89b0f2cc132aff2fa958b2326a6346d9e5f588536727f83c46d9ba46f70d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 28h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov eax, ecx"], [6, "mov [rbp+var_24], dl"], [7, "mov [rbp+var_28], al"], [8, "mov rax, [rbp+var_20]"], [9, "movzx edx, byte ptr [rax]"], [10, "movzx eax, [rbp+var_24]"], [11, "add edx, eax"], [12, "movzx eax, [rbp+var_28]"], [13, "add eax, edx"], [14, "mov [rbp+var_1], al"], [15, "movzx ecx, [rbp+var_28]"], [16, "movzx edx, [rbp+var_24]"], [17, "mov rax, [rbp+var_20]"], [18, "movzx eax, byte ptr [rax]"], [19, "movzx eax, al"], [20, "mov esi, eax"], [21, "mov edi, 8"], [22, "call sub_401545"], [23, "mov edx, eax"], [24, "mov rax, [rbp+var_18]"], [25, "and edx, 1"], [26, "mov ecx, edx"], [27, "shl ecx, 4"], [28, "movzx edx, byte ptr [rax+3Bh]"], [29, "and edx, 0FFFFFFEFh"], [30, "or edx, ecx"], [31, "mov [rax+3Bh], dl"], [32, "movzx ecx, [rbp+var_28]"], [33, "movzx edx, [rbp+var_24]"], [34, "mov rax, [rbp+var_20]"], [35, "movzx eax, byte ptr [rax]"], [36, "movzx eax, al"], [37, "mov esi, eax"], [38, "mov edi, 4"], [39, "call sub_401545"], [40, "mov edx, eax"], [41, "mov rax, [rbp+var_18]"], [42, "and edx, 1"], [43, "lea ecx, ds:0[rdx*4]"], [44, "movzx edx, byte ptr [rax+3Bh]"], [45, "and edx, 0FFFFFFFBh"], [46, "or edx, ecx"], [47, "mov [rax+3Bh], dl"], [48, "cmp [rbp+var_1], 0"], [49, "setz dl"], [50, "mov rax, [rbp+var_18]"], [51, "and edx, 1"], [52, "lea ecx, [rdx+rdx]"], [53, "movzx edx, byte ptr [rax+3Bh]"], [54, "and edx, 0FFFFFFFDh"], [55, "or edx, ecx"], [56, "mov [rax+3Bh], dl"], [57, "movzx eax, [rbp+var_1]"], [58, "shr al, 7"], [59, "test al, al"], [60, "setnz dl"], [61, "mov rax, [rbp+var_18]"], [62, "mov ecx, edx"], [63, "and ecx, 1"], [64, "movzx edx, byte ptr [rax+3Bh]"], [65, "and edx, 0FFFFFFFEh"], [66, "or edx, ecx"], [67, "mov [rax+3Bh], dl"], [68, "movzx eax, [rbp+var_1]"], [69, "mov edi, eax"], [70, "call sub_401504"], [71, "mov edx, eax"], [72, "mov rax, [rbp+var_18]"], [73, "and edx, 1"], [74, "lea ecx, ds:0[rdx*8]"], [75, "movzx edx, byte ptr [rax+3Bh]"], [76, "and edx, 0FFFFFFF7h"], [77, "or edx, ecx"], [78, "mov [rax+3Bh], dl"], [79, "mov rax, [rbp+var_20]"], [80, "movzx edx, [rbp+var_1]"], [81, "mov [rax], dl"], [82, "nop"], [83, "leave"], [84, "retn"]], "data_dep": [[7, 5], [8, 4], [9, 8], [10, 6], [11, 9], [11, 10], [12, 7], [13, 12], [13, 11], [14, 13], [15, 7], [16, 6], [17, 4], [18, 17], [19, 18], [20, 19], [23, 22], [24, 3], [25, 23], [26, 25], [27, 26], [28, 24], [29, 28], [30, 27], [30, 29], [31, 24], [31, 30], [32, 7], [33, 6], [34, 4], [35, 34], [35, 31], [36, 35], [37, 36], [40, 39], [41, 3], [42, 40], [43, 32], [44, 31], [44, 41], [45, 44], [46, 43], [46, 45], [47, 41], [47, 46], [48, 14], [49, 46], [49, 48], [50, 3], [51, 49], [52, 51], [52, 43], [52, 47], [53, 50], [53, 47], [54, 53], [55, 52], [55, 54], [56, 55], [56, 50], [57, 14], [58, 57], [59, 58], [60, 55], [60, 59], [61, 3], [62, 60], [63, 62], [64, 61], [64, 56], [65, 64], [66, 63], [66, 65], [67, 61], [67, 66], [68, 14], [69, 68], [71, 70], [72, 3], [73, 71], [74, 63], [75, 72], [75, 67], [76, 75], [77, 76], [77, 74], [78, 77], [78, 72], [79, 4], [80, 14], [81, 80], [81, 79], [84, 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/35bd89b0f2cc132aff2fa958b2326a6346d9e5f588536727f83c46d9ba46f70d_35bd89b0f2cc132aff2fa958b2326a6346d9e5f588536727f83c46d9ba46f70d.jsonl.gz", "strip_func_name": "sub_40159C", "query": "\n\n\nunsigned __int8 *__fastcall sub_40159C(__int64 a1, unsigned __int8 *a2, unsigned __int8 a3, unsigned __int8 a4)\n{\nunsigned __int8 *result; // rax\nunsigned __int8 v7; // [rsp+27h] [rbp-1h]\n\nv7 = a3 + *a2 + a4;\n*(_BYTE *)(a1 + 59) = (16 * sub_401545(8, *a2, a3, a4)) | *(_BYTE *)(a1 + 59) & 0xEF;\n*(_BYTE *)(a1 + 59) = (4 * sub_401545(4, *a2, a3, a4)) | *(_BYTE *)(a1 + 59) & 0xFB;\n*(_BYTE *)(a1 + 59) = (2 * (v7 == 0)) | *(_BYTE *)(a1 + 59) & 0xFD;\n*(_BYTE *)(a1 + 59) = (v7 >> 7 != 0) | *(_BYTE *)(a1 + 59) & 0xFE;\n*(_BYTE *)(a1 + 59) = (8 * sub_401504(v7)) | *(_BYTE *)(a1 + 59) & 0xF7;\nresult = a2;\n*a2 = v7;\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,v7,sub_40159C,sub_401545,sub_401504,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'val', 'a4': 'cy', 'a1': 'c', 'a2': 'reg', 'v7': 'result', 'sub_40159C': 'i8080_add', 'sub_401545': 'carry', 'sub_401504': 'parity'}"}
set_default_cmd
c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad
open-simh
simh
NA
t_stat set_default_cmd (int32 flg, CONST char *cptr) { char gbuf[4*CBUFSIZE]; if (sim_is_running) return SCPE_INVREM; if ((!cptr) || (*cptr == 0)) return SCPE_2FARG; GET_SWITCHES (cptr); /* get switches */ gbuf[sizeof(gbuf)-1] = '\0'; strlcpy (gbuf, cptr, sizeof(gbuf)); sim_trim_endspc(gbuf); if (sim_chdir(gbuf) != 0) return sim_messagef(SCPE_IOERR, "Unable to change directory to: %s\n", gbuf); return SCPE_OK; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_423C5E", "function_addr": 4340830, "binary_name": "c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 4210h"], [3, "mov [rbp+var_4204], edi"], [4, "mov [rbp+var_4210], rsi"], [5, "mov eax, cs:dword_4F7D88"], [6, "test eax, eax"], [7, "jz short loc_423C8A"], [8, "mov eax, 6Bh "], [9, "jmp locret_423D3C"], [10, "cmp [rbp+var_4210], 0"], [11, "jz short loc_423CA2"], [12, "mov rax, [rbp+var_4210]"], [13, "movzx eax, byte ptr [rax]"], [14, "test al, al"], [15, "jnz short loc_423CAC"], [16, "mov eax, 5Eh "], [17, "jmp locret_423D3C"], [18, "mov rax, [rbp+var_4210]"], [19, "mov rdi, rax"], [20, "call sub_42F1BE"], [21, "mov [rbp+var_4210], rax"], [22, "cmp [rbp+var_4210], 0"], [23, "jnz short loc_423CD3"], [24, "mov eax, 5Ch "], [25, "jmp short locret_423D3C"], [26, "mov [rbp+var_1], 0"], [27, "mov rcx, [rbp+var_4210]"], [28, "lea rax, [rbp+var_4200]"], [29, "mov edx, 4200h"], [30, "mov rsi, rcx"], [31, "mov rdi, rax"], [32, "call sub_44AD08"], [33, "lea rax, [rbp+var_4200]"], [34, "mov rdi, rax"], [35, "call sub_44A7BC"], [36, "lea rax, [rbp+var_4200]"], [37, "mov rdi, rax"], [38, "call sub_448FFD"], [39, "test eax, eax"], [40, "jz short loc_423D37"], [41, "lea rax, [rbp+var_4200]"], [42, "mov rdx, rax"], [43, "mov esi, offset aUnableToChange"], [44, "mov edi, 42h "], [45, "mov eax, 0"], [46, "call sub_4384B4"], [47, "jmp short locret_423D3C"], [48, "mov eax, 0"], [49, "leave"], [50, "retn"]], "data_dep": [[6, 5], [7, 6], [10, 4], [11, 10], [12, 4], [13, 12], [14, 13], [15, 14], [18, 4], [19, 18], [21, 20], [22, 21], [23, 22], [27, 21], [28, 20], [30, 27], [31, 28], [33, 32], [34, 33], [36, 35], [37, 36], [39, 38], [40, 39], [41, 39], [42, 41], [50, 46], [50, 24], [50, 48], [50, 8], [50, 16]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad_c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad.jsonl.gz", "strip_func_name": "sub_423C5E", "query": "\n\n\n__int64 __fastcall sub_423C5E(__int64 a1, _BYTE *a2)\n{\n__int64 result; // rax\nint v3; // ecx\nint v4; // er8\nint v5; // er9\n__int64 v6; // [rsp+0h] [rbp-4210h]\nchar v7[16896]; // [rsp+10h] [rbp-4200h] BYREF\n\nif ( dword_4F7D88 )\nreturn 107LL;\nif ( !a2 || !*a2 )\nreturn 94LL;\nv6 = sub_42F1BE(a2);\nif ( !v6 )\nreturn 92LL;\nv7[16895] = 0;\nsub_44AD08(v7, v6, 16896LL);\nsub_44A7BC(v7);\nif ( (unsigned int)sub_448FFD(v7) )\nresult = sub_4384B4(66, (unsigned int)\"Unable to change directory to: %s\\n\", (unsigned int)v7, v3, v4, v5);\nelse\nresult = 0LL;\nreturn result;\n}\n\n\n\nQ:[a2,a1,v6,v7,sub_423C5E,sub_42F1BE,sub_44AD08,sub_44A7BC,sub_448FFD,sub_4384B4,]\nAssistant: ", "hints": "[]", "response": "{'a2': 'cptr', 'a1': 'flg', 'v6': 'cptra', 'v7': 'gbuf', 'sub_423C5E': 'set_default_cmd', 'sub_42F1BE': 'get_sim_sw', 'sub_44AD08': 'sim_strlcpy', 'sub_44A7BC': 'sim_trim_endspc', 'sub_448FFD': 'sim_chdir', 'sub_4384B4': 'sim_messagef'}"}
word_segmentation
7c3deeb8a1ad053d3dd259ca8a54c2f14af2de44e22d9cd5701b24ea78f776d2
xianjimli
sysprog-code
NA
int word_segmentation(const char* text, OnWordFunc on_word, void* ctx) { enum _State { STAT_INIT, STAT_IN_WORD, STAT_OUT_WORD, }state = STAT_INIT; int count = 0; char* copy_text = strdup(text); char* p = copy_text; char* word = copy_text; for(p = copy_text; *p != '\0'; p++) { switch(state) { case STAT_INIT: { if(IS_WORD_CHAR(*p)) { word = p; state = STAT_IN_WORD; } break; } case STAT_IN_WORD: { if(!IS_WORD_CHAR(*p)) { count++; *p = '\0'; on_word(ctx, word); state = STAT_OUT_WORD; } break; } case STAT_OUT_WORD: { if(IS_WORD_CHAR(*p)) { word = p; state = STAT_IN_WORD; } break; } default:break; } } if(state == STAT_IN_WORD) { count++; on_word(ctx, word); } free(copy_text); return count; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401162", "function_addr": 4198754, "binary_name": "7c3deeb8a1ad053d3dd259ca8a54c2f14af2de44e22d9cd5701b24ea78f776d2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+s], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_38], rdx"], [6, "mov [rbp+var_4], 0"], [7, "mov [rbp+var_8], 0"], [8, "mov rax, [rbp+s]"], [9, "mov rdi, rax"], [10, "call _strdup"], [11, "mov [rbp+ptr], rax"], [12, "mov rax, [rbp+ptr]"], [13, "mov [rbp+var_10], rax"], [14, "mov rax, [rbp+ptr]"], [15, "mov [rbp+var_18], rax"], [16, "mov rax, [rbp+ptr]"], [17, "mov [rbp+var_10], rax"], [18, "jmp loc_40132E"], [19, "cmp [rbp+var_4], 2"], [20, "jz loc_4012BE"], [21, "cmp [rbp+var_4], 2"], [22, "ja loc_40131F"], [23, "cmp [rbp+var_4], 0"], [24, "jz short loc_4011D6"], [25, "cmp [rbp+var_4], 1"], [26, "jz short loc_40123E"], [27, "jmp loc_40131F"], [28, "call ___ctype_b_loc"], [29, "mov rdx, [rax]"], [30, "mov rax, [rbp+var_10]"], [31, "movzx eax, byte ptr [rax]"], [32, "movsx rax, al"], [33, "add rax, rax"], [34, "add rax, rdx"], [35, "movzx eax, word ptr [rax]"], [36, "movzx eax, ax"], [37, "and eax, 400h"], [38, "test eax, eax"], [39, "jnz short loc_40122A"], [40, "call ___ctype_b_loc"], [41, "mov rdx, [rax]"], [42, "mov rax, [rbp+var_10]"], [43, "movzx eax, byte ptr [rax]"], [44, "movsx rax, al"], [45, "add rax, rax"], [46, "add rax, rdx"], [47, "movzx eax, word ptr [rax]"], [48, "movzx eax, ax"], [49, "and eax, 800h"], [50, "test eax, eax"], [51, "jz loc_401322"], [52, "mov rax, [rbp+var_10]"], [53, "mov [rbp+var_18], rax"], [54, "mov [rbp+var_4], 1"], [55, "jmp loc_401322"], [56, "call ___ctype_b_loc"], [57, "mov rdx, [rax]"], [58, "mov rax, [rbp+var_10]"], [59, "movzx eax, byte ptr [rax]"], [60, "movsx rax, al"], [61, "add rax, rax"], [62, "add rax, rdx"], [63, "movzx eax, word ptr [rax]"], [64, "movzx eax, ax"], [65, "and eax, 400h"], [66, "test eax, eax"], [67, "jnz loc_401325"], [68, "call ___ctype_b_loc"], [69, "mov rdx, [rax]"], [70, "mov rax, [rbp+var_10]"], [71, "movzx eax, byte ptr [rax]"], [72, "movsx rax, al"], [73, "add rax, rax"], [74, "add rax, rdx"], [75, "movzx eax, word ptr [rax]"], [76, "movzx eax, ax"], [77, "and eax, 800h"], [78, "test eax, eax"], [79, "jnz loc_401325"], [80, "add [rbp+var_8], 1"], [81, "mov rax, [rbp+var_10]"], [82, "mov byte ptr [rax], 0"], [83, "mov rdx, [rbp+var_18]"], [84, "mov rax, [rbp+var_38]"], [85, "mov rcx, [rbp+var_30]"], [86, "mov rsi, rdx"], [87, "mov rdi, rax"], [88, "call rcx"], [89, "mov [rbp+var_4], 2"], [90, "jmp short loc_401325"], [91, "call ___ctype_b_loc"], [92, "mov rdx, [rax]"], [93, "mov rax, [rbp+var_10]"], [94, "movzx eax, byte ptr [rax]"], [95, "movsx rax, al"], [96, "add rax, rax"], [97, "add rax, rdx"], [98, "movzx eax, word ptr [rax]"], [99, "movzx eax, ax"], [100, "and eax, 400h"], [101, "test eax, eax"], [102, "jnz short loc_40130E"], [103, "call ___ctype_b_loc"], [104, "mov rdx, [rax]"], [105, "mov rax, [rbp+var_10]"], [106, "movzx eax, byte ptr [rax]"], [107, "movsx rax, al"], [108, "add rax, rax"], [109, "add rax, rdx"], [110, "movzx eax, word ptr [rax]"], [111, "movzx eax, ax"], [112, "and eax, 800h"], [113, "test eax, eax"], [114, "jz short loc_401328"], [115, "mov rax, [rbp+var_10]"], [116, "mov [rbp+var_18], rax"], [117, "mov [rbp+var_4], 1"], [118, "jmp short loc_401328"], [119, "nop"], [120, "jmp short loc_401329"], [121, "nop"], [122, "jmp short loc_401329"], [123, "nop"], [124, "jmp short loc_401329"], [125, "nop"], [126, "add [rbp+var_10], 1"], [127, "mov rax, [rbp+var_10]"], [128, "movzx eax, byte ptr [rax]"], [129, "test al, al"], [130, "jnz loc_4011B1"], [131, "cmp [rbp+var_4], 1"], [132, "jnz short loc_40135B"], [133, "add [rbp+var_8], 1"], [134, "mov rdx, [rbp+var_18]"], [135, "mov rax, [rbp+var_38]"], [136, "mov rcx, [rbp+var_30]"], [137, "mov rsi, rdx"], [138, "mov rdi, rax"], [139, "call rcx"], [140, "mov rax, [rbp+ptr]"], [141, "mov rdi, rax"], [142, "call _free"], [143, "mov eax, [rbp+var_8]"], [144, "leave"], [145, "retn"]], "data_dep": [[8, 3], [9, 8], [11, 10], [12, 11], [13, 12], [14, 11], [15, 14], [16, 11], [17, 16], [19, 6], [19, 54], [19, 117], [19, 89], [20, 19], [21, 89], [21, 54], [21, 117], [21, 6], [22, 21], [23, 54], [23, 6], [23, 117], [23, 89], [24, 23], [25, 89], [25, 54], [25, 6], [25, 117], [26, 25], [29, 28], [29, 82], [30, 17], [30, 126], [31, 30], [31, 82], [32, 31], [33, 32], [34, 29], [34, 33], [35, 82], [35, 34], [36, 35], [37, 36], [38, 37], [39, 38], [41, 40], [41, 82], [42, 17], [42, 126], [43, 82], [43, 42], [44, 43], [45, 44], [46, 41], [46, 45], [47, 82], [47, 46], [48, 47], [49, 48], [50, 49], [51, 50], [52, 17], [52, 126], [53, 52], [57, 56], [57, 82], [58, 17], [58, 126], [59, 82], [59, 58], [60, 59], [61, 60], [62, 57], [62, 61], [63, 62], [63, 82], [64, 63], [65, 64], [66, 65], [67, 66], [69, 82], [69, 68], [70, 17], [70, 126], [71, 82], [71, 70], [72, 71], [73, 72], [74, 73], [74, 69], [75, 74], [75, 82], [76, 75], [77, 76], [78, 77], [79, 78], [80, 7], [80, 80], [81, 126], [81, 17], [82, 81], [83, 116], [83, 15], [83, 53], [84, 5], [85, 4], [86, 83], [87, 84], [88, 85], [92, 82], [92, 91], [93, 17], [93, 126], [94, 82], [94, 93], [95, 94], [96, 95], [97, 92], [97, 96], [98, 82], [98, 97], [99, 98], [100, 99], [101, 100], [102, 101], [104, 82], [104, 103], [105, 17], [105, 126], [106, 105], [106, 82], [107, 106], [108, 107], [109, 104], [109, 108], [110, 109], [110, 82], [111, 110], [112, 111], [113, 112], [114, 113], [115, 126], [115, 17], [116, 115], [126, 126], [126, 17], [127, 17], [127, 126], [128, 82], [128, 127], [129, 128], [130, 129], [131, 6], [131, 54], [131, 117], [131, 89], [132, 131], [133, 7], [133, 80], [134, 116], [134, 15], [134, 53], [135, 5], [136, 4], [137, 134], [138, 135], [139, 136], [140, 11], [141, 140], [143, 133], [143, 7], [143, 80], [145, 143]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/7c3deeb8a1ad053d3dd259ca8a54c2f14af2de44e22d9cd5701b24ea78f776d2_7c3deeb8a1ad053d3dd259ca8a54c2f14af2de44e22d9cd5701b24ea78f776d2.jsonl.gz", "strip_func_name": "sub_401162", "query": "\n\n\n__int64 __fastcall sub_401162(const char *a1, void (__fastcall *a2)(__int64, char *), __int64 a3)\n{\nchar *ptr; // [rsp+20h] [rbp-20h]\nchar *v6; // [rsp+28h] [rbp-18h]\nchar *i; // [rsp+30h] [rbp-10h]\nunsigned int v8; // [rsp+38h] [rbp-8h]\nint v9; // [rsp+3Ch] [rbp-4h]\n\nv9 = 0;\nv8 = 0;\nptr = strdup(a1);\nv6 = ptr;\nfor ( i = ptr; *i; ++i )\n{\nif ( v9 == 2 )\n{\nif ( ((*__ctype_b_loc())[*i] & 0x400) != 0 || ((*__ctype_b_loc())[*i] & 0x800) != 0 )\n{\nv6 = i;\nv9 = 1;\n}\n}\nelse if ( v9 )\n{\nif ( ((*__ctype_b_loc())[*i] & 0x400) == 0 && ((*__ctype_b_loc())[*i] & 0x800) == 0 )\n{\n++v8;\n*i = 0;\na2(a3, v6);\nv9 = 2;\n}\n}\nelse if ( ((*__ctype_b_loc())[*i] & 0x400) != 0 || ((*__ctype_b_loc())[*i] & 0x800) != 0 )\n{\nv6 = i;\nv9 = 1;\n}\n}\nif ( v9 == 1 )\n{\n++v8;\na2(a3, v6);\n}\nfree(ptr);\nreturn v8;\n}\n\n\n\nQ:[a3,a1,a2,ptr,v6,i,v8,v9,sub_401162,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'ctx', 'a1': 'text', 'a2': 'on_word', 'ptr': 'copy_text', 'v6': 'word', 'i': 'p', 'v8': 'count', 'v9': 'state', 'sub_401162': '_word_segmentation'}"}
enter_dir
3fdae2be882b780d1a67910267da0c2d1686137097f9fe6d13498606dfdc8de6
jingchunzhang
backdoor_rootkit
NA
int enter_dir(d, descend) char *d; /* directory path name pointer */ int descend; /* subdirectory descend flag: * 0 = don't descend * 1 = descend */ { char *av[2]; dev_t ddev; DIR *dfp; char *dn = (char *)NULL; MALLOC_S dnl, dnamlen; struct DIRTYPE *dp; int en, sl; int fct = 0; char *fp = (char *)NULL; MALLOC_S fpl = (MALLOC_S)0; MALLOC_S fpli = (MALLOC_S)0; struct stat sb; /* * Check the directory path; reduce symbolic links; stat(2) it; make sure it's * really a directory. */ if (!d || !*d || *d == '+' || *d == '-') { if (!Fwarn) (void) fprintf(stderr, "%s: +d not followed by a directory path\n", Pn); return(1); } if (!(dn = Readlink(d))) return(1); if (statsafely(dn, &sb)) { if (!Fwarn) { en = errno; (void) fprintf(stderr, "%s: WARNING: can't stat(", Pn); safestrprt(dn, stderr, 0); (void) fprintf(stderr, "): %s\n", strerror(en)); } if (dn && dn != d) { (void) free((FREE_P *)dn); dn = (char *)NULL; } return(1); } if ((sb.st_mode & S_IFMT) != S_IFDIR) { if (!Fwarn) { (void) fprintf(stderr, "%s: WARNING: not a directory: ", Pn); safestrprt(dn, stderr, 1); } if (dn && dn != d) { (void) free((FREE_P *)dn); dn = (char *)NULL; } return(1); } #if defined(HASSPECDEVD) (void) HASSPECDEVD(dn, &sb); #endif /* defined(HASSPECDEVD) */ ddev = sb.st_dev; /* * Stack the directory and record it in Sfile for searching. */ Dstkn = Dstkx = 0; Dstk = (char **)NULL; (void) stkdir(dn); av[0] = (dn == d) ? mkstrcpy(dn, (MALLOC_S *)NULL) : dn; av[1] = (char *)NULL; dn = (char *)NULL; if (!ck_file_arg(0, 1, av, 1, 1, &sb)) { av[0] = (char *)NULL; fct++; } /* * Unstack the next directory and examine it. */ while (--Dstkx >= 0) { if (!(dn = Dstk[Dstkx])) continue; Dstk[Dstkx] = (char *)NULL; /* * Open the directory path and prepare its name for use with the * files in the directory. */ if (!(dfp = OpenDir(dn))) { if (!Fwarn) { if ((en = errno) != ENOENT) { (void) fprintf(stderr, "%s: WARNING: can't opendir(", Pn); safestrprt(dn, stderr, 0); (void) fprintf(stderr, "): %s\n", strerror(en)); } } (void) free((FREE_P *)dn); dn = (char *)NULL; continue; } dnl = strlen(dn); sl = ((dnl > 0) && (*(dn + dnl - 1) == '/')) ? 0 : 1; /* * Define space for possible addition to the directory path. */ fpli = (MALLOC_S)(dnl + sl + EDDEFFNL + 1); if ((int)fpli > (int)fpl) { fpl = fpli; if (!fp) fp = (char *)malloc(fpl); else fp = (char *)realloc(fp, fpl); if (!fp) { (void) fprintf(stderr, "%s: no space for path to entries in directory: %s\n", Pn, dn); Exit(1); } } (void) snpf(fp, (size_t)fpl, "%s%s", dn, sl ? "/" : ""); (void) free((FREE_P *)dn); dn = (char *)NULL; /* * Read the contents of the directory. */ for (dp = ReadDir(dfp); dp; dp = ReadDir(dfp)) { /* * Skip: entries with no inode number; * entries with a zero length name; * "."; * and "..". */ if (!dp->d_ino) continue; #if defined(HASDNAMLEN) dnamlen = (MALLOC_S)dp->d_namlen; #else /* !defined(HASDNAMLEN) */ dnamlen = (MALLOC_S)strlen(dp->d_name); #endif /* defined(HASDNAMLEN) */ if (!dnamlen) continue; if (dnamlen <= 2 && dp->d_name[0] == '.') { if (dnamlen == 1) continue; if (dp->d_name[1] == '.') continue; } /* * Form the entry's path name. */ fpli = (MALLOC_S)(dnamlen - (fpl - dnl - sl - 1)); if ((int)fpli > 0) { fpl += fpli; if (!(fp = (char *)realloc(fp, fpl))) { (void) fprintf(stderr, "%s: no space for: ", Pn); safestrprt(dn, stderr, 0); putc('/', stderr); safestrprtn(dp->d_name, dnamlen, stderr, 1); Exit(1); } } (void) strncpy(fp + dnl + sl, dp->d_name, dnamlen); fp[dnl + sl + dnamlen] = '\0'; /* * Lstatsafely() the entry; complain if that fails. * * Stack entries that represent subdirectories. */ if (lstatsafely(fp, &sb)) { if ((en = errno) != ENOENT) { if (!Fwarn) { (void) fprintf(stderr, "%s: WARNING: can't lstat(", Pn); safestrprt(fp, stderr, 0); (void) fprintf(stderr, "): %s\n", strerror(en)); } } continue; } #if defined(HASSPECDEVD) (void) HASSPECDEVD(fp, &sb); #endif /* defined(HASSPECDEVD) */ if (!(Fxover & XO_FILESYS)) { /* * Unless "-x" or "-x f" was specified, don't cross over file * system mount points. */ if (sb.st_dev != ddev) continue; } if ((sb.st_mode & S_IFMT) == S_IFLNK) { /* * If this is a symbolic link and "-x_ or "-x l" was specified, * Statsafely() the entry and process it. * * Otherwise skip symbolic links. */ if (Fxover & XO_SYMLINK) { if (statsafely(fp, &sb)) { if ((en = errno) != ENOENT) { if (!Fwarn) { (void) fprintf(stderr, "%s: WARNING: can't stat(", Pn); safestrprt(fp, stderr, 0); (void) fprintf(stderr, ") symbolc link: %s\n", strerror(en)); } } continue; } } else continue; } if (av[0]) { (void) free((FREE_P *)av[0]); av[0] = (char *)NULL; } av[0] = mkstrcpy(fp, (MALLOC_S *)NULL); if ((sb.st_mode & S_IFMT) == S_IFDIR && descend) /* * Stack a subdirectory according to the descend argument. */ stkdir(av[0]); /* * Use ck_file_arg() to record the entry for searching. Force it * to consider the entry a file, not a file system. */ if (!ck_file_arg(0, 1, av, 1, 1, &sb)) { av[0] = (char *)NULL; fct++; } } (void) CloseDir(dfp); if (dn && dn != d) { (void) free((FREE_P *)dn); dn = (char *)NULL; } } /* * Free malloc()'d space. */ if (dn && dn != d) { (void) free((FREE_P *)dn); dn = (char *)NULL; } if (av[0] && av[0] != fp) { (void) free((FREE_P *)av[0]); av[0] = (char *)NULL; } if (fp) { (void) free((FREE_P *)fp); fp = (char *)NULL; } if (Dstk) { (void) free((FREE_P *)Dstk); Dstk = (char **)NULL; } if (!fct) { /* * Warn if no files were recorded for searching. */ if (!Fwarn) { (void) fprintf(stderr, "%s: WARNING: no files found in directory: ", Pn); safestrprt(d, stderr, 1); } return(1); } return(0); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_410CF0", "function_addr": 4263152, "binary_name": "3fdae2be882b780d1a67910267da0c2d1686137097f9fe6d13498606dfdc8de6.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 110h"], [3, "mov [rbp+var_108], rdi"], [4, "mov [rbp+var_10C], esi"], [5, "mov [rbp+ptr], 0"], [6, "mov [rbp+var_14], 0"], [7, "mov [rbp+s], 0"], [8, "mov [rbp+size], 0"], [9, "mov [rbp+var_30], 0"], [10, "cmp [rbp+var_108], 0"], [11, "jz short loc_410D63"], [12, "mov rax, [rbp+var_108]"], [13, "movzx eax, byte ptr [rax]"], [14, "test al, al"], [15, "jz short loc_410D63"], [16, "mov rax, [rbp+var_108]"], [17, "movzx eax, byte ptr [rax]"], [18, "cmp al, 2Bh "], [19, "jz short loc_410D63"], [20, "mov rax, [rbp+var_108]"], [21, "movzx eax, byte ptr [rax]"], [22, "cmp al, 2Dh "], [23, "jnz short loc_410D97"], [24, "mov eax, cs:dword_42BD2C"], [25, "test eax, eax"], [26, "jnz short loc_410D8D"], [27, "mov rdx, cs:qword_42BE30"], [28, "mov rax, cs:stderr"], [29, "mov esi, offset aSDNotFollowedB"], [30, "mov rdi, rax"], [31, "mov eax, 0"], [32, "call _fprintf"], [33, "mov eax, 1"], [34, "jmp locret_4116E6"], [35, "mov rax, [rbp+var_108]"], [36, "mov rdi, rax"], [37, "call sub_4189F6"], [38, "mov [rbp+ptr], rax"], [39, "cmp [rbp+ptr], 0"], [40, "jnz short loc_410DBB"], [41, "mov eax, 1"], [42, "jmp locret_4116E6"], [43, "lea rdx, [rbp+var_100]"], [44, "mov rax, [rbp+ptr]"], [45, "mov rsi, rdx"], [46, "mov rdi, rax"], [47, "call sub_419567"], [48, "test eax, eax"], [49, "jz loc_410E80"], [50, "mov eax, cs:dword_42BD2C"], [51, "test eax, eax"], [52, "jnz short loc_410E4E"], [53, "call ___errno_location"], [54, "mov eax, [rax]"], [55, "mov [rbp+errnum], eax"], [56, "mov rdx, cs:qword_42BE30"], [57, "mov rax, cs:stderr"], [58, "mov esi, offset aSWarningCanTSt_0"], [59, "mov rdi, rax"], [60, "mov eax, 0"], [61, "call _fprintf"], [62, "mov rcx, cs:stderr"], [63, "mov rax, [rbp+ptr]"], [64, "mov edx, 0"], [65, "mov rsi, rcx"], [66, "mov rdi, rax"], [67, "call sub_41918F"], [68, "mov eax, [rbp+errnum]"], [69, "mov edi, eax"], [70, "call _strerror"], [71, "mov rdx, rax"], [72, "mov rax, cs:stderr"], [73, "mov esi, offset aS_7"], [74, "mov rdi, rax"], [75, "mov eax, 0"], [76, "call _fprintf"], [77, "cmp [rbp+ptr], 0"], [78, "jz short loc_410E76"], [79, "mov rax, [rbp+ptr]"], [80, "cmp rax, [rbp+var_108]"], [81, "jz short loc_410E76"], [82, "mov rax, [rbp+ptr]"], [83, "mov rdi, rax"], [84, "call _free"], [85, "mov [rbp+ptr], 0"], [86, "mov eax, 1"], [87, "jmp locret_4116E6"], [88, "mov eax, [rbp+var_E8]"], [89, "and eax, 0F000h"], [90, "cmp eax, 4000h"], [91, "jz short loc_410F09"], [92, "mov eax, cs:dword_42BD2C"], [93, "test eax, eax"], [94, "jnz short loc_410ED7"], [95, "mov rdx, cs:qword_42BE30"], [96, "mov rax, cs:stderr"], [97, "mov esi, offset aSWarningNotADi"], [98, "mov rdi, rax"], [99, "mov eax, 0"], [100, "call _fprintf"], [101, "mov rcx, cs:stderr"], [102, "mov rax, [rbp+ptr]"], [103, "mov edx, 1"], [104, "mov rsi, rcx"], [105, "mov rdi, rax"], [106, "call sub_41918F"], [107, "cmp [rbp+ptr], 0"], [108, "jz short loc_410EFF"], [109, "mov rax, [rbp+ptr]"], [110, "cmp rax, [rbp+var_108]"], [111, "jz short loc_410EFF"], [112, "mov rax, [rbp+ptr]"], [113, "mov rdi, rax"], [114, "call _free"], [115, "mov [rbp+ptr], 0"], [116, "mov eax, 1"], [117, "jmp locret_4116E6"], [118, "mov rax, [rbp+var_100]"], [119, "mov [rbp+var_38], rax"], [120, "mov cs:dword_42BCB0, 0"], [121, "mov eax, cs:dword_42BCB0"], [122, "mov cs:dword_42BCB4, eax"], [123, "mov cs:qword_42BCA8, 0"], [124, "mov rax, [rbp+ptr]"], [125, "mov rdi, rax"], [126, "call sub_4195DD"], [127, "mov rax, [rbp+ptr]"], [128, "cmp rax, [rbp+var_108]"], [129, "jnz short loc_410F61"], [130, "mov rax, [rbp+ptr]"], [131, "mov esi, 0"], [132, "mov rdi, rax"], [133, "call sub_4186E5"], [134, "jmp short loc_410F65"], [135, "mov rax, [rbp+ptr]"], [136, "mov [rbp+var_70], rax"], [137, "mov [rbp+var_68], 0"], [138, "mov [rbp+ptr], 0"], [139, "lea rdx, [rbp+var_100]"], [140, "lea rax, [rbp+var_70]"], [141, "mov r9, rdx"], [142, "mov r8d, 1"], [143, "mov ecx, 1"], [144, "mov rdx, rax"], [145, "mov esi, 1"], [146, "mov edi, 0"], [147, "call sub_40F725"], [148, "test eax, eax"], [149, "jnz loc_4115DF"], [150, "mov [rbp+var_70], 0"], [151, "add [rbp+var_14], 1"], [152, "jmp loc_4115DF"], [153, "mov rdx, cs:qword_42BCA8"], [154, "mov eax, cs:dword_42BCB0"], [155, "cdqe"], [156, "shl rax, 3"], [157, "add rax, rdx"], [158, "mov rax, [rax]"], [159, "mov [rbp+ptr], rax"], [160, "cmp [rbp+ptr], 0"], [161, "jnz short loc_410FE6"], [162, "jmp loc_4115DF"], [163, "mov rdx, cs:qword_42BCA8"], [164, "mov eax, cs:dword_42BCB0"], [165, "cdqe"], [166, "shl rax, 3"], [167, "add rax, rdx"], [168, "mov qword ptr [rax], 0"], [169, "mov rax, [rbp+ptr]"], [170, "mov rdi, rax"], [171, "call _opendir"], [172, "mov [rbp+dirp], rax"], [173, "cmp [rbp+dirp], 0"], [174, "jnz loc_4110B2"], [175, "mov eax, cs:dword_42BD2C"], [176, "test eax, eax"], [177, "jnz short loc_411099"], [178, "call ___errno_location"], [179, "mov eax, [rax]"], [180, "mov [rbp+errnum], eax"], [181, "cmp [rbp+errnum], 2"], [182, "jz short loc_411099"], [183, "mov rdx, cs:qword_42BE30"], [184, "mov rax, cs:stderr"], [185, "mov esi, offset aSWarningCanTOp"], [186, "mov rdi, rax"], [187, "mov eax, 0"], [188, "call _fprintf"], [189, "mov rcx, cs:stderr"], [190, "mov rax, [rbp+ptr]"], [191, "mov edx, 0"], [192, "mov rsi, rcx"], [193, "mov rdi, rax"], [194, "call sub_41918F"], [195, "mov eax, [rbp+errnum]"], [196, "mov edi, eax"], [197, "call _strerror"], [198, "mov rdx, rax"], [199, "mov rax, cs:stderr"], [200, "mov esi, offset aS_7"], [201, "mov rdi, rax"], [202, "mov eax, 0"], [203, "call _fprintf"], [204, "mov rax, [rbp+ptr]"], [205, "mov rdi, rax"], [206, "call _free"], [207, "mov [rbp+ptr], 0"], [208, "jmp loc_4115DF"], [209, "mov rax, [rbp+ptr]"], [210, "mov rdi, rax"], [211, "call _strlen"], [212, "mov [rbp+var_48], rax"], [213, "cmp [rbp+var_48], 0"], [214, "jz short loc_4110DF"], [215, "mov rax, [rbp+var_48]"], [216, "lea rdx, [rax-1]"], [217, "mov rax, [rbp+ptr]"], [218, "add rax, rdx"], [219, "movzx eax, byte ptr [rax]"], [220, "cmp al, 2Fh "], [221, "jz short loc_4110E6"], [222, "mov eax, 1"], [223, "jmp short loc_4110EB"], [224, "mov eax, 0"], [225, "mov [rbp+var_4C], eax"], [226, "mov eax, [rbp+var_4C]"], [227, "movsxd rdx, eax"], [228, "mov rax, [rbp+var_48]"], [229, "add rax, rdx"], [230, "add rax, 81h"], [231, "mov [rbp+var_30], rax"], [232, "mov rax, [rbp+var_30]"], [233, "mov edx, eax"], [234, "mov rax, [rbp+size]"], [235, "cmp edx, eax"], [236, "jle short loc_411180"], [237, "mov rax, [rbp+var_30]"], [238, "mov [rbp+size], rax"], [239, "cmp [rbp+s], 0"], [240, "jnz short loc_411134"], [241, "mov rax, [rbp+size]"], [242, "mov rdi, rax"], [243, "call _malloc"], [244, "mov [rbp+s], rax"], [245, "jmp short loc_41114B"], [246, "mov rdx, [rbp+size]"], [247, "mov rax, [rbp+s]"], [248, "mov rsi, rdx"], [249, "mov rdi, rax"], [250, "call _realloc"], [251, "mov [rbp+s], rax"], [252, "cmp [rbp+s], 0"], [253, "jnz short loc_411180"], [254, "mov rdx, cs:qword_42BE30"], [255, "mov rax, cs:stderr"], [256, "mov rcx, [rbp+ptr]"], [257, "mov esi, offset aSNoSpaceForPat"], [258, "mov rdi, rax"], [259, "mov eax, 0"], [260, "call _fprintf"], [261, "mov edi, 1"], [262, "call sub_41823D"], [263, "cmp [rbp+var_4C], 0"], [264, "jz short loc_41118D"], [265, "mov ecx, offset asc_42289B"], [266, "jmp short loc_411192"], [267, "mov ecx, offset unk_422751"], [268, "mov rdx, [rbp+ptr]"], [269, "mov rsi, [rbp+size]"], [270, "mov rax, [rbp+s]"], [271, "mov r8, rcx"], [272, "mov rcx, rdx"], [273, "mov edx, offset aSS_1"], [274, "mov rdi, rax"], [275, "mov eax, 0"], [276, "call _snprintf"], [277, "mov rax, [rbp+ptr]"], [278, "mov rdi, rax"], [279, "call _free"], [280, "mov [rbp+ptr], 0"], [281, "mov rax, [rbp+dirp]"], [282, "mov rdi, rax"], [283, "call _readdir64"], [284, "mov [rbp+var_10], rax"], [285, "jmp loc_4115A0"], [286, "mov rax, [rbp+var_10]"], [287, "mov rax, [rax]"], [288, "test rax, rax"], [289, "jz loc_41157A"], [290, "mov rax, [rbp+var_10]"], [291, "add rax, 13h"], [292, "mov rdi, rax"], [293, "call _strlen"], [294, "mov [rbp+n], rax"], [295, "cmp [rbp+n], 0"], [296, "jz loc_41157D"], [297, "cmp [rbp+n], 2"], [298, "ja short loc_41123C"], [299, "mov rax, [rbp+var_10]"], [300, "movzx eax, byte ptr [rax+13h]"], [301, "cmp al, 2Eh "], [302, "jnz short loc_41123C"], [303, "cmp [rbp+n], 1"], [304, "jz loc_411580"], [305, "mov rax, [rbp+var_10]"], [306, "movzx eax, byte ptr [rax+14h]"], [307, "cmp al, 2Eh "], [308, "jz loc_411583"], [309, "mov eax, [rbp+var_4C]"], [310, "movsxd rdx, eax"], [311, "mov rax, [rbp+var_48]"], [312, "sub rax, [rbp+size]"], [313, "add rdx, rax"], [314, "mov rax, [rbp+n]"], [315, "add rax, rdx"], [316, "add rax, 1"], [317, "mov [rbp+var_30], rax"], [318, "mov rax, [rbp+var_30]"], [319, "test eax, eax"], [320, "jle loc_411309"], [321, "mov rax, [rbp+var_30]"], [322, "add [rbp+size], rax"], [323, "mov rdx, [rbp+size]"], [324, "mov rax, [rbp+s]"], [325, "mov rsi, rdx"], [326, "mov rdi, rax"], [327, "call _realloc"], [328, "mov [rbp+s], rax"], [329, "cmp [rbp+s], 0"], [330, "jnz short loc_411309"], [331, "mov rdx, cs:qword_42BE30"], [332, "mov rax, cs:stderr"], [333, "mov esi, offset aSNoSpaceFor"], [334, "mov rdi, rax"], [335, "mov eax, 0"], [336, "call _fprintf"], [337, "mov rcx, cs:stderr"], [338, "mov rax, [rbp+ptr]"], [339, "mov edx, 0"], [340, "mov rsi, rcx"], [341, "mov rdi, rax"], [342, "call sub_41918F"], [343, "mov rax, cs:stderr"], [344, "mov rsi, rax"], [345, "mov edi, 2Fh "], [346, "call _putc"], [347, "mov rax, cs:stderr"], [348, "mov rdx, [rbp+n]"], [349, "mov esi, edx"], [350, "mov rdx, [rbp+var_10]"], [351, "lea rdi, [rdx+13h]"], [352, "mov ecx, 1"], [353, "mov rdx, rax"], [354, "call sub_4193D6"], [355, "mov edi, 1"], [356, "call sub_41823D"], [357, "mov rax, [rbp+var_10]"], [358, "lea rsi, [rax+13h]"], [359, "mov eax, [rbp+var_4C]"], [360, "movsxd rdx, eax"], [361, "mov rax, [rbp+var_48]"], [362, "add rdx, rax"], [363, "mov rax, [rbp+s]"], [364, "lea rcx, [rdx+rax]"], [365, "mov rax, [rbp+n]"], [366, "mov rdx, rax"], [367, "mov rdi, rcx"], [368, "call _strncpy"], [369, "mov eax, [rbp+var_4C]"], [370, "movsxd rdx, eax"], [371, "mov rax, [rbp+var_48]"], [372, "add rdx, rax"], [373, "mov rax, [rbp+n]"], [374, "add rdx, rax"], [375, "mov rax, [rbp+s]"], [376, "add rax, rdx"], [377, "mov byte ptr [rax], 0"], [378, "lea rdx, [rbp+var_100]"], [379, "mov rax, [rbp+s]"], [380, "mov rsi, rdx"], [381, "mov rdi, rax"], [382, "call sub_418980"], [383, "test eax, eax"], [384, "jz loc_4113F9"], [385, "call ___errno_location"], [386, "mov eax, [rax]"], [387, "mov [rbp+errnum], eax"], [388, "cmp [rbp+errnum], 2"], [389, "jz loc_411586"], [390, "mov eax, cs:dword_42BD2C"], [391, "test eax, eax"], [392, "jnz loc_411586"], [393, "mov rdx, cs:qword_42BE30"], [394, "mov rax, cs:stderr"], [395, "mov esi, offset aSWarningCanTLs"], [396, "mov rdi, rax"], [397, "mov eax, 0"], [398, "call _fprintf"], [399, "mov rcx, cs:stderr"], [400, "mov rax, [rbp+s]"], [401, "mov edx, 0"], [402, "mov rsi, rcx"], [403, "mov rdi, rax"], [404, "call sub_41918F"], [405, "mov eax, [rbp+errnum]"], [406, "mov edi, eax"], [407, "call _strerror"], [408, "mov rdx, rax"], [409, "mov rax, cs:stderr"], [410, "mov esi, offset aS_7"], [411, "mov rdi, rax"], [412, "mov eax, 0"], [413, "call _fprintf"], [414, "jmp loc_411586"], [415, "mov eax, cs:dword_42BD34"], [416, "and eax, 1"], [417, "test eax, eax"], [418, "jnz short loc_411417"], [419, "mov rax, [rbp+var_100]"], [420, "cmp [rbp+var_38], rax"], [421, "jnz loc_411589"], [422, "mov eax, [rbp+var_E8]"], [423, "and eax, 0F000h"], [424, "cmp eax, 0A000h"], [425, "jnz loc_4114E4"], [426, "mov eax, cs:dword_42BD34"], [427, "and eax, 2"], [428, "test eax, eax"], [429, "jz loc_41158C"], [430, "lea rdx, [rbp+var_100]"], [431, "mov rax, [rbp+s]"], [432, "mov rsi, rdx"], [433, "mov rdi, rax"], [434, "call sub_419567"], [435, "test eax, eax"], [436, "jz loc_4114E4"], [437, "call ___errno_location"], [438, "mov eax, [rax]"], [439, "mov [rbp+errnum], eax"], [440, "cmp [rbp+errnum], 2"], [441, "jz loc_41158F"], [442, "mov eax, cs:dword_42BD2C"], [443, "test eax, eax"], [444, "jnz loc_41158F"], [445, "mov rdx, cs:qword_42BE30"], [446, "mov rax, cs:stderr"], [447, "mov esi, offset aSWarningCanTSt_0"], [448, "mov rdi, rax"], [449, "mov eax, 0"], [450, "call _fprintf"], [451, "mov rcx, cs:stderr"], [452, "mov rax, [rbp+s]"], [453, "mov edx, 0"], [454, "mov rsi, rcx"], [455, "mov rdi, rax"], [456, "call sub_41918F"], [457, "mov eax, [rbp+errnum]"], [458, "mov edi, eax"], [459, "call _strerror"], [460, "mov rdx, rax"], [461, "mov rax, cs:stderr"], [462, "mov esi, offset aSymbolcLinkS"], [463, "mov rdi, rax"], [464, "mov eax, 0"], [465, "call _fprintf"], [466, "jmp loc_41158F"], [467, "mov rax, [rbp+var_70]"], [468, "test rax, rax"], [469, "jz short loc_411501"], [470, "mov rax, [rbp+var_70]"], [471, "mov rdi, rax"], [472, "call _free"], [473, "mov [rbp+var_70], 0"], [474, "mov rax, [rbp+s]"], [475, "mov esi, 0"], [476, "mov rdi, rax"], [477, "call sub_4186E5"], [478, "mov [rbp+var_70], rax"], [479, "mov eax, [rbp+var_E8]"], [480, "and eax, 0F000h"], [481, "cmp eax, 4000h"], [482, "jnz short loc_41153D"], [483, "cmp [rbp+var_10C], 0"], [484, "jz short loc_41153D"], [485, "mov rax, [rbp+var_70]"], [486, "mov rdi, rax"], [487, "call sub_4195DD"], [488, "lea rdx, [rbp+var_100]"], [489, "lea rax, [rbp+var_70]"], [490, "mov r9, rdx"], [491, "mov r8d, 1"], [492, "mov ecx, 1"], [493, "mov rdx, rax"], [494, "mov esi, 1"], [495, "mov edi, 0"], [496, "call sub_40F725"], [497, "test eax, eax"], [498, "jnz short loc_411590"], [499, "mov [rbp+var_70], 0"], [500, "add [rbp+var_14], 1"], [501, "jmp short loc_411590"], [502, "nop"], [503, "jmp short loc_411590"], [504, "nop"], [505, "jmp short loc_411590"], [506, "nop"], [507, "jmp short loc_411590"], [508, "nop"], [509, "jmp short loc_411590"], [510, "nop"], [511, "jmp short loc_411590"], [512, "nop"], [513, "jmp short loc_411590"], [514, "nop"], [515, "jmp short loc_411590"], [516, "nop"], [517, "mov rax, [rbp+dirp]"], [518, "mov rdi, rax"], [519, "call _readdir64"], [520, "mov [rbp+var_10], rax"], [521, "cmp [rbp+var_10], 0"], [522, "jnz loc_4111DF"], [523, "mov rax, [rbp+dirp]"], [524, "mov rdi, rax"], [525, "call _closedir"], [526, "cmp [rbp+ptr], 0"], [527, "jz short loc_4115DF"], [528, "mov rax, [rbp+ptr]"], [529, "cmp rax, [rbp+var_108]"], [530, "jz short loc_4115DF"], [531, "mov rax, [rbp+ptr]"], [532, "mov rdi, rax"], [533, "call _free"], [534, "mov [rbp+ptr], 0"], [535, "mov eax, cs:dword_42BCB0"], [536, "sub eax, 1"], [537, "mov cs:dword_42BCB0, eax"], [538, "mov eax, cs:dword_42BCB0"], [539, "test eax, eax"], [540, "jns loc_410FBD"], [541, "cmp [rbp+ptr], 0"], [542, "jz short loc_411624"], [543, "mov rax, [rbp+ptr]"], [544, "cmp rax, [rbp+var_108]"], [545, "jz short loc_411624"], [546, "mov rax, [rbp+ptr]"], [547, "mov rdi, rax"], [548, "call _free"], [549, "mov [rbp+ptr], 0"], [550, "mov rax, [rbp+var_70]"], [551, "test rax, rax"], [552, "jz short loc_41164B"], [553, "mov rax, [rbp+var_70]"], [554, "cmp [rbp+s], rax"], [555, "jz short loc_41164B"], [556, "mov rax, [rbp+var_70]"], [557, "mov rdi, rax"], [558, "call _free"], [559, "mov [rbp+var_70], 0"], [560, "cmp [rbp+s], 0"], [561, "jz short loc_411666"], [562, "mov rax, [rbp+s]"], [563, "mov rdi, rax"], [564, "call _free"], [565, "mov [rbp+s], 0"], [566, "mov rax, cs:qword_42BCA8"], [567, "test rax, rax"], [568, "jz short loc_41168C"], [569, "mov rax, cs:qword_42BCA8"], [570, "mov rdi, rax"], [571, "call _free"], [572, "mov cs:qword_42BCA8, 0"], [573, "cmp [rbp+var_14], 0"], [574, "jnz short loc_4116E1"], [575, "mov eax, cs:dword_42BD2C"], [576, "test eax, eax"], [577, "jnz short loc_4116DA"], [578, "mov rdx, cs:qword_42BE30"], [579, "mov rax, cs:stderr"], [580, "mov esi, offset aSWarningNoFile"], [581, "mov rdi, rax"], [582, "mov eax, 0"], [583, "call _fprintf"], [584, "mov rcx, cs:stderr"], [585, "mov rax, [rbp+var_108]"], [586, "mov edx, 1"], [587, "mov rsi, rcx"], [588, "mov rdi, rax"], [589, "call sub_41918F"], [590, "mov eax, 1"], [591, "jmp short locret_4116E6"], [592, "mov eax, 0"], [593, "leave"], [594, "retn"]], "data_dep": [[10, 3], [11, 10], [12, 3], [13, 12], [14, 13], [15, 14], [16, 3], [17, 16], [18, 17], [19, 18], [20, 3], [21, 20], [22, 21], [23, 22], [25, 24], [26, 25], [30, 28], [35, 3], [36, 35], [38, 37], [39, 38], [40, 39], [44, 38], [45, 43], [46, 44], [48, 47], [49, 48], [51, 50], [52, 51], [54, 53], [55, 54], [59, 57], [63, 38], [65, 62], [66, 63], [68, 55], [69, 68], [71, 70], [74, 72], [77, 38], [78, 77], [79, 38], [80, 79], [80, 3], [81, 80], [82, 38], [83, 82], [89, 88], [90, 89], [91, 90], [93, 92], [94, 93], [98, 96], [102, 38], [104, 101], [105, 102], [107, 38], [108, 107], [109, 38], [110, 109], [110, 3], [111, 110], [112, 38], [113, 112], [119, 118], [121, 120], [122, 121], [124, 38], [125, 124], [127, 38], [128, 3], [128, 127], [129, 128], [130, 38], [132, 130], [135, 38], [136, 135], [136, 133], [139, 43], [140, 136], [140, 135], [140, 133], [141, 139], [144, 140], [148, 147], [149, 148], [151, 6], [153, 123], [154, 537], [156, 154], [157, 156], [157, 153], [158, 377], [158, 157], [158, 168], [159, 158], [160, 159], [161, 160], [163, 123], [164, 537], [166, 164], [167, 163], [167, 166], [168, 167], [169, 159], [170, 169], [172, 171], [173, 172], [174, 173], [176, 175], [177, 176], [179, 178], [179, 377], [179, 168], [180, 179], [181, 180], [182, 181], [186, 184], [190, 159], [192, 189], [193, 190], [195, 180], [196, 195], [198, 197], [201, 199], [204, 159], [205, 204], [209, 159], [210, 209], [212, 211], [213, 212], [214, 213], [215, 212], [216, 168], [216, 377], [216, 215], [216, 163], [217, 159], [218, 217], [218, 216], [219, 168], [219, 377], [219, 218], [220, 219], [221, 220], [225, 224], [225, 222], [226, 225], [227, 226], [228, 212], [229, 228], [229, 227], [230, 229], [231, 230], [232, 231], [233, 232], [234, 8], [234, 322], [234, 238], [235, 233], [235, 234], [236, 235], [237, 231], [238, 237], [239, 7], [239, 244], [239, 328], [239, 251], [240, 239], [241, 238], [242, 241], [244, 243], [246, 238], [247, 7], [247, 244], [247, 328], [247, 251], [248, 246], [249, 247], [251, 250], [252, 251], [252, 244], [253, 252], [256, 159], [258, 255], [263, 225], [264, 263], [268, 159], [269, 322], [269, 238], [269, 8], [270, 251], [270, 7], [270, 244], [270, 328], [271, 265], [271, 267], [272, 268], [274, 270], [277, 159], [278, 277], [281, 172], [282, 281], [284, 283], [286, 520], [286, 284], [287, 168], [287, 377], [287, 286], [288, 287], [289, 288], [290, 284], [290, 520], [291, 290], [292, 291], [294, 293], [295, 294], [296, 295], [297, 294], [298, 297], [299, 284], [299, 520], [300, 377], [300, 299], [300, 168], [301, 300], [302, 301], [303, 294], [304, 303], [305, 520], [305, 284], [306, 168], [306, 377], [306, 305], [307, 306], [308, 307], [309, 225], [310, 309], [311, 212], [312, 322], [312, 238], [312, 311], [312, 8], [313, 310], [313, 312], [314, 294], [315, 313], [315, 314], [316, 315], [317, 316], [318, 317], [319, 318], [320, 319], [321, 317], [322, 238], [322, 321], [322, 8], [322, 322], [323, 322], [324, 7], [324, 244], [324, 328], [324, 251], [325, 323], [326, 324], [328, 327], [329, 328], [330, 329], [334, 332], [338, 280], [340, 337], [341, 338], [344, 343], [348, 294], [349, 348], [350, 284], [350, 520], [351, 350], [351, 345], [351, 168], [351, 377], [353, 347], [357, 520], [357, 284], [358, 494], [358, 462], [358, 168], [358, 410], [358, 432], [358, 377], [358, 269], [358, 380], [358, 357], [358, 325], [359, 225], [360, 359], [361, 212], [362, 361], [362, 360], [363, 251], [363, 328], [363, 7], [363, 244], [364, 272], [364, 364], [364, 168], [364, 451], [364, 377], [364, 363], [364, 399], [364, 492], [365, 294], [366, 365], [367, 364], [369, 225], [370, 369], [371, 212], [372, 370], [372, 371], [373, 294], [374, 372], [374, 373], [375, 7], [375, 244], [375, 251], [375, 328], [376, 375], [376, 374], [377, 376], [378, 374], [379, 251], [379, 328], [379, 7], [379, 244], [380, 378], [381, 379], [383, 382], [384, 383], [386, 168], [386, 377], [386, 385], [387, 386], [388, 387], [389, 388], [391, 390], [392, 391], [396, 394], [400, 328], [400, 7], [400, 244], [400, 251], [402, 399], [403, 400], [405, 387], [406, 405], [408, 407], [411, 409], [416, 415], [417, 416], [418, 417], [420, 419], [420, 119], [421, 420], [423, 422], [424, 423], [425, 424], [427, 426], [428, 427], [429, 428], [430, 378], [431, 251], [431, 244], [431, 328], [431, 7], [432, 430], [433, 431], [435, 434], [436, 435], [438, 377], [438, 168], [438, 437], [439, 438], [440, 439], [441, 440], [443, 442], [444, 443], [448, 446], [452, 244], [452, 328], [452, 7], [452, 251], [454, 451], [455, 452], [457, 439], [458, 457], [460, 459], [463, 461], [467, 150], [467, 136], [467, 499], [467, 478], [468, 467], [469, 468], [470, 150], [470, 136], [470, 499], [470, 478], [471, 470], [474, 7], [474, 244], [474, 328], [474, 251], [476, 474], [478, 477], [480, 479], [481, 480], [482, 481], [483, 4], [484, 483], [485, 478], [486, 485], [488, 430], [488, 378], [489, 480], [489, 478], [489, 487], [490, 488], [493, 489], [497, 496], [498, 497], [500, 151], [500, 6], [500, 500], [517, 172], [518, 517], [520, 519], [521, 520], [521, 284], [522, 521], [523, 172], [524, 523], [526, 280], [527, 526], [528, 280], [529, 3], [529, 528], [530, 529], [531, 280], [532, 531], [535, 120], [535, 537], [536, 535], [537, 536], [538, 537], [539, 538], [540, 539], [541, 207], [541, 159], [541, 280], [541, 534], [541, 138], [542, 541], [543, 280], [543, 534], [543, 138], [543, 207], [543, 159], [544, 543], [544, 3], [545, 544], [546, 159], [546, 280], [546, 534], [546, 138], [546, 207], [547, 546], [550, 499], [550, 150], [550, 136], [550, 478], [551, 550], [552, 551], [553, 499], [553, 150], [553, 136], [553, 478], [554, 251], [554, 553], [554, 7], [554, 244], [554, 328], [555, 554], [556, 478], [556, 150], [556, 136], [556, 499], [557, 556], [560, 328], [560, 251], [560, 7], [560, 244], [561, 560], [562, 251], [562, 7], [562, 244], [562, 328], [563, 562], [566, 123], [567, 566], [568, 567], [569, 123], [570, 569], [573, 151], [573, 6], [573, 500], [574, 573], [576, 575], [577, 576], [581, 579], [585, 3], [587, 584], [588, 585], [594, 590], [594, 41], [594, 86], [594, 592], [594, 33], [594, 116]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3fdae2be882b780d1a67910267da0c2d1686137097f9fe6d13498606dfdc8de6_3fdae2be882b780d1a67910267da0c2d1686137097f9fe6d13498606dfdc8de6.jsonl.gz", "strip_func_name": "sub_410CF0", "query": "\n\n\n__int64 __fastcall sub_410CF0(_BYTE *a1, int a2)\n{\nchar *v3; // rax\nvoid *v4; // rax\nchar *v5; // rax\n_BOOL4 v6; // eax\nconst char *v7; // rcx\nchar *v8; // rax\nchar *v9; // rax\n__int64 v10[3]; // [rsp+10h] [rbp-100h] BYREF\nint v11; // [rsp+28h] [rbp-E8h]\nvoid *v12[2]; // [rsp+A0h] [rbp-70h] BYREF\nint errnum; // [rsp+B4h] [rbp-5Ch]\nsize_t n; // [rsp+B8h] [rbp-58h]\n_BOOL4 v15; // [rsp+C4h] [rbp-4Ch]\nsize_t v16; // [rsp+C8h] [rbp-48h]\nDIR *dirp; // [rsp+D0h] [rbp-40h]\n__int64 v18; // [rsp+D8h] [rbp-38h]\nsize_t v19; // [rsp+E0h] [rbp-30h]\nsize_t size; // [rsp+E8h] [rbp-28h]\nchar *s; // [rsp+F0h] [rbp-20h]\nint v22; // [rsp+FCh] [rbp-14h]\nstruct dirent64 *v23; // [rsp+100h] [rbp-10h]\nvoid *ptr; // [rsp+108h] [rbp-8h]\n\nptr = 0LL;\nv22 = 0;\ns = 0LL;\nsize = 0LL;\nv19 = 0LL;\nif ( !a1 || !*a1 || *a1 == 43 || *a1 == 45 )\n{\nif ( !dword_42BD2C )\nfprintf(stderr, \"%s: +d not followed by a directory path\\n\", (const char *)qword_42BE30);\nreturn 1LL;\n}\nptr = (void *)sub_4189F6(a1);\nif ( !ptr )\nreturn 1LL;\nif ( (unsigned int)sub_419567(ptr, v10) )\n{\nif ( !dword_42BD2C )\n{\nerrnum = *__errno_location();\nfprintf(stderr, \"%s: WARNING: can't stat(\", (const char *)qword_42BE30);\nsub_41918F(ptr, stderr, 0LL);\nv3 = strerror(errnum);\nfprintf(stderr, \"): %s\\n\", v3);\n}\nif ( ptr && ptr != a1 )\n{\nfree(ptr);\nptr = 0LL;\n}\nreturn 1LL;\n}\nif ( (v11 & 0xF000) != 0x4000 )\n{\nif ( !dword_42BD2C )\n{\nfprintf(stderr, \"%s: WARNING: not a directory: \", (const char *)qword_42BE30);\nsub_41918F(ptr, stderr, 1LL);\n}\nif ( ptr && ptr != a1 )\n{\nfree(ptr);\nptr = 0LL;\n}\nreturn 1LL;\n}\nv18 = v10[0];\ndword_42BCB0 = 0;\ndword_42BCB4 = 0;\nqword_42BCA8 = 0LL;\nsub_4195DD(ptr);\nif ( ptr == a1 )\nv4 = (void *)sub_4186E5(ptr, 0LL);\nelse\nv4 = ptr;\nv12[0] = v4;\nv12[1] = 0LL;\nptr = 0LL;\nif ( !(unsigned int)sub_40F725(0, 1, (char **)v12, 1, 1, v10) )\n{\nv12[0] = 0LL;\n++v22;\n}\nLABEL_82:\nwhile ( --dword_42BCB0 >= 0 )\n{\nptr = (void *)*((_QWORD *)qword_42BCA8 + dword_42BCB0);\nif ( !ptr )\ngoto LABEL_82;\n*((_QWORD *)qword_42BCA8 + dword_42BCB0) = 0LL;\ndirp = opendir((const char *)ptr);\nif ( dirp )\n{\nv16 = strlen((const char *)ptr);\nv6 = !v16 || *((_BYTE *)ptr + v16 - 1) != 47;\nv15 = v6;\nv19 = v6 + v16 + 129;\nif ( v6 + (int)v16 + 129 > (int)size )\n{\nsize = v19;\ns = (char *)(s ? realloc(s, size) : malloc(size));\nif ( !s )\n{\nfprintf(\nstderr,\n\"%s: no space for path to entries in directory: %s\\n\",\n(const char *)qword_42BE30,\n(const char *)ptr);\nsub_41823D(1LL);\n}\n}\nif ( v15 )\nv7 = \"/\";\nelse\nv7 = (const char *)&unk_422751;\nsnprintf(s, size, \"%s%s\", (const char *)ptr, v7);\nfree(ptr);\nptr = 0LL;\nv23 = readdir64(dirp);\nwhile ( 2 )\n{\nif ( !v23 )\n{\nclosedir(dirp);\nif ( ptr && ptr != a1 )\ngoto LABEL_81;\ngoto LABEL_82;\n}\nif ( v23->d_ino )\n{\nn = strlen(v23->d_name);\nif ( n )\n{\nif ( n > 2 || v23->d_name[0] != 46 || n != 1 && v23->d_name[1] != 46 )\n{\nv19 = v16 - size + v15 + n + 1;\nif ( (int)v16 - (int)size + v15 + (int)n + 1 > 0 )\n{\nsize += v19;\ns = (char *)realloc(s, size);\nif ( !s )\n{\nfprintf(stderr, \"%s: no space for: \", (const char *)qword_42BE30);\nsub_41918F(ptr, stderr, 0LL);\nputc(47, stderr);\nsub_4193D6(v23->d_name, (unsigned int)n, stderr, 1LL);\nsub_41823D(1LL);\n}\n}\nstrncpy(&s[v16 + v15], v23->d_name, n);\ns[n + v16 + v15] = 0;\nif ( (unsigned int)sub_418980(s, v10) )\n{\nerrnum = *__errno_location();\nif ( errnum != 2 && !dword_42BD2C )\n{\nfprintf(stderr, \"%s: WARNING: can't lstat(\", (const char *)qword_42BE30);\nsub_41918F(s, stderr, 0LL);\nv8 = strerror(errnum);\nfprintf(stderr, \"): %s\\n\", v8);\n}\ngoto LABEL_77;\n}\nif ( (dword_42BD34 & 1) != 0 || v18 == v10[0] )\n{\nif ( (v11 & 0xF000) != 40960 )\ngoto LABEL_70;\nif ( (dword_42BD34 & 2) != 0 )\n{\nif ( (unsigned int)sub_419567(s, v10) )\n{\nerrnum = *__errno_location();\nif ( errnum != 2 && !dword_42BD2C )\n{\nfprintf(stderr, \"%s: WARNING: can't stat(\", (const char *)qword_42BE30);\nsub_41918F(s, stderr, 0LL);\nv9 = strerror(errnum);\nfprintf(stderr, \") symbolc link: %s\\n\", v9);\n}\ngoto LABEL_77;\n}\nLABEL_70:\nif ( v12[0] )\n{\nfree(v12[0]);\nv12[0] = 0LL;\n}\nv12[0] = (void *)sub_4186E5(s, 0LL);\nif ( (v11 & 0xF000) == 0x4000 && a2 )\nsub_4195DD(v12[0]);\nif ( !(unsigned int)sub_40F725(0, 1, (char **)v12, 1, 1, v10) )\n{\nv12[0] = 0LL;\n++v22;\n}\ngoto LABEL_77;\n}\n}\n}\n}\n}\nLABEL_77:\nv23 = readdir64(dirp);\ncontinue;\n}\n}\nif ( !dword_42BD2C )\n{\nerrnum = *__errno_location();\nif ( errnum != 2 )\n{\nfprintf(stderr, \"%s: WARNING: can't opendir(\", (const char *)qword_42BE30);\nsub_41918F(ptr, stderr, 0LL);\nv5 = strerror(errnum);\nfprintf(stderr, \"): %s\\n\", v5);\n}\n}\nLABEL_81:\nfree(ptr);\nptr = 0LL;\n}\nif ( ptr && ptr != a1 )\n{\nfree(ptr);\nptr = 0LL;\n}\nif ( v12[0] && s != v12[0] )\n{\nfree(v12[0]);\nv12[0] = 0LL;\n}\nif ( s )\n{\nfree(s);\ns = 0LL;\n}\nif ( qword_42BCA8 )\n{\nfree(qword_42BCA8);\nqword_42BCA8 = 0LL;\n}\nif ( v22 )\nreturn 0LL;\nif ( !dword_42BD2C )\n{\nfprintf(stderr, \"%s: WARNING: no files found in directory: \", (const char *)qword_42BE30);\nsub_41918F(a1, stderr, 1LL);\n}\nreturn 1LL;\n}\n\n\n\nQ:[a1,a2,v10,v12,errnum,n,v15,v16,dirp,v18,v19,size,s,v22,v23,ptr,sub_410CF0,sub_4189F6,sub_419567,sub_41918F,sub_4195DD,sub_4186E5,sub_40F725,sub_41823D,sub_4193D6,sub_418980,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'd', 'a2': 'descend', 'v10': 'sb', 'v12': 'av', 'errnum': 'en', 'n': 'dnamlen', 'v15': 'sl', 'v16': 'dnl', 'dirp': 'dfp', 'v18': 'ddev', 'v19': 'fpli', 'size': 'fpl', 's': 'fp', 'v22': 'fct', 'v23': 'dp', 'ptr': 'dn', 'sub_410CF0': 'enter_dir', 'sub_4189F6': 'Readlink', 'sub_419567': 'statsafely', 'sub_41918F': 'safestrprt', 'sub_4195DD': 'stkdir', 'sub_4186E5': 'mkstrcpy', 'sub_40F725': 'ck_file_arg', 'sub_41823D': 'Exit', 'sub_4193D6': 'safestrprtn', 'sub_418980': 'lstatsafely'}"}
pf_memlen
859aeb813db1eac05fa76f13e587517c99b11e95d101d8d9074c07b860c6ac7c
cclaude42
minishell
NA
int pf_memlen(unsigned long n) { int len; len = 0; if (n / 16 > 0) len += pf_memlen(n / 16); len++; return (len); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_408694", "function_addr": 4228756, "binary_name": "859aeb813db1eac05fa76f13e587517c99b11e95d101d8d9074c07b860c6ac7c.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_4], 0"], [5, "cmp [rbp+var_18], 0Fh"], [6, "jbe short loc_4086C1"], [7, "mov rax, [rbp+var_18]"], [8, "shr rax, 4"], [9, "mov rdi, rax"], [10, "call sub_408694"], [11, "add [rbp+var_4], eax"], [12, "add [rbp+var_4], 1"], [13, "mov eax, [rbp+var_4]"], [14, "leave"], [15, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 3], [8, 7], [9, 8], [11, 10], [11, 4], [12, 4], [12, 11], [13, 12], [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/859aeb813db1eac05fa76f13e587517c99b11e95d101d8d9074c07b860c6ac7c_859aeb813db1eac05fa76f13e587517c99b11e95d101d8d9074c07b860c6ac7c.jsonl.gz", "strip_func_name": "sub_408694", "query": "\n\n\n__int64 __fastcall sub_408694(unsigned __int64 a1)\n{\nint v2; // [rsp+1Ch] [rbp-4h]\n\nv2 = 0;\nif ( a1 > 0xF )\nv2 = sub_408694(a1 >> 4);\nreturn (unsigned int)(v2 + 1);\n}\n\n\n\nQ:[a1,v2,sub_408694,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'n', 'v2': 'len', 'sub_408694': 'pf_memlen'}"}
l2cap_emit_le_incoming_connection
0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26
Matheus-Garbelini
esp32_bluetooth_classic_sniffer
NA
static void l2cap_emit_le_incoming_connection(l2cap_channel_t *channel) { log_info("L2CAP_EVENT_LE_INCOMING_CONNECTION addr_type %u, addr %s handle 0x%x psm 0x%x local_cid 0x%x remote_cid 0x%x, remote_mtu %u", channel->address_type, bd_addr_to_str(channel->address), channel->con_handle, channel->psm, channel->local_cid, channel->remote_cid, channel->remote_mtu); uint8_t event[19]; event[0] = L2CAP_EVENT_LE_INCOMING_CONNECTION; event[1] = sizeof(event) - 2u; event[2] = channel->address_type; reverse_bd_addr(channel->address, &event[3]); little_endian_store_16(event, 9, channel->con_handle); little_endian_store_16(event, 11, channel->psm); little_endian_store_16(event, 13, channel->local_cid); little_endian_store_16(event, 15, channel->remote_cid); little_endian_store_16(event, 17, channel->remote_mtu); hci_dump_packet( HCI_EVENT_PACKET, 0, event, sizeof(event)); l2cap_dispatch_to_channel(channel, HCI_EVENT_PACKET, event, sizeof(event)); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4123CD", "function_addr": 4269005, "binary_name": "0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26.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, 38h"], [8, "mov [rbp+var_58], rdi"], [9, "mov rax, [rbp+var_58]"], [10, "movzx eax, word ptr [rax+5Ah]"], [11, "movzx r15d, ax"], [12, "mov rax, [rbp+var_58]"], [13, "movzx eax, word ptr [rax+56h]"], [14, "movzx r14d, ax"], [15, "mov rax, [rbp+var_58]"], [16, "movzx eax, word ptr [rax+0Ch]"], [17, "movzx r13d, ax"], [18, "mov rax, [rbp+var_58]"], [19, "movzx eax, word ptr [rax+5Eh]"], [20, "movzx r12d, ax"], [21, "mov rax, [rbp+var_58]"], [22, "movzx eax, word ptr [rax+48h]"], [23, "movzx ebx, ax"], [24, "mov rax, [rbp+var_58]"], [25, "add rax, 4Ah "], [26, "mov rdi, rax"], [27, "call sub_407307"], [28, "mov rdx, rax"], [29, "mov rax, [rbp+var_58]"], [30, "mov eax, [rax+50h]"], [31, "sub rsp, 8"], [32, "push r15"], [33, "push r14"], [34, "push r13"], [35, "push r12"], [36, "push rbx"], [37, "mov r9, rdx"], [38, "mov r8d, eax"], [39, "mov ecx, 0F3Fh"], [40, "mov edx, offset aL2capC"], [41, "mov esi, offset aSUL2capEventLe"], [42, "mov edi, 1"], [43, "mov eax, 0"], [44, "call sub_40FA98"], [45, "add rsp, 30h"], [46, "mov [rbp+var_50], 79h "], [47, "mov [rbp+var_4F], 11h"], [48, "mov rax, [rbp+var_58]"], [49, "mov eax, [rax+50h]"], [50, "mov [rbp+var_4E], al"], [51, "mov rax, [rbp+var_58]"], [52, "add rax, 4Ah "], [53, "lea rdx, [rbp+var_50]"], [54, "add rdx, 3"], [55, "mov rsi, rdx"], [56, "mov rdi, rax"], [57, "call sub_406E19"], [58, "mov rax, [rbp+var_58]"], [59, "movzx eax, word ptr [rax+48h]"], [60, "movzx edx, ax"], [61, "lea rax, [rbp+var_50]"], [62, "mov esi, 9"], [63, "mov rdi, rax"], [64, "call sub_406911"], [65, "mov rax, [rbp+var_58]"], [66, "movzx eax, word ptr [rax+5Eh]"], [67, "movzx edx, ax"], [68, "lea rax, [rbp+var_50]"], [69, "mov esi, 0Bh"], [70, "mov rdi, rax"], [71, "call sub_406911"], [72, "mov rax, [rbp+var_58]"], [73, "movzx eax, word ptr [rax+0Ch]"], [74, "movzx edx, ax"], [75, "lea rax, [rbp+var_50]"], [76, "mov esi, 0Dh"], [77, "mov rdi, rax"], [78, "call sub_406911"], [79, "mov rax, [rbp+var_58]"], [80, "movzx eax, word ptr [rax+56h]"], [81, "movzx edx, ax"], [82, "lea rax, [rbp+var_50]"], [83, "mov esi, 0Fh"], [84, "mov rdi, rax"], [85, "call sub_406911"], [86, "mov rax, [rbp+var_58]"], [87, "movzx eax, word ptr [rax+5Ah]"], [88, "movzx edx, ax"], [89, "lea rax, [rbp+var_50]"], [90, "mov esi, 11h"], [91, "mov rdi, rax"], [92, "call sub_406911"], [93, "lea rax, [rbp+var_50]"], [94, "mov ecx, 13h"], [95, "mov rdx, rax"], [96, "mov esi, 0"], [97, "mov edi, 4"], [98, "call sub_40F9EC"], [99, "lea rdx, [rbp+var_50]"], [100, "mov rax, [rbp+var_58]"], [101, "mov ecx, 13h"], [102, "mov esi, 4"], [103, "mov rdi, rax"], [104, "call sub_41016A"], [105, "nop"], [106, "lea rsp, [rbp-28h]"], [107, "pop rbx"], [108, "pop r12"], [109, "pop r13"], [110, "pop r14"], [111, "pop r15"], [112, "pop rbp"], [113, "retn"]], "data_dep": [[9, 8], [10, 9], [11, 10], [12, 8], [13, 12], [14, 13], [15, 8], [16, 15], [17, 16], [18, 8], [19, 18], [20, 19], [21, 8], [22, 21], [23, 22], [24, 8], [25, 24], [26, 25], [28, 27], [29, 8], [30, 29], [31, 7], [32, 11], [33, 14], [34, 17], [35, 20], [36, 23], [37, 28], [38, 30], [45, 31], [48, 8], [49, 48], [50, 49], [51, 8], [52, 51], [53, 40], [53, 46], [54, 53], [55, 54], [56, 52], [58, 8], [59, 58], [60, 59], [61, 46], [61, 59], [63, 61], [65, 8], [66, 65], [67, 66], [68, 66], [68, 46], [70, 68], [72, 8], [73, 72], [74, 73], [75, 46], [75, 73], [77, 75], [79, 8], [80, 79], [81, 80], [82, 46], [82, 80], [84, 82], [86, 8], [87, 86], [88, 87], [89, 46], [89, 87], [91, 89], [93, 92], [93, 46], [95, 93], [99, 95], [99, 46], [100, 8], [103, 100], [106, 45], [107, 36], [108, 35], [109, 34], [110, 33], [111, 32], [112, 0], [113, 104]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26_0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26.jsonl.gz", "strip_func_name": "sub_4123CD", "query": "\n\n\n__int64 __fastcall sub_4123CD(__int64 a1)\n{\n__int64 v1; // r15\n__int64 v2; // r14\n__int64 v3; // r13\n__int64 v4; // r12\n__int64 v5; // rbx\nvoid *v6; // rax\nchar v8[3]; // [rsp+10h] [rbp-50h] BYREF\n_BYTE v9[5]; // [rsp+13h] [rbp-4Dh] BYREF\n\nv1 = *(unsigned __int16 *)(a1 + 90);\nv2 = *(unsigned __int16 *)(a1 + 86);\nv3 = *(unsigned __int16 *)(a1 + 12);\nv4 = *(unsigned __int16 *)(a1 + 94);\nv5 = *(unsigned __int16 *)(a1 + 72);\nv6 = sub_407307(a1 + 74);\nsub_40FA98(\n1,\n(__int64)\"%s.%u: L2CAP_EVENT_LE_INCOMING_CONNECTION addr_type %u, addr %s handle 0x%x psm 0x%x local_cid 0x%x remote_\"\n\"cid 0x%x, remote_mtu %u\",\n(__int64)\"l2cap.c\",\n3903LL,\n*(unsigned int *)(a1 + 80),\n(__int64)v6,\nv5,\nv4,\nv3,\nv2,\nv1);\nv8[0] = 121;\nv8[1] = 17;\nv8[2] = *(_DWORD *)(a1 + 80);\nsub_406E19(a1 + 74, (__int64)v9);\nsub_406911((__int64)v8, 9u, *(_WORD *)(a1 + 72));\nsub_406911((__int64)v8, 0xBu, *(_WORD *)(a1 + 94));\nsub_406911((__int64)v8, 0xDu, *(_WORD *)(a1 + 12));\nsub_406911((__int64)v8, 0xFu, *(_WORD *)(a1 + 86));\nsub_406911((__int64)v8, 0x11u, *(_WORD *)(a1 + 90));\nsub_40F9EC(4u, 0, (__int64)v8, 0x13u);\nreturn sub_41016A(a1, 4u, (__int64)v8, 0x13u);\n}\n\n\n\nQ:[a1,v8,sub_4123CD,sub_407307,sub_40FA98,sub_406E19,sub_406911,sub_40F9EC,sub_41016A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'channel', 'v8': 'event', 'sub_4123CD': 'l2cap_emit_le_incoming_connection', 'sub_407307': 'bd_addr_to_str', 'sub_40FA98': 'hci_dump_log', 'sub_406E19': 'reverse_bd_addr', 'sub_406911': 'little_endian_store_16', 'sub_40F9EC': 'hci_dump_packet', 'sub_41016A': 'l2cap_dispatch_to_channel'}"}
git_deflate_init
611b62833287f643aa97da297228b42f05e50f52ab2a7e4bb1410b4be55ce0da
DQNEO
minigit
NA
void git_deflate_init(git_zstream *strm, int level) { int status; zlib_pre_call(strm); status = deflateInit(&strm->z, level); zlib_post_call(strm); if (status == Z_OK) return; printf("deflateInit: %s (%s)", zerr_to_string(status), strm->z.msg ? strm->z.msg : "no message"); exit(1); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402C17", "function_addr": 4205591, "binary_name": "611b62833287f643aa97da297228b42f05e50f52ab2a7e4bb1410b4be55ce0da.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_2C], esi"], [6, "mov rax, [rbp+var_28]"], [7, "mov rdi, rax"], [8, "call sub_402A16"], [9, "mov rax, [rbp+var_28]"], [10, "mov esi, [rbp+var_2C]"], [11, "mov ecx, 70h "], [12, "mov edx, offset a1211"], [13, "mov rdi, rax"], [14, "call _deflateInit_"], [15, "mov [rbp+var_14], eax"], [16, "mov rax, [rbp+var_28]"], [17, "mov rdi, rax"], [18, "call sub_402A9E"], [19, "cmp [rbp+var_14], 0"], [20, "jz short loc_402CA6"], [21, "mov rax, [rbp+var_28]"], [22, "mov rax, [rax+30h]"], [23, "test rax, rax"], [24, "jz short loc_402C78"], [25, "mov rax, [rbp+var_28]"], [26, "mov rbx, [rax+30h]"], [27, "jmp short loc_402C7D"], [28, "mov ebx, offset aNoMessage"], [29, "mov eax, [rbp+var_14]"], [30, "mov edi, eax"], [31, "call sub_402BCF"], [32, "mov rdx, rbx"], [33, "mov rsi, rax"], [34, "mov edi, offset aDeflateinitSS"], [35, "mov eax, 0"], [36, "call _printf"], [37, "mov edi, 1"], [38, "call _exit"], [39, "nop"], [40, "mov rbx, [rbp+var_8]"], [41, "leave"], [42, "retn"]], "data_dep": [[6, 4], [7, 6], [9, 4], [10, 5], [13, 9], [15, 14], [16, 4], [17, 16], [19, 15], [20, 19], [21, 4], [22, 21], [23, 22], [24, 23], [25, 4], [26, 25], [29, 15], [30, 29], [32, 26], [32, 28], [33, 31], [42, 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/611b62833287f643aa97da297228b42f05e50f52ab2a7e4bb1410b4be55ce0da_611b62833287f643aa97da297228b42f05e50f52ab2a7e4bb1410b4be55ce0da.jsonl.gz", "strip_func_name": "sub_402C17", "query": "\n\n\n_QWORD *__fastcall sub_402C17(_QWORD *a1)\n{\n_QWORD *result; // rax\nconst char *v2; // rbx\nconst char *v3; // rax\nint v4; // [rsp+1Ch] [rbp-14h]\n\nsub_402A16((__int64)a1);\nv4 = deflateInit_();\nresult = sub_402A9E(a1);\nif ( v4 )\n{\nif ( a1[6] )\nv2 = (const char *)a1[6];\nelse\nv2 = \"no message\";\nv3 = sub_402BCF(v4);\nprintf(\"deflateInit: %s (%s)\", v3, v2);\nexit(1);\n}\nreturn result;\n}\n\n\n\nQ:[a1,v4,sub_402C17,sub_402A16,sub_402A9E,sub_402BCF,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'strm', 'v4': 'status', 'sub_402C17': 'git_deflate_init', 'sub_402A16': 'zlib_pre_call', 'sub_402A9E': 'zlib_post_call', 'sub_402BCF': 'zerr_to_string'}"}
mesh_configuration_client_send_netkey_get
0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb
bluekitchen
btstack
NA
uint8_t mesh_configuration_client_send_netkey_get(mesh_model_t * mesh_model, uint16_t dest, uint16_t netkey_index, uint16_t appkey_index){ uint8_t status = mesh_access_validate_envelop_params(mesh_model, dest, netkey_index, appkey_index); if (status != ERROR_CODE_SUCCESS) return status; mesh_upper_transport_pdu_t * transport_pdu = mesh_access_setup_message(&mesh_configuration_client_netkey_get); if (!transport_pdu) return BTSTACK_MEMORY_ALLOC_FAILED; mesh_configuration_client_send_acknowledged(mesh_access_get_element_address(mesh_model), dest, netkey_index, appkey_index, (mesh_pdu_t *) transport_pdu, MESH_FOUNDATION_OPERATION_NETKEY_LIST); return ERROR_CODE_SUCCESS; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43C59D", "function_addr": 4441501, "binary_name": "0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r13"], [3, "push r12"], [4, "push rbx"], [5, "sub rsp, 38h"], [6, "mov [rbp+var_38], rdi"], [7, "mov eax, ecx"], [8, "mov ecx, esi"], [9, "mov [rbp+var_3C], cx"], [10, "mov [rbp+var_40], dx"], [11, "mov [rbp+var_44], ax"], [12, "movzx ecx, [rbp+var_44]"], [13, "movzx edx, [rbp+var_40]"], [14, "movzx esi, [rbp+var_3C]"], [15, "mov rax, [rbp+var_38]"], [16, "mov rdi, rax"], [17, "call sub_43B19D"], [18, "mov [rbp+var_21], al"], [19, "cmp [rbp+var_21], 0"], [20, "jz short loc_43C5E5"], [21, "movzx eax, [rbp+var_21]"], [22, "jmp short loc_43C644"], [23, "mov edi, offset unk_46A9E0"], [24, "mov eax, 0"], [25, "call sub_439DF7"], [26, "mov [rbp+var_30], rax"], [27, "cmp [rbp+var_30], 0"], [28, "jnz short loc_43C606"], [29, "mov eax, 56h "], [30, "jmp short loc_43C644"], [31, "movzx r13d, [rbp+var_44]"], [32, "movzx r12d, [rbp+var_40]"], [33, "movzx ebx, [rbp+var_3C]"], [34, "mov rax, [rbp+var_38]"], [35, "mov rdi, rax"], [36, "call sub_44D161"], [37, "movzx eax, ax"], [38, "mov rdx, [rbp+var_30]"], [39, "mov r9d, 8043h"], [40, "mov r8, rdx"], [41, "mov ecx, r13d"], [42, "mov edx, r12d"], [43, "mov esi, ebx"], [44, "mov edi, eax"], [45, "call sub_43B122"], [46, "mov eax, 0"], [47, "add rsp, 38h"], [48, "pop rbx"], [49, "pop r12"], [50, "pop r13"], [51, "pop rbp"], [52, "retn"]], "data_dep": [[9, 8], [11, 7], [12, 11], [13, 10], [14, 9], [15, 6], [16, 15], [18, 17], [19, 18], [20, 19], [21, 18], [26, 25], [27, 26], [28, 27], [31, 11], [32, 10], [33, 9], [34, 6], [35, 34], [37, 36], [38, 26], [40, 38], [41, 31], [42, 32], [43, 33], [44, 37], [47, 5], [48, 4], [49, 3], [50, 2], [51, 0], [52, 46], [52, 21], [52, 29]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n 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_43C59D", "query": "\n\n\n__int64 __fastcall sub_43C59D(__int64 a1, unsigned __int16 a2, unsigned __int16 a3, unsigned __int16 a4)\n{\n__int64 v4; // rdx\n__int64 v5; // rcx\n__int64 v6; // r8\n__int64 v7; // r9\nunsigned __int16 v9; // ax\n__int64 v12; // [rsp+20h] [rbp-30h]\nunsigned __int8 v13; // [rsp+2Fh] [rbp-21h]\n\nv13 = sub_43B19D(a1);\nif ( v13 )\nreturn v13;\nv12 = sub_439DF7((__int64)&unk_46A9E0, a2, v4, v5, v6, v7);\nif ( !v12 )\nreturn 86LL;\nv9 = sub_44D161(a1);\nsub_43B122(v9, a2, a3, a4, v12, 32835);\nreturn 0LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,v4,v5,v12,v13,sub_43C59D,sub_43B19D,sub_439DF7,sub_44D161,sub_43B122,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'netkey_index', 'a4': 'appkey_index', 'a1': 'mesh_model', 'a2': 'dest', 'v4': 'netkey_index', 'v5': 'appkey_index', 'v12': 'transport_pdu', 'v13': 'status', 'sub_43C59D': 'mesh_configuration_client_send_netkey_get', 'sub_43B19D': 'mesh_access_validate_envelop_params', 'sub_439DF7': 'mesh_access_setup_message', 'sub_44D161': 'mesh_access_get_element_address', 'sub_43B122': 'mesh_configuration_client_send_acknowledged'}"}
pj_utoa
cf1695820213fbf6b72d0a2a2c8f7406ba3da1515cfec93bb0899b8d9d8f038e
AonCyberLabs
D-Modem
NA
PJ_DEF(int) pj_utoa(unsigned long val, char *buf) { return pj_utoa_pad(val, buf, 0, 0); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_472A8C", "function_addr": 4663948, "binary_name": "cf1695820213fbf6b72d0a2a2c8f7406ba3da1515cfec93bb0899b8d9d8f038e.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 ecx, 0"], [8, "mov edx, 0"], [9, "mov rdi, rax"], [10, "call sub_472AB8"], [11, "leave"], [12, "retn"]], "data_dep": [[5, 4], [6, 3], [9, 6], [12, 10]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/cf1695820213fbf6b72d0a2a2c8f7406ba3da1515cfec93bb0899b8d9d8f038e_cf1695820213fbf6b72d0a2a2c8f7406ba3da1515cfec93bb0899b8d9d8f038e.jsonl.gz", "strip_func_name": "sub_472A8C", "query": "\n\n\n__int64 __fastcall sub_472A8C(__int64 a1, __int64 a2)\n{\nreturn sub_472AB8(a1, a2, 0LL, 0LL);\n}\n\n\n\nQ:[a1,a2,sub_472A8C,sub_472AB8,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'val', 'a2': 'buf', 'sub_472A8C': 'pj_utoa', 'sub_472AB8': 'pj_utoa_pad'}"}
parse_cmd_args
4e02c210a92d3aa51a05826962aa773b53ed005549eea888254e616dd3ae7491
facebook
openbmc-linux
NA
static void parse_cmd_args(int argc, int start, char **argv) { int opt; int option_index; static struct option long_options[] = { { "bucket", required_argument, 0, 'b' }, { "level", required_argument, 0, 'l' }, { "online", required_argument, 0, 'o' }, { "trl-type", required_argument, 0, 'r' }, { "trl", required_argument, 0, 't' }, { "help", no_argument, 0, 'h' }, { "clos", required_argument, 0, 'c' }, { "desired", required_argument, 0, 'd' }, { "epp", required_argument, 0, 'e' }, { "min", required_argument, 0, 'n' }, { "max", required_argument, 0, 'm' }, { "priority", required_argument, 0, 'p' }, { "weight", required_argument, 0, 'w' }, { "auto", no_argument, 0, 'a' }, { 0, 0, 0, 0 } }; option_index = start; optind = start + 1; while ((opt = getopt_long(argc, argv, "b:l:t:c:d:e:n:m:p:w:hoa", long_options, &option_index)) != -1) { switch (opt) { case 'a': auto_mode = 1; break; case 'b': fact_bucket = atoi(optarg); break; case 'h': cmd_help = 1; break; case 'l': tdp_level = atoi(optarg); break; case 'o': force_online_offline = 1; break; case 't': sscanf(optarg, "0x%llx", &fact_trl); break; case 'r': if (!strncmp(optarg, "sse", 3)) { fact_avx = 0x01; } else if (!strncmp(optarg, "avx2", 4)) { fact_avx = 0x02; } else if (!strncmp(optarg, "avx512", 4)) { fact_avx = 0x04; } else { fprintf(outf, "Invalid sse,avx options\n"); exit(1); } break; /* CLOS related */ case 'c': current_clos = atoi(optarg); break; case 'd': clos_desired = atoi(optarg); clos_desired /= DISP_FREQ_MULTIPLIER; break; case 'e': clos_epp = atoi(optarg); break; case 'n': clos_min = atoi(optarg); clos_min /= DISP_FREQ_MULTIPLIER; break; case 'm': clos_max = atoi(optarg); clos_max /= DISP_FREQ_MULTIPLIER; break; case 'p': clos_priority_type = atoi(optarg); break; case 'w': clos_prop_prio = atoi(optarg); break; default: printf("no match\n"); } } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_406121", "function_addr": 4219169, "binary_name": "4e02c210a92d3aa51a05826962aa773b53ed005549eea888254e616dd3ae7491.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+argc], edi"], [4, "mov [rbp+var_18], esi"], [5, "mov [rbp+argv], rdx"], [6, "mov eax, [rbp+var_18]"], [7, "mov [rbp+longind], eax"], [8, "mov eax, [rbp+var_18]"], [9, "add eax, 1"], [10, "mov cs:optind, eax"], [11, "jmp loc_4063BB"], [12, "mov eax, [rbp+var_4]"], [13, "sub eax, 61h "], [14, "cmp eax, 16h"], [15, "ja def_406163"], [16, "mov eax, eax"], [17, "mov rax, ds:jpt_406163[rax*8]"], [18, "jmp rax"], [19, "mov cs:dword_4132DC, 1"], [20, "jmp loc_4063BB"], [21, "mov rax, cs:optarg"], [22, "mov rdi, rax"], [23, "call _atoi"], [24, "mov cs:dword_4121AC, eax"], [25, "jmp loc_4063BB"], [26, "mov cs:dword_4132D4, 1"], [27, "jmp loc_4063BB"], [28, "mov rax, cs:optarg"], [29, "mov rdi, rax"], [30, "call _atoi"], [31, "mov cs:dword_4121A8, eax"], [32, "jmp loc_4063BB"], [33, "mov cs:dword_4132D8, 1"], [34, "jmp loc_4063BB"], [35, "mov rax, cs:optarg"], [36, "mov edx, offset qword_4132C8"], [37, "mov esi, offset a0xLlx"], [38, "mov rdi, rax"], [39, "mov eax, 0"], [40, "call _sscanf"], [41, "jmp loc_4063BB"], [42, "mov rax, cs:optarg"], [43, "mov edx, 3"], [44, "mov esi, offset s2"], [45, "mov rdi, rax"], [46, "call _strncmp"], [47, "test eax, eax"], [48, "jnz short loc_406215"], [49, "mov cs:dword_4121B0, 1"], [50, "jmp loc_4063BB"], [51, "mov rax, cs:optarg"], [52, "mov edx, 4"], [53, "mov esi, offset aAvx2"], [54, "mov rdi, rax"], [55, "call _strncmp"], [56, "test eax, eax"], [57, "jnz short loc_406241"], [58, "mov cs:dword_4121B0, 2"], [59, "jmp loc_4063BB"], [60, "mov rax, cs:optarg"], [61, "mov edx, 4"], [62, "mov esi, offset aAvx512"], [63, "mov rdi, rax"], [64, "call _strncmp"], [65, "test eax, eax"], [66, "jnz short loc_40626D"], [67, "mov cs:dword_4121B0, 4"], [68, "jmp loc_4063BB"], [69, "mov rax, cs:stream"], [70, "mov rcx, rax"], [71, "mov edx, 18h"], [72, "mov esi, 1"], [73, "mov edi, offset aInvalidSseAvxO"], [74, "call _fwrite"], [75, "mov edi, 1"], [76, "call _exit"], [77, "mov rax, cs:optarg"], [78, "mov rdi, rax"], [79, "call _atoi"], [80, "mov cs:dword_4121B4, eax"], [81, "jmp loc_4063BB"], [82, "mov rax, cs:optarg"], [83, "mov rdi, rax"], [84, "call _atoi"], [85, "mov cs:dword_4121C8, eax"], [86, "mov eax, cs:dword_4121C8"], [87, "movsxd rdx, eax"], [88, "imul rdx, 51EB851Fh"], [89, "shr rdx, 20h"], [90, "sar edx, 5"], [91, "sar eax, 1Fh"], [92, "mov ecx, eax"], [93, "mov eax, edx"], [94, "sub eax, ecx"], [95, "mov cs:dword_4121C8, eax"], [96, "jmp loc_4063BB"], [97, "mov rax, cs:optarg"], [98, "mov rdi, rax"], [99, "call _atoi"], [100, "mov cs:dword_4121B8, eax"], [101, "jmp loc_4063BB"], [102, "mov rax, cs:optarg"], [103, "mov rdi, rax"], [104, "call _atoi"], [105, "mov cs:dword_4121C0, eax"], [106, "mov eax, cs:dword_4121C0"], [107, "movsxd rdx, eax"], [108, "imul rdx, 51EB851Fh"], [109, "shr rdx, 20h"], [110, "sar edx, 5"], [111, "sar eax, 1Fh"], [112, "mov ecx, eax"], [113, "mov eax, edx"], [114, "sub eax, ecx"], [115, "mov cs:dword_4121C0, eax"], [116, "jmp short loc_4063BB"], [117, "mov rax, cs:optarg"], [118, "mov rdi, rax"], [119, "call _atoi"], [120, "mov cs:dword_4121C4, eax"], [121, "mov eax, cs:dword_4121C4"], [122, "movsxd rdx, eax"], [123, "imul rdx, 51EB851Fh"], [124, "shr rdx, 20h"], [125, "sar edx, 5"], [126, "sar eax, 1Fh"], [127, "mov ecx, eax"], [128, "mov eax, edx"], [129, "sub eax, ecx"], [130, "mov cs:dword_4121C4, eax"], [131, "jmp short loc_4063BB"], [132, "mov rax, cs:optarg"], [133, "mov rdi, rax"], [134, "call _atoi"], [135, "mov cs:dword_4132E0, eax"], [136, "jmp short loc_4063BB"], [137, "mov rax, cs:optarg"], [138, "mov rdi, rax"], [139, "call _atoi"], [140, "mov cs:dword_4121BC, eax"], [141, "jmp short loc_4063BB"], [142, "mov edi, offset aNoMatch"], [143, "call _puts"], [144, "lea rdx, [rbp+longind]"], [145, "mov rsi, [rbp+argv]"], [146, "mov eax, [rbp+argc]"], [147, "mov r8, rdx"], [148, "mov ecx, offset longopts"], [149, "mov edx, offset shortopts"], [150, "mov edi, eax"], [151, "call _getopt_long"], [152, "mov [rbp+var_4], eax"], [153, "cmp [rbp+var_4], 0FFFFFFFFh"], [154, "jnz loc_40614A"], [155, "nop"], [156, "nop"], [157, "leave"], [158, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 4], [9, 8], [10, 9], [12, 152], [13, 12], [14, 13], [15, 14], [16, 13], [18, 17], [22, 21], [24, 23], [29, 28], [31, 30], [38, 35], [45, 42], [47, 46], [48, 47], [54, 51], [56, 55], [57, 56], [63, 60], [65, 64], [66, 65], [70, 69], [78, 77], [80, 79], [83, 82], [85, 84], [86, 85], [87, 86], [88, 87], [89, 88], [90, 89], [91, 86], [92, 91], [93, 90], [94, 93], [94, 92], [95, 94], [98, 97], [100, 99], [103, 102], [105, 104], [106, 105], [107, 106], [108, 107], [109, 108], [110, 109], [111, 106], [112, 111], [113, 110], [114, 113], [114, 112], [115, 114], [118, 117], [120, 119], [121, 120], [122, 121], [123, 122], [124, 123], [125, 124], [126, 121], [127, 126], [128, 125], [129, 128], [129, 127], [130, 129], [133, 132], [135, 134], [138, 137], [140, 139], [144, 52], [144, 61], [144, 125], [144, 90], [144, 110], [144, 149], [144, 7], [144, 43], [144, 36], [145, 5], [146, 3], [147, 144], [150, 146], [152, 151], [153, 152], [154, 153], [158, 151]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/4e02c210a92d3aa51a05826962aa773b53ed005549eea888254e616dd3ae7491_4e02c210a92d3aa51a05826962aa773b53ed005549eea888254e616dd3ae7491.jsonl.gz", "strip_func_name": "sub_406121", "query": "\n\n\nint __fastcall sub_406121(int a1, int a2, char *const *a3)\n{\nint result; // eax\nint longind; // [rsp+18h] [rbp-8h] BYREF\nint v6; // [rsp+1Ch] [rbp-4h]\n\nlongind = a2;\noptind = a2 + 1;\nfor ( result = getopt_long(a1, a3, \"b:l:t:c:d:e:n:m:p:w:hoa\", &longopts, &longind);\n;\nresult = getopt_long(a1, a3, \"b:l:t:c:d:e:n:m:p:w:hoa\", &longopts, &longind) )\n{\nv6 = result;\nif ( result == -1 )\nbreak;\nswitch ( v6 )\n{\ncase 'a':\ndword_4132DC = 1;\nbreak;\ncase 'b':\ndword_4121AC = atoi(optarg);\nbreak;\ncase 'c':\ndword_4121B4 = atoi(optarg);\nbreak;\ncase 'd':\ndword_4121C8 = atoi(optarg) / 100;\nbreak;\ncase 'e':\ndword_4121B8 = atoi(optarg);\nbreak;\ncase 'h':\ndword_4132D4 = 1;\nbreak;\ncase 'l':\ndword_4121A8 = atoi(optarg);\nbreak;\ncase 'm':\ndword_4121C4 = atoi(optarg) / 100;\nbreak;\ncase 'n':\ndword_4121C0 = atoi(optarg) / 100;\nbreak;\ncase 'o':\ndword_4132D8 = 1;\nbreak;\ncase 'p':\ndword_4132E0 = atoi(optarg);\nbreak;\ncase 'r':\nif ( !strncmp(optarg, \"sse\", 3uLL) )\n{\ndword_4121B0 = 1;\n}\nelse if ( !strncmp(optarg, \"avx2\", 4uLL) )\n{\ndword_4121B0 = 2;\n}\nelse\n{\nif ( strncmp(optarg, \"avx512\", 4uLL) )\n{\nfwrite(\"Invalid sse,avx options\\n\", 1uLL, 0x18uLL, stream);\nexit(1);\n}\ndword_4121B0 = 4;\n}\nbreak;\ncase 't':\nsscanf(optarg, \"0x%llx\", &qword_4132C8);\nbreak;\ncase 'w':\ndword_4121BC = atoi(optarg);\nbreak;\ndefault:\nputs(\"no match\");\nbreak;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,longind,v6,sub_406121,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'argv', 'a1': 'argc', 'a2': 'start', 'longind': 'option_index', 'v6': 'opt', 'sub_406121': 'parse_cmd_args'}"}
librg_world_fetch_owner
0f7f2ab4fbbb552f86f86cfbda89b7ab7131d5d095d0a4e8926952f998a7f93a
zpl-c
librg
NA
int32_t librg_world_fetch_owner(librg_world *world, int64_t owner_id, int64_t *entity_ids, size_t *entity_amount) { int64_t owner_ids[1]; owner_ids[0] = owner_id; return librg_world_fetch_ownerarray(world, owner_ids, 1, entity_ids, entity_amount); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41BF8F", "function_addr": 4308879, "binary_name": "0f7f2ab4fbbb552f86f86cfbda89b7ab7131d5d095d0a4e8926952f998a7f93a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "mov [rbp+var_30], rcx"], [7, "mov rax, [rbp+var_20]"], [8, "mov [rbp+var_8], rax"], [9, "mov rcx, [rbp+var_30]"], [10, "mov rdx, [rbp+var_28]"], [11, "lea rsi, [rbp+var_8]"], [12, "mov rax, [rbp+var_18]"], [13, "mov r8, rcx"], [14, "mov rcx, rdx"], [15, "mov edx, 1"], [16, "mov rdi, rax"], [17, "call sub_41BFD4"], [18, "leave"], [19, "retn"]], "data_dep": [[7, 4], [8, 7], [9, 6], [10, 5], [11, 8], [12, 3], [13, 9], [14, 10], [16, 12], [19, 17]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/0f7f2ab4fbbb552f86f86cfbda89b7ab7131d5d095d0a4e8926952f998a7f93a_0f7f2ab4fbbb552f86f86cfbda89b7ab7131d5d095d0a4e8926952f998a7f93a.jsonl.gz", "strip_func_name": "sub_41BF8F", "query": "\n\n\n__int64 __fastcall sub_41BF8F(__int64 a1, __int64 a2, __int64 a3, __int64 a4)\n{\n__int64 v5; // [rsp+28h] [rbp-8h] BYREF\n\nv5 = a2;\nreturn sub_41BFD4(a1, &v5, 1LL, a3, a4);\n}\n\n\n\nQ:[a3,a4,a1,a2,v5,sub_41BF8F,sub_41BFD4,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'entity_ids', 'a4': 'entity_amount', 'a1': 'world', 'a2': 'owner_id', 'v5': 'owner_ids', 'sub_41BF8F': 'librg_world_fetch_owner', 'sub_41BFD4': 'librg_world_fetch_ownerarray'}"}
glColor4f
1d2464e15ddd3dd6b5b5796f52af69985739bec93ed2d4b96db23109c584a00d
C-Chads
tinygl
NA
void glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a) { GLParam p[8]; #include "error_check_no_context.h" p[0].op = OP_Color; p[1].f = r; p[2].f = g; p[3].f = b; p[4].f = a; p[5].ui = (((GLuint)(r * COLOR_CORRECTED_MULT_MASK) + COLOR_MIN_MULT) & COLOR_MASK); p[6].ui = (((GLuint)(g * COLOR_CORRECTED_MULT_MASK) + COLOR_MIN_MULT) & COLOR_MASK); p[7].ui = (((GLuint)(b * COLOR_CORRECTED_MULT_MASK) + COLOR_MIN_MULT) & COLOR_MASK); gl_add_op(p); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41FE0C", "function_addr": 4324876, "binary_name": "1d2464e15ddd3dd6b5b5796f52af69985739bec93ed2d4b96db23109c584a00d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "movss [rbp+var_44], xmm0"], [4, "movss [rbp+var_48], xmm1"], [5, "movss [rbp+var_4C], xmm2"], [6, "movss [rbp+var_50], xmm3"], [7, "mov [rbp+var_40], 0"], [8, "movss xmm0, [rbp+var_44]"], [9, "movss [rbp+var_38], xmm0"], [10, "movss xmm0, [rbp+var_48]"], [11, "movss [rbp+var_30], xmm0"], [12, "movss xmm0, [rbp+var_4C]"], [13, "movss [rbp+var_28], xmm0"], [14, "movss xmm0, [rbp+var_50]"], [15, "movss [rbp+var_20], xmm0"], [16, "movss xmm1, [rbp+var_44]"], [17, "movss xmm0, cs:dword_43F210"], [18, "mulss xmm0, xmm1"], [19, "cvttss2si rax, xmm0"], [20, "add eax, 0FFFFh"], [21, "and eax, 0FFFFFFh"], [22, "mov [rbp+var_18], eax"], [23, "movss xmm1, [rbp+var_48]"], [24, "movss xmm0, cs:dword_43F210"], [25, "mulss xmm0, xmm1"], [26, "cvttss2si rax, xmm0"], [27, "add eax, 0FFFFh"], [28, "and eax, 0FFFFFFh"], [29, "mov [rbp+var_10], eax"], [30, "movss xmm1, [rbp+var_4C]"], [31, "movss xmm0, cs:dword_43F210"], [32, "mulss xmm0, xmm1"], [33, "cvttss2si rax, xmm0"], [34, "add eax, 0FFFFh"], [35, "and eax, 0FFFFFFh"], [36, "mov [rbp+var_8], eax"], [37, "lea rax, [rbp+var_40]"], [38, "mov rdi, rax"], [39, "call sub_41F8C5"], [40, "nop"], [41, "leave"], [42, "retn"]], "data_dep": [[8, 3], [9, 8], [10, 4], [11, 10], [12, 5], [13, 12], [14, 6], [15, 14], [16, 3], [18, 17], [18, 16], [19, 18], [20, 19], [21, 20], [22, 21], [23, 4], [25, 23], [25, 24], [26, 21], [26, 25], [27, 26], [28, 27], [29, 28], [30, 5], [32, 31], [32, 30], [33, 32], [33, 28], [34, 33], [35, 34], [36, 35], [37, 35], [37, 7], [38, 37], [42, 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/1d2464e15ddd3dd6b5b5796f52af69985739bec93ed2d4b96db23109c584a00d_1d2464e15ddd3dd6b5b5796f52af69985739bec93ed2d4b96db23109c584a00d.jsonl.gz", "strip_func_name": "sub_41FE0C", "query": "\n\n\n__int64 __fastcall sub_41FE0C(float a1, float a2, float a3, float a4)\n{\nint v5[16]; // [rsp+10h] [rbp-40h] BYREF\n\nv5[0] = 0;\n*(float *)&v5[2] = a1;\n*(float *)&v5[4] = a2;\n*(float *)&v5[6] = a3;\n*(float *)&v5[8] = a4;\nv5[10] = ((int)(float)(16646144.0 * a1) + 0xFFFF) & 0xFFFFFF;\nv5[12] = ((int)(float)(16646144.0 * a2) + 0xFFFF) & 0xFFFFFF;\nv5[14] = ((int)(float)(16646144.0 * a3) + 0xFFFF) & 0xFFFFFF;\nreturn sub_41F8C5(v5);\n}\n\n\n\nQ:[a1,a2,a3,a4,v5,sub_41FE0C,sub_41F8C5,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'r', 'a2': 'g', 'a3': 'b', 'a4': 'a', 'v5': 'p', 'sub_41FE0C': 'glColor4f', 'sub_41F8C5': 'gl_add_op'}"}
sklil_load_phasor
c823bc55dc70527885c4a32fe372a4cbad8e31b982c6ff4cec767270fd7e72f1
PaulBatchelor
sndkit
NA
void sklil_load_phasor(lil_t lil) { lil_register(lil, "phasor", phasor); lil_register(lil, "tphasor", tphasor); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_420360", "function_addr": 4326240, "binary_name": "c823bc55dc70527885c4a32fe372a4cbad8e31b982c6ff4cec767270fd7e72f1.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 edx, offset sub_420228"], [6, "mov esi, offset aPhasor"], [7, "mov rdi, rax"], [8, "call sub_43F2C3"], [9, "mov rax, [rbp+var_8]"], [10, "mov edx, offset sub_4202B7"], [11, "mov esi, offset aTphasor"], [12, "mov rdi, rax"], [13, "call sub_43F2C3"], [14, "nop"], [15, "leave"], [16, "retn"]], "data_dep": [[4, 3], [7, 4], [9, 3], [12, 9], [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/c823bc55dc70527885c4a32fe372a4cbad8e31b982c6ff4cec767270fd7e72f1_c823bc55dc70527885c4a32fe372a4cbad8e31b982c6ff4cec767270fd7e72f1.jsonl.gz", "strip_func_name": "sub_420360", "query": "\n\n\n__int64 __fastcall sub_420360(__int64 a1)\n{\nsub_43F2C3(a1, \"phasor\", sub_420228);\nreturn sub_43F2C3(a1, \"tphasor\", sub_4202B7);\n}\n\n\n\nQ:[a1,sub_420360,sub_43F2C3,sub_420228,sub_4202B7,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'lil', 'sub_420360': 'sklil_load_phasor', 'sub_43F2C3': 'lil_register', 'sub_420228': 'phasor_0', 'sub_4202B7': 'tphasor'}"}
print_location
98a2af28e7202aebba238479169a539ac4ea55b45d9c92f817e3a94d58cbcdaf
alibaba
LVS
NA
static void print_location(void) { fprintf(stderr, "%s:%d: ", cur_filename ? : "<stdin>", cur_line); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402B73", "function_addr": 4205427, "binary_name": "98a2af28e7202aebba238479169a539ac4ea55b45d9c92f817e3a94d58cbcdaf.elf_extract.pkl\n"}, "code": [[0, "sub rsp, 8"], [1, "mov edx, cs:dword_40F120"], [2, "mov rax, cs:qword_40F1A0"], [3, "test rax, rax"], [4, "jnz short loc_402B8E"], [5, "mov eax, offset aStdin_0"], [6, "mov rdi, cs:stderr"], [7, "mov ecx, edx"], [8, "mov rdx, rax"], [9, "mov esi, offset aSD"], [10, "mov eax, 0"], [11, "call _fprintf"], [12, "nop"], [13, "add rsp, 8"], [14, "retn"]], "data_dep": [[3, 2], [4, 3], [7, 1], [8, 3], [8, 5], [13, 0], [14, 11]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/98a2af28e7202aebba238479169a539ac4ea55b45d9c92f817e3a94d58cbcdaf_98a2af28e7202aebba238479169a539ac4ea55b45d9c92f817e3a94d58cbcdaf.jsonl.gz", "strip_func_name": "sub_402B73", "query": "\n\n\nint sub_402B73()\n{\nconst char *v0; // rax\n\nv0 = (const char *)qword_40F1A0;\nif ( !qword_40F1A0 )\nv0 = \"<stdin>\";\nreturn fprintf(stderr, \"%s:%d: \", v0, (unsigned int)dword_40F120);\n}\n\n\n\nQ:[sub_402B73,]\nAssistant: ", "hints": "[]", "response": "{'sub_402B73': 'print_location'}"}
flt_read1
26916d295d517d96239e48633e8216157d63bd67fcbb128b4a262266a4d9f059
lh3
bgt
NA
static inline int flt_read1(htsFile *in, const bcf_hdr_t *h, bcf1_t *b, int keep_flt) { int ret; for (;;) { if ((ret = vcf_read1(in, h, b)) < 0) break; if (keep_flt || !bcf_is_filtered(b)) break; } return ret; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4192E7", "function_addr": 4297447, "binary_name": "26916d295d517d96239e48633e8216157d63bd67fcbb128b4a262266a4d9f059.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_2C], ecx"], [7, "mov rdx, [rbp+var_28]"], [8, "mov rcx, [rbp+var_20]"], [9, "mov rax, [rbp+var_18]"], [10, "mov rsi, rcx"], [11, "mov rdi, rax"], [12, "call sub_414C90"], [13, "mov [rbp+var_4], eax"], [14, "cmp [rbp+var_4], 0"], [15, "js short loc_419336"], [16, "cmp [rbp+var_2C], 0"], [17, "jnz short loc_419337"], [18, "mov rax, [rbp+var_28]"], [19, "mov rdi, rax"], [20, "call sub_4166AC"], [21, "test eax, eax"], [22, "jz short loc_419337"], [23, "jmp short loc_4192FE"], [24, "nop"], [25, "mov eax, [rbp+var_4]"], [26, "leave"], [27, "retn"]], "data_dep": [[7, 5], [8, 4], [9, 3], [10, 8], [11, 9], [13, 12], [14, 13], [15, 14], [16, 6], [17, 16], [18, 5], [19, 18], [21, 20], [22, 21], [25, 13], [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/26916d295d517d96239e48633e8216157d63bd67fcbb128b4a262266a4d9f059_26916d295d517d96239e48633e8216157d63bd67fcbb128b4a262266a4d9f059.jsonl.gz", "strip_func_name": "sub_4192E7", "query": "\n\n\n__int64 __fastcall sub_4192E7(__int64 a1, _QWORD *a2, __int64 a3, int a4)\n{\nint v7; // [rsp+2Ch] [rbp-4h]\n\ndo\nv7 = sub_414C90(a1, a2, a3);\nwhile ( v7 >= 0 && !a4 && sub_4166AC(a3) );\nreturn (unsigned int)v7;\n}\n\n\n\nQ:[a3,a4,a1,a2,sub_4192E7,sub_414C90,sub_4166AC,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'b', 'a4': 'keep_flt', 'a1': 'in', 'a2': 'h', 'sub_4192E7': '_flt_read1', 'sub_414C90': 'vcf_read1', 'sub_4166AC': 'bcf_is_filtered'}"}
mbedtls_debug_printf_ecdh
dd1bb0f93352aea0ff0f7e0a20f97ad9676f10a40a8c4b9354a3f6316a448e84
FreeRTOS
coreMQTT-Agent-Demos
NA
void mbedtls_debug_printf_ecdh( const mbedtls_ssl_context *ssl, int level, const char *file, int line, const mbedtls_ecdh_context *ecdh, mbedtls_debug_ecdh_attr attr ) { #if defined(MBEDTLS_ECDH_LEGACY_CONTEXT) mbedtls_debug_printf_ecdh_internal( ssl, level, file, line, ecdh, attr ); #else switch( ecdh->var ) { default: mbedtls_debug_printf_ecdh_internal( ssl, level, file, line, ecdh, attr ); } #endif }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40448E", "function_addr": 4211854, "binary_name": "dd1bb0f93352aea0ff0f7e0a20f97ad9676f10a40a8c4b9354a3f6316a448e84.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_24], r9d"], [9, "mov r8d, [rbp+var_24]"], [10, "mov rdi, [rbp+var_20]"], [11, "mov ecx, [rbp+var_10]"], [12, "mov rdx, [rbp+var_18]"], [13, "mov esi, [rbp+var_C]"], [14, "mov rax, [rbp+var_8]"], [15, "mov r9d, r8d"], [16, "mov r8, rdi"], [17, "mov rdi, rax"], [18, "call sub_4043BF"], [19, "nop"], [20, "leave"], [21, "retn"]], "data_dep": [[9, 8], [10, 7], [11, 6], [12, 5], [13, 4], [14, 3], [15, 9], [16, 10], [17, 14], [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/dd1bb0f93352aea0ff0f7e0a20f97ad9676f10a40a8c4b9354a3f6316a448e84_dd1bb0f93352aea0ff0f7e0a20f97ad9676f10a40a8c4b9354a3f6316a448e84.jsonl.gz", "strip_func_name": "sub_40448E", "query": "\n\n\nvoid __fastcall sub_40448E(__int64 *a1, unsigned int a2, __int64 a3, unsigned int a4, __int64 a5, unsigned int a6)\n{\nsub_4043BF(a1, a2, a3, a4, a5, a6);\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,sub_40448E,sub_4043BF,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'file', 'a4': 'line', 'a1': 'ssl', 'a2': 'level', 'a5': 'ecdh', 'a6': 'attr', 'sub_40448E': 'mbedtls_debug_printf_ecdh', 'sub_4043BF': 'mbedtls_debug_printf_ecdh_internal'}"}
conj_window
25c5dec96bb3133ec9c32f1c53b06126b3f458e8718b6d0581ace9fa89525fd0
asterisk
pjproject-archive
NA
static void conj_window(spx_word16_t *w, int len) { int i; for (i=0;i<len;i++) { spx_word16_t tmp; #ifdef FIXED_POINT spx_word16_t x = DIV32_16(MULT16_16(32767,i),len); #else spx_word16_t x = DIV32_16(MULT16_16(QCONST16(4.f,13),i),len); #endif int inv=0; if (x<QCONST16(1.f,13)) { } else if (x<QCONST16(2.f,13)) { x=QCONST16(2.f,13)-x; inv=1; } else if (x<QCONST16(3.f,13)) { x=x-QCONST16(2.f,13); inv=1; } else { x=QCONST16(2.f,13)-x+QCONST16(2.f,13); /* 4 - x */ } x = MULT16_16_Q14(QCONST16(1.271903f,14), x); tmp = SQR16_Q15(QCONST16(.5f,15)-MULT16_16_P15(QCONST16(.5f,15),spx_cos_norm(SHL32(EXTEND32(x),2)))); if (inv) tmp=SUB16(Q15_ONE,tmp); w[i]=spx_sqrt(SHL32(EXTEND32(tmp),15)); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_486C1B", "function_addr": 4746267, "binary_name": "25c5dec96bb3133ec9c32f1c53b06126b3f458e8718b6d0581ace9fa89525fd0.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_4], 0"], [6, "jmp loc_486DDA"], [7, "pxor xmm1, xmm1"], [8, "cvtsi2ss xmm1, [rbp+var_4]"], [9, "movss xmm0, cs:dword_4F8DB4"], [10, "mulss xmm0, xmm1"], [11, "pxor xmm1, xmm1"], [12, "cvtsi2ss xmm1, [rbp+var_1C]"], [13, "divss xmm0, xmm1"], [14, "movss [rbp+var_C], xmm0"], [15, "mov [rbp+var_10], 0"], [16, "movss xmm0, cs:dword_4F8DB8"], [17, "comiss xmm0, [rbp+var_C]"], [18, "ja short loc_486CE9"], [19, "movss xmm0, cs:dword_4F8DBC"], [20, "comiss xmm0, [rbp+var_C]"], [21, "jbe short loc_486C9B"], [22, "movss xmm0, cs:dword_4F8DBC"], [23, "subss xmm0, [rbp+var_C]"], [24, "movss [rbp+var_C], xmm0"], [25, "mov [rbp+var_10], 1"], [26, "jmp short loc_486CE9"], [27, "movss xmm0, cs:dword_4F8DC0"], [28, "comiss xmm0, [rbp+var_C]"], [29, "jbe short loc_486CC8"], [30, "movss xmm0, [rbp+var_C]"], [31, "movss xmm1, cs:dword_4F8DBC"], [32, "subss xmm0, xmm1"], [33, "movss [rbp+var_C], xmm0"], [34, "mov [rbp+var_10], 1"], [35, "jmp short loc_486CE9"], [36, "movss xmm0, cs:dword_4F8DBC"], [37, "movaps xmm1, xmm0"], [38, "subss xmm1, [rbp+var_C]"], [39, "movss xmm0, cs:dword_4F8DBC"], [40, "addss xmm0, xmm1"], [41, "movss [rbp+var_C], xmm0"], [42, "movss xmm1, [rbp+var_C]"], [43, "movss xmm0, cs:dword_4F8DC4"], [44, "mulss xmm0, xmm1"], [45, "movss [rbp+var_C], xmm0"], [46, "pxor xmm1, xmm1"], [47, "cvtss2sd xmm1, [rbp+var_C]"], [48, "movsd xmm0, cs:qword_4F8DC8"], [49, "mulsd xmm1, xmm0"], [50, "movq rax, xmm1"], [51, "movq xmm0, rax"], [52, "call _cos"], [53, "movsd xmm1, cs:qword_4F8DD0"], [54, "mulsd xmm1, xmm0"], [55, "movsd xmm0, cs:qword_4F8DD0"], [56, "subsd xmm0, xmm1"], [57, "movsd [rbp+var_28], xmm0"], [58, "pxor xmm1, xmm1"], [59, "cvtss2sd xmm1, [rbp+var_C]"], [60, "movsd xmm0, cs:qword_4F8DC8"], [61, "mulsd xmm1, xmm0"], [62, "movq rax, xmm1"], [63, "movq xmm0, rax"], [64, "call _cos"], [65, "movsd xmm1, cs:qword_4F8DD0"], [66, "mulsd xmm1, xmm0"], [67, "movsd xmm0, cs:qword_4F8DD0"], [68, "subsd xmm0, xmm1"], [69, "mulsd xmm0, [rbp+var_28]"], [70, "cvtsd2ss xmm0, xmm0"], [71, "movss [rbp+var_8], xmm0"], [72, "cmp [rbp+var_10], 0"], [73, "jz short loc_486DA2"], [74, "movss xmm0, cs:dword_4F8DB8"], [75, "subss xmm0, [rbp+var_8]"], [76, "movss [rbp+var_8], xmm0"], [77, "pxor xmm3, xmm3"], [78, "cvtss2sd xmm3, [rbp+var_8]"], [79, "movq rax, xmm3"], [80, "movq xmm0, rax"], [81, "call _sqrt"], [82, "mov eax, [rbp+var_4]"], [83, "cdqe"], [84, "lea rdx, ds:0[rax*4]"], [85, "mov rax, [rbp+var_18]"], [86, "add rax, rdx"], [87, "cvtsd2ss xmm0, xmm0"], [88, "movss dword ptr [rax], xmm0"], [89, "add [rbp+var_4], 1"], [90, "mov eax, [rbp+var_4]"], [91, "cmp eax, [rbp+var_1C]"], [92, "jl loc_486C36"], [93, "nop"], [94, "nop"], [95, "leave"], [96, "retn"]], "data_dep": [[8, 5], [8, 7], [8, 89], [10, 8], [10, 9], [12, 4], [12, 11], [13, 10], [13, 12], [14, 13], [17, 14], [17, 16], [18, 91], [20, 19], [20, 14], [21, 91], [23, 22], [23, 14], [24, 23], [28, 14], [28, 27], [29, 91], [30, 14], [32, 30], [32, 31], [33, 32], [37, 36], [38, 37], [38, 14], [40, 38], [40, 39], [41, 40], [42, 41], [42, 24], [42, 33], [42, 14], [44, 42], [44, 43], [45, 44], [47, 45], [47, 46], [49, 48], [49, 47], [50, 49], [51, 50], [54, 51], [54, 53], [56, 55], [56, 54], [57, 56], [59, 45], [59, 58], [61, 60], [61, 59], [62, 61], [63, 62], [66, 63], [66, 65], [68, 66], [68, 67], [69, 57], [69, 68], [70, 69], [71, 70], [72, 15], [72, 25], [72, 34], [73, 72], [75, 74], [75, 71], [76, 75], [78, 77], [78, 76], [78, 71], [79, 78], [80, 79], [82, 5], [82, 89], [84, 84], [85, 3], [86, 85], [86, 84], [87, 80], [88, 86], [88, 87], [89, 5], [89, 89], [90, 5], [90, 89], [91, 4], [91, 90], [92, 91], [96, 90]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n 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_486C1B", "query": "\n\n\n__int64 __fastcall sub_486C1B(__int64 a1, int a2)\n{\nfloat v2; // xmm0_4\nfloat v3; // xmm0_4\n__int64 result; // rax\ndouble v5; // [rsp+8h] [rbp-28h]\nint v6; // [rsp+20h] [rbp-10h]\nfloat v7; // [rsp+24h] [rbp-Ch]\nfloat v8; // [rsp+24h] [rbp-Ch]\nfloat v9; // [rsp+28h] [rbp-8h]\nint i; // [rsp+2Ch] [rbp-4h]\n\nfor ( i = 0; ; ++i )\n{\nresult = (unsigned int)i;\nif ( i >= a2 )\nbreak;\nv7 = (float)(4.0 * (float)i) / (float)a2;\nv6 = 0;\nif ( v7 >= 1.0 )\n{\nif ( v7 >= 2.0 )\n{\nif ( v7 >= 3.0 )\n{\nv7 = (float)(2.0 - v7) + 2.0;\n}\nelse\n{\nv7 = v7 - 2.0;\nv6 = 1;\n}\n}\nelse\n{\nv7 = 2.0 - v7;\nv6 = 1;\n}\n}\nv8 = 1.271903 * v7;\nv5 = 0.5 - 0.5 * cos(v8 * 1.570796326794897);\nv2 = (0.5 - 0.5 * cos(v8 * 1.570796326794897)) * v5;\nv9 = v2;\nif ( v6 )\nv9 = 1.0 - v2;\nv3 = sqrt(v9);\n*(float *)(4LL * i + a1) = v3;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v6,v8,v9,sub_486C1B,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'w', 'a2': 'len', 'v6': 'inv', 'v8': 'xa', 'v9': 'tmp', 'sub_486C1B': 'conj_window'}"}
grp_lock_acquire
98c1b283e9476c8bb95f42e4df7f4804ca1f7d9923e0f8202de3a9c87c2fc447
asterisk
pjproject-archive
NA
static pj_status_t grp_lock_acquire(LOCK_OBJ *p) { pj_grp_lock_t *glock = (pj_grp_lock_t*)p; grp_lock_item *lck; pj_assert(pj_atomic_get(glock->ref_cnt) > 0); lck = glock->lock_list.next; while (lck != &glock->lock_list) { pj_lock_acquire(lck->lock); lck = lck->next; } grp_lock_set_owner_thread(glock); pj_grp_lock_add_ref(glock); return PJ_SUCCESS; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43A7B3", "function_addr": 4433843, "binary_name": "98c1b283e9476c8bb95f42e4df7f4804ca1f7d9923e0f8202de3a9c87c2fc447.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 [rbp+var_10], rax"], [6, "mov rax, [rbp+var_10]"], [7, "mov rax, [rax+30h]"], [8, "mov rdi, rax"], [9, "call sub_433D43"], [10, "test rax, rax"], [11, "jg short loc_43A7F5"], [12, "mov ecx, offset aGrpLockAcquire"], [13, "mov edx, 11Eh"], [14, "mov esi, offset aSrcPjLockC"], [15, "mov edi, offset aPjAtomicGetGlo"], [16, "call ___assert_fail"], [17, "mov rax, [rbp+var_10]"], [18, "mov rax, [rax+58h]"], [19, "mov [rbp+var_8], rax"], [20, "jmp short loc_43A81F"], [21, "mov rax, [rbp+var_8]"], [22, "mov rax, [rax+18h]"], [23, "mov rdi, rax"], [24, "call sub_43A546"], [25, "mov rax, [rbp+var_8]"], [26, "mov rax, [rax+8]"], [27, "mov [rbp+var_8], rax"], [28, "mov rax, [rbp+var_10]"], [29, "add rax, 50h "], [30, "cmp [rbp+var_8], rax"], [31, "jnz short loc_43A803"], [32, "mov rax, [rbp+var_10]"], [33, "mov rdi, rax"], [34, "call sub_43A6A6"], [35, "mov rax, [rbp+var_10]"], [36, "mov rdi, rax"], [37, "call sub_43AFC5"], [38, "mov eax, 0"], [39, "leave"], [40, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [10, 9], [11, 10], [17, 5], [18, 17], [19, 18], [21, 19], [21, 27], [22, 21], [23, 22], [25, 19], [25, 27], [26, 25], [27, 26], [28, 5], [29, 28], [30, 27], [30, 29], [30, 19], [31, 30], [32, 5], [33, 32], [35, 5], [36, 35], [40, 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/98c1b283e9476c8bb95f42e4df7f4804ca1f7d9923e0f8202de3a9c87c2fc447_98c1b283e9476c8bb95f42e4df7f4804ca1f7d9923e0f8202de3a9c87c2fc447.jsonl.gz", "strip_func_name": "sub_43A7B3", "query": "\n\n\n__int64 __fastcall sub_43A7B3(__int64 a1)\n{\n__int64 i; // [rsp+18h] [rbp-8h]\n\nif ( sub_433D43(*(_QWORD **)(a1 + 48)) <= 0 )\n__assert_fail(\"pj_atomic_get(glock->ref_cnt) > 0\", \"../src/pj/lock.c\", 0x11Eu, \"grp_lock_acquire\");\nfor ( i = *(_QWORD *)(a1 + 88); i != a1 + 80; i = *(_QWORD *)(i + 8) )\nsub_43A546(*(_QWORD *)(i + 24));\nsub_43A6A6(a1);\nsub_43AFC5(a1);\nreturn 0LL;\n}\n\n\n\nQ:[a1,i,sub_43A7B3,sub_433D43,sub_43A546,sub_43A6A6,sub_43AFC5,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'p', 'i': 'lck', 'sub_43A7B3': 'grp_lock_acquire', 'sub_433D43': 'pj_atomic_get', 'sub_43A546': 'pj_lock_acquire', 'sub_43A6A6': 'grp_lock_set_owner_thread', 'sub_43AFC5': 'pj_grp_lock_add_ref'}"}
tpl_fatal
4605bbe0add217d819f93c26a2f4872ab2be39b7d6b3c1ecf7f807766606a3b2
traviscross
freeswitch
NA
static void tpl_fatal(char *fmt, ...) { va_list ap; char exit_msg[100]; va_start(ap,fmt); vsnprintf(exit_msg, 100, fmt, ap); va_end(ap); tpl_hook.oops("%s", exit_msg); exit(-1); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407523", "function_addr": 4224291, "binary_name": "4605bbe0add217d819f93c26a2f4872ab2be39b7d6b3c1ecf7f807766606a3b2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 140h"], [3, "mov [rbp+format], rdi"], [4, "mov [rbp+var_A8], rsi"], [5, "mov [rbp+var_A0], rdx"], [6, "mov [rbp+var_98], rcx"], [7, "mov [rbp+var_90], r8"], [8, "mov [rbp+var_88], r9"], [9, "test al, al"], [10, "jz short loc_40757C"], [11, "movaps [rbp+var_80], xmm0"], [12, "movaps [rbp+var_70], xmm1"], [13, "movaps [rbp+var_60], xmm2"], [14, "movaps [rbp+var_50], xmm3"], [15, "movaps [rbp+var_40], xmm4"], [16, "movaps [rbp+var_30], xmm5"], [17, "movaps [rbp+var_20], xmm6"], [18, "movaps [rbp+var_10], xmm7"], [19, "mov [rbp+arg], 8"], [20, "mov [rbp+var_C4], 30h "], [21, "lea rax, [rbp+arg_0]"], [22, "mov [rbp+var_C0], rax"], [23, "lea rax, [rbp+var_B0]"], [24, "mov [rbp+var_B8], rax"], [25, "lea rcx, [rbp+arg]"], [26, "mov rdx, [rbp+format]"], [27, "lea rax, [rbp+s]"], [28, "mov esi, 64h "], [29, "mov rdi, rax"], [30, "call _vsnprintf"], [31, "mov rdx, cs:off_40C100"], [32, "lea rax, [rbp+s]"], [33, "mov rsi, rax"], [34, "mov edi, offset unk_409CB0"], [35, "mov eax, 0"], [36, "call rdx "], [37, "mov edi, 0FFFFFFFFh"], [38, "call _exit"]], "data_dep": [[10, 9], [21, 9], [22, 21], [23, 21], [24, 23], [25, 19], [26, 3], [27, 23], [29, 27], [32, 30], [33, 32], [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/4605bbe0add217d819f93c26a2f4872ab2be39b7d6b3c1ecf7f807766606a3b2_4605bbe0add217d819f93c26a2f4872ab2be39b7d6b3c1ecf7f807766606a3b2.jsonl.gz", "strip_func_name": "sub_407523", "query": "\n\n\nvoid __noreturn sub_407523(const char *a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, ...)\n{\nchar s[104]; // [rsp+10h] [rbp-130h] BYREF\ngcc_va_list arg; // [rsp+78h] [rbp-C8h] BYREF\n__int64 v8; // [rsp+98h] [rbp-A8h]\n__int64 v9; // [rsp+A0h] [rbp-A0h]\n__int64 v10; // [rsp+A8h] [rbp-98h]\n__int64 v11; // [rsp+B0h] [rbp-90h]\n__int64 v12; // [rsp+B8h] [rbp-88h]\n\nva_start(arg, a6);\nv8 = a2;\nv9 = a3;\nv10 = a4;\nv11 = a5;\nv12 = a6;\narg[0].gp_offset = 8;\nvsnprintf(s, 0x64uLL, a1, arg);\noff_40C100(\"%s\", s);\nexit(-1);\n}\n\n\n\nQ:[a1,s,arg,sub_407523,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'fmt', 's': 'exit_msg', 'arg': 'ap', 'sub_407523': 'tpl_fatal'}"}
mpz_gcd
dade8a50f9553a2c8d312f40f9e938d800aaeceed2d235843ec2760ee3f4ab45
Ricardicus
ric-script
NA
void mpz_gcd (mpz_t g, const mpz_t u, const mpz_t v) { mpz_t tu, tv; mp_bitcnt_t uz, vz, gz; if (u->_mp_size == 0) { mpz_abs (g, v); return; } if (v->_mp_size == 0) { mpz_abs (g, u); return; } mpz_init (tu); mpz_init (tv); mpz_abs (tu, u); uz = mpz_make_odd (tu); mpz_abs (tv, v); vz = mpz_make_odd (tv); gz = GMP_MIN (uz, vz); if (tu->_mp_size < tv->_mp_size) mpz_swap (tu, tv); mpz_tdiv_r (tu, tu, tv); if (tu->_mp_size == 0) { mpz_swap (g, tv); } else for (;;) { int c; mpz_make_odd (tu); c = mpz_cmp (tu, tv); if (c == 0) { mpz_swap (g, tu); break; } if (c < 0) mpz_swap (tu, tv); if (tv->_mp_size == 1) { mp_limb_t vl = tv->_mp_d[0]; mp_limb_t ul = mpz_tdiv_ui (tu, vl); mpz_set_ui (g, mpn_gcd_11 (ul, vl)); break; } mpz_sub (tu, tu, tv); } mpz_clear (tu); mpz_clear (tv); mpz_mul_2exp (g, g, gz); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41450D", "function_addr": 4277517, "binary_name": "dade8a50f9553a2c8d312f40f9e938d800aaeceed2d235843ec2760ee3f4ab45.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 70h"], [3, "mov [rbp+var_58], rdi"], [4, "mov [rbp+var_60], rsi"], [5, "mov [rbp+var_68], rdx"], [6, "mov rax, [rbp+var_60]"], [7, "mov eax, [rax+4]"], [8, "test eax, eax"], [9, "jnz short loc_414544"], [10, "mov rdx, [rbp+var_68]"], [11, "mov rax, [rbp+var_58]"], [12, "mov rsi, rdx"], [13, "mov rdi, rax"], [14, "call sub_412770"], [15, "jmp locret_41471E"], [16, "mov rax, [rbp+var_68]"], [17, "mov eax, [rax+4]"], [18, "test eax, eax"], [19, "jnz short loc_414567"], [20, "mov rdx, [rbp+var_60]"], [21, "mov rax, [rbp+var_58]"], [22, "mov rsi, rdx"], [23, "mov rdi, rax"], [24, "call sub_412770"], [25, "jmp locret_41471E"], [26, "lea rax, [rbp+var_40]"], [27, "mov rdi, rax"], [28, "call sub_4116FF"], [29, "lea rax, [rbp+var_50]"], [30, "mov rdi, rax"], [31, "call sub_4116FF"], [32, "mov rdx, [rbp+var_60]"], [33, "lea rax, [rbp+var_40]"], [34, "mov rsi, rdx"], [35, "mov rdi, rax"], [36, "call sub_412770"], [37, "lea rax, [rbp+var_40]"], [38, "mov rdi, rax"], [39, "call sub_414491"], [40, "mov [rbp+var_8], rax"], [41, "mov rdx, [rbp+var_68]"], [42, "lea rax, [rbp+var_50]"], [43, "mov rsi, rdx"], [44, "mov rdi, rax"], [45, "call sub_412770"], [46, "lea rax, [rbp+var_50]"], [47, "mov rdi, rax"], [48, "call sub_414491"], [49, "mov [rbp+var_10], rax"], [50, "mov rax, [rbp+var_8]"], [51, "cmp [rbp+var_10], rax"], [52, "cmovbe rax, [rbp+var_10]"], [53, "mov [rbp+var_18], rax"], [54, "mov edx, [rbp+var_3C]"], [55, "mov eax, [rbp+var_4C]"], [56, "cmp edx, eax"], [57, "jge short loc_4145F3"], [58, "lea rdx, [rbp+var_50]"], [59, "lea rax, [rbp+var_40]"], [60, "mov rsi, rdx"], [61, "mov rdi, rax"], [62, "call sub_4127E1"], [63, "lea rdx, [rbp+var_50]"], [64, "lea rcx, [rbp+var_40]"], [65, "lea rax, [rbp+var_40]"], [66, "mov rsi, rcx"], [67, "mov rdi, rax"], [68, "call sub_41372D"], [69, "mov eax, [rbp+var_3C]"], [70, "test eax, eax"], [71, "jnz short loc_414629"], [72, "lea rdx, [rbp+var_50]"], [73, "mov rax, [rbp+var_58]"], [74, "mov rsi, rdx"], [75, "mov rdi, rax"], [76, "call sub_4127E1"], [77, "jmp loc_4146EF"], [78, "lea rax, [rbp+var_40]"], [79, "mov rdi, rax"], [80, "call sub_414491"], [81, "lea rdx, [rbp+var_50]"], [82, "lea rax, [rbp+var_40]"], [83, "mov rsi, rdx"], [84, "mov rdi, rax"], [85, "call sub_412613"], [86, "mov [rbp+var_1C], eax"], [87, "cmp [rbp+var_1C], 0"], [88, "jnz short loc_414669"], [89, "lea rdx, [rbp+var_40]"], [90, "mov rax, [rbp+var_58]"], [91, "mov rsi, rdx"], [92, "mov rdi, rax"], [93, "call sub_4127E1"], [94, "jmp loc_4146EF"], [95, "cmp [rbp+var_1C], 0"], [96, "jns short loc_414682"], [97, "lea rdx, [rbp+var_50]"], [98, "lea rax, [rbp+var_40]"], [99, "mov rsi, rdx"], [100, "mov rdi, rax"], [101, "call sub_4127E1"], [102, "mov eax, [rbp+var_4C]"], [103, "cmp eax, 1"], [104, "jnz short loc_4146D3"], [105, "mov rax, [rbp+var_48]"], [106, "mov rax, [rax]"], [107, "mov [rbp+var_28], rax"], [108, "mov rdx, [rbp+var_28]"], [109, "lea rax, [rbp+var_40]"], [110, "mov rsi, rdx"], [111, "mov rdi, rax"], [112, "call sub_414199"], [113, "mov [rbp+var_30], rax"], [114, "mov rdx, [rbp+var_28]"], [115, "mov rax, [rbp+var_30]"], [116, "mov rsi, rdx"], [117, "mov rdi, rax"], [118, "call sub_41429B"], [119, "mov rdx, rax"], [120, "mov rax, [rbp+var_58]"], [121, "mov rsi, rdx"], [122, "mov rdi, rax"], [123, "call sub_4118D5"], [124, "jmp short loc_4146EF"], [125, "lea rdx, [rbp+var_50]"], [126, "lea rcx, [rbp+var_40]"], [127, "lea rax, [rbp+var_40]"], [128, "mov rsi, rcx"], [129, "mov rdi, rax"], [130, "call sub_412C49"], [131, "jmp loc_414629"], [132, "lea rax, [rbp+var_40]"], [133, "mov rdi, rax"], [134, "call sub_411788"], [135, "lea rax, [rbp+var_50]"], [136, "mov rdi, rax"], [137, "call sub_411788"], [138, "mov rdx, [rbp+var_18]"], [139, "mov rcx, [rbp+var_58]"], [140, "mov rax, [rbp+var_58]"], [141, "mov rsi, rcx"], [142, "mov rdi, rax"], [143, "call sub_412EEB"], [144, "leave"], [145, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 7], [9, 8], [10, 5], [11, 3], [12, 10], [13, 11], [16, 5], [17, 16], [18, 17], [19, 18], [20, 4], [21, 3], [22, 20], [23, 21], [26, 18], [27, 26], [29, 28], [30, 29], [32, 4], [33, 31], [34, 32], [35, 33], [37, 36], [38, 37], [40, 39], [41, 5], [42, 39], [43, 41], [44, 42], [46, 45], [47, 46], [49, 48], [50, 40], [51, 50], [51, 49], [52, 49], [52, 51], [53, 52], [56, 55], [56, 54], [57, 56], [58, 54], [59, 55], [60, 58], [61, 59], [63, 54], [63, 58], [65, 62], [65, 55], [66, 64], [67, 65], [70, 69], [71, 70], [72, 63], [73, 3], [74, 72], [75, 73], [78, 70], [78, 130], [79, 78], [81, 125], [81, 63], [82, 80], [83, 81], [84, 82], [86, 85], [87, 86], [88, 87], [89, 81], [90, 3], [91, 89], [92, 90], [95, 86], [96, 95], [97, 81], [98, 85], [99, 97], [100, 98], [103, 102], [104, 103], [106, 105], [107, 106], [108, 107], [109, 106], [110, 108], [111, 109], [113, 112], [114, 107], [115, 113], [116, 114], [117, 115], [119, 118], [120, 3], [121, 119], [122, 120], [125, 97], [125, 81], [126, 126], [126, 64], [127, 102], [128, 126], [129, 127], [132, 93], [132, 123], [132, 76], [133, 132], [135, 134], [136, 135], [138, 53], [139, 3], [140, 3], [141, 139], [142, 140], [145, 14], [145, 24], [145, 143]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/dade8a50f9553a2c8d312f40f9e938d800aaeceed2d235843ec2760ee3f4ab45_dade8a50f9553a2c8d312f40f9e938d800aaeceed2d235843ec2760ee3f4ab45.jsonl.gz", "strip_func_name": "sub_41450D", "query": "\n\n\nint *__fastcall sub_41450D(int *a1, __int64 a2, __int64 a3)\n{\nunsigned __int64 v4; // rax\n__int64 v5; // rax\nint v7; // [rsp+20h] [rbp-50h] BYREF\nint v8; // [rsp+24h] [rbp-4Ch]\n_QWORD *v9; // [rsp+28h] [rbp-48h]\nint v10; // [rsp+30h] [rbp-40h] BYREF\nint v11; // [rsp+34h] [rbp-3Ch]\n__int128 v12; // [rsp+40h] [rbp-30h]\nint v13; // [rsp+54h] [rbp-1Ch]\nunsigned __int64 v14; // [rsp+58h] [rbp-18h]\nunsigned __int64 v15; // [rsp+60h] [rbp-10h]\nunsigned __int64 v16; // [rsp+68h] [rbp-8h]\n\nif ( !*(_DWORD *)(a2 + 4) )\nreturn (int *)sub_412770(a1, a3);\nif ( !*(_DWORD *)(a3 + 4) )\nreturn (int *)sub_412770(a1, a2);\nsub_4116FF((__int64)&v10);\nsub_4116FF((__int64)&v7);\nsub_412770(&v10, a2);\nv16 = sub_414491((__int64)&v10);\nsub_412770(&v7, a3);\nv15 = sub_414491((__int64)&v7);\nv4 = v16;\nif ( v15 <= v16 )\nv4 = v15;\nv14 = v4;\nif ( v11 < v8 )\nsub_4127E1(&v10, &v7);\nsub_41372D(&v10, (__int64)&v10, (__int64)&v7);\nif ( v11 )\n{\nwhile ( 1 )\n{\nsub_414491((__int64)&v10);\nv13 = sub_412613((__int64)&v10, (__int64)&v7);\nif ( !v13 )\n{\nsub_4127E1(a1, &v10);\ngoto LABEL_18;\n}\nif ( v13 < 0 )\nsub_4127E1(&v10, &v7);\nif ( v8 == 1 )\nbreak;\nsub_412C49(&v10, (__int64)&v10, (__int64)&v7);\n}\n*((_QWORD *)&v12 + 1) = *v9;\n*(_QWORD *)&v12 = sub_414199((__int64)&v10, *((__int64 *)&v12 + 1));\nv5 = sub_41429B(v12);\nsub_4118D5((__int64)a1, v5);\n}\nelse\n{\nsub_4127E1(a1, &v7);\n}\nLABEL_18:\nsub_411788((unsigned int *)&v10);\nsub_411788((unsigned int *)&v7);\nreturn sub_412EEB(a1, (__int64)a1, v14);\n}\n\n\n\nQ:[a3,a1,a2,v7,v10,v12,v13,v14,v15,v16,sub_41450D,sub_412770,sub_4116FF,sub_414491,sub_4127E1,sub_41372D,sub_412613,sub_412C49,sub_414199,sub_41429B,sub_4118D5,sub_411788,sub_412EEB,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'v', 'a1': 'g', 'a2': 'u', 'v7': 'tv', 'v10': 'tu', 'v12': 'ul', 'v13': 'c', 'v14': 'gz', 'v15': 'vz', 'v16': 'uz', 'sub_41450D': 'mpz_gcd', 'sub_412770': 'mpz_abs', 'sub_4116FF': 'mpz_init', 'sub_414491': 'mpz_make_odd', 'sub_4127E1': 'mpz_swap', 'sub_41372D': 'mpz_tdiv_r', 'sub_412613': 'mpz_cmp', 'sub_412C49': 'mpz_sub', 'sub_414199': 'mpz_tdiv_ui', 'sub_41429B': 'mpn_gcd_11', 'sub_4118D5': 'mpz_set_ui', 'sub_411788': 'mpz_clear', 'sub_412EEB': 'mpz_mul_2exp'}"}
cu_ClearMoveHistory
ec8fc937e4ce3fa3c7735a74b6cbc74ff046aa1e3d1bd57a582fccc52f80cf78
olikraus
u8glib
NA
void cu_ClearMoveHistory(void) { lrc_obj.chm_pos = 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401976", "function_addr": 4200822, "binary_name": "ec8fc937e4ce3fa3c7735a74b6cbc74ff046aa1e3d1bd57a582fccc52f80cf78.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov cs:byte_56EE41, 0"], [3, "nop"], [4, "pop rbp"], [5, "retn"]], "data_dep": [[4, 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/ec8fc937e4ce3fa3c7735a74b6cbc74ff046aa1e3d1bd57a582fccc52f80cf78_ec8fc937e4ce3fa3c7735a74b6cbc74ff046aa1e3d1bd57a582fccc52f80cf78.jsonl.gz", "strip_func_name": "sub_401976", "query": "\n\n\nvoid sub_401976()\n{\nbyte_56EE41 = 0;\n}\n\n\n\nQ:[sub_401976,]\nAssistant: ", "hints": "[]", "response": "{'sub_401976': 'cu_ClearMoveHistory'}"}
binary_search
0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8
michalsc
Emu68
NA
static int binary_search(const inst_pageX *const inst_pageX_table, int table_size, uint8_t opcode) { int first = 0; int last = table_size - 1; int middle = (first + last) / 2; while (first <= last) { if (inst_pageX_table[middle].opcode < opcode) { first = middle + 1; } else if (inst_pageX_table[middle].opcode == opcode) { return middle; /* item found */ } else last = middle - 1; middle = (first + last) / 2; } if (first > last) return -1; /* item not found */ return -2; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_52D303", "function_addr": 5427971, "binary_name": "0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov [rbp+var_1C], esi"], [4, "mov eax, edx"], [5, "mov [rbp+var_20], al"], [6, "mov [rbp+var_4], 0"], [7, "mov eax, [rbp+var_1C]"], [8, "sub eax, 1"], [9, "mov [rbp+var_8], eax"], [10, "mov edx, [rbp+var_4]"], [11, "mov eax, [rbp+var_8]"], [12, "add eax, edx"], [13, "mov edx, eax"], [14, "shr edx, 1Fh"], [15, "add eax, edx"], [16, "sar eax, 1"], [17, "mov [rbp+var_C], eax"], [18, "jmp short loc_52D39E"], [19, "mov eax, [rbp+var_C]"], [20, "cdqe"], [21, "lea rdx, ds:0[rax*4]"], [22, "mov rax, [rbp+var_18]"], [23, "add rax, rdx"], [24, "movzx eax, byte ptr [rax]"], [25, "cmp [rbp+var_20], al"], [26, "jbe short loc_52D360"], [27, "mov eax, [rbp+var_C]"], [28, "add eax, 1"], [29, "mov [rbp+var_4], eax"], [30, "jmp short loc_52D38A"], [31, "mov eax, [rbp+var_C]"], [32, "cdqe"], [33, "lea rdx, ds:0[rax*4]"], [34, "mov rax, [rbp+var_18]"], [35, "add rax, rdx"], [36, "movzx eax, byte ptr [rax]"], [37, "cmp [rbp+var_20], al"], [38, "jnz short loc_52D381"], [39, "mov eax, [rbp+var_C]"], [40, "jmp short loc_52D3BA"], [41, "mov eax, [rbp+var_C]"], [42, "sub eax, 1"], [43, "mov [rbp+var_8], eax"], [44, "mov edx, [rbp+var_4]"], [45, "mov eax, [rbp+var_8]"], [46, "add eax, edx"], [47, "mov edx, eax"], [48, "shr edx, 1Fh"], [49, "add eax, edx"], [50, "sar eax, 1"], [51, "mov [rbp+var_C], eax"], [52, "mov eax, [rbp+var_4]"], [53, "cmp eax, [rbp+var_8]"], [54, "jle short loc_52D339"], [55, "mov eax, [rbp+var_4]"], [56, "cmp eax, [rbp+var_8]"], [57, "jle short loc_52D3B5"], [58, "mov eax, 0FFFFFFFFh"], [59, "jmp short loc_52D3BA"], [60, "mov eax, 0FFFFFFFEh"], [61, "pop rbp"], [62, "retn"]], "data_dep": [[5, 4], [7, 3], [8, 7], [9, 8], [10, 6], [11, 9], [12, 10], [12, 11], [13, 12], [14, 13], [15, 14], [15, 12], [16, 15], [17, 16], [19, 51], [19, 17], [21, 48], [21, 14], [22, 2], [23, 22], [23, 21], [24, 23], [25, 24], [25, 5], [26, 25], [27, 51], [27, 17], [28, 27], [29, 28], [31, 17], [31, 51], [33, 21], [34, 2], [35, 33], [35, 34], [36, 35], [37, 36], [37, 5], [38, 37], [39, 51], [39, 17], [41, 51], [41, 17], [42, 41], [43, 42], [44, 29], [44, 6], [45, 43], [45, 9], [46, 45], [46, 44], [47, 46], [48, 47], [49, 46], [49, 48], [50, 49], [51, 50], [52, 6], [52, 29], [53, 43], [53, 52], [53, 9], [54, 53], [55, 29], [55, 6], [56, 43], [56, 55], [56, 9], [57, 56], [61, 0], [62, 58], [62, 39], [62, 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/0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8_0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8.jsonl.gz", "strip_func_name": "sub_52D303", "query": "\n\n\n__int64 __fastcall sub_52D303(__int64 a1, int a2, unsigned __int8 a3)\n{\nint v4; // [rsp+14h] [rbp-Ch]\nint v5; // [rsp+18h] [rbp-8h]\nint v6; // [rsp+1Ch] [rbp-4h]\n\nv6 = 0;\nv5 = a2 - 1;\nv4 = (a2 - 1) / 2;\nwhile ( v6 <= v5 )\n{\nif ( a3 <= *(_BYTE *)(4LL * v4 + a1) )\n{\nif ( a3 == *(_BYTE *)(4LL * v4 + a1) )\nreturn (unsigned int)v4;\nv5 = v4 - 1;\n}\nelse\n{\nv6 = v4 + 1;\n}\nv4 = (v6 + v5) / 2;\n}\nreturn 0xFFFFFFFFLL;\n}\n\n\n\nQ:[a3,a1,a2,v4,v5,v6,sub_52D303,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'opcode', 'a1': 'inst_pageX_table', 'a2': 'table_size', 'v4': 'middle', 'v5': 'last', 'v6': 'first', 'sub_52D303': 'binary_search'}"}
init_sdp_parser
c4c7b2a78179a69953804608dac176cec14e731b69aa3ba1c38a73cb48268178
asterisk
pjproject-archive
NA
static void init_sdp_parser(void) { if (is_initialized != 0) return; pj_enter_critical_section(); if (is_initialized != 0) { pj_leave_critical_section(); return; } pj_cis_buf_init(&cis_buf); pj_cis_init(&cis_buf, &cs_token); pj_cis_add_alpha(&cs_token); pj_cis_add_num(&cs_token); pj_cis_add_str(&cs_token, TOKEN); pj_cis_init(&cis_buf, &cs_digit); pj_cis_add_num(&cs_digit); is_initialized = 1; pj_leave_critical_section(); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40F77B", "function_addr": 4257659, "binary_name": "c4c7b2a78179a69953804608dac176cec14e731b69aa3ba1c38a73cb48268178.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, cs:dword_4D6440"], [3, "test eax, eax"], [4, "jnz short loc_40F805"], [5, "call sub_48AF81"], [6, "mov eax, cs:dword_4D6440"], [7, "test eax, eax"], [8, "jz short loc_40F79F"], [9, "call sub_48AF92"], [10, "jmp short loc_40F806"], [11, "mov edi, offset unk_4D6460"], [12, "call sub_42AA83"], [13, "mov esi, offset unk_4D6880"], [14, "mov edi, offset unk_4D6460"], [15, "call sub_42AAB1"], [16, "mov edi, offset unk_4D6880"], [17, "call sub_42ACED"], [18, "mov edi, offset unk_4D6880"], [19, "call sub_42AD28"], [20, "mov esi, offset asc_49CD20"], [21, "mov edi, offset unk_4D6880"], [22, "call sub_42AD4D"], [23, "mov esi, offset unk_4D6870"], [24, "mov edi, offset unk_4D6460"], [25, "call sub_42AAB1"], [26, "mov edi, offset unk_4D6870"], [27, "call sub_42AD28"], [28, "mov cs:dword_4D6440, 1"], [29, "call sub_48AF92"], [30, "jmp short loc_40F806"], [31, "nop"], [32, "pop rbp"], [33, "retn"]], "data_dep": [[3, 2], [4, 3], [7, 6], [8, 7], [32, 0], [33, 29], [33, 3], [33, 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/c4c7b2a78179a69953804608dac176cec14e731b69aa3ba1c38a73cb48268178_c4c7b2a78179a69953804608dac176cec14e731b69aa3ba1c38a73cb48268178.jsonl.gz", "strip_func_name": "sub_40F77B", "query": "\n\n\n__int64 sub_40F77B()\n{\n__int64 result; // rax\n\nresult = (unsigned int)dword_4D6440;\nif ( !dword_4D6440 )\n{\nsub_48AF81();\nif ( !dword_4D6440 )\n{\nsub_42AA83(&unk_4D6460);\nsub_42AAB1(&unk_4D6460, &unk_4D6880);\nsub_42ACED(&unk_4D6880);\nsub_42AD28(&unk_4D6880);\nsub_42AD4D(&unk_4D6880, \"!#$%&'*+-.^_`{|}~\");\nsub_42AAB1(&unk_4D6460, &unk_4D6870);\nsub_42AD28(&unk_4D6870);\ndword_4D6440 = 1;\n}\nresult = sub_48AF92();\n}\nreturn result;\n}\n\n\n\nQ:[sub_40F77B,sub_48AF81,sub_42AA83,sub_42AAB1,sub_42ACED,sub_42AD28,sub_42AD4D,sub_48AF92,]\nAssistant: ", "hints": "[]", "response": "{'sub_40F77B': 'init_sdp_parser', 'sub_48AF81': 'pj_enter_critical_section', 'sub_42AA83': 'pj_cis_buf_init', 'sub_42AAB1': 'pj_cis_init', 'sub_42ACED': 'pj_cis_add_alpha', 'sub_42AD28': 'pj_cis_add_num', 'sub_42AD4D': 'pj_cis_add_str', 'sub_48AF92': 'pj_leave_critical_section'}"}
stx_join
e73dbe10a68eaac97acfeac704710fe98db30012d4dbffdde3f9e00c487179c1
alcover
stricks
NA
stx_t stx_join (stx_t *list, int count, const char* sep) { return stx_join_len (list, count, sep, strlen(sep)); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4098AC", "function_addr": 4233388, "binary_name": "e73dbe10a68eaac97acfeac704710fe98db30012d4dbffdde3f9e00c487179c1.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+s], rdx"], [6, "mov rax, [rbp+s]"], [7, "mov rdi, rax"], [8, "call _strlen"], [9, "mov rcx, rax"], [10, "mov rdx, [rbp+s]"], [11, "mov esi, [rbp+var_C]"], [12, "mov rax, [rbp+var_8]"], [13, "mov rdi, rax"], [14, "call sub_4091D7"], [15, "leave"], [16, "retn"]], "data_dep": [[6, 5], [7, 6], [9, 8], [10, 5], [11, 4], [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/e73dbe10a68eaac97acfeac704710fe98db30012d4dbffdde3f9e00c487179c1_e73dbe10a68eaac97acfeac704710fe98db30012d4dbffdde3f9e00c487179c1.jsonl.gz", "strip_func_name": "sub_4098AC", "query": "\n\n\nchar *__fastcall sub_4098AC(__int64 a1, int a2, const char *a3)\n{\nsize_t v3; // rax\n\nv3 = strlen(a3);\nreturn sub_4091D7(a1, a2, a3, v3);\n}\n\n\n\nQ:[a3,a1,a2,sub_4098AC,sub_4091D7,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'sep', 'a1': 'list', 'a2': 'count', 'sub_4098AC': 'stx_join', 'sub_4091D7': 'stx_join_len'}"}
abpoa_post_set_para
98d3d22b8d330c8d8bed6cbe1720f212923faf979679f6859652536e3be792b5
yangao07
abPOA
NA
void abpoa_post_set_para(abpoa_para_t *abpt) { abpoa_set_gap_mode(abpt); if (abpt->out_msa || abpt->out_gfa || abpt->max_n_cons > 1) { abpt->use_read_ids = 1; set_65536_table(); if (abpt->max_n_cons > 1) set_bit_table16(); } if (abpt->align_mode == ABPOA_LOCAL_MODE) abpt->wb = -1; int i; if (abpt->m > 5) { // for aa sequence for (i = 0; i < 256; ++i) { ab_char26_table[i] = ab_aa26_table[i]; ab_char256_table[i] = ab_aa256_table[i]; } if (abpt->k > 11) { abpt->k = 7, abpt->w = 4; } } else { for (i = 0; i < 256; ++i) { ab_char26_table[i] = ab_nt4_table[i]; ab_char256_table[i] = ab_nt256_table[i]; } } if (abpt->use_score_matrix == 0) gen_simple_mat(abpt); else abpoa_set_mat_from_file(abpt, abpt->mat_fn); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4053D4", "function_addr": 4215764, "binary_name": "98d3d22b8d330c8d8bed6cbe1720f212923faf979679f6859652536e3be792b5.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 rdi, rax"], [6, "call sub_40518D"], [7, "mov rax, [rbp+var_18]"], [8, "movzx eax, byte ptr [rax+5Ch]"], [9, "and eax, 4"], [10, "test al, al"], [11, "jnz short loc_405416"], [12, "mov rax, [rbp+var_18]"], [13, "movzx eax, byte ptr [rax+5Ch]"], [14, "and eax, 10h"], [15, "test al, al"], [16, "jnz short loc_405416"], [17, "mov rax, [rbp+var_18]"], [18, "mov eax, [rax+78h]"], [19, "cmp eax, 1"], [20, "jle short loc_40543A"], [21, "mov rax, [rbp+var_18]"], [22, "movzx edx, byte ptr [rax+5Ch]"], [23, "or edx, 40h"], [24, "mov [rax+5Ch], dl"], [25, "call sub_417BF2"], [26, "mov rax, [rbp+var_18]"], [27, "mov eax, [rax+78h]"], [28, "cmp eax, 1"], [29, "jle short loc_40543A"], [30, "call sub_417C2B"], [31, "mov rax, [rbp+var_18]"], [32, "mov eax, [rax+70h]"], [33, "cmp eax, 1"], [34, "jnz short loc_405451"], [35, "mov rax, [rbp+var_18]"], [36, "mov dword ptr [rax+4Ch], 0FFFFFFFFh"], [37, "mov rax, [rbp+var_18]"], [38, "mov eax, [rax]"], [39, "cmp eax, 5"], [40, "jle short loc_4054C4"], [41, "mov [rbp+var_4], 0"], [42, "jmp short loc_405497"], [43, "mov eax, [rbp+var_4]"], [44, "cdqe"], [45, "movzx edx, byte_463420[rax]"], [46, "mov eax, [rbp+var_4]"], [47, "cdqe"], [48, "mov ds:byte_463600[rax], dl"], [49, "mov eax, [rbp+var_4]"], [50, "cdqe"], [51, "movzx edx, ds:byte_45D260[rax]"], [52, "mov eax, [rbp+var_4]"], [53, "cdqe"], [54, "mov ds:byte_463700[rax], dl"], [55, "add [rbp+var_4], 1"], [56, "cmp [rbp+var_4], 0FFh"], [57, "jle short loc_405465"], [58, "mov rax, [rbp+var_18]"], [59, "mov eax, [rax+40h]"], [60, "cmp eax, 0Bh"], [61, "jle short loc_405508"], [62, "mov rax, [rbp+var_18]"], [63, "mov dword ptr [rax+40h], 7"], [64, "mov rax, [rbp+var_18]"], [65, "mov dword ptr [rax+44h], 4"], [66, "jmp short loc_405508"], [67, "mov [rbp+var_4], 0"], [68, "jmp short loc_4054FF"], [69, "mov eax, [rbp+var_4]"], [70, "cdqe"], [71, "movzx edx, byte_463320[rax]"], [72, "mov eax, [rbp+var_4]"], [73, "cdqe"], [74, "mov ds:byte_463600[rax], dl"], [75, "mov eax, [rbp+var_4]"], [76, "cdqe"], [77, "movzx edx, ds:byte_45D160[rax]"], [78, "mov eax, [rbp+var_4]"], [79, "cdqe"], [80, "mov ds:byte_463700[rax], dl"], [81, "add [rbp+var_4], 1"], [82, "cmp [rbp+var_4], 0FFh"], [83, "jle short loc_4054CD"], [84, "mov rax, [rbp+var_18]"], [85, "mov eax, [rax+18h]"], [86, "test eax, eax"], [87, "jnz short loc_405521"], [88, "mov rax, [rbp+var_18]"], [89, "mov rdi, rax"], [90, "call sub_404C64"], [91, "jmp short loc_405538"], [92, "mov rax, [rbp+var_18]"], [93, "mov rdx, [rax+10h]"], [94, "mov rax, [rbp+var_18]"], [95, "mov rsi, rdx"], [96, "mov rdi, rax"], [97, "call sub_404FBD"], [98, "nop"], [99, "leave"], [100, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 3], [8, 7], [9, 8], [10, 9], [11, 10], [12, 3], [13, 12], [14, 13], [15, 14], [16, 15], [17, 3], [18, 17], [19, 18], [20, 19], [21, 3], [22, 21], [23, 22], [24, 21], [24, 23], [26, 3], [27, 24], [27, 26], [28, 27], [29, 28], [31, 3], [32, 31], [32, 24], [33, 32], [34, 33], [35, 3], [36, 35], [37, 3], [38, 36], [38, 24], [38, 37], [39, 38], [40, 39], [43, 55], [43, 41], [46, 41], [46, 55], [48, 45], [49, 55], [49, 41], [52, 55], [52, 41], [54, 51], [55, 41], [55, 55], [56, 55], [56, 41], [57, 56], [58, 3], [59, 36], [59, 24], [59, 58], [60, 59], [61, 60], [62, 3], [63, 62], [64, 3], [65, 64], [69, 81], [69, 67], [72, 81], [72, 67], [74, 71], [75, 81], [75, 67], [78, 81], [78, 67], [80, 77], [81, 67], [81, 81], [82, 81], [82, 67], [83, 82], [84, 3], [85, 84], [85, 36], [85, 63], [85, 65], [85, 24], [86, 85], [87, 86], [88, 3], [89, 88], [92, 3], [93, 24], [93, 63], [93, 65], [93, 92], [93, 36], [94, 3], [95, 93], [96, 94], [100, 97], [100, 90]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/98d3d22b8d330c8d8bed6cbe1720f212923faf979679f6859652536e3be792b5_98d3d22b8d330c8d8bed6cbe1720f212923faf979679f6859652536e3be792b5.jsonl.gz", "strip_func_name": "sub_4053D4", "query": "\n\n\nint __fastcall sub_4053D4(__int64 a1)\n{\nint result; // eax\nint j; // [rsp+1Ch] [rbp-4h]\nint i; // [rsp+1Ch] [rbp-4h]\n\nsub_40518D((int *)a1);\nif ( (*(_BYTE *)(a1 + 92) & 4) != 0 || (*(_BYTE *)(a1 + 92) & 0x10) != 0 || *(int *)(a1 + 120) > 1 )\n{\n*(_BYTE *)(a1 + 92) |= 0x40u;\nsub_417BF2();\nif ( *(int *)(a1 + 120) > 1 )\nsub_417C2B();\n}\nif ( *(_DWORD *)(a1 + 112) == 1 )\n*(_DWORD *)(a1 + 76) = -1;\nif ( *(int *)a1 <= 5 )\n{\nfor ( i = 0; i <= 255; ++i )\n{\nbyte_463600[i] = byte_463320[i];\nbyte_463700[i] = byte_45D160[i];\n}\n}\nelse\n{\nfor ( j = 0; j <= 255; ++j )\n{\nbyte_463600[j] = byte_463420[j];\nbyte_463700[j] = byte_45D260[j];\n}\nif ( *(int *)(a1 + 64) > 11 )\n{\n*(_DWORD *)(a1 + 64) = 7;\n*(_DWORD *)(a1 + 68) = 4;\n}\n}\nif ( *(_DWORD *)(a1 + 24) )\nresult = sub_404FBD((int *)a1, *(const char **)(a1 + 16));\nelse\nresult = (unsigned int)sub_404C64((int *)a1);\nreturn result;\n}\n\n\n\nQ:[a1,sub_4053D4,sub_40518D,sub_417BF2,sub_417C2B,sub_404FBD,sub_404C64,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'abpt', 'sub_4053D4': 'abpoa_post_set_para', 'sub_40518D': 'abpoa_set_gap_mode', 'sub_417BF2': 'set_65536_table', 'sub_417C2B': 'set_bit_table16', 'sub_404FBD': 'abpoa_set_mat_from_file', 'sub_404C64': 'gen_simple_mat'}"}
sym_toggle_tristate_value
b395194d7faecff6312bc1041d357c70b1caebb6b6dbec93348988997aec92a7
Lamobo
Lamobo-D1
NA
tristate sym_toggle_tristate_value(struct symbol *sym) { tristate oldval, newval; oldval = newval = sym_get_tristate_value(sym); do { switch (newval) { case no: newval = mod; break; case mod: newval = yes; break; case yes: newval = no; break; } if (sym_set_tristate_value(sym, newval)) break; } while (oldval != newval); return newval; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41022B", "function_addr": 4260395, "binary_name": "b395194d7faecff6312bc1041d357c70b1caebb6b6dbec93348988997aec92a7.elf_extract.pkl\n"}, "code": [[0, "sub rsp, 28h"], [1, "mov [rsp+28h+var_20], rdi"], [2, "mov rax, [rsp+28h+var_20]"], [3, "mov rdi, rax"], [4, "call sub_403DF1"], [5, "mov [rsp+28h+var_C], eax"], [6, "mov eax, [rsp+28h+var_C]"], [7, "mov [rsp+28h+var_10], eax"], [8, "cmp [rsp+28h+var_C], 2"], [9, "jz short loc_41027F"], [10, "cmp [rsp+28h+var_C], 2"], [11, "ja short loc_410288"], [12, "cmp [rsp+28h+var_C], 0"], [13, "jz short loc_41026B"], [14, "cmp [rsp+28h+var_C], 1"], [15, "jz short loc_410275"], [16, "jmp short loc_410288"], [17, "mov [rsp+28h+var_C], 1"], [18, "jmp short loc_410288"], [19, "mov [rsp+28h+var_C], 2"], [20, "jmp short loc_410288"], [21, "mov [rsp+28h+var_C], 0"], [22, "nop"], [23, "mov edx, [rsp+28h+var_C]"], [24, "mov rax, [rsp+28h+var_20]"], [25, "mov esi, edx"], [26, "mov rdi, rax"], [27, "call sub_4100C0"], [28, "test al, al"], [29, "jnz short loc_4102AB"], [30, "mov eax, [rsp+28h+var_10]"], [31, "cmp eax, [rsp+28h+var_C]"], [32, "jnz short loc_41024D"], [33, "jmp short loc_4102AC"], [34, "nop"], [35, "mov eax, [rsp+28h+var_C]"], [36, "add rsp, 28h"], [37, "retn"]], "data_dep": [[2, 1], [3, 2], [5, 4], [6, 5], [7, 6], [8, 21], [8, 5], [8, 17], [8, 19], [9, 8], [10, 21], [10, 5], [10, 17], [10, 19], [11, 10], [12, 19], [12, 21], [12, 5], [12, 17], [13, 12], [14, 19], [14, 21], [14, 5], [14, 17], [15, 14], [23, 19], [23, 21], [23, 5], [23, 17], [24, 1], [25, 23], [26, 24], [28, 27], [29, 28], [30, 7], [31, 5], [31, 17], [31, 19], [31, 21], [31, 30], [32, 31], [35, 5], [35, 17], [35, 19], [35, 21], [36, 0], [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/b395194d7faecff6312bc1041d357c70b1caebb6b6dbec93348988997aec92a7_b395194d7faecff6312bc1041d357c70b1caebb6b6dbec93348988997aec92a7.jsonl.gz", "strip_func_name": "sub_41022B", "query": "\n\n\n__int64 __fastcall sub_41022B(__int64 a1)\n{\nunsigned int v2; // [rsp+18h] [rbp-10h]\nunsigned int v3; // [rsp+1Ch] [rbp-Ch]\n\nv3 = sub_403DF1(a1);\nv2 = v3;\ndo\n{\nif ( v3 == 2 )\n{\nv3 = 0;\n}\nelse if ( v3 <= 2 )\n{\nif ( v3 )\nv3 = 2;\nelse\nv3 = 1;\n}\n}\nwhile ( !(unsigned __int8)sub_4100C0(a1, v3) && v2 != v3 );\nreturn v3;\n}\n\n\n\nQ:[a1,v2,v3,sub_41022B,sub_403DF1,sub_4100C0,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'sym', 'v2': 'oldval', 'v3': 'newval', 'sub_41022B': 'sym_toggle_tristate_value', 'sub_403DF1': 'sym_get_tristate_value_0', 'sub_4100C0': 'sym_set_tristate_value'}"}
tmxr_show_log
7f3da066de3ad91a16492deef5c64a59e2612d8e033da70f1787d4a95642922d
open-simh
simh
NA
t_stat tmxr_show_log (FILE *st, UNIT *uptr, int32 val, CONST void *desc) { const TMXR *mp = (const TMXR *) desc; TMLN *lp; lp = tmxr_find_ldsc (uptr, val, mp); /* find line desc */ if (lp == NULL) return SCPE_IERR; if (lp->txlog) fprintf (st, "logging to %s", lp->txlogname); else fprintf (st, "no logging"); return SCPE_OK; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_481596", "function_addr": 4724118, "binary_name": "7f3da066de3ad91a16492deef5c64a59e2612d8e033da70f1787d4a95642922d.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 [rbp+var_30], rcx"], [7, "mov rax, [rbp+var_30]"], [8, "mov [rbp+var_8], rax"], [9, "mov rdx, [rbp+var_8]"], [10, "mov ecx, [rbp+var_24]"], [11, "mov rax, [rbp+var_20]"], [12, "mov esi, ecx"], [13, "mov rdi, rax"], [14, "call sub_471539"], [15, "mov [rbp+var_10], rax"], [16, "cmp [rbp+var_10], 0"], [17, "jnz short loc_4815DC"], [18, "mov eax, 65h "], [19, "jmp short locret_48162A"], [20, "mov rax, [rbp+var_10]"], [21, "mov rax, [rax+98h]"], [22, "test rax, rax"], [23, "jz short loc_48160F"], [24, "mov rax, [rbp+var_10]"], [25, "mov rdx, [rax+0A8h]"], [26, "mov rax, [rbp+var_18]"], [27, "mov esi, offset aLoggingToS_0"], [28, "mov rdi, rax"], [29, "mov eax, 0"], [30, "call sub_452538"], [31, "jmp short loc_481625"], [32, "mov rax, [rbp+var_18]"], [33, "mov esi, offset aNoLogging_0"], [34, "mov rdi, rax"], [35, "mov eax, 0"], [36, "call sub_452538"], [37, "mov eax, 0"], [38, "leave"], [39, "retn"]], "data_dep": [[7, 6], [8, 7], [9, 8], [10, 5], [11, 4], [12, 10], [13, 11], [15, 14], [16, 15], [17, 16], [20, 15], [21, 20], [22, 21], [23, 22], [24, 15], [25, 24], [26, 3], [28, 26], [32, 3], [34, 32], [39, 18], [39, 37]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/7f3da066de3ad91a16492deef5c64a59e2612d8e033da70f1787d4a95642922d_7f3da066de3ad91a16492deef5c64a59e2612d8e033da70f1787d4a95642922d.jsonl.gz", "strip_func_name": "sub_481596", "query": "\n\n\n__int64 __fastcall sub_481596(FILE *a1, __int64 a2, int a3, __int64 a4)\n{\n__int64 v4; // rdx\n__int64 v5; // rcx\n__int64 v6; // r8\n__int64 v7; // r9\n__int64 v10; // [rsp+20h] [rbp-10h]\n\nv10 = sub_471539(a2, a3, a4);\nif ( !v10 )\nreturn 101LL;\nif ( *(_QWORD *)(v10 + 152) )\nsub_452538(a1, \"logging to %s\", *(_QWORD *)(v10 + 168), v5, v6, v7, a4);\nelse\nsub_452538(a1, \"no logging\", v4, v5, v6, v7, a4);\nreturn 0LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,v4,v5,v10,sub_481596,sub_471539,sub_452538,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'val', 'a4': 'desc', 'a1': 'st', 'a2': 'uptr', 'v4': 'val', 'v5': 'desc', 'v10': 'lp', 'sub_481596': 'tmxr_show_log', 'sub_471539': 'tmxr_find_ldsc', 'sub_452538': 'Fprintf'}"}
expundefined
59d34e8bc5e415dcaab67712ab24c88767734e5a3387c65d896cb0687a64dc65
lkundrak
dev86
NA
PRIVATE void expundefined() { if( last_pass == 1 ) lastexp.data = FORBIT | UNDBIT; else lastexp.data = UNDBIT; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40225E", "function_addr": 4203102, "binary_name": "59d34e8bc5e415dcaab67712ab24c88767734e5a3387c65d896cb0687a64dc65.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, cs:dword_4130A8"], [3, "cmp eax, 1"], [4, "jnz short loc_402276"], [5, "mov byte ptr cs:qword_415728, 0A0h"], [6, "jmp short loc_40227D"], [7, "mov byte ptr cs:qword_415728, 80h"], [8, "nop"], [9, "pop rbp"], [10, "retn"]], "data_dep": [[3, 2], [4, 3], [9, 0], [10, 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/59d34e8bc5e415dcaab67712ab24c88767734e5a3387c65d896cb0687a64dc65_59d34e8bc5e415dcaab67712ab24c88767734e5a3387c65d896cb0687a64dc65.jsonl.gz", "strip_func_name": "sub_40225E", "query": "\n\n\n__int64 sub_40225E()\n{\n__int64 result; // rax\n\nresult = (unsigned int)dword_4130A8;\nif ( dword_4130A8 == 1 )\nLOBYTE(qword_415728) = -96;\nelse\nLOBYTE(qword_415728) = 0x80;\nreturn result;\n}\n\n\n\nQ:[sub_40225E,]\nAssistant: ", "hints": "[]", "response": "{'sub_40225E': 'expundefined'}"}
fio_cpuio_init
da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b
axboe
fio
NA
static int fio_cpuio_init(struct thread_data *td) { struct thread_options *o = &td->o; struct cpu_options *co = td->eo; int td_previous_state; char *msg; if (!co->cpuload) { td_vmsg(td, EINVAL, "cpu thread needs rate (cpuload=)","cpuio"); return 1; } if (co->cpuload > 100) co->cpuload = 100; /* Saving the current thread state */ td_previous_state = td->runstate; /* Reporting that we are preparing the engine * This is useful as the qsort() calibration takes time * This prevents the job from starting before init is completed */ td_set_runstate(td, TD_SETTING_UP); /* * set thinktime_sleep and thinktime_spin appropriately */ o->thinktime_blocks = 1; o->thinktime_blocks_type = THINKTIME_BLOCKS_TYPE_COMPLETE; o->thinktime_spin = 0; o->thinktime = ((unsigned long long) co->cpucycle * (100 - co->cpuload)) / co->cpuload; o->nr_files = o->open_files = 1; switch (co->cpumode) { case FIO_CPU_NOOP: noop_init(td); break; case FIO_CPU_QSORT: qsort_init(td); break; default: if (asprintf(&msg, "bad cpu engine mode: %d", co->cpumode) < 0) msg = NULL; td_vmsg(td, EINVAL, msg ? : "(?)", __func__); free(msg); return 1; } /* Let's restore the previous state. */ td_set_runstate(td, td_previous_state); return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_462FA3", "function_addr": 4599715, "binary_name": "da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_38], rdi"], [4, "mov rax, [rbp+var_38]"], [5, "add rax, 18h"], [6, "mov [rbp+var_8], rax"], [7, "mov rax, [rbp+var_38]"], [8, "mov rax, [rax+0CD0h]"], [9, "mov [rbp+var_10], rax"], [10, "mov rax, [rbp+var_10]"], [11, "mov eax, [rax+8]"], [12, "test eax, eax"], [13, "jnz loc_4630F7"], [14, "mov [rbp+var_20], 16h"], [15, "mov rax, [rbp+var_38]"], [16, "mov eax, [rax+2DEC0h]"], [17, "test eax, eax"], [18, "jnz short loc_46304A"], [19, "mov edx, [rbp+var_20]"], [20, "mov rax, [rbp+var_38]"], [21, "mov [rax+2DEC0h], edx"], [22, "mov rax, [rbp+var_38]"], [23, "mov eax, [rax+2E96Ch]"], [24, "test eax, eax"], [25, "jnz short loc_46304B"], [26, "mov rax, [rbp+var_38]"], [27, "add rax, 2EA40h"], [28, "sub rsp, 8"], [29, "push offset aCpuThreadNeeds"], [30, "mov r9d, offset aCpuio"], [31, "mov r8d, 0FBh"], [32, "mov ecx, offset aEnginesCpuC"], [33, "mov edx, offset aFileSDFuncSErr_6"], [34, "mov esi, 80h"], [35, "mov rdi, rax"], [36, "mov eax, 0"], [37, "call sub_46298A"], [38, "add rsp, 10h"], [39, "jmp short loc_46304B"], [40, "nop"], [41, "mov rax, [rbp+var_38]"], [42, "mov rax, [rax+2DC70h]"], [43, "test rax, rax"], [44, "jz loc_4630ED"], [45, "mov [rbp+var_24], 16h"], [46, "mov rax, [rbp+var_38]"], [47, "mov rax, [rax+2DC70h]"], [48, "mov eax, [rax+2DEC0h]"], [49, "test eax, eax"], [50, "jnz short loc_4630EC"], [51, "mov rax, [rbp+var_38]"], [52, "mov rax, [rax+2DC70h]"], [53, "mov edx, [rbp+var_24]"], [54, "mov [rax+2DEC0h], edx"], [55, "mov rax, [rbp+var_38]"], [56, "mov rax, [rax+2DC70h]"], [57, "mov eax, [rax+2E96Ch]"], [58, "test eax, eax"], [59, "jnz short loc_4630ED"], [60, "mov rax, [rbp+var_38]"], [61, "mov rax, [rax+2DC70h]"], [62, "add rax, 2EA40h"], [63, "sub rsp, 8"], [64, "push offset aCpuThreadNeeds"], [65, "mov r9d, offset aCpuio"], [66, "mov r8d, 0FBh"], [67, "mov ecx, offset aEnginesCpuC"], [68, "mov edx, offset aFileSDFuncSErr_6"], [69, "mov esi, 80h"], [70, "mov rdi, rax"], [71, "mov eax, 0"], [72, "call sub_46298A"], [73, "add rsp, 10h"], [74, "jmp short loc_4630ED"], [75, "nop"], [76, "mov eax, 1"], [77, "jmp locret_46335C"], [78, "mov rax, [rbp+var_10]"], [79, "mov eax, [rax+8]"], [80, "cmp eax, 64h "], [81, "jbe short loc_46310E"], [82, "mov rax, [rbp+var_10]"], [83, "mov dword ptr [rax+8], 64h "], [84, "mov rax, [rbp+var_38]"], [85, "mov eax, [rax+2DEE8h]"], [86, "mov [rbp+var_14], eax"], [87, "mov rax, [rbp+var_38]"], [88, "mov esi, 4"], [89, "mov rdi, rax"], [90, "call td_set_runstate"], [91, "mov rax, [rbp+var_8]"], [92, "mov dword ptr [rax+0B28h], 1"], [93, "mov rax, [rbp+var_8]"], [94, "mov dword ptr [rax+0B2Ch], 0"], [95, "mov rax, [rbp+var_8]"], [96, "mov dword ptr [rax+0B24h], 0"], [97, "mov rax, [rbp+var_10]"], [98, "mov eax, [rax+0Ch]"], [99, "mov edx, eax"], [100, "mov rax, [rbp+var_10]"], [101, "mov eax, [rax+8]"], [102, "mov ecx, 64h "], [103, "sub ecx, eax"], [104, "mov eax, ecx"], [105, "imul rax, rdx"], [106, "mov rdx, [rbp+var_10]"], [107, "mov edx, [rdx+8]"], [108, "mov esi, edx"], [109, "mov edx, 0"], [110, "div rsi"], [111, "mov edx, eax"], [112, "mov rax, [rbp+var_8]"], [113, "mov [rax+0B20h], edx"], [114, "mov rax, [rbp+var_8]"], [115, "mov dword ptr [rax+1DCh], 1"], [116, "mov rax, [rbp+var_8]"], [117, "mov edx, [rax+1DCh]"], [118, "mov rax, [rbp+var_8]"], [119, "mov [rax+1D8h], edx"], [120, "mov rax, [rbp+var_10]"], [121, "mov eax, [rax+10h]"], [122, "test eax, eax"], [123, "jz short loc_4631C4"], [124, "cmp eax, 1"], [125, "jz short loc_4631D5"], [126, "jmp short loc_4631E6"], [127, "mov rax, [rbp+var_38]"], [128, "mov rdi, rax"], [129, "call sub_462CF5"], [130, "jmp loc_463346"], [131, "mov rax, [rbp+var_38]"], [132, "mov rdi, rax"], [133, "call sub_462D9C"], [134, "jmp loc_463346"], [135, "mov rax, [rbp+var_10]"], [136, "mov edx, [rax+10h]"], [137, "lea rax, [rbp+ptr]"], [138, "mov esi, offset aBadCpuEngineMo"], [139, "mov rdi, rax"], [140, "mov eax, 0"], [141, "call _asprintf"], [142, "test eax, eax"], [143, "jns short loc_46320F"], [144, "mov [rbp+ptr], 0"], [145, "mov [rbp+var_18], 16h"], [146, "mov rax, [rbp+var_38]"], [147, "mov eax, [rax+2DEC0h]"], [148, "test eax, eax"], [149, "jnz short loc_463288"], [150, "mov edx, [rbp+var_18]"], [151, "mov rax, [rbp+var_38]"], [152, "mov [rax+2DEC0h], edx"], [153, "mov rax, [rbp+var_38]"], [154, "mov eax, [rax+2E96Ch]"], [155, "test eax, eax"], [156, "jnz short loc_463289"], [157, "mov rax, [rbp+ptr]"], [158, "test rax, rax"], [159, "jnz short loc_46324D"], [160, "mov eax, offset asc_4CDBB9"], [161, "mov rdx, [rbp+var_38]"], [162, "lea rdi, [rdx+2EA40h]"], [163, "sub rsp, 8"], [164, "push rax"], [165, "mov r9d, offset aFioCpuioInit"], [166, "mov r8d, 120h"], [167, "mov ecx, offset aEnginesCpuC"], [168, "mov edx, offset aFileSDFuncSErr_6"], [169, "mov esi, 80h"], [170, "mov eax, 0"], [171, "call sub_46298A"], [172, "add rsp, 10h"], [173, "jmp short loc_463289"], [174, "nop"], [175, "mov rax, [rbp+var_38]"], [176, "mov rax, [rax+2DC70h]"], [177, "test rax, rax"], [178, "jz loc_463333"], [179, "mov [rbp+var_1C], 16h"], [180, "mov rax, [rbp+var_38]"], [181, "mov rax, [rax+2DC70h]"], [182, "mov eax, [rax+2DEC0h]"], [183, "test eax, eax"], [184, "jnz short loc_463332"], [185, "mov rax, [rbp+var_38]"], [186, "mov rax, [rax+2DC70h]"], [187, "mov edx, [rbp+var_1C]"], [188, "mov [rax+2DEC0h], edx"], [189, "mov rax, [rbp+var_38]"], [190, "mov rax, [rax+2DC70h]"], [191, "mov eax, [rax+2E96Ch]"], [192, "test eax, eax"], [193, "jnz short loc_463333"], [194, "mov rax, [rbp+ptr]"], [195, "test rax, rax"], [196, "jnz short loc_4632F0"], [197, "mov eax, offset asc_4CDBB9"], [198, "mov rdx, [rbp+var_38]"], [199, "mov rdx, [rdx+2DC70h]"], [200, "lea rdi, [rdx+2EA40h]"], [201, "sub rsp, 8"], [202, "push rax"], [203, "mov r9d, offset aFioCpuioInit"], [204, "mov r8d, 120h"], [205, "mov ecx, offset aEnginesCpuC"], [206, "mov edx, offset aFileSDFuncSErr_6"], [207, "mov esi, 80h"], [208, "mov eax, 0"], [209, "call sub_46298A"], [210, "add rsp, 10h"], [211, "jmp short loc_463333"], [212, "nop"], [213, "mov rax, [rbp+ptr]"], [214, "mov rdi, rax"], [215, "call _free"], [216, "mov eax, 1"], [217, "jmp short locret_46335C"], [218, "mov edx, [rbp+var_14]"], [219, "mov rax, [rbp+var_38]"], [220, "mov esi, edx"], [221, "mov rdi, rax"], [222, "call td_set_runstate"], [223, "mov eax, 0"], [224, "leave"], [225, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 3], [8, 7], [9, 8], [10, 9], [11, 10], [12, 11], [13, 12], [15, 3], [16, 15], [17, 16], [18, 17], [19, 14], [20, 3], [21, 20], [21, 19], [22, 3], [23, 22], [23, 21], [24, 23], [25, 24], [26, 3], [27, 26], [28, 2], [35, 27], [38, 28], [41, 3], [42, 41], [42, 21], [43, 42], [44, 43], [46, 3], [47, 46], [47, 21], [48, 47], [48, 21], [49, 48], [50, 49], [51, 3], [52, 51], [52, 21], [52, 54], [53, 45], [54, 53], [54, 52], [55, 3], [56, 55], [56, 54], [57, 54], [57, 56], [58, 57], [59, 58], [60, 3], [61, 54], [61, 21], [61, 60], [62, 61], [63, 38], [63, 2], [70, 62], [73, 63], [78, 9], [79, 78], [80, 79], [81, 80], [82, 9], [83, 82], [84, 3], [85, 119], [85, 84], [85, 113], [85, 115], [85, 83], [85, 92], [85, 94], [85, 96], [86, 85], [87, 3], [89, 87], [91, 6], [92, 91], [93, 6], [94, 93], [95, 6], [96, 95], [97, 9], [98, 96], [98, 97], [99, 98], [100, 9], [101, 83], [101, 96], [101, 100], [103, 102], [103, 101], [104, 103], [105, 104], [105, 99], [106, 9], [107, 106], [107, 96], [108, 107], [110, 108], [111, 105], [112, 6], [113, 112], [113, 111], [114, 6], [115, 114], [116, 6], [117, 116], [117, 115], [118, 6], [119, 118], [119, 117], [120, 9], [121, 119], [121, 120], [122, 121], [123, 122], [124, 122], [125, 124], [127, 3], [128, 127], [131, 3], [132, 131], [135, 9], [136, 94], [136, 96], [136, 135], [136, 83], [136, 113], [136, 115], [136, 92], [136, 119], [137, 135], [139, 137], [142, 141], [143, 142], [146, 3], [147, 94], [147, 96], [147, 146], [147, 83], [147, 113], [147, 115], [147, 92], [147, 119], [148, 147], [149, 148], [150, 145], [151, 3], [152, 151], [152, 150], [153, 3], [154, 153], [154, 152], [155, 154], [156, 155], [157, 144], [158, 157], [159, 158], [161, 3], [162, 113], [162, 161], [162, 115], [162, 92], [162, 119], [162, 94], [162, 96], [162, 139], [162, 152], [162, 83], [163, 2], [164, 158], [164, 160], [172, 163], [175, 3], [176, 94], [176, 96], [176, 152], [176, 175], [176, 113], [176, 115], [176, 83], [176, 92], [176, 119], [177, 176], [178, 177], [180, 3], [181, 119], [181, 94], [181, 96], [181, 180], [181, 152], [181, 83], [181, 92], [181, 113], [181, 115], [182, 152], [182, 83], [182, 113], [182, 115], [182, 181], [182, 92], [182, 119], [182, 94], [182, 96], [183, 182], [184, 183], [185, 3], [186, 152], [186, 83], [186, 92], [186, 113], [186, 115], [186, 188], [186, 119], [186, 94], [186, 185], [186, 96], [187, 179], [188, 187], [188, 186], [189, 3], [190, 188], [190, 189], [191, 188], [191, 190], [192, 191], [193, 192], [194, 144], [195, 194], [196, 195], [198, 3], [199, 198], [199, 152], [199, 83], [199, 113], [199, 115], [199, 188], [199, 92], [199, 119], [199, 94], [199, 96], [200, 115], [200, 188], [200, 199], [200, 92], [200, 119], [200, 94], [200, 96], [200, 162], [200, 139], [200, 152], [200, 83], [200, 113], [201, 172], [201, 2], [202, 195], [202, 197], [210, 201], [213, 144], [214, 213], [218, 86], [219, 3], [220, 218], [221, 219], [225, 223], [225, 216], [225, 76]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b_da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b.jsonl.gz", "strip_func_name": "sub_462FA3", "query": "\n\n\n__int64 __fastcall sub_462FA3(__int64 a1)\n{\n__int64 v2; // r8\n__int64 v3; // r9\n__int64 v4; // rcx\nunsigned __int64 v5; // rsi\n__int64 v6; // rdx\nint v7; // eax\nchar *v8; // rax\nchar *v9; // rax\nchar *ptr; // [rsp+10h] [rbp-30h] BYREF\nint v11; // [rsp+1Ch] [rbp-24h]\nint v12; // [rsp+20h] [rbp-20h]\nint v13; // [rsp+24h] [rbp-1Ch]\nint v14; // [rsp+28h] [rbp-18h]\nunsigned int v15; // [rsp+2Ch] [rbp-14h]\n_DWORD *v16; // [rsp+30h] [rbp-10h]\n_DWORD *v17; // [rsp+38h] [rbp-8h]\n\nv17 = (_DWORD *)(a1 + 24);\nv16 = *(_DWORD **)(a1 + 3280);\nif ( !v16[2] )\n{\nv12 = 22;\nif ( !*(_DWORD *)(a1 + 188096) )\n{\n*(_DWORD *)(a1 + 188096) = v12;\nif ( !*(_DWORD *)(a1 + 190828) )\nsub_46298A(\n(char *)(a1 + 191040),\n0x80uLL,\n\"file:%s:%d, func=%s, error=%s\",\n(__int64)\"engines/cpu.c\",\n251LL,\n(__int64)\"cpuio\",\n\"cpu thread needs rate (cpuload=)\");\n}\nif ( *(_QWORD *)(a1 + 187504) )\n{\nv11 = 22;\nif ( !*(_DWORD *)(*(_QWORD *)(a1 + 187504) + 188096LL) )\n{\n*(_DWORD *)(*(_QWORD *)(a1 + 187504) + 188096LL) = v11;\nif ( !*(_DWORD *)(*(_QWORD *)(a1 + 187504) + 190828LL) )\nsub_46298A(\n(char *)(*(_QWORD *)(a1 + 187504) + 191040LL),\n0x80uLL,\n\"file:%s:%d, func=%s, error=%s\",\n(__int64)\"engines/cpu.c\",\n251LL,\n(__int64)\"cpuio\",\n\"cpu thread needs rate (cpuload=)\");\n}\n}\nreturn 1LL;\n}\nif ( v16[2] > 0x64u )\nv16[2] = 100;\nv15 = *(_DWORD *)(a1 + 188136);\ntd_set_runstate(a1, 4LL);\nv17[714] = 1;\nv17[715] = 0;\nv17[713] = 0;\nv4 = (unsigned int)(100 - v16[2]);\nv5 = (unsigned int)v16[2];\nv17[712] = (unsigned __int64)(unsigned int)v16[3] * v4 / v5;\nv17[119] = 1;\nv6 = (unsigned int)v17[119];\nv17[118] = v6;\nv7 = v16[4];\nif ( !v7 )\n{\nsub_462CF5((__int64 *)a1, v5, v6, v4, v2, v3);\nLABEL_31:\ntd_set_runstate(a1, v15);\nreturn 0LL;\n}\nif ( v7 == 1 )\n{\nsub_462D9C(a1);\ngoto LABEL_31;\n}\nif ( asprintf(&ptr, \"bad cpu engine mode: %d\", (unsigned int)v16[4]) < 0 )\nptr = 0LL;\nv14 = 22;\nif ( !*(_DWORD *)(a1 + 188096) )\n{\n*(_DWORD *)(a1 + 188096) = v14;\nif ( !*(_DWORD *)(a1 + 190828) )\n{\nv8 = ptr;\nif ( !ptr )\nv8 = \"(?)\";\nsub_46298A(\n(char *)(a1 + 191040),\n0x80uLL,\n\"file:%s:%d, func=%s, error=%s\",\n(__int64)\"engines/cpu.c\",\n288LL,\n(__int64)\"fio_cpuio_init\",\nv8);\n}\n}\nif ( *(_QWORD *)(a1 + 187504) )\n{\nv13 = 22;\nif ( !*(_DWORD *)(*(_QWORD *)(a1 + 187504) + 188096LL) )\n{\n*(_DWORD *)(*(_QWORD *)(a1 + 187504) + 188096LL) = v13;\nif ( !*(_DWORD *)(*(_QWORD *)(a1 + 187504) + 190828LL) )\n{\nv9 = ptr;\nif ( !ptr )\nv9 = \"(?)\";\nsub_46298A(\n(char *)(*(_QWORD *)(a1 + 187504) + 191040LL),\n0x80uLL,\n\"file:%s:%d, func=%s, error=%s\",\n(__int64)\"engines/cpu.c\",\n288LL,\n(__int64)\"fio_cpuio_init\",\nv9);\n}\n}\n}\nfree(ptr);\nreturn 1LL;\n}\n\n\n\nQ:[a1,ptr,v11,v12,v13,v14,v15,v16,v17,sub_462FA3,sub_46298A,sub_462CF5,sub_462D9C,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'td', 'ptr': 'msg', 'v11': '____e_0', 'v12': '____e', 'v13': '____e_2', 'v14': '____e_1', 'v15': 'td_previous_state', 'v16': 'co', 'v17': 'o', 'sub_462FA3': 'fio_cpuio_init', 'sub_46298A': 'nowarn_snprintf_6', 'sub_462CF5': 'noop_init', 'sub_462D9C': 'qsort_init'}"}
getdvalue
3338a0b9de8a3b0952f3ae34d893132d78cea08802622bb0e6676f3dd6286b6c
OpenIPC
firmware
NA
unsigned long getdvalue(void) { float f; gettoken(); skipspaces(); sscanf(token,"%f",&f); f+=0.00001; /* Rounding errors */ return(100.0*f); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404E93", "function_addr": 4214419, "binary_name": "3338a0b9de8a3b0952f3ae34d893132d78cea08802622bb0e6676f3dd6286b6c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "call sub_40307B"], [4, "call sub_402F1D"], [5, "lea rax, [rbp+var_4]"], [6, "mov rdx, rax"], [7, "mov esi, offset unk_409780"], [8, "mov edi, offset s1"], [9, "mov eax, 0"], [10, "call ___isoc99_sscanf"], [11, "movss xmm0, [rbp+var_4]"], [12, "pxor xmm1, xmm1"], [13, "cvtss2sd xmm1, xmm0"], [14, "movsd xmm0, cs:qword_40A128"], [15, "addsd xmm0, xmm1"], [16, "cvtsd2ss xmm0, xmm0"], [17, "movss [rbp+var_4], xmm0"], [18, "movss xmm0, [rbp+var_4]"], [19, "pxor xmm1, xmm1"], [20, "cvtss2sd xmm1, xmm0"], [21, "movsd xmm0, cs:qword_40A130"], [22, "mulsd xmm0, xmm1"], [23, "comisd xmm0, cs:qword_40A138"], [24, "jnb short loc_404F0C"], [25, "cvttsd2si rax, xmm0"], [26, "jmp short locret_404F2A"], [27, "movsd xmm1, cs:qword_40A138"], [28, "subsd xmm0, xmm1"], [29, "cvttsd2si rax, xmm0"], [30, "mov rdx, 8000000000000000h"], [31, "xor rax, rdx"], [32, "leave"], [33, "retn"]], "data_dep": [[5, 4], [6, 5], [13, 11], [13, 12], [15, 14], [15, 13], [16, 15], [17, 16], [18, 17], [20, 19], [20, 18], [22, 20], [22, 21], [23, 22], [24, 2], [25, 23], [25, 10], [28, 27], [28, 23], [29, 10], [29, 28], [31, 29], [31, 30], [33, 25], [33, 31]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3338a0b9de8a3b0952f3ae34d893132d78cea08802622bb0e6676f3dd6286b6c_3338a0b9de8a3b0952f3ae34d893132d78cea08802622bb0e6676f3dd6286b6c.jsonl.gz", "strip_func_name": "sub_404E93", "query": "\n\n\nunsigned __int64 sub_404E93()\n{\nfloat v0; // xmm0_4\ndouble v1; // xmm0_8\nunsigned __int64 result; // rax\nfloat v3; // [rsp+Ch] [rbp-4h]\n\nsub_40307B();\nsub_402F1D();\n__isoc99_sscanf();\nv0 = v3 + 0.00001;\nv1 = 100.0 * v0;\nif ( v1 >= 9.223372036854776e18 )\nresult = (unsigned int)(int)(v1 - 9.223372036854776e18) ^ 0x8000000000000000LL;\nelse\nresult = (unsigned int)(int)v1;\nreturn result;\n}\n\n\n\nQ:[v3,sub_404E93,sub_40307B,sub_402F1D,]\nAssistant: ", "hints": "[]", "response": "{'v3': 'f', 'sub_404E93': 'getdvalue', 'sub_40307B': 'gettoken', 'sub_402F1D': 'skipspaces'}"}
mesh_trigger_iv_update
1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca
micropython
micropython-unicorn
NA
void mesh_trigger_iv_update(void){ if (global_iv_update_active) return; // "A node shall not start an IV Update procedure more often than once every 192 hours." // Unless triggered by user application, it will automatically triggered if sequene numbers are about to roll over // "A node shall defer state change from IV Update in Progress to Normal Operation, as defined by this procedure, // when the node has transmitted a Segmented Access message or a Segmented Control message without receiving the // corresponding Segment Acknowledgment messages. The deferred change of the state shall be executed when the appropriate // Segment Acknowledgment message is received or timeout for the delivery of this message is reached. // // Note: This requirement is necessary because upon completing the IV Update procedure the sequence number is reset // to 0x000000 and the SeqAuth value would not be valid." // set IV Update in Progress global_iv_update_active = 1; // increase IV index global_iv_index++; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43B0A4", "function_addr": 4436132, "binary_name": "1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, cs:dword_47528C"], [3, "test eax, eax"], [4, "jnz short loc_43B0CD"], [5, "mov cs:dword_47528C, 1"], [6, "mov eax, cs:dword_475288"], [7, "add eax, 1"], [8, "mov cs:dword_475288, eax"], [9, "jmp short loc_43B0CE"], [10, "nop"], [11, "pop rbp"], [12, "retn"]], "data_dep": [[3, 2], [4, 3], [7, 6], [8, 7], [11, 0], [12, 7], [12, 3]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca_1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca.jsonl.gz", "strip_func_name": "sub_43B0A4", "query": "\n\n\n__int64 sub_43B0A4()\n{\n__int64 result; // rax\n\nresult = (unsigned int)dword_47528C;\nif ( !dword_47528C )\n{\ndword_47528C = 1;\nresult = (unsigned int)++dword_475288;\n}\nreturn result;\n}\n\n\n\nQ:[sub_43B0A4,]\nAssistant: ", "hints": "[]", "response": "{'sub_43B0A4': 'mesh_trigger_iv_update'}"}
l_add_ship
d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f
smcameron
space-nerds-in-space
NA
static int l_add_ship(lua_State *l) { const char *name; double x, y, z, ar; double shiptype, the_faction; int i, auto_respawn; name = lua_tostring(l, 1); x = lua_tonumber(l, 2); y = lua_tonumber(l, 3); z = lua_tonumber(l, 4); shiptype = lua_tonumber(l, 5); the_faction = lua_tonumber(l, 6); ar = lua_tonumber(l, 7); auto_respawn = (ar > 0.999); if (shiptype < 0 || shiptype > nshiptypes - 1) { lua_pushnil(l); return 1; } pthread_mutex_lock(&universe_mutex); i = add_specific_ship(name, x, y, z, (uint8_t) shiptype % nshiptypes, (uint8_t) the_faction % nfactions(), auto_respawn); if (i < 0) lua_pushnil(l); else lua_pushnumber(l, (double) go[i].id); pthread_mutex_unlock(&universe_mutex); return 1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_46FAA6", "function_addr": 4651686, "binary_name": "d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 58h"], [4, "mov [rbp+var_58], rdi"], [5, "mov rax, [rbp+var_58]"], [6, "mov edx, 0"], [7, "mov esi, 1"], [8, "mov rdi, rax"], [9, "call _lua_tolstring"], [10, "mov [rbp+var_48], rax"], [11, "mov rax, [rbp+var_58]"], [12, "mov edx, 0"], [13, "mov esi, 2"], [14, "mov rdi, rax"], [15, "call _lua_tonumberx"], [16, "movq rax, xmm0"], [17, "mov [rbp+var_40], rax"], [18, "mov rax, [rbp+var_58]"], [19, "mov edx, 0"], [20, "mov esi, 3"], [21, "mov rdi, rax"], [22, "call _lua_tonumberx"], [23, "movq rax, xmm0"], [24, "mov [rbp+var_38], rax"], [25, "mov rax, [rbp+var_58]"], [26, "mov edx, 0"], [27, "mov esi, 4"], [28, "mov rdi, rax"], [29, "call _lua_tonumberx"], [30, "movq rax, xmm0"], [31, "mov [rbp+var_30], rax"], [32, "mov rax, [rbp+var_58]"], [33, "mov edx, 0"], [34, "mov esi, 5"], [35, "mov rdi, rax"], [36, "call _lua_tonumberx"], [37, "movq rax, xmm0"], [38, "mov [rbp+var_28], rax"], [39, "mov rax, [rbp+var_58]"], [40, "mov edx, 0"], [41, "mov esi, 6"], [42, "mov rdi, rax"], [43, "call _lua_tonumberx"], [44, "movq rax, xmm0"], [45, "mov [rbp+var_20], rax"], [46, "mov rax, [rbp+var_58]"], [47, "mov edx, 0"], [48, "mov esi, 7"], [49, "mov rdi, rax"], [50, "call _lua_tonumberx"], [51, "movq rax, xmm0"], [52, "mov [rbp+var_18], rax"], [53, "movsd xmm0, [rbp+var_18]"], [54, "comisd xmm0, cs:qword_4F1140"], [55, "setnbe al"], [56, "movzx eax, al"], [57, "mov [rbp+var_50], eax"], [58, "pxor xmm0, xmm0"], [59, "comisd xmm0, [rbp+var_28]"], [60, "ja short loc_46FBC4"], [61, "mov eax, cs:dword_A39448"], [62, "sub eax, 1"], [63, "pxor xmm1, xmm1"], [64, "cvtsi2sd xmm1, eax"], [65, "movsd xmm0, [rbp+var_28]"], [66, "comisd xmm0, xmm1"], [67, "jbe short loc_46FBDA"], [68, "mov rax, [rbp+var_58]"], [69, "mov rdi, rax"], [70, "call _lua_pushnil"], [71, "mov eax, 1"], [72, "jmp loc_46FCE1"], [73, "mov edi, offset stru_A39380"], [74, "call _pthread_mutex_lock"], [75, "cvttsd2si eax, [rbp+var_20]"], [76, "movzx ebx, al"], [77, "call nfactions"], [78, "mov ecx, eax"], [79, "mov eax, ebx"], [80, "cdq"], [81, "idiv ecx"], [82, "mov ecx, edx"], [83, "mov eax, ecx"], [84, "movzx r8d, al"], [85, "cvttsd2si eax, [rbp+var_28]"], [86, "movzx eax, al"], [87, "mov ecx, cs:dword_A39448"], [88, "cdq"], [89, "idiv ecx"], [90, "mov eax, edx"], [91, "movzx esi, al"], [92, "mov edx, [rbp+var_50]"], [93, "movsd xmm1, [rbp+var_30]"], [94, "movsd xmm0, [rbp+var_38]"], [95, "mov rdi, [rbp+var_40]"], [96, "mov rax, [rbp+var_48]"], [97, "mov ecx, edx"], [98, "mov edx, r8d"], [99, "movapd xmm2, xmm1"], [100, "movapd xmm1, xmm0"], [101, "movq xmm0, rdi"], [102, "mov rdi, rax"], [103, "call sub_46F7F9"], [104, "mov [rbp+var_4C], eax"], [105, "cmp [rbp+var_4C], 0"], [106, "jns short loc_46FC5C"], [107, "mov rax, [rbp+var_58]"], [108, "mov rdi, rax"], [109, "call _lua_pushnil"], [110, "jmp short loc_46FCD2"], [111, "mov ebx, [rbp+var_4C]"], [112, "movsxd rax, ebx"], [113, "cmp rax, 1387h"], [114, "jbe short loc_46FC7A"], [115, "movsxd rax, ebx"], [116, "mov rsi, rax"], [117, "mov edi, offset off_517EC0"], [118, "call ___ubsan_handle_out_of_bounds"], [119, "movsxd rax, ebx"], [120, "imul rax, 9F0h"], [121, "add rax, 0A46120h"], [122, "mov eax, [rax]"], [123, "mov eax, eax"], [124, "test rax, rax"], [125, "js short loc_46FCA3"], [126, "pxor xmm3, xmm3"], [127, "cvtsi2sd xmm3, rax"], [128, "movq rax, xmm3"], [129, "jmp short loc_46FCC1"], [130, "mov rdx, rax"], [131, "shr rdx, 1"], [132, "and eax, 1"], [133, "or rdx, rax"], [134, "pxor xmm0, xmm0"], [135, "cvtsi2sd xmm0, rdx"], [136, "addsd xmm0, xmm0"], [137, "movq rax, xmm0"], [138, "mov rdx, [rbp+var_58]"], [139, "movq xmm0, rax"], [140, "mov rdi, rdx"], [141, "call _lua_pushnumber"], [142, "mov edi, offset stru_A39380"], [143, "call _pthread_mutex_unlock"], [144, "mov eax, 1"], [145, "mov rbx, [rbp+var_8]"], [146, "leave"], [147, "retn"]], "data_dep": [[5, 4], [8, 5], [10, 9], [11, 4], [14, 11], [17, 16], [18, 4], [21, 18], [24, 23], [25, 4], [28, 25], [31, 30], [32, 4], [35, 32], [38, 37], [39, 4], [42, 39], [45, 44], [46, 4], [49, 46], [52, 51], [53, 52], [54, 53], [55, 3], [55, 51], [56, 55], [57, 56], [59, 38], [59, 58], [60, 3], [62, 61], [64, 62], [64, 63], [65, 38], [66, 64], [66, 65], [67, 62], [68, 4], [69, 68], [75, 74], [75, 45], [76, 75], [78, 77], [79, 76], [81, 78], [82, 47], [83, 82], [84, 83], [85, 38], [85, 83], [86, 85], [89, 87], [90, 47], [91, 90], [92, 57], [93, 31], [94, 24], [95, 17], [96, 10], [97, 92], [98, 84], [99, 93], [100, 94], [101, 95], [102, 96], [104, 103], [105, 104], [106, 105], [107, 4], [108, 107], [111, 104], [112, 111], [113, 112], [114, 113], [115, 111], [116, 115], [119, 111], [120, 119], [121, 120], [122, 121], [123, 122], [124, 123], [125, 124], [127, 124], [127, 126], [128, 127], [130, 124], [131, 130], [132, 124], [133, 132], [133, 131], [135, 133], [135, 134], [136, 135], [137, 136], [138, 4], [139, 128], [139, 137], [140, 138], [147, 144], [147, 71]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f_d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f.jsonl.gz", "strip_func_name": "sub_46FAA6", "query": "\n\n\n__int64 __fastcall sub_46FAA6(double a1)\n{\n__int64 result; // rax\nint v2; // eax\nint v3; // [rsp+14h] [rbp-4Ch]\n__int64 v4; // [rsp+18h] [rbp-48h]\n\nv4 = lua_tolstring();\nlua_tonumberx();\nlua_tonumberx();\nlua_tonumberx();\nlua_tonumberx();\nlua_tonumberx();\nlua_tonumberx();\nif ( a1 >= 0.0 && a1 <= (double)(dword_A39448 - 1) )\n{\npthread_mutex_lock(&stru_A39380);\nv2 = nfactions(&stru_A39380, 7LL);\nv3 = sub_46F7F9(v4, (unsigned __int8)(int)a1 % dword_A39448, (unsigned __int8)(int)a1 % v2, a1 > 0.999, a1, a1, a1);\nif ( v3 >= 0 )\n{\nif ( (unsigned __int64)v3 > 0x1387 )\n__ubsan_handle_out_of_bounds();\nlua_pushnumber();\n}\nelse\n{\nlua_pushnil();\n}\npthread_mutex_unlock(&stru_A39380);\nresult = 1LL;\n}\nelse\n{\nlua_pushnil();\nresult = 1LL;\n}\nreturn result;\n}\n\n\n\nQ:[v2,v4,sub_46FAA6,sub_46F7F9,]\nAssistant: ", "hints": "[]", "response": "{'v2': 'result', 'v4': 'name', 'sub_46FAA6': 'l_add_ship', 'sub_46F7F9': 'add_specific_ship'}"}
write_data_worker
1f83c8a3267372d5740c42f791074f85bfc0410cc735051e6b363d1ae0faf252
syzygy1
tb
NA
static void write_data_worker(int t) { struct CompressState *state = &cmprs_state[t]; FILE *F = cmprs_F; uint8_t *src = cmprs_ptr; uint8_t *v = cmprs_v; while (1) { LOCK(cmprs_mutex); size_t idx = cmprs_idx; uint32_t chunk = min(COPYSIZE, cmprs_size - idx); cmprs_idx += chunk; UNLOCK(cmprs_mutex); if (chunk == 0) break; uint8_t *buf; if (v) { for (size_t i = 0; i < chunk; i++) state->buffer[i] = v[src[idx + i]]; buf = state->buffer; } else buf = src + idx; uint32_t cmprs_chunk = compress(state, state->frame->data, buf, chunk); state->frame->cmprs_chunk = cmprs_chunk; state->frame->chunk = chunk; state->frame->idx = idx; file_write(state->frame, cmprs_chunk + HEADER_SIZE, F); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42F4B6", "function_addr": 4388022, "binary_name": "1f83c8a3267372d5740c42f791074f85bfc0410cc735051e6b363d1ae0faf252.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_44], edi"], [4, "mov eax, [rbp+var_44]"], [5, "cdqe"], [6, "shl rax, 5"], [7, "add rax, 96BA580h"], [8, "mov [rbp+var_18], rax"], [9, "mov rax, cs:qword_96BA548"], [10, "mov [rbp+var_20], rax"], [11, "mov rax, cs:qword_96BA550"], [12, "mov [rbp+var_28], rax"], [13, "mov rax, cs:qword_96BA560"], [14, "mov [rbp+var_30], rax"], [15, "mov edi, offset stru_96BA520"], [16, "call _pthread_mutex_lock"], [17, "mov rax, cs:qword_96BA568"], [18, "mov [rbp+var_38], rax"], [19, "mov rax, cs:qword_96BA558"], [20, "sub rax, [rbp+var_38]"], [21, "mov edx, offset unk_A00000"], [22, "cmp rax, offset unk_A00000"], [23, "cmova rax, rdx"], [24, "mov [rbp+var_3C], eax"], [25, "mov edx, [rbp+var_3C]"], [26, "mov rax, cs:qword_96BA568"], [27, "add rax, rdx"], [28, "mov cs:qword_96BA568, rax"], [29, "mov edi, offset stru_96BA520"], [30, "call _pthread_mutex_unlock"], [31, "cmp [rbp+var_3C], 0"], [32, "jz loc_42F62D"], [33, "cmp [rbp+var_30], 0"], [34, "jz short loc_42F5AE"], [35, "mov [rbp+var_10], 0"], [36, "jmp short loc_42F598"], [37, "mov rdx, [rbp+var_38]"], [38, "mov rax, [rbp+var_10]"], [39, "add rdx, rax"], [40, "mov rax, [rbp+var_28]"], [41, "add rax, rdx"], [42, "movzx eax, byte ptr [rax]"], [43, "movzx edx, al"], [44, "mov rax, [rbp+var_30]"], [45, "lea rcx, [rdx+rax]"], [46, "mov rax, [rbp+var_18]"], [47, "mov rdx, [rax]"], [48, "mov rax, [rbp+var_10]"], [49, "add rdx, rax"], [50, "movzx eax, byte ptr [rcx]"], [51, "mov [rdx], al"], [52, "add [rbp+var_10], 1"], [53, "mov eax, [rbp+var_3C]"], [54, "cmp [rbp+var_10], rax"], [55, "jb short loc_42F560"], [56, "mov rax, [rbp+var_18]"], [57, "mov rax, [rax]"], [58, "mov [rbp+var_8], rax"], [59, "jmp short loc_42F5BD"], [60, "mov rdx, [rbp+var_28]"], [61, "mov rax, [rbp+var_38]"], [62, "add rax, rdx"], [63, "mov [rbp+var_8], rax"], [64, "mov ecx, [rbp+var_3C]"], [65, "mov rax, [rbp+var_18]"], [66, "mov rax, [rax+8]"], [67, "lea rsi, [rax+10h]"], [68, "mov rdx, [rbp+var_8]"], [69, "mov rax, [rbp+var_18]"], [70, "mov rdi, rax"], [71, "call sub_42F3B5"], [72, "mov [rbp+var_40], eax"], [73, "mov rax, [rbp+var_18]"], [74, "mov rax, [rax+8]"], [75, "mov edx, [rbp+var_40]"], [76, "mov [rax], edx"], [77, "mov rax, [rbp+var_18]"], [78, "mov rax, [rax+8]"], [79, "mov edx, [rbp+var_3C]"], [80, "mov [rax+4], edx"], [81, "mov rax, [rbp+var_18]"], [82, "mov rax, [rax+8]"], [83, "mov rdx, [rbp+var_38]"], [84, "mov [rax+8], rdx"], [85, "mov eax, [rbp+var_40]"], [86, "lea rcx, [rax+10h]"], [87, "mov rax, [rbp+var_18]"], [88, "mov rax, [rax+8]"], [89, "mov rdx, [rbp+var_20]"], [90, "mov rsi, rcx"], [91, "mov rdi, rax"], [92, "call sub_42F357"], [93, "jmp loc_42F4F5"], [94, "nop"], [95, "nop"], [96, "leave"], [97, "retn"]], "data_dep": [[4, 3], [6, 4], [7, 6], [8, 7], [10, 9], [12, 11], [14, 13], [17, 28], [18, 17], [20, 19], [20, 18], [22, 20], [23, 22], [23, 21], [24, 23], [25, 24], [26, 28], [27, 26], [27, 25], [28, 27], [31, 24], [32, 31], [33, 14], [34, 33], [37, 18], [38, 52], [38, 35], [39, 37], [39, 38], [40, 12], [41, 40], [41, 39], [42, 41], [42, 84], [42, 76], [42, 51], [42, 80], [43, 42], [44, 14], [45, 76], [45, 80], [45, 45], [45, 84], [45, 86], [45, 51], [45, 44], [46, 8], [47, 80], [47, 84], [47, 51], [47, 46], [47, 76], [48, 35], [48, 52], [49, 48], [49, 47], [50, 45], [50, 84], [50, 51], [50, 76], [50, 80], [51, 50], [51, 49], [52, 35], [52, 52], [53, 24], [54, 35], [54, 53], [54, 52], [55, 54], [56, 8], [57, 84], [57, 56], [57, 51], [57, 76], [57, 80], [58, 57], [60, 12], [61, 18], [62, 60], [62, 61], [63, 62], [64, 24], [65, 8], [66, 80], [66, 84], [66, 51], [66, 65], [66, 76], [67, 51], [67, 90], [67, 76], [67, 80], [67, 66], [67, 84], [68, 63], [68, 58], [69, 8], [70, 69], [72, 71], [73, 8], [74, 73], [74, 84], [74, 51], [74, 76], [74, 80], [75, 72], [76, 74], [76, 75], [77, 8], [78, 77], [78, 76], [78, 84], [79, 24], [80, 78], [80, 79], [81, 8], [82, 81], [82, 80], [82, 84], [83, 18], [84, 83], [84, 82], [85, 72], [86, 85], [86, 64], [86, 84], [87, 8], [88, 87], [88, 84], [89, 10], [90, 86], [91, 88], [97, 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/1f83c8a3267372d5740c42f791074f85bfc0410cc735051e6b363d1ae0faf252_1f83c8a3267372d5740c42f791074f85bfc0410cc735051e6b363d1ae0faf252.jsonl.gz", "strip_func_name": "sub_42F4B6", "query": "\n\n\nint __fastcall sub_42F4B6(int a1)\n{\nvoid *v1; // rax\nint result; // eax\nunsigned int v3; // eax\nunsigned int v4; // [rsp+14h] [rbp-3Ch]\n__int64 v5; // [rsp+18h] [rbp-38h]\n__int64 v6; // [rsp+20h] [rbp-30h]\n__int64 v7; // [rsp+28h] [rbp-28h]\nFILE *v8; // [rsp+30h] [rbp-20h]\nunsigned __int64 i; // [rsp+40h] [rbp-10h]\n\nv8 = (FILE *)qword_96BA548;\nv7 = qword_96BA550;\nv6 = qword_96BA560;\nwhile ( 1 )\n{\npthread_mutex_lock(&stru_96BA520);\nv5 = qword_96BA568;\nLODWORD(v1) = qword_96BA558 - qword_96BA568;\nif ( qword_96BA558 - qword_96BA568 > (unsigned __int64)&unk_A00000 )\nv1 = &unk_A00000;\nv4 = (unsigned int)v1;\nqword_96BA568 += (unsigned int)v1;\nresult = pthread_mutex_unlock(&stru_96BA520);\nif ( !v4 )\nbreak;\nif ( v6 )\n{\nfor ( i = 0LL; i < v4; ++i )\n*(_BYTE *)(i + qword_96BA580[4 * a1]) = *(_BYTE *)(*(unsigned __int8 *)(i + v5 + v7) + v6);\nv3 = sub_42F3B5(32LL * a1 + 158049664, qword_96BA588[4 * a1] + 16LL, qword_96BA580[4 * a1], v4);\n}\nelse\n{\nv3 = sub_42F3B5(32LL * a1 + 158049664, qword_96BA588[4 * a1] + 16LL, v7 + v5, v4);\n}\n*(_DWORD *)qword_96BA588[4 * a1] = v3;\n*(_DWORD *)(qword_96BA588[4 * a1] + 4LL) = v4;\n*(_QWORD *)(qword_96BA588[4 * a1] + 8LL) = v5;\nsub_42F357((const void *)qword_96BA588[4 * a1], v3 + 16LL, v8);\n}\nreturn result;\n}\n\n\n\nQ:[a1,v4,v5,v6,v7,v8,sub_42F4B6,sub_42F3B5,sub_42F357,]\nAssistant: ", "hints": "[]", "response": "{'a1': 't', 'v4': 'chunk', 'v5': 'idx', 'v6': 'v', 'v7': 'src', 'v8': 'F', 'sub_42F4B6': 'write_data_worker', 'sub_42F3B5': 'compress', 'sub_42F357': 'file_write'}"}
test_PACKET_get_length_prefixed_2
3b7724d52f3d66bd004eb734b0800fb7eee7531f9f63a6710843e09b24931828
sniperHW
chuck
NA
static int test_PACKET_get_length_prefixed_2() { unsigned char buf[1024]; const size_t len = 516; /* 0x0204 */ unsigned int i; PACKET pkt, short_pkt, subpkt; for (i = 1; i <= 1024; i++) { buf[i-1] = (i * 2) & 0xff; } if ( !PACKET_buf_init(&pkt, buf, 1024) || !PACKET_buf_init(&short_pkt, buf, len) || !PACKET_get_length_prefixed_2(&pkt, &subpkt) || PACKET_remaining(&subpkt) != len || !PACKET_get_net_2(&subpkt, &i) || i != 0x0608 || PACKET_get_length_prefixed_2(&short_pkt, &subpkt) || PACKET_remaining(&short_pkt) != len) { fprintf(stderr, "test_PACKET_get_length_prefixed_2() failed\n"); return 0; } return 1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402FCB", "function_addr": 4206539, "binary_name": "3b7724d52f3d66bd004eb734b0800fb7eee7531f9f63a6710843e09b24931828.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 450h"], [3, "mov [rbp+var_8], 204h"], [4, "mov [rbp+var_414], 1"], [5, "jmp short loc_403016"], [6, "mov eax, [rbp+var_414]"], [7, "mov ecx, eax"], [8, "mov eax, [rbp+var_414]"], [9, "lea edx, [rax-1]"], [10, "lea eax, [rcx+rcx]"], [11, "mov edx, edx"], [12, "mov [rbp+rdx+var_410], al"], [13, "mov eax, [rbp+var_414]"], [14, "add eax, 1"], [15, "mov [rbp+var_414], eax"], [16, "mov eax, [rbp+var_414]"], [17, "cmp eax, 400h"], [18, "jbe short loc_402FEA"], [19, "lea rcx, [rbp+var_410]"], [20, "lea rax, [rbp+var_430]"], [21, "mov edx, 400h"], [22, "mov rsi, rcx"], [23, "mov rdi, rax"], [24, "call sub_40125C"], [25, "test eax, eax"], [26, "jz loc_4030FC"], [27, "mov rdx, [rbp+var_8]"], [28, "lea rcx, [rbp+var_410]"], [29, "lea rax, [rbp+var_440]"], [30, "mov rsi, rcx"], [31, "mov rdi, rax"], [32, "call sub_40125C"], [33, "test eax, eax"], [34, "jz loc_4030FC"], [35, "lea rdx, [rbp+var_450]"], [36, "lea rax, [rbp+var_430]"], [37, "mov rsi, rdx"], [38, "mov rdi, rax"], [39, "call sub_401C0E"], [40, "test eax, eax"], [41, "jz short loc_4030FC"], [42, "lea rax, [rbp+var_450]"], [43, "mov rdi, rax"], [44, "call sub_40121D"], [45, "cmp [rbp+var_8], rax"], [46, "jnz short loc_4030FC"], [47, "lea rdx, [rbp+var_414]"], [48, "lea rax, [rbp+var_450]"], [49, "mov rsi, rdx"], [50, "mov rdi, rax"], [51, "call sub_40140D"], [52, "test eax, eax"], [53, "jz short loc_4030FC"], [54, "mov eax, [rbp+var_414]"], [55, "cmp eax, 608h"], [56, "jnz short loc_4030FC"], [57, "lea rdx, [rbp+var_450]"], [58, "lea rax, [rbp+var_440]"], [59, "mov rsi, rdx"], [60, "mov rdi, rax"], [61, "call sub_401C0E"], [62, "test eax, eax"], [63, "jnz short loc_4030FC"], [64, "lea rax, [rbp+var_440]"], [65, "mov rdi, rax"], [66, "call sub_40121D"], [67, "cmp [rbp+var_8], rax"], [68, "jz short loc_403121"], [69, "mov rax, cs:stderr"], [70, "mov rcx, rax"], [71, "mov edx, 2Bh "], [72, "mov esi, 1"], [73, "mov edi, offset aTestPacketGetL_0"], [74, "call _fwrite"], [75, "mov eax, 0"], [76, "jmp short locret_403126"], [77, "mov eax, 1"], [78, "leave"], [79, "retn"]], "data_dep": [[6, 15], [6, 4], [7, 6], [8, 15], [8, 4], [9, 8], [9, 11], [10, 8], [10, 7], [11, 9], [12, 10], [12, 11], [13, 4], [13, 15], [14, 13], [15, 14], [16, 4], [16, 15], [17, 16], [18, 17], [19, 7], [20, 16], [22, 19], [23, 20], [25, 24], [26, 25], [27, 3], [28, 19], [29, 25], [30, 28], [31, 29], [33, 32], [34, 33], [35, 27], [36, 33], [37, 35], [38, 36], [40, 39], [41, 40], [42, 40], [43, 42], [45, 3], [45, 44], [46, 45], [47, 4], [47, 15], [47, 35], [48, 44], [49, 47], [50, 48], [52, 51], [53, 52], [54, 15], [54, 4], [55, 54], [56, 55], [57, 47], [58, 54], [59, 57], [60, 58], [62, 61], [63, 62], [64, 62], [65, 64], [67, 3], [67, 66], [68, 67], [70, 69], [79, 75], [79, 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/3b7724d52f3d66bd004eb734b0800fb7eee7531f9f63a6710843e09b24931828_3b7724d52f3d66bd004eb734b0800fb7eee7531f9f63a6710843e09b24931828.jsonl.gz", "strip_func_name": "sub_402FCB", "query": "\n\n\n__int64 sub_402FCB()\n{\n__int64 v0; // rax\n__int64 v1; // rax\nunsigned __int8 *v3[2]; // [rsp+0h] [rbp-450h] BYREF\n_QWORD v4[2]; // [rsp+10h] [rbp-440h] BYREF\n_QWORD v5[3]; // [rsp+20h] [rbp-430h] BYREF\nunsigned int i; // [rsp+3Ch] [rbp-414h] BYREF\nchar v7[1032]; // [rsp+40h] [rbp-410h] BYREF\n__int64 v8; // [rsp+448h] [rbp-8h]\n\nv8 = 516LL;\nfor ( i = 1; i <= 0x400; ++i )\nv7[i - 1] = 2 * i;\nif ( (unsigned int)sub_40125C(v5, (__int64)v7, 1024LL) )\n{\nif ( (unsigned int)sub_40125C(v4, (__int64)v7, v8) )\n{\nif ( (unsigned int)sub_401C0E((__int64)v5, v3) )\n{\nv0 = sub_40121D((__int64)v3);\nif ( v8 == v0 )\n{\nif ( (unsigned int)sub_40140D(v3, &i) )\n{\nif ( i == 1544 && !(unsigned int)sub_401C0E((__int64)v4, v3) )\n{\nv1 = sub_40121D((__int64)v4);\nif ( v8 == v1 )\nreturn 1LL;\n}\n}\n}\n}\n}\n}\nfwrite(\"test_PACKET_get_length_prefixed_2() failed\\n\", 1uLL, 0x2BuLL, stderr);\nreturn 0LL;\n}\n\n\n\nQ:[v3,v4,v5,v7,v8,sub_402FCB,sub_40125C,sub_401C0E,sub_40121D,sub_40140D,]\nAssistant: ", "hints": "[]", "response": "{'v3': 'subpkt', 'v4': 'short_pkt', 'v5': 'pkt', 'v7': 'buf', 'v8': 'len', 'sub_402FCB': 'test_PACKET_get_length_prefixed_2', 'sub_40125C': 'PACKET_buf_init', 'sub_401C0E': 'PACKET_get_length_prefixed_2', 'sub_40121D': 'PACKET_remaining', 'sub_40140D': 'PACKET_get_net_2'}"}
imdct_step3_inner_s_loop
cc8273d1e3c0b53b6c493240b38dac1771ed2b3f26727a492d394ac9aa721f2b
cloudflare
cloudflare-workers-wasm-demo
NA
static void imdct_step3_inner_s_loop(int n, float *e, int i_off, int k_off, float *A, int a_off, int k0) { int i; float A0 = A[0]; float A1 = A[0+1]; float A2 = A[0+a_off]; float A3 = A[0+a_off+1]; float A4 = A[0+a_off*2+0]; float A5 = A[0+a_off*2+1]; float A6 = A[0+a_off*3+0]; float A7 = A[0+a_off*3+1]; float k00,k11; float *ee0 = e +i_off; float *ee2 = ee0+k_off; for (i=n; i > 0; --i) { k00 = ee0[ 0] - ee2[ 0]; k11 = ee0[-1] - ee2[-1]; ee0[ 0] = ee0[ 0] + ee2[ 0]; ee0[-1] = ee0[-1] + ee2[-1]; ee2[ 0] = (k00) * A0 - (k11) * A1; ee2[-1] = (k11) * A0 + (k00) * A1; k00 = ee0[-2] - ee2[-2]; k11 = ee0[-3] - ee2[-3]; ee0[-2] = ee0[-2] + ee2[-2]; ee0[-3] = ee0[-3] + ee2[-3]; ee2[-2] = (k00) * A2 - (k11) * A3; ee2[-3] = (k11) * A2 + (k00) * A3; k00 = ee0[-4] - ee2[-4]; k11 = ee0[-5] - ee2[-5]; ee0[-4] = ee0[-4] + ee2[-4]; ee0[-5] = ee0[-5] + ee2[-5]; ee2[-4] = (k00) * A4 - (k11) * A5; ee2[-5] = (k11) * A4 + (k00) * A5; k00 = ee0[-6] - ee2[-6]; k11 = ee0[-7] - ee2[-7]; ee0[-6] = ee0[-6] + ee2[-6]; ee0[-7] = ee0[-7] + ee2[-7]; ee2[-6] = (k00) * A6 - (k11) * A7; ee2[-7] = (k11) * A6 + (k00) * A7; ee0 -= k0; ee2 -= k0; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405DC6", "function_addr": 4218310, "binary_name": "cc8273d1e3c0b53b6c493240b38dac1771ed2b3f26727a492d394ac9aa721f2b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_44], edi"], [3, "mov [rbp+var_50], rsi"], [4, "mov [rbp+var_48], edx"], [5, "mov [rbp+var_54], ecx"], [6, "mov [rbp+var_60], r8"], [7, "mov [rbp+var_58], r9d"], [8, "mov rax, [rbp+var_60]"], [9, "movss xmm0, dword ptr [rax]"], [10, "movss [rbp+var_1C], xmm0"], [11, "mov rax, [rbp+var_60]"], [12, "movss xmm0, dword ptr [rax+4]"], [13, "movss [rbp+var_20], xmm0"], [14, "mov eax, [rbp+var_58]"], [15, "cdqe"], [16, "lea rdx, ds:0[rax*4]"], [17, "mov rax, [rbp+var_60]"], [18, "add rax, rdx"], [19, "movss xmm0, dword ptr [rax]"], [20, "movss [rbp+var_24], xmm0"], [21, "mov eax, [rbp+var_58]"], [22, "cdqe"], [23, "add rax, 1"], [24, "lea rdx, ds:0[rax*4]"], [25, "mov rax, [rbp+var_60]"], [26, "add rax, rdx"], [27, "movss xmm0, dword ptr [rax]"], [28, "movss [rbp+var_28], xmm0"], [29, "mov eax, [rbp+var_58]"], [30, "add eax, eax"], [31, "cdqe"], [32, "lea rdx, ds:0[rax*4]"], [33, "mov rax, [rbp+var_60]"], [34, "add rax, rdx"], [35, "movss xmm0, dword ptr [rax]"], [36, "movss [rbp+var_2C], xmm0"], [37, "mov eax, [rbp+var_58]"], [38, "add eax, eax"], [39, "cdqe"], [40, "add rax, 1"], [41, "lea rdx, ds:0[rax*4]"], [42, "mov rax, [rbp+var_60]"], [43, "add rax, rdx"], [44, "movss xmm0, dword ptr [rax]"], [45, "movss [rbp+var_30], xmm0"], [46, "mov edx, [rbp+var_58]"], [47, "mov eax, edx"], [48, "add eax, eax"], [49, "add eax, edx"], [50, "cdqe"], [51, "lea rdx, ds:0[rax*4]"], [52, "mov rax, [rbp+var_60]"], [53, "add rax, rdx"], [54, "movss xmm0, dword ptr [rax]"], [55, "movss [rbp+var_34], xmm0"], [56, "mov edx, [rbp+var_58]"], [57, "mov eax, edx"], [58, "add eax, eax"], [59, "add eax, edx"], [60, "cdqe"], [61, "add rax, 1"], [62, "lea rdx, ds:0[rax*4]"], [63, "mov rax, [rbp+var_60]"], [64, "add rax, rdx"], [65, "movss xmm0, dword ptr [rax]"], [66, "movss [rbp+var_38], xmm0"], [67, "mov eax, [rbp+var_48]"], [68, "cdqe"], [69, "lea rdx, ds:0[rax*4]"], [70, "mov rax, [rbp+var_50]"], [71, "add rax, rdx"], [72, "mov [rbp+var_10], rax"], [73, "mov eax, [rbp+var_54]"], [74, "cdqe"], [75, "lea rdx, ds:0[rax*4]"], [76, "mov rax, [rbp+var_10]"], [77, "add rax, rdx"], [78, "mov [rbp+var_18], rax"], [79, "mov eax, [rbp+var_44]"], [80, "mov [rbp+var_4], eax"], [81, "jmp loc_40627F"], [82, "mov rax, [rbp+var_10]"], [83, "movss xmm0, dword ptr [rax]"], [84, "mov rax, [rbp+var_18]"], [85, "movss xmm1, dword ptr [rax]"], [86, "subss xmm0, xmm1"], [87, "movss [rbp+var_3C], xmm0"], [88, "mov rax, [rbp+var_10]"], [89, "sub rax, 4"], [90, "movss xmm0, dword ptr [rax]"], [91, "mov rax, [rbp+var_18]"], [92, "sub rax, 4"], [93, "movss xmm1, dword ptr [rax]"], [94, "subss xmm0, xmm1"], [95, "movss [rbp+var_40], xmm0"], [96, "mov rax, [rbp+var_10]"], [97, "movss xmm1, dword ptr [rax]"], [98, "mov rax, [rbp+var_18]"], [99, "movss xmm0, dword ptr [rax]"], [100, "addss xmm0, xmm1"], [101, "mov rax, [rbp+var_10]"], [102, "movss dword ptr [rax], xmm0"], [103, "mov rax, [rbp+var_10]"], [104, "sub rax, 4"], [105, "movss xmm1, dword ptr [rax]"], [106, "mov rax, [rbp+var_18]"], [107, "sub rax, 4"], [108, "movss xmm0, dword ptr [rax]"], [109, "mov rax, [rbp+var_10]"], [110, "sub rax, 4"], [111, "addss xmm0, xmm1"], [112, "movss dword ptr [rax], xmm0"], [113, "movss xmm0, [rbp+var_3C]"], [114, "mulss xmm0, [rbp+var_1C]"], [115, "movss xmm1, [rbp+var_40]"], [116, "mulss xmm1, [rbp+var_20]"], [117, "subss xmm0, xmm1"], [118, "mov rax, [rbp+var_18]"], [119, "movss dword ptr [rax], xmm0"], [120, "movss xmm0, [rbp+var_40]"], [121, "movaps xmm1, xmm0"], [122, "mulss xmm1, [rbp+var_1C]"], [123, "movss xmm0, [rbp+var_3C]"], [124, "mulss xmm0, [rbp+var_20]"], [125, "mov rax, [rbp+var_18]"], [126, "sub rax, 4"], [127, "addss xmm0, xmm1"], [128, "movss dword ptr [rax], xmm0"], [129, "mov rax, [rbp+var_10]"], [130, "sub rax, 8"], [131, "movss xmm0, dword ptr [rax]"], [132, "mov rax, [rbp+var_18]"], [133, "sub rax, 8"], [134, "movss xmm1, dword ptr [rax]"], [135, "subss xmm0, xmm1"], [136, "movss [rbp+var_3C], xmm0"], [137, "mov rax, [rbp+var_10]"], [138, "sub rax, 0Ch"], [139, "movss xmm0, dword ptr [rax]"], [140, "mov rax, [rbp+var_18]"], [141, "sub rax, 0Ch"], [142, "movss xmm1, dword ptr [rax]"], [143, "subss xmm0, xmm1"], [144, "movss [rbp+var_40], xmm0"], [145, "mov rax, [rbp+var_10]"], [146, "sub rax, 8"], [147, "movss xmm1, dword ptr [rax]"], [148, "mov rax, [rbp+var_18]"], [149, "sub rax, 8"], [150, "movss xmm0, dword ptr [rax]"], [151, "mov rax, [rbp+var_10]"], [152, "sub rax, 8"], [153, "addss xmm0, xmm1"], [154, "movss dword ptr [rax], xmm0"], [155, "mov rax, [rbp+var_10]"], [156, "sub rax, 0Ch"], [157, "movss xmm1, dword ptr [rax]"], [158, "mov rax, [rbp+var_18]"], [159, "sub rax, 0Ch"], [160, "movss xmm0, dword ptr [rax]"], [161, "mov rax, [rbp+var_10]"], [162, "sub rax, 0Ch"], [163, "addss xmm0, xmm1"], [164, "movss dword ptr [rax], xmm0"], [165, "movss xmm0, [rbp+var_3C]"], [166, "mulss xmm0, [rbp+var_24]"], [167, "movss xmm1, [rbp+var_40]"], [168, "mulss xmm1, [rbp+var_28]"], [169, "mov rax, [rbp+var_18]"], [170, "sub rax, 8"], [171, "subss xmm0, xmm1"], [172, "movss dword ptr [rax], xmm0"], [173, "movss xmm0, [rbp+var_40]"], [174, "movaps xmm1, xmm0"], [175, "mulss xmm1, [rbp+var_24]"], [176, "movss xmm0, [rbp+var_3C]"], [177, "mulss xmm0, [rbp+var_28]"], [178, "mov rax, [rbp+var_18]"], [179, "sub rax, 0Ch"], [180, "addss xmm0, xmm1"], [181, "movss dword ptr [rax], xmm0"], [182, "mov rax, [rbp+var_10]"], [183, "sub rax, 10h"], [184, "movss xmm0, dword ptr [rax]"], [185, "mov rax, [rbp+var_18]"], [186, "sub rax, 10h"], [187, "movss xmm1, dword ptr [rax]"], [188, "subss xmm0, xmm1"], [189, "movss [rbp+var_3C], xmm0"], [190, "mov rax, [rbp+var_10]"], [191, "sub rax, 14h"], [192, "movss xmm0, dword ptr [rax]"], [193, "mov rax, [rbp+var_18]"], [194, "sub rax, 14h"], [195, "movss xmm1, dword ptr [rax]"], [196, "subss xmm0, xmm1"], [197, "movss [rbp+var_40], xmm0"], [198, "mov rax, [rbp+var_10]"], [199, "sub rax, 10h"], [200, "movss xmm1, dword ptr [rax]"], [201, "mov rax, [rbp+var_18]"], [202, "sub rax, 10h"], [203, "movss xmm0, dword ptr [rax]"], [204, "mov rax, [rbp+var_10]"], [205, "sub rax, 10h"], [206, "addss xmm0, xmm1"], [207, "movss dword ptr [rax], xmm0"], [208, "mov rax, [rbp+var_10]"], [209, "sub rax, 14h"], [210, "movss xmm1, dword ptr [rax]"], [211, "mov rax, [rbp+var_18]"], [212, "sub rax, 14h"], [213, "movss xmm0, dword ptr [rax]"], [214, "mov rax, [rbp+var_10]"], [215, "sub rax, 14h"], [216, "addss xmm0, xmm1"], [217, "movss dword ptr [rax], xmm0"], [218, "movss xmm0, [rbp+var_3C]"], [219, "mulss xmm0, [rbp+var_2C]"], [220, "movss xmm1, [rbp+var_40]"], [221, "mulss xmm1, [rbp+var_30]"], [222, "mov rax, [rbp+var_18]"], [223, "sub rax, 10h"], [224, "subss xmm0, xmm1"], [225, "movss dword ptr [rax], xmm0"], [226, "movss xmm0, [rbp+var_40]"], [227, "movaps xmm1, xmm0"], [228, "mulss xmm1, [rbp+var_2C]"], [229, "movss xmm0, [rbp+var_3C]"], [230, "mulss xmm0, [rbp+var_30]"], [231, "mov rax, [rbp+var_18]"], [232, "sub rax, 14h"], [233, "addss xmm0, xmm1"], [234, "movss dword ptr [rax], xmm0"], [235, "mov rax, [rbp+var_10]"], [236, "sub rax, 18h"], [237, "movss xmm0, dword ptr [rax]"], [238, "mov rax, [rbp+var_18]"], [239, "sub rax, 18h"], [240, "movss xmm1, dword ptr [rax]"], [241, "subss xmm0, xmm1"], [242, "movss [rbp+var_3C], xmm0"], [243, "mov rax, [rbp+var_10]"], [244, "sub rax, 1Ch"], [245, "movss xmm0, dword ptr [rax]"], [246, "mov rax, [rbp+var_18]"], [247, "sub rax, 1Ch"], [248, "movss xmm1, dword ptr [rax]"], [249, "subss xmm0, xmm1"], [250, "movss [rbp+var_40], xmm0"], [251, "mov rax, [rbp+var_10]"], [252, "sub rax, 18h"], [253, "movss xmm1, dword ptr [rax]"], [254, "mov rax, [rbp+var_18]"], [255, "sub rax, 18h"], [256, "movss xmm0, dword ptr [rax]"], [257, "mov rax, [rbp+var_10]"], [258, "sub rax, 18h"], [259, "addss xmm0, xmm1"], [260, "movss dword ptr [rax], xmm0"], [261, "mov rax, [rbp+var_10]"], [262, "sub rax, 1Ch"], [263, "movss xmm1, dword ptr [rax]"], [264, "mov rax, [rbp+var_18]"], [265, "sub rax, 1Ch"], [266, "movss xmm0, dword ptr [rax]"], [267, "mov rax, [rbp+var_10]"], [268, "sub rax, 1Ch"], [269, "addss xmm0, xmm1"], [270, "movss dword ptr [rax], xmm0"], [271, "movss xmm0, [rbp+var_3C]"], [272, "mulss xmm0, [rbp+var_34]"], [273, "movss xmm1, [rbp+var_40]"], [274, "mulss xmm1, [rbp+var_38]"], [275, "mov rax, [rbp+var_18]"], [276, "sub rax, 18h"], [277, "subss xmm0, xmm1"], [278, "movss dword ptr [rax], xmm0"], [279, "movss xmm0, [rbp+var_40]"], [280, "movaps xmm1, xmm0"], [281, "mulss xmm1, [rbp+var_34]"], [282, "movss xmm0, [rbp+var_3C]"], [283, "mulss xmm0, [rbp+var_38]"], [284, "mov rax, [rbp+var_18]"], [285, "sub rax, 1Ch"], [286, "addss xmm0, xmm1"], [287, "movss dword ptr [rax], xmm0"], [288, "mov eax, [rbp+arg_0]"], [289, "cdqe"], [290, "shl rax, 2"], [291, "neg rax"], [292, "add [rbp+var_10], rax"], [293, "mov eax, [rbp+arg_0]"], [294, "cdqe"], [295, "shl rax, 2"], [296, "neg rax"], [297, "add [rbp+var_18], rax"], [298, "sub [rbp+var_4], 1"], [299, "cmp [rbp+var_4], 0"], [300, "jg loc_405EFF"], [301, "nop"], [302, "nop"], [303, "pop rbp"], [304, "retn"]], "data_dep": [[8, 6], [9, 8], [10, 9], [11, 6], [12, 11], [13, 12], [14, 7], [17, 6], [18, 17], [18, 16], [19, 18], [20, 19], [21, 7], [23, 21], [24, 16], [25, 6], [26, 25], [26, 24], [27, 26], [28, 27], [29, 7], [30, 29], [32, 24], [33, 6], [34, 33], [34, 32], [35, 34], [36, 35], [37, 7], [38, 37], [40, 38], [41, 32], [42, 6], [43, 41], [43, 42], [44, 43], [45, 44], [46, 7], [47, 46], [48, 47], [49, 46], [49, 48], [51, 46], [52, 6], [53, 52], [53, 51], [54, 53], [55, 54], [56, 7], [57, 56], [58, 57], [59, 58], [59, 56], [61, 59], [62, 56], [63, 6], [64, 62], [64, 63], [65, 64], [66, 65], [67, 4], [69, 62], [70, 3], [71, 69], [71, 70], [72, 71], [73, 5], [75, 69], [76, 72], [77, 76], [77, 75], [78, 77], [79, 2], [80, 79], [82, 292], [82, 72], [83, 119], [83, 128], [83, 225], [83, 234], [83, 164], [83, 154], [83, 172], [83, 181], [83, 270], [83, 112], [83, 260], [83, 278], [83, 102], [83, 217], [83, 82], [83, 207], [83, 287], [84, 78], [84, 297], [85, 84], [85, 164], [85, 154], [85, 172], [85, 181], [85, 270], [85, 260], [85, 278], [85, 102], [85, 217], [85, 207], [85, 287], [85, 119], [85, 128], [85, 225], [85, 234], [85, 112], [86, 85], [86, 83], [87, 86], [88, 292], [88, 72], [89, 88], [90, 154], [90, 172], [90, 181], [90, 270], [90, 260], [90, 278], [90, 102], [90, 217], [90, 207], [90, 287], [90, 119], [90, 128], [90, 225], [90, 234], [90, 112], [90, 89], [90, 164], [91, 297], [91, 78], [92, 91], [93, 154], [93, 172], [93, 181], [93, 270], [93, 260], [93, 278], [93, 287], [93, 102], [93, 92], [93, 119], [93, 217], [93, 207], [93, 128], [93, 164], [93, 225], [93, 234], [93, 112], [94, 90], [94, 93], [95, 94], [96, 292], [96, 72], [97, 287], [97, 128], [97, 164], [97, 225], [97, 234], [97, 112], [97, 154], [97, 172], [97, 181], [97, 270], [97, 260], [97, 278], [97, 102], [97, 119], [97, 96], [97, 217], [97, 207], [98, 297], [98, 78], [99, 225], [99, 234], [99, 98], [99, 164], [99, 154], [99, 172], [99, 181], [99, 270], [99, 112], [99, 260], [99, 278], [99, 102], [99, 217], [99, 207], [99, 287], [99, 119], [99, 128], [100, 99], [100, 97], [101, 292], [101, 72], [102, 101], [102, 100], [103, 72], [103, 292], [104, 103], [105, 104], [105, 102], [106, 78], [106, 297], [107, 106], [108, 107], [108, 102], [109, 292], [109, 72], [110, 109], [111, 105], [111, 108], [112, 111], [112, 110], [113, 87], [114, 10], [114, 113], [115, 95], [116, 13], [116, 115], [117, 116], [117, 114], [118, 297], [118, 78], [119, 118], [119, 117], [120, 95], [121, 120], [122, 10], [122, 121], [123, 87], [124, 123], [124, 13], [125, 78], [125, 297], [126, 125], [127, 122], [127, 124], [128, 127], [128, 126], [129, 292], [129, 72], [130, 129], [131, 130], [131, 128], [132, 297], [132, 78], [133, 132], [134, 133], [134, 128], [135, 131], [135, 134], [136, 135], [137, 292], [137, 72], [138, 137], [139, 138], [139, 128], [140, 297], [140, 78], [141, 140], [142, 128], [142, 141], [143, 139], [143, 142], [144, 143], [145, 292], [145, 72], [146, 145], [147, 128], [147, 146], [148, 78], [148, 297], [149, 148], [150, 149], [150, 128], [151, 292], [151, 72], [152, 151], [153, 147], [153, 150], [154, 153], [154, 152], [155, 292], [155, 72], [156, 155], [157, 156], [157, 154], [158, 297], [158, 78], [159, 158], [160, 159], [160, 154], [161, 292], [161, 72], [162, 161], [163, 157], [163, 160], [164, 163], [164, 162], [165, 136], [166, 165], [166, 20], [167, 144], [168, 28], [168, 167], [169, 78], [169, 297], [170, 169], [171, 168], [171, 166], [172, 171], [172, 170], [173, 144], [174, 173], [175, 174], [175, 20], [176, 136], [177, 28], [177, 176], [178, 297], [178, 78], [179, 178], [180, 177], [180, 175], [181, 180], [181, 179], [182, 72], [182, 292], [183, 182], [184, 183], [184, 181], [185, 297], [185, 78], [186, 185], [187, 186], [187, 181], [188, 187], [188, 184], [189, 188], [190, 72], [190, 292], [191, 190], [192, 191], [192, 181], [193, 78], [193, 297], [194, 193], [195, 181], [195, 194], [196, 192], [196, 195], [197, 196], [198, 72], [198, 292], [199, 198], [200, 181], [200, 199], [201, 78], [201, 297], [202, 201], [203, 202], [203, 181], [204, 292], [204, 72], [205, 204], [206, 203], [206, 200], [207, 206], [207, 205], [208, 292], [208, 72], [209, 208], [210, 209], [210, 207], [211, 78], [211, 297], [212, 211], [213, 212], [213, 207], [214, 72], [214, 292], [215, 214], [216, 210], [216, 213], [217, 216], [217, 215], [218, 189], [219, 218], [219, 36], [220, 197], [221, 45], [221, 220], [222, 78], [222, 297], [223, 222], [224, 219], [224, 221], [225, 224], [225, 223], [226, 197], [227, 226], [228, 227], [228, 36], [229, 189], [230, 229], [230, 45], [231, 78], [231, 297], [232, 231], [233, 230], [233, 228], [234, 233], [234, 232], [235, 292], [235, 72], [236, 235], [237, 236], [237, 234], [238, 78], [238, 297], [239, 238], [240, 239], [240, 234], [241, 237], [241, 240], [242, 241], [243, 292], [243, 72], [244, 243], [245, 244], [245, 234], [246, 78], [246, 297], [247, 246], [248, 234], [248, 247], [249, 245], [249, 248], [250, 249], [251, 292], [251, 72], [252, 251], [253, 234], [253, 252], [254, 78], [254, 297], [255, 254], [256, 234], [256, 255], [257, 292], [257, 72], [258, 257], [259, 256], [259, 253], [260, 259], [260, 258], [261, 292], [261, 72], [262, 261], [263, 262], [263, 260], [264, 78], [264, 297], [265, 264], [266, 265], [266, 260], [267, 292], [267, 72], [268, 267], [269, 263], [269, 266], [270, 269], [270, 268], [271, 242], [272, 55], [272, 271], [273, 250], [274, 66], [274, 273], [275, 78], [275, 297], [276, 275], [277, 272], [277, 274], [278, 277], [278, 276], [279, 250], [280, 279], [281, 55], [281, 280], [282, 242], [283, 282], [283, 66], [284, 78], [284, 297], [285, 284], [286, 283], [286, 281], [287, 285], [287, 286], [290, 288], [291, 290], [292, 292], [292, 291], [292, 72], [295, 293], [296, 295], [297, 78], [297, 297], [297, 296], [298, 80], [298, 298], [299, 80], [299, 298], [300, 299], [303, 0], [304, 79], [304, 296]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/cc8273d1e3c0b53b6c493240b38dac1771ed2b3f26727a492d394ac9aa721f2b_cc8273d1e3c0b53b6c493240b38dac1771ed2b3f26727a492d394ac9aa721f2b.jsonl.gz", "strip_func_name": "sub_405DC6", "query": "\n\n\n__int64 __fastcall sub_405DC6(unsigned int a1, __int64 a2, int a3, int a4, float *a5, int a6, int a7)\n{\n__int64 result; // rax\nfloat v8; // [rsp+20h] [rbp-40h]\nfloat v9; // [rsp+20h] [rbp-40h]\nfloat v10; // [rsp+20h] [rbp-40h]\nfloat v11; // [rsp+20h] [rbp-40h]\nfloat v12; // [rsp+24h] [rbp-3Ch]\nfloat v13; // [rsp+24h] [rbp-3Ch]\nfloat v14; // [rsp+24h] [rbp-3Ch]\nfloat v15; // [rsp+24h] [rbp-3Ch]\nfloat v16; // [rsp+28h] [rbp-38h]\nfloat v17; // [rsp+2Ch] [rbp-34h]\nfloat v18; // [rsp+30h] [rbp-30h]\nfloat v19; // [rsp+34h] [rbp-2Ch]\nfloat v20; // [rsp+38h] [rbp-28h]\nfloat v21; // [rsp+3Ch] [rbp-24h]\nfloat v22; // [rsp+40h] [rbp-20h]\nfloat v23; // [rsp+44h] [rbp-1Ch]\nfloat *v24; // [rsp+48h] [rbp-18h]\nfloat *v25; // [rsp+50h] [rbp-10h]\nint i; // [rsp+5Ch] [rbp-4h]\n\nv23 = *a5;\nv22 = a5[1];\nv21 = a5[a6];\nv20 = a5[a6 + 1];\nv19 = a5[2 * a6];\nv18 = a5[2 * a6 + 1];\nv17 = a5[3 * a6];\nv16 = a5[3 * a6 + 1];\nv25 = (float *)(4LL * a3 + a2);\nv24 = &v25[a4];\nresult = a1;\nfor ( i = a1; i > 0; --i )\n{\nv12 = *v25 - *v24;\nv8 = *(v25 - 1) - *(v24 - 1);\n*v25 = *v24 + *v25;\n*(v25 - 1) = *(v24 - 1) + *(v25 - 1);\n*v24 = (float)(v12 * v23) - (float)(v8 * v22);\n*(v24 - 1) = (float)(v12 * v22) + (float)(v8 * v23);\nv13 = *(v25 - 2) - *(v24 - 2);\nv9 = *(v25 - 3) - *(v24 - 3);\n*(v25 - 2) = *(v24 - 2) + *(v25 - 2);\n*(v25 - 3) = *(v24 - 3) + *(v25 - 3);\n*(v24 - 2) = (float)(v13 * v21) - (float)(v9 * v20);\n*(v24 - 3) = (float)(v13 * v20) + (float)(v9 * v21);\nv14 = *(v25 - 4) - *(v24 - 4);\nv10 = *(v25 - 5) - *(v24 - 5);\n*(v25 - 4) = *(v24 - 4) + *(v25 - 4);\n*(v25 - 5) = *(v24 - 5) + *(v25 - 5);\n*(v24 - 4) = (float)(v14 * v19) - (float)(v10 * v18);\n*(v24 - 5) = (float)(v14 * v18) + (float)(v10 * v19);\nv15 = *(v25 - 6) - *(v24 - 6);\nv11 = *(v25 - 7) - *(v24 - 7);\n*(v25 - 6) = *(v24 - 6) + *(v25 - 6);\n*(v25 - 7) = *(v24 - 7) + *(v25 - 7);\n*(v24 - 6) = (float)(v15 * v17) - (float)(v11 * v16);\n*(v24 - 7) = (float)(v15 * v16) + (float)(v11 * v17);\nv25 -= a7;\nresult = -4LL * a7;\nv24 = (float *)((char *)v24 + result);\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,a7,v8,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,sub_405DC6,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'i_off', 'a4': 'k_off', 'a1': 'n', 'a2': 'e', 'a5': 'A', 'a6': 'a_off', 'a7': 'k0_0', 'v8': 'k11a', 'v15': 'k00a', 'v16': 'A7', 'v17': 'A6', 'v18': 'A5', 'v19': 'A4', 'v20': 'A3', 'v21': 'A2', 'v22': 'A1', 'v23': 'A0', 'v24': 'ee2', 'v25': 'ee0', 'sub_405DC6': 'imdct_step3_inner_s_loop'}"}
save_pgm
e3b6e30793c639a845322f496e4421e056c9c7f8503432b39cc08e6cc536376f
cloudwu
eaccodec
NA
static void save_pgm(const char *filename, const uint8_t * image, int w, int h) { FILE *f = fopen(filename,"wb"); if (f == NULL) return; fprintf(f, "P2\n%d %d\n255\n", w, h); int i; for (i=0;i<w*h;i++) { fprintf(f,"%d ", image[i]); if (i % 16 == 15) fprintf(f,"\n"); } fclose(f); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401B7A", "function_addr": 4201338, "binary_name": "e3b6e30793c639a845322f496e4421e056c9c7f8503432b39cc08e6cc536376f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+filename], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_24], edx"], [6, "mov [rbp+var_28], ecx"], [7, "mov rax, [rbp+filename]"], [8, "mov esi, offset aWb"], [9, "mov rdi, rax"], [10, "call _fopen"], [11, "mov [rbp+stream], rax"], [12, "cmp [rbp+stream], 0"], [13, "jz loc_401C40"], [14, "mov ecx, [rbp+var_28]"], [15, "mov edx, [rbp+var_24]"], [16, "mov rax, [rbp+stream]"], [17, "mov esi, offset format"], [18, "mov rdi, rax"], [19, "mov eax, 0"], [20, "call _fprintf"], [21, "mov [rbp+var_4], 0"], [22, "jmp short loc_401C26"], [23, "mov eax, [rbp+var_4]"], [24, "movsxd rdx, eax"], [25, "mov rax, [rbp+var_20]"], [26, "add rax, rdx"], [27, "movzx eax, byte ptr [rax]"], [28, "movzx edx, al"], [29, "mov rax, [rbp+stream]"], [30, "mov esi, offset aD_0"], [31, "mov rdi, rax"], [32, "mov eax, 0"], [33, "call _fprintf"], [34, "mov eax, [rbp+var_4]"], [35, "cdq"], [36, "shr edx, 1Ch"], [37, "add eax, edx"], [38, "and eax, 0Fh"], [39, "sub eax, edx"], [40, "cmp eax, 0Fh"], [41, "jnz short loc_401C22"], [42, "mov rax, [rbp+stream]"], [43, "mov rsi, rax"], [44, "mov edi, 0Ah"], [45, "call _fputc"], [46, "add [rbp+var_4], 1"], [47, "mov eax, [rbp+var_24]"], [48, "imul eax, [rbp+var_28]"], [49, "cmp [rbp+var_4], eax"], [50, "jl short loc_401BD5"], [51, "mov rax, [rbp+stream]"], [52, "mov rdi, rax"], [53, "call _fclose"], [54, "jmp short locret_401C41"], [55, "nop"], [56, "leave"], [57, "retn"]], "data_dep": [[7, 3], [9, 7], [11, 10], [12, 11], [13, 12], [14, 6], [15, 5], [16, 11], [18, 16], [23, 46], [23, 21], [24, 23], [25, 4], [26, 24], [26, 25], [27, 26], [28, 27], [29, 11], [31, 29], [34, 46], [34, 21], [36, 28], [37, 36], [37, 34], [38, 37], [39, 36], [39, 38], [40, 39], [41, 40], [42, 11], [43, 42], [46, 21], [46, 46], [47, 5], [48, 47], [48, 6], [49, 46], [49, 21], [49, 48], [50, 49], [51, 11], [52, 51], [57, 53], [57, 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/e3b6e30793c639a845322f496e4421e056c9c7f8503432b39cc08e6cc536376f_e3b6e30793c639a845322f496e4421e056c9c7f8503432b39cc08e6cc536376f.jsonl.gz", "strip_func_name": "sub_401B7A", "query": "\n\n\nint __fastcall sub_401B7A(const char *a1, __int64 a2, unsigned int a3, unsigned int a4)\n{\nFILE *v4; // rax\nFILE *stream; // [rsp+20h] [rbp-10h]\nint i; // [rsp+2Ch] [rbp-4h]\n\nv4 = fopen(a1, \"wb\");\nstream = v4;\nif ( v4 )\n{\nfprintf(v4, \"P2\\n%d %d\\n255\\n\", a3, a4);\nfor ( i = 0; i < (int)(a4 * a3); ++i )\n{\nfprintf(stream, \"%d \", *(unsigned __int8 *)(i + a2));\nif ( i % 16 == 15 )\nfputc(10, stream);\n}\nLODWORD(v4) = fclose(stream);\n}\nreturn (int)v4;\n}\n\n\n\nQ:[a3,a4,a1,a2,stream,sub_401B7A,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'w', 'a4': 'h', 'a1': 'filename', 'a2': 'image', 'stream': 'f', 'sub_401B7A': 'save_pgm'}"}
add_graft_decoration
f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83
msysgit
msysgit
NA
static int add_graft_decoration(const struct commit_graft *graft, void *cb_data) { struct commit *commit = lookup_commit(graft->sha1); if (!commit) return 0; add_name_decoration(DECORATION_GRAFTED, "grafted", &commit->object); return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_48D893", "function_addr": 4774035, "binary_name": "f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83.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 rdi, rax"], [7, "call sub_43B898"], [8, "mov [rbp+var_8], rax"], [9, "cmp [rbp+var_8], 0"], [10, "jnz short loc_48D8C1"], [11, "mov eax, 0"], [12, "jmp short locret_48D8DC"], [13, "mov rax, [rbp+var_8]"], [14, "mov rdx, rax"], [15, "mov esi, offset aGrafted"], [16, "mov edi, 6"], [17, "call sub_48D60A"], [18, "mov eax, 0"], [19, "leave"], [20, "retn"]], "data_dep": [[5, 3], [6, 5], [8, 7], [9, 8], [10, 9], [13, 8], [14, 13], [20, 11], [20, 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/f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83_f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83.jsonl.gz", "strip_func_name": "sub_48D893", "query": "\n\n\n__int64 __fastcall sub_48D893(unsigned __int8 *a1, __int64 a2)\n{\n_BYTE *v3; // [rsp+18h] [rbp-8h]\n\nv3 = sub_43B898(a1, a2);\nif ( v3 )\nsub_48D60A(6, \"grafted\", (__int64)v3);\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v3,sub_48D893,sub_43B898,sub_48D60A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'graft', 'a2': 'cb_data', 'v3': 'commit', 'sub_48D893': 'add_graft_decoration', 'sub_43B898': 'lookup_commit', 'sub_48D60A': 'add_name_decoration'}"}
qemu_paio_error
4fbb6a74e2ad3f4c585310e151f8d7bcb41c07a46ac1bd2edcece161fa67755f
ESOS-Lab
VSSIM
NA
int qemu_paio_error(struct qemu_paiocb *aiocb) { ssize_t ret = qemu_paio_return(aiocb); if (ret < 0) ret = -ret; else ret = 0; return ret; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40E0EB", "function_addr": 4251883, "binary_name": "4fbb6a74e2ad3f4c585310e151f8d7bcb41c07a46ac1bd2edcece161fa67755f.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 rdi, rax"], [6, "call sub_40E0B9"], [7, "mov [rbp+var_8], rax"], [8, "cmp [rbp+var_8], 0"], [9, "jns short loc_40E114"], [10, "neg [rbp+var_8]"], [11, "jmp short loc_40E11C"], [12, "mov [rbp+var_8], 0"], [13, "mov rax, [rbp+var_8]"], [14, "leave"], [15, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [8, 7], [9, 8], [10, 7], [13, 10], [13, 12], [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/4fbb6a74e2ad3f4c585310e151f8d7bcb41c07a46ac1bd2edcece161fa67755f_4fbb6a74e2ad3f4c585310e151f8d7bcb41c07a46ac1bd2edcece161fa67755f.jsonl.gz", "strip_func_name": "sub_40E0EB", "query": "\n\n\n__int64 __fastcall sub_40E0EB(__int64 a1)\n{\n__int64 v2; // [rsp+18h] [rbp-8h]\n__int64 v3; // [rsp+18h] [rbp-8h]\n\nv2 = sub_40E0B9(a1);\nif ( v2 >= 0 )\nv3 = 0LL;\nelse\nv3 = -v2;\nreturn v3;\n}\n\n\n\nQ:[a1,v2,sub_40E0EB,sub_40E0B9,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'aiocb', 'v2': 'reta', 'sub_40E0EB': 'qemu_paio_error', 'sub_40E0B9': 'qemu_paio_return'}"}
jas_cmpxformseq_append
f4745e82b1d0cff651d46375754e6291357312b85b3ec537e20de9075c6972a9
hagish
love-native-android
NA
static int jas_cmpxformseq_append(jas_cmpxformseq_t *pxformseq, jas_cmpxformseq_t *othpxformseq) { int n; int i; jas_cmpxform_t *pxform; jas_cmpxform_t *othpxform; n = pxformseq->numpxforms + othpxformseq->numpxforms; if (n > pxformseq->maxpxforms) { if (jas_cmpxformseq_resize(pxformseq, n)) goto error; } for (i = 0; i < othpxformseq->numpxforms; ++i) { othpxform = othpxformseq->pxforms[i]; if (!(pxform = jas_cmpxform_copy(othpxform))) goto error; pxformseq->pxforms[pxformseq->numpxforms] = pxform; ++pxformseq->numpxforms; } return 0; error: return -1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_441FCF", "function_addr": 4464591, "binary_name": "f4745e82b1d0cff651d46375754e6291357312b85b3ec537e20de9075c6972a9.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov rax, [rbp+var_28]"], [6, "mov edx, [rax]"], [7, "mov rax, [rbp+var_30]"], [8, "mov eax, [rax]"], [9, "add eax, edx"], [10, "mov [rbp+var_8], eax"], [11, "mov rax, [rbp+var_28]"], [12, "mov eax, [rax+4]"], [13, "cmp [rbp+var_8], eax"], [14, "jle short loc_442011"], [15, "mov edx, [rbp+var_8]"], [16, "mov rax, [rbp+var_28]"], [17, "mov esi, edx"], [18, "mov rdi, rax"], [19, "call sub_44209A"], [20, "test eax, eax"], [21, "jnz short loc_44208F"], [22, "mov [rbp+var_4], 0"], [23, "jmp short loc_44207D"], [24, "mov rax, [rbp+var_30]"], [25, "mov rdx, [rax+8]"], [26, "mov eax, [rbp+var_4]"], [27, "cdqe"], [28, "shl rax, 3"], [29, "add rax, rdx"], [30, "mov rax, [rax]"], [31, "mov [rbp+var_10], rax"], [32, "mov rax, [rbp+var_10]"], [33, "mov rdi, rax"], [34, "call sub_4421DA"], [35, "mov [rbp+var_18], rax"], [36, "cmp [rbp+var_18], 0"], [37, "jz short loc_442092"], [38, "mov rax, [rbp+var_28]"], [39, "mov rdx, [rax+8]"], [40, "mov rax, [rbp+var_28]"], [41, "mov eax, [rax]"], [42, "cdqe"], [43, "shl rax, 3"], [44, "add rdx, rax"], [45, "mov rax, [rbp+var_18]"], [46, "mov [rdx], rax"], [47, "mov rax, [rbp+var_28]"], [48, "mov eax, [rax]"], [49, "lea edx, [rax+1]"], [50, "mov rax, [rbp+var_28]"], [51, "mov [rax], edx"], [52, "add [rbp+var_4], 1"], [53, "mov rax, [rbp+var_30]"], [54, "mov eax, [rax]"], [55, "cmp [rbp+var_4], eax"], [56, "jl short loc_44201A"], [57, "mov eax, 0"], [58, "jmp short locret_442098"], [59, "nop"], [60, "jmp short loc_442093"], [61, "nop"], [62, "mov eax, 0FFFFFFFFh"], [63, "leave"], [64, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 4], [8, 7], [9, 8], [9, 6], [10, 9], [11, 3], [12, 11], [13, 10], [13, 12], [14, 13], [15, 10], [16, 3], [17, 15], [18, 16], [20, 19], [21, 20], [24, 4], [25, 46], [25, 24], [25, 51], [26, 22], [26, 52], [28, 26], [29, 25], [29, 28], [30, 46], [30, 51], [30, 29], [31, 30], [32, 31], [33, 32], [35, 34], [36, 35], [37, 36], [38, 3], [39, 51], [39, 38], [39, 46], [40, 3], [41, 40], [41, 46], [41, 51], [43, 41], [44, 39], [44, 43], [45, 35], [46, 45], [46, 44], [47, 3], [48, 51], [48, 47], [48, 46], [49, 44], [49, 46], [49, 48], [50, 3], [51, 50], [51, 49], [52, 52], [52, 22], [53, 4], [54, 46], [54, 51], [54, 53], [55, 22], [55, 52], [55, 54], [56, 55], [64, 62], [64, 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/f4745e82b1d0cff651d46375754e6291357312b85b3ec537e20de9075c6972a9_f4745e82b1d0cff651d46375754e6291357312b85b3ec537e20de9075c6972a9.jsonl.gz", "strip_func_name": "sub_441FCF", "query": "\n\n\n__int64 __fastcall sub_441FCF(__int64 a1, __int64 a2)\n{\n__int64 v3; // [rsp+18h] [rbp-18h]\nint v4; // [rsp+28h] [rbp-8h]\nint i; // [rsp+2Ch] [rbp-4h]\n\nv4 = *(_DWORD *)a1 + *(_DWORD *)a2;\nif ( v4 > *(_DWORD *)(a1 + 4) && (unsigned int)sub_44209A(a1, (unsigned int)v4) )\nreturn 0xFFFFFFFFLL;\nfor ( i = 0; i < *(_DWORD *)a2; ++i )\n{\nv3 = sub_4421DA(*(_QWORD *)(*(_QWORD *)(a2 + 8) + 8LL * i));\nif ( !v3 )\nreturn 0xFFFFFFFFLL;\n*(_QWORD *)(8LL * (int)(*(_DWORD *)a1)++ + *(_QWORD *)(a1 + 8)) = v3;\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v3,v4,sub_441FCF,sub_44209A,sub_4421DA,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'pxformseq', 'a2': 'othpxformseq', 'v3': 'pxform', 'v4': 'n', 'sub_441FCF': 'jas_cmpxformseq_append', 'sub_44209A': 'jas_cmpxformseq_resize', 'sub_4421DA': 'jas_cmpxform_copy'}"}
adler32_combine
362955a1d3230a4d03d634c3e5bff13ca4ae6a5e24e02b2cad6e9251388f57a8
shiquan
PISA
NA
uLong ZEXPORT adler32_combine(adler1, adler2, len2) uLong adler1; uLong adler2; z_off_t len2; { return adler32_combine_(adler1, adler2, len2); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "adler32_combine", "function_addr": 5175291, "binary_name": "362955a1d3230a4d03d634c3e5bff13ca4ae6a5e24e02b2cad6e9251388f57a8.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 18h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "mov rdx, [rbp+var_18]"], [7, "mov rcx, [rbp+var_10]"], [8, "mov rax, [rbp+var_8]"], [9, "mov rsi, rcx"], [10, "mov rdi, rax"], [11, "call sub_4EF6AC"], [12, "leave"], [13, "retn"]], "data_dep": [[6, 5], [7, 4], [8, 3], [9, 7], [10, 8], [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/362955a1d3230a4d03d634c3e5bff13ca4ae6a5e24e02b2cad6e9251388f57a8_362955a1d3230a4d03d634c3e5bff13ca4ae6a5e24e02b2cad6e9251388f57a8.jsonl.gz", "strip_func_name": "adler32_combine", "query": "\n\n\n__int64 __fastcall adler32_combine(int a1, int a2, __int64 a3)\n{\nreturn sub_4EF6AC(a1, a2, a3);\n}\n\n\n\nQ:[a3,a1,a2,sub_4EF6AC,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'len2', 'a1': 'adler1', 'a2': 'adler2', 'sub_4EF6AC': 'adler32_combine_'}"}
js_error_constructor
5221d4ac5c6be3ca70ca9c6f05f545a1bdebfe8115ffd22ebc92b53971dadcff
sunnyxx
quickjs-debug
NA
static JSValue js_error_constructor(JSContext *ctx, JSValueConst new_target, int argc, JSValueConst *argv, int magic) { JSValue obj, msg, proto; JSValueConst proto1; if (JS_IsUndefined(new_target)) new_target = JS_GetActiveFunction(ctx); if (magic < 0) { proto1 = ctx->class_proto[JS_CLASS_ERROR]; } else { proto1 = ctx->native_error_proto[magic]; } proto = js_get_prototype_from_ctor(ctx, new_target, proto1); if (JS_IsException(proto)) return proto; obj = JS_NewObjectProtoClass(ctx, proto, JS_CLASS_ERROR); JS_FreeValue(ctx, proto); if (!JS_IsException(obj) && !JS_IsUndefined(argv[0])) { msg = JS_ToString(ctx, argv[0]); if (unlikely(JS_IsException(msg))) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } JS_DefinePropertyValue(ctx, obj, JS_ATOM_message, msg, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE); } return obj; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_457FCC", "function_addr": 4554700, "binary_name": "5221d4ac5c6be3ca70ca9c6f05f545a1bdebfe8115ffd22ebc92b53971dadcff.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 78h"], [4, "mov [rbp+var_58], rdi"], [5, "mov rax, rsi"], [6, "mov rsi, rdx"], [7, "mov rdx, rsi"], [8, "mov [rbp+var_70], rax"], [9, "mov [rbp+var_68], rdx"], [10, "mov [rbp+var_5C], ecx"], [11, "mov [rbp+var_78], r8"], [12, "mov [rbp+var_60], r9d"], [13, "mov rdx, [rbp+var_70]"], [14, "mov rax, [rbp+var_68]"], [15, "mov rdi, rdx"], [16, "mov rsi, rax"], [17, "call sub_403D07"], [18, "test eax, eax"], [19, "jz short loc_458020"], [20, "mov rax, [rbp+var_58]"], [21, "mov rdi, rax"], [22, "call sub_422296"], [23, "mov [rbp+var_70], rax"], [24, "mov [rbp+var_68], rdx"], [25, "cmp [rbp+var_60], 0"], [26, "jns short loc_458040"], [27, "mov rax, [rbp+var_58]"], [28, "mov rax, [rax+50h]"], [29, "mov rdx, [rax+38h]"], [30, "mov rax, [rax+30h]"], [31, "mov [rbp+var_50], rax"], [32, "mov [rbp+var_48], rdx"], [33, "jmp short loc_458064"], [34, "mov rdx, [rbp+var_58]"], [35, "mov eax, [rbp+var_60]"], [36, "cdqe"], [37, "add rax, 8"], [38, "shl rax, 4"], [39, "add rax, rdx"], [40, "mov rdx, [rax+10h]"], [41, "mov rax, [rax+8]"], [42, "mov [rbp+var_50], rax"], [43, "mov [rbp+var_48], rdx"], [44, "mov rcx, [rbp+var_50]"], [45, "mov rdi, [rbp+var_48]"], [46, "mov rsi, [rbp+var_70]"], [47, "mov rdx, [rbp+var_68]"], [48, "mov rax, [rbp+var_58]"], [49, "mov r8, rdi"], [50, "mov rdi, rax"], [51, "call sub_42DFF6"], [52, "mov [rbp+var_40], rax"], [53, "mov [rbp+var_38], rdx"], [54, "mov rdx, [rbp+var_40]"], [55, "mov rax, [rbp+var_38]"], [56, "mov rdi, rdx"], [57, "mov rsi, rax"], [58, "call sub_403D2B"], [59, "test eax, eax"], [60, "jz short loc_4580AF"], [61, "mov rax, [rbp+var_40]"], [62, "mov rdx, [rbp+var_38]"], [63, "jmp loc_4581C3"], [64, "mov rsi, [rbp+var_40]"], [65, "mov rdx, [rbp+var_38]"], [66, "mov rax, [rbp+var_58]"], [67, "mov ecx, 3"], [68, "mov rdi, rax"], [69, "call sub_40B991"], [70, "mov [rbp+var_20], rax"], [71, "mov [rbp+var_18], rdx"], [72, "mov rcx, [rbp+var_40]"], [73, "mov rdx, [rbp+var_38]"], [74, "mov rax, [rbp+var_58]"], [75, "mov rsi, rcx"], [76, "mov rdi, rax"], [77, "call sub_403DDF"], [78, "mov rdx, [rbp+var_20]"], [79, "mov rax, [rbp+var_18]"], [80, "mov rdi, rdx"], [81, "mov rsi, rax"], [82, "call sub_403D2B"], [83, "test eax, eax"], [84, "jnz loc_4581BB"], [85, "mov rax, [rbp+var_78]"], [86, "mov rdx, [rax]"], [87, "mov rax, [rax+8]"], [88, "mov rdi, rdx"], [89, "mov rsi, rax"], [90, "call sub_403D07"], [91, "test eax, eax"], [92, "jnz loc_4581BB"], [93, "mov rax, [rbp+var_78]"], [94, "mov rcx, [rax]"], [95, "mov rdx, [rax+8]"], [96, "mov rax, [rbp+var_58]"], [97, "mov rsi, rcx"], [98, "mov rdi, rax"], [99, "call sub_41CC36"], [100, "mov [rbp+var_30], rax"], [101, "mov [rbp+var_28], rdx"], [102, "mov rdx, [rbp+var_30]"], [103, "mov rax, [rbp+var_28]"], [104, "mov rdi, rdx"], [105, "mov rsi, rax"], [106, "call sub_403D2B"], [107, "test eax, eax"], [108, "setnz al"], [109, "movzx eax, al"], [110, "test rax, rax"], [111, "jz short loc_45818A"], [112, "mov rcx, [rbp+var_20]"], [113, "mov rdx, [rbp+var_18]"], [114, "mov rax, [rbp+var_58]"], [115, "mov rsi, rcx"], [116, "mov rdi, rax"], [117, "call sub_403DDF"], [118, "mov eax, 0"], [119, "mov edx, 0"], [120, "mov edx, 6"], [121, "jmp short loc_4581C3"], [122, "mov rax, [rbp+var_30]"], [123, "mov rdx, [rbp+var_28]"], [124, "mov rsi, [rbp+var_20]"], [125, "mov r10, [rbp+var_18]"], [126, "mov rdi, [rbp+var_58]"], [127, "sub rsp, 8"], [128, "push 3"], [129, "mov r8, rax"], [130, "mov r9, rdx"], [131, "mov ecx, 33h "], [132, "mov rdx, r10"], [133, "call sub_4180CB"], [134, "add rsp, 10h"], [135, "mov rax, [rbp+var_20]"], [136, "mov rdx, [rbp+var_18]"], [137, "mov rbx, [rbp+var_8]"], [138, "leave"], [139, "retn"]], "data_dep": [[7, 6], [8, 5], [9, 7], [13, 8], [14, 9], [15, 13], [16, 14], [18, 17], [19, 18], [20, 4], [21, 20], [23, 22], [24, 13], [25, 12], [26, 25], [27, 4], [28, 27], [29, 28], [30, 28], [31, 30], [32, 29], [34, 4], [35, 12], [37, 35], [38, 37], [39, 34], [39, 38], [40, 39], [41, 39], [42, 41], [43, 40], [44, 31], [44, 42], [45, 32], [45, 43], [46, 8], [46, 23], [47, 9], [47, 24], [48, 4], [49, 45], [50, 48], [52, 51], [53, 47], [54, 52], [55, 53], [56, 54], [57, 55], [59, 58], [60, 59], [61, 52], [62, 53], [64, 52], [65, 53], [66, 4], [68, 66], [70, 69], [71, 65], [72, 52], [73, 53], [74, 4], [75, 72], [76, 74], [78, 70], [79, 71], [80, 78], [81, 79], [83, 82], [84, 83], [85, 11], [86, 85], [87, 85], [88, 86], [89, 87], [91, 90], [92, 91], [93, 11], [94, 93], [95, 93], [96, 4], [97, 94], [98, 96], [100, 99], [101, 95], [102, 100], [103, 101], [104, 102], [105, 103], [107, 106], [108, 107], [109, 108], [110, 109], [111, 110], [112, 70], [113, 71], [114, 4], [115, 112], [116, 114], [122, 100], [123, 101], [124, 70], [125, 71], [126, 4], [127, 3], [129, 122], [130, 123], [132, 125], [134, 127], [135, 70], [136, 71], [139, 135], [139, 61], [139, 118]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/5221d4ac5c6be3ca70ca9c6f05f545a1bdebfe8115ffd22ebc92b53971dadcff_5221d4ac5c6be3ca70ca9c6f05f545a1bdebfe8115ffd22ebc92b53971dadcff.jsonl.gz", "strip_func_name": "sub_457FCC", "query": "\n\n\n_DWORD *__fastcall sub_457FCC(__int64 *a1, __int64 a2, __int64 a3, __int64 a4, __int64 *a5, int a6)\n{\n__int64 v6; // rdx\n__int64 v7; // rax\n__int64 v8; // rdx\n_DWORD *v9; // rax\n__int64 *v10; // rax\n__int64 v11; // rdx\n__int64 v13; // rdx\n__int64 v14; // r8\n__int64 v15; // r9\n__int64 v16; // rdx\n__int64 v18; // [rsp+10h] [rbp-70h]\n__int64 v19; // [rsp+18h] [rbp-68h]\n_DWORD *v21; // [rsp+40h] [rbp-40h]\n__int64 v22; // [rsp+48h] [rbp-38h]\n_DWORD *v23; // [rsp+50h] [rbp-30h]\n__int64 v24; // [rsp+58h] [rbp-28h]\n_DWORD *v25; // [rsp+60h] [rbp-20h]\n__int64 v26; // [rsp+68h] [rbp-18h]\n\nv18 = a2;\nv19 = a3;\nif ( sub_403D07(a2, a3) )\n{\nv18 = sub_422296((__int64)a1);\nv19 = v6;\n}\nif ( a6 >= 0 )\n{\nv10 = &a1[2 * a6 + 16];\nv8 = v10[2];\nv9 = (_DWORD *)v10[1];\n}\nelse\n{\nv7 = a1[10];\nv8 = *(_QWORD *)(v7 + 56);\nv9 = *(_DWORD **)(v7 + 48);\n}\nv21 = sub_42DFF6(a1, v18, v19, v9, v8);\nv22 = v11;\nif ( sub_403D2B((__int64)v21, v11) )\nreturn v21;\nv25 = (_DWORD *)sub_40B991(a1, (__int64)v21, v22, 3u);\nv26 = v13;\nsub_403DDF((__int64)a1, v21, v22);\nif ( !sub_403D2B((__int64)v25, v26) && !sub_403D07(*a5, a5[1]) )\n{\nv23 = sub_41CC36(a1, (_DWORD *)*a5, a5[1], *a5, v14, v15);\nv24 = v16;\nif ( sub_403D2B((__int64)v23, v16) )\n{\nsub_403DDF((__int64)a1, v25, v26);\nreturn 0LL;\n}\nsub_4180CB(a1, (__int64)v25, v26, 0x33u, v23, v24, 3u);\n}\nreturn v25;\n}\n\n\n\nQ:[a1,a2,a5,a6,a4,v10,v14,v15,v18,v21,v23,v25,sub_457FCC,sub_403D07,sub_422296,sub_42DFF6,sub_403D2B,sub_40B991,sub_403DDF,sub_41CC36,sub_4180CB,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ctx', 'a2': 'new_target', 'a5': 'argv', 'a6': 'magic', 'a4': 'argc', 'v10': 'result', 'v14': 'argv', 'v15': 'magic', 'v18': 'new_targeta', 'v21': 'proto', 'v23': 'msg', 'v25': 'obj', 'sub_457FCC': 'js_error_constructor', 'sub_403D07': 'JS_IsUndefined', 'sub_422296': 'JS_GetActiveFunction', 'sub_42DFF6': 'js_get_prototype_from_ctor', 'sub_403D2B': 'JS_IsException', 'sub_40B991': 'JS_NewObjectProtoClass', 'sub_403DDF': 'JS_FreeValue', 'sub_41CC36': 'JS_ToString', 'sub_4180CB': 'JS_DefinePropertyValue'}"}
DeactivateStage
42faebc29e6877a2606d36c9ee4a9acccbfddd98af102782d4cb07481a63ee48
RTimothyEdwards
irsim
NA
private void DeactivateStage( stg, skipnd ) pstg stg; nptr skipnd; { register nptr n, next; for( n = stg->nd_list; n != NULL; n = next ) { register lptr l; register tptr t; next = n->nlink; n->nlink = NULL; #ifdef INCDEBUG if( n->nflags & WATCHED ) lprintf(stdout, "%.2f: Deactivate %s\n",d2ns(cur_delta),pnode(n)); #endif if( n->nflags & ACTIVE_CL ) { if( n->c.event != NULL and n->c.event->ntime > cur_delta ) DequeueEvent( n ); n->nflags &= ~ACTIVE_CL; if( n->t.punts != NULL ) MergePunts( n ); } if( n->ngate != NULL and not (n->nflags & STIM) and n != skipnd ) { hptr h; NEXTH( h, n->curr ); if( EnqueueHist( n, h, STIMULI ) ) n->nflags |= STIM; } for( l = n->nterm; l != NULL; l = l->next ) { t = l->xtor; t->dcache.r = NULL; /* may be set for parallel xtors */ if( (t->tflags & ACTIVE_T) and (t->state != OFF or (other_node( t, n )->nflags & INPUT)) ) t->tflags = 0; else t->tflags &= ~(BROKEN | PBROKEN | PARALLEL); } } for( n = stg->inp_list; n != NULL; n = next ) { next = n->nlink; n->nlink = NULL; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43DC41", "function_addr": 4447297, "binary_name": "42faebc29e6877a2606d36c9ee4a9acccbfddd98af102782d4cb07481a63ee48.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_40], rsi"], [9, "mov rax, [rbp+var_38]"], [10, "mov rbx, [rax+8]"], [11, "jmp loc_43DDB1"], [12, "mov r14, [rbx]"], [13, "mov qword ptr [rbx], 0"], [14, "mov rax, [rbx+58h]"], [15, "and eax, 20000h"], [16, "test rax, rax"], [17, "jz short loc_43DCCE"], [18, "mov rax, [rbx+40h]"], [19, "test rax, rax"], [20, "jz short loc_43DCAA"], [21, "mov rax, [rbx+40h]"], [22, "mov rdx, [rax+28h]"], [23, "mov rax, offset unk_51C428"], [24, "mov rax, [rax]"], [25, "cmp rdx, rax"], [26, "jbe short loc_43DCAA"], [27, "mov rdi, rbx"], [28, "mov eax, 0"], [29, "call sub_4347D8"], [30, "mov rax, [rbx+58h]"], [31, "and rax, 0FFFFFFFFFFFDFFFFh"], [32, "mov [rbx+58h], rax"], [33, "mov rax, [rbx+48h]"], [34, "test rax, rax"], [35, "jz short loc_43DCCE"], [36, "mov rdi, rbx"], [37, "mov eax, 0"], [38, "call sub_43DB7C"], [39, "mov rax, [rbx+10h]"], [40, "test rax, rax"], [41, "jz short loc_43DD40"], [42, "mov rax, [rbx+58h]"], [43, "and eax, 10000h"], [44, "test rax, rax"], [45, "jnz short loc_43DD40"], [46, "cmp rbx, [rbp+var_40]"], [47, "jz short loc_43DD40"], [48, "mov rax, [rbx+88h]"], [49, "mov rax, [rax]"], [50, "mov [rbp+var_28], rax"], [51, "jmp short loc_43DD06"], [52, "mov rax, [rbp+var_28]"], [53, "mov rax, [rax]"], [54, "mov [rbp+var_28], rax"], [55, "mov rax, [rbp+var_28]"], [56, "movzx eax, byte ptr [rax+0Fh]"], [57, "and eax, 20h"], [58, "test al, al"], [59, "jnz short loc_43DCFB"], [60, "mov rax, [rbp+var_28]"], [61, "mov edx, 8"], [62, "mov rsi, rax"], [63, "mov rdi, rbx"], [64, "mov eax, 0"], [65, "call sub_43451C"], [66, "test eax, eax"], [67, "jz short loc_43DD40"], [68, "mov rax, [rbx+58h]"], [69, "or rax, 10000h"], [70, "mov [rbx+58h], rax"], [71, "mov r13, [rbx+18h]"], [72, "jmp short loc_43DDA9"], [73, "mov r12, [r13+8]"], [74, "mov qword ptr [r12+20h], 0"], [75, "movzx eax, byte ptr [r12+2Bh]"], [76, "movzx eax, al"], [77, "and eax, 10h"], [78, "test eax, eax"], [79, "jz short loc_43DD97"], [80, "movzx eax, byte ptr [r12+2Ah]"], [81, "test al, al"], [82, "jnz short loc_43DD8F"], [83, "mov rax, [r12+10h]"], [84, "cmp rbx, rax"], [85, "jnz short loc_43DD7E"], [86, "mov rax, [r12+8]"], [87, "jmp short loc_43DD83"], [88, "mov rax, [r12+10h]"], [89, "mov rax, [rax+58h]"], [90, "and eax, 10h"], [91, "test rax, rax"], [92, "jz short loc_43DD97"], [93, "mov byte ptr [r12+2Bh], 0"], [94, "jmp short loc_43DDA5"], [95, "movzx eax, byte ptr [r12+2Bh]"], [96, "and eax, 0FFFFFFF1h"], [97, "mov [r12+2Bh], al"], [98, "mov r13, [r13+0]"], [99, "test r13, r13"], [100, "jnz short loc_43DD46"], [101, "mov rbx, r14"], [102, "test rbx, rbx"], [103, "jnz loc_43DC65"], [104, "mov rax, [rbp+var_38]"], [105, "mov rbx, [rax+10h]"], [106, "jmp short loc_43DDD1"], [107, "mov r14, [rbx]"], [108, "mov qword ptr [rbx], 0"], [109, "mov rbx, r14"], [110, "test rbx, rbx"], [111, "jnz short loc_43DDC4"], [112, "nop"], [113, "nop"], [114, "add rsp, 20h"], [115, "pop rbx"], [116, "pop r12"], [117, "pop r13"], [118, "pop r14"], [119, "pop rbp"], [120, "retn"]], "data_dep": [[9, 7], [10, 9], [12, 93], [12, 102], [12, 13], [12, 70], [12, 97], [12, 74], [12, 32], [13, 102], [14, 13], [14, 32], [14, 70], [14, 102], [15, 14], [16, 15], [17, 16], [18, 74], [18, 32], [18, 93], [18, 102], [18, 13], [18, 70], [18, 97], [19, 18], [20, 19], [21, 32], [21, 93], [21, 102], [21, 13], [21, 70], [21, 97], [21, 74], [22, 74], [22, 21], [22, 32], [22, 13], [22, 70], [22, 93], [22, 97], [24, 97], [24, 74], [24, 23], [24, 32], [24, 70], [24, 93], [24, 13], [25, 22], [25, 24], [26, 25], [27, 102], [30, 13], [30, 70], [30, 93], [30, 102], [30, 97], [30, 74], [30, 32], [31, 30], [32, 102], [32, 31], [33, 102], [33, 32], [34, 33], [35, 34], [36, 102], [39, 97], [39, 74], [39, 32], [39, 13], [39, 70], [39, 93], [39, 102], [40, 39], [41, 40], [42, 32], [42, 93], [42, 102], [42, 13], [42, 70], [42, 97], [42, 74], [43, 42], [44, 43], [45, 44], [46, 102], [46, 8], [47, 46], [48, 93], [48, 102], [48, 97], [48, 74], [48, 32], [48, 13], [48, 70], [49, 48], [49, 32], [49, 70], [49, 93], [49, 13], [49, 97], [49, 74], [50, 49], [52, 50], [52, 54], [53, 32], [53, 13], [53, 52], [53, 70], [53, 93], [53, 97], [53, 74], [54, 53], [55, 50], [55, 54], [56, 74], [56, 32], [56, 55], [56, 13], [56, 70], [56, 93], [56, 97], [57, 56], [58, 57], [59, 58], [60, 50], [60, 54], [62, 60], [63, 102], [66, 65], [67, 66], [68, 13], [68, 70], [68, 93], [68, 102], [68, 97], [68, 74], [68, 32], [69, 68], [70, 102], [70, 69], [71, 93], [71, 102], [71, 97], [71, 74], [71, 32], [71, 13], [71, 70], [73, 99], [73, 74], [73, 32], [73, 13], [73, 70], [73, 93], [73, 97], [74, 73], [75, 74], [75, 73], [75, 93], [75, 97], [76, 75], [77, 76], [78, 77], [79, 78], [80, 97], [80, 74], [80, 32], [80, 73], [80, 93], [80, 13], [80, 70], [81, 80], [82, 81], [83, 32], [83, 73], [83, 13], [83, 70], [83, 93], [83, 97], [83, 74], [84, 102], [84, 83], [85, 84], [86, 74], [86, 97], [86, 32], [86, 73], [86, 93], [86, 13], [86, 70], [88, 93], [88, 97], [88, 74], [88, 32], [88, 73], [88, 13], [88, 70], [89, 13], [89, 70], [89, 93], [89, 86], [89, 88], [89, 97], [89, 74], [89, 32], [90, 89], [91, 90], [92, 91], [93, 73], [95, 13], [95, 70], [95, 93], [95, 97], [95, 74], [95, 32], [95, 73], [96, 95], [97, 96], [97, 73], [98, 32], [98, 93], [98, 13], [98, 70], [98, 74], [98, 97], [98, 99], [99, 71], [99, 98], [100, 99], [101, 12], [102, 10], [102, 101], [103, 102], [104, 7], [105, 70], [105, 93], [105, 104], [105, 97], [105, 74], [105, 32], [105, 13], [107, 97], [107, 108], [107, 110], [107, 32], [107, 93], [107, 13], [107, 70], [107, 74], [108, 110], [109, 107], [110, 109], [110, 105], [111, 110], [114, 6], [115, 5], [116, 4], [117, 3], [118, 2], [119, 0], [120, 104]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/42faebc29e6877a2606d36c9ee4a9acccbfddd98af102782d4cb07481a63ee48_42faebc29e6877a2606d36c9ee4a9acccbfddd98af102782d4cb07481a63ee48.jsonl.gz", "strip_func_name": "sub_43DC41", "query": "\n\n\n__int64 __fastcall sub_43DC41(__int64 a1, __int64 a2)\n{\n__int64 i; // rbx\n__int64 v3; // r14\n_QWORD *k; // r13\n__int64 v5; // r12\n__int64 v6; // rax\n__int64 result; // rax\n_QWORD *l; // rbx\n_QWORD *v9; // r14\n__int64 j; // [rsp+18h] [rbp-28h]\n\nfor ( i = *(_QWORD *)(a1 + 8); i; i = v3 )\n{\nv3 = *(_QWORD *)i;\n*(_QWORD *)i = 0LL;\nif ( (*(_QWORD *)(i + 88) & 0x20000LL) != 0 )\n{\nif ( *(_QWORD *)(i + 64) && *(_QWORD *)(*(_QWORD *)(i + 64) + 40LL) > qword_51C428 )\nsub_4347D8(i);\n*(_QWORD *)(i + 88) &= 0xFFFFFFFFFFFDFFFFLL;\nif ( *(_QWORD *)(i + 72) )\nsub_43DB7C(i);\n}\nif ( *(_QWORD *)(i + 16) )\n{\nif ( (*(_QWORD *)(i + 88) & 0x10000LL) == 0 && i != a2 )\n{\nfor ( j = **(_QWORD **)(i + 136); (*(_BYTE *)(j + 15) & 0x20) != 0; j = *(_QWORD *)j )\n;\nif ( (unsigned int)sub_43451C(i, j, 8) )\n*(_QWORD *)(i + 88) |= 0x10000uLL;\n}\n}\nfor ( k = *(_QWORD **)(i + 24); k; k = (_QWORD *)*k )\n{\nv5 = k[1];\n*(_QWORD *)(v5 + 32) = 0LL;\nif ( (*(_BYTE *)(v5 + 43) & 0x10) != 0\n&& (*(_BYTE *)(v5 + 42)\n|| (i != *(_QWORD *)(v5 + 16) ? (v6 = *(_QWORD *)(v5 + 16)) : (v6 = *(_QWORD *)(v5 + 8)),\n(*(_QWORD *)(v6 + 88) & 0x10LL) != 0)) )\n{\n*(_BYTE *)(v5 + 43) = 0;\n}\nelse\n{\n*(_BYTE *)(v5 + 43) &= 0xF1u;\n}\n}\n}\nresult = a1;\nfor ( l = *(_QWORD **)(a1 + 16); l; l = v9 )\n{\nv9 = (_QWORD *)*l;\n*l = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,j,sub_43DC41,sub_4347D8,sub_43DB7C,sub_43451C,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'stg', 'a2': 'skipnd', 'j': 'h', 'sub_43DC41': 'DeactivateStage', 'sub_4347D8': 'DequeueEvent', 'sub_43DB7C': 'MergePunts', 'sub_43451C': 'EnqueueHist'}"}
hids_client_handle_can_write_without_reponse
c0fe0b1d115c9a9d40b2c9859f7dfd1ea6098b73116e2548a49a45e30fbdd252
bluekitchen
btstack
NA
static void hids_client_handle_can_write_without_reponse(void * context) { hids_client_t *client = (hids_client_t *) context; uint8_t att_status; switch (client->state){ case HIDS_CLIENT_STATE_W2_SET_PROTOCOL_MODE_WITHOUT_RESPONSE: att_status = gatt_client_write_value_of_characteristic_without_response( client->con_handle, client->services[client->service_index].protocol_mode_value_handle, 1, (uint8_t *)&client->required_protocol_mode); #ifdef ENABLE_TESTING_SUPPORT printf("\n\nSet report mode %d of service %d, status 0x%02x", client->required_protocol_mode, client->service_index, att_status); #endif if (att_status == ATT_ERROR_SUCCESS){ client->services[client->service_index].protocol_mode = client->required_protocol_mode; if ((client->service_index + 1) < client->num_instances){ client->service_index++; hids_run_for_client(client); break; } } // read UUIDS for external characteristics if (hids_client_report_map_uuid_query_init(client)){ hids_run_for_client(client); break; } // discover characteristic descriptor for all Report characteristics, // then read value of characteristic descriptor to get Report ID if (hids_client_report_query_init(client)){ hids_run_for_client(client); break; } client->state = HIDS_CLIENT_STATE_CONNECTED; hids_emit_connection_established(client, ERROR_CODE_SUCCESS); break; case HIDS_CLIENT_W2_WRITE_VALUE_OF_CHARACTERISTIC_WITHOUT_RESPONSE: #ifdef ENABLE_TESTING_SUPPORT printf(" Write characteristic [service %d, handle 0x%04X]:\n", client->service_index, client->handle); #endif client->state = HIDS_CLIENT_STATE_CONNECTED; (void) gatt_client_write_value_of_characteristic_without_response(client->con_handle, client->handle, 1, (uint8_t *) &client->value); break; default: break; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42E99E", "function_addr": 4385182, "binary_name": "c0fe0b1d115c9a9d40b2c9859f7dfd1ea6098b73116e2548a49a45e30fbdd252.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 [rbp+var_8], rax"], [6, "mov rax, [rbp+var_8]"], [7, "mov eax, [rax+0Ch]"], [8, "cmp eax, 5"], [9, "jz short loc_42E9CC"], [10, "cmp eax, 1Bh"], [11, "jz loc_42EAEE"], [12, "jmp loc_42EB2D"], [13, "mov rax, [rbp+var_8]"], [14, "lea rdx, [rax+74h]"], [15, "mov rax, [rbp+var_8]"], [16, "movzx eax, byte ptr [rax+70h]"], [17, "movzx eax, al"], [18, "mov rsi, [rbp+var_8]"], [19, "movsxd rcx, eax"], [20, "mov rax, rcx"], [21, "shl rax, 3"], [22, "sub rax, rcx"], [23, "shl rax, 2"], [24, "add rax, rsi"], [25, "add rax, 2Ch "], [26, "movzx eax, word ptr [rax]"], [27, "movzx esi, ax"], [28, "mov rax, [rbp+var_8]"], [29, "movzx eax, word ptr [rax+8]"], [30, "movzx eax, ax"], [31, "mov rcx, rdx"], [32, "mov edx, 1"], [33, "mov edi, eax"], [34, "call sub_4290E3"], [35, "mov [rbp+var_9], al"], [36, "cmp [rbp+var_9], 0"], [37, "jnz short loc_42EA94"], [38, "mov rax, [rbp+var_8]"], [39, "movzx eax, byte ptr [rax+70h]"], [40, "movzx ecx, al"], [41, "mov rax, [rbp+var_8]"], [42, "mov edx, [rax+74h]"], [43, "mov rsi, [rbp+var_8]"], [44, "movsxd rcx, ecx"], [45, "mov rax, rcx"], [46, "shl rax, 3"], [47, "sub rax, rcx"], [48, "shl rax, 2"], [49, "add rax, rsi"], [50, "add rax, 1Ch"], [51, "mov [rax], edx"], [52, "mov rax, [rbp+var_8]"], [53, "movzx eax, byte ptr [rax+70h]"], [54, "movzx eax, al"], [55, "lea edx, [rax+1]"], [56, "mov rax, [rbp+var_8]"], [57, "movzx eax, byte ptr [rax+18h]"], [58, "movzx eax, al"], [59, "cmp edx, eax"], [60, "jge short loc_42EA94"], [61, "mov rax, [rbp+var_8]"], [62, "movzx eax, byte ptr [rax+70h]"], [63, "lea edx, [rax+1]"], [64, "mov rax, [rbp+var_8]"], [65, "mov [rax+70h], dl"], [66, "mov rax, [rbp+var_8]"], [67, "mov rdi, rax"], [68, "call sub_42E1FA"], [69, "jmp loc_42EB2D"], [70, "mov rax, [rbp+var_8]"], [71, "mov rdi, rax"], [72, "call sub_42D644"], [73, "test al, al"], [74, "jz short loc_42EAB2"], [75, "mov rax, [rbp+var_8]"], [76, "mov rdi, rax"], [77, "call sub_42E1FA"], [78, "jmp short loc_42EB2D"], [79, "mov rax, [rbp+var_8]"], [80, "mov rdi, rax"], [81, "call sub_42D7A2"], [82, "test al, al"], [83, "jz short loc_42EAD0"], [84, "mov rax, [rbp+var_8]"], [85, "mov rdi, rax"], [86, "call sub_42E1FA"], [87, "jmp short loc_42EB2D"], [88, "mov rax, [rbp+var_8]"], [89, "mov dword ptr [rax+0Ch], 14h"], [90, "mov rax, [rbp+var_8]"], [91, "mov esi, 0"], [92, "mov rdi, rax"], [93, "call sub_42DB48"], [94, "jmp short loc_42EB2D"], [95, "mov rax, [rbp+var_8]"], [96, "mov dword ptr [rax+0Ch], 14h"], [97, "mov rax, [rbp+var_8]"], [98, "lea rdx, [rax+652h]"], [99, "mov rax, [rbp+var_8]"], [100, "movzx eax, word ptr [rax+650h]"], [101, "movzx esi, ax"], [102, "mov rax, [rbp+var_8]"], [103, "movzx eax, word ptr [rax+8]"], [104, "movzx eax, ax"], [105, "mov rcx, rdx"], [106, "mov edx, 1"], [107, "mov edi, eax"], [108, "call sub_4290E3"], [109, "nop"], [110, "nop"], [111, "leave"], [112, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [10, 7], [11, 10], [13, 5], [14, 13], [15, 5], [16, 15], [17, 16], [18, 5], [19, 17], [20, 19], [21, 20], [22, 19], [22, 21], [23, 22], [24, 23], [24, 18], [25, 24], [26, 25], [27, 26], [28, 5], [29, 28], [30, 29], [31, 14], [33, 30], [35, 34], [36, 35], [37, 36], [38, 5], [39, 38], [40, 39], [41, 5], [42, 41], [43, 5], [44, 40], [45, 44], [46, 45], [47, 44], [47, 46], [48, 47], [49, 48], [49, 43], [50, 49], [51, 50], [51, 42], [52, 5], [53, 52], [53, 51], [54, 53], [55, 54], [55, 42], [55, 51], [56, 5], [57, 56], [57, 51], [58, 57], [59, 55], [59, 58], [60, 59], [61, 5], [62, 61], [62, 65], [62, 51], [63, 65], [63, 51], [63, 62], [63, 55], [64, 5], [65, 63], [65, 64], [66, 5], [67, 66], [70, 5], [71, 70], [73, 72], [74, 73], [75, 5], [76, 75], [79, 5], [80, 79], [82, 81], [83, 82], [84, 5], [85, 84], [88, 5], [89, 88], [90, 5], [92, 90], [95, 5], [96, 95], [97, 5], [98, 96], [98, 97], [99, 5], [100, 96], [100, 99], [101, 100], [102, 5], [103, 102], [103, 96], [104, 103], [105, 98], [107, 104], [112, 93], [112, 68], [112, 77], [112, 86], [112, 108], [112, 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/c0fe0b1d115c9a9d40b2c9859f7dfd1ea6098b73116e2548a49a45e30fbdd252_c0fe0b1d115c9a9d40b2c9859f7dfd1ea6098b73116e2548a49a45e30fbdd252.jsonl.gz", "strip_func_name": "sub_42E99E", "query": "\n\n\n__int64 __fastcall sub_42E99E(__int64 a1)\n{\n__int64 result; // rax\n\nresult = *(unsigned int *)(a1 + 12);\nif ( (_DWORD)result == 5 )\n{\nif ( (unsigned __int8)sub_4290E3(\n*(_WORD *)(a1 + 8),\n*(_WORD *)(a1 + 28LL * *(unsigned __int8 *)(a1 + 112) + 44),\n1u,\n(const void *)(a1 + 116))\n|| (*(_DWORD *)(a1 + 28LL * *(unsigned __int8 *)(a1 + 112) + 28) = *(_DWORD *)(a1 + 116),\n*(unsigned __int8 *)(a1 + 112) + 1 >= *(unsigned __int8 *)(a1 + 24)) )\n{\nif ( (unsigned __int8)sub_42D644(a1) || (unsigned __int8)sub_42D7A2(a1) )\n{\nresult = sub_42E1FA(a1);\n}\nelse\n{\n*(_DWORD *)(a1 + 12) = 20;\nresult = sub_42DB48(a1, 0);\n}\n}\nelse\n{\n++*(_BYTE *)(a1 + 112);\nresult = sub_42E1FA(a1);\n}\n}\nelse if ( (_DWORD)result == 27 )\n{\n*(_DWORD *)(a1 + 12) = 20;\nresult = sub_4290E3(*(_WORD *)(a1 + 8), *(_WORD *)(a1 + 1616), 1u, (const void *)(a1 + 1618));\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_42E99E,sub_4290E3,sub_42D644,sub_42D7A2,sub_42E1FA,sub_42DB48,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'context', 'sub_42E99E': 'hids_client_handle_can_write_without_reponse', 'sub_4290E3': 'gatt_client_write_value_of_characteristic_without_response', 'sub_42D644': 'hids_client_report_map_uuid_query_init', 'sub_42D7A2': 'hids_client_report_query_init', 'sub_42E1FA': 'hids_run_for_client', 'sub_42DB48': 'hids_emit_connection_established'}"}
value_clear
0bdd3e3355b55ed2816435efa21042f8306da2b2ea7b587febce5c0891e6891f
andoma
vmir
NA
static void value_clear(ir_value_t *iv) { free(iv->iv_name); iv->iv_name = NULL; free(iv->iv_data); iv->iv_data = NULL; ir_value_instr_t *ivi; while((ivi = LIST_FIRST(&iv->iv_instructions)) != NULL) ivi_destroy(ivi); switch(iv->iv_class) { case IR_VC_GLOBALVAR: free(iv->iv_gvar->ig_name); free(iv->iv_gvar); break; default: break; } iv->iv_class = IR_VC_UNDEF; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404D08", "function_addr": 4214024, "binary_name": "0bdd3e3355b55ed2816435efa21042f8306da2b2ea7b587febce5c0891e6891f.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 rax, [rax+10h]"], [6, "mov rdi, rax"], [7, "call _free"], [8, "mov rax, [rbp+var_18]"], [9, "mov qword ptr [rax+10h], 0"], [10, "mov rax, [rbp+var_18]"], [11, "mov rax, [rax+18h]"], [12, "mov rdi, rax"], [13, "call _free"], [14, "mov rax, [rbp+var_18]"], [15, "mov qword ptr [rax+18h], 0"], [16, "jmp short loc_404D5A"], [17, "mov rax, [rbp+var_8]"], [18, "mov rdi, rax"], [19, "call sub_404C07"], [20, "mov rax, [rbp+var_18]"], [21, "mov rax, [rax+8]"], [22, "mov [rbp+var_8], rax"], [23, "cmp [rbp+var_8], 0"], [24, "jnz short loc_404D4E"], [25, "mov rax, [rbp+var_18]"], [26, "mov eax, [rax]"], [27, "cmp eax, 2"], [28, "jnz short loc_404D9E"], [29, "mov rax, [rbp+var_18]"], [30, "mov rax, [rax+30h]"], [31, "mov rax, [rax+18h]"], [32, "mov rdi, rax"], [33, "call _free"], [34, "mov rax, [rbp+var_18]"], [35, "mov rax, [rax+30h]"], [36, "mov rdi, rax"], [37, "call _free"], [38, "jmp short loc_404D9F"], [39, "nop"], [40, "mov rax, [rbp+var_18]"], [41, "mov dword ptr [rax], 0"], [42, "nop"], [43, "leave"], [44, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [8, 3], [9, 8], [10, 3], [11, 10], [11, 9], [12, 11], [14, 3], [15, 14], [17, 22], [18, 17], [20, 3], [21, 9], [21, 15], [21, 20], [22, 21], [23, 22], [24, 23], [25, 3], [26, 25], [26, 9], [26, 15], [27, 26], [28, 27], [29, 3], [30, 9], [30, 15], [30, 29], [31, 9], [31, 15], [31, 30], [32, 31], [34, 3], [35, 34], [35, 9], [35, 15], [36, 35], [40, 3], [41, 40], [44, 40]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n 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_404D08", "query": "\n\n\n__int64 __fastcall sub_404D08(__int64 a1)\n{\n__int64 result; // rax\n_QWORD *v2; // [rsp+18h] [rbp-8h]\n\nfree(*(void **)(a1 + 16));\n*(_QWORD *)(a1 + 16) = 0LL;\nfree(*(void **)(a1 + 24));\n*(_QWORD *)(a1 + 24) = 0LL;\nwhile ( 1 )\n{\nv2 = *(_QWORD **)(a1 + 8);\nif ( !v2 )\nbreak;\nsub_404C07(v2);\n}\nif ( *(_DWORD *)a1 == 2 )\n{\nfree(*(void **)(*(_QWORD *)(a1 + 48) + 24LL));\nfree(*(void **)(a1 + 48));\n}\nresult = a1;\n*(_DWORD *)a1 = 0;\nreturn result;\n}\n\n\n\nQ:[a1,v2,sub_404D08,sub_404C07,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'iv', 'v2': 'ivi', 'sub_404D08': 'value_clear', 'sub_404C07': 'ivi_destroy'}"}
tmxr_show_lines
1812cddc11d5d37e1bfd4b1269e60e52c00acecac170e6456fc2ba2cddc55918
open-simh
simh
NA
t_stat tmxr_show_lines (FILE *st, UNIT *uptr, int32 val, CONST void *desc) { const TMXR *mp = (const TMXR *) desc; if (mp == NULL) return SCPE_IERR; fprintf (st, "lines=%d", mp->lines); return SCPE_OK; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_46EAFE", "function_addr": 4647678, "binary_name": "1812cddc11d5d37e1bfd4b1269e60e52c00acecac170e6456fc2ba2cddc55918.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 [rbp+var_30], rcx"], [7, "mov rax, [rbp+var_30]"], [8, "mov [rbp+var_8], rax"], [9, "cmp [rbp+var_8], 0"], [10, "jnz short loc_46EB2B"], [11, "mov eax, 65h "], [12, "jmp short locret_46EB4C"], [13, "mov rax, [rbp+var_8]"], [14, "mov edx, [rax]"], [15, "mov rax, [rbp+var_18]"], [16, "mov esi, offset aLinesD"], [17, "mov rdi, rax"], [18, "mov eax, 0"], [19, "call sub_43F06E"], [20, "mov eax, 0"], [21, "leave"], [22, "retn"]], "data_dep": [[7, 6], [8, 7], [9, 8], [10, 9], [13, 8], [14, 13], [15, 3], [17, 15], [22, 11], [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/1812cddc11d5d37e1bfd4b1269e60e52c00acecac170e6456fc2ba2cddc55918_1812cddc11d5d37e1bfd4b1269e60e52c00acecac170e6456fc2ba2cddc55918.jsonl.gz", "strip_func_name": "sub_46EAFE", "query": "\n\n\n__int64 __fastcall sub_46EAFE(FILE *a1, __int64 a2, __int64 a3, unsigned int *a4, __int64 a5, __int64 a6)\n{\nif ( !a4 )\nreturn 101LL;\nsub_43F06E(a1, \"lines=%d\", *a4, (__int64)a4, a5, a6, a4);\nreturn 0LL;\n}\n\n\n\nQ:[a4,a1,a2,a3,sub_46EAFE,sub_43F06E,]\nAssistant: ", "hints": "[]", "response": "{'a4': 'desc', 'a1': 'st', 'a2': 'uptr', 'a3': 'val', 'sub_46EAFE': 'tmxr_show_lines', 'sub_43F06E': 'Fprintf'}"}
hci_transport_link_send_ack_packet
4f50d4a61abfbd8c407aba68361e53a458c52f761b528ded37cf6ddc166819b1
micropython
micropython-unicorn
NA
static void hci_transport_link_send_ack_packet(void){ // Pure ACK package is without DIC as there is no payload either log_debug("send ack %u", link_ack_nr); uint8_t header[4]; hci_transport_link_calc_header(header, 0, link_ack_nr, 0, 0, LINK_ACKNOWLEDGEMENT_TYPE, 0); hci_transport_slip_send_frame(header, NULL, 0, 0); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40571B", "function_addr": 4216603, "binary_name": "4f50d4a61abfbd8c407aba68361e53a458c52f761b528ded37cf6ddc166819b1.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "movzx eax, cs:byte_487821"], [4, "movzx edx, al"], [5, "lea rax, [rbp+var_4]"], [6, "push 0"], [7, "mov r9d, 0"], [8, "mov r8d, 0"], [9, "mov ecx, 0"], [10, "mov esi, 0"], [11, "mov rdi, rax"], [12, "call sub_40543F"], [13, "add rsp, 8"], [14, "lea rax, [rbp+var_4]"], [15, "mov ecx, 0"], [16, "mov edx, 0"], [17, "mov esi, 0"], [18, "mov rdi, rax"], [19, "call sub_405380"], [20, "nop"], [21, "leave"], [22, "retn"]], "data_dep": [[4, 3], [5, 3], [11, 5], [13, 2], [14, 12], [18, 14], [22, 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/4f50d4a61abfbd8c407aba68361e53a458c52f761b528ded37cf6ddc166819b1_4f50d4a61abfbd8c407aba68361e53a458c52f761b528ded37cf6ddc166819b1.jsonl.gz", "strip_func_name": "sub_40571B", "query": "\n\n\n__int64 sub_40571B()\n{\nchar v1[4]; // [rsp+Ch] [rbp-4h] BYREF\n\nsub_40543F(v1, 0, byte_487821, 0, 0, 0, 0);\nreturn sub_405380(v1, 0LL, 0, 0);\n}\n\n\n\nQ:[v1,sub_40571B,sub_40543F,sub_405380,]\nAssistant: ", "hints": "[]", "response": "{'v1': 'header', 'sub_40571B': 'hci_transport_link_send_ack_packet', 'sub_40543F': 'hci_transport_link_calc_header', 'sub_405380': 'hci_transport_slip_send_frame'}"}
p2p_unlink_sd_query
8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f
sonic-net
sonic-buildimage
NA
static int p2p_unlink_sd_query(struct p2p_data *p2p, struct p2p_sd_query *query) { struct p2p_sd_query *q, *prev; int query_number = 0; q = p2p->sd_queries; prev = NULL; while (q) { if (q == query) { /* If the query is a broadcast query, decrease one from * all the devices */ if (query->for_all_peers) p2p_decrease_sd_bc_queries(p2p, query_number); if (prev) prev->next = q->next; else p2p->sd_queries = q->next; if (p2p->sd_query == query) p2p->sd_query = NULL; return 1; } if (q->for_all_peers) query_number++; prev = q; q = q->next; } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42A641", "function_addr": 4367937, "binary_name": "8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_14], 0"], [6, "mov rax, [rbp+var_28]"], [7, "mov rax, [rax+520h]"], [8, "mov [rbp+var_8], rax"], [9, "mov [rbp+var_10], 0"], [10, "jmp loc_42A706"], [11, "mov rax, [rbp+var_8]"], [12, "cmp rax, [rbp+var_30]"], [13, "jnz short loc_42A6E4"], [14, "mov rax, [rbp+var_30]"], [15, "mov eax, [rax+10h]"], [16, "test eax, eax"], [17, "jz short loc_42A69A"], [18, "mov edx, [rbp+var_14]"], [19, "mov rax, [rbp+var_28]"], [20, "mov esi, edx"], [21, "mov rdi, rax"], [22, "call sub_42A5AF"], [23, "cmp [rbp+var_10], 0"], [24, "jz short loc_42A6B1"], [25, "mov rax, [rbp+var_8]"], [26, "mov rdx, [rax]"], [27, "mov rax, [rbp+var_10]"], [28, "mov [rax], rdx"], [29, "jmp short loc_42A6C3"], [30, "mov rax, [rbp+var_8]"], [31, "mov rdx, [rax]"], [32, "mov rax, [rbp+var_28]"], [33, "mov [rax+520h], rdx"], [34, "mov rax, [rbp+var_28]"], [35, "mov rax, [rax+60h]"], [36, "cmp [rbp+var_30], rax"], [37, "jnz short loc_42A6DD"], [38, "mov rax, [rbp+var_28]"], [39, "mov qword ptr [rax+60h], 0"], [40, "mov eax, 1"], [41, "jmp short locret_42A716"], [42, "mov rax, [rbp+var_8]"], [43, "mov eax, [rax+10h]"], [44, "test eax, eax"], [45, "jz short loc_42A6F3"], [46, "add [rbp+var_14], 1"], [47, "mov rax, [rbp+var_8]"], [48, "mov [rbp+var_10], rax"], [49, "mov rax, [rbp+var_8]"], [50, "mov rax, [rax]"], [51, "mov [rbp+var_8], rax"], [52, "cmp [rbp+var_8], 0"], [53, "jnz loc_42A674"], [54, "mov eax, 0"], [55, "leave"], [56, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [11, 51], [11, 8], [12, 4], [12, 11], [13, 12], [14, 4], [15, 14], [16, 15], [17, 16], [18, 46], [18, 5], [19, 3], [20, 18], [21, 19], [23, 9], [23, 48], [24, 23], [25, 51], [25, 8], [26, 25], [27, 9], [27, 48], [28, 27], [28, 26], [30, 51], [30, 8], [31, 30], [32, 3], [33, 32], [33, 31], [34, 3], [35, 33], [35, 28], [35, 34], [36, 4], [36, 35], [37, 36], [38, 3], [39, 38], [42, 51], [42, 8], [43, 42], [44, 43], [45, 44], [46, 5], [46, 46], [47, 51], [47, 8], [48, 47], [49, 8], [49, 51], [50, 49], [51, 50], [52, 51], [52, 8], [53, 52], [56, 40], [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/8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f_8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f.jsonl.gz", "strip_func_name": "sub_42A641", "query": "\n\n\n__int64 __fastcall sub_42A641(__int64 a1, __int64 a2)\n{\nint v3; // [rsp+1Ch] [rbp-14h]\n__int64 *v4; // [rsp+20h] [rbp-10h]\n__int64 *v5; // [rsp+28h] [rbp-8h]\n\nv3 = 0;\nv5 = *(__int64 **)(a1 + 1312);\nv4 = 0LL;\nwhile ( 1 )\n{\nif ( !v5 )\nreturn 0LL;\nif ( v5 == (__int64 *)a2 )\nbreak;\nif ( *((_DWORD *)v5 + 4) )\n++v3;\nv4 = v5;\nv5 = (__int64 *)*v5;\n}\nif ( *(_DWORD *)(a2 + 16) )\nsub_42A5AF(a1, v3);\nif ( v4 )\n*v4 = *v5;\nelse\n*(_QWORD *)(a1 + 1312) = *v5;\nif ( a2 == *(_QWORD *)(a1 + 96) )\n*(_QWORD *)(a1 + 96) = 0LL;\nreturn 1LL;\n}\n\n\n\nQ:[a1,a2,v3,v4,v5,sub_42A641,sub_42A5AF,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'p2p', 'a2': 'query', 'v3': 'query_number', 'v4': 'prev', 'v5': 'q', 'sub_42A641': 'p2p_unlink_sd_query', 'sub_42A5AF': 'p2p_decrease_sd_bc_queries'}"}
XML_item_link
09e593e1a10a4f6cadf5c016cb4c8cfb0a3586515f0619eba999737feb58c9d7
imatix
gsl
NA
static int XML_item_link (void *item) { if (item) ((GSL_XML_ITEM *) item)-> links++; return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_431B06", "function_addr": 4397830, "binary_name": "09e593e1a10a4f6cadf5c016cb4c8cfb0a3586515f0619eba999737feb58c9d7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "cmp [rbp+var_8], 0"], [4, "jz short loc_431B24"], [5, "mov rax, [rbp+var_8]"], [6, "mov eax, [rax]"], [7, "lea edx, [rax+1]"], [8, "mov rax, [rbp+var_8]"], [9, "mov [rax], edx"], [10, "mov eax, 0"], [11, "pop rbp"], [12, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 2], [6, 5], [7, 6], [8, 2], [9, 8], [9, 7], [11, 0], [12, 10]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/09e593e1a10a4f6cadf5c016cb4c8cfb0a3586515f0619eba999737feb58c9d7_09e593e1a10a4f6cadf5c016cb4c8cfb0a3586515f0619eba999737feb58c9d7.jsonl.gz", "strip_func_name": "sub_431B06", "query": "\n\n\n__int64 __fastcall sub_431B06(_DWORD *a1)\n{\nif ( a1 )\n++*a1;\nreturn 0LL;\n}\n\n\n\nQ:[a1,sub_431B06,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'item', 'sub_431B06': 'XML_item_link'}"}
test_truncates_array
4adbd87c0b95c03f61eb34f9266d44f12aa93e6f20ffe092687d72d8f14c43e7
monome
teletype
NA
void test_truncates_array(void) { const char s[] = "{" "\"nested_array\": [" "{\"ubyte\": 1}, " "{\"ubyte\": 2}, " "{\"ubyte\": 3}, " "{\"ubyte\": 4}, " "{\"ubyte\": 5}, " "{\"ubyte\": 6}, " "{\"ubyte\": 7}" "]" "}"; FILE* fp = write_temp_file("in___truncates_array.tmp", s, strlen(s)); set_fp(fp); memset(&json_test_dest, 0, sizeof(json_test_dest_t)); json_read_result_t rd_result = json_read( read_fp, copy, &json_test_dest, &json_test_docdef, json_test_buf, sizeof(json_test_buf), json_test_tokens, sizeof(json_test_tokens) / sizeof(json_test_tokens[0])); fclose(fp); TEST_ASSERT_EQUAL_INT(rd_result, JSON_READ_OK); TEST_ASSERT_EQUAL_UINT8(1, json_test_dest.nested_array[0].ubyte); TEST_ASSERT_EQUAL_UINT8(2, json_test_dest.nested_array[1].ubyte); TEST_ASSERT_EQUAL_UINT8(3, json_test_dest.nested_array[2].ubyte); TEST_ASSERT_EQUAL_UINT8(4, json_test_dest.nested_array[3].ubyte); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404C71", "function_addr": 4213873, "binary_name": "4adbd87c0b95c03f61eb34f9266d44f12aa93e6f20ffe092687d72d8f14c43e7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 90h"], [3, "mov rax, 64657473656E227Bh"], [4, "mov rdx, 3A2279617272615Fh"], [5, "mov qword ptr [rbp+s], rax"], [6, "mov [rbp+var_88], rdx"], [7, "mov rax, 74796275227B5B20h"], [8, "mov rdx, 202C7D31203A2265h"], [9, "mov [rbp+var_80], rax"], [10, "mov [rbp+var_78], rdx"], [11, "mov rax, 226574796275227Bh"], [12, "mov rdx, 227B202C7D32203Ah"], [13, "mov [rbp+var_70], rax"], [14, "mov [rbp+var_68], rdx"], [15, "mov rax, 203A226574796275h"], [16, "mov rdx, 6275227B202C7D33h"], [17, "mov [rbp+var_60], rax"], [18, "mov [rbp+var_58], rdx"], [19, "mov rax, 7D34203A22657479h"], [20, "mov rdx, 74796275227B202Ch"], [21, "mov [rbp+var_50], rax"], [22, "mov [rbp+var_48], rdx"], [23, "mov rax, 202C7D35203A2265h"], [24, "mov rdx, 226574796275227Bh"], [25, "mov [rbp+var_40], rax"], [26, "mov [rbp+var_38], rdx"], [27, "mov rax, 227B202C7D36203Ah"], [28, "mov rdx, 203A226574796275h"], [29, "mov [rbp+var_30], rax"], [30, "mov [rbp+var_28], rdx"], [31, "mov [rbp+var_20], 7D5D7D37h"], [32, "mov [rbp+var_1C], 0"], [33, "lea rax, [rbp+s]"], [34, "mov rdi, rax"], [35, "call _strlen"], [36, "mov rdx, rax"], [37, "lea rax, [rbp+s]"], [38, "mov rsi, rax"], [39, "mov edi, offset aInTruncatesArr"], [40, "call sub_4042EF"], [41, "mov [rbp+stream], rax"], [42, "mov rax, [rbp+stream]"], [43, "mov rdi, rax"], [44, "call sub_40450E"], [45, "mov edx, 1A4h"], [46, "mov esi, 0"], [47, "mov edi, offset byte_40D7C0"], [48, "call _memset"], [49, "push 8"], [50, "push offset unk_40B720"], [51, "mov r9d, 40h "], [52, "mov r8d, offset unk_40B6E0"], [53, "mov ecx, offset unk_40B640"], [54, "mov edx, offset byte_40D7C0"], [55, "mov esi, offset sub_404581"], [56, "mov edi, offset sub_404524"], [57, "call sub_403BE2"], [58, "add rsp, 10h"], [59, "mov [rbp+var_C], eax"], [60, "mov rax, [rbp+stream]"], [61, "mov rdi, rax"], [62, "call _fclose"], [63, "mov eax, [rbp+var_C]"], [64, "mov r8d, 94h"], [65, "mov ecx, 0F1h"], [66, "mov edx, 0"], [67, "mov esi, 0"], [68, "mov rdi, rax"], [69, "call sub_405759"], [70, "movzx eax, cs:byte_40D7EA"], [71, "movzx eax, al"], [72, "mov r8d, 21h "], [73, "mov ecx, 0F2h"], [74, "mov edx, 0"], [75, "mov rsi, rax"], [76, "mov edi, 1"], [77, "call sub_405759"], [78, "movzx eax, cs:byte_40D7EB"], [79, "movzx eax, al"], [80, "mov r8d, 21h "], [81, "mov ecx, 0F3h"], [82, "mov edx, 0"], [83, "mov rsi, rax"], [84, "mov edi, 2"], [85, "call sub_405759"], [86, "movzx eax, cs:byte_40D7EC"], [87, "movzx eax, al"], [88, "mov r8d, 21h "], [89, "mov ecx, 0F4h"], [90, "mov edx, 0"], [91, "mov rsi, rax"], [92, "mov edi, 3"], [93, "call sub_405759"], [94, "movzx eax, cs:byte_40D7ED"], [95, "movzx eax, al"], [96, "mov r8d, 21h "], [97, "mov ecx, 0F5h"], [98, "mov edx, 0"], [99, "mov rsi, rax"], [100, "mov edi, 4"], [101, "call sub_405759"], [102, "nop"], [103, "leave"], [104, "retn"]], "data_dep": [[5, 3], [6, 4], [9, 7], [10, 8], [13, 11], [14, 12], [17, 15], [18, 16], [21, 19], [22, 20], [25, 23], [26, 24], [29, 27], [30, 28], [33, 5], [33, 27], [34, 33], [36, 35], [37, 5], [37, 35], [38, 37], [41, 40], [42, 41], [43, 42], [58, 2], [59, 57], [60, 41], [61, 60], [63, 59], [68, 63], [71, 70], [75, 71], [79, 78], [83, 79], [87, 86], [91, 87], [95, 94], [99, 95], [104, 101]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/4adbd87c0b95c03f61eb34f9266d44f12aa93e6f20ffe092687d72d8f14c43e7_4adbd87c0b95c03f61eb34f9266d44f12aa93e6f20ffe092687d72d8f14c43e7.jsonl.gz", "strip_func_name": "sub_404C71", "query": "\n\n\n__int64 sub_404C71()\n{\nsize_t v0; // rax\nchar s[8]; // [rsp+0h] [rbp-90h] BYREF\nunsigned int v3; // [rsp+84h] [rbp-Ch]\nFILE *stream; // [rsp+88h] [rbp-8h]\n\nstrcpy(\ns,\n\"{\\\"nested_array\\\": [{\\\"ubyte\\\": 1}, {\\\"ubyte\\\": 2}, {\\\"ubyte\\\": 3}, {\\\"ubyte\\\": 4}, {\\\"ubyte\\\": 5}, {\\\"ubyte\\\": 6}, \"\n\"{\\\"ubyte\\\": 7}]}\");\nv0 = strlen(s);\nstream = sub_4042EF(\"in___truncates_array.tmp\", s, v0);\nsub_40450E(stream);\nmemset(&byte_40D7C0, 0, 0x1A4uLL);\nv3 = sub_403BE2(\n(__int64 (__fastcall *)(char *, size_t))sub_404524,\n(__int64)sub_404581,\n(__int64)&byte_40D7C0,\n(__int64)&unk_40B640,\nbyte_40B6E0,\n0x40uLL,\n(__int64)&unk_40B720,\n8uLL);\nfclose(stream);\nsub_405759(v3, 0LL, 0LL, 241LL, 148LL);\nsub_405759(1LL, (unsigned __int8)byte_40D7EA, 0LL, 242LL, 33LL);\nsub_405759(2LL, (unsigned __int8)byte_40D7EB, 0LL, 243LL, 33LL);\nsub_405759(3LL, (unsigned __int8)byte_40D7EC, 0LL, 244LL, 33LL);\nreturn sub_405759(4LL, (unsigned __int8)byte_40D7ED, 0LL, 245LL, 33LL);\n}\n\n\n\nQ:[v3,stream,sub_404C71,sub_4042EF,sub_40450E,sub_403BE2,sub_404524,sub_404581,sub_405759,]\nAssistant: ", "hints": "[]", "response": "{'v3': 'rd_result', 'stream': 'fp', 'sub_404C71': 'test_truncates_array', 'sub_4042EF': 'write_temp_file', 'sub_40450E': 'set_fp', 'sub_403BE2': 'json_read', 'sub_404524': 'read_fp', 'sub_404581': 'copy', 'sub_405759': 'UnityAssertEqualNumber'}"}
p256_shr
d2894c3de884fb1dfff5c44d4454e6ff301397cd659d60b42d584bca743003a3
difcareer
BootImgTool
NA
void p256_shr(const p256_int* a, int n, p256_int* b) { int i; n %= P256_BITSPERDIGIT; for (i = 0; i < P256_NDIGITS - 1; ++i) { p256_digit accu = (P256_DIGIT(a, i) >> n); accu |= (P256_DIGIT(a, i + 1) << (P256_BITSPERDIGIT - n)); P256_DIGIT(b, i) = accu; } P256_DIGIT(b, i) = (P256_DIGIT(a, i) >> n); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402814", "function_addr": 4204564, "binary_name": "d2894c3de884fb1dfff5c44d4454e6ff301397cd659d60b42d584bca743003a3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov [rbp+var_1C], esi"], [4, "mov [rbp+var_28], rdx"], [5, "mov eax, [rbp+var_1C]"], [6, "cdq"], [7, "shr edx, 1Bh"], [8, "add eax, edx"], [9, "and eax, 1Fh"], [10, "sub eax, edx"], [11, "mov [rbp+var_1C], eax"], [12, "mov [rbp+var_4], 0"], [13, "jmp short loc_40288B"], [14, "mov rax, [rbp+var_18]"], [15, "mov edx, [rbp+var_4]"], [16, "movsxd rdx, edx"], [17, "mov edx, [rax+rdx*4]"], [18, "mov eax, [rbp+var_1C]"], [19, "mov ecx, eax"], [20, "shr edx, cl"], [21, "mov eax, edx"], [22, "mov [rbp+var_8], eax"], [23, "mov eax, [rbp+var_4]"], [24, "lea edx, [rax+1]"], [25, "mov rax, [rbp+var_18]"], [26, "movsxd rdx, edx"], [27, "mov edx, [rax+rdx*4]"], [28, "mov eax, 20h "], [29, "sub eax, [rbp+var_1C]"], [30, "mov ecx, eax"], [31, "shl edx, cl"], [32, "mov eax, edx"], [33, "or [rbp+var_8], eax"], [34, "mov rax, [rbp+var_28]"], [35, "mov edx, [rbp+var_4]"], [36, "movsxd rdx, edx"], [37, "mov ecx, [rbp+var_8]"], [38, "mov [rax+rdx*4], ecx"], [39, "add [rbp+var_4], 1"], [40, "cmp [rbp+var_4], 6"], [41, "jle short loc_40283D"], [42, "mov rax, [rbp+var_18]"], [43, "mov edx, [rbp+var_4]"], [44, "movsxd rdx, edx"], [45, "mov edx, [rax+rdx*4]"], [46, "mov eax, [rbp+var_1C]"], [47, "mov ecx, eax"], [48, "shr edx, cl"], [49, "mov ecx, edx"], [50, "mov rax, [rbp+var_28]"], [51, "mov edx, [rbp+var_4]"], [52, "movsxd rdx, edx"], [53, "mov [rax+rdx*4], ecx"], [54, "nop"], [55, "pop rbp"], [56, "retn"]], "data_dep": [[5, 3], [8, 5], [8, 7], [9, 8], [10, 9], [10, 7], [11, 10], [14, 2], [15, 39], [15, 12], [16, 15], [17, 14], [17, 38], [18, 11], [19, 18], [20, 17], [20, 19], [21, 20], [22, 21], [23, 12], [23, 39], [24, 23], [24, 20], [24, 38], [25, 2], [26, 24], [27, 25], [27, 38], [29, 28], [29, 11], [30, 29], [31, 30], [31, 27], [32, 31], [33, 32], [33, 22], [34, 4], [35, 39], [35, 12], [36, 35], [37, 33], [38, 34], [38, 37], [39, 12], [39, 39], [40, 12], [40, 39], [41, 40], [42, 2], [43, 12], [43, 39], [44, 43], [45, 42], [45, 38], [45, 53], [46, 11], [47, 46], [48, 45], [48, 47], [49, 48], [50, 4], [51, 12], [51, 39], [52, 51], [53, 50], [53, 49], [55, 0], [56, 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/d2894c3de884fb1dfff5c44d4454e6ff301397cd659d60b42d584bca743003a3_d2894c3de884fb1dfff5c44d4454e6ff301397cd659d60b42d584bca743003a3.jsonl.gz", "strip_func_name": "sub_402814", "query": "\n\n\n__int64 __fastcall sub_402814(__int64 a1, int a2, __int64 a3)\n{\n__int64 result; // rax\nint v4; // [rsp+Ch] [rbp-1Ch]\nint i; // [rsp+24h] [rbp-4h]\n\nv4 = a2 % 32;\nfor ( i = 0; i <= 6; ++i )\n*(_DWORD *)(a3 + 4LL * i) = (*(_DWORD *)(a1 + 4LL * (i + 1)) << (32 - v4)) | (*(_DWORD *)(a1 + 4LL * i) >> v4);\nresult = a3;\n*(_DWORD *)(a3 + 4LL * i) = *(_DWORD *)(a1 + 4LL * i) >> v4;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v4,sub_402814,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'b', 'a1': 'a', 'a2': 'n', 'v4': 'na', 'sub_402814': 'p256_shr'}"}
pj_errno_clear_handlers
a3e4f2ea093fcaf3e709fc4fd522bb0a36accac0c86ea61615c7de8c1eafc2c8
AonCyberLabs
D-Modem
NA
void pj_errno_clear_handlers(void) { err_msg_hnd_cnt = 0; pj_bzero(err_msg_hnd, sizeof(err_msg_hnd)); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_47988C", "function_addr": 4692108, "binary_name": "a3e4f2ea093fcaf3e709fc4fd522bb0a36accac0c86ea61615c7de8c1eafc2c8.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov cs:dword_4C1240, 0"], [3, "mov esi, 0A0h"], [4, "mov edi, offset unk_4C1260"], [5, "call sub_479550"], [6, "nop"], [7, "pop rbp"], [8, "retn"]], "data_dep": [[7, 0], [8, 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/a3e4f2ea093fcaf3e709fc4fd522bb0a36accac0c86ea61615c7de8c1eafc2c8_a3e4f2ea093fcaf3e709fc4fd522bb0a36accac0c86ea61615c7de8c1eafc2c8.jsonl.gz", "strip_func_name": "sub_47988C", "query": "\n\n\nvoid *sub_47988C()\n{\ndword_4C1240 = 0;\nreturn sub_479550(&unk_4C1260, 0xA0uLL);\n}\n\n\n\nQ:[sub_47988C,sub_479550,]\nAssistant: ", "hints": "[]", "response": "{'sub_47988C': 'pj_errno_clear_handlers', 'sub_479550': 'pj_bzero_35'}"}
mod_lua_bytes_set_int16_le
8e89f9502949c1a463a3dd08a58c3c7a60591689c0f4de603abd6f5993935ae2
aerospike
aerospike-tools-backup
NA
static int mod_lua_bytes_set_int16_le(lua_State * l) { // we expect 3 args if ( lua_gettop(l) != 3 ) { lua_pushboolean(l, false); return 1; } as_bytes * b = mod_lua_checkbytes(l, 1); lua_Integer i = luaL_optinteger(l, 2, 0); lua_Integer v = luaL_optinteger(l, 3, 0); // check preconditions: // - b != NULL // - 1 <= i <= UINT32_MAX // - INT16_MIN <= v <= INT16_MAX if ( !b || i < 1 || i > UINT32_MAX || v < INT16_MIN || v > INT16_MAX ) { lua_pushboolean(l, false); return 1; } bool res = false; uint32_t pos = (uint32_t)(i - 1); uint32_t size = 2; // ensure we have capacity, if not, then resize if ( as_bytes_ensure(b, pos + size, true) == true ) { // write the bytes int16_t val = cf_swap_to_le16((int16_t) v); res = as_bytes_set_int16(b, pos, val); } lua_pushboolean(l, res); return 1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_452593", "function_addr": 4531603, "binary_name": "8e89f9502949c1a463a3dd08a58c3c7a60591689c0f4de603abd6f5993935ae2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_38], rdi"], [4, "mov rax, [rbp+var_38]"], [5, "mov rdi, rax"], [6, "call sub_45796D"], [7, "cmp eax, 3"], [8, "jz short loc_4525CB"], [9, "mov rax, [rbp+var_38]"], [10, "mov esi, 0"], [11, "mov rdi, rax"], [12, "call sub_4588C1"], [13, "mov eax, 1"], [14, "jmp locret_4526CF"], [15, "mov rax, [rbp+var_38]"], [16, "mov esi, 1"], [17, "mov rdi, rax"], [18, "call sub_451453"], [19, "mov [rbp+var_10], rax"], [20, "mov rax, [rbp+var_38]"], [21, "mov edx, 0"], [22, "mov esi, 2"], [23, "mov rdi, rax"], [24, "call sub_45A57F"], [25, "mov [rbp+var_18], rax"], [26, "mov rax, [rbp+var_38]"], [27, "mov edx, 0"], [28, "mov esi, 3"], [29, "mov rdi, rax"], [30, "call sub_45A57F"], [31, "mov [rbp+var_20], rax"], [32, "cmp [rbp+var_10], 0"], [33, "jz short loc_452641"], [34, "cmp [rbp+var_18], 0"], [35, "jle short loc_452641"], [36, "mov eax, 0FFFFFFFFh"], [37, "cmp [rbp+var_18], rax"], [38, "jg short loc_452641"], [39, "cmp [rbp+var_20], 0FFFFFFFFFFFF8000h"], [40, "jl short loc_452641"], [41, "cmp [rbp+var_20], 7FFFh"], [42, "jle short loc_452659"], [43, "mov rax, [rbp+var_38]"], [44, "mov esi, 0"], [45, "mov rdi, rax"], [46, "call sub_4588C1"], [47, "mov eax, 1"], [48, "jmp short locret_4526CF"], [49, "mov [rbp+var_1], 0"], [50, "mov rax, [rbp+var_18]"], [51, "sub eax, 1"], [52, "mov [rbp+var_24], eax"], [53, "mov [rbp+var_28], 2"], [54, "mov edx, [rbp+var_24]"], [55, "mov eax, [rbp+var_28]"], [56, "lea ecx, [rdx+rax]"], [57, "mov rax, [rbp+var_10]"], [58, "mov edx, 1"], [59, "mov esi, ecx"], [60, "mov rdi, rax"], [61, "call sub_4378BD"], [62, "test al, al"], [63, "jz short loc_4526B8"], [64, "mov rax, [rbp+var_20]"], [65, "movzx eax, ax"], [66, "mov edi, eax"], [67, "call sub_4512C7"], [68, "mov [rbp+var_2A], ax"], [69, "movsx edx, [rbp+var_2A]"], [70, "mov ecx, [rbp+var_24]"], [71, "mov rax, [rbp+var_10]"], [72, "mov esi, ecx"], [73, "mov rdi, rax"], [74, "call sub_45117A"], [75, "mov [rbp+var_1], al"], [76, "movzx edx, [rbp+var_1]"], [77, "mov rax, [rbp+var_38]"], [78, "mov esi, edx"], [79, "mov rdi, rax"], [80, "call sub_4588C1"], [81, "mov eax, 1"], [82, "leave"], [83, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [8, 7], [9, 3], [11, 9], [15, 3], [17, 15], [19, 18], [20, 3], [23, 20], [25, 24], [26, 3], [29, 26], [31, 30], [32, 19], [33, 32], [34, 25], [35, 34], [37, 36], [37, 25], [38, 37], [39, 31], [40, 39], [41, 31], [42, 41], [43, 3], [45, 43], [50, 25], [51, 50], [52, 51], [54, 52], [55, 53], [56, 55], [57, 19], [59, 56], [60, 57], [62, 61], [63, 62], [64, 31], [65, 64], [66, 65], [68, 67], [69, 68], [70, 52], [71, 19], [72, 70], [73, 71], [75, 74], [76, 49], [76, 75], [77, 3], [78, 76], [79, 77], [83, 81], [83, 47], [83, 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/8e89f9502949c1a463a3dd08a58c3c7a60591689c0f4de603abd6f5993935ae2_8e89f9502949c1a463a3dd08a58c3c7a60591689c0f4de603abd6f5993935ae2.jsonl.gz", "strip_func_name": "sub_452593", "query": "\n\n\n__int64 __fastcall sub_452593(__int64 a1)\n{\n__int64 result; // rax\n__int16 v2; // [rsp+16h] [rbp-2Ah]\n__int64 v3; // [rsp+20h] [rbp-20h]\n__int64 v4; // [rsp+28h] [rbp-18h]\n__int64 v5; // [rsp+30h] [rbp-10h]\nunsigned __int8 v6; // [rsp+3Fh] [rbp-1h]\n\nif ( (unsigned int)sub_45796D(a1) == 3\n&& (v5 = sub_451453(a1, 1u), v4 = sub_45A57F(a1, 2LL, 0LL), v3 = sub_45A57F(a1, 3LL, 0LL), v5)\n&& v4 > 0\n&& v4 <= 0xFFFFFFFFLL\n&& v3 >= -32768\n&& v3 <= 0x7FFF )\n{\nv6 = 0;\nif ( (unsigned __int8)sub_4378BD(v5, (int)v4 - 1 + 2, 1) )\n{\nv2 = sub_4512C7(v3);\nv6 = sub_45117A(v5, (int)v4 - 1, v2);\n}\nsub_4588C1(a1, v6);\nresult = 1LL;\n}\nelse\n{\nsub_4588C1(a1, 0LL);\nresult = 1LL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,v3,v5,v6,sub_452593,sub_45796D,sub_451453,sub_45A57F,sub_4378BD,sub_4512C7,sub_45117A,sub_4588C1,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'l', 'v3': 'v', 'v5': 'b', 'v6': 'res', 'sub_452593': 'mod_lua_bytes_set_int16_le', 'sub_45796D': 'lua_gettop', 'sub_451453': 'mod_lua_checkbytes', 'sub_45A57F': 'luaL_optinteger', 'sub_4378BD': 'as_bytes_ensure', 'sub_4512C7': 'cf_swap_to_le16', 'sub_45117A': 'as_bytes_set_int16', 'sub_4588C1': 'lua_pushboolean'}"}
tcflower_parse_ethproto
f697a76c1b8a68f879e8a28d13b1cbc21453acbdddc35cda76ca2582bbd7166a
Netronome
libkefir
NA
static int tcflower_parse_ethproto(const char * const **argv, unsigned int *argc, enum ether_proto_type *ethtype) { if (!strcmp(**argv, "ip") || !strcmp(**argv, "ipv4")) { *ethtype = TCFLOWER_ETH_PROTO_IPV4; } else if (!strcmp(**argv, "ipv6")) { *ethtype = TCFLOWER_ETH_PROTO_IPV6; } else { err_fail("unsupported protocol %s", **argv); return -1; } NEXT_ARG(); return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40EBE2", "function_addr": 4254690, "binary_name": "f697a76c1b8a68f879e8a28d13b1cbc21453acbdddc35cda76ca2582bbd7166a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "mov rax, [rbp+var_8]"], [7, "mov rax, [rax]"], [8, "mov rax, [rax]"], [9, "lea rsi, aIp"], [10, "mov rdi, rax"], [11, "call _strcmp"], [12, "test eax, eax"], [13, "jz short loc_40EC30"], [14, "mov rax, [rbp+var_8]"], [15, "mov rax, [rax]"], [16, "mov rax, [rax]"], [17, "lea rsi, aIpv4"], [18, "mov rdi, rax"], [19, "call _strcmp"], [20, "test eax, eax"], [21, "jnz short loc_40EC3C"], [22, "mov rax, [rbp+var_18]"], [23, "mov dword ptr [rax], 1"], [24, "jmp short loc_40EC8A"], [25, "mov rax, [rbp+var_8]"], [26, "mov rax, [rax]"], [27, "mov rax, [rax]"], [28, "lea rsi, aIpv6"], [29, "mov rdi, rax"], [30, "call _strcmp"], [31, "test eax, eax"], [32, "jnz short loc_40EC65"], [33, "mov rax, [rbp+var_18]"], [34, "mov dword ptr [rax], 2"], [35, "jmp short loc_40EC8A"], [36, "mov rax, [rbp+var_8]"], [37, "mov rax, [rax]"], [38, "mov rax, [rax]"], [39, "mov rsi, rax"], [40, "lea rdi, aUnsupportedPro"], [41, "mov eax, 0"], [42, "call sub_40EA8E"], [43, "mov eax, 0FFFFFFFFh"], [44, "jmp short locret_40ECB0"], [45, "mov rax, [rbp+var_8]"], [46, "mov rax, [rax]"], [47, "lea rdx, [rax+8]"], [48, "mov rax, [rbp+var_8]"], [49, "mov [rax], rdx"], [50, "mov rax, [rbp+var_10]"], [51, "mov eax, [rax]"], [52, "lea edx, [rax-1]"], [53, "mov rax, [rbp+var_10]"], [54, "mov [rax], edx"], [55, "mov eax, 0"], [56, "leave"], [57, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [10, 8], [12, 11], [13, 12], [14, 3], [15, 14], [16, 15], [17, 9], [18, 16], [20, 19], [21, 20], [22, 5], [23, 22], [25, 3], [26, 25], [27, 26], [28, 17], [29, 27], [31, 30], [32, 31], [33, 5], [34, 33], [36, 3], [37, 36], [38, 37], [39, 38], [40, 29], [45, 3], [46, 45], [46, 54], [46, 23], [46, 34], [46, 49], [47, 34], [47, 46], [47, 49], [47, 54], [47, 23], [48, 3], [49, 47], [49, 48], [50, 4], [51, 50], [51, 49], [52, 49], [52, 51], [52, 47], [53, 4], [54, 52], [54, 53], [57, 43], [57, 55]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/f697a76c1b8a68f879e8a28d13b1cbc21453acbdddc35cda76ca2582bbd7166a_f697a76c1b8a68f879e8a28d13b1cbc21453acbdddc35cda76ca2582bbd7166a.jsonl.gz", "strip_func_name": "sub_40EBE2", "query": "\n\n\n__int64 __fastcall sub_40EBE2(__int64 **a1, _DWORD *a2, _DWORD *a3)\n{\n__int64 v3; // rdx\n__int64 v4; // rcx\n__int64 v5; // r8\n__int64 v6; // r9\n\nif ( !strcmp((const char *)**a1, \"ip\") || !strcmp((const char *)**a1, \"ipv4\") )\n{\n*a3 = 1;\n}\nelse\n{\nif ( strcmp((const char *)**a1, \"ipv6\") )\n{\nsub_40EA8E((__int64)\"unsupported protocol %s\", **a1, v3, v4, v5, v6);\nreturn 0xFFFFFFFFLL;\n}\n*a3 = 2;\n}\n++*a1;\n--*a2;\nreturn 0LL;\n}\n\n\n\nQ:[a3,a1,a2,v3,sub_40EBE2,sub_40EA8E,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'ethtype', 'a1': 'argv', 'a2': 'argc', 'v3': 'ethtype', 'sub_40EBE2': 'tcflower_parse_ethproto', 'sub_40EA8E': 'err_fail_6'}"}
VbGbbReadData
75dd770f33852c52f67cce0d82194ead5bc4f124b153162239681c4538972dc4
Telecominfraproject
OpenCellular
NA
VbError_t VbGbbReadData(struct vb2_context *ctx, uint32_t offset, uint32_t size, void *buf) { struct vb2_shared_data *sd = vb2_get_sd(ctx); /* This is the old API, for backwards compatibility */ if (!sd->gbb) return VBERROR_INVALID_GBB; if (offset + size > sd->gbb_size) return VBERROR_INVALID_GBB; memcpy(buf, ((uint8_t *)sd->gbb) + offset, size); return VBERROR_SUCCESS; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407DD6", "function_addr": 4226518, "binary_name": "75dd770f33852c52f67cce0d82194ead5bc4f124b153162239681c4538972dc4.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov dword ptr [rbp+n+4], esi"], [5, "mov dword ptr [rbp+n], edx"], [6, "mov [rbp+dest], rcx"], [7, "mov rax, [rbp+var_18]"], [8, "mov rdi, rax"], [9, "call sub_407DC4"], [10, "mov [rbp+var_8], rax"], [11, "mov rax, [rbp+var_8]"], [12, "mov rax, [rax+88h]"], [13, "test rax, rax"], [14, "jnz short loc_407E13"], [15, "mov eax, 10013h"], [16, "jmp short locret_407E58"], [17, "mov edx, dword ptr [rbp+n+4]"], [18, "mov eax, dword ptr [rbp+n]"], [19, "add edx, eax"], [20, "mov rax, [rbp+var_8]"], [21, "mov eax, [rax+90h]"], [22, "cmp edx, eax"], [23, "jbe short loc_407E30"], [24, "mov eax, 10013h"], [25, "jmp short locret_407E58"], [26, "mov edx, dword ptr [rbp+n]"], [27, "mov rax, [rbp+var_8]"], [28, "mov rcx, [rax+88h]"], [29, "mov eax, dword ptr [rbp+n+4]"], [30, "add rcx, rax"], [31, "mov rax, [rbp+dest]"], [32, "mov rsi, rcx"], [33, "mov rdi, rax"], [34, "call _memcpy"], [35, "mov eax, 0"], [36, "leave"], [37, "retn"]], "data_dep": [[7, 3], [8, 7], [10, 9], [11, 10], [12, 11], [13, 12], [14, 13], [17, 4], [18, 5], [19, 18], [19, 17], [20, 10], [21, 20], [22, 19], [22, 21], [23, 22], [26, 5], [27, 10], [28, 27], [29, 4], [30, 29], [30, 28], [31, 6], [32, 30], [33, 31], [37, 15], [37, 24], [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/75dd770f33852c52f67cce0d82194ead5bc4f124b153162239681c4538972dc4_75dd770f33852c52f67cce0d82194ead5bc4f124b153162239681c4538972dc4.jsonl.gz", "strip_func_name": "sub_407DD6", "query": "\n\n\n__int64 __fastcall sub_407DD6(__int64 a1, unsigned int a2, unsigned int a3, void *a4)\n{\n__int64 v7; // [rsp+28h] [rbp-8h]\n\nv7 = sub_407DC4(a1);\nif ( !*(_QWORD *)(v7 + 136) )\nreturn 65555LL;\nif ( a3 + a2 > *(_DWORD *)(v7 + 144) )\nreturn 65555LL;\nmemcpy(a4, (const void *)(a2 + *(_QWORD *)(v7 + 136)), a3);\nreturn 0LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,v7,sub_407DD6,sub_407DC4,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'size', 'a4': 'buf', 'a1': 'ctx', 'a2': 'offset', 'v7': 'sd', 'sub_407DD6': 'VbGbbReadData', 'sub_407DC4': 'vb2_get_sd_7'}"}
cgload
9b52d55f032208d40e2177f7f1130ccafd1b4161b04e11a056bd187b5cf4fbcb
DoctorWkt
acwj
NA
int cgload(int value) { // Get a new register int r= alloc_register(); // Print out the code to initialise it fprintf(Outfile, "\tmovq\t$%d, %s\n", value, reglist[r]); return(r); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401314", "function_addr": 4199188, "binary_name": "9b52d55f032208d40e2177f7f1130ccafd1b4161b04e11a056bd187b5cf4fbcb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_14], edi"], [4, "call sub_401207"], [5, "mov [rbp+var_4], eax"], [6, "mov eax, [rbp+var_4]"], [7, "cdqe"], [8, "mov rcx, off_4040A0[rax*8]"], [9, "mov rax, cs:stream"], [10, "mov edx, [rbp+var_14]"], [11, "mov esi, offset aMovqDS"], [12, "mov rdi, rax"], [13, "mov eax, 0"], [14, "call _fprintf"], [15, "mov eax, [rbp+var_4]"], [16, "leave"], [17, "retn"]], "data_dep": [[5, 4], [6, 5], [10, 3], [12, 9], [15, 5], [17, 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/9b52d55f032208d40e2177f7f1130ccafd1b4161b04e11a056bd187b5cf4fbcb_9b52d55f032208d40e2177f7f1130ccafd1b4161b04e11a056bd187b5cf4fbcb.jsonl.gz", "strip_func_name": "sub_401314", "query": "\n\n\n__int64 __fastcall sub_401314(unsigned int a1)\n{\nunsigned int v2; // [rsp+1Ch] [rbp-4h]\n\nv2 = sub_401207();\nfprintf(stream, \"\\tmovq\\t$%d, %s\\n\", a1, (const char *)*(&off_4040A0 + (int)v2));\nreturn v2;\n}\n\n\n\nQ:[a1,v2,sub_401314,sub_401207,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'value', 'v2': 'r', 'sub_401314': 'cgload', 'sub_401207': 'alloc_register'}"}
json_lexer_destroy
cc7eb91bd0d1f267d417b082eda72b746468e69048449bb22bfbc4468f0e77da
aclements
mtrace
NA
void json_lexer_destroy(JSONLexer *lexer) { QDECREF(lexer->token); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4479F4", "function_addr": 4487668, "binary_name": "cc7eb91bd0d1f267d417b082eda72b746468e69048449bb22bfbc4468f0e77da.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, "mov rax, [rbp+var_18]"], [8, "mov rax, [rax+10h]"], [9, "mov rdi, rax"], [10, "call sub_44767F"], [11, "nop"], [12, "mov rax, [rbp+var_8]"], [13, "sub rax, fs:28h"], [14, "jz short locret_447A34"], [15, "call ___stack_chk_fail"], [16, "leave"], [17, "retn"]], "data_dep": [[5, 4], [7, 3], [8, 7], [9, 8], [12, 5], [13, 12], [14, 13], [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/cc7eb91bd0d1f267d417b082eda72b746468e69048449bb22bfbc4468f0e77da_cc7eb91bd0d1f267d417b082eda72b746468e69048449bb22bfbc4468f0e77da.jsonl.gz", "strip_func_name": "sub_4479F4", "query": "\n\n\nunsigned __int64 __fastcall sub_4479F4(__int64 a1)\n{\nunsigned __int64 v2; // [rsp+18h] [rbp-8h]\n\nv2 = __readfsqword(0x28u);\nsub_44767F(*(_QWORD **)(a1 + 16));\nreturn v2 - __readfsqword(0x28u);\n}\n\n\n\nQ:[a1,sub_4479F4,sub_44767F,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'lexer', 'sub_4479F4': 'json_lexer_destroy', 'sub_44767F': 'qobject_decref_3'}"}
srtp_crypto_kernel_alloc_cipher
a55437195f8ae7fcbc9fcbc7c4ce7ea2903742f0fcbd5868b140c66600d2ad6c
AonCyberLabs
D-Modem
NA
srtp_err_status_t srtp_crypto_kernel_alloc_cipher (srtp_cipher_type_id_t id, srtp_cipher_pointer_t *cp, int key_len, int tag_len) { const srtp_cipher_type_t *ct; /* * if the crypto_kernel is not yet initialized, we refuse to allocate * any ciphers - this is a bit extra-paranoid */ if (crypto_kernel.state != srtp_crypto_kernel_state_secure) { return srtp_err_status_init_fail; } ct = srtp_crypto_kernel_get_cipher_type(id); if (!ct) { return srtp_err_status_fail; } return ((ct)->alloc(cp, key_len, tag_len)); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4822AF", "function_addr": 4727471, "binary_name": "a55437195f8ae7fcbc9fcbc7c4ce7ea2903742f0fcbd5868b140c66600d2ad6c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_14], edi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_18], edx"], [6, "mov [rbp+var_24], ecx"], [7, "mov eax, cs:dword_518300"], [8, "cmp eax, 1"], [9, "jz short loc_4822D6"], [10, "mov eax, 5"], [11, "jmp short locret_48230B"], [12, "mov eax, [rbp+var_14]"], [13, "mov edi, eax"], [14, "call sub_48226C"], [15, "mov [rbp+var_8], rax"], [16, "cmp [rbp+var_8], 0"], [17, "jnz short loc_4822F2"], [18, "mov eax, 1"], [19, "jmp short locret_48230B"], [20, "mov rax, [rbp+var_8]"], [21, "mov r8, [rax]"], [22, "mov edx, [rbp+var_24]"], [23, "mov ecx, [rbp+var_18]"], [24, "mov rax, [rbp+var_20]"], [25, "mov esi, ecx"], [26, "mov rdi, rax"], [27, "call r8"], [28, "leave"], [29, "retn"]], "data_dep": [[8, 7], [9, 8], [12, 3], [13, 12], [15, 14], [16, 15], [17, 16], [20, 15], [21, 20], [22, 6], [23, 5], [24, 4], [25, 23], [26, 24], [27, 21], [29, 27], [29, 10], [29, 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/a55437195f8ae7fcbc9fcbc7c4ce7ea2903742f0fcbd5868b140c66600d2ad6c_a55437195f8ae7fcbc9fcbc7c4ce7ea2903742f0fcbd5868b140c66600d2ad6c.jsonl.gz", "strip_func_name": "sub_4822AF", "query": "\n\n\n__int64 __fastcall sub_4822AF(int a1, __int64 a2, unsigned int a3, unsigned int a4)\n{\n__int64 result; // rax\n__int64 (__fastcall **v7)(__int64, _QWORD, _QWORD); // [rsp+28h] [rbp-8h]\n\nif ( dword_518300 != 1 )\nreturn 5LL;\nv7 = (__int64 (__fastcall **)(__int64, _QWORD, _QWORD))sub_48226C(a1);\nif ( v7 )\nresult = (*v7)(a2, a3, a4);\nelse\nresult = 1LL;\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,v7,sub_4822AF,sub_48226C,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'key_len', 'a4': 'tag_len', 'a1': 'id', 'a2': 'cp', 'v7': 'ct', 'sub_4822AF': 'srtp_crypto_kernel_alloc_cipher', 'sub_48226C': 'srtp_crypto_kernel_get_cipher_type'}"}
tsx_set_state
a3e4f2ea093fcaf3e709fc4fd522bb0a36accac0c86ea61615c7de8c1eafc2c8
AonCyberLabs
D-Modem
NA
static void tsx_set_state( pjsip_transaction *tsx, pjsip_tsx_state_e state, pjsip_event_id_e event_src_type, void *event_src, int flag) { pjsip_tsx_state_e prev_state = tsx->state; /* New state must be greater than previous state */ pj_assert(state >= tsx->state); PJ_LOG(5, (tsx->obj_name, "State changed from %s to %s, event=%s", state_str[tsx->state], state_str[state], pjsip_event_str(event_src_type))); pj_log_push_indent(); /* Change state. */ tsx->state = state; /* Update the state handlers. */ if (tsx->role == PJSIP_ROLE_UAC) { tsx->state_handler = tsx_state_handler_uac[state]; } else { tsx->state_handler = tsx_state_handler_uas[state]; } /* Before informing TU about state changed, inform TU about * rx event. */ if (event_src_type==PJSIP_EVENT_RX_MSG && tsx->tsx_user && (flag & NO_NOTIFY)==0) { pjsip_rx_data *rdata = (pjsip_rx_data*) event_src; pj_assert(rdata != NULL); if (rdata->msg_info.msg->type == PJSIP_RESPONSE_MSG && tsx->tsx_user->on_rx_response) { (*tsx->tsx_user->on_rx_response)(rdata); } } /* Inform TU about state changed. */ if (tsx->tsx_user && tsx->tsx_user->on_tsx_state && (flag & NO_NOTIFY) == 0) { pjsip_event e; PJSIP_EVENT_INIT_TSX_STATE(e, tsx, event_src_type, event_src, prev_state); /* For timer event, release lock to avoid deadlock. * This should be safe because: * 1. The tsx state just switches to TERMINATED or DESTROYED. * 2. There should be no other processing taking place. All other * events, such as the ones handled by tsx_on_state_terminated() * should be ignored. * 3. tsx_shutdown() hasn't been called. * Refer to ticket #2001 (https://trac.pjsip.org/repos/ticket/2001). */ if (event_src_type == PJSIP_EVENT_TIMER && (pj_timer_entry *)event_src == &tsx->timeout_timer) { pj_grp_lock_release(tsx->grp_lock); } (*tsx->tsx_user->on_tsx_state)(tsx, &e); if (event_src_type == PJSIP_EVENT_TIMER && (pj_timer_entry *)event_src == &tsx->timeout_timer) { pj_grp_lock_acquire(tsx->grp_lock); } } /* When the transaction is terminated, release transport, and free the * saved last transmitted message. */ if (state == PJSIP_TSX_STATE_TERMINATED) { pj_time_val timeout = { 0, 0 }; /* If we're still waiting for a message to be sent.. */ if (tsx->transport_flag & TSX_HAS_PENDING_TRANSPORT) { /* Disassociate ourselves from the outstanding transmit data * so that when the send callback is called we will be able * to ignore that (otherwise we'll get assertion, see * http://trac.pjsip.org/repos/ticket/1033) */ if (tsx->pending_tx) { tsx->pending_tx->mod_data[mod_tsx_layer.mod.id] = NULL; tsx->pending_tx = NULL; /* Decrease pending send counter */ pj_grp_lock_dec_ref(tsx->grp_lock); } tsx->transport_flag &= ~(TSX_HAS_PENDING_TRANSPORT); } lock_timer(tsx); tsx_cancel_timer(tsx, &tsx->timeout_timer); if ((flag & NO_SCHEDULE_HANDLER) == 0) { tsx_schedule_timer(tsx, &tsx->timeout_timer, &timeout, TIMEOUT_TIMER); } unlock_timer(tsx); } else if (state == PJSIP_TSX_STATE_DESTROYED) { /* Unregister transaction. */ mod_tsx_layer_unregister_tsx(tsx); /* Destroy transaction. */ tsx_shutdown(tsx); } pj_log_pop_indent(); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43DD60", "function_addr": 4447584, "binary_name": "a3e4f2ea093fcaf3e709fc4fd522bb0a36accac0c86ea61615c7de8c1eafc2c8.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "add rsp, 0FFFFFFFFFFFFFF80h"], [3, "mov [rbp+var_68], rdi"], [4, "mov [rbp+var_6C], esi"], [5, "mov [rbp+var_70], edx"], [6, "mov [rbp+var_78], rcx"], [7, "mov [rbp+var_7C], r8d"], [8, "mov rax, [rbp+var_68]"], [9, "mov eax, [rax+0B8h]"], [10, "mov [rbp+var_4], eax"], [11, "mov rax, [rbp+var_68]"], [12, "mov eax, [rax+0B8h]"], [13, "cmp [rbp+var_6C], eax"], [14, "jnb short loc_43DDAF"], [15, "mov ecx, offset aTsxSetState"], [16, "mov edx, 4BEh"], [17, "mov esi, offset aSrcPjsipSipTra_3"], [18, "mov edi, offset aStateTsxState"], [19, "call ___assert_fail"], [20, "call sub_47C312"], [21, "cmp eax, 4"], [22, "jle short loc_43DE05"], [23, "mov eax, [rbp+var_70]"], [24, "mov edi, eax"], [25, "call sub_42F004"], [26, "mov rcx, rax"], [27, "mov eax, [rbp+var_6C]"], [28, "mov rdx, off_4B92E0[rax*8]"], [29, "mov rax, [rbp+var_68]"], [30, "mov eax, [rax+0B8h]"], [31, "mov eax, eax"], [32, "mov rax, off_4B92E0[rax*8]"], [33, "mov rsi, [rbp+var_68]"], [34, "lea rdi, [rsi+30h]"], [35, "mov r8, rcx"], [36, "mov rcx, rdx"], [37, "mov rdx, rax"], [38, "mov esi, offset aStateChangedFr"], [39, "mov eax, 0"], [40, "call sub_47CD31"], [41, "call sub_47C15C"], [42, "mov rax, [rbp+var_68]"], [43, "mov edx, [rbp+var_6C]"], [44, "mov [rax+0B8h], edx"], [45, "mov rax, [rbp+var_68]"], [46, "mov eax, [rax+50h]"], [47, "test eax, eax"], [48, "jnz short loc_43DE3A"], [49, "mov eax, [rbp+var_6C]"], [50, "mov rdx, off_4B9380[rax*8]"], [51, "mov rax, [rbp+var_68]"], [52, "mov [rax+0C8h], rdx"], [53, "jmp short loc_43DE50"], [54, "mov eax, [rbp+var_6C]"], [55, "mov rdx, off_4B93C0[rax*8]"], [56, "mov rax, [rbp+var_68]"], [57, "mov [rax+0C8h], rdx"], [58, "cmp [rbp+var_70], 3"], [59, "jnz short loc_43DECD"], [60, "mov rax, [rbp+var_68]"], [61, "mov rax, [rax+8]"], [62, "test rax, rax"], [63, "jz short loc_43DECD"], [64, "mov eax, [rbp+var_7C]"], [65, "and eax, 1"], [66, "test eax, eax"], [67, "jnz short loc_43DECD"], [68, "mov rax, [rbp+var_78]"], [69, "mov [rbp+var_10], rax"], [70, "cmp [rbp+var_10], 0"], [71, "jnz short loc_43DE95"], [72, "mov ecx, offset aTsxSetState"], [73, "mov edx, 4D7h"], [74, "mov esi, offset aSrcPjsipSipTra_3"], [75, "mov edi, offset aRdataVoid0"], [76, "call ___assert_fail"], [77, "mov rax, [rbp+var_10]"], [78, "mov rax, [rax+1158h]"], [79, "mov eax, [rax]"], [80, "cmp eax, 1"], [81, "jnz short loc_43DECD"], [82, "mov rax, [rbp+var_68]"], [83, "mov rax, [rax+8]"], [84, "mov rax, [rax+50h]"], [85, "test rax, rax"], [86, "jz short loc_43DECD"], [87, "mov rax, [rbp+var_68]"], [88, "mov rax, [rax+8]"], [89, "mov rdx, [rax+50h]"], [90, "mov rax, [rbp+var_10]"], [91, "mov rdi, rax"], [92, "call rdx"], [93, "mov rax, [rbp+var_68]"], [94, "mov rax, [rax+8]"], [95, "test rax, rax"], [96, "jz loc_43DF8C"], [97, "mov rax, [rbp+var_68]"], [98, "mov rax, [rax+8]"], [99, "mov rax, [rax+68h]"], [100, "test rax, rax"], [101, "jz loc_43DF8C"], [102, "mov eax, [rbp+var_7C]"], [103, "and eax, 1"], [104, "test eax, eax"], [105, "jnz loc_43DF8C"], [106, "mov [rbp+var_50], 5"], [107, "mov rax, [rbp+var_68]"], [108, "mov [rbp+var_40], rax"], [109, "mov eax, [rbp+var_70]"], [110, "mov [rbp+var_34], eax"], [111, "mov rax, [rbp+var_78]"], [112, "mov [rbp+var_48], rax"], [113, "mov eax, [rbp+var_4]"], [114, "mov [rbp+var_38], eax"], [115, "cmp [rbp+var_70], 1"], [116, "jnz short loc_43DF4A"], [117, "mov rax, [rbp+var_68]"], [118, "add rax, 1A0h"], [119, "cmp [rbp+var_78], rax"], [120, "jnz short loc_43DF4A"], [121, "mov rax, [rbp+var_68]"], [122, "mov rax, [rax+20h]"], [123, "mov rdi, rax"], [124, "call sub_47BC32"], [125, "mov rax, [rbp+var_68]"], [126, "mov rax, [rax+8]"], [127, "mov rcx, [rax+68h]"], [128, "lea rdx, [rbp+var_60]"], [129, "mov rax, [rbp+var_68]"], [130, "mov rsi, rdx"], [131, "mov rdi, rax"], [132, "call rcx"], [133, "cmp [rbp+var_70], 1"], [134, "jnz short loc_43DF8C"], [135, "mov rax, [rbp+var_68]"], [136, "add rax, 1A0h"], [137, "cmp [rbp+var_78], rax"], [138, "jnz short loc_43DF8C"], [139, "mov rax, [rbp+var_68]"], [140, "mov rax, [rax+20h]"], [141, "mov rdi, rax"], [142, "call sub_47BBFE"], [143, "cmp [rbp+var_6C], 6"], [144, "jnz loc_43E080"], [145, "mov [rbp+var_20], 0"], [146, "mov [rbp+var_18], 0"], [147, "mov rax, [rbp+var_68]"], [148, "mov eax, [rax+148h]"], [149, "and eax, 1"], [150, "test eax, eax"], [151, "jz short loc_43E022"], [152, "mov rax, [rbp+var_68]"], [153, "mov rax, [rax+160h]"], [154, "test rax, rax"], [155, "jz short loc_43E009"], [156, "mov rax, [rbp+var_68]"], [157, "mov rax, [rax+160h]"], [158, "mov edx, cs:dword_4B9260"], [159, "movsxd rdx, edx"], [160, "add rdx, 0A4h"], [161, "mov qword ptr [rax+rdx*8], 0"], [162, "mov rax, [rbp+var_68]"], [163, "mov qword ptr [rax+160h], 0"], [164, "mov rax, [rbp+var_68]"], [165, "mov rax, [rax+20h]"], [166, "mov rdi, rax"], [167, "call sub_47BE5E"], [168, "mov rax, [rbp+var_68]"], [169, "mov eax, [rax+148h]"], [170, "and eax, 0FFFFFFFEh"], [171, "mov edx, eax"], [172, "mov rax, [rbp+var_68]"], [173, "mov [rax+148h], edx"], [174, "mov rax, [rbp+var_68]"], [175, "mov rdi, rax"], [176, "call sub_43D64C"], [177, "mov rax, [rbp+var_68]"], [178, "lea rdx, [rax+1A0h]"], [179, "mov rax, [rbp+var_68]"], [180, "mov rsi, rdx"], [181, "mov rdi, rax"], [182, "call sub_43D711"], [183, "mov eax, [rbp+var_7C]"], [184, "and eax, 2"], [185, "test eax, eax"], [186, "jnz short loc_43E072"], [187, "mov rax, [rbp+var_68]"], [188, "lea rsi, [rax+1A0h]"], [189, "lea rdx, [rbp+var_20]"], [190, "mov rax, [rbp+var_68]"], [191, "mov ecx, 2"], [192, "mov rdi, rax"], [193, "call sub_43D68A"], [194, "mov rax, [rbp+var_68]"], [195, "mov rdi, rax"], [196, "call sub_43D66B"], [197, "jmp short loc_43E09E"], [198, "cmp [rbp+var_6C], 7"], [199, "jnz short loc_43E09E"], [200, "mov rax, [rbp+var_68]"], [201, "mov rdi, rax"], [202, "call sub_43CEBD"], [203, "mov rax, [rbp+var_68]"], [204, "mov rdi, rax"], [205, "call sub_43D9C8"], [206, "call sub_47C16D"], [207, "nop"], [208, "leave"], [209, "retn"]], "data_dep": [[8, 3], [9, 8], [10, 9], [11, 3], [12, 11], [13, 12], [13, 4], [14, 13], [21, 20], [22, 21], [23, 5], [24, 23], [26, 25], [27, 4], [29, 3], [30, 29], [31, 30], [33, 3], [34, 24], [34, 33], [35, 26], [36, 28], [37, 32], [42, 3], [43, 4], [44, 42], [44, 43], [45, 3], [46, 45], [46, 44], [47, 46], [48, 47], [49, 4], [51, 3], [52, 51], [52, 50], [54, 4], [56, 3], [57, 56], [57, 55], [58, 5], [59, 58], [60, 3], [61, 52], [61, 44], [61, 60], [61, 57], [62, 61], [63, 62], [64, 7], [65, 64], [66, 65], [67, 66], [68, 6], [69, 68], [70, 69], [71, 70], [77, 69], [78, 77], [78, 52], [78, 44], [78, 57], [79, 44], [79, 78], [79, 57], [79, 52], [80, 79], [81, 80], [82, 3], [83, 82], [83, 57], [83, 52], [83, 44], [84, 52], [84, 44], [84, 83], [84, 57], [85, 84], [86, 85], [87, 3], [88, 44], [88, 87], [88, 57], [88, 52], [89, 52], [89, 88], [89, 44], [89, 57], [90, 69], [91, 90], [92, 89], [93, 3], [94, 57], [94, 52], [94, 93], [94, 44], [95, 94], [96, 95], [97, 3], [98, 57], [98, 52], [98, 97], [98, 44], [99, 44], [99, 98], [99, 57], [99, 52], [100, 99], [101, 100], [102, 7], [103, 102], [104, 103], [105, 104], [107, 3], [108, 107], [109, 5], [110, 109], [111, 6], [112, 111], [113, 10], [114, 113], [115, 5], [116, 115], [117, 3], [118, 117], [119, 6], [119, 118], [120, 119], [121, 3], [122, 44], [122, 121], [122, 57], [122, 52], [123, 122], [125, 3], [126, 57], [126, 52], [126, 125], [126, 44], [127, 52], [127, 44], [127, 126], [127, 57], [128, 55], [128, 89], [128, 50], [129, 3], [130, 128], [131, 129], [132, 127], [133, 5], [134, 133], [135, 3], [136, 135], [137, 6], [137, 136], [138, 137], [139, 3], [140, 139], [140, 52], [140, 44], [140, 57], [141, 140], [143, 4], [144, 143], [147, 3], [148, 147], [148, 44], [148, 57], [148, 52], [149, 148], [150, 149], [151, 150], [152, 3], [153, 57], [153, 52], [153, 152], [153, 44], [154, 153], [155, 154], [156, 3], [157, 52], [157, 161], [157, 44], [157, 163], [157, 156], [157, 57], [159, 158], [160, 159], [161, 157], [162, 3], [163, 162], [164, 3], [165, 163], [165, 164], [166, 165], [168, 3], [169, 161], [169, 163], [169, 44], [169, 57], [169, 52], [169, 173], [169, 168], [170, 169], [171, 170], [172, 3], [173, 172], [173, 171], [174, 3], [175, 174], [177, 3], [178, 173], [178, 161], [178, 177], [178, 44], [178, 163], [178, 55], [178, 128], [178, 57], [178, 50], [178, 89], [178, 171], [178, 52], [179, 3], [180, 178], [181, 179], [183, 7], [184, 183], [185, 184], [186, 185], [187, 3], [188, 187], [188, 52], [188, 161], [188, 44], [188, 163], [188, 57], [188, 180], [188, 173], [189, 145], [189, 178], [190, 3], [192, 190], [194, 3], [195, 194], [198, 4], [199, 198], [200, 3], [201, 200], [203, 3], [204, 203], [209, 206]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/a3e4f2ea093fcaf3e709fc4fd522bb0a36accac0c86ea61615c7de8c1eafc2c8_a3e4f2ea093fcaf3e709fc4fd522bb0a36accac0c86ea61615c7de8c1eafc2c8.jsonl.gz", "strip_func_name": "sub_43DD60", "query": "\n\n\n__int64 __fastcall sub_43DD60(__int64 a1, unsigned int a2, int a3, __int64 a4, char a5, double a6, double a7)\n{\nunsigned int v7; // eax\nint v8; // er9\n__int64 (__fastcall *v9)(); // rdx\nchar v14[16]; // [rsp+20h] [rbp-60h] BYREF\nint v15; // [rsp+30h] [rbp-50h]\n__int64 v16; // [rsp+38h] [rbp-48h]\n__int64 v17; // [rsp+40h] [rbp-40h]\nint v18; // [rsp+48h] [rbp-38h]\nint v19; // [rsp+4Ch] [rbp-34h]\n__int64 v20[2]; // [rsp+60h] [rbp-20h] BYREF\n__int64 v21; // [rsp+70h] [rbp-10h]\nint v22; // [rsp+7Ch] [rbp-4h]\n\nv22 = *(_DWORD *)(a1 + 184);\nif ( a2 < *(_DWORD *)(a1 + 184) )\n__assert_fail(\"state >= tsx->state\", \"../src/pjsip/sip_transaction.c\", 0x4BEu, \"tsx_set_state\");\nif ( (int)sub_47C312(a6, a7) > 4 )\n{\nv7 = (unsigned int)sub_42F004(a3);\nsub_47CD31(\na1 + 48,\n(unsigned int)\"State changed from %s to %s, event=%s\",\n(unsigned int)off_4B92E0[*(unsigned int *)(a1 + 184)],\n(unsigned int)off_4B92E0[a2],\nv7,\nv8);\n}\nsub_47C15C();\n*(_DWORD *)(a1 + 184) = a2;\nif ( *(_DWORD *)(a1 + 80) )\nv9 = *(&off_4B93C0 + a2);\nelse\nv9 = off_4B9380[a2];\n*(_QWORD *)(a1 + 200) = v9;\nif ( a3 == 3 && *(_QWORD *)(a1 + 8) && (a5 & 1) == 0 )\n{\nv21 = a4;\nif ( !a4 )\n__assert_fail(\"rdata != ((void *)0)\", \"../src/pjsip/sip_transaction.c\", 0x4D7u, \"tsx_set_state\");\nif ( **(_DWORD **)(v21 + 4440) == 1 && *(_QWORD *)(*(_QWORD *)(a1 + 8) + 80LL) )\n(*(void (__fastcall **)(__int64))(*(_QWORD *)(a1 + 8) + 80LL))(v21);\n}\nif ( *(_QWORD *)(a1 + 8) && *(_QWORD *)(*(_QWORD *)(a1 + 8) + 104LL) && (a5 & 1) == 0 )\n{\nv15 = 5;\nv17 = a1;\nv19 = a3;\nv16 = a4;\nv18 = v22;\nif ( a3 == 1 && a4 == a1 + 416 )\nsub_47BC32(*(_QWORD *)(a1 + 32));\n(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)(a1 + 8) + 104LL))(a1, v14);\nif ( a3 == 1 && a4 == a1 + 416 )\nsub_47BBFE(*(_QWORD *)(a1 + 32));\n}\nif ( a2 == 6 )\n{\nv20[0] = 0LL;\nv20[1] = 0LL;\nif ( (*(_DWORD *)(a1 + 328) & 1) != 0 )\n{\nif ( *(_QWORD *)(a1 + 352) )\n{\n*(_QWORD *)(*(_QWORD *)(a1 + 352) + 8 * (dword_4B9260 + 164LL)) = 0LL;\n*(_QWORD *)(a1 + 352) = 0LL;\nsub_47BE5E(*(_QWORD *)(a1 + 32));\n}\n*(_DWORD *)(a1 + 328) &= 0xFFFFFFFE;\n}\nsub_43D64C(a1);\nsub_43D711(a1, a1 + 416);\nif ( (a5 & 2) == 0 )\nsub_43D68A(a1, a1 + 416, (int)v20, 2);\nsub_43D66B(a1);\n}\nelse if ( a2 == 7 )\n{\nsub_43CEBD(a1);\nsub_43D9C8(a1, a6, a7);\n}\nreturn sub_47C16D(a6);\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v14,v20,v21,v22,sub_43DD60,sub_47C312,sub_42F004,sub_47CD31,sub_47C15C,sub_47BC32,sub_47BBFE,sub_47BE5E,sub_43D64C,sub_43D711,sub_43D68A,sub_43D66B,sub_43CEBD,sub_43D9C8,sub_47C16D,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'event_src_type', 'a4': 'event_src', 'a1': 'tsx', 'a2': 'state', 'a5': 'flag', 'v14': 'e', 'v20': 'timeout', 'v21': 'rdata', 'v22': 'prev_state', 'sub_43DD60': 'tsx_set_state', 'sub_47C312': 'pj_log_get_level', 'sub_42F004': 'pjsip_event_str', 'sub_47CD31': 'pj_log_5', 'sub_47C15C': 'pj_log_push_indent', 'sub_47BC32': 'pj_grp_lock_release', 'sub_47BBFE': 'pj_grp_lock_acquire', 'sub_47BE5E': 'pj_grp_lock_dec_ref', 'sub_43D64C': 'lock_timer', 'sub_43D711': 'tsx_cancel_timer', 'sub_43D68A': 'tsx_schedule_timer', 'sub_43D66B': 'unlock_timer', 'sub_43CEBD': 'mod_tsx_layer_unregister_tsx', 'sub_43D9C8': 'tsx_shutdown', 'sub_47C16D': 'pj_log_pop_indent'}"}
change_syscall
e63f7e3980e67fa4c9a80dce84cdebcc38daa428f07143d8a5c120affbfc68c0
sslab-gatech
libmpk
NA
void change_syscall(struct __test_metadata *_metadata, pid_t tracee, int syscall) { int ret; ARCH_REGS regs; #ifdef HAVE_GETREGS ret = ptrace(PTRACE_GETREGS, tracee, 0, &regs); #else struct iovec iov; iov.iov_base = &regs; iov.iov_len = sizeof(regs); ret = ptrace(PTRACE_GETREGSET, tracee, NT_PRSTATUS, &iov); #endif EXPECT_EQ(0, ret) {} #if defined(__x86_64__) || defined(__i386__) || defined(__powerpc__) || \ defined(__s390__) || defined(__hppa__) { regs.SYSCALL_NUM = syscall; } #elif defined(__mips__) { if (regs.SYSCALL_NUM == __NR_O32_Linux) regs.SYSCALL_SYSCALL_NUM = syscall; else regs.SYSCALL_NUM = syscall; } #elif defined(__arm__) # ifndef PTRACE_SET_SYSCALL # define PTRACE_SET_SYSCALL 23 # endif { ret = ptrace(PTRACE_SET_SYSCALL, tracee, NULL, syscall); EXPECT_EQ(0, ret); } #elif defined(__aarch64__) # ifndef NT_ARM_SYSTEM_CALL # define NT_ARM_SYSTEM_CALL 0x404 # endif { iov.iov_base = &syscall; iov.iov_len = sizeof(syscall); ret = ptrace(PTRACE_SETREGSET, tracee, NT_ARM_SYSTEM_CALL, &iov); EXPECT_EQ(0, ret); } #else ASSERT_EQ(1, 0) { TH_LOG("How is the syscall changed on this architecture?"); } #endif /* If syscall is skipped, change return value. */ if (syscall == -1) #ifdef SYSCALL_NUM_RET_SHARE_REG TH_LOG("Can't modify syscall return on this architecture"); #else regs.SYSCALL_RET = EPERM; #endif #ifdef HAVE_GETREGS ret = ptrace(PTRACE_SETREGS, tracee, 0, &regs); #else iov.iov_base = &regs; iov.iov_len = sizeof(regs); ret = ptrace(PTRACE_SETREGSET, tracee, NT_PRSTATUS, &iov); #endif EXPECT_EQ(0, ret); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41481A", "function_addr": 4278298, "binary_name": "e63f7e3980e67fa4c9a80dce84cdebcc38daa428f07143d8a5c120affbfc68c0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 120h"], [3, "mov [rbp+var_118], rdi"], [4, "mov [rbp+var_11C], esi"], [5, "mov [rbp+var_120], edx"], [6, "lea rdx, [rbp+var_110]"], [7, "mov eax, [rbp+var_11C]"], [8, "mov rcx, rdx"], [9, "mov edx, 0"], [10, "mov esi, eax"], [11, "mov edi, 0Ch"], [12, "mov eax, 0"], [13, "call _ptrace"], [14, "mov [rbp+var_8], eax"], [15, "mov [rbp+var_4], 0"], [16, "mov eax, [rbp+var_8]"], [17, "mov [rbp+var_C], eax"], [18, "mov eax, [rbp+var_4]"], [19, "cmp eax, [rbp+var_C]"], [20, "jz loc_414926"], [21, "mov eax, [rbp+var_4]"], [22, "cdqe"], [23, "mov [rbp+var_18], rax"], [24, "mov eax, [rbp+var_C]"], [25, "cdqe"], [26, "mov [rbp+var_20], rax"], [27, "mov rax, [rbp+var_118]"], [28, "mov rdx, [rax]"], [29, "mov rax, cs:stderr"], [30, "push [rbp+var_20]"], [31, "push offset aRet"], [32, "push offset asc_4251F6"], [33, "push [rbp+var_18]"], [34, "mov r9d, offset a0"], [35, "mov r8, rdx"], [36, "mov ecx, 644h"], [37, "mov edx, offset aSeccompBpfC"], [38, "mov esi, offset aSDSExpectedSLl"], [39, "mov rdi, rax"], [40, "mov eax, 0"], [41, "call _fprintf"], [42, "add rsp, 20h"], [43, "mov rax, [rbp+var_118]"], [44, "mov dword ptr [rax+14h], 0"], [45, "mov rax, [rbp+var_118]"], [46, "mov dword ptr [rax+18h], 1"], [47, "jmp short loc_414926"], [48, "mov rax, [rbp+var_118]"], [49, "movzx eax, byte ptr [rax+1Ch]"], [50, "movzx edx, al"], [51, "mov rax, [rbp+var_118]"], [52, "movzx eax, byte ptr [rax+1Dh]"], [53, "movzx eax, al"], [54, "mov esi, eax"], [55, "mov edi, 0"], [56, "call sub_402550"], [57, "mov rdx, [rbp+var_118]"], [58, "mov [rdx+18h], eax"], [59, "mov rax, [rbp+var_118]"], [60, "mov eax, [rax+18h]"], [61, "test eax, eax"], [62, "jnz short loc_4148F4"], [63, "mov eax, [rbp+var_120]"], [64, "cdqe"], [65, "mov [rbp+var_98], rax"], [66, "cmp [rbp+var_120], 0FFFFFFFFh"], [67, "jnz short loc_414957"], [68, "mov [rbp+var_C0], 1"], [69, "lea rdx, [rbp+var_110]"], [70, "mov eax, [rbp+var_11C]"], [71, "mov rcx, rdx"], [72, "mov edx, 0"], [73, "mov esi, eax"], [74, "mov edi, 0Dh"], [75, "mov eax, 0"], [76, "call _ptrace"], [77, "mov [rbp+var_8], eax"], [78, "mov [rbp+var_24], 0"], [79, "mov eax, [rbp+var_8]"], [80, "mov [rbp+var_28], eax"], [81, "mov eax, [rbp+var_24]"], [82, "cmp eax, [rbp+var_28]"], [83, "jz loc_414A45"], [84, "mov eax, [rbp+var_24]"], [85, "cdqe"], [86, "mov [rbp+var_30], rax"], [87, "mov eax, [rbp+var_28]"], [88, "cdqe"], [89, "mov [rbp+var_38], rax"], [90, "mov rax, [rbp+var_118]"], [91, "mov rdx, [rax]"], [92, "mov rax, cs:stderr"], [93, "push [rbp+var_38]"], [94, "push offset aRet"], [95, "push offset asc_4251F6"], [96, "push [rbp+var_30]"], [97, "mov r9d, offset a0"], [98, "mov r8, rdx"], [99, "mov ecx, 67Dh"], [100, "mov edx, offset aSeccompBpfC"], [101, "mov esi, offset aSDSExpectedSLl"], [102, "mov rdi, rax"], [103, "mov eax, 0"], [104, "call _fprintf"], [105, "add rsp, 20h"], [106, "mov rax, [rbp+var_118]"], [107, "mov dword ptr [rax+14h], 0"], [108, "mov rax, [rbp+var_118]"], [109, "mov dword ptr [rax+18h], 1"], [110, "jmp short loc_414A45"], [111, "mov rax, [rbp+var_118]"], [112, "movzx eax, byte ptr [rax+1Ch]"], [113, "movzx edx, al"], [114, "mov rax, [rbp+var_118]"], [115, "movzx eax, byte ptr [rax+1Dh]"], [116, "movzx eax, al"], [117, "mov esi, eax"], [118, "mov edi, 0"], [119, "call sub_402550"], [120, "mov rdx, [rbp+var_118]"], [121, "mov [rdx+18h], eax"], [122, "mov rax, [rbp+var_118]"], [123, "mov eax, [rax+18h]"], [124, "test eax, eax"], [125, "jnz short loc_414A13"], [126, "nop"], [127, "nop"], [128, "leave"], [129, "retn"]], "data_dep": [[7, 4], [8, 6], [10, 7], [14, 13], [16, 14], [17, 16], [18, 15], [19, 18], [19, 17], [20, 19], [21, 15], [23, 21], [24, 17], [26, 24], [27, 3], [28, 27], [30, 26], [33, 23], [35, 28], [39, 29], [42, 2], [43, 3], [44, 43], [45, 3], [46, 45], [48, 3], [49, 46], [49, 48], [49, 44], [49, 58], [50, 49], [51, 3], [52, 58], [52, 51], [52, 44], [52, 46], [53, 52], [54, 53], [57, 3], [58, 56], [58, 57], [59, 3], [60, 46], [60, 59], [60, 58], [60, 44], [61, 60], [62, 61], [63, 5], [65, 63], [66, 5], [67, 66], [69, 37], [69, 9], [69, 57], [70, 4], [71, 69], [73, 70], [77, 76], [79, 77], [80, 79], [81, 78], [82, 81], [82, 80], [83, 82], [84, 78], [86, 84], [87, 80], [89, 87], [90, 3], [91, 107], [91, 109], [91, 58], [91, 90], [91, 44], [91, 46], [93, 89], [96, 86], [98, 91], [102, 92], [105, 42], [105, 2], [106, 3], [107, 106], [108, 3], [109, 108], [111, 3], [112, 121], [112, 107], [112, 109], [112, 111], [112, 58], [112, 44], [112, 46], [113, 112], [114, 3], [115, 121], [115, 114], [115, 107], [115, 109], [115, 58], [115, 44], [115, 46], [116, 115], [117, 116], [120, 3], [121, 119], [121, 120], [122, 3], [123, 121], [123, 109], [123, 122], [123, 58], [123, 44], [123, 46], [123, 107], [124, 123], [125, 124], [129, 124]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/e63f7e3980e67fa4c9a80dce84cdebcc38daa428f07143d8a5c120affbfc68c0_e63f7e3980e67fa4c9a80dce84cdebcc38daa428f07143d8a5c120affbfc68c0.jsonl.gz", "strip_func_name": "sub_41481A", "query": "\n\n\n__int64 __fastcall sub_41481A(const char **a1, unsigned int a2, int a3)\n{\n__int64 result; // rax\nchar v5[80]; // [rsp+10h] [rbp-110h] BYREF\n__int64 v6; // [rsp+60h] [rbp-C0h]\n__int64 v7; // [rsp+88h] [rbp-98h]\n__int64 v8; // [rsp+E8h] [rbp-38h]\n__int64 v9; // [rsp+F0h] [rbp-30h]\nint v10; // [rsp+F8h] [rbp-28h]\nint v11; // [rsp+FCh] [rbp-24h]\n__int64 v12; // [rsp+100h] [rbp-20h]\n__int64 v13; // [rsp+108h] [rbp-18h]\nint v14; // [rsp+114h] [rbp-Ch]\nint v15; // [rsp+118h] [rbp-8h]\nint v16; // [rsp+11Ch] [rbp-4h]\n\nv15 = ptrace(PTRACE_GETREGS, a2, 0LL, v5);\nv16 = 0;\nv14 = v15;\nif ( v15 )\n{\nv13 = v16;\nv12 = v14;\nfprintf(\nstderr,\n\"%s:%d:%s:Expected %s (%llu) %s %s (%llu)\\n\",\n\"seccomp_bpf.c\",\n1604LL,\n*a1,\n\"0\",\nv16,\n\"==\",\n\"ret\",\nv14);\n*((_DWORD *)a1 + 5) = 0;\n*((_DWORD *)a1 + 6) = 1;\n}\nwhile ( *((_DWORD *)a1 + 6) )\n*((_DWORD *)a1 + 6) = sub_402550(0, *((_BYTE *)a1 + 29), *((_BYTE *)a1 + 28));\nv7 = a3;\nif ( a3 == -1 )\nv6 = 1LL;\nv15 = ptrace(PTRACE_SETREGS, a2, 0LL, v5);\nv11 = 0;\nv10 = v15;\nif ( v15 )\n{\nv9 = v11;\nv8 = v10;\nfprintf(\nstderr,\n\"%s:%d:%s:Expected %s (%llu) %s %s (%llu)\\n\",\n\"seccomp_bpf.c\",\n1661LL,\n*a1,\n\"0\",\nv11,\n\"==\",\n\"ret\",\nv10);\n*((_DWORD *)a1 + 5) = 0;\n*((_DWORD *)a1 + 6) = 1;\n}\nwhile ( 1 )\n{\nresult = *((unsigned int *)a1 + 6);\nif ( !(_DWORD)result )\nbreak;\n*((_DWORD *)a1 + 6) = sub_402550(0, *((_BYTE *)a1 + 29), *((_BYTE *)a1 + 28));\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v5,v8,v9,v10,v11,v12,v13,v14,v16,sub_41481A,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'syscall', 'a1': '_metadata', 'a2': 'tracee', 'v5': 'regs', 'v8': '__seen_print_0', 'v9': '__exp_print_0', 'v10': '__seen_0', 'v11': '__exp_0', 'v12': '__seen_print', 'v13': '__exp_print', 'v14': '__seen', 'v16': '__exp', 'sub_41481A': 'change_syscall'}"}
tls_get_errors
eee7ae2b1fa6343f62d0787a4b4e729e68108fcf48944de5e880c8604be20f95
sonic-net
sonic-buildimage
NA
int tls_get_errors(void *tls_ctx) { return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_438721", "function_addr": 4425505, "binary_name": "eee7ae2b1fa6343f62d0787a4b4e729e68108fcf48944de5e880c8604be20f95.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov eax, 0"], [4, "pop rbp"], [5, "retn"]], "data_dep": [[4, 0], [5, 3]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/eee7ae2b1fa6343f62d0787a4b4e729e68108fcf48944de5e880c8604be20f95_eee7ae2b1fa6343f62d0787a4b4e729e68108fcf48944de5e880c8604be20f95.jsonl.gz", "strip_func_name": "sub_438721", "query": "\n\n\n__int64 sub_438721()\n{\nreturn 0LL;\n}\n\n\n\nQ:[sub_438721,]\nAssistant: ", "hints": "[]", "response": "{'sub_438721': 'tls_get_errors'}"}
odeadthrone
bfdbe49e313f1ee671554ed134dbd058fdf00185f203f6a51dfe56b76f6d7e2a
atsb
RL_M
NA
void odeadthrone (void) { lprcat ("\nDo you (s) sit down"); iopts (); for (;;) { for (;;) { switch (ttgetch ()) { case 's': lprcat (" sit down"); act_sit_throne (1); return; case 'i': case '\33': ignore (); return; }; } } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_419980", "function_addr": 4299136, "binary_name": "bfdbe49e313f1ee671554ed134dbd058fdf00185f203f6a51dfe56b76f6d7e2a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov edi, offset aDoYouSSitDown"], [3, "call sub_408210"], [4, "call sub_4116B3"], [5, "call sub_407942"], [6, "movsx eax, al"], [7, "cmp eax, 73h "], [8, "jz short loc_4199B1"], [9, "cmp eax, 73h "], [10, "jg short loc_419993"], [11, "cmp eax, 1Bh"], [12, "jz short loc_4199C7"], [13, "cmp eax, 69h "], [14, "jz short loc_4199C7"], [15, "jmp short loc_419993"], [16, "mov edi, offset aSitDown"], [17, "call sub_408210"], [18, "mov edi, 1"], [19, "call sub_415156"], [20, "jmp short loc_4199CC"], [21, "call sub_4116C4"], [22, "pop rbp"], [23, "retn"]], "data_dep": [[6, 5], [7, 6], [8, 7], [9, 6], [10, 9], [11, 6], [12, 11], [13, 6], [14, 13], [22, 0], [23, 19], [23, 21]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/bfdbe49e313f1ee671554ed134dbd058fdf00185f203f6a51dfe56b76f6d7e2a_bfdbe49e313f1ee671554ed134dbd058fdf00185f203f6a51dfe56b76f6d7e2a.jsonl.gz", "strip_func_name": "sub_419980", "query": "\n\n\nint sub_419980()\n{\nint v0; // eax\n\nsub_408210(\"\\nDo you (s) sit down\");\nsub_4116B3();\ndo\n{\nv0 = (char)sub_407942();\nif ( (char)v0 == 115 )\n{\nsub_408210(\" sit down\");\nreturn sub_415156(1);\n}\n}\nwhile ( v0 > 115 || v0 != 27 && v0 != 105 );\nreturn sub_4116C4();\n}\n\n\n\nQ:[sub_419980,sub_408210,sub_4116B3,sub_407942,sub_415156,sub_4116C4,]\nAssistant: ", "hints": "[]", "response": "{'sub_419980': 'odeadthrone', 'sub_408210': 'lprcat', 'sub_4116B3': 'iopts', 'sub_407942': 'ttgetch', 'sub_415156': 'act_sit_throne', 'sub_4116C4': 'ignore'}"}
l2cap_send_prepared
0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb
bluekitchen
btstack
NA
uint8_t l2cap_send_prepared(uint16_t local_cid, uint16_t len){ if (!hci_is_packet_buffer_reserved()){ log_error("l2cap_send_prepared called without reserving packet first"); return BTSTACK_ACL_BUFFERS_FULL; } l2cap_channel_t * channel = l2cap_get_channel_for_local_cid(local_cid); if (!channel) { log_error("l2cap_send_prepared no channel for cid 0x%02x", local_cid); return L2CAP_LOCAL_CID_DOES_NOT_EXIST; } if (!hci_can_send_prepared_acl_packet_now(channel->con_handle)){ log_info("l2cap_send_prepared cid 0x%02x, cannot send", local_cid); return BTSTACK_ACL_BUFFERS_FULL; } log_debug("l2cap_send_prepared cid 0x%02x, handle %u, 1 credit used", local_cid, channel->con_handle); int fcs_size = 0; #ifdef ENABLE_L2CAP_ENHANCED_RETRANSMISSION_MODE if (channel->mode == L2CAP_CHANNEL_MODE_ENHANCED_RETRANSMISSION && channel->fcs_option){ fcs_size = 2; } #endif // set non-flushable packet boundary flag if supported on Controller uint8_t *acl_buffer = hci_get_outgoing_packet_buffer(); uint8_t packet_boundary_flag = l2cap_classic_packet_boundary_flag(); l2cap_setup_header(acl_buffer, channel->con_handle, packet_boundary_flag, channel->remote_cid, len + fcs_size); #ifdef ENABLE_L2CAP_ENHANCED_RETRANSMISSION_MODE if (fcs_size){ // calculate FCS over l2cap data uint16_t fcs = crc16_calc(acl_buffer + 4, 4 + len); log_info("I-Frame: fcs 0x%04x", fcs); little_endian_store_16(acl_buffer, 8 + len, fcs); } #endif // send return hci_send_acl_packet_buffer(len+8+fcs_size); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41F392", "function_addr": 4322194, "binary_name": "0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov edx, edi"], [4, "mov eax, esi"], [5, "mov [rbp+var_24], dx"], [6, "mov [rbp+var_28], ax"], [7, "call sub_40DBA4"], [8, "xor eax, 1"], [9, "test al, al"], [10, "jz short loc_41F3DA"], [11, "mov ecx, 5CBh"], [12, "mov edx, offset aL2capC"], [13, "mov esi, offset aSUL2capSendPre_1"], [14, "mov edi, 2"], [15, "mov eax, 0"], [16, "call sub_41B7FB"], [17, "mov eax, 57h "], [18, "jmp locret_41F555"], [19, "movzx eax, [rbp+var_24]"], [20, "mov edi, eax"], [21, "call sub_41EB2F"], [22, "mov [rbp+var_10], rax"], [23, "cmp [rbp+var_10], 0"], [24, "jnz short loc_41F41F"], [25, "movzx eax, [rbp+var_24]"], [26, "mov r8d, eax"], [27, "mov ecx, 5D1h"], [28, "mov edx, offset aL2capC"], [29, "mov esi, offset aSUL2capSendPre_2"], [30, "mov edi, 2"], [31, "mov eax, 0"], [32, "call sub_41B7FB"], [33, "mov eax, 6Eh "], [34, "jmp locret_41F555"], [35, "mov rax, [rbp+var_10]"], [36, "movzx eax, word ptr [rax+46h]"], [37, "movzx eax, ax"], [38, "mov edi, eax"], [39, "call sub_40DA96"], [40, "xor eax, 1"], [41, "test al, al"], [42, "jz short loc_41F467"], [43, "movzx eax, [rbp+var_24]"], [44, "mov r8d, eax"], [45, "mov ecx, 5D6h"], [46, "mov edx, offset aL2capC"], [47, "mov esi, offset aSUL2capSendPre_3"], [48, "mov edi, 1"], [49, "mov eax, 0"], [50, "call sub_41B7FB"], [51, "mov eax, 57h "], [52, "jmp locret_41F555"], [53, "mov [rbp+var_4], 0"], [54, "mov rax, [rbp+var_10]"], [55, "mov eax, [rax+90h]"], [56, "cmp eax, 3"], [57, "jnz short loc_41F493"], [58, "mov rax, [rbp+var_10]"], [59, "movzx eax, byte ptr [rax+0E4h]"], [60, "test al, al"], [61, "jz short loc_41F493"], [62, "mov [rbp+var_4], 2"], [63, "call sub_40E8A6"], [64, "mov [rbp+var_18], rax"], [65, "call sub_41EF7E"], [66, "mov [rbp+var_19], al"], [67, "mov eax, [rbp+var_4]"], [68, "mov edx, eax"], [69, "movzx eax, [rbp+var_28]"], [70, "add eax, edx"], [71, "movzx edi, ax"], [72, "mov rax, [rbp+var_10]"], [73, "movzx eax, word ptr [rax+56h]"], [74, "movzx ecx, ax"], [75, "movzx edx, [rbp+var_19]"], [76, "mov rax, [rbp+var_10]"], [77, "movzx eax, word ptr [rax+46h]"], [78, "movzx esi, ax"], [79, "mov rax, [rbp+var_18]"], [80, "mov r8d, edi"], [81, "mov rdi, rax"], [82, "call sub_41E2D3"], [83, "cmp [rbp+var_4], 0"], [84, "jz short loc_41F542"], [85, "movzx eax, [rbp+var_28]"], [86, "add eax, 4"], [87, "movzx eax, ax"], [88, "mov rdx, [rbp+var_18]"], [89, "add rdx, 4"], [90, "mov esi, eax"], [91, "mov rdi, rdx"], [92, "call sub_41C2DD"], [93, "mov [rbp+var_1C], ax"], [94, "movzx eax, [rbp+var_1C]"], [95, "mov r8d, eax"], [96, "mov ecx, 5EDh"], [97, "mov edx, offset aL2capC"], [98, "mov esi, offset aSUIFrameFcs0x0"], [99, "mov edi, 1"], [100, "mov eax, 0"], [101, "call sub_41B7FB"], [102, "movzx edx, [rbp+var_1C]"], [103, "movzx eax, [rbp+var_28]"], [104, "add eax, 8"], [105, "movzx ecx, ax"], [106, "mov rax, [rbp+var_18]"], [107, "mov esi, ecx"], [108, "mov rdi, rax"], [109, "call sub_40B0DF"], [110, "movzx eax, [rbp+var_28]"], [111, "lea edx, [rax+8]"], [112, "mov eax, [rbp+var_4]"], [113, "add eax, edx"], [114, "mov edi, eax"], [115, "call sub_40DE96"], [116, "leave"], [117, "retn"]], "data_dep": [[5, 3], [6, 4], [8, 7], [9, 8], [10, 9], [19, 5], [20, 19], [22, 21], [23, 22], [24, 23], [25, 5], [26, 25], [35, 22], [36, 35], [37, 36], [38, 37], [40, 39], [41, 40], [42, 41], [43, 5], [44, 43], [54, 22], [55, 54], [56, 55], [57, 56], [58, 22], [59, 58], [60, 59], [61, 60], [64, 63], [66, 65], [67, 53], [67, 62], [68, 67], [69, 6], [70, 68], [70, 69], [71, 70], [72, 22], [73, 72], [74, 73], [75, 66], [76, 22], [77, 76], [78, 77], [79, 64], [80, 71], [81, 79], [83, 62], [83, 53], [84, 83], [85, 6], [86, 85], [87, 86], [88, 64], [89, 88], [90, 87], [91, 89], [93, 92], [94, 93], [95, 94], [102, 93], [103, 6], [104, 103], [105, 104], [106, 64], [107, 105], [108, 106], [110, 6], [111, 110], [111, 75], [111, 102], [112, 53], [112, 62], [113, 112], [113, 111], [114, 113], [117, 17], [117, 33], [117, 51], [117, 115]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n 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_41F392", "query": "\n\n\n__int64 __fastcall sub_41F392(unsigned __int16 a1, __int64 a2)\n{\n__int64 v2; // r8\n__int64 v3; // r9\n__int64 result; // rax\n__int64 v5; // r9\n__int64 v6; // r9\n__int64 v7; // r9\nunsigned __int16 v8; // [rsp+14h] [rbp-1Ch]\nunsigned __int8 v9; // [rsp+17h] [rbp-19h]\n__int64 v10; // [rsp+18h] [rbp-18h]\n__int64 v11; // [rsp+20h] [rbp-10h]\nint v12; // [rsp+2Ch] [rbp-4h]\n\nif ( (unsigned __int8)sub_40DBA4() != 1 )\n{\nsub_41B7FB(\n2u,\n(__int64)\"%s.%u: l2cap_send_prepared called without reserving packet first\",\n(__int64)\"l2cap.c\",\n1483LL,\nv2,\nv3);\nresult = 87LL;\n}\nelse\n{\nv11 = sub_41EB2F(a1);\nif ( v11 )\n{\nif ( !sub_40DA96(*(_WORD *)(v11 + 70), a2) )\n{\nsub_41B7FB(\n1u,\n(__int64)\"%s.%u: l2cap_send_prepared cid 0x%02x, cannot send\",\n(__int64)\"l2cap.c\",\n1494LL,\na1,\nv6);\nresult = 87LL;\n}\nelse\n{\nv12 = 0;\nif ( *(_DWORD *)(v11 + 144) == 3 && *(_BYTE *)(v11 + 228) )\nv12 = 2;\nv10 = sub_40E8A6();\nv9 = sub_41EF7E();\nsub_41E2D3(v10, *(_WORD *)(v11 + 70), v9, *(_WORD *)(v11 + 86), v12 + a2);\nif ( v12 )\n{\nv8 = sub_41C2DD((_BYTE *)(v10 + 4), (unsigned __int16)a2 + 4);\nsub_41B7FB(1u, (__int64)\"%s.%u: I-Frame: fcs 0x%04x\", (__int64)\"l2cap.c\", 1517LL, v8, v7);\nsub_40B0DF(v10, a2 + 8, v8);\n}\nresult = sub_40DE96((unsigned __int16)a2 + 8 + v12);\n}\n}\nelse\n{\nsub_41B7FB(\n2u,\n(__int64)\"%s.%u: l2cap_send_prepared no channel for cid 0x%02x\",\n(__int64)\"l2cap.c\",\n1489LL,\na1,\nv5);\nresult = 110LL;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v8,v10,v11,v12,sub_41F392,sub_40DBA4,sub_41B7FB,sub_41EB2F,sub_40DA96,sub_40E8A6,sub_41EF7E,sub_41E2D3,sub_41C2DD,sub_40B0DF,sub_40DE96,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'local_cid', 'a2': 'len', 'v8': 'fcs', 'v10': 'acl_buffer', 'v11': 'channel', 'v12': 'fcs_size', 'sub_41F392': 'l2cap_send_prepared', 'sub_40DBA4': 'hci_is_packet_buffer_reserved', 'sub_41B7FB': 'hci_dump_log', 'sub_41EB2F': 'l2cap_get_channel_for_local_cid', 'sub_40DA96': 'hci_can_send_prepared_acl_packet_now', 'sub_40E8A6': 'hci_get_outgoing_packet_buffer', 'sub_41EF7E': 'l2cap_classic_packet_boundary_flag', 'sub_41E2D3': 'l2cap_setup_header', 'sub_41C2DD': 'crc16_calc', 'sub_40B0DF': 'little_endian_store_16', 'sub_40DE96': 'hci_send_acl_packet_buffer'}"}
get_die_id
af1a66c106757923544ce400a850ed34f922d0ffab06875cce598b7061ce7af8
ChrisTheCoolHut
Linux_kernel_exploitation
NA
int get_die_id(int cpu) { return parse_int_file("/sys/devices/system/cpu/cpu%d/topology/die_id", cpu); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40CAC8", "function_addr": 4246216, "binary_name": "af1a66c106757923544ce400a850ed34f922d0ffab06875cce598b7061ce7af8.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_4], edi"], [4, "mov eax, [rbp+var_4]"], [5, "mov esi, eax"], [6, "mov edi, offset aSysDevicesSyst_2"], [7, "mov eax, 0"], [8, "call sub_40C94F"], [9, "leave"], [10, "retn"]], "data_dep": [[4, 3], [5, 4], [10, 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/af1a66c106757923544ce400a850ed34f922d0ffab06875cce598b7061ce7af8_af1a66c106757923544ce400a850ed34f922d0ffab06875cce598b7061ce7af8.jsonl.gz", "strip_func_name": "sub_40CAC8", "query": "\n\n\n__int64 __fastcall sub_40CAC8(unsigned int a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\nreturn sub_40C94F(\"/sys/devices/system/cpu/cpu%d/topology/die_id\", a1, a3, a4, a5, a6);\n}\n\n\n\nQ:[a1,sub_40CAC8,sub_40C94F,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'cpu', 'sub_40CAC8': 'get_die_id', 'sub_40C94F': 'parse_int_file'}"}
ssl_hello_size
5a624d8d514e5e32cdeca29df98b8a01acc2e5dae4f5e11178902b3cb5c9d86c
bi-zone
masscan-ng
NA
size_t ssl_hello_size(const void *templ) { const unsigned char *px = (const unsigned char *)templ; size_t template_size; template_size = (((size_t)px[3]) << 8 | ((size_t)px[4])) + 5; return template_size; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4403F6", "function_addr": 4457462, "binary_name": "5a624d8d514e5e32cdeca29df98b8a01acc2e5dae4f5e11178902b3cb5c9d86c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov rax, [rbp+var_18]"], [4, "mov [rbp+var_8], rax"], [5, "mov rax, [rbp+var_8]"], [6, "add rax, 3"], [7, "movzx eax, byte ptr [rax]"], [8, "movzx eax, al"], [9, "shl rax, 8"], [10, "mov rdx, rax"], [11, "mov rax, [rbp+var_8]"], [12, "add rax, 4"], [13, "movzx eax, byte ptr [rax]"], [14, "movzx eax, al"], [15, "or rax, rdx"], [16, "add rax, 5"], [17, "mov [rbp+var_10], rax"], [18, "mov rax, [rbp+var_10]"], [19, "pop rbp"], [20, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [11, 4], [12, 11], [13, 12], [14, 13], [15, 14], [15, 10], [16, 15], [17, 16], [18, 17], [19, 0], [20, 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/5a624d8d514e5e32cdeca29df98b8a01acc2e5dae4f5e11178902b3cb5c9d86c_5a624d8d514e5e32cdeca29df98b8a01acc2e5dae4f5e11178902b3cb5c9d86c.jsonl.gz", "strip_func_name": "sub_4403F6", "query": "\n\n\nunsigned __int64 __fastcall sub_4403F6(__int64 a1)\n{\nreturn (((unsigned __int64)*(unsigned __int8 *)(a1 + 3) << 8) | *(unsigned __int8 *)(a1 + 4)) + 5;\n}\n\n\n\nQ:[a1,sub_4403F6,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'templ', 'sub_4403F6': 'ssl_hello_size'}"}
rstsReadBlock
c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7
open-simh
simh
NA
static t_stat rstsReadBlock(rstsContext *context, uint16 cluster, uint16 block, void *buf) { t_lba blk = (cluster << context->dcshift) + block; t_seccnt sects_read; if ((sim_disk_rdsect(context->uptr, blk * context->sects, (uint8 *)buf, &sects_read, context->sects) == SCPE_OK) && (sects_read == context->sects)) return SCPE_OK; return SCPE_IOERR; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_483BB0", "function_addr": 4733872, "binary_name": "c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov eax, edx"], [5, "mov [rbp+var_28], rcx"], [6, "mov edx, esi"], [7, "mov [rbp+var_1C], dx"], [8, "mov [rbp+var_20], ax"], [9, "movzx edx, [rbp+var_1C]"], [10, "mov rax, [rbp+var_18]"], [11, "mov eax, [rax+8]"], [12, "mov ecx, eax"], [13, "shl edx, cl"], [14, "movzx eax, [rbp+var_20]"], [15, "add eax, edx"], [16, "mov [rbp+var_4], eax"], [17, "mov rax, [rbp+var_18]"], [18, "mov edi, [rax+18h]"], [19, "mov rax, [rbp+var_18]"], [20, "mov eax, [rax+18h]"], [21, "imul eax, [rbp+var_4]"], [22, "mov esi, eax"], [23, "mov rax, [rbp+var_18]"], [24, "mov rax, [rax]"], [25, "lea rcx, [rbp+var_8]"], [26, "mov rdx, [rbp+var_28]"], [27, "mov r8d, edi"], [28, "mov rdi, rax"], [29, "call sub_481491"], [30, "test eax, eax"], [31, "jnz short loc_483C2B"], [32, "mov rax, [rbp+var_18]"], [33, "mov edx, [rax+18h]"], [34, "mov eax, [rbp+var_8]"], [35, "cmp edx, eax"], [36, "jnz short loc_483C2B"], [37, "mov eax, 0"], [38, "jmp short locret_483C30"], [39, "mov eax, 42h "], [40, "leave"], [41, "retn"]], "data_dep": [[7, 6], [8, 4], [9, 7], [10, 3], [11, 10], [12, 11], [13, 9], [13, 12], [14, 8], [15, 14], [15, 13], [16, 15], [17, 3], [18, 17], [19, 3], [20, 19], [21, 16], [21, 20], [22, 21], [23, 3], [24, 23], [25, 12], [26, 5], [27, 18], [28, 24], [30, 29], [31, 30], [32, 3], [33, 32], [35, 33], [35, 34], [36, 35], [41, 39], [41, 37]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7_c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7.jsonl.gz", "strip_func_name": "sub_483BB0", "query": "\n\n\n__int64 __fastcall sub_483BB0(__int64 a1, unsigned __int16 a2, unsigned __int16 a3, void *a4)\n{\n__int64 result; // rax\nunsigned int v5; // [rsp+28h] [rbp-8h] BYREF\nint v6; // [rsp+2Ch] [rbp-4h]\n\nv6 = (a2 << *(_DWORD *)(a1 + 8)) + a3;\nif ( (unsigned int)sub_481491(*(_QWORD *)a1, v6 * *(_DWORD *)(a1 + 24), a4, &v5, *(_DWORD *)(a1 + 24))\n|| *(_DWORD *)(a1 + 24) != v5 )\n{\nresult = 66LL;\n}\nelse\n{\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,v5,v6,sub_483BB0,sub_481491,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'block', 'a4': 'buf', 'a1': 'context', 'a2': 'cluster', 'v5': 'sects_read', 'v6': 'blk', 'sub_483BB0': 'rstsReadBlock', 'sub_481491': 'sim_disk_rdsect'}"}
eapol_input_msg1
0d2339a86c5360b2903e326cf96aff1bba53a83010193cb8a761753fe9d96bbe
RedoXyde
nabgcc
NA
static void eapol_input_msg1(uint8_t *frame, uint32_t length) { struct eapol_frame *fr_in = (struct eapol_frame *)frame; struct { struct eapol_frame llc_eapol; uint8_t rsn[sizeof(wpa_rsn)]; } fr_out; uint8_t ptk_buffer[80]; DBG_WIFI("Received EAPOL message 1/4"EOL); /* EAPOL_S_MSG3 can happen if the AP did not receive our reply */ if((eapol_state != EAPOL_S_MSG1) && (eapol_state != EAPOL_S_MSG3)) { DBG_WIFI("Inappropriate message"EOL); return; } eapol_state = EAPOL_S_MSG1; /* Save ANonce */ memcpy(anonce, fr_in->key_frame.key_nonce, EAPOL_NONCE_LENGTH); /* Generate SNonce */ randbuffer(snonce, EAPOL_NONCE_LENGTH); /* Derive PTK */ compute_ptk(pmk, anonce, ieee80211_assoc_mac, snonce, rt2501_mac, ptk_buffer, EAPOL_PTK_LENGTH); memcpy(ptk, ptk_buffer, EAPOL_PTK_LENGTH); #ifdef DEBUG_WIFI DBG_WIFI("PTK computed, "); uint16_t i; for(i=0;i<EAPOL_PTK_LENGTH;i++) { sprintf(dbg_buffer, "%02x", ptk[i]); DBG_WIFI(dbg_buffer); } DBG_WIFI(EOL); #endif /* Make response frame */ memcpy(fr_out.llc_eapol.llc, eapol_llc, LLC_LENGTH); fr_out.llc_eapol.protocol_version = EAPOL_VERSION; fr_out.llc_eapol.packet_type = EAPOL_TYPE_KEY; fr_out.llc_eapol.body_length[0] = ((sizeof(struct eapol_key_frame)+ sizeof(wpa_rsn) ) & 0xff00) >> 8; fr_out.llc_eapol.body_length[1] = ((sizeof(struct eapol_key_frame)+ sizeof(wpa_rsn) ) & 0x00ff); fr_out.llc_eapol.key_frame.descriptor_type = EAPOL_DTYPE_WPAKEY; fr_out.llc_eapol.key_frame.key_info.reserved = 0; fr_out.llc_eapol.key_frame.key_info.key_desc_ver = 1; fr_out.llc_eapol.key_frame.key_info.key_type = 1; fr_out.llc_eapol.key_frame.key_info.key_index = 0; fr_out.llc_eapol.key_frame.key_info.install = 0; fr_out.llc_eapol.key_frame.key_info.key_ack = 0; fr_out.llc_eapol.key_frame.key_info.key_mic = 1; fr_out.llc_eapol.key_frame.key_info.secure = 0; fr_out.llc_eapol.key_frame.key_info.error = 0; fr_out.llc_eapol.key_frame.key_info.request = 0; fr_out.llc_eapol.key_frame.key_info.ekd = 0; fr_out.llc_eapol.key_frame.key_length[0] = 0; fr_out.llc_eapol.key_frame.key_length[1] = 0; memcpy(fr_out.llc_eapol.key_frame.replay_counter, replay_counter, EAPOL_RPC_LENGTH); memcpy(fr_out.llc_eapol.key_frame.key_nonce, snonce, EAPOL_NONCE_LENGTH); memset(fr_out.llc_eapol.key_frame.key_iv, 0, EAPOL_KEYIV_LENGTH); memset(fr_out.llc_eapol.key_frame.key_rsc, 0, EAPOL_KEYRSC_LENGTH); memcpy(fr_out.llc_eapol.key_frame.key_id, fr_in->key_frame.key_id, EAPOL_KEYID_LENGTH); fr_out.llc_eapol.key_frame.key_data_length[0] = (sizeof(wpa_rsn)&0xff00) >> 8; fr_out.llc_eapol.key_frame.key_data_length[1] = (sizeof(wpa_rsn)&0x00ff); memcpy(fr_out.llc_eapol.key_frame.key_data, wpa_rsn, sizeof(wpa_rsn)); /* Compute MIC */ memset(fr_out.llc_eapol.key_frame.key_mic, 0, EAPOL_KEYMIC_LENGTH); hmac_md5(ptk, EAPOL_MICK_LENGTH, (uint8_t *)&fr_out+LLC_LENGTH, sizeof(struct eapol_frame)+ sizeof(wpa_rsn)-LLC_LENGTH, fr_out.llc_eapol.key_frame.key_mic); DBG_WIFI("Response computed"EOL); /* Send the response */ rt2501_send((uint8_t *)&fr_out, sizeof(fr_out), ieee80211_assoc_mac, 1, 1); DBG_WIFI("Response sent"EOL); /* Install pairwise encryption and MIC keys */ rt2501_set_key(0, &ptk[32], &ptk[32+16+8], &ptk[32+16], RT2501_CIPHER_TKIP); memset(ptk_tsc, 0, EAPOL_TSC_LENGTH); eapol_state = EAPOL_S_MSG3; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40AA30", "function_addr": 4237872, "binary_name": "0d2339a86c5360b2903e326cf96aff1bba53a83010193cb8a761753fe9d96bbe.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 100h"], [3, "mov [rbp+var_F8], rdi"], [4, "mov [rbp+var_FC], esi"], [5, "mov rax, [rbp+var_F8]"], [6, "mov [rbp+var_10], rax"], [7, "mov edi, offset aReceivedEapolM"], [8, "call sub_411471"], [9, "mov eax, cs:dword_4EB654"], [10, "test eax, eax"], [11, "jz short loc_40AA81"], [12, "mov eax, cs:dword_4EB654"], [13, "cmp eax, 1"], [14, "jz short loc_40AA81"], [15, "mov edi, offset aInappropriateM"], [16, "call sub_411471"], [17, "jmp locret_40ADDA"], [18, "mov cs:dword_4EB654, 0"], [19, "mov rax, [rbp+var_10]"], [20, "lea rcx, [rax+19h]"], [21, "mov rax, [rcx]"], [22, "mov rdx, [rcx+8]"], [23, "mov cs:qword_4EB6A0, rax"], [24, "mov cs:qword_4EB6A8, rdx"], [25, "mov rax, [rcx+10h]"], [26, "mov rdx, [rcx+18h]"], [27, "mov cs:qword_4EB6B0, rax"], [28, "mov cs:qword_4EB6B8, rdx"], [29, "mov esi, 20h "], [30, "mov edi, offset qword_4EB6C0"], [31, "call sub_40A26B"], [32, "lea rax, [rbp+src]"], [33, "sub rsp, 8"], [34, "push 40h "], [35, "mov r9, rax"], [36, "mov r8d, offset dword_4EB894"], [37, "mov ecx, offset qword_4EB6C0"], [38, "mov edx, offset dword_4EB788"], [39, "mov esi, offset qword_4EB6A0"], [40, "mov edi, offset qword_4EB660"], [41, "call sub_40A72B"], [42, "add rsp, 10h"], [43, "lea rax, [rbp+src]"], [44, "mov edx, 40h "], [45, "mov rsi, rax"], [46, "mov edi, offset byte_4EB6E0"], [47, "call _memcpy"], [48, "mov edi, offset aPtkComputed"], [49, "call sub_411471"], [50, "mov [rbp+var_2], 0"], [51, "jmp short loc_40AB66"], [52, "movzx eax, [rbp+var_2]"], [53, "cdqe"], [54, "movzx eax, ds:byte_4EB6E0[rax]"], [55, "movzx eax, al"], [56, "mov edx, eax"], [57, "mov esi, offset a02x_0"], [58, "mov edi, offset s"], [59, "mov eax, 0"], [60, "call _sprintf"], [61, "mov edi, offset s"], [62, "call sub_411471"], [63, "movzx eax, [rbp+var_2]"], [64, "add eax, 1"], [65, "mov [rbp+var_2], ax"], [66, "cmp [rbp+var_2], 3Fh "], [67, "jbe short loc_40AB2B"], [68, "mov edi, offset asc_4131FB"], [69, "call sub_411471"], [70, "mov rax, cs:qword_413428"], [71, "mov [rbp+var_A0], rax"], [72, "mov [rbp+var_98], 1"], [73, "mov [rbp+var_97], 3"], [74, "mov [rbp+var_96], 0"], [75, "mov [rbp+var_95], 77h "], [76, "mov [rbp+var_94], 0FEh"], [77, "movzx eax, [rbp+var_93]"], [78, "and eax, 1Fh"], [79, "mov [rbp+var_93], al"], [80, "movzx eax, [rbp+var_92]"], [81, "and eax, 0FFFFFFF8h"], [82, "or eax, 1"], [83, "mov [rbp+var_92], al"], [84, "movzx eax, [rbp+var_92]"], [85, "or eax, 8"], [86, "mov [rbp+var_92], al"], [87, "movzx eax, [rbp+var_92]"], [88, "and eax, 0FFFFFFCFh"], [89, "mov [rbp+var_92], al"], [90, "movzx eax, [rbp+var_92]"], [91, "and eax, 0FFFFFFBFh"], [92, "mov [rbp+var_92], al"], [93, "movzx eax, [rbp+var_92]"], [94, "and eax, 7Fh"], [95, "mov [rbp+var_92], al"], [96, "movzx eax, [rbp+var_93]"], [97, "or eax, 1"], [98, "mov [rbp+var_93], al"], [99, "movzx eax, [rbp+var_93]"], [100, "and eax, 0FFFFFFFDh"], [101, "mov [rbp+var_93], al"], [102, "movzx eax, [rbp+var_93]"], [103, "and eax, 0FFFFFFFBh"], [104, "mov [rbp+var_93], al"], [105, "movzx eax, [rbp+var_93]"], [106, "and eax, 0FFFFFFF7h"], [107, "mov [rbp+var_93], al"], [108, "movzx eax, [rbp+var_93]"], [109, "and eax, 0FFFFFFEFh"], [110, "mov [rbp+var_93], al"], [111, "mov [rbp+var_91], 0"], [112, "mov [rbp+var_90], 0"], [113, "mov rax, cs:qword_4EB688"], [114, "mov [rbp+var_8F], rax"], [115, "mov rax, cs:qword_4EB6C0"], [116, "mov rdx, cs:qword_4EB6C8"], [117, "mov [rbp+var_87], rax"], [118, "mov [rbp+var_7F], rdx"], [119, "mov rax, cs:qword_4EB6D0"], [120, "mov rdx, cs:qword_4EB6D8"], [121, "mov [rbp+var_77], rax"], [122, "mov [rbp+var_6F], rdx"], [123, "lea rax, [rbp+var_A0]"], [124, "add rax, 39h "], [125, "mov edx, 10h"], [126, "mov esi, 0"], [127, "mov rdi, rax"], [128, "call _memset"], [129, "lea rax, [rbp+var_A0]"], [130, "add rax, 49h "], [131, "mov edx, 8"], [132, "mov esi, 0"], [133, "mov rdi, rax"], [134, "call _memset"], [135, "mov rax, [rbp+var_10]"], [136, "add rax, 51h "], [137, "mov rax, [rax]"], [138, "mov [rbp+var_4F], rax"], [139, "mov [rbp+var_37], 0"], [140, "mov [rbp+var_36], 18h"], [141, "mov rax, cs:qword_413430"], [142, "mov rdx, cs:qword_413438"], [143, "mov [rbp+var_35], rax"], [144, "mov [rbp+var_2D], rdx"], [145, "mov rax, cs:qword_413440"], [146, "mov [rbp+var_25], rax"], [147, "lea rax, [rbp+var_A0]"], [148, "add rax, 59h "], [149, "mov edx, 10h"], [150, "mov esi, 0"], [151, "mov rdi, rax"], [152, "call _memset"], [153, "lea rax, [rbp+var_A0]"], [154, "add rax, 8"], [155, "lea rdx, [rbp+var_A0]"], [156, "add rdx, 59h "], [157, "mov r8, rdx"], [158, "mov ecx, 7Bh "], [159, "mov rdx, rax"], [160, "mov esi, 10h"], [161, "mov edi, offset byte_4EB6E0"], [162, "call sub_410658"], [163, "mov edi, offset aResponseComput"], [164, "call sub_411471"], [165, "lea rax, [rbp+var_A0]"], [166, "mov r8d, 1"], [167, "mov ecx, 1"], [168, "mov edx, offset dword_4EB788"], [169, "mov esi, 83h"], [170, "mov rdi, rax"], [171, "call sub_40F2EB"], [172, "mov edi, offset aResponseSent"], [173, "call sub_411471"], [174, "mov r8d, 3"], [175, "mov ecx, offset unk_4EB710"], [176, "mov edx, offset unk_4EB718"], [177, "mov esi, offset unk_4EB700"], [178, "mov edi, 0"], [179, "call sub_411312"], [180, "mov edx, 6"], [181, "mov esi, 0"], [182, "mov edi, offset byte_4EB760"], [183, "call _memset"], [184, "mov cs:dword_4EB654, 1"], [185, "leave"], [186, "retn"]], "data_dep": [[5, 3], [6, 5], [10, 9], [11, 10], [13, 12], [14, 13], [19, 6], [20, 19], [21, 20], [22, 20], [23, 21], [24, 22], [25, 20], [26, 20], [27, 25], [28, 26], [32, 31], [33, 2], [35, 32], [42, 33], [43, 41], [45, 43], [52, 50], [52, 65], [55, 54], [56, 55], [63, 65], [63, 50], [64, 63], [65, 64], [66, 50], [66, 65], [67, 66], [71, 70], [78, 77], [79, 78], [81, 80], [82, 81], [83, 82], [84, 83], [85, 84], [86, 85], [87, 86], [88, 87], [89, 88], [90, 89], [91, 90], [92, 91], [93, 92], [94, 93], [95, 94], [96, 79], [97, 96], [98, 97], [99, 98], [100, 99], [101, 100], [102, 101], [103, 102], [104, 103], [105, 104], [106, 105], [107, 106], [108, 107], [109, 108], [110, 109], [114, 113], [117, 115], [118, 116], [121, 119], [122, 120], [123, 119], [123, 71], [124, 123], [127, 124], [129, 128], [129, 71], [130, 129], [133, 130], [135, 6], [136, 135], [137, 136], [138, 137], [143, 141], [144, 142], [146, 145], [147, 145], [147, 71], [148, 147], [151, 148], [153, 71], [153, 152], [154, 153], [155, 149], [155, 71], [156, 155], [157, 156], [159, 154], [165, 71], [165, 164], [170, 165], [186, 183], [186, 16]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/0d2339a86c5360b2903e326cf96aff1bba53a83010193cb8a761753fe9d96bbe_0d2339a86c5360b2903e326cf96aff1bba53a83010193cb8a761753fe9d96bbe.jsonl.gz", "strip_func_name": "sub_40AA30", "query": "\n\n\nvoid *__fastcall sub_40AA30(__int64 a1)\n{\nvoid *result; // rax\n__int64 v2; // rdx\n__int64 v3; // rdx\nchar src[80]; // [rsp+10h] [rbp-F0h] BYREF\n__int64 v5; // [rsp+60h] [rbp-A0h] BYREF\nchar v6[5]; // [rsp+68h] [rbp-98h] BYREF\nchar v7; // [rsp+6Dh] [rbp-93h]\nchar v8; // [rsp+6Eh] [rbp-92h]\nchar v9; // [rsp+6Fh] [rbp-91h]\nchar v10; // [rsp+70h] [rbp-90h]\n__int64 v11; // [rsp+71h] [rbp-8Fh]\n__int64 v12; // [rsp+79h] [rbp-87h]\n__int64 v13; // [rsp+81h] [rbp-7Fh]\n__int64 v14; // [rsp+89h] [rbp-77h]\n__int64 v15; // [rsp+91h] [rbp-6Fh]\n_BYTE v16[7]; // [rsp+99h] [rbp-67h] BYREF\n_QWORD v17[2]; // [rsp+A9h] [rbp-57h] BYREF\n_BYTE v18[18]; // [rsp+B9h] [rbp-47h] BYREF\n__int64 v19; // [rsp+CBh] [rbp-35h]\n__int64 v20; // [rsp+D3h] [rbp-2Dh]\n__int64 v21; // [rsp+DBh] [rbp-25h]\n__int64 v22; // [rsp+F0h] [rbp-10h]\nunsigned __int16 i; // [rsp+FEh] [rbp-2h]\n\nv22 = a1;\nsub_411471(\"Received EAPOL message 1/4\\n\\r\");\nif ( dword_4EB654 && dword_4EB654 != 1 )\nreturn (void *)sub_411471(\"Inappropriate message\\n\\r\");\ndword_4EB654 = 0;\nv2 = *(_QWORD *)(v22 + 33);\nqword_4EB6A0 = *(_QWORD *)(v22 + 25);\nqword_4EB6A8 = v2;\nv3 = *(_QWORD *)(v22 + 49);\nqword_4EB6B0 = *(_QWORD *)(v22 + 41);\nqword_4EB6B8 = v3;\nsub_40A26B((__int64)&qword_4EB6C0, 0x20u);\nsub_40A72B((__int64)&qword_4EB660, &qword_4EB6A0, &dword_4EB788, &qword_4EB6C0, &dword_4EB894, (__int64)src, 0x40u);\nmemcpy(byte_4EB6E0, src, 0x40uLL);\nsub_411471(\"PTK computed, \");\nfor ( i = 0; i <= 0x3Fu; ++i )\n{\nsprintf(s, \"%02x\", (unsigned __int8)byte_4EB6E0[i]);\nsub_411471(s);\n}\nsub_411471(\"\\n\\r\");\nv5 = 0x8E8800000003AAAALL;\nv6[0] = 1;\nv6[1] = 3;\nv6[2] = 0;\nv6[3] = 119;\nv6[4] = -2;\nv7 &= 0x1Fu;\nv8 = v8 & 0xF8 | 1;\nv8 |= 8u;\nv8 &= 0xCFu;\nv8 &= 0xBFu;\nv8 &= 0x7Fu;\nv7 |= 1u;\nv7 &= 0xFDu;\nv7 &= 0xFBu;\nv7 &= 0xF7u;\nv7 &= 0xEFu;\nv9 = 0;\nv10 = 0;\nv11 = qword_4EB688;\nv12 = qword_4EB6C0;\nv13 = qword_4EB6C8;\nv14 = qword_4EB6D0;\nv15 = qword_4EB6D8;\nmemset(v16, 0, 0x10uLL);\nmemset(v17, 0, 8uLL);\nv17[1] = *(_QWORD *)(v22 + 81);\nv18[16] = 0;\nv18[17] = 24;\nv19 = 0x101F2500016DDLL;\nv20 = 0x5000000102F25000LL;\nv21 = 0x2F25000000102F2LL;\nmemset(v18, 0, 0x10uLL);\nsub_410658(byte_4EB6E0, 16LL, v6, 123LL, v18);\nsub_411471(\"Response computed\\n\\r\");\nsub_40F2EB(&v5, 131LL, &dword_4EB788, 1LL, 1LL);\nsub_411471(\"Response sent\\n\\r\");\nsub_411312(0LL, &unk_4EB700, &unk_4EB718, &unk_4EB710, 3LL);\nresult = memset(&byte_4EB760, 0, 6uLL);\ndword_4EB654 = 1;\nreturn result;\n}\n\n\n\nQ:[a1,src,v5,v22,sub_40AA30,sub_411471,sub_40A26B,sub_40A72B,sub_410658,sub_40F2EB,sub_411312,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'frame', 'src': 'ptk_buffer', 'v5': 'fr_out', 'v22': 'fr_in', 'sub_40AA30': 'eapol_input_msg1', 'sub_411471': 'putst_uart', 'sub_40A26B': 'randbuffer', 'sub_40A72B': 'compute_ptk', 'sub_410658': 'hmac_md5', 'sub_40F2EB': 'rt2501_send', 'sub_411312': 'rt2501_set_key'}"}
TlclGetPermanentFlags
65f00b740de456c7a0d246feb5c658208caffc31a2f3672fa54e4ae13ea2bc68
Telecominfraproject
OpenCellular
NA
uint32_t TlclGetPermanentFlags(TPM_PERMANENT_FLAGS* pflags) { uint8_t response[TPM_LARGE_ENOUGH_COMMAND_SIZE]; uint32_t size; uint32_t result = TlclSendReceive(tpm_getflags_cmd.buffer, response, sizeof(response)); if (result != TPM_SUCCESS) return result; FromTpmUint32(response + kTpmResponseHeaderLength, &size); /* TODO(crbug.com/379255): This fails. Find out why. * VbAssert(size == sizeof(TPM_PERMANENT_FLAGS)); */ memcpy(pflags, response + kTpmResponseHeaderLength + sizeof(size), sizeof(TPM_PERMANENT_FLAGS)); return result; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_417DE8", "function_addr": 4292072, "binary_name": "65f00b740de456c7a0d246feb5c658208caffc31a2f3672fa54e4ae13ea2bc68.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 130h"], [3, "mov [rbp+dest], rdi"], [4, "lea rax, [rbp+var_110]"], [5, "mov edx, 100h"], [6, "mov rsi, rax"], [7, "lea rdi, unk_42C200"], [8, "call sub_416C9B"], [9, "mov [rbp+var_4], eax"], [10, "cmp [rbp+var_4], 0"], [11, "jz short loc_417E23"], [12, "mov eax, [rbp+var_4]"], [13, "jmp short locret_417E65"], [14, "lea rax, [rbp+var_110]"], [15, "add rax, 0Ah"], [16, "lea rdx, [rbp+var_114]"], [17, "mov rsi, rdx"], [18, "mov rdi, rax"], [19, "call sub_416A5E"], [20, "lea rax, [rbp+var_110]"], [21, "add rax, 0Eh"], [22, "mov rcx, [rbp+dest]"], [23, "mov edx, 16h"], [24, "mov rsi, rax"], [25, "mov rdi, rcx"], [26, "call _memcpy"], [27, "mov eax, [rbp+var_4]"], [28, "leave"], [29, "retn"]], "data_dep": [[6, 4], [9, 8], [10, 9], [11, 10], [12, 9], [14, 8], [15, 14], [16, 5], [17, 16], [18, 15], [20, 19], [21, 20], [22, 3], [24, 21], [25, 22], [27, 9], [29, 27], [29, 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/65f00b740de456c7a0d246feb5c658208caffc31a2f3672fa54e4ae13ea2bc68_65f00b740de456c7a0d246feb5c658208caffc31a2f3672fa54e4ae13ea2bc68.jsonl.gz", "strip_func_name": "sub_417DE8", "query": "\n\n\n__int64 __fastcall sub_417DE8(void *a1)\n{\nint v2; // [rsp+1Ch] [rbp-114h] BYREF\nchar v3[10]; // [rsp+20h] [rbp-110h] BYREF\nunsigned int v4; // [rsp+2Ah] [rbp-106h] BYREF\n__int16 v5; // [rsp+2Eh] [rbp-102h] BYREF\nunsigned int v6; // [rsp+12Ch] [rbp-4h]\n\nv6 = sub_416C9B((__int64)&unk_42C200, (__int64)v3, 256);\nif ( !v6 )\n{\nsub_416A5E(&v4, &v2);\nmemcpy(a1, &v5, 0x16uLL);\n}\nreturn v6;\n}\n\n\n\nQ:[a1,v2,v3,v6,sub_417DE8,sub_416C9B,sub_416A5E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'pflags', 'v2': 'size', 'v3': 'response', 'v6': 'result', 'sub_417DE8': 'TlclGetPermanentFlags', 'sub_416C9B': 'TlclSendReceive', 'sub_416A5E': 'FromTpmUint32'}"}
ssalloc_init
9b51383e83203638028d774d501f2eac0aaf8057812c3605fd264b8b9e8d29cd
LPD-EPFL
ASCYLIB
NA
void ssalloc_init() { #if !defined(SSALLOC_USE_MALLOC) int i; for (i = 0; i < SSALLOC_NUM_ALLOCATORS; i++) { ssalloc_app_mem[i] = (uintptr_t) memalign(SSMEM_CACHE_LINE_SIZE, SSALLOC_SIZE); assert((void*) ssalloc_app_mem[i] != NULL); } #endif }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401468", "function_addr": 4199528, "binary_name": "9b51383e83203638028d774d501f2eac0aaf8057812c3605fd264b8b9e8d29cd.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "nop"], [3, "pop rbp"], [4, "retn"]], "data_dep": [[3, 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/9b51383e83203638028d774d501f2eac0aaf8057812c3605fd264b8b9e8d29cd_9b51383e83203638028d774d501f2eac0aaf8057812c3605fd264b8b9e8d29cd.jsonl.gz", "strip_func_name": "sub_401468", "query": "\n\n\nvoid sub_401468()\n{\n;\n}\n\n\n\nQ:[sub_401468,]\nAssistant: ", "hints": "[]", "response": "{'sub_401468': 'ssalloc_init'}"}
load_records
ae02d96af55383694605ea0173fc188ca9dcbd389cdc0f0c9b5eb93b1c5415c4
xiaochuanle
MECAT2
NA
static size_t load_records(void* array, const size_t size, const size_t count, FILE* in, pthread_mutex_t* in_lock) { size_t n = 0; pthread_mutex_lock(in_lock); n = fread(array, size, count, in); pthread_mutex_unlock(in_lock); return n; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_414288", "function_addr": 4276872, "binary_name": "ae02d96af55383694605ea0173fc188ca9dcbd389cdc0f0c9b5eb93b1c5415c4.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+ptr], rdi"], [4, "mov [rbp+size], rsi"], [5, "mov [rbp+n], rdx"], [6, "mov [rbp+stream], rcx"], [7, "mov [rbp+mutex], r8"], [8, "mov [rbp+var_8], 0"], [9, "mov rax, [rbp+mutex]"], [10, "mov rdi, rax"], [11, "call _pthread_mutex_lock"], [12, "mov rcx, [rbp+stream]"], [13, "mov rdx, [rbp+n]"], [14, "mov rsi, [rbp+size]"], [15, "mov rax, [rbp+ptr]"], [16, "mov rdi, rax"], [17, "call _fread"], [18, "mov [rbp+var_8], rax"], [19, "mov rax, [rbp+mutex]"], [20, "mov rdi, rax"], [21, "call _pthread_mutex_unlock"], [22, "mov rax, [rbp+var_8]"], [23, "leave"], [24, "retn"]], "data_dep": [[9, 7], [10, 9], [12, 6], [13, 5], [14, 4], [15, 3], [16, 15], [18, 17], [19, 7], [20, 19], [22, 18], [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/ae02d96af55383694605ea0173fc188ca9dcbd389cdc0f0c9b5eb93b1c5415c4_ae02d96af55383694605ea0173fc188ca9dcbd389cdc0f0c9b5eb93b1c5415c4.jsonl.gz", "strip_func_name": "sub_414288", "query": "\n\n\nsize_t __fastcall sub_414288(void *a1, size_t a2, size_t a3, FILE *a4, pthread_mutex_t *a5)\n{\nsize_t v9; // [rsp+38h] [rbp-8h]\n\npthread_mutex_lock(a5);\nv9 = fread(a1, a2, a3, a4);\npthread_mutex_unlock(a5);\nreturn v9;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v9,sub_414288,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'count', 'a4': 'in', 'a1': 'array', 'a2': 'size', 'a5': 'in_lock', 'v9': 'n', 'sub_414288': 'load_records'}"}
sigbus_handler
66d33fdf86d3f083aa6077d6792061555c4fd7a43c8767ae8841efed5c8ed490
UtsavBalar1231
kernel_xiaomi_sm8250
NA
static void sigbus_handler(int sig, siginfo_t *info, void *ucontex) { (void)sig; (void)ucontex; sigbus_addr = info ? info->si_addr : NULL; siglongjmp(sigbus_jmp, 1); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403EAA", "function_addr": 4210346, "binary_name": "66d33fdf86d3f083aa6077d6792061555c4fd7a43c8767ae8841efed5c8ed490.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_4], edi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "cmp [rbp+var_10], 0"], [7, "jz short loc_403ECE"], [8, "mov rax, [rbp+var_10]"], [9, "mov rax, [rax+10h]"], [10, "jmp short loc_403ED3"], [11, "mov eax, 0"], [12, "mov cs:qword_461988, rax"], [13, "mov esi, 1"], [14, "mov edi, offset env"], [15, "call _siglongjmp"]], "data_dep": [[6, 4], [7, 6], [8, 4], [9, 8], [12, 9], [12, 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/66d33fdf86d3f083aa6077d6792061555c4fd7a43c8767ae8841efed5c8ed490_66d33fdf86d3f083aa6077d6792061555c4fd7a43c8767ae8841efed5c8ed490.jsonl.gz", "strip_func_name": "sub_403EAA", "query": "\n\n\nvoid __fastcall __noreturn sub_403EAA(__int64 a1, __int64 a2)\n{\n__int64 v2; // rax\n\nif ( a2 )\nv2 = *(_QWORD *)(a2 + 16);\nelse\nv2 = 0LL;\nqword_461988 = v2;\nsiglongjmp(env, 1);\n}\n\n\n\nQ:[a2,a1,sub_403EAA,]\nAssistant: ", "hints": "[]", "response": "{'a2': 'info', 'a1': 'sig', 'sub_403EAA': 'sigbus_handler'}"}
italian_ISO_8859_1_close_env
5b6938bad03d81d7259ab119b0f98b7e32e338e7e13a62d83a386dfdf4ee2b55
goodform
RediSearch
NA
extern void italian_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41E0F6", "function_addr": 4317430, "binary_name": "5b6938bad03d81d7259ab119b0f98b7e32e338e7e13a62d83a386dfdf4ee2b55.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov rax, [rbp+var_8]"], [5, "mov esi, 0"], [6, "mov rdi, rax"], [7, "call sub_439FBE"], [8, "nop"], [9, "leave"], [10, "retn"]], "data_dep": [[4, 3], [6, 4], [10, 7]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/5b6938bad03d81d7259ab119b0f98b7e32e338e7e13a62d83a386dfdf4ee2b55_5b6938bad03d81d7259ab119b0f98b7e32e338e7e13a62d83a386dfdf4ee2b55.jsonl.gz", "strip_func_name": "sub_41E0F6", "query": "\n\n\n__int64 __fastcall sub_41E0F6(__int64 a1)\n{\nreturn sub_439FBE(a1, 0LL);\n}\n\n\n\nQ:[a1,sub_41E0F6,sub_439FBE,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'z', 'sub_41E0F6': 'italian_ISO_8859_1_close_env', 'sub_439FBE': 'SN_close_env'}"}
pager_init
26ed2b34fb46086588f2bdc8c38fd25410f82edabc1bab24213dd4c0c0fc7725
XboxDev
xbox-linux
NA
void pager_init(const char *pager_env) { subcmd_config.pager_env = pager_env; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_417128", "function_addr": 4288808, "binary_name": "26ed2b34fb46086588f2bdc8c38fd25410f82edabc1bab24213dd4c0c0fc7725.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov rax, offset off_429600"], [4, "mov rdx, [rbp+var_8]"], [5, "mov [rax+20h], rdx"], [6, "nop"], [7, "pop rbp"], [8, "retn"]], "data_dep": [[4, 2], [5, 4], [5, 3], [7, 0], [8, 3]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/26ed2b34fb46086588f2bdc8c38fd25410f82edabc1bab24213dd4c0c0fc7725_26ed2b34fb46086588f2bdc8c38fd25410f82edabc1bab24213dd4c0c0fc7725.jsonl.gz", "strip_func_name": "sub_417128", "query": "\n\n\nchar **__fastcall sub_417128(char *a1)\n{\nchar **result; // rax\n\nresult = &off_429600;\n*(&off_429600 + 4) = a1;\nreturn result;\n}\n\n\n\nQ:[a1,sub_417128,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'pager_env', 'sub_417128': 'pager_init'}"}
mesh_health_server_add_fault_state
0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb
bluekitchen
btstack
NA
void mesh_health_server_add_fault_state(mesh_model_t *mesh_model, uint16_t company_id, mesh_health_fault_t * fault_state){ mesh_health_state_t * state = (mesh_health_state_t *) mesh_model->model_data; mesh_health_fault_t * fault = mesh_health_server_fault_for_company_id(mesh_model, company_id); btstack_assert(fault == NULL); (void) fault; fault_state->company_id = company_id; btstack_linked_list_add(&state->faults, (btstack_linked_item_t *) fault_state); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_447E7D", "function_addr": 4488829, "binary_name": "0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov eax, esi"], [5, "mov [rbp+var_28], rdx"], [6, "mov [rbp+var_1C], ax"], [7, "mov rax, [rbp+var_18]"], [8, "mov rax, [rax+28h]"], [9, "mov [rbp+var_8], rax"], [10, "movzx edx, [rbp+var_1C]"], [11, "mov rax, [rbp+var_18]"], [12, "mov esi, edx"], [13, "mov rdi, rax"], [14, "call sub_4472B2"], [15, "mov [rbp+var_10], rax"], [16, "cmp [rbp+var_10], 0"], [17, "jz short loc_447ED5"], [18, "mov ecx, offset aMeshHealthServ"], [19, "mov edx, 164h"], [20, "mov esi, offset aSrcMeshMeshHea"], [21, "mov edi, offset aFaultVoid0"], [22, "call ___assert_fail"], [23, "mov rax, [rbp+var_28]"], [24, "movzx edx, [rbp+var_1C]"], [25, "mov [rax+0Ah], dx"], [26, "mov rax, [rbp+var_8]"], [27, "mov rdx, [rbp+var_28]"], [28, "mov rsi, rdx"], [29, "mov rdi, rax"], [30, "call sub_40A1A8"], [31, "nop"], [32, "leave"], [33, "retn"]], "data_dep": [[6, 4], [7, 3], [8, 7], [9, 8], [10, 6], [11, 3], [12, 10], [13, 11], [15, 14], [16, 15], [17, 16], [23, 5], [24, 6], [25, 23], [25, 24], [26, 9], [27, 5], [28, 27], [29, 26], [33, 30]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb_0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb.jsonl.gz", "strip_func_name": "sub_447E7D", "query": "\n\n\n__int64 __fastcall sub_447E7D(__int64 a1, __int16 a2, __int64 a3)\n{\n_QWORD **v5; // [rsp+28h] [rbp-8h]\n\nv5 = *(_QWORD ***)(a1 + 40);\nif ( sub_4472B2(a1, a2) )\n__assert_fail(\n\"fault == ((void *)0)\",\n\"../../src/mesh/mesh_health_server.c\",\n0x164u,\n\"mesh_health_server_add_fault_state\");\n*(_WORD *)(a3 + 10) = a2;\nreturn sub_40A1A8(v5, (_QWORD *)a3);\n}\n\n\n\nQ:[a3,a1,a2,v5,sub_447E7D,sub_4472B2,sub_40A1A8,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'fault_state', 'a1': 'mesh_model', 'a2': 'company_id', 'v5': 'state', 'sub_447E7D': 'mesh_health_server_add_fault_state', 'sub_4472B2': 'mesh_health_server_fault_for_company_id', 'sub_40A1A8': 'btstack_linked_list_add'}"}
libbpf_prog_type_by_name
9f205b620f8387a5fbfe7bf4bf706460702c799bf48defca6e639a44084247c9
multipath-tcp
mptcp
NA
int libbpf_prog_type_by_name(const char *name, enum bpf_prog_type *prog_type, enum bpf_attach_type *expected_attach_type) { char *type_names; int i; if (!name) return -EINVAL; for (i = 0; i < ARRAY_SIZE(section_names); i++) { if (strncmp(name, section_names[i].sec, section_names[i].len)) continue; *prog_type = section_names[i].prog_type; *expected_attach_type = section_names[i].expected_attach_type; return 0; } pr_warning("failed to guess program type based on ELF section name '%s'\n", name); type_names = libbpf_get_type_names(false); if (type_names != NULL) { pr_info("supported section(type) names are:%s\n", type_names); free(type_names); } return -EINVAL; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40FC19", "function_addr": 4258841, "binary_name": "9f205b620f8387a5fbfe7bf4bf706460702c799bf48defca6e639a44084247c9.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+s1], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "cmp [rbp+s1], 0"], [7, "jnz short loc_40FC3E"], [8, "mov eax, 0FFFFFFEAh"], [9, "jmp locret_40FD3C"], [10, "mov [rbp+var_4], 0"], [11, "jmp loc_40FCD0"], [12, "mov eax, [rbp+var_4]"], [13, "cdqe"], [14, "shl rax, 5"], [15, "mov rdx, rax"], [16, "lea rax, unk_447908"], [17, "mov rdx, [rdx+rax]"], [18, "mov eax, [rbp+var_4]"], [19, "cdqe"], [20, "shl rax, 5"], [21, "mov rcx, rax"], [22, "lea rax, off_447900"], [23, "mov rcx, [rcx+rax]"], [24, "mov rax, [rbp+s1]"], [25, "mov rsi, rcx"], [26, "mov rdi, rax"], [27, "call _strncmp"], [28, "test eax, eax"], [29, "jz short loc_40FC91"], [30, "add [rbp+var_4], 1"], [31, "jmp short loc_40FCD0"], [32, "mov eax, [rbp+var_4]"], [33, "cdqe"], [34, "shl rax, 5"], [35, "mov rdx, rax"], [36, "lea rax, unk_447910"], [37, "mov edx, [rdx+rax]"], [38, "mov rax, [rbp+var_20]"], [39, "mov [rax], edx"], [40, "mov eax, [rbp+var_4]"], [41, "cdqe"], [42, "shl rax, 5"], [43, "mov rdx, rax"], [44, "lea rax, unk_447914"], [45, "mov edx, [rdx+rax]"], [46, "mov rax, [rbp+var_28]"], [47, "mov [rax], edx"], [48, "mov eax, 0"], [49, "jmp short locret_40FD3C"], [50, "mov eax, [rbp+var_4]"], [51, "cmp eax, 25h "], [52, "jbe loc_40FC4A"], [53, "mov rax, [rbp+s1]"], [54, "mov rdx, rax"], [55, "lea rsi, aLibbpfFailedTo_36"], [56, "mov edi, 0"], [57, "mov eax, 0"], [58, "call sub_405356"], [59, "mov edi, 0"], [60, "call sub_40FAFB"], [61, "mov [rbp+ptr], rax"], [62, "cmp [rbp+ptr], 0"], [63, "jz short loc_40FD37"], [64, "mov rax, [rbp+ptr]"], [65, "mov rdx, rax"], [66, "lea rsi, aLibbpfSupporte"], [67, "mov edi, 1"], [68, "mov eax, 0"], [69, "call sub_405356"], [70, "mov rax, [rbp+ptr]"], [71, "mov rdi, rax"], [72, "call _free"], [73, "mov eax, 0FFFFFFEAh"], [74, "leave"], [75, "retn"]], "data_dep": [[6, 3], [7, 6], [12, 10], [12, 30], [14, 12], [15, 14], [16, 14], [17, 16], [18, 10], [18, 30], [20, 18], [21, 20], [22, 20], [23, 22], [24, 3], [25, 23], [26, 24], [28, 27], [29, 28], [30, 30], [30, 10], [32, 30], [32, 10], [34, 32], [35, 34], [36, 34], [37, 36], [38, 4], [39, 38], [39, 37], [40, 10], [40, 30], [42, 40], [43, 42], [44, 42], [45, 39], [45, 44], [46, 5], [47, 46], [47, 45], [50, 30], [50, 10], [51, 50], [52, 51], [53, 3], [54, 53], [55, 25], [61, 60], [62, 61], [63, 62], [64, 61], [65, 64], [66, 55], [70, 61], [71, 70], [75, 48], [75, 8], [75, 73]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/9f205b620f8387a5fbfe7bf4bf706460702c799bf48defca6e639a44084247c9_9f205b620f8387a5fbfe7bf4bf706460702c799bf48defca6e639a44084247c9.jsonl.gz", "strip_func_name": "sub_40FC19", "query": "\n\n\n__int64 __fastcall sub_40FC19(const char *a1, _DWORD *a2, _DWORD *a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 v7; // rcx\n__int64 v8; // r8\n__int64 v9; // r9\nchar *ptr; // [rsp+20h] [rbp-10h]\nunsigned int i; // [rsp+2Ch] [rbp-4h]\n\nif ( !a1 )\nreturn 4294967274LL;\nfor ( i = 0; i <= 0x25; ++i )\n{\nif ( !strncmp(a1, (&off_447900)[4 * (int)i], *((_QWORD *)&unk_447908 + 4 * (int)i)) )\n{\n*a2 = *((_DWORD *)&unk_447910 + 8 * (int)i);\n*a3 = *((_DWORD *)&unk_447914 + 8 * (int)i);\nreturn 0LL;\n}\n}\nsub_405356(\n0,\n(__int64)\"libbpf: failed to guess program type based on ELF section name '%s'\\n\",\n(__int64)a1,\na4,\na5,\na6);\nptr = sub_40FAFB(0);\nif ( ptr )\n{\nsub_405356(1u, (__int64)\"libbpf: supported section(type) names are:%s\\n\", (__int64)ptr, v7, v8, v9);\nfree(ptr);\n}\nreturn 4294967274LL;\n}\n\n\n\nQ:[a3,a1,a2,ptr,sub_40FC19,sub_405356,sub_40FAFB,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'expected_attach_type', 'a1': 'name', 'a2': 'prog_type', 'ptr': 'type_names', 'sub_40FC19': 'libbpf_prog_type_by_name', 'sub_405356': 'libbpf_print', 'sub_40FAFB': 'libbpf_get_type_names'}"}
analyzerReturn
daf522ec791325a55c7ec4b0aa36a1929ad226357bee805d263ed61c8baffce7
Fedjmike
fcc
NA
static void analyzerReturn (analyzerCtx* ctx, ast* Node) { /*Return type, if any, matches?*/ const type* R = Node->r ? analyzerValue(ctx, Node->r) : 0; if (ctx->fnctx.returnType) { if (R) { if (!typeIsCompatible(R, ctx->fnctx.returnType)) errorReturnType(ctx, Node->r, ctx->fnctx); } else if (!typeIsVoid(ctx->fnctx.returnType)) errorReturnType(ctx, Node->r, ctx->fnctx); /*No known return type because we're in a lambda: - Infer the type from the expression given, - Any further returns will be checked against this, and it will also be used for the type of the lambda itself.*/ } else ctx->fnctx.returnType = R ? typeDeepDuplicate(R) : typeCreateBasic(ctx->types[builtinVoid]); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_420294", "function_addr": 4326036, "binary_name": "daf522ec791325a55c7ec4b0aa36a1929ad226357bee805d263ed61c8baffce7.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 rax, [rax+50h]"], [7, "test rax, rax"], [8, "jz short loc_4202CA"], [9, "mov rax, [rbp+var_20]"], [10, "mov rdx, [rax+50h]"], [11, "mov rax, [rbp+var_18]"], [12, "mov rsi, rdx"], [13, "mov rdi, rax"], [14, "call sub_40A93C"], [15, "jmp short loc_4202CF"], [16, "mov eax, 0"], [17, "mov [rbp+var_8], rax"], [18, "mov rax, [rbp+var_18]"], [19, "mov rax, [rax+18h]"], [20, "test rax, rax"], [21, "jz loc_420368"], [22, "cmp [rbp+var_8], 0"], [23, "jz short loc_42032F"], [24, "mov rax, [rbp+var_18]"], [25, "mov rdx, [rax+18h]"], [26, "mov rax, [rbp+var_8]"], [27, "mov rsi, rdx"], [28, "mov rdi, rax"], [29, "call sub_40DCC2"], [30, "test eax, eax"], [31, "jnz loc_420397"], [32, "mov rax, [rbp+var_20]"], [33, "mov rsi, [rax+50h]"], [34, "mov rax, [rbp+var_18]"], [35, "mov rdx, [rax+18h]"], [36, "mov rax, [rax+10h]"], [37, "mov rdi, [rbp+var_18]"], [38, "mov rcx, rdx"], [39, "mov rdx, rax"], [40, "call sub_405D95"], [41, "jmp short loc_420397"], [42, "mov rax, [rbp+var_18]"], [43, "mov rax, [rax+18h]"], [44, "mov rdi, rax"], [45, "call sub_40D8FA"], [46, "test eax, eax"], [47, "jnz short loc_420397"], [48, "mov rax, [rbp+var_20]"], [49, "mov rsi, [rax+50h]"], [50, "mov rax, [rbp+var_18]"], [51, "mov rdx, [rax+18h]"], [52, "mov rax, [rax+10h]"], [53, "mov rdi, [rbp+var_18]"], [54, "mov rcx, rdx"], [55, "mov rdx, rax"], [56, "call sub_405D95"], [57, "jmp short loc_420397"], [58, "cmp [rbp+var_8], 0"], [59, "jz short loc_42037D"], [60, "mov rax, [rbp+var_8]"], [61, "mov rdi, rax"], [62, "call sub_40CFE5"], [63, "jmp short loc_42038F"], [64, "mov rax, [rbp+var_18]"], [65, "mov rax, [rax]"], [66, "mov rax, [rax]"], [67, "mov rdi, rax"], [68, "call sub_40CE2B"], [69, "mov rdx, [rbp+var_18]"], [70, "mov [rdx+18h], rax"], [71, "nop"], [72, "leave"], [73, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [8, 7], [9, 4], [10, 9], [11, 3], [12, 10], [13, 11], [17, 14], [17, 16], [18, 3], [19, 18], [20, 19], [21, 20], [22, 17], [23, 22], [24, 3], [25, 24], [26, 17], [27, 25], [28, 26], [30, 29], [31, 30], [32, 4], [33, 32], [34, 3], [35, 34], [36, 34], [37, 3], [38, 35], [39, 36], [42, 3], [43, 42], [44, 43], [46, 45], [47, 46], [48, 4], [49, 48], [50, 3], [51, 50], [52, 50], [53, 3], [54, 51], [55, 52], [58, 17], [59, 58], [60, 17], [61, 60], [64, 3], [65, 64], [66, 65], [67, 66], [69, 3], [70, 69], [70, 68], [70, 62], [73, 56], [73, 62], [73, 68], [73, 40], [73, 46], [73, 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/daf522ec791325a55c7ec4b0aa36a1929ad226357bee805d263ed61c8baffce7_daf522ec791325a55c7ec4b0aa36a1929ad226357bee805d263ed61c8baffce7.jsonl.gz", "strip_func_name": "sub_420294", "query": "\n\n\n__int64 __fastcall sub_420294(__int64 a1, __int64 a2)\n{\nunsigned int *v2; // rax\n__int64 result; // rax\n__int64 v4; // r8\n__int64 v5; // r9\n\nif ( *(_QWORD *)(a2 + 80) )\nv2 = (unsigned int *)sub_40A93C(a1, *(_QWORD *)(a2 + 80));\nelse\nv2 = 0LL;\nif ( *(_QWORD *)(a1 + 24) )\n{\nif ( v2 )\n{\nresult = sub_40DCC2((__int64)v2, *(_QWORD *)(a1 + 24));\nif ( (_DWORD)result )\nreturn result;\nreturn sub_405D95(a1, *(_QWORD *)(a2 + 80), *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24), v4, v5);\n}\nresult = sub_40D8FA(*(_QWORD *)(a1 + 24));\nif ( !(_DWORD)result )\nreturn sub_405D95(a1, *(_QWORD *)(a2 + 80), *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24), v4, v5);\n}\nelse\n{\nif ( v2 )\nresult = (__int64)sub_40CFE5(v2);\nelse\nresult = (__int64)sub_40CE2B(**(_QWORD **)a1);\n*(_QWORD *)(a1 + 24) = result;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_420294,sub_40A93C,sub_40DCC2,sub_405D95,sub_40D8FA,sub_40CFE5,sub_40CE2B,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ctx', 'a2': 'Node', 'sub_420294': 'analyzerReturn', 'sub_40A93C': 'analyzerValue', 'sub_40DCC2': 'typeIsCompatible', 'sub_405D95': 'errorReturnType', 'sub_40D8FA': 'typeIsVoid', 'sub_40CFE5': 'typeDeepDuplicate', 'sub_40CE2B': 'typeCreateBasic'}"}
nl_set_sensor_coolant
d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f
smcameron
space-nerds-in-space
NA
static void nl_set_sensor_coolant(struct game_client *c, char *word, float fraction) { int offset = offsetof(struct snis_entity, tsd.ship.coolant_data.sensors.r2); nl_set_controllable_byte_value(c, word, fraction, offset, no_limit); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4B250C", "function_addr": 4924684, "binary_name": "d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f.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, "movss [rbp+var_24], xmm0"], [6, "mov [rbp+var_4], 7BAh"], [7, "mov edx, [rbp+var_4]"], [8, "mov edi, [rbp+var_24]"], [9, "mov rsi, [rbp+var_20]"], [10, "mov rax, [rbp+var_18]"], [11, "mov ecx, offset sub_49E287"], [12, "movd xmm0, edi"], [13, "mov rdi, rax"], [14, "call sub_4B1F5E"], [15, "nop"], [16, "leave"], [17, "retn"]], "data_dep": [[7, 6], [8, 5], [9, 4], [10, 3], [12, 8], [13, 10], [17, 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/d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f_d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f.jsonl.gz", "strip_func_name": "sub_4B250C", "query": "\n\n\nunsigned __int64 __fastcall sub_4B250C(pthread_mutex_t *a1, const char *a2, float a3)\n{\nreturn sub_4B1F5E(a1, a2, 1978, (__int64 (__fastcall *)(pthread_mutex_t *, _QWORD))sub_49E287, a3);\n}\n\n\n\nQ:[a1,a2,a3,sub_4B250C,sub_4B1F5E,sub_49E287,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'c', 'a2': 'word', 'a3': 'fraction', 'sub_4B250C': 'nl_set_sensor_coolant', 'sub_4B1F5E': 'nl_set_controllable_byte_value', 'sub_49E287': 'no_limit'}"}
head_ref_submodule
8170503cd1918ecb11237a85c61d9be0cd1209d60b0c8b0e2fb9b8fe47d16590
msysgit
msysgit
NA
int head_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data) { return do_head_ref(submodule, fn, cb_data); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41CB0E", "function_addr": 4311822, "binary_name": "8170503cd1918ecb11237a85c61d9be0cd1209d60b0c8b0e2fb9b8fe47d16590.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 rdx, [rbp+var_18]"], [7, "mov rcx, [rbp+var_10]"], [8, "mov rax, [rbp+var_8]"], [9, "mov rsi, rcx"], [10, "mov rdi, rax"], [11, "call sub_41CA47"], [12, "leave"], [13, "retn"]], "data_dep": [[6, 5], [7, 4], [8, 3], [9, 7], [10, 8], [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/8170503cd1918ecb11237a85c61d9be0cd1209d60b0c8b0e2fb9b8fe47d16590_8170503cd1918ecb11237a85c61d9be0cd1209d60b0c8b0e2fb9b8fe47d16590.jsonl.gz", "strip_func_name": "sub_41CB0E", "query": "\n\n\n__int64 __fastcall sub_41CB0E(const char *a1, __int64 (__fastcall *a2)(const char *, char *, _QWORD, __int64), __int64 a3)\n{\nreturn sub_41CA47(a1, a2, a3);\n}\n\n\n\nQ:[a3,a1,a2,sub_41CB0E,sub_41CA47,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'cb_data', 'a1': 'submodule', 'a2': 'fn', 'sub_41CB0E': 'head_ref_submodule', 'sub_41CA47': 'do_head_ref'}"}
msock_init
0bfe5573385e828dd237dfe54b331b8043915c19e2263d6d3aac84d6dbce5115
analogdevicesinc
linux
NA
static int msock_init(struct sock_args *args, int server) { uint32_t if_addr = htonl(INADDR_ANY); struct sockaddr_in laddr = { .sin_family = AF_INET, .sin_port = htons(args->port), }; int one = 1; int sd; if (!server && args->has_local_ip) if_addr = args->local_addr.in.s_addr; sd = socket(PF_INET, SOCK_DGRAM, 0); if (sd < 0) { log_err_errno("socket"); return -1; } if (setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, (char *)&one, sizeof(one)) < 0) { log_err_errno("Setting SO_REUSEADDR error"); goto out_err; } if (setsockopt(sd, SOL_SOCKET, SO_BROADCAST, (char *)&one, sizeof(one)) < 0) log_err_errno("Setting SO_BROADCAST error"); if (args->dev && bind_to_device(sd, args->dev) != 0) goto out_err; else if (args->use_setsockopt && set_multicast_if(sd, args->ifindex)) goto out_err; laddr.sin_addr.s_addr = if_addr; if (bind(sd, (struct sockaddr *) &laddr, sizeof(laddr)) < 0) { log_err_errno("bind failed"); goto out_err; } if (server && set_membership(sd, args->grp.s_addr, args->local_addr.in.s_addr, args->ifindex)) goto out_err; return sd; out_err: close(sd); return -1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404CC9", "function_addr": 4213961, "binary_name": "0bfe5573385e828dd237dfe54b331b8043915c19e2263d6d3aac84d6dbce5115.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 edi, 0"], [6, "call _htonl"], [7, "mov [rbp+var_4], eax"], [8, "mov qword ptr [rbp+addr.sa_family], 0"], [9, "mov qword ptr [rbp+addr.sa_data+6], 0"], [10, "mov [rbp+addr.sa_family], 2"], [11, "mov rax, [rbp+var_38]"], [12, "movzx eax, word ptr [rax+42h]"], [13, "movzx eax, ax"], [14, "mov edi, eax"], [15, "call _htons"], [16, "mov word ptr [rbp+addr.sa_data], ax"], [17, "mov [rbp+optval], 1"], [18, "cmp [rbp+var_3C], 0"], [19, "jnz short loc_404D37"], [20, "mov rax, [rbp+var_38]"], [21, "movzx eax, byte ptr [rax+40h]"], [22, "and eax, 1"], [23, "test al, al"], [24, "jz short loc_404D37"], [25, "mov rax, [rbp+var_38]"], [26, "mov eax, [rax+10h]"], [27, "mov [rbp+var_4], eax"], [28, "mov edx, 0"], [29, "mov esi, 2"], [30, "mov edi, 2"], [31, "call _socket"], [32, "mov [rbp+fd], eax"], [33, "cmp [rbp+fd], 0"], [34, "jns short loc_404D6D"], [35, "mov edi, offset aSocket_0"], [36, "mov eax, 0"], [37, "call sub_402796"], [38, "mov eax, 0FFFFFFFFh"], [39, "jmp locret_404E9E"], [40, "lea rdx, [rbp+optval]"], [41, "mov eax, [rbp+fd]"], [42, "mov r8d, 4"], [43, "mov rcx, rdx"], [44, "mov edx, 2"], [45, "mov esi, 1"], [46, "mov edi, eax"], [47, "call _setsockopt"], [48, "test eax, eax"], [49, "jns short loc_404DA6"], [50, "mov edi, offset aSettingSoReuse"], [51, "mov eax, 0"], [52, "call sub_402796"], [53, "jmp loc_404E8F"], [54, "lea rdx, [rbp+optval]"], [55, "mov eax, [rbp+fd]"], [56, "mov r8d, 4"], [57, "mov rcx, rdx"], [58, "mov edx, 6"], [59, "mov esi, 1"], [60, "mov edi, eax"], [61, "call _setsockopt"], [62, "test eax, eax"], [63, "jns short loc_404DDA"], [64, "mov edi, offset aSettingSoBroad"], [65, "mov eax, 0"], [66, "call sub_402796"], [67, "mov rax, [rbp+var_38]"], [68, "mov rax, [rax+58h]"], [69, "test rax, rax"], [70, "jz short loc_404E04"], [71, "mov rax, [rbp+var_38]"], [72, "mov rdx, [rax+58h]"], [73, "mov eax, [rbp+fd]"], [74, "mov rsi, rdx"], [75, "mov edi, eax"], [76, "call sub_402E39"], [77, "test eax, eax"], [78, "jnz loc_404E88"], [79, "mov rax, [rbp+var_38]"], [80, "mov eax, [rax+50h]"], [81, "test eax, eax"], [82, "jz short loc_404E26"], [83, "mov rax, [rbp+var_38]"], [84, "mov edx, [rax+68h]"], [85, "mov eax, [rbp+fd]"], [86, "mov esi, edx"], [87, "mov edi, eax"], [88, "call sub_40319C"], [89, "test eax, eax"], [90, "jnz short loc_404E8B"], [91, "mov eax, [rbp+var_4]"], [92, "mov dword ptr [rbp+addr.sa_data+2], eax"], [93, "lea rax, [rbp+addr]"], [94, "mov rcx, rax"], [95, "mov eax, [rbp+fd]"], [96, "mov edx, 10h"], [97, "mov rsi, rcx"], [98, "mov edi, eax"], [99, "call _bind"], [100, "test eax, eax"], [101, "jns short loc_404E5A"], [102, "mov edi, offset aBindFailed"], [103, "mov eax, 0"], [104, "call sub_402796"], [105, "jmp short loc_404E8F"], [106, "cmp [rbp+var_3C], 0"], [107, "jz short loc_404E83"], [108, "mov rax, [rbp+var_38]"], [109, "mov ecx, [rax+68h]"], [110, "mov rax, [rbp+var_38]"], [111, "mov edx, [rax+10h]"], [112, "mov rax, [rbp+var_38]"], [113, "mov esi, [rax+3Ch]"], [114, "mov eax, [rbp+fd]"], [115, "mov edi, eax"], [116, "call sub_4031FD"], [117, "test eax, eax"], [118, "jnz short loc_404E8E"], [119, "mov eax, [rbp+fd]"], [120, "jmp short locret_404E9E"], [121, "nop"], [122, "jmp short loc_404E8F"], [123, "nop"], [124, "jmp short loc_404E8F"], [125, "nop"], [126, "mov eax, [rbp+fd]"], [127, "mov edi, eax"], [128, "call _close"], [129, "mov eax, 0FFFFFFFFh"], [130, "leave"], [131, "retn"]], "data_dep": [[7, 6], [11, 3], [12, 11], [13, 12], [14, 13], [16, 15], [18, 4], [19, 18], [20, 3], [21, 20], [22, 21], [23, 22], [24, 23], [25, 3], [26, 25], [27, 26], [32, 31], [33, 32], [34, 33], [40, 17], [40, 28], [41, 32], [43, 40], [46, 41], [48, 47], [49, 48], [54, 17], [54, 44], [55, 32], [57, 54], [60, 55], [62, 61], [63, 62], [67, 3], [68, 67], [69, 68], [70, 69], [71, 3], [72, 71], [73, 32], [74, 72], [75, 73], [77, 76], [78, 77], [79, 3], [80, 79], [81, 80], [82, 81], [83, 3], [84, 83], [85, 32], [86, 84], [87, 85], [89, 88], [90, 89], [91, 7], [91, 27], [92, 91], [93, 91], [94, 93], [95, 32], [97, 94], [98, 95], [100, 99], [101, 100], [106, 4], [107, 106], [108, 3], [109, 108], [110, 3], [111, 110], [112, 3], [113, 112], [114, 32], [115, 114], [117, 116], [118, 117], [119, 32], [126, 32], [127, 126], [131, 129], [131, 119], [131, 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/0bfe5573385e828dd237dfe54b331b8043915c19e2263d6d3aac84d6dbce5115_0bfe5573385e828dd237dfe54b331b8043915c19e2263d6d3aac84d6dbce5115.jsonl.gz", "strip_func_name": "sub_404CC9", "query": "\n\n\n__int64 __fastcall sub_404CC9(__int64 a1, int a2)\n{\n__int64 v2; // rdx\n__int64 v3; // rcx\n__int64 v4; // r8\n__int64 v5; // r9\n__int64 v7; // rdx\n__int64 v8; // rcx\n__int64 v9; // r8\n__int64 v10; // r9\n__int64 v11; // rdx\n__int64 v12; // rcx\n__int64 v13; // r8\n__int64 v14; // r9\n__int64 v15; // rdx\n__int64 v16; // rcx\n__int64 v17; // r8\n__int64 v18; // r9\nint optval; // [rsp+1Ch] [rbp-24h] BYREF\nstruct sockaddr addr; // [rsp+20h] [rbp-20h] BYREF\nint fd; // [rsp+38h] [rbp-8h]\nuint32_t v22; // [rsp+3Ch] [rbp-4h]\n\nv22 = htonl(0);\n*(_QWORD *)&addr.sa_family = 2LL;\n*(_QWORD *)&addr.sa_data[6] = 0LL;\n*(_WORD *)addr.sa_data = htons(*(_WORD *)(a1 + 66));\noptval = 1;\nif ( !a2 && (*(_BYTE *)(a1 + 64) & 1) != 0 )\nv22 = *(_DWORD *)(a1 + 16);\nfd = socket(2, 2, 0);\nif ( fd < 0 )\n{\nsub_402796(\"socket\", 2LL, v2, v3, v4, v5);\nreturn 0xFFFFFFFFLL;\n}\nif ( setsockopt(fd, 1, 2, &optval, 4u) >= 0 )\n{\nif ( setsockopt(fd, 1, 6, &optval, 4u) < 0 )\nsub_402796(\"Setting SO_BROADCAST error\", 1LL, v11, v12, v13, v14);\nif ( (!*(_QWORD *)(a1 + 88) || !(unsigned int)sub_402E39(fd, *(const char **)(a1 + 88)))\n&& (!*(_DWORD *)(a1 + 80) || !(unsigned int)sub_40319C(fd, *(_DWORD *)(a1 + 104))) )\n{\n*(_DWORD *)&addr.sa_data[2] = v22;\nif ( bind(fd, &addr, 0x10u) >= 0 )\n{\nif ( !a2\n|| !(unsigned int)sub_4031FD(fd, *(unsigned int *)(a1 + 60), *(_DWORD *)(a1 + 16), *(_DWORD *)(a1 + 104)) )\n{\nreturn (unsigned int)fd;\n}\n}\nelse\n{\nsub_402796(\"bind failed\", (__int64)&addr, v15, v16, v17, v18);\n}\n}\n}\nelse\n{\nsub_402796(\"Setting SO_REUSEADDR error\", 1LL, v7, v8, v9, v10);\n}\nclose(fd);\nreturn 0xFFFFFFFFLL;\n}\n\n\n\nQ:[a1,a2,optval,addr,fd,v22,sub_404CC9,sub_402796,sub_402E39,sub_40319C,sub_4031FD,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'args', 'a2': 'server', 'optval': 'one', 'addr': 'laddr', 'fd': 'sd', 'v22': 'if_addr', 'sub_404CC9': 'msock_init', 'sub_402796': 'log_err_errno', 'sub_402E39': 'bind_to_device', 'sub_40319C': 'set_multicast_if', 'sub_4031FD': 'set_membership'}"}
PrintNodeClasses
34e1f47d7c3f4a6a8540956845e947b127c61352252002721d774608d8656d0e
RTimothyEdwards
netgen
NA
void PrintNodeClasses(struct NodeClass *NC, int type, int dolist) { struct Node *N; #ifdef TCL_NETGEN Tcl_Obj *plist; plist = Tcl_NewListObj(0, NULL); #endif while (NC != NULL) { #ifdef TCL_NETGEN if (check_interrupt()) break; #endif if (NC->legalpartition) { if (type != 1) { if (dolist == 0) { Printf("Net class: count = %d; magic = %lX", NC->count, NC->magic); Printf(" -- matching group\n"); for (N = NC->nodes; N != NULL; N = N->next) Printf(" %-20s (circuit %hd) hash = %lX\n", N->object->name, N->graph, N->hashval); } #ifdef TCL_NETGEN else { Tcl_Obj *nlist, *npart1, *npart2; nlist = Tcl_NewListObj(0, NULL); npart1 = Tcl_NewListObj(0, NULL); npart2 = Tcl_NewListObj(0, NULL); for (N = NC->nodes; N != NULL; N = N->next) Tcl_ListObjAppendElement(netgeninterp, (N->graph == Circuit1->file) ? npart1 : npart2, Tcl_NewStringObj(N->object->name, -1)); Tcl_ListObjAppendElement(netgeninterp, nlist, npart1); Tcl_ListObjAppendElement(netgeninterp, nlist, npart2); Tcl_ListObjAppendElement(netgeninterp, plist, nlist); } #endif } } else { if (type != 0) { if (dolist == 0) { Printf("Net class: count = %d; magic = %lX", NC->count, NC->magic); Printf(" -- nonmatching group\n"); for (N = NC->nodes; N != NULL; N = N->next) Printf(" %-20s (circuit %hd) hash = %lX\n", N->object->name, N->graph, N->hashval); } #ifdef TCL_NETGEN else { Tcl_Obj *nlist, *npart1, *npart2; nlist = Tcl_NewListObj(0, NULL); npart1 = Tcl_NewListObj(0, NULL); npart2 = Tcl_NewListObj(0, NULL); for (N = NC->nodes; N != NULL; N = N->next) Tcl_ListObjAppendElement(netgeninterp, (N->graph == Circuit1->file) ? npart1 : npart2, Tcl_NewStringObj(N->object->name, -1)); Tcl_ListObjAppendElement(netgeninterp, nlist, npart1); Tcl_ListObjAppendElement(netgeninterp, nlist, npart2); Tcl_ListObjAppendElement(netgeninterp, plist, nlist); } #endif } } NC = NC->next; } #ifdef TCL_NETGEN Tcl_SetObjResult(netgeninterp, plist); #endif }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4166B3", "function_addr": 4286131, "binary_name": "34e1f47d7c3f4a6a8540956845e947b127c61352252002721d774608d8656d0e.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_1C], esi"], [5, "mov [rbp+var_20], edx"], [6, "jmp loc_41681A"], [7, "mov rax, [rbp+var_18]"], [8, "mov eax, [rax+1Ch]"], [9, "test eax, eax"], [10, "jz loc_416776"], [11, "cmp [rbp+var_1C], 1"], [12, "jz loc_41680E"], [13, "cmp [rbp+var_20], 0"], [14, "jnz loc_41680E"], [15, "mov rax, [rbp+var_18]"], [16, "mov rdx, [rax]"], [17, "mov rax, [rbp+var_18]"], [18, "mov eax, [rax+18h]"], [19, "mov esi, eax"], [20, "lea rdi, aNetClassCountD"], [21, "mov eax, 0"], [22, "call sub_406043"], [23, "lea rdi, aMatchingGroup"], [24, "mov eax, 0"], [25, "call sub_406043"], [26, "mov rax, [rbp+var_18]"], [27, "mov rax, [rax+8]"], [28, "mov [rbp+var_8], rax"], [29, "jmp short loc_41676A"], [30, "mov rax, [rbp+var_8]"], [31, "mov rcx, [rax]"], [32, "mov rax, [rbp+var_8]"], [33, "movzx eax, word ptr [rax+8]"], [34, "movsx edx, ax"], [35, "mov rax, [rbp+var_8]"], [36, "mov rax, [rax+10h]"], [37, "mov rax, [rax]"], [38, "mov rsi, rax"], [39, "lea rdi, a20sCircuitHdHa"], [40, "mov eax, 0"], [41, "call sub_406043"], [42, "mov rax, [rbp+var_8]"], [43, "mov rax, [rax+28h]"], [44, "mov [rbp+var_8], rax"], [45, "cmp [rbp+var_8], 0"], [46, "jnz short loc_41672D"], [47, "jmp loc_41680E"], [48, "cmp [rbp+var_1C], 0"], [49, "jz loc_41680E"], [50, "cmp [rbp+var_20], 0"], [51, "jnz loc_41680E"], [52, "mov rax, [rbp+var_18]"], [53, "mov rdx, [rax]"], [54, "mov rax, [rbp+var_18]"], [55, "mov eax, [rax+18h]"], [56, "mov esi, eax"], [57, "lea rdi, aNetClassCountD"], [58, "mov eax, 0"], [59, "call sub_406043"], [60, "lea rdi, aNonmatchingGro"], [61, "mov eax, 0"], [62, "call sub_406043"], [63, "mov rax, [rbp+var_18]"], [64, "mov rax, [rax+8]"], [65, "mov [rbp+var_8], rax"], [66, "jmp short loc_416807"], [67, "mov rax, [rbp+var_8]"], [68, "mov rcx, [rax]"], [69, "mov rax, [rbp+var_8]"], [70, "movzx eax, word ptr [rax+8]"], [71, "movsx edx, ax"], [72, "mov rax, [rbp+var_8]"], [73, "mov rax, [rax+10h]"], [74, "mov rax, [rax]"], [75, "mov rsi, rax"], [76, "lea rdi, a20sCircuitHdHa"], [77, "mov eax, 0"], [78, "call sub_406043"], [79, "mov rax, [rbp+var_8]"], [80, "mov rax, [rax+28h]"], [81, "mov [rbp+var_8], rax"], [82, "cmp [rbp+var_8], 0"], [83, "jnz short loc_4167CA"], [84, "mov rax, [rbp+var_18]"], [85, "mov rax, [rax+10h]"], [86, "mov [rbp+var_18], rax"], [87, "cmp [rbp+var_18], 0"], [88, "jnz loc_4166CA"], [89, "nop"], [90, "nop"], [91, "leave"], [92, "retn"]], "data_dep": [[7, 3], [7, 86], [8, 7], [9, 8], [10, 9], [11, 4], [12, 11], [13, 5], [14, 13], [15, 86], [15, 3], [16, 15], [17, 3], [17, 86], [18, 17], [19, 18], [20, 76], [20, 60], [20, 23], [20, 39], [23, 20], [26, 86], [26, 3], [27, 26], [28, 27], [30, 44], [30, 28], [31, 30], [32, 44], [32, 28], [33, 32], [34, 33], [35, 44], [35, 28], [36, 35], [37, 36], [38, 37], [39, 39], [39, 23], [42, 28], [42, 44], [43, 42], [44, 43], [45, 28], [45, 44], [46, 45], [48, 4], [49, 48], [50, 5], [51, 50], [52, 3], [52, 86], [53, 52], [54, 86], [54, 3], [55, 54], [56, 55], [57, 76], [57, 39], [57, 60], [57, 23], [60, 57], [63, 86], [63, 3], [64, 63], [65, 64], [67, 65], [67, 81], [68, 67], [69, 65], [69, 81], [70, 69], [71, 70], [72, 81], [72, 65], [73, 72], [74, 73], [75, 74], [76, 60], [76, 76], [79, 81], [79, 65], [80, 79], [81, 80], [82, 65], [82, 81], [83, 82], [84, 86], [84, 3], [85, 84], [86, 85], [87, 86], [87, 3], [88, 87], [92, 85]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/34e1f47d7c3f4a6a8540956845e947b127c61352252002721d774608d8656d0e_34e1f47d7c3f4a6a8540956845e947b127c61352252002721d774608d8656d0e.jsonl.gz", "strip_func_name": "sub_4166B3", "query": "\n\n\n__int64 __fastcall sub_4166B3(__int64 a1, int a2, int a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 v6; // rsi\n__int64 v7; // rdx\n__int64 v8; // rcx\n__int64 v9; // r8\n__int64 v10; // r9\n__int64 v11; // rsi\n__int64 v12; // rdx\n__int64 v13; // rcx\n__int64 v14; // r8\n__int64 v15; // r9\n__int64 result; // rax\n__int64 i; // [rsp+18h] [rbp-8h]\n__int64 j; // [rsp+18h] [rbp-8h]\n\nwhile ( a1 )\n{\nif ( *(_DWORD *)(a1 + 28) )\n{\nif ( a2 != 1 && !a3 )\n{\nv6 = *(unsigned int *)(a1 + 24);\nsub_406043(\"Net class: count = %d; magic = %lX\", v6, *(_QWORD *)a1, a4, a5, a6);\nsub_406043(\" -- matching group\\n\", v6, v7, v8, v9, v10);\nfor ( i = *(_QWORD *)(a1 + 8); i; i = *(_QWORD *)(i + 40) )\nsub_406043(\n\" %-20s (circuit %hd) hash = %lX\\n\",\n**(_QWORD **)(i + 16),\n(unsigned int)*(__int16 *)(i + 8),\n*(_QWORD *)i,\na5,\na6);\n}\n}\nelse if ( a2 && !a3 )\n{\nv11 = *(unsigned int *)(a1 + 24);\nsub_406043(\"Net class: count = %d; magic = %lX\", v11, *(_QWORD *)a1, a4, a5, a6);\nsub_406043(\" -- nonmatching group\\n\", v11, v12, v13, v14, v15);\nfor ( j = *(_QWORD *)(a1 + 8); j; j = *(_QWORD *)(j + 40) )\nsub_406043(\n\" %-20s (circuit %hd) hash = %lX\\n\",\n**(_QWORD **)(j + 16),\n(unsigned int)*(__int16 *)(j + 8),\n*(_QWORD *)j,\na5,\na6);\n}\nresult = *(_QWORD *)(a1 + 16);\na1 = result;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v11,v7,i,sub_4166B3,sub_406043,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'dolist', 'a1': 'NC', 'a2': 'type', 'v11': 'type', 'v7': 'dolist', 'i': 'N', 'sub_4166B3': 'PrintNodeClasses', 'sub_406043': 'Printf'}"}
readPc_slow
90dfeeae884285efa1da470a6941a2a3e84e408bb7f5b83a4adc529a4c4b74bb
dmsc
fastbasic
NA
static uint8_t readPc_slow(sim65 s, uint16_t addr) { if (s->mems[addr] & ms_undef) set_error(s, sim65_err_exec_undef, addr); else set_error(s, sim65_err_exec_uninit, addr); return s->mem[addr]; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4060A4", "function_addr": 4219044, "binary_name": "90dfeeae884285efa1da470a6941a2a3e84e408bb7f5b83a4adc529a4c4b74bb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov eax, esi"], [5, "mov [rbp+var_C], ax"], [6, "movzx eax, [rbp+var_C]"], [7, "mov rdx, [rbp+var_8]"], [8, "cdqe"], [9, "movzx eax, byte ptr [rdx+rax+1003Dh]"], [10, "movzx eax, al"], [11, "and eax, 1"], [12, "test eax, eax"], [13, "jz short loc_4060E9"], [14, "movzx edx, [rbp+var_C]"], [15, "mov rax, [rbp+var_8]"], [16, "mov esi, 0FFFFFFFFh"], [17, "mov rdi, rax"], [18, "call sub_40606A"], [19, "jmp short loc_4060FE"], [20, "movzx edx, [rbp+var_C]"], [21, "mov rax, [rbp+var_8]"], [22, "mov esi, 0FFFFFFFEh"], [23, "mov rdi, rax"], [24, "call sub_40606A"], [25, "movzx eax, [rbp+var_C]"], [26, "mov rdx, [rbp+var_8]"], [27, "cdqe"], [28, "movzx eax, byte ptr [rdx+rax+3Dh]"], [29, "leave"], [30, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 3], [9, 6], [10, 9], [11, 10], [12, 11], [13, 12], [14, 5], [15, 3], [17, 15], [20, 5], [21, 3], [23, 21], [25, 5], [26, 3], [28, 25], [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/90dfeeae884285efa1da470a6941a2a3e84e408bb7f5b83a4adc529a4c4b74bb_90dfeeae884285efa1da470a6941a2a3e84e408bb7f5b83a4adc529a4c4b74bb.jsonl.gz", "strip_func_name": "sub_4060A4", "query": "\n\n\n__int64 __fastcall sub_4060A4(__int64 a1, unsigned __int16 a2)\n{\nif ( (*(_BYTE *)(a1 + a2 + 65597) & 1) != 0 )\nsub_40606A(a1, -1, a2);\nelse\nsub_40606A(a1, -2, a2);\nreturn *(unsigned __int8 *)(a1 + a2 + 61);\n}\n\n\n\nQ:[a1,a2,sub_4060A4,sub_40606A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 's', 'a2': 'addr', 'sub_4060A4': 'readPc_slow', 'sub_40606A': 'set_error'}"}
pj_ioqueue_recv
24a2637591f28727b21989feacd6e39416a2c11ff374047913dc0e05514c7835
AonCyberLabs
D-Modem
NA
PJ_DEF(pj_status_t) pj_ioqueue_recv( pj_ioqueue_key_t *key, pj_ioqueue_op_key_t *op_key, void *buffer, pj_ssize_t *length, unsigned flags ) { struct read_operation *read_op; PJ_ASSERT_RETURN(key && op_key && buffer && length, PJ_EINVAL); PJ_CHECK_STACK(); /* Check if key is closing (need to do this first before accessing * other variables, since they might have been destroyed. See ticket * #469). */ if (IS_CLOSING(key)) return PJ_ECANCELLED; read_op = (struct read_operation*)op_key; PJ_ASSERT_RETURN(read_op->op == PJ_IOQUEUE_OP_NONE, PJ_EPENDING); read_op->op = PJ_IOQUEUE_OP_NONE; /* Try to see if there's data immediately available. */ if ((flags & PJ_IOQUEUE_ALWAYS_ASYNC) == 0) { pj_status_t status; pj_ssize_t size; size = *length; status = pj_sock_recv(key->fd, buffer, &size, flags); if (status == PJ_SUCCESS) { /* Yes! Data is available! */ *length = size; return PJ_SUCCESS; } else { /* If error is not EWOULDBLOCK (or EAGAIN on Linux), report * the error to caller. */ if (status != PJ_STATUS_FROM_OS(PJ_BLOCKING_ERROR_VAL)) return status; } } flags &= ~(PJ_IOQUEUE_ALWAYS_ASYNC); /* * No data is immediately available. * Must schedule asynchronous operation to the ioqueue. */ read_op->op = PJ_IOQUEUE_OP_RECV; read_op->buf = buffer; read_op->size = *length; read_op->flags = flags; pj_ioqueue_lock_key(key); /* Check again. Handle may have been closed after the previous check * in multithreaded app. If we add bad handle to the set it will * corrupt the ioqueue set. See #913 */ if (IS_CLOSING(key)) { pj_ioqueue_unlock_key(key); return PJ_ECANCELLED; } pj_list_insert_before(&key->read_list, read_op); ioqueue_add_to_set(key->ioqueue, key, READABLE_EVENT); pj_ioqueue_unlock_key(key); return PJ_EPENDING; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4275D3", "function_addr": 4355539, "binary_name": "24a2637591f28727b21989feacd6e39416a2c11ff374047913dc0e05514c7835.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_44], r8d"], [8, "cmp [rbp+var_28], 0"], [9, "jz short loc_42760B"], [10, "cmp [rbp+var_30], 0"], [11, "jz short loc_42760B"], [12, "cmp [rbp+var_38], 0"], [13, "jz short loc_42760B"], [14, "cmp [rbp+var_40], 0"], [15, "jnz short loc_42764A"], [16, "cmp [rbp+var_28], 0"], [17, "jz short loc_427627"], [18, "cmp [rbp+var_30], 0"], [19, "jz short loc_427627"], [20, "cmp [rbp+var_38], 0"], [21, "jz short loc_427627"], [22, "cmp [rbp+var_40], 0"], [23, "jnz short loc_427640"], [24, "mov ecx, offset aPjIoqueueRecv"], [25, "mov edx, 2C7h"], [26, "mov esi, offset aSrcPjIoqueueCo"], [27, "mov edi, offset aKeyOpKeyBuffer"], [28, "call ___assert_fail"], [29, "mov eax, 11174h"], [30, "jmp locret_4277B5"], [31, "mov rax, [rbp+var_28]"], [32, "mov eax, [rax+13Ch]"], [33, "test eax, eax"], [34, "jz short loc_427662"], [35, "mov eax, 1117Eh"], [36, "jmp locret_4277B5"], [37, "mov rax, [rbp+var_30]"], [38, "mov [rbp+var_8], rax"], [39, "mov rax, [rbp+var_8]"], [40, "mov eax, [rax+10h]"], [41, "test eax, eax"], [42, "jz short loc_4276A3"], [43, "mov rax, [rbp+var_8]"], [44, "mov eax, [rax+10h]"], [45, "test eax, eax"], [46, "jz short loc_427699"], [47, "mov ecx, offset aPjIoqueueRecv"], [48, "mov edx, 2D2h"], [49, "mov esi, offset aSrcPjIoqueueCo"], [50, "mov edi, offset aReadOpOpPjIoqu_0"], [51, "call ___assert_fail"], [52, "mov eax, 11172h"], [53, "jmp locret_4277B5"], [54, "mov rax, [rbp+var_8]"], [55, "mov dword ptr [rax+10h], 0"], [56, "mov eax, [rbp+var_44]"], [57, "test eax, eax"], [58, "js short loc_42770A"], [59, "mov rax, [rbp+var_40]"], [60, "mov rax, [rax]"], [61, "mov [rbp+var_18], rax"], [62, "mov rax, [rbp+var_28]"], [63, "mov rax, [rax+38h]"], [64, "mov ecx, [rbp+var_44]"], [65, "lea rdx, [rbp+var_18]"], [66, "mov rsi, [rbp+var_38]"], [67, "mov rdi, rax"], [68, "call sub_42D018"], [69, "mov [rbp+var_C], eax"], [70, "cmp [rbp+var_C], 0"], [71, "jnz short loc_4276F9"], [72, "mov rdx, [rbp+var_18]"], [73, "mov rax, [rbp+var_40]"], [74, "mov [rax], rdx"], [75, "mov eax, 0"], [76, "jmp locret_4277B5"], [77, "cmp [rbp+var_C], 1D4CBh"], [78, "jz short loc_42770A"], [79, "mov eax, [rbp+var_C]"], [80, "jmp locret_4277B5"], [81, "and [rbp+var_44], 7FFFFFFFh"], [82, "mov rax, [rbp+var_8]"], [83, "mov dword ptr [rax+10h], 2"], [84, "mov rax, [rbp+var_8]"], [85, "mov rdx, [rbp+var_38]"], [86, "mov [rax+18h], rdx"], [87, "mov rax, [rbp+var_40]"], [88, "mov rax, [rax]"], [89, "mov rdx, rax"], [90, "mov rax, [rbp+var_8]"], [91, "mov [rax+20h], rdx"], [92, "mov rax, [rbp+var_8]"], [93, "mov edx, [rbp+var_44]"], [94, "mov [rax+28h], edx"], [95, "mov rax, [rbp+var_28]"], [96, "mov rdi, rax"], [97, "call sub_4284FF"], [98, "mov rax, [rbp+var_28]"], [99, "mov eax, [rax+13Ch]"], [100, "test eax, eax"], [101, "jz short loc_427771"], [102, "mov rax, [rbp+var_28]"], [103, "mov rdi, rax"], [104, "call sub_428579"], [105, "mov eax, 1117Eh"], [106, "jmp short locret_4277B5"], [107, "mov rax, [rbp+var_28]"], [108, "lea rdx, [rax+78h]"], [109, "mov rax, [rbp+var_8]"], [110, "mov rsi, rax"], [111, "mov rdi, rdx"], [112, "call sub_431AFA"], [113, "mov rax, [rbp+var_28]"], [114, "mov rax, [rax+10h]"], [115, "mov rcx, [rbp+var_28]"], [116, "mov edx, 1"], [117, "mov rsi, rcx"], [118, "mov rdi, rax"], [119, "call sub_42907C"], [120, "mov rax, [rbp+var_28]"], [121, "mov rdi, rax"], [122, "call sub_428579"], [123, "mov eax, 11172h"], [124, "leave"], [125, "retn"]], "data_dep": [[8, 3], [9, 8], [10, 4], [11, 10], [12, 5], [13, 12], [14, 6], [15, 14], [16, 3], [17, 16], [18, 4], [19, 18], [20, 5], [21, 20], [22, 6], [23, 22], [31, 3], [32, 31], [33, 32], [34, 33], [37, 4], [38, 37], [39, 38], [40, 39], [41, 40], [42, 41], [43, 38], [44, 43], [45, 44], [46, 45], [54, 38], [55, 54], [56, 7], [57, 56], [58, 57], [59, 6], [60, 55], [60, 59], [61, 60], [62, 3], [63, 62], [63, 55], [64, 7], [65, 61], [66, 5], [67, 63], [69, 68], [70, 69], [71, 70], [72, 61], [73, 6], [74, 73], [74, 72], [77, 69], [78, 77], [79, 69], [81, 7], [82, 38], [83, 82], [84, 38], [85, 5], [86, 85], [86, 84], [87, 6], [88, 86], [88, 87], [89, 88], [90, 38], [91, 89], [91, 90], [92, 38], [93, 81], [94, 93], [94, 92], [95, 3], [96, 95], [98, 3], [99, 94], [99, 98], [100, 99], [101, 100], [102, 3], [103, 102], [107, 3], [108, 107], [108, 93], [108, 86], [108, 83], [108, 94], [108, 55], [108, 91], [109, 38], [110, 109], [111, 108], [113, 3], [114, 113], [114, 83], [114, 55], [114, 94], [114, 91], [114, 86], [115, 3], [117, 115], [118, 114], [120, 3], [121, 120], [125, 75], [125, 123], [125, 52], [125, 79], [125, 29], [125, 35], [125, 105]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/24a2637591f28727b21989feacd6e39416a2c11ff374047913dc0e05514c7835_24a2637591f28727b21989feacd6e39416a2c11ff374047913dc0e05514c7835.jsonl.gz", "strip_func_name": "sub_4275D3", "query": "\n\n\n__int64 __fastcall sub_4275D3(__int64 a1, __int64 a2, __int64 a3, __int64 *a4, int a5)\n{\n__int64 result; // rax\n__int64 v9; // [rsp+38h] [rbp-18h] BYREF\nunsigned int v10; // [rsp+44h] [rbp-Ch]\n__int64 v11; // [rsp+48h] [rbp-8h]\n\nif ( a1 && a2 && a3 && a4 )\n{\nif ( *(_DWORD *)(a1 + 316) )\nreturn 70014LL;\nv11 = a2;\nif ( *(_DWORD *)(a2 + 16) )\n__assert_fail(\"read_op->op == PJ_IOQUEUE_OP_NONE\", \"../src/pj/ioqueue_common_abs.c\", 0x2D2u, \"pj_ioqueue_recv\");\n*(_DWORD *)(v11 + 16) = 0;\nif ( a5 < 0 )\ngoto LABEL_20;\nv9 = *a4;\nv10 = sub_42D018(*(_QWORD *)(a1 + 56), a3, &v9, (unsigned int)a5);\nif ( !v10 )\n{\n*a4 = v9;\nreturn 0LL;\n}\nif ( v10 == 120011 )\n{\nLABEL_20:\n*(_DWORD *)(v11 + 16) = 2;\n*(_QWORD *)(v11 + 24) = a3;\n*(_QWORD *)(v11 + 32) = *a4;\n*(_DWORD *)(v11 + 40) = a5 & 0x7FFFFFFF;\nsub_4284FF(a1);\nif ( *(_DWORD *)(a1 + 316) )\n{\nsub_428579(a1);\nresult = 70014LL;\n}\nelse\n{\nsub_431AFA(a1 + 120, v11);\nsub_42907C(*(_QWORD *)(a1 + 16), a1, 1LL);\nsub_428579(a1);\nresult = 70002LL;\n}\n}\nelse\n{\nresult = v10;\n}\n}\nelse\n{\nif ( !a1 || !a2 || !a3 || !a4 )\n__assert_fail(\"key && op_key && buffer && length\", \"../src/pj/ioqueue_common_abs.c\", 0x2C7u, \"pj_ioqueue_recv\");\nresult = 70004LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v9,v10,v11,sub_4275D3,sub_42D018,sub_4284FF,sub_428579,sub_431AFA,sub_42907C,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'buffer', 'a4': 'length', 'a1': 'key', 'a2': 'op_key', 'a5': 'flags', 'v9': 'size', 'v10': 'status', 'v11': 'read_op', 'sub_4275D3': 'pj_ioqueue_recv', 'sub_42D018': 'pj_sock_recv', 'sub_4284FF': 'pj_ioqueue_lock_key', 'sub_428579': 'pj_ioqueue_unlock_key', 'sub_431AFA': 'pj_list_insert_before', 'sub_42907C': 'ioqueue_add_to_set'}"}
init_block
fffb6272767da13c39d1d18926358bd63f012dd0292202aa9c26bfad4d90e94a
oxUnd
node-pngcrush
NA
local void init_block(s) deflate_state *s; { int n; /* iterates over tree elements */ /* Initialize the trees. */ for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0; for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0; for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0; s->dyn_ltree[END_BLOCK].Freq = 1; s->opt_len = s->static_len = 0L; s->last_lit = s->matches = 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_446462", "function_addr": 4482146, "binary_name": "fffb6272767da13c39d1d18926358bd63f012dd0292202aa9c26bfad4d90e94a.elf_extract.pkl\n"}, "code": [[0, "mov [rsp+var_18], rdi"], [1, "mov [rsp+var_4], 0"], [2, "jmp short loc_44648D"], [3, "mov rax, [rsp+var_18]"], [4, "mov edx, [rsp+var_4]"], [5, "movsxd rdx, edx"], [6, "add rdx, 30h "], [7, "mov word ptr [rax+rdx*4+4], 0"], [8, "add [rsp+var_4], 1"], [9, "cmp [rsp+var_4], 11Dh"], [10, "jle short loc_446471"], [11, "mov [rsp+var_4], 0"], [12, "jmp short loc_4464C0"], [13, "mov rax, [rsp+var_18]"], [14, "mov edx, [rsp+var_4]"], [15, "movsxd rdx, edx"], [16, "add rdx, 26Ch"], [17, "mov word ptr [rax+rdx*4+8], 0"], [18, "add [rsp+var_4], 1"], [19, "cmp [rsp+var_4], 1Dh"], [20, "jle short loc_4464A1"], [21, "mov [rsp+var_4], 0"], [22, "jmp short loc_4464F0"], [23, "mov rax, [rsp+var_18]"], [24, "mov edx, [rsp+var_4]"], [25, "movsxd rdx, edx"], [26, "add rdx, 2A8h"], [27, "mov word ptr [rax+rdx*4+0Ch], 0"], [28, "add [rsp+var_4], 1"], [29, "cmp [rsp+var_4], 12h"], [30, "jle short loc_4464D1"], [31, "mov rax, [rsp+var_18]"], [32, "mov word ptr [rax+4C4h], 1"], [33, "mov rax, [rsp+var_18]"], [34, "mov qword ptr [rax+1710h], 0"], [35, "mov rax, [rsp+var_18]"], [36, "mov rdx, [rax+1710h]"], [37, "mov rax, [rsp+var_18]"], [38, "mov [rax+1708h], rdx"], [39, "mov rax, [rsp+var_18]"], [40, "mov dword ptr [rax+1718h], 0"], [41, "mov rax, [rsp+var_18]"], [42, "mov edx, [rax+1718h]"], [43, "mov rax, [rsp+var_18]"], [44, "mov [rax+16FCh], edx"], [45, "nop"], [46, "retn"]], "data_dep": [[3, 0], [4, 8], [4, 1], [5, 4], [6, 5], [7, 3], [8, 8], [8, 1], [9, 8], [9, 1], [10, 9], [13, 0], [14, 18], [14, 11], [15, 14], [16, 15], [17, 13], [18, 18], [18, 11], [19, 18], [19, 11], [20, 19], [23, 0], [24, 21], [24, 28], [25, 24], [26, 25], [27, 23], [28, 21], [28, 28], [29, 28], [29, 21], [30, 29], [31, 0], [32, 31], [33, 0], [34, 33], [35, 0], [36, 34], [36, 35], [37, 0], [38, 37], [38, 36], [39, 0], [40, 39], [41, 0], [42, 41], [42, 40], [43, 0], [44, 42], [44, 43], [46, 43]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/fffb6272767da13c39d1d18926358bd63f012dd0292202aa9c26bfad4d90e94a_fffb6272767da13c39d1d18926358bd63f012dd0292202aa9c26bfad4d90e94a.jsonl.gz", "strip_func_name": "sub_446462", "query": "\n\n\n__int64 __fastcall sub_446462(__int64 a1)\n{\n__int64 result; // rax\nint i; // [rsp+14h] [rbp-4h]\nint j; // [rsp+14h] [rbp-4h]\nint k; // [rsp+14h] [rbp-4h]\n\nfor ( i = 0; i <= 285; ++i )\n*(_WORD *)(a1 + 4 * (i + 48LL) + 4) = 0;\nfor ( j = 0; j <= 29; ++j )\n*(_WORD *)(a1 + 4 * (j + 620LL) + 8) = 0;\nfor ( k = 0; k <= 18; ++k )\n*(_WORD *)(a1 + 4 * (k + 680LL) + 12) = 0;\n*(_WORD *)(a1 + 1220) = 1;\n*(_QWORD *)(a1 + 5904) = 0LL;\n*(_QWORD *)(a1 + 5896) = *(_QWORD *)(a1 + 5904);\n*(_DWORD *)(a1 + 5912) = 0;\nresult = a1;\n*(_DWORD *)(a1 + 5884) = *(_DWORD *)(a1 + 5912);\nreturn result;\n}\n\n\n\nQ:[a1,j,sub_446462,]\nAssistant: ", "hints": "[]", "response": "{'a1': 's', 'j': 'na', 'sub_446462': 'init_block'}"}
raw_recv
67c4171a5e760cda4d484660c296765ba24309a69a74774f392070ec56316ff2
chobits
tapip
NA
static void raw_recv(struct pkbuf *pkb, struct sock *sk) { /* FIFO queue */ list_add_tail(&pkb->pk_list, &sk->recv_queue); /* Should we get sk? */ pkb->pk_sk = sk; sk->ops->recv_notify(sk); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4093C4", "function_addr": 4232132, "binary_name": "67c4171a5e760cda4d484660c296765ba24309a69a74774f392070ec56316ff2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_38], rdi"], [4, "mov [rbp+var_40], rsi"], [5, "mov rax, [rbp+var_40]"], [6, "lea rdx, [rax+25h]"], [7, "mov rax, [rbp+var_38]"], [8, "mov [rbp+var_8], rax"], [9, "mov [rbp+var_10], rdx"], [10, "mov rax, [rbp+var_10]"], [11, "mov rax, [rax]"], [12, "mov rdx, [rbp+var_8]"], [13, "mov [rbp+var_18], rdx"], [14, "mov [rbp+var_20], rax"], [15, "mov rax, [rbp+var_10]"], [16, "mov [rbp+var_28], rax"], [17, "mov rax, [rbp+var_18]"], [18, "mov rdx, [rbp+var_20]"], [19, "mov [rax], rdx"], [20, "mov rax, [rbp+var_18]"], [21, "mov rdx, [rbp+var_28]"], [22, "mov [rax+8], rdx"], [23, "mov rax, [rbp+var_28]"], [24, "mov rdx, [rbp+var_18]"], [25, "mov [rax], rdx"], [26, "mov rax, [rbp+var_20]"], [27, "mov rdx, [rbp+var_18]"], [28, "mov [rax+8], rdx"], [29, "nop"], [30, "nop"], [31, "mov rax, [rbp+var_38]"], [32, "mov rdx, [rbp+var_40]"], [33, "mov [rax+2Ch], rdx"], [34, "mov rax, [rbp+var_40]"], [35, "mov rax, [rax+15h]"], [36, "mov rdx, [rax]"], [37, "mov rax, [rbp+var_40]"], [38, "mov rdi, rax"], [39, "call rdx"], [40, "nop"], [41, "leave"], [42, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 3], [8, 7], [9, 6], [10, 9], [11, 10], [12, 8], [13, 12], [14, 11], [15, 9], [16, 15], [17, 13], [18, 14], [19, 18], [19, 17], [20, 13], [21, 16], [22, 20], [22, 21], [23, 16], [24, 13], [25, 23], [25, 24], [26, 14], [27, 13], [28, 27], [28, 26], [31, 3], [32, 4], [33, 32], [33, 31], [34, 4], [35, 33], [35, 34], [36, 25], [36, 33], [36, 35], [37, 4], [38, 37], [39, 36], [42, 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/67c4171a5e760cda4d484660c296765ba24309a69a74774f392070ec56316ff2_67c4171a5e760cda4d484660c296765ba24309a69a74774f392070ec56316ff2.jsonl.gz", "strip_func_name": "sub_4093C4", "query": "\n\n\n__int64 __fastcall sub_4093C4(_QWORD *a1, __int64 a2)\n{\n__int64 v3; // [rsp+20h] [rbp-20h]\n\nv3 = *(_QWORD *)(a2 + 37);\n*a1 = v3;\na1[1] = a2 + 37;\n*(_QWORD *)(a2 + 37) = a1;\n*(_QWORD *)(v3 + 8) = a1;\n*(_QWORD *)((char *)a1 + 44) = a2;\nreturn (**(__int64 (__fastcall ***)(__int64))(a2 + 21))(a2);\n}\n\n\n\nQ:[a1,a2,sub_4093C4,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'pkb', 'a2': 'sk', 'sub_4093C4': 'raw_recv'}"}
l2cap_run_for_classic_channel_ertm
9b77144fc462e220c73de576c69ed0fe3d0a9aae6d065dbec16cb7a57190910d
Matheus-Garbelini
esp32_bluetooth_classic_sniffer
NA
static void l2cap_run_for_classic_channel_ertm(l2cap_channel_t * channel){ // ERTM mode if (channel->mode != L2CAP_CHANNEL_MODE_ENHANCED_RETRANSMISSION) return; // check if we can still send if (channel->con_handle == HCI_CON_HANDLE_INVALID) return; if (!hci_can_send_acl_packet_now(channel->con_handle)) return; if (channel->send_supervisor_frame_receiver_ready){ channel->send_supervisor_frame_receiver_ready = 0; log_info("Send S-Frame: RR %u, final %u", channel->req_seq, channel->set_final_bit_after_packet_with_poll_bit_set); uint16_t control = l2cap_encanced_control_field_for_supevisor_frame( L2CAP_SUPERVISORY_FUNCTION_RR_RECEIVER_READY, 0, channel->set_final_bit_after_packet_with_poll_bit_set, channel->req_seq); channel->set_final_bit_after_packet_with_poll_bit_set = 0; l2cap_ertm_send_supervisor_frame(channel, control); return; } if (channel->send_supervisor_frame_receiver_ready_poll){ channel->send_supervisor_frame_receiver_ready_poll = 0; log_info("Send S-Frame: RR %u with poll=1 ", channel->req_seq); uint16_t control = l2cap_encanced_control_field_for_supevisor_frame( L2CAP_SUPERVISORY_FUNCTION_RR_RECEIVER_READY, 1, 0, channel->req_seq); l2cap_ertm_send_supervisor_frame(channel, control); return; } if (channel->send_supervisor_frame_receiver_not_ready){ channel->send_supervisor_frame_receiver_not_ready = 0; log_info("Send S-Frame: RNR %u", channel->req_seq); uint16_t control = l2cap_encanced_control_field_for_supevisor_frame( L2CAP_SUPERVISORY_FUNCTION_RNR_RECEIVER_NOT_READY, 0, 0, channel->req_seq); l2cap_ertm_send_supervisor_frame(channel, control); return; } if (channel->send_supervisor_frame_reject){ channel->send_supervisor_frame_reject = 0; log_info("Send S-Frame: REJ %u", channel->req_seq); uint16_t control = l2cap_encanced_control_field_for_supevisor_frame( L2CAP_SUPERVISORY_FUNCTION_REJ_REJECT, 0, 0, channel->req_seq); l2cap_ertm_send_supervisor_frame(channel, control); return; } if (channel->send_supervisor_frame_selective_reject){ channel->send_supervisor_frame_selective_reject = 0; log_info("Send S-Frame: SREJ %u", channel->expected_tx_seq); uint16_t control = l2cap_encanced_control_field_for_supevisor_frame( L2CAP_SUPERVISORY_FUNCTION_SREJ_SELECTIVE_REJECT, 0, channel->set_final_bit_after_packet_with_poll_bit_set, channel->expected_tx_seq); channel->set_final_bit_after_packet_with_poll_bit_set = 0; l2cap_ertm_send_supervisor_frame(channel, control); return; } if (channel->srej_active){ int i; for (i=0;i<channel->num_tx_buffers;i++){ l2cap_ertm_tx_packet_state_t * tx_state = &channel->tx_packets_state[i]; if (tx_state->retransmission_requested) { tx_state->retransmission_requested = 0; uint8_t final = channel->set_final_bit_after_packet_with_poll_bit_set; channel->set_final_bit_after_packet_with_poll_bit_set = 0; l2cap_ertm_send_information_frame(channel, i, final); break; } } if (i == channel->num_tx_buffers){ // no retransmission request found channel->srej_active = 0; } else { // packet was sent return; } } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41D2DD", "function_addr": 4313821, "binary_name": "9b77144fc462e220c73de576c69ed0fe3d0a9aae6d065dbec16cb7a57190910d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_28], rdi"], [4, "mov rax, [rbp+var_28]"], [5, "mov eax, [rax+90h]"], [6, "cmp eax, 3"], [7, "jnz loc_41D6D1"], [8, "mov rax, [rbp+var_28]"], [9, "movzx eax, word ptr [rax+48h]"], [10, "cmp ax, 0FFFFh"], [11, "jz loc_41D6D4"], [12, "mov rax, [rbp+var_28]"], [13, "movzx eax, word ptr [rax+48h]"], [14, "movzx eax, ax"], [15, "mov edi, eax"], [16, "call sub_40D09A"], [17, "test eax, eax"], [18, "jz loc_41D6D7"], [19, "mov rax, [rbp+var_28]"], [20, "movzx eax, byte ptr [rax+0F2h]"], [21, "test al, al"], [22, "jz loc_41D3DB"], [23, "mov rax, [rbp+var_28]"], [24, "mov byte ptr [rax+0F2h], 0"], [25, "mov rax, [rbp+var_28]"], [26, "movzx eax, byte ptr [rax+0F7h]"], [27, "movzx edx, al"], [28, "mov rax, [rbp+var_28]"], [29, "movzx eax, byte ptr [rax+0F0h]"], [30, "movzx eax, al"], [31, "mov r9d, edx"], [32, "mov r8d, eax"], [33, "mov ecx, 651h"], [34, "mov edx, offset aL2capC"], [35, "mov esi, offset aSUSendSFrameRr"], [36, "mov edi, 1"], [37, "mov eax, 0"], [38, "call sub_419626"], [39, "mov rax, [rbp+var_28]"], [40, "movzx eax, byte ptr [rax+0F0h]"], [41, "movzx edx, al"], [42, "mov rax, [rbp+var_28]"], [43, "movzx eax, byte ptr [rax+0F7h]"], [44, "movzx eax, al"], [45, "mov ecx, edx"], [46, "mov edx, eax"], [47, "mov esi, 0"], [48, "mov edi, 0"], [49, "call sub_419978"], [50, "mov [rbp+var_1C], ax"], [51, "mov rax, [rbp+var_28]"], [52, "mov byte ptr [rax+0F7h], 0"], [53, "movzx edx, [rbp+var_1C]"], [54, "mov rax, [rbp+var_28]"], [55, "mov esi, edx"], [56, "mov rdi, rax"], [57, "call sub_41A606"], [58, "jmp locret_41D6DB"], [59, "mov rax, [rbp+var_28]"], [60, "movzx eax, byte ptr [rax+0F3h]"], [61, "test al, al"], [62, "jz short loc_41D463"], [63, "mov rax, [rbp+var_28]"], [64, "mov byte ptr [rax+0F3h], 0"], [65, "mov rax, [rbp+var_28]"], [66, "movzx eax, byte ptr [rax+0F0h]"], [67, "movzx eax, al"], [68, "mov r8d, eax"], [69, "mov ecx, 659h"], [70, "mov edx, offset aL2capC"], [71, "mov esi, offset aSUSendSFrameRr_0"], [72, "mov edi, 1"], [73, "mov eax, 0"], [74, "call sub_419626"], [75, "mov rax, [rbp+var_28]"], [76, "movzx eax, byte ptr [rax+0F0h]"], [77, "movzx eax, al"], [78, "mov ecx, eax"], [79, "mov edx, 0"], [80, "mov esi, 1"], [81, "mov edi, 0"], [82, "call sub_419978"], [83, "mov [rbp+var_1A], ax"], [84, "movzx edx, [rbp+var_1A]"], [85, "mov rax, [rbp+var_28]"], [86, "mov esi, edx"], [87, "mov rdi, rax"], [88, "call sub_41A606"], [89, "jmp locret_41D6DB"], [90, "mov rax, [rbp+var_28]"], [91, "movzx eax, byte ptr [rax+0F4h]"], [92, "test al, al"], [93, "jz short loc_41D4EB"], [94, "mov rax, [rbp+var_28]"], [95, "mov byte ptr [rax+0F4h], 0"], [96, "mov rax, [rbp+var_28]"], [97, "movzx eax, byte ptr [rax+0F0h]"], [98, "movzx eax, al"], [99, "mov r8d, eax"], [100, "mov ecx, 660h"], [101, "mov edx, offset aL2capC"], [102, "mov esi, offset aSUSendSFrameRn"], [103, "mov edi, 1"], [104, "mov eax, 0"], [105, "call sub_419626"], [106, "mov rax, [rbp+var_28]"], [107, "movzx eax, byte ptr [rax+0F0h]"], [108, "movzx eax, al"], [109, "mov ecx, eax"], [110, "mov edx, 0"], [111, "mov esi, 0"], [112, "mov edi, 2"], [113, "call sub_419978"], [114, "mov [rbp+var_18], ax"], [115, "movzx edx, [rbp+var_18]"], [116, "mov rax, [rbp+var_28]"], [117, "mov esi, edx"], [118, "mov rdi, rax"], [119, "call sub_41A606"], [120, "jmp locret_41D6DB"], [121, "mov rax, [rbp+var_28]"], [122, "movzx eax, byte ptr [rax+0F5h]"], [123, "test al, al"], [124, "jz short loc_41D573"], [125, "mov rax, [rbp+var_28]"], [126, "mov byte ptr [rax+0F5h], 0"], [127, "mov rax, [rbp+var_28]"], [128, "movzx eax, byte ptr [rax+0F0h]"], [129, "movzx eax, al"], [130, "mov r8d, eax"], [131, "mov ecx, 667h"], [132, "mov edx, offset aL2capC"], [133, "mov esi, offset aSUSendSFrameRe"], [134, "mov edi, 1"], [135, "mov eax, 0"], [136, "call sub_419626"], [137, "mov rax, [rbp+var_28]"], [138, "movzx eax, byte ptr [rax+0F0h]"], [139, "movzx eax, al"], [140, "mov ecx, eax"], [141, "mov edx, 0"], [142, "mov esi, 0"], [143, "mov edi, 1"], [144, "call sub_419978"], [145, "mov [rbp+var_16], ax"], [146, "movzx edx, [rbp+var_16]"], [147, "mov rax, [rbp+var_28]"], [148, "mov esi, edx"], [149, "mov rdi, rax"], [150, "call sub_41A606"], [151, "jmp locret_41D6DB"], [152, "mov rax, [rbp+var_28]"], [153, "movzx eax, byte ptr [rax+0F6h]"], [154, "test al, al"], [155, "jz loc_41D615"], [156, "mov rax, [rbp+var_28]"], [157, "mov byte ptr [rax+0F6h], 0"], [158, "mov rax, [rbp+var_28]"], [159, "movzx eax, byte ptr [rax+0EFh]"], [160, "movzx eax, al"], [161, "mov r8d, eax"], [162, "mov ecx, 66Eh"], [163, "mov edx, offset aL2capC"], [164, "mov esi, offset aSUSendSFrameSr"], [165, "mov edi, 1"], [166, "mov eax, 0"], [167, "call sub_419626"], [168, "mov rax, [rbp+var_28]"], [169, "movzx eax, byte ptr [rax+0EFh]"], [170, "movzx edx, al"], [171, "mov rax, [rbp+var_28]"], [172, "movzx eax, byte ptr [rax+0F7h]"], [173, "movzx eax, al"], [174, "mov ecx, edx"], [175, "mov edx, eax"], [176, "mov esi, 0"], [177, "mov edi, 3"], [178, "call sub_419978"], [179, "mov [rbp+var_14], ax"], [180, "mov rax, [rbp+var_28]"], [181, "mov byte ptr [rax+0F7h], 0"], [182, "movzx edx, [rbp+var_14]"], [183, "mov rax, [rbp+var_28]"], [184, "mov esi, edx"], [185, "mov rdi, rax"], [186, "call sub_41A606"], [187, "jmp locret_41D6DB"], [188, "mov rax, [rbp+var_28]"], [189, "movzx eax, byte ptr [rax+0ECh]"], [190, "test al, al"], [191, "jz locret_41D6DB"], [192, "mov [rbp+var_4], 0"], [193, "jmp short loc_41D69E"], [194, "mov rax, [rbp+var_28]"], [195, "mov rcx, [rax+100h]"], [196, "mov eax, [rbp+var_4]"], [197, "movsxd rdx, eax"], [198, "mov rax, rdx"], [199, "add rax, rax"], [200, "add rax, rdx"], [201, "shl rax, 2"], [202, "add rax, rcx"], [203, "mov [rbp+var_10], rax"], [204, "mov rax, [rbp+var_10]"], [205, "movzx eax, byte ptr [rax+8]"], [206, "test al, al"], [207, "jz short loc_41D69A"], [208, "mov rax, [rbp+var_10]"], [209, "mov byte ptr [rax+8], 0"], [210, "mov rax, [rbp+var_28]"], [211, "movzx eax, byte ptr [rax+0F7h]"], [212, "mov [rbp+var_11], al"], [213, "mov rax, [rbp+var_28]"], [214, "mov byte ptr [rax+0F7h], 0"], [215, "movzx edx, [rbp+var_11]"], [216, "mov ecx, [rbp+var_4]"], [217, "mov rax, [rbp+var_28]"], [218, "mov esi, ecx"], [219, "mov rdi, rax"], [220, "call sub_419E3F"], [221, "jmp short loc_41D6B1"], [222, "add [rbp+var_4], 1"], [223, "mov rax, [rbp+var_28]"], [224, "movzx eax, byte ptr [rax+0E5h]"], [225, "movzx eax, al"], [226, "cmp [rbp+var_4], eax"], [227, "jl short loc_41D631"], [228, "mov rax, [rbp+var_28]"], [229, "movzx eax, byte ptr [rax+0E5h]"], [230, "movzx eax, al"], [231, "cmp [rbp+var_4], eax"], [232, "jnz short loc_41D6DA"], [233, "mov rax, [rbp+var_28]"], [234, "mov byte ptr [rax+0ECh], 0"], [235, "jmp short locret_41D6DB"], [236, "nop"], [237, "jmp short locret_41D6DB"], [238, "nop"], [239, "jmp short locret_41D6DB"], [240, "nop"], [241, "jmp short locret_41D6DB"], [242, "nop"], [243, "leave"], [244, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 3], [9, 8], [10, 9], [11, 10], [12, 3], [13, 12], [14, 13], [15, 14], [17, 16], [18, 17], [19, 3], [20, 19], [21, 20], [22, 21], [23, 3], [24, 23], [25, 3], [26, 25], [26, 24], [27, 26], [28, 3], [29, 24], [29, 28], [30, 29], [31, 27], [32, 30], [39, 3], [40, 24], [40, 39], [41, 40], [42, 3], [43, 24], [43, 42], [44, 43], [45, 41], [46, 44], [50, 49], [51, 3], [52, 51], [53, 50], [54, 3], [55, 53], [56, 54], [59, 3], [60, 59], [61, 60], [62, 61], [63, 3], [64, 63], [65, 3], [66, 64], [66, 65], [67, 66], [68, 67], [75, 3], [76, 64], [76, 75], [77, 76], [78, 77], [83, 82], [84, 83], [85, 3], [86, 84], [87, 85], [90, 3], [91, 90], [92, 91], [93, 92], [94, 3], [95, 94], [96, 3], [97, 95], [97, 96], [98, 97], [99, 98], [106, 3], [107, 95], [107, 106], [108, 107], [109, 108], [114, 113], [115, 114], [116, 3], [117, 115], [118, 116], [121, 3], [122, 121], [123, 122], [124, 123], [125, 3], [126, 125], [127, 3], [128, 126], [128, 127], [129, 128], [130, 129], [137, 3], [138, 137], [138, 126], [139, 138], [140, 139], [145, 144], [146, 145], [147, 3], [148, 146], [149, 147], [152, 3], [153, 152], [154, 153], [155, 154], [156, 3], [157, 156], [158, 3], [159, 157], [159, 158], [160, 159], [161, 160], [168, 3], [169, 157], [169, 168], [170, 169], [171, 3], [172, 157], [172, 171], [173, 172], [174, 170], [175, 173], [179, 178], [180, 3], [181, 180], [182, 179], [183, 3], [184, 182], [185, 183], [188, 3], [189, 188], [190, 189], [191, 190], [194, 3], [195, 194], [196, 192], [196, 222], [197, 196], [198, 197], [199, 198], [200, 197], [200, 199], [201, 200], [202, 195], [202, 201], [203, 202], [204, 203], [205, 204], [206, 205], [207, 206], [208, 203], [209, 208], [210, 3], [211, 210], [211, 209], [212, 211], [213, 3], [214, 213], [215, 212], [216, 192], [216, 222], [217, 3], [218, 216], [219, 217], [222, 192], [222, 222], [223, 3], [224, 223], [225, 224], [226, 225], [226, 192], [226, 222], [227, 226], [228, 3], [229, 228], [229, 214], [229, 209], [230, 229], [231, 230], [231, 222], [231, 192], [232, 231], [233, 3], [234, 233], [244, 230], [244, 150], [244, 88], [244, 17], [244, 186], [244, 5], [244, 190], [244, 119], [244, 9], [244, 57], [244, 233]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n 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_41D2DD", "query": "\n\n\n__int64 __fastcall sub_41D2DD(__int64 a1, __int64 a2)\n{\n__int64 result; // rax\nint v3; // er8\n__int64 v4; // r9\n__int64 v5; // rcx\nint v6; // er8\nint v7; // er9\n__int64 v8; // rcx\nint v9; // er8\nint v10; // er9\n__int64 v11; // rcx\nint v12; // er8\nint v13; // er9\n__int64 v14; // rcx\nint v15; // er8\nint v16; // er9\n__int64 v17; // rcx\nint v18; // er8\nint v19; // er9\nunsigned __int16 v20; // [rsp+14h] [rbp-1Ch]\nunsigned __int16 v21; // [rsp+16h] [rbp-1Ah]\nunsigned __int16 v22; // [rsp+18h] [rbp-18h]\nunsigned __int16 v23; // [rsp+1Ah] [rbp-16h]\nunsigned __int16 v24; // [rsp+1Ch] [rbp-14h]\nunsigned __int8 v25; // [rsp+1Fh] [rbp-11h]\n__int64 v26; // [rsp+20h] [rbp-10h]\nint i; // [rsp+2Ch] [rbp-4h]\n\nresult = *(unsigned int *)(a1 + 144);\nif ( (_DWORD)result == 3 )\n{\nresult = *(unsigned __int16 *)(a1 + 72);\nif ( (_WORD)result != 0xFFFF )\n{\nresult = sub_40D09A(*(_WORD *)(a1 + 72), a2);\nif ( (_DWORD)result )\n{\nif ( *(_BYTE *)(a1 + 242) )\n{\n*(_BYTE *)(a1 + 242) = 0;\nsub_419626(\n1,\n(__int64)\"%s.%u: Send S-Frame: RR %u, final %u\",\n(__int64)\"l2cap.c\",\n1617LL,\n*(unsigned __int8 *)(a1 + 240),\n*(unsigned __int8 *)(a1 + 247));\nv20 = sub_419978(0, 0, *(unsigned __int8 *)(a1 + 247), *(_BYTE *)(a1 + 240));\n*(_BYTE *)(a1 + 247) = 0;\nresult = sub_41A606(a1, v20, v20, v5, v6, v7);\n}\nelse if ( *(_BYTE *)(a1 + 243) )\n{\n*(_BYTE *)(a1 + 243) = 0;\nsub_419626(\n1,\n(__int64)\"%s.%u: Send S-Frame: RR %u with poll=1 \",\n(__int64)\"l2cap.c\",\n1625LL,\n*(unsigned __int8 *)(a1 + 240),\nv4);\nv21 = sub_419978(0, 1, 0, *(_BYTE *)(a1 + 240));\nresult = sub_41A606(a1, v21, v21, v8, v9, v10);\n}\nelse if ( *(_BYTE *)(a1 + 244) )\n{\n*(_BYTE *)(a1 + 244) = 0;\nsub_419626(\n1,\n(__int64)\"%s.%u: Send S-Frame: RNR %u\",\n(__int64)\"l2cap.c\",\n1632LL,\n*(unsigned __int8 *)(a1 + 240),\nv4);\nv22 = sub_419978(2, 0, 0, *(_BYTE *)(a1 + 240));\nresult = sub_41A606(a1, v22, v22, v11, v12, v13);\n}\nelse if ( *(_BYTE *)(a1 + 245) )\n{\n*(_BYTE *)(a1 + 245) = 0;\nsub_419626(\n1,\n(__int64)\"%s.%u: Send S-Frame: REJ %u\",\n(__int64)\"l2cap.c\",\n1639LL,\n*(unsigned __int8 *)(a1 + 240),\nv4);\nv23 = sub_419978(1, 0, 0, *(_BYTE *)(a1 + 240));\nresult = sub_41A606(a1, v23, v23, v14, v15, v16);\n}\nelse if ( *(_BYTE *)(a1 + 246) )\n{\n*(_BYTE *)(a1 + 246) = 0;\nsub_419626(\n1,\n(__int64)\"%s.%u: Send S-Frame: SREJ %u\",\n(__int64)\"l2cap.c\",\n1646LL,\n*(unsigned __int8 *)(a1 + 239),\nv4);\nv24 = sub_419978(3, 0, *(unsigned __int8 *)(a1 + 247), *(_BYTE *)(a1 + 239));\n*(_BYTE *)(a1 + 247) = 0;\nresult = sub_41A606(a1, v24, v24, v17, v18, v19);\n}\nelse\n{\nresult = *(unsigned __int8 *)(a1 + 236);\nif ( (_BYTE)result )\n{\nfor ( i = 0; i < *(unsigned __int8 *)(a1 + 229); ++i )\n{\nv26 = *(_QWORD *)(a1 + 256) + 12LL * i;\nif ( *(_BYTE *)(v26 + 8) )\n{\n*(_BYTE *)(v26 + 8) = 0;\nv25 = *(_BYTE *)(a1 + 247);\n*(_BYTE *)(a1 + 247) = 0;\nsub_419E3F(a1, (unsigned int)i, v25, (unsigned int)i, v3, v4);\nbreak;\n}\n}\nresult = *(unsigned __int8 *)(a1 + 229);\nif ( i == (_DWORD)result )\n{\nresult = a1;\n*(_BYTE *)(a1 + 236) = 0;\n}\n}\n}\n}\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,v20,v24,v25,v26,sub_41D2DD,sub_40D09A,sub_419626,sub_419978,sub_41A606,sub_419E3F,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'channel', 'v20': 'control', 'v24': 'control_3', 'v25': 'final', 'v26': 'tx_state', 'sub_41D2DD': 'l2cap_run_for_classic_channel_ertm', 'sub_40D09A': 'hci_can_send_acl_packet_now', 'sub_419626': 'hci_dump_log', 'sub_419978': 'l2cap_encanced_control_field_for_supevisor_frame', 'sub_41A606': 'l2cap_ertm_send_supervisor_frame', 'sub_419E3F': 'l2cap_ertm_send_information_frame'}"}
usage
c76fc8aec9c1245ffe53424a8c1b1bf7c0767d6f44ab19defac72ab8ad80aa6b
gl-inet
gli-pub
NA
void usage(struct pubsub_opts* opts, pubsub_opts_nameValue* name_values, const char* program_name) { printf("Eclipse Paho MQTT C %s\n", opts->publisher ? "publisher" : "subscriber"); printVersionInfo(name_values); printf("Usage: %s [topicname] [-t topic] [-c connection] [-h host] [-p port]\n" " [-q qos] [-i clientid] [-u username] [-P password] [-k keepalive_timeout]\n" , program_name); printf(" [-V MQTT-version] [--quiet] [--trace trace-level]\n"); if (opts->publisher) { printf(" [-r] [-n] [-m message] [-f filename]\n"); printf(" [--maxdatalen len] [--message-expiry seconds] [--user-property name value]\n"); } else printf(" [-R] [--no-delimiter]\n"); printf(" [--will-topic topic] [--will-payload message] [--will-qos qos] [--will-retain]\n"); printf(" [--cafile filename] [--capath dirname] [--cert filename] [--key filename]\n" " [--keypass string] [--ciphers string] [--insecure]"); printf( "\n\n -t (--topic) : MQTT topic to %s to\n" " -c (--connection) : connection string, overrides host/port e.g wss://hostname:port/ws. Use this option\n" " rather than host/port to connect with TLS and/or web sockets. No default.\n" " -h (--host) : host to connect to. Default is %s.\n" " -p (--port) : network port to connect to. Default is %s.\n" " -q (--qos) : MQTT QoS to %s with (0, 1 or 2). Default is %d.\n" " -V (--MQTTversion) : MQTT version (31, 311, or 5). Default is 311.\n" " --quiet : do not print error messages.\n" " --trace : print internal trace (\"error\", \"min\", \"max\" or \"protocol\").\n", opts->publisher ? "publish" : "subscribe", opts->host, opts->port, opts->publisher ? "publish" : "subscribe", opts->qos); if (opts->publisher) { printf(" -r (--retained) : use MQTT retain option. Default is off.\n"); printf(" -n (--null-message) : send 0-length message.\n"); printf(" -m (--message) : the payload to send.\n"); printf(" -f (--filename) : use the contents of the named file as the payload.\n"); } printf( " -i (--clientid) : MQTT client id. Default is %s.\n" " -u (--username) : MQTT username. No default.\n" " -P (--password) : MQTT password. No default.\n" " -k (--keepalive) : MQTT keepalive timeout value. Default is %d seconds.\n" " --delimiter : delimiter string. Default is \\n.\n", opts->clientid, opts->keepalive); if (opts->publisher) { printf(" --maxdatalen : maximum length of data to read when publishing strings (default is %d)\n", opts->maxdatalen); printf(" --message-expiry : MQTT 5 only. Sets the message expiry property in seconds.\n"); printf(" --user-property : MQTT 5 only. Sets a user property.\n"); } else { printf(" --no-delimiter : do not use a delimiter string between messages.\n"); printf(" -R (--no-retained) : do not print retained messages.\n"); } printf( " --will-topic : will topic on connect. No default.\n" " --will-payload : will message. If the will topic is set, but not payload, a null message will be set.\n" " --will-retain : set the retained flag on the will message. The default is off.\n" " --will-qos : the will message QoS. The default is 0.\n" ); printf( " --cafile : a filename for the TLS truststore.\n" " --capath : a directory name containing TLS trusted server certificates.\n" " --cert : a filename for the TLS keystore containing client certificates.\n" " --key : client private key file.\n" " --keypass : password for the client private key file.\n" " --ciphers : the list of cipher suites that the client will present to the server during\n" " the TLS handshake.\n" " --insecure : don't check that the server certificate common name matches the hostname.\n" " --psk : pre-shared-key in hexadecimal (no leading 0x) \n" " --psk-identity : client identity string for TLS-PSK mode.\n" ); printf("\nSee http://eclipse.org/paho for more information about the Eclipse Paho project.\n"); exit(EXIT_FAILURE); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40307A", "function_addr": 4206714, "binary_name": "c76fc8aec9c1245ffe53424a8c1b1bf7c0767d6f44ab19defac72ab8ad80aa6b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "mov rax, [rbp+var_8]"], [7, "mov eax, [rax]"], [8, "test eax, eax"], [9, "jz short loc_40309F"], [10, "mov eax, offset aPublisher"], [11, "jmp short loc_4030A4"], [12, "mov eax, offset aSubscriber"], [13, "mov rsi, rax"], [14, "mov edi, offset aEclipsePahoMqt"], [15, "mov eax, 0"], [16, "call _printf"], [17, "mov rax, [rbp+var_10]"], [18, "mov rdi, rax"], [19, "call sub_40300D"], [20, "mov rax, [rbp+var_18]"], [21, "mov rsi, rax"], [22, "mov edi, offset aUsageSTopicnam"], [23, "mov eax, 0"], [24, "call _printf"], [25, "mov edi, offset aVMqttVersionQu"], [26, "call _puts"], [27, "mov rax, [rbp+var_8]"], [28, "mov eax, [rax]"], [29, "test eax, eax"], [30, "jz short loc_403102"], [31, "mov edi, offset aRNMMessageFFil"], [32, "call _puts"], [33, "mov edi, offset aMaxdatalenLenM"], [34, "call _puts"], [35, "jmp short loc_40310C"], [36, "mov edi, offset aRNoDelimiter"], [37, "call _puts"], [38, "mov edi, offset aWillTopicTopic"], [39, "call _puts"], [40, "mov edi, offset aCafileFilename"], [41, "mov eax, 0"], [42, "call _printf"], [43, "mov rax, [rbp+var_8]"], [44, "mov esi, [rax+50h]"], [45, "mov rax, [rbp+var_8]"], [46, "mov eax, [rax]"], [47, "test eax, eax"], [48, "jz short loc_40313E"], [49, "mov r8d, offset aPublish"], [50, "jmp short loc_403144"], [51, "mov r8d, offset aSubscribe"], [52, "mov rax, [rbp+var_8]"], [53, "mov rdx, [rax+70h]"], [54, "mov rax, [rbp+var_8]"], [55, "mov rax, [rax+68h]"], [56, "mov rcx, [rbp+var_8]"], [57, "mov ecx, [rcx]"], [58, "test ecx, ecx"], [59, "jz short loc_403165"], [60, "mov edi, offset aPublish"], [61, "jmp short loc_40316A"], [62, "mov edi, offset aSubscribe"], [63, "mov r9d, esi"], [64, "mov rcx, rdx"], [65, "mov rdx, rax"], [66, "mov rsi, rdi"], [67, "mov edi, offset aTTopicMqttTopi"], [68, "mov eax, 0"], [69, "call _printf"], [70, "mov rax, [rbp+var_8]"], [71, "mov eax, [rax]"], [72, "test eax, eax"], [73, "jz short loc_4031B7"], [74, "mov edi, offset aRRetainedUseMq"], [75, "call _puts"], [76, "mov edi, offset aNNullMessageSe"], [77, "call _puts"], [78, "mov edi, offset aMMessageThePay"], [79, "call _puts"], [80, "mov edi, offset aFFilenameUseTh"], [81, "call _puts"], [82, "mov rax, [rbp+var_8]"], [83, "mov edx, [rax+80h]"], [84, "mov rax, [rbp+var_8]"], [85, "mov rax, [rax+48h]"], [86, "mov rsi, rax"], [87, "mov edi, offset aIClientidMqttC"], [88, "mov eax, 0"], [89, "call _printf"], [90, "mov rax, [rbp+var_8]"], [91, "mov eax, [rax]"], [92, "test eax, eax"], [93, "jz short loc_403213"], [94, "mov rax, [rbp+var_8]"], [95, "mov eax, [rax+18h]"], [96, "mov esi, eax"], [97, "mov edi, offset aMaxdatalenMaxi"], [98, "mov eax, 0"], [99, "call _printf"], [100, "mov edi, offset aMessageExpiryM"], [101, "call _puts"], [102, "mov edi, offset aUserPropertyMq"], [103, "call _puts"], [104, "jmp short loc_403227"], [105, "mov edi, offset aNoDelimiterDoN"], [106, "call _puts"], [107, "mov edi, offset aRNoRetainedDoN"], [108, "call _puts"], [109, "mov edi, offset aWillTopicWillT"], [110, "call _puts"], [111, "mov edi, offset aCafileAFilenam"], [112, "call _puts"], [113, "mov edi, offset aSeeHttpEclipse"], [114, "call _puts"], [115, "mov edi, 1"], [116, "call _exit"]], "data_dep": [[6, 3], [7, 6], [8, 7], [9, 8], [13, 10], [13, 12], [17, 4], [18, 17], [20, 5], [21, 20], [27, 3], [28, 27], [29, 28], [30, 29], [43, 3], [44, 43], [45, 3], [46, 45], [47, 46], [48, 47], [52, 3], [53, 52], [54, 3], [55, 54], [56, 3], [57, 56], [58, 57], [59, 58], [63, 44], [64, 53], [65, 55], [66, 60], [66, 62], [70, 3], [71, 70], [72, 71], [73, 72], [82, 3], [83, 82], [84, 3], [85, 84], [86, 85], [90, 3], [91, 90], [92, 91], [93, 92], [94, 3], [95, 94], [96, 95]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/c76fc8aec9c1245ffe53424a8c1b1bf7c0767d6f44ab19defac72ab8ad80aa6b_c76fc8aec9c1245ffe53424a8c1b1bf7c0767d6f44ab19defac72ab8ad80aa6b.jsonl.gz", "strip_func_name": "sub_40307A", "query": "\n\n\nvoid __fastcall __noreturn sub_40307A(__int64 a1, const char **a2, const char *a3)\n{\nconst char *v3; // rax\nconst char *v4; // r8\nconst char *v5; // rdi\n\nif ( *(_DWORD *)a1 )\nv3 = \"publisher\";\nelse\nv3 = \"subscriber\";\nprintf(\"Eclipse Paho MQTT C %s\\n\", v3);\nsub_40300D(a2);\nprintf(\n\"Usage: %s [topicname] [-t topic] [-c connection] [-h host] [-p port]\\n\"\n\" [-q qos] [-i clientid] [-u username] [-P password] [-k keepalive_timeout]\\n\",\na3);\nputs(\" [-V MQTT-version] [--quiet] [--trace trace-level]\");\nif ( *(_DWORD *)a1 )\n{\nputs(\" [-r] [-n] [-m message] [-f filename]\");\nputs(\" [--maxdatalen len] [--message-expiry seconds] [--user-property name value]\");\n}\nelse\n{\nputs(\" [-R] [--no-delimiter]\");\n}\nputs(\" [--will-topic topic] [--will-payload message] [--will-qos qos] [--will-retain]\");\nprintf(\n\" [--cafile filename] [--capath dirname] [--cert filename] [--key filename]\\n\"\n\" [--keypass string] [--ciphers string] [--insecure]\");\nif ( *(_DWORD *)a1 )\nv4 = \"publish\";\nelse\nv4 = \"subscribe\";\nif ( *(_DWORD *)a1 )\nv5 = \"publish\";\nelse\nv5 = \"subscribe\";\nprintf(\n\"\\n\"\n\"\\n\"\n\" -t (--topic) : MQTT topic to %s to\\n\"\n\" -c (--connection) : connection string, overrides host/port e.g wss://hostname:port/ws. Use this option\\n\"\n\" rather than host/port to connect with TLS and/or web sockets. No default.\\n\"\n\" -h (--host) : host to connect to. Default is %s.\\n\"\n\" -p (--port) : network port to connect to. Default is %s.\\n\"\n\" -q (--qos) : MQTT QoS to %s with (0, 1 or 2). Default is %d.\\n\"\n\" -V (--MQTTversion) : MQTT version (31, 311, or 5). Default is 311.\\n\"\n\" --quiet : do not print error messages.\\n\"\n\" --trace : print internal trace (\\\"error\\\", \\\"min\\\", \\\"max\\\" or \\\"protocol\\\").\\n\",\nv5,\n*(const char **)(a1 + 104),\n*(const char **)(a1 + 112),\nv4,\n*(unsigned int *)(a1 + 80));\nif ( *(_DWORD *)a1 )\n{\nputs(\" -r (--retained) : use MQTT retain option. Default is off.\");\nputs(\" -n (--null-message) : send 0-length message.\");\nputs(\" -m (--message) : the payload to send.\");\nputs(\" -f (--filename) : use the contents of the named file as the payload.\");\n}\nprintf(\n\" -i (--clientid) : MQTT client id. Default is %s.\\n\"\n\" -u (--username) : MQTT username. No default.\\n\"\n\" -P (--password) : MQTT password. No default.\\n\"\n\" -k (--keepalive) : MQTT keepalive timeout value. Default is %d seconds.\\n\"\n\" --delimiter : delimiter string. Default is \\\\n.\\n\",\n*(const char **)(a1 + 72),\n*(unsigned int *)(a1 + 128));\nif ( *(_DWORD *)a1 )\n{\nprintf(\n\" --maxdatalen : maximum length of data to read when publishing strings (default is %d)\\n\",\n*(unsigned int *)(a1 + 24));\nputs(\" --message-expiry : MQTT 5 only. Sets the message expiry property in seconds.\");\nputs(\" --user-property : MQTT 5 only. Sets a user property.\");\n}\nelse\n{\nputs(\" --no-delimiter : do not use a delimiter string between messages.\");\nputs(\" -R (--no-retained) : do not print retained messages.\");\n}\nputs(\n\" --will-topic : will topic on connect. No default.\\n\"\n\" --will-payload : will message. If the will topic is set, but not payload, a null message will be set.\\n\"\n\" --will-retain : set the retained flag on the will message. The default is off.\\n\"\n\" --will-qos : the will message QoS. The default is 0.\");\nputs(\n\" --cafile : a filename for the TLS truststore.\\n\"\n\" --capath : a directory name containing TLS trusted server certificates.\\n\"\n\" --cert : a filename for the TLS keystore containing client certificates.\\n\"\n\" --key : client private key file.\\n\"\n\" --keypass : password for the client private key file.\\n\"\n\" --ciphers : the list of cipher suites that the client will present to the server during\\n\"\n\" the TLS handshake.\\n\"\n\" --insecure : don't check that the server certificate common name matches the hostname.\\n\"\n\" --psk : pre-shared-key in hexadecimal (no leading 0x) \\n\"\n\" --psk-identity : client identity string for TLS-PSK mode.\");\nputs(\"\\nSee http://eclipse.org/paho for more information about the Eclipse Paho project.\");\nexit(1);\n}\n\n\n\nQ:[a3,a1,a2,sub_40307A,sub_40300D,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'program_name', 'a1': 'opts', 'a2': 'name_values', 'sub_40307A': 'usage', 'sub_40300D': 'printVersionInfo'}"}