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
|
---|---|---|---|---|---|---|---|---|
dostmt | df2108499522a80d76beef03a126f211d45b1835898ab5b155f04615dba54206 | zturtleman | mint-arena | NA | static void dostmt(int lab, Swtch swp, int lev) {
refinc *= 10.0;
t = gettok();
definelab(lab);
statement(lab, swp, lev);
definelab(lab + 1);
expect(WHILE);
expect('(');
definept(NULL);
walk(conditional(')'), lab, 0);
if (findlabel(lab + 2)->ref)
definelab(lab + 2);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42ADF2", "function_addr": 4369906, "binary_name": "df2108499522a80d76beef03a126f211d45b1835898ab5b155f04615dba54206.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_4], edi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_8], edx"], [6, "movss xmm1, cs:dword_443940"], [7, "movss xmm0, cs:dword_43A960"], [8, "mulss xmm0, xmm1"], [9, "movss cs:dword_443940, xmm0"], [10, "call sub_41CD10"], [11, "mov cs:dword_448110, eax"], [12, "mov eax, [rbp+var_4]"], [13, "mov edi, eax"], [14, "call sub_42A888"], [15, "mov edx, [rbp+var_8]"], [16, "mov rcx, [rbp+var_10]"], [17, "mov eax, [rbp+var_4]"], [18, "mov rsi, rcx"], [19, "mov edi, eax"], [20, "call sub_4289C7"], [21, "mov eax, [rbp+var_4]"], [22, "add eax, 1"], [23, "mov edi, eax"], [24, "call sub_42A888"], [25, "mov edi, 54h "], [26, "call sub_4136D5"], [27, "mov edi, 28h "], [28, "call sub_4136D5"], [29, "mov edi, 0"], [30, "call sub_428885"], [31, "mov edi, 29h "], [32, "call sub_4292DD"], [33, "mov rcx, rax"], [34, "mov eax, [rbp+var_4]"], [35, "mov edx, 0"], [36, "mov esi, eax"], [37, "mov rdi, rcx"], [38, "call sub_402B04"], [39, "mov eax, [rbp+var_4]"], [40, "add eax, 2"], [41, "mov edi, eax"], [42, "call sub_42BBE9"], [43, "movss xmm0, dword ptr [rax+40h]"], [44, "pxor xmm1, xmm1"], [45, "ucomiss xmm0, xmm1"], [46, "jp short loc_42AEB9"], [47, "pxor xmm1, xmm1"], [48, "comiss xmm0, xmm1"], [49, "jnz short loc_42AEB9"], [50, "jmp short loc_42AEC6"], [51, "mov eax, [rbp+var_4]"], [52, "add eax, 2"], [53, "mov edi, eax"], [54, "call sub_42A888"], [55, "nop"], [56, "leave"], [57, "retn"]], "data_dep": [[8, 6], [8, 7], [9, 8], [11, 10], [12, 3], [13, 12], [15, 5], [16, 4], [17, 3], [18, 16], [19, 17], [21, 3], [22, 21], [23, 22], [33, 32], [34, 3], [36, 34], [37, 33], [39, 3], [40, 39], [41, 40], [43, 42], [45, 43], [45, 44], [46, 40], [48, 45], [48, 47], [49, 40], [51, 3], [52, 51], [53, 52], [57, 42], [57, 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/df2108499522a80d76beef03a126f211d45b1835898ab5b155f04615dba54206_df2108499522a80d76beef03a126f211d45b1835898ab5b155f04615dba54206.jsonl.gz", "strip_func_name": "sub_42ADF2", "query": "\n\n\n__int64 __fastcall sub_42ADF2(const char *a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\nunsigned int v6; // xmm0_4\n__int64 v7; // r8\n__int64 v8; // r9\nint v9; // edx\nint v10; // ecx\nint v11; // er8\nint v12; // er9\nint v13; // edx\nint v14; // ecx\nint v15; // er8\nint v16; // er9\n__int64 v17; // rax\n__int64 result; // rax\nunsigned int v19; // [rsp+8h] [rbp-8h]\n\nv19 = a3;\n*(float *)&dword_443940 = 10.0 * *(float *)&dword_443940;\nv6 = dword_443940;\ndword_448110 = sub_41CD10(a1, a2, a3, a4, a5, a6);\nsub_42A888((unsigned int)a1);\nsub_4289C7((unsigned int)a1, a2, v19, a2, v7, v8);\nsub_42A888((_DWORD)a1 + 1);\nsub_4136D5(84LL, a2, v9, v10, v11, v12);\nsub_4136D5(40LL, a2, v13, v14, v15, v16);\nsub_428885(0LL, a2);\nv17 = sub_4292DD(0x29u, a2, COERCE_DOUBLE((unsigned __int64)v6));\nsub_402B04(v17, (unsigned int)a1, 0);\nresult = sub_42BBE9((unsigned int)((_DWORD)a1 + 2));\nif ( *(float *)(result + 64) != 0.0 )\nresult = sub_42A888((int)a1 + 2);\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v9,sub_42ADF2,sub_41CD10,sub_42A888,sub_4289C7,sub_4136D5,sub_428885,sub_4292DD,sub_402B04,sub_42BBE9,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'lev', 'a1': 'lab', 'a2': 'swp', 'v9': 'lev', 'sub_42ADF2': 'dostmt', 'sub_41CD10': 'gettok', 'sub_42A888': 'definelab', 'sub_4289C7': 'statement', 'sub_4136D5': 'expect', 'sub_428885': 'definept', 'sub_4292DD': 'conditional', 'sub_402B04': 'walk', 'sub_42BBE9': 'findlabel'}"} |
|
confout_audio | 6b67acc992c724fcce2159b155b9110fd46c721e66557f07f2d0b1d080b2928b | hecomi | node-julius | NA | void
confout_audio(FILE *strm)
{
fprintf(strm, " - Audio input\n");
#ifdef USE_MIC
fprintf(strm, " primary A/D-in driver : %s (%s)\n", AUDIO_API_NAME, AUDIO_API_DESC);
#else
fprintf(strm, " primary A/D-in driver : N/A\n");
#endif
fprintf(strm, " available drivers :");
#ifdef HAS_ALSA
fprintf(strm, " alsa");
#endif
#ifdef HAS_OSS
fprintf(strm, " oss");
#endif
#ifdef HAS_ESD
fprintf(strm, " esd");
#endif
#ifdef HAS_PULSEAUDIO
fprintf(strm, " pulseaudio");
#endif
#ifdef USE_NETAUDIO
fprintf(strm, " DATLink/NetAudio");
#endif
fprintf(strm, "\n");
fprintf(strm, " wavefile formats : %s\n", AUDIO_FORMAT_DESC);
fprintf(strm, " max. length of an input : %d samples, %d words\n", MAXSPEECHLEN, MAXSEQNUM);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40B58D", "function_addr": 4240781, "binary_name": "6b67acc992c724fcce2159b155b9110fd46c721e66557f07f2d0b1d080b2928b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+s], rdi"], [4, "mov rax, [rbp+s]"], [5, "mov rcx, rax"], [6, "mov edx, 0Fh"], [7, "mov esi, 1"], [8, "lea rdi, aAudioInput"], [9, "call _fwrite"], [10, "mov rax, [rbp+s]"], [11, "lea rcx, aAdvancedLinuxS"], [12, "lea rdx, aAlsa"], [13, "lea rsi, aPrimaryADInDri"], [14, "mov rdi, rax"], [15, "mov eax, 0"], [16, "call _fprintf"], [17, "mov rax, [rbp+s]"], [18, "mov rcx, rax"], [19, "mov edx, 1Dh"], [20, "mov esi, 1"], [21, "lea rdi, aAvailableDrive"], [22, "call _fwrite"], [23, "mov rax, [rbp+s]"], [24, "mov rcx, rax"], [25, "mov edx, 5"], [26, "mov esi, 1"], [27, "lea rdi, aAlsa_0"], [28, "call _fwrite"], [29, "mov rax, [rbp+s]"], [30, "mov rsi, rax"], [31, "mov edi, 0Ah"], [32, "call _fputc"], [33, "mov rax, [rbp+s]"], [34, "lea rdx, aVariousFormats"], [35, "lea rsi, aWavefileFormat"], [36, "mov rdi, rax"], [37, "mov eax, 0"], [38, "call _fprintf"], [39, "mov rax, [rbp+s]"], [40, "mov ecx, 96h"], [41, "mov edx, 4E200h"], [42, "lea rsi, aMaxLengthOfAnI"], [43, "mov rdi, rax"], [44, "mov eax, 0"], [45, "call _fprintf"], [46, "nop"], [47, "leave"], [48, "retn"]], "data_dep": [[4, 3], [5, 4], [10, 3], [11, 5], [12, 6], [13, 7], [14, 10], [17, 3], [18, 17], [21, 14], [23, 3], [24, 23], [27, 21], [29, 3], [30, 29], [33, 3], [34, 25], [35, 30], [36, 33], [39, 3], [42, 35], [43, 39], [48, 45]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/6b67acc992c724fcce2159b155b9110fd46c721e66557f07f2d0b1d080b2928b_6b67acc992c724fcce2159b155b9110fd46c721e66557f07f2d0b1d080b2928b.jsonl.gz", "strip_func_name": "sub_40B58D", "query": "\n\n\nint __fastcall sub_40B58D(FILE *a1)\n{\nfwrite(\" - Audio input\\n\", 1uLL, 0xFuLL, a1);\nfprintf(a1, \" primary A/D-in driver : %s (%s)\\n\", \"alsa\", \"Advanced Linux Sound Architecture\");\nfwrite(\" available drivers :\", 1uLL, 0x1DuLL, a1);\nfwrite(\" alsa\", 1uLL, 5uLL, a1);\nfputc(10, a1);\nfprintf(a1, \" wavefile formats : %s\\n\", \"various formats by libsndfile ver.1\");\nreturn fprintf(a1, \" max. length of an input : %d samples, %d words\\n\", 320000LL, 150LL);\n}\n\n\n\nQ:[a1,sub_40B58D,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'strm', 'sub_40B58D': 'confout_audio'}"} |
|
vb2_change_menu | cbde29e6b8731345dfc11224119de29bba8d1c61157c302bab41853f9d37c8c3 | Telecominfraproject | OpenCellular | NA | static void vb2_change_menu(VB_MENU new_current_menu,
int new_current_menu_idx)
{
prev_menu = current_menu;
current_menu = new_current_menu;
current_menu_idx = new_current_menu_idx;
/* Reconfigure disabled_idx_mask for the new menu */
disabled_idx_mask = 0;
/* Disable Network Boot Option */
if (current_menu == VB_MENU_DEV)
disabled_idx_mask |= 1 << VB_DEV_NETWORK;
/* Disable cancel option if enterprise disabled dev mode */
if (current_menu == VB_MENU_TO_NORM &&
disable_dev_boot == 1)
disabled_idx_mask |= 1 << VB_TO_NORM_CANCEL;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407802", "function_addr": 4225026, "binary_name": "cbde29e6b8731345dfc11224119de29bba8d1c61157c302bab41853f9d37c8c3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_4], edi"], [3, "mov [rbp+var_8], esi"], [4, "mov eax, cs:dword_431788"], [5, "mov cs:dword_43178C, eax"], [6, "mov eax, [rbp+var_4]"], [7, "mov cs:dword_431788, eax"], [8, "mov eax, [rbp+var_8]"], [9, "mov cs:dword_431790, eax"], [10, "mov cs:dword_431794, 0"], [11, "mov eax, cs:dword_431788"], [12, "cmp eax, 1"], [13, "jnz short loc_40784E"], [14, "mov eax, cs:dword_431794"], [15, "or eax, 1"], [16, "mov cs:dword_431794, eax"], [17, "mov eax, cs:dword_431788"], [18, "cmp eax, 2"], [19, "jnz short loc_407873"], [20, "mov eax, cs:dword_4317A0"], [21, "cmp eax, 1"], [22, "jnz short loc_407873"], [23, "mov eax, cs:dword_431794"], [24, "or eax, 2"], [25, "mov cs:dword_431794, eax"], [26, "nop"], [27, "pop rbp"], [28, "retn"]], "data_dep": [[5, 4], [6, 2], [7, 6], [8, 3], [9, 8], [11, 7], [12, 11], [13, 12], [14, 10], [15, 14], [16, 15], [17, 7], [18, 17], [19, 18], [21, 20], [22, 21], [23, 10], [23, 16], [24, 23], [25, 24], [27, 0], [28, 24], [28, 17], [28, 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/cbde29e6b8731345dfc11224119de29bba8d1c61157c302bab41853f9d37c8c3_cbde29e6b8731345dfc11224119de29bba8d1c61157c302bab41853f9d37c8c3.jsonl.gz", "strip_func_name": "sub_407802", "query": "\n\n\n__int64 __fastcall sub_407802(int a1, int a2)\n{\n__int64 result; // rax\n\ndword_43178C = dword_431788;\ndword_431788 = a1;\ndword_431790 = a2;\ndword_431794 = 0;\nif ( a1 == 1 )\ndword_431794 |= 1u;\nresult = (unsigned int)dword_431788;\nif ( dword_431788 == 2 )\n{\nresult = (unsigned int)dword_4317A0;\nif ( dword_4317A0 == 1 )\n{\nresult = dword_431794 | 2u;\ndword_431794 |= 2u;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_407802,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'new_current_menu', 'a2': 'new_current_menu_idx', 'sub_407802': 'vb2_change_menu'}"} |
|
xdl_recs_copy_0 | 3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7 | msysgit | msysgit | NA | static int xdl_recs_copy_0(int use_orig, xdfenv_t *xe, int i, int count, int add_nl, char *dest)
{
xrecord_t **recs;
int size = 0;
recs = (use_orig ? xe->xdf1.recs : xe->xdf2.recs) + i;
if (count < 1)
return 0;
for (i = 0; i < count; size += recs[i++]->size)
if (dest)
memcpy(dest + size, recs[i]->ptr, recs[i]->size);
if (add_nl) {
i = recs[count - 1]->size;
if (i == 0 || recs[count - 1]->ptr[i - 1] != '\n') {
if (dest)
dest[size] = '\n';
size++;
}
}
return size;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4C47B0", "function_addr": 4999088, "binary_name": "3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7.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 [rbp+var_28], r8d"], [8, "mov [rbp+var_30], r9"], [9, "mov [rbp+var_4], 0"], [10, "cmp [rbp+var_14], 0"], [11, "jz short loc_4C47E4"], [12, "mov rax, [rbp+var_20]"], [13, "mov rax, [rax+60h]"], [14, "jmp short loc_4C47EF"], [15, "mov rax, [rbp+var_20]"], [16, "mov rax, [rax+0E8h]"], [17, "mov edx, [rbp+var_18]"], [18, "movsxd rdx, edx"], [19, "shl rdx, 3"], [20, "add rax, rdx"], [21, "mov [rbp+var_10], rax"], [22, "cmp [rbp+var_24], 0"], [23, "jg short loc_4C4810"], [24, "mov eax, 0"], [25, "jmp locret_4C4924"], [26, "mov [rbp+var_18], 0"], [27, "jmp loc_4C48A2"], [28, "cmp [rbp+var_30], 0"], [29, "jz short loc_4C4877"], [30, "mov eax, [rbp+var_18]"], [31, "cdqe"], [32, "lea rdx, ds:0[rax*8]"], [33, "mov rax, [rbp+var_10]"], [34, "add rax, rdx"], [35, "mov rax, [rax]"], [36, "mov rax, [rax+10h]"], [37, "mov rsi, rax"], [38, "mov eax, [rbp+var_18]"], [39, "cdqe"], [40, "lea rdx, ds:0[rax*8]"], [41, "mov rax, [rbp+var_10]"], [42, "add rax, rdx"], [43, "mov rax, [rax]"], [44, "mov rax, [rax+8]"], [45, "mov edx, [rbp+var_4]"], [46, "movsxd rcx, edx"], [47, "mov rdx, [rbp+var_30]"], [48, "add rcx, rdx"], [49, "mov rdx, rsi"], [50, "mov rsi, rax"], [51, "mov rdi, rcx"], [52, "call _memcpy"], [53, "mov eax, [rbp+var_18]"], [54, "lea edx, [rax+1]"], [55, "mov [rbp+var_18], edx"], [56, "cdqe"], [57, "lea rdx, ds:0[rax*8]"], [58, "mov rax, [rbp+var_10]"], [59, "add rax, rdx"], [60, "mov rax, [rax]"], [61, "mov rax, [rax+10h]"], [62, "mov edx, eax"], [63, "mov eax, [rbp+var_4]"], [64, "add eax, edx"], [65, "mov [rbp+var_4], eax"], [66, "mov eax, [rbp+var_18]"], [67, "cmp eax, [rbp+var_24]"], [68, "jl loc_4C481C"], [69, "cmp [rbp+var_28], 0"], [70, "jz short loc_4C4921"], [71, "mov eax, [rbp+var_24]"], [72, "cdqe"], [73, "shl rax, 3"], [74, "lea rdx, [rax-8]"], [75, "mov rax, [rbp+var_10]"], [76, "add rax, rdx"], [77, "mov rax, [rax]"], [78, "mov rax, [rax+10h]"], [79, "mov [rbp+var_18], eax"], [80, "cmp [rbp+var_18], 0"], [81, "jz short loc_4C4906"], [82, "mov eax, [rbp+var_24]"], [83, "cdqe"], [84, "shl rax, 3"], [85, "lea rdx, [rax-8]"], [86, "mov rax, [rbp+var_10]"], [87, "add rax, rdx"], [88, "mov rax, [rax]"], [89, "mov rdx, [rax+8]"], [90, "mov eax, [rbp+var_18]"], [91, "cdqe"], [92, "sub rax, 1"], [93, "add rax, rdx"], [94, "movzx eax, byte ptr [rax]"], [95, "cmp al, 0Ah"], [96, "jz short loc_4C4921"], [97, "cmp [rbp+var_30], 0"], [98, "jz short loc_4C491D"], [99, "mov eax, [rbp+var_4]"], [100, "movsxd rdx, eax"], [101, "mov rax, [rbp+var_30]"], [102, "add rax, rdx"], [103, "mov byte ptr [rax], 0Ah"], [104, "add [rbp+var_4], 1"], [105, "mov eax, [rbp+var_4]"], [106, "leave"], [107, "retn"]], "data_dep": [[10, 3], [11, 10], [12, 4], [13, 12], [15, 4], [16, 15], [17, 5], [18, 17], [19, 18], [20, 19], [20, 16], [20, 13], [21, 20], [22, 6], [23, 22], [28, 8], [29, 28], [30, 55], [30, 26], [32, 62], [32, 19], [33, 21], [34, 32], [34, 33], [35, 34], [36, 35], [37, 36], [38, 55], [38, 26], [40, 32], [41, 21], [42, 41], [42, 40], [43, 42], [44, 43], [45, 65], [45, 9], [46, 45], [47, 8], [48, 47], [48, 46], [49, 37], [50, 44], [51, 48], [53, 55], [53, 26], [54, 49], [54, 19], [54, 53], [54, 62], [55, 54], [57, 54], [58, 21], [59, 57], [59, 58], [60, 59], [61, 60], [62, 61], [63, 65], [63, 9], [64, 62], [64, 63], [65, 64], [66, 55], [66, 26], [67, 6], [67, 66], [68, 67], [69, 7], [70, 69], [71, 6], [73, 71], [74, 73], [74, 19], [74, 62], [75, 21], [76, 74], [76, 75], [77, 76], [78, 77], [79, 78], [80, 79], [81, 80], [82, 6], [84, 82], [85, 84], [85, 74], [86, 21], [87, 86], [87, 85], [88, 87], [89, 88], [90, 79], [92, 90], [93, 92], [93, 89], [94, 93], [95, 94], [96, 95], [97, 8], [98, 97], [99, 65], [99, 9], [100, 99], [101, 8], [102, 100], [102, 101], [103, 102], [104, 9], [104, 65], [105, 65], [105, 104], [105, 9], [107, 24], [107, 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/3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7_3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7.jsonl.gz", "strip_func_name": "sub_4C47B0", "query": "\n\n\n__int64 __fastcall sub_4C47B0(int a1, __int64 a2, int a3, int a4, int a5, __int64 a6)\n{\n__int64 v6; // rax\nint v8; // eax\nint i; // [rsp+18h] [rbp-18h]\nint v13; // [rsp+18h] [rbp-18h]\n__int64 v14; // [rsp+20h] [rbp-10h]\nunsigned int v15; // [rsp+2Ch] [rbp-4h]\n\nv15 = 0;\nif ( a1 )\nv6 = *(_QWORD *)(a2 + 96);\nelse\nv6 = *(_QWORD *)(a2 + 232);\nv14 = 8LL * a3 + v6;\nif ( a4 <= 0 )\nreturn 0LL;\nfor ( i = 0; i < a4; ++i )\n{\nif ( a6 )\nmemcpy(\n(void *)(a6 + (int)v15),\n*(const void **)(*(_QWORD *)(8LL * i + v14) + 8LL),\n*(_QWORD *)(*(_QWORD *)(8LL * i + v14) + 16LL));\nv8 = i;\nv15 += *(_QWORD *)(*(_QWORD *)(8LL * v8 + v14) + 16LL);\n}\nif ( a5 )\n{\nv13 = *(_QWORD *)(*(_QWORD *)(8LL * a4 - 8 + v14) + 16LL);\nif ( !v13 || *(_BYTE *)(*(_QWORD *)(*(_QWORD *)(8LL * a4 - 8 + v14) + 8LL) + v13 - 1LL) != 10 )\n{\nif ( a6 )\n*(_BYTE *)((int)v15 + a6) = 10;\n++v15;\n}\n}\nreturn v15;\n}\n\n\n\nQ:[a4,a1,a2,a5,a6,i,v14,v15,sub_4C47B0,]\nAssistant: ", "hints": "[]", "response": "{'a4': 'count', 'a1': 'use_orig', 'a2': 'xe', 'a5': 'add_nl', 'a6': 'dest', 'i': 'ib', 'v14': 'recs', 'v15': 'size', 'sub_4C47B0': 'xdl_recs_copy_0'}"} |
|
ADD_A_R | 31edd0f0ae447e7af5eb88e621b90258cba9798d06caf6830842b9d85879f0ba | jkbenaim | cboy | NA | void ADD_A_R(void)
{
// opcode 80-85,87
// 10000rrr
int regNumber = ((int)(state.op) & 0x07);
uint8_t *reg = cpu_getReg(regNumber);
int old_a = (int)(state.a);
int new_a = (int)(state.a) + (int)(*reg);
state.a = new_a;
// flag Z
if (state.a == 0)
SET_Z();
else
RESET_Z();
// flag N
RESET_N();
// flag H
if (((old_a & 0x0F) + (*reg & 0x0F)) & 0x10)
SET_H();
else
RESET_H();
// flag C
if (new_a > 0xFF)
SET_C();
else
RESET_C();
state.pc++;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407A27", "function_addr": 4225575, "binary_name": "31edd0f0ae447e7af5eb88e621b90258cba9798d06caf6830842b9d85879f0ba.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "movzx eax, cs:byte_4365A8"], [4, "movzx eax, al"], [5, "and eax, 7"], [6, "mov [rbp+var_4], eax"], [7, "mov eax, [rbp+var_4]"], [8, "mov edi, eax"], [9, "call sub_406C7F"], [10, "mov [rbp+var_10], rax"], [11, "movzx eax, cs:byte_43654A"], [12, "movzx eax, al"], [13, "mov [rbp+var_14], eax"], [14, "movzx eax, cs:byte_43654A"], [15, "movzx edx, al"], [16, "mov rax, [rbp+var_10]"], [17, "movzx eax, byte ptr [rax]"], [18, "movzx eax, al"], [19, "add eax, edx"], [20, "mov [rbp+var_18], eax"], [21, "mov eax, [rbp+var_18]"], [22, "mov cs:byte_43654A, al"], [23, "movzx eax, cs:byte_43654A"], [24, "test al, al"], [25, "jnz short loc_407A90"], [26, "mov cs:byte_436551, 0"], [27, "jmp short loc_407A97"], [28, "mov cs:byte_436551, 1"], [29, "mov cs:byte_436550, 0"], [30, "mov eax, [rbp+var_14]"], [31, "and eax, 0Fh"], [32, "mov edx, eax"], [33, "mov rax, [rbp+var_10]"], [34, "movzx eax, byte ptr [rax]"], [35, "movzx eax, al"], [36, "and eax, 0Fh"], [37, "add eax, edx"], [38, "and eax, 10h"], [39, "test eax, eax"], [40, "jz short loc_407AD2"], [41, "mov cs:byte_43654F, 0FFh"], [42, "movzx eax, cs:byte_43654F"], [43, "mov cs:byte_43654E, al"], [44, "jmp short loc_407AE6"], [45, "mov cs:byte_43654F, 0"], [46, "movzx eax, cs:byte_43654F"], [47, "mov cs:byte_43654E, al"], [48, "cmp [rbp+var_18], 0FFh"], [49, "jle short loc_407AFA"], [50, "mov cs:word_43654C, 100h"], [51, "jmp short loc_407B03"], [52, "mov cs:word_43654C, 0"], [53, "movzx eax, cs:word_436540"], [54, "add eax, 1"], [55, "mov cs:word_436540, ax"], [56, "nop"], [57, "leave"], [58, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [10, 9], [12, 11], [13, 12], [15, 14], [16, 10], [17, 16], [18, 17], [19, 18], [19, 15], [20, 19], [21, 20], [22, 21], [23, 22], [24, 23], [25, 24], [30, 13], [31, 30], [32, 31], [33, 10], [34, 33], [35, 34], [36, 35], [37, 36], [37, 32], [38, 37], [39, 38], [40, 39], [42, 41], [43, 42], [46, 45], [47, 46], [48, 20], [49, 48], [54, 53], [55, 54], [58, 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/31edd0f0ae447e7af5eb88e621b90258cba9798d06caf6830842b9d85879f0ba_31edd0f0ae447e7af5eb88e621b90258cba9798d06caf6830842b9d85879f0ba.jsonl.gz", "strip_func_name": "sub_407A27", "query": "\n\n\n__int64 sub_407A27()\n{\nint v1; // [rsp+8h] [rbp-18h]\nchar v2; // [rsp+Ch] [rbp-14h]\n__int16 *v3; // [rsp+10h] [rbp-10h]\n\nv3 = sub_406C7F(byte_4365A8 & 7);\nv2 = byte_43654A;\nv1 = (unsigned __int8)byte_43654A + *(unsigned __int8 *)v3;\nbyte_43654A = v1;\nbyte_436551 = (_BYTE)v1 != 0;\nbyte_436550 = 0;\nif ( (((v2 & 0xF) + (*(_BYTE *)v3 & 0xF)) & 0x10) != 0 )\n{\nbyte_43654F = -1;\nbyte_43654E = -1;\n}\nelse\n{\nbyte_43654F = 0;\nbyte_43654E = 0;\n}\nif ( v1 <= 255 )\nword_43654C = 0;\nelse\nword_43654C = 256;\nreturn (unsigned int)(unsigned __int16)word_436540++ + 1;\n}\n\n\n\nQ:[v1,v2,v3,sub_407A27,sub_406C7F,]\nAssistant: ", "hints": "[]", "response": "{'v1': 'new_a', 'v2': 'old_a', 'v3': 'reg', 'sub_407A27': 'ADD_A_R', 'sub_406C7F': 'cpu_getReg'}"} |
|
sim_open_logfile | bf7ae1a4450b359f92e96f59068a71bc49375889282b3e96663c3c09631e7838 | open-simh | simh | NA | t_stat sim_open_logfile (const char *filename, t_bool binary, FILE **pf, FILEREF **pref)
{
char gbuf[CBUFSIZE];
const char *tptr;
if ((filename == NULL) || (*filename == 0)) /* too few arguments? */
return SCPE_2FARG;
tptr = get_glyph (filename, gbuf, 0);
if (*tptr != 0) /* now eol? */
return SCPE_2MARG;
sim_close_logfile (pref);
*pf = NULL;
if (strcmp (gbuf, "LOG") == 0) { /* output to log? */
if (sim_log == NULL) /* any log? */
return SCPE_ARG;
*pf = sim_log;
*pref = sim_log_ref;
if (*pref)
++(*pref)->refcount;
}
else if (strcmp (gbuf, "DEBUG") == 0) { /* output to debug? */
if (sim_deb == NULL) /* any debug? */
return SCPE_ARG;
*pf = sim_deb;
*pref = sim_deb_ref;
if (*pref)
++(*pref)->refcount;
}
else if (strcmp (gbuf, "STDOUT") == 0) { /* output to stdout? */
*pf = stdout;
*pref = NULL;
}
else if (strcmp (gbuf, "STDERR") == 0) { /* output to stderr? */
*pf = stderr;
*pref = NULL;
}
else {
*pref = (FILEREF *)calloc (1, sizeof(**pref));
if (!*pref)
return SCPE_MEM;
get_glyph_nc (filename, gbuf, 0); /* reparse */
strlcpy ((*pref)->name, gbuf, sizeof((*pref)->name));
if (sim_switches & SWMASK ('N')) /* if a new log file is requested */
*pf = sim_fopen (gbuf, (binary ? "w+b" : "w+"));/* then open an empty file */
else /* otherwise */
*pf = sim_fopen (gbuf, (binary ? "a+b" : "a+"));/* append to an existing file */
if (*pf == NULL) { /* error? */
free (*pref);
*pref = NULL;
return SCPE_OPENERR;
}
setvbuf (*pf, NULL, _IOFBF, 65536);
(*pref)->file = *pf;
(*pref)->refcount = 1; /* need close */
}
return SCPE_OK;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_44DC20", "function_addr": 4512800, "binary_name": "bf7ae1a4450b359f92e96f59068a71bc49375889282b3e96663c3c09631e7838.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10B0h"], [3, "mov [rbp+var_1098], rdi"], [4, "mov [rbp+var_109C], esi"], [5, "mov [rbp+var_10A8], rdx"], [6, "mov [rbp+var_10B0], rcx"], [7, "cmp [rbp+var_1098], 0"], [8, "jz short loc_44DC5E"], [9, "mov rax, [rbp+var_1098]"], [10, "movzx eax, byte ptr [rax]"], [11, "test al, al"], [12, "jnz short loc_44DC68"], [13, "mov eax, 5Eh "], [14, "jmp locret_44DFAB"], [15, "lea rcx, [rbp+s1]"], [16, "mov rax, [rbp+var_1098]"], [17, "mov edx, 0"], [18, "mov rsi, rcx"], [19, "mov rdi, rax"], [20, "call sub_434CA9"], [21, "mov [rbp+var_8], rax"], [22, "mov rax, [rbp+var_8]"], [23, "movzx eax, byte ptr [rax]"], [24, "test al, al"], [25, "jz short loc_44DC9F"], [26, "mov eax, 5Fh "], [27, "jmp locret_44DFAB"], [28, "mov rax, [rbp+var_10B0]"], [29, "mov rdi, rax"], [30, "call sub_44DFAD"], [31, "mov rax, [rbp+var_10A8]"], [32, "mov qword ptr [rax], 0"], [33, "lea rax, [rbp+s1]"], [34, "mov esi, offset off_4BAF7B"], [35, "mov rdi, rax"], [36, "call _strcmp"], [37, "test eax, eax"], [38, "jnz short loc_44DD3D"], [39, "mov rax, cs:qword_542510"], [40, "test rax, rax"], [41, "jnz short loc_44DCEA"], [42, "mov eax, 48h "], [43, "jmp locret_44DFAB"], [44, "mov rdx, cs:qword_542510"], [45, "mov rax, [rbp+var_10A8]"], [46, "mov [rax], rdx"], [47, "mov rdx, cs:qword_542518"], [48, "mov rax, [rbp+var_10B0]"], [49, "mov [rax], rdx"], [50, "mov rax, [rbp+var_10B0]"], [51, "mov rax, [rax]"], [52, "test rax, rax"], [53, "jz loc_44DFA6"], [54, "mov rax, [rbp+var_10B0]"], [55, "mov rax, [rax]"], [56, "mov edx, [rax+1088h]"], [57, "add edx, 1"], [58, "mov [rax+1088h], edx"], [59, "jmp loc_44DFA6"], [60, "lea rax, [rbp+s1]"], [61, "mov esi, offset aDebug_0"], [62, "mov rdi, rax"], [63, "call _strcmp"], [64, "test eax, eax"], [65, "jnz short loc_44DDBE"], [66, "mov rax, cs:qword_542520"], [67, "test rax, rax"], [68, "jnz short loc_44DD6B"], [69, "mov eax, 48h "], [70, "jmp locret_44DFAB"], [71, "mov rdx, cs:qword_542520"], [72, "mov rax, [rbp+var_10A8]"], [73, "mov [rax], rdx"], [74, "mov rdx, cs:qword_542528"], [75, "mov rax, [rbp+var_10B0]"], [76, "mov [rax], rdx"], [77, "mov rax, [rbp+var_10B0]"], [78, "mov rax, [rax]"], [79, "test rax, rax"], [80, "jz loc_44DFA6"], [81, "mov rax, [rbp+var_10B0]"], [82, "mov rax, [rax]"], [83, "mov edx, [rax+1088h]"], [84, "add edx, 1"], [85, "mov [rax+1088h], edx"], [86, "jmp loc_44DFA6"], [87, "lea rax, [rbp+s1]"], [88, "mov esi, offset aStdout_1"], [89, "mov rdi, rax"], [90, "call _strcmp"], [91, "test eax, eax"], [92, "jnz short loc_44DDFA"], [93, "mov rdx, cs:stdout"], [94, "mov rax, [rbp+var_10A8]"], [95, "mov [rax], rdx"], [96, "mov rax, [rbp+var_10B0]"], [97, "mov qword ptr [rax], 0"], [98, "jmp loc_44DFA6"], [99, "lea rax, [rbp+s1]"], [100, "mov esi, offset aStderr_0"], [101, "mov rdi, rax"], [102, "call _strcmp"], [103, "test eax, eax"], [104, "jnz short loc_44DE36"], [105, "mov rdx, cs:stderr"], [106, "mov rax, [rbp+var_10A8]"], [107, "mov [rax], rdx"], [108, "mov rax, [rbp+var_10B0]"], [109, "mov qword ptr [rax], 0"], [110, "jmp loc_44DFA6"], [111, "mov esi, 1090h"], [112, "mov edi, 1"], [113, "call _calloc"], [114, "mov rdx, rax"], [115, "mov rax, [rbp+var_10B0]"], [116, "mov [rax], rdx"], [117, "mov rax, [rbp+var_10B0]"], [118, "mov rax, [rax]"], [119, "test rax, rax"], [120, "jnz short loc_44DE6B"], [121, "mov eax, 47h "], [122, "jmp locret_44DFAB"], [123, "lea rcx, [rbp+s1]"], [124, "mov rax, [rbp+var_1098]"], [125, "mov edx, 0"], [126, "mov rsi, rcx"], [127, "mov rdi, rax"], [128, "call sub_434CE5"], [129, "mov rax, [rbp+var_10B0]"], [130, "mov rax, [rax]"], [131, "mov rcx, rax"], [132, "lea rax, [rbp+s1]"], [133, "mov edx, 1080h"], [134, "mov rsi, rax"], [135, "mov rdi, rcx"], [136, "call sub_451E60"], [137, "mov eax, cs:dword_5422D4"], [138, "and eax, 2000h"], [139, "test eax, eax"], [140, "jz short loc_44DEEF"], [141, "cmp [rbp+var_109C], 0"], [142, "jz short loc_44DECC"], [143, "mov edx, offset aWB"], [144, "jmp short loc_44DED1"], [145, "mov edx, offset aW_0"], [146, "lea rax, [rbp+s1]"], [147, "mov rsi, rdx"], [148, "mov rdi, rax"], [149, "call sub_45044B"], [150, "mov rdx, [rbp+var_10A8]"], [151, "mov [rdx], rax"], [152, "jmp short loc_44DF20"], [153, "cmp [rbp+var_109C], 0"], [154, "jz short loc_44DEFF"], [155, "mov edx, offset aAB"], [156, "jmp short loc_44DF04"], [157, "mov edx, offset aA_0"], [158, "lea rax, [rbp+s1]"], [159, "mov rsi, rdx"], [160, "mov rdi, rax"], [161, "call sub_45044B"], [162, "mov rdx, [rbp+var_10A8]"], [163, "mov [rdx], rax"], [164, "mov rax, [rbp+var_10A8]"], [165, "mov rax, [rax]"], [166, "test rax, rax"], [167, "jnz short loc_44DF56"], [168, "mov rax, [rbp+var_10B0]"], [169, "mov rax, [rax]"], [170, "mov rdi, rax"], [171, "call _free"], [172, "mov rax, [rbp+var_10B0]"], [173, "mov qword ptr [rax], 0"], [174, "mov eax, 46h "], [175, "jmp short locret_44DFAB"], [176, "mov rax, [rbp+var_10A8]"], [177, "mov rax, [rax]"], [178, "mov ecx, 10000h"], [179, "mov edx, 0"], [180, "mov esi, 0"], [181, "mov rdi, rax"], [182, "call _setvbuf"], [183, "mov rax, [rbp+var_10B0]"], [184, "mov rax, [rax]"], [185, "mov rdx, [rbp+var_10A8]"], [186, "mov rdx, [rdx]"], [187, "mov [rax+1080h], rdx"], [188, "mov rax, [rbp+var_10B0]"], [189, "mov rax, [rax]"], [190, "mov dword ptr [rax+1088h], 1"], [191, "mov eax, 0"], [192, "leave"], [193, "retn"]], "data_dep": [[7, 3], [8, 7], [9, 3], [10, 9], [11, 10], [12, 11], [16, 3], [18, 15], [19, 16], [21, 20], [22, 21], [23, 22], [24, 23], [25, 24], [28, 6], [29, 28], [31, 5], [32, 31], [33, 31], [35, 33], [37, 36], [38, 37], [40, 39], [41, 40], [45, 5], [46, 45], [46, 44], [48, 6], [49, 48], [49, 47], [50, 6], [51, 50], [51, 49], [52, 51], [53, 52], [54, 6], [55, 54], [55, 49], [55, 58], [55, 46], [55, 32], [56, 32], [56, 46], [56, 55], [56, 49], [56, 58], [57, 56], [58, 55], [58, 57], [60, 37], [62, 60], [64, 63], [65, 64], [67, 66], [68, 67], [72, 5], [73, 71], [73, 72], [75, 6], [76, 74], [76, 75], [77, 6], [78, 77], [78, 76], [79, 78], [80, 79], [81, 6], [82, 81], [82, 76], [82, 85], [82, 32], [82, 73], [83, 76], [83, 85], [83, 32], [83, 73], [83, 82], [84, 83], [85, 82], [85, 84], [87, 64], [89, 87], [91, 90], [92, 91], [94, 5], [95, 93], [95, 94], [96, 6], [97, 96], [99, 91], [101, 99], [103, 102], [104, 103], [106, 5], [107, 106], [107, 105], [108, 6], [109, 108], [114, 113], [115, 6], [116, 115], [116, 114], [117, 6], [118, 117], [118, 116], [119, 118], [120, 119], [123, 15], [124, 3], [126, 123], [127, 124], [129, 6], [130, 32], [130, 116], [130, 129], [131, 130], [132, 130], [134, 132], [135, 131], [138, 137], [139, 138], [140, 139], [141, 4], [142, 141], [146, 139], [147, 143], [147, 145], [148, 146], [150, 5], [151, 150], [151, 149], [153, 4], [154, 153], [158, 139], [159, 155], [159, 157], [160, 158], [162, 5], [163, 161], [163, 162], [164, 5], [165, 163], [165, 32], [165, 151], [165, 164], [165, 116], [166, 165], [167, 166], [168, 6], [169, 163], [169, 32], [169, 151], [169, 116], [169, 173], [169, 168], [170, 169], [172, 6], [173, 172], [176, 5], [177, 190], [177, 176], [177, 32], [177, 151], [177, 187], [177, 116], [177, 163], [181, 177], [183, 6], [184, 116], [184, 163], [184, 190], [184, 183], [184, 32], [184, 151], [184, 187], [185, 5], [186, 163], [186, 190], [186, 185], [186, 32], [186, 151], [186, 187], [186, 116], [187, 184], [187, 186], [188, 6], [189, 188], [189, 187], [189, 116], [190, 189], [193, 13], [193, 42], [193, 191], [193, 26], [193, 69], [193, 174], [193, 121]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/bf7ae1a4450b359f92e96f59068a71bc49375889282b3e96663c3c09631e7838_bf7ae1a4450b359f92e96f59068a71bc49375889282b3e96663c3c09631e7838.jsonl.gz", "strip_func_name": "sub_44DC20", "query": "\n\n\n__int64 __fastcall sub_44DC20(char *a1, int a2, FILE **a3, void **a4)\n{\nconst char *v5; // rdx\nchar s1[4232]; // [rsp+20h] [rbp-1090h] BYREF\nchar *v9; // [rsp+10A8h] [rbp-8h]\n\nif ( !a1 || !*a1 )\nreturn 94LL;\nv9 = sub_434CA9(a1, s1, 0);\nif ( *v9 )\nreturn 95LL;\nsub_44DFAD(a4);\n*a3 = 0LL;\nif ( !strcmp(s1, off_4BAF7B) )\n{\nif ( !qword_542510 )\nreturn 72LL;\n*a3 = qword_542510;\n*a4 = (void *)qword_542518;\nif ( *a4 )\n++*((_DWORD *)*a4 + 1058);\n}\nelse if ( !strcmp(s1, \"DEBUG\") )\n{\nif ( !qword_542520 )\nreturn 72LL;\n*a3 = qword_542520;\n*a4 = (void *)qword_542528;\nif ( *a4 )\n++*((_DWORD *)*a4 + 1058);\n}\nelse if ( !strcmp(s1, \"STDOUT\") )\n{\n*a3 = stdout;\n*a4 = 0LL;\n}\nelse if ( !strcmp(s1, \"STDERR\") )\n{\n*a3 = (FILE *)stderr;\n*a4 = 0LL;\n}\nelse\n{\n*a4 = calloc(1uLL, 0x1090uLL);\nif ( !*a4 )\nreturn 71LL;\nsub_434CE5(a1, s1, 0);\nsub_451E60(*a4, s1, 4224LL);\nif ( (dword_5422D4 & 0x2000) != 0 )\n{\nif ( a2 )\nv5 = \"w+b\";\nelse\nv5 = \"w+\";\n}\nelse if ( a2 )\n{\nv5 = \"a+b\";\n}\nelse\n{\nv5 = \"a+\";\n}\n*a3 = (FILE *)sub_45044B(s1, v5);\nif ( !*a3 )\n{\nfree(*a4);\n*a4 = 0LL;\nreturn 70LL;\n}\nsetvbuf(*a3, 0LL, 0, 0x10000uLL);\n*((_QWORD *)*a4 + 528) = *a3;\n*((_DWORD *)*a4 + 1058) = 1;\n}\nreturn 0LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,s1,v9,sub_44DC20,sub_434CA9,sub_44DFAD,sub_434CE5,sub_451E60,sub_45044B,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'pf_0', 'a4': 'pref', 'a1': 'filename', 'a2': 'binary', 's1': 'gbuf', 'v9': 'tptr', 'sub_44DC20': 'sim_open_logfile', 'sub_434CA9': 'get_glyph', 'sub_44DFAD': 'sim_close_logfile', 'sub_434CE5': 'get_glyph_nc', 'sub_451E60': 'sim_strlcpy', 'sub_45044B': 'sim_fopen'}"} |
|
die_verify_filename | 8170503cd1918ecb11237a85c61d9be0cd1209d60b0c8b0e2fb9b8fe47d16590 | msysgit | msysgit | NA | static void NORETURN die_verify_filename(const char *prefix,
const char *arg,
int diagnose_misspelt_rev)
{
if (!diagnose_misspelt_rev)
die("%s: no such path in the working tree.\n"
"Use 'git <command> -- <path>...' to specify paths that do not exist locally.",
arg);
/*
* Saying "'(icase)foo' does not exist in the index" when the
* user gave us ":(icase)foo" is just stupid. A magic pathspec
* begins with a colon and is followed by a non-alnum; do not
* let maybe_die_on_misspelt_object_name() even trigger.
*/
if (!(arg[0] == ':' && !isalnum(arg[1])))
maybe_die_on_misspelt_object_name(arg, prefix);
/* ... or fall back the most general message. */
die("ambiguous argument '%s': unknown revision or path not in the working tree.\n"
"Use '--' to separate paths from revisions, like this:\n"
"'git <command> [<revision>...] -- [<file>...]'", arg);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_431916", "function_addr": 4397334, "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_14], edx"], [6, "cmp [rbp+var_14], 0"], [7, "jnz short loc_431945"], [8, "mov rax, [rbp+var_10]"], [9, "mov rsi, rax"], [10, "mov edi, offset aSNoSuchPathInT"], [11, "mov eax, 0"], [12, "call sub_4492CD"], [13, "mov rax, [rbp+var_10]"], [14, "movzx eax, byte ptr [rax]"], [15, "cmp al, 3Ah "], [16, "jnz short loc_431971"], [17, "mov rax, [rbp+var_10]"], [18, "add rax, 1"], [19, "movzx eax, byte ptr [rax]"], [20, "movzx eax, al"], [21, "cdqe"], [22, "movzx eax, ds:byte_4CA6C0[rax]"], [23, "movzx eax, al"], [24, "and eax, 6"], [25, "test eax, eax"], [26, "jz short loc_431984"], [27, "mov rdx, [rbp+var_8]"], [28, "mov rax, [rbp+var_10]"], [29, "mov rsi, rdx"], [30, "mov rdi, rax"], [31, "call sub_43E4BB"], [32, "mov rax, [rbp+var_10]"], [33, "mov rsi, rax"], [34, "mov edi, offset aAmbiguousArgum"], [35, "mov eax, 0"], [36, "call sub_4492CD"]], "data_dep": [[6, 5], [7, 6], [8, 4], [9, 8], [13, 4], [14, 13], [15, 14], [16, 15], [17, 4], [18, 17], [19, 18], [20, 19], [23, 22], [24, 23], [25, 24], [26, 25], [27, 3], [28, 4], [29, 27], [30, 28], [32, 4], [33, 32]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/8170503cd1918ecb11237a85c61d9be0cd1209d60b0c8b0e2fb9b8fe47d16590_8170503cd1918ecb11237a85c61d9be0cd1209d60b0c8b0e2fb9b8fe47d16590.jsonl.gz", "strip_func_name": "sub_431916", "query": "\n\n\nvoid __fastcall __noreturn sub_431916(__int64 a1, _BYTE *a2, int a3, int a4, int a5, int a6)\n{\nif ( !a3 )\nsub_4492CD(\n(unsigned int)\"%s: no such path in the working tree.\\n\"\n\"Use 'git <command> -- <path>...' to specify paths that do not exist locally.\",\n(_DWORD)a2,\n0,\na4,\na5,\na6);\nif ( *a2 != 58 || (byte_4CA6C0[(unsigned __int8)a2[1]] & 6) != 0 )\nsub_43E4BB(a2, a1);\nsub_4492CD(\n(unsigned int)\"ambiguous argument '%s': unknown revision or path not in the working tree.\\n\"\n\"Use '--' to separate paths from revisions, like this:\\n\"\n\"'git <command> [<revision>...] -- [<file>...]'\",\n(_DWORD)a2,\na3,\na4,\na5,\na6);\n}\n\n\n\nQ:[a3,a1,a2,sub_431916,sub_4492CD,sub_43E4BB,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'diagnose_misspelt_rev', 'a1': 'prefix', 'a2': 'arg', 'sub_431916': 'die_verify_filename', 'sub_4492CD': 'die', 'sub_43E4BB': 'maybe_die_on_misspelt_object_name'}"} |
|
output_jump | 53a05aad0cf55e21d871bf84231d41994b161191fed8e17cf3096e52dd9ca4c2 | darwin-on-arm | darwin-sdk | NA | static void
output_jump ()
{
char *p;
int size;
fixS *fixP;
if (i.tm.opcode_modifier & JumpByte)
{
/* This is a loop or jecxz type instruction. */
size = 1;
if (i.prefix[ADDR_PREFIX] != 0)
{
FRAG_APPEND_1_CHAR (ADDR_PREFIX_OPCODE);
i.prefixes -= 1;
}
/* Pentium4 branch hints. */
if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE /* not taken */
|| i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE /* taken */)
{
FRAG_APPEND_1_CHAR (i.prefix[SEG_PREFIX]);
i.prefixes--;
}
}
else
{
int code16;
code16 = 0;
if (flag_code == CODE_16BIT)
code16 = CODE16;
if (i.prefix[DATA_PREFIX] != 0)
{
FRAG_APPEND_1_CHAR (DATA_PREFIX_OPCODE);
i.prefixes -= 1;
code16 ^= CODE16;
}
size = 4;
if (code16)
size = 2;
}
if (i.prefix[REX_PREFIX] != 0)
{
FRAG_APPEND_1_CHAR (i.prefix[REX_PREFIX]);
i.prefixes -= 1;
}
if (i.prefixes != 0 && !intel_syntax)
as_warn (_("skipping prefixes on this instruction"));
p = frag_more (1 + size);
*p++ = i.tm.base_opcode;
#ifdef NeXT_MOD
if(i.op[0].disps->X_add_symbol != NULL &&
(i.op[0].disps->X_subtract_symbol != NULL ||
!is_local_symbol(i.op[0].disps->X_add_symbol) ||
flagseen ['L']))
#if ARCH64
fixP = fix_new (frag_now, p - frag_now->fr_literal, size,
i.op[0].disps->X_add_symbol, i.op[0].disps->X_subtract_symbol,
i.op[0].disps->X_add_number, 1, 1, X86_64_RELOC_BRANCH);
#else
fixP = fix_new (frag_now, p - frag_now->fr_literal, size,
i.op[0].disps->X_add_symbol, i.op[0].disps->X_subtract_symbol,
i.op[0].disps->X_add_number, 1, 1, 0);
#endif
else
#if ARCH64
fixP = fix_new (frag_now, p - frag_now->fr_literal, size,
i.op[0].disps->X_add_symbol, i.op[0].disps->X_subtract_symbol,
i.op[0].disps->X_add_number, 1, 0, X86_64_RELOC_BRANCH);
#else
fixP = fix_new (frag_now, p - frag_now->fr_literal, size,
i.op[0].disps->X_add_symbol, i.op[0].disps->X_subtract_symbol,
i.op[0].disps->X_add_number, 1, 0, 0);
#endif
#else
fixP = fix_new_exp (frag_now, p - frag_now->fr_literal, size,
i.op[0].disps, 1, reloc (size, 1, 1, i.reloc[0]));
/* All jumps handled here are signed, but don't use a signed limit
check for 32 and 16 bit jumps as we want to allow wrap around at
4G and 64k respectively. */
if (size == 1)
fixP->fx_signed = 1;
#endif
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41DBE9", "function_addr": 4316137, "binary_name": "53a05aad0cf55e21d871bf84231d41994b161191fed8e17cf3096e52dd9ca4c2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 60h"], [3, "mov eax, dword ptr cs:qword_455558"], [4, "and eax, 100h"], [5, "test eax, eax"], [6, "jz loc_41DD69"], [7, "mov [rbp+var_4], 1"], [8, "movzx eax, cs:byte_4555EE"], [9, "test al, al"], [10, "jz loc_41DCAE"], [11, "mov [rbp+var_20], offset qword_452AE0"], [12, "mov rax, [rbp+var_20]"], [13, "mov rdx, [rax+20h]"], [14, "mov rax, [rbp+var_20]"], [15, "mov rcx, [rax+18h]"], [16, "mov rax, rdx"], [17, "sub rax, rcx"], [18, "cmp eax, 1"], [19, "ja short loc_41DC56"], [20, "mov rax, cs:qword_452B20"], [21, "mov rdi, rax"], [22, "call sub_407DBC"], [23, "mov edi, 0"], [24, "call sub_407AC6"], [25, "mov [rbp+var_28], offset qword_452AE0"], [26, "mov rax, [rbp+var_28]"], [27, "mov rax, [rax+18h]"], [28, "lea rdx, [rax+1]"], [29, "mov rax, [rbp+var_28]"], [30, "mov rax, [rax+20h]"], [31, "cmp rdx, rax"], [32, "jbe short loc_41DC88"], [33, "mov rax, [rbp+var_28]"], [34, "mov esi, 1"], [35, "mov rdi, rax"], [36, "call _obstack_newchunk"], [37, "mov rax, [rbp+var_28]"], [38, "mov rax, [rax+18h]"], [39, "lea rcx, [rax+1]"], [40, "mov rdx, [rbp+var_28]"], [41, "mov [rdx+18h], rcx"], [42, "mov byte ptr [rax], 67h "], [43, "mov eax, cs:dword_4555E8"], [44, "sub eax, 1"], [45, "mov cs:dword_4555E8, eax"], [46, "movzx eax, cs:byte_4555F0"], [47, "cmp al, 2Eh "], [48, "jz short loc_41DCC8"], [49, "movzx eax, cs:byte_4555F0"], [50, "cmp al, 3Eh "], [51, "jnz loc_41DE3D"], [52, "mov [rbp+var_30], offset qword_452AE0"], [53, "mov rax, [rbp+var_30]"], [54, "mov rdx, [rax+20h]"], [55, "mov rax, [rbp+var_30]"], [56, "mov rcx, [rax+18h]"], [57, "mov rax, rdx"], [58, "sub rax, rcx"], [59, "cmp eax, 1"], [60, "ja short loc_41DD04"], [61, "mov rax, cs:qword_452B20"], [62, "mov rdi, rax"], [63, "call sub_407DBC"], [64, "mov edi, 0"], [65, "call sub_407AC6"], [66, "mov [rbp+var_38], offset qword_452AE0"], [67, "mov rax, [rbp+var_38]"], [68, "mov rax, [rax+18h]"], [69, "lea rdx, [rax+1]"], [70, "mov rax, [rbp+var_38]"], [71, "mov rax, [rax+20h]"], [72, "cmp rdx, rax"], [73, "jbe short loc_41DD36"], [74, "mov rax, [rbp+var_38]"], [75, "mov esi, 1"], [76, "mov rdi, rax"], [77, "call _obstack_newchunk"], [78, "movzx esi, cs:byte_4555F0"], [79, "mov rax, [rbp+var_38]"], [80, "mov rax, [rax+18h]"], [81, "lea rcx, [rax+1]"], [82, "mov rdx, [rbp+var_38]"], [83, "mov [rdx+18h], rcx"], [84, "mov edx, esi"], [85, "mov [rax], dl"], [86, "mov eax, cs:dword_4555E8"], [87, "sub eax, 1"], [88, "mov cs:dword_4555E8, eax"], [89, "jmp loc_41DE3D"], [90, "mov [rbp+var_8], 0"], [91, "mov eax, cs:dword_4556A4"], [92, "cmp eax, 1"], [93, "jnz short loc_41DD82"], [94, "mov [rbp+var_8], 1"], [95, "movzx eax, cs:byte_4555EF"], [96, "test al, al"], [97, "jz loc_41DE29"], [98, "mov [rbp+var_10], offset qword_452AE0"], [99, "mov rax, [rbp+var_10]"], [100, "mov rdx, [rax+20h]"], [101, "mov rax, [rbp+var_10]"], [102, "mov rcx, [rax+18h]"], [103, "mov rax, rdx"], [104, "sub rax, rcx"], [105, "cmp eax, 1"], [106, "ja short loc_41DDCD"], [107, "mov rax, cs:qword_452B20"], [108, "mov rdi, rax"], [109, "call sub_407DBC"], [110, "mov edi, 0"], [111, "call sub_407AC6"], [112, "mov [rbp+var_18], offset qword_452AE0"], [113, "mov rax, [rbp+var_18]"], [114, "mov rax, [rax+18h]"], [115, "lea rdx, [rax+1]"], [116, "mov rax, [rbp+var_18]"], [117, "mov rax, [rax+20h]"], [118, "cmp rdx, rax"], [119, "jbe short loc_41DDFF"], [120, "mov rax, [rbp+var_18]"], [121, "mov esi, 1"], [122, "mov rdi, rax"], [123, "call _obstack_newchunk"], [124, "mov rax, [rbp+var_18]"], [125, "mov rax, [rax+18h]"], [126, "lea rcx, [rax+1]"], [127, "mov rdx, [rbp+var_18]"], [128, "mov [rdx+18h], rcx"], [129, "mov byte ptr [rax], 66h "], [130, "mov eax, cs:dword_4555E8"], [131, "sub eax, 1"], [132, "mov cs:dword_4555E8, eax"], [133, "xor [rbp+var_8], 1"], [134, "mov [rbp+var_4], 4"], [135, "cmp [rbp+var_8], 0"], [136, "jz short loc_41DE3D"], [137, "mov [rbp+var_4], 2"], [138, "movzx eax, cs:byte_4555F2"], [139, "test al, al"], [140, "jz loc_41DEE8"], [141, "mov [rbp+var_40], offset qword_452AE0"], [142, "mov rax, [rbp+var_40]"], [143, "mov rdx, [rax+20h]"], [144, "mov rax, [rbp+var_40]"], [145, "mov rcx, [rax+18h]"], [146, "mov rax, rdx"], [147, "sub rax, rcx"], [148, "cmp eax, 1"], [149, "ja short loc_41DE88"], [150, "mov rax, cs:qword_452B20"], [151, "mov rdi, rax"], [152, "call sub_407DBC"], [153, "mov edi, 0"], [154, "call sub_407AC6"], [155, "mov [rbp+var_48], offset qword_452AE0"], [156, "mov rax, [rbp+var_48]"], [157, "mov rax, [rax+18h]"], [158, "lea rdx, [rax+1]"], [159, "mov rax, [rbp+var_48]"], [160, "mov rax, [rax+20h]"], [161, "cmp rdx, rax"], [162, "jbe short loc_41DEBA"], [163, "mov rax, [rbp+var_48]"], [164, "mov esi, 1"], [165, "mov rdi, rax"], [166, "call _obstack_newchunk"], [167, "movzx esi, cs:byte_4555F2"], [168, "mov rax, [rbp+var_48]"], [169, "mov rax, [rax+18h]"], [170, "lea rcx, [rax+1]"], [171, "mov rdx, [rbp+var_48]"], [172, "mov [rdx+18h], rcx"], [173, "mov edx, esi"], [174, "mov [rax], dl"], [175, "mov eax, cs:dword_4555E8"], [176, "sub eax, 1"], [177, "mov cs:dword_4555E8, eax"], [178, "mov eax, cs:dword_4555E8"], [179, "test eax, eax"], [180, "jz short loc_41DF0B"], [181, "mov eax, cs:dword_4556AC"], [182, "test eax, eax"], [183, "jnz short loc_41DF0B"], [184, "mov edi, offset aSkippingPrefix"], [185, "mov eax, 0"], [186, "call sub_40B31A"], [187, "mov eax, [rbp+var_4]"], [188, "add eax, 1"], [189, "mov edi, eax"], [190, "call sub_407CD7"], [191, "mov [rbp+var_50], rax"], [192, "mov ecx, dword ptr cs:qword_455548+4"], [193, "mov rax, [rbp+var_50]"], [194, "lea rdx, [rax+1]"], [195, "mov [rbp+var_50], rdx"], [196, "mov edx, ecx"], [197, "mov [rax], dl"], [198, "mov rax, cs:qword_455590"], [199, "mov rax, [rax]"], [200, "test rax, rax"], [201, "jz loc_41DFDA"], [202, "mov rax, cs:qword_455590"], [203, "mov rax, [rax+8]"], [204, "test rax, rax"], [205, "jnz short loc_41DF76"], [206, "mov rax, cs:qword_455590"], [207, "mov rax, [rax]"], [208, "mov rdi, rax"], [209, "call sub_4192FC"], [210, "test eax, eax"], [211, "jz short loc_41DF76"], [212, "movzx eax, cs:byte_4529CC"], [213, "test al, al"], [214, "jz short loc_41DFDA"], [215, "mov rax, cs:qword_455590"], [216, "mov rdi, [rax+10h]"], [217, "mov rax, cs:qword_455590"], [218, "mov rsi, [rax+8]"], [219, "mov rax, cs:qword_455590"], [220, "mov rcx, [rax]"], [221, "mov rax, cs:qword_452B20"], [222, "lea rdx, [rax+40h]"], [223, "mov rax, [rbp+var_50]"], [224, "sub rax, rdx"], [225, "mov r10d, eax"], [226, "mov rax, cs:qword_452B20"], [227, "mov edx, [rbp+var_4]"], [228, "sub rsp, 8"], [229, "push 2"], [230, "push 1"], [231, "push 1"], [232, "mov r9, rdi"], [233, "mov r8, rsi"], [234, "mov esi, r10d"], [235, "mov rdi, rax"], [236, "call sub_407496"], [237, "add rsp, 20h"], [238, "mov [rbp+var_58], rax"], [239, "jmp short loc_41E03D"], [240, "mov rax, cs:qword_455590"], [241, "mov rdi, [rax+10h]"], [242, "mov rax, cs:qword_455590"], [243, "mov rsi, [rax+8]"], [244, "mov rax, cs:qword_455590"], [245, "mov rcx, [rax]"], [246, "mov rax, cs:qword_452B20"], [247, "lea rdx, [rax+40h]"], [248, "mov rax, [rbp+var_50]"], [249, "sub rax, rdx"], [250, "mov r10d, eax"], [251, "mov rax, cs:qword_452B20"], [252, "mov edx, [rbp+var_4]"], [253, "sub rsp, 8"], [254, "push 2"], [255, "push 0"], [256, "push 1"], [257, "mov r9, rdi"], [258, "mov r8, rsi"], [259, "mov esi, r10d"], [260, "mov rdi, rax"], [261, "call sub_407496"], [262, "add rsp, 20h"], [263, "mov [rbp+var_58], rax"], [264, "nop"], [265, "nop"], [266, "leave"], [267, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [9, 8], [10, 9], [12, 11], [13, 12], [14, 11], [15, 14], [16, 13], [17, 15], [17, 16], [18, 17], [19, 18], [21, 20], [26, 25], [27, 26], [28, 27], [28, 13], [29, 25], [30, 29], [31, 28], [31, 30], [32, 31], [33, 25], [35, 33], [37, 25], [38, 37], [39, 38], [39, 15], [40, 25], [41, 40], [41, 39], [42, 38], [44, 43], [45, 44], [47, 46], [48, 47], [50, 49], [51, 50], [53, 52], [54, 41], [54, 53], [54, 42], [55, 52], [56, 42], [56, 55], [56, 41], [57, 54], [58, 57], [58, 56], [59, 58], [60, 59], [62, 61], [67, 66], [68, 41], [68, 67], [68, 42], [69, 42], [69, 41], [69, 68], [69, 54], [70, 66], [71, 42], [71, 41], [71, 70], [72, 71], [72, 69], [73, 72], [74, 66], [76, 74], [79, 66], [80, 85], [80, 79], [80, 42], [80, 41], [80, 83], [81, 85], [81, 80], [81, 56], [81, 42], [81, 41], [81, 83], [82, 66], [83, 81], [83, 82], [84, 78], [85, 84], [85, 80], [86, 45], [87, 86], [88, 87], [92, 91], [93, 92], [96, 95], [97, 96], [99, 98], [100, 99], [101, 98], [102, 101], [103, 100], [104, 102], [104, 103], [105, 104], [106, 105], [108, 107], [113, 112], [114, 113], [115, 114], [115, 100], [116, 112], [117, 116], [118, 117], [118, 115], [119, 118], [120, 112], [122, 120], [124, 112], [125, 124], [126, 102], [126, 125], [127, 112], [128, 127], [128, 126], [129, 125], [131, 130], [132, 131], [133, 90], [133, 94], [135, 90], [135, 94], [135, 133], [136, 135], [139, 138], [140, 139], [142, 141], [143, 85], [143, 83], [143, 42], [143, 41], [143, 129], [143, 142], [143, 128], [144, 141], [145, 85], [145, 42], [145, 41], [145, 144], [145, 129], [145, 83], [145, 128], [146, 143], [147, 146], [147, 145], [148, 147], [149, 148], [151, 150], [156, 155], [157, 156], [157, 85], [157, 83], [157, 42], [157, 41], [157, 129], [157, 128], [158, 42], [158, 41], [158, 157], [158, 143], [158, 129], [158, 83], [158, 128], [158, 85], [159, 155], [160, 128], [160, 159], [160, 85], [160, 42], [160, 41], [160, 129], [160, 83], [161, 158], [161, 160], [162, 161], [163, 155], [165, 163], [168, 155], [169, 83], [169, 42], [169, 172], [169, 41], [169, 129], [169, 128], [169, 174], [169, 168], [169, 85], [170, 169], [170, 128], [170, 145], [170, 85], [170, 42], [170, 172], [170, 41], [170, 129], [170, 83], [170, 174], [171, 155], [172, 171], [172, 170], [173, 167], [174, 169], [174, 173], [175, 88], [175, 45], [175, 132], [176, 175], [177, 176], [178, 132], [178, 88], [178, 177], [178, 45], [179, 178], [180, 179], [182, 181], [183, 182], [187, 7], [187, 137], [187, 134], [188, 187], [189, 188], [191, 190], [193, 191], [194, 85], [194, 84], [194, 83], [194, 42], [194, 172], [194, 41], [194, 129], [194, 128], [194, 193], [194, 40], [194, 197], [194, 174], [194, 173], [194, 127], [195, 194], [196, 192], [197, 196], [197, 193], [199, 198], [199, 197], [200, 199], [201, 200], [203, 202], [203, 197], [203, 174], [203, 85], [203, 83], [203, 42], [203, 172], [203, 41], [203, 129], [203, 128], [204, 203], [205, 204], [207, 83], [207, 42], [207, 172], [207, 41], [207, 129], [207, 128], [207, 85], [207, 197], [207, 206], [207, 174], [208, 207], [210, 209], [211, 210], [213, 212], [214, 213], [216, 215], [216, 83], [216, 42], [216, 172], [216, 41], [216, 129], [216, 128], [216, 85], [216, 197], [216, 174], [218, 83], [218, 172], [218, 41], [218, 129], [218, 128], [218, 217], [218, 85], [218, 197], [218, 174], [218, 42], [220, 129], [220, 128], [220, 85], [220, 197], [220, 174], [220, 219], [220, 83], [220, 42], [220, 172], [220, 41], [222, 197], [222, 174], [222, 196], [222, 83], [222, 42], [222, 172], [222, 41], [222, 129], [222, 128], [222, 221], [222, 85], [223, 195], [224, 223], [224, 222], [225, 224], [227, 134], [227, 7], [227, 137], [228, 2], [232, 216], [233, 218], [234, 225], [235, 226], [237, 228], [238, 236], [241, 85], [241, 197], [241, 174], [241, 83], [241, 42], [241, 172], [241, 41], [241, 129], [241, 128], [241, 240], [243, 242], [243, 83], [243, 42], [243, 172], [243, 41], [243, 129], [243, 128], [243, 85], [243, 197], [243, 174], [245, 83], [245, 172], [245, 41], [245, 129], [245, 128], [245, 244], [245, 85], [245, 197], [245, 174], [245, 42], [247, 129], [247, 128], [247, 85], [247, 197], [247, 174], [247, 246], [247, 196], [247, 83], [247, 42], [247, 172], [247, 41], [248, 195], [249, 247], [249, 248], [250, 249], [252, 134], [252, 7], [252, 137], [253, 2], [257, 241], [258, 243], [259, 250], [260, 251], [262, 253], [263, 261], [267, 236], [267, 261]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/53a05aad0cf55e21d871bf84231d41994b161191fed8e17cf3096e52dd9ca4c2_53a05aad0cf55e21d871bf84231d41994b161191fed8e17cf3096e52dd9ca4c2.jsonl.gz", "strip_func_name": "sub_41DBE9", "query": "\n\n\n__int64 __fastcall sub_41DBE9(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\nint v6; // edx\nint v7; // ecx\nint v8; // er8\nint v9; // er9\n_BYTE *v10; // rax\nint v11; // edx\nint v12; // ecx\nint v13; // er8\nint v14; // er9\n_BYTE *v15; // rax\nint v16; // edx\nint v17; // ecx\nint v18; // er8\nint v19; // er9\n_BYTE *v20; // rax\nint v21; // edx\nint v22; // ecx\nint v23; // er8\nint v24; // er9\n_BYTE *v25; // rax\n_BYTE *v26; // rax\n__int64 result; // rax\nint v28; // [rsp+10h] [rbp-50h]\nint v29; // [rsp+58h] [rbp-8h]\nint v30; // [rsp+5Ch] [rbp-4h]\n\nif ( (dword_455558 & 0x100) != 0 )\n{\nv30 = 1;\nif ( byte_4555EE )\n{\nif ( (unsigned int)(*((_DWORD *)&qword_452AE0 + 8) - *((_DWORD *)&qword_452AE0 + 6)) <= 1 )\n{\nsub_407DBC(qword_452B20);\nsub_407AC6(0, a2, v6, v7, v8, v9);\n}\nif ( *(&qword_452AE0 + 3) + 1 > (unsigned __int64)*(&qword_452AE0 + 4) )\n{\na2 = 1LL;\nobstack_newchunk((__int64)&qword_452AE0, 1);\n}\nv10 = (_BYTE *)*(&qword_452AE0 + 3);\na4 = (__int64)(v10 + 1);\na3 = (__int64)&qword_452AE0;\n*(&qword_452AE0 + 3) = (__int64)(v10 + 1);\n*v10 = 103;\n--dword_4555E8;\n}\nif ( byte_4555F0 == 46 || byte_4555F0 == 62 )\n{\nif ( (unsigned int)(*((_DWORD *)&qword_452AE0 + 8) - *((_DWORD *)&qword_452AE0 + 6)) <= 1 )\n{\nsub_407DBC(qword_452B20);\nsub_407AC6(0, a2, v11, v12, v13, v14);\n}\nif ( *(&qword_452AE0 + 3) + 1 > (unsigned __int64)*(&qword_452AE0 + 4) )\nobstack_newchunk((__int64)&qword_452AE0, 1);\na2 = (unsigned __int8)byte_4555F0;\nv15 = (_BYTE *)*(&qword_452AE0 + 3);\na4 = (__int64)(v15 + 1);\n*(&qword_452AE0 + 3) = (__int64)(v15 + 1);\na3 = (unsigned int)a2;\n*v15 = a2;\n--dword_4555E8;\n}\n}\nelse\n{\nv29 = dword_4556A4 == 1;\nif ( byte_4555EF )\n{\nif ( (unsigned int)(*((_DWORD *)&qword_452AE0 + 8) - *((_DWORD *)&qword_452AE0 + 6)) <= 1 )\n{\nsub_407DBC(qword_452B20);\nsub_407AC6(0, a2, v16, v17, v18, v19);\n}\nif ( *(&qword_452AE0 + 3) + 1 > (unsigned __int64)*(&qword_452AE0 + 4) )\n{\na2 = 1LL;\nobstack_newchunk((__int64)&qword_452AE0, 1);\n}\nv20 = (_BYTE *)*(&qword_452AE0 + 3);\na4 = (__int64)(v20 + 1);\na3 = (__int64)&qword_452AE0;\n*(&qword_452AE0 + 3) = (__int64)(v20 + 1);\n*v20 = 102;\n--dword_4555E8;\nv29 ^= 1u;\n}\nv30 = 4;\nif ( v29 )\nv30 = 2;\n}\nif ( byte_4555F2 )\n{\nif ( (unsigned int)(*((_DWORD *)&qword_452AE0 + 8) - *((_DWORD *)&qword_452AE0 + 6)) <= 1 )\n{\nsub_407DBC(qword_452B20);\nsub_407AC6(0, a2, v21, v22, v23, v24);\n}\nif ( *(&qword_452AE0 + 3) + 1 > (unsigned __int64)*(&qword_452AE0 + 4) )\nobstack_newchunk((__int64)&qword_452AE0, 1);\na2 = (unsigned __int8)byte_4555F2;\nv25 = (_BYTE *)*(&qword_452AE0 + 3);\na4 = (__int64)(v25 + 1);\n*(&qword_452AE0 + 3) = (__int64)(v25 + 1);\na3 = (unsigned int)a2;\n*v25 = a2;\n--dword_4555E8;\n}\nif ( dword_4555E8 && !dword_4556AC )\nsub_40B31A(\"skipping prefixes on this instruction\", a2, a3, a4, a5, a6);\nv26 = (_BYTE *)sub_407CD7(v30 + 1, a2, a3, a4, a5, a6);\nv28 = (_DWORD)v26 + 1;\n*v26 = BYTE4(qword_455548);\nif ( *(_QWORD *)qword_455590 && (*(_QWORD *)(qword_455590 + 8) || !sub_4192FC(*(_QWORD *)qword_455590) || byte_4529CC) )\nresult = sub_407496(\n(__int64)qword_452B20,\nv28 - ((int)qword_452B20 + 64),\nv30,\n*(_QWORD *)qword_455590,\n*(_QWORD *)(qword_455590 + 8),\n*(_QWORD *)(qword_455590 + 16),\n1,\n1,\n2);\nelse\nresult = sub_407496(\n(__int64)qword_452B20,\nv28 - ((int)qword_452B20 + 64),\nv30,\n*(_QWORD *)qword_455590,\n*(_QWORD *)(qword_455590 + 8),\n*(_QWORD *)(qword_455590 + 16),\n1,\n0,\n2);\nreturn result;\n}\n\n\n\nQ:[v28,v29,v30,sub_41DBE9,sub_407DBC,sub_407AC6,sub_40B31A,sub_407CD7,sub_4192FC,sub_407496,]\nAssistant: ", "hints": "[]", "response": "{'v28': 'p', 'v29': 'code16', 'v30': 'size', 'sub_41DBE9': 'output_jump', 'sub_407DBC': 'frag_wane', 'sub_407AC6': 'frag_new', 'sub_40B31A': 'as_warn', 'sub_407CD7': 'frag_more', 'sub_4192FC': 'is_local_symbol', 'sub_407496': 'fix_new'}"} |
|
dummy_handler | 32e5bef9a534f6a023b94f0e20e0c28fed442ec28edeb1e289ac97b9496f472a | micropython | micropython-unicorn | NA | static void dummy_handler(uint8_t packet_type, uint8_t *packet, uint16_t size){
UNUSED(packet_type);
UNUSED(packet);
UNUSED(size);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40822E", "function_addr": 4227630, "binary_name": "32e5bef9a534f6a023b94f0e20e0c28fed442ec28edeb1e289ac97b9496f472a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov ecx, edi"], [3, "mov [rbp+var_10], rsi"], [4, "mov eax, edx"], [5, "mov edx, ecx"], [6, "mov [rbp+var_4], dl"], [7, "mov [rbp+var_8], ax"], [8, "nop"], [9, "pop rbp"], [10, "retn"]], "data_dep": [[5, 2], [6, 5], [7, 4], [9, 0], [10, 4]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/32e5bef9a534f6a023b94f0e20e0c28fed442ec28edeb1e289ac97b9496f472a_32e5bef9a534f6a023b94f0e20e0c28fed442ec28edeb1e289ac97b9496f472a.jsonl.gz", "strip_func_name": "sub_40822E", "query": "\n\n\n__int64 __fastcall sub_40822E(__int64 a1, __int64 a2, unsigned int a3)\n{\nreturn a3;\n}\n\n\n\nQ:[a3,a1,a2,sub_40822E,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'size', 'a1': 'packet_type', 'a2': 'packet', 'sub_40822E': 'dummy_handler'}"} |
|
cu_Move | afbc915f426c094251076b359394b2f319370d1b13f49ecddb3e0e7ac8910e84 | olikraus | u8glib | NA | void cu_Move(uint8_t src, uint8_t dest)
{
/* start backup structure */
chm_p chm = cu_PushHalfMove();
/* these are the values from the board at the positions, provided as arguments to this function */
uint8_t cp_src, cp_dest;
/* Maybe a second position is cleared and one additional location is set */
uint8_t clr_pos2;
uint8_t set_pos2;
uint8_t set_cp2;
/* get values from board */
cp_src = cp_GetFromBoard(src);
cp_dest = cp_GetFromBoard(dest);
/* fill backup structure */
chm->main_cp = cp_src;
chm->main_src = src;
chm->main_dest = dest;
chm->other_cp = cp_dest; /* prepace capture backup */
chm->other_src = dest;
chm->other_dest = ILLEGAL_POSITION;
/* setup results as far as possible with some suitable values */
clr_pos2 = ILLEGAL_POSITION; /* for en passant and castling, two positions might be cleared */
set_pos2 = ILLEGAL_POSITION; /* only used for castling */
set_cp2 = PIECE_NONE; /* ROOK for castling */
/* check for PAWN */
if ( cp_GetPiece(cp_src) == PIECE_PAWN )
{
/* double step: is the distance 2 rows */
if ( (src - dest == 32) || ( dest - src == 32 ) )
{
/* remember the destination position */
lrc_obj.pawn_dbl_move[cp_GetColor(cp_src)] = dest;
}
/* check if the PAWN is able to promote */
else if ( (dest>>4) == 0 || (dest>>4) == 7 )
{
/* do simple "queening" */
cp_src &= ~PIECE_PAWN;
cp_src |= PIECE_QUEEN;
}
/* is it en passant capture? */
/* check for side move */
else if ( ((src + dest) & 1) != 0 )
{
/* check, if target field is empty */
if ( cp_GetPiece(cp_dest) == PIECE_NONE )
{
/* this is en passant */
/* no further checking required, because legal moves are assumed here */
/* however... the captured pawn position must be valid */
clr_pos2 = lrc_obj.pawn_dbl_move[cp_GetColor(cp_src) ^ 1];
chm->other_src = clr_pos2;
chm->other_cp = cp_GetFromBoard(clr_pos2);
}
}
}
/* check for the KING */
else if ( cp_GetPiece(cp_src) == PIECE_KING )
{
/* disallow castling, if the KING has moved */
if ( cp_GetColor(cp_src) == COLOR_WHITE )
{
/* if white KING has moved, disallow castling for white */
lrc_obj.castling_possible &= 0x0c;
}
else
{
/* if black KING has moved, disallow castling for black */
lrc_obj.castling_possible &= 0x03;
}
/* has it been castling to the left? */
if ( src - dest == 2 )
{
/* let the ROOK move to pos2 */
set_pos2 = src-1;
set_cp2 = cp_GetFromBoard(src-4);
/* the ROOK must be cleared from the original position */
clr_pos2 = src-4;
chm->other_cp = set_cp2;
chm->other_src = clr_pos2;
chm->other_dest = set_pos2;
}
/* has it been castling to the right? */
else if ( dest - src == 2 )
{
/* let the ROOK move to pos2 */
set_pos2 = src+1;
set_cp2 = cp_GetFromBoard(src+3);
/* the ROOK must be cleared from the original position */
clr_pos2 = src+3;
chm->other_cp = set_cp2;
chm->other_src = clr_pos2;
chm->other_dest = set_pos2;
}
}
/* check for the ROOK */
else if ( cp_GetPiece(cp_src) == PIECE_ROOK )
{
/* disallow white left castling */
if ( src == 0x00 )
lrc_obj.castling_possible &= ~0x01;
/* disallow white right castling */
if ( src == 0x07 )
lrc_obj.castling_possible &= ~0x02;
/* disallow black left castling */
if ( src == 0x70 )
lrc_obj.castling_possible &= ~0x04;
/* disallow black right castling */
if ( src == 0x77 )
lrc_obj.castling_possible &= ~0x08;
}
/* apply new board situation */
cp_SetOnBoard(dest, cp_src);
if ( set_pos2 != ILLEGAL_POSITION )
cp_SetOnBoard(set_pos2, set_cp2);
cp_SetOnBoard(src, PIECE_NONE);
if ( clr_pos2 != ILLEGAL_POSITION )
cp_SetOnBoard(clr_pos2, PIECE_NONE);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40671B", "function_addr": 4220699, "binary_name": "afbc915f426c094251076b359394b2f319370d1b13f49ecddb3e0e7ac8910e84.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 28h"], [3, "mov edx, edi"], [4, "mov eax, esi"], [5, "mov [rbp+var_24], dl"], [6, "mov [rbp+var_28], al"], [7, "call sub_406533"], [8, "mov [rbp+var_10], rax"], [9, "movzx eax, [rbp+var_24]"], [10, "mov edi, eax"], [11, "call sub_405E5C"], [12, "mov [rbp+var_1], al"], [13, "movzx eax, [rbp+var_28]"], [14, "mov edi, eax"], [15, "call sub_405E5C"], [16, "mov [rbp+var_11], al"], [17, "mov rax, [rbp+var_10]"], [18, "movzx edx, [rbp+var_1]"], [19, "mov [rax], dl"], [20, "mov rax, [rbp+var_10]"], [21, "movzx edx, [rbp+var_24]"], [22, "mov [rax+1], dl"], [23, "mov rax, [rbp+var_10]"], [24, "movzx edx, [rbp+var_28]"], [25, "mov [rax+2], dl"], [26, "mov rax, [rbp+var_10]"], [27, "movzx edx, [rbp+var_11]"], [28, "mov [rax+3], dl"], [29, "mov rax, [rbp+var_10]"], [30, "movzx edx, [rbp+var_28]"], [31, "mov [rax+4], dl"], [32, "mov rax, [rbp+var_10]"], [33, "mov byte ptr [rax+5], 0FFh"], [34, "mov [rbp+var_2], 0FFh"], [35, "mov [rbp+var_3], 0FFh"], [36, "mov [rbp+var_4], 0"], [37, "movzx eax, [rbp+var_1]"], [38, "mov edi, eax"], [39, "call sub_405E32"], [40, "cmp al, 1"], [41, "jnz loc_406879"], [42, "movzx eax, [rbp+var_24]"], [43, "movzx edx, [rbp+var_28]"], [44, "sub eax, edx"], [45, "cmp eax, 20h "], [46, "jz short loc_4067CD"], [47, "movzx eax, [rbp+var_28]"], [48, "movzx edx, [rbp+var_24]"], [49, "sub eax, edx"], [50, "cmp eax, 20h "], [51, "jnz short loc_4067EC"], [52, "movzx eax, [rbp+var_1]"], [53, "mov edi, eax"], [54, "call sub_405E45"], [55, "movzx eax, al"], [56, "cdqe"], [57, "movzx edx, [rbp+var_28]"], [58, "mov ds:byte_56F822[rax], dl"], [59, "jmp loc_4069DF"], [60, "movzx eax, [rbp+var_28]"], [61, "shr al, 4"], [62, "test al, al"], [63, "jz short loc_406802"], [64, "movzx eax, [rbp+var_28]"], [65, "shr al, 4"], [66, "cmp al, 7"], [67, "jnz short loc_40680F"], [68, "and [rbp+var_1], 0FEh"], [69, "or [rbp+var_1], 5"], [70, "jmp loc_4069DF"], [71, "movzx edx, [rbp+var_24]"], [72, "movzx eax, [rbp+var_28]"], [73, "add eax, edx"], [74, "movzx eax, al"], [75, "and eax, 1"], [76, "test eax, eax"], [77, "jz loc_4069DF"], [78, "movzx eax, [rbp+var_11]"], [79, "mov edi, eax"], [80, "call sub_405E32"], [81, "test al, al"], [82, "jnz loc_4069DF"], [83, "movzx eax, [rbp+var_1]"], [84, "mov edi, eax"], [85, "call sub_405E45"], [86, "xor eax, 1"], [87, "movzx eax, al"], [88, "cdqe"], [89, "movzx eax, ds:byte_56F822[rax]"], [90, "mov [rbp+var_2], al"], [91, "mov rax, [rbp+var_10]"], [92, "movzx edx, [rbp+var_2]"], [93, "mov [rax+4], dl"], [94, "movzx eax, [rbp+var_2]"], [95, "mov edi, eax"], [96, "call sub_405E5C"], [97, "mov rdx, [rbp+var_10]"], [98, "mov [rdx+3], al"], [99, "jmp loc_4069DF"], [100, "movzx eax, [rbp+var_1]"], [101, "mov edi, eax"], [102, "call sub_405E32"], [103, "cmp al, 6"], [104, "jnz loc_406978"], [105, "movzx eax, [rbp+var_1]"], [106, "mov edi, eax"], [107, "call sub_405E45"], [108, "test al, al"], [109, "jnz short loc_4068AD"], [110, "movzx eax, cs:byte_56F824"], [111, "and eax, 0Ch"], [112, "mov cs:byte_56F824, al"], [113, "jmp short loc_4068BD"], [114, "movzx eax, cs:byte_56F824"], [115, "and eax, 3"], [116, "mov cs:byte_56F824, al"], [117, "movzx eax, [rbp+var_24]"], [118, "movzx edx, [rbp+var_28]"], [119, "sub eax, edx"], [120, "cmp eax, 2"], [121, "jnz short loc_40691A"], [122, "movzx eax, [rbp+var_24]"], [123, "sub eax, 1"], [124, "mov [rbp+var_3], al"], [125, "movzx eax, [rbp+var_24]"], [126, "sub eax, 4"], [127, "movzx eax, al"], [128, "mov edi, eax"], [129, "call sub_405E5C"], [130, "mov [rbp+var_4], al"], [131, "movzx eax, [rbp+var_24]"], [132, "sub eax, 4"], [133, "mov [rbp+var_2], al"], [134, "mov rax, [rbp+var_10]"], [135, "movzx edx, [rbp+var_4]"], [136, "mov [rax+3], dl"], [137, "mov rax, [rbp+var_10]"], [138, "movzx edx, [rbp+var_2]"], [139, "mov [rax+4], dl"], [140, "mov rax, [rbp+var_10]"], [141, "movzx edx, [rbp+var_3]"], [142, "mov [rax+5], dl"], [143, "jmp loc_4069DF"], [144, "movzx eax, [rbp+var_28]"], [145, "movzx edx, [rbp+var_24]"], [146, "sub eax, edx"], [147, "cmp eax, 2"], [148, "jnz loc_4069DF"], [149, "movzx eax, [rbp+var_24]"], [150, "add eax, 1"], [151, "mov [rbp+var_3], al"], [152, "movzx eax, [rbp+var_24]"], [153, "add eax, 3"], [154, "movzx eax, al"], [155, "mov edi, eax"], [156, "call sub_405E5C"], [157, "mov [rbp+var_4], al"], [158, "movzx eax, [rbp+var_24]"], [159, "add eax, 3"], [160, "mov [rbp+var_2], al"], [161, "mov rax, [rbp+var_10]"], [162, "movzx edx, [rbp+var_4]"], [163, "mov [rax+3], dl"], [164, "mov rax, [rbp+var_10]"], [165, "movzx edx, [rbp+var_2]"], [166, "mov [rax+4], dl"], [167, "mov rax, [rbp+var_10]"], [168, "movzx edx, [rbp+var_3]"], [169, "mov [rax+5], dl"], [170, "jmp short loc_4069DF"], [171, "movzx eax, [rbp+var_1]"], [172, "mov edi, eax"], [173, "call sub_405E32"], [174, "cmp al, 4"], [175, "jnz short loc_4069DF"], [176, "cmp [rbp+var_24], 0"], [177, "jnz short loc_40699D"], [178, "movzx eax, cs:byte_56F824"], [179, "and eax, 0FFFFFFFEh"], [180, "mov cs:byte_56F824, al"], [181, "cmp [rbp+var_24], 7"], [182, "jnz short loc_4069B3"], [183, "movzx eax, cs:byte_56F824"], [184, "and eax, 0FFFFFFFDh"], [185, "mov cs:byte_56F824, al"], [186, "cmp [rbp+var_24], 70h "], [187, "jnz short loc_4069C9"], [188, "movzx eax, cs:byte_56F824"], [189, "and eax, 0FFFFFFFBh"], [190, "mov cs:byte_56F824, al"], [191, "cmp [rbp+var_24], 77h "], [192, "jnz short loc_4069DF"], [193, "movzx eax, cs:byte_56F824"], [194, "and eax, 0FFFFFFF7h"], [195, "mov cs:byte_56F824, al"], [196, "movzx edx, [rbp+var_1]"], [197, "movzx eax, [rbp+var_28]"], [198, "mov esi, edx"], [199, "mov edi, eax"], [200, "call sub_405E82"], [201, "cmp [rbp+var_3], 0FFh"], [202, "jz short loc_406A07"], [203, "movzx edx, [rbp+var_4]"], [204, "movzx eax, [rbp+var_3]"], [205, "mov esi, edx"], [206, "mov edi, eax"], [207, "call sub_405E82"], [208, "movzx eax, [rbp+var_24]"], [209, "mov esi, 0"], [210, "mov edi, eax"], [211, "call sub_405E82"], [212, "cmp [rbp+var_2], 0FFh"], [213, "jz short loc_406A2D"], [214, "movzx eax, [rbp+var_2]"], [215, "mov esi, 0"], [216, "mov edi, eax"], [217, "call sub_405E82"], [218, "nop"], [219, "leave"], [220, "retn"]], "data_dep": [[5, 3], [6, 4], [8, 7], [9, 5], [10, 9], [12, 11], [13, 6], [14, 13], [16, 15], [17, 8], [18, 12], [19, 18], [19, 17], [20, 8], [21, 5], [22, 21], [22, 20], [23, 8], [24, 6], [25, 23], [25, 24], [26, 8], [27, 16], [28, 27], [28, 26], [29, 8], [30, 6], [31, 29], [31, 30], [32, 8], [33, 32], [37, 12], [38, 37], [40, 39], [41, 40], [42, 5], [43, 6], [44, 42], [44, 43], [45, 44], [46, 45], [47, 6], [48, 5], [49, 48], [49, 47], [50, 49], [51, 50], [52, 12], [53, 52], [55, 54], [57, 6], [58, 57], [60, 6], [61, 60], [62, 61], [63, 62], [64, 6], [65, 64], [66, 65], [67, 66], [68, 12], [69, 68], [71, 5], [72, 6], [73, 71], [73, 72], [74, 73], [75, 74], [76, 75], [77, 76], [78, 16], [79, 78], [81, 80], [82, 81], [83, 12], [84, 83], [86, 85], [87, 86], [90, 89], [91, 8], [92, 90], [93, 92], [93, 91], [94, 90], [95, 94], [97, 8], [98, 96], [98, 97], [100, 12], [101, 100], [103, 102], [104, 103], [105, 12], [106, 105], [108, 107], [109, 108], [111, 110], [112, 111], [115, 114], [116, 115], [117, 5], [118, 6], [119, 118], [119, 117], [120, 119], [121, 120], [122, 5], [123, 122], [124, 123], [125, 5], [126, 125], [127, 126], [128, 127], [130, 129], [131, 5], [132, 131], [133, 132], [134, 8], [135, 130], [136, 135], [136, 134], [137, 8], [138, 133], [139, 137], [139, 138], [140, 8], [141, 124], [142, 141], [142, 140], [144, 6], [145, 5], [146, 145], [146, 144], [147, 146], [148, 147], [149, 5], [150, 149], [151, 150], [152, 5], [153, 152], [154, 153], [155, 154], [157, 156], [158, 5], [159, 158], [160, 159], [161, 8], [162, 157], [163, 161], [163, 162], [164, 8], [165, 160], [166, 165], [166, 164], [167, 8], [168, 151], [169, 167], [169, 168], [171, 12], [172, 171], [174, 173], [175, 174], [176, 5], [177, 176], [179, 178], [180, 179], [181, 5], [182, 181], [183, 180], [184, 183], [185, 184], [186, 5], [187, 186], [188, 185], [188, 180], [189, 188], [190, 189], [191, 5], [192, 191], [193, 190], [193, 185], [193, 180], [194, 193], [195, 194], [196, 69], [196, 12], [197, 6], [198, 196], [199, 197], [201, 124], [201, 35], [201, 151], [202, 201], [203, 36], [203, 130], [203, 157], [204, 151], [204, 124], [204, 35], [205, 203], [206, 204], [208, 5], [210, 208], [212, 34], [212, 90], [212, 133], [212, 160], [213, 212], [214, 90], [214, 133], [214, 160], [214, 34], [216, 214], [220, 211], [220, 217]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/afbc915f426c094251076b359394b2f319370d1b13f49ecddb3e0e7ac8910e84_afbc915f426c094251076b359394b2f319370d1b13f49ecddb3e0e7ac8910e84.jsonl.gz", "strip_func_name": "sub_40671B", "query": "\n\n\n__int64 __fastcall sub_40671B(unsigned __int8 a1, unsigned __int8 a2)\n{\n__int64 result; // rax\nchar v3; // [rsp+17h] [rbp-11h]\n_BYTE *v4; // [rsp+18h] [rbp-10h]\nchar v5; // [rsp+24h] [rbp-4h]\nchar v6; // [rsp+25h] [rbp-3h]\nchar v7; // [rsp+26h] [rbp-2h]\nchar v8; // [rsp+27h] [rbp-1h]\n\nv4 = sub_406533();\nv8 = sub_405E5C(a1);\nv3 = sub_405E5C(a2);\n*v4 = v8;\nv4[1] = a1;\nv4[2] = a2;\nv4[3] = v3;\nv4[4] = a2;\nv4[5] = -1;\nv7 = -1;\nv6 = -1;\nv5 = 0;\nif ( (unsigned __int8)sub_405E32(v8) == 1 )\n{\nif ( a1 - a2 == 32 || a2 - a1 == 32 )\n{\nbyte_56F822[sub_405E45(v8)] = a2;\n}\nelse if ( a2 >> 4 && a2 >> 4 != 7 )\n{\nif ( ((a1 + a2) & 1) != 0 && !(unsigned __int8)sub_405E32(v3) )\n{\nv7 = byte_56F822[!sub_405E45(v8)];\nv4[4] = v7;\nv4[3] = sub_405E5C(v7);\n}\n}\nelse\n{\nv8 = v8 & 0xFE | 5;\n}\n}\nelse if ( (unsigned __int8)sub_405E32(v8) == 6 )\n{\nif ( sub_405E45(v8) )\nbyte_56F824 &= 3u;\nelse\nbyte_56F824 &= 0xCu;\nif ( a1 - a2 == 2 )\n{\nv6 = a1 - 1;\nv5 = sub_405E5C(a1 - 4);\nv7 = a1 - 4;\nv4[3] = v5;\nv4[4] = a1 - 4;\nv4[5] = a1 - 1;\n}\nelse if ( a2 - a1 == 2 )\n{\nv6 = a1 + 1;\nv5 = sub_405E5C(a1 + 3);\nv7 = a1 + 3;\nv4[3] = v5;\nv4[4] = a1 + 3;\nv4[5] = a1 + 1;\n}\n}\nelse if ( (unsigned __int8)sub_405E32(v8) == 4 )\n{\nif ( !a1 )\nbyte_56F824 &= 0xFEu;\nif ( a1 == 7 )\nbyte_56F824 &= 0xFDu;\nif ( a1 == 112 )\nbyte_56F824 &= 0xFBu;\nif ( a1 == 119 )\nbyte_56F824 &= 0xF7u;\n}\nsub_405E82(a2, v8);\nif ( v6 != -1 )\nsub_405E82(v6, v5);\nresult = sub_405E82(a1, 0);\nif ( v7 != -1 )\nresult = sub_405E82(v7, 0);\nreturn result;\n}\n\n\n\nQ:[a1,a2,v3,v4,v5,v6,v7,v8,sub_40671B,sub_406533,sub_405E5C,sub_405E32,sub_405E45,sub_405E82,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'src', 'a2': 'dest', 'v3': 'cp_dest', 'v4': 'chm', 'v5': 'set_cp2', 'v6': 'set_pos2', 'v7': 'clr_pos2', 'v8': 'cp_src', 'sub_40671B': 'cu_Move', 'sub_406533': 'cu_PushHalfMove', 'sub_405E5C': 'cp_GetFromBoard', 'sub_405E32': 'cp_GetPiece', 'sub_405E45': 'cp_GetColor', 'sub_405E82': 'cp_SetOnBoard'}"} |
|
main | 09ea7b64bfc75f060415bea117671eef962153061079d852427926eb640c55c0 | xlucn | PAT | NA | int main()
{
char c, s1[10001];
int s2[128] = {0};
scanf("%[^\n]%c", s1, &c);
while ((c = getchar()) != EOF && c != '\n')
s2[(int)c] = 1;
for (char *p = s1; *p; p++)
if (!s2[(int)(*p)])
putchar(*p);
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "main", "function_addr": 4198722, "binary_name": "09ea7b64bfc75f060415bea117671eef962153061079d852427926eb640c55c0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 2920h"], [3, "lea rdx, [rbp+var_2920]"], [4, "mov eax, 0"], [5, "mov ecx, 40h "], [6, "mov rdi, rdx"], [7, "rep stosq"], [8, "lea rdx, [rbp+var_9]"], [9, "lea rax, [rbp+var_2720]"], [10, "mov rsi, rax"], [11, "mov edi, offset aC"], [12, "mov eax, 0"], [13, "call ___isoc99_scanf"], [14, "jmp short loc_401197"], [15, "movzx eax, [rbp+var_9]"], [16, "movsx eax, al"], [17, "cdqe"], [18, "mov [rbp+rax*4+var_2920], 1"], [19, "call _getchar"], [20, "mov [rbp+var_9], al"], [21, "movzx eax, [rbp+var_9]"], [22, "cmp al, 0FFh"], [23, "jz short loc_4011AF"], [24, "movzx eax, [rbp+var_9]"], [25, "cmp al, 0Ah"], [26, "jnz short loc_401183"], [27, "lea rax, [rbp+var_2720]"], [28, "mov [rbp+var_8], rax"], [29, "jmp short loc_4011E9"], [30, "mov rax, [rbp+var_8]"], [31, "movzx eax, byte ptr [rax]"], [32, "movsx eax, al"], [33, "cdqe"], [34, "mov eax, [rbp+rax*4+var_2920]"], [35, "test eax, eax"], [36, "jnz short loc_4011E4"], [37, "mov rax, [rbp+var_8]"], [38, "movzx eax, byte ptr [rax]"], [39, "movsx eax, al"], [40, "mov edi, eax"], [41, "call _putchar"], [42, "add [rbp+var_8], 1"], [43, "mov rax, [rbp+var_8]"], [44, "movzx eax, byte ptr [rax]"], [45, "test al, al"], [46, "jnz short loc_4011BC"], [47, "mov eax, 0"], [48, "leave"], [49, "retn"]], "data_dep": [[6, 3], [8, 3], [9, 4], [10, 9], [15, 20], [16, 15], [18, 16], [20, 19], [21, 20], [22, 21], [23, 22], [24, 20], [25, 24], [26, 25], [27, 21], [27, 24], [28, 27], [30, 42], [30, 28], [31, 30], [32, 31], [34, 18], [34, 32], [35, 34], [36, 35], [37, 42], [37, 28], [38, 37], [39, 38], [40, 39], [42, 28], [42, 42], [43, 42], [43, 28], [44, 43], [45, 44], [46, 45], [49, 47]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/09ea7b64bfc75f060415bea117671eef962153061079d852427926eb640c55c0_09ea7b64bfc75f060415bea117671eef962153061079d852427926eb640c55c0.jsonl.gz", "strip_func_name": "main", "query": "\n\n\n__int64 __fastcall main(int a1, char **a2, char **a3)\n{\nint v4[128]; // [rsp+0h] [rbp-2920h] BYREF\nchar v5; // [rsp+200h] [rbp-2720h] BYREF\nchar v6; // [rsp+2917h] [rbp-9h]\nchar *i; // [rsp+2918h] [rbp-8h]\n\nmemset(v4, 0, sizeof(v4));\n__isoc99_scanf();\nwhile ( 1 )\n{\nv6 = getchar();\nif ( v6 == -1 || v6 == 10 )\nbreak;\nv4[v6] = 1;\n}\nfor ( i = &v5; *i; ++i )\n{\nif ( !v4[*i] )\nputchar(*i);\n}\nreturn 0LL;\n}\n\n\n\nQ:[a2,a3,a1,v4,v5,v6,i,]\nAssistant: ", "hints": "[]", "response": "{'a2': 'argv', 'a3': 'envp', 'a1': 'argc', 'v4': 's2', 'v5': 's1', 'v6': 'c', 'i': 'p'}"} |
|
start_timer | dda78b48bc565f109c075247043282b7cfe33dfdee3ebf5b6481b8237c85e3ea | samdmarshall | Onlive-Source-Backup | NA | void start_timer()
{
time(&start_time);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401232", "function_addr": 4198962, "binary_name": "dda78b48bc565f109c075247043282b7cfe33dfdee3ebf5b6481b8237c85e3ea.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov edi, offset timer"], [3, "call _time"], [4, "nop"], [5, "pop rbp"], [6, "retn"]], "data_dep": [[5, 0], [6, 3]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/dda78b48bc565f109c075247043282b7cfe33dfdee3ebf5b6481b8237c85e3ea_dda78b48bc565f109c075247043282b7cfe33dfdee3ebf5b6481b8237c85e3ea.jsonl.gz", "strip_func_name": "sub_401232", "query": "\n\n\ntime_t sub_401232()\n{\nreturn time(&timer);\n}\n\n\n\nQ:[sub_401232,]\nAssistant: ", "hints": "[]", "response": "{'sub_401232': 'start_timer'}"} |
|
VM_LogSyscalls | 65b0a6a66ac7f742f3b62174dd1ff457acc880965e6d65927b21910da8931604 | FrozenSand | ioq3-for-UrbanTerror-4 | NA | void VM_LogSyscalls( int *args ) {
static int callnum;
static FILE *f;
if ( !f ) {
f = fopen("syscalls.log", "w" );
}
callnum++;
fprintf(f, "%i: %p (%i) = %i %i %i %i\n", callnum, (void*)(args - (int *)currentVM->dataBase),
args[0], args[1], args[2], args[3], args[4] );
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_450952", "function_addr": 4524370, "binary_name": "65b0a6a66ac7f742f3b62174dd1ff457acc880965e6d65927b21910da8931604.elf_extract.pkl\n"}, "code": [[0, "sub rsp, 18h"], [1, "mov [rsp+18h+var_10], rdi"], [2, "mov rax, cs:stream"], [3, "test rax, rax"], [4, "jnz short loc_45097D"], [5, "mov esi, offset aW"], [6, "mov edi, offset filename"], [7, "call _fopen"], [8, "mov cs:stream, rax"], [9, "mov eax, cs:dword_7ADC40"], [10, "add eax, 1"], [11, "mov cs:dword_7ADC40, eax"], [12, "mov rax, [rsp+18h+var_10]"], [13, "add rax, 10h"], [14, "mov edi, [rax]"], [15, "mov rax, [rsp+18h+var_10]"], [16, "add rax, 0Ch"], [17, "mov esi, [rax]"], [18, "mov rax, [rsp+18h+var_10]"], [19, "add rax, 8"], [20, "mov ecx, [rax]"], [21, "mov rax, [rsp+18h+var_10]"], [22, "add rax, 4"], [23, "mov r9d, [rax]"], [24, "mov rax, [rsp+18h+var_10]"], [25, "mov r8d, [rax]"], [26, "mov rax, cs:qword_7AD4C0"], [27, "mov rdx, [rax+90h]"], [28, "mov rax, [rsp+18h+var_10]"], [29, "sub rax, rdx"], [30, "sar rax, 2"], [31, "mov r10, rax"], [32, "mov edx, cs:dword_7ADC40"], [33, "mov rax, cs:stream"], [34, "sub rsp, 8"], [35, "push rdi"], [36, "push rsi"], [37, "push rcx"], [38, "mov rcx, r10"], [39, "mov esi, offset aIPIIIII"], [40, "mov rdi, rax"], [41, "mov eax, 0"], [42, "call _fprintf"], [43, "add rsp, 20h"], [44, "nop"], [45, "add rsp, 18h"], [46, "retn"]], "data_dep": [[3, 2], [4, 3], [8, 7], [10, 9], [11, 10], [12, 1], [13, 12], [14, 13], [15, 1], [16, 15], [17, 16], [18, 1], [19, 18], [20, 19], [21, 1], [22, 21], [23, 22], [24, 1], [25, 24], [27, 26], [28, 1], [29, 28], [29, 27], [30, 29], [31, 30], [32, 11], [33, 8], [34, 0], [35, 14], [36, 17], [37, 20], [38, 31], [40, 33], [43, 34], [45, 43], [46, 42]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/65b0a6a66ac7f742f3b62174dd1ff457acc880965e6d65927b21910da8931604_65b0a6a66ac7f742f3b62174dd1ff457acc880965e6d65927b21910da8931604.jsonl.gz", "strip_func_name": "sub_450952", "query": "\n\n\nint __fastcall sub_450952(unsigned int *a1)\n{\nif ( !stream )\nstream = fopen(\"syscalls.log\", \"w\");\nreturn fprintf(\nstream,\n\"%i: %p (%i) = %i %i %i %i\\n\",\n(unsigned int)++dword_7ADC40,\n(const void *)(((__int64)a1 - *(_QWORD *)(qword_7AD4C0 + 144)) >> 2),\n*a1,\na1[1],\na1[2],\na1[3],\na1[4]);\n}\n\n\n\nQ:[a1,sub_450952,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'args', 'sub_450952': 'VM_LogSyscalls'}"} |
|
sp_256_from_bin | 7219b0ef569734ba548000b39f891b63e71d053f533c94257503597f308a3fd2 | wolfSSL | wolfBoot | NA | static void sp_256_from_bin(sp_digit* r, int size, const byte* a, int n)
{
int i;
int j = 0;
word32 s = 0;
r[0] = 0;
for (i = n-1; i >= 0; i--) {
r[j] |= (((sp_digit)a[i]) << s);
if (s >= 21U) {
r[j] &= 0x1fffffff;
s = 29U - s;
if (j + 1 >= size) {
break;
}
r[++j] = (sp_digit)a[i] >> s;
s = 8U - s;
}
else {
s += 8U;
}
}
for (j++; j < size; j++) {
r[j] = 0;
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_462631", "function_addr": 4597297, "binary_name": "7219b0ef569734ba548000b39f891b63e71d053f533c94257503597f308a3fd2.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 [rbp+var_20], ecx"], [6, "mov [rbp+var_8], 0"], [7, "mov [rbp+var_C], 0"], [8, "mov rax, [rbp+var_18]"], [9, "mov dword ptr [rax], 0"], [10, "mov eax, [rbp+var_20]"], [11, "sub eax, 1"], [12, "mov [rbp+var_4], eax"], [13, "jmp loc_46274E"], [14, "mov eax, [rbp+var_8]"], [15, "cdqe"], [16, "lea rdx, ds:0[rax*4]"], [17, "mov rax, [rbp+var_18]"], [18, "add rax, rdx"], [19, "mov esi, [rax]"], [20, "mov eax, [rbp+var_4]"], [21, "movsxd rdx, eax"], [22, "mov rax, [rbp+var_28]"], [23, "add rax, rdx"], [24, "movzx eax, byte ptr [rax]"], [25, "movzx edx, al"], [26, "mov eax, [rbp+var_C]"], [27, "mov ecx, eax"], [28, "shl edx, cl"], [29, "mov eax, [rbp+var_8]"], [30, "cdqe"], [31, "lea rcx, ds:0[rax*4]"], [32, "mov rax, [rbp+var_18]"], [33, "add rax, rcx"], [34, "or edx, esi"], [35, "mov [rax], edx"], [36, "cmp [rbp+var_C], 14h"], [37, "jbe loc_462746"], [38, "mov eax, [rbp+var_8]"], [39, "cdqe"], [40, "lea rdx, ds:0[rax*4]"], [41, "mov rax, [rbp+var_18]"], [42, "add rax, rdx"], [43, "mov edx, [rax]"], [44, "mov eax, [rbp+var_8]"], [45, "cdqe"], [46, "lea rcx, ds:0[rax*4]"], [47, "mov rax, [rbp+var_18]"], [48, "add rax, rcx"], [49, "and edx, 1FFFFFFFh"], [50, "mov [rax], edx"], [51, "mov eax, 1Dh"], [52, "sub eax, [rbp+var_C]"], [53, "mov [rbp+var_C], eax"], [54, "mov eax, [rbp+var_8]"], [55, "add eax, 1"], [56, "cmp [rbp+var_1C], eax"], [57, "jle short loc_46275A"], [58, "mov eax, [rbp+var_4]"], [59, "movsxd rdx, eax"], [60, "mov rax, [rbp+var_28]"], [61, "add rax, rdx"], [62, "movzx eax, byte ptr [rax]"], [63, "movzx esi, al"], [64, "add [rbp+var_8], 1"], [65, "mov eax, [rbp+var_8]"], [66, "cdqe"], [67, "lea rdx, ds:0[rax*4]"], [68, "mov rax, [rbp+var_18]"], [69, "add rdx, rax"], [70, "mov eax, [rbp+var_C]"], [71, "mov ecx, eax"], [72, "sar esi, cl"], [73, "mov eax, esi"], [74, "mov [rdx], eax"], [75, "mov eax, 8"], [76, "sub eax, [rbp+var_C]"], [77, "mov [rbp+var_C], eax"], [78, "jmp short loc_46274A"], [79, "add [rbp+var_C], 8"], [80, "sub [rbp+var_4], 1"], [81, "cmp [rbp+var_4], 0"], [82, "jns loc_462669"], [83, "jmp short loc_46275B"], [84, "nop"], [85, "add [rbp+var_8], 1"], [86, "jmp short loc_46277F"], [87, "mov eax, [rbp+var_8]"], [88, "cdqe"], [89, "lea rdx, ds:0[rax*4]"], [90, "mov rax, [rbp+var_18]"], [91, "add rax, rdx"], [92, "mov dword ptr [rax], 0"], [93, "add [rbp+var_8], 1"], [94, "mov eax, [rbp+var_8]"], [95, "cmp eax, [rbp+var_1C]"], [96, "jl short loc_462761"], [97, "nop"], [98, "nop"], [99, "pop rbp"], [100, "retn"]], "data_dep": [[8, 2], [9, 8], [10, 5], [11, 10], [12, 11], [14, 64], [14, 6], [16, 69], [16, 34], [17, 2], [18, 17], [18, 16], [19, 9], [19, 18], [19, 50], [19, 35], [19, 74], [20, 12], [20, 80], [21, 20], [22, 4], [23, 22], [23, 21], [24, 35], [24, 74], [24, 23], [24, 9], [24, 50], [25, 24], [26, 7], [26, 77], [26, 79], [27, 26], [28, 25], [28, 27], [29, 6], [29, 64], [31, 27], [32, 2], [33, 31], [33, 32], [34, 19], [34, 28], [35, 33], [35, 34], [36, 7], [36, 77], [36, 79], [37, 36], [38, 64], [38, 6], [40, 34], [41, 2], [42, 41], [42, 40], [43, 9], [43, 50], [43, 42], [43, 35], [43, 74], [44, 64], [44, 6], [46, 31], [47, 2], [48, 47], [48, 46], [49, 43], [50, 49], [50, 48], [52, 79], [52, 51], [52, 7], [52, 77], [53, 52], [54, 6], [54, 64], [55, 54], [56, 3], [56, 55], [57, 56], [58, 12], [58, 80], [59, 58], [60, 4], [61, 60], [61, 59], [62, 35], [62, 74], [62, 9], [62, 50], [62, 61], [63, 62], [64, 64], [64, 6], [65, 64], [67, 59], [68, 2], [69, 67], [69, 68], [70, 53], [71, 70], [72, 63], [72, 71], [73, 72], [74, 73], [74, 69], [76, 53], [76, 75], [77, 76], [79, 7], [79, 77], [79, 79], [80, 12], [80, 80], [81, 80], [81, 12], [82, 81], [85, 64], [85, 6], [87, 93], [87, 85], [89, 49], [89, 69], [89, 89], [89, 34], [90, 2], [91, 89], [91, 90], [92, 91], [93, 85], [93, 93], [94, 85], [94, 93], [95, 3], [95, 94], [96, 95], [99, 0], [100, 94]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/7219b0ef569734ba548000b39f891b63e71d053f533c94257503597f308a3fd2_7219b0ef569734ba548000b39f891b63e71d053f533c94257503597f308a3fd2.jsonl.gz", "strip_func_name": "sub_462631", "query": "\n\n\n__int64 __fastcall sub_462631(_DWORD *a1, int a2, __int64 a3, int a4)\n{\n__int64 result; // rax\nunsigned int v5; // [rsp+1Ch] [rbp-Ch]\nunsigned int v6; // [rsp+1Ch] [rbp-Ch]\nint v7; // [rsp+20h] [rbp-8h]\nunsigned int j; // [rsp+20h] [rbp-8h]\nint i; // [rsp+24h] [rbp-4h]\n\nv7 = 0;\nv5 = 0;\n*a1 = 0;\nfor ( i = a4 - 1; i >= 0; --i )\n{\na1[v7] |= *(unsigned __int8 *)(i + a3) << v5;\nif ( v5 <= 0x14 )\n{\nv5 += 8;\n}\nelse\n{\na1[v7] &= 0x1FFFFFFFu;\nv6 = 29 - v5;\nif ( a2 <= v7 + 1 )\nbreak;\na1[++v7] = (int)*(unsigned __int8 *)(i + a3) >> v6;\nv5 = 8 - v6;\n}\n}\nfor ( j = v7 + 1; ; ++j )\n{\nresult = j;\nif ( (int)j >= a2 )\nbreak;\na1[j] = 0;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,v5,j,sub_462631,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'a', 'a4': 'n', 'a1': 'r', 'a2': 'size', 'v5': 's', 'j': 'ja', 'sub_462631': 'sp_256_from_bin'}"} |
|
hostapd_setup_wpa | 20c07804a3f28a6a5c3f8253e79de0ec1aedc41632a0737ad8dad981cd237640 | sonic-net | sonic-buildimage | NA | int hostapd_setup_wpa(struct hostapd_data *hapd)
{
struct wpa_auth_config _conf;
static const struct wpa_auth_callbacks cb = {
.logger = hostapd_wpa_auth_logger,
.disconnect = hostapd_wpa_auth_disconnect,
.mic_failure_report = hostapd_wpa_auth_mic_failure_report,
.psk_failure_report = hostapd_wpa_auth_psk_failure_report,
.set_eapol = hostapd_wpa_auth_set_eapol,
.get_eapol = hostapd_wpa_auth_get_eapol,
.get_psk = hostapd_wpa_auth_get_psk,
.get_msk = hostapd_wpa_auth_get_msk,
.set_key = hostapd_wpa_auth_set_key,
.get_seqnum = hostapd_wpa_auth_get_seqnum,
.send_eapol = hostapd_wpa_auth_send_eapol,
.for_each_sta = hostapd_wpa_auth_for_each_sta,
.for_each_auth = hostapd_wpa_auth_for_each_auth,
.send_ether = hostapd_wpa_auth_send_ether,
.send_oui = hostapd_wpa_auth_send_oui,
.channel_info = hostapd_channel_info,
.update_vlan = hostapd_wpa_auth_update_vlan,
#ifdef CONFIG_OCV
.get_sta_tx_params = hostapd_get_sta_tx_params,
#endif /* CONFIG_OCV */
#ifdef CONFIG_IEEE80211R_AP
.send_ft_action = hostapd_wpa_auth_send_ft_action,
.add_sta = hostapd_wpa_auth_add_sta,
.add_sta_ft = hostapd_wpa_auth_add_sta_ft,
.add_tspec = hostapd_wpa_auth_add_tspec,
.set_vlan = hostapd_wpa_auth_set_vlan,
.get_vlan = hostapd_wpa_auth_get_vlan,
.set_identity = hostapd_wpa_auth_set_identity,
.get_identity = hostapd_wpa_auth_get_identity,
.set_radius_cui = hostapd_wpa_auth_set_radius_cui,
.get_radius_cui = hostapd_wpa_auth_get_radius_cui,
.set_session_timeout = hostapd_wpa_auth_set_session_timeout,
.get_session_timeout = hostapd_wpa_auth_get_session_timeout,
#endif /* CONFIG_IEEE80211R_AP */
};
const u8 *wpa_ie;
size_t wpa_ie_len;
hostapd_wpa_auth_conf(hapd->conf, hapd->iconf, &_conf);
_conf.msg_ctx = hapd->msg_ctx;
if (hapd->iface->drv_flags & WPA_DRIVER_FLAGS_EAPOL_TX_STATUS)
_conf.tx_status = 1;
if (hapd->iface->drv_flags & WPA_DRIVER_FLAGS_AP_MLME)
_conf.ap_mlme = 1;
if (!(hapd->iface->drv_flags & WPA_DRIVER_FLAGS_WIRED) &&
(hapd->conf->wpa_deny_ptk0_rekey == PTK0_REKEY_ALLOW_NEVER ||
(hapd->conf->wpa_deny_ptk0_rekey == PTK0_REKEY_ALLOW_LOCAL_OK &&
!(hapd->iface->drv_flags & WPA_DRIVER_FLAGS_SAFE_PTK0_REKEYS)))) {
wpa_msg(hapd->msg_ctx, MSG_INFO,
"Disable PTK0 rekey support - replaced with disconnect");
_conf.wpa_deny_ptk0_rekey = 1;
}
if (_conf.extended_key_id &&
(hapd->iface->drv_flags & WPA_DRIVER_FLAGS_EXTENDED_KEY_ID))
wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Extended Key ID supported");
else
_conf.extended_key_id = 0;
hapd->wpa_auth = wpa_init(hapd->own_addr, &_conf, &cb, hapd);
if (hapd->wpa_auth == NULL) {
wpa_printf(MSG_ERROR, "WPA initialization failed.");
return -1;
}
if (hostapd_set_privacy(hapd, 1)) {
wpa_printf(MSG_ERROR, "Could not set PrivacyInvoked "
"for interface %s", hapd->conf->iface);
return -1;
}
wpa_ie = wpa_auth_get_wpa_ie(hapd->wpa_auth, &wpa_ie_len);
if (hostapd_set_generic_elem(hapd, wpa_ie, wpa_ie_len)) {
wpa_printf(MSG_ERROR, "Failed to configure WPA IE for "
"the kernel driver.");
return -1;
}
if (rsn_preauth_iface_init(hapd)) {
wpa_printf(MSG_ERROR, "Initialization of RSN "
"pre-authentication failed.");
return -1;
}
#ifdef CONFIG_IEEE80211R_AP
if (!hostapd_drv_none(hapd) &&
wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt)) {
const char *ft_iface;
ft_iface = hapd->conf->bridge[0] ? hapd->conf->bridge :
hapd->conf->iface;
hapd->l2 = l2_packet_init(ft_iface, NULL, ETH_P_RRB,
hostapd_rrb_receive, hapd, 1);
if (!hapd->l2) {
wpa_printf(MSG_ERROR, "Failed to open l2_packet "
"interface");
return -1;
}
if (hostapd_wpa_register_ft_oui(hapd, ft_iface)) {
wpa_printf(MSG_ERROR,
"Failed to open ETH_P_OUI interface");
return -1;
}
}
#endif /* CONFIG_IEEE80211R_AP */
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_44FDF6", "function_addr": 4521462, "binary_name": "20c07804a3f28a6a5c3f8253e79de0ec1aedc41632a0737ad8dad981cd237640.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 180h"], [3, "mov [rbp+var_178], rdi"], [4, "mov rax, [rbp+var_178]"], [5, "mov rcx, [rax+8]"], [6, "mov rax, [rbp+var_178]"], [7, "mov rax, [rax+10h]"], [8, "lea rdx, [rbp+var_160]"], [9, "mov rsi, rcx"], [10, "mov rdi, rax"], [11, "call sub_44CFE3"], [12, "mov rax, [rbp+var_178]"], [13, "mov rax, [rax+948h]"], [14, "mov [rbp+var_160], rax"], [15, "mov rax, [rbp+var_178]"], [16, "mov rax, [rax]"], [17, "mov rax, [rax+858h]"], [18, "and eax, 10000h"], [19, "test rax, rax"], [20, "jz short loc_44FE6A"], [21, "mov [rbp+var_108], 1"], [22, "mov rax, [rbp+var_178]"], [23, "mov rax, [rax]"], [24, "mov rax, [rax+858h]"], [25, "and eax, 1000000h"], [26, "test rax, rax"], [27, "jz short loc_44FE8C"], [28, "mov [rbp+var_40], 1"], [29, "mov rax, [rbp+var_178]"], [30, "mov rax, [rax]"], [31, "mov rax, [rax+858h]"], [32, "and eax, 10h"], [33, "test rax, rax"], [34, "jnz short loc_44FF23"], [35, "mov rax, [rbp+var_178]"], [36, "mov rax, [rax+10h]"], [37, "mov eax, [rax+228h]"], [38, "cmp eax, 2"], [39, "jz short loc_44FEF4"], [40, "mov rax, [rbp+var_178]"], [41, "mov rax, [rax+10h]"], [42, "mov eax, [rax+228h]"], [43, "cmp eax, 1"], [44, "jnz short loc_44FF23"], [45, "mov rax, [rbp+var_178]"], [46, "mov rax, [rax]"], [47, "mov rax, [rax+858h]"], [48, "mov rdx, 2000000000000000h"], [49, "and rax, rdx"], [50, "test rax, rax"], [51, "jnz short loc_44FF23"], [52, "mov rax, [rbp+var_178]"], [53, "mov rax, [rax+948h]"], [54, "mov edx, offset aDisablePtk0Rek"], [55, "mov esi, 3"], [56, "mov rdi, rax"], [57, "mov eax, 0"], [58, "call sub_470697"], [59, "mov [rbp+var_134], 1"], [60, "mov eax, [rbp+var_154]"], [61, "test eax, eax"], [62, "jz short loc_44FF6A"], [63, "mov rax, [rbp+var_178]"], [64, "mov rax, [rax]"], [65, "mov rax, [rax+858h]"], [66, "test rax, rax"], [67, "jns short loc_44FF6A"], [68, "mov rax, [rbp+var_178]"], [69, "mov rax, [rax+948h]"], [70, "mov edx, offset aExtendedKeyIdS"], [71, "mov esi, 2"], [72, "mov rdi, rax"], [73, "mov eax, 0"], [74, "call sub_470697"], [75, "jmp short loc_44FF74"], [76, "mov [rbp+var_154], 0"], [77, "mov rax, [rbp+var_178]"], [78, "lea rdi, [rax+1Dh]"], [79, "mov rdx, [rbp+var_178]"], [80, "lea rax, [rbp+var_160]"], [81, "mov rcx, rdx"], [82, "mov edx, offset off_4B8960"], [83, "mov rsi, rax"], [84, "call sub_436096"], [85, "mov rdx, [rbp+var_178]"], [86, "mov [rdx+980h], rax"], [87, "mov rax, [rbp+var_178]"], [88, "mov rax, [rax+980h]"], [89, "test rax, rax"], [90, "jnz short loc_44FFDC"], [91, "mov esi, offset aWpaInitializat_0"], [92, "mov edi, 5"], [93, "mov eax, 0"], [94, "call sub_46FC12"], [95, "mov eax, 0FFFFFFFFh"], [96, "jmp locret_4501BF"], [97, "mov rax, [rbp+var_178]"], [98, "mov esi, 1"], [99, "mov rdi, rax"], [100, "call sub_45940B"], [101, "test eax, eax"], [102, "jz short loc_450020"], [103, "mov rax, [rbp+var_178]"], [104, "mov rax, [rax+10h]"], [105, "mov rdx, rax"], [106, "mov esi, offset aCouldNotSetPri"], [107, "mov edi, 5"], [108, "mov eax, 0"], [109, "call sub_46FC12"], [110, "mov eax, 0FFFFFFFFh"], [111, "jmp locret_4501BF"], [112, "mov rax, [rbp+var_178]"], [113, "mov rax, [rax+980h]"], [114, "lea rdx, [rbp+var_168]"], [115, "mov rsi, rdx"], [116, "mov rdi, rax"], [117, "call sub_43E5C3"], [118, "mov [rbp+var_8], rax"], [119, "mov rdx, [rbp+var_168]"], [120, "mov rcx, [rbp+var_8]"], [121, "mov rax, [rbp+var_178]"], [122, "mov rsi, rcx"], [123, "mov rdi, rax"], [124, "call sub_459471"], [125, "test eax, eax"], [126, "jz short loc_450083"], [127, "mov esi, offset aFailedToConfig_0"], [128, "mov edi, 5"], [129, "mov eax, 0"], [130, "call sub_46FC12"], [131, "mov eax, 0FFFFFFFFh"], [132, "jmp locret_4501BF"], [133, "mov rax, [rbp+var_178]"], [134, "mov rdi, rax"], [135, "call sub_44CEB5"], [136, "test eax, eax"], [137, "jz short loc_4500B4"], [138, "mov esi, offset aInitialization"], [139, "mov edi, 5"], [140, "mov eax, 0"], [141, "call sub_46FC12"], [142, "mov eax, 0FFFFFFFFh"], [143, "jmp locret_4501BF"], [144, "mov rax, [rbp+var_178]"], [145, "mov rdi, rax"], [146, "call sub_459CCD"], [147, "test eax, eax"], [148, "jnz loc_4501BA"], [149, "mov rax, [rbp+var_178]"], [150, "mov rax, [rax+10h]"], [151, "mov eax, [rax+1ECh]"], [152, "mov edi, eax"], [153, "call sub_44CE9C"], [154, "test eax, eax"], [155, "jz loc_4501BA"], [156, "mov rax, [rbp+var_178]"], [157, "mov rax, [rax+10h]"], [158, "movzx eax, byte ptr [rax+11h]"], [159, "test al, al"], [160, "jz short loc_45010F"], [161, "mov rax, [rbp+var_178]"], [162, "mov rax, [rax+10h]"], [163, "add rax, 11h"], [164, "jmp short loc_45011A"], [165, "mov rax, [rbp+var_178]"], [166, "mov rax, [rax+10h]"], [167, "mov [rbp+var_10], rax"], [168, "mov rdx, [rbp+var_178]"], [169, "mov rax, [rbp+var_10]"], [170, "mov r9d, 1"], [171, "mov r8, rdx"], [172, "mov ecx, offset sub_44F8CC"], [173, "mov edx, 890Dh"], [174, "mov esi, 0"], [175, "mov rdi, rax"], [176, "call sub_4A1D93"], [177, "mov rdx, [rbp+var_178]"], [178, "mov [rdx+0A08h], rax"], [179, "mov rax, [rbp+var_178]"], [180, "mov rax, [rax+0A08h]"], [181, "test rax, rax"], [182, "jnz short loc_450185"], [183, "mov esi, offset aFailedToOpenL2"], [184, "mov edi, 5"], [185, "mov eax, 0"], [186, "call sub_46FC12"], [187, "mov eax, 0FFFFFFFFh"], [188, "jmp short locret_4501BF"], [189, "mov rdx, [rbp+var_10]"], [190, "mov rax, [rbp+var_178]"], [191, "mov rsi, rdx"], [192, "mov rdi, rax"], [193, "call sub_44FBCE"], [194, "test eax, eax"], [195, "jz short loc_4501BA"], [196, "mov esi, offset aFailedToOpenEt"], [197, "mov edi, 5"], [198, "mov eax, 0"], [199, "call sub_46FC12"], [200, "mov eax, 0FFFFFFFFh"], [201, "jmp short locret_4501BF"], [202, "mov eax, 0"], [203, "leave"], [204, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 3], [7, 6], [9, 5], [10, 7], [12, 3], [13, 12], [14, 13], [15, 3], [16, 15], [17, 16], [18, 17], [19, 18], [20, 19], [22, 3], [23, 22], [24, 23], [25, 24], [26, 25], [27, 26], [29, 3], [30, 29], [31, 30], [32, 31], [33, 32], [34, 33], [35, 3], [36, 35], [37, 36], [38, 37], [39, 38], [40, 3], [41, 40], [42, 41], [43, 42], [44, 43], [45, 3], [46, 45], [47, 46], [49, 48], [49, 47], [50, 49], [51, 50], [52, 3], [53, 52], [56, 53], [61, 60], [62, 61], [63, 3], [64, 63], [65, 64], [66, 65], [67, 66], [68, 3], [69, 68], [72, 69], [77, 3], [78, 77], [78, 72], [78, 56], [78, 10], [79, 3], [80, 14], [80, 77], [81, 79], [83, 80], [85, 3], [86, 85], [86, 84], [87, 3], [88, 86], [88, 87], [89, 88], [90, 89], [97, 3], [99, 97], [101, 100], [102, 101], [103, 3], [104, 86], [104, 103], [105, 104], [112, 3], [113, 112], [113, 86], [114, 85], [115, 114], [116, 113], [118, 117], [120, 118], [121, 3], [122, 120], [123, 121], [125, 124], [126, 125], [133, 3], [134, 133], [136, 135], [137, 136], [144, 3], [145, 144], [147, 146], [148, 147], [149, 3], [150, 86], [150, 149], [151, 86], [151, 150], [152, 151], [154, 153], [155, 154], [156, 3], [157, 86], [157, 156], [158, 157], [158, 86], [159, 158], [160, 159], [161, 3], [162, 161], [162, 86], [163, 162], [165, 3], [166, 165], [166, 86], [167, 166], [167, 163], [168, 3], [169, 167], [171, 168], [175, 169], [177, 3], [178, 177], [178, 176], [179, 3], [180, 179], [180, 178], [181, 180], [182, 181], [189, 167], [190, 3], [191, 189], [192, 190], [194, 193], [195, 194], [204, 110], [204, 187], [204, 95], [204, 200], [204, 202], [204, 131], [204, 142]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/20c07804a3f28a6a5c3f8253e79de0ec1aedc41632a0737ad8dad981cd237640_20c07804a3f28a6a5c3f8253e79de0ec1aedc41632a0737ad8dad981cd237640.jsonl.gz", "strip_func_name": "sub_44FDF6", "query": "\n\n\n__int64 __fastcall sub_44FDF6(__int64 *a1)\n{\nint v1; // ecx\nint v2; // er8\nint v3; // er9\nint v4; // ecx\nint v5; // er8\nint v6; // er9\nint v8; // ecx\nint v9; // er8\nint v10; // er9\nint v11; // edx\nint v12; // ecx\nint v13; // er8\nint v14; // er9\nint v15; // edx\nint v16; // ecx\nint v17; // er8\nint v18; // er9\n__int64 v19; // rax\nint v20; // ecx\nint v21; // er8\nint v22; // er9\nint v23; // edx\nint v24; // ecx\nint v25; // er8\nint v26; // er9\n__int64 v27; // [rsp+18h] [rbp-168h] BYREF\n__int64 v28; // [rsp+20h] [rbp-160h] BYREF\nint v29; // [rsp+2Ch] [rbp-154h]\nint v30; // [rsp+4Ch] [rbp-134h]\nint v31; // [rsp+78h] [rbp-108h]\nint v32; // [rsp+140h] [rbp-40h]\n__int64 v33; // [rsp+170h] [rbp-10h]\n__int64 v34; // [rsp+178h] [rbp-8h]\n\nsub_44CFE3(a1[2], a1[1], (__int64)&v28);\nv28 = a1[297];\nif ( (*(_QWORD *)(*a1 + 2136) & 0x10000LL) != 0 )\nv31 = 1;\nif ( (*(_QWORD *)(*a1 + 2136) & 0x1000000LL) != 0 )\nv32 = 1;\nif ( (*(_QWORD *)(*a1 + 2136) & 0x10LL) == 0\n&& (*(_DWORD *)(a1[2] + 552) == 2\n|| *(_DWORD *)(a1[2] + 552) == 1 && (*(_QWORD *)(*a1 + 2136) & 0x2000000000000000LL) == 0) )\n{\nsub_470697(a1[297], 3, (unsigned int)\"Disable PTK0 rekey support - replaced with disconnect\", v1, v2, v3);\nv30 = 1;\n}\nif ( v29 && *(__int64 *)(*a1 + 2136) < 0 )\nsub_470697(a1[297], 2, (unsigned int)\"Extended Key ID supported\", v1, v2, v3);\nelse\nv29 = 0;\na1[304] = (__int64)sub_436096((char *)a1 + 29, &v28, off_4B8960, a1);\nif ( !a1[304] )\n{\nsub_46FC12(5, (unsigned int)\"WPA initialization failed.\", (_DWORD)a1, v4, v5, v6);\nreturn 0xFFFFFFFFLL;\n}\nif ( (unsigned int)sub_45940B(a1, 1LL) )\n{\nsub_46FC12(5, (unsigned int)\"Could not set PrivacyInvoked for interface %s\", a1[2], v8, v9, v10);\nreturn 0xFFFFFFFFLL;\n}\nv34 = sub_43E5C3(a1[304], &v27);\nif ( (unsigned int)sub_459471(a1, v34, v27) )\n{\nsub_46FC12(5, (unsigned int)\"Failed to configure WPA IE for the kernel driver.\", v11, v12, v13, v14);\nreturn 0xFFFFFFFFLL;\n}\nif ( (unsigned int)sub_44CEB5(a1) )\n{\nsub_46FC12(5, (unsigned int)\"Initialization of RSN pre-authentication failed.\", v15, v16, v17, v18);\nreturn 0xFFFFFFFFLL;\n}\nif ( (unsigned int)sub_459CCD(a1) || !sub_44CE9C(*(_DWORD *)(a1[2] + 492)) )\nreturn 0LL;\nif ( *(_BYTE *)(a1[2] + 17) )\nv19 = a1[2] + 17;\nelse\nv19 = a1[2];\nv33 = v19;\na1[321] = sub_4A1D93(v19, 0LL, 35085LL, sub_44F8CC, a1, 1LL);\nif ( !a1[321] )\n{\nsub_46FC12(5, (unsigned int)\"Failed to open l2_packet interface\", (_DWORD)a1, v20, v21, v22);\nreturn 0xFFFFFFFFLL;\n}\nif ( !(unsigned int)sub_44FBCE(a1, v33) )\nreturn 0LL;\nsub_46FC12(5, (unsigned int)\"Failed to open ETH_P_OUI interface\", v23, v24, v25, v26);\nreturn 0xFFFFFFFFLL;\n}\n\n\n\nQ:[a1,v27,v28,v33,v34,sub_44FDF6,sub_44CFE3,sub_470697,sub_436096,sub_46FC12,sub_45940B,sub_43E5C3,sub_459471,sub_44CEB5,sub_459CCD,sub_44CE9C,sub_4A1D93,sub_44F8CC,sub_44FBCE,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'hapd', 'v27': 'wpa_ie_len', 'v28': '_conf', 'v33': 'ft_iface', 'v34': 'wpa_ie', 'sub_44FDF6': 'hostapd_setup_wpa', 'sub_44CFE3': 'hostapd_wpa_auth_conf', 'sub_470697': 'wpa_msg', 'sub_436096': 'wpa_init', 'sub_46FC12': 'wpa_printf', 'sub_45940B': 'hostapd_set_privacy', 'sub_43E5C3': 'wpa_auth_get_wpa_ie', 'sub_459471': 'hostapd_set_generic_elem', 'sub_44CEB5': 'rsn_preauth_iface_init', 'sub_459CCD': 'hostapd_drv_none', 'sub_44CE9C': 'wpa_key_mgmt_ft_4', 'sub_4A1D93': 'l2_packet_init', 'sub_44F8CC': 'hostapd_rrb_receive', 'sub_44FBCE': 'hostapd_wpa_register_ft_oui'}"} |
|
XXH_readBE32 | a0f01364066065e7e06b717f9af4c3ccf1ba78033671ba67024a6bec7bcc3004 | Tina-Linux | tina-V83x | NA | static U32 XXH_readBE32(const void* ptr)
{
return XXH_CPU_LITTLE_ENDIAN ? XXH_swap32(XXH_read32(ptr)) : XXH_read32(ptr);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4216A7", "function_addr": 4331175, "binary_name": "a0f01364066065e7e06b717f9af4c3ccf1ba78033671ba67024a6bec7bcc3004.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 8"], [3, "mov [rbp+var_8], rdi"], [4, "mov eax, offset unk_431320"], [5, "movzx eax, byte ptr [rax]"], [6, "test al, al"], [7, "jz short loc_4216CF"], [8, "mov rax, [rbp+var_8]"], [9, "mov rdi, rax"], [10, "call sub_421691"], [11, "bswap eax"], [12, "jmp short locret_4216DB"], [13, "mov rax, [rbp+var_8]"], [14, "mov rdi, rax"], [15, "call sub_421691"], [16, "leave"], [17, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [8, 3], [9, 8], [11, 10], [13, 3], [14, 13], [17, 15], [17, 11]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/a0f01364066065e7e06b717f9af4c3ccf1ba78033671ba67024a6bec7bcc3004_a0f01364066065e7e06b717f9af4c3ccf1ba78033671ba67024a6bec7bcc3004.jsonl.gz", "strip_func_name": "sub_4216A7", "query": "\n\n\n__int64 __fastcall sub_4216A7(unsigned int *a1)\n{\n__int64 result; // rax\n\nif ( unk_431320 )\nresult = _byteswap_ulong(sub_421691(a1));\nelse\nresult = sub_421691(a1);\nreturn result;\n}\n\n\n\nQ:[a1,sub_4216A7,sub_421691,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ptr', 'sub_4216A7': 'XXH_readBE32', 'sub_421691': 'XXH_read32'}"} |
|
fs_fchown | 61743b2157e656994e7cb2b64fddfde17eccebb82743e4e1e57bb11fe9f3ffa9 | clibs | clib | NA | int
fs_fchown (FILE *file, int uid, int gid) {
#ifdef _WIN32
errno = ENOSYS;
return -1;
#else
int fd = fileno(file);
return fchown(fd, (uid_t) uid, (gid_t) gid);
#endif
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_411896", "function_addr": 4266134, "binary_name": "61743b2157e656994e7cb2b64fddfde17eccebb82743e4e1e57bb11fe9f3ffa9.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+stream], rdi"], [4, "mov [rbp+owner], esi"], [5, "mov [rbp+group], edx"], [6, "mov rax, [rbp+stream]"], [7, "mov rdi, rax"], [8, "call _fileno"], [9, "mov [rbp+fd], eax"], [10, "mov edx, [rbp+group]"], [11, "mov ecx, [rbp+owner]"], [12, "mov eax, [rbp+fd]"], [13, "mov esi, ecx"], [14, "mov edi, eax"], [15, "call _fchown"], [16, "leave"], [17, "retn"]], "data_dep": [[6, 3], [7, 6], [9, 8], [10, 5], [11, 4], [12, 9], [13, 11], [14, 12], [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/61743b2157e656994e7cb2b64fddfde17eccebb82743e4e1e57bb11fe9f3ffa9_61743b2157e656994e7cb2b64fddfde17eccebb82743e4e1e57bb11fe9f3ffa9.jsonl.gz", "strip_func_name": "sub_411896", "query": "\n\n\nint __fastcall sub_411896(FILE *a1, __uid_t a2, __gid_t a3)\n{\nint fd; // [rsp+1Ch] [rbp-4h]\n\nfd = fileno(a1);\nreturn fchown(fd, a2, a3);\n}\n\n\n\nQ:[a3,a1,a2,sub_411896,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'gid', 'a1': 'file', 'a2': 'uid', 'sub_411896': 'fs_fchown'}"} |
|
WriteDep | 7a9fd741a95dae0778f24573dd0254b72607ff4da9f089d1feccd19f23d872f4 | MEGA65 | mega65-tools | NA | static void WriteDep (FILE* F, InputType Types)
/* Helper function. Writes all file names that match Types to the output */
{
unsigned I;
/* Loop over all files */
unsigned FileCount = CollCount (&IFiles);
for (I = 0; I < FileCount; ++I) {
/* Get the next input file */
const IFile* IF = (const IFile*) CollAt (&IFiles, I);
/* Ignore it if it is not of the correct type */
if ((IF->Type & Types) == 0) {
continue;
}
/* If this is not the first file, add a space */
if (I > 0) {
fputc (' ', F);
}
/* Print the dependency escaping spaces */
WriteEscaped (F, IF->Name);
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_451344", "function_addr": 4526916, "binary_name": "7a9fd741a95dae0778f24573dd0254b72607ff4da9f089d1feccd19f23d872f4.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+stream], rdi"], [4, "mov [rbp+var_1C], esi"], [5, "mov edi, offset unk_498CC0"], [6, "call sub_450368"], [7, "mov [rbp+var_8], eax"], [8, "mov [rbp+var_4], 0"], [9, "jmp short loc_4513BF"], [10, "mov eax, [rbp+var_4]"], [11, "mov esi, eax"], [12, "mov edi, offset unk_498CC0"], [13, "call sub_4503A4"], [14, "mov [rbp+var_10], rax"], [15, "mov rax, [rbp+var_10]"], [16, "mov eax, [rax+18h]"], [17, "and eax, [rbp+var_1C]"], [18, "test eax, eax"], [19, "jz short loc_4513BA"], [20, "cmp [rbp+var_4], 0"], [21, "jz short loc_4513A1"], [22, "mov rax, [rbp+stream]"], [23, "mov rsi, rax"], [24, "mov edi, 20h "], [25, "call _fputc"], [26, "mov rax, [rbp+var_10]"], [27, "lea rdx, [rax+1Ch]"], [28, "mov rax, [rbp+stream]"], [29, "mov rsi, rdx"], [30, "mov rdi, rax"], [31, "call sub_4512EA"], [32, "jmp short loc_4513BB"], [33, "nop"], [34, "add [rbp+var_4], 1"], [35, "mov eax, [rbp+var_4]"], [36, "cmp eax, [rbp+var_8]"], [37, "jb short loc_451369"], [38, "nop"], [39, "nop"], [40, "leave"], [41, "retn"]], "data_dep": [[7, 6], [10, 34], [10, 8], [11, 10], [14, 13], [15, 14], [16, 15], [17, 4], [17, 16], [18, 17], [19, 18], [20, 8], [20, 34], [21, 20], [22, 3], [23, 22], [26, 14], [27, 27], [27, 26], [28, 3], [29, 27], [30, 28], [34, 34], [34, 8], [35, 8], [35, 34], [36, 7], [36, 35], [37, 36], [41, 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/7a9fd741a95dae0778f24573dd0254b72607ff4da9f089d1feccd19f23d872f4_7a9fd741a95dae0778f24573dd0254b72607ff4da9f089d1feccd19f23d872f4.jsonl.gz", "strip_func_name": "sub_451344", "query": "\n\n\n__int64 __fastcall sub_451344(FILE *a1, int a2)\n{\n__int64 result; // rax\n__int64 v3; // [rsp+10h] [rbp-10h]\nunsigned int v4; // [rsp+18h] [rbp-8h]\nunsigned int i; // [rsp+1Ch] [rbp-4h]\n\nv4 = sub_450368(dword_498CC0);\nfor ( i = 0; ; ++i )\n{\nresult = i;\nif ( i >= v4 )\nbreak;\nv3 = sub_4503A4((__int64)dword_498CC0, i);\nif ( (a2 & *(_DWORD *)(v3 + 24)) != 0 )\n{\nif ( i )\nfputc(32, a1);\nsub_4512EA(a1, (_BYTE *)(v3 + 28));\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v3,v4,i,sub_451344,sub_450368,sub_4503A4,sub_4512EA,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'F', 'a2': 'Types', 'v3': 'IF_0', 'v4': 'FileCount', 'i': 'I', 'sub_451344': 'WriteDep', 'sub_450368': 'CollCount_30', 'sub_4503A4': 'CollAt_19', 'sub_4512EA': 'WriteEscaped'}"} |
|
ucg_UndoRotate | 601bbf0a3c8af2b2ed9b72c83eea51f15b606cb2973e6cbbce20f33cb84f643f | olikraus | ucglib | NA | void ucg_UndoRotate(ucg_t *ucg)
{
if ( ucg->rotate_chain_device_cb != NULL )
{
ucg->device_cb = ucg->rotate_chain_device_cb;
ucg->rotate_chain_device_cb = NULL;
}
ucg_GetDimension(ucg);
ucg_SetMaxClipRange(ucg);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40A3F2", "function_addr": 4236274, "binary_name": "601bbf0a3c8af2b2ed9b72c83eea51f15b606cb2973e6cbbce20f33cb84f643f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov rax, [rbp+var_8]"], [5, "mov rax, [rax+18h]"], [6, "test rax, rax"], [7, "jz short loc_40A427"], [8, "mov rax, [rbp+var_8]"], [9, "mov rdx, [rax+18h]"], [10, "mov rax, [rbp+var_8]"], [11, "mov [rax+8], rdx"], [12, "mov rax, [rbp+var_8]"], [13, "mov qword ptr [rax+18h], 0"], [14, "mov rax, [rbp+var_8]"], [15, "mov rdi, rax"], [16, "call sub_407970"], [17, "mov rax, [rbp+var_8]"], [18, "mov rdi, rax"], [19, "call sub_407938"], [20, "nop"], [21, "leave"], [22, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 3], [9, 8], [10, 3], [11, 10], [11, 9], [12, 3], [13, 12], [14, 3], [15, 14], [17, 3], [18, 17], [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/601bbf0a3c8af2b2ed9b72c83eea51f15b606cb2973e6cbbce20f33cb84f643f_601bbf0a3c8af2b2ed9b72c83eea51f15b606cb2973e6cbbce20f33cb84f643f.jsonl.gz", "strip_func_name": "sub_40A3F2", "query": "\n\n\n__int64 __fastcall sub_40A3F2(__int64 a1)\n{\nif ( *(_QWORD *)(a1 + 24) )\n{\n*(_QWORD *)(a1 + 8) = *(_QWORD *)(a1 + 24);\n*(_QWORD *)(a1 + 24) = 0LL;\n}\nsub_407970(a1);\nreturn sub_407938(a1);\n}\n\n\n\nQ:[a1,sub_40A3F2,sub_407970,sub_407938,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ucg', 'sub_40A3F2': 'ucg_UndoRotate', 'sub_407970': 'ucg_GetDimension', 'sub_407938': 'ucg_SetMaxClipRange'}"} |
|
store_packed_bf | 887b6b85d2db1ce9185489bb6817dfb876b3322df77b313f15e557aa4eb5b0f7 | andreiw | tinycc | NA | static void store_packed_bf(int bit_pos, int bit_size)
{
int bits, n, o, m, c;
c = (vtop->r & (VT_VALMASK | VT_LVAL | VT_SYM)) == VT_CONST;
vswap(); // X B
save_reg_upstack(vtop->r, 1);
bits = 0, o = bit_pos >> 3, bit_pos &= 7;
do {
incr_bf_adr(o); // X B
vswap(); //B X
c ? vdup() : gv_dup(); // B V X
vrott(3); // X B V
if (bits)
vpushi(bits), gen_op(TOK_SHR);
if (bit_pos)
vpushi(bit_pos), gen_op(TOK_SHL);
n = 8 - bit_pos;
if (n > bit_size)
n = bit_size;
if (n < 8) {
m = ((1 << n) - 1) << bit_pos;
vpushi(m), gen_op('&'); // X B V1
vpushv(vtop-1); // X B V1 B
vpushi(m & 0x80 ? ~m & 0x7f : ~m);
gen_op('&'); // X B V1 B1
gen_op('|'); // X B V2
}
vdup(), vtop[-1] = vtop[-2]; // X B B V2
vstore(), vpop(); // X B
bits += n, bit_size -= n, bit_pos = 0, o = 1;
} while (bit_size);
vpop(), vpop();
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_411112", "function_addr": 4264210, "binary_name": "887b6b85d2db1ce9185489bb6817dfb876b3322df77b313f15e557aa4eb5b0f7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 38h"], [4, "mov [rbp+var_34], edi"], [5, "mov [rbp+var_38], esi"], [6, "mov rax, cs:qword_465A40"], [7, "movzx eax, word ptr [rax+10h]"], [8, "movzx eax, ax"], [9, "and eax, 33Fh"], [10, "cmp eax, 30h "], [11, "setz al"], [12, "movzx eax, al"], [13, "mov [rbp+var_20], eax"], [14, "call sub_40FFF3"], [15, "mov rax, cs:qword_465A40"], [16, "movzx eax, word ptr [rax+10h]"], [17, "movzx eax, ax"], [18, "mov esi, 1"], [19, "mov edi, eax"], [20, "call sub_410A88"], [21, "mov [rbp+var_14], 0"], [22, "mov eax, [rbp+var_34]"], [23, "sar eax, 3"], [24, "mov [rbp+var_1C], eax"], [25, "and [rbp+var_34], 7"], [26, "mov eax, [rbp+var_1C]"], [27, "mov edi, eax"], [28, "call sub_410F13"], [29, "call sub_40FFF3"], [30, "cmp [rbp+var_20], 0"], [31, "jz short loc_41118F"], [32, "call sub_41035D"], [33, "jmp short loc_411194"], [34, "call sub_411A65"], [35, "mov edi, 3"], [36, "call sub_4105CE"], [37, "cmp [rbp+var_14], 0"], [38, "jz short loc_4111B8"], [39, "mov eax, [rbp+var_14]"], [40, "mov edi, eax"], [41, "call sub_4101B0"], [42, "mov edi, 0C9h"], [43, "call sub_4128E1"], [44, "cmp [rbp+var_34], 0"], [45, "jz short loc_4111D2"], [46, "mov eax, [rbp+var_34]"], [47, "mov edi, eax"], [48, "call sub_4101B0"], [49, "mov edi, 1"], [50, "call sub_4128E1"], [51, "mov eax, 8"], [52, "sub eax, [rbp+var_34]"], [53, "mov [rbp+var_18], eax"], [54, "mov eax, [rbp+var_18]"], [55, "cmp eax, [rbp+var_38]"], [56, "jle short loc_4111EB"], [57, "mov eax, [rbp+var_38]"], [58, "mov [rbp+var_18], eax"], [59, "cmp [rbp+var_18], 7"], [60, "jg short loc_41126B"], [61, "mov eax, [rbp+var_18]"], [62, "mov edx, 1"], [63, "mov ecx, eax"], [64, "shl edx, cl"], [65, "mov eax, edx"], [66, "lea edx, [rax-1]"], [67, "mov eax, [rbp+var_34]"], [68, "mov ecx, eax"], [69, "shl edx, cl"], [70, "mov eax, edx"], [71, "mov [rbp+var_24], eax"], [72, "mov eax, [rbp+var_24]"], [73, "mov edi, eax"], [74, "call sub_4101B0"], [75, "mov edi, 26h "], [76, "call sub_4128E1"], [77, "mov rax, cs:qword_465A40"], [78, "sub rax, 40h "], [79, "mov rdi, rax"], [80, "call sub_4102CE"], [81, "mov eax, [rbp+var_24]"], [82, "and eax, 80h"], [83, "test eax, eax"], [84, "jz short loc_41124B"], [85, "mov eax, [rbp+var_24]"], [86, "not eax"], [87, "and eax, 7Fh"], [88, "jmp short loc_411250"], [89, "mov eax, [rbp+var_24]"], [90, "not eax"], [91, "mov edi, eax"], [92, "call sub_4101B0"], [93, "mov edi, 26h "], [94, "call sub_4128E1"], [95, "mov edi, 7Ch "], [96, "call sub_4128E1"], [97, "call sub_41035D"], [98, "mov rax, cs:qword_465A40"], [99, "mov rdx, cs:qword_465A40"], [100, "sub rdx, 40h "], [101, "mov rcx, [rax-80h]"], [102, "mov rbx, [rax-78h]"], [103, "mov [rdx], rcx"], [104, "mov [rdx+8], rbx"], [105, "mov rcx, [rax-70h]"], [106, "mov rbx, [rax-68h]"], [107, "mov [rdx+10h], rcx"], [108, "mov [rdx+18h], rbx"], [109, "mov rcx, [rax-60h]"], [110, "mov rbx, [rax-58h]"], [111, "mov [rdx+20h], rcx"], [112, "mov [rdx+28h], rbx"], [113, "mov rcx, [rax-50h]"], [114, "mov rbx, [rax-48h]"], [115, "mov [rdx+30h], rcx"], [116, "mov [rdx+38h], rbx"], [117, "call sub_414636"], [118, "call sub_41012A"], [119, "mov eax, [rbp+var_18]"], [120, "add [rbp+var_14], eax"], [121, "mov eax, [rbp+var_18]"], [122, "sub [rbp+var_38], eax"], [123, "mov [rbp+var_34], 0"], [124, "mov [rbp+var_1C], 1"], [125, "cmp [rbp+var_38], 0"], [126, "jnz loc_411173"], [127, "call sub_41012A"], [128, "call sub_41012A"], [129, "nop"], [130, "mov rbx, [rbp+var_8]"], [131, "leave"], [132, "retn"]], "data_dep": [[7, 6], [8, 7], [9, 8], [10, 9], [11, 9], [11, 10], [12, 11], [13, 12], [16, 15], [17, 16], [19, 17], [22, 4], [23, 22], [24, 23], [25, 4], [26, 124], [26, 24], [27, 26], [30, 13], [31, 30], [37, 21], [37, 120], [38, 37], [39, 21], [39, 120], [40, 39], [44, 25], [44, 123], [45, 44], [46, 123], [46, 25], [47, 46], [52, 51], [52, 25], [52, 123], [53, 52], [54, 53], [55, 54], [55, 122], [55, 5], [56, 55], [57, 122], [57, 5], [58, 57], [59, 58], [59, 53], [60, 59], [61, 58], [61, 53], [63, 61], [64, 62], [64, 63], [65, 64], [66, 103], [66, 64], [66, 112], [66, 107], [66, 116], [66, 111], [66, 104], [66, 115], [66, 108], [66, 65], [67, 123], [67, 25], [68, 67], [69, 66], [69, 68], [70, 69], [71, 70], [72, 71], [73, 72], [78, 77], [79, 78], [81, 71], [82, 81], [83, 82], [84, 83], [85, 71], [86, 85], [87, 86], [89, 71], [90, 89], [91, 90], [91, 87], [100, 99], [101, 115], [101, 108], [101, 103], [101, 112], [101, 98], [101, 107], [101, 116], [101, 111], [101, 104], [102, 98], [102, 107], [102, 116], [102, 111], [102, 104], [102, 115], [102, 108], [102, 103], [102, 112], [103, 101], [103, 100], [104, 100], [104, 102], [105, 104], [105, 98], [106, 104], [106, 98], [107, 105], [107, 100], [108, 100], [108, 106], [109, 108], [109, 98], [110, 108], [110, 98], [111, 100], [111, 109], [112, 100], [112, 110], [113, 112], [113, 98], [114, 112], [114, 98], [115, 100], [115, 113], [116, 100], [116, 114], [119, 58], [119, 53], [120, 21], [120, 119], [120, 120], [121, 58], [121, 53], [122, 122], [122, 5], [122, 121], [125, 122], [126, 125], [132, 128]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/887b6b85d2db1ce9185489bb6817dfb876b3322df77b313f15e557aa4eb5b0f7_887b6b85d2db1ce9185489bb6817dfb876b3322df77b313f15e557aa4eb5b0f7.jsonl.gz", "strip_func_name": "sub_411112", "query": "\n\n\n__int64 __fastcall sub_411112(int a1, int a2)\n{\n__int64 v2; // rdx\n__int64 v3; // rcx\n__int64 v4; // r8\n__int64 v5; // r9\n__int64 v6; // rdi\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 v19; // eax\n__int64 v20; // rax\n_QWORD *v21; // rdx\n__int64 v22; // rbx\n__int64 v23; // rbx\n__int64 v24; // rbx\n__int64 v25; // rbx\nunsigned int v28; // [rsp+Ch] [rbp-34h]\nunsigned int v29; // [rsp+1Ch] [rbp-24h]\n_BOOL4 v30; // [rsp+20h] [rbp-20h]\nunsigned int v31; // [rsp+24h] [rbp-1Ch]\nint v32; // [rsp+28h] [rbp-18h]\nint v33; // [rsp+2Ch] [rbp-14h]\n\nv30 = (*(_WORD *)(qword_465A40 + 16) & 0x33F) == 48;\nsub_40FFF3();\nsub_410A88(*(_WORD *)(qword_465A40 + 16), 1);\nv33 = 0;\nv31 = a1 >> 3;\nv28 = a1 & 7;\ndo\n{\nsub_410F13(v31, 1LL);\nsub_40FFF3();\nif ( v30 )\nsub_41035D(v31, 1LL, v2, v3, v4, v5);\nelse\nsub_411A65();\nv6 = 3LL;\nsub_4105CE(3);\nif ( v33 )\n{\nsub_4101B0(v33, 1LL, v7, v8, v9, v10);\nv6 = 201LL;\nsub_4128E1(201LL);\n}\nif ( v28 )\n{\nsub_4101B0(v28, 1LL, v7, v8, v9, v10);\nv6 = 1LL;\nsub_4128E1(1LL);\n}\nv32 = 8 - v28;\nif ( (int)(8 - v28) > a2 )\nv32 = a2;\nif ( v32 <= 7 )\n{\nv29 = ((1 << v32) - 1) << v28;\nsub_4101B0(v29, 1LL, v29, v28, v9, v10);\nsub_4128E1(38LL);\nsub_4102CE((_QWORD *)(qword_465A40 - 64), 1LL, v11, v12, v13, v14);\nif ( (v29 & 0x80) != 0 )\nv19 = ~(_BYTE)v29 & 0x7F;\nelse\nv19 = ~v29;\nsub_4101B0(v19, 1LL, v15, v16, v17, v18);\nsub_4128E1(38LL);\nv6 = 124LL;\nsub_4128E1(124LL);\n}\nsub_41035D(v6, 1LL, v7, v8, v9, v10);\nv20 = qword_465A40;\nv21 = (_QWORD *)(qword_465A40 - 64);\nv22 = *(_QWORD *)(qword_465A40 - 120);\n*v21 = *(_QWORD *)(qword_465A40 - 128);\nv21[1] = v22;\nv23 = *(_QWORD *)(v20 - 104);\nv21[2] = *(_QWORD *)(v20 - 112);\nv21[3] = v23;\nv24 = *(_QWORD *)(v20 - 88);\nv21[4] = *(_QWORD *)(v20 - 96);\nv21[5] = v24;\nv25 = *(_QWORD *)(v20 - 72);\nv21[6] = *(_QWORD *)(v20 - 80);\nv21[7] = v25;\nsub_414636();\nsub_41012A();\nv33 += v32;\na2 -= v32;\nv28 = 0;\nv31 = 1;\n}\nwhile ( a2 );\nsub_41012A();\nreturn sub_41012A();\n}\n\n\n\nQ:[a1,a2,v6,v28,v29,v30,v31,v32,v33,sub_411112,sub_40FFF3,sub_410A88,sub_410F13,sub_41035D,sub_411A65,sub_4105CE,sub_4101B0,sub_4128E1,sub_4102CE,sub_414636,sub_41012A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'bit_pos', 'a2': 'bit_size', 'v6': 'bit_pos', 'v28': 'bit_posa', 'v29': 'm', 'v30': 'c', 'v31': 'o', 'v32': 'n', 'v33': 'bits', 'sub_411112': 'store_packed_bf', 'sub_40FFF3': 'vswap', 'sub_410A88': 'save_reg_upstack', 'sub_410F13': 'incr_bf_adr', 'sub_41035D': 'vdup', 'sub_411A65': 'gv_dup', 'sub_4105CE': 'vrott', 'sub_4101B0': 'vpushi', 'sub_4128E1': 'gen_op', 'sub_4102CE': 'vpushv', 'sub_414636': 'vstore', 'sub_41012A': 'vpop'}"} |
|
cu_print_results | cdeb530cbb43b294a90801daeca3e32e1fab81066c607ce3c32f8b60d46322de | danfis | cu | NA | static void cu_print_results(void)
{
fprintf(stdout, "\n");
fprintf(stdout, "==================================================\n");
fprintf(stdout, "| | failed | succeed | total |\n");
fprintf(stdout, "|------------------------------------------------|\n");
fprintf(stdout, "| assertions: | %6d | %7d | %5d |\n",
cu_fail_checks, cu_success_checks,
cu_success_checks+cu_fail_checks);
fprintf(stdout, "| tests: | %6d | %7d | %5d |\n",
cu_fail_tests, cu_success_tests,
cu_success_tests+cu_fail_tests);
fprintf(stdout, "| tests suites: | %6d | %7d | %5d |\n",
cu_fail_test_suites, cu_success_test_suites,
cu_success_test_suites+cu_fail_test_suites);
fprintf(stdout, "==================================================\n");
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401D84", "function_addr": 4201860, "binary_name": "cdeb530cbb43b294a90801daeca3e32e1fab81066c607ce3c32f8b60d46322de.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov rax, cs:stdout"], [3, "mov rsi, rax"], [4, "mov edi, 0Ah"], [5, "call _fputc"], [6, "mov rax, cs:stdout"], [7, "mov rcx, rax"], [8, "mov edx, 33h "], [9, "mov esi, 1"], [10, "mov edi, offset asc_403238"], [11, "call _fwrite"], [12, "mov rax, cs:stdout"], [13, "mov rcx, rax"], [14, "mov edx, 33h "], [15, "mov esi, 1"], [16, "mov edi, offset aFailedSucceedT"], [17, "call _fwrite"], [18, "mov rax, cs:stdout"], [19, "mov rcx, rax"], [20, "mov edx, 33h "], [21, "mov esi, 1"], [22, "mov edi, offset asc_4032A8"], [23, "call _fwrite"], [24, "mov edx, cs:dword_405200"], [25, "mov eax, cs:dword_405204"], [26, "lea esi, [rdx+rax]"], [27, "mov ecx, cs:dword_405200"], [28, "mov edx, cs:dword_405204"], [29, "mov rax, cs:stdout"], [30, "mov r8d, esi"], [31, "mov esi, offset aAssertions6d7d"], [32, "mov rdi, rax"], [33, "mov eax, 0"], [34, "call _fprintf"], [35, "mov edx, cs:dword_4051F8"], [36, "mov eax, cs:dword_4051FC"], [37, "lea esi, [rdx+rax]"], [38, "mov ecx, cs:dword_4051F8"], [39, "mov edx, cs:dword_4051FC"], [40, "mov rax, cs:stdout"], [41, "mov r8d, esi"], [42, "mov esi, offset aTests6d7d5d"], [43, "mov rdi, rax"], [44, "mov eax, 0"], [45, "call _fprintf"], [46, "mov edx, cs:dword_4051F0"], [47, "mov eax, cs:dword_4051F4"], [48, "lea esi, [rdx+rax]"], [49, "mov ecx, cs:dword_4051F0"], [50, "mov edx, cs:dword_4051F4"], [51, "mov rax, cs:stdout"], [52, "mov r8d, esi"], [53, "mov esi, offset aTestsSuites6d7"], [54, "mov rdi, rax"], [55, "mov eax, 0"], [56, "call _fprintf"], [57, "mov rax, cs:stdout"], [58, "mov rcx, rax"], [59, "mov edx, 33h "], [60, "mov esi, 1"], [61, "mov edi, offset asc_403238"], [62, "call _fwrite"], [63, "nop"], [64, "pop rbp"], [65, "retn"]], "data_dep": [[3, 2], [7, 6], [13, 12], [19, 18], [26, 21], [26, 25], [30, 26], [32, 29], [37, 36], [37, 31], [41, 37], [43, 40], [48, 42], [48, 47], [52, 48], [54, 51], [58, 57], [64, 0], [65, 62]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/cdeb530cbb43b294a90801daeca3e32e1fab81066c607ce3c32f8b60d46322de_cdeb530cbb43b294a90801daeca3e32e1fab81066c607ce3c32f8b60d46322de.jsonl.gz", "strip_func_name": "sub_401D84", "query": "\n\n\nsize_t sub_401D84()\n{\nfputc(10, stdout);\nfwrite(\"==================================================\\n\", 1uLL, 0x33uLL, stdout);\nfwrite(\"| | failed | succeed | total |\\n\", 1uLL, 0x33uLL, stdout);\nfwrite(\"|------------------------------------------------|\\n\", 1uLL, 0x33uLL, stdout);\nfprintf(\nstdout,\n\"| assertions: | %6d | %7d | %5d |\\n\",\n(unsigned int)dword_405204,\n(unsigned int)dword_405200,\n(unsigned int)(dword_405200 + dword_405204));\nfprintf(\nstdout,\n\"| tests: | %6d | %7d | %5d |\\n\",\n(unsigned int)dword_4051FC,\n(unsigned int)dword_4051F8,\n(unsigned int)(dword_4051F8 + dword_4051FC));\nfprintf(\nstdout,\n\"| tests suites: | %6d | %7d | %5d |\\n\",\n(unsigned int)dword_4051F4,\n(unsigned int)dword_4051F0,\n(unsigned int)(dword_4051F0 + dword_4051F4));\nreturn fwrite(\"==================================================\\n\", 1uLL, 0x33uLL, stdout);\n}\n\n\n\nQ:[sub_401D84,]\nAssistant: ", "hints": "[]", "response": "{'sub_401D84': 'cu_print_results'}"} |
|
line_mask_steep | 1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a | FASTSHIFT | lv_gba_emu | NA | LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t line_mask_steep(lv_opa_t * mask_buf, lv_coord_t abs_x, lv_coord_t abs_y,
lv_coord_t len,
lv_draw_mask_line_param_t * p)
{
int32_t k;
int32_t x_at_y;
/*At the beginning of the mask if the limit line is greater than the mask's y.
*Then the mask is in the "wrong" area*/
x_at_y = (int32_t)((int32_t)p->xy_steep * abs_y) >> 10;
if(p->xy_steep > 0) x_at_y++;
if(x_at_y < abs_x) {
if(p->inv) {
return LV_DRAW_MASK_RES_FULL_COVER;
}
else {
return LV_DRAW_MASK_RES_TRANSP;
}
}
/*At the end of the mask if the limit line is smaller than the mask's y.
*Then the mask is in the "good" area*/
x_at_y = (int32_t)((int32_t)p->xy_steep * (abs_y)) >> 10;
if(x_at_y > abs_x + len) {
if(p->inv) {
return LV_DRAW_MASK_RES_TRANSP;
}
else {
return LV_DRAW_MASK_RES_FULL_COVER;
}
}
/*X start*/
int32_t xs = ((abs_y * 256) * p->xy_steep) >> 10;
int32_t xsi = xs >> 8;
int32_t xsf = xs & 0xFF;
/*X end*/
int32_t xe = (((abs_y + 1) * 256) * p->xy_steep) >> 10;
int32_t xei = xe >> 8;
int32_t xef = xe & 0xFF;
lv_opa_t m;
k = xsi - abs_x;
if(xsi != xei && (p->xy_steep < 0 && xsf == 0)) {
xsf = 0xFF;
xsi = xei;
k--;
}
if(xsi == xei) {
if(k >= 0 && k < len) {
m = (xsf + xef) >> 1;
if(p->inv) m = 255 - m;
mask_buf[k] = mask_mix(mask_buf[k], m);
}
k++;
if(p->inv) {
k = xsi - abs_x;
if(k >= len) {
return LV_DRAW_MASK_RES_TRANSP;
}
if(k >= 0) lv_memzero(&mask_buf[0], k);
}
else {
if(k > len) k = len;
if(k == 0) return LV_DRAW_MASK_RES_TRANSP;
else if(k > 0) lv_memzero(&mask_buf[k], len - k);
}
}
else {
int32_t y_inters;
if(p->xy_steep < 0) {
y_inters = (xsf * (-p->yx_steep)) >> 10;
if(k >= 0 && k < len) {
m = (y_inters * xsf) >> 9;
if(p->inv) m = 255 - m;
mask_buf[k] = mask_mix(mask_buf[k], m);
}
k--;
int32_t x_inters = ((255 - y_inters) * (-p->xy_steep)) >> 10;
if(k >= 0 && k < len) {
m = 255 - (((255 - y_inters) * x_inters) >> 9);
if(p->inv) m = 255 - m;
mask_buf[k] = mask_mix(mask_buf[k], m);
}
k += 2;
if(p->inv) {
k = xsi - abs_x - 1;
if(k > len) k = len;
else if(k > 0) lv_memzero(&mask_buf[0], k);
}
else {
if(k > len) return LV_DRAW_MASK_RES_FULL_COVER;
if(k >= 0) lv_memzero(&mask_buf[k], len - k);
}
}
else {
y_inters = ((255 - xsf) * p->yx_steep) >> 10;
if(k >= 0 && k < len) {
m = 255 - ((y_inters * (255 - xsf)) >> 9);
if(p->inv) m = 255 - m;
mask_buf[k] = mask_mix(mask_buf[k], m);
}
k++;
int32_t x_inters = ((255 - y_inters) * p->xy_steep) >> 10;
if(k >= 0 && k < len) {
m = ((255 - y_inters) * x_inters) >> 9;
if(p->inv) m = 255 - m;
mask_buf[k] = mask_mix(mask_buf[k], m);
}
k++;
if(p->inv) {
k = xsi - abs_x;
if(k > len) return LV_DRAW_MASK_RES_TRANSP;
if(k >= 0) lv_memzero(&mask_buf[0], k);
}
else {
if(k > len) k = len;
if(k == 0) return LV_DRAW_MASK_RES_TRANSP;
else if(k > 0) lv_memzero(&mask_buf[k], len - k);
}
}
}
return LV_DRAW_MASK_RES_CHANGED;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4448E8", "function_addr": 4475112, "binary_name": "1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 58h"], [4, "mov [rbp+var_48], rdi"], [5, "mov eax, ecx"], [6, "mov [rbp+var_60], r8"], [7, "mov ecx, esi"], [8, "mov [rbp+var_4C], cx"], [9, "mov [rbp+var_50], dx"], [10, "mov [rbp+var_54], ax"], [11, "mov rax, [rbp+var_60]"], [12, "mov edx, [rax+20h]"], [13, "movsx eax, [rbp+var_50]"], [14, "imul eax, edx"], [15, "sar eax, 0Ah"], [16, "mov [rbp+var_18], eax"], [17, "mov rax, [rbp+var_60]"], [18, "mov eax, [rax+20h]"], [19, "test eax, eax"], [20, "jle short loc_44492C"], [21, "add [rbp+var_18], 1"], [22, "movsx eax, [rbp+var_4C]"], [23, "cmp [rbp+var_18], eax"], [24, "jge short loc_444958"], [25, "mov rax, [rbp+var_60]"], [26, "movzx eax, byte ptr [rax+30h]"], [27, "and eax, 2"], [28, "test al, al"], [29, "jz short loc_44494E"], [30, "mov eax, 1"], [31, "jmp loc_444E75"], [32, "mov eax, 0"], [33, "jmp loc_444E75"], [34, "mov rax, [rbp+var_60]"], [35, "mov edx, [rax+20h]"], [36, "movsx eax, [rbp+var_50]"], [37, "imul eax, edx"], [38, "sar eax, 0Ah"], [39, "mov [rbp+var_18], eax"], [40, "movsx edx, [rbp+var_4C]"], [41, "movsx eax, [rbp+var_54]"], [42, "add eax, edx"], [43, "cmp [rbp+var_18], eax"], [44, "jle short loc_44499E"], [45, "mov rax, [rbp+var_60]"], [46, "movzx eax, byte ptr [rax+30h]"], [47, "and eax, 2"], [48, "test al, al"], [49, "jz short loc_444994"], [50, "mov eax, 0"], [51, "jmp loc_444E75"], [52, "mov eax, 1"], [53, "jmp loc_444E75"], [54, "movsx eax, [rbp+var_50]"], [55, "shl eax, 8"], [56, "mov edx, eax"], [57, "mov rax, [rbp+var_60]"], [58, "mov eax, [rax+20h]"], [59, "imul eax, edx"], [60, "sar eax, 0Ah"], [61, "mov [rbp+var_28], eax"], [62, "mov eax, [rbp+var_28]"], [63, "sar eax, 8"], [64, "mov [rbp+var_1C], eax"], [65, "mov eax, [rbp+var_28]"], [66, "movzx eax, al"], [67, "mov [rbp+var_20], eax"], [68, "movsx eax, [rbp+var_50]"], [69, "add eax, 1"], [70, "shl eax, 8"], [71, "mov edx, eax"], [72, "mov rax, [rbp+var_60]"], [73, "mov eax, [rax+20h]"], [74, "imul eax, edx"], [75, "sar eax, 0Ah"], [76, "mov [rbp+var_2C], eax"], [77, "mov eax, [rbp+var_2C]"], [78, "sar eax, 8"], [79, "mov [rbp+var_30], eax"], [80, "mov eax, [rbp+var_2C]"], [81, "movzx eax, al"], [82, "mov [rbp+var_34], eax"], [83, "movsx edx, [rbp+var_4C]"], [84, "mov eax, [rbp+var_1C]"], [85, "sub eax, edx"], [86, "mov [rbp+var_14], eax"], [87, "mov eax, [rbp+var_1C]"], [88, "cmp eax, [rbp+var_30]"], [89, "jz short loc_444A2D"], [90, "mov rax, [rbp+var_60]"], [91, "mov eax, [rax+20h]"], [92, "test eax, eax"], [93, "jns short loc_444A2D"], [94, "cmp [rbp+var_20], 0"], [95, "jnz short loc_444A2D"], [96, "mov [rbp+var_20], 0FFh"], [97, "mov eax, [rbp+var_30]"], [98, "mov [rbp+var_1C], eax"], [99, "sub [rbp+var_14], 1"], [100, "mov eax, [rbp+var_1C]"], [101, "cmp eax, [rbp+var_30]"], [102, "jnz loc_444B3D"], [103, "cmp [rbp+var_14], 0"], [104, "js short loc_444A97"], [105, "movsx eax, [rbp+var_54]"], [106, "cmp [rbp+var_14], eax"], [107, "jge short loc_444A97"], [108, "mov edx, [rbp+var_20]"], [109, "mov eax, [rbp+var_34]"], [110, "add eax, edx"], [111, "sar eax, 1"], [112, "mov [rbp+var_21], al"], [113, "mov rax, [rbp+var_60]"], [114, "movzx eax, byte ptr [rax+30h]"], [115, "and eax, 2"], [116, "test al, al"], [117, "jz short loc_444A67"], [118, "not [rbp+var_21]"], [119, "movzx edx, [rbp+var_21]"], [120, "mov eax, [rbp+var_14]"], [121, "movsxd rcx, eax"], [122, "mov rax, [rbp+var_48]"], [123, "add rax, rcx"], [124, "movzx eax, byte ptr [rax]"], [125, "movzx eax, al"], [126, "mov ecx, [rbp+var_14]"], [127, "movsxd rsi, ecx"], [128, "mov rcx, [rbp+var_48]"], [129, "lea rbx, [rsi+rcx]"], [130, "mov esi, edx"], [131, "mov edi, eax"], [132, "call sub_446F11"], [133, "mov [rbx], al"], [134, "add [rbp+var_14], 1"], [135, "mov rax, [rbp+var_60]"], [136, "movzx eax, byte ptr [rax+30h]"], [137, "and eax, 2"], [138, "test al, al"], [139, "jz short loc_444AED"], [140, "movsx edx, [rbp+var_4C]"], [141, "mov eax, [rbp+var_1C]"], [142, "sub eax, edx"], [143, "mov [rbp+var_14], eax"], [144, "movsx eax, [rbp+var_54]"], [145, "cmp [rbp+var_14], eax"], [146, "jl short loc_444AC9"], [147, "mov eax, 0"], [148, "jmp loc_444E75"], [149, "cmp [rbp+var_14], 0"], [150, "js loc_444E70"], [151, "mov eax, [rbp+var_14]"], [152, "movsxd rdx, eax"], [153, "mov rax, [rbp+var_48]"], [154, "mov rsi, rdx"], [155, "mov rdi, rax"], [156, "call sub_44322C"], [157, "jmp loc_444E70"], [158, "movsx eax, [rbp+var_54]"], [159, "cmp [rbp+var_14], eax"], [160, "jle short loc_444AFD"], [161, "movsx eax, [rbp+var_54]"], [162, "mov [rbp+var_14], eax"], [163, "cmp [rbp+var_14], 0"], [164, "jnz short loc_444B0D"], [165, "mov eax, 0"], [166, "jmp loc_444E75"], [167, "cmp [rbp+var_14], 0"], [168, "jle loc_444E70"], [169, "movsx eax, [rbp+var_54]"], [170, "sub eax, [rbp+var_14]"], [171, "cdqe"], [172, "mov edx, [rbp+var_14]"], [173, "movsxd rcx, edx"], [174, "mov rdx, [rbp+var_48]"], [175, "add rdx, rcx"], [176, "mov rsi, rax"], [177, "mov rdi, rdx"], [178, "call sub_44322C"], [179, "jmp loc_444E70"], [180, "mov rax, [rbp+var_60]"], [181, "mov eax, [rax+20h]"], [182, "test eax, eax"], [183, "jns loc_444CE0"], [184, "mov rax, [rbp+var_60]"], [185, "mov eax, [rax+24h]"], [186, "neg eax"], [187, "imul eax, [rbp+var_20]"], [188, "sar eax, 0Ah"], [189, "mov [rbp+var_38], eax"], [190, "cmp [rbp+var_14], 0"], [191, "js short loc_444BBD"], [192, "movsx eax, [rbp+var_54]"], [193, "cmp [rbp+var_14], eax"], [194, "jge short loc_444BBD"], [195, "mov eax, [rbp+var_38]"], [196, "imul eax, [rbp+var_20]"], [197, "sar eax, 9"], [198, "mov [rbp+var_21], al"], [199, "mov rax, [rbp+var_60]"], [200, "movzx eax, byte ptr [rax+30h]"], [201, "and eax, 2"], [202, "test al, al"], [203, "jz short loc_444B8D"], [204, "not [rbp+var_21]"], [205, "movzx edx, [rbp+var_21]"], [206, "mov eax, [rbp+var_14]"], [207, "movsxd rcx, eax"], [208, "mov rax, [rbp+var_48]"], [209, "add rax, rcx"], [210, "movzx eax, byte ptr [rax]"], [211, "movzx eax, al"], [212, "mov ecx, [rbp+var_14]"], [213, "movsxd rsi, ecx"], [214, "mov rcx, [rbp+var_48]"], [215, "lea rbx, [rsi+rcx]"], [216, "mov esi, edx"], [217, "mov edi, eax"], [218, "call sub_446F11"], [219, "mov [rbx], al"], [220, "sub [rbp+var_14], 1"], [221, "mov eax, 0FFh"], [222, "sub eax, [rbp+var_38]"], [223, "mov edx, eax"], [224, "mov rax, [rbp+var_60]"], [225, "mov eax, [rax+20h]"], [226, "neg eax"], [227, "imul eax, edx"], [228, "sar eax, 0Ah"], [229, "mov [rbp+var_40], eax"], [230, "cmp [rbp+var_14], 0"], [231, "js short loc_444C42"], [232, "movsx eax, [rbp+var_54]"], [233, "cmp [rbp+var_14], eax"], [234, "jge short loc_444C42"], [235, "mov eax, 0FFh"], [236, "sub eax, [rbp+var_38]"], [237, "imul eax, [rbp+var_40]"], [238, "sar eax, 9"], [239, "not eax"], [240, "mov [rbp+var_21], al"], [241, "mov rax, [rbp+var_60]"], [242, "movzx eax, byte ptr [rax+30h]"], [243, "and eax, 2"], [244, "test al, al"], [245, "jz short loc_444C12"], [246, "not [rbp+var_21]"], [247, "movzx edx, [rbp+var_21]"], [248, "mov eax, [rbp+var_14]"], [249, "movsxd rcx, eax"], [250, "mov rax, [rbp+var_48]"], [251, "add rax, rcx"], [252, "movzx eax, byte ptr [rax]"], [253, "movzx eax, al"], [254, "mov ecx, [rbp+var_14]"], [255, "movsxd rsi, ecx"], [256, "mov rcx, [rbp+var_48]"], [257, "lea rbx, [rsi+rcx]"], [258, "mov esi, edx"], [259, "mov edi, eax"], [260, "call sub_446F11"], [261, "mov [rbx], al"], [262, "add [rbp+var_14], 2"], [263, "mov rax, [rbp+var_60]"], [264, "movzx eax, byte ptr [rax+30h]"], [265, "and eax, 2"], [266, "test al, al"], [267, "jz short loc_444C9D"], [268, "movsx edx, [rbp+var_4C]"], [269, "mov eax, [rbp+var_1C]"], [270, "sub eax, edx"], [271, "sub eax, 1"], [272, "mov [rbp+var_14], eax"], [273, "movsx eax, [rbp+var_54]"], [274, "cmp [rbp+var_14], eax"], [275, "jle short loc_444C79"], [276, "movsx eax, [rbp+var_54]"], [277, "mov [rbp+var_14], eax"], [278, "jmp loc_444E70"], [279, "cmp [rbp+var_14], 0"], [280, "jle loc_444E70"], [281, "mov eax, [rbp+var_14]"], [282, "movsxd rdx, eax"], [283, "mov rax, [rbp+var_48]"], [284, "mov rsi, rdx"], [285, "mov rdi, rax"], [286, "call sub_44322C"], [287, "jmp loc_444E70"], [288, "movsx eax, [rbp+var_54]"], [289, "cmp [rbp+var_14], eax"], [290, "jle short loc_444CB0"], [291, "mov eax, 1"], [292, "jmp loc_444E75"], [293, "cmp [rbp+var_14], 0"], [294, "js loc_444E70"], [295, "movsx eax, [rbp+var_54]"], [296, "sub eax, [rbp+var_14]"], [297, "cdqe"], [298, "mov edx, [rbp+var_14]"], [299, "movsxd rcx, edx"], [300, "mov rdx, [rbp+var_48]"], [301, "add rdx, rcx"], [302, "mov rsi, rax"], [303, "mov rdi, rdx"], [304, "call sub_44322C"], [305, "jmp loc_444E70"], [306, "mov eax, 0FFh"], [307, "sub eax, [rbp+var_20]"], [308, "mov edx, eax"], [309, "mov rax, [rbp+var_60]"], [310, "mov eax, [rax+24h]"], [311, "imul eax, edx"], [312, "sar eax, 0Ah"], [313, "mov [rbp+var_38], eax"], [314, "cmp [rbp+var_14], 0"], [315, "js short loc_444D5F"], [316, "movsx eax, [rbp+var_54]"], [317, "cmp [rbp+var_14], eax"], [318, "jge short loc_444D5F"], [319, "mov eax, 0FFh"], [320, "sub eax, [rbp+var_20]"], [321, "imul eax, [rbp+var_38]"], [322, "sar eax, 9"], [323, "not eax"], [324, "mov [rbp+var_21], al"], [325, "mov rax, [rbp+var_60]"], [326, "movzx eax, byte ptr [rax+30h]"], [327, "and eax, 2"], [328, "test al, al"], [329, "jz short loc_444D2F"], [330, "not [rbp+var_21]"], [331, "movzx edx, [rbp+var_21]"], [332, "mov eax, [rbp+var_14]"], [333, "movsxd rcx, eax"], [334, "mov rax, [rbp+var_48]"], [335, "add rax, rcx"], [336, "movzx eax, byte ptr [rax]"], [337, "movzx eax, al"], [338, "mov ecx, [rbp+var_14]"], [339, "movsxd rsi, ecx"], [340, "mov rcx, [rbp+var_48]"], [341, "lea rbx, [rsi+rcx]"], [342, "mov esi, edx"], [343, "mov edi, eax"], [344, "call sub_446F11"], [345, "mov [rbx], al"], [346, "add [rbp+var_14], 1"], [347, "mov eax, 0FFh"], [348, "sub eax, [rbp+var_38]"], [349, "mov edx, eax"], [350, "mov rax, [rbp+var_60]"], [351, "mov eax, [rax+20h]"], [352, "imul eax, edx"], [353, "sar eax, 0Ah"], [354, "mov [rbp+var_3C], eax"], [355, "cmp [rbp+var_14], 0"], [356, "js short loc_444DE0"], [357, "movsx eax, [rbp+var_54]"], [358, "cmp [rbp+var_14], eax"], [359, "jge short loc_444DE0"], [360, "mov eax, 0FFh"], [361, "sub eax, [rbp+var_38]"], [362, "imul eax, [rbp+var_3C]"], [363, "sar eax, 9"], [364, "mov [rbp+var_21], al"], [365, "mov rax, [rbp+var_60]"], [366, "movzx eax, byte ptr [rax+30h]"], [367, "and eax, 2"], [368, "test al, al"], [369, "jz short loc_444DB0"], [370, "not [rbp+var_21]"], [371, "movzx edx, [rbp+var_21]"], [372, "mov eax, [rbp+var_14]"], [373, "movsxd rcx, eax"], [374, "mov rax, [rbp+var_48]"], [375, "add rax, rcx"], [376, "movzx eax, byte ptr [rax]"], [377, "movzx eax, al"], [378, "mov ecx, [rbp+var_14]"], [379, "movsxd rsi, ecx"], [380, "mov rcx, [rbp+var_48]"], [381, "lea rbx, [rsi+rcx]"], [382, "mov esi, edx"], [383, "mov edi, eax"], [384, "call sub_446F11"], [385, "mov [rbx], al"], [386, "add [rbp+var_14], 1"], [387, "mov rax, [rbp+var_60]"], [388, "movzx eax, byte ptr [rax+30h]"], [389, "and eax, 2"], [390, "test al, al"], [391, "jz short loc_444E2C"], [392, "movsx edx, [rbp+var_4C]"], [393, "mov eax, [rbp+var_1C]"], [394, "sub eax, edx"], [395, "mov [rbp+var_14], eax"], [396, "movsx eax, [rbp+var_54]"], [397, "cmp [rbp+var_14], eax"], [398, "jle short loc_444E0F"], [399, "mov eax, 0"], [400, "jmp short loc_444E75"], [401, "cmp [rbp+var_14], 0"], [402, "js short loc_444E70"], [403, "mov eax, [rbp+var_14]"], [404, "movsxd rdx, eax"], [405, "mov rax, [rbp+var_48]"], [406, "mov rsi, rdx"], [407, "mov rdi, rax"], [408, "call sub_44322C"], [409, "jmp short loc_444E70"], [410, "movsx eax, [rbp+var_54]"], [411, "cmp [rbp+var_14], eax"], [412, "jle short loc_444E3C"], [413, "movsx eax, [rbp+var_54]"], [414, "mov [rbp+var_14], eax"], [415, "cmp [rbp+var_14], 0"], [416, "jnz short loc_444E49"], [417, "mov eax, 0"], [418, "jmp short loc_444E75"], [419, "cmp [rbp+var_14], 0"], [420, "jle short loc_444E70"], [421, "movsx eax, [rbp+var_54]"], [422, "sub eax, [rbp+var_14]"], [423, "cdqe"], [424, "mov edx, [rbp+var_14]"], [425, "movsxd rcx, edx"], [426, "mov rdx, [rbp+var_48]"], [427, "add rdx, rcx"], [428, "mov rsi, rax"], [429, "mov rdi, rdx"], [430, "call sub_44322C"], [431, "mov eax, 2"], [432, "mov rbx, [rbp+var_8]"], [433, "leave"], [434, "retn"]], "data_dep": [[8, 7], [10, 5], [11, 6], [12, 11], [13, 9], [14, 13], [14, 12], [15, 14], [16, 15], [17, 6], [18, 17], [19, 18], [20, 19], [21, 16], [22, 8], [23, 22], [23, 21], [23, 16], [24, 23], [25, 6], [26, 25], [27, 26], [28, 27], [29, 28], [34, 6], [35, 34], [36, 9], [37, 35], [37, 36], [38, 37], [39, 38], [40, 8], [41, 10], [42, 41], [42, 40], [43, 39], [43, 42], [44, 43], [45, 6], [46, 45], [47, 46], [48, 47], [49, 48], [54, 9], [55, 54], [56, 55], [57, 6], [58, 57], [59, 58], [59, 56], [60, 59], [61, 60], [62, 61], [63, 62], [64, 63], [65, 61], [66, 65], [67, 66], [68, 9], [69, 68], [70, 69], [71, 70], [72, 6], [73, 72], [74, 73], [74, 71], [75, 74], [76, 75], [77, 76], [78, 77], [79, 78], [80, 76], [81, 80], [82, 81], [83, 8], [84, 64], [85, 84], [85, 83], [86, 85], [87, 64], [88, 79], [88, 87], [89, 88], [90, 6], [91, 90], [92, 91], [93, 92], [94, 67], [95, 94], [97, 79], [98, 97], [99, 86], [100, 64], [100, 98], [101, 100], [101, 79], [102, 101], [103, 86], [103, 99], [104, 103], [105, 10], [106, 105], [106, 86], [106, 99], [107, 106], [108, 67], [108, 96], [109, 82], [110, 109], [110, 108], [111, 110], [112, 111], [113, 6], [114, 113], [115, 114], [116, 115], [117, 116], [118, 112], [119, 118], [119, 112], [120, 86], [120, 99], [121, 120], [122, 4], [123, 121], [123, 122], [124, 123], [125, 124], [126, 86], [126, 99], [127, 126], [128, 4], [129, 128], [130, 119], [131, 125], [133, 129], [133, 132], [134, 86], [134, 99], [135, 6], [136, 135], [136, 133], [137, 136], [138, 137], [139, 138], [140, 8], [141, 98], [141, 64], [142, 140], [142, 141], [143, 142], [144, 10], [145, 144], [145, 143], [146, 145], [149, 143], [150, 149], [151, 143], [152, 151], [153, 4], [154, 152], [155, 153], [158, 10], [159, 158], [159, 134], [160, 159], [161, 10], [162, 161], [163, 134], [163, 162], [164, 163], [167, 162], [167, 134], [168, 167], [169, 10], [170, 169], [170, 162], [170, 134], [172, 162], [172, 134], [173, 172], [174, 4], [175, 173], [175, 174], [176, 170], [177, 175], [180, 6], [181, 180], [182, 181], [183, 182], [184, 6], [185, 184], [186, 185], [187, 96], [187, 67], [187, 186], [188, 187], [189, 188], [190, 86], [190, 99], [191, 190], [192, 10], [193, 86], [193, 99], [193, 192], [194, 193], [195, 189], [196, 96], [196, 67], [196, 195], [197, 196], [198, 197], [199, 6], [200, 199], [201, 200], [202, 201], [203, 202], [204, 198], [205, 204], [205, 198], [206, 86], [206, 99], [207, 206], [208, 4], [209, 208], [209, 207], [210, 209], [211, 210], [212, 86], [212, 99], [213, 212], [214, 4], [215, 214], [216, 205], [217, 211], [219, 218], [219, 215], [220, 86], [220, 99], [222, 189], [222, 221], [223, 222], [224, 6], [225, 224], [225, 219], [226, 225], [227, 223], [227, 226], [228, 227], [229, 228], [230, 220], [231, 230], [232, 10], [233, 220], [233, 232], [234, 233], [236, 235], [236, 189], [237, 236], [237, 229], [238, 237], [239, 238], [240, 239], [241, 6], [242, 241], [242, 219], [243, 242], [244, 243], [245, 244], [246, 240], [247, 240], [247, 246], [248, 220], [249, 248], [250, 4], [251, 250], [251, 249], [252, 261], [252, 251], [252, 219], [253, 252], [254, 220], [255, 254], [256, 4], [257, 261], [257, 256], [257, 219], [257, 215], [258, 247], [259, 253], [261, 257], [261, 260], [262, 220], [263, 6], [264, 263], [264, 261], [264, 219], [265, 264], [266, 265], [267, 266], [268, 8], [269, 98], [269, 64], [270, 269], [270, 268], [271, 270], [272, 271], [273, 10], [274, 273], [274, 272], [275, 274], [276, 10], [277, 276], [279, 272], [280, 279], [281, 272], [282, 281], [283, 4], [284, 282], [285, 283], [288, 10], [289, 262], [289, 288], [290, 289], [293, 262], [294, 293], [295, 10], [296, 295], [296, 262], [298, 262], [299, 298], [300, 4], [301, 299], [301, 300], [302, 296], [303, 301], [307, 96], [307, 67], [307, 306], [308, 307], [309, 6], [310, 309], [311, 310], [311, 308], [312, 311], [313, 312], [314, 86], [314, 99], [315, 314], [316, 10], [317, 316], [317, 86], [317, 99], [318, 317], [320, 67], [320, 96], [320, 319], [321, 320], [321, 313], [322, 321], [323, 322], [324, 323], [325, 6], [326, 325], [327, 326], [328, 327], [329, 328], [330, 324], [331, 330], [331, 324], [332, 86], [332, 99], [333, 332], [334, 4], [335, 334], [335, 333], [336, 335], [337, 336], [338, 86], [338, 99], [339, 338], [340, 4], [341, 340], [342, 331], [343, 337], [345, 341], [345, 344], [346, 86], [346, 99], [348, 313], [348, 347], [349, 348], [350, 6], [351, 350], [351, 345], [352, 349], [352, 351], [353, 352], [354, 353], [355, 346], [356, 355], [357, 10], [358, 346], [358, 357], [359, 358], [361, 360], [361, 313], [362, 361], [362, 354], [363, 362], [364, 363], [365, 6], [366, 345], [366, 365], [367, 366], [368, 367], [369, 368], [370, 364], [371, 370], [371, 364], [372, 346], [373, 372], [374, 4], [375, 374], [375, 373], [376, 385], [376, 375], [376, 345], [377, 376], [378, 346], [379, 378], [380, 4], [381, 341], [381, 345], [381, 385], [381, 380], [382, 371], [383, 377], [385, 381], [385, 384], [386, 346], [387, 6], [388, 387], [388, 345], [388, 385], [389, 388], [390, 389], [391, 390], [392, 8], [393, 98], [393, 64], [394, 393], [394, 392], [395, 394], [396, 10], [397, 396], [397, 395], [398, 397], [401, 395], [402, 401], [403, 395], [404, 403], [405, 4], [406, 404], [407, 405], [410, 10], [411, 410], [411, 386], [412, 411], [413, 10], [414, 413], [415, 414], [415, 386], [416, 415], [419, 414], [419, 386], [420, 419], [421, 10], [422, 421], [422, 414], [422, 386], [424, 414], [424, 386], [425, 424], [426, 4], [427, 426], [427, 425], [428, 422], [429, 427], [434, 52], [434, 32], [434, 50], [434, 399], [434, 431], [434, 417], [434, 291], [434, 147], [434, 165], [434, 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/1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a_1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a.jsonl.gz", "strip_func_name": "sub_4448E8", "query": "\n\n\n__int64 __fastcall sub_4448E8(__int64 a1, __int16 a2, __int16 a3, __int16 a4, __int64 a5)\n{\nint v8; // [rsp+20h] [rbp-40h]\nint v9; // [rsp+28h] [rbp-38h]\nint v10; // [rsp+28h] [rbp-38h]\nunsigned __int8 v11; // [rsp+3Fh] [rbp-21h]\nunsigned __int8 v12; // [rsp+3Fh] [rbp-21h]\nunsigned __int8 v13; // [rsp+3Fh] [rbp-21h]\nunsigned __int8 v14; // [rsp+3Fh] [rbp-21h]\nunsigned __int8 v15; // [rsp+3Fh] [rbp-21h]\nint v16; // [rsp+40h] [rbp-20h]\nint v17; // [rsp+44h] [rbp-1Ch]\nint v18; // [rsp+48h] [rbp-18h]\nint v19; // [rsp+4Ch] [rbp-14h]\nint v20; // [rsp+4Ch] [rbp-14h]\nint v21; // [rsp+4Ch] [rbp-14h]\nint v22; // [rsp+4Ch] [rbp-14h]\nint v23; // [rsp+4Ch] [rbp-14h]\n\nv18 = (*(_DWORD *)(a5 + 32) * a3) >> 10;\nif ( *(int *)(a5 + 32) > 0 )\n++v18;\nif ( v18 < a2 )\nreturn (*(_BYTE *)(a5 + 48) & 2) != 0;\nif ( (*(_DWORD *)(a5 + 32) * a3) >> 10 > a2 + a4 )\nreturn (*(_BYTE *)(a5 + 48) & 2) == 0;\nv17 = ((a3 << 8) * *(_DWORD *)(a5 + 32)) >> 18;\nv16 = (unsigned __int8)(((a3 << 8) * *(_DWORD *)(a5 + 32)) >> 10);\nv19 = v17 - a2;\nif ( v17 != (((a3 + 1) << 8) * *(_DWORD *)(a5 + 32)) >> 18\n&& *(int *)(a5 + 32) < 0\n&& !(unsigned __int8)(((a3 << 8) * *(_DWORD *)(a5 + 32)) >> 10) )\n{\nv16 = 255;\nv17 = (((a3 + 1) << 8) * *(_DWORD *)(a5 + 32)) >> 18;\n--v19;\n}\nif ( v17 == (((a3 + 1) << 8) * *(_DWORD *)(a5 + 32)) >> 18 )\n{\nif ( v19 >= 0 && v19 < a4 )\n{\nv11 = (v16 + (unsigned __int8)((((a3 + 1) << 8) * *(_DWORD *)(a5 + 32)) >> 10)) >> 1;\nif ( (*(_BYTE *)(a5 + 48) & 2) != 0 )\nv11 = ~v11;\n*(_BYTE *)(v19 + a1) = sub_446F11(*(unsigned __int8 *)(v19 + a1), v11);\n}\nv20 = v19 + 1;\nif ( (*(_BYTE *)(a5 + 48) & 2) != 0 )\n{\nv21 = v17 - a2;\nif ( v21 >= a4 )\nreturn 0LL;\nif ( v21 < 0 )\nreturn 2LL;\ngoto LABEL_61;\n}\nif ( v20 > a4 )\nv20 = a4;\nif ( !v20 )\nreturn 0LL;\nif ( v20 <= 0 )\nreturn 2LL;\ngoto LABEL_67;\n}\nif ( *(int *)(a5 + 32) < 0 )\n{\nv9 = (v16 * -*(_DWORD *)(a5 + 36)) >> 10;\nif ( v19 >= 0 && v19 < a4 )\n{\nv12 = (v16 * v9) >> 9;\nif ( (*(_BYTE *)(a5 + 48) & 2) != 0 )\nv12 = ~v12;\n*(_BYTE *)(v19 + a1) = sub_446F11(*(unsigned __int8 *)(v19 + a1), v12);\n}\nv22 = v19 - 1;\nif ( v22 >= 0 && v22 < a4 )\n{\nv8 = ((255 - v9) * -*(_DWORD *)(a5 + 32)) >> 10;\nv13 = ~(unsigned __int8)((v8 * (255 - v9)) >> 9);\nif ( (*(_BYTE *)(a5 + 48) & 2) != 0 )\nv13 = (v8 * (255 - v9)) >> 9;\n*(_BYTE *)(v22 + a1) = sub_446F11(*(unsigned __int8 *)(v22 + a1), v13);\n}\nv20 = v22 + 2;\nif ( (*(_BYTE *)(a5 + 48) & 2) != 0 )\n{\nv21 = v17 - a2 - 1;\nif ( v21 > a4 || v21 <= 0 )\nreturn 2LL;\ngoto LABEL_61;\n}\nif ( v20 > a4 )\nreturn 1LL;\nif ( v20 < 0 )\nreturn 2LL;\ngoto LABEL_67;\n}\nv10 = ((255 - v16) * *(_DWORD *)(a5 + 36)) >> 10;\nif ( v19 >= 0 && v19 < a4 )\n{\nv14 = ~(unsigned __int8)((v10 * (255 - v16)) >> 9);\nif ( (*(_BYTE *)(a5 + 48) & 2) != 0 )\nv14 = (v10 * (255 - v16)) >> 9;\n*(_BYTE *)(v19 + a1) = sub_446F11(*(unsigned __int8 *)(v19 + a1), v14);\n}\nv23 = v19 + 1;\nif ( v23 >= 0 && v23 < a4 )\n{\nv15 = ((((255 - v10) * *(_DWORD *)(a5 + 32)) >> 10) * (255 - v10)) >> 9;\nif ( (*(_BYTE *)(a5 + 48) & 2) != 0 )\nv15 = ~v15;\n*(_BYTE *)(v23 + a1) = sub_446F11(*(unsigned __int8 *)(v23 + a1), v15);\n}\nv20 = v23 + 1;\nif ( (*(_BYTE *)(a5 + 48) & 2) != 0 )\n{\nv21 = v17 - a2;\nif ( v21 > a4 )\nreturn 0LL;\nif ( v21 < 0 )\nreturn 2LL;\nLABEL_61:\nsub_44322C(a1, v21);\nreturn 2LL;\n}\nif ( v20 > a4 )\nv20 = a4;\nif ( !v20 )\nreturn 0LL;\nif ( v20 > 0 )\nLABEL_67:\nsub_44322C(v20 + a1, a4 - v20);\nreturn 2LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v8,v9,v13,v16,v17,v18,v23,sub_4448E8,sub_446F11,sub_44322C,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'abs_y', 'a4': 'len', 'a1': 'mask_buf', 'a2': 'abs_x', 'a5': 'p', 'v8': 'x_inters', 'v9': 'y_intersa', 'v13': 'md', 'v16': 'xsf', 'v17': 'xsi', 'v18': 'x_at_y', 'v23': 'kb', 'sub_4448E8': 'line_mask_steep', 'sub_446F11': 'mask_mix', 'sub_44322C': 'lv_memzero_24'}"} |
|
s_check_data_line | 363ca24d5abadf77aa4acd9a22bb9895d2dfede72832bcc586d2ff5b3f08ba79 | xiaochuanle | MECAT2 | NA | static BOOL
s_check_data_line(HbnFastaReader* reader, kstring_t* line)
{
// make sure the first data line has at least SOME resemblance to
// actual sequence data
if (!ks_empty(reader->sequence)) return TRUE;
size_t good = 0, bad = 0;
// in case the data has huge sequences all on the first line we do need
// a cutoff and "70" seems reasonable since it's the default width of
// CFastaOstream (as of 2017-03-09)
size_t len_to_check = hbn_min(ks_size(*line), 70);
size_t ambig_nuc = 0;
const char* s = ks_s(*line);
for (size_t pos = 0; pos < len_to_check; ++pos) {
unsigned char c = s[pos];
if (s_ASCII_IsAlpha(c) || c == '*') {
++good;
if (s_ASCII_IsAmbigNuc(c)) {
++ambig_nuc;
}
} else if (c == '-') {
++good;
} else if (isspace(c) || (c >= '0' && c <= '9')) {
// treat whilespace and digits as neutral
} else if (c == ';') {
break; // comment - ignore rest of line
} else {
++bad;
}
}
if (bad >= good / 3 &&
(len_to_check > 3 || good == 0 || bad > good)) {
HBN_WARN("HbnFastaReader: Near (%zu, %s), there's a line that doesn't look like"
" plausible data, but it's not marked as defline or comment.",
HbnLineReaderLineNumber(reader->line_reader),
reader->filename);
return FALSE;
}
// warn if more than a certain percentage is ambiguous nucleotides
const static size_t kWarnPercentAmbiguous = 40; // e.g. "40" means "40%"
const size_t percent_ambig = (good == 0)?100:((ambig_nuc * 100) / good);
if( len_to_check > 3 && percent_ambig > kWarnPercentAmbiguous ) {
HBN_WARN(
"HbnFastaReader: Start of first data line (%zu, %s) in seq is about "
"%zu%% ambiguous nucleotides (shouldn't be over %zu%%)",
HbnLineReaderLineNumber(reader->line_reader),
reader->filename,
percent_ambig,
kWarnPercentAmbiguous);
}
return TRUE;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4107EB", "function_addr": 4261867, "binary_name": "363ca24d5abadf77aa4acd9a22bb9895d2dfede72832bcc586d2ff5b3f08ba79.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r12"], [3, "push rbx"], [4, "sub rsp, 50h"], [5, "mov [rbp+var_58], rdi"], [6, "mov [rbp+var_60], rsi"], [7, "mov rax, [rbp+var_58]"], [8, "mov rax, [rax+40h]"], [9, "test rax, rax"], [10, "jz short loc_410815"], [11, "mov eax, 1"], [12, "jmp loc_410A24"], [13, "mov [rbp+var_18], 0"], [14, "mov [rbp+var_20], 0"], [15, "mov rax, [rbp+var_60]"], [16, "mov rax, [rax]"], [17, "mov edx, 46h "], [18, "cmp rax, 46h "], [19, "cmova rax, rdx"], [20, "mov [rbp+var_38], rax"], [21, "mov [rbp+var_28], 0"], [22, "mov rax, [rbp+var_60]"], [23, "mov rax, [rax+10h]"], [24, "mov [rbp+var_40], rax"], [25, "mov [rbp+var_30], 0"], [26, "jmp loc_4108E9"], [27, "mov rdx, [rbp+var_40]"], [28, "mov rax, [rbp+var_30]"], [29, "add rax, rdx"], [30, "movzx eax, byte ptr [rax]"], [31, "mov [rbp+var_41], al"], [32, "movzx eax, [rbp+var_41]"], [33, "mov edi, eax"], [34, "call sub_40F5CD"], [35, "test al, al"], [36, "jnz short loc_410884"], [37, "cmp [rbp+var_41], 2Ah "], [38, "jnz short loc_41089F"], [39, "add [rbp+var_18], 1"], [40, "movzx eax, [rbp+var_41]"], [41, "mov edi, eax"], [42, "call sub_40F618"], [43, "test al, al"], [44, "jz short loc_4108E4"], [45, "add [rbp+var_28], 1"], [46, "jmp short loc_4108E4"], [47, "cmp [rbp+var_41], 2Dh "], [48, "jnz short loc_4108AC"], [49, "add [rbp+var_18], 1"], [50, "jmp short loc_4108E4"], [51, "call ___ctype_b_loc"], [52, "mov rdx, [rax]"], [53, "movzx eax, [rbp+var_41]"], [54, "add rax, rax"], [55, "add rax, rdx"], [56, "movzx eax, word ptr [rax]"], [57, "movzx eax, ax"], [58, "and eax, 2000h"], [59, "test eax, eax"], [60, "jnz short loc_4108E4"], [61, "cmp [rbp+var_41], 2Fh "], [62, "jbe short loc_4108D9"], [63, "cmp [rbp+var_41], 39h "], [64, "jbe short loc_4108E4"], [65, "cmp [rbp+var_41], 3Bh "], [66, "jz short loc_4108F9"], [67, "add [rbp+var_20], 1"], [68, "add [rbp+var_30], 1"], [69, "mov rax, [rbp+var_30]"], [70, "cmp rax, [rbp+var_38]"], [71, "jb loc_41085E"], [72, "jmp short loc_4108FA"], [73, "nop"], [74, "mov rax, [rbp+var_18]"], [75, "mov rdx, 0AAAAAAAAAAAAAAABh"], [76, "mul rdx"], [77, "mov rax, rdx"], [78, "shr rax, 1"], [79, "cmp [rbp+var_20], rax"], [80, "jb short loc_410980"], [81, "cmp [rbp+var_38], 3"], [82, "ja short loc_41092F"], [83, "cmp [rbp+var_18], 0"], [84, "jz short loc_41092F"], [85, "mov rax, [rbp+var_20]"], [86, "cmp rax, [rbp+var_18]"], [87, "jbe short loc_410980"], [88, "mov rax, [rbp+var_58]"], [89, "mov rbx, [rax]"], [90, "mov rax, [rbp+var_58]"], [91, "mov rax, [rax+8]"], [92, "mov rdi, rax"], [93, "call sub_40B6AB"], [94, "sub rsp, 8"], [95, "push rbx"], [96, "mov r9, rax"], [97, "mov r8d, offset aHbnfastareader_1"], [98, "mov ecx, 4"], [99, "mov edx, 10Ch"], [100, "mov esi, offset aSCheckDataLine"], [101, "mov edi, offset aCorelibFastaC"], [102, "mov eax, 0"], [103, "call sub_4088AC"], [104, "add rsp, 10h"], [105, "mov eax, 0"], [106, "jmp loc_410A24"], [107, "cmp [rbp+var_18], 0"], [108, "jz short loc_4109AF"], [109, "mov rdx, [rbp+var_28]"], [110, "mov rax, rdx"], [111, "shl rax, 2"], [112, "add rax, rdx"], [113, "lea rdx, ds:0[rax*4]"], [114, "add rax, rdx"], [115, "shl rax, 2"], [116, "mov edx, 0"], [117, "div [rbp+var_18]"], [118, "jmp short loc_4109B4"], [119, "mov eax, 64h "], [120, "mov [rbp+var_50], rax"], [121, "cmp [rbp+var_38], 3"], [122, "jbe short loc_410A1F"], [123, "mov rax, cs:qword_4132A8"], [124, "cmp [rbp+var_50], rax"], [125, "jbe short loc_410A1F"], [126, "mov r12, cs:qword_4132A8"], [127, "mov rax, [rbp+var_58]"], [128, "mov rbx, [rax]"], [129, "mov rax, [rbp+var_58]"], [130, "mov rax, [rax+8]"], [131, "mov rdi, rax"], [132, "call sub_40B6AB"], [133, "sub rsp, 8"], [134, "push r12"], [135, "push [rbp+var_50]"], [136, "push rbx"], [137, "mov r9, rax"], [138, "mov r8d, offset aHbnfastareader_2"], [139, "mov ecx, 4"], [140, "mov edx, 116h"], [141, "mov esi, offset aSCheckDataLine"], [142, "mov edi, offset aCorelibFastaC"], [143, "mov eax, 0"], [144, "call sub_4088AC"], [145, "add rsp, 20h"], [146, "mov eax, 1"], [147, "lea rsp, [rbp-10h]"], [148, "pop rbx"], [149, "pop r12"], [150, "pop rbp"], [151, "retn"]], "data_dep": [[7, 5], [8, 7], [9, 8], [10, 9], [15, 6], [16, 15], [18, 16], [19, 18], [19, 17], [20, 19], [22, 6], [23, 22], [24, 23], [27, 24], [28, 68], [28, 25], [29, 27], [29, 28], [30, 29], [31, 30], [32, 31], [33, 32], [35, 34], [36, 35], [37, 31], [38, 37], [39, 39], [39, 13], [39, 49], [40, 31], [41, 40], [43, 42], [44, 43], [45, 21], [45, 45], [47, 31], [48, 47], [49, 39], [49, 13], [49, 49], [52, 51], [53, 31], [54, 53], [55, 52], [55, 54], [56, 55], [57, 56], [58, 57], [59, 58], [60, 59], [61, 31], [62, 61], [63, 31], [64, 63], [65, 31], [66, 65], [67, 67], [67, 14], [68, 68], [68, 25], [69, 25], [69, 68], [70, 20], [70, 69], [71, 70], [74, 13], [74, 49], [74, 39], [76, 75], [77, 76], [78, 77], [79, 67], [79, 14], [79, 78], [80, 79], [81, 20], [82, 81], [83, 39], [83, 13], [83, 49], [84, 83], [85, 67], [85, 14], [86, 49], [86, 85], [86, 39], [86, 13], [87, 86], [88, 5], [89, 88], [90, 5], [91, 90], [92, 91], [94, 4], [95, 89], [96, 93], [104, 94], [107, 49], [107, 39], [107, 13], [108, 107], [109, 21], [109, 45], [110, 109], [111, 110], [112, 109], [112, 111], [113, 109], [114, 113], [114, 112], [115, 114], [117, 39], [117, 13], [117, 49], [120, 115], [120, 119], [121, 20], [122, 121], [124, 120], [124, 123], [125, 124], [127, 5], [128, 127], [129, 5], [130, 129], [131, 130], [133, 4], [134, 126], [135, 120], [136, 128], [137, 132], [145, 133], [147, 4], [147, 145], [147, 104], [148, 95], [148, 136], [148, 3], [149, 2], [149, 134], [150, 0], [151, 146], [151, 11], [151, 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/363ca24d5abadf77aa4acd9a22bb9895d2dfede72832bcc586d2ff5b3f08ba79_363ca24d5abadf77aa4acd9a22bb9895d2dfede72832bcc586d2ff5b3f08ba79.jsonl.gz", "strip_func_name": "sub_4107EB", "query": "\n\n\n__int64 __fastcall sub_4107EB(__int64 *a1, __int64 *a2)\n{\n__int64 result; // rax\n__int64 v3; // rax\n__int64 v4; // rbx\n__int64 v5; // rax\nunsigned __int64 v6; // rax\n__int64 v7; // rbx\n__int64 v8; // rax\nunsigned __int64 v9; // [rsp+10h] [rbp-50h]\nunsigned __int8 v10; // [rsp+1Fh] [rbp-41h]\n__int64 v11; // [rsp+20h] [rbp-40h]\nunsigned __int64 v12; // [rsp+28h] [rbp-38h]\nunsigned __int64 i; // [rsp+30h] [rbp-30h]\n__int64 v14; // [rsp+38h] [rbp-28h]\nunsigned __int64 v15; // [rsp+40h] [rbp-20h]\nunsigned __int64 v16; // [rsp+48h] [rbp-18h]\n\nif ( a1[8] )\nreturn 1LL;\nv16 = 0LL;\nv15 = 0LL;\nv3 = *a2;\nif ( (unsigned __int64)*a2 > 0x46 )\nv3 = 70LL;\nv12 = v3;\nv14 = 0LL;\nv11 = a2[2];\nfor ( i = 0LL; i < v12; ++i )\n{\nv10 = *(_BYTE *)(v11 + i);\nif ( sub_40F5CD(v10) || v10 == 42 )\n{\n++v16;\nif ( (unsigned __int8)sub_40F618(v10) )\n++v14;\n}\nelse if ( v10 == 45 )\n{\n++v16;\n}\nelse if ( ((*__ctype_b_loc())[v10] & 0x2000) == 0 && (v10 <= 0x2Fu || v10 > 0x39u) )\n{\nif ( v10 == 59 )\nbreak;\n++v15;\n}\n}\nif ( v15 < v16 / 3 || v12 <= 3 && v16 && v15 <= v16 )\n{\nif ( v16 )\nv6 = 100 * v14 / v16;\nelse\nv6 = 100LL;\nv9 = v6;\nif ( v12 > 3 && v6 > 0x28 )\n{\nv7 = *a1;\nv8 = sub_40B6AB(a1[1]);\nsub_4088AC(\n\"corelib/fasta.c\",\n\"s_check_data_line\",\n0x116u,\n4,\n\"HbnFastaReader: Start of first data line (%zu, %s) in seq is about %zu%% ambiguous nucleotides (shouldn't be over %zu%%)\",\nv8,\nv7,\nv9,\n40LL);\n}\nresult = 1LL;\n}\nelse\n{\nv4 = *a1;\nv5 = sub_40B6AB(a1[1]);\nsub_4088AC(\n\"corelib/fasta.c\",\n\"s_check_data_line\",\n0x10Cu,\n4,\n\"HbnFastaReader: Near (%zu, %s), there's a line that doesn't look like plausible data, but it's not marked as defline or comment.\",\nv5,\nv4);\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v9,v10,v11,v12,i,v14,v15,v16,sub_4107EB,sub_40F5CD,sub_40F618,sub_40B6AB,sub_4088AC,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'reader', 'a2': 'line', 'v9': 'percent_ambig', 'v10': 'c', 'v11': 's', 'v12': 'len_to_check', 'i': 'pos', 'v14': 'ambig_nuc', 'v15': 'bad', 'v16': 'good', 'sub_4107EB': 's_check_data_line', 'sub_40F5CD': 's_ASCII_IsAlpha', 'sub_40F618': 's_ASCII_IsAmbigNuc', 'sub_40B6AB': 'HbnLineReaderLineNumber', 'sub_4088AC': 'hbn_dump_message'}"} |
|
get_man_path | fa27d0bacf06ce93b14fd9cba32c0c5a7d20e024d2a5f59104dc1d7405bb9602 | EnterpriseDB | zheap | NA | void
get_man_path(const char *my_exec_path, char *ret_path)
{
make_relative_path(ret_path, MANDIR, PGBINDIR, my_exec_path);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_44EA05", "function_addr": 4516357, "binary_name": "fa27d0bacf06ce93b14fd9cba32c0c5a7d20e024d2a5f59104dc1d7405bb9602.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_2"], [10, "mov rdi, rax"], [11, "call sub_44E481"], [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/fa27d0bacf06ce93b14fd9cba32c0c5a7d20e024d2a5f59104dc1d7405bb9602_fa27d0bacf06ce93b14fd9cba32c0c5a7d20e024d2a5f59104dc1d7405bb9602.jsonl.gz", "strip_func_name": "sub_44EA05", "query": "\n\n\nint __fastcall sub_44EA05(_BYTE *a1, char *a2)\n{\nreturn sub_44E481(a2, \"/usr/local/pgsql/share/man\", \"/usr/local/pgsql/bin\", a1);\n}\n\n\n\nQ:[a1,a2,sub_44EA05,sub_44E481,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'my_exec_path', 'a2': 'ret_path', 'sub_44EA05': 'get_man_path', 'sub_44E481': 'make_relative_path'}"} |
|
assior_uint8array | 8ae2ab0464f0ac96a7fdeccbe9109d753af18ecfd065336c7a6978a11512a7eb | stardot | MatrixBrandy | NA | static void assior_uint8array(pointers address) {
stackitem exprtype;
basicarray *ap, *ap2;
int32 n, value;
uint8 *p, *p2;
exprtype = GET_TOPITEM;
ap = *address.arrayaddr;
if (ap==NIL) error(ERR_NODIMS, "("); /* Undefined array */
if (exprtype==STACK_INT || exprtype==STACK_UINT8 || exprtype==STACK_INT64 || exprtype==STACK_FLOAT) { /* array()|=<value> */
value = pop_anynum32();
p = ap->arraystart.uint8base;
for (n=0; n<ap->arrsize; n++) p[n]|=value;
} else if (exprtype==STACK_UINT8ARRAY) { /* array1()|=array2() */
ap2 = pop_array();
if (ap2==NIL) error(ERR_NODIMS, "("); /* Undefined array */
if (!check_arrays(ap, ap2)) error(ERR_TYPEARRAY);
p = ap->arraystart.uint8base;
p2 =ap2->arraystart.uint8base;
for (n=0; n<ap->arrsize; n++) p[n]|=p2[n];
} else error(ERR_TYPENUM);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4271ED", "function_addr": 4354541, "binary_name": "8ae2ab0464f0ac96a7fdeccbe9109d753af18ecfd065336c7a6978a11512a7eb.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, cs:qword_4B9CB8"], [5, "mov eax, [rax]"], [6, "mov [rbp+var_8], eax"], [7, "mov rax, [rbp+var_38]"], [8, "mov rax, [rax]"], [9, "mov [rbp+var_10], rax"], [10, "cmp [rbp+var_10], 0"], [11, "jnz short loc_42722B"], [12, "mov esi, offset asc_45A397"], [13, "mov edi, 1Ch"], [14, "mov eax, 0"], [15, "call error"], [16, "cmp [rbp+var_8], 3"], [17, "jz short loc_427243"], [18, "cmp [rbp+var_8], 2"], [19, "jz short loc_427243"], [20, "cmp [rbp+var_8], 4"], [21, "jz short loc_427243"], [22, "cmp [rbp+var_8], 5"], [23, "jnz short loc_42729F"], [24, "call sub_4509E9"], [25, "mov [rbp+var_2C], eax"], [26, "mov rax, [rbp+var_10]"], [27, "mov rax, [rax+8]"], [28, "mov [rbp+var_20], rax"], [29, "mov [rbp+var_4], 0"], [30, "jmp short loc_42728E"], [31, "mov eax, [rbp+var_4]"], [32, "movsxd rdx, eax"], [33, "mov rax, [rbp+var_20]"], [34, "add rax, rdx"], [35, "movzx eax, byte ptr [rax]"], [36, "mov edx, eax"], [37, "mov eax, [rbp+var_2C]"], [38, "mov ecx, edx"], [39, "or ecx, eax"], [40, "mov eax, [rbp+var_4]"], [41, "movsxd rdx, eax"], [42, "mov rax, [rbp+var_20]"], [43, "add rax, rdx"], [44, "mov edx, ecx"], [45, "mov [rax], dl"], [46, "add [rbp+var_4], 1"], [47, "mov rax, [rbp+var_10]"], [48, "mov eax, [rax+4]"], [49, "cmp [rbp+var_4], eax"], [50, "jl short loc_427260"], [51, "jmp loc_427368"], [52, "cmp [rbp+var_8], 0Ah"], [53, "jnz loc_427357"], [54, "call sub_450C77"], [55, "mov [rbp+var_18], rax"], [56, "cmp [rbp+var_18], 0"], [57, "jnz short loc_4272CD"], [58, "mov esi, offset asc_45A397"], [59, "mov edi, 1Ch"], [60, "mov eax, 0"], [61, "call error"], [62, "mov rdx, [rbp+var_18]"], [63, "mov rax, [rbp+var_10]"], [64, "mov rsi, rdx"], [65, "mov rdi, rax"], [66, "call sub_403E01"], [67, "test al, al"], [68, "jnz short loc_4272F3"], [69, "mov edi, 48h "], [70, "mov eax, 0"], [71, "call error"], [72, "mov rax, [rbp+var_10]"], [73, "mov rax, [rax+8]"], [74, "mov [rbp+var_20], rax"], [75, "mov rax, [rbp+var_18]"], [76, "mov rax, [rax+8]"], [77, "mov [rbp+var_28], rax"], [78, "mov [rbp+var_4], 0"], [79, "jmp short loc_427349"], [80, "mov eax, [rbp+var_4]"], [81, "movsxd rdx, eax"], [82, "mov rax, [rbp+var_20]"], [83, "add rax, rdx"], [84, "movzx ecx, byte ptr [rax]"], [85, "mov eax, [rbp+var_4]"], [86, "movsxd rdx, eax"], [87, "mov rax, [rbp+var_28]"], [88, "add rax, rdx"], [89, "movzx edx, byte ptr [rax]"], [90, "mov eax, [rbp+var_4]"], [91, "movsxd rsi, eax"], [92, "mov rax, [rbp+var_20]"], [93, "add rax, rsi"], [94, "or edx, ecx"], [95, "mov [rax], dl"], [96, "add [rbp+var_4], 1"], [97, "mov rax, [rbp+var_10]"], [98, "mov eax, [rax+4]"], [99, "cmp [rbp+var_4], eax"], [100, "jl short loc_427314"], [101, "jmp short loc_427368"], [102, "mov edi, 3Bh "], [103, "mov eax, 0"], [104, "call error"], [105, "jmp short $+2"], [106, "nop"], [107, "leave"], [108, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 3], [8, 7], [9, 8], [10, 9], [11, 10], [16, 6], [17, 16], [18, 6], [19, 18], [20, 6], [21, 20], [22, 6], [23, 22], [25, 24], [26, 9], [27, 26], [28, 27], [31, 29], [31, 46], [32, 31], [33, 28], [34, 32], [34, 33], [35, 34], [35, 45], [36, 35], [37, 25], [38, 36], [39, 37], [39, 38], [40, 29], [40, 46], [41, 40], [42, 28], [43, 41], [43, 42], [44, 39], [45, 43], [45, 44], [46, 29], [46, 46], [47, 9], [48, 45], [48, 47], [49, 46], [49, 48], [49, 29], [50, 49], [52, 6], [53, 52], [55, 54], [56, 55], [57, 56], [62, 55], [63, 9], [64, 62], [65, 63], [67, 66], [68, 67], [72, 9], [73, 72], [74, 73], [75, 55], [76, 75], [77, 76], [80, 78], [80, 96], [81, 80], [82, 74], [83, 82], [83, 81], [84, 95], [84, 83], [85, 78], [85, 96], [86, 85], [87, 77], [88, 86], [88, 87], [89, 95], [89, 88], [90, 78], [90, 96], [91, 90], [92, 74], [93, 92], [93, 91], [94, 89], [94, 84], [95, 93], [95, 94], [96, 78], [96, 96], [97, 9], [98, 95], [98, 97], [99, 78], [99, 96], [99, 98], [100, 99], [108, 48], [108, 98], [108, 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/8ae2ab0464f0ac96a7fdeccbe9109d753af18ecfd065336c7a6978a11512a7eb_8ae2ab0464f0ac96a7fdeccbe9109d753af18ecfd065336c7a6978a11512a7eb.jsonl.gz", "strip_func_name": "sub_4271ED", "query": "\n\n\n__int64 __fastcall sub_4271ED(__int64 *a1, const char *a2, int a3, int a4, int a5, int a6)\n{\n__int64 result; // rax\nint v7; // edx\nint v8; // ecx\nint v9; // er8\nint v10; // er9\nint v11; // edx\nint v12; // ecx\nint v13; // er8\nint v14; // er9\nchar v15; // [rsp+14h] [rbp-2Ch]\n__int64 v16; // [rsp+18h] [rbp-28h]\n__int64 v17; // [rsp+20h] [rbp-20h]\n__int64 v18; // [rsp+20h] [rbp-20h]\n__int64 v19; // [rsp+28h] [rbp-18h]\n__int64 v20; // [rsp+30h] [rbp-10h]\nint v21; // [rsp+38h] [rbp-8h]\nint i; // [rsp+3Ch] [rbp-4h]\nint j; // [rsp+3Ch] [rbp-4h]\n\nv21 = *(_DWORD *)qword_4B9CB8;\nv20 = *a1;\nif ( !*a1 )\n{\na2 = \"(\";\nerror(28, (unsigned int)\"(\", a3, a4, a5, a6);\n}\nif ( v21 == 3 || v21 == 2 || v21 == 4 || v21 == 5 )\n{\nv15 = sub_4509E9();\nv17 = *(_QWORD *)(v20 + 8);\nfor ( i = 0; ; ++i )\n{\nresult = *(unsigned int *)(v20 + 4);\nif ( i >= (int)result )\nbreak;\n*(_BYTE *)(i + v17) |= v15;\n}\n}\nelse if ( v21 == 10 )\n{\nv19 = sub_450C77();\nif ( !v19 )\nerror(28, (unsigned int)\"(\", v7, v8, v9, v10);\nif ( !sub_403E01((_DWORD *)v20, (_DWORD *)v19) )\nerror(72, v19, v11, v12, v13, v14);\nv18 = *(_QWORD *)(v20 + 8);\nv16 = *(_QWORD *)(v19 + 8);\nfor ( j = 0; ; ++j )\n{\nresult = *(unsigned int *)(v20 + 4);\nif ( j >= (int)result )\nbreak;\n*(_BYTE *)(j + v18) |= *(_BYTE *)(j + v16);\n}\n}\nelse\n{\nresult = error(59, (_DWORD)a2, a3, a4, a5, a6);\n}\nreturn result;\n}\n\n\n\nQ:[a1,v15,v16,v18,v19,v20,v21,j,sub_4271ED,sub_4509E9,sub_450C77,sub_403E01,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'address', 'v15': 'value', 'v16': 'p2', 'v18': 'pa', 'v19': 'ap2', 'v20': 'ap', 'v21': 'exprtype', 'j': 'na', 'sub_4271ED': 'assior_uint8array', 'sub_4509E9': 'pop_anynum32', 'sub_450C77': 'pop_array', 'sub_403E01': 'check_arrays'}"} |
|
main | dddbfb1c56dd4f6295756ab201c29dfd06dcb370a2224d02b8372bee7e7210fc | diku-compSys | compSys-e2022-pub | NA | int main(int argc, char** argv) {
assert(argc == 2);
FILE *f = fopen(argv[1], "r");
assert(f != NULL);
char c;
while (fread(&c, sizeof(c), 1, f) == 1) {
printf("%.2x\n", (int)c);
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "main", "function_addr": 4198738, "binary_name": "dddbfb1c56dd4f6295756ab201c29dfd06dcb370a2224d02b8372bee7e7210fc.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_14], edi"], [4, "mov [rbp+var_20], rsi"], [5, "cmp [rbp+var_14], 2"], [6, "jz short loc_401180"], [7, "mov ecx, offset function"], [8, "mov edx, 5"], [9, "mov esi, offset file"], [10, "mov edi, offset assertion"], [11, "call ___assert_fail"], [12, "mov rax, [rbp+var_20]"], [13, "add rax, 8"], [14, "mov rax, [rax]"], [15, "mov esi, offset modes"], [16, "mov rdi, rax"], [17, "call _fopen"], [18, "mov [rbp+stream], rax"], [19, "cmp [rbp+stream], 0"], [20, "jnz short loc_4011D4"], [21, "mov ecx, offset function"], [22, "mov edx, 8"], [23, "mov esi, offset file"], [24, "mov edi, offset aFNull"], [25, "call ___assert_fail"], [26, "movzx eax, [rbp+ptr]"], [27, "movsx eax, al"], [28, "mov esi, eax"], [29, "mov edi, offset format"], [30, "mov eax, 0"], [31, "call _printf"], [32, "mov rdx, [rbp+stream]"], [33, "lea rax, [rbp+ptr]"], [34, "mov rcx, rdx"], [35, "mov edx, 1"], [36, "mov esi, 1"], [37, "mov rdi, rax"], [38, "call _fread"], [39, "cmp rax, 1"], [40, "jz short loc_4011BC"], [41, "mov eax, 0"], [42, "leave"], [43, "retn"]], "data_dep": [[5, 3], [6, 5], [12, 4], [13, 12], [14, 13], [16, 14], [18, 17], [19, 18], [20, 19], [27, 26], [28, 27], [32, 18], [33, 17], [33, 31], [34, 32], [37, 33], [39, 38], [40, 39], [43, 41]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/dddbfb1c56dd4f6295756ab201c29dfd06dcb370a2224d02b8372bee7e7210fc_dddbfb1c56dd4f6295756ab201c29dfd06dcb370a2224d02b8372bee7e7210fc.jsonl.gz", "strip_func_name": "main", "query": "\n\n\n__int64 __fastcall main(int a1, char **a2, char **a3)\n{\nchar ptr; // [rsp+17h] [rbp-9h] BYREF\nFILE *stream; // [rsp+18h] [rbp-8h]\n\nif ( a1 != 2 )\n__assert_fail(\"argc == 2\", \"hexabyte.c\", 5u, \"main\");\nstream = fopen(a2[1], \"r\");\nif ( !stream )\n__assert_fail(\"f != NULL\", \"hexabyte.c\", 8u, \"main\");\nwhile ( fread(&ptr, 1uLL, 1uLL, stream) == 1 )\nprintf(\"%.2x\\n\", (unsigned int)ptr);\nreturn 0LL;\n}\n\n\n\nQ:[a2,a3,a1,ptr,stream,]\nAssistant: ", "hints": "[]", "response": "{'a2': 'argv', 'a3': 'envp', 'a1': 'argc', 'ptr': 'c', 'stream': 'f'}"} |
|
sub_mod | 8e0201b51d37a6a96a9a5798024c675bddf10ed93432823e3b3000d97ec68572 | SRI-CSL | Bliss | NA | static inline int32_t sub_mod(int32_t x, int32_t y, int32_t q) {
x -= y;
// return x < 0 ? x + q : x;
return x + ((x >> 31) & q);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403D77", "function_addr": 4210039, "binary_name": "8e0201b51d37a6a96a9a5798024c675bddf10ed93432823e3b3000d97ec68572.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_4], edi"], [3, "mov [rbp+var_8], esi"], [4, "mov [rbp+var_C], edx"], [5, "mov eax, [rbp+var_8]"], [6, "sub [rbp+var_4], eax"], [7, "mov eax, [rbp+var_4]"], [8, "sar eax, 1Fh"], [9, "and eax, [rbp+var_C]"], [10, "mov edx, eax"], [11, "mov eax, [rbp+var_4]"], [12, "add eax, edx"], [13, "pop rbp"], [14, "retn"]], "data_dep": [[5, 3], [6, 2], [6, 5], [7, 6], [8, 7], [9, 8], [9, 4], [10, 9], [11, 6], [12, 10], [12, 11], [13, 0], [14, 12]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/8e0201b51d37a6a96a9a5798024c675bddf10ed93432823e3b3000d97ec68572_8e0201b51d37a6a96a9a5798024c675bddf10ed93432823e3b3000d97ec68572.jsonl.gz", "strip_func_name": "sub_403D77", "query": "\n\n\n__int64 __fastcall sub_403D77(int a1, int a2, int a3)\n{\nreturn (a3 & (unsigned int)((a1 - a2) >> 31)) + a1 - a2;\n}\n\n\n\nQ:[a3,a1,a2,sub_403D77,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'q', 'a1': 'x', 'a2': 'y', 'sub_403D77': '_sub_mod'}"} |
|
mod_lua_list_remove | 8e89f9502949c1a463a3dd08a58c3c7a60591689c0f4de603abd6f5993935ae2 | aerospike | aerospike-tools-backup | NA | static int mod_lua_list_remove(lua_State * l) {
as_list * list = mod_lua_checklist(l, 1);
if (list) {
lua_Integer idx = luaL_optinteger(l, 2, 0);
// Lua index is 1-based.
if (idx > 0) {
as_list_remove(list, (uint32_t)idx - 1);
}
}
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4545C1", "function_addr": 4539841, "binary_name": "8e89f9502949c1a463a3dd08a58c3c7a60591689c0f4de603abd6f5993935ae2.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 esi, 1"], [6, "mov rdi, rax"], [7, "call sub_4543C5"], [8, "mov [rbp+var_8], rax"], [9, "cmp [rbp+var_8], 0"], [10, "jz short loc_45461F"], [11, "mov rax, [rbp+var_18]"], [12, "mov edx, 0"], [13, "mov esi, 2"], [14, "mov rdi, rax"], [15, "call sub_45A57F"], [16, "mov [rbp+var_10], rax"], [17, "cmp [rbp+var_10], 0"], [18, "jle short loc_45461F"], [19, "mov rax, [rbp+var_10]"], [20, "lea edx, [rax-1]"], [21, "mov rax, [rbp+var_8]"], [22, "mov esi, edx"], [23, "mov rdi, rax"], [24, "call sub_454237"], [25, "mov eax, 0"], [26, "leave"], [27, "retn"]], "data_dep": [[4, 3], [6, 4], [8, 7], [9, 8], [10, 9], [11, 3], [14, 11], [16, 15], [17, 16], [18, 17], [19, 16], [20, 19], [20, 12], [21, 8], [22, 20], [23, 21], [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/8e89f9502949c1a463a3dd08a58c3c7a60591689c0f4de603abd6f5993935ae2_8e89f9502949c1a463a3dd08a58c3c7a60591689c0f4de603abd6f5993935ae2.jsonl.gz", "strip_func_name": "sub_4545C1", "query": "\n\n\n__int64 __fastcall sub_4545C1(__int64 a1)\n{\n__int64 v2; // [rsp+10h] [rbp-10h]\n__int64 v3; // [rsp+18h] [rbp-8h]\n\nv3 = sub_4543C5(a1, 1u);\nif ( v3 )\n{\nv2 = sub_45A57F(a1, 2LL, 0LL);\nif ( v2 > 0 )\nsub_454237(v3, v2 - 1);\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,v2,v3,sub_4545C1,sub_4543C5,sub_45A57F,sub_454237,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'l', 'v2': 'idx', 'v3': 'list', 'sub_4545C1': 'mod_lua_list_remove', 'sub_4543C5': 'mod_lua_checklist', 'sub_45A57F': 'luaL_optinteger', 'sub_454237': 'as_list_remove'}"} |
|
emit_binary_diff_body | 8170503cd1918ecb11237a85c61d9be0cd1209d60b0c8b0e2fb9b8fe47d16590 | msysgit | msysgit | NA | static void emit_binary_diff_body(FILE *file, mmfile_t *one, mmfile_t *two,
const char *prefix)
{
void *cp;
void *delta;
void *deflated;
void *data;
unsigned long orig_size;
unsigned long delta_size;
unsigned long deflate_size;
unsigned long data_size;
/* We could do deflated delta, or we could do just deflated two,
* whichever is smaller.
*/
delta = NULL;
deflated = deflate_it(two->ptr, two->size, &deflate_size);
if (one->size && two->size) {
delta = diff_delta(one->ptr, one->size,
two->ptr, two->size,
&delta_size, deflate_size);
if (delta) {
void *to_free = delta;
orig_size = delta_size;
delta = deflate_it(delta, delta_size, &delta_size);
free(to_free);
}
}
if (delta && delta_size < deflate_size) {
fprintf(file, "%sdelta %lu\n", prefix, orig_size);
free(deflated);
data = delta;
data_size = delta_size;
}
else {
fprintf(file, "%sliteral %lu\n", prefix, two->size);
free(delta);
data = deflated;
data_size = deflate_size;
}
/* emit data encoded in base85 */
cp = data;
while (data_size) {
int bytes = (52 < data_size) ? 52 : data_size;
char line[70];
data_size -= bytes;
if (bytes <= 26)
line[0] = bytes + 'A' - 1;
else
line[0] = bytes - 26 + 'a' - 1;
encode_85(line + 1, cp, bytes);
cp = (char *) cp + bytes;
fprintf(file, "%s", prefix);
fputs(line, file);
fputc('\n', file);
}
fprintf(file, "%s\n", prefix);
free(data);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_46FAE7", "function_addr": 4651751, "binary_name": "8170503cd1918ecb11237a85c61d9be0cd1209d60b0c8b0e2fb9b8fe47d16590.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0C0h"], [3, "mov [rbp+stream], rdi"], [4, "mov [rbp+var_B0], rsi"], [5, "mov [rbp+var_B8], rdx"], [6, "mov [rbp+s], rcx"], [7, "mov [rbp+var_10], 0"], [8, "mov rax, [rbp+var_B8]"], [9, "mov rax, [rax+8]"], [10, "mov rcx, rax"], [11, "mov rax, [rbp+var_B8]"], [12, "mov rax, [rax]"], [13, "lea rdx, [rbp+var_50]"], [14, "mov rsi, rcx"], [15, "mov rdi, rax"], [16, "call sub_46FA07"], [17, "mov [rbp+var_30], rax"], [18, "mov rax, [rbp+var_B0]"], [19, "mov rax, [rax+8]"], [20, "test rax, rax"], [21, "jz loc_46FBF7"], [22, "mov rax, [rbp+var_B8]"], [23, "mov rax, [rax+8]"], [24, "test rax, rax"], [25, "jz loc_46FBF7"], [26, "mov rsi, [rbp+var_50]"], [27, "mov rax, [rbp+var_B8]"], [28, "mov rax, [rax+8]"], [29, "mov r10, rax"], [30, "mov rax, [rbp+var_B8]"], [31, "mov rdx, [rax]"], [32, "mov rax, [rbp+var_B0]"], [33, "mov rax, [rax+8]"], [34, "mov rdi, rax"], [35, "mov rax, [rbp+var_B0]"], [36, "mov rax, [rax]"], [37, "lea rcx, [rbp+var_48]"], [38, "mov r9, rsi"], [39, "mov r8, rcx"], [40, "mov rcx, r10"], [41, "mov rsi, rdi"], [42, "mov rdi, rax"], [43, "call sub_46A051"], [44, "mov [rbp+var_10], rax"], [45, "cmp [rbp+var_10], 0"], [46, "jz short loc_46FBF7"], [47, "mov rax, [rbp+var_10]"], [48, "mov [rbp+ptr], rax"], [49, "mov rax, [rbp+var_48]"], [50, "mov [rbp+var_20], rax"], [51, "mov rcx, [rbp+var_48]"], [52, "lea rdx, [rbp+var_48]"], [53, "mov rax, [rbp+var_10]"], [54, "mov rsi, rcx"], [55, "mov rdi, rax"], [56, "call sub_46FA07"], [57, "mov [rbp+var_10], rax"], [58, "mov rax, [rbp+ptr]"], [59, "mov rdi, rax"], [60, "call _free"], [61, "cmp [rbp+var_10], 0"], [62, "jz short loc_46FC4D"], [63, "mov rdx, [rbp+var_48]"], [64, "mov rax, [rbp+var_50]"], [65, "cmp rdx, rax"], [66, "jnb short loc_46FC4D"], [67, "mov rcx, [rbp+var_20]"], [68, "mov rdx, [rbp+s]"], [69, "mov rax, [rbp+stream]"], [70, "mov esi, offset aSdeltaLu"], [71, "mov rdi, rax"], [72, "mov eax, 0"], [73, "call _fprintf"], [74, "mov rax, [rbp+var_30]"], [75, "mov rdi, rax"], [76, "call _free"], [77, "mov rax, [rbp+var_10]"], [78, "mov [rbp+var_18], rax"], [79, "mov rax, [rbp+var_48]"], [80, "mov [rbp+var_28], rax"], [81, "jmp short loc_46FC94"], [82, "mov rax, [rbp+var_B8]"], [83, "mov rcx, [rax+8]"], [84, "mov rdx, [rbp+s]"], [85, "mov rax, [rbp+stream]"], [86, "mov esi, offset aSliteralLu"], [87, "mov rdi, rax"], [88, "mov eax, 0"], [89, "call _fprintf"], [90, "mov rax, [rbp+var_10]"], [91, "mov rdi, rax"], [92, "call _free"], [93, "mov rax, [rbp+var_30]"], [94, "mov [rbp+var_18], rax"], [95, "mov rax, [rbp+var_50]"], [96, "mov [rbp+var_28], rax"], [97, "mov rax, [rbp+var_18]"], [98, "mov [rbp+var_8], rax"], [99, "jmp loc_46FD48"], [100, "mov eax, 34h "], [101, "cmp [rbp+var_28], 34h "], [102, "cmovbe rax, [rbp+var_28]"], [103, "mov [rbp+var_3C], eax"], [104, "mov eax, [rbp+var_3C]"], [105, "cdqe"], [106, "sub [rbp+var_28], rax"], [107, "cmp [rbp+var_3C], 1Ah"], [108, "jg short loc_46FCD0"], [109, "mov eax, [rbp+var_3C]"], [110, "add eax, 40h "], [111, "mov [rbp+var_A0], al"], [112, "jmp short loc_46FCDC"], [113, "mov eax, [rbp+var_3C]"], [114, "add eax, 46h "], [115, "mov [rbp+var_A0], al"], [116, "lea rax, [rbp+var_A0]"], [117, "add rax, 1"], [118, "mov edx, [rbp+var_3C]"], [119, "mov rcx, [rbp+var_8]"], [120, "mov rsi, rcx"], [121, "mov rdi, rax"], [122, "call sub_4A7525"], [123, "mov eax, [rbp+var_3C]"], [124, "cdqe"], [125, "add [rbp+var_8], rax"], [126, "mov rdx, [rbp+stream]"], [127, "mov rax, [rbp+s]"], [128, "mov rsi, rdx"], [129, "mov rdi, rax"], [130, "call _fputs"], [131, "mov rdx, [rbp+stream]"], [132, "lea rax, [rbp+var_A0]"], [133, "mov rsi, rdx"], [134, "mov rdi, rax"], [135, "call _fputs"], [136, "mov rax, [rbp+stream]"], [137, "mov rsi, rax"], [138, "mov edi, 0Ah"], [139, "call _fputc"], [140, "cmp [rbp+var_28], 0"], [141, "jnz loc_46FCA1"], [142, "mov rdx, [rbp+s]"], [143, "mov rax, [rbp+stream]"], [144, "mov esi, offset aS_17"], [145, "mov rdi, rax"], [146, "mov eax, 0"], [147, "call _fprintf"], [148, "mov rax, [rbp+var_18]"], [149, "mov rdi, rax"], [150, "call _free"], [151, "nop"], [152, "leave"], [153, "retn"]], "data_dep": [[8, 5], [9, 8], [10, 9], [11, 5], [12, 11], [14, 10], [15, 12], [17, 16], [18, 4], [19, 18], [20, 19], [21, 20], [22, 5], [23, 22], [24, 23], [25, 24], [27, 5], [28, 27], [29, 28], [30, 5], [31, 30], [32, 4], [33, 32], [34, 33], [35, 4], [36, 35], [37, 10], [38, 26], [39, 37], [40, 29], [41, 34], [42, 36], [44, 43], [45, 44], [46, 45], [47, 44], [48, 47], [50, 49], [52, 31], [53, 44], [54, 51], [55, 53], [57, 56], [58, 48], [59, 58], [61, 44], [61, 7], [61, 57], [62, 61], [65, 63], [65, 64], [66, 65], [67, 50], [68, 6], [69, 3], [71, 69], [74, 17], [75, 74], [77, 44], [77, 7], [77, 57], [78, 77], [80, 79], [82, 5], [83, 82], [84, 6], [85, 3], [87, 85], [90, 44], [90, 7], [90, 57], [91, 90], [93, 17], [94, 93], [96, 95], [97, 94], [97, 78], [98, 97], [101, 106], [101, 96], [101, 80], [102, 80], [102, 106], [102, 101], [102, 96], [103, 102], [104, 103], [106, 104], [106, 106], [106, 96], [106, 80], [107, 103], [108, 107], [109, 103], [110, 109], [111, 110], [113, 103], [114, 113], [115, 114], [116, 111], [116, 115], [116, 110], [116, 114], [117, 116], [118, 103], [119, 98], [119, 125], [120, 119], [121, 117], [123, 103], [125, 123], [125, 125], [125, 98], [126, 3], [127, 6], [128, 126], [129, 127], [131, 3], [132, 130], [132, 111], [132, 115], [133, 131], [134, 132], [136, 3], [137, 136], [140, 106], [140, 96], [140, 80], [141, 140], [142, 6], [143, 3], [145, 143], [148, 78], [148, 94], [149, 148], [153, 150]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n 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_46FAE7", "query": "\n\n\nvoid __fastcall sub_46FAE7(FILE *a1, __int64 *a2, __int64 *a3, const char *a4)\n{\nint v4; // eax\nchar v7; // [rsp+20h] [rbp-A0h] BYREF\n_BYTE v8[7]; // [rsp+21h] [rbp-9Fh] BYREF\nunsigned __int64 v9; // [rsp+70h] [rbp-50h] BYREF\nunsigned __int64 v10; // [rsp+78h] [rbp-48h] BYREF\nunsigned int v11; // [rsp+84h] [rbp-3Ch]\nvoid *ptr; // [rsp+88h] [rbp-38h]\nvoid *v13; // [rsp+90h] [rbp-30h]\nunsigned __int64 v14; // [rsp+98h] [rbp-28h]\nunsigned __int64 v15; // [rsp+A0h] [rbp-20h]\nvoid *v16; // [rsp+A8h] [rbp-18h]\nvoid *v17; // [rsp+B0h] [rbp-10h]\nchar *v18; // [rsp+B8h] [rbp-8h]\n\nv17 = 0LL;\nv13 = sub_46FA07(*a3, a3[1], &v9);\nif ( a2[1] )\n{\nif ( a3[1] )\n{\nv17 = (void *)sub_46A051(*a2, a2[1], *a3, a3[1], (__int64)&v10, v9);\nif ( v17 )\n{\nptr = v17;\nv15 = v10;\nv17 = sub_46FA07((__int64)v17, v10, &v10);\nfree(ptr);\n}\n}\n}\nif ( v17 && v10 < v9 )\n{\nfprintf(a1, \"%sdelta %lu\\n\", a4, v15);\nfree(v13);\nv16 = v17;\nv14 = v10;\n}\nelse\n{\nfprintf(a1, \"%sliteral %lu\\n\", a4, a3[1]);\nfree(v17);\nv16 = v13;\nv14 = v9;\n}\nv18 = (char *)v16;\nwhile ( v14 )\n{\nv4 = 52;\nif ( v14 <= 0x34 )\nv4 = v14;\nv11 = v4;\nv14 -= v4;\nif ( v4 > 26 )\nv7 = v11 + 70;\nelse\nv7 = v11 + 64;\nsub_4A7525(v8, v18, v11);\nv18 += (int)v11;\nfputs(a4, a1);\nfputs(&v7, a1);\nfputc(10, a1);\n}\nfprintf(a1, \"%s\\n\", a4);\nfree(v16);\n}\n\n\n\nQ:[a3,a4,a1,a2,v7,v9,v10,v11,ptr,v13,v14,v15,v16,v17,v18,sub_46FAE7,sub_46FA07,sub_46A051,sub_4A7525,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'two', 'a4': 'prefix', 'a1': 'file', 'a2': 'one', 'v7': 'line', 'v9': 'deflate_size', 'v10': 'delta_size', 'v11': 'bytes', 'ptr': 'to_free', 'v13': 'deflated', 'v14': 'data_size', 'v15': 'orig_size', 'v16': 'data', 'v17': 'delta', 'v18': 'cp', 'sub_46FAE7': 'emit_binary_diff_body', 'sub_46FA07': 'deflate_it', 'sub_46A051': 'diff_delta', 'sub_4A7525': 'encode_85'}"} |
|
Validate_stsz_Atom | 4ceeddb7b16a39fbeac8045d03e7837b1e77a7d5a4a95cb0c916d11a714f4010 | macosforge | ValidateMP4 | NA | OSErr Validate_stsz_Atom( atomOffsetEntry *aoe, void *refcon )
{
TrackInfoRec *tir = (TrackInfoRec *)refcon;
OSErr err = noErr;
UInt32 version;
UInt32 flags;
UInt64 offset;
UInt32 entryCount;
UInt32 sampleSize;
SampleSizeRecord *listP;
UInt32 listSize;
UInt32 i;
// Get version/flags
BAILIFERR( GetFullAtomVersionFlags( aoe, &version, &flags, &offset ) );
// Get data
BAILIFERR( GetFileDataN32( aoe, &sampleSize, offset, &offset ) );
BAILIFERR( GetFileDataN32( aoe, &entryCount, offset, &offset ) );
if ((sampleSize == 0) && entryCount) {
listSize = entryCount * sizeof(SampleSizeRecord);
// 1 based array
BAILIFNIL( listP = malloc(listSize + sizeof(SampleSizeRecord)), allocFailedErr );
BAILIFERR( GetFileData( aoe, &listP[1], offset, listSize, &offset ) );
for ( i = 1; i <= entryCount; i++ ) {
listP[i].sampleSize = EndianS32_BtoN(listP[i].sampleSize);
}
}
// Print atom contents non-required fields
atomprintnotab("\tversion=\"%d\" flags=\"%d\"\n", version, flags);
atomprint("sampleSize=\"%ld\"\n", sampleSize);
atomprint("entryCount=\"%ld\"\n", entryCount);
atomprint("/>\n");
if ((sampleSize == 0) && entryCount) {
vg.tabcnt++;
listP[0].sampleSize = 0;
for ( i = 1; i <= entryCount; i++ ) {
atomprintdetailed("<stszEntry sampleSize=\"%d\" />\n", listP[i].sampleSize);
if (listP[i].sampleSize == 0) {
errprint("You can't have a zero sample size in stsz\n");
}
}
--vg.tabcnt;
}
// Check required field values
FieldMustBe( flags, 0, "'stsz' flags must be %d not 0x%lx" );
// All done
aoe->aoeflags |= kAtomValidated;
tir->sampleSizeEntryCnt = entryCount;
tir->singleSampleSize = sampleSize;
tir->sampleSize = listP;
bail:
return err;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4081F7", "function_addr": 4227575, "binary_name": "4ceeddb7b16a39fbeac8045d03e7837b1e77a7d5a4a95cb0c916d11a714f4010.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_48], rdi"], [4, "mov [rbp+var_50], rsi"], [5, "mov rax, [rbp+var_50]"], [6, "mov [rbp+var_20], rax"], [7, "mov [rbp+var_2], 0"], [8, "lea rcx, [rbp+var_38]"], [9, "lea rdx, [rbp+var_2C]"], [10, "lea rsi, [rbp+var_28]"], [11, "mov rax, [rbp+var_48]"], [12, "mov rdi, rax"], [13, "call sub_4059EA"], [14, "mov [rbp+var_2], ax"], [15, "cmp [rbp+var_2], 0"], [16, "jnz loc_40848A"], [17, "mov rdx, [rbp+var_38]"], [18, "lea rcx, [rbp+var_38]"], [19, "lea rsi, [rbp+var_40]"], [20, "mov rax, [rbp+var_48]"], [21, "mov rdi, rax"], [22, "call sub_41C270"], [23, "mov [rbp+var_2], ax"], [24, "cmp [rbp+var_2], 0"], [25, "jnz loc_40848D"], [26, "mov rdx, [rbp+var_38]"], [27, "lea rcx, [rbp+var_38]"], [28, "lea rsi, [rbp+var_3C]"], [29, "mov rax, [rbp+var_48]"], [30, "mov rdi, rax"], [31, "call sub_41C270"], [32, "mov [rbp+var_2], ax"], [33, "cmp [rbp+var_2], 0"], [34, "jnz loc_408490"], [35, "mov eax, [rbp+var_40]"], [36, "test eax, eax"], [37, "jnz loc_40833C"], [38, "mov eax, [rbp+var_3C]"], [39, "test eax, eax"], [40, "jz loc_40833C"], [41, "mov eax, [rbp+var_3C]"], [42, "shl eax, 2"], [43, "mov [rbp+var_24], eax"], [44, "mov eax, [rbp+var_24]"], [45, "add rax, 4"], [46, "mov rdi, rax"], [47, "call _malloc"], [48, "mov [rbp+var_10], rax"], [49, "cmp [rbp+var_10], 0"], [50, "jnz short loc_4082CE"], [51, "mov [rbp+var_2], 0F81Dh"], [52, "jmp loc_408494"], [53, "mov ecx, [rbp+var_24]"], [54, "mov rdx, [rbp+var_38]"], [55, "mov rax, [rbp+var_10]"], [56, "lea rsi, [rax+4]"], [57, "lea rdi, [rbp+var_38]"], [58, "mov rax, [rbp+var_48]"], [59, "mov r8, rdi"], [60, "mov rdi, rax"], [61, "call sub_41C13F"], [62, "mov [rbp+var_2], ax"], [63, "cmp [rbp+var_2], 0"], [64, "jnz loc_408493"], [65, "mov [rbp+var_14], 1"], [66, "jmp short loc_408334"], [67, "mov eax, [rbp+var_14]"], [68, "lea rdx, ds:0[rax*4]"], [69, "mov rax, [rbp+var_10]"], [70, "add rax, rdx"], [71, "mov edx, [rbp+var_14]"], [72, "lea rcx, ds:0[rdx*4]"], [73, "mov rdx, [rbp+var_10]"], [74, "add rdx, rcx"], [75, "mov eax, [rax]"], [76, "mov [rdx], eax"], [77, "add [rbp+var_14], 1"], [78, "mov eax, [rbp+var_3C]"], [79, "cmp [rbp+var_14], eax"], [80, "jbe short loc_408308"], [81, "mov edx, [rbp+var_2C]"], [82, "mov eax, [rbp+var_28]"], [83, "mov esi, eax"], [84, "mov edi, offset aVersionDFlagsD_0"], [85, "mov eax, 0"], [86, "call sub_421E6D"], [87, "mov eax, [rbp+var_40]"], [88, "mov esi, eax"], [89, "mov edi, offset aSamplesizeLd"], [90, "mov eax, 0"], [91, "call sub_421F21"], [92, "mov eax, [rbp+var_3C]"], [93, "mov esi, eax"], [94, "mov edi, offset aEntrycountLd"], [95, "mov eax, 0"], [96, "call sub_421F21"], [97, "mov edi, offset asc_424ACC"], [98, "mov eax, 0"], [99, "call sub_421F21"], [100, "mov eax, [rbp+var_40]"], [101, "test eax, eax"], [102, "jnz loc_40842F"], [103, "mov eax, [rbp+var_3C]"], [104, "test eax, eax"], [105, "jz loc_40842F"], [106, "mov rax, cs:qword_432080"], [107, "add rax, 1"], [108, "mov cs:qword_432080, rax"], [109, "mov rax, [rbp+var_10]"], [110, "mov dword ptr [rax], 0"], [111, "mov [rbp+var_14], 1"], [112, "jmp short loc_408415"], [113, "mov eax, [rbp+var_14]"], [114, "lea rdx, ds:0[rax*4]"], [115, "mov rax, [rbp+var_10]"], [116, "add rax, rdx"], [117, "mov eax, [rax]"], [118, "mov esi, eax"], [119, "mov edi, offset aStszentrySampl"], [120, "mov eax, 0"], [121, "call sub_4220EA"], [122, "mov eax, [rbp+var_14]"], [123, "lea rdx, ds:0[rax*4]"], [124, "mov rax, [rbp+var_10]"], [125, "add rax, rdx"], [126, "mov eax, [rax]"], [127, "test eax, eax"], [128, "jnz short loc_408411"], [129, "mov edi, offset aYouCanTHaveAZe_0"], [130, "mov eax, 0"], [131, "call sub_4226A8"], [132, "add [rbp+var_14], 1"], [133, "mov eax, [rbp+var_3C]"], [134, "cmp [rbp+var_14], eax"], [135, "jbe short loc_4083C5"], [136, "mov rax, cs:qword_432080"], [137, "sub rax, 1"], [138, "mov cs:qword_432080, rax"], [139, "mov eax, [rbp+var_2C]"], [140, "test eax, eax"], [141, "jz short loc_408455"], [142, "mov [rbp+var_2], 0F818h"], [143, "mov eax, [rbp+var_2C]"], [144, "mov edx, eax"], [145, "mov esi, 0"], [146, "mov edi, offset aStszFlagsMustB"], [147, "mov eax, 0"], [148, "call sub_4226A8"], [149, "mov rax, [rbp+var_48]"], [150, "mov eax, [rax+34h]"], [151, "or eax, 1"], [152, "mov edx, eax"], [153, "mov rax, [rbp+var_48]"], [154, "mov [rax+34h], edx"], [155, "mov edx, [rbp+var_3C]"], [156, "mov rax, [rbp+var_20]"], [157, "mov [rax+48h], edx"], [158, "mov edx, [rbp+var_40]"], [159, "mov rax, [rbp+var_20]"], [160, "mov [rax+4Ch], edx"], [161, "mov rax, [rbp+var_20]"], [162, "mov rdx, [rbp+var_10]"], [163, "mov [rax+50h], rdx"], [164, "jmp short loc_408494"], [165, "nop"], [166, "jmp short loc_408494"], [167, "nop"], [168, "jmp short loc_408494"], [169, "nop"], [170, "jmp short loc_408494"], [171, "nop"], [172, "movzx eax, [rbp+var_2]"], [173, "leave"], [174, "retn"]], "data_dep": [[5, 4], [6, 5], [11, 3], [12, 11], [14, 13], [15, 14], [16, 15], [18, 8], [19, 10], [20, 3], [21, 20], [23, 22], [24, 23], [25, 24], [27, 18], [28, 19], [29, 3], [30, 29], [32, 31], [33, 32], [34, 33], [36, 35], [37, 36], [39, 38], [40, 39], [42, 41], [43, 42], [44, 43], [45, 44], [46, 45], [48, 47], [49, 48], [50, 49], [53, 43], [55, 48], [56, 28], [56, 55], [57, 46], [58, 3], [59, 57], [60, 58], [62, 61], [63, 62], [64, 63], [67, 77], [67, 65], [68, 54], [68, 74], [69, 48], [70, 68], [70, 69], [71, 65], [71, 77], [72, 72], [72, 53], [73, 48], [74, 73], [74, 72], [75, 76], [75, 70], [76, 74], [76, 75], [77, 77], [77, 65], [79, 78], [79, 77], [79, 65], [80, 79], [83, 82], [88, 87], [93, 92], [101, 100], [102, 101], [104, 103], [105, 104], [107, 106], [108, 107], [109, 48], [110, 109], [113, 132], [113, 111], [114, 81], [114, 123], [115, 48], [116, 115], [116, 114], [117, 110], [117, 76], [117, 116], [118, 117], [122, 132], [122, 111], [123, 114], [124, 48], [125, 123], [125, 124], [126, 110], [126, 125], [126, 76], [127, 126], [128, 127], [132, 132], [132, 111], [134, 133], [134, 132], [134, 111], [135, 134], [136, 108], [137, 136], [138, 137], [140, 139], [141, 140], [144, 143], [149, 3], [150, 157], [150, 76], [150, 154], [150, 163], [150, 110], [150, 149], [150, 160], [151, 150], [152, 151], [153, 3], [154, 153], [154, 152], [156, 6], [157, 155], [157, 156], [159, 6], [160, 158], [160, 159], [161, 6], [162, 48], [163, 161], [163, 162], [172, 51], [172, 62], [172, 14], [172, 23], [172, 142], [172, 32], [174, 172]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/4ceeddb7b16a39fbeac8045d03e7837b1e77a7d5a4a95cb0c916d11a714f4010_4ceeddb7b16a39fbeac8045d03e7837b1e77a7d5a4a95cb0c916d11a714f4010.jsonl.gz", "strip_func_name": "sub_4081F7", "query": "\n\n\n__int64 __fastcall sub_4081F7(__int64 a1, __int64 a2)\n{\n__int64 v2; // rcx\nint v3; // er8\nint v4; // er9\nint v5; // edx\nint v6; // ecx\nint v7; // er8\nint v8; // er9\nunsigned int v9; // esi\nint v10; // edx\nint v11; // ecx\nint v12; // er8\nint v13; // er9\nint v14; // edx\nint v15; // ecx\nint v16; // er8\nint v17; // er9\nint v18; // ecx\nint v19; // er8\nint v20; // er9\n__int64 v21; // rdx\nint v22; // esi\n__int64 v23; // rdx\nchar v25; // [rsp+0h] [rbp-50h]\nchar v26; // [rsp+0h] [rbp-50h]\nchar v27; // [rsp+0h] [rbp-50h]\nint v28; // [rsp+10h] [rbp-40h] BYREF\nunsigned int v29; // [rsp+14h] [rbp-3Ch] BYREF\n__int64 v30; // [rsp+18h] [rbp-38h] BYREF\nunsigned int v31; // [rsp+24h] [rbp-2Ch] BYREF\nunsigned int v32; // [rsp+28h] [rbp-28h] BYREF\nunsigned int v33; // [rsp+2Ch] [rbp-24h]\n__int64 v34; // [rsp+30h] [rbp-20h]\nunsigned int i; // [rsp+3Ch] [rbp-14h]\n_DWORD *v36; // [rsp+40h] [rbp-10h]\nunsigned __int16 v37; // [rsp+4Eh] [rbp-2h]\n\nv34 = a2;\nv37 = 0;\nv37 = sub_4059EA(a1, &v32, &v31, &v30);\nif ( !v37 )\n{\nv37 = sub_41C270(a1, &v28, v30, &v30);\nif ( !v37 )\n{\nv37 = sub_41C270(a1, &v29, v30, &v30);\nif ( !v37 )\n{\nif ( !v28 && v29 )\n{\nv33 = 4 * v29;\nv36 = malloc(4 * v29 + 4LL);\nif ( !v36 )\nreturn (unsigned __int16)-2019;\nv37 = sub_41C13F(a1, v36 + 1, v30, v33, &v30);\nif ( v37 )\nreturn v37;\nfor ( i = 1; i <= v29; ++i )\n{\nv2 = i;\nv36[v2] = v36[v2];\n}\n}\nsub_421E6D((unsigned int)\"\\tversion=\\\"%d\\\" flags=\\\"%d\\\"\\n\", v32, v31, v2 * 4, v3, v4);\nsub_421F21((unsigned int)\"sampleSize=\\\"%ld\\\"\\n\", v28, v5, v6, v7, v8, a2);\nv9 = v29;\nsub_421F21((unsigned int)\"entryCount=\\\"%ld\\\"\\n\", v29, v10, v11, v12, v13, v25);\nsub_421F21((unsigned int)\"/>\\n\", v9, v14, v15, v16, v17, v26);\nif ( !v28 && v29 )\n{\n++qword_432080;\n*v36 = 0;\nfor ( i = 1; i <= v29; ++i )\n{\nv21 = i;\nv22 = v36[v21];\nsub_4220EA((unsigned int)\"<stszEntry sampleSize=\\\"%d\\\" />\\n\", v22, v21 * 4, v18, v19, v20, v27);\nv23 = i;\nif ( !v36[v23] )\nsub_4226A8((unsigned int)\"You can't have a zero sample size in stsz\\n\", v22, v23 * 4, v18, v19, v20);\n}\n--qword_432080;\n}\nif ( v31 )\n{\nv37 = -2024;\nsub_4226A8((unsigned int)\"'stsz' flags must be %d not 0x%lx\\n\", 0, v31, v18, v19, v20);\n}\n*(_DWORD *)(a1 + 52) |= 1u;\n*(_DWORD *)(v34 + 72) = v29;\n*(_DWORD *)(v34 + 76) = v28;\n*(_QWORD *)(v34 + 80) = v36;\n}\n}\n}\nreturn v37;\n}\n\n\n\nQ:[a1,a2,v9,v28,v29,v30,v31,v32,v33,v34,v36,v37,sub_4081F7,sub_4059EA,sub_41C270,sub_41C13F,sub_421E6D,sub_421F21,sub_4220EA,sub_4226A8,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'aoe', 'a2': 'refcon', 'v9': 'refcon', 'v28': 'sampleSize', 'v29': 'entryCount', 'v30': 'offset', 'v31': 'flags', 'v32': 'version', 'v33': 'listSize', 'v34': 'tir', 'v36': 'listP', 'v37': 'err', 'sub_4081F7': 'Validate_stsz_Atom', 'sub_4059EA': 'GetFullAtomVersionFlags', 'sub_41C270': 'GetFileDataN32', 'sub_41C13F': 'GetFileData', 'sub_421E6D': 'atomprintnotab', 'sub_421F21': 'atomprint', 'sub_4220EA': 'atomprintdetailed', 'sub_4226A8': 'errprint'}"} |
|
lv_chart_set_all_value | 1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a | FASTSHIFT | lv_gba_emu | NA | void lv_chart_set_all_value(lv_obj_t * obj, lv_chart_series_t * ser, lv_coord_t value)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
LV_ASSERT_NULL(ser);
lv_chart_t * chart = (lv_chart_t *)obj;
uint16_t i;
for(i = 0; i < chart->point_cnt; i++) {
ser->y_points[i] = value;
}
ser->start_point = 0;
lv_chart_refresh(obj);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4717FB", "function_addr": 4659195, "binary_name": "1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a.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_24], ax"], [7, "cmp [rbp+var_20], 0"], [8, "jnz short loc_47181A"], [9, "jmp short loc_471818"], [10, "mov rax, [rbp+var_18]"], [11, "mov [rbp+var_10], rax"], [12, "mov [rbp+var_2], 0"], [13, "jmp short loc_47184E"], [14, "mov rax, [rbp+var_20]"], [15, "mov rdx, [rax+8]"], [16, "movzx eax, [rbp+var_2]"], [17, "add rax, rax"], [18, "add rdx, rax"], [19, "movzx eax, [rbp+var_24]"], [20, "mov [rdx], ax"], [21, "movzx eax, [rbp+var_2]"], [22, "add eax, 1"], [23, "mov [rbp+var_2], ax"], [24, "mov rax, [rbp+var_10]"], [25, "movzx eax, word ptr [rax+0AEh]"], [26, "cmp [rbp+var_2], ax"], [27, "jb short loc_47182A"], [28, "mov rax, [rbp+var_20]"], [29, "mov word ptr [rax+12h], 0"], [30, "mov rax, [rbp+var_18]"], [31, "mov rdi, rax"], [32, "call sub_4712DB"], [33, "nop"], [34, "leave"], [35, "retn"]], "data_dep": [[6, 5], [7, 4], [8, 7], [10, 3], [11, 10], [14, 4], [15, 14], [15, 20], [16, 12], [16, 23], [17, 16], [18, 17], [18, 15], [19, 6], [20, 19], [20, 18], [21, 12], [21, 23], [22, 21], [23, 22], [24, 11], [25, 24], [25, 20], [26, 23], [26, 25], [26, 12], [27, 26], [28, 4], [29, 28], [30, 3], [31, 30], [35, 32]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a_1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a.jsonl.gz", "strip_func_name": "sub_4717FB", "query": "\n\n\nvoid __fastcall sub_4717FB(__int64 a1, __int64 a2, __int16 a3)\n{\nunsigned __int16 i; // [rsp+2Eh] [rbp-2h]\n\nif ( !a2 )\n{\nwhile ( 1 )\n;\n}\nfor ( i = 0; i < *(_WORD *)(a1 + 174); ++i )\n*(_WORD *)(2LL * i + *(_QWORD *)(a2 + 8)) = a3;\n*(_WORD *)(a2 + 18) = 0;\nsub_4712DB(a1);\n}\n\n\n\nQ:[a3,a1,a2,sub_4717FB,sub_4712DB,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'value', 'a1': 'obj', 'a2': 'ser', 'sub_4717FB': 'lv_chart_set_all_value', 'sub_4712DB': 'lv_chart_refresh'}"} |
|
qcsapi_wifi_set_basic_authentication_mode | 501cccf918b79847e8ca63bec31f6c1a738c67ece900875150908962c3feed30 | coolsnowwolf | lede | NA | int qcsapi_wifi_set_basic_authentication_mode(const char * ifname, const string_32 authentication_mode)
{
int retries = 0;
int ret;
CLIENT *clnt = qcsapi_adapter_get_client();
enum clnt_stat __rpcret;
struct qcsapi_wifi_set_basic_authentication_mode_rpcdata __req;
struct qcsapi_wifi_set_basic_authentication_mode_rpcdata __resp;
memset(&__req, 0, sizeof(__req));
memset(&__resp, 0, sizeof(__resp));
__rpc_string __rpcifname = {(char *)ifname};
__rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL;
__req.ifname = p__rpcifname;
__rpc_string __rpcauthentication_mode = {(char *)authentication_mode};
__rpc_string *p__rpcauthentication_mode = (authentication_mode) ? &__rpcauthentication_mode : NULL;
__req.authentication_mode = p__rpcauthentication_mode;
if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); }
client_qcsapi_pre();
while (1) {
__rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_BASIC_AUTHENTICATION_MODE_REMOTE,
(xdrproc_t)xdr_qcsapi_wifi_set_basic_authentication_mode_rpcdata, (caddr_t)&__req,
(xdrproc_t)xdr_qcsapi_wifi_set_basic_authentication_mode_rpcdata, (caddr_t)&__resp,
__timeout);
if (__rpcret == RPC_SUCCESS) {
client_qcsapi_post(0);
break;
} else {
clnt_perror (clnt, "qcsapi_wifi_set_basic_authentication_mode call failed");
clnt_perrno (__rpcret);
if (retries >= retries_limit) {
client_qcsapi_post(1);
xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_basic_authentication_mode_rpcdata, (caddr_t)&__resp);
return -ENOLINK;
}
retries++;
client_qcsapi_reconnect();
}
}
if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); }
ret = __resp.return_code;
xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_basic_authentication_mode_rpcdata, (caddr_t)&__resp);
return ret;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_46251C", "function_addr": 4597020, "binary_name": "501cccf918b79847e8ca63bec31f6c1a738c67ece900875150908962c3feed30.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "add rsp, 0FFFFFFFFFFFFFF80h"], [3, "mov [rbp+var_78], rdi"], [4, "mov [rbp+var_80], rsi"], [5, "mov [rbp+var_4], 0"], [6, "call sub_447E6C"], [7, "mov [rbp+clnt], rax"], [8, "lea rax, [rbp+s]"], [9, "mov edx, 18h"], [10, "mov esi, 0"], [11, "mov rdi, rax"], [12, "call _memset"], [13, "lea rax, [rbp+objp]"], [14, "mov edx, 18h"], [15, "mov esi, 0"], [16, "mov rdi, rax"], [17, "call _memset"], [18, "mov rax, [rbp+var_78]"], [19, "mov [rbp+var_68], rax"], [20, "cmp [rbp+var_78], 0"], [21, "jz short loc_46257D"], [22, "lea rax, [rbp+var_68]"], [23, "jmp short loc_462582"], [24, "mov eax, 0"], [25, "mov [rbp+var_18], rax"], [26, "mov rax, [rbp+var_18]"], [27, "mov [rbp+s], rax"], [28, "mov rax, [rbp+var_80]"], [29, "mov [rbp+var_70], rax"], [30, "cmp [rbp+var_80], 0"], [31, "jz short loc_4625A3"], [32, "lea rax, [rbp+var_70]"], [33, "jmp short loc_4625A8"], [34, "mov eax, 0"], [35, "mov [rbp+var_20], rax"], [36, "mov rax, [rbp+var_20]"], [37, "mov [rbp+var_38], rax"], [38, "mov eax, 0"], [39, "test eax, eax"], [40, "jz short loc_4625EE"], [41, "mov rax, cs:stderr_ptr"], [42, "mov rax, [rax]"], [43, "lea r8, aQcsapiWifiSetB_17"], [44, "mov ecx, 2932h"], [45, "lea rdx, aQcsapiRpcGener"], [46, "lea rsi, aSDSPre"], [47, "mov rdi, rax"], [48, "mov eax, 0"], [49, "call _fprintf"], [50, "lea rdi, aQcsapiWifiSetB_17"], [51, "call sub_447EFE"], [52, "mov rax, [rbp+clnt]"], [53, "mov rax, [rax+8]"], [54, "mov r10, [rax]"], [55, "lea rcx, [rbp+objp]"], [56, "lea rdx, [rbp+s]"], [57, "mov rax, [rbp+clnt]"], [58, "push cs:qword_4BF588"], [59, "push cs:qword_4BF580"], [60, "mov r9, rcx"], [61, "mov rcx, offset sub_43AEC3"], [62, "mov r8, rcx"], [63, "mov rcx, rdx"], [64, "mov rdx, offset sub_43AEC3"], [65, "mov esi, 691h"], [66, "mov rdi, rax"], [67, "call r10"], [68, "add rsp, 10h"], [69, "mov [rbp+num], eax"], [70, "cmp [rbp+num], 0"], [71, "jnz short loc_46266D"], [72, "mov esi, 0"], [73, "lea rdi, aQcsapiWifiSetB_17"], [74, "call sub_447F29"], [75, "nop"], [76, "mov eax, 0"], [77, "test eax, eax"], [78, "jz loc_462709"], [79, "jmp short loc_4626D8"], [80, "mov rax, [rbp+clnt]"], [81, "lea rsi, aQcsapiWifiSetB_18"], [82, "mov rdi, rax"], [83, "call _clnt_perror"], [84, "mov eax, [rbp+num]"], [85, "mov edi, eax"], [86, "call _clnt_perrno"], [87, "mov eax, cs:dword_4BF570"], [88, "cmp [rbp+var_4], eax"], [89, "jl short loc_4626C3"], [90, "mov esi, 1"], [91, "lea rdi, aQcsapiWifiSetB_17"], [92, "call sub_447F29"], [93, "lea rax, [rbp+objp]"], [94, "mov rsi, rax"], [95, "mov rax, offset sub_43AEC3"], [96, "mov rdi, rax"], [97, "call _xdr_free"], [98, "mov eax, 0FFFFFFBDh"], [99, "jmp short locret_462728"], [100, "add [rbp+var_4], 1"], [101, "lea rdi, aQcsapiWifiSetB_17"], [102, "call sub_447F5C"], [103, "jmp loc_4625FA"], [104, "mov rax, cs:stderr_ptr"], [105, "mov rax, [rax]"], [106, "lea r8, aQcsapiWifiSetB_17"], [107, "mov ecx, 294Ah"], [108, "lea rdx, aQcsapiRpcGener"], [109, "lea rsi, aSDSPost"], [110, "mov rdi, rax"], [111, "mov eax, 0"], [112, "call _fprintf"], [113, "mov eax, [rbp+var_50]"], [114, "mov [rbp+var_28], eax"], [115, "lea rax, [rbp+objp]"], [116, "mov rsi, rax"], [117, "mov rax, offset sub_43AEC3"], [118, "mov rdi, rax"], [119, "call _xdr_free"], [120, "mov eax, [rbp+var_28]"], [121, "leave"], [122, "retn"]], "data_dep": [[7, 6], [8, 6], [11, 8], [13, 12], [16, 13], [18, 3], [19, 18], [20, 3], [21, 20], [22, 19], [22, 18], [25, 22], [25, 24], [26, 25], [27, 26], [28, 4], [29, 28], [30, 4], [31, 30], [32, 29], [32, 28], [35, 32], [35, 34], [36, 35], [37, 36], [39, 38], [40, 39], [42, 41], [45, 14], [46, 15], [47, 42], [50, 47], [50, 16], [52, 7], [53, 52], [54, 53], [55, 63], [55, 44], [56, 14], [56, 64], [56, 27], [56, 45], [57, 7], [60, 55], [62, 61], [63, 56], [66, 57], [67, 54], [68, 2], [68, 68], [69, 67], [70, 69], [71, 70], [73, 66], [77, 76], [78, 77], [80, 7], [81, 65], [82, 80], [84, 69], [85, 84], [88, 100], [88, 5], [88, 87], [89, 88], [91, 85], [93, 92], [94, 93], [96, 95], [100, 5], [100, 100], [101, 85], [105, 104], [106, 62], [108, 64], [109, 72], [110, 105], [114, 113], [115, 113], [116, 115], [118, 117], [120, 114], [122, 98], [122, 120]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/501cccf918b79847e8ca63bec31f6c1a738c67ece900875150908962c3feed30_501cccf918b79847e8ca63bec31f6c1a738c67ece900875150908962c3feed30.jsonl.gz", "strip_func_name": "sub_46251C", "query": "\n\n\n__int64 __fastcall sub_46251C(__int64 a1, __int64 a2)\n{\n__int64 *v2; // rax\n__int64 *v3; // rax\n__int64 v5; // [rsp+10h] [rbp-70h] BYREF\n__int64 v6; // [rsp+18h] [rbp-68h] BYREF\nchar objp[16]; // [rsp+20h] [rbp-60h] BYREF\nunsigned int v8; // [rsp+30h] [rbp-50h]\n__int64 s[3]; // [rsp+40h] [rbp-40h] BYREF\nunsigned int v10; // [rsp+58h] [rbp-28h]\nenum clnt_stat num; // [rsp+5Ch] [rbp-24h]\n__int64 *v12; // [rsp+60h] [rbp-20h]\n__int64 *v13; // [rsp+68h] [rbp-18h]\nCLIENT *clnt; // [rsp+70h] [rbp-10h]\nint v15; // [rsp+7Ch] [rbp-4h]\n\nv15 = 0;\nclnt = (CLIENT *)sub_447E6C();\nmemset(s, 0, sizeof(s));\nmemset(objp, 0, 0x18uLL);\nv6 = a1;\nif ( a1 )\nv2 = &v6;\nelse\nv2 = 0LL;\nv13 = v2;\ns[0] = (__int64)v2;\nv5 = a2;\nif ( a2 )\nv3 = &v5;\nelse\nv3 = 0LL;\nv12 = v3;\ns[1] = (__int64)v3;\nsub_447EFE((__int64)\"qcsapi_wifi_set_basic_authentication_mode\");\nwhile ( 1 )\n{\nnum = ((__int64 (__fastcall *)(CLIENT *, __int64, _BOOL8 (__fastcall *)(XDR *, void *), __int64 *, _BOOL8 (__fastcall *)(XDR *, void *), char *, __int64, __int64))clnt->cl_ops->cl_call)(\nclnt,\n1681LL,\nsub_43AEC3,\ns,\nsub_43AEC3,\nobjp,\nqword_4BF580,\nqword_4BF588);\nif ( num == RPC_SUCCESS )\n{\nsub_447F29((__int64)\"qcsapi_wifi_set_basic_authentication_mode\", 0);\nv10 = v8;\nxdr_free((xdrproc_t)sub_43AEC3, objp);\nreturn v10;\n}\nclnt_perror(clnt, \"qcsapi_wifi_set_basic_authentication_mode call failed\");\nclnt_perrno(num);\nif ( v15 >= dword_4BF570 )\nbreak;\n++v15;\nsub_447F5C((__int64)\"qcsapi_wifi_set_basic_authentication_mode\");\n}\nsub_447F29((__int64)\"qcsapi_wifi_set_basic_authentication_mode\", 1u);\nxdr_free((xdrproc_t)sub_43AEC3, objp);\nreturn 4294967229LL;\n}\n\n\n\nQ:[a1,a2,v5,v6,objp,s,num,v12,v13,v15,sub_46251C,sub_447E6C,sub_43AEC3,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ifname', 'a2': 'authentication_mode', 'v5': '__rpcauthentication_mode', 'v6': '__rpcifname', 'objp': '__resp', 's': '__req', 'num': '__rpcret', 'v12': 'p__rpcauthentication_mode', 'v13': 'p__rpcifname', 'v15': 'retries', 'sub_46251C': 'qcsapi_wifi_set_basic_authentication_mode', 'sub_447E6C': 'qcsapi_adapter_get_client', 'sub_43AEC3': 'xdr_qcsapi_wifi_set_basic_authentication_mode_rpcdata'}"} |
|
file_close_shadow_fds | da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b | axboe | fio | NA | static int file_close_shadow_fds(struct thread_data *td)
{
struct fio_file *f;
int num_closed = 0;
unsigned int i;
for_each_file(td, f, i) {
if (f->shadow_fd == -1)
continue;
close(f->shadow_fd);
f->shadow_fd = -1;
num_closed++;
}
return num_closed;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_441D66", "function_addr": 4463974, "binary_name": "da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b.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, "mov rax, [rbp+var_18]"], [6, "mov eax, [rax+2DE0Ch]"], [7, "test eax, eax"], [8, "jz short loc_441E04"], [9, "mov [rbp+var_8], 0"], [10, "mov rax, [rbp+var_18]"], [11, "mov rax, [rax+2DDF8h]"], [12, "mov rax, [rax]"], [13, "mov [rbp+var_10], rax"], [14, "jmp short loc_441DD2"], [15, "mov rax, [rbp+var_10]"], [16, "mov eax, [rax+18h]"], [17, "cmp eax, 0FFFFFFFFh"], [18, "jz short loc_441DCD"], [19, "mov rax, [rbp+var_10]"], [20, "mov eax, [rax+18h]"], [21, "mov edi, eax"], [22, "call _close"], [23, "mov rax, [rbp+var_10]"], [24, "mov dword ptr [rax+18h], 0FFFFFFFFh"], [25, "add [rbp+var_4], 1"], [26, "jmp short loc_441DCE"], [27, "nop"], [28, "add [rbp+var_8], 1"], [29, "mov rax, [rbp+var_18]"], [30, "mov eax, [rax+1F0h]"], [31, "cmp [rbp+var_8], eax"], [32, "jnb short loc_441E04"], [33, "mov rax, [rbp+var_18]"], [34, "mov rdx, [rax+2DDF8h]"], [35, "mov eax, [rbp+var_8]"], [36, "shl rax, 3"], [37, "add rax, rdx"], [38, "mov rax, [rax]"], [39, "mov [rbp+var_10], rax"], [40, "cmp [rbp+var_10], 0"], [41, "jnz short loc_441DA2"], [42, "mov eax, [rbp+var_4]"], [43, "leave"], [44, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 7], [10, 3], [11, 10], [12, 11], [13, 12], [15, 39], [16, 15], [16, 24], [17, 16], [18, 17], [19, 39], [20, 19], [20, 24], [21, 20], [23, 39], [24, 23], [25, 4], [25, 25], [28, 9], [28, 28], [29, 3], [30, 24], [30, 29], [31, 28], [31, 9], [31, 30], [32, 31], [33, 3], [34, 24], [34, 33], [35, 28], [35, 9], [36, 35], [37, 36], [37, 34], [38, 37], [38, 24], [39, 38], [40, 39], [41, 40], [42, 4], [42, 25], [44, 42]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n 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_441D66", "query": "\n\n\n__int64 __fastcall sub_441D66(__int64 a1)\n{\n__int64 v2; // [rsp+10h] [rbp-10h]\nunsigned int i; // [rsp+18h] [rbp-8h]\nunsigned int v4; // [rsp+1Ch] [rbp-4h]\n\nv4 = 0;\nif ( *(_DWORD *)(a1 + 187916) )\n{\nfor ( i = 0; i < *(_DWORD *)(a1 + 496); ++i )\n{\nv2 = *(_QWORD *)(*(_QWORD *)(a1 + 187896) + 8LL * i);\nif ( !v2 )\nbreak;\nif ( *(_DWORD *)(v2 + 24) != -1 )\n{\nclose(*(_DWORD *)(v2 + 24));\n*(_DWORD *)(v2 + 24) = -1;\n++v4;\n}\n}\n}\nreturn v4;\n}\n\n\n\nQ:[a1,v2,v4,sub_441D66,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'td', 'v2': 'f', 'v4': 'num_closed', 'sub_441D66': 'file_close_shadow_fds'}"} |
|
atcah_check_mac | 11d42d58f8783c9d414fd3ac05c1e7cfc511bc8aca265d5d1e3cf66df053dd09 | wirenboard | atecc-util | NA | ATCA_STATUS atcah_check_mac(struct atca_check_mac_in_out *param)
{
uint8_t msg[ATCA_MSG_SIZE_MAC];
bool is_temp_key_req = false;
// Check parameters
if (param == NULL || param->other_data == NULL || param->sn == NULL || param->client_resp == NULL)
{
return ATCA_BAD_PARAM;
}
if ((param->mode & CHECKMAC_MODE_BLOCK1_TEMPKEY) || (param->mode & CHECKMAC_MODE_BLOCK2_TEMPKEY))
{
is_temp_key_req = true; // Message uses TempKey
}
else if ((param->mode == 0x01 || param->mode == 0x05) && param->target_key != NULL)
{
is_temp_key_req = true; // CheckMac copy will be performed
}
if (is_temp_key_req && param->temp_key == NULL)
{
return ATCA_BAD_PARAM;
}
if (!(param->mode & CHECKMAC_MODE_BLOCK1_TEMPKEY) && param->slot_key == NULL)
{
return ATCA_BAD_PARAM;
}
if (!(param->mode & CHECKMAC_MODE_BLOCK2_TEMPKEY) && param->client_chal == NULL)
{
return ATCA_BAD_PARAM;
}
if ((param->mode & CHECKMAC_MODE_INCLUDE_OTP_64) && param->otp == NULL)
{
return ATCA_BAD_PARAM;
}
if ((param->mode & CHECKMAC_MODE_BLOCK1_TEMPKEY) || (param->mode & CHECKMAC_MODE_BLOCK2_TEMPKEY))
{
// This will use TempKey in message, check validity
if (!param->temp_key->valid)
{
return ATCA_EXECUTION_ERROR; // TempKey is not valid
}
if (((param->mode >> 2) & 0x01) != param->temp_key->source_flag)
{
return ATCA_EXECUTION_ERROR; // TempKey SourceFlag doesn't match bit 2 of the mode
}
}
// Build the message
memset(msg, 0, sizeof(msg));
if (param->mode & CHECKMAC_MODE_BLOCK1_TEMPKEY)
{
memcpy(&msg[0], param->temp_key->value, 32);
}
else
{
memcpy(&msg[0], param->slot_key, 32);
}
if (param->mode & CHECKMAC_MODE_BLOCK2_TEMPKEY)
{
memcpy(&msg[32], param->temp_key->value, 32);
}
else
{
memcpy(&msg[32], param->client_chal, 32);
}
memcpy(&msg[64], ¶m->other_data[0], 4);
if (param->mode & CHECKMAC_MODE_INCLUDE_OTP_64)
{
memcpy(&msg[68], param->otp, 8);
}
memcpy(&msg[76], ¶m->other_data[4], 3);
msg[79] = param->sn[8];
memcpy(&msg[80], ¶m->other_data[7], 4);
memcpy(&msg[84], ¶m->sn[0], 2);
memcpy(&msg[86], ¶m->other_data[11], 2);
// Calculate the client response
atcac_sw_sha2_256(msg, sizeof(msg), param->client_resp);
// Update TempKey fields
if ((param->mode == 0x01 || param->mode == 0x05) && param->target_key != NULL)
{
// CheckMac Copy will be performed
memcpy(param->temp_key->value, param->target_key, ATCA_KEY_SIZE);
param->temp_key->gen_dig_data = 0;
param->temp_key->source_flag = 1;
param->temp_key->valid = 1;
}
return ATCA_SUCCESS;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407ACF", "function_addr": 4225743, "binary_name": "11d42d58f8783c9d414fd3ac05c1e7cfc511bc8aca265d5d1e3cf66df053dd09.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 70h"], [3, "mov [rbp+var_68], rdi"], [4, "mov [rbp+var_1], 0"], [5, "cmp [rbp+var_68], 0"], [6, "jz short loc_407B0D"], [7, "mov rax, [rbp+var_68]"], [8, "mov rax, [rax+20h]"], [9, "test rax, rax"], [10, "jz short loc_407B0D"], [11, "mov rax, [rbp+var_68]"], [12, "mov rax, [rax+8]"], [13, "test rax, rax"], [14, "jz short loc_407B0D"], [15, "mov rax, [rbp+var_68]"], [16, "mov rax, [rax+18h]"], [17, "test rax, rax"], [18, "jnz short loc_407B17"], [19, "mov eax, 0E2h"], [20, "jmp locret_407E56"], [21, "mov rax, [rbp+var_68]"], [22, "movzx eax, byte ptr [rax]"], [23, "movzx eax, al"], [24, "and eax, 2"], [25, "test eax, eax"], [26, "jnz short loc_407B39"], [27, "mov rax, [rbp+var_68]"], [28, "movzx eax, byte ptr [rax]"], [29, "movzx eax, al"], [30, "and eax, 1"], [31, "test eax, eax"], [32, "jz short loc_407B3F"], [33, "mov [rbp+var_1], 1"], [34, "jmp short loc_407B66"], [35, "mov rax, [rbp+var_68]"], [36, "movzx eax, byte ptr [rax]"], [37, "cmp al, 1"], [38, "jz short loc_407B55"], [39, "mov rax, [rbp+var_68]"], [40, "movzx eax, byte ptr [rax]"], [41, "cmp al, 5"], [42, "jnz short loc_407B66"], [43, "mov rax, [rbp+var_68]"], [44, "mov rax, [rax+38h]"], [45, "test rax, rax"], [46, "jz short loc_407B66"], [47, "mov [rbp+var_1], 1"], [48, "cmp [rbp+var_1], 0"], [49, "jz short loc_407B83"], [50, "mov rax, [rbp+var_68]"], [51, "mov rax, [rax+40h]"], [52, "test rax, rax"], [53, "jnz short loc_407B83"], [54, "mov eax, 0E2h"], [55, "jmp locret_407E56"], [56, "mov rax, [rbp+var_68]"], [57, "movzx eax, byte ptr [rax]"], [58, "movzx eax, al"], [59, "and eax, 2"], [60, "test eax, eax"], [61, "jnz short loc_407BAB"], [62, "mov rax, [rbp+var_68]"], [63, "mov rax, [rax+30h]"], [64, "test rax, rax"], [65, "jnz short loc_407BAB"], [66, "mov eax, 0E2h"], [67, "jmp locret_407E56"], [68, "mov rax, [rbp+var_68]"], [69, "movzx eax, byte ptr [rax]"], [70, "movzx eax, al"], [71, "and eax, 1"], [72, "test eax, eax"], [73, "jnz short loc_407BD3"], [74, "mov rax, [rbp+var_68]"], [75, "mov rax, [rax+10h]"], [76, "test rax, rax"], [77, "jnz short loc_407BD3"], [78, "mov eax, 0E2h"], [79, "jmp locret_407E56"], [80, "mov rax, [rbp+var_68]"], [81, "movzx eax, byte ptr [rax]"], [82, "movzx eax, al"], [83, "and eax, 20h"], [84, "test eax, eax"], [85, "jz short loc_407BFB"], [86, "mov rax, [rbp+var_68]"], [87, "mov rax, [rax+28h]"], [88, "test rax, rax"], [89, "jnz short loc_407BFB"], [90, "mov eax, 0E2h"], [91, "jmp locret_407E56"], [92, "mov rax, [rbp+var_68]"], [93, "movzx eax, byte ptr [rax]"], [94, "movzx eax, al"], [95, "and eax, 2"], [96, "test eax, eax"], [97, "jnz short loc_407C1D"], [98, "mov rax, [rbp+var_68]"], [99, "movzx eax, byte ptr [rax]"], [100, "movzx eax, al"], [101, "and eax, 1"], [102, "test eax, eax"], [103, "jz short loc_407C6F"], [104, "mov rax, [rbp+var_68]"], [105, "mov rax, [rax+40h]"], [106, "movzx eax, byte ptr [rax+41h]"], [107, "and eax, 1"], [108, "test al, al"], [109, "jnz short loc_407C3A"], [110, "mov eax, 0F4h"], [111, "jmp locret_407E56"], [112, "mov rax, [rbp+var_68]"], [113, "movzx eax, byte ptr [rax]"], [114, "shr al, 2"], [115, "movzx eax, al"], [116, "and eax, 1"], [117, "mov edx, eax"], [118, "mov rax, [rbp+var_68]"], [119, "mov rax, [rax+40h]"], [120, "movzx eax, byte ptr [rax+40h]"], [121, "shr al, 4"], [122, "and eax, 1"], [123, "movzx eax, al"], [124, "cmp edx, eax"], [125, "jz short loc_407C6F"], [126, "mov eax, 0F4h"], [127, "jmp locret_407E56"], [128, "lea rax, [rbp+s]"], [129, "mov edx, 58h "], [130, "mov esi, 0"], [131, "mov rdi, rax"], [132, "call _memset"], [133, "mov rax, [rbp+var_68]"], [134, "movzx eax, byte ptr [rax]"], [135, "movzx eax, al"], [136, "and eax, 2"], [137, "test eax, eax"], [138, "jz short loc_407CB7"], [139, "mov rax, [rbp+var_68]"], [140, "mov rax, [rax+40h]"], [141, "mov rcx, rax"], [142, "lea rax, [rbp+s]"], [143, "mov edx, 20h "], [144, "mov rsi, rcx"], [145, "mov rdi, rax"], [146, "call _memcpy"], [147, "jmp short loc_407CD3"], [148, "mov rax, [rbp+var_68]"], [149, "mov rcx, [rax+30h]"], [150, "lea rax, [rbp+s]"], [151, "mov edx, 20h "], [152, "mov rsi, rcx"], [153, "mov rdi, rax"], [154, "call _memcpy"], [155, "mov rax, [rbp+var_68]"], [156, "movzx eax, byte ptr [rax]"], [157, "movzx eax, al"], [158, "and eax, 1"], [159, "test eax, eax"], [160, "jz short loc_407D09"], [161, "mov rax, [rbp+var_68]"], [162, "mov rax, [rax+40h]"], [163, "mov rcx, rax"], [164, "lea rax, [rbp+s]"], [165, "add rax, 20h "], [166, "mov edx, 20h "], [167, "mov rsi, rcx"], [168, "mov rdi, rax"], [169, "call _memcpy"], [170, "jmp short loc_407D29"], [171, "mov rax, [rbp+var_68]"], [172, "mov rax, [rax+10h]"], [173, "lea rdx, [rbp+s]"], [174, "lea rcx, [rdx+20h]"], [175, "mov edx, 20h "], [176, "mov rsi, rax"], [177, "mov rdi, rcx"], [178, "call _memcpy"], [179, "mov rax, [rbp+var_68]"], [180, "mov rax, [rax+20h]"], [181, "mov eax, [rax]"], [182, "mov [rbp+var_20], eax"], [183, "mov rax, [rbp+var_68]"], [184, "movzx eax, byte ptr [rax]"], [185, "movzx eax, al"], [186, "and eax, 20h"], [187, "test eax, eax"], [188, "jz short loc_407D56"], [189, "mov rax, [rbp+var_68]"], [190, "mov rax, [rax+28h]"], [191, "mov rax, [rax]"], [192, "mov [rbp+var_1C], rax"], [193, "mov rax, [rbp+var_68]"], [194, "mov rax, [rax+20h]"], [195, "lea rcx, [rax+4]"], [196, "lea rax, [rbp+s]"], [197, "add rax, 4Ch "], [198, "mov edx, 3"], [199, "mov rsi, rcx"], [200, "mov rdi, rax"], [201, "call _memcpy"], [202, "mov rax, [rbp+var_68]"], [203, "mov rax, [rax+8]"], [204, "movzx eax, byte ptr [rax+8]"], [205, "mov [rbp+var_11], al"], [206, "mov rax, [rbp+var_68]"], [207, "mov rax, [rax+20h]"], [208, "add rax, 7"], [209, "mov eax, [rax]"], [210, "mov [rbp+var_10], eax"], [211, "mov rax, [rbp+var_68]"], [212, "mov rax, [rax+8]"], [213, "movzx eax, word ptr [rax]"], [214, "mov [rbp+var_C], ax"], [215, "mov rax, [rbp+var_68]"], [216, "mov rax, [rax+20h]"], [217, "add rax, 0Bh"], [218, "movzx eax, word ptr [rax]"], [219, "mov [rbp+var_A], ax"], [220, "mov rax, [rbp+var_68]"], [221, "mov rdx, [rax+18h]"], [222, "lea rax, [rbp+s]"], [223, "mov esi, 58h "], [224, "mov rdi, rax"], [225, "call sub_40A7FF"], [226, "mov rax, [rbp+var_68]"], [227, "movzx eax, byte ptr [rax]"], [228, "cmp al, 1"], [229, "jz short loc_407DEB"], [230, "mov rax, [rbp+var_68]"], [231, "movzx eax, byte ptr [rax]"], [232, "cmp al, 5"], [233, "jnz short loc_407E51"], [234, "mov rax, [rbp+var_68]"], [235, "mov rax, [rax+38h]"], [236, "test rax, rax"], [237, "jz short loc_407E51"], [238, "mov rax, [rbp+var_68]"], [239, "mov rax, [rax+38h]"], [240, "mov rdx, [rbp+var_68]"], [241, "mov rdx, [rdx+40h]"], [242, "mov rcx, rdx"], [243, "mov edx, 20h "], [244, "mov rsi, rax"], [245, "mov rdi, rcx"], [246, "call _memcpy"], [247, "mov rax, [rbp+var_68]"], [248, "mov rax, [rax+40h]"], [249, "movzx edx, byte ptr [rax+40h]"], [250, "and edx, 0FFFFFFDFh"], [251, "mov [rax+40h], dl"], [252, "mov rax, [rbp+var_68]"], [253, "mov rax, [rax+40h]"], [254, "movzx edx, byte ptr [rax+40h]"], [255, "or edx, 10h"], [256, "mov [rax+40h], dl"], [257, "mov rax, [rbp+var_68]"], [258, "mov rax, [rax+40h]"], [259, "movzx edx, byte ptr [rax+41h]"], [260, "or edx, 1"], [261, "mov [rax+41h], dl"], [262, "mov eax, 0"], [263, "leave"], [264, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 3], [8, 7], [9, 8], [10, 9], [11, 3], [12, 11], [13, 12], [14, 13], [15, 3], [16, 15], [17, 16], [18, 17], [21, 3], [22, 21], [23, 22], [24, 23], [25, 24], [26, 25], [27, 3], [28, 27], [29, 28], [30, 29], [31, 30], [32, 31], [35, 3], [36, 35], [37, 36], [38, 37], [39, 3], [40, 39], [41, 40], [42, 41], [43, 3], [44, 43], [45, 44], [46, 45], [48, 47], [48, 33], [48, 4], [49, 48], [50, 3], [51, 50], [52, 51], [53, 52], [56, 3], [57, 56], [58, 57], [59, 58], [60, 59], [61, 60], [62, 3], [63, 62], [64, 63], [65, 64], [68, 3], [69, 68], [70, 69], [71, 70], [72, 71], [73, 72], [74, 3], [75, 74], [76, 75], [77, 76], [80, 3], [81, 80], [82, 81], [83, 82], [84, 83], [85, 84], [86, 3], [87, 86], [88, 87], [89, 88], [92, 3], [93, 92], [94, 93], [95, 94], [96, 95], [97, 96], [98, 3], [99, 98], [100, 99], [101, 100], [102, 101], [103, 102], [104, 3], [105, 104], [106, 105], [107, 106], [108, 107], [109, 108], [112, 3], [113, 112], [114, 113], [115, 114], [116, 115], [117, 116], [118, 3], [119, 118], [120, 119], [121, 120], [122, 121], [123, 122], [124, 117], [124, 123], [125, 124], [128, 123], [128, 102], [131, 128], [133, 3], [134, 133], [135, 134], [136, 135], [137, 136], [138, 137], [139, 3], [140, 139], [141, 140], [142, 140], [144, 141], [145, 142], [148, 3], [149, 148], [150, 148], [152, 149], [153, 150], [155, 3], [156, 155], [157, 156], [158, 157], [159, 158], [160, 159], [161, 3], [162, 161], [163, 162], [164, 162], [165, 164], [167, 163], [168, 165], [171, 3], [172, 171], [173, 151], [173, 143], [174, 173], [174, 141], [174, 149], [176, 172], [177, 174], [179, 3], [180, 179], [181, 180], [182, 181], [183, 3], [184, 183], [185, 184], [186, 185], [187, 186], [188, 187], [189, 3], [190, 189], [191, 190], [192, 191], [193, 3], [194, 193], [195, 163], [195, 174], [195, 194], [196, 194], [197, 196], [199, 195], [200, 197], [202, 3], [203, 202], [204, 203], [205, 204], [206, 3], [207, 206], [208, 207], [209, 208], [210, 209], [211, 3], [212, 211], [213, 212], [214, 213], [215, 3], [216, 215], [217, 216], [218, 217], [219, 218], [220, 3], [221, 220], [222, 220], [224, 222], [226, 3], [227, 226], [228, 227], [229, 228], [230, 3], [231, 230], [232, 231], [233, 232], [234, 3], [235, 234], [236, 235], [237, 236], [238, 3], [239, 238], [240, 3], [241, 240], [242, 241], [244, 239], [245, 242], [247, 3], [248, 247], [249, 248], [250, 249], [251, 248], [251, 250], [252, 3], [253, 251], [253, 252], [254, 251], [254, 253], [255, 254], [256, 253], [256, 255], [257, 3], [258, 257], [258, 256], [259, 256], [259, 258], [260, 259], [261, 258], [261, 260], [264, 78], [264, 126], [264, 110], [264, 66], [264, 262], [264, 54], [264, 90], [264, 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/11d42d58f8783c9d414fd3ac05c1e7cfc511bc8aca265d5d1e3cf66df053dd09_11d42d58f8783c9d414fd3ac05c1e7cfc511bc8aca265d5d1e3cf66df053dd09.jsonl.gz", "strip_func_name": "sub_407ACF", "query": "\n\n\n__int64 __fastcall sub_407ACF(__int64 a1)\n{\nchar s[32]; // [rsp+10h] [rbp-60h] BYREF\n_DWORD v3[9]; // [rsp+30h] [rbp-40h] BYREF\n__int64 v4; // [rsp+54h] [rbp-1Ch]\n_BYTE v5[4]; // [rsp+5Ch] [rbp-14h] BYREF\nint v6; // [rsp+60h] [rbp-10h]\n__int16 v7; // [rsp+64h] [rbp-Ch]\n__int16 v8; // [rsp+66h] [rbp-Ah]\nchar v9; // [rsp+6Fh] [rbp-1h]\n\nv9 = 0;\nif ( !a1 || !*(_QWORD *)(a1 + 32) || !*(_QWORD *)(a1 + 8) || !*(_QWORD *)(a1 + 24) )\nreturn 226LL;\nif ( (*(_BYTE *)a1 & 2) != 0 || (*(_BYTE *)a1 & 1) != 0 )\n{\nv9 = 1;\n}\nelse if ( (*(_BYTE *)a1 == 1 || *(_BYTE *)a1 == 5) && *(_QWORD *)(a1 + 56) )\n{\nv9 = 1;\n}\nif ( v9 && !*(_QWORD *)(a1 + 64) )\nreturn 226LL;\nif ( (*(_BYTE *)a1 & 2) == 0 && !*(_QWORD *)(a1 + 48) )\nreturn 226LL;\nif ( (*(_BYTE *)a1 & 1) == 0 && !*(_QWORD *)(a1 + 16) )\nreturn 226LL;\nif ( (*(_BYTE *)a1 & 0x20) != 0 && !*(_QWORD *)(a1 + 40) )\nreturn 226LL;\nif ( (*(_BYTE *)a1 & 2) == 0 && (*(_BYTE *)a1 & 1) == 0 )\ngoto LABEL_31;\nif ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + 65LL) & 1) == 0 )\nreturn 244LL;\nif ( ((*(_BYTE *)a1 & 4) != 0) != ((*(_BYTE *)(*(_QWORD *)(a1 + 64) + 64LL) & 0x10) != 0) )\nreturn 244LL;\nLABEL_31:\nmemset(s, 0, 0x58uLL);\nif ( (*(_BYTE *)a1 & 2) != 0 )\nmemcpy(s, *(const void **)(a1 + 64), sizeof(s));\nelse\nmemcpy(s, *(const void **)(a1 + 48), sizeof(s));\nif ( (*(_BYTE *)a1 & 1) != 0 )\nmemcpy(v3, *(const void **)(a1 + 64), 0x20uLL);\nelse\nmemcpy(v3, *(const void **)(a1 + 16), 0x20uLL);\nv3[8] = **(_DWORD **)(a1 + 32);\nif ( (*(_BYTE *)a1 & 0x20) != 0 )\nv4 = **(_QWORD **)(a1 + 40);\nmemcpy(v5, (const void *)(*(_QWORD *)(a1 + 32) + 4LL), 3uLL);\nv5[3] = *(_BYTE *)(*(_QWORD *)(a1 + 8) + 8LL);\nv6 = *(_DWORD *)(*(_QWORD *)(a1 + 32) + 7LL);\nv7 = **(_WORD **)(a1 + 8);\nv8 = *(_WORD *)(*(_QWORD *)(a1 + 32) + 11LL);\nsub_40A7FF(s, 88LL, *(_QWORD *)(a1 + 24));\nif ( *(_BYTE *)a1 == 1 || *(_BYTE *)a1 == 5 )\n{\nif ( *(_QWORD *)(a1 + 56) )\n{\nmemcpy(*(void **)(a1 + 64), *(const void **)(a1 + 56), 0x20uLL);\n*(_BYTE *)(*(_QWORD *)(a1 + 64) + 64LL) &= 0xDFu;\n*(_BYTE *)(*(_QWORD *)(a1 + 64) + 64LL) |= 0x10u;\n*(_BYTE *)(*(_QWORD *)(a1 + 64) + 65LL) |= 1u;\n}\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,s,v9,sub_407ACF,sub_40A7FF,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'param', 's': 'msg', 'v9': 'is_temp_key_req', 'sub_407ACF': 'atcah_check_mac', 'sub_40A7FF': 'atcac_sw_sha2_256'}"} |
|
computeAuxTape | 15b39d7a8d3e243a375495311507ce325f3a052946f5a306fe27192ef6b4c2fe | microsoft | Picnic | NA | static void computeAuxTape(randomTape_t* tapes, uint8_t* inputs, paramset_t* params)
{
uint32_t roundKey[LOWMC_MAX_WORDS];
uint32_t x[LOWMC_MAX_WORDS] = {0};
uint32_t y[LOWMC_MAX_WORDS];
uint32_t key[LOWMC_MAX_WORDS];
uint32_t key0[LOWMC_MAX_WORDS];
key0[params->stateSizeWords - 1] = 0;
tapesToParityBits(key0, params->stateSizeBits, tapes);
// key = key0 x KMatrix[0]^(-1)
matrix_mul(key, key0, KMatrixInv(0, params), params);
if(inputs != NULL) {
memcpy(inputs, key, params->stateSizeBytes);
}
for (uint32_t r = params->numRounds; r > 0; r--) {
matrix_mul(roundKey, key, KMatrix(r, params), params); // roundKey = key * KMatrix(r)
xor_array(x, x, roundKey, params->stateSizeWords);
matrix_mul(y, x, LMatrixInv(r-1, params), params);
if(r == 1) {
// Use key as input
memcpy(x, key0, params->stateSizeBytes);
}
else {
tapes->pos = params->stateSizeBits * 2 * (r - 1);
// Read input mask shares from tapes
tapesToParityBits(x, params->stateSizeBits, tapes);
}
tapes->pos = params->stateSizeBits * 2 * (r - 1) + params->stateSizeBits;
aux_mpc_sbox(x, y, tapes, params);
}
// Reset the random tape counter so that the online execution uses the
// same random bits as when computing the aux shares
tapes->pos = 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_408B91", "function_addr": 4230033, "binary_name": "15b39d7a8d3e243a375495311507ce325f3a052946f5a306fe27192ef6b4c2fe.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 170h"], [3, "mov [rbp+var_158], rdi"], [4, "mov [rbp+dest], rsi"], [5, "mov [rbp+var_168], rdx"], [6, "mov [rbp+var_90], 0"], [7, "mov [rbp+var_88], 0"], [8, "mov [rbp+var_80], 0"], [9, "mov [rbp+var_78], 0"], [10, "mov [rbp+var_70], 0"], [11, "mov [rbp+var_68], 0"], [12, "mov [rbp+var_60], 0"], [13, "mov [rbp+var_58], 0"], [14, "mov rax, [rbp+var_168]"], [15, "mov eax, [rax+10h]"], [16, "sub eax, 1"], [17, "mov eax, eax"], [18, "mov [rbp+rax*4+var_150], 0"], [19, "mov rax, [rbp+var_168]"], [20, "mov eax, [rax+8]"], [21, "mov ecx, eax"], [22, "mov rdx, [rbp+var_158]"], [23, "lea rax, [rbp+var_150]"], [24, "mov rsi, rcx"], [25, "mov rdi, rax"], [26, "call sub_408901"], [27, "mov rax, [rbp+var_168]"], [28, "mov rsi, rax"], [29, "mov edi, 0"], [30, "call sub_40EA91"], [31, "mov rdi, rax"], [32, "mov rdx, [rbp+var_168]"], [33, "lea rsi, [rbp+var_150]"], [34, "lea rax, [rbp+src]"], [35, "mov rcx, rdx"], [36, "mov rdx, rdi"], [37, "mov rdi, rax"], [38, "call sub_404535"], [39, "cmp [rbp+dest], 0"], [40, "jz short loc_408C9F"], [41, "mov rax, [rbp+var_168]"], [42, "mov eax, [rax+0Ch]"], [43, "mov edx, eax"], [44, "lea rcx, [rbp+src]"], [45, "mov rax, [rbp+dest]"], [46, "mov rsi, rcx"], [47, "mov rdi, rax"], [48, "call _memcpy"], [49, "mov rax, [rbp+var_168]"], [50, "mov eax, [rax]"], [51, "mov [rbp+var_4], eax"], [52, "jmp loc_408E0E"], [53, "mov rdx, [rbp+var_168]"], [54, "mov eax, [rbp+var_4]"], [55, "mov rsi, rdx"], [56, "mov edi, eax"], [57, "call sub_40E953"], [58, "mov rdi, rax"], [59, "mov rdx, [rbp+var_168]"], [60, "lea rsi, [rbp+src]"], [61, "lea rax, [rbp+var_50]"], [62, "mov rcx, rdx"], [63, "mov rdx, rdi"], [64, "mov rdi, rax"], [65, "call sub_404535"], [66, "mov rax, [rbp+var_168]"], [67, "mov ecx, [rax+10h]"], [68, "lea rdx, [rbp+var_50]"], [69, "lea rsi, [rbp+var_90]"], [70, "lea rax, [rbp+var_90]"], [71, "mov rdi, rax"], [72, "call sub_404378"], [73, "mov eax, [rbp+var_4]"], [74, "lea edx, [rax-1]"], [75, "mov rax, [rbp+var_168]"], [76, "mov rsi, rax"], [77, "mov edi, edx"], [78, "call sub_40E8A3"], [79, "mov rdi, rax"], [80, "mov rdx, [rbp+var_168]"], [81, "lea rsi, [rbp+var_90]"], [82, "lea rax, [rbp+var_D0]"], [83, "mov rcx, rdx"], [84, "mov rdx, rdi"], [85, "mov rdi, rax"], [86, "call sub_404535"], [87, "cmp [rbp+var_4], 1"], [88, "jnz short loc_408D75"], [89, "mov rax, [rbp+var_168]"], [90, "mov eax, [rax+0Ch]"], [91, "mov edx, eax"], [92, "lea rcx, [rbp+var_150]"], [93, "lea rax, [rbp+var_90]"], [94, "mov rsi, rcx"], [95, "mov rdi, rax"], [96, "call _memcpy"], [97, "jmp short loc_408DBA"], [98, "mov rax, [rbp+var_168]"], [99, "mov eax, [rax+8]"], [100, "mov edx, [rbp+var_4]"], [101, "sub edx, 1"], [102, "imul eax, edx"], [103, "lea edx, [rax+rax]"], [104, "mov rax, [rbp+var_158]"], [105, "mov [rax+8], edx"], [106, "mov rax, [rbp+var_168]"], [107, "mov eax, [rax+8]"], [108, "mov ecx, eax"], [109, "mov rdx, [rbp+var_158]"], [110, "lea rax, [rbp+var_90]"], [111, "mov rsi, rcx"], [112, "mov rdi, rax"], [113, "call sub_408901"], [114, "mov rax, [rbp+var_168]"], [115, "mov eax, [rax+8]"], [116, "mov edx, [rbp+var_4]"], [117, "sub edx, 1"], [118, "imul eax, edx"], [119, "lea edx, [rax+rax]"], [120, "mov rax, [rbp+var_168]"], [121, "mov eax, [rax+8]"], [122, "add edx, eax"], [123, "mov rax, [rbp+var_158]"], [124, "mov [rax+8], edx"], [125, "mov rcx, [rbp+var_168]"], [126, "mov rdx, [rbp+var_158]"], [127, "lea rsi, [rbp+var_D0]"], [128, "lea rax, [rbp+var_90]"], [129, "mov rdi, rax"], [130, "call sub_408A3B"], [131, "sub [rbp+var_4], 1"], [132, "cmp [rbp+var_4], 0"], [133, "jnz loc_408CB0"], [134, "mov rax, [rbp+var_158]"], [135, "mov dword ptr [rax+8], 0"], [136, "nop"], [137, "leave"], [138, "retn"]], "data_dep": [[14, 5], [15, 14], [16, 15], [17, 16], [18, 17], [19, 5], [20, 19], [21, 20], [22, 3], [23, 20], [24, 21], [25, 23], [27, 5], [28, 27], [31, 30], [32, 5], [33, 28], [34, 30], [35, 32], [36, 31], [37, 34], [39, 4], [40, 39], [41, 5], [42, 41], [43, 42], [44, 35], [45, 4], [46, 44], [47, 45], [49, 5], [50, 49], [51, 50], [53, 5], [54, 131], [54, 51], [55, 53], [56, 54], [58, 57], [59, 5], [60, 55], [61, 57], [62, 59], [63, 58], [64, 61], [66, 5], [67, 124], [67, 66], [67, 105], [68, 63], [69, 60], [69, 6], [70, 66], [70, 6], [71, 70], [73, 131], [73, 51], [74, 73], [74, 68], [74, 124], [74, 105], [75, 5], [76, 75], [77, 74], [79, 78], [80, 5], [81, 76], [81, 6], [82, 78], [83, 80], [84, 79], [85, 82], [87, 51], [87, 131], [88, 87], [89, 5], [90, 124], [90, 105], [90, 89], [91, 90], [92, 83], [93, 6], [93, 90], [94, 92], [95, 93], [98, 5], [99, 124], [99, 105], [99, 98], [100, 131], [100, 51], [101, 100], [102, 99], [102, 101], [103, 102], [103, 124], [103, 101], [103, 105], [104, 3], [105, 104], [105, 103], [106, 5], [107, 106], [107, 105], [108, 107], [109, 3], [110, 6], [110, 107], [111, 108], [112, 110], [114, 5], [115, 105], [115, 114], [115, 124], [116, 131], [116, 51], [117, 116], [118, 115], [118, 117], [119, 105], [119, 118], [119, 124], [119, 117], [120, 5], [121, 105], [121, 120], [121, 124], [122, 119], [122, 121], [123, 3], [124, 122], [124, 123], [125, 5], [126, 3], [127, 111], [127, 94], [128, 123], [128, 6], [129, 128], [131, 131], [131, 51], [132, 131], [132, 51], [133, 132], [134, 3], [135, 134], [138, 134]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/15b39d7a8d3e243a375495311507ce325f3a052946f5a306fe27192ef6b4c2fe_15b39d7a8d3e243a375495311507ce325f3a052946f5a306fe27192ef6b4c2fe.jsonl.gz", "strip_func_name": "sub_408B91", "query": "\n\n\n__int64 __fastcall sub_408B91(__int64 a1, void *a2, __int64 a3)\n{\n__int64 v3; // rax\n__int64 v4; // rax\n__int64 v5; // rax\n__int64 result; // rax\nint v8[16]; // [rsp+20h] [rbp-150h] BYREF\nchar src[64]; // [rsp+60h] [rbp-110h] BYREF\nchar v10[64]; // [rsp+A0h] [rbp-D0h] BYREF\n__int64 v11[8]; // [rsp+E0h] [rbp-90h] BYREF\nchar v12[76]; // [rsp+120h] [rbp-50h] BYREF\nunsigned int i; // [rsp+16Ch] [rbp-4h]\n\nv11[0] = 0LL;\nv11[1] = 0LL;\nv11[2] = 0LL;\nv11[3] = 0LL;\nv11[4] = 0LL;\nv11[5] = 0LL;\nv11[6] = 0LL;\nv11[7] = 0LL;\nv8[*(_DWORD *)(a3 + 16) - 1] = 0;\nsub_408901((__int64)v8, *(unsigned int *)(a3 + 8), a1);\nv3 = sub_40EA91(0LL, a3);\nsub_404535(src, (__int64)v8, v3, a3);\nif ( a2 )\nmemcpy(a2, src, *(unsigned int *)(a3 + 12));\nfor ( i = *(_DWORD *)a3; i; --i )\n{\nv4 = sub_40E953(i, a3);\nsub_404535(v12, (__int64)src, v4, a3);\nsub_404378((__int64)v11, (__int64)v11, (__int64)v12, *(_DWORD *)(a3 + 16));\nv5 = sub_40E8A3(i - 1, a3);\nsub_404535(v10, (__int64)v11, v5, a3);\nif ( i == 1 )\n{\nmemcpy(v11, v8, *(unsigned int *)(a3 + 12));\n}\nelse\n{\n*(_DWORD *)(a1 + 8) = 2 * (i - 1) * *(_DWORD *)(a3 + 8);\nsub_408901((__int64)v11, *(unsigned int *)(a3 + 8), a1);\n}\n*(_DWORD *)(a1 + 8) = *(_DWORD *)(a3 + 8) + 2 * (i - 1) * *(_DWORD *)(a3 + 8);\nsub_408A3B((__int64)v11, (__int64)v10, a1, a3);\n}\nresult = a1;\n*(_DWORD *)(a1 + 8) = 0;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v8,src,v10,v11,v12,i,sub_408B91,sub_408901,sub_40EA91,sub_404535,sub_40E953,sub_404378,sub_40E8A3,sub_408A3B,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'params', 'a1': 'tapes', 'a2': 'inputs', 'v8': 'key0', 'src': 'key', 'v10': 'y', 'v11': 'x', 'v12': 'roundKey', 'i': 'r', 'sub_408B91': 'computeAuxTape', 'sub_408901': 'tapesToParityBits', 'sub_40EA91': 'KMatrixInv', 'sub_404535': 'matrix_mul', 'sub_40E953': 'KMatrix', 'sub_404378': 'xor_array', 'sub_40E8A3': 'LMatrixInv', 'sub_408A3B': 'aux_mpc_sbox'}"} |
|
sm_d1_d_prime | 1cdcd09e088b6ff1db54fa3ae8a0c70f8f219b2e121d0ce2b5639ebfe341cfd3 | Matheus-Garbelini | esp32_bluetooth_classic_sniffer | NA | static void sm_d1_d_prime(uint16_t d, uint16_t r, uint8_t * d1_prime){
// d'= padding || r || d
memset(d1_prime, 0, 16);
big_endian_store_16(d1_prime, 12, r);
big_endian_store_16(d1_prime, 14, d);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4267AC", "function_addr": 4351916, "binary_name": "1cdcd09e088b6ff1db54fa3ae8a0c70f8f219b2e121d0ce2b5639ebfe341cfd3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov ecx, edi"], [4, "mov eax, esi"], [5, "mov [rbp+s], rdx"], [6, "mov edx, ecx"], [7, "mov [rbp+var_4], dx"], [8, "mov [rbp+var_8], ax"], [9, "mov rax, [rbp+s]"], [10, "mov edx, 10h"], [11, "mov esi, 0"], [12, "mov rdi, rax"], [13, "call _memset"], [14, "movzx edx, [rbp+var_8]"], [15, "mov rax, [rbp+s]"], [16, "mov esi, 0Ch"], [17, "mov rdi, rax"], [18, "call sub_409810"], [19, "movzx edx, [rbp+var_4]"], [20, "mov rax, [rbp+s]"], [21, "mov esi, 0Eh"], [22, "mov rdi, rax"], [23, "call sub_409810"], [24, "nop"], [25, "leave"], [26, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 4], [9, 5], [12, 9], [14, 8], [15, 5], [17, 15], [19, 7], [20, 5], [22, 20], [26, 23]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1cdcd09e088b6ff1db54fa3ae8a0c70f8f219b2e121d0ce2b5639ebfe341cfd3_1cdcd09e088b6ff1db54fa3ae8a0c70f8f219b2e121d0ce2b5639ebfe341cfd3.jsonl.gz", "strip_func_name": "sub_4267AC", "query": "\n\n\n_BYTE *__fastcall sub_4267AC(__int16 a1, __int16 a2, void *a3)\n{\nmemset(a3, 0, 0x10uLL);\nsub_409810((__int64)a3, 0xCu, a2);\nreturn sub_409810((__int64)a3, 0xEu, a1);\n}\n\n\n\nQ:[a3,a1,a2,sub_4267AC,sub_409810,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'd1_prime', 'a1': 'd', 'a2': 'r', 'sub_4267AC': 'sm_d1_d_prime', 'sub_409810': 'big_endian_store_16'}"} |
|
load_GL_SUN_vertex | f5227d6b31190984a5b857df5f03cff4635a382d1852a53d4ff2fd0ada8a07c1 | heuripedes | sdlarch | NA | static void load_GL_SUN_vertex(GLADloadproc load) {
if(!GLAD_GL_SUN_vertex) return;
glad_glColor4ubVertex2fSUN = (PFNGLCOLOR4UBVERTEX2FSUNPROC)load("glColor4ubVertex2fSUN");
glad_glColor4ubVertex2fvSUN = (PFNGLCOLOR4UBVERTEX2FVSUNPROC)load("glColor4ubVertex2fvSUN");
glad_glColor4ubVertex3fSUN = (PFNGLCOLOR4UBVERTEX3FSUNPROC)load("glColor4ubVertex3fSUN");
glad_glColor4ubVertex3fvSUN = (PFNGLCOLOR4UBVERTEX3FVSUNPROC)load("glColor4ubVertex3fvSUN");
glad_glColor3fVertex3fSUN = (PFNGLCOLOR3FVERTEX3FSUNPROC)load("glColor3fVertex3fSUN");
glad_glColor3fVertex3fvSUN = (PFNGLCOLOR3FVERTEX3FVSUNPROC)load("glColor3fVertex3fvSUN");
glad_glNormal3fVertex3fSUN = (PFNGLNORMAL3FVERTEX3FSUNPROC)load("glNormal3fVertex3fSUN");
glad_glNormal3fVertex3fvSUN = (PFNGLNORMAL3FVERTEX3FVSUNPROC)load("glNormal3fVertex3fvSUN");
glad_glColor4fNormal3fVertex3fSUN = (PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC)load("glColor4fNormal3fVertex3fSUN");
glad_glColor4fNormal3fVertex3fvSUN = (PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC)load("glColor4fNormal3fVertex3fvSUN");
glad_glTexCoord2fVertex3fSUN = (PFNGLTEXCOORD2FVERTEX3FSUNPROC)load("glTexCoord2fVertex3fSUN");
glad_glTexCoord2fVertex3fvSUN = (PFNGLTEXCOORD2FVERTEX3FVSUNPROC)load("glTexCoord2fVertex3fvSUN");
glad_glTexCoord4fVertex4fSUN = (PFNGLTEXCOORD4FVERTEX4FSUNPROC)load("glTexCoord4fVertex4fSUN");
glad_glTexCoord4fVertex4fvSUN = (PFNGLTEXCOORD4FVERTEX4FVSUNPROC)load("glTexCoord4fVertex4fvSUN");
glad_glTexCoord2fColor4ubVertex3fSUN = (PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC)load("glTexCoord2fColor4ubVertex3fSUN");
glad_glTexCoord2fColor4ubVertex3fvSUN = (PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC)load("glTexCoord2fColor4ubVertex3fvSUN");
glad_glTexCoord2fColor3fVertex3fSUN = (PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC)load("glTexCoord2fColor3fVertex3fSUN");
glad_glTexCoord2fColor3fVertex3fvSUN = (PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC)load("glTexCoord2fColor3fVertex3fvSUN");
glad_glTexCoord2fNormal3fVertex3fSUN = (PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC)load("glTexCoord2fNormal3fVertex3fSUN");
glad_glTexCoord2fNormal3fVertex3fvSUN = (PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC)load("glTexCoord2fNormal3fVertex3fvSUN");
glad_glTexCoord2fColor4fNormal3fVertex3fSUN = (PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC)load("glTexCoord2fColor4fNormal3fVertex3fSUN");
glad_glTexCoord2fColor4fNormal3fVertex3fvSUN = (PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC)load("glTexCoord2fColor4fNormal3fVertex3fvSUN");
glad_glTexCoord4fColor4fNormal3fVertex4fSUN = (PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC)load("glTexCoord4fColor4fNormal3fVertex4fSUN");
glad_glTexCoord4fColor4fNormal3fVertex4fvSUN = (PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC)load("glTexCoord4fColor4fNormal3fVertex4fvSUN");
glad_glReplacementCodeuiVertex3fSUN = (PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC)load("glReplacementCodeuiVertex3fSUN");
glad_glReplacementCodeuiVertex3fvSUN = (PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC)load("glReplacementCodeuiVertex3fvSUN");
glad_glReplacementCodeuiColor4ubVertex3fSUN = (PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC)load("glReplacementCodeuiColor4ubVertex3fSUN");
glad_glReplacementCodeuiColor4ubVertex3fvSUN = (PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC)load("glReplacementCodeuiColor4ubVertex3fvSUN");
glad_glReplacementCodeuiColor3fVertex3fSUN = (PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC)load("glReplacementCodeuiColor3fVertex3fSUN");
glad_glReplacementCodeuiColor3fVertex3fvSUN = (PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC)load("glReplacementCodeuiColor3fVertex3fvSUN");
glad_glReplacementCodeuiNormal3fVertex3fSUN = (PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC)load("glReplacementCodeuiNormal3fVertex3fSUN");
glad_glReplacementCodeuiNormal3fVertex3fvSUN = (PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC)load("glReplacementCodeuiNormal3fVertex3fvSUN");
glad_glReplacementCodeuiColor4fNormal3fVertex3fSUN = (PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC)load("glReplacementCodeuiColor4fNormal3fVertex3fSUN");
glad_glReplacementCodeuiColor4fNormal3fVertex3fvSUN = (PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC)load("glReplacementCodeuiColor4fNormal3fVertex3fvSUN");
glad_glReplacementCodeuiTexCoord2fVertex3fSUN = (PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC)load("glReplacementCodeuiTexCoord2fVertex3fSUN");
glad_glReplacementCodeuiTexCoord2fVertex3fvSUN = (PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC)load("glReplacementCodeuiTexCoord2fVertex3fvSUN");
glad_glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN = (PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC)load("glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN");
glad_glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN = (PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC)load("glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN");
glad_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN = (PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC)load("glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN");
glad_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN = (PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC)load("glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN");
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_416035", "function_addr": 4284469, "binary_name": "f5227d6b31190984a5b857df5f03cff4635a382d1852a53d4ff2fd0ada8a07c1.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, cs:dword_43C2C0"], [5, "test eax, eax"], [6, "jz loc_416321"], [7, "mov rax, [rbp+var_8]"], [8, "mov edi, offset aGlcolor4ubvert"], [9, "call rax"], [10, "mov cs:qword_43FBB0, rax"], [11, "mov rax, [rbp+var_8]"], [12, "mov edi, offset aGlcolor4ubvert_0"], [13, "call rax"], [14, "mov cs:qword_43FBB8, rax"], [15, "mov rax, [rbp+var_8]"], [16, "mov edi, offset aGlcolor4ubvert_1"], [17, "call rax"], [18, "mov cs:qword_43FBC0, rax"], [19, "mov rax, [rbp+var_8]"], [20, "mov edi, offset aGlcolor4ubvert_2"], [21, "call rax"], [22, "mov cs:qword_43FBC8, rax"], [23, "mov rax, [rbp+var_8]"], [24, "mov edi, offset aGlcolor3fverte"], [25, "call rax"], [26, "mov cs:qword_43FBD0, rax"], [27, "mov rax, [rbp+var_8]"], [28, "mov edi, offset aGlcolor3fverte_0"], [29, "call rax"], [30, "mov cs:qword_43FBD8, rax"], [31, "mov rax, [rbp+var_8]"], [32, "mov edi, offset aGlnormal3fvert"], [33, "call rax"], [34, "mov cs:qword_43FBE0, rax"], [35, "mov rax, [rbp+var_8]"], [36, "mov edi, offset aGlnormal3fvert_0"], [37, "call rax"], [38, "mov cs:qword_43FBE8, rax"], [39, "mov rax, [rbp+var_8]"], [40, "mov edi, offset aGlcolor4fnorma"], [41, "call rax"], [42, "mov cs:qword_43FBF0, rax"], [43, "mov rax, [rbp+var_8]"], [44, "mov edi, offset aGlcolor4fnorma_0"], [45, "call rax"], [46, "mov cs:qword_43FBF8, rax"], [47, "mov rax, [rbp+var_8]"], [48, "mov edi, offset aGltexcoord2fve"], [49, "call rax"], [50, "mov cs:qword_43FC00, rax"], [51, "mov rax, [rbp+var_8]"], [52, "mov edi, offset aGltexcoord2fve_0"], [53, "call rax"], [54, "mov cs:qword_43FC08, rax"], [55, "mov rax, [rbp+var_8]"], [56, "mov edi, offset aGltexcoord4fve"], [57, "call rax"], [58, "mov cs:qword_43FC10, rax"], [59, "mov rax, [rbp+var_8]"], [60, "mov edi, offset aGltexcoord4fve_0"], [61, "call rax"], [62, "mov cs:qword_43FC18, rax"], [63, "mov rax, [rbp+var_8]"], [64, "mov edi, offset aGltexcoord2fco"], [65, "call rax"], [66, "mov cs:qword_43FC20, rax"], [67, "mov rax, [rbp+var_8]"], [68, "mov edi, offset aGltexcoord2fco_0"], [69, "call rax"], [70, "mov cs:qword_43FC28, rax"], [71, "mov rax, [rbp+var_8]"], [72, "mov edi, offset aGltexcoord2fco_1"], [73, "call rax"], [74, "mov cs:qword_43FC30, rax"], [75, "mov rax, [rbp+var_8]"], [76, "mov edi, offset aGltexcoord2fco_2"], [77, "call rax"], [78, "mov cs:qword_43FC38, rax"], [79, "mov rax, [rbp+var_8]"], [80, "mov edi, offset aGltexcoord2fno"], [81, "call rax"], [82, "mov cs:qword_43FC40, rax"], [83, "mov rax, [rbp+var_8]"], [84, "mov edi, offset aGltexcoord2fno_0"], [85, "call rax"], [86, "mov cs:qword_43FC48, rax"], [87, "mov rax, [rbp+var_8]"], [88, "mov edi, offset aGltexcoord2fco_3"], [89, "call rax"], [90, "mov cs:qword_43FC50, rax"], [91, "mov rax, [rbp+var_8]"], [92, "mov edi, offset aGltexcoord2fco_4"], [93, "call rax"], [94, "mov cs:qword_43FC58, rax"], [95, "mov rax, [rbp+var_8]"], [96, "mov edi, offset aGltexcoord4fco"], [97, "call rax"], [98, "mov cs:qword_43FC60, rax"], [99, "mov rax, [rbp+var_8]"], [100, "mov edi, offset aGltexcoord4fco_0"], [101, "call rax"], [102, "mov cs:qword_43FC68, rax"], [103, "mov rax, [rbp+var_8]"], [104, "mov edi, offset aGlreplacementc_6"], [105, "call rax"], [106, "mov cs:qword_43FC70, rax"], [107, "mov rax, [rbp+var_8]"], [108, "mov edi, offset aGlreplacementc_7"], [109, "call rax"], [110, "mov cs:qword_43FC78, rax"], [111, "mov rax, [rbp+var_8]"], [112, "mov edi, offset aGlreplacementc_8"], [113, "call rax"], [114, "mov cs:qword_43FC80, rax"], [115, "mov rax, [rbp+var_8]"], [116, "mov edi, offset aGlreplacementc_9"], [117, "call rax"], [118, "mov cs:qword_43FC88, rax"], [119, "mov rax, [rbp+var_8]"], [120, "mov edi, offset aGlreplacementc_10"], [121, "call rax"], [122, "mov cs:qword_43FC90, rax"], [123, "mov rax, [rbp+var_8]"], [124, "mov edi, offset aGlreplacementc_11"], [125, "call rax"], [126, "mov cs:qword_43FC98, rax"], [127, "mov rax, [rbp+var_8]"], [128, "mov edi, offset aGlreplacementc_12"], [129, "call rax"], [130, "mov cs:qword_43FCA0, rax"], [131, "mov rax, [rbp+var_8]"], [132, "mov edi, offset aGlreplacementc_13"], [133, "call rax"], [134, "mov cs:qword_43FCA8, rax"], [135, "mov rax, [rbp+var_8]"], [136, "mov edi, offset aGlreplacementc_14"], [137, "call rax"], [138, "mov cs:qword_43FCB0, rax"], [139, "mov rax, [rbp+var_8]"], [140, "mov edi, offset aGlreplacementc_15"], [141, "call rax"], [142, "mov cs:qword_43FCB8, rax"], [143, "mov rax, [rbp+var_8]"], [144, "mov edi, offset aGlreplacementc_16"], [145, "call rax"], [146, "mov cs:qword_43FCC0, rax"], [147, "mov rax, [rbp+var_8]"], [148, "mov edi, offset aGlreplacementc_17"], [149, "call rax"], [150, "mov cs:qword_43FCC8, rax"], [151, "mov rax, [rbp+var_8]"], [152, "mov edi, offset aGlreplacementc_18"], [153, "call rax"], [154, "mov cs:qword_43FCD0, rax"], [155, "mov rax, [rbp+var_8]"], [156, "mov edi, offset aGlreplacementc_19"], [157, "call rax"], [158, "mov cs:qword_43FCD8, rax"], [159, "mov rax, [rbp+var_8]"], [160, "mov edi, offset aGlreplacementc_20"], [161, "call rax"], [162, "mov cs:qword_43FCE0, rax"], [163, "mov rax, [rbp+var_8]"], [164, "mov edi, offset aGlreplacementc_21"], [165, "call rax"], [166, "mov cs:qword_43FCE8, rax"], [167, "jmp short locret_416322"], [168, "nop"], [169, "leave"], [170, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 3], [9, 7], [10, 9], [11, 3], [13, 11], [14, 13], [15, 3], [17, 15], [18, 17], [19, 3], [21, 19], [22, 21], [23, 3], [25, 23], [26, 25], [27, 3], [29, 27], [30, 29], [31, 3], [33, 31], [34, 33], [35, 3], [37, 35], [38, 37], [39, 3], [41, 39], [42, 41], [43, 3], [45, 43], [46, 45], [47, 3], [49, 47], [50, 49], [51, 3], [53, 51], [54, 53], [55, 3], [57, 55], [58, 57], [59, 3], [61, 59], [62, 61], [63, 3], [65, 63], [66, 65], [67, 3], [69, 67], [70, 69], [71, 3], [73, 71], [74, 73], [75, 3], [77, 75], [78, 77], [79, 3], [81, 79], [82, 81], [83, 3], [85, 83], [86, 85], [87, 3], [89, 87], [90, 89], [91, 3], [93, 91], [94, 93], [95, 3], [97, 95], [98, 97], [99, 3], [101, 99], [102, 101], [103, 3], [105, 103], [106, 105], [107, 3], [109, 107], [110, 109], [111, 3], [113, 111], [114, 113], [115, 3], [117, 115], [118, 117], [119, 3], [121, 119], [122, 121], [123, 3], [125, 123], [126, 125], [127, 3], [129, 127], [130, 129], [131, 3], [133, 131], [134, 133], [135, 3], [137, 135], [138, 137], [139, 3], [141, 139], [142, 141], [143, 3], [145, 143], [146, 145], [147, 3], [149, 147], [150, 149], [151, 3], [153, 151], [154, 153], [155, 3], [157, 155], [158, 157], [159, 3], [161, 159], [162, 161], [163, 3], [165, 163], [166, 165], [170, 5], [170, 165]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/f5227d6b31190984a5b857df5f03cff4635a382d1852a53d4ff2fd0ada8a07c1_f5227d6b31190984a5b857df5f03cff4635a382d1852a53d4ff2fd0ada8a07c1.jsonl.gz", "strip_func_name": "sub_416035", "query": "\n\n\n__int64 __fastcall sub_416035(__int64 (__fastcall *a1)(const char *))\n{\n__int64 result; // rax\n\nresult = (unsigned int)dword_43C2C0;\nif ( dword_43C2C0 )\n{\nqword_43FBB0 = a1(\"glColor4ubVertex2fSUN\");\nqword_43FBB8 = a1(\"glColor4ubVertex2fvSUN\");\nqword_43FBC0 = a1(\"glColor4ubVertex3fSUN\");\nqword_43FBC8 = a1(\"glColor4ubVertex3fvSUN\");\nqword_43FBD0 = a1(\"glColor3fVertex3fSUN\");\nqword_43FBD8 = a1(\"glColor3fVertex3fvSUN\");\nqword_43FBE0 = a1(\"glNormal3fVertex3fSUN\");\nqword_43FBE8 = a1(\"glNormal3fVertex3fvSUN\");\nqword_43FBF0 = a1(\"glColor4fNormal3fVertex3fSUN\");\nqword_43FBF8 = a1(\"glColor4fNormal3fVertex3fvSUN\");\nqword_43FC00 = a1(\"glTexCoord2fVertex3fSUN\");\nqword_43FC08 = a1(\"glTexCoord2fVertex3fvSUN\");\nqword_43FC10 = a1(\"glTexCoord4fVertex4fSUN\");\nqword_43FC18 = a1(\"glTexCoord4fVertex4fvSUN\");\nqword_43FC20 = a1(\"glTexCoord2fColor4ubVertex3fSUN\");\nqword_43FC28 = a1(\"glTexCoord2fColor4ubVertex3fvSUN\");\nqword_43FC30 = a1(\"glTexCoord2fColor3fVertex3fSUN\");\nqword_43FC38 = a1(\"glTexCoord2fColor3fVertex3fvSUN\");\nqword_43FC40 = a1(\"glTexCoord2fNormal3fVertex3fSUN\");\nqword_43FC48 = a1(\"glTexCoord2fNormal3fVertex3fvSUN\");\nqword_43FC50 = a1(\"glTexCoord2fColor4fNormal3fVertex3fSUN\");\nqword_43FC58 = a1(\"glTexCoord2fColor4fNormal3fVertex3fvSUN\");\nqword_43FC60 = a1(\"glTexCoord4fColor4fNormal3fVertex4fSUN\");\nqword_43FC68 = a1(\"glTexCoord4fColor4fNormal3fVertex4fvSUN\");\nqword_43FC70 = a1(\"glReplacementCodeuiVertex3fSUN\");\nqword_43FC78 = a1(\"glReplacementCodeuiVertex3fvSUN\");\nqword_43FC80 = a1(\"glReplacementCodeuiColor4ubVertex3fSUN\");\nqword_43FC88 = a1(\"glReplacementCodeuiColor4ubVertex3fvSUN\");\nqword_43FC90 = a1(\"glReplacementCodeuiColor3fVertex3fSUN\");\nqword_43FC98 = a1(\"glReplacementCodeuiColor3fVertex3fvSUN\");\nqword_43FCA0 = a1(\"glReplacementCodeuiNormal3fVertex3fSUN\");\nqword_43FCA8 = a1(\"glReplacementCodeuiNormal3fVertex3fvSUN\");\nqword_43FCB0 = a1(\"glReplacementCodeuiColor4fNormal3fVertex3fSUN\");\nqword_43FCB8 = a1(\"glReplacementCodeuiColor4fNormal3fVertex3fvSUN\");\nqword_43FCC0 = a1(\"glReplacementCodeuiTexCoord2fVertex3fSUN\");\nqword_43FCC8 = a1(\"glReplacementCodeuiTexCoord2fVertex3fvSUN\");\nqword_43FCD0 = a1(\"glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN\");\nqword_43FCD8 = a1(\"glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN\");\nqword_43FCE0 = a1(\"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN\");\nresult = a1(\"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN\");\nqword_43FCE8 = result;\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_416035,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'load', 'sub_416035': 'load_GL_SUN_vertex'}"} |
|
rfcomm_max_frame_size_for_l2cap_mtu | 5f5ebc3b2168d6c920c5b624ab2da0e280b9a03146ff50175d9a3c121396694a | bluekitchen | btstack | NA | static uint16_t rfcomm_max_frame_size_for_l2cap_mtu(uint16_t l2cap_mtu){
// Assume RFCOMM header without credits and 2 byte (14 bit) length field
uint16_t max_frame_size = l2cap_mtu - 5;
log_info("rfcomm_max_frame_size_for_l2cap_mtu: %u -> %u", l2cap_mtu, max_frame_size);
return max_frame_size;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_438E47", "function_addr": 4427335, "binary_name": "5f5ebc3b2168d6c920c5b624ab2da0e280b9a03146ff50175d9a3c121396694a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov eax, edi"], [4, "mov [rbp+var_14], ax"], [5, "movzx eax, [rbp+var_14]"], [6, "sub eax, 5"], [7, "mov [rbp+var_2], ax"], [8, "movzx edx, [rbp+var_2]"], [9, "movzx eax, [rbp+var_14]"], [10, "mov r9d, edx"], [11, "mov r8d, eax"], [12, "mov ecx, 17Eh"], [13, "mov edx, offset aRfcommC"], [14, "mov esi, offset aSURfcommMaxFra"], [15, "mov edi, 1"], [16, "mov eax, 0"], [17, "call sub_41CB24"], [18, "movzx eax, [rbp+var_2]"], [19, "leave"], [20, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 4], [10, 8], [11, 9], [18, 7], [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/5f5ebc3b2168d6c920c5b624ab2da0e280b9a03146ff50175d9a3c121396694a_5f5ebc3b2168d6c920c5b624ab2da0e280b9a03146ff50175d9a3c121396694a.jsonl.gz", "strip_func_name": "sub_438E47", "query": "\n\n\n__int64 __fastcall sub_438E47(unsigned __int16 a1)\n{\nsub_41CB24(\n1u,\n(__int64)\"%s.%u: rfcomm_max_frame_size_for_l2cap_mtu: %u -> %u\",\n(__int64)\"rfcomm.c\",\n382LL,\na1,\n(unsigned __int16)(a1 - 5));\nreturn (unsigned __int16)(a1 - 5);\n}\n\n\n\nQ:[a1,sub_438E47,sub_41CB24,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'l2cap_mtu', 'sub_438E47': 'rfcomm_max_frame_size_for_l2cap_mtu', 'sub_41CB24': 'hci_dump_log'}"} |
|
isAtEnd | efec0669d8928f35c10d441625aa516e9c89e71dc034afe38aaa2fe73d307505 | klange | ponyos | NA | static int isAtEnd() {
return *scanner.cur == '\0';
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_445936", "function_addr": 4479286, "binary_name": "efec0669d8928f35c10d441625aa516e9c89e71dc034afe38aaa2fe73d307505.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov rax, cs:qword_496A68"], [3, "movzx eax, byte ptr [rax]"], [4, "test al, al"], [5, "setz al"], [6, "movzx eax, al"], [7, "pop rbp"], [8, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 5], [7, 0], [8, 6]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/efec0669d8928f35c10d441625aa516e9c89e71dc034afe38aaa2fe73d307505_efec0669d8928f35c10d441625aa516e9c89e71dc034afe38aaa2fe73d307505.jsonl.gz", "strip_func_name": "sub_445936", "query": "\n\n\n_BOOL8 sub_445936()\n{\nreturn *(_BYTE *)qword_496A68 == 0;\n}\n\n\n\nQ:[sub_445936,]\nAssistant: ", "hints": "[]", "response": "{'sub_445936': 'isAtEnd'}"} |
|
disksim_cleanup | 2916a73b106b85fbcf2e95c17ed76023d80ffb597955d47e46e0b6d2dba33db7 | westerndigitalcorporation | DiskSim | NA | void disksim_cleanup(void)
{
int i;
if (outputfile)
{
fclose (outputfile);
}
if (disksim->iotracefile)
{
fclose(disksim->iotracefile);
}
iodriver_cleanup();
if( NULL != OUTIOS)
{
fclose(OUTIOS);
OUTIOS = NULL;
}
if( NULL != DISKSIM_DISK_QUEUE_LOG )
{
fclose( DISKSIM_DISK_QUEUE_LOG );
DISKSIM_DISK_QUEUE_LOG = NULL;
}
if( NULL != DISKSIM_DISK_LOG )
{
fclose( DISKSIM_DISK_LOG );
DISKSIM_DISK_LOG = NULL;
}
if( NULL != DISKSIM_DEBUG_LOG )
{
fclose( DISKSIM_DEBUG_LOG );
DISKSIM_DEBUG_LOG = NULL;
}
if( NULL != DISKSIM_EVENT_LOG )
{
fclose( DISKSIM_EVENT_LOG );
DISKSIM_EVENT_LOG = NULL;
}
if( NULL != DISKSIM_SYNTHIO_LOG )
{
fclose( DISKSIM_SYNTHIO_LOG );
DISKSIM_SYNTHIO_LOG = NULL;
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405D64", "function_addr": 4218212, "binary_name": "2916a73b106b85fbcf2e95c17ed76023d80ffb597955d47e46e0b6d2dba33db7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov rax, cs:ptr"], [3, "mov rax, [rax+0D0h]"], [4, "test rax, rax"], [5, "jz short loc_405D91"], [6, "mov rax, cs:ptr"], [7, "mov rax, [rax+0D0h]"], [8, "mov rdi, rax"], [9, "call _fclose"], [10, "mov rax, cs:ptr"], [11, "mov rax, [rax+0C0h]"], [12, "test rax, rax"], [13, "jz short loc_405DBA"], [14, "mov rax, cs:ptr"], [15, "mov rax, [rax+0C0h]"], [16, "mov rdi, rax"], [17, "call _fclose"], [18, "call sub_42E265"], [19, "mov rax, cs:ptr"], [20, "mov rax, [rax+0D8h]"], [21, "test rax, rax"], [22, "jz short loc_405DFA"], [23, "mov rax, cs:ptr"], [24, "mov rax, [rax+0D8h]"], [25, "mov rdi, rax"], [26, "call _fclose"], [27, "mov rax, cs:ptr"], [28, "mov qword ptr [rax+0D8h], 0"], [29, "mov rax, cs:ptr"], [30, "mov rax, [rax+90h]"], [31, "test rax, rax"], [32, "jz short loc_405E35"], [33, "mov rax, cs:ptr"], [34, "mov rax, [rax+90h]"], [35, "mov rdi, rax"], [36, "call _fclose"], [37, "mov rax, cs:ptr"], [38, "mov qword ptr [rax+90h], 0"], [39, "mov rax, cs:ptr"], [40, "mov rax, [rax+98h]"], [41, "test rax, rax"], [42, "jz short loc_405E70"], [43, "mov rax, cs:ptr"], [44, "mov rax, [rax+98h]"], [45, "mov rdi, rax"], [46, "call _fclose"], [47, "mov rax, cs:ptr"], [48, "mov qword ptr [rax+98h], 0"], [49, "mov rax, cs:ptr"], [50, "mov rax, [rax+0A0h]"], [51, "test rax, rax"], [52, "jz short loc_405EAB"], [53, "mov rax, cs:ptr"], [54, "mov rax, [rax+0A0h]"], [55, "mov rdi, rax"], [56, "call _fclose"], [57, "mov rax, cs:ptr"], [58, "mov qword ptr [rax+0A0h], 0"], [59, "mov rax, cs:ptr"], [60, "mov rax, [rax+0A8h]"], [61, "test rax, rax"], [62, "jz short loc_405EE6"], [63, "mov rax, cs:ptr"], [64, "mov rax, [rax+0A8h]"], [65, "mov rdi, rax"], [66, "call _fclose"], [67, "mov rax, cs:ptr"], [68, "mov qword ptr [rax+0A8h], 0"], [69, "mov rax, cs:ptr"], [70, "mov rax, [rax+0B0h]"], [71, "test rax, rax"], [72, "jz short loc_405F21"], [73, "mov rax, cs:ptr"], [74, "mov rax, [rax+0B0h]"], [75, "mov rdi, rax"], [76, "call _fclose"], [77, "mov rax, cs:ptr"], [78, "mov qword ptr [rax+0B0h], 0"], [79, "nop"], [80, "pop rbp"], [81, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [7, 6], [8, 7], [11, 10], [12, 11], [13, 12], [15, 14], [16, 15], [20, 19], [21, 20], [22, 21], [24, 23], [25, 24], [28, 27], [30, 29], [30, 28], [31, 30], [32, 31], [34, 28], [34, 38], [34, 33], [35, 34], [38, 37], [40, 38], [40, 28], [40, 39], [41, 40], [42, 41], [44, 38], [44, 28], [44, 48], [44, 43], [45, 44], [48, 47], [50, 38], [50, 49], [50, 28], [50, 48], [51, 50], [52, 51], [54, 28], [54, 58], [54, 53], [54, 48], [54, 38], [55, 54], [58, 57], [60, 28], [60, 48], [60, 59], [60, 38], [60, 58], [61, 60], [62, 61], [64, 48], [64, 68], [64, 63], [64, 38], [64, 58], [64, 28], [65, 64], [68, 67], [70, 48], [70, 68], [70, 38], [70, 28], [70, 58], [70, 69], [71, 70], [72, 71], [74, 73], [74, 48], [74, 68], [74, 38], [74, 58], [74, 28], [74, 78], [75, 74], [78, 77], [80, 0], [81, 71], [81, 77]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/2916a73b106b85fbcf2e95c17ed76023d80ffb597955d47e46e0b6d2dba33db7_2916a73b106b85fbcf2e95c17ed76023d80ffb597955d47e46e0b6d2dba33db7.jsonl.gz", "strip_func_name": "sub_405D64", "query": "\n\n\nvoid *sub_405D64()\n{\nvoid *result; // rax\n\nif ( *((_QWORD *)ptr + 26) )\nfclose(*((FILE **)ptr + 26));\nif ( *((_QWORD *)ptr + 24) )\nfclose(*((FILE **)ptr + 24));\nsub_42E265();\nif ( *((_QWORD *)ptr + 27) )\n{\nfclose(*((FILE **)ptr + 27));\n*((_QWORD *)ptr + 27) = 0LL;\n}\nif ( *((_QWORD *)ptr + 18) )\n{\nfclose(*((FILE **)ptr + 18));\n*((_QWORD *)ptr + 18) = 0LL;\n}\nif ( *((_QWORD *)ptr + 19) )\n{\nfclose(*((FILE **)ptr + 19));\n*((_QWORD *)ptr + 19) = 0LL;\n}\nif ( *((_QWORD *)ptr + 20) )\n{\nfclose(*((FILE **)ptr + 20));\n*((_QWORD *)ptr + 20) = 0LL;\n}\nif ( *((_QWORD *)ptr + 21) )\n{\nfclose(*((FILE **)ptr + 21));\n*((_QWORD *)ptr + 21) = 0LL;\n}\nresult = (void *)*((_QWORD *)ptr + 22);\nif ( result )\n{\nfclose(*((FILE **)ptr + 22));\nresult = ptr;\n*((_QWORD *)ptr + 22) = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[sub_405D64,sub_42E265,]\nAssistant: ", "hints": "[]", "response": "{'sub_405D64': 'disksim_cleanup', 'sub_42E265': 'iodriver_cleanup'}"} |
|
_serializerPop | 9256ed53273cc1c67ae6214f59a246c16fbfcf5ee3799ee25c44682c6fce4fea | goodform | rejson | NA | static inline void _serializerPop(NodeSerializerStack *s) {
s->level--;
Vector_Pop(s->nodes, NULL);
Vector_Pop(s->indices, NULL);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40C91C", "function_addr": 4245788, "binary_name": "9256ed53273cc1c67ae6214f59a246c16fbfcf5ee3799ee25c44682c6fce4fea.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov rax, [rbp+var_8]"], [5, "mov eax, [rax]"], [6, "lea edx, [rax-1]"], [7, "mov rax, [rbp+var_8]"], [8, "mov [rax], edx"], [9, "mov rax, [rbp+var_8]"], [10, "mov rax, [rax+8]"], [11, "mov esi, 0"], [12, "mov rdi, rax"], [13, "call sub_40EB32"], [14, "mov rax, [rbp+var_8]"], [15, "mov rax, [rax+10h]"], [16, "mov esi, 0"], [17, "mov rdi, rax"], [18, "call sub_40EB32"], [19, "nop"], [20, "leave"], [21, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 3], [8, 7], [8, 6], [9, 3], [10, 8], [10, 9], [12, 10], [14, 3], [15, 8], [15, 14], [17, 15], [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/9256ed53273cc1c67ae6214f59a246c16fbfcf5ee3799ee25c44682c6fce4fea_9256ed53273cc1c67ae6214f59a246c16fbfcf5ee3799ee25c44682c6fce4fea.jsonl.gz", "strip_func_name": "sub_40C91C", "query": "\n\n\n__int64 __fastcall sub_40C91C(__int64 a1)\n{\n--*(_DWORD *)a1;\nsub_40EB32(*(_QWORD *)(a1 + 8), 0LL);\nreturn sub_40EB32(*(_QWORD *)(a1 + 16), 0LL);\n}\n\n\n\nQ:[a1,sub_40C91C,sub_40EB32,]\nAssistant: ", "hints": "[]", "response": "{'a1': 's', 'sub_40C91C': '_serializerPop', 'sub_40EB32': 'Vector_Pop'}"} |
|
u8x8_cad_ld7032_i2c | bddd6776f1019b5476f11cff727555ff1ce953b5d63681da044418d28c92cc46 | olikraus | u8g2 | NA | uint8_t u8x8_cad_ld7032_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
{
static uint8_t in_transfer = 0;
uint8_t *p;
switch(msg)
{
case U8X8_MSG_CAD_SEND_CMD:
if ( in_transfer != 0 )
u8x8_byte_EndTransfer(u8x8);
u8x8_byte_StartTransfer(u8x8);
u8x8_byte_SendByte(u8x8, arg_int);
in_transfer = 1;
break;
case U8X8_MSG_CAD_SEND_ARG:
u8x8_byte_SendByte(u8x8, arg_int);
break;
case U8X8_MSG_CAD_SEND_DATA:
//u8x8_byte_SetDC(u8x8, 1);
/* the FeatherWing OLED with the 32u4 transfer of long byte */
/* streams was not possible. This is broken down to */
/* smaller streams, 32 seems to be the limit... */
/* I guess this is related to the size of the Wire buffers in Arduino */
/* Unfortunately, this can not be handled in the byte level drivers, */
/* so this is done here. Even further, only 24 bytes will be sent, */
/* because there will be another byte (DC) required during the transfer */
p = arg_ptr;
while( arg_int > 24 )
{
u8x8->byte_cb(u8x8, U8X8_MSG_CAD_SEND_DATA, 24, p);
arg_int-=24;
p+=24;
u8x8_byte_EndTransfer(u8x8);
u8x8_byte_StartTransfer(u8x8);
u8x8_byte_SendByte(u8x8, 0x08); /* data write for LD7032 */
}
u8x8->byte_cb(u8x8, U8X8_MSG_CAD_SEND_DATA, arg_int, p);
break;
case U8X8_MSG_CAD_INIT:
/* apply default i2c adr if required so that the start transfer msg can use this */
if ( u8x8->i2c_address == 255 )
u8x8->i2c_address = 0x060;
return u8x8->byte_cb(u8x8, msg, arg_int, arg_ptr);
case U8X8_MSG_CAD_START_TRANSFER:
in_transfer = 0;
break;
case U8X8_MSG_CAD_END_TRANSFER:
if ( in_transfer != 0 )
u8x8_byte_EndTransfer(u8x8);
break;
default:
return 0;
}
return 1;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_429759", "function_addr": 4364121, "binary_name": "bddd6776f1019b5476f11cff727555ff1ce953b5d63681da044418d28c92cc46.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], dl"], [8, "mov [rbp+var_20], al"], [9, "movzx eax, [rbp+var_1C]"], [10, "sub eax, 14h"], [11, "cmp eax, 5"], [12, "ja def_42978D"], [13, "mov eax, eax"], [14, "mov rax, ds:jpt_42978D[rax*8]"], [15, "jmp rax"], [16, "movzx eax, cs:byte_F90BE1"], [17, "test al, al"], [18, "jz short loc_4297A6"], [19, "mov rax, [rbp+var_18]"], [20, "mov rdi, rax"], [21, "call sub_4276C2"], [22, "mov rax, [rbp+var_18]"], [23, "mov rdi, rax"], [24, "call sub_427693"], [25, "movzx edx, [rbp+var_20]"], [26, "mov rax, [rbp+var_18]"], [27, "mov esi, edx"], [28, "mov rdi, rax"], [29, "call sub_42766B"], [30, "mov cs:byte_F90BE1, 1"], [31, "jmp loc_4298CB"], [32, "movzx edx, [rbp+var_20]"], [33, "mov rax, [rbp+var_18]"], [34, "mov esi, edx"], [35, "mov rdi, rax"], [36, "call sub_42766B"], [37, "jmp loc_4298CB"], [38, "mov rax, [rbp+var_28]"], [39, "mov [rbp+var_8], rax"], [40, "jmp short loc_429846"], [41, "mov rax, [rbp+var_18]"], [42, "mov r8, [rax+20h]"], [43, "mov rdx, [rbp+var_8]"], [44, "mov rax, [rbp+var_18]"], [45, "mov rcx, rdx"], [46, "mov edx, 18h"], [47, "mov esi, 17h"], [48, "mov rdi, rax"], [49, "call r8"], [50, "sub [rbp+var_20], 18h"], [51, "add [rbp+var_8], 18h"], [52, "mov rax, [rbp+var_18]"], [53, "mov rdi, rax"], [54, "call sub_4276C2"], [55, "mov rax, [rbp+var_18]"], [56, "mov rdi, rax"], [57, "call sub_427693"], [58, "mov rax, [rbp+var_18]"], [59, "mov esi, 8"], [60, "mov rdi, rax"], [61, "call sub_42766B"], [62, "cmp [rbp+var_20], 18h"], [63, "ja short loc_4297F1"], [64, "mov rax, [rbp+var_18]"], [65, "mov r8, [rax+20h]"], [66, "movzx edx, [rbp+var_20]"], [67, "mov rcx, [rbp+var_8]"], [68, "mov rax, [rbp+var_18]"], [69, "mov esi, 17h"], [70, "mov rdi, rax"], [71, "call r8"], [72, "jmp short loc_4298CB"], [73, "mov rax, [rbp+var_18]"], [74, "movzx eax, byte ptr [rax+44h]"], [75, "cmp al, 0FFh"], [76, "jnz short loc_429881"], [77, "mov rax, [rbp+var_18]"], [78, "mov byte ptr [rax+44h], 60h "], [79, "mov rax, [rbp+var_18]"], [80, "mov r8, [rax+20h]"], [81, "movzx edx, [rbp+var_20]"], [82, "movzx esi, [rbp+var_1C]"], [83, "mov rcx, [rbp+var_28]"], [84, "mov rax, [rbp+var_18]"], [85, "mov rdi, rax"], [86, "call r8"], [87, "jmp short locret_4298D0"], [88, "mov cs:byte_F90BE1, 0"], [89, "jmp short loc_4298CB"], [90, "movzx eax, cs:byte_F90BE1"], [91, "test al, al"], [92, "jz short loc_4298CA"], [93, "mov rax, [rbp+var_18]"], [94, "mov rdi, rax"], [95, "call sub_4276C2"], [96, "jmp short loc_4298CA"], [97, "mov eax, 0"], [98, "jmp short locret_4298D0"], [99, "nop"], [100, "mov eax, 1"], [101, "leave"], [102, "retn"]], "data_dep": [[7, 6], [8, 4], [9, 7], [10, 9], [11, 10], [12, 11], [13, 10], [15, 14], [17, 16], [18, 17], [19, 3], [20, 19], [22, 3], [23, 22], [25, 8], [26, 3], [27, 25], [28, 26], [32, 8], [33, 3], [34, 32], [35, 33], [38, 5], [39, 38], [41, 3], [42, 41], [43, 39], [43, 51], [44, 3], [45, 43], [48, 44], [49, 42], [50, 8], [50, 50], [51, 39], [51, 51], [52, 3], [53, 52], [55, 3], [56, 55], [58, 3], [60, 58], [62, 8], [62, 50], [63, 62], [64, 3], [65, 64], [66, 8], [66, 50], [67, 39], [67, 51], [68, 3], [70, 68], [71, 65], [73, 3], [74, 73], [75, 74], [76, 75], [77, 3], [78, 77], [79, 3], [80, 79], [80, 78], [81, 8], [82, 7], [83, 5], [84, 3], [85, 84], [86, 80], [91, 90], [92, 91], [93, 3], [94, 93], [102, 86], [102, 97], [102, 100]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/bddd6776f1019b5476f11cff727555ff1ce953b5d63681da044418d28c92cc46_bddd6776f1019b5476f11cff727555ff1ce953b5d63681da044418d28c92cc46.jsonl.gz", "strip_func_name": "sub_429759", "query": "\n\n\n__int64 __fastcall sub_429759(__int64 a1, unsigned __int8 a2, unsigned __int8 a3, __int64 a4)\n{\n__int64 result; // rax\nunsigned __int8 v5; // [rsp+10h] [rbp-20h]\n__int64 v6; // [rsp+28h] [rbp-8h]\n\nv5 = a3;\nswitch ( a2 )\n{\ncase 0x14u:\nif ( *(_BYTE *)(a1 + 68) == 0xFF )\n*(_BYTE *)(a1 + 68) = 96;\nreturn (*(__int64 (__fastcall **)(__int64, _QWORD, _QWORD, __int64))(a1 + 32))(a1, a2, a3, a4);\ncase 0x15u:\nif ( byte_F90BE1 )\nsub_4276C2(a1);\nsub_427693(a1);\nsub_42766B(a1, v5);\nbyte_F90BE1 = 1;\ngoto LABEL_17;\ncase 0x16u:\nsub_42766B(a1, a3);\ngoto LABEL_17;\ncase 0x17u:\nv6 = a4;\nwhile ( v5 > 0x18u )\n{\n(*(void (__fastcall **)(__int64, __int64, __int64, __int64))(a1 + 32))(a1, 23LL, 24LL, v6);\nv5 -= 24;\nv6 += 24LL;\nsub_4276C2(a1);\nsub_427693(a1);\nsub_42766B(a1, 8);\n}\n(*(void (__fastcall **)(__int64, __int64, _QWORD, __int64))(a1 + 32))(a1, 23LL, v5, v6);\ngoto LABEL_17;\ncase 0x18u:\nbyte_F90BE1 = 0;\ngoto LABEL_17;\ncase 0x19u:\nif ( byte_F90BE1 )\nsub_4276C2(a1);\nLABEL_17:\nresult = 1LL;\nbreak;\ndefault:\nresult = 0LL;\nbreak;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,v6,sub_429759,sub_4276C2,sub_427693,sub_42766B,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'arg_int', 'a4': 'arg_ptr', 'a1': 'u8x8', 'a2': 'msg', 'v6': 'p', 'sub_429759': 'u8x8_cad_ld7032_i2c', 'sub_4276C2': 'u8x8_byte_EndTransfer', 'sub_427693': 'u8x8_byte_StartTransfer', 'sub_42766B': 'u8x8_byte_SendByte'}"} |
|
bpf_program__fd | b671a6d9a865e2a0dfafbbbe0c80f375e68809a88f83415dd956d122fc4f7587 | SolidRun | linux-stable | NA | int bpf_program__fd(struct bpf_program *prog)
{
return bpf_program__nth_fd(prog, 0);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_411F12", "function_addr": 4267794, "binary_name": "b671a6d9a865e2a0dfafbbbe0c80f375e68809a88f83415dd956d122fc4f7587.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_412010"], [8, "leave"], [9, "retn"]], "data_dep": [[4, 3], [6, 4], [9, 7]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/b671a6d9a865e2a0dfafbbbe0c80f375e68809a88f83415dd956d122fc4f7587_b671a6d9a865e2a0dfafbbbe0c80f375e68809a88f83415dd956d122fc4f7587.jsonl.gz", "strip_func_name": "sub_411F12", "query": "\n\n\n__int64 __fastcall sub_411F12(__int64 a1)\n{\nreturn sub_412010(a1, 0LL);\n}\n\n\n\nQ:[a1,sub_411F12,sub_412010,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'prog', 'sub_411F12': 'bpf_program__fd', 'sub_412010': 'bpf_program__nth_fd'}"} |
|
fswriteinode | d241c155215f3fc06ac4d95c37c010c4b420449e44a7f22f4b81cfadc9ca7d5d | RetroBSD | retrobsd | NA | int fswriteinode(struct filesystem *f, struct inode *ip)
{
char *buf;
struct dinode *dp;
int64_t d;
int n;
d = itod(ip->i_number);
if (d >= f->fs->fs_isize) {
printf("ilist too small\n");
return 0;
}
buf = fsreadblock(f, d);
if (!buf) {
return 0;
}
dp = (struct dinode *)(buf + (itoo(ip->i_number) * sizeof(struct dinode)));
dp->di_icom1 = ip->i_ic1;
dp->di_flags = ip->i_flags;
dp->di_icom2 = ip->i_ic2;
for (n = 0; n < NADDR; n++)
dp->di_addr[n] = ip->i_addr[n];
if (!fswriteblock(f, d, buf)) {
free(buf);
return 0;
}
free(buf);
return 1;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401CFE", "function_addr": 4201726, "binary_name": "d241c155215f3fc06ac4d95c37c010c4b420449e44a7f22f4b81cfadc9ca7d5d.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_30]"], [6, "mov eax, [rax+1Ch]"], [7, "add eax, 0Fh"], [8, "shr eax, 4"], [9, "mov eax, eax"], [10, "mov [rbp+var_10], rax"], [11, "mov rax, [rbp+var_28]"], [12, "mov rax, [rax+8]"], [13, "mov eax, [rax+4]"], [14, "mov eax, eax"], [15, "cmp [rbp+var_10], rax"], [16, "jl short loc_401D48"], [17, "mov edi, offset aIlistTooSmall"], [18, "call _puts"], [19, "mov eax, 0"], [20, "jmp locret_401E75"], [21, "mov rdx, [rbp+var_10]"], [22, "mov rax, [rbp+var_28]"], [23, "mov rsi, rdx"], [24, "mov rdi, rax"], [25, "call sub_401A28"], [26, "mov [rbp+ptr], rax"], [27, "cmp [rbp+ptr], 0"], [28, "jnz short loc_401D70"], [29, "mov eax, 0"], [30, "jmp locret_401E75"], [31, "mov rax, [rbp+var_30]"], [32, "mov eax, [rax+1Ch]"], [33, "add eax, 0Fh"], [34, "cdqe"], [35, "and eax, 0Fh"], [36, "mov rdx, rax"], [37, "mov rax, rdx"], [38, "shl rax, 2"], [39, "add rax, rdx"], [40, "add rax, rax"], [41, "add rax, rdx"], [42, "shl rax, 3"], [43, "mov rdx, rax"], [44, "mov rax, [rbp+ptr]"], [45, "add rax, rdx"], [46, "mov [rbp+var_20], rax"], [47, "mov rcx, [rbp+var_20]"], [48, "mov rsi, [rbp+var_30]"], [49, "mov rax, [rsi+70h]"], [50, "mov rdx, [rsi+78h]"], [51, "mov [rcx], rax"], [52, "mov [rcx+8], rdx"], [53, "mov rax, [rsi+80h]"], [54, "mov [rcx+10h], rax"], [55, "mov rax, [rbp+var_30]"], [56, "mov edx, [rax+88h]"], [57, "mov rax, [rbp+var_20]"], [58, "mov [rax+38h], edx"], [59, "mov rcx, [rbp+var_20]"], [60, "mov rsi, [rbp+var_30]"], [61, "mov rax, [rsi+90h]"], [62, "mov rdx, [rsi+98h]"], [63, "mov [rcx+40h], rax"], [64, "mov [rcx+48h], rdx"], [65, "mov rax, [rsi+0A0h]"], [66, "mov [rcx+50h], rax"], [67, "mov [rbp+var_4], 0"], [68, "jmp short loc_401E30"], [69, "mov rax, [rbp+var_30]"], [70, "mov edx, [rbp+var_4]"], [71, "movsxd rdx, edx"], [72, "add rdx, 10h"], [73, "mov edx, [rax+rdx*4]"], [74, "mov rax, [rbp+var_20]"], [75, "mov ecx, [rbp+var_4]"], [76, "movsxd rcx, ecx"], [77, "add rcx, 4"], [78, "mov [rax+rcx*4+8], edx"], [79, "add [rbp+var_4], 1"], [80, "cmp [rbp+var_4], 6"], [81, "jle short loc_401E09"], [82, "mov rdx, [rbp+ptr]"], [83, "mov rcx, [rbp+var_10]"], [84, "mov rax, [rbp+var_28]"], [85, "mov rsi, rcx"], [86, "mov rdi, rax"], [87, "call sub_401B09"], [88, "test eax, eax"], [89, "jnz short loc_401E64"], [90, "mov rax, [rbp+ptr]"], [91, "mov rdi, rax"], [92, "call _free"], [93, "mov eax, 0"], [94, "jmp short locret_401E75"], [95, "mov rax, [rbp+ptr]"], [96, "mov rdi, rax"], [97, "call _free"], [98, "mov eax, 1"], [99, "leave"], [100, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [11, 3], [12, 11], [13, 12], [14, 13], [15, 14], [15, 10], [16, 15], [21, 10], [22, 3], [23, 21], [24, 22], [26, 25], [27, 26], [28, 27], [31, 4], [32, 31], [33, 32], [35, 33], [36, 35], [37, 36], [38, 37], [39, 36], [39, 38], [40, 39], [41, 40], [41, 36], [42, 41], [43, 42], [44, 26], [45, 43], [45, 44], [46, 45], [47, 46], [48, 4], [49, 48], [50, 48], [51, 47], [51, 49], [52, 50], [52, 47], [53, 48], [53, 52], [54, 53], [54, 47], [55, 4], [56, 55], [56, 54], [57, 46], [58, 56], [58, 57], [59, 46], [60, 4], [61, 58], [61, 60], [62, 60], [62, 58], [63, 61], [63, 59], [64, 62], [64, 59], [65, 60], [65, 64], [66, 59], [66, 65], [69, 4], [70, 79], [70, 67], [71, 70], [72, 71], [73, 69], [73, 78], [73, 64], [73, 66], [73, 52], [73, 54], [73, 63], [73, 58], [73, 51], [74, 46], [75, 67], [75, 79], [76, 75], [77, 76], [78, 74], [78, 73], [79, 67], [79, 79], [80, 67], [80, 79], [81, 80], [82, 26], [83, 10], [84, 3], [85, 83], [86, 84], [88, 87], [89, 88], [90, 26], [91, 90], [95, 26], [96, 95], [100, 19], [100, 98], [100, 29], [100, 93]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d241c155215f3fc06ac4d95c37c010c4b420449e44a7f22f4b81cfadc9ca7d5d_d241c155215f3fc06ac4d95c37c010c4b420449e44a7f22f4b81cfadc9ca7d5d.jsonl.gz", "strip_func_name": "sub_401CFE", "query": "\n\n\n__int64 __fastcall sub_401CFE(__int64 a1, __int64 a2)\n{\n__int64 result; // rax\n__int64 v3; // rdx\n__int64 v4; // rdx\nchar *v5; // [rsp+10h] [rbp-20h]\nchar *ptr; // [rsp+18h] [rbp-18h]\n__int64 v7; // [rsp+20h] [rbp-10h]\nint i; // [rsp+2Ch] [rbp-4h]\n\nv7 = (unsigned int)(*(_DWORD *)(a2 + 28) + 15) >> 4;\nif ( v7 < *(unsigned int *)(*(_QWORD *)(a1 + 8) + 4LL) )\n{\nptr = (char *)sub_401A28((int *)a1, v7);\nif ( ptr )\n{\nv5 = &ptr[88 * (((unsigned __int8)*(_DWORD *)(a2 + 28) + 15) & 0xF)];\nv3 = *(_QWORD *)(a2 + 120);\n*(_QWORD *)v5 = *(_QWORD *)(a2 + 112);\n*((_QWORD *)v5 + 1) = v3;\n*((_QWORD *)v5 + 2) = *(_QWORD *)(a2 + 128);\n*((_DWORD *)v5 + 14) = *(_DWORD *)(a2 + 136);\nv4 = *(_QWORD *)(a2 + 152);\n*((_QWORD *)v5 + 8) = *(_QWORD *)(a2 + 144);\n*((_QWORD *)v5 + 9) = v4;\n*((_QWORD *)v5 + 10) = *(_QWORD *)(a2 + 160);\nfor ( i = 0; i <= 6; ++i )\n*(_DWORD *)&v5[4 * i + 24] = *(_DWORD *)(a2 + 4 * (i + 16LL));\nif ( (unsigned int)sub_401B09((int *)a1, v7, ptr) )\n{\nfree(ptr);\nresult = 1LL;\n}\nelse\n{\nfree(ptr);\nresult = 0LL;\n}\n}\nelse\n{\nresult = 0LL;\n}\n}\nelse\n{\nputs(\"ilist too small\");\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v5,ptr,v7,i,sub_401CFE,sub_401A28,sub_401B09,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'f', 'a2': 'ip_0', 'v5': 'dp', 'ptr': 'buf', 'v7': 'd', 'i': 'n', 'sub_401CFE': 'fswriteinode', 'sub_401A28': 'fsreadblock', 'sub_401B09': 'fswriteblock'}"} |
|
printSrcIdx64 | 0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8 | michalsc | Emu68 | NA | static void printSrcIdx64(MCInst *MI, unsigned OpNo, SStream *O)
{
SStream_concat0(O, "qword ptr ");
MI->x86opsize = 8;
printSrcIdx(MI, OpNo, O);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_514587", "function_addr": 5326215, "binary_name": "0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_C], esi"], [5, "mov [rbp+var_18], rdx"], [6, "mov rax, [rbp+var_18]"], [7, "lea rsi, aQwordPtr"], [8, "mov rdi, rax"], [9, "call sub_40433A"], [10, "mov rax, [rbp+var_8]"], [11, "mov byte ptr [rax+328h], 8"], [12, "mov rdx, [rbp+var_18]"], [13, "mov ecx, [rbp+var_C]"], [14, "mov rax, [rbp+var_8]"], [15, "mov esi, ecx"], [16, "mov rdi, rax"], [17, "call sub_513CA3"], [18, "nop"], [19, "leave"], [20, "retn"]], "data_dep": [[6, 5], [8, 6], [10, 3], [11, 10], [12, 5], [13, 4], [14, 3], [15, 13], [16, 14], [20, 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/0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8_0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8.jsonl.gz", "strip_func_name": "sub_514587", "query": "\n\n\n__int64 __fastcall sub_514587(__int64 a1, unsigned int a2, __int64 a3)\n{\nsub_40433A(a3, \"qword ptr \");\n*(_BYTE *)(a1 + 808) = 8;\nreturn sub_513CA3(a1, a2, a3);\n}\n\n\n\nQ:[a3,a1,a2,sub_514587,sub_40433A,sub_513CA3,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'O', 'a1': 'MI', 'a2': 'OpNo', 'sub_514587': 'printSrcIdx64', 'sub_40433A': 'SStream_concat0', 'sub_513CA3': 'printSrcIdx'}"} |
|
simplify_with_current_value | a6fd2c415057325d55833fade56a72b69a672545419c3be12e67091e5c9f39a9 | pret | agbcc | NA | static rtx
simplify_with_current_value (exp, space, ndim)
rtx exp;
struct dimension *space;
int ndim;
{
int i;
rtx x;
/* Mark each current value as TRUE. */
for (i = 0; i < ndim; i++)
{
x = XEXP (space[i].current_value, 0);
if (GET_CODE (x) == EQ_ATTR)
MEM_VOLATILE_P (x) = 0;
}
exp = simplify_with_current_value_aux (exp);
/* Change each current value back to FALSE. */
for (i = 0; i < ndim; i++)
{
x = XEXP (space[i].current_value, 0);
if (GET_CODE (x) == EQ_ATTR)
MEM_VOLATILE_P (x) = 1;
}
return exp;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40A192", "function_addr": 4235666, "binary_name": "a6fd2c415057325d55833fade56a72b69a672545419c3be12e67091e5c9f39a9.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_4], 0"], [7, "jmp short loc_40A1EC"], [8, "mov eax, [rbp+var_4]"], [9, "cdqe"], [10, "shl rax, 5"], [11, "mov rdx, rax"], [12, "mov rax, [rbp+var_20]"], [13, "add rax, rdx"], [14, "mov rax, [rax+10h]"], [15, "mov rax, [rax+8]"], [16, "mov [rbp+var_10], rax"], [17, "mov rax, [rbp+var_10]"], [18, "movzx eax, word ptr [rax]"], [19, "cmp ax, 1Dh"], [20, "jnz short loc_40A1E8"], [21, "mov rax, [rbp+var_10]"], [22, "movzx edx, byte ptr [rax+3]"], [23, "and edx, 0FFFFFFF7h"], [24, "mov [rax+3], dl"], [25, "add [rbp+var_4], 1"], [26, "mov eax, [rbp+var_4]"], [27, "cmp eax, [rbp+var_24]"], [28, "jl short loc_40A1AE"], [29, "mov rax, [rbp+var_18]"], [30, "mov rdi, rax"], [31, "call sub_40A259"], [32, "mov [rbp+var_18], rax"], [33, "mov [rbp+var_4], 0"], [34, "jmp short loc_40A24B"], [35, "mov eax, [rbp+var_4]"], [36, "cdqe"], [37, "shl rax, 5"], [38, "mov rdx, rax"], [39, "mov rax, [rbp+var_20]"], [40, "add rax, rdx"], [41, "mov rax, [rax+10h]"], [42, "mov rax, [rax+8]"], [43, "mov [rbp+var_10], rax"], [44, "mov rax, [rbp+var_10]"], [45, "movzx eax, word ptr [rax]"], [46, "cmp ax, 1Dh"], [47, "jnz short loc_40A247"], [48, "mov rax, [rbp+var_10]"], [49, "movzx edx, byte ptr [rax+3]"], [50, "or edx, 8"], [51, "mov [rax+3], dl"], [52, "add [rbp+var_4], 1"], [53, "mov eax, [rbp+var_4]"], [54, "cmp eax, [rbp+var_24]"], [55, "jl short loc_40A20D"], [56, "mov rax, [rbp+var_18]"], [57, "leave"], [58, "retn"]], "data_dep": [[8, 6], [8, 25], [10, 8], [11, 10], [12, 4], [13, 11], [13, 12], [14, 13], [14, 24], [15, 24], [15, 14], [16, 15], [17, 16], [18, 17], [18, 24], [19, 18], [20, 19], [21, 16], [22, 21], [22, 24], [23, 22], [24, 23], [24, 21], [25, 25], [25, 6], [26, 25], [26, 6], [27, 5], [27, 26], [28, 27], [29, 3], [30, 29], [32, 31], [35, 33], [35, 52], [37, 35], [38, 37], [39, 4], [40, 38], [40, 39], [41, 40], [41, 24], [41, 51], [42, 51], [42, 41], [42, 24], [43, 42], [44, 43], [45, 24], [45, 51], [45, 44], [46, 45], [47, 46], [48, 43], [49, 24], [49, 48], [49, 51], [50, 49], [51, 50], [51, 48], [52, 52], [52, 33], [53, 52], [53, 33], [54, 53], [54, 5], [55, 54], [56, 32], [58, 56]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/a6fd2c415057325d55833fade56a72b69a672545419c3be12e67091e5c9f39a9_a6fd2c415057325d55833fade56a72b69a672545419c3be12e67091e5c9f39a9.jsonl.gz", "strip_func_name": "sub_40A192", "query": "\n\n\n__int64 __fastcall sub_40A192(__int64 a1, __int64 a2, int a3)\n{\n__int64 v5; // [rsp+18h] [rbp-18h]\n__int64 v6; // [rsp+20h] [rbp-10h]\n__int64 v7; // [rsp+20h] [rbp-10h]\nint i; // [rsp+2Ch] [rbp-4h]\nint j; // [rsp+2Ch] [rbp-4h]\n\nfor ( i = 0; i < a3; ++i )\n{\nv6 = *(_QWORD *)(*(_QWORD *)(32LL * i + a2 + 16) + 8LL);\nif ( *(_WORD *)v6 == 29 )\n*(_BYTE *)(v6 + 3) &= 0xF7u;\n}\nv5 = sub_40A259(a1);\nfor ( j = 0; j < a3; ++j )\n{\nv7 = *(_QWORD *)(*(_QWORD *)(32LL * j + a2 + 16) + 8LL);\nif ( *(_WORD *)v7 == 29 )\n*(_BYTE *)(v7 + 3) |= 8u;\n}\nreturn v5;\n}\n\n\n\nQ:[a3,a1,a2,v5,v7,sub_40A192,sub_40A259,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'ndim', 'a1': 'exp', 'a2': 'space', 'v5': 'expa', 'v7': 'xa', 'sub_40A192': 'simplify_with_current_value', 'sub_40A259': 'simplify_with_current_value_aux'}"} |
|
app_log_filter_threshold_get | 81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba | openthread | ot-efr32 | NA | uint8_t app_log_filter_threshold_get(void)
{
return level_filter_threshold;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4024B2", "function_addr": 4203698, "binary_name": "81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "movzx eax, cs:byte_426191"], [3, "pop rbp"], [4, "retn"]], "data_dep": [[3, 0], [4, 2]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba_81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba.jsonl.gz", "strip_func_name": "sub_4024B2", "query": "\n\n\n__int64 sub_4024B2()\n{\nreturn (unsigned __int8)byte_426191;\n}\n\n\n\nQ:[sub_4024B2,]\nAssistant: ", "hints": "[]", "response": "{'sub_4024B2': 'app_log_filter_threshold_get'}"} |
|
sleep_cmd | c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad | open-simh | simh | NA | t_stat sleep_cmd (int32 flag, CONST char *cptr)
{
char *tptr;
double wait;
while (*cptr) {
wait = strtod (cptr, &tptr);
switch (*tptr) {
case ' ':
case '\t':
case '\0':
break;
case 's':
case 'S':
++tptr;
break;
case 'm':
case 'M':
++tptr;
wait *= 60.0;
break;
case 'h':
case 'H':
++tptr;
wait *= (60.0*60.0);
break;
case 'd':
case 'D':
++tptr;
wait *= (24.0*60.0*60.0);
break;
default:
return sim_messagef (SCPE_ARG, "Invalid Sleep unit '%c'\n", *cptr);
}
wait *= 1000.0; /* Convert to Milliseconds */
cptr = tptr;
while ((wait > 1000.0) && (!stop_cpu))
wait -= sim_os_ms_sleep (1000);
if ((wait > 0.0) && (!stop_cpu))
sim_os_ms_sleep ((unsigned)wait);
}
stop_cpu = FALSE; /* Clear in case sleep was interrupted */
return SCPE_OK;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41DE81", "function_addr": 4316801, "binary_name": "c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_14], edi"], [4, "mov [rbp+nptr], rsi"], [5, "jmp loc_41E074"], [6, "lea rdx, [rbp+endptr]"], [7, "mov rax, [rbp+nptr]"], [8, "mov rsi, rdx"], [9, "mov rdi, rax"], [10, "call _strtod"], [11, "movq rax, xmm0"], [12, "mov [rbp+var_8], rax"], [13, "mov rax, [rbp+endptr]"], [14, "movzx eax, byte ptr [rax]"], [15, "movsx eax, al"], [16, "cmp eax, 20h "], [17, "jg short loc_41DF19"], [18, "test eax, eax"], [19, "jns short loc_41DEE1"], [20, "jmp def_41DEDF"], [21, "sub eax, 44h "], [22, "cmp eax, 2Fh"], [23, "ja def_41DEDF"], [24, "mov eax, eax"], [25, "mov rax, ds:jpt_41DEDF[rax*8]"], [26, "jmp rax"], [27, "cmp eax, 20h "], [28, "setnbe dl"], [29, "test dl, dl"], [30, "jnz def_41DEDF"], [31, "mov edx, 1"], [32, "mov ecx, eax"], [33, "shl rdx, cl"], [34, "mov rax, 100000201h"], [35, "and rax, rdx"], [36, "test rax, rax"], [37, "setnz al"], [38, "test al, al"], [39, "jnz loc_41DFCB"], [40, "jmp def_41DEDF"], [41, "cmp eax, 73h "], [42, "jg def_41DEDF"], [43, "cmp eax, 44h "], [44, "jge short loc_41DEC9"], [45, "jmp short def_41DEDF"], [46, "mov rax, [rbp+endptr]"], [47, "add rax, 1"], [48, "mov [rbp+endptr], rax"], [49, "jmp loc_41DFCC"], [50, "mov rax, [rbp+endptr]"], [51, "add rax, 1"], [52, "mov [rbp+endptr], rax"], [53, "movsd xmm1, [rbp+var_8]"], [54, "movsd xmm0, cs:qword_4ADE10"], [55, "mulsd xmm0, xmm1"], [56, "movsd [rbp+var_8], xmm0"], [57, "jmp short loc_41DFCC"], [58, "mov rax, [rbp+endptr]"], [59, "add rax, 1"], [60, "mov [rbp+endptr], rax"], [61, "movsd xmm1, [rbp+var_8]"], [62, "movsd xmm0, cs:qword_4ADE18"], [63, "mulsd xmm0, xmm1"], [64, "movsd [rbp+var_8], xmm0"], [65, "jmp short loc_41DFCC"], [66, "mov rax, [rbp+endptr]"], [67, "add rax, 1"], [68, "mov [rbp+endptr], rax"], [69, "movsd xmm1, [rbp+var_8]"], [70, "movsd xmm0, cs:qword_4ADE20"], [71, "mulsd xmm0, xmm1"], [72, "movsd [rbp+var_8], xmm0"], [73, "jmp short loc_41DFCC"], [74, "mov rax, [rbp+nptr]"], [75, "movzx eax, byte ptr [rax]"], [76, "movsx eax, al"], [77, "mov edx, eax"], [78, "mov esi, offset aInvalidSleepUn"], [79, "mov edi, 48h "], [80, "mov eax, 0"], [81, "call sub_4384B4"], [82, "jmp locret_41E092"], [83, "nop"], [84, "movsd xmm1, [rbp+var_8]"], [85, "movsd xmm0, cs:qword_4ADE28"], [86, "mulsd xmm0, xmm1"], [87, "movsd [rbp+var_8], xmm0"], [88, "mov rax, [rbp+endptr]"], [89, "mov [rbp+nptr], rax"], [90, "jmp short loc_41E02F"], [91, "mov edi, 3E8h"], [92, "call sub_44B155"], [93, "mov eax, eax"], [94, "test rax, rax"], [95, "js short loc_41E008"], [96, "pxor xmm0, xmm0"], [97, "cvtsi2sd xmm0, rax"], [98, "jmp short loc_41E021"], [99, "mov rdx, rax"], [100, "shr rdx, 1"], [101, "and eax, 1"], [102, "or rdx, rax"], [103, "pxor xmm0, xmm0"], [104, "cvtsi2sd xmm0, rdx"], [105, "addsd xmm0, xmm0"], [106, "movsd xmm1, [rbp+var_8]"], [107, "subsd xmm1, xmm0"], [108, "movsd [rbp+var_8], xmm1"], [109, "movsd xmm0, [rbp+var_8]"], [110, "comisd xmm0, cs:qword_4ADE28"], [111, "jbe short loc_41E048"], [112, "mov eax, cs:dword_4F7F60"], [113, "test eax, eax"], [114, "jz short loc_41DFEC"], [115, "movsd xmm0, [rbp+var_8]"], [116, "pxor xmm1, xmm1"], [117, "comisd xmm0, xmm1"], [118, "ja short loc_41E059"], [119, "jmp short loc_41E074"], [120, "mov eax, cs:dword_4F7F60"], [121, "test eax, eax"], [122, "jnz short loc_41E074"], [123, "movsd xmm0, [rbp+var_8]"], [124, "cvttsd2si rax, xmm0"], [125, "mov edi, eax"], [126, "call sub_44B155"], [127, "mov rax, [rbp+nptr]"], [128, "movzx eax, byte ptr [rax]"], [129, "test al, al"], [130, "jnz loc_41DE95"], [131, "mov cs:dword_4F7F60, 0"], [132, "mov eax, 0"], [133, "leave"], [134, "retn"]], "data_dep": [[6, 48], [6, 68], [6, 52], [6, 6], [6, 102], [6, 33], [6, 60], [7, 4], [7, 89], [8, 6], [9, 7], [11, 117], [11, 123], [12, 11], [13, 60], [13, 48], [13, 68], [13, 52], [14, 13], [15, 14], [16, 15], [17, 16], [18, 15], [19, 18], [21, 15], [22, 21], [23, 22], [24, 21], [26, 25], [27, 18], [28, 27], [28, 6], [29, 28], [30, 29], [32, 18], [33, 31], [33, 32], [35, 33], [35, 34], [36, 35], [37, 36], [38, 37], [39, 38], [41, 15], [42, 41], [43, 15], [44, 43], [46, 48], [46, 68], [46, 52], [46, 60], [47, 46], [48, 47], [50, 52], [50, 60], [50, 48], [50, 68], [51, 50], [52, 51], [53, 12], [55, 54], [55, 53], [56, 55], [58, 60], [58, 48], [58, 68], [58, 52], [59, 58], [60, 59], [61, 12], [63, 61], [63, 62], [64, 63], [66, 60], [66, 48], [66, 68], [66, 52], [67, 66], [68, 67], [69, 12], [71, 69], [71, 70], [72, 71], [74, 4], [74, 89], [75, 74], [76, 75], [77, 76], [84, 72], [84, 56], [84, 12], [84, 64], [86, 85], [86, 84], [87, 86], [88, 60], [88, 48], [88, 68], [88, 52], [89, 88], [93, 92], [94, 93], [95, 94], [97, 94], [97, 96], [99, 94], [100, 99], [101, 94], [102, 100], [102, 101], [104, 102], [104, 103], [105, 104], [106, 108], [106, 87], [107, 97], [107, 106], [107, 105], [108, 107], [109, 108], [109, 87], [110, 109], [111, 94], [111, 59], [111, 38], [111, 102], [111, 47], [111, 67], [111, 51], [113, 112], [114, 113], [115, 87], [115, 108], [117, 116], [117, 115], [118, 113], [118, 67], [118, 51], [118, 94], [118, 59], [118, 38], [118, 102], [118, 47], [121, 120], [122, 121], [123, 108], [123, 87], [124, 121], [124, 123], [125, 124], [127, 89], [127, 4], [128, 127], [129, 128], [130, 129], [134, 132], [134, 81]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad_c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad.jsonl.gz", "strip_func_name": "sub_41DE81", "query": "\n\n\n__int64 __fastcall sub_41DE81(__int64 a1, char *a2)\n{\nint v2; // ecx\nint v3; // er8\nint v4; // er9\nint v5; // eax\nchar *endptr; // [rsp+10h] [rbp-10h] BYREF\ndouble v9; // [rsp+18h] [rbp-8h]\n\nwhile ( *a2 )\n{\nv9 = strtod(a2, &endptr);\nv5 = *endptr;\nif ( v5 > 32 )\n{\nif ( v5 <= 115 && v5 >= 68 )\n{\nswitch ( *endptr )\n{\ncase 'D':\ncase 'd':\n++endptr;\nv9 = 86400.0 * v9;\ngoto LABEL_16;\ncase 'H':\ncase 'h':\n++endptr;\nv9 = 3600.0 * v9;\ngoto LABEL_16;\ncase 'M':\ncase 'm':\n++endptr;\nv9 = 60.0 * v9;\ngoto LABEL_16;\ncase 'S':\ncase 's':\n++endptr;\ngoto LABEL_16;\ndefault:\nreturn sub_4384B4(72, (unsigned int)\"Invalid Sleep unit '%c'\\n\", *a2, v2, v3, v4, (char)a2);\n}\n}\nreturn sub_4384B4(72, (unsigned int)\"Invalid Sleep unit '%c'\\n\", *a2, v2, v3, v4, (char)a2);\n}\nif ( v5 < 0 )\nreturn sub_4384B4(72, (unsigned int)\"Invalid Sleep unit '%c'\\n\", *a2, v2, v3, v4, (char)a2);\nv2 = *endptr;\nif ( ((1LL << v5) & 0x100000201LL) == 0 )\nreturn sub_4384B4(72, (unsigned int)\"Invalid Sleep unit '%c'\\n\", *a2, v2, v3, v4, (char)a2);\nLABEL_16:\nv9 = 1000.0 * v9;\na2 = endptr;\nwhile ( v9 > 1000.0 && !dword_4F7F60 )\nv9 = v9 - (double)(int)sub_44B155(1000LL);\nif ( v9 > 0.0 && !dword_4F7F60 )\nsub_44B155((unsigned int)(int)v9);\n}\ndword_4F7F60 = 0;\nreturn 0LL;\n}\n\n\n\nQ:[a2,a1,endptr,v9,sub_41DE81,sub_4384B4,sub_44B155,]\nAssistant: ", "hints": "[]", "response": "{'a2': 'cptr', 'a1': 'flag', 'endptr': 'tptr', 'v9': 'wait', 'sub_41DE81': 'sleep_cmd', 'sub_4384B4': 'sim_messagef', 'sub_44B155': 'sim_os_ms_sleep'}"} |
|
zero_to_cs | 7e6c42b9f272dda3e9800529546554de619357d123700fc720e008a996332717 | LingDong- | wax | NA | str_t zero_to_cs(type_t* typ){
str_t out = str_new();
if (typ->tag == TYP_INT){
str_add(&out,"0");
}else if (typ->tag == TYP_FLT){
str_add(&out,"0.0f");
}else if (typ->tag == TYP_STT){
str_add(&out,"null");
}else if (typ->tag == TYP_ARR){
str_add(&out,"null");
}else if (typ->tag == TYP_VEC){
str_add(&out,"null");
}else if (typ->tag == TYP_MAP){
str_add(&out,"null");
}else if (typ->tag == TYP_STR){
str_add(&out,"null");
}else{
str_add(&out,"/*zero?*/");
}
return out;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42391E", "function_addr": 4339998, "binary_name": "7e6c42b9f272dda3e9800529546554de619357d123700fc720e008a996332717.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov eax, 0"], [5, "call sub_401494"], [6, "mov [rbp+var_10], rax"], [7, "mov [rbp+var_8], rdx"], [8, "mov rax, [rbp+var_18]"], [9, "mov eax, [rax]"], [10, "cmp eax, 1"], [11, "jnz short loc_42395D"], [12, "lea rax, [rbp+var_10]"], [13, "mov esi, offset a0"], [14, "mov rdi, rax"], [15, "call sub_401578"], [16, "jmp loc_423A28"], [17, "mov rax, [rbp+var_18]"], [18, "mov eax, [rax]"], [19, "cmp eax, 2"], [20, "jnz short loc_42397E"], [21, "lea rax, [rbp+var_10]"], [22, "mov esi, offset a00f"], [23, "mov rdi, rax"], [24, "call sub_401578"], [25, "jmp loc_423A28"], [26, "mov rax, [rbp+var_18]"], [27, "mov eax, [rax]"], [28, "cmp eax, 7"], [29, "jnz short loc_42399F"], [30, "lea rax, [rbp+var_10]"], [31, "mov esi, offset aNull"], [32, "mov rdi, rax"], [33, "call sub_401578"], [34, "jmp loc_423A28"], [35, "mov rax, [rbp+var_18]"], [36, "mov eax, [rax]"], [37, "cmp eax, 5"], [38, "jnz short loc_4239BD"], [39, "lea rax, [rbp+var_10]"], [40, "mov esi, offset aNull"], [41, "mov rdi, rax"], [42, "call sub_401578"], [43, "jmp short loc_423A28"], [44, "mov rax, [rbp+var_18]"], [45, "mov eax, [rax]"], [46, "cmp eax, 4"], [47, "jnz short loc_4239DB"], [48, "lea rax, [rbp+var_10]"], [49, "mov esi, offset aNull"], [50, "mov rdi, rax"], [51, "call sub_401578"], [52, "jmp short loc_423A28"], [53, "mov rax, [rbp+var_18]"], [54, "mov eax, [rax]"], [55, "cmp eax, 6"], [56, "jnz short loc_4239F9"], [57, "lea rax, [rbp+var_10]"], [58, "mov esi, offset aNull"], [59, "mov rdi, rax"], [60, "call sub_401578"], [61, "jmp short loc_423A28"], [62, "mov rax, [rbp+var_18]"], [63, "mov eax, [rax]"], [64, "cmp eax, 3"], [65, "jnz short loc_423A17"], [66, "lea rax, [rbp+var_10]"], [67, "mov esi, offset aNull"], [68, "mov rdi, rax"], [69, "call sub_401578"], [70, "jmp short loc_423A28"], [71, "lea rax, [rbp+var_10]"], [72, "mov esi, offset aZero"], [73, "mov rdi, rax"], [74, "call sub_401578"], [75, "mov rax, [rbp+var_10]"], [76, "mov rdx, [rbp+var_8]"], [77, "leave"], [78, "retn"]], "data_dep": [[6, 5], [8, 3], [9, 8], [10, 9], [11, 10], [12, 9], [12, 6], [14, 12], [17, 3], [18, 17], [19, 18], [20, 19], [21, 6], [21, 18], [23, 21], [26, 3], [27, 26], [28, 27], [29, 28], [30, 6], [30, 27], [32, 30], [35, 3], [36, 35], [37, 36], [38, 37], [39, 36], [39, 6], [41, 39], [44, 3], [45, 44], [46, 45], [47, 46], [48, 45], [48, 6], [50, 48], [53, 3], [54, 53], [55, 54], [56, 55], [57, 54], [57, 6], [59, 57], [62, 3], [63, 62], [64, 63], [65, 64], [66, 63], [66, 6], [68, 66], [71, 6], [71, 63], [73, 71], [75, 6], [76, 7], [78, 75]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/7e6c42b9f272dda3e9800529546554de619357d123700fc720e008a996332717_7e6c42b9f272dda3e9800529546554de619357d123700fc720e008a996332717.jsonl.gz", "strip_func_name": "sub_42391E", "query": "\n\n\n__int64 __fastcall sub_42391E(_DWORD *a1, __int64 a2)\n{\n__int64 v2; // rdx\n__int64 v4[2]; // [rsp+10h] [rbp-10h] BYREF\n\nv4[0] = sub_401494(a1, a2);\nv4[1] = v2;\nswitch ( *a1 )\n{\ncase 1:\nsub_401578((int *)v4, \"0\");\nbreak;\ncase 2:\nsub_401578((int *)v4, \"0.0f\");\nbreak;\ncase 7:\ncase 5:\ncase 4:\ncase 6:\ncase 3:\nsub_401578((int *)v4, \"null\");\nbreak;\ndefault:\nsub_401578((int *)v4, \"/*zero?*/\");\nbreak;\n}\nreturn v4[0];\n}\n\n\n\nQ:[a1,v4,sub_42391E,sub_401494,sub_401578,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'typ', 'v4': 'out', 'sub_42391E': 'zero_to_cs', 'sub_401494': 'str_new', 'sub_401578': 'str_add'}"} |
|
ZSTD_compressBlock_btlazy2_extDict | 8344e4f2e71647113a4027b2f26417ee1a42cf3c0de632f9252e1b29c5147f05 | soedinglab | MMseqs2 | NA | size_t ZSTD_compressBlock_btlazy2_extDict(
ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
void const* src, size_t srcSize)
{
return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, 1, 2);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42C2A7", "function_addr": 4375207, "binary_name": "8344e4f2e71647113a4027b2f26417ee1a42cf3c0de632f9252e1b29c5147f05.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 1E8h"], [4, "mov [rbp+var_1C8], rdi"], [5, "mov [rbp+var_1D0], rsi"], [6, "mov [rbp+var_1D8], rdx"], [7, "mov [rbp+var_1E0], rcx"], [8, "mov [rbp+var_1E8], r8"], [9, "mov rax, [rbp+var_1C8]"], [10, "mov [rbp+var_18], rax"], [11, "mov rax, [rbp+var_1D0]"], [12, "mov [rbp+var_20], rax"], [13, "mov rax, [rbp+var_1D8]"], [14, "mov [rbp+var_28], rax"], [15, "mov rax, [rbp+var_1E0]"], [16, "mov [rbp+var_30], rax"], [17, "mov rax, [rbp+var_1E8]"], [18, "mov [rbp+var_38], rax"], [19, "mov rax, [rbp+var_30]"], [20, "mov [rbp+var_40], rax"], [21, "mov rax, [rbp+var_40]"], [22, "mov [rbp+var_48], rax"], [23, "mov rax, [rbp+var_40]"], [24, "mov [rbp+var_50], rax"], [25, "mov rdx, [rbp+var_40]"], [26, "mov rax, [rbp+var_38]"], [27, "add rax, rdx"], [28, "mov [rbp+var_58], rax"], [29, "mov rax, [rbp+var_58]"], [30, "sub rax, 8"], [31, "mov [rbp+var_60], rax"], [32, "mov rax, [rbp+var_18]"], [33, "mov rax, [rax+8]"], [34, "mov [rbp+var_68], rax"], [35, "mov rax, [rbp+var_18]"], [36, "mov eax, [rax+18h]"], [37, "mov [rbp+var_6C], eax"], [38, "mov rax, [rbp+var_18]"], [39, "mov eax, [rax+1Ch]"], [40, "mov [rbp+var_70], eax"], [41, "mov edx, [rbp+var_6C]"], [42, "mov rax, [rbp+var_68]"], [43, "add rax, rdx"], [44, "mov [rbp+var_78], rax"], [45, "mov rax, [rbp+var_18]"], [46, "mov rax, [rax+10h]"], [47, "mov [rbp+var_80], rax"], [48, "mov edx, [rbp+var_6C]"], [49, "mov rax, [rbp+var_80]"], [50, "add rax, rdx"], [51, "mov [rbp+var_88], rax"], [52, "mov edx, [rbp+var_70]"], [53, "mov rax, [rbp+var_80]"], [54, "add rax, rdx"], [55, "mov [rbp+var_90], rax"], [56, "mov eax, offset sub_424320"], [57, "mov [rbp+var_98], rax"], [58, "mov rax, [rbp+var_28]"], [59, "mov eax, [rax]"], [60, "mov [rbp+var_9C], eax"], [61, "mov rax, [rbp+var_28]"], [62, "mov eax, [rax+4]"], [63, "mov [rbp+var_A0], eax"], [64, "mov rax, [rbp+var_18]"], [65, "mov edx, [rax+24h]"], [66, "mov rax, [rbp+var_18]"], [67, "mov [rax+28h], edx"], [68, "mov rax, [rbp+var_48]"], [69, "cmp rax, [rbp+var_78]"], [70, "setz al"], [71, "movzx eax, al"], [72, "add [rbp+var_48], rax"], [73, "jmp loc_42CD08"], [74, "mov [rbp+var_A8], 0"], [75, "mov [rbp+var_B0], 0"], [76, "mov rax, [rbp+var_48]"], [77, "add rax, 1"], [78, "mov [rbp+var_B8], rax"], [79, "mov rax, [rbp+var_48]"], [80, "sub rax, [rbp+var_68]"], [81, "mov [rbp+var_BC], eax"], [82, "mov eax, [rbp+var_BC]"], [83, "sub eax, [rbp+var_9C]"], [84, "add eax, 1"], [85, "mov [rbp+var_C0], eax"], [86, "mov eax, [rbp+var_6C]"], [87, "cmp eax, [rbp+var_C0]"], [88, "jbe short loc_42C43F"], [89, "mov rax, [rbp+var_80]"], [90, "jmp short loc_42C443"], [91, "mov rax, [rbp+var_68]"], [92, "mov [rbp+var_C8], rax"], [93, "mov edx, [rbp+var_C0]"], [94, "mov rax, [rbp+var_C8]"], [95, "add rax, rdx"], [96, "mov [rbp+var_D0], rax"], [97, "mov eax, [rbp+var_6C]"], [98, "sub eax, [rbp+var_C0]"], [99, "sub eax, 1"], [100, "cmp eax, 2"], [101, "setnbe dl"], [102, "mov eax, [rbp+var_70]"], [103, "cmp eax, [rbp+var_C0]"], [104, "setb al"], [105, "and eax, edx"], [106, "test al, al"], [107, "jz short loc_42C504"], [108, "mov rax, [rbp+var_48]"], [109, "add rax, 1"], [110, "mov rdi, rax"], [111, "call sub_422772"], [112, "mov ebx, eax"], [113, "mov rax, [rbp+var_D0]"], [114, "mov rdi, rax"], [115, "call sub_422772"], [116, "cmp ebx, eax"], [117, "jnz short loc_42C504"], [118, "mov eax, [rbp+var_6C]"], [119, "cmp eax, [rbp+var_C0]"], [120, "jbe short loc_42C4BE"], [121, "mov rax, [rbp+var_88]"], [122, "jmp short loc_42C4C2"], [123, "mov rax, [rbp+var_58]"], [124, "mov [rbp+var_D8], rax"], [125, "mov rax, [rbp+var_D0]"], [126, "lea rsi, [rax+4]"], [127, "mov rax, [rbp+var_48]"], [128, "lea rdi, [rax+5]"], [129, "mov rcx, [rbp+var_78]"], [130, "mov rdx, [rbp+var_D8]"], [131, "mov rax, [rbp+var_58]"], [132, "mov r8, rcx"], [133, "mov rcx, rdx"], [134, "mov rdx, rax"], [135, "call sub_422BC5"], [136, "add rax, 4"], [137, "mov [rbp+var_A8], rax"], [138, "mov [rbp+var_1A8], 3B9AC9FFh"], [139, "lea rcx, [rbp+var_1A8]"], [140, "mov rdx, [rbp+var_58]"], [141, "mov rsi, [rbp+var_48]"], [142, "mov rax, [rbp+var_18]"], [143, "mov r8, [rbp+var_98]"], [144, "mov rdi, rax"], [145, "call r8"], [146, "mov [rbp+var_E0], rax"], [147, "mov rax, [rbp+var_E0]"], [148, "cmp rax, [rbp+var_A8]"], [149, "jbe short loc_42C56D"], [150, "mov rax, [rbp+var_E0]"], [151, "mov [rbp+var_A8], rax"], [152, "mov rax, [rbp+var_48]"], [153, "mov [rbp+var_B8], rax"], [154, "mov rax, [rbp+var_1A8]"], [155, "mov [rbp+var_B0], rax"], [156, "cmp [rbp+var_A8], 3"], [157, "ja loc_42CA42"], [158, "mov rax, [rbp+var_48]"], [159, "sub rax, [rbp+var_50]"], [160, "sar rax, 8"], [161, "add rax, 1"], [162, "add [rbp+var_48], rax"], [163, "jmp loc_42CD08"], [164, "add [rbp+var_48], 1"], [165, "add [rbp+var_BC], 1"], [166, "cmp [rbp+var_B0], 0"], [167, "jz loc_42C71B"], [168, "mov eax, [rbp+var_BC]"], [169, "sub eax, [rbp+var_9C]"], [170, "mov [rbp+var_E4], eax"], [171, "mov eax, [rbp+var_6C]"], [172, "cmp eax, [rbp+var_E4]"], [173, "jbe short loc_42C5D1"], [174, "mov rax, [rbp+var_80]"], [175, "jmp short loc_42C5D5"], [176, "mov rax, [rbp+var_68]"], [177, "mov [rbp+var_F0], rax"], [178, "mov edx, [rbp+var_E4]"], [179, "mov rax, [rbp+var_F0]"], [180, "add rax, rdx"], [181, "mov [rbp+var_F8], rax"], [182, "mov eax, [rbp+var_6C]"], [183, "sub eax, [rbp+var_E4]"], [184, "sub eax, 1"], [185, "cmp eax, 2"], [186, "setnbe dl"], [187, "mov eax, [rbp+var_70]"], [188, "cmp eax, [rbp+var_E4]"], [189, "setb al"], [190, "and eax, edx"], [191, "test al, al"], [192, "jz loc_42C71B"], [193, "mov rax, [rbp+var_48]"], [194, "mov rdi, rax"], [195, "call sub_422772"], [196, "mov ebx, eax"], [197, "mov rax, [rbp+var_F8]"], [198, "mov rdi, rax"], [199, "call sub_422772"], [200, "cmp ebx, eax"], [201, "jnz loc_42C71B"], [202, "mov eax, [rbp+var_6C]"], [203, "cmp eax, [rbp+var_E4]"], [204, "jbe short loc_42C654"], [205, "mov rax, [rbp+var_88]"], [206, "jmp short loc_42C658"], [207, "mov rax, [rbp+var_58]"], [208, "mov [rbp+var_100], rax"], [209, "mov rax, [rbp+var_F8]"], [210, "lea rsi, [rax+4]"], [211, "mov rax, [rbp+var_48]"], [212, "lea rdi, [rax+4]"], [213, "mov rcx, [rbp+var_78]"], [214, "mov rdx, [rbp+var_100]"], [215, "mov rax, [rbp+var_58]"], [216, "mov r8, rcx"], [217, "mov rcx, rdx"], [218, "mov rdx, rax"], [219, "call sub_422BC5"], [220, "add rax, 4"], [221, "mov [rbp+var_108], rax"], [222, "mov rax, [rbp+var_108]"], [223, "mov edx, eax"], [224, "mov eax, edx"], [225, "add eax, eax"], [226, "add eax, edx"], [227, "mov [rbp+var_10C], eax"], [228, "mov rax, [rbp+var_A8]"], [229, "mov edx, eax"], [230, "mov eax, edx"], [231, "add eax, eax"], [232, "lea ebx, [rax+rdx]"], [233, "mov rax, [rbp+var_B0]"], [234, "add eax, 1"], [235, "mov edi, eax"], [236, "call sub_4228CA"], [237, "mov edx, eax"], [238, "mov eax, ebx"], [239, "sub eax, edx"], [240, "add eax, 1"], [241, "mov [rbp+var_110], eax"], [242, "cmp [rbp+var_108], 3"], [243, "jbe short loc_42C71B"], [244, "mov eax, [rbp+var_10C]"], [245, "cmp eax, [rbp+var_110]"], [246, "jle short loc_42C71B"], [247, "mov rax, [rbp+var_108]"], [248, "mov [rbp+var_A8], rax"], [249, "mov [rbp+var_B0], 0"], [250, "mov rax, [rbp+var_48]"], [251, "mov [rbp+var_B8], rax"], [252, "mov [rbp+var_1B0], 3B9AC9FFh"], [253, "lea rcx, [rbp+var_1B0]"], [254, "mov rdx, [rbp+var_58]"], [255, "mov rsi, [rbp+var_48]"], [256, "mov rax, [rbp+var_18]"], [257, "mov r8, [rbp+var_98]"], [258, "mov rdi, rax"], [259, "call r8"], [260, "mov [rbp+var_118], rax"], [261, "mov rax, [rbp+var_118]"], [262, "lea ebx, ds:0[rax*4]"], [263, "mov rax, [rbp+var_1B0]"], [264, "add eax, 1"], [265, "mov edi, eax"], [266, "call sub_4228CA"], [267, "mov edx, eax"], [268, "mov eax, ebx"], [269, "sub eax, edx"], [270, "mov [rbp+var_11C], eax"], [271, "mov rax, [rbp+var_A8]"], [272, "lea ebx, ds:0[rax*4]"], [273, "mov rax, [rbp+var_B0]"], [274, "add eax, 1"], [275, "mov edi, eax"], [276, "call sub_4228CA"], [277, "mov edx, eax"], [278, "mov eax, ebx"], [279, "sub eax, edx"], [280, "add eax, 4"], [281, "mov [rbp+var_120], eax"], [282, "cmp [rbp+var_118], 3"], [283, "jbe short loc_42C7EA"], [284, "mov eax, [rbp+var_11C]"], [285, "cmp eax, [rbp+var_120]"], [286, "jle short loc_42C7EA"], [287, "mov rax, [rbp+var_118]"], [288, "mov [rbp+var_A8], rax"], [289, "mov rax, [rbp+var_1B0]"], [290, "mov [rbp+var_B0], rax"], [291, "mov rax, [rbp+var_48]"], [292, "mov [rbp+var_B8], rax"], [293, "jmp loc_42CA42"], [294, "mov rax, [rbp+var_60]"], [295, "cmp rax, [rbp+var_48]"], [296, "jbe loc_42CA52"], [297, "add [rbp+var_48], 1"], [298, "add [rbp+var_BC], 1"], [299, "cmp [rbp+var_B0], 0"], [300, "jz loc_42C978"], [301, "mov eax, [rbp+var_BC]"], [302, "sub eax, [rbp+var_9C]"], [303, "mov [rbp+var_124], eax"], [304, "mov eax, [rbp+var_6C]"], [305, "cmp eax, [rbp+var_124]"], [306, "jbe short loc_42C835"], [307, "mov rax, [rbp+var_80]"], [308, "jmp short loc_42C839"], [309, "mov rax, [rbp+var_68]"], [310, "mov [rbp+var_130], rax"], [311, "mov edx, [rbp+var_124]"], [312, "mov rax, [rbp+var_130]"], [313, "add rax, rdx"], [314, "mov [rbp+var_138], rax"], [315, "mov eax, [rbp+var_6C]"], [316, "sub eax, [rbp+var_124]"], [317, "sub eax, 1"], [318, "cmp eax, 2"], [319, "setnbe dl"], [320, "mov eax, [rbp+var_70]"], [321, "cmp eax, [rbp+var_124]"], [322, "setb al"], [323, "and eax, edx"], [324, "test al, al"], [325, "jz loc_42C978"], [326, "mov rax, [rbp+var_48]"], [327, "mov rdi, rax"], [328, "call sub_422772"], [329, "mov ebx, eax"], [330, "mov rax, [rbp+var_138]"], [331, "mov rdi, rax"], [332, "call sub_422772"], [333, "cmp ebx, eax"], [334, "jnz loc_42C978"], [335, "mov eax, [rbp+var_6C]"], [336, "cmp eax, [rbp+var_124]"], [337, "jbe short loc_42C8B8"], [338, "mov rax, [rbp+var_88]"], [339, "jmp short loc_42C8BC"], [340, "mov rax, [rbp+var_58]"], [341, "mov [rbp+var_140], rax"], [342, "mov rax, [rbp+var_138]"], [343, "lea rsi, [rax+4]"], [344, "mov rax, [rbp+var_48]"], [345, "lea rdi, [rax+4]"], [346, "mov rcx, [rbp+var_78]"], [347, "mov rdx, [rbp+var_140]"], [348, "mov rax, [rbp+var_58]"], [349, "mov r8, rcx"], [350, "mov rcx, rdx"], [351, "mov rdx, rax"], [352, "call sub_422BC5"], [353, "add rax, 4"], [354, "mov [rbp+var_148], rax"], [355, "mov rax, [rbp+var_148]"], [356, "shl eax, 2"], [357, "mov [rbp+var_14C], eax"], [358, "mov rax, [rbp+var_A8]"], [359, "lea ebx, ds:0[rax*4]"], [360, "mov rax, [rbp+var_B0]"], [361, "add eax, 1"], [362, "mov edi, eax"], [363, "call sub_4228CA"], [364, "mov edx, eax"], [365, "mov eax, ebx"], [366, "sub eax, edx"], [367, "add eax, 1"], [368, "mov [rbp+var_150], eax"], [369, "cmp [rbp+var_148], 3"], [370, "jbe short loc_42C978"], [371, "mov eax, [rbp+var_14C]"], [372, "cmp eax, [rbp+var_150]"], [373, "jle short loc_42C978"], [374, "mov rax, [rbp+var_148]"], [375, "mov [rbp+var_A8], rax"], [376, "mov [rbp+var_B0], 0"], [377, "mov rax, [rbp+var_48]"], [378, "mov [rbp+var_B8], rax"], [379, "mov [rbp+var_1B8], 3B9AC9FFh"], [380, "lea rcx, [rbp+var_1B8]"], [381, "mov rdx, [rbp+var_58]"], [382, "mov rsi, [rbp+var_48]"], [383, "mov rax, [rbp+var_18]"], [384, "mov r8, [rbp+var_98]"], [385, "mov rdi, rax"], [386, "call r8"], [387, "mov [rbp+var_158], rax"], [388, "mov rax, [rbp+var_158]"], [389, "lea ebx, ds:0[rax*4]"], [390, "mov rax, [rbp+var_1B8]"], [391, "add eax, 1"], [392, "mov edi, eax"], [393, "call sub_4228CA"], [394, "mov edx, eax"], [395, "mov eax, ebx"], [396, "sub eax, edx"], [397, "mov [rbp+var_15C], eax"], [398, "mov rax, [rbp+var_A8]"], [399, "lea ebx, ds:0[rax*4]"], [400, "mov rax, [rbp+var_B0]"], [401, "add eax, 1"], [402, "mov edi, eax"], [403, "call sub_4228CA"], [404, "mov edx, eax"], [405, "mov eax, ebx"], [406, "sub eax, edx"], [407, "add eax, 7"], [408, "mov [rbp+var_160], eax"], [409, "cmp [rbp+var_158], 3"], [410, "jbe short loc_42CA52"], [411, "mov eax, [rbp+var_15C]"], [412, "cmp eax, [rbp+var_160]"], [413, "jle short loc_42CA52"], [414, "mov rax, [rbp+var_158]"], [415, "mov [rbp+var_A8], rax"], [416, "mov rax, [rbp+var_1B8]"], [417, "mov [rbp+var_B0], rax"], [418, "mov rax, [rbp+var_48]"], [419, "mov [rbp+var_B8], rax"], [420, "mov rax, [rbp+var_60]"], [421, "cmp rax, [rbp+var_48]"], [422, "ja loc_42C594"], [423, "jmp short loc_42CA53"], [424, "nop"], [425, "cmp [rbp+var_B0], 0"], [426, "jz loc_42CB46"], [427, "mov rax, [rbp+var_B8]"], [428, "sub rax, [rbp+var_68]"], [429, "mov edx, eax"], [430, "mov rax, [rbp+var_B0]"], [431, "mov ecx, eax"], [432, "mov eax, edx"], [433, "sub eax, ecx"], [434, "add eax, 2"], [435, "mov [rbp+var_164], eax"], [436, "mov eax, [rbp+var_6C]"], [437, "cmp eax, [rbp+var_164]"], [438, "jbe short loc_42CA9E"], [439, "mov edx, [rbp+var_164]"], [440, "mov rax, [rbp+var_80]"], [441, "add rax, rdx"], [442, "jmp short loc_42CAAB"], [443, "mov edx, [rbp+var_164]"], [444, "mov rax, [rbp+var_68]"], [445, "add rax, rdx"], [446, "mov [rbp+var_170], rax"], [447, "mov eax, [rbp+var_6C]"], [448, "cmp eax, [rbp+var_164]"], [449, "jbe short loc_42CAC6"], [450, "mov rax, [rbp+var_90]"], [451, "jmp short loc_42CACA"], [452, "mov rax, [rbp+var_78]"], [453, "mov [rbp+var_178], rax"], [454, "jmp short loc_42CAEB"], [455, "sub [rbp+var_B8], 1"], [456, "sub [rbp+var_170], 1"], [457, "add [rbp+var_A8], 1"], [458, "mov rax, [rbp+var_50]"], [459, "cmp rax, [rbp+var_B8]"], [460, "jnb short loc_42CB28"], [461, "mov rax, [rbp+var_178]"], [462, "cmp rax, [rbp+var_170]"], [463, "jnb short loc_42CB28"], [464, "mov rax, [rbp+var_B8]"], [465, "sub rax, 1"], [466, "movzx edx, byte ptr [rax]"], [467, "mov rax, [rbp+var_170]"], [468, "sub rax, 1"], [469, "movzx eax, byte ptr [rax]"], [470, "cmp dl, al"], [471, "jz short loc_42CAD3"], [472, "mov eax, [rbp+var_9C]"], [473, "mov [rbp+var_A0], eax"], [474, "mov rax, [rbp+var_B0]"], [475, "sub eax, 2"], [476, "mov [rbp+var_9C], eax"], [477, "jmp short loc_42CB47"], [478, "nop"], [479, "mov rax, [rbp+var_B8]"], [480, "sub rax, [rbp+var_50]"], [481, "mov [rbp+var_180], rax"], [482, "mov rax, [rbp+var_A8]"], [483, "lea rcx, [rax-3]"], [484, "mov rax, [rbp+var_B0]"], [485, "mov edi, eax"], [486, "mov rdx, [rbp+var_50]"], [487, "mov rsi, [rbp+var_180]"], [488, "mov rax, [rbp+var_20]"], [489, "mov r8, rcx"], [490, "mov ecx, edi"], [491, "mov rdi, rax"], [492, "call sub_4228E3"], [493, "mov rdx, [rbp+var_B8]"], [494, "mov rax, [rbp+var_A8]"], [495, "add rax, rdx"], [496, "mov [rbp+var_48], rax"], [497, "mov rax, [rbp+var_48]"], [498, "mov [rbp+var_50], rax"], [499, "jmp loc_42CCFA"], [500, "mov rax, [rbp+var_48]"], [501, "sub rax, [rbp+var_68]"], [502, "sub eax, [rbp+var_A0]"], [503, "mov [rbp+var_184], eax"], [504, "mov eax, [rbp+var_6C]"], [505, "cmp eax, [rbp+var_184]"], [506, "jbe short loc_42CBD0"], [507, "mov rax, [rbp+var_80]"], [508, "jmp short loc_42CBD4"], [509, "mov rax, [rbp+var_68]"], [510, "mov [rbp+var_190], rax"], [511, "mov edx, [rbp+var_184]"], [512, "mov rax, [rbp+var_190]"], [513, "add rax, rdx"], [514, "mov [rbp+var_198], rax"], [515, "mov eax, [rbp+var_6C]"], [516, "sub eax, [rbp+var_184]"], [517, "sub eax, 1"], [518, "cmp eax, 2"], [519, "setnbe dl"], [520, "mov eax, [rbp+var_70]"], [521, "cmp eax, [rbp+var_184]"], [522, "setb al"], [523, "and eax, edx"], [524, "test al, al"], [525, "jz loc_42CD08"], [526, "mov rax, [rbp+var_48]"], [527, "mov rdi, rax"], [528, "call sub_422772"], [529, "mov ebx, eax"], [530, "mov rax, [rbp+var_198]"], [531, "mov rdi, rax"], [532, "call sub_422772"], [533, "cmp ebx, eax"], [534, "jnz loc_42CD08"], [535, "mov eax, [rbp+var_6C]"], [536, "cmp eax, [rbp+var_184]"], [537, "jbe short loc_42CC53"], [538, "mov rax, [rbp+var_88]"], [539, "jmp short loc_42CC57"], [540, "mov rax, [rbp+var_58]"], [541, "mov [rbp+var_1A0], rax"], [542, "mov rax, [rbp+var_198]"], [543, "lea rsi, [rax+4]"], [544, "mov rax, [rbp+var_48]"], [545, "lea rdi, [rax+4]"], [546, "mov rcx, [rbp+var_78]"], [547, "mov rdx, [rbp+var_1A0]"], [548, "mov rax, [rbp+var_58]"], [549, "mov r8, rcx"], [550, "mov rcx, rdx"], [551, "mov rdx, rax"], [552, "call sub_422BC5"], [553, "add rax, 4"], [554, "mov [rbp+var_A8], rax"], [555, "mov eax, [rbp+var_A0]"], [556, "mov [rbp+var_B0], rax"], [557, "mov eax, [rbp+var_9C]"], [558, "mov [rbp+var_A0], eax"], [559, "mov rax, [rbp+var_B0]"], [560, "mov [rbp+var_9C], eax"], [561, "mov rax, [rbp+var_A8]"], [562, "lea rcx, [rax-3]"], [563, "mov rdx, [rbp+var_50]"], [564, "mov rax, [rbp+var_20]"], [565, "mov r8, rcx"], [566, "mov ecx, 0"], [567, "mov esi, 0"], [568, "mov rdi, rax"], [569, "call sub_4228E3"], [570, "mov rax, [rbp+var_A8]"], [571, "add [rbp+var_48], rax"], [572, "mov rax, [rbp+var_48]"], [573, "mov [rbp+var_50], rax"], [574, "mov rax, [rbp+var_60]"], [575, "cmp rax, [rbp+var_48]"], [576, "jnb loc_42CBAB"], [577, "mov rax, [rbp+var_60]"], [578, "cmp rax, [rbp+var_48]"], [579, "ja loc_42C3E6"], [580, "mov rax, [rbp+var_28]"], [581, "mov edx, [rbp+var_9C]"], [582, "mov [rax], edx"], [583, "mov rax, [rbp+var_28]"], [584, "lea rdx, [rax+4]"], [585, "mov eax, [rbp+var_A0]"], [586, "mov [rdx], eax"], [587, "mov rax, [rbp+var_58]"], [588, "sub rax, [rbp+var_50]"], [589, "mov rbx, [rbp+var_8]"], [590, "leave"], [591, "retn"]], "data_dep": [[9, 4], [10, 9], [11, 5], [12, 11], [13, 6], [14, 13], [15, 7], [16, 15], [17, 8], [18, 17], [19, 16], [20, 19], [21, 20], [22, 21], [23, 20], [24, 23], [25, 20], [26, 18], [27, 26], [27, 25], [28, 27], [29, 28], [30, 29], [31, 30], [32, 10], [33, 32], [34, 33], [35, 10], [36, 35], [37, 36], [38, 10], [39, 38], [40, 39], [41, 37], [42, 34], [43, 41], [43, 42], [44, 43], [45, 10], [46, 45], [47, 46], [48, 37], [49, 47], [50, 48], [50, 49], [51, 50], [52, 40], [53, 47], [54, 53], [54, 52], [55, 54], [57, 56], [58, 14], [59, 58], [60, 59], [61, 14], [62, 61], [63, 62], [64, 10], [65, 64], [66, 10], [67, 66], [67, 65], [68, 22], [69, 68], [69, 44], [70, 68], [70, 69], [71, 70], [72, 71], [72, 22], [76, 496], [76, 571], [76, 72], [76, 162], [77, 76], [78, 77], [79, 162], [79, 496], [79, 571], [79, 72], [80, 79], [80, 34], [81, 80], [82, 81], [83, 560], [83, 476], [83, 60], [83, 82], [84, 83], [85, 84], [86, 37], [87, 86], [87, 85], [88, 87], [89, 47], [91, 34], [92, 91], [92, 89], [93, 85], [94, 92], [95, 93], [95, 94], [96, 95], [97, 37], [98, 97], [98, 85], [99, 98], [100, 99], [101, 100], [101, 93], [102, 40], [103, 102], [103, 85], [104, 102], [104, 103], [105, 104], [105, 101], [106, 105], [107, 106], [108, 571], [108, 72], [108, 162], [108, 496], [109, 108], [110, 109], [112, 111], [113, 96], [114, 113], [116, 112], [116, 115], [117, 116], [118, 37], [119, 118], [119, 85], [120, 119], [121, 51], [123, 28], [124, 123], [124, 121], [125, 96], [126, 567], [126, 125], [126, 487], [126, 67], [126, 141], [127, 72], [127, 162], [127, 496], [127, 571], [128, 67], [128, 114], [128, 127], [129, 44], [130, 124], [131, 28], [132, 129], [133, 130], [134, 131], [136, 135], [137, 136], [139, 139], [139, 138], [139, 133], [139, 566], [139, 490], [140, 28], [141, 496], [141, 72], [141, 571], [141, 162], [142, 10], [143, 57], [144, 142], [145, 143], [146, 145], [147, 146], [148, 74], [148, 147], [148, 137], [149, 148], [150, 146], [151, 150], [152, 496], [152, 72], [152, 571], [152, 162], [153, 152], [154, 138], [155, 154], [156, 74], [156, 151], [156, 137], [157, 156], [158, 162], [158, 496], [158, 571], [158, 72], [159, 24], [159, 498], [159, 573], [159, 158], [160, 159], [161, 160], [162, 161], [162, 571], [162, 162], [162, 496], [162, 72], [164, 297], [164, 571], [164, 162], [164, 496], [164, 72], [164, 164], [165, 81], [165, 165], [165, 298], [166, 417], [166, 290], [166, 155], [166, 75], [167, 166], [168, 165], [169, 60], [169, 476], [169, 560], [169, 168], [170, 169], [171, 37], [172, 171], [172, 170], [173, 172], [174, 47], [176, 34], [177, 176], [177, 174], [178, 170], [179, 177], [180, 179], [180, 178], [181, 180], [182, 37], [183, 182], [183, 170], [184, 183], [185, 184], [186, 185], [186, 178], [187, 40], [188, 187], [188, 170], [189, 188], [189, 187], [190, 189], [190, 186], [191, 190], [192, 191], [193, 164], [194, 193], [196, 195], [197, 181], [198, 197], [200, 196], [200, 199], [201, 200], [202, 37], [203, 202], [203, 170], [204, 203], [205, 51], [207, 28], [208, 205], [208, 207], [209, 181], [210, 209], [210, 255], [210, 67], [210, 141], [210, 382], [211, 164], [212, 198], [212, 211], [212, 67], [213, 44], [214, 208], [215, 28], [216, 213], [217, 214], [218, 215], [220, 219], [221, 220], [222, 221], [223, 222], [224, 223], [225, 224], [226, 225], [226, 223], [227, 226], [228, 151], [228, 137], [228, 415], [228, 74], [228, 288], [229, 228], [230, 229], [231, 230], [232, 196], [232, 231], [232, 67], [233, 290], [233, 155], [233, 75], [233, 417], [234, 233], [235, 234], [237, 236], [238, 232], [239, 238], [239, 237], [240, 239], [241, 240], [242, 221], [243, 242], [244, 227], [245, 244], [245, 241], [246, 245], [247, 221], [248, 247], [250, 164], [251, 250], [253, 139], [253, 380], [253, 217], [253, 253], [253, 252], [254, 28], [255, 164], [256, 10], [257, 57], [258, 256], [259, 257], [260, 259], [261, 260], [262, 112], [262, 196], [262, 232], [262, 399], [262, 529], [262, 272], [263, 252], [264, 263], [265, 264], [267, 266], [268, 262], [269, 268], [269, 267], [270, 269], [271, 248], [271, 415], [271, 74], [271, 288], [271, 151], [271, 137], [272, 262], [273, 417], [273, 249], [273, 75], [273, 290], [273, 155], [274, 273], [275, 274], [277, 276], [278, 272], [279, 278], [279, 277], [280, 279], [281, 280], [282, 260], [283, 282], [284, 270], [285, 281], [285, 284], [286, 285], [287, 260], [288, 287], [289, 252], [290, 289], [291, 164], [292, 291], [294, 31], [295, 164], [295, 294], [296, 295], [297, 164], [298, 165], [299, 417], [299, 249], [299, 75], [299, 290], [299, 155], [300, 299], [301, 298], [302, 301], [302, 560], [302, 476], [302, 60], [303, 302], [304, 37], [305, 304], [305, 303], [306, 305], [307, 47], [309, 34], [310, 309], [310, 307], [311, 303], [312, 310], [313, 311], [313, 312], [314, 313], [315, 37], [316, 315], [316, 303], [317, 316], [318, 317], [319, 311], [319, 318], [320, 40], [321, 320], [321, 303], [322, 321], [322, 320], [323, 322], [323, 319], [324, 323], [325, 324], [326, 297], [327, 326], [329, 328], [330, 314], [331, 330], [333, 329], [333, 332], [334, 333], [335, 37], [336, 335], [336, 303], [337, 336], [338, 51], [340, 28], [341, 338], [341, 340], [342, 314], [343, 342], [343, 67], [343, 255], [344, 297], [345, 67], [345, 331], [345, 344], [346, 44], [347, 341], [348, 28], [349, 346], [350, 347], [351, 348], [353, 352], [354, 353], [355, 354], [356, 355], [357, 356], [358, 415], [358, 288], [358, 74], [358, 151], [358, 137], [358, 248], [359, 329], [360, 417], [360, 290], [360, 155], [360, 249], [360, 75], [361, 360], [362, 361], [364, 363], [365, 359], [366, 364], [366, 365], [367, 366], [368, 367], [369, 354], [370, 369], [371, 357], [372, 368], [372, 371], [373, 372], [374, 354], [375, 374], [377, 297], [378, 377], [380, 379], [380, 253], [380, 350], [381, 28], [382, 297], [383, 10], [384, 57], [385, 383], [386, 384], [387, 386], [388, 387], [389, 329], [389, 272], [389, 359], [390, 379], [391, 390], [392, 391], [394, 393], [395, 389], [396, 395], [396, 394], [397, 396], [398, 288], [398, 375], [398, 151], [398, 137], [398, 415], [398, 248], [398, 74], [399, 389], [400, 417], [400, 290], [400, 155], [400, 249], [400, 75], [400, 376], [401, 400], [402, 401], [404, 403], [405, 399], [406, 404], [406, 405], [407, 406], [408, 407], [409, 387], [410, 409], [411, 397], [412, 408], [412, 411], [413, 412], [414, 387], [415, 414], [416, 379], [417, 416], [418, 297], [419, 418], [420, 31], [421, 164], [421, 420], [421, 297], [421, 162], [421, 496], [421, 571], [421, 72], [422, 421], [425, 417], [425, 376], [425, 249], [425, 290], [425, 155], [425, 75], [426, 425], [427, 378], [427, 251], [427, 419], [427, 153], [427, 292], [427, 78], [428, 427], [428, 34], [429, 428], [430, 417], [430, 290], [430, 155], [430, 249], [430, 75], [430, 376], [431, 430], [432, 429], [433, 431], [433, 432], [434, 433], [435, 434], [436, 37], [437, 436], [437, 435], [438, 437], [439, 435], [440, 47], [441, 440], [441, 439], [443, 435], [444, 34], [445, 443], [445, 444], [446, 445], [446, 441], [447, 37], [448, 447], [448, 435], [449, 448], [450, 55], [452, 44], [453, 452], [453, 450], [455, 153], [455, 292], [455, 251], [455, 78], [455, 378], [455, 419], [455, 455], [456, 456], [456, 446], [457, 151], [457, 137], [457, 415], [457, 248], [457, 457], [457, 74], [457, 288], [457, 375], [458, 24], [458, 498], [458, 573], [459, 378], [459, 419], [459, 153], [459, 292], [459, 251], [459, 78], [459, 455], [459, 458], [460, 459], [461, 453], [462, 461], [462, 456], [462, 446], [463, 462], [464, 378], [464, 419], [464, 153], [464, 292], [464, 251], [464, 78], [464, 455], [465, 464], [466, 67], [466, 465], [467, 456], [467, 446], [468, 467], [469, 468], [469, 67], [470, 466], [470, 469], [471, 470], [472, 476], [472, 60], [472, 560], [473, 472], [474, 417], [474, 376], [474, 249], [474, 290], [474, 155], [474, 75], [475, 474], [476, 475], [479, 419], [479, 378], [479, 251], [479, 78], [479, 455], [479, 153], [479, 292], [480, 479], [480, 573], [480, 24], [480, 498], [481, 480], [482, 151], [482, 137], [482, 375], [482, 457], [482, 415], [482, 248], [482, 74], [482, 288], [483, 139], [483, 431], [483, 380], [483, 482], [483, 67], [483, 253], [484, 290], [484, 155], [484, 75], [484, 417], [484, 376], [484, 249], [485, 484], [486, 24], [486, 498], [486, 573], [487, 481], [488, 12], [489, 483], [490, 485], [491, 488], [493, 153], [493, 292], [493, 78], [493, 378], [493, 251], [493, 419], [493, 455], [494, 74], [494, 288], [494, 375], [494, 457], [494, 151], [494, 137], [494, 415], [494, 248], [495, 494], [495, 493], [496, 495], [497, 496], [498, 497], [500, 571], [500, 496], [501, 500], [501, 34], [502, 558], [502, 501], [502, 473], [502, 63], [503, 502], [504, 37], [505, 504], [505, 503], [506, 505], [507, 47], [509, 34], [510, 507], [510, 509], [511, 503], [512, 510], [513, 512], [513, 511], [514, 513], [515, 37], [516, 503], [516, 515], [517, 516], [518, 517], [519, 511], [519, 518], [520, 40], [521, 503], [521, 520], [522, 521], [522, 520], [523, 519], [523, 522], [524, 523], [525, 524], [526, 571], [526, 496], [527, 526], [529, 528], [530, 514], [531, 530], [533, 532], [533, 529], [534, 533], [535, 37], [536, 535], [536, 503], [537, 536], [538, 51], [540, 28], [541, 540], [541, 538], [542, 514], [543, 567], [543, 542], [543, 487], [543, 67], [544, 571], [544, 496], [545, 67], [545, 531], [545, 544], [546, 44], [547, 541], [548, 28], [549, 546], [550, 547], [551, 548], [553, 552], [554, 553], [555, 63], [555, 473], [555, 558], [556, 555], [557, 560], [557, 60], [557, 476], [558, 557], [559, 556], [560, 559], [561, 554], [562, 561], [562, 67], [562, 550], [563, 573], [563, 498], [564, 12], [565, 562], [568, 564], [570, 554], [571, 571], [571, 570], [571, 496], [572, 571], [573, 572], [574, 31], [575, 571], [575, 496], [575, 574], [576, 575], [577, 31], [578, 571], [578, 162], [578, 496], [578, 72], [578, 577], [579, 578], [580, 14], [581, 60], [581, 476], [581, 560], [582, 581], [582, 580], [583, 14], [584, 581], [584, 583], [584, 582], [585, 63], [585, 473], [585, 558], [586, 585], [586, 584], [587, 28], [588, 587], [588, 573], [588, 24], [588, 498], [591, 588]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/8344e4f2e71647113a4027b2f26417ee1a42cf3c0de632f9252e1b29c5147f05_8344e4f2e71647113a4027b2f26417ee1a42cf3c0de632f9252e1b29c5147f05.jsonl.gz", "strip_func_name": "sub_42C2A7", "query": "\n\n\nsigned __int64 __fastcall sub_42C2A7(__int64 a1, __int64 a2, int *a3, unsigned int *a4, __int64 a5)\n{\n__int64 v5; // rax\nint v6; // ebx\nchar *v7; // rax\n__int64 v8; // rax\nint v9; // ebx\nchar *v10; // rax\nchar *v11; // rax\nint v12; // ebx\nint v13; // ebx\nint v14; // ebx\n__int64 v15; // rax\nint v16; // ebx\nchar *v17; // rax\nchar *v18; // rax\nint v19; // ebx\nint v20; // ebx\nint v21; // ebx\nunsigned __int64 v22; // rax\nunsigned int *v23; // rax\n__int64 v24; // rax\nint v25; // ebx\nchar *v26; // rax\nchar *v27; // rax\n__int64 v29; // [rsp+38h] [rbp-1B8h] BYREF\n__int64 v30; // [rsp+40h] [rbp-1B0h] BYREF\n__int64 v31[2]; // [rsp+48h] [rbp-1A8h] BYREF\nunsigned int *v32; // [rsp+58h] [rbp-198h]\n__int64 v33; // [rsp+60h] [rbp-190h]\nunsigned int v34; // [rsp+6Ch] [rbp-184h]\n__int64 v35; // [rsp+70h] [rbp-180h]\nunsigned __int64 v36; // [rsp+78h] [rbp-178h]\nunsigned __int64 v37; // [rsp+80h] [rbp-170h]\nunsigned int v38; // [rsp+8Ch] [rbp-164h]\nint v39; // [rsp+90h] [rbp-160h]\nint v40; // [rsp+94h] [rbp-15Ch]\nunsigned __int64 v41; // [rsp+98h] [rbp-158h]\nint v42; // [rsp+A0h] [rbp-150h]\nint v43; // [rsp+A4h] [rbp-14Ch]\nunsigned __int64 v44; // [rsp+A8h] [rbp-148h]\nchar *v45; // [rsp+B0h] [rbp-140h]\nunsigned int *v46; // [rsp+B8h] [rbp-138h]\n__int64 v47; // [rsp+C0h] [rbp-130h]\nunsigned int v48; // [rsp+CCh] [rbp-124h]\nint v49; // [rsp+D0h] [rbp-120h]\nint v50; // [rsp+D4h] [rbp-11Ch]\nunsigned __int64 v51; // [rsp+D8h] [rbp-118h]\nint v52; // [rsp+E0h] [rbp-110h]\nint v53; // [rsp+E4h] [rbp-10Ch]\nunsigned __int64 v54; // [rsp+E8h] [rbp-108h]\nchar *v55; // [rsp+F0h] [rbp-100h]\nunsigned int *v56; // [rsp+F8h] [rbp-F8h]\n__int64 v57; // [rsp+100h] [rbp-F0h]\nunsigned int v58; // [rsp+10Ch] [rbp-E4h]\nunsigned __int64 v59; // [rsp+110h] [rbp-E0h]\nchar *v60; // [rsp+118h] [rbp-D8h]\nunsigned int *v61; // [rsp+120h] [rbp-D0h]\n__int64 v62; // [rsp+128h] [rbp-C8h]\nunsigned int v63; // [rsp+130h] [rbp-C0h]\nint v64; // [rsp+134h] [rbp-BCh]\nunsigned int *v65; // [rsp+138h] [rbp-B8h]\n__int64 v66; // [rsp+140h] [rbp-B0h]\nunsigned __int64 v67; // [rsp+148h] [rbp-A8h]\nunsigned int v68; // [rsp+150h] [rbp-A0h]\nunsigned int v69; // [rsp+154h] [rbp-9Ch]\nchar *(__fastcall *v70)(__int64, unsigned int *, unsigned __int64, __int64 *); // [rsp+158h] [rbp-98h]\nunsigned int *v71; // [rsp+160h] [rbp-90h]\nunsigned __int64 v72; // [rsp+168h] [rbp-88h]\n__int64 v73; // [rsp+170h] [rbp-80h]\nunsigned int *v74; // [rsp+178h] [rbp-78h]\nunsigned int v75; // [rsp+180h] [rbp-70h]\nunsigned int v76; // [rsp+184h] [rbp-6Ch]\n__int64 v77; // [rsp+188h] [rbp-68h]\nunsigned __int64 v78; // [rsp+190h] [rbp-60h]\nchar *v79; // [rsp+198h] [rbp-58h]\nchar *i; // [rsp+1A0h] [rbp-50h]\nunsigned int *v81; // [rsp+1A8h] [rbp-48h]\nunsigned int *v82; // [rsp+1B0h] [rbp-40h]\n__int64 v83; // [rsp+1B8h] [rbp-38h]\nunsigned int *v84; // [rsp+1C0h] [rbp-30h]\n_DWORD *v85; // [rsp+1C8h] [rbp-28h]\n__int64 v86; // [rsp+1D0h] [rbp-20h]\n__int64 v87; // [rsp+1D8h] [rbp-18h]\n\nv87 = a1;\nv86 = a2;\nv85 = a3;\nv84 = a4;\nv83 = a5;\nv82 = a4;\nv81 = a4;\ni = (char *)a4;\nv79 = (char *)a4 + a5;\nv78 = (unsigned __int64)a4 + a5 - 8;\nv77 = *(_QWORD *)(a1 + 8);\nv76 = *(_DWORD *)(a1 + 24);\nv75 = *(_DWORD *)(a1 + 28);\nv74 = (unsigned int *)(v76 + v77);\nv73 = *(_QWORD *)(a1 + 16);\nv72 = v76 + v73;\nv71 = (unsigned int *)(v75 + v73);\nv70 = sub_424320;\nv69 = *a3;\nv68 = a3[1];\n*(_DWORD *)(a1 + 40) = *(_DWORD *)(a1 + 36);\nv81 = (unsigned int *)((char *)v81 + (v81 == v74));\nwhile ( v78 > (unsigned __int64)v81 )\n{\nv67 = 0LL;\nv66 = 0LL;\nv65 = (unsigned int *)((char *)v81 + 1);\nv64 = (_DWORD)v81 - v77;\nv63 = (_DWORD)v81 - v77 - v69 + 1;\nif ( v76 <= v63 )\nv5 = v77;\nelse\nv5 = v73;\nv62 = v5;\nv61 = (unsigned int *)(v63 + v5);\nif ( v76 - v63 - 1 > 2 && v75 < v63 )\n{\nv6 = sub_422772((unsigned int *)((char *)v81 + 1));\nif ( v6 == (unsigned int)sub_422772(v61) )\n{\nif ( v76 <= v63 )\nv7 = v79;\nelse\nv7 = (char *)v72;\nv60 = v7;\nv67 = (unsigned __int64)(sub_422BC5(\n(unsigned __int64)v81 + 5,\n(__int64)(v61 + 1),\n(unsigned __int64)v79,\nv7,\n(__int64)v74)\n+ 4);\n}\n}\nv31[0] = 999999999LL;\nv59 = (__int64)v70(v87, v81, (unsigned __int64)v79, v31);\nif ( v59 > v67 )\n{\nv67 = v59;\nv65 = v81;\nv66 = v31[0];\n}\nif ( v67 > 3 )\n{\nwhile ( v78 > (unsigned __int64)v81 )\n{\nv81 = (unsigned int *)((char *)v81 + 1);\n++v64;\nif ( v66 )\n{\nv58 = v64 - v69;\nv8 = v76 <= v64 - v69 ? v77 : v73;\nv57 = v8;\nv56 = (unsigned int *)(v58 + v8);\nif ( v76 - v58 - 1 > 2 && v75 < v58 )\n{\nv9 = sub_422772(v81);\nif ( v9 == (unsigned int)sub_422772(v56) )\n{\nv10 = v76 <= v58 ? v79 : v72;\nv55 = v10;\nv11 = sub_422BC5(\n(unsigned __int64)(v81 + 1),\n(__int64)(v56 + 1),\n(unsigned __int64)v79,\nv10,\n(__int64)v74);\nv54 = (unsigned __int64)(v11 + 4);\nv53 = 3 * ((_DWORD)v11 + 4);\nv12 = 3 * v67;\nv52 = v12 - sub_4228CA((int)v66 + 1) + 1;\nif ( v54 > 3 && v53 > v52 )\n{\nv67 = v54;\nv66 = 0LL;\nv65 = v81;\n}\n}\n}\n}\nv30 = 999999999LL;\nv51 = (__int64)v70(v87, v81, (unsigned __int64)v79, &v30);\nv13 = 4 * v51;\nv50 = v13 - sub_4228CA((int)v30 + 1);\nv14 = 4 * v67;\nv49 = v14 - sub_4228CA((int)v66 + 1) + 4;\nif ( v51 <= 3 || v50 <= v49 )\n{\nif ( v78 <= (unsigned __int64)v81 )\nbreak;\nv81 = (unsigned int *)((char *)v81 + 1);\n++v64;\nif ( v66 )\n{\nv48 = v64 - v69;\nv15 = v76 <= v64 - v69 ? v77 : v73;\nv47 = v15;\nv46 = (unsigned int *)(v48 + v15);\nif ( v76 - v48 - 1 > 2 && v75 < v48 )\n{\nv16 = sub_422772(v81);\nif ( v16 == (unsigned int)sub_422772(v46) )\n{\nv17 = v76 <= v48 ? v79 : v72;\nv45 = v17;\nv18 = sub_422BC5(\n(unsigned __int64)(v81 + 1),\n(__int64)(v46 + 1),\n(unsigned __int64)v79,\nv17,\n(__int64)v74);\nv44 = (unsigned __int64)(v18 + 4);\nv43 = 4 * ((_DWORD)v18 + 4);\nv19 = 4 * v67;\nv42 = v19 - sub_4228CA((int)v66 + 1) + 1;\nif ( v44 > 3 && v43 > v42 )\n{\nv67 = v44;\nv66 = 0LL;\nv65 = v81;\n}\n}\n}\n}\nv29 = 999999999LL;\nv41 = (__int64)v70(v87, v81, (unsigned __int64)v79, &v29);\nv20 = 4 * v41;\nv40 = v20 - sub_4228CA((int)v29 + 1);\nv21 = 4 * v67;\nv39 = v21 - sub_4228CA((int)v66 + 1) + 7;\nif ( v41 <= 3 || v40 <= v39 )\nbreak;\nv67 = v41;\nv66 = v29;\nv65 = v81;\n}\nelse\n{\nv67 = v51;\nv66 = v30;\nv65 = v81;\n}\n}\nif ( v66 )\n{\nv38 = (_DWORD)v65 - v77 - v66 + 2;\nif ( v76 <= v38 )\nv22 = v38 + v77;\nelse\nv22 = v38 + v73;\nv37 = v22;\nif ( v76 <= v38 )\nv23 = v74;\nelse\nv23 = v71;\nv36 = (unsigned __int64)v23;\nwhile ( i < (char *)v65 && v36 < v37 && *((_BYTE *)v65 - 1) == *(_BYTE *)(v37 - 1) )\n{\nv65 = (unsigned int *)((char *)v65 - 1);\n--v37;\n++v67;\n}\nv68 = v69;\nv69 = v66 - 2;\n}\nv35 = (char *)v65 - i;\nsub_4228E3(v86, (char *)v65 - i, i, v66, v67 - 3);\nv81 = (unsigned int *)((char *)v65 + v67);\nfor ( i = (char *)v65 + v67; v78 >= (unsigned __int64)v81; i = (char *)v81 )\n{\nv34 = (_DWORD)v81 - v77 - v68;\nv24 = v76 <= v34 ? v77 : v73;\nv33 = v24;\nv32 = (unsigned int *)(v34 + v24);\nif ( v76 - v34 - 1 <= 2 || v75 >= v34 )\nbreak;\nv25 = sub_422772(v81);\nif ( v25 != (unsigned int)sub_422772(v32) )\nbreak;\nif ( v76 <= v34 )\nv26 = v79;\nelse\nv26 = (char *)v72;\nv31[1] = (__int64)v26;\nv27 = sub_422BC5((unsigned __int64)(v81 + 1), (__int64)(v32 + 1), (unsigned __int64)v79, v26, (__int64)v74);\nv67 = (unsigned __int64)(v27 + 4);\nv66 = v68;\nv68 = v69;\nv69 = v66;\nsub_4228E3(v86, 0LL, i, 0, (unsigned __int64)(v27 + 1));\nv81 = (unsigned int *)((char *)v81 + v67);\n}\n}\nelse\n{\nv81 = (unsigned int *)((char *)v81 + (((char *)v81 - i) >> 8) + 1);\n}\n}\n*v85 = v69;\nv85[1] = v68;\nreturn v79 - i;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,sub_42C2A7,sub_424320,sub_422772,sub_422BC5,sub_4228CA,sub_4228E3,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'rep', 'a4': 'src', 'a1': 'ms', 'a2': 'seqStore', 'a5': 'srcSize', 'sub_42C2A7': 'ZSTD_compressBlock_btlazy2_extDict', 'sub_424320': 'ZSTD_BtFindBestMatch_extDict_selectMLS', 'sub_422772': 'MEM_read32_3', 'sub_422BC5': 'ZSTD_count_2segments_1', 'sub_4228CA': 'ZSTD_highbit32_0', 'sub_4228E3': 'ZSTD_storeSeq_1'}"} |
|
yak_ch_insert_list | ef51392ea5fd9f4dacb96fef7ba6bb3c169d6987ba53b39bf879c7d29271babd | lh3 | yak | NA | int yak_ch_insert_list(yak_ch_t *h, int create_new, int n, const uint64_t *a)
{
int j, mask = (1<<h->pre) - 1, n_ins = 0;
yak_ch1_t *g;
if (n == 0) return 0;
g = &h->h[a[0]&mask];
for (j = 0; j < n; ++j) {
int ins = 1, absent;
uint64_t x = a[j] >> h->pre;
khint_t k;
if ((a[j]&mask) != (a[0]&mask)) continue;
if (create_new) {
if (g->b)
ins = (yak_bf_insert(g->b, x) == h->n_hash);
if (ins) {
k = yak_ht_put(g->h, x<<YAK_COUNTER_BITS, &absent);
if (absent) ++n_ins;
if ((kh_key(g->h, k)&YAK_MAX_COUNT) < YAK_MAX_COUNT)
++kh_key(g->h, k);
}
} else {
k = yak_ht_get(g->h, x<<YAK_COUNTER_BITS);
if (k != kh_end(g->h) && (kh_key(g->h, k)&YAK_MAX_COUNT) < YAK_MAX_COUNT)
++kh_key(g->h, k);
}
}
return n_ins;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403959", "function_addr": 4208985, "binary_name": "ef51392ea5fd9f4dacb96fef7ba6bb3c169d6987ba53b39bf879c7d29271babd.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_38], rdi"], [4, "mov [rbp+var_3C], esi"], [5, "mov [rbp+var_40], edx"], [6, "mov [rbp+var_48], rcx"], [7, "mov rax, [rbp+var_38]"], [8, "mov eax, [rax+4]"], [9, "mov edx, 1"], [10, "mov ecx, eax"], [11, "shl edx, cl"], [12, "mov eax, edx"], [13, "sub eax, 1"], [14, "mov [rbp+var_10], eax"], [15, "mov [rbp+var_8], 0"], [16, "cmp [rbp+var_40], 0"], [17, "jnz short loc_40399E"], [18, "mov eax, 0"], [19, "jmp locret_403B9F"], [20, "mov rax, [rbp+var_38]"], [21, "mov rdx, [rax+18h]"], [22, "mov rax, [rbp+var_48]"], [23, "mov rcx, [rax]"], [24, "mov eax, [rbp+var_10]"], [25, "cdqe"], [26, "and rax, rcx"], [27, "shl rax, 4"], [28, "add rax, rdx"], [29, "mov [rbp+var_18], rax"], [30, "mov [rbp+var_4], 0"], [31, "jmp loc_403B90"], [32, "mov [rbp+var_C], 1"], [33, "mov eax, [rbp+var_4]"], [34, "cdqe"], [35, "lea rdx, ds:0[rax*8]"], [36, "mov rax, [rbp+var_48]"], [37, "add rax, rdx"], [38, "mov rdx, [rax]"], [39, "mov rax, [rbp+var_38]"], [40, "mov eax, [rax+4]"], [41, "mov ecx, eax"], [42, "shr rdx, cl"], [43, "mov rax, rdx"], [44, "mov [rbp+var_20], rax"], [45, "mov eax, [rbp+var_4]"], [46, "cdqe"], [47, "lea rdx, ds:0[rax*8]"], [48, "mov rax, [rbp+var_48]"], [49, "add rax, rdx"], [50, "mov rdx, [rax]"], [51, "mov rax, [rbp+var_48]"], [52, "mov rax, [rax]"], [53, "xor rdx, rax"], [54, "mov eax, [rbp+var_10]"], [55, "cdqe"], [56, "and rax, rdx"], [57, "test rax, rax"], [58, "jnz loc_403B8B"], [59, "cmp [rbp+var_3C], 0"], [60, "jz loc_403AF5"], [61, "mov rax, [rbp+var_18]"], [62, "mov rax, [rax+8]"], [63, "test rax, rax"], [64, "jz short loc_403A6F"], [65, "mov rax, [rbp+var_18]"], [66, "mov rax, [rax+8]"], [67, "mov rdx, [rbp+var_20]"], [68, "mov rsi, rdx"], [69, "mov rdi, rax"], [70, "call sub_402BD6"], [71, "mov rdx, [rbp+var_38]"], [72, "mov edx, [rdx+8]"], [73, "cmp eax, edx"], [74, "setz al"], [75, "movzx eax, al"], [76, "mov [rbp+var_C], eax"], [77, "cmp [rbp+var_C], 0"], [78, "jz loc_403B8C"], [79, "mov rax, [rbp+var_20]"], [80, "shl rax, 0Ah"], [81, "mov rcx, rax"], [82, "mov rax, [rbp+var_18]"], [83, "mov rax, [rax]"], [84, "lea rdx, [rbp+var_28]"], [85, "mov rsi, rcx"], [86, "mov rdi, rax"], [87, "call sub_4036C8"], [88, "mov [rbp+var_24], eax"], [89, "mov eax, [rbp+var_28]"], [90, "test eax, eax"], [91, "jz short loc_403AA8"], [92, "add [rbp+var_8], 1"], [93, "mov rax, [rbp+var_18]"], [94, "mov rax, [rax]"], [95, "mov rdx, [rax+10h]"], [96, "mov eax, [rbp+var_24]"], [97, "shl rax, 3"], [98, "add rax, rdx"], [99, "mov rax, [rax]"], [100, "and eax, 3FFh"], [101, "cmp rax, 3FEh"], [102, "ja loc_403B8C"], [103, "mov rax, [rbp+var_18]"], [104, "mov rax, [rax]"], [105, "mov rdx, [rax+10h]"], [106, "mov eax, [rbp+var_24]"], [107, "shl rax, 3"], [108, "add rax, rdx"], [109, "mov rdx, [rax]"], [110, "add rdx, 1"], [111, "mov [rax], rdx"], [112, "jmp loc_403B8C"], [113, "mov rax, [rbp+var_20]"], [114, "shl rax, 0Ah"], [115, "mov rdx, rax"], [116, "mov rax, [rbp+var_18]"], [117, "mov rax, [rax]"], [118, "mov rsi, rdx"], [119, "mov rdi, rax"], [120, "call sub_403679"], [121, "mov [rbp+var_24], eax"], [122, "mov rax, [rbp+var_18]"], [123, "mov rax, [rax]"], [124, "mov rax, [rax+10h]"], [125, "test rax, rax"], [126, "jz short loc_403B3B"], [127, "mov rax, [rbp+var_18]"], [128, "mov rax, [rax]"], [129, "mov eax, [rax]"], [130, "mov edx, 1"], [131, "mov ecx, eax"], [132, "shl edx, cl"], [133, "mov eax, edx"], [134, "jmp short loc_403B40"], [135, "mov eax, 0"], [136, "cmp eax, [rbp+var_24]"], [137, "jz short loc_403B8C"], [138, "mov rax, [rbp+var_18]"], [139, "mov rax, [rax]"], [140, "mov rdx, [rax+10h]"], [141, "mov eax, [rbp+var_24]"], [142, "shl rax, 3"], [143, "add rax, rdx"], [144, "mov rax, [rax]"], [145, "and eax, 3FFh"], [146, "cmp rax, 3FEh"], [147, "ja short loc_403B8C"], [148, "mov rax, [rbp+var_18]"], [149, "mov rax, [rax]"], [150, "mov rdx, [rax+10h]"], [151, "mov eax, [rbp+var_24]"], [152, "shl rax, 3"], [153, "add rax, rdx"], [154, "mov rdx, [rax]"], [155, "add rdx, 1"], [156, "mov [rax], rdx"], [157, "jmp short loc_403B8C"], [158, "nop"], [159, "add [rbp+var_4], 1"], [160, "mov eax, [rbp+var_4]"], [161, "cmp eax, [rbp+var_40]"], [162, "jl loc_4039CC"], [163, "mov eax, [rbp+var_8]"], [164, "leave"], [165, "retn"]], "data_dep": [[7, 3], [8, 7], [10, 8], [11, 9], [11, 10], [12, 11], [13, 12], [14, 13], [16, 5], [17, 16], [20, 3], [21, 20], [22, 6], [23, 22], [24, 14], [26, 23], [26, 24], [27, 26], [28, 21], [28, 27], [29, 28], [33, 159], [33, 30], [35, 115], [35, 72], [35, 21], [35, 140], [35, 53], [35, 110], [35, 132], [35, 155], [35, 95], [36, 6], [37, 35], [37, 36], [38, 111], [38, 37], [38, 156], [39, 3], [40, 111], [40, 156], [40, 39], [41, 40], [42, 41], [42, 38], [43, 42], [44, 43], [45, 30], [45, 159], [47, 42], [48, 6], [49, 48], [49, 47], [50, 111], [50, 49], [50, 156], [51, 6], [52, 51], [52, 156], [52, 111], [53, 50], [53, 52], [54, 14], [56, 53], [56, 54], [57, 56], [58, 57], [59, 4], [60, 59], [61, 29], [62, 156], [62, 61], [62, 111], [63, 62], [64, 63], [65, 29], [66, 111], [66, 65], [66, 156], [67, 44], [68, 67], [69, 66], [71, 3], [72, 111], [72, 156], [72, 71], [73, 70], [73, 72], [74, 73], [74, 70], [75, 74], [76, 75], [77, 76], [77, 32], [78, 77], [79, 44], [80, 79], [81, 80], [82, 29], [83, 82], [83, 111], [83, 156], [84, 72], [84, 53], [85, 81], [86, 83], [88, 87], [90, 89], [91, 90], [92, 15], [92, 92], [93, 29], [94, 93], [94, 111], [94, 156], [95, 111], [95, 156], [95, 94], [96, 88], [97, 96], [98, 95], [98, 97], [99, 111], [99, 156], [99, 98], [100, 99], [101, 100], [102, 101], [103, 29], [104, 111], [104, 156], [104, 103], [105, 111], [105, 104], [105, 156], [106, 88], [107, 106], [108, 105], [108, 107], [109, 108], [109, 156], [109, 111], [110, 109], [111, 110], [111, 108], [113, 44], [114, 113], [115, 114], [116, 29], [117, 156], [117, 116], [117, 111], [118, 115], [119, 117], [121, 120], [122, 29], [123, 111], [123, 122], [123, 156], [124, 111], [124, 156], [124, 123], [125, 124], [126, 125], [127, 29], [128, 156], [128, 127], [128, 111], [129, 128], [129, 111], [129, 156], [131, 129], [132, 130], [132, 131], [133, 132], [136, 121], [136, 135], [136, 133], [137, 136], [138, 29], [139, 156], [139, 111], [139, 138], [140, 139], [140, 111], [140, 156], [141, 121], [142, 141], [143, 142], [143, 140], [144, 143], [144, 111], [144, 156], [145, 144], [146, 145], [147, 146], [148, 29], [149, 148], [149, 111], [149, 156], [150, 111], [150, 156], [150, 149], [151, 121], [152, 151], [153, 150], [153, 152], [154, 111], [154, 156], [154, 153], [155, 154], [156, 153], [156, 155], [159, 159], [159, 30], [160, 30], [160, 159], [161, 5], [161, 160], [162, 161], [163, 15], [163, 92], [165, 163], [165, 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/ef51392ea5fd9f4dacb96fef7ba6bb3c169d6987ba53b39bf879c7d29271babd_ef51392ea5fd9f4dacb96fef7ba6bb3c169d6987ba53b39bf879c7d29271babd.jsonl.gz", "strip_func_name": "sub_403959", "query": "\n\n\n__int64 __fastcall sub_403959(__int64 a1, int a2, int a3, _QWORD *a4)\n{\n_QWORD *v5; // rax\nint v6; // eax\n_QWORD *v7; // rax\nint v10; // [rsp+28h] [rbp-28h] BYREF\nunsigned int v11; // [rsp+2Ch] [rbp-24h]\nunsigned __int64 v12; // [rsp+30h] [rbp-20h]\n__int64 *v13; // [rsp+38h] [rbp-18h]\nint v14; // [rsp+40h] [rbp-10h]\n_BOOL4 v15; // [rsp+44h] [rbp-Ch]\nunsigned int v16; // [rsp+48h] [rbp-8h]\nint i; // [rsp+4Ch] [rbp-4h]\n\nv14 = (1 << *(_DWORD *)(a1 + 4)) - 1;\nv16 = 0;\nif ( !a3 )\nreturn 0LL;\nv13 = (__int64 *)(*(_QWORD *)(a1 + 24) + 16 * (*a4 & v14));\nfor ( i = 0; i < a3; ++i )\n{\nv15 = 1;\nv12 = a4[i] >> *(_DWORD *)(a1 + 4);\nif ( ((*a4 ^ a4[i]) & v14) == 0LL )\n{\nif ( a2 )\n{\nif ( v13[1] )\nv15 = sub_402BD6(v13[1], v12) == *(_DWORD *)(a1 + 8);\nif ( v15 )\n{\nv11 = sub_4036C8(*v13, v12 << 10, &v10);\nif ( v10 )\n++v16;\nif ( (*(_QWORD *)(*(_QWORD *)(*v13 + 16) + 8LL * v11) & 0x3FFLL) != 1023 )\n{\nv5 = (_QWORD *)(*(_QWORD *)(*v13 + 16) + 8LL * v11);\n++*v5;\n}\n}\n}\nelse\n{\nv11 = sub_403679((int *)*v13, v12 << 10);\nif ( *(_QWORD *)(*v13 + 16) )\nv6 = 1 << *(_DWORD *)*v13;\nelse\nv6 = 0;\nif ( v6 != v11 && (*(_QWORD *)(*(_QWORD *)(*v13 + 16) + 8LL * v11) & 0x3FFLL) != 1023 )\n{\nv7 = (_QWORD *)(*(_QWORD *)(*v13 + 16) + 8LL * v11);\n++*v7;\n}\n}\n}\n}\nreturn v16;\n}\n\n\n\nQ:[a3,a4,a1,a2,v10,v12,v13,v14,v15,v16,sub_403959,sub_402BD6,sub_4036C8,sub_403679,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'n', 'a4': 'a', 'a1': 'h', 'a2': 'create_new', 'v10': 'absent', 'v12': 'x', 'v13': 'g', 'v14': 'mask', 'v15': 'ins', 'v16': 'n_ins', 'sub_403959': 'yak_ch_insert_list', 'sub_402BD6': 'yak_bf_insert', 'sub_4036C8': 'yak_ht_put', 'sub_403679': 'yak_ht_get'}"} |
|
adjust_shared_perm | f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83 | msysgit | msysgit | NA | int adjust_shared_perm(const char *path)
{
int old_mode, new_mode;
if (!shared_repository)
return 0;
if (get_st_mode_bits(path, &old_mode) < 0)
return -1;
new_mode = calc_shared_perm(old_mode);
if (S_ISDIR(old_mode)) {
/* Copy read bits to execute bits */
new_mode |= (new_mode & 0444) >> 2;
new_mode |= FORCE_DIR_SET_GID;
}
if (((old_mode ^ new_mode) & ~S_IFMT) &&
chmod(path, (new_mode & ~S_IFMT)) < 0)
return -2;
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40A44B", "function_addr": 4236363, "binary_name": "f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+file], rdi"], [4, "mov eax, cs:dword_4FCB48"], [5, "test eax, eax"], [6, "jnz short loc_40A46B"], [7, "mov eax, 0"], [8, "jmp locret_40A4EB"], [9, "lea rdx, [rbp+var_8]"], [10, "mov rax, [rbp+file]"], [11, "mov rsi, rdx"], [12, "mov rdi, rax"], [13, "call sub_40938F"], [14, "test eax, eax"], [15, "jns short loc_40A489"], [16, "mov eax, 0FFFFFFFFh"], [17, "jmp short locret_40A4EB"], [18, "mov eax, [rbp+var_8]"], [19, "mov edi, eax"], [20, "call sub_40A3D6"], [21, "mov [rbp+var_4], eax"], [22, "mov eax, [rbp+var_8]"], [23, "and eax, 0F000h"], [24, "cmp eax, 4000h"], [25, "jnz short loc_40A4B8"], [26, "mov eax, [rbp+var_4]"], [27, "sar eax, 2"], [28, "and eax, 49h"], [29, "or [rbp+var_4], eax"], [30, "or [rbp+var_4], 400h"], [31, "mov eax, [rbp+var_8]"], [32, "xor eax, [rbp+var_4]"], [33, "and ah, 0Fh"], [34, "test eax, eax"], [35, "jz short loc_40A4E6"], [36, "mov eax, [rbp+var_4]"], [37, "and ah, 0Fh"], [38, "mov edx, eax"], [39, "mov rax, [rbp+file]"], [40, "mov esi, edx"], [41, "mov rdi, rax"], [42, "call _chmod"], [43, "test eax, eax"], [44, "jns short loc_40A4E6"], [45, "mov eax, 0FFFFFFFEh"], [46, "jmp short locret_40A4EB"], [47, "mov eax, 0"], [48, "leave"], [49, "retn"]], "data_dep": [[5, 4], [6, 5], [10, 3], [11, 9], [12, 10], [14, 13], [15, 14], [19, 18], [21, 20], [23, 22], [24, 23], [25, 24], [26, 21], [27, 26], [28, 27], [29, 28], [29, 21], [30, 29], [32, 31], [32, 21], [32, 30], [33, 32], [34, 33], [35, 34], [36, 21], [36, 30], [37, 36], [38, 37], [39, 3], [40, 38], [41, 39], [43, 42], [44, 43], [49, 47], [49, 7], [49, 16], [49, 45]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83_f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83.jsonl.gz", "strip_func_name": "sub_40A44B", "query": "\n\n\n__int64 __fastcall sub_40A44B(char *a1)\n{\n__int64 result; // rax\n__mode_t v2; // eax\n__mode_t v3; // eax\nint v4; // [rsp+18h] [rbp-8h] BYREF\nint v5; // [rsp+1Ch] [rbp-4h]\n\nif ( !dword_4FCB48 )\nreturn 0LL;\nif ( (int)sub_40938F(a1, (__mode_t *)&v4) < 0 )\nreturn 0xFFFFFFFFLL;\nv5 = sub_40A3D6(v4);\nif ( (v4 & 0xF000) == 0x4000 )\n{\nv5 |= (v5 >> 2) & 0x49;\nv5 |= 0x400u;\n}\nv2 = v5 ^ v4;\nBYTE1(v2) = ((unsigned __int16)(v5 ^ v4) >> 8) & 0xF;\nif ( v2 && (v3 = v5, BYTE1(v3) = BYTE1(v5) & 0xF, chmod(a1, v3) < 0) )\nresult = 4294967294LL;\nelse\nresult = 0LL;\nreturn result;\n}\n\n\n\nQ:[a1,v3,v4,v5,sub_40A44B,sub_40938F,sub_40A3D6,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'path', 'v3': 'result', 'v4': 'old_mode', 'v5': 'new_mode', 'sub_40A44B': 'adjust_shared_perm', 'sub_40938F': 'get_st_mode_bits', 'sub_40A3D6': 'calc_shared_perm'}"} |
|
FSE_buildCTable_rle | 412a748ca3e7e87ecea1502eee0b4f852f30ff2f7299cc26808b6de39fdb91dd | dimkr | szl | NA | size_t FSE_buildCTable_rle (FSE_CTable* ct, BYTE symbolValue)
{
void* ptr = ct;
U16* tableU16 = ( (U16*) ptr) + 2;
void* FSCTptr = (U32*)ptr + 2;
FSE_symbolCompressionTransform* symbolTT = (FSE_symbolCompressionTransform*) FSCTptr;
/* header */
tableU16[-2] = (U16) 0;
tableU16[-1] = (U16) symbolValue;
/* Build table */
tableU16[0] = 0;
tableU16[1] = 0; /* just in case */
/* Build Symbol Transformation Table */
symbolTT[symbolValue].deltaNbBits = 0;
symbolTT[symbolValue].deltaFindState = 0;
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_443CD3", "function_addr": 4472019, "binary_name": "412a748ca3e7e87ecea1502eee0b4f852f30ff2f7299cc26808b6de39fdb91dd.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_28], rdi"], [3, "mov eax, esi"], [4, "mov [rbp+var_2C], al"], [5, "mov rax, [rbp+var_28]"], [6, "mov [rbp+var_8], rax"], [7, "mov rax, [rbp+var_8]"], [8, "add rax, 4"], [9, "mov [rbp+var_10], rax"], [10, "mov rax, [rbp+var_8]"], [11, "add rax, 8"], [12, "mov [rbp+var_18], rax"], [13, "mov rax, [rbp+var_18]"], [14, "mov [rbp+var_20], rax"], [15, "mov rax, [rbp+var_10]"], [16, "sub rax, 4"], [17, "mov word ptr [rax], 0"], [18, "mov rax, [rbp+var_10]"], [19, "lea rdx, [rax-2]"], [20, "movzx eax, [rbp+var_2C]"], [21, "mov [rdx], ax"], [22, "mov rax, [rbp+var_10]"], [23, "mov word ptr [rax], 0"], [24, "mov rax, [rbp+var_10]"], [25, "add rax, 2"], [26, "mov word ptr [rax], 0"], [27, "movzx eax, [rbp+var_2C]"], [28, "lea rdx, ds:0[rax*8]"], [29, "mov rax, [rbp+var_20]"], [30, "add rax, rdx"], [31, "mov dword ptr [rax+4], 0"], [32, "movzx eax, [rbp+var_2C]"], [33, "lea rdx, ds:0[rax*8]"], [34, "mov rax, [rbp+var_20]"], [35, "add rax, rdx"], [36, "mov dword ptr [rax], 0"], [37, "mov eax, 0"], [38, "pop rbp"], [39, "retn"]], "data_dep": [[4, 3], [5, 2], [6, 5], [7, 6], [8, 7], [9, 8], [10, 6], [11, 10], [12, 11], [13, 12], [14, 13], [15, 9], [16, 15], [17, 16], [18, 9], [19, 18], [19, 17], [20, 4], [21, 19], [21, 20], [22, 9], [23, 22], [24, 9], [25, 24], [26, 25], [27, 4], [28, 19], [29, 14], [30, 29], [30, 28], [31, 30], [32, 4], [33, 28], [34, 14], [35, 33], [35, 34], [36, 35], [38, 0], [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/412a748ca3e7e87ecea1502eee0b4f852f30ff2f7299cc26808b6de39fdb91dd_412a748ca3e7e87ecea1502eee0b4f852f30ff2f7299cc26808b6de39fdb91dd.jsonl.gz", "strip_func_name": "sub_443CD3", "query": "\n\n\n__int64 __fastcall sub_443CD3(_WORD *a1, unsigned __int8 a2)\n{\n_WORD *v3; // [rsp+Ch] [rbp-20h]\n\nv3 = a1 + 4;\n*a1 = 0;\na1[1] = a2;\na1[2] = 0;\na1[3] = 0;\n*(_DWORD *)&v3[4 * a2 + 2] = 0;\n*(_DWORD *)&v3[4 * a2] = 0;\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v3,sub_443CD3,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ct', 'a2': 'symbolValue', 'v3': 'symbolTT', 'sub_443CD3': 'FSE_buildCTable_rle'}"} |
|
packed_buffer_extract_du32 | d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f | smcameron | space-nerds-in-space | NA | double packed_buffer_extract_du32(struct packed_buffer *pb, uint32_t scale)
{
return u32tod(packed_buffer_extract_u32(pb), scale);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "packed_buffer_extract_du32", "function_addr": 4259140, "binary_name": "d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_C], esi"], [5, "mov rax, [rbp+var_8]"], [6, "mov rdi, rax"], [7, "call packed_buffer_extract_u32"], [8, "mov edx, eax"], [9, "mov eax, [rbp+var_C]"], [10, "mov esi, eax"], [11, "mov edi, edx"], [12, "call sub_40FBA0"], [13, "movq rax, xmm0"], [14, "movq xmm0, rax"], [15, "leave"], [16, "retn"]], "data_dep": [[5, 3], [6, 5], [8, 7], [9, 4], [10, 9], [11, 8], [14, 13], [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/d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f_d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f.jsonl.gz", "strip_func_name": "packed_buffer_extract_du32", "query": "\n\n\n__int64 __fastcall packed_buffer_extract_du32(__int64 a1, int a2)\n{\nint v2; // eax\n\nv2 = packed_buffer_extract_u32(a1);\nreturn sub_40FBA0(v2, a2);\n}\n\n\n\nQ:[a1,a2,sub_40FBA0,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'pb', 'a2': 'scale', 'sub_40FBA0': 'u32tod'}"} |
|
mm_get_current_position | 2628714fc89bbd06927f17c35c7cc10c3c4f3a82276ea56c58894e172e8f25b3 | smarco | gem3-mapper | NA | uint64_t mm_get_current_position(mm_t* const mem_manager) {
return (mem_manager->cursor-mem_manager->memory);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_44E5E4", "function_addr": 4515300, "binary_name": "2628714fc89bbd06927f17c35c7cc10c3c4f3a82276ea56c58894e172e8f25b3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov rax, [rbp+var_8]"], [4, "mov rdx, [rax+18h]"], [5, "mov rax, [rbp+var_8]"], [6, "mov rcx, [rax+10h]"], [7, "mov rax, rdx"], [8, "sub rax, rcx"], [9, "pop rbp"], [10, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 2], [6, 5], [7, 4], [8, 7], [8, 6], [9, 0], [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/2628714fc89bbd06927f17c35c7cc10c3c4f3a82276ea56c58894e172e8f25b3_2628714fc89bbd06927f17c35c7cc10c3c4f3a82276ea56c58894e172e8f25b3.jsonl.gz", "strip_func_name": "sub_44E5E4", "query": "\n\n\n__int64 __fastcall sub_44E5E4(__int64 a1)\n{\nreturn *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 16);\n}\n\n\n\nQ:[a1,sub_44E5E4,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'mem_manager', 'sub_44E5E4': 'mm_get_current_position'}"} |
|
handle_refs | 3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7 | msysgit | msysgit | NA | static void handle_refs(const char *submodule, struct rev_info *revs, unsigned flags,
int (*for_each)(const char *, each_ref_fn, void *))
{
struct all_refs_cb cb;
init_all_refs_cb(&cb, revs, flags);
for_each(submodule, handle_one_ref, &cb);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_46D3B4", "function_addr": 4641716, "binary_name": "3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_34], edx"], [6, "mov [rbp+var_40], rcx"], [7, "mov edx, [rbp+var_34]"], [8, "mov rcx, [rbp+var_30]"], [9, "lea rax, [rbp+var_20]"], [10, "mov rsi, rcx"], [11, "mov rdi, rax"], [12, "call sub_46D2E8"], [13, "lea rdx, [rbp+var_20]"], [14, "mov rax, [rbp+var_28]"], [15, "mov rcx, [rbp+var_40]"], [16, "mov esi, offset sub_46D230"], [17, "mov rdi, rax"], [18, "call rcx"], [19, "nop"], [20, "leave"], [21, "retn"]], "data_dep": [[7, 5], [8, 4], [10, 8], [11, 9], [13, 7], [14, 3], [15, 6], [17, 14], [18, 15], [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/3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7_3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7.jsonl.gz", "strip_func_name": "sub_46D3B4", "query": "\n\n\n__int64 __fastcall sub_46D3B4(__int64 a1, __int64 a2, int a3, __int64 (__fastcall *a4)(__int64, __int64 (__fastcall *)(char *a1, unsigned __int8 *a2, __int64 a3, unsigned int *a4), char *))\n{\nchar v6[32]; // [rsp+20h] [rbp-20h] BYREF\n\nsub_46D2E8((__int64)v6, a2, a3);\nreturn a4(a1, sub_46D230, v6);\n}\n\n\n\nQ:[a3,a4,a1,a2,v6,sub_46D3B4,sub_46D2E8,sub_46D230,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'flags', 'a4': 'for_each', 'a1': 'submodule', 'a2': 'revs', 'v6': 'cb', 'sub_46D3B4': 'handle_refs', 'sub_46D2E8': 'init_all_refs_cb', 'sub_46D230': 'handle_one_ref_0'}"} |
|
pattern_tiling_next | 2628714fc89bbd06927f17c35c7cc10c3c4f3a82276ea56c58894e172e8f25b3 | smarco | gem3-mapper | NA | void pattern_tiling_next(
pattern_tiling_t* const pattern_tiling) {
// DEBUG
// gem_cond_debug_block(DEBUG_PATTERN_TILE_POSITION) {
// fprintf(stderr,">Tile (pos=%"PRIu64",len=%"PRIu64",tall=%"PRIu64") [distance=%"PRIu64",match_col=%"PRIu64"]\n",
// pattern_tiling->tile_offset,pattern_tiling->tile_wide,pattern_tiling->tile_tall,
// pattern_tiling->tile_distance,pattern_tiling->tile_match_column+pattern_tiling->tile_offset);
// }
// Update tile dimensions
pattern_tiling->tile_offset += pattern_tiling->tile_next_offset_inc;
pattern_tiling->pattern_remaining_length -= pattern_tiling->tile_tall;
// Calculate current tile dimensions
pattern_tiling->tile_next_offset_inc = pattern_tiling->tile_tall;
pattern_tiling->tile_tall = MIN(pattern_tiling->tile_tall,pattern_tiling->pattern_remaining_length);
pattern_tiling->tile_wide = pattern_tiling->pattern_band_width + pattern_tiling->tile_next_offset_inc;
if (pattern_tiling->tile_offset+pattern_tiling->tile_wide > pattern_tiling->sequence_length) {
pattern_tiling->tile_wide = pattern_tiling->sequence_length - pattern_tiling->tile_offset;
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_45F953", "function_addr": 4585811, "binary_name": "2628714fc89bbd06927f17c35c7cc10c3c4f3a82276ea56c58894e172e8f25b3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov rax, [rbp+var_8]"], [4, "mov rdx, [rax]"], [5, "mov rax, [rbp+var_8]"], [6, "mov rax, [rax+18h]"], [7, "add rdx, rax"], [8, "mov rax, [rbp+var_8]"], [9, "mov [rax], rdx"], [10, "mov rax, [rbp+var_8]"], [11, "mov rdx, [rax+48h]"], [12, "mov rax, [rbp+var_8]"], [13, "mov rax, [rax+10h]"], [14, "sub rdx, rax"], [15, "mov rax, [rbp+var_8]"], [16, "mov [rax+48h], rdx"], [17, "mov rax, [rbp+var_8]"], [18, "mov rdx, [rax+10h]"], [19, "mov rax, [rbp+var_8]"], [20, "mov [rax+18h], rdx"], [21, "mov rax, [rbp+var_8]"], [22, "mov rdx, [rax+10h]"], [23, "mov rax, [rbp+var_8]"], [24, "mov rax, [rax+48h]"], [25, "cmp rdx, rax"], [26, "cmova rdx, rax"], [27, "mov rax, [rbp+var_8]"], [28, "mov [rax+10h], rdx"], [29, "mov rax, [rbp+var_8]"], [30, "mov rdx, [rax+20h]"], [31, "mov rax, [rbp+var_8]"], [32, "mov rax, [rax+18h]"], [33, "add rdx, rax"], [34, "mov rax, [rbp+var_8]"], [35, "mov [rax+8], rdx"], [36, "mov rax, [rbp+var_8]"], [37, "mov rdx, [rax]"], [38, "mov rax, [rbp+var_8]"], [39, "mov rax, [rax+8]"], [40, "add rdx, rax"], [41, "mov rax, [rbp+var_8]"], [42, "mov rax, [rax+50h]"], [43, "cmp rdx, rax"], [44, "jbe short loc_45FA12"], [45, "mov rax, [rbp+var_8]"], [46, "mov rdx, [rax+50h]"], [47, "mov rax, [rbp+var_8]"], [48, "mov rax, [rax]"], [49, "sub rdx, rax"], [50, "mov rax, [rbp+var_8]"], [51, "mov [rax+8], rdx"], [52, "nop"], [53, "pop rbp"], [54, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 2], [6, 5], [7, 4], [7, 6], [8, 2], [9, 8], [9, 7], [10, 2], [11, 9], [11, 10], [12, 2], [13, 12], [13, 9], [14, 13], [14, 11], [15, 2], [16, 15], [16, 14], [17, 2], [18, 17], [18, 16], [19, 2], [20, 19], [20, 18], [21, 2], [22, 21], [22, 20], [23, 2], [24, 23], [24, 16], [24, 20], [25, 22], [25, 24], [26, 25], [26, 24], [27, 2], [28, 27], [28, 26], [29, 2], [30, 29], [30, 28], [31, 2], [32, 20], [32, 31], [32, 28], [33, 30], [33, 32], [34, 2], [35, 33], [35, 34], [36, 2], [37, 35], [37, 9], [37, 36], [38, 2], [39, 35], [39, 38], [40, 37], [40, 39], [41, 2], [42, 41], [42, 35], [43, 40], [43, 42], [44, 43], [45, 2], [46, 20], [46, 45], [46, 51], [46, 35], [46, 28], [46, 16], [46, 9], [47, 2], [48, 47], [48, 51], [48, 35], [48, 28], [48, 16], [48, 9], [48, 20], [49, 46], [49, 48], [50, 2], [51, 50], [51, 49], [53, 0], [54, 42], [54, 50]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/2628714fc89bbd06927f17c35c7cc10c3c4f3a82276ea56c58894e172e8f25b3_2628714fc89bbd06927f17c35c7cc10c3c4f3a82276ea56c58894e172e8f25b3.jsonl.gz", "strip_func_name": "sub_45F953", "query": "\n\n\n_QWORD *__fastcall sub_45F953(_QWORD *a1)\n{\nunsigned __int64 v1; // rdx\n_QWORD *result; // rax\n\n*a1 += a1[3];\na1[9] -= a1[2];\na1[3] = a1[2];\nv1 = a1[2];\nif ( v1 > a1[9] )\nv1 = a1[9];\na1[2] = v1;\na1[1] = a1[3] + a1[4];\nresult = (_QWORD *)a1[10];\nif ( a1[1] + *a1 > (unsigned __int64)result )\n{\nresult = a1;\na1[1] = a1[10] - *a1;\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_45F953,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'pattern_tiling', 'sub_45F953': 'pattern_tiling_next'}"} |
|
get_iso9660_filesystem_size | f403d1d8b77541da522a0d0c3deff2e4197be390cb78692e79a5ebc1ff898374 | open-simh | simh | NA | static t_offset get_iso9660_filesystem_size (UNIT *uptr, uint32 physsectsz, t_bool *readonly)
{
DEVICE *dptr;
t_addr saved_capac;
struct disk_context *ctx = (struct disk_context *)uptr->disk_ctx;
t_addr temp_capac = (sim_toffset_64 ? (t_addr)0xFFFFFFFFu : (t_addr)0x7FFFFFFFu); /* Make sure we can access the largest sector */
uint8 sector_buf[2048];
ISO_9660_Volume_Descriptor *Desc = (ISO_9660_Volume_Descriptor *)sector_buf;
uint8 primary_buf[2048];
ISO_9660_Primary_Volume_Descriptor *Primary = NULL;
t_lba sectfactor = sizeof (*Desc) / ctx->sector_size;
t_offset ret_val = (t_offset)-1;
t_offset cur_pos = 32768; /* Beyond the boot area of an ISO 9660 image */
t_seccnt sectsread;
int read_count = 0;
if ((dptr = find_dev_from_unit (uptr)) == NULL)
return ret_val;
saved_capac = uptr->capac;
uptr->capac = temp_capac;
while (sim_disk_rdsect(uptr, (t_lba)(sectfactor * cur_pos / sizeof (*Desc)), (uint8 *)Desc, §sread, sectfactor) == DKSE_OK) {
if ((sectsread != sectfactor) ||
(Desc->Version != 1) ||
(0 != memcmp (Desc->Identifier, "CD001", sizeof (Desc->Identifier))))
break;
if (Desc->Type == 1) { /* Primary Volume Descriptor */
Primary = (ISO_9660_Primary_Volume_Descriptor *)primary_buf;
*Primary = *(ISO_9660_Primary_Volume_Descriptor *)Desc;
}
cur_pos += sizeof (*Desc);
++read_count;
if ((Desc->Type == 255) ||
(read_count >= 32)) {
ret_val = ctx->container_size;
sim_messagef (SCPE_OK, "%s: '%s' Contains an ISO 9660 filesystem\n", sim_uname (uptr), uptr->filename);
if (Primary) {
char VolId[sizeof (Primary->VolumeIdentifier) + 1];
memcpy (VolId, Primary->VolumeIdentifier, sizeof (Primary->VolumeIdentifier));
VolId[sizeof (Primary->VolumeIdentifier)] = '\0';
sim_messagef (SCPE_OK, "%s: Volume Identifier: %s Containing %u %u Byte Sectors\n", sim_uname (uptr), sim_trim_endspc (VolId), (uint32)(ctx->container_size / Primary->LogicalBlockSize[1 - sim_end]), (uint32)Primary->LogicalBlockSize[1 - sim_end]);
}
break;
}
}
uptr->capac = saved_capac;
if (readonly)
*readonly = sim_disk_wrp (uptr) || (ret_val != (t_offset)-1);
return ret_val;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4AAD99", "function_addr": 4894105, "binary_name": "f403d1d8b77541da522a0d0c3deff2e4197be390cb78692e79a5ebc1ff898374.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r13"], [3, "push r12"], [4, "push rbx"], [5, "sub rsp, 10A8h"], [6, "mov [rbp+var_10A8], rdi"], [7, "mov [rbp+var_10AC], esi"], [8, "mov [rbp+var_10B8], rdx"], [9, "mov rax, [rbp+var_10A8]"], [10, "mov rax, [rax+78h]"], [11, "mov [rbp+var_48], rax"], [12, "mov eax, cs:dword_5804C0"], [13, "test eax, eax"], [14, "jz short loc_4AADDD"], [15, "mov eax, 0FFFFFFFFh"], [16, "jmp short loc_4AADE2"], [17, "mov eax, 7FFFFFFFh"], [18, "mov [rbp+var_4C], eax"], [19, "lea rax, [rbp+var_870]"], [20, "mov [rbp+var_58], rax"], [21, "mov [rbp+var_28], 0"], [22, "mov rax, [rbp+var_48]"], [23, "mov ebx, [rax+1Ch]"], [24, "mov eax, 800h"], [25, "mov edx, 0"], [26, "div ebx"], [27, "mov [rbp+var_5C], eax"], [28, "mov [rbp+var_30], 0FFFFFFFFFFFFFFFFh"], [29, "mov [rbp+var_38], 8000h"], [30, "mov [rbp+var_3C], 0"], [31, "mov rax, [rbp+var_10A8]"], [32, "mov rdi, rax"], [33, "call sub_45A68D"], [34, "mov [rbp+var_68], rax"], [35, "cmp [rbp+var_68], 0"], [36, "jnz short loc_4AAE48"], [37, "mov rax, [rbp+var_30]"], [38, "jmp loc_4AB0BB"], [39, "mov rax, [rbp+var_10A8]"], [40, "mov eax, [rax+40h]"], [41, "mov [rbp+var_6C], eax"], [42, "mov rax, [rbp+var_10A8]"], [43, "mov edx, [rbp+var_4C]"], [44, "mov [rax+40h], edx"], [45, "jmp loc_4AB036"], [46, "mov eax, [rbp+var_1074]"], [47, "cmp [rbp+var_5C], eax"], [48, "jnz loc_4AB071"], [49, "mov rax, [rbp+var_58]"], [50, "movzx eax, byte ptr [rax+6]"], [51, "cmp al, 1"], [52, "jnz loc_4AB071"], [53, "mov rax, [rbp+var_58]"], [54, "add rax, 1"], [55, "mov edx, 5"], [56, "mov esi, offset aCd001"], [57, "mov rdi, rax"], [58, "call _memcmp"], [59, "test eax, eax"], [60, "jnz loc_4AB071"], [61, "mov rax, [rbp+var_58]"], [62, "movzx eax, byte ptr [rax]"], [63, "cmp al, 1"], [64, "jnz short loc_4AAF0E"], [65, "lea rax, [rbp+var_1070]"], [66, "mov [rbp+var_28], rax"], [67, "mov rdx, [rbp+var_28]"], [68, "mov rax, [rbp+var_58]"], [69, "mov ecx, 800h"], [70, "mov rsi, [rax]"], [71, "mov [rdx], rsi"], [72, "mov esi, ecx"], [73, "add rsi, rdx"], [74, "lea rdi, [rsi+8]"], [75, "mov esi, ecx"], [76, "add rsi, rax"], [77, "add rsi, 8"], [78, "mov rsi, [rsi-10h]"], [79, "mov [rdi-10h], rsi"], [80, "lea rdi, [rdx+8]"], [81, "and rdi, 0FFFFFFFFFFFFFFF8h"], [82, "sub rdx, rdi"], [83, "sub rax, rdx"], [84, "add ecx, edx"], [85, "and ecx, 0FFFFFFF8h"], [86, "shr ecx, 3"], [87, "mov edx, ecx"], [88, "mov edx, edx"], [89, "mov rsi, rax"], [90, "mov rcx, rdx"], [91, "rep movsq"], [92, "mov rax, [rbp+var_38]"], [93, "add rax, 800h"], [94, "mov [rbp+var_38], rax"], [95, "add [rbp+var_3C], 1"], [96, "mov rax, [rbp+var_58]"], [97, "movzx eax, byte ptr [rax]"], [98, "cmp al, 0FFh"], [99, "jz short loc_4AAF35"], [100, "cmp [rbp+var_3C], 1Fh"], [101, "jle loc_4AB036"], [102, "mov rax, [rbp+var_48]"], [103, "mov rax, [rax]"], [104, "mov [rbp+var_30], rax"], [105, "mov rax, [rbp+var_10A8]"], [106, "mov rbx, [rax+10h]"], [107, "mov rax, [rbp+var_10A8]"], [108, "mov rdi, rax"], [109, "call sub_453316"], [110, "mov rcx, rbx"], [111, "mov rdx, rax"], [112, "mov esi, offset aSSContainsAnIs"], [113, "mov edi, 0"], [114, "mov eax, 0"], [115, "call sub_463EDC"], [116, "cmp [rbp+var_28], 0"], [117, "jz loc_4AB070"], [118, "mov rax, [rbp+var_28]"], [119, "lea rcx, [rax+28h]"], [120, "lea rax, [rbp+dest]"], [121, "mov edx, 20h "], [122, "mov rsi, rcx"], [123, "mov rdi, rax"], [124, "call _memcpy"], [125, "mov [rbp+var_1080], 0"], [126, "mov eax, cs:dword_5804B8"], [127, "mov edx, 1"], [128, "sub edx, eax"], [129, "mov rax, [rbp+var_28]"], [130, "movsxd rdx, edx"], [131, "add rdx, 40h "], [132, "movzx eax, word ptr [rax+rdx*2]"], [133, "movzx r12d, ax"], [134, "mov rax, [rbp+var_48]"], [135, "mov rax, [rax]"], [136, "mov edx, cs:dword_5804B8"], [137, "mov ecx, 1"], [138, "sub ecx, edx"], [139, "mov rdx, [rbp+var_28]"], [140, "movsxd rcx, ecx"], [141, "add rcx, 40h "], [142, "movzx edx, word ptr [rdx+rcx*2]"], [143, "movzx ebx, dx"], [144, "cqo"], [145, "idiv rbx"], [146, "mov r13d, eax"], [147, "lea rax, [rbp+dest]"], [148, "mov rdi, rax"], [149, "call sub_4761E4"], [150, "mov rbx, rax"], [151, "mov rax, [rbp+var_10A8]"], [152, "mov rdi, rax"], [153, "call sub_453316"], [154, "mov r9d, r12d"], [155, "mov r8d, r13d"], [156, "mov rcx, rbx"], [157, "mov rdx, rax"], [158, "mov esi, offset aSVolumeIdentif"], [159, "mov edi, 0"], [160, "mov eax, 0"], [161, "call sub_463EDC"], [162, "jmp short loc_4AB070"], [163, "mov eax, [rbp+var_5C]"], [164, "imul rax, [rbp+var_38]"], [165, "shr rax, 0Bh"], [166, "mov edi, eax"], [167, "mov esi, [rbp+var_5C]"], [168, "lea rcx, [rbp+var_1074]"], [169, "mov rdx, [rbp+var_58]"], [170, "mov rax, [rbp+var_10A8]"], [171, "mov r8d, esi"], [172, "mov esi, edi"], [173, "mov rdi, rax"], [174, "call sub_4A8ABE"], [175, "test eax, eax"], [176, "jz loc_4AAE67"], [177, "jmp short loc_4AB071"], [178, "nop"], [179, "mov rax, [rbp+var_10A8]"], [180, "mov edx, [rbp+var_6C]"], [181, "mov [rax+40h], edx"], [182, "cmp [rbp+var_10B8], 0"], [183, "jz short loc_4AB0B7"], [184, "mov rax, [rbp+var_10A8]"], [185, "mov rdi, rax"], [186, "call sub_4A8426"], [187, "test eax, eax"], [188, "jnz short loc_4AB0A2"], [189, "cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh"], [190, "jz short loc_4AB0A9"], [191, "mov edx, 1"], [192, "jmp short loc_4AB0AE"], [193, "mov edx, 0"], [194, "mov rax, [rbp+var_10B8]"], [195, "mov [rax], edx"], [196, "mov rax, [rbp+var_30]"], [197, "add rsp, 10A8h"], [198, "pop rbx"], [199, "pop r12"], [200, "pop r13"], [201, "pop rbp"], [202, "retn"]], "data_dep": [[9, 6], [10, 9], [11, 10], [13, 12], [14, 13], [18, 17], [18, 15], [19, 15], [19, 17], [20, 19], [22, 11], [23, 22], [26, 23], [27, 24], [31, 6], [32, 31], [34, 33], [35, 34], [36, 35], [37, 28], [39, 6], [40, 39], [41, 40], [42, 6], [43, 18], [44, 42], [44, 43], [47, 27], [47, 46], [48, 47], [49, 20], [50, 49], [50, 79], [50, 44], [50, 71], [51, 50], [52, 51], [53, 20], [54, 53], [57, 54], [59, 58], [60, 59], [61, 20], [62, 44], [62, 71], [62, 61], [62, 79], [63, 62], [64, 63], [65, 62], [66, 65], [67, 66], [68, 20], [70, 68], [70, 79], [70, 44], [70, 71], [71, 67], [71, 70], [72, 69], [73, 67], [73, 72], [74, 73], [74, 57], [74, 71], [75, 69], [76, 75], [76, 68], [77, 76], [78, 77], [78, 71], [79, 74], [79, 78], [80, 67], [80, 74], [80, 79], [81, 80], [82, 81], [82, 67], [83, 82], [83, 68], [84, 69], [84, 82], [85, 84], [86, 85], [87, 86], [88, 87], [89, 83], [90, 88], [91, 91], [92, 94], [92, 29], [93, 92], [94, 93], [95, 95], [95, 30], [96, 20], [97, 44], [97, 96], [97, 71], [97, 79], [98, 97], [99, 98], [100, 95], [101, 100], [102, 11], [103, 102], [103, 44], [103, 71], [103, 79], [104, 103], [105, 6], [106, 79], [106, 44], [106, 105], [106, 71], [107, 6], [108, 107], [110, 106], [111, 109], [116, 21], [116, 66], [117, 116], [118, 21], [118, 66], [119, 71], [119, 79], [119, 118], [119, 44], [119, 110], [120, 118], [122, 119], [123, 120], [128, 126], [128, 127], [129, 66], [129, 21], [130, 128], [131, 130], [132, 71], [132, 79], [132, 129], [132, 44], [133, 132], [134, 11], [135, 44], [135, 71], [135, 134], [135, 79], [138, 137], [138, 136], [139, 21], [139, 66], [140, 138], [141, 140], [142, 71], [142, 141], [142, 79], [142, 44], [143, 142], [145, 143], [146, 135], [147, 135], [148, 147], [150, 149], [151, 6], [152, 151], [154, 133], [155, 146], [156, 150], [157, 153], [163, 27], [164, 94], [164, 29], [164, 163], [165, 164], [166, 165], [167, 27], [168, 90], [168, 168], [169, 20], [170, 6], [171, 167], [172, 166], [173, 170], [175, 174], [176, 175], [179, 6], [180, 41], [181, 180], [181, 179], [182, 8], [183, 182], [184, 6], [185, 184], [187, 186], [188, 187], [189, 104], [189, 28], [190, 189], [194, 8], [195, 191], [195, 193], [195, 194], [196, 28], [196, 104], [197, 5], [198, 4], [199, 3], [200, 2], [201, 0], [202, 196], [202, 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/f403d1d8b77541da522a0d0c3deff2e4197be390cb78692e79a5ebc1ff898374_f403d1d8b77541da522a0d0c3deff2e4197be390cb78692e79a5ebc1ff898374.jsonl.gz", "strip_func_name": "sub_4AAD99", "query": "\n\n\n__int64 __fastcall sub_4AAD99(__int64 a1, __int64 a2, _BOOL4 *a3)\n{\nint v3; // eax\n__int64 v5; // rbx\nconst char *v6; // rax\n__int64 v7; // r8\n__int64 v8; // r9\nunsigned int v9; // er12\nunsigned int v10; // er13\nconst char *v11; // rbx\nconst char *v12; // rax\n_BOOL4 v13; // edx\nchar dest[44]; // [rsp+20h] [rbp-10A0h] BYREF\nunsigned int v16; // [rsp+4Ch] [rbp-1074h] BYREF\n__int64 v17; // [rsp+50h] [rbp-1070h] BYREF\n_QWORD v18[255]; // [rsp+58h] [rbp-1068h] BYREF\nchar v19; // [rsp+850h] [rbp-870h] BYREF\nint v20; // [rsp+1054h] [rbp-6Ch]\nunsigned int v22; // [rsp+1064h] [rbp-5Ch]\nchar *v23; // [rsp+1068h] [rbp-58h]\nint v24; // [rsp+1074h] [rbp-4Ch]\n__int64 v25; // [rsp+1078h] [rbp-48h]\nint v26; // [rsp+1084h] [rbp-3Ch]\n__int64 v27; // [rsp+1088h] [rbp-38h]\n__int64 v28; // [rsp+1090h] [rbp-30h]\n__int64 *v29; // [rsp+1098h] [rbp-28h]\n\nv25 = *(_QWORD *)(a1 + 120);\nif ( dword_5804C0 )\nv3 = -1;\nelse\nv3 = 0x7FFFFFFF;\nv24 = v3;\nv23 = &v19;\nv29 = 0LL;\nv22 = 0x800u / *(_DWORD *)(v25 + 28);\nv28 = -1LL;\nv27 = 0x8000LL;\nv26 = 0;\nif ( !sub_45A68D(a1) )\nreturn v28;\nv20 = *(_DWORD *)(a1 + 64);\n*(_DWORD *)(a1 + 64) = v24;\nwhile ( !(unsigned int)sub_4A8ABE(a1, (v27 * (unsigned __int64)v22) >> 11, v23, &v16, v22)\n&& v22 == v16\n&& v23[6] == 1\n&& !memcmp(v23 + 1, \"CD001\", 5uLL) )\n{\nif ( *v23 == 1 )\n{\nv29 = &v17;\nv17 = *(_QWORD *)v23;\nv18[254] = *((_QWORD *)v23 + 255);\nqmemcpy(\nv18,\n&v23[-((char *)&v17 - (char *)v18)],\n8LL * ((((unsigned int)((char *)&v17 - (char *)v18) + 2048) & 0xFFFFFFF8) >> 3));\n}\nv27 += 2048LL;\n++v26;\nif ( *v23 == -1 || v26 > 31 )\n{\nv28 = *(_QWORD *)v25;\nv5 = *(_QWORD *)(a1 + 16);\nv6 = sub_453316(a1);\nsub_463EDC(0, \"%s: '%s' Contains an ISO 9660 filesystem\\n\", (__int64)v6, v5, v7, v8);\nif ( v29 )\n{\nmemcpy(dest, v29 + 5, 0x20uLL);\ndest[32] = 0;\nv9 = *((unsigned __int16 *)v29 + 1 - dword_5804B8 + 64);\nv10 = *(_QWORD *)v25 / (__int64)*((unsigned __int16 *)v29 + 1 - dword_5804B8 + 64);\nv11 = sub_4761E4(dest);\nv12 = sub_453316(a1);\nsub_463EDC(\n0,\n\"%s: Volume Identifier: %s Containing %u %u Byte Sectors\\n\",\n(__int64)v12,\n(__int64)v11,\nv10,\nv9);\n}\nbreak;\n}\n}\n*(_DWORD *)(a1 + 64) = v20;\nif ( a3 )\n{\nv13 = sub_4A8426(a1) || v28 != -1;\n*a3 = v13;\n}\nreturn v28;\n}\n\n\n\nQ:[a3,a1,a2,dest,v16,v17,v19,v20,v22,v23,v24,v25,v26,v27,v28,v29,sub_4AAD99,sub_45A68D,sub_4A8ABE,sub_453316,sub_463EDC,sub_4761E4,sub_4A8426,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'readonly', 'a1': 'uptr', 'a2': 'physsectsz', 'dest': 'VolId', 'v16': 'sectsread', 'v17': 'primary_buf', 'v19': 'sector_buf', 'v20': 'saved_capac', 'v22': 'sectfactor', 'v23': 'Desc', 'v24': 'temp_capac', 'v25': 'ctx', 'v26': 'read_count', 'v27': 'cur_pos', 'v28': 'ret_val', 'v29': 'Primary', 'sub_4AAD99': 'get_iso9660_filesystem_size', 'sub_45A68D': 'find_dev_from_unit', 'sub_4A8ABE': 'sim_disk_rdsect', 'sub_453316': 'sim_uname', 'sub_463EDC': 'sim_messagef', 'sub_4761E4': 'sim_trim_endspc', 'sub_4A8426': 'sim_disk_wrp'}"} |
|
FSTAG_mkEnd | 3e34965c13508885b6b154f2c30077490ddbf23ac2d63f3c173f3ad61b227c59 | lorabasics | basicstation | NA | static inline u4_t FSTAG_mkEnd(u2_t crc, u2_t len, u1_t pad) {
return ((crc&0xFFFF)<<16) | (len&0xFFFC)|(pad&3);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_427D64", "function_addr": 4357476, "binary_name": "3e34965c13508885b6b154f2c30077490ddbf23ac2d63f3c173f3ad61b227c59.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov ecx, edi"], [3, "mov eax, esi"], [4, "mov [rbp+var_4], cx"], [5, "mov [rbp+var_8], ax"], [6, "mov eax, edx"], [7, "mov [rbp+var_C], al"], [8, "movzx eax, [rbp+var_4]"], [9, "shl eax, 10h"], [10, "mov edx, eax"], [11, "movzx eax, [rbp+var_8]"], [12, "and eax, 0FFFCh"], [13, "or edx, eax"], [14, "movzx eax, [rbp+var_C]"], [15, "and eax, 3"], [16, "or eax, edx"], [17, "pop rbp"], [18, "retn"]], "data_dep": [[4, 2], [5, 3], [7, 6], [8, 4], [9, 8], [10, 9], [11, 5], [12, 11], [13, 10], [13, 12], [14, 7], [15, 14], [16, 13], [16, 15], [17, 0], [18, 16]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3e34965c13508885b6b154f2c30077490ddbf23ac2d63f3c173f3ad61b227c59_3e34965c13508885b6b154f2c30077490ddbf23ac2d63f3c173f3ad61b227c59.jsonl.gz", "strip_func_name": "sub_427D64", "query": "\n\n\n__int64 __fastcall sub_427D64(unsigned __int16 a1, __int16 a2, char a3)\n{\nreturn a2 & 0xFFFC | (a1 << 16) | a3 & 3u;\n}\n\n\n\nQ:[a3,a1,a2,sub_427D64,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'pad', 'a1': 'crc', 'a2': 'len', 'sub_427D64': 'FSTAG_mkEnd'}"} |
|
melp_chn_read | 6685c16f9be7e617351948e3bfca4b5a452c99150f0336caa504ed823939ea36 | gegel | pairphone | NA | BOOLEAN melp_chn_read(struct quant_param *qpar, struct melp_param *par,
struct melp_param *prev_par, unsigned char chbuf[])
{
register int16_t i;
unsigned char *bit_ptr;
BOOLEAN erase = FALSE;
int16_t index, bit_cntr, dontcare;
/* Read channel output buffer into bit buffer */
bit_ptr = bit_buffer;
qpar->chptr = chbuf;
qpar->chbit = 0;
for (i = 0; i < bitNum24; i++) {
erase |= unpack_code(&(qpar->chptr), &(qpar->chbit), &index, 1,
chwordsize, ERASE_MASK);
bit_buffer[bit_order[i]] = (unsigned char)index;
bit_ptr++;
}
/* Read information from bit buffer */
bit_ptr = bit_buffer;
bit_cntr = 0;
(void)unpack_code(&bit_ptr, &bit_cntr, &qpar->gain_index[1], 5, 1, 0);
/* Read sync bit */
(void)unpack_code(&bit_ptr, &bit_cntr, &dontcare, 1, 1, 0);
(void)unpack_code(&bit_ptr, &bit_cntr, &qpar->gain_index[0], 3, 1, 0);
(void)unpack_code(&bit_ptr, &bit_cntr, &(qpar->pitch_index), PIT_BITS,
1, 0);
(void)unpack_code(&bit_ptr, &bit_cntr, &qpar->jit_index[0], 1, 1, 0);
(void)unpack_code(&bit_ptr, &bit_cntr, &qpar->bpvc_index[0],
NUM_BANDS - 1, 1, 0);
for (i = 0; i < MSVQ_STAGES; i++)
(void)unpack_code(&bit_ptr, &bit_cntr, &(qpar->msvq_index[i]),
msvq_bits[i], 1, 0);
(void)unpack_code(&bit_ptr, &bit_cntr, &qpar->fsvq_index, FS_BITS, 1,
0);
/* Clear unvoiced flag */
qpar->uv_flag[0] = FALSE;
erase = (BOOLEAN) fec_decode(qpar, erase);
/* Decode new frame if no erasures occurred */
if (erase) { /* Erasure: frame repeat */
*par = *prev_par;
/* Force all subframes to equal last one */
fill(par->gain, par->gain[NUM_GAINFR - 1], NUM_GAINFR - 1);
} else {
/* Decode line spectrum frequencies */
vq_msd2(msvq_cb, par->lsf, msvq_cb_mean, qpar->msvq_index,
msvq_levels, MSVQ_STAGES, LPC_ORD, 2);
dontcare = FS_LEVELS;
if (qpar->uv_flag[0])
fill(par->fs_mag, ONE_Q13, NUM_HARM);
else /* Decode Fourier magnitudes */
vq_msd2(fsvq_cb, par->fs_mag, (int16_t *) NULL,
&(qpar->fsvq_index), &dontcare, 1, NUM_HARM, 0);
/* Decode gain terms with uniform log quantizer */
q_gain_dec(par->gain, qpar->gain_index, GN_QLO_Q8, GN_QUP_Q8,
GN_QLEV_M1_Q10, 5);
/* Decode voicing information */
par->uv_flag = qpar->uv_flag[0];
/* Fractional pitch: Decode logarithmic pitch period */
if (qpar->uv_flag[0])
par->pitch = UV_PITCH_Q7;
else {
quant_u_dec(qpar->pitch_index, &par->pitch, PIT_QLO_Q12,
PIT_QUP_Q12, PIT_QLEV_M1_Q8, 7);
par->pitch = pow10_fxp(par->pitch, 7);
}
/* Decode jitter */
/* quant_u_dec(par->jit_index, &par->jitter, 0.0, MAX_JITTER, 2); */
if (qpar->jit_index[0] == 0)
par->jitter = 0;
else
par->jitter = MAX_JITTER_Q15;
/* Decode bandpass voicing */
q_bpvc_dec(par->bpvc, qpar->bpvc_index[0], qpar->uv_flag[0],
NUM_BANDS);
}
/* Return erase flag */
return (erase);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41891E", "function_addr": 4294942, "binary_name": "6685c16f9be7e617351948e3bfca4b5a452c99150f0336caa504ed823939ea36.elf_extract.pkl\n"}, "code": [[0, "push rbx"], [1, "sub rsp, 40h"], [2, "mov [rsp+48h+var_30], rdi"], [3, "mov [rsp+48h+var_38], rsi"], [4, "mov [rsp+48h+var_40], rdx"], [5, "mov [rsp+48h+var_48], rcx"], [6, "mov [rsp+48h+var_A], 0"], [7, "mov [rsp+48h+var_18], offset byte_4B6B80"], [8, "mov rax, [rsp+48h+var_30]"], [9, "mov rdx, [rsp+48h+var_48]"], [10, "mov [rax+40h], rdx"], [11, "mov rax, [rsp+48h+var_30]"], [12, "mov word ptr [rax+48h], 0"], [13, "mov ebx, 0"], [14, "jmp short loc_4189D1"], [15, "movzx eax, cs:word_4B5D32"], [16, "movsx edx, ax"], [17, "mov rax, [rsp+48h+var_30]"], [18, "lea rsi, [rax+48h]"], [19, "mov rax, [rsp+48h+var_30]"], [20, "lea rdi, [rax+40h]"], [21, "lea rax, [rsp+48h+var_1A]"], [22, "mov r9d, 4000h"], [23, "mov r8d, edx"], [24, "mov ecx, 1"], [25, "mov rdx, rax"], [26, "call sub_46B8D9"], [27, "or [rsp+48h+var_A], ax"], [28, "movzx edx, [rsp+48h+var_1A]"], [29, "movsx eax, bx"], [30, "cdqe"], [31, "movzx eax, word_4A1420[rax+rax]"], [32, "cwde"], [33, "cdqe"], [34, "mov ds:byte_4B6B80[rax], dl"], [35, "mov rax, [rsp+48h+var_18]"], [36, "add rax, 1"], [37, "mov [rsp+48h+var_18], rax"], [38, "mov eax, ebx"], [39, "add eax, 1"], [40, "mov ebx, eax"], [41, "movzx eax, cs:word_4B5E46"], [42, "cmp bx, ax"], [43, "jl short loc_418965"], [44, "mov [rsp+48h+var_18], offset byte_4B6B80"], [45, "mov [rsp+48h+var_1C], 0"], [46, "mov rax, [rsp+48h+var_30]"], [47, "lea rdx, [rax+1Ch]"], [48, "lea rsi, [rsp+48h+var_1C]"], [49, "lea rax, [rsp+48h+var_18]"], [50, "mov r9d, 0"], [51, "mov r8d, 1"], [52, "mov ecx, 5"], [53, "mov rdi, rax"], [54, "call sub_46B8D9"], [55, "lea rdx, [rsp+48h+var_1E]"], [56, "lea rsi, [rsp+48h+var_1C]"], [57, "lea rax, [rsp+48h+var_18]"], [58, "mov r9d, 0"], [59, "mov r8d, 1"], [60, "mov ecx, 1"], [61, "mov rdi, rax"], [62, "call sub_46B8D9"], [63, "mov rax, [rsp+48h+var_30]"], [64, "lea rdx, [rax+1Ah]"], [65, "lea rsi, [rsp+48h+var_1C]"], [66, "lea rax, [rsp+48h+var_18]"], [67, "mov r9d, 0"], [68, "mov r8d, 1"], [69, "mov ecx, 3"], [70, "mov rdi, rax"], [71, "call sub_46B8D9"], [72, "mov rdx, [rsp+48h+var_30]"], [73, "lea rsi, [rsp+48h+var_1C]"], [74, "lea rax, [rsp+48h+var_18]"], [75, "mov r9d, 0"], [76, "mov r8d, 1"], [77, "mov ecx, 7"], [78, "mov rdi, rax"], [79, "call sub_46B8D9"], [80, "mov rax, [rsp+48h+var_30]"], [81, "lea rdx, [rax+1Eh]"], [82, "lea rsi, [rsp+48h+var_1C]"], [83, "lea rax, [rsp+48h+var_18]"], [84, "mov r9d, 0"], [85, "mov r8d, 1"], [86, "mov ecx, 1"], [87, "mov rdi, rax"], [88, "call sub_46B8D9"], [89, "mov rax, [rsp+48h+var_30]"], [90, "lea rdx, [rax+24h]"], [91, "lea rsi, [rsp+48h+var_1C]"], [92, "lea rax, [rsp+48h+var_18]"], [93, "mov r9d, 0"], [94, "mov r8d, 1"], [95, "mov ecx, 4"], [96, "mov rdi, rax"], [97, "call sub_46B8D9"], [98, "mov ebx, 0"], [99, "jmp short loc_418B47"], [100, "movsx eax, bx"], [101, "cdqe"], [102, "movzx eax, ds:word_494EF8[rax+rax]"], [103, "movsx edx, ax"], [104, "movsx eax, bx"], [105, "cdqe"], [106, "add rax, 18h"], [107, "lea rcx, [rax+rax]"], [108, "mov rax, [rsp+48h+var_30]"], [109, "add rax, rcx"], [110, "lea rdi, [rax+2]"], [111, "lea rsi, [rsp+48h+var_1C]"], [112, "lea rax, [rsp+48h+var_18]"], [113, "mov r9d, 0"], [114, "mov r8d, 1"], [115, "mov ecx, edx"], [116, "mov rdx, rdi"], [117, "mov rdi, rax"], [118, "call sub_46B8D9"], [119, "mov eax, ebx"], [120, "add eax, 1"], [121, "mov ebx, eax"], [122, "cmp bx, 3"], [123, "jle short loc_418AF4"], [124, "mov rax, [rsp+48h+var_30]"], [125, "lea rdx, [rax+3Ah]"], [126, "lea rsi, [rsp+48h+var_1C]"], [127, "lea rax, [rsp+48h+var_18]"], [128, "mov r9d, 0"], [129, "mov r8d, 1"], [130, "mov ecx, 8"], [131, "mov rdi, rax"], [132, "call sub_46B8D9"], [133, "mov rax, [rsp+48h+var_30]"], [134, "mov word ptr [rax+2Ch], 0"], [135, "movsx edx, [rsp+48h+var_A]"], [136, "mov rax, [rsp+48h+var_30]"], [137, "mov esi, edx"], [138, "mov rdi, rax"], [139, "call sub_46EE20"], [140, "mov [rsp+48h+var_A], ax"], [141, "cmp [rsp+48h+var_A], 0"], [142, "jz short loc_418C12"], [143, "mov rax, [rsp+48h+var_38]"], [144, "mov rdx, [rsp+48h+var_40]"], [145, "mov rcx, [rdx]"], [146, "mov rbx, [rdx+8]"], [147, "mov [rax], rcx"], [148, "mov [rax+8], rbx"], [149, "mov rcx, [rdx+10h]"], [150, "mov rbx, [rdx+18h]"], [151, "mov [rax+10h], rcx"], [152, "mov [rax+18h], rbx"], [153, "mov rcx, [rdx+20h]"], [154, "mov rbx, [rdx+28h]"], [155, "mov [rax+20h], rcx"], [156, "mov [rax+28h], rbx"], [157, "mov rcx, [rdx+30h]"], [158, "mov [rax+30h], rcx"], [159, "mov edx, [rdx+38h]"], [160, "mov [rax+38h], edx"], [161, "mov rax, [rsp+48h+var_38]"], [162, "movzx eax, word ptr [rax+18h]"], [163, "cwde"], [164, "mov rdx, [rsp+48h+var_38]"], [165, "lea rcx, [rdx+16h]"], [166, "mov edx, 1"], [167, "mov esi, eax"], [168, "mov rdi, rcx"], [169, "call sub_467C59"], [170, "jmp loc_418DB1"], [171, "mov rax, [rsp+48h+var_30]"], [172, "lea rdx, [rax+32h]"], [173, "mov rax, [rsp+48h+var_38]"], [174, "add rax, 2"], [175, "push 2"], [176, "push 0Ah"], [177, "mov r9d, 4"], [178, "mov r8d, offset off_494F00"], [179, "mov rcx, rdx"], [180, "mov edx, offset unk_494F60"], [181, "mov rsi, rax"], [182, "mov edi, offset unk_494F80"], [183, "call sub_46162E"], [184, "add rsp, 10h"], [185, "mov [rsp+48h+var_1E], 100h"], [186, "mov rax, [rsp+48h+var_30]"], [187, "movzx eax, word ptr [rax+2Ch]"], [188, "test ax, ax"], [189, "jz short loc_418C7F"], [190, "mov rax, [rsp+48h+var_38]"], [191, "add rax, 28h "], [192, "mov edx, 0Ah"], [193, "mov esi, 2000h"], [194, "mov rdi, rax"], [195, "call sub_467C59"], [196, "jmp short loc_418CBC"], [197, "mov rax, [rsp+48h+var_30]"], [198, "lea rdx, [rax+3Ah]"], [199, "mov rax, [rsp+48h+var_38]"], [200, "add rax, 28h "], [201, "lea rcx, [rsp+48h+var_1E]"], [202, "push 0"], [203, "push 0Ah"], [204, "mov r9d, 1"], [205, "mov r8, rcx"], [206, "mov rcx, rdx"], [207, "mov edx, 0"], [208, "mov rsi, rax"], [209, "mov edi, offset unk_499400"], [210, "call sub_46162E"], [211, "add rsp, 10h"], [212, "mov rax, [rsp+48h+var_30]"], [213, "lea rsi, [rax+1Ah]"], [214, "mov rax, [rsp+48h+var_38]"], [215, "add rax, 16h"], [216, "mov r9d, 5"], [217, "mov r8d, 7C00h"], [218, "mov ecx, 4D00h"], [219, "mov edx, 0A00h"], [220, "mov rdi, rax"], [221, "call sub_423532"], [222, "mov rax, [rsp+48h+var_30]"], [223, "movzx edx, word ptr [rax+2Ch]"], [224, "mov rax, [rsp+48h+var_38]"], [225, "mov [rax+26h], dx"], [226, "mov rax, [rsp+48h+var_30]"], [227, "movzx eax, word ptr [rax+2Ch]"], [228, "test ax, ax"], [229, "jz short loc_418D18"], [230, "mov rax, [rsp+48h+var_38]"], [231, "mov word ptr [rax], 1900h"], [232, "jmp short loc_418D60"], [233, "mov rsi, [rsp+48h+var_38]"], [234, "mov rax, [rsp+48h+var_30]"], [235, "movzx eax, word ptr [rax]"], [236, "cwde"], [237, "mov r9d, 7"], [238, "mov r8d, 6200h"], [239, "mov ecx, 2344h"], [240, "mov edx, 14D1h"], [241, "mov edi, eax"], [242, "call sub_4696F8"], [243, "mov rax, [rsp+48h+var_38]"], [244, "movzx eax, word ptr [rax]"], [245, "cwde"], [246, "mov esi, 7"], [247, "mov edi, eax"], [248, "call sub_488CB7"], [249, "mov rdx, [rsp+48h+var_38]"], [250, "mov [rdx], ax"], [251, "mov rax, [rsp+48h+var_30]"], [252, "movzx eax, word ptr [rax+1Eh]"], [253, "test ax, ax"], [254, "jnz short loc_418D7B"], [255, "mov rax, [rsp+48h+var_38]"], [256, "mov word ptr [rax+1Ah], 0"], [257, "jmp short loc_418D86"], [258, "mov rax, [rsp+48h+var_38]"], [259, "mov word ptr [rax+1Ah], 2000h"], [260, "mov rax, [rsp+48h+var_30]"], [261, "movzx eax, word ptr [rax+2Ch]"], [262, "movsx edx, ax"], [263, "mov rax, [rsp+48h+var_30]"], [264, "movzx eax, word ptr [rax+24h]"], [265, "cwde"], [266, "mov rcx, [rsp+48h+var_38]"], [267, "lea rdi, [rcx+1Ch]"], [268, "mov ecx, 5"], [269, "mov esi, eax"], [270, "call sub_422FD1"], [271, "movzx eax, [rsp+48h+var_A]"], [272, "add rsp, 40h"], [273, "pop rbx"], [274, "retn"]], "data_dep": [[8, 2], [9, 5], [10, 8], [10, 9], [11, 2], [12, 11], [16, 15], [17, 2], [18, 17], [18, 12], [18, 10], [18, 18], [19, 2], [20, 20], [20, 10], [20, 19], [20, 12], [21, 19], [23, 16], [25, 21], [27, 26], [27, 6], [27, 27], [29, 13], [29, 40], [34, 28], [35, 7], [35, 37], [36, 35], [37, 36], [38, 13], [38, 40], [39, 38], [40, 39], [42, 41], [42, 13], [42, 40], [43, 42], [46, 2], [47, 10], [47, 28], [47, 46], [47, 9], [47, 12], [48, 45], [48, 18], [49, 46], [49, 44], [53, 49], [55, 47], [56, 48], [56, 45], [57, 54], [57, 44], [61, 57], [63, 2], [64, 10], [64, 55], [64, 63], [64, 12], [65, 45], [65, 56], [66, 63], [66, 44], [70, 66], [72, 2], [73, 45], [73, 65], [74, 44], [74, 71], [78, 74], [80, 2], [81, 72], [81, 12], [81, 10], [81, 80], [82, 73], [82, 45], [83, 80], [83, 44], [87, 83], [89, 2], [90, 10], [90, 12], [90, 81], [90, 89], [91, 82], [91, 45], [92, 44], [92, 89], [96, 92], [100, 98], [100, 121], [103, 102], [104, 98], [104, 121], [106, 104], [107, 95], [107, 106], [107, 115], [107, 12], [107, 10], [108, 2], [109, 107], [109, 108], [110, 109], [110, 10], [110, 117], [110, 12], [110, 96], [111, 91], [111, 45], [111, 111], [112, 44], [112, 109], [115, 103], [116, 110], [117, 112], [119, 98], [119, 121], [120, 119], [121, 120], [122, 121], [122, 98], [123, 122], [124, 2], [125, 116], [125, 134], [125, 124], [125, 12], [125, 90], [125, 10], [126, 111], [126, 91], [126, 45], [127, 44], [127, 124], [131, 127], [133, 2], [134, 133], [135, 6], [135, 27], [136, 2], [137, 135], [138, 136], [140, 139], [141, 140], [142, 141], [143, 3], [144, 4], [145, 158], [145, 144], [145, 148], [145, 134], [145, 152], [145, 147], [145, 156], [145, 12], [145, 151], [145, 160], [145, 155], [145, 10], [146, 152], [146, 147], [146, 156], [146, 12], [146, 151], [146, 160], [146, 155], [146, 10], [146, 158], [146, 144], [146, 148], [146, 134], [147, 143], [147, 145], [148, 143], [148, 146], [149, 144], [149, 148], [150, 144], [150, 148], [151, 149], [151, 143], [152, 150], [152, 143], [153, 144], [153, 152], [154, 144], [154, 152], [155, 153], [155, 143], [156, 154], [156, 143], [157, 156], [157, 144], [158, 157], [158, 143], [159, 158], [159, 144], [160, 159], [160, 143], [161, 3], [162, 161], [162, 160], [162, 152], [164, 3], [165, 160], [165, 164], [165, 157], [167, 162], [168, 165], [171, 2], [172, 171], [172, 134], [172, 12], [172, 10], [172, 135], [173, 3], [174, 173], [179, 172], [181, 174], [184, 1], [186, 2], [187, 10], [187, 186], [187, 134], [187, 12], [188, 187], [189, 188], [190, 3], [191, 190], [194, 191], [197, 2], [198, 197], [198, 10], [198, 180], [198, 134], [198, 12], [199, 3], [200, 199], [201, 179], [201, 185], [205, 201], [206, 198], [208, 200], [211, 184], [212, 2], [213, 134], [213, 12], [213, 208], [213, 212], [213, 225], [213, 193], [213, 10], [214, 3], [215, 214], [220, 215], [222, 2], [223, 134], [223, 12], [223, 222], [223, 225], [223, 10], [224, 3], [225, 224], [225, 223], [226, 2], [227, 134], [227, 226], [227, 225], [228, 227], [229, 228], [230, 3], [231, 230], [233, 3], [234, 2], [235, 10], [235, 134], [235, 12], [235, 250], [235, 225], [235, 234], [241, 235], [243, 3], [244, 225], [244, 10], [244, 243], [244, 134], [244, 12], [244, 250], [247, 244], [249, 3], [250, 249], [250, 248], [251, 2], [252, 225], [252, 10], [252, 251], [252, 134], [252, 12], [252, 250], [252, 231], [253, 252], [254, 253], [255, 3], [256, 255], [258, 3], [259, 258], [260, 2], [261, 134], [261, 12], [261, 250], [261, 259], [261, 231], [261, 225], [261, 10], [261, 256], [261, 260], [262, 261], [263, 2], [264, 12], [264, 259], [264, 263], [264, 225], [264, 10], [264, 256], [264, 134], [264, 250], [264, 231], [266, 3], [267, 134], [267, 12], [267, 250], [267, 259], [267, 231], [267, 225], [267, 220], [267, 10], [267, 266], [267, 247], [267, 256], [269, 264], [271, 140], [272, 184], [272, 211], [272, 1], [273, 0], [274, 271]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/6685c16f9be7e617351948e3bfca4b5a452c99150f0336caa504ed823939ea36_6685c16f9be7e617351948e3bfca4b5a452c99150f0336caa504ed823939ea36.jsonl.gz", "strip_func_name": "sub_41891E", "query": "\n\n\n__int64 __fastcall sub_41891E(__int16 *a1, __int16 *a2, __int64 a3, __int64 a4)\n{\n__int16 i; // bx\n__int16 v5; // ax\n__int16 j; // bx\n__int64 v7; // rbx\n__int64 v8; // rbx\n__int64 v9; // rbx\n__int64 v12; // [rsp+0h] [rbp-48h]\n__int64 v13; // [rsp+0h] [rbp-48h]\n__int64 v14; // [rsp+0h] [rbp-48h]\n__int64 v15; // [rsp+0h] [rbp-48h]\n__int64 v16; // [rsp+0h] [rbp-48h]\n__int64 v17; // [rsp+0h] [rbp-48h]\n__int16 v19; // [rsp+2Ah] [rbp-1Eh] BYREF\n__int16 v20; // [rsp+2Ch] [rbp-1Ch] BYREF\n__int16 v21; // [rsp+2Eh] [rbp-1Ah] BYREF\nchar *v22; // [rsp+30h] [rbp-18h] BYREF\nunsigned __int16 v23; // [rsp+3Eh] [rbp-Ah]\n\nv23 = 0;\nv22 = byte_4B6B80;\n*((_QWORD *)a1 + 8) = a4;\na1[36] = 0;\nfor ( i = 0; i < word_4B5E46; ++i )\n{\nv5 = sub_46B8D9(a1 + 32, a1 + 36, &v21, 1LL, (unsigned int)word_4B5D32, 0x4000LL, a4);\nv23 |= v5;\nbyte_4B6B80[word_4A1420[i]] = v21;\n++v22;\n}\nv22 = byte_4B6B80;\nv20 = 0;\nsub_46B8D9(&v22, &v20, a1 + 14, 5LL, 1LL, 0LL, a4);\nsub_46B8D9(&v22, &v20, &v19, 1LL, 1LL, 0LL, v12);\nsub_46B8D9(&v22, &v20, a1 + 13, 3LL, 1LL, 0LL, v13);\nsub_46B8D9(&v22, &v20, a1, 7LL, 1LL, 0LL, v14);\nsub_46B8D9(&v22, &v20, a1 + 15, 1LL, 1LL, 0LL, v15);\nsub_46B8D9(&v22, &v20, a1 + 18, 4LL, 1LL, 0LL, v16);\nfor ( j = 0; j <= 3; ++j )\nsub_46B8D9(&v22, &v20, &a1[j + 25], (unsigned int)word_494EF8[j], 1LL, 0LL, v17);\nsub_46B8D9(&v22, &v20, a1 + 29, 8LL, 1LL, 0LL, v17);\na1[22] = 0;\nv23 = sub_46EE20(a1, (unsigned int)(__int16)v23);\nif ( v23 )\n{\nv7 = *(_QWORD *)(a3 + 8);\n*(_QWORD *)a2 = *(_QWORD *)a3;\n*((_QWORD *)a2 + 1) = v7;\nv8 = *(_QWORD *)(a3 + 24);\n*((_QWORD *)a2 + 2) = *(_QWORD *)(a3 + 16);\n*((_QWORD *)a2 + 3) = v8;\nv9 = *(_QWORD *)(a3 + 40);\n*((_QWORD *)a2 + 4) = *(_QWORD *)(a3 + 32);\n*((_QWORD *)a2 + 5) = v9;\n*((_QWORD *)a2 + 6) = *(_QWORD *)(a3 + 48);\n*((_DWORD *)a2 + 14) = *(_DWORD *)(a3 + 56);\nsub_467C59(a2 + 11, (unsigned int)a2[12], 1LL);\n}\nelse\n{\nsub_46162E(\n(unsigned int)&unk_494F80,\n(_DWORD)a2 + 2,\n(unsigned int)&unk_494F60,\n(_DWORD)a1 + 50,\n(unsigned int)&off_494F00,\n4,\n10,\n2);\nv19 = 256;\nif ( a1[22] )\nsub_467C59(a2 + 20, 0x2000LL, 10LL);\nelse\nsub_46162E((unsigned int)&unk_499400, (_DWORD)a2 + 40, 0, (_DWORD)a1 + 58, (unsigned int)&v19, 1, 10, 0);\nsub_423532(a2 + 11, a1 + 13, 2560LL, 19712LL, 31744LL, 5LL);\na2[19] = a1[22];\nif ( a1[22] )\n{\n*a2 = 6400;\n}\nelse\n{\nsub_4696F8((unsigned int)*a1, a2, 5329LL, 9028LL, 25088LL, 7LL);\n*a2 = sub_488CB7((unsigned int)*a2, 7LL);\n}\nif ( a1[15] )\na2[13] = 0x2000;\nelse\na2[13] = 0;\nsub_422FD1(a2 + 14, (unsigned int)a1[18], (unsigned int)a1[22], 5LL);\n}\nreturn v23;\n}\n\n\n\nQ:[a3,a4,a1,a2,v19,v20,v21,v22,v23,sub_41891E,sub_46B8D9,sub_46EE20,sub_467C59,sub_46162E,sub_423532,sub_4696F8,sub_488CB7,sub_422FD1,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'prev_par', 'a4': 'chbuf', 'a1': 'qpar', 'a2': 'par', 'v19': 'dontcare', 'v20': 'bit_cntr', 'v21': 'index', 'v22': 'bit_ptr', 'v23': 'erase', 'sub_41891E': 'melp_chn_read', 'sub_46B8D9': 'unpack_code', 'sub_46EE20': 'fec_decode', 'sub_467C59': 'fill', 'sub_46162E': 'vq_msd2', 'sub_423532': 'q_gain_dec', 'sub_4696F8': 'quant_u_dec', 'sub_488CB7': 'pow10_fxp', 'sub_422FD1': 'q_bpvc_dec'}"} |
|
l2cap_send_le_signaling_packet | 0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26 | Matheus-Garbelini | esp32_bluetooth_classic_sniffer | NA | static int l2cap_send_le_signaling_packet(hci_con_handle_t handle, L2CAP_SIGNALING_COMMANDS cmd, int identifier, ...){
if (!hci_can_send_acl_packet_now(handle)){
log_info("l2cap_send_le_signaling_packet, cannot send");
return BTSTACK_ACL_BUFFERS_FULL;
}
// log_info("l2cap_send_le_signaling_packet type %u", cmd);
hci_reserve_packet_buffer();
uint8_t *acl_buffer = hci_get_outgoing_packet_buffer();
va_list argptr;
va_start(argptr, identifier);
uint16_t len = l2cap_create_signaling_le(acl_buffer, handle, cmd, identifier, argptr);
va_end(argptr);
// log_info("l2cap_send_le_signaling_packet con %u!", handle);
return hci_send_acl_packet_buffer(len);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41047A", "function_addr": 4260986, "binary_name": "0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0F0h"], [3, "mov [rbp+var_E8], esi"], [4, "mov [rbp+var_EC], edx"], [5, "mov [rbp+var_98], rcx"], [6, "mov [rbp+var_90], r8"], [7, "mov [rbp+var_88], r9"], [8, "test al, al"], [9, "jz short loc_4104CA"], [10, "movaps [rbp+var_80], xmm0"], [11, "movaps [rbp+var_70], xmm1"], [12, "movaps [rbp+var_60], xmm2"], [13, "movaps [rbp+var_50], xmm3"], [14, "movaps [rbp+var_40], xmm4"], [15, "movaps [rbp+var_30], xmm5"], [16, "movaps [rbp+var_20], xmm6"], [17, "movaps [rbp+var_10], xmm7"], [18, "mov eax, edi"], [19, "mov [rbp+var_E4], ax"], [20, "movzx eax, [rbp+var_E4]"], [21, "mov edi, eax"], [22, "call sub_408508"], [23, "test eax, eax"], [24, "jnz short loc_41050D"], [25, "mov ecx, 56Fh"], [26, "mov edx, offset aL2capC"], [27, "mov esi, offset aSUL2capSendLeS"], [28, "mov edi, 1"], [29, "mov eax, 0"], [30, "call sub_40FA98"], [31, "mov eax, 57h "], [32, "jmp locret_41058F"], [33, "call sub_408553"], [34, "call sub_408D7E"], [35, "mov [rbp+var_B8], rax"], [36, "mov [rbp+var_D8], 18h"], [37, "mov [rbp+var_D4], 30h "], [38, "lea rax, [rbp+arg_0]"], [39, "mov [rbp+var_D0], rax"], [40, "lea rax, [rbp+var_B0]"], [41, "mov [rbp+var_C8], rax"], [42, "mov eax, [rbp+var_EC]"], [43, "movzx ecx, al"], [44, "movzx esi, [rbp+var_E4]"], [45, "lea rdi, [rbp+var_D8]"], [46, "mov edx, [rbp+var_E8]"], [47, "mov rax, [rbp+var_B8]"], [48, "mov r8, rdi"], [49, "mov rdi, rax"], [50, "call sub_413741"], [51, "mov [rbp+var_BA], ax"], [52, "movzx eax, [rbp+var_BA]"], [53, "mov edi, eax"], [54, "call sub_408812"], [55, "leave"], [56, "retn"]], "data_dep": [[9, 8], [19, 18], [20, 19], [21, 20], [23, 22], [24, 23], [35, 34], [38, 34], [39, 38], [40, 38], [41, 40], [42, 4], [43, 42], [44, 19], [45, 21], [45, 36], [46, 3], [47, 35], [48, 45], [49, 47], [51, 50], [52, 51], [53, 52], [56, 31], [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/0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26_0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26.jsonl.gz", "strip_func_name": "sub_41047A", "query": "\n\n\n__int64 sub_41047A(unsigned __int16 a1, __int64 a2, unsigned __int8 a3, ...)\n{\n__int64 v3; // rdx\n__int64 v4; // rcx\n__int64 v5; // r8\n__int64 v6; // r9\n__int64 result; // rax\n__int64 v8; // rdx\n__int64 v9; // rcx\nint v10; // er8\nint v11; // er9\ngcc_va_list va; // [rsp+18h] [rbp-D8h] BYREF\n__int16 v14; // [rsp+36h] [rbp-BAh]\n__int64 v15; // [rsp+38h] [rbp-B8h]\n__int64 v16; // [rsp+58h] [rbp-98h]\n__int64 v17; // [rsp+60h] [rbp-90h]\n__int64 v18; // [rsp+68h] [rbp-88h]\n\nva_start(va, a3);\nv16 = va_arg(va, _QWORD);\nv17 = va_arg(va, _QWORD);\nv18 = va_arg(va, _QWORD);\nva_end(va);\nif ( sub_408508(a1, a2) )\n{\nsub_408553(a1, a2, v3, v4, v5, v6);\nv15 = sub_408D7E();\nva_start(va, a3);\nv14 = sub_413741(v15, a1, (unsigned int)a2, a3, va);\nresult = sub_408812(v14, a1, v8, v9, v10, v11);\n}\nelse\n{\nsub_40FA98(1, (__int64)\"%s.%u: l2cap_send_le_signaling_packet, cannot send\", (__int64)\"l2cap.c\", 1391LL, v5, v6);\nresult = 87LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v3,va,v14,v15,sub_41047A,sub_408508,sub_408553,sub_408D7E,sub_413741,sub_408812,sub_40FA98,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'identifier', 'a1': 'handle', 'a2': 'cmd', 'v3': 'identifier', 'va': 'argptr', 'v14': 'len', 'v15': 'acl_buffer', 'sub_41047A': 'l2cap_send_le_signaling_packet', 'sub_408508': 'hci_can_send_acl_packet_now', 'sub_408553': 'hci_reserve_packet_buffer', 'sub_408D7E': 'hci_get_outgoing_packet_buffer', 'sub_413741': 'l2cap_create_signaling_le', 'sub_408812': 'hci_send_acl_packet_buffer', 'sub_40FA98': 'hci_dump_log'}"} |
|
XML_item_delete_function | 09e593e1a10a4f6cadf5c016cb4c8cfb0a3586515f0619eba999737feb58c9d7 | imatix | gsl | NA | static int
XML_item_delete_function (int argc, RESULT_NODE **argv, void *item, RESULT_NODE *result, THREAD *gsl_thread)
{
{
int
rc;
rc = XML_item_delete
(item);
return rc;
}
return 0; /* Just in case */
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_433035", "function_addr": 4403253, "binary_name": "09e593e1a10a4f6cadf5c016cb4c8cfb0a3586515f0619eba999737feb58c9d7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_14], edi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "mov [rbp+var_30], rcx"], [7, "mov [rbp+var_38], r8"], [8, "mov rax, [rbp+var_28]"], [9, "mov rdi, rax"], [10, "call sub_432003"], [11, "mov [rbp+var_4], eax"], [12, "mov eax, [rbp+var_4]"], [13, "leave"], [14, "retn"]], "data_dep": [[8, 5], [9, 8], [11, 10], [12, 11], [14, 12]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/09e593e1a10a4f6cadf5c016cb4c8cfb0a3586515f0619eba999737feb58c9d7_09e593e1a10a4f6cadf5c016cb4c8cfb0a3586515f0619eba999737feb58c9d7.jsonl.gz", "strip_func_name": "sub_433035", "query": "\n\n\n__int64 __fastcall sub_433035(__int64 a1, __int64 a2, __int64 a3)\n{\nreturn (unsigned int)sub_432003(a3);\n}\n\n\n\nQ:[a3,a1,a2,sub_433035,sub_432003,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'item', 'a1': 'argc', 'a2': 'argv', 'sub_433035': 'XML_item_delete_function', 'sub_432003': 'XML_item_delete'}"} |
|
page_init_thread | 47bffe37c56b485d8b6b4d4bddf00e5d23d197335713c26a3211df38072ef1f2 | shenango | shenango | NA | int page_init_thread(void)
{
tcache_init_perthread(smpage_tcache, &smpage_pt);
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407AE4", "function_addr": 4225764, "binary_name": "47bffe37c56b485d8b6b4d4bddf00e5d23d197335713c26a3211df38072ef1f2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov rax, cs:qword_411DC0"], [3, "mov rdx, fs:0"], [4, "add rdx, 0FFFFFFFFFFFFEFC8h"], [5, "mov rsi, rdx"], [6, "mov rdi, rax"], [7, "call sub_408B9B"], [8, "mov eax, 0"], [9, "pop rbp"], [10, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 2], [9, 0], [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/47bffe37c56b485d8b6b4d4bddf00e5d23d197335713c26a3211df38072ef1f2_47bffe37c56b485d8b6b4d4bddf00e5d23d197335713c26a3211df38072ef1f2.jsonl.gz", "strip_func_name": "sub_407AE4", "query": "\n\n\n__int64 sub_407AE4()\n{\nsub_408B9B(qword_411DC0, __readfsqword(0) - 4152);\nreturn 0LL;\n}\n\n\n\nQ:[sub_407AE4,sub_408B9B,]\nAssistant: ", "hints": "[]", "response": "{'sub_407AE4': 'page_init_thread', 'sub_408B9B': 'tcache_init_perthread'}"} |
|
gen_gimli24_sp | 81ce29aa58f69137bf031f7bb14e9d408e5d0886d8447f51113ff1ea114028e5 | rweather | lightweight-crypto | NA | static void gen_gimli24_sp
(const char *x, const char *y, const char *s0,
const char *s4, const char *s8)
{
/* x = leftRotate24(s0); */
printf("\tror\t%s, %s, #8\n", x, s0);
/* y = leftRotate9(s4); */
printf("\tror\t%s, %s, #23\n", y, s4);
/* s4 = y ^ x ^ ((x | s8) << 1); */
printf("\torr\t%s, %s, %s\n", s4, x, s8);
printf("\teor\t%s, %s, %s, lsl #1\n", s4, y, s4);
binop("eor", s4, x);
/* s0 = s8 ^ y ^ ((x & y) << 3); */
printf("\tand\t%s, %s, %s\n", s0, x, y);
printf("\teor\t%s, %s, %s, lsl #3\n", s0, y, s0);
binop("eor", s0, s8);
/* s8 = x ^ (s8 << 1) ^ ((y & s8) << 2); */
printf("\tand\t%s, %s, %s\n", y, y, s8);
printf("\teor\t%s, %s, %s, lsl #1\n", s8, x, s8);
printf("\teor\t%s, %s, %s, lsl #2\n", s8, s8, y);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40129A", "function_addr": 4199066, "binary_name": "81ce29aa58f69137bf031f7bb14e9d408e5d0886d8447f51113ff1ea114028e5.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_10], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "mov [rbp+var_20], rcx"], [7, "mov [rbp+var_28], r8"], [8, "mov rdx, [rbp+var_18]"], [9, "mov rax, [rbp+var_8]"], [10, "mov rsi, rax"], [11, "mov edi, offset aRorSS8"], [12, "mov eax, 0"], [13, "call _printf"], [14, "mov rdx, [rbp+var_20]"], [15, "mov rax, [rbp+var_10]"], [16, "mov rsi, rax"], [17, "mov edi, offset aRorSS23"], [18, "mov eax, 0"], [19, "call _printf"], [20, "mov rcx, [rbp+var_28]"], [21, "mov rdx, [rbp+var_8]"], [22, "mov rax, [rbp+var_20]"], [23, "mov rsi, rax"], [24, "mov edi, offset aOrrSSS"], [25, "mov eax, 0"], [26, "call _printf"], [27, "mov rcx, [rbp+var_20]"], [28, "mov rdx, [rbp+var_10]"], [29, "mov rax, [rbp+var_20]"], [30, "mov rsi, rax"], [31, "mov edi, offset aEorSSSLsl1"], [32, "mov eax, 0"], [33, "call _printf"], [34, "mov rdx, [rbp+var_8]"], [35, "mov rax, [rbp+var_20]"], [36, "mov rsi, rax"], [37, "mov edi, offset aEor"], [38, "call sub_401224"], [39, "mov rcx, [rbp+var_10]"], [40, "mov rdx, [rbp+var_8]"], [41, "mov rax, [rbp+var_18]"], [42, "mov rsi, rax"], [43, "mov edi, offset aAndSSS"], [44, "mov eax, 0"], [45, "call _printf"], [46, "mov rcx, [rbp+var_18]"], [47, "mov rdx, [rbp+var_10]"], [48, "mov rax, [rbp+var_18]"], [49, "mov rsi, rax"], [50, "mov edi, offset aEorSSSLsl3"], [51, "mov eax, 0"], [52, "call _printf"], [53, "mov rdx, [rbp+var_28]"], [54, "mov rax, [rbp+var_18]"], [55, "mov rsi, rax"], [56, "mov edi, offset aEor"], [57, "call sub_401224"], [58, "mov rcx, [rbp+var_28]"], [59, "mov rdx, [rbp+var_10]"], [60, "mov rax, [rbp+var_10]"], [61, "mov rsi, rax"], [62, "mov edi, offset aAndSSS"], [63, "mov eax, 0"], [64, "call _printf"], [65, "mov rcx, [rbp+var_28]"], [66, "mov rdx, [rbp+var_8]"], [67, "mov rax, [rbp+var_28]"], [68, "mov rsi, rax"], [69, "mov edi, offset aEorSSSLsl1"], [70, "mov eax, 0"], [71, "call _printf"], [72, "mov rcx, [rbp+var_10]"], [73, "mov rdx, [rbp+var_28]"], [74, "mov rax, [rbp+var_28]"], [75, "mov rsi, rax"], [76, "mov edi, offset aEorSSSLsl2"], [77, "mov eax, 0"], [78, "call _printf"], [79, "nop"], [80, "leave"], [81, "retn"]], "data_dep": [[8, 5], [9, 3], [10, 9], [14, 6], [15, 4], [16, 15], [20, 7], [21, 3], [22, 6], [23, 22], [27, 6], [28, 4], [29, 6], [30, 29], [34, 3], [35, 6], [36, 35], [39, 4], [40, 3], [41, 5], [42, 41], [46, 5], [47, 4], [48, 5], [49, 48], [53, 7], [54, 5], [55, 54], [58, 7], [59, 4], [60, 4], [61, 60], [65, 7], [66, 3], [67, 7], [68, 67], [72, 4], [73, 7], [74, 7], [75, 74], [81, 78]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/81ce29aa58f69137bf031f7bb14e9d408e5d0886d8447f51113ff1ea114028e5_81ce29aa58f69137bf031f7bb14e9d408e5d0886d8447f51113ff1ea114028e5.jsonl.gz", "strip_func_name": "sub_40129A", "query": "\n\n\nint __fastcall sub_40129A(const char *a1, const char *a2, const char *a3, const char *a4, const char *a5)\n{\nprintf(\"\\tror\\t%s, %s, #8\\n\", a1, a3);\nprintf(\"\\tror\\t%s, %s, #23\\n\", a2, a4);\nprintf(\"\\torr\\t%s, %s, %s\\n\", a4, a1, a5);\nprintf(\"\\teor\\t%s, %s, %s, lsl #1\\n\", a4, a2, a4);\nsub_401224(\"eor\", a4, a1);\nprintf(\"\\tand\\t%s, %s, %s\\n\", a3, a1, a2);\nprintf(\"\\teor\\t%s, %s, %s, lsl #3\\n\", a3, a2, a3);\nsub_401224(\"eor\", a3, a5);\nprintf(\"\\tand\\t%s, %s, %s\\n\", a2, a2, a5);\nprintf(\"\\teor\\t%s, %s, %s, lsl #1\\n\", a5, a1, a5);\nreturn printf(\"\\teor\\t%s, %s, %s, lsl #2\\n\", a5, a5, a2);\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,sub_40129A,sub_401224,]\nAssistant: ", "hints": "[]", "response": "{'a3': 's0', 'a4': 's4', 'a1': 'x', 'a2': 'y', 'a5': 's8', 'sub_40129A': 'gen_gimli24_sp', 'sub_401224': 'binop'}"} |
|
packed_buffer_extract_du32 | 5a31e0d18063429d016b74adb542768dc1c9a0a5c454a56601ac17c8a09820f4 | smcameron | space-nerds-in-space | NA | double packed_buffer_extract_du32(struct packed_buffer *pb, uint32_t scale)
{
return u32tod(packed_buffer_extract_u32(pb), scale);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "packed_buffer_extract_du32", "function_addr": 4245360, "binary_name": "5a31e0d18063429d016b74adb542768dc1c9a0a5c454a56601ac17c8a09820f4.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_C], esi"], [5, "mov rax, [rbp+var_8]"], [6, "mov rdi, rax"], [7, "call packed_buffer_extract_u32"], [8, "mov edx, eax"], [9, "mov eax, [rbp+var_C]"], [10, "mov esi, eax"], [11, "mov edi, edx"], [12, "call sub_40C5CC"], [13, "movq rax, xmm0"], [14, "movq xmm0, rax"], [15, "leave"], [16, "retn"]], "data_dep": [[5, 3], [6, 5], [8, 7], [9, 4], [10, 9], [11, 8], [14, 13], [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/5a31e0d18063429d016b74adb542768dc1c9a0a5c454a56601ac17c8a09820f4_5a31e0d18063429d016b74adb542768dc1c9a0a5c454a56601ac17c8a09820f4.jsonl.gz", "strip_func_name": "packed_buffer_extract_du32", "query": "\n\n\n__int64 __fastcall packed_buffer_extract_du32(__int64 a1, int a2)\n{\nint v2; // eax\n\nv2 = packed_buffer_extract_u32(a1);\nreturn sub_40C5CC(v2, a2);\n}\n\n\n\nQ:[a1,a2,sub_40C5CC,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'pb', 'a2': 'scale', 'sub_40C5CC': 'u32tod'}"} |
|
wait_for_flash_chip_erase_ff | 9acc186f551a7170c675b79ee692a13e91cfa3c1aa7cf5404e83b2937e8ed785 | insidegadgets | GBxCart-RW | NA | void wait_for_flash_chip_erase_ff(uint8_t printProgress) {
uint16_t timeout = 0;
readBuffer[0] = 0;
while (readBuffer[0] != 0xFF) {
set_number(currAddr, SET_START_ADDRESS);
set_mode(READ_ROM_RAM);
uint8_t comReadBytes = com_read_bytes(READ_BUFFER, 64);
com_read_stop(); // End read
if (comReadBytes != 64) {
fflush(stdin);
delay_ms(500);
// Flush buffer
RS232_PollComport(cport_nr, readBuffer, 64);
}
if (printProgress == 1) {
printf(".");
//printf("0x%X ", readBuffer[0]);
fflush(stdout);
}
if (readBuffer[0] != 0xFF) {
delay_ms(500);
timeout++;
if (flashCartType == 16 || flashCartType == 17) {
if (timeout >= 600) {
printf("\n\n Waiting for chip erase has timed out. Please unplug GBxCart RW, re-seat the cartridge and try again.\n");
gbx_set_error_led();
read_one_letter();
exit(1);
}
}
else {
if (timeout >= 240) {
printf("\n\n Waiting for chip erase has timed out. Please unplug GBxCart RW, re-seat the cartridge and try again.\n");
gbx_set_error_led();
read_one_letter();
exit(1);
}
}
}
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40DCF7", "function_addr": 4250871, "binary_name": "9acc186f551a7170c675b79ee692a13e91cfa3c1aa7cf5404e83b2937e8ed785.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov eax, edi"], [4, "mov [rbp+var_14], al"], [5, "mov [rbp+var_2], 0"], [6, "mov byte ptr cs:qword_418C00, 0"], [7, "jmp loc_40DE20"], [8, "mov eax, cs:dword_418E44"], [9, "mov esi, 41h "], [10, "mov edi, eax"], [11, "call sub_40BD6F"], [12, "mov edi, 52h "], [13, "call sub_40BD24"], [14, "mov esi, 40h "], [15, "mov edi, 0"], [16, "call sub_40BA81"], [17, "mov [rbp+var_3], al"], [18, "call sub_40B852"], [19, "cmp [rbp+var_3], 40h "], [20, "jz short loc_40DD7F"], [21, "mov rax, cs:stdin"], [22, "mov rdi, rax"], [23, "call _fflush"], [24, "mov edi, 1F4h"], [25, "call sub_40B247"], [26, "mov eax, cs:dword_4171A0"], [27, "mov edx, 40h "], [28, "mov esi, offset qword_418C00"], [29, "mov edi, eax"], [30, "call sub_4100D4"], [31, "cmp [rbp+var_14], 1"], [32, "jnz short loc_40DD9E"], [33, "mov edi, 2Eh "], [34, "call _putchar"], [35, "mov rax, cs:stdout"], [36, "mov rdi, rax"], [37, "call _fflush"], [38, "movzx eax, byte ptr cs:qword_418C00"], [39, "cmp al, 0FFh"], [40, "jz short loc_40DE20"], [41, "mov edi, 1F4h"], [42, "call sub_40B247"], [43, "movzx eax, [rbp+var_2]"], [44, "add eax, 1"], [45, "mov [rbp+var_2], ax"], [46, "mov eax, cs:dword_418E6C"], [47, "cmp eax, 10h"], [48, "jz short loc_40DDD4"], [49, "mov eax, cs:dword_418E6C"], [50, "cmp eax, 11h"], [51, "jnz short loc_40DDFA"], [52, "cmp [rbp+var_2], 257h"], [53, "jbe short loc_40DE20"], [54, "mov edi, offset aWaitingForChip"], [55, "call _puts"], [56, "call sub_40B73E"], [57, "call sub_40B2BB"], [58, "mov edi, 1"], [59, "call _exit"], [60, "cmp [rbp+var_2], 0EFh"], [61, "jbe short loc_40DE20"], [62, "mov edi, offset aWaitingForChip"], [63, "call _puts"], [64, "call sub_40B73E"], [65, "call sub_40B2BB"], [66, "mov edi, 1"], [67, "call _exit"], [68, "movzx eax, byte ptr cs:qword_418C00"], [69, "cmp al, 0FFh"], [70, "jnz loc_40DD16"], [71, "nop"], [72, "nop"], [73, "leave"], [74, "retn"]], "data_dep": [[4, 3], [10, 8], [17, 16], [19, 17], [20, 19], [22, 21], [29, 26], [31, 4], [32, 31], [36, 35], [38, 6], [39, 38], [40, 39], [43, 45], [43, 5], [44, 43], [45, 44], [47, 46], [48, 47], [50, 49], [51, 50], [52, 45], [53, 52], [60, 45], [61, 60], [68, 6], [69, 68], [70, 69], [74, 68]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/9acc186f551a7170c675b79ee692a13e91cfa3c1aa7cf5404e83b2937e8ed785_9acc186f551a7170c675b79ee692a13e91cfa3c1aa7cf5404e83b2937e8ed785.jsonl.gz", "strip_func_name": "sub_40DCF7", "query": "\n\n\n__int64 __fastcall sub_40DCF7(char a1)\n{\n__int64 result; // rax\nchar v2; // [rsp+1Dh] [rbp-3h]\nunsigned __int16 v3; // [rsp+1Eh] [rbp-2h]\n\nv3 = 0;\nLOBYTE(qword_418C00) = 0;\nwhile ( 1 )\n{\nresult = (unsigned __int8)qword_418C00;\nif ( (_BYTE)qword_418C00 == 0xFF )\nbreak;\nsub_40BD6F(dword_418E44, 0x41u);\nsub_40BD24(82);\nv2 = sub_40BA81(0LL, 64);\nsub_40B852();\nif ( v2 != 64 )\n{\nfflush(stdin);\nsub_40B247(0x1F4u);\nsub_4100D4((unsigned int)dword_4171A0, &qword_418C00, 64LL);\n}\nif ( a1 == 1 )\n{\nputchar(46);\nfflush(stdout);\n}\nif ( (_BYTE)qword_418C00 != 0xFF )\n{\nsub_40B247(0x1F4u);\n++v3;\nif ( dword_418E6C == 16 || dword_418E6C == 17 )\n{\nif ( v3 > 0x257u )\n{\nputs(\"\\n\\n Waiting for chip erase has timed out. Please unplug GBxCart RW, re-seat the cartridge and try again.\");\nsub_40B73E();\nsub_40B2BB();\nexit(1);\n}\n}\nelse if ( v3 > 0xEFu )\n{\nputs(\"\\n\\n Waiting for chip erase has timed out. Please unplug GBxCart RW, re-seat the cartridge and try again.\");\nsub_40B73E();\nsub_40B2BB();\nexit(1);\n}\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,v2,v3,sub_40DCF7,sub_40BD6F,sub_40BD24,sub_40BA81,sub_40B852,sub_40B247,sub_4100D4,sub_40B73E,sub_40B2BB,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'printProgress', 'v2': 'comReadBytes', 'v3': 'timeout', 'sub_40DCF7': 'wait_for_flash_chip_erase_ff', 'sub_40BD6F': 'set_number', 'sub_40BD24': 'set_mode', 'sub_40BA81': 'com_read_bytes', 'sub_40B852': 'com_read_stop', 'sub_40B247': 'delay_ms', 'sub_4100D4': 'RS232_PollComport', 'sub_40B73E': 'gbx_set_error_led', 'sub_40B2BB': 'read_one_letter'}"} |
|
mesh_configuration_server_feature_changed | 0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb | bluekitchen | btstack | NA | void mesh_configuration_server_feature_changed(void){
mesh_model_t * mesh_model = mesh_node_get_configuration_server();
mesh_heartbeat_publication_t * mesh_heartbeat_publication = &((mesh_configuration_server_model_context_t*) mesh_model->model_data)->heartbeat_publication;
// filter features by observed features for heartbeats
uint16_t current_features = mesh_foundation_get_features() & mesh_heartbeat_publication->features;
uint16_t previous_features = mesh_heartbeat_publication->active_features & mesh_heartbeat_publication->features;
// changes?
if (current_features == previous_features) return;
config_heartbeat_publication_emit(mesh_heartbeat_publication);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_442D6E", "function_addr": 4468078, "binary_name": "0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "call sub_44D1F6"], [4, "mov [rbp+var_8], rax"], [5, "mov rax, [rbp+var_8]"], [6, "mov rax, [rax+28h]"], [7, "mov [rbp+var_10], rax"], [8, "call sub_444910"], [9, "mov edx, eax"], [10, "mov rax, [rbp+var_10]"], [11, "movzx eax, word ptr [rax+2Eh]"], [12, "and eax, edx"], [13, "mov [rbp+var_12], ax"], [14, "mov rax, [rbp+var_10]"], [15, "movzx edx, word ptr [rax+22h]"], [16, "mov rax, [rbp+var_10]"], [17, "movzx eax, word ptr [rax+2Eh]"], [18, "and eax, edx"], [19, "mov [rbp+var_14], ax"], [20, "movzx eax, [rbp+var_12]"], [21, "cmp ax, [rbp+var_14]"], [22, "jz short loc_442DCE"], [23, "mov rax, [rbp+var_10]"], [24, "mov rdi, rax"], [25, "call sub_442C3F"], [26, "jmp short locret_442DCF"], [27, "nop"], [28, "leave"], [29, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [9, 8], [10, 7], [11, 10], [12, 9], [12, 11], [13, 12], [14, 7], [15, 14], [16, 7], [17, 16], [18, 17], [18, 15], [19, 18], [20, 13], [21, 19], [21, 20], [22, 21], [23, 7], [24, 23], [29, 20], [29, 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/0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb_0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb.jsonl.gz", "strip_func_name": "sub_442D6E", "query": "\n\n\n__int64 sub_442D6E()\n{\n__int64 result; // rax\nunsigned __int16 v1; // [rsp+Eh] [rbp-12h]\n__int64 v2; // [rsp+10h] [rbp-10h]\n\nv2 = *(_QWORD *)(sub_44D1F6() + 40);\nv1 = sub_444910() & *(_WORD *)(v2 + 46);\nresult = v1;\nif ( v1 != (*(_WORD *)(v2 + 34) & *(_WORD *)(v2 + 46)) )\nresult = sub_442C3F(v2);\nreturn result;\n}\n\n\n\nQ:[v2,sub_442D6E,sub_44D1F6,sub_444910,sub_442C3F,]\nAssistant: ", "hints": "[]", "response": "{'v2': 'mesh_heartbeat_publication', 'sub_442D6E': 'mesh_configuration_server_feature_changed', 'sub_44D1F6': 'mesh_node_get_configuration_server', 'sub_444910': 'mesh_foundation_get_features', 'sub_442C3F': 'config_heartbeat_publication_emit'}"} |
|
lex | 930347469bac9183375198619f076dc6688ca59a864a7ef93d32908a415faf71 | deadpixi | sam | NA | int64_t
lex(void){
int64_t c= *exprp++;
switch(c){
case '\\':
if(*exprp)
if((c= *exprp++)=='n')
c='\n';
break;
case 0:
c = END;
--exprp; /* In case we come here again */
break;
case '*':
c = STAR;
break;
case '?':
c = QUEST;
break;
case '+':
c = PLUS;
break;
case '|':
c = OR;
break;
case '.':
c = ANY;
break;
case '(':
c = LBRA;
break;
case ')':
c = RBRA;
break;
case '^':
c = BOL;
break;
case '$':
c = EOL;
break;
case '[':
c = CCLASS;
bldcclass();
break;
}
return c;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40E1D5", "function_addr": 4252117, "binary_name": "930347469bac9183375198619f076dc6688ca59a864a7ef93d32908a415faf71.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov rax, cs:qword_439100"], [4, "lea rdx, [rax+4]"], [5, "mov cs:qword_439100, rdx"], [6, "mov eax, [rax]"], [7, "cdqe"], [8, "mov [rbp+var_8], rax"], [9, "cmp [rbp+var_8], 7Ch "], [10, "jz loc_40E2F3"], [11, "cmp [rbp+var_8], 7Ch "], [12, "jg def_40E253"], [13, "cmp [rbp+var_8], 0"], [14, "jz loc_40E298"], [15, "cmp [rbp+var_8], 0"], [16, "js def_40E253"], [17, "cmp [rbp+var_8], 5Eh "], [18, "jg def_40E253"], [19, "cmp [rbp+var_8], 24h "], [20, "jl def_40E253"], [21, "mov rax, [rbp+var_8]"], [22, "sub rax, 24h "], [23, "cmp rax, 3Ah"], [24, "ja def_40E253"], [25, "mov rax, ds:jpt_40E253[rax*8]"], [26, "jmp rax"], [27, "mov rax, cs:qword_439100"], [28, "mov eax, [rax]"], [29, "test eax, eax"], [30, "jz loc_40E368"], [31, "mov rax, cs:qword_439100"], [32, "lea rdx, [rax+4]"], [33, "mov cs:qword_439100, rdx"], [34, "mov eax, [rax]"], [35, "cdqe"], [36, "mov [rbp+var_8], rax"], [37, "cmp [rbp+var_8], 6Eh "], [38, "jnz loc_40E368"], [39, "mov [rbp+var_8], 0Ah"], [40, "jmp loc_40E368"], [41, "mov rax, 200000077h"], [42, "mov [rbp+var_8], rax"], [43, "mov rax, cs:qword_439100"], [44, "sub rax, 4"], [45, "mov cs:qword_439100, rax"], [46, "jmp def_40E253"], [47, "mov rax, 100000005h"], [48, "mov [rbp+var_8], rax"], [49, "jmp def_40E253"], [50, "mov rax, 100000007h"], [51, "mov [rbp+var_8], rax"], [52, "jmp def_40E253"], [53, "mov rax, 100000006h"], [54, "mov [rbp+var_8], rax"], [55, "jmp short def_40E253"], [56, "mov rax, 100000003h"], [57, "mov [rbp+var_8], rax"], [58, "jmp short def_40E253"], [59, "mov rax, 200000000h"], [60, "mov [rbp+var_8], rax"], [61, "jmp short def_40E253"], [62, "mov rax, 100000002h"], [63, "mov [rbp+var_8], rax"], [64, "jmp short def_40E253"], [65, "mov rax, 100000001h"], [66, "mov [rbp+var_8], rax"], [67, "jmp short def_40E253"], [68, "mov rax, 200000002h"], [69, "mov [rbp+var_8], rax"], [70, "jmp short def_40E253"], [71, "mov rax, 200000003h"], [72, "mov [rbp+var_8], rax"], [73, "jmp short def_40E253"], [74, "mov rax, 200000004h"], [75, "mov [rbp+var_8], rax"], [76, "call sub_40E42D"], [77, "jmp short def_40E253"], [78, "nop"], [79, "mov rax, [rbp+var_8]"], [80, "leave"], [81, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 3], [8, 6], [9, 8], [10, 9], [11, 8], [12, 11], [13, 8], [14, 13], [15, 8], [16, 15], [17, 8], [18, 17], [19, 8], [20, 19], [21, 8], [22, 21], [23, 22], [24, 23], [26, 25], [27, 5], [28, 27], [29, 28], [30, 29], [31, 5], [32, 31], [32, 4], [33, 32], [34, 31], [36, 34], [37, 36], [38, 37], [42, 41], [43, 5], [44, 43], [45, 44], [48, 47], [51, 50], [54, 53], [57, 56], [60, 59], [63, 62], [66, 65], [69, 68], [72, 71], [75, 74], [79, 39], [79, 36], [79, 42], [79, 51], [79, 48], [79, 54], [79, 8], [79, 57], [79, 66], [79, 72], [79, 69], [79, 75], [79, 60], [79, 63], [81, 79]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/930347469bac9183375198619f076dc6688ca59a864a7ef93d32908a415faf71_930347469bac9183375198619f076dc6688ca59a864a7ef93d32908a415faf71.jsonl.gz", "strip_func_name": "sub_40E1D5", "query": "\n\n\n__int64 sub_40E1D5()\n{\nint *v0; // rax\nint *v1; // rax\n__int64 v3; // [rsp+8h] [rbp-8h]\n\nv0 = (int *)qword_439100;\nqword_439100 += 4LL;\nv3 = *v0;\nif ( v3 == 124 )\nreturn 0x100000003LL;\nif ( v3 <= 124 )\n{\nif ( *v0 )\n{\nif ( v3 >= 0 && v3 <= 94 && v3 >= 36 )\n{\nswitch ( *v0 )\n{\ncase '$':\nv3 = 0x200000003LL;\nbreak;\ncase '(':\nv3 = 0x100000002LL;\nbreak;\ncase ')':\nv3 = 0x100000001LL;\nbreak;\ncase '*':\nv3 = 0x100000005LL;\nbreak;\ncase '+':\nv3 = 0x100000006LL;\nbreak;\ncase '.':\nv3 = 0x200000000LL;\nbreak;\ncase '?':\nv3 = 0x100000007LL;\nbreak;\ncase '[':\nv3 = 0x200000004LL;\nsub_40E42D();\nbreak;\ncase '\\\\':\nif ( *(_DWORD *)qword_439100 )\n{\nv1 = (int *)qword_439100;\nqword_439100 += 4LL;\nv3 = *v1;\nif ( v3 == 110 )\nv3 = 10LL;\n}\nbreak;\ncase '^':\nv3 = 0x200000002LL;\nbreak;\ndefault:\nreturn v3;\n}\n}\n}\nelse\n{\nv3 = 0x200000077LL;\nqword_439100 -= 4LL;\n}\n}\nreturn v3;\n}\n\n\n\nQ:[v3,sub_40E1D5,sub_40E42D,]\nAssistant: ", "hints": "[]", "response": "{'v3': 'c', 'sub_40E1D5': 'lex', 'sub_40E42D': 'bldcclass'}"} |
|
sl_btmesh_on_demand_private_proxy_server_init | 81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba | openthread | ot-efr32 | NA | sl_status_t sl_btmesh_on_demand_private_proxy_server_init() {
struct sl_btmesh_packet *cmd = (struct sl_btmesh_packet *)sl_btmesh_cmd_msg;
struct sl_btmesh_packet *rsp = (struct sl_btmesh_packet *)sl_btmesh_rsp_msg;
cmd->header=sl_btmesh_cmd_on_demand_private_proxy_server_init_id+(((0)&0xff)<<8)+(((0)&0x700)>>8);
sl_btmesh_host_handle_command();
return rsp->data.rsp_on_demand_private_proxy_server_init.result;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41B1AD", "function_addr": 4305325, "binary_name": "81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov rax, cs:off_4262A0"], [4, "mov [rbp+var_8], rax"], [5, "mov rax, cs:off_4262A8"], [6, "mov [rbp+var_10], rax"], [7, "mov rax, [rbp+var_8]"], [8, "mov dword ptr [rax], 16A0028h"], [9, "mov eax, 0"], [10, "call sub_40AE8C"], [11, "mov rax, [rbp+var_10]"], [12, "movzx eax, word ptr [rax+4]"], [13, "movzx eax, ax"], [14, "leave"], [15, "retn"]], "data_dep": [[4, 3], [6, 5], [7, 4], [8, 7], [11, 6], [12, 11], [12, 8], [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/81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba_81aa098a63781dea095636706b4efb743002920d6b160bbee91240bbf493efba.jsonl.gz", "strip_func_name": "sub_41B1AD", "query": "\n\n\n__int64 __fastcall sub_41B1AD(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\nunsigned __int16 *v7; // [rsp+0h] [rbp-10h]\n\nv7 = (unsigned __int16 *)off_4262A8;\n*(_DWORD *)off_4262A0 = 23724072;\nsub_40AE8C(a1, a2, a3, a4, a5, a6);\nreturn v7[2];\n}\n\n\n\nQ:[v7,sub_41B1AD,sub_40AE8C,]\nAssistant: ", "hints": "[]", "response": "{'v7': 'rsp_0', 'sub_41B1AD': 'sl_btmesh_on_demand_private_proxy_server_init', 'sub_40AE8C': 'sl_btmesh_host_handle_command'}"} |
|
writeRuleText | 621e66eae5bc69ceb9ee99c666dc6a91c0b6573d72b5fa9199ea18735a671258 | drhsqlite | pikchr | NA | static void writeRuleText(FILE *out, struct rule *rp){
int j;
fprintf(out,"%s ::=", rp->lhs->name);
for(j=0; j<rp->nrhs; j++){
struct symbol *sp = rp->rhs[j];
if( sp->type!=MULTITERMINAL ){
fprintf(out," %s", sp->name);
}else{
int k;
fprintf(out," %s", sp->subsym[0]->name);
for(k=1; k<sp->nsubsym; k++){
fprintf(out,"|%s",sp->subsym[k]->name);
}
}
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40C2F7", "function_addr": 4244215, "binary_name": "621e66eae5bc69ceb9ee99c666dc6a91c0b6573d72b5fa9199ea18735a671258.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+stream], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov rax, [rbp+var_20]"], [6, "mov rax, [rax]"], [7, "mov rdx, [rax]"], [8, "mov rax, [rbp+stream]"], [9, "mov esi, offset aS_2"], [10, "mov rdi, rax"], [11, "mov eax, 0"], [12, "call _fprintf"], [13, "mov [rbp+var_4], 0"], [14, "jmp loc_40C3EA"], [15, "mov rax, [rbp+var_20]"], [16, "mov rdx, [rax+20h]"], [17, "mov eax, [rbp+var_4]"], [18, "cdqe"], [19, "shl rax, 3"], [20, "add rax, rdx"], [21, "mov rax, [rax]"], [22, "mov [rbp+var_10], rax"], [23, "mov rax, [rbp+var_10]"], [24, "mov eax, [rax+0Ch]"], [25, "cmp eax, 2"], [26, "jz short loc_40C379"], [27, "mov rax, [rbp+var_10]"], [28, "mov rdx, [rax]"], [29, "mov rax, [rbp+stream]"], [30, "mov esi, offset aS"], [31, "mov rdi, rax"], [32, "mov eax, 0"], [33, "call _fprintf"], [34, "jmp short loc_40C3E6"], [35, "mov rax, [rbp+var_10]"], [36, "mov rax, [rax+60h]"], [37, "mov rax, [rax]"], [38, "mov rdx, [rax]"], [39, "mov rax, [rbp+stream]"], [40, "mov esi, offset aS"], [41, "mov rdi, rax"], [42, "mov eax, 0"], [43, "call _fprintf"], [44, "mov [rbp+var_8], 1"], [45, "jmp short loc_40C3DA"], [46, "mov rax, [rbp+var_10]"], [47, "mov rdx, [rax+60h]"], [48, "mov eax, [rbp+var_8]"], [49, "cdqe"], [50, "shl rax, 3"], [51, "add rax, rdx"], [52, "mov rax, [rax]"], [53, "mov rdx, [rax]"], [54, "mov rax, [rbp+stream]"], [55, "mov esi, offset aS_0"], [56, "mov rdi, rax"], [57, "mov eax, 0"], [58, "call _fprintf"], [59, "add [rbp+var_8], 1"], [60, "mov rax, [rbp+var_10]"], [61, "mov eax, [rax+58h]"], [62, "cmp [rbp+var_8], eax"], [63, "jl short loc_40C3A6"], [64, "add [rbp+var_4], 1"], [65, "mov rax, [rbp+var_20]"], [66, "mov eax, [rax+18h]"], [67, "cmp [rbp+var_4], eax"], [68, "jl loc_40C333"], [69, "nop"], [70, "nop"], [71, "leave"], [72, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [8, 3], [10, 8], [15, 4], [16, 15], [17, 64], [17, 13], [19, 17], [20, 16], [20, 19], [21, 20], [22, 21], [23, 22], [24, 23], [25, 24], [26, 25], [27, 22], [28, 27], [29, 3], [31, 29], [35, 22], [36, 35], [37, 36], [38, 37], [39, 3], [41, 39], [46, 22], [47, 46], [48, 44], [48, 59], [50, 48], [51, 47], [51, 50], [52, 51], [53, 52], [54, 3], [56, 54], [59, 44], [59, 59], [60, 22], [61, 60], [62, 44], [62, 59], [62, 61], [63, 62], [64, 13], [64, 64], [65, 4], [66, 65], [67, 13], [67, 64], [67, 66], [68, 67], [72, 66]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/621e66eae5bc69ceb9ee99c666dc6a91c0b6573d72b5fa9199ea18735a671258_621e66eae5bc69ceb9ee99c666dc6a91c0b6573d72b5fa9199ea18735a671258.jsonl.gz", "strip_func_name": "sub_40C2F7", "query": "\n\n\n__int64 __fastcall sub_40C2F7(FILE *a1, __int64 a2)\n{\n__int64 result; // rax\n__int64 v3; // [rsp+10h] [rbp-10h]\nint j; // [rsp+18h] [rbp-8h]\nint i; // [rsp+1Ch] [rbp-4h]\n\nfprintf(a1, \"%s ::=\", **(const char ***)a2);\nfor ( i = 0; ; ++i )\n{\nresult = *(unsigned int *)(a2 + 24);\nif ( i >= (int)result )\nbreak;\nv3 = *(_QWORD *)(*(_QWORD *)(a2 + 32) + 8LL * i);\nif ( *(_DWORD *)(v3 + 12) == 2 )\n{\nfprintf(a1, \" %s\", ***(const char ****)(v3 + 96));\nfor ( j = 1; j < *(_DWORD *)(v3 + 88); ++j )\nfprintf(a1, \"|%s\", **(const char ***)(*(_QWORD *)(v3 + 96) + 8LL * j));\n}\nelse\n{\nfprintf(a1, \" %s\", *(const char **)v3);\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v3,sub_40C2F7,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'out', 'a2': 'rp', 'v3': 'sp_0', 'sub_40C2F7': 'writeRuleText'}"} |
|
mbedtls_mpi_lsb | 069897a66919e64b0e46b98fa4ff249d13ba120504065102080d0e852ae5343b | FreeRTOS | iot-reference-stm32u5 | NA | size_t mbedtls_mpi_lsb( const mbedtls_mpi *X )
{
size_t i, j, count = 0;
MBEDTLS_INTERNAL_VALIDATE_RET( X != NULL, 0 );
for( i = 0; i < X->n; i++ )
for( j = 0; j < biL; j++, count++ )
if( ( ( X->p[i] >> j ) & 1 ) != 0 )
return( count );
return( 0 );
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_433C40", "function_addr": 4406336, "binary_name": "069897a66919e64b0e46b98fa4ff249d13ba120504065102080d0e852ae5343b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_28], rdi"], [3, "mov [rbp+var_18], 0"], [4, "mov [rbp+var_8], 0"], [5, "jmp short loc_433CA7"], [6, "mov [rbp+var_10], 0"], [7, "jmp short loc_433C9B"], [8, "mov rax, [rbp+var_28]"], [9, "mov rdx, [rax+10h]"], [10, "mov rax, [rbp+var_8]"], [11, "shl rax, 3"], [12, "add rax, rdx"], [13, "mov rax, [rax]"], [14, "mov rdx, [rbp+var_10]"], [15, "mov ecx, edx"], [16, "shr rax, cl"], [17, "and eax, 1"], [18, "test rax, rax"], [19, "jz short loc_433C91"], [20, "mov rax, [rbp+var_18]"], [21, "jmp short loc_433CBA"], [22, "add [rbp+var_10], 1"], [23, "add [rbp+var_18], 1"], [24, "cmp [rbp+var_10], 3Fh "], [25, "jbe short loc_433C64"], [26, "add [rbp+var_8], 1"], [27, "mov rax, [rbp+var_28]"], [28, "mov rax, [rax+8]"], [29, "cmp [rbp+var_8], rax"], [30, "jb short loc_433C5A"], [31, "mov eax, 0"], [32, "pop rbp"], [33, "retn"]], "data_dep": [[8, 2], [9, 8], [10, 26], [10, 4], [11, 10], [12, 9], [12, 11], [13, 12], [14, 22], [14, 6], [15, 14], [16, 13], [16, 15], [17, 16], [18, 17], [19, 18], [20, 23], [20, 3], [22, 22], [22, 6], [23, 3], [23, 23], [24, 22], [24, 6], [25, 24], [26, 26], [26, 4], [27, 2], [28, 27], [29, 26], [29, 4], [29, 28], [30, 29], [32, 0], [33, 20], [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/069897a66919e64b0e46b98fa4ff249d13ba120504065102080d0e852ae5343b_069897a66919e64b0e46b98fa4ff249d13ba120504065102080d0e852ae5343b.jsonl.gz", "strip_func_name": "sub_433C40", "query": "\n\n\n__int64 __fastcall sub_433C40(__int64 a1)\n{\n__int64 v2; // [rsp+10h] [rbp-18h]\nunsigned __int64 j; // [rsp+18h] [rbp-10h]\nunsigned __int64 i; // [rsp+20h] [rbp-8h]\n\nv2 = 0LL;\nfor ( i = 0LL; i < *(_QWORD *)(a1 + 8); ++i )\n{\nfor ( j = 0LL; j <= 0x3F; ++j )\n{\nif ( ((*(_QWORD *)(*(_QWORD *)(a1 + 16) + 8 * i) >> j) & 1LL) != 0 )\nreturn v2;\n++v2;\n}\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,v2,sub_433C40,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'X', 'v2': 'count', 'sub_433C40': 'mbedtls_mpi_lsb'}"} |
|
build_ipv4_header | c2776a01a11bf826b33e94357dff53cf4b335059b9f2a693e47a922580bbc422 | beagleboard | linux | NA | static int build_ipv4_header(void *header, int payload_len)
{
struct iphdr *iph = header;
iph->ihl = 5;
iph->version = 4;
iph->ttl = 8;
iph->tot_len = htons(sizeof(*iph) + sizeof(struct udphdr) + payload_len);
iph->id = htons(1337);
iph->protocol = IPPROTO_UDP;
iph->saddr = htonl((172 << 24) | (17 << 16) | 2);
iph->daddr = htonl((172 << 24) | (17 << 16) | 1);
iph->check = build_ip_csum((void *) iph, iph->ihl << 1, 0);
return iph->ihl << 2;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4018B8", "function_addr": 4200632, "binary_name": "c2776a01a11bf826b33e94357dff53cf4b335059b9f2a693e47a922580bbc422.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 rax, [rbp+var_18]"], [6, "mov [rbp+var_8], rax"], [7, "mov rax, [rbp+var_8]"], [8, "movzx edx, byte ptr [rax]"], [9, "and edx, 0FFFFFFF0h"], [10, "or edx, 5"], [11, "mov [rax], dl"], [12, "mov rax, [rbp+var_8]"], [13, "movzx edx, byte ptr [rax]"], [14, "and edx, 0Fh"], [15, "or edx, 40h"], [16, "mov [rax], dl"], [17, "mov rax, [rbp+var_8]"], [18, "mov byte ptr [rax+8], 8"], [19, "mov eax, [rbp+var_1C]"], [20, "add eax, 1Ch"], [21, "movzx eax, ax"], [22, "mov edi, eax"], [23, "call _htons"], [24, "mov rdx, [rbp+var_8]"], [25, "mov [rdx+2], ax"], [26, "mov edi, 539h"], [27, "call _htons"], [28, "mov rdx, [rbp+var_8]"], [29, "mov [rdx+4], ax"], [30, "mov rax, [rbp+var_8]"], [31, "mov byte ptr [rax+9], 11h"], [32, "mov edi, 0AC110002h"], [33, "call _htonl"], [34, "mov rdx, [rbp+var_8]"], [35, "mov [rdx+0Ch], eax"], [36, "mov edi, 0AC110001h"], [37, "call _htonl"], [38, "mov rdx, [rbp+var_8]"], [39, "mov [rdx+10h], eax"], [40, "mov rax, [rbp+var_8]"], [41, "movzx eax, byte ptr [rax]"], [42, "and eax, 0Fh"], [43, "movzx eax, al"], [44, "lea ecx, [rax+rax]"], [45, "mov rax, [rbp+var_8]"], [46, "mov edx, 0"], [47, "mov esi, ecx"], [48, "mov rdi, rax"], [49, "call sub_401743"], [50, "mov rdx, [rbp+var_8]"], [51, "mov [rdx+0Ah], ax"], [52, "mov rax, [rbp+var_8]"], [53, "movzx eax, byte ptr [rax]"], [54, "and eax, 0Fh"], [55, "movzx eax, al"], [56, "shl eax, 2"], [57, "leave"], [58, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [11, 7], [11, 10], [12, 6], [13, 11], [13, 12], [14, 13], [15, 14], [16, 12], [16, 15], [17, 6], [18, 17], [19, 4], [20, 19], [21, 20], [22, 21], [24, 6], [25, 23], [25, 24], [28, 6], [29, 28], [29, 27], [30, 6], [31, 30], [34, 6], [35, 33], [35, 34], [38, 6], [39, 38], [39, 37], [40, 6], [41, 40], [41, 39], [41, 16], [42, 41], [43, 42], [44, 39], [44, 43], [45, 6], [47, 44], [48, 45], [50, 6], [51, 50], [51, 49], [52, 6], [53, 16], [53, 52], [53, 51], [54, 53], [55, 54], [56, 55], [58, 56]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/c2776a01a11bf826b33e94357dff53cf4b335059b9f2a693e47a922580bbc422_c2776a01a11bf826b33e94357dff53cf4b335059b9f2a693e47a922580bbc422.jsonl.gz", "strip_func_name": "sub_4018B8", "query": "\n\n\n__int64 __fastcall sub_4018B8(__int64 a1, __int16 a2)\n{\n*(_BYTE *)a1 = *(_BYTE *)a1 & 0xF0 | 5;\n*(_BYTE *)a1 = *(_BYTE *)a1 & 0xF | 0x40;\n*(_BYTE *)(a1 + 8) = 8;\n*(_WORD *)(a1 + 2) = htons(a2 + 28);\n*(_WORD *)(a1 + 4) = htons(0x539u);\n*(_BYTE *)(a1 + 9) = 17;\n*(_DWORD *)(a1 + 12) = htonl(0xAC110002);\n*(_DWORD *)(a1 + 16) = htonl(0xAC110001);\n*(_WORD *)(a1 + 10) = sub_401743(a1, 2 * (*(_BYTE *)a1 & 0xFu), 0LL);\nreturn 4 * (*(_BYTE *)a1 & 0xFu);\n}\n\n\n\nQ:[a1,a2,sub_4018B8,sub_401743,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'header', 'a2': 'payload_len', 'sub_4018B8': 'build_ipv4_header', 'sub_401743': 'build_ip_csum'}"} |
|
init | 9f1b2f640a29d53f50c3774a8bb5988db863706486dc04b5e4a4f1ce22d6b25b | DataSystemsLab | hippo-postgresql | NA | static void
init(bool is_no_vacuum)
{
/*
* The scale factor at/beyond which 32-bit integers are insufficient for
* storing TPC-B account IDs.
*
* Although the actual threshold is 21474, we use 20000 because it is easier to
* document and remember, and isn't that far away from the real threshold.
*/
#define SCALE_32BIT_THRESHOLD 20000
/*
* Note: TPC-B requires at least 100 bytes per row, and the "filler"
* fields in these table declarations were intended to comply with that.
* The pgbench_accounts table complies with that because the "filler"
* column is set to blank-padded empty string. But for all other tables
* the columns default to NULL and so don't actually take any space. We
* could fix that by giving them non-null default values. However, that
* would completely break comparability of pgbench results with prior
* versions. Since pgbench has never pretended to be fully TPC-B compliant
* anyway, we stick with the historical behavior.
*/
struct ddlinfo
{
const char *table; /* table name */
const char *smcols; /* column decls if accountIDs are 32 bits */
const char *bigcols; /* column decls if accountIDs are 64 bits */
int declare_fillfactor;
};
static const struct ddlinfo DDLs[] = {
{
"pgbench_history",
"tid int,bid int,aid int,delta int,mtime timestamp,filler char(22)",
"tid int,bid int,aid bigint,delta int,mtime timestamp,filler char(22)",
0
},
{
"pgbench_tellers",
"tid int not null,bid int,tbalance int,filler char(84)",
"tid int not null,bid int,tbalance int,filler char(84)",
1
},
{
"pgbench_accounts",
"aid int not null,bid int,abalance int,filler char(84)",
"aid bigint not null,bid int,abalance int,filler char(84)",
1
},
{
"pgbench_branches",
"bid int not null,bbalance int,filler char(88)",
"bid int not null,bbalance int,filler char(88)",
1
}
};
static const char *const DDLINDEXes[] = {
"alter table pgbench_branches add primary key (bid)",
"alter table pgbench_tellers add primary key (tid)",
"alter table pgbench_accounts add primary key (aid)"
};
static const char *const DDLKEYs[] = {
"alter table pgbench_tellers add foreign key (bid) references pgbench_branches",
"alter table pgbench_accounts add foreign key (bid) references pgbench_branches",
"alter table pgbench_history add foreign key (bid) references pgbench_branches",
"alter table pgbench_history add foreign key (tid) references pgbench_tellers",
"alter table pgbench_history add foreign key (aid) references pgbench_accounts"
};
PGconn *con;
PGresult *res;
char sql[256];
int i;
int64 k;
/* used to track elapsed time and estimate of the remaining time */
instr_time start,
diff;
double elapsed_sec,
remaining_sec;
int log_interval = 1;
if ((con = doConnect()) == NULL)
exit(1);
for (i = 0; i < lengthof(DDLs); i++)
{
char opts[256];
char buffer[256];
const struct ddlinfo *ddl = &DDLs[i];
const char *cols;
/* Remove old table, if it exists. */
snprintf(buffer, sizeof(buffer), "drop table if exists %s", ddl->table);
executeStatement(con, buffer);
/* Construct new create table statement. */
opts[0] = '\0';
if (ddl->declare_fillfactor)
snprintf(opts + strlen(opts), sizeof(opts) - strlen(opts),
" with (fillfactor=%d)", fillfactor);
if (tablespace != NULL)
{
char *escape_tablespace;
escape_tablespace = PQescapeIdentifier(con, tablespace,
strlen(tablespace));
snprintf(opts + strlen(opts), sizeof(opts) - strlen(opts),
" tablespace %s", escape_tablespace);
PQfreemem(escape_tablespace);
}
cols = (scale >= SCALE_32BIT_THRESHOLD) ? ddl->bigcols : ddl->smcols;
snprintf(buffer, sizeof(buffer), "create%s table %s(%s)%s",
unlogged_tables ? " unlogged" : "",
ddl->table, cols, opts);
executeStatement(con, buffer);
}
executeStatement(con, "begin");
for (i = 0; i < nbranches * scale; i++)
{
/* "filler" column defaults to NULL */
snprintf(sql, sizeof(sql),
"insert into pgbench_branches(bid,bbalance) values(%d,0)",
i + 1);
executeStatement(con, sql);
}
for (i = 0; i < ntellers * scale; i++)
{
/* "filler" column defaults to NULL */
snprintf(sql, sizeof(sql),
"insert into pgbench_tellers(tid,bid,tbalance) values (%d,%d,0)",
i + 1, i / ntellers + 1);
executeStatement(con, sql);
}
executeStatement(con, "commit");
/*
* fill the pgbench_accounts table with some data
*/
fprintf(stderr, "creating tables...\n");
executeStatement(con, "begin");
executeStatement(con, "truncate pgbench_accounts");
res = PQexec(con, "copy pgbench_accounts from stdin");
if (PQresultStatus(res) != PGRES_COPY_IN)
{
fprintf(stderr, "%s", PQerrorMessage(con));
exit(1);
}
PQclear(res);
INSTR_TIME_SET_CURRENT(start);
for (k = 0; k < (int64) naccounts * scale; k++)
{
int64 j = k + 1;
/* "filler" column defaults to blank padded empty string */
snprintf(sql, sizeof(sql),
INT64_FORMAT "\t" INT64_FORMAT "\t%d\t\n",
j, k / naccounts + 1, 0);
if (PQputline(con, sql))
{
fprintf(stderr, "PQputline failed\n");
exit(1);
}
/*
* If we want to stick with the original logging, print a message each
* 100k inserted rows.
*/
if ((!use_quiet) && (j % 100000 == 0))
{
INSTR_TIME_SET_CURRENT(diff);
INSTR_TIME_SUBTRACT(diff, start);
elapsed_sec = INSTR_TIME_GET_DOUBLE(diff);
remaining_sec = ((double) scale * naccounts - j) * elapsed_sec / j;
fprintf(stderr, INT64_FORMAT " of " INT64_FORMAT " tuples (%d%%) done (elapsed %.2f s, remaining %.2f s)\n",
j, (int64) naccounts * scale,
(int) (((int64) j * 100) / (naccounts * (int64) scale)),
elapsed_sec, remaining_sec);
}
/* let's not call the timing for each row, but only each 100 rows */
else if (use_quiet && (j % 100 == 0))
{
INSTR_TIME_SET_CURRENT(diff);
INSTR_TIME_SUBTRACT(diff, start);
elapsed_sec = INSTR_TIME_GET_DOUBLE(diff);
remaining_sec = ((double) scale * naccounts - j) * elapsed_sec / j;
/* have we reached the next interval (or end)? */
if ((j == scale * naccounts) || (elapsed_sec >= log_interval * LOG_STEP_SECONDS))
{
fprintf(stderr, INT64_FORMAT " of " INT64_FORMAT " tuples (%d%%) done (elapsed %.2f s, remaining %.2f s)\n",
j, (int64) naccounts * scale,
(int) (((int64) j * 100) / (naccounts * (int64) scale)), elapsed_sec, remaining_sec);
/* skip to the next interval */
log_interval = (int) ceil(elapsed_sec / LOG_STEP_SECONDS);
}
}
}
if (PQputline(con, "\\.\n"))
{
fprintf(stderr, "very last PQputline failed\n");
exit(1);
}
if (PQendcopy(con))
{
fprintf(stderr, "PQendcopy failed\n");
exit(1);
}
executeStatement(con, "commit");
/* vacuum */
if (!is_no_vacuum)
{
fprintf(stderr, "vacuum...\n");
executeStatement(con, "vacuum analyze pgbench_branches");
executeStatement(con, "vacuum analyze pgbench_tellers");
executeStatement(con, "vacuum analyze pgbench_accounts");
executeStatement(con, "vacuum analyze pgbench_history");
}
/*
* create indexes
*/
fprintf(stderr, "set primary keys...\n");
for (i = 0; i < lengthof(DDLINDEXes); i++)
{
char buffer[256];
strlcpy(buffer, DDLINDEXes[i], sizeof(buffer));
if (index_tablespace != NULL)
{
char *escape_tablespace;
escape_tablespace = PQescapeIdentifier(con, index_tablespace,
strlen(index_tablespace));
snprintf(buffer + strlen(buffer), sizeof(buffer) - strlen(buffer),
" using index tablespace %s", escape_tablespace);
PQfreemem(escape_tablespace);
}
executeStatement(con, buffer);
}
/*
* create foreign keys
*/
if (foreign_keys)
{
fprintf(stderr, "set foreign keys...\n");
for (i = 0; i < lengthof(DDLKEYs); i++)
{
executeStatement(con, DDLKEYs[i]);
}
}
fprintf(stderr, "done.\n");
PQfinish(con);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4077CB", "function_addr": 4224971, "binary_name": "9f1b2f640a29d53f50c3774a8bb5988db863706486dc04b5e4a4f1ce22d6b25b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r12"], [3, "push rbx"], [4, "sub rsp, 390h"], [5, "mov eax, edi"], [6, "mov [rbp+var_394], al"], [7, "mov [rbp+var_24], 1"], [8, "call sub_40412C"], [9, "mov [rbp+var_30], rax"], [10, "cmp [rbp+var_30], 0"], [11, "jnz short loc_407802"], [12, "mov edi, 1"], [13, "call _exit"], [14, "mov [rbp+var_14], 0"], [15, "jmp loc_4079EB"], [16, "mov eax, [rbp+var_14]"], [17, "cdqe"], [18, "shl rax, 5"], [19, "add rax, 419E80h"], [20, "mov [rbp+var_60], rax"], [21, "mov rax, [rbp+var_60]"], [22, "mov rdx, [rax]"], [23, "lea rax, [rbp+s]"], [24, "mov rcx, rdx"], [25, "mov edx, offset aDropTableIfExi"], [26, "mov esi, 100h"], [27, "mov rdi, rax"], [28, "mov eax, 0"], [29, "call _snprintf"], [30, "lea rdx, [rbp+s]"], [31, "mov rax, [rbp+var_30]"], [32, "mov rsi, rdx"], [33, "mov rdi, rax"], [34, "call sub_404034"], [35, "mov [rbp+var_390], 0"], [36, "mov rax, [rbp+var_60]"], [37, "mov eax, [rax+18h]"], [38, "test eax, eax"], [39, "jz short loc_4078C1"], [40, "mov ebx, cs:dword_425384"], [41, "lea rax, [rbp+var_390]"], [42, "mov rdi, rax"], [43, "call _strlen"], [44, "mov edx, 100h"], [45, "sub rdx, rax"], [46, "mov r12, rdx"], [47, "lea rax, [rbp+var_390]"], [48, "mov rdi, rax"], [49, "call _strlen"], [50, "lea rdx, [rbp+var_390]"], [51, "add rax, rdx"], [52, "mov ecx, ebx"], [53, "mov edx, offset aWithFillfactor"], [54, "mov rsi, r12"], [55, "mov rdi, rax"], [56, "mov eax, 0"], [57, "call _snprintf"], [58, "mov rax, cs:s"], [59, "test rax, rax"], [60, "jz loc_407956"], [61, "mov rax, cs:s"], [62, "mov rdi, rax"], [63, "call _strlen"], [64, "mov rdx, rax"], [65, "mov rcx, cs:s"], [66, "mov rax, [rbp+var_30]"], [67, "mov rsi, rcx"], [68, "mov rdi, rax"], [69, "call _PQescapeIdentifier"], [70, "mov [rbp+var_68], rax"], [71, "lea rax, [rbp+var_390]"], [72, "mov rdi, rax"], [73, "call _strlen"], [74, "mov edx, 100h"], [75, "mov rbx, rdx"], [76, "sub rbx, rax"], [77, "lea rax, [rbp+var_390]"], [78, "mov rdi, rax"], [79, "call _strlen"], [80, "lea rdx, [rbp+var_390]"], [81, "lea rdi, [rdx+rax]"], [82, "mov rax, [rbp+var_68]"], [83, "mov rcx, rax"], [84, "mov edx, offset aTablespaceS"], [85, "mov rsi, rbx"], [86, "mov eax, 0"], [87, "call _snprintf"], [88, "mov rax, [rbp+var_68]"], [89, "mov rdi, rax"], [90, "call _PQfreemem"], [91, "mov eax, cs:dword_425380"], [92, "cmp eax, 4E1Fh"], [93, "jle short loc_40796D"], [94, "mov rax, [rbp+var_60]"], [95, "mov rax, [rax+10h]"], [96, "jmp short loc_407975"], [97, "mov rax, [rbp+var_60]"], [98, "mov rax, [rax+8]"], [99, "mov [rbp+var_70], rax"], [100, "mov rax, [rbp+var_60]"], [101, "mov rcx, [rax]"], [102, "mov eax, cs:dword_425894"], [103, "test eax, eax"], [104, "jz short loc_407991"], [105, "mov edi, offset aUnlogged"], [106, "jmp short loc_407996"], [107, "mov edi, offset unk_417020"], [108, "mov rsi, [rbp+var_70]"], [109, "lea rax, [rbp+s]"], [110, "sub rsp, 8"], [111, "lea rdx, [rbp+var_390]"], [112, "push rdx"], [113, "mov r9, rsi"], [114, "mov r8, rcx"], [115, "mov rcx, rdi"], [116, "mov edx, offset aCreateSTableSS"], [117, "mov esi, 100h"], [118, "mov rdi, rax"], [119, "mov eax, 0"], [120, "call _snprintf"], [121, "add rsp, 10h"], [122, "lea rdx, [rbp+s]"], [123, "mov rax, [rbp+var_30]"], [124, "mov rsi, rdx"], [125, "mov rdi, rax"], [126, "call sub_404034"], [127, "add [rbp+var_14], 1"], [128, "mov eax, [rbp+var_14]"], [129, "cmp eax, 3"], [130, "jbe loc_40780E"], [131, "mov rax, [rbp+var_30]"], [132, "mov esi, offset aBegin"], [133, "mov rdi, rax"], [134, "call sub_404034"], [135, "mov [rbp+var_14], 0"], [136, "jmp short loc_407A51"], [137, "mov eax, [rbp+var_14]"], [138, "lea edx, [rax+1]"], [139, "lea rax, [rbp+var_170]"], [140, "mov ecx, edx"], [141, "mov edx, offset aInsertIntoPgbe"], [142, "mov esi, 100h"], [143, "mov rdi, rax"], [144, "mov eax, 0"], [145, "call _snprintf"], [146, "lea rdx, [rbp+var_170]"], [147, "mov rax, [rbp+var_30]"], [148, "mov rsi, rdx"], [149, "mov rdi, rax"], [150, "call sub_404034"], [151, "add [rbp+var_14], 1"], [152, "mov eax, cs:dword_425380"], [153, "cmp [rbp+var_14], eax"], [154, "jl short loc_407A11"], [155, "mov [rbp+var_14], 0"], [156, "jmp short loc_407AC8"], [157, "mov eax, [rbp+var_14]"], [158, "movsxd rdx, eax"], [159, "imul rdx, 66666667h"], [160, "shr rdx, 20h"], [161, "sar edx, 2"], [162, "sar eax, 1Fh"], [163, "mov ecx, eax"], [164, "mov eax, edx"], [165, "sub eax, ecx"], [166, "lea ecx, [rax+1]"], [167, "mov eax, [rbp+var_14]"], [168, "lea edx, [rax+1]"], [169, "lea rax, [rbp+var_170]"], [170, "mov r8d, ecx"], [171, "mov ecx, edx"], [172, "mov edx, offset aInsertIntoPgbe_0"], [173, "mov esi, 100h"], [174, "mov rdi, rax"], [175, "mov eax, 0"], [176, "call _snprintf"], [177, "lea rdx, [rbp+var_170]"], [178, "mov rax, [rbp+var_30]"], [179, "mov rsi, rdx"], [180, "mov rdi, rax"], [181, "call sub_404034"], [182, "add [rbp+var_14], 1"], [183, "mov edx, cs:dword_425380"], [184, "mov eax, edx"], [185, "shl eax, 2"], [186, "add eax, edx"], [187, "add eax, eax"], [188, "cmp [rbp+var_14], eax"], [189, "jl short loc_407A65"], [190, "mov rax, [rbp+var_30]"], [191, "mov esi, offset aCommit"], [192, "mov rdi, rax"], [193, "call sub_404034"], [194, "mov rax, cs:stderr"], [195, "mov rcx, rax"], [196, "mov edx, 13h"], [197, "mov esi, 1"], [198, "mov edi, offset aCreatingTables"], [199, "call _fwrite"], [200, "mov rax, [rbp+var_30]"], [201, "mov esi, offset aBegin"], [202, "mov rdi, rax"], [203, "call sub_404034"], [204, "mov rax, [rbp+var_30]"], [205, "mov esi, offset aTruncatePgbenc"], [206, "mov rdi, rax"], [207, "call sub_404034"], [208, "mov rax, [rbp+var_30]"], [209, "mov esi, offset aCopyPgbenchAcc"], [210, "mov rdi, rax"], [211, "call _PQexec"], [212, "mov [rbp+var_38], rax"], [213, "mov rax, [rbp+var_38]"], [214, "mov rdi, rax"], [215, "call _PQresultStatus"], [216, "cmp eax, 4"], [217, "jz short loc_407B7E"], [218, "mov rax, [rbp+var_30]"], [219, "mov rdi, rax"], [220, "call _PQerrorMessage"], [221, "mov rdx, rax"], [222, "mov rax, cs:stderr"], [223, "mov rsi, rax"], [224, "mov rdi, rdx"], [225, "call _fputs"], [226, "mov edi, 1"], [227, "call _exit"], [228, "mov rax, [rbp+var_38]"], [229, "mov rdi, rax"], [230, "call _PQclear"], [231, "lea rax, [rbp+tv]"], [232, "mov esi, 0"], [233, "mov rdi, rax"], [234, "call _gettimeofday"], [235, "mov [rbp+var_20], 0"], [236, "jmp loc_40802E"], [237, "mov rax, [rbp+var_20]"], [238, "add rax, 1"], [239, "mov [rbp+var_48], rax"], [240, "mov rcx, [rbp+var_20]"], [241, "mov rdx, 29F16B11C6D1E109h"], [242, "mov rax, rcx"], [243, "imul rdx"], [244, "mov rax, rdx"], [245, "sar rax, 0Eh"], [246, "sar rcx, 3Fh"], [247, "mov rdx, rcx"], [248, "sub rax, rdx"], [249, "lea rcx, [rax+1]"], [250, "mov rdx, [rbp+var_48]"], [251, "lea rax, [rbp+var_170]"], [252, "mov r9d, 0"], [253, "mov r8, rcx"], [254, "mov rcx, rdx"], [255, "mov edx, offset aLdLdD"], [256, "mov esi, 100h"], [257, "mov rdi, rax"], [258, "mov eax, 0"], [259, "call _snprintf"], [260, "lea rdx, [rbp+var_170]"], [261, "mov rax, [rbp+var_30]"], [262, "mov rsi, rdx"], [263, "mov rdi, rax"], [264, "call _PQputline"], [265, "test eax, eax"], [266, "jz short loc_407C50"], [267, "mov rax, cs:stderr"], [268, "mov rcx, rax"], [269, "mov edx, 11h"], [270, "mov esi, 1"], [271, "mov edi, offset aPqputlineFaile"], [272, "call _fwrite"], [273, "mov edi, 1"], [274, "call _exit"], [275, "movzx eax, cs:byte_4258C1"], [276, "test al, al"], [277, "jnz loc_407E06"], [278, "mov rcx, [rbp+var_48]"], [279, "mov rdx, 29F16B11C6D1E109h"], [280, "mov rax, rcx"], [281, "imul rdx"], [282, "mov rax, rdx"], [283, "sar rax, 0Eh"], [284, "mov rdx, rcx"], [285, "sar rdx, 3Fh"], [286, "sub rax, rdx"], [287, "imul rdx, rax, 186A0h"], [288, "mov rax, rcx"], [289, "sub rax, rdx"], [290, "test rax, rax"], [291, "jnz loc_407E06"], [292, "lea rax, [rbp+var_190]"], [293, "mov esi, 0"], [294, "mov rdi, rax"], [295, "call _gettimeofday"], [296, "mov rax, [rbp+var_190.tv_sec]"], [297, "mov rdx, [rbp+tv.tv_sec]"], [298, "sub rax, rdx"], [299, "mov [rbp+var_190.tv_sec], rax"], [300, "mov rax, [rbp+var_190.tv_usec]"], [301, "mov rdx, [rbp+tv.tv_usec]"], [302, "sub rax, rdx"], [303, "mov [rbp+var_190.tv_usec], rax"], [304, "jmp short loc_407D06"], [305, "mov rax, [rbp+var_190.tv_usec]"], [306, "add rax, 0F4240h"], [307, "mov [rbp+var_190.tv_usec], rax"], [308, "mov rax, [rbp+var_190.tv_sec]"], [309, "sub rax, 1"], [310, "mov [rbp+var_190.tv_sec], rax"], [311, "mov rax, [rbp+var_190.tv_usec]"], [312, "test rax, rax"], [313, "js short loc_407CE0"], [314, "mov rax, [rbp+var_190.tv_sec]"], [315, "pxor xmm1, xmm1"], [316, "cvtsi2sd xmm1, rax"], [317, "mov rax, [rbp+var_190.tv_usec]"], [318, "pxor xmm0, xmm0"], [319, "cvtsi2sd xmm0, rax"], [320, "movsd xmm2, cs:qword_41A310"], [321, "divsd xmm0, xmm2"], [322, "addsd xmm0, xmm1"], [323, "movsd [rbp+var_50], xmm0"], [324, "mov eax, cs:dword_425380"], [325, "pxor xmm1, xmm1"], [326, "cvtsi2sd xmm1, eax"], [327, "movsd xmm0, cs:qword_41A318"], [328, "mulsd xmm0, xmm1"], [329, "pxor xmm1, xmm1"], [330, "cvtsi2sd xmm1, [rbp+var_48]"], [331, "subsd xmm0, xmm1"], [332, "mulsd xmm0, [rbp+var_50]"], [333, "pxor xmm1, xmm1"], [334, "cvtsi2sd xmm1, [rbp+var_48]"], [335, "divsd xmm0, xmm1"], [336, "movsd [rbp+var_58], xmm0"], [337, "mov rdx, [rbp+var_48]"], [338, "mov rax, rdx"], [339, "shl rax, 2"], [340, "add rax, rdx"], [341, "lea rdx, ds:0[rax*4]"], [342, "add rax, rdx"], [343, "shl rax, 2"], [344, "mov rcx, rax"], [345, "mov eax, cs:dword_425380"], [346, "cdqe"], [347, "imul rbx, rax, 186A0h"], [348, "mov rax, rcx"], [349, "cqo"], [350, "idiv rbx"], [351, "mov edi, eax"], [352, "mov eax, cs:dword_425380"], [353, "cdqe"], [354, "imul rcx, rax, 186A0h"], [355, "mov rax, cs:stderr"], [356, "movsd xmm0, [rbp+var_58]"], [357, "mov rsi, [rbp+var_50]"], [358, "mov rdx, [rbp+var_48]"], [359, "movapd xmm1, xmm0"], [360, "movq xmm0, rsi"], [361, "mov r8d, edi"], [362, "mov esi, offset aLdOfLdTuplesDD"], [363, "mov rdi, rax"], [364, "mov eax, 2"], [365, "call _fprintf"], [366, "jmp loc_408029"], [367, "movzx eax, cs:byte_4258C1"], [368, "test al, al"], [369, "jz loc_408029"], [370, "mov rcx, [rbp+var_48]"], [371, "mov rdx, 0A3D70A3D70A3D70Bh"], [372, "mov rax, rcx"], [373, "imul rdx"], [374, "lea rax, [rdx+rcx]"], [375, "sar rax, 6"], [376, "mov rsi, rcx"], [377, "sar rsi, 3Fh"], [378, "sub rax, rsi"], [379, "mov rdx, rax"], [380, "mov rax, rdx"], [381, "shl rax, 2"], [382, "add rax, rdx"], [383, "lea rdx, ds:0[rax*4]"], [384, "add rax, rdx"], [385, "shl rax, 2"], [386, "sub rcx, rax"], [387, "mov rdx, rcx"], [388, "test rdx, rdx"], [389, "jnz loc_408029"], [390, "lea rax, [rbp+var_190]"], [391, "mov esi, 0"], [392, "mov rdi, rax"], [393, "call _gettimeofday"], [394, "mov rax, [rbp+var_190.tv_sec]"], [395, "mov rdx, [rbp+tv.tv_sec]"], [396, "sub rax, rdx"], [397, "mov [rbp+var_190.tv_sec], rax"], [398, "mov rax, [rbp+var_190.tv_usec]"], [399, "mov rdx, [rbp+tv.tv_usec]"], [400, "sub rax, rdx"], [401, "mov [rbp+var_190.tv_usec], rax"], [402, "jmp short loc_407ED2"], [403, "mov rax, [rbp+var_190.tv_usec]"], [404, "add rax, 0F4240h"], [405, "mov [rbp+var_190.tv_usec], rax"], [406, "mov rax, [rbp+var_190.tv_sec]"], [407, "sub rax, 1"], [408, "mov [rbp+var_190.tv_sec], rax"], [409, "mov rax, [rbp+var_190.tv_usec]"], [410, "test rax, rax"], [411, "js short loc_407EAC"], [412, "mov rax, [rbp+var_190.tv_sec]"], [413, "pxor xmm1, xmm1"], [414, "cvtsi2sd xmm1, rax"], [415, "mov rax, [rbp+var_190.tv_usec]"], [416, "pxor xmm0, xmm0"], [417, "cvtsi2sd xmm0, rax"], [418, "movsd xmm2, cs:qword_41A310"], [419, "divsd xmm0, xmm2"], [420, "addsd xmm0, xmm1"], [421, "movsd [rbp+var_50], xmm0"], [422, "mov eax, cs:dword_425380"], [423, "pxor xmm1, xmm1"], [424, "cvtsi2sd xmm1, eax"], [425, "movsd xmm0, cs:qword_41A318"], [426, "mulsd xmm0, xmm1"], [427, "pxor xmm1, xmm1"], [428, "cvtsi2sd xmm1, [rbp+var_48]"], [429, "subsd xmm0, xmm1"], [430, "mulsd xmm0, [rbp+var_50]"], [431, "pxor xmm1, xmm1"], [432, "cvtsi2sd xmm1, [rbp+var_48]"], [433, "divsd xmm0, xmm1"], [434, "movsd [rbp+var_58], xmm0"], [435, "mov eax, cs:dword_425380"], [436, "imul eax, 186A0h"], [437, "cdqe"], [438, "cmp [rbp+var_48], rax"], [439, "jz short loc_407F88"], [440, "mov edx, [rbp+var_24]"], [441, "mov eax, edx"], [442, "shl eax, 2"], [443, "add eax, edx"], [444, "pxor xmm1, xmm1"], [445, "cvtsi2sd xmm1, eax"], [446, "movsd xmm0, [rbp+var_50]"], [447, "comisd xmm0, xmm1"], [448, "jb loc_408029"], [449, "mov rdx, [rbp+var_48]"], [450, "mov rax, rdx"], [451, "shl rax, 2"], [452, "add rax, rdx"], [453, "lea rdx, ds:0[rax*4]"], [454, "add rax, rdx"], [455, "shl rax, 2"], [456, "mov rcx, rax"], [457, "mov eax, cs:dword_425380"], [458, "cdqe"], [459, "imul rbx, rax, 186A0h"], [460, "mov rax, rcx"], [461, "cqo"], [462, "idiv rbx"], [463, "mov edi, eax"], [464, "mov eax, cs:dword_425380"], [465, "cdqe"], [466, "imul rcx, rax, 186A0h"], [467, "mov rax, cs:stderr"], [468, "movsd xmm0, [rbp+var_58]"], [469, "mov rsi, [rbp+var_50]"], [470, "mov rdx, [rbp+var_48]"], [471, "movapd xmm1, xmm0"], [472, "movq xmm0, rsi"], [473, "mov r8d, edi"], [474, "mov esi, offset aLdOfLdTuplesDD"], [475, "mov rdi, rax"], [476, "mov eax, 2"], [477, "call _fprintf"], [478, "movsd xmm0, [rbp+var_50]"], [479, "movsd xmm1, cs:qword_41A320"], [480, "divsd xmm0, xmm1"], [481, "movq rax, xmm0"], [482, "movq xmm0, rax"], [483, "call _ceil"], [484, "cvttsd2si eax, xmm0"], [485, "mov [rbp+var_24], eax"], [486, "add [rbp+var_20], 1"], [487, "mov eax, cs:dword_425380"], [488, "cdqe"], [489, "imul rax, 186A0h"], [490, "cmp [rbp+var_20], rax"], [491, "jl loc_407BAB"], [492, "mov rax, [rbp+var_30]"], [493, "mov esi, offset asc_4188BA"], [494, "mov rdi, rax"], [495, "call _PQputline"], [496, "test eax, eax"], [497, "jz short loc_408084"], [498, "mov rax, cs:stderr"], [499, "mov rcx, rax"], [500, "mov edx, 1Bh"], [501, "mov esi, 1"], [502, "mov edi, offset aVeryLastPqputl"], [503, "call _fwrite"], [504, "mov edi, 1"], [505, "call _exit"], [506, "mov rax, [rbp+var_30]"], [507, "mov rdi, rax"], [508, "call _PQendcopy"], [509, "test eax, eax"], [510, "jz short loc_4080BC"], [511, "mov rax, cs:stderr"], [512, "mov rcx, rax"], [513, "mov edx, 11h"], [514, "mov esi, 1"], [515, "mov edi, offset aPqendcopyFaile"], [516, "call _fwrite"], [517, "mov edi, 1"], [518, "call _exit"], [519, "mov rax, [rbp+var_30]"], [520, "mov esi, offset aCommit"], [521, "mov rdi, rax"], [522, "call sub_404034"], [523, "cmp [rbp+var_394], 0"], [524, "jnz short loc_408138"], [525, "mov rax, cs:stderr"], [526, "mov rcx, rax"], [527, "mov edx, 0Ah"], [528, "mov esi, 1"], [529, "mov edi, offset aVacuum"], [530, "call _fwrite"], [531, "mov rax, [rbp+var_30]"], [532, "mov esi, offset aVacuumAnalyzeP"], [533, "mov rdi, rax"], [534, "call sub_404034"], [535, "mov rax, [rbp+var_30]"], [536, "mov esi, offset aVacuumAnalyzeP_0"], [537, "mov rdi, rax"], [538, "call sub_404034"], [539, "mov rax, [rbp+var_30]"], [540, "mov esi, offset aVacuumAnalyzeP_1"], [541, "mov rdi, rax"], [542, "call sub_404034"], [543, "mov rax, [rbp+var_30]"], [544, "mov esi, offset aVacuumAnalyzeP_2"], [545, "mov rdi, rax"], [546, "call sub_404034"], [547, "mov rax, cs:stderr"], [548, "mov rcx, rax"], [549, "mov edx, 14h"], [550, "mov esi, 1"], [551, "mov edi, offset aSetPrimaryKeys"], [552, "call _fwrite"], [553, "mov [rbp+var_14], 0"], [554, "jmp loc_408235"], [555, "mov eax, [rbp+var_14]"], [556, "cdqe"], [557, "mov rcx, ds:off_419FB0[rax*8]"], [558, "lea rax, [rbp+s]"], [559, "mov edx, 100h"], [560, "mov rsi, rcx"], [561, "mov rdi, rax"], [562, "call sub_40FFDB"], [563, "mov rax, cs:qword_4258B8"], [564, "test rax, rax"], [565, "jz loc_40821B"], [566, "mov rax, cs:qword_4258B8"], [567, "mov rdi, rax"], [568, "call _strlen"], [569, "mov rdx, rax"], [570, "mov rcx, cs:qword_4258B8"], [571, "mov rax, [rbp+var_30]"], [572, "mov rsi, rcx"], [573, "mov rdi, rax"], [574, "call _PQescapeIdentifier"], [575, "mov [rbp+var_40], rax"], [576, "lea rax, [rbp+s]"], [577, "mov rdi, rax"], [578, "call _strlen"], [579, "mov edx, 100h"], [580, "mov rbx, rdx"], [581, "sub rbx, rax"], [582, "lea rax, [rbp+s]"], [583, "mov rdi, rax"], [584, "call _strlen"], [585, "lea rdx, [rbp+s]"], [586, "lea rdi, [rdx+rax]"], [587, "mov rax, [rbp+var_40]"], [588, "mov rcx, rax"], [589, "mov edx, offset aUsingIndexTabl"], [590, "mov rsi, rbx"], [591, "mov eax, 0"], [592, "call _snprintf"], [593, "mov rax, [rbp+var_40]"], [594, "mov rdi, rax"], [595, "call _PQfreemem"], [596, "lea rdx, [rbp+s]"], [597, "mov rax, [rbp+var_30]"], [598, "mov rsi, rdx"], [599, "mov rdi, rax"], [600, "call sub_404034"], [601, "add [rbp+var_14], 1"], [602, "mov eax, [rbp+var_14]"], [603, "cmp eax, 2"], [604, "jbe loc_408162"], [605, "mov eax, cs:dword_425890"], [606, "test eax, eax"], [607, "jz short loc_40829A"], [608, "mov rax, cs:stderr"], [609, "mov rcx, rax"], [610, "mov edx, 14h"], [611, "mov esi, 1"], [612, "mov edi, offset aSetForeignKeys"], [613, "call _fwrite"], [614, "mov [rbp+var_14], 0"], [615, "jmp short loc_408292"], [616, "mov eax, [rbp+var_14]"], [617, "cdqe"], [618, "mov rdx, ds:off_41A160[rax*8]"], [619, "mov rax, [rbp+var_30]"], [620, "mov rsi, rdx"], [621, "mov rdi, rax"], [622, "call sub_404034"], [623, "add [rbp+var_14], 1"], [624, "mov eax, [rbp+var_14]"], [625, "cmp eax, 4"], [626, "jbe short loc_408272"], [627, "mov rax, cs:stderr"], [628, "mov rcx, rax"], [629, "mov edx, 6"], [630, "mov esi, 1"], [631, "mov edi, offset aDone"], [632, "call _fwrite"], [633, "mov rax, [rbp+var_30]"], [634, "mov rdi, rax"], [635, "call _PQfinish"], [636, "nop"], [637, "lea rsp, [rbp-10h]"], [638, "pop rbx"], [639, "pop r12"], [640, "pop rbp"], [641, "retn"]], "data_dep": [[6, 5], [9, 8], [10, 9], [11, 10], [16, 127], [16, 14], [18, 16], [19, 18], [20, 19], [21, 20], [22, 21], [23, 21], [24, 22], [27, 23], [30, 25], [31, 9], [32, 30], [33, 31], [36, 20], [37, 36], [38, 37], [39, 38], [41, 35], [41, 38], [42, 41], [45, 43], [45, 44], [46, 45], [47, 43], [47, 35], [48, 47], [50, 45], [50, 35], [51, 50], [51, 49], [52, 40], [54, 46], [55, 51], [59, 58], [60, 59], [62, 61], [64, 63], [66, 9], [67, 65], [68, 66], [70, 69], [71, 69], [71, 35], [72, 71], [75, 74], [76, 73], [76, 75], [77, 73], [77, 35], [78, 77], [80, 74], [80, 35], [81, 78], [81, 79], [82, 70], [83, 82], [85, 76], [88, 70], [89, 88], [92, 91], [93, 92], [94, 20], [95, 94], [97, 20], [98, 97], [99, 95], [99, 98], [100, 20], [101, 100], [103, 102], [104, 103], [108, 99], [109, 103], [110, 121], [110, 4], [111, 35], [111, 53], [111, 30], [111, 84], [112, 111], [113, 108], [114, 101], [115, 107], [115, 105], [118, 109], [121, 110], [122, 116], [123, 9], [124, 122], [125, 123], [127, 127], [127, 14], [128, 14], [128, 127], [129, 128], [130, 129], [131, 9], [133, 131], [137, 135], [137, 151], [138, 137], [138, 146], [138, 122], [139, 137], [140, 138], [143, 139], [146, 141], [147, 9], [148, 146], [149, 147], [151, 135], [151, 151], [153, 135], [153, 152], [153, 151], [154, 153], [157, 155], [157, 182], [158, 157], [159, 158], [160, 159], [161, 160], [162, 157], [163, 162], [164, 161], [165, 164], [165, 163], [166, 165], [166, 163], [167, 155], [167, 182], [168, 167], [168, 161], [169, 167], [170, 166], [171, 168], [174, 169], [177, 172], [178, 9], [179, 177], [180, 178], [182, 155], [182, 182], [184, 183], [185, 184], [186, 185], [186, 183], [187, 186], [188, 187], [188, 182], [188, 155], [189, 188], [190, 9], [192, 190], [195, 194], [200, 9], [202, 200], [204, 9], [206, 204], [208, 9], [210, 208], [212, 211], [213, 212], [214, 213], [216, 215], [217, 216], [218, 9], [219, 218], [221, 220], [223, 222], [224, 221], [228, 212], [229, 228], [231, 230], [233, 231], [237, 235], [237, 486], [238, 237], [239, 238], [240, 235], [240, 486], [242, 240], [243, 241], [244, 243], [245, 244], [246, 240], [247, 246], [248, 245], [248, 247], [249, 246], [249, 248], [250, 239], [251, 248], [253, 249], [254, 250], [257, 251], [260, 255], [261, 9], [262, 260], [263, 261], [265, 264], [266, 265], [268, 267], [276, 275], [277, 276], [278, 239], [280, 278], [281, 279], [282, 281], [283, 282], [284, 278], [285, 284], [286, 283], [286, 285], [287, 285], [287, 286], [288, 278], [289, 287], [289, 288], [290, 289], [291, 290], [292, 290], [294, 292], [296, 299], [296, 397], [296, 310], [296, 408], [298, 297], [298, 296], [299, 298], [300, 307], [300, 303], [300, 401], [300, 405], [302, 301], [302, 300], [303, 302], [305, 307], [305, 303], [306, 305], [307, 306], [308, 310], [308, 299], [309, 308], [310, 309], [311, 303], [311, 307], [312, 311], [313, 312], [314, 310], [314, 299], [316, 315], [316, 314], [317, 303], [317, 307], [319, 318], [319, 317], [321, 320], [321, 319], [322, 321], [322, 316], [323, 322], [326, 325], [326, 324], [328, 327], [328, 326], [330, 329], [330, 239], [331, 330], [331, 328], [332, 323], [332, 331], [334, 239], [334, 333], [335, 334], [335, 332], [336, 335], [337, 239], [338, 337], [339, 338], [340, 337], [340, 339], [341, 337], [342, 341], [342, 340], [343, 342], [344, 343], [347, 76], [347, 350], [347, 462], [347, 345], [347, 40], [348, 344], [350, 347], [351, 348], [354, 344], [354, 352], [356, 336], [357, 323], [358, 239], [359, 356], [360, 357], [361, 351], [363, 355], [368, 367], [369, 368], [370, 239], [372, 370], [373, 371], [374, 372], [374, 370], [375, 374], [376, 370], [377, 376], [378, 375], [378, 377], [379, 378], [380, 379], [381, 380], [382, 381], [382, 379], [383, 379], [384, 383], [384, 382], [385, 384], [386, 385], [386, 370], [387, 386], [388, 387], [389, 388], [390, 385], [392, 390], [394, 299], [394, 397], [394, 408], [394, 310], [396, 395], [396, 394], [397, 396], [398, 405], [398, 401], [398, 303], [398, 307], [400, 398], [400, 399], [401, 400], [403, 401], [403, 405], [404, 403], [405, 404], [406, 408], [406, 397], [407, 406], [408, 407], [409, 401], [409, 405], [410, 409], [411, 410], [412, 408], [412, 397], [414, 413], [414, 412], [415, 405], [415, 401], [417, 416], [417, 415], [419, 417], [419, 418], [420, 419], [420, 414], [421, 420], [424, 423], [424, 422], [426, 424], [426, 425], [428, 427], [428, 239], [429, 428], [429, 426], [430, 421], [430, 429], [432, 239], [432, 431], [433, 430], [433, 432], [434, 433], [436, 435], [438, 436], [438, 239], [439, 438], [440, 485], [440, 7], [441, 440], [442, 441], [443, 440], [443, 442], [445, 443], [445, 444], [446, 421], [447, 446], [447, 445], [448, 443], [449, 239], [450, 449], [451, 450], [452, 449], [452, 451], [453, 449], [454, 453], [454, 452], [455, 454], [456, 455], [459, 76], [459, 350], [459, 462], [459, 457], [459, 40], [460, 456], [462, 459], [463, 460], [466, 464], [466, 456], [468, 434], [469, 421], [470, 239], [471, 468], [472, 469], [473, 463], [475, 467], [478, 421], [480, 479], [480, 478], [481, 480], [482, 481], [484, 483], [484, 482], [485, 484], [486, 235], [486, 486], [489, 487], [490, 235], [490, 486], [490, 489], [491, 490], [492, 9], [494, 492], [496, 495], [497, 496], [499, 498], [506, 9], [507, 506], [509, 508], [510, 509], [512, 511], [519, 9], [521, 519], [523, 6], [524, 523], [526, 525], [531, 9], [533, 531], [535, 9], [537, 535], [539, 9], [541, 539], [543, 9], [545, 543], [548, 547], [555, 601], [555, 553], [558, 555], [560, 557], [561, 558], [564, 563], [565, 564], [567, 566], [569, 568], [571, 9], [572, 570], [573, 571], [575, 574], [576, 574], [577, 576], [580, 579], [581, 580], [581, 578], [582, 578], [583, 582], [585, 579], [586, 584], [586, 583], [587, 575], [588, 587], [590, 581], [593, 575], [594, 593], [596, 559], [596, 589], [597, 9], [598, 596], [599, 597], [601, 601], [601, 553], [602, 553], [602, 601], [603, 602], [604, 603], [606, 605], [607, 606], [609, 608], [616, 614], [616, 623], [619, 9], [620, 618], [621, 619], [623, 614], [623, 623], [624, 614], [624, 623], [625, 624], [626, 625], [628, 627], [633, 9], [634, 633], [637, 121], [637, 4], [638, 3], [639, 2], [640, 0], [641, 635]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/9f1b2f640a29d53f50c3774a8bb5988db863706486dc04b5e4a4f1ce22d6b25b_9f1b2f640a29d53f50c3774a8bb5988db863706486dc04b5e4a4f1ce22d6b25b.jsonl.gz", "strip_func_name": "sub_4077CB", "query": "\n\n\n__int64 __fastcall sub_4077CB(char a1)\n{\nunsigned int v1; // ebx\nsize_t v2; // r12\nsize_t v3; // rax\nsize_t v4; // rbx\nsize_t v5; // rax\nconst char *v6; // rax\nconst char *v7; // rdi\nconst char *v8; // rax\nsize_t v9; // rbx\nsize_t v10; // rax\nchar v13[256]; // [rsp+10h] [rbp-390h] BYREF\nchar s[256]; // [rsp+110h] [rbp-290h] BYREF\nstruct timeval v15; // [rsp+210h] [rbp-190h] BYREF\nstruct timeval tv; // [rsp+220h] [rbp-180h] BYREF\nchar v17[256]; // [rsp+230h] [rbp-170h] BYREF\nconst char *v18; // [rsp+330h] [rbp-70h]\nconst char *v19; // [rsp+338h] [rbp-68h]\n__int64 v20; // [rsp+340h] [rbp-60h]\ndouble v21; // [rsp+348h] [rbp-58h]\ndouble v22; // [rsp+350h] [rbp-50h]\n__int64 v23; // [rsp+358h] [rbp-48h]\nconst char *v24; // [rsp+360h] [rbp-40h]\n__int64 v25; // [rsp+368h] [rbp-38h]\n__int64 v26; // [rsp+370h] [rbp-30h]\nint v27; // [rsp+37Ch] [rbp-24h]\n__int64 j; // [rsp+380h] [rbp-20h]\nunsigned int i; // [rsp+38Ch] [rbp-14h]\n\nv27 = 1;\nv26 = sub_40412C();\nif ( !v26 )\nexit(1);\nfor ( i = 0; i <= 3; ++i )\n{\nv20 = 32LL * (int)i + 4300416;\nsnprintf(s, 0x100uLL, \"drop table if exists %s\", off_419E80[4 * (int)i]);\nsub_404034(v26, s);\nv13[0] = 0;\nif ( *(_DWORD *)(v20 + 24) )\n{\nv1 = dword_425384;\nv2 = 256 - strlen(v13);\nv3 = strlen(v13);\nsnprintf(&v13[v3], v2, \" with (fillfactor=%d)\", v1);\n}\nif ( ::s )\n{\nstrlen(::s);\nv19 = (const char *)PQescapeIdentifier();\nv4 = 256 - strlen(v13);\nv5 = strlen(v13);\nsnprintf(&v13[v5], v4, \" tablespace %s\", v19);\nPQfreemem();\n}\nif ( dword_425380 <= 19999 )\nv6 = *(const char **)(v20 + 8);\nelse\nv6 = *(const char **)(v20 + 16);\nv18 = v6;\nif ( dword_425894 )\nv7 = \" unlogged\";\nelse\nv7 = (const char *)&unk_417020;\nsnprintf(s, 0x100uLL, \"create%s table %s(%s)%s\", v7, *(const char **)v20, v18, v13);\nsub_404034(v26, s);\n}\nsub_404034(v26, \"begin\");\nfor ( i = 0; (int)i < dword_425380; ++i )\n{\nsnprintf(v17, 0x100uLL, \"insert into pgbench_branches(bid,bbalance) values(%d,0)\", i + 1);\nsub_404034(v26, v17);\n}\nfor ( i = 0; (int)i < 10 * dword_425380; ++i )\n{\nsnprintf(\nv17,\n0x100uLL,\n\"insert into pgbench_tellers(tid,bid,tbalance) values (%d,%d,0)\",\ni + 1,\n(unsigned int)((int)i / 10 + 1));\nsub_404034(v26, v17);\n}\nsub_404034(v26, \"commit\");\nfwrite(\"creating tables...\\n\", 1uLL, 0x13uLL, stderr);\nsub_404034(v26, \"begin\");\nsub_404034(v26, \"truncate pgbench_accounts\");\nv25 = PQexec();\nif ( (unsigned int)PQresultStatus() != 4 )\n{\nv8 = (const char *)PQerrorMessage();\nfputs(v8, stderr);\nexit(1);\n}\nPQclear();\ngettimeofday(&tv, 0LL);\nfor ( j = 0LL; j < 100000LL * dword_425380; ++j )\n{\nv23 = j + 1;\nsnprintf(v17, 0x100uLL, \"%ld\\t%ld\\t%d\\t\\n\", j + 1, j / 100000 + 1, 0LL);\nif ( (unsigned int)PQputline() )\n{\nfwrite(\"PQputline failed\\n\", 1uLL, 0x11uLL, stderr);\nexit(1);\n}\nif ( byte_4258C1 || v23 % 100000 )\n{\nif ( byte_4258C1 )\n{\nif ( !(v23 % 100) )\n{\ngettimeofday(&v15, 0LL);\nv15.tv_sec -= tv.tv_sec;\nv15.tv_usec -= tv.tv_usec;\nwhile ( v15.tv_usec < 0 )\n{\nv15.tv_usec += 1000000LL;\n--v15.tv_sec;\n}\nv22 = (double)SLODWORD(v15.tv_usec) / 1000000.0 + (double)SLODWORD(v15.tv_sec);\nv21 = (100000.0 * (double)dword_425380 - (double)(int)v23) * v22 / (double)(int)v23;\nif ( v23 == 100000 * dword_425380 || v22 >= (double)(5 * v27) )\n{\nfprintf(\nstderr,\n\"%ld of %ld tuples (%d%%) done (elapsed %.2f s, remaining %.2f s)\\n\",\nv23,\n100000LL * dword_425380,\n(unsigned int)(100 * v23 / (100000LL * dword_425380)),\nv22,\nv21);\nv27 = (int)ceil(v22 / 5.0);\n}\n}\n}\n}\nelse\n{\ngettimeofday(&v15, 0LL);\nv15.tv_sec -= tv.tv_sec;\nv15.tv_usec -= tv.tv_usec;\nwhile ( v15.tv_usec < 0 )\n{\nv15.tv_usec += 1000000LL;\n--v15.tv_sec;\n}\nv22 = (double)SLODWORD(v15.tv_usec) / 1000000.0 + (double)SLODWORD(v15.tv_sec);\nv21 = (100000.0 * (double)dword_425380 - (double)(int)v23) * v22 / (double)(int)v23;\nfprintf(\nstderr,\n\"%ld of %ld tuples (%d%%) done (elapsed %.2f s, remaining %.2f s)\\n\",\nv23,\n100000LL * dword_425380,\n(unsigned int)(100 * v23 / (100000LL * dword_425380)),\nv22,\nv21);\n}\n}\nif ( (unsigned int)PQputline() )\n{\nfwrite(\"very last PQputline failed\\n\", 1uLL, 0x1BuLL, stderr);\nexit(1);\n}\nif ( (unsigned int)PQendcopy() )\n{\nfwrite(\"PQendcopy failed\\n\", 1uLL, 0x11uLL, stderr);\nexit(1);\n}\nsub_404034(v26, \"commit\");\nif ( !a1 )\n{\nfwrite(\"vacuum...\\n\", 1uLL, 0xAuLL, stderr);\nsub_404034(v26, \"vacuum analyze pgbench_branches\");\nsub_404034(v26, \"vacuum analyze pgbench_tellers\");\nsub_404034(v26, \"vacuum analyze pgbench_accounts\");\nsub_404034(v26, \"vacuum analyze pgbench_history\");\n}\nfwrite(\"set primary keys...\\n\", 1uLL, 0x14uLL, stderr);\nfor ( i = 0; i <= 2; ++i )\n{\nsub_40FFDB(s, off_419FB0[i], 256LL);\nif ( qword_4258B8 )\n{\nstrlen(qword_4258B8);\nv24 = (const char *)PQescapeIdentifier();\nv9 = 256 - strlen(s);\nv10 = strlen(s);\nsnprintf(&s[v10], v9, \" using index tablespace %s\", v24);\nPQfreemem();\n}\nsub_404034(v26, s);\n}\nif ( dword_425890 )\n{\nfwrite(\"set foreign keys...\\n\", 1uLL, 0x14uLL, stderr);\nfor ( i = 0; i <= 4; ++i )\nsub_404034(v26, off_41A160[i]);\n}\nfwrite(\"done.\\n\", 1uLL, 6uLL, stderr);\nreturn PQfinish();\n}\n\n\n\nQ:[a1,v13,s,v15,tv,v17,v18,v19,v20,v21,v22,v24,v25,v26,v27,sub_4077CB,sub_40412C,sub_404034,sub_40FFDB,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'is_no_vacuum', 'v13': 'opts', 's': 'buffer', 'v15': 'diff', 'tv': 'start', 'v17': 'sql', 'v18': 'cols', 'v19': 'escape_tablespace', 'v20': 'ddl', 'v21': 'remaining_sec', 'v22': 'elapsed_sec', 'v24': 'escape_tablespace_0', 'v25': 'res', 'v26': 'con', 'v27': 'log_interval', 'sub_4077CB': 'init', 'sub_40412C': 'doConnect', 'sub_404034': 'executeStatement', 'sub_40FFDB': 'strlcpy'}"} |
|
asn1_print_hdr | a00a174460e27c0a15353e4aa238c55e049e0606a381405d5b36ad737c184769 | vanhoefm | hostap-wpa3 | NA | void asn1_print_hdr(const struct asn1_hdr *hdr, const char *title)
{
wpa_printf(MSG_DEBUG, "%sclass %d constructed %d tag 0x%x",
title, hdr->class, hdr->constructed, hdr->tag);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4AB96D", "function_addr": 4897133, "binary_name": "a00a174460e27c0a15353e4aa238c55e049e0606a381405d5b36ad737c184769.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov rax, [rbp+var_8]"], [6, "mov esi, [rax+0Ch]"], [7, "mov rax, [rbp+var_8]"], [8, "movzx eax, byte ptr [rax+0Ah]"], [9, "movzx ecx, al"], [10, "mov rax, [rbp+var_8]"], [11, "movzx eax, byte ptr [rax+9]"], [12, "movzx edx, al"], [13, "mov rax, [rbp+var_10]"], [14, "mov r9d, esi"], [15, "mov r8d, ecx"], [16, "mov ecx, edx"], [17, "mov rdx, rax"], [18, "mov esi, offset aSclassDConstru"], [19, "mov edi, 2"], [20, "mov eax, 0"], [21, "call sub_48D67B"], [22, "nop"], [23, "leave"], [24, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 3], [8, 7], [9, 8], [10, 3], [11, 10], [12, 11], [13, 4], [14, 6], [15, 9], [16, 12], [17, 13], [24, 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/a00a174460e27c0a15353e4aa238c55e049e0606a381405d5b36ad737c184769_a00a174460e27c0a15353e4aa238c55e049e0606a381405d5b36ad737c184769.jsonl.gz", "strip_func_name": "sub_4AB96D", "query": "\n\n\nint __fastcall sub_4AB96D(__int64 a1, __int64 a2)\n{\nreturn sub_48D67B(\n2,\n\"%sclass %d constructed %d tag 0x%x\",\na2,\n*(unsigned __int8 *)(a1 + 9),\n*(unsigned __int8 *)(a1 + 10),\n*(unsigned int *)(a1 + 12),\na2,\na1);\n}\n\n\n\nQ:[a1,a2,sub_4AB96D,sub_48D67B,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'hdr', 'a2': 'title', 'sub_4AB96D': 'asn1_print_hdr', 'sub_48D67B': 'wpa_printf'}"} |
|
r_R2 | 9acf456e98009cb498ed5cac4153ab67c8dd7caf33921402739ca86e36cd0298 | hthetiot | php-stemmer | NA | static int r_R2(struct SN_env * z) {
if (!(z->I[1] <= z->c)) return 0;
return 1;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40A900", "function_addr": 4237568, "binary_name": "9acf456e98009cb498ed5cac4153ab67c8dd7caf33921402739ca86e36cd0298.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov rax, [rbp+var_8]"], [4, "mov rax, [rax+28h]"], [5, "add rax, 4"], [6, "mov edx, [rax]"], [7, "mov rax, [rbp+var_8]"], [8, "mov eax, [rax+8]"], [9, "cmp edx, eax"], [10, "jle short loc_40A928"], [11, "mov eax, 0"], [12, "jmp short loc_40A92D"], [13, "mov eax, 1"], [14, "pop rbp"], [15, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 5], [7, 2], [8, 7], [9, 6], [9, 8], [10, 9], [14, 0], [15, 11], [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/9acf456e98009cb498ed5cac4153ab67c8dd7caf33921402739ca86e36cd0298_9acf456e98009cb498ed5cac4153ab67c8dd7caf33921402739ca86e36cd0298.jsonl.gz", "strip_func_name": "sub_40A900", "query": "\n\n\n_BOOL8 __fastcall sub_40A900(__int64 a1)\n{\nreturn *(_DWORD *)(*(_QWORD *)(a1 + 40) + 4LL) <= *(_DWORD *)(a1 + 8);\n}\n\n\n\nQ:[a1,sub_40A900,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'z', 'sub_40A900': 'r_R2_3'}"} |
|
my_function_integer | 1745f9f6d8ee1e203a799babdc6794252fea709c9b5692c4741c483f63c78d7a | webui-dev | webui | NA | void my_function_integer(webui_event_t* e) {
// JavaScript:
// webui.call('MyID_Two', 123, 456, 789);
long long number_1 = webui_get_int(e); // Or webui_get_int_at(e, 0);
long long number_2 = webui_get_int_at(e, 1);
long long number_3 = webui_get_int_at(e, 2);
printf("my_function_integer 1: %lld\n", number_1); // 123
printf("my_function_integer 2: %lld\n", number_2); // 456
printf("my_function_integer 3: %lld\n", number_3); // 789
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4011E7", "function_addr": 4198887, "binary_name": "1745f9f6d8ee1e203a799babdc6794252fea709c9b5692c4741c483f63c78d7a.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 _webui_get_int"], [7, "mov [rbp+var_8], rax"], [8, "mov rax, [rbp+var_8]"], [9, "mov rsi, rax"], [10, "mov edi, offset aMyFunctionInte"], [11, "mov eax, 0"], [12, "call _printf"], [13, "nop"], [14, "leave"], [15, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [8, 7], [9, 8], [15, 12]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1745f9f6d8ee1e203a799babdc6794252fea709c9b5692c4741c483f63c78d7a_1745f9f6d8ee1e203a799babdc6794252fea709c9b5692c4741c483f63c78d7a.jsonl.gz", "strip_func_name": "sub_4011E7", "query": "\n\n\nint sub_4011E7()\n{\n__int64 v1; // [rsp+18h] [rbp-8h]\n\nv1 = webui_get_int();\nreturn printf(\"my_function_integer: %lld\\n\", v1);\n}\n\n\n\nQ:[v1,sub_4011E7,]\nAssistant: ", "hints": "[]", "response": "{'v1': 'number', 'sub_4011E7': 'my_function_integer'}"} |
|
os_stat_int_permissions | 2f87019bcafb28a2aa1cb80b55ea9b24b542c7cbbe0806344c2ec21759477cbf | janet-lang | janet | NA | static Janet os_stat_int_permissions(jstat_t *st) {
return janet_wrap_integer(janet_perm_to_unix(janet_decode_permissions(st->st_mode)));
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43B902", "function_addr": 4438274, "binary_name": "2f87019bcafb28a2aa1cb80b55ea9b24b542c7cbbe0806344c2ec21759477cbf.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov rax, [rbp+var_8]"], [5, "mov eax, [rax+18h]"], [6, "mov edi, eax"], [7, "call sub_43B51F"], [8, "mov edi, eax"], [9, "call sub_43B41B"], [10, "pxor xmm1, xmm1"], [11, "cvtsi2sd xmm1, eax"], [12, "movq rax, xmm1"], [13, "movq xmm0, rax"], [14, "call sub_462D71"], [15, "leave"], [16, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [8, 7], [11, 10], [11, 9], [12, 11], [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/2f87019bcafb28a2aa1cb80b55ea9b24b542c7cbbe0806344c2ec21759477cbf_2f87019bcafb28a2aa1cb80b55ea9b24b542c7cbbe0806344c2ec21759477cbf.jsonl.gz", "strip_func_name": "sub_43B902", "query": "\n\n\n__int64 __fastcall sub_43B902(__int64 a1)\n{\nunsigned int v1; // eax\nint v2; // eax\n\nv1 = sub_43B51F(*(_DWORD *)(a1 + 24));\nv2 = sub_43B41B(v1);\nreturn sub_462D71((double)v2);\n}\n\n\n\nQ:[a1,sub_43B902,sub_43B51F,sub_43B41B,sub_462D71,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'st', 'sub_43B902': 'os_stat_int_permissions', 'sub_43B51F': 'janet_decode_permissions', 'sub_43B41B': 'janet_perm_to_unix', 'sub_462D71': 'janet_nanbox_from_double'}"} |
|
make_new_eparam | 6e348e984bd63ac982d83dafa4e61fb9925c759b418264e141a667eb3a0dba17 | RTimothyEdwards | XCircuit | NA | eparamptr make_new_eparam(char *key)
{
eparamptr newepp;
newepp = (eparamptr)malloc(sizeof(eparam));
newepp->next = NULL;
newepp->key = (char *)malloc(1 + strlen(key));
strcpy(newepp->key, key);
newepp->pdata.refkey = NULL; /* equivalently, sets pointno=0 */
newepp->flags = 0;
return newepp;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4614A0", "function_addr": 4592800, "binary_name": "6e348e984bd63ac982d83dafa4e61fb9925c759b418264e141a667eb3a0dba17.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+s], rdi"], [4, "mov edi, 20h "], [5, "call _malloc"], [6, "mov [rbp+var_8], rax"], [7, "mov rax, [rbp+var_8]"], [8, "mov qword ptr [rax+18h], 0"], [9, "mov rax, [rbp+s]"], [10, "mov rdi, rax"], [11, "call _strlen"], [12, "add rax, 1"], [13, "mov rdi, rax"], [14, "call _malloc"], [15, "mov rdx, rax"], [16, "mov rax, [rbp+var_8]"], [17, "mov [rax], rdx"], [18, "mov rax, [rbp+var_8]"], [19, "mov rax, [rax]"], [20, "mov rdx, [rbp+s]"], [21, "mov rsi, rdx"], [22, "mov rdi, rax"], [23, "call _strcpy"], [24, "mov rax, [rbp+var_8]"], [25, "mov qword ptr [rax+10h], 0"], [26, "mov rax, [rbp+var_8]"], [27, "mov byte ptr [rax+8], 0"], [28, "mov rax, [rbp+var_8]"], [29, "leave"], [30, "retn"]], "data_dep": [[6, 5], [7, 6], [8, 7], [9, 3], [10, 9], [12, 11], [13, 12], [15, 14], [16, 6], [17, 15], [17, 16], [18, 6], [19, 18], [19, 17], [20, 3], [21, 20], [22, 19], [24, 6], [25, 24], [26, 6], [27, 26], [28, 6], [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/6e348e984bd63ac982d83dafa4e61fb9925c759b418264e141a667eb3a0dba17_6e348e984bd63ac982d83dafa4e61fb9925c759b418264e141a667eb3a0dba17.jsonl.gz", "strip_func_name": "sub_4614A0", "query": "\n\n\n_QWORD *__fastcall sub_4614A0(const char *a1)\n{\nsize_t v1; // rax\n_QWORD *v3; // [rsp+18h] [rbp-8h]\n\nv3 = malloc(0x20uLL);\nv3[3] = 0LL;\nv1 = strlen(a1);\n*v3 = malloc(v1 + 1);\nstrcpy((char *)*v3, a1);\nv3[2] = 0LL;\n*((_BYTE *)v3 + 8) = 0;\nreturn v3;\n}\n\n\n\nQ:[a1,v3,sub_4614A0,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'key', 'v3': 'newepp', 'sub_4614A0': 'make_new_eparam'}"} |
|
XXH64_round | 720e53d53d48d1daccec1f80d0c0a491bf51bb8eb9a5c2ba102ce82083ca16ac | soedinglab | spacepharer | NA | static U64 XXH64_round(U64 acc, U64 input)
{
acc += input * PRIME64_2;
acc = XXH_rotl64(acc, 31);
acc *= PRIME64_1;
return acc;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_423804", "function_addr": 4339716, "binary_name": "720e53d53d48d1daccec1f80d0c0a491bf51bb8eb9a5c2ba102ce82083ca16ac.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov [rbp+var_10], rsi"], [4, "mov rax, 0C2B2AE3D27D4EB4Fh"], [5, "imul rax, [rbp+var_10]"], [6, "add [rbp+var_8], rax"], [7, "rol [rbp+var_8], 1Fh"], [8, "mov rdx, 9E3779B185EBCA87h"], [9, "mov rax, [rbp+var_8]"], [10, "imul rax, rdx"], [11, "mov [rbp+var_8], rax"], [12, "mov rax, [rbp+var_8]"], [13, "pop rbp"], [14, "retn"]], "data_dep": [[5, 4], [5, 3], [6, 2], [6, 5], [7, 6], [9, 7], [10, 9], [10, 8], [11, 10], [12, 11], [13, 0], [14, 12]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/720e53d53d48d1daccec1f80d0c0a491bf51bb8eb9a5c2ba102ce82083ca16ac_720e53d53d48d1daccec1f80d0c0a491bf51bb8eb9a5c2ba102ce82083ca16ac.jsonl.gz", "strip_func_name": "sub_423804", "query": "\n\n\nunsigned __int64 __fastcall sub_423804(__int64 a1, __int64 a2)\n{\nreturn 0x9E3779B185EBCA87LL * __ROL8__(0xC2B2AE3D27D4EB4FLL * a2 + a1, 31);\n}\n\n\n\nQ:[a1,a2,sub_423804,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'acc', 'a2': 'input', 'sub_423804': 'XXH64_round'}"} |
|
dtls_ccm_decrypt | d308a07c95e1fbdd92bf261aaf558f2c22e0c701917d729bdc9671f93019d8d6 | zephyrproject-rtos | net-tools | NA | static size_t
dtls_ccm_decrypt(aes128_ccm_t *ccm_ctx, const unsigned char *src,
size_t srclen, unsigned char *buf,
unsigned char *nounce,
const unsigned char *aad, size_t la) {
long int len;
assert(ccm_ctx);
len = dtls_ccm_decrypt_message(&ccm_ctx->ctx, 8 /* M */,
max(2, 15 - DTLS_CCM_NONCE_SIZE),
nounce,
buf, srclen,
aad, la);
return len;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40C528", "function_addr": 4244776, "binary_name": "d308a07c95e1fbdd92bf261aaf558f2c22e0c701917d729bdc9671f93019d8d6.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "mov [rbp+var_30], rcx"], [7, "mov [rbp+var_38], r8"], [8, "mov [rbp+var_40], r9"], [9, "cmp [rbp+var_18], 0"], [10, "jnz short loc_40C568"], [11, "mov ecx, offset aDtlsCcmDecrypt"], [12, "mov edx, 132h"], [13, "mov esi, offset aCryptoC"], [14, "mov edi, offset aCcmCtx"], [15, "call ___assert_fail"], [16, "mov rax, [rbp+var_18]"], [17, "mov rsi, [rbp+var_28]"], [18, "mov rcx, [rbp+var_30]"], [19, "mov rdx, [rbp+var_38]"], [20, "push [rbp+arg_0]"], [21, "push [rbp+var_40]"], [22, "mov r9, rsi"], [23, "mov r8, rcx"], [24, "mov rcx, rdx"], [25, "mov edx, 3"], [26, "mov esi, 8"], [27, "mov rdi, rax"], [28, "call sub_40D88D"], [29, "add rsp, 10h"], [30, "mov [rbp+var_8], rax"], [31, "mov rax, [rbp+var_8]"], [32, "leave"], [33, "retn"]], "data_dep": [[9, 3], [10, 9], [16, 3], [17, 5], [18, 6], [19, 7], [21, 8], [22, 17], [23, 18], [24, 19], [27, 16], [29, 2], [30, 28], [31, 30], [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/d308a07c95e1fbdd92bf261aaf558f2c22e0c701917d729bdc9671f93019d8d6_d308a07c95e1fbdd92bf261aaf558f2c22e0c701917d729bdc9671f93019d8d6.jsonl.gz", "strip_func_name": "sub_40C528", "query": "\n\n\n__int64 __fastcall sub_40C528(__int64 a1, __int64 a2, int a3, int a4, int a5, __int64 a6, __int64 a7)\n{\nif ( !a1 )\n__assert_fail(\"ccm_ctx\", \"crypto.c\", 0x132u, \"dtls_ccm_decrypt\");\nreturn sub_40D88D(a1, 8, 3, a5, a4, a3, a6, a7);\n}\n\n\n\nQ:[a3,a4,a1,a5,a6,a2,a7,sub_40C528,sub_40D88D,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'srclen', 'a4': 'buf', 'a1': 'ccm_ctx', 'a5': 'nounce', 'a6': 'aad', 'a2': 'src', 'a7': 'la', 'sub_40C528': 'dtls_ccm_decrypt', 'sub_40D88D': 'dtls_ccm_decrypt_message'}"} |
|
os_program_deinit | ee14ea6e9f43a82e3de6fce33b02cf5140d44e7949e0765606a08ccbc19a37c0 | vanhoefm | krackattacks-poc-zerokey | NA | void os_program_deinit(void)
{
#ifdef WPA_TRACE
struct os_alloc_trace *a;
unsigned long total = 0;
dl_list_for_each(a, &alloc_list, struct os_alloc_trace, list) {
total += a->len;
if (a->magic != ALLOC_MAGIC) {
wpa_printf(MSG_INFO, "MEMLEAK[%p]: invalid magic 0x%x "
"len %lu",
a, a->magic, (unsigned long) a->len);
continue;
}
wpa_printf(MSG_INFO, "MEMLEAK[%p]: len %lu",
a, (unsigned long) a->len);
wpa_trace_dump("memleak", a);
}
if (total)
wpa_printf(MSG_INFO, "MEMLEAK: total %lu bytes",
(unsigned long) total);
wpa_trace_deinit();
#endif /* WPA_TRACE */
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_406619", "function_addr": 4220441, "binary_name": "ee14ea6e9f43a82e3de6fce33b02cf5140d44e7949e0765606a08ccbc19a37c0.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/ee14ea6e9f43a82e3de6fce33b02cf5140d44e7949e0765606a08ccbc19a37c0_ee14ea6e9f43a82e3de6fce33b02cf5140d44e7949e0765606a08ccbc19a37c0.jsonl.gz", "strip_func_name": "sub_406619", "query": "\n\n\nvoid sub_406619()\n{\n;\n}\n\n\n\nQ:[sub_406619,]\nAssistant: ", "hints": "[]", "response": "{'sub_406619': 'os_program_deinit'}"} |
|
ZSTD_getParamsFromCCtx | 412a748ca3e7e87ecea1502eee0b4f852f30ff2f7299cc26808b6de39fdb91dd | dimkr | szl | NA | static ZSTD_parameters ZSTD_getParamsFromCCtx(const ZSTD_CCtx* cctx)
{
return cctx->params;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4118EC", "function_addr": 4266220, "binary_name": "412a748ca3e7e87ecea1502eee0b4f852f30ff2f7299cc26808b6de39fdb91dd.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "mov [rbp+var_10], rdi"], [4, "mov [rbp+var_18], rsi"], [5, "mov rax, [rbp+var_10]"], [6, "mov rdx, [rbp+var_18]"], [7, "mov rcx, [rdx+54h]"], [8, "mov rbx, [rdx+5Ch]"], [9, "mov [rax], rcx"], [10, "mov [rax+8], rbx"], [11, "mov rcx, [rdx+64h]"], [12, "mov rbx, [rdx+6Ch]"], [13, "mov [rax+10h], rcx"], [14, "mov [rax+18h], rbx"], [15, "mov rdx, [rdx+74h]"], [16, "mov [rax+20h], rdx"], [17, "mov rax, [rbp+var_10]"], [18, "mov rbx, [rbp+var_8]"], [19, "leave"], [20, "retn"]], "data_dep": [[5, 3], [6, 4], [7, 6], [8, 6], [9, 5], [9, 7], [10, 5], [10, 8], [11, 10], [11, 6], [12, 10], [12, 6], [13, 5], [13, 11], [14, 12], [14, 5], [15, 14], [15, 6], [16, 15], [16, 5], [17, 3], [20, 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/412a748ca3e7e87ecea1502eee0b4f852f30ff2f7299cc26808b6de39fdb91dd_412a748ca3e7e87ecea1502eee0b4f852f30ff2f7299cc26808b6de39fdb91dd.jsonl.gz", "strip_func_name": "sub_4118EC", "query": "\n\n\n_QWORD *__fastcall sub_4118EC(_QWORD *a1, __int64 a2)\n{\n__int64 v2; // rbx\n__int64 v3; // rbx\n\nv2 = *(_QWORD *)(a2 + 92);\n*a1 = *(_QWORD *)(a2 + 84);\na1[1] = v2;\nv3 = *(_QWORD *)(a2 + 108);\na1[2] = *(_QWORD *)(a2 + 100);\na1[3] = v3;\na1[4] = *(_QWORD *)(a2 + 116);\nreturn a1;\n}\n\n\n\nQ:[a1,a2,sub_4118EC,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'retstr', 'a2': 'cctx', 'sub_4118EC': 'ZSTD_getParamsFromCCtx'}"} |
|
WebRtc_FreeBinaryDelayEstimatorFarend | 25c5dec96bb3133ec9c32f1c53b06126b3f458e8718b6d0581ace9fa89525fd0 | asterisk | pjproject-archive | NA | void WebRtc_FreeBinaryDelayEstimatorFarend(BinaryDelayEstimatorFarend* self) {
if (self == NULL) {
return;
}
free(self->binary_far_history);
self->binary_far_history = NULL;
free(self->far_bit_counts);
self->far_bit_counts = NULL;
free(self);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4BCD43", "function_addr": 4967747, "binary_name": "25c5dec96bb3133ec9c32f1c53b06126b3f458e8718b6d0581ace9fa89525fd0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+ptr], rdi"], [4, "cmp [rbp+ptr], 0"], [5, "jz short loc_4BCD9A"], [6, "mov rax, [rbp+ptr]"], [7, "mov rax, [rax+8]"], [8, "mov rdi, rax"], [9, "call _free"], [10, "mov rax, [rbp+ptr]"], [11, "mov qword ptr [rax+8], 0"], [12, "mov rax, [rbp+ptr]"], [13, "mov rax, [rax]"], [14, "mov rdi, rax"], [15, "call _free"], [16, "mov rax, [rbp+ptr]"], [17, "mov qword ptr [rax], 0"], [18, "mov rax, [rbp+ptr]"], [19, "mov rdi, rax"], [20, "call _free"], [21, "jmp short locret_4BCD9B"], [22, "nop"], [23, "leave"], [24, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 3], [7, 6], [8, 7], [10, 3], [11, 10], [12, 3], [13, 12], [13, 11], [14, 13], [16, 3], [17, 16], [18, 3], [19, 18], [24, 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/25c5dec96bb3133ec9c32f1c53b06126b3f458e8718b6d0581ace9fa89525fd0_25c5dec96bb3133ec9c32f1c53b06126b3f458e8718b6d0581ace9fa89525fd0.jsonl.gz", "strip_func_name": "sub_4BCD43", "query": "\n\n\nvoid __fastcall sub_4BCD43(void **a1)\n{\nif ( a1 )\n{\nfree(a1[1]);\na1[1] = 0LL;\nfree(*a1);\n*a1 = 0LL;\nfree(a1);\n}\n}\n\n\n\nQ:[a1,sub_4BCD43,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'self', 'sub_4BCD43': 'WebRtc_FreeBinaryDelayEstimatorFarend'}"} |
|
ENGINE_register_all_pkey_meths | 03c200181d5bd9d9aef7e21f9916a04779b98f82f54c02e756e7d6abb15fdf67 | RKX1209 | bitvisor-gdb | NA | void ENGINE_register_all_pkey_meths()
{
ENGINE *e;
for(e=ENGINE_get_first() ; e ; e=ENGINE_get_next(e))
ENGINE_register_pkey_meths(e);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43D463", "function_addr": 4445283, "binary_name": "03c200181d5bd9d9aef7e21f9916a04779b98f82f54c02e756e7d6abb15fdf67.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "call sub_43B319"], [4, "mov [rbp+var_8], rax"], [5, "jmp short loc_43D492"], [6, "mov rax, [rbp+var_8]"], [7, "mov rdi, rax"], [8, "call sub_43D3EF"], [9, "mov rax, [rbp+var_8]"], [10, "mov rdi, rax"], [11, "call sub_43B3EB"], [12, "mov [rbp+var_8], rax"], [13, "cmp [rbp+var_8], 0"], [14, "jnz short loc_43D476"], [15, "nop"], [16, "nop"], [17, "leave"], [18, "retn"]], "data_dep": [[4, 3], [6, 12], [6, 4], [7, 6], [9, 12], [9, 4], [10, 9], [12, 11], [13, 4], [13, 12], [14, 13], [18, 3], [18, 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/03c200181d5bd9d9aef7e21f9916a04779b98f82f54c02e756e7d6abb15fdf67_03c200181d5bd9d9aef7e21f9916a04779b98f82f54c02e756e7d6abb15fdf67.jsonl.gz", "strip_func_name": "sub_43D463", "query": "\n\n\n__int64 sub_43D463()\n{\n__int64 result; // rax\n__int64 i; // [rsp+8h] [rbp-8h]\n\nresult = sub_43B319();\nfor ( i = result; i; i = result )\n{\nsub_43D3EF(i);\nresult = sub_43B3EB(i);\n}\nreturn result;\n}\n\n\n\nQ:[i,sub_43D463,sub_43B319,sub_43D3EF,sub_43B3EB,]\nAssistant: ", "hints": "[]", "response": "{'i': 'e', 'sub_43D463': 'ENGINE_register_all_pkey_meths', 'sub_43B319': 'ENGINE_get_first', 'sub_43D3EF': 'ENGINE_register_pkey_meths', 'sub_43B3EB': 'ENGINE_get_next'}"} |
|
mpack_tree_init_data | 552648330d8e56cb3c091c2c1c2e19c4189791830acc232658290a0e8dbf3e96 | ludocode | mpack | NA | void mpack_tree_init_data(mpack_tree_t* tree, const char* data, size_t length) {
mpack_tree_init_clear(tree);
MPACK_STATIC_ASSERT(MPACK_NODE_PAGE_SIZE >= sizeof(mpack_tree_page_t),
"MPACK_NODE_PAGE_SIZE is too small");
MPACK_STATIC_ASSERT(MPACK_PAGE_ALLOC_SIZE <= MPACK_NODE_PAGE_SIZE,
"incorrect page rounding?");
tree->data = data;
tree->data_length = length;
tree->pool = NULL;
tree->pool_count = 0;
tree->next = NULL;
mpack_log("===========================\n");
mpack_log("initializing tree with data of size %i\n", (int)length);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40593B", "function_addr": 4217147, "binary_name": "552648330d8e56cb3c091c2c1c2e19c4189791830acc232658290a0e8dbf3e96.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 rdi, rax"], [8, "call sub_4058E5"], [9, "mov rax, [rbp+var_8]"], [10, "mov rdx, [rbp+var_10]"], [11, "mov [rax+58h], rdx"], [12, "mov rax, [rbp+var_8]"], [13, "mov rdx, [rbp+var_18]"], [14, "mov [rax+60h], rdx"], [15, "mov rax, [rbp+var_8]"], [16, "mov qword ptr [rax+158h], 0"], [17, "mov rax, [rbp+var_8]"], [18, "mov qword ptr [rax+160h], 0"], [19, "mov rax, [rbp+var_8]"], [20, "mov qword ptr [rax+168h], 0"], [21, "nop"], [22, "leave"], [23, "retn"]], "data_dep": [[6, 3], [7, 6], [9, 3], [10, 4], [11, 10], [11, 9], [12, 3], [13, 5], [14, 13], [14, 12], [15, 3], [16, 15], [17, 3], [18, 17], [19, 3], [20, 19], [23, 19]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/552648330d8e56cb3c091c2c1c2e19c4189791830acc232658290a0e8dbf3e96_552648330d8e56cb3c091c2c1c2e19c4189791830acc232658290a0e8dbf3e96.jsonl.gz", "strip_func_name": "sub_40593B", "query": "\n\n\n_QWORD *__fastcall sub_40593B(_QWORD *a1, __int64 a2, __int64 a3)\n{\n_QWORD *result; // rax\n\nsub_4058E5((__int64)a1);\na1[11] = a2;\na1[12] = a3;\na1[43] = 0LL;\na1[44] = 0LL;\nresult = a1;\na1[45] = 0LL;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_40593B,sub_4058E5,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'length', 'a1': 'tree', 'a2': 'data', 'sub_40593B': 'mpack_tree_init_data', 'sub_4058E5': 'mpack_tree_init_clear'}"} |
|
duk_bi_number_prototype_to_string | 3eef51aaf1b7c436a69b2722242bd3a427d13d57fe49c5d2c5815175a4745eea | creationix | dukluv | NA | DUK_INTERNAL duk_ret_t duk_bi_number_prototype_to_string(duk_context *ctx) {
duk_small_int_t radix;
duk_small_uint_t n2s_flags;
(void) duk__push_this_number_plain(ctx);
if (duk_is_undefined(ctx, 0)) {
radix = 10;
} else {
radix = (duk_small_int_t) duk_to_int_check_range(ctx, 0, 2, 36);
}
DUK_DDD(DUK_DDDPRINT("radix=%ld", (long) radix));
n2s_flags = 0;
duk_numconv_stringify(ctx,
radix /*radix*/,
0 /*digits*/,
n2s_flags /*flags*/);
return 1;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4436AF", "function_addr": 4470447, "binary_name": "3eef51aaf1b7c436a69b2722242bd3a427d13d57fe49c5d2c5815175a4745eea.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_4433D4"], [7, "mov rax, [rbp+var_18]"], [8, "mov esi, 0"], [9, "mov rdi, rax"], [10, "call sub_41F5F1"], [11, "test eax, eax"], [12, "jz short loc_4436E5"], [13, "mov [rbp+var_4], 0Ah"], [14, "jmp short loc_443703"], [15, "mov rax, [rbp+var_18]"], [16, "mov ecx, 24h "], [17, "mov edx, 2"], [18, "mov esi, 0"], [19, "mov rdi, rax"], [20, "call sub_41D893"], [21, "mov [rbp+var_4], eax"], [22, "mov [rbp+var_8], 0"], [23, "mov edx, [rbp+var_8]"], [24, "mov esi, [rbp+var_4]"], [25, "mov rax, [rbp+var_18]"], [26, "mov ecx, edx"], [27, "mov edx, 0"], [28, "mov rdi, rax"], [29, "call sub_48C025"], [30, "mov eax, 1"], [31, "leave"], [32, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 3], [9, 7], [11, 10], [12, 11], [15, 3], [19, 15], [21, 20], [23, 22], [24, 21], [24, 13], [25, 3], [26, 23], [28, 25], [32, 30]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3eef51aaf1b7c436a69b2722242bd3a427d13d57fe49c5d2c5815175a4745eea_3eef51aaf1b7c436a69b2722242bd3a427d13d57fe49c5d2c5815175a4745eea.jsonl.gz", "strip_func_name": "sub_4436AF", "query": "\n\n\n__int64 __fastcall sub_4436AF(__int64 a1)\n{\n__int64 v1; // r8\n__int64 v2; // r9\nunsigned int v4; // [rsp+1Ch] [rbp-4h]\n\nsub_4433D4(a1);\nif ( sub_41F5F1(a1, 0) )\nv4 = 10;\nelse\nv4 = sub_41D893(a1, 0, 2, 36, v1, v2);\nsub_48C025(a1, v4, 0LL, 0LL);\nreturn 1LL;\n}\n\n\n\nQ:[a1,v4,sub_4436AF,sub_4433D4,sub_41F5F1,sub_41D893,sub_48C025,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ctx', 'v4': 'radix', 'sub_4436AF': 'duk_bi_number_prototype_to_string', 'sub_4433D4': 'duk__push_this_number_plain', 'sub_41F5F1': 'duk_is_undefined', 'sub_41D893': 'duk_to_int_check_range', 'sub_48C025': 'duk_numconv_stringify'}"} |
|
_putchar | 0b06d30be7e339bab151b05d3aab305ea70814b900842171001686563396ae8d | x43x61x69 | gbdk-osx | NA | void _putchar(char c)
{
putchar(c);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401852", "function_addr": 4200530, "binary_name": "0b06d30be7e339bab151b05d3aab305ea70814b900842171001686563396ae8d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov eax, edi"], [4, "mov [rbp+var_4], al"], [5, "movsx eax, [rbp+var_4]"], [6, "mov edi, eax"], [7, "call _putchar"], [8, "nop"], [9, "leave"], [10, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [10, 7]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/0b06d30be7e339bab151b05d3aab305ea70814b900842171001686563396ae8d_0b06d30be7e339bab151b05d3aab305ea70814b900842171001686563396ae8d.jsonl.gz", "strip_func_name": "sub_401852", "query": "\n\n\nint __fastcall sub_401852(char a1)\n{\nreturn putchar(a1);\n}\n\n\n\nQ:[a1,sub_401852,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'c', 'sub_401852': '_putchar'}"} |
|
send_gatt_by_uuid_request | 1cdcd09e088b6ff1db54fa3ae8a0c70f8f219b2e121d0ce2b5639ebfe341cfd3 | Matheus-Garbelini | esp32_bluetooth_classic_sniffer | NA | static void send_gatt_by_uuid_request(gatt_client_t *gatt_client, uint16_t attribute_group_type){
if (gatt_client->uuid16){
uint8_t uuid16[2];
little_endian_store_16(uuid16, 0, gatt_client->uuid16);
att_find_by_type_value_request(ATT_FIND_BY_TYPE_VALUE_REQUEST, attribute_group_type, gatt_client->con_handle, gatt_client->start_group_handle, gatt_client->end_group_handle, uuid16, 2);
return;
}
uint8_t uuid128[16];
reverse_128(gatt_client->uuid128, uuid128);
att_find_by_type_value_request(ATT_FIND_BY_TYPE_VALUE_REQUEST, attribute_group_type, gatt_client->con_handle, gatt_client->start_group_handle, gatt_client->end_group_handle, uuid128, 16);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_435227", "function_addr": 4411943, "binary_name": "1cdcd09e088b6ff1db54fa3ae8a0c70f8f219b2e121d0ce2b5639ebfe341cfd3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_28], rdi"], [4, "mov eax, esi"], [5, "mov [rbp+var_2C], ax"], [6, "mov rax, [rbp+var_28]"], [7, "movzx eax, word ptr [rax+28h]"], [8, "test ax, ax"], [9, "jz short loc_4352A9"], [10, "mov rax, [rbp+var_28]"], [11, "movzx eax, word ptr [rax+28h]"], [12, "movzx edx, ax"], [13, "lea rax, [rbp+var_12]"], [14, "mov esi, 0"], [15, "mov rdi, rax"], [16, "call sub_4095AF"], [17, "mov rax, [rbp+var_28]"], [18, "movzx eax, word ptr [rax+3Ch]"], [19, "movzx esi, ax"], [20, "mov rax, [rbp+var_28]"], [21, "movzx eax, word ptr [rax+3Ah]"], [22, "movzx ecx, ax"], [23, "mov rax, [rbp+var_28]"], [24, "movzx eax, word ptr [rax+20h]"], [25, "movzx edx, ax"], [26, "movzx eax, [rbp+var_2C]"], [27, "lea rdi, [rbp+var_12]"], [28, "sub rsp, 8"], [29, "push 2"], [30, "mov r9, rdi"], [31, "mov r8d, esi"], [32, "mov esi, eax"], [33, "mov edi, 6"], [34, "call sub_434C49"], [35, "add rsp, 10h"], [36, "jmp short locret_435305"], [37, "mov rax, [rbp+var_28]"], [38, "lea rdx, [rax+2Ah]"], [39, "lea rax, [rbp+var_10]"], [40, "mov rsi, rax"], [41, "mov rdi, rdx"], [42, "call sub_409A61"], [43, "mov rax, [rbp+var_28]"], [44, "movzx eax, word ptr [rax+3Ch]"], [45, "movzx esi, ax"], [46, "mov rax, [rbp+var_28]"], [47, "movzx eax, word ptr [rax+3Ah]"], [48, "movzx ecx, ax"], [49, "mov rax, [rbp+var_28]"], [50, "movzx eax, word ptr [rax+20h]"], [51, "movzx edx, ax"], [52, "movzx eax, [rbp+var_2C]"], [53, "lea rdi, [rbp+var_10]"], [54, "sub rsp, 8"], [55, "push 10h"], [56, "mov r9, rdi"], [57, "mov r8d, esi"], [58, "mov esi, eax"], [59, "mov edi, 6"], [60, "call sub_434C49"], [61, "add rsp, 10h"], [62, "leave"], [63, "retn"]], "data_dep": [[5, 4], [6, 3], [7, 6], [8, 7], [9, 8], [10, 3], [11, 10], [12, 11], [13, 11], [15, 13], [17, 3], [18, 17], [19, 18], [20, 3], [21, 20], [22, 21], [23, 3], [24, 23], [25, 24], [26, 5], [27, 15], [28, 2], [30, 27], [31, 19], [32, 26], [35, 28], [37, 3], [38, 37], [39, 37], [40, 39], [41, 38], [43, 3], [44, 43], [45, 44], [46, 3], [47, 46], [48, 47], [49, 3], [50, 49], [51, 50], [52, 5], [53, 41], [54, 2], [56, 53], [57, 45], [58, 52], [61, 54], [63, 34], [63, 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/1cdcd09e088b6ff1db54fa3ae8a0c70f8f219b2e121d0ce2b5639ebfe341cfd3_1cdcd09e088b6ff1db54fa3ae8a0c70f8f219b2e121d0ce2b5639ebfe341cfd3.jsonl.gz", "strip_func_name": "sub_435227", "query": "\n\n\n__int64 __fastcall sub_435227(__int64 a1, unsigned __int16 a2)\n{\n__int64 result; // rax\nchar v3[2]; // [rsp+1Eh] [rbp-12h] BYREF\nchar v4[16]; // [rsp+20h] [rbp-10h] BYREF\n\nif ( *(_WORD *)(a1 + 40) )\n{\nsub_4095AF((__int64)v3, 0, *(_WORD *)(a1 + 40));\nresult = sub_434C49(\n6LL,\na2,\n*(unsigned __int16 *)(a1 + 32),\n*(_WORD *)(a1 + 58),\n*(unsigned __int16 *)(a1 + 60),\nv3,\n2u);\n}\nelse\n{\nsub_409A61(a1 + 42, (__int64)v4);\nresult = sub_434C49(\n6LL,\na2,\n*(unsigned __int16 *)(a1 + 32),\n*(_WORD *)(a1 + 58),\n*(unsigned __int16 *)(a1 + 60),\nv4,\n0x10u);\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v3,v4,sub_435227,sub_4095AF,sub_434C49,sub_409A61,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'gatt_client', 'a2': 'attribute_group_type', 'v3': 'uuid16', 'v4': 'uuid128', 'sub_435227': 'send_gatt_by_uuid_request', 'sub_4095AF': 'little_endian_store_16', 'sub_434C49': 'att_find_by_type_value_request', 'sub_409A61': 'reverse_128'}"} |
|
pjmedia_plc_save | a55437195f8ae7fcbc9fcbc7c4ce7ea2903742f0fcbd5868b140c66600d2ad6c | AonCyberLabs | D-Modem | NA | PJ_DEF(pj_status_t) pjmedia_plc_save( pjmedia_plc *plc,
pj_int16_t *frame )
{
PJ_ASSERT_RETURN(plc && frame, PJ_EINVAL);
plc->op->plc_save(plc->obj, frame);
return PJ_SUCCESS;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_459789", "function_addr": 4560777, "binary_name": "a55437195f8ae7fcbc9fcbc7c4ce7ea2903742f0fcbd5868b140c66600d2ad6c.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, "cmp [rbp+var_8], 0"], [6, "jz short loc_4597A7"], [7, "cmp [rbp+var_10], 0"], [8, "jnz short loc_4597D5"], [9, "cmp [rbp+var_8], 0"], [10, "jz short loc_4597B5"], [11, "cmp [rbp+var_10], 0"], [12, "jnz short loc_4597CE"], [13, "mov ecx, offset aPjmediaPlcSave"], [14, "mov edx, 5Dh "], [15, "mov esi, offset aSrcPjmediaPlcC"], [16, "mov edi, offset aPlcFrame"], [17, "call ___assert_fail"], [18, "mov eax, 11174h"], [19, "jmp short locret_4597F9"], [20, "mov rax, [rbp+var_8]"], [21, "mov rax, [rax+8]"], [22, "mov rcx, [rax+8]"], [23, "mov rax, [rbp+var_8]"], [24, "mov rax, [rax]"], [25, "mov rdx, [rbp+var_10]"], [26, "mov rsi, rdx"], [27, "mov rdi, rax"], [28, "call rcx"], [29, "mov eax, 0"], [30, "leave"], [31, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 4], [8, 7], [9, 3], [10, 9], [11, 4], [12, 11], [20, 3], [21, 20], [22, 21], [23, 3], [24, 23], [25, 4], [26, 25], [27, 24], [28, 22], [31, 29], [31, 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_459789", "query": "\n\n\n__int64 __fastcall sub_459789(_QWORD *a1, __int64 a2)\n{\n__int64 result; // rax\n\nif ( a1 && a2 )\n{\n(*(void (__fastcall **)(_QWORD, __int64))(a1[1] + 8LL))(*a1, a2);\nresult = 0LL;\n}\nelse\n{\nif ( !a1 || !a2 )\n__assert_fail(\"plc && frame\", \"../src/pjmedia/plc_common.c\", 0x5Du, \"pjmedia_plc_save\");\nresult = 70004LL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_459789,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'plc', 'a2': 'frame', 'sub_459789': 'pjmedia_plc_save'}"} |
|
BitSizeOf | 7a9fd741a95dae0778f24573dd0254b72607ff4da9f089d1feccd19f23d872f4 | MEGA65 | mega65-tools | NA | unsigned BitSizeOf (const Type* T)
/* Return the size (in bit-width) of a data type */
{
return IsTypeBitField (T) ? T->A.B.Width : CHAR_BITS * SizeOf (T);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_449BD8", "function_addr": 4496344, "binary_name": "7a9fd741a95dae0778f24573dd0254b72607ff4da9f089d1feccd19f23d872f4.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov rax, [rbp+var_8]"], [5, "mov rdi, rax"], [6, "call sub_44961C"], [7, "test eax, eax"], [8, "jz short loc_449BFD"], [9, "mov rax, [rbp+var_8]"], [10, "mov eax, [rax+0Ch]"], [11, "jmp short locret_449C0C"], [12, "mov rax, [rbp+var_8]"], [13, "mov rdi, rax"], [14, "call sub_449C0E"], [15, "shl eax, 3"], [16, "leave"], [17, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [8, 7], [9, 3], [10, 9], [12, 3], [13, 12], [15, 14], [17, 10], [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/7a9fd741a95dae0778f24573dd0254b72607ff4da9f089d1feccd19f23d872f4_7a9fd741a95dae0778f24573dd0254b72607ff4da9f089d1feccd19f23d872f4.jsonl.gz", "strip_func_name": "sub_449BD8", "query": "\n\n\n__int64 __fastcall sub_449BD8(__int64 a1)\n{\n__int64 result; // rax\n\nif ( sub_44961C((_QWORD *)a1) )\nresult = *(unsigned int *)(a1 + 12);\nelse\nresult = 8 * (unsigned int)sub_449C0E(a1);\nreturn result;\n}\n\n\n\nQ:[a1,sub_449BD8,sub_44961C,sub_449C0E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'T', 'sub_449BD8': 'BitSizeOf', 'sub_44961C': 'IsTypeBitField_1', 'sub_449C0E': 'SizeOf'}"} |
|
aux_lines | 8b2aa30b47b161f5257fdaab242db0f782b78ef50ffbda0317d5092190fe61c9 | robertdavidgraham | hellolua | NA | static void aux_lines (lua_State *L, int toclose) {
int n = lua_gettop(L) - 1; /* number of arguments to read */
luaL_argcheck(L, n <= MAXARGLINE, MAXARGLINE + 2, "too many arguments");
lua_pushinteger(L, n); /* number of arguments to read */
lua_pushboolean(L, toclose); /* close/not close file when finished */
lua_rotate(L, 2, 2); /* move 'n' and 'toclose' to their positions */
lua_pushcclosure(L, io_readline, 3 + n);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_427F03", "function_addr": 4357891, "binary_name": "8b2aa30b47b161f5257fdaab242db0f782b78ef50ffbda0317d5092190fe61c9.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 rax, [rbp+var_18]"], [6, "mov rdi, rax"], [7, "call sub_40433A"], [8, "sub eax, 1"], [9, "mov [rbp+var_4], eax"], [10, "cmp [rbp+var_4], 0FAh"], [11, "jle short loc_427F45"], [12, "mov rax, [rbp+var_18]"], [13, "mov edx, offset aTooManyArgumen_0"], [14, "mov esi, 0FCh"], [15, "mov rdi, rax"], [16, "call sub_41DDFA"], [17, "test eax, eax"], [18, "nop"], [19, "mov eax, [rbp+var_4]"], [20, "movsxd rdx, eax"], [21, "mov rax, [rbp+var_18]"], [22, "mov rsi, rdx"], [23, "mov rdi, rax"], [24, "call sub_404F39"], [25, "mov edx, [rbp+var_1C]"], [26, "mov rax, [rbp+var_18]"], [27, "mov esi, edx"], [28, "mov rdi, rax"], [29, "call sub_405345"], [30, "mov rax, [rbp+var_18]"], [31, "mov edx, 2"], [32, "mov esi, 2"], [33, "mov rdi, rax"], [34, "call sub_40448C"], [35, "mov eax, [rbp+var_4]"], [36, "lea edx, [rax+3]"], [37, "mov rax, [rbp+var_18]"], [38, "mov esi, offset sub_42899F"], [39, "mov rdi, rax"], [40, "call sub_405217"], [41, "nop"], [42, "leave"], [43, "retn"]], "data_dep": [[5, 3], [6, 5], [8, 7], [9, 8], [10, 9], [11, 10], [12, 3], [15, 12], [19, 9], [20, 19], [21, 3], [22, 20], [23, 21], [25, 4], [26, 3], [27, 25], [28, 26], [30, 3], [33, 30], [35, 9], [36, 31], [36, 35], [37, 3], [39, 37], [43, 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/8b2aa30b47b161f5257fdaab242db0f782b78ef50ffbda0317d5092190fe61c9_8b2aa30b47b161f5257fdaab242db0f782b78ef50ffbda0317d5092190fe61c9.jsonl.gz", "strip_func_name": "sub_427F03", "query": "\n\n\n__int64 __fastcall sub_427F03(_QWORD *a1, int a2)\n{\nint v3; // [rsp+1Ch] [rbp-4h]\n\nv3 = sub_40433A((__int64)a1) - 1;\nif ( v3 > 250 )\nsub_41DDFA(a1, 252, (int)\"too many arguments\");\nsub_404F39((__int64)a1, v3);\nsub_405345((__int64)a1, a2);\nsub_40448C(a1, 2, 2);\nreturn sub_405217((__int64)a1, (__int64)sub_42899F, v3 + 3);\n}\n\n\n\nQ:[a1,a2,v3,sub_427F03,sub_40433A,sub_41DDFA,sub_404F39,sub_405345,sub_40448C,sub_405217,sub_42899F,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'L', 'a2': 'toclose', 'v3': 'n', 'sub_427F03': 'aux_lines', 'sub_40433A': 'lua_gettop', 'sub_41DDFA': 'luaL_argerror', 'sub_404F39': 'lua_pushinteger', 'sub_405345': 'lua_pushboolean', 'sub_40448C': 'lua_rotate', 'sub_405217': 'lua_pushcclosure', 'sub_42899F': 'io_readline'}"} |
|
AcpiHwDerivePciId | c8491ae03f8dc9e8695f46c8251e57f69f5ff7c0ed65d1286b5d5158829a78e3 | bitdefender | napoca | NA | ACPI_STATUS
AcpiHwDerivePciId (
ACPI_PCI_ID *PciId,
ACPI_HANDLE RootPciDevice,
ACPI_HANDLE PciRegion)
{
ACPI_STATUS Status;
ACPI_PCI_DEVICE *ListHead;
ACPI_FUNCTION_TRACE (HwDerivePciId);
if (!PciId)
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
/* Build a list of PCI devices, from PciRegion up to RootPciDevice */
Status = AcpiHwBuildPciList (RootPciDevice, PciRegion, &ListHead);
if (ACPI_SUCCESS (Status))
{
/* Walk the list, updating the PCI device/function/bus numbers */
Status = AcpiHwProcessPciList (PciId, ListHead);
/* Delete the list */
AcpiHwDeletePciList (ListHead);
}
return_ACPI_STATUS (Status);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4200F8", "function_addr": 4325624, "binary_name": "c8491ae03f8dc9e8695f46c8251e57f69f5ff7c0ed65d1286b5d5158829a78e3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 38h"], [4, "mov [rbp+var_28], rdi"], [5, "mov [rbp+var_30], rsi"], [6, "mov [rbp+var_38], rdx"], [7, "mov ecx, 10h"], [8, "mov edx, offset aHwpci"], [9, "mov esi, offset aAcpihwderivepc"], [10, "mov edi, 0FEh"], [11, "call sub_438445"], [12, "cmp [rbp+var_28], 0"], [13, "jnz short loc_420152"], [14, "mov ebx, 1001h"], [15, "mov r8d, ebx"], [16, "mov ecx, 10h"], [17, "mov edx, offset aHwpci"], [18, "mov esi, offset aAcpihwderivepc"], [19, "mov edi, 103h"], [20, "call sub_4386D7"], [21, "mov eax, ebx"], [22, "jmp short loc_4201B5"], [23, "lea rdx, [rbp+var_20]"], [24, "mov rcx, [rbp+var_38]"], [25, "mov rax, [rbp+var_30]"], [26, "mov rsi, rcx"], [27, "mov rdi, rax"], [28, "call sub_4201BB"], [29, "mov [rbp+var_14], eax"], [30, "cmp [rbp+var_14], 0"], [31, "jnz short loc_420194"], [32, "mov rdx, [rbp+var_20]"], [33, "mov rax, [rbp+var_28]"], [34, "mov rsi, rdx"], [35, "mov rdi, rax"], [36, "call sub_420282"], [37, "mov [rbp+var_14], eax"], [38, "mov rax, [rbp+var_20]"], [39, "mov rdi, rax"], [40, "call sub_420409"], [41, "mov ebx, [rbp+var_14]"], [42, "mov r8d, ebx"], [43, "mov ecx, 10h"], [44, "mov edx, offset aHwpci"], [45, "mov esi, offset aAcpihwderivepc"], [46, "mov edi, 114h"], [47, "call sub_4386D7"], [48, "mov eax, ebx"], [49, "mov rbx, [rbp+var_8]"], [50, "leave"], [51, "retn"]], "data_dep": [[12, 4], [13, 12], [15, 14], [21, 14], [23, 8], [24, 6], [25, 5], [26, 24], [27, 25], [29, 28], [30, 29], [31, 30], [33, 4], [34, 32], [35, 33], [37, 36], [39, 38], [41, 29], [41, 37], [42, 41], [48, 41], [51, 21], [51, 48]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/c8491ae03f8dc9e8695f46c8251e57f69f5ff7c0ed65d1286b5d5158829a78e3_c8491ae03f8dc9e8695f46c8251e57f69f5ff7c0ed65d1286b5d5158829a78e3.jsonl.gz", "strip_func_name": "sub_4200F8", "query": "\n\n\n__int64 __fastcall sub_4200F8(__int64 a1, __int64 a2, __int64 a3)\n{\n__int64 result; // rax\nunsigned int v4; // ebx\n__int64 v6; // [rsp+20h] [rbp-20h] BYREF\nunsigned int v7; // [rsp+2Ch] [rbp-14h]\n\nsub_438445(254LL, \"AcpiHwDerivePciId\", \"hwpci\", 16LL);\nif ( a1 )\n{\nv7 = sub_4201BB(a2, a3, &v6);\nif ( !v7 )\n{\nv7 = sub_420282(a1, v6);\nsub_420409(v6);\n}\nv4 = v7;\nsub_4386D7(276LL, \"AcpiHwDerivePciId\", \"hwpci\", 16LL, v7);\nresult = v4;\n}\nelse\n{\nsub_4386D7(259LL, \"AcpiHwDerivePciId\", \"hwpci\", 16LL, 4097LL);\nresult = 4097LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v6,v7,sub_4200F8,sub_438445,sub_4201BB,sub_420282,sub_420409,sub_4386D7,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'PciRegion', 'a1': 'PciId', 'a2': 'RootPciDevice', 'v6': 'ListHead', 'v7': 'Status', 'sub_4200F8': 'AcpiHwDerivePciId', 'sub_438445': 'AcpiUtTrace', 'sub_4201BB': 'AcpiHwBuildPciList', 'sub_420282': 'AcpiHwProcessPciList', 'sub_420409': 'AcpiHwDeletePciList', 'sub_4386D7': 'AcpiUtStatusExit'}"} |
|
stat_file | da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b | axboe | fio | NA | static int stat_file(struct thread_data *td, struct fio_file *f)
{
struct filestat_options *o = td->eo;
struct timespec start;
int do_lat = !td->o.disable_lat;
struct stat statbuf;
#ifndef WIN32
struct statx statxbuf;
char *abspath;
#endif
int ret;
dprint(FD_FILE, "fd stat %s\n", f->file_name);
if (f->filetype != FIO_TYPE_FILE) {
log_err("fio: only files are supported\n");
return 1;
}
if (!strcmp(f->file_name, "-")) {
log_err("fio: can't read/write to stdin/out\n");
return 1;
}
if (do_lat)
fio_gettime(&start, NULL);
switch (o->stat_type) {
case FIO_FILESTAT_STAT:
ret = stat(f->file_name, &statbuf);
break;
case FIO_FILESTAT_LSTAT:
ret = lstat(f->file_name, &statbuf);
break;
case FIO_FILESTAT_STATX:
#ifndef WIN32
abspath = realpath(f->file_name, NULL);
if (abspath) {
ret = statx(-1, abspath, 0, STATX_ALL, &statxbuf);
free(abspath);
} else
ret = -1;
#else
ret = -1;
#endif
break;
default:
ret = -1;
break;
}
if (ret == -1) {
char buf[FIO_VERROR_SIZE];
int e = errno;
snprintf(buf, sizeof(buf), "stat(%s) type=%u", f->file_name,
o->stat_type);
td_verror(td, e, buf);
return 1;
}
if (do_lat) {
struct fc_data *data = td->io_ops_data;
uint64_t nsec;
nsec = ntime_since_now(&start);
add_clat_sample(td, data->stat_ddir, nsec, 0, 0, 0, 0);
}
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_46AE4B", "function_addr": 4632139, "binary_name": "da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 270h"], [3, "mov [rbp+var_268], rdi"], [4, "mov [rbp+var_270], rsi"], [5, "mov rax, [rbp+var_268]"], [6, "mov rax, [rax+0CD0h]"], [7, "mov [rbp+var_10], rax"], [8, "mov rax, [rbp+var_268]"], [9, "mov eax, [rax+6C8h]"], [10, "test eax, eax"], [11, "setz al"], [12, "movzx eax, al"], [13, "mov [rbp+var_14], eax"], [14, "mov rax, cs:fio_debug"], [15, "and eax, 2"], [16, "test rax, rax"], [17, "jz short loc_46AEC1"], [18, "mov rax, [rbp+var_270]"], [19, "mov rax, [rax+28h]"], [20, "mov rdx, rax"], [21, "mov esi, offset aFdStatS"], [22, "mov edi, 1"], [23, "mov eax, 0"], [24, "call __dprint"], [25, "jmp short loc_46AEC2"], [26, "nop"], [27, "mov rax, [rbp+var_270]"], [28, "mov eax, [rax+10h]"], [29, "cmp eax, 1"], [30, "jz short loc_46AEEA"], [31, "mov edi, offset aFioOnlyFilesAr"], [32, "mov eax, 0"], [33, "call log_err"], [34, "mov eax, 1"], [35, "jmp locret_46B1FE"], [36, "mov rax, [rbp+var_270]"], [37, "mov rax, [rax+28h]"], [38, "mov esi, offset asc_4CEA7F"], [39, "mov rdi, rax"], [40, "call _strcmp"], [41, "test eax, eax"], [42, "jnz short loc_46AF1F"], [43, "mov edi, offset aFioCanTReadWri_0"], [44, "mov eax, 0"], [45, "call log_err"], [46, "mov eax, 1"], [47, "jmp locret_46B1FE"], [48, "cmp [rbp+var_14], 0"], [49, "jz short loc_46AF36"], [50, "lea rax, [rbp+var_50]"], [51, "mov esi, 0"], [52, "mov rdi, rax"], [53, "call fio_gettime"], [54, "mov rax, [rbp+var_10]"], [55, "mov eax, [rax+8]"], [56, "cmp eax, 3"], [57, "jz short loc_46AFA1"], [58, "cmp eax, 3"], [59, "ja loc_46B003"], [60, "cmp eax, 1"], [61, "jz short loc_46AF5A"], [62, "cmp eax, 2"], [63, "jz short loc_46AF7F"], [64, "jmp loc_46B003"], [65, "mov rax, [rbp+var_270]"], [66, "mov rax, [rax+28h]"], [67, "lea rdx, [rbp+stat_buf]"], [68, "mov rsi, rdx"], [69, "mov rdi, rax"], [70, "call sub_4BC360"], [71, "mov [rbp+var_4], eax"], [72, "jmp loc_46B00B"], [73, "mov rax, [rbp+var_270]"], [74, "mov rax, [rax+28h]"], [75, "lea rdx, [rbp+stat_buf]"], [76, "mov rsi, rdx"], [77, "mov rdi, rax"], [78, "call sub_4BC380"], [79, "mov [rbp+var_4], eax"], [80, "jmp short loc_46B00B"], [81, "mov rax, [rbp+var_270]"], [82, "mov rax, [rax+28h]"], [83, "mov esi, 0"], [84, "mov rdi, rax"], [85, "call _realpath"], [86, "mov [rbp+ptr], rax"], [87, "cmp [rbp+ptr], 0"], [88, "jz short loc_46AFFA"], [89, "lea rdx, [rbp+var_1E0]"], [90, "mov rax, [rbp+ptr]"], [91, "mov r8, rdx"], [92, "mov ecx, 0FFFh"], [93, "mov edx, 0"], [94, "mov rsi, rax"], [95, "mov edi, 0FFFFFFFFh"], [96, "call _statx"], [97, "mov [rbp+var_4], eax"], [98, "mov rax, [rbp+ptr]"], [99, "mov rdi, rax"], [100, "call _free"], [101, "jmp short loc_46B00B"], [102, "mov [rbp+var_4], 0FFFFFFFFh"], [103, "jmp short loc_46B00B"], [104, "mov [rbp+var_4], 0FFFFFFFFh"], [105, "nop"], [106, "cmp [rbp+var_4], 0FFFFFFFFh"], [107, "jnz loc_46B19D"], [108, "call ___errno_location"], [109, "mov eax, [rax]"], [110, "mov [rbp+errnum], eax"], [111, "mov rax, [rbp+var_10]"], [112, "mov ecx, [rax+8]"], [113, "mov rax, [rbp+var_270]"], [114, "mov rdx, [rax+28h]"], [115, "lea rax, [rbp+s]"], [116, "mov r8d, ecx"], [117, "mov rcx, rdx"], [118, "mov edx, offset aStatSTypeU"], [119, "mov esi, 80h"], [120, "mov rdi, rax"], [121, "mov eax, 0"], [122, "call _snprintf"], [123, "mov eax, [rbp+errnum]"], [124, "mov [rbp+var_38], eax"], [125, "mov rax, [rbp+var_268]"], [126, "mov eax, [rax+2DEC0h]"], [127, "test eax, eax"], [128, "jnz short loc_46B0D9"], [129, "mov edx, [rbp+var_38]"], [130, "mov rax, [rbp+var_268]"], [131, "mov [rax+2DEC0h], edx"], [132, "mov rax, [rbp+var_268]"], [133, "mov eax, [rax+2E96Ch]"], [134, "test eax, eax"], [135, "jnz short loc_46B0DA"], [136, "mov eax, [rbp+errnum]"], [137, "mov edi, eax"], [138, "call _strerror"], [139, "mov rdx, [rbp+var_268]"], [140, "lea rdi, [rdx+2EA40h]"], [141, "lea rdx, [rbp+s]"], [142, "sub rsp, 8"], [143, "push rax"], [144, "mov r9, rdx"], [145, "mov r8d, 0A2h"], [146, "mov ecx, offset aEnginesFileope"], [147, "mov edx, offset aFileSDFuncSErr_10"], [148, "mov esi, 80h"], [149, "mov eax, 0"], [150, "call sub_46AA39"], [151, "add rsp, 10h"], [152, "jmp short loc_46B0DA"], [153, "nop"], [154, "mov rax, [rbp+var_268]"], [155, "mov rax, [rax+2DC70h]"], [156, "test rax, rax"], [157, "jz loc_46B196"], [158, "mov eax, [rbp+errnum]"], [159, "mov [rbp+var_3C], eax"], [160, "mov rax, [rbp+var_268]"], [161, "mov rax, [rax+2DC70h]"], [162, "mov eax, [rax+2DEC0h]"], [163, "test eax, eax"], [164, "jnz loc_46B195"], [165, "mov rax, [rbp+var_268]"], [166, "mov rax, [rax+2DC70h]"], [167, "mov edx, [rbp+var_3C]"], [168, "mov [rax+2DEC0h], edx"], [169, "mov rax, [rbp+var_268]"], [170, "mov rax, [rax+2DC70h]"], [171, "mov eax, [rax+2E96Ch]"], [172, "test eax, eax"], [173, "jnz short loc_46B196"], [174, "mov eax, [rbp+errnum]"], [175, "mov edi, eax"], [176, "call _strerror"], [177, "mov rdx, [rbp+var_268]"], [178, "mov rdx, [rdx+2DC70h]"], [179, "lea rdi, [rdx+2EA40h]"], [180, "lea rdx, [rbp+s]"], [181, "sub rsp, 8"], [182, "push rax"], [183, "mov r9, rdx"], [184, "mov r8d, 0A2h"], [185, "mov ecx, offset aEnginesFileope"], [186, "mov edx, offset aFileSDFuncSErr_10"], [187, "mov esi, 80h"], [188, "mov eax, 0"], [189, "call sub_46AA39"], [190, "add rsp, 10h"], [191, "jmp short loc_46B196"], [192, "nop"], [193, "mov eax, 1"], [194, "jmp short locret_46B1FE"], [195, "cmp [rbp+var_14], 0"], [196, "jz short loc_46B1F9"], [197, "mov rax, [rbp+var_268]"], [198, "mov rax, [rax+2E298h]"], [199, "mov [rbp+var_28], rax"], [200, "lea rax, [rbp+var_50]"], [201, "mov rdi, rax"], [202, "call ntime_since_now"], [203, "mov [rbp+var_30], rax"], [204, "mov rax, [rbp+var_28]"], [205, "mov esi, [rax]"], [206, "mov rdx, [rbp+var_30]"], [207, "mov rax, [rbp+var_268]"], [208, "sub rsp, 8"], [209, "push 0"], [210, "mov r9d, 0"], [211, "mov r8d, 0"], [212, "mov ecx, 0"], [213, "mov rdi, rax"], [214, "call add_clat_sample"], [215, "add rsp, 10h"], [216, "mov eax, 0"], [217, "leave"], [218, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 3], [9, 8], [10, 9], [11, 10], [12, 11], [13, 12], [15, 14], [16, 15], [17, 16], [18, 4], [19, 18], [20, 19], [27, 4], [28, 27], [29, 28], [30, 29], [36, 4], [37, 36], [39, 37], [41, 40], [42, 41], [48, 13], [49, 48], [50, 41], [52, 50], [54, 7], [55, 54], [56, 55], [57, 56], [58, 55], [59, 58], [60, 55], [61, 60], [62, 55], [63, 62], [65, 4], [66, 65], [67, 20], [68, 67], [69, 66], [71, 70], [73, 4], [74, 73], [75, 20], [76, 75], [77, 74], [79, 78], [81, 4], [82, 81], [84, 82], [86, 85], [87, 86], [88, 87], [89, 20], [90, 86], [91, 89], [94, 90], [97, 96], [98, 86], [99, 98], [106, 79], [106, 102], [106, 104], [106, 97], [106, 71], [107, 106], [109, 108], [110, 109], [111, 7], [112, 111], [113, 4], [114, 113], [115, 113], [116, 112], [117, 114], [120, 115], [123, 110], [124, 123], [125, 3], [126, 125], [127, 126], [128, 127], [129, 124], [130, 3], [131, 129], [131, 130], [132, 3], [133, 132], [133, 131], [134, 133], [135, 134], [136, 110], [137, 136], [139, 3], [140, 137], [140, 139], [140, 131], [141, 139], [142, 2], [143, 138], [144, 141], [151, 142], [154, 3], [155, 131], [155, 154], [156, 155], [157, 156], [158, 110], [159, 158], [160, 3], [161, 131], [161, 160], [162, 131], [162, 161], [163, 162], [164, 163], [165, 3], [166, 165], [166, 168], [166, 131], [167, 159], [168, 166], [168, 167], [169, 3], [170, 169], [170, 168], [171, 168], [171, 170], [172, 171], [173, 172], [174, 110], [175, 174], [177, 3], [178, 168], [178, 177], [178, 131], [179, 178], [179, 175], [179, 168], [179, 131], [180, 178], [181, 2], [181, 151], [182, 176], [183, 180], [190, 181], [195, 13], [196, 195], [197, 3], [198, 197], [199, 198], [200, 198], [201, 200], [203, 202], [204, 199], [205, 204], [206, 203], [207, 3], [208, 2], [213, 207], [215, 208], [218, 193], [218, 46], [218, 34], [218, 216]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n 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_46AE4B", "query": "\n\n\n__int64 __fastcall sub_46AE4B(__int64 a1, const char *a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 result; // rax\n__int64 v7; // rdx\n__int64 v8; // rcx\n__int64 v9; // r8\n__int64 v10; // r9\nunsigned int v11; // eax\nchar *v12; // rax\nchar *v13; // rax\nconst char *v14; // [rsp+0h] [rbp-270h]\nchar s[128]; // [rsp+10h] [rbp-260h] BYREF\nstruct stat64 stat_buf; // [rsp+190h] [rbp-E0h] BYREF\nstruct timespec v17; // [rsp+220h] [rbp-50h] BYREF\nint v18; // [rsp+234h] [rbp-3Ch]\nint v19; // [rsp+238h] [rbp-38h]\nint errnum; // [rsp+23Ch] [rbp-34h]\n__int64 v21; // [rsp+240h] [rbp-30h]\nint *v22; // [rsp+248h] [rbp-28h]\nvoid *ptr; // [rsp+250h] [rbp-20h]\n_BOOL4 v24; // [rsp+25Ch] [rbp-14h]\n__int64 v25; // [rsp+260h] [rbp-10h]\nint v26; // [rsp+26Ch] [rbp-4h]\n\nv14 = a2;\nv25 = *(_QWORD *)(a1 + 3280);\nv24 = *(_DWORD *)(a1 + 1736) == 0;\nif ( (fio_debug & 2) != 0 )\n{\na2 = \"fd stat %s\\n\";\n_dprint(1, \"fd stat %s\\n\", *((_QWORD *)v14 + 5), a4, a5, a6);\n}\nif ( *((_DWORD *)v14 + 4) != 1 )\n{\nlog_err(\"fio: only files are supported\\n\", (__int64)a2, a3, a4, a5, a6);\nreturn 1LL;\n}\nif ( !strcmp(*((const char **)v14 + 5), \"-\") )\n{\nlog_err(\"fio: can't read/write to stdin/out\\n\", (__int64)\"-\", v7, v8, v9, v10);\nreturn 1LL;\n}\nif ( v24 )\nfio_gettime(&v17, 0);\nv11 = *(_DWORD *)(v25 + 8);\nif ( v11 == 3 )\n{\nptr = realpath(*((const char **)v14 + 5), 0LL);\nif ( ptr )\n{\nv26 = statx();\nfree(ptr);\n}\nelse\n{\nv26 = -1;\n}\n}\nelse\n{\nif ( v11 > 3 )\ngoto LABEL_19;\nif ( v11 == 1 )\n{\nv26 = sub_4BC360(*((char **)v14 + 5), &stat_buf);\ngoto LABEL_20;\n}\nif ( v11 == 2 )\nv26 = sub_4BC380(*((char **)v14 + 5), &stat_buf);\nelse\nLABEL_19:\nv26 = -1;\n}\nLABEL_20:\nif ( v26 == -1 )\n{\nerrnum = *__errno_location();\nsnprintf(s, 0x80uLL, \"stat(%s) type=%u\", *((const char **)v14 + 5), *(unsigned int *)(v25 + 8));\nv19 = errnum;\nif ( !*(_DWORD *)(a1 + 188096) )\n{\n*(_DWORD *)(a1 + 188096) = v19;\nif ( !*(_DWORD *)(a1 + 190828) )\n{\nv12 = strerror(errnum);\nsub_46AA39(\n(char *)(a1 + 191040),\n0x80uLL,\n\"file:%s:%d, func=%s, error=%s\",\n(__int64)\"engines/fileoperations.c\",\n162LL,\n(__int64)s,\nv12);\n}\n}\nif ( *(_QWORD *)(a1 + 187504) )\n{\nv18 = errnum;\nif ( !*(_DWORD *)(*(_QWORD *)(a1 + 187504) + 188096LL) )\n{\n*(_DWORD *)(*(_QWORD *)(a1 + 187504) + 188096LL) = v18;\nif ( !*(_DWORD *)(*(_QWORD *)(a1 + 187504) + 190828LL) )\n{\nv13 = strerror(errnum);\nsub_46AA39(\n(char *)(*(_QWORD *)(a1 + 187504) + 191040LL),\n0x80uLL,\n\"file:%s:%d, func=%s, error=%s\",\n(__int64)\"engines/fileoperations.c\",\n162LL,\n(__int64)s,\nv13);\n}\n}\n}\nresult = 1LL;\n}\nelse\n{\nif ( v24 )\n{\nv22 = *(int **)(a1 + 189080);\nv21 = ntime_since_now(&v17);\nadd_clat_sample(a1, *v22, v21, 0LL, 0LL, 0, 0);\n}\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,s,stat_buf,v17,v18,v19,errnum,v21,v22,ptr,v24,v25,sub_46AE4B,sub_4BC360,sub_4BC380,sub_46AA39,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'td', 'a2': 'f', 's': 'buf', 'stat_buf': 'statbuf', 'v17': 'start', 'v18': '____e_0', 'v19': '____e', 'errnum': 'e', 'v21': 'nsec', 'v22': 'data', 'ptr': 'abspath', 'v24': 'do_lat', 'v25': 'o', 'sub_46AE4B': 'stat_file', 'sub_4BC360': 'stat64', 'sub_4BC380': 'lstat64', 'sub_46AA39': 'nowarn_snprintf_10'}"} |
|
s2n_init_drbgs | 7421faa8c444aeca9266add08f45c75a4f43aebd993f880cd35dd964f63fdfb2 | aws | s2n-tls | NA | static S2N_RESULT s2n_init_drbgs(void)
{
uint8_t s2n_public_drbg[] = "s2n public drbg";
uint8_t s2n_private_drbg[] = "s2n private drbg";
struct s2n_blob public = { 0 };
RESULT_GUARD_POSIX(s2n_blob_init(&public, s2n_public_drbg, sizeof(s2n_public_drbg)));
struct s2n_blob private = { 0 };
RESULT_GUARD_POSIX(s2n_blob_init(&private, s2n_private_drbg, sizeof(s2n_private_drbg)));
RESULT_ENSURE(pthread_once(&s2n_per_thread_rand_state_key_once, s2n_drbg_make_rand_state_key) == 0, S2N_ERR_DRBG);
RESULT_ENSURE_EQ(pthread_key_create_result, 0);
RESULT_GUARD(s2n_drbg_instantiate(&s2n_per_thread_rand_state.public_drbg, &public, S2N_AES_128_CTR_NO_DF_PR));
RESULT_GUARD(s2n_drbg_instantiate(&s2n_per_thread_rand_state.private_drbg, &private, S2N_AES_256_CTR_NO_DF_PR));
RESULT_ENSURE(pthread_setspecific(s2n_per_thread_rand_state_key, &s2n_per_thread_rand_state) == 0, S2N_ERR_DRBG);
s2n_per_thread_rand_state.drbgs_initialized = true;
return S2N_RESULT_OK;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_415E8C", "function_addr": 4284044, "binary_name": "7421faa8c444aeca9266add08f45c75a4f43aebd993f880cd35dd964f63fdfb2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 78h"], [4, "mov rax, fs:28h"], [5, "mov [rbp+var_18], rax"], [6, "xor eax, eax"], [7, "mov rax, 6C627570206E3273h"], [8, "mov rdx, 67627264206369h"], [9, "mov [rbp+var_40], rax"], [10, "mov [rbp+var_38], rdx"], [11, "mov rax, 76697270206E3273h"], [12, "mov rdx, 6762726420657461h"], [13, "mov [rbp+var_30], rax"], [14, "mov [rbp+var_28], rdx"], [15, "mov [rbp+var_20], 0"], [16, "mov [rbp+var_80], 0"], [17, "mov [rbp+var_78], 0"], [18, "mov [rbp+var_70], 0"], [19, "lea rcx, [rbp+var_40]"], [20, "lea rax, [rbp+var_80]"], [21, "mov edx, 10h"], [22, "mov rsi, rcx"], [23, "mov rdi, rax"], [24, "call sub_417747"], [25, "test eax, eax"], [26, "jns short loc_415F1E"], [27, "mov eax, 0FFFFFFFFh"], [28, "jmp loc_4160A8"], [29, "mov [rbp+var_60], 0"], [30, "mov [rbp+var_58], 0"], [31, "mov [rbp+var_50], 0"], [32, "lea rcx, [rbp+var_30]"], [33, "lea rax, [rbp+var_60]"], [34, "mov edx, 11h"], [35, "mov rsi, rcx"], [36, "mov rdi, rax"], [37, "call sub_417747"], [38, "test eax, eax"], [39, "jns short loc_415F5C"], [40, "mov eax, 0FFFFFFFFh"], [41, "jmp loc_4160A8"], [42, "lea rsi, init_routine"], [43, "lea rdi, once_control"], [44, "call _pthread_once"], [45, "test eax, eax"], [46, "jz short loc_415FB2"], [47, "mov rax, fs:0"], [48, "lea rax, [rax-18h]"], [49, "lea rdx, aErrorEncounter_6"], [50, "mov [rax], rdx"], [51, "mov rax, fs:0"], [52, "lea rax, [rax-20h]"], [53, "mov dword ptr [rax], 18000023h"], [54, "call sub_46D9B7"], [55, "mov eax, 0FFFFFFFFh"], [56, "jmp loc_4160A8"], [57, "lea rbx, [rbp+var_80]"], [58, "mov rax, fs:0"], [59, "lea rax, [rax-80h]"], [60, "add rax, 8"], [61, "mov edx, 0"], [62, "mov rsi, rbx"], [63, "mov rdi, rax"], [64, "call sub_45C72C"], [65, "mov edi, eax"], [66, "call sub_4191D7"], [67, "xor eax, 1"], [68, "test al, al"], [69, "jz short loc_415FF2"], [70, "mov eax, 0FFFFFFFFh"], [71, "jmp loc_4160A8"], [72, "lea rbx, [rbp+var_60]"], [73, "mov rax, fs:0"], [74, "lea rax, [rax-80h]"], [75, "add rax, 30h "], [76, "mov edx, 1"], [77, "mov rsi, rbx"], [78, "mov rdi, rax"], [79, "call sub_45C72C"], [80, "mov edi, eax"], [81, "call sub_4191D7"], [82, "xor eax, 1"], [83, "test al, al"], [84, "jz short loc_41602F"], [85, "mov eax, 0FFFFFFFFh"], [86, "jmp short loc_4160A8"], [87, "mov ebx, cs:key"], [88, "mov rax, fs:0"], [89, "lea rax, [rax-80h]"], [90, "mov rsi, rax"], [91, "mov edi, ebx"], [92, "call _pthread_setspecific"], [93, "test eax, eax"], [94, "jz short loc_41608F"], [95, "mov rax, fs:0"], [96, "lea rax, [rax-18h]"], [97, "lea rdx, aErrorEncounter_7"], [98, "mov [rax], rdx"], [99, "mov rax, fs:0"], [100, "lea rax, [rax-20h]"], [101, "mov dword ptr [rax], 18000023h"], [102, "call sub_46D9B7"], [103, "mov eax, 0FFFFFFFFh"], [104, "jmp short loc_4160A8"], [105, "mov rax, fs:0"], [106, "lea rax, [rax-80h]"], [107, "mov byte ptr [rax+58h], 1"], [108, "mov eax, 0"], [109, "mov rcx, [rbp+var_18]"], [110, "sub rcx, fs:28h"], [111, "jz short loc_4160BC"], [112, "call ___stack_chk_fail"], [113, "mov rbx, [rbp+var_8]"], [114, "leave"], [115, "retn"]], "data_dep": [[5, 4], [9, 7], [10, 8], [13, 11], [14, 12], [19, 9], [20, 11], [20, 16], [22, 19], [23, 20], [25, 24], [26, 25], [32, 13], [32, 19], [33, 29], [33, 25], [35, 32], [36, 33], [38, 37], [39, 38], [42, 35], [43, 36], [45, 44], [46, 45], [48, 47], [49, 34], [50, 49], [50, 48], [52, 51], [52, 50], [53, 52], [57, 16], [59, 58], [60, 59], [62, 57], [63, 60], [65, 64], [67, 66], [68, 67], [69, 68], [72, 57], [72, 29], [74, 73], [75, 74], [77, 72], [78, 75], [80, 79], [82, 81], [83, 82], [84, 83], [89, 88], [90, 89], [91, 87], [93, 92], [94, 93], [96, 95], [97, 76], [98, 97], [98, 96], [100, 98], [100, 99], [101, 100], [106, 105], [107, 106], [109, 5], [110, 109], [111, 110], [115, 108], [115, 40], [115, 55], [115, 70], [115, 85], [115, 27], [115, 103]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/7421faa8c444aeca9266add08f45c75a4f43aebd993f880cd35dd964f63fdfb2_7421faa8c444aeca9266add08f45c75a4f43aebd993f880cd35dd964f63fdfb2.jsonl.gz", "strip_func_name": "sub_415E8C", "query": "\n\n\n__int64 sub_415E8C()\n{\n__int64 result; // rax\nunsigned int v1; // eax\nunsigned int v2; // eax\n__int64 v3[4]; // [rsp+0h] [rbp-80h] BYREF\n__int64 v4[4]; // [rsp+20h] [rbp-60h] BYREF\nchar v5[16]; // [rsp+40h] [rbp-40h] BYREF\nchar v6[24]; // [rsp+50h] [rbp-30h] BYREF\nunsigned __int64 v7; // [rsp+68h] [rbp-18h]\n\nv7 = __readfsqword(0x28u);\nstrcpy(v5, \"s2n public drbg\");\nstrcpy(v6, \"s2n private drbg\");\nv3[0] = 0LL;\nv3[1] = 0LL;\nv3[2] = 0LL;\nif ( (int)sub_417747(v3, v5, 16LL) < 0 )\nreturn 0xFFFFFFFFLL;\nv4[0] = 0LL;\nv4[1] = 0LL;\nv4[2] = 0LL;\nif ( (int)sub_417747(v4, v6, 17LL) < 0 )\nreturn 0xFFFFFFFFLL;\nif ( pthread_once(&once_control, init_routine) )\n{\n*(_QWORD *)(__readfsqword(0) - 24) = \"Error encountered in s2n_random.c:193\";\n*(_DWORD *)(__readfsqword(0) - 32) = 402653219;\nsub_46D9B7();\nresult = 0xFFFFFFFFLL;\n}\nelse\n{\nv1 = sub_45C72C(__readfsqword(0) - 128 + 8, v3, 0LL);\nif ( (unsigned __int8)sub_4191D7(v1) != 1 )\n{\nresult = 0xFFFFFFFFLL;\n}\nelse\n{\nv2 = sub_45C72C(__readfsqword(0) - 128 + 48, v4, 1LL);\nif ( (unsigned __int8)sub_4191D7(v2) != 1 )\n{\nresult = 0xFFFFFFFFLL;\n}\nelse if ( pthread_setspecific(key, (const void *)(__readfsqword(0) - 128)) )\n{\n*(_QWORD *)(__readfsqword(0) - 24) = \"Error encountered in s2n_random.c:198\";\n*(_DWORD *)(__readfsqword(0) - 32) = 402653219;\nsub_46D9B7();\nresult = 0xFFFFFFFFLL;\n}\nelse\n{\n*(_BYTE *)(__readfsqword(0) - 128 + 88) = 1;\nresult = 0LL;\n}\n}\n}\nreturn result;\n}\n\n\n\nQ:[v3,v4,v5,v6,sub_415E8C,sub_417747,sub_46D9B7,sub_45C72C,sub_4191D7,]\nAssistant: ", "hints": "[]", "response": "{'v3': 'publica', 'v4': 'privatea', 'v5': 's2n_public_drbg', 'v6': 's2n_private_drbg', 'sub_415E8C': 's2n_init_drbgs', 'sub_417747': 's2n_blob_init', 'sub_46D9B7': 's2n_calculate_stacktrace', 'sub_45C72C': 's2n_drbg_instantiate', 'sub_4191D7': 's2n_result_is_ok'}"} |
|
HT_GenHash | b5a5da0fac90c978812d6210ca18d5465f705ef59f7da44a10439a03419376b9 | dmsc | fastbasic | NA | static unsigned HT_GenHash (const void* Key)
/* Generate the hash over a key. */
{
return HashBuf (Key);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404952", "function_addr": 4213074, "binary_name": "b5a5da0fac90c978812d6210ca18d5465f705ef59f7da44a10439a03419376b9.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov rax, [rbp+var_8]"], [5, "mov rdi, rax"], [6, "call sub_40335C"], [7, "leave"], [8, "retn"]], "data_dep": [[4, 3], [5, 4], [8, 6]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/b5a5da0fac90c978812d6210ca18d5465f705ef59f7da44a10439a03419376b9_b5a5da0fac90c978812d6210ca18d5465f705ef59f7da44a10439a03419376b9.jsonl.gz", "strip_func_name": "sub_404952", "query": "\n\n\n__int64 __fastcall sub_404952(_QWORD *a1)\n{\nreturn sub_40335C(a1);\n}\n\n\n\nQ:[a1,sub_404952,sub_40335C,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'Key', 'sub_404952': 'HT_GenHash', 'sub_40335C': 'HashBuf'}"} |
|
pj_thread_is_registered | d4ed0248ecf0b71e46b6ba1555cac8234904a28ed79445617a3fd566e7483f9c | AonCyberLabs | D-Modem | NA | PJ_DEF(pj_bool_t) pj_thread_is_registered(void)
{
#if PJ_HAS_THREADS
return pj_thread_local_get(thread_tls_id) != 0;
#else
pj_assert("pj_thread_is_registered() called in non-threading mode!");
return PJ_TRUE;
#endif
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4192BB", "function_addr": 4297403, "binary_name": "d4ed0248ecf0b71e46b6ba1555cac8234904a28ed79445617a3fd566e7483f9c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov rax, cs:qword_43A4A8"], [3, "mov rdi, rax"], [4, "call sub_419F08"], [5, "test rax, rax"], [6, "setnz al"], [7, "movzx eax, al"], [8, "pop rbp"], [9, "retn"]], "data_dep": [[3, 2], [5, 4], [6, 5], [7, 6], [8, 0], [9, 7]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d4ed0248ecf0b71e46b6ba1555cac8234904a28ed79445617a3fd566e7483f9c_d4ed0248ecf0b71e46b6ba1555cac8234904a28ed79445617a3fd566e7483f9c.jsonl.gz", "strip_func_name": "sub_4192BB", "query": "\n\n\n_BOOL8 sub_4192BB()\n{\nreturn sub_419F08(qword_43A4A8) != 0;\n}\n\n\n\nQ:[sub_4192BB,sub_419F08,]\nAssistant: ", "hints": "[]", "response": "{'sub_4192BB': 'pj_thread_is_registered', 'sub_419F08': 'pj_thread_local_get'}"} |
|
DecodeFixedPointScaleImm32 | 57a1205861373a750f3e5da5e31d94ad23e74ba0b8590e4f8967e5b3526ffe2e | dnasdw | 3dstool | NA | static DecodeStatus DecodeFixedPointScaleImm32(MCInst *Inst, unsigned Imm,
uint64_t Addr,
const void *Decoder)
{
// scale{5} is asserted as 1 in tblgen.
Imm |= 0x20;
MCOperand_CreateImm0(Inst, 64 - Imm);
return Success;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_46700E", "function_addr": 4616206, "binary_name": "57a1205861373a750f3e5da5e31d94ad23e74ba0b8590e4f8967e5b3526ffe2e.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_C], esi"], [5, "mov [rbp+var_18], rdx"], [6, "mov [rbp+var_20], rcx"], [7, "or [rbp+var_C], 20h"], [8, "mov eax, 40h "], [9, "sub eax, [rbp+var_C]"], [10, "mov edx, eax"], [11, "mov rax, [rbp+var_8]"], [12, "mov rsi, rdx"], [13, "mov rdi, rax"], [14, "call sub_404D3C"], [15, "mov eax, 3"], [16, "leave"], [17, "retn"]], "data_dep": [[7, 4], [9, 8], [9, 7], [10, 9], [11, 3], [12, 10], [13, 11], [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/57a1205861373a750f3e5da5e31d94ad23e74ba0b8590e4f8967e5b3526ffe2e_57a1205861373a750f3e5da5e31d94ad23e74ba0b8590e4f8967e5b3526ffe2e.jsonl.gz", "strip_func_name": "sub_46700E", "query": "\n\n\n__int64 __fastcall sub_46700E(__int64 a1, int a2)\n{\nsub_404D3C(a1, 64 - (a2 | 0x20u));\nreturn 3LL;\n}\n\n\n\nQ:[a1,a2,sub_46700E,sub_404D3C,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'Inst', 'a2': 'Imm', 'sub_46700E': 'DecodeFixedPointScaleImm32', 'sub_404D3C': 'MCOperand_CreateImm0'}"} |
|
ral_ini | 3e34965c13508885b6b154f2c30077490ddbf23ac2d63f3c173f3ad61b227c59 | lorabasics | basicstation | NA | void ral_ini() {
last_xtime = 0;
rt_iniTimer(&rxpollTmr, rxpolling);
rt_iniTimer(&syncTmr, synctime);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41E897", "function_addr": 4319383, "binary_name": "3e34965c13508885b6b154f2c30077490ddbf23ac2d63f3c173f3ad61b227c59.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov cs:qword_4FAE28, 0"], [3, "mov esi, offset sub_41E2C1"], [4, "mov edi, offset unk_4FAE40"], [5, "call sub_4104BE"], [6, "mov esi, offset sub_41DE5C"], [7, "mov edi, offset unk_4FAE60"], [8, "call sub_4104BE"], [9, "nop"], [10, "pop rbp"], [11, "retn"]], "data_dep": [[10, 0], [11, 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/3e34965c13508885b6b154f2c30077490ddbf23ac2d63f3c173f3ad61b227c59_3e34965c13508885b6b154f2c30077490ddbf23ac2d63f3c173f3ad61b227c59.jsonl.gz", "strip_func_name": "sub_41E897", "query": "\n\n\n_QWORD *sub_41E897()\n{\nqword_4FAE28 = 0LL;\nsub_4104BE(qword_4FAE40, (__int64)sub_41E2C1);\nreturn sub_4104BE(qword_4FAE60, (__int64)sub_41DE5C);\n}\n\n\n\nQ:[sub_41E897,sub_4104BE,sub_41E2C1,sub_41DE5C,]\nAssistant: ", "hints": "[]", "response": "{'sub_41E897': 'ral_ini', 'sub_4104BE': 'rt_iniTimer', 'sub_41E2C1': 'rxpolling', 'sub_41DE5C': 'synctime'}"} |
|
cmp_uint_gt | f81232e8f8bf3f198b92df9965bc7b2feb48e99e357e3b3705f6a1a64be42560 | rswinkle | C_Interpreter | NA | int cmp_uint_gt(const void* a, const void* b)
{
unsigned int a_ = *(unsigned int*)a;
unsigned int b_ = *(unsigned int*)b;
if (a_ > b_)
return -1;
if (a_ < b_)
return 1;
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41A78A", "function_addr": 4302730, "binary_name": "f81232e8f8bf3f198b92df9965bc7b2feb48e99e357e3b3705f6a1a64be42560.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov [rbp+var_20], rsi"], [4, "mov rax, [rbp+var_18]"], [5, "mov eax, [rax]"], [6, "mov [rbp+var_4], eax"], [7, "mov rax, [rbp+var_20]"], [8, "mov eax, [rax]"], [9, "mov [rbp+var_8], eax"], [10, "mov eax, [rbp+var_4]"], [11, "cmp eax, [rbp+var_8]"], [12, "jbe short loc_41A7B7"], [13, "mov eax, 0FFFFFFFFh"], [14, "jmp short loc_41A7CB"], [15, "mov eax, [rbp+var_4]"], [16, "cmp eax, [rbp+var_8]"], [17, "jnb short loc_41A7C6"], [18, "mov eax, 1"], [19, "jmp short loc_41A7CB"], [20, "mov eax, 0"], [21, "pop rbp"], [22, "retn"]], "data_dep": [[4, 2], [5, 4], [6, 5], [7, 3], [8, 7], [9, 8], [10, 6], [11, 10], [11, 9], [12, 11], [15, 6], [16, 9], [16, 15], [17, 16], [21, 0], [22, 18], [22, 20], [22, 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/f81232e8f8bf3f198b92df9965bc7b2feb48e99e357e3b3705f6a1a64be42560_f81232e8f8bf3f198b92df9965bc7b2feb48e99e357e3b3705f6a1a64be42560.jsonl.gz", "strip_func_name": "sub_41A78A", "query": "\n\n\n__int64 __fastcall sub_41A78A(_DWORD *a1, _DWORD *a2)\n{\n__int64 result; // rax\n\nif ( *a1 <= *a2 )\nresult = *a1 < *a2;\nelse\nresult = 0xFFFFFFFFLL;\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_41A78A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'a', 'a2': 'b', 'sub_41A78A': 'cmp_uint_gt'}"} |
|
show_queue | c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7 | open-simh | simh | NA | t_stat show_queue (FILE *st, DEVICE *dnotused, UNIT *unotused, int32 flag, CONST char *cptr)
{
DEVICE *dptr;
UNIT *uptr;
MEMFILE buf;
memset (&buf, 0, sizeof (buf));
if (cptr && (*cptr != 0))
return SCPE_2MARG;
if (sim_clock_queue == QUEUE_LIST_END)
fprintf (st, "%s event queue empty, time = %.0f, executing %s %s/sec\n",
sim_name, sim_time, sim_fmt_numeric (sim_timer_inst_per_sec ()), sim_vm_interval_units);
else {
const char *tim = "";
double inst_per_sec = sim_timer_inst_per_sec ();
fprintf (st, "%s event queue status, time = %.0f, executing %s %s/sec\n",
sim_name, sim_time, sim_fmt_numeric (inst_per_sec), sim_vm_interval_units);
for (uptr = sim_clock_queue; uptr != QUEUE_LIST_END; uptr = uptr->next) {
if (uptr == &sim_step_unit)
fprintf (st, " Step timer");
else
if (uptr == &sim_expect_unit)
fprintf (st, " Expect fired");
else
if ((dptr = find_dev_from_unit (uptr)) != NULL) {
fprintf (st, " %s", sim_dname (dptr));
if (dptr->numunits > 1)
fprintf (st, " unit %d", (int32) (uptr - dptr->units));
}
else
fprintf (st, " Unknown");
if (inst_per_sec != 0.0)
tim = sim_fmt_secs(((_sim_activate_queue_time (uptr) - 1) / sim_timer_inst_per_sec ()) + (uptr->usecs_remaining / 1000000.0));
if (uptr->usecs_remaining)
fprintf (st, " at %d plus %.0f usecs%s%s%s%s\n", _sim_activate_queue_time (uptr) - 1, uptr->usecs_remaining,
(*tim) ? " (" : "", tim, (*tim) ? " total)" : "",
(uptr->flags & UNIT_IDLE) ? " (Idle capable)" : "");
else
fprintf (st, " at %d%s%s%s%s\n", _sim_activate_queue_time (uptr) - 1,
(*tim) ? " (" : "", tim, (*tim) ? ")" : "",
(uptr->flags & UNIT_IDLE) ? " (Idle capable)" : "");
}
}
sim_show_clock_queues (st, dnotused, unotused, flag, cptr);
#if defined (SIM_ASYNCH_IO)
pthread_mutex_lock (&sim_asynch_lock);
sim_mfile = &buf;
fprintf (st, "asynchronous pending event queue\n");
if (sim_asynch_queue == QUEUE_LIST_END)
fprintf (st, " Empty\n");
else {
for (uptr = sim_asynch_queue; uptr != QUEUE_LIST_END; uptr = uptr->a_next) {
if ((dptr = find_dev_from_unit (uptr)) != NULL) {
fprintf (st, " %s", sim_dname (dptr));
if (dptr->numunits > 1) fprintf (st, " unit %d",
(int32) (uptr - dptr->units));
}
else fprintf (st, " Unknown");
fprintf (st, " event delay %d\n", uptr->a_event_time);
}
}
fprintf (st, "asynch latency: %d nanoseconds\n", sim_asynch_latency);
fprintf (st, "asynch instruction latency: %d %s\n", sim_asynch_inst_latency, sim_vm_interval_units);
pthread_mutex_unlock (&sim_asynch_lock);
sim_mfile = NULL;
fprintf (st, "%*.*s", (int)buf.pos, (int)buf.pos, buf.buf);
free (buf.buf);
#endif /* SIM_ASYNCH_IO */
return SCPE_OK;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4267D6", "function_addr": 4351958, "binary_name": "c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7.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, 70h"], [7, "mov [rbp+var_68], rdi"], [8, "mov [rbp+var_70], rsi"], [9, "mov [rbp+var_78], rdx"], [10, "mov [rbp+var_7C], ecx"], [11, "mov [rbp+var_88], r8"], [12, "lea rax, [rbp+s]"], [13, "mov edx, 18h"], [14, "mov esi, 0"], [15, "mov rdi, rax"], [16, "call _memset"], [17, "cmp [rbp+var_88], 0"], [18, "jz short loc_426833"], [19, "mov rax, [rbp+var_88]"], [20, "movzx eax, byte ptr [rax]"], [21, "test al, al"], [22, "jz short loc_426833"], [23, "mov eax, 5Fh "], [24, "jmp loc_426D9F"], [25, "mov rax, cs:qword_4EF5F0"], [26, "cmp rax, 1"], [27, "jnz short loc_42688D"], [28, "mov rbx, cs:off_4EF5F8"], [29, "call sub_456685"], [30, "movq rax, xmm0"], [31, "movq xmm0, rax"], [32, "call sub_435288"], [33, "mov rcx, rax"], [34, "mov rdx, cs:qword_712380"], [35, "mov rax, [rbp+var_68]"], [36, "mov r8, rbx"], [37, "movq xmm0, rdx"], [38, "mov edx, offset value"], [39, "mov esi, offset aSEventQueueEmp"], [40, "mov rdi, rax"], [41, "mov eax, 1"], [42, "call sub_43D961"], [43, "jmp loc_426BB5"], [44, "mov [rbp+var_30], offset byte_4B0E19"], [45, "call sub_456685"], [46, "movq rax, xmm0"], [47, "mov [rbp+var_38], rax"], [48, "mov rbx, cs:off_4EF5F8"], [49, "mov rax, [rbp+var_38]"], [50, "movq xmm0, rax"], [51, "call sub_435288"], [52, "mov rcx, rax"], [53, "mov rdx, cs:qword_712380"], [54, "mov rax, [rbp+var_68]"], [55, "mov r8, rbx"], [56, "movq xmm0, rdx"], [57, "mov edx, offset value"], [58, "mov esi, offset aSEventQueueSta"], [59, "mov rdi, rax"], [60, "mov eax, 1"], [61, "call sub_43D961"], [62, "mov rax, cs:qword_4EF5F0"], [63, "mov [rbp+var_28], rax"], [64, "jmp loc_426BAA"], [65, "cmp [rbp+var_28], offset unk_4EF620"], [66, "jnz short loc_42691A"], [67, "mov rax, [rbp+var_68]"], [68, "mov esi, offset aStepTimer"], [69, "mov rdi, rax"], [70, "mov eax, 0"], [71, "call sub_43D961"], [72, "jmp loc_4269DB"], [73, "cmp [rbp+var_28], offset unk_4EF9E0"], [74, "jnz short loc_42693F"], [75, "mov rax, [rbp+var_68]"], [76, "mov esi, offset aExpectFired"], [77, "mov rdi, rax"], [78, "mov eax, 0"], [79, "call sub_43D961"], [80, "jmp loc_4269DB"], [81, "mov rax, [rbp+var_28]"], [82, "mov rdi, rax"], [83, "call sub_432E40"], [84, "mov [rbp+var_40], rax"], [85, "cmp [rbp+var_40], 0"], [86, "jz short loc_4269C5"], [87, "mov rax, [rbp+var_40]"], [88, "mov rdi, rax"], [89, "call sub_42B88A"], [90, "mov rdx, rax"], [91, "mov rax, [rbp+var_68]"], [92, "mov esi, offset aS_7"], [93, "mov rdi, rax"], [94, "mov eax, 0"], [95, "call sub_43D961"], [96, "mov rax, [rbp+var_40]"], [97, "mov eax, [rax+20h]"], [98, "cmp eax, 1"], [99, "jbe short loc_4269DB"], [100, "mov rax, [rbp+var_40]"], [101, "mov rdx, [rax+8]"], [102, "mov rax, [rbp+var_28]"], [103, "sub rax, rdx"], [104, "sar rax, 3"], [105, "mov rdx, rax"], [106, "mov rax, 0F83E0F83E0F83E1h"], [107, "imul rax, rdx"], [108, "mov edx, eax"], [109, "mov rax, [rbp+var_68]"], [110, "mov esi, offset aUnitD"], [111, "mov rdi, rax"], [112, "mov eax, 0"], [113, "call sub_43D961"], [114, "jmp short loc_4269DB"], [115, "mov rax, [rbp+var_68]"], [116, "mov esi, offset aUnknown_0"], [117, "mov rdi, rax"], [118, "mov eax, 0"], [119, "call sub_43D961"], [120, "pxor xmm0, xmm0"], [121, "ucomisd xmm0, [rbp+var_38]"], [122, "jp short loc_4269F1"], [123, "pxor xmm0, xmm0"], [124, "comisd xmm0, [rbp+var_38]"], [125, "jz short loc_426A50"], [126, "mov rax, [rbp+var_28]"], [127, "mov rdi, rax"], [128, "call sub_4364BD"], [129, "sub eax, 1"], [130, "pxor xmm3, xmm3"], [131, "cvtsi2sd xmm3, eax"], [132, "movsd [rbp+var_90], xmm3"], [133, "call sub_456685"], [134, "movsd xmm1, [rbp+var_90]"], [135, "divsd xmm1, xmm0"], [136, "mov rax, [rbp+var_28]"], [137, "movsd xmm0, qword ptr [rax+0A0h]"], [138, "movsd xmm2, cs:qword_4B6090"], [139, "divsd xmm0, xmm2"], [140, "addsd xmm1, xmm0"], [141, "movq rax, xmm1"], [142, "movq xmm0, rax"], [143, "call sub_434D59"], [144, "mov [rbp+var_30], rax"], [145, "mov rax, [rbp+var_28]"], [146, "movsd xmm0, qword ptr [rax+0A0h]"], [147, "pxor xmm1, xmm1"], [148, "ucomisd xmm0, xmm1"], [149, "jp short loc_426A74"], [150, "pxor xmm1, xmm1"], [151, "comisd xmm0, xmm1"], [152, "jz loc_426B15"], [153, "mov rax, [rbp+var_28]"], [154, "mov eax, [rax+38h]"], [155, "and eax, 4000h"], [156, "test eax, eax"], [157, "jz short loc_426A8C"], [158, "mov r13d, offset aIdleCapable"], [159, "jmp short loc_426A92"], [160, "mov r13d, offset byte_4B0E19"], [161, "mov rax, [rbp+var_30]"], [162, "movzx eax, byte ptr [rax]"], [163, "test al, al"], [164, "jz short loc_426AA5"], [165, "mov r14d, offset aTotal"], [166, "jmp short loc_426AAB"], [167, "mov r14d, offset byte_4B0E19"], [168, "mov rax, [rbp+var_30]"], [169, "movzx eax, byte ptr [rax]"], [170, "test al, al"], [171, "jz short loc_426ABE"], [172, "mov r12d, offset asc_4B2A3D"], [173, "jmp short loc_426AC4"], [174, "mov r12d, offset byte_4B0E19"], [175, "mov rax, [rbp+var_28]"], [176, "mov rbx, [rax+0A0h]"], [177, "mov rax, [rbp+var_28]"], [178, "mov rdi, rax"], [179, "call sub_4364BD"], [180, "lea edx, [rax-1]"], [181, "mov rcx, [rbp+var_30]"], [182, "mov rax, [rbp+var_68]"], [183, "sub rsp, 8"], [184, "push r13"], [185, "mov r9, r14"], [186, "mov r8, rcx"], [187, "mov rcx, r12"], [188, "movq xmm0, rbx"], [189, "mov esi, offset aAtDPlus0fUsecs"], [190, "mov rdi, rax"], [191, "mov eax, 1"], [192, "call sub_43D961"], [193, "add rsp, 10h"], [194, "jmp loc_426B9F"], [195, "mov rax, [rbp+var_28]"], [196, "mov eax, [rax+38h]"], [197, "and eax, 4000h"], [198, "test eax, eax"], [199, "jz short loc_426B2D"], [200, "mov r12d, offset aIdleCapable"], [201, "jmp short loc_426B33"], [202, "mov r12d, offset byte_4B0E19"], [203, "mov rax, [rbp+var_30]"], [204, "movzx eax, byte ptr [rax]"], [205, "test al, al"], [206, "jz short loc_426B46"], [207, "mov r13d, offset asc_4B2A60"], [208, "jmp short loc_426B4C"], [209, "mov r13d, offset byte_4B0E19"], [210, "mov rax, [rbp+var_30]"], [211, "movzx eax, byte ptr [rax]"], [212, "test al, al"], [213, "jz short loc_426B5E"], [214, "mov ebx, offset asc_4B2A3D"], [215, "jmp short loc_426B63"], [216, "mov ebx, offset byte_4B0E19"], [217, "mov rax, [rbp+var_28]"], [218, "mov rdi, rax"], [219, "call sub_4364BD"], [220, "lea edx, [rax-1]"], [221, "mov rcx, [rbp+var_30]"], [222, "mov rax, [rbp+var_68]"], [223, "sub rsp, 8"], [224, "push r12"], [225, "mov r9, r13"], [226, "mov r8, rcx"], [227, "mov rcx, rbx"], [228, "mov esi, offset aAtDSSSS"], [229, "mov rdi, rax"], [230, "mov eax, 0"], [231, "call sub_43D961"], [232, "add rsp, 10h"], [233, "mov rax, [rbp+var_28]"], [234, "mov rax, [rax]"], [235, "mov [rbp+var_28], rax"], [236, "cmp [rbp+var_28], 1"], [237, "jnz loc_4268F5"], [238, "mov rdi, [rbp+var_88]"], [239, "mov ecx, [rbp+var_7C]"], [240, "mov rdx, [rbp+var_78]"], [241, "mov rsi, [rbp+var_70]"], [242, "mov rax, [rbp+var_68]"], [243, "mov r8, rdi"], [244, "mov rdi, rax"], [245, "call sub_451D3B"], [246, "mov edi, offset mutex"], [247, "call _pthread_mutex_lock"], [248, "lea rax, [rbp+s]"], [249, "mov cs:qword_711B90, rax"], [250, "mov rax, [rbp+var_68]"], [251, "mov esi, offset aAsynchronousPe"], [252, "mov rdi, rax"], [253, "mov eax, 0"], [254, "call sub_43D961"], [255, "mov rax, cs:qword_711AE0"], [256, "cmp rax, 1"], [257, "jnz short loc_426C29"], [258, "mov rax, [rbp+var_68]"], [259, "mov esi, offset aEmpty"], [260, "mov rdi, rax"], [261, "mov eax, 0"], [262, "call sub_43D961"], [263, "jmp loc_426D0F"], [264, "mov rax, cs:qword_711AE0"], [265, "mov [rbp+var_28], rax"], [266, "jmp loc_426D04"], [267, "mov rax, [rbp+var_28]"], [268, "mov rdi, rax"], [269, "call sub_432E40"], [270, "mov [rbp+var_40], rax"], [271, "cmp [rbp+var_40], 0"], [272, "jz short loc_426CBF"], [273, "mov rax, [rbp+var_40]"], [274, "mov rdi, rax"], [275, "call sub_42B88A"], [276, "mov rdx, rax"], [277, "mov rax, [rbp+var_68]"], [278, "mov esi, offset aS_7"], [279, "mov rdi, rax"], [280, "mov eax, 0"], [281, "call sub_43D961"], [282, "mov rax, [rbp+var_40]"], [283, "mov eax, [rax+20h]"], [284, "cmp eax, 1"], [285, "jbe short loc_426CD5"], [286, "mov rax, [rbp+var_40]"], [287, "mov rdx, [rax+8]"], [288, "mov rax, [rbp+var_28]"], [289, "sub rax, rdx"], [290, "sar rax, 3"], [291, "mov rdx, rax"], [292, "mov rax, 0F83E0F83E0F83E1h"], [293, "imul rax, rdx"], [294, "mov edx, eax"], [295, "mov rax, [rbp+var_68]"], [296, "mov esi, offset aUnitD"], [297, "mov rdi, rax"], [298, "mov eax, 0"], [299, "call sub_43D961"], [300, "jmp short loc_426CD5"], [301, "mov rax, [rbp+var_68]"], [302, "mov esi, offset aUnknown_0"], [303, "mov rdi, rax"], [304, "mov eax, 0"], [305, "call sub_43D961"], [306, "mov rax, [rbp+var_28]"], [307, "mov edx, [rax+0D8h]"], [308, "mov rax, [rbp+var_68]"], [309, "mov esi, offset aEventDelayD"], [310, "mov rdi, rax"], [311, "mov eax, 0"], [312, "call sub_43D961"], [313, "mov rax, [rbp+var_28]"], [314, "mov rax, [rax+0D0h]"], [315, "mov [rbp+var_28], rax"], [316, "cmp [rbp+var_28], 1"], [317, "jnz loc_426C39"], [318, "mov edx, cs:dword_4EF5E4"], [319, "mov rax, [rbp+var_68]"], [320, "mov esi, offset aAsynchLatencyD"], [321, "mov rdi, rax"], [322, "mov eax, 0"], [323, "call sub_43D961"], [324, "mov rcx, cs:off_4EF5F8"], [325, "mov edx, cs:dword_4EF5E8"], [326, "mov rax, [rbp+var_68]"], [327, "mov esi, offset aAsynchInstruct"], [328, "mov rdi, rax"], [329, "mov eax, 0"], [330, "call sub_43D961"], [331, "mov edi, offset mutex"], [332, "call _pthread_mutex_unlock"], [333, "mov cs:qword_711B90, 0"], [334, "mov rdx, [rbp+s]"], [335, "mov rax, [rbp+var_50]"], [336, "mov ecx, eax"], [337, "mov rax, [rbp+var_50]"], [338, "mov esi, eax"], [339, "mov rax, [rbp+var_68]"], [340, "mov r8, rdx"], [341, "mov edx, esi"], [342, "mov esi, offset aS_8"], [343, "mov rdi, rax"], [344, "mov eax, 0"], [345, "call sub_43D961"], [346, "mov rax, [rbp+s]"], [347, "mov rdi, rax"], [348, "call _free"], [349, "mov eax, 0"], [350, "lea rsp, [rbp-20h]"], [351, "pop rbx"], [352, "pop r12"], [353, "pop r13"], [354, "pop r14"], [355, "pop rbp"], [356, "retn"]], "data_dep": [[15, 12], [17, 11], [18, 17], [19, 11], [20, 19], [21, 20], [22, 21], [26, 25], [27, 26], [31, 30], [33, 32], [35, 7], [36, 28], [37, 34], [40, 35], [47, 46], [49, 47], [50, 49], [52, 51], [54, 7], [55, 48], [56, 53], [59, 54], [63, 62], [65, 235], [65, 63], [66, 65], [67, 7], [69, 67], [73, 235], [73, 63], [74, 73], [75, 7], [77, 75], [81, 235], [81, 63], [82, 81], [84, 83], [85, 84], [86, 85], [87, 84], [88, 87], [90, 89], [91, 7], [93, 91], [96, 84], [97, 96], [98, 97], [99, 98], [100, 84], [101, 100], [102, 235], [102, 63], [103, 102], [103, 101], [104, 103], [105, 104], [107, 106], [107, 105], [108, 107], [109, 7], [111, 109], [115, 7], [117, 115], [121, 47], [121, 120], [122, 85], [122, 98], [122, 107], [122, 73], [122, 65], [124, 123], [124, 47], [125, 73], [125, 107], [125, 65], [125, 85], [125, 98], [126, 235], [126, 63], [127, 126], [129, 128], [131, 129], [131, 130], [132, 131], [134, 132], [135, 124], [135, 121], [135, 134], [136, 235], [136, 63], [137, 136], [139, 137], [139, 138], [140, 139], [140, 135], [141, 140], [142, 141], [144, 143], [145, 235], [145, 63], [146, 145], [148, 147], [148, 146], [149, 85], [149, 98], [149, 107], [149, 73], [149, 65], [149, 129], [151, 148], [151, 150], [152, 65], [152, 129], [152, 85], [152, 98], [152, 107], [152, 73], [153, 235], [153, 63], [154, 153], [155, 154], [156, 155], [157, 156], [161, 44], [161, 144], [162, 161], [163, 162], [164, 163], [168, 144], [168, 44], [169, 168], [170, 169], [171, 170], [175, 235], [175, 63], [176, 175], [177, 235], [177, 63], [178, 177], [180, 57], [180, 180], [180, 179], [180, 90], [180, 108], [180, 220], [181, 44], [181, 144], [182, 7], [183, 232], [183, 6], [183, 193], [184, 158], [184, 160], [185, 165], [185, 167], [186, 181], [187, 172], [187, 174], [188, 176], [190, 182], [193, 183], [195, 235], [195, 63], [196, 195], [197, 196], [198, 197], [199, 198], [203, 44], [203, 144], [204, 203], [205, 204], [206, 205], [210, 44], [210, 144], [211, 210], [212, 211], [213, 212], [217, 235], [217, 63], [218, 217], [220, 90], [220, 220], [220, 108], [220, 57], [220, 180], [220, 219], [221, 144], [221, 44], [222, 7], [223, 232], [223, 6], [223, 193], [224, 200], [224, 202], [225, 207], [225, 209], [226, 221], [227, 214], [227, 216], [229, 222], [232, 223], [233, 63], [233, 235], [234, 233], [235, 234], [236, 235], [236, 63], [237, 236], [238, 11], [239, 10], [240, 9], [241, 8], [242, 7], [243, 238], [244, 242], [248, 247], [249, 248], [250, 7], [252, 250], [256, 255], [257, 256], [258, 7], [260, 258], [265, 264], [267, 265], [267, 315], [268, 267], [270, 269], [271, 270], [272, 271], [273, 270], [274, 273], [276, 275], [277, 7], [279, 277], [282, 270], [283, 282], [284, 283], [285, 284], [286, 270], [287, 286], [288, 265], [288, 315], [289, 287], [289, 288], [290, 289], [291, 290], [293, 291], [293, 292], [294, 293], [295, 7], [297, 295], [301, 7], [303, 301], [306, 315], [306, 265], [307, 306], [308, 7], [310, 308], [313, 265], [313, 315], [314, 313], [315, 314], [316, 265], [316, 315], [317, 316], [319, 7], [321, 319], [326, 7], [328, 326], [336, 335], [338, 337], [339, 7], [340, 334], [341, 338], [343, 339], [347, 346], [350, 193], [350, 232], [350, 6], [351, 5], [352, 224], [352, 4], [353, 184], [353, 3], [354, 2], [355, 0], [356, 23], [356, 349]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n 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_4267D6", "query": "\n\n\n__int64 __fastcall sub_4267D6(__int64 a1, __int64 a2, __int64 a3, unsigned int a4, _BYTE *a5)\n{\nint v6; // ebx\ndouble v7; // xmm0_8\nint v8; // eax\ndouble v9; // xmm0_8\nint v10; // er9\nint v11; // ebx\nint v12; // eax\nint v13; // er9\nint v14; // edx\nint v15; // ecx\nint v16; // er8\nint v17; // er9\nint v18; // edx\nint v19; // ecx\nint v20; // er8\nint v21; // er9\nint v22; // eax\nint v23; // ecx\nint v24; // er8\nint v25; // er9\nint v26; // ecx\nint v27; // er8\nint v28; // er9\ndouble v29; // xmm1_8\nconst char *v30; // r14\nconst char *v31; // r12\ndouble v32; // rbx\nint v33; // eax\nconst char *v34; // r13\nconst char *v35; // rbx\nint v36; // eax\nint v37; // edx\nint v38; // ecx\nint v39; // er8\nint v40; // er9\nint v41; // edx\nint v42; // ecx\nint v43; // er8\nint v44; // er9\nint v45; // edx\nint v46; // ecx\nint v47; // er8\nint v48; // er9\nint v49; // eax\nint v50; // ecx\nint v51; // er8\nint v52; // er9\nint v53; // ecx\nint v54; // er8\nint v55; // er9\nint v56; // er8\nint v57; // er9\nint v58; // er9\ndouble v59; // [rsp+0h] [rbp-90h]\nvoid *s[2]; // [rsp+30h] [rbp-60h] BYREF\n__int64 v64; // [rsp+40h] [rbp-50h]\n__int64 v65; // [rsp+50h] [rbp-40h]\ndouble v66; // [rsp+58h] [rbp-38h]\nconst char *v67; // [rsp+60h] [rbp-30h]\n__int64 i; // [rsp+68h] [rbp-28h]\n\nmemset(s, 0, 0x18uLL);\nif ( a5 && *a5 )\nreturn 95LL;\nif ( qword_4EF5F0 == 1 )\n{\nv6 = (int)off_4EF5F8;\nv7 = sub_456685();\nv8 = sub_435288(v7);\nv9 = *(double *)&qword_712380;\nsub_43D961(\na1,\n(unsigned int)\"%s event queue empty, time = %.0f, executing %s %s/sec\\n\",\n(unsigned int)value,\nv8,\nv6,\nv10);\n}\nelse\n{\nv67 = &byte_4B0E19;\nv66 = sub_456685();\nv11 = (int)off_4EF5F8;\nv12 = sub_435288(v66);\nv9 = *(double *)&qword_712380;\nsub_43D961(\na1,\n(unsigned int)\"%s event queue status, time = %.0f, executing %s %s/sec\\n\",\n(unsigned int)value,\nv12,\nv11,\nv13);\nfor ( i = qword_4EF5F0; i != 1; i = *(_QWORD *)i )\n{\nif ( (_UNKNOWN *)i == &unk_4EF620 )\n{\nsub_43D961(a1, (unsigned int)\" Step timer\", v14, v15, v16, v17);\n}\nelse if ( (_UNKNOWN *)i == &unk_4EF9E0 )\n{\nsub_43D961(a1, (unsigned int)\" Expect fired\", v14, v15, v16, v17);\n}\nelse\n{\nv65 = sub_432E40(i);\nif ( v65 )\n{\nv22 = sub_42B88A(v65);\nsub_43D961(a1, (unsigned int)\" %s\", v22, v23, v24, v25);\nif ( *(_DWORD *)(v65 + 32) > 1u )\nsub_43D961(a1, (unsigned int)\" unit %d\", 1041204193 * ((i - *(_QWORD *)(v65 + 8)) >> 3), v26, v27, v28);\n}\nelse\n{\nsub_43D961(a1, (unsigned int)\" Unknown\", v18, v19, v20, v21);\n}\n}\nif ( v66 != 0.0 )\n{\nv59 = (double)(int)(sub_4364BD(i) - 1);\nv29 = v59 / sub_456685() + *(double *)(i + 160) / 1000000.0;\nv67 = (const char *)sub_434D59(v29);\n}\nv9 = *(double *)(i + 160);\nif ( v9 == 0.0 )\n{\nif ( *v67 )\nv34 = \")\";\nelse\nv34 = &byte_4B0E19;\nif ( *v67 )\nv35 = \" (\";\nelse\nv35 = &byte_4B0E19;\nv36 = sub_4364BD(i);\nsub_43D961(a1, (unsigned int)\" at %d%s%s%s%s\\n\", v36 - 1, (_DWORD)v35, (_DWORD)v67, (_DWORD)v34);\n}\nelse\n{\nif ( *v67 )\nv30 = \" total)\";\nelse\nv30 = &byte_4B0E19;\nif ( *v67 )\nv31 = \" (\";\nelse\nv31 = &byte_4B0E19;\nv32 = *(double *)(i + 160);\nv33 = sub_4364BD(i);\nv9 = v32;\nsub_43D961(a1, (unsigned int)\" at %d plus %.0f usecs%s%s%s%s\\n\", v33 - 1, (_DWORD)v31, (_DWORD)v67, (_DWORD)v30);\n}\n}\n}\nsub_451D3B(a1, a2, a3, a4, a5, v9);\npthread_mutex_lock(&mutex);\nqword_711B90 = (__int64)s;\nsub_43D961(a1, (unsigned int)\"asynchronous pending event queue\\n\", v37, v38, v39, v40);\nif ( qword_711AE0 == 1 )\n{\nsub_43D961(a1, (unsigned int)\" Empty\\n\", v41, v42, v43, v44);\n}\nelse\n{\nfor ( i = qword_711AE0; i != 1; i = *(_QWORD *)(i + 208) )\n{\nv65 = sub_432E40(i);\nif ( v65 )\n{\nv49 = sub_42B88A(v65);\nsub_43D961(a1, (unsigned int)\" %s\", v49, v50, v51, v52);\nif ( *(_DWORD *)(v65 + 32) > 1u )\nsub_43D961(a1, (unsigned int)\" unit %d\", 1041204193 * ((i - *(_QWORD *)(v65 + 8)) >> 3), v53, v54, v55);\n}\nelse\n{\nsub_43D961(a1, (unsigned int)\" Unknown\", v45, v46, v47, v48);\n}\nsub_43D961(a1, (unsigned int)\" event delay %d\\n\", *(_DWORD *)(i + 216), v53, v54, v55);\n}\n}\nsub_43D961(a1, (unsigned int)\"asynch latency: %d nanoseconds\\n\", dword_4EF5E4, v42, v43, v44);\nsub_43D961(a1, (unsigned int)\"asynch instruction latency: %d %s\\n\", dword_4EF5E8, (_DWORD)off_4EF5F8, v56, v57);\npthread_mutex_unlock(&mutex);\nqword_711B90 = 0LL;\nsub_43D961(a1, (unsigned int)\"%*.*s\", v64, v64, s[0], v58);\nfree(s[0]);\nreturn 0LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v41,v53,v47,s,v65,v66,v67,i,sub_4267D6,sub_456685,sub_435288,sub_43D961,sub_432E40,sub_42B88A,sub_4364BD,sub_434D59,sub_451D3B,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'unotused', 'a4': 'flag', 'a1': 'st', 'a2': 'dnotused', 'a5': 'cptr', 'v41': 'unotused', 'v53': 'flag', 'v47': 'cptr', 's': 'buf', 'v65': 'dptr', 'v66': 'inst_per_sec', 'v67': 'tim', 'i': 'uptr', 'sub_4267D6': 'show_queue', 'sub_456685': 'sim_timer_inst_per_sec', 'sub_435288': 'sim_fmt_numeric', 'sub_43D961': 'Fprintf', 'sub_432E40': 'find_dev_from_unit', 'sub_42B88A': 'sim_dname', 'sub_4364BD': '_sim_activate_queue_time', 'sub_434D59': 'sim_fmt_secs', 'sub_451D3B': 'sim_show_clock_queues'}"} |
Subsets and Splits