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
query_buffer_size
fc962af895ccfb94c41ff9d7f04eccd599463af591671023af44230c6f9578f3
analogdevicesinc
linux
NA
static int query_buffer_size(__u64 *buffer_size) { FILE *f; f = fopen(ioctl_devfs, "rb"); if (!f) return -EINVAL; fread(buffer_size, sizeof(__u64), 1, f); fclose(f); return EXIT_SUCCESS; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401605", "function_addr": 4199941, "binary_name": "fc962af895ccfb94c41ff9d7f04eccd599463af591671023af44230c6f9578f3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+ptr], rdi"], [4, "mov rax, cs:filename"], [5, "mov esi, offset modes"], [6, "mov rdi, rax"], [7, "call _fopen"], [8, "mov [rbp+stream], rax"], [9, "cmp [rbp+stream], 0"], [10, "jnz short loc_401637"], [11, "mov eax, 0FFFFFFEAh"], [12, "jmp short locret_401665"], [13, "mov rdx, [rbp+stream]"], [14, "mov rax, [rbp+ptr]"], [15, "mov rcx, rdx"], [16, "mov edx, 1"], [17, "mov esi, 8"], [18, "mov rdi, rax"], [19, "call _fread"], [20, "mov rax, [rbp+stream]"], [21, "mov rdi, rax"], [22, "call _fclose"], [23, "mov eax, 0"], [24, "leave"], [25, "retn"]], "data_dep": [[6, 4], [8, 7], [9, 8], [10, 9], [13, 8], [14, 3], [15, 13], [18, 14], [20, 8], [21, 20], [25, 23], [25, 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/fc962af895ccfb94c41ff9d7f04eccd599463af591671023af44230c6f9578f3_fc962af895ccfb94c41ff9d7f04eccd599463af591671023af44230c6f9578f3.jsonl.gz", "strip_func_name": "sub_401605", "query": "\n\n\n__int64 __fastcall sub_401605(void *a1)\n{\nFILE *stream; // [rsp+18h] [rbp-8h]\n\nstream = fopen(filename, \"rb\");\nif ( !stream )\nreturn 4294967274LL;\nfread(a1, 8uLL, 1uLL, stream);\nfclose(stream);\nreturn 0LL;\n}\n\n\n\nQ:[a1,stream,sub_401605,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'buffer_size', 'stream': 'f', 'sub_401605': 'query_buffer_size'}"}
tlsv1_server_set_cipher_list
892109def3973fcbf2ff18d6b91afb36d045fe72303d34be34e9b18fd685ad3d
vanhoefm
hostap-wpa3
NA
int tlsv1_server_set_cipher_list(struct tlsv1_server *conn, u8 *ciphers) { size_t count; u16 *suites; /* TODO: implement proper configuration of cipher suites */ if (ciphers[0] == TLS_CIPHER_ANON_DH_AES128_SHA) { count = 0; suites = conn->cipher_suites; suites[count++] = TLS_RSA_WITH_AES_256_CBC_SHA; suites[count++] = TLS_RSA_WITH_AES_128_CBC_SHA; suites[count++] = TLS_RSA_WITH_3DES_EDE_CBC_SHA; suites[count++] = TLS_RSA_WITH_RC4_128_SHA; suites[count++] = TLS_RSA_WITH_RC4_128_MD5; suites[count++] = TLS_DH_anon_WITH_AES_256_CBC_SHA; suites[count++] = TLS_DH_anon_WITH_AES_128_CBC_SHA; suites[count++] = TLS_DH_anon_WITH_3DES_EDE_CBC_SHA; suites[count++] = TLS_DH_anon_WITH_RC4_128_MD5; suites[count++] = TLS_DH_anon_WITH_DES_CBC_SHA; conn->num_cipher_suites = count; } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_411614", "function_addr": 4265492, "binary_name": "892109def3973fcbf2ff18d6b91afb36d045fe72303d34be34e9b18fd685ad3d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov [rbp+var_20], rsi"], [4, "mov rax, [rbp+var_20]"], [5, "movzx eax, byte ptr [rax]"], [6, "cmp al, 4"], [7, "jnz loc_41176C"], [8, "mov [rbp+var_8], 0"], [9, "mov rax, [rbp+var_18]"], [10, "add rax, 1F0h"], [11, "mov [rbp+var_10], rax"], [12, "mov rax, [rbp+var_8]"], [13, "lea rdx, [rax+1]"], [14, "mov [rbp+var_8], rdx"], [15, "lea rdx, [rax+rax]"], [16, "mov rax, [rbp+var_10]"], [17, "add rax, rdx"], [18, "mov word ptr [rax], 35h "], [19, "mov rax, [rbp+var_8]"], [20, "lea rdx, [rax+1]"], [21, "mov [rbp+var_8], rdx"], [22, "lea rdx, [rax+rax]"], [23, "mov rax, [rbp+var_10]"], [24, "add rax, rdx"], [25, "mov word ptr [rax], 2Fh "], [26, "mov rax, [rbp+var_8]"], [27, "lea rdx, [rax+1]"], [28, "mov [rbp+var_8], rdx"], [29, "lea rdx, [rax+rax]"], [30, "mov rax, [rbp+var_10]"], [31, "add rax, rdx"], [32, "mov word ptr [rax], 0Ah"], [33, "mov rax, [rbp+var_8]"], [34, "lea rdx, [rax+1]"], [35, "mov [rbp+var_8], rdx"], [36, "lea rdx, [rax+rax]"], [37, "mov rax, [rbp+var_10]"], [38, "add rax, rdx"], [39, "mov word ptr [rax], 5"], [40, "mov rax, [rbp+var_8]"], [41, "lea rdx, [rax+1]"], [42, "mov [rbp+var_8], rdx"], [43, "lea rdx, [rax+rax]"], [44, "mov rax, [rbp+var_10]"], [45, "add rax, rdx"], [46, "mov word ptr [rax], 4"], [47, "mov rax, [rbp+var_8]"], [48, "lea rdx, [rax+1]"], [49, "mov [rbp+var_8], rdx"], [50, "lea rdx, [rax+rax]"], [51, "mov rax, [rbp+var_10]"], [52, "add rax, rdx"], [53, "mov word ptr [rax], 3Ah "], [54, "mov rax, [rbp+var_8]"], [55, "lea rdx, [rax+1]"], [56, "mov [rbp+var_8], rdx"], [57, "lea rdx, [rax+rax]"], [58, "mov rax, [rbp+var_10]"], [59, "add rax, rdx"], [60, "mov word ptr [rax], 34h "], [61, "mov rax, [rbp+var_8]"], [62, "lea rdx, [rax+1]"], [63, "mov [rbp+var_8], rdx"], [64, "lea rdx, [rax+rax]"], [65, "mov rax, [rbp+var_10]"], [66, "add rax, rdx"], [67, "mov word ptr [rax], 1Bh"], [68, "mov rax, [rbp+var_8]"], [69, "lea rdx, [rax+1]"], [70, "mov [rbp+var_8], rdx"], [71, "lea rdx, [rax+rax]"], [72, "mov rax, [rbp+var_10]"], [73, "add rax, rdx"], [74, "mov word ptr [rax], 18h"], [75, "mov rax, [rbp+var_8]"], [76, "lea rdx, [rax+1]"], [77, "mov [rbp+var_8], rdx"], [78, "lea rdx, [rax+rax]"], [79, "mov rax, [rbp+var_10]"], [80, "add rax, rdx"], [81, "mov word ptr [rax], 1Ah"], [82, "mov rax, [rbp+var_18]"], [83, "mov rdx, [rbp+var_8]"], [84, "mov [rax+230h], rdx"], [85, "mov eax, 0"], [86, "pop rbp"], [87, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [9, 2], [10, 9], [11, 10], [12, 8], [13, 12], [14, 13], [15, 13], [15, 12], [16, 11], [17, 16], [17, 15], [18, 17], [19, 14], [20, 15], [20, 19], [20, 18], [21, 20], [22, 19], [22, 18], [22, 20], [23, 11], [24, 23], [24, 22], [25, 24], [26, 21], [27, 22], [27, 26], [27, 25], [28, 27], [29, 27], [29, 26], [29, 25], [30, 11], [31, 29], [31, 30], [32, 31], [33, 28], [34, 32], [34, 29], [34, 33], [35, 34], [36, 34], [36, 33], [36, 32], [37, 11], [38, 36], [38, 37], [39, 38], [40, 35], [41, 40], [41, 39], [41, 36], [42, 41], [43, 39], [43, 41], [43, 40], [44, 11], [45, 43], [45, 44], [46, 45], [47, 42], [48, 47], [48, 46], [48, 43], [49, 48], [50, 47], [50, 46], [50, 48], [51, 11], [52, 51], [52, 50], [53, 52], [54, 49], [55, 50], [55, 54], [55, 53], [56, 55], [57, 54], [57, 53], [57, 55], [58, 11], [59, 57], [59, 58], [60, 59], [61, 56], [62, 60], [62, 57], [62, 61], [63, 62], [64, 62], [64, 61], [64, 60], [65, 11], [66, 64], [66, 65], [67, 66], [68, 63], [69, 67], [69, 64], [69, 68], [70, 69], [71, 67], [71, 69], [71, 68], [72, 11], [73, 71], [73, 72], [74, 73], [75, 70], [76, 74], [76, 71], [76, 75], [77, 76], [78, 74], [78, 76], [78, 75], [79, 11], [80, 78], [80, 79], [81, 80], [82, 2], [83, 77], [84, 83], [84, 82], [86, 0], [87, 85]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/892109def3973fcbf2ff18d6b91afb36d045fe72303d34be34e9b18fd685ad3d_892109def3973fcbf2ff18d6b91afb36d045fe72303d34be34e9b18fd685ad3d.jsonl.gz", "strip_func_name": "sub_411614", "query": "\n\n\n__int64 __fastcall sub_411614(__int64 a1, _BYTE *a2)\n{\nif ( *a2 == 4 )\n{\n*(_WORD *)(a1 + 496) = 53;\n*(_WORD *)(a1 + 498) = 47;\n*(_WORD *)(a1 + 500) = 10;\n*(_WORD *)(a1 + 502) = 5;\n*(_WORD *)(a1 + 504) = 4;\n*(_WORD *)(a1 + 506) = 58;\n*(_WORD *)(a1 + 508) = 52;\n*(_WORD *)(a1 + 510) = 27;\n*(_WORD *)(a1 + 512) = 24;\n*(_WORD *)(a1 + 514) = 26;\n*(_QWORD *)(a1 + 560) = 10LL;\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,sub_411614,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'conn', 'a2': 'ciphers', 'sub_411614': 'tlsv1_server_set_cipher_list'}"}
gt_map_block_realign_hamming
507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69
smarco
gem3-mapper
NA
GT_INLINE gt_status gt_map_block_realign_hamming( gt_map* const map,char* const pattern,char* const sequence,const uint64_t length) { GT_MAP_CHECK(map); GT_NULL_CHECK(pattern); GT_NULL_CHECK(sequence); GT_ZERO_CHECK(length); // Set misms pattern & clear map mismatches gt_misms misms; misms.misms_type = MISMS; gt_map_clear_misms(map); // Traverse pattern & annotate mismatches uint64_t i; for (i=0;i<length;++i) { if (pattern[i]!=sequence[i]) { misms.position = i; misms.base = sequence[i]; gt_map_add_misms(map,&misms); } } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4260C5", "function_addr": 4350149, "binary_name": "507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_38], rdx"], [6, "mov [rbp+var_40], rcx"], [7, "mov [rbp+var_20], 0"], [8, "mov rax, [rbp+var_28]"], [9, "mov rdi, rax"], [10, "call sub_42405E"], [11, "mov [rbp+var_8], 0"], [12, "jmp short loc_42614B"], [13, "mov rdx, [rbp+var_30]"], [14, "mov rax, [rbp+var_8]"], [15, "add rax, rdx"], [16, "movzx edx, byte ptr [rax]"], [17, "mov rcx, [rbp+var_38]"], [18, "mov rax, [rbp+var_8]"], [19, "add rax, rcx"], [20, "movzx eax, byte ptr [rax]"], [21, "cmp dl, al"], [22, "jz short loc_426146"], [23, "mov rax, [rbp+var_8]"], [24, "mov [rbp+var_18], rax"], [25, "mov rdx, [rbp+var_38]"], [26, "mov rax, [rbp+var_8]"], [27, "add rax, rdx"], [28, "movzx eax, byte ptr [rax]"], [29, "mov [rbp+var_10], al"], [30, "lea rdx, [rbp+var_20]"], [31, "mov rax, [rbp+var_28]"], [32, "mov rsi, rdx"], [33, "mov rdi, rax"], [34, "call sub_423FCD"], [35, "add [rbp+var_8], 1"], [36, "mov rax, [rbp+var_8]"], [37, "cmp rax, [rbp+var_40]"], [38, "jb short loc_4260FA"], [39, "mov eax, 0"], [40, "leave"], [41, "retn"]], "data_dep": [[8, 3], [9, 8], [13, 4], [14, 11], [14, 35], [15, 14], [15, 13], [16, 15], [17, 5], [18, 35], [18, 11], [19, 18], [19, 17], [20, 19], [21, 16], [21, 20], [22, 21], [23, 11], [23, 35], [24, 23], [25, 5], [26, 11], [26, 35], [27, 25], [27, 26], [28, 27], [29, 28], [30, 7], [30, 25], [31, 3], [32, 30], [33, 31], [35, 11], [35, 35], [36, 11], [36, 35], [37, 6], [37, 36], [38, 37], [41, 39]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69_507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69.jsonl.gz", "strip_func_name": "sub_4260C5", "query": "\n\n\n__int64 __fastcall sub_4260C5(__int64 a1, __int64 a2, __int64 a3, unsigned __int64 a4)\n{\n_QWORD v7[2]; // [rsp+20h] [rbp-20h] BYREF\nchar v8; // [rsp+30h] [rbp-10h]\nunsigned __int64 i; // [rsp+38h] [rbp-8h]\n\nLODWORD(v7[0]) = 0;\nsub_42405E(a1);\nfor ( i = 0LL; i < a4; ++i )\n{\nif ( *(_BYTE *)(a2 + i) != *(_BYTE *)(a3 + i) )\n{\nv7[1] = i;\nv8 = *(_BYTE *)(a3 + i);\nsub_423FCD(a1, v7);\n}\n}\nreturn 0LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,v7,sub_4260C5,sub_42405E,sub_423FCD,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'sequence', 'a4': 'length', 'a1': 'map', 'a2': 'pattern', 'v7': 'misms', 'sub_4260C5': 'gt_map_block_realign_hamming', 'sub_42405E': 'gt_map_clear_misms', 'sub_423FCD': 'gt_map_add_misms'}"}
MyLog
5d44aa297847124482d909eb7c1e68c4914050b8c375e6038d7d751457b402df
gl-inet
gli-pub
NA
void MyLog(int LOGA_level, char* format, ...) { static char msg_buf[256]; va_list args; struct timeb ts; struct tm *timeinfo; if (LOGA_level == LOGA_DEBUG && options.verbose == 0) return; ftime(&ts); timeinfo = localtime(&ts.time); strftime(msg_buf, 80, "%Y%m%d %H%M%S", timeinfo); sprintf(&msg_buf[strlen(msg_buf)], ".%.3hu ", ts.millitm); va_start(args, format); vsnprintf(&msg_buf[strlen(msg_buf)], sizeof(msg_buf) - strlen(msg_buf), format, args); va_end(args); printf("%s\n", msg_buf); fflush(stdout); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402D78", "function_addr": 4205944, "binary_name": "5d44aa297847124482d909eb7c1e68c4914050b8c375e6038d7d751457b402df.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 0F8h"], [4, "mov [rbp+var_F4], edi"], [5, "mov [rbp+format], rsi"], [6, "mov [rbp+var_B0], rdx"], [7, "mov [rbp+var_A8], rcx"], [8, "mov [rbp+var_A0], r8"], [9, "mov [rbp+var_98], r9"], [10, "test al, al"], [11, "jz short loc_402DD4"], [12, "movaps [rbp+var_90], xmm0"], [13, "movaps [rbp+var_80], xmm1"], [14, "movaps [rbp+var_70], xmm2"], [15, "movaps [rbp+var_60], xmm3"], [16, "movaps [rbp+var_50], xmm4"], [17, "movaps [rbp+var_40], xmm5"], [18, "movaps [rbp+var_30], xmm6"], [19, "movaps [rbp+var_20], xmm7"], [20, "cmp [rbp+var_F4], 0"], [21, "jnz short loc_402DEB"], [22, "mov eax, dword ptr cs:qword_40B298+4"], [23, "test eax, eax"], [24, "jz loc_402EE6"], [25, "lea rax, [rbp+timebuf]"], [26, "mov rdi, rax"], [27, "call _ftime"], [28, "lea rax, [rbp+timebuf]"], [29, "mov rdi, rax"], [30, "call _localtime"], [31, "mov [rbp+tp], rax"], [32, "mov rax, [rbp+tp]"], [33, "mov rcx, rax"], [34, "mov edx, offset aYMDHMS"], [35, "mov esi, 50h "], [36, "mov edi, offset byte_40BF40"], [37, "call _strftime"], [38, "movzx eax, [rbp+timebuf.millitm]"], [39, "movzx ebx, ax"], [40, "mov edi, offset byte_40BF40"], [41, "call _strlen"], [42, "add rax, 40BF40h"], [43, "mov edx, ebx"], [44, "mov esi, offset a3hu"], [45, "mov rdi, rax"], [46, "mov eax, 0"], [47, "call _sprintf"], [48, "mov [rbp+arg], 10h"], [49, "mov [rbp+var_DC], 30h "], [50, "lea rax, [rbp+arg_0]"], [51, "mov [rbp+var_D8], rax"], [52, "lea rax, [rbp+var_C0]"], [53, "mov [rbp+var_D0], rax"], [54, "mov edi, offset byte_40BF40"], [55, "call _strlen"], [56, "mov edx, 100h"], [57, "mov rbx, rdx"], [58, "sub rbx, rax"], [59, "mov edi, offset byte_40BF40"], [60, "call _strlen"], [61, "lea rdi, byte_40BF40[rax]"], [62, "lea rdx, [rbp+arg]"], [63, "mov rax, [rbp+format]"], [64, "mov rcx, rdx"], [65, "mov rdx, rax"], [66, "mov rsi, rbx"], [67, "call _vsnprintf"], [68, "mov edi, offset byte_40BF40"], [69, "call _puts"], [70, "mov rax, cs:stdout"], [71, "mov rdi, rax"], [72, "call _fflush"], [73, "jmp short loc_402EE7"], [74, "nop"], [75, "mov rbx, [rbp+var_8]"], [76, "leave"], [77, "retn"]], "data_dep": [[11, 10], [20, 4], [21, 20], [23, 22], [24, 23], [25, 23], [25, 10], [26, 25], [28, 27], [29, 28], [31, 30], [32, 31], [33, 32], [39, 38], [42, 41], [43, 39], [45, 42], [50, 47], [51, 50], [52, 50], [53, 52], [57, 56], [58, 55], [58, 57], [61, 59], [62, 56], [62, 48], [63, 5], [64, 62], [65, 63], [66, 58], [71, 70], [77, 72], [77, 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/5d44aa297847124482d909eb7c1e68c4914050b8c375e6038d7d751457b402df_5d44aa297847124482d909eb7c1e68c4914050b8c375e6038d7d751457b402df.jsonl.gz", "strip_func_name": "sub_402D78", "query": "\n\n\nint sub_402D78(int a1, const char *a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, ...)\n{\nint result; // eax\nunsigned int v7; // ebx\nsize_t v8; // rax\nsize_t v9; // rbx\nsize_t v10; // rax\nstruct timeb timebuf; // [rsp+10h] [rbp-F0h] BYREF\ngcc_va_list arg; // [rsp+20h] [rbp-E0h] BYREF\nstruct tm *tp; // [rsp+38h] [rbp-C8h]\n__int64 v14; // [rsp+50h] [rbp-B0h]\n__int64 v15; // [rsp+58h] [rbp-A8h]\n__int64 v16; // [rsp+60h] [rbp-A0h]\n__int64 v17; // [rsp+68h] [rbp-98h]\n\nv14 = a3;\nv15 = a4;\nv16 = a5;\nv17 = a6;\nif ( a1 || (result = HIDWORD(qword_40B298)) != 0 )\n{\nftime(&timebuf);\ntp = localtime(&timebuf.time);\nstrftime(byte_40BF40, 0x50uLL, \"%Y%m%d %H%M%S\", tp);\nv7 = timebuf.millitm;\nv8 = strlen(byte_40BF40);\nsprintf((char *)(v8 + 4243264), \".%.3hu \", v7);\narg[0].gp_offset = 16;\nva_start(arg, a6);\nv9 = 256 - strlen(byte_40BF40);\nv10 = strlen(byte_40BF40);\nvsnprintf(&byte_40BF40[v10], v9, a2, arg);\nputs(byte_40BF40);\nresult = fflush(stdout);\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,timebuf,arg,tp,sub_402D78,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'LOGA_level', 'a2': 'format', 'timebuf': 'ts', 'arg': 'args', 'tp': 'timeinfo', 'sub_402D78': 'MyLog'}"}
to_signed_long
c283910ea3fac8d6dcd04f2f80992ffe7e7debb581199446850c02a5606342ba
alitrack
undark
NA
long int to_signed_long( unsigned long int value ) { long int signed_value = value; if (value >> 31) signed_value |= -1 << 31; return signed_value; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4019D3", "function_addr": 4200915, "binary_name": "c283910ea3fac8d6dcd04f2f80992ffe7e7debb581199446850c02a5606342ba.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov rax, [rbp+var_18]"], [4, "mov [rbp+var_8], rax"], [5, "mov rax, [rbp+var_18]"], [6, "shr rax, 1Fh"], [7, "test rax, rax"], [8, "jz short loc_4019F8"], [9, "or [rbp+var_8], 0FFFFFFFF80000000h"], [10, "mov rax, [rbp+var_8]"], [11, "pop rbp"], [12, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 2], [6, 5], [7, 6], [8, 7], [9, 4], [10, 4], [10, 9], [11, 0], [12, 10]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/c283910ea3fac8d6dcd04f2f80992ffe7e7debb581199446850c02a5606342ba_c283910ea3fac8d6dcd04f2f80992ffe7e7debb581199446850c02a5606342ba.jsonl.gz", "strip_func_name": "sub_4019D3", "query": "\n\n\nunsigned __int64 __fastcall sub_4019D3(unsigned __int64 a1)\n{\nunsigned __int64 v2; // [rsp+10h] [rbp-8h]\n\nv2 = a1;\nif ( a1 >> 31 )\nv2 = a1 | 0xFFFFFFFF80000000LL;\nreturn v2;\n}\n\n\n\nQ:[a1,v2,sub_4019D3,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'value', 'v2': 'signed_value', 'sub_4019D3': 'to_signed_long'}"}
cram_add_insertion
6cecd7ea96dca892d1966b7d9d51842160e9cf1b2b2e3c70b7de2f2b55ddef74
thegenemyers
FASTK
NA
static int cram_add_insertion(cram_container *c, cram_slice *s, cram_record *r, int pos, int len, char *base) { cram_feature f; f.I.pos = pos+1; if (len == 1) { char b = base ? *base : 'N'; f.i.code = 'i'; f.i.base = b; if (cram_stats_add(c->stats[DS_BA], b) < 0) return -1; } else { f.I.code = 'I'; f.I.len = len; f.S.seq_idx = BLOCK_SIZE(s->base_blk); if (base) { BLOCK_APPEND(s->base_blk, base, len); } else { int i; for (i = 0; i < len; i++) BLOCK_APPEND_CHAR(s->base_blk, 'N'); } BLOCK_APPEND_CHAR(s->base_blk, '\0'); } return cram_add_feature(c, s, r, &f); block_err: return -1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_469F48", "function_addr": 4628296, "binary_name": "6cecd7ea96dca892d1966b7d9d51842160e9cf1b2b2e3c70b7de2f2b55ddef74.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_38], rdx"], [6, "mov [rbp+var_3C], ecx"], [7, "mov [rbp+var_40], r8d"], [8, "mov [rbp+var_48], r9"], [9, "mov eax, [rbp+var_3C]"], [10, "add eax, 1"], [11, "mov [rbp+var_20], eax"], [12, "cmp [rbp+var_40], 1"], [13, "jnz short loc_469FC9"], [14, "cmp [rbp+var_48], 0"], [15, "jz short loc_469F86"], [16, "mov rax, [rbp+var_48]"], [17, "movzx eax, byte ptr [rax]"], [18, "jmp short loc_469F8B"], [19, "mov eax, 4Eh "], [20, "mov [rbp+var_5], al"], [21, "mov [rbp+var_1C], 69h "], [22, "movsx eax, [rbp+var_5]"], [23, "mov [rbp+var_18], eax"], [24, "movsx rdx, [rbp+var_5]"], [25, "mov rax, [rbp+var_28]"], [26, "mov rax, [rax+1C8h]"], [27, "mov rsi, rdx"], [28, "mov rdi, rax"], [29, "call sub_480066"], [30, "test eax, eax"], [31, "jns loc_46A062"], [32, "mov eax, 0FFFFFFFFh"], [33, "jmp locret_46A085"], [34, "mov [rbp+var_1C], 49h "], [35, "mov eax, [rbp+var_40]"], [36, "mov [rbp+var_18], eax"], [37, "mov rax, [rbp+var_30]"], [38, "mov rax, [rax+80h]"], [39, "mov rax, [rax+30h]"], [40, "mov [rbp+var_14], eax"], [41, "cmp [rbp+var_48], 0"], [42, "jz short loc_46A015"], [43, "mov eax, [rbp+var_40]"], [44, "movsxd rdx, eax"], [45, "mov rax, [rbp+var_30]"], [46, "mov rax, [rax+80h]"], [47, "mov rcx, [rbp+var_48]"], [48, "mov rsi, rcx"], [49, "mov rdi, rax"], [50, "call sub_46290D"], [51, "test eax, eax"], [52, "jns short loc_46A046"], [53, "jmp short loc_46A080"], [54, "mov [rbp+var_4], 0"], [55, "jmp short loc_46A03E"], [56, "mov rax, [rbp+var_30]"], [57, "mov rax, [rax+80h]"], [58, "mov esi, 4Eh "], [59, "mov rdi, rax"], [60, "call sub_462984"], [61, "test eax, eax"], [62, "js short loc_46A07C"], [63, "add [rbp+var_4], 1"], [64, "mov eax, [rbp+var_4]"], [65, "cmp eax, [rbp+var_40]"], [66, "jl short loc_46A01E"], [67, "mov rax, [rbp+var_30]"], [68, "mov rax, [rax+80h]"], [69, "mov esi, 0"], [70, "mov rdi, rax"], [71, "call sub_462984"], [72, "test eax, eax"], [73, "js short loc_46A07F"], [74, "lea rcx, [rbp+var_20]"], [75, "mov rdx, [rbp+var_38]"], [76, "mov rsi, [rbp+var_30]"], [77, "mov rax, [rbp+var_28]"], [78, "mov rdi, rax"], [79, "call sub_469711"], [80, "jmp short locret_46A085"], [81, "nop"], [82, "jmp short loc_46A080"], [83, "nop"], [84, "mov eax, 0FFFFFFFFh"], [85, "leave"], [86, "retn"]], "data_dep": [[9, 6], [10, 9], [11, 10], [12, 7], [13, 12], [14, 8], [15, 14], [16, 8], [17, 16], [20, 17], [20, 19], [22, 20], [23, 22], [24, 20], [25, 3], [26, 25], [27, 24], [28, 26], [30, 29], [31, 30], [35, 7], [36, 35], [37, 4], [38, 37], [39, 38], [40, 39], [41, 8], [42, 41], [43, 7], [44, 43], [45, 4], [46, 45], [47, 8], [48, 47], [49, 46], [51, 50], [52, 51], [56, 4], [57, 56], [59, 57], [61, 60], [62, 61], [63, 54], [63, 63], [64, 54], [64, 63], [65, 64], [65, 7], [66, 65], [67, 4], [68, 67], [70, 68], [72, 71], [73, 72], [74, 11], [74, 47], [75, 5], [76, 4], [77, 3], [78, 77], [86, 84], [86, 32], [86, 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/6cecd7ea96dca892d1966b7d9d51842160e9cf1b2b2e3c70b7de2f2b55ddef74_6cecd7ea96dca892d1966b7d9d51842160e9cf1b2b2e3c70b7de2f2b55ddef74.jsonl.gz", "strip_func_name": "sub_469F48", "query": "\n\n\n__int64 __fastcall sub_469F48(__int64 a1, __int64 a2, __int64 a3, int a4, int a5, char *a6)\n{\nchar v6; // al\nint v10; // [rsp+30h] [rbp-20h] BYREF\nint v11; // [rsp+34h] [rbp-1Ch]\nint v12; // [rsp+38h] [rbp-18h]\nint v13; // [rsp+3Ch] [rbp-14h]\nchar v14; // [rsp+4Bh] [rbp-5h]\nint i; // [rsp+4Ch] [rbp-4h]\n\nv10 = a4 + 1;\nif ( a5 == 1 )\n{\nif ( a6 )\nv6 = *a6;\nelse\nv6 = 78;\nv14 = v6;\nv11 = 105;\nv12 = v6;\nif ( (int)sub_480066(*(_QWORD *)(a1 + 456), v6) < 0 )\nreturn 0xFFFFFFFFLL;\nreturn sub_469711(a1, a2, a3, &v10);\n}\nv11 = 73;\nv12 = a5;\nv13 = *(_QWORD *)(*(_QWORD *)(a2 + 128) + 48LL);\nif ( a6 )\n{\nif ( (int)sub_46290D(*(_QWORD *)(a2 + 128), a6, a5) < 0 )\nreturn 0xFFFFFFFFLL;\n}\nelse\n{\nfor ( i = 0; i < a5; ++i )\n{\nif ( (int)sub_462984(*(_QWORD *)(a2 + 128), 78) < 0 )\nreturn 0xFFFFFFFFLL;\n}\n}\nif ( (int)sub_462984(*(_QWORD *)(a2 + 128), 0) >= 0 )\nreturn sub_469711(a1, a2, a3, &v10);\nreturn 0xFFFFFFFFLL;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,v10,v14,sub_469F48,sub_480066,sub_469711,sub_46290D,sub_462984,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'r', 'a4': 'pos', 'a1': 'c', 'a2': 's', 'a5': 'len', 'a6': 'base', 'v10': 'f', 'v14': 'b', 'sub_469F48': 'cram_add_insertion', 'sub_480066': 'cram_stats_add', 'sub_469711': 'cram_add_feature', 'sub_46290D': 'block_append_0', 'sub_462984': 'block_append_char_0'}"}
testDoubleIsNotDeterminate1
08f75e8cea2799daf4ab70b8df261c534a663dff963410741a43aabb6fbc7ad6
LeeLulin
esp-homekit-direct
NA
void testDoubleIsNotDeterminate1(void) { #ifdef UNITY_EXCLUDE_DOUBLE TEST_IGNORE(); #else TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(1.0 / d_zero); TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(-1.0 / d_zero); TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(0.0 / d_zero); #endif }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4219D8", "function_addr": 4331992, "binary_name": "08f75e8cea2799daf4ab70b8df261c534a663dff963410741a43aabb6fbc7ad6.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov rax, cs:qword_43A720"], [3, "add rax, 1"], [4, "mov cs:qword_43A720, rax"], [5, "pxor xmm1, xmm1"], [6, "movsd xmm0, cs:qword_429A48"], [7, "divsd xmm0, xmm1"], [8, "movq rax, xmm0"], [9, "mov edx, 6"], [10, "mov esi, 0DE5h"], [11, "mov edi, 0"], [12, "movq xmm0, rax"], [13, "call sub_403EBE"], [14, "mov rax, cs:qword_43A728"], [15, "add rax, 1"], [16, "mov cs:qword_43A728, rax"], [17, "pxor xmm1, xmm1"], [18, "movsd xmm0, cs:qword_429B40"], [19, "divsd xmm0, xmm1"], [20, "movq rax, xmm0"], [21, "mov edx, 6"], [22, "mov esi, 0DE6h"], [23, "mov edi, 0"], [24, "movq xmm0, rax"], [25, "call sub_403EBE"], [26, "mov rax, cs:qword_43A730"], [27, "add rax, 1"], [28, "mov cs:qword_43A730, rax"], [29, "pxor xmm1, xmm1"], [30, "pxor xmm0, xmm0"], [31, "divsd xmm0, xmm1"], [32, "movq rax, xmm0"], [33, "mov edx, 6"], [34, "mov esi, 0DE7h"], [35, "mov edi, 0"], [36, "movq xmm0, rax"], [37, "call sub_403EBE"], [38, "mov rax, cs:qword_43A738"], [39, "add rax, 1"], [40, "mov cs:qword_43A738, rax"], [41, "nop"], [42, "pop rbp"], [43, "retn"]], "data_dep": [[3, 2], [4, 3], [7, 6], [7, 5], [8, 7], [12, 8], [15, 14], [16, 15], [19, 18], [19, 17], [20, 19], [24, 20], [27, 26], [28, 27], [31, 29], [31, 30], [32, 31], [36, 32], [39, 38], [40, 39], [42, 0], [43, 39]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/08f75e8cea2799daf4ab70b8df261c534a663dff963410741a43aabb6fbc7ad6_08f75e8cea2799daf4ab70b8df261c534a663dff963410741a43aabb6fbc7ad6.jsonl.gz", "strip_func_name": "sub_4219D8", "query": "\n\n\n__int64 sub_4219D8()\n{\n++qword_43A720;\nsub_403EBE(0LL, 3557LL, 6u, 1.0 / 0.0);\n++qword_43A728;\nsub_403EBE(0LL, 3558LL, 6u, -1.0 / 0.0);\n++qword_43A730;\nsub_403EBE(0LL, 3559LL, 6u, 0.0 / 0.0);\nreturn ++qword_43A738;\n}\n\n\n\nQ:[sub_4219D8,sub_403EBE,]\nAssistant: ", "hints": "[]", "response": "{'sub_4219D8': 'testDoubleIsNotDeterminate1', 'sub_403EBE': 'UnityAssertDoubleSpecial'}"}
new_scope
b0a9cd2f3e4fb25c6201aa09bcf5782ae37b5367e290f1eed7e0432fa3739c0f
C-Chads
tinycc
NA
static void new_scope(struct scope *o) { /* copy and link previous scope */ *o = *cur_scope; o->prev = cur_scope; cur_scope = o; cur_scope->vla.num = 0; /* record local declaration stack position */ o->lstk = local_stack; o->llstk = local_label_stack; ++local_scope; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_417C8D", "function_addr": 4291725, "binary_name": "b0a9cd2f3e4fb25c6201aa09bcf5782ae37b5367e290f1eed7e0432fa3739c0f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "mov [rbp+var_10], rdi"], [4, "mov rdx, cs:qword_47EAE8"], [5, "mov rax, [rbp+var_10]"], [6, "mov rcx, [rdx]"], [7, "mov rbx, [rdx+8]"], [8, "mov [rax], rcx"], [9, "mov [rax+8], rbx"], [10, "mov rcx, [rdx+10h]"], [11, "mov rbx, [rdx+18h]"], [12, "mov [rax+10h], rcx"], [13, "mov [rax+18h], rbx"], [14, "mov rcx, [rdx+20h]"], [15, "mov rbx, [rdx+28h]"], [16, "mov [rax+20h], rcx"], [17, "mov [rax+28h], rbx"], [18, "mov rcx, [rdx+30h]"], [19, "mov rbx, [rdx+38h]"], [20, "mov [rax+30h], rcx"], [21, "mov [rax+38h], rbx"], [22, "mov rdx, [rdx+40h]"], [23, "mov [rax+40h], rdx"], [24, "mov rdx, cs:qword_47EAE8"], [25, "mov rax, [rbp+var_10]"], [26, "mov [rax], rdx"], [27, "mov rax, [rbp+var_10]"], [28, "mov cs:qword_47EAE8, rax"], [29, "mov rax, cs:qword_47EAE8"], [30, "mov dword ptr [rax+10h], 0"], [31, "mov rdx, cs:qword_456360"], [32, "mov rax, [rbp+var_10]"], [33, "mov [rax+38h], rdx"], [34, "mov rdx, cs:qword_456368"], [35, "mov rax, [rbp+var_10]"], [36, "mov [rax+40h], rdx"], [37, "mov eax, cs:dword_4769F8"], [38, "add eax, 1"], [39, "mov cs:dword_4769F8, eax"], [40, "nop"], [41, "mov rbx, [rbp+var_8]"], [42, "leave"], [43, "retn"]], "data_dep": [[5, 3], [6, 4], [7, 4], [8, 6], [8, 5], [9, 5], [9, 7], [10, 9], [10, 4], [11, 4], [11, 9], [12, 10], [12, 5], [13, 5], [13, 11], [14, 4], [14, 13], [15, 4], [15, 13], [16, 5], [16, 14], [17, 15], [17, 5], [18, 17], [18, 4], [19, 17], [19, 4], [20, 5], [20, 18], [21, 19], [21, 5], [22, 4], [22, 21], [23, 22], [23, 5], [25, 3], [26, 24], [26, 25], [27, 3], [28, 27], [29, 28], [30, 29], [32, 3], [33, 32], [33, 31], [35, 3], [36, 34], [36, 35], [38, 37], [39, 38], [43, 38]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/b0a9cd2f3e4fb25c6201aa09bcf5782ae37b5367e290f1eed7e0432fa3739c0f_b0a9cd2f3e4fb25c6201aa09bcf5782ae37b5367e290f1eed7e0432fa3739c0f.jsonl.gz", "strip_func_name": "sub_417C8D", "query": "\n\n\n__int64 __fastcall sub_417C8D(_QWORD *a1)\n{\n_QWORD *v1; // rdx\n__int64 v2; // rbx\n__int64 v3; // rbx\n__int64 v4; // rbx\n__int64 v5; // rbx\n\nv1 = (_QWORD *)qword_47EAE8;\nv2 = *(_QWORD *)(qword_47EAE8 + 8);\n*a1 = *(_QWORD *)qword_47EAE8;\na1[1] = v2;\nv3 = v1[3];\na1[2] = v1[2];\na1[3] = v3;\nv4 = v1[5];\na1[4] = v1[4];\na1[5] = v4;\nv5 = v1[7];\na1[6] = v1[6];\na1[7] = v5;\na1[8] = v1[8];\n*a1 = qword_47EAE8;\nqword_47EAE8 = (__int64)a1;\n*((_DWORD *)a1 + 4) = 0;\na1[7] = qword_456360;\na1[8] = qword_456368;\nreturn (unsigned int)++dword_4769F8;\n}\n\n\n\nQ:[a1,sub_417C8D,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'o', 'sub_417C8D': 'new_scope'}"}
gt_input_multifasta_parser_get_archive
507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69
smarco
gem3-mapper
NA
GT_INLINE gt_status gt_input_multifasta_parser_get_archive( gt_input_file* const input_multifasta_file,gt_sequence_archive* const sequence_archive) { GT_INPUT_FILE_CHECK(input_multifasta_file); GT_SEQUENCE_ARCHIVE_CHECK(sequence_archive); // Clear sequence archive (Why? Could be done in an accumulative fashion) // gt_sequence_archive_clear(sequence_archive); // Check the file. Reload buffer if needed if (gt_input_file_eof(input_multifasta_file)) return GT_IFP_OK; GT_INPUT_FILE_CHECK(input_multifasta_file); // Read all sequences gt_string* const buffer = gt_string_new(200); // TODO: Should be done in terms of dna_string while (!gt_input_file_eof(input_multifasta_file)) { gt_segmented_sequence* seg_seq = gt_segmented_sequence_new(); // Parse TAG if (gt_input_file_get_current_char(input_multifasta_file)!=GT_IFP_FASTA_TAG_BEGIN) { GT_INPUT_MULTIFASTA_RETURN_ERROR(GT_IFP_PE_TAG_BAD_BEGINNING); } gt_input_file_next_char(input_multifasta_file); while (gt_expect_true(!gt_input_file_eof(input_multifasta_file) && gt_input_file_get_current_char(input_multifasta_file)!=EOL && gt_input_file_get_current_char(input_multifasta_file)!=DOS_EOL)) { gt_string_append_char(seg_seq->seq_name,gt_input_file_get_current_char(input_multifasta_file)); gt_input_file_next_char(input_multifasta_file); } gt_input_file_skip_eol(input_multifasta_file,NULL); gt_string_append_eos(seg_seq->seq_name); // Parse all the sequence lines while (gt_expect_true(!gt_input_file_eof(input_multifasta_file))) { if (gt_expect_true(gt_is_iupac_code(gt_input_file_get_current_char(input_multifasta_file)))) { // TODO: gt_get_dna_normalized should be transparent gt_string_append_char(buffer, gt_get_dna_normalized(gt_input_file_get_current_char(input_multifasta_file))); gt_input_file_next_char(input_multifasta_file); } else if (gt_input_file_get_current_char(input_multifasta_file)==EOL || gt_input_file_get_current_char(input_multifasta_file)==DOS_EOL) { // Append string and clear buffer (next line!) gt_segmented_sequence_append_string(seg_seq, gt_string_get_string(buffer),gt_string_get_length(buffer)); gt_string_clear(buffer); gt_input_file_skip_eol(input_multifasta_file,NULL); } else if (gt_input_file_get_current_char(input_multifasta_file)==GT_IFP_FASTA_TAG_BEGIN) { break; // Next sequence ! } } // Store the parsed sequence gt_sequence_archive_add_segmented_sequence(sequence_archive,seg_seq); } gt_string_delete(buffer); return GT_IFP_OK; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_414B69", "function_addr": 4279145, "binary_name": "507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 28h"], [4, "mov [rbp+var_28], rdi"], [5, "mov [rbp+var_30], rsi"], [6, "mov rax, [rbp+var_28]"], [7, "mov rdi, rax"], [8, "call sub_415A63"], [9, "test al, al"], [10, "jz short loc_414B94"], [11, "mov eax, 1"], [12, "jmp loc_414DD5"], [13, "mov edi, 0C8h"], [14, "call sub_44298A"], [15, "mov [rbp+var_18], rax"], [16, "jmp loc_414DAD"], [17, "call sub_43E065"], [18, "mov [rbp+var_20], rax"], [19, "mov rax, [rbp+var_28]"], [20, "mov rdi, rax"], [21, "call sub_41595D"], [22, "cmp al, 3Eh "], [23, "jz short loc_414BE2"], [24, "mov rax, [rbp+var_18]"], [25, "mov rdi, rax"], [26, "call sub_442B47"], [27, "mov rax, [rbp+var_20]"], [28, "mov rdi, rax"], [29, "call sub_43E142"], [30, "mov eax, 14h"], [31, "jmp loc_414DD5"], [32, "mov rax, [rbp+var_28]"], [33, "mov rdi, rax"], [34, "call sub_415E0D"], [35, "jmp short loc_414C1C"], [36, "mov rax, [rbp+var_28]"], [37, "mov rdi, rax"], [38, "call sub_41595D"], [39, "movsx edx, al"], [40, "mov rax, [rbp+var_20]"], [41, "mov rax, [rax]"], [42, "mov esi, edx"], [43, "mov rdi, rax"], [44, "call sub_442E1D"], [45, "mov rax, [rbp+var_28]"], [46, "mov rdi, rax"], [47, "call sub_415E0D"], [48, "mov rax, [rbp+var_28]"], [49, "mov rdi, rax"], [50, "call sub_415A63"], [51, "xor eax, 1"], [52, "movzx eax, al"], [53, "test rax, rax"], [54, "jz short loc_414C53"], [55, "mov rax, [rbp+var_28]"], [56, "mov rdi, rax"], [57, "call sub_41595D"], [58, "cmp al, 0Ah"], [59, "setnz al"], [60, "movzx eax, al"], [61, "test rax, rax"], [62, "jz short loc_414C53"], [63, "mov eax, 1"], [64, "jmp short loc_414C58"], [65, "mov eax, 0"], [66, "test eax, eax"], [67, "jz short loc_414C79"], [68, "mov rax, [rbp+var_28]"], [69, "mov rdi, rax"], [70, "call sub_41595D"], [71, "cmp al, 0Dh"], [72, "setnz al"], [73, "movzx eax, al"], [74, "test rax, rax"], [75, "jnz loc_414BF0"], [76, "mov rax, [rbp+var_28]"], [77, "mov esi, 0"], [78, "mov rdi, rax"], [79, "call sub_415E82"], [80, "mov rax, [rbp+var_20]"], [81, "mov rax, [rax]"], [82, "mov rdi, rax"], [83, "call sub_442E78"], [84, "jmp loc_414D7C"], [85, "mov rax, [rbp+var_28]"], [86, "mov rdi, rax"], [87, "call sub_41595D"], [88, "movzx eax, al"], [89, "mov rdx, 44E5E0h"], [90, "cdqe"], [91, "movzx eax, byte ptr [rdx+rax]"], [92, "movzx eax, al"], [93, "test rax, rax"], [94, "jz short loc_414CFD"], [95, "mov rax, [rbp+var_28]"], [96, "mov rdi, rax"], [97, "call sub_41595D"], [98, "movzx eax, al"], [99, "mov rdx, offset aNnnnnnnnnnnnnn"], [100, "cdqe"], [101, "movzx eax, byte ptr [rdx+rax]"], [102, "movsx edx, al"], [103, "mov rax, [rbp+var_18]"], [104, "mov esi, edx"], [105, "mov rdi, rax"], [106, "call sub_442E1D"], [107, "mov rax, [rbp+var_28]"], [108, "mov rdi, rax"], [109, "call sub_415E0D"], [110, "jmp short loc_414D7C"], [111, "mov rax, [rbp+var_28]"], [112, "mov rdi, rax"], [113, "call sub_41595D"], [114, "cmp al, 0Ah"], [115, "jz short loc_414D1D"], [116, "mov rax, [rbp+var_28]"], [117, "mov rdi, rax"], [118, "call sub_41595D"], [119, "cmp al, 0Dh"], [120, "jnz short loc_414D6C"], [121, "mov rax, [rbp+var_18]"], [122, "mov rdi, rax"], [123, "call sub_442DD4"], [124, "mov rbx, rax"], [125, "mov rax, [rbp+var_18]"], [126, "mov rdi, rax"], [127, "call sub_442DC3"], [128, "mov rcx, rax"], [129, "mov rax, [rbp+var_20]"], [130, "mov rdx, rbx"], [131, "mov rsi, rcx"], [132, "mov rdi, rax"], [133, "call sub_43E44F"], [134, "mov rax, [rbp+var_18]"], [135, "mov rdi, rax"], [136, "call sub_442B0C"], [137, "mov rax, [rbp+var_28]"], [138, "mov esi, 0"], [139, "mov rdi, rax"], [140, "call sub_415E82"], [141, "jmp short loc_414D7C"], [142, "mov rax, [rbp+var_28]"], [143, "mov rdi, rax"], [144, "call sub_41595D"], [145, "cmp al, 3Eh "], [146, "jz short loc_414D99"], [147, "mov rax, [rbp+var_28]"], [148, "mov rdi, rax"], [149, "call sub_415A63"], [150, "xor eax, 1"], [151, "movzx eax, al"], [152, "test rax, rax"], [153, "jnz loc_414C9E"], [154, "jmp short loc_414D9A"], [155, "nop"], [156, "mov rdx, [rbp+var_20]"], [157, "mov rax, [rbp+var_30]"], [158, "mov rsi, rdx"], [159, "mov rdi, rax"], [160, "call sub_43EB47"], [161, "mov rax, [rbp+var_28]"], [162, "mov rdi, rax"], [163, "call sub_415A63"], [164, "xor eax, 1"], [165, "test al, al"], [166, "jnz loc_414BA7"], [167, "mov rax, [rbp+var_18]"], [168, "mov rdi, rax"], [169, "call sub_442B47"], [170, "mov eax, 1"], [171, "mov rbx, [rbp+var_8]"], [172, "leave"], [173, "retn"]], "data_dep": [[6, 4], [7, 6], [9, 8], [10, 9], [15, 14], [18, 17], [19, 4], [20, 19], [22, 21], [23, 22], [24, 15], [25, 24], [27, 18], [28, 27], [32, 4], [33, 32], [36, 4], [37, 36], [39, 38], [40, 18], [41, 40], [42, 39], [43, 41], [45, 4], [46, 45], [48, 4], [49, 48], [51, 50], [52, 51], [53, 52], [54, 53], [55, 4], [56, 55], [58, 57], [59, 57], [59, 58], [60, 59], [61, 60], [62, 61], [66, 63], [66, 65], [67, 66], [68, 4], [69, 68], [71, 70], [72, 70], [72, 71], [73, 72], [74, 73], [75, 74], [76, 4], [78, 76], [80, 18], [81, 80], [82, 81], [85, 4], [86, 85], [88, 87], [91, 88], [92, 91], [93, 92], [94, 93], [95, 4], [96, 95], [98, 97], [101, 98], [102, 101], [103, 15], [104, 102], [105, 103], [107, 4], [108, 107], [111, 4], [112, 111], [114, 113], [115, 114], [116, 4], [117, 116], [119, 118], [120, 119], [121, 15], [122, 121], [124, 123], [125, 15], [126, 125], [128, 127], [129, 18], [130, 124], [131, 128], [132, 129], [134, 15], [135, 134], [137, 4], [139, 137], [142, 4], [143, 142], [145, 144], [146, 145], [147, 4], [148, 147], [150, 149], [151, 150], [152, 151], [153, 152], [156, 18], [157, 5], [158, 156], [159, 157], [161, 4], [162, 161], [164, 163], [165, 164], [166, 165], [167, 15], [168, 167], [173, 170], [173, 30], [173, 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/507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69_507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69.jsonl.gz", "strip_func_name": "sub_414B69", "query": "\n\n\n__int64 __fastcall sub_414B69(__int64 a1, __int64 a2)\n{\nchar v3; // al\n_BOOL4 v4; // eax\nunsigned __int8 v5; // al\n__int64 v6; // rbx\n__int64 v7; // rax\n_QWORD *v8; // [rsp+10h] [rbp-20h]\n__int64 v9; // [rsp+18h] [rbp-18h]\n\nif ( (unsigned __int8)sub_415A63(a1) )\nreturn 1LL;\nv9 = sub_44298A(200LL);\nwhile ( (unsigned __int8)sub_415A63(a1) != 1 )\n{\nv8 = (_QWORD *)sub_43E065();\nif ( (unsigned __int8)sub_41595D(a1) != 62 )\n{\nsub_442B47(v9);\nsub_43E142(v8);\nreturn 20LL;\n}\nsub_415E0D(a1);\nwhile ( 1 )\n{\nv4 = (unsigned __int8)sub_415A63(a1) != 1 && (unsigned __int8)sub_41595D(a1) != 10;\nif ( !v4 || (unsigned __int8)sub_41595D(a1) == 13 )\nbreak;\nv3 = sub_41595D(a1);\nsub_442E1D(*v8, (unsigned int)v3);\nsub_415E0D(a1);\n}\nsub_415E82(a1, 0LL);\nsub_442E78(*v8);\nwhile ( (unsigned __int8)sub_415A63(a1) != 1 )\n{\nif ( aNnnnnnnnnnnnnn[(unsigned __int8)sub_41595D(a1) + 768] )\n{\nv5 = sub_41595D(a1);\nsub_442E1D(v9, (unsigned int)aNnnnnnnnnnnnnn[v5]);\nsub_415E0D(a1);\n}\nelse if ( (unsigned __int8)sub_41595D(a1) == 10 || (unsigned __int8)sub_41595D(a1) == 13 )\n{\nv6 = sub_442DD4(v9);\nv7 = sub_442DC3(v9);\nsub_43E44F(v8, v7, v6);\nsub_442B0C(v9);\nsub_415E82(a1, 0LL);\n}\nelse if ( (unsigned __int8)sub_41595D(a1) == 62 )\n{\nbreak;\n}\n}\nsub_43EB47(a2, v8);\n}\nsub_442B47(v9);\nreturn 1LL;\n}\n\n\n\nQ:[a1,a2,v8,v9,sub_414B69,sub_415A63,sub_44298A,sub_43E065,sub_41595D,sub_442B47,sub_43E142,sub_415E0D,sub_442E1D,sub_415E82,sub_442E78,sub_442DD4,sub_442DC3,sub_43E44F,sub_442B0C,sub_43EB47,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'input_multifasta_file', 'a2': 'sequence_archive', 'v8': 'seg_seq', 'v9': 'buffer', 'sub_414B69': 'gt_input_multifasta_parser_get_archive', 'sub_415A63': 'gt_input_file_eof', 'sub_44298A': 'gt_string_new', 'sub_43E065': 'gt_segmented_sequence_new', 'sub_41595D': 'gt_input_file_get_current_char', 'sub_442B47': 'gt_string_delete', 'sub_43E142': 'gt_segmented_sequence_delete', 'sub_415E0D': 'gt_input_file_next_char', 'sub_442E1D': 'gt_string_append_char', 'sub_415E82': 'gt_input_file_skip_eol', 'sub_442E78': 'gt_string_append_eos', 'sub_442DD4': 'gt_string_get_length', 'sub_442DC3': 'gt_string_get_string', 'sub_43E44F': 'gt_segmented_sequence_append_string', 'sub_442B0C': 'gt_string_clear', 'sub_43EB47': 'gt_sequence_archive_add_segmented_sequence'}"}
_will_return
f2b2915e9e2d6729375d876f6c15174498b7f2f04b5b9bcc85cb7c605be4924f
cjhdev
lora_device_lib
NA
void _will_return(const char * const function_name, const char * const file, const int line, const LargestIntegralType value, const int count) { SymbolValue * const return_value = (SymbolValue*)malloc(sizeof(*return_value)); assert_true(count != 0); return_value->value = value; set_source_location(&return_value->location, file, line); add_symbol_value(&global_function_result_map_head, &function_name, 1, return_value, count); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41BA2E", "function_addr": 4307502, "binary_name": "f2b2915e9e2d6729375d876f6c15174498b7f2f04b5b9bcc85cb7c605be4924f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_24], edx"], [6, "mov [rbp+var_30], rcx"], [7, "mov [rbp+var_28], r8d"], [8, "mov rax, cs:qword_439DE0"], [9, "add rax, 1"], [10, "mov cs:qword_439DE0, rax"], [11, "mov edi, 18h"], [12, "call _malloc"], [13, "mov [rbp+var_8], rax"], [14, "cmp [rbp+var_28], 0"], [15, "setnz al"], [16, "movzx eax, al"], [17, "mov ecx, 3E0h"], [18, "mov edx, offset aVendorCmockaSr"], [19, "mov esi, offset aCount0"], [20, "mov rdi, rax"], [21, "call sub_41D3C3"], [22, "mov rax, cs:qword_439DE8"], [23, "add rax, 1"], [24, "mov cs:qword_439DE8, rax"], [25, "mov rax, [rbp+var_8]"], [26, "mov rdx, [rbp+var_30]"], [27, "mov [rax+10h], rdx"], [28, "mov rax, [rbp+var_8]"], [29, "mov edx, [rbp+var_24]"], [30, "mov rcx, [rbp+var_20]"], [31, "mov rsi, rcx"], [32, "mov rdi, rax"], [33, "call sub_419C5C"], [34, "mov rax, cs:qword_439DF0"], [35, "add rax, 1"], [36, "mov cs:qword_439DF0, rax"], [37, "mov ecx, [rbp+var_28]"], [38, "mov rdx, [rbp+var_8]"], [39, "lea rax, [rbp+var_18]"], [40, "mov r8d, ecx"], [41, "mov rcx, rdx"], [42, "mov edx, 1"], [43, "mov rsi, rax"], [44, "mov edi, offset unk_4387C0"], [45, "call sub_41A8E0"], [46, "mov rax, cs:qword_439DF8"], [47, "add rax, 1"], [48, "mov cs:qword_439DF8, rax"], [49, "nop"], [50, "leave"], [51, "retn"]], "data_dep": [[9, 8], [10, 9], [13, 12], [14, 7], [15, 14], [15, 12], [16, 15], [20, 16], [23, 22], [24, 23], [25, 13], [26, 6], [27, 25], [27, 26], [28, 13], [29, 5], [30, 4], [31, 30], [32, 28], [35, 34], [36, 35], [37, 7], [38, 13], [39, 35], [39, 3], [40, 37], [41, 38], [43, 39], [47, 46], [48, 47], [51, 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/f2b2915e9e2d6729375d876f6c15174498b7f2f04b5b9bcc85cb7c605be4924f_f2b2915e9e2d6729375d876f6c15174498b7f2f04b5b9bcc85cb7c605be4924f.jsonl.gz", "strip_func_name": "sub_41BA2E", "query": "\n\n\n__int64 __fastcall sub_41BA2E(__int64 a1, __int64 a2, int a3, __int64 a4, unsigned int a5)\n{\n__int64 v9; // [rsp+18h] [rbp-18h] BYREF\n_QWORD *v10; // [rsp+28h] [rbp-8h]\n\nv9 = a1;\n++qword_439DE0;\nv10 = malloc(0x18uLL);\nsub_41D3C3(a5 != 0, \"count != 0\", \"../vendor/cmocka/src/cmocka.c\", 992LL);\n++qword_439DE8;\nv10[2] = a4;\nsub_419C5C((__int64)v10, a2, a3);\n++qword_439DF0;\nsub_41A8E0(qword_4387C0, &v9, 1LL, (__int64)v10, a5);\nreturn ++qword_439DF8;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v9,v10,sub_41BA2E,sub_41D3C3,sub_419C5C,sub_41A8E0,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'line', 'a4': 'value', 'a1': 'function_name', 'a2': 'file', 'a5': 'count', 'v9': 'function_namea', 'v10': 'return_value', 'sub_41BA2E': '_will_return', 'sub_41D3C3': '_assert_true', 'sub_419C5C': 'set_source_location', 'sub_41A8E0': 'add_symbol_value'}"}
yrmcds_getk
c14e4a23af97c05c132af727554ffbc40c808655512247badf0f63aaac8465be
netdata
netdata
NA
yrmcds_error yrmcds_getk(yrmcds* c, const char* key, size_t key_len, int quiet, uint32_t* serial) { if( c == NULL || key == NULL || key_len == 0 ) return YRMCDS_BAD_ARGUMENT; if( c->text_mode ) return yrmcds_text_get(c, key, key_len, quiet, serial); return send_command(c, quiet ? YRMCDS_CMD_GETKQ : YRMCDS_CMD_GETK, 0, serial, key_len, key, 0, NULL, 0, NULL); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_408125", "function_addr": 4227365, "binary_name": "c14e4a23af97c05c132af727554ffbc40c808655512247badf0f63aaac8465be.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_1C], ecx"], [7, "mov [rbp+var_28], r8"], [8, "cmp [rbp+var_8], 0"], [9, "jz short loc_408155"], [10, "cmp [rbp+var_10], 0"], [11, "jz short loc_408155"], [12, "cmp [rbp+var_18], 0"], [13, "jnz short loc_40815C"], [14, "mov eax, 2"], [15, "jmp short locret_4081CD"], [16, "mov rax, [rbp+var_8]"], [17, "mov eax, [rax+6Ch]"], [18, "test eax, eax"], [19, "jz short loc_408187"], [20, "mov rdi, [rbp+var_28]"], [21, "mov ecx, [rbp+var_1C]"], [22, "mov rdx, [rbp+var_18]"], [23, "mov rsi, [rbp+var_10]"], [24, "mov rax, [rbp+var_8]"], [25, "mov r8, rdi"], [26, "mov rdi, rax"], [27, "call sub_409A2E"], [28, "jmp short locret_4081CD"], [29, "cmp [rbp+var_1C], 0"], [30, "jz short loc_408194"], [31, "mov edi, 0Dh"], [32, "jmp short loc_408199"], [33, "mov edi, 0Ch"], [34, "mov rsi, [rbp+var_10]"], [35, "mov rcx, [rbp+var_18]"], [36, "mov rdx, [rbp+var_28]"], [37, "mov rax, [rbp+var_8]"], [38, "push 0"], [39, "push 0"], [40, "push 0"], [41, "push 0"], [42, "mov r9, rsi"], [43, "mov r8, rcx"], [44, "mov rcx, rdx"], [45, "mov edx, 0"], [46, "mov esi, edi"], [47, "mov rdi, rax"], [48, "call sub_407B22"], [49, "add rsp, 20h"], [50, "leave"], [51, "retn"]], "data_dep": [[8, 3], [9, 8], [10, 4], [11, 10], [12, 5], [13, 12], [16, 3], [17, 16], [18, 17], [19, 18], [20, 7], [21, 6], [22, 5], [23, 4], [24, 3], [25, 20], [26, 24], [29, 6], [30, 29], [34, 4], [35, 5], [36, 7], [37, 3], [42, 34], [43, 35], [44, 36], [46, 33], [46, 31], [47, 37], [49, 2], [51, 27], [51, 48], [51, 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/c14e4a23af97c05c132af727554ffbc40c808655512247badf0f63aaac8465be_c14e4a23af97c05c132af727554ffbc40c808655512247badf0f63aaac8465be.jsonl.gz", "strip_func_name": "sub_408125", "query": "\n\n\n__int64 __fastcall sub_408125(__int64 a1, void *a2, unsigned __int64 a3, unsigned int a4, _DWORD *a5)\n{\nunsigned int v6; // edi\n\nif ( !a1 || !a2 || !a3 )\nreturn 2LL;\nif ( *(_DWORD *)(a1 + 108) )\nreturn sub_409A2E(a1, a2, a3, a4, a5);\nif ( a4 )\nv6 = 13;\nelse\nv6 = 12;\nreturn sub_407B22(a1, v6, 0LL, a5, a3, a2, 0LL, 0LL, 0LL, 0LL);\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,sub_408125,sub_409A2E,sub_407B22,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'key_len', 'a4': 'quiet', 'a1': 'c', 'a2': 'key', 'a5': 'serial', 'sub_408125': 'yrmcds_getk', 'sub_409A2E': 'yrmcds_text_get', 'sub_407B22': 'send_command'}"}
main
c4a3096d0db326a6a2a748070554dbfe7f1dd49f63830595967d5513b90de38c
skeeto
enchive
NA
int main(int argc, char **argv) { static const struct optparse_long global[] = { #if ENCHIVE_OPTION_AGENT {"agent", 'a', OPTPARSE_OPTIONAL}, {"no-agent", 'A', OPTPARSE_NONE}, #endif {"pinentry", 'e', OPTPARSE_OPTIONAL}, {"pubkey", 'p', OPTPARSE_REQUIRED}, {"seckey", 's', OPTPARSE_REQUIRED}, {"version", 'V', OPTPARSE_NONE}, {"help", 'h', OPTPARSE_NONE}, {0, 0, 0} }; int option; char *command; struct optparse options[1]; optparse_init(options, argv); options->permute = 0; (void)argc; while ((option = optparse_long(options, global, 0)) != -1) { switch (option) { #if ENCHIVE_OPTION_AGENT case 'a': if (options->optarg) { char *arg = options->optarg; char *endptr; errno = 0; global_agent_timeout = strtol(arg, &endptr, 10); if (*endptr || errno) fatal("invalid --agent argument -- %s", arg); } else global_agent_timeout = ENCHIVE_AGENT_TIMEOUT; break; case 'A': global_agent_timeout = 0; break; #endif case 'e': if (options->optarg) pinentry_path = options->optarg; else pinentry_path = STR(ENCHIVE_PINENTRY_DEFAULT); break; case 'p': global_pubkey = options->optarg; break; case 's': global_seckey = options->optarg; break; case 'h': print_usage(stdout); exit(EXIT_SUCCESS); break; case 'V': print_version(); exit(EXIT_SUCCESS); break; default: fatal("%s", options->errmsg); } } command = optparse_arg(options); options->permute = 1; if (!command) { fprintf(stderr, "enchive: missing command\n"); print_usage(stderr); exit(EXIT_FAILURE); } #ifdef _WIN32 /* Set stdin/stdout to binary mode. */ _setmode(0, 0x8000); _setmode(1, 0x8000); #endif switch (parse_command(command)) { case COMMAND_UNKNOWN: case COMMAND_AMBIGUOUS: fprintf(stderr, "enchive: unknown command, %s\n", command); print_usage(stderr); exit(EXIT_FAILURE); break; case COMMAND_KEYGEN: command_keygen(options); break; case COMMAND_FINGERPRINT: command_fingerprint(options); break; case COMMAND_ARCHIVE: command_archive(options); break; case COMMAND_EXTRACT: command_extract(options); break; } cleanup_free(); return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "main", "function_addr": 4220451, "binary_name": "c4a3096d0db326a6a2a748070554dbfe7f1dd49f63830595967d5513b90de38c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0A0h"], [3, "mov [rbp+var_94], edi"], [4, "mov [rbp+var_A0], rsi"], [5, "mov rdx, [rbp+var_A0]"], [6, "lea rax, [rbp+var_80]"], [7, "mov rsi, rdx"], [8, "mov rdi, rax"], [9, "call sub_402553"], [10, "mov [rbp+var_78], 0"], [11, "jmp loc_406787"], [12, "mov eax, [rbp+var_4]"], [13, "sub eax, 41h "], [14, "cmp eax, 32h"], [15, "ja def_406676"], [16, "mov eax, eax"], [17, "mov rax, ds:jpt_406676[rax*8]"], [18, "jmp rax"], [19, "mov rax, [rbp+var_68]"], [20, "test rax, rax"], [21, "jz short loc_4066ED"], [22, "mov rax, [rbp+var_68]"], [23, "mov [rbp+nptr], rax"], [24, "call ___errno_location"], [25, "mov dword ptr [rax], 0"], [26, "lea rcx, [rbp+endptr]"], [27, "mov rax, [rbp+nptr]"], [28, "mov edx, 0Ah"], [29, "mov rsi, rcx"], [30, "mov rdi, rax"], [31, "call _strtol"], [32, "mov cs:dword_410310, eax"], [33, "mov rax, [rbp+endptr]"], [34, "movzx eax, byte ptr [rax]"], [35, "test al, al"], [36, "jnz short loc_4066D2"], [37, "call ___errno_location"], [38, "mov eax, [rax]"], [39, "test eax, eax"], [40, "jz loc_406787"], [41, "mov rax, [rbp+nptr]"], [42, "mov rsi, rax"], [43, "mov edi, offset aInvalidAgentAr"], [44, "mov eax, 0"], [45, "call sub_403175"], [46, "jmp loc_406787"], [47, "mov cs:dword_410310, 384h"], [48, "jmp loc_406787"], [49, "mov cs:dword_410310, 0"], [50, "jmp short loc_406787"], [51, "mov rax, [rbp+var_68]"], [52, "test rax, rax"], [53, "jz short loc_40671E"], [54, "mov rax, [rbp+var_68]"], [55, "mov cs:arg, rax"], [56, "jmp short loc_406787"], [57, "mov cs:arg, offset aPinentry"], [58, "jmp short loc_406787"], [59, "mov rax, [rbp+var_68]"], [60, "mov cs:qword_410300, rax"], [61, "jmp short loc_406787"], [62, "mov rax, [rbp+var_68]"], [63, "mov cs:qword_410308, rax"], [64, "jmp short loc_406787"], [65, "mov rax, cs:stdout"], [66, "mov rdi, rax"], [67, "call sub_4065F2"], [68, "mov edi, 0"], [69, "call _exit"], [70, "call sub_406612"], [71, "mov edi, 0"], [72, "call _exit"], [73, "lea rax, [rbp+var_80]"], [74, "add rax, 20h "], [75, "mov rsi, rax"], [76, "mov edi, offset aS"], [77, "mov eax, 0"], [78, "call sub_403175"], [79, "lea rax, [rbp+var_80]"], [80, "mov edx, 0"], [81, "mov esi, offset off_40D380"], [82, "mov rdi, rax"], [83, "call sub_402DB4"], [84, "mov [rbp+var_4], eax"], [85, "cmp [rbp+var_4], 0FFFFFFFFh"], [86, "jnz loc_40665D"], [87, "lea rax, [rbp+var_80]"], [88, "mov rdi, rax"], [89, "call sub_402AAB"], [90, "mov [rbp+var_10], rax"], [91, "mov [rbp+var_78], 1"], [92, "cmp [rbp+var_10], 0"], [93, "jnz short loc_4067FF"], [94, "mov rax, cs:stderr"], [95, "mov rcx, rax"], [96, "mov edx, 19h"], [97, "mov esi, 1"], [98, "mov edi, offset aEnchiveMissing"], [99, "call _fwrite"], [100, "mov rax, cs:stderr"], [101, "mov rdi, rax"], [102, "call sub_4065F2"], [103, "mov edi, 1"], [104, "call _exit"], [105, "mov rax, [rbp+var_10]"], [106, "mov rdi, rax"], [107, "call sub_405877"], [108, "add eax, 2"], [109, "cmp eax, 5"], [110, "ja short def_40681D"], [111, "mov eax, eax"], [112, "mov rax, ds:jpt_40681D[rax*8]"], [113, "jmp rax"], [114, "mov rax, cs:stderr"], [115, "mov rdx, [rbp+var_10]"], [116, "mov esi, offset aEnchiveUnknown"], [117, "mov rdi, rax"], [118, "mov eax, 0"], [119, "call _fprintf"], [120, "mov rax, cs:stderr"], [121, "mov rdi, rax"], [122, "call sub_4065F2"], [123, "mov edi, 1"], [124, "call _exit"], [125, "lea rax, [rbp+var_80]"], [126, "mov rdi, rax"], [127, "call sub_4058FF"], [128, "jmp short def_40681D"], [129, "lea rax, [rbp+var_80]"], [130, "mov rdi, rax"], [131, "call sub_405E14"], [132, "jmp short def_40681D"], [133, "lea rax, [rbp+var_80]"], [134, "mov rdi, rax"], [135, "call sub_405EB6"], [136, "jmp short def_40681D"], [137, "lea rax, [rbp+var_80]"], [138, "mov rdi, rax"], [139, "call sub_4061EB"], [140, "nop"], [141, "call sub_40313A"], [142, "mov eax, 0"], [143, "leave"], [144, "retn"]], "data_dep": [[5, 4], [7, 5], [8, 6], [12, 84], [13, 12], [14, 13], [15, 14], [16, 13], [18, 17], [20, 19], [21, 20], [23, 22], [25, 24], [26, 26], [27, 23], [29, 26], [30, 27], [32, 31], [34, 25], [34, 33], [35, 34], [36, 35], [38, 25], [38, 37], [39, 38], [40, 39], [41, 23], [42, 41], [52, 51], [53, 52], [55, 54], [60, 59], [63, 62], [66, 65], [73, 17], [73, 13], [74, 73], [75, 74], [79, 39], [79, 54], [79, 20], [79, 17], [79, 59], [79, 62], [79, 52], [79, 9], [82, 79], [84, 83], [85, 84], [86, 85], [87, 83], [88, 87], [90, 89], [92, 90], [93, 92], [95, 94], [101, 100], [105, 90], [106, 105], [108, 107], [109, 108], [110, 109], [111, 108], [113, 112], [115, 90], [117, 114], [121, 120], [125, 112], [126, 125], [129, 112], [130, 129], [133, 112], [134, 133], [137, 112], [138, 137], [144, 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/c4a3096d0db326a6a2a748070554dbfe7f1dd49f63830595967d5513b90de38c_c4a3096d0db326a6a2a748070554dbfe7f1dd49f63830595967d5513b90de38c.jsonl.gz", "strip_func_name": "main", "query": "\n\n\n__int64 __fastcall main(int a1, char **a2, char **a3)\n{\n__int64 v3; // rdx\n__int64 v4; // rcx\n__int64 v5; // r8\n__int64 v6; // r9\n__int64 v7; // rdx\n__int64 v8; // rcx\n__int64 v9; // r8\n__int64 v10; // r9\n__int64 result; // rax\nchar *endptr; // [rsp+18h] [rbp-88h] BYREF\nchar v13[8]; // [rsp+20h] [rbp-80h] BYREF\nint v14; // [rsp+28h] [rbp-78h]\nchar *v15; // [rsp+38h] [rbp-68h]\n__int64 v16; // [rsp+40h] [rbp-60h] BYREF\nchar *nptr; // [rsp+88h] [rbp-18h]\nconst char *v18; // [rsp+90h] [rbp-10h]\nint v19; // [rsp+9Ch] [rbp-4h]\n\nsub_402553((__int64)v13, (__int64)a2);\nv14 = 0;\nwhile ( 1 )\n{\nv19 = sub_402DB4((__int64)v13, (__int64)&off_40D380, 0LL);\nif ( v19 == -1 )\nbreak;\nswitch ( v19 )\n{\ncase 'A':\ndword_410310 = 0;\nbreak;\ncase 'V':\nsub_406612();\nexit(0);\ncase 'a':\nif ( v15 )\n{\nnptr = v15;\n*__errno_location() = 0;\ndword_410310 = strtol(nptr, &endptr, 10);\nif ( *endptr || *__errno_location() )\nsub_403175(\"invalid --agent argument -- %s\", (__int64)nptr, v3, v4, v5, v6, a2);\n}\nelse\n{\ndword_410310 = 900;\n}\nreturn result;\ncase 'e':\nif ( v15 )\narg = v15;\nelse\narg = \"pinentry\";\nbreak;\ncase 'h':\nsub_4065F2(stdout);\nexit(0);\ncase 'p':\nqword_410300 = (__int64)v15;\nbreak;\ncase 's':\nqword_410308 = (__int64)v15;\nbreak;\ndefault:\nsub_403175(\"%s\", (__int64)&v16, v7, v8, v9, v10, a2);\n}\n}\nv18 = (const char *)sub_402AAB((__int64)v13);\nv14 = 1;\nif ( !v18 )\n{\nfwrite(\"enchive: missing command\\n\", 1uLL, 0x19uLL, stderr);\nsub_4065F2(stderr);\nexit(1);\n}\nswitch ( (unsigned int)sub_405877(v18) )\n{\ncase 0xFFFFFFFE:\ncase 0xFFFFFFFF:\nfprintf(stderr, \"enchive: unknown command, %s\\n\", v18);\nsub_4065F2(stderr);\nexit(1);\ncase 0u:\nsub_4058FF((__int64)v13, (__int64)&off_40D380);\nbreak;\ncase 1u:\nsub_405E14((__int64)v13, (__int64)&off_40D380);\nbreak;\ncase 2u:\nsub_405EB6((__int64)v13, (__int64)&off_40D380);\nbreak;\ncase 3u:\nsub_4061EB((__int64)v13, (__int64)&off_40D380);\nbreak;\ndefault:\nbreak;\n}\nsub_40313A();\nreturn 0LL;\n}\n\n\n\nQ:[a2,a3,a1,v3,v13,nptr,v18,v19,sub_402553,sub_402DB4,sub_406612,sub_403175,sub_4065F2,sub_402AAB,sub_405877,sub_4058FF,sub_405E14,sub_405EB6,sub_4061EB,sub_40313A,]\nAssistant: ", "hints": "[]", "response": "{'a2': 'argv', 'a3': 'envp', 'a1': 'argc', 'v3': 'envp', 'v13': 'options', 'nptr': 'arg', 'v18': 'command', 'v19': 'option', 'sub_402553': 'optparse_init', 'sub_402DB4': 'optparse_long_0', 'sub_406612': 'print_version', 'sub_403175': 'fatal', 'sub_4065F2': 'print_usage', 'sub_402AAB': 'optparse_arg', 'sub_405877': 'parse_command', 'sub_4058FF': 'command_keygen', 'sub_405E14': 'command_fingerprint', 'sub_405EB6': 'command_archive', 'sub_4061EB': 'command_extract', 'sub_40313A': 'cleanup_free'}"}
iscsi_update_conn_stats_tx
06b05d82dec9870e8b7ae0397f41b35df72003047fadef58765b37b6dc5de195
fujita
tgt
NA
void iscsi_update_conn_stats_tx(struct iscsi_connection *conn, int size, int opcode) { conn->stats.txdata_octets += (uint64_t)size; if (unlikely(opcode < 0)) return; if (opcode == ISCSI_OP_SCSI_DATA_IN) conn->stats.datain_pdus++; else if (opcode == ISCSI_OP_SCSI_CMD_RSP) conn->stats.scsirsp_pdus++; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "iscsi_update_conn_stats_tx", "function_addr": 4229193, "binary_name": "06b05d82dec9870e8b7ae0397f41b35df72003047fadef58765b37b6dc5de195.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov [rbp+var_C], esi"], [4, "mov [rbp+var_10], edx"], [5, "mov rax, [rbp+var_8]"], [6, "mov rdx, [rax+270h]"], [7, "mov eax, [rbp+var_C]"], [8, "cdqe"], [9, "add rdx, rax"], [10, "mov rax, [rbp+var_8]"], [11, "mov [rax+270h], rdx"], [12, "mov eax, [rbp+var_10]"], [13, "shr eax, 1Fh"], [14, "movzx eax, al"], [15, "test rax, rax"], [16, "jnz short loc_4088C1"], [17, "cmp [rbp+var_10], 25h "], [18, "jnz short loc_4088A2"], [19, "mov rax, [rbp+var_8]"], [20, "mov eax, [rax+2B0h]"], [21, "lea edx, [rax+1]"], [22, "mov rax, [rbp+var_8]"], [23, "mov [rax+2B0h], edx"], [24, "jmp short loc_4088C2"], [25, "cmp [rbp+var_10], 21h "], [26, "jnz short loc_4088C2"], [27, "mov rax, [rbp+var_8]"], [28, "mov eax, [rax+2A4h]"], [29, "lea edx, [rax+1]"], [30, "mov rax, [rbp+var_8]"], [31, "mov [rax+2A4h], edx"], [32, "jmp short loc_4088C2"], [33, "nop"], [34, "pop rbp"], [35, "retn"]], "data_dep": [[5, 2], [6, 5], [7, 3], [9, 7], [9, 6], [10, 2], [11, 10], [11, 9], [12, 4], [13, 12], [14, 13], [15, 14], [16, 15], [17, 4], [18, 17], [19, 2], [20, 11], [20, 23], [20, 19], [21, 9], [21, 11], [21, 23], [21, 20], [22, 2], [23, 22], [23, 21], [25, 4], [26, 25], [27, 2], [28, 27], [28, 11], [28, 31], [29, 28], [29, 31], [29, 9], [29, 11], [30, 2], [31, 29], [31, 30], [34, 0], [35, 30], [35, 22], [35, 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/06b05d82dec9870e8b7ae0397f41b35df72003047fadef58765b37b6dc5de195_06b05d82dec9870e8b7ae0397f41b35df72003047fadef58765b37b6dc5de195.jsonl.gz", "strip_func_name": "iscsi_update_conn_stats_tx", "query": "\n\n\n_BOOL8 __fastcall iscsi_update_conn_stats_tx(__int64 a1, int a2, int a3)\n{\n_BOOL8 result; // rax\n\n*(_QWORD *)(a1 + 624) += a2;\nresult = a3 < 0;\nif ( a3 >= 0 )\n{\nif ( a3 == 37 )\n{\nresult = a1;\n++*(_DWORD *)(a1 + 688);\n}\nelse if ( a3 == 33 )\n{\nresult = a1;\n++*(_DWORD *)(a1 + 676);\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'opcode', 'a1': 'conn', 'a2': 'size'}"}
sl_bt_advertiser_configure
d641d4455ba968ec8cdc678803903e8adc4e0f690e4b42f19186ba657d295323
openthread
ot-efr32
NA
sl_status_t sl_bt_advertiser_configure(uint8_t advertising_set, uint32_t flags) { struct sl_bt_packet *cmd = (struct sl_bt_packet *)sl_bt_cmd_msg; struct sl_bt_packet *rsp = (struct sl_bt_packet *)sl_bt_rsp_msg; cmd->data.cmd_advertiser_configure.advertising_set=advertising_set; cmd->data.cmd_advertiser_configure.flags=flags; cmd->header=sl_bt_cmd_advertiser_configure_id+(((5)&0xff)<<8)+(((5)&0x700)>>8); sl_bt_host_handle_command(); return rsp->data.rsp_advertiser_configure.result; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4044A3", "function_addr": 4211875, "binary_name": "d641d4455ba968ec8cdc678803903e8adc4e0f690e4b42f19186ba657d295323.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov eax, edi"], [4, "mov [rbp+var_18], esi"], [5, "mov [rbp+var_14], al"], [6, "mov rax, cs:off_43E240"], [7, "mov [rbp+var_8], rax"], [8, "mov rax, cs:off_43E248"], [9, "mov [rbp+var_10], rax"], [10, "mov rax, [rbp+var_8]"], [11, "movzx edx, [rbp+var_14]"], [12, "mov [rax+4], dl"], [13, "mov rax, [rbp+var_8]"], [14, "mov edx, [rbp+var_18]"], [15, "mov [rax+5], edx"], [16, "mov rax, [rbp+var_8]"], [17, "mov dword ptr [rax], 12040520h"], [18, "mov eax, 0"], [19, "call sub_4038FE"], [20, "mov rax, [rbp+var_10]"], [21, "movzx eax, word ptr [rax+4]"], [22, "movzx eax, ax"], [23, "leave"], [24, "retn"]], "data_dep": [[5, 3], [7, 6], [9, 8], [10, 7], [11, 5], [12, 10], [12, 11], [13, 7], [14, 4], [15, 14], [15, 13], [16, 7], [17, 16], [20, 9], [21, 12], [21, 17], [21, 20], [22, 21], [24, 22]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d641d4455ba968ec8cdc678803903e8adc4e0f690e4b42f19186ba657d295323_d641d4455ba968ec8cdc678803903e8adc4e0f690e4b42f19186ba657d295323.jsonl.gz", "strip_func_name": "sub_4044A3", "query": "\n\n\n__int64 __fastcall sub_4044A3(__int64 a1, __int64 a2)\n{\nunsigned __int16 *v3; // [rsp+10h] [rbp-10h]\n_DWORD *v4; // [rsp+18h] [rbp-8h]\n\nv4 = off_43E240;\nv3 = (unsigned __int16 *)off_43E248;\n*((_BYTE *)off_43E240 + 4) = a1;\n*(_DWORD *)((char *)v4 + 5) = a2;\n*v4 = 302253344;\nsub_4038FE(a1, a2);\nreturn v3[2];\n}\n\n\n\nQ:[a1,a2,v3,v4,sub_4044A3,sub_4038FE,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'advertising_set', 'a2': 'flags', 'v3': 'rsp_0', 'v4': 'cmd', 'sub_4044A3': 'sl_bt_advertiser_configure', 'sub_4038FE': 'sl_bt_host_handle_command'}"}
pic16_write_panel
d5cac42be9875efcb6972b80950aacef186fc23bb0003aa70f675eb5be5bf40c
GBert
misc
NA
void pic16_write_panel(uint32_t region, uint32_t address, uint32_t *panel, uint32_t panel_size) { uint32_t h, l, i; uint16_t word; switch (pic16_map[pic16_index].datasheet) { case DS39687E: /* PIC18LF27J53 */ h = pic16_map[pic16_index].p9; /* minimum 1.2 or 3.5ms */ l = 0; break; default:h = pic16_map[pic16_index].p9; l = pic16_map[pic16_index].p10; break; } #if 0 pic16_write_enable(); /* BSF EECON1, WREN */ #endif pic16_set_table_pointer(address); for (i = 0; i < (panel_size - 2); i += 2) { word = (panel[i + 1] << 8) | panel[i]; pic16_table_write_post_increment_2(word); } word = (panel[i + 1] << 8) | panel[i]; pic16_table_write_start_programming(word); pic16_core_instruction_nopp(h, l); /* PANEL PROGRAM */ #if 0 pic16_write_disable(); /* BCF EECON1, WREN */ #endif }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_410BC4", "function_addr": 4262852, "binary_name": "d5cac42be9875efcb6972b80950aacef186fc23bb0003aa70f675eb5be5bf40c.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_18], esi"], [5, "mov [rbp+var_20], rdx"], [6, "mov [rbp+var_24], ecx"], [7, "mov eax, cs:dword_471360"], [8, "mov eax, eax"], [9, "imul rax, 22Ch"], [10, "add rax, 45972Ch"], [11, "mov eax, [rax]"], [12, "cmp eax, 9B07h"], [13, "jnz short loc_410C1A"], [14, "mov eax, cs:dword_471360"], [15, "mov eax, eax"], [16, "imul rax, 22Ch"], [17, "add rax, 459734h"], [18, "mov eax, [rax]"], [19, "mov [rbp+var_4], eax"], [20, "mov [rbp+var_8], 0"], [21, "jmp short loc_410C4F"], [22, "mov eax, cs:dword_471360"], [23, "mov eax, eax"], [24, "imul rax, 22Ch"], [25, "add rax, 459734h"], [26, "mov eax, [rax]"], [27, "mov [rbp+var_4], eax"], [28, "mov eax, cs:dword_471360"], [29, "mov eax, eax"], [30, "imul rax, 22Ch"], [31, "add rax, 45973Ch"], [32, "mov eax, [rax]"], [33, "mov [rbp+var_8], eax"], [34, "nop"], [35, "mov eax, [rbp+var_18]"], [36, "mov edi, eax"], [37, "call sub_40FDFF"], [38, "mov [rbp+var_C], 0"], [39, "jmp short loc_410CA9"], [40, "mov eax, [rbp+var_C]"], [41, "add eax, 1"], [42, "mov eax, eax"], [43, "lea rdx, ds:0[rax*4]"], [44, "mov rax, [rbp+var_20]"], [45, "add rax, rdx"], [46, "mov eax, [rax]"], [47, "shl eax, 8"], [48, "mov edx, eax"], [49, "mov eax, [rbp+var_C]"], [50, "lea rcx, ds:0[rax*4]"], [51, "mov rax, [rbp+var_20]"], [52, "add rax, rcx"], [53, "mov eax, [rax]"], [54, "or eax, edx"], [55, "mov [rbp+var_E], ax"], [56, "movzx eax, [rbp+var_E]"], [57, "mov edi, eax"], [58, "call sub_40FBD6"], [59, "add [rbp+var_C], 2"], [60, "mov eax, [rbp+var_24]"], [61, "sub eax, 2"], [62, "cmp [rbp+var_C], eax"], [63, "jb short loc_410C62"], [64, "mov eax, [rbp+var_C]"], [65, "add eax, 1"], [66, "mov eax, eax"], [67, "lea rdx, ds:0[rax*4]"], [68, "mov rax, [rbp+var_20]"], [69, "add rax, rdx"], [70, "mov eax, [rax]"], [71, "shl eax, 8"], [72, "mov edx, eax"], [73, "mov eax, [rbp+var_C]"], [74, "lea rcx, ds:0[rax*4]"], [75, "mov rax, [rbp+var_20]"], [76, "add rax, rcx"], [77, "mov eax, [rax]"], [78, "or eax, edx"], [79, "mov [rbp+var_E], ax"], [80, "movzx eax, [rbp+var_E]"], [81, "mov edi, eax"], [82, "call sub_40FC06"], [83, "mov edx, [rbp+var_8]"], [84, "mov eax, [rbp+var_4]"], [85, "mov esi, edx"], [86, "mov edi, eax"], [87, "call sub_40FAA5"], [88, "nop"], [89, "leave"], [90, "retn"]], "data_dep": [[8, 7], [9, 8], [10, 9], [11, 10], [12, 11], [13, 12], [15, 14], [16, 15], [17, 16], [18, 17], [19, 18], [23, 22], [24, 23], [25, 24], [26, 25], [27, 26], [29, 28], [30, 29], [31, 30], [32, 31], [33, 32], [35, 4], [36, 35], [40, 59], [40, 38], [41, 40], [42, 41], [43, 48], [44, 5], [45, 43], [45, 44], [46, 45], [47, 46], [48, 47], [49, 59], [49, 38], [50, 50], [51, 5], [52, 51], [52, 50], [53, 52], [54, 53], [54, 48], [55, 54], [56, 55], [57, 56], [59, 59], [59, 38], [60, 6], [61, 60], [62, 59], [62, 61], [62, 38], [63, 62], [64, 59], [64, 38], [65, 64], [66, 65], [67, 48], [68, 5], [69, 67], [69, 68], [70, 69], [71, 70], [72, 71], [73, 59], [73, 38], [74, 50], [75, 5], [76, 74], [76, 75], [77, 76], [78, 77], [78, 72], [79, 78], [80, 79], [81, 80], [83, 20], [83, 33], [84, 19], [84, 27], [85, 83], [86, 84], [90, 87]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d5cac42be9875efcb6972b80950aacef186fc23bb0003aa70f675eb5be5bf40c_d5cac42be9875efcb6972b80950aacef186fc23bb0003aa70f675eb5be5bf40c.jsonl.gz", "strip_func_name": "sub_410BC4", "query": "\n\n\n__int64 __fastcall sub_410BC4(__int64 a1, int a2, __int64 a3, int a4)\n{\nunsigned int i; // [rsp+24h] [rbp-Ch]\n__useconds_t v8; // [rsp+28h] [rbp-8h]\n__useconds_t v9; // [rsp+2Ch] [rbp-4h]\n\nv9 = *((_DWORD *)&unk_459734 + 139 * (unsigned int)dword_471360);\nif ( *((_DWORD *)&unk_45972C + 139 * (unsigned int)dword_471360) == 39687 )\nv8 = 0;\nelse\nv8 = dword_45973C[139 * dword_471360];\nsub_40FDFF(a2);\nfor ( i = 0; i < a4 - 2; i += 2 )\nsub_40FBD6((*(_WORD *)(4LL * (i + 1) + a3) << 8) | *(_WORD *)(4LL * i + a3));\nsub_40FC06((*(_WORD *)(4LL * (i + 1) + a3) << 8) | *(_WORD *)(4LL * i + a3));\nreturn sub_40FAA5(v9, v8);\n}\n\n\n\nQ:[a3,a4,a2,a1,v8,v9,sub_410BC4,sub_40FDFF,sub_40FBD6,sub_40FC06,sub_40FAA5,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'panel', 'a4': 'panel_size', 'a2': 'address', 'a1': 'region', 'v8': 'l', 'v9': 'h', 'sub_410BC4': 'pic16_write_panel', 'sub_40FDFF': 'pic16_set_table_pointer', 'sub_40FBD6': 'pic16_table_write_post_increment_2', 'sub_40FC06': 'pic16_table_write_start_programming', 'sub_40FAA5': 'pic16_core_instruction_nopp'}"}
movc_a_indir_a_pc
18ff9bd9c1637b628af63c86f48edfbee6b6b7371ac92f808a17f2cbb8eb4fe5
jarikomppa
emu8051
NA
static uint8_t movc_a_indir_a_pc(struct em8051 *aCPU) { uint16_t address = PC + 1 + ACC; ACC = CODEMEM(address); PC++; return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40651F", "function_addr": 4220191, "binary_name": "18ff9bd9c1637b628af63c86f48edfbee6b6b7371ac92f808a17f2cbb8eb4fe5.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov rax, [rbp+var_18]"], [4, "movzx edx, word ptr [rax+128h]"], [5, "mov rax, [rbp+var_18]"], [6, "movzx eax, byte ptr [rax+108h]"], [7, "movzx eax, al"], [8, "add eax, edx"], [9, "add eax, 1"], [10, "mov [rbp+var_2], ax"], [11, "mov rax, [rbp+var_18]"], [12, "mov rdx, [rax]"], [13, "mov rax, [rbp+var_18]"], [14, "movzx eax, word ptr [rax+8]"], [15, "and ax, [rbp+var_2]"], [16, "movzx eax, ax"], [17, "add rax, rdx"], [18, "movzx edx, byte ptr [rax]"], [19, "mov rax, [rbp+var_18]"], [20, "mov [rax+108h], dl"], [21, "mov rax, [rbp+var_18]"], [22, "movzx eax, word ptr [rax+128h]"], [23, "lea edx, [rax+1]"], [24, "mov rax, [rbp+var_18]"], [25, "mov [rax+128h], dx"], [26, "mov eax, 0"], [27, "pop rbp"], [28, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 2], [6, 5], [7, 6], [8, 4], [8, 7], [9, 8], [10, 9], [11, 2], [12, 11], [13, 2], [14, 13], [15, 14], [15, 10], [16, 15], [17, 12], [17, 16], [18, 17], [19, 2], [20, 19], [20, 18], [21, 2], [22, 20], [22, 21], [23, 22], [23, 18], [23, 20], [24, 2], [25, 23], [25, 24], [27, 0], [28, 26]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/18ff9bd9c1637b628af63c86f48edfbee6b6b7371ac92f808a17f2cbb8eb4fe5_18ff9bd9c1637b628af63c86f48edfbee6b6b7371ac92f808a17f2cbb8eb4fe5.jsonl.gz", "strip_func_name": "sub_40651F", "query": "\n\n\n__int64 __fastcall sub_40651F(__int64 a1)\n{\n*(_BYTE *)(a1 + 264) = *(_BYTE *)(*(_QWORD *)a1\n+ (unsigned __int16)((*(_WORD *)(a1 + 296) + *(unsigned __int8 *)(a1 + 264) + 1) & *(_WORD *)(a1 + 8)));\n++*(_WORD *)(a1 + 296);\nreturn 0LL;\n}\n\n\n\nQ:[a1,sub_40651F,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'aCPU', 'sub_40651F': 'movc_a_indir_a_pc'}"}