function_name
stringlengths
3
34
binary_name
stringlengths
64
64
author_name
stringlengths
2
36
project_name
stringlengths
2
48
opt
stringclasses
1 value
src
stringlengths
82
18.8k
dbg
stringclasses
1 value
codeart
stringlengths
461
87.8k
lmpa
stringlengths
492
9.74k
retrieved_index
sequencelengths
2
2
Com_Split
a91e99690f74daed4feb0b6d699a9687bf799c0a24e7161094cca3df1499a040
ec-
Quake3e
NA
int Com_Split( char *in, char **out, int outsz, int delim ) { int c; char **o = out, **end = out + outsz; // skip leading spaces if ( delim >= ' ' ) { while( (c = *in) != '\0' && c <= ' ' ) in++; } *out = in; out++; while( out < end ) { while( (c = *in) != '\0' && c != delim ) in++; *in = '\0'; if ( !c ) { // don't count last null value if ( out[-1][0] == '\0' ) out--; break; } in++; // skip leading spaces if ( delim >= ' ' ) { while( (c = *in) != '\0' && c <= ' ' ) in++; } *out = in; out++; } // sanitize last value while( (c = *in) != '\0' && c != delim ) in++; *in = '\0'; c = out - o; // set remaining out pointers while( out < end ) { *out = in; out++; } return c; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_44CC9D", "function_addr": 4508829, "binary_name": "a91e99690f74daed4feb0b6d699a9687bf799c0a24e7161094cca3df1499a040.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_28], rdi"], [3, "mov [rbp+var_30], rsi"], [4, "mov [rbp+var_34], edx"], [5, "mov [rbp+var_38], ecx"], [6, "mov rax, [rbp+var_30]"], [7, "mov [rbp+var_8], rax"], [8, "mov eax, [rbp+var_34]"], [9, "cdqe"], [10, "lea rdx, ds:0[rax*8]"], [11, "mov rax, [rbp+var_30]"], [12, "add rax, rdx"], [13, "mov [rbp+var_10], rax"], [14, "cmp [rbp+var_38], 1Fh"], [15, "jle short loc_44CCF5"], [16, "jmp short loc_44CCDC"], [17, "add [rbp+var_28], 1"], [18, "mov rax, [rbp+var_28]"], [19, "movzx eax, byte ptr [rax]"], [20, "movsx eax, al"], [21, "mov [rbp+var_14], eax"], [22, "cmp [rbp+var_14], 0"], [23, "jz short loc_44CCF5"], [24, "cmp [rbp+var_14], 20h "], [25, "jle short loc_44CCD7"], [26, "mov rax, [rbp+var_30]"], [27, "mov rdx, [rbp+var_28]"], [28, "mov [rax], rdx"], [29, "add [rbp+var_30], 8"], [30, "jmp loc_44CD8B"], [31, "add [rbp+var_28], 1"], [32, "mov rax, [rbp+var_28]"], [33, "movzx eax, byte ptr [rax]"], [34, "movsx eax, al"], [35, "mov [rbp+var_14], eax"], [36, "cmp [rbp+var_14], 0"], [37, "jz short loc_44CD2A"], [38, "mov eax, [rbp+var_14]"], [39, "cmp eax, [rbp+var_38]"], [40, "jnz short loc_44CD0A"], [41, "mov rax, [rbp+var_28]"], [42, "mov byte ptr [rax], 0"], [43, "cmp [rbp+var_14], 0"], [44, "jnz short loc_44CD50"], [45, "mov rax, [rbp+var_30]"], [46, "sub rax, 8"], [47, "mov rax, [rax]"], [48, "movzx eax, byte ptr [rax]"], [49, "test al, al"], [50, "jnz short loc_44CD9B"], [51, "sub [rbp+var_30], 8"], [52, "jmp short loc_44CD9B"], [53, "add [rbp+var_28], 1"], [54, "cmp [rbp+var_38], 1Fh"], [55, "jle short loc_44CD7B"], [56, "jmp short loc_44CD62"], [57, "add [rbp+var_28], 1"], [58, "mov rax, [rbp+var_28]"], [59, "movzx eax, byte ptr [rax]"], [60, "movsx eax, al"], [61, "mov [rbp+var_14], eax"], [62, "cmp [rbp+var_14], 0"], [63, "jz short loc_44CD7B"], [64, "cmp [rbp+var_14], 20h "], [65, "jle short loc_44CD5D"], [66, "mov rax, [rbp+var_30]"], [67, "mov rdx, [rbp+var_28]"], [68, "mov [rax], rdx"], [69, "add [rbp+var_30], 8"], [70, "mov rax, [rbp+var_30]"], [71, "cmp rax, [rbp+var_10]"], [72, "jb loc_44CD0F"], [73, "jmp short loc_44CDA3"], [74, "nop"], [75, "jmp short loc_44CDA3"], [76, "add [rbp+var_28], 1"], [77, "mov rax, [rbp+var_28]"], [78, "movzx eax, byte ptr [rax]"], [79, "movsx eax, al"], [80, "mov [rbp+var_14], eax"], [81, "cmp [rbp+var_14], 0"], [82, "jz short loc_44CDBE"], [83, "mov eax, [rbp+var_14]"], [84, "cmp eax, [rbp+var_38]"], [85, "jnz short loc_44CD9E"], [86, "mov rax, [rbp+var_28]"], [87, "mov byte ptr [rax], 0"], [88, "mov rax, [rbp+var_30]"], [89, "sub rax, [rbp+var_8]"], [90, "sar rax, 3"], [91, "mov [rbp+var_14], eax"], [92, "jmp short loc_44CDE6"], [93, "mov rax, [rbp+var_30]"], [94, "mov rdx, [rbp+var_28]"], [95, "mov [rax], rdx"], [96, "add [rbp+var_30], 8"], [97, "mov rax, [rbp+var_30]"], [98, "cmp rax, [rbp+var_10]"], [99, "jb short loc_44CDD6"], [100, "mov eax, [rbp+var_14]"], [101, "pop rbp"], [102, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 4], [11, 3], [12, 10], [12, 11], [13, 12], [14, 5], [15, 14], [17, 2], [17, 17], [18, 17], [18, 2], [19, 18], [20, 19], [21, 20], [22, 21], [23, 22], [24, 21], [25, 24], [26, 3], [27, 17], [27, 2], [28, 27], [28, 26], [29, 3], [31, 31], [31, 17], [31, 53], [31, 57], [31, 2], [32, 53], [32, 57], [32, 2], [32, 31], [32, 17], [33, 42], [33, 28], [33, 32], [33, 68], [34, 33], [35, 34], [36, 35], [37, 36], [38, 35], [39, 5], [39, 38], [40, 39], [41, 17], [41, 53], [41, 57], [41, 2], [41, 31], [42, 41], [43, 35], [44, 43], [45, 69], [45, 29], [46, 45], [47, 68], [47, 42], [47, 28], [47, 46], [48, 47], [48, 42], [48, 28], [48, 68], [49, 48], [50, 49], [51, 29], [51, 69], [53, 57], [53, 2], [53, 31], [53, 17], [53, 53], [54, 5], [55, 54], [57, 57], [57, 53], [58, 53], [58, 57], [59, 68], [59, 42], [59, 28], [59, 58], [60, 59], [61, 60], [62, 61], [63, 62], [64, 61], [65, 64], [66, 69], [66, 29], [67, 53], [67, 57], [68, 66], [68, 67], [69, 69], [69, 29], [70, 29], [70, 69], [71, 13], [71, 70], [72, 71], [76, 31], [76, 17], [76, 53], [76, 76], [76, 57], [76, 2], [77, 53], [77, 76], [77, 57], [77, 2], [77, 17], [77, 31], [78, 68], [78, 77], [78, 42], [78, 28], [79, 78], [80, 79], [81, 80], [82, 81], [83, 80], [84, 83], [84, 5], [85, 84], [86, 31], [86, 17], [86, 53], [86, 76], [86, 2], [86, 57], [87, 86], [88, 29], [88, 51], [88, 69], [89, 88], [89, 7], [90, 89], [91, 90], [93, 51], [93, 69], [93, 96], [93, 29], [94, 76], [94, 2], [94, 57], [94, 31], [94, 17], [94, 53], [95, 93], [95, 94], [96, 51], [96, 69], [96, 96], [96, 29], [97, 51], [97, 69], [97, 96], [97, 29], [98, 13], [98, 97], [99, 98], [100, 91], [101, 0], [102, 100]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/a91e99690f74daed4feb0b6d699a9687bf799c0a24e7161094cca3df1499a040_a91e99690f74daed4feb0b6d699a9687bf799c0a24e7161094cca3df1499a040.jsonl.gz", "strip_func_name": "sub_44CC9D", "query": "\n\n\n__int64 __fastcall sub_44CC9D(_BYTE *a1, _QWORD *a2, int a3, int a4)\n{\n_QWORD *i; // [rsp+8h] [rbp-30h]\nint v7; // [rsp+24h] [rbp-14h]\nunsigned int v8; // [rsp+24h] [rbp-14h]\n_QWORD *v9; // [rsp+28h] [rbp-10h]\n\nv9 = &a2[a3];\nif ( a4 > 31 )\n{\nwhile ( *a1 && (char)*a1 <= 32 )\n++a1;\n}\n*a2 = a1;\nfor ( i = a2 + 1; i < v9; ++i )\n{\nwhile ( 1 )\n{\nv7 = (char)*a1;\nif ( !*a1 || v7 == a4 )\nbreak;\n++a1;\n}\n*a1 = 0;\nif ( !v7 )\n{\nif ( !*(_BYTE *)*(i - 1) )\n--i;\nbreak;\n}\n++a1;\nif ( a4 > 31 )\n{\nwhile ( *a1 && (char)*a1 <= 32 )\n++a1;\n}\n*i = a1;\n}\nwhile ( *a1 && (char)*a1 != a4 )\n++a1;\n*a1 = 0;\nv8 = i - a2;\nwhile ( i < v9 )\n*i++ = a1;\nreturn v8;\n}\n\n\n\nQ:[a3,a4,a1,a2,i,v8,v9,sub_44CC9D,]", "hints": "[]", "response": "{'a3': 'outsz', 'a4': 'delim', 'a1': 'in', 'a2': 'out', 'i': 'outa', 'v8': 'ca', 'v9': 'end', 'sub_44CC9D': 'Com_Split'}"}
[ [ 0.7821769714355469, 0.7697263360023499, 0.7508494257926941, 0.7371301651000977, 0.7347657680511475, 0.7322216033935547, 0.7308284044265747, 0.7306849360466003, 0.7263699173927307, 0.7222939133644104, 0.7216148376464844, 0.7201620936393738, 0.720040500164032, 0.7195831537246704, 0.7165669202804565, 0.7145337462425232, 0.7083643078804016, 0.7041599750518799, 0.7031525373458862, 0.701141893863678 ], [ 15454, 192990, 183472, 222469, 261737, 164419, 152598, 247954, 191915, 5249, 229816, 247105, 177481, 4116, 154053, 205511, 246817, 109616, 37971, 174123 ] ]
daemon_become_user
dbef1d827ccd2a42e8941d50152f102df28295732bfb69acb1ef6314d264873b
lavabit
pahoehoe
NA
int daemon_become_user(uid_t uid, gid_t gid, char *user) { gid_t gids[10]; int g = 0; if (setgroups(0, NULL) == -1 || (g = getgroups(0, NULL)) != 0) { /* FreeBSD always returns the primary group */ if (g != 1 || getgroups(10, gids) != 1 || gids[0] != getgid()) return -1; } if (setgid(gid) == -1 || getgid() != gid || getegid() != gid) return -1; if (user && initgroups(user, gid) == -1) return -1; if (setuid(uid) == -1 || getuid() != uid || geteuid() != uid) return -1; return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40BD4F", "function_addr": 4242767, "binary_name": "dbef1d827ccd2a42e8941d50152f102df28295732bfb69acb1ef6314d264873b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 48h"], [4, "mov [rbp+uid], edi"], [5, "mov [rbp+gid], esi"], [6, "mov [rbp+user], rdx"], [7, "mov [rbp+var_14], 0"], [8, "mov esi, 0"], [9, "mov edi, 0"], [10, "call _setgroups"], [11, "cmp eax, 0FFFFFFFFh"], [12, "jz short loc_40BD95"], [13, "mov esi, 0"], [14, "mov edi, 0"], [15, "call _getgroups"], [16, "mov [rbp+var_14], eax"], [17, "cmp [rbp+var_14], 0"], [18, "jz short loc_40BDC4"], [19, "cmp [rbp+var_14], 1"], [20, "jnz short loc_40BDBD"], [21, "lea rax, [rbp+list]"], [22, "mov rsi, rax"], [23, "mov edi, 0Ah"], [24, "call _getgroups"], [25, "cmp eax, 1"], [26, "jnz short loc_40BDBD"], [27, "mov ebx, [rbp+list]"], [28, "call _getgid"], [29, "cmp ebx, eax"], [30, "jz short loc_40BDC4"], [31, "mov eax, 0FFFFFFFFh"], [32, "jmp short loc_40BE41"], [33, "mov eax, [rbp+gid]"], [34, "mov edi, eax"], [35, "call _setgid"], [36, "cmp eax, 0FFFFFFFFh"], [37, "jz short loc_40BDE7"], [38, "call _getgid"], [39, "cmp [rbp+gid], eax"], [40, "jnz short loc_40BDE7"], [41, "call _getegid"], [42, "cmp [rbp+gid], eax"], [43, "jz short loc_40BDEE"], [44, "mov eax, 0FFFFFFFFh"], [45, "jmp short loc_40BE41"], [46, "cmp [rbp+user], 0"], [47, "jz short loc_40BE12"], [48, "mov edx, [rbp+gid]"], [49, "mov rax, [rbp+user]"], [50, "mov esi, edx"], [51, "mov rdi, rax"], [52, "call _initgroups"], [53, "cmp eax, 0FFFFFFFFh"], [54, "jnz short loc_40BE12"], [55, "mov eax, 0FFFFFFFFh"], [56, "jmp short loc_40BE41"], [57, "mov eax, [rbp+uid]"], [58, "mov edi, eax"], [59, "call _setuid"], [60, "cmp eax, 0FFFFFFFFh"], [61, "jz short loc_40BE35"], [62, "call _getuid"], [63, "cmp [rbp+uid], eax"], [64, "jnz short loc_40BE35"], [65, "call _geteuid"], [66, "cmp [rbp+uid], eax"], [67, "jz short loc_40BE3C"], [68, "mov eax, 0FFFFFFFFh"], [69, "jmp short loc_40BE41"], [70, "mov eax, 0"], [71, "mov rbx, [rbp+var_8]"], [72, "leave"], [73, "retn"]], "data_dep": [[11, 10], [12, 11], [16, 15], [17, 16], [18, 17], [19, 7], [19, 16], [20, 19], [21, 10], [21, 15], [22, 21], [25, 24], [26, 25], [29, 28], [29, 27], [30, 29], [33, 5], [34, 33], [36, 35], [37, 36], [39, 5], [39, 38], [40, 39], [42, 5], [42, 41], [43, 42], [46, 6], [47, 46], [48, 5], [49, 6], [50, 48], [51, 49], [53, 52], [54, 53], [57, 4], [58, 57], [60, 59], [61, 60], [63, 62], [63, 4], [64, 63], [66, 4], [66, 65], [67, 66], [73, 44], [73, 68], [73, 31], [73, 55], [73, 70]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/dbef1d827ccd2a42e8941d50152f102df28295732bfb69acb1ef6314d264873b_dbef1d827ccd2a42e8941d50152f102df28295732bfb69acb1ef6314d264873b.jsonl.gz", "strip_func_name": "sub_40BD4F", "query": "\n\n\n__int64 __fastcall sub_40BD4F(__uid_t a1, __gid_t a2, const char *a3)\n{\n__gid_t v3; // ebx\n__gid_t list[11]; // [rsp+10h] [rbp-40h] BYREF\nint v7; // [rsp+3Ch] [rbp-14h]\n\nv7 = 0;\nif ( setgroups(0LL, 0LL) == -1 || (v7 = getgroups(0, 0LL)) != 0 )\n{\nif ( v7 != 1 )\nreturn 0xFFFFFFFFLL;\nif ( getgroups(10, list) != 1 )\nreturn 0xFFFFFFFFLL;\nv3 = list[0];\nif ( v3 != getgid() )\nreturn 0xFFFFFFFFLL;\n}\nif ( setgid(a2) == -1 || a2 != getgid() || a2 != getegid() )\nreturn 0xFFFFFFFFLL;\nif ( a3 && initgroups(a3, a2) == -1 )\nreturn 0xFFFFFFFFLL;\nif ( setuid(a1) != -1 && a1 == getuid() && a1 == geteuid() )\nreturn 0LL;\nreturn 0xFFFFFFFFLL;\n}\n\n\n\nQ:[a3,a1,a2,list,v7,sub_40BD4F,]", "hints": "[]", "response": "{'a3': 'user', 'a1': 'uid', 'a2': 'gid', 'list': 'gids', 'v7': 'g', 'sub_40BD4F': 'daemon_become_user'}"}
[ [ 0.8081554174423218, 0.74168461561203, 0.7378800511360168, 0.7223405838012695, 0.7161120176315308, 0.7115368843078613, 0.7060268521308899, 0.7014806270599365, 0.6987000703811646, 0.6899269223213196, 0.6886429190635681, 0.6878359317779541, 0.6852832436561584, 0.683656632900238, 0.6813281774520874, 0.681115984916687, 0.6775389909744263, 0.6764529347419739, 0.6658076047897339, 0.6644375920295715 ], [ 47933, 211328, 97275, 188323, 45365, 247884, 98576, 228339, 40243, 128091, 81997, 214204, 30191, 249365, 31022, 196964, 49263, 78522, 17736, 161206 ] ]
thread_stats_snaps
ea3bd53d96d062503f598c950b2c1cf5a92a7d52c2415be8506bc4bcf620e6a9
google
neper
NA
int thread_stats_snaps(const struct thread *ts) { const struct options *opts = ts[0].opts; int i, sum = 0; for (i = 0; i < opts->num_threads; i++) { struct neper_stats *stats = ts[i].stats; sum += stats->sumforeach(stats, fn_count_snaps, NULL); } return sum; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4114A8", "function_addr": 4265128, "binary_name": "ea3bd53d96d062503f598c950b2c1cf5a92a7d52c2415be8506bc4bcf620e6a9.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_28], rdi"], [4, "mov rax, [rbp+var_28]"], [5, "mov rax, [rax+38h]"], [6, "mov [rbp+var_10], rax"], [7, "mov [rbp+var_8], 0"], [8, "mov [rbp+var_4], 0"], [9, "jmp short loc_411510"], [10, "mov eax, [rbp+var_4]"], [11, "cdqe"], [12, "imul rdx, rax, 118h"], [13, "mov rax, [rbp+var_28]"], [14, "add rax, rdx"], [15, "mov rax, [rax+0B0h]"], [16, "mov [rbp+var_18], rax"], [17, "mov rax, [rbp+var_18]"], [18, "mov rcx, [rax+18h]"], [19, "mov rax, [rbp+var_18]"], [20, "mov edx, 0"], [21, "mov esi, offset sub_411027"], [22, "mov rdi, rax"], [23, "call rcx"], [24, "add [rbp+var_8], eax"], [25, "add [rbp+var_4], 1"], [26, "mov rax, [rbp+var_10]"], [27, "mov eax, [rax+0Ch]"], [28, "cmp [rbp+var_4], eax"], [29, "jl short loc_4114D0"], [30, "mov eax, [rbp+var_8]"], [31, "leave"], [32, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [10, 8], [10, 25], [12, 10], [12, 20], [13, 3], [14, 13], [14, 12], [15, 14], [16, 15], [17, 16], [18, 17], [19, 16], [22, 19], [23, 18], [24, 23], [24, 7], [24, 24], [25, 25], [25, 8], [26, 6], [27, 26], [28, 27], [28, 8], [28, 25], [29, 28], [30, 24], [30, 7], [32, 30]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/ea3bd53d96d062503f598c950b2c1cf5a92a7d52c2415be8506bc4bcf620e6a9_ea3bd53d96d062503f598c950b2c1cf5a92a7d52c2415be8506bc4bcf620e6a9.jsonl.gz", "strip_func_name": "sub_4114A8", "query": "\n\n\n__int64 __fastcall sub_4114A8(__int64 a1)\n{\n__int64 v2; // [rsp+20h] [rbp-10h]\nunsigned int v3; // [rsp+28h] [rbp-8h]\nint i; // [rsp+2Ch] [rbp-4h]\n\nv2 = *(_QWORD *)(a1 + 56);\nv3 = 0;\nfor ( i = 0; i < *(_DWORD *)(v2 + 12); ++i )\nv3 += (*(__int64 (__fastcall **)(_QWORD, __int64 (__fastcall *)(__int64), _QWORD))(*(_QWORD *)(280LL * i + a1 + 176)\n+ 24LL))(\n*(_QWORD *)(280LL * i + a1 + 176),\nsub_411027,\n0LL);\nreturn v3;\n}\n\n\n\nQ:[a1,v2,v3,sub_4114A8,sub_411027,]", "hints": "[]", "response": "{'a1': 'ts', 'v2': 'opts', 'v3': 'sum', 'sub_4114A8': 'thread_stats_snaps', 'sub_411027': 'fn_count_snaps'}"}
[ [ 0.7801344394683838, 0.7570284605026245, 0.7535367012023926, 0.7492835521697998, 0.738116443157196, 0.7297706604003906, 0.7214126586914062, 0.7115082740783691, 0.709033191204071, 0.7085567116737366, 0.707103967666626, 0.7070168256759644, 0.7057161331176758, 0.7056682109832764, 0.7037307024002075, 0.7030557990074158, 0.7027592658996582, 0.6982262134552002, 0.6961154937744141, 0.693078875541687 ], [ 39524, 209766, 130231, 258396, 163446, 257453, 153858, 197824, 55180, 24103, 241260, 124256, 225824, 193484, 197742, 211481, 65126, 50498, 26974, 81548 ] ]
buttonhandler
8b1130ee0939dac98152d1fa1b8fcfa5ea543e1fde6dc5036a88d4d31fee4cd6
LukeSmithxyz
dwmblocks
NA
void buttonhandler(int ssi_int) { char button[2] = {'0' + ssi_int & 0xff, '\0'}; pid_t process_id = getpid(); int sig = ssi_int >> 8; if (fork() == 0) { const Block *current; for (int i = 0; i < LENGTH(blocks); i++) { current = blocks + i; if (current->signal == sig) break; } char shcmd[1024]; sprintf(shcmd,"%s && kill -%d %d",current->command, current->signal+34,process_id); char *command[] = { "/bin/sh", "-c", shcmd, NULL }; setenv("BLOCK_BUTTON", button, 1); setsid(); execvp(command[0], command); exit(EXIT_SUCCESS); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401A6F", "function_addr": 4201071, "binary_name": "8b1130ee0939dac98152d1fa1b8fcfa5ea543e1fde6dc5036a88d4d31fee4cd6.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 460h"], [3, "mov [rbp+var_444], edi"], [4, "mov [rbp+var_450], rsi"], [5, "mov [rbp+var_458], rdx"], [6, "mov rax, [rbp+var_450]"], [7, "mov eax, [rax+18h]"], [8, "add eax, 30h "], [9, "mov [rbp+value], al"], [10, "mov [rbp+var_11], 0"], [11, "call _getpid"], [12, "mov [rbp+var_10], eax"], [13, "mov rax, [rbp+var_450]"], [14, "mov eax, [rax+18h]"], [15, "sar eax, 8"], [16, "mov [rbp+var_444], eax"], [17, "call _fork"], [18, "test eax, eax"], [19, "jnz loc_401BAE"], [20, "mov [rbp+var_C], 0"], [21, "jmp short loc_401B05"], [22, "mov eax, [rbp+var_C]"], [23, "movsxd rdx, eax"], [24, "mov rax, rdx"], [25, "add rax, rax"], [26, "add rax, rdx"], [27, "shl rax, 3"], [28, "add rax, 4020E0h"], [29, "mov [rbp+var_8], rax"], [30, "mov rax, [rbp+var_8]"], [31, "mov edx, [rax+14h]"], [32, "mov eax, [rbp+var_444]"], [33, "cmp edx, eax"], [34, "jz short loc_401B0F"], [35, "add [rbp+var_C], 1"], [36, "mov eax, [rbp+var_C]"], [37, "cmp eax, 0Dh"], [38, "jbe short loc_401AD3"], [39, "jmp short loc_401B10"], [40, "nop"], [41, "mov rax, [rbp+var_8]"], [42, "mov eax, [rax+14h]"], [43, "lea ecx, [rax+22h]"], [44, "mov rax, [rbp+var_8]"], [45, "mov rdx, [rax+8]"], [46, "mov esi, [rbp+var_10]"], [47, "lea rax, [rbp+s]"], [48, "mov r8d, esi"], [49, "mov esi, offset format"], [50, "mov rdi, rax"], [51, "mov eax, 0"], [52, "call _sprintf"], [53, "mov [rbp+file], offset aBinSh"], [54, "mov [rbp+var_438], offset aC"], [55, "lea rax, [rbp+s]"], [56, "mov [rbp+var_430], rax"], [57, "mov [rbp+var_428], 0"], [58, "lea rax, [rbp+value]"], [59, "mov edx, 1"], [60, "mov rsi, rax"], [61, "mov edi, offset name"], [62, "call _setenv"], [63, "call _setsid"], [64, "mov rax, [rbp+file]"], [65, "lea rdx, [rbp+file]"], [66, "mov rsi, rdx"], [67, "mov rdi, rax"], [68, "call _execvp"], [69, "mov edi, 0"], [70, "call _exit"], [71, "nop"], [72, "leave"], [73, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 7], [9, 8], [12, 11], [13, 4], [14, 13], [15, 14], [16, 15], [18, 17], [19, 18], [22, 20], [22, 35], [23, 22], [24, 23], [25, 24], [26, 23], [26, 25], [27, 26], [28, 27], [29, 28], [30, 29], [31, 30], [32, 16], [33, 32], [33, 31], [34, 33], [35, 20], [35, 35], [36, 20], [36, 35], [37, 36], [38, 37], [41, 29], [42, 41], [43, 42], [44, 29], [45, 44], [46, 12], [47, 44], [48, 46], [50, 47], [55, 52], [56, 55], [58, 55], [58, 9], [60, 58], [64, 53], [65, 53], [65, 59], [66, 65], [67, 64], [73, 18]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/8b1130ee0939dac98152d1fa1b8fcfa5ea543e1fde6dc5036a88d4d31fee4cd6_8b1130ee0939dac98152d1fa1b8fcfa5ea543e1fde6dc5036a88d4d31fee4cd6.jsonl.gz", "strip_func_name": "sub_401A6F", "query": "\n\n\n__pid_t __fastcall sub_401A6F(__int64 a1, __int64 a2)\n{\n__pid_t result; // eax\nint v3; // [rsp+1Ch] [rbp-444h]\nchar *file[4]; // [rsp+20h] [rbp-440h] BYREF\nchar s[1038]; // [rsp+40h] [rbp-420h] BYREF\nchar value[2]; // [rsp+44Eh] [rbp-12h] BYREF\nunsigned int v7; // [rsp+450h] [rbp-10h]\nunsigned int i; // [rsp+454h] [rbp-Ch]\n__int64 v9; // [rsp+458h] [rbp-8h]\n\nvalue[0] = *(_DWORD *)(a2 + 24) + 48;\nvalue[1] = 0;\nv7 = getpid();\nv3 = *(int *)(a2 + 24) >> 8;\nresult = fork();\nif ( !result )\n{\nfor ( i = 0; i <= 0xD; ++i )\n{\nv9 = 24LL * (int)i + 4202720;\nif ( dword_4020F0[6 * i + 1] == v3 )\nbreak;\n}\nsprintf(s, \"%s && kill -%d %d\", *(const char **)(v9 + 8), (unsigned int)(*(_DWORD *)(v9 + 20) + 34), v7);\nfile[0] = \"/bin/sh\";\nfile[1] = \"-c\";\nfile[2] = s;\nfile[3] = 0LL;\nsetenv(\"BLOCK_BUTTON\", value, 1);\nsetsid();\nexecvp(\"/bin/sh\", file);\nexit(0);\n}\nreturn result;\n}\n\n\n\nQ:[a2,a1,v3,file,s,value,v7,v9,sub_401A6F,]", "hints": "[]", "response": "{'a2': 'si_0', 'a1': 'sig', 'v3': 'siga', 'file': 'command', 's': 'shcmd', 'value': 'button', 'v7': 'process_id', 'v9': 'current', 'sub_401A6F': 'buttonhandler'}"}
[ [ 0.6786164045333862, 0.6335870623588562, 0.6227225065231323, 0.621193528175354, 0.6210581660270691, 0.6188740730285645, 0.6138507127761841, 0.6114310622215271, 0.6079691648483276, 0.606631338596344, 0.6052391529083252, 0.6050410866737366, 0.6014776825904846, 0.6014006733894348, 0.6010600924491882, 0.599226713180542, 0.597183108329773, 0.5967663526535034, 0.5967015027999878, 0.591608464717865 ], [ 252561, 126451, 238362, 199824, 178009, 228236, 15435, 43679, 251176, 171131, 140092, 214020, 234764, 57354, 19965, 197384, 257837, 52530, 77157, 258824 ] ]
COVER_ctx_init
ee208a6ed50259baee428582c0e47411453ebb9a1aa50af4f01342f27fc4d28c
dimkr
szl
NA
static int COVER_ctx_init(COVER_ctx_t *ctx, const void *samplesBuffer, const size_t *samplesSizes, unsigned nbSamples, unsigned d) { const BYTE *const samples = (const BYTE *)samplesBuffer; const size_t totalSamplesSize = COVER_sum(samplesSizes, nbSamples); /* Checks */ if (totalSamplesSize < d || totalSamplesSize >= (size_t)COVER_MAX_SAMPLES_SIZE) { DISPLAYLEVEL(1, "Total samples size is too large, maximum size is %u MB\n", (COVER_MAX_SAMPLES_SIZE >> 20)); return 0; } /* Zero the context */ memset(ctx, 0, sizeof(*ctx)); DISPLAYLEVEL(2, "Training on %u samples of total size %u\n", nbSamples, (U32)totalSamplesSize); ctx->samples = samples; ctx->samplesSizes = samplesSizes; ctx->nbSamples = nbSamples; /* Partial suffix array */ ctx->suffixSize = totalSamplesSize - d + 1; ctx->suffix = (U32 *)malloc(ctx->suffixSize * sizeof(U32)); /* Maps index to the dmerID */ ctx->dmerAt = (U32 *)malloc(ctx->suffixSize * sizeof(U32)); /* The offsets of each file */ ctx->offsets = (size_t *)malloc((nbSamples + 1) * sizeof(size_t)); if (!ctx->suffix || !ctx->dmerAt || !ctx->offsets) { DISPLAYLEVEL(1, "Failed to allocate scratch buffers\n"); COVER_ctx_destroy(ctx); return 0; } ctx->freqs = NULL; ctx->d = d; /* Fill offsets from the samlesSizes */ { U32 i; ctx->offsets[0] = 0; for (i = 1; i <= nbSamples; ++i) { ctx->offsets[i] = ctx->offsets[i - 1] + samplesSizes[i - 1]; } } DISPLAYLEVEL(2, "Constructing partial suffix array\n"); { /* suffix is a partial suffix array. * It only sorts suffixes by their first parameters.d bytes. * The sort is stable, so each dmer group is sorted by position in input. */ U32 i; for (i = 0; i < ctx->suffixSize; ++i) { ctx->suffix[i] = i; } /* qsort doesn't take an opaque pointer, so pass as a global */ g_ctx = ctx; qsort(ctx->suffix, ctx->suffixSize, sizeof(U32), &COVER_strict_cmp); } DISPLAYLEVEL(2, "Computing frequencies\n"); /* For each dmer group (group of positions with the same first d bytes): * 1. For each position we set dmerAt[position] = dmerID. The dmerID is * (groupBeginPtr - suffix). This allows us to go from position to * dmerID so we can look up values in freq. * 2. We calculate how many samples the dmer occurs in and save it in * freqs[dmerId]. */ COVER_groupBy(ctx->suffix, ctx->suffixSize, sizeof(U32), ctx, &COVER_cmp, &COVER_group); ctx->freqs = ctx->suffix; ctx->suffix = NULL; return 1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4803BD", "function_addr": 4719549, "binary_name": "ee208a6ed50259baee428582c0e47411453ebb9a1aa50af4f01342f27fc4d28c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+s], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_38], rdx"], [6, "mov [rbp+var_3C], ecx"], [7, "mov [rbp+var_40], r8d"], [8, "mov rax, [rbp+var_30]"], [9, "mov [rbp+var_10], rax"], [10, "mov edx, [rbp+var_3C]"], [11, "mov rax, [rbp+var_38]"], [12, "mov esi, edx"], [13, "mov rdi, rax"], [14, "call sub_47FC99"], [15, "mov [rbp+var_18], rax"], [16, "mov eax, [rbp+var_40]"], [17, "cmp [rbp+var_18], rax"], [18, "jb short loc_480409"], [19, "mov eax, 0FFFFFFFEh"], [20, "cmp [rbp+var_18], rax"], [21, "jbe short loc_48044A"], [22, "mov eax, cs:dword_4A73B8"], [23, "test eax, eax"], [24, "jle short loc_480440"], [25, "mov rax, cs:stderr"], [26, "mov edx, 0FFFh"], [27, "mov esi, offset aTotalSamplesSi"], [28, "mov rdi, rax"], [29, "mov eax, 0"], [30, "call _fprintf"], [31, "mov rax, cs:stderr"], [32, "mov rdi, rax"], [33, "call _fflush"], [34, "mov eax, 0"], [35, "jmp locret_48074D"], [36, "mov rax, [rbp+s]"], [37, "mov edx, 48h "], [38, "mov esi, 0"], [39, "mov rdi, rax"], [40, "call _memset"], [41, "mov eax, cs:dword_4A73B8"], [42, "cmp eax, 1"], [43, "jle short loc_48049C"], [44, "mov rax, [rbp+var_18]"], [45, "mov ecx, eax"], [46, "mov rax, cs:stderr"], [47, "mov edx, [rbp+var_3C]"], [48, "mov esi, offset aTrainingOnUSam"], [49, "mov rdi, rax"], [50, "mov eax, 0"], [51, "call _fprintf"], [52, "mov rax, cs:stderr"], [53, "mov rdi, rax"], [54, "call _fflush"], [55, "mov rax, [rbp+s]"], [56, "mov rdx, [rbp+var_10]"], [57, "mov [rax], rdx"], [58, "mov rax, [rbp+s]"], [59, "mov rdx, [rbp+var_38]"], [60, "mov [rax+10h], rdx"], [61, "mov edx, [rbp+var_3C]"], [62, "mov rax, [rbp+s]"], [63, "mov [rax+18h], rdx"], [64, "mov edx, [rbp+var_40]"], [65, "mov rax, [rbp+var_18]"], [66, "sub rax, rdx"], [67, "lea rdx, [rax+1]"], [68, "mov rax, [rbp+s]"], [69, "mov [rax+28h], rdx"], [70, "mov rax, [rbp+s]"], [71, "mov rax, [rax+28h]"], [72, "shl rax, 2"], [73, "mov rdi, rax"], [74, "call _malloc"], [75, "mov rdx, rax"], [76, "mov rax, [rbp+s]"], [77, "mov [rax+20h], rdx"], [78, "mov rax, [rbp+s]"], [79, "mov rax, [rax+28h]"], [80, "shl rax, 2"], [81, "mov rdi, rax"], [82, "call _malloc"], [83, "mov rdx, rax"], [84, "mov rax, [rbp+s]"], [85, "mov [rax+38h], rdx"], [86, "mov eax, [rbp+var_3C]"], [87, "add eax, 1"], [88, "mov eax, eax"], [89, "shl rax, 3"], [90, "mov rdi, rax"], [91, "call _malloc"], [92, "mov rdx, rax"], [93, "mov rax, [rbp+s]"], [94, "mov [rax+8], rdx"], [95, "mov rax, [rbp+s]"], [96, "mov rax, [rax+20h]"], [97, "test rax, rax"], [98, "jz short loc_480558"], [99, "mov rax, [rbp+s]"], [100, "mov rax, [rax+38h]"], [101, "test rax, rax"], [102, "jz short loc_480558"], [103, "mov rax, [rbp+s]"], [104, "mov rax, [rax+8]"], [105, "test rax, rax"], [106, "jnz short loc_4805A5"], [107, "mov eax, cs:dword_4A73B8"], [108, "test eax, eax"], [109, "jle short loc_48058F"], [110, "mov rax, cs:stderr"], [111, "mov rcx, rax"], [112, "mov edx, 23h "], [113, "mov esi, 1"], [114, "mov edi, offset aFailedToAlloca"], [115, "call _fwrite"], [116, "mov rax, cs:stderr"], [117, "mov rdi, rax"], [118, "call _fflush"], [119, "mov rax, [rbp+s]"], [120, "mov rdi, rax"], [121, "call sub_4802FD"], [122, "mov eax, 0"], [123, "jmp locret_48074D"], [124, "mov rax, [rbp+s]"], [125, "mov qword ptr [rax+30h], 0"], [126, "mov rax, [rbp+s]"], [127, "mov edx, [rbp+var_40]"], [128, "mov [rax+40h], edx"], [129, "mov rax, [rbp+s]"], [130, "mov rax, [rax+8]"], [131, "mov qword ptr [rax], 0"], [132, "mov [rbp+var_4], 1"], [133, "jmp short loc_480623"], [134, "mov rax, [rbp+s]"], [135, "mov rdx, [rax+8]"], [136, "mov eax, [rbp+var_4]"], [137, "sub eax, 1"], [138, "mov eax, eax"], [139, "shl rax, 3"], [140, "add rax, rdx"], [141, "mov rcx, [rax]"], [142, "mov eax, [rbp+var_4]"], [143, "sub eax, 1"], [144, "mov eax, eax"], [145, "lea rdx, ds:0[rax*8]"], [146, "mov rax, [rbp+var_38]"], [147, "add rax, rdx"], [148, "mov rdx, [rax]"], [149, "mov rax, [rbp+s]"], [150, "mov rsi, [rax+8]"], [151, "mov eax, [rbp+var_4]"], [152, "shl rax, 3"], [153, "add rax, rsi"], [154, "add rdx, rcx"], [155, "mov [rax], rdx"], [156, "add [rbp+var_4], 1"], [157, "mov eax, [rbp+var_4]"], [158, "cmp eax, [rbp+var_3C]"], [159, "jbe short loc_4805D3"], [160, "mov eax, cs:dword_4A73B8"], [161, "cmp eax, 1"], [162, "jle short loc_480663"], [163, "mov rax, cs:stderr"], [164, "mov rcx, rax"], [165, "mov edx, 22h "], [166, "mov esi, 1"], [167, "mov edi, offset aConstructingPa"], [168, "call _fwrite"], [169, "mov rax, cs:stderr"], [170, "mov rdi, rax"], [171, "call _fflush"], [172, "mov [rbp+var_8], 0"], [173, "jmp short loc_480687"], [174, "mov rax, [rbp+s]"], [175, "mov rdx, [rax+20h]"], [176, "mov eax, [rbp+var_8]"], [177, "shl rax, 2"], [178, "add rdx, rax"], [179, "mov eax, [rbp+var_8]"], [180, "mov [rdx], eax"], [181, "add [rbp+var_8], 1"], [182, "mov edx, [rbp+var_8]"], [183, "mov rax, [rbp+s]"], [184, "mov rax, [rax+28h]"], [185, "cmp rdx, rax"], [186, "jb short loc_48066C"], [187, "mov rax, [rbp+s]"], [188, "mov cs:qword_4A7438, rax"], [189, "mov rax, [rbp+s]"], [190, "mov rsi, [rax+28h]"], [191, "mov rax, [rbp+s]"], [192, "mov rax, [rax+20h]"], [193, "mov ecx, offset compar"], [194, "mov edx, 4"], [195, "mov rdi, rax"], [196, "call _qsort"], [197, "mov eax, cs:dword_4A73B8"], [198, "cmp eax, 1"], [199, "jle short loc_4806FC"], [200, "mov rax, cs:stderr"], [201, "mov rcx, rax"], [202, "mov edx, 16h"], [203, "mov esi, 1"], [204, "mov edi, offset aComputingFrequ"], [205, "call _fwrite"], [206, "mov rax, cs:stderr"], [207, "mov rdi, rax"], [208, "call _fflush"], [209, "mov rax, [rbp+s]"], [210, "mov rsi, [rax+28h]"], [211, "mov rax, [rbp+s]"], [212, "mov rax, [rax+20h]"], [213, "mov rdx, [rbp+s]"], [214, "mov r9d, offset sub_47FEB8"], [215, "mov r8d, offset sub_47FCE4"], [216, "mov rcx, rdx"], [217, "mov edx, 4"], [218, "mov rdi, rax"], [219, "call sub_47FE0D"], [220, "mov rax, [rbp+s]"], [221, "mov rdx, [rax+20h]"], [222, "mov rax, [rbp+s]"], [223, "mov [rax+30h], rdx"], [224, "mov rax, [rbp+s]"], [225, "mov qword ptr [rax+20h], 0"], [226, "mov eax, 1"], [227, "leave"], [228, "retn"]], "data_dep": [[8, 4], [9, 8], [10, 6], [11, 5], [12, 10], [13, 11], [15, 14], [16, 7], [17, 15], [17, 16], [18, 17], [20, 15], [20, 19], [21, 20], [23, 22], [24, 23], [28, 25], [32, 31], [36, 3], [39, 36], [42, 41], [43, 42], [44, 15], [45, 44], [47, 6], [49, 46], [53, 52], [55, 3], [56, 9], [57, 55], [57, 56], [58, 3], [59, 5], [60, 59], [60, 58], [61, 6], [62, 3], [63, 61], [63, 62], [64, 7], [65, 15], [66, 65], [66, 64], [67, 63], [67, 66], [67, 64], [68, 3], [69, 67], [69, 68], [70, 3], [71, 69], [71, 70], [72, 71], [73, 72], [75, 74], [76, 3], [77, 76], [77, 75], [78, 3], [79, 69], [79, 78], [79, 77], [80, 79], [81, 80], [83, 82], [84, 3], [85, 84], [85, 83], [86, 6], [87, 86], [88, 87], [89, 88], [90, 89], [92, 91], [93, 3], [94, 93], [94, 92], [95, 3], [96, 95], [96, 94], [96, 77], [97, 96], [98, 97], [99, 3], [100, 69], [100, 77], [100, 63], [100, 99], [100, 85], [100, 94], [100, 57], [100, 60], [101, 100], [102, 101], [103, 3], [104, 57], [104, 60], [104, 69], [104, 77], [104, 63], [104, 85], [104, 94], [104, 103], [105, 104], [106, 105], [108, 107], [109, 108], [111, 110], [117, 116], [119, 3], [120, 119], [124, 3], [125, 124], [126, 3], [127, 7], [128, 127], [128, 126], [129, 3], [130, 128], [130, 94], [130, 129], [131, 130], [134, 3], [135, 57], [135, 128], [135, 155], [135, 131], [135, 85], [135, 94], [135, 60], [135, 69], [135, 125], [135, 134], [135, 77], [135, 63], [136, 156], [136, 132], [137, 136], [138, 137], [139, 138], [140, 135], [140, 139], [141, 128], [141, 77], [141, 63], [141, 57], [141, 155], [141, 131], [141, 140], [141, 85], [141, 94], [141, 60], [141, 69], [141, 125], [142, 156], [142, 132], [143, 142], [144, 143], [145, 135], [146, 5], [147, 146], [147, 145], [148, 131], [148, 85], [148, 94], [148, 60], [148, 69], [148, 125], [148, 147], [148, 128], [148, 77], [148, 63], [148, 57], [148, 155], [149, 3], [150, 60], [150, 69], [150, 149], [150, 125], [150, 77], [150, 63], [150, 128], [150, 155], [150, 131], [150, 85], [150, 94], [150, 57], [151, 132], [151, 156], [152, 151], [153, 152], [153, 150], [154, 141], [154, 148], [155, 153], [155, 154], [156, 156], [156, 132], [157, 156], [157, 132], [158, 157], [158, 6], [159, 158], [161, 160], [162, 161], [164, 163], [170, 169], [174, 3], [175, 131], [175, 85], [175, 94], [175, 57], [175, 60], [175, 69], [175, 125], [175, 77], [175, 180], [175, 63], [175, 174], [175, 128], [175, 155], [176, 172], [176, 181], [177, 176], [178, 177], [178, 175], [179, 172], [179, 181], [180, 179], [180, 178], [181, 172], [181, 181], [182, 172], [182, 181], [183, 3], [184, 77], [184, 180], [184, 63], [184, 183], [184, 128], [184, 155], [184, 131], [184, 85], [184, 94], [184, 57], [184, 60], [184, 125], [184, 69], [185, 184], [185, 182], [186, 185], [187, 3], [188, 187], [189, 3], [190, 128], [190, 77], [190, 189], [190, 63], [190, 85], [190, 57], [190, 155], [190, 131], [190, 94], [190, 60], [190, 69], [190, 180], [190, 125], [191, 3], [192, 57], [192, 155], [192, 131], [192, 85], [192, 94], [192, 191], [192, 60], [192, 69], [192, 125], [192, 128], [192, 77], [192, 180], [192, 63], [195, 192], [198, 197], [199, 198], [201, 200], [207, 206], [209, 3], [210, 223], [210, 209], [210, 60], [210, 69], [210, 180], [210, 125], [210, 128], [210, 77], [210, 225], [210, 63], [210, 85], [210, 57], [210, 155], [210, 131], [210, 94], [211, 3], [212, 180], [212, 125], [212, 128], [212, 77], [212, 225], [212, 63], [212, 211], [212, 85], [212, 57], [212, 155], [212, 131], [212, 94], [212, 223], [212, 60], [212, 69], [213, 3], [216, 213], [218, 212], [220, 3], [221, 94], [221, 223], [221, 60], [221, 69], [221, 180], [221, 125], [221, 128], [221, 77], [221, 225], [221, 63], [221, 220], [221, 85], [221, 57], [221, 155], [221, 131], [222, 3], [223, 222], [223, 221], [224, 3], [225, 224], [228, 226], [228, 34], [228, 122]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/ee208a6ed50259baee428582c0e47411453ebb9a1aa50af4f01342f27fc4d28c_ee208a6ed50259baee428582c0e47411453ebb9a1aa50af4f01342f27fc4d28c.jsonl.gz", "strip_func_name": "sub_4803BD", "query": "\n\n\n__int64 __fastcall sub_4803BD(_QWORD *a1, __int64 a2, __int64 a3, unsigned int a4, unsigned int a5)\n{\n__int64 result; // rax\nunsigned __int64 v9; // [rsp+28h] [rbp-18h]\nunsigned int j; // [rsp+38h] [rbp-8h]\nunsigned int i; // [rsp+3Ch] [rbp-4h]\n\nv9 = sub_47FC99(a3, a4);\nif ( v9 >= a5 && v9 <= 0xFFFFFFFE )\n{\nmemset(a1, 0, 0x48uLL);\nif ( dword_4A73B8 > 1 )\n{\nfprintf(stderr, \"Training on %u samples of total size %u\\n\", a4, (unsigned int)v9);\nfflush(stderr);\n}\n*a1 = a2;\na1[2] = a3;\na1[3] = a4;\na1[5] = v9 - a5 + 1;\na1[4] = malloc(4LL * a1[5]);\na1[7] = malloc(4LL * a1[5]);\na1[1] = malloc(8LL * (a4 + 1));\nif ( a1[4] && a1[7] && a1[1] )\n{\na1[6] = 0LL;\n*((_DWORD *)a1 + 16) = a5;\n*(_QWORD *)a1[1] = 0LL;\nfor ( i = 1; i <= a4; ++i )\n*(_QWORD *)(a1[1] + 8LL * i) = *(_QWORD *)(a1[1] + 8LL * (i - 1)) + *(_QWORD *)(8LL * (i - 1) + a3);\nif ( dword_4A73B8 > 1 )\n{\nfwrite(\"Constructing partial suffix array\\n\", 1uLL, 0x22uLL, stderr);\nfflush(stderr);\n}\nfor ( j = 0; (unsigned __int64)j < a1[5]; ++j )\n*(_DWORD *)(4LL * j + a1[4]) = j;\nqword_4A7438 = (__int64)a1;\nqsort((void *)a1[4], a1[5], 4uLL, (__compar_fn_t)compar);\nif ( dword_4A73B8 > 1 )\n{\nfwrite(\"Computing frequencies\\n\", 1uLL, 0x16uLL, stderr);\nfflush(stderr);\n}\nsub_47FE0D(\na1[4],\na1[5],\n4LL,\n(__int64)a1,\n(unsigned int (__fastcall *)(__int64, __int64, __int64))sub_47FCE4,\n(void (__fastcall *)(__int64, __int64, __int64))sub_47FEB8);\na1[6] = a1[4];\na1[4] = 0LL;\nresult = 1LL;\n}\nelse\n{\nif ( dword_4A73B8 > 0 )\n{\nfwrite(\"Failed to allocate scratch buffers\\n\", 1uLL, 0x23uLL, stderr);\nfflush(stderr);\n}\nsub_4802FD((void **)a1);\nresult = 0LL;\n}\n}\nelse\n{\nif ( dword_4A73B8 > 0 )\n{\nfprintf(stderr, \"Total samples size is too large, maximum size is %u MB\\n\", 4095LL);\nfflush(stderr);\n}\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v9,j,sub_4803BD,sub_47FC99,sub_47FE0D,sub_47FCE4,sub_47FEB8,sub_4802FD,]", "hints": "[]", "response": "{'a3': 'samplesSizes', 'a4': 'nbSamples', 'a1': 'ctx', 'a2': 'samplesBuffer', 'a5': 'd', 'v9': 'totalSamplesSize', 'j': 'i_0', 'sub_4803BD': 'COVER_ctx_init', 'sub_47FC99': 'COVER_sum', 'sub_47FE0D': 'COVER_groupBy', 'sub_47FCE4': 'COVER_cmp', 'sub_47FEB8': 'COVER_group', 'sub_4802FD': 'COVER_ctx_destroy'}"}
[ [ 0.8461287021636963, 0.8198806047439575, 0.798392117023468, 0.7869506478309631, 0.7809116840362549, 0.7716614007949829, 0.758994996547699, 0.7558066844940186, 0.7531532049179077, 0.7440015077590942, 0.742155134677887, 0.7375362515449524, 0.7364726066589355, 0.7332029342651367, 0.7328712344169617, 0.730548083782196, 0.730548083782196, 0.7288886308670044, 0.7288689613342285, 0.728095531463623 ], [ 55417, 113769, 191622, 4714, 241131, 205230, 11360, 89616, 257953, 30735, 133460, 46519, 71022, 122801, 31361, 252920, 24327, 197199, 212751, 181886 ] ]
hfslib_is_private_file
f61ed8ef6ab5ad7275499f10ef94c8c2326a67232c2cc9190dbdb630ddbc2c7b
0x09
hfsfuse
NA
int hfslib_is_private_file(hfs_catalog_key_t *filekey) { hfs_catalog_key_t* curkey = NULL; int i = 0; /* * According to the HFS+ spec to date, all special objects are located in * the root directory of the volume, so don't bother going further if the * requested object is not. */ if (filekey->parent_cnid != HFS_CNID_ROOT_FOLDER) return 0; while ((curkey = hfs_gPrivateObjectKeys[i]) != NULL) { /* XXX Always use binary compare here, or use volume's specific key * XXX comparison routine? */ if (filekey->name.length == curkey->name.length && memcmp(filekey->name.unicode, curkey->name.unicode, 2 * curkey->name.length) == 0) return 1; i++; } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_406B97", "function_addr": 4221847, "binary_name": "f61ed8ef6ab5ad7275499f10ef94c8c2326a67232c2cc9190dbdb630ddbc2c7b.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_10], 0"], [5, "mov [rbp+var_4], 0"], [6, "mov rax, [rbp+var_18]"], [7, "mov eax, [rax+4]"], [8, "cmp eax, 2"], [9, "jz short loc_406C13"], [10, "mov eax, 0"], [11, "jmp short locret_406C30"], [12, "mov rax, [rbp+var_18]"], [13, "movzx edx, word ptr [rax+8]"], [14, "mov rax, [rbp+var_10]"], [15, "movzx eax, word ptr [rax+8]"], [16, "cmp dx, ax"], [17, "jnz short loc_406C0F"], [18, "mov rax, [rbp+var_10]"], [19, "movzx eax, word ptr [rax+8]"], [20, "movzx eax, ax"], [21, "add eax, eax"], [22, "cdqe"], [23, "mov rdx, [rbp+var_10]"], [24, "lea rsi, [rdx+0Ah]"], [25, "mov rdx, [rbp+var_18]"], [26, "lea rcx, [rdx+0Ah]"], [27, "mov rdx, rax"], [28, "mov rdi, rcx"], [29, "call _memcmp"], [30, "test eax, eax"], [31, "jnz short loc_406C0F"], [32, "mov eax, 1"], [33, "jmp short locret_406C30"], [34, "add [rbp+var_4], 1"], [35, "mov eax, [rbp+var_4]"], [36, "cdqe"], [37, "mov rax, off_467180[rax*8]"], [38, "mov [rbp+var_10], rax"], [39, "cmp [rbp+var_10], 0"], [40, "jnz short loc_406BC5"], [41, "mov eax, 0"], [42, "leave"], [43, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [9, 8], [12, 3], [13, 12], [14, 38], [15, 14], [16, 13], [16, 15], [17, 16], [18, 38], [19, 18], [20, 19], [21, 20], [23, 38], [24, 23], [24, 24], [25, 3], [26, 26], [26, 25], [27, 21], [28, 26], [30, 29], [31, 30], [34, 34], [34, 5], [35, 5], [35, 34], [38, 37], [39, 38], [40, 39], [43, 32], [43, 41], [43, 10]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/f61ed8ef6ab5ad7275499f10ef94c8c2326a67232c2cc9190dbdb630ddbc2c7b_f61ed8ef6ab5ad7275499f10ef94c8c2326a67232c2cc9190dbdb630ddbc2c7b.jsonl.gz", "strip_func_name": "sub_406B97", "query": "\n\n\n__int64 __fastcall sub_406B97(__int64 a1)\n{\n__int64 v2; // [rsp+10h] [rbp-10h]\nint v3; // [rsp+1Ch] [rbp-4h]\n\nv3 = 0;\nif ( *(_DWORD *)(a1 + 4) != 2 )\nreturn 0LL;\nwhile ( 1 )\n{\nv2 = (__int64)*(&off_467180 + v3);\nif ( !v2 )\nbreak;\nif ( *(_WORD *)(a1 + 8) == *(_WORD *)(v2 + 8)\n&& !memcmp((const void *)(a1 + 10), (const void *)(v2 + 10), 2 * *(unsigned __int16 *)(v2 + 8)) )\n{\nreturn 1LL;\n}\n++v3;\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,v2,sub_406B97,]", "hints": "[]", "response": "{'a1': 'filekey', 'v2': 'curkey', 'sub_406B97': 'hfslib_is_private_file'}"}
[ [ 0.796114981174469, 0.7863768339157104, 0.7491477727890015, 0.7487149238586426, 0.745168924331665, 0.7427431344985962, 0.7381616830825806, 0.7301893830299377, 0.7292850613594055, 0.7284795641899109, 0.7264695167541504, 0.7262821793556213, 0.7261736392974854, 0.7261595129966736, 0.7248749136924744, 0.7156369686126709, 0.714211106300354, 0.710388720035553, 0.706512987613678, 0.7056055068969727 ], [ 96728, 200123, 30620, 24350, 59156, 20664, 141287, 164493, 102322, 206222, 72344, 110627, 109455, 228347, 189581, 220036, 172659, 81315, 156747, 60658 ] ]
prep_closure
7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807
arendst
Tasmota
NA
static void prep_closure(bvm *vm, int pos, int argc, int mode) { bvalue *v, *end; bproto *proto = var2cl(vm->reg + pos)->proto; push_closure(vm, vm->reg + pos, proto->nstack, mode); end = vm->reg + proto->argc; for (v = vm->reg + argc; v <= end; ++v) { var_setnil(v); } int v_offset = v - vm->stack; /* offset from stack base, stack may be reallocated */ if (proto->varg & BE_VA_VARARG) { /* there are vararg at the last argument, build the list */ /* code below uses mostly low-level calls for performance */ be_stack_require(vm, argc + 4); /* make sure we don't overflow the stack */ int top_save_offset = vm->top - vm->stack; /* save original stack, we need fresh slots to create the 'list' instance */ vm->top = vm->stack + v_offset; /* move top of stack right after last argument */ be_newobject(vm, "list"); /* this creates 2 objects on stack: list instance, BE_LIST object */ blist *list = var_toobj(vm->top-1); /* get low-level BE_LIST structure */ v = vm->reg + proto->argc - 1; /* last argument */ for (; v < vm->reg + argc; v++) { be_list_push(vm, list, v); /* push all varargs into list */ } *(vm->reg + proto->argc - 1) = *(vm->top-2); /* change the vararg argument to now contain the list instance */ vm->top = vm->stack + top_save_offset; /* restore top of stack pointer */ } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42207B", "function_addr": 4333691, "binary_name": "7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807.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_44], ecx"], [7, "mov rax, [rbp+var_38]"], [8, "mov rdx, [rax+0B0h]"], [9, "mov eax, [rbp+var_3C]"], [10, "cdqe"], [11, "shl rax, 4"], [12, "add rax, rdx"], [13, "mov rax, [rax]"], [14, "mov rax, [rax+18h]"], [15, "mov [rbp+var_10], rax"], [16, "mov rax, [rbp+var_10]"], [17, "movzx eax, byte ptr [rax+0Ah]"], [18, "movzx edx, al"], [19, "mov rax, [rbp+var_38]"], [20, "mov rcx, [rax+0B0h]"], [21, "mov eax, [rbp+var_3C]"], [22, "cdqe"], [23, "shl rax, 4"], [24, "lea rsi, [rcx+rax]"], [25, "mov ecx, [rbp+var_44]"], [26, "mov rax, [rbp+var_38]"], [27, "mov rdi, rax"], [28, "call sub_41C2D2"], [29, "mov rax, [rbp+var_38]"], [30, "mov rdx, [rax+0B0h]"], [31, "mov rax, [rbp+var_10]"], [32, "movzx eax, byte ptr [rax+0Ch]"], [33, "movzx eax, al"], [34, "shl rax, 4"], [35, "add rax, rdx"], [36, "mov [rbp+var_18], rax"], [37, "mov rax, [rbp+var_38]"], [38, "mov rdx, [rax+0B0h]"], [39, "mov eax, [rbp+var_40]"], [40, "cdqe"], [41, "shl rax, 4"], [42, "add rax, rdx"], [43, "mov [rbp+var_8], rax"], [44, "jmp short loc_422132"], [45, "mov rax, [rbp+var_8]"], [46, "mov dword ptr [rax+8], 0"], [47, "add [rbp+var_8], 10h"], [48, "mov rax, [rbp+var_8]"], [49, "cmp rax, [rbp+var_18]"], [50, "jbe short loc_422122"], [51, "mov rax, [rbp+var_38]"], [52, "mov rdx, [rax+50h]"], [53, "mov rax, [rbp+var_8]"], [54, "sub rax, rdx"], [55, "sar rax, 4"], [56, "mov [rbp+var_1C], eax"], [57, "mov rax, [rbp+var_10]"], [58, "movzx eax, byte ptr [rax+0Dh]"], [59, "movzx eax, al"], [60, "and eax, 1"], [61, "test eax, eax"], [62, "jz loc_42229C"], [63, "mov eax, [rbp+var_40]"], [64, "lea edx, [rax+4]"], [65, "mov rax, [rbp+var_38]"], [66, "mov esi, edx"], [67, "mov rdi, rax"], [68, "call be_stack_require"], [69, "mov rax, [rbp+var_38]"], [70, "mov rdx, [rax+0B8h]"], [71, "mov rax, [rbp+var_38]"], [72, "mov rcx, [rax+50h]"], [73, "mov rax, rdx"], [74, "sub rax, rcx"], [75, "sar rax, 4"], [76, "mov [rbp+var_20], eax"], [77, "mov rax, [rbp+var_38]"], [78, "mov rdx, [rax+50h]"], [79, "mov eax, [rbp+var_1C]"], [80, "cdqe"], [81, "shl rax, 4"], [82, "add rdx, rax"], [83, "mov rax, [rbp+var_38]"], [84, "mov [rax+0B8h], rdx"], [85, "mov rax, [rbp+var_38]"], [86, "mov esi, offset aList_7"], [87, "mov rdi, rax"], [88, "call be_newobject"], [89, "mov rax, [rbp+var_38]"], [90, "mov rax, [rax+0B8h]"], [91, "sub rax, 10h"], [92, "mov rax, [rax]"], [93, "mov [rbp+var_28], rax"], [94, "mov rax, [rbp+var_38]"], [95, "mov rdx, [rax+0B0h]"], [96, "mov rax, [rbp+var_10]"], [97, "movzx eax, byte ptr [rax+0Ch]"], [98, "movzx eax, al"], [99, "shl rax, 4"], [100, "sub rax, 10h"], [101, "add rax, rdx"], [102, "mov [rbp+var_8], rax"], [103, "jmp short loc_422225"], [104, "mov rdx, [rbp+var_8]"], [105, "mov rcx, [rbp+var_28]"], [106, "mov rax, [rbp+var_38]"], [107, "mov rsi, rcx"], [108, "mov rdi, rax"], [109, "call be_list_push"], [110, "add [rbp+var_8], 10h"], [111, "mov rax, [rbp+var_38]"], [112, "mov rdx, [rax+0B0h]"], [113, "mov eax, [rbp+var_40]"], [114, "cdqe"], [115, "shl rax, 4"], [116, "add rax, rdx"], [117, "cmp [rbp+var_8], rax"], [118, "jb short loc_422209"], [119, "mov rax, [rbp+var_38]"], [120, "mov rax, [rax+0B8h]"], [121, "mov rdx, [rbp+var_38]"], [122, "mov rcx, [rdx+0B0h]"], [123, "mov rdx, [rbp+var_10]"], [124, "movzx edx, byte ptr [rdx+0Ch]"], [125, "movzx edx, dl"], [126, "shl rdx, 4"], [127, "sub rdx, 10h"], [128, "add rcx, rdx"], [129, "mov rdx, [rax-18h]"], [130, "mov rax, [rax-20h]"], [131, "mov [rcx], rax"], [132, "mov [rcx+8], rdx"], [133, "mov rax, [rbp+var_38]"], [134, "mov rdx, [rax+50h]"], [135, "mov eax, [rbp+var_20]"], [136, "cdqe"], [137, "shl rax, 4"], [138, "add rdx, rax"], [139, "mov rax, [rbp+var_38]"], [140, "mov [rax+0B8h], rdx"], [141, "nop"], [142, "leave"], [143, "retn"]], "data_dep": [[7, 3], [8, 7], [9, 4], [11, 9], [12, 8], [12, 11], [13, 12], [14, 13], [15, 14], [16, 15], [17, 16], [18, 17], [19, 3], [20, 19], [21, 4], [23, 21], [24, 23], [25, 6], [26, 3], [27, 26], [29, 3], [30, 29], [31, 15], [32, 31], [33, 32], [34, 33], [35, 30], [35, 34], [36, 35], [37, 3], [38, 37], [39, 5], [41, 39], [42, 41], [42, 38], [43, 42], [45, 43], [45, 47], [46, 45], [47, 43], [47, 47], [48, 47], [48, 43], [49, 48], [49, 36], [50, 49], [51, 3], [52, 51], [52, 46], [53, 43], [53, 47], [54, 53], [54, 52], [55, 54], [56, 55], [57, 15], [58, 46], [58, 57], [59, 58], [60, 59], [61, 60], [62, 61], [63, 5], [64, 84], [64, 52], [64, 63], [64, 46], [65, 3], [66, 64], [67, 65], [69, 3], [70, 84], [70, 69], [70, 46], [71, 3], [72, 84], [72, 46], [72, 71], [73, 70], [74, 73], [74, 72], [75, 74], [76, 75], [77, 3], [78, 77], [78, 46], [78, 84], [79, 56], [81, 79], [82, 81], [82, 78], [83, 3], [84, 83], [84, 82], [85, 3], [87, 85], [89, 3], [90, 89], [90, 84], [91, 90], [92, 84], [92, 91], [93, 92], [94, 3], [95, 84], [95, 94], [96, 15], [97, 96], [97, 84], [98, 97], [99, 98], [100, 99], [101, 100], [101, 95], [102, 101], [104, 102], [104, 110], [105, 93], [106, 3], [107, 105], [108, 106], [110, 102], [110, 110], [111, 3], [112, 84], [112, 111], [112, 46], [113, 5], [115, 113], [116, 115], [116, 112], [117, 110], [117, 116], [117, 102], [118, 117], [119, 3], [120, 131], [120, 46], [120, 140], [120, 119], [120, 84], [120, 132], [121, 3], [122, 131], [122, 140], [122, 46], [122, 121], [122, 84], [122, 132], [123, 15], [124, 131], [124, 140], [124, 46], [124, 84], [124, 123], [124, 132], [125, 124], [126, 125], [127, 126], [128, 127], [128, 122], [129, 84], [129, 132], [129, 120], [129, 131], [129, 46], [129, 140], [130, 46], [130, 140], [130, 84], [130, 132], [130, 120], [130, 131], [131, 128], [131, 130], [132, 128], [132, 129], [133, 3], [134, 133], [134, 132], [135, 76], [137, 135], [138, 137], [138, 134], [139, 3], [140, 139], [140, 138], [143, 139], [143, 61]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807_7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807.jsonl.gz", "strip_func_name": "sub_42207B", "query": "\n\n\n_QWORD *__fastcall sub_42207B(_QWORD *a1, int a2, int a3, int a4)\n{\n_QWORD *result; // rax\n__int64 v5; // rax\n_QWORD *v6; // rcx\n__int64 v7; // rdx\n__int64 v9; // [rsp+28h] [rbp-28h]\nint v10; // [rsp+30h] [rbp-20h]\nint v11; // [rsp+34h] [rbp-1Ch]\nunsigned __int64 v12; // [rsp+38h] [rbp-18h]\nunsigned __int8 *v13; // [rsp+40h] [rbp-10h]\nunsigned __int64 i; // [rsp+48h] [rbp-8h]\nunsigned __int64 j; // [rsp+48h] [rbp-8h]\n\nv13 = *(unsigned __int8 **)(*(_QWORD *)(a1[22] + 16LL * a2) + 24LL);\nsub_41C2D2((__int64)a1, (__int64 *)(a1[22] + 16LL * a2), v13[10], a4);\nv12 = a1[22] + 16LL * v13[12];\nfor ( i = a1[22] + 16LL * a3; i <= v12; i += 16LL )\n*(_DWORD *)(i + 8) = 0;\nv11 = (__int64)(i - a1[10]) >> 4;\nresult = (_QWORD *)(v13[13] & 1);\nif ( (v13[13] & 1) != 0 )\n{\nbe_stack_require(a1, (unsigned int)(a3 + 4));\nv10 = (__int64)(a1[23] - a1[10]) >> 4;\na1[23] = 16LL * v11 + a1[10];\nbe_newobject((__int64)a1, (__int64)\"list\");\nv9 = *(_QWORD *)(a1[23] - 16LL);\nfor ( j = a1[22] + 16LL * v13[12] - 16; j < a1[22] + 16LL * a3; j += 16LL )\nbe_list_push(a1, v9, j);\nv5 = a1[23];\nv6 = (_QWORD *)(16LL * v13[12] - 16 + a1[22]);\nv7 = *(_QWORD *)(v5 - 24);\n*v6 = *(_QWORD *)(v5 - 32);\nv6[1] = v7;\nresult = a1;\na1[23] = 16LL * v10 + a1[10];\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,v9,v10,v11,v12,v13,j,sub_42207B,sub_41C2D2,]", "hints": "[]", "response": "{'a3': 'argc', 'a4': 'mode', 'a1': 'vm', 'a2': 'pos', 'v9': 'list', 'v10': 'top_save_offset', 'v11': 'v_offset', 'v12': 'end', 'v13': 'proto', 'j': 'v', 'sub_42207B': 'prep_closure', 'sub_41C2D2': 'push_closure'}"}
[ [ 0.7774056792259216, 0.7660815119743347, 0.7593038082122803, 0.7592660188674927, 0.756616473197937, 0.7531746625900269, 0.7522867321968079, 0.7493546009063721, 0.7396466732025146, 0.7390940189361572, 0.7370567321777344, 0.7368112802505493, 0.7368036508560181, 0.7334907650947571, 0.7332164645195007, 0.7283199429512024, 0.7236694097518921, 0.7209782600402832, 0.7208430767059326, 0.7188385128974915 ], [ 183304, 36341, 214966, 210774, 168792, 221159, 251613, 193827, 213168, 186284, 42811, 261775, 144325, 132953, 141289, 53352, 121584, 82290, 165933, 22185 ] ]
mlx_int_get_text_rgb
d34d963228b646d76b927241adc86bca0f1524fd669b85830dba0179315ad17f
42Paris
minilibx-linux
NA
int mlx_int_get_text_rgb(char *name, char *end) { int i; char buff[64]; if (*name == '#') return (strtol(name+1,0,16)); if (end) { snprintf(buff, 64, "%s %s", name, end); name = buff; } i = 0; while (mlx_col_name[i].name) { if (!strcasecmp(mlx_col_name[i].name, name)) return (mlx_col_name[i].color); i ++; } return (0); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404BBB", "function_addr": 4213691, "binary_name": "d34d963228b646d76b927241adc86bca0f1524fd669b85830dba0179315ad17f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 60h"], [3, "mov [rbp+s2], rdi"], [4, "mov [rbp+var_60], rsi"], [5, "mov rax, [rbp+s2]"], [6, "movzx eax, byte ptr [rax]"], [7, "cmp al, 23h "], [8, "jnz short loc_404BF5"], [9, "mov rax, [rbp+s2]"], [10, "add rax, 1"], [11, "mov edx, 10h"], [12, "mov esi, 0"], [13, "mov rdi, rax"], [14, "call _strtol"], [15, "jmp locret_404C8E"], [16, "cmp [rbp+var_60], 0"], [17, "jz short loc_404C2D"], [18, "mov rcx, [rbp+var_60]"], [19, "mov rdx, [rbp+s2]"], [20, "lea rax, [rbp+s]"], [21, "mov r8, rcx"], [22, "mov rcx, rdx"], [23, "mov edx, offset aSS"], [24, "mov esi, 40h "], [25, "mov rdi, rax"], [26, "mov eax, 0"], [27, "call _snprintf"], [28, "lea rax, [rbp+s]"], [29, "mov [rbp+s2], rax"], [30, "mov [rbp+var_4], 0"], [31, "jmp short loc_404C72"], [32, "mov eax, [rbp+var_4]"], [33, "cdqe"], [34, "shl rax, 4"], [35, "add rax, 40B380h"], [36, "mov rax, [rax]"], [37, "mov rdx, [rbp+s2]"], [38, "mov rsi, rdx"], [39, "mov rdi, rax"], [40, "call _strcasecmp"], [41, "test eax, eax"], [42, "jnz short loc_404C6E"], [43, "mov eax, [rbp+var_4]"], [44, "cdqe"], [45, "shl rax, 4"], [46, "add rax, 40B388h"], [47, "mov eax, [rax]"], [48, "jmp short locret_404C8E"], [49, "add [rbp+var_4], 1"], [50, "mov eax, [rbp+var_4]"], [51, "cdqe"], [52, "shl rax, 4"], [53, "add rax, 40B380h"], [54, "mov rax, [rax]"], [55, "test rax, rax"], [56, "jnz short loc_404C36"], [57, "mov eax, 0"], [58, "leave"], [59, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 7], [9, 3], [10, 9], [13, 10], [16, 4], [17, 16], [18, 4], [19, 3], [20, 6], [21, 18], [22, 19], [25, 20], [28, 27], [29, 28], [32, 49], [32, 30], [34, 32], [35, 34], [36, 35], [37, 3], [37, 29], [38, 37], [39, 36], [41, 40], [42, 41], [43, 49], [43, 30], [45, 43], [46, 45], [47, 46], [49, 49], [49, 30], [50, 49], [50, 30], [52, 50], [53, 52], [54, 53], [55, 54], [56, 55], [59, 57], [59, 14], [59, 47]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/d34d963228b646d76b927241adc86bca0f1524fd669b85830dba0179315ad17f_d34d963228b646d76b927241adc86bca0f1524fd669b85830dba0179315ad17f.jsonl.gz", "strip_func_name": "sub_404BBB", "query": "\n\n\n__int64 __fastcall sub_404BBB(const char *a1, const char *a2)\n{\nconst char *s2; // [rsp+8h] [rbp-58h]\nchar s[76]; // [rsp+10h] [rbp-50h] BYREF\nint i; // [rsp+5Ch] [rbp-4h]\n\ns2 = a1;\nif ( *a1 == 35 )\nreturn strtol(a1 + 1, 0LL, 16);\nif ( a2 )\n{\nsnprintf(s, 0x40uLL, \"%s %s\", a1, a2);\ns2 = s;\n}\nfor ( i = 0; (&off_40B380)[2 * i]; ++i )\n{\nif ( !strcasecmp((&off_40B380)[2 * i], s2) )\nreturn dword_40B388[4 * i];\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,s2,s,sub_404BBB,]", "hints": "[]", "response": "{'a1': 'name', 'a2': 'end', 's2': 'namea', 's': 'buff', 'sub_404BBB': 'mlx_int_get_text_rgb'}"}
[ [ 0.6675792932510376, 0.6645143032073975, 0.6505782604217529, 0.6488656997680664, 0.6464816331863403, 0.6418341398239136, 0.6399943232536316, 0.6397801041603088, 0.6394754648208618, 0.639241099357605, 0.6389046907424927, 0.6385331153869629, 0.6382090449333191, 0.6332190036773682, 0.6322842240333557, 0.631532609462738, 0.6294295787811279, 0.6271672248840332, 0.6231749057769775, 0.621885359287262 ], [ 138551, 197589, 47260, 245329, 71875, 158614, 257088, 220543, 133541, 136648, 103610, 231649, 44280, 16999, 205056, 75470, 36987, 186095, 224307, 13751 ] ]
PrintCgptAddParams
cd3fc95780624979a60915c1c64c11bf8f0682b5571f2ea79f4665379c87d368
coreboot
vboot
NA
static void PrintCgptAddParams(const CgptAddParams *params) { char tmp[64]; fprintf(stderr, "-i %d ", params->partition); if (params->label) fprintf(stderr, "-l %s ", params->label); if (params->set_begin) fprintf(stderr, "-b %llu ", (unsigned long long)params->begin); if (params->set_size) fprintf(stderr, "-s %llu ", (unsigned long long)params->size); if (params->set_type) { GuidToStr(&params->type_guid, tmp, sizeof(tmp)); fprintf(stderr, "-t %s ", tmp); } if (params->set_unique) { GuidToStr(&params->unique_guid, tmp, sizeof(tmp)); fprintf(stderr, "-u %s ", tmp); } if (params->set_successful) fprintf(stderr, "-S %d ", params->successful); if (params->set_tries) fprintf(stderr, "-T %d ", params->tries); if (params->set_priority) fprintf(stderr, "-P %d ", params->priority); if (params->set_required) fprintf(stderr, "-R %d ", params->required); if (params->set_legacy_boot) fprintf(stderr, "-B %d ", params->legacy_boot); if (params->set_raw) fprintf(stderr, "-A %#x ", params->raw_value); fprintf(stderr, "\n"); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402746", "function_addr": 4204358, "binary_name": "cd3fc95780624979a60915c1c64c11bf8f0682b5571f2ea79f4665379c87d368.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_48], rdi"], [4, "mov rax, [rbp+var_48]"], [5, "mov edx, [rax+10h]"], [6, "mov rax, cs:stderr_ptr"], [7, "mov rax, [rax]"], [8, "lea rsi, aID"], [9, "mov rdi, rax"], [10, "mov eax, 0"], [11, "call _fprintf"], [12, "mov rax, [rbp+var_48]"], [13, "mov rax, [rax+48h]"], [14, "test rax, rax"], [15, "jz short loc_4027AA"], [16, "mov rax, [rbp+var_48]"], [17, "mov rdx, [rax+48h]"], [18, "mov rax, cs:stderr_ptr"], [19, "mov rax, [rax]"], [20, "lea rsi, aLS"], [21, "mov rdi, rax"], [22, "mov eax, 0"], [23, "call _fprintf"], [24, "mov rax, [rbp+var_48]"], [25, "mov eax, [rax+68h]"], [26, "test eax, eax"], [27, "jz short loc_4027DB"], [28, "mov rax, [rbp+var_48]"], [29, "mov rdx, [rax+18h]"], [30, "mov rax, cs:stderr_ptr"], [31, "mov rax, [rax]"], [32, "lea rsi, aBLlu"], [33, "mov rdi, rax"], [34, "mov eax, 0"], [35, "call _fprintf"], [36, "mov rax, [rbp+var_48]"], [37, "mov eax, [rax+6Ch]"], [38, "test eax, eax"], [39, "jz short loc_40280C"], [40, "mov rax, [rbp+var_48]"], [41, "mov rdx, [rax+20h]"], [42, "mov rax, cs:stderr_ptr"], [43, "mov rax, [rax]"], [44, "lea rsi, aSLlu"], [45, "mov rdi, rax"], [46, "mov eax, 0"], [47, "call _fprintf"], [48, "mov rax, [rbp+var_48]"], [49, "mov eax, [rax+70h]"], [50, "test eax, eax"], [51, "jz short loc_402855"], [52, "mov rax, [rbp+var_48]"], [53, "lea rcx, [rax+28h]"], [54, "lea rax, [rbp+var_40]"], [55, "mov edx, 40h "], [56, "mov rsi, rax"], [57, "mov rdi, rcx"], [58, "call sub_4046E4"], [59, "mov rax, cs:stderr_ptr"], [60, "mov rax, [rax]"], [61, "lea rdx, [rbp+var_40]"], [62, "lea rsi, aTS"], [63, "mov rdi, rax"], [64, "mov eax, 0"], [65, "call _fprintf"], [66, "mov rax, [rbp+var_48]"], [67, "mov eax, [rax+74h]"], [68, "test eax, eax"], [69, "jz short loc_40289E"], [70, "mov rax, [rbp+var_48]"], [71, "lea rcx, [rax+38h]"], [72, "lea rax, [rbp+var_40]"], [73, "mov edx, 40h "], [74, "mov rsi, rax"], [75, "mov rdi, rcx"], [76, "call sub_4046E4"], [77, "mov rax, cs:stderr_ptr"], [78, "mov rax, [rax]"], [79, "lea rdx, [rbp+var_40]"], [80, "lea rsi, aUS"], [81, "mov rdi, rax"], [82, "mov eax, 0"], [83, "call _fprintf"], [84, "mov rax, [rbp+var_48]"], [85, "mov eax, [rax+78h]"], [86, "test eax, eax"], [87, "jz short loc_4028CE"], [88, "mov rax, [rbp+var_48]"], [89, "mov edx, [rax+50h]"], [90, "mov rax, cs:stderr_ptr"], [91, "mov rax, [rax]"], [92, "lea rsi, aSD"], [93, "mov rdi, rax"], [94, "mov eax, 0"], [95, "call _fprintf"], [96, "mov rax, [rbp+var_48]"], [97, "mov eax, [rax+7Ch]"], [98, "test eax, eax"], [99, "jz short loc_4028FE"], [100, "mov rax, [rbp+var_48]"], [101, "mov edx, [rax+54h]"], [102, "mov rax, cs:stderr_ptr"], [103, "mov rax, [rax]"], [104, "lea rsi, aTD"], [105, "mov rdi, rax"], [106, "mov eax, 0"], [107, "call _fprintf"], [108, "mov rax, [rbp+var_48]"], [109, "mov eax, [rax+80h]"], [110, "test eax, eax"], [111, "jz short loc_402931"], [112, "mov rax, [rbp+var_48]"], [113, "mov edx, [rax+58h]"], [114, "mov rax, cs:stderr_ptr"], [115, "mov rax, [rax]"], [116, "lea rsi, aPD"], [117, "mov rdi, rax"], [118, "mov eax, 0"], [119, "call _fprintf"], [120, "mov rax, [rbp+var_48]"], [121, "mov eax, [rax+84h]"], [122, "test eax, eax"], [123, "jz short loc_402964"], [124, "mov rax, [rbp+var_48]"], [125, "mov edx, [rax+5Ch]"], [126, "mov rax, cs:stderr_ptr"], [127, "mov rax, [rax]"], [128, "lea rsi, aRD"], [129, "mov rdi, rax"], [130, "mov eax, 0"], [131, "call _fprintf"], [132, "mov rax, [rbp+var_48]"], [133, "mov eax, [rax+88h]"], [134, "test eax, eax"], [135, "jz short loc_402997"], [136, "mov rax, [rbp+var_48]"], [137, "mov edx, [rax+60h]"], [138, "mov rax, cs:stderr_ptr"], [139, "mov rax, [rax]"], [140, "lea rsi, aBD"], [141, "mov rdi, rax"], [142, "mov eax, 0"], [143, "call _fprintf"], [144, "mov rax, [rbp+var_48]"], [145, "mov eax, [rax+8Ch]"], [146, "test eax, eax"], [147, "jz short loc_4029CA"], [148, "mov rax, [rbp+var_48]"], [149, "mov edx, [rax+64h]"], [150, "mov rax, cs:stderr_ptr"], [151, "mov rax, [rax]"], [152, "lea rsi, aAX"], [153, "mov rdi, rax"], [154, "mov eax, 0"], [155, "call _fprintf"], [156, "mov rax, cs:stderr_ptr"], [157, "mov rax, [rax]"], [158, "mov rsi, rax"], [159, "mov edi, 0Ah"], [160, "call _fputc"], [161, "nop"], [162, "leave"], [163, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [9, 7], [12, 3], [13, 12], [14, 13], [15, 14], [16, 3], [17, 16], [19, 18], [20, 8], [21, 19], [24, 3], [25, 24], [26, 25], [27, 26], [28, 3], [29, 28], [31, 30], [32, 20], [32, 8], [33, 31], [36, 3], [37, 36], [38, 37], [39, 38], [40, 3], [41, 40], [43, 42], [44, 20], [44, 8], [44, 32], [45, 43], [48, 3], [49, 48], [50, 49], [51, 50], [52, 3], [53, 52], [54, 52], [56, 54], [57, 53], [60, 59], [61, 55], [62, 56], [63, 60], [66, 3], [67, 66], [68, 67], [69, 68], [70, 3], [71, 53], [71, 70], [72, 70], [74, 72], [75, 71], [78, 77], [79, 73], [80, 74], [81, 78], [84, 3], [85, 84], [86, 85], [87, 86], [88, 3], [89, 88], [91, 90], [92, 8], [92, 44], [92, 32], [92, 62], [92, 80], [92, 20], [93, 91], [96, 3], [97, 96], [98, 97], [99, 98], [100, 3], [101, 100], [103, 102], [104, 32], [104, 62], [104, 80], [104, 20], [104, 8], [104, 44], [104, 92], [105, 103], [108, 3], [109, 108], [110, 109], [111, 110], [112, 3], [113, 112], [115, 114], [116, 8], [116, 104], [116, 44], [116, 92], [116, 32], [116, 62], [116, 80], [116, 20], [117, 115], [120, 3], [121, 120], [122, 121], [123, 122], [124, 3], [125, 124], [127, 126], [128, 44], [128, 62], [128, 92], [128, 32], [128, 80], [128, 20], [128, 116], [128, 8], [128, 104], [129, 127], [132, 3], [133, 132], [134, 133], [135, 134], [136, 3], [137, 136], [139, 138], [140, 128], [140, 20], [140, 116], [140, 8], [140, 104], [140, 44], [140, 62], [140, 92], [140, 32], [140, 80], [141, 139], [144, 3], [145, 144], [146, 145], [147, 146], [148, 3], [149, 148], [151, 150], [152, 8], [152, 104], [152, 140], [152, 44], [152, 62], [152, 92], [152, 128], [152, 32], [152, 80], [152, 116], [152, 20], [153, 151], [157, 156], [158, 157], [163, 160]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/cd3fc95780624979a60915c1c64c11bf8f0682b5571f2ea79f4665379c87d368_cd3fc95780624979a60915c1c64c11bf8f0682b5571f2ea79f4665379c87d368.jsonl.gz", "strip_func_name": "sub_402746", "query": "\n\n\nint __fastcall sub_402746(__int64 a1)\n{\nchar v2[64]; // [rsp+10h] [rbp-40h] BYREF\n\nfprintf(stderr, \"-i %d \", *(unsigned int *)(a1 + 16));\nif ( *(_QWORD *)(a1 + 72) )\nfprintf(stderr, \"-l %s \", *(const char **)(a1 + 72));\nif ( *(_DWORD *)(a1 + 104) )\nfprintf(stderr, \"-b %llu \", *(_QWORD *)(a1 + 24));\nif ( *(_DWORD *)(a1 + 108) )\nfprintf(stderr, \"-s %llu \", *(_QWORD *)(a1 + 32));\nif ( *(_DWORD *)(a1 + 112) )\n{\nsub_4046E4(a1 + 40, v2, 64LL);\nfprintf(stderr, \"-t %s \", v2);\n}\nif ( *(_DWORD *)(a1 + 116) )\n{\nsub_4046E4(a1 + 56, v2, 64LL);\nfprintf(stderr, \"-u %s \", v2);\n}\nif ( *(_DWORD *)(a1 + 120) )\nfprintf(stderr, \"-S %d \", *(unsigned int *)(a1 + 80));\nif ( *(_DWORD *)(a1 + 124) )\nfprintf(stderr, \"-T %d \", *(unsigned int *)(a1 + 84));\nif ( *(_DWORD *)(a1 + 128) )\nfprintf(stderr, \"-P %d \", *(unsigned int *)(a1 + 88));\nif ( *(_DWORD *)(a1 + 132) )\nfprintf(stderr, \"-R %d \", *(unsigned int *)(a1 + 92));\nif ( *(_DWORD *)(a1 + 136) )\nfprintf(stderr, \"-B %d \", *(unsigned int *)(a1 + 96));\nif ( *(_DWORD *)(a1 + 140) )\nfprintf(stderr, \"-A %#x \", *(unsigned int *)(a1 + 100));\nreturn fputc(10, stderr);\n}\n\n\n\nQ:[a1,v2,sub_402746,sub_4046E4,]", "hints": "[]", "response": "{'a1': 'params', 'v2': 'tmp', 'sub_402746': 'PrintCgptAddParams', 'sub_4046E4': 'GuidToStr'}"}
[ [ 0.7894070148468018, 0.7603808641433716, 0.7550430297851562, 0.7516790628433228, 0.7493878602981567, 0.7487704753875732, 0.7483575940132141, 0.7476571202278137, 0.745155930519104, 0.742896318435669, 0.7373303771018982, 0.736041784286499, 0.7250219583511353, 0.7242966890335083, 0.7233971357345581, 0.722866415977478, 0.7185702323913574, 0.7111313343048096, 0.7090357542037964, 0.7088623642921448 ], [ 255103, 122186, 5576, 185685, 185053, 118395, 221853, 160114, 13422, 152704, 213763, 255599, 100595, 236912, 132466, 33322, 35103, 153950, 43633, 89658 ] ]
arm_nn_mult_q15
3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec
gwsystems
sledge-serverless-framework
NA
void arm_nn_mult_q15( q15_t * pSrcA, q15_t * pSrcB, q15_t * pDst, const uint16_t out_shift, uint32_t blockSize) { uint32_t blkCnt; /* loop counters */ #if defined (ARM_MATH_DSP) /* Run the below code for Cortex-M4 and Cortex-M3 */ q31_t inA1, inA2, inB1, inB2; /* temporary input variables */ q15_t out1, out2, out3, out4; /* temporary output variables */ q31_t mul1, mul2, mul3, mul4; /* temporary variables */ /* loop Unrolling */ blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ while (blkCnt > 0U) { /* read two samples at a time from sourceA */ inA1 = arm_nn_read_q15x2_ia((const q15_t **)&pSrcA); /* read two samples at a time from sourceB */ inB1 = arm_nn_read_q15x2_ia((const q15_t **)&pSrcB); /* read two samples at a time from sourceA */ inA2 = arm_nn_read_q15x2_ia((const q15_t **)&pSrcA); /* read two samples at a time from sourceB */ inB2 = arm_nn_read_q15x2_ia((const q15_t **)&pSrcB); /* multiply mul = sourceA * sourceB */ mul1 = (q31_t) ((q15_t) (inA1 >> 16) * (q15_t) (inB1 >> 16)); mul2 = (q31_t) ((q15_t) inA1 * (q15_t) inB1); mul3 = (q31_t) ((q15_t) (inA2 >> 16) * (q15_t) (inB2 >> 16)); mul4 = (q31_t) ((q15_t) inA2 * (q15_t) inB2); /* saturate result to 16 bit */ out1 = (q15_t) __SSAT((mul1 + NN_ROUND(out_shift)) >> out_shift, 16); out2 = (q15_t) __SSAT((mul2 + NN_ROUND(out_shift)) >> out_shift, 16); out3 = (q15_t) __SSAT((mul3 + NN_ROUND(out_shift)) >> out_shift, 16); out4 = (q15_t) __SSAT((mul4 + NN_ROUND(out_shift)) >> out_shift, 16); /* store the result */ #ifndef ARM_MATH_BIG_ENDIAN *__SIMD32(pDst)++ = __PKHBT(out2, out1, 16); *__SIMD32(pDst)++ = __PKHBT(out4, out3, 16); #else *__SIMD32(pDst)++ = __PKHBT(out2, out1, 16); *__SIMD32(pDst)++ = __PKHBT(out4, out3, 16); #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ /* Decrement the blockSize loop counter */ blkCnt--; } /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ blkCnt = blockSize % 0x4U; #else /* Run the below code for Cortex-M0 */ /* Initialize blkCnt with number of samples */ blkCnt = blockSize; #endif /* #if defined (ARM_MATH_DSP) */ while (blkCnt > 0U) { /* C = A * B */ /* Multiply the inputs and store the result in the destination buffer */ *pDst++ = (q15_t) __SSAT((((q31_t) (*pSrcA++) * (*pSrcB++) + NN_ROUND(out_shift)) >> out_shift), 16); /* Decrement the blockSize loop counter */ blkCnt--; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4019A0", "function_addr": 4200864, "binary_name": "3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_28], rdi"], [3, "mov [rbp+var_30], rsi"], [4, "mov [rbp+var_38], rdx"], [5, "mov eax, ecx"], [6, "mov [rbp+var_40], r8d"], [7, "mov [rbp+var_3C], ax"], [8, "mov eax, [rbp+var_40]"], [9, "mov [rbp+var_4], eax"], [10, "jmp loc_401A6F"], [11, "mov rax, [rbp+var_28]"], [12, "lea rdx, [rax+2]"], [13, "mov [rbp+var_28], rdx"], [14, "movzx eax, word ptr [rax]"], [15, "movsx ecx, ax"], [16, "mov rax, [rbp+var_30]"], [17, "lea rdx, [rax+2]"], [18, "mov [rbp+var_30], rdx"], [19, "movzx eax, word ptr [rax]"], [20, "cwde"], [21, "imul eax, ecx"], [22, "mov esi, eax"], [23, "movzx eax, [rbp+var_3C]"], [24, "mov edx, 1"], [25, "mov ecx, eax"], [26, "shl edx, cl"], [27, "mov eax, edx"], [28, "shr eax, 1"], [29, "lea edx, [rsi+rax]"], [30, "movzx eax, [rbp+var_3C]"], [31, "mov ecx, eax"], [32, "shr edx, cl"], [33, "mov eax, edx"], [34, "mov [rbp+var_8], eax"], [35, "mov [rbp+var_C], 10h"], [36, "cmp [rbp+var_C], 0"], [37, "jz short loc_401A59"], [38, "cmp [rbp+var_C], 20h "], [39, "ja short loc_401A59"], [40, "mov eax, [rbp+var_C]"], [41, "sub eax, 1"], [42, "mov edx, 1"], [43, "mov ecx, eax"], [44, "shl edx, cl"], [45, "mov eax, edx"], [46, "sub eax, 1"], [47, "mov [rbp+var_10], eax"], [48, "mov eax, [rbp+var_10]"], [49, "not eax"], [50, "mov [rbp+var_14], eax"], [51, "mov eax, [rbp+var_8]"], [52, "cmp eax, [rbp+var_10]"], [53, "jle short loc_401A4C"], [54, "mov eax, [rbp+var_10]"], [55, "jmp short loc_401A5C"], [56, "mov eax, [rbp+var_8]"], [57, "cmp eax, [rbp+var_14]"], [58, "jge short loc_401A59"], [59, "mov eax, [rbp+var_14]"], [60, "jmp short loc_401A5C"], [61, "mov eax, [rbp+var_8]"], [62, "mov rdx, [rbp+var_38]"], [63, "lea rcx, [rdx+2]"], [64, "mov [rbp+var_38], rcx"], [65, "mov [rdx], ax"], [66, "sub [rbp+var_4], 1"], [67, "cmp [rbp+var_4], 0"], [68, "jnz loc_4019C5"], [69, "nop"], [70, "nop"], [71, "pop rbp"], [72, "retn"]], "data_dep": [[7, 5], [8, 6], [9, 8], [11, 2], [11, 13], [12, 65], [12, 62], [12, 11], [13, 12], [14, 65], [14, 11], [15, 14], [16, 3], [16, 18], [17, 12], [17, 16], [17, 65], [18, 17], [19, 65], [19, 16], [21, 15], [21, 19], [22, 21], [23, 7], [25, 23], [26, 25], [26, 24], [27, 26], [28, 27], [29, 26], [29, 65], [29, 28], [30, 7], [31, 30], [32, 29], [32, 31], [33, 32], [34, 33], [36, 35], [37, 36], [38, 35], [39, 38], [40, 35], [41, 40], [43, 41], [44, 42], [44, 43], [45, 44], [46, 45], [47, 46], [48, 47], [49, 48], [50, 49], [51, 34], [52, 51], [52, 47], [53, 52], [54, 47], [56, 34], [57, 50], [57, 56], [58, 57], [59, 50], [61, 34], [62, 64], [62, 4], [63, 43], [63, 31], [63, 65], [63, 62], [64, 63], [65, 61], [65, 54], [65, 62], [65, 59], [66, 9], [66, 66], [67, 9], [67, 66], [68, 67], [71, 0], [72, 59], [72, 61], [72, 54], [72, 8]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec_3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.jsonl.gz", "strip_func_name": "sub_4019A0", "query": "\n\n\n__int64 __fastcall sub_4019A0(__int16 *a1, __int16 *a2, _WORD *a3, char a4, unsigned int a5)\n{\n__int64 result; // rax\n__int16 *v6; // rax\nint v7; // ecx\n__int16 *v8; // rax\n_WORD *v9; // rdx\nsigned int v14; // [rsp+38h] [rbp-8h]\nunsigned int i; // [rsp+3Ch] [rbp-4h]\n\nresult = a5;\nfor ( i = a5; i; --i )\n{\nv6 = a1++;\nv7 = *v6;\nv8 = a2++;\nv14 = (v7 * *v8 + ((unsigned int)(1 << a4) >> 1)) >> a4;\nif ( v14 <= 0x7FFF )\n{\nif ( v14 >= -32768 )\nresult = (unsigned int)v14;\nelse\nresult = 4294934528LL;\n}\nelse\n{\nresult = 0x7FFFLL;\n}\nv9 = a3++;\n*v9 = result;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,sub_4019A0,]", "hints": "[]", "response": "{'a3': 'pDst', 'a4': 'out_shift', 'a1': 'pSrcA', 'a2': 'pSrcB', 'a5': 'blockSize', 'sub_4019A0': 'arm_nn_mult_q15'}"}
[ [ 0.7519259452819824, 0.7259952425956726, 0.7223071455955505, 0.71454918384552, 0.7135211825370789, 0.7121118903160095, 0.7107779383659363, 0.7089254856109619, 0.7088937163352966, 0.7067911624908447, 0.7013500928878784, 0.701051652431488, 0.7000741958618164, 0.6990060806274414, 0.6987773776054382, 0.6982235908508301, 0.6977649331092834, 0.6966131329536438, 0.6959913372993469, 0.6927338242530823 ], [ 246259, 137466, 100352, 53410, 98795, 101914, 235064, 193836, 33816, 262563, 242572, 245195, 213348, 93701, 171732, 86770, 54595, 107440, 192300, 262386 ] ]
core_collect
f8cb41d5158446c23a3e7f0986d25486be3561b437eede214466bf1444eb62c7
cbdevnet
midimonster
NA
static fd_set core_collect(int* max_fd){ size_t u = 0; fd_set rv_fds; if(max_fd){ *max_fd = -1; } DBGPF("Building selector set from %" PRIsize_t " FDs registered to core", fds); FD_ZERO(&rv_fds); for(u = 0; u < fds.n; u++){ if(fds.fd[u].fd >= 0){ FD_SET(fds.fd[u].fd, &rv_fds); if(max_fd){ *max_fd = max(*max_fd, fds.fd[u].fd); } } } return rv_fds; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402A45", "function_addr": 4205125, "binary_name": "f8cb41d5158446c23a3e7f0986d25486be3561b437eede214466bf1444eb62c7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 28h"], [4, "mov [rbp+var_A0], rdi"], [5, "mov [rbp+var_A8], rsi"], [6, "mov [rbp+var_10], 0"], [7, "cmp [rbp+var_A8], 0"], [8, "jz short loc_402A7B"], [9, "mov rax, [rbp+var_A8]"], [10, "mov dword ptr [rax], 0FFFFFFFFh"], [11, "mov eax, 0"], [12, "mov ecx, 10h"], [13, "lea rdx, [rbp+var_98]"], [14, "mov rdi, rdx"], [15, "cld"], [16, "rep stosq"], [17, "mov eax, edi"], [18, "mov edx, ecx"], [19, "mov [rbp+var_14], edx"], [20, "mov [rbp+var_18], eax"], [21, "mov [rbp+var_10], 0"], [22, "jmp loc_402B8D"], [23, "mov rcx, cs:ptr"], [24, "mov rdx, [rbp+var_10]"], [25, "mov rax, rdx"], [26, "add rax, rax"], [27, "add rax, rdx"], [28, "shl rax, 3"], [29, "add rax, rcx"], [30, "mov eax, [rax]"], [31, "test eax, eax"], [32, "js loc_402B88"], [33, "mov rcx, cs:ptr"], [34, "mov rdx, [rbp+var_10]"], [35, "mov rax, rdx"], [36, "add rax, rax"], [37, "add rax, rdx"], [38, "shl rax, 3"], [39, "add rax, rcx"], [40, "mov eax, [rax]"], [41, "lea edx, [rax+3Fh]"], [42, "test eax, eax"], [43, "cmovs eax, edx"], [44, "sar eax, 6"], [45, "mov esi, eax"], [46, "movsxd rax, esi"], [47, "mov rdi, [rbp+rax*8+var_98]"], [48, "mov rcx, cs:ptr"], [49, "mov rdx, [rbp+var_10]"], [50, "mov rax, rdx"], [51, "add rax, rax"], [52, "add rax, rdx"], [53, "shl rax, 3"], [54, "add rax, rcx"], [55, "mov eax, [rax]"], [56, "cdq"], [57, "shr edx, 1Ah"], [58, "add eax, edx"], [59, "and eax, 3Fh"], [60, "sub eax, edx"], [61, "mov edx, 1"], [62, "mov ecx, eax"], [63, "shl rdx, cl"], [64, "mov rax, rdx"], [65, "or rdi, rax"], [66, "mov rdx, rdi"], [67, "movsxd rax, esi"], [68, "mov [rbp+rax*8+var_98], rdx"], [69, "cmp [rbp+var_A8], 0"], [70, "jz short loc_402B88"], [71, "mov rcx, cs:ptr"], [72, "mov rdx, [rbp+var_10]"], [73, "mov rax, rdx"], [74, "add rax, rax"], [75, "add rax, rdx"], [76, "shl rax, 3"], [77, "add rax, rcx"], [78, "mov edx, [rax]"], [79, "mov rax, [rbp+var_A8]"], [80, "mov eax, [rax]"], [81, "cmp edx, eax"], [82, "cmovl edx, eax"], [83, "mov rax, [rbp+var_A8]"], [84, "mov [rax], edx"], [85, "add [rbp+var_10], 1"], [86, "mov rax, cs:qword_40B180"], [87, "cmp [rbp+var_10], rax"], [88, "jb loc_402AAA"], [89, "mov rax, [rbp+var_A0]"], [90, "mov rcx, [rbp+var_98]"], [91, "mov rbx, [rbp+var_90]"], [92, "mov [rax], rcx"], [93, "mov [rax+8], rbx"], [94, "mov rcx, [rbp+var_88]"], [95, "mov rbx, [rbp+var_80]"], [96, "mov [rax+10h], rcx"], [97, "mov [rax+18h], rbx"], [98, "mov rcx, [rbp+var_78]"], [99, "mov rbx, [rbp+var_70]"], [100, "mov [rax+20h], rcx"], [101, "mov [rax+28h], rbx"], [102, "mov rcx, [rbp+var_68]"], [103, "mov rbx, [rbp+var_60]"], [104, "mov [rax+30h], rcx"], [105, "mov [rax+38h], rbx"], [106, "mov rcx, [rbp+var_58]"], [107, "mov rbx, [rbp+var_50]"], [108, "mov [rax+40h], rcx"], [109, "mov [rax+48h], rbx"], [110, "mov rcx, [rbp+var_48]"], [111, "mov rbx, [rbp+var_40]"], [112, "mov [rax+50h], rcx"], [113, "mov [rax+58h], rbx"], [114, "mov rcx, [rbp+var_38]"], [115, "mov rbx, [rbp+var_30]"], [116, "mov [rax+60h], rcx"], [117, "mov [rax+68h], rbx"], [118, "mov rcx, [rbp+var_28]"], [119, "mov rbx, [rbp+var_20]"], [120, "mov [rax+70h], rcx"], [121, "mov [rax+78h], rbx"], [122, "mov rax, [rbp+var_A0]"], [123, "mov rbx, [rbp+var_8]"], [124, "leave"], [125, "retn"]], "data_dep": [[7, 5], [8, 7], [9, 5], [10, 9], [14, 13], [17, 14], [18, 12], [19, 18], [20, 17], [24, 21], [24, 85], [25, 24], [26, 25], [27, 24], [27, 26], [28, 27], [29, 28], [29, 23], [30, 84], [30, 29], [30, 10], [31, 30], [32, 31], [34, 21], [34, 85], [35, 34], [36, 35], [37, 34], [37, 36], [38, 37], [39, 33], [39, 38], [40, 84], [40, 10], [40, 39], [41, 40], [41, 10], [41, 84], [41, 34], [42, 40], [43, 41], [43, 42], [44, 43], [45, 44], [46, 45], [47, 68], [47, 46], [49, 21], [49, 85], [50, 49], [51, 50], [52, 49], [52, 51], [53, 52], [54, 53], [54, 48], [55, 84], [55, 54], [55, 10], [57, 49], [58, 55], [58, 57], [59, 58], [60, 57], [60, 59], [62, 60], [63, 61], [63, 62], [64, 63], [65, 47], [65, 64], [66, 65], [67, 45], [68, 66], [68, 67], [69, 5], [70, 69], [72, 21], [72, 85], [73, 72], [74, 73], [75, 72], [75, 74], [76, 75], [77, 76], [77, 71], [78, 77], [78, 10], [78, 84], [79, 5], [80, 10], [80, 84], [80, 79], [81, 78], [81, 80], [82, 81], [82, 80], [83, 5], [84, 83], [84, 82], [85, 21], [85, 85], [87, 86], [87, 21], [87, 85], [88, 87], [89, 4], [92, 90], [92, 89], [93, 89], [93, 91], [96, 94], [96, 89], [97, 95], [97, 89], [100, 89], [100, 98], [101, 99], [101, 89], [104, 89], [104, 102], [105, 103], [105, 89], [108, 106], [108, 89], [109, 89], [109, 107], [112, 110], [112, 89], [113, 89], [113, 111], [116, 89], [116, 114], [117, 89], [117, 115], [120, 89], [120, 118], [121, 89], [121, 119], [122, 4], [125, 122]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/f8cb41d5158446c23a3e7f0986d25486be3561b437eede214466bf1444eb62c7_f8cb41d5158446c23a3e7f0986d25486be3561b437eede214466bf1444eb62c7.jsonl.gz", "strip_func_name": "sub_402A45", "query": "\n\n\n_QWORD *__fastcall sub_402A45(_QWORD *a1, int *a2)\n{\nint v2; // edx\n__int64 v3; // rbx\n__int64 v4; // rbx\n__int64 v5; // rbx\n__int64 v6; // rbx\n__int64 v7; // rbx\n__int64 v8; // rbx\n__int64 v9; // rbx\n__int64 v10; // rbx\n__int64 v12[16]; // [rsp+10h] [rbp-98h] BYREF\nint v13[2]; // [rsp+90h] [rbp-18h] BYREF\nunsigned __int64 i; // [rsp+98h] [rbp-10h]\n\ni = 0LL;\nif ( a2 )\n*a2 = -1;\nmemset(v12, 0, sizeof(v12));\nv13[1] = 0;\nv13[0] = (unsigned int)v13;\nfor ( i = 0LL; i < qword_40B180; ++i )\n{\nif ( *((int *)ptr + 6 * i) >= 0 )\n{\nv12[*((_DWORD *)ptr + 6 * i) / 64] |= 1LL << (*((_DWORD *)ptr + 6 * i) % 64);\nif ( a2 )\n{\nv2 = *((_DWORD *)ptr + 6 * i);\nif ( v2 < *a2 )\nv2 = *a2;\n*a2 = v2;\n}\n}\n}\nv3 = v12[1];\n*a1 = v12[0];\na1[1] = v3;\nv4 = v12[3];\na1[2] = v12[2];\na1[3] = v4;\nv5 = v12[5];\na1[4] = v12[4];\na1[5] = v5;\nv6 = v12[7];\na1[6] = v12[6];\na1[7] = v6;\nv7 = v12[9];\na1[8] = v12[8];\na1[9] = v7;\nv8 = v12[11];\na1[10] = v12[10];\na1[11] = v8;\nv9 = v12[13];\na1[12] = v12[12];\na1[13] = v9;\nv10 = v12[15];\na1[14] = v12[14];\na1[15] = v10;\nreturn a1;\n}\n\n\n\nQ:[a1,a2,v12,v13,i,sub_402A45,]", "hints": "[]", "response": "{'a1': 'retstr', 'a2': 'max_fd', 'v12': 'rv_fds', 'v13': '__d1', 'i': 'u', 'sub_402A45': 'core_collect'}"}
[ [ 0.7119371891021729, 0.705492377281189, 0.666651725769043, 0.6506080627441406, 0.6467084288597107, 0.6442453861236572, 0.6402556300163269, 0.6321572661399841, 0.6320508718490601, 0.6243032813072205, 0.623429536819458, 0.6199743747711182, 0.6184205412864685, 0.618287980556488, 0.6160378456115723, 0.6143507361412048, 0.613844633102417, 0.6128512620925903, 0.6125949621200562, 0.6123936176300049 ], [ 2426, 88518, 216410, 185415, 90159, 218237, 183338, 109166, 156920, 47763, 30991, 185044, 238264, 55379, 250266, 18786, 221027, 6797, 11938, 31444 ] ]
arm_lms_norm_init_f32
3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec
gwsystems
sledge-serverless-framework
NA
void arm_lms_norm_init_f32( arm_lms_norm_instance_f32 * S, uint16_t numTaps, float32_t * pCoeffs, float32_t * pState, float32_t mu, uint32_t blockSize) { /* Assign filter taps */ S->numTaps = numTaps; /* Assign coefficient pointer */ S->pCoeffs = pCoeffs; /* Clear state buffer and size is always blockSize + numTaps - 1 */ memset(pState, 0, (numTaps + (blockSize - 1U)) * sizeof(float32_t)); /* Assign state pointer */ S->pState = pState; /* Assign Step size value */ S->mu = mu; /* Initialise Energy to zero */ S->energy = 0.0f; /* Initialise x0 to zero */ S->x0 = 0.0f; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41D321", "function_addr": 4313889, "binary_name": "3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_8], rdi"], [4, "mov eax, esi"], [5, "mov [rbp+var_18], rdx"], [6, "mov [rbp+s], rcx"], [7, "movss [rbp+var_10], xmm0"], [8, "mov [rbp+var_24], r8d"], [9, "mov [rbp+var_C], ax"], [10, "mov rax, [rbp+var_8]"], [11, "movzx edx, [rbp+var_C]"], [12, "mov [rax], dx"], [13, "mov rax, [rbp+var_8]"], [14, "mov rdx, [rbp+var_18]"], [15, "mov [rax+10h], rdx"], [16, "movzx edx, [rbp+var_C]"], [17, "mov eax, [rbp+var_24]"], [18, "add eax, edx"], [19, "sub eax, 1"], [20, "mov eax, eax"], [21, "lea rdx, ds:0[rax*4]"], [22, "mov rax, [rbp+s]"], [23, "mov esi, 0"], [24, "mov rdi, rax"], [25, "call _memset"], [26, "mov rax, [rbp+var_8]"], [27, "mov rdx, [rbp+s]"], [28, "mov [rax+8], rdx"], [29, "mov rax, [rbp+var_8]"], [30, "movss xmm0, [rbp+var_10]"], [31, "movss dword ptr [rax+18h], xmm0"], [32, "mov rax, [rbp+var_8]"], [33, "pxor xmm0, xmm0"], [34, "movss dword ptr [rax+1Ch], xmm0"], [35, "mov rax, [rbp+var_8]"], [36, "pxor xmm0, xmm0"], [37, "movss dword ptr [rax+20h], xmm0"], [38, "nop"], [39, "leave"], [40, "retn"]], "data_dep": [[9, 4], [10, 3], [11, 9], [12, 10], [12, 11], [13, 3], [14, 5], [15, 14], [15, 13], [16, 9], [17, 8], [18, 17], [18, 16], [19, 18], [20, 19], [21, 16], [22, 6], [24, 22], [26, 3], [27, 6], [28, 27], [28, 26], [29, 3], [30, 7], [31, 29], [31, 30], [32, 3], [34, 33], [34, 32], [35, 3], [37, 36], [37, 35], [40, 35]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec_3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.jsonl.gz", "strip_func_name": "sub_41D321", "query": "\n\n\n__int64 __fastcall sub_41D321(__int64 a1, unsigned __int16 a2, __int64 a3, void *a4, int a5, float a6)\n{\n__int64 result; // rax\n\n*(_WORD *)a1 = a2;\n*(_QWORD *)(a1 + 16) = a3;\nmemset(a4, 0, 4LL * ((unsigned int)a2 + a5 - 1));\n*(_QWORD *)(a1 + 8) = a4;\n*(float *)(a1 + 24) = a6;\n*(_DWORD *)(a1 + 28) = 0;\nresult = a1;\n*(_DWORD *)(a1 + 32) = 0;\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,sub_41D321,]", "hints": "[]", "response": "{'a3': 'pCoeffs', 'a4': 'pState', 'a1': 'S', 'a2': 'numTaps', 'a5': 'blockSize', 'a6': 'mu', 'sub_41D321': 'arm_lms_norm_init_f32'}"}
[ [ 0.7318249940872192, 0.718108594417572, 0.715457022190094, 0.7044660449028015, 0.69358891248703, 0.6874340772628784, 0.6868501901626587, 0.6821993589401245, 0.6814606785774231, 0.6784661412239075, 0.6755908727645874, 0.6743727326393127, 0.6729859113693237, 0.6716456413269043, 0.6671443581581116, 0.6659420728683472, 0.6657330989837646, 0.665584921836853, 0.6653198003768921, 0.6629970073699951 ], [ 125134, 70495, 84361, 257369, 28263, 228667, 47492, 79329, 74872, 46315, 60609, 175175, 127124, 162716, 239096, 156064, 168009, 21595, 143487, 139067 ] ]
arm_mat_add_q15
3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec
gwsystems
sledge-serverless-framework
NA
arm_status arm_mat_add_q15( const arm_matrix_instance_q15 * pSrcA, const arm_matrix_instance_q15 * pSrcB, arm_matrix_instance_q15 * pDst) { q15_t *pInA = pSrcA->pData; /* input data matrix pointer A */ q15_t *pInB = pSrcB->pData; /* input data matrix pointer B */ q15_t *pOut = pDst->pData; /* output data matrix pointer */ uint32_t numSamples; /* total number of elements in the matrix */ uint32_t blkCnt; /* loop counters */ arm_status status; /* status of matrix addition */ #ifdef ARM_MATH_MATRIX_CHECK /* Check for matrix mismatch condition */ if ((pSrcA->numRows != pSrcB->numRows) || (pSrcA->numCols != pSrcB->numCols) || (pSrcA->numRows != pDst->numRows) || (pSrcA->numCols != pDst->numCols) ) { /* Set status as ARM_MATH_SIZE_MISMATCH */ status = ARM_MATH_SIZE_MISMATCH; } else #endif /* #ifdef ARM_MATH_MATRIX_CHECK */ { /* Total number of samples in input matrix */ numSamples = (uint32_t) pSrcA->numRows * pSrcA->numCols; #if defined (ARM_MATH_LOOPUNROLL) /* Loop unrolling: Compute 4 outputs at a time */ blkCnt = numSamples >> 2U; while (blkCnt > 0U) { /* C(m,n) = A(m,n) + B(m,n) */ /* Add, saturate and store result in destination buffer. */ #if defined (ARM_MATH_DSP) write_q15x2_ia (&pOut, __QADD16(read_q15x2_ia (&pInA), read_q15x2_ia (&pInB))); write_q15x2_ia (&pOut, __QADD16(read_q15x2_ia (&pInA), read_q15x2_ia (&pInB))); #else *pOut++ = (q15_t) __SSAT(((q31_t) *pInA++ + *pInB++), 16); *pOut++ = (q15_t) __SSAT(((q31_t) *pInA++ + *pInB++), 16); *pOut++ = (q15_t) __SSAT(((q31_t) *pInA++ + *pInB++), 16); *pOut++ = (q15_t) __SSAT(((q31_t) *pInA++ + *pInB++), 16); #endif /* Decrement loop counter */ blkCnt--; } /* Loop unrolling: Compute remaining outputs */ blkCnt = numSamples % 0x4U; #else /* Initialize blkCnt with number of samples */ blkCnt = numSamples; #endif /* #if defined (ARM_MATH_LOOPUNROLL) */ while (blkCnt > 0U) { /* C(m,n) = A(m,n) + B(m,n) */ /* Add, saturate and store result in destination buffer. */ #if defined (ARM_MATH_DSP) *pOut++ = (q15_t) __QADD16(*pInA++, *pInB++); #else *pOut++ = (q15_t) __SSAT(((q31_t) *pInA++ + *pInB++), 16); #endif /* Decrement loop counter */ blkCnt--; } /* Set status as ARM_MATH_SUCCESS */ status = ARM_MATH_SUCCESS; } /* Return to application */ return (status); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_406C5E", "function_addr": 4222046, "binary_name": "3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_48], rdi"], [3, "mov [rbp+var_50], rsi"], [4, "mov [rbp+var_58], rdx"], [5, "mov rax, [rbp+var_48]"], [6, "mov rax, [rax+8]"], [7, "mov [rbp+var_8], rax"], [8, "mov rax, [rbp+var_50]"], [9, "mov rax, [rax+8]"], [10, "mov [rbp+var_10], rax"], [11, "mov rax, [rbp+var_58]"], [12, "mov rax, [rax+8]"], [13, "mov [rbp+var_18], rax"], [14, "mov rax, [rbp+var_48]"], [15, "movzx eax, word ptr [rax]"], [16, "movzx edx, ax"], [17, "mov rax, [rbp+var_48]"], [18, "movzx eax, word ptr [rax+2]"], [19, "movzx eax, ax"], [20, "imul eax, edx"], [21, "mov [rbp+var_20], eax"], [22, "mov eax, [rbp+var_20]"], [23, "mov [rbp+var_1C], eax"], [24, "jmp loc_406D41"], [25, "mov rax, [rbp+var_8]"], [26, "lea rdx, [rax+2]"], [27, "mov [rbp+var_8], rdx"], [28, "movzx eax, word ptr [rax]"], [29, "movsx ecx, ax"], [30, "mov rax, [rbp+var_10]"], [31, "lea rdx, [rax+2]"], [32, "mov [rbp+var_10], rdx"], [33, "movzx eax, word ptr [rax]"], [34, "cwde"], [35, "add eax, ecx"], [36, "mov [rbp+var_28], eax"], [37, "mov [rbp+var_2C], 10h"], [38, "cmp [rbp+var_2C], 0"], [39, "jz short loc_406D2B"], [40, "cmp [rbp+var_2C], 20h "], [41, "ja short loc_406D2B"], [42, "mov eax, [rbp+var_2C]"], [43, "sub eax, 1"], [44, "mov edx, 1"], [45, "mov ecx, eax"], [46, "shl edx, cl"], [47, "mov eax, edx"], [48, "sub eax, 1"], [49, "mov [rbp+var_30], eax"], [50, "mov eax, [rbp+var_30]"], [51, "not eax"], [52, "mov [rbp+var_34], eax"], [53, "mov eax, [rbp+var_28]"], [54, "cmp eax, [rbp+var_30]"], [55, "jle short loc_406D1E"], [56, "mov eax, [rbp+var_30]"], [57, "jmp short loc_406D2E"], [58, "mov eax, [rbp+var_28]"], [59, "cmp eax, [rbp+var_34]"], [60, "jge short loc_406D2B"], [61, "mov eax, [rbp+var_34]"], [62, "jmp short loc_406D2E"], [63, "mov eax, [rbp+var_28]"], [64, "mov rdx, [rbp+var_18]"], [65, "lea rcx, [rdx+2]"], [66, "mov [rbp+var_18], rcx"], [67, "mov [rdx], ax"], [68, "sub [rbp+var_1C], 1"], [69, "cmp [rbp+var_1C], 0"], [70, "jnz loc_406CB8"], [71, "mov [rbp+var_24], 0"], [72, "mov eax, [rbp+var_24]"], [73, "pop rbp"], [74, "retn"]], "data_dep": [[5, 2], [6, 5], [7, 6], [8, 3], [9, 8], [10, 9], [11, 4], [12, 11], [13, 12], [14, 2], [15, 14], [16, 15], [17, 2], [18, 17], [19, 18], [20, 19], [20, 16], [21, 20], [22, 21], [23, 22], [25, 27], [25, 7], [26, 16], [26, 25], [26, 64], [26, 67], [27, 26], [28, 67], [28, 25], [29, 28], [30, 10], [30, 32], [31, 26], [31, 67], [31, 30], [32, 31], [33, 67], [33, 30], [35, 33], [35, 29], [36, 35], [38, 37], [39, 38], [40, 37], [41, 40], [42, 37], [43, 42], [45, 43], [46, 45], [46, 44], [47, 46], [48, 47], [49, 48], [50, 49], [51, 50], [52, 51], [53, 36], [54, 49], [54, 53], [55, 54], [56, 49], [58, 36], [59, 52], [59, 58], [60, 59], [61, 52], [63, 36], [64, 66], [64, 13], [65, 45], [65, 29], [65, 67], [65, 64], [66, 65], [67, 61], [67, 63], [67, 56], [67, 64], [68, 68], [68, 23], [69, 23], [69, 68], [70, 69], [72, 71], [73, 0], [74, 72]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec_3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.jsonl.gz", "strip_func_name": "sub_406C5E", "query": "\n\n\n__int64 __fastcall sub_406C5E(unsigned __int16 *a1, __int64 a2, __int64 a3)\n{\n__int16 *v3; // rax\nint v4; // ecx\n__int16 *v5; // rax\n__int16 v6; // ax\n__int16 *v7; // rdx\nint v9; // [rsp+30h] [rbp-28h]\nint i; // [rsp+3Ch] [rbp-1Ch]\n__int16 *v11; // [rsp+40h] [rbp-18h]\n__int16 *v12; // [rsp+48h] [rbp-10h]\n__int16 *v13; // [rsp+50h] [rbp-8h]\n\nv13 = (__int16 *)*((_QWORD *)a1 + 1);\nv12 = *(__int16 **)(a2 + 8);\nv11 = *(__int16 **)(a3 + 8);\nfor ( i = *a1 * a1[1]; i; --i )\n{\nv3 = v13++;\nv4 = *v3;\nv5 = v12++;\nv9 = v4 + *v5;\nif ( v9 <= 0x7FFF )\n{\nif ( v9 >= -32768 )\nv6 = v4 + *v5;\nelse\nv6 = 0x8000;\n}\nelse\n{\nv6 = 0x7FFF;\n}\nv7 = v11++;\n*v7 = v6;\n}\nreturn 0LL;\n}\n\n\n\nQ:[a3,a1,a2,i,v11,v12,v13,sub_406C5E,]", "hints": "[]", "response": "{'a3': 'pDst', 'a1': 'pSrcA', 'a2': 'pSrcB', 'i': 'blkCnt', 'v11': 'pOut', 'v12': 'pInB', 'v13': 'pInA', 'sub_406C5E': 'arm_mat_add_q15'}"}
[ [ 0.7923471331596375, 0.7866745591163635, 0.7651664018630981, 0.7591550946235657, 0.7439897060394287, 0.7422904968261719, 0.7392968535423279, 0.7379050254821777, 0.7330219745635986, 0.7280659675598145, 0.7178763747215271, 0.7160513997077942, 0.7158458828926086, 0.7142614722251892, 0.7132671475410461, 0.7127869129180908, 0.7125336527824402, 0.7123579382896423, 0.7115093469619751, 0.7109454870223999 ], [ 172592, 6040, 242588, 112963, 206909, 140602, 138395, 103069, 143859, 7818, 146983, 105989, 247831, 148127, 13648, 105791, 249346, 24449, 92016, 6108 ] ]
zyxel_bootconfig_write
2e038a1b8d14fbecdfc51c05b78027024b42371990c17dce1ecf29faf7d693f4
openwrt
openwrt
NA
static int zyxel_bootconfig_write(struct zyxel_bootconfig *config, struct zyxel_bootconfig_mtd *mtd) { struct erase_info_user erase_info; char img_status, img_active; char *args = NULL; int ret = 0; /* Allocate memory for reading boot-config partition */ args = calloc(1, mtd->mtd_info.erasesize); if (!args) { fprintf(stderr, "Could not allocate memory!\n"); ret = -1; goto out; } /* Read bootconfig partition */ pread(mtd->fd, args, mtd->mtd_info.erasesize, 0); img_status = IMAGE_STATUS(config->image0_status, config->image1_status); img_active = ACTIVE_IMAGE(config->active_image); /* Check if bootconfig has to be written */ if (args[BOOTCONFIG_IMAGE_STATUS] == img_status && args[BOOTCONFIG_ACTIVE_IMAGE] == img_active) { ret = 0; goto out; } /* Erase first block (containing the magic) */ erase_info.start = 0; erase_info.length = mtd->mtd_info.erasesize; ret = ioctl(mtd->fd, MEMERASE, &erase_info); if (ret < 0) { fprintf(stderr, "Failed to erase block: %i\n", ret); goto out; } /* Write bootconfig */ args[BOOTCONFIG_IMAGE_STATUS] = img_status; args[BOOTCONFIG_ACTIVE_IMAGE] = img_active; if (pwrite(mtd->fd, args, mtd->mtd_info.erasesize, 0) != mtd->mtd_info.erasesize) { fprintf(stderr, "Error writing bootconfig!\n"); ret = -1; goto out; } out: if (args) free(args); return ret; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401470", "function_addr": 4199536, "binary_name": "2e038a1b8d14fbecdfc51c05b78027024b42371990c17dce1ecf29faf7d693f4.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+buf], 0"], [6, "mov [rbp+var_4], 0"], [7, "mov rax, [rbp+var_30]"], [8, "mov eax, [rax+0Ch]"], [9, "mov eax, eax"], [10, "mov rsi, rax"], [11, "mov edi, 1"], [12, "call _calloc"], [13, "mov [rbp+buf], rax"], [14, "cmp [rbp+buf], 0"], [15, "jnz short loc_4014DA"], [16, "mov rax, cs:stderr"], [17, "mov rcx, rax"], [18, "mov edx, 1Bh"], [19, "mov esi, 1"], [20, "mov edi, offset aCouldNotAlloca"], [21, "call _fwrite"], [22, "mov [rbp+var_4], 0FFFFFFFFh"], [23, "jmp loc_40160E"], [24, "mov rax, [rbp+var_30]"], [25, "mov eax, [rax+0Ch]"], [26, "mov edx, eax"], [27, "mov rax, [rbp+var_30]"], [28, "mov eax, [rax+20h]"], [29, "mov rsi, [rbp+buf]"], [30, "mov ecx, 0"], [31, "mov edi, eax"], [32, "call _pread"], [33, "mov rax, [rbp+var_28]"], [34, "mov eax, [rax]"], [35, "shl eax, 2"], [36, "and eax, 0Ch"], [37, "mov edx, eax"], [38, "mov rax, [rbp+var_28]"], [39, "mov eax, [rax+4]"], [40, "shl eax, 6"], [41, "or eax, edx"], [42, "mov [rbp+var_11], al"], [43, "mov rax, [rbp+var_28]"], [44, "mov eax, [rax+8]"], [45, "and eax, 1"], [46, "mov [rbp+var_12], al"], [47, "mov rax, [rbp+buf]"], [48, "movzx eax, byte ptr [rax]"], [49, "cmp [rbp+var_11], al"], [50, "jnz short loc_40154C"], [51, "mov rax, [rbp+buf]"], [52, "add rax, 1"], [53, "movzx eax, byte ptr [rax]"], [54, "cmp [rbp+var_12], al"], [55, "jnz short loc_40154C"], [56, "mov [rbp+var_4], 0"], [57, "jmp loc_40160E"], [58, "mov [rbp+var_1C], 0"], [59, "mov rax, [rbp+var_30]"], [60, "mov eax, [rax+0Ch]"], [61, "mov [rbp+var_18], eax"], [62, "mov rax, [rbp+var_30]"], [63, "mov eax, [rax+20h]"], [64, "lea rdx, [rbp+var_1C]"], [65, "mov esi, 40084D02h"], [66, "mov edi, eax"], [67, "mov eax, 0"], [68, "call _ioctl"], [69, "mov [rbp+var_4], eax"], [70, "cmp [rbp+var_4], 0"], [71, "jns short loc_4015A0"], [72, "mov rax, cs:stderr"], [73, "mov edx, [rbp+var_4]"], [74, "mov esi, offset aFailedToEraseB"], [75, "mov rdi, rax"], [76, "mov eax, 0"], [77, "call _fprintf"], [78, "jmp short loc_40160E"], [79, "mov rax, [rbp+buf]"], [80, "movzx edx, [rbp+var_11]"], [81, "mov [rax], dl"], [82, "mov rax, [rbp+buf]"], [83, "lea rdx, [rax+1]"], [84, "movzx eax, [rbp+var_12]"], [85, "mov [rdx], al"], [86, "mov rax, [rbp+var_30]"], [87, "mov eax, [rax+0Ch]"], [88, "mov edx, eax"], [89, "mov rax, [rbp+var_30]"], [90, "mov eax, [rax+20h]"], [91, "mov rsi, [rbp+buf]"], [92, "mov ecx, 0"], [93, "mov edi, eax"], [94, "call _pwrite"], [95, "mov rdx, [rbp+var_30]"], [96, "mov edx, [rdx+0Ch]"], [97, "mov edx, edx"], [98, "cmp rax, rdx"], [99, "jz short loc_40160D"], [100, "mov rax, cs:stderr"], [101, "mov rcx, rax"], [102, "mov edx, 1Ah"], [103, "mov esi, 1"], [104, "mov edi, offset aErrorWritingBo"], [105, "call _fwrite"], [106, "mov [rbp+var_4], 0FFFFFFFFh"], [107, "jmp short loc_40160E"], [108, "nop"], [109, "cmp [rbp+buf], 0"], [110, "jz short loc_401621"], [111, "mov rax, [rbp+buf]"], [112, "mov rdi, rax"], [113, "call _free"], [114, "mov eax, [rbp+var_4]"], [115, "leave"], [116, "retn"]], "data_dep": [[7, 4], [8, 7], [9, 8], [10, 9], [13, 12], [14, 13], [15, 14], [17, 16], [24, 4], [25, 24], [26, 25], [27, 4], [28, 27], [29, 13], [31, 28], [33, 3], [34, 33], [35, 34], [36, 35], [37, 36], [38, 3], [39, 38], [40, 39], [41, 40], [41, 37], [42, 41], [43, 3], [44, 43], [45, 44], [46, 45], [47, 13], [48, 47], [49, 48], [49, 42], [50, 49], [51, 13], [52, 51], [53, 52], [54, 53], [54, 46], [55, 54], [59, 4], [60, 59], [61, 60], [62, 4], [63, 62], [64, 58], [64, 37], [66, 63], [69, 68], [70, 69], [71, 70], [73, 69], [75, 72], [79, 13], [80, 42], [81, 80], [81, 79], [82, 13], [83, 80], [83, 82], [83, 81], [84, 46], [85, 84], [85, 83], [86, 4], [87, 86], [87, 85], [88, 87], [89, 4], [90, 85], [90, 89], [91, 13], [93, 90], [95, 4], [96, 95], [96, 85], [97, 96], [98, 94], [98, 97], [99, 98], [101, 100], [109, 13], [110, 109], [111, 13], [112, 111], [114, 56], [114, 106], [114, 69], [114, 22], [116, 114]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/2e038a1b8d14fbecdfc51c05b78027024b42371990c17dce1ecf29faf7d693f4_2e038a1b8d14fbecdfc51c05b78027024b42371990c17dce1ecf29faf7d693f4.jsonl.gz", "strip_func_name": "sub_401470", "query": "\n\n\n__int64 __fastcall sub_401470(_DWORD *a1, __int64 a2)\n{\nint v3[2]; // [rsp+14h] [rbp-1Ch] BYREF\nchar v4; // [rsp+1Eh] [rbp-12h]\nchar v5; // [rsp+1Fh] [rbp-11h]\nvoid *buf; // [rsp+20h] [rbp-10h]\nunsigned int v7; // [rsp+2Ch] [rbp-4h]\n\nbuf = 0LL;\nv7 = 0;\nbuf = calloc(1uLL, *(unsigned int *)(a2 + 12));\nif ( buf )\n{\npread(*(_DWORD *)(a2 + 32), buf, *(unsigned int *)(a2 + 12), 0LL);\nv5 = (4 * *a1) & 0xC | ((unsigned __int8)a1[1] << 6);\nv4 = a1[2] & 1;\nif ( v5 == *(_BYTE *)buf && v4 == *((_BYTE *)buf + 1) )\n{\nv7 = 0;\n}\nelse\n{\nv3[0] = 0;\nv3[1] = *(_DWORD *)(a2 + 12);\nv7 = ioctl(*(_DWORD *)(a2 + 32), 0x40084D02uLL, v3);\nif ( (v7 & 0x80000000) == 0 )\n{\n*(_BYTE *)buf = v5;\n*((_BYTE *)buf + 1) = v4;\nif ( pwrite(*(_DWORD *)(a2 + 32), buf, *(unsigned int *)(a2 + 12), 0LL) != *(_DWORD *)(a2 + 12) )\n{\nfwrite(\"Error writing bootconfig!\\n\", 1uLL, 0x1AuLL, stderr);\nv7 = -1;\n}\n}\nelse\n{\nfprintf(stderr, \"Failed to erase block: %i\\n\", v7);\n}\n}\n}\nelse\n{\nfwrite(\"Could not allocate memory!\\n\", 1uLL, 0x1BuLL, stderr);\nv7 = -1;\n}\nif ( buf )\nfree(buf);\nreturn v7;\n}\n\n\n\nQ:[a1,a2,v3,v4,v5,buf,sub_401470,]", "hints": "[]", "response": "{'a1': 'config', 'a2': 'mtd', 'v3': 'erase_info', 'v4': 'img_active', 'v5': 'img_status', 'buf': 'args', 'sub_401470': 'zyxel_bootconfig_write'}"}
[ [ 0.6759350299835205, 0.6749915480613708, 0.6736414432525635, 0.6724690198898315, 0.6700928211212158, 0.6698002815246582, 0.6668808460235596, 0.6645908951759338, 0.6645433306694031, 0.664383053779602, 0.6616131067276001, 0.6613783240318298, 0.6611003875732422, 0.6579873561859131, 0.6542816162109375, 0.64896559715271, 0.6457898616790771, 0.6441371440887451, 0.6423812508583069, 0.6395884156227112 ], [ 253320, 207725, 214295, 178078, 170538, 40044, 2186, 64732, 207695, 126284, 36533, 199460, 140172, 249444, 146787, 250632, 23967, 174823, 109663, 37165 ] ]
AuthenticatedUser_getType
ff8ff7374fd9abd9716a29b0df0eb0854160b16481658efc9dc3c2fb8b26960e
RealTimeLogic
BAS
NA
BA_API AuthenticatedUserType AuthenticatedUser_getType(AuthenticatedUser* o) { if(o->derivedType==BasicAuthUser_derivedType) return AuthenticatedUserType_Basic; if(o->derivedType==DigestAuthUser_derivedType) return AuthenticatedUserType_Digest; if(o->derivedType==FormAuthUser_derivedType) return AuthenticatedUserType_Form; return AuthenticatedUserType_Unknown; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_438354", "function_addr": 4424532, "binary_name": "ff8ff7374fd9abd9716a29b0df0eb0854160b16481658efc9dc3c2fb8b26960e.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+38h]"], [5, "cmp rax, offset aBau"], [6, "jnz short loc_438373"], [7, "mov eax, 2"], [8, "jmp short loc_4383A6"], [9, "mov rax, [rbp+var_8]"], [10, "mov rax, [rax+38h]"], [11, "cmp rax, offset aDau"], [12, "jnz short loc_43838A"], [13, "mov eax, 1"], [14, "jmp short loc_4383A6"], [15, "mov rax, [rbp+var_8]"], [16, "mov rax, [rax+38h]"], [17, "cmp rax, offset aFau"], [18, "jnz short loc_4383A1"], [19, "mov eax, 3"], [20, "jmp short loc_4383A6"], [21, "mov eax, 0"], [22, "pop rbp"], [23, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 5], [9, 2], [10, 9], [11, 10], [12, 11], [15, 2], [16, 15], [17, 16], [18, 17], [22, 0], [23, 7], [23, 13], [23, 19], [23, 21]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/ff8ff7374fd9abd9716a29b0df0eb0854160b16481658efc9dc3c2fb8b26960e_ff8ff7374fd9abd9716a29b0df0eb0854160b16481658efc9dc3c2fb8b26960e.jsonl.gz", "strip_func_name": "sub_438354", "query": "\n\n\n__int64 __fastcall sub_438354(__int64 a1)\n{\nif ( *(char **)(a1 + 56) == \"BAU\" )\nreturn 2LL;\nif ( *(char **)(a1 + 56) == \"DAU\" )\nreturn 1LL;\nif ( *(char **)(a1 + 56) == \"FAU\" )\nreturn 3LL;\nreturn 0LL;\n}\n\n\n\nQ:[a1,sub_438354,]", "hints": "[]", "response": "{'a1': 'o', 'sub_438354': 'AuthenticatedUser_getType'}"}
[ [ 0.7726927995681763, 0.7703903913497925, 0.7534420490264893, 0.7485712766647339, 0.7451863884925842, 0.7387502193450928, 0.7376422882080078, 0.7368229031562805, 0.7355619668960571, 0.7351166009902954, 0.7302406430244446, 0.7258142232894897, 0.7243509292602539, 0.721837043762207, 0.7217803001403809, 0.7198826670646667, 0.7191096544265747, 0.716426432132721, 0.7148492336273193, 0.7081088423728943 ], [ 230272, 228010, 12689, 167080, 240236, 3134, 237772, 138184, 172587, 30696, 42368, 140128, 81854, 129731, 250368, 233834, 97322, 261087, 171730, 84303 ] ]
doshortlink
c9e9b5b3d11acdc1b9b694fd074b5b52f7edc3a705971a298bac22a81d00e1fa
Gottox
smu
NA
int doshortlink(const char *begin, const char *end, int newblock) { const char *p, *c; int ismail = 0; if(*begin != '<') return 0; for(p = begin + 1; p != end; p++) { switch(*p) { case ' ': case '\t': case '\n': return 0; case '#': case ':': ismail = -1; break; case '@': if(ismail == 0) ismail = 1; break; case '>': if(ismail == 0) return 0; fputs("<a href=\"", stdout); if(ismail == 1) { /* mailto: */ fputs("&#x6D;&#x61;i&#x6C;&#x74;&#x6F;:", stdout); for(c = begin + 1; *c != '>'; c++) fprintf(stdout, "&#%u;", *c); fputs("\">", stdout); for(c = begin + 1; *c != '>'; c++) fprintf(stdout, "&#%u;", *c); } else { hprint(begin + 1, p); fputs("\">", stdout); hprint(begin + 1, p); } fputs("</a>", stdout); return p - begin + 1; } } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40278A", "function_addr": 4204426, "binary_name": "c9e9b5b3d11acdc1b9b694fd074b5b52f7edc3a705971a298bac22a81d00e1fa.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_14], 0"], [7, "mov rax, [rbp+var_28]"], [8, "movzx eax, byte ptr [rax]"], [9, "cmp al, 3Ch "], [10, "jz short loc_4027B9"], [11, "mov eax, 0"], [12, "jmp locret_4029A0"], [13, "mov rax, [rbp+var_28]"], [14, "add rax, 1"], [15, "mov [rbp+var_8], rax"], [16, "jmp loc_40298D"], [17, "mov rax, [rbp+var_8]"], [18, "movzx eax, byte ptr [rax]"], [19, "movsx eax, al"], [20, "sub eax, 9"], [21, "cmp eax, 37h"], [22, "ja def_4027EA"], [23, "mov eax, eax"], [24, "mov rax, ds:jpt_4027EA[rax*8]"], [25, "jmp rax"], [26, "mov eax, 0"], [27, "jmp locret_4029A0"], [28, "mov [rbp+var_14], 0FFFFFFFFh"], [29, "jmp def_4027EA"], [30, "cmp [rbp+var_14], 0"], [31, "jnz loc_402987"], [32, "mov [rbp+var_14], 1"], [33, "jmp loc_402987"], [34, "cmp [rbp+var_14], 0"], [35, "jnz short loc_402828"], [36, "mov eax, 0"], [37, "jmp locret_4029A0"], [38, "mov rax, cs:stdout"], [39, "mov rcx, rax"], [40, "mov edx, 9"], [41, "mov esi, 1"], [42, "mov edi, offset aAHref"], [43, "call _fwrite"], [44, "cmp [rbp+var_14], 1"], [45, "jnz loc_402910"], [46, "mov rax, cs:stdout"], [47, "mov rcx, rax"], [48, "mov edx, 20h "], [49, "mov esi, 1"], [50, "mov edi, offset aX6dX61IX6cX74X"], [51, "call _fwrite"], [52, "mov rax, [rbp+var_28]"], [53, "add rax, 1"], [54, "mov [rbp+var_10], rax"], [55, "jmp short loc_4028A4"], [56, "mov rax, [rbp+var_10]"], [57, "movzx eax, byte ptr [rax]"], [58, "movsx edx, al"], [59, "mov rax, cs:stdout"], [60, "mov esi, offset aU"], [61, "mov rdi, rax"], [62, "mov eax, 0"], [63, "call _fprintf"], [64, "add [rbp+var_10], 1"], [65, "mov rax, [rbp+var_10]"], [66, "movzx eax, byte ptr [rax]"], [67, "cmp al, 3Eh "], [68, "jnz short loc_40287C"], [69, "mov rax, cs:stdout"], [70, "mov rcx, rax"], [71, "mov edx, 2"], [72, "mov esi, 1"], [73, "mov edi, offset asc_404257"], [74, "call _fwrite"], [75, "mov rax, [rbp+var_28]"], [76, "add rax, 1"], [77, "mov [rbp+var_10], rax"], [78, "jmp short loc_402903"], [79, "mov rax, [rbp+var_10]"], [80, "movzx eax, byte ptr [rax]"], [81, "movsx edx, al"], [82, "mov rax, cs:stdout"], [83, "mov esi, offset aU"], [84, "mov rdi, rax"], [85, "mov eax, 0"], [86, "call _fprintf"], [87, "add [rbp+var_10], 1"], [88, "mov rax, [rbp+var_10]"], [89, "movzx eax, byte ptr [rax]"], [90, "cmp al, 3Eh "], [91, "jnz short loc_4028DB"], [92, "jmp short loc_40295C"], [93, "mov rax, [rbp+var_28]"], [94, "lea rdx, [rax+1]"], [95, "mov rax, [rbp+var_8]"], [96, "mov rsi, rax"], [97, "mov rdi, rdx"], [98, "call sub_402DAA"], [99, "mov rax, cs:stdout"], [100, "mov rcx, rax"], [101, "mov edx, 2"], [102, "mov esi, 1"], [103, "mov edi, offset asc_404257"], [104, "call _fwrite"], [105, "mov rax, [rbp+var_28]"], [106, "lea rdx, [rax+1]"], [107, "mov rax, [rbp+var_8]"], [108, "mov rsi, rax"], [109, "mov rdi, rdx"], [110, "call sub_402DAA"], [111, "mov rax, cs:stdout"], [112, "mov rcx, rax"], [113, "mov edx, 4"], [114, "mov esi, 1"], [115, "mov edi, offset aA"], [116, "call _fwrite"], [117, "mov rax, [rbp+var_8]"], [118, "sub rax, [rbp+var_28]"], [119, "add eax, 1"], [120, "jmp short locret_4029A0"], [121, "nop"], [122, "add [rbp+var_8], 1"], [123, "mov rax, [rbp+var_8]"], [124, "cmp rax, [rbp+var_30]"], [125, "jnz loc_4027CA"], [126, "mov eax, 0"], [127, "leave"], [128, "retn"]], "data_dep": [[7, 3], [8, 7], [9, 8], [10, 9], [13, 3], [14, 13], [15, 14], [17, 122], [17, 15], [18, 17], [19, 18], [20, 19], [21, 20], [22, 21], [23, 20], [25, 24], [30, 6], [30, 28], [30, 32], [31, 30], [34, 28], [34, 32], [34, 6], [35, 34], [39, 38], [44, 28], [44, 32], [44, 6], [45, 44], [47, 46], [52, 3], [53, 52], [54, 53], [56, 64], [56, 54], [57, 56], [58, 57], [61, 59], [64, 64], [64, 54], [65, 54], [65, 64], [66, 65], [67, 66], [68, 67], [70, 69], [75, 3], [76, 75], [77, 76], [79, 87], [79, 77], [80, 79], [81, 80], [84, 82], [87, 77], [87, 87], [88, 87], [88, 77], [89, 88], [90, 89], [91, 90], [93, 3], [94, 93], [94, 40], [95, 15], [95, 122], [96, 95], [97, 94], [100, 99], [105, 3], [106, 101], [106, 105], [107, 122], [107, 15], [108, 107], [109, 106], [112, 111], [117, 15], [117, 122], [118, 3], [118, 117], [119, 118], [122, 122], [122, 15], [123, 15], [123, 122], [124, 4], [124, 123], [125, 124], [128, 26], [128, 126], [128, 119], [128, 36], [128, 11]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/c9e9b5b3d11acdc1b9b694fd074b5b52f7edc3a705971a298bac22a81d00e1fa_c9e9b5b3d11acdc1b9b694fd074b5b52f7edc3a705971a298bac22a81d00e1fa.jsonl.gz", "strip_func_name": "sub_40278A", "query": "\n\n\n__int64 __fastcall sub_40278A(_BYTE *a1, _BYTE *a2)\n{\nint v3; // [rsp+2Ch] [rbp-14h]\n_BYTE *i; // [rsp+30h] [rbp-10h]\n_BYTE *j; // [rsp+30h] [rbp-10h]\n_BYTE *v6; // [rsp+38h] [rbp-8h]\n\nv3 = 0;\nif ( *a1 != 60 )\nreturn 0LL;\nv6 = a1 + 1;\nwhile ( v6 != a2 )\n{\nswitch ( *v6 )\n{\ncase 9:\ncase 0xA:\ncase 0x20:\nreturn 0LL;\ncase 0x23:\ncase 0x3A:\nv3 = -1;\ngoto LABEL_21;\ncase 0x3E:\nif ( !v3 )\nreturn 0LL;\nfwrite(\"<a href=\\\"\", 1uLL, 9uLL, stdout);\nif ( v3 == 1 )\n{\nfwrite(\"&#x6D;&#x61;i&#x6C;&#x74;&#x6F;:\", 1uLL, 0x20uLL, stdout);\nfor ( i = a1 + 1; *i != 62; ++i )\nfprintf(stdout, \"&#%u;\", (unsigned int)(char)*i);\nfwrite(\"\\\">\", 1uLL, 2uLL, stdout);\nfor ( j = a1 + 1; *j != 62; ++j )\nfprintf(stdout, \"&#%u;\", (unsigned int)(char)*j);\n}\nelse\n{\nsub_402DAA(a1 + 1, v6);\nfwrite(\"\\\">\", 1uLL, 2uLL, stdout);\nsub_402DAA(a1 + 1, v6);\n}\nfwrite(\"</a>\", 1uLL, 4uLL, stdout);\nreturn (unsigned int)((_DWORD)v6 - (_DWORD)a1 + 1);\ncase 0x40:\nif ( !v3 )\nv3 = 1;\ngoto LABEL_21;\ndefault:\nLABEL_21:\n++v6;\nbreak;\n}\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v3,j,v6,sub_40278A,sub_402DAA,]", "hints": "[]", "response": "{'a1': 'begin', 'a2': 'end', 'v3': 'ismail', 'j': 'c', 'v6': 'p', 'sub_40278A': 'doshortlink', 'sub_402DAA': 'hprint'}"}
[ [ 0.7740687131881714, 0.7738519906997681, 0.76932692527771, 0.7691497206687927, 0.7677354216575623, 0.7135680913925171, 0.7132725715637207, 0.6953957676887512, 0.6910911798477173, 0.6885377168655396, 0.6848257780075073, 0.6837325692176819, 0.6772112846374512, 0.6762956976890564, 0.6757238507270813, 0.6748610138893127, 0.6741741895675659, 0.6736929416656494, 0.6707265973091125, 0.6696968674659729 ], [ 255004, 226341, 162713, 172512, 184460, 21414, 62704, 201562, 212246, 157552, 166807, 21084, 91045, 132251, 183267, 162774, 188330, 156486, 138434, 148779 ] ]
bmpRLE8b_write
434ed2fa9a4f7fc3bac15ce222f011d74c30c4bca74d2ee23f9e17163c1019ff
jfdelnero
HXCFE_file_selector
NA
int bmpRLE8b_write(char * file,bitmap_data * bdata) { FILE * f; int i,lnsize,datasize; BITMAPFILEHEADER bitmap_header; BITMAPINFOHEADER bitmap_info_header; uint32_t bitmapdatalinesize; unsigned char * linebuffer; unsigned char * src_data; unsigned char pal[256*4]; f = fopen(file,"wb"); if(f) { memset(&bitmap_header,0,sizeof(BITMAPFILEHEADER)); bitmap_header.bfType = 19778; bitmap_header.bfOffBits = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + (256*4); bitmapdatalinesize = bdata->xsize*1; if(bitmapdatalinesize&0x3) bitmapdatalinesize = ((bitmapdatalinesize & (~0x3)) + 0x4); bitmap_header.bfSize = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + sizeof(pal) + (bitmapdatalinesize*bdata->ysize); fwrite(&bitmap_header,1,sizeof(BITMAPFILEHEADER),f); memset(&bitmap_info_header,0,sizeof(BITMAPINFOHEADER)); bitmap_info_header.biSize = sizeof(BITMAPINFOHEADER); bitmap_info_header.biBitCount = 8; bitmap_info_header.biHeight = bdata->ysize; bitmap_info_header.biWidth = bdata->xsize; bitmap_info_header.biPlanes = 1; bitmap_info_header.biCompression = 1; bitmap_info_header.biSizeImage = bitmapdatalinesize*bdata->ysize; fwrite(&bitmap_info_header,1,sizeof(BITMAPINFOHEADER),f); memset(pal,0,sizeof(pal)); for(i=0;i<256;i++) { pal[(i*4) + 0] = (bdata->palette[(i*4) + 2]); pal[(i*4) + 1] = (bdata->palette[(i*4) + 1]); pal[(i*4) + 2] = (bdata->palette[(i*4) + 0]); } fwrite(pal,sizeof(pal),1,f); linebuffer = (unsigned char *)malloc((bitmapdatalinesize*2) + (bdata->ysize*2)); memset(linebuffer,0,(bitmapdatalinesize*2) + (bdata->ysize*2)); datasize = 0; src_data = (unsigned char*)bdata->data; for(i=0;i<bdata->ysize;i++) { lnsize = packlineRLE(&src_data[((bdata->ysize-1)-i)*bdata->xsize],bdata->xsize,linebuffer); if( i == (bdata->ysize - 1) ) { if(lnsize) { linebuffer[lnsize-1] = 0x01; // End of BMP } } fwrite(linebuffer,1,lnsize,f); datasize = datasize + lnsize; } bitmap_header.bfSize = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + sizeof(pal) + datasize; fseek(f,0,SEEK_SET); fwrite(&bitmap_header,1,sizeof(BITMAPFILEHEADER),f); bitmap_info_header.biSizeImage = datasize; fseek(f,sizeof(BITMAPFILEHEADER),SEEK_SET); fwrite(&bitmap_info_header,1,sizeof(BITMAPINFOHEADER),f); free(linebuffer); fclose(f); } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4022F5", "function_addr": 4203253, "binary_name": "434ed2fa9a4f7fc3bac15ce222f011d74c30c4bca74d2ee23f9e17163c1019ff.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 480h"], [3, "mov [rbp+filename], rdi"], [4, "mov [rbp+var_480], rsi"], [5, "mov rax, [rbp+filename]"], [6, "mov esi, offset aWb"], [7, "mov rdi, rax"], [8, "call _fopen"], [9, "mov [rbp+stream], rax"], [10, "cmp [rbp+stream], 0"], [11, "jz loc_4026BE"], [12, "lea rax, [rbp+s]"], [13, "mov edx, 0Eh"], [14, "mov esi, 0"], [15, "mov rdi, rax"], [16, "call _memset"], [17, "mov [rbp+s], 4D42h"], [18, "mov [rbp+var_30], 436h"], [19, "mov rax, [rbp+var_480]"], [20, "movzx eax, word ptr [rax]"], [21, "cwde"], [22, "mov [rbp+var_C], eax"], [23, "mov eax, [rbp+var_C]"], [24, "and eax, 3"], [25, "test eax, eax"], [26, "jz short loc_402378"], [27, "mov eax, [rbp+var_C]"], [28, "and eax, 0FFFFFFFCh"], [29, "add eax, 4"], [30, "mov [rbp+var_C], eax"], [31, "mov rax, [rbp+var_480]"], [32, "movzx eax, word ptr [rax+2]"], [33, "cwde"], [34, "imul eax, [rbp+var_C]"], [35, "add eax, 436h"], [36, "mov [rbp+var_38], eax"], [37, "mov rdx, [rbp+stream]"], [38, "lea rax, [rbp+s]"], [39, "mov rcx, rdx"], [40, "mov edx, 0Eh"], [41, "mov esi, 1"], [42, "mov rdi, rax"], [43, "call _fwrite"], [44, "lea rax, [rbp+ptr]"], [45, "mov edx, 28h "], [46, "mov esi, 0"], [47, "mov rdi, rax"], [48, "call _memset"], [49, "mov [rbp+ptr], 28h "], [50, "mov [rbp+var_62], 8"], [51, "mov rax, [rbp+var_480]"], [52, "movzx eax, word ptr [rax+2]"], [53, "cwde"], [54, "mov [rbp+var_68], eax"], [55, "mov rax, [rbp+var_480]"], [56, "movzx eax, word ptr [rax]"], [57, "cwde"], [58, "mov [rbp+var_6C], eax"], [59, "mov [rbp+var_64], 1"], [60, "mov [rbp+var_60], 1"], [61, "mov rax, [rbp+var_480]"], [62, "movzx eax, word ptr [rax+2]"], [63, "cwde"], [64, "imul eax, [rbp+var_C]"], [65, "mov [rbp+var_5C], eax"], [66, "mov rdx, [rbp+stream]"], [67, "lea rax, [rbp+ptr]"], [68, "mov rcx, rdx"], [69, "mov edx, 28h "], [70, "mov esi, 1"], [71, "mov rdi, rax"], [72, "call _fwrite"], [73, "lea rax, [rbp+var_470]"], [74, "mov edx, 400h"], [75, "mov esi, 0"], [76, "mov rdi, rax"], [77, "call _memset"], [78, "mov [rbp+var_4], 0"], [79, "jmp loc_4024E0"], [80, "mov rax, [rbp+var_480]"], [81, "mov rdx, [rax+6]"], [82, "mov eax, [rbp+var_4]"], [83, "shl eax, 2"], [84, "cdqe"], [85, "add rax, 2"], [86, "add rax, rdx"], [87, "mov edx, [rbp+var_4]"], [88, "lea ecx, ds:0[rdx*4]"], [89, "movzx edx, byte ptr [rax]"], [90, "movsxd rax, ecx"], [91, "mov [rbp+rax+var_470], dl"], [92, "mov rax, [rbp+var_480]"], [93, "mov rdx, [rax+6]"], [94, "mov eax, [rbp+var_4]"], [95, "shl eax, 2"], [96, "cdqe"], [97, "add rax, 1"], [98, "add rax, rdx"], [99, "mov edx, [rbp+var_4]"], [100, "shl edx, 2"], [101, "lea ecx, [rdx+1]"], [102, "movzx edx, byte ptr [rax]"], [103, "movsxd rax, ecx"], [104, "mov [rbp+rax+var_470], dl"], [105, "mov rax, [rbp+var_480]"], [106, "mov rdx, [rax+6]"], [107, "mov eax, [rbp+var_4]"], [108, "shl eax, 2"], [109, "cdqe"], [110, "add rax, rdx"], [111, "mov edx, [rbp+var_4]"], [112, "shl edx, 2"], [113, "lea ecx, [rdx+2]"], [114, "movzx edx, byte ptr [rax]"], [115, "movsxd rax, ecx"], [116, "mov [rbp+rax+var_470], dl"], [117, "add [rbp+var_4], 1"], [118, "cmp [rbp+var_4], 0FFh"], [119, "jle loc_40244F"], [120, "mov rdx, [rbp+stream]"], [121, "lea rax, [rbp+var_470]"], [122, "mov rcx, rdx"], [123, "mov edx, 1"], [124, "mov esi, 400h"], [125, "mov rdi, rax"], [126, "call _fwrite"], [127, "mov eax, [rbp+var_C]"], [128, "lea edx, [rax+rax]"], [129, "mov rax, [rbp+var_480]"], [130, "movzx eax, word ptr [rax+2]"], [131, "cwde"], [132, "add eax, eax"], [133, "add eax, edx"], [134, "mov eax, eax"], [135, "mov rdi, rax"], [136, "call _malloc"], [137, "mov [rbp+var_20], rax"], [138, "mov eax, [rbp+var_C]"], [139, "lea edx, [rax+rax]"], [140, "mov rax, [rbp+var_480]"], [141, "movzx eax, word ptr [rax+2]"], [142, "cwde"], [143, "add eax, eax"], [144, "add eax, edx"], [145, "mov edx, eax"], [146, "mov rax, [rbp+var_20]"], [147, "mov esi, 0"], [148, "mov rdi, rax"], [149, "call _memset"], [150, "mov [rbp+var_8], 0"], [151, "mov rax, [rbp+var_480]"], [152, "mov rax, [rax+0Eh]"], [153, "mov [rbp+var_28], rax"], [154, "mov [rbp+var_4], 0"], [155, "jmp loc_40261A"], [156, "mov rax, [rbp+var_480]"], [157, "movzx eax, word ptr [rax]"], [158, "cwde"], [159, "mov rdx, [rbp+var_480]"], [160, "movzx edx, word ptr [rdx+2]"], [161, "movsx edx, dx"], [162, "sub edx, 1"], [163, "mov ecx, edx"], [164, "sub ecx, [rbp+var_4]"], [165, "mov rdx, [rbp+var_480]"], [166, "movzx edx, word ptr [rdx]"], [167, "movsx edx, dx"], [168, "imul edx, ecx"], [169, "movsxd rcx, edx"], [170, "mov rdx, [rbp+var_28]"], [171, "add rcx, rdx"], [172, "mov rdx, [rbp+var_20]"], [173, "mov esi, eax"], [174, "mov rdi, rcx"], [175, "call sub_4021DB"], [176, "mov [rbp+var_2C], eax"], [177, "mov rax, [rbp+var_480]"], [178, "movzx eax, word ptr [rax+2]"], [179, "cwde"], [180, "sub eax, 1"], [181, "cmp [rbp+var_4], eax"], [182, "jnz short loc_4025F5"], [183, "cmp [rbp+var_2C], 0"], [184, "jz short loc_4025F5"], [185, "mov eax, [rbp+var_2C]"], [186, "cdqe"], [187, "lea rdx, [rax-1]"], [188, "mov rax, [rbp+var_20]"], [189, "add rax, rdx"], [190, "mov byte ptr [rax], 1"], [191, "mov eax, [rbp+var_2C]"], [192, "movsxd rdx, eax"], [193, "mov rcx, [rbp+stream]"], [194, "mov rax, [rbp+var_20]"], [195, "mov esi, 1"], [196, "mov rdi, rax"], [197, "call _fwrite"], [198, "mov eax, [rbp+var_2C]"], [199, "add [rbp+var_8], eax"], [200, "add [rbp+var_4], 1"], [201, "mov rax, [rbp+var_480]"], [202, "movzx eax, word ptr [rax+2]"], [203, "cwde"], [204, "cmp [rbp+var_4], eax"], [205, "jl loc_40257C"], [206, "mov eax, [rbp+var_8]"], [207, "add eax, 436h"], [208, "mov [rbp+var_38], eax"], [209, "mov rax, [rbp+stream]"], [210, "mov edx, 0"], [211, "mov esi, 0"], [212, "mov rdi, rax"], [213, "call _fseek"], [214, "mov rdx, [rbp+stream]"], [215, "lea rax, [rbp+s]"], [216, "mov rcx, rdx"], [217, "mov edx, 0Eh"], [218, "mov esi, 1"], [219, "mov rdi, rax"], [220, "call _fwrite"], [221, "mov eax, [rbp+var_8]"], [222, "mov [rbp+var_5C], eax"], [223, "mov rax, [rbp+stream]"], [224, "mov edx, 0"], [225, "mov esi, 0Eh"], [226, "mov rdi, rax"], [227, "call _fseek"], [228, "mov rdx, [rbp+stream]"], [229, "lea rax, [rbp+ptr]"], [230, "mov rcx, rdx"], [231, "mov edx, 28h "], [232, "mov esi, 1"], [233, "mov rdi, rax"], [234, "call _fwrite"], [235, "mov rax, [rbp+var_20]"], [236, "mov rdi, rax"], [237, "call _free"], [238, "mov rax, [rbp+stream]"], [239, "mov rdi, rax"], [240, "call _fclose"], [241, "mov eax, 0"], [242, "leave"], [243, "retn"]], "data_dep": [[5, 3], [7, 5], [9, 8], [10, 9], [11, 10], [12, 8], [15, 12], [19, 4], [20, 19], [22, 20], [23, 22], [24, 23], [25, 24], [26, 25], [27, 22], [28, 27], [29, 28], [30, 29], [31, 4], [32, 31], [34, 30], [34, 32], [34, 22], [35, 34], [36, 35], [37, 9], [38, 17], [38, 35], [39, 37], [42, 38], [44, 43], [47, 44], [51, 4], [52, 51], [54, 52], [55, 4], [56, 55], [58, 56], [61, 4], [62, 61], [64, 62], [64, 22], [64, 30], [65, 64], [66, 9], [67, 49], [67, 64], [68, 66], [71, 67], [73, 72], [76, 73], [80, 4], [81, 80], [82, 78], [82, 117], [83, 82], [85, 83], [86, 81], [86, 85], [87, 78], [87, 117], [88, 113], [88, 68], [89, 86], [90, 88], [91, 89], [91, 90], [92, 4], [93, 92], [94, 78], [94, 117], [95, 94], [97, 95], [98, 93], [98, 97], [99, 117], [99, 78], [100, 99], [101, 88], [101, 100], [102, 98], [103, 101], [104, 102], [104, 103], [105, 4], [106, 105], [107, 117], [107, 78], [108, 107], [110, 106], [110, 108], [111, 78], [111, 117], [112, 111], [113, 101], [113, 112], [114, 110], [115, 113], [116, 115], [116, 114], [117, 117], [117, 78], [118, 117], [118, 78], [119, 118], [120, 9], [121, 77], [121, 115], [122, 120], [125, 121], [127, 30], [127, 22], [128, 123], [128, 127], [129, 4], [130, 129], [132, 130], [133, 132], [133, 128], [134, 133], [135, 134], [137, 136], [138, 30], [138, 22], [139, 128], [139, 138], [140, 4], [141, 140], [143, 141], [144, 143], [144, 139], [145, 144], [146, 137], [148, 146], [151, 4], [152, 151], [153, 152], [156, 4], [157, 190], [157, 156], [159, 4], [160, 159], [160, 190], [161, 160], [162, 161], [163, 162], [164, 200], [164, 154], [164, 163], [165, 4], [166, 190], [166, 165], [167, 166], [168, 164], [168, 167], [169, 168], [170, 153], [171, 170], [171, 169], [172, 137], [173, 157], [174, 171], [176, 175], [177, 4], [178, 177], [178, 190], [180, 178], [181, 180], [181, 200], [181, 154], [182, 181], [183, 176], [184, 183], [185, 176], [187, 185], [187, 172], [187, 190], [188, 137], [189, 188], [189, 187], [190, 189], [191, 176], [192, 191], [193, 9], [194, 137], [196, 194], [198, 176], [199, 150], [199, 198], [199, 199], [200, 200], [200, 154], [201, 4], [202, 190], [202, 201], [204, 200], [204, 154], [204, 202], [205, 204], [206, 150], [206, 199], [207, 206], [208, 207], [209, 9], [212, 209], [214, 9], [215, 17], [215, 213], [216, 214], [219, 215], [221, 199], [221, 150], [222, 221], [223, 9], [226, 223], [228, 9], [229, 49], [229, 227], [230, 228], [233, 229], [235, 137], [236, 235], [238, 9], [239, 238], [243, 241]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/434ed2fa9a4f7fc3bac15ce222f011d74c30c4bca74d2ee23f9e17163c1019ff_434ed2fa9a4f7fc3bac15ce222f011d74c30c4bca74d2ee23f9e17163c1019ff.jsonl.gz", "strip_func_name": "sub_4022F5", "query": "\n\n\n__int64 __fastcall sub_4022F5(const char *a1, __int16 *a2)\n{\nchar v3[1024]; // [rsp+10h] [rbp-470h] BYREF\nint ptr[3]; // [rsp+410h] [rbp-70h] BYREF\n__int16 v5; // [rsp+41Ch] [rbp-64h]\n__int16 v6; // [rsp+41Eh] [rbp-62h]\nint v7; // [rsp+420h] [rbp-60h]\nunsigned int v8; // [rsp+424h] [rbp-5Ch]\n__int16 s; // [rsp+446h] [rbp-3Ah] BYREF\nunsigned int v10; // [rsp+448h] [rbp-38h]\nint v11; // [rsp+450h] [rbp-30h]\nint v12; // [rsp+454h] [rbp-2Ch]\n__int64 v13; // [rsp+458h] [rbp-28h]\nvoid *v14; // [rsp+460h] [rbp-20h]\nFILE *stream; // [rsp+468h] [rbp-18h]\nunsigned int v16; // [rsp+474h] [rbp-Ch]\nunsigned int v17; // [rsp+478h] [rbp-8h]\nint i; // [rsp+47Ch] [rbp-4h]\n\nstream = fopen(a1, \"wb\");\nif ( stream )\n{\nmemset(&s, 0, 0xEuLL);\ns = 19778;\nv11 = 1078;\nv16 = *a2;\nif ( (v16 & 3) != 0 )\nv16 = (v16 & 0xFFFFFFFC) + 4;\nv10 = v16 * a2[1] + 1078;\nfwrite(&s, 1uLL, 0xEuLL, stream);\nmemset(ptr, 0, 0x28uLL);\nptr[0] = 40;\nv6 = 8;\nptr[2] = a2[1];\nptr[1] = *a2;\nv5 = 1;\nv7 = 1;\nv8 = v16 * a2[1];\nfwrite(ptr, 1uLL, 0x28uLL, stream);\nmemset(v3, 0, sizeof(v3));\nfor ( i = 0; i <= 255; ++i )\n{\nv3[4 * i] = *(_BYTE *)(*(_QWORD *)(a2 + 3) + 4 * i + 2LL);\nv3[4 * i + 1] = *(_BYTE *)(*(_QWORD *)(a2 + 3) + 4 * i + 1LL);\nv3[4 * i + 2] = *(_BYTE *)(*(_QWORD *)(a2 + 3) + 4 * i);\n}\nfwrite(v3, 0x400uLL, 1uLL, stream);\nv14 = malloc(2 * v16 + 2 * a2[1]);\nmemset(v14, 0, 2 * v16 + 2 * a2[1]);\nv17 = 0;\nv13 = *(_QWORD *)(a2 + 7);\nfor ( i = 0; i < a2[1]; ++i )\n{\nv12 = sub_4021DB((unsigned __int8 *)(v13 + (a2[1] - 1 - i) * *a2), *a2, (__int64)v14);\nif ( i == a2[1] - 1 && v12 )\n*((_BYTE *)v14 + v12 - 1) = 1;\nfwrite(v14, 1uLL, v12, stream);\nv17 += v12;\n}\nv10 = v17 + 1078;\nfseek(stream, 0LL, 0);\nfwrite(&s, 1uLL, 0xEuLL, stream);\nv8 = v17;\nfseek(stream, 14LL, 0);\nfwrite(ptr, 1uLL, 0x28uLL, stream);\nfree(v14);\nfclose(stream);\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v3,ptr,s,v12,v13,v14,stream,v16,v17,sub_4022F5,sub_4021DB,]", "hints": "[]", "response": "{'a1': 'file', 'a2': 'bdata', 'v3': 'pal', 'ptr': 'bitmap_info_header', 's': 'bitmap_header', 'v12': 'lnsize', 'v13': 'src_data', 'v14': 'linebuffer', 'stream': 'f', 'v16': 'bitmapdatalinesize', 'v17': 'datasize', 'sub_4022F5': 'bmpRLE8b_write', 'sub_4021DB': 'packlineRLE'}"}
[ [ 0.7600911855697632, 0.7536318302154541, 0.7406903505325317, 0.7363075017929077, 0.7310709357261658, 0.7307818531990051, 0.7302079796791077, 0.7301031351089478, 0.7287391424179077, 0.7240450382232666, 0.7214293479919434, 0.7166915535926819, 0.7118750810623169, 0.7111172676086426, 0.709047794342041, 0.7056137919425964, 0.705104649066925, 0.7048697471618652, 0.7021495699882507, 0.6992132663726807 ], [ 40886, 222597, 147431, 202979, 252762, 241707, 127500, 154423, 11357, 70896, 87459, 170024, 244301, 189783, 254956, 64099, 207006, 19459, 215303, 24437 ] ]
printCHeader
199a75cddedab2d78a9130193160ee79ff3112dfac3d84c4b9ef602bc9ed6fec
mupfdev
SNESoIP
NA
static void printCHeader (void) { fprintf (outputCFile, "//\n" "//\tThis file was generated by the GEOS Resource Compiler\n" "//\n" "//\tDO NOT EDIT! Any changes will be lost!\n" "//\n" "//\tEdit proper resource file instead.\n" "//\n\n"); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4013EA", "function_addr": 4199402, "binary_name": "199a75cddedab2d78a9130193160ee79ff3112dfac3d84c4b9ef602bc9ed6fec.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov rax, cs:s"], [3, "mov rcx, rax"], [4, "mov edx, 96h"], [5, "mov esi, 1"], [6, "mov edi, offset aThisFileWasGen"], [7, "call _fwrite"], [8, "nop"], [9, "pop rbp"], [10, "retn"]], "data_dep": [[3, 2], [9, 0], [10, 7]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/199a75cddedab2d78a9130193160ee79ff3112dfac3d84c4b9ef602bc9ed6fec_199a75cddedab2d78a9130193160ee79ff3112dfac3d84c4b9ef602bc9ed6fec.jsonl.gz", "strip_func_name": "sub_4013EA", "query": "\n\n\nsize_t sub_4013EA()\n{\nreturn fwrite(\n\"//\\n\"\n\"//\\tThis file was generated by the GEOS Resource Compiler\\n\"\n\"//\\n\"\n\"//\\tDO NOT EDIT! Any changes will be lost!\\n\"\n\"//\\n\"\n\"//\\tEdit proper resource file instead.\\n\"\n\"//\\n\"\n\"\\n\",\n1uLL,\n0x96uLL,\ns);\n}\n\n\n\nQ:[sub_4013EA,]", "hints": "[]", "response": "{'sub_4013EA': 'printCHeader'}"}
[ [ 0.8903499841690063, 0.8898485898971558, 0.8896996974945068, 0.8895927667617798, 0.8894979953765869, 0.8894402980804443, 0.8886730670928955, 0.8881558179855347, 0.8875586986541748, 0.8874220252037048, 0.8846937417984009, 0.8813000321388245, 0.880312979221344, 0.8798006176948547, 0.8738504648208618, 0.8614914417266846, 0.8592610359191895, 0.8501430153846741, 0.8488531112670898, 0.8463782668113708 ], [ 229176, 76176, 167472, 226830, 123387, 228666, 70236, 35641, 136391, 51994, 44135, 166139, 113306, 219377, 151915, 35970, 211529, 168267, 20699, 36749 ] ]
png_saveToFile
4a6e4fff426f3a48d28ebec9459c5547a9469ffca56d083dfa86d6206e6b0370
kgabis
raytracer
NA
static int png_saveToFile(Bitmap *bitmap, const char *filename) { FILE *fp; png_structp pngPtr = NULL; png_infop infoPtr = NULL; png_byte **rowPointers = NULL; size_t x, y; int status = -1; int pixelSize = 3; int depth = 8; fp = fopen(filename, "wb"); if(fp == NULL) { goto fopen_failed; } pngPtr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (pngPtr == NULL) { goto png_create_write_struct_failed; } infoPtr = png_create_info_struct(pngPtr); if (infoPtr == NULL) { goto png_create_info_struct_failed; } if (setjmp(png_jmpbuf(pngPtr))) { goto png_failure; } png_set_IHDR(pngPtr, infoPtr, (png_uint_32)bitmap->width, (png_uint_32)bitmap->height, depth, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); rowPointers = png_malloc(pngPtr, bitmap->height * sizeof(png_byte *)); for (y = 0; y < bitmap->height; ++y) { png_byte *row = png_malloc(pngPtr, sizeof(unsigned char) * bitmap->width * pixelSize); rowPointers[y] = row; for (x = 0; x < bitmap->width; ++x) { Pixel pixel = GET_PIXEL(bitmap, x, y); *row++ = pixel.red; *row++ = pixel.green; *row++ = pixel.blue; } } png_init_io(pngPtr, fp); png_set_rows(pngPtr, infoPtr, rowPointers); png_write_png(pngPtr, infoPtr, PNG_TRANSFORM_IDENTITY, NULL); status = 0; for (y = 0; y < bitmap->height; y++) { png_free(pngPtr, rowPointers[y]); } png_free(pngPtr, rowPointers); png_failure: png_create_info_struct_failed: png_destroy_write_struct(&pngPtr, &infoPtr); png_create_write_struct_failed: fclose(fp); fopen_failed: return status; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402862", "function_addr": 4204642, "binary_name": "4a6e4fff426f3a48d28ebec9459c5547a9469ffca56d083dfa86d6206e6b0370.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 68h"], [4, "mov [rbp+var_68], rdi"], [5, "mov [rbp+filename], rsi"], [6, "mov [rbp+var_50], 0"], [7, "mov [rbp+var_58], 0"], [8, "mov [rbp+var_40], 0"], [9, "mov [rbp+var_2C], 0FFFFFFFFh"], [10, "mov [rbp+var_44], 3"], [11, "mov [rbp+var_48], 8"], [12, "mov rax, [rbp+filename]"], [13, "mov esi, offset aWb"], [14, "mov rdi, rax"], [15, "call _fopen"], [16, "mov [rbp+stream], rax"], [17, "cmp [rbp+stream], 0"], [18, "jz loc_402B47"], [19, "mov ecx, 0"], [20, "mov edx, 0"], [21, "mov esi, 0"], [22, "mov edi, offset a1636"], [23, "call _png_create_write_struct"], [24, "mov [rbp+var_50], rax"], [25, "mov rax, [rbp+var_50]"], [26, "test rax, rax"], [27, "jnz short loc_4028EB"], [28, "jmp loc_402B39"], [29, "mov rax, [rbp+var_50]"], [30, "mov rdi, rax"], [31, "call _png_create_info_struct"], [32, "mov [rbp+var_58], rax"], [33, "mov rax, [rbp+var_58]"], [34, "test rax, rax"], [35, "jnz short loc_402909"], [36, "jmp loc_402B26"], [37, "mov rax, [rbp+var_50]"], [38, "mov edx, 0C8h"], [39, "mov esi, offset _longjmp"], [40, "mov rdi, rax"], [41, "call _png_set_longjmp_fn"], [42, "mov rdi, rax"], [43, "call __setjmp"], [44, "test eax, eax"], [45, "jnz loc_402B25"], [46, "mov rax, [rbp+var_68]"], [47, "mov rax, [rax+10h]"], [48, "mov ecx, eax"], [49, "mov rax, [rbp+var_68]"], [50, "mov rax, [rax+8]"], [51, "mov edi, eax"], [52, "mov rsi, [rbp+var_58]"], [53, "mov rax, [rbp+var_50]"], [54, "mov edx, [rbp+var_48]"], [55, "sub rsp, 8"], [56, "push 0"], [57, "push 0"], [58, "push 0"], [59, "mov r9d, 2"], [60, "mov r8d, edx"], [61, "mov edx, edi"], [62, "mov rdi, rax"], [63, "call _png_set_IHDR"], [64, "add rsp, 20h"], [65, "mov rax, [rbp+var_68]"], [66, "mov rax, [rax+10h]"], [67, "lea rdx, ds:0[rax*8]"], [68, "mov rax, [rbp+var_50]"], [69, "mov rsi, rdx"], [70, "mov rdi, rax"], [71, "call _png_malloc"], [72, "mov [rbp+var_40], rax"], [73, "mov [rbp+var_28], 0"], [74, "jmp loc_402A71"], [75, "mov rax, [rbp+var_68]"], [76, "mov rdx, [rax+8]"], [77, "mov eax, [rbp+var_44]"], [78, "cdqe"], [79, "imul rdx, rax"], [80, "mov rax, [rbp+var_50]"], [81, "mov rsi, rdx"], [82, "mov rdi, rax"], [83, "call _png_malloc"], [84, "mov [rbp+var_38], rax"], [85, "mov rax, [rbp+var_28]"], [86, "lea rdx, ds:0[rax*8]"], [87, "mov rax, [rbp+var_40]"], [88, "add rdx, rax"], [89, "mov rax, [rbp+var_38]"], [90, "mov [rdx], rax"], [91, "mov [rbp+var_20], 0"], [92, "jmp short loc_402A5A"], [93, "mov rax, [rbp+var_68]"], [94, "mov rcx, [rax]"], [95, "mov rax, [rbp+var_68]"], [96, "mov rax, [rax+8]"], [97, "imul rax, [rbp+var_28]"], [98, "mov rdx, rax"], [99, "mov rax, [rbp+var_20]"], [100, "add rdx, rax"], [101, "mov rax, rdx"], [102, "add rax, rax"], [103, "add rax, rdx"], [104, "add rax, rcx"], [105, "movzx edx, word ptr [rax]"], [106, "mov [rbp+var_5B], dx"], [107, "movzx eax, byte ptr [rax+2]"], [108, "mov [rbp+var_59], al"], [109, "mov rax, [rbp+var_38]"], [110, "lea rdx, [rax+1]"], [111, "mov [rbp+var_38], rdx"], [112, "movzx edx, byte ptr [rbp+var_5B]"], [113, "mov [rax], dl"], [114, "mov rax, [rbp+var_38]"], [115, "lea rdx, [rax+1]"], [116, "mov [rbp+var_38], rdx"], [117, "movzx edx, byte ptr [rbp+var_5B+1]"], [118, "mov [rax], dl"], [119, "mov rax, [rbp+var_38]"], [120, "lea rdx, [rax+1]"], [121, "mov [rbp+var_38], rdx"], [122, "movzx edx, [rbp+var_59]"], [123, "mov [rax], dl"], [124, "add [rbp+var_20], 1"], [125, "mov rax, [rbp+var_68]"], [126, "mov rax, [rax+8]"], [127, "cmp [rbp+var_20], rax"], [128, "jb loc_4029E7"], [129, "add [rbp+var_28], 1"], [130, "mov rax, [rbp+var_68]"], [131, "mov rax, [rax+10h]"], [132, "cmp [rbp+var_28], rax"], [133, "jb loc_40299F"], [134, "mov rax, [rbp+var_50]"], [135, "mov rdx, [rbp+stream]"], [136, "mov rsi, rdx"], [137, "mov rdi, rax"], [138, "call _png_init_io"], [139, "mov rcx, [rbp+var_58]"], [140, "mov rax, [rbp+var_50]"], [141, "mov rdx, [rbp+var_40]"], [142, "mov rsi, rcx"], [143, "mov rdi, rax"], [144, "call _png_set_rows"], [145, "mov rsi, [rbp+var_58]"], [146, "mov rax, [rbp+var_50]"], [147, "mov ecx, 0"], [148, "mov edx, 0"], [149, "mov rdi, rax"], [150, "call _png_write_png"], [151, "mov [rbp+var_2C], 0"], [152, "mov [rbp+var_28], 0"], [153, "jmp short loc_402B02"], [154, "mov rax, [rbp+var_28]"], [155, "lea rdx, ds:0[rax*8]"], [156, "mov rax, [rbp+var_40]"], [157, "add rax, rdx"], [158, "mov rdx, [rax]"], [159, "mov rax, [rbp+var_50]"], [160, "mov rsi, rdx"], [161, "mov rdi, rax"], [162, "call _png_free"], [163, "add [rbp+var_28], 1"], [164, "mov rax, [rbp+var_68]"], [165, "mov rax, [rax+10h]"], [166, "cmp [rbp+var_28], rax"], [167, "jb short loc_402AD8"], [168, "mov rax, [rbp+var_50]"], [169, "mov rdx, [rbp+var_40]"], [170, "mov rsi, rdx"], [171, "mov rdi, rax"], [172, "call _png_free"], [173, "jmp short loc_402B26"], [174, "nop"], [175, "lea rdx, [rbp+var_58]"], [176, "lea rax, [rbp+var_50]"], [177, "mov rsi, rdx"], [178, "mov rdi, rax"], [179, "call _png_destroy_write_struct"], [180, "mov rax, [rbp+stream]"], [181, "mov rdi, rax"], [182, "call _fclose"], [183, "jmp short loc_402B48"], [184, "nop"], [185, "mov eax, [rbp+var_2C]"], [186, "mov rbx, [rbp+var_8]"], [187, "leave"], [188, "retn"]], "data_dep": [[12, 5], [14, 12], [16, 15], [17, 16], [18, 17], [24, 23], [25, 24], [26, 25], [27, 26], [29, 24], [30, 29], [32, 31], [33, 32], [34, 33], [35, 34], [37, 24], [40, 37], [42, 41], [44, 43], [45, 44], [46, 4], [47, 46], [48, 47], [49, 4], [50, 49], [51, 50], [52, 32], [53, 24], [54, 11], [55, 3], [60, 54], [61, 51], [62, 53], [64, 55], [65, 4], [66, 65], [67, 61], [68, 24], [69, 67], [70, 68], [72, 71], [75, 4], [76, 118], [76, 113], [76, 90], [76, 75], [76, 123], [77, 10], [79, 76], [79, 77], [80, 24], [81, 79], [82, 80], [84, 83], [85, 73], [85, 129], [86, 79], [87, 72], [88, 86], [88, 87], [89, 84], [90, 88], [90, 89], [93, 4], [94, 123], [94, 118], [94, 93], [94, 113], [94, 90], [95, 4], [96, 95], [96, 113], [96, 90], [96, 123], [96, 118], [97, 129], [97, 96], [97, 73], [98, 97], [99, 124], [99, 91], [100, 98], [100, 99], [101, 100], [102, 101], [103, 102], [103, 100], [104, 94], [104, 103], [105, 118], [105, 104], [105, 113], [105, 90], [105, 123], [106, 105], [107, 104], [107, 113], [107, 90], [107, 123], [107, 118], [108, 107], [109, 121], [109, 84], [110, 123], [110, 109], [110, 118], [110, 113], [110, 90], [110, 105], [111, 110], [112, 106], [113, 112], [113, 109], [114, 111], [115, 112], [115, 114], [115, 113], [116, 115], [118, 117], [118, 114], [119, 116], [120, 117], [120, 119], [120, 118], [121, 120], [122, 108], [123, 122], [123, 119], [124, 124], [124, 91], [125, 4], [126, 123], [126, 125], [126, 118], [126, 113], [126, 90], [127, 124], [127, 126], [127, 91], [128, 127], [129, 73], [129, 129], [130, 4], [131, 118], [131, 113], [131, 90], [131, 130], [131, 123], [132, 73], [132, 129], [132, 131], [133, 132], [134, 24], [135, 16], [136, 135], [137, 134], [139, 32], [140, 24], [141, 72], [142, 139], [143, 140], [145, 32], [146, 24], [149, 146], [154, 163], [154, 152], [155, 158], [155, 148], [156, 72], [157, 155], [157, 156], [158, 113], [158, 90], [158, 157], [158, 123], [158, 118], [159, 24], [160, 158], [161, 159], [163, 152], [163, 163], [164, 4], [165, 118], [165, 113], [165, 90], [165, 164], [165, 123], [166, 165], [166, 152], [166, 163], [167, 166], [168, 24], [169, 72], [170, 169], [171, 168], [175, 32], [175, 169], [175, 20], [175, 38], [176, 34], [176, 24], [176, 44], [176, 172], [177, 175], [178, 176], [180, 16], [181, 180], [185, 151], [185, 9], [188, 185]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/4a6e4fff426f3a48d28ebec9459c5547a9469ffca56d083dfa86d6206e6b0370_4a6e4fff426f3a48d28ebec9459c5547a9469ffca56d083dfa86d6206e6b0370.jsonl.gz", "strip_func_name": "sub_402862", "query": "\n\n\n__int64 __fastcall sub_402862(_QWORD *a1, const char *a2)\n{\nstruct __jmp_buf_tag *v2; // rax\n__int64 v3; // rax\n_BYTE *v4; // rax\nchar v6; // [rsp+17h] [rbp-59h]\n__int64 v7; // [rsp+30h] [rbp-40h]\n_WORD *v8; // [rsp+38h] [rbp-38h]\nunsigned int v9; // [rsp+44h] [rbp-2Ch]\nunsigned __int64 i; // [rsp+48h] [rbp-28h]\nunsigned __int64 k; // [rsp+48h] [rbp-28h]\nunsigned __int64 j; // [rsp+50h] [rbp-20h]\nFILE *stream; // [rsp+58h] [rbp-18h]\n\nv9 = -1;\nstream = fopen(a2, \"wb\");\nif ( stream )\n{\nif ( png_create_write_struct() )\n{\nif ( png_create_info_struct() )\n{\nv2 = (struct __jmp_buf_tag *)png_set_longjmp_fn();\nif ( !_setjmp(v2) )\n{\npng_set_IHDR();\nv7 = png_malloc();\nfor ( i = 0LL; i < a1[2]; ++i )\n{\nv8 = (_WORD *)png_malloc();\n*(_QWORD *)(v7 + 8 * i) = v8;\nfor ( j = 0LL; j < a1[1]; ++j )\n{\nv3 = *a1 + 3 * (j + i * a1[1]);\nv6 = *(_BYTE *)(v3 + 2);\n*v8 = *(_WORD *)v3;\nv4 = v8 + 1;\nv8 = (_WORD *)((char *)v8 + 3);\n*v4 = v6;\n}\n}\npng_init_io();\npng_set_rows();\npng_write_png();\nv9 = 0;\nfor ( k = 0LL; k < a1[2]; ++k )\npng_free();\npng_free();\n}\n}\npng_destroy_write_struct();\n}\nfclose(stream);\n}\nreturn v9;\n}\n\n\n\nQ:[a1,a2,v6,v7,v8,v9,i,j,stream,sub_402862,]", "hints": "[]", "response": "{'a1': 'bitmap', 'a2': 'filename', 'v6': 'pixel_2', 'v7': 'rowPointers', 'v8': 'row', 'v9': 'status', 'i': 'y', 'j': 'x', 'stream': 'fp', 'sub_402862': 'png_saveToFile'}"}
[ [ 0.7552259564399719, 0.7513852119445801, 0.7314497232437134, 0.7181217670440674, 0.7078418731689453, 0.7075256109237671, 0.7061218023300171, 0.7059426307678223, 0.7007616758346558, 0.6985440254211426, 0.6951992511749268, 0.6928598880767822, 0.6855154037475586, 0.6811552047729492, 0.6806182265281677, 0.6796222925186157, 0.6788716912269592, 0.6764862537384033, 0.6756769418716431, 0.6722898483276367 ], [ 24597, 206688, 254538, 52594, 213750, 206843, 28059, 105719, 246840, 145679, 251319, 181612, 222597, 160963, 8214, 134571, 177127, 206570, 259502, 24108 ] ]
icmp_parse
a7f0a057e3595fda4579432c28c32741dc464b504b2a03b91823cd9b6f26bfd8
yarrick
pingfs
NA
int icmp_parse(struct icmp_packet *pkt, uint8_t *data, int len) { struct icmp_rule const *rule = GET_RULE(pkt); if (rule->strip_iphdr) { int hdrlen; if (len == 0) return -3; hdrlen = (data[0] & 0x0f) << 2; if (len < hdrlen) return -4; data += hdrlen; len -= hdrlen; } if (len < ICMP_HDRLEN) return -1; if (rule->use_checksum) { if (checksum(data, len) != 0) return -2; } if (rule->request_type == data[0]) { pkt->type = ICMP_REQUEST; } else if (rule->reply_type == data[0]) { pkt->type = ICMP_REPLY; } else { return -5; } pkt->id = read16(&data[4]); pkt->seqno = read16(&data[6]); pkt->payload_len = len - ICMP_HDRLEN; if (pkt->payload_len) { pkt->payload = malloc(pkt->payload_len); memcpy(pkt->payload, &data[ICMP_HDRLEN], pkt->payload_len); } else { pkt->payload = NULL; } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40274A", "function_addr": 4204362, "binary_name": "a7f0a057e3595fda4579432c28c32741dc464b504b2a03b91823cd9b6f26bfd8.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 rax, [rbp+var_18]"], [7, "movzx eax, word ptr [rax]"], [8, "cmp ax, 2"], [9, "jnz short loc_402771"], [10, "mov eax, offset unk_406010"], [11, "jmp short loc_402776"], [12, "mov eax, offset unk_406020"], [13, "mov [rbp+var_8], rax"], [14, "mov rax, [rbp+var_8]"], [15, "mov eax, [rax+0Ch]"], [16, "test eax, eax"], [17, "jz short loc_4027C9"], [18, "cmp [rbp+var_24], 0"], [19, "jnz short loc_402795"], [20, "mov eax, 0FFFFFFFDh"], [21, "jmp locret_40290F"], [22, "mov rax, [rbp+var_20]"], [23, "movzx eax, byte ptr [rax]"], [24, "movzx eax, al"], [25, "shl eax, 2"], [26, "and eax, 3Ch"], [27, "mov [rbp+var_C], eax"], [28, "mov eax, [rbp+var_24]"], [29, "cmp eax, [rbp+var_C]"], [30, "jge short loc_4027BA"], [31, "mov eax, 0FFFFFFFCh"], [32, "jmp locret_40290F"], [33, "mov eax, [rbp+var_C]"], [34, "cdqe"], [35, "add [rbp+var_20], rax"], [36, "mov eax, [rbp+var_C]"], [37, "sub [rbp+var_24], eax"], [38, "cmp [rbp+var_24], 7"], [39, "jg short loc_4027D9"], [40, "mov eax, 0FFFFFFFFh"], [41, "jmp locret_40290F"], [42, "mov rax, [rbp+var_8]"], [43, "mov eax, [rax+8]"], [44, "test eax, eax"], [45, "jz short loc_402804"], [46, "mov edx, [rbp+var_24]"], [47, "mov rax, [rbp+var_20]"], [48, "mov esi, edx"], [49, "mov rdi, rax"], [50, "call sub_4024A2"], [51, "test ax, ax"], [52, "jz short loc_402804"], [53, "mov eax, 0FFFFFFFEh"], [54, "jmp locret_40290F"], [55, "mov rax, [rbp+var_8]"], [56, "mov edx, [rax]"], [57, "mov rax, [rbp+var_20]"], [58, "movzx eax, byte ptr [rax]"], [59, "movzx eax, al"], [60, "cmp edx, eax"], [61, "jnz short loc_402828"], [62, "mov rax, [rbp+var_18]"], [63, "mov dword ptr [rax+84h], 0"], [64, "jmp short loc_402857"], [65, "mov rax, [rbp+var_8]"], [66, "mov edx, [rax+4]"], [67, "mov rax, [rbp+var_20]"], [68, "movzx eax, byte ptr [rax]"], [69, "movzx eax, al"], [70, "cmp edx, eax"], [71, "jnz short loc_40284D"], [72, "mov rax, [rbp+var_18]"], [73, "mov dword ptr [rax+84h], 1"], [74, "jmp short loc_402857"], [75, "mov eax, 0FFFFFFFBh"], [76, "jmp locret_40290F"], [77, "mov rax, [rbp+var_20]"], [78, "add rax, 4"], [79, "mov rdi, rax"], [80, "call sub_40252E"], [81, "mov rdx, [rbp+var_18]"], [82, "mov [rdx+88h], ax"], [83, "mov rax, [rbp+var_20]"], [84, "add rax, 6"], [85, "mov rdi, rax"], [86, "call sub_40252E"], [87, "mov rdx, [rbp+var_18]"], [88, "mov [rdx+8Ah], ax"], [89, "mov eax, [rbp+var_24]"], [90, "sub eax, 8"], [91, "mov edx, eax"], [92, "mov rax, [rbp+var_18]"], [93, "mov [rax+98h], edx"], [94, "mov rax, [rbp+var_18]"], [95, "mov eax, [rax+98h]"], [96, "test eax, eax"], [97, "jz short loc_4028FB"], [98, "mov rax, [rbp+var_18]"], [99, "mov eax, [rax+98h]"], [100, "mov eax, eax"], [101, "mov rdi, rax"], [102, "call _malloc"], [103, "mov rdx, rax"], [104, "mov rax, [rbp+var_18]"], [105, "mov [rax+90h], rdx"], [106, "mov rax, [rbp+var_18]"], [107, "mov eax, [rax+98h]"], [108, "mov edx, eax"], [109, "mov rax, [rbp+var_20]"], [110, "lea rcx, [rax+8]"], [111, "mov rax, [rbp+var_18]"], [112, "mov rax, [rax+90h]"], [113, "mov rsi, rcx"], [114, "mov rdi, rax"], [115, "call _memcpy"], [116, "jmp short loc_40290A"], [117, "mov rax, [rbp+var_18]"], [118, "mov qword ptr [rax+90h], 0"], [119, "mov eax, 0"], [120, "leave"], [121, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [9, 8], [13, 10], [13, 12], [14, 13], [15, 14], [16, 15], [17, 16], [18, 5], [19, 18], [22, 4], [23, 22], [24, 23], [25, 24], [26, 25], [27, 26], [28, 5], [29, 27], [29, 28], [30, 29], [33, 27], [35, 33], [35, 4], [36, 27], [37, 5], [37, 36], [38, 37], [38, 5], [39, 38], [42, 13], [43, 42], [44, 43], [45, 44], [46, 37], [46, 5], [47, 4], [47, 35], [48, 46], [49, 47], [51, 50], [52, 51], [55, 13], [56, 55], [57, 4], [57, 35], [58, 57], [59, 58], [60, 59], [60, 56], [61, 60], [62, 3], [63, 62], [65, 13], [66, 65], [67, 4], [67, 35], [68, 67], [69, 68], [70, 66], [70, 69], [71, 70], [72, 3], [73, 72], [77, 35], [77, 4], [78, 77], [79, 78], [81, 3], [82, 81], [82, 80], [83, 4], [83, 35], [84, 83], [85, 84], [87, 3], [88, 86], [88, 87], [89, 37], [89, 5], [90, 89], [91, 90], [92, 3], [93, 92], [93, 91], [94, 3], [95, 93], [95, 94], [96, 95], [97, 96], [98, 3], [99, 63], [99, 93], [99, 88], [99, 105], [99, 98], [99, 73], [99, 82], [100, 99], [101, 100], [103, 102], [104, 3], [105, 104], [105, 103], [106, 3], [107, 106], [107, 105], [107, 93], [108, 107], [109, 35], [109, 4], [110, 109], [110, 105], [111, 3], [112, 111], [112, 105], [113, 110], [114, 112], [117, 3], [118, 117], [121, 119], [121, 75], [121, 20], [121, 31], [121, 40], [121, 53]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/a7f0a057e3595fda4579432c28c32741dc464b504b2a03b91823cd9b6f26bfd8_a7f0a057e3595fda4579432c28c32741dc464b504b2a03b91823cd9b6f26bfd8.jsonl.gz", "strip_func_name": "sub_40274A", "query": "\n\n\n__int64 __fastcall sub_40274A(__int64 a1, unsigned __int8 *a2, int a3)\n{\n_DWORD *v3; // rax\nsigned int v5; // [rsp+Ch] [rbp-24h]\nunsigned __int8 *v6; // [rsp+10h] [rbp-20h]\nint v7; // [rsp+24h] [rbp-Ch]\n_DWORD *v8; // [rsp+28h] [rbp-8h]\n\nv6 = a2;\nv5 = a3;\nif ( *(_WORD *)a1 == 2 )\nv3 = &unk_406010;\nelse\nv3 = &unk_406020;\nv8 = v3;\nif ( v3[3] )\n{\nif ( !a3 )\nreturn 4294967293LL;\nv7 = (4 * *a2) & 0x3C;\nif ( a3 < v7 )\nreturn 4294967292LL;\nv6 = &a2[(4 * *a2) & 0x3C];\nv5 = a3 - v7;\n}\nif ( v5 <= 7 )\nreturn 0xFFFFFFFFLL;\nif ( v3[2] && (unsigned __int16)sub_4024A2((__int64)v6, v5) )\nreturn 4294967294LL;\nif ( *v8 == *v6 )\n{\n*(_DWORD *)(a1 + 132) = 0;\n}\nelse\n{\nif ( v8[1] != *v6 )\nreturn 4294967291LL;\n*(_DWORD *)(a1 + 132) = 1;\n}\n*(_WORD *)(a1 + 136) = sub_40252E(v6 + 4);\n*(_WORD *)(a1 + 138) = sub_40252E(v6 + 6);\n*(_DWORD *)(a1 + 152) = v5 - 8;\nif ( *(_DWORD *)(a1 + 152) )\n{\n*(_QWORD *)(a1 + 144) = malloc(*(unsigned int *)(a1 + 152));\nmemcpy(*(void **)(a1 + 144), v6 + 8, *(unsigned int *)(a1 + 152));\n}\nelse\n{\n*(_QWORD *)(a1 + 144) = 0LL;\n}\nreturn 0LL;\n}\n\n\n\nQ:[a3,a1,a2,v5,v6,v7,v8,sub_40274A,sub_4024A2,sub_40252E,]", "hints": "[]", "response": "{'a3': 'len', 'a1': 'pkt', 'a2': 'data', 'v5': 'lena', 'v6': 'dataa', 'v7': 'hdrlen', 'v8': 'rule', 'sub_40274A': 'icmp_parse', 'sub_4024A2': 'checksum', 'sub_40252E': 'read16'}"}
[ [ 0.7456679344177246, 0.7441363334655762, 0.7290859222412109, 0.7220083475112915, 0.7211989760398865, 0.7128913402557373, 0.7067486643791199, 0.7040316462516785, 0.7018632888793945, 0.6964169144630432, 0.6939214468002319, 0.6917890310287476, 0.6908792853355408, 0.6905463933944702, 0.689362645149231, 0.6839324235916138, 0.6837592124938965, 0.683002769947052, 0.6814166903495789, 0.6799684762954712 ], [ 160141, 16569, 48478, 167738, 114014, 212586, 109577, 69678, 76651, 63886, 162286, 179238, 138767, 164450, 212023, 98097, 68323, 181037, 13400, 164435 ] ]
vListInsertGeneric
2ade45a8fa3d5224f88da53a0a68d175f7ff3471de2a6018952d73132f6826d5
FreeRTOS
FreeRTOS
NA
static void vListInsertGeneric( List_t * const pxList, ListItem_t * const pxNewListItem, MiniListItem_t * pxWhere ) { /* Insert a new list item into pxList, it does not sort the list, * but it puts the item just before xListEnd, so it will be the last item * returned by listGET_HEAD_ENTRY() */ /* MISRA Ref 11.3.1 [Misaligned access] */ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-113 */ /* coverity[misra_c_2012_rule_11_3_violation] */ pxNewListItem->pxNext = ( ( ListItem_t * ) pxWhere ); pxNewListItem->pxPrevious = pxWhere->pxPrevious; pxWhere->pxPrevious->pxNext = pxNewListItem; pxWhere->pxPrevious = pxNewListItem; /* Remember which list the item is in. */ listLIST_ITEM_CONTAINER( pxNewListItem ) = ( struct xLIST * configLIST_VOLATILE ) pxList; ( pxList->uxNumberOfItems )++; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41EA3A", "function_addr": 4319802, "binary_name": "2ade45a8fa3d5224f88da53a0a68d175f7ff3471de2a6018952d73132f6826d5.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov [rbp+var_10], rsi"], [4, "mov [rbp+var_18], rdx"], [5, "mov rax, [rbp+var_10]"], [6, "mov rdx, [rbp+var_18]"], [7, "mov [rax+8], rdx"], [8, "mov rax, [rbp+var_18]"], [9, "mov rdx, [rax+10h]"], [10, "mov rax, [rbp+var_10]"], [11, "mov [rax+10h], rdx"], [12, "mov rax, [rbp+var_18]"], [13, "mov rax, [rax+10h]"], [14, "mov rdx, [rbp+var_10]"], [15, "mov [rax+8], rdx"], [16, "mov rax, [rbp+var_18]"], [17, "mov rdx, [rbp+var_10]"], [18, "mov [rax+10h], rdx"], [19, "mov rax, [rbp+var_10]"], [20, "mov rdx, [rbp+var_8]"], [21, "mov [rax+20h], rdx"], [22, "mov rax, [rbp+var_8]"], [23, "mov rax, [rax]"], [24, "lea rdx, [rax+1]"], [25, "mov rax, [rbp+var_8]"], [26, "mov [rax], rdx"], [27, "nop"], [28, "pop rbp"], [29, "retn"]], "data_dep": [[5, 3], [6, 4], [7, 6], [7, 5], [8, 4], [9, 8], [9, 7], [10, 3], [11, 10], [11, 9], [12, 4], [13, 11], [13, 12], [14, 3], [15, 14], [15, 13], [16, 4], [17, 3], [18, 17], [18, 16], [19, 3], [20, 2], [21, 19], [21, 20], [22, 2], [23, 22], [23, 21], [24, 23], [24, 20], [24, 21], [25, 2], [26, 24], [26, 25], [28, 0], [29, 25]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/2ade45a8fa3d5224f88da53a0a68d175f7ff3471de2a6018952d73132f6826d5_2ade45a8fa3d5224f88da53a0a68d175f7ff3471de2a6018952d73132f6826d5.jsonl.gz", "strip_func_name": "sub_41EA3A", "query": "\n\n\n_QWORD *__fastcall sub_41EA3A(_QWORD *a1, _QWORD *a2, __int64 a3)\n{\n_QWORD *result; // rax\n\na2[1] = a3;\na2[2] = *(_QWORD *)(a3 + 16);\n*(_QWORD *)(*(_QWORD *)(a3 + 16) + 8LL) = a2;\n*(_QWORD *)(a3 + 16) = a2;\na2[4] = a1;\nresult = a1;\n++*a1;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_41EA3A,]", "hints": "[]", "response": "{'a3': 'pxWhere', 'a1': 'pxList', 'a2': 'pxNewListItem', 'sub_41EA3A': 'vListInsertGeneric'}"}
[ [ 0.8302603960037231, 0.8223100304603577, 0.817814290523529, 0.8157239556312561, 0.8034849166870117, 0.7874902486801147, 0.7820838093757629, 0.77568519115448, 0.7704235315322876, 0.7702959179878235, 0.767025351524353, 0.7649680376052856, 0.7638506293296814, 0.753887414932251, 0.7516970038414001, 0.7478598356246948, 0.7460945248603821, 0.7457535862922668, 0.7439753413200378, 0.743636965751648 ], [ 87033, 1494, 114835, 237557, 211425, 74907, 187124, 251250, 32620, 26676, 233369, 118775, 168841, 24271, 138173, 152732, 222450, 188531, 59490, 180636 ] ]
sess_auth_test
f14f03e2ad91a86fde479b7e3453c83ebb1d8af9cf080462d99e6025027308e2
asterisk
pjproject-archive
NA
int sess_auth_test(void) { pj_pool_t *pool; int rc; PJ_LOG(3,(THIS_FILE, " STUN session authentication test")); /* Init STUN config */ pj_stun_config_init(&stun_cfg, mem, 0, NULL, NULL); /* Create pool and timer heap */ pool = pj_pool_create(mem, "authtest", 200, 200, NULL); if (pj_timer_heap_create(pool, 20, &stun_cfg.timer_heap)) { pj_pool_release(pool); return -5; } /* Basic retransmission test */ rc = run_client_test("Retransmission", // title PJ_FALSE, // server responding PJ_STUN_AUTH_NONE, // server auth PJ_STUN_AUTH_NONE, // client auth NULL, // realm NULL, // username NULL, // nonce NULL, // password PJ_FALSE, // dummy MI USE_IPV6, // use IPv6 PJ_TRUE, // expected error PJNATH_ESTUNTIMEDOUT,// expected code NULL, // expected realm NULL, // expected nonce &retransmit_check // more check ); if (rc != 0) { goto done; } /* * Short term credential. * draft-ietf-behave-rfc3489bis-15#section-10.1.2 */ /* * If the message does not contain both a MESSAGE-INTEGRITY and a * USERNAME attribute, If the message is a request, the server MUST * reject the request with an error response. This response MUST * use an error code of 400 (Bad Request). */ rc = run_client_test("Missing MESSAGE-INTEGRITY (short term)", // title PJ_TRUE, // server responding PJ_STUN_AUTH_SHORT_TERM, // server auth PJ_STUN_AUTH_NONE, // client auth NULL, // realm NULL, // username NULL, // nonce NULL, // password PJ_FALSE, // dummy MI USE_IPV6, // use IPv6 PJ_TRUE, // expected error PJ_STATUS_FROM_STUN_CODE(400),// expected code NULL, // expected realm NULL, // expected nonce NULL // more check ); if (rc != 0) { goto done; } /* If the USERNAME does not contain a username value currently valid * within the server: If the message is a request, the server MUST * reject the request with an error response. This response MUST use * an error code of 401 (Unauthorized). */ rc = run_client_test("USERNAME mismatch (short term)", // title PJ_TRUE, // server responding PJ_STUN_AUTH_SHORT_TERM, // server auth PJ_STUN_AUTH_SHORT_TERM, // client auth NULL, // realm "anotheruser", // username NULL, // nonce "anotherpass", // password PJ_FALSE, // dummy MI USE_IPV6, // use IPv6 PJ_TRUE, // expected error PJ_STATUS_FROM_STUN_CODE(401),// expected code NULL, // expected realm NULL, // expected nonce NULL // more check ); if (rc != 0) { goto done; } /* Using the password associated with the username, compute the value * for the message-integrity as described in Section 15.4. If the * resulting value does not match the contents of the MESSAGE- * INTEGRITY attribute: * * - If the message is a request, the server MUST reject the request * with an error response. This response MUST use an error code * of 401 (Unauthorized). */ rc = run_client_test("MESSAGE-INTEGRITY mismatch (short term)", // title PJ_TRUE, // server responding PJ_STUN_AUTH_SHORT_TERM, // server auth PJ_STUN_AUTH_SHORT_TERM, // client auth NULL, // realm USERNAME, // username NULL, // nonce "anotherpass", // password PJ_FALSE, // dummy MI USE_IPV6, // use IPv6 PJ_TRUE, // expected error PJ_STATUS_FROM_STUN_CODE(401),// expected code NULL, // expected realm NULL, // expected nonce NULL // more check ); if (rc != 0) { goto done; } /* USERNAME is not present, server must respond with 400 (Bad * Request). */ rc = run_client_test("Missing USERNAME (short term)",// title PJ_TRUE, // server responding PJ_STUN_AUTH_SHORT_TERM, // server auth PJ_STUN_AUTH_NONE, // client auth NULL, // realm NULL, // username NULL, // nonce NULL, // password PJ_TRUE, // dummy MI USE_IPV6, // use IPv6 PJ_TRUE, // expected error PJ_STATUS_FROM_STUN_CODE(400), // expected code NULL, // expected realm NULL, // expected nonce NULL // more check ); if (rc != 0) { goto done; } /* Successful short term authentication */ rc = run_client_test("Successful scenario (short term)", // title PJ_TRUE, // server responding PJ_STUN_AUTH_SHORT_TERM, // server auth PJ_STUN_AUTH_SHORT_TERM, // client auth NULL, // realm USERNAME, // username NULL, // nonce PASSWORD, // password PJ_FALSE, // dummy MI USE_IPV6, // use IPv6 PJ_FALSE, // expected error PJ_SUCCESS, // expected code NULL, // expected realm NULL, // expected nonce NULL // more check ); if (rc != 0) { goto done; } /* * (our own) Extended tests for long term credential */ /* When server wants to use short term credential, but request has * REALM, reject with .... 401 ??? */ rc = run_client_test("Unwanted REALM (short term)", // title PJ_TRUE, // server responding PJ_STUN_AUTH_SHORT_TERM, // server auth PJ_STUN_AUTH_NONE, // client auth REALM, // realm USERNAME, // username NULL, // nonce PASSWORD, // password PJ_TRUE, // dummy MI USE_IPV6, // use IPv6 PJ_TRUE, // expected error PJ_STATUS_FROM_STUN_CODE(401), // expected code NULL, // expected realm NULL, // expected nonce &long_term_check2 // more check ); if (rc != 0) { goto done; } /* * Long term credential. * draft-ietf-behave-rfc3489bis-15#section-10.2.2 */ /* If the message does not contain a MESSAGE-INTEGRITY attribute, the * server MUST generate an error response with an error code of 401 * (Unauthorized). This response MUST include a REALM value. It is * RECOMMENDED that the REALM value be the domain name of the * provider of the STUN server. The response MUST include a NONCE, * selected by the server. The response SHOULD NOT contain a * USERNAME or MESSAGE-INTEGRITY attribute. */ rc = run_client_test("Missing M-I (long term)", // title PJ_TRUE, // server responding PJ_STUN_AUTH_LONG_TERM, // server auth PJ_STUN_AUTH_NONE, // client auth NULL, // client realm NULL, // client username NULL, // client nonce NULL, // client password PJ_FALSE, // client dummy MI USE_IPV6, // use IPv6 PJ_TRUE, // expected error PJ_STATUS_FROM_STUN_CODE(401), // expected code REALM, // expected realm NONCE, // expected nonce &long_term_check1 // more check ); if (rc != 0) { goto done; } /* If the message contains a MESSAGE-INTEGRITY attribute, but is * missing the USERNAME, REALM or NONCE attributes, the server MUST * generate an error response with an error code of 400 (Bad * Request). This response SHOULD NOT include a USERNAME, NONCE, * REALM or MESSAGE-INTEGRITY attribute. */ /* Missing USERNAME */ rc = run_client_test("Missing USERNAME (long term)", // title PJ_TRUE, // server responding PJ_STUN_AUTH_LONG_TERM, // server auth PJ_STUN_AUTH_NONE, // client auth REALM, // client realm NULL, // client username NONCE, // client nonce PASSWORD, // client password PJ_TRUE, // client dummy MI USE_IPV6, // use IPv6 PJ_TRUE, // expected error PJ_STATUS_FROM_STUN_CODE(400), // expected code NULL, // expected realm NULL, // expected nonce &long_term_check2 // more check ); if (rc != 0) { goto done; } /* Missing REALM */ rc = run_client_test("Missing REALM (long term)", // title PJ_TRUE, // server responding PJ_STUN_AUTH_LONG_TERM, // server auth PJ_STUN_AUTH_NONE, // client auth NULL, // client realm USERNAME, // client username NONCE, // client nonce PASSWORD, // client password PJ_TRUE, // client dummy MI USE_IPV6, // use IPv6 PJ_TRUE, // expected error PJ_STATUS_FROM_STUN_CODE(400), // expected code NULL, // expected realm NULL, // expected nonce &long_term_check2 // more check ); if (rc != 0) { goto done; } /* Missing NONCE */ rc = run_client_test("Missing NONCE (long term)", // title PJ_TRUE, // server responding PJ_STUN_AUTH_LONG_TERM, // server auth PJ_STUN_AUTH_NONE, // client auth REALM, // client realm USERNAME, // client username NULL, // client nonce PASSWORD, // client password PJ_TRUE, // client dummy MI USE_IPV6, // use IPv6 PJ_TRUE, // expected error PJ_STATUS_FROM_STUN_CODE(400), // expected code NULL, // expected realm NULL, // expected nonce &long_term_check2 // more check ); if (rc != 0) { goto done; } /* If the NONCE is no longer valid, the server MUST generate an error * response with an error code of 438 (Stale Nonce). This response * MUST include a NONCE and REALM attribute and SHOULD NOT incude the * USERNAME or MESSAGE-INTEGRITY attribute. Servers can invalidate * nonces in order to provide additional security. See Section 4.3 * of [RFC2617] for guidelines. */ // how?? /* If the username in the USERNAME attribute is not valid, the server * MUST generate an error response with an error code of 401 * (Unauthorized). This response MUST include a REALM value. It is * RECOMMENDED that the REALM value be the domain name of the * provider of the STUN server. The response MUST include a NONCE, * selected by the server. The response SHOULD NOT contain a * USERNAME or MESSAGE-INTEGRITY attribute. */ rc = run_client_test("Invalid username (long term)", // title PJ_TRUE, // server responding PJ_STUN_AUTH_LONG_TERM, // server auth PJ_STUN_AUTH_LONG_TERM, // client auth REALM, // client realm "anotheruser", // client username "a nonce", // client nonce "somepassword", // client password PJ_FALSE, // client dummy MI USE_IPV6, // use IPv6 PJ_TRUE, // expected error PJ_STATUS_FROM_STUN_CODE(401), // expected code REALM, // expected realm NONCE, // expected nonce &long_term_check1 // more check ); if (rc != 0) { goto done; } /* Successful long term authentication */ rc = run_client_test("Successful scenario (long term)", // title PJ_TRUE, // server responding PJ_STUN_AUTH_LONG_TERM, // server auth PJ_STUN_AUTH_LONG_TERM, // client auth REALM, // client realm USERNAME, // client username "anothernonce", // client nonce PASSWORD, // client password PJ_FALSE, // client dummy MI USE_IPV6, // use IPv6 PJ_FALSE, // expected error 0, // expected code NULL, // expected realm NULL, // expected nonce &long_term_check3 // more check ); if (rc != 0) { goto done; } /* * (our own) Extended tests for long term credential */ /* If REALM doesn't match, server must respond with 401 */ #if 0 // STUN session now will just use the realm sent in the // response, so this test will fail because it will // authenticate successfully. rc = run_client_test("Invalid REALM (long term)", // title PJ_TRUE, // server responding PJ_STUN_AUTH_LONG_TERM, // server auth PJ_STUN_AUTH_LONG_TERM, // client auth "anotherrealm", // client realm USERNAME, // client username NONCE, // client nonce PASSWORD, // client password PJ_FALSE, // client dummy MI USE_IPV6, // use IPv6 PJ_TRUE, // expected error PJ_STATUS_FROM_STUN_CODE(401), // expected code REALM, // expected realm NONCE, // expected nonce &long_term_check1 // more check ); if (rc != 0) { goto done; } #endif /* Invalid HMAC */ /* Valid static short term, without NONCE */ /* Valid static short term, WITH NONCE */ /* Valid static long term (with NONCE */ /* Valid dynamic short term (without NONCE) */ /* Valid dynamic short term (with NONCE) */ /* Valid dynamic long term (with NONCE) */ done: pj_timer_heap_destroy(stun_cfg.timer_heap); pj_pool_release(pool); return rc; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40CABC", "function_addr": 4246204, "binary_name": "f14f03e2ad91a86fde479b7e3453c83ebb1d8af9cf080462d99e6025027308e2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "call sub_44F678"], [4, "cmp eax, 2"], [5, "jle short loc_40CAE2"], [6, "mov esi, offset aStunSessionAut"], [7, "mov edi, offset aSessAuthC"], [8, "mov eax, 0"], [9, "call sub_44FF41"], [10, "mov rax, cs:qword_480E48"], [11, "mov r8d, 0"], [12, "mov ecx, 0"], [13, "mov edx, 0"], [14, "mov rsi, rax"], [15, "mov edi, offset unk_480E00"], [16, "call sub_40B37D"], [17, "mov rax, cs:qword_480E48"], [18, "mov r8d, 0"], [19, "mov ecx, 0C8h"], [20, "mov edx, 0C8h"], [21, "mov esi, offset aAuthtest"], [22, "mov rdi, rax"], [23, "call sub_450508"], [24, "mov [rbp+var_10], rax"], [25, "mov rax, [rbp+var_10]"], [26, "mov edx, offset qword_480E10"], [27, "mov esi, 14h"], [28, "mov rdi, rax"], [29, "call sub_45EF0B"], [30, "test eax, eax"], [31, "jz short loc_40CB5E"], [32, "mov rax, [rbp+var_10]"], [33, "mov rdi, rax"], [34, "call sub_45054B"], [35, "mov eax, 0FFFFFFFBh"], [36, "jmp locret_40CFDE"], [37, "sub rsp, 8"], [38, "push offset sub_40C8C2"], [39, "push 0"], [40, "push 0"], [41, "push 5A554h"], [42, "push 1"], [43, "push 0"], [44, "push 0"], [45, "push 0"], [46, "push 0"], [47, "mov r9d, 0"], [48, "mov r8d, 0"], [49, "mov ecx, 0"], [50, "mov edx, 0"], [51, "mov esi, 0"], [52, "mov edi, offset aRetransmission"], [53, "call sub_40BF45"], [54, "add rsp, 50h"], [55, "mov [rbp+var_4], eax"], [56, "cmp [rbp+var_4], 0"], [57, "jnz loc_40CF9E"], [58, "sub rsp, 8"], [59, "push 0"], [60, "push 0"], [61, "push 0"], [62, "push 5A6E0h"], [63, "push 1"], [64, "push 0"], [65, "push 0"], [66, "push 0"], [67, "push 0"], [68, "mov r9d, 0"], [69, "mov r8d, 0"], [70, "mov ecx, 0"], [71, "mov edx, 1"], [72, "mov esi, 1"], [73, "mov edi, offset aMissingMessage"], [74, "call sub_40BF45"], [75, "add rsp, 50h"], [76, "mov [rbp+var_4], eax"], [77, "cmp [rbp+var_4], 0"], [78, "jnz loc_40CFA1"], [79, "sub rsp, 8"], [80, "push 0"], [81, "push 0"], [82, "push 0"], [83, "push 5A6E1h"], [84, "push 1"], [85, "push 0"], [86, "push 0"], [87, "push offset aAnotherpass"], [88, "push 0"], [89, "mov r9d, offset aAnotheruser"], [90, "mov r8d, 0"], [91, "mov ecx, 1"], [92, "mov edx, 1"], [93, "mov esi, 1"], [94, "mov edi, offset aUsernameMismat"], [95, "call sub_40BF45"], [96, "add rsp, 50h"], [97, "mov [rbp+var_4], eax"], [98, "cmp [rbp+var_4], 0"], [99, "jnz loc_40CFA4"], [100, "sub rsp, 8"], [101, "push 0"], [102, "push 0"], [103, "push 0"], [104, "push 5A6E1h"], [105, "push 1"], [106, "push 0"], [107, "push 0"], [108, "push offset aAnotherpass"], [109, "push 0"], [110, "mov r9d, offset aTheusername"], [111, "mov r8d, 0"], [112, "mov ecx, 1"], [113, "mov edx, 1"], [114, "mov esi, 1"], [115, "mov edi, offset aMessageIntegri"], [116, "call sub_40BF45"], [117, "add rsp, 50h"], [118, "mov [rbp+var_4], eax"], [119, "cmp [rbp+var_4], 0"], [120, "jnz loc_40CFA7"], [121, "sub rsp, 8"], [122, "push 0"], [123, "push 0"], [124, "push 0"], [125, "push 5A6E0h"], [126, "push 1"], [127, "push 0"], [128, "push 1"], [129, "push 0"], [130, "push 0"], [131, "mov r9d, 0"], [132, "mov r8d, 0"], [133, "mov ecx, 0"], [134, "mov edx, 1"], [135, "mov esi, 1"], [136, "mov edi, offset aMissingUsernam"], [137, "call sub_40BF45"], [138, "add rsp, 50h"], [139, "mov [rbp+var_4], eax"], [140, "cmp [rbp+var_4], 0"], [141, "jnz loc_40CFAA"], [142, "sub rsp, 8"], [143, "push 0"], [144, "push 0"], [145, "push 0"], [146, "push 0"], [147, "push 0"], [148, "push 0"], [149, "push 0"], [150, "push offset aThepassword"], [151, "push 0"], [152, "mov r9d, offset aTheusername"], [153, "mov r8d, 0"], [154, "mov ecx, 1"], [155, "mov edx, 1"], [156, "mov esi, 1"], [157, "mov edi, offset aSuccessfulScen"], [158, "call sub_40BF45"], [159, "add rsp, 50h"], [160, "mov [rbp+var_4], eax"], [161, "cmp [rbp+var_4], 0"], [162, "jnz loc_40CFAD"], [163, "sub rsp, 8"], [164, "push offset sub_40C984"], [165, "push 0"], [166, "push 0"], [167, "push 5A6E1h"], [168, "push 1"], [169, "push 0"], [170, "push 1"], [171, "push offset aThepassword"], [172, "push 0"], [173, "mov r9d, offset aTheusername"], [174, "mov r8d, offset aStunSessionTes"], [175, "mov ecx, 0"], [176, "mov edx, 1"], [177, "mov esi, 1"], [178, "mov edi, offset aUnwantedRealmS"], [179, "call sub_40BF45"], [180, "add rsp, 50h"], [181, "mov [rbp+var_4], eax"], [182, "cmp [rbp+var_4], 0"], [183, "jnz loc_40CFB0"], [184, "sub rsp, 8"], [185, "push offset sub_40C927"], [186, "push offset aThenonce"], [187, "push offset aStunSessionTes"], [188, "push 5A6E1h"], [189, "push 1"], [190, "push 0"], [191, "push 0"], [192, "push 0"], [193, "push 0"], [194, "mov r9d, 0"], [195, "mov r8d, 0"], [196, "mov ecx, 0"], [197, "mov edx, 2"], [198, "mov esi, 1"], [199, "mov edi, offset aMissingMILongT"], [200, "call sub_40BF45"], [201, "add rsp, 50h"], [202, "mov [rbp+var_4], eax"], [203, "cmp [rbp+var_4], 0"], [204, "jnz loc_40CFB3"], [205, "sub rsp, 8"], [206, "push offset sub_40C984"], [207, "push 0"], [208, "push 0"], [209, "push 5A6E0h"], [210, "push 1"], [211, "push 0"], [212, "push 1"], [213, "push offset aThepassword"], [214, "push offset aThenonce"], [215, "mov r9d, 0"], [216, "mov r8d, offset aStunSessionTes"], [217, "mov ecx, 0"], [218, "mov edx, 2"], [219, "mov esi, 1"], [220, "mov edi, offset aMissingUsernam_0"], [221, "call sub_40BF45"], [222, "add rsp, 50h"], [223, "mov [rbp+var_4], eax"], [224, "cmp [rbp+var_4], 0"], [225, "jnz loc_40CFB6"], [226, "sub rsp, 8"], [227, "push offset sub_40C984"], [228, "push 0"], [229, "push 0"], [230, "push 5A6E0h"], [231, "push 1"], [232, "push 0"], [233, "push 1"], [234, "push offset aThepassword"], [235, "push offset aThenonce"], [236, "mov r9d, offset aTheusername"], [237, "mov r8d, 0"], [238, "mov ecx, 0"], [239, "mov edx, 2"], [240, "mov esi, 1"], [241, "mov edi, offset aMissingRealmLo"], [242, "call sub_40BF45"], [243, "add rsp, 50h"], [244, "mov [rbp+var_4], eax"], [245, "cmp [rbp+var_4], 0"], [246, "jnz loc_40CFB9"], [247, "sub rsp, 8"], [248, "push offset sub_40C984"], [249, "push 0"], [250, "push 0"], [251, "push 5A6E0h"], [252, "push 1"], [253, "push 0"], [254, "push 1"], [255, "push offset aThepassword"], [256, "push 0"], [257, "mov r9d, offset aTheusername"], [258, "mov r8d, offset aStunSessionTes"], [259, "mov ecx, 0"], [260, "mov edx, 2"], [261, "mov esi, 1"], [262, "mov edi, offset aMissingNonceLo"], [263, "call sub_40BF45"], [264, "add rsp, 50h"], [265, "mov [rbp+var_4], eax"], [266, "cmp [rbp+var_4], 0"], [267, "jnz loc_40CFBC"], [268, "sub rsp, 8"], [269, "push offset sub_40C927"], [270, "push offset aThenonce"], [271, "push offset aStunSessionTes"], [272, "push 5A6E1h"], [273, "push 1"], [274, "push 0"], [275, "push 0"], [276, "push offset aSomepassword"], [277, "push offset aANonce"], [278, "mov r9d, offset aAnotheruser"], [279, "mov r8d, offset aStunSessionTes"], [280, "mov ecx, 2"], [281, "mov edx, 2"], [282, "mov esi, 1"], [283, "mov edi, offset aInvalidUsernam"], [284, "call sub_40BF45"], [285, "add rsp, 50h"], [286, "mov [rbp+var_4], eax"], [287, "cmp [rbp+var_4], 0"], [288, "jnz short loc_40CFBF"], [289, "sub rsp, 8"], [290, "push offset sub_40CA36"], [291, "push 0"], [292, "push 0"], [293, "push 0"], [294, "push 0"], [295, "push 0"], [296, "push 0"], [297, "push offset aThepassword"], [298, "push offset aAnothernonce"], [299, "mov r9d, offset aTheusername"], [300, "mov r8d, offset aStunSessionTes"], [301, "mov ecx, 2"], [302, "mov edx, 2"], [303, "mov esi, 1"], [304, "mov edi, offset aSuccessfulScen_0"], [305, "call sub_40BF45"], [306, "add rsp, 50h"], [307, "mov [rbp+var_4], eax"], [308, "cmp [rbp+var_4], 0"], [309, "jmp short loc_40CFC0"], [310, "nop"], [311, "jmp short loc_40CFC0"], [312, "nop"], [313, "jmp short loc_40CFC0"], [314, "nop"], [315, "jmp short loc_40CFC0"], [316, "nop"], [317, "jmp short loc_40CFC0"], [318, "nop"], [319, "jmp short loc_40CFC0"], [320, "nop"], [321, "jmp short loc_40CFC0"], [322, "nop"], [323, "jmp short loc_40CFC0"], [324, "nop"], [325, "jmp short loc_40CFC0"], [326, "nop"], [327, "jmp short loc_40CFC0"], [328, "nop"], [329, "jmp short loc_40CFC0"], [330, "nop"], [331, "jmp short loc_40CFC0"], [332, "nop"], [333, "mov rax, cs:qword_480E10"], [334, "mov rdi, rax"], [335, "call sub_45F0E2"], [336, "mov rax, [rbp+var_10]"], [337, "mov rdi, rax"], [338, "call sub_45054B"], [339, "mov eax, [rbp+var_4]"], [340, "leave"], [341, "retn"]], "data_dep": [[4, 3], [5, 4], [14, 10], [22, 17], [24, 23], [25, 24], [28, 25], [30, 29], [31, 30], [32, 24], [33, 32], [37, 2], [54, 37], [55, 53], [56, 55], [57, 56], [58, 54], [75, 58], [76, 74], [77, 76], [78, 77], [79, 75], [96, 79], [97, 95], [98, 97], [99, 98], [100, 96], [117, 100], [118, 116], [119, 118], [120, 119], [121, 117], [138, 121], [139, 137], [140, 139], [141, 140], [142, 138], [159, 142], [160, 158], [161, 160], [162, 161], [163, 159], [180, 163], [181, 179], [182, 181], [183, 182], [184, 180], [201, 184], [202, 200], [203, 202], [204, 203], [205, 201], [222, 205], [223, 221], [224, 223], [225, 224], [226, 222], [243, 226], [244, 242], [245, 244], [246, 245], [247, 243], [264, 247], [265, 263], [266, 265], [267, 266], [268, 264], [285, 268], [286, 284], [287, 286], [288, 287], [289, 285], [306, 289], [307, 305], [308, 307], [334, 333], [336, 24], [337, 336], [339, 307], [339, 181], [339, 76], [339, 286], [339, 160], [339, 55], [339, 265], [339, 139], [339, 244], [339, 118], [339, 202], [339, 223], [339, 97], [341, 35], [341, 339]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/f14f03e2ad91a86fde479b7e3453c83ebb1d8af9cf080462d99e6025027308e2_f14f03e2ad91a86fde479b7e3453c83ebb1d8af9cf080462d99e6025027308e2.jsonl.gz", "strip_func_name": "sub_40CABC", "query": "\n\n\n__int64 __fastcall sub_40CABC(__int64 a1, __int64 a2, __int64 a3, __int64 a4)\n{\nint v4; // edx\nint v5; // ecx\nint v6; // er8\nint v7; // er9\n__int64 result; // rax\n__int64 v9; // [rsp+0h] [rbp-10h]\nunsigned int v10; // [rsp+Ch] [rbp-4h]\n\nif ( (int)sub_44F678(a1, a2, a3, a4) > 2 )\nsub_44FF41((unsigned int)\"sess_auth.c\", (unsigned int)\" STUN session authentication test\", v4, v5, v6, v7);\nsub_40B37D(qword_480E00, qword_480E48, 0, 0LL, 0LL);\nv9 = sub_450508(qword_480E48, \"authtest\", 200LL, 200LL, 0LL);\nif ( (unsigned int)sub_45EF0B(v9, 20LL, &qword_480E10) )\n{\nsub_45054B(v9);\nresult = 4294967291LL;\n}\nelse\n{\nv10 = sub_40BF45(\n(__int64)\"Retransmission\",\n0LL,\n0LL,\n0LL,\n0LL,\n0LL,\n0LL,\n0LL,\n0,\n0,\n1,\n0x5A554u,\n0LL,\n0LL,\n(__int64 (*)(void))sub_40C8C2);\nif ( !v10 )\n{\nv10 = sub_40BF45(\n(__int64)\"Missing MESSAGE-INTEGRITY (short term)\",\n1LL,\n1LL,\n0LL,\n0LL,\n0LL,\n0LL,\n0LL,\n0,\n0,\n1,\n0x5A6E0u,\n0LL,\n0LL,\n0LL);\nif ( !v10 )\n{\nv10 = sub_40BF45(\n(__int64)\"USERNAME mismatch (short term)\",\n1LL,\n1LL,\n1LL,\n0LL,\n\"anotheruser\",\n0LL,\n(__int64)\"anotherpass\",\n0,\n0,\n1,\n0x5A6E1u,\n0LL,\n0LL,\n0LL);\nif ( !v10 )\n{\nv10 = sub_40BF45(\n(__int64)\"MESSAGE-INTEGRITY mismatch (short term)\",\n1LL,\n1LL,\n1LL,\n0LL,\n\"theusername\",\n0LL,\n(__int64)\"anotherpass\",\n0,\n0,\n1,\n0x5A6E1u,\n0LL,\n0LL,\n0LL);\nif ( !v10 )\n{\nv10 = sub_40BF45(\n(__int64)\"Missing USERNAME (short term)\",\n1LL,\n1LL,\n0LL,\n0LL,\n0LL,\n0LL,\n0LL,\n1,\n0,\n1,\n0x5A6E0u,\n0LL,\n0LL,\n0LL);\nif ( !v10 )\n{\nv10 = sub_40BF45(\n(__int64)\"Successful scenario (short term)\",\n1LL,\n1LL,\n1LL,\n0LL,\n\"theusername\",\n0LL,\n(__int64)\"thepassword\",\n0,\n0,\n0,\n0,\n0LL,\n0LL,\n0LL);\nif ( !v10 )\n{\nv10 = sub_40BF45(\n(__int64)\"Unwanted REALM (short term)\",\n1LL,\n1LL,\n0LL,\n\"STUN session test\",\n\"theusername\",\n0LL,\n(__int64)\"thepassword\",\n1,\n0,\n1,\n0x5A6E1u,\n0LL,\n0LL,\nsub_40C984);\nif ( !v10 )\n{\nv10 = sub_40BF45(\n(__int64)\"Missing M-I (long term)\",\n1LL,\n2LL,\n0LL,\n0LL,\n0LL,\n0LL,\n0LL,\n0,\n0,\n1,\n0x5A6E1u,\n(__int64)\"STUN session test\",\n(__int64)\"thenonce\",\nsub_40C927);\nif ( !v10 )\n{\nv10 = sub_40BF45(\n(__int64)\"Missing USERNAME (long term)\",\n1LL,\n2LL,\n0LL,\n\"STUN session test\",\n0LL,\n\"thenonce\",\n(__int64)\"thepassword\",\n1,\n0,\n1,\n0x5A6E0u,\n0LL,\n0LL,\nsub_40C984);\nif ( !v10 )\n{\nv10 = sub_40BF45(\n(__int64)\"Missing REALM (long term)\",\n1LL,\n2LL,\n0LL,\n0LL,\n\"theusername\",\n\"thenonce\",\n(__int64)\"thepassword\",\n1,\n0,\n1,\n0x5A6E0u,\n0LL,\n0LL,\nsub_40C984);\nif ( !v10 )\n{\nv10 = sub_40BF45(\n(__int64)\"Missing NONCE (long term)\",\n1LL,\n2LL,\n0LL,\n\"STUN session test\",\n\"theusername\",\n0LL,\n(__int64)\"thepassword\",\n1,\n0,\n1,\n0x5A6E0u,\n0LL,\n0LL,\nsub_40C984);\nif ( !v10 )\n{\nv10 = sub_40BF45(\n(__int64)\"Invalid username (long term)\",\n1LL,\n2LL,\n2LL,\n\"STUN session test\",\n\"anotheruser\",\n\"a nonce\",\n(__int64)\"somepassword\",\n0,\n0,\n1,\n0x5A6E1u,\n(__int64)\"STUN session test\",\n(__int64)\"thenonce\",\nsub_40C927);\nif ( !v10 )\nv10 = sub_40BF45(\n(__int64)\"Successful scenario (long term)\",\n1LL,\n2LL,\n2LL,\n\"STUN session test\",\n\"theusername\",\n\"anothernonce\",\n(__int64)\"thepassword\",\n0,\n0,\n0,\n0,\n0LL,\n0LL,\nsub_40CA36);\n}\n}\n}\n}\n}\n}\n}\n}\n}\n}\n}\nsub_45F0E2(qword_480E10);\nsub_45054B(v9);\nresult = v10;\n}\nreturn result;\n}\n\n\n\nQ:[v9,v10,sub_40CABC,sub_44F678,sub_44FF41,sub_40B37D,sub_450508,sub_45EF0B,sub_45054B,sub_40BF45,sub_40C8C2,sub_40C984,sub_40C927,sub_40CA36,sub_45F0E2,]", "hints": "[]", "response": "{'v9': 'pool', 'v10': 'rc', 'sub_40CABC': 'sess_auth_test', 'sub_44F678': 'pj_log_get_level', 'sub_44FF41': 'pj_log_3', 'sub_40B37D': 'pj_stun_config_init', 'sub_450508': 'pj_pool_create', 'sub_45EF0B': 'pj_timer_heap_create', 'sub_45054B': 'pj_pool_release', 'sub_40BF45': 'run_client_test', 'sub_40C8C2': 'retransmit_check', 'sub_40C984': 'long_term_check2', 'sub_40C927': 'long_term_check1', 'sub_40CA36': 'long_term_check3', 'sub_45F0E2': 'pj_timer_heap_destroy'}"}
[ [ 0.817556619644165, 0.7820390462875366, 0.7747058272361755, 0.773581862449646, 0.7725011110305786, 0.770403265953064, 0.7649234533309937, 0.7641255259513855, 0.7607829570770264, 0.7584186792373657, 0.7517629265785217, 0.7496143579483032, 0.74936842918396, 0.7444939613342285, 0.739014744758606, 0.7351206541061401, 0.7339736223220825, 0.7322429418563843, 0.7292530536651611, 0.7280157208442688 ], [ 147051, 171505, 52934, 138835, 137035, 74420, 82639, 171526, 224595, 141453, 262249, 151562, 230016, 135417, 120853, 34892, 69636, 161197, 211202, 96445 ] ]
channel_find_frame_offset
89264c4857408ab3f221b0d85926406503a3e79cae125ccfd0c2641858ccc2ec
pietern
apt137
NA
int channel_find_frame_offset(channel *c) { uint16_t width = CHANNEL_WORDS; uint16_t height = c->size / width; uint16_t *mean = c->wedge_line_mean; uint16_t *stddev = c->wedge_line_stddev; uint16_t i; uint16_t j; for (i = 0, j = 0; i < height;) { // Check if minimum wrt previous line (only if not first wedge) if (i > 0 && j > 0 && stddev[i-1] < stddev[i]) { // Not a minimum; reset j = 0; i++; continue; } // Check if minimum wrt next line (only if not last wedge) if (i < (height - 1) && j < 7 && stddev[i+1] < stddev[i]) { // Not a minimum; reset j = 0; i++; continue; } // Check for brightness increase (only if not first wedge) if (j > 0 && mean[i] < mean[i-8]) { // No increasing brightness; reset j (still a minimum) j = 0; continue; } j++; i += 8; if (j == 8) { // Found 8 consecutive wedges of increasing brightness! return i-64; } } return -1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401B37", "function_addr": 4201271, "binary_name": "89264c4857408ab3f221b0d85926406503a3e79cae125ccfd0c2641858ccc2ec.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_28], rdi"], [3, "mov [rbp+var_6], 3E9h"], [4, "mov rax, [rbp+var_28]"], [5, "mov eax, [rax+8]"], [6, "movzx esi, [rbp+var_6]"], [7, "mov edx, 0"], [8, "div esi"], [9, "mov [rbp+var_8], ax"], [10, "mov rax, [rbp+var_28]"], [11, "mov rax, [rax+10h]"], [12, "mov [rbp+var_10], rax"], [13, "mov rax, [rbp+var_28]"], [14, "mov rax, [rax+18h]"], [15, "mov [rbp+var_18], rax"], [16, "mov [rbp+var_2], 0"], [17, "mov [rbp+var_4], 0"], [18, "jmp loc_401C85"], [19, "cmp [rbp+var_2], 0"], [20, "jz short loc_401BD4"], [21, "cmp [rbp+var_4], 0"], [22, "jz short loc_401BD4"], [23, "movzx eax, [rbp+var_2]"], [24, "add rax, rax"], [25, "lea rdx, [rax-2]"], [26, "mov rax, [rbp+var_18]"], [27, "add rax, rdx"], [28, "movzx edx, word ptr [rax]"], [29, "movzx eax, [rbp+var_2]"], [30, "lea rcx, [rax+rax]"], [31, "mov rax, [rbp+var_18]"], [32, "add rax, rcx"], [33, "movzx eax, word ptr [rax]"], [34, "cmp dx, ax"], [35, "jnb short loc_401BD4"], [36, "mov [rbp+var_4], 0"], [37, "movzx eax, [rbp+var_2]"], [38, "add eax, 1"], [39, "mov [rbp+var_2], ax"], [40, "jmp loc_401C85"], [41, "movzx eax, [rbp+var_2]"], [42, "movzx edx, [rbp+var_8]"], [43, "sub edx, 1"], [44, "cmp eax, edx"], [45, "jge short loc_401C2A"], [46, "cmp [rbp+var_4], 6"], [47, "ja short loc_401C2A"], [48, "movzx eax, [rbp+var_2]"], [49, "add rax, 1"], [50, "lea rdx, [rax+rax]"], [51, "mov rax, [rbp+var_18]"], [52, "add rax, rdx"], [53, "movzx edx, word ptr [rax]"], [54, "movzx eax, [rbp+var_2]"], [55, "lea rcx, [rax+rax]"], [56, "mov rax, [rbp+var_18]"], [57, "add rax, rcx"], [58, "movzx eax, word ptr [rax]"], [59, "cmp dx, ax"], [60, "jnb short loc_401C2A"], [61, "mov [rbp+var_4], 0"], [62, "movzx eax, [rbp+var_2]"], [63, "add eax, 1"], [64, "mov [rbp+var_2], ax"], [65, "jmp short loc_401C85"], [66, "cmp [rbp+var_4], 0"], [67, "jz short loc_401C65"], [68, "movzx eax, [rbp+var_2]"], [69, "lea rdx, [rax+rax]"], [70, "mov rax, [rbp+var_10]"], [71, "add rax, rdx"], [72, "movzx edx, word ptr [rax]"], [73, "movzx eax, [rbp+var_2]"], [74, "add rax, rax"], [75, "lea rcx, [rax-10h]"], [76, "mov rax, [rbp+var_10]"], [77, "add rax, rcx"], [78, "movzx eax, word ptr [rax]"], [79, "cmp dx, ax"], [80, "jnb short loc_401C65"], [81, "mov [rbp+var_4], 0"], [82, "jmp short loc_401C85"], [83, "movzx eax, [rbp+var_4]"], [84, "add eax, 1"], [85, "mov [rbp+var_4], ax"], [86, "add [rbp+var_2], 8"], [87, "cmp [rbp+var_4], 8"], [88, "jnz short loc_401C85"], [89, "movzx eax, [rbp+var_2]"], [90, "sub eax, 40h "], [91, "jmp short loc_401C98"], [92, "movzx eax, [rbp+var_2]"], [93, "cmp ax, [rbp+var_8]"], [94, "jb loc_401B84"], [95, "mov eax, 0FFFFFFFFh"], [96, "pop rbp"], [97, "retn"]], "data_dep": [[4, 2], [5, 4], [6, 3], [8, 6], [9, 5], [10, 2], [11, 10], [12, 11], [13, 2], [14, 13], [15, 14], [19, 64], [19, 39], [19, 86], [19, 16], [20, 19], [21, 61], [21, 36], [21, 17], [21, 81], [21, 85], [22, 21], [23, 86], [23, 16], [23, 64], [23, 39], [24, 23], [25, 43], [25, 24], [25, 72], [25, 28], [25, 53], [25, 7], [26, 15], [27, 26], [27, 25], [28, 27], [29, 86], [29, 16], [29, 64], [29, 39], [30, 55], [30, 75], [30, 29], [30, 30], [31, 15], [32, 30], [32, 31], [33, 32], [34, 28], [34, 33], [35, 34], [37, 16], [37, 64], [37, 39], [37, 86], [38, 37], [39, 38], [41, 39], [41, 16], [41, 64], [41, 86], [42, 9], [43, 42], [44, 41], [44, 43], [45, 44], [46, 61], [46, 36], [46, 17], [46, 81], [46, 85], [47, 46], [48, 86], [48, 39], [48, 16], [48, 64], [49, 48], [50, 49], [50, 43], [51, 15], [52, 51], [52, 50], [53, 52], [54, 86], [54, 16], [54, 64], [54, 39], [55, 75], [55, 54], [55, 30], [55, 55], [56, 15], [57, 56], [57, 55], [58, 57], [59, 58], [59, 53], [60, 59], [62, 39], [62, 16], [62, 64], [62, 86], [63, 62], [64, 63], [66, 61], [66, 36], [66, 17], [66, 81], [66, 85], [67, 66], [68, 86], [68, 39], [68, 16], [68, 64], [69, 53], [69, 68], [69, 43], [70, 12], [71, 69], [71, 70], [72, 71], [73, 39], [73, 16], [73, 64], [73, 86], [74, 73], [75, 74], [75, 30], [75, 55], [75, 75], [76, 12], [77, 76], [77, 75], [78, 77], [79, 78], [79, 72], [80, 79], [83, 85], [83, 61], [83, 36], [83, 17], [83, 81], [84, 83], [85, 84], [86, 39], [86, 16], [86, 64], [86, 86], [87, 85], [88, 87], [89, 86], [90, 89], [92, 39], [92, 16], [92, 64], [92, 86], [93, 92], [93, 9], [94, 93], [96, 0], [97, 95], [97, 90]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/89264c4857408ab3f221b0d85926406503a3e79cae125ccfd0c2641858ccc2ec_89264c4857408ab3f221b0d85926406503a3e79cae125ccfd0c2641858ccc2ec.jsonl.gz", "strip_func_name": "sub_401B37", "query": "\n\n\n__int64 __fastcall sub_401B37(__int64 a1)\n{\n__int64 v2; // [rsp+10h] [rbp-18h]\nunsigned __int16 v3; // [rsp+20h] [rbp-8h]\nunsigned __int16 v4; // [rsp+24h] [rbp-4h]\nunsigned __int16 v5; // [rsp+26h] [rbp-2h]\n\nv3 = *(_DWORD *)(a1 + 8) / 0x3E9u;\nv2 = *(_QWORD *)(a1 + 24);\nv5 = 0;\nv4 = 0;\nwhile ( v5 < v3 )\n{\nif ( v5 && v4 && *(_WORD *)(2LL * v5 - 2 + v2) < *(_WORD *)(2LL * v5 + v2) )\n{\nv4 = 0;\n++v5;\n}\nelse if ( v5 >= v3 - 1 || v4 > 6u || *(_WORD *)(2 * (v5 + 1LL) + v2) >= *(_WORD *)(2LL * v5 + v2) )\n{\nif ( v4 && *(_WORD *)(2LL * v5 + *(_QWORD *)(a1 + 16)) < *(_WORD *)(2LL * v5 - 16 + *(_QWORD *)(a1 + 16)) )\n{\nv4 = 0;\n}\nelse\n{\n++v4;\nv5 += 8;\nif ( v4 == 8 )\nreturn (unsigned int)v5 - 64;\n}\n}\nelse\n{\nv4 = 0;\n++v5;\n}\n}\nreturn 0xFFFFFFFFLL;\n}\n\n\n\nQ:[a1,v2,v3,sub_401B37,]", "hints": "[]", "response": "{'a1': 'c', 'v2': 'stddev', 'v3': 'height', 'sub_401B37': 'channel_find_frame_offset'}"}
[ [ 0.766108512878418, 0.7530282735824585, 0.748700737953186, 0.746157169342041, 0.7269405722618103, 0.7222471237182617, 0.7204195261001587, 0.7089663147926331, 0.6992468237876892, 0.6927103400230408, 0.6860033273696899, 0.6838533282279968, 0.6836418509483337, 0.6803475618362427, 0.6752504110336304, 0.6748862266540527, 0.6725653409957886, 0.670647382736206, 0.6682935953140259, 0.6678345203399658 ], [ 47452, 93995, 218876, 60257, 204579, 171503, 43799, 37413, 51696, 260855, 204042, 253063, 146769, 210778, 225027, 260754, 159493, 40758, 151044, 222578 ] ]
msg_out_filter
dbef1d827ccd2a42e8941d50152f102df28295732bfb69acb1ef6314d264873b
lavabit
pahoehoe
NA
static void msg_out_filter(void *data, const void *mesg, size_t mesglen) { MsgFilterData *filter_data = data; void *filtered_mesg; int filtered_mesglen; if (!filter_data || !mesg || !mesglen) return; if ((filtered_mesglen = filter_data->filter(&filtered_mesg, mesg, mesglen)) == -1) return; filter_data->mesg->out(filter_data->mesg->data, filtered_mesg, filtered_mesglen); mem_release(filtered_mesg); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41510A", "function_addr": 4280586, "binary_name": "dbef1d827ccd2a42e8941d50152f102df28295732bfb69acb1ef6314d264873b.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 rax, [rbp+var_28]"], [7, "mov [rbp+var_8], rax"], [8, "cmp [rbp+var_8], 0"], [9, "jz short loc_415199"], [10, "cmp [rbp+var_30], 0"], [11, "jz short loc_415199"], [12, "cmp [rbp+var_38], 0"], [13, "jz short loc_415199"], [14, "mov rax, [rbp+var_8]"], [15, "mov r8, [rax]"], [16, "mov rdx, [rbp+var_38]"], [17, "mov rcx, [rbp+var_30]"], [18, "lea rax, [rbp+ptr]"], [19, "mov rsi, rcx"], [20, "mov rdi, rax"], [21, "call r8"], [22, "mov [rbp+var_C], eax"], [23, "cmp [rbp+var_C], 0FFFFFFFFh"], [24, "jz short loc_41519C"], [25, "mov rax, [rbp+var_8]"], [26, "mov rax, [rax+8]"], [27, "mov r8, [rax+8]"], [28, "mov eax, [rbp+var_C]"], [29, "movsxd rdx, eax"], [30, "mov rcx, [rbp+ptr]"], [31, "mov rax, [rbp+var_8]"], [32, "mov rax, [rax+8]"], [33, "mov rax, [rax+10h]"], [34, "mov rsi, rcx"], [35, "mov rdi, rax"], [36, "call r8"], [37, "mov rax, [rbp+ptr]"], [38, "mov rdi, rax"], [39, "call _free"], [40, "jmp short locret_41519D"], [41, "nop"], [42, "jmp short locret_41519D"], [43, "nop"], [44, "leave"], [45, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [9, 8], [10, 4], [11, 10], [12, 5], [13, 12], [14, 7], [15, 14], [16, 5], [17, 4], [18, 14], [19, 17], [20, 18], [21, 15], [22, 21], [23, 22], [24, 23], [25, 7], [26, 25], [27, 26], [28, 22], [29, 28], [31, 7], [32, 31], [33, 32], [34, 30], [35, 33], [36, 27], [38, 37], [45, 6], [45, 21], [45, 39]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/dbef1d827ccd2a42e8941d50152f102df28295732bfb69acb1ef6314d264873b_dbef1d827ccd2a42e8941d50152f102df28295732bfb69acb1ef6314d264873b.jsonl.gz", "strip_func_name": "sub_41510A", "query": "\n\n\nvoid __fastcall sub_41510A(__int64 a1, __int64 a2, __int64 a3)\n{\nvoid *ptr; // [rsp+28h] [rbp-18h] BYREF\nint v4; // [rsp+34h] [rbp-Ch]\n__int64 v5; // [rsp+38h] [rbp-8h]\n\nv5 = a1;\nif ( a1 && a2 && a3 )\n{\nv4 = (*(__int64 (__fastcall **)(void **, __int64, __int64))v5)(&ptr, a2, a3);\nif ( v4 != -1 )\n{\n(*(void (__fastcall **)(_QWORD, void *, _QWORD))(*(_QWORD *)(v5 + 8) + 8LL))(\n*(_QWORD *)(*(_QWORD *)(v5 + 8) + 16LL),\nptr,\nv4);\nfree(ptr);\n}\n}\n}\n\n\n\nQ:[a3,a1,a2,ptr,v4,v5,sub_41510A,]", "hints": "[]", "response": "{'a3': 'mesglen', 'a1': 'data', 'a2': 'mesg', 'ptr': 'filtered_mesg', 'v4': 'filtered_mesglen', 'v5': 'filter_data', 'sub_41510A': 'msg_out_filter'}"}
[ [ 0.7346819043159485, 0.7247310876846313, 0.7139802575111389, 0.709256649017334, 0.7046149373054504, 0.6938296556472778, 0.685375452041626, 0.6785102486610413, 0.676544725894928, 0.6717634797096252, 0.6699062585830688, 0.6639969944953918, 0.6605223417282104, 0.6598488092422485, 0.6524112820625305, 0.650309681892395, 0.6498042345046997, 0.6492360830307007, 0.6488093137741089, 0.6485008001327515 ], [ 199388, 72035, 131465, 13638, 181323, 132191, 220786, 14644, 41591, 252989, 99319, 120645, 15335, 135374, 240628, 151674, 86877, 56842, 64745, 246127 ] ]
ft_paint_over_the_squar
dc1c59180826f8e994eaac854681cc7d1ac25b3c7d41d7ca0ffc550d5ef83a54
evgenkarlson
COMPLETED_PISCINE_C
NA
void ft_paint_over_the_squar(t_unc **map_char, t_mapcfg *grid_config, \ t_square *final_result) { int y; int x; y = final_result->y - 1; while (++y < (final_result->y + final_result->size)) { x = final_result->x - 1; while (++x < (final_result->x + final_result->size)) { if (map_char[y][x] == grid_config->char_empty) map_char[y][x] = grid_config->char_square; } } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401CC2", "function_addr": 4201666, "binary_name": "dc1c59180826f8e994eaac854681cc7d1ac25b3c7d41d7ca0ffc550d5ef83a54.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov [rbp+var_20], rsi"], [4, "mov [rbp+var_28], rdx"], [5, "mov rax, [rbp+var_28]"], [6, "movzx eax, word ptr [rax+2]"], [7, "movzx eax, ax"], [8, "sub eax, 1"], [9, "mov [rbp+var_4], eax"], [10, "jmp loc_401D71"], [11, "mov rax, [rbp+var_28]"], [12, "movzx eax, word ptr [rax]"], [13, "movzx eax, ax"], [14, "sub eax, 1"], [15, "mov [rbp+var_8], eax"], [16, "jmp short loc_401D51"], [17, "mov eax, [rbp+var_4]"], [18, "cdqe"], [19, "lea rdx, ds:0[rax*8]"], [20, "mov rax, [rbp+var_18]"], [21, "add rax, rdx"], [22, "mov rdx, [rax]"], [23, "mov eax, [rbp+var_8]"], [24, "cdqe"], [25, "add rax, rdx"], [26, "movzx edx, byte ptr [rax]"], [27, "mov rax, [rbp+var_20]"], [28, "movzx eax, byte ptr [rax+4]"], [29, "cmp dl, al"], [30, "jnz short loc_401D51"], [31, "mov eax, [rbp+var_4]"], [32, "cdqe"], [33, "lea rdx, ds:0[rax*8]"], [34, "mov rax, [rbp+var_18]"], [35, "add rax, rdx"], [36, "mov rdx, [rax]"], [37, "mov eax, [rbp+var_8]"], [38, "cdqe"], [39, "add rdx, rax"], [40, "mov rax, [rbp+var_20]"], [41, "movzx eax, byte ptr [rax+6]"], [42, "mov [rdx], al"], [43, "add [rbp+var_8], 1"], [44, "mov rax, [rbp+var_28]"], [45, "movzx eax, word ptr [rax]"], [46, "movzx edx, ax"], [47, "mov rax, [rbp+var_28]"], [48, "movzx eax, word ptr [rax+4]"], [49, "movzx eax, ax"], [50, "add eax, edx"], [51, "cmp [rbp+var_8], eax"], [52, "jl short loc_401CFA"], [53, "add [rbp+var_4], 1"], [54, "mov rax, [rbp+var_28]"], [55, "movzx eax, word ptr [rax+2]"], [56, "movzx edx, ax"], [57, "mov rax, [rbp+var_28]"], [58, "movzx eax, word ptr [rax+4]"], [59, "movzx eax, ax"], [60, "add eax, edx"], [61, "cmp [rbp+var_4], eax"], [62, "jl loc_401CE8"], [63, "nop"], [64, "nop"], [65, "pop rbp"], [66, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [11, 4], [12, 42], [12, 11], [13, 12], [14, 13], [15, 14], [17, 53], [19, 46], [20, 2], [21, 19], [21, 20], [22, 21], [22, 42], [23, 43], [25, 23], [25, 22], [26, 42], [26, 25], [27, 3], [28, 27], [28, 42], [29, 26], [29, 28], [30, 29], [31, 53], [33, 26], [34, 2], [35, 33], [35, 34], [36, 42], [36, 35], [37, 43], [39, 36], [39, 37], [40, 3], [41, 40], [41, 42], [42, 39], [42, 41], [43, 43], [43, 15], [44, 4], [45, 42], [45, 44], [46, 45], [47, 4], [48, 42], [48, 47], [49, 48], [50, 49], [50, 46], [51, 50], [51, 43], [52, 51], [53, 53], [53, 9], [54, 4], [55, 54], [55, 42], [56, 55], [57, 4], [58, 42], [58, 57], [59, 58], [60, 59], [60, 56], [61, 60], [61, 53], [62, 61], [65, 0], [66, 60]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/dc1c59180826f8e994eaac854681cc7d1ac25b3c7d41d7ca0ffc550d5ef83a54_dc1c59180826f8e994eaac854681cc7d1ac25b3c7d41d7ca0ffc550d5ef83a54.jsonl.gz", "strip_func_name": "sub_401CC2", "query": "\n\n\n__int64 __fastcall sub_401CC2(__int64 a1, __int64 a2, unsigned __int16 *a3)\n{\n__int64 result; // rax\nint v4; // [rsp+20h] [rbp-8h]\nint v5; // [rsp+24h] [rbp-4h]\n\nv5 = a3[1] - 1;\nwhile ( 1 )\n{\n++v5;\nresult = a3[1] + (unsigned int)a3[2];\nif ( v5 >= (int)result )\nbreak;\nv4 = *a3 - 1;\nwhile ( ++v4 < *a3 + a3[2] )\n{\nif ( *(_BYTE *)(*(_QWORD *)(8LL * v5 + a1) + v4) == *(_BYTE *)(a2 + 4) )\n*(_BYTE *)(v4 + *(_QWORD *)(8LL * v5 + a1)) = *(_BYTE *)(a2 + 6);\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v4,v5,sub_401CC2,]", "hints": "[]", "response": "{'a3': 'final_result', 'a1': 'map_char', 'a2': 'grid_config', 'v4': 'x', 'v5': 'y', 'sub_401CC2': 'ft_paint_over_the_squar'}"}
[ [ 0.799450695514679, 0.7524366974830627, 0.7308757901191711, 0.7220139503479004, 0.7138240933418274, 0.710209846496582, 0.7074535489082336, 0.701968789100647, 0.6973162889480591, 0.6943886280059814, 0.6835127472877502, 0.6818479299545288, 0.6805179119110107, 0.674645185470581, 0.6683142185211182, 0.6657706499099731, 0.6640669703483582, 0.6634669303894043, 0.6598876714706421, 0.6592315435409546 ], [ 236146, 202903, 242650, 231622, 39830, 212135, 156727, 135511, 183523, 234606, 89983, 109574, 3964, 20249, 140909, 177486, 250942, 248341, 166585, 243939 ] ]
signal_set_siginfo_handler
dbef1d827ccd2a42e8941d50152f102df28295732bfb69acb1ef6314d264873b
lavabit
pahoehoe
NA
int signal_set_siginfo_handler(int signo, int flags, signal_siginfo_handler_t *siginfo_handler) { #ifdef SA_SIGINFO real_signal_handler_t *h = &g_handler[signo]; sigemptyset(&h->action->sa_mask); sigaddset(&h->action->sa_mask, signo); h->action->sa_flags = flags | SA_SIGINFO; h->action->sa_sigaction = siginfo_handler; h->handler = NULL; g_received[signo] = 0; return sigaction(signo, h->action, NULL); #else return set_errno(ENOSYS); #endif }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_419C5A", "function_addr": 4299866, "binary_name": "dbef1d827ccd2a42e8941d50152f102df28295732bfb69acb1ef6314d264873b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+signo], edi"], [4, "mov [rbp+var_18], esi"], [5, "mov [rbp+var_20], rdx"], [6, "mov eax, [rbp+signo]"], [7, "movsxd rdx, eax"], [8, "mov rax, rdx"], [9, "shl rax, 2"], [10, "add rax, rdx"], [11, "shl rax, 5"], [12, "add rax, 436480h"], [13, "mov [rbp+act], rax"], [14, "mov rax, [rbp+act]"], [15, "add rax, 8"], [16, "mov rdi, rax"], [17, "call _sigemptyset"], [18, "mov rax, [rbp+act]"], [19, "lea rdx, [rax+8]"], [20, "mov eax, [rbp+signo]"], [21, "mov esi, eax"], [22, "mov rdi, rdx"], [23, "call _sigaddset"], [24, "mov eax, [rbp+var_18]"], [25, "or eax, 4"], [26, "mov edx, eax"], [27, "mov rax, [rbp+act]"], [28, "mov [rax+88h], edx"], [29, "mov rax, [rbp+act]"], [30, "mov rdx, [rbp+var_20]"], [31, "mov [rax], rdx"], [32, "mov rax, [rbp+act]"], [33, "mov qword ptr [rax+98h], 0"], [34, "mov eax, [rbp+signo]"], [35, "cdqe"], [36, "mov ds:dword_438D20[rax*4], 0"], [37, "mov rcx, [rbp+act]"], [38, "mov eax, [rbp+signo]"], [39, "mov edx, 0"], [40, "mov rsi, rcx"], [41, "mov edi, eax"], [42, "call _sigaction"], [43, "leave"], [44, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [9, 8], [10, 9], [10, 7], [11, 10], [12, 11], [13, 12], [14, 13], [15, 14], [16, 15], [18, 13], [19, 18], [19, 7], [20, 3], [21, 20], [22, 19], [24, 4], [25, 24], [26, 25], [27, 13], [28, 27], [28, 26], [29, 13], [30, 5], [31, 29], [31, 30], [32, 13], [33, 32], [34, 3], [37, 13], [38, 3], [40, 37], [41, 38], [44, 42]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/dbef1d827ccd2a42e8941d50152f102df28295732bfb69acb1ef6314d264873b_dbef1d827ccd2a42e8941d50152f102df28295732bfb69acb1ef6314d264873b.jsonl.gz", "strip_func_name": "sub_419C5A", "query": "\n\n\nint __fastcall sub_419C5A(int a1, int a2, void (*a3)(int))\n{\nstruct sigaction *act; // [rsp+18h] [rbp-8h]\n\nact = (struct sigaction *)(160LL * a1 + 4416640);\nsigemptyset((sigset_t *)(160LL * a1 + 4416648));\nsigaddset((sigset_t *)(160LL * a1 + 4416648), a1);\nact->sa_flags = a2 | 4;\nact->sa_handler = a3;\nact[1].sa_handler = 0LL;\ndword_438D20[a1] = 0;\nreturn sigaction(a1, act, 0LL);\n}\n\n\n\nQ:[a3,a1,a2,act,sub_419C5A,]", "hints": "[]", "response": "{'a3': 'siginfo_handler', 'a1': 'signo', 'a2': 'flags', 'act': 'h', 'sub_419C5A': 'signal_set_siginfo_handler'}"}
[ [ 0.7339998483657837, 0.7306340932846069, 0.6805536150932312, 0.6774801015853882, 0.6747380495071411, 0.6726962327957153, 0.6693878173828125, 0.6659629344940186, 0.6644705533981323, 0.6619806885719299, 0.6592198610305786, 0.6584206819534302, 0.6551443934440613, 0.6475186347961426, 0.6429198980331421, 0.6427870988845825, 0.641961395740509, 0.6418509483337402, 0.6367601156234741, 0.6363034844398499 ], [ 35853, 237642, 140729, 205027, 150440, 33177, 55623, 76196, 250760, 5640, 93793, 125492, 145583, 225205, 162836, 170004, 236226, 180772, 248909, 48311 ] ]
AngleVectors2
3dcf9b97b1c5d69ccd59d180de83033718cc3b2064c9c1e1f91608bdd820595f
yquake2
yquake2
NA
void AngleVectors2(vec3_t value1, vec3_t angles) { float forward; float yaw, pitch; if ((value1[1] == 0) && (value1[0] == 0)) { yaw = 0; if (value1[2] > 0) { pitch = 90; } else { pitch = 270; } } else { if (value1[0]) { yaw = ((float)atan2(value1[1], value1[0]) * 180 / M_PI); } else if (value1[1] > 0) { yaw = 90; } else { yaw = 270; } if (yaw < 0) { yaw += 360; } forward = (float)sqrt(value1[0] * value1[0] + value1[1] * value1[1]); pitch = ((float)atan2(value1[2], forward) * 180 / M_PI); if (pitch < 0) { pitch += 360; } } angles[PITCH] = -pitch; angles[YAW] = yaw; angles[ROLL] = 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_477DF7", "function_addr": 4685303, "binary_name": "3dcf9b97b1c5d69ccd59d180de83033718cc3b2064c9c1e1f91608bdd820595f.elf_extract.pkl\n"}, "code": [[0, "sub rsp, 28h"], [1, "mov [rsp+28h+var_20], rdi"], [2, "mov [rsp+28h+var_28], rsi"], [3, "mov rax, [rsp+28h+var_20]"], [4, "add rax, 4"], [5, "movss xmm0, dword ptr [rax]"], [6, "pxor xmm1, xmm1"], [7, "ucomiss xmm0, xmm1"], [8, "jp short loc_477E84"], [9, "pxor xmm1, xmm1"], [10, "ucomiss xmm0, xmm1"], [11, "jnz short loc_477E84"], [12, "mov rax, [rsp+28h+var_20]"], [13, "movss xmm0, dword ptr [rax]"], [14, "pxor xmm1, xmm1"], [15, "ucomiss xmm0, xmm1"], [16, "jp short loc_477E84"], [17, "pxor xmm1, xmm1"], [18, "ucomiss xmm0, xmm1"], [19, "jnz short loc_477E84"], [20, "pxor xmm0, xmm0"], [21, "movss [rsp+28h+var_C], xmm0"], [22, "mov rax, [rsp+28h+var_20]"], [23, "add rax, 8"], [24, "movss xmm0, dword ptr [rax]"], [25, "pxor xmm1, xmm1"], [26, "comiss xmm0, xmm1"], [27, "jbe short loc_477E71"], [28, "movss xmm0, cs:dword_4C2888"], [29, "movss [rsp+28h+var_10], xmm0"], [30, "jmp loc_478037"], [31, "movss xmm0, cs:dword_4C288C"], [32, "movss [rsp+28h+var_10], xmm0"], [33, "jmp loc_478037"], [34, "mov rax, [rsp+28h+var_20]"], [35, "movss xmm0, dword ptr [rax]"], [36, "pxor xmm1, xmm1"], [37, "ucomiss xmm0, xmm1"], [38, "jp short loc_477E9F"], [39, "pxor xmm1, xmm1"], [40, "comiss xmm0, xmm1"], [41, "jz short loc_477F04"], [42, "mov rax, [rsp+28h+var_20]"], [43, "movss xmm0, dword ptr [rax]"], [44, "cvtss2sd xmm0, xmm0"], [45, "mov rax, [rsp+28h+var_20]"], [46, "add rax, 4"], [47, "movss xmm1, dword ptr [rax]"], [48, "pxor xmm3, xmm3"], [49, "cvtss2sd xmm3, xmm1"], [50, "movq rax, xmm3"], [51, "movapd xmm1, xmm0"], [52, "movq xmm0, rax"], [53, "call _atan2"], [54, "pxor xmm1, xmm1"], [55, "cvtsd2ss xmm1, xmm0"], [56, "movss xmm0, cs:dword_4C2890"], [57, "mulss xmm0, xmm1"], [58, "cvtss2sd xmm0, xmm0"], [59, "movsd xmm1, cs:qword_4C2860"], [60, "divsd xmm0, xmm1"], [61, "cvtsd2ss xmm0, xmm0"], [62, "movss [rsp+28h+var_C], xmm0"], [63, "jmp short loc_477F38"], [64, "mov rax, [rsp+28h+var_20]"], [65, "add rax, 4"], [66, "movss xmm0, dword ptr [rax]"], [67, "pxor xmm1, xmm1"], [68, "comiss xmm0, xmm1"], [69, "jbe short loc_477F2A"], [70, "movss xmm0, cs:dword_4C2888"], [71, "movss [rsp+28h+var_C], xmm0"], [72, "jmp short loc_477F38"], [73, "movss xmm0, cs:dword_4C288C"], [74, "movss [rsp+28h+var_C], xmm0"], [75, "pxor xmm0, xmm0"], [76, "comiss xmm0, [rsp+28h+var_C]"], [77, "jbe short loc_477F5B"], [78, "movss xmm1, [rsp+28h+var_C]"], [79, "movss xmm0, cs:dword_4C2894"], [80, "addss xmm0, xmm1"], [81, "movss [rsp+28h+var_C], xmm0"], [82, "mov rax, [rsp+28h+var_20]"], [83, "movss xmm1, dword ptr [rax]"], [84, "mov rax, [rsp+28h+var_20]"], [85, "movss xmm0, dword ptr [rax]"], [86, "mulss xmm1, xmm0"], [87, "mov rax, [rsp+28h+var_20]"], [88, "add rax, 4"], [89, "movss xmm2, dword ptr [rax]"], [90, "mov rax, [rsp+28h+var_20]"], [91, "add rax, 4"], [92, "movss xmm0, dword ptr [rax]"], [93, "mulss xmm0, xmm2"], [94, "addss xmm0, xmm1"], [95, "pxor xmm4, xmm4"], [96, "cvtss2sd xmm4, xmm0"], [97, "movq rax, xmm4"], [98, "movq xmm0, rax"], [99, "call _sqrt"], [100, "cvtsd2ss xmm0, xmm0"], [101, "movss [rsp+28h+var_14], xmm0"], [102, "pxor xmm0, xmm0"], [103, "cvtss2sd xmm0, [rsp+28h+var_14]"], [104, "mov rax, [rsp+28h+var_20]"], [105, "add rax, 8"], [106, "movss xmm1, dword ptr [rax]"], [107, "pxor xmm5, xmm5"], [108, "cvtss2sd xmm5, xmm1"], [109, "movq rax, xmm5"], [110, "movapd xmm1, xmm0"], [111, "movq xmm0, rax"], [112, "call _atan2"], [113, "pxor xmm1, xmm1"], [114, "cvtsd2ss xmm1, xmm0"], [115, "movss xmm0, cs:dword_4C2890"], [116, "mulss xmm0, xmm1"], [117, "cvtss2sd xmm0, xmm0"], [118, "movsd xmm1, cs:qword_4C2860"], [119, "divsd xmm0, xmm1"], [120, "cvtsd2ss xmm0, xmm0"], [121, "movss [rsp+28h+var_10], xmm0"], [122, "pxor xmm0, xmm0"], [123, "comiss xmm0, [rsp+28h+var_10]"], [124, "jbe short loc_478037"], [125, "movss xmm1, [rsp+28h+var_10]"], [126, "movss xmm0, cs:dword_4C2894"], [127, "addss xmm0, xmm1"], [128, "movss [rsp+28h+var_10], xmm0"], [129, "movss xmm0, [rsp+28h+var_10]"], [130, "movss xmm1, cs:dword_4C2870"], [131, "xorps xmm0, xmm1"], [132, "mov rax, [rsp+28h+var_28]"], [133, "movss dword ptr [rax], xmm0"], [134, "mov rax, [rsp+28h+var_28]"], [135, "add rax, 4"], [136, "movss xmm0, [rsp+28h+var_C]"], [137, "movss dword ptr [rax], xmm0"], [138, "mov rax, [rsp+28h+var_28]"], [139, "add rax, 8"], [140, "pxor xmm0, xmm0"], [141, "movss dword ptr [rax], xmm0"], [142, "nop"], [143, "add rsp, 28h"], [144, "retn"]], "data_dep": [[3, 1], [4, 3], [5, 4], [7, 5], [7, 6], [8, 4], [10, 7], [10, 9], [11, 4], [12, 1], [13, 12], [15, 14], [15, 13], [16, 4], [18, 17], [18, 15], [19, 4], [21, 20], [22, 1], [23, 22], [24, 23], [26, 25], [26, 24], [27, 23], [29, 28], [32, 31], [34, 1], [35, 34], [37, 35], [37, 36], [38, 4], [40, 37], [40, 39], [41, 4], [42, 1], [43, 42], [44, 43], [45, 1], [46, 45], [47, 46], [49, 48], [49, 47], [50, 49], [51, 44], [52, 50], [55, 52], [55, 54], [57, 56], [57, 55], [58, 57], [60, 59], [60, 58], [61, 60], [62, 61], [64, 1], [65, 64], [66, 65], [68, 66], [68, 67], [69, 65], [71, 70], [74, 73], [76, 74], [76, 62], [76, 71], [76, 75], [77, 46], [77, 65], [78, 74], [78, 62], [78, 71], [80, 78], [80, 79], [81, 80], [82, 1], [83, 82], [84, 1], [85, 84], [86, 83], [86, 85], [87, 1], [88, 87], [89, 88], [90, 1], [91, 90], [92, 91], [93, 92], [93, 89], [94, 93], [94, 86], [96, 95], [96, 94], [97, 96], [98, 97], [100, 98], [101, 100], [103, 102], [103, 101], [104, 1], [105, 104], [106, 105], [108, 107], [108, 106], [109, 108], [110, 103], [111, 109], [114, 111], [114, 113], [116, 115], [116, 114], [117, 116], [119, 118], [119, 117], [120, 119], [121, 120], [123, 121], [123, 122], [124, 105], [125, 121], [127, 125], [127, 126], [128, 127], [129, 128], [129, 121], [129, 29], [129, 32], [131, 129], [131, 130], [132, 2], [133, 132], [133, 131], [134, 2], [135, 134], [136, 21], [136, 71], [136, 81], [136, 74], [136, 62], [137, 135], [137, 136], [138, 2], [139, 138], [141, 140], [141, 139], [143, 0], [144, 139]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/3dcf9b97b1c5d69ccd59d180de83033718cc3b2064c9c1e1f91608bdd820595f_3dcf9b97b1c5d69ccd59d180de83033718cc3b2064c9c1e1f91608bdd820595f.jsonl.gz", "strip_func_name": "sub_477DF7", "query": "\n\n\n__int64 __fastcall sub_477DF7(float *a1, __int64 a2)\n{\nfloat v2; // xmm1_4\nfloat v3; // xmm0_4\nfloat v4; // xmm0_4\nfloat v5; // xmm1_4\nfloat v6; // xmm0_4\n__int64 result; // rax\nfloat v8; // [rsp+18h] [rbp-10h]\nfloat v9; // [rsp+1Ch] [rbp-Ch]\n\nif ( a1[1] == 0.0 && *a1 == 0.0 )\n{\nv9 = 0.0;\nif ( a1[2] <= 0.0 )\nv8 = 270.0;\nelse\nv8 = 90.0;\n}\nelse\n{\nif ( *a1 == 0.0 )\n{\nif ( a1[1] <= 0.0 )\nv9 = 270.0;\nelse\nv9 = 90.0;\n}\nelse\n{\nv2 = atan2(a1[1], *a1);\nv3 = (float)(180.0 * v2) / 3.141592653589793;\nv9 = v3;\n}\nif ( v9 < 0.0 )\nv9 = v9 + 360.0;\nv4 = sqrt((float)((float)(a1[1] * a1[1]) + (float)(*a1 * *a1)));\nv5 = atan2(a1[2], v4);\nv6 = (float)(180.0 * v5) / 3.141592653589793;\nv8 = v6;\nif ( v6 < 0.0 )\nv8 = v6 + 360.0;\n}\n*(_DWORD *)a2 = LODWORD(v8) ^ 0x80000000;\n*(float *)(a2 + 4) = v9;\nresult = a2 + 8;\n*(_DWORD *)(a2 + 8) = 0;\nreturn result;\n}\n\n\n\nQ:[a1,a2,v8,v9,sub_477DF7,]", "hints": "[]", "response": "{'a1': 'value1', 'a2': 'angles', 'v8': 'pitch', 'v9': 'yaw', 'sub_477DF7': 'AngleVectors2'}"}
[ [ 0.8734105229377747, 0.7757117748260498, 0.7499313354492188, 0.7241486310958862, 0.7092711925506592, 0.6941219568252563, 0.6921105980873108, 0.6908628940582275, 0.6905415654182434, 0.6894440650939941, 0.6887534856796265, 0.6846635341644287, 0.6840704679489136, 0.6825433373451233, 0.6806576251983643, 0.6794288158416748, 0.6732353568077087, 0.6685779094696045, 0.6677374243736267, 0.6660270690917969 ], [ 15107, 192672, 81190, 189454, 9558, 98316, 176479, 20407, 1785, 88660, 182605, 237911, 134915, 165484, 243515, 110312, 133208, 106407, 93941, 71763 ] ]
create_suicide_timeout
ea3bd53d96d062503f598c950b2c1cf5a92a7d52c2415be8506bc4bcf620e6a9
google
neper
NA
int create_suicide_timeout(int sec_to_suicide) { timer_t timerid; struct sigevent sev; sigset_t mask; struct itimerspec its; struct sigaction sa; sa.sa_sigaction = suicide_timeout_handler; sigemptyset(&sa.sa_mask); if (sigaction(SIGRTMIN, &sa, NULL) == -1) { perror("sigaction"); return -1; } sigemptyset(&mask); sigaddset(&mask, SIGRTMIN); if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1) { perror("sigprocmask(SIG_SETMASK)"); return -1; } sev.sigev_notify = SIGEV_SIGNAL; sev.sigev_signo = SIGRTMIN; sev.sigev_value.sival_ptr = &timerid; if (timer_create(CLOCK_REALTIME, &sev, &timerid) == -1) { perror("timer_create"); return -1; } its.it_value.tv_sec = sec_to_suicide; its.it_value.tv_nsec = 0; its.it_interval.tv_sec = its.it_value.tv_sec; its.it_interval.tv_nsec = its.it_value.tv_nsec; if (timer_settime(timerid, 0, &its, NULL) == -1) { perror("timer_settime"); return -1; } if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == -1) { perror("sigprocmask(SIG_UNBLOCK)"); return -1; } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40635A", "function_addr": 4219738, "binary_name": "ea3bd53d96d062503f598c950b2c1cf5a92a7d52c2415be8506bc4bcf620e6a9.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 1A0h"], [3, "mov [rbp+var_194], edi"], [4, "mov [rbp+var_190], offset sub_406333"], [5, "lea rax, [rbp+var_190]"], [6, "add rax, 8"], [7, "mov rdi, rax"], [8, "call _sigemptyset"], [9, "call ___libc_current_sigrtmin"], [10, "mov ecx, eax"], [11, "lea rax, [rbp+var_190]"], [12, "mov edx, 0"], [13, "mov rsi, rax"], [14, "mov edi, ecx"], [15, "call _sigaction"], [16, "cmp eax, 0FFFFFFFFh"], [17, "jnz short loc_4063BF"], [18, "mov edi, offset aSigaction_0"], [19, "call _perror"], [20, "mov eax, 0FFFFFFFFh"], [21, "jmp locret_4064FA"], [22, "lea rax, [rbp+set]"], [23, "mov rdi, rax"], [24, "call _sigemptyset"], [25, "call ___libc_current_sigrtmin"], [26, "mov edx, eax"], [27, "lea rax, [rbp+set]"], [28, "mov esi, edx"], [29, "mov rdi, rax"], [30, "call _sigaddset"], [31, "lea rax, [rbp+set]"], [32, "mov edx, 0"], [33, "mov rsi, rax"], [34, "mov edi, 2"], [35, "call _sigprocmask"], [36, "cmp eax, 0FFFFFFFFh"], [37, "jnz short loc_406418"], [38, "mov edi, offset aSigprocmaskSig"], [39, "call _perror"], [40, "mov eax, 0FFFFFFFFh"], [41, "jmp locret_4064FA"], [42, "mov [rbp+evp.sigev_notify], 0"], [43, "call ___libc_current_sigrtmin"], [44, "mov [rbp+evp.sigev_signo], eax"], [45, "lea rax, [rbp+timerid]"], [46, "mov qword ptr [rbp+evp.sigev_value], rax"], [47, "lea rdx, [rbp+timerid]"], [48, "lea rax, [rbp+evp]"], [49, "mov rsi, rax"], [50, "mov edi, 0"], [51, "call _timer_create"], [52, "cmp eax, 0FFFFFFFFh"], [53, "jnz short loc_40645D"], [54, "mov edi, offset aTimerCreate_0"], [55, "call _perror"], [56, "mov eax, 0FFFFFFFFh"], [57, "jmp locret_4064FA"], [58, "mov eax, [rbp+var_194]"], [59, "cdqe"], [60, "mov [rbp+value.it_value.tv_sec], rax"], [61, "mov [rbp+value.it_value.tv_nsec], 0"], [62, "mov rax, [rbp+value.it_value.tv_sec]"], [63, "mov [rbp+value.it_interval.tv_sec], rax"], [64, "mov rax, [rbp+value.it_value.tv_nsec]"], [65, "mov [rbp+value.it_interval.tv_nsec], rax"], [66, "mov rax, [rbp+timerid]"], [67, "lea rdx, [rbp+value]"], [68, "mov ecx, 0"], [69, "mov esi, 0"], [70, "mov rdi, rax"], [71, "call _timer_settime"], [72, "cmp eax, 0FFFFFFFFh"], [73, "jnz short loc_4064C6"], [74, "mov edi, offset aTimerSettime_0"], [75, "call _perror"], [76, "mov eax, 0FFFFFFFFh"], [77, "jmp short locret_4064FA"], [78, "lea rax, [rbp+set]"], [79, "mov edx, 0"], [80, "mov rsi, rax"], [81, "mov edi, 1"], [82, "call _sigprocmask"], [83, "cmp eax, 0FFFFFFFFh"], [84, "jnz short loc_4064F5"], [85, "mov edi, offset aSigprocmaskSig_0"], [86, "call _perror"], [87, "mov eax, 0FFFFFFFFh"], [88, "jmp short locret_4064FA"], [89, "mov eax, 0"], [90, "leave"], [91, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [10, 9], [11, 4], [11, 9], [13, 11], [14, 10], [16, 15], [17, 16], [22, 15], [23, 22], [26, 25], [27, 25], [28, 26], [29, 27], [31, 30], [33, 31], [36, 35], [37, 36], [44, 43], [45, 43], [46, 45], [47, 32], [48, 45], [49, 48], [52, 51], [53, 52], [58, 3], [60, 58], [62, 60], [63, 62], [64, 61], [65, 64], [67, 47], [70, 66], [72, 71], [73, 72], [78, 71], [80, 78], [83, 82], [84, 83], [91, 56], [91, 89], [91, 40], [91, 76], [91, 20], [91, 87]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/ea3bd53d96d062503f598c950b2c1cf5a92a7d52c2415be8506bc4bcf620e6a9_ea3bd53d96d062503f598c950b2c1cf5a92a7d52c2415be8506bc4bcf620e6a9.jsonl.gz", "strip_func_name": "sub_40635A", "query": "\n\n\n__int64 __fastcall sub_40635A(int a1)\n{\nint v1; // eax\n__int64 result; // rax\nint v3; // eax\nstruct sigaction v4; // [rsp+10h] [rbp-190h] BYREF\nstruct itimerspec value; // [rsp+B0h] [rbp-F0h] BYREF\nsigset_t set; // [rsp+D0h] [rbp-D0h] BYREF\nstruct sigevent evp; // [rsp+150h] [rbp-50h] BYREF\ntimer_t timerid; // [rsp+198h] [rbp-8h] BYREF\n\nv4.sa_handler = (__sighandler_t)sub_406333;\nsigemptyset(&v4.sa_mask);\nv1 = __libc_current_sigrtmin();\nif ( sigaction(v1, &v4, 0LL) == -1 )\n{\nperror(\"sigaction\");\nresult = 0xFFFFFFFFLL;\n}\nelse\n{\nsigemptyset(&set);\nv3 = __libc_current_sigrtmin();\nsigaddset(&set, v3);\nif ( sigprocmask(2, &set, 0LL) == -1 )\n{\nperror(\"sigprocmask(SIG_SETMASK)\");\nresult = 0xFFFFFFFFLL;\n}\nelse\n{\nevp.sigev_notify = 0;\nevp.sigev_signo = __libc_current_sigrtmin();\nevp.sigev_value.sival_ptr = &timerid;\nif ( timer_create(0, &evp, &timerid) == -1 )\n{\nperror(\"timer_create\");\nresult = 0xFFFFFFFFLL;\n}\nelse\n{\nvalue.it_value.tv_sec = a1;\nvalue.it_value.tv_nsec = 0LL;\nvalue.it_interval.tv_sec = a1;\nvalue.it_interval.tv_nsec = 0LL;\nif ( timer_settime(timerid, 0, &value, 0LL) == -1 )\n{\nperror(\"timer_settime\");\nresult = 0xFFFFFFFFLL;\n}\nelse if ( sigprocmask(1, &set, 0LL) == -1 )\n{\nperror(\"sigprocmask(SIG_UNBLOCK)\");\nresult = 0xFFFFFFFFLL;\n}\nelse\n{\nresult = 0LL;\n}\n}\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,v4,value,set,evp,sub_40635A,sub_406333,]", "hints": "[]", "response": "{'a1': 'sec_to_suicide', 'v4': 'sa', 'value': 'its', 'set': 'mask', 'evp': 'sev', 'sub_40635A': 'create_suicide_timeout', 'sub_406333': 'suicide_timeout_handler'}"}
[ [ 0.7823984622955322, 0.7429447174072266, 0.7406664490699768, 0.7395603656768799, 0.7265450954437256, 0.7263408899307251, 0.7257013320922852, 0.7208120822906494, 0.7205133438110352, 0.7179355025291443, 0.7160438299179077, 0.7154980897903442, 0.7082839012145996, 0.7045165300369263, 0.7014418244361877, 0.7003519535064697, 0.696916401386261, 0.6968637704849243, 0.695781409740448, 0.6927703022956848 ], [ 222889, 173214, 71369, 221623, 172840, 58786, 229403, 208163, 230597, 61060, 255294, 255956, 230442, 234613, 31453, 244770, 216342, 236649, 11887, 236226 ] ]
prn_aux_IDx08
498b34fef3ab12184fac2c1224a5535b7045ee311fe13377d5b8aa31ea2d5a63
projecthorus
radiosonde_auto_rx
NA
static int prn_aux_IDx08(char *xdata) { // CFH Cryogenic Frost Point Hygrometer // ID=0x08: CFH // N=2*12 nibs // 0 2 u8 Instrument_type = 0x08 (ID) // 2 2 u8 Instrument_number // 4 6 Tmir, Mirror Temperature // 10 6 Vopt, Optics Voltage // 16 4 Topt, Optics Temperature // 20 4 Vbat, CFH Battery // char *px = xdata; int N = 2*12; int val; ui8_t InstrNum; if (*px) { if (strncmp(px, "08", 2) != 0) { px = strstr(xdata, "#08"); if (px == NULL) return -1; else px += 1; } if (strlen(px) < N) return -1; fprintf(stdout, " ID=0x08 CFH "); val = hex2uint(px+ 2, 2); if (val < 0) return -1; InstrNum = val & 0xFF; fprintf(stdout, " No.%d ", InstrNum); fprintf(stdout, " Tmir:0x%.6s ", px+4); fprintf(stdout, " Vopt:0x%.6s ", px+10); fprintf(stdout, " Topt:0x%.4s ", px+16); fprintf(stdout, " Vbat:0x%.4s ", px+20); } else { return -2; } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404C8B", "function_addr": 4213899, "binary_name": "498b34fef3ab12184fac2c1224a5535b7045ee311fe13377d5b8aa31ea2d5a63.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+haystack], rdi"], [4, "mov rax, [rbp+haystack]"], [5, "mov [rbp+s1], rax"], [6, "mov [rbp+var_C], 18h"], [7, "mov rax, [rbp+s1]"], [8, "movzx eax, byte ptr [rax]"], [9, "test al, al"], [10, "jz loc_404E0F"], [11, "mov rax, [rbp+s1]"], [12, "mov edx, 2"], [13, "mov esi, offset a08"], [14, "mov rdi, rax"], [15, "call _strncmp"], [16, "test eax, eax"], [17, "jz short loc_404CFA"], [18, "mov rax, [rbp+haystack]"], [19, "mov esi, offset a08_0"], [20, "mov rdi, rax"], [21, "call _strstr"], [22, "mov [rbp+s1], rax"], [23, "cmp [rbp+s1], 0"], [24, "jnz short loc_404CF5"], [25, "mov eax, 0FFFFFFFFh"], [26, "jmp locret_404E14"], [27, "add [rbp+s1], 1"], [28, "mov rax, [rbp+s1]"], [29, "mov rdi, rax"], [30, "call _strlen"], [31, "mov edx, [rbp+var_C]"], [32, "movsxd rdx, edx"], [33, "cmp rax, rdx"], [34, "jnb short loc_404D1B"], [35, "mov eax, 0FFFFFFFFh"], [36, "jmp locret_404E14"], [37, "mov rax, cs:stdout"], [38, "mov rcx, rax"], [39, "mov edx, 0Dh"], [40, "mov esi, 1"], [41, "mov edi, offset aId0x08Cfh"], [42, "call _fwrite"], [43, "mov rax, [rbp+s1]"], [44, "add rax, 2"], [45, "mov esi, 2"], [46, "mov rdi, rax"], [47, "call sub_404495"], [48, "mov [rbp+var_10], eax"], [49, "cmp [rbp+var_10], 0"], [50, "jns short loc_404D61"], [51, "mov eax, 0FFFFFFFFh"], [52, "jmp locret_404E14"], [53, "mov eax, [rbp+var_10]"], [54, "mov [rbp+var_11], al"], [55, "movzx edx, [rbp+var_11]"], [56, "mov rax, cs:stdout"], [57, "mov esi, offset aNoD"], [58, "mov rdi, rax"], [59, "mov eax, 0"], [60, "call _fprintf"], [61, "mov rax, [rbp+s1]"], [62, "lea rdx, [rax+4]"], [63, "mov rax, cs:stdout"], [64, "mov esi, offset aTmir0x6s"], [65, "mov rdi, rax"], [66, "mov eax, 0"], [67, "call _fprintf"], [68, "mov rax, [rbp+s1]"], [69, "lea rdx, [rax+0Ah]"], [70, "mov rax, cs:stdout"], [71, "mov esi, offset aVopt0x6s"], [72, "mov rdi, rax"], [73, "mov eax, 0"], [74, "call _fprintf"], [75, "mov rax, [rbp+s1]"], [76, "lea rdx, [rax+10h]"], [77, "mov rax, cs:stdout"], [78, "mov esi, offset aTopt0x4s"], [79, "mov rdi, rax"], [80, "mov eax, 0"], [81, "call _fprintf"], [82, "mov rax, [rbp+s1]"], [83, "lea rdx, [rax+14h]"], [84, "mov rax, cs:stdout"], [85, "mov esi, offset aVbat0x4s"], [86, "mov rdi, rax"], [87, "mov eax, 0"], [88, "call _fprintf"], [89, "mov eax, 0"], [90, "jmp short locret_404E14"], [91, "mov eax, 0FFFFFFFEh"], [92, "leave"], [93, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 5], [8, 7], [9, 8], [10, 9], [11, 5], [14, 11], [16, 15], [17, 16], [18, 3], [20, 18], [22, 21], [23, 22], [24, 23], [27, 22], [28, 27], [28, 5], [29, 28], [31, 6], [32, 31], [33, 32], [33, 30], [34, 33], [38, 37], [43, 27], [43, 5], [44, 43], [46, 44], [48, 47], [49, 48], [50, 49], [53, 48], [54, 53], [55, 54], [58, 56], [61, 27], [61, 5], [62, 55], [62, 61], [65, 63], [68, 5], [68, 27], [69, 62], [69, 68], [72, 70], [75, 5], [75, 27], [76, 69], [76, 75], [79, 77], [82, 27], [82, 5], [83, 76], [83, 82], [86, 84], [93, 25], [93, 89], [93, 35], [93, 91], [93, 51]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/498b34fef3ab12184fac2c1224a5535b7045ee311fe13377d5b8aa31ea2d5a63_498b34fef3ab12184fac2c1224a5535b7045ee311fe13377d5b8aa31ea2d5a63.jsonl.gz", "strip_func_name": "sub_404C8B", "query": "\n\n\n__int64 __fastcall sub_404C8B(const char *a1)\n{\nint v2; // [rsp+20h] [rbp-10h]\nchar *s1; // [rsp+28h] [rbp-8h]\nchar *s1a; // [rsp+28h] [rbp-8h]\n\ns1 = (char *)a1;\nif ( !*a1 )\nreturn 4294967294LL;\nif ( strncmp(a1, \"08\", 2uLL) )\n{\ns1a = strstr(a1, \"#08\");\nif ( !s1a )\nreturn 0xFFFFFFFFLL;\ns1 = s1a + 1;\n}\nif ( strlen(s1) < 0x18 )\nreturn 0xFFFFFFFFLL;\nfwrite(\" ID=0x08 CFH \", 1uLL, 0xDuLL, stdout);\nv2 = sub_404495((__int64)(s1 + 2), 2);\nif ( v2 < 0 )\nreturn 0xFFFFFFFFLL;\nfprintf(stdout, \" No.%d \", (unsigned __int8)v2);\nfprintf(stdout, \" Tmir:0x%.6s \", s1 + 4);\nfprintf(stdout, \" Vopt:0x%.6s \", s1 + 10);\nfprintf(stdout, \" Topt:0x%.4s \", s1 + 16);\nfprintf(stdout, \" Vbat:0x%.4s \", s1 + 20);\nreturn 0LL;\n}\n\n\n\nQ:[a1,v2,s1,sub_404C8B,sub_404495,]", "hints": "[]", "response": "{'a1': 'xdata', 'v2': 'val', 's1': 'pxa', 'sub_404C8B': 'prn_aux_IDx08', 'sub_404495': 'hex2uint'}"}
[ [ 0.7163251638412476, 0.7144661545753479, 0.7135505676269531, 0.7088680267333984, 0.7039076089859009, 0.7035815119743347, 0.7011356949806213, 0.6996133327484131, 0.6941190361976624, 0.6933398842811584, 0.6917412281036377, 0.6910098791122437, 0.69075608253479, 0.6898185014724731, 0.6880859732627869, 0.6875402331352234, 0.6859052181243896, 0.6849328279495239, 0.6834882497787476, 0.6825103759765625 ], [ 84631, 264503, 209730, 250161, 104505, 224526, 215468, 22292, 133381, 123009, 171772, 57429, 175444, 47867, 155179, 143018, 16854, 100369, 20545, 59460 ] ]
term_set_baudrate
7fe1e17e0c45c428ebae2e78146971ca0fcd17887afdc926dbd640d8d3aaed8e
OpenIPC
mini
NA
int //term_set_baudrate (int fd, speed_t baud_rate) term_set_baudrate (int fd, int baud_rate) { int rval, i; struct termios2 tio; rval = 0; do { /* dummy */ i = term_find(fd); if ( i < 0 ) { rval = -1; break; } tio = term.nexttermios[i]; /* drivers/tty/tty_ioctl.c :: tty_termios_baud_rate() */ tio.c_cflag = (tio.c_cflag & ~CBAUD) | BOTHER; tio.c_ospeed = baud_rate; /* drivers/tty/tty_ioctl.c :: tty_termios_input_baud_rate() */ /* If CIBAUD == B0, use output baud rate. Setting tio.c_ispeed is * unneeded */ tio.c_cflag = (tio.c_cflag & ~(CBAUD << IBSHIFT)) | (B0 << IBSHIFT); term.nexttermios[i] = tio; } while (0); return rval; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40710E", "function_addr": 4223246, "binary_name": "7fe1e17e0c45c428ebae2e78146971ca0fcd17887afdc926dbd640d8d3aaed8e.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 48h"], [4, "mov [rbp+var_4C], edi"], [5, "mov [rbp+var_50], esi"], [6, "mov [rbp+var_C], 0"], [7, "mov eax, [rbp+var_4C]"], [8, "mov edi, eax"], [9, "call sub_4065BD"], [10, "mov [rbp+var_10], eax"], [11, "cmp [rbp+var_10], 0"], [12, "jns short loc_407143"], [13, "mov [rbp+var_C], 0FFFFFFFFh"], [14, "jmp loc_4071FE"], [15, "mov eax, [rbp+var_10]"], [16, "movsxd rdx, eax"], [17, "mov rax, rdx"], [18, "shl rax, 2"], [19, "add rax, rdx"], [20, "add rax, rax"], [21, "add rax, rdx"], [22, "shl rax, 2"], [23, "add rax, 40D180h"], [24, "mov rcx, [rax+4]"], [25, "mov rbx, [rax+0Ch]"], [26, "mov [rbp+var_48], rcx"], [27, "mov [rbp+var_40], rbx"], [28, "mov rcx, [rax+14h]"], [29, "mov rbx, [rax+1Ch]"], [30, "mov [rbp+var_38], rcx"], [31, "mov [rbp+var_30], rbx"], [32, "mov rdx, [rax+24h]"], [33, "mov [rbp+var_28], rdx"], [34, "mov eax, [rax+2Ch]"], [35, "mov [rbp+var_20], eax"], [36, "mov eax, dword ptr [rbp+var_40]"], [37, "and eax, 0FFFFEFF0h"], [38, "or ah, 10h"], [39, "mov dword ptr [rbp+var_40], eax"], [40, "mov eax, [rbp+var_50]"], [41, "mov [rbp+var_20], eax"], [42, "mov eax, dword ptr [rbp+var_40]"], [43, "and eax, 0EFF0FFFFh"], [44, "mov dword ptr [rbp+var_40], eax"], [45, "mov eax, [rbp+var_10]"], [46, "movsxd rdx, eax"], [47, "mov rax, rdx"], [48, "shl rax, 2"], [49, "add rax, rdx"], [50, "add rax, rax"], [51, "add rax, rdx"], [52, "shl rax, 2"], [53, "add rax, 40D180h"], [54, "mov rcx, [rbp+var_48]"], [55, "mov rbx, [rbp+var_40]"], [56, "mov [rax+4], rcx"], [57, "mov [rax+0Ch], rbx"], [58, "mov rcx, [rbp+var_38]"], [59, "mov rbx, [rbp+var_30]"], [60, "mov [rax+14h], rcx"], [61, "mov [rax+1Ch], rbx"], [62, "mov rdx, [rbp+var_28]"], [63, "mov [rax+24h], rdx"], [64, "mov edx, [rbp+var_20]"], [65, "mov [rax+2Ch], edx"], [66, "mov eax, [rbp+var_C]"], [67, "mov rbx, [rbp+var_8]"], [68, "leave"], [69, "retn"]], "data_dep": [[7, 4], [8, 7], [10, 9], [11, 10], [12, 11], [15, 10], [16, 15], [17, 16], [18, 17], [19, 18], [19, 16], [20, 19], [21, 16], [21, 20], [22, 21], [23, 22], [24, 23], [25, 23], [26, 24], [27, 25], [28, 23], [29, 23], [30, 28], [31, 29], [32, 23], [33, 32], [34, 23], [35, 34], [36, 27], [37, 36], [38, 37], [39, 38], [40, 5], [41, 40], [42, 39], [43, 42], [44, 43], [45, 10], [46, 45], [47, 46], [48, 47], [49, 46], [49, 48], [50, 49], [51, 50], [51, 46], [52, 51], [53, 52], [54, 26], [55, 44], [56, 54], [56, 53], [57, 53], [57, 55], [58, 30], [59, 31], [60, 53], [60, 58], [61, 53], [61, 59], [62, 33], [63, 53], [63, 62], [64, 41], [65, 64], [65, 53], [66, 13], [66, 6], [69, 66]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/7fe1e17e0c45c428ebae2e78146971ca0fcd17887afdc926dbd640d8d3aaed8e_7fe1e17e0c45c428ebae2e78146971ca0fcd17887afdc926dbd640d8d3aaed8e.jsonl.gz", "strip_func_name": "sub_40710E", "query": "\n\n\n__int64 __fastcall sub_40710E(int a1, int a2)\n{\nint v2; // eax\n__int64 v3; // rax\n__int64 v5; // [rsp+10h] [rbp-40h]\n__int64 v6; // [rsp+18h] [rbp-38h]\n__int64 v7; // [rsp+20h] [rbp-30h]\n__int64 v8; // [rsp+28h] [rbp-28h]\nint v9; // [rsp+40h] [rbp-10h]\nunsigned int v10; // [rsp+44h] [rbp-Ch]\n\nv10 = 0;\nv9 = sub_4065BD(a1);\nif ( v9 < 0 )\nreturn (unsigned int)-1;\nv5 = *(_QWORD *)((char *)&unk_40D18C + 44 * v9);\nv6 = *(_QWORD *)((char *)&unk_40D194 + 44 * v9);\nv7 = *(_QWORD *)((char *)&unk_40D19C + 44 * v9);\nv8 = *(_QWORD *)((char *)&unk_40D1A4 + 44 * v9);\nv2 = v5 & 0xFFFFEFF0;\nBYTE1(v2) = ((unsigned __int16)(v5 & 0xEFF0) >> 8) | 0x10;\nLODWORD(v5) = v2 & 0xEFF0FFFF;\nv3 = 44LL * v9 + 4247936;\n*(_QWORD *)(v3 + 4) = *(_QWORD *)((char *)&unk_40D184 + 44 * v9);\n*(_QWORD *)(v3 + 12) = v5;\n*(_QWORD *)(v3 + 20) = v6;\n*(_QWORD *)(v3 + 28) = v7;\n*(_QWORD *)(v3 + 36) = v8;\n*(_DWORD *)(v3 + 44) = a2;\nreturn v10;\n}\n\n\n\nQ:[a1,a2,v5,v6,v7,v8,v10,sub_40710E,sub_4065BD,]", "hints": "[]", "response": "{'a1': 'fd', 'a2': 'baud_rate', 'v5': 'tio_8', 'v6': 'tio_16', 'v7': 'tio_24', 'v8': 'tio_32', 'v10': 'rval', 'sub_40710E': 'term_set_baudrate', 'sub_4065BD': 'term_find'}"}
[ [ 0.7164570689201355, 0.714985728263855, 0.7133543491363525, 0.7055304050445557, 0.7001863718032837, 0.6973204612731934, 0.6898092031478882, 0.689455509185791, 0.6894134283065796, 0.688073456287384, 0.6844531297683716, 0.6839532256126404, 0.6809591054916382, 0.6808733344078064, 0.6792702078819275, 0.6780635118484497, 0.6771012544631958, 0.6752582788467407, 0.6729512810707092, 0.6724572777748108 ], [ 152640, 49535, 208944, 181213, 165785, 93752, 157501, 201591, 212584, 202569, 26103, 209324, 185160, 212588, 30685, 86905, 212147, 172878, 231336, 245529 ] ]
hydra_dump_data
a8fb2edbd6bde6f75d208a747818d072741a3159e43047c86a6c260940123f40
vanhauser-thc
thc-hydra
NA
void hydra_dump_data(unsigned char *buf, int32_t len, char *text) { unsigned char *p = (unsigned char *)buf; unsigned char lastrow_data[16]; int32_t rows = len / 16; int32_t lastrow = len % 16; int32_t i, j; if (text != NULL && text[0] != 0) printf("%s (%d bytes):\n", text, len); if (buf == NULL || len < 1) return; for (i = 0; i < rows; i++) { printf("%04hx: ", i * 16); for (j = 0; j < 16; j++) { printf("%02x", p[(i * 16) + j]); if (j % 2 == 1) printf(" "); } printf(" [ "); for (j = 0; j < 16; j++) { if (isprint(p[(i * 16) + j])) printf("%c", p[(i * 16) + j]); else printf("."); } printf(" ]\n"); } if (lastrow > 0) { memset(lastrow_data, 0, sizeof(lastrow_data)); memcpy(lastrow_data, p + len - lastrow, lastrow); printf("%04hx: ", i * 16); for (j = 0; j < lastrow; j++) { printf("%02x", p[(i * 16) + j]); if (j % 2 == 1) printf(" "); } while (j < 16) { printf(" "); if (j % 2 == 1) printf(" "); j++; } printf(" [ "); for (j = 0; j < lastrow; j++) { if (isprint(p[(i * 16) + j])) printf("%c", p[(i * 16) + j]); else printf("."); } while (j < 16) { printf(" "); j++; } printf(" ]\n"); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_45146B", "function_addr": 4527211, "binary_name": "a8fb2edbd6bde6f75d208a747818d072741a3159e43047c86a6c260940123f40.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 60h"], [3, "mov [rbp+var_48], rdi"], [4, "mov [rbp+var_4C], esi"], [5, "mov [rbp+var_58], rdx"], [6, "mov rax, fs:28h"], [7, "mov [rbp+var_8], rax"], [8, "xor eax, eax"], [9, "mov rax, [rbp+var_48]"], [10, "mov [rbp+var_28], rax"], [11, "mov eax, [rbp+var_4C]"], [12, "lea edx, [rax+0Fh]"], [13, "test eax, eax"], [14, "cmovs eax, edx"], [15, "sar eax, 4"], [16, "mov [rbp+var_30], eax"], [17, "mov eax, [rbp+var_4C]"], [18, "cdq"], [19, "shr edx, 1Ch"], [20, "add eax, edx"], [21, "and eax, 0Fh"], [22, "sub eax, edx"], [23, "mov [rbp+var_2C], eax"], [24, "cmp [rbp+var_58], 0"], [25, "jz short loc_4514E2"], [26, "mov rax, [rbp+var_58]"], [27, "movzx eax, byte ptr [rax]"], [28, "test al, al"], [29, "jz short loc_4514E2"], [30, "mov edx, [rbp+var_4C]"], [31, "mov rax, [rbp+var_58]"], [32, "mov rsi, rax"], [33, "mov edi, offset aSDBytes"], [34, "mov eax, 0"], [35, "call _printf"], [36, "cmp [rbp+var_48], 0"], [37, "jz loc_4517CB"], [38, "cmp [rbp+var_4C], 0"], [39, "jle loc_4517CB"], [40, "mov [rbp+var_38], 0"], [41, "jmp loc_451612"], [42, "mov eax, [rbp+var_38]"], [43, "shl eax, 4"], [44, "mov esi, eax"], [45, "mov edi, offset a04hx"], [46, "mov eax, 0"], [47, "call _printf"], [48, "mov [rbp+var_34], 0"], [49, "jmp short loc_451572"], [50, "mov eax, [rbp+var_38]"], [51, "shl eax, 4"], [52, "mov edx, eax"], [53, "mov eax, [rbp+var_34]"], [54, "add eax, edx"], [55, "movsxd rdx, eax"], [56, "mov rax, [rbp+var_28]"], [57, "add rax, rdx"], [58, "movzx eax, byte ptr [rax]"], [59, "movzx eax, al"], [60, "mov esi, eax"], [61, "mov edi, offset a02x_4"], [62, "mov eax, 0"], [63, "call _printf"], [64, "mov eax, [rbp+var_34]"], [65, "cdq"], [66, "shr edx, 1Fh"], [67, "add eax, edx"], [68, "and eax, 1"], [69, "sub eax, edx"], [70, "cmp eax, 1"], [71, "jnz short loc_45156E"], [72, "mov edi, 20h "], [73, "call _putchar"], [74, "add [rbp+var_34], 1"], [75, "cmp [rbp+var_34], 0Fh"], [76, "jle short loc_451523"], [77, "mov edi, offset asc_4666E7"], [78, "mov eax, 0"], [79, "call _printf"], [80, "mov [rbp+var_34], 0"], [81, "jmp short loc_4515FE"], [82, "call ___ctype_b_loc"], [83, "mov rdx, [rax]"], [84, "mov eax, [rbp+var_38]"], [85, "shl eax, 4"], [86, "mov ecx, eax"], [87, "mov eax, [rbp+var_34]"], [88, "add eax, ecx"], [89, "movsxd rcx, eax"], [90, "mov rax, [rbp+var_28]"], [91, "add rax, rcx"], [92, "movzx eax, byte ptr [rax]"], [93, "movzx eax, al"], [94, "add rax, rax"], [95, "add rax, rdx"], [96, "movzx eax, word ptr [rax]"], [97, "movzx eax, ax"], [98, "and eax, 4000h"], [99, "test eax, eax"], [100, "jz short loc_4515F0"], [101, "mov eax, [rbp+var_38]"], [102, "shl eax, 4"], [103, "mov edx, eax"], [104, "mov eax, [rbp+var_34]"], [105, "add eax, edx"], [106, "movsxd rdx, eax"], [107, "mov rax, [rbp+var_28]"], [108, "add rax, rdx"], [109, "movzx eax, byte ptr [rax]"], [110, "movzx eax, al"], [111, "mov edi, eax"], [112, "call _putchar"], [113, "jmp short loc_4515FA"], [114, "mov edi, 2Eh "], [115, "call _putchar"], [116, "add [rbp+var_34], 1"], [117, "cmp [rbp+var_34], 0Fh"], [118, "jle short loc_451590"], [119, "mov edi, offset asc_4666ED"], [120, "call _puts"], [121, "add [rbp+var_38], 1"], [122, "mov eax, [rbp+var_38]"], [123, "cmp eax, [rbp+var_30]"], [124, "jl loc_451503"], [125, "cmp [rbp+var_2C], 0"], [126, "jle loc_4517CC"], [127, "lea rax, [rbp+s]"], [128, "mov edx, 10h"], [129, "mov esi, 0"], [130, "mov rdi, rax"], [131, "call _memset"], [132, "mov eax, [rbp+var_2C]"], [133, "movsxd rdx, eax"], [134, "mov eax, [rbp+var_4C]"], [135, "cdqe"], [136, "mov ecx, [rbp+var_2C]"], [137, "movsxd rcx, ecx"], [138, "sub rax, rcx"], [139, "mov rsi, rax"], [140, "mov rax, [rbp+var_28]"], [141, "lea rcx, [rsi+rax]"], [142, "lea rax, [rbp+s]"], [143, "mov rsi, rcx"], [144, "mov rdi, rax"], [145, "call _memcpy"], [146, "mov eax, [rbp+var_38]"], [147, "shl eax, 4"], [148, "mov esi, eax"], [149, "mov edi, offset a04hx"], [150, "mov eax, 0"], [151, "call _printf"], [152, "mov [rbp+var_34], 0"], [153, "jmp short loc_4516DB"], [154, "mov eax, [rbp+var_38]"], [155, "shl eax, 4"], [156, "mov edx, eax"], [157, "mov eax, [rbp+var_34]"], [158, "add eax, edx"], [159, "movsxd rdx, eax"], [160, "mov rax, [rbp+var_28]"], [161, "add rax, rdx"], [162, "movzx eax, byte ptr [rax]"], [163, "movzx eax, al"], [164, "mov esi, eax"], [165, "mov edi, offset a02x_4"], [166, "mov eax, 0"], [167, "call _printf"], [168, "mov eax, [rbp+var_34]"], [169, "cdq"], [170, "shr edx, 1Fh"], [171, "add eax, edx"], [172, "and eax, 1"], [173, "sub eax, edx"], [174, "cmp eax, 1"], [175, "jnz short loc_4516D7"], [176, "mov edi, 20h "], [177, "call _putchar"], [178, "add [rbp+var_34], 1"], [179, "mov eax, [rbp+var_34]"], [180, "cmp eax, [rbp+var_2C]"], [181, "jl short loc_45168C"], [182, "jmp short loc_451715"], [183, "mov edi, offset asc_4666F0"], [184, "mov eax, 0"], [185, "call _printf"], [186, "mov eax, [rbp+var_34]"], [187, "cdq"], [188, "shr edx, 1Fh"], [189, "add eax, edx"], [190, "and eax, 1"], [191, "sub eax, edx"], [192, "cmp eax, 1"], [193, "jnz short loc_451711"], [194, "mov edi, 20h "], [195, "call _putchar"], [196, "add [rbp+var_34], 1"], [197, "cmp [rbp+var_34], 0Fh"], [198, "jle short loc_4516E5"], [199, "mov edi, offset asc_4666E7"], [200, "mov eax, 0"], [201, "call _printf"], [202, "mov [rbp+var_34], 0"], [203, "jmp short loc_4517A1"], [204, "call ___ctype_b_loc"], [205, "mov rdx, [rax]"], [206, "mov eax, [rbp+var_38]"], [207, "shl eax, 4"], [208, "mov ecx, eax"], [209, "mov eax, [rbp+var_34]"], [210, "add eax, ecx"], [211, "movsxd rcx, eax"], [212, "mov rax, [rbp+var_28]"], [213, "add rax, rcx"], [214, "movzx eax, byte ptr [rax]"], [215, "movzx eax, al"], [216, "add rax, rax"], [217, "add rax, rdx"], [218, "movzx eax, word ptr [rax]"], [219, "movzx eax, ax"], [220, "and eax, 4000h"], [221, "test eax, eax"], [222, "jz short loc_451793"], [223, "mov eax, [rbp+var_38]"], [224, "shl eax, 4"], [225, "mov edx, eax"], [226, "mov eax, [rbp+var_34]"], [227, "add eax, edx"], [228, "movsxd rdx, eax"], [229, "mov rax, [rbp+var_28]"], [230, "add rax, rdx"], [231, "movzx eax, byte ptr [rax]"], [232, "movzx eax, al"], [233, "mov edi, eax"], [234, "call _putchar"], [235, "jmp short loc_45179D"], [236, "mov edi, 2Eh "], [237, "call _putchar"], [238, "add [rbp+var_34], 1"], [239, "mov eax, [rbp+var_34]"], [240, "cmp eax, [rbp+var_2C]"], [241, "jl short loc_451733"], [242, "jmp short loc_4517B9"], [243, "mov edi, 20h "], [244, "call _putchar"], [245, "add [rbp+var_34], 1"], [246, "cmp [rbp+var_34], 0Fh"], [247, "jle short loc_4517AB"], [248, "mov edi, offset asc_4666ED"], [249, "call _puts"], [250, "jmp short loc_4517CC"], [251, "nop"], [252, "mov rax, [rbp+var_8]"], [253, "sub rax, fs:28h"], [254, "jz short locret_4517E0"], [255, "call ___stack_chk_fail"], [256, "leave"], [257, "retn"]], "data_dep": [[7, 6], [9, 3], [10, 9], [11, 4], [12, 11], [13, 11], [14, 13], [14, 12], [15, 14], [16, 15], [17, 4], [19, 12], [20, 17], [20, 19], [21, 20], [22, 19], [22, 21], [23, 22], [24, 5], [25, 24], [26, 5], [27, 26], [28, 27], [29, 28], [30, 4], [31, 5], [32, 31], [36, 3], [37, 36], [38, 4], [39, 38], [42, 121], [42, 40], [43, 42], [44, 43], [50, 40], [50, 121], [51, 50], [52, 51], [53, 48], [53, 74], [54, 53], [54, 52], [55, 54], [56, 10], [57, 56], [57, 55], [58, 57], [59, 58], [60, 59], [64, 48], [64, 74], [66, 55], [67, 64], [67, 66], [68, 67], [69, 66], [69, 68], [70, 69], [71, 70], [74, 48], [74, 74], [75, 74], [75, 48], [76, 75], [83, 82], [84, 40], [84, 121], [85, 84], [86, 85], [87, 80], [87, 116], [88, 86], [88, 87], [89, 88], [90, 10], [91, 89], [91, 90], [92, 91], [93, 92], [94, 93], [95, 83], [95, 94], [96, 95], [97, 96], [98, 97], [99, 98], [100, 99], [101, 121], [101, 40], [102, 101], [103, 102], [104, 80], [104, 116], [105, 104], [105, 103], [106, 105], [107, 10], [108, 107], [108, 106], [109, 108], [110, 109], [111, 110], [116, 116], [116, 80], [117, 80], [117, 116], [118, 117], [121, 121], [121, 40], [122, 40], [122, 121], [123, 122], [123, 16], [124, 123], [125, 23], [126, 125], [127, 122], [130, 127], [132, 23], [133, 132], [134, 4], [136, 23], [137, 136], [138, 137], [138, 134], [139, 138], [140, 10], [141, 140], [141, 137], [142, 140], [143, 141], [144, 142], [146, 40], [146, 121], [147, 146], [148, 147], [154, 40], [154, 121], [155, 154], [156, 155], [157, 178], [157, 152], [158, 156], [158, 157], [159, 158], [160, 10], [161, 159], [161, 160], [162, 161], [163, 162], [164, 163], [168, 178], [168, 152], [170, 159], [171, 168], [171, 170], [172, 171], [173, 170], [173, 172], [174, 173], [175, 174], [178, 152], [178, 178], [179, 178], [179, 152], [180, 179], [180, 23], [181, 180], [186, 152], [186, 178], [186, 196], [188, 170], [188, 188], [188, 133], [189, 186], [189, 188], [190, 189], [191, 188], [191, 190], [192, 191], [193, 192], [196, 178], [196, 196], [196, 152], [197, 152], [197, 196], [197, 178], [198, 197], [205, 204], [206, 40], [206, 121], [207, 206], [208, 207], [209, 202], [209, 238], [210, 209], [210, 208], [211, 210], [212, 10], [213, 212], [213, 211], [214, 213], [215, 214], [216, 215], [217, 205], [217, 216], [218, 217], [219, 218], [220, 219], [221, 220], [222, 221], [223, 40], [223, 121], [224, 223], [225, 224], [226, 202], [226, 238], [227, 225], [227, 226], [228, 227], [229, 10], [230, 229], [230, 228], [231, 230], [232, 231], [233, 232], [238, 238], [238, 202], [239, 238], [239, 202], [240, 239], [240, 23], [241, 240], [245, 202], [245, 245], [245, 238], [246, 202], [246, 245], [246, 238], [247, 246], [252, 7], [253, 252], [254, 253], [257, 253]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/a8fb2edbd6bde6f75d208a747818d072741a3159e43047c86a6c260940123f40_a8fb2edbd6bde6f75d208a747818d072741a3159e43047c86a6c260940123f40.jsonl.gz", "strip_func_name": "sub_45146B", "query": "\n\n\nunsigned __int64 __fastcall sub_45146B(__int64 a1, int a2, const char *a3)\n{\nint i; // [rsp+28h] [rbp-38h]\nint j; // [rsp+2Ch] [rbp-34h]\nint k; // [rsp+2Ch] [rbp-34h]\nint l; // [rsp+2Ch] [rbp-34h]\nint m; // [rsp+2Ch] [rbp-34h]\nint v9; // [rsp+34h] [rbp-2Ch]\nchar s[24]; // [rsp+40h] [rbp-20h] BYREF\nunsigned __int64 v11; // [rsp+58h] [rbp-8h]\n\nv11 = __readfsqword(0x28u);\nv9 = a2 % 16;\nif ( a3 && *a3 )\nprintf(\"%s (%d bytes):\\n\", a3, (unsigned int)a2);\nif ( a1 && a2 > 0 )\n{\nfor ( i = 0; i < a2 / 16; ++i )\n{\nprintf(\"%04hx: \", (unsigned int)(16 * i));\nfor ( j = 0; j <= 15; ++j )\n{\nprintf(\"%02x\", *(unsigned __int8 *)(16 * i + j + a1));\nif ( j % 2 == 1 )\nputchar(32);\n}\nprintf(\" [ \");\nfor ( k = 0; k <= 15; ++k )\n{\nif ( ((*__ctype_b_loc())[*(unsigned __int8 *)(16 * i + k + a1)] & 0x4000) != 0 )\nputchar(*(unsigned __int8 *)(16 * i + k + a1));\nelse\nputchar(46);\n}\nputs(\" ]\");\n}\nif ( v9 > 0 )\n{\nmemset(s, 0, 0x10uLL);\nmemcpy(s, (const void *)(a2 - (__int64)v9 + a1), v9);\nprintf(\"%04hx: \", (unsigned int)(16 * i));\nfor ( l = 0; l < v9; ++l )\n{\nprintf(\"%02x\", *(unsigned __int8 *)(16 * i + l + a1));\nif ( l % 2 == 1 )\nputchar(32);\n}\nwhile ( l <= 15 )\n{\nprintf(\" \");\nif ( l % 2 == 1 )\nputchar(32);\n++l;\n}\nprintf(\" [ \");\nfor ( m = 0; m < v9; ++m )\n{\nif ( ((*__ctype_b_loc())[*(unsigned __int8 *)(16 * i + m + a1)] & 0x4000) != 0 )\nputchar(*(unsigned __int8 *)(16 * i + m + a1));\nelse\nputchar(46);\n}\nwhile ( m <= 15 )\n{\nputchar(32);\n++m;\n}\nputs(\" ]\");\n}\n}\nreturn v11 - __readfsqword(0x28u);\n}\n\n\n\nQ:[a3,a1,a2,m,v9,s,sub_45146B,]", "hints": "[]", "response": "{'a3': 'text', 'a1': 'buf', 'a2': 'len', 'm': 'jc', 'v9': 'lastrow', 's': 'lastrow_data', 'sub_45146B': 'hydra_dump_data'}"}
[ [ 0.8260518312454224, 0.7525783777236938, 0.7412426471710205, 0.7117634415626526, 0.7094195485115051, 0.7056354880332947, 0.7029675245285034, 0.6979392766952515, 0.6921625137329102, 0.6887673139572144, 0.6882121562957764, 0.6840364933013916, 0.6808620095252991, 0.6805011630058289, 0.6804894208908081, 0.6798409223556519, 0.6766643524169922, 0.6750251054763794, 0.6734405755996704, 0.6709295511245728 ], [ 193460, 221795, 78284, 210914, 263881, 33922, 22372, 86931, 251975, 188712, 235119, 219029, 125345, 258263, 79491, 102391, 36935, 196067, 187288, 26193 ] ]
arm_mat_trans_f32
3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec
gwsystems
sledge-serverless-framework
NA
arm_status arm_mat_trans_f32( const arm_matrix_instance_f32 * pSrc, arm_matrix_instance_f32 * pDst) { float32_t *pIn = pSrc->pData; /* input data matrix pointer */ float32_t *pOut = pDst->pData; /* output data matrix pointer */ float32_t *px; /* Temporary output data matrix pointer */ uint16_t nRows = pSrc->numRows; /* number of rows */ uint16_t nCols = pSrc->numCols; /* number of columns */ uint32_t col, row = nRows, i = 0U; /* Loop counters */ arm_status status; /* status of matrix transpose */ #ifdef ARM_MATH_MATRIX_CHECK /* Check for matrix mismatch condition */ if ((pSrc->numRows != pDst->numCols) || (pSrc->numCols != pDst->numRows) ) { /* Set status as ARM_MATH_SIZE_MISMATCH */ status = ARM_MATH_SIZE_MISMATCH; } else #endif /* #ifdef ARM_MATH_MATRIX_CHECK */ { /* Matrix transpose by exchanging the rows with columns */ /* row loop */ do { /* Pointer px is set to starting address of column being processed */ px = pOut + i; #if defined (ARM_MATH_LOOPUNROLL) /* Loop unrolling: Compute 4 outputs at a time */ col = nCols >> 2U; while (col > 0U) /* column loop */ { /* Read and store input element in destination */ *px = *pIn++; /* Update pointer px to point to next row of transposed matrix */ px += nRows; *px = *pIn++; px += nRows; *px = *pIn++; px += nRows; *px = *pIn++; px += nRows; /* Decrement column loop counter */ col--; } /* Loop unrolling: Compute remaining outputs */ col = nCols % 0x4U; #else /* Initialize col with number of samples */ col = nCols; #endif /* #if defined (ARM_MATH_LOOPUNROLL) */ while (col > 0U) { /* Read and store input element in destination */ *px = *pIn++; /* Update pointer px to point to next row of transposed matrix */ px += nRows; /* Decrement column loop counter */ col--; } i++; /* Decrement row loop counter */ row--; } while (row > 0U); /* row loop end */ /* Set status as ARM_MATH_SUCCESS */ status = ARM_MATH_SUCCESS; } /* Return to application */ return (status); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4093C4", "function_addr": 4232132, "binary_name": "3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_38], rdi"], [3, "mov [rbp+var_40], rsi"], [4, "mov rax, [rbp+var_38]"], [5, "mov rax, [rax+8]"], [6, "mov [rbp+var_8], rax"], [7, "mov rax, [rbp+var_40]"], [8, "mov rax, [rax+8]"], [9, "mov [rbp+var_28], rax"], [10, "mov rax, [rbp+var_38]"], [11, "movzx eax, word ptr [rax]"], [12, "mov [rbp+var_2A], ax"], [13, "mov rax, [rbp+var_38]"], [14, "movzx eax, word ptr [rax+2]"], [15, "mov [rbp+var_2C], ax"], [16, "movzx eax, [rbp+var_2A]"], [17, "mov [rbp+var_18], eax"], [18, "mov [rbp+var_1C], 0"], [19, "mov eax, [rbp+var_1C]"], [20, "lea rdx, ds:0[rax*4]"], [21, "mov rax, [rbp+var_28]"], [22, "add rax, rdx"], [23, "mov [rbp+var_10], rax"], [24, "movzx eax, [rbp+var_2C]"], [25, "mov [rbp+var_14], eax"], [26, "jmp short loc_409454"], [27, "mov rax, [rbp+var_8]"], [28, "lea rdx, [rax+4]"], [29, "mov [rbp+var_8], rdx"], [30, "movss xmm0, dword ptr [rax]"], [31, "mov rax, [rbp+var_10]"], [32, "movss dword ptr [rax], xmm0"], [33, "movzx eax, [rbp+var_2A]"], [34, "shl rax, 2"], [35, "add [rbp+var_10], rax"], [36, "sub [rbp+var_14], 1"], [37, "cmp [rbp+var_14], 0"], [38, "jnz short loc_40942C"], [39, "add [rbp+var_1C], 1"], [40, "sub [rbp+var_18], 1"], [41, "cmp [rbp+var_18], 0"], [42, "jnz short loc_40940D"], [43, "mov [rbp+var_30], 0"], [44, "mov eax, [rbp+var_30]"], [45, "pop rbp"], [46, "retn"]], "data_dep": [[4, 2], [5, 4], [6, 5], [7, 3], [8, 7], [9, 8], [10, 2], [11, 10], [12, 11], [13, 2], [14, 13], [15, 14], [16, 12], [17, 16], [19, 18], [19, 39], [20, 20], [20, 28], [21, 9], [22, 20], [22, 21], [23, 22], [24, 15], [25, 24], [27, 6], [27, 29], [28, 27], [28, 20], [28, 32], [28, 28], [29, 28], [30, 27], [30, 32], [31, 23], [31, 35], [32, 31], [32, 30], [33, 12], [34, 33], [35, 23], [35, 35], [35, 34], [36, 25], [36, 36], [37, 36], [37, 25], [38, 37], [39, 18], [39, 39], [40, 17], [40, 40], [41, 40], [42, 41], [44, 43], [45, 0], [46, 44]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec_3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.jsonl.gz", "strip_func_name": "sub_4093C4", "query": "\n\n\n__int64 __fastcall sub_4093C4(unsigned __int16 *a1, __int64 a2)\n{\n_DWORD *v2; // rax\nunsigned __int16 v4; // [rsp+14h] [rbp-2Ch]\nunsigned __int16 v5; // [rsp+16h] [rbp-2Ah]\n__int64 v6; // [rsp+18h] [rbp-28h]\nunsigned int v7; // [rsp+24h] [rbp-1Ch]\nint v8; // [rsp+28h] [rbp-18h]\nint i; // [rsp+2Ch] [rbp-14h]\n_DWORD *v10; // [rsp+30h] [rbp-10h]\n_DWORD *v11; // [rsp+38h] [rbp-8h]\n\nv11 = (_DWORD *)*((_QWORD *)a1 + 1);\nv6 = *(_QWORD *)(a2 + 8);\nv5 = *a1;\nv4 = a1[1];\nv8 = *a1;\nv7 = 0;\ndo\n{\nv10 = (_DWORD *)(4LL * v7 + v6);\nfor ( i = v4; i; --i )\n{\nv2 = v11++;\n*v10 = *v2;\nv10 += v5;\n}\n++v7;\n--v8;\n}\nwhile ( v8 );\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v4,v5,v6,v8,i,v10,v11,sub_4093C4,]", "hints": "[]", "response": "{'a1': 'pSrc', 'a2': 'pDst', 'v4': 'nCols', 'v5': 'nRows', 'v6': 'pOut', 'v8': 'row', 'i': 'col', 'v10': 'px', 'v11': 'pIn', 'sub_4093C4': 'arm_mat_trans_f32'}"}
[ [ 0.8068534731864929, 0.7640217542648315, 0.758304238319397, 0.7484051585197449, 0.7181887030601501, 0.7131285071372986, 0.710568368434906, 0.6947293281555176, 0.6937274932861328, 0.6891452074050903, 0.6882481575012207, 0.6881424188613892, 0.6869059205055237, 0.6797200441360474, 0.6752027273178101, 0.6742905974388123, 0.6733437180519104, 0.6722244024276733, 0.6686623692512512, 0.6672458052635193 ], [ 112963, 140602, 148127, 30530, 21543, 105989, 220269, 81548, 129951, 51779, 75411, 170893, 11552, 98745, 241030, 214816, 233111, 207380, 206940, 41197 ] ]
resolve_names
a7f0a057e3595fda4579432c28c32741dc464b504b2a03b91823cd9b6f26bfd8
yarrick
pingfs
NA
static int resolve_names(struct gaicb **list, int names, struct host **hosts) { int ret; int hostcount; int i; fprintf(stderr, "Resolving %d hostnames... ", names); fflush(stderr); ret = getaddrinfo_a(GAI_WAIT, list, names, NULL); if (ret != 0) { fprintf(stderr, "Resolving failed: %s\n", gai_strerror(ret)); return -1; } fprintf(stderr, "done.\n"); hostcount = 0; for (i = 0; i < names; i++) { ret = gai_error(list[i]); if (ret) { fprintf(stderr, "Skipping %s: %s\n", list[i]->ar_name, gai_strerror(ret)); } else { struct addrinfo *result = list[i]->ar_result; do { hostcount++; result = result->ai_next; } while (result); } } if (!hostcount) { fprintf(stderr, "No hosts found! Exiting\n"); return -1; } *hosts = host_create(list, names); host_free_resolvlist(list, names); if (*hosts == NULL) { fprintf(stderr, "Failed creating list list, exiting\n"); return -1; } return hostcount; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403513", "function_addr": 4207891, "binary_name": "a7f0a057e3595fda4579432c28c32741dc464b504b2a03b91823cd9b6f26bfd8.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+list], rdi"], [4, "mov [rbp+ent], esi"], [5, "mov [rbp+var_38], rdx"], [6, "mov rax, cs:stderr"], [7, "mov edx, [rbp+ent]"], [8, "mov esi, offset aResolvingDHost"], [9, "mov rdi, rax"], [10, "mov eax, 0"], [11, "call _fprintf"], [12, "mov rax, cs:stderr"], [13, "mov rdi, rax"], [14, "call _fflush"], [15, "mov edx, [rbp+ent]"], [16, "mov rax, [rbp+list]"], [17, "mov ecx, 0"], [18, "mov rsi, rax"], [19, "mov edi, 0"], [20, "call _getaddrinfo_a"], [21, "mov [rbp+ecode], eax"], [22, "cmp [rbp+ecode], 0"], [23, "jz short loc_4035A3"], [24, "mov eax, [rbp+ecode]"], [25, "mov edi, eax"], [26, "call _gai_strerror"], [27, "mov rdx, rax"], [28, "mov rax, cs:stderr"], [29, "mov esi, offset aResolvingFaile"], [30, "mov rdi, rax"], [31, "mov eax, 0"], [32, "call _fprintf"], [33, "mov eax, 0FFFFFFFFh"], [34, "jmp locret_40370C"], [35, "mov rax, cs:stderr"], [36, "mov rcx, rax"], [37, "mov edx, 6"], [38, "mov esi, 1"], [39, "mov edi, offset aDone_0"], [40, "call _fwrite"], [41, "mov [rbp+var_4], 0"], [42, "mov [rbp+var_8], 0"], [43, "jmp loc_403678"], [44, "mov eax, [rbp+var_8]"], [45, "cdqe"], [46, "lea rdx, ds:0[rax*8]"], [47, "mov rax, [rbp+list]"], [48, "add rax, rdx"], [49, "mov rax, [rax]"], [50, "mov rdi, rax"], [51, "call _gai_error"], [52, "mov [rbp+ecode], eax"], [53, "cmp [rbp+ecode], 0"], [54, "jz short loc_40363E"], [55, "mov eax, [rbp+ecode]"], [56, "mov edi, eax"], [57, "call _gai_strerror"], [58, "mov rcx, rax"], [59, "mov eax, [rbp+var_8]"], [60, "cdqe"], [61, "lea rdx, ds:0[rax*8]"], [62, "mov rax, [rbp+list]"], [63, "add rax, rdx"], [64, "mov rax, [rax]"], [65, "mov rdx, [rax]"], [66, "mov rax, cs:stderr"], [67, "mov esi, offset aSkippingSS"], [68, "mov rdi, rax"], [69, "mov eax, 0"], [70, "call _fprintf"], [71, "jmp short loc_403674"], [72, "mov eax, [rbp+var_8]"], [73, "cdqe"], [74, "lea rdx, ds:0[rax*8]"], [75, "mov rax, [rbp+list]"], [76, "add rax, rdx"], [77, "mov rax, [rax]"], [78, "mov rax, [rax+18h]"], [79, "mov [rbp+var_10], rax"], [80, "add [rbp+var_4], 1"], [81, "mov rax, [rbp+var_10]"], [82, "mov rax, [rax+28h]"], [83, "mov [rbp+var_10], rax"], [84, "cmp [rbp+var_10], 0"], [85, "jnz short loc_40365D"], [86, "add [rbp+var_8], 1"], [87, "mov eax, [rbp+var_8]"], [88, "cmp eax, [rbp+ent]"], [89, "jl loc_4035D4"], [90, "cmp [rbp+var_4], 0"], [91, "jnz short loc_4036AF"], [92, "mov rax, cs:stderr"], [93, "mov rcx, rax"], [94, "mov edx, 18h"], [95, "mov esi, 1"], [96, "mov edi, offset aNoHostsFoundEx"], [97, "call _fwrite"], [98, "mov eax, 0FFFFFFFFh"], [99, "jmp short locret_40370C"], [100, "mov edx, [rbp+ent]"], [101, "mov rax, [rbp+list]"], [102, "mov esi, edx"], [103, "mov rdi, rax"], [104, "call sub_402C65"], [105, "mov rdx, [rbp+var_38]"], [106, "mov [rdx], rax"], [107, "mov edx, [rbp+ent]"], [108, "mov rax, [rbp+list]"], [109, "mov esi, edx"], [110, "mov rdi, rax"], [111, "call sub_402BA7"], [112, "mov rax, [rbp+var_38]"], [113, "mov rax, [rax]"], [114, "test rax, rax"], [115, "jnz short loc_403709"], [116, "mov rax, cs:stderr"], [117, "mov rcx, rax"], [118, "mov edx, 23h "], [119, "mov esi, 1"], [120, "mov edi, offset aFailedCreating"], [121, "call _fwrite"], [122, "mov eax, 0FFFFFFFFh"], [123, "jmp short locret_40370C"], [124, "mov eax, [rbp+var_4]"], [125, "leave"], [126, "retn"]], "data_dep": [[7, 4], [9, 6], [13, 12], [15, 4], [16, 3], [18, 16], [21, 20], [22, 21], [23, 22], [24, 21], [25, 24], [27, 26], [30, 28], [36, 35], [44, 86], [44, 42], [46, 65], [46, 74], [46, 37], [47, 3], [48, 47], [48, 46], [49, 48], [50, 49], [52, 51], [53, 52], [54, 53], [55, 52], [56, 55], [58, 57], [59, 86], [59, 42], [61, 46], [62, 3], [63, 61], [63, 62], [64, 63], [65, 64], [68, 66], [72, 86], [72, 42], [74, 46], [75, 3], [76, 74], [76, 75], [77, 76], [78, 77], [79, 78], [80, 41], [80, 80], [81, 79], [81, 83], [82, 81], [83, 82], [84, 83], [85, 84], [86, 42], [86, 86], [87, 86], [87, 42], [88, 87], [88, 4], [89, 88], [90, 41], [90, 80], [91, 90], [93, 92], [100, 4], [101, 3], [102, 100], [103, 101], [105, 5], [106, 104], [106, 105], [107, 4], [108, 3], [109, 107], [110, 108], [112, 5], [113, 112], [113, 106], [114, 113], [115, 114], [117, 116], [124, 41], [124, 80], [126, 98], [126, 122], [126, 33], [126, 124]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/a7f0a057e3595fda4579432c28c32741dc464b504b2a03b91823cd9b6f26bfd8_a7f0a057e3595fda4579432c28c32741dc464b504b2a03b91823cd9b6f26bfd8.jsonl.gz", "strip_func_name": "sub_403513", "query": "\n\n\n__int64 __fastcall sub_403513(struct gaicb **a1, int a2, _QWORD *a3)\n{\nconst char *v3; // rax\n__int64 result; // rax\nconst char *v5; // rax\nint ecode; // [rsp+2Ch] [rbp-14h]\nint ecodea; // [rsp+2Ch] [rbp-14h]\nstruct addrinfo *v9; // [rsp+30h] [rbp-10h]\nint i; // [rsp+38h] [rbp-8h]\nunsigned int v11; // [rsp+3Ch] [rbp-4h]\n\nfprintf(stderr, \"Resolving %d hostnames... \", (unsigned int)a2);\nfflush(stderr);\necode = getaddrinfo_a(0, a1, a2, 0LL);\nif ( ecode )\n{\nv3 = gai_strerror(ecode);\nfprintf(stderr, \"Resolving failed: %s\\n\", v3);\nresult = 0xFFFFFFFFLL;\n}\nelse\n{\nfwrite(\"done.\\n\", 1uLL, 6uLL, stderr);\nv11 = 0;\nfor ( i = 0; i < a2; ++i )\n{\necodea = gai_error(a1[i]);\nif ( ecodea )\n{\nv5 = gai_strerror(ecodea);\nfprintf(stderr, \"Skipping %s: %s\\n\", a1[i]->ar_name, v5);\n}\nelse\n{\nv9 = a1[i]->ar_result;\ndo\n{\n++v11;\nv9 = v9->ai_next;\n}\nwhile ( v9 );\n}\n}\nif ( v11 )\n{\n*a3 = sub_402C65((__int64)a1, a2);\nsub_402BA7((void ***)a1, a2);\nif ( *a3 )\n{\nresult = v11;\n}\nelse\n{\nfwrite(\"Failed creating list list, exiting\\n\", 1uLL, 0x23uLL, stderr);\nresult = 0xFFFFFFFFLL;\n}\n}\nelse\n{\nfwrite(\"No hosts found! Exiting\\n\", 1uLL, 0x18uLL, stderr);\nresult = 0xFFFFFFFFLL;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v9,v11,sub_403513,sub_402C65,sub_402BA7,]", "hints": "[]", "response": "{'a3': 'hosts', 'a1': 'list', 'a2': 'names', 'v9': 'result', 'v11': 'hostcount', 'sub_403513': 'resolve_names', 'sub_402C65': 'host_create', 'sub_402BA7': 'host_free_resolvlist'}"}
[ [ 0.7279669046401978, 0.7207222580909729, 0.7170112133026123, 0.7159332633018494, 0.7128764390945435, 0.7111365795135498, 0.7110532522201538, 0.7104417085647583, 0.7094426155090332, 0.7011191844940186, 0.699679434299469, 0.6996680498123169, 0.6982145309448242, 0.6980810165405273, 0.6953393816947937, 0.6948736906051636, 0.6941068172454834, 0.693769097328186, 0.6936195492744446, 0.6930046081542969 ], [ 148459, 161044, 99411, 113398, 171349, 93221, 145067, 188097, 245983, 1201, 245418, 88652, 195889, 212536, 250849, 13166, 222274, 174294, 142520, 19284 ] ]
is_unreserved
3bcf173d341df86f6f8c68ed537bf47f1d919855b29727d483d7dab93b6c4413
emikulic
darkhttpd
NA
static int is_unreserved(const unsigned char c) { if (c >= 'a' && c <= 'z') return 1; if (c >= 'A' && c <= 'Z') return 1; if (c >= '0' && c <= '9') return 1; switch (c) { case '-': case '.': case '_': case '~': return 1; } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4149A8", "function_addr": 4278696, "binary_name": "3bcf173d341df86f6f8c68ed537bf47f1d919855b29727d483d7dab93b6c4413.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, edi"], [3, "mov [rbp+var_4], al"], [4, "cmp [rbp+var_4], 60h "], [5, "jbe short loc_4149C4"], [6, "cmp [rbp+var_4], 7Ah "], [7, "ja short loc_4149C4"], [8, "mov eax, 1"], [9, "jmp short loc_414A15"], [10, "cmp [rbp+var_4], 40h "], [11, "jbe short loc_4149D7"], [12, "cmp [rbp+var_4], 5Ah "], [13, "ja short loc_4149D7"], [14, "mov eax, 1"], [15, "jmp short loc_414A15"], [16, "cmp [rbp+var_4], 2Fh "], [17, "jbe short loc_4149EA"], [18, "cmp [rbp+var_4], 39h "], [19, "ja short loc_4149EA"], [20, "mov eax, 1"], [21, "jmp short loc_414A15"], [22, "movzx eax, [rbp+var_4]"], [23, "cmp eax, 7Eh "], [24, "jz short loc_414A09"], [25, "cmp eax, 7Eh "], [26, "jg short loc_414A10"], [27, "cmp eax, 2Eh "], [28, "jg short loc_414A04"], [29, "cmp eax, 2Dh "], [30, "jge short loc_414A09"], [31, "jmp short loc_414A10"], [32, "cmp eax, 5Fh "], [33, "jnz short loc_414A10"], [34, "mov eax, 1"], [35, "jmp short loc_414A15"], [36, "mov eax, 0"], [37, "pop rbp"], [38, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 3], [7, 6], [10, 3], [11, 10], [12, 3], [13, 12], [16, 3], [17, 16], [18, 3], [19, 18], [22, 3], [23, 22], [24, 23], [25, 22], [26, 25], [27, 22], [28, 27], [29, 22], [30, 29], [32, 22], [33, 32], [37, 0], [38, 20], [38, 34], [38, 36], [38, 14], [38, 8]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/3bcf173d341df86f6f8c68ed537bf47f1d919855b29727d483d7dab93b6c4413_3bcf173d341df86f6f8c68ed537bf47f1d919855b29727d483d7dab93b6c4413.jsonl.gz", "strip_func_name": "sub_4149A8", "query": "\n\n\n_BOOL8 __fastcall sub_4149A8(unsigned __int8 a1)\n{\nif ( a1 > 0x60u && a1 <= 0x7Au )\nreturn 1LL;\nif ( a1 > 0x40u && a1 <= 0x5Au )\nreturn 1LL;\nif ( a1 > 0x2Fu && a1 <= 0x39u )\nreturn 1LL;\nif ( a1 == 126 )\nreturn 1LL;\nif ( a1 <= 0x7Eu )\n{\nif ( a1 <= 0x2Eu )\nreturn a1 >= 0x2Du;\nif ( a1 == 95 )\nreturn 1LL;\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,sub_4149A8,]", "hints": "[]", "response": "{'a1': 'c', 'sub_4149A8': 'is_unreserved'}"}
[ [ 0.8273787498474121, 0.8261286020278931, 0.8173637390136719, 0.8131042718887329, 0.8121260404586792, 0.8096698522567749, 0.7970247864723206, 0.7935145497322083, 0.7917802333831787, 0.7911441326141357, 0.7905068397521973, 0.7901512980461121, 0.787783145904541, 0.7846379280090332, 0.7786790132522583, 0.7731908559799194, 0.7707562446594238, 0.7628087997436523, 0.7612647414207458, 0.7610822319984436 ], [ 89106, 238778, 222801, 115819, 152089, 212814, 262985, 62195, 57683, 251434, 2147, 63728, 172836, 11514, 70357, 84918, 227600, 90134, 137911, 24484 ] ]
png_read_tIME
4b58bb905f42bf1b4392143f49979b18b390ebb44b12087a07242a7fbf0e831a
embecosm
mibench
NA
void png_read_tIME(png_structp png_ptr, png_infop info, png_timep mod_time) { if (!png_ptr || !info) return; png_memcpy(&(info->mod_time), mod_time, sizeof (png_time)); info->valid |= PNG_INFO_tIME; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41608A", "function_addr": 4284554, "binary_name": "4b58bb905f42bf1b4392143f49979b18b390ebb44b12087a07242a7fbf0e831a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov [rbp+var_10], rsi"], [4, "mov [rbp+var_18], rdx"], [5, "cmp [rbp+var_8], 0"], [6, "jz short loc_4160D2"], [7, "cmp [rbp+var_10], 0"], [8, "jz short loc_4160D2"], [9, "mov rax, [rbp+var_10]"], [10, "lea rdx, [rax+48h]"], [11, "mov rax, [rbp+var_18]"], [12, "mov rax, [rax]"], [13, "mov [rdx], rax"], [14, "mov rax, [rbp+var_10]"], [15, "mov rax, [rax+10h]"], [16, "or ah, 2"], [17, "mov rdx, rax"], [18, "mov rax, [rbp+var_10]"], [19, "mov [rax+10h], rdx"], [20, "jmp short loc_4160D3"], [21, "nop"], [22, "pop rbp"], [23, "retn"]], "data_dep": [[5, 2], [6, 5], [7, 3], [8, 7], [9, 3], [10, 9], [11, 4], [12, 11], [13, 10], [13, 12], [14, 3], [15, 14], [15, 13], [16, 15], [17, 16], [18, 3], [19, 18], [19, 17], [22, 0], [23, 18]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/4b58bb905f42bf1b4392143f49979b18b390ebb44b12087a07242a7fbf0e831a_4b58bb905f42bf1b4392143f49979b18b390ebb44b12087a07242a7fbf0e831a.jsonl.gz", "strip_func_name": "sub_41608A", "query": "\n\n\n__int64 __fastcall sub_41608A(__int64 a1, __int64 a2, _QWORD *a3)\n{\n__int64 v3; // rax\n__int64 v4; // rdx\n__int64 result; // rax\n\nif ( a1 )\n{\nif ( a2 )\n{\n*(_QWORD *)(a2 + 72) = *a3;\nv3 = *(_QWORD *)(a2 + 16);\nBYTE1(v3) |= 2u;\nv4 = v3;\nresult = a2;\n*(_QWORD *)(a2 + 16) = v4;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v4,sub_41608A,]", "hints": "[]", "response": "{'a3': 'mod_time', 'a1': 'png_ptr', 'a2': 'info', 'v4': 'mod_time', 'sub_41608A': 'png_read_tIME'}"}
[ [ 0.8645082712173462, 0.8589635491371155, 0.8379342555999756, 0.8375702500343323, 0.8011833429336548, 0.7958727478981018, 0.7924344539642334, 0.7896665930747986, 0.754995584487915, 0.7538434863090515, 0.7533292770385742, 0.752816915512085, 0.7494548559188843, 0.7492935061454773, 0.7452446222305298, 0.7422454357147217, 0.7364248037338257, 0.7333489656448364, 0.7319604158401489, 0.7311787009239197 ], [ 200880, 252724, 54400, 16971, 69200, 127358, 175554, 188825, 222632, 153041, 130158, 156772, 129387, 20810, 257917, 228077, 254535, 83629, 2430, 147805 ] ]
record_status
9d261b39bd68b595bbd028d794f97db1aa43f9cd8f7db25dbbc76311cbb502dc
xieyaxiongfly
Atheros_CSI_tool_OpenWRT_src
NA
void record_status(unsigned char* buf_addr, int cnt, csi_struct* csi_status){ int i; //if (is_big_endian()) //{ csi_status->tstamp = ((buf_addr[0] << 56) & 0x00000000000000ff) | ((buf_addr[1] << 48) & 0x000000000000ff00) | ((buf_addr[2] << 40) & 0x0000000000ff0000) | ((buf_addr[3] << 32) & 0x00000000ff000000) | ((buf_addr[4] << 24) & 0x000000ff00000000) | ((buf_addr[5] << 16) & 0x0000ff0000000000) | ((buf_addr[6] << 8) & 0x00ff000000000000) | ((buf_addr[7]) & 0xff00000000000000) ; csi_status->csi_len = ((buf_addr[8] << 8) & 0xff00) | (buf_addr[9] & 0x00ff); csi_status->channel = ((buf_addr[10] << 8) & 0xff00) | (buf_addr[11] & 0x00ff); csi_status->buf_len = ((buf_addr[cnt-2] << 8) & 0xff00) | (buf_addr[cnt-1] & 0x00ff); csi_status->payload_len = ((buf_addr[csi_st_len] << 8) & 0xff00) | ((buf_addr[csi_st_len + 1]) & 0x00ff); //} /* else { csi_status->tstamp = ((buf_addr[7] << 56) & 0x00000000000000ff) | ((buf_addr[6] << 48) & 0x000000000000ff00) | ((buf_addr[5] << 40) & 0x0000000000ff0000) | ((buf_addr[4] << 32) & 0x00000000ff000000) | ((buf_addr[3] << 24) & 0x000000ff00000000) | ((buf_addr[2] << 16) & 0x0000ff0000000000) | ((buf_addr[1] << 8) & 0x00ff000000000000) | ((buf_addr[0]) & 0xff00000000000000) ; csi_status->csi_len = ((buf_addr[9] << 8) & 0xff00) | (buf_addr[8] & 0x00ff); csi_status->channel = ((buf_addr[11] << 8) & 0xff00) | (buf_addr[10] & 0x00ff); csi_status->buf_len = ((buf_addr[cnt-1] << 8) & 0xff00) | (buf_addr[cnt-2] & 0x00ff); csi_status->payload_len = ((buf_addr[csi_st_len+1] << 8) & 0xff00) | (buf_addr[csi_st_len] & 0x00ff); } */ csi_status->phyerr = buf_addr[12]; csi_status->noise = buf_addr[13]; csi_status->rate = buf_addr[14]; csi_status->chanBW = buf_addr[15]; csi_status->num_tones = buf_addr[16]; csi_status->nr = buf_addr[17]; csi_status->nc = buf_addr[18]; csi_status->rssi = buf_addr[19]; csi_status->rssi_0 = buf_addr[20]; csi_status->rssi_1 = buf_addr[21]; csi_status->rssi_2 = buf_addr[22]; /* printf("======== Bsic Information ===========\n"); printf("cnt= %d, csi_st_len=%d\n", cnt, csi_st_len); printf("tstamp= %d |", csi_status->tstamp); printf("payload_len= %d |",csi_status->payload_len); printf("csi_len= %d |",csi_status->csi_len); printf("channel= %d\n",csi_status->channel); printf("buf_len= %d |",csi_status->buf_len); printf("phyerr= %d |",csi_status->phyerr); printf("noise= %d |",csi_status->noise); printf("rate= %d\n",csi_status->rate); printf("chanBW= %d |",csi_status->chanBW); printf("num_tones= %d |",csi_status->num_tones); printf("nr= %d |",csi_status->nr); printf("nc= %d\n",csi_status->nc); printf("rssi= %d |",csi_status->rssi); printf("rssi_0= %d |",csi_status->rssi_0); printf("rssi_1= %d |",csi_status->rssi_1); printf("rssi_2= %d\n",csi_status->rssi_2); */ // printf("--------------------------------\n"); // printf("buf_addr[cnt-2]= %d\n", buf_addr[cnt-2]); // printf("buf_addr[cnt-1]= %d\n", buf_addr[cnt-1]); // for(i=0;i<=(csi_st_len+1);i++) // printf("buf_addr[%d]= %d\n" ,i ,buf_addr[i]); //Any setting small values //csi_status->payload_len=1040; //csi_status->csi_len=62; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401D67", "function_addr": 4201831, "binary_name": "9d261b39bd68b595bbd028d794f97db1aa43f9cd8f7db25dbbc76311cbb502dc.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_18], rdx"], [5, "mov rax, [rbp+var_8]"], [6, "movzx eax, byte ptr [rax]"], [7, "movzx eax, al"], [8, "mov edx, 38h "], [9, "mov ecx, edx"], [10, "shl eax, cl"], [11, "movzx edx, al"], [12, "mov rax, [rbp+var_8]"], [13, "add rax, 1"], [14, "movzx eax, byte ptr [rax]"], [15, "movzx eax, al"], [16, "mov ecx, 30h "], [17, "shl eax, cl"], [18, "and eax, 0FF00h"], [19, "mov esi, edx"], [20, "or esi, eax"], [21, "mov rax, [rbp+var_8]"], [22, "add rax, 2"], [23, "movzx eax, byte ptr [rax]"], [24, "movzx eax, al"], [25, "mov edx, 28h "], [26, "mov ecx, edx"], [27, "shl eax, cl"], [28, "and eax, 0FF0000h"], [29, "or eax, esi"], [30, "mov esi, eax"], [31, "mov rax, [rbp+var_8]"], [32, "add rax, 3"], [33, "movzx eax, byte ptr [rax]"], [34, "movzx eax, al"], [35, "mov edx, 20h "], [36, "mov ecx, edx"], [37, "shl eax, cl"], [38, "or eax, esi"], [39, "mov ecx, eax"], [40, "mov rax, [rbp+var_8]"], [41, "add rax, 4"], [42, "movzx eax, byte ptr [rax]"], [43, "movzx eax, al"], [44, "shl eax, 18h"], [45, "cdqe"], [46, "mov rdx, 0FF00000000h"], [47, "and rax, rdx"], [48, "or rcx, rax"], [49, "mov rdx, rcx"], [50, "mov rax, [rbp+var_8]"], [51, "add rax, 5"], [52, "movzx eax, byte ptr [rax]"], [53, "movzx eax, al"], [54, "shl eax, 10h"], [55, "cdqe"], [56, "mov rcx, 0FF0000000000h"], [57, "and rax, rcx"], [58, "or rdx, rax"], [59, "mov rax, [rbp+var_8]"], [60, "add rax, 6"], [61, "movzx eax, byte ptr [rax]"], [62, "movzx eax, al"], [63, "shl eax, 8"], [64, "cdqe"], [65, "mov rcx, 0FF000000000000h"], [66, "and rax, rcx"], [67, "or rax, rdx"], [68, "mov rcx, rax"], [69, "mov rax, [rbp+var_8]"], [70, "add rax, 7"], [71, "movzx eax, byte ptr [rax]"], [72, "movzx eax, al"], [73, "mov rdx, 0FF00000000000000h"], [74, "and rax, rdx"], [75, "or rcx, rax"], [76, "mov rdx, rcx"], [77, "mov rax, [rbp+var_18]"], [78, "mov [rax], rdx"], [79, "mov rax, [rbp+var_8]"], [80, "add rax, 8"], [81, "movzx eax, byte ptr [rax]"], [82, "movzx eax, al"], [83, "shl eax, 8"], [84, "mov edx, eax"], [85, "mov rax, [rbp+var_8]"], [86, "add rax, 9"], [87, "movzx eax, byte ptr [rax]"], [88, "movzx eax, al"], [89, "or eax, edx"], [90, "mov edx, eax"], [91, "mov rax, [rbp+var_18]"], [92, "mov [rax+18h], dx"], [93, "mov rax, [rbp+var_8]"], [94, "add rax, 0Ah"], [95, "movzx eax, byte ptr [rax]"], [96, "movzx eax, al"], [97, "shl eax, 8"], [98, "mov edx, eax"], [99, "mov rax, [rbp+var_8]"], [100, "add rax, 0Bh"], [101, "movzx eax, byte ptr [rax]"], [102, "movzx eax, al"], [103, "or eax, edx"], [104, "mov edx, eax"], [105, "mov rax, [rbp+var_18]"], [106, "mov [rax+8], dx"], [107, "mov eax, [rbp+var_C]"], [108, "cdqe"], [109, "lea rdx, [rax-2]"], [110, "mov rax, [rbp+var_8]"], [111, "add rax, rdx"], [112, "movzx eax, byte ptr [rax]"], [113, "movzx eax, al"], [114, "shl eax, 8"], [115, "mov ecx, eax"], [116, "mov eax, [rbp+var_C]"], [117, "cdqe"], [118, "lea rdx, [rax-1]"], [119, "mov rax, [rbp+var_8]"], [120, "add rax, rdx"], [121, "movzx eax, byte ptr [rax]"], [122, "movzx eax, al"], [123, "or eax, ecx"], [124, "mov edx, eax"], [125, "mov rax, [rbp+var_18]"], [126, "mov [rax+1Ah], dx"], [127, "mov rax, [rbp+var_8]"], [128, "add rax, 17h"], [129, "movzx eax, byte ptr [rax]"], [130, "movzx eax, al"], [131, "shl eax, 8"], [132, "mov edx, eax"], [133, "mov rax, [rbp+var_8]"], [134, "add rax, 18h"], [135, "movzx eax, byte ptr [rax]"], [136, "movzx eax, al"], [137, "or eax, edx"], [138, "mov edx, eax"], [139, "mov rax, [rbp+var_18]"], [140, "mov [rax+16h], dx"], [141, "mov rax, [rbp+var_8]"], [142, "movzx edx, byte ptr [rax+0Ch]"], [143, "mov rax, [rbp+var_18]"], [144, "mov [rax+10h], dl"], [145, "mov rax, [rbp+var_8]"], [146, "movzx edx, byte ptr [rax+0Dh]"], [147, "mov rax, [rbp+var_18]"], [148, "mov [rax+0Fh], dl"], [149, "mov rax, [rbp+var_8]"], [150, "movzx edx, byte ptr [rax+0Eh]"], [151, "mov rax, [rbp+var_18]"], [152, "mov [rax+0Bh], dl"], [153, "mov rax, [rbp+var_8]"], [154, "movzx edx, byte ptr [rax+0Fh]"], [155, "mov rax, [rbp+var_18]"], [156, "mov [rax+0Ah], dl"], [157, "mov rax, [rbp+var_8]"], [158, "movzx edx, byte ptr [rax+10h]"], [159, "mov rax, [rbp+var_18]"], [160, "mov [rax+0Eh], dl"], [161, "mov rax, [rbp+var_8]"], [162, "movzx edx, byte ptr [rax+11h]"], [163, "mov rax, [rbp+var_18]"], [164, "mov [rax+0Ch], dl"], [165, "mov rax, [rbp+var_8]"], [166, "movzx edx, byte ptr [rax+12h]"], [167, "mov rax, [rbp+var_18]"], [168, "mov [rax+0Dh], dl"], [169, "mov rax, [rbp+var_8]"], [170, "movzx edx, byte ptr [rax+13h]"], [171, "mov rax, [rbp+var_18]"], [172, "mov [rax+11h], dl"], [173, "mov rax, [rbp+var_8]"], [174, "movzx edx, byte ptr [rax+14h]"], [175, "mov rax, [rbp+var_18]"], [176, "mov [rax+12h], dl"], [177, "mov rax, [rbp+var_8]"], [178, "movzx edx, byte ptr [rax+15h]"], [179, "mov rax, [rbp+var_18]"], [180, "mov [rax+13h], dl"], [181, "mov rax, [rbp+var_8]"], [182, "movzx edx, byte ptr [rax+16h]"], [183, "mov rax, [rbp+var_18]"], [184, "mov [rax+14h], dl"], [185, "nop"], [186, "pop rbp"], [187, "retn"]], "data_dep": [[5, 2], [6, 5], [7, 6], [9, 8], [10, 7], [10, 9], [11, 10], [12, 2], [13, 12], [14, 13], [15, 14], [17, 16], [17, 15], [18, 17], [19, 11], [20, 19], [20, 18], [21, 2], [22, 21], [23, 22], [24, 23], [26, 25], [27, 24], [27, 26], [28, 27], [29, 20], [29, 28], [30, 29], [31, 2], [32, 31], [33, 32], [34, 33], [36, 35], [37, 34], [37, 36], [38, 37], [38, 30], [39, 38], [40, 2], [41, 40], [42, 41], [43, 42], [44, 43], [47, 44], [47, 46], [48, 47], [48, 39], [49, 48], [50, 2], [51, 50], [52, 51], [53, 52], [54, 53], [57, 54], [57, 56], [58, 49], [58, 57], [59, 2], [60, 59], [61, 60], [62, 61], [63, 62], [66, 63], [66, 65], [67, 58], [67, 66], [68, 67], [69, 2], [70, 69], [71, 70], [72, 71], [74, 73], [74, 72], [75, 74], [75, 68], [76, 75], [77, 4], [78, 77], [78, 76], [79, 2], [80, 79], [81, 78], [81, 80], [82, 81], [83, 82], [84, 83], [85, 2], [86, 85], [87, 86], [87, 78], [88, 87], [89, 88], [89, 84], [90, 89], [91, 4], [92, 90], [92, 91], [93, 2], [94, 93], [95, 92], [95, 94], [95, 78], [96, 95], [97, 96], [98, 97], [99, 2], [100, 99], [101, 92], [101, 78], [101, 100], [102, 101], [103, 102], [103, 98], [104, 103], [105, 4], [106, 104], [106, 105], [107, 3], [109, 104], [109, 106], [109, 107], [110, 2], [111, 110], [111, 109], [112, 111], [112, 106], [112, 78], [113, 112], [114, 113], [115, 114], [116, 3], [118, 106], [118, 116], [118, 109], [119, 2], [120, 119], [120, 118], [121, 78], [121, 120], [121, 106], [122, 121], [123, 122], [123, 115], [124, 123], [125, 4], [126, 125], [126, 124], [127, 2], [128, 127], [129, 128], [129, 126], [129, 78], [130, 129], [131, 130], [132, 131], [133, 2], [134, 133], [135, 126], [135, 78], [135, 134], [136, 135], [137, 132], [137, 136], [138, 137], [139, 4], [140, 139], [140, 138], [141, 2], [142, 141], [142, 140], [143, 4], [144, 143], [144, 142], [145, 2], [146, 145], [146, 144], [147, 4], [148, 147], [148, 146], [149, 2], [150, 148], [150, 149], [151, 4], [152, 151], [152, 150], [153, 2], [154, 153], [154, 148], [154, 152], [155, 4], [156, 154], [156, 155], [157, 2], [158, 156], [158, 144], [158, 157], [159, 4], [160, 158], [160, 159], [161, 2], [162, 161], [162, 160], [163, 4], [164, 162], [164, 163], [165, 2], [166, 165], [166, 164], [167, 4], [168, 166], [168, 167], [169, 2], [170, 169], [170, 168], [171, 4], [172, 170], [172, 171], [173, 2], [174, 173], [174, 172], [175, 4], [176, 175], [176, 174], [177, 2], [178, 177], [178, 176], [179, 4], [180, 179], [180, 178], [181, 2], [182, 140], [182, 181], [182, 180], [183, 4], [184, 182], [184, 183], [186, 0], [187, 183]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/9d261b39bd68b595bbd028d794f97db1aa43f9cd8f7db25dbbc76311cbb502dc_9d261b39bd68b595bbd028d794f97db1aa43f9cd8f7db25dbbc76311cbb502dc.jsonl.gz", "strip_func_name": "sub_401D67", "query": "\n\n\n__int64 __fastcall sub_401D67(__int64 a1, int a2, __int64 a3)\n{\n__int64 result; // rax\n\n*(_QWORD *)a3 = (*(unsigned __int8 *)(a1 + 5) << 16) & 0xFF0000000000LL | (*(unsigned __int8 *)(a1 + 4) << 24) & 0xFF00000000LL | *(unsigned __int8 *)(a1 + 3) | (*(unsigned __int8 *)(a1 + 6) << 8) & 0xFF000000000000LL;\n*(_WORD *)(a3 + 24) = _byteswap_ushort(*(_WORD *)(a1 + 8));\n*(_WORD *)(a3 + 8) = _byteswap_ushort(*(_WORD *)(a1 + 10));\n*(_WORD *)(a3 + 26) = (*(unsigned __int8 *)(a2 - 2LL + a1) << 8) | *(unsigned __int8 *)(a2 - 1LL + a1);\n*(_WORD *)(a3 + 22) = _byteswap_ushort(*(_WORD *)(a1 + 23));\n*(_BYTE *)(a3 + 16) = *(_BYTE *)(a1 + 12);\n*(_BYTE *)(a3 + 15) = *(_BYTE *)(a1 + 13);\n*(_BYTE *)(a3 + 11) = *(_BYTE *)(a1 + 14);\n*(_BYTE *)(a3 + 10) = *(_BYTE *)(a1 + 15);\n*(_BYTE *)(a3 + 14) = *(_BYTE *)(a1 + 16);\n*(_BYTE *)(a3 + 12) = *(_BYTE *)(a1 + 17);\n*(_BYTE *)(a3 + 13) = *(_BYTE *)(a1 + 18);\n*(_BYTE *)(a3 + 17) = *(_BYTE *)(a1 + 19);\n*(_BYTE *)(a3 + 18) = *(_BYTE *)(a1 + 20);\n*(_BYTE *)(a3 + 19) = *(_BYTE *)(a1 + 21);\nresult = a3;\n*(_BYTE *)(a3 + 20) = *(_BYTE *)(a1 + 22);\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_401D67,]", "hints": "[]", "response": "{'a3': 'csi_status', 'a1': 'buf_addr', 'a2': 'cnt', 'sub_401D67': 'record_status'}"}
[ [ 0.7641913294792175, 0.7485198974609375, 0.7466469407081604, 0.7415874600410461, 0.7247537970542908, 0.718528151512146, 0.7161682844161987, 0.7154273390769958, 0.7120859622955322, 0.7106509208679199, 0.706360936164856, 0.7024151086807251, 0.6990143060684204, 0.698430061340332, 0.6978408098220825, 0.697250247001648, 0.6968027353286743, 0.6966421604156494, 0.6940160393714905, 0.6927832961082458 ], [ 78745, 104527, 206463, 8486, 77866, 13281, 150587, 121025, 29142, 118185, 177424, 15940, 253916, 246486, 44474, 164032, 118910, 253151, 641, 217683 ] ]
get_table_entry
1554f86f8347baa2816a71a85d32df365c39ef53e3f986978050042e8abaac16
widora
u-boot-mt7688
NA
static int get_table_entry (table_entry_t *table, char *msg, char *name) { table_entry_t *t; int first = 1; for (t=table; t->val>=0; ++t) { if (t->sname && strcasecmp(t->sname, name)==0) return (t->val); } fprintf (stderr, "\nInvalid %s Type - valid names are", msg); for (t=table; t->val>=0; ++t) { if (t->sname == NULL) continue; fprintf (stderr, "%c %s", (first) ? ':' : ',', t->sname); first = 0; } fprintf (stderr, "\n"); return (-1); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402D10", "function_addr": 4205840, "binary_name": "1554f86f8347baa2816a71a85d32df365c39ef53e3f986978050042e8abaac16.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+s2], rdx"], [6, "mov [rbp+var_C], 1"], [7, "mov rax, [rbp+var_18]"], [8, "mov [rbp+var_8], rax"], [9, "jmp short loc_402D6D"], [10, "mov rax, [rbp+var_8]"], [11, "mov rax, [rax+8]"], [12, "test rax, rax"], [13, "jz short loc_402D68"], [14, "mov rax, [rbp+var_8]"], [15, "mov rax, [rax+8]"], [16, "mov rdx, [rbp+s2]"], [17, "mov rsi, rdx"], [18, "mov rdi, rax"], [19, "call _strcasecmp"], [20, "test eax, eax"], [21, "jnz short loc_402D68"], [22, "mov rax, [rbp+var_8]"], [23, "mov eax, [rax]"], [24, "jmp locret_402E15"], [25, "add [rbp+var_8], 18h"], [26, "mov rax, [rbp+var_8]"], [27, "mov eax, [rax]"], [28, "test eax, eax"], [29, "jns short loc_402D35"], [30, "mov rax, cs:stderr"], [31, "mov rdx, [rbp+var_20]"], [32, "mov esi, offset aInvalidSTypeVa"], [33, "mov rdi, rax"], [34, "mov eax, 0"], [35, "call _fprintf"], [36, "mov rax, [rbp+var_18]"], [37, "mov [rbp+var_8], rax"], [38, "jmp short loc_402DF2"], [39, "mov rax, [rbp+var_8]"], [40, "mov rax, [rax+8]"], [41, "test rax, rax"], [42, "jz short loc_402DEC"], [43, "mov rax, [rbp+var_8]"], [44, "mov rdx, [rax+8]"], [45, "cmp [rbp+var_C], 0"], [46, "jz short loc_402DC0"], [47, "mov esi, 3Ah "], [48, "jmp short loc_402DC5"], [49, "mov esi, 2Ch "], [50, "mov rax, cs:stderr"], [51, "mov rcx, rdx"], [52, "mov edx, esi"], [53, "mov esi, offset aCS"], [54, "mov rdi, rax"], [55, "mov eax, 0"], [56, "call _fprintf"], [57, "mov [rbp+var_C], 0"], [58, "jmp short loc_402DED"], [59, "nop"], [60, "add [rbp+var_8], 18h"], [61, "mov rax, [rbp+var_8]"], [62, "mov eax, [rax]"], [63, "test eax, eax"], [64, "jns short loc_402D9E"], [65, "mov rax, cs:stderr"], [66, "mov rsi, rax"], [67, "mov edi, 0Ah"], [68, "call _fputc"], [69, "mov eax, 0FFFFFFFFh"], [70, "leave"], [71, "retn"]], "data_dep": [[7, 3], [8, 7], [10, 8], [10, 25], [11, 10], [12, 11], [13, 12], [14, 25], [14, 8], [15, 14], [16, 5], [17, 16], [18, 15], [20, 19], [21, 20], [22, 8], [22, 25], [23, 22], [25, 25], [25, 8], [26, 8], [26, 25], [27, 26], [28, 27], [29, 28], [31, 4], [33, 30], [36, 3], [37, 36], [39, 60], [39, 37], [40, 39], [41, 40], [42, 41], [43, 37], [43, 60], [44, 43], [45, 6], [45, 57], [46, 45], [51, 44], [52, 49], [52, 47], [54, 50], [60, 37], [60, 60], [61, 60], [61, 37], [62, 61], [63, 62], [64, 63], [66, 65], [71, 23], [71, 69]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/1554f86f8347baa2816a71a85d32df365c39ef53e3f986978050042e8abaac16_1554f86f8347baa2816a71a85d32df365c39ef53e3f986978050042e8abaac16.jsonl.gz", "strip_func_name": "sub_402D10", "query": "\n\n\n__int64 __fastcall sub_402D10(const char **a1, const char *a2, const char *a3)\n{\nunsigned int v4; // esi\nint v6; // [rsp+24h] [rbp-Ch]\nconst char **i; // [rsp+28h] [rbp-8h]\nconst char **j; // [rsp+28h] [rbp-8h]\n\nv6 = 1;\nfor ( i = a1; *(int *)i >= 0; i += 3 )\n{\nif ( i[1] && !strcasecmp(i[1], a3) )\nreturn *(unsigned int *)i;\n}\nfprintf(stderr, \"\\nInvalid %s Type - valid names are\", a2);\nfor ( j = a1; *(int *)j >= 0; j += 3 )\n{\nif ( j[1] )\n{\nif ( v6 )\nv4 = 58;\nelse\nv4 = 44;\nfprintf(stderr, \"%c %s\", v4, j[1]);\nv6 = 0;\n}\n}\nfputc(10, stderr);\nreturn 0xFFFFFFFFLL;\n}\n\n\n\nQ:[a3,a1,a2,v6,i,sub_402D10,]", "hints": "[]", "response": "{'a3': 'name', 'a1': 'table', 'a2': 'msg', 'v6': 'first', 'i': 'ta', 'sub_402D10': 'get_table_entry'}"}
[ [ 0.8146896362304688, 0.7517926692962646, 0.7406374216079712, 0.7250605821609497, 0.7028225660324097, 0.6967586874961853, 0.6890870332717896, 0.6869437098503113, 0.6802422404289246, 0.6788874864578247, 0.6768937706947327, 0.6768659949302673, 0.6768091917037964, 0.6762745976448059, 0.6753040552139282, 0.6730848550796509, 0.672971248626709, 0.6725539565086365, 0.6709043979644775, 0.670750617980957 ], [ 117152, 257998, 223765, 181776, 179968, 123589, 35065, 97919, 250125, 216004, 232268, 148193, 137055, 90659, 111266, 167122, 126097, 13735, 95189, 246104 ] ]
SHA384_512PadMessage
74162c74ed1dbe2d7ce02099834e466bf6c4f9771f3a94dd4c17471359c13ad0
jech
babeld
NA
static void SHA384_512PadMessage(SHA512Context *context, uint8_t Pad_Byte) { /* * Check to see if the current message block is too small to hold * the initial padding bits and length. If so, we will pad the * block, process it, and then continue padding into a second * block. */ if (context->Message_Block_Index >= (SHA512_Message_Block_Size-16)) { context->Message_Block[context->Message_Block_Index++] = Pad_Byte; while (context->Message_Block_Index < SHA512_Message_Block_Size) context->Message_Block[context->Message_Block_Index++] = 0; SHA384_512ProcessMessageBlock(context); } else context->Message_Block[context->Message_Block_Index++] = Pad_Byte; while (context->Message_Block_Index < (SHA512_Message_Block_Size-16)) context->Message_Block[context->Message_Block_Index++] = 0; /* * Store the message length as the last 16 octets */ #ifdef USE_32BIT_ONLY context->Message_Block[112] = (uint8_t)(context->Length[0] >> 24); context->Message_Block[113] = (uint8_t)(context->Length[0] >> 16); context->Message_Block[114] = (uint8_t)(context->Length[0] >> 8); context->Message_Block[115] = (uint8_t)(context->Length[0]); context->Message_Block[116] = (uint8_t)(context->Length[1] >> 24); context->Message_Block[117] = (uint8_t)(context->Length[1] >> 16); context->Message_Block[118] = (uint8_t)(context->Length[1] >> 8); context->Message_Block[119] = (uint8_t)(context->Length[1]); context->Message_Block[120] = (uint8_t)(context->Length[2] >> 24); context->Message_Block[121] = (uint8_t)(context->Length[2] >> 16); context->Message_Block[122] = (uint8_t)(context->Length[2] >> 8); context->Message_Block[123] = (uint8_t)(context->Length[2]); context->Message_Block[124] = (uint8_t)(context->Length[3] >> 24); context->Message_Block[125] = (uint8_t)(context->Length[3] >> 16); context->Message_Block[126] = (uint8_t)(context->Length[3] >> 8); context->Message_Block[127] = (uint8_t)(context->Length[3]); #else /* !USE_32BIT_ONLY */ context->Message_Block[112] = (uint8_t)(context->Length_High >> 56); context->Message_Block[113] = (uint8_t)(context->Length_High >> 48); context->Message_Block[114] = (uint8_t)(context->Length_High >> 40); context->Message_Block[115] = (uint8_t)(context->Length_High >> 32); context->Message_Block[116] = (uint8_t)(context->Length_High >> 24); context->Message_Block[117] = (uint8_t)(context->Length_High >> 16); context->Message_Block[118] = (uint8_t)(context->Length_High >> 8); context->Message_Block[119] = (uint8_t)(context->Length_High); context->Message_Block[120] = (uint8_t)(context->Length_Low >> 56); context->Message_Block[121] = (uint8_t)(context->Length_Low >> 48); context->Message_Block[122] = (uint8_t)(context->Length_Low >> 40); context->Message_Block[123] = (uint8_t)(context->Length_Low >> 32); context->Message_Block[124] = (uint8_t)(context->Length_Low >> 24); context->Message_Block[125] = (uint8_t)(context->Length_Low >> 16); context->Message_Block[126] = (uint8_t)(context->Length_Low >> 8); context->Message_Block[127] = (uint8_t)(context->Length_Low); #endif /* USE_32BIT_ONLY */ SHA384_512ProcessMessageBlock(context); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403ACC", "function_addr": 4209356, "binary_name": "74162c74ed1dbe2d7ce02099834e466bf6c4f9771f3a94dd4c17471359c13ad0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov eax, esi"], [5, "mov [rbp+var_C], al"], [6, "mov rax, [rbp+var_8]"], [7, "movzx eax, word ptr [rax+50h]"], [8, "cmp ax, 6Fh "], [9, "jle short loc_403B52"], [10, "mov rax, [rbp+var_8]"], [11, "movzx eax, word ptr [rax+50h]"], [12, "mov edx, eax"], [13, "add edx, 1"], [14, "mov ecx, edx"], [15, "mov rdx, [rbp+var_8]"], [16, "mov [rdx+50h], cx"], [17, "cwde"], [18, "mov rdx, [rbp+var_8]"], [19, "cdqe"], [20, "movzx ecx, [rbp+var_C]"], [21, "mov [rdx+rax+52h], cl"], [22, "jmp short loc_403B36"], [23, "mov rax, [rbp+var_8]"], [24, "movzx eax, word ptr [rax+50h]"], [25, "mov edx, eax"], [26, "add edx, 1"], [27, "mov ecx, edx"], [28, "mov rdx, [rbp+var_8]"], [29, "mov [rdx+50h], cx"], [30, "cwde"], [31, "mov rdx, [rbp+var_8]"], [32, "cdqe"], [33, "mov byte ptr [rdx+rax+52h], 0"], [34, "mov rax, [rbp+var_8]"], [35, "movzx eax, word ptr [rax+50h]"], [36, "cmp ax, 7Fh"], [37, "jle short loc_403B13"], [38, "mov rax, [rbp+var_8]"], [39, "mov rdi, rax"], [40, "call sub_4035C7"], [41, "jmp short loc_403B9D"], [42, "mov rax, [rbp+var_8]"], [43, "movzx eax, word ptr [rax+50h]"], [44, "mov edx, eax"], [45, "add edx, 1"], [46, "mov ecx, edx"], [47, "mov rdx, [rbp+var_8]"], [48, "mov [rdx+50h], cx"], [49, "cwde"], [50, "mov rdx, [rbp+var_8]"], [51, "cdqe"], [52, "movzx ecx, [rbp+var_C]"], [53, "mov [rdx+rax+52h], cl"], [54, "jmp short loc_403B9D"], [55, "mov rax, [rbp+var_8]"], [56, "movzx eax, word ptr [rax+50h]"], [57, "mov edx, eax"], [58, "add edx, 1"], [59, "mov ecx, edx"], [60, "mov rdx, [rbp+var_8]"], [61, "mov [rdx+50h], cx"], [62, "cwde"], [63, "mov rdx, [rbp+var_8]"], [64, "cdqe"], [65, "mov byte ptr [rdx+rax+52h], 0"], [66, "mov rax, [rbp+var_8]"], [67, "movzx eax, word ptr [rax+50h]"], [68, "cmp ax, 6Fh "], [69, "jle short loc_403B7A"], [70, "mov rax, [rbp+var_8]"], [71, "mov rax, [rax+40h]"], [72, "shr rax, 38h"], [73, "mov edx, eax"], [74, "mov rax, [rbp+var_8]"], [75, "mov [rax+0C2h], dl"], [76, "mov rax, [rbp+var_8]"], [77, "mov rax, [rax+40h]"], [78, "shr rax, 30h"], [79, "mov edx, eax"], [80, "mov rax, [rbp+var_8]"], [81, "mov [rax+0C3h], dl"], [82, "mov rax, [rbp+var_8]"], [83, "mov rax, [rax+40h]"], [84, "shr rax, 28h"], [85, "mov edx, eax"], [86, "mov rax, [rbp+var_8]"], [87, "mov [rax+0C4h], dl"], [88, "mov rax, [rbp+var_8]"], [89, "mov rax, [rax+40h]"], [90, "shr rax, 20h"], [91, "mov edx, eax"], [92, "mov rax, [rbp+var_8]"], [93, "mov [rax+0C5h], dl"], [94, "mov rax, [rbp+var_8]"], [95, "mov rax, [rax+40h]"], [96, "shr rax, 18h"], [97, "mov edx, eax"], [98, "mov rax, [rbp+var_8]"], [99, "mov [rax+0C6h], dl"], [100, "mov rax, [rbp+var_8]"], [101, "mov rax, [rax+40h]"], [102, "shr rax, 10h"], [103, "mov edx, eax"], [104, "mov rax, [rbp+var_8]"], [105, "mov [rax+0C7h], dl"], [106, "mov rax, [rbp+var_8]"], [107, "mov rax, [rax+40h]"], [108, "shr rax, 8"], [109, "mov edx, eax"], [110, "mov rax, [rbp+var_8]"], [111, "mov [rax+0C8h], dl"], [112, "mov rax, [rbp+var_8]"], [113, "mov rax, [rax+40h]"], [114, "mov edx, eax"], [115, "mov rax, [rbp+var_8]"], [116, "mov [rax+0C9h], dl"], [117, "mov rax, [rbp+var_8]"], [118, "mov rax, [rax+48h]"], [119, "shr rax, 38h"], [120, "mov edx, eax"], [121, "mov rax, [rbp+var_8]"], [122, "mov [rax+0CAh], dl"], [123, "mov rax, [rbp+var_8]"], [124, "mov rax, [rax+48h]"], [125, "shr rax, 30h"], [126, "mov edx, eax"], [127, "mov rax, [rbp+var_8]"], [128, "mov [rax+0CBh], dl"], [129, "mov rax, [rbp+var_8]"], [130, "mov rax, [rax+48h]"], [131, "shr rax, 28h"], [132, "mov edx, eax"], [133, "mov rax, [rbp+var_8]"], [134, "mov [rax+0CCh], dl"], [135, "mov rax, [rbp+var_8]"], [136, "mov rax, [rax+48h]"], [137, "shr rax, 20h"], [138, "mov edx, eax"], [139, "mov rax, [rbp+var_8]"], [140, "mov [rax+0CDh], dl"], [141, "mov rax, [rbp+var_8]"], [142, "mov rax, [rax+48h]"], [143, "shr rax, 18h"], [144, "mov edx, eax"], [145, "mov rax, [rbp+var_8]"], [146, "mov [rax+0CEh], dl"], [147, "mov rax, [rbp+var_8]"], [148, "mov rax, [rax+48h]"], [149, "shr rax, 10h"], [150, "mov edx, eax"], [151, "mov rax, [rbp+var_8]"], [152, "mov [rax+0CFh], dl"], [153, "mov rax, [rbp+var_8]"], [154, "mov rax, [rax+48h]"], [155, "shr rax, 8"], [156, "mov edx, eax"], [157, "mov rax, [rbp+var_8]"], [158, "mov [rax+0D0h], dl"], [159, "mov rax, [rbp+var_8]"], [160, "mov rax, [rax+48h]"], [161, "mov edx, eax"], [162, "mov rax, [rbp+var_8]"], [163, "mov [rax+0D1h], dl"], [164, "mov rax, [rbp+var_8]"], [165, "mov rdi, rax"], [166, "call sub_4035C7"], [167, "nop"], [168, "leave"], [169, "retn"]], "data_dep": [[5, 4], [6, 3], [7, 6], [8, 7], [9, 8], [10, 3], [11, 10], [12, 11], [13, 12], [14, 13], [15, 3], [16, 15], [16, 14], [18, 3], [20, 5], [21, 11], [21, 20], [23, 3], [24, 33], [24, 21], [24, 23], [24, 16], [24, 29], [25, 24], [26, 25], [27, 26], [28, 3], [29, 27], [29, 28], [31, 3], [33, 24], [34, 3], [35, 33], [35, 21], [35, 16], [35, 34], [35, 29], [36, 35], [37, 36], [38, 3], [39, 38], [42, 3], [43, 42], [44, 43], [45, 44], [46, 45], [47, 3], [48, 47], [48, 46], [50, 3], [52, 5], [53, 43], [53, 52], [55, 3], [56, 21], [56, 53], [56, 16], [56, 55], [56, 48], [56, 61], [56, 29], [56, 65], [56, 33], [57, 56], [58, 57], [59, 58], [60, 3], [61, 60], [61, 59], [63, 3], [65, 56], [66, 3], [67, 61], [67, 29], [67, 65], [67, 33], [67, 21], [67, 53], [67, 16], [67, 48], [67, 66], [68, 67], [69, 68], [70, 3], [71, 29], [71, 93], [71, 111], [71, 122], [71, 33], [71, 152], [71, 81], [71, 99], [71, 163], [71, 65], [71, 21], [71, 140], [71, 158], [71, 87], [71, 53], [71, 16], [71, 128], [71, 146], [71, 48], [71, 75], [71, 105], [71, 116], [71, 61], [71, 70], [71, 134], [72, 71], [73, 72], [74, 3], [75, 74], [75, 73], [76, 3], [77, 76], [77, 75], [78, 77], [79, 78], [80, 3], [81, 80], [81, 79], [82, 3], [83, 82], [83, 81], [84, 83], [85, 84], [86, 3], [87, 86], [87, 85], [88, 3], [89, 88], [89, 87], [90, 89], [91, 90], [92, 3], [93, 92], [93, 91], [94, 3], [95, 93], [95, 94], [96, 95], [97, 96], [98, 3], [99, 97], [99, 98], [100, 3], [101, 99], [101, 100], [102, 101], [103, 102], [104, 3], [105, 104], [105, 103], [106, 3], [107, 106], [107, 105], [108, 107], [109, 108], [110, 3], [111, 110], [111, 109], [112, 3], [113, 112], [113, 111], [114, 113], [115, 3], [116, 115], [116, 114], [117, 3], [118, 117], [118, 116], [119, 118], [120, 119], [121, 3], [122, 121], [122, 120], [123, 3], [124, 122], [124, 123], [125, 124], [126, 125], [127, 3], [128, 126], [128, 127], [129, 3], [130, 128], [130, 129], [131, 130], [132, 131], [133, 3], [134, 133], [134, 132], [135, 3], [136, 135], [136, 134], [137, 136], [138, 137], [139, 3], [140, 139], [140, 138], [141, 3], [142, 141], [142, 140], [143, 142], [144, 143], [145, 3], [146, 145], [146, 144], [147, 3], [148, 147], [148, 146], [149, 148], [150, 149], [151, 3], [152, 151], [152, 150], [153, 3], [154, 153], [154, 152], [155, 154], [156, 155], [157, 3], [158, 156], [158, 157], [159, 3], [160, 158], [160, 159], [161, 160], [162, 3], [163, 161], [163, 162], [164, 3], [165, 164], [169, 166]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/74162c74ed1dbe2d7ce02099834e466bf6c4f9771f3a94dd4c17471359c13ad0_74162c74ed1dbe2d7ce02099834e466bf6c4f9771f3a94dd4c17471359c13ad0.jsonl.gz", "strip_func_name": "sub_403ACC", "query": "\n\n\n__int64 __fastcall sub_403ACC(__int64 a1, char a2)\n{\n__int16 v2; // ax\n__int16 v3; // ax\n__int16 v4; // ax\n__int16 v5; // ax\n\nif ( *(__int16 *)(a1 + 80) <= 111 )\n{\nv4 = *(_WORD *)(a1 + 80);\n*(_WORD *)(a1 + 80) = v4 + 1;\n*(_BYTE *)(a1 + v4 + 82) = a2;\n}\nelse\n{\nv2 = *(_WORD *)(a1 + 80);\n*(_WORD *)(a1 + 80) = v2 + 1;\n*(_BYTE *)(a1 + v2 + 82) = a2;\nwhile ( *(__int16 *)(a1 + 80) <= 127 )\n{\nv3 = *(_WORD *)(a1 + 80);\n*(_WORD *)(a1 + 80) = v3 + 1;\n*(_BYTE *)(a1 + v3 + 82) = 0;\n}\nsub_4035C7(a1);\n}\nwhile ( *(__int16 *)(a1 + 80) <= 111 )\n{\nv5 = *(_WORD *)(a1 + 80);\n*(_WORD *)(a1 + 80) = v5 + 1;\n*(_BYTE *)(a1 + v5 + 82) = 0;\n}\n*(_BYTE *)(a1 + 194) = HIBYTE(*(_QWORD *)(a1 + 64));\n*(_BYTE *)(a1 + 195) = BYTE6(*(_QWORD *)(a1 + 64));\n*(_BYTE *)(a1 + 196) = (unsigned __int16)WORD2(*(_QWORD *)(a1 + 64)) >> 8;\n*(_BYTE *)(a1 + 197) = BYTE4(*(_QWORD *)(a1 + 64));\n*(_BYTE *)(a1 + 198) = BYTE3(*(_QWORD *)(a1 + 64));\n*(_BYTE *)(a1 + 199) = BYTE2(*(_QWORD *)(a1 + 64));\n*(_BYTE *)(a1 + 200) = BYTE1(*(_QWORD *)(a1 + 64));\n*(_BYTE *)(a1 + 201) = *(_QWORD *)(a1 + 64);\n*(_BYTE *)(a1 + 202) = HIBYTE(*(_QWORD *)(a1 + 72));\n*(_BYTE *)(a1 + 203) = BYTE6(*(_QWORD *)(a1 + 72));\n*(_BYTE *)(a1 + 204) = (unsigned __int16)WORD2(*(_QWORD *)(a1 + 72)) >> 8;\n*(_BYTE *)(a1 + 205) = BYTE4(*(_QWORD *)(a1 + 72));\n*(_BYTE *)(a1 + 206) = BYTE3(*(_QWORD *)(a1 + 72));\n*(_BYTE *)(a1 + 207) = BYTE2(*(_QWORD *)(a1 + 72));\n*(_BYTE *)(a1 + 208) = BYTE1(*(_QWORD *)(a1 + 72));\n*(_BYTE *)(a1 + 209) = *(_QWORD *)(a1 + 72);\nreturn sub_4035C7(a1);\n}\n\n\n\nQ:[a1,a2,sub_403ACC,sub_4035C7,]", "hints": "[]", "response": "{'a1': 'context', 'a2': 'Pad_Byte', 'sub_403ACC': 'SHA384_512PadMessage', 'sub_4035C7': 'SHA384_512ProcessMessageBlock'}"}
[ [ 0.838630735874176, 0.8372746109962463, 0.8330338597297668, 0.7943530082702637, 0.783875048160553, 0.7729981541633606, 0.7696045637130737, 0.7691023349761963, 0.7689460515975952, 0.7640859484672546, 0.7639368772506714, 0.7630030512809753, 0.7586327791213989, 0.7509520053863525, 0.7481285333633423, 0.748078465461731, 0.7436922192573547, 0.7429249882698059, 0.7413437366485596, 0.7388882040977478 ], [ 233355, 230321, 48098, 19763, 254905, 11087, 25212, 235533, 236674, 154623, 233234, 227980, 62853, 167564, 69772, 3600, 156875, 214496, 158532, 80554 ] ]
htu21d_read_humidity
1a06f9077a2966c5357b2b2d2a32724643173e01b1d4a4bf2abf78fde9f7cea0
hepingood
htu21d
NA
uint8_t htu21d_read_humidity(htu21d_handle_t *handle, uint16_t *humidity_raw, float *humidity_s) { uint8_t res; uint8_t buf[3]; uint8_t status; uint16_t data; if (handle == NULL) /* check handle */ { return 2; /* return error */ } if (handle->inited != 1) /* check handle initialization */ { return 3; /* return error */ } if (handle->mode == HTU21D_MODE_HOLD_MASTER) /* hold master mode */ { res = a_htu21d_read(handle, HTU21D_MODE_HOLD_MASTER, HTU21D_COMMAND_TRIG_HUMI_HOLD_MASTER, buf, 3); /* read humidity */ if (res != 0) /* check the result */ { handle->debug_print("htu21d: read failed.\n"); /* read failed */ return 1; /* return error */ } data = ((uint16_t)buf[0] << 8) | buf[1]; /* get the raw data */ if (a_htu21d_crc(data, buf[2]) != 0) /* check the crc */ { handle->debug_print("htu21d: crc is error.\n"); /* crc is error */ return 4; /* return error */ } status = data & 0x3; /* get the status */ if (status != 0x02) /* check the status */ { handle->debug_print("htu21d: status is error.\n"); /* status is error */ return 5; /* return error */ } *humidity_raw = data; /* copy data */ } else /* no hold master mode */ { uint8_t cmd; cmd = HTU21D_COMMAND_TRIG_HUMI_NO_HOLD_MASTER; /* read humidity */ res = a_htu21d_write_cmd(handle, &cmd, 1); /* write the command */ if (res != 0) /* check the result */ { handle->debug_print("htu21d: write cmd failed.\n"); /* write cmd failed */ return 1; /* return error */ } if (handle->resolution == HTU21D_RESOLUTION_TEMP_11_BITS_RH_11_BITS) /* temp 11 bits and rh 11 bits */ { handle->delay_ms(7); /* delay 7 ms */ } else if (handle->resolution == HTU21D_RESOLUTION_TEMP_12_BITS_RH_8_BITS) /* temp 12 bits and rh 8 bits */ { handle->delay_ms(13); /* delay 13 ms */ } else if (handle->resolution == HTU21D_RESOLUTION_TEMP_13_BITS_RH_10_BITS) /* temp 13 bits and rh 10 bits */ { handle->delay_ms(25); /* delay 25 ms */ } else /* temp 14 bits and rh 12 bits */ { handle->delay_ms(50); /* delay 50 ms */ } res = a_htu21d_read_cmd(handle, buf, 3); if (res != 0) /* check the result */ { handle->debug_print("htu21d: read cmd failed.\n"); /* read cmd failed */ return 1; /* return error */ } data = ((uint16_t)buf[0] << 8) | buf[1]; /* get the raw data */ if (a_htu21d_crc(data, buf[2]) != 0) /* check the crc */ { handle->debug_print("htu21d: crc is error.\n"); /* crc is error */ return 4; /* return error */ } status = data & 0x3; /* get the status */ if (status != 0x02) /* check the status */ { handle->debug_print("htu21d: status is error.\n"); /* status is error */ return 5; /* return error */ } *humidity_raw = data; /* copy data */ } *humidity_s = (float)(*humidity_raw) / 65536.0f * 125.0f - 6.0f; /* convert raw humidity */ return 0; /* success return 0 */ }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401D0D", "function_addr": 4201741, "binary_name": "1a06f9077a2966c5357b2b2d2a32724643173e01b1d4a4bf2abf78fde9f7cea0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "cmp [rbp+var_18], 0"], [7, "jnz short loc_401D32"], [8, "mov eax, 2"], [9, "jmp locret_401FDF"], [10, "mov rax, [rbp+var_18]"], [11, "movzx eax, byte ptr [rax+4Ah]"], [12, "cmp al, 1"], [13, "jz short loc_401D48"], [14, "mov eax, 3"], [15, "jmp locret_401FDF"], [16, "mov rax, [rbp+var_18]"], [17, "movzx eax, byte ptr [rax+48h]"], [18, "test al, al"], [19, "jnz loc_401E2F"], [20, "lea rdx, [rbp+var_8]"], [21, "mov rax, [rbp+var_18]"], [22, "mov r8d, 3"], [23, "mov rcx, rdx"], [24, "mov edx, 0E5h"], [25, "mov esi, 0"], [26, "mov rdi, rax"], [27, "call sub_4012D1"], [28, "mov [rbp+var_1], al"], [29, "cmp [rbp+var_1], 0"], [30, "jz short loc_401DA2"], [31, "mov rax, [rbp+var_18]"], [32, "mov rdx, [rax+40h]"], [33, "mov edi, offset aHtu21dReadFail"], [34, "mov eax, 0"], [35, "call rdx"], [36, "mov eax, 1"], [37, "jmp locret_401FDF"], [38, "movzx eax, [rbp+var_8]"], [39, "movzx eax, al"], [40, "shl eax, 8"], [41, "mov edx, eax"], [42, "movzx eax, [rbp+var_7]"], [43, "movzx eax, al"], [44, "or eax, edx"], [45, "mov [rbp+var_4], ax"], [46, "movzx eax, [rbp+var_6]"], [47, "movzx edx, al"], [48, "movzx eax, [rbp+var_4]"], [49, "mov esi, edx"], [50, "mov edi, eax"], [51, "call sub_401356"], [52, "test al, al"], [53, "jz short loc_401DF1"], [54, "mov rax, [rbp+var_18]"], [55, "mov rdx, [rax+40h]"], [56, "mov edi, offset aHtu21dCrcIsErr"], [57, "mov eax, 0"], [58, "call rdx"], [59, "mov eax, 4"], [60, "jmp locret_401FDF"], [61, "movzx eax, [rbp+var_4]"], [62, "and eax, 3"], [63, "mov [rbp+var_5], al"], [64, "cmp [rbp+var_5], 2"], [65, "jz short loc_401E1F"], [66, "mov rax, [rbp+var_18]"], [67, "mov rdx, [rax+40h]"], [68, "mov edi, offset aHtu21dStatusIs"], [69, "mov eax, 0"], [70, "call rdx"], [71, "mov eax, 5"], [72, "jmp locret_401FDF"], [73, "mov rax, [rbp+var_20]"], [74, "movzx edx, [rbp+var_4]"], [75, "mov [rax], dx"], [76, "jmp loc_401F99"], [77, "mov [rbp+var_9], 0F5h"], [78, "lea rcx, [rbp+var_9]"], [79, "mov rax, [rbp+var_18]"], [80, "mov edx, 1"], [81, "mov rsi, rcx"], [82, "mov rdi, rax"], [83, "call sub_401202"], [84, "mov [rbp+var_1], al"], [85, "cmp [rbp+var_1], 0"], [86, "jz short loc_401E72"], [87, "mov rax, [rbp+var_18]"], [88, "mov rdx, [rax+40h]"], [89, "mov edi, offset aHtu21dWriteCmd"], [90, "mov eax, 0"], [91, "call rdx"], [92, "mov eax, 1"], [93, "jmp locret_401FDF"], [94, "mov rax, [rbp+var_18]"], [95, "movzx eax, byte ptr [rax+49h]"], [96, "cmp al, 3"], [97, "jnz short loc_401E8F"], [98, "mov rax, [rbp+var_18]"], [99, "mov rax, [rax+38h]"], [100, "mov edi, 7"], [101, "call rax"], [102, "jmp short loc_401ED8"], [103, "mov rax, [rbp+var_18]"], [104, "movzx eax, byte ptr [rax+49h]"], [105, "cmp al, 1"], [106, "jnz short loc_401EAC"], [107, "mov rax, [rbp+var_18]"], [108, "mov rax, [rax+38h]"], [109, "mov edi, 0Dh"], [110, "call rax"], [111, "jmp short loc_401ED8"], [112, "mov rax, [rbp+var_18]"], [113, "movzx eax, byte ptr [rax+49h]"], [114, "cmp al, 2"], [115, "jnz short loc_401EC9"], [116, "mov rax, [rbp+var_18]"], [117, "mov rax, [rax+38h]"], [118, "mov edi, 19h"], [119, "call rax"], [120, "jmp short loc_401ED8"], [121, "mov rax, [rbp+var_18]"], [122, "mov rax, [rax+38h]"], [123, "mov edi, 32h "], [124, "call rax"], [125, "lea rcx, [rbp+var_8]"], [126, "mov rax, [rbp+var_18]"], [127, "mov edx, 3"], [128, "mov rsi, rcx"], [129, "mov rdi, rax"], [130, "call sub_401244"], [131, "mov [rbp+var_1], al"], [132, "cmp [rbp+var_1], 0"], [133, "jz short loc_401F17"], [134, "mov rax, [rbp+var_18]"], [135, "mov rdx, [rax+40h]"], [136, "mov edi, offset aHtu21dReadCmdF"], [137, "mov eax, 0"], [138, "call rdx"], [139, "mov eax, 1"], [140, "jmp locret_401FDF"], [141, "movzx eax, [rbp+var_8]"], [142, "movzx eax, al"], [143, "shl eax, 8"], [144, "mov edx, eax"], [145, "movzx eax, [rbp+var_7]"], [146, "movzx eax, al"], [147, "or eax, edx"], [148, "mov [rbp+var_4], ax"], [149, "movzx eax, [rbp+var_6]"], [150, "movzx edx, al"], [151, "movzx eax, [rbp+var_4]"], [152, "mov esi, edx"], [153, "mov edi, eax"], [154, "call sub_401356"], [155, "test al, al"], [156, "jz short loc_401F63"], [157, "mov rax, [rbp+var_18]"], [158, "mov rdx, [rax+40h]"], [159, "mov edi, offset aHtu21dCrcIsErr"], [160, "mov eax, 0"], [161, "call rdx"], [162, "mov eax, 4"], [163, "jmp short locret_401FDF"], [164, "movzx eax, [rbp+var_4]"], [165, "and eax, 3"], [166, "mov [rbp+var_5], al"], [167, "cmp [rbp+var_5], 2"], [168, "jz short loc_401F8E"], [169, "mov rax, [rbp+var_18]"], [170, "mov rdx, [rax+40h]"], [171, "mov edi, offset aHtu21dStatusIs"], [172, "mov eax, 0"], [173, "call rdx"], [174, "mov eax, 5"], [175, "jmp short locret_401FDF"], [176, "mov rax, [rbp+var_20]"], [177, "movzx edx, [rbp+var_4]"], [178, "mov [rax], dx"], [179, "mov rax, [rbp+var_20]"], [180, "movzx eax, word ptr [rax]"], [181, "movzx eax, ax"], [182, "pxor xmm0, xmm0"], [183, "cvtsi2ss xmm0, eax"], [184, "movss xmm2, cs:dword_40624C"], [185, "movaps xmm1, xmm0"], [186, "divss xmm1, xmm2"], [187, "movss xmm0, cs:dword_406258"], [188, "mulss xmm0, xmm1"], [189, "movss xmm1, cs:dword_40625C"], [190, "subss xmm0, xmm1"], [191, "mov rax, [rbp+var_28]"], [192, "movss dword ptr [rax], xmm0"], [193, "mov eax, 0"], [194, "leave"], [195, "retn"]], "data_dep": [[6, 3], [7, 6], [10, 3], [11, 10], [12, 11], [13, 12], [16, 3], [17, 16], [18, 17], [19, 18], [21, 3], [23, 20], [26, 21], [28, 27], [29, 28], [30, 29], [31, 3], [32, 31], [35, 32], [39, 38], [40, 39], [41, 40], [43, 42], [44, 41], [44, 43], [45, 44], [47, 46], [48, 45], [49, 47], [50, 48], [52, 51], [53, 52], [54, 3], [55, 54], [58, 55], [61, 45], [62, 61], [63, 62], [64, 63], [65, 64], [66, 3], [67, 66], [70, 67], [73, 4], [74, 45], [75, 74], [75, 73], [78, 77], [79, 3], [81, 78], [82, 79], [84, 83], [85, 84], [86, 85], [87, 3], [88, 87], [91, 88], [94, 3], [95, 94], [96, 95], [97, 96], [98, 3], [99, 98], [101, 99], [103, 3], [104, 103], [105, 104], [106, 105], [107, 3], [108, 107], [110, 108], [112, 3], [113, 112], [114, 113], [115, 114], [116, 3], [117, 116], [119, 117], [121, 3], [122, 121], [124, 122], [125, 78], [126, 3], [128, 125], [129, 126], [131, 130], [132, 131], [133, 132], [134, 3], [135, 134], [138, 135], [142, 141], [143, 142], [144, 143], [146, 145], [147, 144], [147, 146], [148, 147], [150, 149], [151, 148], [152, 150], [153, 151], [155, 154], [156, 155], [157, 3], [158, 157], [161, 158], [164, 148], [165, 164], [166, 165], [167, 166], [168, 167], [169, 3], [170, 169], [173, 170], [176, 4], [177, 148], [178, 177], [178, 176], [179, 4], [180, 192], [180, 75], [180, 179], [180, 178], [181, 180], [183, 181], [183, 182], [185, 183], [186, 184], [186, 185], [188, 187], [188, 186], [190, 188], [190, 189], [191, 5], [192, 190], [192, 191], [195, 162], [195, 36], [195, 139], [195, 8], [195, 193], [195, 14], [195, 71], [195, 92], [195, 174], [195, 59]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/1a06f9077a2966c5357b2b2d2a32724643173e01b1d4a4bf2abf78fde9f7cea0_1a06f9077a2966c5357b2b2d2a32724643173e01b1d4a4bf2abf78fde9f7cea0.jsonl.gz", "strip_func_name": "sub_401D0D", "query": "\n\n\n__int64 __fastcall sub_401D0D(__int64 a1, _WORD *a2, float *a3)\n{\nchar v5; // [rsp+27h] [rbp-9h] BYREF\nunsigned __int16 v6; // [rsp+28h] [rbp-8h] BYREF\nunsigned __int8 v7; // [rsp+2Ah] [rbp-6h]\nchar v8; // [rsp+2Bh] [rbp-5h]\nunsigned __int16 v9; // [rsp+2Ch] [rbp-4h]\nbool v10; // [rsp+2Fh] [rbp-1h]\n\nif ( !a1 )\nreturn 2LL;\nif ( *(_BYTE *)(a1 + 74) != 1 )\nreturn 3LL;\nif ( *(_BYTE *)(a1 + 72) )\n{\nv5 = -11;\nv10 = sub_401202(a1, (__int64)&v5, 1u);\nif ( v10 )\n{\n(*(void (__fastcall **)(const char *))(a1 + 64))(\"htu21d: write cmd failed.\\n\");\nreturn 1LL;\n}\nswitch ( *(_BYTE *)(a1 + 73) )\n{\ncase 3:\n(*(void (__fastcall **)(__int64))(a1 + 56))(7LL);\nbreak;\ncase 1:\n(*(void (__fastcall **)(__int64))(a1 + 56))(13LL);\nbreak;\ncase 2:\n(*(void (__fastcall **)(__int64))(a1 + 56))(25LL);\nbreak;\ndefault:\n(*(void (__fastcall **)(__int64))(a1 + 56))(50LL);\nbreak;\n}\nv10 = sub_401244(a1, (__int64)&v6, 3u);\nif ( v10 )\n{\n(*(void (__fastcall **)(const char *))(a1 + 64))(\"htu21d: read cmd failed.\\n\");\nreturn 1LL;\n}\nv9 = _byteswap_ushort(v6);\nif ( sub_401356(v9, v7) )\n{\n(*(void (__fastcall **)(const char *))(a1 + 64))(\"htu21d: crc is error.\\n\");\nreturn 4LL;\n}\nv8 = v9 & 3;\nif ( (v9 & 3) != 2 )\n{\n(*(void (__fastcall **)(const char *))(a1 + 64))(\"htu21d: status is error.\\n\");\nreturn 5LL;\n}\n*a2 = v9;\n}\nelse\n{\nv10 = sub_4012D1(a1, 0, 0xE5u, (__int64)&v6, 3u);\nif ( v10 )\n{\n(*(void (__fastcall **)(const char *))(a1 + 64))(\"htu21d: read failed.\\n\");\nreturn 1LL;\n}\nv9 = _byteswap_ushort(v6);\nif ( sub_401356(v9, v7) )\n{\n(*(void (__fastcall **)(const char *))(a1 + 64))(\"htu21d: crc is error.\\n\");\nreturn 4LL;\n}\nv8 = v9 & 3;\nif ( (v9 & 3) != 2 )\n{\n(*(void (__fastcall **)(const char *))(a1 + 64))(\"htu21d: status is error.\\n\");\nreturn 5LL;\n}\n*a2 = v9;\n}\n*a3 = (float)(125.0 * (float)((float)(unsigned __int16)*a2 / 65536.0)) - 6.0;\nreturn 0LL;\n}\n\n\n\nQ:[a3,a1,a2,v5,v6,v8,v9,v10,sub_401D0D,sub_401202,sub_401244,sub_401356,sub_4012D1,]", "hints": "[]", "response": "{'a3': 'humidity_s', 'a1': 'handle', 'a2': 'humidity_raw', 'v5': 'cmd', 'v6': 'buf', 'v8': 'status', 'v9': 'data', 'v10': 'res', 'sub_401D0D': 'htu21d_read_humidity', 'sub_401202': 'a_htu21d_write_cmd', 'sub_401244': 'a_htu21d_read_cmd', 'sub_401356': 'a_htu21d_crc', 'sub_4012D1': 'a_htu21d_read'}"}
[ [ 0.8095126152038574, 0.7898963689804077, 0.7833967208862305, 0.7832816243171692, 0.7789538502693176, 0.7736658453941345, 0.7685457468032837, 0.7633615136146545, 0.7611886262893677, 0.7603734731674194, 0.7595550417900085, 0.7586554288864136, 0.7577441930770874, 0.7570654153823853, 0.7568032145500183, 0.7497711777687073, 0.7487267255783081, 0.7486701011657715, 0.7484083771705627, 0.7423234581947327 ], [ 54420, 84826, 254852, 259833, 174090, 94280, 103108, 75439, 210215, 110016, 48196, 65390, 87735, 178305, 264782, 55191, 31701, 145392, 153130, 136056 ] ]
arm_dot_prod_f32
3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec
gwsystems
sledge-serverless-framework
NA
void arm_dot_prod_f32( const float32_t * pSrcA, const float32_t * pSrcB, uint32_t blockSize, float32_t * result) { uint32_t blkCnt; /* Loop counter */ float32_t sum = 0.0f; /* Temporary return variable */ #if defined(ARM_MATH_NEON) && !defined(ARM_MATH_AUTOVECTORIZE) f32x4_t vec1; f32x4_t vec2; f32x4_t accum = vdupq_n_f32(0); f32x2_t tmp = vdup_n_f32(0); /* Compute 4 outputs at a time */ blkCnt = blockSize >> 2U; vec1 = vld1q_f32(pSrcA); vec2 = vld1q_f32(pSrcB); while (blkCnt > 0U) { /* C = A[0]*B[0] + A[1]*B[1] + A[2]*B[2] + ... + A[blockSize-1]*B[blockSize-1] */ /* Calculate dot product and then store the result in a temporary buffer. */ accum = vmlaq_f32(accum, vec1, vec2); /* Increment pointers */ pSrcA += 4; pSrcB += 4; vec1 = vld1q_f32(pSrcA); vec2 = vld1q_f32(pSrcB); /* Decrement the loop counter */ blkCnt--; } #if __aarch64__ sum = vpadds_f32(vpadd_f32(vget_low_f32(accum), vget_high_f32(accum))); #else tmp = vpadd_f32(vget_low_f32(accum), vget_high_f32(accum)); sum = vget_lane_f32(tmp, 0) + vget_lane_f32(tmp, 1); #endif /* Tail */ blkCnt = blockSize & 0x3; #else #if defined (ARM_MATH_LOOPUNROLL) && !defined(ARM_MATH_AUTOVECTORIZE) /* Loop unrolling: Compute 4 outputs at a time */ blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ while (blkCnt > 0U) { /* C = A[0]* B[0] + A[1]* B[1] + A[2]* B[2] + .....+ A[blockSize-1]* B[blockSize-1] */ /* Calculate dot product and store result in a temporary buffer. */ sum += (*pSrcA++) * (*pSrcB++); sum += (*pSrcA++) * (*pSrcB++); sum += (*pSrcA++) * (*pSrcB++); sum += (*pSrcA++) * (*pSrcB++); /* Decrement loop counter */ blkCnt--; } /* Loop unrolling: Compute remaining outputs */ blkCnt = blockSize % 0x4U; #else /* Initialize blkCnt with number of samples */ blkCnt = blockSize; #endif /* #if defined (ARM_MATH_LOOPUNROLL) */ #endif /* #if defined(ARM_MATH_NEON) */ while (blkCnt > 0U) { /* C = A[0]* B[0] + A[1]* B[1] + A[2]* B[2] + .....+ A[blockSize-1]* B[blockSize-1] */ /* Calculate dot product and store result in a temporary buffer. */ sum += (*pSrcA++) * (*pSrcB++); /* Decrement loop counter */ blkCnt--; } /* Store result in destination buffer */ *result = sum; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41FD19", "function_addr": 4324633, "binary_name": "3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov [rbp+var_20], rsi"], [4, "mov [rbp+var_24], edx"], [5, "mov [rbp+var_30], rcx"], [6, "pxor xmm0, xmm0"], [7, "movss [rbp+var_8], xmm0"], [8, "mov eax, [rbp+var_24]"], [9, "mov [rbp+var_4], eax"], [10, "jmp short loc_41FD73"], [11, "mov rax, [rbp+var_18]"], [12, "lea rdx, [rax+4]"], [13, "mov [rbp+var_18], rdx"], [14, "movss xmm1, dword ptr [rax]"], [15, "mov rax, [rbp+var_20]"], [16, "lea rdx, [rax+4]"], [17, "mov [rbp+var_20], rdx"], [18, "movss xmm0, dword ptr [rax]"], [19, "mulss xmm0, xmm1"], [20, "movss xmm1, [rbp+var_8]"], [21, "addss xmm0, xmm1"], [22, "movss [rbp+var_8], xmm0"], [23, "sub [rbp+var_4], 1"], [24, "cmp [rbp+var_4], 0"], [25, "jnz short loc_41FD3D"], [26, "mov rax, [rbp+var_30]"], [27, "movss xmm0, [rbp+var_8]"], [28, "movss dword ptr [rax], xmm0"], [29, "nop"], [30, "pop rbp"], [31, "retn"]], "data_dep": [[7, 6], [8, 4], [9, 8], [11, 2], [11, 13], [12, 16], [12, 11], [13, 12], [14, 11], [15, 17], [15, 3], [16, 12], [16, 15], [17, 16], [18, 15], [19, 18], [19, 14], [20, 7], [20, 22], [21, 19], [21, 20], [22, 21], [23, 9], [23, 23], [24, 23], [24, 9], [25, 24], [26, 5], [27, 7], [27, 22], [28, 27], [28, 26], [30, 0], [31, 26]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec_3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.jsonl.gz", "strip_func_name": "sub_41FD19", "query": "\n\n\nfloat *__fastcall sub_41FD19(float *a1, float *a2, int a3, float *a4)\n{\nfloat *v4; // rax\nfloat v5; // xmm1_4\nfloat *v6; // rax\nfloat *result; // rax\nfloat v10; // [rsp+28h] [rbp-8h]\n\nv10 = 0.0;\nwhile ( a3 )\n{\nv4 = a1++;\nv5 = *v4;\nv6 = a2++;\nv10 = (float)(*v6 * v5) + v10;\n--a3;\n}\nresult = a4;\n*a4 = v10;\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,v10,sub_41FD19,]", "hints": "[]", "response": "{'a3': 'blockSize', 'a4': 'result', 'a1': 'pSrcA', 'a2': 'pSrcB', 'v10': 'sum', 'sub_41FD19': 'arm_dot_prod_f32'}"}
[ [ 0.7957318425178528, 0.7726646661758423, 0.7568334937095642, 0.7534389495849609, 0.7486250996589661, 0.7417431473731995, 0.7373855113983154, 0.7367557287216187, 0.7334742546081543, 0.7309710383415222, 0.7254233360290527, 0.7228516936302185, 0.7150733470916748, 0.7070796489715576, 0.691885232925415, 0.685531735420227, 0.6837864518165588, 0.6828503012657166, 0.6802955865859985, 0.6756853461265564 ], [ 21595, 230915, 14965, 9783, 92061, 129886, 67008, 114099, 43842, 104107, 91911, 123763, 193915, 194286, 145445, 125659, 257369, 201384, 154538, 52224 ] ]
bufbackward
3ac3d3bd6fdcdfe3ef5718c0313b8de8e27f1c9192ed5f66ca31aa7134ec6c43
dhamidi
tmenu
NA
static void bufbackward(BUFFER self, int by) { while (by --> 0 && self->gapstart > 1) { self->data[self->gapend - 2] = self->data[self->gapstart - 2]; self->data[self->gapstart - 2] = 0; self->gapstart--; self->gapend--; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4026A6", "function_addr": 4204198, "binary_name": "3ac3d3bd6fdcdfe3ef5718c0313b8de8e27f1c9192ed5f66ca31aa7134ec6c43.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, "jmp short loc_402729"], [5, "mov rax, [rbp+var_8]"], [6, "mov rdx, [rax+18h]"], [7, "mov rax, [rbp+var_8]"], [8, "mov rax, [rax+8]"], [9, "sub rax, 2"], [10, "lea rcx, [rdx+rax]"], [11, "mov rax, [rbp+var_8]"], [12, "mov rdx, [rax+18h]"], [13, "mov rax, [rbp+var_8]"], [14, "mov rax, [rax+10h]"], [15, "sub rax, 2"], [16, "add rdx, rax"], [17, "movzx eax, byte ptr [rcx]"], [18, "mov [rdx], al"], [19, "mov rax, [rbp+var_8]"], [20, "mov rdx, [rax+18h]"], [21, "mov rax, [rbp+var_8]"], [22, "mov rax, [rax+8]"], [23, "sub rax, 2"], [24, "add rax, rdx"], [25, "mov byte ptr [rax], 0"], [26, "mov rax, [rbp+var_8]"], [27, "mov rax, [rax+8]"], [28, "lea rdx, [rax-1]"], [29, "mov rax, [rbp+var_8]"], [30, "mov [rax+8], rdx"], [31, "mov rax, [rbp+var_8]"], [32, "mov rax, [rax+10h]"], [33, "lea rdx, [rax-1]"], [34, "mov rax, [rbp+var_8]"], [35, "mov [rax+10h], rdx"], [36, "mov eax, [rbp+var_C]"], [37, "lea edx, [rax-1]"], [38, "mov [rbp+var_C], edx"], [39, "test eax, eax"], [40, "jle short loc_402748"], [41, "mov rax, [rbp+var_8]"], [42, "mov rax, [rax+8]"], [43, "cmp rax, 1"], [44, "ja loc_4026B3"], [45, "nop"], [46, "pop rbp"], [47, "retn"]], "data_dep": [[5, 2], [6, 18], [6, 35], [6, 30], [6, 5], [6, 25], [7, 2], [8, 18], [8, 25], [8, 35], [8, 30], [8, 7], [9, 8], [10, 35], [10, 10], [10, 30], [10, 25], [10, 9], [10, 18], [11, 2], [12, 25], [12, 18], [12, 35], [12, 30], [12, 11], [13, 2], [14, 13], [14, 35], [14, 30], [14, 25], [14, 18], [15, 14], [16, 15], [16, 12], [17, 30], [17, 25], [17, 18], [17, 35], [17, 10], [18, 17], [18, 16], [19, 2], [20, 19], [20, 18], [21, 2], [22, 21], [22, 30], [22, 18], [23, 22], [24, 23], [24, 20], [25, 24], [26, 2], [27, 26], [27, 30], [27, 25], [28, 25], [28, 27], [28, 20], [29, 2], [30, 29], [30, 28], [31, 2], [32, 30], [32, 31], [32, 35], [33, 28], [33, 30], [33, 32], [34, 2], [35, 33], [35, 34], [36, 38], [36, 3], [37, 33], [37, 35], [37, 30], [37, 25], [37, 18], [37, 36], [38, 37], [39, 36], [40, 39], [41, 2], [42, 41], [42, 25], [42, 18], [42, 35], [42, 30], [43, 42], [44, 43], [46, 0], [47, 42], [47, 39]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/3ac3d3bd6fdcdfe3ef5718c0313b8de8e27f1c9192ed5f66ca31aa7134ec6c43_3ac3d3bd6fdcdfe3ef5718c0313b8de8e27f1c9192ed5f66ca31aa7134ec6c43.jsonl.gz", "strip_func_name": "sub_4026A6", "query": "\n\n\nunsigned __int64 __fastcall sub_4026A6(_QWORD *a1, unsigned int a2)\n{\nunsigned __int64 result; // rax\n\nwhile ( 1 )\n{\nresult = a2--;\nif ( (int)result <= 0 )\nbreak;\nresult = a1[1];\nif ( result <= 1 )\nbreak;\n*(_BYTE *)(a1[2] - 2LL + a1[3]) = *(_BYTE *)(a1[3] + a1[1] - 2LL);\n*(_BYTE *)(a1[3] + a1[1] - 2LL) = 0;\n--a1[1];\n--a1[2];\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_4026A6,]", "hints": "[]", "response": "{'a1': 'self', 'a2': 'by', 'sub_4026A6': 'bufbackward_0'}"}
[ [ 0.754884660243988, 0.7477211356163025, 0.7347891330718994, 0.7158706188201904, 0.7142342329025269, 0.7016142010688782, 0.6936326026916504, 0.6930294036865234, 0.6920138001441956, 0.6899433732032776, 0.6871194243431091, 0.6856444478034973, 0.6822709441184998, 0.6822282075881958, 0.6819356679916382, 0.6788511872291565, 0.6771784424781799, 0.6752588152885437, 0.6748988628387451, 0.6695749759674072 ], [ 219895, 92669, 247089, 42450, 73125, 103089, 139001, 113807, 30867, 263096, 203991, 217376, 13158, 1775, 35930, 85052, 196845, 1448, 839, 23615 ] ]
stun_auth_get_cred
f14f03e2ad91a86fde479b7e3453c83ebb1d8af9cf080462d99e6025027308e2
asterisk
pjproject-archive
NA
static pj_status_t stun_auth_get_cred(const pj_stun_msg *msg, void *user_data, pj_pool_t *pool, pj_str_t *realm, pj_str_t *username, pj_str_t *nonce, pj_stun_passwd_type *data_type, pj_str_t *data) { pj_stun_session *sess = (pj_stun_session *)user_data; stun_data *sd = (stun_data*) pj_stun_session_get_user_data(sess); pj_ice_sess *ice = sd->ice; PJ_UNUSED_ARG(pool); realm->slen = nonce->slen = 0; if (PJ_STUN_IS_RESPONSE(msg->hdr.type)) { /* Outgoing responses need to have the same credential as * incoming requests. */ *username = ice->rx_uname; *data_type = PJ_STUN_PASSWD_PLAIN; *data = ice->rx_pass; } else { *username = ice->tx_uname; *data_type = PJ_STUN_PASSWD_PLAIN; *data = ice->tx_pass; } return PJ_SUCCESS; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41586D", "function_addr": 4282477, "binary_name": "f14f03e2ad91a86fde479b7e3453c83ebb1d8af9cf080462d99e6025027308e2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_38], rdx"], [6, "mov [rbp+var_40], rcx"], [7, "mov [rbp+var_48], r8"], [8, "mov [rbp+var_50], r9"], [9, "mov rax, [rbp+var_30]"], [10, "mov [rbp+var_8], rax"], [11, "mov rax, [rbp+var_8]"], [12, "mov rdi, rax"], [13, "call sub_429330"], [14, "mov [rbp+var_10], rax"], [15, "mov rax, [rbp+var_10]"], [16, "mov rax, [rax]"], [17, "mov [rbp+var_18], rax"], [18, "mov rax, [rbp+var_50]"], [19, "mov qword ptr [rax+8], 0"], [20, "mov rax, [rbp+var_50]"], [21, "mov rdx, [rax+8]"], [22, "mov rax, [rbp+var_40]"], [23, "mov [rax+8], rdx"], [24, "mov rax, [rbp+var_28]"], [25, "movzx eax, word ptr [rax]"], [26, "movzx eax, ax"], [27, "and eax, 100h"], [28, "test eax, eax"], [29, "jz short loc_415925"], [30, "mov rcx, [rbp+var_48]"], [31, "mov rax, [rbp+var_18]"], [32, "mov rdx, [rax+158h]"], [33, "mov rax, [rax+150h]"], [34, "mov [rcx], rax"], [35, "mov [rcx+8], rdx"], [36, "mov rax, [rbp+arg_0]"], [37, "mov dword ptr [rax], 0"], [38, "mov rcx, [rbp+arg_8]"], [39, "mov rax, [rbp+var_18]"], [40, "mov rdx, [rax+168h]"], [41, "mov rax, [rax+160h]"], [42, "mov [rcx], rax"], [43, "mov [rcx+8], rdx"], [44, "jmp short loc_415969"], [45, "mov rcx, [rbp+var_48]"], [46, "mov rax, [rbp+var_18]"], [47, "mov rdx, [rax+128h]"], [48, "mov rax, [rax+120h]"], [49, "mov [rcx], rax"], [50, "mov [rcx+8], rdx"], [51, "mov rax, [rbp+arg_0]"], [52, "mov dword ptr [rax], 0"], [53, "mov rcx, [rbp+arg_8]"], [54, "mov rax, [rbp+var_18]"], [55, "mov rdx, [rax+138h]"], [56, "mov rax, [rax+130h]"], [57, "mov [rcx], rax"], [58, "mov [rcx+8], rdx"], [59, "mov eax, 0"], [60, "leave"], [61, "retn"]], "data_dep": [[9, 4], [10, 9], [11, 10], [12, 11], [14, 13], [15, 14], [16, 15], [17, 16], [18, 8], [19, 18], [20, 8], [21, 20], [21, 19], [22, 6], [23, 22], [23, 21], [24, 3], [25, 23], [25, 24], [26, 25], [27, 26], [28, 27], [29, 28], [30, 7], [31, 17], [32, 37], [32, 23], [32, 34], [32, 43], [32, 31], [32, 42], [32, 35], [32, 19], [33, 31], [33, 42], [33, 35], [33, 19], [33, 37], [33, 23], [33, 34], [33, 43], [34, 30], [34, 33], [35, 30], [35, 32], [37, 36], [38, 10], [39, 17], [40, 37], [40, 39], [41, 37], [41, 39], [42, 41], [42, 38], [43, 38], [43, 40], [45, 7], [46, 17], [47, 57], [47, 50], [47, 52], [47, 49], [47, 58], [47, 19], [47, 46], [47, 23], [48, 49], [48, 58], [48, 19], [48, 46], [48, 23], [48, 57], [48, 50], [48, 52], [49, 48], [49, 45], [50, 45], [50, 47], [52, 51], [53, 10], [54, 17], [55, 52], [55, 54], [56, 52], [56, 54], [57, 56], [57, 53], [58, 53], [58, 55], [61, 59]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/f14f03e2ad91a86fde479b7e3453c83ebb1d8af9cf080462d99e6025027308e2_f14f03e2ad91a86fde479b7e3453c83ebb1d8af9cf080462d99e6025027308e2.jsonl.gz", "strip_func_name": "sub_41586D", "query": "\n\n\n__int64 __fastcall sub_41586D(_WORD *a1, __int64 a2, __int64 a3, __int64 a4, _QWORD *a5, __int64 a6, _DWORD *a7, _QWORD *a8)\n{\n__int64 v8; // rdx\n_QWORD *v9; // rcx\n__int64 v10; // rdx\n__int64 v11; // rax\n__int64 v12; // rdx\n_QWORD *v17; // [rsp+38h] [rbp-18h]\n\nv17 = *(_QWORD **)sub_429330(a2);\n*(_QWORD *)(a6 + 8) = 0LL;\n*(_QWORD *)(a4 + 8) = *(_QWORD *)(a6 + 8);\nif ( (*a1 & 0x100) != 0 )\n{\nv8 = v17[43];\n*a5 = v17[42];\na5[1] = v8;\n*a7 = 0;\nv9 = a8;\nv10 = v17[45];\nv11 = v17[44];\n}\nelse\n{\nv12 = v17[37];\n*a5 = v17[36];\na5[1] = v12;\n*a7 = 0;\nv9 = a8;\nv10 = v17[39];\nv11 = v17[38];\n}\n*a8 = v11;\nv9[1] = v10;\nreturn 0LL;\n}\n\n\n\nQ:[a4,a1,a2,a5,a6,a3,a7,a8,v17,sub_41586D,sub_429330,]", "hints": "[]", "response": "{'a4': 'realm', 'a1': 'msg', 'a2': 'user_data', 'a5': 'username', 'a6': 'nonce', 'a3': 'pool', 'a7': 'data_type', 'a8': 'data', 'v17': 'ice', 'sub_41586D': 'stun_auth_get_cred', 'sub_429330': 'pj_stun_session_get_user_data'}"}
[ [ 0.7786049246788025, 0.7666128873825073, 0.7626000046730042, 0.7567033767700195, 0.7565495371818542, 0.7403956055641174, 0.7391762733459473, 0.7198305726051331, 0.7187925577163696, 0.7181994915008545, 0.7174334526062012, 0.7164230346679688, 0.7148790955543518, 0.7094521522521973, 0.7005540728569031, 0.6984466314315796, 0.6963174343109131, 0.6962414979934692, 0.6960418820381165, 0.6957008838653564 ], [ 236471, 41138, 65411, 239149, 88873, 98427, 49703, 253719, 186784, 84301, 170880, 15704, 62261, 64621, 131022, 88829, 222400, 112784, 213556, 65976 ] ]
updateA
240df20383353411fd55c0e1c0b2a27f70eb98995087a9c0ae40ff0922262c56
waywardgeek
infnoise
NA
static inline bool updateA(double *A, double K, double noise) { if(*A > 1.0) { *A = 1.0; } else if (*A < 0.0) { *A = 0.0; } *A += noise; if(*A > 0.5) { *A = K**A - (K-1); return true; } *A += noise; *A = K**A; return false; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40212F", "function_addr": 4202799, "binary_name": "240df20383353411fd55c0e1c0b2a27f70eb98995087a9c0ae40ff0922262c56.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "movsd [rbp+var_10], xmm0"], [4, "movsd [rbp+var_18], xmm1"], [5, "mov rax, [rbp+var_8]"], [6, "movsd xmm0, qword ptr [rax]"], [7, "movsd xmm1, cs:qword_4031A8"], [8, "comisd xmm0, xmm1"], [9, "jbe short loc_402169"], [10, "mov rax, [rbp+var_8]"], [11, "movsd xmm0, cs:qword_4031A8"], [12, "movsd qword ptr [rax], xmm0"], [13, "jmp short loc_402187"], [14, "mov rax, [rbp+var_8]"], [15, "movsd xmm1, qword ptr [rax]"], [16, "pxor xmm0, xmm0"], [17, "comisd xmm0, xmm1"], [18, "jbe short loc_402187"], [19, "mov rax, [rbp+var_8]"], [20, "pxor xmm0, xmm0"], [21, "movsd qword ptr [rax], xmm0"], [22, "mov rax, [rbp+var_8]"], [23, "movsd xmm0, qword ptr [rax]"], [24, "addsd xmm0, [rbp+var_18]"], [25, "mov rax, [rbp+var_8]"], [26, "movsd qword ptr [rax], xmm0"], [27, "mov rax, [rbp+var_8]"], [28, "movsd xmm0, qword ptr [rax]"], [29, "comisd xmm0, cs:qword_4031C0"], [30, "jbe short loc_4021DF"], [31, "mov rax, [rbp+var_8]"], [32, "movsd xmm0, qword ptr [rax]"], [33, "mulsd xmm0, [rbp+var_10]"], [34, "movsd xmm1, [rbp+var_10]"], [35, "movsd xmm2, cs:qword_4031A8"], [36, "subsd xmm1, xmm2"], [37, "subsd xmm0, xmm1"], [38, "mov rax, [rbp+var_8]"], [39, "movsd qword ptr [rax], xmm0"], [40, "mov eax, 1"], [41, "jmp short loc_40220E"], [42, "mov rax, [rbp+var_8]"], [43, "movsd xmm0, qword ptr [rax]"], [44, "addsd xmm0, [rbp+var_18]"], [45, "mov rax, [rbp+var_8]"], [46, "movsd qword ptr [rax], xmm0"], [47, "mov rax, [rbp+var_8]"], [48, "movsd xmm0, qword ptr [rax]"], [49, "mulsd xmm0, [rbp+var_10]"], [50, "mov rax, [rbp+var_8]"], [51, "movsd qword ptr [rax], xmm0"], [52, "mov eax, 0"], [53, "pop rbp"], [54, "retn"]], "data_dep": [[5, 2], [6, 5], [8, 6], [8, 7], [10, 2], [12, 10], [12, 11], [14, 2], [15, 14], [17, 15], [17, 16], [19, 2], [21, 19], [21, 20], [22, 2], [23, 22], [23, 12], [23, 21], [23, 26], [24, 23], [24, 4], [25, 2], [26, 24], [26, 25], [27, 2], [28, 27], [28, 26], [29, 28], [31, 2], [32, 31], [32, 12], [32, 21], [32, 39], [32, 26], [33, 32], [33, 3], [34, 3], [36, 34], [36, 35], [37, 33], [37, 36], [38, 2], [39, 38], [39, 37], [42, 2], [43, 46], [43, 12], [43, 21], [43, 42], [43, 51], [43, 26], [44, 4], [44, 43], [45, 2], [46, 45], [46, 44], [47, 2], [48, 47], [48, 46], [49, 3], [49, 48], [50, 2], [51, 50], [51, 49], [53, 0], [54, 40], [54, 52]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/240df20383353411fd55c0e1c0b2a27f70eb98995087a9c0ae40ff0922262c56_240df20383353411fd55c0e1c0b2a27f70eb98995087a9c0ae40ff0922262c56.jsonl.gz", "strip_func_name": "sub_40212F", "query": "\n\n\n__int64 __fastcall sub_40212F(double *a1, double a2, double a3)\n{\n__int64 result; // rax\n\nif ( *a1 <= 1.0 )\n{\nif ( *a1 < 0.0 )\n*a1 = 0.0;\n}\nelse\n{\n*a1 = 1.0;\n}\n*a1 = *a1 + a3;\nif ( *a1 <= 0.5 )\n{\n*a1 = *a1 + a3;\n*a1 = *a1 * a2;\nresult = 0LL;\n}\nelse\n{\n*a1 = *a1 * a2 - (a2 - 1.0);\nresult = 1LL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,a3,sub_40212F,]", "hints": "[]", "response": "{'a1': 'A', 'a2': 'K', 'a3': 'noise', 'sub_40212F': 'updateA'}"}
[ [ 0.8155953884124756, 0.7820752263069153, 0.7523340582847595, 0.7430536150932312, 0.7345136404037476, 0.7310892343521118, 0.7297731637954712, 0.7287686467170715, 0.7279874086380005, 0.7247307896614075, 0.7244085669517517, 0.7239992022514343, 0.7190396785736084, 0.710513710975647, 0.7078891396522522, 0.7066017985343933, 0.7059358954429626, 0.704737663269043, 0.7044575810432434, 0.704167902469635 ], [ 245081, 158854, 189675, 167448, 158612, 128371, 44047, 240501, 4963, 92671, 170428, 43321, 108800, 61006, 231794, 10554, 200303, 79733, 157846, 77887 ] ]
f_print
df6029a2a2f3ab6c4cefa1f4a3b570ec4f9a765786c2d4460c0ad2aa46f6cab6
sergev
vak-opensource
NA
void f_print (int argc, char **argv) { form_t *b; char *cp; label_t *l; int i; for (i = 1; i < argc; i++) { if (! (b = lookloc (argv [i]))) continue; if (b->nlab) l = b->lab; else l = 0; for (cp = b->body; *cp; cp++) { while (l && cp == b->body + l->place) { fprintf (stderr, "<%d>", l->num + 1); if (++l - b->lab >= b->nlab) l = 0; } if (cp == b->body + b->ptr) fprintf (stderr, "<*>"); putc (*cp, stderr); } while (l && cp == b->body + l->place) { fprintf (stderr, "<%d>", l->num + 1); if (++l - b->lab >= b->nlab) l = 0; } if (cp == b->body + b->ptr) fprintf (stderr, "<*>"); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_406E94", "function_addr": 4222612, "binary_name": "df6029a2a2f3ab6c4cefa1f4a3b570ec4f9a765786c2d4460c0ad2aa46f6cab6.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_24], edi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_14], 1"], [6, "jmp loc_4070A4"], [7, "mov eax, [rbp+var_14]"], [8, "cdqe"], [9, "lea rdx, ds:0[rax*8]"], [10, "mov rax, [rbp+var_30]"], [11, "add rax, rdx"], [12, "mov rax, [rax]"], [13, "mov rdi, rax"], [14, "mov eax, 0"], [15, "call sub_407C09"], [16, "mov [rbp+var_20], rax"], [17, "cmp [rbp+var_20], 0"], [18, "jz loc_40709F"], [19, "mov rax, [rbp+var_20]"], [20, "mov eax, [rax+1Ch]"], [21, "test eax, eax"], [22, "jz short loc_406EFB"], [23, "mov rax, [rbp+var_20]"], [24, "mov rax, [rax+10h]"], [25, "mov [rbp+var_10], rax"], [26, "jmp short loc_406F03"], [27, "mov [rbp+var_10], 0"], [28, "mov rax, [rbp+var_20]"], [29, "mov rax, [rax+8]"], [30, "mov [rbp+var_8], rax"], [31, "jmp loc_406FE0"], [32, "mov rax, [rbp+var_10]"], [33, "mov eax, [rax+4]"], [34, "lea edx, [rax+1]"], [35, "mov rax, cs:stderr"], [36, "mov esi, offset aD_1"], [37, "mov rdi, rax"], [38, "mov eax, 0"], [39, "call _fprintf"], [40, "add [rbp+var_10], 8"], [41, "mov rax, [rbp+var_20]"], [42, "mov rdx, [rax+10h]"], [43, "mov rax, [rbp+var_10]"], [44, "sub rax, rdx"], [45, "sar rax, 3"], [46, "mov rdx, rax"], [47, "mov rax, [rbp+var_20]"], [48, "mov eax, [rax+1Ch]"], [49, "cdqe"], [50, "cmp rdx, rax"], [51, "jl short loc_406F68"], [52, "mov [rbp+var_10], 0"], [53, "cmp [rbp+var_10], 0"], [54, "jz short loc_406F88"], [55, "mov rax, [rbp+var_20]"], [56, "mov rdx, [rax+8]"], [57, "mov rax, [rbp+var_10]"], [58, "mov eax, [rax]"], [59, "cdqe"], [60, "add rax, rdx"], [61, "cmp [rbp+var_8], rax"], [62, "jz short loc_406F14"], [63, "mov rax, [rbp+var_20]"], [64, "mov rdx, [rax+8]"], [65, "mov rax, [rbp+var_20]"], [66, "mov eax, [rax+18h]"], [67, "cdqe"], [68, "add rax, rdx"], [69, "cmp [rbp+var_8], rax"], [70, "jnz short loc_406FC0"], [71, "mov rax, cs:stderr"], [72, "mov rcx, rax"], [73, "mov edx, 3"], [74, "mov esi, 1"], [75, "mov edi, offset asc_408505"], [76, "call _fwrite"], [77, "mov rdx, cs:stderr"], [78, "mov rax, [rbp+var_8]"], [79, "movzx eax, byte ptr [rax]"], [80, "movsx eax, al"], [81, "mov rsi, rdx"], [82, "mov edi, eax"], [83, "call _putc"], [84, "add [rbp+var_8], 1"], [85, "mov rax, [rbp+var_8]"], [86, "movzx eax, byte ptr [rax]"], [87, "test al, al"], [88, "jnz loc_406F68"], [89, "jmp short loc_407045"], [90, "mov rax, [rbp+var_10]"], [91, "mov eax, [rax+4]"], [92, "lea edx, [rax+1]"], [93, "mov rax, cs:stderr"], [94, "mov esi, offset aD_1"], [95, "mov rdi, rax"], [96, "mov eax, 0"], [97, "call _fprintf"], [98, "add [rbp+var_10], 8"], [99, "mov rax, [rbp+var_20]"], [100, "mov rdx, [rax+10h]"], [101, "mov rax, [rbp+var_10]"], [102, "sub rax, rdx"], [103, "sar rax, 3"], [104, "mov rdx, rax"], [105, "mov rax, [rbp+var_20]"], [106, "mov eax, [rax+1Ch]"], [107, "cdqe"], [108, "cmp rdx, rax"], [109, "jl short loc_407045"], [110, "mov [rbp+var_10], 0"], [111, "cmp [rbp+var_10], 0"], [112, "jz short loc_407065"], [113, "mov rax, [rbp+var_20]"], [114, "mov rdx, [rax+8]"], [115, "mov rax, [rbp+var_10]"], [116, "mov eax, [rax]"], [117, "cdqe"], [118, "add rax, rdx"], [119, "cmp [rbp+var_8], rax"], [120, "jz short loc_406FF1"], [121, "mov rax, [rbp+var_20]"], [122, "mov rdx, [rax+8]"], [123, "mov rax, [rbp+var_20]"], [124, "mov eax, [rax+18h]"], [125, "cdqe"], [126, "add rax, rdx"], [127, "cmp [rbp+var_8], rax"], [128, "jnz short loc_4070A0"], [129, "mov rax, cs:stderr"], [130, "mov rcx, rax"], [131, "mov edx, 3"], [132, "mov esi, 1"], [133, "mov edi, offset asc_408505"], [134, "call _fwrite"], [135, "jmp short loc_4070A0"], [136, "nop"], [137, "add [rbp+var_14], 1"], [138, "mov eax, [rbp+var_14]"], [139, "cmp eax, [rbp+var_24]"], [140, "jl loc_406EAF"], [141, "nop"], [142, "nop"], [143, "leave"], [144, "retn"]], "data_dep": [[7, 5], [7, 137], [9, 122], [9, 131], [9, 9], [10, 4], [11, 9], [11, 10], [12, 11], [13, 12], [16, 15], [17, 16], [18, 17], [19, 16], [20, 19], [21, 20], [22, 21], [23, 16], [24, 23], [25, 24], [28, 16], [29, 28], [30, 29], [32, 25], [32, 27], [32, 52], [32, 40], [33, 32], [34, 56], [34, 33], [37, 35], [40, 52], [40, 27], [40, 40], [40, 25], [41, 16], [42, 41], [43, 40], [44, 42], [44, 43], [45, 44], [46, 45], [47, 16], [48, 47], [50, 46], [50, 48], [51, 50], [53, 25], [53, 27], [53, 52], [53, 40], [54, 53], [55, 16], [56, 55], [57, 52], [57, 40], [57, 25], [57, 27], [58, 57], [60, 56], [60, 58], [61, 30], [61, 60], [61, 84], [62, 61], [63, 16], [64, 63], [65, 16], [66, 65], [68, 66], [68, 64], [69, 30], [69, 84], [69, 68], [70, 69], [72, 71], [78, 30], [78, 84], [79, 78], [80, 79], [81, 77], [82, 80], [84, 84], [84, 30], [85, 84], [85, 30], [86, 85], [87, 86], [88, 87], [90, 110], [90, 25], [90, 98], [90, 27], [90, 52], [90, 40], [91, 90], [92, 114], [92, 91], [95, 93], [98, 110], [98, 25], [98, 98], [98, 27], [98, 52], [98, 40], [99, 16], [100, 99], [101, 98], [102, 100], [102, 101], [103, 102], [104, 103], [105, 16], [106, 105], [108, 104], [108, 106], [109, 108], [111, 110], [111, 25], [111, 98], [111, 27], [111, 52], [111, 40], [112, 111], [113, 16], [114, 113], [115, 25], [115, 98], [115, 27], [115, 52], [115, 40], [115, 110], [116, 115], [118, 114], [118, 116], [119, 84], [119, 118], [119, 30], [120, 119], [121, 16], [122, 121], [123, 16], [124, 123], [126, 122], [126, 124], [127, 126], [127, 30], [127, 84], [128, 127], [130, 129], [137, 5], [137, 137], [138, 5], [138, 137], [139, 138], [139, 3], [140, 139], [144, 138]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/df6029a2a2f3ab6c4cefa1f4a3b570ec4f9a765786c2d4460c0ad2aa46f6cab6_df6029a2a2f3ab6c4cefa1f4a3b570ec4f9a765786c2d4460c0ad2aa46f6cab6.jsonl.gz", "strip_func_name": "sub_406E94", "query": "\n\n\n__int64 __fastcall sub_406E94(int a1, __int64 a2)\n{\n__int64 result; // rax\n__int64 v3; // [rsp+10h] [rbp-20h]\nint i; // [rsp+1Ch] [rbp-14h]\nint *v5; // [rsp+20h] [rbp-10h]\n_BYTE *j; // [rsp+28h] [rbp-8h]\n\nfor ( i = 1; ; ++i )\n{\nresult = (unsigned int)i;\nif ( i >= a1 )\nbreak;\nv3 = sub_407C09(*(_QWORD *)(8LL * i + a2));\nif ( v3 )\n{\nif ( *(_DWORD *)(v3 + 28) )\nv5 = *(int **)(v3 + 16);\nelse\nv5 = 0LL;\nfor ( j = *(_BYTE **)(v3 + 8); *j; ++j )\n{\nwhile ( v5 && j == (_BYTE *)(*(_QWORD *)(v3 + 8) + *v5) )\n{\nfprintf(stderr, \"<%d>\", (unsigned int)(v5[1] + 1));\nv5 += 2;\nif ( ((__int64)v5 - *(_QWORD *)(v3 + 16)) >> 3 >= *(int *)(v3 + 28) )\nv5 = 0LL;\n}\nif ( j == (_BYTE *)(*(_QWORD *)(v3 + 8) + *(int *)(v3 + 24)) )\nfwrite(\"<*>\", 1uLL, 3uLL, stderr);\nputc((char)*j, stderr);\n}\nwhile ( v5 && j == (_BYTE *)(*(_QWORD *)(v3 + 8) + *v5) )\n{\nfprintf(stderr, \"<%d>\", (unsigned int)(v5[1] + 1));\nv5 += 2;\nif ( ((__int64)v5 - *(_QWORD *)(v3 + 16)) >> 3 >= *(int *)(v3 + 28) )\nv5 = 0LL;\n}\nif ( j == (_BYTE *)(*(_QWORD *)(v3 + 8) + *(int *)(v3 + 24)) )\nfwrite(\"<*>\", 1uLL, 3uLL, stderr);\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v3,v5,j,sub_406E94,sub_407C09,]", "hints": "[]", "response": "{'a1': 'argc', 'a2': 'argv', 'v3': 'b', 'v5': 'l', 'j': 'cp', 'sub_406E94': 'f_print', 'sub_407C09': 'lookloc'}"}
[ [ 0.7327402830123901, 0.7290555834770203, 0.7187150120735168, 0.7175371050834656, 0.7151378393173218, 0.7150084972381592, 0.7134053707122803, 0.7098972201347351, 0.7076329588890076, 0.7063412070274353, 0.7039456963539124, 0.7037093639373779, 0.7008562088012695, 0.7007136344909668, 0.6972366571426392, 0.687907874584198, 0.6811889410018921, 0.6811854839324951, 0.6772438287734985, 0.6766360998153687 ], [ 169286, 3452, 126350, 203685, 243968, 150172, 121513, 144560, 185804, 262068, 204822, 66002, 246819, 186929, 184940, 73414, 58956, 197094, 137278, 76973 ] ]
sharkParseCertTime
ff8ff7374fd9abd9716a29b0df0eb0854160b16481658efc9dc3c2fb8b26960e
RealTimeLogic
BAS
NA
BaTime sharkParseCertTime(const U8* utc, U8 len) { int i; int dt[7]; if(len > 15) return 0; for (i = 0; i < (len >> 1); utc += 2, i++) { if (!isdigit(*utc)) break; dt[i] = 10 * (utc[0] - '\060') + (utc[1] - '\060'); } if(utc[0] == '\132' && (len == 13 || len == 15)) { #ifdef ThreadLib_hpp struct BaTm ts; BaTimeEx tex; memset(&ts,0,sizeof(ts)); if (len == 13) { ts.tm_sec = dt[5]; ts.tm_min = dt[4]; ts.tm_hour = dt[3]; ts.tm_mday = dt[2]; ts.tm_mon = dt[1]-1; ts.tm_year = dt[0]+2000; } else { ts.tm_sec = dt[6]; ts.tm_min = dt[5]; ts.tm_hour = dt[4]; ts.tm_mday = dt[3]; ts.tm_mon = dt[2] - 1; ts.tm_year = dt[1] + dt[0] * 100; } if(baTm2TimeEx(&ts, FALSE, &tex)) return 0; return tex.sec; #else struct tm ts; memset(&ts,0,sizeof(ts)); if (len == 13) { ts.tm_sec = dt[5]; ts.tm_min = dt[4]; ts.tm_hour = dt[3]; ts.tm_mday = dt[2]; ts.tm_mon = dt[1] - 1; ts.tm_year = dt[0] + 100; } else { ts.tm_sec = dt[6]; ts.tm_min = dt[5]; ts.tm_hour = dt[4]; ts.tm_mday = dt[3]; ts.tm_mon = dt[2] - 1; ts.tm_year = (dt[1] + dt[0] * 100) - 1900; } return (BaTime)mktime(&ts); #endif } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4603C5", "function_addr": 4588485, "binary_name": "ff8ff7374fd9abd9716a29b0df0eb0854160b16481658efc9dc3c2fb8b26960e.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 70h"], [3, "mov [rbp+var_68], rdi"], [4, "mov eax, esi"], [5, "mov [rbp+var_6C], al"], [6, "cmp [rbp+var_6C], 0Fh"], [7, "jbe short loc_4603E6"], [8, "mov eax, 0"], [9, "jmp locret_460527"], [10, "mov [rbp+var_4], 0"], [11, "jmp short loc_460453"], [12, "call ___ctype_b_loc"], [13, "mov rdx, [rax]"], [14, "mov rax, [rbp+var_68]"], [15, "movzx eax, byte ptr [rax]"], [16, "movzx eax, al"], [17, "add rax, rax"], [18, "add rax, rdx"], [19, "movzx eax, word ptr [rax]"], [20, "movzx eax, ax"], [21, "and eax, 800h"], [22, "test eax, eax"], [23, "jz short loc_460463"], [24, "mov rax, [rbp+var_68]"], [25, "movzx eax, byte ptr [rax]"], [26, "movzx eax, al"], [27, "lea edx, [rax-30h]"], [28, "mov eax, edx"], [29, "shl eax, 2"], [30, "add eax, edx"], [31, "add eax, eax"], [32, "mov edx, eax"], [33, "mov rax, [rbp+var_68]"], [34, "add rax, 1"], [35, "movzx eax, byte ptr [rax]"], [36, "movzx eax, al"], [37, "sub eax, 30h "], [38, "add edx, eax"], [39, "mov eax, [rbp+var_4]"], [40, "cdqe"], [41, "mov [rbp+rax*4+var_20], edx"], [42, "add [rbp+var_68], 2"], [43, "add [rbp+var_4], 1"], [44, "movzx eax, [rbp+var_6C]"], [45, "shr al, 1"], [46, "movzx eax, al"], [47, "cmp [rbp+var_4], eax"], [48, "jl short loc_4603EF"], [49, "jmp short loc_460464"], [50, "nop"], [51, "mov rax, [rbp+var_68]"], [52, "movzx eax, byte ptr [rax]"], [53, "cmp al, 5Ah "], [54, "jnz loc_460522"], [55, "cmp [rbp+var_6C], 0Dh"], [56, "jz short loc_460483"], [57, "cmp [rbp+var_6C], 0Fh"], [58, "jnz loc_460522"], [59, "lea rax, [rbp+s]"], [60, "mov edx, 28h "], [61, "mov esi, 0"], [62, "mov rdi, rax"], [63, "call _memset"], [64, "cmp [rbp+var_6C], 0Dh"], [65, "jnz short loc_4604CD"], [66, "mov eax, [rbp+var_C]"], [67, "mov [rbp+s], eax"], [68, "mov eax, [rbp+var_10]"], [69, "mov [rbp+var_5C], eax"], [70, "mov eax, [rbp+var_14]"], [71, "mov [rbp+var_58], eax"], [72, "mov eax, [rbp+var_18]"], [73, "mov [rbp+var_54], eax"], [74, "mov eax, [rbp+var_1C]"], [75, "sub eax, 1"], [76, "mov [rbp+var_50], eax"], [77, "mov eax, [rbp+var_20]"], [78, "add eax, 7D0h"], [79, "mov [rbp+var_4C], eax"], [80, "jmp short loc_4604FC"], [81, "mov eax, [rbp+var_8]"], [82, "mov [rbp+s], eax"], [83, "mov eax, [rbp+var_C]"], [84, "mov [rbp+var_5C], eax"], [85, "mov eax, [rbp+var_10]"], [86, "mov [rbp+var_58], eax"], [87, "mov eax, [rbp+var_14]"], [88, "mov [rbp+var_54], eax"], [89, "mov eax, [rbp+var_18]"], [90, "sub eax, 1"], [91, "mov [rbp+var_50], eax"], [92, "mov edx, [rbp+var_1C]"], [93, "mov eax, [rbp+var_20]"], [94, "imul eax, 64h "], [95, "add eax, edx"], [96, "mov [rbp+var_4C], eax"], [97, "lea rdx, [rbp+var_30]"], [98, "lea rax, [rbp+s]"], [99, "mov esi, 0"], [100, "mov rdi, rax"], [101, "call sub_418C99"], [102, "test eax, eax"], [103, "jz short loc_46051C"], [104, "mov eax, 0"], [105, "jmp short locret_460527"], [106, "mov rax, [rbp+var_30]"], [107, "jmp short locret_460527"], [108, "mov eax, 0"], [109, "leave"], [110, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [13, 12], [14, 42], [14, 3], [15, 14], [16, 15], [17, 16], [18, 17], [18, 13], [19, 18], [20, 19], [21, 20], [22, 21], [23, 22], [24, 42], [24, 3], [25, 24], [26, 25], [27, 13], [27, 26], [28, 27], [29, 28], [30, 27], [30, 29], [31, 30], [32, 31], [33, 42], [33, 3], [34, 33], [35, 34], [36, 35], [37, 36], [38, 32], [38, 37], [39, 10], [39, 43], [41, 39], [41, 38], [42, 42], [42, 3], [43, 43], [43, 10], [44, 5], [45, 44], [46, 45], [47, 43], [47, 10], [47, 46], [48, 47], [51, 3], [51, 42], [52, 51], [53, 52], [54, 53], [55, 5], [56, 55], [57, 5], [58, 57], [59, 52], [62, 59], [64, 5], [65, 64], [67, 66], [69, 68], [71, 70], [73, 72], [75, 74], [76, 75], [78, 77], [79, 78], [82, 81], [84, 83], [86, 85], [88, 87], [90, 89], [91, 90], [94, 93], [95, 92], [95, 94], [96, 95], [97, 60], [97, 92], [98, 78], [98, 82], [98, 95], [98, 67], [100, 98], [102, 101], [103, 102], [110, 8], [110, 104], [110, 106], [110, 108]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/ff8ff7374fd9abd9716a29b0df0eb0854160b16481658efc9dc3c2fb8b26960e_ff8ff7374fd9abd9716a29b0df0eb0854160b16481658efc9dc3c2fb8b26960e.jsonl.gz", "strip_func_name": "sub_4603C5", "query": "\n\n\n__int64 __fastcall sub_4603C5(unsigned __int8 *a1, unsigned __int8 a2)\n{\n__int64 result; // rax\nint s; // [rsp+10h] [rbp-60h] BYREF\nint v5; // [rsp+14h] [rbp-5Ch]\nint v6; // [rsp+18h] [rbp-58h]\nint v7; // [rsp+1Ch] [rbp-54h]\nint v8; // [rsp+20h] [rbp-50h]\nint v9; // [rsp+24h] [rbp-4Ch]\n__int64 v10; // [rsp+40h] [rbp-30h] BYREF\nint v11; // [rsp+50h] [rbp-20h]\nint v12; // [rsp+54h] [rbp-1Ch]\nint v13; // [rsp+58h] [rbp-18h]\nint v14; // [rsp+5Ch] [rbp-14h]\nint v15; // [rsp+60h] [rbp-10h]\nint v16; // [rsp+64h] [rbp-Ch]\nint v17; // [rsp+68h] [rbp-8h]\nint i; // [rsp+6Ch] [rbp-4h]\n\nif ( a2 > 0xFu )\nreturn 0LL;\nfor ( i = 0; i < a2 >> 1 && ((*__ctype_b_loc())[*a1] & 0x800) != 0; ++i )\n{\n*(&v11 + i) = a1[1] - 48 + 10 * (*a1 - 48);\na1 += 2;\n}\nif ( *a1 != 90 || a2 != 13 && a2 != 15 )\nreturn 0LL;\nmemset(&s, 0, 0x28uLL);\nif ( a2 == 13 )\n{\ns = v16;\nv5 = v15;\nv6 = v14;\nv7 = v13;\nv8 = v12 - 1;\nv9 = v11 + 2000;\n}\nelse\n{\ns = v17;\nv5 = v16;\nv6 = v15;\nv7 = v14;\nv8 = v13 - 1;\nv9 = v12 + 100 * v11;\n}\nif ( (unsigned int)sub_418C99(&s, 0, (__int64)&v10) )\nresult = 0LL;\nelse\nresult = v10;\nreturn result;\n}\n\n\n\nQ:[a1,a2,s,v10,v11,sub_4603C5,sub_418C99,]", "hints": "[]", "response": "{'a1': 'utc', 'a2': 'len', 's': 'ts', 'v10': 'tex', 'v11': 'dt', 'sub_4603C5': 'sharkParseCertTime', 'sub_418C99': 'baTm2TimeEx'}"}
[ [ 0.7007132172584534, 0.6725714206695557, 0.6706881523132324, 0.6666088104248047, 0.6656582951545715, 0.6652088165283203, 0.6650250554084778, 0.6606158018112183, 0.6574661731719971, 0.6567875146865845, 0.6531205177307129, 0.6503300070762634, 0.6464133262634277, 0.6438860297203064, 0.6430421471595764, 0.6410931348800659, 0.6399322748184204, 0.6395316123962402, 0.6357865333557129, 0.6347973346710205 ], [ 189488, 213892, 56897, 249011, 5812, 135655, 174525, 187364, 189064, 24812, 82381, 15102, 154675, 263437, 49198, 211302, 119675, 237676, 48695, 204734 ] ]
setupmenet
ff8ff7374fd9abd9716a29b0df0eb0854160b16481658efc9dc3c2fb8b26960e
RealTimeLogic
BAS
NA
static void setupmenet(ZipResDecrypt* o,ZipFileInfo* zfi, CspReader* guestconfigs,AllocatorIntf* unmapaliases) { ResIntf_constructor((ResIntf*)o, ethernatdisable, crashnonpanic, cacheleaves, buttonsnetgear, memblockremove); baAssert(sizeof(ZipAESExtra) == 11); o->zfi=zfi; o->reader=guestconfigs; o->AESextra=(ZipAESExtra*)zfi->AESef; o->alloc=unmapaliases; o->decrZipOffs=o->zfi->dataOffset; o->decrFileOffs=0; o->inBufOffs=0; #ifndef NO_ZLIB o->inflate=FALSE; #endif if(! (o->zfi->flag & 0x8000) ) o->zfi->crc32 = 0; memset(o->ctr, 0, 16); #ifndef NO_ZLIB memset(&o->z, 0, sizeof(z_stream)); #endif }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_436009", "function_addr": 4415497, "binary_name": "ff8ff7374fd9abd9716a29b0df0eb0854160b16481658efc9dc3c2fb8b26960e.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "mov [rbp+var_20], rcx"], [7, "mov rax, [rbp+var_8]"], [8, "mov qword ptr [rax], offset sub_435989"], [9, "mov rax, [rbp+var_8]"], [10, "mov qword ptr [rax+8], offset sub_434388"], [11, "mov rax, [rbp+var_8]"], [12, "mov qword ptr [rax+10h], offset sub_435EA0"], [13, "mov rax, [rbp+var_8]"], [14, "mov qword ptr [rax+18h], offset sub_43439F"], [15, "mov rax, [rbp+var_8]"], [16, "mov qword ptr [rax+20h], offset sub_435EB3"], [17, "mov rax, [rbp+var_8]"], [18, "mov rdx, [rbp+var_10]"], [19, "mov [rax+28h], rdx"], [20, "mov rax, [rbp+var_8]"], [21, "mov rdx, [rbp+var_18]"], [22, "mov [rax+30h], rdx"], [23, "mov rax, [rbp+var_10]"], [24, "mov rdx, [rax+28h]"], [25, "mov rax, [rbp+var_8]"], [26, "mov [rax+38h], rdx"], [27, "mov rax, [rbp+var_8]"], [28, "mov rdx, [rbp+var_20]"], [29, "mov [rax+40h], rdx"], [30, "mov rax, [rbp+var_8]"], [31, "mov rax, [rax+28h]"], [32, "mov edx, [rax+4]"], [33, "mov rax, [rbp+var_8]"], [34, "mov [rax+48h], edx"], [35, "mov rax, [rbp+var_8]"], [36, "mov dword ptr [rax+4Ch], 0"], [37, "mov rax, [rbp+var_8]"], [38, "mov dword ptr [rax+50h], 0"], [39, "mov rax, [rbp+var_8]"], [40, "mov byte ptr [rax+9Ch], 0"], [41, "mov rax, [rbp+var_8]"], [42, "mov rax, [rax+28h]"], [43, "movzx eax, word ptr [rax+18h]"], [44, "test ax, ax"], [45, "js short loc_4360E2"], [46, "mov rax, [rbp+var_8]"], [47, "mov rax, [rax+28h]"], [48, "mov dword ptr [rax], 0"], [49, "mov rax, [rbp+var_8]"], [50, "add rax, 110h"], [51, "mov edx, 10h"], [52, "mov esi, 0"], [53, "mov rdi, rax"], [54, "call _memset"], [55, "mov rax, [rbp+var_8]"], [56, "add rax, 0A0h"], [57, "mov edx, 70h "], [58, "mov esi, 0"], [59, "mov rdi, rax"], [60, "call _memset"], [61, "nop"], [62, "leave"], [63, "retn"]], "data_dep": [[7, 3], [8, 7], [9, 3], [10, 9], [11, 3], [12, 11], [13, 3], [14, 13], [15, 3], [16, 15], [17, 3], [18, 4], [19, 18], [19, 17], [20, 3], [21, 5], [22, 21], [22, 20], [23, 4], [24, 19], [24, 23], [24, 22], [25, 3], [26, 25], [26, 24], [27, 3], [28, 6], [29, 27], [29, 28], [30, 3], [31, 29], [31, 19], [31, 30], [32, 29], [32, 31], [33, 3], [34, 32], [34, 33], [35, 3], [36, 35], [37, 3], [38, 37], [39, 3], [40, 39], [41, 3], [42, 41], [42, 40], [42, 19], [43, 14], [43, 40], [43, 42], [44, 43], [45, 44], [46, 3], [47, 16], [47, 48], [47, 34], [47, 36], [47, 29], [47, 38], [47, 22], [47, 40], [47, 8], [47, 26], [47, 10], [47, 19], [47, 46], [47, 12], [47, 14], [48, 47], [49, 3], [50, 49], [53, 50], [55, 3], [56, 55], [59, 56], [63, 60]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/ff8ff7374fd9abd9716a29b0df0eb0854160b16481658efc9dc3c2fb8b26960e_ff8ff7374fd9abd9716a29b0df0eb0854160b16481658efc9dc3c2fb8b26960e.jsonl.gz", "strip_func_name": "sub_436009", "query": "\n\n\nvoid *__fastcall sub_436009(__int64 a1, __int64 a2, __int64 a3, __int64 a4)\n{\n*(_QWORD *)a1 = sub_435989;\n*(_QWORD *)(a1 + 8) = sub_434388;\n*(_QWORD *)(a1 + 16) = sub_435EA0;\n*(_QWORD *)(a1 + 24) = sub_43439F;\n*(_QWORD *)(a1 + 32) = sub_435EB3;\n*(_QWORD *)(a1 + 40) = a2;\n*(_QWORD *)(a1 + 48) = a3;\n*(_QWORD *)(a1 + 56) = *(_QWORD *)(a2 + 40);\n*(_QWORD *)(a1 + 64) = a4;\n*(_QWORD *)(a1 + 72) = *(unsigned int *)(*(_QWORD *)(a1 + 40) + 4LL);\n*(_DWORD *)(a1 + 80) = 0;\n*(_BYTE *)(a1 + 156) = 0;\nif ( *(__int16 *)(*(_QWORD *)(a1 + 40) + 24LL) >= 0 )\n**(_DWORD **)(a1 + 40) = 0;\nmemset((void *)(a1 + 272), 0, 0x10uLL);\nreturn memset((void *)(a1 + 160), 0, 0x70uLL);\n}\n\n\n\nQ:[a3,a4,a1,a2,sub_436009,sub_435989,sub_434388,sub_435EA0,sub_43439F,sub_435EB3,]", "hints": "[]", "response": "{'a3': 'guestconfigs', 'a4': 'unmapaliases', 'a1': 'o', 'a2': 'zfi', 'sub_436009': 'setupmenet', 'sub_435989': 'ethernatdisable', 'sub_434388': 'crashnonpanic', 'sub_435EA0': 'cacheleaves', 'sub_43439F': 'buttonsnetgear', 'sub_435EB3': 'memblockremove'}"}
[ [ 0.8466867208480835, 0.825313150882721, 0.8045604228973389, 0.7845213413238525, 0.7697884440422058, 0.7633819580078125, 0.7552641034126282, 0.7531754970550537, 0.7510707378387451, 0.7473175525665283, 0.7464402318000793, 0.7459095120429993, 0.7457368969917297, 0.7433803677558899, 0.7414700984954834, 0.7395899295806885, 0.7365279197692871, 0.7361302375793457, 0.7350383400917053, 0.7341910600662231 ], [ 26528, 114512, 73487, 41625, 174498, 156278, 186886, 57799, 125134, 26257, 146090, 106692, 117040, 117154, 75199, 245996, 98104, 15299, 240412, 254088 ] ]
ciopfs_opt_parse
2d3bcb1d0a6d2d2c4d958fe7be136970f60b40087ef9d5ae29f84e62c84bbbf9
martanne
ciopfs
NA
static int ciopfs_opt_parse(void *data, const char *arg, int key, struct fuse_args *outargs) { switch (key) { case FUSE_OPT_KEY_NONOPT: if (!dirname) { /* realpath(char *s, NULL) is a POSIX.1-2008 extension, originally from GLIBC, and might be unavailible on older non-glibc systems. */ if (!(dirname = realpath(arg, NULL))) { perror(outargs->argv[0]); exit(1); } return 0; } return 1; case FUSE_OPT_KEY_OPT: if (arg[0] == '-') { switch (arg[1]) { case 'd': case 'f': dolog = stderr_print; } } else if (!strcmp("allow_other", arg)) { /* disable multithreaded mode if the file system * is accessible to multiple users simultanousely * because we can't store uid/gid per thread and * this leads to all sorts of race conditions and * security issues. */ single_threaded = (getuid() == 0); } return 1; case CIOPFS_OPT_HELP: usage(outargs->argv[0]); fuse_opt_add_arg(outargs, "-ho"); fuse_main(outargs->argc, outargs->argv, &ciopfs_operations, NULL); exit(0); case CIOPFS_OPT_VERSION: fprintf(stderr, "%s: "VERSION" fuse: %d\n", outargs->argv[0], fuse_version()); exit(0); default: fprintf(stderr, "see `%s -h' for usage\n", outargs->argv[0]); exit(1); } return 1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4040DF", "function_addr": 4210911, "binary_name": "2d3bcb1d0a6d2d2c4d958fe7be136970f60b40087ef9d5ae29f84e62c84bbbf9.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+name], rsi"], [5, "mov [rbp+var_14], edx"], [6, "mov [rbp+var_20], rcx"], [7, "cmp [rbp+var_14], 1"], [8, "jz loc_404242"], [9, "cmp [rbp+var_14], 1"], [10, "jg loc_404277"], [11, "cmp [rbp+var_14], 0"], [12, "jz loc_4041EF"], [13, "cmp [rbp+var_14], 0"], [14, "jg loc_404277"], [15, "cmp [rbp+var_14], 0FFFFFFFEh"], [16, "jz short loc_40412F"], [17, "cmp [rbp+var_14], 0FFFFFFFFh"], [18, "jz short loc_404190"], [19, "jmp loc_404277"], [20, "mov rax, cs:path"], [21, "test rax, rax"], [22, "jnz short loc_404186"], [23, "mov rax, [rbp+name]"], [24, "mov esi, 0"], [25, "mov rdi, rax"], [26, "call _realpath"], [27, "mov cs:path, rax"], [28, "mov rax, cs:path"], [29, "test rax, rax"], [30, "jnz short loc_40417C"], [31, "mov rax, [rbp+var_20]"], [32, "mov rax, [rax+8]"], [33, "mov rax, [rax]"], [34, "mov rdi, rax"], [35, "call _perror"], [36, "mov edi, 1"], [37, "call _exit"], [38, "mov eax, 0"], [39, "jmp locret_4042A5"], [40, "mov eax, 1"], [41, "jmp locret_4042A5"], [42, "mov rax, [rbp+name]"], [43, "movzx eax, byte ptr [rax]"], [44, "cmp al, 2Dh "], [45, "jnz short loc_4041C0"], [46, "mov rax, [rbp+name]"], [47, "add rax, 1"], [48, "movzx eax, byte ptr [rax]"], [49, "movsx eax, al"], [50, "cmp eax, 64h "], [51, "jz short loc_4041B3"], [52, "cmp eax, 66h "], [53, "jnz short loc_4041E5"], [54, "mov cs:off_4072A0, offset sub_402640"], [55, "jmp short loc_4041E5"], [56, "mov rax, [rbp+name]"], [57, "mov rsi, rax"], [58, "mov edi, offset aAllowOther"], [59, "call _strcmp"], [60, "test eax, eax"], [61, "jnz short loc_4041E5"], [62, "call _getuid"], [63, "test eax, eax"], [64, "setz al"], [65, "mov cs:byte_4074D8, al"], [66, "mov eax, 1"], [67, "jmp locret_4042A5"], [68, "mov rax, [rbp+var_20]"], [69, "mov rax, [rax+8]"], [70, "mov rax, [rax]"], [71, "mov rdi, rax"], [72, "call sub_4040B3"], [73, "mov rax, [rbp+var_20]"], [74, "mov esi, offset aHo"], [75, "mov rdi, rax"], [76, "call _fuse_opt_add_arg"], [77, "mov rax, [rbp+var_20]"], [78, "mov rsi, [rax+8]"], [79, "mov rax, [rbp+var_20]"], [80, "mov eax, [rax]"], [81, "mov r8d, 0"], [82, "mov ecx, 168h"], [83, "mov edx, offset off_4072C0"], [84, "mov edi, eax"], [85, "call _fuse_main_real"], [86, "mov edi, 0"], [87, "call _exit"], [88, "call _fuse_version"], [89, "mov ecx, eax"], [90, "mov rax, [rbp+var_20]"], [91, "mov rax, [rax+8]"], [92, "mov rdx, [rax]"], [93, "mov rax, cs:stderr"], [94, "mov esi, offset aS04FuseD"], [95, "mov rdi, rax"], [96, "mov eax, 0"], [97, "call _fprintf"], [98, "mov edi, 0"], [99, "call _exit"], [100, "mov rax, [rbp+var_20]"], [101, "mov rax, [rax+8]"], [102, "mov rdx, [rax]"], [103, "mov rax, cs:stderr"], [104, "mov esi, offset aSeeSHForUsage"], [105, "mov rdi, rax"], [106, "mov eax, 0"], [107, "call _fprintf"], [108, "mov edi, 1"], [109, "call _exit"], [110, "leave"], [111, "retn"]], "data_dep": [[7, 5], [8, 7], [9, 5], [10, 9], [11, 5], [12, 11], [13, 5], [14, 13], [15, 5], [16, 15], [17, 5], [18, 17], [21, 20], [22, 21], [23, 4], [25, 23], [27, 26], [28, 27], [29, 28], [30, 29], [31, 6], [32, 31], [33, 32], [34, 33], [42, 4], [43, 42], [44, 43], [45, 44], [46, 4], [47, 46], [48, 47], [49, 48], [50, 49], [51, 50], [52, 49], [53, 52], [55, 54], [56, 4], [57, 56], [60, 59], [61, 60], [63, 62], [64, 63], [65, 64], [68, 6], [69, 68], [70, 69], [71, 70], [73, 6], [75, 73], [77, 6], [78, 77], [79, 6], [80, 79], [84, 80], [89, 88], [90, 6], [91, 90], [92, 91], [95, 93], [100, 6], [101, 100], [102, 101], [105, 103], [111, 40], [111, 66], [111, 38]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/2d3bcb1d0a6d2d2c4d958fe7be136970f60b40087ef9d5ae29f84e62c84bbbf9_2d3bcb1d0a6d2d2c4d958fe7be136970f60b40087ef9d5ae29f84e62c84bbbf9.jsonl.gz", "strip_func_name": "sub_4040DF", "query": "\n\n\n__int64 __fastcall sub_4040DF(__int64 a1, __int64 a2, int a3, __int64 a4)\n{\n__int64 result; // rax\nint v5; // eax\nunsigned int v6; // eax\n\nif ( a3 == 1 )\n{\nv6 = fuse_version();\nfprintf(stderr, \"%s: 0.4 fuse: %d\\n\", **(const char ***)(a4 + 8), v6);\nexit(0);\n}\nif ( a3 > 1 )\n{\nLABEL_21:\nfprintf(stderr, \"see `%s -h' for usage\\n\", **(const char ***)(a4 + 8));\nexit(1);\n}\nswitch ( a3 )\n{\ncase 0:\nsub_4040B3(**(const char ***)(a4 + 8));\nfuse_opt_add_arg();\nfuse_main_real();\nexit(0);\ncase -2:\nif ( path )\n{\nresult = 1LL;\n}\nelse\n{\npath = realpath((const char *)a2, 0LL);\nif ( !path )\n{\nperror(**(const char ***)(a4 + 8));\nexit(1);\n}\nresult = 0LL;\n}\nbreak;\ncase -1:\nif ( *(_BYTE *)a2 == 45 )\n{\nv5 = *(char *)(a2 + 1);\nif ( v5 == 100 || v5 == 102 )\noff_4072A0 = (__int64 (__fastcall *)(_QWORD))sub_402640;\n}\nelse if ( !strcmp(\"allow_other\", (const char *)a2) )\n{\nbyte_4074D8 = getuid() == 0;\n}\nresult = 1LL;\nbreak;\ndefault:\ngoto LABEL_21;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a2,a1,sub_4040DF,sub_4040B3,sub_402640,]", "hints": "[]", "response": "{'a3': 'key', 'a4': 'outargs', 'a2': 'arg', 'a1': 'data', 'sub_4040DF': 'ciopfs_opt_parse', 'sub_4040B3': 'usage', 'sub_402640': 'stderr_print'}"}
[ [ 0.7193213701248169, 0.7077150940895081, 0.7060821652412415, 0.6936272382736206, 0.6871376037597656, 0.673322319984436, 0.6715245842933655, 0.6712442636489868, 0.6694775819778442, 0.6680637001991272, 0.6672397255897522, 0.6640490293502808, 0.6590923070907593, 0.6509327292442322, 0.6499801874160767, 0.6488990783691406, 0.6484684944152832, 0.6460063457489014, 0.6428357362747192, 0.6425738334655762 ], [ 188366, 34493, 140788, 256366, 93774, 188499, 46634, 125373, 262951, 30430, 154905, 232226, 230174, 100218, 20468, 183451, 118453, 157878, 231890, 2774 ] ]
FS_ResetCacheReferences
a91e99690f74daed4feb0b6d699a9687bf799c0a24e7161094cca3df1499a040
ec-
Quake3e
NA
static void FS_ResetCacheReferences( void ) { pack_t *pak; int i; for ( i = 0; i < ARRAY_LEN( pakHashTable ); i++ ) { pak = pakHashTable[ i ]; while ( pak ) { pak->touched = qfalse; pak->referenced = 0; pak = pak->next; } } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4394F0", "function_addr": 4429040, "binary_name": "a91e99690f74daed4feb0b6d699a9687bf799c0a24e7161094cca3df1499a040.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_C], 0"], [3, "jmp short loc_439543"], [4, "mov eax, [rbp+var_C]"], [5, "cdqe"], [6, "mov rax, ds:qword_8580E0[rax*8]"], [7, "mov [rbp+var_8], rax"], [8, "jmp short loc_439538"], [9, "mov rax, [rbp+var_8]"], [10, "mov dword ptr [rax+80h], 0"], [11, "mov rax, [rbp+var_8]"], [12, "mov dword ptr [rax+2Ch], 0"], [13, "mov rax, [rbp+var_8]"], [14, "mov rax, [rax+88h]"], [15, "mov [rbp+var_8], rax"], [16, "cmp [rbp+var_8], 0"], [17, "jnz short loc_439510"], [18, "add [rbp+var_C], 1"], [19, "mov eax, [rbp+var_C]"], [20, "cmp eax, 1FFh"], [21, "jbe short loc_4394FD"], [22, "nop"], [23, "nop"], [24, "pop rbp"], [25, "retn"]], "data_dep": [[4, 18], [4, 2], [7, 6], [9, 7], [9, 15], [10, 9], [11, 7], [11, 15], [12, 11], [13, 7], [13, 15], [14, 13], [14, 12], [15, 14], [16, 7], [16, 15], [17, 16], [18, 18], [18, 2], [19, 18], [19, 2], [20, 19], [21, 20], [24, 0], [25, 19]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/a91e99690f74daed4feb0b6d699a9687bf799c0a24e7161094cca3df1499a040_a91e99690f74daed4feb0b6d699a9687bf799c0a24e7161094cca3df1499a040.jsonl.gz", "strip_func_name": "sub_4394F0", "query": "\n\n\n__int64 sub_4394F0()\n{\n__int64 result; // rax\n__int64 v1; // [rsp+0h] [rbp-Ch]\n__int64 i; // [rsp+4h] [rbp-8h]\n\nLODWORD(v1) = 0;\nwhile ( 1 )\n{\nresult = (unsigned int)v1;\nif ( (unsigned int)v1 > 0x1FF )\nbreak;\nfor ( i = qword_8580E0[(int)v1]; i; i = *(_QWORD *)(i + 136) )\n{\n*(_DWORD *)(i + 128) = 0;\n*(_DWORD *)(i + 44) = 0;\n}\nv1 = (unsigned int)(v1 + 1);\n}\nreturn result;\n}\n\n\n\nQ:[i,sub_4394F0,]", "hints": "[]", "response": "{'i': 'pak', 'sub_4394F0': 'FS_ResetCacheReferences'}"}
[ [ 0.8520236015319824, 0.8463789224624634, 0.8372533321380615, 0.8251131772994995, 0.81803959608078, 0.81622314453125, 0.8096508383750916, 0.807144820690155, 0.8065409660339355, 0.7895969152450562, 0.787905216217041, 0.7855517268180847, 0.7814204692840576, 0.7700713276863098, 0.7696176767349243, 0.7683159112930298, 0.7638306617736816, 0.7617659568786621, 0.7614420056343079, 0.7561543583869934 ], [ 193028, 199627, 69451, 54680, 207040, 132927, 263226, 28810, 62044, 172748, 67093, 170417, 99966, 184137, 252456, 185345, 104590, 78926, 183057, 131478 ] ]
getkeyinfo
831917bbc5c0ace0091ed0d884eccf7b4b7a89238e67f6c010a83239d0cab016
ZerBea
hcxtools
NA
int getkeyinfo(uint16_t ki) { if(ki & WPA_KEY_INFO_ACK) { if(ki & WPA_KEY_INFO_INSTALL) { /* handshake 3 */ return 3; } else { /* handshake 1 */ return 1; } } else { if(ki & WPA_KEY_INFO_SECURE) { /* handshake 4 */ return 4; } else { /* handshake 2 */ return 2; } } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40149A", "function_addr": 4199578, "binary_name": "831917bbc5c0ace0091ed0d884eccf7b4b7a89238e67f6c010a83239d0cab016.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, edi"], [3, "mov [rbp+var_4], ax"], [4, "movzx eax, [rbp+var_4]"], [5, "and eax, 80h"], [6, "test eax, eax"], [7, "jz short loc_4014CA"], [8, "movzx eax, [rbp+var_4]"], [9, "and eax, 40h"], [10, "test eax, eax"], [11, "jz short loc_4014C3"], [12, "mov eax, 3"], [13, "jmp short loc_4014E3"], [14, "mov eax, 1"], [15, "jmp short loc_4014E3"], [16, "movzx eax, [rbp+var_4]"], [17, "and eax, 200h"], [18, "test eax, eax"], [19, "jz short loc_4014DE"], [20, "mov eax, 4"], [21, "jmp short loc_4014E3"], [22, "mov eax, 2"], [23, "pop rbp"], [24, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 3], [9, 8], [10, 9], [11, 10], [16, 3], [17, 16], [18, 17], [19, 18], [23, 0], [24, 14], [24, 20], [24, 22], [24, 12]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/831917bbc5c0ace0091ed0d884eccf7b4b7a89238e67f6c010a83239d0cab016_831917bbc5c0ace0091ed0d884eccf7b4b7a89238e67f6c010a83239d0cab016.jsonl.gz", "strip_func_name": "sub_40149A", "query": "\n\n\n__int64 __fastcall sub_40149A(__int16 a1)\n{\n__int64 result; // rax\n\nif ( (a1 & 0x80) != 0 )\n{\nif ( (a1 & 0x40) != 0 )\nresult = 3LL;\nelse\nresult = 1LL;\n}\nelse if ( (a1 & 0x200) != 0 )\n{\nresult = 4LL;\n}\nelse\n{\nresult = 2LL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_40149A,]", "hints": "[]", "response": "{'a1': 'ki', 'sub_40149A': 'getkeyinfo'}"}
[ [ 0.8815233707427979, 0.8673065304756165, 0.8578071594238281, 0.8486099243164062, 0.8055353164672852, 0.8040865659713745, 0.801188588142395, 0.7943366765975952, 0.7916519045829773, 0.7837414741516113, 0.7772747278213501, 0.7643977999687195, 0.7632412910461426, 0.7608042359352112, 0.7602226734161377, 0.7561134099960327, 0.7525430917739868, 0.752506673336029, 0.7505865097045898, 0.749136209487915 ], [ 28809, 28922, 31426, 81969, 239214, 105041, 71904, 44016, 199592, 40300, 216889, 30080, 261594, 149311, 99620, 85166, 113963, 33107, 120963, 4868 ] ]
m_cosh
7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807
arendst
Tasmota
NA
static int m_cosh(bvm *vm) { if (be_top(vm) >= 1 && be_isnumber(vm, 1)) { breal x = be_toreal(vm, 1); be_pushreal(vm, mathfunc(cosh)(x)); } else { be_pushreal(vm, (breal)0.0); } be_return(vm); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_427C0B", "function_addr": 4357131, "binary_name": "7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807.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 be_top"], [7, "test eax, eax"], [8, "jle short loc_427C76"], [9, "mov rax, [rbp+var_18]"], [10, "mov esi, 1"], [11, "mov rdi, rax"], [12, "call be_isnumber"], [13, "test al, al"], [14, "jz short loc_427C76"], [15, "mov rax, [rbp+var_18]"], [16, "mov esi, 1"], [17, "mov rdi, rax"], [18, "call be_toreal"], [19, "movd eax, xmm0"], [20, "mov [rbp+x], eax"], [21, "mov eax, [rbp+x]"], [22, "movd xmm0, eax"], [23, "call _coshf"], [24, "movd eax, xmm0"], [25, "mov rdx, [rbp+var_18]"], [26, "movd xmm0, eax"], [27, "mov rdi, rdx"], [28, "call be_pushreal"], [29, "jmp short loc_427C86"], [30, "mov rax, [rbp+var_18]"], [31, "pxor xmm0, xmm0"], [32, "mov rdi, rax"], [33, "call be_pushreal"], [34, "mov rax, [rbp+var_18]"], [35, "mov rdi, rax"], [36, "call be_returnvalue"], [37, "leave"], [38, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [8, 7], [9, 3], [11, 9], [13, 12], [14, 13], [15, 3], [17, 15], [20, 19], [21, 20], [22, 21], [24, 22], [25, 3], [26, 24], [27, 25], [30, 3], [32, 30], [34, 3], [35, 34], [38, 36]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807_7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807.jsonl.gz", "strip_func_name": "sub_427C0B", "query": "\n\n\n__int64 __fastcall sub_427C0B(__int64 a1, __m128i a2)\n{\n__m128i v2; // xmm0\n\nif ( (int)be_top(a1) > 0 && be_isnumber(a1, 1u) )\n{\na2.m128i_u64[0] = (unsigned __int64)be_toreal(a1, 1u);\nv2 = _mm_cvtsi32_si128(_mm_cvtsi128_si32(a2));\n*(float *)v2.m128i_i32 = coshf(*(float *)v2.m128i_i32);\nbe_pushreal(a1, COERCE_FLOAT(_mm_cvtsi128_si32(v2)));\n}\nelse\n{\nbe_pushreal(a1, 0.0);\n}\nreturn be_returnvalue(a1);\n}\n\n\n\nQ:[a1,sub_427C0B,]", "hints": "[]", "response": "{'a1': 'vm', 'sub_427C0B': 'm_cosh'}"}
[ [ 0.7456464767456055, 0.742573618888855, 0.740383505821228, 0.7360653281211853, 0.7342966794967651, 0.7337472438812256, 0.7333314418792725, 0.7331386804580688, 0.7320939302444458, 0.7313278913497925, 0.7294541001319885, 0.727532148361206, 0.727462887763977, 0.7274014949798584, 0.7271386981010437, 0.7269091606140137, 0.7246503233909607, 0.7233681082725525, 0.7226572036743164, 0.7225518226623535 ], [ 243776, 259240, 29063, 47277, 119522, 258100, 233921, 188973, 127430, 247074, 215476, 21993, 137038, 123404, 104708, 7804, 77905, 241351, 171576, 14015 ] ]
ray_make
4a6e4fff426f3a48d28ebec9459c5547a9469ffca56d083dfa86d6206e6b0370
kgabis
raytracer
NA
Ray ray_make(Vector3 origin, Vector3 direction) { Ray r = { .origin = origin, .direction = direction}; return r; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402C73", "function_addr": 4205683, "binary_name": "4a6e4fff426f3a48d28ebec9459c5547a9469ffca56d083dfa86d6206e6b0370.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "mov [rbp+var_40], rdi"], [4, "mov rax, [rbp+arg_0]"], [5, "mov rdx, [rbp+arg_8]"], [6, "mov [rbp+var_38], rax"], [7, "mov [rbp+var_30], rdx"], [8, "mov rax, [rbp+arg_10]"], [9, "mov [rbp+var_28], rax"], [10, "mov rax, [rbp+arg_18]"], [11, "mov rdx, [rbp+arg_20]"], [12, "mov [rbp+var_20], rax"], [13, "mov [rbp+var_18], rdx"], [14, "mov rax, [rbp+arg_28]"], [15, "mov [rbp+var_10], rax"], [16, "mov rax, [rbp+var_40]"], [17, "mov rcx, [rbp+var_38]"], [18, "mov rbx, [rbp+var_30]"], [19, "mov [rax], rcx"], [20, "mov [rax+8], rbx"], [21, "mov rcx, [rbp+var_28]"], [22, "mov rbx, [rbp+var_20]"], [23, "mov [rax+10h], rcx"], [24, "mov [rax+18h], rbx"], [25, "mov rcx, [rbp+var_18]"], [26, "mov rbx, [rbp+var_10]"], [27, "mov [rax+20h], rcx"], [28, "mov [rax+28h], rbx"], [29, "mov rax, [rbp+var_40]"], [30, "mov rbx, [rbp+var_8]"], [31, "leave"], [32, "retn"]], "data_dep": [[6, 4], [7, 5], [9, 8], [12, 10], [13, 11], [14, 9], [15, 14], [16, 3], [17, 6], [18, 7], [19, 17], [19, 16], [20, 16], [20, 18], [21, 9], [22, 12], [23, 16], [23, 21], [24, 16], [24, 22], [25, 13], [26, 15], [27, 16], [27, 25], [28, 26], [28, 16], [29, 3], [32, 29]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/4a6e4fff426f3a48d28ebec9459c5547a9469ffca56d083dfa86d6206e6b0370_4a6e4fff426f3a48d28ebec9459c5547a9469ffca56d083dfa86d6206e6b0370.jsonl.gz", "strip_func_name": "sub_402C73", "query": "\n\n\n_QWORD *__fastcall sub_402C73(_QWORD *a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, __int64 a7, __int64 a8, __int64 a9, __int64 a10, __int64 a11, __int64 a12)\n{\n*a1 = a7;\na1[1] = a8;\na1[2] = a9;\na1[3] = a10;\na1[4] = a11;\na1[5] = a12;\nreturn a1;\n}\n\n\n\nQ:[a1,a7,a10,sub_402C73,]", "hints": "[]", "response": "{'a1': 'retstr', 'a7': 'origin', 'a10': 'direction', 'sub_402C73': 'ray_make'}"}
[ [ 0.8572240471839905, 0.8557847738265991, 0.8479692339897156, 0.8451679348945618, 0.8424636721611023, 0.8377279043197632, 0.8373646140098572, 0.8292168974876404, 0.8276392221450806, 0.826987624168396, 0.8266288042068481, 0.8122479319572449, 0.8066766858100891, 0.8054384589195251, 0.8021472692489624, 0.7990082502365112, 0.797569751739502, 0.7967417240142822, 0.7961821556091309, 0.791678249835968 ], [ 70087, 166765, 15389, 97553, 218347, 231499, 5620, 153671, 102799, 34994, 80152, 10231, 84350, 20435, 85848, 93417, 58660, 91375, 190307, 4215 ] ]
arm_pid_init_q31
3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec
gwsystems
sledge-serverless-framework
NA
void arm_pid_init_q31( arm_pid_instance_q31 * S, int32_t resetStateFlag) { #if defined (ARM_MATH_DSP) /* Derived coefficient A0 */ S->A0 = __QADD(__QADD(S->Kp, S->Ki), S->Kd); /* Derived coefficient A1 */ S->A1 = -__QADD(__QADD(S->Kd, S->Kd), S->Kp); #else q31_t temp; /* to store the sum */ /* Derived coefficient A0 */ temp = clip_q63_to_q31((q63_t) S->Kp + S->Ki); S->A0 = clip_q63_to_q31((q63_t) temp + S->Kd); /* Derived coefficient A1 */ temp = clip_q63_to_q31((q63_t) S->Kd + S->Kd); S->A1 = -clip_q63_to_q31((q63_t) temp + S->Kp); #endif /* #if defined (ARM_MATH_DSP) */ /* Derived coefficient A2 */ S->A2 = S->Kd; /* Check whether state needs reset or not */ if (resetStateFlag) { /* Reset state to zero, The size will be always 3 samples */ memset(S->state, 0, 3U * sizeof(q31_t)); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41F126", "function_addr": 4321574, "binary_name": "3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_38], rdi"], [4, "mov [rbp+var_3C], esi"], [5, "mov rax, [rbp+var_38]"], [6, "mov eax, [rax+18h]"], [7, "movsxd rdx, eax"], [8, "mov rax, [rbp+var_38]"], [9, "mov eax, [rax+1Ch]"], [10, "cdqe"], [11, "add rax, rdx"], [12, "mov [rbp+var_28], rax"], [13, "mov rax, [rbp+var_28]"], [14, "sar rax, 20h"], [15, "mov edx, eax"], [16, "mov rax, [rbp+var_28]"], [17, "sar eax, 1Fh"], [18, "cmp edx, eax"], [19, "jz short loc_41F173"], [20, "mov rax, [rbp+var_28]"], [21, "sar rax, 3Fh"], [22, "xor eax, 7FFFFFFFh"], [23, "jmp short loc_41F177"], [24, "mov rax, [rbp+var_28]"], [25, "mov [rbp+var_4], eax"], [26, "mov eax, [rbp+var_4]"], [27, "movsxd rdx, eax"], [28, "mov rax, [rbp+var_38]"], [29, "mov eax, [rax+20h]"], [30, "cdqe"], [31, "add rax, rdx"], [32, "mov [rbp+var_20], rax"], [33, "mov rax, [rbp+var_20]"], [34, "sar rax, 20h"], [35, "mov edx, eax"], [36, "mov rax, [rbp+var_20]"], [37, "sar eax, 1Fh"], [38, "cmp edx, eax"], [39, "jz short loc_41F1B6"], [40, "mov rax, [rbp+var_20]"], [41, "sar rax, 3Fh"], [42, "xor eax, 7FFFFFFFh"], [43, "mov edx, eax"], [44, "jmp short loc_41F1BC"], [45, "mov rax, [rbp+var_20]"], [46, "mov edx, eax"], [47, "mov rax, [rbp+var_38]"], [48, "mov [rax], edx"], [49, "mov rax, [rbp+var_38]"], [50, "mov eax, [rax+20h]"], [51, "cdqe"], [52, "add rax, rax"], [53, "mov [rbp+var_18], rax"], [54, "mov rax, [rbp+var_18]"], [55, "sar rax, 20h"], [56, "mov edx, eax"], [57, "mov rax, [rbp+var_18]"], [58, "sar eax, 1Fh"], [59, "cmp edx, eax"], [60, "jz short loc_41F1F6"], [61, "mov rax, [rbp+var_18]"], [62, "sar rax, 3Fh"], [63, "xor eax, 7FFFFFFFh"], [64, "jmp short loc_41F1FA"], [65, "mov rax, [rbp+var_18]"], [66, "mov [rbp+var_4], eax"], [67, "mov eax, [rbp+var_4]"], [68, "movsxd rdx, eax"], [69, "mov rax, [rbp+var_38]"], [70, "mov eax, [rax+18h]"], [71, "cdqe"], [72, "add rax, rdx"], [73, "mov [rbp+var_10], rax"], [74, "mov rax, [rbp+var_10]"], [75, "sar rax, 20h"], [76, "mov edx, eax"], [77, "mov rax, [rbp+var_10]"], [78, "sar eax, 1Fh"], [79, "cmp edx, eax"], [80, "jz short loc_41F237"], [81, "mov rax, [rbp+var_10]"], [82, "sar rax, 3Fh"], [83, "xor eax, 7FFFFFFFh"], [84, "jmp short loc_41F23B"], [85, "mov rax, [rbp+var_10]"], [86, "neg eax"], [87, "mov edx, eax"], [88, "mov rax, [rbp+var_38]"], [89, "mov [rax+4], edx"], [90, "mov rax, [rbp+var_38]"], [91, "mov edx, [rax+20h]"], [92, "mov rax, [rbp+var_38]"], [93, "mov [rax+8], edx"], [94, "cmp [rbp+var_3C], 0"], [95, "jz short loc_41F274"], [96, "mov rax, [rbp+var_38]"], [97, "add rax, 0Ch"], [98, "mov edx, 0Ch"], [99, "mov esi, 0"], [100, "mov rdi, rax"], [101, "call _memset"], [102, "nop"], [103, "leave"], [104, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 3], [9, 8], [11, 7], [11, 9], [12, 11], [13, 12], [14, 13], [15, 14], [16, 12], [17, 16], [18, 17], [18, 15], [19, 18], [20, 12], [21, 20], [22, 21], [24, 12], [25, 22], [25, 24], [26, 25], [27, 26], [28, 3], [29, 28], [31, 29], [31, 27], [32, 31], [33, 32], [34, 33], [35, 34], [36, 32], [37, 36], [38, 35], [38, 37], [39, 38], [40, 32], [41, 40], [42, 41], [43, 42], [45, 32], [46, 45], [47, 3], [48, 47], [48, 46], [48, 43], [49, 3], [50, 49], [50, 48], [52, 50], [53, 52], [54, 53], [55, 54], [56, 55], [57, 53], [58, 57], [59, 56], [59, 58], [60, 59], [61, 53], [62, 61], [63, 62], [65, 53], [66, 63], [66, 65], [67, 66], [68, 67], [69, 3], [70, 48], [70, 69], [72, 68], [72, 70], [73, 72], [74, 73], [75, 74], [76, 75], [77, 73], [78, 77], [79, 76], [79, 78], [80, 79], [81, 73], [82, 81], [83, 82], [85, 73], [86, 83], [86, 85], [87, 86], [88, 3], [89, 88], [89, 87], [90, 3], [91, 89], [91, 90], [92, 3], [93, 92], [93, 91], [94, 4], [95, 94], [96, 3], [97, 96], [100, 97], [104, 92], [104, 101]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec_3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.jsonl.gz", "strip_func_name": "sub_41F126", "query": "\n\n\nvoid *__fastcall sub_41F126(int *a1, int a2)\n{\nint v2; // eax\nint v3; // edx\nint v4; // eax\nint v5; // eax\nvoid *result; // rax\n__int64 v7; // [rsp+18h] [rbp-28h]\n__int64 v8; // [rsp+20h] [rbp-20h]\n__int64 v9; // [rsp+30h] [rbp-10h]\n\nv7 = a1[6] + (__int64)a1[7];\nif ( HIDWORD(v7) == (int)v7 >> 31 )\nv2 = a1[6] + a1[7];\nelse\nv2 = (v7 >> 63) ^ 0x7FFFFFFF;\nv8 = v2 + (__int64)a1[8];\nif ( HIDWORD(v8) == (int)v8 >> 31 )\nv3 = v2 + a1[8];\nelse\nv3 = (v8 >> 63) ^ 0x7FFFFFFF;\n*a1 = v3;\nif ( (unsigned int)((unsigned __int64)a1[8] >> 31) == (2 * a1[8]) >> 31 )\nv4 = 2 * a1[8];\nelse\nv4 = ((int)((unsigned __int64)a1[8] >> 31) >> 31) ^ 0x7FFFFFFF;\nv9 = v4 + (__int64)a1[6];\nif ( HIDWORD(v9) == (int)v9 >> 31 )\nv5 = v4 + a1[6];\nelse\nv5 = (v9 >> 63) ^ 0x7FFFFFFF;\na1[1] = -v5;\nresult = a1;\na1[2] = a1[8];\nif ( a2 )\nresult = memset(a1 + 3, 0, 0xCuLL);\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_41F126,]", "hints": "[]", "response": "{'a1': 'S', 'a2': 'resetStateFlag', 'sub_41F126': 'arm_pid_init_q31'}"}
[ [ 0.7813829183578491, 0.7528097033500671, 0.739554762840271, 0.7198529839515686, 0.7142575979232788, 0.707165539264679, 0.7022952437400818, 0.695715069770813, 0.69047611951828, 0.686938464641571, 0.6857702136039734, 0.6842357516288757, 0.6809152960777283, 0.6701197028160095, 0.6699708104133606, 0.6687947511672974, 0.6672182679176331, 0.6669937968254089, 0.6664496660232544, 0.6650981903076172 ], [ 34816, 112736, 123199, 192421, 149264, 186151, 261592, 93708, 233190, 201979, 170468, 253434, 111367, 107676, 252259, 25526, 8697, 146020, 232925, 187827 ] ]
compare_ttl
89a9c1b8f9af20ca6897667f072aa5900d78d8b0e43ebee937509ffa8143ac6f
DNSPod
dnspod-sr
NA
int compare_ttl(void *t1, void *t2) { uint32_t tx1, tx2; if (t1 == NULL || t2 == NULL) { printf("fatal error in compare ttl\n"); exit(0); } tx1 = *(uint32_t *) t1; tx2 = *(uint32_t *) t2; //printf("tx %u,%u\n",tx1,tx2); if (t1 > t2) return 1; if (t1 == t2) return 0; return -1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4028D3", "function_addr": 4204755, "binary_name": "89a9c1b8f9af20ca6897667f072aa5900d78d8b0e43ebee937509ffa8143ac6f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "cmp [rbp+var_18], 0"], [6, "jz short loc_4028F1"], [7, "cmp [rbp+var_20], 0"], [8, "jnz short loc_402905"], [9, "mov edi, offset aFatalErrorInCo"], [10, "call _puts"], [11, "mov edi, 0"], [12, "call _exit"], [13, "mov rax, [rbp+var_18]"], [14, "mov eax, [rax]"], [15, "mov [rbp+var_4], eax"], [16, "mov rax, [rbp+var_20]"], [17, "mov eax, [rax]"], [18, "mov [rbp+var_8], eax"], [19, "mov rax, [rbp+var_18]"], [20, "cmp rax, [rbp+var_20]"], [21, "jbe short loc_402928"], [22, "mov eax, 1"], [23, "jmp short locret_40293E"], [24, "mov rax, [rbp+var_18]"], [25, "cmp rax, [rbp+var_20]"], [26, "jnz short loc_402939"], [27, "mov eax, 0"], [28, "jmp short locret_40293E"], [29, "mov eax, 0FFFFFFFFh"], [30, "leave"], [31, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 4], [8, 7], [13, 3], [14, 13], [15, 14], [16, 4], [17, 16], [18, 17], [19, 3], [20, 4], [20, 19], [21, 20], [24, 3], [25, 4], [25, 24], [26, 25], [31, 29], [31, 22], [31, 27]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/89a9c1b8f9af20ca6897667f072aa5900d78d8b0e43ebee937509ffa8143ac6f_89a9c1b8f9af20ca6897667f072aa5900d78d8b0e43ebee937509ffa8143ac6f.jsonl.gz", "strip_func_name": "sub_4028D3", "query": "\n\n\n__int64 __fastcall sub_4028D3(unsigned __int64 a1, unsigned __int64 a2)\n{\nif ( !a1 || !a2 )\n{\nputs(\"fatal error in compare ttl\");\nexit(0);\n}\nif ( a1 > a2 )\nreturn 1LL;\nif ( a1 == a2 )\nreturn 0LL;\nreturn 0xFFFFFFFFLL;\n}\n\n\n\nQ:[a1,a2,sub_4028D3,]", "hints": "[]", "response": "{'a1': 't1', 'a2': 't2', 'sub_4028D3': 'compare_ttl'}"}
[ [ 0.7341122627258301, 0.7266147136688232, 0.7211048007011414, 0.7143149375915527, 0.7107643485069275, 0.7061067819595337, 0.7027192115783691, 0.6991870403289795, 0.6950222253799438, 0.6923214793205261, 0.6890599727630615, 0.6888391971588135, 0.6886337399482727, 0.6861075162887573, 0.6859043836593628, 0.6853375434875488, 0.6844824552536011, 0.682426929473877, 0.6800987124443054, 0.6781792044639587 ], [ 144435, 94607, 100494, 35757, 26339, 216235, 203257, 32374, 113185, 23168, 255543, 96182, 179554, 215354, 3987, 107890, 246717, 30033, 133111, 36689 ] ]
zsl_phy_magn_orb_radius
67deaa523158d64404d0d58df84401c92daf83abeb98527e2b742ab74cd5239e
zephyrproject-rtos
zscilib
NA
int zsl_phy_magn_orb_radius(zsl_real_t q, zsl_real_t v, zsl_real_t b, zsl_real_t m, zsl_real_t *r) { if (q == 0 || b == 0 || m < 0) { *r = NAN; return -EINVAL; } *r = (m * v) / (q * b); if (*r < 0) { *r = NAN; return -EINVAL; } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40BFD7", "function_addr": 4243415, "binary_name": "67deaa523158d64404d0d58df84401c92daf83abeb98527e2b742ab74cd5239e.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "movsd [rbp+var_8], xmm0"], [3, "movsd [rbp+var_10], xmm1"], [4, "movsd [rbp+var_18], xmm2"], [5, "movsd [rbp+var_20], xmm3"], [6, "mov [rbp+var_28], rdi"], [7, "pxor xmm0, xmm0"], [8, "ucomisd xmm0, [rbp+var_8]"], [9, "jp short loc_40C009"], [10, "pxor xmm0, xmm0"], [11, "ucomisd xmm0, [rbp+var_8]"], [12, "jz short loc_40C02A"], [13, "pxor xmm0, xmm0"], [14, "ucomisd xmm0, [rbp+var_18]"], [15, "jp short loc_40C01F"], [16, "pxor xmm0, xmm0"], [17, "ucomisd xmm0, [rbp+var_18]"], [18, "jz short loc_40C02A"], [19, "pxor xmm0, xmm0"], [20, "comisd xmm0, [rbp+var_20]"], [21, "jbe short loc_40C041"], [22, "mov rax, [rbp+var_28]"], [23, "movsd xmm0, cs:qword_40E6B0"], [24, "movsd qword ptr [rax], xmm0"], [25, "mov eax, 0FFFFFFEAh"], [26, "jmp short loc_40C08F"], [27, "movsd xmm0, [rbp+var_20]"], [28, "mulsd xmm0, [rbp+var_10]"], [29, "movsd xmm1, [rbp+var_8]"], [30, "mulsd xmm1, [rbp+var_18]"], [31, "divsd xmm0, xmm1"], [32, "mov rax, [rbp+var_28]"], [33, "movsd qword ptr [rax], xmm0"], [34, "mov rax, [rbp+var_28]"], [35, "movsd xmm1, qword ptr [rax]"], [36, "pxor xmm0, xmm0"], [37, "comisd xmm0, xmm1"], [38, "jbe short loc_40C08A"], [39, "mov rax, [rbp+var_28]"], [40, "movsd xmm0, cs:qword_40E6B0"], [41, "movsd qword ptr [rax], xmm0"], [42, "mov eax, 0FFFFFFEAh"], [43, "jmp short loc_40C08F"], [44, "mov eax, 0"], [45, "pop rbp"], [46, "retn"]], "data_dep": [[8, 2], [8, 7], [11, 2], [11, 10], [14, 4], [14, 13], [17, 4], [17, 16], [20, 5], [20, 19], [22, 6], [24, 23], [24, 22], [27, 5], [28, 3], [28, 27], [29, 2], [30, 29], [30, 4], [31, 28], [31, 30], [32, 6], [33, 32], [33, 31], [34, 6], [35, 33], [35, 34], [37, 36], [37, 35], [39, 6], [41, 40], [41, 39], [45, 0], [46, 42], [46, 44], [46, 25]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/67deaa523158d64404d0d58df84401c92daf83abeb98527e2b742ab74cd5239e_67deaa523158d64404d0d58df84401c92daf83abeb98527e2b742ab74cd5239e.jsonl.gz", "strip_func_name": "sub_40BFD7", "query": "\n\n\n__int64 __fastcall sub_40BFD7(double *a1, double a2, double a3, double a4, double a5)\n{\n__int64 result; // rax\n\nif ( a2 == 0.0 || a4 == 0.0 || a5 < 0.0 )\n{\n*a1 = NAN;\nresult = 4294967274LL;\n}\nelse\n{\n*a1 = a5 * a3 / (a2 * a4);\nif ( *a1 >= 0.0 )\n{\nresult = 0LL;\n}\nelse\n{\n*a1 = NAN;\nresult = 4294967274LL;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,a3,a4,a5,sub_40BFD7,]", "hints": "[]", "response": "{'a1': 'r', 'a2': 'q', 'a3': 'v', 'a4': 'b', 'a5': 'm', 'sub_40BFD7': 'zsl_phy_magn_orb_radius'}"}
[ [ 0.8505616188049316, 0.777438223361969, 0.7696450352668762, 0.7320123314857483, 0.7306830883026123, 0.730154275894165, 0.7249881029129028, 0.7197195291519165, 0.7195279598236084, 0.7141613364219666, 0.7094098925590515, 0.7075754404067993, 0.7073419690132141, 0.7022095918655396, 0.7002596259117126, 0.6941760182380676, 0.6926228404045105, 0.6922072172164917, 0.6892364025115967, 0.6871124505996704 ], [ 245081, 208526, 4963, 244253, 228162, 77887, 254611, 65198, 167448, 158612, 253525, 242061, 73549, 180141, 249419, 67251, 35093, 128945, 189675, 185285 ] ]
add_control_hdr
2c00654bef88d0508fa38ae4f23cd4855f551f44cdb471bbff8963716b7f93f5
xelerance
xl2tpd
NA
void add_control_hdr (struct tunnel *t, struct call *c, struct buffer *buf) { struct control_hdr *h; buf->start -= sizeof (struct control_hdr); buf->len += sizeof (struct control_hdr); h = (struct control_hdr *) buf->start; h->ver = htons (TBIT | LBIT | FBIT | VER_L2TP); h->length = htons ((_u16) buf->len); h->tid = htons (t->tid); h->cid = htons (c->cid); h->Ns = htons (t->control_seq_num); h->Nr = htons (t->control_rec_seq_num); t->control_seq_num++; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407725", "function_addr": 4224805, "binary_name": "2c00654bef88d0508fa38ae4f23cd4855f551f44cdb471bbff8963716b7f93f5.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "mov rax, [rbp+var_28]"], [7, "mov rax, [rax+18h]"], [8, "lea rdx, [rax-0Ch]"], [9, "mov rax, [rbp+var_28]"], [10, "mov [rax+18h], rdx"], [11, "mov rax, [rbp+var_28]"], [12, "mov rax, [rax+20h]"], [13, "lea rdx, [rax+0Ch]"], [14, "mov rax, [rbp+var_28]"], [15, "mov [rax+20h], rdx"], [16, "mov rax, [rbp+var_28]"], [17, "mov rax, [rax+18h]"], [18, "mov [rbp+var_8], rax"], [19, "mov edi, 0C802h"], [20, "call _htons"], [21, "mov rdx, [rbp+var_8]"], [22, "mov [rdx], ax"], [23, "mov rax, [rbp+var_28]"], [24, "mov rax, [rax+20h]"], [25, "movzx eax, ax"], [26, "mov edi, eax"], [27, "call _htons"], [28, "mov rdx, [rbp+var_8]"], [29, "mov [rdx+2], ax"], [30, "mov rax, [rbp+var_18]"], [31, "mov eax, [rax+40h]"], [32, "movzx eax, ax"], [33, "mov edi, eax"], [34, "call _htons"], [35, "mov rdx, [rbp+var_8]"], [36, "mov [rdx+4], ax"], [37, "mov rax, [rbp+var_20]"], [38, "mov eax, [rax+44h]"], [39, "movzx eax, ax"], [40, "mov edi, eax"], [41, "call _htons"], [42, "mov rdx, [rbp+var_8]"], [43, "mov [rdx+6], ax"], [44, "mov rax, [rbp+var_18]"], [45, "movzx eax, word ptr [rax+78h]"], [46, "movzx eax, ax"], [47, "mov edi, eax"], [48, "call _htons"], [49, "mov rdx, [rbp+var_8]"], [50, "mov [rdx+8], ax"], [51, "mov rax, [rbp+var_18]"], [52, "movzx eax, word ptr [rax+7Ah]"], [53, "movzx eax, ax"], [54, "mov edi, eax"], [55, "call _htons"], [56, "mov rdx, [rbp+var_8]"], [57, "mov [rdx+0Ah], ax"], [58, "mov rax, [rbp+var_18]"], [59, "movzx eax, word ptr [rax+78h]"], [60, "lea edx, [rax+1]"], [61, "mov rax, [rbp+var_18]"], [62, "mov [rax+78h], dx"], [63, "nop"], [64, "leave"], [65, "retn"]], "data_dep": [[6, 5], [7, 6], [8, 7], [9, 5], [10, 9], [10, 8], [11, 5], [12, 10], [12, 11], [13, 8], [13, 10], [13, 12], [14, 5], [15, 14], [15, 13], [16, 5], [17, 15], [17, 10], [17, 16], [18, 17], [21, 18], [22, 20], [22, 21], [23, 5], [24, 23], [24, 22], [24, 15], [25, 24], [26, 25], [28, 18], [29, 28], [29, 27], [30, 3], [31, 29], [31, 30], [32, 31], [33, 32], [35, 18], [36, 34], [36, 35], [37, 4], [38, 37], [38, 36], [39, 38], [40, 39], [42, 18], [43, 42], [43, 41], [44, 3], [45, 43], [45, 44], [46, 45], [47, 46], [49, 18], [50, 49], [50, 48], [51, 3], [52, 51], [52, 50], [53, 52], [54, 53], [56, 18], [57, 56], [57, 55], [58, 3], [59, 58], [59, 57], [60, 56], [60, 59], [60, 57], [61, 3], [62, 61], [62, 60], [65, 61]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/2c00654bef88d0508fa38ae4f23cd4855f551f44cdb471bbff8963716b7f93f5_2c00654bef88d0508fa38ae4f23cd4855f551f44cdb471bbff8963716b7f93f5.jsonl.gz", "strip_func_name": "sub_407725", "query": "\n\n\n__int64 __fastcall sub_407725(__int64 a1, __int64 a2, __int64 a3)\n{\n__int64 result; // rax\nuint16_t *v5; // [rsp+28h] [rbp-8h]\n\n*(_QWORD *)(a3 + 24) -= 12LL;\n*(_QWORD *)(a3 + 32) += 12LL;\nv5 = *(uint16_t **)(a3 + 24);\n*v5 = htons(0xC802u);\nv5[1] = htons(*(_QWORD *)(a3 + 32));\nv5[2] = htons(*(_DWORD *)(a1 + 64));\nv5[3] = htons(*(_DWORD *)(a2 + 68));\nv5[4] = htons(*(_WORD *)(a1 + 120));\nv5[5] = htons(*(_WORD *)(a1 + 122));\nresult = a1;\n++*(_WORD *)(a1 + 120);\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v5,sub_407725,]", "hints": "[]", "response": "{'a3': 'buf', 'a1': 't', 'a2': 'c', 'v5': 'h', 'sub_407725': 'add_control_hdr'}"}
[ [ 0.7697421312332153, 0.764625608921051, 0.7084007263183594, 0.7077817320823669, 0.6944314241409302, 0.6888328194618225, 0.687911331653595, 0.6830394864082336, 0.6744756102561951, 0.67350172996521, 0.6710554361343384, 0.6706441044807434, 0.6682083606719971, 0.6616734266281128, 0.6564922332763672, 0.6553860902786255, 0.6550823450088501, 0.6507694721221924, 0.649535596370697, 0.6427719593048096 ], [ 171940, 157886, 35760, 257009, 226259, 143688, 162699, 78056, 169517, 124628, 262485, 247, 20430, 84156, 106294, 198161, 77733, 136332, 105054, 62334 ] ]
database_send
f08c2850f027efd17ecdf12ab33387b1d801794d588afeef0f16b0085df45311
skeeto
minimail
NA
int database_send(struct database *db, const char *user, const char *message) { CHECK(db, sqlite3_reset(db->send), -1); CHECK(db, sqlite3_bind_text(db->send, 1, user, -1, SQLITE_TRANSIENT), -1); CHECK(db, sqlite3_bind_blob(db->send, 2, message, strlen(message), SQLITE_TRANSIENT), -1); return sqlite3_step(db->send) == SQLITE_ROW ? 0 : -1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4037F1", "function_addr": 4208625, "binary_name": "f08c2850f027efd17ecdf12ab33387b1d801794d588afeef0f16b0085df45311.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+s], rdx"], [6, "mov rax, [rbp+var_8]"], [7, "mov rax, [rax+8]"], [8, "mov rdi, rax"], [9, "call _sqlite3_reset"], [10, "test eax, eax"], [11, "jz short loc_40384E"], [12, "mov rax, [rbp+var_8]"], [13, "mov rax, [rax]"], [14, "mov rdi, rax"], [15, "call _sqlite3_errmsg"], [16, "mov rdx, rax"], [17, "mov rax, cs:stderr"], [18, "mov esi, offset aSqlite3S"], [19, "mov rdi, rax"], [20, "mov eax, 0"], [21, "call _fprintf"], [22, "mov eax, 0FFFFFFFFh"], [23, "jmp locret_403931"], [24, "mov rax, [rbp+var_8]"], [25, "mov rax, [rax+8]"], [26, "mov rdx, [rbp+var_10]"], [27, "mov r8, 0FFFFFFFFFFFFFFFFh"], [28, "mov ecx, 0FFFFFFFFh"], [29, "mov esi, 1"], [30, "mov rdi, rax"], [31, "call _sqlite3_bind_text"], [32, "test eax, eax"], [33, "jz short loc_4038AC"], [34, "mov rax, [rbp+var_8]"], [35, "mov rax, [rax]"], [36, "mov rdi, rax"], [37, "call _sqlite3_errmsg"], [38, "mov rdx, rax"], [39, "mov rax, cs:stderr"], [40, "mov esi, offset aSqlite3S"], [41, "mov rdi, rax"], [42, "mov eax, 0"], [43, "call _fprintf"], [44, "mov eax, 0FFFFFFFFh"], [45, "jmp locret_403931"], [46, "mov rax, [rbp+s]"], [47, "mov rdi, rax"], [48, "call _strlen"], [49, "mov ecx, eax"], [50, "mov rax, [rbp+var_8]"], [51, "mov rax, [rax+8]"], [52, "mov rdx, [rbp+s]"], [53, "mov r8, 0FFFFFFFFFFFFFFFFh"], [54, "mov esi, 2"], [55, "mov rdi, rax"], [56, "call _sqlite3_bind_blob"], [57, "test eax, eax"], [58, "jz short loc_403910"], [59, "mov rax, [rbp+var_8]"], [60, "mov rax, [rax]"], [61, "mov rdi, rax"], [62, "call _sqlite3_errmsg"], [63, "mov rdx, rax"], [64, "mov rax, cs:stderr"], [65, "mov esi, offset aSqlite3S"], [66, "mov rdi, rax"], [67, "mov eax, 0"], [68, "call _fprintf"], [69, "mov eax, 0FFFFFFFFh"], [70, "jmp short locret_403931"], [71, "mov rax, [rbp+var_8]"], [72, "mov rax, [rax+8]"], [73, "mov rdi, rax"], [74, "call _sqlite3_step"], [75, "cmp eax, 64h "], [76, "jnz short loc_40392C"], [77, "mov eax, 0"], [78, "jmp short locret_403931"], [79, "mov eax, 0FFFFFFFFh"], [80, "leave"], [81, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [10, 9], [11, 10], [12, 3], [13, 12], [14, 13], [16, 15], [19, 17], [24, 3], [25, 24], [26, 4], [30, 25], [32, 31], [33, 32], [34, 3], [35, 34], [36, 35], [38, 37], [41, 39], [46, 5], [47, 46], [49, 48], [50, 3], [51, 50], [52, 5], [55, 51], [57, 56], [58, 57], [59, 3], [60, 59], [61, 60], [63, 62], [66, 64], [71, 3], [72, 71], [73, 72], [75, 74], [76, 75], [81, 69], [81, 44], [81, 77], [81, 22], [81, 79]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/f08c2850f027efd17ecdf12ab33387b1d801794d588afeef0f16b0085df45311_f08c2850f027efd17ecdf12ab33387b1d801794d588afeef0f16b0085df45311.jsonl.gz", "strip_func_name": "sub_4037F1", "query": "\n\n\n__int64 __fastcall sub_4037F1(__int64 a1, __int64 a2, const char *a3)\n{\nconst char *v3; // rax\n__int64 result; // rax\n\nif ( (unsigned int)sqlite3_reset()\n|| (unsigned int)sqlite3_bind_text()\n|| (strlen(a3), (unsigned int)sqlite3_bind_blob()) )\n{\nv3 = (const char *)sqlite3_errmsg();\nfprintf(stderr, \"sqlite3: %s\\n\", v3);\nresult = 0xFFFFFFFFLL;\n}\nelse if ( (unsigned int)sqlite3_step() == 100 )\n{\nresult = 0LL;\n}\nelse\n{\nresult = 0xFFFFFFFFLL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_4037F1,]", "hints": "[]", "response": "{'a3': 'message', 'a1': 'db', 'a2': 'user', 'sub_4037F1': 'database_send'}"}
[ [ 0.7642924785614014, 0.7377768158912659, 0.7295446991920471, 0.7214654684066772, 0.7180235385894775, 0.7129842042922974, 0.7081955075263977, 0.6967259645462036, 0.6904612183570862, 0.6898230314254761, 0.6894149780273438, 0.6894136667251587, 0.688654899597168, 0.6879655122756958, 0.6826913356781006, 0.6808680295944214, 0.6807971596717834, 0.680656909942627, 0.6804513335227966, 0.6799201965332031 ], [ 228378, 194143, 42991, 137697, 194611, 171072, 100194, 225507, 92190, 189914, 70645, 118559, 100640, 40188, 134593, 54730, 140964, 51777, 202883, 83798 ] ]
Field_Key
3dcf9b97b1c5d69ccd59d180de83033718cc3b2064c9c1e1f91608bdd820595f
yquake2
yquake2
NA
qboolean Field_Key(menufield_s *f, int key) { if (key > 127) { return false; } switch (key) { case K_KP_LEFTARROW: case K_LEFTARROW: case K_BACKSPACE: if (f->cursor > 0) { memmove(&f->buffer[f->cursor - 1], &f->buffer[f->cursor], strlen(&f->buffer[f->cursor]) + 1); f->cursor--; if (f->visible_offset) { f->visible_offset--; } } break; case K_KP_DEL: case K_DEL: memmove(&f->buffer[f->cursor], &f->buffer[f->cursor + 1], strlen(&f->buffer[f->cursor + 1]) + 1); break; case K_KP_ENTER: case K_ENTER: case K_ESCAPE: case K_TAB: return false; case K_SPACE: default: if (!isdigit(key) && (f->generic.flags & QMF_NUMBERSONLY)) { return false; } if (f->cursor < f->length) { f->buffer[f->cursor++] = key; f->buffer[f->cursor] = 0; if (f->cursor > f->visible_length) { f->visible_offset++; } } } return true; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43E7D6", "function_addr": 4450262, "binary_name": "3dcf9b97b1c5d69ccd59d180de83033718cc3b2064c9c1e1f91608bdd820595f.elf_extract.pkl\n"}, "code": [[0, "sub rsp, 18h"], [1, "mov [rsp+18h+var_10], rdi"], [2, "mov [rsp+18h+var_14], esi"], [3, "mov eax, [rsp+18h+var_14]"], [4, "sub eax, 0A0h"], [5, "cmp eax, 0Eh"], [6, "ja def_43E7FF"], [7, "mov eax, eax"], [8, "mov rax, ds:jpt_43E7FF[rax*8]"], [9, "jmp rax"], [10, "mov [rsp+18h+var_14], 2Fh "], [11, "jmp def_43E7FF"], [12, "mov [rsp+18h+var_14], 2Dh "], [13, "jmp short def_43E7FF"], [14, "mov [rsp+18h+var_14], 2Bh "], [15, "jmp short def_43E7FF"], [16, "mov [rsp+18h+var_14], 37h "], [17, "jmp short def_43E7FF"], [18, "mov [rsp+18h+var_14], 38h "], [19, "jmp short def_43E7FF"], [20, "mov [rsp+18h+var_14], 39h "], [21, "jmp short def_43E7FF"], [22, "mov [rsp+18h+var_14], 34h "], [23, "jmp short def_43E7FF"], [24, "mov [rsp+18h+var_14], 35h "], [25, "jmp short def_43E7FF"], [26, "mov [rsp+18h+var_14], 36h "], [27, "jmp short def_43E7FF"], [28, "mov [rsp+18h+var_14], 31h "], [29, "jmp short def_43E7FF"], [30, "mov [rsp+18h+var_14], 32h "], [31, "jmp short def_43E7FF"], [32, "mov [rsp+18h+var_14], 33h "], [33, "jmp short def_43E7FF"], [34, "mov [rsp+18h+var_14], 30h "], [35, "jmp short def_43E7FF"], [36, "mov [rsp+18h+var_14], 2Eh "], [37, "nop"], [38, "cmp [rsp+18h+var_14], 7Fh"], [39, "jle short loc_43E8A0"], [40, "mov eax, 0"], [41, "jmp loc_43EB2B"], [42, "cmp [rsp+18h+var_14], 1Bh"], [43, "jg short loc_43E906"], [44, "cmp [rsp+18h+var_14], 9"], [45, "jge short loc_43E8CF"], [46, "jmp def_43E8CD"], [47, "mov eax, [rsp+18h+var_14]"], [48, "sub eax, 7Fh"], [49, "cmp eax, 2Ch"], [50, "ja def_43E8CD"], [51, "mov eax, eax"], [52, "mov rax, ds:jpt_43E8CD[rax*8]"], [53, "jmp rax"], [54, "mov eax, [rsp+18h+var_14]"], [55, "cmp eax, 1Bh"], [56, "setnbe dl"], [57, "test dl, dl"], [58, "jnz def_43E8CD"], [59, "mov edx, 1"], [60, "mov ecx, eax"], [61, "shl rdx, cl"], [62, "mov rax, rdx"], [63, "and eax, 8002200h"], [64, "test rax, rax"], [65, "setnz al"], [66, "test al, al"], [67, "jnz loc_43EA4F"], [68, "jmp def_43E8CD"], [69, "cmp [rsp+18h+var_14], 0ABh"], [70, "jg def_43E8CD"], [71, "cmp [rsp+18h+var_14], 7Fh"], [72, "jge short loc_43E8B3"], [73, "jmp def_43E8CD"], [74, "mov rax, [rsp+18h+var_10]"], [75, "mov eax, [rax+0B0h]"], [76, "test eax, eax"], [77, "jle loc_43EB25"], [78, "mov rax, [rsp+18h+var_10]"], [79, "mov eax, [rax+0B0h]"], [80, "cdqe"], [81, "lea rdx, [rax+60h]"], [82, "mov rax, [rsp+18h+var_10]"], [83, "add rax, rdx"], [84, "mov rdi, rax"], [85, "call _strlen"], [86, "lea rdx, [rax+1]"], [87, "mov rax, [rsp+18h+var_10]"], [88, "mov eax, [rax+0B0h]"], [89, "cdqe"], [90, "lea rcx, [rax+60h]"], [91, "mov rax, [rsp+18h+var_10]"], [92, "add rcx, rax"], [93, "mov rax, [rsp+18h+var_10]"], [94, "mov eax, [rax+0B0h]"], [95, "sub eax, 1"], [96, "cdqe"], [97, "lea rsi, [rax+60h]"], [98, "mov rax, [rsp+18h+var_10]"], [99, "add rax, rsi"], [100, "mov rsi, rcx"], [101, "mov rdi, rax"], [102, "call _memmove"], [103, "mov rax, [rsp+18h+var_10]"], [104, "mov eax, [rax+0B0h]"], [105, "lea edx, [rax-1]"], [106, "mov rax, [rsp+18h+var_10]"], [107, "mov [rax+0B0h], edx"], [108, "mov rax, [rsp+18h+var_10]"], [109, "mov eax, [rax+0BCh]"], [110, "test eax, eax"], [111, "jz loc_43EB25"], [112, "mov rax, [rsp+18h+var_10]"], [113, "mov eax, [rax+0BCh]"], [114, "lea edx, [rax-1]"], [115, "mov rax, [rsp+18h+var_10]"], [116, "mov [rax+0BCh], edx"], [117, "jmp loc_43EB25"], [118, "mov rax, [rsp+18h+var_10]"], [119, "mov eax, [rax+0B0h]"], [120, "add eax, 1"], [121, "cdqe"], [122, "lea rdx, [rax+60h]"], [123, "mov rax, [rsp+18h+var_10]"], [124, "add rax, rdx"], [125, "mov rdi, rax"], [126, "call _strlen"], [127, "lea rdx, [rax+1]"], [128, "mov rax, [rsp+18h+var_10]"], [129, "mov eax, [rax+0B0h]"], [130, "add eax, 1"], [131, "cdqe"], [132, "lea rcx, [rax+60h]"], [133, "mov rax, [rsp+18h+var_10]"], [134, "add rcx, rax"], [135, "mov rax, [rsp+18h+var_10]"], [136, "mov eax, [rax+0B0h]"], [137, "cdqe"], [138, "lea rsi, [rax+60h]"], [139, "mov rax, [rsp+18h+var_10]"], [140, "add rax, rsi"], [141, "mov rsi, rcx"], [142, "mov rdi, rax"], [143, "call _memmove"], [144, "jmp loc_43EB26"], [145, "mov eax, 0"], [146, "jmp loc_43EB2B"], [147, "call ___ctype_b_loc"], [148, "mov rdx, [rax]"], [149, "mov eax, [rsp+18h+var_14]"], [150, "cdqe"], [151, "add rax, rax"], [152, "add rax, rdx"], [153, "movzx eax, word ptr [rax]"], [154, "movzx eax, ax"], [155, "and eax, 800h"], [156, "test eax, eax"], [157, "jnz short loc_43EA95"], [158, "mov rax, [rsp+18h+var_10]"], [159, "mov eax, [rax+34h]"], [160, "and eax, 4"], [161, "test eax, eax"], [162, "jz short loc_43EA95"], [163, "mov eax, 0"], [164, "jmp loc_43EB2B"], [165, "mov rax, [rsp+18h+var_10]"], [166, "mov edx, [rax+0B0h]"], [167, "mov rax, [rsp+18h+var_10]"], [168, "mov eax, [rax+0B4h]"], [169, "cmp edx, eax"], [170, "jge short loc_43EB26"], [171, "mov rax, [rsp+18h+var_10]"], [172, "mov eax, [rax+0B0h]"], [173, "lea ecx, [rax+1]"], [174, "mov rdx, [rsp+18h+var_10]"], [175, "mov [rdx+0B0h], ecx"], [176, "mov edx, [rsp+18h+var_14]"], [177, "mov ecx, edx"], [178, "mov rdx, [rsp+18h+var_10]"], [179, "cdqe"], [180, "mov [rdx+rax+60h], cl"], [181, "mov rax, [rsp+18h+var_10]"], [182, "mov eax, [rax+0B0h]"], [183, "mov rdx, [rsp+18h+var_10]"], [184, "cdqe"], [185, "mov byte ptr [rdx+rax+60h], 0"], [186, "mov rax, [rsp+18h+var_10]"], [187, "mov edx, [rax+0B0h]"], [188, "mov rax, [rsp+18h+var_10]"], [189, "mov eax, [rax+0B8h]"], [190, "cmp edx, eax"], [191, "jle short loc_43EB26"], [192, "mov rax, [rsp+18h+var_10]"], [193, "mov eax, [rax+0BCh]"], [194, "lea edx, [rax+1]"], [195, "mov rax, [rsp+18h+var_10]"], [196, "mov [rax+0BCh], edx"], [197, "jmp short loc_43EB26"], [198, "nop"], [199, "mov eax, 1"], [200, "add rsp, 18h"], [201, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 5], [7, 4], [9, 8], [38, 16], [38, 18], [38, 2], [38, 32], [38, 34], [38, 36], [38, 20], [38, 22], [38, 24], [38, 26], [38, 10], [38, 28], [38, 12], [38, 30], [38, 14], [39, 38], [42, 2], [42, 32], [42, 34], [42, 18], [42, 36], [42, 20], [42, 22], [42, 24], [42, 26], [42, 10], [42, 28], [42, 12], [42, 30], [42, 14], [42, 16], [43, 42], [44, 36], [44, 20], [44, 22], [44, 24], [44, 26], [44, 10], [44, 28], [44, 12], [44, 30], [44, 14], [44, 16], [44, 18], [44, 2], [44, 32], [44, 34], [45, 44], [47, 16], [47, 18], [47, 2], [47, 20], [47, 34], [47, 36], [47, 22], [47, 24], [47, 26], [47, 10], [47, 28], [47, 12], [47, 30], [47, 14], [47, 32], [48, 47], [49, 48], [50, 49], [51, 48], [53, 52], [54, 22], [54, 24], [54, 26], [54, 10], [54, 28], [54, 12], [54, 30], [54, 14], [54, 16], [54, 18], [54, 2], [54, 32], [54, 34], [54, 36], [54, 20], [55, 54], [56, 55], [57, 56], [58, 57], [60, 54], [61, 60], [61, 59], [62, 61], [63, 62], [64, 63], [65, 64], [66, 65], [67, 66], [69, 22], [69, 24], [69, 26], [69, 10], [69, 28], [69, 12], [69, 30], [69, 14], [69, 32], [69, 16], [69, 34], [69, 18], [69, 2], [69, 20], [69, 36], [70, 69], [71, 20], [71, 22], [71, 24], [71, 26], [71, 10], [71, 28], [71, 12], [71, 30], [71, 14], [71, 32], [71, 16], [71, 18], [71, 2], [71, 34], [71, 36], [72, 71], [74, 1], [75, 74], [76, 75], [77, 76], [78, 1], [79, 78], [81, 79], [82, 1], [83, 82], [83, 81], [84, 83], [86, 81], [86, 85], [87, 1], [88, 87], [90, 88], [91, 1], [92, 90], [92, 91], [93, 1], [94, 93], [95, 94], [97, 95], [98, 1], [99, 97], [99, 98], [100, 92], [101, 99], [103, 1], [104, 103], [105, 104], [105, 86], [106, 1], [107, 106], [107, 105], [108, 1], [109, 108], [109, 107], [110, 109], [111, 110], [112, 1], [113, 112], [113, 107], [113, 116], [114, 113], [114, 105], [114, 107], [114, 116], [115, 1], [116, 115], [116, 114], [118, 1], [119, 118], [120, 119], [122, 120], [123, 1], [124, 122], [124, 123], [125, 124], [127, 122], [127, 126], [128, 1], [129, 128], [130, 129], [132, 130], [133, 1], [134, 133], [134, 132], [135, 1], [136, 135], [138, 136], [139, 1], [140, 139], [140, 138], [141, 134], [142, 140], [148, 147], [149, 12], [149, 30], [149, 14], [149, 32], [149, 16], [149, 34], [149, 18], [149, 36], [149, 2], [149, 20], [149, 22], [149, 24], [149, 10], [149, 26], [149, 28], [151, 149], [152, 151], [152, 148], [153, 152], [154, 153], [155, 154], [156, 155], [157, 156], [158, 1], [159, 158], [160, 159], [161, 160], [162, 161], [165, 1], [166, 165], [167, 1], [168, 167], [169, 166], [169, 168], [170, 169], [171, 1], [172, 171], [173, 60], [173, 172], [174, 1], [175, 174], [175, 173], [176, 30], [176, 14], [176, 32], [176, 16], [176, 34], [176, 18], [176, 36], [176, 2], [176, 20], [176, 22], [176, 24], [176, 10], [176, 12], [176, 26], [176, 28], [177, 176], [178, 1], [180, 177], [180, 172], [181, 1], [182, 181], [182, 180], [183, 1], [185, 182], [186, 1], [187, 185], [187, 186], [188, 1], [189, 188], [189, 185], [190, 187], [190, 189], [191, 190], [192, 1], [193, 175], [193, 192], [193, 185], [193, 196], [193, 180], [194, 185], [194, 187], [194, 180], [194, 196], [194, 175], [194, 193], [195, 1], [196, 194], [196, 195], [200, 0], [201, 40], [201, 145], [201, 163], [201, 199]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/3dcf9b97b1c5d69ccd59d180de83033718cc3b2064c9c1e1f91608bdd820595f_3dcf9b97b1c5d69ccd59d180de83033718cc3b2064c9c1e1f91608bdd820595f.jsonl.gz", "strip_func_name": "sub_43E7D6", "query": "\n\n\n__int64 __fastcall sub_43E7D6(const char *a1, int a2)\n{\nsize_t v3; // rax\nsize_t v4; // rax\nint v5; // eax\nint v6; // [rsp+4h] [rbp-14h]\n\nv6 = a2;\nswitch ( a2 )\n{\ncase 160:\nv6 = 55;\nbreak;\ncase 161:\nv6 = 56;\nbreak;\ncase 162:\nv6 = 57;\nbreak;\ncase 163:\nv6 = 52;\nbreak;\ncase 164:\nv6 = 53;\nbreak;\ncase 165:\nv6 = 54;\nbreak;\ncase 166:\nv6 = 49;\nbreak;\ncase 167:\nv6 = 50;\nbreak;\ncase 168:\nv6 = 51;\nbreak;\ncase 170:\nv6 = 48;\nbreak;\ncase 171:\nv6 = 46;\nbreak;\ncase 172:\nv6 = 47;\nbreak;\ncase 173:\nv6 = 45;\nbreak;\ncase 174:\nv6 = 43;\nbreak;\ndefault:\nbreak;\n}\nif ( v6 > 127 )\nreturn 0LL;\nif ( v6 > 27 )\n{\nif ( v6 >= 127 )\n{\nswitch ( v6 )\n{\ncase 127:\ncase 134:\ncase 163:\nif ( *((int *)a1 + 44) > 0 )\n{\nv3 = strlen(&a1[*((int *)a1 + 44) + 96]);\nmemmove((void *)&a1[*((_DWORD *)a1 + 44) + 95], &a1[*((int *)a1 + 44) + 96], v3 + 1);\n--*((_DWORD *)a1 + 44);\nif ( *((_DWORD *)a1 + 47) )\n--*((_DWORD *)a1 + 47);\n}\nreturn 1LL;\ncase 140:\ncase 171:\nv4 = strlen(&a1[*((_DWORD *)a1 + 44) + 97]);\nmemmove((void *)&a1[*((int *)a1 + 44) + 96], &a1[*((_DWORD *)a1 + 44) + 97], v4 + 1);\nreturn 1LL;\ncase 169:\nreturn 0LL;\ndefault:\nbreak;\n}\n}\n}\nelse if ( v6 >= 9 && ((1LL << v6) & 0x8002200) != 0 )\n{\nreturn 0LL;\n}\nif ( ((*__ctype_b_loc())[v6] & 0x800) == 0 && (*((_DWORD *)a1 + 13) & 4) != 0 )\nreturn 0LL;\nif ( *((_DWORD *)a1 + 44) < *((_DWORD *)a1 + 45) )\n{\nv5 = *((_DWORD *)a1 + 44);\n*((_DWORD *)a1 + 44) = v5 + 1;\na1[v5 + 96] = v6;\na1[*((int *)a1 + 44) + 96] = 0;\nif ( *((_DWORD *)a1 + 44) > *((_DWORD *)a1 + 46) )\n++*((_DWORD *)a1 + 47);\n}\nreturn 1LL;\n}\n\n\n\nQ:[a1,a2,v6,sub_43E7D6,]", "hints": "[]", "response": "{'a1': 'f', 'a2': 'key', 'v6': 'keya', 'sub_43E7D6': 'Field_Key'}"}
[ [ 0.7043496370315552, 0.692944347858429, 0.6918065547943115, 0.690902054309845, 0.6901975870132446, 0.6898963451385498, 0.6873509883880615, 0.6859806180000305, 0.6852662563323975, 0.6841417551040649, 0.680109977722168, 0.6744221448898315, 0.670581042766571, 0.6692907810211182, 0.6681650280952454, 0.6679869890213013, 0.6612451076507568, 0.6603377461433411, 0.6592821478843689, 0.6528447866439819 ], [ 169260, 120823, 92969, 229526, 264719, 254461, 193314, 83594, 43423, 214054, 136003, 108572, 20847, 241177, 104717, 30969, 262394, 232897, 263286, 8223 ] ]
setreg_internal
bbadb37024bd3e9cf9fa2b7786bbe9772edf7ce2714416d3a13410cdb5373b14
EtchedPixels
EmulatorKit
NA
static void setreg_internal(struct z8 *z8, uint8_t reg, uint8_t val) { if (reg > z8->regmax && reg < R_SIO) { fprintf(stderr, "[Wrote non existent register %d (max %d) with %d]\n", reg, z8->regmax, val); return; } switch(reg) { case 2: case 3: z8->reg[reg] = val; z8_port_write(z8, 2, val); break; case R_IRR: /* IRR is unwritable until an EI !! */ if (z8->done_ei == 0) break; case R_SIO: if (z8->reg[R_P3M] & 0x40) { z8_tx(z8, val); z8->reg[R_IRR] &= ~0x10; } default: z8->reg[reg] = val; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40B5F6", "function_addr": 4240886, "binary_name": "bbadb37024bd3e9cf9fa2b7786bbe9772edf7ce2714416d3a13410cdb5373b14.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov ecx, esi"], [5, "mov eax, edx"], [6, "mov edx, ecx"], [7, "mov [rbp+var_C], dl"], [8, "mov [rbp+var_10], al"], [9, "mov rax, [rbp+var_8]"], [10, "movzx eax, byte ptr [rax+102h]"], [11, "cmp [rbp+var_C], al"], [12, "jbe short loc_40B65B"], [13, "cmp [rbp+var_C], 0EFh"], [14, "ja short loc_40B65B"], [15, "movzx esi, [rbp+var_10]"], [16, "mov rax, [rbp+var_8]"], [17, "movzx eax, byte ptr [rax+102h]"], [18, "movzx ecx, al"], [19, "movzx edx, [rbp+var_C]"], [20, "mov rax, cs:stderr"], [21, "mov r8d, esi"], [22, "mov esi, offset aWroteNonExiste"], [23, "mov rdi, rax"], [24, "mov eax, 0"], [25, "call _fprintf"], [26, "jmp locret_40B714"], [27, "movzx eax, [rbp+var_C]"], [28, "cmp eax, 0FAh"], [29, "jz short loc_40B6B1"], [30, "cmp eax, 0FAh"], [31, "jg loc_40B700"], [32, "cmp eax, 3"], [33, "jg short loc_40B680"], [34, "cmp eax, 2"], [35, "jge short loc_40B689"], [36, "jmp loc_40B700"], [37, "cmp eax, 0F0h"], [38, "jz short loc_40B6BF"], [39, "jmp short loc_40B700"], [40, "movzx eax, [rbp+var_C]"], [41, "mov rdx, [rbp+var_8]"], [42, "cdqe"], [43, "movzx ecx, [rbp+var_10]"], [44, "mov [rdx+rax], cl"], [45, "movzx edx, [rbp+var_10]"], [46, "mov rax, [rbp+var_8]"], [47, "mov esi, 2"], [48, "mov rdi, rax"], [49, "call sub_402496"], [50, "jmp short locret_40B714"], [51, "mov rax, [rbp+var_8]"], [52, "mov eax, [rax+118h]"], [53, "test eax, eax"], [54, "jz short loc_40B713"], [55, "mov rax, [rbp+var_8]"], [56, "movzx eax, byte ptr [rax+0F7h]"], [57, "movzx eax, al"], [58, "and eax, 40h"], [59, "test eax, eax"], [60, "jz short loc_40B700"], [61, "movzx edx, [rbp+var_10]"], [62, "mov rax, [rbp+var_8]"], [63, "mov esi, edx"], [64, "mov rdi, rax"], [65, "call sub_4024AD"], [66, "mov rax, [rbp+var_8]"], [67, "movzx eax, byte ptr [rax+0FAh]"], [68, "and eax, 0FFFFFFEFh"], [69, "mov edx, eax"], [70, "mov rax, [rbp+var_8]"], [71, "mov [rax+0FAh], dl"], [72, "movzx eax, [rbp+var_C]"], [73, "mov rdx, [rbp+var_8]"], [74, "cdqe"], [75, "movzx ecx, [rbp+var_10]"], [76, "mov [rdx+rax], cl"], [77, "jmp short locret_40B714"], [78, "nop"], [79, "leave"], [80, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 5], [9, 3], [10, 9], [11, 7], [11, 10], [12, 11], [13, 7], [14, 13], [15, 8], [16, 3], [17, 16], [18, 17], [19, 7], [21, 15], [23, 20], [27, 7], [28, 27], [29, 28], [30, 27], [31, 30], [32, 27], [33, 32], [34, 27], [35, 34], [37, 27], [38, 37], [40, 7], [41, 3], [43, 8], [44, 40], [44, 43], [45, 8], [46, 3], [48, 46], [51, 3], [52, 51], [53, 52], [54, 53], [55, 3], [56, 55], [57, 56], [58, 57], [59, 58], [60, 59], [61, 8], [62, 3], [63, 61], [64, 62], [66, 3], [67, 66], [68, 67], [69, 68], [70, 3], [71, 70], [71, 69], [72, 7], [73, 3], [75, 8], [76, 72], [76, 75], [80, 25], [80, 49], [80, 72], [80, 53]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/bbadb37024bd3e9cf9fa2b7786bbe9772edf7ce2714416d3a13410cdb5373b14_bbadb37024bd3e9cf9fa2b7786bbe9772edf7ce2714416d3a13410cdb5373b14.jsonl.gz", "strip_func_name": "sub_40B5F6", "query": "\n\n\nint __fastcall sub_40B5F6(__int64 a1, unsigned __int8 a2, unsigned __int8 a3)\n{\nint result; // eax\n\nif ( a2 > *(_BYTE *)(a1 + 258) && a2 <= 0xEFu )\nreturn fprintf(\nstderr,\n\"[Wrote non existent register %d (max %d) with %d]\\n\",\na2,\n*(unsigned __int8 *)(a1 + 258),\na3);\nif ( a2 == 250 )\n{\nresult = *(_DWORD *)(a1 + 280);\nif ( !result )\nreturn result;\nLABEL_13:\nif ( (*(_BYTE *)(a1 + 247) & 0x40) != 0 )\n{\nsub_4024AD(a1, a3);\n*(_BYTE *)(a1 + 250) &= 0xEFu;\n}\ngoto LABEL_15;\n}\nif ( a2 <= 0xFAu )\n{\nif ( a2 <= 3u )\n{\nif ( a2 >= 2u )\n{\n*(_BYTE *)(a1 + a2) = a3;\nreturn sub_402496(a1, 2LL, a3);\n}\ngoto LABEL_15;\n}\nif ( a2 == 240 )\ngoto LABEL_13;\n}\nLABEL_15:\nresult = a2;\n*(_BYTE *)(a1 + a2) = a3;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_40B5F6,sub_4024AD,sub_402496,]", "hints": "[]", "response": "{'a3': 'val', 'a1': 'z8', 'a2': 'reg', 'sub_40B5F6': 'setreg_internal', 'sub_4024AD': 'z8_tx', 'sub_402496': 'z8_port_write'}"}
[ [ 0.8147584795951843, 0.7922859787940979, 0.7770694494247437, 0.7679866552352905, 0.7671197056770325, 0.7668088674545288, 0.7648394703865051, 0.7570809125900269, 0.7509962320327759, 0.7492151856422424, 0.7478299140930176, 0.7474300265312195, 0.7457951903343201, 0.7446363568305969, 0.7374289035797119, 0.7342330813407898, 0.733659029006958, 0.733612060546875, 0.7333067655563354, 0.7288674116134644 ], [ 9242, 184575, 62059, 14321, 230526, 91727, 161941, 133787, 495, 201859, 218802, 12209, 238489, 147149, 239924, 48098, 183210, 160153, 260010, 4706 ] ]
get_groups
2d3bcb1d0a6d2d2c4d958fe7be136970f60b40087ef9d5ae29f84e62c84bbbf9
martanne
ciopfs
NA
static size_t get_groups(pid_t pid, gid_t **groups) { static char key[] = "\nGroups:\t"; char filename[64], buf[2048], *s, *t, c = '\0'; int fd, num_read, matched = 0; size_t n = 0; gid_t *gids, grp = 0; sprintf(filename, "/proc/%u/task/%u/status", pid, pid); fd = open(filename, O_RDONLY); if (fd == -1) return 0; for (;;) { if (!c) { num_read = read(fd, buf, sizeof(buf) - 1); if (num_read <= 0) { close(fd); return 0; } buf[num_read] = '\0'; s = buf; } c = *s++; if (key[matched] == c) { if (!key[++matched]) break; } else matched = (key[0] == c); } close(fd); t = s; n = 0; while (*t != '\n') { if (*t++ == ' ') n++; } if (n == 0) return 0; *groups = gids = malloc(n * sizeof(gid_t)); if (!gids) return 0; n = 0; while ((c = *s++) != '\n') { if (c >= '0' && c <= '9') grp = grp*10 + c - '0'; else if (c == ' ') { gids[n++] = grp; grp = 0; } } return n; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4027F8", "function_addr": 4204536, "binary_name": "2d3bcb1d0a6d2d2c4d958fe7be136970f60b40087ef9d5ae29f84e62c84bbbf9.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 890h"], [3, "mov [rbp+var_884], edi"], [4, "mov [rbp+var_890], rsi"], [5, "mov [rbp+var_11], 0"], [6, "mov [rbp+var_18], 0"], [7, "mov [rbp+var_20], 0"], [8, "mov [rbp+var_24], 0"], [9, "mov ecx, [rbp+var_884]"], [10, "mov edx, [rbp+var_884]"], [11, "lea rax, [rbp+s]"], [12, "mov esi, offset format"], [13, "mov rdi, rax"], [14, "mov eax, 0"], [15, "call _sprintf"], [16, "lea rax, [rbp+s]"], [17, "mov esi, 0"], [18, "mov rdi, rax"], [19, "mov eax, 0"], [20, "call _open64"], [21, "mov [rbp+fd], eax"], [22, "cmp [rbp+fd], 0FFFFFFFFh"], [23, "jnz short loc_402875"], [24, "mov eax, 0"], [25, "jmp locret_402A19"], [26, "cmp [rbp+var_11], 0"], [27, "jnz short loc_4028C9"], [28, "lea rcx, [rbp+buf]"], [29, "mov eax, [rbp+fd]"], [30, "mov edx, 7FFh"], [31, "mov rsi, rcx"], [32, "mov edi, eax"], [33, "call _read"], [34, "mov [rbp+var_2C], eax"], [35, "cmp [rbp+var_2C], 0"], [36, "jg short loc_4028B1"], [37, "mov eax, [rbp+fd]"], [38, "mov edi, eax"], [39, "call _close"], [40, "mov eax, 0"], [41, "jmp locret_402A19"], [42, "mov eax, [rbp+var_2C]"], [43, "cdqe"], [44, "mov [rbp+rax+buf], 0"], [45, "lea rax, [rbp+buf]"], [46, "mov [rbp+var_8], rax"], [47, "mov rax, [rbp+var_8]"], [48, "lea rdx, [rax+1]"], [49, "mov [rbp+var_8], rdx"], [50, "movzx eax, byte ptr [rax]"], [51, "mov [rbp+var_11], al"], [52, "mov eax, [rbp+var_18]"], [53, "cdqe"], [54, "movzx eax, byte_4074A0[rax]"], [55, "cmp [rbp+var_11], al"], [56, "jnz short loc_402906"], [57, "add [rbp+var_18], 1"], [58, "mov eax, [rbp+var_18]"], [59, "cdqe"], [60, "movzx eax, byte_4074A0[rax]"], [61, "test al, al"], [62, "jnz loc_402875"], [63, "jmp short loc_40291E"], [64, "movzx eax, cs:byte_4074A0"], [65, "cmp [rbp+var_11], al"], [66, "setz al"], [67, "movzx eax, al"], [68, "mov [rbp+var_18], eax"], [69, "jmp loc_402875"], [70, "mov eax, [rbp+fd]"], [71, "mov edi, eax"], [72, "call _close"], [73, "mov rax, [rbp+var_8]"], [74, "mov [rbp+var_10], rax"], [75, "mov [rbp+var_20], 0"], [76, "jmp short loc_402952"], [77, "mov rax, [rbp+var_10]"], [78, "lea rdx, [rax+1]"], [79, "mov [rbp+var_10], rdx"], [80, "movzx eax, byte ptr [rax]"], [81, "cmp al, 20h "], [82, "jnz short loc_402952"], [83, "add [rbp+var_20], 1"], [84, "mov rax, [rbp+var_10]"], [85, "movzx eax, byte ptr [rax]"], [86, "cmp al, 0Ah"], [87, "jnz short loc_40293A"], [88, "cmp [rbp+var_20], 0"], [89, "jnz short loc_40296E"], [90, "mov eax, 0"], [91, "jmp locret_402A19"], [92, "mov rax, [rbp+var_20]"], [93, "shl rax, 2"], [94, "mov rdi, rax"], [95, "call _malloc"], [96, "mov [rbp+var_38], rax"], [97, "mov rax, [rbp+var_890]"], [98, "mov rdx, [rbp+var_38]"], [99, "mov [rax], rdx"], [100, "cmp [rbp+var_38], 0"], [101, "jnz short loc_40299E"], [102, "mov eax, 0"], [103, "jmp short locret_402A19"], [104, "mov [rbp+var_20], 0"], [105, "jmp short loc_4029FD"], [106, "cmp [rbp+var_11], 2Fh "], [107, "jle short loc_4029D0"], [108, "cmp [rbp+var_11], 39h "], [109, "jg short loc_4029D0"], [110, "mov edx, [rbp+var_24]"], [111, "mov eax, edx"], [112, "shl eax, 2"], [113, "add eax, edx"], [114, "add eax, eax"], [115, "mov edx, eax"], [116, "movsx eax, [rbp+var_11]"], [117, "add eax, edx"], [118, "sub eax, 30h "], [119, "mov [rbp+var_24], eax"], [120, "jmp short loc_4029FD"], [121, "cmp [rbp+var_11], 20h "], [122, "jnz short loc_4029FD"], [123, "mov rax, [rbp+var_20]"], [124, "lea rdx, [rax+1]"], [125, "mov [rbp+var_20], rdx"], [126, "lea rdx, ds:0[rax*4]"], [127, "mov rax, [rbp+var_38]"], [128, "add rdx, rax"], [129, "mov eax, [rbp+var_24]"], [130, "mov [rdx], eax"], [131, "mov [rbp+var_24], 0"], [132, "mov rax, [rbp+var_8]"], [133, "lea rdx, [rax+1]"], [134, "mov [rbp+var_8], rdx"], [135, "movzx eax, byte ptr [rax]"], [136, "mov [rbp+var_11], al"], [137, "cmp [rbp+var_11], 0Ah"], [138, "jnz short loc_4029A8"], [139, "mov rax, [rbp+var_20]"], [140, "leave"], [141, "retn"]], "data_dep": [[9, 3], [10, 3], [13, 11], [16, 15], [18, 16], [21, 20], [22, 21], [23, 22], [26, 5], [26, 51], [27, 26], [28, 9], [28, 28], [29, 21], [31, 28], [32, 29], [34, 33], [35, 34], [36, 35], [37, 21], [38, 37], [42, 34], [44, 42], [45, 42], [46, 45], [47, 49], [47, 46], [48, 47], [48, 10], [48, 30], [48, 48], [49, 48], [50, 47], [51, 50], [52, 57], [52, 68], [52, 6], [55, 54], [55, 51], [56, 55], [57, 57], [57, 68], [57, 6], [58, 57], [61, 60], [62, 61], [65, 51], [65, 64], [66, 64], [66, 65], [67, 66], [68, 67], [70, 21], [71, 70], [73, 49], [74, 73], [77, 79], [77, 74], [78, 77], [78, 78], [78, 48], [79, 78], [80, 77], [81, 80], [82, 81], [83, 75], [83, 83], [84, 79], [84, 74], [85, 84], [86, 85], [87, 86], [88, 83], [88, 75], [89, 88], [92, 83], [92, 75], [93, 92], [94, 93], [96, 95], [97, 4], [98, 96], [99, 97], [99, 98], [100, 96], [101, 100], [106, 136], [107, 106], [108, 136], [109, 108], [110, 8], [110, 131], [110, 119], [111, 110], [112, 111], [113, 110], [113, 112], [114, 113], [115, 114], [116, 136], [117, 116], [117, 115], [118, 117], [119, 118], [121, 136], [122, 121], [123, 125], [123, 104], [124, 133], [124, 99], [124, 130], [124, 123], [125, 124], [126, 124], [127, 96], [128, 126], [128, 127], [129, 8], [129, 131], [129, 119], [130, 128], [130, 129], [132, 134], [132, 49], [133, 132], [133, 115], [133, 99], [133, 133], [133, 98], [133, 128], [133, 130], [134, 133], [135, 99], [135, 130], [135, 132], [136, 135], [137, 136], [138, 137], [139, 125], [139, 104], [141, 40], [141, 90], [141, 139], [141, 102], [141, 24]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/2d3bcb1d0a6d2d2c4d958fe7be136970f60b40087ef9d5ae29f84e62c84bbbf9_2d3bcb1d0a6d2d2c4d958fe7be136970f60b40087ef9d5ae29f84e62c84bbbf9.jsonl.gz", "strip_func_name": "sub_4027F8", "query": "\n\n\n__int64 __fastcall sub_4027F8(unsigned int a1, _QWORD *a2)\n{\nchar *v3; // rax\nchar *v4; // rax\n__int64 v5; // rax\nchar *v6; // rax\nchar buf[2048]; // [rsp+10h] [rbp-880h] BYREF\nchar s[72]; // [rsp+810h] [rbp-80h] BYREF\n_DWORD *v9; // [rsp+858h] [rbp-38h]\nint v10; // [rsp+864h] [rbp-2Ch]\nint fd; // [rsp+868h] [rbp-28h]\nint v12; // [rsp+86Ch] [rbp-24h]\n__int64 v13; // [rsp+870h] [rbp-20h]\nint v14; // [rsp+878h] [rbp-18h]\nchar v15; // [rsp+87Fh] [rbp-11h]\nchar *v16; // [rsp+880h] [rbp-10h]\nchar *v17; // [rsp+888h] [rbp-8h]\n\nv15 = 0;\nv14 = 0;\nv13 = 0LL;\nv12 = 0;\nsprintf(s, \"/proc/%u/task/%u/status\", a1, a1);\nfd = open64(s, 0);\nif ( fd == -1 )\nreturn 0LL;\ndo\n{\nwhile ( 1 )\n{\nif ( !v15 )\n{\nv10 = read(fd, buf, 0x7FFuLL);\nif ( v10 <= 0 )\n{\nclose(fd);\nreturn 0LL;\n}\nbuf[v10] = 0;\nv17 = buf;\n}\nv3 = v17++;\nv15 = *v3;\nif ( v15 == byte_4074A0[v14] )\nbreak;\nv14 = v15 == byte_4074A0[0];\n}\n++v14;\n}\nwhile ( byte_4074A0[v14] );\nclose(fd);\nv16 = v17;\nv13 = 0LL;\nwhile ( *v16 != 10 )\n{\nv4 = v16++;\nif ( *v4 == 32 )\n++v13;\n}\nif ( !v13 )\nreturn 0LL;\nv9 = malloc(4 * v13);\n*a2 = v9;\nif ( !v9 )\nreturn 0LL;\nv13 = 0LL;\nwhile ( 1 )\n{\nv6 = v17++;\nv15 = *v6;\nif ( v15 == 10 )\nbreak;\nif ( v15 <= 47 || v15 > 57 )\n{\nif ( v15 == 32 )\n{\nv5 = v13++;\nv9[v5] = v12;\nv12 = 0;\n}\n}\nelse\n{\nv12 = 10 * v12 + v15 - 48;\n}\n}\nreturn v13;\n}\n\n\n\nQ:[a1,a2,s,v9,v10,v12,v13,v14,v15,v16,v17,sub_4027F8,]", "hints": "[]", "response": "{'a1': 'pid', 'a2': 'groups', 's': 'filename', 'v9': 'gids', 'v10': 'num_read', 'v12': 'grp', 'v13': 'n', 'v14': 'matched', 'v15': 'c', 'v16': 't', 'v17': 's', 'sub_4027F8': 'get_groups'}"}
[ [ 0.7576595544815063, 0.7329385280609131, 0.72840416431427, 0.7247821688652039, 0.7119258046150208, 0.7092999815940857, 0.701790988445282, 0.6979479789733887, 0.6958460807800293, 0.6954562664031982, 0.6941638588905334, 0.6919676661491394, 0.6909812688827515, 0.6893453598022461, 0.6883169412612915, 0.6871494054794312, 0.6839843392372131, 0.6813470125198364, 0.6806719303131104, 0.6772844791412354 ], [ 157007, 91524, 3935, 164770, 36348, 79878, 54640, 243034, 200167, 373, 48549, 6124, 217665, 122056, 2685, 81671, 123671, 72723, 25421, 237513 ] ]
push_intv
2a5bc6dd5ba0c5756c3f4777a7f0f67e062753e5848d2c86f9f2aee90bff83cb
lh3
minimap
NA
static inline void push_intv(mm128_v *intv, int start, int end, float merge_frac) { mm128_t *p; if (intv->n > 0) { // test overlap int last_start, last_end, min; p = &intv->a[intv->n-1]; last_start = p->y, last_end = p->x + last_start; min = end - start < last_end - last_start? end - start : last_end - last_start; if (last_end > start && last_end - start > min * merge_frac) { // large overlap; then merge p->x = end - last_start; return; } } kv_pushp(mm128_t, *intv, &p); // a new interval p->x = end - start, p->y = start; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4087F9", "function_addr": 4229113, "binary_name": "2a5bc6dd5ba0c5756c3f4777a7f0f67e062753e5848d2c86f9f2aee90bff83cb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_2C], esi"], [5, "mov [rbp+var_30], edx"], [6, "movss [rbp+var_34], xmm0"], [7, "mov rax, [rbp+var_28]"], [8, "mov rax, [rax]"], [9, "test rax, rax"], [10, "jz loc_4088B0"], [11, "mov rax, [rbp+var_28]"], [12, "mov rdx, [rax+10h]"], [13, "mov rax, [rbp+var_28]"], [14, "mov rax, [rax]"], [15, "shl rax, 4"], [16, "sub rax, 10h"], [17, "add rax, rdx"], [18, "mov [rbp+var_18], rax"], [19, "mov rax, [rbp+var_18]"], [20, "mov rax, [rax+8]"], [21, "mov [rbp+var_4], eax"], [22, "mov rax, [rbp+var_18]"], [23, "mov rax, [rax]"], [24, "mov edx, eax"], [25, "mov eax, [rbp+var_4]"], [26, "add eax, edx"], [27, "mov [rbp+var_8], eax"], [28, "mov eax, [rbp+var_8]"], [29, "sub eax, [rbp+var_4]"], [30, "mov edx, eax"], [31, "mov eax, [rbp+var_30]"], [32, "sub eax, [rbp+var_2C]"], [33, "cmp edx, eax"], [34, "cmovle eax, edx"], [35, "mov [rbp+var_C], eax"], [36, "mov eax, [rbp+var_8]"], [37, "cmp eax, [rbp+var_2C]"], [38, "jle short loc_4088B0"], [39, "mov eax, [rbp+var_8]"], [40, "sub eax, [rbp+var_2C]"], [41, "pxor xmm0, xmm0"], [42, "cvtsi2ss xmm0, eax"], [43, "pxor xmm1, xmm1"], [44, "cvtsi2ss xmm1, [rbp+var_C]"], [45, "mulss xmm1, [rbp+var_34]"], [46, "comiss xmm0, xmm1"], [47, "jbe short loc_4088B0"], [48, "mov eax, [rbp+var_30]"], [49, "sub eax, [rbp+var_4]"], [50, "mov edx, eax"], [51, "mov rax, [rbp+var_18]"], [52, "movsxd rdx, edx"], [53, "mov [rax], rdx"], [54, "jmp locret_40895B"], [55, "mov rax, [rbp+var_28]"], [56, "mov rdx, [rax]"], [57, "mov rax, [rbp+var_28]"], [58, "mov rax, [rax+8]"], [59, "cmp rdx, rax"], [60, "jnz short loc_408916"], [61, "mov rax, [rbp+var_28]"], [62, "mov rax, [rax+8]"], [63, "test rax, rax"], [64, "jz short loc_4088DF"], [65, "mov rax, [rbp+var_28]"], [66, "mov rax, [rax+8]"], [67, "lea rdx, [rax+rax]"], [68, "jmp short loc_4088E4"], [69, "mov edx, 2"], [70, "mov rax, [rbp+var_28]"], [71, "mov [rax+8], rdx"], [72, "mov rax, [rbp+var_28]"], [73, "mov rax, [rax+8]"], [74, "shl rax, 4"], [75, "mov rdx, rax"], [76, "mov rax, [rbp+var_28]"], [77, "mov rax, [rax+10h]"], [78, "mov rsi, rdx"], [79, "mov rdi, rax"], [80, "call _realloc"], [81, "mov rdx, [rbp+var_28]"], [82, "mov [rdx+10h], rax"], [83, "mov rax, [rbp+var_28]"], [84, "mov rsi, [rax+10h]"], [85, "mov rax, [rbp+var_28]"], [86, "mov rax, [rax]"], [87, "lea rcx, [rax+1]"], [88, "mov rdx, [rbp+var_28]"], [89, "mov [rdx], rcx"], [90, "shl rax, 4"], [91, "add rax, rsi"], [92, "mov [rbp+var_18], rax"], [93, "mov eax, [rbp+var_30]"], [94, "sub eax, [rbp+var_2C]"], [95, "mov edx, eax"], [96, "mov rax, [rbp+var_18]"], [97, "movsxd rdx, edx"], [98, "mov [rax], rdx"], [99, "mov rax, [rbp+var_18]"], [100, "mov edx, [rbp+var_2C]"], [101, "movsxd rdx, edx"], [102, "mov [rax+8], rdx"], [103, "leave"], [104, "retn"]], "data_dep": [[7, 3], [8, 7], [9, 8], [10, 9], [11, 3], [12, 11], [13, 3], [14, 13], [15, 14], [16, 15], [17, 12], [17, 16], [18, 17], [19, 18], [20, 19], [21, 20], [22, 18], [23, 22], [24, 23], [25, 21], [26, 25], [26, 24], [27, 26], [28, 27], [29, 28], [29, 21], [30, 29], [31, 5], [32, 4], [32, 31], [33, 30], [33, 32], [34, 30], [35, 34], [36, 27], [37, 4], [37, 36], [38, 37], [39, 27], [40, 4], [40, 39], [42, 41], [42, 40], [44, 35], [44, 43], [45, 6], [45, 44], [46, 45], [46, 42], [47, 40], [48, 5], [49, 48], [49, 21], [50, 49], [51, 18], [52, 50], [53, 52], [53, 51], [55, 3], [56, 55], [57, 3], [58, 57], [59, 56], [59, 58], [60, 59], [61, 3], [62, 61], [63, 62], [64, 63], [65, 3], [66, 65], [67, 56], [67, 66], [70, 3], [71, 67], [71, 69], [71, 70], [72, 3], [73, 71], [73, 72], [74, 73], [75, 74], [76, 3], [77, 76], [77, 71], [78, 75], [79, 77], [81, 3], [82, 81], [82, 80], [83, 3], [84, 102], [84, 83], [84, 71], [84, 89], [84, 98], [84, 82], [85, 3], [86, 102], [86, 85], [86, 71], [86, 89], [86, 98], [86, 82], [87, 71], [87, 89], [87, 82], [87, 98], [87, 102], [87, 86], [88, 3], [89, 88], [89, 87], [90, 86], [91, 84], [91, 90], [92, 91], [93, 5], [94, 4], [94, 93], [95, 94], [96, 92], [97, 95], [98, 96], [98, 97], [99, 92], [100, 4], [101, 100], [102, 99], [102, 101], [104, 51], [104, 99]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/2a5bc6dd5ba0c5756c3f4777a7f0f67e062753e5848d2c86f9f2aee90bff83cb_2a5bc6dd5ba0c5756c3f4777a7f0f67e062753e5848d2c86f9f2aee90bff83cb.jsonl.gz", "strip_func_name": "sub_4087F9", "query": "\n\n\n__int64 __fastcall sub_4087F9(__int64 a1, int a2, int a3, float a4)\n{\nint v4; // eax\n__int64 result; // rax\n__int64 v6; // rdx\n__int64 v7; // rsi\n__int64 v8; // rax\n_QWORD *v11; // [rsp+28h] [rbp-18h]\nint v12; // [rsp+38h] [rbp-8h]\nint v13; // [rsp+3Ch] [rbp-4h]\n\nif ( !*(_QWORD *)a1 )\ngoto LABEL_7;\nv11 = (_QWORD *)(*(_QWORD *)(a1 + 16) + 16LL * *(_QWORD *)a1 - 16);\nv13 = v11[1];\nv12 = *v11 + v13;\nv4 = a3 - a2;\nif ( (int)*v11 <= a3 - a2 )\nv4 = *v11;\nif ( v12 > a2 && (float)(v12 - a2) > (float)((float)v4 * a4) )\n{\nresult = *(_QWORD *)(a1 + 16) + 16LL * *(_QWORD *)a1 - 16;\n*v11 = a3 - v13;\n}\nelse\n{\nLABEL_7:\nif ( *(_QWORD *)a1 == *(_QWORD *)(a1 + 8) )\n{\nif ( *(_QWORD *)(a1 + 8) )\nv6 = 2LL * *(_QWORD *)(a1 + 8);\nelse\nv6 = 2LL;\n*(_QWORD *)(a1 + 8) = v6;\n*(_QWORD *)(a1 + 16) = realloc(*(void **)(a1 + 16), 16LL * *(_QWORD *)(a1 + 8));\n}\nv7 = *(_QWORD *)(a1 + 16);\nv8 = (*(_QWORD *)a1)++;\n*(_QWORD *)(v7 + 16 * v8) = a3 - a2;\nresult = v7 + 16 * v8;\n*(_QWORD *)(result + 8) = a2;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,a4,v11,v12,v13,sub_4087F9,]", "hints": "[]", "response": "{'a3': 'end', 'a1': 'intv', 'a2': 'start', 'a4': 'merge_frac', 'v11': 'p', 'v12': 'last_end', 'v13': 'last_start', 'sub_4087F9': 'push_intv'}"}
[ [ 0.8117178678512573, 0.7679719924926758, 0.7523595094680786, 0.7359070777893066, 0.7347135543823242, 0.7168508768081665, 0.714214563369751, 0.7105519771575928, 0.7101626992225647, 0.70502108335495, 0.7005500793457031, 0.7001903653144836, 0.690832793712616, 0.6897259950637817, 0.6884768009185791, 0.6872398853302002, 0.6871426105499268, 0.6869523525238037, 0.6860823631286621, 0.686012864112854 ], [ 9436, 228801, 11560, 217107, 129382, 59592, 264086, 5649, 165933, 4212, 184870, 70423, 246795, 92097, 54244, 263710, 48354, 241536, 78847, 252168 ] ]
arm_fir_sparse_init_q31
3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec
gwsystems
sledge-serverless-framework
NA
void arm_fir_sparse_init_q31( arm_fir_sparse_instance_q31 * S, uint16_t numTaps, const q31_t * pCoeffs, q31_t * pState, int32_t * pTapDelay, uint16_t maxDelay, uint32_t blockSize) { /* Assign filter taps */ S->numTaps = numTaps; /* Assign coefficient pointer */ S->pCoeffs = pCoeffs; /* Assign TapDelay pointer */ S->pTapDelay = pTapDelay; /* Assign MaxDelay */ S->maxDelay = maxDelay; /* reset the stateIndex to 0 */ S->stateIndex = 0U; /* Clear state buffer and size is always maxDelay + blockSize */ memset(pState, 0, (maxDelay + blockSize) * sizeof(q31_t)); /* Assign state pointer */ S->pState = pState; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41AA19", "function_addr": 4303385, "binary_name": "3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_8], rdi"], [4, "mov eax, esi"], [5, "mov [rbp+var_18], rdx"], [6, "mov [rbp+s], rcx"], [7, "mov [rbp+var_28], r8"], [8, "mov edx, r9d"], [9, "mov [rbp+var_C], ax"], [10, "mov eax, edx"], [11, "mov [rbp+var_10], ax"], [12, "mov rax, [rbp+var_8]"], [13, "movzx edx, [rbp+var_C]"], [14, "mov [rax], dx"], [15, "mov rax, [rbp+var_8]"], [16, "mov rdx, [rbp+var_18]"], [17, "mov [rax+10h], rdx"], [18, "mov rax, [rbp+var_8]"], [19, "mov rdx, [rbp+var_28]"], [20, "mov [rax+20h], rdx"], [21, "mov rax, [rbp+var_8]"], [22, "movzx edx, [rbp+var_10]"], [23, "mov [rax+18h], dx"], [24, "mov rax, [rbp+var_8]"], [25, "mov word ptr [rax+2], 0"], [26, "movzx edx, [rbp+var_10]"], [27, "mov eax, [rbp+arg_0]"], [28, "add eax, edx"], [29, "mov eax, eax"], [30, "lea rdx, ds:0[rax*4]"], [31, "mov rax, [rbp+s]"], [32, "mov esi, 0"], [33, "mov rdi, rax"], [34, "call _memset"], [35, "mov rax, [rbp+var_8]"], [36, "mov rdx, [rbp+s]"], [37, "mov [rax+8], rdx"], [38, "nop"], [39, "leave"], [40, "retn"]], "data_dep": [[9, 4], [10, 8], [11, 10], [12, 3], [13, 9], [14, 13], [14, 12], [15, 3], [16, 5], [17, 15], [17, 16], [18, 3], [19, 7], [20, 19], [20, 18], [21, 3], [22, 11], [23, 22], [23, 21], [24, 3], [25, 24], [26, 11], [28, 27], [28, 26], [29, 28], [30, 26], [31, 6], [33, 31], [35, 3], [36, 6], [37, 36], [37, 35], [40, 35]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec_3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.jsonl.gz", "strip_func_name": "sub_41AA19", "query": "\n\n\n__int64 __fastcall sub_41AA19(__int64 a1, __int16 a2, __int64 a3, void *a4, __int64 a5, unsigned __int16 a6, int a7)\n{\n__int64 result; // rax\n\n*(_WORD *)a1 = a2;\n*(_QWORD *)(a1 + 16) = a3;\n*(_QWORD *)(a1 + 32) = a5;\n*(_WORD *)(a1 + 24) = a6;\n*(_WORD *)(a1 + 2) = 0;\nmemset(a4, 0, 4LL * ((unsigned int)a6 + a7));\nresult = a1;\n*(_QWORD *)(a1 + 8) = a4;\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,a7,sub_41AA19,]", "hints": "[]", "response": "{'a3': 'pCoeffs', 'a4': 'pState', 'a1': 'S', 'a2': 'numTaps', 'a5': 'pTapDelay', 'a6': 'maxDelay', 'a7': 'blockSize', 'sub_41AA19': 'arm_fir_sparse_init_q31'}"}
[ [ 0.7886272668838501, 0.7877699732780457, 0.7846391797065735, 0.7694507241249084, 0.768677830696106, 0.7667844295501709, 0.7554160356521606, 0.7530956864356995, 0.752936840057373, 0.7395116090774536, 0.7378660440444946, 0.7375768423080444, 0.7282609939575195, 0.7276123762130737, 0.7237188816070557, 0.7199827432632446, 0.7187342047691345, 0.7187107801437378, 0.7184569835662842, 0.7170673608779907 ], [ 49594, 51763, 16622, 87541, 231859, 63055, 83690, 114585, 151101, 678, 19230, 125134, 213065, 70495, 140777, 196808, 255481, 77969, 15990, 3753 ] ]
arm_lms_init_q31
3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec
gwsystems
sledge-serverless-framework
NA
void arm_lms_init_q31( arm_lms_instance_q31 * S, uint16_t numTaps, q31_t * pCoeffs, q31_t * pState, q31_t mu, uint32_t blockSize, uint32_t postShift) { /* Assign filter taps */ S->numTaps = numTaps; /* Assign coefficient pointer */ S->pCoeffs = pCoeffs; /* Clear state buffer and size is always blockSize + numTaps - 1 */ memset(pState, 0, (numTaps + (blockSize - 1U)) * sizeof(q31_t)); /* Assign state pointer */ S->pState = pState; /* Assign Step size value */ S->mu = mu; /* Assign postShift value to be applied */ S->postShift = postShift; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41CFF1", "function_addr": 4313073, "binary_name": "3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_8], rdi"], [4, "mov eax, esi"], [5, "mov [rbp+var_18], rdx"], [6, "mov [rbp+s], rcx"], [7, "mov [rbp+var_10], r8d"], [8, "mov [rbp+var_24], r9d"], [9, "mov [rbp+var_C], ax"], [10, "mov rax, [rbp+var_8]"], [11, "movzx edx, [rbp+var_C]"], [12, "mov [rax], dx"], [13, "mov rax, [rbp+var_8]"], [14, "mov rdx, [rbp+var_18]"], [15, "mov [rax+10h], rdx"], [16, "movzx edx, [rbp+var_C]"], [17, "mov eax, [rbp+var_24]"], [18, "add eax, edx"], [19, "sub eax, 1"], [20, "mov eax, eax"], [21, "lea rdx, ds:0[rax*4]"], [22, "mov rax, [rbp+s]"], [23, "mov esi, 0"], [24, "mov rdi, rax"], [25, "call _memset"], [26, "mov rax, [rbp+var_8]"], [27, "mov rdx, [rbp+s]"], [28, "mov [rax+8], rdx"], [29, "mov rax, [rbp+var_8]"], [30, "mov edx, [rbp+var_10]"], [31, "mov [rax+18h], edx"], [32, "mov rax, [rbp+var_8]"], [33, "mov edx, [rbp+arg_0]"], [34, "mov [rax+1Ch], edx"], [35, "nop"], [36, "leave"], [37, "retn"]], "data_dep": [[9, 4], [10, 3], [11, 9], [12, 10], [12, 11], [13, 3], [14, 5], [15, 14], [15, 13], [16, 9], [17, 8], [18, 17], [18, 16], [19, 18], [20, 19], [21, 16], [22, 6], [24, 22], [26, 3], [27, 6], [28, 27], [28, 26], [29, 3], [30, 7], [31, 29], [31, 30], [32, 3], [34, 33], [34, 32], [37, 32]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec_3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.jsonl.gz", "strip_func_name": "sub_41CFF1", "query": "\n\n\n__int64 __fastcall sub_41CFF1(__int64 a1, unsigned __int16 a2, __int64 a3, void *a4, int a5, int a6, int a7)\n{\n__int64 result; // rax\n\n*(_WORD *)a1 = a2;\n*(_QWORD *)(a1 + 16) = a3;\nmemset(a4, 0, 4LL * ((unsigned int)a2 + a6 - 1));\n*(_QWORD *)(a1 + 8) = a4;\n*(_DWORD *)(a1 + 24) = a5;\nresult = a1;\n*(_DWORD *)(a1 + 28) = a7;\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,a7,sub_41CFF1,]", "hints": "[]", "response": "{'a3': 'pCoeffs', 'a4': 'pState', 'a1': 'S', 'a2': 'numTaps', 'a5': 'mu', 'a6': 'blockSize', 'a7': 'postShift', 'sub_41CFF1': 'arm_lms_init_q31'}"}
[ [ 0.7569663524627686, 0.7375890016555786, 0.7340942621231079, 0.7321105599403381, 0.7193372249603271, 0.7190829515457153, 0.7174752950668335, 0.7156991958618164, 0.7113046646118164, 0.7106970548629761, 0.7092565298080444, 0.7082127928733826, 0.707893967628479, 0.7071406841278076, 0.7055169343948364, 0.6994110941886902, 0.6972171068191528, 0.6951457262039185, 0.694155216217041, 0.6932284235954285 ], [ 70495, 168009, 125134, 244743, 230155, 35819, 4735, 88754, 222855, 134875, 94488, 77866, 36798, 60713, 36175, 32909, 84361, 16622, 143582, 175175 ] ]
gravity_check_stack
b2b6239f41efcd906cff8a967b6680bd1e1b9f4105564fc6f50ab0c84f5f6e97
marcobambini
gravity
NA
static inline bool gravity_check_stack (gravity_vm *vm, gravity_fiber_t *fiber, uint32_t stacktopdelta, gravity_value_t **stackstart) { #pragma unused(vm) if (stacktopdelta == 0) return true; // update stacktop pointer before a call fiber->stacktop += stacktopdelta; // check stack size uint32_t stack_size = (uint32_t)(fiber->stacktop - fiber->stack); uint32_t stack_needed = MAXNUM(stack_size, DEFAULT_MINSTACK_SIZE); if (fiber->stackalloc >= stack_needed) return true; gravity_value_t *old_stack = fiber->stack; // perform stack reallocation (power_of2_ceil returns 0 if argument is bigger than 2^31) uint32_t new_size = power_of2_ceil(fiber->stackalloc + stack_needed); bool size_condition = (new_size && (uint64_t)new_size >= (uint64_t)(fiber->stackalloc + stack_needed) && ((sizeof(gravity_value_t) * new_size) < SIZE_MAX)); void *ptr = (size_condition) ? mem_realloc(NULL, fiber->stack, sizeof(gravity_value_t) * new_size) : NULL; if (!ptr) { // restore stacktop to previous state fiber->stacktop -= stacktopdelta; // stack reallocation failed means that there is a very high probability to be into an infinite loop // so return false and let the calling function (vm_exec) raise a runtime error return false; } fiber->stack = (gravity_value_t *)ptr; fiber->stackalloc = new_size; STAT_STACK_REALLOCATED(vm); // check if reallocation moved the stack if (fiber->stack == old_stack) return true; // re-compute ptr offset ptrdiff_t offset = (ptrdiff_t)(fiber->stack - old_stack); // adjust stack pointer for each call frame for (uint32_t i=0; i < fiber->nframes; ++i) { fiber->frames[i].stackstart += offset; } // adjust upvalues ptr offset gravity_upvalue_t *upvalue = fiber->upvalues; while (upvalue) { upvalue->value += offset; upvalue = upvalue->next; } // adjust fiber stack pointer fiber->stacktop += offset; // stack is changed so update currently used stackstart *stackstart += offset; return true; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_425E2D", "function_addr": 4349485, "binary_name": "b2b6239f41efcd906cff8a967b6680bd1e1b9f4105564fc6f50ab0c84f5f6e97.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 60h"], [3, "mov [rbp+var_48], rdi"], [4, "mov [rbp+var_50], rsi"], [5, "mov [rbp+var_54], edx"], [6, "mov [rbp+var_60], rcx"], [7, "cmp [rbp+var_54], 0"], [8, "jnz short loc_425E54"], [9, "mov eax, 1"], [10, "jmp locret_426088"], [11, "mov rax, [rbp+var_50]"], [12, "mov rdx, [rax+38h]"], [13, "mov eax, [rbp+var_54]"], [14, "shl rax, 4"], [15, "add rdx, rax"], [16, "mov rax, [rbp+var_50]"], [17, "mov [rax+38h], rdx"], [18, "mov rax, [rbp+var_50]"], [19, "mov rdx, [rax+38h]"], [20, "mov rax, [rbp+var_50]"], [21, "mov rcx, [rax+30h]"], [22, "mov rax, rdx"], [23, "sub rax, rcx"], [24, "sar rax, 4"], [25, "mov [rbp+var_14], eax"], [26, "mov eax, 100h"], [27, "cmp [rbp+var_14], 100h"], [28, "cmovnb eax, [rbp+var_14]"], [29, "mov [rbp+var_18], eax"], [30, "mov rax, [rbp+var_50]"], [31, "mov eax, [rax+40h]"], [32, "cmp [rbp+var_18], eax"], [33, "ja short loc_425EB4"], [34, "mov eax, 1"], [35, "jmp locret_426088"], [36, "mov rax, [rbp+var_50]"], [37, "mov rax, [rax+30h]"], [38, "mov [rbp+var_20], rax"], [39, "mov rax, [rbp+var_50]"], [40, "mov edx, [rax+40h]"], [41, "mov eax, [rbp+var_18]"], [42, "add eax, edx"], [43, "mov edi, eax"], [44, "call sub_45FC9E"], [45, "mov [rbp+var_24], eax"], [46, "cmp [rbp+var_24], 0"], [47, "jz short loc_425F01"], [48, "mov rax, [rbp+var_50]"], [49, "mov edx, [rax+40h]"], [50, "mov eax, [rbp+var_18]"], [51, "add eax, edx"], [52, "cmp [rbp+var_24], eax"], [53, "jb short loc_425F01"], [54, "mov eax, [rbp+var_24]"], [55, "shl rax, 4"], [56, "cmp rax, 0FFFFFFFFFFFFFFFFh"], [57, "jz short loc_425F01"], [58, "mov eax, 1"], [59, "jmp short loc_425F06"], [60, "mov eax, 0"], [61, "mov [rbp+var_25], al"], [62, "and [rbp+var_25], 1"], [63, "cmp [rbp+var_25], 0"], [64, "jz short loc_425F34"], [65, "mov eax, [rbp+var_24]"], [66, "shl rax, 4"], [67, "mov rdx, rax"], [68, "mov rax, [rbp+var_50]"], [69, "mov rax, [rax+30h]"], [70, "mov rsi, rax"], [71, "mov edi, 0"], [72, "call sub_45070B"], [73, "jmp short loc_425F39"], [74, "mov eax, 0"], [75, "mov [rbp+var_30], rax"], [76, "cmp [rbp+var_30], 0"], [77, "jnz short loc_425F6B"], [78, "mov rax, [rbp+var_50]"], [79, "mov rdx, [rax+38h]"], [80, "mov eax, [rbp+var_54]"], [81, "shl rax, 4"], [82, "neg rax"], [83, "add rdx, rax"], [84, "mov rax, [rbp+var_50]"], [85, "mov [rax+38h], rdx"], [86, "mov eax, 0"], [87, "jmp locret_426088"], [88, "mov rax, [rbp+var_50]"], [89, "mov rdx, [rbp+var_30]"], [90, "mov [rax+30h], rdx"], [91, "mov rax, [rbp+var_50]"], [92, "mov edx, [rbp+var_24]"], [93, "mov [rax+40h], edx"], [94, "mov rax, [rbp+var_50]"], [95, "mov rax, [rax+30h]"], [96, "cmp [rbp+var_20], rax"], [97, "jnz short loc_425F99"], [98, "mov eax, 1"], [99, "jmp locret_426088"], [100, "mov rax, [rbp+var_50]"], [101, "mov rax, [rax+30h]"], [102, "sub rax, [rbp+var_20]"], [103, "sar rax, 4"], [104, "mov [rbp+var_38], rax"], [105, "mov [rbp+var_4], 0"], [106, "jmp short loc_426007"], [107, "mov rax, [rbp+var_50]"], [108, "mov rcx, [rax+48h]"], [109, "mov edx, [rbp+var_4]"], [110, "mov rax, rdx"], [111, "add rax, rax"], [112, "add rax, rdx"], [113, "shl rax, 4"], [114, "add rax, rcx"], [115, "mov rcx, [rax+20h]"], [116, "mov rax, [rbp+var_38]"], [117, "shl rax, 4"], [118, "mov rdi, rax"], [119, "mov rax, [rbp+var_50]"], [120, "mov rsi, [rax+48h]"], [121, "mov edx, [rbp+var_4]"], [122, "mov rax, rdx"], [123, "add rax, rax"], [124, "add rax, rdx"], [125, "shl rax, 4"], [126, "add rax, rsi"], [127, "lea rdx, [rcx+rdi]"], [128, "mov [rax+20h], rdx"], [129, "add [rbp+var_4], 1"], [130, "mov rax, [rbp+var_50]"], [131, "mov eax, [rax+50h]"], [132, "cmp [rbp+var_4], eax"], [133, "jb short loc_425FB6"], [134, "mov rax, [rbp+var_50]"], [135, "mov rax, [rax+58h]"], [136, "mov [rbp+var_10], rax"], [137, "jmp short loc_426048"], [138, "mov rax, [rbp+var_10]"], [139, "mov rdx, [rax+30h]"], [140, "mov rax, [rbp+var_38]"], [141, "shl rax, 4"], [142, "add rdx, rax"], [143, "mov rax, [rbp+var_10]"], [144, "mov [rax+30h], rdx"], [145, "mov rax, [rbp+var_10]"], [146, "mov rax, [rax+48h]"], [147, "mov [rbp+var_10], rax"], [148, "cmp [rbp+var_10], 0"], [149, "jnz short loc_426021"], [150, "mov rax, [rbp+var_50]"], [151, "mov rdx, [rax+38h]"], [152, "mov rax, [rbp+var_38]"], [153, "shl rax, 4"], [154, "add rdx, rax"], [155, "mov rax, [rbp+var_50]"], [156, "mov [rax+38h], rdx"], [157, "mov rax, [rbp+var_60]"], [158, "mov rdx, [rax]"], [159, "mov rax, [rbp+var_38]"], [160, "shl rax, 4"], [161, "add rdx, rax"], [162, "mov rax, [rbp+var_60]"], [163, "mov [rax], rdx"], [164, "mov eax, 1"], [165, "leave"], [166, "retn"]], "data_dep": [[7, 5], [8, 7], [11, 4], [12, 11], [13, 5], [14, 13], [15, 14], [15, 12], [16, 4], [17, 16], [17, 15], [18, 4], [19, 18], [19, 17], [20, 4], [21, 20], [21, 17], [22, 19], [23, 22], [23, 21], [24, 23], [25, 24], [27, 25], [28, 25], [28, 27], [29, 28], [30, 4], [31, 17], [31, 30], [32, 29], [32, 31], [33, 32], [36, 4], [37, 17], [37, 36], [38, 37], [39, 4], [40, 17], [40, 39], [41, 29], [42, 41], [42, 40], [43, 42], [45, 44], [46, 45], [47, 46], [48, 4], [49, 48], [49, 17], [50, 29], [51, 50], [51, 49], [52, 51], [52, 45], [53, 52], [54, 45], [55, 54], [56, 55], [57, 56], [61, 58], [61, 60], [62, 61], [63, 62], [64, 63], [65, 45], [66, 65], [67, 66], [68, 4], [69, 17], [69, 68], [70, 69], [75, 72], [75, 74], [76, 75], [77, 76], [78, 4], [79, 17], [79, 85], [79, 78], [80, 5], [81, 80], [82, 81], [83, 82], [83, 79], [84, 4], [85, 84], [85, 83], [88, 4], [89, 75], [90, 88], [90, 89], [91, 4], [92, 45], [93, 92], [93, 91], [94, 4], [95, 93], [95, 90], [95, 94], [96, 95], [96, 38], [97, 96], [100, 4], [101, 17], [101, 90], [101, 93], [101, 100], [102, 38], [102, 101], [103, 102], [104, 103], [107, 4], [108, 107], [108, 93], [108, 17], [108, 90], [108, 128], [109, 129], [109, 105], [110, 109], [111, 110], [112, 109], [112, 111], [113, 112], [114, 113], [114, 108], [115, 128], [115, 114], [115, 93], [115, 17], [115, 90], [116, 104], [117, 116], [118, 117], [119, 4], [120, 17], [120, 90], [120, 119], [120, 128], [120, 93], [121, 105], [121, 129], [122, 121], [123, 122], [124, 121], [124, 123], [125, 124], [126, 125], [126, 120], [127, 115], [127, 17], [127, 90], [127, 128], [127, 121], [127, 93], [128, 126], [128, 127], [129, 129], [129, 105], [130, 4], [131, 17], [131, 90], [131, 128], [131, 130], [131, 93], [132, 105], [132, 129], [132, 131], [133, 132], [134, 4], [135, 90], [135, 128], [135, 93], [135, 134], [135, 17], [136, 135], [138, 136], [138, 147], [139, 90], [139, 144], [139, 128], [139, 93], [139, 17], [139, 138], [140, 104], [141, 140], [142, 139], [142, 141], [143, 136], [143, 147], [144, 143], [144, 142], [145, 147], [145, 136], [146, 145], [146, 144], [147, 146], [148, 136], [148, 147], [149, 148], [150, 4], [151, 93], [151, 150], [151, 17], [151, 90], [151, 163], [151, 156], [151, 128], [151, 144], [152, 104], [153, 152], [154, 151], [154, 153], [155, 4], [156, 154], [156, 155], [157, 6], [158, 156], [158, 157], [159, 104], [160, 159], [161, 158], [161, 160], [162, 6], [163, 161], [163, 162], [166, 34], [166, 98], [166, 9], [166, 164], [166, 86]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/b2b6239f41efcd906cff8a967b6680bd1e1b9f4105564fc6f50ab0c84f5f6e97_b2b6239f41efcd906cff8a967b6680bd1e1b9f4105564fc6f50ab0c84f5f6e97.jsonl.gz", "strip_func_name": "sub_425E2D", "query": "\n\n\n__int64 __fastcall sub_425E2D(__int64 a1, __int64 a2, unsigned int a3, _QWORD *a4)\n{\n__int64 result; // rax\nunsigned int v5; // eax\n__int64 v7; // rax\n__int64 v10; // [rsp+28h] [rbp-38h]\nunsigned int v11; // [rsp+3Ch] [rbp-24h]\n__int64 v12; // [rsp+40h] [rbp-20h]\nunsigned int v13; // [rsp+48h] [rbp-18h]\n__int64 j; // [rsp+50h] [rbp-10h]\nunsigned int i; // [rsp+5Ch] [rbp-4h]\n\nif ( !a3 )\nreturn 1LL;\n*(_QWORD *)(a2 + 56) += 16LL * a3;\nv5 = 256;\nif ( (unsigned int)((__int64)(*(_QWORD *)(a2 + 56) - *(_QWORD *)(a2 + 48)) >> 4) >= 0x100 )\nv5 = (__int64)(*(_QWORD *)(a2 + 56) - *(_QWORD *)(a2 + 48)) >> 4;\nv13 = v5;\nif ( v5 <= *(_DWORD *)(a2 + 64) )\nreturn 1LL;\nv12 = *(_QWORD *)(a2 + 48);\nv11 = sub_45FC9E(*(_DWORD *)(a2 + 64) + v5);\nif ( v11 && v11 >= *(_DWORD *)(a2 + 64) + v13 && 16LL * v11 != -1 )\nv7 = sub_45070B(0LL, *(_QWORD *)(a2 + 48), 16LL * v11);\nelse\nv7 = 0LL;\nif ( v7 )\n{\n*(_QWORD *)(a2 + 48) = v7;\n*(_DWORD *)(a2 + 64) = v11;\nif ( v12 == *(_QWORD *)(a2 + 48) )\n{\nresult = 1LL;\n}\nelse\n{\nv10 = (*(_QWORD *)(a2 + 48) - v12) >> 4;\nfor ( i = 0; i < *(_DWORD *)(a2 + 80); ++i )\n*(_QWORD *)(*(_QWORD *)(a2 + 72) + 48LL * i + 32) += 16 * v10;\nfor ( j = *(_QWORD *)(a2 + 88); j; j = *(_QWORD *)(j + 72) )\n*(_QWORD *)(j + 48) += 16 * v10;\n*(_QWORD *)(a2 + 56) += 16 * v10;\n*a4 += 16 * v10;\nresult = 1LL;\n}\n}\nelse\n{\n*(_QWORD *)(a2 + 56) += -16LL * a3;\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a2,a1,v10,v11,v12,v13,j,sub_425E2D,sub_45FC9E,sub_45070B,]", "hints": "[]", "response": "{'a3': 'stacktopdelta', 'a4': 'stackstart', 'a2': 'fiber', 'a1': 'vm', 'v10': 'offset', 'v11': 'new_size', 'v12': 'old_stack', 'v13': 'stack_needed', 'j': 'upvalue', 'sub_425E2D': 'gravity_check_stack', 'sub_45FC9E': 'power_of2_ceil', 'sub_45070B': 'gravity_realloc'}"}
[ [ 0.7031379342079163, 0.6982851624488831, 0.6955814361572266, 0.6947783827781677, 0.6940491199493408, 0.6940100789070129, 0.6892678737640381, 0.686981737613678, 0.6782780289649963, 0.678173303604126, 0.6778277158737183, 0.6771083474159241, 0.6649749279022217, 0.6647828817367554, 0.6645280718803406, 0.6637986302375793, 0.6597682237625122, 0.6583226323127747, 0.658220648765564, 0.6579883694648743 ], [ 70302, 11110, 29146, 76297, 10589, 134539, 237010, 229984, 247932, 104635, 73586, 93882, 188461, 4917, 11519, 190635, 261570, 33282, 22068, 193540 ] ]
guess_ich_chipset_from_content
3e9b07b616be819e082c9c815592dbc65ed1619f94ee35dc889efcdd299cfecd
dword1511
stm32-vserprog
NA
static enum ich_chipset guess_ich_chipset_from_content(const struct ich_desc_content *const content) { if (content->ICCRIBA == 0x00) { if (content->MSL == 0 && content->ISL <= 2) return CHIPSET_ICH8; else if (content->ISL <= 2) return CHIPSET_ICH9; else if (content->ISL <= 10) return CHIPSET_ICH10; else if (content->ISL <= 16) return CHIPSET_5_SERIES_IBEX_PEAK; else if (content->FLMAP2 == 0) { if (content->ISL != 19) msg_pwarn("Peculiar firmware descriptor, assuming Apollo Lake compatibility.\n"); return CHIPSET_APOLLO_LAKE; } msg_pwarn("Peculiar firmware descriptor, assuming Ibex Peak compatibility.\n"); return CHIPSET_5_SERIES_IBEX_PEAK; } else if (content->ICCRIBA < 0x31 && content->FMSBA < 0x30) { if (content->MSL == 0 && content->ISL <= 17) return CHIPSET_BAYTRAIL; else if (content->MSL <= 1 && content->ISL <= 18) return CHIPSET_6_SERIES_COUGAR_POINT; else if (content->MSL <= 1 && content->ISL <= 21) return CHIPSET_8_SERIES_LYNX_POINT; msg_pwarn("Peculiar firmware descriptor, assuming Wildcat Point compatibility.\n"); return CHIPSET_9_SERIES_WILDCAT_POINT; } else if (content->ICCRIBA < 0x34) { if (content->NM == 6) return CHIPSET_C620_SERIES_LEWISBURG; else return CHIPSET_100_SERIES_SUNRISE_POINT; } else if (content->ICCRIBA == 0x34) { if (content->NM == 6) return CHIPSET_C620_SERIES_LEWISBURG; else return CHIPSET_300_SERIES_CANNON_POINT; } else { msg_pwarn("Unknown firmware descriptor, assuming 300 series compatibility.\n"); return CHIPSET_300_SERIES_CANNON_POINT; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4046F2", "function_addr": 4212466, "binary_name": "3e9b07b616be819e082c9c815592dbc65ed1619f94ee35dc889efcdd299cfecd.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, "movzx eax, byte ptr [rax+0Eh]"], [6, "test al, al"], [7, "jnz loc_4047B1"], [8, "mov rax, [rbp+var_8]"], [9, "movzx eax, byte ptr [rax+0Dh]"], [10, "test al, al"], [11, "jnz short loc_404730"], [12, "mov rax, [rbp+var_8]"], [13, "movzx eax, byte ptr [rax+0Bh]"], [14, "cmp al, 2"], [15, "ja short loc_404730"], [16, "mov eax, 8"], [17, "jmp locret_4048A2"], [18, "mov rax, [rbp+var_8]"], [19, "movzx eax, byte ptr [rax+0Bh]"], [20, "cmp al, 2"], [21, "ja short loc_404746"], [22, "mov eax, 9"], [23, "jmp locret_4048A2"], [24, "mov rax, [rbp+var_8]"], [25, "movzx eax, byte ptr [rax+0Bh]"], [26, "cmp al, 0Ah"], [27, "ja short loc_40475C"], [28, "mov eax, 0Ah"], [29, "jmp locret_4048A2"], [30, "mov rax, [rbp+var_8]"], [31, "movzx eax, byte ptr [rax+0Bh]"], [32, "cmp al, 10h"], [33, "ja short loc_404772"], [34, "mov eax, 0Bh"], [35, "jmp locret_4048A2"], [36, "mov rax, [rbp+var_8]"], [37, "mov eax, [rax+0Ch]"], [38, "test eax, eax"], [39, "jnz short loc_40479D"], [40, "mov rax, [rbp+var_8]"], [41, "movzx eax, byte ptr [rax+0Bh]"], [42, "cmp al, 13h"], [43, "jz short loc_404793"], [44, "mov edi, offset aPeculiarFirmwa"], [45, "call _puts"], [46, "mov eax, 17h"], [47, "jmp locret_4048A2"], [48, "mov edi, offset aPeculiarFirmwa_0"], [49, "call _puts"], [50, "mov eax, 0Bh"], [51, "jmp locret_4048A2"], [52, "mov rax, [rbp+var_8]"], [53, "movzx eax, byte ptr [rax+0Eh]"], [54, "cmp al, 30h "], [55, "ja loc_404841"], [56, "mov rax, [rbp+var_8]"], [57, "movzx eax, byte ptr [rax+0Ch]"], [58, "cmp al, 2Fh "], [59, "ja short loc_404841"], [60, "mov rax, [rbp+var_8]"], [61, "movzx eax, byte ptr [rax+0Dh]"], [62, "test al, al"], [63, "jnz short loc_4047EF"], [64, "mov rax, [rbp+var_8]"], [65, "movzx eax, byte ptr [rax+0Bh]"], [66, "cmp al, 11h"], [67, "ja short loc_4047EF"], [68, "mov eax, 0Fh"], [69, "jmp locret_4048A2"], [70, "mov rax, [rbp+var_8]"], [71, "movzx eax, byte ptr [rax+0Dh]"], [72, "cmp al, 1"], [73, "ja short loc_404811"], [74, "mov rax, [rbp+var_8]"], [75, "movzx eax, byte ptr [rax+0Bh]"], [76, "cmp al, 12h"], [77, "ja short loc_404811"], [78, "mov eax, 0Ch"], [79, "jmp locret_4048A2"], [80, "mov rax, [rbp+var_8]"], [81, "movzx eax, byte ptr [rax+0Dh]"], [82, "cmp al, 1"], [83, "ja short loc_404830"], [84, "mov rax, [rbp+var_8]"], [85, "movzx eax, byte ptr [rax+0Bh]"], [86, "cmp al, 15h"], [87, "ja short loc_404830"], [88, "mov eax, 0Eh"], [89, "jmp short locret_4048A2"], [90, "mov edi, offset aPeculiarFirmwa_1"], [91, "call _puts"], [92, "mov eax, 12h"], [93, "jmp short locret_4048A2"], [94, "mov rax, [rbp+var_8]"], [95, "movzx eax, byte ptr [rax+0Eh]"], [96, "cmp al, 33h "], [97, "ja short loc_40486A"], [98, "mov rax, [rbp+var_8]"], [99, "movzx eax, byte ptr [rax+9]"], [100, "and eax, 7"], [101, "cmp al, 6"], [102, "jnz short loc_404863"], [103, "mov eax, 15h"], [104, "jmp short locret_4048A2"], [105, "mov eax, 14h"], [106, "jmp short locret_4048A2"], [107, "mov rax, [rbp+var_8]"], [108, "movzx eax, byte ptr [rax+0Eh]"], [109, "cmp al, 34h "], [110, "jnz short loc_404893"], [111, "mov rax, [rbp+var_8]"], [112, "movzx eax, byte ptr [rax+9]"], [113, "and eax, 7"], [114, "cmp al, 6"], [115, "jnz short loc_40488C"], [116, "mov eax, 15h"], [117, "jmp short locret_4048A2"], [118, "mov eax, 16h"], [119, "jmp short locret_4048A2"], [120, "mov edi, offset aUnknownFirmwar"], [121, "call _puts"], [122, "mov eax, 16h"], [123, "leave"], [124, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 3], [9, 8], [10, 9], [11, 10], [12, 3], [13, 12], [14, 13], [15, 14], [18, 3], [19, 18], [20, 19], [21, 20], [24, 3], [25, 24], [26, 25], [27, 26], [30, 3], [31, 30], [32, 31], [33, 32], [36, 3], [37, 36], [38, 37], [39, 38], [40, 3], [41, 40], [42, 41], [43, 42], [52, 3], [53, 52], [54, 53], [55, 54], [56, 3], [57, 56], [58, 57], [59, 58], [60, 3], [61, 60], [62, 61], [63, 62], [64, 3], [65, 64], [66, 65], [67, 66], [70, 3], [71, 70], [72, 71], [73, 72], [74, 3], [75, 74], [76, 75], [77, 76], [80, 3], [81, 80], [82, 81], [83, 82], [84, 3], [85, 84], [86, 85], [87, 86], [94, 3], [95, 94], [96, 95], [97, 96], [98, 3], [99, 98], [100, 99], [101, 100], [102, 101], [107, 3], [108, 107], [109, 108], [110, 109], [111, 3], [112, 111], [113, 112], [114, 113], [115, 114], [124, 122], [124, 28], [124, 92], [124, 46], [124, 103], [124, 78], [124, 105], [124, 50], [124, 16], [124, 34], [124, 68], [124, 22], [124, 116], [124, 88], [124, 118]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/3e9b07b616be819e082c9c815592dbc65ed1619f94ee35dc889efcdd299cfecd_3e9b07b616be819e082c9c815592dbc65ed1619f94ee35dc889efcdd299cfecd.jsonl.gz", "strip_func_name": "sub_4046F2", "query": "\n\n\n__int64 __fastcall sub_4046F2(_BYTE *a1)\n{\n__int64 result; // rax\n\nif ( a1[14] )\n{\nif ( a1[14] > 0x30u || a1[12] > 0x2Fu )\n{\nif ( a1[14] > 0x33u )\n{\nif ( a1[14] == 52 )\n{\nif ( (a1[9] & 7) == 6 )\nresult = 21LL;\nelse\nresult = 22LL;\n}\nelse\n{\nputs(\"Unknown firmware descriptor, assuming 300 series compatibility.\");\nresult = 22LL;\n}\n}\nelse if ( (a1[9] & 7) == 6 )\n{\nresult = 21LL;\n}\nelse\n{\nresult = 20LL;\n}\n}\nelse if ( a1[13] || a1[11] > 0x11u )\n{\nif ( a1[13] > 1u || a1[11] > 0x12u )\n{\nif ( a1[13] > 1u || a1[11] > 0x15u )\n{\nputs(\"Peculiar firmware descriptor, assuming Wildcat Point compatibility.\");\nresult = 18LL;\n}\nelse\n{\nresult = 14LL;\n}\n}\nelse\n{\nresult = 12LL;\n}\n}\nelse\n{\nresult = 15LL;\n}\n}\nelse if ( a1[13] || a1[11] > 2u )\n{\nif ( a1[11] > 2u )\n{\nif ( a1[11] > 0xAu )\n{\nif ( a1[11] > 0x10u )\n{\nif ( *((_DWORD *)a1 + 3) )\n{\nputs(\"Peculiar firmware descriptor, assuming Ibex Peak compatibility.\");\nresult = 11LL;\n}\nelse\n{\nif ( a1[11] != 19 )\nputs(\"Peculiar firmware descriptor, assuming Apollo Lake compatibility.\");\nresult = 23LL;\n}\n}\nelse\n{\nresult = 11LL;\n}\n}\nelse\n{\nresult = 10LL;\n}\n}\nelse\n{\nresult = 9LL;\n}\n}\nelse\n{\nresult = 8LL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_4046F2,]", "hints": "[]", "response": "{'a1': 'content', 'sub_4046F2': 'guess_ich_chipset_from_content'}"}
[ [ 0.8344988226890564, 0.8203250765800476, 0.7999112010002136, 0.7891597151756287, 0.7875086069107056, 0.7803893089294434, 0.7779031991958618, 0.7706974744796753, 0.768266499042511, 0.7666251063346863, 0.7665711641311646, 0.7657583355903625, 0.7628881335258484, 0.7620716691017151, 0.7593568563461304, 0.7526170611381531, 0.7515138387680054, 0.7495681643486023, 0.7484385371208191, 0.748218834400177 ], [ 19769, 228721, 5502, 134429, 11708, 16504, 9567, 61618, 84303, 86881, 199449, 72150, 156368, 171730, 167106, 163377, 219934, 8632, 224385, 226654 ] ]
pingu_host_dump_status
bbf4fd34a1479faeba7f018ea496cd01e0b532574e364040d6ff27ec9550ed62
ncopa
pingu
NA
void pingu_host_dump_status(int fd, char *filter) { struct pingu_host *host; char buf[512]; list_for_each_entry(host, &host_list, host_list_entry) { if (filter != NULL && strcmp(filter, host->label) != 0) continue; snprintf(buf, sizeof(buf), "%s: %i\n", host->label, host->status); write(fd, buf, strlen(buf)); } write(fd, "\n", 1); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40521B", "function_addr": 4215323, "binary_name": "bbf4fd34a1479faeba7f018ea496cd01e0b532574e364040d6ff27ec9550ed62.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 230h"], [3, "mov [rbp+fd], edi"], [4, "mov [rbp+s1], rsi"], [5, "mov rax, cs:off_40E340"], [6, "mov [rbp+var_10], rax"], [7, "mov rax, [rbp+var_10]"], [8, "mov [rbp+var_8], rax"], [9, "jmp loc_4052E5"], [10, "cmp [rbp+s1], 0"], [11, "jz short loc_405273"], [12, "mov rax, [rbp+var_8]"], [13, "mov rdx, [rax+18h]"], [14, "mov rax, [rbp+s1]"], [15, "mov rsi, rdx"], [16, "mov rdi, rax"], [17, "call _strcmp"], [18, "test eax, eax"], [19, "jnz short loc_4052D1"], [20, "mov rax, [rbp+var_8]"], [21, "mov ecx, [rax+30h]"], [22, "mov rax, [rbp+var_8]"], [23, "mov rdx, [rax+18h]"], [24, "lea rax, [rbp+s]"], [25, "mov r8d, ecx"], [26, "mov rcx, rdx"], [27, "mov edx, offset aSI"], [28, "mov esi, 200h"], [29, "mov rdi, rax"], [30, "mov eax, 0"], [31, "call _snprintf"], [32, "lea rax, [rbp+s]"], [33, "mov rdi, rax"], [34, "call _strlen"], [35, "mov rdx, rax"], [36, "lea rcx, [rbp+s]"], [37, "mov eax, [rbp+fd]"], [38, "mov rsi, rcx"], [39, "mov edi, eax"], [40, "call _write"], [41, "jmp short loc_4052D2"], [42, "nop"], [43, "mov rax, [rbp+var_8]"], [44, "mov rax, [rax]"], [45, "mov [rbp+var_18], rax"], [46, "mov rax, [rbp+var_18]"], [47, "mov [rbp+var_8], rax"], [48, "mov rax, [rbp+var_8]"], [49, "cmp rax, offset off_40E340"], [50, "jnz loc_40524B"], [51, "mov eax, [rbp+fd]"], [52, "mov edx, 1"], [53, "mov esi, offset asc_40AB88"], [54, "mov edi, eax"], [55, "call _write"], [56, "nop"], [57, "leave"], [58, "retn"]], "data_dep": [[6, 5], [7, 6], [8, 7], [10, 4], [11, 10], [12, 8], [12, 47], [13, 12], [14, 4], [15, 13], [16, 14], [18, 17], [19, 18], [20, 8], [20, 47], [21, 20], [22, 8], [22, 47], [23, 22], [24, 22], [25, 21], [26, 23], [29, 24], [32, 31], [33, 32], [35, 34], [36, 26], [37, 3], [38, 36], [39, 37], [43, 8], [43, 47], [44, 43], [45, 44], [46, 45], [47, 46], [48, 8], [48, 47], [49, 48], [50, 49], [51, 3], [54, 51], [58, 55]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/bbf4fd34a1479faeba7f018ea496cd01e0b532574e364040d6ff27ec9550ed62_bbf4fd34a1479faeba7f018ea496cd01e0b532574e364040d6ff27ec9550ed62.jsonl.gz", "strip_func_name": "sub_40521B", "query": "\n\n\nssize_t __fastcall sub_40521B(int a1, const char *a2)\n{\nsize_t v2; // rax\nchar s[520]; // [rsp+10h] [rbp-220h] BYREF\nconst char *v5; // [rsp+218h] [rbp-18h]\nvoid *v6; // [rsp+220h] [rbp-10h]\nconst char **i; // [rsp+228h] [rbp-8h]\n\nv6 = off_40E340;\nfor ( i = (const char **)off_40E340; i != (const char **)&off_40E340; i = (const char **)v5 )\n{\nif ( !a2 || !strcmp(a2, i[3]) )\n{\nsnprintf(s, 0x200uLL, \"%s: %i\\n\", i[3], *((unsigned int *)i + 12));\nv2 = strlen(s);\nwrite(a1, s, v2);\n}\nv5 = *i;\n}\nreturn write(a1, \"\\n\", 1uLL);\n}\n\n\n\nQ:[a1,a2,s,v5,v6,i,sub_40521B,]", "hints": "[]", "response": "{'a1': 'fd', 'a2': 'filter', 's': 'buf', 'v5': '__mptr_0', 'v6': '__mptr', 'i': 'host', 'sub_40521B': 'pingu_host_dump_status'}"}
[ [ 0.7191996574401855, 0.6958646774291992, 0.6838750839233398, 0.6785994172096252, 0.677732527256012, 0.6760196685791016, 0.6744526624679565, 0.6713809967041016, 0.670028030872345, 0.6685250401496887, 0.6644068956375122, 0.6589786410331726, 0.6588621139526367, 0.6580946445465088, 0.6561221480369568, 0.6550099849700928, 0.654933750629425, 0.6537073850631714, 0.6536734104156494, 0.6529339551925659 ], [ 217608, 83662, 212291, 172071, 141935, 146028, 261070, 39515, 195475, 57184, 221741, 211455, 155946, 121538, 121603, 254890, 75253, 208207, 227307, 263218 ] ]
AcpiOsGetLine
945ed0fc3371195cab2c0d4ae99cce69735a87793ae6198953c52d56d950810f
bitdefender
napoca
NA
ACPI_STATUS AcpiOsGetLine ( char *Buffer, UINT32 BufferLength, UINT32 *BytesRead) { char *NextCommand; UINT32 MaxCommandIndex = AcpiGbl_NextCmdNum - 1; UINT32 CurrentCommandIndex = MaxCommandIndex; UINT32 PreviousCommandIndex = MaxCommandIndex; int InputChar; UINT32 CursorPosition = 0; UINT32 EndOfLine = 0; UINT32 i; /* Always clear the line buffer before we read a new line */ memset (Buffer, 0, BufferLength); /* * This loop gets one character at a time (except for esc sequences) * until a newline or error is detected. * * Note: Don't attempt to write terminal control ESC sequences, even * though it makes certain things more difficult. */ while (1) { if (EndOfLine >= (BufferLength - 1)) { return (AE_BUFFER_OVERFLOW); } InputChar = getchar (); switch (InputChar) { default: /* This is the normal character case */ /* Echo the character (at EOL) and copy it to the line buffer */ if (EndOfLine == CursorPosition) { putchar (InputChar); Buffer[EndOfLine] = (char) InputChar; EndOfLine++; CursorPosition++; Buffer[EndOfLine] = 0; continue; } /* Insert character into the middle of the buffer */ memmove (&Buffer[CursorPosition + 1], &Buffer[CursorPosition], (EndOfLine - CursorPosition + 1)); Buffer [CursorPosition] = (char) InputChar; Buffer [EndOfLine + 1] = 0; /* Display the new part of line starting at the new character */ fprintf (stdout, "%s", &Buffer[CursorPosition]); /* Restore cursor */ ACPI_BACKUP_CURSOR (i, EndOfLine - CursorPosition); CursorPosition++; EndOfLine++; continue; case _ASCII_DEL: /* Backspace key */ if (!EndOfLine) /* Any characters on the command line? */ { continue; } if (EndOfLine == CursorPosition) /* Erase the final character */ { ACPI_CLEAR_CHAR (); EndOfLine--; CursorPosition--; continue; } if (!CursorPosition) /* Do not backup beyond start of line */ { continue; } /* Remove the character from the line */ memmove (&Buffer[CursorPosition - 1], &Buffer[CursorPosition], (EndOfLine - CursorPosition + 1)); /* Display the new part of line starting at the new character */ putchar (_ASCII_BACKSPACE); fprintf (stdout, "%s ", &Buffer[CursorPosition - 1]); /* Restore cursor */ ACPI_BACKUP_CURSOR (i, EndOfLine - CursorPosition + 1); EndOfLine--; if (CursorPosition > 0) { CursorPosition--; } continue; case _ASCII_NEWLINE: /* Normal exit case at end of command line */ case _ASCII_NUL: /* Return the number of bytes in the command line string */ if (BytesRead) { *BytesRead = EndOfLine; } /* Echo, terminate string buffer, and exit */ putchar (InputChar); Buffer[EndOfLine] = 0; return (AE_OK); case _ASCII_TAB: /* Ignore */ continue; case EOF: return (AE_ERROR); case _ASCII_ESCAPE: /* Check for escape sequences of the form "ESC[x" */ InputChar = getchar (); if (InputChar != _ASCII_LEFT_BRACKET) { continue; /* Ignore this ESC, does not have the '[' */ } /* Get the code following the ESC [ */ InputChar = getchar (); /* Backup one character */ switch (InputChar) { case _ASCII_LEFT_ARROW: if (CursorPosition > 0) { putchar (_ASCII_BACKSPACE); CursorPosition--; } continue; case _ASCII_RIGHT_ARROW: /* * Move one character forward. Do this without sending * ESC sequence to the terminal for max portability. */ if (CursorPosition < EndOfLine) { /* Backup to start of line and print the entire line */ ACPI_BACKUP_CURSOR (i, CursorPosition); fprintf (stdout, "%s", Buffer); /* Backup to where the cursor should be */ CursorPosition++; ACPI_BACKUP_CURSOR (i, EndOfLine - CursorPosition); } continue; case _ASCII_UP_ARROW: /* If no commands available or at start of history list, ignore */ if (!CurrentCommandIndex) { continue; } /* Manage our up/down progress */ if (CurrentCommandIndex > PreviousCommandIndex) { CurrentCommandIndex = PreviousCommandIndex; } /* Get the historical command from the debugger */ NextCommand = AcpiDbGetHistoryByIndex (CurrentCommandIndex); if (!NextCommand) { return (AE_ERROR); } /* Make this the active command and echo it */ AcpiAcClearLine (EndOfLine, CursorPosition); strcpy (Buffer, NextCommand); fprintf (stdout, "%s", Buffer); EndOfLine = CursorPosition = strlen (Buffer); PreviousCommandIndex = CurrentCommandIndex; CurrentCommandIndex--; continue; case _ASCII_DOWN_ARROW: if (!MaxCommandIndex) /* Any commands available? */ { continue; } /* Manage our up/down progress */ if (CurrentCommandIndex < PreviousCommandIndex) { CurrentCommandIndex = PreviousCommandIndex; } /* If we are the end of the history list, output a clear new line */ if ((CurrentCommandIndex + 1) > MaxCommandIndex) { AcpiAcClearLine (EndOfLine, CursorPosition); EndOfLine = CursorPosition = 0; PreviousCommandIndex = CurrentCommandIndex; continue; } PreviousCommandIndex = CurrentCommandIndex; CurrentCommandIndex++; /* Get the historical command from the debugger */ NextCommand = AcpiDbGetHistoryByIndex (CurrentCommandIndex); if (!NextCommand) { return (AE_ERROR); } /* Make this the active command and echo it */ AcpiAcClearLine (EndOfLine, CursorPosition); strcpy (Buffer, NextCommand); fprintf (stdout, "%s", Buffer); EndOfLine = CursorPosition = strlen (Buffer); continue; case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: /* * Ignore the various keys like insert/delete/home/end, etc. * But we must eat the final character of the ESC sequence. */ (void) getchar (); continue; default: /* Ignore random escape sequences that we don't care about */ continue; } continue; } } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402508", "function_addr": 4203784, "binary_name": "945ed0fc3371195cab2c0d4ae99cce69735a87793ae6198953c52d56d950810f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+n+4], rdi"], [4, "mov dword ptr [rbp+n], esi"], [5, "mov [rbp+var_48], rdx"], [6, "mov eax, cs:dword_49D6E0"], [7, "sub eax, 1"], [8, "mov [rbp+var_18], eax"], [9, "mov eax, [rbp+var_18]"], [10, "mov [rbp+var_4], eax"], [11, "mov eax, [rbp+var_18]"], [12, "mov [rbp+var_8], eax"], [13, "mov [rbp+var_C], 0"], [14, "mov [rbp+var_10], 0"], [15, "mov edx, dword ptr [rbp+n]"], [16, "mov rax, [rbp+n+4]"], [17, "mov esi, 0"], [18, "mov rdi, rax"], [19, "call _memset"], [20, "mov eax, dword ptr [rbp+n]"], [21, "sub eax, 1"], [22, "cmp [rbp+var_10], eax"], [23, "jb short loc_40256A"], [24, "mov eax, 0Bh"], [25, "jmp locret_4029EA"], [26, "call _getchar"], [27, "mov [rbp+c], eax"], [28, "cmp [rbp+c], 1Bh"], [29, "jg short loc_402595"], [30, "cmp [rbp+c], 0FFFFFFFFh"], [31, "jl short def_402593"], [32, "mov eax, [rbp+c]"], [33, "add eax, 1"], [34, "cmp eax, 1Ch"], [35, "ja short def_402593"], [36, "mov eax, eax"], [37, "mov rax, ds:jpt_402593[rax*8]"], [38, "jmp rax"], [39, "cmp [rbp+c], 7Fh"], [40, "jz loc_402675"], [41, "mov eax, [rbp+var_10]"], [42, "cmp eax, [rbp+var_C]"], [43, "jnz short loc_4025DA"], [44, "mov eax, [rbp+c]"], [45, "mov edi, eax"], [46, "call _putchar"], [47, "mov edx, [rbp+var_10]"], [48, "mov rax, [rbp+n+4]"], [49, "add rax, rdx"], [50, "mov edx, [rbp+c]"], [51, "mov [rax], dl"], [52, "add [rbp+var_10], 1"], [53, "add [rbp+var_C], 1"], [54, "mov edx, [rbp+var_10]"], [55, "mov rax, [rbp+n+4]"], [56, "add rax, rdx"], [57, "mov byte ptr [rax], 0"], [58, "jmp loc_4029E5"], [59, "mov eax, [rbp+var_10]"], [60, "sub eax, [rbp+var_C]"], [61, "add eax, 1"], [62, "mov edx, eax"], [63, "mov ecx, [rbp+var_C]"], [64, "mov rax, [rbp+n+4]"], [65, "add rcx, rax"], [66, "mov eax, [rbp+var_C]"], [67, "add eax, 1"], [68, "mov esi, eax"], [69, "mov rax, [rbp+n+4]"], [70, "add rax, rsi"], [71, "mov rsi, rcx"], [72, "mov rdi, rax"], [73, "call _memmove"], [74, "mov edx, [rbp+var_C]"], [75, "mov rax, [rbp+n+4]"], [76, "add rax, rdx"], [77, "mov edx, [rbp+c]"], [78, "mov [rax], dl"], [79, "mov eax, [rbp+var_10]"], [80, "add eax, 1"], [81, "mov edx, eax"], [82, "mov rax, [rbp+n+4]"], [83, "add rax, rdx"], [84, "mov byte ptr [rax], 0"], [85, "mov edx, [rbp+var_C]"], [86, "mov rax, [rbp+n+4]"], [87, "add rdx, rax"], [88, "mov rax, cs:stdout"], [89, "mov rsi, rax"], [90, "mov rdi, rdx"], [91, "call _fputs"], [92, "mov [rbp+var_14], 0"], [93, "jmp short loc_40265D"], [94, "mov edi, 8"], [95, "call _putchar"], [96, "add [rbp+var_14], 1"], [97, "mov eax, [rbp+var_10]"], [98, "sub eax, [rbp+var_C]"], [99, "cmp [rbp+var_14], eax"], [100, "jb short loc_40264F"], [101, "add [rbp+var_C], 1"], [102, "add [rbp+var_10], 1"], [103, "jmp loc_4029E5"], [104, "cmp [rbp+var_10], 0"], [105, "jz loc_4029B4"], [106, "mov eax, [rbp+var_10]"], [107, "cmp eax, [rbp+var_C]"], [108, "jnz short loc_4026B2"], [109, "mov edi, 8"], [110, "call _putchar"], [111, "mov edi, 20h "], [112, "call _putchar"], [113, "mov edi, 8"], [114, "call _putchar"], [115, "sub [rbp+var_10], 1"], [116, "sub [rbp+var_C], 1"], [117, "jmp loc_4029E5"], [118, "cmp [rbp+var_C], 0"], [119, "jz loc_4029BA"], [120, "mov eax, [rbp+var_10]"], [121, "sub eax, [rbp+var_C]"], [122, "add eax, 1"], [123, "mov edx, eax"], [124, "mov ecx, [rbp+var_C]"], [125, "mov rax, [rbp+n+4]"], [126, "add rcx, rax"], [127, "mov eax, [rbp+var_C]"], [128, "sub eax, 1"], [129, "mov esi, eax"], [130, "mov rax, [rbp+n+4]"], [131, "add rax, rsi"], [132, "mov rsi, rcx"], [133, "mov rdi, rax"], [134, "call _memmove"], [135, "mov edi, 8"], [136, "call _putchar"], [137, "mov eax, [rbp+var_C]"], [138, "sub eax, 1"], [139, "mov edx, eax"], [140, "mov rax, [rbp+n+4]"], [141, "add rdx, rax"], [142, "mov rax, cs:stdout"], [143, "mov esi, offset format"], [144, "mov rdi, rax"], [145, "mov eax, 0"], [146, "call _fprintf"], [147, "mov [rbp+var_14], 0"], [148, "jmp short loc_402734"], [149, "mov edi, 8"], [150, "call _putchar"], [151, "add [rbp+var_14], 1"], [152, "mov eax, [rbp+var_10]"], [153, "sub eax, [rbp+var_C]"], [154, "add eax, 1"], [155, "cmp [rbp+var_14], eax"], [156, "jb short loc_402726"], [157, "sub [rbp+var_10], 1"], [158, "cmp [rbp+var_C], 0"], [159, "jz loc_4029C0"], [160, "sub [rbp+var_C], 1"], [161, "jmp loc_4029C0"], [162, "cmp [rbp+var_48], 0"], [163, "jz short loc_402769"], [164, "mov rax, [rbp+var_48]"], [165, "mov edx, [rbp+var_10]"], [166, "mov [rax], edx"], [167, "mov eax, [rbp+c]"], [168, "mov edi, eax"], [169, "call _putchar"], [170, "mov edx, [rbp+var_10]"], [171, "mov rax, [rbp+n+4]"], [172, "add rax, rdx"], [173, "mov byte ptr [rax], 0"], [174, "mov eax, 0"], [175, "jmp locret_4029EA"], [176, "mov eax, 1"], [177, "jmp locret_4029EA"], [178, "call _getchar"], [179, "mov [rbp+c], eax"], [180, "cmp [rbp+c], 5Bh "], [181, "jnz loc_4029C6"], [182, "call _getchar"], [183, "mov [rbp+c], eax"], [184, "mov eax, [rbp+c]"], [185, "sub eax, 31h "], [186, "cmp eax, 13h"], [187, "ja def_4027C7"], [188, "mov eax, eax"], [189, "mov rax, ds:jpt_4027C7[rax*8]"], [190, "jmp rax"], [191, "cmp [rbp+var_C], 0"], [192, "jz loc_4029D2"], [193, "mov edi, 8"], [194, "call _putchar"], [195, "sub [rbp+var_C], 1"], [196, "jmp loc_4029D2"], [197, "mov eax, [rbp+var_C]"], [198, "cmp eax, [rbp+var_10]"], [199, "jnb loc_4029D8"], [200, "mov [rbp+var_14], 0"], [201, "jmp short loc_402809"], [202, "mov edi, 8"], [203, "call _putchar"], [204, "add [rbp+var_14], 1"], [205, "mov eax, [rbp+var_14]"], [206, "cmp eax, [rbp+var_C]"], [207, "jb short loc_4027FB"], [208, "mov rdx, cs:stdout"], [209, "mov rax, [rbp+n+4]"], [210, "mov rsi, rdx"], [211, "mov rdi, rax"], [212, "call _fputs"], [213, "add [rbp+var_C], 1"], [214, "mov [rbp+var_14], 0"], [215, "jmp short loc_402842"], [216, "mov edi, 8"], [217, "call _putchar"], [218, "add [rbp+var_14], 1"], [219, "mov eax, [rbp+var_10]"], [220, "sub eax, [rbp+var_C]"], [221, "cmp [rbp+var_14], eax"], [222, "jb short loc_402834"], [223, "jmp loc_4029D8"], [224, "cmp [rbp+var_4], 0"], [225, "jz loc_4029DE"], [226, "mov eax, [rbp+var_4]"], [227, "cmp eax, [rbp+var_8]"], [228, "jbe short loc_40286A"], [229, "mov eax, [rbp+var_8]"], [230, "mov [rbp+var_4], eax"], [231, "mov eax, [rbp+var_4]"], [232, "mov edi, eax"], [233, "call sub_40DEA5"], [234, "mov [rbp+src], rax"], [235, "cmp [rbp+src], 0"], [236, "jnz short loc_402889"], [237, "mov eax, 1"], [238, "jmp locret_4029EA"], [239, "mov edx, [rbp+var_C]"], [240, "mov eax, [rbp+var_10]"], [241, "mov esi, edx"], [242, "mov edi, eax"], [243, "call sub_4024A2"], [244, "mov rdx, [rbp+src]"], [245, "mov rax, [rbp+n+4]"], [246, "mov rsi, rdx"], [247, "mov rdi, rax"], [248, "call _strcpy"], [249, "mov rdx, cs:stdout"], [250, "mov rax, [rbp+n+4]"], [251, "mov rsi, rdx"], [252, "mov rdi, rax"], [253, "call _fputs"], [254, "mov rax, [rbp+n+4]"], [255, "mov rdi, rax"], [256, "call _strlen"], [257, "mov [rbp+var_C], eax"], [258, "mov eax, [rbp+var_C]"], [259, "mov [rbp+var_10], eax"], [260, "mov eax, [rbp+var_4]"], [261, "mov [rbp+var_8], eax"], [262, "sub [rbp+var_4], 1"], [263, "jmp loc_4029E5"], [264, "cmp [rbp+var_18], 0"], [265, "jz loc_4029E4"], [266, "mov eax, [rbp+var_4]"], [267, "cmp eax, [rbp+var_8]"], [268, "jnb short loc_4028FD"], [269, "mov eax, [rbp+var_8]"], [270, "mov [rbp+var_4], eax"], [271, "mov eax, [rbp+var_4]"], [272, "add eax, 1"], [273, "cmp [rbp+var_18], eax"], [274, "jnb short loc_40292F"], [275, "mov edx, [rbp+var_C]"], [276, "mov eax, [rbp+var_10]"], [277, "mov esi, edx"], [278, "mov edi, eax"], [279, "call sub_4024A2"], [280, "mov [rbp+var_C], 0"], [281, "mov eax, [rbp+var_C]"], [282, "mov [rbp+var_10], eax"], [283, "mov eax, [rbp+var_4]"], [284, "mov [rbp+var_8], eax"], [285, "jmp loc_4029E5"], [286, "mov eax, [rbp+var_4]"], [287, "mov [rbp+var_8], eax"], [288, "add [rbp+var_4], 1"], [289, "mov eax, [rbp+var_4]"], [290, "mov edi, eax"], [291, "call sub_40DEA5"], [292, "mov [rbp+src], rax"], [293, "cmp [rbp+src], 0"], [294, "jnz short loc_402958"], [295, "mov eax, 1"], [296, "jmp locret_4029EA"], [297, "mov edx, [rbp+var_C]"], [298, "mov eax, [rbp+var_10]"], [299, "mov esi, edx"], [300, "mov edi, eax"], [301, "call sub_4024A2"], [302, "mov rdx, [rbp+src]"], [303, "mov rax, [rbp+n+4]"], [304, "mov rsi, rdx"], [305, "mov rdi, rax"], [306, "call _strcpy"], [307, "mov rdx, cs:stdout"], [308, "mov rax, [rbp+n+4]"], [309, "mov rsi, rdx"], [310, "mov rdi, rax"], [311, "call _fputs"], [312, "mov rax, [rbp+n+4]"], [313, "mov rdi, rax"], [314, "call _strlen"], [315, "mov [rbp+var_C], eax"], [316, "mov eax, [rbp+var_C]"], [317, "mov [rbp+var_10], eax"], [318, "jmp short loc_4029E5"], [319, "call _getchar"], [320, "jmp short loc_4029E5"], [321, "nop"], [322, "jmp loc_402555"], [323, "nop"], [324, "jmp loc_402555"], [325, "nop"], [326, "jmp loc_402555"], [327, "nop"], [328, "jmp loc_402555"], [329, "nop"], [330, "jmp loc_402555"], [331, "nop"], [332, "jmp loc_402555"], [333, "nop"], [334, "jmp loc_402555"], [335, "nop"], [336, "jmp loc_402555"], [337, "nop"], [338, "jmp loc_402555"], [339, "nop"], [340, "jmp loc_402555"], [341, "leave"], [342, "retn"]], "data_dep": [[7, 6], [8, 7], [9, 8], [10, 9], [11, 8], [12, 11], [15, 4], [16, 3], [18, 16], [20, 4], [21, 20], [22, 14], [22, 102], [22, 115], [22, 157], [22, 282], [22, 21], [22, 259], [22, 52], [22, 317], [23, 22], [27, 26], [28, 27], [29, 28], [30, 27], [31, 30], [32, 27], [33, 32], [34, 33], [35, 34], [36, 33], [38, 37], [39, 27], [40, 39], [41, 14], [41, 102], [41, 115], [41, 157], [41, 282], [41, 259], [41, 52], [41, 317], [42, 53], [42, 160], [42, 280], [42, 257], [42, 116], [42, 101], [42, 195], [42, 213], [42, 41], [42, 315], [42, 13], [43, 42], [44, 27], [45, 44], [47, 52], [47, 317], [47, 14], [47, 102], [47, 115], [47, 157], [47, 282], [47, 259], [48, 3], [49, 48], [49, 47], [50, 27], [51, 50], [51, 49], [52, 14], [52, 102], [52, 115], [52, 157], [52, 282], [52, 259], [52, 52], [52, 317], [53, 160], [53, 257], [53, 280], [53, 13], [53, 116], [53, 101], [53, 195], [53, 213], [53, 315], [53, 53], [54, 52], [55, 3], [56, 55], [56, 54], [57, 56], [59, 157], [59, 282], [59, 259], [59, 52], [59, 317], [59, 14], [59, 102], [59, 115], [60, 13], [60, 116], [60, 101], [60, 213], [60, 59], [60, 315], [60, 53], [60, 160], [60, 257], [60, 195], [60, 280], [61, 60], [62, 61], [63, 280], [63, 257], [63, 116], [63, 101], [63, 195], [63, 213], [63, 315], [63, 13], [63, 53], [63, 160], [64, 3], [65, 64], [65, 63], [66, 53], [66, 280], [66, 13], [66, 116], [66, 101], [66, 195], [66, 213], [66, 315], [66, 160], [66, 257], [67, 66], [68, 67], [69, 3], [70, 68], [70, 69], [71, 65], [72, 70], [74, 195], [74, 280], [74, 13], [74, 116], [74, 101], [74, 213], [74, 315], [74, 53], [74, 160], [74, 257], [75, 3], [76, 75], [76, 74], [77, 27], [78, 77], [78, 76], [79, 14], [79, 102], [79, 259], [79, 115], [79, 157], [79, 282], [79, 52], [79, 317], [80, 79], [81, 80], [82, 3], [83, 81], [83, 82], [84, 83], [85, 195], [85, 280], [85, 13], [85, 116], [85, 101], [85, 213], [85, 315], [85, 53], [85, 160], [85, 257], [86, 3], [87, 86], [87, 85], [89, 88], [90, 87], [96, 92], [96, 96], [97, 282], [97, 52], [97, 317], [97, 14], [97, 157], [97, 102], [97, 259], [97, 115], [98, 13], [98, 116], [98, 97], [98, 101], [98, 213], [98, 315], [98, 53], [98, 160], [98, 280], [98, 257], [98, 195], [99, 98], [99, 92], [99, 96], [100, 99], [101, 280], [101, 13], [101, 116], [101, 101], [101, 213], [101, 315], [101, 53], [101, 160], [101, 257], [101, 195], [102, 52], [102, 317], [102, 14], [102, 157], [102, 102], [102, 259], [102, 115], [102, 282], [104, 52], [104, 317], [104, 14], [104, 102], [104, 259], [104, 115], [104, 157], [104, 282], [105, 104], [106, 157], [106, 102], [106, 259], [106, 115], [106, 282], [106, 52], [106, 317], [106, 14], [107, 195], [107, 13], [107, 116], [107, 106], [107, 101], [107, 213], [107, 315], [107, 53], [107, 160], [107, 280], [107, 257], [108, 107], [115, 52], [115, 317], [115, 14], [115, 102], [115, 259], [115, 115], [115, 157], [115, 282], [116, 53], [116, 160], [116, 257], [116, 195], [116, 280], [116, 13], [116, 116], [116, 101], [116, 213], [116, 315], [118, 195], [118, 13], [118, 116], [118, 101], [118, 213], [118, 315], [118, 53], [118, 160], [118, 280], [118, 257], [119, 118], [120, 14], [120, 102], [120, 259], [120, 115], [120, 157], [120, 282], [120, 52], [120, 317], [121, 160], [121, 257], [121, 195], [121, 280], [121, 13], [121, 116], [121, 120], [121, 101], [121, 213], [121, 315], [121, 53], [122, 121], [123, 122], [124, 53], [124, 160], [124, 280], [124, 257], [124, 195], [124, 13], [124, 116], [124, 101], [124, 213], [124, 315], [125, 3], [126, 125], [126, 124], [127, 53], [127, 160], [127, 280], [127, 257], [127, 195], [127, 13], [127, 116], [127, 101], [127, 213], [127, 315], [128, 127], [129, 128], [130, 3], [131, 130], [131, 129], [132, 126], [133, 131], [137, 257], [137, 195], [137, 13], [137, 116], [137, 101], [137, 213], [137, 315], [137, 53], [137, 160], [137, 280], [138, 137], [139, 138], [140, 3], [141, 140], [141, 139], [144, 142], [151, 147], [151, 151], [152, 282], [152, 259], [152, 115], [152, 102], [152, 52], [152, 317], [152, 14], [152, 157], [153, 195], [153, 13], [153, 116], [153, 152], [153, 101], [153, 213], [153, 315], [153, 53], [153, 160], [153, 280], [153, 257], [154, 153], [155, 147], [155, 151], [155, 154], [156, 155], [157, 102], [157, 52], [157, 317], [157, 14], [157, 157], [157, 282], [157, 259], [157, 115], [158, 195], [158, 13], [158, 116], [158, 101], [158, 213], [158, 315], [158, 53], [158, 160], [158, 280], [158, 257], [159, 158], [160, 213], [160, 315], [160, 53], [160, 160], [160, 280], [160, 257], [160, 195], [160, 13], [160, 116], [160, 101], [162, 5], [163, 162], [164, 5], [165, 282], [165, 52], [165, 317], [165, 14], [165, 157], [165, 102], [165, 259], [165, 115], [166, 165], [166, 164], [167, 27], [168, 167], [170, 52], [170, 317], [170, 14], [170, 157], [170, 102], [170, 259], [170, 115], [170, 282], [171, 3], [172, 171], [172, 170], [173, 172], [179, 178], [180, 179], [181, 180], [183, 182], [184, 183], [185, 184], [186, 185], [187, 186], [188, 185], [190, 189], [191, 195], [191, 13], [191, 116], [191, 101], [191, 213], [191, 315], [191, 53], [191, 160], [191, 280], [191, 257], [192, 191], [195, 53], [195, 160], [195, 280], [195, 257], [195, 116], [195, 195], [195, 213], [195, 315], [195, 13], [195, 101], [197, 280], [197, 257], [197, 116], [197, 195], [197, 213], [197, 315], [197, 13], [197, 101], [197, 53], [197, 160], [198, 197], [198, 102], [198, 52], [198, 317], [198, 14], [198, 157], [198, 282], [198, 259], [198, 115], [199, 198], [204, 200], [204, 204], [205, 200], [205, 204], [206, 53], [206, 160], [206, 280], [206, 257], [206, 116], [206, 205], [206, 195], [206, 213], [206, 315], [206, 13], [206, 101], [207, 206], [209, 3], [210, 208], [211, 209], [213, 116], [213, 195], [213, 315], [213, 13], [213, 101], [213, 213], [213, 53], [213, 160], [213, 280], [213, 257], [218, 218], [218, 214], [219, 52], [219, 317], [219, 14], [219, 102], [219, 157], [219, 282], [219, 259], [219, 115], [220, 219], [220, 213], [221, 214], [221, 218], [221, 220], [222, 221], [224, 270], [224, 288], [224, 262], [224, 10], [225, 224], [226, 288], [226, 262], [226, 10], [226, 270], [227, 284], [227, 261], [227, 287], [227, 12], [227, 226], [228, 227], [229, 284], [229, 287], [229, 12], [229, 261], [230, 229], [231, 262], [231, 230], [231, 10], [231, 270], [231, 288], [232, 231], [234, 233], [235, 234], [236, 235], [239, 101], [239, 53], [239, 160], [239, 280], [239, 257], [239, 116], [239, 195], [239, 213], [239, 315], [239, 13], [240, 102], [240, 157], [240, 282], [240, 259], [240, 115], [240, 52], [240, 317], [240, 14], [241, 239], [242, 240], [244, 234], [245, 3], [246, 244], [247, 245], [250, 3], [251, 249], [252, 250], [254, 3], [255, 254], [257, 256], [258, 257], [259, 258], [260, 262], [260, 10], [260, 270], [260, 288], [260, 230], [261, 260], [262, 270], [262, 288], [262, 230], [262, 262], [262, 10], [264, 8], [265, 264], [266, 262], [266, 10], [266, 270], [266, 288], [267, 287], [267, 12], [267, 266], [267, 284], [267, 261], [268, 267], [269, 12], [269, 284], [269, 261], [269, 287], [270, 269], [271, 262], [271, 10], [271, 270], [271, 288], [272, 271], [273, 8], [273, 272], [274, 273], [275, 195], [275, 213], [275, 315], [275, 13], [275, 101], [275, 53], [275, 160], [275, 280], [275, 257], [275, 116], [276, 52], [276, 317], [276, 14], [276, 102], [276, 157], [276, 282], [276, 259], [276, 115], [277, 275], [278, 276], [281, 280], [282, 281], [283, 262], [283, 10], [283, 270], [283, 288], [284, 283], [286, 288], [286, 262], [286, 10], [286, 270], [287, 286], [288, 262], [288, 10], [288, 270], [288, 288], [289, 288], [290, 289], [292, 291], [293, 292], [294, 293], [297, 116], [297, 101], [297, 195], [297, 213], [297, 315], [297, 13], [297, 53], [297, 160], [297, 280], [297, 257], [298, 52], [298, 317], [298, 14], [298, 102], [298, 115], [298, 157], [298, 282], [298, 259], [299, 297], [300, 298], [302, 292], [303, 3], [304, 302], [305, 303], [308, 3], [309, 307], [310, 308], [312, 3], [313, 312], [315, 314], [316, 315], [317, 316], [342, 24], [342, 237], [342, 176], [342, 174], [342, 295]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/945ed0fc3371195cab2c0d4ae99cce69735a87793ae6198953c52d56d950810f_945ed0fc3371195cab2c0d4ae99cce69735a87793ae6198953c52d56d950810f.jsonl.gz", "strip_func_name": "sub_402508", "query": "\n\n\n__int64 __fastcall sub_402508(char *a1, unsigned int a2, unsigned int *a3)\n{\nchar *src; // [rsp+28h] [rbp-28h]\nchar *srca; // [rsp+28h] [rbp-28h]\nint c; // [rsp+34h] [rbp-1Ch]\nunsigned int v8; // [rsp+38h] [rbp-18h]\nunsigned int j; // [rsp+3Ch] [rbp-14h]\nunsigned int i; // [rsp+3Ch] [rbp-14h]\nunsigned int k; // [rsp+3Ch] [rbp-14h]\nunsigned int l; // [rsp+3Ch] [rbp-14h]\nunsigned int v13; // [rsp+40h] [rbp-10h]\nunsigned int v14; // [rsp+44h] [rbp-Ch]\nunsigned int v15; // [rsp+48h] [rbp-8h]\nunsigned int v16; // [rsp+4Ch] [rbp-4h]\n\nv8 = dword_49D6E0 - 1;\nv16 = dword_49D6E0 - 1;\nv15 = dword_49D6E0 - 1;\nv14 = 0;\nv13 = 0;\nmemset(a1, 0, a2);\nwhile ( 1 )\n{\nwhile ( 1 )\n{\nLABEL_2:\nif ( v13 >= a2 - 1 )\nreturn 11LL;\nc = getchar();\nif ( c <= 27 )\nbreak;\nif ( c != 127 )\ngoto LABEL_8;\nif ( v13 )\n{\nif ( v13 == v14 )\n{\nputchar(8);\nputchar(32);\nputchar(8);\n--v13;\n--v14;\n}\nelse if ( v14 )\n{\nmemmove(&a1[v14 - 1], &a1[v14], v13 - v14 + 1);\nputchar(8);\nfprintf(stdout, \"%s \", &a1[v14 - 1]);\nfor ( i = 0; i < v13 - v14 + 1; ++i )\nputchar(8);\n--v13;\n--v14;\n}\n}\n}\nif ( c >= -1 )\nbreak;\nLABEL_8:\nif ( v13 == v14 )\n{\nputchar(c);\na1[v13++] = c;\n++v14;\na1[v13] = 0;\n}\nelse\n{\nmemmove(&a1[v14 + 1], &a1[v14], v13 - v14 + 1);\na1[v14] = c;\na1[v13 + 1] = 0;\nfputs(&a1[v14], stdout);\nfor ( j = 0; j < v13 - v14; ++j )\nputchar(8);\n++v14;\n++v13;\n}\n}\nswitch ( c )\n{\ncase -1:\nreturn 1LL;\ncase 0:\ncase 10:\nif ( a3 )\n*a3 = v13;\nputchar(c);\na1[v13] = 0;\nreturn 0LL;\ncase 9:\ngoto LABEL_2;\ncase 27:\nif ( getchar() != 91 )\ngoto LABEL_2;\nbreak;\ndefault:\ngoto LABEL_8;\n}\nswitch ( getchar() )\n{\ncase '1':\ncase '2':\ncase '3':\ncase '4':\ncase '5':\ncase '6':\ngetchar();\ngoto LABEL_2;\ncase 'A':\nif ( !v16 )\ngoto LABEL_2;\nif ( v16 > v15 )\nv16 = v15;\nsrc = (char *)sub_40DEA5(v16);\nif ( !src )\nreturn 1LL;\nsub_4024A2(v13, v14);\nstrcpy(a1, src);\nfputs(a1, stdout);\nv14 = strlen(a1);\nv13 = v14;\nv15 = v16--;\ngoto LABEL_2;\ncase 'B':\nif ( !v8 )\ngoto LABEL_2;\nif ( v16 < v15 )\nv16 = v15;\nif ( v8 < v16 + 1 )\n{\nsub_4024A2(v13, v14);\nv14 = 0;\nv13 = 0;\nv15 = v16;\ngoto LABEL_2;\n}\nv15 = v16++;\nsrca = (char *)sub_40DEA5(v16);\nif ( srca )\n{\nsub_4024A2(v13, v14);\nstrcpy(a1, srca);\nfputs(a1, stdout);\nv14 = strlen(a1);\nv13 = v14;\ngoto LABEL_2;\n}\nreturn 1LL;\ncase 'C':\nif ( v14 < v13 )\n{\nfor ( k = 0; k < v14; ++k )\nputchar(8);\nfputs(a1, stdout);\n++v14;\nfor ( l = 0; l < v13 - v14; ++l )\nputchar(8);\n}\ngoto LABEL_2;\ncase 'D':\nif ( v14 )\n{\nputchar(8);\n--v14;\n}\ngoto LABEL_2;\ndefault:\ngoto LABEL_2;\n}\n}\n\n\n\nQ:[a3,a1,a2,srca,c,v8,j,v13,v14,v15,v16,sub_402508,sub_40DEA5,sub_4024A2,]", "hints": "[]", "response": "{'a3': 'BytesRead', 'a1': 'Buffer', 'a2': 'BufferLength', 'srca': 'NextCommand', 'c': 'InputChar', 'v8': 'MaxCommandIndex', 'j': 'ic', 'v13': 'EndOfLine', 'v14': 'CursorPosition', 'v15': 'PreviousCommandIndex', 'v16': 'CurrentCommandIndex', 'sub_402508': 'AcpiOsGetLine', 'sub_40DEA5': 'AcpiDbGetHistoryByIndex', 'sub_4024A2': 'AcpiAcClearLine'}"}
[ [ 0.7264772653579712, 0.7264044880867004, 0.7245043516159058, 0.7179681062698364, 0.7173075079917908, 0.7164310216903687, 0.7139157056808472, 0.7103715538978577, 0.7080128788948059, 0.7072402834892273, 0.7050963640213013, 0.7023932933807373, 0.7015078067779541, 0.6981511116027832, 0.6980099678039551, 0.6976546049118042, 0.6966971158981323, 0.6966614723205566, 0.69588303565979, 0.6934650540351868 ], [ 208701, 51213, 228035, 220217, 244618, 139473, 214981, 242307, 101716, 186747, 152257, 206430, 170734, 247058, 228952, 160930, 19772, 219907, 54197, 121574 ] ]
LexGetNumber
001b6d37eda4b0b2e25f571e67a7549b8179adaa5dd1fa31408b780e16287d13
larryhe
tiny-c-interpreter
NA
enum LexToken LexGetNumber(struct LexState *Lexer, struct Value *Value) { int Result = 0; int Base = 10; enum LexToken ResultToken; #ifndef NO_FP double FPResult; double FPDiv; #endif if (*Lexer->Pos == '0') { /* a binary, octal or hex literal */ LEXER_INC(Lexer); if (Lexer->Pos != Lexer->End) { if (*Lexer->Pos == 'x' || *Lexer->Pos == 'X') { Base = 16; LEXER_INC(Lexer); } else if (*Lexer->Pos == 'b' || *Lexer->Pos == 'B') { Base = 2; LEXER_INC(Lexer); } else if (*Lexer->Pos != '.') Base = 8; } } /* get the value */ for (; Lexer->Pos != Lexer->End && IS_BASE_DIGIT(*Lexer->Pos, Base); LEXER_INC(Lexer)) Result = Result * Base + GET_BASE_DIGIT(*Lexer->Pos); if (Result >= 0 && Result <= MAX_CHAR_VALUE) { Value->Typ = &CharType; Value->Val->Character = Result; ResultToken = TokenCharacterConstant; } else { Value->Typ = &IntType; Value->Val->Integer = Result; ResultToken = TokenIntegerConstant; } if (Lexer->Pos == Lexer->End) return ResultToken; if (*Lexer->Pos == 'l' || *Lexer->Pos == 'L') { LEXER_INC(Lexer); return ResultToken; } #ifndef NO_FP if (Lexer->Pos == Lexer->End || *Lexer->Pos != '.') return ResultToken; Value->Typ = &FPType; LEXER_INC(Lexer); for (FPDiv = 1.0/Base, FPResult = (double)Result; Lexer->Pos != Lexer->End && IS_BASE_DIGIT(*Lexer->Pos, Base); LEXER_INC(Lexer), FPDiv /= (double)Base) FPResult += GET_BASE_DIGIT(*Lexer->Pos) * FPDiv; if (Lexer->Pos != Lexer->End && (*Lexer->Pos == 'e' || *Lexer->Pos == 'E')) { double ExponentMultiplier = 1.0; LEXER_INC(Lexer); if (Lexer->Pos != Lexer->End && *Lexer->Pos == '-') { ExponentMultiplier = -1.0; LEXER_INC(Lexer); } for (Result = 0; Lexer->Pos != Lexer->End && IS_BASE_DIGIT(*Lexer->Pos, Base); LEXER_INC(Lexer)) Result = Result * (double)Base + GET_BASE_DIGIT(*Lexer->Pos); FPResult *= pow((double)Base, (double)Result * ExponentMultiplier); } Value->Val->FP = FPResult; return TokenFPConstant; #else return ResultToken; #endif }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40552E", "function_addr": 4216110, "binary_name": "001b6d37eda4b0b2e25f571e67a7549b8179adaa5dd1fa31408b780e16287d13.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_38], rdi"], [4, "mov [rbp+var_40], rsi"], [5, "mov [rbp+var_4], 0"], [6, "mov [rbp+var_8], 0Ah"], [7, "mov rax, [rbp+var_38]"], [8, "mov rax, [rax]"], [9, "movzx eax, byte ptr [rax]"], [10, "cmp al, 30h "], [11, "jnz loc_4056C8"], [12, "mov rax, [rbp+var_38]"], [13, "mov rax, [rax]"], [14, "lea rdx, [rax+1]"], [15, "mov rax, [rbp+var_38]"], [16, "mov [rax], rdx"], [17, "mov rax, [rbp+var_38]"], [18, "mov eax, [rax+1Ch]"], [19, "lea edx, [rax+1]"], [20, "mov rax, [rbp+var_38]"], [21, "mov [rax+1Ch], edx"], [22, "mov rax, [rbp+var_38]"], [23, "mov rdx, [rax]"], [24, "mov rax, [rbp+var_38]"], [25, "mov rax, [rax+8]"], [26, "cmp rdx, rax"], [27, "jz loc_4056C8"], [28, "mov rax, [rbp+var_38]"], [29, "mov rax, [rax]"], [30, "movzx eax, byte ptr [rax]"], [31, "cmp al, 78h "], [32, "jz short loc_4055B5"], [33, "mov rax, [rbp+var_38]"], [34, "mov rax, [rax]"], [35, "movzx eax, byte ptr [rax]"], [36, "cmp al, 58h "], [37, "jnz short loc_4055E1"], [38, "mov [rbp+var_8], 10h"], [39, "mov rax, [rbp+var_38]"], [40, "mov rax, [rax]"], [41, "lea rdx, [rax+1]"], [42, "mov rax, [rbp+var_38]"], [43, "mov [rax], rdx"], [44, "mov rax, [rbp+var_38]"], [45, "mov eax, [rax+1Ch]"], [46, "lea edx, [rax+1]"], [47, "mov rax, [rbp+var_38]"], [48, "mov [rax+1Ch], edx"], [49, "jmp short loc_405642"], [50, "mov rax, [rbp+var_38]"], [51, "mov rax, [rax]"], [52, "movzx eax, byte ptr [rax]"], [53, "cmp al, 62h "], [54, "jz short loc_4055FD"], [55, "mov rax, [rbp+var_38]"], [56, "mov rax, [rax]"], [57, "movzx eax, byte ptr [rax]"], [58, "cmp al, 42h "], [59, "jnz short loc_405629"], [60, "mov [rbp+var_8], 2"], [61, "mov rax, [rbp+var_38]"], [62, "mov rax, [rax]"], [63, "lea rdx, [rax+1]"], [64, "mov rax, [rbp+var_38]"], [65, "mov [rax], rdx"], [66, "mov rax, [rbp+var_38]"], [67, "mov eax, [rax+1Ch]"], [68, "lea edx, [rax+1]"], [69, "mov rax, [rbp+var_38]"], [70, "mov [rax+1Ch], edx"], [71, "jmp short loc_405642"], [72, "mov rax, [rbp+var_38]"], [73, "mov rax, [rax]"], [74, "movzx eax, byte ptr [rax]"], [75, "cmp al, 2Eh "], [76, "jz loc_4056C8"], [77, "mov [rbp+var_8], 8"], [78, "jmp loc_4056C8"], [79, "mov eax, [rbp+var_4]"], [80, "imul eax, [rbp+var_8]"], [81, "mov edx, eax"], [82, "mov rax, [rbp+var_38]"], [83, "mov rax, [rax]"], [84, "movzx eax, byte ptr [rax]"], [85, "cmp al, 39h "], [86, "jg short loc_405670"], [87, "mov rax, [rbp+var_38]"], [88, "mov rax, [rax]"], [89, "movzx eax, byte ptr [rax]"], [90, "movsx eax, al"], [91, "sub eax, 30h "], [92, "jmp short loc_4056A0"], [93, "mov rax, [rbp+var_38]"], [94, "mov rax, [rax]"], [95, "movzx eax, byte ptr [rax]"], [96, "cmp al, 46h "], [97, "jg short loc_405690"], [98, "mov rax, [rbp+var_38]"], [99, "mov rax, [rax]"], [100, "movzx eax, byte ptr [rax]"], [101, "movsx eax, al"], [102, "sub eax, 37h "], [103, "jmp short loc_4056A0"], [104, "mov rax, [rbp+var_38]"], [105, "mov rax, [rax]"], [106, "movzx eax, byte ptr [rax]"], [107, "movsx eax, al"], [108, "sub eax, 57h "], [109, "add eax, edx"], [110, "mov [rbp+var_4], eax"], [111, "mov rax, [rbp+var_38]"], [112, "mov rax, [rax]"], [113, "lea rdx, [rax+1]"], [114, "mov rax, [rbp+var_38]"], [115, "mov [rax], rdx"], [116, "mov rax, [rbp+var_38]"], [117, "mov eax, [rax+1Ch]"], [118, "lea edx, [rax+1]"], [119, "mov rax, [rbp+var_38]"], [120, "mov [rax+1Ch], edx"], [121, "mov rax, [rbp+var_38]"], [122, "mov rdx, [rax]"], [123, "mov rax, [rbp+var_38]"], [124, "mov rax, [rax+8]"], [125, "cmp rdx, rax"], [126, "jz short loc_405755"], [127, "mov rax, [rbp+var_38]"], [128, "mov rax, [rax]"], [129, "movzx eax, byte ptr [rax]"], [130, "cmp al, 2Fh "], [131, "jle short loc_40570F"], [132, "mov eax, 0Ah"], [133, "cmp [rbp+var_8], 0Ah"], [134, "cmovle eax, [rbp+var_8]"], [135, "lea edx, [rax+2Fh]"], [136, "mov rax, [rbp+var_38]"], [137, "mov rax, [rax]"], [138, "movzx eax, byte ptr [rax]"], [139, "movsx eax, al"], [140, "cmp edx, eax"], [141, "jge loc_405647"], [142, "cmp [rbp+var_8], 0Ah"], [143, "jle short loc_405755"], [144, "mov rax, [rbp+var_38]"], [145, "mov rax, [rax]"], [146, "movzx eax, byte ptr [rax]"], [147, "cmp al, 60h "], [148, "jle short loc_405735"], [149, "mov rax, [rbp+var_38]"], [150, "mov rax, [rax]"], [151, "movzx eax, byte ptr [rax]"], [152, "cmp al, 66h "], [153, "jle loc_405647"], [154, "mov rax, [rbp+var_38]"], [155, "mov rax, [rax]"], [156, "movzx eax, byte ptr [rax]"], [157, "cmp al, 40h "], [158, "jle short loc_405755"], [159, "mov rax, [rbp+var_38]"], [160, "mov rax, [rax]"], [161, "movzx eax, byte ptr [rax]"], [162, "cmp al, 46h "], [163, "jle loc_405647"], [164, "cmp [rbp+var_4], 0"], [165, "js short loc_405785"], [166, "cmp [rbp+var_4], 0FFh"], [167, "jg short loc_405785"], [168, "mov rax, [rbp+var_40]"], [169, "mov qword ptr [rax], offset unk_423280"], [170, "mov rax, [rbp+var_40]"], [171, "mov rax, [rax+8]"], [172, "mov edx, [rbp+var_4]"], [173, "mov [rax], dl"], [174, "mov [rbp+var_C], 31h "], [175, "jmp short loc_4057A4"], [176, "mov rax, [rbp+var_40]"], [177, "mov qword ptr [rax], offset unk_423200"], [178, "mov rax, [rbp+var_40]"], [179, "mov rax, [rax+8]"], [180, "mov edx, [rbp+var_4]"], [181, "mov [rax], edx"], [182, "mov [rbp+var_C], 2Eh "], [183, "mov rax, [rbp+var_38]"], [184, "mov rdx, [rax]"], [185, "mov rax, [rbp+var_38]"], [186, "mov rax, [rax+8]"], [187, "cmp rdx, rax"], [188, "jnz short loc_4057C0"], [189, "mov eax, [rbp+var_C]"], [190, "jmp locret_405C1B"], [191, "mov rax, [rbp+var_38]"], [192, "mov rax, [rax]"], [193, "movzx eax, byte ptr [rax]"], [194, "cmp al, 6Ch "], [195, "jz short loc_4057DC"], [196, "mov rax, [rbp+var_38]"], [197, "mov rax, [rax]"], [198, "movzx eax, byte ptr [rax]"], [199, "cmp al, 4Ch "], [200, "jnz short loc_405807"], [201, "mov rax, [rbp+var_38]"], [202, "mov rax, [rax]"], [203, "lea rdx, [rax+1]"], [204, "mov rax, [rbp+var_38]"], [205, "mov [rax], rdx"], [206, "mov rax, [rbp+var_38]"], [207, "mov eax, [rax+1Ch]"], [208, "lea edx, [rax+1]"], [209, "mov rax, [rbp+var_38]"], [210, "mov [rax+1Ch], edx"], [211, "mov eax, [rbp+var_C]"], [212, "jmp locret_405C1B"], [213, "mov rax, [rbp+var_38]"], [214, "mov rdx, [rax]"], [215, "mov rax, [rbp+var_38]"], [216, "mov rax, [rax+8]"], [217, "cmp rdx, rax"], [218, "jz short loc_405829"], [219, "mov rax, [rbp+var_38]"], [220, "mov rax, [rax]"], [221, "movzx eax, byte ptr [rax]"], [222, "cmp al, 2Eh "], [223, "jz short loc_405831"], [224, "mov eax, [rbp+var_C]"], [225, "jmp locret_405C1B"], [226, "mov rax, [rbp+var_40]"], [227, "mov qword ptr [rax], offset unk_4233C0"], [228, "mov rax, [rbp+var_38]"], [229, "mov rax, [rax]"], [230, "lea rdx, [rax+1]"], [231, "mov rax, [rbp+var_38]"], [232, "mov [rax], rdx"], [233, "mov rax, [rbp+var_38]"], [234, "mov eax, [rax+1Ch]"], [235, "lea edx, [rax+1]"], [236, "mov rax, [rbp+var_38]"], [237, "mov [rax+1Ch], edx"], [238, "pxor xmm1, xmm1"], [239, "cvtsi2sd xmm1, [rbp+var_8]"], [240, "movsd xmm0, cs:qword_4189E0"], [241, "divsd xmm0, xmm1"], [242, "movsd [rbp+var_20], xmm0"], [243, "pxor xmm0, xmm0"], [244, "cvtsi2sd xmm0, [rbp+var_4]"], [245, "movsd [rbp+var_18], xmm0"], [246, "jmp loc_405941"], [247, "mov rax, [rbp+var_38]"], [248, "mov rax, [rax]"], [249, "movzx eax, byte ptr [rax]"], [250, "cmp al, 39h "], [251, "jg short loc_4058B4"], [252, "mov rax, [rbp+var_38]"], [253, "mov rax, [rax]"], [254, "movzx eax, byte ptr [rax]"], [255, "movsx eax, al"], [256, "sub eax, 30h "], [257, "pxor xmm0, xmm0"], [258, "cvtsi2sd xmm0, eax"], [259, "jmp short loc_4058F4"], [260, "mov rax, [rbp+var_38]"], [261, "mov rax, [rax]"], [262, "movzx eax, byte ptr [rax]"], [263, "cmp al, 46h "], [264, "jg short loc_4058DC"], [265, "mov rax, [rbp+var_38]"], [266, "mov rax, [rax]"], [267, "movzx eax, byte ptr [rax]"], [268, "movsx eax, al"], [269, "sub eax, 37h "], [270, "pxor xmm0, xmm0"], [271, "cvtsi2sd xmm0, eax"], [272, "jmp short loc_4058F4"], [273, "mov rax, [rbp+var_38]"], [274, "mov rax, [rax]"], [275, "movzx eax, byte ptr [rax]"], [276, "movsx eax, al"], [277, "sub eax, 57h "], [278, "pxor xmm0, xmm0"], [279, "cvtsi2sd xmm0, eax"], [280, "mulsd xmm0, [rbp+var_20]"], [281, "movsd xmm1, [rbp+var_18]"], [282, "addsd xmm0, xmm1"], [283, "movsd [rbp+var_18], xmm0"], [284, "mov rax, [rbp+var_38]"], [285, "mov rax, [rax]"], [286, "lea rdx, [rax+1]"], [287, "mov rax, [rbp+var_38]"], [288, "mov [rax], rdx"], [289, "mov rax, [rbp+var_38]"], [290, "mov eax, [rax+1Ch]"], [291, "lea edx, [rax+1]"], [292, "mov rax, [rbp+var_38]"], [293, "mov [rax+1Ch], edx"], [294, "pxor xmm1, xmm1"], [295, "cvtsi2sd xmm1, [rbp+var_8]"], [296, "movsd xmm0, [rbp+var_20]"], [297, "divsd xmm0, xmm1"], [298, "movsd [rbp+var_20], xmm0"], [299, "mov rax, [rbp+var_38]"], [300, "mov rdx, [rax]"], [301, "mov rax, [rbp+var_38]"], [302, "mov rax, [rax+8]"], [303, "cmp rdx, rax"], [304, "jz short loc_4059CE"], [305, "mov rax, [rbp+var_38]"], [306, "mov rax, [rax]"], [307, "movzx eax, byte ptr [rax]"], [308, "cmp al, 2Fh "], [309, "jle short loc_405988"], [310, "mov eax, 0Ah"], [311, "cmp [rbp+var_8], 0Ah"], [312, "cmovle eax, [rbp+var_8]"], [313, "lea edx, [rax+2Fh]"], [314, "mov rax, [rbp+var_38]"], [315, "mov rax, [rax]"], [316, "movzx eax, byte ptr [rax]"], [317, "movsx eax, al"], [318, "cmp edx, eax"], [319, "jge loc_40588C"], [320, "cmp [rbp+var_8], 0Ah"], [321, "jle short loc_4059CE"], [322, "mov rax, [rbp+var_38]"], [323, "mov rax, [rax]"], [324, "movzx eax, byte ptr [rax]"], [325, "cmp al, 60h "], [326, "jle short loc_4059AE"], [327, "mov rax, [rbp+var_38]"], [328, "mov rax, [rax]"], [329, "movzx eax, byte ptr [rax]"], [330, "cmp al, 66h "], [331, "jle loc_40588C"], [332, "mov rax, [rbp+var_38]"], [333, "mov rax, [rax]"], [334, "movzx eax, byte ptr [rax]"], [335, "cmp al, 40h "], [336, "jle short loc_4059CE"], [337, "mov rax, [rbp+var_38]"], [338, "mov rax, [rax]"], [339, "movzx eax, byte ptr [rax]"], [340, "cmp al, 46h "], [341, "jle loc_40588C"], [342, "mov rax, [rbp+var_38]"], [343, "mov rdx, [rax]"], [344, "mov rax, [rbp+var_38]"], [345, "mov rax, [rax+8]"], [346, "cmp rdx, rax"], [347, "jz loc_405C05"], [348, "mov rax, [rbp+var_38]"], [349, "mov rax, [rax]"], [350, "movzx eax, byte ptr [rax]"], [351, "cmp al, 65h "], [352, "jz short loc_405A06"], [353, "mov rax, [rbp+var_38]"], [354, "mov rax, [rax]"], [355, "movzx eax, byte ptr [rax]"], [356, "cmp al, 45h "], [357, "jnz loc_405C05"], [358, "movsd xmm0, cs:qword_4189E0"], [359, "movsd [rbp+var_28], xmm0"], [360, "mov rax, [rbp+var_38]"], [361, "mov rax, [rax]"], [362, "lea rdx, [rax+1]"], [363, "mov rax, [rbp+var_38]"], [364, "mov [rax], rdx"], [365, "mov rax, [rbp+var_38]"], [366, "mov eax, [rax+1Ch]"], [367, "lea edx, [rax+1]"], [368, "mov rax, [rbp+var_38]"], [369, "mov [rax+1Ch], edx"], [370, "mov rax, [rbp+var_38]"], [371, "mov rdx, [rax]"], [372, "mov rax, [rbp+var_38]"], [373, "mov rax, [rax+8]"], [374, "cmp rdx, rax"], [375, "jz short loc_405A88"], [376, "mov rax, [rbp+var_38]"], [377, "mov rax, [rax]"], [378, "movzx eax, byte ptr [rax]"], [379, "cmp al, 2Dh "], [380, "jnz short loc_405A88"], [381, "movsd xmm0, cs:qword_4189E8"], [382, "movsd [rbp+var_28], xmm0"], [383, "mov rax, [rbp+var_38]"], [384, "mov rax, [rax]"], [385, "lea rdx, [rax+1]"], [386, "mov rax, [rbp+var_38]"], [387, "mov [rax], rdx"], [388, "mov rax, [rbp+var_38]"], [389, "mov eax, [rax+1Ch]"], [390, "lea edx, [rax+1]"], [391, "mov rax, [rbp+var_38]"], [392, "mov [rax+1Ch], edx"], [393, "mov [rbp+var_4], 0"], [394, "jmp loc_405B40"], [395, "pxor xmm1, xmm1"], [396, "cvtsi2sd xmm1, [rbp+var_4]"], [397, "pxor xmm0, xmm0"], [398, "cvtsi2sd xmm0, [rbp+var_8]"], [399, "mulsd xmm1, xmm0"], [400, "mov rax, [rbp+var_38]"], [401, "mov rax, [rax]"], [402, "movzx eax, byte ptr [rax]"], [403, "cmp al, 39h "], [404, "jg short loc_405AD2"], [405, "mov rax, [rbp+var_38]"], [406, "mov rax, [rax]"], [407, "movzx eax, byte ptr [rax]"], [408, "movsx eax, al"], [409, "sub eax, 30h "], [410, "pxor xmm0, xmm0"], [411, "cvtsi2sd xmm0, eax"], [412, "jmp short loc_405B12"], [413, "mov rax, [rbp+var_38]"], [414, "mov rax, [rax]"], [415, "movzx eax, byte ptr [rax]"], [416, "cmp al, 46h "], [417, "jg short loc_405AFA"], [418, "mov rax, [rbp+var_38]"], [419, "mov rax, [rax]"], [420, "movzx eax, byte ptr [rax]"], [421, "movsx eax, al"], [422, "sub eax, 37h "], [423, "pxor xmm0, xmm0"], [424, "cvtsi2sd xmm0, eax"], [425, "jmp short loc_405B12"], [426, "mov rax, [rbp+var_38]"], [427, "mov rax, [rax]"], [428, "movzx eax, byte ptr [rax]"], [429, "movsx eax, al"], [430, "sub eax, 57h "], [431, "pxor xmm0, xmm0"], [432, "cvtsi2sd xmm0, eax"], [433, "addsd xmm0, xmm1"], [434, "cvttsd2si eax, xmm0"], [435, "mov [rbp+var_4], eax"], [436, "mov rax, [rbp+var_38]"], [437, "mov rax, [rax]"], [438, "lea rdx, [rax+1]"], [439, "mov rax, [rbp+var_38]"], [440, "mov [rax], rdx"], [441, "mov rax, [rbp+var_38]"], [442, "mov eax, [rax+1Ch]"], [443, "lea edx, [rax+1]"], [444, "mov rax, [rbp+var_38]"], [445, "mov [rax+1Ch], edx"], [446, "mov rax, [rbp+var_38]"], [447, "mov rdx, [rax]"], [448, "mov rax, [rbp+var_38]"], [449, "mov rax, [rax+8]"], [450, "cmp rdx, rax"], [451, "jz short loc_405BCD"], [452, "mov rax, [rbp+var_38]"], [453, "mov rax, [rax]"], [454, "movzx eax, byte ptr [rax]"], [455, "cmp al, 2Fh "], [456, "jle short loc_405B87"], [457, "mov eax, 0Ah"], [458, "cmp [rbp+var_8], 0Ah"], [459, "cmovle eax, [rbp+var_8]"], [460, "lea edx, [rax+2Fh]"], [461, "mov rax, [rbp+var_38]"], [462, "mov rax, [rax]"], [463, "movzx eax, byte ptr [rax]"], [464, "movsx eax, al"], [465, "cmp edx, eax"], [466, "jge loc_405A94"], [467, "cmp [rbp+var_8], 0Ah"], [468, "jle short loc_405BCD"], [469, "mov rax, [rbp+var_38]"], [470, "mov rax, [rax]"], [471, "movzx eax, byte ptr [rax]"], [472, "cmp al, 60h "], [473, "jle short loc_405BAD"], [474, "mov rax, [rbp+var_38]"], [475, "mov rax, [rax]"], [476, "movzx eax, byte ptr [rax]"], [477, "cmp al, 66h "], [478, "jle loc_405A94"], [479, "mov rax, [rbp+var_38]"], [480, "mov rax, [rax]"], [481, "movzx eax, byte ptr [rax]"], [482, "cmp al, 40h "], [483, "jle short loc_405BCD"], [484, "mov rax, [rbp+var_38]"], [485, "mov rax, [rax]"], [486, "movzx eax, byte ptr [rax]"], [487, "cmp al, 46h "], [488, "jle loc_405A94"], [489, "pxor xmm0, xmm0"], [490, "cvtsi2sd xmm0, [rbp+var_4]"], [491, "mulsd xmm0, [rbp+var_28]"], [492, "pxor xmm2, xmm2"], [493, "cvtsi2sd xmm2, [rbp+var_8]"], [494, "movq rax, xmm2"], [495, "movapd xmm1, xmm0"], [496, "movq xmm0, rax"], [497, "call _pow"], [498, "movsd xmm1, [rbp+var_18]"], [499, "mulsd xmm0, xmm1"], [500, "movsd [rbp+var_18], xmm0"], [501, "mov rax, [rbp+var_40]"], [502, "mov rax, [rax+8]"], [503, "movsd xmm0, [rbp+var_18]"], [504, "movsd qword ptr [rax], xmm0"], [505, "mov eax, 2Fh "], [506, "leave"], [507, "retn"]], "data_dep": [[7, 3], [8, 7], [9, 8], [10, 9], [11, 10], [12, 3], [13, 12], [14, 13], [15, 3], [16, 14], [16, 15], [17, 3], [18, 17], [18, 16], [19, 18], [19, 14], [19, 16], [20, 3], [21, 20], [21, 19], [22, 3], [23, 22], [23, 16], [23, 21], [24, 3], [25, 24], [25, 21], [26, 23], [26, 25], [27, 26], [28, 3], [29, 16], [29, 28], [29, 21], [30, 16], [30, 29], [30, 21], [31, 30], [32, 31], [33, 3], [34, 16], [34, 21], [34, 33], [35, 21], [35, 34], [35, 16], [36, 35], [37, 36], [39, 3], [40, 21], [40, 43], [40, 16], [40, 48], [40, 39], [41, 21], [41, 43], [41, 23], [41, 16], [41, 48], [41, 40], [42, 3], [43, 41], [43, 42], [44, 3], [45, 44], [45, 21], [45, 43], [46, 45], [46, 41], [46, 43], [47, 3], [48, 47], [48, 46], [50, 3], [51, 16], [51, 50], [51, 21], [52, 51], [52, 21], [52, 16], [53, 52], [54, 53], [55, 3], [56, 21], [56, 55], [56, 16], [57, 21], [57, 56], [57, 16], [58, 57], [59, 58], [61, 3], [62, 70], [62, 16], [62, 61], [62, 65], [62, 21], [63, 70], [63, 62], [63, 21], [63, 23], [63, 65], [63, 16], [64, 3], [65, 63], [65, 64], [66, 3], [67, 65], [67, 21], [67, 66], [68, 63], [68, 65], [68, 67], [69, 3], [70, 68], [70, 69], [72, 3], [73, 21], [73, 72], [73, 16], [74, 21], [74, 16], [74, 73], [75, 74], [76, 75], [79, 5], [79, 110], [80, 60], [80, 6], [80, 38], [80, 77], [80, 79], [81, 80], [82, 3], [83, 16], [83, 48], [83, 65], [83, 120], [83, 21], [83, 43], [83, 70], [83, 115], [83, 82], [84, 115], [84, 16], [84, 48], [84, 83], [84, 65], [84, 120], [84, 21], [84, 43], [84, 70], [85, 84], [86, 85], [87, 3], [88, 65], [88, 120], [88, 87], [88, 21], [88, 43], [88, 70], [88, 115], [88, 16], [88, 48], [89, 21], [89, 43], [89, 88], [89, 70], [89, 115], [89, 16], [89, 48], [89, 65], [89, 120], [90, 89], [91, 90], [93, 3], [94, 70], [94, 115], [94, 16], [94, 48], [94, 93], [94, 65], [94, 120], [94, 21], [94, 43], [95, 70], [95, 115], [95, 16], [95, 94], [95, 48], [95, 65], [95, 120], [95, 21], [95, 43], [96, 95], [97, 96], [98, 3], [99, 48], [99, 98], [99, 65], [99, 120], [99, 21], [99, 43], [99, 70], [99, 115], [99, 16], [100, 16], [100, 48], [100, 65], [100, 120], [100, 21], [100, 99], [100, 43], [100, 70], [100, 115], [101, 100], [102, 101], [104, 3], [105, 65], [105, 120], [105, 21], [105, 43], [105, 70], [105, 115], [105, 16], [105, 104], [105, 48], [106, 120], [106, 21], [106, 43], [106, 48], [106, 70], [106, 115], [106, 105], [106, 16], [106, 65], [107, 106], [108, 107], [109, 91], [109, 102], [109, 81], [109, 108], [110, 109], [111, 3], [112, 43], [112, 111], [112, 48], [112, 70], [112, 115], [112, 16], [112, 65], [112, 120], [112, 21], [113, 16], [113, 81], [113, 48], [113, 65], [113, 120], [113, 21], [113, 43], [113, 70], [113, 112], [113, 115], [114, 3], [115, 113], [115, 114], [116, 3], [117, 115], [117, 116], [117, 120], [117, 21], [117, 48], [117, 70], [118, 117], [118, 113], [118, 115], [119, 3], [120, 119], [120, 118], [121, 3], [122, 115], [122, 16], [122, 43], [122, 121], [122, 65], [122, 120], [122, 21], [122, 48], [122, 70], [123, 3], [124, 43], [124, 65], [124, 120], [124, 21], [124, 48], [124, 123], [124, 70], [124, 115], [124, 16], [125, 124], [125, 122], [126, 125], [127, 3], [128, 48], [128, 70], [128, 115], [128, 16], [128, 127], [128, 43], [128, 65], [128, 120], [128, 21], [129, 48], [129, 70], [129, 115], [129, 16], [129, 43], [129, 128], [129, 65], [129, 120], [129, 21], [130, 129], [131, 130], [133, 6], [133, 38], [133, 77], [133, 60], [134, 77], [134, 6], [134, 38], [134, 60], [135, 16], [135, 43], [135, 65], [135, 120], [135, 21], [135, 122], [135, 134], [135, 48], [135, 70], [135, 115], [136, 3], [137, 65], [137, 120], [137, 21], [137, 43], [137, 48], [137, 136], [137, 70], [137, 115], [137, 16], [138, 65], [138, 120], [138, 21], [138, 43], [138, 48], [138, 70], [138, 115], [138, 16], [138, 137], [139, 138], [140, 135], [140, 139], [141, 140], [142, 60], [142, 6], [142, 38], [142, 77], [143, 142], [144, 3], [145, 144], [145, 48], [145, 70], [145, 115], [145, 16], [145, 43], [145, 65], [145, 120], [145, 21], [146, 16], [146, 65], [146, 120], [146, 21], [146, 43], [146, 48], [146, 70], [146, 145], [146, 115], [147, 146], [148, 147], [149, 3], [150, 70], [150, 115], [150, 16], [150, 149], [150, 43], [150, 65], [150, 120], [150, 21], [150, 48], [151, 150], [151, 43], [151, 65], [151, 120], [151, 21], [151, 48], [151, 70], [151, 115], [151, 16], [152, 151], [153, 152], [154, 3], [155, 43], [155, 65], [155, 120], [155, 21], [155, 154], [155, 48], [155, 70], [155, 115], [155, 16], [156, 65], [156, 120], [156, 21], [156, 155], [156, 48], [156, 70], [156, 115], [156, 16], [156, 43], [157, 156], [158, 157], [159, 3], [160, 48], [160, 159], [160, 70], [160, 115], [160, 16], [160, 43], [160, 65], [160, 120], [160, 21], [161, 48], [161, 70], [161, 115], [161, 160], [161, 16], [161, 43], [161, 65], [161, 120], [161, 21], [162, 161], [163, 162], [164, 5], [164, 110], [165, 164], [166, 110], [166, 5], [167, 166], [168, 4], [169, 168], [170, 4], [171, 169], [171, 170], [172, 110], [172, 5], [173, 171], [173, 172], [176, 4], [177, 176], [178, 4], [179, 178], [179, 177], [180, 110], [180, 5], [181, 180], [181, 179], [183, 3], [184, 43], [184, 173], [184, 65], [184, 120], [184, 21], [184, 177], [184, 48], [184, 169], [184, 70], [184, 181], [184, 115], [184, 183], [184, 16], [185, 3], [186, 70], [186, 181], [186, 115], [186, 16], [186, 173], [186, 185], [186, 21], [186, 43], [186, 65], [186, 120], [186, 177], [186, 48], [186, 169], [187, 184], [187, 186], [188, 187], [189, 182], [189, 174], [191, 3], [192, 21], [192, 177], [192, 48], [192, 169], [192, 70], [192, 191], [192, 181], [192, 115], [192, 16], [192, 173], [192, 43], [192, 65], [192, 120], [193, 21], [193, 43], [193, 177], [193, 65], [193, 120], [193, 16], [193, 192], [193, 48], [193, 169], [193, 70], [193, 181], [193, 115], [193, 173], [194, 193], [195, 194], [196, 3], [197, 177], [197, 48], [197, 169], [197, 70], [197, 181], [197, 115], [197, 16], [197, 173], [197, 21], [197, 43], [197, 196], [197, 65], [197, 120], [198, 16], [198, 173], [198, 197], [198, 43], [198, 65], [198, 120], [198, 21], [198, 177], [198, 48], [198, 169], [198, 70], [198, 181], [198, 115], [199, 198], [200, 199], [201, 3], [202, 70], [202, 181], [202, 115], [202, 16], [202, 173], [202, 205], [202, 21], [202, 43], [202, 65], [202, 120], [202, 201], [202, 210], [202, 177], [202, 48], [202, 169], [203, 184], [203, 43], [203, 65], [203, 120], [203, 21], [203, 210], [203, 177], [203, 202], [203, 48], [203, 169], [203, 70], [203, 181], [203, 115], [203, 16], [203, 173], [203, 205], [204, 3], [205, 204], [205, 203], [206, 3], [207, 21], [207, 120], [207, 48], [207, 70], [207, 206], [207, 205], [208, 203], [208, 205], [208, 207], [209, 3], [210, 209], [210, 208], [211, 182], [211, 174], [213, 3], [214, 213], [214, 16], [214, 48], [214, 169], [214, 70], [214, 181], [214, 115], [214, 173], [214, 21], [214, 43], [214, 177], [214, 65], [214, 120], [215, 3], [216, 70], [216, 181], [216, 115], [216, 16], [216, 173], [216, 215], [216, 21], [216, 43], [216, 65], [216, 120], [216, 177], [216, 48], [216, 169], [217, 214], [217, 216], [218, 217], [219, 3], [220, 43], [220, 219], [220, 65], [220, 120], [220, 21], [220, 177], [220, 48], [220, 169], [220, 70], [220, 181], [220, 115], [220, 16], [220, 173], [221, 21], [221, 220], [221, 43], [221, 65], [221, 120], [221, 177], [221, 48], [221, 169], [221, 70], [221, 181], [221, 115], [221, 16], [221, 173], [222, 221], [223, 222], [224, 182], [224, 174], [226, 4], [227, 226], [228, 3], [229, 228], [229, 227], [230, 214], [230, 227], [230, 229], [231, 3], [232, 230], [232, 231], [233, 3], [234, 232], [234, 120], [234, 21], [234, 233], [234, 48], [234, 70], [235, 230], [235, 232], [235, 234], [236, 3], [237, 235], [237, 236], [239, 77], [239, 38], [239, 60], [239, 6], [239, 238], [241, 239], [241, 240], [242, 241], [244, 243], [244, 5], [244, 110], [245, 244], [247, 3], [248, 70], [248, 227], [248, 181], [248, 115], [248, 173], [248, 293], [248, 21], [248, 43], [248, 232], [248, 65], [248, 120], [248, 177], [248, 288], [248, 16], [248, 48], [248, 169], [248, 247], [248, 237], [249, 48], [249, 169], [249, 293], [249, 237], [249, 70], [249, 227], [249, 181], [249, 115], [249, 173], [249, 21], [249, 43], [249, 177], [249, 232], [249, 65], [249, 120], [249, 288], [249, 16], [249, 248], [250, 249], [251, 250], [252, 3], [253, 21], [253, 43], [253, 252], [253, 232], [253, 65], [253, 120], [253, 177], [253, 288], [253, 16], [253, 48], [253, 169], [253, 237], [253, 70], [253, 227], [253, 181], [253, 115], [253, 173], [253, 293], [254, 293], [254, 21], [254, 253], [254, 43], [254, 177], [254, 232], [254, 65], [254, 120], [254, 288], [254, 16], [254, 48], [254, 169], [254, 237], [254, 70], [254, 227], [254, 181], [254, 115], [254, 173], [255, 254], [256, 255], [258, 256], [258, 257], [260, 3], [261, 288], [261, 16], [261, 48], [261, 169], [261, 293], [261, 260], [261, 237], [261, 70], [261, 227], [261, 181], [261, 115], [261, 173], [261, 120], [261, 21], [261, 43], [261, 177], [261, 232], [261, 65], [262, 237], [262, 70], [262, 227], [262, 181], [262, 115], [262, 16], [262, 173], [262, 261], [262, 293], [262, 21], [262, 43], [262, 232], [262, 65], [262, 120], [262, 177], [262, 288], [262, 48], [262, 169], [263, 262], [264, 263], [265, 3], [266, 16], [266, 48], [266, 169], [266, 293], [266, 237], [266, 70], [266, 227], [266, 181], [266, 115], [266, 173], [266, 120], [266, 21], [266, 43], [266, 177], [266, 265], [266, 232], [266, 65], [266, 288], [267, 293], [267, 21], [267, 43], [267, 232], [267, 65], [267, 120], [267, 266], [267, 177], [267, 288], [267, 48], [267, 169], [267, 237], [267, 70], [267, 227], [267, 181], [267, 115], [267, 16], [267, 173], [268, 267], [269, 268], [271, 270], [271, 269], [273, 3], [274, 288], [274, 16], [274, 48], [274, 169], [274, 237], [274, 70], [274, 227], [274, 181], [274, 115], [274, 173], [274, 293], [274, 273], [274, 21], [274, 43], [274, 177], [274, 232], [274, 65], [274, 120], [275, 65], [275, 120], [275, 288], [275, 16], [275, 48], [275, 169], [275, 293], [275, 237], [275, 70], [275, 227], [275, 181], [275, 115], [275, 173], [275, 274], [275, 21], [275, 43], [275, 177], [275, 232], [276, 275], [277, 276], [279, 277], [279, 278], [280, 258], [280, 271], [280, 298], [280, 242], [280, 279], [281, 283], [281, 245], [282, 280], [282, 281], [283, 282], [284, 3], [285, 48], [285, 169], [285, 293], [285, 237], [285, 227], [285, 181], [285, 173], [285, 65], [285, 284], [285, 120], [285, 21], [285, 43], [285, 177], [285, 288], [285, 232], [285, 70], [285, 115], [285, 16], [286, 21], [286, 43], [286, 285], [286, 177], [286, 232], [286, 65], [286, 300], [286, 288], [286, 16], [286, 48], [286, 313], [286, 169], [286, 293], [286, 237], [286, 70], [286, 227], [286, 181], [286, 115], [286, 173], [286, 120], [287, 3], [288, 286], [288, 287], [289, 3], [290, 288], [290, 289], [290, 293], [290, 237], [291, 288], [291, 290], [291, 286], [292, 3], [293, 291], [293, 292], [295, 38], [295, 60], [295, 294], [295, 6], [295, 77], [296, 298], [296, 242], [297, 296], [297, 295], [298, 297], [299, 3], [300, 21], [300, 43], [300, 177], [300, 232], [300, 65], [300, 120], [300, 299], [300, 288], [300, 16], [300, 48], [300, 169], [300, 293], [300, 237], [300, 70], [300, 227], [300, 181], [300, 115], [300, 173], [301, 3], [302, 301], [302, 16], [302, 48], [302, 293], [302, 237], [302, 227], [302, 173], [302, 65], [302, 120], [302, 21], [302, 43], [302, 177], [302, 288], [302, 232], [302, 169], [302, 70], [302, 181], [302, 115], [303, 300], [303, 302], [304, 303], [305, 3], [306, 173], [306, 65], [306, 120], [306, 21], [306, 43], [306, 177], [306, 288], [306, 232], [306, 70], [306, 181], [306, 115], [306, 16], [306, 48], [306, 169], [306, 293], [306, 237], [306, 227], [306, 305], [307, 16], [307, 48], [307, 169], [307, 293], [307, 237], [307, 70], [307, 227], [307, 181], [307, 115], [307, 173], [307, 120], [307, 306], [307, 21], [307, 43], [307, 177], [307, 288], [307, 232], [307, 65], [308, 307], [309, 308], [311, 6], [311, 38], [311, 60], [311, 77], [312, 38], [312, 60], [312, 6], [312, 77], [313, 16], [313, 48], [313, 169], [313, 293], [313, 237], [313, 227], [313, 181], [313, 115], [313, 173], [313, 120], [313, 21], [313, 43], [313, 177], [313, 288], [313, 232], [313, 65], [313, 300], [313, 70], [313, 312], [314, 3], [315, 16], [315, 48], [315, 169], [315, 293], [315, 237], [315, 227], [315, 181], [315, 173], [315, 120], [315, 21], [315, 43], [315, 177], [315, 288], [315, 232], [315, 65], [315, 70], [315, 115], [315, 314], [316, 115], [316, 16], [316, 48], [316, 169], [316, 293], [316, 237], [316, 227], [316, 315], [316, 173], [316, 65], [316, 120], [316, 21], [316, 43], [316, 177], [316, 288], [316, 232], [316, 70], [316, 181], [317, 316], [318, 317], [318, 313], [319, 318], [320, 77], [320, 6], [320, 38], [320, 60], [321, 320], [322, 3], [323, 173], [323, 65], [323, 120], [323, 21], [323, 43], [323, 177], [323, 288], [323, 232], [323, 169], [323, 322], [323, 70], [323, 181], [323, 115], [323, 16], [323, 48], [323, 293], [323, 237], [323, 227], [324, 65], [324, 70], [324, 115], [324, 16], [324, 323], [324, 48], [324, 169], [324, 293], [324, 237], [324, 227], [324, 181], [324, 173], [324, 120], [324, 21], [324, 43], [324, 177], [324, 288], [324, 232], [325, 324], [326, 325], [327, 3], [328, 43], [328, 177], [328, 288], [328, 232], [328, 169], [328, 70], [328, 181], [328, 115], [328, 16], [328, 48], [328, 293], [328, 237], [328, 227], [328, 327], [328, 173], [328, 65], [328, 120], [328, 21], [329, 16], [329, 48], [329, 169], [329, 293], [329, 237], [329, 227], [329, 181], [329, 173], [329, 120], [329, 21], [329, 328], [329, 43], [329, 177], [329, 288], [329, 232], [329, 65], [329, 70], [329, 115], [330, 329], [331, 330], [332, 3], [333, 120], [333, 21], [333, 43], [333, 177], [333, 288], [333, 232], [333, 65], [333, 332], [333, 16], [333, 48], [333, 169], [333, 293], [333, 237], [333, 70], [333, 227], [333, 181], [333, 115], [333, 173], [334, 173], [334, 120], [334, 21], [334, 43], [334, 177], [334, 288], [334, 232], [334, 65], [334, 333], [334, 70], [334, 115], [334, 16], [334, 48], [334, 169], [334, 293], [334, 237], [334, 227], [334, 181], [335, 334], [336, 335], [337, 3], [338, 232], [338, 65], [338, 16], [338, 48], [338, 169], [338, 293], [338, 237], [338, 70], [338, 227], [338, 181], [338, 115], [338, 337], [338, 173], [338, 120], [338, 21], [338, 43], [338, 177], [338, 288], [339, 173], [339, 65], [339, 120], [339, 21], [339, 43], [339, 177], [339, 288], [339, 232], [339, 169], [339, 70], [339, 181], [339, 115], [339, 16], [339, 48], [339, 293], [339, 237], [339, 227], [339, 338], [340, 339], [341, 340], [342, 3], [343, 16], [343, 48], [343, 169], [343, 293], [343, 237], [343, 70], [343, 227], [343, 181], [343, 115], [343, 173], [343, 120], [343, 21], [343, 43], [343, 177], [343, 288], [343, 232], [343, 65], [343, 342], [344, 3], [345, 16], [345, 48], [345, 169], [345, 293], [345, 237], [345, 227], [345, 181], [345, 173], [345, 120], [345, 21], [345, 43], [345, 177], [345, 288], [345, 232], [345, 65], [345, 70], [345, 344], [345, 115], [346, 343], [346, 345], [347, 346], [348, 3], [349, 115], [349, 16], [349, 48], [349, 293], [349, 237], [349, 227], [349, 348], [349, 173], [349, 65], [349, 120], [349, 21], [349, 43], [349, 177], [349, 288], [349, 232], [349, 169], [349, 70], [349, 181], [350, 173], [350, 349], [350, 120], [350, 21], [350, 43], [350, 177], [350, 288], [350, 232], [350, 65], [350, 70], [350, 115], [350, 16], [350, 48], [350, 169], [350, 293], [350, 237], [350, 227], [350, 181], [351, 350], [352, 351], [353, 3], [354, 237], [354, 227], [354, 173], [354, 65], [354, 120], [354, 21], [354, 43], [354, 177], [354, 288], [354, 232], [354, 353], [354, 169], [354, 70], [354, 181], [354, 115], [354, 16], [354, 48], [354, 293], [355, 43], [355, 177], [355, 288], [355, 232], [355, 65], [355, 70], [355, 354], [355, 115], [355, 16], [355, 48], [355, 169], [355, 293], [355, 237], [355, 227], [355, 181], [355, 173], [355, 120], [355, 21], [356, 355], [357, 356], [359, 358], [360, 3], [361, 364], [361, 43], [361, 177], [361, 288], [361, 232], [361, 48], [361, 169], [361, 70], [361, 181], [361, 115], [361, 16], [361, 369], [361, 293], [361, 237], [361, 227], [361, 360], [361, 173], [361, 65], [361, 120], [361, 21], [362, 16], [362, 369], [362, 48], [362, 169], [362, 293], [362, 237], [362, 227], [362, 361], [362, 173], [362, 65], [362, 120], [362, 21], [362, 364], [362, 43], [362, 177], [362, 288], [362, 232], [362, 343], [362, 70], [362, 181], [362, 115], [363, 3], [364, 362], [364, 363], [365, 3], [366, 293], [366, 237], [366, 364], [366, 365], [367, 362], [367, 364], [367, 366], [368, 3], [369, 368], [369, 367], [370, 3], [371, 369], [371, 370], [371, 364], [372, 3], [373, 372], [373, 369], [374, 371], [374, 373], [375, 374], [376, 3], [377, 364], [377, 43], [377, 177], [377, 288], [377, 376], [377, 232], [377, 48], [377, 169], [377, 70], [377, 181], [377, 115], [377, 16], [377, 369], [377, 293], [377, 237], [377, 227], [377, 173], [377, 65], [377, 120], [377, 21], [378, 16], [378, 369], [378, 48], [378, 293], [378, 237], [378, 227], [378, 173], [378, 65], [378, 120], [378, 21], [378, 364], [378, 43], [378, 177], [378, 288], [378, 232], [378, 169], [378, 70], [378, 181], [378, 377], [378, 115], [379, 378], [380, 379], [382, 381], [383, 3], [384, 237], [384, 227], [384, 383], [384, 173], [384, 65], [384, 120], [384, 21], [384, 387], [384, 364], [384, 43], [384, 177], [384, 288], [384, 232], [384, 169], [384, 70], [384, 181], [384, 115], [384, 16], [384, 392], [384, 369], [384, 48], [384, 293], [385, 173], [385, 65], [385, 120], [385, 21], [385, 384], [385, 387], [385, 364], [385, 43], [385, 177], [385, 288], [385, 232], [385, 48], [385, 169], [385, 70], [385, 181], [385, 115], [385, 16], [385, 392], [385, 369], [385, 293], [385, 237], [385, 371], [385, 227], [386, 3], [387, 385], [387, 386], [388, 3], [389, 387], [389, 388], [389, 369], [390, 389], [390, 385], [390, 387], [391, 3], [392, 390], [392, 391], [396, 435], [396, 393], [396, 395], [398, 6], [398, 38], [398, 77], [398, 397], [398, 60], [399, 396], [399, 398], [400, 3], [401, 293], [401, 237], [401, 227], [401, 173], [401, 65], [401, 120], [401, 440], [401, 21], [401, 387], [401, 364], [401, 43], [401, 177], [401, 288], [401, 232], [401, 48], [401, 169], [401, 70], [401, 181], [401, 400], [401, 115], [401, 445], [401, 16], [401, 392], [401, 369], [402, 173], [402, 65], [402, 120], [402, 440], [402, 21], [402, 387], [402, 364], [402, 43], [402, 177], [402, 288], [402, 232], [402, 48], [402, 169], [402, 401], [402, 70], [402, 181], [402, 115], [402, 445], [402, 16], [402, 392], [402, 369], [402, 293], [402, 237], [402, 227], [403, 402], [404, 403], [405, 3], [406, 227], [406, 43], [406, 65], [406, 120], [406, 440], [406, 21], [406, 387], [406, 364], [406, 177], [406, 288], [406, 232], [406, 48], [406, 169], [406, 237], [406, 70], [406, 181], [406, 115], [406, 445], [406, 16], [406, 173], [406, 392], [406, 369], [406, 405], [406, 293], [407, 364], [407, 43], [407, 177], [407, 288], [407, 232], [407, 48], [407, 169], [407, 70], [407, 181], [407, 115], [407, 445], [407, 16], [407, 392], [407, 369], [407, 293], [407, 237], [407, 227], [407, 406], [407, 173], [407, 65], [407, 120], [407, 440], [407, 21], [407, 387], [408, 407], [409, 408], [411, 410], [411, 409], [413, 3], [414, 237], [414, 227], [414, 173], [414, 65], [414, 120], [414, 440], [414, 21], [414, 387], [414, 364], [414, 43], [414, 177], [414, 288], [414, 232], [414, 169], [414, 70], [414, 181], [414, 413], [414, 115], [414, 445], [414, 16], [414, 392], [414, 369], [414, 48], [414, 293], [415, 237], [415, 70], [415, 181], [415, 115], [415, 445], [415, 16], [415, 173], [415, 392], [415, 369], [415, 293], [415, 414], [415, 227], [415, 43], [415, 65], [415, 120], [415, 440], [415, 21], [415, 387], [415, 364], [415, 177], [415, 288], [415, 232], [415, 48], [415, 169], [416, 415], [417, 416], [418, 3], [419, 43], [419, 173], [419, 65], [419, 418], [419, 120], [419, 440], [419, 21], [419, 387], [419, 364], [419, 177], [419, 288], [419, 232], [419, 48], [419, 169], [419, 70], [419, 181], [419, 115], [419, 445], [419, 16], [419, 392], [419, 369], [419, 293], [419, 237], [419, 227], [420, 293], [420, 227], [420, 43], [420, 173], [420, 65], [420, 120], [420, 440], [420, 21], [420, 387], [420, 364], [420, 177], [420, 419], [420, 288], [420, 232], [420, 48], [420, 169], [420, 237], [420, 70], [420, 181], [420, 115], [420, 445], [420, 16], [420, 392], [420, 369], [421, 420], [422, 421], [424, 422], [424, 423], [426, 3], [427, 440], [427, 21], [427, 387], [427, 364], [427, 177], [427, 288], [427, 48], [427, 169], [427, 237], [427, 70], [427, 181], [427, 115], [427, 445], [427, 16], [427, 173], [427, 392], [427, 369], [427, 293], [427, 227], [427, 426], [427, 43], [427, 232], [427, 65], [427, 120], [428, 115], [428, 445], [428, 16], [428, 392], [428, 369], [428, 293], [428, 427], [428, 237], [428, 227], [428, 43], [428, 173], [428, 65], [428, 120], [428, 440], [428, 21], [428, 387], [428, 364], [428, 177], [428, 288], [428, 232], [428, 48], [428, 169], [428, 70], [428, 181], [429, 428], [430, 429], [432, 431], [432, 430], [433, 432], [433, 399], [433, 411], [433, 424], [434, 430], [434, 409], [434, 422], [434, 433], [435, 434], [436, 3], [437, 392], [437, 369], [437, 293], [437, 227], [437, 43], [437, 65], [437, 120], [437, 440], [437, 21], [437, 387], [437, 364], [437, 177], [437, 288], [437, 232], [437, 48], [437, 169], [437, 237], [437, 70], [437, 181], [437, 436], [437, 115], [437, 445], [437, 16], [437, 173], [438, 440], [438, 21], [438, 387], [438, 364], [438, 177], [438, 288], [438, 232], [438, 48], [438, 169], [438, 70], [438, 181], [438, 115], [438, 445], [438, 16], [438, 392], [438, 369], [438, 447], [438, 460], [438, 437], [438, 293], [438, 237], [438, 227], [438, 43], [438, 173], [438, 65], [438, 120], [439, 3], [440, 439], [440, 438], [441, 3], [442, 445], [442, 392], [442, 369], [442, 440], [442, 441], [443, 438], [443, 440], [443, 442], [444, 3], [445, 443], [445, 444], [446, 3], [447, 293], [447, 237], [447, 227], [447, 173], [447, 65], [447, 120], [447, 440], [447, 21], [447, 387], [447, 364], [447, 43], [447, 177], [447, 288], [447, 232], [447, 48], [447, 169], [447, 70], [447, 181], [447, 446], [447, 115], [447, 445], [447, 16], [447, 392], [447, 369], [448, 3], [449, 43], [449, 173], [449, 65], [449, 120], [449, 440], [449, 21], [449, 387], [449, 364], [449, 177], [449, 288], [449, 232], [449, 48], [449, 169], [449, 70], [449, 181], [449, 115], [449, 445], [449, 448], [449, 16], [449, 392], [449, 369], [449, 293], [449, 237], [449, 227], [450, 447], [450, 449], [451, 450], [452, 3], [453, 293], [453, 227], [453, 43], [453, 232], [453, 65], [453, 120], [453, 440], [453, 21], [453, 387], [453, 364], [453, 452], [453, 177], [453, 288], [453, 48], [453, 169], [453, 237], [453, 70], [453, 181], [453, 115], [453, 445], [453, 16], [453, 173], [453, 392], [453, 369], [454, 440], [454, 453], [454, 21], [454, 387], [454, 364], [454, 177], [454, 288], [454, 232], [454, 48], [454, 169], [454, 70], [454, 181], [454, 115], [454, 445], [454, 16], [454, 392], [454, 369], [454, 293], [454, 237], [454, 227], [454, 43], [454, 173], [454, 65], [454, 120], [455, 454], [456, 455], [458, 77], [458, 38], [458, 60], [458, 6], [459, 60], [459, 6], [459, 38], [459, 77], [460, 232], [460, 48], [460, 169], [460, 70], [460, 181], [460, 115], [460, 445], [460, 16], [460, 392], [460, 369], [460, 447], [460, 293], [460, 237], [460, 227], [460, 459], [460, 43], [460, 173], [460, 65], [460, 120], [460, 440], [460, 21], [460, 387], [460, 364], [460, 177], [460, 288], [461, 3], [462, 48], [462, 169], [462, 237], [462, 70], [462, 181], [462, 115], [462, 445], [462, 16], [462, 173], [462, 392], [462, 369], [462, 293], [462, 227], [462, 43], [462, 461], [462, 65], [462, 120], [462, 440], [462, 21], [462, 387], [462, 364], [462, 177], [462, 288], [462, 232], [463, 48], [463, 169], [463, 237], [463, 70], [463, 181], [463, 115], [463, 445], [463, 16], [463, 173], [463, 392], [463, 369], [463, 293], [463, 227], [463, 462], [463, 43], [463, 232], [463, 65], [463, 288], [463, 120], [463, 440], [463, 21], [463, 387], [463, 364], [463, 177], [464, 463], [465, 460], [465, 464], [466, 465], [467, 6], [467, 77], [467, 38], [467, 60], [468, 467], [469, 3], [470, 16], [470, 173], [470, 392], [470, 369], [470, 293], [470, 21], [470, 43], [470, 232], [470, 65], [470, 120], [470, 440], [470, 387], [470, 364], [470, 177], [470, 288], [470, 445], [470, 48], [470, 169], [470, 237], [470, 70], [470, 227], [470, 469], [470, 181], [470, 115], [471, 120], [471, 440], [471, 21], [471, 387], [471, 364], [471, 177], [471, 288], [471, 232], [471, 48], [471, 169], [471, 237], [471, 70], [471, 181], [471, 115], [471, 445], [471, 16], [471, 173], [471, 392], [471, 369], [471, 470], [471, 293], [471, 227], [471, 43], [471, 65], [472, 471], [473, 472], [474, 3], [475, 70], [475, 181], [475, 115], [475, 445], [475, 16], [475, 392], [475, 369], [475, 293], [475, 237], [475, 227], [475, 43], [475, 173], [475, 474], [475, 65], [475, 120], [475, 440], [475, 21], [475, 387], [475, 364], [475, 177], [475, 288], [475, 232], [475, 48], [475, 169], [476, 48], [476, 169], [476, 237], [476, 70], [476, 181], [476, 115], [476, 445], [476, 16], [476, 173], [476, 392], [476, 369], [476, 293], [476, 227], [476, 43], [476, 65], [476, 120], [476, 440], [476, 21], [476, 387], [476, 364], [476, 475], [476, 177], [476, 288], [476, 232], [477, 476], [478, 477], [479, 3], [480, 293], [480, 237], [480, 227], [480, 43], [480, 173], [480, 65], [480, 120], [480, 440], [480, 21], [480, 387], [480, 364], [480, 177], [480, 288], [480, 232], [480, 48], [480, 169], [480, 479], [480, 70], [480, 181], [480, 115], [480, 445], [480, 16], [480, 392], [480, 369], [481, 48], [481, 169], [481, 237], [481, 70], [481, 227], [481, 181], [481, 115], [481, 16], [481, 173], [481, 392], [481, 480], [481, 293], [481, 21], [481, 43], [481, 232], [481, 65], [481, 120], [481, 440], [481, 387], [481, 364], [481, 177], [481, 288], [481, 445], [481, 369], [482, 481], [483, 482], [484, 3], [485, 120], [485, 440], [485, 21], [485, 387], [485, 364], [485, 177], [485, 288], [485, 232], [485, 48], [485, 169], [485, 70], [485, 181], [485, 115], [485, 445], [485, 16], [485, 392], [485, 369], [485, 293], [485, 237], [485, 227], [485, 43], [485, 484], [485, 173], [485, 65], [486, 392], [486, 369], [486, 293], [486, 21], [486, 43], [486, 232], [486, 65], [486, 120], [486, 440], [486, 387], [486, 364], [486, 485], [486, 177], [486, 288], [486, 445], [486, 48], [486, 169], [486, 237], [486, 70], [486, 227], [486, 181], [486, 115], [486, 16], [486, 173], [487, 486], [488, 487], [490, 489], [490, 393], [490, 435], [491, 490], [491, 382], [491, 359], [493, 38], [493, 60], [493, 6], [493, 492], [493, 77], [494, 493], [495, 491], [496, 494], [498, 245], [498, 283], [499, 496], [499, 498], [500, 499], [501, 4], [502, 293], [502, 440], [502, 21], [502, 43], [502, 232], [502, 65], [502, 120], [502, 387], [502, 364], [502, 177], [502, 288], [502, 445], [502, 16], [502, 369], [502, 48], [502, 169], [502, 237], [502, 70], [502, 227], [502, 181], [502, 115], [502, 501], [502, 504], [502, 173], [502, 392], [503, 283], [503, 245], [503, 500], [504, 502], [504, 503], [507, 189], [507, 211], [507, 224], [507, 505]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/001b6d37eda4b0b2e25f571e67a7549b8179adaa5dd1fa31408b780e16287d13_001b6d37eda4b0b2e25f571e67a7549b8179adaa5dd1fa31408b780e16287d13.jsonl.gz", "strip_func_name": "sub_40552E", "query": "\n\n\n__int64 __fastcall sub_40552E(char **a1, __int64 a2)\n{\nint v2; // eax\nint v3; // eax\n__int64 result; // rax\ndouble v5; // xmm0_8\nint v6; // eax\ndouble v7; // xmm0_8\nint v8; // eax\ndouble v9; // [rsp+18h] [rbp-28h]\ndouble v10; // [rsp+20h] [rbp-20h]\ndouble v11; // [rsp+28h] [rbp-18h]\nunsigned int v12; // [rsp+34h] [rbp-Ch]\nint v13; // [rsp+38h] [rbp-8h]\nint v14; // [rsp+3Ch] [rbp-4h]\nint v15; // [rsp+3Ch] [rbp-4h]\n\nv14 = 0;\nv13 = 10;\nif ( **a1 == 48 )\n{\n++*a1;\n++*((_DWORD *)a1 + 7);\nif ( *a1 != a1[1] )\n{\nif ( **a1 == 120 || **a1 == 88 )\n{\nv13 = 16;\n++*a1;\n++*((_DWORD *)a1 + 7);\n}\nelse if ( **a1 == 98 || **a1 == 66 )\n{\nv13 = 2;\n++*a1;\n++*((_DWORD *)a1 + 7);\n}\nelse if ( **a1 != 46 )\n{\nv13 = 8;\n}\n}\n}\nwhile ( *a1 != a1[1] )\n{\nif ( **a1 <= 47 )\ngoto LABEL_26;\nv3 = 10;\nif ( v13 <= 10 )\nv3 = v13;\nif ( v3 + 47 < **a1 )\n{\nLABEL_26:\nif ( v13 <= 10 || (**a1 <= 96 || **a1 > 102) && (**a1 <= 64 || **a1 > 70) )\nbreak;\n}\nif ( **a1 > 57 )\n{\nif ( **a1 > 70 )\nv2 = **a1 - 87;\nelse\nv2 = **a1 - 55;\n}\nelse\n{\nv2 = **a1 - 48;\n}\nv14 = v13 * v14 + v2;\n++*a1;\n++*((_DWORD *)a1 + 7);\n}\nif ( v14 < 0 || v14 > 255 )\n{\n*(_QWORD *)a2 = &unk_423200;\n**(_DWORD **)(a2 + 8) = v14;\nv12 = 46;\n}\nelse\n{\n*(_QWORD *)a2 = &unk_423280;\n**(_BYTE **)(a2 + 8) = v14;\nv12 = 49;\n}\nif ( *a1 == a1[1] )\nreturn v12;\nif ( **a1 == 108 || **a1 == 76 )\n{\n++*a1;\n++*((_DWORD *)a1 + 7);\nresult = v12;\n}\nelse if ( *a1 != a1[1] && **a1 == 46 )\n{\n*(_QWORD *)a2 = &unk_4233C0;\n++*a1;\n++*((_DWORD *)a1 + 7);\nv10 = 1.0 / (double)v13;\nv11 = (double)v14;\nwhile ( *a1 != a1[1] )\n{\nif ( **a1 <= 47 )\ngoto LABEL_55;\nv6 = 10;\nif ( v13 <= 10 )\nv6 = v13;\nif ( v6 + 47 < **a1 )\n{\nLABEL_55:\nif ( v13 <= 10 || (**a1 <= 96 || **a1 > 102) && (**a1 <= 64 || **a1 > 70) )\nbreak;\n}\nif ( **a1 > 57 )\n{\nif ( **a1 > 70 )\nv5 = (double)(**a1 - 87);\nelse\nv5 = (double)(**a1 - 55);\n}\nelse\n{\nv5 = (double)(**a1 - 48);\n}\nv11 = v5 * v10 + v11;\n++*a1;\n++*((_DWORD *)a1 + 7);\nv10 = v10 / (double)v13;\n}\nif ( *a1 != a1[1] && (**a1 == 101 || **a1 == 69) )\n{\nv9 = 1.0;\n++*a1;\n++*((_DWORD *)a1 + 7);\nif ( *a1 != a1[1] && **a1 == 45 )\n{\nv9 = -1.0;\n++*a1;\n++*((_DWORD *)a1 + 7);\n}\nv15 = 0;\nwhile ( *a1 != a1[1] )\n{\nif ( **a1 <= 47 )\ngoto LABEL_78;\nv8 = 10;\nif ( v13 <= 10 )\nv8 = v13;\nif ( v8 + 47 < **a1 )\n{\nLABEL_78:\nif ( v13 <= 10 || (**a1 <= 96 || **a1 > 102) && (**a1 <= 64 || **a1 > 70) )\nbreak;\n}\nif ( **a1 > 57 )\n{\nif ( **a1 > 70 )\nv7 = (double)(**a1 - 87);\nelse\nv7 = (double)(**a1 - 55);\n}\nelse\n{\nv7 = (double)(**a1 - 48);\n}\nv15 = (int)(v7 + (double)v15 * (double)v13);\n++*a1;\n++*((_DWORD *)a1 + 7);\n}\nv11 = pow((double)v13, (double)v15 * v9) * v11;\n}\n**(double **)(a2 + 8) = v11;\nresult = 47LL;\n}\nelse\n{\nresult = v12;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v9,v10,v11,v12,v13,v14,sub_40552E,]", "hints": "[]", "response": "{'a1': 'Lexer', 'a2': 'Value', 'v9': 'ExponentMultiplier', 'v10': 'FPDiv', 'v11': 'FPResult', 'v12': 'ResultToken', 'v13': 'Base', 'v14': 'Result', 'sub_40552E': 'LexGetNumber'}"}
[ [ 0.769994854927063, 0.7595027685165405, 0.7592292428016663, 0.7492457032203674, 0.7413962483406067, 0.7381162047386169, 0.7300459742546082, 0.7189964056015015, 0.7168676853179932, 0.7158151865005493, 0.7156815528869629, 0.7150646448135376, 0.7095620632171631, 0.7088993191719055, 0.707837700843811, 0.7036810517311096, 0.6906132102012634, 0.6904212236404419, 0.6900488138198853, 0.6881264448165894 ], [ 113586, 241886, 126120, 44577, 10310, 82726, 2015, 182488, 252095, 46418, 217147, 182532, 194836, 36474, 17733, 72157, 35037, 15980, 130989, 106654 ] ]
plist_read_from_filename
52873c6b9518cfb23adf74a2c247ecf59c8a27f0b1b6e037bd573d7f8c4042ed
posixninja
ideviceactivate
NA
int plist_read_from_filename(plist_t *plist, const char *filename) { char *buffer = NULL; uint32_t length; if (filename == NULL) { printf("No filename specified\n"); return -1; } if(buffer_read_from_filename(filename, &buffer, &length) < 0) { printf("Unable to read file\n"); return -1; } if (buffer == NULL) { printf("Buffer returned null\n"); return -1; } if (memcmp(buffer, "bplist00", 8) == 0) { plist_from_bin(buffer, length, plist); } else { plist_from_xml(buffer, length, plist); } free(buffer); return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40395B", "function_addr": 4208987, "binary_name": "52873c6b9518cfb23adf74a2c247ecf59c8a27f0b1b6e037bd573d7f8c4042ed.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+s1], 0"], [6, "cmp [rbp+var_20], 0"], [7, "jnz short loc_40398E"], [8, "mov edi, offset aNoFilenameSpec"], [9, "call _puts"], [10, "mov eax, 0FFFFFFFFh"], [11, "jmp locret_403A2B"], [12, "lea rdx, [rbp+var_C]"], [13, "lea rcx, [rbp+s1]"], [14, "mov rax, [rbp+var_20]"], [15, "mov rsi, rcx"], [16, "mov rdi, rax"], [17, "call sub_40384E"], [18, "test eax, eax"], [19, "jns short loc_4039BA"], [20, "mov edi, offset aUnableToReadFi"], [21, "call _puts"], [22, "mov eax, 0FFFFFFFFh"], [23, "jmp short locret_403A2B"], [24, "mov rax, [rbp+s1]"], [25, "test rax, rax"], [26, "jnz short loc_4039D4"], [27, "mov edi, offset aBufferReturned"], [28, "call _puts"], [29, "mov eax, 0FFFFFFFFh"], [30, "jmp short locret_403A2B"], [31, "mov rax, [rbp+s1]"], [32, "mov edx, 8"], [33, "mov esi, offset aBplist00"], [34, "mov rdi, rax"], [35, "call _memcmp"], [36, "test eax, eax"], [37, "jnz short loc_403A05"], [38, "mov ecx, [rbp+var_C]"], [39, "mov rax, [rbp+s1]"], [40, "mov rdx, [rbp+var_18]"], [41, "mov esi, ecx"], [42, "mov rdi, rax"], [43, "call _plist_from_bin"], [44, "jmp short loc_403A1A"], [45, "mov ecx, [rbp+var_C]"], [46, "mov rax, [rbp+s1]"], [47, "mov rdx, [rbp+var_18]"], [48, "mov esi, ecx"], [49, "mov rdi, rax"], [50, "call _plist_from_xml"], [51, "mov rax, [rbp+s1]"], [52, "mov rdi, rax"], [53, "call _free"], [54, "mov eax, 0"], [55, "leave"], [56, "retn"]], "data_dep": [[6, 4], [7, 6], [13, 5], [14, 4], [15, 13], [16, 14], [18, 17], [19, 18], [24, 5], [25, 24], [26, 25], [31, 5], [34, 31], [36, 35], [37, 36], [39, 5], [40, 3], [41, 38], [42, 39], [46, 5], [47, 3], [48, 45], [49, 46], [51, 5], [52, 51], [56, 10], [56, 22], [56, 54], [56, 29]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/52873c6b9518cfb23adf74a2c247ecf59c8a27f0b1b6e037bd573d7f8c4042ed_52873c6b9518cfb23adf74a2c247ecf59c8a27f0b1b6e037bd573d7f8c4042ed.jsonl.gz", "strip_func_name": "sub_40395B", "query": "\n\n\n__int64 __fastcall sub_40395B(__int64 a1, const char *a2)\n{\n__int64 result; // rax\nint v3; // [rsp+14h] [rbp-Ch] BYREF\nvoid *s1; // [rsp+18h] [rbp-8h] BYREF\n\ns1 = 0LL;\nif ( a2 )\n{\nif ( (int)sub_40384E(a2, &s1, &v3) >= 0 )\n{\nif ( s1 )\n{\nif ( !memcmp(s1, \"bplist00\", 8uLL) )\nplist_from_bin();\nelse\nplist_from_xml();\nfree(s1);\nresult = 0LL;\n}\nelse\n{\nputs(\"Buffer returned null\");\nresult = 0xFFFFFFFFLL;\n}\n}\nelse\n{\nputs(\"Unable to read file\");\nresult = 0xFFFFFFFFLL;\n}\n}\nelse\n{\nputs(\"No filename specified\");\nresult = 0xFFFFFFFFLL;\n}\nreturn result;\n}\n\n\n\nQ:[a2,a1,v3,s1,sub_40395B,sub_40384E,]", "hints": "[]", "response": "{'a2': 'filename', 'a1': 'plist', 'v3': 'length', 's1': 'buffer', 'sub_40395B': 'plist_read_from_filename', 'sub_40384E': 'buffer_read_from_filename'}"}
[ [ 0.7764195203781128, 0.7305436134338379, 0.7144500017166138, 0.7084007263183594, 0.7077935338020325, 0.7016914486885071, 0.698685884475708, 0.6977324485778809, 0.6969798803329468, 0.6956195831298828, 0.693924605846405, 0.6913886666297913, 0.6874071955680847, 0.6864668130874634, 0.6839892268180847, 0.6839720606803894, 0.6822651624679565, 0.6798660755157471, 0.6790868639945984, 0.6777180433273315 ], [ 193702, 261460, 116310, 166370, 29421, 251679, 29131, 114864, 64725, 82573, 227194, 6543, 178322, 24606, 195836, 239784, 191827, 54015, 35222, 167547 ] ]
backscale
bfa1835a8cfa41c6110f4663d2d821bce11bf6fbfb1ac54ccfda804c176264e2
embotech
ecos
NA
void backscale(pwork *w) { idxint i; #if defined EQUILIBRATE && EQUILIBRATE > 0 /* We performed a change of variables on x so this unsets the equilibration */ for( i=0; i < w->n; i++ ){ w->x[i] /= (w->xequil[i] * w->tau); } for( i=0; i < w->p; i++ ){ w->y[i] /= (w->Aequil[i] * w->tau); } for( i=0; i < w->m; i++ ){ w->z[i] /= (w->Gequil[i] * w->tau); } for( i=0; i < w->m; i++ ){ w->s[i] *= (w->Gequil[i] / w->tau); } for( i=0; i < w->n; i++ ){ w->c[i] *= w->xequil[i]; } #else /* standard back scaling without equilibration */ for( i=0; i < w->n; i++ ){ w->x[i] /= w->tau; } for( i=0; i < w->p; i++ ){ w->y[i] /= w->tau; } for( i=0; i < w->m; i++ ){ w->z[i] /= w->tau; } for( i=0; i < w->m; i++ ){ w->s[i] /= w->tau; } #endif }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4057AB", "function_addr": 4216747, "binary_name": "bfa1835a8cfa41c6110f4663d2d821bce11bf6fbfb1ac54ccfda804c176264e2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov [rbp+var_8], 0"], [4, "jmp short loc_40581B"], [5, "mov rax, [rbp+var_18]"], [6, "mov rdx, [rax+20h]"], [7, "mov rax, [rbp+var_8]"], [8, "shl rax, 3"], [9, "add rax, rdx"], [10, "movsd xmm0, qword ptr [rax]"], [11, "mov rax, [rbp+var_18]"], [12, "mov rdx, [rax+118h]"], [13, "mov rax, [rbp+var_8]"], [14, "shl rax, 3"], [15, "add rax, rdx"], [16, "movsd xmm2, qword ptr [rax]"], [17, "mov rax, [rbp+var_18]"], [18, "movsd xmm1, qword ptr [rax+50h]"], [19, "mulsd xmm1, xmm2"], [20, "mov rax, [rbp+var_18]"], [21, "mov rdx, [rax+20h]"], [22, "mov rax, [rbp+var_8]"], [23, "shl rax, 3"], [24, "add rax, rdx"], [25, "divsd xmm0, xmm1"], [26, "movsd qword ptr [rax], xmm0"], [27, "add [rbp+var_8], 1"], [28, "mov rax, [rbp+var_18]"], [29, "mov rax, [rax]"], [30, "cmp [rbp+var_8], rax"], [31, "jl short loc_4057BD"], [32, "mov [rbp+var_8], 0"], [33, "jmp short loc_405890"], [34, "mov rax, [rbp+var_18]"], [35, "mov rdx, [rax+28h]"], [36, "mov rax, [rbp+var_8]"], [37, "shl rax, 3"], [38, "add rax, rdx"], [39, "movsd xmm0, qword ptr [rax]"], [40, "mov rax, [rbp+var_18]"], [41, "mov rdx, [rax+120h]"], [42, "mov rax, [rbp+var_8]"], [43, "shl rax, 3"], [44, "add rax, rdx"], [45, "movsd xmm2, qword ptr [rax]"], [46, "mov rax, [rbp+var_18]"], [47, "movsd xmm1, qword ptr [rax+50h]"], [48, "mulsd xmm1, xmm2"], [49, "mov rax, [rbp+var_18]"], [50, "mov rdx, [rax+28h]"], [51, "mov rax, [rbp+var_8]"], [52, "shl rax, 3"], [53, "add rax, rdx"], [54, "divsd xmm0, xmm1"], [55, "movsd qword ptr [rax], xmm0"], [56, "add [rbp+var_8], 1"], [57, "mov rax, [rbp+var_18]"], [58, "mov rax, [rax+10h]"], [59, "cmp [rbp+var_8], rax"], [60, "jl short loc_405832"], [61, "mov [rbp+var_8], 0"], [62, "jmp short loc_405906"], [63, "mov rax, [rbp+var_18]"], [64, "mov rdx, [rax+30h]"], [65, "mov rax, [rbp+var_8]"], [66, "shl rax, 3"], [67, "add rax, rdx"], [68, "movsd xmm0, qword ptr [rax]"], [69, "mov rax, [rbp+var_18]"], [70, "mov rdx, [rax+128h]"], [71, "mov rax, [rbp+var_8]"], [72, "shl rax, 3"], [73, "add rax, rdx"], [74, "movsd xmm2, qword ptr [rax]"], [75, "mov rax, [rbp+var_18]"], [76, "movsd xmm1, qword ptr [rax+50h]"], [77, "mulsd xmm1, xmm2"], [78, "mov rax, [rbp+var_18]"], [79, "mov rdx, [rax+30h]"], [80, "mov rax, [rbp+var_8]"], [81, "shl rax, 3"], [82, "add rax, rdx"], [83, "divsd xmm0, xmm1"], [84, "movsd qword ptr [rax], xmm0"], [85, "add [rbp+var_8], 1"], [86, "mov rax, [rbp+var_18]"], [87, "mov rax, [rax+8]"], [88, "cmp [rbp+var_8], rax"], [89, "jl short loc_4058A8"], [90, "mov [rbp+var_8], 0"], [91, "jmp short loc_40597C"], [92, "mov rax, [rbp+var_18]"], [93, "mov rdx, [rax+38h]"], [94, "mov rax, [rbp+var_8]"], [95, "shl rax, 3"], [96, "add rax, rdx"], [97, "movsd xmm1, qword ptr [rax]"], [98, "mov rax, [rbp+var_18]"], [99, "mov rdx, [rax+128h]"], [100, "mov rax, [rbp+var_8]"], [101, "shl rax, 3"], [102, "add rax, rdx"], [103, "movsd xmm0, qword ptr [rax]"], [104, "mov rax, [rbp+var_18]"], [105, "movsd xmm2, qword ptr [rax+50h]"], [106, "divsd xmm0, xmm2"], [107, "mov rax, [rbp+var_18]"], [108, "mov rdx, [rax+38h]"], [109, "mov rax, [rbp+var_8]"], [110, "shl rax, 3"], [111, "add rax, rdx"], [112, "mulsd xmm0, xmm1"], [113, "movsd qword ptr [rax], xmm0"], [114, "add [rbp+var_8], 1"], [115, "mov rax, [rbp+var_18]"], [116, "mov rax, [rax+8]"], [117, "cmp [rbp+var_8], rax"], [118, "jl short loc_40591E"], [119, "mov [rbp+var_8], 0"], [120, "jmp short loc_4059EB"], [121, "mov rax, [rbp+var_18]"], [122, "mov rdx, [rax+0F0h]"], [123, "mov rax, [rbp+var_8]"], [124, "shl rax, 3"], [125, "add rax, rdx"], [126, "movsd xmm1, qword ptr [rax]"], [127, "mov rax, [rbp+var_18]"], [128, "mov rdx, [rax+118h]"], [129, "mov rax, [rbp+var_8]"], [130, "shl rax, 3"], [131, "add rax, rdx"], [132, "movsd xmm0, qword ptr [rax]"], [133, "mov rax, [rbp+var_18]"], [134, "mov rdx, [rax+0F0h]"], [135, "mov rax, [rbp+var_8]"], [136, "shl rax, 3"], [137, "add rax, rdx"], [138, "mulsd xmm0, xmm1"], [139, "movsd qword ptr [rax], xmm0"], [140, "add [rbp+var_8], 1"], [141, "mov rax, [rbp+var_18]"], [142, "mov rax, [rax]"], [143, "cmp [rbp+var_8], rax"], [144, "jl short loc_405994"], [145, "nop"], [146, "nop"], [147, "pop rbp"], [148, "retn"]], "data_dep": [[5, 2], [6, 26], [6, 5], [7, 3], [7, 27], [8, 7], [9, 8], [9, 6], [10, 26], [10, 9], [11, 2], [12, 26], [12, 11], [13, 3], [13, 27], [14, 13], [15, 14], [15, 12], [16, 15], [16, 26], [17, 2], [18, 17], [18, 26], [19, 18], [19, 16], [20, 2], [21, 20], [21, 26], [22, 3], [22, 27], [23, 22], [24, 21], [24, 23], [25, 10], [25, 19], [26, 25], [26, 24], [27, 3], [27, 27], [28, 2], [29, 26], [29, 28], [30, 27], [30, 29], [30, 3], [31, 30], [34, 2], [35, 26], [35, 55], [35, 34], [36, 56], [36, 32], [37, 36], [38, 35], [38, 37], [39, 26], [39, 55], [39, 38], [40, 2], [41, 40], [41, 26], [41, 55], [42, 32], [42, 56], [43, 42], [44, 41], [44, 43], [45, 55], [45, 26], [45, 44], [46, 2], [47, 55], [47, 26], [47, 46], [48, 45], [48, 47], [49, 2], [50, 49], [50, 26], [50, 55], [51, 56], [51, 32], [52, 51], [53, 50], [53, 52], [54, 39], [54, 48], [55, 54], [55, 53], [56, 32], [56, 56], [57, 2], [58, 26], [58, 55], [58, 57], [59, 32], [59, 56], [59, 58], [60, 59], [63, 2], [64, 55], [64, 84], [64, 63], [64, 26], [65, 61], [65, 85], [66, 65], [67, 64], [67, 66], [68, 84], [68, 26], [68, 67], [68, 55], [69, 2], [70, 55], [70, 84], [70, 26], [70, 69], [71, 85], [71, 61], [72, 71], [73, 70], [73, 72], [74, 55], [74, 73], [74, 84], [74, 26], [75, 2], [76, 26], [76, 55], [76, 75], [76, 84], [77, 76], [77, 74], [78, 2], [79, 26], [79, 78], [79, 55], [79, 84], [80, 85], [80, 61], [81, 80], [82, 79], [82, 81], [83, 68], [83, 77], [84, 83], [84, 82], [85, 61], [85, 85], [86, 2], [87, 55], [87, 84], [87, 86], [87, 26], [88, 85], [88, 87], [88, 61], [89, 88], [92, 2], [93, 113], [93, 26], [93, 92], [93, 55], [93, 84], [94, 114], [94, 90], [95, 94], [96, 95], [96, 93], [97, 113], [97, 26], [97, 55], [97, 96], [97, 84], [98, 2], [99, 113], [99, 26], [99, 98], [99, 55], [99, 84], [100, 114], [100, 90], [101, 100], [102, 99], [102, 101], [103, 102], [103, 113], [103, 26], [103, 55], [103, 84], [104, 2], [105, 104], [105, 113], [105, 26], [105, 55], [105, 84], [106, 103], [106, 105], [107, 2], [108, 84], [108, 107], [108, 113], [108, 26], [108, 55], [109, 90], [109, 114], [110, 109], [111, 110], [111, 108], [112, 97], [112, 106], [113, 112], [113, 111], [114, 90], [114, 114], [115, 2], [116, 113], [116, 115], [116, 26], [116, 55], [116, 84], [117, 90], [117, 114], [117, 116], [118, 117], [121, 2], [122, 113], [122, 55], [122, 121], [122, 139], [122, 84], [122, 26], [123, 119], [123, 140], [124, 123], [125, 122], [125, 124], [126, 55], [126, 139], [126, 84], [126, 125], [126, 113], [126, 26], [127, 2], [128, 26], [128, 55], [128, 139], [128, 84], [128, 127], [128, 113], [129, 119], [129, 140], [130, 129], [131, 128], [131, 130], [132, 139], [132, 84], [132, 113], [132, 131], [132, 26], [132, 55], [133, 2], [134, 133], [134, 55], [134, 139], [134, 84], [134, 113], [134, 26], [135, 140], [135, 119], [136, 135], [137, 134], [137, 136], [138, 132], [138, 126], [139, 137], [139, 138], [140, 140], [140, 119], [141, 2], [142, 84], [142, 139], [142, 141], [142, 113], [142, 26], [142, 55], [143, 142], [143, 119], [143, 140], [144, 143], [147, 0], [148, 142]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/bfa1835a8cfa41c6110f4663d2d821bce11bf6fbfb1ac54ccfda804c176264e2_bfa1835a8cfa41c6110f4663d2d821bce11bf6fbfb1ac54ccfda804c176264e2.jsonl.gz", "strip_func_name": "sub_4057AB", "query": "\n\n\n__int64 __fastcall sub_4057AB(double *a1)\n{\n__int64 result; // rax\n__int64 i; // [rsp+10h] [rbp-8h]\n__int64 j; // [rsp+10h] [rbp-8h]\n__int64 k; // [rsp+10h] [rbp-8h]\n__int64 l; // [rsp+10h] [rbp-8h]\n__int64 m; // [rsp+10h] [rbp-8h]\n\nfor ( i = 0LL; i < *(_QWORD *)a1; ++i )\n*(double *)(*((_QWORD *)a1 + 4) + 8 * i) = *(double *)(*((_QWORD *)a1 + 4) + 8 * i)\n/ (a1[10]\n* *(double *)(*((_QWORD *)a1 + 35) + 8 * i));\nfor ( j = 0LL; j < *((_QWORD *)a1 + 2); ++j )\n*(double *)(*((_QWORD *)a1 + 5) + 8 * j) = *(double *)(*((_QWORD *)a1 + 5) + 8 * j)\n/ (a1[10]\n* *(double *)(*((_QWORD *)a1 + 36) + 8 * j));\nfor ( k = 0LL; k < *((_QWORD *)a1 + 1); ++k )\n*(double *)(*((_QWORD *)a1 + 6) + 8 * k) = *(double *)(*((_QWORD *)a1 + 6) + 8 * k)\n/ (a1[10]\n* *(double *)(*((_QWORD *)a1 + 37) + 8 * k));\nfor ( l = 0LL; l < *((_QWORD *)a1 + 1); ++l )\n*(double *)(*((_QWORD *)a1 + 7) + 8 * l) = *(double *)(*((_QWORD *)a1 + 37) + 8 * l)\n/ a1[10]\n* *(double *)(*((_QWORD *)a1 + 7) + 8 * l);\nfor ( m = 0LL; ; ++m )\n{\nresult = *(_QWORD *)a1;\nif ( m >= *(_QWORD *)a1 )\nbreak;\n*(double *)(*((_QWORD *)a1 + 30) + 8 * m) = *(double *)(*((_QWORD *)a1 + 35) + 8 * m)\n* *(double *)(*((_QWORD *)a1 + 30) + 8 * m);\n}\nreturn result;\n}\n\n\n\nQ:[a1,m,sub_4057AB,]", "hints": "[]", "response": "{'a1': 'w', 'm': 'ia', 'sub_4057AB': 'backscale'}"}
[ [ 0.7675247192382812, 0.7645087242126465, 0.7622567415237427, 0.7574401497840881, 0.752253532409668, 0.7487806081771851, 0.7448785305023193, 0.7371360659599304, 0.7286280989646912, 0.7282466292381287, 0.7277532815933228, 0.7259427309036255, 0.7235394716262817, 0.7204987406730652, 0.7193787097930908, 0.7119417190551758, 0.7117624878883362, 0.6946786046028137, 0.6929879188537598, 0.6904881000518799 ], [ 182912, 69085, 32607, 193362, 199378, 30099, 255787, 97822, 162230, 254250, 146102, 26467, 24453, 134927, 132415, 117125, 33649, 73104, 231665, 152289 ] ]
dir_sync
cff27d3073f78c7548b51e318e65d7c65f7a9b9495a3bc571d1db8e5b63ad2f1
sraoss
pgsql-ivm
NA
static int dir_sync(Walfile *f) { int r; Assert(f != NULL); clear_error(f->wwmethod); if (!f->wwmethod->sync) return 0; #ifdef HAVE_LIBZ if (f->wwmethod->compression_algorithm == PG_COMPRESSION_GZIP) { if (gzflush(((DirectoryMethodFile *) f)->gzfp, Z_SYNC_FLUSH) != Z_OK) { f->wwmethod->lasterrno = errno; return -1; } } #endif #ifdef USE_LZ4 if (f->wwmethod->compression_algorithm == PG_COMPRESSION_LZ4) { DirectoryMethodFile *df = (DirectoryMethodFile *) f; size_t compressed; /* Flush any internal buffers */ compressed = LZ4F_flush(df->ctx, df->lz4buf, df->lz4bufsize, NULL); if (LZ4F_isError(compressed)) { f->wwmethod->lasterrstring = LZ4F_getErrorName(compressed); return -1; } errno = 0; if (write(df->fd, df->lz4buf, compressed) != compressed) { /* If write didn't set errno, assume problem is no disk space */ f->wwmethod->lasterrno = errno ? errno : ENOSPC; return -1; } } #endif r = fsync(((DirectoryMethodFile *) f)->fd); if (r < 0) f->wwmethod->lasterrno = errno; return r; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40EACB", "function_addr": 4254411, "binary_name": "cff27d3073f78c7548b51e318e65d7c65f7a9b9495a3bc571d1db8e5b63ad2f1.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov rax, [rbp+var_18]"], [5, "mov rax, [rax]"], [6, "mov qword ptr [rax+18h], 0"], [7, "mov rax, [rbp+var_18]"], [8, "mov rax, [rax]"], [9, "mov dword ptr [rax+20h], 0"], [10, "mov rax, [rbp+var_18]"], [11, "mov rax, [rax]"], [12, "movzx eax, byte ptr [rax+10h]"], [13, "xor eax, 1"], [14, "test al, al"], [15, "jz short loc_40EB0D"], [16, "mov eax, 0"], [17, "jmp short locret_40EB78"], [18, "mov rax, [rbp+var_18]"], [19, "mov rax, [rax]"], [20, "mov eax, [rax+8]"], [21, "cmp eax, 1"], [22, "jnz short loc_40EB4D"], [23, "mov rax, [rbp+var_18]"], [24, "mov rax, [rax+30h]"], [25, "mov esi, 2"], [26, "mov rdi, rax"], [27, "call _gzflush"], [28, "test eax, eax"], [29, "jz short loc_40EB4D"], [30, "call ___errno_location"], [31, "mov rdx, [rbp+var_18]"], [32, "mov rdx, [rdx]"], [33, "mov eax, [rax]"], [34, "mov [rdx+20h], eax"], [35, "mov eax, 0FFFFFFFFh"], [36, "jmp short locret_40EB78"], [37, "mov rax, [rbp+var_18]"], [38, "mov eax, [rax+18h]"], [39, "mov edi, eax"], [40, "call _fsync"], [41, "mov [rbp+var_4], eax"], [42, "cmp [rbp+var_4], 0"], [43, "jns short loc_40EB75"], [44, "call ___errno_location"], [45, "mov rdx, [rbp+var_18]"], [46, "mov rdx, [rdx]"], [47, "mov eax, [rax]"], [48, "mov [rdx+20h], eax"], [49, "mov eax, [rbp+var_4]"], [50, "leave"], [51, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 3], [8, 6], [8, 7], [9, 8], [10, 3], [11, 10], [11, 9], [12, 9], [12, 11], [13, 12], [14, 13], [15, 14], [18, 3], [19, 6], [19, 9], [19, 18], [20, 19], [20, 6], [20, 9], [21, 20], [22, 21], [23, 3], [24, 23], [24, 6], [24, 9], [26, 24], [28, 27], [29, 28], [31, 3], [32, 31], [32, 34], [32, 6], [32, 9], [33, 34], [33, 9], [33, 6], [33, 30], [34, 33], [34, 32], [37, 3], [38, 37], [38, 9], [38, 6], [39, 38], [41, 40], [42, 41], [43, 42], [45, 3], [46, 45], [46, 48], [46, 6], [46, 9], [47, 6], [47, 9], [47, 48], [47, 44], [48, 47], [48, 46], [49, 41], [51, 16], [51, 49], [51, 35]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/cff27d3073f78c7548b51e318e65d7c65f7a9b9495a3bc571d1db8e5b63ad2f1_cff27d3073f78c7548b51e318e65d7c65f7a9b9495a3bc571d1db8e5b63ad2f1.jsonl.gz", "strip_func_name": "sub_40EACB", "query": "\n\n\n__int64 __fastcall sub_40EACB(int *a1)\n{\n__int64 result; // rax\nint v2; // [rsp+1Ch] [rbp-4h]\n\n*(_QWORD *)(*(_QWORD *)a1 + 24LL) = 0LL;\n*(_DWORD *)(*(_QWORD *)a1 + 32LL) = 0;\nif ( *(_BYTE *)(*(_QWORD *)a1 + 16LL) != 1 )\nreturn 0LL;\nif ( *(_DWORD *)(*(_QWORD *)a1 + 8LL) == 1 && (unsigned int)gzflush() )\n{\n*(_DWORD *)(*(_QWORD *)a1 + 32LL) = *__errno_location();\nresult = 0xFFFFFFFFLL;\n}\nelse\n{\nv2 = fsync(a1[6]);\nif ( v2 < 0 )\n*(_DWORD *)(*(_QWORD *)a1 + 32LL) = *__errno_location();\nresult = (unsigned int)v2;\n}\nreturn result;\n}\n\n\n\nQ:[a1,v2,sub_40EACB,]", "hints": "[]", "response": "{'a1': 'f', 'v2': 'r', 'sub_40EACB': 'dir_sync'}"}
[ [ 0.7693557739257812, 0.7246226072311401, 0.7242298126220703, 0.7188902497291565, 0.7142954468727112, 0.7124868631362915, 0.712426483631134, 0.7118573188781738, 0.7002277374267578, 0.6941168308258057, 0.6897627115249634, 0.6880144476890564, 0.686737060546875, 0.6860798597335815, 0.6855677962303162, 0.6815834641456604, 0.6782905459403992, 0.6779810190200806, 0.6755011081695557, 0.6729998588562012 ], [ 163014, 240939, 214115, 118821, 48513, 93796, 138464, 38642, 91144, 229855, 102935, 184554, 51796, 229171, 23637, 48579, 143410, 2844, 78278, 87503 ] ]
initialize_fdset
a1cc4128d7c681b1a8556a8cc540f8e1da7b4ca37e41b3137dd814d0dd3bc0f7
krglaws
ShiTTYchat
NA
int initialize_fdset(fd_set* fds) { int max = 0; // zero out socket set FD_ZERO(fds); /* iterate over each client entry, adding each socket to socket set, and also keeping track of highest socket value */ client_entry_t* iterator = client_list; while (iterator) { // get socket from client entry int socket = iterator->socket; // add socket to set FD_SET(socket, fds); // check if current socket is the highest we've seen if (socket > max) max = socket; // get next client entry iterator = iterator->next_entry; } return max; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403A8F", "function_addr": 4209295, "binary_name": "a1cc4128d7c681b1a8556a8cc540f8e1da7b4ca37e41b3137dd814d0dd3bc0f7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_28], rdi"], [3, "mov [rbp+var_4], 0"], [4, "mov rdx, [rbp+var_28]"], [5, "mov eax, 0"], [6, "mov ecx, 10h"], [7, "mov rdi, rdx"], [8, "cld"], [9, "rep stosq"], [10, "mov eax, edi"], [11, "mov edx, ecx"], [12, "mov [rbp+var_14], edx"], [13, "mov [rbp+var_18], eax"], [14, "mov rax, cs:qword_408238"], [15, "mov [rbp+var_10], rax"], [16, "jmp short loc_403B34"], [17, "mov rax, [rbp+var_10]"], [18, "mov eax, [rax]"], [19, "mov [rbp+var_1C], eax"], [20, "mov eax, [rbp+var_1C]"], [21, "lea edx, [rax+3Fh]"], [22, "test eax, eax"], [23, "cmovs eax, edx"], [24, "sar eax, 6"], [25, "mov esi, eax"], [26, "mov rax, [rbp+var_28]"], [27, "movsxd rdx, esi"], [28, "mov rdi, [rax+rdx*8]"], [29, "mov eax, [rbp+var_1C]"], [30, "cdq"], [31, "shr edx, 1Ah"], [32, "add eax, edx"], [33, "and eax, 3Fh"], [34, "sub eax, edx"], [35, "mov edx, 1"], [36, "mov ecx, eax"], [37, "shl rdx, cl"], [38, "mov rax, rdx"], [39, "or rdi, rax"], [40, "mov rcx, rdi"], [41, "mov rax, [rbp+var_28]"], [42, "movsxd rdx, esi"], [43, "mov [rax+rdx*8], rcx"], [44, "mov eax, [rbp+var_1C]"], [45, "cmp eax, [rbp+var_4]"], [46, "jle short loc_403B28"], [47, "mov eax, [rbp+var_1C]"], [48, "mov [rbp+var_4], eax"], [49, "mov rax, [rbp+var_10]"], [50, "mov rax, [rax+48h]"], [51, "mov [rbp+var_10], rax"], [52, "cmp [rbp+var_10], 0"], [53, "jnz short loc_403ACA"], [54, "mov eax, [rbp+var_4]"], [55, "pop rbp"], [56, "retn"]], "data_dep": [[4, 2], [7, 4], [10, 7], [11, 6], [12, 11], [13, 10], [15, 14], [17, 15], [17, 51], [18, 17], [18, 43], [19, 18], [20, 19], [21, 43], [21, 42], [21, 11], [21, 20], [22, 20], [23, 22], [23, 21], [24, 23], [25, 24], [26, 2], [27, 25], [28, 26], [28, 43], [29, 19], [31, 27], [32, 31], [32, 29], [33, 32], [34, 31], [34, 33], [36, 34], [37, 36], [37, 35], [38, 37], [39, 38], [39, 28], [40, 39], [41, 2], [42, 25], [43, 40], [43, 41], [44, 19], [45, 3], [45, 48], [45, 44], [46, 45], [47, 19], [48, 47], [49, 15], [49, 51], [50, 49], [50, 43], [51, 50], [52, 15], [52, 51], [53, 52], [54, 3], [54, 48], [55, 0], [56, 54]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/a1cc4128d7c681b1a8556a8cc540f8e1da7b4ca37e41b3137dd814d0dd3bc0f7_a1cc4128d7c681b1a8556a8cc540f8e1da7b4ca37e41b3137dd814d0dd3bc0f7.jsonl.gz", "strip_func_name": "sub_403A8F", "query": "\n\n\n__int64 __fastcall sub_403A8F(void *a1)\n{\nint v2; // [rsp+Ch] [rbp-1Ch]\n__int64 i; // [rsp+18h] [rbp-10h]\nunsigned int v4; // [rsp+24h] [rbp-4h]\n\nv4 = 0;\nmemset(a1, 0, 0x80uLL);\nfor ( i = qword_408238; i; i = *(_QWORD *)(i + 72) )\n{\nv2 = *(_DWORD *)i;\n*((_QWORD *)a1 + *(_DWORD *)i / 64) |= 1LL << (*(_DWORD *)i % 64);\nif ( v2 > (int)v4 )\nv4 = v2;\n}\nreturn v4;\n}\n\n\n\nQ:[a1,v2,i,v4,sub_403A8F,]", "hints": "[]", "response": "{'a1': 'fds', 'v2': 'socket', 'i': 'iterator', 'v4': 'max', 'sub_403A8F': 'initialize_fdset'}"}
[ [ 0.7616622447967529, 0.7472347021102905, 0.7332533597946167, 0.7297835350036621, 0.7059041857719421, 0.7025236487388611, 0.6964263916015625, 0.6952275037765503, 0.6911602020263672, 0.6894466280937195, 0.6877990961074829, 0.6832367181777954, 0.6825870275497437, 0.6817082762718201, 0.679826557636261, 0.6784855127334595, 0.6769506335258484, 0.675320029258728, 0.673938512802124, 0.6708350777626038 ], [ 112102, 218334, 145736, 12751, 225444, 170747, 155960, 186064, 145043, 152400, 162471, 255, 104262, 224349, 226503, 177684, 41739, 231514, 52658, 180355 ] ]
arm_fir_sparse_init_q15
3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec
gwsystems
sledge-serverless-framework
NA
void arm_fir_sparse_init_q15( arm_fir_sparse_instance_q15 * S, uint16_t numTaps, const q15_t * pCoeffs, q15_t * pState, int32_t * pTapDelay, uint16_t maxDelay, uint32_t blockSize) { /* Assign filter taps */ S->numTaps = numTaps; /* Assign coefficient pointer */ S->pCoeffs = pCoeffs; /* Assign TapDelay pointer */ S->pTapDelay = pTapDelay; /* Assign MaxDelay */ S->maxDelay = maxDelay; /* reset the stateIndex to 0 */ S->stateIndex = 0U; /* Clear state buffer and size is always maxDelay + blockSize */ memset(pState, 0, (maxDelay + blockSize) * sizeof(q15_t)); /* Assign state pointer */ S->pState = pState; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41A98A", "function_addr": 4303242, "binary_name": "3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_8], rdi"], [4, "mov eax, esi"], [5, "mov [rbp+var_18], rdx"], [6, "mov [rbp+s], rcx"], [7, "mov [rbp+var_28], r8"], [8, "mov edx, r9d"], [9, "mov [rbp+var_C], ax"], [10, "mov eax, edx"], [11, "mov [rbp+var_10], ax"], [12, "mov rax, [rbp+var_8]"], [13, "movzx edx, [rbp+var_C]"], [14, "mov [rax], dx"], [15, "mov rax, [rbp+var_8]"], [16, "mov rdx, [rbp+var_18]"], [17, "mov [rax+10h], rdx"], [18, "mov rax, [rbp+var_8]"], [19, "mov rdx, [rbp+var_28]"], [20, "mov [rax+20h], rdx"], [21, "mov rax, [rbp+var_8]"], [22, "movzx edx, [rbp+var_10]"], [23, "mov [rax+18h], dx"], [24, "mov rax, [rbp+var_8]"], [25, "mov word ptr [rax+2], 0"], [26, "movzx edx, [rbp+var_10]"], [27, "mov eax, [rbp+arg_0]"], [28, "add eax, edx"], [29, "mov eax, eax"], [30, "lea rdx, [rax+rax]"], [31, "mov rax, [rbp+s]"], [32, "mov esi, 0"], [33, "mov rdi, rax"], [34, "call _memset"], [35, "mov rax, [rbp+var_8]"], [36, "mov rdx, [rbp+s]"], [37, "mov [rax+8], rdx"], [38, "nop"], [39, "leave"], [40, "retn"]], "data_dep": [[9, 4], [10, 8], [11, 10], [12, 3], [13, 9], [14, 13], [14, 12], [15, 3], [16, 5], [17, 15], [17, 16], [18, 3], [19, 7], [20, 19], [20, 18], [21, 3], [22, 11], [23, 22], [23, 21], [24, 3], [25, 24], [26, 11], [28, 27], [28, 26], [29, 28], [30, 26], [30, 29], [30, 25], [31, 6], [33, 31], [35, 3], [36, 6], [37, 36], [37, 35], [40, 35]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec_3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.jsonl.gz", "strip_func_name": "sub_41A98A", "query": "\n\n\n__int64 __fastcall sub_41A98A(__int64 a1, __int16 a2, __int64 a3, void *a4, __int64 a5, unsigned __int16 a6, int a7)\n{\n__int64 result; // rax\n\n*(_WORD *)a1 = a2;\n*(_QWORD *)(a1 + 16) = a3;\n*(_QWORD *)(a1 + 32) = a5;\n*(_WORD *)(a1 + 24) = a6;\n*(_WORD *)(a1 + 2) = 0;\nmemset(a4, 0, 2LL * ((unsigned int)a6 + a7));\nresult = a1;\n*(_QWORD *)(a1 + 8) = a4;\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,a7,sub_41A98A,]", "hints": "[]", "response": "{'a3': 'pCoeffs', 'a4': 'pState', 'a1': 'S', 'a2': 'numTaps', 'a5': 'pTapDelay', 'a6': 'maxDelay', 'a7': 'blockSize', 'sub_41A98A': 'arm_fir_sparse_init_q15'}"}
[ [ 0.7940425276756287, 0.7939225435256958, 0.7927167415618896, 0.7825666069984436, 0.7776205539703369, 0.7765325307846069, 0.7631371021270752, 0.7602137327194214, 0.7565539479255676, 0.7549018263816833, 0.7529627680778503, 0.7332277894020081, 0.7320188283920288, 0.7318047285079956, 0.7304276823997498, 0.7293072938919067, 0.727735161781311, 0.7257012128829956, 0.7251054048538208, 0.7231799364089966 ], [ 49594, 16622, 51763, 231859, 63055, 87541, 114585, 151101, 83690, 678, 19230, 77969, 140777, 3753, 196808, 255481, 181109, 213065, 166874, 84837 ] ]
umx_strupr
3b4e7c8e571dbef1cc467f13d9cc9a00673bdbf51ee147e786798355742589c4
sezero
mikmod
NA
static void umx_strupr(char *str) { while (*str) { if (*str >= 'a' && *str <= 'z') { *str -= ('a' - 'A'); } str++; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4018D5", "function_addr": 4200661, "binary_name": "3b4e7c8e571dbef1cc467f13d9cc9a00673bdbf51ee147e786798355742589c4.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "jmp short loc_40190C"], [4, "mov rax, [rbp+var_8]"], [5, "movzx eax, byte ptr [rax]"], [6, "cmp al, 60h "], [7, "jle short loc_401907"], [8, "mov rax, [rbp+var_8]"], [9, "movzx eax, byte ptr [rax]"], [10, "cmp al, 7Ah "], [11, "jg short loc_401907"], [12, "mov rax, [rbp+var_8]"], [13, "movzx eax, byte ptr [rax]"], [14, "sub eax, 20h "], [15, "mov edx, eax"], [16, "mov rax, [rbp+var_8]"], [17, "mov [rax], dl"], [18, "add [rbp+var_8], 1"], [19, "mov rax, [rbp+var_8]"], [20, "movzx eax, byte ptr [rax]"], [21, "test al, al"], [22, "jnz short loc_4018DF"], [23, "nop"], [24, "nop"], [25, "pop rbp"], [26, "retn"]], "data_dep": [[4, 18], [4, 2], [5, 4], [5, 17], [6, 5], [7, 6], [8, 18], [8, 2], [9, 8], [9, 17], [10, 9], [11, 10], [12, 18], [12, 2], [13, 17], [13, 12], [14, 13], [15, 14], [16, 18], [16, 2], [17, 15], [17, 16], [18, 18], [18, 2], [19, 18], [19, 2], [20, 17], [20, 19], [21, 20], [22, 21], [25, 0], [26, 21]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/3b4e7c8e571dbef1cc467f13d9cc9a00673bdbf51ee147e786798355742589c4_3b4e7c8e571dbef1cc467f13d9cc9a00673bdbf51ee147e786798355742589c4.jsonl.gz", "strip_func_name": "sub_4018D5", "query": "\n\n\n__int64 __fastcall sub_4018D5(char *a1)\n{\n__int64 result; // rax\n\nwhile ( 1 )\n{\nresult = (unsigned __int8)*a1;\nif ( !(_BYTE)result )\nbreak;\nif ( *a1 > 96 && *a1 <= 122 )\n*a1 -= 32;\n++a1;\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_4018D5,]", "hints": "[]", "response": "{'a1': 'str', 'sub_4018D5': 'umx_strupr'}"}
[ [ 0.8801180720329285, 0.8660897016525269, 0.8078783750534058, 0.8000782132148743, 0.7852757573127747, 0.7461237907409668, 0.7443874478340149, 0.7391574382781982, 0.7337522506713867, 0.7297334671020508, 0.7290760278701782, 0.7283425331115723, 0.7200535535812378, 0.7141149044036865, 0.713934600353241, 0.7119029760360718, 0.7102401256561279, 0.7102252244949341, 0.7096883058547974, 0.7092787027359009 ], [ 85171, 151325, 63128, 66907, 255021, 211833, 39653, 185748, 50540, 132900, 78498, 182157, 226402, 222610, 21665, 190041, 18798, 127842, 224204, 212621 ] ]
btrace_add_file
e8b52afc8f8a001a9a17e3d4277c8c64aab1466decaced621dfe69e627063149
axboe
fio
NA
static int btrace_add_file(struct btrace_pid *p, uint32_t devno) { unsigned int maj = FMAJOR(devno); unsigned int min = FMINOR(devno); struct trace_file *f; unsigned int i; char dev[256]; if (filename) return 0; if (p->last_major == maj && p->last_minor == min) return 0; p->last_major = maj; p->last_minor = min; /* * check for this file in our list */ for (i = 0; i < p->nr_files; i++) { f = &p->files[i]; if (f->major == maj && f->minor == min) return 0; } strcpy(dev, "/dev"); if (!blktrace_lookup_device(NULL, dev, maj, min)) { log_err("fio: failed to find device %u/%u\n", maj, min); if (!output_ascii) { log_err("fio: use -d to specify device\n"); return 1; } return 0; } p->files = realloc(p->files, (p->nr_files + 1) * sizeof(*f)); f = &p->files[p->nr_files]; f->name = strdup(dev); f->major = maj; f->minor = min; p->nr_files++; return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402A97", "function_addr": 4205207, "binary_name": "e8b52afc8f8a001a9a17e3d4277c8c64aab1466decaced621dfe69e627063149.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 130h"], [3, "mov [rbp+var_128], rdi"], [4, "mov [rbp+var_12C], esi"], [5, "mov eax, [rbp+var_12C]"], [6, "shr eax, 14h"], [7, "mov [rbp+var_8], eax"], [8, "mov eax, [rbp+var_12C]"], [9, "and eax, 0FFFFFh"], [10, "mov [rbp+var_C], eax"], [11, "mov rax, cs:qword_40A1A8"], [12, "test rax, rax"], [13, "jz short loc_402ADF"], [14, "mov eax, 0"], [15, "jmp locret_402C8D"], [16, "mov rax, [rbp+var_128]"], [17, "mov eax, [rax+44h]"], [18, "cmp [rbp+var_8], eax"], [19, "jnz short loc_402B07"], [20, "mov rax, [rbp+var_128]"], [21, "mov eax, [rax+48h]"], [22, "cmp [rbp+var_C], eax"], [23, "jnz short loc_402B07"], [24, "mov eax, 0"], [25, "jmp locret_402C8D"], [26, "mov rax, [rbp+var_128]"], [27, "mov edx, [rbp+var_8]"], [28, "mov [rax+44h], edx"], [29, "mov rax, [rbp+var_128]"], [30, "mov edx, [rbp+var_C]"], [31, "mov [rax+48h], edx"], [32, "mov [rbp+var_4], 0"], [33, "jmp short loc_402B69"], [34, "mov rax, [rbp+var_128]"], [35, "mov rdx, [rax+38h]"], [36, "mov eax, [rbp+var_4]"], [37, "shl rax, 4"], [38, "add rax, rdx"], [39, "mov [rbp+var_18], rax"], [40, "mov rax, [rbp+var_18]"], [41, "mov eax, [rax+8]"], [42, "cmp [rbp+var_8], eax"], [43, "jnz short loc_402B65"], [44, "mov rax, [rbp+var_18]"], [45, "mov eax, [rax+0Ch]"], [46, "cmp [rbp+var_C], eax"], [47, "jnz short loc_402B65"], [48, "mov eax, 0"], [49, "jmp locret_402C8D"], [50, "add [rbp+var_4], 1"], [51, "mov rax, [rbp+var_128]"], [52, "mov eax, [rax+40h]"], [53, "cmp [rbp+var_4], eax"], [54, "jb short loc_402B2A"], [55, "lea rax, [rbp+s]"], [56, "mov dword ptr [rax], 7665642Fh"], [57, "mov byte ptr [rax+4], 0"], [58, "mov ecx, [rbp+var_C]"], [59, "mov edx, [rbp+var_8]"], [60, "lea rax, [rbp+s]"], [61, "mov rsi, rax"], [62, "mov edi, 0"], [63, "call blktrace_lookup_device"], [64, "test eax, eax"], [65, "jnz short loc_402BEB"], [66, "mov edx, [rbp+var_C]"], [67, "mov eax, [rbp+var_8]"], [68, "mov esi, eax"], [69, "mov edi, offset aFioFailedToFin"], [70, "mov eax, 0"], [71, "call log_err"], [72, "mov eax, cs:dword_40A12C"], [73, "test eax, eax"], [74, "jnz short loc_402BE1"], [75, "mov edi, offset aFioUseDToSpeci"], [76, "mov eax, 0"], [77, "call log_err"], [78, "mov eax, 1"], [79, "jmp locret_402C8D"], [80, "mov eax, 0"], [81, "jmp locret_402C8D"], [82, "mov rax, [rbp+var_128]"], [83, "mov eax, [rax+40h]"], [84, "add eax, 1"], [85, "cdqe"], [86, "shl rax, 4"], [87, "mov rdx, rax"], [88, "mov rax, [rbp+var_128]"], [89, "mov rax, [rax+38h]"], [90, "mov rsi, rdx"], [91, "mov rdi, rax"], [92, "call _realloc"], [93, "mov rdx, [rbp+var_128]"], [94, "mov [rdx+38h], rax"], [95, "mov rax, [rbp+var_128]"], [96, "mov rdx, [rax+38h]"], [97, "mov rax, [rbp+var_128]"], [98, "mov eax, [rax+40h]"], [99, "cdqe"], [100, "shl rax, 4"], [101, "add rax, rdx"], [102, "mov [rbp+var_18], rax"], [103, "lea rax, [rbp+s]"], [104, "mov rdi, rax"], [105, "call _strdup"], [106, "mov rdx, rax"], [107, "mov rax, [rbp+var_18]"], [108, "mov [rax], rdx"], [109, "mov edx, [rbp+var_8]"], [110, "mov rax, [rbp+var_18]"], [111, "mov [rax+8], edx"], [112, "mov edx, [rbp+var_C]"], [113, "mov rax, [rbp+var_18]"], [114, "mov [rax+0Ch], edx"], [115, "mov rax, [rbp+var_128]"], [116, "mov eax, [rax+40h]"], [117, "lea edx, [rax+1]"], [118, "mov rax, [rbp+var_128]"], [119, "mov [rax+40h], edx"], [120, "mov eax, 0"], [121, "leave"], [122, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [8, 4], [9, 8], [10, 9], [12, 11], [13, 12], [16, 3], [17, 16], [18, 17], [18, 7], [19, 18], [20, 3], [21, 20], [22, 10], [22, 21], [23, 22], [26, 3], [27, 7], [28, 27], [28, 26], [29, 3], [30, 10], [31, 29], [31, 30], [34, 3], [35, 28], [35, 34], [35, 31], [36, 50], [36, 32], [37, 36], [38, 35], [38, 37], [39, 38], [40, 39], [41, 40], [41, 31], [41, 28], [42, 41], [42, 7], [43, 42], [44, 39], [45, 28], [45, 31], [45, 44], [46, 45], [46, 10], [47, 46], [50, 32], [50, 50], [51, 3], [52, 51], [52, 28], [52, 31], [53, 32], [53, 50], [53, 52], [54, 53], [55, 52], [56, 55], [57, 55], [58, 10], [59, 7], [60, 55], [61, 60], [64, 63], [65, 64], [66, 10], [67, 7], [68, 67], [73, 72], [74, 73], [82, 3], [83, 94], [83, 119], [83, 82], [83, 57], [83, 114], [83, 111], [83, 56], [83, 31], [83, 108], [83, 28], [84, 83], [86, 84], [87, 86], [88, 3], [89, 111], [89, 56], [89, 31], [89, 88], [89, 108], [89, 28], [89, 94], [89, 119], [89, 57], [89, 114], [90, 87], [91, 89], [93, 3], [94, 93], [94, 92], [95, 3], [96, 95], [96, 94], [97, 3], [98, 94], [98, 97], [100, 98], [101, 96], [101, 100], [102, 101], [103, 101], [104, 103], [106, 105], [107, 102], [108, 107], [108, 106], [109, 7], [110, 102], [111, 110], [111, 109], [112, 10], [113, 102], [114, 113], [114, 112], [115, 3], [116, 115], [116, 114], [117, 112], [117, 114], [117, 116], [118, 3], [119, 118], [119, 117], [122, 48], [122, 14], [122, 78], [122, 80], [122, 24], [122, 120]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/e8b52afc8f8a001a9a17e3d4277c8c64aab1466decaced621dfe69e627063149_e8b52afc8f8a001a9a17e3d4277c8c64aab1466decaced621dfe69e627063149.jsonl.gz", "strip_func_name": "sub_402A97", "query": "\n\n\n__int64 __fastcall sub_402A97(__int64 a1, unsigned int a2)\n{\n__int64 result; // rax\nint v3; // ecx\nint v4; // er8\nint v5; // er9\nunsigned int v6; // esi\nint v7; // edx\nint v8; // ecx\nint v9; // er8\nint v10; // er9\nchar *v11; // rax\nchar s[264]; // [rsp+10h] [rbp-120h] BYREF\n__int64 v13; // [rsp+118h] [rbp-18h]\nunsigned int v14; // [rsp+124h] [rbp-Ch]\nunsigned int v15; // [rsp+128h] [rbp-8h]\nunsigned int i; // [rsp+12Ch] [rbp-4h]\n\nv15 = a2 >> 20;\nv14 = a2 & 0xFFFFF;\nif ( qword_40A1A8 )\nreturn 0LL;\nif ( v15 == *(_DWORD *)(a1 + 68) && v14 == *(_DWORD *)(a1 + 72) )\nreturn 0LL;\n*(_DWORD *)(a1 + 68) = v15;\n*(_DWORD *)(a1 + 72) = v14;\nfor ( i = 0; i < *(_DWORD *)(a1 + 64); ++i )\n{\nv13 = *(_QWORD *)(a1 + 56) + 16LL * i;\nif ( v15 == *(_DWORD *)(v13 + 8) && v14 == *(_DWORD *)(v13 + 12) )\nreturn 0LL;\n}\nstrcpy(s, \"/dev\");\nif ( (unsigned int)blktrace_lookup_device(0LL, s, v15, v14) )\n{\n*(_QWORD *)(a1 + 56) = realloc(*(void **)(a1 + 56), 16LL * (*(_DWORD *)(a1 + 64) + 1));\nv13 = *(_QWORD *)(a1 + 56) + 16LL * *(int *)(a1 + 64);\nv11 = strdup(s);\n*(_QWORD *)v13 = v11;\n*(_DWORD *)(v13 + 8) = v15;\n*(_DWORD *)(v13 + 12) = v14;\n++*(_DWORD *)(a1 + 64);\nresult = 0LL;\n}\nelse\n{\nv6 = v15;\nlog_err((unsigned int)\"fio: failed to find device %u/%u\\n\", v15, v14, v3, v4, v5);\nif ( dword_40A12C )\n{\nresult = 0LL;\n}\nelse\n{\nlog_err((unsigned int)\"fio: use -d to specify device\\n\", v6, v7, v8, v9, v10);\nresult = 1LL;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v11,v6,s,v13,v14,sub_402A97,]", "hints": "[]", "response": "{'a1': 'p', 'a2': 'devno', 'v11': 'result', 'v6': 'devno', 's': 'dev', 'v13': 'f', 'v14': 'min', 'sub_402A97': 'btrace_add_file'}"}
[ [ 0.7646837830543518, 0.7546484470367432, 0.7544037103652954, 0.7325170040130615, 0.7305106520652771, 0.7134402990341187, 0.7094641923904419, 0.7021794319152832, 0.7008301615715027, 0.6938880085945129, 0.6922600269317627, 0.6922255754470825, 0.6906266212463379, 0.6899138689041138, 0.6893222332000732, 0.6870591640472412, 0.6858605742454529, 0.6841196417808533, 0.6825845241546631, 0.6796289086341858 ], [ 179934, 134539, 10589, 4695, 227775, 61743, 101930, 161464, 6339, 253997, 40996, 193819, 193540, 226594, 1104, 206332, 229806, 188157, 220771, 250450 ] ]
adpcm_pcm_mix_driver_alloc_buffers
9394a363835b85c27ad15b9a680cf720a2040e4a3bbc8f4e6ee5218516ca9a3f
vampirefrog
mdxtools
NA
static int adpcm_pcm_mix_driver_alloc_buffers(struct adpcm_pcm_mix_driver *driver, int buf_size) { if(driver->buf_size != buf_size) { driver->buf_size = buf_size; // TODO: error checking driver->decode_buf = realloc(driver->decode_buf, driver->buf_size * sizeof(*driver->decode_buf)); driver->decode_resample_buf = realloc(driver->decode_resample_buf, driver->buf_size * sizeof(*driver->decode_resample_buf)); driver->mix_buf_l = realloc(driver->mix_buf_l, driver->buf_size * sizeof(*driver->mix_buf_l)); driver->mix_buf_r = realloc(driver->mix_buf_r, driver->buf_size * sizeof(*driver->mix_buf_r)); if(!driver->decode_buf || !driver->decode_resample_buf || !driver->mix_buf_l || !driver->mix_buf_r) return 1; } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402EA3", "function_addr": 4206243, "binary_name": "9394a363835b85c27ad15b9a680cf720a2040e4a3bbc8f4e6ee5218516ca9a3f.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 eax, [rax+238h]"], [7, "cmp [rbp+var_C], eax"], [8, "jz loc_402FED"], [9, "mov rax, [rbp+var_8]"], [10, "mov edx, [rbp+var_C]"], [11, "mov [rax+238h], edx"], [12, "mov rax, [rbp+var_8]"], [13, "mov eax, [rax+238h]"], [14, "cdqe"], [15, "lea rdx, ds:0[rax*4]"], [16, "mov rax, [rbp+var_8]"], [17, "mov rax, [rax+218h]"], [18, "mov rsi, rdx"], [19, "mov rdi, rax"], [20, "call _realloc"], [21, "mov rdx, [rbp+var_8]"], [22, "mov [rdx+218h], rax"], [23, "mov rax, [rbp+var_8]"], [24, "mov eax, [rax+238h]"], [25, "cdqe"], [26, "lea rdx, ds:0[rax*4]"], [27, "mov rax, [rbp+var_8]"], [28, "mov rax, [rax+220h]"], [29, "mov rsi, rdx"], [30, "mov rdi, rax"], [31, "call _realloc"], [32, "mov rdx, [rbp+var_8]"], [33, "mov [rdx+220h], rax"], [34, "mov rax, [rbp+var_8]"], [35, "mov eax, [rax+238h]"], [36, "cdqe"], [37, "lea rdx, ds:0[rax*4]"], [38, "mov rax, [rbp+var_8]"], [39, "mov rax, [rax+228h]"], [40, "mov rsi, rdx"], [41, "mov rdi, rax"], [42, "call _realloc"], [43, "mov rdx, [rbp+var_8]"], [44, "mov [rdx+228h], rax"], [45, "mov rax, [rbp+var_8]"], [46, "mov eax, [rax+238h]"], [47, "cdqe"], [48, "lea rdx, ds:0[rax*4]"], [49, "mov rax, [rbp+var_8]"], [50, "mov rax, [rax+230h]"], [51, "mov rsi, rdx"], [52, "mov rdi, rax"], [53, "call _realloc"], [54, "mov rdx, [rbp+var_8]"], [55, "mov [rdx+230h], rax"], [56, "mov rax, [rbp+var_8]"], [57, "mov rax, [rax+218h]"], [58, "test rax, rax"], [59, "jz short loc_402FE6"], [60, "mov rax, [rbp+var_8]"], [61, "mov rax, [rax+220h]"], [62, "test rax, rax"], [63, "jz short loc_402FE6"], [64, "mov rax, [rbp+var_8]"], [65, "mov rax, [rax+228h]"], [66, "test rax, rax"], [67, "jz short loc_402FE6"], [68, "mov rax, [rbp+var_8]"], [69, "mov rax, [rax+230h]"], [70, "test rax, rax"], [71, "jnz short loc_402FED"], [72, "mov eax, 1"], [73, "jmp short locret_402FF2"], [74, "mov eax, 0"], [75, "leave"], [76, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 4], [7, 6], [8, 7], [9, 3], [10, 4], [11, 9], [11, 10], [12, 3], [13, 12], [13, 11], [15, 10], [16, 3], [17, 16], [17, 11], [18, 15], [19, 17], [21, 3], [22, 21], [22, 20], [23, 3], [24, 23], [24, 11], [24, 22], [26, 21], [27, 3], [28, 27], [28, 22], [29, 26], [30, 28], [32, 3], [33, 31], [33, 32], [34, 3], [35, 33], [35, 11], [35, 34], [37, 32], [38, 3], [39, 33], [39, 38], [40, 37], [41, 39], [43, 3], [44, 42], [44, 43], [45, 3], [46, 11], [46, 45], [46, 44], [48, 43], [49, 3], [50, 49], [50, 44], [51, 48], [52, 50], [54, 3], [55, 54], [55, 53], [56, 3], [57, 56], [57, 55], [58, 57], [59, 58], [60, 3], [61, 22], [61, 33], [61, 44], [61, 60], [61, 55], [61, 11], [62, 61], [63, 62], [64, 3], [65, 33], [65, 44], [65, 55], [65, 64], [65, 11], [65, 22], [66, 65], [67, 66], [68, 3], [69, 22], [69, 33], [69, 44], [69, 55], [69, 11], [69, 68], [70, 69], [71, 70], [76, 72], [76, 74]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/9394a363835b85c27ad15b9a680cf720a2040e4a3bbc8f4e6ee5218516ca9a3f_9394a363835b85c27ad15b9a680cf720a2040e4a3bbc8f4e6ee5218516ca9a3f.jsonl.gz", "strip_func_name": "sub_402EA3", "query": "\n\n\n_BOOL8 __fastcall sub_402EA3(__int64 a1, int a2)\n{\n_BOOL8 result; // rax\n\nresult = 0;\nif ( a2 != *(_DWORD *)(a1 + 568) )\n{\n*(_DWORD *)(a1 + 568) = a2;\n*(_QWORD *)(a1 + 536) = realloc(*(void **)(a1 + 536), 4LL * *(int *)(a1 + 568));\n*(_QWORD *)(a1 + 544) = realloc(*(void **)(a1 + 544), 4LL * *(int *)(a1 + 568));\n*(_QWORD *)(a1 + 552) = realloc(*(void **)(a1 + 552), 4LL * *(int *)(a1 + 568));\n*(_QWORD *)(a1 + 560) = realloc(*(void **)(a1 + 560), 4LL * *(int *)(a1 + 568));\nif ( !*(_QWORD *)(a1 + 536) || !*(_QWORD *)(a1 + 544) || !*(_QWORD *)(a1 + 552) || !*(_QWORD *)(a1 + 560) )\nresult = 1;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_402EA3,]", "hints": "[]", "response": "{'a1': 'driver', 'a2': 'buf_size', 'sub_402EA3': 'adpcm_pcm_mix_driver_alloc_buffers'}"}
[ [ 0.7357668876647949, 0.7313423156738281, 0.7258925437927246, 0.7254177331924438, 0.7249585390090942, 0.7234593629837036, 0.7220459580421448, 0.7157636880874634, 0.7148146033287048, 0.7134352922439575, 0.7134349346160889, 0.7102468609809875, 0.7082381248474121, 0.7082101702690125, 0.7054648995399475, 0.7029070258140564, 0.7021880149841309, 0.7008684873580933, 0.6968907117843628, 0.6958458423614502 ], [ 55150, 93407, 29380, 41160, 257134, 179424, 66887, 245583, 159760, 29917, 165994, 111418, 151340, 140840, 143186, 78167, 166170, 55399, 69818, 34559 ] ]
ins_member
7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807
arendst
Tasmota
NA
static int ins_member(bvm *vm, int index, const char *k, bbool onlyins) { int type = BE_NIL; bvalue *o = be_indexof(vm, index); bvalue *top = be_incrtop(vm); var_setnil(top); if (var_isinstance(o)) { binstance *obj = var_toobj(o); type = be_instance_member(vm, obj, be_newstr(vm, k), top); } else if (var_isclass(o) && !onlyins) { bclass *cl = var_toobj(o); type = be_class_member(vm, cl, be_newstr(vm, k), top); } else if (var_ismodule(o) && !onlyins) { bmodule *module = var_toobj(o); type = be_module_attr(vm, module, be_newstr(vm, k), top); } return type == BE_NONE ? BE_NIL : type; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_410954", "function_addr": 4262228, "binary_name": "7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807.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_48], rdx"], [6, "mov eax, ecx"], [7, "mov [rbp+var_40], al"], [8, "mov [rbp+var_4], 0"], [9, "mov edx, [rbp+var_3C]"], [10, "mov rax, [rbp+var_38]"], [11, "mov esi, edx"], [12, "mov rdi, rax"], [13, "call be_indexof"], [14, "mov [rbp+var_10], rax"], [15, "mov rax, [rbp+var_38]"], [16, "mov rax, [rax+0B8h]"], [17, "lea rcx, [rax+10h]"], [18, "mov rdx, [rbp+var_38]"], [19, "mov [rdx+0B8h], rcx"], [20, "mov [rbp+var_18], rax"], [21, "mov rax, [rbp+var_18]"], [22, "mov dword ptr [rax+8], 0"], [23, "mov rax, [rbp+var_10]"], [24, "mov eax, [rax+8]"], [25, "and al, 7Fh"], [26, "cmp eax, 12h"], [27, "jnz short loc_410A02"], [28, "mov rax, [rbp+var_10]"], [29, "mov rax, [rax]"], [30, "mov [rbp+var_30], rax"], [31, "mov rdx, [rbp+var_48]"], [32, "mov rax, [rbp+var_38]"], [33, "mov rsi, rdx"], [34, "mov rdi, rax"], [35, "call be_newstr"], [36, "mov rdi, rax"], [37, "mov rdx, [rbp+var_18]"], [38, "mov rsi, [rbp+var_30]"], [39, "mov rax, [rbp+var_38]"], [40, "mov rcx, rdx"], [41, "mov rdx, rdi"], [42, "mov rdi, rax"], [43, "call be_instance_member"], [44, "mov [rbp+var_4], eax"], [45, "jmp loc_410AB2"], [46, "mov rax, [rbp+var_10]"], [47, "mov eax, [rax+8]"], [48, "and al, 7Fh"], [49, "cmp eax, 11h"], [50, "jnz short loc_410A5B"], [51, "movzx eax, [rbp+var_40]"], [52, "xor eax, 1"], [53, "test al, al"], [54, "jz short loc_410A5B"], [55, "mov rax, [rbp+var_10]"], [56, "mov rax, [rax]"], [57, "mov [rbp+var_20], rax"], [58, "mov rdx, [rbp+var_48]"], [59, "mov rax, [rbp+var_38]"], [60, "mov rsi, rdx"], [61, "mov rdi, rax"], [62, "call be_newstr"], [63, "mov rdi, rax"], [64, "mov rdx, [rbp+var_18]"], [65, "mov rsi, [rbp+var_20]"], [66, "mov rax, [rbp+var_38]"], [67, "mov rcx, rdx"], [68, "mov rdx, rdi"], [69, "mov rdi, rax"], [70, "call be_class_member"], [71, "mov [rbp+var_4], eax"], [72, "jmp short loc_410AB2"], [73, "mov rax, [rbp+var_10]"], [74, "mov eax, [rax+8]"], [75, "and al, 7Fh"], [76, "cmp eax, 16h"], [77, "jnz short loc_410AB2"], [78, "movzx eax, [rbp+var_40]"], [79, "xor eax, 1"], [80, "test al, al"], [81, "jz short loc_410AB2"], [82, "mov rax, [rbp+var_10]"], [83, "mov rax, [rax]"], [84, "mov [rbp+var_28], rax"], [85, "mov rdx, [rbp+var_48]"], [86, "mov rax, [rbp+var_38]"], [87, "mov rsi, rdx"], [88, "mov rdi, rax"], [89, "call be_newstr"], [90, "mov rdi, rax"], [91, "mov rdx, [rbp+var_18]"], [92, "mov rsi, [rbp+var_28]"], [93, "mov rax, [rbp+var_38]"], [94, "mov rcx, rdx"], [95, "mov rdx, rdi"], [96, "mov rdi, rax"], [97, "call be_module_attr"], [98, "mov [rbp+var_4], eax"], [99, "cmp [rbp+var_4], 0FFFFFF00h"], [100, "jz short loc_410AC0"], [101, "mov eax, [rbp+var_4]"], [102, "jmp short locret_410AC5"], [103, "mov eax, 0"], [104, "leave"], [105, "retn"]], "data_dep": [[7, 6], [9, 4], [10, 3], [11, 9], [12, 10], [14, 13], [15, 3], [16, 15], [17, 16], [18, 3], [19, 18], [19, 17], [20, 16], [21, 20], [22, 21], [23, 14], [24, 23], [24, 22], [25, 24], [26, 25], [27, 26], [28, 14], [29, 22], [29, 19], [29, 28], [30, 29], [31, 5], [32, 3], [33, 31], [34, 32], [36, 35], [37, 20], [38, 30], [39, 3], [40, 37], [41, 36], [42, 39], [44, 43], [46, 14], [47, 22], [47, 19], [47, 46], [48, 47], [49, 48], [50, 49], [51, 7], [52, 51], [53, 52], [54, 53], [55, 14], [56, 19], [56, 55], [56, 22], [57, 56], [58, 5], [59, 3], [60, 58], [61, 59], [63, 62], [64, 20], [65, 57], [66, 3], [67, 64], [68, 63], [69, 66], [71, 70], [73, 14], [74, 73], [74, 22], [74, 19], [75, 74], [76, 75], [77, 76], [78, 7], [79, 78], [80, 79], [81, 80], [82, 14], [83, 82], [83, 22], [83, 19], [84, 83], [85, 5], [86, 3], [87, 85], [88, 86], [90, 89], [91, 20], [92, 84], [93, 3], [94, 91], [95, 90], [96, 93], [98, 97], [99, 8], [99, 44], [99, 71], [99, 98], [100, 99], [101, 44], [101, 71], [101, 98], [101, 8], [105, 101], [105, 103]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807_7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807.jsonl.gz", "strip_func_name": "sub_410954", "query": "\n\n\n__int64 __fastcall sub_410954(__int64 a1, unsigned int a2, __int64 a3, char a4)\n{\n__int64 v4; // rax\n__int64 v5; // rax\nint v6; // eax\n__int64 v7; // rax\nint v8; // eax\n__int64 v9; // rax\n__int64 result; // rax\n__int64 v13; // [rsp+20h] [rbp-30h]\n__int64 v14; // [rsp+28h] [rbp-28h]\n__int64 v15; // [rsp+30h] [rbp-20h]\n__int64 v16; // [rsp+38h] [rbp-18h]\n__int64 v17; // [rsp+40h] [rbp-10h]\nunsigned int v18; // [rsp+4Ch] [rbp-4h]\n\nv18 = 0;\nv17 = be_indexof(a1, a2);\nv4 = *(_QWORD *)(a1 + 184);\n*(_QWORD *)(a1 + 184) = v4 + 16;\nv16 = v4;\n*(_DWORD *)(v4 + 8) = 0;\nLODWORD(v4) = *(_DWORD *)(v17 + 8);\nLOBYTE(v4) = v4 & 0x7F;\nif ( (_DWORD)v4 == 18 )\n{\nv13 = *(_QWORD *)v17;\nv5 = be_newstr(a1, a3);\nv18 = be_instance_member(a1, v13, v5, v16);\n}\nelse\n{\nv6 = *(_DWORD *)(v17 + 8);\nLOBYTE(v6) = v6 & 0x7F;\nif ( v6 == 17 && a4 != 1 )\n{\nv15 = *(_QWORD *)v17;\nv7 = be_newstr(a1, a3);\nv18 = be_class_member(a1, v15, v7, v16);\n}\nelse\n{\nv8 = *(_DWORD *)(v17 + 8);\nLOBYTE(v8) = v8 & 0x7F;\nif ( v8 == 22 && a4 != 1 )\n{\nv14 = *(_QWORD *)v17;\nv9 = be_newstr(a1, a3);\nv18 = be_module_attr(a1, v14, v9, v16);\n}\n}\n}\nif ( v18 == -256 )\nresult = 0LL;\nelse\nresult = v18;\nreturn result;\n}\n\n\n\nQ:[a4,a1,a2,v13,v14,v15,v16,v17,v18,sub_410954,]", "hints": "[]", "response": "{'a4': 'onlyins', 'a1': 'vm', 'a2': 'index', 'v13': 'obj', 'v14': 'module', 'v15': 'cl_0', 'v16': 'top', 'v17': 'o', 'v18': 'type', 'sub_410954': 'ins_member'}"}
[ [ 0.7848367094993591, 0.7265489101409912, 0.7257972955703735, 0.7084530591964722, 0.7013160586357117, 0.6891365051269531, 0.6811089515686035, 0.679393470287323, 0.6783658862113953, 0.664406955242157, 0.6633563041687012, 0.6627816557884216, 0.6624568700790405, 0.6621777415275574, 0.6614869236946106, 0.6590662002563477, 0.6590204834938049, 0.6561827659606934, 0.6559524536132812, 0.6545315980911255 ], [ 67632, 237277, 30279, 114633, 16495, 257904, 169576, 168775, 34356, 207562, 64213, 1248, 27842, 208036, 230901, 13697, 180623, 6159, 59399, 27041 ] ]
gravity_hash_insert
b2b6239f41efcd906cff8a967b6680bd1e1b9f4105564fc6f50ab0c84f5f6e97
marcobambini
gravity
NA
bool gravity_hash_insert (gravity_hash_t *hashtable, gravity_value_t key, gravity_value_t value) { if (hashtable->count >= GRAVITYHASH_MAXENTRIES) return false; register uint32_t hash = hashtable->compute_fn(key); register uint32_t position = hash % hashtable->size; hash_node_t *node = hashtable->nodes[position]; if (node) INC_COLLISION(hashtable); // check if the key is already in the table while (node) { if ((node->hash == hash) && (hashtable->isequal_fn(key, node->key))) { node->value = value; return false; } node = node->next; } // resize table if the threshold is exceeded // default threshold is: <table size> * <load factor GRAVITYHASH_THRESHOLD> if (hashtable->count >= hashtable->size * GRAVITYHASH_THRESHOLD) { if (gravity_hash_resize(hashtable) == -1) return false; // recompute position here because hashtable->size has changed! position = hash % hashtable->size; } // allocate new entry and set new data if (!(node = mem_alloc(NULL, sizeof(hash_node_t)))) return false; node->key = key; node->hash = hash; node->value = value; node->next = hashtable->nodes[position]; hashtable->nodes[position] = node; ++hashtable->count; return true; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_450EB3", "function_addr": 4525747, "binary_name": "b2b6239f41efcd906cff8a967b6680bd1e1b9f4105564fc6f50ab0c84f5f6e97.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r12"], [3, "push rbx"], [4, "sub rsp, 40h"], [5, "mov [rbp+var_28], rdi"], [6, "mov rax, rsi"], [7, "mov rsi, rdx"], [8, "mov rdx, rsi"], [9, "mov [rbp+var_40], rax"], [10, "mov [rbp+var_38], rdx"], [11, "mov rax, rcx"], [12, "mov rcx, r8"], [13, "mov rdx, rcx"], [14, "mov [rbp+var_50], rax"], [15, "mov [rbp+var_48], rdx"], [16, "mov rax, [rbp+var_28]"], [17, "mov eax, [rax+4]"], [18, "cmp eax, 3FFFFFFFh"], [19, "jbe short loc_450EFC"], [20, "mov eax, 0"], [21, "jmp loc_451101"], [22, "mov rax, [rbp+var_28]"], [23, "mov rcx, [rax+10h]"], [24, "mov rdx, [rbp+var_40]"], [25, "mov rax, [rbp+var_38]"], [26, "mov rdi, rdx"], [27, "mov rsi, rax"], [28, "call rcx"], [29, "mov ebx, eax"], [30, "mov rax, [rbp+var_28]"], [31, "mov ecx, [rax]"], [32, "mov eax, ebx"], [33, "mov edx, 0"], [34, "div ecx"], [35, "mov r12d, edx"], [36, "mov rax, [rbp+var_28]"], [37, "mov rdx, [rax+8]"], [38, "mov eax, r12d"], [39, "shl rax, 3"], [40, "add rax, rdx"], [41, "mov rax, [rax]"], [42, "mov [rbp+var_18], rax"], [43, "cmp [rbp+var_18], 0"], [44, "jz short loc_450FB8"], [45, "mov rax, [rbp+var_28]"], [46, "mov eax, [rax+30h]"], [47, "lea edx, [rax+1]"], [48, "mov rax, [rbp+var_28]"], [49, "mov [rax+30h], edx"], [50, "jmp short loc_450FB8"], [51, "mov rax, [rbp+var_18]"], [52, "mov eax, [rax]"], [53, "cmp ebx, eax"], [54, "jnz short loc_450FAC"], [55, "mov rax, [rbp+var_28]"], [56, "mov r8, [rax+18h]"], [57, "mov rax, [rbp+var_18]"], [58, "mov rdx, [rax+10h]"], [59, "mov rax, [rax+8]"], [60, "mov rdi, [rbp+var_40]"], [61, "mov rsi, [rbp+var_38]"], [62, "mov rcx, rdx"], [63, "mov rdx, rax"], [64, "call r8"], [65, "test al, al"], [66, "jz short loc_450FAC"], [67, "mov rcx, [rbp+var_18]"], [68, "mov rax, [rbp+var_50]"], [69, "mov rdx, [rbp+var_48]"], [70, "mov [rcx+18h], rax"], [71, "mov [rcx+20h], rdx"], [72, "mov eax, 0"], [73, "jmp loc_451101"], [74, "mov rax, [rbp+var_18]"], [75, "mov rax, [rax+28h]"], [76, "mov [rbp+var_18], rax"], [77, "cmp [rbp+var_18], 0"], [78, "jnz short loc_450F5B"], [79, "mov rax, [rbp+var_28]"], [80, "mov eax, [rax+4]"], [81, "mov eax, eax"], [82, "test rax, rax"], [83, "js short loc_450FD8"], [84, "pxor xmm0, xmm0"], [85, "cvtsi2sd xmm0, rax"], [86, "jmp short loc_450FF1"], [87, "mov rdx, rax"], [88, "shr rdx, 1"], [89, "and eax, 1"], [90, "or rdx, rax"], [91, "pxor xmm0, xmm0"], [92, "cvtsi2sd xmm0, rdx"], [93, "addsd xmm0, xmm0"], [94, "mov rax, [rbp+var_28]"], [95, "mov eax, [rax]"], [96, "mov eax, eax"], [97, "test rax, rax"], [98, "js short loc_451009"], [99, "pxor xmm1, xmm1"], [100, "cvtsi2sd xmm1, rax"], [101, "jmp short loc_451022"], [102, "mov rdx, rax"], [103, "shr rdx, 1"], [104, "and eax, 1"], [105, "or rdx, rax"], [106, "pxor xmm1, xmm1"], [107, "cvtsi2sd xmm1, rdx"], [108, "addsd xmm1, xmm1"], [109, "movsd xmm2, cs:qword_46E678"], [110, "mulsd xmm1, xmm2"], [111, "comisd xmm0, xmm1"], [112, "jb short loc_451061"], [113, "mov rax, [rbp+var_28]"], [114, "mov rdi, rax"], [115, "call sub_450B96"], [116, "cmp eax, 0FFFFFFFFh"], [117, "jnz short loc_45104F"], [118, "mov eax, 0"], [119, "jmp loc_451101"], [120, "mov rax, [rbp+var_28]"], [121, "mov ecx, [rax]"], [122, "mov eax, ebx"], [123, "mov edx, 0"], [124, "div ecx"], [125, "mov r12d, edx"], [126, "mov edx, 30h "], [127, "mov esi, 1"], [128, "mov edi, 0"], [129, "call sub_45067F"], [130, "mov [rbp+var_18], rax"], [131, "cmp [rbp+var_18], 0"], [132, "jnz short loc_451087"], [133, "mov eax, 0"], [134, "jmp short loc_451101"], [135, "mov rcx, [rbp+var_18]"], [136, "mov rax, [rbp+var_40]"], [137, "mov rdx, [rbp+var_38]"], [138, "mov [rcx+8], rax"], [139, "mov [rcx+10h], rdx"], [140, "mov rax, [rbp+var_18]"], [141, "mov [rax], ebx"], [142, "mov rcx, [rbp+var_18]"], [143, "mov rax, [rbp+var_50]"], [144, "mov rdx, [rbp+var_48]"], [145, "mov [rcx+18h], rax"], [146, "mov [rcx+20h], rdx"], [147, "mov rax, [rbp+var_28]"], [148, "mov rdx, [rax+8]"], [149, "mov eax, r12d"], [150, "shl rax, 3"], [151, "add rax, rdx"], [152, "mov rdx, [rax]"], [153, "mov rax, [rbp+var_18]"], [154, "mov [rax+28h], rdx"], [155, "mov rax, [rbp+var_28]"], [156, "mov rax, [rax+8]"], [157, "mov edx, r12d"], [158, "shl rdx, 3"], [159, "add rdx, rax"], [160, "mov rax, [rbp+var_18]"], [161, "mov [rdx], rax"], [162, "mov rax, [rbp+var_28]"], [163, "mov eax, [rax+4]"], [164, "lea edx, [rax+1]"], [165, "mov rax, [rbp+var_28]"], [166, "mov [rax+4], edx"], [167, "mov eax, 1"], [168, "add rsp, 40h"], [169, "pop rbx"], [170, "pop r12"], [171, "pop rbp"], [172, "retn"]], "data_dep": [[8, 7], [9, 6], [10, 8], [13, 12], [14, 11], [15, 13], [16, 5], [17, 16], [18, 17], [19, 18], [22, 5], [23, 22], [24, 9], [25, 10], [26, 24], [27, 25], [28, 23], [29, 28], [30, 5], [31, 30], [32, 29], [34, 31], [35, 33], [36, 5], [37, 36], [38, 35], [39, 38], [40, 37], [40, 39], [41, 40], [42, 41], [43, 42], [44, 43], [45, 5], [46, 45], [47, 37], [47, 46], [48, 5], [49, 48], [49, 47], [51, 42], [51, 76], [52, 49], [52, 51], [53, 52], [53, 29], [54, 53], [55, 5], [56, 55], [56, 49], [57, 42], [57, 76], [58, 49], [58, 57], [59, 57], [59, 49], [60, 9], [61, 10], [62, 58], [63, 59], [64, 56], [65, 64], [66, 65], [67, 42], [67, 76], [68, 14], [69, 15], [70, 68], [70, 67], [71, 67], [71, 69], [74, 42], [74, 76], [75, 74], [75, 49], [76, 75], [77, 76], [77, 42], [78, 77], [79, 5], [80, 49], [80, 79], [81, 80], [82, 81], [83, 82], [85, 82], [85, 84], [87, 82], [88, 87], [89, 82], [90, 88], [90, 89], [92, 90], [92, 91], [93, 92], [94, 5], [95, 49], [95, 94], [96, 95], [97, 96], [98, 97], [100, 97], [100, 99], [102, 97], [103, 102], [104, 97], [105, 104], [105, 103], [107, 106], [107, 105], [108, 107], [110, 109], [110, 108], [110, 100], [111, 110], [111, 85], [111, 93], [112, 97], [112, 105], [113, 5], [114, 113], [116, 115], [117, 116], [120, 5], [121, 120], [121, 49], [122, 29], [124, 121], [125, 123], [130, 129], [131, 130], [132, 131], [135, 130], [136, 9], [137, 10], [138, 135], [138, 136], [139, 135], [139, 137], [140, 130], [141, 140], [141, 29], [142, 130], [143, 14], [144, 15], [145, 142], [145, 143], [146, 142], [146, 144], [147, 5], [148, 147], [148, 146], [149, 125], [149, 35], [150, 149], [151, 148], [151, 150], [152, 151], [152, 146], [152, 141], [153, 130], [154, 153], [154, 152], [155, 5], [156, 154], [156, 155], [157, 125], [157, 35], [158, 157], [159, 156], [159, 158], [160, 130], [161, 159], [161, 160], [162, 5], [163, 161], [163, 162], [164, 159], [164, 161], [164, 163], [165, 5], [166, 165], [166, 164], [168, 4], [169, 3], [170, 2], [171, 0], [172, 20], [172, 118], [172, 72], [172, 133], [172, 167]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/b2b6239f41efcd906cff8a967b6680bd1e1b9f4105564fc6f50ab0c84f5f6e97_b2b6239f41efcd906cff8a967b6680bd1e1b9f4105564fc6f50ab0c84f5f6e97.jsonl.gz", "strip_func_name": "sub_450EB3", "query": "\n\n\n__int64 __fastcall sub_450EB3(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5)\n{\nunsigned int v6; // ebx\n__int64 v7; // r12\n__int64 v11; // [rsp+38h] [rbp-18h]\n_QWORD *v12; // [rsp+38h] [rbp-18h]\n\nif ( *(_DWORD *)(a1 + 4) > 0x3FFFFFFFu )\nreturn 0LL;\nv6 = (*(__int64 (__fastcall **)(__int64, __int64))(a1 + 16))(a2, a3);\nv7 = v6 % *(_DWORD *)a1;\nv11 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8 * v7);\nif ( v11 )\n++*(_DWORD *)(a1 + 48);\nwhile ( v11 )\n{\nif ( v6 == *(_DWORD *)v11\n&& (*(unsigned __int8 (__fastcall **)(__int64, __int64, _QWORD, _QWORD))(a1 + 24))(\na2,\na3,\n*(_QWORD *)(v11 + 8),\n*(_QWORD *)(v11 + 16)) )\n{\n*(_QWORD *)(v11 + 24) = a4;\n*(_QWORD *)(v11 + 32) = a5;\nreturn 0LL;\n}\nv11 = *(_QWORD *)(v11 + 40);\n}\nif ( (double)*(int *)(a1 + 4) >= (double)*(int *)a1 * 0.75 )\n{\nif ( (unsigned int)sub_450B96(a1) == -1 )\nreturn 0LL;\nLODWORD(v7) = v6 % *(_DWORD *)a1;\n}\nv12 = sub_45067F(0LL, 1uLL, 0x30uLL);\nif ( !v12 )\nreturn 0LL;\nv12[1] = a2;\nv12[2] = a3;\n*(_DWORD *)v12 = v6;\nv12[3] = a4;\nv12[4] = a5;\nv12[5] = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL * (unsigned int)v7);\n*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL * (unsigned int)v7) = v12;\n++*(_DWORD *)(a1 + 4);\nreturn 1LL;\n}\n\n\n\nQ:[a4,a1,a2,v12,sub_450EB3,sub_450B96,sub_45067F,]", "hints": "[]", "response": "{'a4': 'value', 'a1': 'hashtable', 'a2': 'key', 'v12': 'nodea', 'sub_450EB3': 'gravity_hash_insert', 'sub_450B96': 'gravity_hash_resize', 'sub_45067F': 'gravity_calloc'}"}
[ [ 0.7910287380218506, 0.7037668228149414, 0.7021355032920837, 0.6976735591888428, 0.6884748339653015, 0.6734336614608765, 0.6725713014602661, 0.664621114730835, 0.6619400978088379, 0.6546998023986816, 0.6512980461120605, 0.6489442586898804, 0.6476262807846069, 0.6471180319786072, 0.6464166641235352, 0.6429980993270874, 0.639778196811676, 0.6387640237808228, 0.6367985606193542, 0.6325013041496277 ], [ 164113, 205485, 118724, 45834, 247218, 220423, 211006, 208923, 84083, 88893, 166383, 264156, 70729, 251550, 112660, 185356, 211696, 211099, 8032, 98433 ] ]
printEmptyVoice
14455c1f8e954666d031e3d3906846cc9efe882f67e65fd2c6e4ead1f92595ec
vampirefrog
mdxtools
NA
void printEmptyVoice(int num) { printf("@:%d no Name %d\r\n", num, num); printf("LFO: 0 0 0 0 0\r\n"); printf("CH: 64 0 0 0 0 64 0\r\n"); printf("M1: 31 0 0 4 0 0 0 1 0 0 0\r\n"); printf("C1: 31 0 0 4 0 0 0 1 0 0 0\r\n"); printf("M2: 31 0 0 4 0 0 0 1 0 0 0\r\n"); printf("C2: 31 0 0 4 0 0 0 1 0 0 0\r\n"); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40217D", "function_addr": 4202877, "binary_name": "14455c1f8e954666d031e3d3906846cc9efe882f67e65fd2c6e4ead1f92595ec.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_4], edi"], [4, "mov edx, [rbp+var_4]"], [5, "mov eax, [rbp+var_4]"], [6, "mov esi, eax"], [7, "mov edi, offset aDNoNameD"], [8, "mov eax, 0"], [9, "call _printf"], [10, "mov edi, offset aLfo00000"], [11, "call _puts"], [12, "mov edi, offset aCh640000640"], [13, "call _puts"], [14, "mov edi, offset aM1310040001000"], [15, "call _puts"], [16, "mov edi, offset aC1310040001000"], [17, "call _puts"], [18, "mov edi, offset aM2310040001000"], [19, "call _puts"], [20, "mov edi, offset aC2310040001000"], [21, "call _puts"], [22, "nop"], [23, "leave"], [24, "retn"]], "data_dep": [[4, 3], [5, 3], [6, 5], [24, 21]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/14455c1f8e954666d031e3d3906846cc9efe882f67e65fd2c6e4ead1f92595ec_14455c1f8e954666d031e3d3906846cc9efe882f67e65fd2c6e4ead1f92595ec.jsonl.gz", "strip_func_name": "sub_40217D", "query": "\n\n\nint __fastcall sub_40217D(unsigned int a1)\n{\nprintf(\"@:%d no Name %d\\r\\n\", a1, a1);\nputs(\"LFO: 0 0 0 0 0\\r\");\nputs(\"CH: 64 0 0 0 0 64 0\\r\");\nputs(\"M1: 31 0 0 4 0 0 0 1 0 0 0\\r\");\nputs(\"C1: 31 0 0 4 0 0 0 1 0 0 0\\r\");\nputs(\"M2: 31 0 0 4 0 0 0 1 0 0 0\\r\");\nreturn puts(\"C2: 31 0 0 4 0 0 0 1 0 0 0\\r\");\n}\n\n\n\nQ:[a1,sub_40217D,]", "hints": "[]", "response": "{'a1': 'num', 'sub_40217D': 'printEmptyVoice'}"}
[ [ 0.8976143002510071, 0.8484512567520142, 0.8193162083625793, 0.8098354935646057, 0.8082171678543091, 0.8082171678543091, 0.8038747310638428, 0.8027915954589844, 0.8026495575904846, 0.7983365654945374, 0.798177182674408, 0.7970598936080933, 0.7953953146934509, 0.7910082340240479, 0.7898122072219849, 0.789078950881958, 0.7886762619018555, 0.7858442068099976, 0.7835618257522583, 0.7833883166313171 ], [ 72395, 187271, 112815, 242990, 10673, 6269, 156021, 242320, 227204, 160068, 83063, 231584, 155180, 136759, 131150, 35768, 175725, 175978, 201619, 66355 ] ]
relocate_area
aeb8f877645222af4b18d656ffba4acd16fb2773a7c764a123fc8855a08b4ac1
KnightOS
scas
NA
void relocate_area(area_t *area, uint64_t address, bool immediates) { scas_log(L_DEBUG, "Assigning final address %08X to area %s", address, area->name); area->final_address = address; for (unsigned int i = 0; i < area->symbols->length; ++i) { symbol_t *sym = area->symbols->items[i]; if (sym->type != SYMBOL_LABEL) { continue; } sym->defined_address += address; sym->value += address; } for (unsigned i = 0; immediates && i < area->late_immediates->length; ++i) { late_immediate_t *imm = area->late_immediates->items[i]; imm->address += address; imm->instruction_address += address; imm->base_address += address; } for (unsigned i = 0; immediates && i < area->source_map->length; ++i) { source_map_t *map = area->source_map->items[i]; for (unsigned int j = 0; j < map->entries->length; ++j) { source_map_entry_t *entry = map->entries->items[j]; entry->address += address; } } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40F3D2", "function_addr": 4256722, "binary_name": "aeb8f877645222af4b18d656ffba4acd16fb2773a7c764a123fc8855a08b4ac1.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_40], rsi"], [5, "mov eax, edx"], [6, "mov [rbp+var_44], al"], [7, "mov rax, [rbp+var_38]"], [8, "mov rdx, [rax]"], [9, "mov rax, [rbp+var_40]"], [10, "mov rcx, rdx"], [11, "mov rdx, rax"], [12, "mov esi, offset aAssigningFinal_0"], [13, "mov edi, 3"], [14, "mov eax, 0"], [15, "call sub_40B08E"], [16, "mov rax, [rbp+var_38]"], [17, "mov rdx, [rbp+var_40]"], [18, "mov [rax+40h], rdx"], [19, "mov [rbp+var_4], 0"], [20, "jmp short loc_40F47D"], [21, "mov rax, [rbp+var_38]"], [22, "mov rax, [rax+10h]"], [23, "mov rdx, [rax+8]"], [24, "mov eax, [rbp+var_4]"], [25, "shl rax, 3"], [26, "add rax, rdx"], [27, "mov rax, [rax]"], [28, "mov [rbp+var_30], rax"], [29, "mov rax, [rbp+var_30]"], [30, "mov eax, [rax]"], [31, "test eax, eax"], [32, "jnz short loc_40F478"], [33, "mov rax, [rbp+var_30]"], [34, "mov rdx, [rax+18h]"], [35, "mov rax, [rbp+var_40]"], [36, "add rdx, rax"], [37, "mov rax, [rbp+var_30]"], [38, "mov [rax+18h], rdx"], [39, "mov rax, [rbp+var_30]"], [40, "mov rdx, [rax+10h]"], [41, "mov rax, [rbp+var_40]"], [42, "add rdx, rax"], [43, "mov rax, [rbp+var_30]"], [44, "mov [rax+10h], rdx"], [45, "jmp short loc_40F479"], [46, "nop"], [47, "add [rbp+var_4], 1"], [48, "mov rax, [rbp+var_38]"], [49, "mov rax, [rax+10h]"], [50, "mov eax, [rax+4]"], [51, "cmp [rbp+var_4], eax"], [52, "jb short loc_40F421"], [53, "mov [rbp+var_8], 0"], [54, "jmp short loc_40F4FC"], [55, "mov rax, [rbp+var_38]"], [56, "mov rax, [rax+8]"], [57, "mov rdx, [rax+8]"], [58, "mov eax, [rbp+var_8]"], [59, "shl rax, 3"], [60, "add rax, rdx"], [61, "mov rax, [rax]"], [62, "mov [rbp+var_18], rax"], [63, "mov rax, [rbp+var_18]"], [64, "mov rdx, [rax+10h]"], [65, "mov rax, [rbp+var_40]"], [66, "add rdx, rax"], [67, "mov rax, [rbp+var_18]"], [68, "mov [rax+10h], rdx"], [69, "mov rax, [rbp+var_18]"], [70, "mov rdx, [rax+18h]"], [71, "mov rax, [rbp+var_40]"], [72, "add rdx, rax"], [73, "mov rax, [rbp+var_18]"], [74, "mov [rax+18h], rdx"], [75, "mov rax, [rbp+var_18]"], [76, "mov rdx, [rax+20h]"], [77, "mov rax, [rbp+var_40]"], [78, "add rdx, rax"], [79, "mov rax, [rbp+var_18]"], [80, "mov [rax+20h], rdx"], [81, "add [rbp+var_8], 1"], [82, "cmp [rbp+var_44], 0"], [83, "jz short loc_40F512"], [84, "mov rax, [rbp+var_38]"], [85, "mov rax, [rax+8]"], [86, "mov eax, [rax+4]"], [87, "cmp [rbp+var_8], eax"], [88, "jb short loc_40F496"], [89, "mov [rbp+var_C], 0"], [90, "jmp short loc_40F58D"], [91, "mov rax, [rbp+var_38]"], [92, "mov rax, [rax+18h]"], [93, "mov rdx, [rax+8]"], [94, "mov eax, [rbp+var_C]"], [95, "shl rax, 3"], [96, "add rax, rdx"], [97, "mov rax, [rax]"], [98, "mov [rbp+var_20], rax"], [99, "mov [rbp+var_10], 0"], [100, "jmp short loc_40F579"], [101, "mov rax, [rbp+var_20]"], [102, "mov rax, [rax+8]"], [103, "mov rdx, [rax+8]"], [104, "mov eax, [rbp+var_10]"], [105, "shl rax, 3"], [106, "add rax, rdx"], [107, "mov rax, [rax]"], [108, "mov [rbp+var_28], rax"], [109, "mov rax, [rbp+var_28]"], [110, "mov rdx, [rax+8]"], [111, "mov rax, [rbp+var_40]"], [112, "add rdx, rax"], [113, "mov rax, [rbp+var_28]"], [114, "mov [rax+8], rdx"], [115, "add [rbp+var_10], 1"], [116, "mov rax, [rbp+var_20]"], [117, "mov rax, [rax+8]"], [118, "mov eax, [rax+4]"], [119, "cmp [rbp+var_10], eax"], [120, "jb short loc_40F541"], [121, "add [rbp+var_C], 1"], [122, "cmp [rbp+var_44], 0"], [123, "jz short loc_40F5A7"], [124, "mov rax, [rbp+var_38]"], [125, "mov rax, [rax+18h]"], [126, "mov eax, [rax+4]"], [127, "cmp [rbp+var_C], eax"], [128, "jb loc_40F51B"], [129, "nop"], [130, "leave"], [131, "retn"]], "data_dep": [[6, 5], [7, 3], [8, 7], [9, 4], [10, 8], [11, 9], [16, 3], [17, 4], [18, 17], [18, 16], [21, 3], [22, 44], [22, 21], [22, 18], [22, 38], [23, 38], [23, 22], [23, 44], [23, 18], [24, 19], [24, 47], [25, 24], [26, 23], [26, 25], [27, 38], [27, 26], [27, 44], [27, 18], [28, 27], [29, 28], [30, 18], [30, 29], [30, 38], [30, 44], [31, 30], [32, 31], [33, 28], [34, 18], [34, 38], [34, 33], [34, 44], [35, 4], [36, 34], [36, 35], [37, 28], [38, 36], [38, 37], [39, 28], [40, 38], [40, 44], [40, 39], [41, 4], [42, 41], [42, 40], [43, 28], [44, 42], [44, 43], [47, 47], [47, 19], [48, 3], [49, 18], [49, 48], [49, 38], [49, 44], [50, 38], [50, 49], [50, 44], [50, 18], [51, 50], [51, 47], [51, 19], [52, 51], [55, 3], [56, 74], [56, 80], [56, 55], [56, 18], [56, 68], [56, 38], [56, 44], [57, 68], [57, 38], [57, 56], [57, 44], [57, 74], [57, 80], [57, 18], [58, 81], [58, 53], [59, 58], [60, 57], [60, 59], [61, 38], [61, 44], [61, 74], [61, 60], [61, 80], [61, 18], [61, 68], [62, 61], [63, 62], [64, 80], [64, 18], [64, 68], [64, 63], [64, 38], [64, 44], [64, 74], [65, 4], [66, 64], [66, 65], [67, 62], [68, 66], [68, 67], [69, 62], [70, 68], [70, 38], [70, 74], [70, 69], [71, 4], [72, 70], [72, 71], [73, 62], [74, 73], [74, 72], [75, 62], [76, 74], [76, 80], [76, 75], [77, 4], [78, 77], [78, 76], [79, 62], [80, 78], [80, 79], [81, 81], [81, 53], [82, 6], [83, 82], [84, 3], [85, 18], [85, 84], [85, 68], [85, 38], [85, 44], [85, 74], [85, 80], [86, 38], [86, 74], [86, 44], [86, 85], [86, 80], [86, 18], [86, 68], [87, 86], [87, 81], [87, 53], [88, 87], [91, 3], [92, 44], [92, 74], [92, 80], [92, 18], [92, 114], [92, 68], [92, 91], [92, 38], [93, 68], [93, 38], [93, 74], [93, 44], [93, 92], [93, 114], [93, 80], [93, 18], [94, 89], [94, 121], [95, 94], [96, 95], [96, 93], [97, 38], [97, 74], [97, 44], [97, 96], [97, 80], [97, 18], [97, 114], [97, 68], [98, 97], [101, 98], [102, 80], [102, 18], [102, 114], [102, 68], [102, 38], [102, 74], [102, 44], [102, 101], [103, 38], [103, 102], [103, 74], [103, 44], [103, 80], [103, 18], [103, 114], [103, 68], [104, 115], [104, 99], [105, 104], [106, 103], [106, 105], [107, 106], [107, 44], [107, 80], [107, 18], [107, 114], [107, 68], [107, 38], [107, 74], [108, 107], [109, 108], [110, 38], [110, 68], [110, 109], [110, 74], [110, 44], [110, 114], [110, 80], [110, 18], [111, 4], [112, 111], [112, 110], [113, 108], [114, 113], [114, 112], [115, 115], [115, 99], [116, 98], [117, 44], [117, 80], [117, 18], [117, 114], [117, 68], [117, 116], [117, 38], [117, 74], [118, 44], [118, 117], [118, 80], [118, 18], [118, 114], [118, 68], [118, 38], [118, 74], [119, 118], [119, 115], [119, 99], [120, 119], [121, 89], [121, 121], [122, 6], [123, 122], [124, 3], [125, 18], [125, 114], [125, 68], [125, 38], [125, 124], [125, 44], [125, 74], [125, 80], [126, 114], [126, 80], [126, 18], [126, 38], [126, 68], [126, 125], [126, 74], [126, 44], [127, 126], [127, 89], [127, 121], [128, 127], [131, 79], [131, 118], [131, 86], [131, 126], [131, 50]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/aeb8f877645222af4b18d656ffba4acd16fb2773a7c764a123fc8855a08b4ac1_aeb8f877645222af4b18d656ffba4acd16fb2773a7c764a123fc8855a08b4ac1.jsonl.gz", "strip_func_name": "sub_40F3D2", "query": "\n\n\n_QWORD *__fastcall sub_40F3D2(__int64 *a1, __int64 a2, char a3, __int64 a4, __int64 a5, __int64 a6)\n{\n_QWORD *result; // rax\n__int64 v8; // [rsp+20h] [rbp-30h]\n__int64 v9; // [rsp+28h] [rbp-28h]\n__int64 v10; // [rsp+30h] [rbp-20h]\n_QWORD *v11; // [rsp+38h] [rbp-18h]\nunsigned int l; // [rsp+40h] [rbp-10h]\nunsigned int k; // [rsp+44h] [rbp-Ch]\nunsigned int j; // [rsp+48h] [rbp-8h]\nunsigned int i; // [rsp+4Ch] [rbp-4h]\n\nsub_40B08E(3u, \"Assigning final address %08X to area %s\", a2, *a1, a5, a6);\na1[8] = a2;\nfor ( i = 0; ; ++i )\n{\nresult = (_QWORD *)*(unsigned int *)(a1[2] + 4);\nif ( i >= (unsigned int)result )\nbreak;\nv8 = *(_QWORD *)(*(_QWORD *)(a1[2] + 8) + 8LL * i);\nif ( !*(_DWORD *)v8 )\n{\n*(_QWORD *)(v8 + 24) += a2;\n*(_QWORD *)(v8 + 16) += a2;\n}\n}\nfor ( j = 0; a3; ++j )\n{\nresult = (_QWORD *)*(unsigned int *)(a1[1] + 4);\nif ( j >= (unsigned int)result )\nbreak;\nv11 = *(_QWORD **)(*(_QWORD *)(a1[1] + 8) + 8LL * j);\nv11[2] += a2;\nv11[3] += a2;\nresult = v11;\nv11[4] += a2;\n}\nfor ( k = 0; a3; ++k )\n{\nresult = (_QWORD *)*(unsigned int *)(a1[3] + 4);\nif ( k >= (unsigned int)result )\nbreak;\nv10 = *(_QWORD *)(*(_QWORD *)(a1[3] + 8) + 8LL * k);\nfor ( l = 0; ; ++l )\n{\nresult = (_QWORD *)*(unsigned int *)(*(_QWORD *)(v10 + 8) + 4LL);\nif ( l >= (unsigned int)result )\nbreak;\nv9 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v10 + 8) + 8LL) + 8LL * l);\n*(_QWORD *)(v9 + 8) += a2;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v8,v9,v10,v11,k,j,sub_40F3D2,sub_40B08E,]", "hints": "[]", "response": "{'a3': 'immediates', 'a1': 'area', 'a2': 'address', 'v8': 'sym', 'v9': 'entry', 'v10': 'map', 'v11': 'imm', 'k': 'i_1', 'j': 'i_0', 'sub_40F3D2': 'relocate_area', 'sub_40B08E': 'scas_log'}"}
[ [ 0.7631673812866211, 0.7558166980743408, 0.737991452217102, 0.7299154996871948, 0.7295023202896118, 0.7224454879760742, 0.7150148153305054, 0.7135756611824036, 0.7126268148422241, 0.7077975273132324, 0.7061695456504822, 0.6984565258026123, 0.6942718029022217, 0.6929937601089478, 0.6893834471702576, 0.6881910562515259, 0.687059223651886, 0.6847068667411804, 0.6822725534439087, 0.6774164438247681 ], [ 42889, 31971, 233605, 187989, 173727, 234589, 104990, 69437, 127070, 259708, 120126, 235153, 68572, 98666, 104086, 151709, 61892, 223894, 182365, 168610 ] ]
signalhandler
3dcf9b97b1c5d69ccd59d180de83033718cc3b2064c9c1e1f91608bdd820595f
yquake2
yquake2
NA
void signalhandler(int sig) { printf("\n=======================================================\n"); printf("\nYamagi Quake II crashed! This should not happen...\n"); printf("\nMake sure that you're using the last version. It can\n"); printf("be found at http://www.yamagi.org/quake2. If you do,\n"); printf("send a bug report to [email protected] and include:\n\n"); printf(" - This output\n"); printf(" - The conditions that triggered the crash\n"); printf(" - How to reproduce the crash (if known)\n"); printf(" - The following files. None of them contains private\n"); printf(" data. They're necessary to analyze the backtrace:\n\n"); printf(" - quake2 (the executable / binary)\n\n"); printf(" - game.so (the game.so of the mod you were playing\n"); printf(" when the game crashed. baseq2/game.so for the\n"); printf(" main game)\n\n"); printf(" - Any other data which you think might be useful\n"); printf("\nThank you very much for your help, making Yamagi Quake\n"); printf("II an even better source port. It's much appreciated.\n"); printf("\n=======================================================\n\n"); printBacktrace(sig); /* make sure this is written */ fflush(stdout); /* reset signalhandler */ signal(SIGSEGV, SIG_DFL); signal(SIGILL, SIG_DFL); signal(SIGFPE, SIG_DFL); signal(SIGABRT, SIG_DFL); signal(SIGBUS, SIG_DFL); /* pass signal to the os */ raise(sig); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "handler", "function_addr": 4902811, "binary_name": "3dcf9b97b1c5d69ccd59d180de83033718cc3b2064c9c1e1f91608bdd820595f.elf_extract.pkl\n"}, "code": [[0, "sub rsp, 18h"], [1, "mov [rsp+18h+sig], edi"], [2, "mov edi, offset asc_4C6170"], [3, "call _puts"], [4, "mov edi, offset aYamagiQuakeIiC"], [5, "call _puts"], [6, "mov edi, offset aMakeSureThatYo"], [7, "call _puts"], [8, "mov edi, offset aBeFoundAtHttpW"], [9, "call _puts"], [10, "mov edi, offset aSendABugReport"], [11, "call _puts"], [12, "mov edi, offset aThisOutput"], [13, "call _puts"], [14, "mov edi, offset aTheConditionsT"], [15, "call _puts"], [16, "mov edi, offset aHowToReproduce"], [17, "call _puts"], [18, "mov edi, offset aTheFollowingFi"], [19, "call _puts"], [20, "mov edi, offset aDataTheyReNece"], [21, "call _puts"], [22, "mov edi, offset aQuake2TheExecu"], [23, "call _puts"], [24, "mov edi, offset aGameSoTheGameS"], [25, "call _puts"], [26, "mov edi, offset aWhenTheGameCra"], [27, "call _puts"], [28, "mov edi, offset aMainGame"], [29, "call _puts"], [30, "mov edi, offset aAnyOtherDataWh"], [31, "call _puts"], [32, "mov edi, offset aThankYouVeryMu"], [33, "call _puts"], [34, "mov edi, offset aIiAnEvenBetter"], [35, "call _puts"], [36, "mov edi, offset asc_4C64C0"], [37, "call _puts"], [38, "mov eax, [rsp+18h+sig]"], [39, "mov edi, eax"], [40, "call sub_4ACE6E"], [41, "mov rax, cs:__bss_start"], [42, "mov rdi, rax"], [43, "call _fflush"], [44, "mov esi, 0"], [45, "mov edi, 0Bh"], [46, "call _signal"], [47, "mov esi, 0"], [48, "mov edi, 4"], [49, "call _signal"], [50, "mov esi, 0"], [51, "mov edi, 8"], [52, "call _signal"], [53, "mov esi, 0"], [54, "mov edi, 6"], [55, "call _signal"], [56, "mov esi, 0"], [57, "mov edi, 7"], [58, "call _signal"], [59, "mov eax, [rsp+18h+sig]"], [60, "mov edi, eax"], [61, "call _raise"], [62, "nop"], [63, "add rsp, 18h"], [64, "retn"]], "data_dep": [[38, 1], [39, 38], [42, 41], [59, 1], [60, 59], [63, 0], [64, 61]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/3dcf9b97b1c5d69ccd59d180de83033718cc3b2064c9c1e1f91608bdd820595f_3dcf9b97b1c5d69ccd59d180de83033718cc3b2064c9c1e1f91608bdd820595f.jsonl.gz", "strip_func_name": "handler", "query": "\n\n\nvoid __fastcall handler(unsigned int a1)\n{\nputs(\"\\n=======================================================\");\nputs(\"\\nYamagi Quake II crashed! This should not happen...\");\nputs(\"\\nMake sure that you're using the last version. It can\");\nputs(\"be found at http://www.yamagi.org/quake2. If you do,\");\nputs(\"send a bug report to [email protected] and include:\\n\");\nputs(\" - This output\");\nputs(\" - The conditions that triggered the crash\");\nputs(\" - How to reproduce the crash (if known)\");\nputs(\" - The following files. None of them contains private\");\nputs(\" data. They're necessary to analyze the backtrace:\\n\");\nputs(\" - quake2 (the executable / binary)\\n\");\nputs(\" - game.so (the game.so of the mod you were playing\");\nputs(\" when the game crashed. baseq2/game.so for the\");\nputs(\" main game)\\n\");\nputs(\" - Any other data which you think might be useful\");\nputs(\"\\nThank you very much for your help, making Yamagi Quake\");\nputs(\"II an even better source port. It's much appreciated.\");\nputs(\"\\n=======================================================\\n\");\nsub_4ACE6E(a1);\nfflush(_bss_start);\nsignal(11, 0LL);\nsignal(4, 0LL);\nsignal(8, 0LL);\nsignal(6, 0LL);\nsignal(7, 0LL);\nraise(a1);\n}\n\n\n\nQ:[a1,sub_4ACE6E,]", "hints": "[]", "response": "{'a1': 'sig', 'sub_4ACE6E': 'printBacktrace'}"}
[ [ 0.7767316699028015, 0.7732788324356079, 0.765477180480957, 0.7601535320281982, 0.7575490474700928, 0.7445678114891052, 0.7414195537567139, 0.7410194873809814, 0.7397083044052124, 0.7346847653388977, 0.7298182249069214, 0.7294114828109741, 0.7284455299377441, 0.7249133586883545, 0.7231646776199341, 0.7212203145027161, 0.7171173095703125, 0.7164751887321472, 0.7157137989997864, 0.715644121170044 ], [ 239496, 233420, 249410, 162093, 107101, 178187, 38603, 150317, 165711, 231952, 217013, 185182, 46060, 258331, 251091, 78531, 172376, 235884, 226133, 249265 ] ]
Hex
a91e99690f74daed4feb0b6d699a9687bf799c0a24e7161094cca3df1499a040
ec-
Quake3e
NA
static int Hex( char c ) { if ( c >= '0' && c <= '9' ) { return c - '0'; } else if ( c >= 'A' && c <= 'F' ) { return 10 + c - 'A'; } else if ( c >= 'a' && c <= 'f' ) { return 10 + c - 'a'; } return -1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_44E00C", "function_addr": 4513804, "binary_name": "a91e99690f74daed4feb0b6d699a9687bf799c0a24e7161094cca3df1499a040.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, edi"], [3, "mov [rbp+var_4], al"], [4, "cmp [rbp+var_4], 2Fh "], [5, "jle short loc_44E02A"], [6, "cmp [rbp+var_4], 39h "], [7, "jg short loc_44E02A"], [8, "movsx eax, [rbp+var_4]"], [9, "sub eax, 30h "], [10, "jmp short loc_44E059"], [11, "cmp [rbp+var_4], 40h "], [12, "jle short loc_44E03F"], [13, "cmp [rbp+var_4], 46h "], [14, "jg short loc_44E03F"], [15, "movsx eax, [rbp+var_4]"], [16, "sub eax, 37h "], [17, "jmp short loc_44E059"], [18, "cmp [rbp+var_4], 60h "], [19, "jle short loc_44E054"], [20, "cmp [rbp+var_4], 66h "], [21, "jg short loc_44E054"], [22, "movsx eax, [rbp+var_4]"], [23, "sub eax, 57h "], [24, "jmp short loc_44E059"], [25, "mov eax, 0FFFFFFFFh"], [26, "pop rbp"], [27, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 3], [7, 6], [8, 3], [9, 8], [11, 3], [12, 11], [13, 3], [14, 13], [15, 3], [16, 15], [18, 3], [19, 18], [20, 3], [21, 20], [22, 3], [23, 22], [26, 0], [27, 16], [27, 25], [27, 9], [27, 23]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/a91e99690f74daed4feb0b6d699a9687bf799c0a24e7161094cca3df1499a040_a91e99690f74daed4feb0b6d699a9687bf799c0a24e7161094cca3df1499a040.jsonl.gz", "strip_func_name": "sub_44E00C", "query": "\n\n\n__int64 __fastcall sub_44E00C(char a1)\n{\nif ( a1 > 47 && a1 <= 57 )\nreturn (unsigned int)(a1 - 48);\nif ( a1 > 64 && a1 <= 70 )\nreturn (unsigned int)(a1 - 55);\nif ( a1 <= 96 || a1 > 102 )\nreturn 0xFFFFFFFFLL;\nreturn (unsigned int)(a1 - 87);\n}\n\n\n\nQ:[a1,sub_44E00C,]", "hints": "[]", "response": "{'a1': 'c', 'sub_44E00C': 'Hex'}"}
[ [ 0.9034792184829712, 0.8954444527626038, 0.8910082578659058, 0.8890871405601501, 0.8876626491546631, 0.8876122236251831, 0.8846012353897095, 0.882844865322113, 0.882278323173523, 0.8806412816047668, 0.8802824020385742, 0.8797341585159302, 0.8795586824417114, 0.878707230091095, 0.8785467147827148, 0.876478910446167, 0.8762347102165222, 0.8757226467132568, 0.8753319978713989, 0.8748634457588196 ], [ 152036, 251464, 140672, 196418, 129369, 236254, 109720, 13907, 182757, 40329, 197433, 246310, 122346, 133653, 254723, 3872, 80819, 23486, 144556, 16913 ] ]
do_hid_entry
ee35dc7ef3ff6ade837c204cca8b632578bdff95a5af2743ef87e3c7f8444b40
alibaba
LVS
NA
static int do_hid_entry(const char *filename, struct hid_device_id *id, char *alias) { id->bus = TO_NATIVE(id->bus); id->vendor = TO_NATIVE(id->vendor); id->product = TO_NATIVE(id->product); sprintf(alias, "hid:b%04X", id->bus); ADD(alias, "v", id->vendor != HID_ANY_ID, id->vendor); ADD(alias, "p", id->product != HID_ANY_ID, id->product); return 1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407D32", "function_addr": 4226354, "binary_name": "ee35dc7ef3ff6ade837c204cca8b632578bdff95a5af2743ef87e3c7f8444b40.elf_extract.pkl\n"}, "code": [[0, "push rbx"], [1, "sub rsp, 20h"], [2, "mov [rsp+28h+var_10], rdi"], [3, "mov [rsp+28h+var_18], rsi"], [4, "mov [rsp+28h+s], rdx"], [5, "mov rax, [rsp+28h+var_18]"], [6, "movzx edx, word ptr [rax]"], [7, "mov rax, [rsp+28h+var_18]"], [8, "mov [rax], dx"], [9, "mov rax, [rsp+28h+var_18]"], [10, "mov edx, [rax+4]"], [11, "mov rax, [rsp+28h+var_18]"], [12, "mov [rax+4], edx"], [13, "mov rax, [rsp+28h+var_18]"], [14, "mov edx, [rax+8]"], [15, "mov rax, [rsp+28h+var_18]"], [16, "mov [rax+8], edx"], [17, "mov rax, [rsp+28h+var_18]"], [18, "movzx eax, word ptr [rax]"], [19, "movzx edx, ax"], [20, "mov rax, [rsp+28h+s]"], [21, "mov esi, offset aHidB04x"], [22, "mov rdi, rax"], [23, "mov eax, 0"], [24, "call _sprintf"], [25, "mov rax, [rsp+28h+s]"], [26, "mov rdi, rax"], [27, "call _strlen"], [28, "mov rdx, rax"], [29, "mov rax, [rsp+28h+s]"], [30, "add rax, rdx"], [31, "mov word ptr [rax], 76h "], [32, "mov rax, [rsp+28h+var_18]"], [33, "mov eax, [rax+4]"], [34, "cmp eax, 0FFFFFFFFh"], [35, "jz short loc_407DF5"], [36, "mov rax, [rsp+28h+var_18]"], [37, "mov ebx, [rax+4]"], [38, "mov rax, [rsp+28h+s]"], [39, "mov rdi, rax"], [40, "call _strlen"], [41, "mov rdx, [rsp+28h+s]"], [42, "add rax, rdx"], [43, "mov edx, ebx"], [44, "mov esi, offset a08x"], [45, "mov rdi, rax"], [46, "mov eax, 0"], [47, "call _sprintf"], [48, "jmp short loc_407E1C"], [49, "mov rax, [rsp+28h+s]"], [50, "mov rdi, rax"], [51, "call _strlen"], [52, "mov rdx, [rsp+28h+s]"], [53, "add rax, rdx"], [54, "mov esi, offset asc_40F5B3"], [55, "mov rdi, rax"], [56, "mov eax, 0"], [57, "call _sprintf"], [58, "mov rax, [rsp+28h+s]"], [59, "mov rdi, rax"], [60, "call _strlen"], [61, "mov rdx, rax"], [62, "mov rax, [rsp+28h+s]"], [63, "add rax, rdx"], [64, "mov word ptr [rax], 70h "], [65, "mov rax, [rsp+28h+var_18]"], [66, "mov eax, [rax+8]"], [67, "cmp eax, 0FFFFFFFFh"], [68, "jz short loc_407E79"], [69, "mov rax, [rsp+28h+var_18]"], [70, "mov ebx, [rax+8]"], [71, "mov rax, [rsp+28h+s]"], [72, "mov rdi, rax"], [73, "call _strlen"], [74, "mov rdx, [rsp+28h+s]"], [75, "add rax, rdx"], [76, "mov edx, ebx"], [77, "mov esi, offset a08x"], [78, "mov rdi, rax"], [79, "mov eax, 0"], [80, "call _sprintf"], [81, "jmp short loc_407EA0"], [82, "mov rax, [rsp+28h+s]"], [83, "mov rdi, rax"], [84, "call _strlen"], [85, "mov rdx, [rsp+28h+s]"], [86, "add rax, rdx"], [87, "mov esi, offset asc_40F5B3"], [88, "mov rdi, rax"], [89, "mov eax, 0"], [90, "call _sprintf"], [91, "mov eax, 1"], [92, "add rsp, 20h"], [93, "pop rbx"], [94, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 3], [8, 6], [8, 7], [9, 3], [10, 8], [10, 9], [11, 3], [12, 10], [12, 11], [13, 3], [14, 13], [14, 12], [15, 3], [16, 15], [16, 14], [17, 3], [18, 17], [18, 16], [18, 8], [19, 18], [20, 4], [22, 20], [25, 4], [26, 25], [28, 27], [29, 4], [30, 29], [30, 28], [31, 30], [32, 3], [33, 31], [33, 12], [33, 32], [34, 33], [35, 34], [36, 3], [37, 8], [37, 12], [37, 16], [37, 36], [37, 31], [38, 4], [39, 38], [41, 4], [42, 41], [42, 40], [43, 37], [45, 42], [49, 4], [50, 49], [52, 4], [53, 52], [53, 51], [55, 53], [58, 4], [59, 58], [61, 60], [62, 4], [63, 61], [63, 62], [64, 63], [65, 3], [66, 16], [66, 64], [66, 65], [67, 66], [68, 67], [69, 3], [70, 64], [70, 31], [70, 8], [70, 12], [70, 69], [70, 16], [71, 4], [72, 71], [74, 4], [75, 74], [75, 73], [76, 70], [78, 75], [82, 4], [83, 82], [85, 4], [86, 85], [86, 84], [88, 86], [92, 1], [93, 0], [94, 91]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/ee35dc7ef3ff6ade837c204cca8b632578bdff95a5af2743ef87e3c7f8444b40_ee35dc7ef3ff6ade837c204cca8b632578bdff95a5af2743ef87e3c7f8444b40.jsonl.gz", "strip_func_name": "sub_407D32", "query": "\n\n\n__int64 __fastcall sub_407D32(__int64 a1, unsigned __int16 *a2, char *a3)\n{\nunsigned int v3; // ebx\nsize_t v4; // rax\nsize_t v5; // rax\nunsigned int v6; // ebx\nsize_t v7; // rax\nsize_t v8; // rax\n\n*a2 = *a2;\n*((_DWORD *)a2 + 1) = *((_DWORD *)a2 + 1);\n*((_DWORD *)a2 + 2) = *((_DWORD *)a2 + 2);\nsprintf(a3, \"hid:b%04X\", *a2);\n*(_WORD *)&a3[strlen(a3)] = 118;\nif ( *((_DWORD *)a2 + 1) == -1 )\n{\nv5 = strlen(a3);\nsprintf(&a3[v5], \"*\");\n}\nelse\n{\nv3 = *((_DWORD *)a2 + 1);\nv4 = strlen(a3);\nsprintf(&a3[v4], \"%08X\", v3);\n}\n*(_WORD *)&a3[strlen(a3)] = 112;\nif ( *((_DWORD *)a2 + 2) == -1 )\n{\nv8 = strlen(a3);\nsprintf(&a3[v8], \"*\");\n}\nelse\n{\nv6 = *((_DWORD *)a2 + 2);\nv7 = strlen(a3);\nsprintf(&a3[v7], \"%08X\", v6);\n}\nreturn 1LL;\n}\n\n\n\nQ:[a3,a2,a1,sub_407D32,]", "hints": "[]", "response": "{'a3': 'alias', 'a2': 'id', 'a1': 'filename', 'sub_407D32': 'do_hid_entry'}"}
[ [ 0.741155743598938, 0.7265304327011108, 0.7254149317741394, 0.7022049427032471, 0.6979837417602539, 0.6973698139190674, 0.6858289241790771, 0.6834768652915955, 0.6751104593276978, 0.6684656143188477, 0.6681451201438904, 0.6657348871231079, 0.6644984483718872, 0.6637750864028931, 0.6620471477508545, 0.656158447265625, 0.6472179293632507, 0.6452150344848633, 0.6447626948356628, 0.6424527764320374 ], [ 123133, 107351, 116257, 82287, 160018, 158701, 264382, 172761, 163151, 256902, 40004, 61193, 75558, 167690, 180624, 142195, 227884, 220321, 113703, 123284 ] ]
str_operation
7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807
arendst
Tasmota
NA
static bint str_operation(bvm *vm, str_opfunc func, bint error) { int top = be_top(vm); /* check the number and type of arguments */ if (top >= 2 && be_isstring(vm, 1) && be_isstring(vm, 2)) { /* get the operation string and its length */ int len1 = be_strlen(vm, 1); int len2 = be_strlen(vm, 2); const char *s1 = be_tostring(vm, 1); const char *s2 = be_tostring(vm, 2); /* get begin and end indexes (may use default values) */ bint begin = top >= 3 && be_isint(vm, 3) ? be_toint(vm, 3) : 0; bint end = top >= 4 && be_isint(vm, 4) ? be_toint(vm, 4) : len1; /* basic range check: * 1. begin position must be greater than 0 and * less than the length of the source string. * 2. the length of the pattern string cannot be * less than the matching range (end - begin). **/ if (begin >= 0 && begin <= len1 && end - begin >= len2) { /* call the operation function */ return func(s1, s2, begin, end - len2); } } return error; /* returns the default error value */ }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40A294", "function_addr": 4235924, "binary_name": "7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807.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_40], rsi"], [5, "mov [rbp+var_44], edx"], [6, "mov rax, [rbp+var_38]"], [7, "mov rdi, rax"], [8, "call be_top"], [9, "mov [rbp+var_4], eax"], [10, "cmp [rbp+var_4], 1"], [11, "jle loc_40A3E6"], [12, "mov rax, [rbp+var_38]"], [13, "mov esi, 1"], [14, "mov rdi, rax"], [15, "call be_isstring"], [16, "test al, al"], [17, "jz loc_40A3E6"], [18, "mov rax, [rbp+var_38]"], [19, "mov esi, 2"], [20, "mov rdi, rax"], [21, "call be_isstring"], [22, "test al, al"], [23, "jz loc_40A3E6"], [24, "mov rax, [rbp+var_38]"], [25, "mov esi, 1"], [26, "mov rdi, rax"], [27, "call be_strlen"], [28, "mov [rbp+var_8], eax"], [29, "mov rax, [rbp+var_38]"], [30, "mov esi, 2"], [31, "mov rdi, rax"], [32, "call be_strlen"], [33, "mov [rbp+var_C], eax"], [34, "mov rax, [rbp+var_38]"], [35, "mov esi, 1"], [36, "mov rdi, rax"], [37, "call be_tostring"], [38, "mov [rbp+var_18], rax"], [39, "mov rax, [rbp+var_38]"], [40, "mov esi, 2"], [41, "mov rdi, rax"], [42, "call be_tostring"], [43, "mov [rbp+var_20], rax"], [44, "cmp [rbp+var_4], 2"], [45, "jle short loc_40A372"], [46, "mov rax, [rbp+var_38]"], [47, "mov esi, 3"], [48, "mov rdi, rax"], [49, "call be_isint"], [50, "test al, al"], [51, "jz short loc_40A372"], [52, "mov rax, [rbp+var_38]"], [53, "mov esi, 3"], [54, "mov rdi, rax"], [55, "call be_toint"], [56, "jmp short loc_40A377"], [57, "mov eax, 0"], [58, "mov [rbp+var_24], eax"], [59, "cmp [rbp+var_4], 3"], [60, "jle short loc_40A3A8"], [61, "mov rax, [rbp+var_38]"], [62, "mov esi, 4"], [63, "mov rdi, rax"], [64, "call be_isint"], [65, "test al, al"], [66, "jz short loc_40A3A8"], [67, "mov rax, [rbp+var_38]"], [68, "mov esi, 4"], [69, "mov rdi, rax"], [70, "call be_toint"], [71, "jmp short loc_40A3AB"], [72, "mov eax, [rbp+var_8]"], [73, "mov [rbp+var_28], eax"], [74, "cmp [rbp+var_24], 0"], [75, "js short loc_40A3E6"], [76, "mov eax, [rbp+var_24]"], [77, "cmp eax, [rbp+var_8]"], [78, "jg short loc_40A3E6"], [79, "mov eax, [rbp+var_28]"], [80, "sub eax, [rbp+var_24]"], [81, "cmp [rbp+var_C], eax"], [82, "jg short loc_40A3E6"], [83, "mov eax, [rbp+var_28]"], [84, "sub eax, [rbp+var_C]"], [85, "mov ecx, eax"], [86, "mov edx, [rbp+var_24]"], [87, "mov rsi, [rbp+var_20]"], [88, "mov rax, [rbp+var_18]"], [89, "mov r8, [rbp+var_40]"], [90, "mov rdi, rax"], [91, "call r8"], [92, "jmp short locret_40A3E9"], [93, "mov eax, [rbp+var_44]"], [94, "leave"], [95, "retn"]], "data_dep": [[6, 3], [7, 6], [9, 8], [10, 9], [11, 10], [12, 3], [14, 12], [16, 15], [17, 16], [18, 3], [20, 18], [22, 21], [23, 22], [24, 3], [26, 24], [28, 27], [29, 3], [31, 29], [33, 32], [34, 3], [36, 34], [38, 37], [39, 3], [41, 39], [43, 42], [44, 9], [45, 44], [46, 3], [48, 46], [50, 49], [51, 50], [52, 3], [54, 52], [58, 55], [58, 57], [59, 9], [60, 59], [61, 3], [63, 61], [65, 64], [66, 65], [67, 3], [69, 67], [72, 28], [73, 70], [73, 72], [74, 58], [75, 74], [76, 58], [77, 28], [77, 76], [78, 77], [79, 73], [80, 58], [80, 79], [81, 33], [81, 80], [82, 81], [83, 73], [84, 83], [84, 33], [85, 84], [86, 58], [87, 43], [88, 38], [89, 4], [90, 88], [91, 89], [93, 5], [95, 93], [95, 91]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807_7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807.jsonl.gz", "strip_func_name": "sub_40A294", "query": "\n\n\n__int64 __fastcall sub_40A294(__int64 a1, __int64 (__fastcall *a2)(__int64, __int64, _QWORD, _QWORD), unsigned int a3)\n{\nint v3; // eax\nint v4; // eax\n__int64 result; // rax\nint v7; // [rsp+2Ch] [rbp-24h]\n__int64 v8; // [rsp+30h] [rbp-20h]\n__int64 v9; // [rsp+38h] [rbp-18h]\nint v10; // [rsp+44h] [rbp-Ch]\nint v11; // [rsp+48h] [rbp-8h]\nint v12; // [rsp+4Ch] [rbp-4h]\n\nv12 = be_top(a1);\nif ( v12 > 1\n&& (unsigned __int8)be_isstring(a1, 1LL)\n&& (unsigned __int8)be_isstring(a1, 2LL)\n&& ((v11 = be_strlen(a1, 1LL),\nv10 = be_strlen(a1, 2LL),\nv9 = be_tostring(a1, 1LL),\nv8 = be_tostring(a1, 2LL),\nv12 <= 2)\n|| !(unsigned __int8)be_isint(a1, 3LL) ? (v3 = 0) : (v3 = be_toint(a1, 3LL)),\n(v7 = v3, v12 <= 3) || !(unsigned __int8)be_isint(a1, 4LL) ? (v4 = v11) : (v4 = be_toint(a1, 4LL)),\nv7 >= 0 && v7 <= v11 && v10 <= v4 - v7) )\n{\nresult = a2(v9, v8, (unsigned int)v7, (unsigned int)(v4 - v10));\n}\nelse\n{\nresult = a3;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v7,v8,v9,v10,v11,v12,sub_40A294,]", "hints": "[]", "response": "{'a3': 'error', 'a1': 'vm', 'a2': 'func', 'v7': 'begin', 'v8': 's2', 'v9': 's1', 'v10': 'len2', 'v11': 'len1', 'v12': 'top', 'sub_40A294': 'str_operation'}"}
[ [ 0.7050508856773376, 0.6950509548187256, 0.6814770102500916, 0.681174635887146, 0.6762305498123169, 0.6706323623657227, 0.6673766374588013, 0.6634765863418579, 0.6625146865844727, 0.6610628962516785, 0.6598993539810181, 0.656585693359375, 0.6522676944732666, 0.6521524786949158, 0.6489850878715515, 0.641953706741333, 0.6355336308479309, 0.6344137191772461, 0.634376585483551, 0.6339540481567383 ], [ 68393, 118220, 233383, 32337, 8459, 130520, 169289, 69931, 241655, 139226, 132588, 141017, 179678, 146467, 128410, 87304, 25162, 55146, 192059, 71839 ] ]
m_solidify_list
7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807
arendst
Tasmota
NA
static void m_solidify_list(bvm *vm, bbool str_literal, blist * list, const char *class_name, void* fout) { logfmt(" be_nested_list(%i,\n", list->count); logfmt(" ( (struct bvalue*) &(const bvalue[]) {\n"); for (int i = 0; i < list->count; i++) { logfmt(" "); m_solidify_bvalue(vm, str_literal, &list->data[i], class_name, "", fout); logfmt(",\n"); } logfmt(" }))"); // TODO need terminal comma? }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4236F9", "function_addr": 4339449, "binary_name": "7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 160h"], [3, "mov [rbp+var_138], rdi"], [4, "mov eax, esi"], [5, "mov [rbp+var_148], rdx"], [6, "mov [rbp+var_150], rcx"], [7, "mov [rbp+var_158], r8"], [8, "mov [rbp+var_13C], al"], [9, "mov rax, [rbp+var_148]"], [10, "mov edx, [rax+18h]"], [11, "lea rax, [rbp+s]"], [12, "mov ecx, edx"], [13, "mov edx, offset aBeNestedListI"], [14, "mov esi, 120h"], [15, "mov rdi, rax"], [16, "mov eax, 0"], [17, "call _snprintf"], [18, "cmp [rbp+var_158], 0"], [19, "jz short loc_423789"], [20, "lea rax, [rbp+s]"], [21, "mov rdi, rax"], [22, "call _strlen"], [23, "mov rdx, rax"], [24, "lea rcx, [rbp+s]"], [25, "mov rax, [rbp+var_158]"], [26, "mov rsi, rcx"], [27, "mov rdi, rax"], [28, "call be_fwrite"], [29, "jmp short loc_4237AD"], [30, "lea rax, [rbp+s]"], [31, "mov rdi, rax"], [32, "call _strlen"], [33, "mov rdx, rax"], [34, "lea rax, [rbp+s]"], [35, "mov rsi, rdx"], [36, "mov rdi, rax"], [37, "call be_writebuffer"], [38, "lea rax, [rbp+s]"], [39, "mov edx, offset aStructBvalueCo"], [40, "mov esi, 120h"], [41, "mov rdi, rax"], [42, "mov eax, 0"], [43, "call _snprintf"], [44, "cmp [rbp+var_158], 0"], [45, "jz short loc_423802"], [46, "lea rax, [rbp+s]"], [47, "mov rdi, rax"], [48, "call _strlen"], [49, "mov rdx, rax"], [50, "lea rcx, [rbp+s]"], [51, "mov rax, [rbp+var_158]"], [52, "mov rsi, rcx"], [53, "mov rdi, rax"], [54, "call be_fwrite"], [55, "jmp short loc_423826"], [56, "lea rax, [rbp+s]"], [57, "mov rdi, rax"], [58, "call _strlen"], [59, "mov rdx, rax"], [60, "lea rax, [rbp+s]"], [61, "mov rsi, rdx"], [62, "mov rdi, rax"], [63, "call be_writebuffer"], [64, "mov [rbp+var_4], 0"], [65, "jmp loc_423973"], [66, "lea rax, [rbp+s]"], [67, "mov edx, offset asc_441CDC"], [68, "mov esi, 120h"], [69, "mov rdi, rax"], [70, "mov eax, 0"], [71, "call _snprintf"], [72, "cmp [rbp+var_158], 0"], [73, "jz short loc_423887"], [74, "lea rax, [rbp+s]"], [75, "mov rdi, rax"], [76, "call _strlen"], [77, "mov rdx, rax"], [78, "lea rcx, [rbp+s]"], [79, "mov rax, [rbp+var_158]"], [80, "mov rsi, rcx"], [81, "mov rdi, rax"], [82, "call be_fwrite"], [83, "jmp short loc_4238AB"], [84, "lea rax, [rbp+s]"], [85, "mov rdi, rax"], [86, "call _strlen"], [87, "mov rdx, rax"], [88, "lea rax, [rbp+s]"], [89, "mov rsi, rdx"], [90, "mov rdi, rax"], [91, "call be_writebuffer"], [92, "mov rax, [rbp+var_148]"], [93, "mov rdx, [rax+20h]"], [94, "mov eax, [rbp+var_4]"], [95, "cdqe"], [96, "shl rax, 4"], [97, "lea rdi, [rdx+rax]"], [98, "movzx esi, [rbp+var_13C]"], [99, "mov rcx, [rbp+var_158]"], [100, "mov rdx, [rbp+var_150]"], [101, "mov rax, [rbp+var_138]"], [102, "mov r9, rcx"], [103, "mov r8d, offset unk_441CE5"], [104, "mov rcx, rdx"], [105, "mov rdx, rdi"], [106, "mov rdi, rax"], [107, "call sub_423A02"], [108, "lea rax, [rbp+s]"], [109, "mov edx, offset asc_441CE6"], [110, "mov esi, 120h"], [111, "mov rdi, rax"], [112, "mov eax, 0"], [113, "call _snprintf"], [114, "cmp [rbp+var_158], 0"], [115, "jz short loc_42394B"], [116, "lea rax, [rbp+s]"], [117, "mov rdi, rax"], [118, "call _strlen"], [119, "mov rdx, rax"], [120, "lea rcx, [rbp+s]"], [121, "mov rax, [rbp+var_158]"], [122, "mov rsi, rcx"], [123, "mov rdi, rax"], [124, "call be_fwrite"], [125, "jmp short loc_42396F"], [126, "lea rax, [rbp+s]"], [127, "mov rdi, rax"], [128, "call _strlen"], [129, "mov rdx, rax"], [130, "lea rax, [rbp+s]"], [131, "mov rsi, rdx"], [132, "mov rdi, rax"], [133, "call be_writebuffer"], [134, "add [rbp+var_4], 1"], [135, "mov rax, [rbp+var_148]"], [136, "mov eax, [rax+18h]"], [137, "cmp [rbp+var_4], eax"], [138, "jl loc_423832"], [139, "lea rax, [rbp+s]"], [140, "mov edx, offset asc_441C8E"], [141, "mov esi, 120h"], [142, "mov rdi, rax"], [143, "mov eax, 0"], [144, "call _snprintf"], [145, "cmp [rbp+var_158], 0"], [146, "jz short loc_4239DB"], [147, "lea rax, [rbp+s]"], [148, "mov rdi, rax"], [149, "call _strlen"], [150, "mov rdx, rax"], [151, "lea rcx, [rbp+s]"], [152, "mov rax, [rbp+var_158]"], [153, "mov rsi, rcx"], [154, "mov rdi, rax"], [155, "call be_fwrite"], [156, "jmp short loc_4239FF"], [157, "lea rax, [rbp+s]"], [158, "mov rdi, rax"], [159, "call _strlen"], [160, "mov rdx, rax"], [161, "lea rax, [rbp+s]"], [162, "mov rsi, rdx"], [163, "mov rdi, rax"], [164, "call be_writebuffer"], [165, "nop"], [166, "leave"], [167, "retn"]], "data_dep": [[8, 4], [9, 5], [10, 9], [11, 9], [12, 10], [15, 11], [18, 7], [19, 18], [20, 17], [21, 20], [23, 22], [24, 12], [25, 7], [26, 24], [27, 25], [30, 17], [31, 30], [33, 32], [34, 32], [35, 33], [36, 34], [38, 28], [38, 37], [41, 38], [44, 7], [45, 44], [46, 43], [47, 46], [49, 48], [50, 24], [50, 12], [51, 7], [52, 50], [53, 51], [56, 43], [57, 56], [59, 58], [60, 58], [61, 59], [62, 60], [66, 136], [69, 66], [72, 7], [73, 72], [74, 71], [75, 74], [77, 76], [78, 120], [78, 104], [78, 24], [78, 12], [78, 50], [79, 7], [80, 78], [81, 79], [84, 71], [85, 84], [87, 86], [88, 86], [89, 87], [90, 88], [92, 5], [93, 92], [94, 64], [94, 134], [96, 94], [97, 81], [97, 90], [97, 96], [98, 8], [99, 7], [100, 6], [101, 3], [102, 99], [104, 100], [105, 97], [106, 101], [108, 107], [111, 108], [114, 7], [115, 114], [116, 113], [117, 116], [119, 118], [120, 104], [121, 7], [122, 120], [123, 121], [126, 113], [127, 126], [129, 128], [130, 128], [131, 129], [132, 130], [134, 64], [134, 134], [135, 5], [136, 135], [137, 64], [137, 134], [137, 136], [138, 137], [139, 136], [142, 139], [145, 7], [146, 145], [147, 144], [148, 147], [150, 149], [151, 24], [151, 120], [151, 104], [151, 12], [151, 50], [152, 7], [153, 151], [154, 152], [157, 144], [158, 157], [160, 159], [161, 159], [162, 160], [163, 161], [167, 155], [167, 164]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807_7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807.jsonl.gz", "strip_func_name": "sub_4236F9", "query": "\n\n\n__int64 __fastcall sub_4236F9(__int64 a1, unsigned __int8 a2, __int64 a3, __int64 a4, __int64 a5)\n{\nsize_t v5; // rax\nsize_t v6; // rax\nsize_t v7; // rax\nsize_t v8; // rax\nsize_t v9; // rax\n__int64 result; // rax\nchar s[300]; // [rsp+30h] [rbp-130h] BYREF\nint i; // [rsp+15Ch] [rbp-4h]\n\nsnprintf(s, 0x120uLL, \" be_nested_list(%i,\\n\", *(unsigned int *)(a3 + 24));\nv5 = strlen(s);\nif ( a5 )\nbe_fwrite(a5, s, v5);\nelse\nbe_writebuffer(s, v5);\nsnprintf(s, 0x120uLL, \" ( (struct bvalue*) &(const bvalue[]) {\\n\");\nv6 = strlen(s);\nif ( a5 )\nbe_fwrite(a5, s, v6);\nelse\nbe_writebuffer(s, v6);\nfor ( i = 0; i < *(_DWORD *)(a3 + 24); ++i )\n{\nsnprintf(s, 0x120uLL, \" \");\nv7 = strlen(s);\nif ( a5 )\nbe_fwrite(a5, s, v7);\nelse\nbe_writebuffer(s, v7);\nsub_423A02(a1, a2, *(_QWORD *)(a3 + 32) + 16LL * i, a4, &unk_441CE5, a5);\nsnprintf(s, 0x120uLL, \",\\n\");\nv8 = strlen(s);\nif ( a5 )\nbe_fwrite(a5, s, v8);\nelse\nbe_writebuffer(s, v8);\n}\nsnprintf(s, 0x120uLL, \" }))\");\nv9 = strlen(s);\nif ( a5 )\nresult = be_fwrite(a5, s, v9);\nelse\nresult = be_writebuffer(s, v9);\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,s,sub_4236F9,sub_423A02,]", "hints": "[]", "response": "{'a3': 'list', 'a4': 'class_name', 'a1': 'vm', 'a2': 'str_literal', 'a5': 'fout', 's': '__lbuf', 'sub_4236F9': 'm_solidify_list', 'sub_423A02': 'm_solidify_bvalue'}"}
[ [ 0.8081991672515869, 0.8066686987876892, 0.7792153358459473, 0.7640565037727356, 0.7618958950042725, 0.7586777210235596, 0.7490056157112122, 0.7479287385940552, 0.7473343014717102, 0.7379579544067383, 0.7377396821975708, 0.7333120703697205, 0.7299627065658569, 0.7284768223762512, 0.7271719574928284, 0.7232019305229187, 0.7224217653274536, 0.7216756343841553, 0.7207283973693848, 0.7177683711051941 ], [ 263790, 200763, 2099, 113110, 22052, 131398, 228707, 185, 87545, 52249, 75201, 63868, 250390, 119920, 77403, 248548, 205703, 248149, 133006, 252488 ] ]
t2ev_data_shift
10b6f490e402a48bbb0b312acbdf9a1c623841c47b052e026d9cf82e12b1a981
sergev
vak-opensource
NA
static int t2ev_data_shift(unsigned opcode, unsigned address, struct arm_instruction *instruction, char *cp) { int op = (opcode >> 21) & 0xf; int rd = (opcode >> 8) & 0xf; int rn = (opcode >> 16) & 0xf; int type = (opcode >> 4) & 0x3; int immed = (opcode >> 6) & 0x3; char *mnemonic; char *suffix = ""; immed |= (opcode >> 10) & 0x1c; if (opcode & (1 << 20)) suffix = "S"; switch (op) { case 0: if (rd == 0xf) { if (!(opcode & (1 << 20))) return -1; instruction->type = ARM_TST; mnemonic = "TST"; suffix = ""; goto two; } instruction->type = ARM_AND; mnemonic = "AND"; break; case 1: instruction->type = ARM_BIC; mnemonic = "BIC"; break; case 2: if (rn == 0xf) { instruction->type = ARM_MOV; switch (type) { case 0: if (immed == 0) { sprintf(cp, "MOV%s.W\tr%d, r%d", suffix, rd, (int) (opcode & 0xf)); return 0; } mnemonic = "LSL"; break; case 1: mnemonic = "LSR"; break; case 2: mnemonic = "ASR"; break; default: if (immed == 0) { sprintf(cp, "RRX%s\tr%d, r%d", suffix, rd, (int) (opcode & 0xf)); return 0; } mnemonic = "ROR"; break; } goto immediate; } else { instruction->type = ARM_ORR; mnemonic = "ORR"; } break; case 3: if (rn == 0xf) { instruction->type = ARM_MVN; mnemonic = "MVN"; rn = rd; goto two; } else { // instruction->type = ARM_ORN; mnemonic = "ORN"; } break; case 4: if (rd == 0xf) { if (!(opcode & (1 << 20))) return -1; instruction->type = ARM_TEQ; mnemonic = "TEQ"; suffix = ""; goto two; } instruction->type = ARM_EOR; mnemonic = "EOR"; break; case 8: if (rd == 0xf) { if (!(opcode & (1 << 20))) return -1; instruction->type = ARM_CMN; mnemonic = "CMN"; suffix = ""; goto two; } instruction->type = ARM_ADD; mnemonic = "ADD"; break; case 0xa: instruction->type = ARM_ADC; mnemonic = "ADC"; break; case 0xb: instruction->type = ARM_SBC; mnemonic = "SBC"; break; case 0xd: if (rd == 0xf) { if (!(opcode & (1 << 21))) return -1; instruction->type = ARM_CMP; mnemonic = "CMP"; suffix = ""; goto two; } instruction->type = ARM_SUB; mnemonic = "SUB"; break; case 0xe: instruction->type = ARM_RSB; mnemonic = "RSB"; break; default: return -1; } sprintf(cp, "%s%s.W\tr%d, r%d, r%d", mnemonic, suffix, rd, rn, (int) (opcode & 0xf)); shift: cp = strchr(cp, 0); switch (type) { case 0: if (immed == 0) return 0; suffix = "LSL"; break; case 1: suffix = "LSR"; if (immed == 32) immed = 0; break; case 2: suffix = "ASR"; if (immed == 32) immed = 0; break; case 3: if (immed == 0) { strcpy(cp, ", RRX"); return 0; } suffix = "ROR"; break; } sprintf(cp, ", %s #%d", suffix, immed ? immed : 32); return 0; two: sprintf(cp, "%s%s.W\tr%d, r%d", mnemonic, suffix, rn, (int) (opcode & 0xf)); goto shift; immediate: sprintf(cp, "%s%s.W\tr%d, r%d, #%d", mnemonic, suffix, rd, (int) (opcode & 0xf), immed ? immed : 32); return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4088ED", "function_addr": 4229357, "binary_name": "10b6f490e402a48bbb0b312acbdf9a1c623841c47b052e026d9cf82e12b1a981.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_34], edi"], [4, "mov [rbp+var_38], esi"], [5, "mov [rbp+var_40], rdx"], [6, "mov [rbp+s], rcx"], [7, "mov eax, [rbp+var_34]"], [8, "shr eax, 15h"], [9, "and eax, 0Fh"], [10, "mov [rbp+var_1C], eax"], [11, "mov eax, [rbp+var_34]"], [12, "shr eax, 8"], [13, "and eax, 0Fh"], [14, "mov [rbp+var_20], eax"], [15, "mov eax, [rbp+var_34]"], [16, "shr eax, 10h"], [17, "and eax, 0Fh"], [18, "mov [rbp+var_4], eax"], [19, "mov eax, [rbp+var_34]"], [20, "shr eax, 4"], [21, "and eax, 3"], [22, "mov [rbp+var_24], eax"], [23, "mov eax, [rbp+var_34]"], [24, "shr eax, 6"], [25, "and eax, 3"], [26, "mov [rbp+var_8], eax"], [27, "mov [rbp+var_18], offset unk_40B1A2"], [28, "mov eax, [rbp+var_34]"], [29, "shr eax, 0Ah"], [30, "and eax, 1Ch"], [31, "mov edx, eax"], [32, "mov eax, [rbp+var_8]"], [33, "or eax, edx"], [34, "mov [rbp+var_8], eax"], [35, "mov eax, [rbp+var_34]"], [36, "and eax, 100000h"], [37, "test eax, eax"], [38, "jz short loc_40896E"], [39, "mov [rbp+var_18], offset aS_1"], [40, "cmp [rbp+var_1C], 0Eh"], [41, "ja def_408983"], [42, "mov eax, [rbp+var_1C]"], [43, "mov rax, ds:jpt_408983[rax*8]"], [44, "jmp rax"], [45, "cmp [rbp+var_20], 0Fh"], [46, "jnz short loc_4089C0"], [47, "mov eax, [rbp+var_34]"], [48, "and eax, 100000h"], [49, "test eax, eax"], [50, "jnz short loc_4089A1"], [51, "mov eax, 0FFFFFFFFh"], [52, "jmp locret_408DE2"], [53, "mov rax, [rbp+var_40]"], [54, "mov dword ptr [rax], 0Dh"], [55, "mov [rbp+var_10], offset unk_40BA9E"], [56, "mov [rbp+var_18], offset unk_40B1A2"], [57, "jmp loc_408D66"], [58, "mov rax, [rbp+var_40]"], [59, "mov dword ptr [rax], 5"], [60, "mov [rbp+var_10], offset aAnd"], [61, "jmp loc_408C46"], [62, "mov rax, [rbp+var_40]"], [63, "mov dword ptr [rax], 13h"], [64, "mov [rbp+var_10], offset unk_40BAB6"], [65, "jmp loc_408C46"], [66, "cmp [rbp+var_4], 0Fh"], [67, "jnz loc_408AC3"], [68, "mov rax, [rbp+var_40]"], [69, "mov dword ptr [rax], 12h"], [70, "cmp [rbp+var_24], 2"], [71, "jz short loc_408A68"], [72, "cmp [rbp+var_24], 2"], [73, "jg short loc_408A72"], [74, "cmp [rbp+var_24], 0"], [75, "jz short loc_408A1C"], [76, "cmp [rbp+var_24], 1"], [77, "jz short loc_408A5E"], [78, "jmp short loc_408A72"], [79, "cmp [rbp+var_8], 0"], [80, "jnz short loc_408A54"], [81, "mov eax, [rbp+var_34]"], [82, "and eax, 0Fh"], [83, "mov esi, eax"], [84, "mov ecx, [rbp+var_20]"], [85, "mov rdx, [rbp+var_18]"], [86, "mov rax, [rbp+s]"], [87, "mov r8d, esi"], [88, "mov esi, offset aMovSWRDRD"], [89, "mov rdi, rax"], [90, "mov eax, 0"], [91, "call _sprintf"], [92, "mov eax, 0"], [93, "jmp locret_408DE2"], [94, "mov [rbp+var_10], offset aLsl"], [95, "jmp short loc_408AB3"], [96, "mov [rbp+var_10], offset aLsr"], [97, "jmp short loc_408AB3"], [98, "mov [rbp+var_10], offset aAsr"], [99, "jmp short loc_408AB3"], [100, "cmp [rbp+var_8], 0"], [101, "jnz short loc_408AAA"], [102, "mov eax, [rbp+var_34]"], [103, "and eax, 0Fh"], [104, "mov esi, eax"], [105, "mov ecx, [rbp+var_20]"], [106, "mov rdx, [rbp+var_18]"], [107, "mov rax, [rbp+s]"], [108, "mov r8d, esi"], [109, "mov esi, offset aRrxSRDRD"], [110, "mov rdi, rax"], [111, "mov eax, 0"], [112, "call _sprintf"], [113, "mov eax, 0"], [114, "jmp locret_408DE2"], [115, "mov [rbp+var_10], offset aRor"], [116, "nop"], [117, "nop"], [118, "cmp [rbp+var_8], 0"], [119, "jz loc_408D9F"], [120, "jmp loc_408D9A"], [121, "mov rax, [rbp+var_40]"], [122, "mov dword ptr [rax], 11h"], [123, "mov [rbp+var_10], offset unk_40BAAE"], [124, "jmp loc_408C46"], [125, "cmp [rbp+var_4], 0Fh"], [126, "jnz short loc_408AFD"], [127, "mov rax, [rbp+var_40]"], [128, "mov dword ptr [rax], 14h"], [129, "mov [rbp+var_10], offset unk_40BABA"], [130, "mov eax, [rbp+var_20]"], [131, "mov [rbp+var_4], eax"], [132, "jmp loc_408D66"], [133, "mov [rbp+var_10], offset unk_40C58B"], [134, "jmp loc_408C46"], [135, "cmp [rbp+var_20], 0Fh"], [136, "jnz short loc_408B45"], [137, "mov eax, [rbp+var_34]"], [138, "and eax, 100000h"], [139, "test eax, eax"], [140, "jnz short loc_408B26"], [141, "mov eax, 0FFFFFFFFh"], [142, "jmp locret_408DE2"], [143, "mov rax, [rbp+var_40]"], [144, "mov dword ptr [rax], 0Eh"], [145, "mov [rbp+var_10], offset unk_40BAA2"], [146, "mov [rbp+var_18], offset unk_40B1A2"], [147, "jmp loc_408D66"], [148, "mov rax, [rbp+var_40]"], [149, "mov dword ptr [rax], 6"], [150, "mov [rbp+var_10], offset aEor"], [151, "jmp loc_408C46"], [152, "cmp [rbp+var_20], 0Fh"], [153, "jnz short loc_408B97"], [154, "mov eax, [rbp+var_34]"], [155, "and eax, 100000h"], [156, "test eax, eax"], [157, "jnz short loc_408B78"], [158, "mov eax, 0FFFFFFFFh"], [159, "jmp locret_408DE2"], [160, "mov rax, [rbp+var_40]"], [161, "mov dword ptr [rax], 10h"], [162, "mov [rbp+var_10], offset unk_40BAAA"], [163, "mov [rbp+var_18], offset unk_40B1A2"], [164, "jmp loc_408D66"], [165, "mov rax, [rbp+var_40]"], [166, "mov dword ptr [rax], 9"], [167, "mov [rbp+var_10], offset unk_40BA8E"], [168, "jmp loc_408C46"], [169, "mov rax, [rbp+var_40]"], [170, "mov dword ptr [rax], 0Ah"], [171, "mov [rbp+var_10], offset unk_40BA92"], [172, "jmp loc_408C46"], [173, "mov rax, [rbp+var_40]"], [174, "mov dword ptr [rax], 0Bh"], [175, "mov [rbp+var_10], offset unk_40BA96"], [176, "jmp short loc_408C46"], [177, "cmp [rbp+var_20], 0Fh"], [178, "jnz short loc_408C14"], [179, "mov eax, [rbp+var_34]"], [180, "and eax, 200000h"], [181, "test eax, eax"], [182, "jnz short loc_408BF5"], [183, "mov eax, 0FFFFFFFFh"], [184, "jmp locret_408DE2"], [185, "mov rax, [rbp+var_40]"], [186, "mov dword ptr [rax], 0Fh"], [187, "mov [rbp+var_10], offset unk_40BAA6"], [188, "mov [rbp+var_18], offset unk_40B1A2"], [189, "jmp loc_408D66"], [190, "mov rax, [rbp+var_40]"], [191, "mov dword ptr [rax], 7"], [192, "mov [rbp+var_10], offset off_40BA86"], [193, "jmp short loc_408C46"], [194, "mov rax, [rbp+var_40]"], [195, "mov dword ptr [rax], 8"], [196, "mov [rbp+var_10], offset off_40BA8A"], [197, "jmp short loc_408C46"], [198, "mov eax, 0FFFFFFFFh"], [199, "jmp locret_408DE2"], [200, "mov eax, [rbp+var_34]"], [201, "and eax, 0Fh"], [202, "mov esi, eax"], [203, "mov r8d, [rbp+var_4]"], [204, "mov edi, [rbp+var_20]"], [205, "mov rcx, [rbp+var_18]"], [206, "mov rdx, [rbp+var_10]"], [207, "mov rax, [rbp+s]"], [208, "sub rsp, 8"], [209, "push rsi"], [210, "mov r9d, r8d"], [211, "mov r8d, edi"], [212, "mov esi, offset aSSWRDRDRD"], [213, "mov rdi, rax"], [214, "mov eax, 0"], [215, "call _sprintf"], [216, "add rsp, 10h"], [217, "mov rax, [rbp+s]"], [218, "mov rdi, rax"], [219, "call _strlen"], [220, "add [rbp+s], rax"], [221, "cmp [rbp+var_24], 3"], [222, "jz short loc_408D08"], [223, "cmp [rbp+var_24], 3"], [224, "jg loc_408D36"], [225, "cmp [rbp+var_24], 2"], [226, "jz short loc_408CF1"], [227, "cmp [rbp+var_24], 2"], [228, "jg loc_408D36"], [229, "cmp [rbp+var_24], 0"], [230, "jz short loc_408CC0"], [231, "cmp [rbp+var_24], 1"], [232, "jz short loc_408CDA"], [233, "jmp short loc_408D36"], [234, "cmp [rbp+var_8], 0"], [235, "jnz short loc_408CD0"], [236, "mov eax, 0"], [237, "jmp locret_408DE2"], [238, "mov [rbp+var_18], offset aLsl"], [239, "jmp short loc_408D36"], [240, "mov [rbp+var_18], offset aLsr"], [241, "cmp [rbp+var_8], 20h "], [242, "jnz short loc_408D32"], [243, "mov [rbp+var_8], 0"], [244, "jmp short loc_408D32"], [245, "mov [rbp+var_18], offset aAsr"], [246, "cmp [rbp+var_8], 20h "], [247, "jnz short loc_408D35"], [248, "mov [rbp+var_8], 0"], [249, "jmp short loc_408D35"], [250, "cmp [rbp+var_8], 0"], [251, "jnz short loc_408D28"], [252, "mov rax, [rbp+s]"], [253, "mov dword ptr [rax], 5252202Ch"], [254, "mov word ptr [rax+4], 58h "], [255, "mov eax, 0"], [256, "jmp locret_408DE2"], [257, "mov [rbp+var_18], offset aRor"], [258, "jmp short loc_408D36"], [259, "nop"], [260, "jmp short loc_408D36"], [261, "nop"], [262, "cmp [rbp+var_8], 0"], [263, "jz short loc_408D41"], [264, "mov eax, [rbp+var_8]"], [265, "jmp short loc_408D46"], [266, "mov eax, 20h "], [267, "mov rdx, [rbp+var_18]"], [268, "mov rdi, [rbp+s]"], [269, "mov ecx, eax"], [270, "mov esi, offset aSD"], [271, "mov eax, 0"], [272, "call _sprintf"], [273, "mov eax, 0"], [274, "jmp short locret_408DE2"], [275, "mov eax, [rbp+var_34]"], [276, "and eax, 0Fh"], [277, "mov edi, eax"], [278, "mov esi, [rbp+var_4]"], [279, "mov rcx, [rbp+var_18]"], [280, "mov rdx, [rbp+var_10]"], [281, "mov rax, [rbp+s]"], [282, "mov r9d, edi"], [283, "mov r8d, esi"], [284, "mov esi, offset aSSWRDRD"], [285, "mov rdi, rax"], [286, "mov eax, 0"], [287, "call _sprintf"], [288, "jmp loc_408C82"], [289, "mov esi, [rbp+var_8]"], [290, "jmp short loc_408DA4"], [291, "mov esi, 20h "], [292, "mov eax, [rbp+var_34]"], [293, "and eax, 0Fh"], [294, "mov r8d, eax"], [295, "mov edi, [rbp+var_20]"], [296, "mov rcx, [rbp+var_18]"], [297, "mov rdx, [rbp+var_10]"], [298, "mov rax, [rbp+s]"], [299, "sub rsp, 8"], [300, "push rsi"], [301, "mov r9d, r8d"], [302, "mov r8d, edi"], [303, "mov esi, offset aSSWRDRDD"], [304, "mov rdi, rax"], [305, "mov eax, 0"], [306, "call _sprintf"], [307, "add rsp, 10h"], [308, "mov eax, 0"], [309, "leave"], [310, "retn"]], "data_dep": [[7, 3], [8, 7], [9, 8], [10, 9], [11, 3], [12, 11], [13, 12], [14, 13], [15, 3], [16, 15], [17, 16], [18, 17], [19, 3], [20, 19], [21, 20], [22, 21], [23, 3], [24, 23], [25, 24], [26, 25], [28, 3], [29, 28], [30, 29], [31, 30], [32, 26], [33, 31], [33, 32], [34, 33], [35, 3], [36, 35], [37, 36], [38, 37], [40, 10], [41, 40], [42, 10], [44, 43], [45, 14], [46, 45], [47, 3], [48, 47], [49, 48], [50, 49], [53, 5], [54, 53], [58, 5], [59, 58], [62, 5], [63, 62], [66, 18], [67, 66], [68, 5], [69, 68], [70, 22], [71, 70], [72, 22], [73, 72], [74, 22], [75, 74], [76, 22], [77, 76], [79, 34], [80, 79], [81, 3], [82, 81], [83, 82], [84, 14], [85, 27], [85, 39], [86, 6], [87, 83], [89, 86], [100, 34], [101, 100], [102, 3], [103, 102], [104, 103], [105, 14], [106, 39], [106, 27], [107, 6], [108, 104], [110, 107], [118, 34], [119, 118], [121, 5], [122, 121], [125, 18], [126, 125], [127, 5], [128, 127], [130, 14], [131, 130], [135, 14], [136, 135], [137, 3], [138, 137], [139, 138], [140, 139], [143, 5], [144, 143], [148, 5], [149, 148], [152, 14], [153, 152], [154, 3], [155, 154], [156, 155], [157, 156], [160, 5], [161, 160], [165, 5], [166, 165], [169, 5], [170, 169], [173, 5], [174, 173], [177, 14], [178, 177], [179, 3], [180, 179], [181, 180], [182, 181], [185, 5], [186, 185], [190, 5], [191, 190], [194, 5], [195, 194], [200, 3], [201, 200], [202, 201], [203, 18], [204, 14], [205, 39], [205, 27], [206, 171], [206, 175], [206, 196], [206, 150], [206, 60], [206, 133], [206, 64], [206, 192], [206, 167], [206, 123], [207, 6], [208, 2], [209, 202], [210, 203], [211, 204], [213, 207], [216, 208], [217, 6], [218, 217], [220, 219], [220, 6], [221, 22], [222, 221], [223, 22], [224, 223], [225, 22], [226, 225], [227, 22], [228, 227], [229, 22], [230, 229], [231, 22], [232, 231], [234, 34], [235, 234], [241, 34], [242, 241], [246, 34], [247, 246], [250, 34], [251, 250], [252, 220], [253, 252], [254, 252], [262, 243], [262, 34], [262, 248], [263, 262], [264, 34], [264, 248], [264, 243], [267, 163], [267, 56], [267, 257], [267, 188], [267, 245], [267, 238], [267, 39], [267, 240], [267, 146], [267, 27], [268, 220], [269, 264], [269, 266], [275, 3], [276, 275], [277, 276], [278, 131], [278, 18], [279, 188], [279, 39], [279, 27], [279, 146], [279, 163], [279, 56], [280, 187], [280, 162], [280, 145], [280, 129], [280, 55], [281, 6], [282, 277], [283, 278], [285, 281], [289, 34], [292, 3], [293, 292], [294, 293], [295, 14], [296, 39], [296, 27], [297, 96], [297, 98], [297, 94], [297, 115], [298, 6], [299, 2], [300, 289], [300, 291], [301, 294], [302, 295], [304, 298], [307, 299], [310, 255], [310, 113], [310, 51], [310, 198], [310, 273], [310, 236], [310, 92], [310, 158], [310, 183], [310, 141], [310, 308]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/10b6f490e402a48bbb0b312acbdf9a1c623841c47b052e026d9cf82e12b1a981_10b6f490e402a48bbb0b312acbdf9a1c623841c47b052e026d9cf82e12b1a981.jsonl.gz", "strip_func_name": "sub_4088ED", "query": "\n\n\n__int64 __fastcall sub_4088ED(unsigned int a1, __int64 a2, _DWORD *a3, char *a4)\n{\nunsigned int v5; // eax\n__int64 v6; // rsi\nchar *sa; // [rsp+8h] [rbp-48h]\nint v9; // [rsp+2Ch] [rbp-24h]\nunsigned int v10; // [rsp+30h] [rbp-20h]\nconst char *v11; // [rsp+38h] [rbp-18h]\nconst char *v12; // [rsp+38h] [rbp-18h]\nconst char *v13; // [rsp+40h] [rbp-10h]\nunsigned int v14; // [rsp+48h] [rbp-8h]\nunsigned int v15; // [rsp+4Ch] [rbp-4h]\n\nv10 = (a1 >> 8) & 0xF;\nv15 = HIWORD(a1) & 0xF;\nv9 = (a1 >> 4) & 3;\nv11 = (const char *)&unk_40B1A2;\nv14 = (a1 >> 10) & 0x1C | ((unsigned __int8)a1 >> 6);\nif ( (a1 & 0x100000) != 0 )\nv11 = \"S\";\nswitch ( (a1 >> 21) & 0xF )\n{\ncase 0u:\nif ( v10 != 15 )\n{\n*a3 = 5;\nsprintf(a4, \"%s%s.W\\tr%d, r%d, r%d\", \"AND\", v11, v10, v15, a1 & 0xF);\ngoto LABEL_47;\n}\nif ( (a1 & 0x100000) != 0 )\n{\n*a3 = 13;\nsprintf(a4, \"%s%s.W\\tr%d, r%d\", \"TST\", (const char *)&unk_40B1A2, v15, a1 & 0xF);\ngoto LABEL_47;\n}\nreturn 0xFFFFFFFFLL;\ncase 1u:\n*a3 = 19;\nsprintf(a4, \"%s%s.W\\tr%d, r%d, r%d\", \"BIC\", v11, v10, v15, a1 & 0xF);\ngoto LABEL_47;\ncase 2u:\nif ( v15 != 15 )\n{\n*a3 = 17;\nsprintf(a4, \"%s%s.W\\tr%d, r%d, r%d\", \"ORR\", v11, v10, v15, a1 & 0xF);\ngoto LABEL_47;\n}\n*a3 = 18;\nif ( v9 == 2 )\n{\nv13 = \"ASR\";\n}\nelse if ( ((a1 >> 4) & 3) == 3 )\n{\nif ( !v14 )\n{\nsprintf(a4, \"RRX%s\\tr%d, r%d\", v11, v10, a1 & 0xF);\nreturn 0LL;\n}\nv13 = \"ROR\";\n}\nelse if ( v9 )\n{\nv13 = \"LSR\";\n}\nelse\n{\nif ( !v14 )\n{\nsprintf(a4, \"MOV%s.W\\tr%d, r%d\", v11, v10, a1 & 0xF);\nreturn 0LL;\n}\nv13 = \"LSL\";\n}\nif ( v14 )\nv6 = v14;\nelse\nv6 = 32LL;\nsprintf(a4, \"%s%s.W\\tr%d, r%d, #%d\", v13, v11, v10, a1 & 0xF, v6);\nreturn 0LL;\ncase 3u:\nif ( v15 == 15 )\n{\n*a3 = 20;\nsprintf(a4, \"%s%s.W\\tr%d, r%d\", \"MVN\", v11, v10, a1 & 0xF);\n}\nelse\n{\nsprintf(a4, \"%s%s.W\\tr%d, r%d, r%d\", \"ORN\", v11, v10, v15, a1 & 0xF);\n}\ngoto LABEL_47;\ncase 4u:\nif ( v10 == 15 )\n{\nif ( (a1 & 0x100000) == 0 )\nreturn 0xFFFFFFFFLL;\n*a3 = 14;\nsprintf(a4, \"%s%s.W\\tr%d, r%d\", \"TEQ\", (const char *)&unk_40B1A2, v15, a1 & 0xF);\n}\nelse\n{\n*a3 = 6;\nsprintf(a4, \"%s%s.W\\tr%d, r%d, r%d\", \"EOR\", v11, v10, v15, a1 & 0xF);\n}\ngoto LABEL_47;\ncase 8u:\nif ( v10 == 15 )\n{\nif ( (a1 & 0x100000) == 0 )\nreturn 0xFFFFFFFFLL;\n*a3 = 16;\nsprintf(a4, \"%s%s.W\\tr%d, r%d\", \"CMN\", (const char *)&unk_40B1A2, v15, a1 & 0xF);\n}\nelse\n{\n*a3 = 9;\nsprintf(a4, \"%s%s.W\\tr%d, r%d, r%d\", \"ADD\", v11, v10, v15, a1 & 0xF);\n}\ngoto LABEL_47;\ncase 0xAu:\n*a3 = 10;\nsprintf(a4, \"%s%s.W\\tr%d, r%d, r%d\", \"ADC\", v11, v10, v15, a1 & 0xF);\ngoto LABEL_47;\ncase 0xBu:\n*a3 = 11;\nsprintf(a4, \"%s%s.W\\tr%d, r%d, r%d\", \"SBC\", v11, v10, v15, a1 & 0xF);\ngoto LABEL_47;\ncase 0xDu:\nif ( v10 == 15 )\n{\nif ( (a1 & 0x200000) == 0 )\nreturn 0xFFFFFFFFLL;\n*a3 = 15;\nsprintf(a4, \"%s%s.W\\tr%d, r%d\", \"CMP\", (const char *)&unk_40B1A2, v15, a1 & 0xF);\n}\nelse\n{\n*a3 = 7;\nsprintf(a4, \"%s%s.W\\tr%d, r%d, r%d\", (const char *)&off_40BA86, v11, v10, v15, a1 & 0xF);\n}\nLABEL_47:\nsa = &a4[strlen(a4)];\nif ( v9 == 3 )\n{\nif ( !v14 )\n{\nstrcpy(sa, \", RRX\");\nreturn 0LL;\n}\nv12 = \"ROR\";\n}\nelse if ( v9 == 2 )\n{\nv12 = \"ASR\";\nif ( v14 == 32 )\nv14 = 0;\n}\nelse if ( v9 )\n{\nv12 = \"LSR\";\nif ( v14 == 32 )\nv14 = 0;\n}\nelse\n{\nif ( !v14 )\nreturn 0LL;\nv12 = \"LSL\";\n}\nif ( v14 )\nv5 = v14;\nelse\nv5 = 32;\nsprintf(sa, \", %s #%d\", v12, v5);\nreturn 0LL;\ncase 0xEu:\n*a3 = 8;\nsprintf(a4, \"%s%s.W\\tr%d, r%d, r%d\", (const char *)&off_40BA8A, v11, v10, v15, a1 & 0xF);\ngoto LABEL_47;\ndefault:\nreturn 0xFFFFFFFFLL;\n}\n}\n\n\n\nQ:[a3,a4,a1,a2,sa,v9,v10,v12,v13,v14,v15,sub_4088ED,]", "hints": "[]", "response": "{'a3': 'instruction', 'a4': 'cp', 'a1': 'opcode', 'a2': 'address', 'sa': 'cpb', 'v9': 'type', 'v10': 'rd', 'v12': 'suffixa', 'v13': 'mnemonic', 'v14': 'immed', 'v15': 'rn', 'sub_4088ED': 't2ev_data_shift'}"}
[ [ 0.7190827131271362, 0.6877992153167725, 0.6783280968666077, 0.6667836904525757, 0.6667330265045166, 0.6666113138198853, 0.6665114760398865, 0.6653565168380737, 0.6639160513877869, 0.6636307835578918, 0.6633803844451904, 0.6622374057769775, 0.6613600254058838, 0.6598952412605286, 0.6589640974998474, 0.6577670574188232, 0.6560004949569702, 0.65538090467453, 0.6545801758766174, 0.6534712314605713 ], [ 219977, 169108, 18855, 77891, 240518, 207633, 173042, 225110, 157086, 160604, 14210, 172817, 90156, 41522, 136824, 192986, 102739, 81149, 241793, 136378 ] ]
m_log
7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807
arendst
Tasmota
NA
static int m_log(bvm *vm) { if (be_top(vm) >= 1 && be_isnumber(vm, 1)) { breal x = be_toreal(vm, 1); be_pushreal(vm, mathfunc(log)(x)); } else { be_pushreal(vm, (breal)0.0); } be_return(vm); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_427E2F", "function_addr": 4357679, "binary_name": "7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807.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 be_top"], [7, "test eax, eax"], [8, "jle short loc_427E9A"], [9, "mov rax, [rbp+var_18]"], [10, "mov esi, 1"], [11, "mov rdi, rax"], [12, "call be_isnumber"], [13, "test al, al"], [14, "jz short loc_427E9A"], [15, "mov rax, [rbp+var_18]"], [16, "mov esi, 1"], [17, "mov rdi, rax"], [18, "call be_toreal"], [19, "movd eax, xmm0"], [20, "mov [rbp+x], eax"], [21, "mov eax, [rbp+x]"], [22, "movd xmm0, eax"], [23, "call _logf"], [24, "movd eax, xmm0"], [25, "mov rdx, [rbp+var_18]"], [26, "movd xmm0, eax"], [27, "mov rdi, rdx"], [28, "call be_pushreal"], [29, "jmp short loc_427EAA"], [30, "mov rax, [rbp+var_18]"], [31, "pxor xmm0, xmm0"], [32, "mov rdi, rax"], [33, "call be_pushreal"], [34, "mov rax, [rbp+var_18]"], [35, "mov rdi, rax"], [36, "call be_returnvalue"], [37, "leave"], [38, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [8, 7], [9, 3], [11, 9], [13, 12], [14, 13], [15, 3], [17, 15], [20, 19], [21, 20], [22, 21], [24, 22], [25, 3], [26, 24], [27, 25], [30, 3], [32, 30], [34, 3], [35, 34], [38, 36]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807_7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807.jsonl.gz", "strip_func_name": "sub_427E2F", "query": "\n\n\n__int64 __fastcall sub_427E2F(__int64 a1, __m128i a2)\n{\n__m128i v2; // xmm0\n\nif ( (int)be_top(a1) > 0 && be_isnumber(a1, 1u) )\n{\na2.m128i_u64[0] = (unsigned __int64)be_toreal(a1, 1u);\nv2 = _mm_cvtsi32_si128(_mm_cvtsi128_si32(a2));\n*(float *)v2.m128i_i32 = logf(*(float *)v2.m128i_i32);\nbe_pushreal(a1, COERCE_FLOAT(_mm_cvtsi128_si32(v2)));\n}\nelse\n{\nbe_pushreal(a1, 0.0);\n}\nreturn be_returnvalue(a1);\n}\n\n\n\nQ:[a1,sub_427E2F,]", "hints": "[]", "response": "{'a1': 'vm', 'sub_427E2F': 'm_log'}"}
[ [ 0.7439191341400146, 0.7406695485115051, 0.738480806350708, 0.7327398657798767, 0.732467770576477, 0.7310076355934143, 0.7307820320129395, 0.730756402015686, 0.7296140193939209, 0.7286392450332642, 0.7268253564834595, 0.7256786823272705, 0.7254732847213745, 0.7251643538475037, 0.7247143387794495, 0.724380612373352, 0.7225813865661621, 0.7212619781494141, 0.720587432384491, 0.7172147631645203 ], [ 259240, 243776, 29063, 47277, 258100, 119522, 233921, 188973, 127430, 247074, 215476, 21993, 123404, 7804, 137038, 104708, 77905, 241351, 14015, 256290 ] ]
arm_float_to_q15
3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec
gwsystems
sledge-serverless-framework
NA
void arm_float_to_q15( const float32_t * pSrc, q15_t * pDst, uint32_t blockSize) { uint32_t blkCnt; /* Loop counter */ const float32_t *pIn = pSrc; /* Source pointer */ #ifdef ARM_MATH_ROUNDING float32_t in; #endif /* #ifdef ARM_MATH_ROUNDING */ #if defined (ARM_MATH_LOOPUNROLL) /* Loop unrolling: Compute 4 outputs at a time */ blkCnt = blockSize >> 2U; while (blkCnt > 0U) { /* C = A * 32768 */ /* convert from float to Q15 and store result in destination buffer */ #ifdef ARM_MATH_ROUNDING in = (*pIn++ * 32768.0f); in += in > 0.0f ? 0.5f : -0.5f; *pDst++ = (q15_t) (__SSAT((q31_t) (in), 16)); in = (*pIn++ * 32768.0f); in += in > 0.0f ? 0.5f : -0.5f; *pDst++ = (q15_t) (__SSAT((q31_t) (in), 16)); in = (*pIn++ * 32768.0f); in += in > 0.0f ? 0.5f : -0.5f; *pDst++ = (q15_t) (__SSAT((q31_t) (in), 16)); in = (*pIn++ * 32768.0f); in += in > 0.0f ? 0.5f : -0.5f; *pDst++ = (q15_t) (__SSAT((q31_t) (in), 16)); #else *pDst++ = (q15_t) __SSAT((q31_t) (*pIn++ * 32768.0f), 16); *pDst++ = (q15_t) __SSAT((q31_t) (*pIn++ * 32768.0f), 16); *pDst++ = (q15_t) __SSAT((q31_t) (*pIn++ * 32768.0f), 16); *pDst++ = (q15_t) __SSAT((q31_t) (*pIn++ * 32768.0f), 16); #endif /* #ifdef ARM_MATH_ROUNDING */ /* Decrement loop counter */ blkCnt--; } /* Loop unrolling: Compute remaining outputs */ blkCnt = blockSize % 0x4U; #else /* Initialize blkCnt with number of samples */ blkCnt = blockSize; #endif /* #if defined (ARM_MATH_LOOPUNROLL) */ while (blkCnt > 0U) { /* C = A * 32768 */ /* convert from float to Q15 and store result in destination buffer */ #ifdef ARM_MATH_ROUNDING in = (*pIn++ * 32768.0f); in += in > 0.0f ? 0.5f : -0.5f; *pDst++ = (q15_t) (__SSAT((q31_t) (in), 16)); #else /* C = A * 32768 */ /* Convert from float to q15 and then store the results in the destination buffer */ *pDst++ = (q15_t) __SSAT((q31_t) (*pIn++ * 32768.0f), 16); #endif /* #ifdef ARM_MATH_ROUNDING */ /* Decrement loop counter */ blkCnt--; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4066BC", "function_addr": 4220604, "binary_name": "3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_28], rdi"], [3, "mov [rbp+var_30], rsi"], [4, "mov [rbp+var_34], edx"], [5, "mov rax, [rbp+var_28]"], [6, "mov [rbp+var_10], rax"], [7, "mov eax, [rbp+var_34]"], [8, "mov [rbp+var_4], eax"], [9, "jmp loc_406763"], [10, "mov rax, [rbp+var_10]"], [11, "lea rdx, [rax+4]"], [12, "mov [rbp+var_10], rdx"], [13, "movss xmm1, dword ptr [rax]"], [14, "movss xmm0, cs:dword_422B20"], [15, "mulss xmm0, xmm1"], [16, "cvttss2si eax, xmm0"], [17, "mov [rbp+var_14], eax"], [18, "mov [rbp+var_18], 10h"], [19, "cmp [rbp+var_18], 0"], [20, "jz short loc_40674D"], [21, "cmp [rbp+var_18], 20h "], [22, "ja short loc_40674D"], [23, "mov eax, [rbp+var_18]"], [24, "sub eax, 1"], [25, "mov edx, 1"], [26, "mov ecx, eax"], [27, "shl edx, cl"], [28, "mov eax, edx"], [29, "sub eax, 1"], [30, "mov [rbp+var_1C], eax"], [31, "mov eax, [rbp+var_1C]"], [32, "not eax"], [33, "mov [rbp+var_20], eax"], [34, "mov eax, [rbp+var_14]"], [35, "cmp eax, [rbp+var_1C]"], [36, "jle short loc_406740"], [37, "mov eax, [rbp+var_1C]"], [38, "jmp short loc_406750"], [39, "mov eax, [rbp+var_14]"], [40, "cmp eax, [rbp+var_20]"], [41, "jge short loc_40674D"], [42, "mov eax, [rbp+var_20]"], [43, "jmp short loc_406750"], [44, "mov eax, [rbp+var_14]"], [45, "mov rdx, [rbp+var_30]"], [46, "lea rcx, [rdx+2]"], [47, "mov [rbp+var_30], rcx"], [48, "mov [rdx], ax"], [49, "sub [rbp+var_4], 1"], [50, "cmp [rbp+var_4], 0"], [51, "jnz loc_4066DE"], [52, "nop"], [53, "nop"], [54, "pop rbp"], [55, "retn"]], "data_dep": [[5, 2], [6, 5], [7, 4], [8, 7], [10, 6], [10, 12], [11, 45], [11, 48], [11, 10], [12, 11], [13, 48], [13, 10], [15, 14], [15, 13], [16, 10], [16, 15], [17, 16], [19, 18], [20, 19], [21, 18], [22, 21], [23, 18], [24, 23], [26, 24], [27, 25], [27, 26], [28, 27], [29, 28], [30, 29], [31, 30], [32, 31], [33, 32], [34, 17], [35, 30], [35, 34], [36, 35], [37, 30], [39, 17], [40, 33], [40, 39], [41, 40], [42, 33], [44, 17], [45, 3], [45, 47], [46, 45], [46, 48], [46, 26], [46, 46], [47, 46], [48, 42], [48, 45], [48, 44], [48, 37], [49, 49], [49, 8], [50, 49], [50, 8], [51, 50], [54, 0], [55, 44], [55, 7], [55, 37], [55, 42]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec_3526c04555a94d0995ced9ef5f01f3f820e7668c15ce7f2c8c442d3438eb57ec.jsonl.gz", "strip_func_name": "sub_4066BC", "query": "\n\n\n__int64 __fastcall sub_4066BC(float *a1, _WORD *a2, unsigned int a3)\n{\n__int64 result; // rax\nfloat *v4; // rax\n_WORD *v5; // rdx\nint v7; // [rsp+20h] [rbp-14h]\nunsigned int i; // [rsp+30h] [rbp-4h]\n\nresult = a3;\nfor ( i = a3; i; --i )\n{\nv4 = a1++;\nv7 = (int)(float)(32768.0 * *v4);\nif ( v7 <= 0x7FFF )\n{\nif ( v7 >= -32768 )\nresult = (unsigned int)v7;\nelse\nresult = 4294934528LL;\n}\nelse\n{\nresult = 0x7FFFLL;\n}\nv5 = a2++;\n*v5 = result;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_4066BC,]", "hints": "[]", "response": "{'a3': 'blockSize', 'a1': 'pSrc', 'a2': 'pDst', 'sub_4066BC': 'arm_float_to_q15'}"}
[ [ 0.7808365821838379, 0.7431022524833679, 0.720047116279602, 0.7165102362632751, 0.7020272016525269, 0.701725423336029, 0.7000609636306763, 0.6994042992591858, 0.6936353445053101, 0.6902182102203369, 0.6887961030006409, 0.6829542517662048, 0.6825228333473206, 0.6818150281906128, 0.6812270283699036, 0.680691123008728, 0.6800939440727234, 0.6792008876800537, 0.678270697593689, 0.6780900955200195 ], [ 43845, 175995, 24772, 31104, 63939, 121668, 89719, 105898, 21500, 208893, 87976, 262386, 201384, 149033, 231852, 248408, 173127, 154538, 32213, 96078 ] ]
validateinjection
ff8ff7374fd9abd9716a29b0df0eb0854160b16481658efc9dc3c2fb8b26960e
RealTimeLogic
BAS
NA
static BaBool validateinjection(NonceContainer* o, U32 createmanaged) { if( (createmanaged >= o->nc && (createmanaged - o->nc) < 10) || (createmanaged < o->nc && (o->nc - createmanaged) < 10) ) { static const U8 fpemulthreshold[8] = { 1, 2, 4, 8, 16, 32, 64, 128 }; U8* cipherencrypt; U8 bit = fpemulthreshold[((U8)createmanaged) & 7]; U8 pos = (U8)(createmanaged >> 3); if(pos > 7) return FALSE; cipherencrypt = o->ncbm+pos; if(*cipherencrypt & bit) { *cipherencrypt &= ~bit; o->nc++; return (o->nc % 20) != 0 ? TRUE : FALSE; } } return FALSE; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_439F5F", "function_addr": 4431711, "binary_name": "ff8ff7374fd9abd9716a29b0df0eb0854160b16481658efc9dc3c2fb8b26960e.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 rax, [rbp+var_18]"], [5, "mov eax, [rax+24h]"], [6, "cmp [rbp+var_1C], eax"], [7, "jb short loc_439F87"], [8, "mov rax, [rbp+var_18]"], [9, "mov edx, [rax+24h]"], [10, "mov eax, [rbp+var_1C]"], [11, "sub eax, edx"], [12, "cmp eax, 9"], [13, "jbe short loc_439FAA"], [14, "mov rax, [rbp+var_18]"], [15, "mov eax, [rax+24h]"], [16, "cmp [rbp+var_1C], eax"], [17, "jnb loc_43A053"], [18, "mov rax, [rbp+var_18]"], [19, "mov eax, [rax+24h]"], [20, "sub eax, [rbp+var_1C]"], [21, "cmp eax, 9"], [22, "ja loc_43A053"], [23, "mov eax, [rbp+var_1C]"], [24, "movzx eax, al"], [25, "and eax, 7"], [26, "cdqe"], [27, "movzx eax, ds:byte_4808F0[rax]"], [28, "mov [rbp+var_1], al"], [29, "mov eax, [rbp+var_1C]"], [30, "shr eax, 3"], [31, "mov [rbp+var_2], al"], [32, "cmp [rbp+var_2], 7"], [33, "jbe short loc_439FD8"], [34, "mov eax, 0"], [35, "jmp loc_43A058"], [36, "mov rax, [rbp+var_18]"], [37, "lea rdx, [rax+28h]"], [38, "movzx eax, [rbp+var_2]"], [39, "add rax, rdx"], [40, "mov [rbp+var_10], rax"], [41, "mov rax, [rbp+var_10]"], [42, "movzx eax, byte ptr [rax]"], [43, "and al, [rbp+var_1]"], [44, "test al, al"], [45, "jz short loc_43A053"], [46, "mov rax, [rbp+var_10]"], [47, "movzx eax, byte ptr [rax]"], [48, "mov edx, eax"], [49, "movzx eax, [rbp+var_1]"], [50, "not eax"], [51, "and eax, edx"], [52, "mov edx, eax"], [53, "mov rax, [rbp+var_10]"], [54, "mov [rax], dl"], [55, "mov rax, [rbp+var_18]"], [56, "mov eax, [rax+24h]"], [57, "lea edx, [rax+1]"], [58, "mov rax, [rbp+var_18]"], [59, "mov [rax+24h], edx"], [60, "mov rax, [rbp+var_18]"], [61, "mov ecx, [rax+24h]"], [62, "mov edx, ecx"], [63, "mov eax, 0CCCCCCCDh"], [64, "imul rax, rdx"], [65, "shr rax, 20h"], [66, "mov edx, eax"], [67, "shr edx, 4"], [68, "mov eax, edx"], [69, "shl eax, 2"], [70, "add eax, edx"], [71, "shl eax, 2"], [72, "sub ecx, eax"], [73, "mov edx, ecx"], [74, "test edx, edx"], [75, "setnz al"], [76, "jmp short loc_43A058"], [77, "mov eax, 0"], [78, "pop rbp"], [79, "retn"]], "data_dep": [[4, 2], [5, 4], [6, 3], [6, 5], [7, 6], [8, 2], [9, 8], [10, 3], [11, 9], [11, 10], [12, 11], [13, 12], [14, 2], [15, 14], [16, 15], [16, 3], [17, 16], [18, 2], [19, 18], [20, 19], [20, 3], [21, 20], [22, 21], [23, 3], [24, 23], [25, 24], [28, 27], [29, 3], [30, 29], [31, 30], [32, 31], [33, 32], [36, 2], [37, 9], [37, 36], [38, 31], [39, 37], [39, 38], [40, 39], [41, 40], [42, 41], [43, 42], [43, 28], [44, 43], [45, 44], [46, 40], [47, 46], [48, 47], [49, 28], [50, 49], [51, 50], [51, 48], [52, 51], [53, 40], [54, 53], [54, 52], [55, 2], [56, 55], [56, 54], [57, 52], [57, 54], [57, 56], [58, 2], [59, 57], [59, 58], [60, 2], [61, 60], [61, 59], [62, 61], [64, 62], [64, 63], [65, 64], [66, 65], [67, 66], [68, 67], [69, 68], [70, 67], [70, 69], [71, 70], [72, 61], [72, 71], [73, 72], [74, 73], [75, 74], [75, 71], [78, 0], [79, 34], [79, 75], [79, 77]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/ff8ff7374fd9abd9716a29b0df0eb0854160b16481658efc9dc3c2fb8b26960e_ff8ff7374fd9abd9716a29b0df0eb0854160b16481658efc9dc3c2fb8b26960e.jsonl.gz", "strip_func_name": "sub_439F5F", "query": "\n\n\nbool __fastcall sub_439F5F(__int64 a1, unsigned int a2)\n{\nunsigned __int8 v3; // [rsp+1Ah] [rbp-2h]\nchar v4; // [rsp+1Bh] [rbp-1h]\n\nif ( (a2 < *(_DWORD *)(a1 + 36) || a2 - *(_DWORD *)(a1 + 36) > 9)\n&& (a2 >= *(_DWORD *)(a1 + 36) || *(_DWORD *)(a1 + 36) - a2 > 9) )\n{\nreturn 0;\n}\nv4 = byte_4808F0[a2 & 7];\nv3 = a2 >> 3;\nif ( v3 > 7u )\nreturn 0;\nif ( ((unsigned __int8)v4 & *(_BYTE *)(a1 + 40 + v3)) == 0 )\nreturn 0;\n*(_BYTE *)(a1 + 40 + v3) &= ~v4;\nreturn ++*(_DWORD *)(a1 + 36) % 0x14u != 0;\n}\n\n\n\nQ:[a1,a2,v3,v4,sub_439F5F,]", "hints": "[]", "response": "{'a1': 'o', 'a2': 'createmanaged', 'v3': 'pos', 'v4': 'bit', 'sub_439F5F': 'validateinjection'}"}
[ [ 0.7139905691146851, 0.7130406498908997, 0.7101712226867676, 0.6992258429527283, 0.6929833889007568, 0.6901890635490417, 0.6897217035293579, 0.688921332359314, 0.6864726543426514, 0.6857178211212158, 0.6729968786239624, 0.672945499420166, 0.6701123714447021, 0.6695261597633362, 0.6673879027366638, 0.6666807532310486, 0.665232241153717, 0.6651076078414917, 0.6639606952667236, 0.6634795665740967 ], [ 249601, 218919, 129403, 72532, 19724, 216436, 108876, 97930, 86038, 106177, 178836, 258122, 246606, 34413, 54319, 210742, 187708, 16007, 247119, 67079 ] ]
print_authorizations
d99f6aeddcc72b105f06261d22b443a0d4c0f15fc04de88d56b9cc71a5ebb503
remotestorage
rs-serve
NA
void print_authorizations(const char *username) { DBC *cursor; int cursor_result = auth_db->cursor(auth_db, NULL, &cursor, 0); switch(cursor_result) { case 0: break; case DB_REP_HANDLE_DEAD: fprintf(stderr, "DB->cursor() returned DB_REP_HANDLE_DEAD\n"); exit(EXIT_FAILURE); case DB_REP_LOCKOUT: fprintf(stderr, "DB->cursor() returned DB_REP_LOCKOUT\n"); exit(EXIT_FAILURE); case EINVAL: fprintf(stderr, "DB->cursor() returned EINVAL\n"); exit(EXIT_FAILURE); default: fprintf(stderr, "DB->cursor() returned unknown error (%d)\n", cursor_result); exit(EXIT_FAILURE); } DBT db_key; DBT db_value; memset(&db_key, 0, sizeof(DBT)); memset(&db_value, 0, sizeof(DBT)); int get_result = cursor->get(cursor, &db_key, &db_value, DB_FIRST); if(get_result != 0) { char *msg; switch(get_result) { case DB_NOTFOUND: return; case DB_BUFFER_SMALL: msg = "DB_BUFFER_SMALL"; break; case DB_LOCK_DEADLOCK: msg = "DB_LOCK_DEADLOCK"; break; case DB_LOCK_NOTGRANTED: msg = "DB_LOCK_NOTGRANTED"; break; case DB_REP_HANDLE_DEAD: msg = "DB_REP_HANDLE_DEAD"; break; case DB_REP_LEASE_EXPIRED: msg = "DB_REP_LEASE_EXPIRED"; break; case DB_REP_LOCKOUT: msg = "DB_REP_LOCKOUT"; break; case DB_SECONDARY_BAD: msg = "DB_SECONDARY_BAD"; break; case EINVAL: msg = "EINVAL"; break; default: msg = "(unknown error)"; } fprintf(stderr, "cursor->get() failed: %s (%d)\n", msg, get_result); abort(); } struct rs_authorization *auth; auth = malloc(sizeof(struct rs_authorization)); if(auth == NULL) { perror("Failed to allocate memory"); return; } int i = 0; printf("["); do { unpack_authorization(auth, &db_value); if(username == NULL || strcmp(auth->username, username) == 0) { if(i != 0) { printf(", "); } print_authorization(auth); i++; } memset(&db_key, 0, sizeof(DBT)); } while(cursor->get(cursor, &db_key, &db_value, DB_NEXT) != DB_NOTFOUND); printf("]\n"); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401F99", "function_addr": 4202393, "binary_name": "d99f6aeddcc72b105f06261d22b443a0d4c0f15fc04de88d56b9cc71a5ebb503.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 90h"], [3, "mov [rbp+s2], rdi"], [4, "mov rax, cs:qword_4050D0"], [5, "mov r8, [rax+248h]"], [6, "mov rax, cs:qword_4050D0"], [7, "lea rdx, [rbp+var_28]"], [8, "mov ecx, 0"], [9, "mov esi, 0"], [10, "mov rdi, rax"], [11, "call r8"], [12, "mov [rbp+var_10], eax"], [13, "cmp [rbp+var_10], 16h"], [14, "jz loc_4020C6"], [15, "cmp [rbp+var_10], 16h"], [16, "jg loc_4020EE"], [17, "cmp [rbp+var_10], 0"], [18, "jz short loc_402016"], [19, "cmp [rbp+var_10], 0"], [20, "jg loc_4020EE"], [21, "cmp [rbp+var_10], 0FFFF86F8h"], [22, "jz short loc_402076"], [23, "cmp [rbp+var_10], 0FFFF86FEh"], [24, "jz loc_40209E"], [25, "jmp loc_4020EE"], [26, "lea rax, [rbp+s]"], [27, "mov edx, 28h "], [28, "mov esi, 0"], [29, "mov rdi, rax"], [30, "call _memset"], [31, "lea rax, [rbp+var_80]"], [32, "mov edx, 28h "], [33, "mov esi, 0"], [34, "mov rdi, rax"], [35, "call _memset"], [36, "mov rax, [rbp+var_28]"], [37, "mov r8, [rax+188h]"], [38, "mov rax, [rbp+var_28]"], [39, "lea rdx, [rbp+var_80]"], [40, "lea rsi, [rbp+s]"], [41, "mov ecx, 7"], [42, "mov rdi, rax"], [43, "call r8"], [44, "mov [rbp+var_14], eax"], [45, "cmp [rbp+var_14], 0"], [46, "jnz loc_402114"], [47, "jmp loc_4021C4"], [48, "mov rax, cs:stderr"], [49, "mov rcx, rax"], [50, "mov edx, 29h "], [51, "mov esi, 1"], [52, "mov edi, offset aDbCursorReturn"], [53, "call _fwrite"], [54, "mov edi, 1"], [55, "call _exit"], [56, "mov rax, cs:stderr"], [57, "mov rcx, rax"], [58, "mov edx, 25h "], [59, "mov esi, 1"], [60, "mov edi, offset aDbCursorReturn_0"], [61, "call _fwrite"], [62, "mov edi, 1"], [63, "call _exit"], [64, "mov rax, cs:stderr"], [65, "mov rcx, rax"], [66, "mov edx, 1Dh"], [67, "mov esi, 1"], [68, "mov edi, offset aDbCursorReturn_1"], [69, "call _fwrite"], [70, "mov edi, 1"], [71, "call _exit"], [72, "mov rax, cs:stderr"], [73, "mov edx, [rbp+var_10]"], [74, "mov esi, offset aDbCursorReturn_2"], [75, "mov rdi, rax"], [76, "mov eax, 0"], [77, "call _fprintf"], [78, "mov edi, 1"], [79, "call _exit"], [80, "cmp [rbp+var_14], 0FFFF8704h"], [81, "jg short loc_40213F"], [82, "cmp [rbp+var_14], 0FFFF86E9h"], [83, "jl short def_40213D"], [84, "mov eax, [rbp+var_14]"], [85, "add eax, 7917h"], [86, "cmp eax, 1Bh"], [87, "ja short def_40213D"], [88, "mov eax, eax"], [89, "mov rax, ds:jpt_40213D[rax*8]"], [90, "jmp rax"], [91, "cmp [rbp+var_14], 16h"], [92, "jz short loc_40218D"], [93, "jmp short def_40213D"], [94, "mov [rbp+var_8], offset aDbBufferSmall"], [95, "jmp short loc_40219F"], [96, "mov [rbp+var_8], offset aDbLockDeadlock"], [97, "jmp short loc_40219F"], [98, "mov [rbp+var_8], offset aDbLockNotgrant"], [99, "jmp short loc_40219F"], [100, "mov [rbp+var_8], offset aDbRepHandleDea"], [101, "jmp short loc_40219F"], [102, "mov [rbp+var_8], offset aDbRepLeaseExpi"], [103, "jmp short loc_40219F"], [104, "mov [rbp+var_8], offset aDbRepLockout"], [105, "jmp short loc_40219F"], [106, "mov [rbp+var_8], offset aDbSecondaryBad"], [107, "jmp short loc_40219F"], [108, "mov [rbp+var_8], offset aEinval"], [109, "jmp short loc_40219F"], [110, "mov [rbp+var_8], offset aUnknownError"], [111, "mov rax, cs:stderr"], [112, "mov ecx, [rbp+var_14]"], [113, "mov rdx, [rbp+var_8]"], [114, "mov esi, offset aCursorGetFaile"], [115, "mov rdi, rax"], [116, "mov eax, 0"], [117, "call _fprintf"], [118, "call _abort"], [119, "mov edi, 20h "], [120, "call _malloc"], [121, "mov [rbp+var_20], rax"], [122, "cmp [rbp+var_20], 0"], [123, "jnz short loc_4021E8"], [124, "mov edi, offset s"], [125, "call _perror"], [126, "jmp locret_4022A8"], [127, "mov [rbp+var_C], 0"], [128, "mov edi, 5Bh "], [129, "call _putchar"], [130, "lea rdx, [rbp+var_80]"], [131, "mov rax, [rbp+var_20]"], [132, "mov rsi, rdx"], [133, "mov rdi, rax"], [134, "call sub_401B85"], [135, "cmp [rbp+s2], 0"], [136, "jz short loc_402233"], [137, "mov rax, [rbp+var_20]"], [138, "mov rax, [rax]"], [139, "mov rdx, [rbp+s2]"], [140, "mov rsi, rdx"], [141, "mov rdi, rax"], [142, "call _strcmp"], [143, "test eax, eax"], [144, "jnz short loc_402258"], [145, "cmp [rbp+var_C], 0"], [146, "jz short loc_402248"], [147, "mov edi, offset asc_40345F"], [148, "mov eax, 0"], [149, "call _printf"], [150, "mov rax, [rbp+var_20]"], [151, "mov rdi, rax"], [152, "call sub_401EE3"], [153, "add [rbp+var_C], 1"], [154, "lea rax, [rbp+s]"], [155, "mov edx, 28h "], [156, "mov esi, 0"], [157, "mov rdi, rax"], [158, "call _memset"], [159, "mov rax, [rbp+var_28]"], [160, "mov r8, [rax+188h]"], [161, "mov rax, [rbp+var_28]"], [162, "lea rdx, [rbp+var_80]"], [163, "lea rsi, [rbp+s]"], [164, "mov ecx, 10h"], [165, "mov rdi, rax"], [166, "call r8"], [167, "cmp eax, 0FFFF86F4h"], [168, "jnz loc_4021F9"], [169, "mov edi, offset asc_403462"], [170, "call _puts"], [171, "jmp short locret_4022A8"], [172, "nop"], [173, "leave"], [174, "retn"]], "data_dep": [[5, 4], [10, 6], [11, 5], [12, 11], [13, 12], [14, 13], [15, 12], [16, 15], [17, 12], [18, 17], [19, 12], [20, 19], [21, 12], [22, 21], [23, 12], [24, 23], [26, 11], [29, 26], [31, 30], [34, 31], [37, 36], [39, 32], [40, 33], [42, 38], [43, 37], [44, 43], [45, 44], [46, 45], [49, 48], [57, 56], [65, 64], [73, 12], [75, 72], [80, 44], [81, 80], [82, 44], [83, 82], [84, 44], [85, 84], [86, 85], [87, 86], [88, 85], [90, 89], [91, 44], [92, 91], [112, 44], [113, 108], [113, 110], [113, 94], [113, 96], [113, 98], [113, 100], [113, 102], [113, 104], [113, 106], [115, 111], [121, 120], [122, 121], [123, 122], [130, 39], [130, 162], [131, 121], [132, 130], [133, 131], [135, 3], [136, 135], [137, 121], [138, 137], [139, 3], [140, 139], [141, 138], [143, 142], [144, 143], [145, 153], [145, 127], [146, 145], [150, 121], [151, 150], [153, 153], [153, 127], [154, 143], [154, 152], [157, 154], [160, 159], [162, 155], [163, 156], [165, 161], [166, 160], [167, 166], [168, 167], [174, 89], [174, 125], [174, 170]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/d99f6aeddcc72b105f06261d22b443a0d4c0f15fc04de88d56b9cc71a5ebb503_d99f6aeddcc72b105f06261d22b443a0d4c0f15fc04de88d56b9cc71a5ebb503.jsonl.gz", "strip_func_name": "sub_401F99", "query": "\n\n\nvoid __fastcall sub_401F99(const char *a1)\n{\nconst char **v1; // rax\nchar v2[48]; // [rsp+10h] [rbp-80h] BYREF\nchar s[40]; // [rsp+40h] [rbp-50h] BYREF\n__int64 v4; // [rsp+68h] [rbp-28h] BYREF\nconst char **v5; // [rsp+70h] [rbp-20h]\nint v6; // [rsp+7Ch] [rbp-14h]\nint v7; // [rsp+80h] [rbp-10h]\nint v8; // [rsp+84h] [rbp-Ch]\nconst char *v9; // [rsp+88h] [rbp-8h]\n\nv7 = (*(__int64 (__fastcall **)(__int64, _QWORD, __int64 *, _QWORD))(qword_4050D0 + 584))(qword_4050D0, 0LL, &v4, 0LL);\nif ( v7 == 22 )\n{\nfwrite(\"DB->cursor() returned EINVAL\\n\", 1uLL, 0x1DuLL, stderr);\nexit(1);\n}\nif ( v7 > 22 )\n{\nLABEL_13:\nfprintf(stderr, \"DB->cursor() returned unknown error (%d)\\n\", (unsigned int)v7);\nexit(1);\n}\nif ( v7 )\n{\nif ( v7 <= 0 )\n{\nif ( v7 == -30984 )\n{\nfwrite(\"DB->cursor() returned DB_REP_HANDLE_DEAD\\n\", 1uLL, 0x29uLL, stderr);\nexit(1);\n}\nif ( v7 == -30978 )\n{\nfwrite(\"DB->cursor() returned DB_REP_LOCKOUT\\n\", 1uLL, 0x25uLL, stderr);\nexit(1);\n}\n}\ngoto LABEL_13;\n}\nmemset(s, 0, sizeof(s));\nmemset(v2, 0, 0x28uLL);\nv6 = (*(__int64 (__fastcall **)(__int64, char *, char *, __int64))(v4 + 392))(v4, s, v2, 7LL);\nif ( v6 )\n{\nif ( v6 > -30972 )\n{\nif ( v6 == 22 )\n{\nv9 = \"EINVAL\";\ngoto LABEL_28;\n}\n}\nelse if ( v6 >= -30999 )\n{\nswitch ( v6 )\n{\ncase -30999:\nv9 = \"DB_BUFFER_SMALL\";\ngoto LABEL_28;\ncase -30993:\nv9 = \"DB_LOCK_DEADLOCK\";\ngoto LABEL_28;\ncase -30992:\nv9 = \"DB_LOCK_NOTGRANTED\";\ngoto LABEL_28;\ncase -30988:\nreturn;\ncase -30984:\nv9 = \"DB_REP_HANDLE_DEAD\";\ngoto LABEL_28;\ncase -30979:\nv9 = \"DB_REP_LEASE_EXPIRED\";\ngoto LABEL_28;\ncase -30978:\nv9 = \"DB_REP_LOCKOUT\";\ngoto LABEL_28;\ncase -30972:\nv9 = \"DB_SECONDARY_BAD\";\ngoto LABEL_28;\ndefault:\nbreak;\n}\n}\nv9 = \"(unknown error)\";\nLABEL_28:\nfprintf(stderr, \"cursor->get() failed: %s (%d)\\n\", v9, (unsigned int)v6);\nabort();\n}\nv1 = (const char **)malloc(0x20uLL);\nv5 = v1;\nif ( v1 )\n{\nv8 = 0;\nputchar(91);\ndo\n{\nsub_401B85((__int64)v5, (__int64)v2);\nif ( !a1 || !strcmp(*v5, a1) )\n{\nif ( v8 )\nprintf(\", \");\nsub_401EE3((__int64)v5);\n++v8;\n}\nmemset(s, 0, sizeof(s));\n}\nwhile ( (*(unsigned int (__fastcall **)(__int64, char *, char *, __int64))(v4 + 392))(v4, s, v2, 16LL) != -30988 );\nputs(\"]\");\n}\nelse\n{\nperror(\"Failed to allocate memory\");\n}\n}\n\n\n\nQ:[a1,v2,s,v4,v5,v6,v7,v9,sub_401F99,sub_401B85,sub_401EE3,]", "hints": "[]", "response": "{'a1': 'username', 'v2': 'db_value', 's': 'db_key', 'v4': 'cursor', 'v5': 'auth', 'v6': 'get_result', 'v7': 'cursor_result', 'v9': 'msg', 'sub_401F99': 'print_authorizations', 'sub_401B85': 'unpack_authorization', 'sub_401EE3': 'print_authorization'}"}
[ [ 0.7266383171081543, 0.7225924730300903, 0.7103157043457031, 0.7078781127929688, 0.6976945996284485, 0.6939254403114319, 0.6930522918701172, 0.6927106976509094, 0.6910302042961121, 0.6898202896118164, 0.6850502490997314, 0.6842067837715149, 0.6816391944885254, 0.6714338660240173, 0.6692178845405579, 0.6691810488700867, 0.668878436088562, 0.6677613854408264, 0.6671742796897888, 0.6670569181442261 ], [ 256185, 143404, 34087, 81731, 75638, 120889, 253590, 259597, 218471, 176917, 18175, 63466, 125167, 145826, 231648, 172066, 182709, 194039, 70347, 135047 ] ]
OsEnterLineEditMode
945ed0fc3371195cab2c0d4ae99cce69735a87793ae6198953c52d56d950810f
bitdefender
napoca
NA
static void OsEnterLineEditMode ( void) { struct termios LocalTermAttributes; TermAttributesWereSet = 0; /* STDIN must be a terminal */ if (!isatty (STDIN_FILENO)) { return; } /* Get and keep the original attributes */ if (tcgetattr (STDIN_FILENO, &OriginalTermAttributes)) { fprintf (stderr, "Could not get terminal attributes!\n"); return; } /* Set the new attributes to enable raw character input */ memcpy (&LocalTermAttributes, &OriginalTermAttributes, sizeof (struct termios)); LocalTermAttributes.c_lflag &= ~(ICANON | ECHO); LocalTermAttributes.c_cc[VMIN] = 1; LocalTermAttributes.c_cc[VTIME] = 0; if (tcsetattr (STDIN_FILENO, TCSANOW, &LocalTermAttributes)) { fprintf (stderr, "Could not set terminal attributes!\n"); return; } TermAttributesWereSet = 1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_450A1D", "function_addr": 4524573, "binary_name": "945ed0fc3371195cab2c0d4ae99cce69735a87793ae6198953c52d56d950810f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov cs:dword_49F27C, 0"], [4, "mov edi, 0"], [5, "call _isatty"], [6, "test eax, eax"], [7, "jz loc_450B24"], [8, "mov esi, offset termios_p"], [9, "mov edi, 0"], [10, "call _tcgetattr"], [11, "test eax, eax"], [12, "jz short loc_450A77"], [13, "mov rax, cs:stderr"], [14, "mov rcx, rax"], [15, "mov edx, 23h "], [16, "mov esi, 1"], [17, "mov edi, offset aCouldNotGetTer"], [18, "call _fwrite"], [19, "jmp locret_450B25"], [20, "mov rax, qword ptr cs:termios_p.c_iflag"], [21, "mov rdx, qword ptr cs:termios_p.c_cflag"], [22, "mov qword ptr [rbp+termios_p.c_iflag], rax"], [23, "mov qword ptr [rbp+termios_p.c_cflag], rdx"], [24, "mov rax, qword ptr cs:termios_p.c_line"], [25, "mov rdx, qword ptr cs:termios_p.c_cc+7"], [26, "mov qword ptr [rbp+termios_p.c_line], rax"], [27, "mov qword ptr [rbp+termios_p.c_cc+7], rdx"], [28, "mov rax, qword ptr cs:termios_p.c_cc+0Fh"], [29, "mov rdx, qword ptr cs:termios_p.c_cc+17h"], [30, "mov qword ptr [rbp+termios_p.c_cc+0Fh], rax"], [31, "mov qword ptr [rbp+termios_p.c_cc+17h], rdx"], [32, "mov rax, qword ptr cs:termios_p.c_cc+1Fh"], [33, "mov qword ptr [rbp+termios_p.c_cc+1Fh], rax"], [34, "mov eax, cs:termios_p.c_ospeed"], [35, "mov [rbp+termios_p.c_ospeed], eax"], [36, "mov eax, [rbp+termios_p.c_lflag]"], [37, "and eax, 0FFFFFFF5h"], [38, "mov [rbp+termios_p.c_lflag], eax"], [39, "mov [rbp+termios_p.c_cc+6], 1"], [40, "mov [rbp+termios_p.c_cc+5], 0"], [41, "lea rax, [rbp+termios_p]"], [42, "mov rdx, rax"], [43, "mov esi, 0"], [44, "mov edi, 0"], [45, "call _tcsetattr"], [46, "test eax, eax"], [47, "jz short loc_450B18"], [48, "mov rax, cs:stderr"], [49, "mov rcx, rax"], [50, "mov edx, 23h "], [51, "mov esi, 1"], [52, "mov edi, offset aCouldNotSetTer"], [53, "call _fwrite"], [54, "jmp short locret_450B25"], [55, "mov cs:dword_49F27C, 1"], [56, "jmp short locret_450B25"], [57, "nop"], [58, "leave"], [59, "retn"]], "data_dep": [[6, 5], [7, 6], [11, 10], [12, 11], [14, 13], [22, 20], [23, 21], [26, 24], [27, 25], [30, 28], [31, 29], [33, 32], [35, 34], [37, 36], [38, 37], [41, 37], [42, 41], [46, 45], [47, 46], [49, 48], [59, 6], [59, 18], [59, 53], [59, 46]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/945ed0fc3371195cab2c0d4ae99cce69735a87793ae6198953c52d56d950810f_945ed0fc3371195cab2c0d4ae99cce69735a87793ae6198953c52d56d950810f.jsonl.gz", "strip_func_name": "sub_450A1D", "query": "\n\n\nint sub_450A1D()\n{\nint result; // eax\nstruct termios termios_p; // [rsp+0h] [rbp-40h] BYREF\n\ndword_49F27C = 0;\nresult = isatty(0);\nif ( result )\n{\nif ( tcgetattr(0, &::termios_p) )\n{\nresult = fwrite(\"Could not get terminal attributes!\\n\", 1uLL, 0x23uLL, stderr);\n}\nelse\n{\n*(_QWORD *)&termios_p.c_iflag = *(_QWORD *)&::termios_p.c_iflag;\ntermios_p.c_cflag = ::termios_p.c_cflag;\n*(_QWORD *)&termios_p.c_line = *(_QWORD *)&::termios_p.c_line;\n*(_QWORD *)&termios_p.c_cc[7] = *(_QWORD *)&::termios_p.c_cc[7];\n*(_QWORD *)&termios_p.c_cc[15] = *(_QWORD *)&::termios_p.c_cc[15];\n*(_QWORD *)&termios_p.c_cc[23] = *(_QWORD *)&::termios_p.c_cc[23];\n*(_QWORD *)&termios_p.c_cc[31] = *(_QWORD *)&::termios_p.c_cc[31];\ntermios_p.c_ospeed = ::termios_p.c_ospeed;\ntermios_p.c_lflag = ::termios_p.c_lflag & 0xFFFFFFF5;\ntermios_p.c_cc[6] = 1;\ntermios_p.c_cc[5] = 0;\nresult = tcsetattr(0, 0, &termios_p);\nif ( result )\nresult = fwrite(\"Could not set terminal attributes!\\n\", 1uLL, 0x23uLL, stderr);\nelse\ndword_49F27C = 1;\n}\n}\nreturn result;\n}\n\n\n\nQ:[termios_p,sub_450A1D,]", "hints": "[]", "response": "{'termios_p': 'LocalTermAttributes', 'sub_450A1D': 'OsEnterLineEditMode'}"}
[ [ 0.7560352087020874, 0.7439116835594177, 0.7259008884429932, 0.7146275639533997, 0.7013202905654907, 0.6995362043380737, 0.6935504674911499, 0.6863390803337097, 0.6763252019882202, 0.6758007407188416, 0.6757366061210632, 0.6755894422531128, 0.6742570400238037, 0.6734777688980103, 0.6734573245048523, 0.6724582314491272, 0.6703540086746216, 0.6696110367774963, 0.6691094040870667, 0.6688774824142456 ], [ 76362, 241738, 199361, 160155, 33695, 208486, 92158, 181054, 49030, 171638, 8559, 1881, 19111, 202859, 4701, 216478, 233000, 249787, 48579, 219379 ] ]
png_correct_palette
4b58bb905f42bf1b4392143f49979b18b390ebb44b12087a07242a7fbf0e831a
embecosm
mibench
NA
void png_correct_palette(png_structp png_ptr, png_colorp palette, int num_palette) { #if defined(PNG_READ_BACKGROUND_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED) if ((png_ptr->transformations & (PNG_GAMMA)) && (png_ptr->transformations & (PNG_BACKGROUND))) { if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) { int i; png_color back, back_1; back.red = png_ptr->gamma_table[png_ptr->background.red]; back.green = png_ptr->gamma_table[png_ptr->background.green]; back.blue = png_ptr->gamma_table[png_ptr->background.blue]; back_1.red = png_ptr->gamma_to_1[png_ptr->background.red]; back_1.green = png_ptr->gamma_to_1[png_ptr->background.green]; back_1.blue = png_ptr->gamma_to_1[png_ptr->background.blue]; for (i = 0; i < num_palette; i++) { if (i < (int)png_ptr->num_trans && png_ptr->trans[i] == 0) { palette[i] = back; } else if (i < (int)png_ptr->num_trans && png_ptr->trans[i] != 0xff) { int v; v = png_ptr->gamma_to_1[png_ptr->palette[i].red]; v = (int)(((png_uint_32)(v) * (png_uint_32)(png_ptr->trans[i]) + (png_uint_32)(back_1.red) * (png_uint_32)(255 - png_ptr->trans[i]) + 127) / 255); palette[i].red = png_ptr->gamma_from_1[v]; v = png_ptr->gamma_to_1[png_ptr->palette[i].green]; v = (int)(((png_uint_32)(v) * (png_uint_32)(png_ptr->trans[i]) + (png_uint_32)(back_1.green) * (png_uint_32)(255 - png_ptr->trans[i]) + 127) / 255); palette[i].green = png_ptr->gamma_from_1[v]; v = png_ptr->gamma_to_1[png_ptr->palette[i].blue]; v = (int)(((png_uint_32)(v) * (png_uint_32)(png_ptr->trans[i]) + (png_uint_32)(back_1.blue) * (png_uint_32)(255 - png_ptr->trans[i]) + 127) / 255); palette[i].blue = png_ptr->gamma_from_1[v]; } else { palette[i].red = png_ptr->gamma_table[palette[i].red]; palette[i].green = png_ptr->gamma_table[palette[i].green]; palette[i].blue = png_ptr->gamma_table[palette[i].blue]; } } } else { int i; png_color back; back.red = png_ptr->gamma_table[png_ptr->background.red]; back.green = png_ptr->gamma_table[png_ptr->background.green]; back.blue = png_ptr->gamma_table[png_ptr->background.blue]; for (i = 0; i < num_palette; i++) { if (palette[i].red == png_ptr->trans_values.gray) { palette[i] = back; } else { palette[i].red = png_ptr->gamma_table[palette[i].red]; palette[i].green = png_ptr->gamma_table[palette[i].green]; palette[i].blue = png_ptr->gamma_table[palette[i].blue]; } } } } else #endif #if defined(PNG_READ_GAMMA_SUPPORTED) if (png_ptr->transformations & (PNG_GAMMA)) { int i; for (i = 0; i < num_palette; i++) { palette[i].red = png_ptr->gamma_table[palette[i].red]; palette[i].green = png_ptr->gamma_table[palette[i].green]; palette[i].blue = png_ptr->gamma_table[palette[i].blue]; } } #if defined(PNG_READ_BACKGROUND_SUPPORTED) else #endif #endif #if defined(PNG_READ_BACKGROUND_SUPPORTED) if (png_ptr->transformations & (PNG_BACKGROUND)) { if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) { int i; png_color back; back.red = (png_byte)png_ptr->background.red; back.green = (png_byte)png_ptr->background.green; back.blue = (png_byte)png_ptr->background.blue; for (i = 0; i < num_palette; i++) { if (i >= (int)png_ptr->num_trans || png_ptr->trans[i] == 0) { palette[i].red = back.red; palette[i].green = back.green; palette[i].blue = back.blue; } else if (i < (int)png_ptr->num_trans || png_ptr->trans[i] != 0xff) { palette[i].red = (png_byte)(( (png_uint_32)(png_ptr->palette[i].red) * (png_uint_32)(png_ptr->trans[i]) + (png_uint_32)(back.red) * (png_uint_32)(255 - png_ptr->trans[i]) + 127) / 255); palette[i].green = (png_byte)(( (png_uint_32)(png_ptr->palette[i].green) * (png_uint_32)(png_ptr->trans[i]) + (png_uint_32)(back.green) * (png_uint_32)(255 - png_ptr->trans[i]) + 127) / 255); palette[i].blue = (png_byte)(( (png_uint_32)(png_ptr->palette[i].blue) * (png_uint_32)(png_ptr->trans[i]) + (png_uint_32)(back.blue) * (png_uint_32)(255 - png_ptr->trans[i]) + 127) / 255); } } } else /* assume grayscale palette (what else could it be?) */ { int i; for (i = 0; i < num_palette; i++) { if (i == (int)png_ptr->trans_values.gray) { palette[i].red = (png_byte)png_ptr->background.red; palette[i].green = (png_byte)png_ptr->background.green; palette[i].blue = (png_byte)png_ptr->background.blue; } } } } #endif }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40951D", "function_addr": 4232477, "binary_name": "4b58bb905f42bf1b4392143f49979b18b390ebb44b12087a07242a7fbf0e831a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_38], rdi"], [3, "mov [rbp+var_40], rsi"], [4, "mov [rbp+var_44], edx"], [5, "mov rax, [rbp+var_38]"], [6, "mov rax, [rax+110h]"], [7, "and eax, 2000h"], [8, "test rax, rax"], [9, "jz loc_409C02"], [10, "mov rax, [rbp+var_38]"], [11, "mov rax, [rax+110h]"], [12, "and eax, 80h"], [13, "test rax, rax"], [14, "jz loc_409C02"], [15, "mov rax, [rbp+var_38]"], [16, "movzx eax, byte ptr [rax+1F1h]"], [17, "cmp al, 3"], [18, "jnz loc_409A53"], [19, "mov rax, [rbp+var_38]"], [20, "mov rdx, [rax+240h]"], [21, "mov rax, [rbp+var_38]"], [22, "movzx eax, word ptr [rax+202h]"], [23, "movzx eax, ax"], [24, "add rax, rdx"], [25, "movzx eax, byte ptr [rax]"], [26, "mov byte ptr [rbp+var_1B], al"], [27, "mov rax, [rbp+var_38]"], [28, "mov rdx, [rax+240h]"], [29, "mov rax, [rbp+var_38]"], [30, "movzx eax, word ptr [rax+204h]"], [31, "movzx eax, ax"], [32, "add rax, rdx"], [33, "movzx eax, byte ptr [rax]"], [34, "mov byte ptr [rbp+var_1B+1], al"], [35, "mov rax, [rbp+var_38]"], [36, "mov rdx, [rax+240h]"], [37, "mov rax, [rbp+var_38]"], [38, "movzx eax, word ptr [rax+206h]"], [39, "movzx eax, ax"], [40, "add rax, rdx"], [41, "movzx eax, byte ptr [rax]"], [42, "mov [rbp+var_19], al"], [43, "mov rax, [rbp+var_38]"], [44, "mov rdx, [rax+250h]"], [45, "mov rax, [rbp+var_38]"], [46, "movzx eax, word ptr [rax+202h]"], [47, "movzx eax, ax"], [48, "add rax, rdx"], [49, "movzx eax, byte ptr [rax]"], [50, "mov [rbp+var_1E], al"], [51, "mov rax, [rbp+var_38]"], [52, "mov rdx, [rax+250h]"], [53, "mov rax, [rbp+var_38]"], [54, "movzx eax, word ptr [rax+204h]"], [55, "movzx eax, ax"], [56, "add rax, rdx"], [57, "movzx eax, byte ptr [rax]"], [58, "mov [rbp+var_1D], al"], [59, "mov rax, [rbp+var_38]"], [60, "mov rdx, [rax+250h]"], [61, "mov rax, [rbp+var_38]"], [62, "movzx eax, word ptr [rax+206h]"], [63, "movzx eax, ax"], [64, "add rax, rdx"], [65, "movzx eax, byte ptr [rax]"], [66, "mov [rbp+var_1C], al"], [67, "mov [rbp+var_4], 0"], [68, "jmp loc_409A42"], [69, "mov rax, [rbp+var_38]"], [70, "movzx eax, word ptr [rax+1EAh]"], [71, "movzx eax, ax"], [72, "cmp [rbp+var_4], eax"], [73, "jge short loc_40969F"], [74, "mov rax, [rbp+var_38]"], [75, "mov rdx, [rax+278h]"], [76, "mov eax, [rbp+var_4]"], [77, "cdqe"], [78, "add rax, rdx"], [79, "movzx eax, byte ptr [rax]"], [80, "test al, al"], [81, "jnz short loc_40969F"], [82, "mov eax, [rbp+var_4]"], [83, "movsxd rdx, eax"], [84, "mov rax, rdx"], [85, "add rax, rax"], [86, "add rdx, rax"], [87, "mov rax, [rbp+var_40]"], [88, "add rax, rdx"], [89, "movzx edx, [rbp+var_1B]"], [90, "mov [rax], dx"], [91, "movzx edx, [rbp+var_19]"], [92, "mov [rax+2], dl"], [93, "jmp loc_409A3E"], [94, "mov rax, [rbp+var_38]"], [95, "movzx eax, word ptr [rax+1EAh]"], [96, "movzx eax, ax"], [97, "cmp [rbp+var_4], eax"], [98, "jge loc_40996B"], [99, "mov rax, [rbp+var_38]"], [100, "mov rdx, [rax+278h]"], [101, "mov eax, [rbp+var_4]"], [102, "cdqe"], [103, "add rax, rdx"], [104, "movzx eax, byte ptr [rax]"], [105, "cmp al, 0FFh"], [106, "jz loc_40996B"], [107, "mov rax, [rbp+var_38]"], [108, "mov rcx, [rax+250h]"], [109, "mov rax, [rbp+var_38]"], [110, "mov rsi, [rax+1E0h]"], [111, "mov eax, [rbp+var_4]"], [112, "movsxd rdx, eax"], [113, "mov rax, rdx"], [114, "add rax, rax"], [115, "add rax, rdx"], [116, "add rax, rsi"], [117, "movzx eax, byte ptr [rax]"], [118, "movzx eax, al"], [119, "add rax, rcx"], [120, "movzx eax, byte ptr [rax]"], [121, "movzx eax, al"], [122, "mov [rbp+var_18], eax"], [123, "mov eax, [rbp+var_18]"], [124, "movsxd rdx, eax"], [125, "mov rax, [rbp+var_38]"], [126, "mov rcx, [rax+278h]"], [127, "mov eax, [rbp+var_4]"], [128, "cdqe"], [129, "add rax, rcx"], [130, "movzx eax, byte ptr [rax]"], [131, "movzx eax, al"], [132, "mov rcx, rdx"], [133, "imul rcx, rax"], [134, "movzx eax, [rbp+var_1E]"], [135, "movzx edx, al"], [136, "mov rax, [rbp+var_38]"], [137, "mov rsi, [rax+278h]"], [138, "mov eax, [rbp+var_4]"], [139, "cdqe"], [140, "add rax, rsi"], [141, "movzx eax, byte ptr [rax]"], [142, "movzx esi, al"], [143, "mov eax, 0FFh"], [144, "sub eax, esi"], [145, "cdqe"], [146, "imul rax, rdx"], [147, "add rax, rcx"], [148, "add rax, 7Fh"], [149, "mov rdx, 8080808080808081h"], [150, "mul rdx"], [151, "mov rax, rdx"], [152, "shr rax, 7"], [153, "mov [rbp+var_18], eax"], [154, "mov rax, [rbp+var_38]"], [155, "mov rdx, [rax+248h]"], [156, "mov eax, [rbp+var_18]"], [157, "cdqe"], [158, "lea rcx, [rdx+rax]"], [159, "mov eax, [rbp+var_4]"], [160, "movsxd rdx, eax"], [161, "mov rax, rdx"], [162, "add rax, rax"], [163, "add rdx, rax"], [164, "mov rax, [rbp+var_40]"], [165, "add rdx, rax"], [166, "movzx eax, byte ptr [rcx]"], [167, "mov [rdx], al"], [168, "mov rax, [rbp+var_38]"], [169, "mov rcx, [rax+250h]"], [170, "mov rax, [rbp+var_38]"], [171, "mov rsi, [rax+1E0h]"], [172, "mov eax, [rbp+var_4]"], [173, "movsxd rdx, eax"], [174, "mov rax, rdx"], [175, "add rax, rax"], [176, "add rax, rdx"], [177, "add rax, rsi"], [178, "movzx eax, byte ptr [rax+1]"], [179, "movzx eax, al"], [180, "add rax, rcx"], [181, "movzx eax, byte ptr [rax]"], [182, "movzx eax, al"], [183, "mov [rbp+var_18], eax"], [184, "mov eax, [rbp+var_18]"], [185, "movsxd rdx, eax"], [186, "mov rax, [rbp+var_38]"], [187, "mov rcx, [rax+278h]"], [188, "mov eax, [rbp+var_4]"], [189, "cdqe"], [190, "add rax, rcx"], [191, "movzx eax, byte ptr [rax]"], [192, "movzx eax, al"], [193, "mov rcx, rdx"], [194, "imul rcx, rax"], [195, "movzx eax, [rbp+var_1D]"], [196, "movzx edx, al"], [197, "mov rax, [rbp+var_38]"], [198, "mov rsi, [rax+278h]"], [199, "mov eax, [rbp+var_4]"], [200, "cdqe"], [201, "add rax, rsi"], [202, "movzx eax, byte ptr [rax]"], [203, "movzx esi, al"], [204, "mov eax, 0FFh"], [205, "sub eax, esi"], [206, "cdqe"], [207, "imul rax, rdx"], [208, "add rax, rcx"], [209, "add rax, 7Fh"], [210, "mov rdx, 8080808080808081h"], [211, "mul rdx"], [212, "mov rax, rdx"], [213, "shr rax, 7"], [214, "mov [rbp+var_18], eax"], [215, "mov rax, [rbp+var_38]"], [216, "mov rdx, [rax+248h]"], [217, "mov eax, [rbp+var_18]"], [218, "cdqe"], [219, "lea rcx, [rdx+rax]"], [220, "mov eax, [rbp+var_4]"], [221, "movsxd rdx, eax"], [222, "mov rax, rdx"], [223, "add rax, rax"], [224, "add rdx, rax"], [225, "mov rax, [rbp+var_40]"], [226, "add rdx, rax"], [227, "movzx eax, byte ptr [rcx]"], [228, "mov [rdx+1], al"], [229, "mov rax, [rbp+var_38]"], [230, "mov rcx, [rax+250h]"], [231, "mov rax, [rbp+var_38]"], [232, "mov rsi, [rax+1E0h]"], [233, "mov eax, [rbp+var_4]"], [234, "movsxd rdx, eax"], [235, "mov rax, rdx"], [236, "add rax, rax"], [237, "add rax, rdx"], [238, "add rax, rsi"], [239, "movzx eax, byte ptr [rax+2]"], [240, "movzx eax, al"], [241, "add rax, rcx"], [242, "movzx eax, byte ptr [rax]"], [243, "movzx eax, al"], [244, "mov [rbp+var_18], eax"], [245, "mov eax, [rbp+var_18]"], [246, "movsxd rdx, eax"], [247, "mov rax, [rbp+var_38]"], [248, "mov rcx, [rax+278h]"], [249, "mov eax, [rbp+var_4]"], [250, "cdqe"], [251, "add rax, rcx"], [252, "movzx eax, byte ptr [rax]"], [253, "movzx eax, al"], [254, "mov rcx, rdx"], [255, "imul rcx, rax"], [256, "movzx eax, [rbp+var_1C]"], [257, "movzx edx, al"], [258, "mov rax, [rbp+var_38]"], [259, "mov rsi, [rax+278h]"], [260, "mov eax, [rbp+var_4]"], [261, "cdqe"], [262, "add rax, rsi"], [263, "movzx eax, byte ptr [rax]"], [264, "movzx esi, al"], [265, "mov eax, 0FFh"], [266, "sub eax, esi"], [267, "cdqe"], [268, "imul rax, rdx"], [269, "add rax, rcx"], [270, "add rax, 7Fh"], [271, "mov rdx, 8080808080808081h"], [272, "mul rdx"], [273, "mov rax, rdx"], [274, "shr rax, 7"], [275, "mov [rbp+var_18], eax"], [276, "mov rax, [rbp+var_38]"], [277, "mov rdx, [rax+248h]"], [278, "mov eax, [rbp+var_18]"], [279, "cdqe"], [280, "lea rcx, [rdx+rax]"], [281, "mov eax, [rbp+var_4]"], [282, "movsxd rdx, eax"], [283, "mov rax, rdx"], [284, "add rax, rax"], [285, "add rdx, rax"], [286, "mov rax, [rbp+var_40]"], [287, "add rdx, rax"], [288, "movzx eax, byte ptr [rcx]"], [289, "mov [rdx+2], al"], [290, "jmp loc_409A3E"], [291, "mov rax, [rbp+var_38]"], [292, "mov rcx, [rax+240h]"], [293, "mov eax, [rbp+var_4]"], [294, "movsxd rdx, eax"], [295, "mov rax, rdx"], [296, "add rax, rax"], [297, "add rdx, rax"], [298, "mov rax, [rbp+var_40]"], [299, "add rax, rdx"], [300, "movzx eax, byte ptr [rax]"], [301, "movzx eax, al"], [302, "add rcx, rax"], [303, "mov eax, [rbp+var_4]"], [304, "movsxd rdx, eax"], [305, "mov rax, rdx"], [306, "add rax, rax"], [307, "add rdx, rax"], [308, "mov rax, [rbp+var_40]"], [309, "add rdx, rax"], [310, "movzx eax, byte ptr [rcx]"], [311, "mov [rdx], al"], [312, "mov rax, [rbp+var_38]"], [313, "mov rcx, [rax+240h]"], [314, "mov eax, [rbp+var_4]"], [315, "movsxd rdx, eax"], [316, "mov rax, rdx"], [317, "add rax, rax"], [318, "add rdx, rax"], [319, "mov rax, [rbp+var_40]"], [320, "add rax, rdx"], [321, "movzx eax, byte ptr [rax+1]"], [322, "movzx eax, al"], [323, "add rcx, rax"], [324, "mov eax, [rbp+var_4]"], [325, "movsxd rdx, eax"], [326, "mov rax, rdx"], [327, "add rax, rax"], [328, "add rdx, rax"], [329, "mov rax, [rbp+var_40]"], [330, "add rdx, rax"], [331, "movzx eax, byte ptr [rcx]"], [332, "mov [rdx+1], al"], [333, "mov rax, [rbp+var_38]"], [334, "mov rcx, [rax+240h]"], [335, "mov eax, [rbp+var_4]"], [336, "movsxd rdx, eax"], [337, "mov rax, rdx"], [338, "add rax, rax"], [339, "add rdx, rax"], [340, "mov rax, [rbp+var_40]"], [341, "add rax, rdx"], [342, "movzx eax, byte ptr [rax+2]"], [343, "movzx eax, al"], [344, "add rcx, rax"], [345, "mov eax, [rbp+var_4]"], [346, "movsxd rdx, eax"], [347, "mov rax, rdx"], [348, "add rax, rax"], [349, "add rdx, rax"], [350, "mov rax, [rbp+var_40]"], [351, "add rdx, rax"], [352, "movzx eax, byte ptr [rcx]"], [353, "mov [rdx+2], al"], [354, "add [rbp+var_4], 1"], [355, "mov eax, [rbp+var_4]"], [356, "cmp eax, [rbp+var_44]"], [357, "jl loc_409649"], [358, "jmp loc_40A0D4"], [359, "mov rax, [rbp+var_38]"], [360, "mov rdx, [rax+240h]"], [361, "mov rax, [rbp+var_38]"], [362, "movzx eax, word ptr [rax+202h]"], [363, "movzx eax, ax"], [364, "add rax, rdx"], [365, "movzx eax, byte ptr [rax]"], [366, "mov byte ptr [rbp+var_21], al"], [367, "mov rax, [rbp+var_38]"], [368, "mov rdx, [rax+240h]"], [369, "mov rax, [rbp+var_38]"], [370, "movzx eax, word ptr [rax+204h]"], [371, "movzx eax, ax"], [372, "add rax, rdx"], [373, "movzx eax, byte ptr [rax]"], [374, "mov byte ptr [rbp+var_21+1], al"], [375, "mov rax, [rbp+var_38]"], [376, "mov rdx, [rax+240h]"], [377, "mov rax, [rbp+var_38]"], [378, "movzx eax, word ptr [rax+206h]"], [379, "movzx eax, ax"], [380, "add rax, rdx"], [381, "movzx eax, byte ptr [rax]"], [382, "mov [rbp+var_1F], al"], [383, "mov [rbp+var_8], 0"], [384, "jmp loc_409BF1"], [385, "mov eax, [rbp+var_8]"], [386, "movsxd rdx, eax"], [387, "mov rax, rdx"], [388, "add rax, rax"], [389, "add rdx, rax"], [390, "mov rax, [rbp+var_40]"], [391, "add rax, rdx"], [392, "movzx eax, byte ptr [rax]"], [393, "movzx edx, al"], [394, "mov rax, [rbp+var_38]"], [395, "movzx eax, word ptr [rax+288h]"], [396, "cmp dx, ax"], [397, "jnz short loc_409B1A"], [398, "mov eax, [rbp+var_8]"], [399, "movsxd rdx, eax"], [400, "mov rax, rdx"], [401, "add rax, rax"], [402, "add rdx, rax"], [403, "mov rax, [rbp+var_40]"], [404, "add rax, rdx"], [405, "movzx edx, [rbp+var_21]"], [406, "mov [rax], dx"], [407, "movzx edx, [rbp+var_1F]"], [408, "mov [rax+2], dl"], [409, "jmp loc_409BED"], [410, "mov rax, [rbp+var_38]"], [411, "mov rcx, [rax+240h]"], [412, "mov eax, [rbp+var_8]"], [413, "movsxd rdx, eax"], [414, "mov rax, rdx"], [415, "add rax, rax"], [416, "add rdx, rax"], [417, "mov rax, [rbp+var_40]"], [418, "add rax, rdx"], [419, "movzx eax, byte ptr [rax]"], [420, "movzx eax, al"], [421, "add rcx, rax"], [422, "mov eax, [rbp+var_8]"], [423, "movsxd rdx, eax"], [424, "mov rax, rdx"], [425, "add rax, rax"], [426, "add rdx, rax"], [427, "mov rax, [rbp+var_40]"], [428, "add rdx, rax"], [429, "movzx eax, byte ptr [rcx]"], [430, "mov [rdx], al"], [431, "mov rax, [rbp+var_38]"], [432, "mov rcx, [rax+240h]"], [433, "mov eax, [rbp+var_8]"], [434, "movsxd rdx, eax"], [435, "mov rax, rdx"], [436, "add rax, rax"], [437, "add rdx, rax"], [438, "mov rax, [rbp+var_40]"], [439, "add rax, rdx"], [440, "movzx eax, byte ptr [rax+1]"], [441, "movzx eax, al"], [442, "add rcx, rax"], [443, "mov eax, [rbp+var_8]"], [444, "movsxd rdx, eax"], [445, "mov rax, rdx"], [446, "add rax, rax"], [447, "add rdx, rax"], [448, "mov rax, [rbp+var_40]"], [449, "add rdx, rax"], [450, "movzx eax, byte ptr [rcx]"], [451, "mov [rdx+1], al"], [452, "mov rax, [rbp+var_38]"], [453, "mov rcx, [rax+240h]"], [454, "mov eax, [rbp+var_8]"], [455, "movsxd rdx, eax"], [456, "mov rax, rdx"], [457, "add rax, rax"], [458, "add rdx, rax"], [459, "mov rax, [rbp+var_40]"], [460, "add rax, rdx"], [461, "movzx eax, byte ptr [rax+2]"], [462, "movzx eax, al"], [463, "add rcx, rax"], [464, "mov eax, [rbp+var_8]"], [465, "movsxd rdx, eax"], [466, "mov rax, rdx"], [467, "add rax, rax"], [468, "add rdx, rax"], [469, "mov rax, [rbp+var_40]"], [470, "add rdx, rax"], [471, "movzx eax, byte ptr [rcx]"], [472, "mov [rdx+2], al"], [473, "add [rbp+var_8], 1"], [474, "mov eax, [rbp+var_8]"], [475, "cmp eax, [rbp+var_44]"], [476, "jl loc_409AC5"], [477, "jmp loc_40A0D4"], [478, "mov rax, [rbp+var_38]"], [479, "mov rax, [rax+110h]"], [480, "and eax, 2000h"], [481, "test rax, rax"], [482, "jz loc_409D0F"], [483, "mov [rbp+var_C], 0"], [484, "jmp loc_409CFE"], [485, "mov rax, [rbp+var_38]"], [486, "mov rcx, [rax+240h]"], [487, "mov eax, [rbp+var_C]"], [488, "movsxd rdx, eax"], [489, "mov rax, rdx"], [490, "add rax, rax"], [491, "add rdx, rax"], [492, "mov rax, [rbp+var_40]"], [493, "add rax, rdx"], [494, "movzx eax, byte ptr [rax]"], [495, "movzx eax, al"], [496, "add rcx, rax"], [497, "mov eax, [rbp+var_C]"], [498, "movsxd rdx, eax"], [499, "mov rax, rdx"], [500, "add rax, rax"], [501, "add rdx, rax"], [502, "mov rax, [rbp+var_40]"], [503, "add rdx, rax"], [504, "movzx eax, byte ptr [rcx]"], [505, "mov [rdx], al"], [506, "mov rax, [rbp+var_38]"], [507, "mov rcx, [rax+240h]"], [508, "mov eax, [rbp+var_C]"], [509, "movsxd rdx, eax"], [510, "mov rax, rdx"], [511, "add rax, rax"], [512, "add rdx, rax"], [513, "mov rax, [rbp+var_40]"], [514, "add rax, rdx"], [515, "movzx eax, byte ptr [rax+1]"], [516, "movzx eax, al"], [517, "add rcx, rax"], [518, "mov eax, [rbp+var_C]"], [519, "movsxd rdx, eax"], [520, "mov rax, rdx"], [521, "add rax, rax"], [522, "add rdx, rax"], [523, "mov rax, [rbp+var_40]"], [524, "add rdx, rax"], [525, "movzx eax, byte ptr [rcx]"], [526, "mov [rdx+1], al"], [527, "mov rax, [rbp+var_38]"], [528, "mov rcx, [rax+240h]"], [529, "mov eax, [rbp+var_C]"], [530, "movsxd rdx, eax"], [531, "mov rax, rdx"], [532, "add rax, rax"], [533, "add rdx, rax"], [534, "mov rax, [rbp+var_40]"], [535, "add rax, rdx"], [536, "movzx eax, byte ptr [rax+2]"], [537, "movzx eax, al"], [538, "add rcx, rax"], [539, "mov eax, [rbp+var_C]"], [540, "movsxd rdx, eax"], [541, "mov rax, rdx"], [542, "add rax, rax"], [543, "add rdx, rax"], [544, "mov rax, [rbp+var_40]"], [545, "add rdx, rax"], [546, "movzx eax, byte ptr [rcx]"], [547, "mov [rdx+2], al"], [548, "add [rbp+var_C], 1"], [549, "mov eax, [rbp+var_C]"], [550, "cmp eax, [rbp+var_44]"], [551, "jl loc_409C27"], [552, "jmp loc_40A0D4"], [553, "mov rax, [rbp+var_38]"], [554, "mov rax, [rax+110h]"], [555, "and eax, 80h"], [556, "test rax, rax"], [557, "jz loc_40A0D4"], [558, "mov rax, [rbp+var_38]"], [559, "movzx eax, byte ptr [rax+1F1h]"], [560, "cmp al, 3"], [561, "jnz loc_40A032"], [562, "mov rax, [rbp+var_38]"], [563, "movzx eax, word ptr [rax+202h]"], [564, "mov [rbp+var_24], al"], [565, "mov rax, [rbp+var_38]"], [566, "movzx eax, word ptr [rax+204h]"], [567, "mov [rbp+var_23], al"], [568, "mov rax, [rbp+var_38]"], [569, "movzx eax, word ptr [rax+206h]"], [570, "mov [rbp+var_22], al"], [571, "mov [rbp+var_10], 0"], [572, "jmp loc_40A021"], [573, "mov rax, [rbp+var_38]"], [574, "movzx eax, word ptr [rax+1EAh]"], [575, "movzx eax, ax"], [576, "cmp [rbp+var_10], eax"], [577, "jge short loc_409D9E"], [578, "mov rax, [rbp+var_38]"], [579, "mov rdx, [rax+278h]"], [580, "mov eax, [rbp+var_10]"], [581, "cdqe"], [582, "add rax, rdx"], [583, "movzx eax, byte ptr [rax]"], [584, "test al, al"], [585, "jnz short loc_409DF9"], [586, "mov eax, [rbp+var_10]"], [587, "movsxd rdx, eax"], [588, "mov rax, rdx"], [589, "add rax, rax"], [590, "add rdx, rax"], [591, "mov rax, [rbp+var_40]"], [592, "add rdx, rax"], [593, "movzx eax, [rbp+var_24]"], [594, "mov [rdx], al"], [595, "mov eax, [rbp+var_10]"], [596, "movsxd rdx, eax"], [597, "mov rax, rdx"], [598, "add rax, rax"], [599, "add rdx, rax"], [600, "mov rax, [rbp+var_40]"], [601, "add rdx, rax"], [602, "movzx eax, [rbp+var_23]"], [603, "mov [rdx+1], al"], [604, "mov eax, [rbp+var_10]"], [605, "movsxd rdx, eax"], [606, "mov rax, rdx"], [607, "add rax, rax"], [608, "add rdx, rax"], [609, "mov rax, [rbp+var_40]"], [610, "add rdx, rax"], [611, "movzx eax, [rbp+var_22]"], [612, "mov [rdx+2], al"], [613, "jmp loc_40A01D"], [614, "mov rax, [rbp+var_38]"], [615, "movzx eax, word ptr [rax+1EAh]"], [616, "movzx eax, ax"], [617, "cmp [rbp+var_10], eax"], [618, "jl short loc_409E2A"], [619, "mov rax, [rbp+var_38]"], [620, "mov rdx, [rax+278h]"], [621, "mov eax, [rbp+var_10]"], [622, "cdqe"], [623, "add rax, rdx"], [624, "movzx eax, byte ptr [rax]"], [625, "cmp al, 0FFh"], [626, "jz loc_40A01D"], [627, "mov rax, [rbp+var_38]"], [628, "mov rcx, [rax+1E0h]"], [629, "mov eax, [rbp+var_10]"], [630, "movsxd rdx, eax"], [631, "mov rax, rdx"], [632, "add rax, rax"], [633, "add rax, rdx"], [634, "add rax, rcx"], [635, "movzx eax, byte ptr [rax]"], [636, "movzx edx, al"], [637, "mov rax, [rbp+var_38]"], [638, "mov rcx, [rax+278h]"], [639, "mov eax, [rbp+var_10]"], [640, "cdqe"], [641, "add rax, rcx"], [642, "movzx eax, byte ptr [rax]"], [643, "movzx eax, al"], [644, "mov rcx, rdx"], [645, "imul rcx, rax"], [646, "movzx eax, [rbp+var_24]"], [647, "movzx edx, al"], [648, "mov rax, [rbp+var_38]"], [649, "mov rsi, [rax+278h]"], [650, "mov eax, [rbp+var_10]"], [651, "cdqe"], [652, "add rax, rsi"], [653, "movzx eax, byte ptr [rax]"], [654, "movzx esi, al"], [655, "mov eax, 0FFh"], [656, "sub eax, esi"], [657, "cdqe"], [658, "imul rax, rdx"], [659, "add rax, rcx"], [660, "add rax, 7Fh"], [661, "mov rdx, 8080808080808081h"], [662, "mul rdx"], [663, "mov rcx, rdx"], [664, "shr rcx, 7"], [665, "mov eax, [rbp+var_10]"], [666, "movsxd rdx, eax"], [667, "mov rax, rdx"], [668, "add rax, rax"], [669, "add rdx, rax"], [670, "mov rax, [rbp+var_40]"], [671, "add rax, rdx"], [672, "mov edx, ecx"], [673, "mov [rax], dl"], [674, "mov rax, [rbp+var_38]"], [675, "mov rcx, [rax+1E0h]"], [676, "mov eax, [rbp+var_10]"], [677, "movsxd rdx, eax"], [678, "mov rax, rdx"], [679, "add rax, rax"], [680, "add rax, rdx"], [681, "add rax, rcx"], [682, "movzx eax, byte ptr [rax+1]"], [683, "movzx edx, al"], [684, "mov rax, [rbp+var_38]"], [685, "mov rcx, [rax+278h]"], [686, "mov eax, [rbp+var_10]"], [687, "cdqe"], [688, "add rax, rcx"], [689, "movzx eax, byte ptr [rax]"], [690, "movzx eax, al"], [691, "mov rcx, rdx"], [692, "imul rcx, rax"], [693, "movzx eax, [rbp+var_23]"], [694, "movzx edx, al"], [695, "mov rax, [rbp+var_38]"], [696, "mov rsi, [rax+278h]"], [697, "mov eax, [rbp+var_10]"], [698, "cdqe"], [699, "add rax, rsi"], [700, "movzx eax, byte ptr [rax]"], [701, "movzx esi, al"], [702, "mov eax, 0FFh"], [703, "sub eax, esi"], [704, "cdqe"], [705, "imul rax, rdx"], [706, "add rax, rcx"], [707, "add rax, 7Fh"], [708, "mov rdx, 8080808080808081h"], [709, "mul rdx"], [710, "mov rcx, rdx"], [711, "shr rcx, 7"], [712, "mov eax, [rbp+var_10]"], [713, "movsxd rdx, eax"], [714, "mov rax, rdx"], [715, "add rax, rax"], [716, "add rdx, rax"], [717, "mov rax, [rbp+var_40]"], [718, "add rax, rdx"], [719, "mov edx, ecx"], [720, "mov [rax+1], dl"], [721, "mov rax, [rbp+var_38]"], [722, "mov rcx, [rax+1E0h]"], [723, "mov eax, [rbp+var_10]"], [724, "movsxd rdx, eax"], [725, "mov rax, rdx"], [726, "add rax, rax"], [727, "add rax, rdx"], [728, "add rax, rcx"], [729, "movzx eax, byte ptr [rax+2]"], [730, "movzx edx, al"], [731, "mov rax, [rbp+var_38]"], [732, "mov rcx, [rax+278h]"], [733, "mov eax, [rbp+var_10]"], [734, "cdqe"], [735, "add rax, rcx"], [736, "movzx eax, byte ptr [rax]"], [737, "movzx eax, al"], [738, "mov rcx, rdx"], [739, "imul rcx, rax"], [740, "movzx eax, [rbp+var_22]"], [741, "movzx edx, al"], [742, "mov rax, [rbp+var_38]"], [743, "mov rsi, [rax+278h]"], [744, "mov eax, [rbp+var_10]"], [745, "cdqe"], [746, "add rax, rsi"], [747, "movzx eax, byte ptr [rax]"], [748, "movzx esi, al"], [749, "mov eax, 0FFh"], [750, "sub eax, esi"], [751, "cdqe"], [752, "imul rax, rdx"], [753, "add rax, rcx"], [754, "add rax, 7Fh"], [755, "mov rdx, 8080808080808081h"], [756, "mul rdx"], [757, "mov rcx, rdx"], [758, "shr rcx, 7"], [759, "mov eax, [rbp+var_10]"], [760, "movsxd rdx, eax"], [761, "mov rax, rdx"], [762, "add rax, rax"], [763, "add rdx, rax"], [764, "mov rax, [rbp+var_40]"], [765, "add rax, rdx"], [766, "mov edx, ecx"], [767, "mov [rax+2], dl"], [768, "add [rbp+var_10], 1"], [769, "mov eax, [rbp+var_10]"], [770, "cmp eax, [rbp+var_44]"], [771, "jl loc_409D71"], [772, "jmp loc_40A0D4"], [773, "mov [rbp+var_14], 0"], [774, "jmp loc_40A0C6"], [775, "mov rax, [rbp+var_38]"], [776, "movzx eax, word ptr [rax+288h]"], [777, "movzx eax, ax"], [778, "cmp [rbp+var_14], eax"], [779, "jnz short loc_40A0C2"], [780, "mov rax, [rbp+var_38]"], [781, "movzx ecx, word ptr [rax+202h]"], [782, "mov eax, [rbp+var_14]"], [783, "movsxd rdx, eax"], [784, "mov rax, rdx"], [785, "add rax, rax"], [786, "add rdx, rax"], [787, "mov rax, [rbp+var_40]"], [788, "add rax, rdx"], [789, "mov edx, ecx"], [790, "mov [rax], dl"], [791, "mov rax, [rbp+var_38]"], [792, "movzx ecx, word ptr [rax+204h]"], [793, "mov eax, [rbp+var_14]"], [794, "movsxd rdx, eax"], [795, "mov rax, rdx"], [796, "add rax, rax"], [797, "add rdx, rax"], [798, "mov rax, [rbp+var_40]"], [799, "add rax, rdx"], [800, "mov edx, ecx"], [801, "mov [rax+1], dl"], [802, "mov rax, [rbp+var_38]"], [803, "movzx ecx, word ptr [rax+206h]"], [804, "mov eax, [rbp+var_14]"], [805, "movsxd rdx, eax"], [806, "mov rax, rdx"], [807, "add rax, rax"], [808, "add rdx, rax"], [809, "mov rax, [rbp+var_40]"], [810, "add rax, rdx"], [811, "mov edx, ecx"], [812, "mov [rax+2], dl"], [813, "add [rbp+var_14], 1"], [814, "mov eax, [rbp+var_14]"], [815, "cmp eax, [rbp+var_44]"], [816, "jl loc_40A03E"], [817, "jmp short $+2"], [818, "nop"], [819, "pop rbp"], [820, "retn"]], "data_dep": [[5, 2], [6, 5], [7, 6], [8, 7], [9, 8], [10, 2], [11, 10], [12, 11], [13, 12], [14, 13], [15, 2], [16, 15], [17, 16], [18, 17], [19, 2], [20, 19], [21, 2], [22, 21], [23, 22], [24, 20], [24, 23], [25, 24], [26, 25], [27, 2], [28, 27], [29, 2], [30, 29], [31, 30], [32, 28], [32, 31], [33, 32], [34, 33], [35, 2], [36, 35], [37, 2], [38, 37], [39, 38], [40, 36], [40, 39], [41, 40], [42, 41], [43, 2], [44, 43], [45, 2], [46, 45], [47, 46], [48, 47], [48, 44], [49, 48], [50, 49], [51, 2], [52, 51], [53, 2], [54, 53], [55, 54], [56, 55], [56, 52], [57, 56], [58, 57], [59, 2], [60, 59], [61, 2], [62, 61], [63, 62], [64, 60], [64, 63], [65, 64], [66, 65], [69, 2], [70, 167], [70, 353], [70, 90], [70, 332], [70, 289], [70, 92], [70, 69], [70, 311], [70, 228], [71, 70], [72, 71], [72, 67], [72, 354], [73, 72], [74, 2], [75, 90], [75, 332], [75, 289], [75, 92], [75, 311], [75, 228], [75, 74], [75, 167], [75, 353], [76, 67], [76, 354], [78, 75], [78, 76], [79, 167], [79, 353], [79, 78], [79, 90], [79, 332], [79, 289], [79, 92], [79, 311], [79, 228], [80, 79], [81, 80], [82, 354], [82, 67], [83, 82], [84, 83], [85, 84], [86, 83], [86, 85], [87, 3], [88, 87], [88, 86], [89, 26], [90, 89], [90, 88], [91, 42], [92, 88], [92, 91], [94, 2], [95, 353], [95, 90], [95, 332], [95, 289], [95, 92], [95, 94], [95, 228], [95, 311], [95, 167], [96, 95], [97, 96], [97, 67], [97, 354], [98, 97], [99, 2], [100, 92], [100, 228], [100, 99], [100, 311], [100, 167], [100, 353], [100, 90], [100, 332], [100, 289], [101, 67], [101, 354], [103, 100], [103, 101], [104, 228], [104, 167], [104, 353], [104, 90], [104, 332], [104, 103], [104, 289], [104, 92], [104, 311], [105, 104], [106, 105], [107, 2], [108, 90], [108, 332], [108, 289], [108, 92], [108, 311], [108, 107], [108, 228], [108, 167], [108, 353], [109, 2], [110, 332], [110, 109], [110, 311], [110, 167], [110, 353], [110, 90], [110, 289], [110, 92], [110, 228], [111, 67], [111, 354], [112, 111], [113, 112], [114, 113], [115, 112], [115, 114], [116, 110], [116, 115], [117, 92], [117, 228], [117, 116], [117, 311], [117, 167], [117, 353], [117, 90], [117, 332], [117, 289], [118, 117], [119, 118], [119, 108], [120, 228], [120, 119], [120, 311], [120, 167], [120, 353], [120, 90], [120, 332], [120, 289], [120, 92], [121, 120], [122, 121], [123, 122], [124, 123], [125, 2], [126, 353], [126, 332], [126, 289], [126, 311], [126, 167], [126, 90], [126, 125], [126, 92], [126, 228], [127, 67], [127, 354], [129, 126], [129, 127], [130, 92], [130, 129], [130, 228], [130, 311], [130, 167], [130, 353], [130, 90], [130, 332], [130, 289], [131, 130], [132, 124], [133, 131], [133, 132], [134, 50], [135, 134], [136, 2], [137, 311], [137, 167], [137, 353], [137, 136], [137, 90], [137, 332], [137, 289], [137, 92], [137, 228], [138, 67], [138, 354], [140, 138], [140, 137], [141, 353], [141, 332], [141, 311], [141, 167], [141, 90], [141, 289], [141, 92], [141, 140], [141, 228], [142, 141], [144, 143], [144, 142], [146, 144], [146, 135], [147, 146], [147, 133], [148, 147], [150, 149], [151, 150], [152, 151], [153, 152], [154, 2], [155, 332], [155, 154], [155, 311], [155, 167], [155, 353], [155, 90], [155, 289], [155, 92], [155, 228], [156, 153], [158, 311], [158, 167], [158, 353], [158, 156], [158, 133], [158, 90], [158, 332], [158, 289], [158, 92], [158, 228], [159, 354], [159, 67], [160, 159], [161, 160], [162, 161], [163, 160], [163, 162], [164, 3], [165, 164], [165, 163], [166, 158], [166, 92], [166, 228], [166, 353], [166, 332], [166, 311], [166, 167], [166, 90], [166, 289], [167, 166], [167, 165], [168, 2], [169, 168], [169, 167], [170, 2], [171, 167], [171, 170], [172, 67], [172, 354], [173, 172], [174, 173], [175, 174], [176, 175], [176, 173], [177, 171], [177, 176], [178, 177], [178, 167], [179, 178], [180, 179], [180, 169], [181, 167], [181, 180], [181, 90], [182, 181], [183, 182], [184, 183], [185, 184], [186, 2], [187, 186], [187, 167], [188, 67], [188, 354], [190, 187], [190, 188], [191, 190], [191, 167], [191, 90], [192, 191], [193, 185], [194, 192], [194, 193], [195, 58], [196, 195], [197, 2], [198, 197], [198, 167], [199, 67], [199, 354], [201, 198], [201, 199], [202, 90], [202, 201], [202, 167], [203, 202], [205, 204], [205, 203], [207, 196], [207, 205], [208, 194], [208, 207], [209, 208], [211, 210], [212, 211], [213, 212], [214, 213], [215, 2], [216, 215], [216, 167], [217, 214], [219, 194], [219, 217], [219, 167], [220, 67], [220, 354], [221, 220], [222, 221], [223, 222], [224, 223], [224, 221], [225, 3], [226, 225], [226, 224], [227, 167], [227, 219], [228, 227], [228, 226], [229, 2], [230, 228], [230, 229], [231, 2], [232, 228], [232, 231], [233, 67], [233, 354], [234, 233], [235, 234], [236, 235], [237, 234], [237, 236], [238, 232], [238, 237], [239, 92], [239, 238], [239, 228], [240, 239], [241, 240], [241, 230], [242, 241], [242, 90], [242, 228], [243, 242], [244, 243], [245, 244], [246, 245], [247, 2], [248, 228], [248, 247], [249, 67], [249, 354], [251, 249], [251, 248], [252, 251], [252, 228], [252, 90], [253, 252], [254, 246], [255, 253], [255, 254], [256, 66], [257, 256], [258, 2], [259, 258], [259, 228], [260, 354], [260, 67], [262, 259], [262, 260], [263, 228], [263, 262], [263, 90], [264, 263], [266, 265], [266, 264], [268, 257], [268, 266], [269, 255], [269, 268], [270, 269], [272, 271], [273, 272], [274, 273], [275, 274], [276, 2], [277, 276], [277, 228], [278, 275], [280, 278], [280, 255], [280, 228], [281, 67], [281, 354], [282, 281], [283, 282], [284, 283], [285, 282], [285, 284], [286, 3], [287, 286], [287, 285], [288, 280], [288, 228], [289, 288], [289, 287], [291, 2], [292, 353], [292, 90], [292, 332], [292, 289], [292, 92], [292, 311], [292, 167], [292, 291], [292, 228], [293, 67], [293, 354], [294, 293], [295, 294], [296, 295], [297, 294], [297, 296], [298, 3], [299, 298], [299, 297], [300, 228], [300, 353], [300, 90], [300, 332], [300, 299], [300, 289], [300, 92], [300, 311], [300, 167], [301, 300], [302, 301], [302, 292], [303, 67], [303, 354], [304, 303], [305, 304], [306, 305], [307, 304], [307, 306], [308, 3], [309, 308], [309, 307], [310, 90], [310, 332], [310, 289], [310, 302], [310, 92], [310, 311], [310, 228], [310, 167], [310, 353], [311, 310], [311, 309], [312, 2], [313, 311], [313, 312], [314, 67], [314, 354], [315, 314], [316, 315], [317, 316], [318, 315], [318, 317], [319, 3], [320, 319], [320, 318], [321, 320], [321, 311], [322, 321], [323, 322], [323, 313], [324, 67], [324, 354], [325, 324], [326, 325], [327, 326], [328, 325], [328, 327], [329, 3], [330, 328], [330, 329], [331, 323], [331, 311], [332, 331], [332, 330], [333, 2], [334, 333], [334, 332], [335, 67], [335, 354], [336, 335], [337, 336], [338, 337], [339, 336], [339, 338], [340, 3], [341, 340], [341, 339], [342, 341], [342, 332], [342, 92], [343, 342], [344, 343], [344, 334], [345, 67], [345, 354], [346, 345], [347, 346], [348, 347], [349, 346], [349, 348], [350, 3], [351, 350], [351, 349], [352, 332], [352, 344], [353, 352], [353, 351], [354, 354], [354, 67], [355, 67], [355, 354], [356, 355], [356, 4], [357, 356], [359, 2], [360, 359], [361, 2], [362, 361], [363, 362], [364, 360], [364, 363], [365, 364], [366, 365], [367, 2], [368, 367], [369, 2], [370, 369], [371, 370], [372, 368], [372, 371], [373, 372], [374, 373], [375, 2], [376, 375], [377, 2], [378, 377], [379, 378], [380, 379], [380, 376], [381, 380], [382, 381], [385, 473], [385, 383], [386, 385], [387, 386], [388, 387], [389, 386], [389, 388], [390, 3], [391, 389], [391, 390], [392, 430], [392, 391], [392, 472], [392, 406], [392, 451], [392, 408], [393, 392], [394, 2], [395, 394], [395, 472], [395, 406], [395, 451], [395, 430], [395, 408], [396, 393], [396, 395], [397, 396], [398, 383], [398, 473], [399, 398], [400, 399], [401, 400], [402, 399], [402, 401], [403, 3], [404, 402], [404, 403], [405, 366], [406, 404], [406, 405], [407, 382], [408, 407], [408, 404], [410, 2], [411, 430], [411, 410], [411, 472], [411, 406], [411, 451], [411, 408], [412, 383], [412, 473], [413, 412], [414, 413], [415, 414], [416, 415], [416, 413], [417, 3], [418, 416], [418, 417], [419, 472], [419, 406], [419, 451], [419, 418], [419, 408], [419, 430], [420, 419], [421, 420], [421, 411], [422, 473], [422, 383], [423, 422], [424, 423], [425, 424], [426, 423], [426, 425], [427, 3], [428, 427], [428, 426], [429, 472], [429, 406], [429, 451], [429, 408], [429, 430], [429, 421], [430, 428], [430, 429], [431, 2], [432, 431], [432, 430], [433, 383], [433, 473], [434, 433], [435, 434], [436, 435], [437, 434], [437, 436], [438, 3], [439, 438], [439, 437], [440, 439], [440, 430], [441, 440], [442, 432], [442, 441], [443, 383], [443, 473], [444, 443], [445, 444], [446, 445], [447, 444], [447, 446], [448, 3], [449, 448], [449, 447], [450, 430], [450, 442], [451, 449], [451, 450], [452, 2], [453, 451], [453, 452], [454, 383], [454, 473], [455, 454], [456, 455], [457, 456], [458, 455], [458, 457], [459, 3], [460, 458], [460, 459], [461, 460], [461, 451], [461, 408], [462, 461], [463, 462], [463, 453], [464, 383], [464, 473], [465, 464], [466, 465], [467, 466], [468, 465], [468, 467], [469, 3], [470, 469], [470, 468], [471, 463], [471, 451], [472, 471], [472, 470], [473, 383], [473, 473], [474, 473], [474, 383], [475, 4], [475, 474], [476, 475], [478, 2], [479, 478], [480, 479], [481, 480], [482, 481], [485, 2], [486, 526], [486, 505], [486, 485], [486, 547], [487, 548], [487, 483], [488, 487], [489, 488], [490, 489], [491, 488], [491, 490], [492, 3], [493, 491], [493, 492], [494, 547], [494, 526], [494, 493], [494, 505], [495, 494], [496, 495], [496, 486], [497, 548], [497, 483], [498, 497], [499, 498], [500, 499], [501, 498], [501, 500], [502, 3], [503, 502], [503, 501], [504, 496], [504, 547], [504, 526], [504, 505], [505, 504], [505, 503], [506, 2], [507, 506], [507, 505], [508, 483], [508, 548], [509, 508], [510, 509], [511, 510], [512, 511], [512, 509], [513, 3], [514, 513], [514, 512], [515, 514], [515, 505], [516, 515], [517, 516], [517, 507], [518, 483], [518, 548], [519, 518], [520, 519], [521, 520], [522, 519], [522, 521], [523, 3], [524, 523], [524, 522], [525, 505], [525, 517], [526, 524], [526, 525], [527, 2], [528, 526], [528, 527], [529, 483], [529, 548], [530, 529], [531, 530], [532, 531], [533, 530], [533, 532], [534, 3], [535, 533], [535, 534], [536, 526], [536, 535], [537, 536], [538, 537], [538, 528], [539, 548], [539, 483], [540, 539], [541, 540], [542, 541], [543, 540], [543, 542], [544, 3], [545, 543], [545, 544], [546, 526], [546, 538], [547, 546], [547, 545], [548, 483], [548, 548], [549, 483], [549, 548], [550, 549], [550, 4], [551, 550], [553, 2], [554, 553], [555, 554], [556, 555], [557, 556], [558, 2], [559, 558], [560, 559], [561, 560], [562, 2], [563, 562], [564, 563], [565, 2], [566, 565], [567, 566], [568, 2], [569, 568], [570, 569], [573, 2], [574, 573], [574, 673], [574, 720], [574, 767], [574, 603], [574, 612], [574, 594], [575, 574], [576, 768], [576, 571], [576, 575], [577, 576], [578, 2], [579, 720], [579, 578], [579, 767], [579, 603], [579, 612], [579, 594], [579, 673], [580, 768], [580, 571], [582, 579], [582, 580], [583, 603], [583, 612], [583, 582], [583, 594], [583, 673], [583, 720], [583, 767], [584, 583], [585, 584], [586, 768], [586, 571], [587, 586], [588, 587], [589, 588], [590, 587], [590, 589], [591, 3], [592, 590], [592, 591], [593, 564], [594, 592], [594, 593], [595, 768], [595, 571], [596, 595], [597, 596], [598, 597], [599, 596], [599, 598], [600, 3], [601, 599], [601, 600], [602, 567], [603, 601], [603, 602], [604, 768], [604, 571], [605, 604], [606, 605], [607, 606], [608, 605], [608, 607], [609, 3], [610, 608], [610, 609], [611, 570], [612, 610], [612, 611], [614, 2], [615, 612], [615, 614], [615, 594], [615, 673], [615, 720], [615, 767], [615, 603], [616, 615], [617, 768], [617, 571], [617, 616], [618, 617], [619, 2], [620, 673], [620, 619], [620, 720], [620, 767], [620, 603], [620, 612], [620, 594], [621, 571], [621, 768], [623, 620], [623, 621], [624, 594], [624, 673], [624, 720], [624, 612], [624, 767], [624, 623], [624, 603], [625, 624], [626, 625], [627, 2], [628, 720], [628, 612], [628, 767], [628, 603], [628, 627], [628, 594], [628, 673], [629, 768], [629, 571], [630, 629], [631, 630], [632, 631], [633, 630], [633, 632], [634, 628], [634, 633], [635, 594], [635, 673], [635, 720], [635, 634], [635, 767], [635, 603], [635, 612], [636, 635], [637, 2], [638, 637], [638, 594], [638, 673], [638, 720], [638, 612], [638, 767], [638, 603], [639, 768], [639, 571], [641, 639], [641, 638], [642, 720], [642, 612], [642, 767], [642, 603], [642, 594], [642, 641], [642, 673], [643, 642], [644, 636], [645, 643], [645, 644], [646, 564], [647, 646], [648, 2], [649, 767], [649, 603], [649, 648], [649, 594], [649, 673], [649, 720], [649, 612], [650, 768], [650, 571], [652, 650], [652, 649], [653, 673], [653, 652], [653, 720], [653, 612], [653, 767], [653, 603], [653, 594], [654, 653], [656, 655], [656, 654], [658, 656], [658, 647], [659, 645], [659, 658], [660, 659], [662, 661], [663, 662], [664, 663], [665, 571], [665, 768], [666, 665], [667, 666], [668, 667], [669, 668], [669, 666], [670, 3], [671, 670], [671, 669], [672, 664], [673, 672], [673, 671], [674, 2], [675, 673], [675, 674], [676, 768], [676, 571], [677, 676], [678, 677], [679, 678], [680, 679], [680, 677], [681, 680], [681, 675], [682, 681], [682, 673], [682, 720], [683, 682], [684, 2], [685, 684], [685, 673], [686, 768], [686, 571], [688, 685], [688, 686], [689, 673], [689, 688], [690, 689], [691, 683], [692, 690], [692, 691], [693, 567], [694, 693], [695, 2], [696, 695], [696, 673], [697, 768], [697, 571], [699, 697], [699, 696], [700, 673], [700, 699], [701, 700], [703, 702], [703, 701], [705, 703], [705, 694], [706, 692], [706, 705], [707, 706], [709, 708], [710, 709], [711, 710], [712, 571], [712, 768], [713, 712], [714, 713], [715, 714], [716, 713], [716, 715], [717, 3], [718, 716], [718, 717], [719, 711], [720, 718], [720, 719], [721, 2], [722, 721], [722, 720], [723, 768], [723, 571], [724, 723], [725, 724], [726, 725], [727, 724], [727, 726], [728, 722], [728, 727], [729, 767], [729, 728], [729, 720], [730, 729], [731, 2], [732, 720], [732, 731], [733, 768], [733, 571], [735, 732], [735, 733], [736, 673], [736, 720], [736, 735], [737, 736], [738, 730], [739, 737], [739, 738], [740, 570], [741, 740], [742, 2], [743, 742], [743, 720], [744, 768], [744, 571], [746, 744], [746, 743], [747, 746], [747, 673], [747, 720], [748, 747], [750, 748], [750, 749], [752, 750], [752, 741], [753, 739], [753, 752], [754, 753], [756, 755], [757, 756], [758, 757], [759, 768], [759, 571], [760, 759], [761, 760], [762, 761], [763, 760], [763, 762], [764, 3], [765, 763], [765, 764], [766, 758], [767, 765], [767, 766], [768, 768], [768, 571], [769, 768], [769, 571], [770, 769], [770, 4], [771, 770], [775, 2], [776, 801], [776, 790], [776, 812], [776, 775], [777, 776], [778, 773], [778, 777], [778, 813], [779, 778], [780, 2], [781, 812], [781, 801], [781, 790], [781, 780], [782, 813], [782, 773], [783, 782], [784, 783], [785, 784], [786, 783], [786, 785], [787, 3], [788, 787], [788, 786], [789, 781], [790, 788], [790, 789], [791, 2], [792, 791], [792, 790], [793, 813], [793, 773], [794, 793], [795, 794], [796, 795], [797, 794], [797, 796], [798, 3], [799, 798], [799, 797], [800, 792], [801, 799], [801, 800], [802, 2], [803, 802], [803, 801], [804, 813], [804, 773], [805, 804], [806, 805], [807, 806], [808, 805], [808, 807], [809, 3], [810, 809], [810, 808], [811, 803], [812, 811], [812, 810], [813, 813], [813, 773], [814, 773], [814, 813], [815, 814], [815, 4], [816, 815], [819, 0], [820, 474], [820, 355], [820, 556], [820, 769], [820, 549], [820, 814]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/4b58bb905f42bf1b4392143f49979b18b390ebb44b12087a07242a7fbf0e831a_4b58bb905f42bf1b4392143f49979b18b390ebb44b12087a07242a7fbf0e831a.jsonl.gz", "strip_func_name": "sub_40951D", "query": "\n\n\n__int64 __fastcall sub_40951D(__int64 a1, __int64 a2, int a3)\n{\n__int64 v3; // rax\n__int64 result; // rax\n__int64 v5; // rax\nunsigned __int8 v6; // [rsp+20h] [rbp-24h]\nunsigned __int8 v7; // [rsp+21h] [rbp-23h]\nunsigned __int8 v8; // [rsp+22h] [rbp-22h]\n__int16 v9; // [rsp+23h] [rbp-21h]\nchar v10; // [rsp+25h] [rbp-1Fh]\nunsigned __int8 v11; // [rsp+26h] [rbp-1Eh]\nunsigned __int8 v12; // [rsp+27h] [rbp-1Dh]\nunsigned __int8 v13; // [rsp+28h] [rbp-1Ch]\n__int16 v14; // [rsp+29h] [rbp-1Bh]\nchar v15; // [rsp+2Bh] [rbp-19h]\nint m; // [rsp+30h] [rbp-14h]\nint l; // [rsp+34h] [rbp-10h]\nint k; // [rsp+38h] [rbp-Ch]\nint j; // [rsp+3Ch] [rbp-8h]\nint i; // [rsp+40h] [rbp-4h]\n\nif ( (*(_QWORD *)(a1 + 272) & 0x2000LL) != 0 && (*(_QWORD *)(a1 + 272) & 0x80LL) != 0 )\n{\nif ( *(_BYTE *)(a1 + 497) == 3 )\n{\nLOBYTE(v14) = *(_BYTE *)(*(_QWORD *)(a1 + 576) + *(unsigned __int16 *)(a1 + 514));\nHIBYTE(v14) = *(_BYTE *)(*(_QWORD *)(a1 + 576) + *(unsigned __int16 *)(a1 + 516));\nv15 = *(_BYTE *)(*(_QWORD *)(a1 + 576) + *(unsigned __int16 *)(a1 + 518));\nv11 = *(_BYTE *)(*(_QWORD *)(a1 + 592) + *(unsigned __int16 *)(a1 + 514));\nv12 = *(_BYTE *)(*(_QWORD *)(a1 + 592) + *(unsigned __int16 *)(a1 + 516));\nv13 = *(_BYTE *)(*(_QWORD *)(a1 + 592) + *(unsigned __int16 *)(a1 + 518));\nfor ( i = 0; ; ++i )\n{\nresult = (unsigned int)i;\nif ( i >= a3 )\nbreak;\nif ( i >= *(unsigned __int16 *)(a1 + 490) || *(_BYTE *)(*(_QWORD *)(a1 + 632) + i) )\n{\nif ( i >= *(unsigned __int16 *)(a1 + 490) || *(_BYTE *)(*(_QWORD *)(a1 + 632) + i) == 0xFF )\n{\n*(_BYTE *)(a2 + 3LL * i) = *(_BYTE *)(*(unsigned __int8 *)(3LL * i + a2) + *(_QWORD *)(a1 + 576));\n*(_BYTE *)(a2 + 3LL * i + 1) = *(_BYTE *)(*(unsigned __int8 *)(3LL * i + a2 + 1) + *(_QWORD *)(a1 + 576));\n*(_BYTE *)(a2 + 3LL * i + 2) = *(_BYTE *)(*(unsigned __int8 *)(3LL * i + a2 + 2) + *(_QWORD *)(a1 + 576));\n}\nelse\n{\n*(_BYTE *)(a2 + 3LL * i) = *(_BYTE *)(*(_QWORD *)(a1 + 584)\n+ (int)((*(unsigned __int8 *)(*(_QWORD *)(a1 + 632) + i)\n* (unsigned __int64)*(unsigned __int8 *)(*(_QWORD *)(a1 + 592)\n+ *(unsigned __int8 *)(*(_QWORD *)(a1 + 480) + 3LL * i))\n+ v11\n* (__int64)(255 - *(unsigned __int8 *)(*(_QWORD *)(a1 + 632) + i))\n+ 127)\n/ 0xFF));\n*(_BYTE *)(a2 + 3LL * i + 1) = *(_BYTE *)(*(_QWORD *)(a1 + 584)\n+ (int)((*(unsigned __int8 *)(*(_QWORD *)(a1 + 632) + i)\n* (unsigned __int64)*(unsigned __int8 *)(*(_QWORD *)(a1 + 592)\n+ *(unsigned __int8 *)(*(_QWORD *)(a1 + 480) + 3LL * i + 1))\n+ v12\n* (__int64)(255\n- *(unsigned __int8 *)(*(_QWORD *)(a1 + 632) + i))\n+ 127)\n/ 0xFF));\n*(_BYTE *)(a2 + 3LL * i + 2) = *(_BYTE *)(*(_QWORD *)(a1 + 584)\n+ (int)((*(unsigned __int8 *)(*(_QWORD *)(a1 + 632) + i)\n* (unsigned __int64)*(unsigned __int8 *)(*(_QWORD *)(a1 + 592)\n+ *(unsigned __int8 *)(*(_QWORD *)(a1 + 480) + 3LL * i + 2))\n+ v13\n* (__int64)(255\n- *(unsigned __int8 *)(*(_QWORD *)(a1 + 632) + i))\n+ 127)\n/ 0xFF));\n}\n}\nelse\n{\nv3 = 3LL * i + a2;\n*(_WORD *)v3 = v14;\n*(_BYTE *)(v3 + 2) = v15;\n}\n}\n}\nelse\n{\nLOBYTE(v9) = *(_BYTE *)(*(_QWORD *)(a1 + 576) + *(unsigned __int16 *)(a1 + 514));\nHIBYTE(v9) = *(_BYTE *)(*(_QWORD *)(a1 + 576) + *(unsigned __int16 *)(a1 + 516));\nv10 = *(_BYTE *)(*(_QWORD *)(a1 + 576) + *(unsigned __int16 *)(a1 + 518));\nfor ( j = 0; ; ++j )\n{\nresult = (unsigned int)j;\nif ( j >= a3 )\nbreak;\nif ( *(unsigned __int8 *)(3LL * j + a2) == *(_WORD *)(a1 + 648) )\n{\nv5 = 3LL * j + a2;\n*(_WORD *)v5 = v9;\n*(_BYTE *)(v5 + 2) = v10;\n}\nelse\n{\n*(_BYTE *)(a2 + 3LL * j) = *(_BYTE *)(*(unsigned __int8 *)(3LL * j + a2) + *(_QWORD *)(a1 + 576));\n*(_BYTE *)(a2 + 3LL * j + 1) = *(_BYTE *)(*(unsigned __int8 *)(3LL * j + a2 + 1) + *(_QWORD *)(a1 + 576));\n*(_BYTE *)(a2 + 3LL * j + 2) = *(_BYTE *)(*(unsigned __int8 *)(3LL * j + a2 + 2) + *(_QWORD *)(a1 + 576));\n}\n}\n}\n}\nelse if ( (*(_QWORD *)(a1 + 272) & 0x2000LL) != 0 )\n{\nfor ( k = 0; ; ++k )\n{\nresult = (unsigned int)k;\nif ( k >= a3 )\nbreak;\n*(_BYTE *)(a2 + 3LL * k) = *(_BYTE *)(*(unsigned __int8 *)(3LL * k + a2) + *(_QWORD *)(a1 + 576));\n*(_BYTE *)(a2 + 3LL * k + 1) = *(_BYTE *)(*(unsigned __int8 *)(3LL * k + a2 + 1) + *(_QWORD *)(a1 + 576));\n*(_BYTE *)(a2 + 3LL * k + 2) = *(_BYTE *)(*(unsigned __int8 *)(3LL * k + a2 + 2) + *(_QWORD *)(a1 + 576));\n}\n}\nelse\n{\nresult = *(_QWORD *)(a1 + 272) & 0x80LL;\nif ( result )\n{\nif ( *(_BYTE *)(a1 + 497) == 3 )\n{\nv6 = *(_WORD *)(a1 + 514);\nv7 = *(_WORD *)(a1 + 516);\nv8 = *(_WORD *)(a1 + 518);\nfor ( l = 0; ; ++l )\n{\nresult = (unsigned int)l;\nif ( l >= a3 )\nbreak;\nif ( l < *(unsigned __int16 *)(a1 + 490) && *(_BYTE *)(*(_QWORD *)(a1 + 632) + l) )\n{\nif ( l < *(unsigned __int16 *)(a1 + 490) || *(_BYTE *)(*(_QWORD *)(a1 + 632) + l) != 0xFF )\n{\n*(_BYTE *)(3LL * l + a2) = (*(unsigned __int8 *)(*(_QWORD *)(a1 + 632) + l)\n* (unsigned __int64)*(unsigned __int8 *)(*(_QWORD *)(a1 + 480) + 3LL * l)\n+ v6 * (__int64)(255 - *(unsigned __int8 *)(*(_QWORD *)(a1 + 632) + l))\n+ 127)\n/ 0xFF;\n*(_BYTE *)(3LL * l + a2 + 1) = (*(unsigned __int8 *)(*(_QWORD *)(a1 + 632) + l)\n* (unsigned __int64)*(unsigned __int8 *)(*(_QWORD *)(a1 + 480) + 3LL * l + 1)\n+ v7 * (__int64)(255 - *(unsigned __int8 *)(*(_QWORD *)(a1 + 632) + l))\n+ 127)\n/ 0xFF;\n*(_BYTE *)(3LL * l + a2 + 2) = (*(unsigned __int8 *)(*(_QWORD *)(a1 + 632) + l)\n* (unsigned __int64)*(unsigned __int8 *)(*(_QWORD *)(a1 + 480) + 3LL * l + 2)\n+ v8 * (__int64)(255 - *(unsigned __int8 *)(*(_QWORD *)(a1 + 632) + l))\n+ 127)\n/ 0xFF;\n}\n}\nelse\n{\n*(_BYTE *)(a2 + 3LL * l) = v6;\n*(_BYTE *)(a2 + 3LL * l + 1) = v7;\n*(_BYTE *)(a2 + 3LL * l + 2) = v8;\n}\n}\n}\nelse\n{\nfor ( m = 0; ; ++m )\n{\nresult = (unsigned int)m;\nif ( m >= a3 )\nbreak;\nif ( m == *(unsigned __int16 *)(a1 + 648) )\n{\n*(_BYTE *)(3LL * m + a2) = *(_WORD *)(a1 + 514);\n*(_BYTE *)(3LL * m + a2 + 1) = *(_WORD *)(a1 + 516);\n*(_BYTE *)(3LL * m + a2 + 2) = *(_WORD *)(a1 + 518);\n}\n}\n}\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v6,v9,v10,v11,v12,v13,v14,v15,m,l,k,j,sub_40951D,]", "hints": "[]", "response": "{'a3': 'num_palette', 'a1': 'png_ptr', 'a2': 'palette', 'v6': 'back_2a', 'v9': 'back_0', 'v10': 'back_0_2', 'v11': 'back_1', 'v12': 'back_1_1', 'v13': 'back_1_2', 'v14': 'back', 'v15': 'back_2', 'm': 'i_3', 'l': 'i_2', 'k': 'i_1', 'j': 'i_0', 'sub_40951D': 'png_correct_palette'}"}
[ [ 0.7809707522392273, 0.7800534963607788, 0.7619251608848572, 0.7616583704948425, 0.7493923902511597, 0.7491980791091919, 0.7453941106796265, 0.7451525330543518, 0.7449179887771606, 0.7402563095092773, 0.7391954064369202, 0.7390104532241821, 0.7343254685401917, 0.7325266003608704, 0.7323121428489685, 0.7311878800392151, 0.7307663559913635, 0.7272475957870483, 0.7251416444778442, 0.7180240750312805 ], [ 66484, 28124, 33061, 90565, 197294, 149162, 38449, 199180, 22881, 9985, 87453, 43333, 3051, 12995, 252421, 87177, 228240, 48870, 109303, 75510 ] ]
thread1
3f8cfcd5d3dae1661f8df9b60fd312199acde3ddc83688dfd975523265fe822e
bnoordhuis
strace
NA
static int thread1(void *unused) { write(1, "1", 1); for(;;) pause(); return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "fn", "function_addr": 4198914, "binary_name": "3f8cfcd5d3dae1661f8df9b60fd312199acde3ddc83688dfd975523265fe822e.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov edx, 1"], [5, "mov esi, offset unk_402004"], [6, "mov edi, 1"], [7, "call _write"], [8, "call _pause"], [9, "jmp short loc_401222"]], "data_dep": []}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/3f8cfcd5d3dae1661f8df9b60fd312199acde3ddc83688dfd975523265fe822e_3f8cfcd5d3dae1661f8df9b60fd312199acde3ddc83688dfd975523265fe822e.jsonl.gz", "strip_func_name": "fn", "query": "\n\n\nvoid __fastcall __noreturn fn(void *arg)\n{\nwrite(1, &unk_402004, 1uLL);\nwhile ( 1 )\npause();\n}\n\n\n\nQ:[arg,]", "hints": "[]", "response": "{'arg': 'unused'}"}
[ [ 0.7876139879226685, 0.7841709852218628, 0.7389559745788574, 0.7366750240325928, 0.7348139882087708, 0.7235888838768005, 0.7203978300094604, 0.718105673789978, 0.7176244258880615, 0.7148187756538391, 0.7140401005744934, 0.7132436037063599, 0.7107975482940674, 0.7099407315254211, 0.7090610861778259, 0.7048150300979614, 0.7044780254364014, 0.7039633989334106, 0.7021273374557495, 0.701392412185669 ], [ 40602, 218628, 198464, 165730, 234379, 225911, 98963, 218901, 257550, 247099, 255636, 136252, 20594, 59811, 125207, 201632, 175838, 262428, 191049, 160816 ] ]
ina219_read_bus_voltage
12d96baabfcf2470c3759a118fb8b6777fb61250d9155b0a78f4ef1b4326aaab
hepingood
ina219
NA
uint8_t ina219_read_bus_voltage(ina219_handle_t *handle, uint16_t *raw, float *mV) { uint8_t res; if (handle == NULL) /* check handle */ { return 2; /* return error */ } if (handle->inited != 1) /* check handle initialization */ { return 3; /* return error */ } res = a_ina219_iic_read(handle, INA219_REG_BUS_VOLTAGE, (uint16_t *)raw); /* read bus voltage */ if (res != 0) /* check result */ { handle->debug_print("ina219: read bus voltage register failed.\n"); /* read bus voltage register failed */ return 1; /* return error */ } if (((*raw) & (1 << 0)) != 0) { handle->debug_print("ina219: math overflow.\n"); /* math overflow */ return 4; /* return error */ } if (((*raw) & (1 << 1)) == 0) { handle->debug_print("ina219: conversion not ready.\n"); /* math overflow */ return 5; /* return error */ } *raw = (*raw) >> 3; /* right shift 3 */ *mV = (float)(*raw) * 4.0f; /* set the converted data */ return 0; /* success return 0 */ }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401BB8", "function_addr": 4201400, "binary_name": "12d96baabfcf2470c3759a118fb8b6777fb61250d9155b0a78f4ef1b4326aaab.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "cmp [rbp+var_18], 0"], [7, "jnz short loc_401BDD"], [8, "mov eax, 2"], [9, "jmp locret_401CC6"], [10, "mov rax, [rbp+var_18]"], [11, "movzx eax, byte ptr [rax+48h]"], [12, "cmp al, 1"], [13, "jz short loc_401BF3"], [14, "mov eax, 3"], [15, "jmp locret_401CC6"], [16, "mov rdx, [rbp+var_20]"], [17, "mov rax, [rbp+var_18]"], [18, "mov esi, 2"], [19, "mov rdi, rax"], [20, "call sub_401232"], [21, "mov [rbp+var_1], al"], [22, "cmp [rbp+var_1], 0"], [23, "jz short loc_401C2F"], [24, "mov rax, [rbp+var_18]"], [25, "mov rdx, [rax+30h]"], [26, "mov edi, offset aIna219ReadBusV"], [27, "mov eax, 0"], [28, "call rdx"], [29, "mov eax, 1"], [30, "jmp locret_401CC6"], [31, "mov rax, [rbp+var_20]"], [32, "movzx eax, word ptr [rax]"], [33, "movzx eax, ax"], [34, "and eax, 1"], [35, "test eax, eax"], [36, "jz short loc_401C5B"], [37, "mov rax, [rbp+var_18]"], [38, "mov rdx, [rax+30h]"], [39, "mov edi, offset aIna219MathOver"], [40, "mov eax, 0"], [41, "call rdx"], [42, "mov eax, 4"], [43, "jmp short locret_401CC6"], [44, "mov rax, [rbp+var_20]"], [45, "movzx eax, word ptr [rax]"], [46, "movzx eax, ax"], [47, "and eax, 2"], [48, "test eax, eax"], [49, "jnz short loc_401C87"], [50, "mov rax, [rbp+var_18]"], [51, "mov rdx, [rax+30h]"], [52, "mov edi, offset aIna219Conversi"], [53, "mov eax, 0"], [54, "call rdx"], [55, "mov eax, 5"], [56, "jmp short locret_401CC6"], [57, "mov rax, [rbp+var_20]"], [58, "movzx eax, word ptr [rax]"], [59, "shr ax, 3"], [60, "mov edx, eax"], [61, "mov rax, [rbp+var_20]"], [62, "mov [rax], dx"], [63, "mov rax, [rbp+var_20]"], [64, "movzx eax, word ptr [rax]"], [65, "movzx eax, ax"], [66, "pxor xmm1, xmm1"], [67, "cvtsi2ss xmm1, eax"], [68, "movss xmm0, cs:dword_4082EC"], [69, "mulss xmm0, xmm1"], [70, "mov rax, [rbp+var_28]"], [71, "movss dword ptr [rax], xmm0"], [72, "mov eax, 0"], [73, "leave"], [74, "retn"]], "data_dep": [[6, 3], [7, 6], [10, 3], [11, 10], [12, 11], [13, 12], [16, 4], [17, 3], [19, 17], [21, 20], [22, 21], [23, 22], [24, 3], [25, 24], [28, 25], [31, 4], [32, 31], [33, 32], [34, 33], [35, 34], [36, 35], [37, 3], [38, 37], [41, 38], [44, 4], [45, 44], [46, 45], [47, 46], [48, 47], [49, 48], [50, 3], [51, 50], [54, 51], [57, 4], [58, 57], [59, 58], [60, 59], [61, 4], [62, 61], [62, 60], [63, 4], [64, 62], [64, 63], [65, 64], [67, 65], [67, 66], [69, 68], [69, 67], [70, 5], [71, 70], [71, 69], [74, 55], [74, 42], [74, 8], [74, 72], [74, 14], [74, 29]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/12d96baabfcf2470c3759a118fb8b6777fb61250d9155b0a78f4ef1b4326aaab_12d96baabfcf2470c3759a118fb8b6777fb61250d9155b0a78f4ef1b4326aaab.jsonl.gz", "strip_func_name": "sub_401BB8", "query": "\n\n\n__int64 __fastcall sub_401BB8(__int64 a1, unsigned __int16 *a2, float *a3)\n{\n__int64 result; // rax\n\nif ( !a1 )\nreturn 2LL;\nif ( *(_BYTE *)(a1 + 72) != 1 )\nreturn 3LL;\nif ( (unsigned __int8)sub_401232((unsigned __int8 *)a1, 2u, a2) )\n{\n(*(void (__fastcall **)(const char *))(a1 + 48))(\"ina219: read bus voltage register failed.\\n\");\nresult = 1LL;\n}\nelse if ( (*a2 & 1) != 0 )\n{\n(*(void (__fastcall **)(const char *))(a1 + 48))(\"ina219: math overflow.\\n\");\nresult = 4LL;\n}\nelse if ( (*a2 & 2) != 0 )\n{\n*a2 >>= 3;\n*a3 = 4.0 * (float)*a2;\nresult = 0LL;\n}\nelse\n{\n(*(void (__fastcall **)(const char *))(a1 + 48))(\"ina219: conversion not ready.\\n\");\nresult = 5LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_401BB8,sub_401232,]", "hints": "[]", "response": "{'a3': 'mV', 'a1': 'handle', 'a2': 'raw', 'sub_401BB8': 'ina219_read_bus_voltage', 'sub_401232': 'a_ina219_iic_read'}"}
[ [ 0.826386570930481, 0.8261833786964417, 0.7967100143432617, 0.7932901382446289, 0.7927712798118591, 0.7745991945266724, 0.7729901671409607, 0.7722214460372925, 0.7700668573379517, 0.7697348594665527, 0.7683591246604919, 0.7683282494544983, 0.766637921333313, 0.764134407043457, 0.7599684000015259, 0.7469853758811951, 0.746181309223175, 0.7452492713928223, 0.7405678033828735, 0.7357584834098816 ], [ 235923, 94565, 259833, 174090, 254852, 210215, 75439, 178305, 129851, 87735, 65390, 110016, 48196, 264782, 67161, 66244, 153130, 242061, 226553, 54420 ] ]
channel_compute_wedge_stats
89264c4857408ab3f221b0d85926406503a3e79cae125ccfd0c2641858ccc2ec
pietern
apt137
NA
void channel_compute_wedge_stats(channel *c) { const int N = TELEMETRY_WEDGE_WORDS; uint16_t width = CHANNEL_WORDS; uint16_t height = c->size / width; uint16_t i; uint16_t j; uint32_t v; uint64_t sums[8]; uint64_t sq_sums[8]; uint64_t sum = 0; uint64_t sq_sum = 0; uint64_t stddev; // Initialize arrays for (i = 0; i < 8; i++) { sums[i] = 0; sq_sums[i] = 0; } // Allocate space for wedge mean and stddev c->wedge_line_mean = calloc(height, sizeof(c->wedge_line_mean[0])); c->wedge_line_stddev = calloc(height, sizeof(c->wedge_line_stddev[0])); for (i = 0; i < height; i++) { // Subtract line from accumulators sum -= sums[i & 0x7]; sq_sum -= sq_sums[i & 0x7]; // Compute sum/squared sum for this line sums[i & 0x7] = 0; sq_sums[i & 0x7] = 0; for (j = CHANNEL_WORDS - TELEMETRY_WORDS; j < CHANNEL_WORDS; j++) { v = c->raw[i * width + j]; sums[i & 0x7] += v; sq_sums[i & 0x7] += v*v; } // Add line to accumulators sum += sums[i & 0x7]; sq_sum += sq_sums[i & 0x7]; // Compute stddev stddev = sqrt((sq_sum - (sum * sum) / N) / N); // Store measurements c->wedge_line_mean[i] = sum / N; c->wedge_line_stddev[i] = stddev; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401846", "function_addr": 4200518, "binary_name": "89264c4857408ab3f221b0d85926406503a3e79cae125ccfd0c2641858ccc2ec.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0C0h"], [3, "mov [rbp+var_B8], rdi"], [4, "mov [rbp+var_1C], 168h"], [5, "mov [rbp+var_1E], 3E9h"], [6, "mov rax, [rbp+var_B8]"], [7, "mov eax, [rax+8]"], [8, "movzx esi, [rbp+var_1E]"], [9, "mov edx, 0"], [10, "div esi"], [11, "mov [rbp+var_20], ax"], [12, "mov [rbp+var_10], 0"], [13, "mov [rbp+var_18], 0"], [14, "mov [rbp+var_2], 0"], [15, "jmp short loc_4018C2"], [16, "movzx eax, [rbp+var_2]"], [17, "cdqe"], [18, "mov [rbp+rax*8+var_70], 0"], [19, "movzx eax, [rbp+var_2]"], [20, "cdqe"], [21, "mov [rbp+rax*8+var_B0], 0"], [22, "movzx eax, [rbp+var_2]"], [23, "add eax, 1"], [24, "mov [rbp+var_2], ax"], [25, "cmp [rbp+var_2], 7"], [26, "jbe short loc_401896"], [27, "movzx eax, [rbp+var_20]"], [28, "mov esi, 2"], [29, "mov rdi, rax"], [30, "call _calloc"], [31, "mov rdx, rax"], [32, "mov rax, [rbp+var_B8]"], [33, "mov [rax+10h], rdx"], [34, "movzx eax, [rbp+var_20]"], [35, "mov esi, 2"], [36, "mov rdi, rax"], [37, "call _calloc"], [38, "mov rdx, rax"], [39, "mov rax, [rbp+var_B8]"], [40, "mov [rax+18h], rdx"], [41, "mov [rbp+var_2], 0"], [42, "jmp loc_401B25"], [43, "movzx eax, [rbp+var_2]"], [44, "and eax, 7"], [45, "cdqe"], [46, "mov rax, [rbp+rax*8+var_70]"], [47, "sub [rbp+var_10], rax"], [48, "movzx eax, [rbp+var_2]"], [49, "and eax, 7"], [50, "cdqe"], [51, "mov rax, [rbp+rax*8+var_B0]"], [52, "sub [rbp+var_18], rax"], [53, "movzx eax, [rbp+var_2]"], [54, "and eax, 7"], [55, "cdqe"], [56, "mov [rbp+rax*8+var_70], 0"], [57, "movzx eax, [rbp+var_2]"], [58, "and eax, 7"], [59, "cdqe"], [60, "mov [rbp+rax*8+var_B0], 0"], [61, "mov [rbp+var_4], 3BCh"], [62, "jmp loc_4019F1"], [63, "mov rax, [rbp+var_B8]"], [64, "mov rcx, [rax]"], [65, "movzx edx, [rbp+var_2]"], [66, "movzx eax, [rbp+var_1E]"], [67, "imul edx, eax"], [68, "movzx eax, [rbp+var_4]"], [69, "add eax, edx"], [70, "cdqe"], [71, "add rax, rax"], [72, "add rax, rcx"], [73, "movzx eax, word ptr [rax]"], [74, "movzx eax, ax"], [75, "mov [rbp+var_2C], eax"], [76, "movzx eax, [rbp+var_2]"], [77, "and eax, 7"], [78, "cdqe"], [79, "mov rcx, [rbp+rax*8+var_70]"], [80, "mov edx, [rbp+var_2C]"], [81, "movzx eax, [rbp+var_2]"], [82, "and eax, 7"], [83, "add rdx, rcx"], [84, "cdqe"], [85, "mov [rbp+rax*8+var_70], rdx"], [86, "movzx eax, [rbp+var_2]"], [87, "and eax, 7"], [88, "cdqe"], [89, "mov rdx, [rbp+rax*8+var_B0]"], [90, "mov eax, [rbp+var_2C]"], [91, "imul eax, eax"], [92, "mov ecx, eax"], [93, "movzx eax, [rbp+var_2]"], [94, "and eax, 7"], [95, "add rdx, rcx"], [96, "cdqe"], [97, "mov [rbp+rax*8+var_B0], rdx"], [98, "movzx eax, [rbp+var_4]"], [99, "add eax, 1"], [100, "mov [rbp+var_4], ax"], [101, "cmp [rbp+var_4], 3E8h"], [102, "jbe loc_40196B"], [103, "movzx eax, [rbp+var_2]"], [104, "and eax, 7"], [105, "cdqe"], [106, "mov rax, [rbp+rax*8+var_70]"], [107, "add [rbp+var_10], rax"], [108, "movzx eax, [rbp+var_2]"], [109, "and eax, 7"], [110, "cdqe"], [111, "mov rax, [rbp+rax*8+var_B0]"], [112, "add [rbp+var_18], rax"], [113, "mov rax, [rbp+var_10]"], [114, "imul rax, rax"], [115, "mov edx, [rbp+var_1C]"], [116, "movsxd rdi, edx"], [117, "mov edx, 0"], [118, "div rdi"], [119, "mov rdx, rax"], [120, "mov rax, [rbp+var_18]"], [121, "sub rax, rdx"], [122, "mov edx, [rbp+var_1C]"], [123, "movsxd rsi, edx"], [124, "mov edx, 0"], [125, "div rsi"], [126, "test rax, rax"], [127, "js short loc_401A67"], [128, "pxor xmm2, xmm2"], [129, "cvtsi2sd xmm2, rax"], [130, "movq rax, xmm2"], [131, "jmp short loc_401A85"], [132, "mov rdx, rax"], [133, "shr rdx, 1"], [134, "and eax, 1"], [135, "or rdx, rax"], [136, "pxor xmm0, xmm0"], [137, "cvtsi2sd xmm0, rdx"], [138, "addsd xmm0, xmm0"], [139, "movq rax, xmm0"], [140, "movq xmm0, rax"], [141, "call _sqrt"], [142, "comisd xmm0, cs:qword_403280"], [143, "jnb short loc_401AA4"], [144, "cvttsd2si rax, xmm0"], [145, "mov [rbp+var_28], rax"], [146, "jmp short loc_401AC7"], [147, "movsd xmm1, cs:qword_403280"], [148, "subsd xmm0, xmm1"], [149, "cvttsd2si rax, xmm0"], [150, "mov [rbp+var_28], rax"], [151, "mov rax, 8000000000000000h"], [152, "xor [rbp+var_28], rax"], [153, "mov rax, [rbp+var_28]"], [154, "mov [rbp+var_28], rax"], [155, "mov eax, [rbp+var_1C]"], [156, "movsxd rdi, eax"], [157, "mov rax, [rbp+var_10]"], [158, "mov edx, 0"], [159, "div rdi"], [160, "mov rcx, rax"], [161, "mov rax, [rbp+var_B8]"], [162, "mov rdx, [rax+10h]"], [163, "movzx eax, [rbp+var_2]"], [164, "add rax, rax"], [165, "add rax, rdx"], [166, "mov edx, ecx"], [167, "mov [rax], dx"], [168, "mov rax, [rbp+var_B8]"], [169, "mov rdx, [rax+18h]"], [170, "movzx eax, [rbp+var_2]"], [171, "add rax, rax"], [172, "add rax, rdx"], [173, "mov rdx, [rbp+var_28]"], [174, "mov [rax], dx"], [175, "movzx eax, [rbp+var_2]"], [176, "add eax, 1"], [177, "mov [rbp+var_2], ax"], [178, "movzx eax, [rbp+var_2]"], [179, "cmp ax, [rbp+var_20]"], [180, "jb loc_401912"], [181, "nop"], [182, "nop"], [183, "leave"], [184, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 5], [10, 8], [11, 7], [16, 24], [16, 14], [18, 16], [19, 24], [19, 14], [21, 19], [22, 14], [22, 24], [23, 22], [24, 23], [25, 24], [25, 14], [26, 25], [27, 11], [29, 27], [31, 30], [32, 3], [33, 31], [33, 32], [34, 11], [36, 34], [38, 37], [39, 3], [40, 38], [40, 39], [43, 41], [43, 177], [44, 43], [46, 56], [46, 44], [46, 85], [46, 18], [47, 107], [47, 46], [47, 12], [48, 177], [48, 41], [49, 48], [51, 49], [51, 97], [51, 60], [51, 21], [52, 51], [52, 112], [52, 13], [53, 41], [53, 177], [54, 53], [56, 54], [57, 41], [57, 177], [58, 57], [60, 58], [63, 3], [64, 63], [64, 40], [64, 33], [64, 174], [64, 167], [65, 177], [65, 41], [66, 5], [67, 65], [67, 66], [68, 61], [68, 100], [69, 67], [69, 68], [71, 69], [72, 71], [72, 64], [73, 174], [73, 167], [73, 72], [73, 40], [73, 33], [74, 73], [75, 74], [76, 177], [76, 41], [77, 76], [79, 85], [79, 77], [79, 56], [80, 75], [81, 41], [81, 177], [82, 81], [83, 80], [83, 79], [85, 82], [85, 83], [86, 177], [86, 41], [87, 86], [89, 97], [89, 60], [89, 87], [90, 75], [91, 90], [92, 91], [93, 177], [93, 41], [94, 93], [95, 92], [95, 89], [97, 95], [97, 94], [98, 100], [98, 61], [99, 98], [100, 99], [101, 61], [101, 100], [102, 101], [103, 177], [103, 41], [104, 103], [106, 56], [106, 104], [106, 85], [107, 106], [107, 47], [108, 41], [108, 177], [109, 108], [111, 109], [111, 97], [111, 60], [112, 52], [112, 111], [113, 107], [114, 113], [115, 4], [116, 115], [118, 116], [119, 114], [120, 112], [121, 119], [121, 120], [122, 4], [123, 122], [125, 123], [126, 121], [127, 126], [129, 128], [129, 126], [130, 129], [132, 126], [133, 132], [134, 126], [135, 133], [135, 134], [137, 136], [137, 135], [138, 137], [139, 138], [140, 130], [140, 139], [142, 140], [143, 126], [143, 135], [144, 141], [144, 142], [145, 144], [148, 147], [148, 142], [149, 148], [149, 141], [150, 149], [152, 151], [152, 150], [153, 152], [153, 145], [154, 153], [155, 4], [156, 155], [157, 107], [159, 156], [160, 157], [161, 3], [162, 40], [162, 33], [162, 161], [162, 174], [162, 167], [163, 177], [163, 41], [164, 163], [165, 162], [165, 164], [166, 160], [167, 166], [167, 165], [168, 3], [169, 40], [169, 167], [169, 168], [170, 41], [170, 177], [171, 170], [172, 169], [172, 171], [173, 154], [174, 173], [174, 172], [175, 177], [175, 41], [176, 175], [177, 176], [178, 177], [178, 41], [179, 178], [179, 11], [180, 179], [184, 178]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/89264c4857408ab3f221b0d85926406503a3e79cae125ccfd0c2641858ccc2ec_89264c4857408ab3f221b0d85926406503a3e79cae125ccfd0c2641858ccc2ec.jsonl.gz", "strip_func_name": "sub_401846", "query": "\n\n\n__int64 __fastcall sub_401846(__int64 a1)\n{\nunsigned __int64 v1; // rax\ndouble v2; // rax\ndouble v3; // xmm0_8\n__int64 result; // rax\n__int64 v5[16]; // [rsp+10h] [rbp-B0h]\nunsigned int v6; // [rsp+94h] [rbp-2Ch]\n__int64 v7; // [rsp+98h] [rbp-28h]\nunsigned __int16 v8; // [rsp+A0h] [rbp-20h]\nunsigned __int16 v9; // [rsp+A2h] [rbp-1Eh]\nint v10; // [rsp+A4h] [rbp-1Ch]\n__int64 v11; // [rsp+A8h] [rbp-18h]\nunsigned __int64 v12; // [rsp+B0h] [rbp-10h]\nunsigned __int16 j; // [rsp+BCh] [rbp-4h]\nunsigned __int16 i; // [rsp+BEh] [rbp-2h]\n\nv10 = 360;\nv9 = 1001;\nv8 = *(_DWORD *)(a1 + 8) / 0x3E9u;\nv12 = 0LL;\nv11 = 0LL;\nfor ( i = 0; i <= 7u; ++i )\n{\nv5[i + 8] = 0LL;\nv5[i] = 0LL;\n}\n*(_QWORD *)(a1 + 16) = calloc(v8, 2uLL);\n*(_QWORD *)(a1 + 24) = calloc(v8, 2uLL);\nfor ( i = 0; ; ++i )\n{\nresult = i;\nif ( i >= v8 )\nbreak;\nv12 -= v5[(i & 7) + 8];\nv11 -= v5[i & 7];\nv5[(i & 7) + 8] = 0LL;\nv5[i & 7] = 0LL;\nfor ( j = 956; j <= 0x3E8u; ++j )\n{\nv6 = *(unsigned __int16 *)(*(_QWORD *)a1 + 2LL * (v9 * i + j));\nv5[(i & 7) + 8] += v6;\nv5[i & 7] += v6 * v6;\n}\nv12 += v5[(i & 7) + 8];\nv11 += v5[i & 7];\nv1 = (v11 - v12 * v12 / v10) / v10;\nif ( (v1 & 0x8000000000000000LL) != 0LL )\nv2 = (double)(int)(v1 & 1 | (v1 >> 1)) + (double)(int)(v1 & 1 | (v1 >> 1));\nelse\nv2 = (double)(int)v1;\nv3 = sqrt(v2);\nif ( v3 >= 9.223372036854776e18 )\n{\nv7 = (unsigned int)(int)(v3 - 9.223372036854776e18);\nv7 ^= 0x8000000000000000LL;\n}\nelse\n{\nv7 = (unsigned int)(int)v3;\n}\n*(_WORD *)(*(_QWORD *)(a1 + 16) + 2LL * i) = v12 / v10;\n*(_WORD *)(*(_QWORD *)(a1 + 24) + 2LL * i) = v7;\n}\nreturn result;\n}\n\n\n\nQ:[a1,v5,v6,v7,v8,v9,v10,v11,v12,sub_401846,]", "hints": "[]", "response": "{'a1': 'c', 'v5': 'sq_sums', 'v6': 'v', 'v7': 'stddev', 'v8': 'height', 'v9': 'width', 'v10': 'N', 'v11': 'sq_sum', 'v12': 'sum', 'sub_401846': 'channel_compute_wedge_stats'}"}
[ [ 0.7273813486099243, 0.7178375720977783, 0.7156875133514404, 0.7129628658294678, 0.6950900554656982, 0.6949651837348938, 0.6943163275718689, 0.6916014552116394, 0.6739178895950317, 0.6729055643081665, 0.6717983484268188, 0.6712450981140137, 0.6705250144004822, 0.6701579689979553, 0.670138955116272, 0.6688581705093384, 0.6654160022735596, 0.6610468626022339, 0.659684419631958, 0.657960832118988 ], [ 63289, 192130, 5452, 226408, 220367, 232476, 75811, 254597, 39603, 169545, 111137, 63853, 109309, 207511, 166557, 67817, 140969, 178968, 56444, 10046 ] ]
csv_increase_buffer
78c4a902adf21624cf3c639643216bacefd02dfba6dbb4858507e84011e00a6a
fenugrec
nissutils
NA
static int csv_increase_buffer(struct csv_parser *p) { if (p == NULL) return 0; if (p->realloc_func == NULL) return 0; /* Increase the size of the entry buffer. Attempt to increase size by * p->blk_size, if this is larger than SIZE_MAX try to increase current * buffer size to SIZE_MAX. If allocation fails, try to allocate halve * the size and try again until successful or increment size is zero. */ size_t to_add = p->blk_size; void *vp; if ( p->entry_size >= SIZE_MAX - to_add ) to_add = SIZE_MAX - p->entry_size; if (!to_add) { p->status = CSV_ETOOBIG; return -1; } while ((vp = p->realloc_func(p->entry_buf, p->entry_size + to_add)) == NULL) { to_add /= 2; if (!to_add) { p->status = CSV_ENOMEM; return -1; } } /* Update entry buffer pointer and entry_size if successful */ p->entry_buf = vp; p->entry_size += to_add; return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40BD9E", "function_addr": 4242846, "binary_name": "78c4a902adf21624cf3c639643216bacefd02dfba6dbb4858507e84011e00a6a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "cmp [rbp+var_18], 0"], [5, "jnz short loc_40BDBB"], [6, "mov eax, 0"], [7, "jmp locret_40BE98"], [8, "mov rax, [rbp+var_18]"], [9, "mov rax, [rax+50h]"], [10, "test rax, rax"], [11, "jnz short loc_40BDD2"], [12, "mov eax, 0"], [13, "jmp locret_40BE98"], [14, "mov rax, [rbp+var_18]"], [15, "mov rax, [rax+40h]"], [16, "mov [rbp+var_8], rax"], [17, "mov rax, [rbp+var_18]"], [18, "mov rax, [rax+20h]"], [19, "mov rdx, [rbp+var_8]"], [20, "not rdx"], [21, "cmp rax, rdx"], [22, "jb short loc_40BE01"], [23, "mov rax, [rbp+var_18]"], [24, "mov rax, [rax+20h]"], [25, "not rax"], [26, "mov [rbp+var_8], rax"], [27, "cmp [rbp+var_8], 0"], [28, "jnz short loc_40BE3E"], [29, "mov rax, [rbp+var_18]"], [30, "mov dword ptr [rax+28h], 3"], [31, "mov eax, 0FFFFFFFFh"], [32, "jmp short locret_40BE98"], [33, "mov rax, [rbp+var_8]"], [34, "shr rax, 1"], [35, "mov [rbp+var_8], rax"], [36, "cmp [rbp+var_8], 0"], [37, "jnz short loc_40BE3E"], [38, "mov rax, [rbp+var_18]"], [39, "mov dword ptr [rax+28h], 2"], [40, "mov eax, 0FFFFFFFFh"], [41, "jmp short locret_40BE98"], [42, "mov rax, [rbp+var_18]"], [43, "mov rdx, [rax+50h]"], [44, "mov rax, [rbp+var_18]"], [45, "mov rcx, [rax+20h]"], [46, "mov rax, [rbp+var_8]"], [47, "add rcx, rax"], [48, "mov rax, [rbp+var_18]"], [49, "mov rax, [rax+10h]"], [50, "mov rsi, rcx"], [51, "mov rdi, rax"], [52, "call rdx"], [53, "mov [rbp+var_10], rax"], [54, "cmp [rbp+var_10], 0"], [55, "jz short loc_40BE1A"], [56, "mov rax, [rbp+var_18]"], [57, "mov rdx, [rbp+var_10]"], [58, "mov [rax+10h], rdx"], [59, "mov rax, [rbp+var_18]"], [60, "mov rdx, [rax+20h]"], [61, "mov rax, [rbp+var_8]"], [62, "add rdx, rax"], [63, "mov rax, [rbp+var_18]"], [64, "mov [rax+20h], rdx"], [65, "mov eax, 0"], [66, "leave"], [67, "retn"]], "data_dep": [[4, 3], [5, 4], [8, 3], [9, 8], [10, 9], [11, 10], [14, 3], [15, 14], [16, 15], [17, 3], [18, 17], [19, 16], [20, 19], [21, 18], [21, 20], [22, 21], [23, 3], [24, 23], [25, 24], [26, 25], [27, 16], [27, 26], [28, 27], [29, 3], [30, 29], [33, 26], [33, 35], [33, 16], [34, 33], [35, 34], [36, 35], [37, 36], [38, 3], [39, 38], [42, 3], [43, 42], [44, 3], [45, 44], [46, 26], [46, 35], [46, 16], [47, 46], [47, 45], [48, 3], [49, 48], [50, 47], [51, 49], [52, 43], [53, 52], [54, 53], [55, 54], [56, 3], [57, 53], [58, 56], [58, 57], [59, 3], [60, 59], [60, 58], [61, 26], [61, 35], [61, 16], [62, 61], [62, 60], [63, 3], [64, 62], [64, 63], [67, 65], [67, 31], [67, 40], [67, 6], [67, 12]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/78c4a902adf21624cf3c639643216bacefd02dfba6dbb4858507e84011e00a6a_78c4a902adf21624cf3c639643216bacefd02dfba6dbb4858507e84011e00a6a.jsonl.gz", "strip_func_name": "sub_40BD9E", "query": "\n\n\n__int64 __fastcall sub_40BD9E(__int64 a1)\n{\n__int64 result; // rax\n__int64 v2; // [rsp+10h] [rbp-10h]\nunsigned __int64 v3; // [rsp+18h] [rbp-8h]\n\nif ( !a1 )\nreturn 0LL;\nif ( !*(_QWORD *)(a1 + 80) )\nreturn 0LL;\nv3 = *(_QWORD *)(a1 + 64);\nif ( *(_QWORD *)(a1 + 32) >= ~v3 )\nv3 = ~*(_QWORD *)(a1 + 32);\nif ( v3 )\n{\nwhile ( 1 )\n{\nv2 = (*(__int64 (__fastcall **)(_QWORD, unsigned __int64))(a1 + 80))(\n*(_QWORD *)(a1 + 16),\nv3 + *(_QWORD *)(a1 + 32));\nif ( v2 )\nbreak;\nv3 >>= 1;\nif ( !v3 )\n{\n*(_DWORD *)(a1 + 40) = 2;\nreturn 0xFFFFFFFFLL;\n}\n}\n*(_QWORD *)(a1 + 16) = v2;\n*(_QWORD *)(a1 + 32) += v3;\nresult = 0LL;\n}\nelse\n{\n*(_DWORD *)(a1 + 40) = 3;\nresult = 0xFFFFFFFFLL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,v2,v3,sub_40BD9E,]", "hints": "[]", "response": "{'a1': 'p', 'v2': 'vp', 'v3': 'to_add', 'sub_40BD9E': 'csv_increase_buffer'}"}
[ [ 0.8182113170623779, 0.8091198801994324, 0.7946441173553467, 0.794273316860199, 0.7798018455505371, 0.7775067090988159, 0.7724477052688599, 0.766431450843811, 0.7644377946853638, 0.7620004415512085, 0.7578175067901611, 0.755784809589386, 0.7514976263046265, 0.748473584651947, 0.745570957660675, 0.7423296570777893, 0.7405657768249512, 0.7400168180465698, 0.7384269833564758, 0.7376217246055603 ], [ 78958, 86057, 132459, 27526, 153736, 103247, 230509, 136004, 83390, 91075, 128899, 9542, 162570, 73488, 213042, 8710, 63080, 8918, 61991, 113177 ] ]
gravity_hash_iterate
b2b6239f41efcd906cff8a967b6680bd1e1b9f4105564fc6f50ab0c84f5f6e97
marcobambini
gravity
NA
void gravity_hash_iterate (gravity_hash_t *hashtable, gravity_hash_iterate_fn iterate, void *data) { if ((!hashtable) || (!iterate)) return; for (uint32_t i=0; i<hashtable->size; ++i) { hash_node_t *node = hashtable->nodes[i]; if (!node) continue; while (node) { iterate(hashtable, node->key, node->value, data); node = node->next; } } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4514A5", "function_addr": 4527269, "binary_name": "b2b6239f41efcd906cff8a967b6680bd1e1b9f4105564fc6f50ab0c84f5f6e97.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "cmp [rbp+var_18], 0"], [7, "jz loc_451551"], [8, "cmp [rbp+var_20], 0"], [9, "jz loc_451551"], [10, "mov [rbp+var_4], 0"], [11, "jmp short loc_451544"], [12, "mov rax, [rbp+var_18]"], [13, "mov rdx, [rax+8]"], [14, "mov eax, [rbp+var_4]"], [15, "shl rax, 3"], [16, "add rax, rdx"], [17, "mov rax, [rax]"], [18, "mov [rbp+var_10], rax"], [19, "cmp [rbp+var_10], 0"], [20, "jz short loc_45153F"], [21, "jmp short loc_451536"], [22, "mov r8, [rbp+var_28]"], [23, "mov rax, [rbp+var_10]"], [24, "mov rcx, [rax+18h]"], [25, "mov rdi, [rax+20h]"], [26, "mov rax, [rbp+var_10]"], [27, "mov rsi, [rax+8]"], [28, "mov rdx, [rax+10h]"], [29, "mov rax, [rbp+var_18]"], [30, "mov r10, [rbp+var_20]"], [31, "mov r9, r8"], [32, "mov r8, rdi"], [33, "mov rdi, rax"], [34, "call r10"], [35, "mov rax, [rbp+var_10]"], [36, "mov rax, [rax+28h]"], [37, "mov [rbp+var_10], rax"], [38, "cmp [rbp+var_10], 0"], [39, "jnz short loc_4514FA"], [40, "jmp short loc_451540"], [41, "nop"], [42, "add [rbp+var_4], 1"], [43, "mov rax, [rbp+var_18]"], [44, "mov eax, [rax]"], [45, "cmp [rbp+var_4], eax"], [46, "jb short loc_4514D8"], [47, "jmp short locret_451552"], [48, "nop"], [49, "leave"], [50, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 4], [9, 8], [12, 3], [13, 12], [14, 10], [14, 42], [15, 14], [16, 13], [16, 15], [17, 16], [18, 17], [19, 18], [20, 19], [22, 5], [23, 37], [23, 18], [24, 23], [25, 23], [26, 37], [26, 18], [27, 26], [28, 26], [29, 3], [30, 4], [31, 22], [32, 25], [33, 29], [34, 30], [35, 37], [35, 18], [36, 35], [37, 36], [38, 37], [38, 18], [39, 38], [42, 10], [42, 42], [43, 3], [44, 43], [45, 10], [45, 42], [45, 44], [46, 45], [50, 44]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/b2b6239f41efcd906cff8a967b6680bd1e1b9f4105564fc6f50ab0c84f5f6e97_b2b6239f41efcd906cff8a967b6680bd1e1b9f4105564fc6f50ab0c84f5f6e97.jsonl.gz", "strip_func_name": "sub_4514A5", "query": "\n\n\n__int64 __fastcall sub_4514A5(unsigned int *a1, void (__fastcall *a2)(unsigned int *, _QWORD, _QWORD, _QWORD, _QWORD, __int64), __int64 a3)\n{\n__int64 result; // rax\n_QWORD *v5; // [rsp+20h] [rbp-10h]\nunsigned int i; // [rsp+2Ch] [rbp-4h]\n\nif ( a1 && a2 )\n{\nfor ( i = 0; ; ++i )\n{\nresult = *a1;\nif ( i >= (unsigned int)result )\nbreak;\nv5 = *(_QWORD **)(*((_QWORD *)a1 + 1) + 8LL * i);\nif ( v5 )\n{\nwhile ( v5 )\n{\na2(a1, v5[1], v5[2], v5[3], v5[4], a3);\nv5 = (_QWORD *)v5[5];\n}\n}\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v5,sub_4514A5,]", "hints": "[]", "response": "{'a3': 'data', 'a1': 'hashtable', 'a2': 'iterate', 'v5': 'node', 'sub_4514A5': 'gravity_hash_iterate'}"}
[ [ 0.773715078830719, 0.770936906337738, 0.7605186104774475, 0.7576582431793213, 0.7436069250106812, 0.7425318956375122, 0.7391513586044312, 0.7389910817146301, 0.7346028685569763, 0.7285556197166443, 0.7283642292022705, 0.7168307304382324, 0.7134717702865601, 0.711754322052002, 0.7076832056045532, 0.7065945863723755, 0.705486536026001, 0.7042434215545654, 0.7040286660194397, 0.7018578052520752 ], [ 185582, 169090, 46272, 23719, 111146, 247214, 228814, 183871, 15557, 135374, 143923, 69418, 69599, 71135, 262479, 80951, 164802, 60777, 83769, 51756 ] ]
m_system
7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807
arendst
Tasmota
NA
static int m_system(bvm *vm) { int res = -1, i, argc = be_top(vm); if (argc > 0) { be_tostring(vm, 1); be_pushstring(vm, " "); for (i = 2; i <= argc; ++i) { be_strconcat(vm, 1); /* add " " */ be_tostring(vm, i); be_pushvalue(vm, i); be_strconcat(vm, 1); /* concat arg */ be_pop(vm, 1); } be_pop(vm, argc); res = system(be_tostring(vm, 1)); } be_pushint(vm, res); be_return(vm); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4120D8", "function_addr": 4268248, "binary_name": "7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807.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], 0FFFFFFFFh"], [5, "mov rax, [rbp+var_18]"], [6, "mov rdi, rax"], [7, "call be_top"], [8, "mov [rbp+var_C], eax"], [9, "cmp [rbp+var_C], 0"], [10, "jle loc_4121BD"], [11, "mov rax, [rbp+var_18]"], [12, "mov esi, 1"], [13, "mov rdi, rax"], [14, "call be_tostring"], [15, "mov rax, [rbp+var_18]"], [16, "mov esi, offset asc_43E70B"], [17, "mov rdi, rax"], [18, "call be_pushstring"], [19, "mov [rbp+var_8], 2"], [20, "jmp short loc_412188"], [21, "mov rax, [rbp+var_18]"], [22, "mov esi, 1"], [23, "mov rdi, rax"], [24, "call be_strconcat"], [25, "mov edx, [rbp+var_8]"], [26, "mov rax, [rbp+var_18]"], [27, "mov esi, edx"], [28, "mov rdi, rax"], [29, "call be_tostring"], [30, "mov edx, [rbp+var_8]"], [31, "mov rax, [rbp+var_18]"], [32, "mov esi, edx"], [33, "mov rdi, rax"], [34, "call be_pushvalue"], [35, "mov rax, [rbp+var_18]"], [36, "mov esi, 1"], [37, "mov rdi, rax"], [38, "call be_strconcat"], [39, "mov rax, [rbp+var_18]"], [40, "mov esi, 1"], [41, "mov rdi, rax"], [42, "call be_pop"], [43, "add [rbp+var_8], 1"], [44, "mov eax, [rbp+var_8]"], [45, "cmp eax, [rbp+var_C]"], [46, "jle short loc_41212F"], [47, "mov edx, [rbp+var_C]"], [48, "mov rax, [rbp+var_18]"], [49, "mov esi, edx"], [50, "mov rdi, rax"], [51, "call be_pop"], [52, "mov rax, [rbp+var_18]"], [53, "mov esi, 1"], [54, "mov rdi, rax"], [55, "call be_tostring"], [56, "mov rdi, rax"], [57, "call _system"], [58, "mov [rbp+var_4], eax"], [59, "mov edx, [rbp+var_4]"], [60, "mov rax, [rbp+var_18]"], [61, "mov esi, edx"], [62, "mov rdi, rax"], [63, "call be_pushint"], [64, "mov rax, [rbp+var_18]"], [65, "mov rdi, rax"], [66, "call be_returnvalue"], [67, "leave"], [68, "retn"]], "data_dep": [[5, 3], [6, 5], [8, 7], [9, 8], [10, 9], [11, 3], [13, 11], [15, 3], [17, 15], [21, 3], [23, 21], [25, 19], [25, 43], [26, 3], [27, 25], [28, 26], [30, 43], [30, 19], [31, 3], [32, 30], [33, 31], [35, 3], [37, 35], [39, 3], [41, 39], [43, 43], [43, 19], [44, 19], [44, 43], [45, 8], [45, 44], [46, 45], [47, 8], [48, 3], [49, 47], [50, 48], [52, 3], [54, 52], [56, 55], [58, 57], [59, 58], [59, 4], [60, 3], [61, 59], [62, 60], [64, 3], [65, 64], [68, 66]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807_7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807.jsonl.gz", "strip_func_name": "sub_4120D8", "query": "\n\n\n__int64 __fastcall sub_4120D8(__int64 a1)\n{\nconst char *v1; // rax\nint v3; // [rsp+14h] [rbp-Ch]\nsigned int i; // [rsp+18h] [rbp-8h]\nint v5; // [rsp+1Ch] [rbp-4h]\n\nv5 = -1;\nv3 = be_top(a1);\nif ( v3 > 0 )\n{\nbe_tostring(a1, 1u);\nbe_pushstring(a1, (__int64)\" \");\nfor ( i = 2; i <= v3; ++i )\n{\nbe_strconcat(a1, 1u);\nbe_tostring(a1, i);\nbe_pushvalue(a1, i);\nbe_strconcat(a1, 1u);\nbe_pop(a1, 1);\n}\nbe_pop(a1, v3);\nv1 = (const char *)be_tostring(a1, 1u);\nv5 = system(v1);\n}\nbe_pushint(a1, v5);\nreturn be_returnvalue(a1);\n}\n\n\n\nQ:[a1,v3,v5,sub_4120D8,]", "hints": "[]", "response": "{'a1': 'vm', 'v3': 'argc', 'v5': 'res', 'sub_4120D8': 'm_system'}"}
[ [ 0.8517881631851196, 0.8446062803268433, 0.831444263458252, 0.8099269866943359, 0.8018448948860168, 0.7902550101280212, 0.7854472994804382, 0.7849475741386414, 0.7831017971038818, 0.78285813331604, 0.7785652279853821, 0.7775768041610718, 0.7745321393013, 0.7722229957580566, 0.7701535820960999, 0.7678148746490479, 0.7623526453971863, 0.7589664459228516, 0.7578350305557251, 0.7523717880249023 ], [ 80783, 191110, 110121, 143992, 246234, 231178, 201868, 74074, 95525, 22973, 163756, 132169, 224665, 109138, 119411, 252021, 244071, 103832, 67362, 183352 ] ]
decode_dsp_nowhere
e9ba798da6f2aed0b2a79300bb27720e593939228186fe14dccffd5c83c4fde1
hcs64
vgm_ripping
NA
void decode_dsp_nowhere(struct DSP_decode_state *state, long start_offset, uint32_t start_nibble, uint32_t end_nibble, FILE *infile) { uint32_t current_nibble = start_nibble; long offset = start_offset; int scale = state->ps & 0xf; int coef_index = (state->ps >> 4) & 0xf; int32_t coef1 = state->coef[coef_index*2+0]; int32_t coef2 = state->coef[coef_index*2+1]; do { //if (state->hist1 == -478 && state->hist2 == -2938) printf("offset=%lx current_nibble = %"PRIx32"\n",offset,current_nibble); if (0 == current_nibble % 16) { state->ps = get_byte_seek(offset, infile); scale = state->ps & 0xf; coef_index = (state->ps >> 4) & 0xf; coef1 = state->coef[coef_index*2+0]; coef2 = state->coef[coef_index*2+1]; offset ++; current_nibble += 2; } else { uint8_t byte = get_byte_seek(offset, infile); int32_t delta; if (current_nibble % 2 == 1) delta = byte & 0xf; else delta = (byte >> 4) & 0xf; if (delta >= 8) delta -= 16; int32_t sample = ( (delta << (scale + 11)) + (coef1 * state->hist1 + coef2 * state->hist2) + 1024 ) >> 11; int16_t sample16 = sample; if (sample > 0x7FFF) sample16 = 0x7FFF; else if (sample < -0x8000) sample16 = -0x8000; state->hist2 = state->hist1; state->hist1 = sample16; if (current_nibble % 2 == 1) offset ++; current_nibble ++; } } while (end_nibble >= current_nibble); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402817", "function_addr": 4204567, "binary_name": "e9ba798da6f2aed0b2a79300bb27720e593939228186fe14dccffd5c83c4fde1.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_40], rsi"], [5, "mov [rbp+var_44], edx"], [6, "mov [rbp+var_48], ecx"], [7, "mov [rbp+var_50], r8"], [8, "mov eax, [rbp+var_44]"], [9, "mov [rbp+var_4], eax"], [10, "mov rax, [rbp+var_40]"], [11, "mov [rbp+var_10], rax"], [12, "mov rax, [rbp+var_38]"], [13, "movzx eax, word ptr [rax+20h]"], [14, "movzx eax, ax"], [15, "and eax, 0Fh"], [16, "mov [rbp+var_14], eax"], [17, "mov rax, [rbp+var_38]"], [18, "movzx eax, word ptr [rax+20h]"], [19, "shr ax, 4"], [20, "movzx eax, ax"], [21, "and eax, 0Fh"], [22, "mov [rbp+var_28], eax"], [23, "mov eax, [rbp+var_28]"], [24, "lea edx, [rax+rax]"], [25, "mov rax, [rbp+var_38]"], [26, "movsxd rdx, edx"], [27, "movzx eax, word ptr [rax+rdx*2]"], [28, "cwde"], [29, "mov [rbp+var_18], eax"], [30, "mov eax, [rbp+var_28]"], [31, "add eax, eax"], [32, "lea edx, [rax+1]"], [33, "mov rax, [rbp+var_38]"], [34, "movsxd rdx, edx"], [35, "movzx eax, word ptr [rax+rdx*2]"], [36, "cwde"], [37, "mov [rbp+var_1C], eax"], [38, "mov eax, [rbp+var_4]"], [39, "and eax, 0Fh"], [40, "test eax, eax"], [41, "jnz short loc_402919"], [42, "mov rdx, [rbp+var_50]"], [43, "mov rax, [rbp+var_10]"], [44, "mov rsi, rdx"], [45, "mov rdi, rax"], [46, "call sub_402F43"], [47, "movzx edx, al"], [48, "mov rax, [rbp+var_38]"], [49, "mov [rax+20h], dx"], [50, "mov rax, [rbp+var_38]"], [51, "movzx eax, word ptr [rax+20h]"], [52, "movzx eax, ax"], [53, "and eax, 0Fh"], [54, "mov [rbp+var_14], eax"], [55, "mov rax, [rbp+var_38]"], [56, "movzx eax, word ptr [rax+20h]"], [57, "shr ax, 4"], [58, "movzx eax, ax"], [59, "and eax, 0Fh"], [60, "mov [rbp+var_28], eax"], [61, "mov eax, [rbp+var_28]"], [62, "lea edx, [rax+rax]"], [63, "mov rax, [rbp+var_38]"], [64, "movsxd rdx, edx"], [65, "movzx eax, word ptr [rax+rdx*2]"], [66, "cwde"], [67, "mov [rbp+var_18], eax"], [68, "mov eax, [rbp+var_28]"], [69, "add eax, eax"], [70, "lea edx, [rax+1]"], [71, "mov rax, [rbp+var_38]"], [72, "movsxd rdx, edx"], [73, "movzx eax, word ptr [rax+rdx*2]"], [74, "cwde"], [75, "mov [rbp+var_1C], eax"], [76, "add [rbp+var_10], 1"], [77, "add [rbp+var_4], 2"], [78, "jmp loc_4029EF"], [79, "mov rdx, [rbp+var_50]"], [80, "mov rax, [rbp+var_10]"], [81, "mov rsi, rdx"], [82, "mov rdi, rax"], [83, "call sub_402F43"], [84, "mov [rbp+var_29], al"], [85, "mov eax, [rbp+var_4]"], [86, "and eax, 1"], [87, "test eax, eax"], [88, "jz short loc_402945"], [89, "movzx eax, [rbp+var_29]"], [90, "and eax, 0Fh"], [91, "mov [rbp+var_20], eax"], [92, "jmp short loc_402955"], [93, "movzx eax, [rbp+var_29]"], [94, "shr al, 4"], [95, "movzx eax, al"], [96, "and eax, 0Fh"], [97, "mov [rbp+var_20], eax"], [98, "cmp [rbp+var_20], 7"], [99, "jle short loc_40295F"], [100, "sub [rbp+var_20], 10h"], [101, "mov eax, [rbp+var_14]"], [102, "add eax, 0Bh"], [103, "mov edx, [rbp+var_20]"], [104, "mov ecx, eax"], [105, "shl edx, cl"], [106, "mov ecx, edx"], [107, "mov rax, [rbp+var_38]"], [108, "movzx eax, word ptr [rax+22h]"], [109, "cwde"], [110, "imul eax, [rbp+var_18]"], [111, "mov edx, eax"], [112, "mov rax, [rbp+var_38]"], [113, "movzx eax, word ptr [rax+24h]"], [114, "cwde"], [115, "imul eax, [rbp+var_1C]"], [116, "add eax, edx"], [117, "add eax, ecx"], [118, "add eax, 400h"], [119, "sar eax, 0Bh"], [120, "mov [rbp+var_30], eax"], [121, "mov eax, [rbp+var_30]"], [122, "mov [rbp+var_22], ax"], [123, "cmp [rbp+var_30], 7FFFh"], [124, "jle short loc_4029B1"], [125, "mov [rbp+var_22], 7FFFh"], [126, "jmp short loc_4029C0"], [127, "cmp [rbp+var_30], 0FFFF8000h"], [128, "jge short loc_4029C0"], [129, "mov [rbp+var_22], 8000h"], [130, "mov rax, [rbp+var_38]"], [131, "movzx edx, word ptr [rax+22h]"], [132, "mov rax, [rbp+var_38]"], [133, "mov [rax+24h], dx"], [134, "mov rax, [rbp+var_38]"], [135, "movzx edx, [rbp+var_22]"], [136, "mov [rax+22h], dx"], [137, "mov eax, [rbp+var_4]"], [138, "and eax, 1"], [139, "test eax, eax"], [140, "jz short loc_4029EB"], [141, "add [rbp+var_10], 1"], [142, "add [rbp+var_4], 1"], [143, "mov eax, [rbp+var_48]"], [144, "cmp eax, [rbp+var_4]"], [145, "jnb loc_402891"], [146, "nop"], [147, "nop"], [148, "leave"], [149, "retn"]], "data_dep": [[8, 5], [9, 8], [10, 4], [11, 10], [12, 3], [13, 12], [14, 13], [15, 14], [16, 15], [17, 3], [18, 17], [19, 18], [20, 19], [21, 20], [22, 21], [23, 22], [24, 23], [25, 3], [26, 24], [27, 25], [29, 27], [30, 22], [31, 30], [32, 31], [32, 26], [33, 3], [34, 32], [35, 33], [37, 35], [38, 142], [38, 9], [38, 77], [39, 38], [40, 39], [41, 40], [42, 7], [43, 76], [43, 11], [43, 141], [44, 42], [45, 43], [47, 46], [48, 3], [49, 48], [49, 47], [50, 3], [51, 50], [51, 49], [52, 51], [53, 52], [54, 53], [55, 3], [56, 55], [56, 49], [57, 56], [58, 57], [59, 58], [60, 59], [61, 60], [62, 61], [62, 47], [62, 49], [63, 3], [64, 62], [65, 63], [65, 49], [67, 65], [68, 60], [69, 68], [70, 64], [70, 49], [70, 69], [71, 3], [72, 70], [73, 71], [73, 49], [75, 73], [76, 76], [76, 11], [76, 141], [77, 142], [77, 9], [77, 77], [79, 7], [80, 76], [80, 11], [80, 141], [81, 79], [82, 80], [84, 83], [85, 9], [85, 77], [85, 142], [86, 85], [87, 86], [88, 87], [89, 84], [90, 89], [91, 90], [93, 84], [94, 93], [95, 94], [96, 95], [97, 96], [98, 91], [98, 97], [99, 98], [100, 91], [100, 97], [101, 16], [101, 54], [102, 101], [103, 97], [103, 91], [103, 100], [104, 102], [105, 104], [105, 103], [106, 105], [107, 3], [108, 107], [108, 136], [108, 49], [108, 133], [110, 29], [110, 67], [110, 108], [111, 110], [112, 3], [113, 133], [113, 112], [113, 136], [113, 49], [115, 75], [115, 113], [115, 37], [116, 111], [116, 115], [117, 116], [117, 106], [118, 117], [119, 118], [120, 119], [121, 120], [122, 121], [123, 120], [124, 123], [127, 120], [128, 127], [130, 3], [131, 136], [131, 49], [131, 133], [131, 130], [132, 3], [133, 132], [133, 131], [134, 3], [135, 129], [135, 122], [135, 125], [136, 135], [136, 134], [137, 142], [137, 9], [137, 77], [138, 137], [139, 138], [140, 139], [141, 76], [141, 11], [141, 141], [142, 9], [142, 77], [142, 142], [143, 6], [144, 77], [144, 143], [144, 142], [145, 144], [149, 143]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/e9ba798da6f2aed0b2a79300bb27720e593939228186fe14dccffd5c83c4fde1_e9ba798da6f2aed0b2a79300bb27720e593939228186fe14dccffd5c83c4fde1.jsonl.gz", "strip_func_name": "sub_402817", "query": "\n\n\n__int64 __fastcall sub_402817(_WORD *a1, __int64 a2, unsigned int a3, unsigned int a4, __int64 a5)\n{\n__int64 result; // rax\nint v8; // [rsp+20h] [rbp-30h]\nunsigned __int8 v9; // [rsp+27h] [rbp-29h]\nint v10; // [rsp+28h] [rbp-28h]\nint v11; // [rsp+28h] [rbp-28h]\n__int16 v12; // [rsp+2Eh] [rbp-22h]\nint v13; // [rsp+30h] [rbp-20h]\nint v14; // [rsp+34h] [rbp-1Ch]\nint v15; // [rsp+38h] [rbp-18h]\n__int16 v16; // [rsp+3Ch] [rbp-14h]\n\nv16 = a1[16] & 0xF;\nv10 = (a1[16] >> 4) & 0xF;\nv15 = (__int16)a1[2 * v10];\nv14 = (__int16)a1[2 * v10 + 1];\ndo\n{\nif ( (a3 & 0xF) != 0 )\n{\nv9 = sub_402F43(a2, a5);\nif ( (a3 & 1) != 0 )\nv13 = v9 & 0xF;\nelse\nv13 = v9 >> 4;\nif ( v13 > 7 )\nv13 -= 16;\nv8 = ((v13 << (v16 + 11)) + v15 * (__int16)a1[17] + v14 * (__int16)a1[18] + 1024) >> 11;\nv12 = v8;\nif ( v8 <= 0x7FFF )\n{\nif ( v8 < -32768 )\nv12 = 0x8000;\n}\nelse\n{\nv12 = 0x7FFF;\n}\na1[18] = a1[17];\na1[17] = v12;\nif ( (a3 & 1) != 0 )\n++a2;\n++a3;\n}\nelse\n{\na1[16] = (unsigned __int8)sub_402F43(a2, a5);\nv16 = a1[16] & 0xF;\nv11 = (a1[16] >> 4) & 0xF;\nv15 = (__int16)a1[2 * v11];\nv14 = (__int16)a1[2 * v11 + 1];\n++a2;\na3 += 2;\n}\nresult = a4;\n}\nwhile ( a4 >= a3 );\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v8,v9,v11,v12,v13,v14,v15,v16,sub_402817,sub_402F43,]", "hints": "[]", "response": "{'a3': 'start_nibble', 'a4': 'end_nibble', 'a1': 'state', 'a2': 'start_offset', 'a5': 'infile', 'v8': 'sample', 'v9': 'byte', 'v11': 'coef_index', 'v12': 'sample16', 'v13': 'delta', 'v14': 'coef2', 'v15': 'coef1', 'v16': 'scale', 'sub_402817': 'decode_dsp_nowhere', 'sub_402F43': 'get_byte_seek'}"}
[ [ 0.8118512630462646, 0.8083712458610535, 0.800484836101532, 0.7882136106491089, 0.7740741968154907, 0.7692574858665466, 0.7520855665206909, 0.7483260631561279, 0.7448527812957764, 0.7431279420852661, 0.7410926818847656, 0.7188330292701721, 0.7158557176589966, 0.7148821353912354, 0.7123216390609741, 0.7119327187538147, 0.7111321687698364, 0.7073377966880798, 0.7057744860649109, 0.7039168477058411 ], [ 13161, 183358, 69213, 97078, 228874, 167253, 129179, 256603, 138215, 44705, 217381, 175366, 59758, 117039, 187711, 62812, 200202, 205959, 264063, 203997 ] ]
compare_extension_printout
5e30351376931765c4dd59502817c321d019831e5522e1c4958f08caa5bd0763
sniperHW
chuck
NA
static int compare_extension_printout(X509_EXTENSION *extension, const char *expected_output) { BIO *text_buffer = NULL; char *actual_output = NULL; int result = 1; text_buffer = BIO_new(BIO_s_mem()); if (text_buffer == NULL) { fprintf(stderr, "Unable to allocate buffer\n"); goto end; } if (!X509V3_EXT_print(text_buffer, extension, X509V3_EXT_DEFAULT, 0)) { fprintf(stderr, "Failed to print extension\n"); goto end; } /* Append null terminator because we're about to use the buffer contents * as a string. */ if (BIO_write(text_buffer, "\0", 1) != 1) { fprintf(stderr, "Failed to append null terminator to extension text\n"); goto end; } BIO_get_mem_data(text_buffer, &actual_output); result = strcmp(actual_output, expected_output); if (result != 0) { fprintf(stderr, "Expected SCT printout:\n%s\nActual SCT printout:\n%s\n", expected_output, actual_output); } end: BIO_free(text_buffer); return result; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4029AA", "function_addr": 4204970, "binary_name": "5e30351376931765c4dd59502817c321d019831e5522e1c4958f08caa5bd0763.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+s2], rsi"], [5, "mov [rbp+var_10], 0"], [6, "mov [rbp+s1], 0"], [7, "mov [rbp+var_4], 1"], [8, "call _BIO_s_mem"], [9, "mov rdi, rax"], [10, "call _BIO_new"], [11, "mov [rbp+var_10], rax"], [12, "cmp [rbp+var_10], 0"], [13, "jnz short loc_402A0C"], [14, "mov rax, cs:stderr"], [15, "mov rcx, rax"], [16, "mov edx, 1Ah"], [17, "mov esi, 1"], [18, "mov edi, offset aUnableToAlloca"], [19, "call _fwrite"], [20, "jmp loc_402AE5"], [21, "mov rsi, [rbp+var_28]"], [22, "mov rax, [rbp+var_10]"], [23, "mov ecx, 0"], [24, "mov edx, 0"], [25, "mov rdi, rax"], [26, "call _X509V3_EXT_print"], [27, "test eax, eax"], [28, "jnz short loc_402A4D"], [29, "mov rax, cs:stderr"], [30, "mov rcx, rax"], [31, "mov edx, 1Ah"], [32, "mov esi, 1"], [33, "mov edi, offset aFailedToPrintE"], [34, "call _fwrite"], [35, "jmp loc_402AE5"], [36, "mov rax, [rbp+var_10]"], [37, "mov edx, 1"], [38, "mov esi, offset unk_404092"], [39, "mov rdi, rax"], [40, "call _BIO_write"], [41, "cmp eax, 1"], [42, "jz short loc_402A88"], [43, "mov rax, cs:stderr"], [44, "mov rcx, rax"], [45, "mov edx, 33h "], [46, "mov esi, 1"], [47, "mov edi, offset aFailedToAppend_0"], [48, "call _fwrite"], [49, "jmp short loc_402AE5"], [50, "lea rdx, [rbp+s1]"], [51, "mov rax, [rbp+var_10]"], [52, "mov rcx, rdx"], [53, "mov edx, 0"], [54, "mov esi, 3"], [55, "mov rdi, rax"], [56, "call _BIO_ctrl"], [57, "mov rax, [rbp+s1]"], [58, "mov rdx, [rbp+s2]"], [59, "mov rsi, rdx"], [60, "mov rdi, rax"], [61, "call _strcmp"], [62, "mov [rbp+var_4], eax"], [63, "cmp [rbp+var_4], 0"], [64, "jz short loc_402AE4"], [65, "mov rcx, [rbp+s1]"], [66, "mov rax, cs:stderr"], [67, "mov rdx, [rbp+s2]"], [68, "mov esi, offset format"], [69, "mov rdi, rax"], [70, "mov eax, 0"], [71, "call _fprintf"], [72, "jmp short loc_402AE5"], [73, "nop"], [74, "mov rax, [rbp+var_10]"], [75, "mov rdi, rax"], [76, "call _BIO_free"], [77, "mov eax, [rbp+var_4]"], [78, "leave"], [79, "retn"]], "data_dep": [[9, 8], [11, 10], [12, 11], [13, 12], [15, 14], [21, 3], [22, 11], [25, 22], [27, 26], [28, 27], [30, 29], [36, 11], [39, 36], [41, 40], [42, 41], [44, 43], [50, 6], [50, 37], [51, 11], [52, 50], [55, 51], [57, 6], [58, 4], [59, 58], [60, 57], [62, 61], [63, 62], [64, 63], [65, 6], [67, 4], [69, 66], [74, 11], [75, 74], [77, 62], [77, 7], [79, 77]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/5e30351376931765c4dd59502817c321d019831e5522e1c4958f08caa5bd0763_5e30351376931765c4dd59502817c321d019831e5522e1c4958f08caa5bd0763.jsonl.gz", "strip_func_name": "sub_4029AA", "query": "\n\n\n__int64 __fastcall sub_4029AA(__int64 a1, const char *a2)\n{\nunsigned int v3; // [rsp+2Ch] [rbp-4h]\n\nv3 = 1;\nBIO_s_mem();\nif ( BIO_new() )\n{\nif ( (unsigned int)X509V3_EXT_print() )\n{\nif ( (unsigned int)BIO_write() == 1 )\n{\nBIO_ctrl();\nv3 = strcmp(0LL, a2);\nif ( v3 )\nfprintf(stderr, \"Expected SCT printout:\\n%s\\nActual SCT printout:\\n%s\\n\", a2, 0LL);\n}\nelse\n{\nfwrite(\"Failed to append null terminator to extension text\\n\", 1uLL, 0x33uLL, stderr);\n}\n}\nelse\n{\nfwrite(\"Failed to print extension\\n\", 1uLL, 0x1AuLL, stderr);\n}\n}\nelse\n{\nfwrite(\"Unable to allocate buffer\\n\", 1uLL, 0x1AuLL, stderr);\n}\nBIO_free();\nreturn v3;\n}\n\n\n\nQ:[a2,a1,v3,sub_4029AA,]", "hints": "[]", "response": "{'a2': 'expected_output', 'a1': 'extension', 'v3': 'result', 'sub_4029AA': 'compare_extension_printout'}"}
[ [ 0.7477542161941528, 0.7466776967048645, 0.7315359115600586, 0.7315355539321899, 0.7296000123023987, 0.7284948229789734, 0.7282127737998962, 0.7271609306335449, 0.7263808846473694, 0.7250795960426331, 0.7204347252845764, 0.7181468605995178, 0.7132150530815125, 0.7126287221908569, 0.7105381488800049, 0.7072462439537048, 0.7029324769973755, 0.7009444832801819, 0.6989880800247192, 0.6944975852966309 ], [ 194351, 249701, 135219, 40647, 256598, 101434, 106750, 129587, 54240, 96226, 21106, 98603, 105543, 184211, 6653, 184910, 177167, 94483, 208034, 100109 ] ]
m_ismethod
7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807
arendst
Tasmota
NA
static int m_ismethod(bvm *vm) { int top = be_top(vm); if (top >= 1) { bvalue *v = be_indexof(vm, 1); if (var_isclosure(v)) { bclosure *cl = var_toobj(v); bproto *pr = cl->proto; be_pushbool(vm, pr->varg & BE_VA_METHOD); be_return(vm); } } be_return_nil(vm); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_422DC4", "function_addr": 4337092, "binary_name": "7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_28], rdi"], [4, "mov rax, [rbp+var_28]"], [5, "mov rdi, rax"], [6, "call be_top"], [7, "mov [rbp+var_4], eax"], [8, "cmp [rbp+var_4], 0"], [9, "jle short loc_422E4B"], [10, "mov rax, [rbp+var_28]"], [11, "mov esi, 1"], [12, "mov rdi, rax"], [13, "call be_indexof"], [14, "mov [rbp+var_10], rax"], [15, "mov rax, [rbp+var_10]"], [16, "mov eax, [rax+8]"], [17, "and al, 7Fh"], [18, "cmp eax, 26h "], [19, "jnz short loc_422E4B"], [20, "mov rax, [rbp+var_10]"], [21, "mov rax, [rax]"], [22, "mov [rbp+var_18], rax"], [23, "mov rax, [rbp+var_18]"], [24, "mov rax, [rax+18h]"], [25, "mov [rbp+var_20], rax"], [26, "mov rax, [rbp+var_20]"], [27, "movzx eax, byte ptr [rax+0Dh]"], [28, "movzx eax, al"], [29, "and eax, 2"], [30, "mov edx, eax"], [31, "mov rax, [rbp+var_28]"], [32, "mov esi, edx"], [33, "mov rdi, rax"], [34, "call be_pushbool"], [35, "mov rax, [rbp+var_28]"], [36, "mov rdi, rax"], [37, "call be_returnvalue"], [38, "jmp short locret_422E57"], [39, "mov rax, [rbp+var_28]"], [40, "mov rdi, rax"], [41, "call be_returnnilvalue"], [42, "leave"], [43, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [8, 7], [9, 8], [10, 3], [12, 10], [14, 13], [15, 14], [16, 15], [17, 16], [18, 17], [19, 18], [20, 14], [21, 20], [22, 21], [23, 22], [24, 23], [25, 24], [26, 25], [27, 26], [28, 27], [29, 28], [30, 29], [31, 3], [32, 30], [33, 31], [35, 3], [36, 35], [39, 3], [40, 39], [43, 37], [43, 41]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807_7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807.jsonl.gz", "strip_func_name": "sub_422DC4", "query": "\n\n\n__int64 __fastcall sub_422DC4(__int64 a1)\n{\nint v1; // eax\n_DWORD *v3; // [rsp+20h] [rbp-10h]\n\nif ( (int)be_top(a1) <= 0 )\nreturn be_returnnilvalue(a1);\nv3 = (_DWORD *)be_indexof(a1, 1);\nv1 = v3[2];\nLOBYTE(v1) = v1 & 0x7F;\nif ( v1 != 38 )\nreturn be_returnnilvalue(a1);\nbe_pushbool(a1, *(_BYTE *)(*(_QWORD *)(*(_QWORD *)v3 + 24LL) + 13LL) & 2);\nreturn be_returnvalue(a1);\n}\n\n\n\nQ:[a1,v3,sub_422DC4,]", "hints": "[]", "response": "{'a1': 'vm', 'v3': 'v', 'sub_422DC4': 'm_ismethod'}"}
[ [ 0.7630645036697388, 0.7415632605552673, 0.7359583973884583, 0.7327249050140381, 0.7279266119003296, 0.7262845039367676, 0.7240405678749084, 0.7199738025665283, 0.719519317150116, 0.7177796363830566, 0.7161794900894165, 0.7132002115249634, 0.7091281414031982, 0.7080908417701721, 0.7077293395996094, 0.7067606449127197, 0.7064356803894043, 0.7063992619514465, 0.7058776021003723, 0.7026543021202087 ], [ 112353, 114823, 56501, 132433, 123511, 244934, 94657, 116701, 104558, 145620, 112169, 157811, 227151, 161142, 6080, 49569, 3052, 246183, 200636, 167944 ] ]